Monday, August 3, 2009

Activity 12. Color Image Segmentation

An image was downloaded from the internet. The image was cropped in order to make simulations faster. A patch was selected from the downloaded image and loaded into Scilab. The downloaded image and the patch used is shown below. The patch shown below was resized for better illustration. The original size of the patch is 13x13 pixels.


(image from http://lifehackery.com/qimages/5/used-tennis-balls.jpg)

The histogram of the normalized chromaticity space is shown below. The histogram is useful in the interpretation of the results.



The histogram of the patch is generated using the nonparametric method. The generated histogram is shown below. The historam is in agreement with the histogram shown above since the patch selected is in the green region.

The probability that a pixel with chromaticity r belongs to the patch was computed using the formula shown below. The probability for red and green was computed and used to derive the results for the parametric method.

The parametric segmentation was implemented to the original image. The resulting image generated after the original image was processed using the parametric method is shown below.



The original image was also processed using the nonparametric method. The resulting image is shown below.


From the results generated using the two methods, parametric and nonparametric, it can be observed that the parametric method produced a finer result than the nonparametric method. The enhanced image generated by the nonparametric have more dark regions than the image generated using the parametric method. This may indicate that the nonparametric method is stricter in the selection of areas with the same color level as the selected patch. The white areas in the previous two images represent the areas of the original image with the same color level as the selected patch.

I will give myself 10/10 for finishing this activity.

**Gilbert and Rommel helped a lot in this activity.

No comments:

Post a Comment