<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: HDR and tone mapping links</title>
	<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/</link>
	<description>Steve Eddins manages the Image &#38; Geospatial development team at &#60;a href="http://www.mathworks.com/"&#62;The MathWorks&#60;/a&#62; and coauthored &#60;a href="http://www.mathworks.com/support/books/book5291.html?category=-1&#38;language=-1"&#62;Digital Image Processing Using MATLAB&#60;/a&#62;. He writes here about image processing concepts, algorithm implementations, and MATLAB.&#60;br&#62;&#60;br&#62;&#60;img&#62;</description>
	<pubDate>Mon, 23 Nov 2009 01:13:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-12814</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 26 Oct 2007 21:02:08 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-12814</guid>
		<description>John and I worked out his problem via e-mail.  It turned out to be extraneous functions on his path.</description>
		<content:encoded><![CDATA[<p>John and I worked out his problem via e-mail.  It turned out to be extraneous functions on his path.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-12695</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 24 Oct 2007 19:50:12 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-12695</guid>
		<description>John&#8212;That's a puzzle.  Normally, you might get this error message when using a tform struct containing only an inverse mapping and no forward mapping.  In that case, imtransform uses an iterative optimization procedure to try to find the output spatial bounds, and sometimes that procedure can fail to find a solution.  But that shouldn't happen for affine, for which it is easy to compute both the forward and the inverse mapping.  I can run the example OK using R2007b on Windows.  Why don't you send me your version and platform information, and I'll follow up with you further by e-mail.</description>
		<content:encoded><![CDATA[<p>John&mdash;That&#8217;s a puzzle.  Normally, you might get this error message when using a tform struct containing only an inverse mapping and no forward mapping.  In that case, imtransform uses an iterative optimization procedure to try to find the output spatial bounds, and sometimes that procedure can fail to find a solution.  But that shouldn&#8217;t happen for affine, for which it is easy to compute both the forward and the inverse mapping.  I can run the example OK using R2007b on Windows.  Why don&#8217;t you send me your version and platform information, and I&#8217;ll follow up with you further by e-mail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John DiCecco</title>
		<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-12694</link>
		<dc:creator>John DiCecco</dc:creator>
		<pubDate>Wed, 24 Oct 2007 19:23:09 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-12694</guid>
		<description>This is an unrelated question but concerns the image processing toolbox.  I am using a site license for the Naval Undersea Warfare Center in Newport RI.  I am trying to do some generic affine transformations but keep getting errors.  So I went to the help section for imtransform and copied and pasted the code that was there as an example and still get the same error:

&#62;&#62; I = imread('cameraman.tif');
tform = maketform('affine',[1 0 0; .5 1 0; 0 0 1]);
J = imtransform(I,tform);
imshow(I), figure, imshow(J)
??? Error using ==&#62; imtransform&#62;parse_inputs at 440
XData and YData could not be automatically determined.Try specifying XData and YData explicitly in the call to IMTRANSFORM.

Error in ==&#62; imtransform at 262
args = parse_inputs(varargin{:});

Now of course I can enter xdata and ydata to map the old image to the new one but why am I getting this error on an example?

Thanks,
John</description>
		<content:encoded><![CDATA[<p>This is an unrelated question but concerns the image processing toolbox.  I am using a site license for the Naval Undersea Warfare Center in Newport RI.  I am trying to do some generic affine transformations but keep getting errors.  So I went to the help section for imtransform and copied and pasted the code that was there as an example and still get the same error:</p>
<p>&gt;&gt; I = imread(&#8217;cameraman.tif&#8217;);<br />
tform = maketform(&#8217;affine&#8217;,[1 0 0; .5 1 0; 0 0 1]);<br />
J = imtransform(I,tform);<br />
imshow(I), figure, imshow(J)<br />
??? Error using ==&gt; imtransform&gt;parse_inputs at 440<br />
XData and YData could not be automatically determined.Try specifying XData and YData explicitly in the call to IMTRANSFORM.</p>
<p>Error in ==&gt; imtransform at 262<br />
args = parse_inputs(varargin{:});</p>
<p>Now of course I can enter xdata and ydata to map the old image to the new one but why am I getting this error on an example?</p>
<p>Thanks,<br />
John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pia</title>
		<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11619</link>
		<dc:creator>Pia</dc:creator>
		<pubDate>Wed, 10 Oct 2007 14:05:34 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11619</guid>
		<description>Thank you very much, I will try what you propose.</description>
		<content:encoded><![CDATA[<p>Thank you very much, I will try what you propose.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11615</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 10 Oct 2007 13:05:35 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11615</guid>
		<description>Pia&#8212;It looks to me like you have an ordinary debugging problem to solve.  Your error message is telling you that a struct value, instead of a numeric value, is being passed into cart2pol.  Set a breakpoint - dbstop if error - run the code, and then look up and down the function call stack to see if you can understand which variables contain values you don't expect, and why.  You might try first to see if you can get your custom tform struct to work with &lt;tt&gt;tforminv&lt;/tt&gt;.  If that doesn't work, there's no way &lt;tt&gt;imtransform&lt;/tt&gt; can use it.</description>
		<content:encoded><![CDATA[<p>Pia&mdash;It looks to me like you have an ordinary debugging problem to solve.  Your error message is telling you that a struct value, instead of a numeric value, is being passed into cart2pol.  Set a breakpoint - dbstop if error - run the code, and then look up and down the function call stack to see if you can understand which variables contain values you don&#8217;t expect, and why.  You might try first to see if you can get your custom tform struct to work with <tt>tforminv</tt>.  If that doesn&#8217;t work, there&#8217;s no way <tt>imtransform</tt> can use it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pia</title>
		<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11611</link>
		<dc:creator>Pia</dc:creator>
		<pubDate>Wed, 10 Oct 2007 09:00:04 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11611</guid>
		<description>Thank you for your help and for responding so quickly.

If I may, I have another question: I am making a 'custom' spatial transformation and I am using pol2cart and cart2pol as the forward and inverse functions. I get the following error message:

??? Undefined function or method 'atan2' for input arguments of type 'struct'.

Error in ==&#62; cart2pol at 22
th = atan2(y,x);

Error in ==&#62; maketform&#62;inv_composite at 584
    U = feval(t.tdata(i).inverse_fcn, U, t.tdata(i));

Error in ==&#62; images\private\tform at 56
X = feval( t.(f.fwd_fcn), U, t );

Error in ==&#62; tforminv at 68
varargout = tform('inv', nargout, varargin{:});

Error in ==&#62; tformarray at 241
            M = tforminv(G,T);

Error in ==&#62; imtransform at 273
B = tformarray(args.A, args.tform, args.resampler, tdims_a, tdims_b, ...

Error in ==&#62; rphi2xy_imtransf at 76
Z = imtransform(absd_chiqui,TFORM, 'UData',udata,'VData',vdata,'XData',xdata,'YData',ydata);

My code is like this:
dims_IN = 2;
dims_OUT = 2; 
FRWD_FCN = @pol2cart;
INV_FCN = @cart2pol;
TDATA = [];
TFORM = maketform('custom',dims_IN, dims_OUT, FRWD_FCN,INV_FCN,TDATA);
udata = [range_start range_end];
vdata = [-angle_w/2 angle_w/2];
xdata = [range_start range_end];
ydata = [range_end*sin(angle_w/2) -range_end*sin(angle_w/2)];
Z = imtransform(absd_chiqui,TFORM, 'UData',udata,'VData',vdata,'XData',xdata,'YData',ydata);

Initially I did not write any UData, VDAta, XData or YData and I got this error message:
XData and YData could not be automatically determined.Try specifying XData and YData explicitly in the call to IMTRANSFORM.

So I guess my question is: isn´t it possible to use such functions for a custom transformation, or is my problem in the TFORM definition?

Thank you again for your time,

Pia</description>
		<content:encoded><![CDATA[<p>Thank you for your help and for responding so quickly.</p>
<p>If I may, I have another question: I am making a &#8216;custom&#8217; spatial transformation and I am using pol2cart and cart2pol as the forward and inverse functions. I get the following error message:</p>
<p>??? Undefined function or method &#8216;atan2&#8242; for input arguments of type &#8217;struct&#8217;.</p>
<p>Error in ==&gt; cart2pol at 22<br />
th = atan2(y,x);</p>
<p>Error in ==&gt; maketform&gt;inv_composite at 584<br />
    U = feval(t.tdata(i).inverse_fcn, U, t.tdata(i));</p>
<p>Error in ==&gt; images\private\tform at 56<br />
X = feval( t.(f.fwd_fcn), U, t );</p>
<p>Error in ==&gt; tforminv at 68<br />
varargout = tform(&#8217;inv&#8217;, nargout, varargin{:});</p>
<p>Error in ==&gt; tformarray at 241<br />
            M = tforminv(G,T);</p>
<p>Error in ==&gt; imtransform at 273<br />
B = tformarray(args.A, args.tform, args.resampler, tdims_a, tdims_b, &#8230;</p>
<p>Error in ==&gt; rphi2xy_imtransf at 76<br />
Z = imtransform(absd_chiqui,TFORM, &#8216;UData&#8217;,udata,&#8217;VData&#8217;,vdata,&#8217;XData&#8217;,xdata,&#8217;YData&#8217;,ydata);</p>
<p>My code is like this:<br />
dims_IN = 2;<br />
dims_OUT = 2;<br />
FRWD_FCN = @pol2cart;<br />
INV_FCN = @cart2pol;<br />
TDATA = [];<br />
TFORM = maketform(&#8217;custom&#8217;,dims_IN, dims_OUT, FRWD_FCN,INV_FCN,TDATA);<br />
udata = [range_start range_end];<br />
vdata = [-angle_w/2 angle_w/2];<br />
xdata = [range_start range_end];<br />
ydata = [range_end*sin(angle_w/2) -range_end*sin(angle_w/2)];<br />
Z = imtransform(absd_chiqui,TFORM, &#8216;UData&#8217;,udata,&#8217;VData&#8217;,vdata,&#8217;XData&#8217;,xdata,&#8217;YData&#8217;,ydata);</p>
<p>Initially I did not write any UData, VDAta, XData or YData and I got this error message:<br />
XData and YData could not be automatically determined.Try specifying XData and YData explicitly in the call to IMTRANSFORM.</p>
<p>So I guess my question is: isn´t it possible to use such functions for a custom transformation, or is my problem in the TFORM definition?</p>
<p>Thank you again for your time,</p>
<p>Pia</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11577</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 09 Oct 2007 13:57:42 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11577</guid>
		<description>Pia&#8212;&lt;tt&gt;imagesc&lt;/tt&gt; simply scales the image to fit into the current axes.  If there's no figure currently open, a figure gets created at the default size, and the image gets plotted into an axes inside that figure, also at the default size.  Nearest-neighbor interpolation is used.  If you want more scaling control, try using the Image Processing Toolbox function &lt;tt&gt;imtool&lt;/tt&gt;.</description>
		<content:encoded><![CDATA[<p>Pia&mdash;<tt>imagesc</tt> simply scales the image to fit into the current axes.  If there&#8217;s no figure currently open, a figure gets created at the default size, and the image gets plotted into an axes inside that figure, also at the default size.  Nearest-neighbor interpolation is used.  If you want more scaling control, try using the Image Processing Toolbox function <tt>imtool</tt>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pia</title>
		<link>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11576</link>
		<dc:creator>Pia</dc:creator>
		<pubDate>Tue, 09 Oct 2007 13:51:57 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/10/05/hdr-and-tone-mapping-links/#comment-11576</guid>
		<description>I have a couple of questions regarding the size and techniques using the imagesc function. I would like to know first of all the actual size of the resulting image, for instance if my original image has 240 rows times 24000 columns, will it be reduced to fit the imagesc default size? And if so, how does Matlab do it? Which points does it take away and which will it keep?
I have looked for a while but I have not been able to find any answers, I hope it isn´t such stupid question. 
Thank you very much for your time.</description>
		<content:encoded><![CDATA[<p>I have a couple of questions regarding the size and techniques using the imagesc function. I would like to know first of all the actual size of the resulting image, for instance if my original image has 240 rows times 24000 columns, will it be reduced to fit the imagesc default size? And if so, how does Matlab do it? Which points does it take away and which will it keep?<br />
I have looked for a while but I have not been able to find any answers, I hope it isn´t such stupid question.<br />
Thank you very much for your time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
