Extraction and Recognition of Color Feature in true Color Images Using Neural Network Based on Colored Histogram Technique

In this research, a neural network using backpropagation (BPNN) algorithm was trained and learned to work as the cone cells in human eyes to recognize the three fundamental cells’ colors and hues, as the neural network showed good results in training and testing the color feature it was trained and learned again to recognize two nature scenes images ; Red sunset and Blue sky images where both scenes images contain color interaction and different hues such as red-orange and blue-violet. The recognition process was based on color histogram technique in colored images which is a representation of the distribution of colors in an image by counting the number of pixels that have colors in each of a fixed list of color ranges, that span the image's color space , all possible colors in the image. The importance of this research is based on developing the ability of (BPNN) in images ‘objects recognition based on color feature that is very important feature in artificial intelligence and colored image processing fields from developing the systems of alarms robots in fire recognition , medical digenesis of tumors, certain pattern’s recognition in different segments of an image , face and eyes’ iris recognition as a part of security systems , it helps solve the problem of limitation of recognition process in neural networks in many fields. Literature Review The Research is related to many universities' researches that produced on neural network's recognition using color feature, where color feature has proved to be a strong Orjuwan M.A. Aljawadi 168 feature in researches related to object recognition and images recognition. According to the objective of each research different processing has been done to make use of the color feature to increase recognition operation in neural network. H-D. Cheng, Xiaopeng Cai and Rui Min have performed algorithm of color normalization to overcome the lighting dependency problem first because the same scene under different illuminants can result in different color images and that will cause difficulty in color object recognition. They proposed a novel neural network for illuminant invariant color normalization to remove color dependency due to the illumination [9]. K-Boehmke, M. otesteanu, P. Roebrock, W. Winkler and W. Neddrmeyer produced an algorithm that based on color regions classification in pictures using neural network. Their algorithm divides the picture into discrete blocks which are analyzed independently. An average values of the three color channels are extracted from the block and classified by a neural network-which was a modified backpropagation neural network, this produced an industrial method meets real-time requirements in an industrial application [10]. The same use of neural network in recognizing objects based on color in different lighting conditions that can be used in real-time was done by Natasa, L-and Dr. Jianna in their research [11]. Alsmadi M.K., K.B Omar, S.A Noah and I. Almarashdeh produced a research that use neural network for recognizing isolated pattern of interests by using fish in an image based robust features extraction. It depends on color signatures that are extracted by RGB color space, color histogram and gray level co-occurrence. The system started by acquiring an image segmentation was performed relying on a color signature [12]. From these researches and many more backpropagation neural network has been a high performance recognizer network. Using color feature has enhanced the recognition process in object and image recognition in real-time applications. Materials and Methods 1. Color Cones Color can be thought of as a psychological and physiological response to light waves of a specific frequency or set of frequencies impinging upon the eye. An understanding of the human response to color demands that one understands the biology of the eye. Light which enters the eye through the pupil ultimately strikes the inside surface of the eye known as the retina. The retina is lined with a variety of light sensing cells known as rods and cones. While the rods on the retina are sensitive to the intensity of light, they cannot distinguish between light of different wavelengths. On the other hand, the cones are color-sensing cells of the retina. When light of a given wavelength enters the eye and strikes the cones of the retina, a chemical reaction is activated which result in an electrical impulses being sent along nerves to the brain. It is believed that there are three kinds of cones, each sensitive to its own range of wavelengths within the visible light spectrum. These three kinds of cones are referred to as red cones, green cones and blue cones because of their respective sensitivity to the wavelengths of light which are associated with red, green and blue. Since the red cone is sensitive to a range of wavelength, it is not only activated by wavelengths of red light, but also by wavelength of orange light, yellow light and even green light. In the same manner, the green cone can also be activated by wavelengths of lights associated with the colors yellow and blue [1]. The sensitivity curve that is shown in Figure (1) help us understand our response to the light that is incident upon the retina. Extraction and Recognition of Color Feature in true Color Images Using ... 169 Fig (1). Sensitivity Curve which depicts the Range of Wavelengths and the Sensitivity level for the three kinds of Cones[1] 2. RGB Color Images The images were collected from different sources [2], [3] .Using MATLAB 7.6.0 (R2008a) [4], a program was written to perform the operation of a true color image processing to extract the color feature that is needed. The program started from reading the images from the created true color images data base. The displayed true color images were unenhanced images as shown in Figure (2) ,it may show difference in colors interactions and difference in contrast levels and brightness as well so the images needed to be enhanced by using color histogram technique. Fig (2). Un-enhanced True Color Image 3. Applying Color Histogram to true Color Images A color histogram is a distribution of the number of pixels for each quantized bin and can be defined for each component, the more bins a color histogram contains, the more discrimination power it has, as a result it gives an effective representation of the color content for an image . It captures the joint probabilities of the intensities of the three color channels as it is defined by, Where A, B and C represent the three color channels (R, G, B ) and N is the number of pixels in the image[5]. By applying the color histogram on the above image , the red band histogram for the image was produced, the same steps of the program was used to show the effect of the green band and the effect of the blue band as shown in Figure (3) by using the same image. a. Red Band Histogram b. Green Band Histogram c. Blue Band Histogram Fig (3). Color Histogram before Applying Contrast Stretch Orjuwan M.A. Aljawadi 170 The resulted Bands in Figures (3.a,3.b,3.c) show the highly correlated visible bands with each other, it causes a dull appearance for the image’s colors the feature of the color will not be clear enough to extract ,this may affect the recognition process of the neural network, so a de-correlation stretch was used in order to enhance color separation across highly correlated channel and a contrast stretch was applied to the histogram of each band for the red, green and blue to make the data of each band spread over much more of the dynamic range as shown in Figure (4). By comparing this image to the image in Figure (2), a difference can be noticed on how the colors were displayed in more clear vision. This step is important to enhance the color feature and produce clear vision in colored images because color depends on lighting including the intensity of the light source according to different lighting conditions , this step will help to reduce the difference as much as possible . Fig (4). Effect of Contrast Stretch on the True Color Image Figure (5.a) shows the histogram of the red band after applying a contrast stretch, the same operation was applied for the histogram of the green band as shown in Figure (5.b) and the blue band as shown in Figure (5.c). a. Red Band Histogram b. Green Band Histogram c. Blue Band Histogram Fig (5). Color Histogram after Applying Contrast Stretch A difference can be noticed between Figure (3) and Figure (5) for the way the histogram bins for the three bands were arranged over the dynamic range .The last step was applying the de-correlation again on the resulted image in Figure (4) for the three bands, this step enhanced the color separation across highly correlated channels and produced a true color image as shown in Figure (6) where the color feature will be extracted from . Fig (6). De-correlation on the True Color Image Extraction and Recognition of Color Feature in true Color Images Using ... 171 4. Extracting Color Feature RGB images are 3-D colored images in which each pixel consists of three colors values ,red ,green and blue stored in an 24-bits in memory ,arranged in 3-columns . Jonas ,G. and Luiz ,V. who explained the fundamentals of colors in their book showed how the three colors components for each pixel are stored as an example the red color ,green and blue components of the pixel (10,5) of a colored image are stored in : RGB (10,5,1) ,RGB (10,5,2) and RGB(10,5,3) ,respectively [6]. Based on the way the colored pixels are stored the arranging of the selected pixels that refers to each color was a challenging process because since each color pixel is a mixed of three color values without keeping the correct arrangement of the selected color pixels sample ,the extraction of the color feature would be wrong . Through the research, the practical part was continued by adding other commands to the program to select colored pixels as samples for each colored images 


