0% found this document useful (0 votes)
19 views

Fruit Recognition System Using MATLAB

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Fruit Recognition System Using MATLAB

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

2023 International Conference on Recent Advances in Electrical, Electronics & Digital Healthcare Technologies (REEDCON)

2023 International Conference on Recent Advances in Electrical, Electronics & Digital Healthcare Technologies (REEDCON) | 978-1-6654-9382-6/23/$31.00 ©2023 IEEE | DOI: 10.1109/REEDCON57544.2023.10151404

Fruit Recognition System Using MATLAB

Gauri Katiyar Ashok Singh Aryan Shukla


Electrical and Electronics Engineering Electrical and Electronics Engineering Electrical and Electronics Engineering
Galgotias College of Engineering and Galgotias College of Engineering Galgotias College of Engineering and
Technology andTechnology Technology
Greater Noida, India Greater Noida, India Greater Noida, India
[email protected] [email protected] [email protected]

Devmani Tiwari Ayush Singh


Electrical and Electronics Engineering Electrical and Electronics Engineering
Galgotias College of Engineering and Galgotias College of Engineering
Technology andTechnology
Greater Noida, India Greater Noida, India
[email protected] [email protected]

Abstract - The study uses a dataset made up of distinct kinds of Fruit categorization and identification software has a variety of
fruits to suggest an automated system for classifying fruits. The practical uses, including grocery shops where it may replace
fruits were photographed using a regular camera to create the manual barcodes. These technologies can also be used as mobile
dataset, which was then used to examine the fruits' colour (using the applications for people with visual impairments and as
RGB colour space), structure, and texture. To find the classifier that educational tools for those with learning difficulties. Moreover,
offers the highest level of accuracy, the fruits were classified using a studying fruit photos can help plant scientists comprehend the
variety of classifiers. The article used the Gray Level Co-occurrence genetic and molecular processes that give rise to the fruits[4].
Matrix (GLCM) method to determine the texture characteristics. Researchers can better understand the mechanisms that contribute
The study's final finding is that a support vector machine (SVM)
to fruit growth by analyzing the variation in fruit shape.
classifier produced the greatest accuracy. Using MATLAB, the full
Identifying unusual fruit and vegetable types at supermarkets is a
fruit categorization procedure was carried out. Overall, the
research proposes an automated method for classifying fruits based
routine activity, but manual labelling and pricing calculation can
on their colour, structure, and texture using image analysis tools. be laborious and prone to mistakes. Barcodes and electronic
The most precise classification outcomes are obtained when SVM is books are options, but each has drawbacks. Hence, the labelling
used as a classifier and GLCM is used to extract texture features. The and pricing process may be streamlined, increasing efficiency
fruit business may find substantial uses for this technology in a and accuracy, using an automated fruit and vegetable
variety of fruit categorization scenarios. identification system. Recently, extraordinary facets of colour,
size, shape, and texture are mixed collectively for their
Keywords—Computer vision, Pattern recognition, Support vector applications in the food industry. Normally, via increasing the
Machine, Text features, Gray level co-occurrence matrix. facets used, the overall performance of the methods proposed
can be increased. Moreover, each surface statistic (colour and
I. INTRODUCTION texture) and geometry information (size and shape) of meals
The creation of intelligent systems that can analyses and merchandise in pix play a considerable section in defect
interpret pictures in a fashion that is comparable to human vision detection and type discrimination [5]. Thereby, to seize greater
has been made possible in recent years by developments in applicable information about the high quality meals merchandise
camera and sensor technology. By applying statistical models, from images, more than one sort of facet corresponding to the
geometry, and other methods, these systems' primary goal is to grading gadget of the meals merchandise ought to be proposed.
recognize and understand pictures. Applications for these systems Colour and texture aspects are used to stumble on green and
include managing industrial robots, navigation using self- purple apples [6]. Here, the texture property performs two roles in
sustaining motors and route planners, autonomous crop disease the attention procedure. Texture-based part detection has been
diagnosis systems, event detection systems for human activities, mixed with redness measures, and location thresholding was
and visual monitoring. The computer's capacity for imagination observed by way of circle fitting, to decide the place of apples in
and prediction is essential in each of these systems. These the image plane. It used to be proven that redness works for pink
intelligent systems can make judgements and conduct actions apples as well as inexperienced apples. This accelerated texture
that would normally require human interaction by evaluating and contrast helped to discover apples one by one from the
interpreting pictures. With the capacity to automate operations and background. Three aspects of evaluation strategies colour-
make judgements based on visual data, many sectors might based, structure based, and size-based are blended collectively in
undergo a revolution, increasing the efficacy and efficiency of order to increase the accuracy of focus [7]. The fundamental
numerous processes. Image processing has attracted a lot of purpose of this work is to robotically apprehend fruit photos by
interest recently in the agricultural sector, notably for automating classifying them in accordance with its aspects of the use of
numerous procedures. Nowadays, automated techniques are machine-getting-to-know techniques. This paper is divided into
utilized to monitor agricultural development, spot diseased the following sections. Section I introduces some latest lookup
crops[1]&[2], and identify fruits and vegetables[3]. works associated with fruit attention and classification.

