A method and system for agricultural pollution inspection management based on big data analysis

By combining the improved MNF algorithm with SVM and MRF models and laser point cloud data, the problems of low efficiency and incomplete information in traditional rural pollution monitoring methods were solved, and the refined identification of agricultural pollution facilities and the analysis of the spatiotemporal characteristics of pollution were achieved, thus improving the scientific nature of rural environmental management.

CN120107793BActive Publication Date: 2025-09-30GUANGDONG HUANYUAN ENVIRONMENTAL ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510178603.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-09-30
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

Traditional rural pollution monitoring methods are inefficient and provide incomplete information. Hyperspectral remote sensing data has high noise interference and is difficult to achieve accurate classification. The spatiotemporal distribution of rural non-point source pollution is difficult to fully depict.

Method used

The improved minimum noise fractionation transform (MNF) algorithm is used to denoise and enhance hyperspectral images. The support vector machine (SVM) with kernel function and the Markov random field (MRF) are combined to construct a spectral-spatial integrated classification model. Multi-data fusion is performed with laser point cloud data to construct a three-dimensional spectral model of agricultural pollution facilities.

Benefits of technology

It has achieved refined identification of agricultural pollution facilities and analysis of the spatiotemporal characteristics of pollution, improved the comprehensiveness of pollution information acquisition and classification accuracy, and met the scientific decision-making needs of rural environmental management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107793B_ABST
    Figure CN120107793B_ABST
Patent Text Reader

Abstract

This application discloses a method and system for agricultural pollution inspection management based on big data analysis. The method involves image processing, including: collecting hyperspectral image data and laser point cloud data of agricultural pollution facilities; denoising the hyperspectral image data using an improved minimum noise factorization transform (MNF) algorithm to obtain a spectral feature band Z; the improved MNF algorithm optimizes the noise covariance matrix by introducing inter-band correlation estimation, and optimizes the MNF transformation process using the spatial information of the hyperspectral image data; classifying the spectral feature band Z using a kernel-based support vector machine (SVM) to determine the material and pollutant type of the agricultural pollution facility; and optimizing the SVM classification results by implementing a spatial regularization strategy based on a Markov random field (MRF) in the SVM classification. To address the incomplete acquisition of pollution information during agricultural pollution inspections, this application comprehensively assesses agricultural pollution information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to an agricultural pollution inspection and management method and system based on big data analysis. Background Art

[0002] With the rapid development of modern rural areas, rural non-point source pollution is increasingly becoming a significant threat to rural sustainable development and food security. Rural production activities, such as wastewater irrigation, excessive fertilizer and pesticide use, and the dumping of livestock and poultry manure and garbage, have led to severe pollution of the rural environment, including soil and water bodies. Timely and accurate monitoring of the spatial distribution of rural pollution facilities, pollutant types, and pollution levels is key to achieving scientific management of rural non-point source pollution.

[0003] Traditionally, rural domestic sewage monitoring relies primarily on manual on-site surveys and laboratory sampling and analysis, which can be labor-intensive, inefficient, and incomplete. In recent years, hyperspectral remote sensing technology, with its advantages of high spectral resolution and continuous wavelengths, has been widely used in rural environmental monitoring. Hyperspectral data can provide rich spectral information about agricultural wastewater treatment facilities, offering a new technical approach for pollutant identification and pollution severity assessment.

[0004] However, due to limitations in imaging mechanisms and signal transmission, hyperspectral remote sensing data often suffer from high spectral dimensionality, high levels of redundant information, and significant noise interference, posing challenges in extracting pollution information from agricultural pollution facilities. Minimum Noise Fractionation (MNF) is a commonly used hyperspectral data dimensionality reduction method, but it still suffers from deficiencies in noise suppression and feature extraction when processing agricultural pollution hyperspectral data. Furthermore, agricultural pollution facility features often exhibit high spectral similarity and strong spatial heterogeneity, making accurate classification and pollution identification difficult using spectral information alone. Therefore, spatial constraints are necessary.

[0005] Furthermore, monitoring rural domestic sewage facilities requires not only obtaining information on the spatial distribution of pollutants, but also analyzing their diffusion pathways and assessing the extent of pollution. Traditional pollution analysis methods rely primarily on single-point sampling data of pollutant concentrations, making it difficult to comprehensively characterize the spatiotemporal distribution of rural non-point source pollution. Therefore, a new agricultural pollution inspection and management method is urgently needed that can fully exploit the spatial and spectral information contained in hyperspectral remote sensing big data, enabling refined identification of agricultural sewage facilities, three-dimensional modeling, and analysis of the spatiotemporal characteristics of pollution, thus providing a scientific basis for rural environmental management decisions. Summary of the Invention

[0006] In response to the problem of incomplete acquisition of pollution information in agricultural pollution inspections in the existing technology, this application provides an agricultural pollution inspection management method based on big data analysis, which realizes denoising and enhancement of hyperspectral images through the improved minimum noise separation transform MNF algorithm, and combines the kernel function-based support vector machine SVM and Markov random field MRF to construct a spectral-spatial integrated classification model, etc., to fully explore the spatial distribution characteristics and pollution distribution laws of facilities and comprehensively evaluate pollution information.

[0007] The purpose of this application is achieved through the following technical solutions.

[0008] One aspect of the present application provides an agricultural pollution inspection and management method based on big data analysis, comprising: S1, collecting hyperspectral image data and laser point cloud data of agricultural pollution facilities; S2, using an improved minimum noise separation transform (MNF) algorithm to denoise the hyperspectral image data to obtain a spectral feature band Z; the improved minimum noise separation transform (MNF) algorithm optimizes the noise covariance matrix by introducing correlation estimation between noise bands, and optimizes the MNF transformation process by using the spatial information of the hyperspectral image data; S3, using a kernel-based support vector machine (SVM) to denoise the spectral feature band Z. Z is used for classification to obtain the material and pollutant type of the agricultural pollution facility; the kernel function-based support vector machine SVM optimizes the SVM classification result by setting a spatial regularization strategy based on Markov random field MRF in the SVM classification; S4, the laser point cloud data is filtered and the filtered laser point cloud data is registered using the iterative closest point ICP algorithm to obtain a registered three-dimensional point cloud model; S5, the material and pollutant type of the agricultural pollution facility are fused with the registered three-dimensional point cloud model through a multi-data fusion strategy to obtain a three-dimensional spectral model of the agricultural pollution facility. S6, agricultural pollution management is carried out according to the three-dimensional spectral model of the agricultural pollution facility;

[0009] Further, S2, using an improved minimum noise separation transform MNF algorithm to denoise the hyperspectral image data to obtain a spectral feature band Z, including: S21, performing MNF transformation on the hyperspectral image data X to obtain a noise covariance matrix Σ, an eigenvalue matrix Λ and an eigenvector matrix V, where X = VΛV T; S22, estimate the inter-band correlation of the noise in the hyperspectral image data X, and construct the noise band correlation matrix R; S23, use the noise band correlation matrix R to correct the noise covariance matrix Σ in the MNF transformation to obtain the corrected noise covariance matrix Σ', where Σ'=Σ+λ×R, λ is the balance factor; S24, use the SLIC method based on graph theory to perform superpixel segmentation on the hyperspectral image data X, and divide the image into N superpixel regions with similar spectra and adjacent spaces; S25, extract the spatial position information of each superpixel region, and construct the spatial weight matrix W of the superpixel region, where the element w in the i-th row and j-th column of W is ij The value of is 1 when the i-th superpixel region is adjacent to the j-th superpixel region, and 0 otherwise; S26, using the spatial weight matrix W of the superpixel region, the eigenvector matrix V is spatially regularized to obtain the spatially regularized eigenvector matrix V', where V'=(X T X+αX T LX) -1 X T X, L = DW is the Laplace matrix of the superpixel region, D is the degree matrix of W, α is the regularization parameter, and the Laplace matrix L is used to enhance the spatial smoothness of the eigenvector; S27, using the corrected noise covariance matrix Σ' and the spatially regularized eigenvector matrix V', the hyperspectral image data X is subjected to MNF transformation to obtain the spectral feature band Z after dimension reduction and denoising, where

[0010] Furthermore, S3, using a support vector machine SVM based on a kernel function to classify the spectral feature band Z to obtain the material and pollutant type of the agricultural pollution facility, including: S31, dividing the spectral feature band Z into a training sample set and a test sample set, and using the training sample set to train an SVM classifier; the SVM classifier adopts a radial basis kernel function K(x j ,x j )=exp(-g||x j -x j || 2 ) to perform feature space mapping, where x i ,x j is the feature vector of the training sample, and g is the kernel function parameter; S32, extract the spectral feature vector of each pixel in the test sample set, and use the trained SVM classifier to classify it to obtain the preliminary classification result y0; S33, use the Markov random field MRF to spatially regularize the preliminary classification result y0 to obtain the final classification result y; S34, according to the final classification result y, obtain the material type and pollutant type of the agricultural pollution facility.

[0011] Furthermore, in S33, the preliminary classification result y0 is spatially regularized using the Markov random field MRF to obtain the final classification result y, including: constructing the energy function of the MRF model based on the preliminary classification result y0 and the spectral feature band Z: Among them, E i (y i ) is the category label y of pixel i i The degree of match between its spectral characteristics indicates that pixel i is classified into category y i The likelihood of E ij (y i ,y j ,d ij ) is the category label y of pixel i and j i and y j The spatial smoothness between ij is the spectral distance between pixels i and j in the spectral characteristic band Z, in E ij The spectral distance factor is introduced in , which means that the spatial smoothing penalty should be reduced for two pixels with a large spectral distance even if they have different categories; β is the weight coefficient for balancing the likelihood term and the smoothing term;

[0012] The confidence propagation algorithm is used to approximate the inference solution of the energy function E(y) of the MRF model; the confidence propagation algorithm updates the confidence probability distribution of each pixel category label through an iterative message passing mechanism until convergence; initialize the confidence probability distribution of each pixel, let q i (y i )=exp(-E i (y i )); For each pixel i, pass message m to its neighboring pixel j ij (y i ), indicating that pixel i believes that pixel j should take label y i Probability score:

[0013] New confidence probability distribution for each pixel i: Repeat until the confidence probability distribution converges or the maximum number of iterations is reached; for each pixel i, the confidence probability distribution q after convergence is obtained. i (y i ) selects the category label with the largest confidence as the final classification result:

[0014] Furthermore, the energy function E(y) is expressed as follows: Among them, y represents the vector composed of the category labels of all pixels in the MRF model; y={y1,y2,......,y n};E i (y i) identifies the category label y of pixel i i The degree of match between its spectral characteristics indicates that pixel i is classified into category y i The likelihood or cost of E ij (y i ,y j ,d ij ) identifies the category labels y of pixels i and j i and y j The spatial smoothness between , which represents the spatial correlation of adjacent pixel category labels. It is defined as: Among them, δ(y i ,y j ) is the Kroneckerdelta function, when y i =y j 0 when d=0, otherwise 1; ij is the Euclidean distance between pixels i and j in the spectral characteristic band Z, ij Introducing spectral distance factor σ is the scale parameter that controls the influence of spectral distance; β represents the balanced likelihood term E i and the smoothing term E ij The weight coefficient between β and β controls the strength of spatial smoothing. The larger β is, the more the MRF model emphasizes spatial smoothness; the smaller β is, the more it emphasizes the likelihood matching of pixel spectral features. β can be optimized using methods such as cross-validation.

[0015] Through the above parameter definitions, the MRF energy function E(y) expresses the global optimality criterion of the agricultural pollution pixel classification result y: the likelihood term E i Encourages the category label to match the pixel spectral characteristics, and the smoothing term E ij Encourage the class label space of adjacent pixels to be consistent, and the spectral distance factor The spatial smoothing effect between pixels with similar spectra is enhanced. By solving the minimum value of the MRF energy function, the global optimal pixel classification result can be obtained.

[0016] Further, S4, obtaining the registered three-dimensional point cloud model, including: S41, dividing the laser point cloud data into discrete voxel grids, calculating the entropy value E (Voxel i ), according to the entropy threshold E th Mark the voxels and set the entropy value E(Voxel i ) is greater than the entropy threshold E th The voxels with the same value are marked as signal voxels, otherwise they are marked as noise voxels; S42, according to the labeling results of the voxels, the noise voxels in the laser point cloud data are extracted to obtain the filtered laser point cloud data; S43, the filtered laser point cloud data are aligned using the iterative closest point ICP algorithm to obtain the aligned three-dimensional point cloud model.

[0017] Furthermore, the entropy value E(Voxel i ) is:

[0018] Among them, Voxel i is the i-th voxel, P i (x j ) is the jth laser point x in the voxel j The probability density of can be estimated by the distribution of laser points within the voxel.

[0019] Furthermore, the entropy threshold E is calculated th The formula is: E th =μ+3σ, where μ and σ are the mean and standard deviation of the entropy values ​​of all voxels, respectively.

[0020] Furthermore, in S5, the material and pollutant type of the agricultural pollution facility are fused with the registered three-dimensional point cloud model through a multi-data fusion strategy to obtain a three-dimensional spectral model of the agricultural pollution facility, including: S51, the final classification result y of the material type and pollutant type of the agricultural pollution facility obtained by optimizing the support vector machine SVM based on the kernel function and the Markov random field MRF in S3 is spatially matched with the three-dimensional point cloud model obtained after registration using the iterative closest point ICP algorithm in S4 to realize the association of spectral information and spatial information; specifically, the following method is used for spatial matching: the laser point cloud registration parameters obtained by the iterative closest point ICP algorithm in S4, including the rotation matrix R and the translation vector t, are used to construct the coordinate transformation relationship between the hyperspectral image and the three-dimensional point cloud model: P lidar =R×P hs +t, where P lidar is the point coordinate in the 3D point cloud model, P hs is the corresponding hyperspectral image pixel coordinate; for each point P in the three-dimensional point cloud model lidar , according to the coordinate transformation relationship, calculate the projection pixel position P on the hyperspectral image plane hs :P hs =R -1 ×(P lidar -t), S513, according to the projection pixel position P hs The row and column numbers of the corresponding pixels are extracted from the final classification result y of S3. m and pollutant type label y p ; Label the extracted material type y m and pollutant type label y p , and the three-dimensional point P lidar Associate and build point-attribute information pairs (P lidar ,ym ,y p ); traverse all points of the three-dimensional point cloud model, repeatedly execute S512 to S514, complete the spatial matching of the hyperspectral image classification result and the three-dimensional point cloud model, and realize the point-level association of spectral information and spatial information.

[0021] S52, based on the spatial matching results of S51, each point in the 3D point cloud model registered by S4 is fused with the material type and pollutant type of the corresponding pixel in the classification result of S3 to construct a point-attribute information table of the 3D points of the agricultural pollution facilities;

[0022] S53, using the Thiessen polygon interpolation algorithm, interpolates the material attributes and pollutant attributes of the discrete three-dimensional points in the point-attribute information table constructed in S52 into the continuous three-dimensional space of the agricultural sewage facility, thereby realizing the spatial continuous expression of the material and pollutant information; using each point in the three-dimensional point cloud model after S4 registration as the generating point of the Thiessen polygon, the Thiessen polygon area of ​​each three-dimensional point is calculated; for the spatial position within each Thiessen polygon area, the material attributes and pollutant attributes of the position are calculated according to the distance from the three-dimensional point using the inverse distance weighted interpolation formula; interpolating the material and pollutant attributes of all Thiessen polygon areas covered by the three-dimensional point cloud model, and obtaining the continuous material attribute distribution and pollutant attribute distribution covering the complete three-dimensional space of the agricultural sewage facility;

