IMAGE ANALYSIS FOR APPLE DEFECT DETECTION

Similar documents
Defects segmentation on Golden Delicious apples by using colour machine vision

Defect segmentation on Jonagold apples using colour vision and a Bayesian classification method

Defect segmentation on 'Jonagold' apples using colour vision and a Bayesian classification method

CHAPTER-4 FRUIT QUALITY GRADATION USING SHAPE, SIZE AND DEFECT ATTRIBUTES

Advances in the Application of Image Processing Fruit Grading

Detection of Greening in Potatoes using Image Processing Techniques. University of Tehran, P.O. Box 4111, Karaj , Iran.

A Real Time based Image Segmentation Technique to Identify Rotten Pointed Gourds Pratikshya Mohanty, Avinash Kranti Pradhan, Shreetam Behera

CHAPTER 1 INTRODUCTION

Bruise Detection Using NIR Hyperspectral Imaging for Strawberry

ME 6406 MACHINE VISION. Georgia Institute of Technology

Image Processing Lecture 4

(12) United States Patent (10) Patent No.: US 6,346,966 B1

1. INTRODUCTION. Keywords: image processing, computer vision, color segmentation, potato grading, quality inspection

9/10/2013. Incoming energy. Reflected or Emitted. Absorbed Transmitted

WHITE PAPER. Methods for Measuring Flat Panel Display Defects and Mura as Correlated to Human Visual Perception

ROBOT VISION. Dr.M.Madhavi, MED, MVSREC

We are IntechOpen, the world s leading publisher of Open Access books Built by scientists, for scientists. International authors and editors

Automated Detection of Mechanically Induced

Interference metal/dielectric filters integrated on CMOS image sensors SEMICON Europa, 7-8 October 2014

Maturity Detection of Fruits and Vegetables using K-Means Clustering Technique

Safety Inspection of Fruit and Vegetables Using Optical Sensing and Imaging Techniques

Applying Automated Optical Inspection Ben Dawson, DALSA Coreco Inc., ipd Group (987)

High Speed Hyperspectral Chemical Imaging

True 2 ½ D Solder Paste Inspection

APPLIED MACHINE VISION IN AGRICULTURE AT THE NCEA. C.L. McCarthy and J. Billingsley

Automatic Detection of Kiwifruit Defects Based on Near-Infrared Light Source

SINCE2011 Singapore International NDT Conference & Exhibition, 3-4 November 2011

Exercise questions for Machine vision

Identification of Age Factor of Fruit (Tomato) using Matlab- Image Processing

FACE RECOGNITION BY PIXEL INTENSITY

How interference filters can outperform colored glass filters in automated vision applications

EC-433 Digital Image Processing

Method to acquire regions of fruit, branch and leaf from image of red apple in orchard

Comparison of Maturity Detection of Ataulfo Mangoes Using Thermal Imaging and NIR

Remote Sensing. The following figure is grey scale display of SPOT Panchromatic without stretching.

NON UNIFORM BACKGROUND REMOVAL FOR PARTICLE ANALYSIS BASED ON MORPHOLOGICAL STRUCTURING ELEMENT:

Digital Imaging Systems for Historical Documents

FLUORESCENCE MAGNETIC PARTICLE FLAW DETECTING SYSTEM BASED ON LOW LIGHT LEVEL CCD

CHAPTER 4 LOCATING THE CENTER OF THE OPTIC DISC AND MACULA

Combining multispectral reflectance and fluorescence imaging for identifying bruises and stem-end/calyx regions on Golden Delicious apples

Vision. The eye. Image formation. Eye defects & corrective lenses. Visual acuity. Colour vision. Lecture 3.5

Making NDVI Images using the Sony F717 Nightshot Digital Camera and IR Filters and Software Created for Interpreting Digital Images.

QUALITY CHECKING AND INSPECTION BASED ON MACHINE VISION TECHNIQUE TO DETERMINE TOLERANCEVALUE USING SINGLE CERAMIC CUP

Plant Disease Classification Using Image Segmentation and SVM Techniques

Feature Extraction Techniques for Dorsal Hand Vein Pattern

Imaging obscured subsurface inhomogeneity using laser speckle

Version 6. User Manual OBJECT

Image Extraction using Image Mining Technique

The Science Seeing of process Digital Media. The Science of Digital Media Introduction

Spectral and Polarization Configuration Guide for MS Series 3-CCD Cameras

A Novel Approach for Classification of Apple Using On-Tree Images Based On Image Processing

Vision Lighting Seminar

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

