Agricultural pollution inspection management method and system based on big data analysis
Through the improved MNF algorithm and spectrum-space integrated classification model, the problem of incomplete acquisition of pollution information in traditional rural pollution inspections is solved, and the noise reduction and feature extraction of hyperspectral data are realized, and the refined identification of agricultural pollution facilities and the analysis of pollution spatiotemporal characteristics are realized, providing a scientific basis for rural environmental management.
Patent Information
- Application Number
- CN202510178603.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-02-18
AI Technical Summary
Traditional rural pollution inspection methods have the problem of incomplete acquisition of pollution information, and there are problems of noise suppression and insufficient feature extraction when processing hyperspectral remote sensing data, making it difficult to achieve accurate classification and pollution identification.
The improved minimal noise separation transform MNF algorithm is used to denoise the hyperspectral image, and a spectrum-space integrated classification model is constructed in combination with the support vector machine SVM based on kernel function and Markov random field MRF to fully explore the spatial distribution characteristics and pollution distribution rules of the facilities.
Through the improved MNF algorithm and spectrum-space integrated classification model, the characteristics of high-spectral data are effectively denoised and extracted, and refined identification of agricultural pollution facilities, three-dimensional modeling and pollution spatiotemporal and spatial characteristics analysis are realized, providing a scientific basis for rural environmental management decisions.
Smart Images

