<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Image overlays</title>
	<atom:link href="http://blogs.mathworks.com/steve/2006/03/28/image-overlays/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/</link>
	<description>Steve Eddins manages the Image &#38; Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.</description>
	<lastBuildDate>Wed, 01 Feb 2012 13:58:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-24316</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 11 Jul 2011 15:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-24316</guid>
		<description>Nancy&#8212;First, I would suggest that it is not necessary to use a loop to complement a binary image. Do it instead with this one statement:

&lt;pre class=&quot;code&quot;&gt;
bw_complemented = ~bw;
&lt;/pre&gt;

Second, imoverlay always uses the foreground (white pixels) to do the overlay. It sounds like you expected it to use foreground pixels sometimes and to use background pixels sometimes.</description>
		<content:encoded><![CDATA[<p>Nancy&mdash;First, I would suggest that it is not necessary to use a loop to complement a binary image. Do it instead with this one statement:</p>
<pre class="code">
bw_complemented = ~bw;
</pre>
<p>Second, imoverlay always uses the foreground (white pixels) to do the overlay. It sounds like you expected it to use foreground pixels sometimes and to use background pixels sometimes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nancy</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-24314</link>
		<dc:creator>Nancy</dc:creator>
		<pubDate>Sat, 09 Jul 2011 19:36:06 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-24314</guid>
		<description>Hi Steve,

I want to overlay perimeters of two objects on top of each other. I used the function bwperim for the same. The output of bwperim is a white outline in a black background. I reverse this using a for loop to give me a black outline in a white background. imoverlay works perfectly in the first case. However it fails in the latter case. All I get is the outline of one object and background is the colour that I specify in the input of imoverlay. Can you please help me in this regard.

Thank you
Nancy</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>I want to overlay perimeters of two objects on top of each other. I used the function bwperim for the same. The output of bwperim is a white outline in a black background. I reverse this using a for loop to give me a black outline in a white background. imoverlay works perfectly in the first case. However it fails in the latter case. All I get is the outline of one object and background is the colour that I specify in the input of imoverlay. Can you please help me in this regard.</p>
<p>Thank you<br />
Nancy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gopesh</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-22669</link>
		<dc:creator>Gopesh</dc:creator>
		<pubDate>Wed, 03 Feb 2010 22:39:45 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-22669</guid>
		<description>Excellent code..was very helpful to me to change the background color of mri images and thereby improving the contrast between the object and background.</description>
		<content:encoded><![CDATA[<p>Excellent code..was very helpful to me to change the background color of mri images and thereby improving the contrast between the object and background.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robbe</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-22243</link>
		<dc:creator>Robbe</dc:creator>
		<pubDate>Tue, 20 Oct 2009 14:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-22243</guid>
		<description>Thanks Steve !! it worked perfectly</description>
		<content:encoded><![CDATA[<p>Thanks Steve !! it worked perfectly</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-22242</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 20 Oct 2009 12:21:42 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-22242</guid>
		<description>Robbe&#8212;Dilate the mask:

&lt;pre&gt;
thicker_mask = imdilate(mask, ones(3, 3));
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Robbe&mdash;Dilate the mask:</p>
<pre>
thicker_mask = imdilate(mask, ones(3, 3));
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robbe</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-22241</link>
		<dc:creator>Robbe</dc:creator>
		<pubDate>Tue, 20 Oct 2009 12:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-22241</guid>
		<description>Hi Steve,

Can you please tell me how can I make imoverlay output line thicker?</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>Can you please tell me how can I make imoverlay output line thicker?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-21966</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 13 Jul 2009 12:59:08 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-21966</guid>
		<description>Chuck&#8212;My overlay code here produces a &quot;truecolor&quot; image, which is an M-by-N-by-3 array.  The first plane is the red component, the second plane is the green component, and the third plane is the blue component.  The color of each image pixel is determined directly from these values, rather than indirectly via the figure colormap.  Unfortunately, this means that colorbar doesn&#039;t work directly with such images.

So you need to do little extra work.  One approach is to display the image as you already do, using &lt;tt&gt;imagesc&lt;/tt&gt; and the desired colormap.  Call &lt;tt&gt;imagesc&lt;/tt&gt; with an output argument so you can save the handle to the created image object.  Then call colorbar.  Finally, set the CData of the image object to the overlay image created using the code shown in this post.</description>
		<content:encoded><![CDATA[<p>Chuck&mdash;My overlay code here produces a &#8220;truecolor&#8221; image, which is an M-by-N-by-3 array.  The first plane is the red component, the second plane is the green component, and the third plane is the blue component.  The color of each image pixel is determined directly from these values, rather than indirectly via the figure colormap.  Unfortunately, this means that colorbar doesn&#8217;t work directly with such images.</p>
<p>So you need to do little extra work.  One approach is to display the image as you already do, using <tt>imagesc</tt> and the desired colormap.  Call <tt>imagesc</tt> with an output argument so you can save the handle to the created image object.  Then call colorbar.  Finally, set the CData of the image object to the overlay image created using the code shown in this post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-21955</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Thu, 09 Jul 2009 03:17:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-21955</guid>
		<description>Hello:

This overlay looks to be just about what I need.
I have a grayscale image that I currently use imagesc to display, using a stock colormap (jet). The values vary from 0 to perhaps 0.010 across the image. However, my object does not fill the entire image. All pixels outside the object are set to 0 using a mask. The data displayed is an error signal at each pixel.

Now, the issue is that as my object improves, the error at some (many, I hope) pixels approaches 0, and so those pixels are indistinguishable form the background or masked-off areas outside the object. I could set the masked areas to -1, and use CLIMS 0 to 0.010, but this still sets the masked areas to the 0 color.

Your overlay should do exactly what I need for the image. However, how do I now display a colorbar to indicate the original scaled colormap?

Thanks
Chuck</description>
		<content:encoded><![CDATA[<p>Hello:</p>
<p>This overlay looks to be just about what I need.<br />
I have a grayscale image that I currently use imagesc to display, using a stock colormap (jet). The values vary from 0 to perhaps 0.010 across the image. However, my object does not fill the entire image. All pixels outside the object are set to 0 using a mask. The data displayed is an error signal at each pixel.</p>
<p>Now, the issue is that as my object improves, the error at some (many, I hope) pixels approaches 0, and so those pixels are indistinguishable form the background or masked-off areas outside the object. I could set the masked areas to -1, and use CLIMS 0 to 0.010, but this still sets the masked areas to the 0 color.</p>
<p>Your overlay should do exactly what I need for the image. However, how do I now display a colorbar to indicate the original scaled colormap?</p>
<p>Thanks<br />
Chuck</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-21892</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 18 Jun 2009 12:03:54 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-21892</guid>
		<description>Rushil&#8212;In that case, you might want to explore &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/visualize/f3-6010.html&quot; rel=&quot;nofollow&quot;&gt;other options for transparent object display&lt;/a&gt; in MATLAB.</description>
		<content:encoded><![CDATA[<p>Rushil&mdash;In that case, you might want to explore <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/visualize/f3-6010.html" rel="nofollow">other options for transparent object display</a> in MATLAB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rushil</title>
		<link>http://blogs.mathworks.com/steve/2006/03/28/image-overlays/#comment-21889</link>
		<dc:creator>Rushil</dc:creator>
		<pubDate>Thu, 18 Jun 2009 09:11:24 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=49#comment-21889</guid>
		<description>Steve,

Yes, that is what I am looking to do but My &quot;Mask&quot; is not an image, it is a contour of densities (from the contourf function)so is there any way I can adapt what you had showed in &quot;Image overlay using transparency&quot; to suit my task?

Thank you for your help.

Rushil</description>
		<content:encoded><![CDATA[<p>Steve,</p>
<p>Yes, that is what I am looking to do but My &#8220;Mask&#8221; is not an image, it is a contour of densities (from the contourf function)so is there any way I can adapt what you had showed in &#8220;Image overlay using transparency&#8221; to suit my task?</p>
<p>Thank you for your help.</p>
<p>Rushil</p>
]]></content:encoded>
	</item>
</channel>
</rss>