Authorized licensed use limited to: PES University Bengaluru. Downloaded on November 15,2024 at 14:14:08 UTC from IEEE Xplore. Restrictions apply.

978-1-6654-9382-6/23/$31.00 ©2023 IEEE 74


2023 International Conference on Recent Advances in Electrical, Electronics & Digital Healthcare Technologies (REEDCON)

Section II explains the proposed methodology. Section III build depth maps and left and right views, latency complexity
indicates experimental outcomes and the remaining part might be a concern in the context of fruit recognition. This may
compares the proposed algorithm with different present result in less effective system performance and slower
algorithms and then presents the conclusion. processing times. Researchers may investigate other strategies,
such as employing single-view pictures or enhancing the image
II. LITERATURE REVIEW processing algorithms to speed up calculation, to improve
latency.
Over the years, several writers have suggested deviations to
the rules for classifying fruits. Bhanu and Navneet[8] used a D. Accuracy Issue
synthetic neural network to classify elements of structure (area, In the realm of automated fruit recognition, improving fruit
perimeter, fundamental axis size, and minor axis length), colour identification accuracy is a major difficulty. Using more
(mean and variance of HIS, HSV, L*A*B, and YbCbCr sophisticated and reliable machine learning algorithms for
components), and texture (GLCM texture function of contrast, categorization is one way to deal with this problem.
dissimilarity, angular 2d moment, strength, and entropy). Convolutional neural networks (CNNs), for instance, have
Hashem Tamimi [9] proposed a fruit and vegetable recognition demonstrated promising results in image recognition
gadget that used histograms of hue and saturation factors and applications like fruit identification. To improve the accuracy of
facets and the Chi-square minimal distance technique as the fruit recognition, another strategy is to include other elements
classifier. [10] Chromaticity in the RGB space mixed with like texture and shape in addition to colour information. Also,
structure elements extracted with the use of Fourier descriptors, expanding the dataset used to train the algorithms can aid in
Hu moments, and simple geometric facets are used by means of enhancing accuracy because it gives the model more varied
Farid for the classification of the usage of synthetic feed-forward examples to draw from. Also, it is crucial to think about the
neural networks. A different approach suggested by Pragati lighting and surroundings in which the fruitphotographs are taken.
Ninawe[11] uses the closest neighbour classifier in combination The accuracy of fruit recognition may be increased by managing
with shape (area, perimeter, and roundness price), colour (mean these elements and making sure that the illumination is constant.
of RGBvalue), and texture (entropy). The method presented by
Saswati Naskar[12] for fruit recognition increases more than one IV. METHODOLOGY
attribute based on an overall assessment that considers texture,
colour, and form. The Log Gabor filter has been used to Figure 1's block layout, which is representative of the
understand the texture of a fruit. Colour implies hue has been proposed tactic for this exercise, which combines both training and
determined, and structure has been examined by counting categorization, as mentioned in the sentence you gave.
perimeter and nearby pixels. A machine learning model is trained by showing it how to spot
patterns and make predictions based on data. In the context of this
III. RESEARCH GAP issue, training entails supplying the machine learning model with
As per the all-preceding works there is no any researcher who labelled data made up of RGB-D images of fruit trees and related
solves the most essential and critical factors and that are: annotations that point out where the fruits are located in the images.
Using a trained machine learning model to predict the class of
A. Size Issue fresh, untainted data is the process of classification. In the context
Using factors other than size, such as colour, texture, and of this issue, classification entails analyzing fresh RGB-D images
form, can help solve the size problem in fruit recognition. For of fruit trees in order to forecast where the fruits will appear in the
instance, the texture of an apple and that of an orange may images.
differ, as well as the colour of a ripe apple and that of a ripe Figure 1's block layout demonstrates the relationship between
orange. It could be able to distinguish between fruits of similar training and categorization. A collection of RGB-D images with
sizes by adding these more characteristics to the classification annotations identifying the positions of fruits are provided as the
algorithm. In order to increase the precision of size recognition, system's input. A training set and a testing set were created from
machine learning algorithms can also be trained on a big dataset these images. The machine learning model is trained using the
of fruit photos with different sizes and shapes. A different strategy training set, which entails extracting characteristics from the
may entail more precisely capturing the size and form of the fruit images and utilizing those features to build a model that can
using depth sensors or 3D imagingmethods. forecast where fruits will appear in upcoming images. After
trained, the machine learning model is utilized for categorization.
B. Colour Issue The trained model, which predicts the positions of fruits in the
It is true that many fruits have hues that are similar, making it photographs, is given new RGB-D images. A collection of predicted
difficult to distinguish between them. Green pears and apples, for fruit positions is the system's output, and it may be compared to
instance, might both have the same colour of green. Moreover, the ground truth annotations to see how accurate the system is.
colour might differ even within the same fruit species due to Overall, the block configuration in Figure 1 demonstrates the
elements including ripeness, lighting, and image quality. To get advised method for developing and utilizing a machine learning
around this problem, scientists have developed sophisticated model to robotically automate fruit harvesting.
colour analysis methods including colour histogram, colour
moment, and colour coherence vector to detect minute colour A. Fruit Recognition System
variations between fruits. In order to increase the precision of A fruit recognition system is a piece of software or technology
fruit identification, colour analysis has also been integrated with that uses computers to recognise and categorise various kinds of
other characteristics including texture and shape. fruits. It makes use of a number of methods from the fields of
C. Latency complexity machine learning, computer vision, and image processing to
The term "latency" describes the lag or interval of time automatically find and identify fruits in pictures and videos. Image
between an action and its reaction. If it takes a long time to capture, preprocessing, feature extraction, and classification are
some of the processes that the system normally goes through. In the

