Trend Review Related To Defects Detection from Fruits and Vegetables

Defect detection and identification from fruits and vegetables are particularly challenging for Indian agriculture. Defect Detection is a process to identify the defects or damages in vegetables and fruits, based on the shapes, colors and textures. The local market finds it difficult to cope with the defects and other infections in fruits and vegetables as quality evaluations and classification of vegetables and fruits have become tedious process. Recently, several approaches based on Image processing, Machine Learning and Artificial Intelligence methods have been proposed for the purpose of defect detection. On the basis of classifying the types of defects, related pathogens, and physical and morphological characteristics descriptors, we review the different approaches based on a corpus of 57 articles between 2016 and 2021. In the process of describing the defect analysis, steps from the target articles, algorithms, and methods including qualitative and quantitative evaluation are mainly summarized. The aim of this current review work is to present-day novel images and collects recent defective area calculation methods to detect surface defects of fruits and vegetables using RGB images and to classify whether the fruit is defected or fresh. A rigorous evaluation of many new algorithms provided for quality assurance by researcher’s probes of vegetables and fruits have been conducted in this work. This review work conveys that using the recent identification features will help to decrease the disadvantages in fruit storeroom owing to storage of the affected vegetables and fruits, ie. Preventing the spread of defects and other infections from the infected fruits and vegetables to the fresh ones.


Introduction
India has been a developing country which cultivates a wide range of agricultural products such as vegetables and fruits. These agricultural products are being stored at various places like markets and local stores. While storing these products they face lot of internal and external damages. These are identified using image processing which is also known as defect detection. Defect detection -the detection of the defect in the fruits and vegetables using image processing -is especially important. An external defect is defined as a defect detected on the outer layer of the fruits and the vegetables being processed. Qualitative review on image classification is done by using recent deep learning and machine learning algorithms.
One of the most important aspects of Quality measurement, Quality analysis, Quality control and determining the product's lifespan is finding flaws in manufactured products. Analyzing these flaws aids the manufacturer in removing damaged goods from the final product, hence increasing its efficiency. The need of locating and analysing the attributes of these defects is so important. A defect detection structure can be used to provide feedback to the manufacturer, pointing to the defect's source. This review looks at one such issue, the vegetables and fruits defect. Vegetables and fruits are used at various places, such as markets and local stores. This study provides an Image Processing-based system for detecting external skin defects on fruits and vegetables, namely color, size and shape. In this review work, the various algorithms proposed for quality inspection.
For instance, H. halys is a highly polyphagous insect that attacks huge agricultural cash crops and food crops, financially that major agricultural crops, numerous various fruits, vegetables, soybean, fruit trees, and a lot of more. In overwinters it is considered a trouble insect in densely populated areas due to its diapause relevant behavior, which revealed as large overwintering aggregations in homes and other artificial constructions.
To overcome these problems, defect detection is considered as one of the best approaches in current state of the art and the same is reviewed in this article [12]. It is important to bring out new methods to improve the inspection vegetable and fruits. At present, the technologies for surface defect detection, grading, and sorting takes place only after fruit picking and hence it is relatively backward in India. These technologies whilst resulting in a high cost of fruit processing involving huge labor, also entails humble fruits quality or grade, worst sales, and minimum economic benefits [56]. This review focuses on the similarity of different deep learning and machine learning approaches, recent features and classifications with courtesy to alternate performance benchmarks on the fruits and vegetables.
We compared all the different phases between methods such as image preprocessing, image segmentation, and feature extraction, as well as classification. There are 57 applications of computer vision oriented paper based in agriculture fields that are been reviewed. The applications are Quantity (count), Recognition, Defect detection, Disease detection, Quality measurement, Quality analysis and Quality Control and so on. This review aims on feature extraction methods and new classification models to solve the problem of fruit and vegetable recognition and fault detection. The reviewed method can be depicted in the form of a generic architecture as it is shown in Figure 1.
The remainder of the paper is laid out as follows: Based on our corpus of papers, Section II examines the many steps of the Defect detection and identification process. Then the discussion about the principle of the classification systems and defect detection in table I is present. Section III deals with the Discussion and Prospect. Section IV brings the paper to a close and suggests areas for future research.

