Martes, Disyembre 19, 2017

Through Rose-Colored Lenses: Color Image Segmentation

For this activity, objects in an image can be detected using its color. This is very easy for humans, now, we will let the computer do it using normalized chromaticity coordinates. The first method is to do parametric segmentation where the value in a gaussian distribution of each pixel was obtained using the mean and the standard deviation of the region of interest. Basically, this shows how is the color of the pixel from the color of the ROI in the NCC plot.  
Non-parametric segmentation uses the NCC plot of the region of interest. For each pixel in the original image, the (r,g) values will be obtained. The frequency of the (r,g) value in the NCC plot of the ROI will the new pixel in the converted image. The converted image will then have white or high pixel values for objects with colors same as in the ROI.


Figure 1. The original image used. 

Figures 2-6 shows different results of segmenting the image using different ROIs. One common observation is that the non-parametric segmentation captures other objects with colors included in the region of interest. The parametric segmentation only objects with colors very near to the color of the region of interest. In figure 2, for example, the parametric segmentation captured brightly the blue logbook only. It faintly detected the blue shirt at the lower left of the image. The non-parametric segmentation also captured the cyan rose notebook and the cyan pen near the center. 
In figure 3, the cyan pen was also detected by the non-parametric segmentation. 
In figure 4, the parametric segmentation detected the red notebook and the pink container at the left. The floor, the umbrella, the roses, and other reddish colors were not detected but were detected using the non-parametric segmentation. 
In figure 5, only the yellow notepad was detected, other instances of yellow were not detected by the parametric segmentation, but were detected by the non-parametric segmentation. 
Figure 6 is a bit hard since the region of interest contains more than 1 color. Focusing on the region of interest, which is the rose notebook, parametric segmentation faintly detected the notebook. Black and white images however were brightly captured even though the ROI is not abundant in black and white pixels. Non-parametric segmentation brightly captured the region of interest and also captures other objects with cyan or red tint. 

For object tracking, parametric segmentation might be more ideal since it only focused on the most abundant color in the object. There is lesser noise in the background. For color tracking however, non-parametric segmentation is better since it detects instances of the colors in the ROI. Parametric segmentation works best when the ROI is monochromatic. For an ROI with more than one color, parametric segmentation detects white or black pixels since it is near the center of the NCC. In this cases, it is better to use the non-parametric method. 

Figure 2. Segmenting the blue logbook. a) The ROI and the NCC histogram. b) Parametric segmentation. c) Using the result of the parametric segmentation as a mask isolates the notebook. d) The NCC histogram of the original image. e) Non-parametric segmentation. d) Non-parametric segmentation as a mask. 

Figure 3. Segmenting the green logbook. a) ROI. b-c) Parametric segmentation. d) NCC histogram of the original image. e-f) Non-parametric segmentation. 



Figure 4. Segmenting the red notebook. a) ROI. b-c) Parametric Segmentation. d) NCC histogram of the original image. e-f) Non-parametric segmentation. 

Figure 5. Segmenting the yellow notepad. a) ROI. b-c) Parametric segmentation. d) NCC histogram of the original image. e-f) Non-parametric segmentation


Figure 6. Segmenting the Rose notebook. a) ROI. b-c) Parametric segmentation. d) NCC histogram of the original image. e-f) Non-parametric segmentation. 

For this activity, I give myself 10/10 since I completed the whole activity. I would also like to acknowledge Rey and CJ for the image used, which is the image we used for a group activity in 187.


No matter what anyone says or does, my task is to be emerald, my color undiminished - Marcus Aurelius

Walang komento:

Mag-post ng isang Komento