AUTOMATIC RECOGNITION OF PULSE CROPS USING IMAGE PROCESSING

Automatic recognition Image processing Machine vision Pulse crops The present study was explored the feasibility of implementing fast and reliable computer-based systems for the automatic recognition of pulse crops from color and gray intensity images. Pulse crop’s size, shape, color and texture characteristics are obtained by standard image-processing techniques and their discriminating power as classification features was assessed. These investigations were performed on a database containing 102 images of most common four pulse crop’s that were Lentil, Ground Nut, Chick-pea and Split-pea. Each image contains approximately 15-20 pulses of same and mix varieties together and considers the implementation of a simple RGB and gray color model for recognition. The results indicate that classifier based on an adequately selected set of classification features has an excellent performance. The success rates of Lentil, Ground Nut, Chick-pea and Split-pea were 90.02%, 90.33%, 91.96% and 83.58%, respectively. In addition, the recognition gave highest percentages using distinct characteristics as classification features.


INTRODUCTION
Pulse crop is one of the most important cereal crops acquiring important place in the world.It is proved that impurity has distinct effect on the yield of pulse crop.Day by day the interest of using image processing in different sectors is increasing.Digital image processing is the use of computer algorithms to perform image processing on digital images.A machine vision system (MVS) provides an alternative to the manual inspection of biological entities.
Many methodologies have been proposed to analyze and recognition of crops in an automated fashion.A large percentage of such works utilize shape recognition techniques to model and represent the contour shapes of crops, however additionally, color and texture of crops have also been taken into consideration to improve recognition accuracies.Sakai et al. (1996) employed geometrical parameters like area, perimeter, maximum length, maximum width, elongation to differentiate between four types of rice grains, with accuracies around 95%. Use of discriminate analysis along with color, shape and size based approach have been used for weed detection (Perez et al., 2000).
In a MVS, the camera does the task of an eye and the computer acts as a brain of processing.The image perceived by the camera and the generated signals by the camera are stored in the computer as a digital image.Image processing algorithms are used to extract a set of features, called a pattern, from the image to represent an object.The research work was undertaken to analysis pulse crop recognition using image processing system.This study was aimed at evaluate the possibility of developing image processing system, classify and recognition of different types of pulse according to the basis of color, shape and size (Bamaet al., 2011)

MATERIALS AND METHODS
The present paper proposes a scheme for automated recognition of 4 classes of pulse category by analyzing shapes, colors and size obtained from a collection of their pulse images, using features based on RGB color model, Gray color model and Neighborhoods & Connectivity approaches with various types of machine vision classifiers.

Pre Processing
Experimentations are performed by using 102 images containing 808 individual pulses carried out on a Nikon D5100 SLR, 16.2 Megapixels, CMOS sensored digital camera of a high resolution with 24-bit colors.Crops were collected from three seed markets of Notun bazaar, Mymensingh; Tajmohol, Jamalpur and Jamalpur bij vandar, Jamalpur.During image collection, the pulse crop was placed on a white board and the light was good enough from all sides to eliminate the shade.The image was taken from top as bird view and the same height for all samples from crops.So the actual sizes of images were not varied from image to image.15 to 20 pulse crops were taken in a white board and an image of that pulse crop were taken as JPEG format.All pulse images were in 1024 x 768 pixels.There were no restriction on the direction of pulse when Image taking.

Convert RGB to Gray image
With the JPEG format the images converted into a grayscale image.Each color appears in its primary spectral components of red, green, and blue.Equation 1 is the formula used to convert RGB value of a pixel into its grayscale value (Baxes, 1994).
Where R, G, B correspond to the color of the pixel, respectively.Each image plane has physical meaning, so color combination obtained using RGB was convenient for spatial data.

Boundary Enhancement
One simple relationship between pixels is connectivity.Connectivity between pixels is an important concept used in establishing boundaries of objects and components of regions in an image.

Figure 1. 8-connected neighbors
In this image processing the 8 connectivity was used to serve the purpose to detect boundary and the area calculation.

Edge Detection and Segmentation
Edges correspond in general to important changes in physical or geometrical properties of objects in the scene that attempts to characterize the intensity in the image.Segmentation is used to separate objects within an image from the other objects and as well as from the background.In color based segmentation approach it first removes edges whose color is significantly different from that of the object.Mainly it eliminates foreground edges whose color is different from background color.An edge can be classified as pulse crop edge if the color of any one of its neighbors or itself was close to the color of the pulse crop.

