A NOVEL VISION USING IMAGING ANALYSIS FOR TOMATO QUALITY DETECTION

The quality of products is very important for the human health. Sorting tons of fruits and vegetables manually is a slow, costly, and an inaccurate process. The objective of this study was to develop a computer vision and image analysis program to serve as a simple and suitable technique for external fruit inspection and for predicting orange fruits maturity through the image analysis technique. The MATLAB software package was used image processing tools to analysis image of tomato. The study also investigated the effectiveness of some color bands, average intensity of RGB bands and HSI. The results revealed that the computer vision and image analysis program could be used to differentiate tomato maturity stages. The results also showed that there is a strong response between both RGB band and HSI of tomato fruits and maturity stage also storage period during 21 days. Automatic sorting of food products is an important process to get high quality food. Vision based sorting system is an accurate and fast process compared to manual sorting. The accuracy of this system can be improved by increasing the dataset of images.


INTRODUCTION
he quality of products is very important for the human health. Sorting of agricultural products is accomplished based on appearance (color and absence defects), texture, shape and sizes. Manual sorting is based on traditional visual quality inspection performed by human operators, which is tedious, time-consuming, slow and nonconsistent.
*Assistant Prof of Agric. Eng. Dep., Fac. of Agric., Minoufiya Univ., **Post graduate student The basic principle of computer vision is described in Figure (1). Image processing and image analysis are the core of computer vision with numerous algorithms and methods available to achieve the required classification and measurements (Krutz et al., 2000) Fig (1). Principles of computer vision system. Helmy et al. (2003) used a digital camera to take images for fresh tomato fruits sample; each fruit had two images, from up and down. The intensity of used light was 530 lux. And classified fresh tomatoes into fifteen maturity grades namely green, spring green, light green, breaker, sand, light orange, peach, turning, color, faded pink, soft pink, pink, tropical pink, light red, neon red and red. They gave average, variance, and standard deviation of reflectance and RGB values of the classified tomatoes. Sorting is a separation based on a single measurable property of raw material units, while grading is the assessment of the overall quality of a food using a number of attributes. Grading of fresh product may also be defined as sorting according to quality, as sorting usually upgrades the product (Brennan, 2006). Walailak and Tech (2006) mentioned that, color grading is an important process for the agriculture industry especially in food processing, fruit and vegetable grading. The color of products is often used to determine quality and price. Consumers have developed distinct correlations between color and the overall quality of a specific product. In the agriculture industry, color-grading applications are implemented by using color image processing. The advancement of color grading is based on the development of color charge coupled device (CCD) camera. In recent ten years, operations in grading systems for fruits and vegetables became highly automated with mechatronics, and robotics technologies. Machine vision systems and near infrared inspection, systems have been introduced to many grading facilities with mechanisms for inspecting all sides of fruits and vegetables (kondo, 2009). It has become increasingly difficult to hire personnel who are adequately trained and willing to undertake the tedious task of inspection (Amer Eissa and Khalik, 2012).
Computer vision systems have been used increasingly in the food and agricultural industry for inspection and evaluation purposes as they provide suitably rapid, economic, consistent and objective assessment. They have proved to be successful for the objective measurement and assessment of several agricultural products. Over the past decade, advances in hardware and software for digital image processing have motivated several studies on the development of these systems to evaluate the quality of diverse and processed foods. Computer vision has long been recognized as a potential technique for the guidance or control of agricultural and food processes. Fouda and Salah (2014) tested a computer vision and image analysis program as a suitable technique for external orange fruit inspection. The results showed the relationships between hue and saturation and total soluble solid (Tss), ph, acidity and percentage of liquid. The results demonstrated that hue and saturation indices gives understanding about between total soluble solid (tss), ph, acidity and percentage of liquid.
Tomatoes (lycopersicon esculentum), is a major vegetables crop in Egypt which is cultivated in about 216385 thousand faddans to produce 8.5 million tons/year. Egypt is ranked fifth in the world in the production of tomatoes (FAO of agricultural statistics, 2014). Quality and productivity control is a big issue in tomato crop due existence of large number of defects.
Based on these considerations, the proposal of this research work was conceived as to adapt the MATLAB code used Image processing toolbox to open software to enable the classification system in recognizing color and possibly bruises at a unique glance, driving at to develop low cost and reliable techniques applicable to fruit sorting.

MATERIALS AND METHODS
The present work investigated the potential of image analysis techniques to detect the response of tomato maturity. The experimental work was undertaken at the Department of Agricultural Engineering -College Agriculture -Minoufiya University.

