Extracting connected components using HSV Space

Luckly, there are a number of examples and source code written for connected components analysis. However, in most of these examples only the grayscale values are used and a single threshold is chosen for extracting blobs from an image. In this example, I used Hue, Saturation and Value components to perform blob extraction analysis(connected compoonent extraction). I also created a simple visual toolbox for demonstration purpose.

You can download the toolbox at http://sourceforge.net/projects/blobstoolbox/

Using this toolbox, you can select the hue range of the blobs you want extract. Also, saturation and value components can be set. In HSV space, Hue components do most of the job. In my project, I used S and V components for pre-thresholding.

As you can see from threshold, you can set hue value, hue vicinity lenght, minimum and maximum values for saturation and value components. Also, you can filter results according to the size of the blobs.

I used openCv 2.1 and cvblobs library. They can be found in opencv.willowgarage.com

Advertisements
This entry was posted in Programming Diary and tagged , , , , , , , , . Bookmark the permalink.

3 Responses to Extracting connected components using HSV Space

  1. Looks pretty interesting.

  2. iplimages says:

    Hi, interesting i will have a try.
    Did you try to compute the threshold values automatically by selecting a particular color in the image? For example using a the Otsu approach (that select the threshold by maximizing inter-class variance)…

    • mdemirst says:

      Thanks for your comment. My program doesn’t calculate threshold value instead expects user to enter threshold for hue, saturation and value. Next step would be to use an algorithm such as multi-otsu to select threshold automatically. Contributions are appreciated

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s