Rice whole kernel rate detection method and system based on image recognition and quality fitting

By constructing a quality coefficient mapping model between paddy rice and brown rice and brown rice and milled rice, and combining it with image recognition technology, the head rice yield of paddy rice can be detected without weighing. This solves the problems of cumbersome procedures and reliance on weighing equipment in traditional methods, and improves detection accuracy and efficiency.

CN121540706BActive Publication Date: 2026-04-21SINOGRAIN CHENGDU STORAGE RESEARCH INSTITUTE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SINOGRAIN CHENGDU STORAGE RESEARCH INSTITUTE CO LTD
Filing Date
2026-01-19
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing methods for testing the head rice yield of rice are cumbersome, inefficient, heavily reliant on weighing equipment, and susceptible to human error, making it difficult to achieve accurate and non-destructive testing.

Method used

A detection method based on image recognition and quality fitting is constructed. By building a quality coefficient mapping model between paddy rice and brown rice and brown rice and milled rice, a deep learning network model is used to identify paddy rice varieties and head rice rate, realizing weigh-free detection throughout the entire process.

Benefits of technology

It enables weightless detection of the entire process from paddy rice to whole rice, simplifying the detection process, improving detection accuracy and efficiency, and reducing equipment dependence and human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121540706B_ABST
    Figure CN121540706B_ABST
Patent Text Reader

Abstract

This invention relates to the field of rice testing technology, and discloses a method and system for detecting the head rice percentage of rice based on image recognition and quality fitting. It aims to solve the problems of cumbersome processes, low efficiency, and reliance on weighing equipment in existing methods. The solution mainly includes: pre-constructing a quality coefficient mapping model; acquiring first individual images of the rice sample to be tested, its hulled brown rice sample, and the milled rice sample obtained from the brown rice sample; identifying each first individual image to determine the rice variety; identifying head rice and broken rice, calculating the percentage of head rice in the milled rice sample, and calculating the total volume of the rice image, the total volume of the brown rice and milled rice images, the average aspect ratio, and the average thickness; querying the quality coefficient mapping model to determine the corresponding quality coefficient; and calculating the head rice percentage of the rice sample to be tested. This invention achieves weigh-free detection and improves detection accuracy and efficiency, making it particularly suitable for grain purchasing, processing, and storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rice detection technology, specifically to a method and system for detecting the head rice yield of rice based on image recognition and quality fitting. Background Technology

[0002] The head rice yield of paddy rice refers to the percentage of whole, polished rice obtained after all a certain amount of paddy rice has been hulled and milled into polished rice. The head rice yield is a key indicator for evaluating paddy rice quality and milling yield. Accurate and rapid detection of the head rice yield is of great significance for grain procurement, processing, and quality breeding.

[0003] Currently, the detection of head rice yield in paddy rice mainly relies on traditional methods specified in relevant standards. The typical steps of this method include: first, accurately weighing the net mass of a paddy rice sample using a balance; then, dehulling the sample using a rice huller to obtain brown rice, followed by milling the brown rice into polished rice using a rice milling machine; next, manually separating the head rice and broken rice, and weighing them separately; finally, calculating the head rice yield using a formula. While this method is accurate, it has the following inherent drawbacks:

[0004] First, the process is more complicated and time-consuming: the whole process involves multiple steps such as rice hulling, brown rice milling, and separation of whole rice and broken rice. The operation steps are complicated, the skill requirements for the inspectors are high, and it takes a long time to test a sample.

[0005] Second, it relies heavily on precision weighing equipment: the accuracy of the method depends heavily on the precision and stability of the balance, and weighing is required at multiple stages such as paddy rice, brown rice, and polished rice, which increases the dependence on equipment and the risk of error accumulation.

[0006] Third, human error is introduced: the process of distinguishing and separating whole rice from broken rice largely depends on the subjective experience and visual judgment of the inspectors. There may be differences in judgment between different operators, which affects the objectivity and repeatability of the results.

[0007] Although machine vision-based methods for rice quality inspection have emerged in recent years, existing technologies mainly focus on single-stage inspections. For indicators like head rice yield, which involves quality transformation across multiple stages, current visual inspection solutions still rely heavily on physical weighing equipment. Most solutions still require weighing the rice first and then using image features as a proportional reference for weight calculation, failing to achieve truly weightless inspection. Furthermore, existing technologies lack systematic modeling of the quality transformation relationships throughout the entire rice-brown rice-milled rice processing chain, making it difficult to achieve accurate and reliable non-destructive inspection of head rice yield. Summary of the Invention

[0008] This invention aims to solve the problems of cumbersome process, low efficiency and reliance on weighing equipment in existing methods for detecting the head rice yield of rice. It proposes a method and system for detecting the head rice yield of rice based on image recognition and quality fitting.

[0009] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0010] In a first aspect, the present invention provides a method for detecting the head rice yield of rice based on image recognition and quality fitting, the method comprising:

[0011] Pre-construct the first mass coefficient mapping model and the second mass coefficient mapping model;