[0023] S54 performs geometric and semantic registration on the three-dimensional point cloud model of the agricultural pollution facility registered by S4 and the material attribute distribution and pollutant attribute distribution covering the three-dimensional space of the agricultural pollution facility obtained by interpolation in S53, and constructs a three-dimensional spectral model of the agricultural pollution facility, thereby achieving high-precision expression and precise management of the three-dimensional spatial structure, material composition and pollution status of the agricultural pollution facility.

[0024] Another aspect of the present application provides an agricultural pollution inspection and management system based on big data analysis, which is used to execute an agricultural pollution inspection and management method based on big data analysis of the present application.

[0025] Compared with the existing technology, the advantages of this application are:

[0026] When the traditional minimum noise fractionation transform (MNF) algorithm processes agricultural pollution inspection hyperspectral data, on the one hand, the algorithm assumes that the noise is uncorrelated between each band, but in fact the noise in hyperspectral data often has a certain correlation between bands, which limits the MNF dimensionality reduction effect and the extracted feature bands may contain more noise information. This application introduces the estimation of the correlation between noise bands, constructs the noise band correlation matrix, and corrects the noise covariance matrix in the MNF transform, which can effectively solve the problem of limited dimensionality reduction effect caused by the traditional algorithm ignoring noise correlation. By fully considering the specific structure of the noise in agricultural pollution hyperspectral data, more effective feature bands are extracted, reducing the impact of noise on subsequent material identification and pollutant classification. On the other hand, the minimum noise fractionation transform (MNF) algorithm does not fully consider the spatial information of hyperspectral data, ignores the spectral similarity between adjacent pixels, and the dimensionality reduction process is easily interfered by outlier pixels, which reduces the robustness of feature extraction. This application uses a graph theory segmentation method to perform superpixel segmentation on hyperspectral images, extracts the spatial position information of each superpixel area, constructs a spatial weight matrix of the superpixel area, and uses it to spatially regularize the feature vectors of the MNF transform. The introduction of spatial constraint information can fully explore the spatial correlation of agricultural pollution hyperspectral images, smooth the influence of noise and outlier pixels, and improve the robustness and spatial consistency of feature band extraction.

[0027] On the one hand, in the traditional MRF model, the spatial smoothness Eij(yi, yj) of pixel i and pixel j only considers the difference in the category labels of the two pixels, but ignores their distance in the spectral feature space. When two pixels have different categories but similar spectral features, over-smoothing may lead to misclassification. Therefore, the present application introduces a spectral distance factor in Eij(yi, yj), and when the spectral feature distance between pixels i and j is larger, a larger spatial smoothing penalty is imposed. This adaptive spatial smoothing strategy can effectively avoid misclassification caused by over-smoothing and improve the classification accuracy of heterogeneous agricultural pollution facilities. At the same time, reasonable spatial smoothing can also suppress the influence of noise and outliers, making the classification results more robust. On the other hand, when solving energy minimization, traditional graph cut algorithms such as maximum flow / minimum cut algorithms have high computational complexity and are difficult to meet the real-time requirements of agricultural pollution inspections. The confidence propagation algorithm adopted by the present invention obtains better energy minimization results with lower computational complexity by iteratively updating the confidence probability distribution of pixel category labels. This efficient optimization strategy meets the real-time classification requirements of agricultural pollution inspections, making this method suitable for the rapid processing of large-scale agricultural pollution hyperspectral data. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The present application will be further described in the form of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting, and in these embodiments, the same numbers represent the same structures, wherein:

[0029] Figure 1 This is an exemplary flow chart of an agricultural pollution inspection and management method based on big data analysis according to some embodiments of the present application;

[0030] Figure 2 is an exemplary flow chart for obtaining the spectral feature band Z after dimensionality reduction and denoising according to some embodiments of the present application;

[0031] Figure 3 This is an exemplary flow chart for obtaining the material type and pollutant type of agricultural pollution facilities according to some embodiments of the present application;

[0032] Figure 4 is an exemplary flow chart of obtaining a registered three-dimensional point cloud model according to some embodiments of the present application;

[0033] Figure 5 It is an exemplary flow chart for constructing a three-dimensional space for agricultural sewage facilities according to some embodiments of the present application. DETAILED DESCRIPTION

[0034] The method and system provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0035] like Figure 1 As shown in the figure, hyperspectral image data and laser point cloud data of agricultural pollution facilities are collected. The hyperspectral image data are denoised using an improved minimum noise factorization transform (MNF) algorithm to obtain the spectral feature band Z. The improved MNF algorithm optimizes the noise covariance matrix by introducing inter-band correlation estimation and utilizes the spatial information of the hyperspectral image data to optimize the MNF transformation process. The spectral feature band Z is classified using a kernel-based support vector machine (SVM) to determine the material and pollutant type of the agricultural pollution facility. The kernel-based support vector machine (SVM) optimizes the SVM classification results by incorporating a spatial regularization strategy based on a Markov random field (MRF) into the SVM classification. The laser point cloud data are filtered and registered using an iterative closest point (ICP) algorithm to obtain a registered 3D point cloud model. The material and pollutant type of the agricultural pollution facility are then fused with the registered 3D point cloud model using a multi-data fusion strategy to obtain a 3D spectral model of the agricultural pollution facility. Agricultural pollution inspection and management are carried out based on the 3D spectral model of the agricultural pollution facility.

[0036] S1: Collect hyperspectral image data and laser point cloud data of agricultural pollution facilities. Hyperspectral images of agricultural pollution facilities are acquired using a hyperspectral imager, while three-dimensional point cloud data of agricultural pollution facilities is acquired using laser radar scanning, enabling multi-source data collection of agricultural pollution information.

[0037] like Figure 2 As shown, S2, the improved minimum noise separation transform MNF algorithm is used to denoise the hyperspectral image data to obtain the spectral feature band Z; the improved minimum noise separation transform MNF algorithm optimizes the noise covariance matrix by introducing the correlation estimation between noise bands, and optimizes the MNF transformation process by using the spatial information of the hyperspectral image data, including: S21, performing a standard MNF transformation on the hyperspectral image data to obtain noise statistical information and a transformation matrix. Calculate the covariance matrix C of the hyperspectral image data X X and the noise covariance matrix Σ. Among them, C X It can be estimated by the covariance matrix of the sample pixel, and Σ can be estimated by the variance of the dark current or uniform area. Perform eigenvalue decomposition on the noise covariance matrix Σ to obtain the eigenvalue matrix Λ and eigenvector matrix V, satisfying X=VΛV T Where Λ is a diagonal matrix, and the diagonal elements are the eigenvalues ​​of Σ; the column vector of V is the unit eigenvector of Σ, satisfying V T V=I.

