Statistical Approach For Color Image Detection Cultural Studies Essay

Published: November 17, 2015 Words: 2016

The increased use of color has brought with it new challenges and problems. Recently color image processing has occupied an emerging field of research. Though some of the work has already been done, still there is scope to improve. This paper aims the recognition of the color of the object using a statistical approach. The approach of this paper is first, to find the edge of the image for the region of interest. Region of Interest (ROI) is used for further processing pixel wise. The threshold is determined based on basic statistical method that leads to color recognition of an object. Applying the method of thresholding iteratively over the ROI selected, the recognition of the color of the desired object is performed. The result shows the performance.

Keywords- Boundary detection, Color recognition, Region of Interest, theshold.

Introduction

The human visual system is particularly attuned to two things: edges, and color. The human visual system is not particularly good at recognizing subtle changes in grey values. The human visual system tends to perceive color as being made up of varying amounts of red, green and blue. That is, human vision is particularly sensitive to these colors; this is a function of the cone cells in the retina of the eye. These values are called the primary colors. If we add together any two primary colors we obtain the secondary colors. Image processing defines color image as three dimensional array which consists of three two dimensional arrays, one for the red component, the second for the blue component and the third for the green component. Color images have taken over our life through the medium of television, books, newspapers and photography. With the technological breakthrough and the digital revolution, color televisions, color scanners etc are now an integral part of our personal and professional environment.

The process starts with the image acquisition which is followed by the boundary detection of the object in order to distinguish it from the background. An iterative method is used to obtain the binary values of different layers i.e. R, G, B. The codes for acquisition of a color image of an object and calculating the ROI in the image (i.e. removing the unneeded background part) was written. The Matlab program generated was used to detect the color of the object and background. Finally the color of the object was recognized.

Section II describes with the literature review of the topic. Section III proposes the algorithm for color recognition. Section IV deals with the experimental results illustrated with figures. Section V concludes the work.

Related literature

The appearance of the abundant color images made a high demand about the color image quality and hence there was need to study the methods to process the color images for optimized results.

An RGB image sometimes referred to as a "true color image and it can be stored as an m-by-n-by-3 data array that defines red, green and blue color components for each individual pixel. The combination of the red, green and blue intensities stored in each color plane at the pixel's location determine the color of each pixel. Graphics file formats store the RGB images as 24 bits where red, green and blue components are 8 bit each. This yields a potential of 16 million colors. The precision with which a real life image can be replicated has lead to the nickname "true color image". [1-3].

A lot of effort, brainstorming and hard works into working directly with RGB color space. It is easier to work with the gray equivalent of the color image by separating red, blue and green components of the color image. The gray image would first be processed using one or more image processing techniques, after that the processed color image would be converted back to enhanced color image. Converting color image to gray and converting the processed gray image back to color image were the tasks that needed a lot of calculation and so a lot of processing time[4]. In spite of the efforts required to work directly with RGB color space we preferred it so as to save a lot of processing time.

In various applications like segmentation of brain tissue and/or tumors in magnetic resonance images and qualification of nuclei of cells and chromosome in microscope images, thresholding can effectively used [5-9].however, poor contrast or strong noise component in the gray level space of images makes thresholding a challenging task. In an earlier proposed automatic threshold selection based on histogram coding scheme, the threshold values were determined based on the well known Lloyd-Max scalar quantization rule, which was optimal in the sense of achieving minimum mean square error distortion. An iterative self-organizing learning rule for determining the threshold levels which did not require any prior information was derived and hence was fully automatic[10-12]

978-1-4673-2907-1/13/$31.00 ©2013 IEEE Automatic thresholding is an important technique in image segmentation and machine vision applications. The

Basic idea of automatic thresholding is to automatically select an optimal gray-level threshold value for separating

objects of interest in an image from the background based on their gray-level distribution. This thresholding technique has been widely used in the industry for automated visual inspection of defects (Newman, 1995). The technique is often referred to as contrast sensing in the machine vision industry. Because of its wide applicability to other areas of image processing and applications, there is a considerable body of work on automatic threshoding to draw from. In-depth survey and evaluation of various thresholding methods are given by Sahoo et al. (1988), Lee et al. (1990), Glasbey(1993) and more recently, by Sezgin and Sankur (2004).[13]

The color based object recognition consists of object detection and recognition by color. The detection and classification of local structures (i.e. edges, corners, and T-Junctions) in color images is important for many applications such as image segmentation, image matching, object recognition, visual tracking in the fields of image processing and computer vision . In general, those local image structures are detected by differential operators which are commonly restricted to luminance information. However, most of the images recorded today are in color. Therefore, we focus on the use of color information to detect and classify local image features [14].

