Hey there!

My outlet to all things related to physics. Enjoy!

Friday, October 14, 2011

A14 – Color Image Segmentation

There are instances where we need to extract information from only a certain portion of an image. When this happens, we find ways to eliminate other unnecessary information in the image so that we are left with what we want. In this blog, I will be discussing two techniques in Color Image Segmentation

Shown in Figure 1 is the image we want to segment. Here, our region of interest or ROI is the the apple (minus the leaf). Later on, we can choose another region to be our ROI.
Figure 1. An image of an apple. This is the image
where we will apply Color Image Segmentation.
I. Parametric Segmentation

For this method, we need to crop a portion of our region of interest in the image. For this case, I cropped a portion of the apple. This is shown in Figure 2.


Figure 2. Cropped portion of our
ROI in Figure 1.
Note that the image I used is a True Color Image. This is crucial since we need the RGB values in this method. Given the Figure 2's RGB values, we are to use them in "expressing" the Normalized Chromaticity Coordinates (NCC) which is shown in Eq. (1).

Equation 1. Normalized Chromaticity Coordinates (NCC). R, G, and B are the respective
RGB values of the image per pixel, while I is the sum of these values per pixel.

Upon converting the RGB values into the NCC we can now obtain the joint probability p(r)p(g). Where p(r) is given by,

Equation 2. The probability that a pixel with chromaticity
r belongs to our region of interest.
To obtain p(g), simply replace all instances of r in Equation 2 with g. Upon execution we see the resulting segmented image.

Figure 3. Segmented image using Parametric
 Segmentation

Let us now try using the leaf as our ROI. Using the corresponding portion:

Figure 4. Cropped portion
of our new ROI.
we obtain the following segmented image,

Figure 5. Segmented image using
Parametric Segmentation.
II. Non-Parametric Segmentation

In non-parametric segmentation, we need to take the 2D Histogram of the corresponding r and g values of a portion of our ROI. Let us consider the following histograms,

Figure 6. (a) Normalized chromaticity space (b) 2D Histogram 

. . . . . Although I didn't finish this work, I still give myself an 8 out of 10.

Thanks to Dr. Anthony Longjas.

God bless everyone!

1 comment:

  1. very interesting. but how can you extract a color from here platinum play mobile casino ? there on the site there are reviews on the online casino, I'm interested in this

    ReplyDelete