For the non parametric segmentation, we did histogram backprojection wherein based on a color histogram of the ROI a pixel location is given a value equal to its histogram value in chromaticity space.
The parametric segmentation was done by assuming a gaussian pdf independently along r and g values of the ROI.
Since we are using 2D histograms, we first check if we are indeed getting the right colors.
Here the cropped portion is blue. Comparing our histogram with the chromaticity diagram below, we can see that the histogram is indeed correct. (I rotated the axis of the chromaticity so as to coincide with the histogram origin whichis at the upperleft corner.)


The results for the two methods are shown below.
A. Mugs
The image is

The cropped ROI is

For the non parametric segmentation, the result is

while for the parametric segmentation


B. Obama Lantern





C. Starry Starry Night
The image is

The cropped color is


The parametric segmentation pdf and result is


We can see that the parametric segmentation is a lot stricter than the non-paramertic segmentation. Parametric would work better for when we want to segment shades of colors that are very much alike. For less stricter segmentations use non parametric.
In this activity, I give myself a grade of 10 because I understood and was able to do everything that was required.
No comments:
Post a Comment