Review of The Defect Detection And Identification Process
As shown in Figure 1, the image processing technique consists of five steps: In Figure 2, the following steps are shown: (1) image capture, (2) image pre-processing, (3) image segmentation, (4) feature extraction, (5) classification, and lastly (6) defect detection/identification and kinds.

Image Acquisition
The most frequent methods and considerations for obtaining the best photos for quantitative sedimentary analysis. Furthermore, the camera and network transmission required for picture recognition and processing will have an effect. A database of over 200 fruit photos of various sizes and shapes has been compiled. The faults with different sorts of healthy and sick samples in figure 3 are a good example of this. A mobile camera is used to collect all of these samples. A flaw detection system's image acquisition is critical. The quality of picture information capture determines the quality of fruit and vegetable detection and sorting. The fruits and vegetables utilized in this study were obtained from local fruits at real-time both retail and wholesale markets in the local area [3]. Here are few sample images below the Figure 3 of fruits denoting defects in them due to the quality control of the tomato providers, there are substantial imbalances towards healthy occurrences. The compilation of big high-quality fruits and vegetable images are one of the work's most important contributions [5]. The samples were manually inserted on the conveyor, which moved at a speed of 5 fruits per second. Each camera captured three different sections of the fruit surface at three random positions while the fruit rotated along the movement direction for each fruit [41]. Fault detection is still an out brave trade due to the wide range of defect types in

Image Preprocessing
Vegetables and fruits carrying defects or with some diseases are captured and taken as input tools for analysis. The images of these input tools are converted into gray scale images. Rank order color filtering is performed in order to carry out Preprocessing. These filters play a vital role in noise removal and in normalizing and resizing the images. Various processes are performed in this method beginning with Image acquisition followed by pre-processing, the process of segmentation, feature extraction, classification ultimately leading to defect detection [5]. In this final stage of defect detection, the result with accuracy is obtained after proper analysis of the cause of the defect. Alteration of brightness and revision of the intensity of input images by applying grayscale transformation techniques causes lack of importance to position of defects in the image [8]. Improper adjustment of brightness due to irregular sensitivity of light source and object radiance can pave way for degradation of input images, affecting their color and texture hindering further processing. In order to overcome these obstacles, a pre-processing activity containing a procedure called Contrast limited adaptive histogram equalization (CLAHE) was applied for repairing post-imaging illumination [9].
The segmentation process is done using recent trend methods. Detects the images in which the fruits and vegetables are damaged and unhealthy. Those images are segmented using clustering methods for the purpose of specifically depicting the defective and damaged parts of the images. In this process, various schemes are involved for background subtraction of images. An example is in Figure 5. Healthy skin is portrayed in white in each image, while defective areas are represented in grey. Most authors have segmented the techniques in one color space [34]. The above process is captured and the RGB images are transferred to the computer and processed with the MATLAB image processing package [12]. The k-means cluster extraction algorithm converts the segmented RGB image into the L*a*b * colour space. The system then classifies the various colours using the 'L*a*b*' approach. From the confirmed image, the surface defect region could be precisely segmented; this was the key to the major operation and the general success of the defect detection procedure [19]. An upgraded fuzzy based k-means clustering algorithm is used to segment the data. It entails detecting diseased parts with a high degree of efficiency and precision. [34].

