A method and system for quickly distinguishing strawberry maturity based on machine learning

Through machine learning -based strawberry maturity maturity method, combined with local entropy analysis and direction gradient straight square diagram technology, evaluate the lightness of strawberries and the degree of moisture agglomeration. The problem has achieved efficient and accurate maturity assessment and picking order.

CN119206712BActive Publication Date: 2025-01-28GUIZHOU SHIKEYUAN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411678243.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-01-28
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The prior art has low efficiency and poor accuracy in judging strawberry maturity, making it difficult to meet the requirements of modern agriculture for efficient and accurate maturity assessment.

Method used

Use machine learning based on machine -based strawberries to ripen the rapid discrimination method. Through local entropy analysis, direction gradient histogram, and regional segmentation technology, the lightness and moisture agglomeration of strawberries are evaluated. The association is determined to pick the order of picking.

Benefits of technology

The high -precision and high efficiency assessment of strawberry maturity is achieved, ensuring that strawberries are picked in the best maturity, and the quality and market value of the fruit are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206712B_ABST
    Figure CN119206712B_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for quickly distinguishing the maturity of strawberries based on machine learning, and specifically relates to the technical field of agricultural image processing and recognition, and is used to solve the problems of low efficiency and poor precision in the existing determination of the maturity of strawberries; a strawberry picking area is divided into an immature area and a high maturity area by a machine learning algorithm to reduce the processing amount; then, local entropy analysis is combined with a regional segmentation and clustering method to evaluate the uniformity of illumination, and a directional gradient histogram technology is used to analyze the directionality of water paths to evaluate the degree of light sufficiency and the degree of water concentration, and the predicted maturity of strawberries is dynamically generated based on the two characteristics, and the picking sequence is automatically optimized in combination with regional correlation analysis, so as to achieve efficient and accurate judgment of the maturity of strawberries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural image processing and recognition, and more specifically, to a method and system for quickly distinguishing the maturity of strawberries based on machine learning. Background Art

[0002] At present, strawberry maturity judgment is usually required before strawberry picking. However, traditional strawberry maturity judgment methods usually rely on the experience of manual pickers or simple color analysis equipment. These methods are inefficient and have poor accuracy in large-scale planting environments, and it is difficult to meet the requirements of modern agriculture for efficiency and accuracy in maturity assessment. In addition, it is difficult to ensure consistent judgment standards during manual picking, which is easily affected by human factors, resulting in insufficient reliability in strawberry maturity judgment.

[0003] In the prior art, there are fruit maturity analysis methods based on image processing, which usually analyze the fruit maturity through image features such as color and texture. However, these features cannot fully reflect the physiological maturity state of strawberries, resulting in low accuracy of the judgment results. In the production of fruits such as strawberries that require precise control of the picking time, the inability to effectively evaluate the maturity will lead to inappropriate picking time, thereby affecting the quality and yield of the fruit.

[0004] In order to solve the above problems, a technical solution is now provided. Summary of the invention

[0005] In order to overcome the above-mentioned defects of the prior art, the embodiments of the present invention provide a method and system for quickly distinguishing the maturity of strawberries based on machine learning to solve the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for quickly distinguishing strawberry maturity based on machine learning includes the following steps:

[0008] The strawberry picking area is divided into immature areas and high-maturity areas based on machine learning algorithms;

[0009] The uniformity of illumination in high-maturity areas was analyzed by combining local entropy analysis with regional segmentation and clustering methods to assess the degree of illumination in high-maturity areas.

[0010] The directionality of water paths in high-maturity areas is analyzed by using directional gradient histogram and region segmentation techniques to assess the degree of water concentration in high-maturity areas.

[0011] Based on the degree of light and water accumulation in the high-maturity area, the predicted maturity of strawberries in each high-maturity area is dynamically determined;

[0012] Classify high-maturity areas by predicting strawberry maturity, analyze the regional correlation of each type of high-maturity area, and determine the order of strawberry picking;

[0013] The illumination uniformity of high-maturity areas was analyzed by combining local entropy analysis with regional segmentation and clustering methods to evaluate the degree of illumination sufficiency in high-maturity areas. Specifically:

[0014] The high maturity area image is divided into multiple small areas using a regional segmentation algorithm;

[0015] Calculate the local entropy value of each small area, and generate characteristic data of illumination uniformity in the small area based on the local entropy value, including:

[0016] Convert each small area into a grayscale image; calculate the local entropy value of the grayscale image of each small area; use the local entropy value as the characteristic data of the illumination uniformity of the small area;

[0017] The clustering method is used to classify the local entropy values ​​of small areas, distinguish between areas with uniform illumination and areas with uneven illumination, and form clustering results;

[0018] According to the results of cluster analysis, the degree of sufficient light in the high-maturity area is quantitatively evaluated: the number of small areas with uniform light and the total number of small areas in the clustering results are counted, and the proportion of areas with uniform light in the high-maturity area is marked as the light sufficiency index;

