Apple Sweetness Measurement and Fruit Disease Prediction Using Image Processing Techniques Based on Human-Computer Interaction for Industry 4.0

When it comes to agricultural sciences, one of the most di ﬃ cult challenges to solve is the detection of diseases. Agricultural specialists study a variety of sources to detect plant issues on a regular basis. Rarely can misinterpretations of diseased plants cause improper pesticide selection and subsequent agricultural disaster, although this does happen from time to time. In order to diagnose illnesses at an early stage, it is necessary to deploy automated disease detection systems. This is critical for farmers since it is both time-consuming and expensive. A sick leaf must be carefully segmented in order to be properly separate it from the rest of the leaves. Despite digital noise, a di ﬀ erent background, a di ﬀ erent shape, and a di ﬀ erent brightness, it is tough to distinguish a sick photo. In order to increase the quality of apple leaf images for disease detection and classi ﬁ cation, a new approach known as brightness preserving dynamic fuzzy histogram equalisation (BPDFHE) has been created. To determine the sweetness of an apple, examine the leaf and the texture of the fruit. In the next section, the performance of the proposed enhancement algorithm is compared to the performance of existing enhancement approaches. Existing segmentation algorithms are outperformed by our approach for segmenting the area of interest from ill leaves against a live background. It is during this phase that we analyse the Jaccard index, the Dice coe ﬃ cient, and correctness. Comparing the proposed segmentation algorithm to current approaches, it proves to be a highly e ﬀ ective strategy that can more e ﬃ ciently identify apple ill leaves from a live background with a 99.8 percent accuracy rate.


