You are on page 1of 7

Automatic Classification of Mango Using

Statistical Feature and SVM

Santi Kumari Behera, Shrabani Sangita, Amiya Kumar Rath


and Prabira Kumar Sethy

Abstract Natural fruit like mango contributes a major part of national growth. Due
to flavor, nutrition, and taste, mango is one of the popular fruits. There are around
283 types of mangoes present in India only, from that 30 types of mangoes are well
known. Human vision sometimes leads to mismatch between the varieties of mango
fruit. Using machine vision technique, it helps to reduce human effort and achieve
a better result. The aim of this paper is to extract the features of mango fruit with
GLCM (Gray-Level Co-Occurrence Matrix) and classify the variety of mango fruits
by multiclass Support Vector Machine (SVM) with K-means clustering.

Keywords Image processing · SVM · GLCM · K-means

1 Introduction

The king of fruit, mango, is a tropical fruit which is consumed worldwide. As mango
is a seasonal fruit, it is collected from the tree on that season and transported to
different locations. According to 2010, FAO India is the world’s largest producer
in many fresh fruits. India produces 50% of the total world’s mango producing
countries. Among the 30 well-known mangoes of India, we take top 10 mangoes for
our project. The top 10 varieties of mangoes are Suvernarekha, Alphonsos (Happus),
Dasheri, Kesar, Neelam, Langra, Raspuri, Himsagar, Banganapalli, Amrapali.

S. K. Behera (B) · S. Sangita · A. K. Rath


Department of Computer Science and Engineering, VSSUT, Burla, Odisha, India
e-mail: b.santibehera@gmail.com
S. Sangita
e-mail: sangitashrabani@gmail.com
A. K. Rath
e-mail: amiyaamiya@rediffmail.com
P. K. Sethy (B)
Department of Electronics, Sambalpur University, Sambalpur, Odisha, India
e-mail: prabirasethy@suniv.ac.in
© Springer Nature Singapore Pte Ltd. 2019 469
U. Biswas et al. (eds.), Advances in Computer, Communication and Control, Lecture
Notes in Networks and Systems 41, https://doi.org/10.1007/978-981-13-3122-0_47
470 S. K. Behera et al.

As there are many varieties of mangoes present and some mangoes have nearly
same gesture, sometimes it is difficult to identify the particular kind of mango. Due
to this problem, many people face problem at the time of identification. For solving
this problem, we introduce an approach to classify a different kind of mango fruit.
Here we use the single view of mango image, i.e., one side of the mango image
is captured. First, we use the K-Mean clustering for separate the background of the
image. Here we use GLCM (Gray-Level Co-occurrence Matrix) method, which helps
to evaluate 13 parameters based on which we classify the kind of mango fruit. These
13 features are extracted and trained to SVM (Support Vector Machine). So that the
SVM matches the feature of the trained feature and the feature of the test sample and
classify accordingly.

2 Literature and Review

In the past, many research works have been carried for detecting, classify, and quan-
tify the quality of fruits. Most of the research work is done for grading of fruits. In this
paper [1], the author presents the MADM technique and SVM technique for classify-
ing the fruit as its shape, size, and color. Here, the main purpose of the classification
is for packaging of fruit for transportation [2]. Here, the author presents K-means
clustering for disease detection. It is helpful for grading purpose [3]. Here, the author
classifies the mango fruit as disease and disease-free. Here he uses the feature extrac-
tion method, and classifies the mango fruit by the neural network [4], and classifies
the citrus fruit using image processing and GLCM. This process helps to identify the
citrus fruit. In image processing technique, the color analysis is very important and
is helpful for segmentation [5–7]. Many types of color models like RGB, L*a*b*,
CMYK, HSV, YCbCr are present. Many research works have been carried for detect-
ing, localizing, and countingtree fruit [8–10] by implementing KNN, SVM, ANN,
and texture analysis. It is easily detected fruit but sometimes the problem occurs due
to overlapping, shape, or color [11]. Here the author describes how to estimate the
sweetness of mango using HSB color space.

3 Materials and Method

In this work, we classify a different kind of mango fruit images using image pro-
cessing and SVM. First, we use the k-mean clustering to remove the background of
the image and detect the fruit, from the segmented image we extracted the features
using GLCM, and then by the help of SVM, we classify a different kind of mango
fruit.
Automatic Classification of Mango Using Statistical Feature … 471

Fig. 1 Frame work of


different kind of mango fruit
classification

3.1 Classification of Kind of Fruits

Proposed Algorithm for the above framework (Fig. 1).


Step 1: Input an Image.
Step 2: Contrast Enhancement of image.
Step 3: Transfer the image from RGB color space to L*a*b* color space.
Step 4: Use the k-mean to detect the fruit.
Step 5: Extract the feature from the segmented image.
Step 6: Classify a different kind of mango fruit with the help of multiclass SVM.

3.1.1 Kind of Mango Fruits

In this project, we mainly focused on 10 kinds of mango fruits. We collected these


pictures from Internet. The sample images are shown in Fig. 2.

3.1.2 Preprocessing

Image preprocessing may be a prophase relative to feature extraction and image


reorganization. The image that has input is often not satisfactory in spite of what
image aquation devices are adapted. Here preprocessing part consist of two-steps:
image improvement and color transformation, i.e., L*a*b. Image improvement is
one among the foremost fascinating and vital problems in image processing field.
The main purpose of image improvement is to extract the details that are within
a picture. Image improvement process returns an image, i.e., subjectively better
appearance than the input image by changing the pixel intensity. We use L*a*b*
472 S. K. Behera et al.

Fig. 2 Different types of mango a Amrapali, b Baganapalli, c Kesar, d Neelum, e Happus, f Langra
g Dusheri, h Himsagar, i Suvernarekha, j Raspuri