[0019] The directionality of water paths in high-maturity areas is analyzed by using directional gradient histogram and regional segmentation technology, and the degree of water concentration in high-maturity areas is evaluated. Specifically:

[0020] Acquire near-infrared images of strawberry fruits in high-maturity areas to capture water absorption characteristics, including water absorption intensity, water distribution pattern, and water path characteristics;

[0021] The near infrared image of strawberry fruit is divided into multiple small areas using the region segmentation algorithm;

[0022] Calculate the directional gradient histogram in each small area, extract the directional characteristics of the moisture path, and obtain the gradient direction distribution of the small area;

[0023] The concentration of moisture paths is analyzed based on the directional characteristics of small areas, and the degree of moisture concentration in high-maturity areas is evaluated.

[0024] In a preferred embodiment, the strawberry picking area is divided into an immature area and a high maturity area based on a machine learning algorithm, specifically:

[0025] Comprehensively collect images of the strawberry planting area to obtain original image data containing strawberry fruits;

[0026] Preprocess the collected raw image data, including image denoising, brightness correction, color balancing and size standardization;

[0027] The preprocessed images are subjected to feature extraction using a machine learning algorithm to obtain feature data of strawberry fruits as a basis for classification. The feature data includes color features, shape features, and texture features.

[0028] Based on the extracted feature data, the classification model was trained using supervised learning methods to classify strawberry fruits into two categories: immature and highly mature, and a maturity discrimination model was constructed.

[0029] The maturity discrimination model is applied to predict the preprocessed images, and the strawberry planting area is divided into immature areas and high maturity areas according to the classification results.

[0030] In a preferred embodiment, the directional gradient histogram is calculated in each small area, the directional characteristics of the moisture path are extracted, and the gradient direction distribution of the small area is obtained, specifically:

[0031] For each small area of ​​the near-infrared image, the image gradient algorithm is used to calculate the gradient amplitude and gradient direction of each pixel in the small area;

[0032] The pixel gradient direction in the small area is divided into certain angle intervals, and the number of pixels in each direction interval is counted to form a direction histogram;

[0033] The direction histogram of each small area is used as the directional feature of the small area.

[0034] In a preferred embodiment, the concentration of moisture paths is analyzed according to the directional characteristics of small areas, and the degree of moisture concentration in high-maturity areas is evaluated, specifically:

[0035] Based on the directional characteristics of each small area, a clustering algorithm is used to group the small areas and distinguish between areas with consistent directions and areas with scattered directions;

[0036] The directional consistency score of each small area is calculated by the following formula: ;in, For the The directional consistency score of a small area, is the total number of pixels in the small area, For the The gradient direction of pixels, is the number of pixels in the small area, is the average gradient direction of the small area, is the number of the small area;

[0037] The directional consistency scores of small areas with the same direction are summed up and then divided by the total number of small areas to obtain the moisture concentration index.

[0038] In a preferred embodiment, the predicted maturity of strawberries in each high maturity area is dynamically determined based on the light sufficiency and water concentration of the high maturity area, specifically:

[0039] The light sufficiency index and the water concentration index were normalized, and weight coefficients were assigned to the normalized light sufficiency index and the water concentration index respectively to calculate the predicted maturity coefficient of strawberry.

[0040] In a preferred embodiment, the high maturity areas are classified according to the predicted maturity of strawberries, and the regional correlation of each type of high maturity area is analyzed to determine the order of strawberry picking, specifically:

[0041] According to the calculated strawberry predicted maturity coefficient, the high maturity area is divided into different maturity level categories;

[0042] Obtain and record the geographic location information of each high maturity area in the planting area;

[0043] Analyze the geographical proximity of each type of high-maturity region and extract groups of regions with close proximity;

[0044] Determine the order in which the strawberries should be picked based on regional relevance and maturity grade categories.

[0045] On the other hand, the present invention provides a strawberry maturity rapid discrimination system based on machine learning, including a machine learning classification module, a light sufficiency assessment module, a water accumulation assessment module, a prediction maturity analysis module and a regional association analysis module;

[0046] Machine learning division module: divides the strawberry picking area into immature areas and high-maturity areas based on machine learning algorithms;

[0047] Light sufficiency assessment module: analyzes the uniformity of light in high-maturity areas through local entropy analysis combined with regional segmentation and clustering methods to assess the degree of light sufficiency in high-maturity areas;

[0048] Water concentration assessment module: Analyze the directionality of water paths in high-maturity areas through directional gradient histogram and regional segmentation technology to assess the degree of water concentration in high-maturity areas;

[0049] Prediction and maturity analysis module: Based on the degree of light exposure and water concentration in the high-maturity area, the predicted maturity of strawberries in each high-maturity area is dynamically determined;

[0050] Regional correlation analysis module: Classify high-maturity areas by predicting the maturity of strawberries, analyze the regional correlation of each type of high-maturity area, and determine the order of strawberry picking.

[0051] The technical effects and advantages of the method and system for quickly distinguishing the maturity of strawberries based on machine learning of the present invention are as follows:

