There are different ways in implimenting image segmentation, one of which is by thresholding grayscale images. However, this method is sometimes not plausible because there are cases in which the object to be segmented has the same grayscale value as that of the background. In cases such as this, Color image segmentation can be implimented.
Basically in color image segmentation, the color of the object of interest is used in order for it to be segmented in the image. However, the color space is not represented by the RGB values. This is because 3D objects have shading variations that cannot be represented alone by RGB values. Thus for this purpose we use the normalized chromaticity coordinates. That is per pixel,
I = R + G + B;
r = R/I ; g = G/I ; b = B/I
This only means that the chromaticity coordinates can be represented by only two coordinates, r and g. The normalized chromaticity space is therefore represented by the following graph.
r = R/I ; g = G/I ; b = B/I
We note that r + g + b = 1, thus b can be represented by,
b = 1 - r - g;
There are two methods in image segmentation: parametric and non-parametric. In the parametric method, tagging pixels that are similar to those found in the region of interest is done by calculating the probability that it is found in the ROI. This is done by assuming a gaussian distribution independently along the normalized chromaticity coordinates of red and green, the probability for r is therefore given by the equation.
where µr and σr are the mean and standard deviation of r, respectively. An equation of the similar form is applied to calculate the p(q). The joint probability of obtaining r and q is the product of p(q) and p(r).
While parametric segmentation uses gaussian probability, non-parametric segmentation uses histogram backprojection. In this method, the histogram of the ROI is calculated and this is used as a look-up table in backprojection. That is a pixel location is given a value equal to its corresponding value in chromaticity space.
While parametric segmentation uses gaussian probability, non-parametric segmentation uses histogram backprojection. In this method, the histogram of the ROI is calculated and this is used as a look-up table in backprojection. That is a pixel location is given a value equal to its corresponding value in chromaticity space.
To test this two methods, the image below was used.
A patch of this image was cropped and was used as the region of interest.
The histogram of this patch was calculated using the code given in the exercise protocol and is presented in the image below.
The obtained histogram when compared to the plot of the normalized chromaticity space indeed represents a color in the shade of the green region.
Using the green patch, the green kitten in the original image is segmented first by using the parametric distribution estimation.
As can be observed from the image above, the method was able to locate and segment the object having the same color as that of the patch. Also, notice that the method was able to detect (some amount) portions of the light green kitten. This is because the two kittens detected (green and light green) are of the same color, however differ in brightness.
Using the same patch and its calculated histogram, image segmentation was implemented by using the non-parametric probability distribution and histogram backprojection. The result of applying this method is give by the image below.
Using the same patch and its calculated histogram, image segmentation was implemented by using the non-parametric probability distribution and histogram backprojection. The result of applying this method is give by the image below.
Observe that this method was also able to detect both of the kittens just like of the previous one. However, notice that the from the image above it looks like the method was able to locate more portions of the light green kitten than the green one despite the fact that the patch was obtained from the green kitten.
For the second time the same process was applied using a brown patch to segment the brown kitten shown in the reference image.
The images above shows the patch used and the histogram of the patch. As can be observed the brown patch is composed of the colors, yellow orange and red.
After applying parametric and non-parametric image segmentation to the image,
Parametric Distribution EstimationNon-parametric Distrbution Estimation
As can be observed in the obtained results for both of the method, 5 colors were spotted. These are dark orange, orange, dark yellow, yellow and brown. Orange and yellow color of varying brightness (light and dark) were spotted because these colors makes up brown. This is clearly shown in the calculated histogram of the brown patch.
Comparing the two methods, the parametric distribution estimation resulted to more accurate results. I think this is because the non-parametric method is highly dependent on the patch chosen. Remember that in the non-parametric distribution, the histogram of the patch is used for backprojection. On the other hand, in the parametric distribution probability of the occurence of the normalized chromaticity red and green are the ones calculated. A wider range of values is present in the parametric approach as compared to the non-parametric.
For this activity, I will give myself a grade of 10 for I was able to do all the required tasks while enjoying the activity.
I thank Thirdy Buno and Irene Crisologo for discussing with me informations regarding this activity.
References:
[1]http://en.wikipedia.org/wiki/Segmentation_(image_processing)
[2] Activity 12: Color Image Segmentation Manual
Comparing the two methods, the parametric distribution estimation resulted to more accurate results. I think this is because the non-parametric method is highly dependent on the patch chosen. Remember that in the non-parametric distribution, the histogram of the patch is used for backprojection. On the other hand, in the parametric distribution probability of the occurence of the normalized chromaticity red and green are the ones calculated. A wider range of values is present in the parametric approach as compared to the non-parametric.
For this activity, I will give myself a grade of 10 for I was able to do all the required tasks while enjoying the activity.
I thank Thirdy Buno and Irene Crisologo for discussing with me informations regarding this activity.
References:
[1]http://en.wikipedia.org/wiki/Segmentation_(image_processing)
[2] Activity 12: Color Image Segmentation Manual
No comments:
Post a Comment