CN110221032B - Rice quality detection method based on near infrared spectrum - Google Patents

Rice quality detection method based on near infrared spectrum Download PDF

Info

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
Application number
CN201910616591.8A
Other languages
Chinese (zh)
Other versions
CN110221032A (en
Inventor
陈召桂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Wufangzhai Industry Co Ltd
Original Assignee
Zhejiang Wufangzhai Industry Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang Wufangzhai Industry Co Ltd filed Critical Zhejiang Wufangzhai Industry Co Ltd
Priority to CN201910616591.8A priority Critical patent/CN110221032B/en
Publication of CN110221032A publication Critical patent/CN110221032A/en
Application granted granted Critical
Publication of CN110221032B publication Critical patent/CN110221032B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/3563Investigating 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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/02Food
    • G01N33/10Starch-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

Rice quality detection method based on near infrared spectrum
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 formula
Figure BDA0002124137710000031
Acquiring an elevation influence value F (G);wherein e is a natural logarithm;
SS 3: using formulas
Figure BDA0002124137710000032
Obtaining 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 formulas
Figure BDA0002124137710000033
Obtaining 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 with
Figure BDA0002124137710000041
Establishing 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 with
Figure BDA0002124137710000042
Establishing 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 pixel
Figure BDA0002124137710000051
Pixel grid
Figure BDA0002124137710000052
Overlapping, 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 formula
Figure BDA0002124137710000053
Difference from right side profile of long shaft
Figure BDA0002124137710000054
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 formulas
Figure BDA0002124137710000061
Obtaining 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)
Figure BDA0002124137710000081
Acquiring an elevation influence value F (G); wherein e is a natural logarithm;
SS 3: using formulas
Figure BDA0002124137710000082
Obtaining 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 formulas
Figure BDA0002124137710000083
Obtaining 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 with
Figure BDA0002124137710000091
Establishing 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 with
Figure BDA0002124137710000101
Establishing 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 pixel
Figure BDA0002124137710000102
Pixel grid
Figure BDA0002124137710000103
Overlapping, 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 formula
Figure BDA0002124137710000104
Difference from right side profile of long shaft
Figure BDA0002124137710000111
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 formulas
Figure BDA0002124137710000112
Obtaining 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 formula
Figure BDA0002124137710000121
Acquiring an elevation influence value F (G); using formulas
Figure BDA0002124137710000122
Obtaining 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 formula
Figure BDA0002124137710000123
Obtaining 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 detected
Figure BDA0002124137710000124
Establishing 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 pixel
Figure BDA0002124137710000125
Pixel grid
Figure BDA0002124137710000131
Overlapping, 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 formula
Figure BDA0002124137710000132
Difference from right side profile of long shaft
Figure BDA0002124137710000133
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(ii) a Using formulas
Figure BDA0002124137710000134
Obtaining 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 formula
Figure FDA0002475499420000011
Acquiring an elevation influence value F (G); wherein e is a natural logarithm;
SS 3: using formulas
Figure FDA0002475499420000012
Obtaining 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 formulas
Figure FDA0002475499420000013
Obtaining 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 with
Figure FDA0002475499420000021
Establishing 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 with
Figure FDA0002475499420000022
Establishing 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 pixel
Figure FDA0002475499420000031
Pixel grid
Figure FDA0002475499420000032
Overlapping, 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 formula
Figure FDA0002475499420000033
Difference from right side profile of long shaft
Figure FDA0002475499420000034
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 formulas
Figure FDA0002475499420000041
Obtaining 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.
CN201910616591.8A 2019-07-09 2019-07-09 Rice quality detection method based on near infrared spectrum Active CN110221032B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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