[0052] 1. The present invention provides a method for quickly distinguishing the maturity of strawberries based on machine learning, which can achieve high-precision and high-efficiency maturity assessment in strawberry planting areas, and has significant advantages over the prior art. First, this scheme preliminarily divides the picking area through a machine learning algorithm, and quickly classifies the strawberry image into an immature area and a high maturity area, thereby reducing the amount of calculation in the subsequent analysis steps and effectively improving the processing efficiency. In addition, the present invention introduces image processing techniques such as local entropy analysis and directional gradient histograms in the high maturity area, and combines regional segmentation and clustering methods to comprehensively evaluate the illumination uniformity and moisture path directionality of strawberries. Compared with the traditional maturity judgment method that relies on a single color or texture feature, the present invention can distinguish from multiple dimensions such as light distribution and moisture aggregation, significantly improving the accuracy of strawberry maturity assessment, ensuring that strawberries are picked in the best mature state, thereby ensuring the quality and market value of the fruit.

[0053] 2. In addition, the present invention realizes the rapid prediction of strawberry maturity through the dynamic combination of two innovative characteristics: the degree of light sufficiency and the degree of water concentration. This method comprehensively considers the key environmental factors in the growth process of strawberries, so that the maturity judgment no longer relies solely on appearance characteristics, further improving the scientificity and stability of the judgment. Combined with the regional correlation analysis, the scheme can automatically generate the picking order according to the geographical proximity of areas with different maturity levels, and reasonably optimize the picking process. This optimization not only improves the picking efficiency, but also reduces the operating cost, meets the needs of rapid and accurate judgment of strawberry maturity in large-scale planting environments, and has high practical value and innovation. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a schematic diagram of a method for quickly distinguishing the maturity of strawberries based on machine learning according to the present invention;

[0055] Figure 2 It is a structural schematic diagram of the strawberry maturity rapid discrimination system based on machine learning of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] Example 1

[0058] The present invention uses a pre-trained machine learning model to preliminarily classify images of strawberry planting areas, and quickly divides the images into immature areas and high maturity areas to reduce the amount of calculation in subsequent steps and improve processing efficiency. Subsequently, the illumination uniformity and moisture path directional characteristics are extracted in the high maturity area through local entropy analysis and directional gradient histogram algorithm, and the feature analysis process is refined in combination with regional segmentation technology. With the help of these efficient algorithms widely used in the field of computer vision, the extraction and analysis of each feature can be completed in a short time. Based on the obtained illumination and moisture characteristics, the predicted maturity of strawberries in each high maturity area is dynamically generated, and then the high maturity areas are classified and sorted in combination with regional correlation, thereby optimizing the picking order. The entire process relies on the pre-trained model to achieve real-time or near real-time operation, greatly shortening the overall processing time from data collection to maturity assessment and picking decision, and quickly completing the accurate judgment of strawberry maturity.

[0059] Figure 1 The invention provides a method for quickly distinguishing the maturity of strawberries based on machine learning, which comprises the following steps:

[0060] The strawberry picking area is divided into immature areas and high-maturity areas based on machine learning algorithms.

[0061] The illumination uniformity of high-maturity areas was analyzed by combining local entropy analysis with regional segmentation and clustering methods to evaluate the degree of illumination in high-maturity areas.

[0062] The directionality of water paths in high-maturity areas was analyzed by using directional gradient histogram and region segmentation technology, and the degree of water concentration in high-maturity areas was evaluated.

[0063] Based on the degree of light exposure and water concentration in the high-maturity areas, the predicted maturity of strawberries in each high-maturity area is dynamically determined.

[0064] The high-maturity areas are classified according to the predicted maturity of strawberries, and the regional correlation of each type of high-maturity area is analyzed to determine the order of strawberry picking.

[0065] The strawberry picking area is divided into immature areas and high maturity areas based on machine learning algorithms, specifically:

[0066] Comprehensive image acquisition of the strawberry planting area to obtain raw image data containing strawberry fruits:

[0067] Select professional multispectral imaging equipment with high resolution pixels to ensure that the acquired image data can extract subtle surface features of the strawberry fruit in subsequent processing.

[0068] Images can be collected under different lighting conditions, such as morning, noon, and evening, to ensure that the data is adaptable in various light conditions and reduce deviations caused by lighting changes.

[0069] Use a multi-angle camera to shoot the same fruit from multiple angles to obtain fruit surface information at different angles to ensure a comprehensive sample.

[0070] The collected image data are labeled and stored according to time, lighting conditions, and strawberry positions to facilitate subsequent data processing and training of the training model.

[0071] Preprocess the collected raw image data, including image denoising, brightness correction, color balancing and size standardization:

[0072] Denoising: First, apply the median filter algorithm to the original image to eliminate the noise generated by environmental factors or equipment. The median filter algorithm is a nonlinear filtering method that can effectively remove isolated noise pixels and ensure the clarity of the image.

[0073] Brightness correction: In order to eliminate the uneven brightness caused by the difference in light intensity during acquisition, the adaptive histogram equalization algorithm is used to uniformly correct the image brightness. The adaptive histogram equalization method can achieve uniform brightness processing by adjusting the gray value distribution in the image.

