Thursday, September 23, 2010

Color Image Segmentation





This is another type of segmentation. This uses the RBG values and not the Grayscale values to segment colors.

This uses normalized chromaticity coordinates or NCC. In NCC, the RGB values of the image is convertible to just r and g. where r is R/I and I = R+G+B.


NCC example. Y-axis is r and X axis is g.

This image is subject for segmentation:

A bird

There are two way to segment colors. First is the parametric probability distribution.
It the probability of finding the color in the ROI in the image is given by:

where r is the pixel in the image in the red.(it may be in the green too). Sigma and mu are standard deviation and mean of the selected color in the ROI respectively.

The color segmentation in parametric probability distribution is given by:





parametric pdf

In non-parametric, 2D histogram and backprojection are used. The histogram is used to determine the pdf of the selected pixel in the ROI. Then they are backprojected to reconstruct the segmentation. Resulting image is shown below:


non-parametric pdf

This is the histogram of the ROI.
This is the histogram of the image.

Those two are different in a way that the non-parametric part has brighter values for most of the parts. There are parts in the non-parametric that have gray values while in the parametric has black values. Maybe this difference is from how they are obtained. Parametric attains the Gaussian form while non-parametric uses the histogram.



I'd give myself 8/10 for this activity. Thanks to Andy and Gino for helping me code.
Thanks to Maam Jing for the histogram backprojection code and the handout.

No comments:

Post a Comment