A water quality parameter classification inversion method and system based on spectral reflectance
By calculating the characteristic value of the overlap degree of spectral reflectance values in the hyperspectral image, selecting the wave peak as the initial pixel point, and combining the k-means algorithm and the distance calculation method, the problem of clustering inaccuracy caused by the randomness of the initial seed in the traditional method is solved, and the More accurate water quality parameter inversion.
Patent Information
- Application Number
- CN202411133527.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-19
AI Technical Summary
The randomness of the initial seed selection in the traditional k-means clustering algorithm in hyperspectral images leads to inaccurate clustering results, which affects the accuracy and reliability of water quality parameters. In particular, the lack of differentiation of cluster centers due to overlapping spectral reflectance values.
By calculating the eigenvalues of the overlap of spectral reflectance values, select the spectral band corresponding to the minimum eigenvalue to obtain initial pixel points, extract the peaks in the histogram as the initial pixel points, and use the k-means algorithm for clustering, combining Euclidean distance and cosine Similarity distance is calculated, and the initial centroid is updated iteratively until the threshold is reached.
It effectively avoids the overlap of spectral reflectance values, obtains more representative and distinguishable initial pixels, improves the accuracy of water body classification and the reliability of water quality parameters, and ensures more accurate water quality parameter inversion.
Smart Images