Literature Review
The Research is related to many universities' researches that produced on neural network's recognition using color feature, where color feature has proved to be a strong feature in researches related to object recognition and images recognition. According to the objective of each research different processing has been done to make use of the color feature to increase recognition operation in neural network. H-D. Cheng, Xiaopeng Cai and Rui Min have performed algorithm of color normalization to overcome the lighting dependency problem first because the same scene under different illuminants can result in different color images and that will cause difficulty in color object recognition. They proposed a novel neural network for illuminant invariant color normalization to remove color dependency due to the illumination [9]. K-Boehmke, M. otesteanu, P. Roebrock, W. Winkler and W. Neddrmeyer produced an algorithm that based on color regions classification in pictures using neural network. Their algorithm divides the picture into discrete blocks which are analyzed independently. An average values of the three color channels are extracted from the block and classified by a neural network-which was a modified backpropagation neural network, this produced an industrial method meets real-time requirements in an industrial application [10]. The same use of neural network in recognizing objects based on color in different lighting conditions that can be used in real-time was done by Natasa, L-and Dr. Jianna in their research [11]. Alsmadi M.K., K.B Omar, S.A Noah and I. Almarashdeh produced a research that use neural network for recognizing isolated pattern of interests by using fish in an image based robust features extraction. It depends on color signatures that are extracted by RGB color space, color histogram and gray level co-occurrence. The system started by acquiring an image segmentation was performed relying on a color signature [12]. From these researches and many more backpropagation neural network has been a high performance recognizer network. Using color feature has enhanced the recognition process in object and image recognition in real-time applications.