color space because the color information in the L*a*b* color space is stored in only
two channels (i.e., a* and b* component),

3.1.3 Segmentation

Image segmentation is the classification of an image into different groups. K-means


clustering algorithm is an unsupervised algorithm and it is used to segment the
interest area from the background. Here we have taken the number of clusters,
K  3 to separate background, foreground, and the affected area (Fig. 3).

3.1.4 Feature Extraction

It involves simplifying the quantity of resources needed to explain a large set of data
accurately. When performing analysis of complex data, the main drawback is the
requirement of a large amount of memory and computational power for classification.
The classification algorithm is over fits trained sample but generalizes poor to a
new sample. Thirteen number of textures are extracted from GLCM, i.e., contrast,
correlation, energy, homogeneity, mean, standard deviation, entropy, RMS, variance,
smoothness, kurtosis, skewness, IDM.
Automatic Classification of Mango Using Statistical Feature … 473

Fig. 3 Flow chart for


k-means clustering

3.1.5 Classification

Support vector machines are supervised learning models with an associated learning
algorithm that analyzes data used for classification. Given a set of training example,
each marked as belonging to one or the other of two categories, module an SVM
training algorithm builds a model that assigns new example to one category or the
other, making it a non-probabilistic binary linear classifier. Multiclass SVM classifies
different types of mangoes by considering the features of the trained image and test
sample image.

4 Result and Discussion

In the proposed algorithm, first of all, the feature extraction process has occurred.
During this process, 13 number of features have been extracted. By considering those
features we can classify the kind of mangoes. We have experimented 30 number of
mango fruits and out of 30 number, only three of them are misidentified by the
proposed algorithm. Here we take “T” for the correct value and “F” for the wrong
value. The observation is shown in Table 1.

5 Conclusion and Future Scope

In this paper, we successfully classify the different kinds of mangoes with 90%
accuracy. This research can be extended to increase the accuracy using soft computing
technique and validate with more number of sample.
474 S. K. Behera et al.

Table 1 Classification of mango fruit


Sl. no. Detect fruit name Detect fruit name by Identification
algorithm
1 Langra mango Langra mango T
2 Langra mango Langra mango T
3 Langra mango Langra mango T
4 Baganapalli mango Baiganpalii mango T
5 Baiganpalli mango Neelum mango F
6 Baganapalli mango Baganapalli mango T
7 Happus mango Happus mango T
8 Happus mango Happus mango T
9 Happus mango Happus mango T
10 Raspuri mango Raspuri mango T
11 Raspuri mango Raspuri mango T
12 Raspuri mango Suvernarekha mango F
13 Suvernarekha mango Suvernarekha mango T
14 Suvernarekha mango Suvernarekha mango T
15 Suvernarekha mango Suvernarekha mango T
16 Himsagar mango Himsagar mango T
17 Himsagar mango Neelum mango F
18 Himsagar mango Himsagar mango T
19 Kesar mango Kesar mango T
20 Kesar mango Kesar mango T
21 Kesar mango Kesar mango T
22 Dusheri mango Dusheri mango T
23 Dusheri mango Dusheri mango T
24 Dusheri mango Dusheri mango T
25 Neelum mango Neelum mango T
26 Neelum mango Neelum mango T
27 Neelum mango Neelum mango T
28 Amrapali mango Amrapali mango T
29 Amrapali mango Amrapali mango T
30 Amrapali mango Amrapali mango T
Automatic Classification of Mango Using Statistical Feature … 475

References

1. Nandi, C.S., Tudu, B., Koley, C.: A machine vision technique for grading of harvested mangoes
based on maturity and quality. IEEE Sensors J. 16(16), 6387–6396 (2016)
2. Pham, V.H., Lee, B.R.: An image segmentation approach for fruit defect detection using k-
means clustering and graph-based algorithm. Vietnam J. Comput. Sci. 2(1), 25–33 (2015)
3. Ashok, V., Vinod, D.S.: A comparative study of feature extraction methods in defect classifica-
tion of mangoes using neural network. In: 2016 Second International Conference on Cognitive
Computing and Information Processing (CCIP), IEEE (2016)
4. Kumar, C., Chauhan, S., Narmadha Alla, R.: Classifications of citrus fruit using image
processing-GLCM parameters. In: 2015 International Conference on Communications and
Signal Processing (ICCSP), IEEE (2015)
5. Mustafa, N.B.A. et al.: Classification of fruits using probabilistic neural networks-improvement
using color features. In: TENCON 2011–2011 IEEE Region 10 Conference. IEEE (2011)
6. Mendoza, F., Dejmek, P., Aguilera, J.M.: Calibrated color measurements of agricultural foods
using image analysis. Postharvest Biol. Technol. 41(3), 285–295 (2006)
7. Yam, K.L., Papadakis, S.E.: A simple digital imaging method for measuring and analyzing
color of food surfaces. J. Food Eng. 61(1), 137–142 (2004)
8. Gongal, A., et al.: Sensors and systems for fruit detection and localization: a review. Comput.
Electron. Agric. 116, 8–19 (2015)
9. Payne, A.B., et al.: Estimation of mango crop yield using image analysis–segmentation method.
Comput. Electron. Agric. 91, 57–64 (2013)
10. Qureshi, W.S., et al.: Machine vision for counting fruit on mango tree canopies. Precis. Agric.
18(2), 224–244 (2017)
11. Khairunniza-Bejo, S., Kamarudin, S.: Chokanan mango sweetness determination using hsb
color space. In: 2011 Third International Conference on Computational Intelligence, Modelling
and Simulation (CIMSiM), IEEE (2011)

You might also like