Steve on Image Processing

June 13th, 2007

Connected component labeling - Wrapping up

I've about run out of things to say for now about connected component labeling algorithms. ("Hurray!" shouts the audience.)

For reference, here's a summary of all the posts in the series:

2 Responses to “Connected component labeling - Wrapping up”

  1. Ram replied on :

    hi steve,

    Is there a way of establishing custom connectivity
    such as conn=[00100;
    01110;
    11111;
    01110;
    00100];?
    If i am not wrong bwlabel allows only scalars 4 and 8.

  2. Steve replied on :

    Ram—Use bwlabeln, which allows custom connectivity matrix. However, your example is not a valid connectivity matrix. The Image Processing Toolbox connectivity definitions do not allow you to say that a pixel is directly adjacent to another pixel that’s two steps away, which is what your matrix implies.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Steve Eddins manages the Image & Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.

  • Steve: Kezia—Try imrotate.
  • kezia: steve, how to perform rotation of structuring element by 15 degrees. kindly answer my question. thank u kezia...
  • Steve: Tasha—I only accept comments that are relevant to the particular blog post or are questions or comments...
  • Tasha: Steve,I send you a comment here but still didn’t get any reply yet.I did not see my comment posted here...
  • Steve: Carsten—Thanks for your input.
  • Carsten: Another vote for either imtranslate.m, or at least a blurb in the imtransform help why pure translation...
  • Loren Shure: If you look towards the end of the fftfilt program, you will see that there’s a check to see if...
  • Steve: Sonja—My imwritesize submission on the MATLAB Central File Exchange might be helpful. It was posted...
  • Steve: Grant—Sorry, but it won’t be for R2010a. That development deadline has already passed.
  • Sonja: My publisher is wanting images for a new book to be 300 dpi. Only 5 of the 19 images are 300, the rest are...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.