[0012] The first quality coefficient mapping model is used to establish the mapping relationship between the rice variety, the total image volume of the rice sample and the corresponding total image volume, average aspect ratio and average thickness of the brown rice sample and the first quality coefficient; the first quality coefficient is used to represent the ratio between the total mass of the rice sample and the total mass of the brown rice sample obtained after hulling.

[0013] The second quality coefficient mapping model is used to establish the mapping relationship between the total image volume of rice varieties and brown rice samples and the total image volume, average aspect ratio, and average thickness of their corresponding milled rice samples and the second quality coefficient; the second quality coefficient is used to represent the ratio between the total mass of the brown rice sample and the total mass of the milled rice sample obtained after milling.

[0014] Collect the first monomer images of the rice sample to be tested, the brown rice sample obtained after hulling, and the polished rice sample obtained after milling the brown rice sample, and preprocess each first monomer image.

[0015] The rice variety is determined by identifying each first individual image using a pre-trained deep learning network model; whole rice and broken rice are identified in the polished rice sample, the mass percentage of whole rice in the polished rice sample is calculated as B%, and the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 and the average thickness H2 of the polished rice sample are calculated.

[0016] Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested.

[0017] Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be detected.

[0018] The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

[0019] Furthermore, the method for constructing the first quality coefficient mapping model includes:

[0020] Second monomer images of multiple rice samples of known varieties and known quality, as well as their hulled brown rice samples, were collected, and each second monomer image was preprocessed.

[0021] The pre-trained deep learning network model is used to identify each second individual image and calculate the total image volume of the rice sample. Total image volume of brown rice sample The average length-to-width ratio of the brown rice samples and the average thickness of the brown rice sample Simultaneously measure the total mass M1 of the rice sample and the total mass M2 of the brown rice sample;

[0022] Calculate the actual first mass coefficient between the total mass M1 of the rice sample and the total mass M2 of the brown rice sample obtained after hulling. According to the actual first quality coefficient Calculate the actual first correction factor for each sample. The calculation formula is as follows:

[0023] ;

[0024] ;

[0025] The average length-to-width ratio of rice varieties and brown rice samples and the average thickness of the brown rice sample As characteristic parameters, with the actual first correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the first correction coefficient K1. Based on the prediction model with the first correction coefficient K1, a first quality coefficient mapping model is constructed as follows:

[0026] ;

[0027] in, , represents the prediction model with the first correction coefficient K1, and P represents the rice variety.

[0028] Furthermore, the method for constructing the second quality coefficient mapping model includes:

[0029] Collect images of the third monomers of multiple brown rice samples of known varieties and qualities and their milled rice samples, and preprocess each third monomer image.

[0030] The pre-trained deep learning network model is used to identify each third individual image and calculate the total image volume of the brown rice sample. Total image volume of rice sample The average length-to-width ratio of the polished rice samples Average thickness of rice samples Simultaneously measure the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample;

[0031] Calculate the actual second mass coefficient between the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample obtained after milling. According to the actual second quality coefficient Calculate the actual second correction factor for each sample. The calculation formula is as follows:

[0032] ;

[0033] ;

[0034] The average length-to-width ratio of rice varieties and polished rice samples Average thickness of rice samples As characteristic parameters, with the actual second correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the second correction coefficient K2. Based on the prediction model with the second correction coefficient K2, a second quality coefficient mapping model is constructed as follows:

[0035] ;

[0036] in, , represents the prediction model with the second correction coefficient K2, and P represents the rice variety.

[0037] Furthermore, the formula for calculating the head rice yield R is as follows:

[0038] .

[0039] Furthermore, the calculation methods for the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, and the total image volume V3 of the polished rice sample include:

[0040] The first individual image corresponding to the rice sample, brown rice sample, or polished rice sample to be detected is analyzed, and the outline pixel area and thickness of the corresponding rice, brown rice, or polished rice are calculated. Each grain of rice, each grain of brown rice, or each grain of polished rice is regarded as a geometric body. Based on its outline pixel area and thickness, the individual image volume of rice, brown rice, or polished rice is calculated. The sum of the individual image volumes of all rice grains is the total image volume V1 of the rice sample to be detected, the sum of the individual image volumes of all brown rice grains is the total image volume V2 of the brown rice sample, and the sum of the individual image volumes of all polished rice grains is the total image volume V3 of the polished rice sample.

[0041] Furthermore, the method for calculating the outline pixel area of ​​each grain of rice, brown rice, and polished rice includes:

[0042] For each individual image of rice, brown rice, or polished rice, obtain its corresponding frontal projection image, and determine the corresponding contour pixel area based on the number of pixels in the region formed by the contour of rice, brown rice, or polished rice in the frontal projection image.

[0043] Furthermore, the calculation methods for the average aspect ratio A1 of the brown rice sample and the average aspect ratio A2 of the milled rice sample include:

[0044] For the first individual image of each grain of brown rice or each grain of polished rice, obtain its corresponding front projection image and calculate the minimum bounding rectangle of its outline.