[0038] S22, estimate the inter-band correlation of the noise in the hyperspectral image data X and construct the noise band correlation matrix R. The specific steps are as follows: for each band of the hyperspectral image data X, select a certain number of dark current pixels or uniform area pixels and calculate their mean and variance. Arrange the noise variance of each band in the order of the band to form the noise variance vector σ 2 , where σ 2 The i-th element of represents the noise variance of the i-th band. The noise variance vector σ 2 Take the logarithm of the elements in and get lnσ 2 ; Take the logarithm of the band number to get lnb. Use the least squares method to fit lnσ 2 The linear relationship between lnb is obtained, and the fitting parameters lnα and β are obtained, and γ=exp(lnσ 2 -βlnb). Substitute the fitted parameters α, β, and γ into the function f(b) = αb β +γ, we get the nonlinear function relationship f between noise variance and band number. Calculate any two bands b i and b j The noise correlation coefficient r ij ,in, Construct the noise band correlation matrix R; calculate any two bands b according to the noise variance function fi and b j The noise correlation coefficient r ij Among them, |b i -b j | represents the absolute value of the difference between two band numbers, and f(|bi-bj|) represents the difference between the band numbers |b i -b j Since f(0) represents the noise variance value when the difference between the band numbers is 0, It is used to normalize the noise correlation coefficient so that its value range is between [0, 1]. ij Fill in the i-th row and j-th column of matrix R to form the noise band correlation matrix R. R is a symmetric matrix with all diagonal elements set to 1, indicating that the noise correlation coefficient between each band and itself is 1. The inter-band correlation of the noise in the hyperspectral image data X is estimated, and the noise band correlation matrix R is constructed. Matrix R quantifies the degree of noise correlation between different bands.

[0039] S23. The noise covariance matrix Σ in the MNF algorithm is modified using the noise band correlation matrix R to obtain the modified noise covariance matrix Σ'. Let Σ' = Σ + λ × R, where λ is a balancing factor used to control the influence of matrix R. λ can be determined empirically or through cross-validation. When λ = 0, Σ' = Σ, indicating that the inter-band correlation of the noise is not considered, degenerating into the standard MNF transformation. When λ is large, Σ' ≈ λR, indicating that the inter-band correlation of the noise is primarily considered. An appropriate λ can balance the independence and correlation assumptions of the noise. By introducing the noise band correlation matrix R to modify the noise covariance matrix Σ, the statistical characteristics of the noise in the hyperspectral data can be more accurately described, information loss during the MNF transformation can be reduced, and the effect of feature extraction can be improved. The modified noise covariance matrix Σ' will replace the original noise covariance matrix Σ in the subsequent MNF transformation to achieve denoising and enhancement of the hyperspectral data.

[0040] S24 uses the graph theory-based SLIC (Simple Linear Iterative Clustering) method to perform superpixel segmentation on the hyperspectral image data X, dividing the image into N superpixel regions with similar spectra and adjacent spaces. Each pixel of the hyperspectral image data X is regarded as a vertex, and an undirected graph G is constructed. In graph G, each vertex is connected to the vertices in its spatial neighborhood, and the weight of the edge is the spectral similarity between the connected vertices, which can be measured using Euclidean distance or cosine of the angle. The SLIC algorithm is used to cluster graph G to obtain N superpixel regions. The SLIC algorithm achieves superpixel segmentation with local spectral similarity and spatial proximity by minimizing the spectral distance and spatial distance between pixels. The superpixel segmentation results can better utilize the spatial information of the hyperspectral image data and reduce the influence of noise and spectral variation.

[0041] S25, extract the spatial position information of each superpixel region and construct the spatial weight matrix W of the superpixel region. For the N regions obtained by superpixel segmentation, extract the spatial position information of each region, such as the center coordinates or boundary coordinates of the region. According to the spatial adjacency relationship of the superpixel regions, construct the spatial weight matrix W. W is an N×N symmetric matrix, where the element w in the i-th row and j-th column of W is ij The value rule of is: when the i-th superpixel area and the j-th superpixel area are adjacent, w ij =1; otherwise, w ij = 0. The spatial weight matrix W introduces the spatial adjacency constraints between superpixel regions and reflects the spatial correlation of superpixel regions.

[0042] S26, using the spatial weight matrix W of the superpixel region, spatially regularize the eigenvector matrix V to obtain the spatially regularized eigenvector matrix V'. Based on the spatial weight matrix W, calculate the Laplacian matrix L = DW of the superpixel region, where D is the degree matrix of W and the diagonal elements d ii Equal to the sum of the elements in the i-th row of W. Use the Laplace matrix L to perform spatial regularization on the eigenvector matrix V, and obtain the spatially regularized eigenvector matrix V'=(X T X+αX T LX) -1 X T X, where α is a regularization parameter that controls the influence of the spatial smoothness term. The spatial smoothness constraint is introduced through the Laplacian matrix L, and the spatial adjacency of the superpixel region is used to optimize the feature vector, enhancing the spatial smoothness and consistency of the feature vector.

[0043] S27, using the corrected noise covariance matrix Σ' and the eigenvector matrix V' after spatial regularization, perform MNF transformation on the hyperspectral image data X to obtain the spectral feature band Z after dimension reduction and denoising. Using the corrected noise covariance matrix Σ' and the eigenvector matrix V' after spatial regularization, perform MNF transformation on the hyperspectral image data X to obtain the transformed feature band The modified noise covariance matrix Σ' accounts for inter-band noise correlation, and the spatially regularized eigenvector matrix V' introduces spatial adjacency constraints. Therefore, the MNF transform can better remove noise while preserving spectral features. The resulting spectral feature band Z achieves dimensionality reduction and denoising while preserving the key spectral information and spatial structure of the hyperspectral data, providing high-quality data representation for subsequent feature analysis and classification.

[0044] S3, uses the kernel function-based support vector machine (SVM) to classify the spectral feature band Z to obtain the material and pollutant type of the agricultural pollution facility; the kernel function-based support vector machine (SVM) optimizes the SVM classification results by setting a spatial regularization strategy based on Markov random field (MRF) in the SVM classification.

[0045] like Figure 3 As shown, S31, the spectral feature band Z is divided into a training sample set and a test sample set. The training sample set is used to train a support vector machine (SVM) classifier to achieve classification and identification of agricultural pollution facility materials and pollutants. A portion of pixels in the spectral feature band Z is selected as the training sample set, and the remaining pixels are selected as the test sample set. The training sample set is used to train the SVM classifier, and the test sample set is used to evaluate the performance of the classifier. For each sample i in the training sample set, its feature vector x on the spectral feature band Z is extracted. i The eigenvector x i Represents the characteristic values ​​of sample i in different spectral bands, such as reflectivity or absorption. The material category or pollutant category label y corresponding to each training sample i is determined based on manual annotation. i . Tag y i It can be different material types or pollutant types of agricultural sewage facilities. Using the training sample set {(x i ,y i )} Train the SVM classifier and construct the sample feature vector x i With the category label y i The nonlinear discriminant model between them. SVM separates samples of different categories in high-dimensional feature space by finding the optimal separation hyperplane. The SVM classifier uses the radial basis kernel function K(x j ,x j )=exp(-g||x j -x j || 2) to perform feature space mapping, where x i ,x j is the feature vector of the training sample, and g is the kernel function parameter. The radial basis kernel function can map samples to a high-dimensional space to achieve nonlinear classification. Grid search and cross-validation methods are used to optimize the kernel function parameter g and penalty factor C of the SVM classifier. Grid search traverses different parameter combinations and selects the parameters with the best cross-validation performance. The penalty factor C controls the degree of penalty for classification errors, balancing the complexity of the model and classification accuracy. The SVM classifier is retrained using the optimized parameters g and C to obtain the final agricultural pollution facility material and pollutant classification model. This model can be used to automatically classify and identify materials and pollutants in new agricultural pollution facility spectral data.