Figure CN118655098B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality monitoring, and in particular to a water quality parameter classification inversion method and system based on spectral reflection. Background Art
[0002] In water quality remote sensing monitoring, distinguishing different types of water bodies and accurately inverting their water quality parameters are crucial for environmental management and resource protection. To achieve this goal, k-means clustering in hyperspectral image processing is a commonly used image segmentation method. Among them, k-means clustering, as a classic clustering analysis method, is widely used in image segmentation tasks, including the preliminary processing of water quality remote sensing images, due to its simplicity and efficiency.
[0003] The core of the traditional k-means clustering algorithm is to randomly select k initial pixels in the hyperspectral image, then calculate the distance between the remaining pixels and the k initial pixels, and classify the remaining pixels into the class to which the initial pixel closest to them belongs. Through iteration, the pixels in each class are made to have as similar spectral characteristics as possible, while the pixels in different clusters are made as different as possible. This process depends on the selection of the initial seed, which, as the starting point of the iteration, has an important influence on the final clustering result.
[0004] However, the spectral reflectance values of each pixel in the hyperspectral image may overlap in multiple spectral bands. Random selection may cause the initial pixel to fall in the area where the spectral reflectance values overlap, which further causes the cluster center represented by the initial pixel to be non-distinguishing, resulting in inaccurate water body classification results, which in turn affects the accuracy and reliability of the water quality parameters obtained therefrom. Summary of the invention
[0005] Based on this, it is necessary to provide a water quality parameter classification inversion method and system based on spectral reflectance to address the above technical problems.
[0006] The present invention provides a water quality parameter classification inversion method based on spectral reflectance, comprising:
[0007] A water body hyperspectral image of size M×N×Λ is collected, where M and N represent the number of pixels in the horizontal and vertical directions of the water body hyperspectral image, respectively, and Λ represents the number of spectral bands of the water body hyperspectral image.
[0008] Based on the spectral reflectance values of the water body in each spectral band, a characteristic value for characterizing the degree of overlap of the spectral reflectance values of each spectral band is obtained, and the acquisition of the characteristic value includes: extracting the corresponding spectral reflectance values from each spectral band respectively, and obtaining Λ two-dimensional matrices of size M×N, each two-dimensional matrix representing the distribution of spectral reflectance values of the water body in each spectral band; based on the two-dimensional matrix, calculating discrete characteristic values for characterizing the degree of discreteness of the spectral reflectance values of each spectral band, and the discrete characteristic values are at least one of the coefficient of variation, variance, standard deviation, range, interquartile range, and mean absolute deviation.
[0009] Extract a spectral reflectance value histogram of the spectral band corresponding to the minimum eigenvalue, wherein the horizontal coordinate of the spectral reflectance value histogram is the size of the spectral reflectance value, and the vertical coordinate is the number of pixels corresponding to different spectral reflectance values; extract a number of segmented spectral reflectance values corresponding to a number of peaks in the spectral reflectance value histogram that are used to characterize the largest number of pixels in the neighborhood; including: extracting the number of pixels corresponding to all peaks in the spectral reflectance value histogram; and obtaining k spectral reflectance values corresponding to the first k peaks after sorting the peaks according to the number of pixels, wherein k={2,3,4,5}.
[0010] Obtain the coordinates of all pixels of k spectral reflectance values respectively, calculate the centroid coordinates of k pixels corresponding to the k spectral reflectance values based on the pixel coordinates, round the centroid coordinates of k pixels to obtain the coordinates of k initial pixels. Based on the initial pixels, use the k-means algorithm to segment the pixels in the water hyperspectral image into different classes, including: I. Calculate the distance from each non-initial classification pixel to the initial classification pixel based on the Euclidean distance and cosine similarity distance: II. Classify each non-initial classification pixel into the class to which the initial segmentation point with the smallest distance belongs; III. For the classified pixels, calculate the centroid of each class pixel, and use the centroid as the new initial classification pixel of each class; IV. Repeat steps I to III, and stop the calculation when the position change of the initial classification pixel is less than the set threshold.
[0011] Different types of pixel points are input into at least one water quality parameter inversion model among the linear model, polynomial model, three-band model, four-band model, bio-optical model, water body radiation transfer model, machine learning model and deep learning model to obtain the water quality parameters corresponding to each type of pixel point.
[0012] The present invention provides a water quality parameter classification inversion system based on spectral reflectance, comprising:
[0013] The data acquisition module is used to collect water body hyperspectral images of size M×N×Λ, where M and N represent the number of pixels of the water body hyperspectral image in the horizontal and vertical directions respectively, and Λ represents the number of spectral bands of the water body hyperspectral image.
[0014] The initial pixel point acquisition module is used to obtain characteristic values for characterizing the degree of overlap of spectral reflectance values of each spectral band based on the spectral reflectance values of the water body in each spectral band; extract the spectral reflectance value histogram of the spectral band corresponding to the minimum characteristic value, wherein the horizontal axis of the spectral reflectance value histogram is the size of the spectral reflectance value and the vertical axis is the number of pixels corresponding to different spectral reflectance values; extract several segmented spectral reflectance values corresponding to several peaks in the spectral reflectance value histogram that characterize the largest number of pixels in the neighborhood; and select several pixels from the several segmented spectral reflectance values as initial pixels respectively;
[0015] The water quality parameter inversion module is used to segment the pixels in the water body hyperspectral image into different classes based on the initial pixels using the k-means algorithm; the pixels of different classes are input into the water quality parameter inversion model respectively to obtain the water quality parameters corresponding to each type of pixel.
[0016] At least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects:
[0017] In the water quality parameter classification inversion method based on spectral reflectance provided by the present invention, a spectral band with the smallest degree of overlap of spectral reflectance values is firstly obtained, and by selecting an initial pixel point in the spectral band, the overlap of spectral reflectance values of different pixel points is avoided to the greatest extent; then, several peaks in the spectral reflectance value histogram of the spectral band corresponding to the minimum eigenvalue are extracted. Since the spectral reflectance value corresponding to the peak of the water body hyperspectral image has the largest number of pixels, it means that the segmented spectral reflectance value corresponding to the peak is the most discriminative spectral reflectance value in the neighborhood. Therefore, the initial pixel point is selected from the segmented spectral reflectance value to obtain a more representative and discriminative initial pixel point. Clustering based on the initial pixel point can obtain a more accurate segmentation result, and further obtain more accurate and reliable water quality parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0019] Figure 1 A schematic flow chart of a water quality parameter classification inversion method based on spectral reflectance provided by the present invention;
[0020] Figure 2 A schematic diagram of a Λ-dimensional hyperspectral image provided by the present invention;
[0021] Figure 3 A schematic diagram of the process of obtaining initial pixel points provided by the present invention;
[0022] Figure 4 The flow chart of the k-means clustering algorithm provided by the present invention;
[0023] Figure 5 Schematic diagram of the framework of the water quality parameter classification inversion system based on spectral reflectance provided by the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in combination with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The traditional k-means clustering algorithm randomly selects k initial pixels in the hyperspectral image, then calculates the distance between the remaining pixels and the k initial pixels, and classifies the remaining pixels into the class to which the initial pixel closest to them belongs. Through iteration, the pixels in each class are made to have as similar spectral characteristics as possible, while the pixels between different clusters are made to be as different as possible. This process depends on the selection of the initial seed, which has an important influence on the final clustering result as the starting point of the iteration. However, the k-means clustering algorithm only calculates the distance using the Euclidean distance of the spectral reflectance value during the clustering process, without considering the multi-dimensionality of the hyperspectral spectrum. In addition, the K value in the k-means clustering algorithm is manually set and the initial seed is randomly generated. The random generation of the seed may cause the clustering result to be inaccurate, so that the hyperspectral image input into the inversion model has multi-class characteristics, resulting in inaccurate inversion parameters.
[0026] Based on this, this embodiment provides a water quality parameter classification inversion method based on spectral reflectance. The method improves k-means clustering to obtain more accurate water body segmentation results, thereby obtaining more accurate water body inversion parameters.
[0027] Figure 1 The process of the water quality parameter classification inversion method based on spectral reflectance in this embodiment is shown. Figure 1 The method is described in detail and specifically comprises the following steps:
[0028] S1: Collect a water body hyperspectral image of size M×N×Λ, where M and N represent the number of pixels in the horizontal and vertical directions of the water body hyperspectral image, respectively, and Λ represents the number of spectral bands of the water body hyperspectral image.
[0029] The water surface images were acquired by using a drone equipped with a hyperspectral imaging spectrometer, and preprocessing was performed for radiation correction, geometric correction, mirror transformation, and black-and-white frame calibration. Considering that after the drone flies to a certain altitude, the hyperspectral image data acquired by the hyperspectral imager may be affected by factors such as the atmosphere and water vapor. In order to eliminate the influence of these factors, a calibrated gray cloth was placed in the shooting area before the drone took off. When the hyperspectral image was acquired, the gray cloth was placed in the hyperspectral image acquisition area, and the influence of factors such as the atmosphere and water vapor was eliminated by comparing the spectral reflectance values of the water area and the gray cloth area.
[0030] Through the above steps, a water body hyperspectral image with a size of M×N×Λ can be collected. Figure 2 For collection Λ Schematic diagram of a 2D hyperspectral image, which consists of Λ two-dimensional matrices of size M×N. M×N represents the size of the hyperspectral image in two-dimensional space, M is the number of pixels in the image in the horizontal direction, and N is the number of pixels in the vertical direction. Each two-dimensional matrix corresponds to a spectral band, and the value of each pixel in the two-dimensional matrix represents the spectral response of the pixel in the corresponding spectral band. Hyperspectral images are different from ordinary RGB color images, which usually have only three bands (red, green, and blue), while hyperspectral images contain more bands that cover a wider spectral range. Each band represents the intensity information of light in a specific wavelength range. Therefore, each pixel in the hyperspectral image has information on Λ spectral bands.
[0031] S2: Based on the spectral reflectance values of the water body in each spectral band, obtain the characteristic value used to characterize the degree of overlap of the spectral reflectance values of each spectral band; extract the spectral reflectance value histogram of the spectral band corresponding to the minimum eigenvalue, the horizontal axis of the spectral reflectance value histogram is the size of the spectral reflectance value, and the vertical axis is the number of pixels corresponding to different spectral reflectance values; extract several segmented spectral reflectance values corresponding to several peaks in the spectral reflectance value histogram that are used to characterize the largest number of pixels in the neighborhood; select several pixels from the several segmented spectral reflectance values as initial pixels.
[0032] The segmented water body hyperspectral images can show different parts of the water body more clearly, which is helpful for explaining and analyzing the water quality characteristics of different regions, which helps researchers better understand the spatial distribution and changes of water bodies. And the segmented images can be used to train different models or algorithms. By integrating the results of multiple models, the accuracy and robustness of water quality parameter inversion can be further improved. Figure 3 This is a schematic diagram of the process of obtaining the initial pixel point. Figure 3 Detailed description of the steps to obtain the initial pixel point:
[0033] S201: Based on the spectral reflectance value of the water body in each spectral band, a characteristic value for characterizing the degree of overlap of the spectral reflectance values of each spectral band is obtained.
[0034] In a hyperspectral remote sensing image, each pixel contains spectral reflectance values in multiple spectral bands, which together constitute the spectral signature of the pixel. Due to the complexity of water bodies, the spectral reflectance values of different types of water bodies may overlap in some bands. This means that it is difficult to accurately distinguish different ground objects or water quality parameters based only on the spectral information of a single or a small number of bands. When segmenting or performing other forms of analysis on hyperspectral images, if the initial pixels are randomly selected, a problem may occur: these initial points may fall in areas where the spectral reflectance values overlap. This overlap may lead to incorrect classification or inversion results because the similarity of spectral features makes it difficult for the algorithm to distinguish different water quality parameters. For example, in the inversion of water quality parameters, chlorophyll a and suspended matter of different concentrations may have similar spectral reflectance characteristics in certain bands. If the initial pixel happens to fall in these overlapping areas, the analysis based on these points may mistakenly invert one water quality parameter into another. To solve this problem, characteristic values used to characterize the degree of overlap of spectral reflectance values of each spectral band can be obtained, and the initial pixel point can be selected from the spectral band corresponding to the minimum characteristic value. Specifically:
[0035] The corresponding spectral reflectance values are extracted from each spectral band to obtain Λ two-dimensional matrices of size M×N. Each two-dimensional matrix represents the distribution of spectral reflectance values of water bodies in each spectral band.
[0036] Based on the two-dimensional matrix, the discrete eigenvalues used to characterize the discrete degree of the spectral reflectance values of each spectral band are calculated. The discrete eigenvalues include at least one of the coefficient of variation, variance, standard deviation, range, interquartile range, and mean absolute deviation. The larger the discrete eigenvalue of the two-dimensional matrix, the more discrete the distribution of the spectral reflectance values of the water body in this spectral band, that is, the lower the degree of overlap.
[0037] Since the eigenvalue corresponding to the degree of overlap is inversely proportional to the eigenvalue corresponding to the degree of discreteness, the inverse of the discrete eigenvalue corresponding to each spectral band is used as the eigenvalue for characterizing the degree of overlap of the spectral reflectance values of each spectral band.
[0038] S202: extracting a spectral reflectance value histogram of the spectral band corresponding to the minimum eigenvalue, and extracting a plurality of segmented spectral reflectance values corresponding to a plurality of peaks in the spectral reflectance value histogram that are used to characterize the maximum number of pixel points in the neighborhood.
[0039] After obtaining the spectral band with the smallest overlap of spectral reflectance values, the initial pixel point should be selected from it. With the help of the principle of threshold segmentation, representative spectral reflectance values are selected. First, a spectral reflectance value histogram is obtained. The horizontal axis of the spectral reflectance value histogram is the size of the spectral reflectance value, and the vertical axis is the number of pixels corresponding to different spectral reflectance values; the number of pixels corresponding to all peaks in the spectral reflectance value histogram is extracted; the peaks are sorted according to the number of pixels to obtain the k spectral reflectance values corresponding to the first k peaks, where k={2,3,4,5}.
[0040] First, the spectral reflectance values of all pixels in the spectral band corresponding to the minimum eigenvalue are counted to construct a spectral reflectance value histogram. The horizontal axis of the histogram represents different spectral reflectance values, and the vertical axis represents the number of pixels corresponding to each spectral reflectance value. In the spectral reflectance value histogram, peaks represent areas in the image where spectral reflectance values appear more frequently. These peaks usually correspond to the main water areas in the image. The main spectral reflectance values in the image can be found by detecting the peaks in the histogram. Once all the peaks are extracted, they are sorted according to the number of pixels corresponding to the peaks. This sorting process can help identify the most significant water body locations in the image, because the height of the peak (i.e., the number of pixels) reflects the prevalence of the spectral reflectance value in the image. In the sorted peak list, the spectral reflectance values corresponding to the first k peaks can be selected. These spectral reflectance values are considered to be representative spectral reflectance values in the image because they represent the spectral features with the highest frequency in the image.
[0041] S203: Selecting a plurality of pixel points from a plurality of segmented spectral reflectance values as initial pixel points.
[0042] The coordinates of all pixels of k spectral reflectance values are obtained respectively; the centroids of k pixels corresponding to the k spectral reflectance values are calculated based on the pixel coordinates; the coordinates of the centroids of k pixels are rounded to obtain the coordinates of k initial pixels. Specifically:
[0043] First, traverse each pixel in the spectral band corresponding to the minimum eigenvalue, and determine k spectral reflectance values according to the peaks in the spectral reflectance histogram. For each spectral reflectance value, it may include multiple pixels, because there may be multiple pixels with the same reflectance value in the same spectral band. Find the pixels in the band that are the same as the k spectral reflectance values, and record the coordinates of these pixels. Then for the k spectral reflectance values, group all the corresponding pixel coordinates, and calculate the centroid (center point) of the pixels in each group. The centroid can be calculated by calculating the average value of the coordinates of the pixels belonging to the same group. Since the obtained centroid coordinates are not necessarily integers, the centroid coordinates are rounded to get the k initial pixel coordinates.
[0044] S3: Based on the initial pixel points, the k-means algorithm is used to segment the pixel points in the water body hyperspectral image into different classes; the pixel points of different classes are input into the water quality parameter inversion model respectively to obtain the water quality parameters corresponding to each type of pixel points.
[0045] S301: Based on the initial pixel points, the pixel points of the water body hyperspectral image are segmented into different classes along the spectral band direction using the k-means algorithm. Figure 4 This is a flow chart of the k-means clustering algorithm. The steps of using the k-means algorithm to segment the pixels of the water body hyperspectral image into different classes along the spectral band direction include:
[0046] I. Calculate the distance from each non-initial classification pixel to the initial classification pixel based on Euclidean distance and cosine similarity distance.
[0047] The traditional k-means distance measures similarity with Euclidean distance, but Euclidean distance is unordered (distance is independent of the order of vectors), that is, d(A, B) = d(B, A), A and B represent two different vectors, and d() represents the distance. When calculating the distance between two pixels, the spectral reflectance values of different spectral bands cannot be compared, so the cosine similarity distance is introduced to consider the order of spectral bands. Cosine similarity is a measure of the degree of similarity between two vectors in direction. Unlike Euclidean distance, cosine similarity focuses on the angle between the two vectors in direction, rather than their size or length.
[0048] II. Classify each non-initial classified pixel into the class to which the initial segmentation point with the smallest distance belongs.
[0049] III. For the classified pixels, calculate the centroid of each class of pixels and use the centroid as the new initial classification pixel of each class.
[0050] IV. Repeat steps I to III, and stop the calculation when the position change of the initial classified pixel is less than the set threshold.
[0051] S302: Inputting different types of pixel points into the water quality parameter inversion model respectively to obtain the water quality parameters of the area corresponding to each type of pixel point.
[0052] The water quality parameter inversion model specifically includes at least one of a linear model, a polynomial model, a three-band model, a four-band model, a bio-optical model, a water body radiation transfer model, a machine learning model, and a deep learning model. The water quality parameter inversion model is a mathematical model used to estimate water quality parameters (such as chlorophyll concentration, suspended solids concentration, transparency, etc.) from remote sensing data. The linear model is the simplest water quality parameter inversion model. It assumes that there is a linear relationship between water quality parameters and spectral reflectance or other observation indicators. Through regression analysis, a linear equation between the parameters and the observed data can be established to achieve parameter inversion. The polynomial model is an extension of the linear model. It allows a nonlinear relationship between water quality parameters and observed data. By introducing high-order terms to fit actual data, the inversion accuracy is improved. The three-band model is a semi-analytical model based on the spectral characteristics of a specific band. It is widely used in the inversion of chlorophyll a concentration. The model comprehensively considers the absorption and backscattering characteristics of the water body. By selecting the spectral reflectance of a specific band, an empirical or semi-empirical relationship between the chlorophyll concentration and the chlorophyll concentration is established. The four-band model is a further extension of the three-band model. By introducing more bands of spectral information, the accuracy and scope of inversion are improved. The bio-optical model is based on the optical properties of biological components in water (such as chlorophyll, suspended matter, etc.). By establishing the physical relationship between these components and spectral reflectance, the water quality parameters are inverted. The water body radiation transmission model describes the physical process of light transmission in water, including light absorption, scattering and transmission. The model establishes a quantitative relationship between spectral reflectance and water quality parameters by simulating the propagation path and energy change of light in water. Machine learning models such as support vector machines, random forests and neural networks automatically discover the complex relationship between water quality parameters and spectral features through the learning of a large amount of sample data, thereby improving the accuracy and efficiency of inversion. The deep learning model is a branch of the field of machine learning. It realizes automatic learning and feature extraction of complex data by constructing a deep neural network structure.
[0053] based on Figure 1The water quality parameter classification inversion method based on spectral reflectance shown in the figure first selects the band with the smallest overlap of spectral reflectance values. This step ensures that the overlap between spectral reflectance values of different pixels can be avoided as much as possible in subsequent processing. By selecting the initial pixel points in these relatively pure spectral bands, a good starting point can be established to lay the foundation for subsequent analysis and processing. Next, the peaks in the spectral reflectance value histogram of the spectral band are extracted according to the minimum eigenvalue. In hyperspectral images, peaks usually correspond to the maximum values of spectral reflectance values, and the number of pixels at these positions is relatively large. This phenomenon shows that the spectral reflectance values at these peaks have significant characteristics and discrimination in the image. Therefore, these peak positions are selected as the basis for segmenting spectral reflectance values to obtain more representative and discriminative initial pixel points. These representative and discriminative initial pixel points provide key input for subsequent clustering analysis. The clustering algorithm can more accurately segment water body images into different regions or categories, thereby inferring the spatial distribution of water quality parameters. This segmentation result based on spectral reflectance values is more accurate and reliable than traditional methods because it makes full use of the richness and specificity of spectral information. Ultimately, such methods could enable more effective monitoring and assessment of water pollution levels.
[0054] The above is a water quality parameter classification inversion method based on spectral reflectance provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding Figure 5 The water quality parameter classification inversion system based on spectral reflectance shown includes:
[0055] The data acquisition module is used to collect water body hyperspectral images of size M×N×Λ, where M and N represent the number of pixels of the water body hyperspectral image in the horizontal and vertical directions respectively, and Λ represents the number of spectral bands of the water body hyperspectral image.
[0056] The initial pixel point acquisition module is used to obtain characteristic values for characterizing the degree of overlap of spectral reflectance values of each spectral band based on the spectral reflectance values of the water body in each spectral band; extract the spectral reflectance value histogram of the spectral band corresponding to the minimum eigenvalue, the horizontal axis of the spectral reflectance value histogram is the size of the spectral reflectance value, and the vertical axis is the number of pixels corresponding to different spectral reflectance values; extract several segmented spectral reflectance values corresponding to several peaks in the spectral reflectance value histogram that are used to characterize the largest number of pixels in the neighborhood; and select several pixels from the several segmented spectral reflectance values as initial pixels.
[0057] The water quality parameter inversion module is used to segment the pixels in the water body hyperspectral image into different classes based on the initial pixels using the k-means algorithm; the pixels of different classes are input into the water quality parameter inversion model respectively to obtain the water quality parameters corresponding to each type of pixel.
[0058] For the specific definition of the water quality parameter classification inversion system based on spectral reflectance, please refer to the definition of the water quality parameter classification inversion method based on spectral reflectance mentioned above, which will not be repeated here. Each module in the above-mentioned water quality parameter classification inversion system based on spectral reflectance can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0059] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0060] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.
Claims
1. A classification inversion method for water quality parameters based on spectral reflectance, It is characterized in that include: Collect water body hyperspectral images of size M×N×Λ, where M and N represent the number of pixels in the horizontal and vertical directions of the water body hyperspectral image, respectively, and Λ represents the number of spectral bands of the water body hyperspectral image; Based on the spectral reflectance value of the water body in each spectral band, a characteristic value for characterizing the degree of overlap of the spectral reflectance values of each spectral band is obtained; a spectral reflectance value histogram of the spectral band corresponding to the minimum characteristic value is extracted, wherein the horizontal axis of the spectral reflectance value histogram is the size of the spectral reflectance value, and the vertical axis is the number of pixels corresponding to different spectral reflectance values; a number of segmented spectral reflectance values corresponding to a number of peaks in the spectral reflectance value histogram for characterizing the largest number of pixels in the neighborhood are extracted; and a number of pixels are selected from the several segmented spectral reflectance values as initial pixels respectively; The obtaining of the characteristic value used to characterize the degree of overlap of the spectral reflectance values of each spectral band specifically includes: The corresponding spectral reflectance values are extracted from each spectral band respectively, and Λ two-dimensional matrices of size M×N are obtained. Each two-dimensional matrix represents the distribution of spectral reflectance values of water bodies in each spectral band; Based on the two-dimensional matrix, the discrete eigenvalues used to characterize the discrete degree of the spectral reflectance value of each spectral band are calculated; The inverse of the discrete eigenvalue corresponding to each spectral band is used as the eigenvalue for characterizing the degree of overlap of the spectral reflectance values of each spectral band; Extract several spectral reflectance values corresponding to the peaks with the largest number of pixels in the neighborhood from the spectral reflectance value histogram, specifically including: Extract the number of pixels corresponding to all peaks in the spectral reflectance value histogram; After sorting the peaks according to the number of pixels, obtain the k spectral reflectance values corresponding to the first k peaks, where k = {2, 3, 4, 5}; The selecting of a plurality of pixel points as initial pixel points from a plurality of segmented spectral reflectance values specifically includes: Obtain the coordinates of all pixel points of k spectral reflectance values respectively; Calculate the centroid coordinates of k pixel points corresponding to k spectral reflectance values based on the pixel point coordinates; Round the centroid coordinates of k pixels to obtain k initial pixel coordinates; Based on the initial pixels, the k-means algorithm is used to segment the pixels in the water body hyperspectral image into different classes. The pixels of different classes are input into the water quality parameter inversion model to obtain the water quality parameters corresponding to each type of pixel.
2. The water quality parameter classification inversion method based on spectral reflectance as claimed in claim 1, It is characterized in that The discrete characteristic value used to characterize the degree of dispersion of the spectral reflectance value of each spectral band includes at least one of the coefficient of variation, variance, standard deviation, range, interquartile range, and mean absolute deviation.
3. The water quality parameter classification inversion method based on spectral reflectance as claimed in claim 1, It is characterized in that The k-means algorithm is used to segment the pixels of the water body hyperspectral image into different classes along the spectral band direction, specifically including: I. Calculate the distance from each non-initial classification pixel to the initial classification pixel based on Euclidean distance and cosine similarity distance: II. Classify each non-initial classification pixel into the class to which the initial segmentation point with the smallest distance belongs; III. For the classified pixels, calculate the centroid of each class of pixels and use the centroid as the new initial classification pixel of each class; IV. Repeat steps I to III, and stop the calculation when the position change of the initial classified pixel point is less than the set threshold.
4. The water quality parameter classification inversion method based on spectral reflectance as claimed in claim 1, It is characterized in that The water quality parameter inversion model specifically includes at least one of a linear model, a polynomial model, a three-band model, a four-band model, a bio-optical model, a water body radiation transfer model, a machine learning model and a deep learning model.
5. A water quality parameter classification inversion system based on spectral reflectance, It is characterized in that include: A data acquisition module is used to acquire a water body hyperspectral image of a size of M×N×Λ, where M and N represent the number of pixels of the water body hyperspectral image in the horizontal direction and the vertical direction, respectively, and Λ represents the number of spectral bands of the water body hyperspectral image; The initial pixel point acquisition module is used to obtain characteristic values for characterizing the degree of overlap of spectral reflectance values of each spectral band based on the spectral reflectance values of the water body in each spectral band; extract the spectral reflectance value histogram of the spectral band corresponding to the minimum characteristic value, wherein the horizontal axis of the spectral reflectance value histogram is the size of the spectral reflectance value and the vertical axis is the number of pixels corresponding to different spectral reflectance values; extract several segmented spectral reflectance values corresponding to several peaks in the spectral reflectance value histogram that characterize the largest number of pixels in the neighborhood; and select several pixels from the several segmented spectral reflectance values as initial pixels respectively; The obtaining of the characteristic value used to characterize the degree of overlap of the spectral reflectance values of each spectral band specifically includes: The corresponding spectral reflectance values are extracted from each spectral band respectively, and Λ two-dimensional matrices of size M×N are obtained. Each two-dimensional matrix represents the distribution of spectral reflectance values of water bodies in each spectral band; Based on the two-dimensional matrix, the discrete eigenvalues used to characterize the discrete degree of the spectral reflectance value of each spectral band are calculated; The inverse of the discrete eigenvalue corresponding to each spectral band is used as the eigenvalue for characterizing the degree of overlap of the spectral reflectance values of each spectral band; Extract several spectral reflectance values corresponding to the peaks with the largest number of pixels in the neighborhood from the spectral reflectance value histogram, specifically including: Extract the number of pixels corresponding to all peaks in the spectral reflectance value histogram; After sorting the peaks according to the number of pixels, obtain the k spectral reflectance values corresponding to the first k peaks, where k = {2, 3, 4, 5}; The selecting of a plurality of pixel points as initial pixel points from a plurality of segmented spectral reflectance values specifically includes: Obtain the coordinates of all pixel points of k spectral reflectance values respectively; Calculate the centroid coordinates of k pixel points corresponding to k spectral reflectance values based on the pixel point coordinates; Round the centroid coordinates of k pixels to obtain k initial pixel coordinates; The water quality parameter inversion module is used to segment the pixels in the water body hyperspectral image into different classes based on the initial pixels using the k-means algorithm; the pixels of different classes are input into the water quality parameter inversion model respectively to obtain the water quality parameters corresponding to each type of pixel.
Citation Information
Patent Citations
Water quality parameter inversion method based on unmanned aerial vehicle multispectral data
CN111597756A
Chlorophyll inversion method based on different types of inland water bodies
CN113159167A