[0045] The pixel value of the longer side of the minimum bounding rectangle is taken as the length of the brown rice or polished rice grain, and the pixel value of the shorter side is taken as the width of the brown rice or polished rice grain. The aspect ratio of a single brown rice or polished rice grain, that is, the ratio of length to width, is calculated.

[0046] The average length-to-width ratio A1 of the brown rice samples was calculated by arithmetically averaging the length-to-width ratios of all tested brown rice samples; the average length-to-width ratio A2 of the milled rice samples was calculated by arithmetically averaging the length-to-width ratios of all tested milled rice samples.

[0047] Furthermore, the calculation methods for the average thickness H1 of the brown rice sample and the average thickness H2 of the milled rice sample include:

[0048] For each individual image of brown rice or each individual image of milled rice, obtain its corresponding side projection image, calculate the maximum pixel value of its contour in the thickness direction, and use it as the thickness of that brown rice or milled rice grain.

[0049] The average thickness H1 of the brown rice sample was calculated by arithmetically averaging the thicknesses of all tested brown rice samples; the average thickness H2 of the milled rice sample was calculated by arithmetically averaging the thicknesses of all tested milled rice samples.

[0050] Furthermore, the method for calculating the mass percentage B% includes:

[0051] The first individual image of the polished rice sample is analyzed, and a pre-trained deep learning network model is used to identify and classify whole polished rice and broken rice.

[0052] Calculate the total image volume V4 of all whole milled rice and the total image volume V3 of all milled rice, respectively.

[0053] The mass percentage B% is the percentage of the total image volume V4 of whole rice to the total image volume V3 of the rice sample.

[0054] Secondly, the present invention provides a rice head rice yield detection system based on image recognition and quality fitting, used to implement the rice head rice yield detection method based on image recognition and quality fitting described in the first aspect, the system comprising:

[0055] An image acquisition device is used to acquire first individual images of a rice sample to be tested, a brown rice sample obtained after hulling, and a polished rice sample obtained after milling the brown rice sample.

[0056] A rice hulling device is used to remove the husks from rice samples to obtain brown rice samples.

[0057] A rice milling device is used to mill a brown rice sample to obtain a polished rice sample;

[0058] The processing unit, electrically connected to the image acquisition device, internally stores a pre-built first quality coefficient mapping model and a second quality coefficient mapping model, as well as a pre-trained deep learning network model, and is configured to perform the following operations:

[0059] Preprocess the first single-unit image acquired;

[0060] The deep learning network model is used to identify each preprocessed first individual image to determine the rice variety; the whole rice and broken rice in the polished rice sample are identified, the mass percentage of whole rice in the polished rice sample is calculated as B%, and the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample, and the average thickness H2 of the polished rice sample are calculated.

[0061] Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested.

[0062] Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be detected.

[0063] The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

[0064] The beneficial effects of this invention are as follows: The method and system for detecting the head rice rate of paddy rice based on image recognition and quality fitting provided by this invention establishes the quality conversion relationship between paddy rice and brown rice and brown rice and milled rice by constructing two quality coefficient mapping models, respectively. Combined with the identification of the proportion of head rice, it realizes the whole-process weigh-free detection from paddy rice to head rice. It not only completely eliminates the dependence on physical weighing equipment and significantly simplifies the detection process, but also ensures the detection accuracy through the dual-coefficient fitting model, providing a brand-new technical path for paddy rice quality detection. Attached Figure Description

[0065] Figure 1 A flowchart illustrating the method for detecting head rice yield based on image recognition and quality fitting provided in this embodiment;

[0066] Figure 2 This is a schematic diagram of the structure of the rice head rice rate detection system based on image recognition and quality fitting provided in the embodiment. Detailed Implementation

[0067] Traditional methods for detecting whole rice yield rely heavily on multiple precise weighings using physical balances and manual judgment, resulting in cumbersome processes, low efficiency, susceptibility to environmental interference, and significant subjective errors. To address these issues, this invention proposes a solution that establishes two quality coefficient mapping models to define the quality conversion relationships between paddy rice and brown rice, and between brown rice and polished rice, thereby achieving weigh-free detection throughout the entire process from paddy rice to whole rice.

[0068] Specifically, this invention proposes a dual-coefficient fitting technique. By constructing a first quality coefficient mapping model and a second quality coefficient mapping model, a quality bridge is established between paddy rice and brown rice using the first quality coefficient (the mass ratio of paddy rice to brown rice), and a quality bridge is established between brown rice and milled rice using the second quality coefficient (the mass ratio of brown rice to milled rice). Finally, by combining the whole rice percentage (B%), the weightless calculation of the whole rice yield is achieved. This invention fully utilizes the inherent quality correlations between various stages in the paddy rice processing process, and through the combination of image features and machine learning algorithms, it completely replaces the traditional weighing process.

[0069] The technical solutions in this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0070] Figure 1 A flowchart illustrating a method for detecting head rice yield in rice based on image recognition and quality fitting is shown. Please refer to [link / reference]. Figure 1 The method includes the following steps:

[0071] Step 1: Construct the quality coefficient mapping model:

[0072] Pre-construct the first mass coefficient mapping model and the second mass coefficient mapping model;