Introduction
Historically, India's agriculture sector has made the greatest contribution to the country's overall economy. In agriculture, the contribution of farmers to capital formation, the provision of surplus food to a growing population, the provision of raw materials to industries, the provision of a market for industrial goods, and a significant contribution to international commerce are all important aspects to consider. Agriculture continues to be the most significant source of employment, even though it contributes less and less to the overall economy. It is vital to accelerate the speed of development to attain competitive, productive, diversified, and sustainable agriculture [1,2]. Increasing agricultural production per unit of land, decreasing rural poverty via a socially integrated program, and ensuring that agricultural growth is following food security needs are three of the most pressing issues facing Indian agriculture. India is equipped with a broad range of physio-geographical traits, as well as a diverse range of meteorological conditions [3] (see Figure 1 for an illustration). This environment is suitable for horticulture crops such as vegetables, fruits, flowers, nuts, and plantation crops, as well as for decorative plants and other plants that need little water. It is estimated that the horticulture industry contributes 28 percent of the agricultural sector's gross domestic product, representing a 30 percent rise in the last five years. Even though India's horticulture output was lower than that of other countries in 2010-11, the country was the world's second-largest producer of horticultural items during that year. Fruits and vegetables contributed 12 percent and 14 percent, respectively, to India's overall contribution to the World Food Programme [4][5][6].
It has become much more than a way of boosting the food supply for an ever-increasing population that apple plant cultivation is now used in agriculture. Therefore, it is vital to identify the illness as quickly as feasible and with the greatest degree of accuracy possible. Agricultural products have seen significant improvements in both quality and quantity as a result of the fast increase in crop manufacturing. Several studies have revealed that the prevalence of illnesses on crops, namely, on the leaves, has resulted in a halt in the production of farmed imports [7]. The quality and quantity of food items produced would likely suffer if the disease manifestation on the crops is not thoroughly investigated, and appropriate effective therapy is not supplied. This harsh outcome has the potential to destabilize any nation's economy, but it is particularly perilous in nations whose agricultural harvests provide 75 percent of the people with their livelihood and sustenance [8,9]. Agriculturalists face several issues, the most important of which is delaying or preventing the expansion of insect populations on crops [10,11]. The word "pest" refers to a virus that transmits sickness and causes crop loss in agricultural production environments. Moreover, pest infestations result in frequent outbreaks of illnesses, which, in turn, result in food shortages and unavailability [11,12]. Farmers in most countries diagnose illnesses manually, by observing their crops with their own eyes and seeing diseases in other crops [13]. When applied to big farms [14], operation is incorrect as well as expensive. It is much more difficult and expensive for small farmers [15]. Furthermore, timely identification of crop diseases is critical since even a small number of sick leaves may transmit the disease to the whole bunch of fruits and vegetables, leading to subsequent packing and sale of farmed items to be halted, resulting in a loss of revenue. Agricultural pests have had a catastrophic influence on the agricultural industry, leading a huge number of farmers to feel disillusioned, with some even opting to give up crop production altogether [16][17][18]. If serious crop damage is to be avoided, it is vital to detect these diseases at an early stage and recommend a course of treatment to prevent large losses from occurring during bumper crop harvests [19].
When it comes to planting pathology, there are a variety of perspectives to consider. When it comes to some diseases, it is not always able to recognize obvious indicators connected with them, and in other situations, symptoms do not appear until it is too late [20,21]. The use of nonobservable indicators in measurements of the electromagnetic spectrum when dealing with electromagnetic signals is a popular strategy when dealing with electromagnetic signals, as explained here [22,23]. A greater number of individuals, on the other hand, succeed in recognizing sickness and making a diagnosis more often than not. As a result, even though skilled agriculturists are proficient in disease recognition, they also have some drawbacks, such as the fact that they may lose focus, resulting in a decrease in accuracy, and the fact that agriculturists are expensive [24,25]. The agriculturist may face additional challenges if the diagnosis is carried out over very large geographical areas [26]. As a result, the creation of a system for resolving all of these challenges is necessary. When image processing methods are combined with pattern recognition and classification technologies [27,28], many of these issues may be addressed or at least mitigated. A wide variety of approaches and algorithms have been proposed in the past, and the identification of plant leaf diseases has made significant strides forward in recent decades as a result. [29]. Many methodologies and tools have been created that are currently being used in the detection of plant diseases and features, mostly via the use of image processing techniques [30]. Apple leaves are especially susceptible to a wide range of diseases, including Alternaria, black spot, Marconian, apple scab, and the leaf miner pest, all of which may be fatal. However, no study has been done to date on using live backdrops of sick photos of diseased leaves to identify apple scab and Marconian coronaria apple leaf diseases, which are both caused by the bacteria Alternaria. To better understand two apple diseases, apple scab and Marconian coronaria, the purpose of this study is to employ digital image processing to detect and characterize them. Experts in the detection of plant diseases are expected to benefit from the approaches provided since they will help in the collecting of data and reduce the subjectiveness that results from their observations.  here are a few apple diseases and the symptoms that they produce, as well as how they affect the apple harvest in the fall. "Apple Scab" is an acronym for the term "Apple Scab." Apple trees are susceptible to scab disease, which is caused by the virus Ventura inadequacies and damages the leaves and fruits of the plants. It is most often seen on the leaves of apple trees, which is not surprising. As a result of the infection, the injured leaves get twisted and develop dark, globular patches on the top surface of their leaves as a result of the infection. It is possible for the hairy patches that appear on the undersides of leaves to merge together and cover the whole leaf surface if they are large enough. If the illness is serious enough, the infected leaves may turn yellow and fall off the tree as a result. The infection of the flower stems by a scab may also cause the blooms to fall off the plant as a consequence of the illness. In a consequence of the infection, the lesions will get recessed and brown in the future, with spores all over the boundaries of the affected areas. A diseased apple crop will grow deformed and may even break, providing an opportunity for additional viruses to invade the crop. In the shortcomings of Ventura if the necessary temperature and humidity conditions are available, ascospores may be discharged more quickly. Contagions continue to spread as the summer months proceed, and the phase of contagions is complete when the plants' leaves and fruits begin to fall off their branches with the arrival of winter, at which time the phase of contagions is over. It can be observed in Figure 1 that a sick apple leaf has developed as a consequence of the apple scab disease infection.
This approach is mainly focused with the construction of a one-of-a-kind algorithm for improving the quality of the obtained image. A unique method for segmenting sick areas in apple leaves is also proposed, which will allow for more precise categorization of apple illnesses in the future. Also included are apple texture analysis and sweetness detection utilising ripening, as well as image processing for apple disease classification, which allows for more precise categorization of apple illnesses.
For example, Section 2 contains the literature review, Section 3 contains the methodology of the proposed study, and Section 4 contains the experimental image processing analysis. Section 5 contains the conclusion and recommendations for further research.

