You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/336020266

Automated Sorting and Grading of Agricultural Products based on Image


Processing

Conference Paper · November 2019


DOI: 10.1109/ICICT47744.2019.9001971

CITATIONS READS

18 2,376

6 authors, including:

Hafiz Muhammad Tayyab Abbas Usama Shakoor


National University of Sciences and Technology Institute of Space Technology
1 PUBLICATION 18 CITATIONS 1 PUBLICATION 18 CITATIONS

SEE PROFILE SEE PROFILE

Jaleed Khan Khurram Khurshid


University of Galway Institute of Space Technology
34 PUBLICATIONS 1,165 CITATIONS 130 PUBLICATIONS 2,415 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Quantum Machine Learning Paradigm for future generation mobile networks View project

HYPERSPECTRAL IMAGE ANALYSIS FOR WRITER IDENTIFICATION USING DEEP LEARNING View project

All content following this page was uploaded by Hafiz Muhammad Tayyab Abbas on 31 January 2021.

The user has requested enhancement of the downloaded file.


Automated Sorting and Grading of Agricultural
Products based on Image Processing
Hafiz Muhammad Tayyab Abbas, Usama Shakoor, Muhammad Jaleed Khan, Mushtaq Ahmed, Khurram Khurshid
Artificial Intelligence and Computer Vision (iVision) Lab,
Department of Electrical Engineering, Institute of Space Technology, Islamabad 44000, Pakistan.
hafiztayyab13@gmail.com, usamashakoorpk@gmail.com, mjk093@gmail.com, qazi@ist.edu.pk,
khurram.khurshid@ist.edu.pk