[0073] The first quality coefficient mapping model is used to establish the mapping relationship between the rice variety, the total image volume of the rice sample and the corresponding total image volume, average aspect ratio and average thickness of the brown rice sample and the first quality coefficient; the first quality coefficient is used to represent the ratio between the total mass of the rice sample and the total mass of the brown rice sample obtained after hulling.

[0074] The second quality coefficient mapping model is used to establish the mapping relationship between the total image volume of rice varieties, brown rice samples and their corresponding total image volume, average aspect ratio and average thickness of milled rice samples and the second quality coefficient; the second quality coefficient is used to represent the ratio between the total mass of the brown rice sample and the total mass of the milled rice sample.

[0075] The core of this step lies in establishing two independent quality conversion models, corresponding to the quality conversion relationships in the paddy-brown rice and brown rice-milled rice processing stages, respectively. The inventors discovered that the mass ratio of paddy to brown rice and the mass ratio of brown rice to milled rice are not constant, but rather exhibit a definite functional relationship with the paddy variety, morphological characteristics, and volume ratio. This functional relationship can be accurately characterized by the product of the volume ratio and a correction coefficient. The correction coefficient is primarily influenced by variety, length-to-width ratio, and thickness, reflecting the systematic impact of differences in husk density and thickness among different paddy varieties, as well as grain fullness, on the quality conversion relationship. By using machine learning algorithms to perform regression analysis on these multidimensional features, an accurate predictive model for the correction coefficient can be constructed, leading to the construction of a quality coefficient mapping model. Based on this, this step constructs a first quality coefficient mapping model and a second quality coefficient mapping model for the paddy-brown rice and brown rice-milled rice processing stages, respectively, thereby achieving quality conversion.

[0076] In this embodiment, the method for constructing the first quality coefficient mapping model includes steps 101 to 104:

[0077] Step 101: Collect second monomer images of multiple rice samples of known varieties and known quality and their hulled brown rice samples, and preprocess each second monomer image;

[0078] Step 102: Use a pre-trained deep learning network model to identify each second individual image and calculate the total image volume of the rice sample. Total image volume of brown rice sample The average length-to-width ratio of the brown rice samples and the average thickness of the brown rice sample Simultaneously measure the total mass M1 of the rice sample and the total mass M2 of the brown rice sample;

[0079] Step 103: Calculate the actual first mass coefficient between the total mass M1 of the rice sample and the total mass M2 of the brown rice sample obtained after hulling. According to the actual first quality coefficient Calculate the actual first correction factor for each sample. The calculation formula is as follows:

[0080] ;

[0081] ;

[0082] Step 104: Using the average length-to-width ratio of rice varieties and brown rice samples. and the average thickness of the brown rice sample As characteristic parameters, with the actual first correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the first correction coefficient K1. Based on the prediction model with the first correction coefficient K1, a first quality coefficient mapping model is constructed as follows:

[0083] ;

[0084] in, , represents the prediction model with the first correction coefficient K1, and P represents the rice variety.

[0085] In practical applications, at least 500 samples of paddy rice and brown rice corresponding to the target rice variety are collected. Each sample is accurately weighed to obtain M1 and M2, and the actual first quality coefficient is calculated. And based on the actual first quality coefficient Calculate the actual first correction factor: Simultaneously, a standard image acquisition system was used to acquire second individual images of each sample of rice and its corresponding brown rice. Image processing algorithms were then used to calculate the image quality of each sample. , , , Next, with (P, , ) as input features, with For the target value, a random forest or neural network algorithm is used for training to obtain the prediction model with the first correction coefficient K1. Then, based on this prediction model, a complete first quality coefficient mapping model is constructed: .

[0086] In this embodiment, the method for constructing the second quality coefficient mapping model includes steps 111 to 114:

[0087] Step 111: Collect images of the third monomer of multiple brown rice samples of known varieties and known quality and their milled rice samples, and preprocess each third monomer image.

[0088] Step 112: Use a pre-trained deep learning network model to identify each third individual image and calculate the total image volume of the brown rice sample. Total image volume of rice sample The average length-to-width ratio of the polished rice samples Average thickness of rice samples Simultaneously measure the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample;

[0089] Step 113: Calculate the actual second mass coefficient between the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample obtained after milling. According to the actual second quality coefficient Calculate the actual second correction factor for each sample. The calculation formula is as follows:

[0090] ;

[0091] ;

[0092] Step 114: Using the average length-to-width ratio of rice varieties and polished rice samples. Average thickness of rice samples As characteristic parameters, with the actual second correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the second correction coefficient K2. Based on the prediction model with the second correction coefficient K2, a second quality coefficient mapping model is constructed as follows:

[0093] ;

[0094] in, , represents the prediction model with the second correction coefficient K2, and P represents the rice variety.

