CN110221032B - Rice quality detection method based on near infrared spectrum - Google Patents
Rice quality detection method based on near infrared spectrum Download PDFInfo
- Publication number
- CN110221032B CN110221032B CN201910616591.8A CN201910616591A CN110221032B CN 110221032 B CN110221032 B CN 110221032B CN 201910616591 A CN201910616591 A CN 201910616591A CN 110221032 B CN110221032 B CN 110221032B
- Authority
- CN
- China
- Prior art keywords
- rice
- detected
- value
- pixel
- quality
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 235000007164 Oryza sativa Nutrition 0.000 title claims abstract description 257
- 235000009566 rice Nutrition 0.000 title claims abstract description 257
- 238000001514 detection method Methods 0.000 title claims abstract description 15
- 238000002329 infrared spectrum Methods 0.000 title claims abstract description 14
- 240000007594 Oryza sativa Species 0.000 title 1
- 241000209094 Oryza Species 0.000 claims abstract description 256
- 229920002472 Starch Polymers 0.000 claims abstract description 28
- 235000019698 starch Nutrition 0.000 claims abstract description 28
- 239000008107 starch Substances 0.000 claims abstract description 28
- 238000000034 method Methods 0.000 claims abstract description 16
- 239000003086 colorant Substances 0.000 claims abstract description 15
- 239000004744 fabric Substances 0.000 claims abstract description 10
- 239000002689 soil Substances 0.000 claims abstract description 9
- 235000015097 nutrients Nutrition 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 8
- IJGRMHOSHXDMSA-UHFFFAOYSA-N Atomic nitrogen Chemical compound N#N IJGRMHOSHXDMSA-UHFFFAOYSA-N 0.000 claims description 6
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 claims description 6
- 238000003306 harvesting Methods 0.000 claims description 5
- 101000878595 Arabidopsis thaliana Squalene synthase 1 Proteins 0.000 claims description 3
- ZOXJGFHDIHLPTG-UHFFFAOYSA-N Boron Chemical compound [B] ZOXJGFHDIHLPTG-UHFFFAOYSA-N 0.000 claims description 3
- OYPRJOBELJOOCE-UHFFFAOYSA-N Calcium Chemical compound [Ca] OYPRJOBELJOOCE-UHFFFAOYSA-N 0.000 claims description 3
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 claims description 3
- 101000713575 Homo sapiens Tubulin beta-3 chain Proteins 0.000 claims description 3
- 101000713585 Homo sapiens Tubulin beta-4A chain Proteins 0.000 claims description 3
- FYYHWMGAXLPEAU-UHFFFAOYSA-N Magnesium Chemical compound [Mg] FYYHWMGAXLPEAU-UHFFFAOYSA-N 0.000 claims description 3
- ZOKXTWBITQBERF-UHFFFAOYSA-N Molybdenum Chemical compound [Mo] ZOKXTWBITQBERF-UHFFFAOYSA-N 0.000 claims description 3
- OAICVXFJPJFONN-UHFFFAOYSA-N Phosphorus Chemical compound [P] OAICVXFJPJFONN-UHFFFAOYSA-N 0.000 claims description 3
- ZLMJMSJWJFRBEC-UHFFFAOYSA-N Potassium Chemical compound [K] ZLMJMSJWJFRBEC-UHFFFAOYSA-N 0.000 claims description 3
- NINIDFKCEFEMDL-UHFFFAOYSA-N Sulfur Chemical compound [S] NINIDFKCEFEMDL-UHFFFAOYSA-N 0.000 claims description 3
- 102100036790 Tubulin beta-3 chain Human genes 0.000 claims description 3
- 102100036788 Tubulin beta-4A chain Human genes 0.000 claims description 3
- 229910052796 boron Inorganic materials 0.000 claims description 3
- 239000011575 calcium Substances 0.000 claims description 3
- 229910052791 calcium Inorganic materials 0.000 claims description 3
- 229910052802 copper Inorganic materials 0.000 claims description 3
- 239000010949 copper Substances 0.000 claims description 3
- 238000012937 correction Methods 0.000 claims description 3
- 229910052742 iron Inorganic materials 0.000 claims description 3
- 239000011777 magnesium Substances 0.000 claims description 3
- 229910052749 magnesium Inorganic materials 0.000 claims description 3
- WPBNNNQJVZRUHP-UHFFFAOYSA-L manganese(2+);methyl n-[[2-(methoxycarbonylcarbamothioylamino)phenyl]carbamothioyl]carbamate;n-[2-(sulfidocarbothioylamino)ethyl]carbamodithioate Chemical compound [Mn+2].[S-]C(=S)NCCNC([S-])=S.COC(=O)NC(=S)NC1=CC=CC=C1NC(=S)NC(=O)OC WPBNNNQJVZRUHP-UHFFFAOYSA-L 0.000 claims description 3
- 229910052750 molybdenum Inorganic materials 0.000 claims description 3
- 239000011733 molybdenum Substances 0.000 claims description 3
- 229910052757 nitrogen Inorganic materials 0.000 claims description 3
- 239000011574 phosphorus Substances 0.000 claims description 3
- 229910052698 phosphorus Inorganic materials 0.000 claims description 3
- 239000011591 potassium Substances 0.000 claims description 3
- 229910052700 potassium Inorganic materials 0.000 claims description 3
- 239000011593 sulfur Substances 0.000 claims description 3
- 229910052717 sulfur Inorganic materials 0.000 claims description 3
- 239000011248 coating agent Substances 0.000 abstract description 2
- 238000000576 coating method Methods 0.000 abstract description 2
- 235000018102 proteins Nutrition 0.000 description 7
- 108090000623 proteins and genes Proteins 0.000 description 7
- 102000004169 proteins and genes Human genes 0.000 description 7
- 238000004497 NIR spectroscopy Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- GVJHHUAWPYXKBD-UHFFFAOYSA-N (±)-α-Tocopherol Chemical compound OC1=C(C)C(C)=C2OC(CCCC(C)CCCC(C)CCCC(C)C)(C)CCC2=C1C GVJHHUAWPYXKBD-UHFFFAOYSA-N 0.000 description 2
- 235000013339 cereals Nutrition 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- FPIPGXGPPPQFEQ-UHFFFAOYSA-N 13-cis retinol Natural products OCC=C(C)C=CC=C(C)C=CC1=C(C)CCCC1(C)C FPIPGXGPPPQFEQ-UHFFFAOYSA-N 0.000 description 1
- 108010061711 Gliadin Proteins 0.000 description 1
- 102000006395 Globulins Human genes 0.000 description 1
- 108010044091 Globulins Proteins 0.000 description 1
- 108010068370 Glutens Proteins 0.000 description 1
- 241000282414 Homo sapiens Species 0.000 description 1
- 240000005979 Hordeum vulgare Species 0.000 description 1
- 235000007340 Hordeum vulgare Nutrition 0.000 description 1
- 240000008467 Oryza sativa Japonica Group Species 0.000 description 1
- 244000062793 Sorghum vulgare Species 0.000 description 1
- 241000209140 Triticum Species 0.000 description 1
- 235000021307 Triticum Nutrition 0.000 description 1
- FPIPGXGPPPQFEQ-BOOMUCAASA-N Vitamin A Natural products OC/C=C(/C)\C=C\C=C(\C)/C=C/C1=C(C)CCCC1(C)C FPIPGXGPPPQFEQ-BOOMUCAASA-N 0.000 description 1
- 229930003427 Vitamin E Natural products 0.000 description 1
- 240000008042 Zea mays Species 0.000 description 1
- 235000005824 Zea mays ssp. parviglumis Nutrition 0.000 description 1
- 235000002017 Zea mays subsp mays Nutrition 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- FPIPGXGPPPQFEQ-OVSJKPMPSA-N all-trans-retinol Chemical compound OC\C=C(/C)\C=C\C=C(/C)\C=C\C1=C(C)CCCC1(C)C FPIPGXGPPPQFEQ-OVSJKPMPSA-N 0.000 description 1
- 150000001413 amino acids Chemical class 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 235000014633 carbohydrates Nutrition 0.000 description 1
- 150000001720 carbohydrates Chemical class 0.000 description 1
- 235000005822 corn Nutrition 0.000 description 1
- 235000019621 digestibility Nutrition 0.000 description 1
- 239000003925 fat Substances 0.000 description 1
- 235000019197 fats Nutrition 0.000 description 1
- 235000013305 food Nutrition 0.000 description 1
- WIGCFUFOHFEKBI-UHFFFAOYSA-N gamma-tocopherol Natural products CC(C)CCCC(C)CCCC(C)CCCC1CCC2C(C)C(O)C(C)C(C)C2O1 WIGCFUFOHFEKBI-UHFFFAOYSA-N 0.000 description 1
- 229910052500 inorganic mineral Inorganic materials 0.000 description 1
- 235000019713 millet Nutrition 0.000 description 1
- 239000011707 mineral Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 235000016709 nutrition Nutrition 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 235000019155 vitamin A Nutrition 0.000 description 1
- 239000011719 vitamin A Substances 0.000 description 1
- 235000019156 vitamin B Nutrition 0.000 description 1
- 239000011720 vitamin B Substances 0.000 description 1
- 235000019165 vitamin E Nutrition 0.000 description 1
- 229940046009 vitamin E Drugs 0.000 description 1
- 239000011709 vitamin E Substances 0.000 description 1
- 229940045997 vitamin a Drugs 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/24—Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/3563—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light for analysing solids; Preparation of samples therefor
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/359—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N33/00—Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
- G01N33/02—Food
- G01N33/10—Starch-containing substances, e.g. dough
Landscapes
- Physics & Mathematics (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- General Physics & Mathematics (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Analytical Chemistry (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Engineering & Computer Science (AREA)
- Food Science & Technology (AREA)
- Medicinal Chemistry (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a rice quality detection method based on near infrared spectrum, which is used for solving the problem of how to obtain the growth value of rice through the planting area, rainfall, soil quality and growth cycle of the rice, and obtaining the quality of the rice through the growth value; and how to place the rice on the black base fabric, and then, the rice image is acquired and amplified; obtaining a pixel grid occupied by the obtained rice, comparing the pixel grid with a pixel grid of comparison rice, and then coating three primary colors RGB on the pixel grid to further obtain a contour difference value of the rice so as to obtain the quality of the rice; the method comprises the following steps: s1: acquiring basic data of rice to be detected; the quality value of the rice to be detected is calculated through the growth value, the profile difference on the left side and the right side of the long shaft and the starch content, the growth value is larger, the quality value of the rice to be detected is larger, and the quality of the rice is better.
Description
Technical Field
The invention relates to the field of rice quality detection, in particular to a rice quality detection method based on near infrared spectrum.
Background
Rice is one of the staple foods of human beings, and according to modern nutritional analysis, the rice contains protein, fat, vitamin A, E and various minerals. In terms of variety, rice is classified into rice and glutinous rice. The rice contains about 75% of starch, 7% -8% of protein, 1.3% -1.8% of fat and rich B vitamins. The carbohydrate in the japonica rice is mainly starch, the protein is mainly glutelin, and the protein is gliadin and globulin, the biological value of the protein and the composition ratio of amino acid are higher than that of cereal crops such as wheat, barley, millet, corn and the like, the digestibility is 66.8-83.1%, and the protein is also higher one of the cereal proteins.
The existing rice detection method has the problems that the accurate detection of various quality indexes cannot be realized and the detection is incomplete; in patent CN105954284A, a rice quality detection method, although it realizes the detection of rice appearance, has problems; the quality detection of rice is not comprehensive, and the accuracy of the quality is not high.
Disclosure of Invention
The invention aims to provide a rice quality detection method based on near infrared spectrum.
The technical problem to be solved by the invention is as follows:
(1) how to obtain the growth value of the rice through the planting area, rainfall, soil quality and growth cycle of the rice, and the quality of the rice is obtained through the growth value;
(2) how to place the rice on the black base fabric, and then, acquiring and amplifying the rice image; obtaining a pixel grid occupied by the obtained rice, comparing the pixel grid with a pixel grid for comparing the rice, then coating three primary colors RGB on the pixel grid, and obtaining a contour difference value of the rice by utilizing a superposition principle of the three primary colors, thereby obtaining the quality of the rice;
the purpose of the invention can be realized by the following technical scheme: a rice quality detection method based on near infrared spectrum comprises the following steps:
s1: acquiring basic data of rice to be detected, wherein the basic data comprises planting information, growth information and rice varieties of the rice; the planting information of the rice comprises planting areas, rainfall and soil quality; the growth information comprises the transplanting time and the harvesting time;
s2: counting the basic data of the rice to be detected and calculating to obtain the growth value of the rice;
s3: collecting a shape picture of the rice through image collection equipment, drawing a closed rice contour curve for the shape picture of the rice, and marking the closed rice contour curve as a rice contour curve to be detected;
s4: matching the rice variety and obtaining a comparison contour curve of the rice variety; comparing the profile curve of the rice to be detected with the profile curve to be compared to obtain the profile difference of the left side and the right side of the long shaft;
s5: acquiring the starch content of rice to be detected through near infrared spectrum equipment;
s6: and calculating the quality value of the rice to be detected according to the growth value, the contour difference of the left side and the right side of the long shaft and the starch content.
Preferably, the specific calculation step of calculating the growth value of rice described in S2 is:
SS 1: dividing a rice planting field into Ai areas, wherein i is 1, … … and n, and acquiring geographic information of the areas Ai; the geographic information comprises latitude W1, day-night temperature difference mean value W2 and altitude G;
SS 2: substituting altitude G into the formulaAcquiring an elevation influence value F (G);wherein e is a natural logarithm;
SS 3: using formulasObtaining a region value Qi, wherein a1, a2 and a3 are all preset proportionality coefficients;
SS 4: recording the transplanting time as CTi, wherein i is 1, … … and n; the harvesting time is recorded as STi, i is 1, … … and n; acquiring the rainfall of the area Ai in the time range of the CTi and the STi through a weather monitoring station and marking as YUi, wherein i is 1, … … and n;
SS 5: monitoring the content of nutrient elements in the area Ai by a soil monitor, and recording the content as YSi, wherein i is 1, … … and n; the nutrient elements include nitrogen, phosphorus, potassium, calcium, magnesium, sulfur, iron, manganese, copper, molybdenum and boron;
SS 6: using formulasObtaining a growth value SZi; wherein rho is a correction factor and takes the value of 3.13628; j1, j2 and j3 are preset proportionality coefficients; STi-CTi is the growth cycle; the larger the area value is, the larger the growth value is; the longer the growth cycle, the larger the growth value; the more rainfall, the larger growth value; the more the content of the nutrient elements, the greater the growth value.
Preferably, the step of drawing the closed rice contour curve in S3 is as follows:
the method comprises the following steps: setting rice to be detected as Pi, i is 1, 2, … … and n; placing the rice to be detected on the black base fabric, and adjusting the position of the rice to enable the slender ends of all the rice to be detected to point to one direction and the long axes of all the rice to be detected to be parallel; shooting a picture of rice to be detected through image acquisition equipment;
step two: amplifying the shot rice picture to be detected to enable the rice picture to be composed of a plurality of pixel grids;
step three: counting pixel grids occupied by the rice Pi to be detected and recording the pixel grids as fPiKmRmIn which K ismIs the number of columns of the transverse pixel grid, RmIs a vertical pixel gridThe number of rows of (c); m is 1, … …, n
Step four: calculating the area of pixel grids at the edge of the rice Pi to be detected, namely the pixel grids contain black and non-black; and marking the pixel grids containing black and non-black as edge pixel grids; recording the area of the pixel grids without black as D; the area ratio of non-black in the edge pixel grids is recorded as bD;
step five: to be provided withEstablishing coordinate system with the pixel grids as the center of circle, establishing coordinates of the pixel grids occupied by the image of the rice Pi to be detected, and forming a closed curve by connecting the edge pixel grids in sequence to form a profile curve of the rice to be detected, which is recorded as LPi,i=1、2、……、n。
Preferably, the specific steps of obtaining the left and right profile differences of the long axis in S4 are as follows:
the method comprises the following steps: setting varieties of rice as Ei, i is 1, … … and n; placing the contrast rice corresponding to all rice varieties on black base cloth, adjusting the position of the contrast rice to enable the direction of the contrast rice to be consistent with that of the rice to be detected, shooting images, amplifying the shot images to form pixel grid images, counting the pixel grids occupied by the contrast rice and marking the pixel grids as the contrast pixel grids as fEiKmRm(ii) a Calculating the area of the contrast pixel grid; to be provided withEstablishing a coordinate system by taking the pixel grids as circle centers; comparing pixel lattices occupied by the rice image to establish coordinates; contrast pixel grid fEiKmRmThe sequential connection between the inner edge pixel cells forms a contrast contour curve, noted LEi,i=1、2、……、n;
Step two: forming a database by using the comparison contour curves, coordinates and pixel grids of the comparison rice of all varieties;
step three: matching the variety of the rice to be detected with all varieties in the database, and obtaining the rice after successful matchingCorresponding contrast profile curve L is obtainedEi;
Step four, the contour curve L of the rice to be detectedPiAnd contrast profile curve LEi(ii) a The specific comparison steps are as follows:
w1: pixel grid f of rice to be detectedPiKmRmPainted with red of the three primary colors and noted as REPi(ii) a Comparing the pixel grid f of riceEiKmRmCoated with green GR of the three primary colorsEi;
W2: grid the pixelPixel gridOverlapping, and detecting rice contour curve LPiAnd contrast profile curve LEiThe long axes of the two are overlapped;
w3: obtaining the pixel grid f of the rice to be detected according to the superposition principle of three primary colorsPiKmRmWith rice pixel grid fEiKmRmThe overlapped part is yellow;
w4: sequentially acquiring the non-yellow length value of each line from bottom to top according to Rm; let the length value on the left side of the major axis be denoted as Rmz(ii) a The length value on the right side of the major axis is denoted as Rmy;
W5: respectively acquiring the profile difference on the left side of the long shaft by using a summation formulaDifference from right side profile of long shaft
Preferably, the specific calculation step of obtaining the quality value of the rice to be detected in S6 is as follows:
the method comprises the following steps: obtaining a growth value, a left side contour difference and a right side contour difference of a long shaft and starch content; setting a starch of rice to be testedPowder content is recorded as HPi;
Step two: using formulasObtaining the quality value PZ of the rice to be detectedpi(ii) a Wherein d1, d2, d3 and d4 are fixed values of preset proportions; the growth value is larger, the quality value of the rice to be detected is larger, and the quality of the rice is better; the smaller the contour difference between the left side and the right side of the long shaft is, the larger the quality value of the rice to be detected is; the larger the starch content of the rice to be detected is, the larger the quality value of the rice to be detected is.
The invention has the beneficial effects that:
(1) the method comprises the steps of obtaining basic data of rice to be detected, obtaining a growth value of the rice by processing the basic data, then carrying out image acquisition on the rice to be detected to obtain a profile curve of the rice, then establishing a contrast profile curve of the rice, and comparing the profile curves of the rice and the profile curve to obtain a profile difference; then, the starch content of the rice to be detected is obtained through a near infrared spectrum technology, and the quality value of the rice to be detected is obtained through calculation of the growth value, the contour difference of the left side and the right side of the long axis and the starch content;
(2) according to the method, a rice planting field is divided into Ai areas, and geographic information of the Ai areas is obtained; substituting the altitude G into a formula to obtain an altitude influence value F (G); obtaining an area value Qi by using a formula, obtaining the rainfall of the area Ai in the time range of CTi and STi by using a weather monitoring station, monitoring the content of nutrient elements of the area Ai by using a soil monitor and marking as YSi, and obtaining a growth value SZi by using the formula, wherein the larger the area value is, the larger the growth value is; the longer the growth cycle, the larger the growth value; the more rainfall, the larger growth value; the more the content of the nutrient elements is, the larger the growth value is;
(3) according to the invention, rice to be detected is placed on the black base fabric, and the position of the rice is adjusted to enable the slender ends of all the rice to be detected to point to one direction and the long axes of all the rice to be detected to be parallel; shooting a picture of rice to be detected through image acquisition equipment; amplifying the shot rice picture to be detected to enable the rice picture to be composed of a plurality of pixel grids; counting pixel lattices occupied by the image of the rice P i to be detected; matching the rice variety and obtaining a comparison contour curve of the rice variety; respectively acquiring a left side contour difference and a right side contour difference of the long shaft; the quality of the rice is judged through the contour, and the smaller the contour difference is, the better the quality of the rice to be detected is.
Drawings
The invention will be further described with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method for detecting rice quality based on near infrared spectroscopy according to the present invention;
FIG. 2 is a comparison graph of the profile curves of a rice quality detection method based on near infrared spectrum.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, the present invention is a method for detecting rice quality based on near infrared spectrum, which comprises the following steps:
s1: acquiring basic data of rice to be detected, wherein the basic data comprises planting information, growth information and rice varieties of the rice; the planting information of the rice comprises planting areas, rainfall and soil quality; the growth information comprises the transplanting time and the harvesting time;
s2: counting the basic data of the rice to be detected and calculating to obtain the growth value of the rice; the specific calculation steps are as follows:
SS 1: dividing a rice planting field into Ai areas, wherein i is 1, … … and n, and acquiring geographic information of the areas Ai; the geographic information comprises latitude W1, day-night temperature difference mean value W2 and altitude G;
SS 2: bringing altitude G intoFormula (II)Acquiring an elevation influence value F (G); wherein e is a natural logarithm;
SS 3: using formulasObtaining a region value Qi, wherein a1, a2 and a3 are all preset proportionality coefficients;
SS 4: recording the transplanting time as CTi, wherein i is 1, … … and n; the harvesting time is recorded as STi, i is 1, … … and n; acquiring the rainfall of the area Ai in the time range of the CTi and the STi through a weather monitoring station and marking as YUi, wherein i is 1, … … and n;
SS 5: monitoring the content of nutrient elements in the area Ai by a soil monitor, and recording the content as YSi, wherein i is 1, … … and n; the nutrient elements include nitrogen, phosphorus, potassium, calcium, magnesium, sulfur, iron, manganese, copper, molybdenum and boron;
SS 6: using formulasObtaining a growth value SZi; wherein rho is a correction factor and takes the value of 3.13628; j1, j2 and j3 are preset proportionality coefficients; STi-CTi is the growth cycle; the larger the area value is, the larger the growth value is; the longer the growth cycle, the larger the growth value; the more rainfall, the larger growth value; the more the content of the nutrient elements is, the larger the growth value is;
s3: collecting a shape picture of the rice through image collection equipment, drawing a closed rice contour curve for the shape picture of the rice, and marking the closed rice contour curve as a rice contour curve to be detected; the specific steps for drawing the closed rice contour curve are as follows:
the method comprises the following steps: setting rice to be detected as Pi, i is 1, 2, … … and n; placing the rice to be detected on the black base fabric, and adjusting the position of the rice to enable the slender ends of all the rice to be detected to point to one direction and the long axes of all the rice to be detected to be parallel; shooting a picture of rice to be detected through image acquisition equipment;
step two: amplifying the shot rice picture to be detected to enable the rice picture to be composed of a plurality of pixel grids;
step three: counting pixel grids occupied by the rice Pi to be detected and recording the pixel grids as fPiKmRmIn which K ismIs the number of columns of the transverse pixel grid, RmThe number of rows of the vertical pixel grids; m is 1, … …, n
Step four: calculating the area of pixel grids at the edge of the rice Pi to be detected, namely the pixel grids contain black and non-black; and marking the pixel grids containing black and non-black as edge pixel grids; recording the area of the pixel grids without black as D; the area ratio of non-black in the edge pixel grids is recorded as bD;
step five: to be provided withEstablishing coordinate system with the pixel grids as the center of circle, establishing coordinates of the pixel grids occupied by the image of the rice Pi to be detected, and forming a closed curve by connecting the edge pixel grids in sequence to form a profile curve of the rice to be detected, which is recorded as LPi,i=1、2、……、n;
S4: matching the rice variety and obtaining a comparison contour curve of the rice variety; comparing the profile curve of the rice to be detected with the profile curve to be compared to obtain the profile difference of the left side and the right side of the long shaft; the specific steps for obtaining the contour difference of the left side and the right side of the long shaft are as follows:
the method comprises the following steps: setting varieties of rice as Ei, i is 1, … … and n; placing the contrast rice corresponding to all rice varieties on black base cloth, adjusting the position of the contrast rice to enable the direction of the contrast rice to be consistent with that of the rice to be detected, shooting images, amplifying the shot images to form pixel grid images, counting the pixel grids occupied by the contrast rice and marking the pixel grids as the contrast pixel grids as fEiKmRm(ii) a Calculating the area of the contrast pixel grid; to be provided withEstablishing a coordinate system by taking the pixel grids as circle centers; comparing pixels occupied by rice imageEstablishing coordinates by grids; contrast pixel grid fEiKmRmThe sequential connection between the inner edge pixel cells forms a contrast contour curve, noted LEi,i=1、2、……、n;
Step two: forming a database by using the comparison contour curves, coordinates and pixel grids of the comparison rice of all varieties;
step three, matching the variety of the rice to be detected with all the varieties in the database, and if the matching is successful, acquiring a corresponding comparison contour curve LEi;
Step four, the contour curve L of the rice to be detectedPiAnd contrast profile curve LEi(ii) a The specific comparison steps are as follows:
w1: pixel grid f of rice to be detectedPiKmRmPainted with red of the three primary colors and noted as REPi(ii) a Comparing the pixel grid f of riceEiKmRmCoated with green GR of the three primary colorsEi;
W2: grid the pixelPixel gridOverlapping, and detecting rice contour curve LPiAnd contrast profile curve LEiThe long axes of the two are overlapped;
w3: obtaining the pixel grid f of the rice to be detected according to the superposition principle of three primary colorsPiKmRmWith rice pixel grid fEiKmRmThe overlapped part is yellow;
w4: sequentially acquiring the non-yellow length value of each line from bottom to top according to Rm; let the length value on the left side of the major axis be denoted as Rmz(ii) a The length value on the right side of the major axis is denoted as Rmy;
W5: respectively acquiring the profile difference on the left side of the long shaft by using a summation formulaDifference from right side profile of long shaft
S5: acquiring the starch content of rice to be detected through near infrared spectrum equipment; the method comprises the steps of obtaining the starch content of rice through near infrared spectroscopy, wherein the starch content belongs to the prior art, and the number of articles is obtained in 3 rd stage of agricultural product processing journal, 3 months in 2011; 1671-9646(11)03-0074-03 has disclosed the determination of the starch content in rice by near infrared spectroscopy;
s6: calculating the quality value of the rice to be detected according to the growth value, the contour difference of the left side and the right side of the long shaft and the starch content; the specific calculation steps are as follows:
the method comprises the following steps: obtaining a growth value, a left side contour difference and a right side contour difference of a long shaft and starch content; setting the starch content of the rice to be detected as HPi;
Step two: using formulasObtaining the quality value PZ of the rice to be detectedpi(ii) a Wherein d1, d2, d3 and d4 are fixed values of preset proportions; the growth value is larger, the quality value of the rice to be detected is larger, and the quality of the rice is better; the smaller the contour difference between the left side and the right side of the long shaft is, the larger the quality value of the rice to be detected is; the larger the starch content of the rice to be detected is, the larger the quality value of the rice to be detected is;
the working principle of the invention is as follows: firstly, acquiring basic data of rice to be detected, obtaining a growth value of the rice by processing the basic data, then acquiring an image of the rice to be detected to obtain a profile curve of the rice, establishing a comparison profile curve of the rice, and comparing the profile curves of the rice and the profile curve to obtain a profile difference; then, the starch content of the rice to be detected is obtained through a near infrared spectrum technology, and the quality value of the rice to be detected is obtained through calculation of the growth value, the contour difference of the left side and the right side of the long axis and the starch content; dividing a rice planting field into Ai areas, and acquiring geographic information of the Ai areas; altitude G zoneInto the formulaAcquiring an elevation influence value F (G); using formulasObtaining an area value Qi, obtaining the rainfall of the area Ai in the time range of CTi and STi through a weather monitoring station, monitoring the content of nutrient elements of the area Ai through a soil monitor and recording the content as YSi, and utilizing a formulaObtaining a growth value SZi, wherein the growth value SZi can be obtained through a formula, and the larger the area value is, the larger the growth value is; the longer the growth cycle, the larger the growth value; the more rainfall, the larger growth value; the more the content of the nutrient elements is, the larger the growth value is; placing the rice to be detected on the black base fabric, and adjusting the position of the rice to enable the slender ends of all the rice to be detected to point to one direction and the long axes of all the rice to be detected to be parallel; shooting a picture of rice to be detected through image acquisition equipment; amplifying the shot rice picture to be detected to enable the rice picture to be composed of a plurality of pixel grids; counting pixel grids occupied by the rice Pi to be detected and recording the pixel grids as fPiKmRm(ii) a And calculating the area of the pixel cells at the edge of the rice Pi to be detectedEstablishing a coordinate system by taking the pixel grid as the center of a circle, establishing coordinates of the pixel grid occupied by the image of the rice Pi to be detected, matching rice varieties and obtaining a contrast contour curve of the rice varieties, comparing the contour curve of the rice to be detected with the contrast contour curve to obtain the contour difference between the left side and the right side of the long shaft, and secondly, forming a database by the contrast contour curve, the coordinates and the pixel grid of the contrast rice of all the varieties, matching the variety of the rice to be detected with all the varieties in the database, and obtaining a corresponding contrast contour curve L if the matching is successfulEi(ii) a Pixel grid f of rice to be detectedPiKmRmPainted with red of the three primary colors and noted as REPi(ii) a Comparing the pixel grid f of riceEiKmRmCoated with green GR of the three primary colorsEi(ii) a Grid the pixelPixel gridOverlapping, and detecting rice contour curve LPiAnd contrast profile curve LEiThe long axes of the two are overlapped; obtaining the pixel grid f of the rice to be detected according to the superposition principle of three primary colorsPiKmRmWith rice pixel grid fEiKmRmThe overlapped part is yellow; sequentially acquiring the non-yellow length value of each line from bottom to top according to Rm; let the length value on the left side of the major axis be denoted as Rmz(ii) a The length value on the right side of the major axis is denoted as Rmy(ii) a Respectively acquiring the profile difference on the left side of the long shaft by using a summation formulaDifference from right side profile of long shaftObtaining a growth value, a left side contour difference and a right side contour difference of a long shaft and starch content; setting the starch content of the rice to be detected as HPi(ii) a Using formulasObtaining the quality value PZ of the rice to be detectedpi(ii) a The larger the growth value is, the larger the quality value of the rice to be detected is, and the better the quality of the rice is represented; the smaller the contour difference between the left side and the right side of the long shaft is, the larger the quality value of the rice to be detected is; the larger the starch content of the rice to be detected is, the larger the quality value of the rice to be detected is.
The foregoing is merely exemplary and illustrative of the present invention and various modifications, additions and substitutions may be made by those skilled in the art to the specific embodiments described without departing from the scope of the invention as defined in the following claims.
Claims (2)
1. A rice quality detection method based on near infrared spectrum is characterized by comprising the following steps:
s1: acquiring basic data of rice to be detected;
s2: counting the basic data of the rice to be detected and calculating to obtain the growth value of the rice; the specific calculation step of calculating the growth value of the rice comprises the following steps:
SS 1: dividing a rice planting field into Ai areas, wherein i is 1, … … and n, and acquiring geographic information of the areas Ai; the geographic information comprises latitude W1, day-night temperature difference mean value W2 and altitude G;
SS 2: substituting altitude G into the formulaAcquiring an elevation influence value F (G); wherein e is a natural logarithm;
SS 3: using formulasObtaining a region value Qi, wherein a1, a2 and a3 are all preset proportionality coefficients;
SS 4: recording the transplanting time as CTi, wherein i is 1, … … and n; the harvesting time is recorded as STi, i is 1, … … and n; acquiring the rainfall of the area Ai in the time range of the CTi and the STi through a weather monitoring station and marking as YUi, wherein i is 1, … … and n;
SS 5: monitoring the content of nutrient elements in the area Ai by a soil monitor, and recording the content as YSi, wherein i is 1, … … and n; the nutrient elements include nitrogen, phosphorus, potassium, calcium, magnesium, sulfur, iron, manganese, copper, molybdenum and boron;
SS 6: using formulasObtaining a growth value SZi; where p is the correction factor,a value of 3.13628; j1, j2 and j3 are preset proportionality coefficients; STi-CTi is the growth cycle; the larger the area value is, the larger the growth value is; the longer the growth cycle, the larger the growth value; the more rainfall, the larger growth value; the more the content of the nutrient elements is, the larger the growth value is;
s3: collecting a shape picture of the rice through image collection equipment, and drawing a closed rice contour curve for the shape picture of the rice; the specific steps for drawing the closed rice contour curve are as follows:
the method comprises the following steps: setting rice to be detected as Pi, i is 1, 2, … … and n; placing the rice to be detected on the black base fabric, and adjusting the position of the rice to enable the slender ends of all the rice to be detected to point to one direction and the long axes of all the rice to be detected to be parallel; shooting a picture of rice to be detected through image acquisition equipment;
step two: amplifying the shot rice picture to be detected to enable the rice picture to be composed of a plurality of pixel grids;
step three: counting pixel grids occupied by the rice Pi to be detected and recording the pixel grids as fPiKmRmIn which K ismIs the number of columns of the transverse pixel grid, RmThe number of rows of the vertical pixel grids; m is 1, … …, n;
step four: calculating the area of pixel grids at the edge of the rice Pi to be detected, namely the pixel grids contain black and non-black; and marking the pixel grids containing black and non-black as edge pixel grids; recording the area of the pixel grids without black as D; the area ratio of non-black in the edge pixel grids is recorded as bD;
step five: to be provided withEstablishing coordinate system with the pixel grids as the center of circle, establishing coordinates of the pixel grids occupied by the image of the rice Pi to be detected, and forming a closed curve by connecting the edge pixel grids in sequence to form a profile curve of the rice to be detected, which is recorded as LPi,i=1、2、……、n;
S4: matching the rice variety and acquiring a contrast contour curve of the rice variety to acquire the contour difference of the left side and the right side of the long shaft; the specific steps for obtaining the contour difference of the left side and the right side of the long shaft are as follows:
the method comprises the following steps: setting varieties of rice as Ei, i is 1, … … and n; placing the contrast rice corresponding to all rice varieties on black base cloth, adjusting the position of the contrast rice to enable the direction of the contrast rice to be consistent with that of the rice to be detected, shooting images, amplifying the shot images to form pixel grid images, counting the pixel grids occupied by the contrast rice and marking the pixel grids as the contrast pixel grids as fEiKmRm(ii) a Calculating the area of the contrast pixel grid; to be provided withEstablishing a coordinate system by taking the pixel grids as circle centers; comparing pixel lattices occupied by the rice image to establish coordinates; contrast pixel grid fEiKmRmThe sequential connection between the inner edge pixel cells forms a contrast contour curve, noted LEi,i=1、2、……、n;
Step two: forming a database by using the comparison contour curves, coordinates and pixel grids of the comparison rice of all varieties;
step three, matching the variety of the rice to be detected with all the varieties in the database, and if the matching is successful, acquiring a corresponding comparison contour curve LEi;
Step four, the contour curve L of the rice to be detectedPiAnd contrast profile curve LEiComparing; the specific comparison steps are as follows:
w1: pixel grid f of rice to be detectedPiKmRmPainted with red of the three primary colors and noted as REPi(ii) a Comparing the pixel grid f of riceEiKmRmCoated with green GR of the three primary colorsEi;
W2: grid the pixelPixel gridOverlapping, and detecting rice contour curve LPiAnd contrast profile curve LEiThe long axes of the two are overlapped;
w3: obtaining the pixel grid f of the rice to be detected according to the superposition principle of three primary colorsPiKmRmWith rice pixel grid fEiKmRmThe overlapped part is yellow;
w4: sequentially acquiring the non-yellow length value of each line from bottom to top according to Rm; let the length value on the left side of the major axis be denoted as Rmz(ii) a The length value on the right side of the major axis is denoted as Rmy;
W5: respectively acquiring the profile difference on the left side of the long shaft by using a summation formulaDifference from right side profile of long shaft
S5: acquiring the starch content of rice to be detected through near infrared spectrum equipment;
s6: and calculating the quality value of the rice to be detected according to the growth value, the contour difference of the left side and the right side of the long shaft and the starch content.
2. The method for detecting the quality of rice according to claim 1, wherein the specific calculation step of obtaining the quality value of rice to be detected in S6 is as follows:
the method comprises the following steps: obtaining a growth value, a left side contour difference and a right side contour difference of a long shaft and starch content; setting the starch content of the rice to be detected as HPi;
Step two: using formulasObtaining the quality value PZ of the rice to be detectedpi(ii) a Wherein d1, d2, d3 and d4 are fixed values of preset proportions; as can be derived from the formula,the larger the growth value is, the larger the quality value of the rice to be detected is, and the better the quality of the rice is represented; the smaller the contour difference between the left side and the right side of the long shaft is, the larger the quality value of the rice to be detected is; the larger the starch content of the rice to be detected is, the larger the quality value of the rice to be detected is.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910616591.8A CN110221032B (en) | 2019-07-09 | 2019-07-09 | Rice quality detection method based on near infrared spectrum |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910616591.8A CN110221032B (en) | 2019-07-09 | 2019-07-09 | Rice quality detection method based on near infrared spectrum |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110221032A CN110221032A (en) | 2019-09-10 |
CN110221032B true CN110221032B (en) | 2020-08-07 |
Family
ID=67812233
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910616591.8A Active CN110221032B (en) | 2019-07-09 | 2019-07-09 | Rice quality detection method based on near infrared spectrum |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110221032B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110954551B (en) * | 2019-12-05 | 2023-02-10 | 浙江五芳斋实业股份有限公司 | Online detection method for quality of green rice ball |
CN114486877B (en) * | 2020-10-23 | 2024-01-19 | 合肥美亚光电技术股份有限公司 | Rice quality detection method, rice quality detection device and storage medium |
CN117132406A (en) * | 2023-10-27 | 2023-11-28 | 深圳市泰铼科技有限公司 | Financial product assessment method and system based on deep learning |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4159526B2 (en) * | 2004-09-03 | 2008-10-01 | 株式会社山本製作所 | State inspection device for granular inspection objects |
CN101109743B (en) * | 2007-09-10 | 2011-05-04 | 肯特大学 | Portable cereal analyzer based on digital picture processing technique |
KR100903704B1 (en) * | 2007-10-01 | 2009-06-19 | 대한민국 | The White and Brown Rice Appearance Characteristics Measurement System and the Same Method |
CA2736016C (en) * | 2008-09-05 | 2016-06-28 | Metso Automation Oy | Determining the amount of starch |
CN103344602B (en) * | 2013-07-04 | 2016-07-27 | 中国科学院合肥物质科学研究院 | A kind of rice germplasm true and false lossless detection method based near infrared spectrum |
CN103575689B (en) * | 2013-10-11 | 2015-07-15 | 西北农林科技大学 | Method for rapidly detecting amylose content in rice by near infrared spectrum and visible light analyzer |
CN103913425B (en) * | 2014-04-17 | 2016-04-06 | 河南农业大学 | The Relation To Grain Protein of Winter Wheat content prediction method be coupled based on spectrum index and climatic factor and the construction method of forecast model thereof |
CN104749126A (en) * | 2015-02-28 | 2015-07-01 | 华北水利水电大学 | Wheat hardness prediction method based on near infrared hyperspectral image analysis |
CN105067784B (en) * | 2015-07-22 | 2016-08-24 | 中国水稻研究所 | Utilize the physicochemical character index of rice quality to the method judging rice eating-quality |
CN105954284A (en) * | 2016-05-06 | 2016-09-21 | 安徽贝通智能科技有限公司 | Rice quality detection method |
CN107515203A (en) * | 2017-07-19 | 2017-12-26 | 中国农业大学 | The research of near infrared technology quantitative analysis rice single grain amylose content |
-
2019
- 2019-07-09 CN CN201910616591.8A patent/CN110221032B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110221032A (en) | 2019-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110221032B (en) | Rice quality detection method based on near infrared spectrum | |
US11029251B2 (en) | Method for estimating aboveground biomass of rice based on multi-spectral images of unmanned aerial vehicle | |
CN106372592B (en) | A kind of winter wheat planting area calculation method based on winter wheat area index | |
CN111241912A (en) | Multi-vegetation index rice yield estimation method based on machine learning algorithm | |
CN110567891B (en) | Winter wheat canopy chlorophyll estimation system and method | |
CN105740759B (en) | Semilate rice information decision tree classification approach based on feature extraction in multi-temporal data | |
CN105404873B (en) | A kind of winter wheat recognition methods based on the conversion of NDVI time series coordinates | |
CN111476153A (en) | Method for calculating fruit maturity | |
CN111418323A (en) | Nitrogen fertilizer real-time recommendation method based on facility crop canopy coverage and plant height | |
CN116308866B (en) | Rice ear biomass estimation method and system based on canopy reflection spectrum | |
CN116108318A (en) | Rape nitrogen fertilizer recommended dressing amount calculation method based on unmanned aerial vehicle multispectral image | |
CN114549881B (en) | Wheat early tiller number estimation method based on regional gradient vegetation index | |
CN108280410A (en) | One kind being based on binary-coded crops recognition methods and system | |
CN105300895A (en) | Method for performing early warning against potato germination defects by utilizing feature point tangent included angles | |
CN112668404B (en) | Effective identification method for soybean diseases and insect pests | |
CN116602106A (en) | Unmanned aerial vehicle-based variable fertilization method in paddy field | |
CN107818565B (en) | Method for investigating quantity of wheat seedlings in one-to-three-leaf period of wheat | |
Fieuzal et al. | Estimation of sunflower yields at a decametric spatial scale—a statistical approach based on multi-temporal satellite images | |
CN114219227A (en) | Method and system for precise fertilization decision and plot level display | |
Nakano et al. | Predicting rice grain yield using normalized difference vegetation index from UAV and greenseeker | |
CN114926565B (en) | Soybean drafting method based on green degree and water comprehensive index | |
Loveimi et al. | Prediction of canola yield in some of growth stages by using Landsat satellite, OLI Sensor | |
Lee et al. | Estimation of winter wheat nitrogen content, biomass and yield using UAV images in South Korea | |
CN114332628B (en) | Ginger rapid remote sensing extraction method based on typical physical condition and film network characteristics | |
De La Garza | Development of an imaging tool for commercial mushroom yield and quality estimation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |