CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2010
    Posts
    5

    Connected Component Labeling

    Does anyone have any code or know where to find any code for doing connected component labeling on binary images?

    I'm using the CImage class to load the image and using the GetBits() function to get a pointer to the image array. I need to be able to take that image and put it into a connected component labeling function and receive a labeled image.

    Thanks

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Connected Component Labeling

    OpenCV has a number of connected-component capabilities (plus much more):
    http://opencv.willowgarage.com/wiki/cvBlobsLib

    Additionally, a one-pass algorithm which you can implement yourself is described here:
    http://en.wikipedia.org/wiki/Blob_extraction
    I would suggest using a disjoint-set data structure (http://en.wikipedia.org/wiki/Disjoin...data_structure) to allow easy merging of components.

  3. #3
    Join Date
    Jan 2010
    Posts
    5

    Re: Connected Component Labeling

    Thanks I ended up with my own version of cvBlobslib. I liked the original, however, it used a contour based approach to find a lot of the blob properties. However, my blobs were only 2 - 5 pixels in area and it didn't do a good job of determining their geometric properties.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured