Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Identification of Defects in Fruits Usin

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

International Journal of Computer Sciences and Engineering Open Access

“ ”

“ Research Paper Vol.-6, Issue-10, Oct 2018 E-ISSN: 2347-2693 ”

Identification of Defects in Fruits Using Digital Image Processing


Siddhika Arunachalam1*, Harsh H. Kshatriya2, Mamta Meena3

1,2,3
Dept. of Computer Engineering, Atharva College of Engineering, University of Mumbai, Mumbai, India

*
Corresponding Author: siddhi97am@gmail.com, Tel.: +91 9969286067

Available online at: www.ijcseonline.org

Accepted: 11/Oct/2018, Published: 31/Oct/2018


Abstract— Image Processing is a technique which converts an image into a digital image to obtain some enhancement or to
select some effective information from it. Classification of fruit quality or grading is helped by detection of defects present on
fruit peel. As there is a great demand for high-quality fruits in the market, the task of defect detection in fruit is very vital in the
agricultural industry. However, defect detection by the human is labour-intensive and time-consuming. The proposed
methodology is useful in supermarkets for automatic sorting of fruits from a set of different kinds of fruits. This system
minimizes error and also speeds up the time of processing. The objective of this work is to present a novel method to detect
surface defects of fruit using RGB images. The proposed method uses pre-processing, segmentation, edge-detection and feature
extraction to classify the fruit as defected or fresh.

Keywords—Image Processing, Defect detection, Pre-processing, Filtering, Background subtraction, Binary image

I. INTRODUCTION

In image processing, an input image is given and the output


of image results into an image or features of an image. Image
processing can be used for different objectives such as image
recognition, recognition of pattern, image sharpening and
image retrieval. The main four types of digital images
include a binary image, indexed image, grayscale image and
true-colour image. In processing the digital image, various
phases are to be followed in order to extract the required
information from the digital image. The phases of image
processing are Pre-processing, Segmentation, Feature
Extraction and Classification [1] [10]. Figure 1. Generalised block diagram

For deciding the overall acceptance quality for customers, Generally, human experts perform the quality inspection of
the uniformity in size, shape and other quality parameters of fruits. The manual sorting by visual inspection is labour-
fruits are required. Labour shortages and a lack of overall intensive, time-consuming. It suffers from the problem of
consistency to the process resulted in a search for automated inconsistency and inaccuracy in the judgement of humans.
solutions. [6]. The important aspects for the inspection of With the advent of fast and high precision technology,
fresh fruits are colour, size and number of defects. The defect automation of the defect detection process is expected to
or damage usually occurs in fruits due to various factors such reduce labour cost and improve the efficiency of the sorting
as rotting, bruising, scab, fungal growth, injury, disease etc. process. We can find the quality of fruits by various
Proper care should be taken after the post harvesting of the algorithms using image processing [2] [3].
fruits. These defects must be removed in order to prevent
cross-contamination and reduce subsequent processing cost. The primary objective of this work is to design an algorithm
that can identify the defect and classify the fruit based on
digital image analysis.

Section I contains a brief introduction of identification of


defects in fruits and the process. In Section II, some related

© 2018, IJCSE All Rights Reserved 637


“International Journal of Computer Sciences and Engineering Vol.6(10), Oct 2018, E-ISSN: 2347-2693 ”

work is discussed. Section III discusses the methodology of is used to detect the defect on the fruit surface. A method
pre-processing, background subtraction, feature extraction, is implemented for the quantification of the standard
classification of fruit and the algorithm for fruit detection. In colour of the fruit in HSV (Hue, Saturation, Value) colour
Section IV, experimental result of proposed work is spaces to achieve fruit segmentation. A comparative study
discussed. Finally, Section V contains the conclusion and between the HSV and RGB colour space is done and the
future scope of this work. results are obtained [1].

II. RELATED WORK III. METHODOLOGY

To propose and implement the present work, different