Authorized licensed use limited to: PES University Bengaluru. Downloaded on November 15,2024 at 14:14:08 UTC from IEEE Xplore. Restrictions apply.

75
2023 International Conference on Recent Advances in Electrical, Electronics & Digital Healthcare Technologies (REEDCON)

Figure 1. Block Diagram

image acquisition phase, cameras or other imaging equipment are


used to take digital pictures or videos of fruits. The quality of the
photos is then improved and any noise or undesired artefacts are
removed using preprocessing techniques.
According to the recommended Fruit awareness system, Figure 2. Feature Extraction
which is illustrated in Figure 1, one channel holding the V. RESULT AND DISCUSSION
brightness records and two unique channels supplying
chrominance information will be obtained by trading in the A. Database
shadow house of the images. The HSV format is often applied due The total images in the Supermarket Produce facts collection
to its invariant features. Even more helpful for object retrieval is are broken down into 15 different categories, including Plum,
the fact that the colour doesn't change depending on how an
Agata, Asterix, Cashew, Onion, Orange, Taiti Lime, Kiwi, Fuji,
object is situated in reference to the lighting and camera
Granny-Smith, Watermelon, Honeydew Melon, Nectarine,
direction. The texture facets are computed using the luminance
channel "V," whilst the shade components are computed using Williams Pear, and Diamond Peach. Fig. 3 displays a few of the
the chrominance channels "H" and "S" [13]. Continuous Wavelet classes in the facts set. Half of each team's fruit images are used
The issue that corresponds to the coloration's brightness (V) is to train the system, while the other half serve as the testing set.
divided using a transform [14– 16], and the co-occurrence matrix These fruit photos are divided into a training set and a testing set.
is made from the approximation sub-band by anticipating the The wide variety of pictures used for training and fruit
pairwise sensible statistics of pixel intensity. The co-occurrence classification isseen in Table I.
matrix's core premise is that a texture has several occurrences of Each image was kept in its original RGB colour space with
the same grey-level configuration. Moreover, co-occurrence eight bits per channel. The photographs for the same category were
properties including contrast, energy, local homogeneity, cluster gathered on several days and at various times of the day. These traits
colour, and cluster prominence are computed and stored in the improve the variety of the statistics set and reflect a more
point's library using the co-occurrence matrix C(i, j), which was comprehensive realistic scenario. Fig. 4 displays an illustration of
generated for converted sub-bands. There are five co- occurrence the Kiwi and Granny-Smith Apple categories with customized
components, or texture qualities, for an image. The basis for lighting. The variations are due to lighting because there was no
statistical notions like Mean, Standard Deviation, and Variance is previous image processing. The Supermarket Produce data
provided by H and S components. collection also includes information about variations in posture
There will be eight chrominance or colour statistics aspects in and the amount of components in an image. Fig. 4 displays
a picture as a consequence. Hence, a fruit image is represented examples of the Cashew category. Be mindful that the location of
by all 13 components. The function extraction method is the Cashew's plastic storage varies widely.
displayed in Figure 2.
B. Pre-processing
B. Feature Extraction In a grocery shop setting, it could be essential to deal with
During the classification phase, the fruit image's colour and illumination variations, sensor capture artefacts, specular
texture points are obtained like those of the education part and reflections, background clutter, shading, and shadows. In order
contrasted with the relevant feature values, recorded in the to simplify the situation, it may be beneficial to remove the past
characteristic library. The Minimal Distance Criteria was used in from the object's description and to draw attention to it.
the categorization process. The image from the training set that is Background subtraction is a typical family of methods for
closest to the comparison image indicates that the look- at image separating out objects of interest in a scene. The easy procedure
is a member of that training image's class. of subtracting the predicted picture from the actual image and
thresholding the resultant image to generate the items of interest