[0074] Color balance: To improve the color consistency in the image, a white balance algorithm is used to adjust the colors of different images so that the color distribution of each image is more similar. The white balance algorithm adjusts the ratio of different color channels to obtain standardized color performance.

[0075] Size normalization: For example, all image data can be uniformly resized to 300×300 pixels to facilitate input normalization for subsequent feature extraction and classification models.

[0076] The machine learning algorithm is used to extract features from the preprocessed images and obtain the characteristic data of the strawberry fruit as the basis for classification:

[0077] After image preprocessing is completed, in order to effectively distinguish the different ripeness states of strawberries, it is necessary to extract multiple features from each image. Feature extraction covers three main aspects: color, shape, and texture, providing a classification basis for the subsequent classification model. The specific steps are as follows:

[0078] Color feature extraction: First, extract the color features in the image to determine the ripeness of the strawberries. Using the color histogram method, calculate the average values ​​of the three color channels of red, green, and blue to generate feature data representing the color. Color information helps to distinguish the color difference between ripe and unripe strawberries, providing an effective classification basis for the model.

[0079] Shape feature extraction: Next, the shape features of the strawberry fruit are extracted. A common image shape description method, Hu invariant moments, is used. This method can maintain stability to scaling, rotation, and illumination changes. By calculating multiple invariant moments of shape features, feature data of the strawberry shape is generated. These shape features help distinguish the structural morphology differences of strawberries, enabling the model to recognize different fruit contours.

[0080] Texture feature extraction: Finally, the texture features of the strawberry surface are extracted to capture the differences in different textures on the fruit surface. The grayscale co-occurrence matrix method is used to calculate texture parameters such as image contrast, entropy, energy, and consistency. This method generates texture feature data on the strawberry surface by statistically analyzing the grayscale distribution pattern, further improving the model's ability to distinguish fruits of different maturity levels.

[0081] Based on the extracted feature data, the classification model was trained using supervised learning methods to classify strawberry fruits into two categories: immature and highly mature, and a maturity discrimination model was constructed:

[0082] Based on the extracted feature data, which includes color features, shape features and texture features, a classification model is constructed to distinguish the maturity of strawberries.

[0083] The maturity discrimination model is constructed using the support vector machine (SVM) algorithm and trained using supervised learning methods. The maturity discrimination model is as follows: ;in, represents the maturity discrimination model, which is used to discriminate the maturity category of strawberries; It is the Lagrange multiplier in the support vector machine, which represents the weight parameter in the model; are sample labels, corresponding to the immature and high maturity categories respectively; It is a kernel function used to map samples to a high-dimensional space; is the sample feature vector, which includes color features, shape features and texture features; It is the bias term of the model, which is used to adjust the classification boundary; Represents a symbolic function that outputs a category label; Represents the sample sequence number in the support vector machine, used to traverse the training samples; Represents the total number of training samples, which is used to determine the range of support vectors in the model.

[0084] The maturity discrimination model is applied to predict the preprocessed images, and the strawberry planting area is divided into immature areas and high maturity areas according to the classification results:

[0085] The preprocessed image data is input into the trained maturity discrimination model to predict the maturity status of each strawberry fruit through classification.

[0086] According to the classification results output by the model, the strawberry areas in the image are marked. The areas judged to be immature are marked as "immature areas", and the areas judged to be highly mature are marked as "highly mature areas".

[0087] For example, it can be classified into 6 immature areas and 4 high maturity areas. Based on the regional division results, a distribution map of the strawberry picking area is generated to provide basic data for subsequent light and moisture characteristics analysis.

[0088] The illumination uniformity of high-maturity areas was analyzed by combining local entropy analysis with regional segmentation and clustering methods to evaluate the degree of illumination sufficiency in high-maturity areas. Specifically:

[0089] The high maturity area image is divided into multiple small areas using the regional segmentation algorithm:

[0090] Acquire pre-processed images of high maturity areas to ensure that the brightness, color, and contrast of the images are standardized for subsequent analysis.

[0091] Select a region segmentation algorithm suitable for irregular shape segmentation. The commonly used choice is the superpixel segmentation algorithm. Superpixel segmentation can divide the image into multiple similar pixel blocks, making each small area close to uniform in shape and size, which is convenient for subsequent analysis.

[0092] Set the parameters of superpixel segmentation, including the size and number of segmented regions. According to the number of pixels and resolution of the image, you can set an appropriate small region size to ensure that each small region after segmentation contains enough pixels for subsequent entropy calculation.

[0093] The superpixel segmentation algorithm is applied to segment the high maturity area image into multiple small areas. The pixels in each small area will be analyzed as a whole.

[0094] Calculate the local entropy value of each small area, and generate characteristic data of illumination uniformity in the small area based on the local entropy value:

[0095] To simplify the calculation, each small area is converted into a grayscale image.