Image processing
RGB format was used to read JPEG images directly in a red-green-blue (RGB) color system where each pixel contain ranging from 0 to 255 of each red, green, and blue intensities.The values of these three primary colors make up the actual color for each pixel (Baxes, 1994).The 8-neighbor boundary detection system (Baxes, 1994) was applied to boundary detection (Fig. 1).From the images, the pulse crop areas were identified and isolated individually.The remaining pixels outside the boundary were colored as pure white (255, 255, 255).The total pixels were counted inside the crop boundary area.To simplify the pixels, image were then converted to a one coordinate format based on gray level.Thus, all pixels were given a value of one and those associated with a different colored object were coded as intensity in the range zero to one.This method simplifies images and removes background noise.Kadiret al. (2011) reported that human eye can still clearly recognize the objects when the gray level matrix was used in print or on screen (Yang et al. 2002).
Firstly pulse crop has detected by its color and it varies from crop to crop.For example the crop named Ground Nut is approximately black in color.The image processing system was comparing the color of Ground Nuts with the previously stored Ground Nuts color index.If the current color matches then it recognized as image of Ground Nuts.The similar color was decided by the RGB and gray scale ranges.Inside a boundary all the pixels were selected from the same seed.The next step was to measure the pulse crops size.It is known that every pure pulse crop has a standard size.The size was measured by counting the number of pixels in the area of the crops image.At the boundary detecting time it was counted the pixel of the crops image.It was counted how many same colored pixels contain inside the image boundary.
The final step was to measure the shape of the pulse crop.According to the geometrical formula -"if major axis is equal to minor axis of an ellipse then it is a circle."Some crops were circular shaped but some are different.At the time of area measurement the major axis, minor axis and the center point of the major axis was calculated.The highest length of the seed was taken as major axis.For each seed the maximum and minimum x and y co-ordinate was calculate.Also from this two x,y co-ordinate a rectangular shaped was formed virtually.On the major axis, axis center point and the minor axis shape of the crop can be easily measured.So, Maximum distance was calculated and width of the crop has measured by maximum distance to perpendicular of the center point as minor axis.Table 1 shows various samples of pulse crops that were analyzed according to their color range, axis, shape and area.The Table above has four samples of pulse crops i.e.Lentil, Ground Nut, Chick-pea and Split-pea.Each sample has a color range in RGB value, Axis describes about the major axis and the minor axis approximate in pixel.Shape was the description about the entire samples pulse crops shape that may be circular or other shape.Area was the approximate pixel number in the entire pulse crop boundary.
For lentil, the color range was 45 to 81, 25 to 55 and 22 to 36, respectively for R, G and B according to minimum and maximum range.The color range was minimum of 0.63 to maximum of 0.87 from grayscale.Major axis was 317 approximately and axis with 90 degree was 317.It was circular shaped and its area was approximately 711 pixels.

RESULT AND DISCUSSION
The performance of the recognition was evaluated on identification ratio of the system.In first 65 pulse crops, 58 pulse crops were recognized as lentil.In this case, the pulse crop Identification Ratio (IR) of image Processing was 89.23% for Lentil.Similarly, the ground nut, chick-pea and split pea were 90.11%, 91.78%, and 85.06% respectively.Table-2 shows the result of pulse collected from Notun bazaar, Mymensingh.The seeds from Jamalpur bij vandar, Jamalpur, recognized numbers of pulse crop were 69, 54, 76 and 43, respectively for lentil, ground nut, chick-pea and split-pea.The machine had shown the identification ratio of 89.61%, 91.53%, 93.83% and 82.70%, respectively for lentil, ground nut, chick-pea and split-pea (Table-4).Table 5 shows the average identification ratio of all crops for all places where the maximum IR was 91.96 for chick-pea and the minimum IR was 83.58 for split-pea.The Lentil showed the ratio was 89.23, 91.23 and 89.61 where the average ratio was 90.02.Similarly, the ground nut had 90.33 identification ratios.The study showed that the recognition of pulse crop purity was gave higher performance (IR) when the shape, color and area of the pulse crops were almost similar.

Figure 2 .
Figure 2. Cropped and zoomed original images (a) and processed images (b and c)

Table 1 .
Pulse crops detail according to their color range, axis, shape and area.

Table 2 .
Identification ratio of different pulse crops collected from Notun bazaar, Mymensingh

Table 3
represents the test results of the seeds collected from Tajmohol, Jamalpur.To recognition from the four different pulses, recognized and unrecognized pulse crops were used.It was evident that image processing system had analyzed lentil to 91.23% as recognized.Ground nut, chick-pea and split-pea were identified 89.36%, 90.28% and 82.98%, respectively.

Table 3 .
Identification ratio of different pulse crops collected from Tajmohol, Jamalpur

Table 4 .
Identification ratio of different pulse crops collected from Jamalpur bij vandar, Jamalpur

Table 5 .
Average Identification ratio of different pulse crops from all 3 places