Abstract— Demand of good quality fruits is increasing with the hardware system for automated and efficient fruit sorting and
rise in population. GDP of the many countries rely upon its grading based on image processing.
export. Major part of GDP of Pakistan depends on its fruit
export business. The present quality detection, sortation & II. LITERATURE REVIEW
dispensing systems have the downside of low yield, time
After harvesting of fruits, they are washed, sorted,
consumption, high cost and complication. The study purpose of
machine-controlled fruit sorting using image processing is to
graded, packed and stored. Out of all these stages, sorting
create higher quality fruit sorting, quality maintenance, and grading of fruit are very important steps. Sorting means
production and to cut back labor concentration. It is a separation based on a single measurable property of some
necessity for machine-controlled system that quick and quality material while grading is the assessment of the overall
feature detection as well as quick dispensing of fruits is carried quality of food using a number of characteristics. This
out. A comprehensive review of current work related to section reviews the related fundamentals and recent
automated sorting and grading of agricultural products is literature on this topic.
presented in this paper. We also propose a complete end to end
system of automated and efficient fruit sorting and grading A. Understanding Color Image processing by Machine
based on image processing. Effectiveness of the proposed Vision for Biological Materials
structure is demonstrated by the initial experimental results. Fruits after harvesting are washed properly. After that, they
Keywords—image processing, fruit sorting, fruit grading, are sorted so that the rotten fruits are taken off. Quality
machine vision evaluation of fruits is a very important consideration for
production of vegetables and fruits. A lot of research has
I. INTRODUCTION been conducted to make the process of sorting efficient and
The main aim of this study and project is to design and automatic. Sorting is a process which is done based on the
fabricate a fruit sorting and dispensing machine that is single measurable property of materials which are in raw
capable to effectively distinguish between a good quality and form. Grading is considered to be the evaluation of quality
a bad quality fruit. Planning a complete machine-controlled of food materials based upon certain attributes. Food
system is our main objective. We have designed the system products can be separated and sorted based upon certain
based on analysis of images of the fruit. Image processing attributes like their appearance, sizes and colors. At present
gives precise, accurate, reliable and quantitative data in most rural parts of Pakistan, fruits are sorted manually
regarding giant volume of fruits which can't be dispensed by which is a very time consuming process. Therefore we need
individuals [1]. With the development in the field of image a low cost, automatic and effective method that can sort the
processing, software code and hardware, it becomes enticing food products automatically based on machine vision. Image
to find the standard of object, by exploitation computer processing and machine vision have a wide ranges of
vision technology [1]. Our planned system collects image applications in many industries specially in the fruit
from camera and then applies certain image processing industries for evaluating the size, color and weight of the
techniques [2] to extract features like texture, color and size. food products. Mainly the food products are evaluated on
Decision outcome is then sent to the controller of Arduino
the basis of following parameters.
compatible with laptop. The controller is programmed with
• Color
Arduino where we can see the step by step results [3]. There
is a linear conveyor arrangement to position the item for • Homogeneity
sorting mechanism [4]. The major benefits of machine- • Size
controlled fruit sorting system is value effective, reliable, • External defects[5].
larger product stability, safety, speed and correct sorting B. An Apple Grading System in step with European Fruit
results that improve the standard of the merchandise and get Quality Standards exploitation Dennis Gabor Filter and
rid of inconsistent manual analysis and scale back Artificial Neural Networks
dependence on accessible ancient review [3][4]. The main
aim is to design an automatic fruit sorting system that In recent years, application of image processing and
improves the standard, enhances the production efficiency machine vision has increased in the fruit industries. By
and reduces labor cost of the method. using these techniques we can now grade the fruits more
easily. Apples can also be graded using their texture feature
In this paper, we present a comprehensive review of analysis with the help of artificial intelligence and image
present systems related to automated sorting and grading of processing. Golden delicious and red delicious are the two
agricultural products and we also propose a complete
kinds of apple that can be separated by using Gabor filter.
By using this kind of techniques mean and variance of the pixels. For removing background Gaussian Mixture Model
values of energy are collected which further present the is used and Support Vector Machine is used for the
intensity of the image and contrast of the image classification of different colors. At present fruits are mostly
respectively. Gabor filter are space frequency filters using sorted with the help of hand which is very slow process as it
which the local and global information can be presented. requires a lot of time and effort. Also the manual sorting
These types of filters are very useful for working on the techniques has very slow speed, complex and also very
quasi periodic signals which are actually the textures. By expensive. The present system for the removal of
using the texture features several parameters of the object in background is based on the histogram approach. It has one
an image can be measured like regularity of the object, its drawback that it sometimes also removes the pixels of fruits
smoothness and coarseness[6]. when it sees them as clusters. This defect can be removed
with the help of GMM which is actually pixel wise
C. Virtual critic for Apple Quality Assessment exploitation
classification method. Image processing gives us reliable,
Fruit Size and Illumination Features
consistent and accurate information about the large volumes
This study mainly focuses on the virtual grader which can of fruits which may not be achieved by employing human
be used for the assessment of apple quality using artificial beings. The hardware prototype can be created by using
intelligence and machine vision. The idea of the virtual MSP430 microcontroller which is a low power controller. It
grader was extracted in the shape of K Nearest Neighbor is very useful specially in the fruit industries for the
classifier which is basically based on the design of detection and grading of fruits[9].
Euclidean distance matric. K NN classifiers have very vast
ranges of applications because they are considered to be F. Automated Skin Defect Identification System for Fruit
very roubt especially in the noisy environment. While Grading Based on Discrete Curvelet Transform
measuring the fruit size with the help of that type of The main aim of carrying out this study is to develop the
technique the illumination of surface of fruit is one of the technique for the assessment of quality of the fruits by
most important parameters affecting the quality of results. considering their texture analysis on the basis of Curvelet
Therefore the performance of the system is evaluated taking Transform. These techniques have multiresolution approach
different values of the illumination of the surface of fruit. and they are capable for the assessment of surface of fruit
The system talked above can be successfully implemented both at high resolution and low resolution. CCD camera is
for the grading of the type of apple red delicious using size used for the acquisition of image of the fruit and lemon and
of fruit. It can be observed experimentally that K-NN guava were analyzed by experimentation.
classifier used achieves very good results[7]. Energy, standard deviation, entropy and mean are some
measures based on the textures that are used to sort texture
D. Automation of Object Sorting using an Industrial Rob
of the surface of fruits. Almost 96% accuracy is achieved
arm and MATLAB based Image processing
using SVM classification method. Texture features based on
In these recent years, automated techniques are used for curvelet gives fine insight to guess about damages in the
increase in the production in the industry, for increasing fruit skin[10].
accuracy, for elimination in the human error and for safety
purposes. With the development in the artificial intelligence,
machine vision can be used to make most of the processes in G. Design and Development of Object Recognition and
the industry related to production automatic. By using Sorting Robot for Material Handling in Packaging and
machine vision, they can be developed to perform the tasks Logistic Industries
equivalent to human beings. Human visions have some Color is that the most commonly used feature to tell
limitations like we are limited when we are detecting differences between objects, sorting, recognizing and
various shades of different colors or when we are pursuit. Typically automaton is mounted with a camera or
determining high precise dimensions. While in automated the camera is mounted within the space to notice the thing.
machine vision based systems identification of the parts of This technology is mainly applied in material handling in
the colors can be done more affectively. So the objects provision and packaging business where the objects moving
having different colors detected by the system can be sorted on a belt are separated by using a color detection automaton.
more affectively with the help of robotic arm which pick Robot has been developed with success and testing was
and places the object depending on its color. If the desired carried out using the dummy industrial setting developed
color is not found then that object is rejected by the robotic within the laboratory. The target is met by sorting the
arm. MATLAB is used in the complete mentioned system objects supported the color feature from a gaggle of objects.
for image processing which is interfaced with the A GUI in MATLAB was created to show the video of the
microcontrollers to run the different motors in the system. incoming object and displaying the color of the thing to the
Machine visions have vast ranges of applications in the user. The user must choose the COM Port initial. The
pharmaceuticals industry, agriculture industry and also in automaton got the signal regarding the position of the thing
automobile industry. This technology is far better than the within the space through the serial communication. Once the
manual sorting that was used initially[8]. color of the thing was known, the larva picks the thing and
automaton reaches the required location. Color detection
E. Enhanced Techniques for sorting and grading the Fruit
beside pattern recognition and Speech recognition can play
Quality using MSP430 Controller
an important role in several industries and also can increase
This study present detection of quality of fruits. Size and the accuracy of the task in supplying and packaging
color of fruits, are some features used for the detection of business.