[0096] The local entropy value is calculated for each small area of ​​the grayscale image. The local entropy value calculation formula is: ;in, Represents the local entropy value, which is used to quantify the uniformity of grayscale distribution in the small area; Indicates the first The probability of occurrence of gray levels; The numbers representing the different gray levels in the small area; Represents the total number of different gray levels in a small area (for example, for an 8-bit grayscale image, the gray levels range from 0 to 255, so The maximum value is 256).

[0097] Based on the calculation results of local entropy values, the local entropy values ​​are used as the characteristic data of the uniformity of illumination in small areas. For small areas with uniform illumination, the local entropy values ​​are relatively low, while for small areas with uneven illumination, the local entropy values ​​are high. This characteristic data can be used for subsequent clustering analysis.

[0098] The clustering method is used to classify the local entropy values ​​of small areas, distinguish between areas with uniform illumination and areas with uneven illumination, and form clustering results:

[0099] The local entropy value of each small area is used as the input data of cluster analysis. Assuming that the number of small areas is 8, the input data of cluster analysis is in the form of an entropy value vector with a dimension of 8.

[0100] Select an algorithm suitable for entropy clustering, such as K-means clustering method. K-means clustering can classify areas with lower local entropy values ​​as "evenly illuminated areas" and areas with higher local entropy values ​​as "unevenly illuminated areas".

[0101] Set the number of clusters for K-means clustering. Here, choosing 2 clusters means dividing the small area into two categories, representing uniform illumination and uneven illumination.

[0102] After completing the cluster analysis, the clustering results are output, and each small area is marked according to the cluster category to form an overall light distribution map.

[0103] Based on the results of cluster analysis, the degree of light sufficiency in high-maturity areas was quantitatively evaluated:

[0104] The ratio of the number of small areas with uniform lighting to the total number of small areas in the statistical clustering results was calculated, and the proportion of areas with uniform lighting in the high-maturity area was calculated. This ratio indicated the degree of lighting uniformity, and the proportion of areas with uniform lighting in the high-maturity area was marked as the light sufficiency index.

[0105] The larger the light sufficiency index is, the higher the light sufficiency of the high maturity area is, which means that the area has sufficient and evenly distributed light overall. Generally, areas with even light are more suitable for strawberry maturity, so high maturity areas with a larger light sufficiency index mean that the light sufficiency is higher, which helps to judge the maturity of the fruit.

[0106] The directionality of water paths in high-maturity areas is analyzed by using directional gradient histogram and regional segmentation technology, and the degree of water concentration in high-maturity areas is evaluated. Specifically:

[0107] Acquire near infrared images of strawberry fruit in areas of high maturity to capture water absorption characteristics:

[0108] Specialized near-infrared imaging equipment is used to capture images of the high-maturity areas of strawberries. Near-infrared imaging can effectively capture the water absorption characteristics inside the fruit, especially in an environment with relatively stable lighting conditions.

[0109] During the imaging process, the appropriate light intensity and wavelength are set to ensure that the near-infrared imaging equipment can accurately capture the distribution and absorption characteristics of water inside the strawberry fruit. The typical near-infrared wavelength range is 700 to 1100 nanometers, and the image data in this band can highlight the characteristics of the water absorption path.

[0110] In near-infrared images, moisture absorption features mainly refer to the absorption pattern of near-infrared light by the moisture inside the strawberry fruit and its manifestation in the image, including:

[0111] Water absorption intensity: The brightness of areas with different water contents in strawberry fruits in near-infrared images is different. Areas with high water content absorb more light in the near-infrared band and appear darker, while areas with less water reflect more light and appear brighter.

[0112] Moisture distribution pattern: The distribution of water inside the strawberry fruit is usually uneven. Near-infrared imaging can capture the boundaries between areas with more concentrated water and areas with less water. The grayscale changes formed by these distribution patterns provide a basis for subsequent water path directionality analysis.

[0113] Moisture path characteristics: When the moisture of strawberry fruit flows from the outside to the inside or from the bottom to the top, it will appear as specific stripes or streamline structures in the near-infrared image. These moisture paths can be further extracted through directional analysis in subsequent steps to help determine the degree of moisture accumulation.

[0114] The near-infrared image of strawberry fruit is divided into multiple small areas using the region segmentation algorithm:

[0115] The near-infrared image is divided into several small regions to ensure that the segmentation is suitable for the analysis of the degree of moisture accumulation.

[0116] The near infrared image is divided into multiple small areas using a regional segmentation algorithm suitable for moisture path direction analysis. The selected segmentation algorithm can be a superpixel segmentation algorithm, which can ensure that each small area has similar spectral and structural characteristics while maintaining the continuity of the small area shape. The superpixel segmentation algorithm is applied to segment the image, dividing the high maturity area image into multiple independent small areas, each of which contains similar pixel features.

[0117] Calculate the directional gradient histogram in each small area, extract the directional characteristics of the moisture path, and obtain the gradient direction distribution of the small area:

[0118] The calculation process of the directional gradient histogram is as follows:

[0119] For each small area of ​​the near-infrared image, the image gradient algorithm is used to calculate the gradient amplitude and gradient direction of each pixel in the small area. Suppose the gray value of a pixel in the small area is ,in and Respectively represent the row coordinates and column coordinates of the pixel, and calculate the gradient amplitude, which is expressed as: ;in, is the gradient magnitude, Indicates along The gradient of the direction, Indicates along Direction gradient.

[0120] Calculate the gradient direction, the expression is: ;in, is the gradient direction.

[0121] The pixel gradient direction in the small area is divided into certain angle intervals (for example, 0° to 180° is divided into 9 intervals), and the number of pixels in each direction interval is counted to form a direction histogram. Each columnar bar of the direction histogram corresponds to a direction interval, and the height of the columnar bar represents the number of pixels in the direction interval.

[0122] The directional histogram of each small area is used as the directional feature of the small area to describe the main directional distribution of the moisture path.

[0123] Analyze the concentration of water paths based on the directional characteristics of small areas and assess the degree of water concentration in high-maturity areas:

[0124] Based on the directional characteristics of each small area, a clustering algorithm (such as K-means clustering or density clustering) is used to group the small areas to distinguish between areas with consistent directions and areas with scattered directions. Small areas with consistent directions indicate that the water paths are concentrated, while areas with scattered directions indicate that the water paths are relatively scattered.

[0125] Quantify the degree of directional consistency in the clustering results. Set a directional threshold and define the standard for small areas with consistent directions, that is, only when the gradient direction in a small area is mainly concentrated in a certain angle range, it will be marked as a concentrated area. The directional consistency score of each small area is calculated by the following formula: ;in, For the The directional consistency score of a small area, is the total number of pixels in the small area, For the The gradient direction of pixels, is the number of pixels in the small area, is the average gradient direction of the small area, It is the number of the small area.

[0126] Higher directional consistency scores indicate more consistent directions.

[0127] The directional consistency scores of small areas with the same direction are summed up and then divided by the total number of small areas to obtain the moisture concentration index. The larger the moisture concentration index, the higher the moisture concentration in the high-maturity area, which means that the distribution of moisture in the area is more concentrated and more directional, which helps to judge the maturity of strawberry fruits. It usually indicates that the higher the maturity of the strawberry, the better the fruit quality, which helps to provide a reliable basis for determining the maturity and picking order.

[0128] Based on the degree of light and water concentration in the high-maturity area, the predicted maturity of strawberries in each high-maturity area is dynamically determined, specifically:

[0129] The light sufficiency index reflects the uniformity and sufficiency of light distribution in the high maturity area. Areas with uniform and sufficient light are usually more conducive to strawberry ripening, so a higher light sufficiency index is an important indicator of high maturity of strawberries.

[0130] The water concentration index reflects the concentration of water in the fruit. A high water concentration index indicates concentrated water distribution and high metabolic activity, which is conducive to sugar accumulation and cell expansion in strawberries, and is a typical characteristic of mature fruits.

[0131] The light sufficiency index and water concentration index are combined to predict the maturity of strawberries.

[0132] The light sufficiency index and water concentration index are normalized, and the normalized light sufficiency index and water concentration index are respectively assigned weight coefficients to calculate the strawberry prediction maturity coefficient, which is expressed as follows: ;in, is the predicted maturity coefficient of strawberry, and They are the normalized light sufficiency index and water concentration index, and are the weight coefficients of the light sufficiency index and the water concentration index, respectively, and and Both are greater than 0.

[0133] The larger the predicted maturity coefficient of strawberries, the more suitable the light and water distribution in the high maturity area are for the ripening of strawberries, which usually means the fruit is closer to the optimal state for picking.

[0134] The high maturity areas are classified by predicting the maturity of strawberries, and the regional correlation of each type of high maturity area is analyzed to determine the order of strawberry picking, which is as follows:

[0135] According to the calculated strawberry predicted maturity coefficient, the high maturity area is divided into different maturity level categories:

[0136] Set multiple maturity levels to divide the predicted maturity coefficient of strawberries into different ranges. For example, the maturity level categories are divided into three levels: "fully mature", "about to mature" and "medium mature". The threshold ranges of each level need to be adjusted according to the experimental data to ensure classification accuracy.

[0137] The predicted maturity coefficient of each high maturity area is compared with the set threshold range to determine its corresponding maturity level category. If the predicted maturity coefficient of a certain area is within the "full maturity" range, it is classified as the "full maturity" category; if it is within the "approaching maturity" range, it is classified as the "approaching maturity" category, and so on.

[0138] Obtain and record the geographic location information of each high maturity area in the planting area:

[0139] Each high maturity area is geographically tagged. The specific location of each area is indicated using location coordinates (such as longitude and latitude or relative coordinates) within the planting area.

[0140] Choose a coordinate system that is appropriate for the strawberry-growing area, such as a planar coordinate system or a relative coordinate system, to ensure that location data is consistent in regional analysis.

[0141] The maturity level category of each high-maturity area is associated with its geographical location coordinates and stored to form a maturity-location data table, so that the location and maturity information of each area can be quickly found in subsequent analysis.