Extraction of Features
Features are evaluated after image segmentation for subsequent analysis. These characteristics are the most important aspects of an image processing system, since they provide useful information for picture perception, interpretation, and object classification.
Color, shape and texture feature extraction: This method focuses on extracting image attributes that are mostly based on colour, texture, form, and size descriptors. Color, form, and texture attributes are used to classify the proposed methods [17]. Feature descriptors are often employed for object detection and image recognition; they represent an image or a portion of an image by maintaining relevant information while discarding unnecessary data [19]. Color is one of the most fundamental feature extraction descriptors, with a wide range of approaches including the RGB color histogram, Opponent histogram, Hue histogram, Transform Color Distribution, Color Moment and Color Moment Invariants, among others [37].
Convexity, compactness, width, length, roundness, border encoding, elongation, length or width ratio, Fourier descriptor, and invariant moments are the most commonly utilized shape features in fruit and vegetable quality analysis [22]. Fruits and vegetables are sorted according to their size and form. Texture is an excellent classifier for many images that are recognized and interpreted by human visual systems. Qualitative and quantitative analyses can be used to assess texture. Statistical texture is widely utilized due to its minimum estimate cost and great accuracy. [43].

Classification
The current Classification model is a new classification method for training and testing fruit and vegetable fault detection. This is based on the training set for classifying fruits and vegetables based on the identified faults. Table 1  The defects on multiple vegetables and fruits, being major issues of concern, are also addressed by identifying the early stage of defects using various features of images research and analysis and understanding of preprocessing methods with best accuracy. A system for fault identification and grading the classification of numerous vegetables and fruits is given in this review paper. One of these corpus articles concluded that the performance of certain single features like size, shape, color, and texture with linked features is comparable [52]. The dimensionality of hyperspectral data was reduced using principal component analysis (PCA). Similarly, this research conducted a relative achievement study involving an investigation of multiple machine learning methods and other contemporary approaches on the equal images using the equal grading metric [14]. At current scenario, farming workers frequently use the reading materials and network section, called local experts and use other different models to save and maintain the defect diseases. However, for much cause, misestimates and various issues frequently happen, finally the effect is farming production being deeply damaged [46]. The existing review system classified the fruit maturity and it was determined whether the fruits are matured, pre-matured, over-matured. The researchers fulfilled, both Red Green Blue and Grayscale are completely used to calculate the grown-up of a fruit and RGB performed better than Grayscale when basing color in order to find the grown-up of a fruit and vegetable [26]. A low cost system vision module is used to defects detection apples on a four-line fruit queue machine based on Convolutional Neural Networks (CNN) classification model [41]. Digital photographs of samples collected in an experimental setup employing a microcontroller were used to classify tomatoes in three steps. The contaminated regions are segmented using the Gabor wavelet transform to identify the principal faults in the fruits. [39].

Classification of Deep Learning Models
To convolve the input image, the Convolutional Neural Network employs many kernels. Healthy and damaged fruits and vegetables were classified using a convolutional neural network (CNN). The suggested CNN-based model outperforms comparable techniques in terms of overall performance. In all image sizes, the proposed methods' setup could classify sour lemons with 100% accuracy [3]. Convolutional Neural Networks (CNN) are currently being utilized to represent shape-based features.
Because of their ability to learn convolutional kernels classification, the lower sub layers of Neural Networks (NN) have been used in image edge detection research. Given this capability, the difficult process of feature Extractor building can be accomplished by CNNs. [23]. Deep residual neural network (ResNet) classifiers were trained to detect external faults using feature extraction and fine-tuning a benchmark for detecting external defects using CV [5]. This research presents a novel proposed approach called Special Image Convolution Algorithm (S.I.C.A) for detecting faulty sections of olives [32]. This research demonstrated the method's capability for distant recognition and classification of several fruit varieties in an orchard, regardless of environmental parameter impacts such as a cluttered background, fluctuating light, overlaps, and occlusions with other plant parts, and so on [22,28].
They discovered that in the recent two years (2019 to 2020), the use of CNN for fruit recognition has skyrocketed, with outstanding results produced either through the employment of new models or through the use of pre-trained networks for transfer learning [32]. Convolution layers, subsampling layers, and an output layer are the three types of layers in a CNN model. In general, the convolution layer consists of a set of matrix filters that apply images and isolate a feature, the sub-sample layer consists of layers without training, where the highest value of the pixel in the window, and the output layer consists of all the output of the previous layers, with the system deciding which output is the most likely [26]. The proposed CNN model outperformed the traditional image processing method in terms of outcomes. The CNN only took 12 milliseconds to evaluate each image, resulting in 72 milliseconds for each image [41].