2
The robot was successfully developed and texting was also
successfully done in the laboratory .the object was Object
successfully sorted between different objects on the basis of Arrival
color features. A GUI in MATLAB was successfully created
in order to display the video of the incoming object that is to
be sorted and its color is displayed to the user with the help
of that GUI. The developed Eye –Bot is able to detect the Image
color of the object is also able to place in the desired Acquisition
location. The color detection capability can also be extended
to blue and green[11].
H. Size Properties of Mangoes using Image Analysis
Image
This study mainly focuses on the development of the
Processing
algorithm to effectively detect, sort and grade the mangoes.
First the image is taken and then from those images different
features of the mangoes are extracted and then the mango
class is identified. The features which are extracted are area, Feature
percent defect and roundness. Either mango is export, local Extraction
or rejects the parameters that decide that thing are roundness
and percent defect. For segmentation, an optimal threshold
was used and for the determination of perimeter the tracing
of boundary was used. Image
The algorithm is capable to segment the mango correctly Classification
even we change its position. There is one limitation that it
cannot correctly identify the stem as it can be green or
brown. The pixel of the green stem was identified to be
healthy and pixels of the brown stem are identified as Dispensing
defective[12]. Mechanism
III. PROPOSED FRUIT SORTING AND GRADING SYSTEM
We have developed a complete hardware system that Fig. 1. Block diagram of the proposed system
involves a mechanical part as well as a camera based image C. Feature Extraction
processing part. These two processes are interconnected to
attain the ultimate goal of sorting of fruits so that when a Certain features are to be extracted to detect apple skin
rotten apple comes, it is taken away. The classification of features for identification of quality (e.g., the position and
fruits is carried out by conventional image processing nature of defect). Training data is collected and send to the
techniques using MATLAB. Dispensing part is completed classifier. Mainly three features are extracted that are as
on the conveyor belt arrangement with the assistance of following:
Arduino. Below mentioned Fig.1 is the block diagram of our
proposed model. An object (which in our case is apple) 1) Edge Features
comes on a conveyer belt where the image acquisition takes The edge features can be evaluated by applying different
place with the help of camera. The implemented feature kind of filters like sobel, canny and pewit edge detection
based classifier decides the maturity of fruits and the filters. Out of all these, we prefer sobel edge filter in our
decision is sent to Arduino that effects the separation of work as the visual results were better.
spoilt fruit using mechanical separators that act as
dispensing mechanism. 2) Color Features
The following steps are involved: For the determination of color features in our work, we use
HSV color space. Hue, Saturation, and Value (HSV) is a
A. Image Acquisition color model that is often used in graphics and paint
Image acquisition is done through a low cost camera that programs in place of the RGB color model. In using this
takes the pictures of fruit on conveyer belt from affixed color space, a color is specified and then white or black is
location. added to easily make color alterations.

3) Texture Features
B. Image Processing
To determine texture features we use entropy filter and
Image processing involves the application of various pre- standard deviation filter which gives us the texture analysis
processing steps to boost quality of the image. This is done of the picture. Entropy filter highlights edges by brightening
so that the image is clear and the fruit is easily segmented pixels which have dissimilar neighbors. It sets each pixel in
out. Binarization of the image is also carried out as certain the current image equal to the entropy (measure of disorder)
features are extracted in binary domain [13]. We then of the pixel values in its specified neighborhood, whereas
remove the noise from the picture with the help of median standard deviation filter performs standard deviation
filter as shown in figure 2. filtering and returns the filtered image. The value of each