[0095] In practical applications, at least 500 samples of brown rice and polished rice corresponding to the target rice variety are collected. Each sample is accurately weighed to obtain M2 and M3, and the actual second quality coefficient is calculated. And based on the actual second quality coefficient Calculate the actual second correction factor: Simultaneously, a standard image acquisition system was used to acquire the third individual image of each sample of brown rice and its corresponding milled rice. Image processing algorithms were then used to calculate the image quality of each sample. , , , Next, with (P, , ) as input features, with Using the target value, a random forest or neural network algorithm is used for training to obtain the prediction model with the second correction coefficient K2. Then, based on this prediction model, a complete second quality coefficient mapping model is constructed: .

[0096] In the above steps, the total image volume of the rice sample is... Total image volume of brown rice sample The average length-to-width ratio of the brown rice samples and the average thickness of the brown rice sample and the total image volume of the rice sample. The average length-to-width ratio of the polished rice samples Average thickness of rice samples The calculation method is the same as that used in step 3 for calculating the total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 and the average thickness H2. For detailed calculation methods, please refer to the specific implementation method in step 3, which will not be repeated here.

[0097] Step 2, Image Acquisition and Preprocessing:

[0098] First individual images of the rice sample to be tested, the brown rice sample obtained after hulling, and the polished rice sample obtained after milling the brown rice sample are collected, and each first individual image is preprocessed.

[0099] High-quality image data is fundamental to ensuring the accuracy of subsequent recognition and calculation. This step acquires digital images of the sample under test using standardized acquisition equipment, and preprocesses them to eliminate environmental interference and highlight target features.

[0100] In practical applications, specialized tools (such as the grain appearance quality index detector disclosed in application publication number CN116893127A) can be used to acquire images of each grain of rice sample to be tested and the brown rice sample obtained after hulling. Specifically, a vibrating device can be used to separate the sample grain by grain, and the grains can be conveyed to the shooting position by a conveyor belt. Then, a camera can capture images of each grain to obtain the first individual image of the rice sample to be tested. After shooting, the sample is automatically fed into a rice hulling device by a conveyor belt for hulling, and then conveyed to the shooting position by a conveyor belt by grain again. The camera can capture images of each grain to obtain the first individual image of the brown rice sample obtained after hulling. After shooting, the sample is automatically fed into a rice milling device by a conveyor belt for milling, and then conveyed to the shooting position by a conveyor belt by grain again. The camera can capture images of each grain to obtain the first individual image of the polished rice sample obtained after milling. Each first individual image includes a front projection image and a side projection image of each grain of rice, brown rice, or polished rice.

[0101] In practical applications, image preprocessing can specifically include binarization filtering, which involves filtering and image grayscale segmentation. Filtering reduces pixel noise, while image grayscale segmentation distinguishes between graphics and background based on grayscale values ​​and threshold values. Preprocessing each initial unit image can effectively improve the accuracy of subsequent pixel area determination.

[0102] Step 3: Image recognition and parameter calculation:

[0103] The rice variety is determined by identifying each first individual image using a pre-trained deep learning network model; whole rice and broken rice are identified in the polished rice sample, and the mass percentage of whole rice in the polished rice sample is calculated as B%. The total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 and the average thickness H2 of the polished rice sample are also calculated.

[0104] This step converts images into key parameters. A deep learning model simulates the discriminative ability of human experts to automatically identify variety and quality status; simultaneously, computer vision algorithms precisely quantify morphological and volumetric features.

[0105] The rice varieties mentioned include japonica rice, indica rice, and glutinous rice.

[0106] In practical applications, the first individual image corresponding to the rice sample to be detected can be used to identify rice varieties using a multi-task deep learning model based on the ResNet architecture, while the first individual image corresponding to the polished rice sample can be used to identify whole polished rice and broken rice using a multi-task deep learning model based on the ResNet architecture.

[0107] In this embodiment, the method for calculating the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, and the total image volume V3 of the polished rice sample includes:

[0108] The first individual image corresponding to the rice sample, brown rice sample, or polished rice sample to be detected is analyzed, and the outline pixel area and thickness of the corresponding rice, brown rice, or polished rice are calculated. Each grain of rice, each grain of brown rice, or each grain of polished rice is regarded as a geometric body. Based on its outline pixel area and thickness, the individual image volume of rice, brown rice, or polished rice is calculated. The sum of the individual image volumes of all rice grains is the total image volume V1 of the rice sample to be detected, the sum of the individual image volumes of all brown rice grains is the total image volume V2 of the brown rice sample, and the sum of the individual image volumes of all polished rice grains is the total image volume V3 of the polished rice sample.

[0109] The geometric body can be an ellipsoid or a cylinder. In practical applications, the volume model of the corresponding geometric body can be used to calculate the volume of the corresponding single image. For example, the volume model of a cylinder is: volume = contour area × thickness.

[0110] In this embodiment, the method for calculating the outline pixel area of ​​each grain of rice, brown rice, and milled rice includes:

[0111] For each individual image of rice, brown rice, or polished rice, obtain its corresponding frontal projection image, and determine the corresponding contour pixel area based on the number of pixels in the region formed by the contour of rice, brown rice, or polished rice in the frontal projection image.

[0112] In this embodiment, the method for calculating the length-to-width ratio of each grain of brown rice and milled rice includes:

[0113] For each individual image of brown rice or polished rice in the brown rice sample, obtain its corresponding frontal projection image and calculate the minimum bounding rectangle of its outline; take the long side pixel value of the minimum bounding rectangle as the length of the brown rice or polished rice grain, and the short side pixel value as the width of the brown rice or polished rice grain, and calculate the aspect ratio of a single brown rice or polished rice grain, that is, the ratio of length to width.

[0114] The average length-to-width ratio A1 of the brown rice sample can be calculated by taking the arithmetic mean of the length-to-width ratios of all the tested brown rice samples, and the average length-to-width ratio A2 of the tested milled rice sample can be calculated by taking the arithmetic mean of the length-to-width ratios of all the tested milled rice samples.

[0115] In this embodiment, the method for calculating the thickness of each grain of brown rice and milled rice includes:

[0116] For each individual image of brown or white rice, obtain its corresponding side projection image, calculate the maximum pixel value of its contour in the thickness direction, and use it as the thickness of that brown or white rice grain.

[0117] The average thickness H1 of the brown rice sample can be calculated by taking the arithmetic mean of the thicknesses of all the tested brown rice samples, and the average thickness H2 of the tested milled rice sample can be calculated by taking the arithmetic mean of the thicknesses of all the tested milled rice samples.

[0118] Through the above process, the automatic identification of rice varieties, whole rice and broken rice is realized, greatly reducing manual intervention; and through precise morphological feature (volume, aspect ratio, thickness) calculation, reliable input parameters are provided for quality estimation.

[0119] Step 4: Determine the quality coefficient:

[0120] Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested.

[0121] Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be tested.

[0122] This step involves substituting the previously acquired feature parameters into the pre-trained model and obtaining the crucial quality coefficients through mathematical calculations. Its core lies in mapping the image feature space to a quality relation space, and determining the final quality coefficients through correction coefficients and volume ratios.

[0123] In practical applications, the rice variety P, average aspect ratio A1, and average thickness H1 obtained in step 3 are used to form a feature vector, which is then input into the prediction model with the first correction coefficient K1 constructed in step 1. In the process, the first correction coefficient K1 is obtained. At the same time, the image volume ratio V1 / V2 of paddy rice and brown rice is calculated. Finally, the value of the first quality coefficient C1 is calculated according to the formula C1=K1×(V1 / V2).

[0124] Similarly, the rice variety P, average aspect ratio A2, and average thickness H2 obtained in step 3 are used to form a feature vector, which is then input into the prediction model with the second correction coefficient K2 constructed in step 1. In this process, the second correction coefficient K2 is obtained. Simultaneously, the image volume ratio V2 / V3 of brown rice and milled rice is calculated. Finally, the value of the second quality coefficient C2 is calculated using the formula C2=K2×(V2 / V3).

[0125] The above steps achieve the key transformation from visual parameters to quality parameters. By correcting the basic volume ratio with varietal characteristics through correction coefficients, accurate coefficients representing the mass ratio of paddy rice to brown rice and the mass ratio of brown rice to milled rice are obtained, providing core parameters for the final head rice yield calculation.

[0126] Step 5: Calculate the head rice yield:

[0127] The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

[0128] This step transforms traditional mass calculation into image volume calculation through innovative mathematical formulas. The principle lies in using a mass coefficient to bridge the gap between image volume and physical mass, enabling whole-rice yield calculation without weighing. The formula for calculating the whole-rice yield R is as follows:

[0129] .

[0130] In the above calculation formula, the numerator B% represents the proportion of whole rice in the polished rice, and the denominator... This represents the total mass conversion factor from paddy rice to polished rice. The calculation result is rounded to two decimal places and directly output to the display interface.

[0131] Through the above process, whole rice yield detection based entirely on image analysis was finally achieved. The entire process requires no weighing operation, which greatly improves detection efficiency while ensuring calculation accuracy consistent with national standard methods.

[0132] In summary, this embodiment transforms the traditional head rice yield detection, which relies on physical weighing, into a purely visual calculation by constructing a quality coefficient mapping model that integrates rice variety, morphological characteristics, and image volume ratio. This achieves full automation and weighing-free detection. This solution not only overcomes the reliance on precision balances and the subjectivity of human judgment inherent in traditional methods, but also significantly improves detection accuracy and efficiency through intelligent algorithms that fuse multiple features. Simultaneously, it drastically reduces equipment costs and operational barriers, providing a reliable technological innovation path for grain quality detection.

[0133] Based on the above technical solutions, this embodiment also proposes a rice head rice rate detection system based on image recognition and quality fitting, used to implement the rice head rice rate detection method based on image recognition and quality fitting described in the embodiment. Please refer to [link to relevant documentation]. Figure 2 The system includes:

[0134] An image acquisition device is used to acquire first individual images of a rice sample to be tested, a brown rice sample obtained after hulling, and a polished rice sample obtained after milling the brown rice sample.

[0135] A rice hulling device is used to remove the husks from rice samples to obtain brown rice samples.