Estimation of spectral response of a consumer grade digital still camera and its application for temperature measurement

Image Database and Preprocessing

Fig Color spectrum seen by passing white light through a prism.

Digital Image Processing

DESIGN AND CHARACTERIZATION OF A HYPERSPECTRAL CAMERA FOR LOW LIGHT IMAGING WITH EXAMPLE RESULTS FROM FIELD AND LABORATORY APPLICATIONS

Hyper-spectral features applied to colour shade grading tile classification

International Journal of Modern Trends in Engineering and Research e-issn No.: , Date: April, 2016

Practical Image and Video Processing Using MATLAB

Image Capture and Problems

Analysis and Identification of Rice Granules Using Image Processing and Neural Network

IDENTIFICATION OF FISSION GAS VOIDS. Ryan Collette

Minimalist AdaBoost for blemish identification in potatoes

Geometric Feature Extraction of Selected Rice Grains using Image Processing Techniques

Advances in Machine Vision Applications for Automatic Inspection and Quality Evaluation of Fruits and Vegetables

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

TRUESENSE SPARSE COLOR FILTER PATTERN OVERVIEW SEPTEMBER 30, 2013 APPLICATION NOTE REVISION 1.0

USE OF HISTOGRAM EQUALIZATION IN IMAGE PROCESSING FOR IMAGE ENHANCEMENT

ECC419 IMAGE PROCESSING

Goal: Label Skin Pixels in an Image. Their Application. Background/Previous Work. Understanding Skin Albedo. Measuring Spectral Albedo of Skin

Instructions for the Experiment

Land Cover Analysis to Determine Areas of Clear-cut and Forest Cover in Olney, Montana. Geob 373 Remote Sensing. Dr Andreas Varhola, Kathry De Rego

Prediction of Color Appearance Change of Digital Images under Different Lighting Conditions Based on Visible Spectral Data

Multispectral. imaging device. ADVANCED LIGHT ANALYSIS by. Most accurate homogeneity MeasureMent of spectral radiance. UMasterMS1 & UMasterMS2

CS 548: Computer Vision REVIEW: Digital Image Basics. Spring 2016 Dr. Michael J. Reale

Improving the Collection Efficiency of Raman Scattering

ColorRanger E 3D Cameras. Explore the true colors of Ranger MultiScan. PDF processed with CutePDF evaluation edition

Image interpretation and analysis

DISEASE DETECTION OF TOMATO PLANT LEAF USING ANDROID APPLICATION

For a long time I limited myself to one color as a form of discipline. Pablo Picasso. Color Image Processing

COLOUR INSPECTION, INFRARED AND UV

Digital Image Processing. Lecture # 6 Corner Detection & Color Processing

Statistical Evaluation of Dynamic Changes of Idared Apples Colour During Storage

Statistical Color Models with Application to Skin Detection

SPATIAL VISION. ICS 280: Visual Perception. ICS 280: Visual Perception. Spatial Frequency Theory. Spatial Frequency Theory

The Development of Surface Inspection System Using the Real-time Image Processing

FSI Machine Vision Training Programs

A Review of Optical Character Recognition System for Recognition of Printed Text

Solution Set #2

Image and video processing

CHAPTER 1 INTRODUCTION

Background. Computer Vision & Digital Image Processing. Improved Bartlane transmitted image. Example Bartlane transmitted image

WHITE PAPER. Methods for Measuring Display Defects and Mura as Correlated to Human Visual Perception

Paul Musto. Endoscopes and their construction

Available online at ScienceDirect. Ehsan Golkar*, Anton Satria Prabuwono

Urban Feature Classification Technique from RGB Data using Sequential Methods

Hyperspectral Imaging Basics for Forensic Applications

Optimizing throughput with Machine Vision Lighting. Whitepaper

Transcription:

TEKA Kom. Mot. Energ. Roln. OL PAN, 8, 8, 197 25 IMAGE ANALYSIS FOR APPLE DEFECT DETECTION Czesław Puchalski *, Józef Gorzelany *, Grzegorz Zaguła *, Gerald Brusewitz ** * Department of Production Engineering, University of Rzeszow, M. Ćwiklińskiej 2, 35-61 Rzeszów, Poland, ** Biosystems and Agricultural Engineering, Oklahoma State University, 227 Ag Hall, Stillwater, OK 747, USA Summary. The objective of this research was to develop and test an image processing system which could identify defects on apple surfaces. A system for identifying surface defects on apples was designed, based on analyzing images acquired while apples were rotating in front of the camera. When multiple images were combined and adjustments made for rotation, dark areas caused by defects would appear with almost the same shape and at the same place in three or more frames. While minimizing false positives, the classification accuracy was very high. The proposed algorithm was effective in detecting various defects such as bruises, frost damage, and scab. The average classification accuracy was 96% for the samples in the experiments. Key words: apple, damage, vision system, algorithm. INTRODUCTION Post harvest sorting of apples is a difficult, labor intensive process in the commercial fresh apples industry. The use of computer vision has attracted much interest and reflects the progress of computer vision technology for fruit inspection. [Yang, 1994] used a flooding algorithm to segment patch-like defects on monochrome images. This method could be difficult to apply on bi-color fruits where the defects are darker then the ground color, but lighter than the blush color. This method of feature identification is applicable to other types of produce with uniform skin colour. This technique was improved by [Yang and Marchant, 1995], who applied a snake algorithm to closely surround the defects. [Molto et al. 2] used linear discriminant analysis to segment pixels into three and four classes. A discriminant function sorted the apple as accepted or rejected. The accuracy was good for apples. [Leemans et al. 1998] used a Gaussian model of the color to segment defects on Golden Delicious apples with two enhancement steps. The detection was effective, but revealed some difficulties. To segment the defects, each pixel of an apple image was compared with a global model of healthy fruits by making use of the Mahalanobis distances. The proposed algorithm was effective in detecting various defects such as bruises, russet, scab, fungi or wounds. Experimentation by [Paulus et al. 1997] used Fourier analysis of apple peripheries as a quality inspection technique. This methodology showed the way in which external product features affect the teka_vol8.indd 197 8-7-28 14:1:43

198 Czesław Puchalski, Józef Gorzelany, Grzegorz Zaguła, Gerald Brusewitz human perception of quality. If the classification involved more product properties and became more complex, the error of human classification increased. [Leemans et al. 1998] investigated the defect segmentation of Golden Delicious apples using machine vision. The study showed apple images segmented by the three algorithms applied sequentially. In similar studies [Yang,1996] assessed the feasibility of using computer vision for the identification of apple stems and calyxes. Neural networks were used to classify each patch as stem/calyx or patch-like blemish. An overall accuracy of 95% was reported for Golden Delicious and Granny Smith. [Chen et al. 2] presented hyperspectral imaging technology for inspection and grading of agricultural products for inspection. The sensor module included a back illuminated CCD and a control unit. Hyper-spectral imaging systems can be used to fined optimal bands and develop algorithms for many food commodities. [Ariana et al. 6] investigated multispectral imaging to detect various defects on apples. Artificial neural network classification models were developed for two classification schemes; a two class and a multiple-class. The technique is promising for accurate recognition of different types of apple disorders. The objective of this research was to develop and test an image processing system which could identify defects on apple surfaces. It was proposed to analyze multiple images acquired while the apples were rotating in front of the camera. MATERIALS AND METHODS Gala, Jonagold, Ligol, Melrose, Fiesta and Golden Delicious apples were picked at the Albigowa Fruit Research Station, near Rzeszow, in September 3. Apples were selected with different surface defects. Between picking and testing, apples were stored at C. The day before testing the apples through the sorting system, bruises were intentionally inflicted on some of the apples by dropping apples 15 mm onto a hemispheric surface of wood. This created a bruise of approximately 12 15mm diameter. All images were taken the day after harvest. After image acquisition, apples were returned to cold storage so that they could be used for the evaluation of the image processing. Apples were regular in shape and were typical size for each variety. A set of apples, including fruits of different qualities and damage was used to test the developed algorithm. The defects encountered were fungi attack, frost damage, bruising, punches, insect holes, and scab. Images were acquired using one CCD camera (Model SSC-DC58AP, RGB Sony) equipped with 25 mm lens, computer with MultiScan program image analysis, and diffuse light from two halogen lamps (Fig. 1). Apples were oriented vertically in the stem- calyx direction and then they were rotated. The camera was mounted 4 mm to the side of the sample. Eight images of each apple were taken. Images were digitized using a frame grabber, and displayed on the monitor. The image capturing system consisted of a camera with spatial resolution (124 124 pixels, 256 grey levels) and high sensitivity. The system consisted of an optical splitter and filters, which were similar to that developed by [Throop and Aneshansley,1997]. They found that 74 nm performed best for dark marks caused by fungal or bacterial diseases, insects, hail damage, and 95 nm was the optimal wavelength for detecting bruises, punctures, and scald. The splitter was mounted in front of the camera and contained optics that divided the incoming image. Different threshold segmentation methods were used in this study. A filtered image was produced by subtracting the original image and setting all negative grey levels. This is a simple threshold segmentation based on flat-field corrected images. In this case, an image of a white sphere, the size of the apples, was inverted and added to the original apple image. Another segmentation was used in which the images were segmented several times at different threshold levels. This seg- teka_vol8.indd 198 8-7-28 14:12:1