[0046] S32: Extract the spectral feature vector of each pixel in the test sample set and classify it using the trained SVM classifier to obtain a preliminary classification result y0. Pixels are selected one by one from the test sample set, and for each pixel, a feature vector x is extracted for its spectral feature band Z. The feature vector x represents the characteristic values ​​of the pixel, such as reflectance or absorptivity, in different spectral bands. The extracted feature vector x is input into the trained SVM classifier, and the SVM discriminant function f(x) is used to classify the feature vector x. The SVM discriminant function f(x) calculates the kernel function value between x and the support vector and combines it with the parameters of the classification hyperplane to obtain the score or probability that x belongs to different categories. Based on the SVM discrimination result, the feature vector x is classified into the corresponding material category or pollutant category, obtaining a preliminary classification label y0 for the pixel. The preliminary classification label y0 represents the SVM classifier's prediction of the material or pollutant type for the pixel. Repeat the classification for each pixel in the test sample set to obtain a preliminary classification result y0 for the entire test area. The preliminary classification result y0 is a label vector with the same number of pixels as the test sample set, recording the predicted category for each pixel. Because the SVM classifier relies on pixel-level features, the preliminary classification result y0 may contain some noise and misclassification, especially at material or pollutant boundaries. Therefore, subsequent optimization and refinement of the preliminary classification results, combined with spatial information and prior knowledge, will be necessary to improve classification accuracy and reliability.

[0047] S33: Use Markov random field (MRF) to perform spatial regularization on the preliminary classification result y0 to obtain the final classification result y. Based on the preliminary classification result y0 and the spectral feature band Z, the energy function of the MRF model is constructed: Among them, E i (y i ) is the category label y of pixel i i The degree of match between its spectral characteristics indicates that pixel i is classified into category y iThe likelihood of is the category label y of pixel i and j i and y j The spatial smoothness between ij is the spectral distance between pixels i and j in the spectral characteristic band Z, in E ij The spectral distance factor is introduced in , which means that the spatial smoothing penalty should be reduced for two pixels with a large spectral distance even if they have different categories; β is the weight coefficient for balancing the likelihood term and the smoothing term.

[0048] The confidence propagation algorithm is used to perform approximate inference on the energy function E(y) of the MRF model. The confidence propagation algorithm updates the confidence probability distribution of each pixel category label through an iterative message passing mechanism until convergence. The confidence propagation algorithm is an approximate inference algorithm based on message passing, which is used to estimate the category label probability distribution of each pixel in the MRF model. The algorithm updates the confidence probability distribution of each pixel by iteratively passing confidence messages between pixels until the convergence condition or the maximum number of iterations is reached. The core idea of ​​the confidence propagation algorithm is that each pixel continuously updates its own category label probability distribution based on its own spectral characteristics and the confidence messages transmitted by neighboring pixels, and finally achieves the global optimal or approximately optimal classification result. Specifically, initialize the confidence probability distribution of each pixel, let q i (y i )=exp(-E i (y i )). For each pixel i, according to its category label y i The matching degree E between the spectral characteristics i (y i ), initialize the confidence probability distribution q i (y i ). Matching degree E i (y i ) is smaller, indicating that pixel i is classified into category y i The higher the likelihood, the higher the initial confidence probability distribution q i (y i ) is larger.

[0049] By exponential function transformation exp(-E i (y i )), the matching degree E i (y i ) is converted into a positive confidence probability value and normalized to obtain the initial confidence probability distribution q i (y i ). For each pixel i, send message m to its neighboring pixel j ij (y i ), indicating that pixel i believes that pixel j should take label yj Probability score: For each pixel i, transmit the confidence message m to its neighboring pixel j ij (y i ), indicating that pixel i believes that pixel j should be classified as category y j The probability score of the confidence message m ij (y i ) comprehensively considers the confidence probability distribution q of pixel i itself i (y i ), and the class labels y for pixels i and j i and y j The spatial smoothness E between ij (y i ,y j d ij ). Spatial smoothness E ij (y i ,y j d ij ) is smaller, indicating that pixels i and j tend to belong to the same category in space, and the confidence message m ij (y i ) is larger. By summing Σ[*], the pixel i is compared with the different category labels y i The confidence probability distribution q i (y i ) and spatial smoothness E ij (y i ,y j d ij ) to obtain the label y for pixel i and pixel j. j Overall score of m ij (y i ). Update the confidence probability distribution of each pixel i: According to the confidence message m received from the neighboring pixel j ji (y i ), update the confidence probability distribution q of pixel i i (y i ). Updated confidence probability distribution q i (y i ) is proportional to the initial matching degree exp(-E i (y i )), and the confidence messages transmitted by all neighboring pixels j Through product operation Comprehensively consider all neighboring pixels j and take label y for pixel i i The score of pixel i is obtained by updating the confidence probability distribution q i (y i). Repeat until the confidence probability distribution converges or the maximum number of iterations is reached. Iterative execution continuously updates the confidence probability distribution of each pixel until the convergence condition or the maximum number of iterations is reached. The convergence condition can be that the change in the confidence probability distribution is less than a certain threshold, or that the confidence probability distribution remains unchanged for multiple consecutive iterations. The maximum number of iterations is to prevent the algorithm from falling into an infinite loop or overfitting, and is usually set based on the data scale and experience. For each pixel i, the confidence probability distribution q after its convergence is obtained. i (y i ) selects the category label with the largest confidence as the final classification result: After the belief propagation algorithm converges, for each pixel i, the converged belief probability distribution q i (y i ) selects the category label y with the largest confidence i *As the final classification result. The category label y with the highest confidence i * indicates the category that pixel i is most likely to belong to, taking into account the spectral characteristics of the pixel itself and the spatial information of the neighboring pixels. Through the argmax operation, the confidence probability distribution q is found i (y i ) is the category label y with the largest value i *, which is used as the final classification label of pixel i.

[0050] This application introduces the MRF model to perform spatial regularization on the preliminary classification results, which can make full use of the spatial correlation between pixels and improve the smoothness and consistency of the classification. The energy function of the MRF model takes into account the likelihood matching between the pixel category label and the spectral characteristics, as well as the spatial smoothness of the category labels of adjacent pixels, and introduces the spectral distance factor to adjust the intensity of the smoothing penalty. The confidence propagation algorithm transmits the confidence information of the category label between pixels through an iterative message passing mechanism, and updates the confidence probability distribution of each pixel. After multiple rounds of iterations, the confidence probability distribution gradually converges to obtain the final category label for each pixel. The classification result y after MRF regularization comprehensively considers the spectral characteristics and spatial context information of the pixels, effectively eliminating the noise and misclassification in the preliminary classification results, and obtaining a smoother, continuous and accurate distribution map of agricultural pollution facilities materials and pollutants.

[0051] S34, according to the final classification result y, obtain the material type and pollutant type of the agricultural pollution facility. For each pixel i in the final classification result y, according to its category label y i Determine the material type to which it belongs. If the category label y iIf the pixel i belongs to the material category {plastic film, sunshade net, glass, metal}, the pixel i is marked as the corresponding agricultural pollution facility material type. These category labels indicate that the area where the pixel i is located is a rural pollution facility made of the corresponding material, such as plastic greenhouse, sunshade net, glass greenhouse, metal tank, etc. i Belongs to background categories such as {vegetation, soil, water}, pixel i is marked as non-agricultural pollution facility material. These category labels indicate that the area where pixel i is located is a natural environmental element and does not belong to artificially constructed rural facilities. Through the above steps, the material type distribution map of agricultural pollution facilities can be obtained according to the final classification result y, and rural facility areas with different materials can be identified, such as plastic greenhouse areas, sunshade net areas, glass greenhouse areas, metal tank areas, etc., to provide a reference for the planning, management and pollution prevention of agricultural pollution facilities. For each pixel i in the final classification result y, according to its category label y i Determine the type of pollutant it belongs to. If the category label y i If the pixel i belongs to the pollutant category {residual pesticides, fertilizers, agricultural film residues}, the pixel i is marked as the corresponding type of rural non-point source pollutant. These category labels indicate that the area where the pixel i is located has pollutant residues from the rural production process, such as pesticides, fertilizers, agricultural films, etc., which belongs to rural non-point source pollution. If the category label y i If the pixel i belongs to the pollutant category {domestic garbage, livestock and poultry manure, straw burning}, the pixel i is marked as the corresponding type of rural domestic pollutant. These category labels indicate that the area where the pixel i is located contains pollutants generated by rural life and livestock and poultry breeding, such as domestic garbage, livestock and poultry manure, straw burning, etc., which belong to rural domestic pollution. If the category label y i If the pixel i belongs to the background category {normal crops, normal soil, normal water}, then the pixel i is marked as non-pollutant. These category labels indicate that the area where the pixel i is located is a normal rural production area or natural environment element, and there are no obvious pollutants.

