Regional soil composition detection method, device, electronic device and storage medium
By combining laser-induced breakdown spectroscopy technology and automatic labeling method of hyperspectral images, the detection efficiency and accuracy problems caused by manual labeling in the prior art are solved, and efficient and low-cost soil composition detection is achieved.
Patent Information
- Application Number
- CN202510074321.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-17
AI Technical Summary
In the prior art, manual labeling of hyperspectral images leads to poor accuracy and efficiency of regional soil composition detection, which is difficult to meet the timeliness and low-cost needs of large-area and complex and variable application scenarios.
LIBS based on laser induced breakdown spectroscopy technology is used to obtain LIBS spectral data of spatial points in the area to be detected, and match it with the spatial position information of the hyperspectral image, automatically label soil components, and improve the accuracy of the detection results through the correction and correction process.
It realizes low-cost and high-efficiency automatic labeling of hyperspectral images, improves the accuracy and efficiency of regional soil composition detection, and is suitable for large-area environmental detection fields.
Smart Images

Figure CN119516215B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic equipment and storage medium for detecting regional soil components. Background Art
[0002] With the development of remote sensing technology and spectral technology, hyperspectral imaging technology has been widely used in many fields such as agricultural detection and environmental protection because of its high spectral resolution, rich information, ability to detect subtle differences between objects, and ability to achieve refined detection over a large area.
[0003] However, during the detection process, spectral information needs to be converted into specific substances or categories through data annotation. Existing hyperspectral image data annotation is usually performed manually based on existing knowledge. This method is not only inefficient, but also consumes a lot of manpower and material resources. Faced with large-scale, complex and changeable application scenarios, manual annotation is difficult to meet its timeliness and low-cost detection requirements, resulting in poor accuracy and efficiency in regional soil composition detection. Summary of the invention
[0004] The present invention provides a regional soil composition detection method, device, electronic device and storage medium, which are used to solve the defects in the prior art that the accuracy and efficiency of regional soil composition detection are poor due to manual annotation of hyperspectral images.
[0005] The present invention provides a method for detecting regional soil components, comprising:
[0006] Acquire a hyperspectral image of the area to be detected;
[0007] Acquire LIBS spectral data of spatial points in the area to be detected based on laser induced breakdown spectroscopy (LIBS), wherein the LIBS spectral data includes soil composition and spatial position information of each spatial point;
[0008] Based on the spatial position information, the hyperspectral image is matched with the LIBS spectral data, and the soil components of the spatial points of the hyperspectral image are annotated based on the matching result to obtain an annotated hyperspectral image;
[0009] Based on the annotated hyperspectral image, the soil composition of the area to be detected is detected to obtain a soil composition detection result.
[0010] According to the regional soil composition detection method provided by the present invention, after obtaining the soil composition detection result, the method further includes:
[0011] Determining correction points and corresponding annotation points in the annotated hyperspectral image;
[0012] Based on the distance between the calibration point and the marked point, and the marked soil component corresponding to the marked point, correcting the soil component detection result corresponding to the calibration point to obtain a first corrected result;
[0013] Based on the difference between the first correction result and the soil component detection result, the first correction result is corrected to obtain a final detection result.
[0014] According to the regional soil composition detection method provided by the present invention, based on the distance between the calibration point and the marked point, and the marked soil composition corresponding to the marked point, the soil composition detection result corresponding to the calibration point is corrected to obtain a first corrected result, including:
[0015] Determining a weight value of each marked point with respect to the correction point based on a distance between the correction point and the marked point;
[0016] The annotated soil components corresponding to the annotated points are fused based on the weight values, and the fused soil component detection results are used as the first correction results.
[0017] According to the regional soil composition detection method provided by the present invention, the first correction result is corrected based on the difference between the first correction result and the soil composition detection result to obtain the final detection result, including:
[0018] If the difference is less than the difference threshold, taking the first correction result as the final detection result;
[0019] Otherwise, the final detection result is determined based on the difference between the first correction result and the soil component detection results of the adjacent points of the calibration point.
[0020] According to the regional soil composition detection method provided by the present invention, the step of acquiring a hyperspectral image of the area to be detected includes:
[0021] Acquire the original hyperspectral image of the area to be detected;
[0022] The original hyperspectral image is preprocessed to obtain the hyperspectral image, wherein the preprocessing includes at least one of lens correction, reflectivity correction, atmosphere correction, geometric correction, and outlier removal.
[0023] According to the regional soil composition detection method provided by the present invention, the acquisition of LIBS spectral data of spatial points in the region to be detected includes:
[0024] Acquire original LIBS spectral data of spatial points in the area to be detected;
[0025] The original LIBS spectral data is subjected to background removal processing based on a polynomial baseline subtraction method, the background-processed LIBS spectral data is screened based on the wavelength of elements related to soil components, and the relationship between the wavelength intensity of characteristic elements and soil components is constructed to obtain the LIBS spectral data.
[0026] According to the regional soil composition detection method provided by the present invention, the method further includes:
[0027] The satellite positioning signal is received through the ground base station to perform positioning correction on the area to be detected.
[0028] The present invention also provides a regional soil component detection device, comprising:
[0029] A hyperspectral image acquisition unit, used for acquiring a hyperspectral image of the area to be detected;
[0030] A LIBS spectrum data acquisition unit, used for acquiring LIBS spectrum data of spatial points in the detection area based on the laser induced breakdown spectroscopy technology LIBS, wherein the LIBS spectrum data includes soil composition and spatial position information of each spatial point;
[0031] An image annotation unit is used to match the hyperspectral image with the LIBS spectral data based on the spatial position information, and annotate the soil components of the spatial points of the hyperspectral image based on the matching result to obtain an annotated hyperspectral image;
[0032] The soil component detection unit is used to detect the soil component of the area to be detected based on the annotated hyperspectral image to obtain a soil component detection result.
[0033] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned regional soil composition detection methods is implemented.
[0034] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for detecting regional soil composition as described in any one of the above is implemented.
[0035] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for detecting regional soil composition as described above is implemented.
[0036] The regional soil composition detection method, device, electronic device and storage medium provided by the present invention obtain LIBS spectral data of spatial points in the area to be detected based on the laser induced breakdown spectroscopy technology LIBS, match the hyperspectral image with the LIBS spectral data based on the spatial position information, and annotate the soil components of the spatial points of the hyperspectral image based on the matching results to obtain an annotated hyperspectral image, thereby realizing soil composition detection in a wide area. The present invention realizes low-cost and high-efficiency automatic spatial point annotation of hyperspectral images, which is of great significance to promoting the development of the field of large-area environmental detection of remote sensing images in the wild. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 It is one of the flow diagrams of the regional soil composition detection method provided by the present invention.
[0039] Figure 2 This is the second flow chart of the regional soil composition detection method provided by the present invention.
[0040] Figure 3 It is a flow chart of the detection result correction method provided by the present invention.
[0041] Figure 4 It is a schematic diagram of the process of the hyperspectral image acquisition method provided by the present invention.
[0042] Figure 5 It is a schematic diagram of the flow of the LIBS spectral data acquisition method provided by the present invention.
[0043] Figure 6 This is the third flow chart of the regional soil composition detection method provided by the present invention.
[0044] Figure 7 It is a structural schematic diagram of the regional soil composition detection system provided by the present invention.
[0045] Figure 8 It is a schematic diagram of the experimental results provided by the present invention.
[0046] Fig. 9 It is a structural schematic diagram of the regional soil composition detection device provided by the present invention.
[0047] Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] In order to achieve wide-area environmental detection in the wild, we can use annotated hyperspectral images with known spatial point data to make large-area predictions. However, existing hyperspectral image data annotation is usually performed manually based on existing knowledge. This method is not only inefficient, but also consumes a lot of manpower and material resources. Faced with large-scale, complex and changeable application scenarios, manual annotation is difficult to meet the timeliness and low-cost detection requirements. Therefore, there is an urgent need for efficient and low-cost automatic annotation methods.
[0050] In view of the above problems, an embodiment of the present invention proposes a method for detecting regional soil composition, in which LIBS spectral data of spatial points in the area to be detected is obtained based on the laser induced breakdown spectroscopy technology LIBS, and the LIBS spectral data includes the soil composition and spatial position information of each spatial point; based on the spatial position information, the hyperspectral image is matched with the LIBS spectral data, and the soil composition of the spatial points of the hyperspectral image is annotated based on the matching results to obtain an annotated hyperspectral image, thereby realizing soil composition detection in a wide area. The present invention realizes low-cost and high-efficiency automatic annotation of hyperspectral images, which is of great significance to promoting the development of the field of large-area environmental detection of remote sensing images in the wild.
[0051] The embodiments of the present invention can be applied to scenarios where soil composition detection is required over a wide area. The execution subject of the method can be an electronic device such as a terminal device, a computer, a server, a server cluster, or a specially designed soil composition detection device, or a soil composition detection device provided in the electronic device. The device can be implemented by software, hardware, or a combination of the two.
[0052] In the description of the embodiments of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0053] Figure 1It is one of the flow charts of the regional soil composition detection method provided by the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0054] Step 110: Acquire a hyperspectral image of the area to be detected.
[0055] Specifically, the area to be detected is the area where soil composition detection is required, and the area to be detected can be a large area in the wild. Hyperspectral image (HSI) has high spectral resolution and spatial resolution, and can simultaneously provide two-dimensional spatial information and one-dimensional spectral information of the imaging object, thereby reflecting its chemical composition information and physical morphology information. Hyperspectral images are widely used in remote sensing, agriculture, monitoring, geography, industry, environmental protection and other fields. Hyperspectral images can be obtained through a hyperspectral imaging detection system, such as setting the flight route of a hyperspectral imaging HSI detection system and obtaining remote sensing images in the area to be detected as hyperspectral images.
[0056] Preferably, in order to improve the positioning accuracy of the hyperspectral image, a ground base station can be built. Based on the real-time dynamic positioning technology of the carrier phase observation value, the base station receives the satellite positioning signal to improve the positioning accuracy in the area and transmits its signal to the HSI detection system.
[0057] Step 120, based on the laser induced breakdown spectroscopy technology LIBS, LIBS spectrum data of the spatial points in the area to be detected are obtained, and the LIBS spectrum data include the soil composition and spatial position information of each spatial point.
[0058] Specifically, Laser-Induced Breakdown Spectroscopy (LIBS) collects and analyzes the spectral wavelength and intensity information emitted by atoms and ions in the plasma to achieve qualitative and quantitative analysis of the elements in the sample. It has the advantages of in-situ detection, no need for sample pretreatment, fast detection speed, simultaneous detection of multiple elements, and can be used in conjunction with a variety of technologies.
[0059] By importing the flight route of the HSI detection system in step 110 into the LIBS detection system, the path is detected in situ according to its route, and its LIBS spectrum data is obtained. Similarly, the satellite positioning signal received by the ground base station can be transmitted to the LIBS detection system to improve the positioning accuracy.
[0060] By processing the LIBS spectral data, the LIBS spectral data can be represented as a kml file including the soil composition and spatial position information of each spatial point, where the spatial position information can be represented by spatial coordinates.
[0061] Step 130 , based on the spatial position information, the hyperspectral image is matched with the LIBS spectral data, and the soil components of the spatial points of the hyperspectral image are annotated based on the matching result to obtain an annotated hyperspectral image.
[0062] Specifically, both the hyperspectral image and the LIBS spectral data contain spatial position information, for example, the spatial position information can be longitude and latitude coordinate information. According to the longitude and latitude coordinates, the hyperspectral image is matched with the LIBS spectral data. Since the LIBS spectral data also includes soil composition information at spatial points, such as soil element content information, the hyperspectral image can be annotated with soil components at spatial points based on the matching results of the longitude and latitude coordinates, that is, the soil components are annotated at the corresponding spatial points of the hyperspectral image. The annotated hyperspectral image thus obtained realizes automatic annotation of soil components at multiple spatial points. Compared with manual annotation, the timeliness and annotation efficiency are higher, and the annotation cost is lower.
[0063] Step 140 , based on the annotated hyperspectral image, the soil composition of the area to be detected is detected to obtain a soil composition detection result.
[0064] Specifically, the annotated hyperspectral image obtained in step 130 realizes the soil composition annotation of multiple spatial points, and the area to be detected is usually a large area in the wild. In order to obtain soil composition detection results in a large area, it can be achieved through a trained regional soil composition detection model.
[0065] Among them, the regional soil composition detection model is used to detect the composition of soil in a wide area by annotating hyperspectral images. Figure 2 FIG. 2 is a flow chart of the method for detecting regional soil composition provided by the present invention. Figure 2 As shown in the figure, after the hyperspectral image is matched with the LIBS spectral data, a labeled hyperspectral image is obtained, wherein the labeled hyperspectral image includes labeled data of multiple spatial points and some unlabeled data. The labeled hyperspectral image is input into the trained regional soil composition detection model to obtain the soil composition detection result of the area to be detected output by the regional soil composition detection model, and the soil composition detection result can be represented as an inversion image.
[0066] Before executing step 140, the model may be trained to obtain a regional soil composition detection model. The regional soil composition detection model may be a neural network model, such as a convolutional neural network model. The present embodiment does not limit the type and structure of the model. The detection model includes an input layer, a hidden layer, and an output layer. The input layer is used to input annotated hyperspectral images, the hidden layer is used to extract features and classify the annotated hyperspectral images, and the output layer is used to output the soil component content. Annotated hyperspectral images of known soil components are collected as samples, and the samples are preprocessed. The spectral information contained in the pixel points corresponding to each soil component value is used as a training group to train the parameters of the network model, and some annotated spectra are used as a test group to perform a quality check on the trained network model, thereby obtaining a trained regional soil composition detection model.
[0067] The method provided by the embodiment of the present invention obtains LIBS spectral data of spatial points in the area to be detected based on the laser induced breakdown spectroscopy technology LIBS, matches the hyperspectral image with the LIBS spectral data based on the spatial position information, and annotates the soil components of the spatial points of the hyperspectral image based on the matching results to obtain an annotated hyperspectral image, thereby realizing soil component detection in a wide area. The present invention realizes low-cost and high-efficiency automatic annotation of hyperspectral images, which is of great significance to promoting the development of the field of large-area environmental detection of remote sensing images.
[0068] Based on any of the above embodiments, after obtaining the regional soil composition detection result, the method further includes:
[0069] Step 210, determining the calibration points and corresponding annotation points in the annotated hyperspectral image;
[0070] Step 220, based on the distance between the calibration point and the marked point, and the marked soil component corresponding to the marked point, correct the soil component detection result corresponding to the calibration point to obtain a first corrected result;
[0071] Step 230: Based on the difference between the first correction result and the soil component detection result, the first correction result is corrected to obtain a final detection result.
[0072] Specifically, in order to further improve the detection accuracy, after obtaining the soil composition detection result of the to-be-detected area output by the regional soil composition detection model, the detection result may be corrected.
[0073] First, determine the annotated points and correction points in the annotated hyperspectral image. The annotated points are recorded as core points, and the points of data inversion are recorded as correction points. Each correction point is corrected by comparing with four annotated points. By calculating the relative distance between the correction point and the annotated point, if the distance is larger, the possibility that the annotated soil component corresponding to the annotated point is close to the correction point is smaller. Conversely, if the distance is smaller, the possibility that the annotated soil component corresponding to the annotated point is close to the correction point is greater. For example, the soil component detection result corresponding to the correction point can be corrected according to the annotated soil component corresponding to the annotated point close to the correction point to obtain the first correction result.
[0074] In some embodiments, based on the distance between the calibration point and the marked point, and the marked soil component corresponding to the marked point, the soil component detection result corresponding to the calibration point is corrected to obtain a first corrected result, that is, step 220 specifically includes:
[0075] Step 221, determining a weight value of each annotation point with respect to the calibration point based on the distance between the calibration point and the annotation point;
[0076] Step 222: The labeled soil components corresponding to the labeled points are fused based on the weight values, and the fused soil component detection results are used as the first correction results.
[0077] Specifically, the soil composition test results corresponding to the calibration points are corrected, which can be determined by the weight value of each marked point for the calibration point. The weight value calculation formula is as follows:
[0078]
[0079] in is the weight value, L i is the relative distance from the calibration point to the i-th annotation point.
[0080] The marked points with weight values less than 50% are removed, and the remaining marked points with weight values greater than 50% are output. According to the weights of the remaining marked points, the marked soil components corresponding to the remaining marked points are fused, and the fused soil component detection results are used as the first correction results.
[0081] On this basis, the first correction result is compared with the soil composition test result corresponding to the calibration point output by the model. If the difference is too large, a second correction is required. The first correction result can be compared with the soil composition test results of the adjacent points of the calibration point to obtain the final test result.
[0082] In some embodiments, based on the difference between the first correction result and the soil component detection result, the first correction result is corrected to obtain the final detection result, that is, step 230 specifically includes:
[0083] Step 231, if the difference is less than the difference threshold, the first correction result is used as the final detection result;
[0084] Step 232: otherwise, determine the final detection result based on the difference between the first correction result and the soil component detection results of the adjacent points of the calibration point.
[0085] Specifically, the difference here can be expressed in the form of a percentage, for example, it can be expressed as the difference between the first correction result and the soil composition detection result, divided by the soil composition detection result of the correction point. The difference threshold can be preset, for example, it can be set to 10%.
[0086] If the difference is less than the first difference threshold, the first correction result can be used as the final detection result. Otherwise, if the difference is greater than or equal to the first difference threshold, the difference between the first correction result and the soil composition detection result of the adjacent point of the correction point is compared. The difference here can be expressed as the difference between the first correction result and the soil composition detection result of the adjacent point of the correction point, divided by the soil composition detection result of the adjacent point. The second difference threshold can also be pre-set, for example, it can be set to 10%. Here, the first difference threshold and the second difference threshold can be the same or different, and the embodiment of the present invention does not make specific limitations on this. If the difference is less than the second difference threshold, the first correction result can be used as the final detection result, otherwise, if the difference is greater than or equal to the second difference threshold, the soil composition detection result of the adjacent point can be used as the final detection result.
[0087] Figure 3 It is a flow chart of the detection result correction method provided by the present invention, such as Figure 3 As shown, the inversion image is the image corresponding to the soil component detection result of the area to be detected, the correction point is the point of data inversion, the inversion value is the soil component detection result corresponding to the correction point, and the core point is the marked point. First, the correction point and the corresponding core point in the annotated hyperspectral image are determined, and the weight value of each core point for the correction point is determined based on the distance between the correction point and the core point. The annotated soil components corresponding to the core point are fused based on the weight value, and the fused soil component detection result is used as the first correction result.
[0088] If the difference between the first correction result and the soil composition test result is less than the first difference threshold (10%), the first correction result is used as the final test result; otherwise, the difference between the first correction result and the soil composition test result of the adjacent point of the correction point is compared. If the difference is less than the second difference threshold (10%), the first correction result is used as the final test result; otherwise, if the difference is greater than or equal to the second difference threshold, the soil composition test result of the adjacent point is used as the final test result.
[0089] The method provided in the embodiment of the present invention can further improve the detection accuracy by correcting the soil component detection result output by the model.
[0090] Based on any of the above embodiments, a hyperspectral image of the area to be detected is obtained, that is, step 110 specifically includes:
[0091] Step 111, obtaining an original hyperspectral image of the area to be detected;
[0092] Step 112, preprocessing the original hyperspectral image to obtain a hyperspectral image, wherein the preprocessing includes at least one of lens correction, reflectivity correction, atmosphere correction, geometric correction, and outlier removal.
[0093] Specifically, Figure 4 is a schematic diagram of the process of the hyperspectral image acquisition method provided by the present invention, such as Figure 4 As shown, the airborne HSI imager receives positioning information from the positioning system, obtains the original hyperspectral image of the area according to the planned route, and then preprocesses the original hyperspectral image to obtain a hyperspectral image.
[0094] In order to improve image quality, eliminate or reduce lens distortion, and avoid position differences caused by lens distortion, the image needs to be corrected. Reflectivity correction converts the original digital value (DN value) received by the sensor into a reflectivity value that reflects the physical properties of the surface. In this process, the variation of data caused by instrument characteristics, observation conditions and surface characteristics is eliminated. The formula for reflectivity correction is:
[0095]
[0096] in It refers to the pixel brightness value of the object to be measured. It refers to the noise generated by the imaging spectrometer itself. Refers to the pixel brightness value of the reference board (commonly known as the white board). Refers to the standard reflectance value of the object to be measured. Refers to the standard reflectivity value of the reference plate. is the DN value of the object to be measured after eliminating the noise of the imaging spectrometer system. It is the DN value of the reference plate for eliminating the noise of the spectrometer system.
[0097] Atmospheric correction is a key data preprocessing step, the purpose of which is to eliminate atmospheric interference. Atmospheric components (such as water vapor, carbon dioxide, aerosols, etc.) will scatter and absorb light transmitted through the atmosphere, affecting the signal received by the sensor, so as to obtain data closer to the actual situation on the surface. Considering that after the UAV flies to a certain altitude, the hyperspectral image data obtained by the hyperspectral imager is affected by factors such as atmosphere and water vapor. Therefore, before the flight, a calibrated 2×2m, 50% reflectivity gray cloth is placed in the shooting area for atmospheric correction. The formula is as follows:
[0098]
[0099] in is the spectral reflectance after atmospheric correction, is the image reflectance after black and white correction, is the spectral reflectance of the gray cloth, It is the spectral reflectance of gray cloth after black and white correction.
[0100] In order to further improve the quality and accuracy of spectral images, the RGB image of the area is obtained simultaneously during the acquisition of hyperspectral images by hovering push-scanning. The RGB image and HSI image are processed by the Mercator projection method, and the data are resampled by bilinear interpolation to complete geometric correction.
[0101] In order to eliminate the abnormal points in the hyperspectral image, the image is divided into 10 The size of 10 is used to extract the spectral information contained in each pixel, and the step length is one pixel. Each spectrum contains 168 wavelength data. The Euclidean distance (ED) and cosine angle (CA) between the measured spectral curve and the average spectrum of the standard spectral set, as well as the spectral information divergence (SID), are calculated to obtain the spectral anomaly index (SAI) to identify abnormal spectra. The abnormal spectrum is recorded as a null value, and the calculation is performed in sequence according to the step size. If the nth calculation is a null value, n+i (1 ≤i≤ 10) If the value is not null during the second calculation, the spectrum value is output. In other cases, the average value of the spectrum in the data set with the smallest difference is recorded as the spectrum of the pixel point. The calculation formula is:
[0102]
[0103]
[0104] in, is the spectral anomaly index, and CA are the Euclidean distance and cosine angle between the measured spectrum curve and the average spectrum of the standard spectrum set, respectively. SID is the spectrum information divergence. x and y represent two spectrum curves, respectively. and is the value of the i-th band on the curve, and n is the total number of bands.
[0105]
[0106] Among them, x y represents the dot product of two vectors, and They represent the magnitudes of two vectors respectively.
[0107]
[0108] in and They respectively represent the relative intensity of the i-th band in their respective spectral curves.
[0109] The method provided in the embodiment of the present invention obtains a hyperspectral image by preprocessing the original hyperspectral image, which can further improve the quality and accuracy of the hyperspectral image, thereby improving the accuracy of regional soil component detection.
[0110] Based on any of the above embodiments, obtaining LIBS spectrum data of spatial points in the area to be detected, that is, step 120 includes:
[0111] Step 121, obtaining original LIBS spectrum data of spatial points in the area to be detected;
[0112] Step 122, performing background removal processing on the original LIBS spectrum data based on a polynomial baseline subtraction method, performing data screening on the background-processed LIBS spectrum data based on the wavelength of elements related to soil components, and constructing a relationship between the wavelength intensity of characteristic elements and soil components to obtain LIBS spectrum data.
[0113] Specifically, Figure 5 is a schematic flow chart of the LIBS spectral data acquisition method provided by the present invention, such as Figure 5 As shown, the LIBS detection device receives positioning information from the ground base station of the positioning system, and obtains the original LIBS spectrum of the path according to the detection route, that is, the original LIBS spectrum data of the spatial points in the area to be detected.
[0114] In order to improve the detection accuracy of the LIBS device, it is necessary to add data processing to the LIBS detection system, remove the background information from the original LIBS spectrum, approximate the baseline through polynomial fitting, and subtract the baseline to obtain the atomic emission spectrum data after baseline correction. The fitting residual after polynomial fitting is calculated as follows:
[0115]
[0116]
[0117] in, is the original LIBS spectrum data, P(x) is the fitted spectrum, DEV is the fitting residual, n is the number of spectrum results, and the residual judgment condition is:
[0118]
[0119] That is, the result of subtracting the fitting residuals of two adjacent spectral results is divided by the previous fitting residual value. If the final value is less than 0.05, it meets the residual judgment condition.
[0120] The LIBS spectra were screened according to the element information corresponding to the wavelength in the NIST database and the element wavelength related to the soil composition to achieve data dimensionality reduction.
[0121] Specifically, the central wavelengths of the atomic spectral lines corresponding to the four elements in the NIST database are shown in Table 1 below:
[0122] Table 1
[0123]
[0124] Through preprocessing, effective spectral information is screened out, and the relationship between the wavelength intensity of characteristic elements and soil components is constructed, so as to accurately and quickly obtain the soil component content, thereby obtaining LIBS spectral data containing element content and spatial coordinate information, which can be represented by a kml file.
[0125] The method provided in the embodiment of the present invention can further improve the accuracy of regional soil component detection by processing original LIBS spectral data.
[0126] Based on any of the above embodiments, the method further includes:
[0127] Satellite positioning signals are received through ground base stations to perform positioning correction on the area to be detected.
[0128] Specifically, in order to further improve the matching accuracy of hyperspectral images and LIBS spectral data, a ground base station can be built. Based on the real-time dynamic positioning technology of carrier phase observation values, the base station receives satellite positioning signals to improve the positioning accuracy in the area and transmits its signals to the LIBS detection system and the HSI detection system.
[0129] Based on any of the above embodiments, Figure 6 FIG. 3 is a flow chart of the method for detecting regional soil composition provided by the present invention. Figure 6 As shown in the figure, in this example, ×× Farm in City B, Province A was selected as the test base. The base is located in an arid and semi-arid area, and unreasonable farming methods have caused large-scale salinization of the soil. Therefore, the soil salt content in the area was selected as the experimental index. The 130m 182 test soil samples were collected within the 35m detection range to verify the results, and 20 soil samples with different salinity gradients were selected to construct the relationship between LIBS spectra and soil salinity. Figure 7 is a schematic diagram of the structure of the regional soil composition detection system provided by the present invention, such as Figure 7 As shown, first, the positioning satellite is connected through the ground base station to obtain the location information of the area; and the ground base station is used to perform positioning correction on the area, and the spatial position deviation after calibration is about 1 cm; then the LIBS detection system and the HSI detection system are connected to the ground base station respectively. After the detection area is delineated, the detection route is set, and the LIBS detection system generates the annotation data on the route, that is, the LIBS spectral data; the HSI detection system generates a hyperspectral image of the area. After converting the LIBS spectral data into a kml file, the hyperspectral image is annotated with soil components. And the inversion model of the area is established through the regional soil composition detection model, and finally the inversion result is corrected to output the final detection result. Specifically including:
[0130] S1, build a ground base station, based on the real-time dynamic positioning technology of carrier phase observation value, the base station receives satellite positioning signals to improve the positioning accuracy in the area, and transmits its signals to the LIBS detection system and HSI detection system.
[0131] S2, obtaining a hyperspectral image dataset. After connecting to the base station signal, set the flight route of the hyperspectral imaging detection system and obtain remote sensing images in the area.
[0132] S3, obtaining a LIBS spectral data set. The flight route in S2 is imported into the LIBS detection system, so that the system performs in-situ detection on the route according to the flight route and obtains its LIBS spectral data.
[0133] S4, hyperspectral image preprocessing. Perform lens correction, reflectance correction, atmospheric correction, geometric correction and image stitching on the acquired hyperspectral image. Improve the accuracy of the spectrum and longitude and latitude coordinates in the hyperspectral image.
[0134] S5, remove outliers from the hyperspectral image. Slice the synthesized image according to its pixel points, where the slice step is 1 and the slice size range is 10. 10. Remove outliers in the matrix by calculating spectral outliers.
[0135] S6, constructing a label data set. The acquired LIBS spectrum data is cleaned, characteristic wavelengths are selected, element contents are obtained, and kml files are generated with element contents and spatial coordinate information.
[0136] S7, data annotation, matches the kml file with the hyperspectral image under the matching of longitude and latitude, and annotates the soil components of the spatial points of the hyperspectral image based on the matching results to achieve automatic image annotation.
[0137] S8, component detection, builds an artificial neural network model, imports the annotated hyperspectral image, and inverts the elemental composition in the area.
[0138] S9, result correction, taking the marked point as the core point and the spatial position of the inversion result as the correction point, setting different thresholds according to the distance from the correction point to the core point, and correcting the inversion result.
[0139] The method provided in the embodiment of the present invention detects the soil element composition of the spatial points in the area to be tested by LIBS technology, and performs real-time image annotation on the wide-area hyperspectral image acquired by hyperspectral imaging technology. The realization of low-cost and high-efficiency automatic annotation of hyperspectral images is of great significance to the development of the field of large-area environmental detection of remote sensing images.
[0140] Figure 8 It is a schematic diagram of the experimental results provided by the present invention, such as Figure 8 As shown, taking the detection area soil salinity as an example, Figure 8 The top part is the hyperspectral image, the middle part is the manually annotated image inversion result, and the bottom part is the inversion result of HSI image annotation based on LIBS technology, that is, the soil salinity detection result. After testing, this method can achieve good application results.
[0141] The regional soil composition detection device provided by the present invention is described below. The regional soil composition detection device described below and the regional soil composition detection method described above can be referenced to each other.
[0142] Based on any of the above embodiments, Fig. 9 is a schematic diagram of the structure of the regional soil composition detection device provided by the present invention, such as Fig. 9 As shown, the device comprises:
[0143] A hyperspectral image acquisition unit 910 is used to acquire a hyperspectral image of the area to be detected;
[0144] A LIBS spectrum data acquisition unit 920 is used to acquire LIBS spectrum data of spatial points in the detection area based on the laser induced breakdown spectroscopy technology LIBS, wherein the LIBS spectrum data includes soil composition and spatial position information of each spatial point;
[0145] An image annotation unit 930 is used to match the hyperspectral image with the LIBS spectrum data based on the spatial position information, and annotate the soil components of the spatial points of the hyperspectral image based on the matching result to obtain an annotated hyperspectral image;
[0146] The soil component detection unit 940 is used to detect the soil component of the area to be detected based on the annotated hyperspectral image to obtain a soil component detection result.
[0147] Based on the above embodiment, a result correction unit is further included, which is used for:
[0148] Determining correction points and corresponding annotation points in the annotated hyperspectral image;
[0149] Based on the distance between the calibration point and the marked point, and the marked soil component corresponding to the marked point, correcting the soil component detection result corresponding to the calibration point to obtain a first corrected result;
[0150] Based on the difference between the first correction result and the soil component detection result, the first correction result is corrected to obtain a final detection result.
[0151] Based on the above embodiment, the result correction unit is specifically used for:
[0152] Determining a weight value of each marked point with respect to the correction point based on a distance between the correction point and the marked point;
[0153] The annotated soil components corresponding to the annotated points are fused based on the weight values, and the fused soil component detection results are used as the first correction results.
[0154] Based on the above embodiment, the result correction unit is specifically used for:
[0155] If the difference is less than the difference threshold, taking the first correction result as the final detection result;
[0156] Otherwise, the final detection result is determined based on the difference between the first correction result and the soil component detection results of the adjacent points of the calibration point.
[0157] Based on the above embodiment, the hyperspectral image acquisition unit is specifically used for:
[0158] Acquire the original hyperspectral image of the area to be detected;
[0159] The original hyperspectral image is preprocessed to obtain the hyperspectral image, wherein the preprocessing includes at least one of lens correction, reflectivity correction, atmosphere correction, geometric correction, and outlier removal.
[0160] Based on the above embodiment, the LIBS spectrum data acquisition unit is specifically used for:
[0161] Acquire original LIBS spectral data of spatial points in the area to be detected;
[0162] The original LIBS spectral data is subjected to background removal processing based on a polynomial baseline subtraction method, the background-processed LIBS spectral data is screened based on the wavelength of elements related to soil components, and the relationship between the wavelength intensity of characteristic elements and soil components is constructed to obtain the LIBS spectral data.
[0163] Based on the above embodiment, a positioning correction unit is further included, which is used for:
[0164] The satellite positioning signal is received through the ground base station to perform positioning correction on the area to be detected.
[0165] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute the regional soil component detection method, which includes: obtaining a hyperspectral image of the area to be detected; obtaining LIBS spectral data of spatial points in the area to be detected based on the laser induced breakdown spectroscopy technology LIBS, wherein the LIBS spectral data includes soil components and spatial position information of each spatial point; matching the hyperspectral image with the LIBS spectral data based on the spatial position information, and annotating the soil components of the spatial points of the hyperspectral image based on the matching result to obtain an annotated hyperspectral image; detecting the soil components of the area to be detected based on the annotated hyperspectral image to obtain a soil component detection result.
[0166] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0167] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the regional soil composition detection method provided by the above methods, which includes: obtaining a hyperspectral image of the area to be detected; obtaining LIBS spectral data of spatial points in the area to be detected based on laser induced breakdown spectroscopy technology LIBS, wherein the LIBS spectral data includes soil composition and spatial position information of each spatial point; based on the spatial position information, matching the hyperspectral image with the LIBS spectral data, and annotating the soil composition of the spatial points of the hyperspectral image based on the matching result to obtain an annotated hyperspectral image; based on the annotated hyperspectral image, detecting the soil composition of the area to be detected to obtain a soil composition detection result.
[0168] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the regional soil composition detection method provided by the above-mentioned methods, the method comprising: obtaining a hyperspectral image of the area to be detected; obtaining LIBS spectral data of spatial points in the area to be detected based on laser induced breakdown spectroscopy technology LIBS, wherein the LIBS spectral data includes soil composition and spatial position information of each spatial point; matching the hyperspectral image with the LIBS spectral data based on the spatial position information, and annotating the soil composition of the spatial points of the hyperspectral image based on the matching result to obtain an annotated hyperspectral image; and detecting the soil composition of the area to be detected based on the annotated hyperspectral image to obtain a soil composition detection result.
[0169] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting regional soil composition, characterized in that: include: Acquire a hyperspectral image of the area to be detected; Acquire LIBS spectral data of spatial points in the area to be detected based on laser induced breakdown spectroscopy (LIBS), wherein the LIBS spectral data includes soil composition and spatial position information of each spatial point; Based on the spatial position information, the hyperspectral image is matched with the LIBS spectral data, and the soil components of the spatial points of the hyperspectral image are annotated based on the matching result to obtain an annotated hyperspectral image; Based on the annotated hyperspectral image, the soil composition of the area to be detected is detected by using a trained regional soil composition detection model to obtain a soil composition detection result.
2. The method for detecting regional soil composition according to claim 1, characterized in that: After obtaining the soil component test result, the method further includes: Determining correction points and corresponding annotation points in the annotated hyperspectral image; Based on the distance between the calibration point and the marked point, and the marked soil component corresponding to the marked point, correcting the soil component detection result corresponding to the calibration point to obtain a first corrected result; Based on the difference between the first correction result and the soil component detection result, the first correction result is corrected to obtain a final detection result.
3. The method for detecting regional soil composition according to claim 2, characterized in that: The step of correcting the soil component detection result corresponding to the calibration point based on the distance between the calibration point and the marked point and the marked soil component corresponding to the marked point to obtain a first corrected result includes: Determining a weight value of each marked point with respect to the correction point based on a distance between the correction point and the marked point; The annotated soil components corresponding to the annotated points are fused based on the weight values, and the fused soil component detection results are used as the first correction results.
4. The method for detecting regional soil composition according to claim 2, characterized in that: The step of correcting the first correction result based on the difference between the first correction result and the soil component detection result to obtain a final detection result includes: If the difference is less than the difference threshold, taking the first correction result as the final detection result; Otherwise, the final detection result is determined based on the difference between the first correction result and the soil component detection results of the adjacent points of the calibration point.
5. The method for detecting regional soil composition according to claim 1, characterized in that: The step of acquiring a hyperspectral image of the area to be detected comprises: Acquire the original hyperspectral image of the area to be detected; The original hyperspectral image is preprocessed to obtain the hyperspectral image, wherein the preprocessing includes at least one of lens correction, reflectivity correction, atmosphere correction, geometric correction, and outlier removal.
6. The method for detecting regional soil composition according to claim 1, characterized in that: The step of acquiring LIBS spectral data of spatial points within the area to be detected includes: Acquire original LIBS spectral data of spatial points in the area to be detected; The original LIBS spectral data is subjected to background removal processing based on a polynomial baseline subtraction method, the background-processed LIBS spectral data is screened based on the wavelength of elements related to soil components, and the relationship between the wavelength intensity of characteristic elements and soil components is constructed to obtain the LIBS spectral data.
7. The method for detecting regional soil composition according to any one of claims 1 to 6, characterized in that: The method further comprises: The satellite positioning signal is received through the ground base station to perform positioning correction on the area to be detected.
8. A regional soil composition detection device, characterized in that: include: A hyperspectral image acquisition unit, used for acquiring a hyperspectral image of the area to be detected; A LIBS spectrum data acquisition unit, used for acquiring LIBS spectrum data of spatial points in the detection area based on the laser induced breakdown spectroscopy technology LIBS, wherein the LIBS spectrum data includes soil composition and spatial position information of each spatial point; An image annotation unit is used to match the hyperspectral image with the LIBS spectral data based on the spatial position information, and annotate the soil components of the spatial points of the hyperspectral image based on the matching result to obtain an annotated hyperspectral image; The soil composition detection unit is used to detect the soil composition of the area to be detected based on the annotated hyperspectral image and through a trained regional soil composition detection model to obtain a soil composition detection result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the regional soil composition detection method as described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for detecting regional soil composition as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Air-ground integrated cooperative monitoring system and method of soil heavy metal pollution degree
CN107328720A
Soil component detection method, equipment and system
CN114813709A