A method for identifying maturity of rice
By using image processing and remote sensing technology to identify rice maturity and provide personalized harvesting suggestions, this technology solves the problem that the judgment of rice maturity in existing technologies relies on human experience and regional differences, thereby improving the quality of rice.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG ANCHU BIG DATA TECH CO LTD
- Filing Date
- 2023-07-14
- Publication Date
- 2026-04-10
AI Technical Summary
Current methods for judging rice maturity rely on human experience, making it difficult to guarantee the quality of rice in large-scale paddy fields. Furthermore, existing machine vision systems cannot provide harvesting suggestions for different regions.
Using image processing techniques and feature extraction methods, images of rice paddies are collected by drones, and grayscale conversion, edge enhancement, color space conversion, and threshold segmentation are performed. Combined with remote sensing technology, the growth status of rice is analyzed, a scoring matrix is established, and personalized harvesting suggestions are provided.
It improves the accuracy and flexibility of rice maturity assessment, enabling targeted harvesting measures based on the maturity of rice in different regions, thereby improving rice quality.
Smart Images

Figure CN117173553B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of rice planting, and particularly relates to a rice maturity recognition method. BACKGROUND
[0002] Rice is usually harvested in summer and autumn. On the appearance, when the husk of each spike grain is yellowed by more than 95% or the grain rachis and auxiliary husks are yellowed by more than 95%, the rice grain is shaped and hardened, and is transparent, which is the standard of physiological maturity. The standard of rice maturity is that the dry matter weight in the grain reaches the maximum, that is, the commonly said perfect ripening period. On the appearance, when the husk of each spike grain is yellowed by more than 95% or the grain rachis and auxiliary husks are yellowed by more than 95%, the rice grain is shaped and hardened, and is transparent, which is the standard of physiological maturity, and at this time, it is the best period of rice harvesting. However, the existing rice maturity is judged by artificial means, which is too dependent on personal experience. The rice maturity in a large area of paddy field is not the same, and the unified harvesting method cannot guarantee the quality of rice.
[0003] In order to solve the problems existing in the prior art, people have carried out long-term exploration and put forward various kinds of solutions. For example, Chinese patent document discloses a rice harvester path planning control system based on machine vision [202011496340.X], which includes a paddy field image acquisition module for acquiring images of all paddy fields to be harvested; a paddy field image processing module for identifying the maturity of rice in each paddy field from the images; a path planning module for planning the harvesting sequence of the paddy fields according to the maturity from high to low; a paddy field image acquisition module for acquiring paddy field images of each paddy field; a paddy field image processing module for extracting a seedling line from the paddy field images; a path planning module for planning the rice harvesting path of each paddy field according to the seedling line; a sampling planning module for planning the harvesting sampling points according to the paddy field images and the rice harvesting path; a rice image acquisition module for acquiring rice images at the harvesting sampling points; and a rice image analysis module for processing and analyzing the rice quality.
[0004] The above scheme solves the problem of rice maturity recognition to some extent, but the scheme still has many deficiencies, such as being unable to provide corresponding harvesting suggestions for different areas of the paddy field. SUMMARY
[0005] The purpose of the present application is to solve the above-mentioned problems, and to provide a rice maturity recognition method which is reasonably designed and can provide corresponding harvesting suggestions according to the rice maturity.
[0006] In order to achieve the above-mentioned purpose, the following technical scheme is adopted in the present application: a rice maturity recognition method, comprising the following steps:
[0007] S1: data acquisition and preprocessing;
[0008] S2: feature extraction and maturity recognition are performed on the data;
[0009] S3: harvesting suggestion is provided according to the maturity recognition result.
[0010] In the rice maturity recognition method, step S1 includes the following steps:
[0011] S11: rice images are collected and a data set is established;
[0012] S12: weighted average is performed on the RGB image to obtain a gray-scale image;
[0013] S13: geometric transformation and interpolation processing are performed on the gray-scale image;
[0014] S14: the image is enhanced by using a spatial domain method.
[0015] In the rice maturity recognition method, step S1 includes the following steps:
[0016] S15: Gaussian blur and edge detection are performed on the gray-scale image, and edge enhancement is performed by using closed operation enhancement;
[0017] S16: the image contour successively selects each inflection point and the relative distance of the remaining inflection points, and the largest distance is taken as the image length;
[0018] S17: the maximum distance of the remaining inflection points and the straight line where the image length is located is calculated as the image width;
[0019] S18: the image scale is imported, and the actual length and width and their ratio are calculated;
[0020] S19: the length and width and their ratio threshold are set, and abnormal images are removed.
[0021] In the rice maturity recognition method, step S2 includes the following steps:
[0022] S21: the sample and its rice index time series curve are analyzed, and the relevance of the rice planting area proportion in each pixel and the key phenological period on the rice vegetative growth and reproductive growth EVI time series curve is judged;
[0023] S22: each pixel is set to be mixed by rice and other vegetation, and a single spectral feature time series curve is regarded as a spectral curve, and each time series point of the curve is regarded as a single band;
[0024] S23: linear spectral decomposition is used to obtain the corresponding time series spectral values of the rice and other vegetation in the pixel;
[0025] S24: Construct a corresponding multiple linear model to obtain the abundance density of rice and other vegetation in each pixel.
[0026] In the rice maturity recognition method, step S2 includes the following steps:
[0027] S25: Labeling the rice image using Labeling and importing the sklearn library;
[0028] S26: Read the rice image data and label, and use SIFT for feature extraction;
[0029] S27: Divide the data set into training set and test set, and then train the classifier;
[0030] S28: Use the classifier to predict the rice image and output the prediction result;
[0031] S29: Use the above model to recognize the shape of rice.
[0032] In the rice maturity recognition method, step S3 includes the following steps:
[0033] S31: Import the rice image;
[0034] S32: Perform color space conversion;
[0035] S33: Color segmentation;
[0036] S34: Perform target color detection.
[0037] In the rice maturity recognition method, step S32 includes the following steps:
[0038] S321: Read the image and filter;
[0039] S322: Convert the image from RGB to HSV color space;
[0040] In the rice maturity recognition method, step S33 includes the following steps:
[0041] S331: Use the createTrackbar function to perform threshold segmentation on each channel after color space conversion;
[0042] S332: Determine the threshold value corresponding to each color according to the threshold segmentation result;
[0043] S333: For different colors, respectively perform threshold segmentation on the image;
[0044] S334: Count the threshold segmentation result, determine the image color and output the classification result.
[0045] In the rice maturity recognition method, the step S34 comprises the following steps:
[0046] S341: importing the image contour;
[0047] S342: cutting the image of the region where the image contour is located from the original image;
[0048] S343: performing color segmentation on the image of the region where the image contour is located, counting the segmentation result, and judging the color of the image to classify.
[0049] In the rice maturity recognition method, the step S3 comprises the following steps:
[0050] S34: weighting the area, rice color, density, shape and size of different regions and establishing a score matrix;
[0051] S35: providing different harvesting measures for the area, rice color, density, shape and size of different score intervals;
[0052] S36: importing recommended harvesting measures in the score matrix, and generating recommended harvesting combination suggestions for each region.
[0053] Compared with the prior art, the advantages of the present application are that the rice maturity is recognized by using the feature extraction method, the harvesting suggestions are provided according to the rice maturity, so that the best rice quality is obtained; the rice maturity is considered from the aspects of area, rice color, density, shape and size, so that the accuracy of the rice maturity judgment is improved; different harvesting measure combinations are provided for different regions, and the harvesting mode is flexibly adjusted according to the needs. BRIEF DESCRIPTION OF DRAWINGS
[0054] Figure 1 is the method flowchart of the present application;
[0055] Figure 2 is the size recognition flowchart of the present application;
[0056] Figure 3 is the density recognition flowchart of the present application;
[0057] Figure 4 is the shape recognition flowchart of the present application;
[0058] Figure 5 is the color recognition flowchart of the present application. DETAILED DESCRIPTION
[0059] The present application will be further described in detail below in combination with the drawings and specific embodiments.
[0060] AsFigures 1-5 As shown, a rice maturity recognition method, the overall process is to collect rice field image data, judge the maturity of rice in each area according to the image data, generate and recommend different harvesting suggestions for different maturity, which specifically includes the following steps:
[0061] S1: data acquisition and preprocessing;
[0062] S2: feature extraction and maturity recognition are performed on the data;
[0063] S3: providing harvesting suggestions according to the maturity recognition results.
[0064] Specifically, similar to the existing image processing method, step S1 in the present application includes the following steps:
[0065] S11: using a drone and a high-definition camera to collect rice field images and establish a data set;
[0066] S12: weighted average of RGB image to get gray image to ensure image display effect and facilitate subsequent feature extraction;
[0067] S13: geometric transformation and interpolation processing are performed on the gray image to eliminate noise points;
[0068] S14: using spatial domain method to enhance the image, specifically using histogram equalization or histogram specification.
[0069] Further, step S1 mainly detects the rice by sampling, calculates the length and width specifications of the extracted rice contour, and after excluding abnormal images, the actual length and width specifications measured in the remaining images are used as subsequent weighted scoring parameters, including the following steps:
[0070] S15: Gaussian blur and edge detection are performed on the gray image, and edge enhancement is performed using closed operation enhancement;
[0071] S16: the relative distance of each inflection point to the remaining inflection points is selected in turn, and the largest distance is taken as the image length;
[0072] S17: calculate the maximum distance of the remaining inflection points to the straight line where the image length is as the image width;
[0073] S18: import the image scale, calculate the actual length and width and their ratio;
[0074] S19: set the length and width and their ratio threshold, and eliminate abnormal images.
[0075] Further, step S2 collects the paddy field distribution image by remote sensing, and identifies the rice and other vegetation according to the spectral information. In addition, the growth state of the rice can be determined by analyzing the spectral data of the rice, and the manager can formulate corresponding fertilization and disease control measures. Specifically, the following steps are included:
[0076] S21: Analyzing the sample and its rice index time series curve, determining the correlation between the rice planting area proportion in each pixel and the key phenological period on the rice vegetative growth and reproductive growth EVI time series curve;
[0077] S22: Setting each pixel as a mixture of rice and other vegetation, regarding the single spectral feature time series curve as a spectral curve, and regarding each time series point of the curve as a single band;
[0078] S23: Linear spectral decomposition is used to obtain the corresponding time series spectral values of the rice and other vegetation in the pixel;
[0079] S24: Constructing a corresponding multivariate linear model to obtain the abundance and density of the rice and other vegetation in each pixel.
[0080] Further, step S2 uses feature extraction to identify each part of the rice. After establishing a database using pre-collected images, the following steps are used:
[0081] S25: Labeling the rice image using Labeling and importing it into the sklearn library;
[0082] S26: Reading the rice image data and labels, and using SIFT for feature extraction;
[0083] S27: Dividing the data set into a training set and a test set, and then training the classifier;
[0084] S28: Using the classifier to predict the rice image and output the prediction results;
[0085] S29: Using the above model to identify the shape of the rice.
[0086] In addition, after step S2 constructs a rice recognition model using sample data, subsequent step S3 imports and recognizes the real-time collected rice image, and determines the growth stage of the rice according to the shape of the rice. Whether the rice has entered the mature stage is mainly determined by identifying the shape of the panicle. Specifically, the following steps are included:
[0087] S31: Importing the rice image;
[0088] S32: Color space conversion;
[0089] S33: Color segmentation;
[0090] S34: Perform target color detection.
[0091] Meanwhile, step S32 performs chroma conversion on the rice image, determines the maturity of the rice by recognizing the color of the ear of rice, and specifically includes the following steps:
[0092] S321: Read the image and filter it;
[0093] S322: Convert the image from RGB to HSV chroma space;
[0094] As can be seen, step S33 uses the color gamut of the rice image to determine its maturity and induces it into a scoring matrix, and specifically includes the following steps:
[0095] S331: Use the createTrackbar function to perform threshold segmentation on each channel after color space conversion;
[0096] S332: Determine the threshold value corresponding to each color according to the threshold segmentation result;
[0097] S333: For different colors, perform threshold segmentation on the image respectively;
[0098] S334: Count the threshold segmentation result, determine the color of the image, and output the classification result.
[0099] Obviously, step S34 includes the following steps:
[0100] S341: Import the image contour;
[0101] S342: Extract the image in the region where the image contour is located from the original image;
[0102] S343: Perform color segmentation on the image in the region where the image contour is located, count the segmentation result, determine the color of the image, and classify it.
[0103] Preferably, step S3 determines the growth state of the rice in a composite manner, establishes a scoring mechanism using a weighting algorithm, and provides different processing measures for different regions with different scores. According to the needs, choose mechanical unified purchase or manual harvesting, and demarcate the harvesting area on the image. It includes the following steps:
[0104] S34: For different regions, weight and establish a scoring matrix for the area, color, density, shape, and specifications of the rice;
[0105] S35: For different scoring intervals of the area, color, density, shape, and specifications of the rice, provide different harvesting measures. For regions with different maturity, use delayed harvesting or segmented harvesting. For regions with relatively uniform maturity, use unified harvesting.
[0106] S36: Import the recommended harvesting treatment measures in the scoring matrix, and generate a recommended harvesting combination suggestion for each region, for example, provide specific turning or drying measures, provide plowing suggestions for rice fields, prevent plowing from drying the land too early and causing compaction, and ensure soil maturity.
[0107] In summary, the principle of the present embodiment is to collect rice image data, perform feature extraction, and the like to comprehensively determine the growth state of the rice from specifications, density, morphology, spectral information, and the like, and then establish a scoring mechanism using a weighting method to provide different harvesting measures for different regions of the rice maturity.
[0108] The specific embodiments described herein are merely illustrative of the spirit of the present application. Those skilled in the art of the present application can make various modifications or supplements to the described specific embodiments or use similar ways to replace them, without deviating from the spirit of the present application or exceeding the scope defined by the appended claims.
[0109] Although the terms feature extraction, threshold, and the like are used more frequently herein, the possibility of using other terms is not excluded. The use of these terms is merely to facilitate the description and explanation of the essence of the present application; any interpretation of them as any kind of additional limitation is contrary to the spirit of the present application.
Claims
1. A method for identifying maturity of rice, characterized by, It comprises the following steps: S1: data acquisition and preprocessing; S2: feature extraction and maturity recognition; S21: analyze the sample and its rice index time curve, judge the correlation between the rice planting area proportion in each pixel and the key phenological period on the rice nutrition growth and reproductive growth EVI time curve; S22: set each pixel to be mixed by rice and other vegetation, regard the single spectral feature time curve as a spectral curve, and regard each time sequence point of the curve as a single band; S23: use linear spectral decomposition to obtain the corresponding time sequence spectral values of rice and other vegetation in the pixel; S24: construct a corresponding multiple linear model to obtain the abundance and density of rice and other vegetation in each pixel; S25: label the rice image using Labellmg and import it into the sklearn library; S26: read the rice image data and label, and use SIFT for feature extraction; S27: divide the data set into a training set and a test set, and then train the classifier; S28: use the classifier to predict the rice image and output the prediction result; S29: use the above model to recognize the rice shape; S3: provide harvesting suggestions according to the maturity recognition result.
2. The method of claim 1, wherein the method comprises: The step S1 comprises the following steps: S11: collect rice images and establish a data set; S12: perform weighted average on the RGB image to obtain a grayscale image; S13: perform geometric transformation and interpolation processing on the grayscale image; S14: enhance the image using the spatial domain method.
3. The method of claim 2, wherein the method is characterized by, The step S1 comprises the following steps: S15: perform Gaussian blur and edge detection on the grayscale image, and perform edge enhancement using closed operation enhancement; S16: select the maximum distance of each inflection point and the remaining inflection points as the image length; S17: calculate the maximum distance of the remaining inflection points and the straight line where the image length is located as the image width; S18: import the image scale, calculate the actual length and width and their ratio; S19: set the length-width ratio threshold value, and remove abnormal images.
4. The method of claim 1, wherein the method is characterized by, The step S3 comprises the following steps: S31: import the rice image; S32: perform color space conversion; S33: segment the color; S34: perform target color detection.
5. The method for identifying rice maturity according to claim 4, characterized in that, The step S32 comprises the following steps: S321: read the image and filter it; S322: convert the image from RGB to HSV color space.
6. The method of claim 4, wherein the step of determining the maturity of the rice plant is performed by using a model of the rice plant. The step S33 comprises the following steps: S331: use the createTrackbar function to perform threshold segmentation on each channel after color space conversion; S332: determine the threshold value corresponding to each color according to the threshold segmentation result; S333: for different colors, perform threshold segmentation on the image respectively; S334: count the threshold segmentation result, judge the image color and output the classification result.
7. The method of claim 4, wherein the step of determining the maturity of the rice plant is performed by using a color of the rice plant. The step S34 comprises the following steps: S341: import the image contour; S342: extract the image in the region where the image contour is located from the original image; S343: perform color segmentation on the image in the region where the image contour is located, count the segmentation result, judge the color of the image and classify it.
8. The method of claim 1, wherein the method is a method of identifying maturity of rice. The step S3 comprises the following steps: S34: For different areas, the area, rice color, density, shape, and specification are weighted and a score matrix is established; S35: For different score intervals of the area, rice color, density, shape, and specification, different harvesting treatment measures are provided respectively; S36: The recommended harvesting treatment measures are introduced into the score matrix, and a recommended harvesting combination suggestion is generated for each area.
Citation Information
Patent Citations
Rice harvester path planning control system based on machine vision
CN112734083A
Rice seedling leaf age identification method based on machine vision
CN114596509A