Color Cones
Color can be thought of as a psychological and physiological response to light waves of a specific frequency or set of frequencies impinging upon the eye. An understanding of the human response to color demands that one understands the biology of the eye. Light which enters the eye through the pupil ultimately strikes the inside surface of the eye known as the retina. The retina is lined with a variety of light sensing cells known as rods and cones. While the rods on the retina are sensitive to the intensity of light, they cannot distinguish between light of different wavelengths. On the other hand, the cones are color-sensing cells of the retina. When light of a given wavelength enters the eye and strikes the cones of the retina, a chemical reaction is activated which result in an electrical impulses being sent along nerves to the brain. It is believed that there are three kinds of cones, each sensitive to its own range of wavelengths within the visible light spectrum. These three kinds of cones are referred to as red cones, green cones and blue cones because of their respective sensitivity to the wavelengths of light which are associated with red, green and blue. Since the red cone is sensitive to a range of wavelength, it is not only activated by wavelengths of red light, but also by wavelength of orange light, yellow light and even green light. In the same manner, the green cone can also be activated by wavelengths of lights associated with the colors yellow and blue [1]. The sensitivity curve that is shown in Figure (1) help us understand our response to the light that is incident upon the retina.

RGB Color Images
The images were collected from different sources [2], [3] .Using MATLAB 7.6.0 (R2008a) [4], a program was written to perform the operation of a true color image processing to extract the color feature that is needed. The program started from reading the images from the created true color images data base. The displayed true color images were unenhanced images as shown in Figure (2) ,it may show difference in colors interactions and difference in contrast levels and brightness as well so the images needed to be enhanced by using color histogram technique.

