Pomegranate Fruit Quality Assessment Using Machine
Pomegranate Fruit Quality Assessment Using Machine
26(1): 53–60
DOI: 10.2478/johr-2018-0006
_______________________________________________________________________________________________________
ABSTRACT
Quality assessment is an important concern in the post-harvest marketing of fruits. Manual quality
assessment of pomegranate fruits poses various problems because of human operators. In the present paper,
an efficient machine vision system is designed and implemented in order to assess the quality of pomegran-
ate fruits. The main objectives of the present study are (1) to adopt a best pre-processing module, (2) to select
best class of features and (3) to develop an efficient machine learning technique for quality assessment of
pomegranates. The sample images of pomegranate fruits are captured using a custom-made image acquisition
system. Two sets of features, namely, spatial domain feature set and wavelet feature set are extracted for all
of the sample images. Experiments are conducted by training both artificial neural networks (ANNs) and
support vector machines (SVMs) using both sets of features. The results of the experiments illustrated that
ANNs outperform SVMs with a difference in the accuracy of 12.65%. Further, the selection of wavelet fea-
tureset for training yielded more accurate results against spatial domain feature set.
Key words: Pomegranate quality assessment, wavelet features for fruit quality analysis, machine intelli-
gence in pomegranate quality assessment, ANN for fruit quality assessment
*Corresponding author:
e-mail: [email protected] Unauthenticated
Download Date | 7/27/18 3:05 AM
54 A. Kumar R. et al.
____________________________________________________________________________________________________________________
The methodology starts with applying histogram et al. (2009) with the help of fuzzy logic and ob-
equalization of the captured fruits followed by tained the promising results.
wavelet denoising. The pre-processed images are Because of the very few studies carried out on
then fed to a feature extraction algorithm that ex- sorting of pomegranate fruits by machine vision, we
tracts spatial domain features and wavelet features found that there is a large scope for pomegranate
of each of the image. The features are then fed to sorters at the industry level. This is especially
two classifiers, namely, artificial neural networks needed for use at the fruit auction centers, where
(ANN) and support vector machines (SVM). Exper- sorting of pomegranate fruits is still done manually.
iments are conducted to determine (a) the best class The present work is aimed at developing a machine
of feature and (b) best classifier. vision system to sort the pomegranate fruits into two
The major contributions of the current study quality categories.
are as follows: (1) Histogram equalization followed
by the application of wavelet denoising. This MATERIALS AND METHODS
method can in general be extended to any image
preprocessing application. (2) Three of the wavelet The overall methodology of the present work
families are applied to wavelet transforms of the im- is depicted in Fig. 1. Each subsection discusses each
ages, each at three levels of subdivision. of the modules in detail. The entire development of
The automated qualification and sorting of ag- the project is done using Matlab R2017a.
ricultural produce has been the important subject for
various researchers across the globe. Teimouri et al.
(2014) developed an efficient algorithm for seg-
menting almond images using artificial neural net-
works (ANNs) and obtained an overall accuracy of
98.82%. Nectarine variety was investigated and ver-
ified by Font et al. (2014) with an accuracy of 87%.
Cucumbers were classified as per the European
Grading Standards by Clement et al. (2013) with
99% accuracy. Narrow and broad weed were classi-
fied based on DWT features by Ghazali et al. (2007)
with an accuracy of 87.25%. Palm oil fresh fruit
bunches were automatically graded by Jamil et al.
(2009) with the help of neuro fuzzy systems to an
extent of 73.3%. Raisins were automatically graded
by Omid et al. (2010) that achieved a classification
rate of 96%. Multi-class fruits/vegetables were clas-
sified by Rocha et al. (2010) by combining features
and classifiers, which resulted in an error reduction
rate of 15%. A vision algorithm was developed by
Arefi et al. (2011) to assist the robotic arm to pick
mature tomato, which demonstrated an accuracy of
96.36%. Cucumber leaf diseases were classified
with the help of computer image processing and
support vector Machine (SVM) by Youwen et al.
(2008) and obtained satisfying results when com-
pared to that of ANNs. A new technique to sort and
automatically grade fruits was devised by Mustafa Fig. 1. Overall methodology of pomegranate fruit sorting
Unauthenticated
Download Date | 7/27/18 3:05 AM
Pomegranate fruit quality assessment 55
____________________________________________________________________________________________________________________
Unauthenticated
Download Date | 7/27/18 3:05 AM
56 A. Kumar R. et al.
____________________________________________________________________________________________________________________
Unauthenticated
Download Date | 7/27/18 3:05 AM
Pomegranate fruit quality assessment 57
____________________________________________________________________________________________________________________
Spatial domain features Table 3. Training functions used for training the artificial
Spatial domain can be defined as the section of the neural networks
real plane spanned by the coordinates of an image
(Gonzalez 2009). Image features are extracted by Hidden layer Hyperbolic tangent sigmoid
analyzing the representation of the image in spatial transfer function
domain. In the present work, 15 spatial features are Output layer Linear transfer function
extracted. Each of the features is listed in Table 2. Back propagation net- Levenberg–Marquardt
Wavelet features work training function backpropagation
Discrete wavelet transform (DWT) is expansively Back propagation Gradient descent with mo-
used in signal and image processing because of the weight learning func- mentum weight and bias
fact that it captures image information pertaining to tion learning function
both spatial and frequency domains. On application
of DWT, the image is decomposed into four sub- that determines whether a new example falls into
bands: (1) approximation sub-band, (2) horizontal one category or the other. Support vector machines
detailed sub-band, (3) vertical detailed sub-band perform well in many machine learning applica-
and (4) diagonal detailed sub-band. Further levels of tions. It searches for the linear hyper plane that splits
decompositions are applied for the approximation the positive and negative samples with the largest
sub-band. In the present study two-dimensional margin. Depending on the training data, SVM elects
DWT is performed using three familiar wavelet an optimal hyperplane that can classify the given in-
families, namely, haar, daubuchies db2 and symlet put either as healthy or diseased. In the present
(sym2). Wavelet transform for each wavelet family work, SVM has elected the training and testing set
is done at three levels. Seven features, consisting of randomly. Linear kernel function is used with
two statistical features and five gray level co-occur- a scale of 1.5. The predictor data is standardized by
rence textural features, are computed at each level, setting it to ‘true’.
resulting into a total of 252 wavelet features for each
image. The mean and standard deviation are the sta- RESULTS
tistical features. Five textural features are outlined
in Table 2. Table 4 depicts the overall results and analy-
Artificial neural network (ANN) training sis. ANN and SVM training functions are run for
A feed-forward back propagation network is used 10 iterations. In each of the iteration, the accuracy
for training. Spatial features and wavelet features of the classification is noted down. The average ac-
are trained separately. The feature dataset is ran- curacy is then calculated. Standard deviation is
domly divided into three parts: (1) 60% for training, also calculated.
(2) 20% for validation and (3) 20% for testing. The From the results, following observations can be made:
network is trained for 20 iterations. Spatial features 1. When we employ spatial domain features for
are trained with a neural network consisting of 15 classifying pomegranate images, ANNs outper-
input neurons, five hidden neurons and one output formed SVMs. This is due to the fact that ANNs
neuron. Wavelet features are trained with a neural present a deep architecture with hidden layers,
network consisting of 252 input neurons, five hid- bias and back propagation nature.
den neurons and one output neuron. The transfer 2. When we employ wavelet features for classifying
functions used are enumerated in Table 3. pomegranate images, ANNs outperformed SVMs.
Support vector machines (SVM) training 3. Using wavelet features for training showed an
Support vector machines are a set of associated su- improved accuracy when compared to spatial
pervised learning methods used for classification domain features. And also, the standard devia-
and regression. Given a set of training examples, tion of all the populations in ANNs is less when
each marked as belonging to one of the two catego- compared to that of SVMs. This is due to the fact
ries, an SVM training algorithm develops a model that wavelet transforms offers multi-resolution
Unauthenticated
Download Date | 7/27/18 3:05 AM
58 A. Kumar R. et al.
____________________________________________________________________________________________________________________
analysis of the images. Wavelet transforms ana- Table 5: Overall result analysis
lyze the fine details of the image. But this is un-
like in spatial analysis. Support vector Artificial neu-
Feature set
Moreover, the results of training are different machines ral networks
for different iterations. This is due to the fact that in Spatial features 76.48 81.97
case of ANNs, the weights and biases are assigned Wavelet features 80.00 92.65
randomly during each training session. And input
data is also divided randomly for each iteration, tak- DISCUSSION
ing random order of input/output pairs. In case of
SVMs, random partitions are created for cross vali- Automated qualification of fruits plays a vital
dation. Such inconsistencies can be avoided by us- role in post-harvest marketing. The present experi-
ing fixed weights and biases in case of ANNs and ment addresses this issue in regard to pomegranate
using fixed partitions in case of SVMs. fruits with the help of a machine vision system. The
From the above observations, the overall result experiment began with image acquisition using the
analysis can be depicted as shown in table 5. Hence image acquisition compartment. After pre-pro-
it can be concluded that wavelet features can be cessing of the acquired images, spatial and wavelet
used in the quality assessment process of the agri- features were extracted and analyzed with the help of
culture produce with artificial neural networks for two machine learning techniques: ANN and SVM.
improved accuracy. On critical observation of the results given in
We also would like to infer that the findings the Tables, it has been found that wavelet features
obtained by our method are highly promising in are well suited for the purpose stated above and
comparison to the works in the literature review. ANN results are promising in comparison to the
methods of the previous research works in this re-
Table 4. Result of analysis for sorting pomegranate fruits gard. The work by Ghazali et al. (2007) made use of
DWT features and demonstrated an accuracy of
Accuracy using Accuracy using ar- 87.25% in classifying broad and narrow weeds.
support vector ma- tificial neural net- Comparatively, our investigation showed an im-
Itera- proved accuracy of 92.65% with the use of DWT
chines (in %) works (in %)
tions features. Most of the works, such as Teimouri et al.
wavelet spatial wavelet spatial
features features features features
(2014), Font et al. (2014), Clement et al. (2013),
Jamil et al. (2009), Omid et al. (2010), and Rocha et
1 82.35 70.6 91.5 69.2
al. (2010) considered only spatial domain features
2 64.71 64.73 94 85.5 for the purpose of qualification of the agricultural
3 76.48 70.61 95.7 82.9 produce. However, there is a large scope for analyz-
4 94.12 64.72 97.4 82.1 ing the images of the agricultural produce under
5 82.35 82.35 96.6 88
multiresolution processing, which was lacking in
the previous works. And our study has achieved it
6 70.6 82.37 91.5 77.8
successfully with a higher and promising accuracy
7 76.47 76.46 90.6 82.9 by using DWT. Also, our results are almost close to
8 82.35 76.5 86.3 86.3 the results of application of DWT in medical imag-
9 94.12 88.24 90.6 85.5 ing (Dua et al. 2012), which showed an accuracy of
93.33%. In the study of Rocha et al. (2010), even
10 76.48 88.25 92.3 79.5
though a fusion of features and classifiers technique
Average 80.00 76.48 92.65 81.97 were used, the results gave an accuracy of 85%,
Stand- which is far less compared to our investigation. The
ard de- 8.80 8.31 3.17 5.18 results reported by Jamil et al. (2009) were 73.3%
viation accurate in grading palm oil FFB because of the use
Unauthenticated
Download Date | 7/27/18 3:05 AM
Pomegranate fruit quality assessment 59
____________________________________________________________________________________________________________________
Unauthenticated
Download Date | 7/27/18 3:05 AM
60 A. Kumar R. et al.
____________________________________________________________________________________________________________________
Hence it can be concluded that ANNs outperform togram vectors. Computers and Electronics in Ag-
SVMs and wavelet features outperform spatial do- riculture 102: 112–119. DOI: 10.1016/j.com-
main features. pag.2014.01.013.
However, there are some drawbacks of the pre- Ghazali K.H., Mansor M.F., Mustafa M.M., Hussain A.
sent study. Future work need to be carried out to ad- 2007. Feature extraction technique using discrete
wavelet transform for image classification. Pro-
dress them. Since the fruit samples collected con-
ceedings of the 5th Student Conference on Research
sists of two cultivars, Bhagwa and Ganesh, there is
and Development, IEEE, 4 p. DOI:
a need for the analysis of other important cultivars. 10.1109/scored.2007.4451366.
Since 252 wavelet transform features are extracted Gonzalez R.C., Woods R.E., Eddins S.L. 2009. Digital
for each image, there is a scope to apply feature Image Processing Using MATLAB, 2nd edition.
ranking and reduction techniques. Gatesmark Publishing, 827 p.
Hazra T.K., Guhathakurta R. 2016. Comparing wavelet
REFERENCES and wavelet packet image denoising using thresh-
olding techniques. International Journal of Science
APEDA 2015. Pomegranate. In: Study on identification and Research 5(6): 790–796. DOI:
of export oriented integrated infrastructure for agri 10.21275/v5i6.nov164305.
products from Maharashtra & Gujarat. Agriculture Jamil N., Mohamed A., Abdullah S. 2009. Automated
Produce Export Development Authority, pp. 20–22. grading of palm oil fresh fruit bunches (FFB) using
Arefi A., Motlagh A.M., Mollazade K., Teimourlou R.F. neuro-fuzzy technique. Proceedings of the Interna-
2011. Recognition and localization of ripen tomato tional Conference of Soft Computing and Pattern
based on machine vision. Australian Journal of Recognition, IEEE, pp. 245–249. DOI:
Crop Science 5(10): 1144–1149. 10.1109/socpar.2009.57.
Babu K.D., Marathe R.A., Jadhav V.T. 2012. Post har- Mustafa N.B.A., Ahmed S.K., Ali Z., Yit W.B., Abidin
vest management of pomegranate. ICAR – Na- A.A.Z., Sharrif Z.A.M. 2009. Agricultural produce
tional Research Centre on Pomegranate, Solapur, sorting and grading using support vector machines
India, 116 p. and fuzzy logic. Proceedings of the International
Benagi V.I., Nargund V., Balikai R., Ravikumar M. Conference on Signal and Image Processing Appli-
2009. Pomegranate – Identification and Manage- cations, IEEE, pp. 391–396. DOI: 10.1109/ic-
ment of Diseases, Insect Pests and Disorders. Uni- sipa.2009.5478684.
versity of Agricultural Sciences, Dharwad, India. Omid M., Abbasgolipour M., Keyhani A., Mohtasebi S.S.
Clement J., Novas N., Gazquez J.A., Manzano-Agugliaro 2010. Implementation of an efficient image pro-
F. 2013. An active contour computer algorithm for cessing algorithm for grading raisins. International
the classification of cucumbers. Computers and Journal of Signal and Image Processing 1(1): 31–34.
Electronics in Agriculture 92: 75–81. DOI: Rocha A., Hauagge D.C., Wainer J., Goldenstein S.
10.1016/j.compag.2013.01.006. 2010. Automatic fruit and vegetable classification
Deepa P., Geethalakshmi S.N. 2011. Improved water- from images. Computers and Electronics in Agri-
shed segmentation for apple fruit grading. Proceed- culture 70(1): 96–104. DOI: 10.1016/j.com-
ings of the International Conference on Process Au- pag.2009.09.002.
tomation, Control and Computing, IEEE, 5 p. DOI: Teimouri N., Omid M., Mollazade K., Rajabipour A.
10.1109/pacc.2011.5979003. 2014. A novel artificial neural networks assisted
Dua S., Acharya U.R., Chowriappa P., Sree S.V. 2012. segmentation algorithm for discriminating almond
Wavelet-based energy features for glaucomatous nut and shell from background and shadow. Com-
image classification. IEEE Transactions on Infor- puters and electronics in agriculture 105: 34–43.
mation Technology in Biomedicine 16(1): 80–87. DOI: 10.1016/j.compag.2014.04.008.
DOI: 10.1109/titb.2011.2176540. Youwen T., Tianlai L., Yan N. 2008. The recognition of
Font D., Tresanchez M., Pallejà T., Teixidó M., Martinez cucumber disease based on image processing and
D., Moreno J., Palacín J. 2014. An image pro- support vector machine. Proceedings of the Con-
cessing method for in-line nectarine variety verifi- gress on Image and Signal Processing 2: 262–267.
cation based on the comparison of skin feature his- DOI: 10.1109/cisp.2008.29.
Unauthenticated
Download Date | 7/27/18 3:05 AM