SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395 -0056
Volume: 04 Issue: 03 | Mar -2017 www.irjet.net p-ISSN: 2395-0072
© 2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 2741
IMAGE PROCESSING ALGORITHM FOR FRUIT IDENTIFICATION
Pradeepkumar Choudhary1, Rahul Khandekar2, Aakash Borkar3 , Punit Chotaliya4
1,2,3,4 Student, Dept. of Electronics and Telecommunication Engineering,
K. J. Somaiya Institute of Engineering and Information Technology, Maharashtra, Mumbai.
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Fruits should be quickly and correctly
differentiated from their surroundings for the fruit
harvesting robot. Edge based and color based detection
methods are generally used to segment images of fruits
obtained under natural lighting conditions. In this work,
Digitized images of mango fruits along with its background
were selected from the Internet in order to find a mango in
each image and to locate its exact position. We compared
the results of Edge based and colored based segmentation
results and found that color based segmentation
outperforms the edge based segmentation in all aspects. The
comparison results are shown in the segmented image
results. Accordingly, a new mango detection method is
proposed to position the centroid of mangoes.
KeyWords: color based segmentation, edge based
segmentation, machine vision, clustering, OpenCV.
I. INTRODUCTION
In the last decades, researchers have interested in fruit
detection algorithms and applied many different computer
vision techniques. The overall aim of most of these studies
is robotic fruit harvesting [1]. But fresh fruit harvesting is
a sensitive operation. According to [2], cost of harvesting
by labors is very expensive and time consuming. In
addition, picking of fruits by hand is very tedious. To solve
these problems, human works can be replaced by
automatic robots. Automatic harvesting operations reduce
the harvesting costs [3]. For automatic fruit/vegetable
harvesting systems, it is extremely important to effectively
detect the object in outdoor conditions. There are
several problems on fruit detection in outdoor condition,
which can be classified into two groups: lighting and
occlusion. Overcoming these problems is very crucial for
the success of robotic harvesting. The first major task of a
harvesting robot is to recognize and localize the fruit on
the tree. This paper focuses on recognition of mango fruits
by using edge and color based segmentation methods and
we compare the results of both segmentation results. In
the next section the details of our proposed edge and color
based segmentation methods are presented. The results
and discussion is given in section III. Finally, in section IV,
conclusions of the proposed approach were presented.
II. DETECTION OF MANGO FRUIT ON
TREE:
A. Color based segmentation
Proposed Model:
Pre-processing input images:
In this step, we perform some necessary operators on the
captured image. The captured image of size m*n is
converted into square image of size 256*256 fig (a).
Image segmentation using K-means
clustering Algorithm:
The image segmentation means that the original image is
divided into desired number of parts. Its purpose is to
cluster the pixels which have the same features in image. It
is the first step of process. There are several methods for
this aim. Some of the works are based on the histogram or
clustering. In detection of fruit, it is purposed to separate
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395 -0056
Volume: 04 Issue: 03 | Mar -2017 www.irjet.net p-ISSN: 2395-0072
© 2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 2742
the fruits from background in the image. Here, the method
which has been preferred to use is 'k means clustering
algorithm’, K means clustering algorithm is superior from
the other clustering algorithm and is known as
unsupervised clustering algorithm [1]. With K-mean,we
obtained k different groups from data sets. The distances
between every groups are calculated. So, that the groups
have to be far away as much as possible from the groups
which are not similar, and the members of the particular
group are somewhat similar.
K means clustering algorithm requires iteration. For this
method, firstly, clustering centres are determined and the
data is clustered according to those centers. New
clustering centers are assigned to previous results. As
repetition of these processes is increased,result of the
algorithm is close to perfection. In the image processing, k
means clustering algorithm provides less number of color
sets for current colors of image fig(b).
Image Binarisation:
Segmented image is converted into binary image fig(c).
Image binarization is the process of converting rgb image
into the binary image. A binary image is a digital image
that has only two possible values for each pixel. Binary
images often arise in digital image processing as masks or
as the result of certain operations such as segmentation,
thresholding, and dithering x.
Morphological operations:
The Binary image is morphologically opened fig(d) using
opening function from OpenCV. A disc- shaped structural
element is used. Using this disc shaped structural element,
removal of small blobs takes place. Here the small regions
which do not belong to fruit can be eliminated by using
threshold value. If the number of pixels in this region less
than the threshold value, they can be deleted fig(e), thus
the unwanted region turns black after this operation. The
erosion is performed after removal of small objects. The
erosion makes the edges sharp fig(f).
Finding centroid of object:
After performing morphological operations, the center is
calculated as follows:
Xdistance = Xmax – Xmin
Ydistance = Ymax – Ymin
center point = [(Xmin + Xdistance/2), (Ymin +
Ydistance/2)].
After these values are calculated the geometric center of
estimated mango fruit was positioned as shown in fig (g).
(a) Original image (b) Segmented image
(c) Binary image (d) Opening operation
(e)Removal of small (f) Erosion operation
objects
(g)Mango position with center positions
Fig. 1. IMAGE SEGMENTATION ALGORITHM
IMPLEMENTATION
B. Edge Detection
The Canny edge detector is a popular method for finding
edges that begins by smoothing an image by convolving it
with a Gaussian of a given sigma value. Based on the
smoothed image, derivatives in both the x and y direction
are computed; these in turn are used to compute the
gradient magnitude of the image. Once the gradient
magnitude of the image has been computed, a process
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395 -0056
Volume: 04 Issue: 03 | Mar -2017 www.irjet.net p-ISSN: 2395-0072
© 2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 2743
called 'non-maximum suppression' is performed; in which
pixels are suppressed if they do not constitute a local
maximum.
The final step in the canny edge detector is the
hysteresis operator, in which pixels are marked as either
edge, non-edges and in-between, this is done based on
threshold values. The next step is to consider each of the
pixels that are in-between, if they are connected to edge
pixels these are marked as edge pixels as well. The result
of this edge detector is a binary image in which the white
pixels closely approximate the true edges of the original
image. The input image (fig 1.a) and edge detected images
is shown in fig 2.
Fig 2. Canny Edge Detector Result
III. RESULTS AND DISCUSSION
The main idea was to develop a general algorithm under
various natural lighting conditions. Thereby, no
supplemental lighting source was used to control the
luminance. Since the images were acquired under
uncontrolled natural daylight conditions, they included
tree canopies including tree branches, leaves, fruits, sky,
etc. Each object of the image has its own edges, making
image sets of edges of which the mango is just a subset. So,
an edge detection algorithm was not successful (Fig. 1).
Color based algorithm detect the fruit regions in the
images better; however, it was more complicated than the
edge detection. It can be safely concluded that this method
can achieve reliable and accurate results. The accuracy of
the color based algorithm was 85%.Figure 7 shows the
comparative analysis of proposed edge and color based
segmentation.
IV. CONCLUSION
In this paper, the segmentation method based on color
segmentation accurately detects the fruit regions in the
image. It outperforms the results of edge based
segmentation. So, edge detection based method was not as
reliable as color based segmentation; color based
algorithm was able to detect mangoes with 85-90%
accuracy.
In color based algorithm, Clustering method has
been applied on the images because of sharp differences
between background. But it couldn’t be achieved for all the
images. There are some reasons which have had influence
on analysis. Especially illumination conditions cause this
situation. Also, there can be observed false detection. Not
only the fruits but also background objects seem to be
different color tones because of sunlight. Therefore, it can
be detected as a fruit, even if there isn’t any fruit.
Occlusion is another problem which prevent sufficient
analysis. In image processing detection fruit is a difficult
problem. In this work, better results were obtained than
other works in the literature.
REFERENCES
[1] Bengi OZTURK, Murvet KIRCI, Ece Olcay GUNES, "On
Detection of Green and Orange Color Fruits in Outdoor
Conditions for Robotic Applications".
[2] Y. Sarig, "Mechanized fruit harvesting-Site Specific Solutions,"
Information and Technology for Sustainable Fruit and Vegetable
Production, FRUTIC vol. OS, pp. 237-247,2005.
[3] R. Thendral, A. Suhasini, and N. Senthil, "A Comparative
Analysis of Edge and Color Based Segmentation for Orange Fruit
Recognition" International Conference on Communication and
Signal Processing,2014.

