Study on the Fruit Recognition System Based on Machine Vision

The study proposed that the current development of fruit requires the fast and efficient methods to test the varieties of fruits, which can combine the image processing and computer machine vision technology together to be applied in the field of fruit varieties detection domain, so as to be consistent with this new trend. In this research, In terms of the fruit detection based on Haar-like characteristics, PCA method is mainly used in fruit recognition and used to detect citrus.


INTRODUCTION
In recent years, with the development of computer image recognition and visual technologies becoming more mature, the ways of classification have developed from the weight and photoelectric to the development of computer vision, which means that classification can not only be classified according to the weight, but also can be according to the defects, color, shape and so on, so as to improve the processing quality and efficiency for classifying the fruits (Hayashi et al., 2002).With the development of classification technology, the international quality standard of fruits has been further improved and refined, therefore, study on the technology of computer vision, as well as its development with the accurate devices for classifying fruits can improve the detection processing capacity of fruits, which is very important for Chinese fruit to improve the competitiveness in the international market (Wen and Tao, 2000).
The ideal computerized visual quality detecting and system for fruits should meet the following requirements: • It can fully detect the external and internal quality of fruits.• The speed of detection system should be very fast, which can realize the online detection and classification quickly.• The precision of the detection degree and classification can meet the requirements of the international standard.• It should have good adaptability, which can adapt to the different surCitrus characteristics of different fruits.

MATERIALS AND METHODS
The introduction of the principle of computer vision technology: Computer vision technology is a discipline composed by optics, computer science, mathematics, image processing, pattern recognition and so on, which is a rapid non-destructive testing technology with multiple disciplines as well as the emerging of new intelligence (Bajwa and Tian, 2001).It is regarded as a promising evaluation method for evaluating fruit quality objectively.It is through the optical imaging sensor instead of the visual function of human eyes that can objectively obtain the image information of the tested citrus (Wu et al., 2014); then by using image processing technique to mine the information contained in the fruit as well as the characteristics of quality, adopting the pattern recognition algorithm, so as to establish the qualitative or quantitative detection model of quality information for fruit quality testing, , management, and other information.Computer vision technology is mainly composed of two parts, namely, digital image acquisition and image processing.The digital image acquisition system is carried out by computer vision detection system, while computer vision detection system is generally composed by digital camera, lighting system, image acquisition card that is connected with the computer, as well light detection platform, etc. Lighting system includes light source and light setup platform.Common types of the light source are incandescent, fluorescent light, LEDs (Light Emitting Diodes), etc., (Brosnan and Sun, 2002).General light setup platform mainly includes two types, namely, ring setup and scattering setup, the former is suitable for lighting the objects with the flat surCitruss, while the latter is used for the objects that had surCitruss with circular illumination.The light is from the light source, injecting the light to the surCitrus of the measured citrus, then the result of the tested fruit surCitrus as well as the information of the composition can be reflected by the reflected light into the imaging system of the digital camera, which can be converted  (Tao et a1., 2005).Generally speaking, computer image processing steps can include the following steps: image preprocessing, image segmentation, target detection domain, feature extraction and pattern recognition domain (Kim and Ling, 2001).
Citrus recognition: Since we need to extract and classify the related frame in which the target exist, we have to do a detection and recognition of human Citrus in the image.
The main technology is consists of three components: Citrus detection, this is the foundation of the Citrus recognition.Its main task is to locate the person's Citrus, cut out the Citrus and normalize the Citrus's size from the frame image.Cuticular feature extraction, this is the key to recognize a Citrus.By extracting the Citrus feature which has the strong capabilities in characterization, we can do well in distinguishing different objects to achieve better results in recognition.
Cuticular feature match is the core issue of the Citrus recognition technology.And the main task of it is to design and make a sound selection of the classification criteria in Citrus recognition.
A Citrus detection method based on Attentional Cascade was proposed by Viola and Jones, (2001), which used a cascade structure to improve the speed of Citrus detecting system, and the main idea of this design is to increase the accuracy of this detection progressively.Firstly, he used the strong classifier which is rather simple in structure (less number of) to preclude the window which the citrus didn't exist in.
Then the number of weak classifiers in subsequent strong classifier is increasing, and the detecting precision keeps getting higher with the number of subwindow which needs to detect becoming less and less, so as to achieve the purpose of improving the speed of detection.
The linearsub-space is one of the main methods of the cuticular feature extracting at present.The linearsub-space is to find a linear or non-linear spatial alternation based on fixed performance objective, compress original data signal into a low-dimensional subspace in order to make the data in subspace keep the maximum information in the original space.There is no need for the PCA to know and extract geometric knowledge of human Citrus.It is a simple, fast and practical algorithm for the feature of transforming coefficient.The low-dimensional Citrus got by the PCA is similar with cuticular shape, so it can be used to locate a human-Citrus.
In cuticular feature matching, if the extractive cuticular feature can form a column vector x in some order, we can compute the distance between the cuticular feature vector x which is to be matched and the cuticular feature vector y in sample symbols to calculate similarity between x and y, the distance is defined as: You can also use the cosine of included vector angle between them to measure the similarity.The cosine can be defined as: The smaller the distance between them is, the higher their level of similarity is.The closer the cos (x, y) are to 1, the bigger the value of the two feature vectors' similarity is.