methodologies are being investigated. The reviewed
literature has been classified into primary heads which helps
in comprehensive analysis study. Literature as per their
context can be studied by such an analysis. The computer
vision systems and image processing have been widely used
for classification, identification, quality evaluation and
grading and in the agriculture area [4] [9]. Some of the
important implementation techniques of image processing in
agricultural produce are:
● For the classification of fruit, one of the techniques used is
Speeded Up Robust Feature (SURF). The image is
described based on the result and the local features
extracted. Features extracted from each input image is
compared with the database images and the result is
generated. Square shaped filter is used in this system. It is
an approximation to Gaussian smoothing. Hessian matrix
is used to find surf points of interest [8].

● Blob detection technique for defect detection in fruit is


implemented in which the specific region is detected. The
colour or brightness is compared with the properties of
neighbouring regions. The defects in the fruit are
highlighted with circles. Major axis calculation is involved
in fruit size detection. When image processing results are
obtained, the palette changes its direction which is used for
sorting [7].

● In another method for external defect detection of fruit, the


image is segmented using various methodologies in
MATLAB [5]. The first segmentation method used is K-
means clustering. In this, the n-observations are partitioned
into K (<n) sets which is obtained from the image. The
best solution from the cluster of sums of squares is Figure 2. Flowchart
selected through initial centroids. The second method of
segmentation which is used is marker-controlled watershed 1) Pre-processing: The images obtained during the image
segmentation. It is based on simulation of the flood. The acquisition phase may not be appropriate for the
third method that is used for segmentation of image is identification and classification purpose. The captured
Otsu’s method which is based on thresholding of clusters. image is an RGB image (true-colour image) and the
Then edge detection is used which is based on captured image contains noise and noise produces some
optimization techniques. The fifth method for image blurring, to remove the noise we perform pre-processing
segmentation uses the Gabor filter which involves activities. Steps involved in this activity are described as
decomposition of an input image [2]. follows:

● Another approach is using RGB and HSV colour space  RGB to Grayscale conversion: The captured image has
model for automatic fruit defect detection. In this method, three matrices of sizes with respect to the format used to
application of computer vision system and image analysis store the images (TIFF, JPEG, BMP, etc). The three

© 2018, IJCSE All Rights Reserved 638


International Journal of Computer Sciences and Engineering
“ Vol.6(10), Oct 2018, E-ISSN: 2347-2693 ”

matrices indicate that how much of the three colours red, Step 5: Perform edge detection and fill the defected parts.
green, and blue a certain pixel should use. This RGB Step 6: Calculate area and quality ratio of fruit image.
image is converted to a grayscale image, in which the Step 7: Apply the condition and display the result.
pixels have one colour which is a shade of grey in
various ranges in between. IV. EXPERIMENTAL RESULTS

 Image Binarization: The grayscale image Initially, the user will upload the fruit image on the graphical
(monochrome image) is converted to a binary image by user interface (GUI) from the folder of the fruit dataset. In
thresholding with the help of a threshold value. If the the dataset the collection of fruit images will be stored and
value of a pixel is greater than or equal to the threshold each image will be given a unique number. This image will
value then set 1, and if it is less than the threshold value be accepted by the system and it will perform different
set zero. This indicates that each pixel is stored as a operations on the fruit image and classify the fruit as
single bit (0 or 1). defected or fresh. This output of classification will be made
available to the user on the GUI.
 Filtering: The binary image (digital image) is then
filtered using a median filter which reduces noise and Figure 3 shows the results of original image, grayscale
improves the visual quality of the image. Filtering is also image, binary image, edge detection, contour filling and
referred to as smoothing. Value of a pixel gets replaced filtered image.
by the grey levels in the neighbourhood of that pixel. It
is used for the detection of edges [8].

2) Background Subtraction: Background subtraction


(segmentation) serves two purposes. The first purpose is to
remove most of the background pixels for the determination
of the coarse regions of the fruit. The second purpose is to (a) (b)
determine whether pixels in the fruit have intensities less as
compared to the intensities of pixels in the background [10].
If so, reverse, increase the intensities of pixels in the fruit as
compared to the intensities of pixels in the background. A
foreground object (fruit) will be created which reduces the
amount of data to be processed. This will improve the
performance of the classifier.
(c) (d)
3) Feature Extraction: The area of fruit in the binary image
is calculated which is the number of pixels in the white area
total. Then, the total is divided by the pixel value (x*y) of the
whole image, by which the area of the fruit relative to the
image can be obtained.