More Related Content

What's hot (19)

PDF
Performance and analysis of improved unsharp masking algorithm for image
IAEME Publication
 
PDF
A Novel Approach To Detection and Evaluation of Resampled Tampered Images
CSCJournals
 
PDF
Analysis of Image Fusion Techniques for fingerprint Palmprint Multimodal Biom...
IJERA Editor
 
PDF
Improved Weighted Least Square Filter Based Pan Sharpening using Fuzzy Logic
IRJET Journal
 
PDF
A New Approach of Iris Detection and Recognition
IJECEIAES
 
PDF
I04302068075
ijceronline
 
PDF
Enhanced Thinning Based Finger Print Recognition
IJCI JOURNAL
 
PDF
Foliage Measurement Using Image Processing Techniques
IJTET Journal
 
PDF
EV-SIFT - An Extended Scale Invariant Face Recognition for Plastic Surgery Fa...
IJECEIAES
 
PDF
IRJET- A Review on Face Detection and Expression Recognition
IRJET Journal
 
PDF
Fast Segmentation of Sub-cellular Organelles
CSCJournals
 
PDF
IRJET- A Plant Identification and Recommendation System
IRJET Journal
 
PDF
A survey on human face recognition invariant to illumination
IAEME Publication
 
PDF
Face recognition using gaussian mixture model & artificial neural network
eSAT Journals
 
