Page 86 - IJAMD-2-2
P. 86

International Journal of AI for
            Materials and Design                                                        Fruit image detection using AI


            categorization without causing much harm to the fruits. 14-17    (i)  Lighting conditions: Good lighting was vital in
            In  contrast,  manual  sorting  of  fruits  by  professional   showing the visual traits of the fruits. An ESP32
            personnel undergoes physical handling, thus potentially   camera provided the best lighting and clarity.
            damaging the fruits and affecting their value. 18-21  This   (ii)  Camera specifications: The camera’s resolution and
            research focuses on creating an image processing system   color accuracy had a big impact on image quality. We
            for the classification of fruits through machine learning   fine-tuned these factors to ensure the fruits’ features
            to enhance precision and productivity in the agriculture   were displayed accurately.
            business as well as the food chain. Similar approaches
            utilizing image processing and machine learning to detect   2.1.2. Pre-processing
            mangoes, tomatoes, and oranges were also performed by   Pre-processing prepared the captured images for feature
            other researchers. Image processing methods and machine   extraction  by  enhancing  important  properties  and
            learning algorithms have been widely used to classify   reducing noise. The methods used include:
            mangoes, tomatoes, and oranges, achieving classification   (i)  Resizing: The system resized all images to uniform
            accuracies ranging from 80% to 100% across these fruit   dimensions while preserving their aspect ratio. This
            types. 22-37  Research on fruit classification using image   step was essential to ensure consistency across datasets
            processing and machine learning is constrained due to   and to enhance computational efficiency.
            its focus on single fruit type, small datasets, inconsistent   (ii)  Histogram equalization: This technique enhanced
            image acquisition methods, and the lack of deep learning   image contrast by spreading out pixel intensity values.
            approaches. Future investigations should prioritize   It standardized the appearance of images, making
            standardized data collection and the application of deep   key features more distinguishable during the later
            learning algorithms.                                  processing stage.
              The proposed fruit classification system leverages   (iii) Thresholding: Thresholding splits pixels into object
            image processing to achieve maximum accuracy and      and background areas based on a predefined value. It
            minimal time expenditure. It is trained on a large database   effectively isolated the fruit from the background and
            comprising mangoes, tomatoes, and oranges. Such a     reduced noise, thereby improving feature extraction.
            classification system has significant potential to enhance   2.1.3. Feature extraction
            the quality of both the agricultural sector and the food
            industry by monitoring product quality, minimizing   At this point, the system extracted various features
            wastage, and adding value to the product. Furthermore, it   from the pre-processed images. These features included
            can be integrated into other automated systems and mobile   color, shape, texture, and size, which were essential in
            applications.                                      differentiating fruits.
              The  novel integration  of real-time  image processing   2.1.4. Feature selection
            with real-time mechanical fruit sorting, powered by   After the features were extracted, the system evaluated the
            artificial intelligence machine learning optimization   significance of each feature. The features that varied widely
            techniques using Python programming, represents the   between fruit types were retained, while those with insignificant
            novelty of this study.
                                                               variation were excluded. This step enhanced the sorting system
            2. Materials and methods                           by focusing on the most distinctive features, which resulted in
                                                               better accuracy and reduced computational work.
            2.1. Image processing system to process fruit
            images                                             2.2. Support vector machine (SVM) model to classify
            Four steps were included in developing the image   fruit images
            processing system to classify fruits (mango, oranges, and   The SVM model helped classify fruits by their appearances.
            tomatoes): Image acquisition, pre-processing, feature   This part explained the key steps in  building the SVM
            extraction, and feature selection. Each step played a key   model, which included standardizing the features, training
            role in ensuring the accuracy and effectiveness of the   the model, and applying different kernel functions.
            classification system.
                                                               2.2.1. Standardizing the features
            2.1.1. Image acquisition                           Standardizing the features was a key step before starting
            This step was crucial to capture high-quality images of the   the modeling process. It ensured that all the features
            fruits, which we needed for later analysis. Crucial factors to   selected for model creation contributed to the fruit-sorting
            consider during image acquisition included:        process. In this study, normalization was used to scale all


            Volume 2 Issue 2 (2025)                         80                        doi: 10.36922/IJAMD025150011
   81   82   83   84   85   86   87   88   89   90   91