Device and method for detecting appearance quality of brown rice
By designing a rice brown rice appearance quality detection device, using a concealed box platform, transmitting lights, folding plates and RGB cameras, combined with deep learning models, the accuracy of brown rice appearance quality detection and rice grain adhesion problems are solved, and the automation and comprehensive analysis of brown rice appearance quality is achieved.
Patent Information
- Application Number
- CN202510158917.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-30
AI Technical Summary
It is difficult to accurately detect the appearance quality of brown rice in the prior art, and rice grains in traditional equipment are prone to excessive adhesion or overlap, affecting the detection accuracy.
A rice brown rice appearance quality detection device was designed, using a concealed box platform, transmitting light, folding board and RGB camera, to control the equipment operation through the CNC board, and use deep learning models to perform automated analysis of the appearance quality of brown rice.
The automation and comprehensive analysis of brown rice appearance quality indicators has been achieved, the problems of excessive adhesion and overlap of rice grains have been solved, and the accuracy and efficiency of detection have been improved.
Smart Images

Figure CN120064280A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an appearance quality detection device and method, and particularly to a device and method for detecting the appearance quality of rough rice of rice. Background Art
[0002] Appearance quality is an important index of rice quality, which has an important impact on the economic value of rice. Compared with polished rice that has removed the embryo, aleurone layer and outer tissues, rough rice completely retains the biological characteristics of the grain, which is a comprehensive reflection of the interaction between the genetic characteristics of the variety itself and the environment, and has physiological indication significance.
[0003] The current common rice quality detection standards of rice appearance quality detectors all take polished rice as the object, lacking detection techniques for the appearance quality of rough rice, and can only accurately provide a few indicators such as the rough rice rate and the rough rice germ rate. In addition, since rough rice retains complex components such as the embryo, seed coat, aleurone layer, and outer endosperm, directly applying the detection algorithm for polished rice to rough rice will directly affect the detection accuracy of indicators such as the chalky grain rate and chalkiness degree of rough rice. According to characteristics such as grain shape, chalkiness, and color, rough rice grains can be divided into various types such as perfect rice, belly white rice, heart white rice, back white rice, green rice, deformed rice, broken rice, red rust rice, etc. Among them, due to its special positional relationship, belly white rice is difficult to identify.
[0004] The existing rice appearance quality detector developed and sold by Top Instrument can be used for the analysis of the appearance shape of seeds and rice in the wild or laboratory. It is a professional instrument that can automatically detect the appearance quality indicators of paddy and rice after obtaining rice images through a scanner, but lacks classification and statistical information on the appearance quality of rough rice, and is difficult to meet the detection needs of researchers for the appearance quality of rough rice. In addition, during the process of collecting images by the existing device, when rice grains are randomly scattered on the scanner, problems such as excessive adhesion or even overlap are likely to occur. Although a rice spreading device is designed to disperse the rice grains, excessive adhesion of rice grains will still randomly occur during the process of the rice grains falling from the spreading device onto the scanner plane. Summary of the Invention
[0005] Object of the Invention: The object of the present invention is to provide a device for detecting the appearance quality of rough rice of rice to solve the problem of excessive adhesion or even overlap of rice grains in traditional equipment, and achieve automatic and comprehensive analysis of the appearance quality indicators of rough rice. On the other hand, a method for detecting the appearance quality of rough rice of rice is provided.
[0006] Technical Solution: A device for detecting the appearance quality of rough rice of rice according to the present invention includes a folding plate above the internal transmission lamp in the dark box platform, which is used to improve the arrangement of rice grains and assist in identifying the belly chalkiness of rough rice grains. An RGB camera is installed above the dark box platform, and a numerical control board for controlling the switch of the RGB camera, the switch of the transmission lamp, brightness, and color temperature is arranged on the side. The RGB camera is connected to a computer through a data cable.
[0007] Preferably, it further includes a protective cover placed above the RGB camera.
[0008] Preferably, the folding plate is made of transparent resin material.
[0009] Preferably, the opening of the folding plate is 90°, and the inclined plane angle is 10°.
[0010] A method for detecting the appearance quality of paddy brown rice according to the present invention includes the following steps:
[0011] (1) Start the paddy brown rice appearance quality detection device through the numerical control board, run the RGB camera and the projection lamp, and adjust the brightness and color temperature of the projection lamp to the specified mode;
[0012] (2) Install the EOS Utility software matching the RGB camera in the computer;
[0013] (3) Randomly sprinkle the brown rice to be measured on the folding plate, gently shake it to make the brown rice to be measured arranged at the bottom of the inclined plane of the folding plate, and send the folding plate onto the projection lamp in the dark box platform;
[0014] (4) Add the basic information of the collection of brown rice samples in the EOS Utility software, set the sample number, the saving path of the picture and the detection result of the brown rice appearance quality, set the shooting mode of the RGB camera through the EOS Utility software, preview the sample status in real time in the software interface window, and operate the software to obtain the image data of the sample;
[0015] (5) Process the image data through the trained deep learning model, conduct the estimation of the brown rice appearance quality detection, add the estimation result to the system interface, and at the same time compress and save the original data and the estimation result in the database of the software;
[0016] (6) Repeat steps 3 - 5. After all samples are detected, batch or selectively download the data in the system database to the local storage of the computer.
[0017] Preferably, the basic information of the collection described in step 4 includes variety, growth period, and fertilization amount.
[0018] Preferably, step 5 specifically includes the following steps:
[0019] (51) Perform preprocessing operations on the obtained sample image data to extract single grain images;
[0020] (52) Label each single grain image as eight types: perfect rice, belly white rice, heart white rice, compound chalky rice, green rice, deformed rice, broken rice, and other types of imperfect rice;
[0021] (53) Process the labeled single grain image, and use the stratified sampling method to divide the dataset into a training set, a validation set, and a test set according to 8:1:1;
[0022] (54) Train the deep learning model, compare and train a variety of convolutional neural networks and their variants, evaluate the recognition effect of the model through four evaluation indicators of accuracy, precision, recall, and F1, and obtain the optimal model BR-Restnet50;
[0023] (55) Through the BR-Restnet50 model, identify the types of brown rice grains, and count the indicators of the number of whole rice grains, broken rice grains, perfect rice grains, chalky rice grains, green rice grains, deformed rice grains, other rice grains, and chalky grain rate;
[0024] (56) Through the minimum bounding rectangle algorithm, realize the detection of the grain shape traits of each brown rice grain of each type, and count the average value index of the grain shape trait detection.
[0025] Preferably, the preprocessing operation described in step 51 includes grayscale conversion, binarization, erosion, dilation, and the positioning of connected components.
[0026] Preferably, the processing operation described in step 53 includes rotation, flipping, contrast enhancement, brightness adjustment, color enhancement, saturation adjustment, Gaussian blur, and deformation.
[0027] Preferably, the various convolutional neural networks described in step 54 specifically include VGG, ResNet, SqueezeNet, DenseNet, EfficientNet, and Transformer networks.
[0028] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages: 1. Through the design of the inclined surface of the folding resin plate, the presentation mode of the rice grains is improved, the recognition of the belly chalkiness of brown rice grains is enhanced, and the problem of excessive adhesion or even overlap of rice grains in traditional equipment is solved; 2. Based on the new artificial intelligence technology, train the deep learning model to realize the automatic analysis of the appearance quality indicators of rice brown rice. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a three-dimensional schematic diagram of the present invention;
[0030] Figure 2 is a schematic diagram of the folding plate design process of the present invention;
[0031] Figure 3 are the three views of the folding plate of the present invention, where Figure 3 A represents the side view, Figure 3 B represents the front view, Figure 3 C represents the top view;
[0032] Figure 4 Schematic diagrams of brown rice grains of the present invention in the device (A) and the actual environment (B);
[0033] Figure 5 Schematic diagram of the visual inspection result of the brown rice sample of the present invention;
[0034] Figure 6 Schematic diagram of the inspection result of the brown rice sample of the present invention. Detailed implementation manners
[0035] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0036] A rice brown rice appearance quality inspection device includes a dark box platform 1. Above the light transmission lamp 2 inside the dark box platform 1, a folding plate 3 is placed. Above the dark box platform 1, an RGB camera 4 is installed. A numerical control board 5 is arranged on the side. The RGB camera 4 is connected to a computer 7 through a data cable 6.
[0037] A method for inspecting the appearance quality of rice brown rice by using the rice brown rice appearance quality inspection device is as follows:
[0038] (1) Start the rice brown rice appearance quality inspection device through the numerical control board 5, run the RGB camera 4 and the light transmission lamp 2, and adjust the brightness and color temperature of the light transmission lamp 2 to the specified mode. Among them, the RGB camera selects the Canon EOS RP model produced by Canon (China) Co., Ltd.;
[0039] (2) Connect the computer 7 to the RGB camera through the data cable 6, and install the EOS Utility software matching the RGB camera in the computer 7;
[0040] (3) Select a transparent resin material as the folding plate 3. Design the length of the folding plate 3 to be 315.2 mm, the width to be 200 mm, the height to be 4 mm, the inclined plane to be 10°, and the opening to be 90°. Randomly sprinkle the brown rice to be tested on the folding plate 3, and gently shake it to make the brown rice to be tested arranged at the bottom of the inclined plane of the folding plate and evenly arranged. Finally, send the folding plate 3 onto the light transmission lamp 2 in the dark box platform 1, and ensure that the position of the brown rice does not shift during the feeding process;
[0041] The design process of the folding plate is as follows:
[0042] When rice grains are placed naturally on a plane, the abdomen of the grains cannot be observed in the top view direction, resulting in that it is impossible or difficult to identify whether there is a white belly in the grains from the taken photos ( Figure 2 A). Therefore, a folding plate is designed, which can make the abdomen of the grains face upward and the white belly is easy to be identified ( Figure 2B), with the grain belly facing up, the ventral white obscures the dorsal white, resulting in the dorsal white being unrecognizable. Therefore, the grain needs to be tilted appropriately so that the ventral white can be displayed without affecting the recognition of the dorsal white. Figure 2 C);
[0043] Figure 2 D is a perspective view observed from the base direction of the rice grain. When the brown rice grain is placed on a horizontal plane, the state presented is not that the dorsal-ventral direction is parallel to the horizontal plane as shown in Figure 2 D, but rather the belly or back of the grain is attached to the plane as shown in 2E or Figure 2 F, such that the line connecting the dorsal and ventral directions of the grain forms a certain angle with the horizontal plane;
[0044] Ideally, tilting the grain at 45° is the optimal angle to balance the simultaneous presentation of the ventral white and the dorsal white. Figure 2 G), therefore, the tilt angle of the folding plate was designed with the goal of tilting the grain at 45°. As shown in Figure 2 H, if the designed tilt angle of the folding plate is ∠1 and the angle of the grain itself is ∠2, then:
[0045] ∠2 + ∠1 = 45° (1);
[0046]
[0047] Combining (1) and (2) gives:
[0048]
[0049] The thickness of the japonica brown rice grain is 1.3 - 2.3 mm, and the grain width is 1.7 - 3.0 mm. After taking the average, the tilt angle ∠1 of the folding plate can be obtained as 7.55°. Considering that too small an angle would cause the grain to stay on the inclined plane due to greater frictional resistance, the final design of the inclined angle of the inclined plane is 10°;
[0050] The height of the folding plate is determined by the grain width. The maximum grain width of the japonica rice grain is 3 mm, and the thickness of the folding plate itself is 1 mm. The final design of the height is 4 mm. To eliminate the occlusion of the rice grains by the folding plate in the top view direction, an enlarged opening angle is also designed, such as Figure 2 ∠3 in H, which is equal to ∠1 at 10°. Thus, the inclined plane of the folding plate is 10° and the opening is 90°.
[0051] On this basis, connecting the contents shown in multiple Figure 2 H can obtain the folding plate Figure 2 I). Sprinkling the rice grains on the folding plate and gently shaking, the rice grains will naturally slide into the bottom of the opening and line up in multiple columns, solving the problem of excessive adhesion or even overlap of the rice grains in traditional equipment.
[0052] (4) Add the basic information of the variety, growth period, and fertilization amount of the brown rice samples in the EOS Utility software, set the sample number, the saving paths of the pictures and the detection results of the appearance quality of the brown rice, set the shooting mode of the RGB camera through the EOS Utility software, preview the sample status in real time in the software interface window, and operate the software to obtain the image data of the samples;
[0053] (5) Perform processing such as grayscale conversion, binarization, erosion, dilation, and localization of connected components on the collected 1156 pieces of image data in sequence, and extract 7174 single grains. Each single grain image is respectively labeled as 8 types, namely perfect rice, belly white rice, core white rice, compound chalky rice, green rice, deformed rice, broken rice, and other types of imperfect rice (belly represents belly white rice, broken represents broken rice, compound represents compound chalky rice, core represents core white rice, deformed represents deformed rice, green represents green rice, other represents other rice, perfect represents perfect rice); perform processing such as rotation, flipping, contrast enhancement, brightness adjustment, color enhancement, saturation adjustment, Gaussian blur, and deformation on the single grain images with data annotation, expand the dataset, increase the sample diversity, and use the stratified sampling method to divide the dataset into a training set, a validation set, and a test set according to 8:1:1;
[0054] Train a deep learning model, train and compare a variety of convolutional neural networks and their variants, including Very Deep Convolutional Networks (VGG), Deep Residual Networks (ResNet), SqueezeNet, Densely Connected Convolutional Networks (DenseNet), and EfficientNet, etc., and also train the Transformer network for comparison; evaluate the recognition effect of the model through 4 evaluation indicators, namely accuracy (ACC), precision (P), recall (R), and F1 (F1-Score), and finally obtain the optimal model BR-Restnet50;
[0055] Through the BR-Restnet50 model, identify the types of brown rice grains, realize the detection of the occurrence of brown rice grain types, and count indicators such as the number of whole grains, the number of broken grains, the number of perfect grains, the number of chalky grains (the number of belly white grains, the number of core white grains, the number of compound chalky grains), the number of green grains, the number of deformed grains, the number of other grains, and the chalky grain rate; through the minimum bounding rectangle algorithm, realize the detection of grain shape traits such as the length, width, and length-width ratio of each brown rice grain of each type, and count indicators such as the average length, the average width, and the average length-width ratio;
[0056] Estimate the appearance quality of brown rice through detection indicators, add the estimation results to the system interface, and at the same time compress and save the original data and the estimation results in the software database.
[0057] (6) Repeat steps 3 - 5. After all samples are detected, batch or selectively download the data in the system database to the local storage of the computer.
Claims
1. A device for detecting the appearance quality of brown rice, characterized in that: The invention comprises a folding plate (3) placed above a transmission lamp (2) in a dark box platform (1) for improving the arrangement of rice grains and assisting in identifying the chalkiness of the belly of brown rice grains. An RGB camera (4) is installed above the dark box platform, a numerical control board (5) is arranged on the side, and the RGB camera is connected to a computer (7) via a data line (6).
2. The detection device according to claim 1, characterized in that: It also includes a protective cover (8) placed above the RGB camera.
3. The detection device according to claim 1, characterized in that: The folding plate is made of transparent resin material.
4. The detection device according to claim 1, characterized in that: The folding plate has an opening of 90° and a bevel angle of 10°.
5. A method for detecting the appearance quality of brown rice, characterized in that: The following steps are involved: (1) starting the brown rice appearance quality detection device through the numerical control board, running the RGB camera and the transmission light, and adjusting the brightness and color temperature of the transmission light to a specified mode; (2) Install the EOS Utility software that matches the RGB camera on your computer; (3) randomly scattering the brown rice to be tested on a folding board, shaking it slightly so that the brown rice to be tested is arranged at the bottom of the inclined surface of the folding board, and placing the folding board on the transmission lamp in the dark box platform; (4) adding the basic information of the brown rice sample collection in the EOS Utility software, setting the sample number, picture and brown rice appearance quality test result saving path, setting the shooting mode of the RGB camera through the EOS Utility software, previewing the sample status in real time in the software interface window, and operating the software to obtain the image data of the sample; (5) Processing image data through the trained deep learning model, estimating the appearance quality of brown rice, adding the estimation result to the system interface, and compressing and saving the original data and the estimation result in the database of the software; (6) Repeat steps 3-5. After all samples are tested, download the data in the system database in batches or selectively to the local computer storage.
6. The detection method according to claim 5, characterized in that: The basic information collected in step 4 includes variety, growth period, and fertilizer amount.
7. The detection method according to claim 5, characterized in that: Step 5 specifically includes the following steps: (51) performing preprocessing operations on the acquired sample image data to extract a single grain image; (52) Each single grain image was labeled as eight types: perfect rice, belly white rice, heart white rice, compound chalky rice, green rice, deformed rice, broken rice, and other types of imperfect rice; (53) The labeled single grain images were processed, and the dataset was divided into training set, validation set, and test set in the ratio of 8:1:1 using the stratified sampling method; (54) Train a deep learning model, train and compare a variety of convolutional neural networks and their variants, evaluate the recognition effect of the model through four evaluation indicators: accuracy, precision, recall, and F1, and obtain the optimal model BR-Restnet50; (55) The BR-Restnet50 model was used to identify the types of brown rice grains, and the number of whole rice grains, broken rice grains, perfect rice grains, chalky rice grains, green rice grains, deformed rice grains, other rice grains, and chalky grain rate were counted; (56) The minimum circumscribed rectangle algorithm is used to detect the grain shape characteristics of each type of brown rice, and the average value of the grain shape characteristics is calculated.
8. The detection method according to claim 7, characterized in that: The preprocessing operations in step 51 include graying, binarization, corrosion, expansion and positioning of connected domains.
9. The detection method according to claim 7, characterized in that: The processing operations described in step 53 include rotation, flipping, contrast enhancement, brightness adjustment, color enhancement, saturation adjustment, Gaussian blur and deformation.
10. The detection method according to claim 7, characterized in that: The multiple convolutional neural networks described in step 54 specifically include VGG, ResNet, SqueezeNet, DenseNet, EfficientNet and Transformer networks.