Literature Survey
A technique for categorizing cotton leaf diseases, such as Alternaria, mesothelium, and bacterial blight, was developed by Rothe and Kshirsagar [31]. The Cotton Leaf Disease Classification System was named after Rothe and Kshirsagar [31]. This study employed a method called graph cut to separate the diseased part of the brain and to gather color information that could be used to train the adaptive fuzzy inference system. A total of 14 specimens were collected from farms in the Nagpur districts of Wardha and Buldana for use in the experiments. Thermal imaging was employed by Jafari et al. [32] to identify the presence of fungal diseases on rose plants, and they discovered that it was very successful. Two neuro-fuzzy classification algorithms were used, one for each kind of plant, to discriminate between those that were not infected and those that were infected with the virus. In the testing and training phases of the dataset to categorize the leaves damaged by powdery mildew, the classification rates of the leaves were around 92.5 percent and 92.3 percent, respectively, in the classification of the leaves. Images recorded by an automated imaging system were utilized to assess the performance of neurofuzzy classifiers, and the results were used to determine their overall performance. In this research, the highest accurate approximation rates for presymptomatic arrival diagnosis of grey mold sickness and powdery mildew disease were 69 percent and 80 percent, respectively, for the two diseases studied.
Rothe and Kshirsagar [33] invented a technique for collecting damaged cotton leaves from the plant using a mechanical approach. Before segmentation, the photos were subjected to a Gaussian filter to remove noise from the captured images. Additionally, form factors were recovered as features in addition to color layout, and the color layout descriptor was employed for a range of likeness-based reclamation and visualization activities. A variety of disorders, including myrothecium blight, bacterial blight, and Alternaria, were chosen for further inquiry and testing. With the use of deep learning, Ferentinos [34] developed a neural network technique for recognizing plant sickness that utilized photos of leaves from healthy and sick plants to detect the condition. The system was trained using an open database of thousands of pictures from which it learned to recognize twenty-five unique plants in a combination of fiftyeight different classes of plants, disease mixtures, and noninfected plants. The database was used to train the system. It was via the usage of this database that the system was taught. There was a high level of competency displayed by several model structures, with the top obtaining a 99.53 percent success rate in classifying plants as unhealthy or healthy based on their appearance.
Lv and Xu [35] proposed a machine-learning-based approach for segmenting apple photos obtained from an orchard into leaf, fruit, and branch segments. To get the fruit image, the R G component of the image was removed, and the ROI image was formed by the use of threshold segmentation algorithms on the resulting image. It was necessary to remove the fruit image from the RGB image 15 times before eliminating two R G B pictures to get the leaf illustration. It was necessary to utilize dynamic threshold segmentation to create the branch image [36]. Arnal Barbedo [36] provides an examination of techniques that make use of image processing algorithms to detect and categorize plant disease using digitally acquired photographs in the visible band, which they conducted using digitally obtained pictures in the visible band. To categorize the given suggestions, it was determined to divide them into three groups: recognition, severity assessment, and cataloging. Next, each class was subdivided in line with the fundamental technical solution that was applied in the system, which was the last phase.
Omrani et al. [37] developed a system for image processing-based detection of three apple diseases: Alternaria, black spot, and leaf miner pest. The system was designed to identify Alternaria, black spots, and leaf miner pests. It was effective in identifying the diseases and pests using this 3 Wireless Communications and Mobile Computing strategy. The classification of illnesses was accomplished via the use of support vector machines and artificial neural networks, and the findings were published. The suitable ROI was segmented using K-means clustering to detect ill regions of the unhealthy leaves; then, the ROI was segmented again using K-means clustering. After that, the characteristics of the segmented ROI were extracted and used for classification, which was then done a second time. When it comes to sickness categorization, the SVM technique outperforms the usage of artificial neural networks by a significant margin (ANNs).
By using digital photos of cotton leaves, Revathi and Hemalatha [38] demonstrated technical approaches simply and straightforwardly. The neural network technique was used to categorize the photographs that were thought to be unhealthy, and the results were published online. A skilled classifier may be able to identify diseases in the trees and categorize them appropriately. Regarding picture edge segmentation techniques, the proposed research was concerned with the identification of those ways in which the R G B color image segmentation method was utilized to get the necessary disease areas. Furthermore, image features like colour, border, and texture were obtained from the targeted ROI in order to differentiate the ill area from the rest of the picture. Wang et al. [39] developed a system for categorising two grape leaf diseases, as well as two wheat illnesses, according to their findings. Regression networks and probabilistic neural networks were used as classifiers for the two diseases of wheat and grape, with the results demonstrating that both functioned admirably. When image recognition was based on both PB and PCA networks, model identification was achieved for two kinds of wheat diseases, and both prediction and fitting precision were 100 percent correct.
Researchers Youwen et al. [40] created a unique way for distinguishing diseased cucumber leaves from healthy ones that is more exact and efficient than existing methods. Image processing was employed to increase the accuracy and efficiency of the identification process. As a first step, vector median filtering was used in order to minimise any background noise that could have been present in the photographs of the cucumber virus leaf. A support vector machine was used to categorise the photographs of cucumber sickness into different groups after the colour and shape characteristics of the ROI-retrieved photos of cucumber illness were extracted and analysed. Several researchers, including Zhang and Zhang [41], have worked on developing an algorithm for identifying cucumber leaf diseases. A novel investigative strategy was developed, in which every patch of leaves was treated as a trial rather than each leaf being treated as a model was utilised, rather to the traditional approach of treating each leaf as a model. It was necessary to add the sigmoid kernel, the radial basis function, and the polynomial function into the tests in order to carry out relative testing. As a result of the study, it was determined that utilising every location as an example and using the SVM technique generated the greatest results when it came to identifying cucumber leaf infections. An automated approach for the identification of leaf spot disease in cucumbers grown in complicated environments has been developed, according to Bai and colleagues [42]. The study makes use of an upgraded fuzzy C-means system, which was described in detail. To begin, the object leaf was segmented using the marked-watershed technique in HSI space, which was applied to the leaf using the marked-watershed procedure. For the second time, pixels having a locally mean grey value were utilised as a model point rather than using FCM grayscale, as was originally intended. Experiments were carried out on hundreds of photos of cucumber illness in order to acquire data in order to assess the accuracy and durability of the segmentation technique. Following the analysis, it was determined that the segmentation error was a mere 0.12 percent. Zhang et al. [43] proposed a method for the detection of cucumber illness that involves segmenting unhealthy leaf photographs using the K-means clustering algorithm, extracting colour and shape data from the segmented ROI, and then labelling the sick leaf photographs with a sparse representation of the sick leaf photographs. According to a suggested method, cataloguing in the S R space was capable of successfully decreasing the cost while also developing the identification presentation. With an accuracy rate of 85 percent, the suggested approach was shown to be accurate in recognising seven common cucumber leaf diseases during a demonstration.
This disease, which is one of the fastest developing apple diseases currently in existence, causes a substantial amount of defoliation and a loss in photosynthesis in the affected trees. With the naked eye, the early stages of symptoms are difficult to distinguish and properly assign; also, the symptoms vary widely depending on the apple type or cultivar being examined. It is only when acervuli have developed that microscopic exams may be performed in order to detect the pathogen-host link. A lapse in timing and insufficient management of the ailments are the ultimate effects of this situation. It follows as a consequence that early and correct diagnosis of the disease is essential for appropriate therapy of the illness and for reducing 45 the primary inoculum for the next season. As a consequence of the proposed study's early identification of the two diseases stated above, it is anticipated that throughput will increase and subjectiveness associated with human experts in the diagnosis of plant illnesses would be minimised, resulting in increased accuracy and lower costs. By detecting plant sickness and examining the texture of the fruit, it is possible to predict the sweetness of the apple in advance.
When it comes to examining plant sickness, the study's objective is to identify speedier ways that will boost cumulative throughput while also minimising how much judgement is required from human specialists. The ultimate objective is to develop an efficient algorithm for segmenting and cataloguing plant leaf diseases, which will allow for the detection of sweetness in fruit via the evaluation of fruit texture, as well as the classification of plant leaf illnesses.