[0052] like Figure 4 As shown, S4 filters the laser point cloud data and registers the filtered laser point cloud data using the iterative closest point (ICP) algorithm to obtain a registered 3D point cloud model, including: S41 filters the laser point cloud data acquired in S1 using the entropy-based filtering algorithm EOL-LiDAR to remove noise points and outliers, thereby obtaining filtered laser point cloud data. The EOL-LiDAR algorithm utilizes the entropy characteristics of the laser point cloud to adaptively filter out noise points and outliers by dividing the voxel grid and calculating the entropy values ​​of the points within the voxels. Compared with traditional filtering algorithms, the EOL-LiDAR algorithm can better preserve the detailed features of the laser point cloud while effectively removing noise interference, thereby improving the accuracy and robustness of the filter.

[0053] The laser point cloud data is divided into discrete voxel grids, the entropy value of each voxel is calculated, and the voxels are marked according to the entropy threshold. The voxels with entropy values ​​greater than the threshold are marked as signal voxels, and the voxels with entropy values ​​less than the threshold are marked as noise voxels. The laser point cloud data is divided into a uniform three-dimensional voxel grid, each voxel represents a cubic spatial area, and the size of the voxel is appropriately set according to the point cloud density and noise level. For each voxel Voxel i , calculate the entropy value E(Voxel i ), the entropy value reflects the uncertainty and randomness of the distribution of points within the voxel. The entropy value is calculated as:

[0054] Among them, P i (x j ) is the jth laser point x in the voxel j The probability density of can be estimated by the distribution of laser points in the voxel, such as using the kernel density estimation method. Calculate the entropy threshold E th ,

[0055] E th =μ+3σ, where μ and σ are the mean and standard deviation of the entropy values ​​of all voxels respectively. The entropy threshold Eth represents the judgment boundary for distinguishing signal voxels from noise voxels. i , compare its entropy value E(Voxel i ) and threshold E th The size of E(Voxel i )>E th , then the voxel is marked as a signal voxel, indicating that the points inside the voxel are mainly real ground object echo points; if E(Voxel i )<E th , then the voxel is marked as a noise voxel, indicating that the points inside the voxel are mainly noise points or outliers.

[0056] According to the labeling results of the voxels, the laser points in the noise voxels are removed to obtain the filtered laser point cloud data. Traverse all the voxels, for the voxels marked as noise voxels i , remove all laser points inside it from the point cloud data. Keep the voxel marked as signal voxel iThe laser points within the area are filtered to obtain filtered laser point cloud data, which mainly contains real ground object echo points, and noise points and outliers are effectively filtered out. The filtered laser point cloud data has higher quality and more uniform density distribution of the point cloud, providing a reliable data basis for the subsequent three-dimensional reconstruction of agricultural pollution facilities and spatial positioning of pollutants. By filtering the laser point cloud data through the EOL-LiDAR algorithm, noise points and outliers can be adaptively removed, real ground object echo points can be retained, and the quality and reliability of the point cloud data can be improved. The EOL-LiDAR algorithm utilizes the entropy value characteristics of the laser point cloud, and through voxel grid division and entropy value threshold judgment, it realizes the automatic identification and elimination of noise points, with high filtering accuracy and efficiency.

[0057] S42 uses the Iterative Closest Point (ICP) algorithm to register the laser point cloud data after S41 filtering. This aligns the multi-view laser point cloud data collected from different angles and positions into the same coordinate system, resulting in a registered three-dimensional point cloud model. Laser point cloud registration is the process of unifying point cloud data collected from different perspectives and positions into the same coordinate system. By finding the correspondence between different point clouds and estimating the optimal coordinate transformation parameters, spatial alignment of the point clouds is achieved. The ICP algorithm is a classic point cloud registration algorithm that iteratively searches for the closest point pairs and optimizes the coordinate transformation parameters to gradually align the target point cloud to the reference point cloud, achieving high-precision point cloud registration.

[0058] Select one laser point cloud as the reference point cloud and the other laser point clouds as the target point clouds, and register them with the reference point cloud. From the multi-view laser point cloud data, select one point cloud from each view as the reference point cloud to serve as the basis for registration. The other point clouds from each view are registered with the reference point cloud one by one as the target point clouds, and the coordinate transformation relationship between them is estimated using the ICP algorithm.

[0059] For each target point cloud, registration is performed using the iterative closest point (ICP) algorithm: the reference point cloud is searched for the closest corresponding point to each point in the target point cloud, and a set of point pairs is constructed. For each point in the target point cloud, the point with the closest Euclidean distance in the reference point cloud is found as the corresponding point to form a point pair. Based on the set of point pairs, the optimal rigid body transformation matrix and translation vector are estimated using the least squares method to align the target point cloud to the reference point cloud. By minimizing the sum of the squared distances between the point pairs, the optimal rotation matrix and translation vector are solved to make the target point cloud and the reference point cloud overlap as much as possible. Based on the estimated rigid body transformation matrix and translation vector, the position of the target point cloud is updated, and the coordinates of the target point cloud are transformed into the coordinate system of the reference point cloud. Steps 1) and 2) are repeated, iteratively updating the position of the target point cloud until the registration error converges or the maximum number of iterations is reached. The registration error can be measured by the average distance or root mean square error between the point pairs. When the error change is small or the number of iterations exceeds a threshold, the registration is considered to have converged.

[0060] All registered target point clouds are merged with the reference point cloud to form the final registered 3D point cloud model. All registered target point clouds are merged with the reference point cloud to form a complete 3D point cloud model. This merged point cloud model contains all point cloud data collected from different viewpoints. The different point clouds are spatially aligned and in the same coordinate system. The registered 3D point cloud model has higher point cloud density and coverage completeness, better representing the 3D structure and spatial details of agricultural pollution facilities, providing rich geometric information for subsequent pollutant location and facility reconstruction.

[0061] By using the iterative closest point (ICP) algorithm to register multi-view laser point cloud data, point cloud data collected from different angles and positions can be unified into a single coordinate system, resulting in a complete and consistent 3D point cloud model. The ICP algorithm achieves high-precision point cloud registration by iteratively finding the closest point pair and optimizing coordinate transformation parameters, effectively overcoming positional deviations and coordinate system differences between point clouds from different viewpoints. The registered 3D point cloud model provides the data foundation for 3D reconstruction of agricultural wastewater facilities and spatial localization of pollutants.

[0062] like Figure 5As shown, S5 fuses the agricultural pollution facility material and pollutant type obtained by S3 with the three-dimensional point cloud model after registration by S4 through a multi-data fusion strategy to obtain a three-dimensional spectral model of the agricultural pollution facility. S51 spatially matches the final classification result y of the agricultural pollution facility material type and pollutant type obtained by S3 using the kernel function-based support vector machine SVM and Markov random field MRF optimization with the three-dimensional point cloud model obtained by S4 after registration using the iterative closest point ICP algorithm to achieve the association of spectral information and spatial information. The purpose of spatial matching is to geometrically associate the classification result of the hyperspectral image with the three-dimensional point cloud model to achieve the fusion of spectral information and spatial information. By converting and corresponding the pixel coordinates of the hyperspectral image with the point coordinates of the three-dimensional point cloud model, each three-dimensional point can be associated with its corresponding material type and pollutant type label.