Figure CN120107793A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to an agricultural pollution inspection 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 has increasingly become an important factor threatening rural sustainable development and food safety. Rural production activities such as farmland sewage irrigation, excessive use of fertilizers and pesticides, and livestock and poultry manure and garbage dumping have led to serious pollution of rural environments such as soil and water. Timely and accurate monitoring of the spatial distribution of rural pollution facilities, pollutant types and pollution levels is the key to achieving scientific management of rural non-point source pollution.
[0003] Traditionally, rural domestic sewage is mainly collected through manual on-site investigation and laboratory sampling and analysis, which has problems such as large workload, low efficiency, and incomplete pollution information. In recent years, hyperspectral remote sensing technology has been widely used in the field of rural environmental monitoring due to its advantages such as high spectral resolution and continuous band. Hyperspectral data can provide rich spectral information of agricultural pollution facilities, providing a new technical means for pollutant identification and pollution degree assessment.
[0004] However, due to factors such as imaging mechanism and signal transmission, hyperspectral remote sensing data often have problems such as high spectral dimension, much redundant information, and large noise interference, which brings challenges to the extraction of pollution information of agricultural pollution facilities. Minimum Noise Fractionation Transform (MNF) is a commonly used hyperspectral data dimensionality reduction method, but it still has deficiencies in noise suppression and feature extraction when processing agricultural pollution hyperspectral data. In addition, agricultural pollution facility objects often have the characteristics of high spectral similarity and strong spatial heterogeneity. It is difficult to achieve accurate classification and pollution identification using spectral information alone, and spatial constraint information needs to be introduced.
[0005] In addition, monitoring of rural domestic sewage facilities requires not only obtaining spatial distribution information of pollutants, but also analyzing their diffusion pathways and assessing the degree of pollution. Traditional pollution analysis methods mainly rely on single-point sampling data of pollutant concentrations, which makes it difficult to fully characterize the spatiotemporal distribution of rural non-point source pollution. Therefore, there is an urgent need for a new agricultural pollution inspection management method that can fully tap the spatial and spectral information contained in hyperspectral remote sensing big data, realize the refined identification of agricultural pollution facilities, three-dimensional modeling, and pollution spatiotemporal characteristics analysis, and provide 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 prior art, the present application provides an agricultural pollution inspection management method based on big data analysis, which realizes denoising and enhancement of hyperspectral images through an improved minimum noise factorization transform (MNF) algorithm, and combines the kernel-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 management method based on big data analysis, including: 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 using the spatial information of the hyperspectral image data; S3, using a kernel-based support vector machine SVM to denoise the spectral feature bands Z is used for classification to obtain the material and pollutant type of the agricultural pollution facility; the support vector machine SVM based on the kernel function optimizes the SVM classification result by setting a spatial regularization strategy based on the 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 performed 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 i-th row and j-th column element w of W is ij The value of is 1 when the ith superpixel region is adjacent to the jth 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 Laplacian matrix of the superpixel region, D is the degree matrix of W, α is the regularization parameter, and the Laplacian matrix L is used to enhance the spatial smoothness of the eigenvector; S27, using the corrected noise covariance matrix Σ' and the eigenvector matrix V' after spatial regularization, the hyperspectral image data X is subjected to MNF transformation to obtain the spectral feature band Z after dimension reduction and denoising, where
[0010] Further, 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 uses 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, 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 y 0 ; S33, using Markov random field MRF to classify the preliminary results y 0 Perform spatial regularization to obtain a final classification result y; S34, obtain the material type and pollutant type of the agricultural pollution facility according to the final classification result y.
[0011] Furthermore, in S33, the Markov random field MRF is used to classify the preliminary classification results y 0 Perform spatial regularization 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 matching degree 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 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 far spectral distance even if they are of 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, send 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 reaches the maximum number of iterations; for each pixel i, from its converged confidence probability distribution q 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: Where y represents the vector composed of the category labels of all pixels in the MRF model; y = {y 1 ,y 2 ,......,yn}; E i (y i ) identifies the category label y of pixel i i The matching degree 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 label y of pixels i and j i and j The spatial smoothness between 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 , otherwise 1; d ij is the Euclidean distance between pixels i and j in the spectral characteristic band Z, in E ij Introducing the spectral distance factor σ is a 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 intensity 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 and selected through 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 Label the voxels and set the entropy value E(Voxel i ) is greater than the entropy threshold E thThe voxels 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 registered using the iterative closest point ICP algorithm to obtain a registered three-dimensional point cloud model.
[0017] Further, 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] Further, 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.
[0020] Further, 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 S3 using the support vector machine SVM based on the kernel function and the Markov random field MRF optimization is spatially matched 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; 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 pixels are extracted from the final classification result y of S3. m and pollutant type label yp ; Label the extracted material type y m and pollutant type label y p , and the three-dimensional point P lidar Associate and construct point-attribute information pairs (P lidar ,y m ,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 result of S51, each point in the three-dimensional point cloud model registered by S4 is merged 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 three-dimensional points of the agricultural pollution facility;
[0022] S53, using the Thiessen polygon interpolation algorithm, interpolate the material attributes and pollutant attributes of the discrete three-dimensional points in the point-attribute information table constructed in S52 to the continuous three-dimensional space of the agricultural sewage facility, so as to realize the spatial continuous expression of the material and pollutant information; take each point in the three-dimensional point cloud model registered in S4 as the generating point of the Thiessen polygon, and calculate the Thiessen polygon area of each three-dimensional point; for the spatial position within each Thiessen polygon area, calculate the material attributes and pollutant attributes of the position according to its distance to the three-dimensional point using the inverse distance weighted interpolation formula; perform material and pollutant attribute interpolation on all Thiessen polygon areas covered by the three-dimensional point cloud model, and obtain the continuous material attribute distribution and pollutant attribute distribution covering the complete three-dimensional space of the agricultural sewage facility;
[0023] S54, geometrically and semantically aligns the three-dimensional point cloud model of the agricultural sewage facility registered by S4 with the material attribute distribution and pollutant attribute distribution covering the three-dimensional space of the agricultural sewage facility obtained by interpolation of S53, constructs a three-dimensional spectral model of the agricultural sewage facility, and realizes high-precision expression and precise management of the three-dimensional spatial structure, material composition and pollution status of the agricultural sewage facility.
[0024] Another aspect of the present application provides an agricultural pollution inspection management system based on big data analysis, which is used to execute an agricultural pollution inspection management method based on big data analysis of the present application.
[0025] Compared with the prior art, the advantages of this application are:
[0026] When the traditional minimum noise separation 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 of hyperspectral data often has a certain correlation between bands, which leads to the limited effect of MNF dimensionality reduction, and the extracted feature bands may contain more noise information; this application introduces the estimation of the correlation between noise bands, constructs the band correlation matrix of noise, and corrects the noise covariance matrix in the MNF transformation, 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 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 separation 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 disturbed by outlier pixels, reducing the robustness of feature extraction; this application uses a graph segmentation method to perform superpixel segmentation on hyperspectral images, extract the spatial position information of each superpixel area, construct a spatial weight matrix of the superpixel area, and use it to spatially regularize the feature vectors of the MNF transformation. 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 between the two pixel category labels, but ignores their distance in the spectral feature space. When the 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 a greater spatial smoothing penalty is given when the spectral feature distance between pixels i and j is larger. This adaptive spatial smoothing strategy can effectively avoid the 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, the computational complexity of traditional graph cut algorithms such as maximum flow / minimum cut algorithms is high, and it is difficult to meet the real-time requirements of agricultural pollution inspection. The confidence propagation algorithm adopted by the present invention obtains a better energy minimization result with lower computational complexity by iteratively updating the confidence probability distribution of pixel category labels. This efficient optimization strategy meets the requirements of agricultural pollution inspection for real-time classification, 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 by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0029] Figure 1 is an exemplary flow chart of an agricultural pollution inspection management method based on big data analysis according to some embodiments of the present application;
[0030] Figure 2 is an exemplary flow chart of obtaining the spectral feature band Z after dimensionality reduction and denoising according to some embodiments of the present application;
[0031] Figure 3 is an exemplary flow chart for obtaining material types and pollutant types 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, the hyperspectral image data and laser point cloud data of agricultural pollution facilities are collected; 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; the spectral feature band Z is classified by using the support vector machine SVM based on the kernel function to obtain the material and pollutant type of the agricultural pollution facility; the support vector machine SVM based on the kernel function optimizes the SVM classification result by setting the spatial regularization strategy based on the Markov random field MRF in the SVM classification; the laser point cloud data is filtered, and the iterative closest point ICP algorithm is used to register the filtered laser point cloud data to obtain the registered three-dimensional point cloud model; 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 the three-dimensional spectral model of the agricultural pollution facility. The agricultural pollution inspection management is carried out according to the three-dimensional spectral model of the agricultural pollution facility.
[0036] S1, collect hyperspectral image data and laser point cloud data of agricultural pollution facilities. Use hyperspectral imager to obtain hyperspectral images of agricultural pollution facilities, and use laser radar scanning to obtain three-dimensional point cloud data of agricultural pollution facilities, so as to realize 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, the standard MNF transformation is performed on the hyperspectral image data to obtain the noise statistical information and the 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 the 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: 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 a noise variance vector σ 2 , where σ 2 The ith element of represents the noise variance of the ith band. 2 Taking the logarithm of the elements in, we 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 and lnα is obtained, and the fitting parameters lnα and β are calculated, and γ=exp(lnσ 2 Substitute the fitted parameters α, β, and γ into the function f(b) = αb β +γ, we get the nonlinear function relationship f between the noise variance and the 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|) means that the difference between the band numbers is |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 the matrix R to form the noise band correlation matrix R. R is a symmetric matrix with all elements on the diagonal being 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. The matrix R quantifies the degree of correlation between noises in different bands.
[0039] S23, using the noise band correlation matrix R to correct the noise covariance matrix Σ in the MNF algorithm, and obtain the corrected noise covariance matrix Σ'. Let Σ'=Σ+λ×R, where λ is a balance factor used to control the influence of the matrix R. λ can be determined based on experience or cross-validation. When λ=0, Σ'=Σ, indicating that the inter-band correlation of the noise is not considered, and it degenerates into the standard MNF transformation; when λ is large, Σ'≈λR, indicating that the inter-band correlation of the noise is mainly considered. The appropriate λ can balance the independence and correlation assumptions of the noise. By introducing the noise band correlation matrix R to correct the noise covariance matrix Σ, the statistical characteristics of the noise in the hyperspectral data can be more accurately described, the information loss during the MNF transformation can be reduced, and the effect of feature extraction can be improved. The corrected noise covariance matrix Σ' will replace the original noise covariance matrix Σ in the subsequent MNF transformation to achieve denoising enhancement of the hyperspectral data.
[0040] S24, the SLIC (Simple Linear Iterative Clustering) method based on graph theory is used to perform superpixel segmentation on the hyperspectral image data X, and the image is divided 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 the 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 by Euclidean distance or angle cosine. The SLIC algorithm is used to cluster the graph G to obtain N superpixel regions. The SLIC algorithm achieves superpixel segmentation of 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 region, 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 region and the j-th superpixel region are adjacent, w ij =1; otherwise, w ij = 0. The spatial weight matrix W introduces the spatial adjacency constraints between superpixel regions, reflecting 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'. According to the spatial weight matrix W, the Laplacian matrix L = DW of the superpixel region is calculated, where D is the degree matrix of W, and the diagonal elements d ii is equal to the sum of the elements in the ith row of W. The eigenvector matrix V is spatially regularized using the Laplace matrix L, and 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 Laplace matrix L, and the spatial adjacency relationship of the superpixel region is used to optimize the feature vector to enhance 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, the hyperspectral image data X is subjected to MNF transformation to obtain the spectral characteristic band Z after dimension reduction and denoising. Using the corrected noise covariance matrix Σ' and the eigenvector matrix V' after spatial regularization, the hyperspectral image data X is subjected to MNF transformation to obtain the transformed characteristic band The modified noise covariance matrix Σ' takes into account the inter-band correlation of the noise, and the spatial regularized eigenvector matrix V' introduces spatial adjacency constraints, so the MNF transformation can better remove noise and maintain spectral features. The transformed spectral feature band Z achieves dimensionality reduction and denoising, while retaining the key spectral information and spatial structure information of the hyperspectral data, providing high-quality data representation for subsequent feature analysis and classification.
[0044] S3, using 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 characteristic band Z is divided into a training sample set and a test sample set, and the support vector machine (SVM) classifier is trained using the training sample set to achieve classification and identification of agricultural pollution facility materials and pollutants. A part of the pixels in the spectral characteristic band Z are 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 characteristic band Z is extracted. i The eigenvector x i Represents the characteristic values of sample i in different spectral bands, such as reflectance or absorption. Determine the material category or pollutant category label y corresponding to each training sample i 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 class 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 the sample to a high-dimensional space to achieve nonlinear classification. The kernel function parameter g and the penalty factor C of the SVM classifier are optimized using methods such as grid search and cross-validation. The 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 and balances the complexity and classification accuracy of the model. 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 use the trained SVM classifier to classify it to obtain the preliminary classification result y 0 ; Select pixels one by one from the test sample set, and extract the feature vector x of each pixel in the spectral feature band Z. The feature vector x represents the characteristic values of the pixel such as reflectance or absorbance in different spectral bands. Input the extracted feature vector x into the trained SVM classifier, and use the discriminant function f(x) of SVM to classify the feature vector x. The discriminant function f(x) of SVM calculates the kernel function value between x and the support vector, and combines the parameters of the classification hyperplane to obtain the score or probability that x belongs to different categories. According to the discrimination result of SVM, the feature vector x is divided into the corresponding material category or pollutant category to obtain the preliminary classification label y of the pixel. 0 . Preliminary classification label y 0 Represents the prediction result of the SVM classifier on the material or pollutant type of the pixel. Repeat the classification of each pixel in the test sample set to obtain the preliminary classification result y of the entire test area 0 . Preliminary classification result y 0 is a label vector with the same number of pixels as the test sample set, recording the predicted category of each pixel. Since the SVM classifier is based on pixel-level features, the preliminary classification result y 0 There may be some noise and misclassification, especially in the material or pollutant boundary area. Therefore, it is necessary to combine spatial information and prior knowledge to optimize and refine the preliminary classification results in order to improve the accuracy and reliability of the classification.
[0047] S33: Use Markov random field (MRF) to classify the preliminary results y 0 Perform spatial regularization to obtain the final classification result y. Based on the preliminary classification result y 0 And the spectral feature band Z, construct the energy function of the MRF model: Among them, E i (y i ) is the category label y of pixel i i The matching degree between its spectral characteristics indicates that pixel i is classified into category y i The likelihood of is the category label y of pixel i and j i and 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 far spectral distance even if they are of 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 according to its own spectral characteristics and the confidence messages transmitted by neighboring pixels, and finally reaches 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 features 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 ) value 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 qi (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 y j Probability score: For each pixel i, a confidence message m is transmitted to its neighboring pixel j ij (y i ), indicating that pixel i believes that pixel j should be classified into category y j The probability score of the message m. ij (y i ) comprehensively considers the confidence probability distribution q of pixel i itself i (y i ), and the class labels y of pixels i and j i and j The spatial smoothness E 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 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 to 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 transmitted by the received neighboring pixel j ji (y i ), update the confidence probability distribution q of pixel i i (y i ). The updated confidence probability distribution q i (y i ) is proportional to the initial matching degree of pixel i exp(-E i (y i )), and the confidence message m transmitted by all neighboring pixels j ji (y i) Through the product operation Considering all neighboring pixels j comprehensively, we can 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. The 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 of multiple consecutive iterations remains unchanged. 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, from its converged confidence probability distribution q 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 *, and use it 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 pixel, effectively eliminates the noise and misclassification in the preliminary classification results, and obtains 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 yi Determine the material type to which it belongs. If the category label y i If 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 a plastic greenhouse, sunshade net, glass greenhouse, metal tank, etc. i If it belongs to the background category such as {vegetation, soil, water body}, the pixel i is marked as non-agricultural sewage facility material. These category labels indicate that the area where the 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 sewage 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, shade net areas, glass greenhouse areas, metal tank areas, etc., to provide a reference for the planning, management and pollution prevention of agricultural sewage 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}, then the pixel i is marked as a rural non-point source pollutant of the corresponding type. 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 excrement, straw burning}, then 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 excrement, straw burning, etc., which belong to rural domestic pollution. If the category label y i If the pixel i belongs to the background category of {normal crops, normal soil, normal water}, 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, filtering the laser point cloud data, using the iterative closest point ICP algorithm to register the filtered laser point cloud data, and obtaining the registered three-dimensional point cloud model, including: S41, using the entropy-based filtering algorithm EOL-LiDAR to filter the laser point cloud data obtained by S1, remove noise points and outliers, and obtain filtered laser point cloud data. The EOL-LiDAR algorithm uses the entropy value characteristics of the laser point cloud to achieve adaptive filtering of 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 retain the detailed features of the laser point cloud, while effectively removing noise interference and improving the accuracy and robustness of filtering.
[0053] Divide the laser point cloud data into a discrete voxel grid, calculate the entropy value of each voxel, and mark the voxels according to the entropy threshold. Voxels with entropy values greater than the threshold are marked as signal voxels, and voxels with entropy values less than the threshold are marked as noise voxels. Divide the laser point cloud data 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 calculation formula for the entropy value is:
[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 If 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 Voxel marked as the noise voxel i , remove all laser points inside it from the point cloud data. Keep the voxels marked as signal voxels iThe laser points within the area are filtered to obtain the filtered laser point cloud data, which mainly contains real ground 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 with the EOL-LiDAR algorithm, noise points and outliers can be adaptively removed, real ground 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 characteristics of the laser point cloud, and realizes the automatic identification and elimination of noise points through voxel grid division and entropy threshold judgment, 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, and registers the multi-view laser point cloud data collected at different angles and positions to the same coordinate system to obtain the 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, the spatial alignment of the point clouds is achieved. The ICP algorithm is a classic point cloud registration algorithm. By iteratively finding the nearest point pair and optimizing the coordinate transformation parameters, the target point cloud is gradually registered to the reference point cloud to achieve high-precision point cloud registration.
[0058] Select one laser point cloud data as the reference point cloud and other laser point cloud data as the target point cloud, and align them with the reference point cloud respectively. In the multi-view laser point cloud data, select one point cloud data of one view as the reference point cloud as the basis for the registration. The laser point cloud data of other views are used as the target point cloud, and are registered with the reference point cloud one by one, and the coordinate transformation relationship between them is estimated by the ICP algorithm.
[0059] For each target point cloud, the registration is performed by iterative closest point ICP algorithm: search for the corresponding point closest to each point in the target point cloud in the reference point cloud and construct a point pair set. For each point in the target point cloud, find the point with the closest Euclidean distance in the reference point cloud as the corresponding point to form a point pair. According to the point pair set, the least squares method is used to estimate the optimal rigid body transformation matrix and translation vector, and the target point cloud is registered to the reference point cloud. By minimizing the sum of squared distances between point pairs, the optimal rotation matrix and translation vector are solved to make the target point cloud coincide with the reference point cloud as much as possible. According to 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 converted to the coordinate system of the reference point cloud. Repeat steps 1) and 2) to iteratively update 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 point pairs. When the error change is small or the number of iterations exceeds the threshold, the registration is considered to have converged.
[0060] Merge all registered target point clouds with the reference point clouds to obtain the final registered 3D point cloud model. Merge all registered target point clouds with the reference point clouds to form a complete 3D point cloud model. The merged point cloud model contains all point cloud data collected from different perspectives. Different point clouds have been spatially aligned and are in the same coordinate system. The registered 3D point cloud model has higher point cloud density and coverage completeness, which can better represent the 3D structure and spatial details of agricultural pollution facilities, and provide rich geometric information for subsequent pollutant positioning and facility reconstruction.
[0061] By iterating the closest point ICP algorithm to align multi-view laser point cloud data, point cloud data collected at different angles and positions can be unified into the same coordinate system to obtain a complete and consistent three-dimensional point cloud model. The ICP algorithm achieves high-precision point cloud alignment by iteratively finding the closest point pair and optimizing the coordinate transformation parameters, effectively overcoming the position deviation and coordinate system differences between point clouds from different perspectives. The aligned three-dimensional point cloud model lays a data foundation for the three-dimensional reconstruction of agricultural pollution facilities and the spatial positioning of pollutants.
[0062] like Figure 5As shown, S5, the material and pollutant type of the agricultural pollution facility obtained by S3, and the three-dimensional point cloud model registered by S4 are fused through a multi-data fusion strategy to obtain a three-dimensional spectral model of the agricultural pollution facility. S51, the final classification result y of the material type and pollutant type of the agricultural pollution facility obtained by S3 using the kernel function-based support vector machine SVM and Markov random field MRF optimization, is spatially matched 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 three-dimensional point cloud model: 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 coordinates P hs Convert 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 , through the inverse transformation of the coordinate transformation relationship, calculate the projection pixel position P on the hyperspectral image plane 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 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 extracted material type label y m and pollutant type label y p , and the three-dimensional point P lidar Associate and construct point-attribute information pairs (P lidar ,y m ,y p ). Set the material type tag 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 three-dimensional 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 of 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 spatial matching of the hyperspectral image classification results and the three-dimensional point cloud model is achieved, and each three-dimensional point is associated with its corresponding spectral attribute information. Through spatial matching, the point-level association of spectral information and spatial information is achieved, and the two-dimensional material type and pollutant type distribution is integrated with the three-dimensional point cloud geometric structure.
[0067] By spatially matching the hyperspectral image classification results with the 3D point cloud model, the association and fusion of spectral information and spatial information are achieved. Using the point cloud registration parameters obtained by the ICP algorithm, the conversion relationship between the hyperspectral image coordinate system and the 3D point cloud coordinate system is constructed, and each 3D point is associated with its corresponding material type and pollutant type label. The point-attribute information pair after spatial matching contains rich spectral features and precise spatial position information.
[0068] S52: According to the spatial matching results of S51, each point in the three-dimensional point cloud model after S4 registration 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 three-dimensional points of the agricultural sewage facilities. Using the spatial matching results of S51, each point in the three-dimensional point cloud model is associated with the material type and pollutant type of the corresponding pixel in the classification result of the hyperspectral image. Construct a point-attribute information table of the three-dimensional points of the agricultural sewage facilities, each three-dimensional point contains its spatial coordinate information, material type attribute and pollutant type attribute. The point-attribute information table fuses the geometric information of the three-dimensional point cloud with the spectral attribute information of the hyperspectral image to form the three-dimensional spectral point cloud data of the agricultural sewage facilities.
[0069] S53: Using the Thiessen polygon interpolation algorithm, the material attributes and pollutant attributes of the discrete three-dimensional points in the point-attribute information table constructed in S52 are interpolated into the continuous three-dimensional space of the agricultural sewage facility to achieve spatial continuous expression of material and pollutant information. The Thiessen polygon interpolation algorithm is a spatial interpolation method that interpolates the attribute values of discrete points into a continuous space to achieve spatial continuous expression of attribute information. Using the Thiessen polygon interpolation algorithm, the material attributes and pollutant attributes of the discrete three-dimensional points in the point-attribute information table are interpolated into the entire three-dimensional space of the agricultural sewage facility to generate a continuous material attribute distribution and pollutant attribute distribution.
[0070] Each point in the 3D point cloud model after S4 registration is used as the generating point of the Thiessen polygon, and the Thiessen polygon area of each 3D point is calculated. Each point in the 3D point cloud model is used as the generating point, and its Thiessen polygon area is calculated. The Thiessen polygon is a polygon area composed of the points closest to the generating point, and the points in the Thiessen polygon area of each generating point are closest to the generating point. For each spatial position in the Thiessen polygon area, the material properties and pollutant properties of the position are calculated according to its distance to the 3D point using the inverse distance weighted interpolation formula. For each spatial position in the Thiessen polygon area, the distance to the generating point is calculated. Using the inverse distance weighted interpolation formula, the material properties and pollutant property values of the position are calculated according to the distance from the spatial position to the generating point. The inverse distance weighted interpolation formula takes into account the distance from the spatial position to the generating point. The closer the generating point is, the greater the impact on the interpolation result is, and the farther the generating point is, the smaller the impact on the interpolation result is.
[0071] The material and pollutant attributes of all Thiessen polygon areas covered by the three-dimensional point cloud model are interpolated to obtain the continuous material attribute distribution and pollutant attribute distribution covering the complete three-dimensional space of the agricultural sewage facility. All Thiessen polygon areas covered by the three-dimensional point cloud model are traversed, and the material attributes and pollutant attribute distributions are interpolated for the spatial positions in each area. The interpolation results of all Thiessen polygon areas are combined to obtain the continuous material attribute distribution and pollutant attribute distribution covering the complete three-dimensional space of the agricultural sewage facility. The continuous material attribute distribution and pollutant attribute distribution represent the continuous changes in the material composition and pollution status of the agricultural sewage facility in the entire three-dimensional space.
[0072] S54: Geometrically and semantically register the three-dimensional point cloud model of agricultural sewage facilities registered by S4 with the material attribute distribution and pollutant attribute distribution of the three-dimensional space covering the agricultural sewage facilities obtained by interpolation in S53, and construct a three-dimensional spectral model of agricultural sewage facilities to achieve high-precision expression and precise management of the three-dimensional spatial structure, material composition and pollution status of agricultural sewage facilities. Geometrically register the three-dimensional point cloud model with the material attribute distribution and pollutant attribute distribution obtained by interpolation to align them accurately in space. Perform semantic registration to associate the material attributes and pollutant attributes with the corresponding positions in the three-dimensional point cloud model to form a complete three-dimensional spectral model of agricultural sewage facilities. The three-dimensional spectral model of agricultural sewage facilities integrates multi-dimensional information such as three-dimensional spatial structure, material composition and pollution status, and achieves high-precision expression and precise management of agricultural sewage facilities. Using the three-dimensional spectral model of agricultural sewage facilities, the spatial structure characteristics, material distribution laws and pollutant distribution of agricultural sewage facilities can be intuitively analyzed, providing refined decision support for rural environmental monitoring, pollution control and facility management.
[0073] The material attributes and pollutant attributes of discrete 3D points are interpolated into continuous 3D space through the Thiessen polygon interpolation algorithm, realizing the spatial continuous expression of material and pollutant information. The continuous attribute distribution obtained by interpolation is geometrically and semantically registered with the 3D point cloud model, and a 3D spectral model of agricultural sewage facilities is constructed, which comprehensively expresses the 3D spatial structure, material composition and pollution status of agricultural sewage facilities.
[0074] S6, manage agricultural pollution according to the three-dimensional spectral model of agricultural pollution facilities. Specifically, analyze the spatial distribution of agricultural pollution facilities according to the three-dimensional spectral model of agricultural pollution facilities, and optimize the layout planning of agricultural pollution facilities. The spatial coordinate information in the three-dimensional spectral model can be used to analyze the distribution density, clustered areas and discrete areas of agricultural pollution facilities. Identify the spatial patterns of the distribution of agricultural pollution facilities, such as linear distribution, circular distribution, random distribution, etc. According to the spatial distribution characteristics of agricultural pollution facilities, optimize the layout planning of agricultural pollution facilities, such as adjusting the location, spacing and arrangement of agricultural pollution facilities to improve the coverage efficiency and management convenience of agricultural pollution facilities. The material attribute information in the three-dimensional spectral model can be used to count the number and distribution of different material types in agricultural pollution facilities. Analyze the aging degree, damage risk and pollutant adsorption capacity of different material types, and identify key material types. Formulate differentiated facility management strategies for different material types, such as focusing on inspection and maintenance of material types that are prone to aging and damage, and focusing on cleaning and replacement of material types with strong pollutant adsorption capacity. Use the pollutant attribute information in the three-dimensional spectral model to analyze the type, concentration and distribution of different pollutants in agricultural pollution facilities. According to the spatial distribution map of pollutants, we can identify high-risk areas and pollution levels, and determine the key areas for pollution control. We can formulate targeted pollution control measures for pollutants of different types and concentrations, such as physical removal, chemical neutralization, and biodegradation, 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 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 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 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 three-dimensional point cloud model through a multi-data fusion strategy to obtain a three-dimensional 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 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 band correlation matrix R of the noise; 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, spatially regularizes the eigenvector matrix V to obtain a spatially regularized eigenvector matrix V'; 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.
3. The agricultural pollution inspection management method based on big data analysis according to claim 2 is characterized by: S3, using the support vector machine SVM based on the kernel function 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 a 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 management method based on big data analysis according to claim 3 is characterized by: S33, using 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 characteristic 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 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 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 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 Label 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, and those with are marked as noise voxels. S42, according to the voxel marking 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 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 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 management method based on big data analysis according to claim 8 is characterized by: S5, obtain the three-dimensional spectral model of agricultural pollution facilities, including: S51, spatially matching the material and pollutant type of the agricultural pollution facility with the registered three-dimensional point cloud model; S52, according to the spatial matching result, each point in the three-dimensional point cloud model is associated with the material and pollutant type of the corresponding pixel, and a point-attribute information table of the agricultural pollution facility is constructed; 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 sewage facility; S54, geometrically aligning and semantically aligning the aligned three-dimensional point cloud model and the interpolated three-dimensional space of the agricultural sewage facility to construct a three-dimensional spectral model of the agricultural sewage facility.
10. An agricultural pollution inspection 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 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
Agricultural sewage management system and management method
CN111639885A
Agricultural pollution operation and maintenance management method and system based on BIM + GIS technology
CN114491738A
Intelligent agricultural pollution operation big data integrated management system and management method
CN115438895A