A color model is an abstract mathematical model describing the way colors can be represented as topples of numbers, typically as three or four values or color components. When this model is associated with a precise description of how the components are to be interpreted, the resulting set of colors is called space. A color model is an orderly system for creating a whole range of colors from a small set of primary colors. There are two types of color models, those that are subtractive and those that are additive. Additive color models use light to display color while subtractive models use printing inks. Colors perceived in additive models are the result of transmitted light. Colors perceived in subtractive models are the result of reflected light. There are several established color models used in computer graphics, but the two most common are the RGB model (Red-Green-Blue) for computer display and the CMYK model (Cyan-Magenta-Yellow-black) for printing.

Virtually all our visible colors can be produced by utilizing some combination of the three primary colors, either by additive or subtractive processes. Additive processes create color by adding light to a dark background, whereas subtractive processes use pigments or dyes to selectively block white light. A proper understanding of each of these processes creates the basis for understanding color reproduction.

Additive Primary ColorsSubtractive Primary Colors

Fig. 1. Basic colours of the image

The colors in the three outer circles are termed primary colors, and are different in each of the above diagrams. Devices which use these primary colors can produce the maximum range of color. Monitors release light to produce additive colors, whereas printers use pigments or dyes to absorb light and create subtractive colors. This is why nearly all monitors use a combination of red, green and blue (RGB) pixels, whereas most color printers use at least cyan, magenta and yellow (CMY) inks. Many printers also include black ink in addition to cyan, magenta and yellow (CMYK) because CMY alone cannot produce deep enough shadows. Subtractive processes are more susceptible to changes in ambient light, because this light is what becomes selectively blocked to produce all their colors. This is why printed color processes require a specific type of ambient lighting in order to accurately depict colors. Color has two unique components that set it apart from achromatic light: hue and saturation. A color's "hue" describes which wavelength appears to be most dominant. A color's saturation is a measure of its purity [15- 17].

Additive Color Mixing

(RGB Color)

Red + Green

→

Yellow

Green + Blue

→

Cyan

Blue + Red

→

Magenta

Red + Green + Blue

→

White

Subtractive Color Mixing

(CMYK Color)

Cyan + Magenta

→

Blue

Magenta + Yellow

→

Red

Yellow + Cyan

→

Green

Cyan + Magenta + Yellow

→

Black

[15]

The RGB color space is applied in this work.

Proposed algorithm

A true color image was implemented in this work. The following steps are considered to develop the algorithm and are implied:

The real time RGB24_320x240 image was acquired using a 5MP, ¼ inch CMOS sensor, backlit webcam.

The ROI was defined by finding the outline of the object. The outline of the object was found and from this outline image the minimum and maximum coordinate values were found and used to declare the corners of ROI on the Original image.

The three planes of the color image were split and separately assigned the threshold value using iterative way and the binary image stored, which is as follows:

An initial threshold (T) is chosen; this can be done randomly or according to any other method desired.

The image is segmented into object and background pixels as described above, creating two sets:

G1 = {f(m,n):f(m,n)>T} (object pixels)

G2 = {f(m,n):f(m,n)<=T} (background pixels) (note, f(m,n) is the value of the pixel located in the mth column, nth row).

The average of each set is computed.

m1 = average value of G1

m2 = average value of G2

A new threshold is created that is the average of m1 and m2.

T* = (m1 + m2)/2

Repeat step no. 2, now using the new threshold computed in step four, keep repeating until the new threshold matches the one before it (i.e. until convergence has been reached).

Each Pixel of the ROI image was checked of the RGB bit value combination and a count was maintained for each color.

The color with maximum pixel count was displayed to the output screen and the original acquired image, outline of object and ROI image were also displayed.

result

The proposed methodology is performed using MATLAB environment. The threshold values for various colors are given in tabular form in table I. Then the processing and detection of different colors are mentioned in table II.

Figure of column (a) from fig. 2 to fig. 6 represents the image acquired after acquisition process using high resolution camera.

Figure of column (b) from fig. 2 to fig. 6 represents only the outline of the object after separating it from the background.

Figure of column (c) from fig. 2 to fig. 6 represents the Region of Interest (ROI) of corresponding images.

Figure of column (d) represents the output decision as the type of color detected.

THRESHOLD VALUES AND OUTPUT STATEMENT

Input Figure

Output

Red Threshold Value

Green Threshold Value

Blue Threshold Value

Output Statement

Figure 2.

131.7059

134.9044

138.9693

White

Figure 3.

115.3457

106.8222

105.8356

Black

Figure 4.

132.9084

99.2692

147.5856

Green

Figure 5.

166.8772

155.9277

97.5515

Yellow

Figure 6.

144.9849

130.2929

132.1681

Red

CONCLUSION

The experimental results show that the algorithm recognizes the color of the object differently from that of the background. In our proposed algorithm all the boundaries were accurately located at the true edges as shown in the Table 2. The method is simple and effective one. For the small region the method has to be modified and taken care as the further research.