3
output pixel is the standard deviation of the 3-by-3
neighborhood around the corresponding input pixel.
D. Classification
The extracted features help us in classification of the object
as good or bad. For classification, fusion of the three feature
map images is used. As discussed above, we take HSV
transform of the image and extract V component of the HSV
transform as V component gives us the max info about
variation in the color of the image to detect the rotten parts
as apple parts which are rotten show different color in the
image. We convert the V component to BW so that the
rotten parts are shown by white and remaining parts of the
image remain black. Then with the help of morphological
operation and applying connected components analysis we Fig. 2. Visual Demonstration of Experimental Results
extract the rotten parts of the image in the form of connected
components. V. CONCLUSION
The fused image, that is formed by logical AND of the three Automatic fruit sorting using image processing is a strong
feature images, is analysed to see if any larger areas exist. If and economical system as compared to the existing manual
there are unidentified large areas in the final binary image, sorting that is not economical and takes a lot of time and
then we assume it to be a rotten mark on the fruit. We took labour. The system accelerates the process and helps the
that decision by computing the area of white pixels in the fruit business. However, this classification will be more
resultant image. If area is zero mean there are no white robust if more features are added including circumference,
pixels in the image means no rotten parts. It means we select form and shape detection. Multiple cameras can also be
the apple as good and if there are white pixels in the image installed to enhance visibility from all angles at once. Our
means rotten parts then area will be non-zero so in that case aim is to further enhance this project and create a process
we decide that thee apple as bad. The fruits not satisfying primarily based on computer vision for fruit sorting. In later
the factors are discarded and can be dumbed. stage, we will add system to incorporate all kinds of fruits
E. Dispensing and vegetables. The system can further be enhanced in other
areas in addition to food and beverages like in
Once the classifier takes a decision, the decision is passed to
pharmaceutical, paints and cement industries.
the hardware mechanical unit. The operation of dispensing
is done through gate model (providing 2 ways on conveyor). REFERENCES
The management of gate model is done through Arduino. [1] A. Vibhute, “Application of Image Processing in Agriculture : A
Survey Applications of Image Processing in Agriculture : A Survey,”
IV. EXPERIMENTS & RESULTS no. May, 2014.
Fig. 2 depicts the results of the complete system. The GUI [2] A. Mishra, P. Asthana, and P. Khanna, “THE QUALITY
IDENTIFICATION OF FRUITS IN IMAGE PROCESSING USING
of the complete project is made in which step-wise results of MATLAB,” pp. 2319–2322, 2014.
all the intermediate images from very first input image to [3] M. Uesugi, F. Application, P. Data, P. E. E. Hoffman, and A. E. J.
last one resultant image are shown. The GUI gives a quick Rolla, “United States Patent ( 19 ),” no. 19, 1977.
overview of all the intermediate steps involved and is easy [4] S. Sheth, R. Kher, R. Shah, P. Dudhat, and P. Jani, “Automatic
Sorting System Using Machine vision.”
to use by the person operating the dispensing system. [5] A. H. A. Eissa and A. A. A. Khalik, “Understanding Color Image
Processing by Machine Vision for Biological Materials,” 1999.
[6] K. A. Vakilian and J. Massah, “AN APPLE GRADING SYSTEM
ACCORDING TO EUROPEAN FRUIT QUALITY STANDARDS
USING GABOR FILTER AND ARTIFICIAL NEURAL,” vol. 17,
no. 1, pp. 75–85, 2016.
[7] A. Pal, S. Chauhan, and A. P. Singh, “Virtual Grader for Apple
Quality Assessment,” vol. 14, no. 4, 2014.
[8] P. D. B. Rane, G. S. S, N. D. V, and S. J. U, “― Automation of
Object Sorting Using an Industrial Roboarm and MATLAB Based
Image Processing ‖,” vol. 5, no. 2, pp. 187–191, 2015.
[9] J. Ramprabhy and S. Nandhini, “Enhanced Technique for Shorting
and Grading the Fuit Quality Using MSP430 Controller,” Int. J. Adv.
Eng. Techology, vol. 7, no. 5, pp. 1483–1488, 2014.
[10] R. Thendral and A. Suhasini, “Automated skin defect identification
system for orange fruit grading based on genetic algorithm,” Curr.
Sci., vol. 112, no. 8, pp. 1704–1711, 2017.
[11] V. Devalla, “Design and Development of Object Recognition and
Sorting Robot for Material Handling in Packaging and Logistic
Industries,” Int. J. Sci. Adv. Technol., vol. 2, no. 9, pp. 30–35, 2012.
[12] T. U. G. Jr, “Size Properties of Mangoes using Image Analysis,” vol.
6, no. 2, pp. 31–42, 2014.
[13] K. Khurshid, I. Siddiqi, C. Faure, N. Vincent, Comparison of Niblack
inspired Binarization methods for ancient documents, 16th Document
Recognition and Retrieval Conference (DRR), January 2009, USA

4
5

View publication stats

You might also like