PDF
1834 1840
Editor IJARCET
 
PDF
IRJET - Effective Workflow for High-Performance Recognition of Fruits using M...
IRJET Journal
 
PDF
PERFORMANCE ANALYSIS USING SINGLE SEEDED REGION GROWING ALGORITHM
AM Publications
 
PDF
Development of stereo matching algorithm based on sum of absolute RGB color d...
IJECEIAES
 
Performance and analysis of improved unsharp masking algorithm for image
IAEME Publication
 
A Novel Approach To Detection and Evaluation of Resampled Tampered Images
CSCJournals
 
Analysis of Image Fusion Techniques for fingerprint Palmprint Multimodal Biom...
IJERA Editor
 
Improved Weighted Least Square Filter Based Pan Sharpening using Fuzzy Logic
IRJET Journal
 
A New Approach of Iris Detection and Recognition
IJECEIAES
 
I04302068075
ijceronline
 
Enhanced Thinning Based Finger Print Recognition
IJCI JOURNAL
 
Foliage Measurement Using Image Processing Techniques
IJTET Journal
 
EV-SIFT - An Extended Scale Invariant Face Recognition for Plastic Surgery Fa...
IJECEIAES
 
IRJET- A Review on Face Detection and Expression Recognition
IRJET Journal
 
Fast Segmentation of Sub-cellular Organelles
CSCJournals
 
IRJET- A Plant Identification and Recommendation System
IRJET Journal
 
A survey on human face recognition invariant to illumination
IAEME Publication
 
Face recognition using gaussian mixture model & artificial neural network
eSAT Journals
 
1834 1840
Editor IJARCET
 
IRJET - Effective Workflow for High-Performance Recognition of Fruits using M...
IRJET Journal
 
PERFORMANCE ANALYSIS USING SINGLE SEEDED REGION GROWING ALGORITHM
AM Publications
 
Development of stereo matching algorithm based on sum of absolute RGB color d...
IJECEIAES
 

Similar to Image Processing Algorithm for Fruit Identification (20)

PDF
IRJET - Facial Recognition based Attendance System with LBPH
IRJET Journal
 
PDF
IRJET- Analysis of Plant Diseases using Image Processing Method
IRJET Journal
 
PDF
IRJET - Plant Leaf Disease Detection using Image Processing
IRJET Journal
 
PDF
The quality identification of fruits in image processing using matlab
eSAT Publishing House
 
PDF
IRJET- Image Segmentation Techniques: A Review
IRJET Journal
 
PDF
IRJET- Fake Paper Currency Recognition
IRJET Journal
 
PDF
Image fusion using nsct denoising and target extraction for visual surveillance
eSAT Publishing House
 
PDF
IRJET- IoT Based Crop Growth Detection and Irrigation System using Raspberry PI
IRJET Journal
 
PDF
IRJET- IoT Based Crop Growth Detection and Irrigation System using Raspbe...
IRJET Journal
 
PDF
IRJET- Crowd Density Estimation using Image Processing
IRJET Journal
 
PDF
Real Time Implementation of Ede Detection Technique for Angiogram Images on FPGA
IRJET Journal
 
PDF
IRJET- Digiyathra
IRJET Journal
 
PDF
IRJET- Face Counter using Matlab
IRJET Journal
 
PDF
IRJET- Detection of Cataract by Statistical Features and Classification
IRJET Journal
 
PDF
Survey on Various Image Denoising Techniques
IRJET Journal
 
PDF
IRJET- Nail based Disease Analysis at Earlier Stage using Median Filter in Im...
IRJET Journal
 