[0063] The laser point cloud registration parameters obtained by the iterative closest point ICP algorithm in S4, including the rotation matrix R and the translation vector t, are used to construct the coordinate transformation relationship between the hyperspectral image and the 3D point cloud model: P lidar =R×P hs +t; The rotation matrix R and translation vector t obtained by the ICP algorithm describe the rigid body transformation relationship between the hyperspectral image coordinate system and the three-dimensional point cloud model coordinate system. Using the rotation matrix R and translation vector t, the hyperspectral image pixel coordinate P hs Converted to the corresponding three-dimensional point cloud coordinates P lidar .

[0064] For each point P in the 3D point cloud model lidar , according to the coordinate transformation relationship, calculate the projection pixel position P on the hyperspectral image plane hs :P hs =R -1 ×(P lidar -t); for each point P in the 3D point cloud model lidar , calculate the projection pixel position P on the hyperspectral image plane through the inverse transformation of the coordinate transformation relationship hs By putting the three-dimensional point P lidar Subtract the translation vector t and multiply by the inverse of the rotation matrix R -1 , the three-dimensional point cloud coordinates can be converted back to the pixel position P in the hyperspectral image coordinate system hs .

[0065] According to the projection pixel position P hs The row and column numbers of the corresponding pixels are extracted from the final classification result y of S3. m and pollutant type label y p According to the projection pixel position P hsFind the corresponding pixel in the final classification result y of the hyperspectral image. Extract the material type label y of the pixel m and pollutant type label y p , as a three-dimensional point P lidar The attribute information of the material type label y m and pollutant type label y p , and the three-dimensional point P lidar Associate and build point-attribute information pairs (P lidar ,y m ,y p ). Set the material type label y m and pollutant type label y p and the corresponding 3D point P lidar Associated to form point-attribute information pairs (P lidar ,y m ,y p ). The point-attribute information pair represents the spatial coordinate information of each 3D point and its corresponding material type and pollutant type attribute information.

[0066] Traverse all points of the 3D point cloud model, repeatedly complete the spatial matching between the hyperspectral image classification results and the 3D point cloud model, and realize the point-level association of spectral information and spatial information. lidar , repeatedly associating each point with its corresponding material type and pollutant type label. After traversing all points, the hyperspectral image classification results are spatially matched with the 3D point cloud model, with each 3D point associated with its corresponding spectral attribute information. This spatial matching enables point-level association of spectral and spatial information, integrating the 2D material and pollutant type distributions with the 3D point cloud geometry.

[0067] By spatially matching the hyperspectral image classification results with the 3D point cloud model, the spectral and spatial information are linked and integrated. Using the point cloud registration parameters derived from the ICP algorithm, a transformation relationship is established between the hyperspectral image coordinate system and the 3D point cloud coordinate system, associating each 3D point with its corresponding material type and pollutant type label. The resulting point-attribute information pairs contain rich spectral features and precise spatial location information.

[0068] S52: Based on the spatial matching results of S51, each point in the 3D point cloud model, registered in S4, is fused with the material type and pollutant type of the corresponding pixel in the S3 classification results to construct a point-attribute information table for the 3D points of the agricultural pollution facilities. Using the spatial matching results of S51, each point in the 3D point cloud model is associated with the material type and pollutant type of the corresponding pixel in the hyperspectral image classification results. A point-attribute information table for the 3D points of the agricultural pollution facilities is constructed, with each 3D point containing its spatial coordinate information, material type attributes, and pollutant type attributes. The point-attribute information table fuses the geometric information of the 3D point cloud with the spectral attribute information of the hyperspectral image to form 3D spectral point cloud data for the agricultural pollution facilities.

[0069] S53: Using the Thiessen polygon interpolation algorithm, the material and pollutant properties of the discrete 3D points in the point-attribute information table constructed in S52 are interpolated into the continuous 3D space of the agricultural wastewater facility, achieving a spatially continuous representation of material and pollutant information. The Thiessen polygon interpolation algorithm is a spatial interpolation method that achieves a spatially continuous representation of attribute information by interpolating the attribute values ​​of discrete points into a continuous space. Using the Thiessen polygon interpolation algorithm, the material and pollutant properties of the discrete 3D points in the point-attribute information table are interpolated into the entire 3D space of the agricultural wastewater facility, generating a continuous distribution of material and pollutant properties.

[0070] Each point in the 3D point cloud model after S4 registration is used as a generating point for a Thiessen polygon, and the Thiessen polygon area of ​​each 3D point is calculated. Each point in the 3D point cloud model is used as a generating point, and its Thiessen polygon area is calculated. A Thiessen polygon is a polygonal area formed by the points closest to the generating point. The points within the Thiessen polygon area of ​​each generating point are closest to that generating point. For each spatial location within the Thiessen polygon area, the material and contaminant properties of that location are calculated using the inverse distance weighted interpolation formula based on its distance to the 3D point. For each spatial location within the Thiessen polygon area, its distance to the generating point is calculated. Using the inverse distance weighted interpolation formula, the material and contaminant properties of that location are calculated based on the distance from the spatial location to the generating point. The inverse distance weighted interpolation formula takes into account the distance from the spatial location to the generating point. Closer generating points have a greater impact on the interpolation result, while farther generating points have a smaller impact.

[0071] Material and pollutant properties are interpolated for all Thiessen polygon regions covered by the 3D point cloud model, resulting in a continuous material and pollutant property distribution covering the entire 3D space of the agricultural wastewater facility. All Thiessen polygon regions covered by the 3D point cloud model are traversed, and material and pollutant properties are interpolated for each spatial location within the region. The interpolation results for all Thiessen polygon regions are combined to obtain a continuous material and pollutant property distribution covering the entire 3D space of the agricultural wastewater facility. This continuous material and pollutant property distribution represents the continuous changes in the material composition and pollution status of the agricultural wastewater facility throughout the entire 3D space.

[0072] S54: Geometrically and semantically register the 3D point cloud model of the agricultural pollution facility, registered in S4, with the material and pollutant attribute distributions covering the 3D space of the agricultural pollution facility obtained through interpolation in S53. This creates a 3D spectral model of the agricultural pollution facility, enabling high-precision representation and precise management of the 3D spatial structure, material composition, and pollution status of the agricultural pollution facility. The 3D point cloud model is geometrically registered with the interpolated material and pollutant attribute distributions to ensure precise spatial alignment. Semantic registration is then performed to associate the material and pollutant attributes with corresponding locations in the 3D point cloud model, forming a complete 3D spectral model of the agricultural pollution facility. The 3D spectral model of the agricultural pollution facility integrates multi-dimensional information, including 3D spatial structure, material composition, and pollution status, enabling high-precision representation and precise management of the agricultural pollution facility. The 3D spectral model of the agricultural pollution facility allows intuitive analysis of the spatial structural characteristics, material distribution patterns, and pollutant distribution of agricultural pollution facilities, providing refined decision-making support for rural environmental monitoring, pollution control, and facility management.

[0073] The material and pollutant properties of discrete 3D points were interpolated into a continuous 3D space using the Thiessen polygon interpolation algorithm, achieving a spatially continuous representation of material and pollutant information. The interpolated continuous attribute distribution was geometrically and semantically aligned with the 3D point cloud model to construct a 3D spectral model of the agricultural wastewater facility, comprehensively representing the facility's 3D spatial structure, material composition, and pollution status.