[0136] A rice milling device is used to mill a brown rice sample to obtain a polished rice sample;

[0137] The processing unit, electrically connected to the image acquisition device, internally stores a pre-built first quality coefficient mapping model and a second quality coefficient mapping model, as well as a pre-trained deep learning network model, and is configured to perform the following operations:

[0138] Preprocess the first single-unit image acquired;

[0139] The deep learning network model is used to identify each preprocessed first individual image to determine the rice variety; the whole rice and broken rice in the polished rice sample are identified, the mass percentage of whole rice in the polished rice sample is calculated as B%, and the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample, and the average thickness H2 of the polished rice sample are calculated.

[0140] Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested.

[0141] Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be detected.

[0142] The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

[0143] It is understood that the rice head rice rate detection system based on image recognition and quality fitting described in this embodiment is a system for implementing the rice head rice rate detection method based on image recognition and quality fitting described in the embodiment. As the system disclosed in the embodiment corresponds to the method disclosed in the embodiment, the description is relatively simple. For relevant parts, please refer to the description of the method. It will not be repeated here.

Claims

1. A method for detecting head rice yield in rice based on image recognition and quality fitting, characterized in that, The method includes: Pre-construct the first mass coefficient mapping model and the second mass coefficient mapping model; The first quality coefficient mapping model is used to establish the mapping relationship between rice variety, the total image volume of rice sample and the total image volume, average aspect ratio and average thickness of corresponding brown rice sample and the first quality coefficient; the first quality coefficient is used to represent the ratio between the total mass of rice sample and the total mass of brown rice sample obtained after hulling. The second quality coefficient mapping model is used to establish the mapping relationship between the total image volume of rice varieties and brown rice samples and the total image volume, average aspect ratio, and average thickness of their corresponding milled rice samples and the second quality coefficient; the second quality coefficient is used to represent the ratio between the total mass of the brown rice sample and the total mass of the milled rice sample obtained after milling. Collect the first monomer images of the rice sample to be tested, the brown rice sample obtained after hulling, and the polished rice sample obtained after milling the brown rice sample, and preprocess each first monomer image. The rice variety is determined by identifying each first individual image using a pre-trained deep learning network model; whole rice and broken rice are identified in the polished rice sample, the mass percentage of whole rice in the polished rice sample is calculated as B%, and the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 and the average thickness H2 of the polished rice sample are calculated. Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested. Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be detected. The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2. The method for constructing the first quality coefficient mapping model includes: Second monomer images of multiple rice samples of known varieties and known quality, as well as their hulled brown rice samples, were collected, and each second monomer image was preprocessed. The pre-trained deep learning network model is used to identify each second individual image and calculate the total image volume of the rice sample. Total image volume of brown rice sample The average length-to-width ratio of the brown rice samples and the average thickness of the brown rice sample Simultaneously measure the total mass M1 of the rice sample and the total mass M2 of the brown rice sample; Calculate the actual first mass coefficient between the total mass M1 of the rice sample and the total mass M2 of the brown rice sample obtained after hulling. According to the actual first quality coefficient Calculate the actual first correction factor for each sample. The calculation formula is as follows: ; ; The average length-to-width ratio of rice varieties and brown rice samples and the average thickness of the brown rice sample As characteristic parameters, with the actual first correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the first correction coefficient K1. Based on the prediction model with the first correction coefficient K1, a first quality coefficient mapping model is constructed as follows: ; in, , represents the prediction model with the first correction coefficient K1, and P represents the rice variety; The method for constructing the second quality coefficient mapping model includes: Collect images of the third monomers of multiple brown rice samples of known varieties and qualities and their milled rice samples, and preprocess each third monomer image. The pre-trained deep learning network model is used to identify each third individual image and calculate the total image volume of the brown rice sample. Total image volume of rice sample The average length-to-width ratio of the polished rice samples Average thickness of rice samples Simultaneously measure the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample; Calculate the actual second mass coefficient between the total mass M2 of the brown rice sample and the total mass M3 of the polished rice sample obtained after milling. According to the actual second quality coefficient Calculate the actual second correction factor for each sample. The calculation formula is as follows: ; ; The average length-to-width ratio of rice varieties and polished rice samples Average thickness of rice samples As characteristic parameters, with the actual second correction coefficient Using the target value, a regression algorithm is used for fitting and training to obtain a prediction model with the second correction coefficient K2. Based on the prediction model with the second correction coefficient K2, a second quality coefficient mapping model is constructed as follows: ; in, , represents the prediction model with the second correction coefficient K2, and P represents the rice variety; The formula for calculating the head rice yield R is as follows: 。 2. The method for detecting head rice yield based on image recognition and quality fitting according to claim 1, characterized in that, The calculation methods for the total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, and the total image volume V3 of the polished rice sample include: The first individual image corresponding to the rice sample, brown rice sample, or polished rice sample to be detected is analyzed, and the outline pixel area and thickness of the corresponding rice, brown rice, or polished rice are calculated. Each grain of rice, each grain of brown rice, or each grain of polished rice is regarded as a geometric body. Based on its outline pixel area and thickness, the individual image volume of rice, brown rice, or polished rice is calculated. The sum of the individual image volumes of all rice grains is the total image volume V1 of the rice sample to be detected, the sum of the individual image volumes of all brown rice grains is the total image volume V2 of the brown rice sample, and the sum of the individual image volumes of all polished rice grains is the total image volume V3 of the polished rice sample.