Methodology of Proposed Research Work
In order to obtain information for this inquiry, an experimental technique is being applied. A survey of the literature is now being carried out in order to have a better understanding of the methodologies and applications of image processing in agricultural applications. To make judgments on the selection of horticultural goods and diseases that influence them, 4 Wireless Communications and Mobile Computing experts' comments and dialogues are held. According to the outcome of the argument, apple leaves were chosen for use because apple orchards in Indian states such as Uttar Pradesh and Rajasthan are severely affected by the diseases apple scab and marsonina coronaria, which in turn have a detrimental influence on the crop's yield. Following the argument, apple orchard samples from the two states under consideration are gathered and analysed. In the next meeting, representatives from agricultural universities and horticultural departments discuss the samples that have been collected. Following the acquisition of the images, image processing methods are utilised to identify and categorise the images that have been obtained. Development of an algorithm for the segmentation and classification of damaged apple leaves has reached a successful conclusion. Finally, the effectiveness of the proposed strategy is assessed in terms of a number of different variables, including: in the proposed research, the texture of the fruit is analysed, which allows for the prediction of the sweetness of the fruit in the end product by analysing the texture of the fruit.

Preprocessing.
A picture of a coloured apple leaf is first read in and then filtered using a Gaussian filter in the preprocessing stage of the procedure. The filtered image is then subjected to a new method known as brightness preserving dynamic fuzzy histogram equalisation (BPDFHE), which is used to enhance the overall quality of the image. Before concluding this section, we will compare the performances of the proposed enhancement strategy to those of previously known techniques using a range of performance evaluation metrics.