Authorized licensed use limited to: PES University Bengaluru. Downloaded on November 15,2024 at 14:14:08 UTC from IEEE Xplore. Restrictions apply.

76
2023 International Conference on Recent Advances in Electrical, Electronics & Digital Healthcare Technologies (REEDCON)

is known as "background subtraction." For historical past Table 1. Fruit Name with Symbol
subtraction, the S channel of images that have been kept in HSV
is a good channel to employ. This makes sense, as the S channel
is far less sensitive to light than any ofthe RGB colour channels.

C. Algorithm for Extracting Region of Interest


1. The fruit image entered is converted to the HSV colour
system.
2. Use the Closure morphological operator and a dis structuring
element to perform a thresholding operation on the tiny holes in the
S case.
3. From the binary picture, locate the location of the Area of
Interest.
4. Crop the Area of Interest since S is considerably less sensitive
to changes in illumination and replace the binary values with the
actual pixel intensity.

VI. FEATURE AND SCOPE


Figure 3. Dataset As we can see from the previous search, there is much room
for development, thus there is a lot of future work available where
the search may work on it and better their outcome. These are the
locations where place lookup is still functional:

• To improve a swap algorithm while keeping it time-complex.

• To improve a machine that excels in accurate identification.


• To improve a device that reduces the issue of fruit
identification for fruits of the same dimension.

• To improve a device that reduces the difficulty of fruit


identification when they are the same colour.

VII. CONCLUSION
This paper describes the usage of computer systems for
automated agricultural activities, including picture evaluation and a
number of achievable capabilities. Yet, it also acknowledges that
the diversity of agricultural products makes it extremely difficult
to apply modern industrial algorithms to the agricultural realm.
The recommended method entails analyzing, interpreting, and
comprehending fruits based on their visual appearance and
Figure 4. Different poses of one Fruit physical features. The functionality and adaptability of the

Authorized licensed use limited to: PES University Bengaluru. Downloaded on November 15,2024 at 14:14:08 UTC from IEEE Xplore. Restrictions apply.

77
2023 International Conference on Recent Advances in Electrical, Electronics & Digital Healthcare Technologies (REEDCON)

awareness system may be enhanced by integrating form,


