Machine-vision system helps classify fruit
The agricultural industry uses automated systems to improve the quality of fruit shipped while abolishing inconsistent manual sorting methods.
The agricultural industry uses automated systems to improve the quality of fruit shipped while abolishing inconsistent manual sorting methods. A number of companies currently use machine-vision systems to inspect the size, shape, color, and defects of fruit. At the Institute of Agricultural Engineering, The Volcani Center (Bet-Dagan, Israel), Victor Alchanatis and his colleagues have developed a machine-vision system to examine the external features of tomatoes.
The system uses three TK-1270 RGB color CCD cameras from JVC (Wayne, NJ) mounted on an arc surrounding the conveyor. According to Alchanatis, this setup provides a view from underneath the conveyor and two views from above. To digitize the color images, IVP-150 frame grabbers from BarGold (Haifa, Israel) deliver captured images into a PC-based system.
To eliminate the background image from the tomato area, image thresholding and edge detection are performed on the captured images. After thresholding, the mean and standard deviations of the hue histogram of a number of 40 X 40 pixels and the weighted average of all blocks are calculated. A technique called quadtree decomposition determines the overall average color.
The technique, developed using The Image Processing Toolbox from The MathWorks (Natick, MA), involves subdividing the image into sub-blocks that are more homogeneous than the entire image. Each image is divided into four sections, and each section is tested against a specific color-threshold criterion. For each section, the difference between the highest pixel value and the lowest is compared with a threshold. If the difference is higher than the threshold, each part of the image is again divided into four sections. Finally, each part of the image receives an average color and is weighted according to its size. Overall average color is then calculated.
To determine the shape of the fruit, the distances from the edges to the tomato center are calculated using the image captured from underneath the conveyor. By calculating the FFT of the distances from the edges to the tomato center, the roundness of the tomato can be calculated because the rounder the object, the lower the frequency of the vector.
According to Alchanatis, the results obtained using the system showed good classification for color, color homogeneity, bruises, and stem detection. Shape results provided good detection of the tomato when it was placed properly, but when placed incorrectly, the algorithm did not distinguish between the fruit and the cup in which the tomatoes were placed.