<?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: Intensity-weighted centroids</title>
	<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/</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>Sun, 08 Nov 2009 06:02:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22232</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 19 Oct 2009 19:26:21 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22232</guid>
		<description>Matt&#8212;You might try looking at the &lt;a href="http://www.mathworks.com/products/image/demos.html?file=/products/demos/shipping/images/ipexwatershed.html" rel="nofollow"&gt;marker-controlled watershed segmentation&lt;/a&gt; demo.</description>
		<content:encoded><![CDATA[<p>Matt&mdash;You might try looking at the <a href="http://www.mathworks.com/products/image/demos.html?file=/products/demos/shipping/images/ipexwatershed.html" rel="nofollow">marker-controlled watershed segmentation</a> demo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22205</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 08 Oct 2009 16:27:37 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22205</guid>
		<description>I have some separated blobs to detect. Each one should have a Gaussian shape. Usually the bwlabel works well but sometimes two blobs are found as 1 object when they should really be two objects.
What do you think to do about this? Could I detect that one feature has 2 peaks? 
Thanks Matt</description>
		<content:encoded><![CDATA[<p>I have some separated blobs to detect. Each one should have a Gaussian shape. Usually the bwlabel works well but sometimes two blobs are found as 1 object when they should really be two objects.<br />
What do you think to do about this? Could I detect that one feature has 2 peaks?<br />
Thanks Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22154</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Wed, 23 Sep 2009 17:21:07 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22154</guid>
		<description>Just that intensity-weighted second moment (orientation)... for now!  Thanks.</description>
		<content:encoded><![CDATA[<p>Just that intensity-weighted second moment (orientation)&#8230; for now!  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22125</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 16 Sep 2009 18:13:05 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22125</guid>
		<description>Travis&#8212;Your method sounds promising. Are there any specific grayscale properties you are particularly interested in?  Thanks for your suggestions.</description>
		<content:encoded><![CDATA[<p>Travis&mdash;Your method sounds promising. Are there any specific grayscale properties you are particularly interested in?  Thanks for your suggestions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22124</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Wed, 16 Sep 2009 16:51:25 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22124</guid>
		<description>I believe I found a solution...  By using the gray scale pixel values for intensity, the calculations for uxx, uyy, and uxy are weighted.  These parameters are then used to calculate orientation the same way regionprops does for binary images.

The part of the code in regionprops for the non-weighted case is:
&lt;pre&gt;
uxx = sum(x.^2)/N + 1/12;
uyy = sum(y.^2)/N + 1/12;
uxy = sum(x.*y)/N;
&lt;/pre&gt;

I changed this to:

&lt;pre&gt;
uxx = sum((x.^2.*PixelWeights)/sum_region)-xbar^2;
uyy = sum((y.^2.*PixelWeights)/sum_region)-ybar^2;
uxy = sum((y.*x.*PixelWeights)/sum_region)-xbar*ybar;
&lt;/pre&gt;

Where xbar and ybar are the intensity-weighted centroids (now available as an output from regionprops as "WeightedCentroid") and sum_region is the sum of the gray level area.  Hopefully my approach is correct... it seems to make sense on some test images.  

It would be nice to have regionprops expanded to include more properties for grayscale images.  Thanks for the input.</description>
		<content:encoded><![CDATA[<p>I believe I found a solution&#8230;  By using the gray scale pixel values for intensity, the calculations for uxx, uyy, and uxy are weighted.  These parameters are then used to calculate orientation the same way regionprops does for binary images.</p>
<p>The part of the code in regionprops for the non-weighted case is:</p>
<pre>
uxx = sum(x.^2)/N + 1/12;
uyy = sum(y.^2)/N + 1/12;
uxy = sum(x.*y)/N;
</pre>
<p>I changed this to:</p>
<pre>
uxx = sum((x.^2.*PixelWeights)/sum_region)-xbar^2;
uyy = sum((y.^2.*PixelWeights)/sum_region)-ybar^2;
uxy = sum((y.*x.*PixelWeights)/sum_region)-xbar*ybar;
</pre>
<p>Where xbar and ybar are the intensity-weighted centroids (now available as an output from regionprops as &#8220;WeightedCentroid&#8221;) and sum_region is the sum of the gray level area.  Hopefully my approach is correct&#8230; it seems to make sense on some test images.  </p>
<p>It would be nice to have regionprops expanded to include more properties for grayscale images.  Thanks for the input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22123</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 16 Sep 2009 12:13:01 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22123</guid>
		<description>Travis&#8212;What is your definition of intensity-weighted orientation?  For "flat" (nonweighted) regions, &lt;tt&gt;regionprops&lt;/tt&gt; defines object orientation as the orientation of the major axis of an ellipse that has the same second-order moments as the region.  It's not obvious to me how to extend this definition to a nonflat region.</description>
		<content:encoded><![CDATA[<p>Travis&mdash;What is your definition of intensity-weighted orientation?  For &#8220;flat&#8221; (nonweighted) regions, <tt>regionprops</tt> defines object orientation as the orientation of the major axis of an ellipse that has the same second-order moments as the region.  It&#8217;s not obvious to me how to extend this definition to a nonflat region.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22119</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Tue, 15 Sep 2009 18:00:06 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-22119</guid>
		<description>I found this post useful for finding the intensity-weighted centroid of a gray scale image.  However, I need to go one step further... is there a way to compute the intensity-weighted orientation of an object (or region) in a gray scale image? 

Thanks,
Travis</description>
		<content:encoded><![CDATA[<p>I found this post useful for finding the intensity-weighted centroid of a gray scale image.  However, I need to go one step further&#8230; is there a way to compute the intensity-weighted orientation of an object (or region) in a gray scale image? </p>
<p>Thanks,<br />
Travis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-21944</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 06 Jul 2009 15:22:11 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-21944</guid>
		<description>Murat&#8212;Use &lt;tt&gt;rgb2gray&lt;/tt&gt;, then threshold using the MATLAB &lt;tt&gt;&#60;&lt;/tt&gt; operator, and then label the objects using &lt;tt&gt;bwlabel&lt;/tt&gt;.  Use &lt;tt&gt;regionprops&lt;/tt&gt; to compute measurements that might be useful in estimating the diameter (bounding box, area, perimeter, ellipse parameters).</description>
		<content:encoded><![CDATA[<p>Murat&mdash;Use <tt>rgb2gray</tt>, then threshold using the MATLAB <tt>&lt;</tt> operator, and then label the objects using <tt>bwlabel</tt>.  Use <tt>regionprops</tt> to compute measurements that might be useful in estimating the diameter (bounding box, area, perimeter, ellipse parameters).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: murat</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-21935</link>
		<dc:creator>murat</dc:creator>
		<pubDate>Fri, 03 Jul 2009 08:39:04 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-21935</guid>
		<description>Hi Steve,
I have an rgb image of a kind of cream and it contains some small black particles (black dots). In colormap I can see that black particles composed of 10-15 pixels (according to its size) and in grayscale usually they have a pixel value smaller than 100 (in 0-255). So first I want to label all particles in the image which have a average pixel value under 100, count them (how many dots in my image) and finally measure the approximate diameter of these dots. Thank you in advance Steve..
regards</description>
		<content:encoded><![CDATA[<p>Hi Steve,<br />
I have an rgb image of a kind of cream and it contains some small black particles (black dots). In colormap I can see that black particles composed of 10-15 pixels (according to its size) and in grayscale usually they have a pixel value smaller than 100 (in 0-255). So first I want to label all particles in the image which have a average pixel value under 100, count them (how many dots in my image) and finally measure the approximate diameter of these dots. Thank you in advance Steve..<br />
regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-21923</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 29 Jun 2009 12:39:40 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/08/31/intensity-weighted-centroids/#comment-21923</guid>
		<description>Shahn&#8212;My &lt;a href="http://blogs.mathworks.com/steve/2006/11/17/labeling-labeled-objects/" rel="nofollow"&gt;November 17, 2006 post&lt;/a&gt; shows you how to do it.</description>
		<content:encoded><![CDATA[<p>Shahn&mdash;My <a href="http://blogs.mathworks.com/steve/2006/11/17/labeling-labeled-objects/" rel="nofollow">November 17, 2006 post</a> shows you how to do it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