The tomato fruit and varieties
The samples were hand harvest and selected randomized. All samples were individually numbered, four image for each sample occurred .The tomato fruit and varieties under study were (Commercial items),Super Strain (fresh) and Super Mar mend (storage) were stored at refrigerator temperature a range of (10-15º), without exposed to light for 21 days and pictures of tomato samples were taking every three days as shown in Figure (2).

Computer visioning system
The system consists of an imaging box with non-reflective black color cloth connected to a digital camera of 14 Mega pixels. The camera was mounted at 15 cm from the surface of tomato fruit. Samples were illuminated using two parallel lamps with two fluorescents tubes in each lamp. Both lamps (60 cm long) were situated 35 cm above the sample and at an angle of 45• to the sample. Following capturing images were stored on a personal computer for the analysis.
Image Analysis system: tomato samples were captured by the camera, transferred to Color evaluation: Using the most popular color model RGB color space and HSI. The color was presented with R, G and B, the amount of information is tripled. The RGB system is sensitive to lighting and other surrounding conditions. To evaluate the color of captured images of fruits, the acquired RGB color as shown in Figure (3) information was transformed by MATLAB 9 (image processing tools).   The following expressions show the relationship between HSI values and RGB values:

RESULTS AND DISCUSSION
The results of this work are discussed under two heading: 1-Physical characteristics of tomato fruit. 2-Image processing of tomato fruit. Experimental results obtained for both an unripe and a ripe fruit. The mean value of RGB color and intensity in different maturity stage of fresh tomato fruit are discussed.

The relationship between maturity stage of tomato fruit and both of Seasons and RGB:
Maturity of tomato fruit, (M) with red color, green color and blue color content is displayed in Fig (6) and (7) and Table (1) and (2) in summer and winter season. (R) and (G) increased then decreased with maturity stage, but was increased with maturity stage .Maturity of tomato fruit, (M) with red color, green color and blue color (G) and (R) decreased with increased maturity stage, but (B) was increased with increased maturity stage.

The relationship between maturity stage of tomato fruit and intensity in summer.
Maturity stage of tomato fruit, with intensity content is displayed in Fig.  (8). Intensity increased from 0.21 to 0.23 with increased Storage time (T) then decreased to 0.13.

Fig (8): The relationship between maturity stage of tomato fruit and intensity in summer. The relationship between maturity stage of tomato fruit and intensity in winter.
Maturity stage of tomato fruit, with intensity content is displayed in Fig  (9). Intensity decreased from 0.24 to 0.17 with increased maturity stage.

Fig (9): The relationship between maturity stage of tomato fruit and intensity winter. Storage tomato fruit
Ripe tomatoes fruit were stored at refrigerator temperature arrange of (10-15º), without exposed to light for 21 days and was taking pictures of tomato samples every three days.

Maturity intensity
The relationship between storage day of tomato fruit and RGB. Storage time (T) of tomato fruit, with red color (R), green color (G) and blue (B) color content is displayed in Fig. (10) and Table (3). (G) Color decreased with increased Storage time (T), but (R) and (B) color was increased with Storage time (T).

The relationship between storage day of tomato fruit and intensity.
Storage time (T) of tomato fruit, with intensity content is displayed in Fig.  (11). Intensity increased with increased Storage time (T) then decreased.

Relationships between Blue color (B) and both of Green color (G) and Red color(R) of tomato fruit (fresh).
The obtained results were presented in Table (4) showed that, the correlation between Blue color and both of Green color and Red color of tomato fruit., were significant, where, they were 0.648 and -0.565 at P<0.01, respectively. The curve represents all the values of the red, green and blue color of the different of maturity stage. Pairs of values Blue color and Green color specific contour line dark red on the horizontal plane shows the highest values for Red color as shown in Fig. (12) (>500).

Relationships between Green Color (G) and both of Blue Color (B) and Red Color (R) of storage tomato fruit).
The obtained results were presented in Table (

Relationships between Intensity (I) and both of Saturation (S) and Hue (H) of storage tomato fruit.
The obtained results were presented in Table (

CONCLUSION
An image analysis technique was found to serve as a suitable and accurate method for external tomato fruit inspection. Relationships were determined between average of RGB bands and HSI. Multiple regression analysis and correlation coefficient tested the association between RGB and HSI identify the optimum index sensitive to maturity. Possible discrimination by analyzing the colors between the different stages of maturity Tomato Accordingly machine vision can be used successfully in sorting tomatoes based on color. It is recommended using a sophisticated system by connecting the processor directly online by using camera and is connected to a computer program to give signals to the gates of each degree of sorting by color on a continuous basis. The quantitative color appearance evaluation is an adequate system for access to a system that works directly on the sorting and grading machines.