<?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: Connected component labeling - Part 3</title>
	<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/</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 03:43:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-21515</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 26 Feb 2009 21:54:36 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-21515</guid>
		<description>Angel&#8212;We provide connected component code in the form of the Image Processing Toolbox.  :-)  If you have that, there's no need to implement anything yourself.  If you can't use the Image Processing Toolbox, then there's a wealth of information readily accessible on the web about connected-component labeling and breadth-first searching algorithms.</description>
		<content:encoded><![CDATA[<p>Angel&mdash;We provide connected component code in the form of the Image Processing Toolbox.  :-)  If you have that, there&#8217;s no need to implement anything yourself.  If you can&#8217;t use the Image Processing Toolbox, then there&#8217;s a wealth of information readily accessible on the web about connected-component labeling and breadth-first searching algorithms.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: angel</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-21514</link>
		<dc:creator>angel</dc:creator>
		<pubDate>Thu, 26 Feb 2009 19:10:05 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-21514</guid>
		<description>am doing project on handwritten character segmentation....can i know the BFS(Breadth First Search) code for finding out the connected components?</description>
		<content:encoded><![CDATA[<p>am doing project on handwritten character segmentation&#8230;.can i know the BFS(Breadth First Search) code for finding out the connected components?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20616</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 17 Apr 2008 00:36:33 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20616</guid>
		<description>Tim&#8212;I knew that.  ;-)</description>
		<content:encoded><![CDATA[<p>Tim&mdash;I knew that.  ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Davis</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20615</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Thu, 17 Apr 2008 00:34:31 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20615</guid>
		<description>OK.  I was thinking it might affect other functions such as mindread.m, or time-transfer-related functions such as doc('who') ... ;-)</description>
		<content:encoded><![CDATA[<p>OK.  I was thinking it might affect other functions such as mindread.m, or time-transfer-related functions such as doc(&#8217;who&#8217;) &#8230; ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20610</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 16 Apr 2008 18:05:02 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20610</guid>
		<description>Tim&#8212;I don't think it affects &lt;tt&gt;bwlabel&lt;/tt&gt;.  I can't speak to the question of "other functions."  :-)</description>
		<content:encoded><![CDATA[<p>Tim&mdash;I don&#8217;t think it affects <tt>bwlabel</tt>.  I can&#8217;t speak to the question of &#8220;other functions.&#8221;  :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Davis</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20592</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Mon, 14 Apr 2008 23:20:10 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20592</guid>
		<description>dmperm in MATLAB 7.5 or later has been modified, since this article was first written (MATLAB is now using the dmperm in CSparse).  Among other things, dmperm now returns each connected component in their natural order.  That is, p(r(1):r(2)-1) is now [1 2 3 4], not [3 4 2 1], for this example.

There's nothing special to the ordering of nodes within a single connected component, so it makes more sense to return them in a natural order instead of a rather arbitrarily jumbled order.

Does this have any noticeable effect on bwlabel or other functions?</description>
		<content:encoded><![CDATA[<p>dmperm in MATLAB 7.5 or later has been modified, since this article was first written (MATLAB is now using the dmperm in CSparse).  Among other things, dmperm now returns each connected component in their natural order.  That is, p(r(1):r(2)-1) is now [1 2 3 4], not [3 4 2 1], for this example.</p>
<p>There&#8217;s nothing special to the ordering of nodes within a single connected component, so it makes more sense to return them in a natural order instead of a rather arbitrarily jumbled order.</p>
<p>Does this have any noticeable effect on bwlabel or other functions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20402</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 04 Mar 2008 13:05:32 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20402</guid>
		<description>Ake&#8212;Use &lt;tt&gt;bwlabel&lt;/tt&gt; and &lt;tt&gt;regionprops&lt;/tt&gt;.</description>
		<content:encoded><![CDATA[<p>Ake&mdash;Use <tt>bwlabel</tt> and <tt>regionprops</tt>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ake Lu</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20397</link>
		<dc:creator>Ake Lu</dc:creator>
		<pubDate>Tue, 04 Mar 2008 03:01:31 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-20397</guid>
		<description>Dear Steve,

I would like to count the size of connectors for each "cluster" in the following example
bw =

     0     0     0     0     0     0     1
     0     1     1     0     0     0     1
     0     1     1     0     0     0     0
     0     0     0     1     1     1     0
     0     0     0     1     1     1     0
     0     0     0     0     0     0     0
Then based on  8-connectivity, define 
cluster=
     0     0     0     0     0     0     2
     0     1     1     0     0     0     2
     0     1     1     0     0     0     0
     0     0     0     1     1     1     0
     0     0     0     1     1     1     0
     0     0     0     0     0     0     0
Thus,
cluster one has 10 pixels and   cluster 2= 2 pixels. How could I use the above code to get the size of cluster?

Best regards,

Ake</description>
		<content:encoded><![CDATA[<p>Dear Steve,</p>
<p>I would like to count the size of connectors for each &#8220;cluster&#8221; in the following example<br />
bw =</p>
<p>     0     0     0     0     0     0     1<br />
     0     1     1     0     0     0     1<br />
     0     1     1     0     0     0     0<br />
     0     0     0     1     1     1     0<br />
     0     0     0     1     1     1     0<br />
     0     0     0     0     0     0     0<br />
Then based on  8-connectivity, define<br />
cluster=<br />
     0     0     0     0     0     0     2<br />
     0     1     1     0     0     0     2<br />
     0     1     1     0     0     0     0<br />
     0     0     0     1     1     1     0<br />
     0     0     0     1     1     1     0<br />
     0     0     0     0     0     0     0<br />
Thus,<br />
cluster one has 10 pixels and   cluster 2= 2 pixels. How could I use the above code to get the size of cluster?</p>
<p>Best regards,</p>
<p>Ake</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Davis</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-6816</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Fri, 29 Jun 2007 15:15:39 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-6816</guid>
		<description>uhh ... silly me ... I can't divide.  The subsref is working at 560 thousand "ops per second".  x=A\b is working at 1.2 Gflops.  So subsref is over Two Thousand times slower than backslash, not one thousand.

Sorry for the confusion.</description>
		<content:encoded><![CDATA[<p>uhh &#8230; silly me &#8230; I can&#8217;t divide.  The subsref is working at 560 thousand &#8220;ops per second&#8221;.  x=A\b is working at 1.2 Gflops.  So subsref is over Two Thousand times slower than backslash, not one thousand.</p>
<p>Sorry for the confusion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Davis</title>
		<link>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-6815</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Fri, 29 Jun 2007 15:11:31 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2007/03/20/connected-component-labeling-part-3/#comment-6815</guid>
		<description>For comparison, for this matrix x=A\b where b is a dense vector takes 0.45 seconds and does 56 million floating-point operations.  The A(1:(n+1):end)=1 statement should take at most O(nnz(A)) time, where in this case nnz(A) is about 96,000.  So A\b is working at 1.2 Gflops (excluding all the integer work that it also has to do...), and A(1:(n+1):end)=1 is working at 56 thousand "index operations per second".  That's a factor almost exactly one thousand times slower.

I realize of course that this connected components problem has nothing to do with solving A*x=b.  What this does point out is just how slow, by comparison, sparse sub assignment truly is.</description>
		<content:encoded><![CDATA[<p>For comparison, for this matrix x=A\b where b is a dense vector takes 0.45 seconds and does 56 million floating-point operations.  The A(1:(n+1):end)=1 statement should take at most O(nnz(A)) time, where in this case nnz(A) is about 96,000.  So A\b is working at 1.2 Gflops (excluding all the integer work that it also has to do&#8230;), and A(1:(n+1):end)=1 is working at 56 thousand &#8220;index operations per second&#8221;.  That&#8217;s a factor almost exactly one thousand times slower.</p>
<p>I realize of course that this connected components problem has nothing to do with solving A*x=b.  What this does point out is just how slow, by comparison, sparse sub assignment truly is.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
