Activity 11: Color Image Segmentation

Image segmentation is the process in which a region of interest (ROI) is "segmented" or separated from the whole image and can be used for further analysis.  This may sound similar to that of thresholding however we note that thresholding can only be applied to grayscale images, and not colored images.  It has multiple applications such as locating specific objects, removing unecessary parts, and finding boundaries in images [1].  This can also be used to label pixels that display similiar features or visual characteristics which can later be used for further analysis as well.

Several features can be extracted from image segmentation: color, texture, and intensity [1].  We note that color has already been used to segment skin regions, hand recognition, and even cells in slides.  It has also been used to analyzed paintings and identify which regions were made in similar manner (texture) or similar paint (color).

However, we consider that objects has 3D shading variations.  This would mean that some parts may be seen as different brightness levels of the same color.  To solve this problem, it would be better to represent the color space in RGB but one that could reparate the brightness and chromaticity.  This color space is referred to as the Normalized chromaticity coordinates (NCC).  Here, we let I = R + G + B.  The NCC therefore are:
r = R/I
g = G/I
b = B/I

Using NCC, we try to segment an object from the image based on their color using two methods:  Parametric and non-parametric distribution estimation.

Parametric Probability Distribution Estimation


For parametric Probability distribution, we take the histogram of a region of interest.  The normalized histogram would give the probability distribution function of the color.  Therefore we consider this for the r and g channel.  However we note that there are two colors to consider (since the third color can be derived from the two), so we take the joint probability to check the likelyhood of a pixel belonging to that of the region of interest.  The probrability of a pixel with chromaticity r (or g) belonging to the region of interest is given by:

the joint probabiliy distribution is given by:


joint_probability = p(r)p(g)

Non-parametric Probability Distribution Estimation


For the non-parametric probability estimation, the histogram itself is used to tag the membership of the pixel to that of the region of interest.  Note that for histogram backprojection based on color histogram, a pixel location is given a value equal to that to its histogram value in chromaticity space.  This will act like a look-up table for histrom values, instead of the calculution of probabilities (that of parametric probability estimation).  This is similar to the activity "Enhancement by Histogram Manipulation", except that before, we take into consideration a grayscale image.  Here, we account for a color image which has RGB channels.  Since we can extract the b color information from r and g for NCC, we can have a 2D histogram as a look-up table for converting the r,g values in the image matrix.

Results


The image that was used is shown in the figure below.  Note that there are several objects that has a single color which make it easily distinguishable from the rest.
Original image used

Four objects were segmented from the image:
Regions of interest with varying color information

The results using parametric probability distribution estimation is illustrated in the figure below.  The regions of interest were successfully segmented from the original image.
Segmented images using parametric probability distribution estimation

For the non-parametric probability distribution estimation, we consider the use of 2D histogram back projection.  Here, the normalized chromaticity space is used (Figure below).
Normalized chromaticity space: x-axis ir red and y-axis is green
Taking the occupied chromaticity space of each of the regions of interest, we note that the colors seen correspond with that of the 2D histogram of the images of the regions of interest.
fhajkh
Using the 2D histogram backprojection, the segmented images are shown below.  The objects were successfully segmented as well in comparison to the previous method.

Segmented images using non-parametric probability distribution estimation
Comparing the two methods, parametric segmentation produced better results with sharper edges in detection.  Some of the background was also included when using the non-parametric which should not be there.

For this activity, I give myself a 10/10 for successfully segmenting parts of the image.  It was actually fascinating to see that even though there were some parts that were small that were still detected just by using color image segmentation.


References
1. "Segementation", http://en.wikipedia.org/wiki/Segmentation_(image_processing) 
2. "A11 - Color Image Segmentation 2010", Maricor Soriano, Applied Physics 186

Comments

Popular posts from this blog

Activity 6:Enhancement in Frequency Domain

Activity 1: Digital Scanning