4) Classification of the fruit: After feature extraction, the (e) (f)


defect detection is performed based on surface defect such as
scars, spots, etc. The defected fruit is identified by creating a Figure 3. (a) Original Image (b) Grey-scale Image (c)
boundary of contours of defective part on filtered fruit image Binary Image
and the contours are filled with white pixels to finds its area (d) Edge Detection (e) Contour Filling (f) Filtered
for the basis of judgement. After which the condition will be Image.
applied. If the ratio is greater than the set threshold value
then the fruit is defected otherwise, the fruit is fresh. V. CONCLUSION AND FUTURE SCOPE

Algorithm: Due to the increasing demand for quality fruits, a reliable


Step 1: Input the fruit dataset image to check the fruit. mechanism to handle the bulk of data is implemented.
Step 2: Pre-process the original image RGB by converting Algorithms were developed to classify the fruit, based on a
it into grayscale image and binary image by single view of fruit images. The fruits were differentiated
thresholding. into two classes based on the ratio computed.
Step 3: Filter the image to remove noise.
Step 4: Subtract the background from the pre-processed Hence, using the proposed algorithm, sorting of fruits can be
image.

© 2018, IJCSE All Rights Reserved 639


International Journal of Computer Sciences and Engineering
“ Vol.6(10), Oct 2018, E-ISSN: 2347-2693 ”

done based on quality. The system will have a good prospect


of application in fruit size detecting and grading areas. The
colour, perimeter, roundness, and percentage of defect
features can be utilized in the future to enhance the accuracy
of the algorithm. Some other features such as display of
diseases of fruit and analysis of statistical comparison of
defects in various fruit can be implemented in addition to the
proposed algorithm.

REFERENCES

[1] S.V. Phakade, “Automatic Fruit Defect Detection Using HSV and
RGB Colour Space Model”, International Journal of Innovative
Research in Computer Science & Technology, Vol.2, Issue.3,
pp.67-73, May 2014.
[2] A. Davenel, T. Labarre, “Automatic Detection of Surface Defects
on Fruit by Suing a Vision System”, Journal of Agricultural
Engineering Research, Vol.41, Issue.1, pp. 1-9, September 1988.

[3] Van Huy Pham, Byung Ryong Lee, “An Image Segmentation
Approach for Fruit Defect Detection Using K-means Clustering
and Graph-Based Algorithm”, Vietnam Journal of Computer
Science, Vol.2, Issue.1, pp. 25-33, February 2015.
[4] Ghobad Moradi, “Fruit Defect Detection from Colour Images
Using ACM and MFCM Algorithm”, International Conference on
Electronic Devices Systems and Applications (ICEDSA), pp.182-
186, April 2011.
[5] Dameshwari Sahu, “Identification and Classification of Mango
Fruits Using Image Processing”, International Journal of Scientific
Research in Computer Science,Engineering and Information
Technology, Vol.2, Issue.2, pp.203-210, 2016 .
[6] Khune Sonali B, “Fruit Quality Assessment and Classification
Using Image Processing”, International Journal of Innovative
Research and Creative Technology, Vol.2, Issue.4, pp.156-159,
2015.
[7] Manali R. Satpute, “Automatic Fruit Quality Inspection System”,
International Conference on Inventive Computation Technologies
(ICICT), 2016.
[8] Ashwani Kumar Dubey, “Fruit Defect Detection Using Speeded
Up Robust Feature Technique”, 5th International Conference on
Reliability, Infocom Technologies and Optimization (ICRITO),
pp.590-594, 2016.
[9] R. Sudha, “AFGDA: Defect Detection and Classification of Apple
Fruit Images Using the Modified Watershed Segmentation
Algorithm”, International Journal of Science Technology &
Engineering , Vol.3, Issue.06, pp.75-85, December 2016.
[10] R.C. Gonzalez, R.E. Woods, “Digital Image Processing”, Prentice
Hall, New Jersey 07548, 2007.
.

© 2018, IJCSE All Rights Reserved 640

You might also like