[0142] Analyze the geographical proximity of each type of high maturity region and extract groups of regions with close proximity:

[0143] Set the adjacent distance threshold, and determine the minimum distance between each area to be considered adjacent according to the layout of the planting area and the operation requirements. For example, when the distance between two areas is less than the adjacent distance threshold, they are considered adjacent.

[0144] For each high maturity region within the same maturity level category, its geographical distance to other regions was calculated.

[0145] The distances of each high-maturity area within the same maturity level category are compared pairwise to select area pairs that meet the adjacent distance threshold. These adjacent areas are combined into area groups so that they can be picked together in the subsequent picking sequence.

[0146] Determine the order in which the strawberries should be picked based on regional relevance and maturity grade categories.

[0147] Priority is given to the high-maturity regional group, and the relatively low-maturity regional group is given secondarily. The picking order is first in the "fully mature" category area, followed by the "about to mature" category and the "medium mature" category.

[0148] Within each maturity category, priority is given to picking groups with strong proximity to ensure the continuity of the picking path. By optimizing the path, the moving distance during the picking process is reduced to maximize the picking efficiency.

[0149] Generate a picking order list by maturity level and regional relevance. The list includes the number, maturity category, geographical location and picking order of each area to ensure the orderly execution of the picking task.

[0150] Example 2

[0151] The difference between Example 2 of the present invention and Example 1 is that this example introduces a system for quickly distinguishing the maturity of strawberries based on machine learning.

[0152] Figure 2 A structural schematic diagram of a strawberry maturity rapid discrimination system based on machine learning of the present invention is given. The strawberry maturity rapid discrimination system based on machine learning comprises a machine learning division module, a light sufficiency assessment module, a moisture accumulation assessment module, a maturity prediction analysis module and a regional association analysis module.

[0153] Machine learning division module: divides the strawberry picking area into immature areas and high maturity areas based on machine learning algorithms.

[0154] Light sufficiency assessment module: The light uniformity of high-maturity areas is analyzed through local entropy analysis combined with regional segmentation and clustering methods to assess the degree of light sufficiency in high-maturity areas.

[0155] Water concentration assessment module: The directionality of water paths in high-maturity areas is analyzed through directional gradient histograms and regional segmentation technology to assess the degree of water concentration in high-maturity areas.

[0156] Predictive maturity analysis module: Based on the degree of light exposure and water concentration in the high-maturity areas, the predicted maturity of strawberries in each high-maturity area is dynamically determined.

[0157] Regional correlation analysis module: Classify high-maturity areas by predicting the maturity of strawberries, analyze the regional correlation of each type of high-maturity area, and determine the order of strawberry picking.

[0158] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0159] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.

[0160] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0162] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0163] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0165] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0166] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0167] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for quickly distinguishing the maturity of strawberries based on machine learning, characterized in that: The steps include: The strawberry picking area is divided into immature areas and high-maturity areas based on machine learning algorithms; The uniformity of illumination in high-maturity areas was analyzed by combining local entropy analysis with regional segmentation and clustering methods to assess the degree of illumination in high-maturity areas. The directionality of water paths in high-maturity areas is analyzed by using directional gradient histogram and region segmentation techniques to assess the degree of water concentration in high-maturity areas. Based on the degree of light and water accumulation in the high-maturity area, the predicted maturity of strawberries in each high-maturity area is dynamically determined; Classify high-maturity areas by predicting strawberry maturity, analyze the regional correlation of each type of high-maturity area, and determine the order of strawberry picking; The illumination uniformity of high-maturity areas was analyzed by combining local entropy analysis with regional segmentation and clustering methods to evaluate the degree of illumination sufficiency in high-maturity areas. Specifically: The high maturity area image is divided into multiple small areas using a regional segmentation algorithm; Calculate the local entropy value of each small area, and generate characteristic data of illumination uniformity in the small area based on the local entropy value, including: Convert each small area into a grayscale image; calculate the local entropy value of the grayscale image of each small area; use the local entropy value as the characteristic data of the illumination uniformity of the small area; The clustering method is used to classify the local entropy values ​​of small areas, distinguish between areas with uniform illumination and areas with uneven illumination, and form clustering results; According to the results of cluster analysis, the degree of sufficient light in the high-maturity area is quantitatively evaluated: the number of small areas with uniform light and the total number of small areas in the clustering results are counted, and the proportion of areas with uniform light in the high-maturity area is marked as the light sufficiency index; The directionality of water paths in high-maturity areas is analyzed by using directional gradient histogram and regional segmentation technology, and the degree of water concentration in high-maturity areas is evaluated. Specifically: Acquire near-infrared images of strawberry fruits in high-maturity areas to capture water absorption characteristics, including water absorption intensity, water distribution pattern, and water path characteristics; The moisture absorption intensity is determined by the brightness of different moisture content areas in the strawberry fruit in the near-infrared image; the moisture distribution pattern is described by capturing the boundary changes between the moisture-concentrated area and the moisture-less area in the strawberry fruit in the near-infrared image; the moisture path characteristics are determined by the specific stripes or streamlined structures shown in the near-infrared image when the moisture of the strawberry fruit flows from the outside to the inside or from the bottom to the top; The near-infrared image of strawberry fruit is divided into multiple small areas using a region segmentation algorithm. Calculate the directional gradient histogram in each small area, extract the directional characteristics of the moisture path, and obtain the gradient direction distribution of the small area; Analyze the concentration of water paths based on the directional characteristics of small areas and assess the degree of water concentration in high-maturity areas; The directional gradient histogram is calculated in each small area, the directional characteristics of the moisture path are extracted, and the gradient direction distribution of the small area is obtained, specifically: For each small area of ​​the near-infrared image, the image gradient algorithm is used to calculate the gradient amplitude and gradient direction of each pixel in the small area; The pixel gradient direction in the small area is divided into certain angle intervals, and the number of pixels in each direction interval is counted to form a direction histogram; The direction histogram of each small area is used as the directional feature of the small area; The concentration of water paths is analyzed based on the directional characteristics of small areas, and the degree of water concentration in high-maturity areas is evaluated, specifically: Based on the directional characteristics of each small area, a clustering algorithm is used to group the small areas and distinguish between areas with consistent directions and areas with scattered directions; The directional consistency score of each small area is calculated by the following formula: ;in, For the The directional consistency score of a small area, For the The total number of pixels in a small area, For the The gradient direction of pixels, It is The number of pixels in a small area, is the average gradient direction of the small area, is the number of the small area; The directional consistency scores of small areas with the same direction are summed up and then divided by the total number of small areas to obtain the moisture concentration index; Based on the degree of light and water concentration in the high-maturity area, the predicted maturity of strawberries in each high-maturity area is dynamically determined, specifically: The light sufficiency index and water concentration index are normalized, and the normalized light sufficiency index and water concentration index are respectively assigned weight coefficients to calculate the strawberry prediction maturity coefficient, which is expressed as follows: ;in, is the predicted maturity coefficient of strawberry, and They are the normalized light sufficiency index and water concentration index, and are the weight coefficients of the light sufficiency index and the water concentration index, respectively, and and Both are greater than 0.