Classification of Machine Learning methods
The K-Nearest Neighbors, fuzzy approach, artificial neural network, decision tree, and SVM models were compared to the Convolutional Neural Networks models. These algorithms are used to detect defects in fruits and vegetable defected areas [27]. The acquired co-occurrence patterns are based on the characteristics of the chosen fruit and are used to identify and detect the fruit quality and subcategory. Softmax and SVM classifiers are used in this classification method. The evaluation results can significantly improve the classifier's quality detection and fine-grained fruit annotation utilizing the softmax and SVM classifiers. [37]. The focus of the paper was on the K-means clustering approach, which is used to segment out the disease-affected region from a taken image and then extract essential features to categories diseases using a support vector machine. [20,24]. The information from the top five wavelengths in N-way partial least squares regression discriminant analysis (NPLS-DA) models is sufficient to reduce losses in fruit warehouses owing to storage of contaminated produce [4]. Specific factors influencing the shape, colour, and texture of these diseases distinguish each of them. During this stage, an MSVM is employed to categories the defective samples using defect vectors. [39].

Defect detection and identification
Defects are one of the most common causes of vegetable and fruit quality loss in the agricultural industry. In recent years, defects are based on skin damaged and smell/odor classification. For example, many fungal diseases such as rust caused by pathogenic fungi in fruits and vegetables have incurred significant economic losses to farmers [45]. Improvements in various technologies that not only separate fruits and vegetables in terms of colours, sizes, and flaws, but also increase separation and classification efficiency, have piqued the interest of modern fruit and vegetable stores. This method is distinguished by its capacity to recognize and display defective regions, or white segments, regardless of their size [38]. There are numerous sorts of defect detection techniques, the majority of them are based on quality, grading, and quantity/identification of preceding state-of-the-art goods. Another challenge is recognizing the odour or olfactory categorization [32]. The main goal of this paper [34] is to present an image-based classification algorithm for detecting the defected portion of mango. In computer vision-based fruit and vegetable image classification, the extraction of discriminate features is critical, as shown in Figure 6.

Quality defects, Grading and quantity/identifying
Using image processing and machine learning, this section discusses numerous surveys relevant to fruit and vegetable quality defect detection, grading, and quantity/identification. However, infection identification is still a challenging task due to varieties of skin color in fruits and vegetables, variability of defect types, presence of stem and so on [25]. The efficiency of AC pictures for defect identification of thinskinned fruits like apple and peach depends on a number of criteria, including defect kind, fruit variety, and spatial frequency fault detection of light-skinned fruits like peach and apple. More research towards its full potential in fruit fault identification is needed [55]. If one of the six photos of the sample captured by the two cameras was image-predicted as defective fruit by the CNN model, the fruit was classed as defective. For the independent validation set, the CNN classification model performed admirably, with recall of 91 percent, specificity of 93 percent, and accuracy of 92 percent [41]. For vegetables and fruits, an intelligent categorization technique is required, as well as a fault detection system. The goal of this study [47] was to use morphology, colour, and texture to detect exterior abnormalities in fruits and vegetables. External fruits and vegetables faults, as well as different picture approaches, are used in this proposed work, which is carried out using various algorithms proposed for quality inspection. A laser backscattering imaging and CNN-based approach for detecting apple flaws is proposed. The approach can meet the requirements for detecting apple faults, especially when the defect regions have grey features and shapes that are comparable to the stem and calyx regions. The effect of fault detection using the CNN model is superior to that of traditional techniques [50]. A multimodal image analysis method was used to detect apple flaws simultaneously in this investigation. The FCM-FPGA algorithm was used to detect segmented apple defect images, while the normal FCM technique was used to detect the segmented apple defect map. In a multivariate image analysis, the influence of the two techniques on defect detection was also seen [48]. In the above shown table (Table 1), recent research done by various authors related to detection of defects and quality analysis in fruits and vegetables, using various feature extraction algorithms have been presented. The table also discusses the findings for recognition, pre-processing, classification systems and defect detection. This table indicates the performance between the recent trend methods of existing articles.