[0074] S6. Manage agricultural wastewater treatment facilities based on the three-dimensional spectral model. Specifically, analyze the spatial distribution of agricultural wastewater treatment facilities based on the three-dimensional spectral model to optimize their layout planning. Spatial coordinate information from the three-dimensional spectral model can be used to analyze the distribution density, clustered areas, and discrete regions of agricultural wastewater treatment facilities. Spatial patterns of agricultural wastewater treatment facility distribution, such as linear, circular, and random, can be identified. Based on the spatial distribution characteristics of agricultural wastewater treatment facilities, their layout planning can be optimized, such as by adjusting their location, spacing, and arrangement to improve their coverage efficiency and manageability. Material attribute information from the three-dimensional spectral model can be used to calculate the number and distribution of different material types within agricultural wastewater treatment facilities. The aging degree, damage risk, and pollutant adsorption capacity of different material types can be analyzed to identify key material types. Differentiated facility management strategies can be developed for different material types, such as prioritizing inspection and maintenance of materials prone to aging and damage, and cleaning and replacement of materials with high pollutant adsorption capacity. Pollutant attribute information from the three-dimensional spectral model can be used to analyze the type, concentration, and distribution of different pollutants within agricultural wastewater treatment facilities. Based on the spatial distribution of pollutants, high-risk areas and pollution levels are identified, and key areas for pollution control are determined. Targeted pollution control measures, such as physical removal, chemical neutralization, and biodegradation, are developed for different types and concentrations of pollutants to achieve precise pollution control.

Claims

1. A method for agricultural pollution inspection and management based on big data analysis, characterized in that: include: S1, collects hyperspectral image data and laser point cloud data of agricultural pollution facilities; S2, using an improved minimum noise factorization transform (MNF) algorithm to denoise the hyperspectral image data to obtain a spectral feature band Z; the improved minimum noise factorization transform (MNF) algorithm optimizes the noise covariance matrix by introducing an estimation of the correlation between noise bands, and optimizes the MNF transformation process by utilizing the spatial information of the hyperspectral image data; S3, using a kernel function-based support vector machine (SVM) to classify the spectral feature band Z to obtain the material and pollutant type of the agricultural pollution facility; the kernel function-based support vector machine (SVM) optimizes the SVM classification result by setting a spatial regularization strategy based on a Markov random field (MRF) in the SVM classification; S4, filtering the laser point cloud data, and registering the filtered laser point cloud data using an iterative closest point ICP algorithm to obtain a registered three-dimensional point cloud model; S5, the material and pollutant type of the agricultural pollution facility are fused with the registered 3D point cloud model through a multi-data fusion strategy to obtain a 3D spectral model of the agricultural pollution facility; S6, conduct agricultural pollution inspection and management based on the three-dimensional spectral model of agricultural pollution facilities.

2. The agricultural pollution inspection and management method based on big data analysis according to claim 1 is characterized by: S2, using the improved minimum noise separation transform MNF algorithm to denoise the hyperspectral image data and obtain the spectral feature band Z, including: S21, perform MNF transformation on the hyperspectral image data X to obtain the noise covariance matrix Σ, eigenvalue matrix Λ and eigenvector matrix V, where X = VΛV T ; S22, estimating the inter-band correlation of noise in the hyperspectral image data X, and constructing the noise band correlation matrix R; S23, using the noise band correlation matrix R, correcting the noise covariance matrix Σ in the MNF transformation to obtain a corrected noise covariance matrix Σ'; S24, using the SLIC method based on graph theory to perform superpixel segmentation on the hyperspectral image data X, dividing the image into N superpixel regions with similar spectra and adjacent spaces; S25, extracting the spatial position information of each superpixel region and constructing a spatial weight matrix W of the superpixel region; S26, using the spatial weight matrix W of the superpixel region to perform spatial regularization on the eigenvector matrix V to obtain a spatially regularized eigenvector matrix V'; S27, using the corrected noise covariance matrix Σ' and the spatially regularized eigenvector matrix V', perform MNF transformation on the hyperspectral image data X to obtain the spectral feature band Z after dimension reduction and denoising.

3. The agricultural pollution inspection and management method based on big data analysis according to claim 2 is characterized by: S3, using the kernel function-based support vector machine (SVM) to classify the spectral feature band Z, and obtain the material and pollutant type of the agricultural pollution facility, including: S31, dividing the spectral feature band Z into a training sample set and a test sample set, and using the training sample set to train the SVM classifier; S32, extracting the spectral feature vector of each pixel in the test sample set, and classifying it using the trained SVM classifier to obtain the preliminary classification result y0; S33, using Markov random field MRF to perform spatial regularization on the preliminary classification result y0 to obtain the final classification result y; S34, obtaining the material type and pollutant type of the agricultural pollution facility according to the final classification result y.

4. The agricultural pollution inspection and management method based on big data analysis according to claim 3 is characterized by: S33, use Markov random field MRF to perform spatial regularization on the preliminary classification result y0 to obtain the final classification result y, including: Based on the preliminary classification result y0 and the spectral feature band Z, the energy function E(y) of the Markov random field MRF is constructed; The belief propagation algorithm is used to solve the energy function E(y) and obtain the optimal pixel category label as the final classification result y.

5. The agricultural pollution inspection and management method based on big data analysis according to claim 4 is characterized by: The energy function E(y) is expressed as follows: Among them, y represents the vector composed of the category labels of all pixels in the MRF model; E i (y i ) represents the category label y of pixel i i The matching degree between its spectral characteristics; E ij (y i ,y j ,d ij ) represents the category label y of pixel i and j i and y j The spatial smoothness between ij is the spectral distance between pixels i and j in the spectral characteristic band Z; N i represents the neighborhood of pixel i; β represents the balanced likelihood term E i and the smoothing term E ij The weight coefficient between .

6. The agricultural pollution inspection and management method based on big data analysis according to claim 2 is characterized by: S4, obtain the registered 3D point cloud model, including: S41, divide the laser point cloud data into discrete voxel grids, and calculate the entropy value E (Voxel i ), according to the entropy threshold E th Mark the voxels and set the entropy value E(Voxel i ) is greater than the entropy threshold E th The voxels with are marked as signal voxels, otherwise they are marked as noise voxels; S42, according to the voxel labeling result, removing the noise voxels in the laser point cloud data to obtain filtered laser point cloud data; S43, using an iterative closest point ICP algorithm to register the filtered laser point cloud data to obtain a registered three-dimensional point cloud model.

7. The agricultural pollution inspection and management method based on big data analysis according to claim 6 is characterized by: Calculate the entropy value E(Voxel i ) is: Among them, Voxel i is the i-th voxel, P i (x j ) is the jth laser point x in the voxel j The probability density of .

8. The agricultural pollution inspection and management method based on big data analysis according to claim 7 is characterized by: Calculate the entropy threshold E th The formula is: E th =μ+3σ Where μ and σ are the mean and standard deviation of the entropy values ​​of all voxels, respectively.

9. The agricultural pollution inspection and management method based on big data analysis according to claim 8 is characterized by: S5, obtain a three-dimensional spectral model of agricultural wastewater facilities, including: S51, spatially matching the material and pollutant type of the agricultural pollution facility with the registered 3D point cloud model; S52, based on the spatial matching results, each point in the three-dimensional point cloud model is associated with the material and pollutant type of the corresponding pixel to construct a point-attribute information table of the agricultural pollution facility; S53, using a Thiessen polygon interpolation algorithm, interpolating the material and pollutant attributes of the discrete three-dimensional points in the point-attribute information table into the three-dimensional space of the agricultural pollution facility; S54, geometrically aligning and semantically aligning the aligned three-dimensional point cloud model and the interpolated three-dimensional space of the agricultural pollution facility to construct a three-dimensional spectral model of the agricultural pollution facility.

10. An agricultural pollution inspection and management system based on big data analysis, characterized in that: include: At least one processing unit; used to execute instructions to implement the agricultural pollution inspection and management method based on big data analysis as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method for classifying hyperspectral images based on vector probabilistic diffusion and Markov random field

    CN107145831A

  • Hyperspectral image classification method based on de-noising combination dimension reduction and guided filtering

    CN110298414A