2. The method for quickly distinguishing the maturity of strawberries based on machine learning according to claim 1, wherein: Based on the machine learning algorithm, the strawberry picking area is divided into immature areas and high maturity areas, specifically: Comprehensively collect images of the strawberry planting area to obtain original image data containing strawberry fruits; Preprocess the collected raw image data, including image denoising, brightness correction, color balancing and size standardization; The preprocessed images are subjected to feature extraction using a machine learning algorithm to obtain feature data of strawberry fruits as a basis for classification. The feature data includes color features, shape features, and texture features. Based on the extracted feature data, the classification model was trained using supervised learning methods to classify strawberry fruits into two categories: immature and highly mature, and a maturity discrimination model was constructed. The maturity discrimination model is applied to predict the preprocessed images, and the strawberry planting area is divided into immature areas and high maturity areas according to the classification results.

3. The method for quickly distinguishing the maturity of strawberries based on machine learning according to claim 2, wherein: The high maturity areas are classified by predicting the maturity of strawberries, and the regional correlation of each type of high maturity area is analyzed to determine the order of strawberry picking, which is as follows: According to the calculated strawberry predicted maturity coefficient, the high maturity area is divided into different maturity level categories; Obtain and record the geographic location information of each high maturity area in the planting area; Analyze the geographical proximity of each type of high-maturity region and extract groups of regions with close proximity; Determine the order in which the strawberries should be picked based on regional relevance and maturity grade categories.

4. A strawberry maturity rapid discrimination system based on machine learning, for implementing the strawberry maturity rapid discrimination method based on machine learning described in any one of claims 1-3, characterized in that, It includes machine learning division module, light sufficiency assessment module, water accumulation assessment module, maturity prediction analysis module and regional correlation analysis module; Machine learning division module: divides the strawberry picking area into immature areas and high-maturity areas based on machine learning algorithms; Light sufficiency assessment module: analyzes the uniformity of light in high-maturity areas through local entropy analysis combined with regional segmentation and clustering methods to assess the degree of light sufficiency in high-maturity areas; Water concentration assessment module: Analyze the directionality of water paths in high-maturity areas through directional gradient histogram and regional segmentation technology to assess the degree of water concentration in high-maturity areas; Prediction and maturity analysis module: Based on the degree of light exposure and water concentration in the high-maturity area, the predicted maturity of strawberries in each high-maturity area is dynamically determined; Regional correlation analysis module: Classify high-maturity areas by predicting the maturity of strawberries, analyze the regional correlation of each type of high-maturity area, and determine the order of strawberry picking.

Citation Information

Patent Citations

  • Quick discrimination device and method for kiwi fruit maturity

    CN110031408A

  • Nondestructive detection method for blueberry maturity based on deep convolutional neural network

    CN110736709A