3.2.
Processing of Disease Detection. The development of a novel algorithm to distinguish the sick section of the better apple leaf from the remainder of the leaf is now under progress while it is still in the processing stage. As an additional benefit, the segmented area of interest (ROI) is used for the extraction of features from the diseased portion, allowing for more specific classification of apple ailments during the postprocessing stage. The performance of the proposed segmentation strategy is then compared to the performance of the present segmentation approaches, which is accomplished via the use of a range of performance evaluation metrics. Following the segmentation phase, the features of the ROI are collected in order to use them in the classification procedure. Textural features are recovered in this scenario in order to perform feature extraction, and they contain, among other things, 1st-order and 2nd-order textural qualities. Mean, variance, skewness, and kurtosis calculations are included in the first-order features, while the calculation of grey level cooccurrence matrix (GLCM) features is included in the second-order texture computations.

Input Fuzzy-Based Color
Analysis. The fuzzy histogram represents the frequency of occurrence of grey levels in the area around the grayscale value v:ðvÞ. Equation (1) illustrates the first step in the proposed technique, which is the generation of the fuzzy histogram for an image T with pixel grey value Tðj, kÞ at location ðj, kÞ.
When v = 0, 1, ⋯, L − 1, the fuzzy membership function is defined as determining whether Sði, jÞ is a member of the set of pixels with grayscale value v as described in Equation (2), the fuzzy membership function is defined.