PDF
IRJET- Nail based Disease Analysis at Earlier Stage using Median Filter i...
IRJET Journal
 
PDF
IRJET - Human Eye Pupil Detection Technique using Center of Gravity Method
IRJET Journal
 
PDF
Introduction To Palmprint Recognition
IRJET Journal
 
PDF
IRJET- A Review on Plant Disease Detection using Image Processing
IRJET Journal
 
IRJET - Facial Recognition based Attendance System with LBPH
IRJET Journal
 
IRJET- Analysis of Plant Diseases using Image Processing Method
IRJET Journal
 
IRJET - Plant Leaf Disease Detection using Image Processing
IRJET Journal
 
The quality identification of fruits in image processing using matlab
eSAT Publishing House
 
IRJET- Image Segmentation Techniques: A Review
IRJET Journal
 
IRJET- Fake Paper Currency Recognition
IRJET Journal
 
Image fusion using nsct denoising and target extraction for visual surveillance
eSAT Publishing House
 
IRJET- IoT Based Crop Growth Detection and Irrigation System using Raspberry PI
IRJET Journal
 
IRJET- IoT Based Crop Growth Detection and Irrigation System using Raspbe...
IRJET Journal
 
IRJET- Crowd Density Estimation using Image Processing
IRJET Journal
 
Real Time Implementation of Ede Detection Technique for Angiogram Images on FPGA
IRJET Journal
 
IRJET- Digiyathra
IRJET Journal
 
IRJET- Face Counter using Matlab
IRJET Journal
 
IRJET- Detection of Cataract by Statistical Features and Classification
IRJET Journal
 
Survey on Various Image Denoising Techniques
IRJET Journal
 
IRJET- Nail based Disease Analysis at Earlier Stage using Median Filter in Im...
IRJET Journal
 
IRJET- Nail based Disease Analysis at Earlier Stage using Median Filter i...
IRJET Journal
 
IRJET - Human Eye Pupil Detection Technique using Center of Gravity Method
IRJET Journal
 
Introduction To Palmprint Recognition
IRJET Journal
 
IRJET- A Review on Plant Disease Detection using Image Processing
IRJET Journal
 
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
IRJET Journal
 
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
IRJET Journal
 
PDF
Kiona – A Smart Society Automation Project
IRJET Journal
 
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
IRJET Journal
 
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
IRJET Journal
 
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
IRJET Journal
 
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
IRJET Journal
 
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
IRJET Journal
 
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
IRJET Journal
 
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
IRJET Journal
 
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
IRJET Journal
 
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
IRJET Journal
 
PDF
Breast Cancer Detection using Computer Vision
IRJET Journal
 
PDF
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
PDF
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
IRJET Journal
 
PDF
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
PDF
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
IRJET Journal
 
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
IRJET Journal
 
Kiona – A Smart Society Automation Project
IRJET Journal
 
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
IRJET Journal
 
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
IRJET Journal
 
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
IRJET Journal
 
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
IRJET Journal
 
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
IRJET Journal
 
BRAIN TUMOUR DETECTION AND CLASSIFICATION
IRJET Journal
 
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
IRJET Journal
 
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
IRJET Journal
 
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
IRJET Journal
 
Breast Cancer Detection using Computer Vision
IRJET Journal
 
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
IRJET Journal
 
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Ad

Recently uploaded (20)

PDF
POWER PLANT ENGINEERING (R17A0326).pdf..
haneefachosa123
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PPTX
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
PDF
monopile foundation seminar topic for civil engineering students
Ahina5
 
PDF
MOBILE AND WEB BASED REMOTE BUSINESS MONITORING SYSTEM
ijait
 
PPTX
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
PPTX
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PDF
BioSensors glucose monitoring, cholestrol
nabeehasahar1
 
PPTX
NEUROMOROPHIC nu iajwojeieheueueueu.pptx
knkoodalingam39
 
PDF
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PDF
Book.pdf01_Intro.ppt algorithm for preperation stu used
archu26
 
PPT
Oxygen Co2 Transport in the Lungs(Exchange og gases)
SUNDERLINSHIBUD
 
PDF
PRIZ Academy - Change Flow Thinking Master Change with Confidence.pdf
PRIZ Guru
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PDF
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
PPTX
Benefits_^0_Challigi😙🏡💐8fenges[1].pptx
akghostmaker
 
PPTX
drones for disaster prevention response.pptx
NawrasShatnawi1
 
POWER PLANT ENGINEERING (R17A0326).pdf..
haneefachosa123
 