3. The method for detecting head rice yield based on image recognition and quality fitting according to claim 2, characterized in that, The method for calculating the outline pixel area of ​​each grain of rice, brown rice, and white rice includes: For each individual image of rice, brown rice, or polished rice, obtain its corresponding frontal projection image, and determine the corresponding contour pixel area based on the number of pixels in the region formed by the contour of rice, brown rice, or polished rice in the frontal projection image.

4. The method for detecting head rice yield based on image recognition and quality fitting according to claim 1, characterized in that, The methods for calculating the average aspect ratio A1 of the brown rice sample and the average aspect ratio A2 of the milled rice sample include: For the first individual image of each grain of brown rice or each grain of polished rice, obtain its corresponding front projection image and calculate the minimum bounding rectangle of its outline. The pixel value of the longer side of the minimum bounding rectangle is taken as the length of the brown rice or polished rice grain, and the pixel value of the shorter side is taken as the width of the brown rice or polished rice grain. The aspect ratio of a single brown rice or polished rice grain, that is, the ratio of length to width, is calculated. The average length-to-width ratio A1 of the brown rice samples was calculated by arithmetically averaging the length-to-width ratios of all tested brown rice samples; the average length-to-width ratio A2 of the milled rice samples was calculated by arithmetically averaging the length-to-width ratios of all tested milled rice samples.

5. The method for detecting head rice yield of rice based on image recognition and quality fitting according to claim 1, characterized in that, The methods for calculating the average thickness H1 of the brown rice sample and the average thickness H2 of the milled rice sample include: For each individual image of brown rice or each individual image of milled rice, obtain its corresponding side projection image, calculate the maximum pixel value of its contour in the thickness direction, and use it as the thickness of that brown rice or milled rice grain. The average thickness H1 of the brown rice sample was calculated by arithmetically averaging the thicknesses of all tested brown rice samples; the average thickness H2 of the milled rice sample was calculated by arithmetically averaging the thicknesses of all tested milled rice samples.

6. The method for detecting head rice yield of rice based on image recognition and quality fitting according to claim 1, characterized in that, The method for calculating the mass percentage B% includes: The first individual image of the polished rice sample is analyzed, and a pre-trained deep learning network model is used to identify and classify whole polished rice and broken rice. Calculate the total image volume V4 of all whole milled rice and the total image volume V3 of all milled rice, respectively. The mass percentage B% is the percentage of the total image volume V4 of whole rice to the total image volume V3 of the rice sample.

7. A rice head rice rate detection system based on image recognition and quality fitting, characterized in that, The system for implementing the rice head rice yield detection method based on image recognition and quality fitting as described in any one of claims 1 to 6, the system comprising: An image acquisition device is used to acquire first individual images of a rice sample to be tested, a brown rice sample obtained after hulling, and a polished rice sample obtained after milling the brown rice sample. A rice hulling device is used to remove the husks from rice samples to obtain brown rice samples. A rice milling device is used to mill a brown rice sample to obtain a polished rice sample; The processing unit, electrically connected to the image acquisition device, internally stores a pre-built first quality coefficient mapping model and a second quality coefficient mapping model, as well as a pre-trained deep learning network model, and is configured to perform the following operations: Preprocess the first single-unit image acquired; The deep learning network model is used to identify each preprocessed first individual image to determine the rice variety; the whole rice and broken rice in the polished rice sample are identified, the mass percentage of whole rice in the polished rice sample is calculated as B%, and the total image volume V1 of the rice sample to be detected, the total image volume V2 of the brown rice sample, the average aspect ratio A1 and the average thickness H1 of the brown rice sample, and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample, and the average thickness H2 of the polished rice sample are calculated. Based on the identified rice variety, the calculated total image volume V1 of the rice sample to be tested, the total image volume V2 of the brown rice sample, the average aspect ratio A1 of the brown rice sample, and the average thickness H1 of the brown rice sample, the first quality coefficient mapping model is queried to determine the first quality coefficient C1 corresponding to the rice sample to be tested. Based on the identified rice variety, the calculated total image volume V2 of the brown rice sample and the total image volume V3 of the polished rice sample, the average aspect ratio A2 of the polished rice sample and the average thickness H2 of the polished rice sample, the second quality coefficient mapping model is queried to determine the second quality coefficient C2 corresponding to the rice sample to be detected. The head rice percentage R of the rice sample to be tested is calculated based on the mass percentage B%, the first mass coefficient C1, and the second mass coefficient C2.

Citation Information

Patent Citations

  • Grain appearance quality index detector

    CN116893127A

  • Paddy quality index full-process detection method and device

    CN120510098A

  • Method and apparatus for analyzing quality traits of grain or seed

    US20050074146A1