Applying Color Histogram to true Color Images
A color histogram is a distribution of the number of pixels for each quantized bin and can be defined for each component, the more bins a color histogram contains, the more discrimination power it has, as a result it gives an effective representation of the color content for an image . It captures the joint probabilities of the intensities of the three color channels as it is defined by, Where A, B and C represent the three color channels (R, G, B ) and N is the number of pixels in the image [5]. By applying the color histogram on the above image , the red band histogram for the image was produced, the same steps of the program was used to show the effect of the green band and the effect of the blue band as shown in Figure ( The resulted Bands in Figures (3.a,3.b,3.c) show the highly correlated visible bands with each other, it causes a dull appearance for the image's colors the feature of the color will not be clear enough to extract ,this may affect the recognition process of the neural network, so a de-correlation stretch was used in order to enhance color separation across highly correlated channel and a contrast stretch was applied to the histogram of each band for the red, green and blue to make the data of each band spread over much more of the dynamic range as shown in Figure (4). By comparing this image to the image in Figure (2), a difference can be noticed on how the colors were displayed in more clear vision. This step is important to enhance the color feature and produce clear vision in colored images because color depends on lighting including the intensity of the light source according to different lighting conditions , this step will help to reduce the difference as much as possible .

Extracting Color Feature
RGB images are 3-D colored images in which each pixel consists of three colors values ,red ,green and blue stored in an 24-bits in memory ,arranged in 3-columns . Jonas ,G. and Luiz ,V. who explained the fundamentals of colors in their book showed how the three colors components for each pixel are stored as an example the red color ,green and blue components of the pixel (10,5) of a colored image are stored in : RGB (10,5,1) ,RGB (10,5,2) and RGB(10,5,3) ,respectively [6]. Based on the way the colored pixels are stored the arranging of the selected pixels that refers to each color was a challenging process because since each color pixel is a mixed of three color values without keeping the correct arrangement of the selected color pixels sample ,the extraction of the color feature would be wrong .
Through the research, the practical part was continued by adding other commands to the program to select colored pixels as samples for each colored images used in the work , using the image of Figure (6), a number of pixels were selected for each color by pointing at the area of the selected color in the image using the mouse, the program will be halted until the selection is done and then the execution is continued  Fig (8). Zoomed Pixels Areas in True Color Image As mentioned before each pixel(RGB) has three values for the red ,green and blue . The pixel that may be selected may not show a pure color value as the human look to it by the eyes , a red pixel may be selected but it is not a pure red ,it is a mixed value of the three (R,G,B) components for the pixel, from the work ,an example is given to show the result of selecting red pixel is (168 , 0, 87) , notice that the value of the red component is (168) which is higher than the value of the green component is (0) and the blue component value is (87) ,this is why the pixel showed as a red pixel to human eyes ,the same is true for green and blue pixels ,so for each pixel that was selected, there was 3-columns of (RGB) . The number of the pixels that are selected can be as much as the colored area for the selected color in the image; Selecting many pixels will increase the size of the array for each color ,selecting few pixels will affect the recognition process accuracy of the (BPNN) while selecting too many pixels will affect the recognition process speed by taking more time to finish processing so in the work (50) pixels were selected for each color the red ,green and blue which means each color component in the pixel matrix dimension is (50 x 1) . The color matrix then has been arranged and saved as [1x 150] dimension to represent the extracted color feature that will be used as an input for the (BPNN) . The same program steps were repeated for the other colored images in the work selecting not only red ,green and blue colors, but different hues of colors that are identified. What is commonly called a color, for example the red color has similar hue value whether it is light, dark, intense or pastel.

Blue Sky and Red Sunset Images
Through the research, two natural image scenes were selected a blue sky and red sunset. Where , Both scenes combine colors interaction. The sun emits light waves with a range of frequencies falls within the visible light spectrum and thus is detectable by the human eye. As we sight at various objects in our surroundings, the color which we perceive is dependent upon the color of light which is reflected or transmitted by those objects to our eyes. Compared to blue light, violet light is most easily scattered by atmospheric particles, our eyes are more sensitive to light with blue frequencies. Thus, we view the sky as being blue in color. The appearance of the sun changes with the time of day. While it may be yellow during midday, it is often found to gradually turn color as it approaches sunset. This can be explained by light scattering. As the sun approaches the horizon line, sunlight must traverse a greater distance through our atmosphere. During sunset hours .the light passing through our atmosphere to our eyes tend to be most concentrated with red and orange frequencies of light for this reason the sunsets have a reddishorange hue [7]. Based on this fact, in the research, the blue sky image scenes were recognized according to the blue color using color histogram for the blue band and the color histogram of the red band was used to recognize the sunset scenes. The same program steps of processing and extracting color feature were applied on the two natural images scenes , Figure ( Fig (14). Zoomed Pixels Areas in Red Sunset and Blue Sky Images

Training Back Propagation Neural Network as Cone Cell in Retina
The term Back Propagation Neural Network (BPNN) describes how this type of neural network is trained. Back propagation is a form of supervised training. When using a supervised training method, the network must be provided with sample inputs and anticipated outputs. These anticipated outputs will be compared against the anticipated output from the neural network. Using these anticipated outputs the "back propagation" training algorithm then takes a calculated error and adjusts the weights of the various layers backwards from the output layer all the way back to the input layer [8].
From these steps, the (BPNN) was trained to function as the cone cell in the retina of the eyes, the following steps summarizs the operations of training and learning by using the extracted color feature from the previous steps for the used colored images: 1. Three inputs of the BPNN were taken based on the extracted color feature for the red, green and blue hues representing the three kinds of cones the red cone, green cone and blue cone. The image shown in Figure (2) was used as standard for input samples because it has different colors interaction , the (BPNN) input matrix was [ 1x150] for each color . 2. Target values were assigned for the three color cones as target = [0 0 ; 0 1; 1 1] for red , green and blue respectively, as there is three inputs a two bits output was chosen to represent the out of each color cone. 3.The BPNN was trained with 1000 iteration as the number of epochs to reach the required targets values in recognizing the three colors samples for the red, green and blue cones . 4. Gradient descent with momentum was used with (BPNN) to make good results because it allows the network to respond not only to the local gradient, but also to recent trends in the error surface. Acting as a low-pass filter, momentum allows the network to ignore small features in the error surface. Without momentum a network can get stuck in a local minimum area. With momentum a network can slide through such a minimum. The gradient descent with momentum depends on two training parameters. The learning rate parameter is similar to the simple gradient descent and the momentum constant that defines the amount of momentum. Through the research, the learning rate value was specified as (0.5) and the momentum value as (0.9) . Figure Fig (15). The (BPNN) Architecture  Fig (16). The BPNN Training Environment for Recognizing Red, Green and Blue Colors   Fig (17). The BPNN Performance during Training The same steps of (BPNN) training and learning were applied to two nature senses images ,red sunsets and blue skies , 1. Using the colors features that were extracted from the images in Figure ( 3. Different images scenes were used containing color interaction of redorange and blue -violet; they were used for testing the BPNN which showed a good result to recognize image scenes depending on color feature. Figure (18) shows the (BPNN) training environment .

Conclusion
Using the extracted colors features from several images samples to train and test the BPNN to function as the human eyes cone cells to recognize the three color samples, red, green and blue. The produced output was [-0.0000 1.0000; 1.0000 0.0000; 1.0000 1.0000] using the image shown in Figure (2). Table (1) shows the ER % value as an error rate which was found through the work to show how close the resulted output from the required target .  Fig (19). True Colored Images Another table was added to the results is the table that includes the results of testing the BPNN against different hues and check to where the hue which belongs, it should be noticed that the hue of color is the color itself, whether it was pastel or intense, pure or saturated as was defined before and these results can be seen in table (3). Different hue samples were selected from different true color images as shown in Figure ( (4) shows the testing results of BPNN against other colors that BPNN has not trained to recognize ,the output value that should be produced is [0 0] ,if the output value is a value that is close to the target then an error rate would be recorded.   Checking the results in the table , there can be seen an error rate in the recognition process about 12% , while the success rate was 88% .These error and success rates are accepted in considering the number of samples and can be reduced considering more samples. Figure (21) shows the used images and Figure (22) shows the blue skies images.

Discussion
Color is a powerful descriptor that often simplifies object extraction and identification and many computer vision systems use color to aid images or object recognition as produced in research [9,10]. Recognizing images' or objects' color in a variety of lighting conditions is a challenging area of pattern-recognition. Neural networks have been found to be a good solution for that problem, and they are also quick and accurate, and can be used in real-time as produced in research [11]. So many researches still working on the subject of recognition depending on color feature in images as produced in research [12] or on another word on hue feature giving wide area to deal with color feature as not depending on one degree of color itself, or its brightness and saturation which give more flexibility to recognize colors from different degrees. BPNN was proved as a high performance neural network in recognition process in many fields [13] .
This paper focused on building backpropagation Neural Network (BPNN) that functions as cone cells in human eye .Biologically, the function of cone cells is complicated, but the idea was to train and learn BPNN to recognize three colors as the main cone cells in human eyes, red, green and blue in simple form depending on the color histogram to produce three colors band for the red, green and blue colors. Several colors samples were selected from true colors images and fed to the BPNN by using MATLAB 7.6 (R2008a) . The BPNN using momentum value showed good results in learning and testing and the error rate values that were produced during the work showed small error rate in recognition that can be reduced by taking more colored images samples .As future work ,this work gives an idea in designing another BPNNs that can be able to recognize more images or objects based on colors band from color histogram , it can be developed to recognize more nature scenes which most of them combine color interactions , recognizing significant objects from one scenes image and recognizing medical images of special tumors in brain area based on their color and can be developed as man-machine recognition using BPNN in robotic field like designing robot to recognize fire as an image of red-orange colors interaction , designing robot to recognize certain objects and searching for them using BPNN based on color. Figure  (23 and 24) summarize the extraction and recognition of color in true-color images.