Fruit Counting and Maturity Detection Using
Fruit Counting and Maturity Detection Using
Fruit Counting and Maturity Detection Using
Abstract: In agriculture sector the problem of identification and which the input is an image, such as photographs or frames of
counting the number of fruits on trees plays an important role in video; the output is not necessarily an image, but can be for
crop estimation work. At present manual counting of fruits and instance a set of features of the image. Most image-processing
vegetables is carried out at many places. Manual counting has
many drawbacks as it is time consuming and requires plenty of techniques involve treating the image as a two dimensional
labors. The automated fruit counting approach can help crop signal and applying standard signal processing techniques to it.
management system by providing valuable information for A pixel, short for picture element, can be thought of as a tiny
forecasting yields or by planning harvesting schedule to attain dot containing information about the picture. When you snap a
more productivity. This work presents an automated and efficient picture, these tiny bits of information are gathered by the
fruit maturity detection and fruit counting system using Image camera's sensor. The information is being stored in a 3 plane of
Processing.
information. Each plane represents three colors that are red,
Keywords: Image Processing, Fruit classification, fruit maturity, green and yellow plane. Each plane has the intensity from 0 up
fruit size, color index, Maturity level. to 255 or 8-bit of information per plane. These three color
combination makes up all the color we could see in an RGB
1. Introduction images. Simple calculation of this are 8-bit information is as
Fruits play an important role in keeping the body healthy and follow: 2n = bit, 28 = 256
have numerous benefits. Aroma and taste of the fruit are The origin of this size started when the byte was introduced
determined by its maturity level. Owing to lack of storage back then in the origin of information capacity now have its
facilities in developing countries like India, huge quantity of standard.
fruits is wasted. Therefore, there should be a method to Many of the techniques of digital image processing, or digital
determine the maturity level of harvested crop. Fruit market is picture processing as it was often called, were developed in the
getting highly selective, requiring their suppliers to distribute 1960s at the Jet Propulsion Laboratory, MIT, Bell Labs,
the fruits of high standards of quality and presentation as well. University of Maryland, and a few other places, with
So there is a increasing need to supply quality fruits within a application to satellite imagery, wire photo standards
short period of time has given rise to the development of conversion, medical imaging, videophone, character
automated Grading of fruits to improve the quality. recognition, and photo enhancement. Digital processing is most
In India, this task is still performed by human labourers. But of the time preferable because of cost issue on top of falling
the manual method used for classifying the harvested crop is trend of digital devices.
very time consuming, painstaking and inefficient because B. Fruit maturity identification
human perceptions can be easily fooled. It is the need of the
RGb*, grayscale is used for find different between maturity
hour to use non-destructive maturity determination techniques
stages. The length and aspect ratio does not affect the ripeness
for making the agricultural operations more economical.
of fruits. Here the fruit Classified into three based on maturity
Various systems have been developed by the researchers but
they are unripe, ripe, and overripe. CNN algorithm can be used
due to low efficiency and high cost, it is not viable to
for classifying the fruit maturity.
implement these systems at industrial level. So it is very
The Mango fruit maturity detection is done using its external
crucial to analyse the advantages and disadvantages of
color. Special species mangos known as “Langdo” had the same
existing systems for further developing the efficient system.
color in its life span. In this case here x-ray, infrared are used
Colour, size and texture are key parameters for judging
and photos of mango taken using thermal camera.
maturity. Quantification of these visual properties can
Fruit Maturity Level Detection Framework:
significantly improve the agricultural management tasks.
Fruit Separation: Each fruit is separated from all fruits. We
A. Image processing can check the maturity of each separated fruit. Also, we can
Image processing is any form of information processing for detect the fruit type.
International Journal of Research in Engineering, Science and Management 810
Volume-2, Issue-2, February-2019
www.ijresm.com | ISSN (Online): 2581-5792
Preprocessing: In this phase, the separated fruit image will be “Izadora Binti Mustaffa”, et.al focuses on the identification
preprocessed with any one of the following scenarios based on of maturity of mango fruit. Raspberry Pi is a small computer,
the can accuracy, i.e, convert the input RGB images to which is powerful enough to run an image processing algorithm
grayscale ii. keep the input images in the RGB color space iii. is chosen for this system. The developed image processing
convert the input RGB images to the HSV color space iv. algorithm is able to determine the size of the fruit and apply the
convert the input RGB images to the HSV color space and to K-means clustering to determine the fruit color
grayscale and merge them. “S.Arivazhagan” et al describes computer vision strategies
The neural network is tested for each scenario. used to recognize a fruit rely on four basic features which
Feature Extraction: In preprocessing we can extract the characterize the object: intensity, color, shape and texture. This
features like, paper proposes an efficient fusion of color and texture features
1. Fruit Color for fruit recognition. The recognition is done by the minimum
2. Black Spot distance classifier based upon the statistical and co-occurrence
3. Black Linings features derived from the Wavelet transformed sub- bands.
4. Linings or patch patterns etc. Experimental results on a database of about 2635 fruits from 15
Detect Maturity Level: We can apply Machine learning different classes confirm the effectiveness of the proposed
algorithm i.e. CNN on the trained dataset to detect that whether approach.
the fruit is mature or not and also the fruit type. By using an “Pradeepkumar Choudhary”, et.al Fruits should be quickly
image processing we can easily recognize the fruit type and and correctly differentiated from their surroundings for the fruit
their maturity level. harvesting robot. Edge based and color based detection methods
Training and Testing Using CNN Algorithm: For the training are generally used to segment images of fruits obtained under
and testing the fruit maturity we use the different type of fruit natural lighting conditions. In this work, Digitized images of
data set. We use the kaggle dataset for training and testing from mango fruits along with its background were selected from the
following link, https://www.kaggle.com/moltean/fruits Internet in order to find a mango in each image and to locate its
CNN Algorithm: The CNN algorithm is used for data exact position. We compared the results of Edge based and
classification. Convolutional neural networks (CNN) are part of colored based segmentation results and found that color based
the deep learning models. Such a network can be composed of segmentation outperforms the edge based segmentation in all
convolutional layers, pooling layers, ReLU layers, fully aspects. The comparison results are shown in the segmented
connected layers and loss layers. In a typical CNN architecture, image results. Accordingly, a new mango detection method is
each convolutional layer is followed by a Recited Linear Unit proposed to position the centroid of mangoes.
(ReLU) layer, then a Pooling layer then one or more “AnujaBhargava” et al Presents a detailed overview of
convolutional layer and ally one or more fully connected layer. various methods i.e. preprocessing, segmentation, feature
A characteristic that sets apart the CNN from a regular neural extraction, classification which addressed fruits and vegetables
network is taking into account the structure of the images while quality based on color, texture, size, shape and defects. In this
processing them. Here we used the 80% of data set for the paper, a critical comparison of different algorithm proposed by
training purpose and remaining 20% dataset used for testing. researchers for quality inspection of fruits and vegetables has
been carried out.
2. Literature review “Harpuneet Kaur” et al sheds light on the advancements
“Anisha Syal”, et.al introduces minimum Euclidean distance made in the automated agricultural industry. Digital image
based segmentation technique for segmenting the fruit region processing techniques are now widely used for maturity
from the input image. Further circle overlaying is done on the estimation of fruits and vegetables. This work aimed to study
fruit region and in the last fruits is counted on the basis of the and analyze the various algorithms and feature extraction
centroid of the fruit regions. The system is correctly detecting techniques that are now used for extracting features from
and counting the apples on the test images. the captured digital images. Advantages and disadvantages of
“Bhushan P. Ragit,” et al describes processing based yield various classifiers have been discussed. It was observed that
counting system and health monitoring of citrus fruit is being for achieving high accuracy a compromise is to be made
processed. The model which is explained in the paper can be with high computational complexity
worked in any graphical area. The system consists of an “Shubham Tagad.”, et.al introduced an assisting application
automatic robot which revolves around. The axis of citrus tree for fruit maturity estimation. The specialty of this system is, it
and clicks various images from different angle. Then this can tell the number of remaining days for ripening of the fruit.
images are processed by image processing algorithm and color One of the three main modules, user will store his information
based counting of fruit is presented at the output. The system is in the system as well as he will click the image of the fruit for
being designed to automatically and accurately calculated the its maturity detection. Database will contain the training dataset
yield of citrus group tree and health monitoring is temperature of fruit. It will also store the user information. Server will pre-
and moisture of tree is also included in system. process the image given by user and compare its characteristics
International Journal of Research in Engineering, Science and Management 811
Volume-2, Issue-2, February-2019
www.ijresm.com | ISSN (Online): 2581-5792
with characteristics of fruit images stored in database. This identification and defect detection activities. The fruits were
system is easy and cost effective technique for maturity captured using digital camera either set up an image capturing
detection of fruit. Other fruit maturity detection techniques like system or shot directly. The pre-processing technique
use of infrared rays and chemical testing are harmful, it can standardizes the orientation and scale of the captured images.
damage the fruit. This system uses image processing to store The main methods found are,
the characteristics of fruit. Gaussian blur and sobel edge 1. RGB to gray conversion.
detection algorithm are used to acquire the characteristics of the 2. Binary conversion.
fruit. 3. Noise reduction.
“Mr. Sumit S. Telang”, et al This paper aims at presenting 4. Contrast stretching.
the concept of fruit quality management, In recent years 5. Histogram equalization.
automatic vision based technology has become more potential 6. Background elimination.
and more important to many areas including agricultural fields
and food industry. The desired system which determines the
quality of fruit by its color, size and weight. Sorting tons of
fruits manually is a time consuming, costly, and an inaccurate
process and to developed in order to increase the quality of food
products made from fruits. The sorting process depends on
capturing the image of the fruit and analyzing this image using
image processing techniques to discard defected fruits. Color is
Fig. 1. Flow diagram
most striking feature for identifying disease and maturity of the
fruit. The main emphasis is to do the quality check with a short 2) Feature extraction steps
span of time so that maximum number of fruits can be Feature extraction is an initialization from the measured data
scrutinized for quality in minimum amount of time. The and derived the features of the images. In here the different
absolute reference point is the way to perceives and interpret features extracted from the fruits. This section gives an idea of
the quality of fruit. The present assessment of fruit different features used for the operation. Mainly used features
quality requires new tools for size and color measurement are,
and capturing the fruit side view image, some fruit characters is 1. Shape.
extracted by using detecting algorithms. 2. Size.
“Izadora Binti Mustaffa”, et al describe that color and size 3. Texture.
are one of the most important features for accurate maturity 4. Color.
classification of fruits. Small business farmers use manual
evaluation through visual observation to classify the maturity 3) System Architecture
of their pick. Which according to FAMA there are six maturity The working of system is as follows, Fig. 2, show the
indexes? The repetitive process is tedious and is prone to human architecture of proposed system.
error. This paper focuses on the identification of maturity of
mango fruit. Raspberry Pi is a small computer, which is
powerful enough to run an image processing algorithm is
chosen for this system. The developed image processing
algorithm is able to determine the size of the fruit and apply the
K-means clustering to determine the fruit color.
3. Existing system
Image processing in agriculture is the major fast growing
research areas. The use of image processing in the food industry
mainly in fruit classification grading maturity identification and
detection. Fig. 2. Maturity detection framework
Image processing technique involves five steps: namely,
image acquisition, pre-processing, image segmentation, feature 4) Classification Methods
extraction and classification. 1. Fuzzy logic.
2. Support vector machine.
A. Flow Diagram of identification 3. Convolutional Neural Network (CNN) Algorithm.
1) Pre-processing steps 4. K-Nearest Neighbor
In all works considered for review, preprocessing has been
the essential first step of the for classification, grading, maturity
International Journal of Research in Engineering, Science and Management 812
Volume-2, Issue-2, February-2019
www.ijresm.com | ISSN (Online): 2581-5792
Conference on Wireless Communications & Signal Processing (WCSP),
Table 1
IEEE, 2016.
Classification accuracy comparison
[2] S. Arivazhagan, R.Newlin Shebiah, S.Selva Nidhyanandhan, L.Ganesan
Algorithm Accuracy Rank “Fruit Recognition using Color and Texture Features”, Journal of
GA-FNN [1] 84.8% 5 Emerging Trends in Computing and Information Sciences VOL. 1, NO.
PSO-FNN [4] 84.9% 4 2, Oct 2010.
ABC-FNN [5] 85.4% 3 [3] IzadoraBintiMustaffa, SyawalFikri Bin MohdKhairul, “Identification of
k- SVM [8] 88.2% 2 Fruit Size and Maturity Through Fruit Images Using OpenCVPython and
HPA-SLFN [3] 89.5% 1 Rasberry Pi”, International Conference on Robotics, Automation and
Sciences (ICORAS), IEEE, 2017.
[4] Pradeep kumar Choudhary, Rahul Khandekar, Aakash Borkar, Punit
B. Advantages Chotaliya “Image Processing Algorithm for Fruit Identification,”
1. To detect fruit maturity level. International Research Journal of Engineering and Technology (IRJET)
2. To detect fruit count using image processing Volume 4 Issue 3, March 2017.
[5] Bhushan P. Ragit, Arti V. Bhingare, Rushikesh T. Bankar, “An
technique. Intelligent Fruit Counting System”, International Journal of Innovative
3. To automated sort the mature fruits. Science and Modern Engineering (IJISME), 2015.
[6] Y. Song, C.A. Glasbey, G.W. Horgan, G. Polder, J.A. Dieleman,
C. Applications G.W.A.M. van der Heijden, “Automatic fruit recognition and counting
1. To sort the fruits by maturity level. from multiple images”, ELSEVIER, 2014.
[7] AnishaSyal, DivyaGarg, hanu Sharma, “Apple Fruit Detection and
2. Fruit counting using image processing. Counting Using Computer Vision Techniques”, International Conference
on Computational Intelligence and Computing Research, IEEE, 2014
4. Conclusion [8] Harpuneet Kaur and B. K. Sawhney, “A Brief Review On Maturity Level
Estimation of Fruits and Vegetables Using Image Processing
This work survey and analyzed that how fruit counting and Techniques,” in International Journal of Science, Environment and
fruit maturity detection is essential factor in agriculture sector. Technology, Vol. 6, No 6, 2017, 3407 – 3413.
[9] Reshma R and Sreekumar K. “A Literature Survey on Methodologies for
The Image processes sing technique used for fruit maturity Classification, Maturity Detection, Defect Identification and Grading of
detection on captured digital image of different fruits. Various Fruits” International Journal of Computer Applications (0975 – 8887)
algorithms and feature extraction techniques that are now used Volume 180, No.36, April 2018.
[10] Sumit S. Telang, S. M. Shirsath “Fruit Quality Management using Image
for extracting features from the captured digital images. Processing” International Conference on Ideas, Impact and Innovation in
Various classifiers have been discussed. Hence, the extension Mechanical Engineering (ICIIIME 2017).
of this work will review all above mentioned techniques and [11] Chandra Sekhar Nandi, Bipan Tudu, and Chiranjib Koley “An Automated
Machine Vision Based System for Fruit Sorting and Grading”. IEEE
methods we can conclude that there are number of ways by 2012.
which we can detect fruit maturity. [12] Panitnat Yimyam, Somkit Jaitrong, and Panmanas Sirisomboon,“Mango
Maturity Classification by using Physical Properties,” in International
References Conference in Agricultural Engineering, 2011.
[1] Siyuan Lu, Zhihai Lu, Preetha Phillips, Shuihua Wang, Jianguo Wu,
Yudong Zhang, “Fruit Classification by HPA- SLFN”, 8th International