measurement, colour, and texture features. Also, by adding more [8] Pratap, Bhanu, et al. "Development of ANN based Efficient Fruit
photographs to the database, it is possible to improve the Recognition Technique." Global Journal of Computer Science and
system's accuracy or attention charge. Technology 14.5-C(2014)
[9] Pujari, Jagadeesh D., Rajesh Yakkundimath, and Abdulmunaf S. Byadgi.
Resourceful self-provider scales systems that allow farmers
"Recognition and Classification of Normal and Affected Agriculture Produce
to monitor and manage their crops without the need for outside using Reduced Color and Texture Features." International Journal of
assistance can be used with this technique. Farmers may Computer Applications 93.11 (2014).
automate the process of fruit picking by employing computer [10] García-Lamont, Farid, et al. "Color Characterization Comparison for
systems to analyse photos and identify fruits, which lowers labour Machine Vision-Based Fruit Recognition." International Conference on
costs and boosts productivity. Intelligent Computing. Springer International Publishing, 2015.
Overall, the recommended method offers a viable alternative [11] Ninawe, Pragati, and Mrs Shikha Pandey. "A Completion on Fruit
to automating agricultural processes with computer systems. The Recognition System Using K-Nearest Neighbors Algorithm.", International
technology can precisely identify and find fruits by utilizing Journal of Advanced Research in Computer Engineering & Technology
(IJARCET) Volume 3 Issue 7, July 2014
colour and texture traits and combining them with other
attributes, such as form and size, giving farmers a useful tool for [12] Naskar, Saswati, and Tanmay Bhattacharya. "A Fruit Recognition Technique
managing their harvests. using Multiple Features and Artificial Neural Network." International Journal
of Computer Applications 116.20 (2015)
REFERENCES [13] Drimbarean, A., Whelan, P. F., “Experiments in colour texture analysis”,
Pattern Recognition Letters, Vol.22, No.10, pp.1161-1167,2001.
[1] Elhariri, E., El-Bendary, N., Fouad, M.M.M., Platos, J., Hassanien, A.E.,
[14] Daubechies, “Orthonormal bases for compactly supported Wavelets”, Comm.
Hussein, A.M.M.: Multi-class SVM based classification approach for tomato
Pure Applied Math., Vol. XLI, NO. 41, pp. 909-996, 1988.
ripeness. In: Abraham, A., Krömer, P., Snášel, V. (eds.) Innovations in Bio-
inspired Computing and Applications. AISC, vol. 237, pp. 175–186. [15] Strang. G and Nguyen.T, “Wavelets and Filter Banks”, Wellesley-
Springer, Heidelberg (2014) Cambridge Press, Wellesley, MA,1996.
[2] Camargo, A., Smith, S.: An image-processing based algorithm to [16] Burrus,Goinath.R.A and Guo.H, “ Introduction to Wavelets and Wavelet
automatically identify plant disease visual symptoms. Biosystems Transform – A Primer”, Prentice Hall,1998, Expansion of notes for the IEEE
Engineering 102(1), 9–21 (2009) Society’s tutorial program held in conjunction with theICASSP,1993.
[3] Rocha, A., Hauagge, D.C., Wainer, J., Goldenstein, S.: Automatic fruit and [17] Argenti, F., Alparone, L., and Benelli, G., “Fast algorithms for texture
vegetable classification from images. Computers and Electronics in analysis using co-occurrence matrices”, IEE Proceedings-F, Vol. 137, No. 6,
Agriculture 70(1), 96–104 (2010) pp. 443- 448,1990.
[4] Seng, W.C., Mirisaee, S.H.: A new method for fruits recognition system. In: [18] Haralick .M, “Statistical and structural approaches to texture”, Proceedings of
International Conference on Electrical Engineering and Informatics, ICEEI the IEEE, Vol.67, No. 5, pp786- 804, 1979.
2009, Selangor, Malasia, pp. 130–134 (2009) [19] S.Arivazhagan, R.Newlin Shebiah, S.Selva Nidhyanandhan , L.Ganesan,
[5] Paliwal, J., Visen, N. S., Jayas, D. S. and White, N. D. G., “Cereal grain and Fruit Recognition using Color and Texture Features, VOL. 1, NO. 2, Oct
dockage identification using machine vision” Biosystems Engineering, 2010, E‐ISSN 2218‐6301
Vol.85, pp. 51-57, 2003. [20] International Journal of Advanced Research in Computer Engineering &
[6] Zhao, J.T., J. Katupitiya, J., “On-tree fruit recognition using texture Technology (IJARCET) Volume 5, Issue 7, July 2016, ISSN: 2278 – 1323
properties and color data”, International conference on Intelligent Robots
and Systems, pp. 263-268, 2005.
[7] Woo Chaw Seng and Seyed Hadi Mirisaee, “A New Method for Fruits
Recognition System”, MNCC Transactions on ICT, Vol. 1, No. 1, June 2009.

Authorized licensed use limited to: PES University Bengaluru. Downloaded on November 15,2024 at 14:14:08 UTC from IEEE Xplore. Restrictions apply.

78

You might also like