Discussion and Prospect
The ultimate goal of applying image processing techniques is to improve the qualitative and quantitative assessment of fruit and vegetable recognition and categorization, as well as disease detection in fruits and vegetables among the local goods in agricultural fields. This vision-based system has the advantages of rapidity, persistence, and non-destructiveness. Fruit and vegetable detection is resilient under difficult conditions such as lighting, varied capture positions, variability, cropping, and osculation.

•
Reducing effort, labour, and cost is one of the benefits of employing computer vision in vegetables and fruits. The traditional approach required sufficient time for defect processing, whereas computer vision for defect identification uses automatic processing, lowering the time necessary.

•
Because of their unusual shape, size, and colour, identifying fruits and vegetables presents a number of difficulties.

•
We can classify the defect detection using images from various parts of both fruits and vegetables [11]. It can quickly create a training model and classify fruits with the help of a width multiplier and checking. [16].

Limitations
• One of the fundamental drawbacks of the current Computer Vision methods is that they necessitate the preparation of a dataset, which is a time-consuming process.

•
Another issue is the lengthy computing time required to process an image with a vacillation effect. • Another significant disadvantage is that vegetables and fruits are more reliant on the environment, as the same computer vision approach may produce varying degrees of accuracy on the dataset.
• At times, the accuracy is a little bit compromised as the internal parts of fruits and vegetables are not explored properly thereby increasing the odds of detecting defects and quality analysis. • Furthermore, colour and texture influence detection; for example, flaws (brown dots) are significantly more noticeable on yellow banana peels. As a result, further studies should improve this. [27].

•
To develop new algorithms and methods for more effective and reliable extraction, processing, and analyzing data [33].

•
Existing feature extraction approaches are currently unable to obtain spectral information from various regions of the fruit. The development of a multichannel spectroscopic system that can be used to inspect interior flaws in apples and other fruits in real time becomes a requirement. [54]. • Moreover, to extend this (neural network) method as a technical framework which could be applied to various industrial applications like, fruit and vegetable quality defects detection [13].

Discussion and Future Scope
The study of this paper has covered and analyzed various themes such as existing defect detection and identification methods applied to fruits and vegetables using some smell/odor articles. A survey was conducted based on the recent trends in fruits and vegetables among various markets and real-time products of agricultural fields. The datasets collected during the survey were analyzed and were used to interpret various challenges in the agriculture domain. Apart from conducting a survey, this paper has also surveyed 57 articles made during the period from 2016-2021. Based on the findings, it was concluded that the system developed for identifying fruits or vegetable samples using visual sensing techniques is one of the most effective and efficient approaches available.
Based on the findings of this study, it is strongly recommended that researchers apply the developed system for detecting defects in fruits and vegetables, and to compare the various methods or algorithms used by researchers at each phase. Feature extraction becomes feasible by the use of different descriptors. Then, in order to determine the accuracy of the suggested system, we must study several machine learning and Artificial Intelligence methodologies. Consider the different areas of the real-time datasets under the agriculture field. To assess accuracy, the same performance measurements can be used to diverse datasets. Many academics have recently focused on deep learning approaches because to their promise to provide high-quality and accurate results. These methods can lead to various other inventions in defect detection and quality analysis raising the opportunity for future work in this area.