Classification algorithm:
We sign a video data of human as V and suppose the number of processing object is n.We sign their cuticular feature vectors as The implementation procedure is as following.
First step: Decompose V to get the image frame sequence Second step: Preprocess the image frame and use the isometric sampling method that the step-size is k to obtain image sequence A 2 = {f 1 , f k+1 , f 2k+1 …}.Seventh step: Mark this frame image and send it into the set R i of u i corresponding person.
Repeat the steps until it detects all key frame images in M.
Eighth step: Generate a video summary for the results of detecting Citruss {R R R semantic description of each collection.

Image analysis and processing:
The image format obtained from the tests is BMP, with the images 800×600 in size, in order to improve the speed of detecting the quality of citrus, which can also be conducive to the extraction of the citrus's features.First of all, converting the citrus's images obtained by the segmentation to the gray images; taking the citrus as example, then using the iterative method to decide the domain value, get the threshold value is 55, then separating the fruit profile from the segmentation of the image, so as to get the binary images, fruit image with 3×3 median filter, eliminating noise of the image; and then carrying on expansion processing, , and semantic description of each collection.
The image format obtained from the tests is BMP, with the shadow color images 800×600 in size, in order to improve the speed of detecting the quality of citrus, which can also be conducive to the extraction of the citrus's features.First of all, converting the citrus's images obtained by the gray images; taking the citrus as example, then using the iterative method to decide the domain value, get the threshold value is 55, then separating the fruit profile from the segmentation of the image, so as to get the binary images, smoothing the image with 3×3 median filter, eliminating noise of the image; and then carrying on expansion processing, so as to get the final binary images; finally, extracting the external contour of the citrus.As shown in Fig. 1.
After the image processing and image processing technology of removing the background, gray level transformation, median filter, threshold segmentation, region labeling as well as the extraction of features, etc., it can separate one defective area from the image of fruit and extract the parameters of the defect area, so as to realization the discrimination of the defects of citrus.

Background removal:
The background of the image is black, which has great difference from the main region of the fruit in red, by means of s better remove the useless background

RESULTS AND DISCUSSION
The extraction and classification of the characteristic parameters of citrus's image the image processing of citrus, it can get the geometric characteristics parameters of the image in the defective area and noise areas.In the test, it collected 34 images of the defective fruits, each fruit is collected with two images, because a portion of the images do not contain the defective areas, so the total collection characteristics parameters is 59 groups with various defective areas, with the characteristics parameters of 396 groups in noise area.The noise area of the defective fruits and the noise area of the perfect fruits intact fruits produced are the same type, so it can be transformed into the defective areas and noise areas that can judge the images of the citrus.Through the statistical analysis, the distribution of the characteristics parameters of all noise areas and defective areas is as shown in Table 1.
From Table 1 we can see, the distribution of each individual parameter of noise area and defective area has no obvious difference, it is difficult to distinguish with the traditional methods.While the multi structure of feed forward neural n error back propagation can achieve arbitrary nonlinear mapping between the input and output, which is suitable for the classification of the complicated modes, with the function of generalization.so as to get the final binary images; finally, extracting the external contour of the citrus.As shown in Fig. 1.
After the image processing and image preprocessing technology of removing the background, gray level transformation, median filter, threshold segmentation, region labeling as well as the extraction of features, etc., it can separate one defective area from the image of fruit and extract the geometric feature parameters of the defect area, so as to realization the discrimination of the defects of citrus.
background of the image is black, which has great difference from the main region of the fruit in red, by means of segmentation, it can background.

RESULTS AND DISCUSSION
The extraction and classification of the characteristic parameters of citrus's image: Based on the image processing of citrus, it can get the geometric parameters of the image in the defective area and noise areas.In the test, it collected 34 images of the defective fruits, each fruit is collected with two images, because a portion of the images do not contain the defective areas, so the total collection of the characteristics parameters is 59 groups with various defective areas, with the characteristics parameters of 396 groups in noise area.The noise area of the defective fruits and the noise area of the perfect fruits me type, so it can be transformed into the defective areas and noise areas that can judge the images of the citrus.Through the statistical analysis, the distribution of the characteristics parameters of all noise areas and defective areas is as From Table 1 we can see, the distribution of each individual parameter of noise area and defective area has no obvious difference, it is difficult to distinguish with the traditional methods.While the multi-layer structure of feed forward neural networks based on error back propagation can achieve arbitrary nonlinear mapping between the input and output, which is suitable for the classification of the complicated modes,

CONCLUSION
At present, the determination of these traits were mainly depended on visual and manual measurement, which existed the problems such as: slow speed, low accuracy and poor objectivity and so on.When extracting color characteristics for citrus detection, target surfaces (citrus, leaves, or branches) were analyzed using the Range of Interest (ROI) tool.The values of R subtracted by G of the given citrus, leaves, or branches are very similar, but the values of G subtracted by B or R subtracted by B of citrus are different from that of leaves and branches.A rule for segmenting citrus from background was put forward that the pixel belongs to citrus if the value of 只 subtracted by B larger than the Threshold value (T), which was developed by dynamic threshold segmentation method, otherwise the pixel belongs to background.The results show that the visible fruits under direct sunlight or backlighting condition were identified with an accuracy of 100%, however, intense background sunlight will cause poor fruit illumination and poor results.This model can detect fruits comprehensively with the external defects, color, size and shape, which can classify fruits comprehensively with high speed and precise classification, at the same time, the recognition of fruits as well as the quality level can be arbitrarily adjusted according to the requirements of the users or the requirements of the fruits market.
of unrecognized staff as R n+1 .

Fig 1 :
Fig 1: The extraction process; (a): Original image Third step: Do background subtraction and frame difference filtering for image frame in with the redundancy information and then get key frames { } 1 2 2 2( ) ,x key keyM F A f f A = = ⊆ L .
image; (b): Gray-scale images; (c): Filtering operation Do background subtraction and frame difference filtering for image frame in A 2 to do away with the redundancy information and then get keyin the Citrus database one by one and get the Similarity between them, then determine the Mark this frame image and send it into Repeat the steps until it detects all key frame Generate a video summary { } 1 2

Table l :
Distribution of characteristic parameters for crack and noise areas Minimum; Max.: Maximum; Avg.: Average; S.D.: Standard deviation