IMAGE ANALYSIS FOR APPLE DEFECT DETECTION 199 mentation aimed at identifying the darkest areas in the original image. The resulting, binary image was referred to as a marker image. Having established the position of the defects, segmentation was used to determine the area of these defects. Another method was used in which a correction image was created through filtering and averaging of the eight frames. These images were then threshold segmented to identify the defects. All image processing was done using Multiscan with the image and signal processing toolbox. Fig. 1. Machine vision system RESULTS AND DISCUSSION As the apple was rotated 45 between the acquisitions of each frame, a given part of the surface appeared at different positions in as many as eight frames. As the apples in this work were rotated through 36, some defects could be visible in more than one frame. It was decided to consider defects appearing in three or more frames to evaluate the performance of the system. The images, which were observed, contained dark areas of which some were actual defects. The image processing routines were segmented to identify potential defects, followed by combing the frames in order to separate defects from false positives. After segmentation, the individual frames were combined. In the combined image, defects appeared with almost the same shape and at the same teka_vol8.indd 199 8-7-28 14:12:1

Czesław Puchalski, Józef Gorzelany, Grzegorz Zaguła, Gerald Brusewitz place in three or more frames. After the frames were resized, they were flat-field corrected using an average of eight images. This average was inverted by subtracting the pixels values from 255, and then it was resized to the proportions of the apple to be flat-field corrected. After resizing, the frames were combined to form an image of the entire apple surface. Apples rotated through 36, and by acquiring 8 frames, each part of the apple surface was overlapped as many times. From this a matrix was created from segmented versions of the frames, in which the apple and the background were identified by pixel values of 1 and, respectively. Then the resulting image was created by this matrix. The segmented frames were combined as described for the grey scale images. In each segmented frame, dark areas represented potential defects Areas classified as non-defective was assigned a value of. When the segmented images were overlapped, the same dark area was identified in more than one frame. The potential defect had been identified in at least three frames at the same location on the apple. These cases were classified as defects. A set of 3 apples, including fruits of different qualities and damage, was used to test the developed algorithm (Fig. 2). main program enter process parameters call pixel_filter to remove single pixel wide clusters complexity of the whole apple call image from the disk call mask to create light pass filtered image number of threshold image binarization complexity rate call threshold to threshold the results to from a binary image call data_file to record each validcluster area Fig. 2. The algorithm of process on apple image Some results are shown in Fig. 3 where defect segmentation appears in the right part of the figures. Five particular fruits were chosen to show the difficulties because of the high variability among apples. The apple ground colors in images were yellow, red and green. The first apple had an old insect bite which had produced growth damage. On the defect segmentation the contrast between healthy and defective areas was clear, it appears equally size and shape of scar tissue. The teka_vol8.indd 8-7-28 14:12:1

IMAGE ANALYSIS FOR APPLE DEFECT DETECTION 21 second defect (lower part of the Fig. 3) resulted from a bruise. The healthy tissue was impaired, providing poor contrast, and the defect border was strongly blurred. The third defect (right part of Fig. 3) showed fungi attack. Here, the contrast was low compared to the ground skin color of apple. The fourth damage resulted from an early scab attack. The contrast was very clear, but the middle of the defect was made of scar tissue, and the defect presented a wide range of color. The last defect (lowest part of Fig. 3) was frost damage. The contrast between sound and defective area was very clear. Generally, the segmentation algorithm was able to detect the defects as indicated by Fig. 3. However, the ability to segment them was of concern. The border of the fruits was slightly segmented as defect. It was less explored then the central part of scar tissue. The segmentation of the defect border was correct for all damages, except for the bruising and fungi attack, which were detected, but less accurately. The main weakness of this algorithm was detecting defects with color close to the ground color of apple. It might be improved by using different filtering methods applied to an apple image before or after segmentation. This way the border of the defect smoothed by filtration, would be advantageous for defect shape determination. Fig. 3. Examples of processed image on apples Measured area of defects by a vision system versus manual measured area (human visual inspection) for tested apple varieties are presented in Fig. 4 and Fig. 5. The defects of fungi attack, frost damage, bruising, punches, insect holes, scab have been processed by the algorithm. Linear relationships were developed between those parameters with determination coefficients in the range of.96-.99. Diagrams for Melrose, Jonagold, Alwa and Golden Delicious had the least amount of scatter about the regression line. Distribution of the healthy fruits surface segmented as defect for all tested varieties is shown in Fig. 6 for Melrose, Jonagold, and Alwa, 65% of the healthy fruits have less than 5% of their surface segmented as defect, however for Fiesta, Gloster and Golden Delicious it was only 35%. While 83% of fruits of Jonagold and Alwa have less than 1% of their surface segmented as defect, the remaining apples had only 63% defects. teka_vol8.indd 21 8-7-28 14:12:2