Partitioning of the Histogram.
It is then necessary to execute histogram segregation in order to get a large number of subhistograms, which is done based on the local maxima. For each valley segment, a partition is formed that is positioned between two successive maxima locally that are constructed independently of one another. Local maxima are established initially, and then, divisions are constructed in order to do this, as detailed in further detail below. G = μ 11 μ 12 μ 12 In this case, y = 0 signifies darkness, and y = 1 implies brightness. Any intermediate value relates to the grade of the pixel's highest grey level, which may be expressed as a percentage.
μ Tx = 2 + μ z ð Þ 2 , 0≤ μ 0 ≤ 0:5, (1) Detection of local Maxima. To find the position of the local maxima, the first and second derivatives of the fuzzy histogram are used in conjunction with the fuzzy histogram. It is necessary to estimate a discrete derivative using the central difference operator, which is specified in Equation (3), where the variable v represents the first order derivative of the fuzzy histogram Z ðvÞ.
(2) Input Division Based on Pixel Range. In the fuzzy histogram, the form of the histogram is determined by using the local maximum points for the production of partitions, which are used to define the shape of the histogram. Assume that the local maxima observed in the preceding stage of the process correspond to intensity levels of (P + 1) levels.
In order to increase the overall quality of the image, we will concentrate on increasing the contrast of the image. This is performed by raising the obscurity of dark pixels while simultaneously boosting the brightness of dazzling pixels on the screen. As a consequence, we get a histogram that is 5 Wireless Communications and Mobile Computing a little fuzzier. It is represented by the series of real numbers hðiÞ, i ð0, 1, ⋯ ⋯ , L − 1Þ, where hðiÞ represents the frequency of occurrence of grey levels that are in the neighbourhood of the number I, and I indicates the number of grey levels in the vicinity of the number i. As a result, the grey value f ði, jÞ is considered as a fuzzy number ðGa, jÞ, and the fuzzy histogram is created in the following manner: where μ sxj is the membership function with a fuzzy set of parameters. When compared to standard crisp histograms, fuzzy statistics is far more capable of dealing with the inexactness of grey values, resulting in a smooth histogram.
3.3. Dynamic Histogram Equalization of the Partition. Next, the dynamic histogram equalization technique is used to each subhistogram that has been generated in order to individually equalize them. As part of this process, it makes use of a function that is reliant on the total amount of pixels in the image to practice on in order to accomplish equalization. A two-part technique is involved in this: the mapping of partitions and the histogram equalization of partitions (all of which are optional). The initial step of the procedure is the mapping of the partitions to the available space. Depending on the input median M, the fuzzy histogram F is separated into two subhistograms, GL and GU, which are then further subdivided into two sub histograms, GL and GU, and so on. where where l = 0, 1, ⋯, m, and The increasing thickness purposes for the histograms F L and F U are shown below, in the appropriate order, in the following table: To illustrate, consider the next convert purposes, which are founded on increasing thickness purposes: equalised individually, and the arrangement of the resultant equalised subdata is used to create the output picture, which is then equalised again. The output picture g = gðj, kÞ is denoted by the notation where 3.4. Image Brightness Normalization. When the dynamic histogram equalisation of each and every subhistogram is applied, it is revealed that the mean brightness of the photos is reached, which is scarcely different from the input image when compared to the input image. As a result, in order to decrease variances in the output image, a normalising approach is used to the output picture. Because the method alters the colour of the final image, it was chosen to equalise just the intensity band of the picture. In order to do this, the picture was transformed to YCbCr colour format. As a consequence of this, the chromaticity of the image is not affected. A comparison of the results obtained using this technique with the equalisation of the green, red, and blue pixels separately revealed that the results obtained using this strategy were much better. With this procedure for maintaining brightness, it is guaranteed that the mean concentration of the recorded picture is similar to the mean concentration in the original input image. In Figures 2(a)-2(d), each of the four pictures shown is the filtered input picture, the HE enhanced image, the CLAHE enhanced image, and the BPDFHE enhanced image, respectively. The BPDFHE method gives much more enhancement when compared to other enhancement approaches when the output results of BPDFHE are compared to the other enhancement techniques. The suggested BPDFHE technique is compared to current improvement strategies based on a number of different performance metrics that have been collected. (12), it is demonstrated that the contrast intensity index (CII) is derived by dividing the contrast of an enhanced picture (Cen) by the contrast of the original image (C). Higher values of CII indicate that the image has improved, where Y and G are the grey values of little areas in the picture that have high and low values, respectively, and after that, the final contrast is computed by taking the mean of all small region contrast values and dividing it by two to get the final contrast.

