Method and apparatus for measuring leaf nitrogen content
11221320 ยท 2022-01-11
Assignee
Inventors
Cpc classification
G01N2021/1765
PHYSICS
G01N21/31
PHYSICS
H04N5/30
ELECTRICITY
International classification
G01N33/00
PHYSICS
G01N21/17
PHYSICS
H04N5/30
ELECTRICITY
Abstract
The present invention discloses a method and an apparatus for measuring leaf nitrogen content (LNC), and belongs to the spectral analysis and artificial intelligence (AI) field. The method includes the following steps: (1) obtaining a single-band image of a target leaf illuminated by a light source in a single feature band; (2) repeating step (1), to collect image information in four feature bands; (3) combining the collected images in the four feature bands into a four-channel spectral image; (4) training a deep learning model by using the spectral image and a corresponding nitrogen content label, to obtain a nitrogen content prediction model; (5) transplanting the trained nitrogen content prediction model into an AI control system; (6) collecting information about a to-be-predicted leaf sample, predicting nitrogen content by using an AI sensor equipped with the AI control system, and outputting the predicted nitrogen content.
Claims
1. A method for measuring leaf nitrogen content (LNC), comprising the following steps: (1) obtaining a single-band image of a target leaf illuminated by a light source in a single feature band; (2) repeating step (1), to collect image information in four feature bands, wherein the four feature bands are 490 nm to 500 nm, 590 nm to 600 nm, 630 nm to 640 nm, and 680 nm to 690 nm; (3) combining the image information in the four feature bands into a four-channel spectral image; (4) training a deep learning model by using a spectral image and a corresponding nitrogen content label, to obtain a nitrogen content prediction model, wherein the deep learning model comprises four convolutional blocks and a fully-connected network, wherein each convolutional block comprises a convolutional layer, a rectified linear unit (ReLU) activation function, and a maximum pooling layer; the convolutional layer having a 3*3 convolutional kernel and a step length of 1; the maximum pooling layer having a size of 3*3, and a step length of 2; and the fully-connected network comprising two layers with 256 and 64 neurons respectively; (5) transplanting the nitrogen content prediction model into an artificial intelligence (AI) control system, wherein the AI control system is obtained by using the following steps: (i) obtaining a single-band image of a target leaf illuminated by a light source in a single feature band; (ii) repeating step (i) to collect image information in four feature bands; (iii) combining the image information in the four feature bands into a four-channel spectral image; (iv) training a deep learning model by using a spectral image and a corresponding nitrogen content label, to obtain a nitrogen content prediction model; and (v) transplanting the nitrogen content prediction model into the AI control system; (6) collecting information about a to-be-predicted leaf sample, predicting nitrogen content by using an AI sensor equipped with the AI control system to provide a nitrogen content prediction result, and outputting the nitrogen content; (7) outputting the nitrogen content prediction result through a serial port; and (8) displaying a distribution diagram of nitrogen content of leaves at different locations on a farmland.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
DETAILED DESCRIPTION
(5) To make the objectives, the technical solutions, and the advantages of the present invention clearer, the following further describes in detail the present invention with reference to examples and the accompanying drawings.
Example
(6) Referring to
(7) The opening of the light shield 2 covers a surface of the to-be-detected sample 4, to form an imaging environment that is not interfered with by ambient light. The measurement button 11 is pressed, the AI control system 13 outputs a drive signal, one group of LED light sources is turned on, and after the light source is stable, a digital signal is read from the dot-matrix spectral image sensor 3. The other three groups of light sources are turned on according to the foregoing steps, and corresponding digital image information is obtained. The AI control system 13 combines the obtained digital signals into a four-channel dot-matrix spectral image, processes the four-channel dot-matrix spectral image by using an integrated deep convolutional neural network model, to obtain the LNC through calculation, and outputs the nitrogen content by using a serial port. An external device may access an output result of the sensor in this example through the pigtail 6 of the output interface.
(8) Referring to
(9) First step: Construct a deep convolutional neural network model. A large quantity of four-channel dot-matrix spectral images obtained through collection and corresponding nitrogen content of a to-be-detected leaf obtained by using a chemometrics method are stored into a personal computer (PC), to construct a training data set. Then, the deep convolutional neural network model shown in
(10) The deep convolutional neural network model in this example includes four convolutional blocks and a fully-connected network. Each convolutional block includes a convolutional layer, a ReLU activation function, and a maximum pooling layer. The convolutional layer has a 3*3 convolutional kernel and a step length of 1. A size of the maximum pooling layer is 3*3, and a step length is 2. The fully-connected network includes two layers with 256 and 64 neurons respectively.
(11) Second step: After the model is trained on the PC, transplant a structure and a weighting parameter of the model into an AI control system.
(12) Third step: Encapsulate the sensor, collect a dot-matrix spectral image of a new sample, calculate nitrogen content by using the model cured into the AI control system, and output the nitrogen content.
(13) A method for measuring LNC in this example includes the following steps:
(14) (1) Obtain a single-band image of a target leaf illuminated by a light source in a single feature band.
(15) (2) Repeat step (1), to collect image information in four feature bands.
(16) (3) Combine the collected images in the four feature bands into a four-channel spectral image.
(17) (4) Train a deep learning model by using the spectral image and a corresponding nitrogen content label, to obtain a nitrogen content prediction model.
(18) (5) Transplant the trained nitrogen content prediction model into an AI control system.
(19) (6) Collect information about a to-be-predicted leaf sample, predict nitrogen content by using an AI sensor provided with the AI control system, and output the nitrogen content.
(20) (7) Output a nitrogen content prediction result through a serial port.
(21) (8) Display a distribution diagram of nitrogen content of leaves at different locations on a farmland.