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

Posted in Programming Diary | Tagged , , , , , , , , | 3 Comments