Contrast Improvement Index (CII). In Equation
3.5. Detection Sweetness Using Apple Ripening. The adaptive mean-shift clustering strategy is one of the most effective unsupervised kernel density estimation strategies for feature 6 Wireless Communications and Mobile Computing space analysis, and it is one of the most successful procedures in general (Yuzhong Wang 2006). In order to classify colour picture data, the method first outlines the arbitrarily formed clusters inside the feature space, which is done automatically by the algorithm, and then classes the data using the information obtained from the outline. When constructing the feature space, it is critical to employ a uniform colour space with apparent colour difference in order to guarantee that the feature space is not isotropic, since this will prevent the feature space from becoming isotropic. Nonlinear RGB, YUV, CIE L * a * b * , and CIE L * u * v * colour spaces are the four colour spaces that perform well in perceptual uniformity testing. These four colour spaces are all nonlinear RGB, as is the YUV colour space. The colours of a picture are represented using input colour, and the resulting colour space is then used as the input for colour clustering in this research. There are two significant weaknesses in the most widely used clustering approach, k-means clustering, which are considered to be its most significant drawback. Clusters must be symmetric around a centre point, and the number of clusters must be determined prior to the simulation's start date, else it will not run correctly. Due to the fact that they do not rely on any implicit assumptions, nonparametric clustering techniques are the only ones that can be used to investigate arbitrarily organised feature spaces. As a result, they are suitable for this kind of analysis since they do not need any implicit assumptions. There have been a great number of nonparametric clustering algorithms reported in the literature, and they may be divided into two primary categories: hierarchical clustering and density estimation. Hierarchical clustering is the most common kind of nonparametric clustering technique. No parameters are utilised in the process of hierarchical clustering, which is a kind of clustering.
The mean shift method is used in the proposed approach for mode identification and clustering, and it does not place any limits on the size or shape of the clusters. The fact that mean-shift clustering works on a restricted bandwidth means that it will not provide adequate results for all sorts of images in all scenarios. It is necessary to alter the bandwidth for each photo individually in order to produce appropriate clustering results. The adaptive mean-shift clustering approach used in this work adaptively calculates the bandwidth for each image as a consequence of colour conversion and the chromatic information acquired as a result of that.
For example, the fixed bandwidth h can be kept constant across the range of d × R, but the radically symmetric kernel (xK) can be maintained constant over any range of d × R.
In order to continue with the analysis, it is required to first determine the modes of density in a feature space that contains the underlying density xf before going with it. The modes are located among the zeros of the gradient xf 0, and the mean-shift process offers a simple technique of identifying these zeros without the need to estimate the density of the mode distribution. It is always necessary to ensure that the mean shift vector is directed in the direction of the greatest increase in density of the sample.
It is necessary to calculate the mean shift vector before translating the kernel by means of the mean shift vector.
It is not necessary to include the regions with low density values for the feature space analysis, and the mean shift steps are substantial in these areas. As an example, when the steps are small and the analysis is enhanced, the steps are very close to local maxima in the analysis. As a result, the mean shift technique may be referred to as an adaptive gradient ascent method in certain circles. Consider the following scenario: you have a digital picture in which the bandwidth (h) varies for each image depending on its complexity, and you want to know how many clusters are present in that image. The next part outlines a basic approach for estimating the  Figure 3 shows the result of adaptive mean-shift clustering on applying to the input images.
The GLCM and HOG characteristics were combined and sent into the SVM classifier37 as input. The confusion matrix approach, which is a supervised classification learning system, was used to assess the accuracy of the classifica-tion findings for the quality of the apple, where A is the accuracy of apple quality classification, NT represents the number of accurate classifications, and NV represents the total number of validation datasets, respectively.
The old approach required 287 minutes of training time. After going through the training procedure, 498 and 23 photos of premium apple samples were classified as intermediate apple class and low apple class, respectively, based on the quality of the photographs. Premium apple class and bad apple class were determined based on the number of photographs of middle apple samples submitted. There were 213 and 451 images of middle apple samples submitted. Premium apple class and intermediate apple class were determined by comparing photographs of poor apple samples taken from 21 and 368 images of poor apple samples, respectively. As shown in Table 1, the classification results of the validation set were achieved using the standard technique, which incorporated GLCM and HOG features as well as an SVM classifier. In order to discriminate apple quality, an SVM classifier was created based on the GLCM and HOG features. The classifier achieved an overall accuracy of 78.14 percent when applied to the validation dataset.
The suggested model outperformed both the Google Inception v3 model and the standard image processing classification approach when compared to their respective benchmarks38. For this reason, a software package for picture capture on a Windows PC was built using Python and    PyQt5. The Python programming language was used to connect OpenCV and the camera's API into this software, which was then used to capture and store photos. The weights, biases, and structure of the trained proposed model were stored and converted to a file in the Protobuf format for further analysis and analysis. It was necessary to import this file into the programme in order to achieve online detection and categorization of apple quality. The suggested model was tested in an online detection system using an independent testing dataset (300 apples, 100 of which were from each class) that was created at the same time as the proposed model. In the test experiment, four photographs of each apple were taken by the camera from various angles, and the results were compared. Following that, the suggested model was trained and used to predict and score the photos. Premium apple, medium apple, and poor apple were judged to be the expected results since they had the highest overall score, followed by middle apple and poor apple. According to the results of the separate testing dataset, the suggested model performed very well. Four premium apples were mistakenly classified as medium apples in the confusion matrix, resulting in a total of 96 correctly recognised premium apples. Premium apples were revealed to be 5, 93, and 2 middle apples, respectively. Middle apples were shown to be 5, 93, and 2 middle apples, respectively. A total of 97 poor apples were accurately diagnosed, with three poor apples being identified as midsized apples. The suggested model's total classification accuracy for the testing set was 95.33 percent, according to the results. It was also possible to load the trained Google Inception v3 model into the programme to assess its performance, which resulted in an overall accuracy of 91.33 percent for the separate testing dataset. As a result of evaluating the trained SVM classifier on an independent testing dataset, the overall accuracy of the classifier was 77.67 percent for distinguishing between apple quality.

