Thursday, September 23, 2010

Entry 19: Color Image Segmentation

Images contain many information that can be retrieved through image processing.  Some of the information can be used to discriminate certain regions (regions of interest - ROI) as the important regions and put other regions not containing the specified region to a null value forcing other points to be a part of the background.

In this activity, we perform the method of color image segmentation to identify in the entire image the regions with the same information with the reference patch.  For this to be done, normalization of the color channels was performed given by the equation below.

 
We studied the two types of color image segmentation techniques, the parametric and the non-parametric color segmentation.  The parametric segmentation method utilizes the Gaussian distribution wherein the probability of the image value depends on the reference patch.  The mean of each color channel was used to be the abscissa with the highest probability.  The Gaussian distribution used in the parametric technique is stated below,
 

the spread and mean parameters of the distribution comes from the standard deviation and the mean value of the reference patch, respectively.

We used the technique of color image segmentation to the image below (My Toy Car :D) shown in Fig. 1,

Figure 1:  Image to be segmented
It is important to realize that we utilizes the Normalized Chromaticity Space in representing the location of the values to be calculated from the patch.  Also, this chromaticity space will help us visualize quantitatively what colors are present in the image.  A sample normalized chromaticity graph is shown below in Fig. 2,

Figure 2:  Sample Normalized Chromaticity Space

To continue with the parametric image segmentation, we chose a patch in the ROI to represent the entire region.  The patch chosen appear to have a large color component of yellow Fig. 3.


Figure 3:  Reference color patch for color image segmentation.

After doing the algorithm of taking the Gaussian probabilities and multiplying the results with each other, we get a parametrically segmented version of Fig. 1 as shown in Fig. 4.

Figure 4:  Segmented image through parametric color image segmentation.

Our next task is to segment the original image using the non-parametric approach.  In this technique, it requires the knowledge of the histogram of the normalized chromaticity space for the entire image and the patch representing the ROI.

For the image to be segmented, we calculated the 2D normalized chromaticity space histogram representing the entire image.  The computed histogram is shown in Fig. 4 along with the normalized chromaticity space representing the entire color spectrum.

Figure 4:  Left) The normalized chromaticity histogram representing the image, Right) the normalized chromaticty space fot the entire color spectrum.

We also computed the normalized chromaticity histogram for the patch chosen to represent the ROI.  In Fig. 5, we superimposed the computed normalized chromaticity histogram of the ROI to the normalized chromaticity space representing the entire color spectrum to properly visualize the color component representing the ROI.

Figure 5:  Superimposed normalized chromaticity histogram of the chosen representative region for the ROI with the normalized chromaticity space of the entire color spectrum.

It can be observed in Fig. 5 that the representative color of the ROI is near the yellow-orange region of the normalized chromaticity space of the entire spectrum.

We performed histogram backprojection which will yield the non-paramtrically segmented image.  The resulting non-parametrically segmented image is shown in Fig. 6.

Figure 6:  Resulting non-parametrically segmented image.

It is so handy to the techniques performed above to identify regions of interest.  Many applications of these methods can be made such as tracing the trajectory of certain material.

In this activity I want to give myself a 10/10 because of my efforts and enthusiasm in doing the activity.  I learned much in this activity which is  the most important thing for me.

Source:
    Activity Sheet for Activity 13 - Dr. Maricor Soriano

1 comment:

  1. Hello,

    I wonder if you could please send me the code you wrote to generate the colorful chormaticity graph (Figure 2).

    Many thanks in advance.
    Mike (mike.gonzalezie AT gmail)

    ReplyDelete