Spectral feature extraction method and system for chlorophyll prediction of field tobacco leaves
By extracting features in segmented integrals of hyperspectral curves, the problems of low utilization of hyperspectral data and influence of external factors are solved, high-precision prediction of chlorophyll content is achieved, and the model performance is optimized.
Patent Information
- Application Number
- CN202410606080.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-05-16
AI Technical Summary
The existing feature extraction methods for hyperspectral data have too low spectral utilization, too much information loss, and are affected by external factors of shadow, soil, and canopy structure. Different parameter combinations lead to unstable modeling performance, and the extracted features are not Contains shape characteristics of hyperspectral curves.
The feature extraction method based on the segmented integral of the hyperspectral curve is adopted. By acquiring the hyperspectral image of the drone, pre-processing and extracting the average spectral reflectance of pure tobacco pixels, the spectral curve is subjected to the first derivative processing after smoothing, and noise is eliminated. and use preset function fitting to calculate the fixed integral value as feature variables to construct a chlorophyll inversion model.
The prediction accuracy of chlorophyll content distribution is improved, effective dimensionality reduction of hyperspectral data is achieved, spectral information is fully utilized, and the influence of external factors is reduced, and the model performance is better than traditional methods.
Smart Images

Figure CN118552850B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of tobacco production, and in particular to a spectral feature extraction method and system for predicting chlorophyll in field tobacco leaves. Background Art
[0002] Chlorophyll is a key pigment in tobacco leaf photosynthesis and plays an important role in the acquisition and conversion of light energy. On the one hand, the chlorophyll content directly reflects the health status of tobacco plants and affects the final yield and quality; on the other hand, the chlorophyll content largely determines the color of tobacco leaves, and tobacco farmers mainly judge whether the tobacco leaves are mature based on the color of the leaves, and then decide whether to harvest and bake. In view of the current method of relying on manual experience to observe the color of the leaves to judge the chlorophyll content of tobacco leaves, there is great uncertainty, and it is time-consuming and laborious when facing large areas of tobacco fields. Many studies use the method of UAV hyperspectral remote sensing inversion modeling to monitor crop chlorophyll. By obtaining the hyperspectral information of farmland drones and the chlorophyll content of crops on the spot, a quantitative relationship model between hyperspectral reflectance data and chlorophyll content is constructed, thereby realizing real-time monitoring of chlorophyll in large areas of fields.
[0003] Considering the high dimensionality of hyperspectral data and the high similarity of adjacent bands, it is very important to use dimensionality reduction algorithms to extract key features and remove redundancy from the original hyperspectral data before modeling. The existing feature extraction methods mainly include: feature construction based on vegetation index (VI), such as Normalized Differnce Vegetation Index (NDVI), Ratio Vegetation Index (RVI), Soil Adjusted Vegetation Index (SAVI), etc.; band screening based on machine learning algorithms, such as Successful Projections Algorithm (SPA), Recursive Feature Elimination (RFE), or principal component analysis (PCA) for data compression through linear transformation. After feature extraction of the original spectral reflectance data, a suitable machine learning algorithm is selected for modeling to achieve accurate evaluation of chlorophyll in tobacco fields. Therefore, in actual production activities, it provides information support for tobacco farmers to judge the maturity of tobacco leaves and implement harvesting and baking.
[0004] The goal of feature extraction for hyperspectral data is to reduce data dimension, remove redundancy, and facilitate calculation. The VI-based method usually selects two or three key bands to construct an index as the input variable for modeling. This method is simple and easy to calculate, but considering that hyperspectral data often have hundreds of bands, this method has too low spectral utilization, too much loss of hyperspectral information, and is affected by external factors such as shadows, soil, and canopy structure. Therefore, the VI-based feature extraction method is more suitable for multispectral tasks, but not for hyperspectral tasks; the method based on machine learning for sensitive band screening can screen out more spectral bands, greatly improving the utilization of spectral information. However, this type of method is largely affected by specific parameters and internal evaluation models. For example, SPA embeds multiple linear regression (MLR) to evaluate the sensitivity of each band. Therefore, for this type of algorithm, different parameter combinations lead to different screening results, and then lead to different modeling performance; and for PCA, a method that achieves data dimensionality reduction through linear transformation, although it can retain most of the information in the original data, the features extracted by this method do not contain the shape characteristics of the hyperspectral curve. Summary of the invention
[0005] Purpose of the invention: To provide a spectral feature extraction method and system for predicting chlorophyll in field tobacco leaves, so as to solve the above-mentioned problems existing in the prior art.
[0006] Technical solution: A spectral feature extraction method for predicting chlorophyll in field tobacco leaves, comprising: obtaining unmanned aerial vehicle hyperspectral images of tobacco leaves at key stages of field growth; preprocessing the hyperspectral images, and extracting the average spectral reflectance of pure tobacco pixels in several small areas from the preprocessed images; smoothing the average spectral reflectance to obtain first-order derivative data of the smoothed spectral curve; re-dividing the initially divided spectral regions according to the first-order derivative data, and eliminating spectral regions that are greatly affected by leaf water and high noise; fitting the spectral curve of each spectral region with a preset function, and then calculating the definite integral of each spectral curve according to the fitted function, and using the definite integral value of each spectral region as a characteristic variable combined with the RF algorithm to construct a chlorophyll inversion model.
[0007] As a preferred method, drone hyperspectral images of tobacco leaves at key stages of field growth are obtained, including:
[0008] UAV hyperspectral images were obtained. The band range of the spectrometer was 400-1000nm. The flight time was during the root extension period and the topping period of tobacco leaves, and the flight altitude of the UAV was 50m. The heading overlap rate and lateral overlap rate of the flight were 80% and 75% respectively.
[0009] Preferably, the hyperspectral image is preprocessed, and the average spectral reflectance of pure tobacco pixels in several small areas is extracted from the preprocessed image, including:
[0010] Image stitching: Use the preset software to stitch the images, and select the preset coordinate system for the image geographic coordinate system;
[0011] Spectral reflectance extraction: The drone hyperspectral image is interpreted by preset software, and the region of interest is divided into each plot. After removing the shadows, weeds, and soil background, the average spectral reflectance of pure tobacco pixels in each region of interest is extracted.
[0012] Preferably, smoothing the average spectral reflectance to obtain first-order derivative data of the smoothed spectral curve includes:
[0013] According to the absorption and reflection characteristics of chlorophyll and the spectral response of nitrogen, which has a greater impact on chlorophyll, the entire spectral curve is preliminarily divided into six parts: linear region 1, Lorentz region, linear region 2, Gaussian region, linear region 3 and discarded region;
[0014] The data on the first-order derivative curve are used to further refine the division of the spectral region, and the spectral regions that are greatly affected by leaf water and high noise are eliminated; among them, the specific intervals of the five retained regions are: P3 -500nm, 500-600nm, 600-λ P3 nm, λ P3 -λ P5 nm, λ P5 -900nm, λ Pn Refers to the band where Pn (n=1, 2, 3, 4, 5) is located.
[0015] Preferably, fitting the spectral curve of each spectral region using a preset function comprises:
[0016] Linear region 1, linear region 2 and linear region 3 are all fitted using linear functions, Lorentz region is fitted using Lorentz function, and Gaussian region is fitted using inverse Gaussian function;
[0017] Among them, the Lorentz function and the inverse Gaussian function are recorded as L(λ) and G(λ), respectively, and their expressions are as follows:
[0018]
[0019]
[0020] In the formula, λ represents the spectral band, λ l It indicates the wavelength band of chlorophyll reflectance peak in the 500-600nm region, γ indicates the half-height width; Rg It is the minimum reflectivity value in the red region of the chlorophyll strong absorption band, that is, the reflectivity value of the band where P3 is located, R s is the maximum value of shoulder reflection in the near-infrared region, that is, the reflectivity value of the band where P5 is located, and σ is the standard deviation coefficient of the Gaussian function.
[0021] Preferably, the definite integral of each spectral curve is calculated according to the fitted function, including:
[0022] The corresponding definite integral value is calculated for each spectral region, and the position data of P1-P5 are used to initialize the fitting function to obtain a characteristic variable with five eigenvalues.
[0023] Preferably, the spectral curve of each region is fitted with a preset function, and then the definite integral of each curve is calculated according to the fitted function, and the definite integral value of each spectral region is used as a characteristic variable to build a chlorophyll inversion model in combination with the RF algorithm, and further includes:
[0024] Provide reference for guiding tobacco farmers in evaluating the maturity of tobacco leaves in the field and provide information support for tobacco leaf harvesting.
[0025] In order to achieve the above-mentioned object, according to another aspect of the present application, a spectral feature extraction system for predicting chlorophyll in field tobacco leaves is provided.
[0026] According to the spectral feature extraction system for predicting chlorophyll in field tobacco leaves of the present application, the system comprises: an acquisition module for acquiring drone hyperspectral images of tobacco leaves at various key stages of field growth; a preprocessing and extraction module for preprocessing the hyperspectral images and extracting the average spectral reflectance of pure tobacco pixels in a plurality of plots from the preprocessed images; a processing module for smoothing the average spectral reflectance to obtain first-order derivative data of the spectral curve after smoothing; a spectral region division module for re-dividing the initially divided spectral regions according to the first-order derivative data and eliminating spectral regions that are greatly affected by leaf water and high noise; and a model construction module for fitting the spectral curve of each spectral region with a preset function, calculating the definite integral of each spectral curve according to the fitted function, and constructing a chlorophyll inversion model with the definite integral value of each spectral region as a characteristic variable in combination with an RF algorithm.
[0027] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is provided, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the spectral feature extraction method for predicting chlorophyll in field tobacco leaves as described in any one of the present invention.
[0028] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is provided, in which computer instructions are stored, and the computer instructions are used to enable a processor to implement the spectral feature extraction method for predicting chlorophyll in field tobacco leaves as described in any one of the present invention when executed.
[0029] Beneficial effect: In the embodiment of the present application, a feature extraction method based on segmented integration of a hyperspectral curve is adopted, by obtaining drone hyperspectral images of tobacco leaves at various key stages of field growth; the hyperspectral images are preprocessed, and the average spectral reflectance of pure tobacco pixels in several small areas are extracted from the preprocessed images; the average spectral reflectance is smoothed to obtain the first-order derivative data of the spectral curve after smoothing; the spectral regions preliminarily divided are divided again according to the first-order derivative data, and the spectral regions that are greatly affected by leaf water and high noise are eliminated; the spectral curve of each spectral region is fitted using a preset function , and then calculate the definite integral of each spectral curve according to the fitted function, and use the definite integral value of each spectral region as the characteristic variable to build a chlorophyll inversion model combined with the RF algorithm, so as to achieve the purpose of building a chlorophyll inversion model for field tobacco leaves, thereby achieving the technical effect of improving the prediction accuracy of chlorophyll content distribution, and thus solving the problems of the existing feature extraction methods of hyperspectral data, such as low spectral utilization, too much loss of hyperspectral information, and being affected by external factors such as shadow, soil, and canopy structure; different parameter combinations lead to different screening results, and then lead to different modeling performance; and the technical problem that the extracted features do not contain the shape characteristics of the hyperspectral curve. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a spectrum region division diagram of the spectrum feature extraction method for predicting chlorophyll in field tobacco leaves according to an embodiment of the present application;
[0031] Figure 2 It is a general flow chart of a spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to an embodiment of the present application;
[0032] Figure 3It is a spectral curve segment fitting diagram of the spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to an embodiment of the present application;
[0033] Figure 4 is a schematic diagram of model evaluation results of a spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to an embodiment of the present application;
[0034] Figure 5 is a distribution diagram of actual and predicted chlorophyll content according to a spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to another embodiment of the present application;
[0035] Figure 6 It is a schematic flow chart of a spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to an embodiment of the present application;
[0036] Figure 7 is a structural schematic diagram of a spectral feature extraction system for predicting chlorophyll in field tobacco leaves according to an embodiment of the present application; and
[0037] Figure 8 It is a structural schematic diagram of an electronic device for a spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0040] In addition, the terms "installed", "set", "provided with", "connected", "connected", and "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0041] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0042] According to an embodiment of the present invention, a spectral feature extraction method for predicting chlorophyll in field tobacco leaves is provided. Figure 6 As shown, the method includes the following steps S101 to S105:
[0043] Step S101, obtaining drone hyperspectral images of tobacco leaves at various key stages of field growth;
[0044] By automatically collecting a large amount of hyperspectral image data through drones, real-time hyperspectral images can be obtained, thus providing a data basis for subsequent analysis and processing.
[0045] According to an embodiment of the present invention, preferably, obtaining drone hyperspectral images of tobacco leaves at various key stages of field growth includes:
[0046] UAV hyperspectral images were obtained. The band range of the spectrometer was 400-1000nm. The flight time was during the root extension period and the topping period of tobacco leaves, and the flight altitude of the UAV was 50m. The heading overlap rate and lateral overlap rate of the flight were 80% and 75% respectively.
[0047] Specifically, hyperspectral imaging acquisition: The band range of the spectrometer is 400-1000nm: Hyperspectral imaging will capture information in multiple bands ranging from 400 to 1000 nanometers. This spectral range is often used to analyze the photosynthesis and physiological state of plants.
[0048] Photographing time: Tobacco leaf root extension stage: This period is the early stage of tobacco plant growth, and may be characterized by active root growth.
[0049] Topping: This stage is the time to control the shape of the tobacco plant and improve the quality of the tobacco leaves, which usually includes cutting off the top of the plant.
[0050] Flight parameters of the drone: Flight altitude is 50m: The drone flies at an altitude of 50 meters, which helps to obtain high spatial resolution images for more detailed observation of the growth of the plants.
[0051] The heading overlap rate is 80%: It means that there is 80% overlap between adjacent flight paths, which helps in subsequent image processing and stitching to ensure that there is enough data for the entire area.
[0052] The lateral overlap rate is 75%: it means that there is a 75% overlap between the lateral sides (overlapping areas) of adjacent images, which is also helpful for image processing and stitching.
[0053] Data processing: Image stitching: Since there is overlap between adjacent aircraft routes and images, image stitching is required to generate a complete hyperspectral image.
[0054] Band extraction: Extract nitrogen-sensitive bands from the entire spectral range, i.e., the bands within the range of 400-1000nm, for subsequent analysis.
[0055] The required hyperspectral images can be obtained by setting the operating parameters of the drone. Of course, it is important to know that the drone flight should be carried out in clear weather with plenty of sunlight, no clouds and low wind speed to ensure that the drone is not affected and the images taken are not disturbed by shadows.
[0056] Preferably, field sampling is performed on the day of each aerial photography, 4 representative tobacco plants are selected from each plot, 1 leaf in the middle of each plant is selected, and five positions of the leaf, namely, the upper middle part, the upper left part, the lower left part, the upper right part, and the lower right part, are selected to obtain the relative value of chlorophyll content using a SPAD-502Plus instrument. The average of the 20 SPAD readings obtained is used to represent the chlorophyll content value of the plot.
[0057] Drone imaging technology has the advantages of rapid response, flexible deployment, and strong maneuverability. It is particularly suitable for rapid real-time monitoring of large-scale tobacco fields. Drone remote sensing imaging technology has the advantages of real-time, objectivity, and efficiency. Only 1-2 operators are needed to achieve full coverage monitoring of large tobacco fields.
[0058] Step S102, preprocessing the hyperspectral image, and extracting the average spectral reflectance of pure tobacco pixels in a plurality of cells from the preprocessed image;
[0059] By preprocessing the acquired hyperspectral images, the accuracy of the data can be improved, and at the same time, the required data can be easily extracted.
[0060] According to an embodiment of the present invention, preferably, preprocessing the hyperspectral image, and extracting the average spectral reflectance of pure tobacco pixels in a plurality of cells from the preprocessed image respectively comprises:
[0061] Image stitching: Use the preset software to stitch the images, and select the preset coordinate system for the image geographic coordinate system;
[0062] Spectral reflectance extraction: The drone hyperspectral image is interpreted by preset software, and the region of interest is divided into each plot. After removing the shadows, weeds, and soil background, the average spectral reflectance of pure tobacco pixels in each region of interest is extracted.
[0063] Specifically, image stitching: Preset software selection: Select appropriate image stitching software, including but not limited to software specifically used for aerial image processing, such as Agisoft Metashape, Agisoft photoscan software, Pix4Dmapper, etc.
[0064] Geographic coordinate system selection: In the image stitching software, set the image's geographic coordinate system to GCS_WGS_1984 to ensure the image's accurate position on the earth's surface.
[0065] Image import: Import the acquired drone hyperspectral images into the software. These images include images collected at different stages (root extension stage and topping stage).
[0066] Image alignment: Use the image alignment function in the preset software to ensure that there is enough overlap between adjacent images for subsequent stitching.
[0067] Image stitching: Run the image stitching algorithm to stitch adjacent images into a complete image coverage area. Panoramic hyperspectral images of each stage can be obtained.
[0068] Spectral reflectance extraction: The UAV hyperspectral image was interpreted using ENVI5.6 software. The region of interest was divided into each plot, and after removing shadows, weeds, and soil background, the average spectral reflectance of pure tobacco pixels in each region of interest was extracted.
[0069] Region of interest delineation: Use the preset software to delineate the region of interest based on the nitrogen fertilizer gradient. Either draw manually or use an automatic segmentation algorithm.
[0070] Spectral interpretation: Interpret the hyperspectral image to obtain the spectral information of each pixel. It is represented by a spectral reflectance curve, where the horizontal axis is wavelength and the vertical axis is reflectance.
[0071] Extract average reflectance: For each area of interest, extract the spectral reflectance of the pixels and calculate the average reflectance, which is used to represent the average vegetation reflectance in the entire cell.
[0072] Data output: Export the extracted spectral reflectance data into tables or other data formats for subsequent analysis and reporting.
[0073] Step S103, smoothing the average spectral reflectance to obtain first-order derivative data of the smoothed spectral curve;
[0074] It can achieve good data processing effects, thus providing a data basis for further spectral region division.
[0075] According to an embodiment of the present invention, preferably, smoothing the average spectral reflectance to obtain first-order derivative data of the spectral curve after smoothing includes:
[0076] like Figure 1 As shown, according to the absorption and reflection characteristics of chlorophyll and the spectral response of nitrogen which has a greater impact on chlorophyll, the entire spectral curve is preliminarily divided into six parts: linear region 1, Lorentz region, linear region 2, Gaussian region, linear region 3 and discarded region;
[0077] The data on the first-order derivative curve are used to further refine the division of the spectral region, and the spectral regions that are greatly affected by leaf water and high noise are eliminated; among them, the specific intervals of the five retained regions are: P3 -500nm, 500-600nm, 600-λ P3 nm, λ P3 -λ P5 nm, λ P5 -900nm, λ Pn Refers to the band where Pn (n=1, 2, 3, 4, 5) is located.
[0078] Specifically, the effect of further dividing the initially divided spectral region can be achieved, thereby ensuring the accuracy of the spectral region division.
[0079] Step S104: re-divide the initially divided spectral region according to the first-order derivative data, and remove spectral regions that are greatly affected by leaf water and high noise.
[0080] It can achieve the effect of reducing interference and noise areas, thereby improving the accuracy of prediction.
[0081] Step S105, fitting the spectral curve of each spectral region with a preset function, calculating the definite integral of each spectral curve according to the fitted function, and constructing a chlorophyll inversion model by using the definite integral value of each spectral region as a characteristic variable in combination with the RF algorithm.
[0082] The feature construction method is based on the segmented fitting and integration of the spectral curve. The specific operation is to divide the entire spectral area into multiple regions according to the chlorophyll and nitrogen spectral response closely related to the chlorophyll content, and fit the spectral curve of each region with a suitable function, and then calculate the definite integral of each curve according to the fitted function, and use the definite integral value of each region as the characteristic variable to construct the chlorophyll inversion model.
[0083] The present invention proposes a feature extraction method which is not affected by the external environment, has high spectral utilization, can fully consider the characteristics of hyperspectral reflectance and spectral curve shape, and can achieve dimensionality reduction of hyperspectral data, thereby providing stable feature extraction results for chlorophyll inversion modeling.
[0084] According to an embodiment of the present invention, preferably, fitting the spectral curve of each spectral region using a preset function includes:
[0085] Linear region 1, linear region 2 and linear region 3 are all fitted using linear functions, Lorentz region is fitted using Lorentz function, and Gaussian region is fitted using inverse Gaussian function;
[0086] Among them, the Lorentz function and the inverse Gaussian function are recorded as L(λ) and G(λ), respectively, and their expressions are as follows:
[0087]
[0088]
[0089] In the formula, λ represents the spectral band, λ l It indicates the wavelength band of chlorophyll reflectance peak in the 500-600nm region, γ indicates the half-height width; R g It is the minimum reflectivity value in the red region of the chlorophyll strong absorption band, that is, the reflectivity value of the band where P3 is located, R s is the maximum value of shoulder reflection in the near-infrared region, that is, the reflectivity value of the band where P5 is located, and σ is the standard deviation coefficient of the Gaussian function.
[0090] The effect of fitting the corresponding area can be achieved, thereby ensuring the accuracy of the fitting.
[0091] According to an embodiment of the present invention, preferably, calculating the definite integral of each spectral curve according to the fitted function includes:
[0092] The corresponding definite integral value is calculated for each spectral region, and the position data of P1-P5 are used to initialize the fitting function to obtain a characteristic variable with five eigenvalues.
[0093] Specifically, when the above function is well fitted, the corresponding definite integral value is calculated for each spectral region, and the position data of P1-P5 can be used to initialize the fitting function. Finally, a characteristic variable with five eigenvalues will be obtained. The present invention records this feature extraction method of segmented fitting for integration as SFI.
[0094] Theoretically, the SFI method includes all spectral regions related to chlorophyll response into the extraction range through integral operation, and the spectrum utilization rate is high. The final eigenvector has only 5 eigenvalues, which also achieves the dimensionality reduction of hyperspectral data. Figure 1 It can be seen that the positions of P1-P5 are relatively stable, providing a stable integration interval for the integral calculation of each area, thereby ensuring that the final result is also relatively stable.
[0095] like Figure 2 As shown in the figure, it is the overall technical route of the present invention. In order to comprehensively evaluate the modeling performance of the SFI method, it is compared with three different types of feature extraction methods, namely SPA based on forward feature construction, RFE based on reverse feature elimination, and PCA that realizes data compression through linear transformation. The most common random forest (RF) model is used for modeling, and the determination coefficient (R2), root mean square error (RMSE) and mean absolute percentage error (MAPE) are used to evaluate the performance of the model. The relevant formulas are as follows:
[0096]
[0097]
[0098]
[0099] Where n is the number of samples, y i is the SPAD value of the ith sample, is the predicted value of the ith sample, is the average SPAD value of all samples.
[0100] Specifically, a tobacco field was randomly selected. The tobacco field was located on a flat terrain with no obstacles around. The experimental tobacco variety in the entire tobacco field was Yunyan 87. Flying photography was performed at the root extension stage and the topping stage. The study area was set up with 3 replicates and 5 plots. The plots were divided into N0, N50, N100, N150, and N200 according to the fertilizer application amount. Here, N0 means no fertilizer, N100 means normal fertilizer application amount, N50, N150, and N200 are 0.5 times, 1.5 times, and 2 times the normal fertilizer application amount, respectively. Other tobacco field management measures were kept consistent in each plot according to the farmers' previous habits.
[0101] The piecewise function fitting results of the entire spectral curve are as follows: Figure 3 As shown in the figure, the fitting effect of the two ends of the Gaussian region is poor. After removing the regions with poor fitting at both ends, the fitting effect of the Gaussian region is as follows: Figure 3 As shown in the upper left sub-figure, the Gaussian region after interval correction also achieves a relatively good fitting effect.
[0102] The specific modeling results are as follows: Figure 4 As shown, Figure 4 (a)-(d) show the scatter plots of the results of building a chlorophyll inversion model based on SPA, RFE, PCA and the SFI method proposed by the present invention using the RF algorithm. The final results show that the SFI-RF model achieves the best performance. Taking the SFI-RF model as an example, the measured data and the model prediction results are plotted into a chlorophyll content distribution diagram. The results are shown in Figure 2. Figure 5 The overall chlorophyll content of tobacco leaves in the root extension stage was lower than that in the topping stage. The overall chlorophyll content of plots with less nitrogen fertilizer was lower than that of plots with more nitrogen fertilizer, and the model prediction results were highly consistent with the actual values.
[0103] The present invention has the following beneficial effects:
[0104] 1. Compared with the existing spectral feature extraction methods, the SFI method proposed in the present invention is not affected by external environmental factors and makes full use of spectral information. The integration method includes both the spectral reflectance characteristics and the shape characteristics of the spectral curve, and at the same time realizes the dimensionality reduction of hyperspectral data, the integral interval is basically stable, and the obtained integral value is also basically stable. There is no embedded evaluator and it is less affected by internal parameters.
[0105] 2. The performance of the model constructed using the SFI feature extraction method proposed in the present invention is better than that of the model constructed using the traditional feature extraction method, and the field chlorophyll content distribution map drawn based on actual cases shows that the predicted chlorophyll content distribution is highly consistent with the actual chlorophyll content distribution.
[0106] From the above description, it can be seen that the present application achieves the following technical effects:
[0107] In the embodiment of the present application, a feature extraction method based on segmented integration of hyperspectral curves is adopted, by obtaining drone hyperspectral images of tobacco leaves at various key stages of field growth; the hyperspectral images are preprocessed, and the average spectral reflectance of pure tobacco pixels in several small areas are extracted from the preprocessed images; the average spectral reflectance is smoothed to obtain the first-order derivative data of the spectral curve after smoothing; the spectral regions preliminarily divided are divided again according to the first-order derivative data, and the spectral regions greatly affected by leaf water and high noise are eliminated; the spectral curve of each spectral region is fitted with a preset function, and then the spectral curve is fitted based on the first-order derivative data. The definite integral of each spectral curve is calculated according to the fitted function, and the definite integral value of each spectral area is used as the characteristic variable to build a chlorophyll inversion model in combination with the RF algorithm, so as to achieve the purpose of building a chlorophyll inversion model for field tobacco leaves, thereby realizing the technical effect of improving the prediction accuracy of chlorophyll content distribution, and further solving the problems of existing feature extraction methods for hyperspectral data, such as low spectral utilization, too much loss of hyperspectral information, and being affected by external factors such as shadow, soil, and canopy structure; different parameter combinations lead to different screening results, and thus different modeling performance; and the technical problem that the extracted features do not contain the shape characteristics of the hyperspectral curve.
[0108] According to an embodiment of the present invention, preferably, a preset function is used to fit the spectral curve of each region, and then the definite integral of each curve is calculated according to the fitted function, and the definite integral value of each spectral region is used as a characteristic variable to combine the RF algorithm to construct a chlorophyll inversion model, and further includes:
[0109] Provide reference for guiding tobacco farmers in evaluating the maturity of tobacco leaves in the field and provide information support for tobacco leaf harvesting.
[0110] By providing preset results to tobacco farmers, an efficient, low-cost and accurate spectral feature extraction method for chlorophyll prediction of field tobacco leaves is achieved.
[0111] like Figure 7 As shown, in order to achieve the above-mentioned purpose, according to another aspect of the present application, a spectral feature extraction system for predicting chlorophyll in field tobacco leaves is provided. The spectral feature extraction system for predicting chlorophyll in field tobacco leaves comprises:
[0112] An acquisition module 701 is used to acquire drone hyperspectral images of tobacco leaves at various key stages of field growth;
[0113] By automatically collecting a large amount of hyperspectral image data through drones, real-time hyperspectral images can be obtained, thus providing a data basis for subsequent analysis and processing.
[0114] A preprocessing and extraction module 702 is used to preprocess the hyperspectral image and extract the average spectral reflectance of pure tobacco pixels in a plurality of cells from the preprocessed image;
[0115] By preprocessing the acquired hyperspectral images, the accuracy of the data can be improved, and at the same time, the required data can be easily extracted.
[0116] A processing module 703 is used to perform smoothing on the average spectral reflectance to obtain first-order derivative data of the smoothed spectral curve;
[0117] It can achieve good data processing effects, thus providing a data basis for further spectral region division.
[0118] The spectral region division module 704 is used to divide the initially divided spectral region again according to the first-order derivative data, and remove the spectral region that is greatly affected by leaf water and high noise;
[0119] It can achieve the effect of reducing interference and noise areas, thereby improving the accuracy of prediction.
[0120] The model building module 705 is used to fit the spectral curve of each spectral region with a preset function, calculate the definite integral of each spectral curve according to the fitted function, and use the definite integral value of each spectral region as a characteristic variable in combination with the RF algorithm to build a chlorophyll inversion model.
[0121] According to the feature construction method of segmented fitting and integration of spectral curves, the specific operation is to divide the entire spectral area into multiple regions according to the spectral response of chlorophyll and nitrogen which is closely related to the chlorophyll content, and fit the spectral curve of each region with a suitable function, and then calculate the definite integral of each curve according to the fitted function, and use the definite integral value of each region as the characteristic variable to construct the chlorophyll inversion model.
[0122] The present invention proposes a feature extraction method which is not affected by the external environment, has high spectral utilization, can fully consider the characteristics of hyperspectral reflectance and spectral curve shape, and can achieve dimensionality reduction of hyperspectral data, thereby providing stable feature extraction results for chlorophyll inversion modeling.
[0123] According to an embodiment of the present invention, preferably, fitting the spectral curve of each spectral region using a preset function includes:
[0124] Linear region 1, linear region 2 and linear region 3 are all fitted using linear functions, Lorentz region is fitted using Lorentz function, and Gaussian region is fitted using inverse Gaussian function;
[0125] Among them, the Lorentz function and the inverse Gaussian function are recorded as L(λ) and G(λ), respectively, and their expressions are as follows:
[0126]
[0127]
[0128] In the formula, λ represents the spectral band, λ l It indicates the wavelength band of chlorophyll reflectance peak in the 500-600nm region, γ indicates the half-height width; R g It is the minimum reflectivity value in the red region of the chlorophyll strong absorption band, that is, the reflectivity value of the band where P3 is located, R s is the maximum value of shoulder reflection in the near-infrared region, that is, the reflectivity value of the band where P5 is located, and σ is the standard deviation coefficient of the Gaussian function.
[0129] The effect of fitting the corresponding area can be achieved, thereby ensuring the accuracy of the fitting.
[0130] From the above description, it can be seen that the present application achieves the following technical effects:
[0131] In the embodiment of the present application, a feature extraction method based on segmented integration of hyperspectral curves is adopted, by obtaining drone hyperspectral images of tobacco leaves at various key stages of field growth; the hyperspectral images are preprocessed, and the average spectral reflectance of pure tobacco pixels in several small areas are extracted from the preprocessed images; the average spectral reflectance is smoothed to obtain the first-order derivative data of the spectral curve after smoothing; the spectral regions preliminarily divided are divided again according to the first-order derivative data, and the spectral regions greatly affected by leaf water and high noise are eliminated; the spectral curve of each spectral region is fitted with a preset function, and then the spectral curve is fitted based on the first-order derivative data. The definite integral of each spectral curve is calculated according to the fitted function, and the definite integral value of each spectral area is used as the characteristic variable to build a chlorophyll inversion model in combination with the RF algorithm, so as to achieve the purpose of building a chlorophyll inversion model for field tobacco leaves, thereby realizing the technical effect of improving the prediction accuracy of chlorophyll content distribution, and further solving the problems of existing feature extraction methods for hyperspectral data, such as low spectral utilization, too much loss of hyperspectral information, and being affected by external factors such as shadow, soil, and canopy structure; different parameter combinations lead to different screening results, and thus different modeling performance; and the technical problem that the extracted features do not contain the shape characteristics of the hyperspectral curve.
[0132] like Figure 8As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0133] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0134] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a spectral feature extraction method for predicting chlorophyll in field tobacco leaves.
[0135] In some embodiments, the spectral feature extraction method for predicting chlorophyll in field tobacco leaves can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the spectral feature extraction method for predicting chlorophyll in field tobacco leaves described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the spectral feature extraction method for predicting chlorophyll in field tobacco leaves by any other appropriate means (e.g., by means of firmware).
[0136] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0137] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0138] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0139] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0140] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data server), or a computing system that includes a middleware component (e.g., an application server), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LA), a wide area network (WA), a blockchain network, and the Internet.
[0141] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0142] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0143] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A spectral feature extraction method for predicting chlorophyll in field tobacco leaves, characterized in that: include: Obtaining drone hyperspectral images of tobacco leaves at key stages of field growth; Preprocessing the hyperspectral image, and extracting the average spectral reflectance of pure tobacco pixels in several small areas from the preprocessed image; Smoothing the average spectral reflectance to obtain first-order derivative data of the smoothed spectral curve; The initially divided spectral region is divided again according to the first-order derivative data, and the spectral region greatly affected by leaf water and high noise is eliminated; The spectral curve of each spectral region is fitted with a preset function, and then the definite integral of each spectral curve is calculated according to the fitted function. The definite integral value of each spectral region is used as a characteristic variable combined with the RF algorithm to construct a chlorophyll inversion model. Smoothing the average spectral reflectance to obtain first-order derivative data of the smoothed spectral curve includes: According to the absorption and reflection characteristics of chlorophyll and the spectral response of nitrogen, which has a greater impact on chlorophyll, the entire spectral curve is preliminarily divided into six parts: linear region 1, Lorentz region, linear region 2, Gaussian region, linear region 3 and discarded region; The data on the first-order derivative curve are used to further refine the division of the spectral region, and the spectral regions that are greatly affected by leaf water and high noise are eliminated; among them, the specific intervals of the five retained regions are: P3 -500nm, 500-600nm, 600-λ P3 nm, λ P3 -λ P5 nm, λ P5 -900nm, λ Pn Refers to the band where Pn (n = 1, 2, 3, 4, 5) is located; The spectral curve of each spectral region is fitted using a preset function including: Linear region 1, linear region 2 and linear region 3 are all fitted using linear functions, Lorentz region is fitted using Lorentz function, and Gaussian region is fitted using inverse Gaussian function; Among them, the Lorentz function and the inverse Gaussian function are recorded as L(λ) and G(λ), respectively, and their expressions are as follows: In the formula, λ represents the spectral band, λ l It indicates the wavelength band of chlorophyll reflectance peak in the 500-600nm region, γ indicates the half-height width; R g It is the minimum reflectivity value in the red region of the chlorophyll strong absorption band, that is, the reflectivity value of the band where P3 is located, R s is the maximum value of shoulder reflection in the near-infrared region, that is, the reflectivity value of the band where P5 is located, and σ is the standard deviation coefficient of the Gaussian function.
2. The spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to claim 1, characterized in that: Acquiring drone hyperspectral images of tobacco leaves at key growth stages in the field includes: UAV hyperspectral images were obtained. The band range of the spectrometer was 400-1000nm. The flight time was during the root extension period and the topping period of tobacco leaves, and the flight altitude of the UAV was 50m. The heading overlap rate and lateral overlap rate of the flight were 80% and 75% respectively.
3. The spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to claim 1, characterized in that: The hyperspectral image is preprocessed, and the average spectral reflectance of pure tobacco pixels in several small areas is extracted from the preprocessed image, including: Image stitching: Use the preset software to stitch the images, and select the preset coordinate system for the image geographic coordinate system; Spectral reflectance extraction: The drone hyperspectral image is interpreted by preset software, and the region of interest is divided into each plot. After removing the shadows, weeds, and soil background, the average spectral reflectance of pure tobacco pixels in each region of interest is extracted.
4. The spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to claim 1, characterized in that: Then, the definite integral of each spectral curve is calculated according to the fitted function, including: The corresponding definite integral value is calculated for each spectral region, and the position data of P1-P5 are used to initialize the fitting function to obtain a characteristic variable with five eigenvalues.
5. The spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to claim 1, characterized in that: The spectral curve of each region is fitted with a preset function, and then the definite integral of each curve is calculated according to the fitted function. After the definite integral value of each spectral region is used as the characteristic variable and the RF algorithm is combined to build the chlorophyll inversion model, it also includes: Provide reference for guiding tobacco farmers in evaluating the maturity of tobacco leaves in the field and provide information support for tobacco leaf harvesting.
6. A spectral feature extraction system for predicting chlorophyll in field tobacco leaves, characterized in that: include: The acquisition module is used to obtain drone hyperspectral images of tobacco leaves at various key stages of field growth; A preprocessing and extraction module, used to preprocess the hyperspectral image and extract the average spectral reflectance of pure tobacco pixels in several small areas from the preprocessed image; A processing module, used for smoothing the average spectral reflectance to obtain first-order derivative data of the spectral curve after smoothing; A spectral region division module, used to divide the initially divided spectral region again according to the first-order derivative data, and remove the spectral region that is greatly affected by leaf water and high noise; The model building module is used to fit the spectral curve of each spectral region with a preset function, and then calculate the definite integral of each spectral curve according to the fitted function, and use the definite integral value of each spectral region as a characteristic variable combined with the RF algorithm to build a chlorophyll inversion model; The processing module includes: according to the absorption and reflection characteristics of chlorophyll and the spectral response of nitrogen which has a greater impact on chlorophyll, the entire spectral curve is preliminarily divided into six parts: linear region 1, Lorentz region, linear region 2, Gaussian region, linear region 3 and discarded region; The data on the first-order derivative curve are used to further refine the division of the spectral region, and the spectral regions that are greatly affected by leaf water and high noise are eliminated; among them, the specific intervals of the five retained regions are: P3 -500nm, 500-600nm, 600-λ P3 nm, λ P3 -λ P5 nm, λ P5 -900nm, λ Pn Refers to the band where Pn (n = 1, 2, 3, 4, 5) is located; The model building module is used to fit the spectral curve of each spectral region using a preset function and includes: Linear region 1, linear region 2 and linear region 3 are all fitted using linear functions, Lorentz region is fitted using Lorentz function, and Gaussian region is fitted using inverse Gaussian function; Among them, the Lorentz function and the inverse Gaussian function are recorded as L(λ) and G(λ), respectively, and their expressions are as follows: In the formula, λ represents the spectral band, λ l It indicates the wavelength band of chlorophyll reflectance peak in the 500-600nm region, γ indicates the half-height width; R g It is the minimum reflectivity value in the red region of the chlorophyll strong absorption band, that is, the reflectivity value of the band where P3 is located, R s is the maximum value of shoulder reflection in the near-infrared region, that is, the reflectivity value of the band where P5 is located, and σ is the standard deviation coefficient of the Gaussian function.
7. An electronic device, characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the spectral feature extraction method for predicting chlorophyll in field tobacco leaves as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the spectral feature extraction method for predicting chlorophyll in field tobacco leaves according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Continuous wavelet analysis-based rice reflection spectrum red-edge position extraction method
CN106872383A
Crop growth monitoring method based on leaf area index inverted through inverse Gaussian process
CN110579186A
Rapid temperature extraction method based on laser absorption spectrum
CN111089661A
Living leaf pigment overlapping absorption coefficient separation method based on optical model
CN114112997A
Decomposing hyperspectral or multispectral image data
US20130039580A1