Experimental Analysis
In order to determine the CII of five pictures, the HE, CLAHE, and BPDFHE techniques were used, as seen in Table 2. When compared to other strategies, it has been established that CII for the proposed BPDHE method outperforms all other approaches in terms of effectiveness. An additional comparison of the outcomes of the suggested BPDFHE approach is made via the use of graphical analysis, as shown in Figure 4. It is obvious from the figure that, as compared to other approaches, BPDFHE enhances contrast in a more significant amount for each picture.

Peak Signal Noise Ratio (PSNR).
Signal-to-noise ratio (PSNR) is computed by dividing signal power by that of noise power. A higher number of PSNR signals to the associated algorithm that it should create less noise and improve pictures more effectively [44].
The The IoU and our values were exactly the same in this instance, but this will not always be the case.
As demonstrated in Table 1, the outcomes of the proposed BPDFHE approach are also compared using table analysis to see how well it performs [45]. As can be observed in the picture, while comparing BPDFHE to other approaches, the PSNR for each image is higher than existing images. Figure 5 gives the confusion matrix of the proposed work. Table 3 represents the comparative study of proposed work with existing works.

Conclusion
The Gaussian filtering method is used to initially filter the digitally collected image with a live background before it is subjected to additional processing and manipulation. A novel enhancement approach known as binary preserved dynamic fuzzy histogram equalization is used to improve images after Table 3: Comparative study of existing works.

Rose
When the grey scale picture was thresholded, it was possible to segment the image. The classification of illness was carried out using existing classification technique Qayyum et al. [46] Cotton The extraction of texture, colour, and form features from images was explored from the standpoint of plant disease identification. Y. Song et al. [47] Cucumber To reduce the amount of noise in the collected photos, the vector median filtering approach was used. To segment the picture, a statistical pattern recognition approach and a mathematical morphology methodology were used. Cucumber sickness was identified with the use of statistical learning models (SVM).
Y. Tian et al. [48] Sugarcane Color, shape, and texture were retrieved from the picture as distinct characteristics. The characteristics that were collected were then utilised to classify the data using a support vector machine classifier, which is a machine learning algorithm.
R. K. Dewi and R. V. H. Ginardi [49] Apple An uneven second modification approach using the chlorophyll captivation waveband, as well as two bands in the near infrared region, was employed to give the identification of faulty sections of apples that were independent of the apple shade and cultivar used in the experiment.
J. Feng et al. [50] 9 Wireless Communications and Mobile Computing they have been filtered. After that, the performance of the unique algorithm is evaluated in comparison to the performance of the already available augmentation systems. There are a number of performance characteristics that are taken into account for this comparison. These include the clarity index and the normalized absolute error. Every performance evaluation parameter studied shows that the BPDFHE improvement technique outperforms the competition in all respects. Following that, the better image is segregated in order to get the appropriate return on investment.
The proposed technique outperforms the k means algorithm alone in terms of accuracy, which was previously impossible to quantify. Among other things, it has been shown that the proposed segmentation approach beats the k means clustering methodology alone in terms of segmentation performance metrics such as the Jaccard index, the dice coefficient, and accuracy. It is thus possible to extract the textural properties of the divided region of interest (ROI). First-order textural features and second-order GLCM features are computed in order to extract textural characteristics from the textural data. Using the criteria, two illnesses, apple scab and Marconian coronaria, are classified according to their respective features. It is determined if the leaves are diseased or not using four different classifiers.
It is determined from the observations of the four classifiers that the k nearest neighbor outperforms the other three classifiers when compared to the other three classifiers. The accuracy and specificity of K closest neighbors beat those of the other classifiers in terms of performance measures.

Data Availability
The data that support the findings of this study are available on request from the corresponding author.

Conflicts of Interest
All authors declared that they do not have any conflict of interest.