<?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: Spatial transformations: Translation confusion</title>
	<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/</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 00:09:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22295</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 05 Nov 2009 17:21:55 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22295</guid>
		<description>Carsten&#8212;Thanks for your input.</description>
		<content:encoded><![CDATA[<p>Carsten&mdash;Thanks for your input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carsten</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22294</link>
		<dc:creator>Carsten</dc:creator>
		<pubDate>Thu, 05 Nov 2009 17:13:56 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22294</guid>
		<description>Another vote for either imtranslate.m, or at least a blurb in the imtransform help why pure translation doesn't change the image.  I wasted a fair bit of time before finding http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/</description>
		<content:encoded><![CDATA[<p>Another vote for either imtranslate.m, or at least a blurb in the imtransform help why pure translation doesn&#8217;t change the image.  I wasted a fair bit of time before finding <a href="http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/" rel="nofollow">http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22177</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 05 Oct 2009 14:51:03 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22177</guid>
		<description>Anand&#8212;See my post on &lt;a href="http://blogs.mathworks.com/steve/2006/08/01/spatial-transformations-controlling-the-input-and-output-grids-with-imtransform/" rel="nofollow"&gt;controlling the input and output grids&lt;/a&gt;.  You'll need to transform both images into an identical output grid so that you can blend them.</description>
		<content:encoded><![CDATA[<p>Anand&mdash;See my post on <a href="http://blogs.mathworks.com/steve/2006/08/01/spatial-transformations-controlling-the-input-and-output-grids-with-imtransform/" rel="nofollow">controlling the input and output grids</a>.  You&#8217;ll need to transform both images into an identical output grid so that you can blend them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anand</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22165</link>
		<dc:creator>Anand</dc:creator>
		<pubDate>Fri, 02 Oct 2009 02:26:54 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22165</guid>
		<description>Hi Steve,
Thanks a lot for your wonderful post!

I am working on Image Stitching. I now have 2 images which I want to stitch together. Using the imtransform command, I am able to get the xdata and ydata parameters which are the starting points of the second image with respect to the first image. Whats the best way to add the 2 images to produce one image? 
Regards,
Anand</description>
		<content:encoded><![CDATA[<p>Hi Steve,<br />
Thanks a lot for your wonderful post!</p>
<p>I am working on Image Stitching. I now have 2 images which I want to stitch together. Using the imtransform command, I am able to get the xdata and ydata parameters which are the starting points of the second image with respect to the first image. Whats the best way to add the 2 images to produce one image?<br />
Regards,<br />
Anand</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22088</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 02 Sep 2009 16:23:12 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22088</guid>
		<description>Kaushik&#8212;Suppose you have a binary mask, bw, whose foreground pixels belong to the object in image A that you want to translate.  Then try something like this:

&lt;pre&gt;
% Initialize new image with desired background.
B = A;
B(:) = background_value;

% Find object pixel locations.
[y, x] = find(bw);

% Translate them.
y2 = y + dy;
x2 = x + dx;

% Find new linear indices.
idx = sub2ind(size(B), y2, x2);

% Copy values from A to B.  Assumes
% translated object fits entirely within
% new image.
B(idx) = A(bw);
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Kaushik&mdash;Suppose you have a binary mask, bw, whose foreground pixels belong to the object in image A that you want to translate.  Then try something like this:</p>
<pre>
% Initialize new image with desired background.
B = A;
B(:) = background_value;

% Find object pixel locations.
[y, x] = find(bw);

% Translate them.
y2 = y + dy;
x2 = x + dx;

% Find new linear indices.
idx = sub2ind(size(B), y2, x2);

% Copy values from A to B.  Assumes
% translated object fits entirely within
% new image.
B(idx) = A(bw);
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaushik</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22082</link>
		<dc:creator>Kaushik</dc:creator>
		<pubDate>Mon, 31 Aug 2009 20:16:01 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22082</guid>
		<description>If the background is constant then how can i translate such an image??</description>
		<content:encoded><![CDATA[<p>If the background is constant then how can i translate such an image??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22079</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 31 Aug 2009 12:25:42 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22079</guid>
		<description>Kaushik&#8212;Is the background constant?  Or do you know what the background pixels "behind" the object are supposed to be? If not, then I don't think there's a way.</description>
		<content:encoded><![CDATA[<p>Kaushik&mdash;Is the background constant?  Or do you know what the background pixels &#8220;behind&#8221; the object are supposed to be? If not, then I don&#8217;t think there&#8217;s a way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaushik</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22073</link>
		<dc:creator>Kaushik</dc:creator>
		<pubDate>Mon, 24 Aug 2009 06:31:51 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22073</guid>
		<description>Hi Steve...Your posts helped me a lot in developing a knowledge about spatial transformation...I want to know if it is possible to translate an irregularly shaped object within an image by keeping the background of the image intact.If yes,then how???</description>
		<content:encoded><![CDATA[<p>Hi Steve&#8230;Your posts helped me a lot in developing a knowledge about spatial transformation&#8230;I want to know if it is possible to translate an irregularly shaped object within an image by keeping the background of the image intact.If yes,then how???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean Brown</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22027</link>
		<dc:creator>Dean Brown</dc:creator>
		<pubDate>Fri, 31 Jul 2009 10:35:36 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22027</guid>
		<description>Thanks Steve for your response.  I found the math in the subfunction and will see what I can do.  Have a great weekend!</description>
		<content:encoded><![CDATA[<p>Thanks Steve for your response.  I found the math in the subfunction and will see what I can do.  Have a great weekend!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22024</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 30 Jul 2009 11:20:02 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2006/07/07/spatial-transformations-translation-confusion/#comment-22024</guid>
		<description>Dean&#8212;The function &lt;tt&gt;cp2tform&lt;/tt&gt; does not support finding a translation-only tform.  I suggest that you take a look at the subfunction FindNonreflectiveSimilarity inside cp2tform.m.  There are comments at the top of this function that detail the math for setting up a least-squares problem.  You could do something similar to this for inferring a translation.</description>
		<content:encoded><![CDATA[<p>Dean&mdash;The function <tt>cp2tform</tt> does not support finding a translation-only tform.  I suggest that you take a look at the subfunction FindNonreflectiveSimilarity inside cp2tform.m.  There are comments at the top of this function that detail the math for setting up a least-squares problem.  You could do something similar to this for inferring a translation.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