22 Czesław Puchalski, Józef Gorzelany, Grzegorz Zaguła, Gerald Brusewitz Measured area by vision system [mm 2 ] 5 4 3 y =,9899x + 1,29 R 2 =,9939 MELROSE 3 4 5 Measured area by vision system [mm 2 ] Measured area by vision system [mm 2 ] 3 25 15 5 15 y = 1,287x +,22 R 2 =,9845 FIESTA 5 15 25 5 y =,9785x -,8195 R 2 =,9627 GLOSTER 5 15 Fig. 4. Measured area by vision system versus manual measured area for tested varieties teka_vol8.indd 22 8-7-28 14:12:3

IMAGE ANALYSIS FOR APPLE DEFECT DETECTION 23 Measured area by vision system [mm 2 ] 5 4 3 y = 1,5x +,251 R 2 =,9992 3 4 5 JONAGOLD Measured area by vision system [mm 2 ] Measured area by vision system [mm 2 ] 15 5 35 3 25 15 5 y = 1,115x - 2,1821 R 2 =,9911 ALWA 5 15 25 3 35 y =,977x + 1,1763 R 2 =,9834 GOLDEN DELICIOUS 5 15 Fig. 5. Measured area by vision system versus manual measured area for tested varieties teka_vol8.indd 23 8-7-28 14:12:4

24 Czesław Puchalski, Józef Gorzelany, Grzegorz Zaguła, Gerald Brusewitz MELROSE JONAGOLD FIESTA ALWA GLOSTER GOLDEN DELICIOUS Fig. 6. Distribution of the healthy fruits surface segmented as defect for all tested varieties teka_vol8.indd 24 8-7-28 14:12:5

IMAGE ANALYSIS FOR APPLE DEFECT DETECTION 25 CONCLUSION A system for identifying surface defects on apples was designed, based on analyzing images acquired while apples were rotating in front of the camera. When multiple images were combined and adjustments made for rotation, dark areas caused by defects would appear with almost the same shape and at the same place in three or more frames. The proposed algorithm was able to detect defects such as bruises, frost damage, and scab. The method had a classification accuracy of 96% for the samples in these experiments. This research was funded by grant KBN Nr 6P6R452. Computer vision system dedicated to estimate apple quality. REFERENCES Ariana D., Guyer D.E., Shrestha B. 6. Integrating multispectral reflectance and fluorescence imaging for defect detection on apples. Computers and Electronics in Agriculture 5, 148-161. Chen et al., 2. Machine vision technology for agricultural applications. Computers and Electronics in Agriculture. 12, 173-191. Leemans et al., 1998. Defects segmentation on Golden Delicious apple by using colour machine vision. Computers and Electronics in Agriculture. 2, 117-13 Molto, E. 2. Multispectra inspection of citrus in real-time using machine vision and digital processors. Computers and Electronics in Agriculture, 33(2), 121 137. Paulus et al. 1997. Inspection and grading of agricultural and food products by computer vision systems. Computers and Electronics in Agriculture, 36, 193-213 Throop, J.A., D.J. Aneshansley, B.L. 1997. Apple Orientation on Automatic Sorting Equipment. In Sensors for Nondestructive Testing: Measuring the Quality of Fresh Fruits and Vegetables. Northeast Regional Agricultural Engineering Service Publication No. 97, Ithaca, N.Y. 14853. Yang Q. 1994. Approach to apple surface feature detection by machine vision. Computers and Electronics in Agriculture, 11, 249-264. Yang Q., Marchant J.A., 1995. Accurate blemish detection with active contour models. Computers and Electronics in Agriculture, 14, 77-89 Yang, Q. 1996. Apple stem and calyx identification with machine vision. Agricultural Engineering Research, 63, 229-236. teka_vol8.indd 25 8-7-28 14:12:7