Thermal runway and thermal stability.pptx
godow93766
 
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
monopile foundation seminar topic for civil engineering students
Ahina5
 
MOBILE AND WEB BASED REMOTE BUSINESS MONITORING SYSTEM
ijait
 
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
BioSensors glucose monitoring, cholestrol
nabeehasahar1
 
NEUROMOROPHIC nu iajwojeieheueueueu.pptx
knkoodalingam39
 
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
Book.pdf01_Intro.ppt algorithm for preperation stu used
archu26
 
Oxygen Co2 Transport in the Lungs(Exchange og gases)
SUNDERLINSHIBUD
 
PRIZ Academy - Change Flow Thinking Master Change with Confidence.pdf
PRIZ Guru
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
Benefits_^0_Challigi😙🏡💐8fenges[1].pptx
akghostmaker
 
drones for disaster prevention response.pptx
NawrasShatnawi1
 

Image Processing Algorithm for Fruit Identification

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395 -0056 Volume: 04 Issue: 03 | Mar -2017 www.irjet.net p-ISSN: 2395-0072 © 2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 2741 IMAGE PROCESSING ALGORITHM FOR FRUIT IDENTIFICATION Pradeepkumar Choudhary1, Rahul Khandekar2, Aakash Borkar3 , Punit Chotaliya4 1,2,3,4 Student, Dept. of Electronics and Telecommunication Engineering, K. J. Somaiya Institute of Engineering and Information Technology, Maharashtra, Mumbai. ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - Fruits should be quickly and correctly differentiated from their surroundings for the fruit harvesting robot. Edge based and color based detection methods are generally used to segment images of fruits obtained under natural lighting conditions. In this work, Digitized images of mango fruits along with its background were selected from the Internet in order to find a mango in each image and to locate its exact position. We compared the results of Edge based and colored based segmentation results and found that color based segmentation outperforms the edge based segmentation in all aspects. The comparison results are shown in the segmented image results. Accordingly, a new mango detection method is proposed to position the centroid of mangoes. KeyWords: color based segmentation, edge based segmentation, machine vision, clustering, OpenCV. I. INTRODUCTION In the last decades, researchers have interested in fruit detection algorithms and applied many different computer vision techniques. The overall aim of most of these studies is robotic fruit harvesting [1]. But fresh fruit harvesting is a sensitive operation. According to [2], cost of harvesting by labors is very expensive and time consuming. In addition, picking of fruits by hand is very tedious. To solve these problems, human works can be replaced by automatic robots. Automatic harvesting operations reduce the harvesting costs [3]. For automatic fruit/vegetable harvesting systems, it is extremely important to effectively detect the object in outdoor conditions. There are several problems on fruit detection in outdoor condition, which can be classified into two groups: lighting and occlusion. Overcoming these problems is very crucial for the success of robotic harvesting. The first major task of a harvesting robot is to recognize and localize the fruit on the tree. This paper focuses on recognition of mango fruits by using edge and color based segmentation methods and we compare the results of both segmentation results. In the next section the details of our proposed edge and color based segmentation methods are presented. The results and discussion is given in section III. Finally, in section IV, conclusions of the proposed approach were presented. II. DETECTION OF MANGO FRUIT ON TREE: A. Color based segmentation Proposed Model: Pre-processing input images: In this step, we perform some necessary operators on the captured image. The captured image of size m*n is converted into square image of size 256*256 fig (a). Image segmentation using K-means clustering Algorithm: The image segmentation means that the original image is divided into desired number of parts. Its purpose is to cluster the pixels which have the same features in image. It is the first step of process. There are several methods for this aim. Some of the works are based on the histogram or clustering. In detection of fruit, it is purposed to separate
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395 -0056 Volume: 04 Issue: 03 | Mar -2017 www.irjet.net p-ISSN: 2395-0072 © 2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 2742 the fruits from background in the image. Here, the method which has been preferred to use is 'k means clustering algorithm’, K means clustering algorithm is superior from the other clustering algorithm and is known as unsupervised clustering algorithm [1]. With K-mean,we obtained k different groups from data sets. The distances between every groups are calculated. So, that the groups have to be far away as much as possible from the groups which are not similar, and the members of the particular group are somewhat similar. K means clustering algorithm requires iteration. For this method, firstly, clustering centres are determined and the data is clustered according to those centers. New clustering centers are assigned to previous results. As repetition of these processes is increased,result of the algorithm is close to perfection. In the image processing, k means clustering algorithm provides less number of color sets for current colors of image fig(b). Image Binarisation: Segmented image is converted into binary image fig(c). Image binarization is the process of converting rgb image into the binary image. A binary image is a digital image that has only two possible values for each pixel. Binary images often arise in digital image processing as masks or as the result of certain operations such as segmentation, thresholding, and dithering x. Morphological operations: The Binary image is morphologically opened fig(d) using opening function from OpenCV. A disc- shaped structural element is used. Using this disc shaped structural element, removal of small blobs takes place. Here the small regions which do not belong to fruit can be eliminated by using threshold value. If the number of pixels in this region less than the threshold value, they can be deleted fig(e), thus the unwanted region turns black after this operation. The erosion is performed after removal of small objects. The erosion makes the edges sharp fig(f). Finding centroid of object: After performing morphological operations, the center is calculated as follows: Xdistance = Xmax – Xmin Ydistance = Ymax – Ymin center point = [(Xmin + Xdistance/2), (Ymin + Ydistance/2)]. After these values are calculated the geometric center of estimated mango fruit was positioned as shown in fig (g). (a) Original image (b) Segmented image (c) Binary image (d) Opening operation (e)Removal of small (f) Erosion operation objects (g)Mango position with center positions Fig. 1. IMAGE SEGMENTATION ALGORITHM IMPLEMENTATION B. Edge Detection The Canny edge detector is a popular method for finding edges that begins by smoothing an image by convolving it with a Gaussian of a given sigma value. Based on the smoothed image, derivatives in both the x and y direction are computed; these in turn are used to compute the gradient magnitude of the image. Once the gradient magnitude of the image has been computed, a process
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395 -0056 Volume: 04 Issue: 03 | Mar -2017 www.irjet.net p-ISSN: 2395-0072 © 2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 2743 called 'non-maximum suppression' is performed; in which pixels are suppressed if they do not constitute a local maximum. The final step in the canny edge detector is the hysteresis operator, in which pixels are marked as either edge, non-edges and in-between, this is done based on threshold values. The next step is to consider each of the pixels that are in-between, if they are connected to edge pixels these are marked as edge pixels as well. The result of this edge detector is a binary image in which the white pixels closely approximate the true edges of the original image. The input image (fig 1.a) and edge detected images is shown in fig 2. Fig 2. Canny Edge Detector Result III. RESULTS AND DISCUSSION The main idea was to develop a general algorithm under various natural lighting conditions. Thereby, no supplemental lighting source was used to control the luminance. Since the images were acquired under uncontrolled natural daylight conditions, they included tree canopies including tree branches, leaves, fruits, sky, etc. Each object of the image has its own edges, making image sets of edges of which the mango is just a subset. So, an edge detection algorithm was not successful (Fig. 1). Color based algorithm detect the fruit regions in the images better; however, it was more complicated than the edge detection. It can be safely concluded that this method can achieve reliable and accurate results. The accuracy of the color based algorithm was 85%.Figure 7 shows the comparative analysis of proposed edge and color based segmentation. IV. CONCLUSION In this paper, the segmentation method based on color segmentation accurately detects the fruit regions in the image. It outperforms the results of edge based segmentation. So, edge detection based method was not as reliable as color based segmentation; color based algorithm was able to detect mangoes with 85-90% accuracy. In color based algorithm, Clustering method has been applied on the images because of sharp differences between background. But it couldn’t be achieved for all the images. There are some reasons which have had influence on analysis. Especially illumination conditions cause this situation. Also, there can be observed false detection. Not only the fruits but also background objects seem to be different color tones because of sunlight. Therefore, it can be detected as a fruit, even if there isn’t any fruit. Occlusion is another problem which prevent sufficient analysis. In image processing detection fruit is a difficult problem. In this work, better results were obtained than other works in the literature. REFERENCES [1] Bengi OZTURK, Murvet KIRCI, Ece Olcay GUNES, "On Detection of Green and Orange Color Fruits in Outdoor Conditions for Robotic Applications". [2] Y. Sarig, "Mechanized fruit harvesting-Site Specific Solutions," Information and Technology for Sustainable Fruit and Vegetable Production, FRUTIC vol. OS, pp. 237-247,2005. [3] R. Thendral, A. Suhasini, and N. Senthil, "A Comparative Analysis of Edge and Color Based Segmentation for Orange Fruit Recognition" International Conference on Communication and Signal Processing,2014.