Red tide algae identification method based on hyperspectral image

By using hyperspectral image processing technology, spatial and spectral gradient values ​​are calculated to establish a three-dimensional high-fidelity data cube. Spectral reflectance curves and absorption depth curves are extracted to identify the spatial distribution of red tide algae. This solves the stability problem of red tide algae identification in aquatic environments and achieves high-precision red tide algae identification.

CN121811224AInactive Publication Date: 2026-04-07FUJIAN HUAMIN YIJIA TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-04-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies for identifying red tide algae in aquatic environments struggle to effectively distinguish target areas with highly similar morphologies but different spectral characteristics. Furthermore, they are susceptible to external factors such as reflection interference, changes in illumination, and water turbidity, resulting in poor stability of identification results.

Method used

A hyperspectral image-based recognition method is adopted. By calculating the gradient values ​​of the spatial and spectral dimensions of each pixel, setting a diffusion coefficient for diffusion, a three-dimensional high-fidelity hyperspectral data cube is obtained. The spectral reflectance curve is extracted and a continuous spectrum background baseline is established. The absorption depth curve and spectral distortion score map are calculated. The pixel recognition judgment threshold is set, and the pixels are screened and connected to form the spatial distribution zoning of red tide algae.

Benefits of technology

It enhances the expressive power of algal patch boundaries and the consistency of internal spectral characteristics, improves the sensitivity and selectivity of pigment recognition, and ensures the accuracy and consistency of spatial distribution zoning of red tide algae.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121811224A_ABST
    Figure CN121811224A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, in particular to a red tide algae recognition method based on a hyperspectral image, and the method comprises the following steps: calculating a gradient value of each pixel in a spatial dimension and a spectral dimension according to an original hyperspectral data cube, setting a diffusion coefficient for diffusion, and obtaining a three-dimensional fidelity hyperspectral data cube. According to the method, the gradient change trends of the spatial dimension and the spectral dimension are extracted at the same time pixel by pixel, and the regional differentiation diffusion operation is matched, so that the expression ability of the alga plaque boundary and the consistency of the internal spectral characteristics are enhanced, and the fidelity of the hyperspectral data in fine-grained region identification is improved; upper convex hull calculation of a spectral reflectivity curve and construction of a continuous spectrum background baseline are introduced, and characterization of pigment absorption morphological characteristics is enhanced; and in combination with the characteristic absorption wave bands of chlorophyll and phycobiliary, the synergistic weighted response to the distribution of the algae pigment is realized, and the sensitivity and selectivity of pigment recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method for identifying red tide algae based on hyperspectral images. Background Technology

[0002] Image recognition technology is a core branch of computer vision, which studies how to automatically identify, understand and process target information in images through computer systems.

[0003] Existing technologies in traditional image recognition often rely on two-dimensional spatial structures and a single spectral channel for target identification, making it difficult to effectively distinguish target regions with highly similar morphologies but different spectral characteristics. This is especially problematic in aquatic environments, where external factors such as reflection interference, changes in illumination, and water turbidity can easily affect the results, leading to poor stability. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a method for identifying red tide algae based on hyperspectral images.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for identifying red tide algae based on hyperspectral images, comprising the following steps:

[0006] Based on the original hyperspectral data cube, the gradient value of each pixel in the spatial and spectral dimensions is calculated, and the diffusion coefficient is set to perform diffusion to obtain a three-dimensional high-fidelity hyperspectral data cube.

[0007] Based on the three-dimensional high-fidelity hyperspectral data cube, the spectral reflectance curve of each pixel is extracted, the upper convex hull of the spectral reflectance curve is calculated and a continuous spectrum background baseline is established, the vertical difference between the original spectral reflectance curve and the continuous spectrum background baseline is obtained, the absorption depth curve is obtained, and the absorption depth curve is then calculated to generate a spectral distortion score map.

[0008] Based on the spectral distortion score map, the characteristic absorption band ranges of chlorophyll and phycobilins are set. The spectral absorption depth values ​​of the three-dimensional high-fidelity hyperspectral data cube within the set band range are called to establish the pixel spectral feature sensitivity quantification value. The weighted response map of algal pigments is obtained by calculating based on the pixel spectral feature sensitivity quantification value and the spectral distortion score map.

[0009] Based on the weighted response map of algal pigments, a pixel recognition threshold is set, pixels with values ​​higher than the threshold are selected and grouped into an initial recognition pixel set, and all spatially adjacent pixels in the initial recognition pixel set are connected to form a closed region to obtain the spatial distribution zoning of red tide algae.

[0010] Preferably, the steps for acquiring the three-dimensional high-fidelity hyperspectral data cube are as follows:

[0011] Based on the original hyperspectral data cube, the spatial gradient component is calculated along the row and column directions for each pixel, and the spectral gradient component is calculated along the band index direction. The spatial gradient component and the spectral gradient component are then merged into a unified structure according to the pixel number to form a pixel multidimensional gradient matrix.

[0012] Based on the pixel multidimensional gradient matrix, calculate the difference between the spatial gradient component and the difference between the spectral gradient component for each pixel and its four neighboring pixels, count the concentrated areas of the difference within a fixed neighborhood, mark the positions where the difference is concentrated and the direction changes abruptly as edge pixels and assign them a first diffusion coefficient, mark the positions where the difference is stable and the direction is consistent as internal pixels and assign them a second diffusion coefficient, and generate a diffusion coefficient annotation map.

[0013] Based on the diffusion coefficient annotation map, the edge pixel regions are diffused according to the first diffusion coefficient on the original hyperspectral data cube, and the internal pixel regions are diffused according to the second diffusion coefficient. The pixel positions of each band update result are aligned and the cube is reassembled according to the original band order to form a three-dimensional high-fidelity hyperspectral data cube.

[0014] Preferably, the step of obtaining the absorption depth curve is as follows:

[0015] Based on the three-dimensional high-fidelity hyperspectral data cube, the spectral reflectance curve is extracted pixel by pixel in band order, abnormal bands are excluded and missing band points are filled in to obtain the pixel spectral reflectance curve.

[0016] Based on the pixel spectral reflectance curve, the endpoints and local maxima are selected to form a support point sequence. The convex hull of the spectral reflectance curve is constructed and a continuous spectrum background baseline is generated by linear connection. The vertical difference between the original pixel spectral reflectance curve and the continuous spectrum background baseline is calculated band by band to obtain the absorption depth curve.

[0017] Preferably, the step of obtaining the spectral distortion score map is as follows:

[0018] Based on the absorption depth curve, a spectral distortion score map is calculated and obtained.

[0019] Preferably, the step of obtaining the quantified value of the pixel spectral feature sensitivity is as follows:

[0020] Based on the spectral distortion score, the characteristic absorption band ranges of chlorophyll and phycobilins are set, the band index boundaries are retrieved and the positions of the covered absorption peaks are verified, the upper and lower bound indices are locked as fixed intervals, and the characteristic absorption band ranges of chlorophyll and phycobilins are generated.

[0021] Based on the chlorophyll characteristic absorption band range and the phycobilin characteristic absorption band range, the spectral absorption depth values ​​of the three-dimensional high-fidelity hyperspectral data cube in the corresponding band range are called. Invalid spectral absorption depth values ​​are removed pixel by pixel and gaps are interpolated according to adjacent bands. The values ​​are accumulated in the two band ranges respectively to generate a quantified value of the pixel spectral feature sensitivity.

[0022] Preferably, the step of obtaining the algal pigment weighted response map is as follows:

[0023] Based on the quantified values ​​of the pixel spectral features, the weighted response map of algal pigments is calculated and obtained.

[0024] Preferably, the step of obtaining the initial set of recognized pixels is as follows:

[0025] Based on the weighted response map of algal pigments, the pixel value distribution is statistically analyzed and a uniform resolution histogram is generated. The minimum valley of the histogram is located and a candidate threshold sequence is constructed. The number of connected components, the proportion of isolated pixels and the boundary break ratio are calculated for each candidate threshold. The candidate threshold that simultaneously satisfies the condition of stable number of connected components and minimum proportion of isolated pixels and boundary break ratio is selected to obtain the pixel recognition judgment threshold.

[0026] Based on the pixel recognition threshold, the weighted response map of algal pigments is numerically compared pixel by pixel to generate a binary identifier map. The number of adjacent pixels of each foreground pixel is counted according to the spatial adjacency table, and foreground pixels whose number of adjacent pixels is lower than the lower limit of the adjacency number variable are removed. Foreground pixels that are in contact with each other or are one pixel apart are merged according to the spatial adjacency table to form an initial set of recognized pixels.

[0027] Preferably, the steps for obtaining the spatial distribution zoning of red tide algae are as follows:

[0028] Based on the initial set of identified pixels, pixel-by-pixel boundary tracking is performed along the outer edge of each connected region, and the nearest boundary point pairs are connected at the boundary closure gaps. Background holes completely surrounded by the foreground are filled, and neighboring connected regions with boundary spacing less than the minimum gap width variable are merged and connected regions with the number of pixels less than the lower limit variable are removed to form a spatial distribution zoning of red tide algae.

[0029] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0030] This invention enhances the expressive power of algal patch boundaries and the consistency of internal spectral features by simultaneously extracting gradient change trends in both spatial and spectral dimensions on a pixel-by-pixel basis, combined with regional differential diffusion operations. This improves the fidelity of hyperspectral data in fine-grained region identification. The introduction of upper convex hull calculation of spectral reflectance curves and construction of continuous spectrum background baselines strengthens the characterization of pigment absorption morphology. Combining the characteristic absorption bands of chlorophyll and phycobilins enables a synergistic weighted response to algal pigment distribution, improving the sensitivity and selectivity of pigment identification. In the final spatial distribution identification, by constructing a judgment threshold and executing a pixel-level spatial adjacency fusion strategy, the invention ensures that high-response regions are connected, intact, and structurally closed, eliminating isolated pixels and edge noise, thus guaranteeing the accuracy and consistency of red tide algal spatial distribution zoning. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the steps of the present invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0033] Please see Figure 1 This invention provides a technical solution: a method for identifying red tide algae based on hyperspectral images, comprising the following steps:

[0034] Based on the original hyperspectral data cube, the gradient value of each pixel in the spatial and spectral dimensions is calculated, and the diffusion coefficient is set to perform diffusion to obtain a three-dimensional high-fidelity hyperspectral data cube.

[0035] Based on the 3D high-fidelity hyperspectral data cube, the spectral reflectance curve of each pixel is extracted, the upper convex hull of the spectral reflectance curve is calculated and a continuous spectrum background baseline is established, the vertical difference between the original spectral reflectance curve and the continuous spectrum background baseline is obtained, the absorption depth curve is obtained, and the absorption depth curve is then calculated to generate a spectral distortion score map.

[0036] Based on the spectral distortion score map, the characteristic absorption band ranges of chlorophyll and phycobilins are set. The spectral absorption depth values ​​of the three-dimensional high-fidelity hyperspectral data cube within the set band range are called to establish the quantified values ​​of pixel spectral feature sensitivity. The weighted response map of algal pigments is obtained by calculating based on the quantified values ​​of pixel spectral feature sensitivity and the spectral distortion score map.

[0037] Based on the weighted response map of algal pigments, a pixel recognition threshold is set, and pixels that are higher than the threshold are selected and grouped into an initial recognition pixel set. All spatially adjacent pixels in the initial recognition pixel set are connected to form a closed region, thereby obtaining the spatial distribution zoning of red tide algae.

[0038] The steps for obtaining a 3D high-fidelity hyperspectral data cube are as follows:

[0039] Based on the original hyperspectral data cube, the spatial gradient component is calculated along the row and column directions for each pixel, and the spectral gradient component is calculated along the band index direction. The spatial gradient component and the spectral gradient component are then merged into a unified structure according to the pixel number to form a pixel multidimensional gradient matrix.

[0040] Based on the pixel multidimensional gradient matrix, calculate the difference between the spatial gradient component and the difference between the spectral gradient component for each pixel and its four neighboring pixels. Statistically identify the concentrated areas of the difference within a fixed neighborhood. Mark the positions where the difference is concentrated and the direction changes abruptly as edge pixels and assign them the first diffusion coefficient. Mark the positions where the difference is stable and the direction is consistent as internal pixels and assign them the second diffusion coefficient. Generate a diffusion coefficient annotation map.

[0041] Based on the diffusion coefficient annotation map, the edge pixel regions are diffused according to the first diffusion coefficient and the inner pixel regions are diffused according to the second diffusion coefficient on the original hyperspectral data cube. The pixel positions of each band update result are aligned and the cube is reassembled according to the original band order to form a three-dimensional high-fidelity hyperspectral data cube.

[0042] Specifically, based on the original hyperspectral data cube, the two-dimensional image of each band in the cube is first traversed. For each pixel position (x, y), a 3x3 Sobel operator is applied to calculate the spatial gradient. Specifically, the horizontal Sobel operator [-1, 0, 1; -2, 0, 2; -1, 0, 1] is convolved with the pixel's neighborhood to obtain the spatial gradient component along the row direction. Simultaneously, the vertical Sobel operator [-1, -2, -1; 0, 0, 0; 1, 2, 1] is convolved with the same pixel's neighborhood to obtain the spatial gradient component along the column direction. This calculation process is repeated on all bands of the cube, thus generating a set of spatial gradients for each pixel in each band. Next, the spectral gradient components are calculated along the band index direction. For any pixel (x, y), its spectral gradient component in band λ is obtained by calculating the spatial gradient components of the pixel in neighboring bands. The reflectance is obtained by the difference between the reflectance values ​​at band λ and λ+1, i.e., R(x,y,λ+1)-R(x,y,λ). For the last band, the difference between it and the previous band is used. After calculating the spectral gradient components of all pixels, the spatial gradient components and spectral gradient components calculated earlier are structurally merged. Specifically, a three-dimensional vector is created for each pixel (x,y). The three elements of this vector are the row-direction spatial gradient component and the column-direction spatial gradient component in a representative band (e.g., the center band with the highest signal-to-noise ratio), and the average value of the spectral gradient components of the pixel in all bands. Finally, the three-dimensional gradient vectors corresponding to all pixels are arranged according to their spatial position in the original image (e.g., in row-first, column-later order) to form an N×3 matrix, where N is the total number of pixels. This matrix is ​​the pixel multidimensional gradient matrix.

[0043] Based on the pixel multidimensional gradient matrix generated in the preceding steps, each pixel in the image is traversed, and its four spatial neighboring pixels (top, bottom, left, and right) are retrieved. For each neighboring pixel, its corresponding gradient vector in the pixel multidimensional gradient matrix is ​​extracted and subtracted from the gradient vector of the center pixel to obtain four gradient difference vectors. Each difference vector contains both spatial gradient difference and spectral gradient difference. Subsequently, a 5x5 fixed neighborhood is defined centered on the current pixel, and the gradient difference vectors calculated between all pixels in this neighborhood and their four neighboring pixels are counted. Next... Based on these statistical data, edge pixels are distinguished from internal pixels. First, the average norm of all gradient difference vectors in the neighborhood is calculated, and then the mean and standard deviation of the average norm of all neighborhoods in the entire image are calculated. An amplitude threshold is set, which is calculated by adding 1.5 times the standard deviation to the mean of the average norm of all neighborhoods. For example, if the mean of the average norm of all neighborhoods is 15.8 and the standard deviation is 4.2, then the amplitude threshold is 15.8 + 1.5 * 4.2 = 22.1. Second, the orientation angles of all original gradient vectors (non-difference vectors) in the neighborhood are calculated, and these orientation angles are then calculated in the... Similarly, the variance within this 5x5 neighborhood is calculated by analyzing the distribution of the orientation angle variance across all neighborhoods in the entire image, and the 80th percentile is used as the orientation threshold. For example, if the 80th percentile of the orientation angle variance is 0.95 (radians 2), the orientation threshold is set to 0.95. When the mean norm of the gradient difference in a pixel's 5x5 neighborhood is greater than the amplitude threshold of 22.1, and the orientation angle variance of its gradient vector is greater than the orientation threshold of 0.95, the pixel is labeled as an edge pixel and assigned a first diffusion coefficient, which is a small value set to 0.15. This value was determined experimentally. While preserving edge details, a slight smoothing is performed. Conversely, if the mean norm of the neighborhood gradient difference of a pixel is less than or equal to 22.1 and the variance of the gradient vector direction angle is less than or equal to 0.95, the pixel is labeled as an internal pixel and assigned a second diffusion coefficient. This coefficient is a large value, set to 0.8, to perform stronger noise smoothing in flat areas. After labeling and assigning coefficients to all pixels, a two-dimensional matrix with the same spatial dimension as the hyperspectral image is generated. The value of each element in the matrix is ​​the first or second diffusion coefficient of its corresponding pixel, forming a diffusion coefficient label map.

[0044] Based on the generated diffusion coefficient annotation map and the original hyperspectral data cube, anisotropic diffusion processing is independently performed on each band image in the cube. This processing is an iterative process. First, the number of iterations is set to a fixed value, such as 25. This value is based on an empirical value that strikes a balance between noise suppression and detail preservation after testing typical red tide hyperspectral images. Simultaneously, a time step parameter of 0.2 is set; this value must be less than 0.25 to ensure the numerical stability of the diffusion process. In each iteration, each pixel of the current band image is traversed, and its corresponding diffusion coefficient value on the diffusion coefficient annotation map is read. Then, the difference between this pixel and its four neighboring pixels (above, below, left, and right) at the current reflectance value is calculated, obtaining the local gradients in four directions. Each local gradient is multiplied by the diffusion coefficient of the pixel to obtain four weighted gradient values. These four weighted gradient values ​​are summed to obtain the total energy change of the pixel in the current iteration step. Multiply by the time step of 0.2 and add the result back to the current reflectance value of the pixel to update the reflectance value of the pixel, i.e., new pixel value = old pixel value + 0.2 × (sum of weighted gradients). This update process is applied to all pixels in the current band, constituting a complete iteration. For edge pixel regions, since their diffusion coefficient is small at 0.15, the update amplitude is small, thus preserving the edge sharpness. For inner pixel regions, since their diffusion coefficient is large at 0.8, the update amplitude is large, effectively smoothing the noise. After repeating this iteration process 25 times, the diffusion processing of the current band is completed. This processing is applied to all bands of the original hyperspectral data cube. Since the processing of each band is performed in the original spatial position, the processed band images naturally maintain the spatial alignment relationship. Finally, all the diffused two-dimensional band images are stacked back according to their band order in the original cube to form a three-dimensional high-fidelity hyperspectral data cube.

[0045] The steps for obtaining the absorption depth curve are as follows:

[0046] Based on the three-dimensional high-fidelity hyperspectral data cube, the spectral reflectance curve is extracted pixel by pixel in band order, abnormal bands are eliminated and missing band points are filled in to obtain the pixel spectral reflectance curve.

[0047] Based on the pixel spectral reflectance curve, the endpoints and local maxima are selected to form a sequence of support points. The convex hull on the spectral reflectance curve is constructed and a continuous spectral background baseline is generated by linear connection. The vertical difference between the original pixel spectral reflectance curve and the continuous spectral background baseline is calculated band by band to obtain the absorption depth curve.

[0048] Specifically, based on the three-dimensional high-fidelity hyperspectral data cube, each pixel in the cube is first traversed. For a pixel with spatial coordinates (x, y), its reflectance values ​​in all bands are extracted to form a one-dimensional vector, which is the initial spectral reflectance curve. Next, abnormal bands are identified and eliminated from this curve. The determination of abnormal bands is based on a pre-established list of abnormal bands, which is determined according to the technical specifications of the hyperspectral sensor and the physical characteristics of the atmospheric window. For example, for the commonly used AVIRIS-NG sensor, the band range is 135... The regions of 0 nm to 1430 nm and 1800 nm to 1960 nm suffer from extremely low signal-to-noise ratios due to strong atmospheric water vapor absorption. Therefore, this list includes indices for these specific bands. When processing spectral reflectance curves, all band data points in this list are directly marked as invalid and removed. After processing the abnormal bands in the predefined list, dynamic noise bands are identified. Specifically, the signal-to-noise ratio of each band in a uniform water body region of the image (this region is either manually delineated or automatically selected based on low spatial variance) is calculated. The signal-to-noise ratio is calculated as the signal-to-noise ratio of this region. A signal-to-noise ratio (SNR) threshold is set by comparing the ratio of the mean to the standard deviation of the reflectance of all pixels in a given band. This threshold is determined based on statistical analysis of historical hyperspectral data from similar water bodies, selecting the 15th percentile that can distinguish effective signals from noise. For example, if analyzing 100 mature datasets and calculating the 15th percentile of the SNR for all bands to be 35, then the SNR threshold is set to 35. Bands with an SNR below 35 are considered abnormal and removed from the curve. After removing abnormal bands, missing data points will appear on the spectral reflectance curve, requiring further processing. The missing points are filled in using linear interpolation. For one or more consecutive missing band points, the nearest valid band points on both sides are found, and a straight line is established between these two valid points. Based on the wavelength position of the missing point, the corresponding reflectance value on this straight line is calculated and filled in. For example, if the band data of 1340 nm and 1440 nm are removed, the values ​​of these two points will be calculated by linear interpolation based on the valid data points of 1330 nm and 1450 nm. After completing the above processing for all pixels, a set of smooth and complete pixel spectral reflectance curves are obtained.

[0049] Based on the pixel spectral reflectance curve obtained in the previous step, subsequent processing is performed independently for each pixel. First, support points for constructing the upper convex hull are identified and selected on the curve. The support point sequence consists of the two endpoints of the curve (i.e., the data points of the first and last bands) and all local maxima. Local maxima are identified using the sliding window method. A sliding window with a width of 5 bands is set and slides backward from the second band of the spectral curve. At each window position, it is determined whether the reflectance value of the center point is greater than the reflectance values ​​of its two neighboring points on either side. If this condition is met, the center point is determined to be a local maximum and recorded. The starting point of the curve, all identified local maximum points, and the ending point of the curve are arranged in ascending order of wavelength to form the final support point sequence. Then, the upper convex hull of the spectral reflectance curve is constructed based on this support point sequence. Specifically, the support points are connected sequentially by straight line segments. Two adjacent points in the column, all these straight line segments together form a piecewise linear curve, which is the continuous spectral background baseline. It represents the spectral background without absorption features. Then, the vertical difference between the original pixel spectral reflectance curve and this continuous spectral background baseline is calculated. For each band point on the spectral curve, its value at the corresponding wavelength position on the continuous spectral background baseline is found, and the baseline value is subtracted from the original spectral reflectance value. This difference is the absorption depth of that band. For example, at 675 nm, the reflectance value of the original spectral reflectance curve is 0.05, while the calculated value of the continuous spectral background baseline generated by connecting the support points at that point is 0.08. Therefore, the absorption depth of the 675 nm band is 0.08 - 0.05 = 0.03. This difference calculation is repeated for all bands in the pixel spectral reflectance curve, and finally a new curve is generated. Each point on this curve represents the absorption depth of the corresponding band. This new curve is the absorption depth curve.

[0050] The steps to obtain the spectral distortion rating map are as follows:

[0051] Based on the absorption depth curve, the spectral distortion score map is calculated using the following formula:

[0052]

[0053] Where G is the pixel value in the spectral distortion rating map, and A(λ) is the absorption depth curve. SG (λ) is the second derivative of the absorption depth curve after Savitzky-Golay smoothing, λ a λ is the lower bound of the characteristic band. b The upper limit of the characteristic band, To measure the integral area of ​​the absorption depth curve, ∈ is a very small positive number to prevent the denominator from being zero.

[0054] Specifically, the formula: The numerator represents the "weighted total curvature" determined by the absorption depth and absorption curvature across the entire characteristic wavelength range, while the denominator represents the total absorption area. The formula is designed based on the idea that algal pigments not only produce absorption valleys (represented by A(λ)), but also exhibit complex morphological changes within these valleys due to the superposition effect of multiple pigments, resulting in a high curvature (represented by the second derivative A). SG (λ) is manifested in the molecular part, which multiplies the absorption depth by the curvature, highlighting those absorption features that are both profound and morphologically complex, among which (λ) b -λ a ) 2 The factor, used as a scaling term, is employed to match the second derivative A. SG The dimension of (λ) is (nm) -2 This method ensures that the dimensions of the numerator integral term are consistent with those of the denominator. The G value calculated in this way can sensitively capture the characteristic spectral shape caused by pigments such as chlorophyll and phycobilins, thereby distinguishing algal pixels from water or other suspended matter pixels.

[0055] A(λ) is the absorption depth curve, representing the spectral absorption intensity at wavelength λ after continuous spectrum removal. This curve is the direct output of the previous step. For each pixel in the image, there is a corresponding absorption depth curve. Its value is obtained by subtracting the original pixel spectral reflectance curve from the continuous spectrum background baseline. This curve reveals the light absorption characteristics of various substances in the water and is the basic data for all subsequent pigment analysis. When performing calculations, the absorption depth curve data of the corresponding pixel can be directly called. For example, if the absorption depth of a pixel at 675 nm is 0.03, then the value of A(675) is 0.03.

[0056] A SG (λ) is the second derivative of the absorption depth curve after Savitzky-Golay smoothing. This parameter is used to quantify the curvature of the absorption depth curve, and its unit is nm. -2Savitzky-Golay smoothing is a filtering method based on local polynomial least squares fitting in the time domain. It can effectively filter out noise and calculate the smoothed derivative value. In specific implementation, two key parameters need to be set: the sliding window size and the polynomial order. Based on the usual characteristics of water spectral curves and after testing and optimization on more than 200 sets of measured hyperspectral data containing different algal species, the final selected window size is 11 bands and the polynomial order is 3. This setting can effectively smooth noise while preserving important spectral details such as pigment absorption peaks. The calculation process is as follows: for each point on the absorption depth curve, take the point and 5 points to its left and right to form an 11-point window. Use a third-order polynomial to perform least squares fitting on these 11 points, and then calculate the second derivative value of the fitted polynomial at the center point as A for that point. SG (λ) value.

[0057] λ a and λ b These are the lower and upper bounds of the characteristic band used for spectral distortion calculation, respectively, with units of nanometers (nm). These two parameters define the wavelength range of the analysis. Their selection is based on the absorption spectral range of the main pigments in algae (such as chlorophyll and phycobilins). To comprehensively cover these features and avoid the near-infrared band where the water body itself has strong absorption, based on prior knowledge in marine optics, this range is set to the transition region between visible and near-infrared light. Specifically, λ is set... a 400 nanometers, λ b The range is 750 nm, which includes the absorption peak of phycobilins in the blue light region (about 495 nm), the absorption valley in the green light region, and the main absorption peak of chlorophyll in the red light region (about 675 nm) and the fluorescence peak (about 685 nm).

[0058] For the absorption depth curve in [λ a ,λ b The integral area within the interval represents the total absorption intensity within that wavelength range, and its unit is nanometers (nm). In discrete hyperspectral data, this integral is approximated by summation, and the calculation formula is: Where, A(λ) i ) is the dimensionless absorption depth value of the i-th band, Δλ i Δλ is the spectral bandwidth (in nm) of the i-th band. For uniformly sampled spectral data, Δλ i This is a constant parameter used to normalize the "weighted total curvature" in the molecule, so that the final score reflects the relative complexity of the spectral shape, rather than simply the total amount of absorption.

[0059] ∈ is a very small positive number. When a pixel is completely clear water with no absorption characteristics, its absorption depth curve is theoretically a straight line close to zero. At this time, its integral area is... The value could be zero or very close to zero. Without ∈, this could lead to calculation overflow or unstable results. Based on the precision of computer floating-point numbers and the typical range of reflectivity values, ∈ is set to a value much smaller than the normal integral area value; for example, 1 × 10⁻⁶. - 9 nm.

[0060] Calculations based on parameters:

[0061] Taking a single pixel as an example, calculations are performed within the 400 nm to 750 nm wavelength range, selecting a sub-interval that includes the chlorophyll absorption peak, λ a =650nm, λ b =700nm, for example, a spectral resolution of 10nm means there are 6 spectral bands.

[0062] The values ​​of the absorption depth curve A(λ) are: A(650) = 0.01, A(660) = 0.02, A(670) = 0.05, A(680) = 0.04, A(690) = 0.02, A(700) = 0.01.

[0063] The second derivative A is obtained after passing through a Savitzky-Golay filter with a window size of 5 and an order of 2. SG The value of (λ) is: A SG (650) = 0.001nm -2 A SG (660) = 0.003nm -2 A SG (670) = -0.008nm -2 A SG (680) = 0.002nm -2 A SG (690)=0.003nm -2 A SG (700) = 0.001nm -2 ,

[0064] Set ∈ = 1 × 10 -9 nm,

[0065] First, calculate the denominator (total absorbing area, discrete summation):

[0066]

[0067] Next, calculate the numerator (weighted total curvature, discrete summation):

[0068]

[0069] Finally, the spectral distortion score G is calculated:

[0070]

[0071] The results indicate that the spectral distortion score of this pixel in this example band range is 10.333. It needs to be compared with the scores of other pixels in the image. A higher G value (e.g., greater than 8.0) usually indicates that the pixel's spectrum has complex absorption characteristics caused by pigments, and it is a potential algae pixel, while a lower G value (e.g., less than 2.0) indicates that the spectral morphology is smooth and it is more likely to be non-algae substances such as water or sediment. By performing this calculation on each pixel of the entire hyperspectral image, a two-dimensional grayscale image, namely the spectral distortion score map, is finally generated. The brightness value of each pixel in the image is equal to its calculated G value. High-brightness areas correspond to high G values, indicating areas where algae are more likely to be present.

[0072] The steps for obtaining the quantized values ​​of pixel spectral feature sensitivity are as follows:

[0073] Based on the spectral distortion score map, the characteristic absorption band ranges of chlorophyll and phycobilins are set. The band index boundaries are retrieved and the positions of the covered absorption peaks are verified. The upper and lower bound indexes are locked as fixed intervals to generate the characteristic absorption band ranges of chlorophyll and phycobilins.

[0074] Based on the characteristic absorption band ranges of chlorophyll and phycobilins, the spectral absorption depth values ​​of the three-dimensional high-fidelity hyperspectral data cube within the corresponding band ranges are retrieved. Invalid spectral absorption depth values ​​are removed pixel by pixel, and gaps are interpolated according to adjacent bands. The values ​​are then accumulated in the two band ranges to generate a quantified value of the pixel's spectral feature sensitivity.

[0075] Specifically, based on the spectral distortion score map, the characteristic absorption band ranges of two key pigments used to identify red tide algae are first defined. The characteristic absorption band range of chlorophyll is set based on the position of the main absorption peak of chlorophyll a in water, which is typically located between 670 nm and 680 nm. To fully capture this absorption characteristic and consider the slight peak position shift under different water environments, the chlorophyll characteristic absorption band range is set to 660 nm to 690 nm. Phycobilins are a class of accessory pigments, mainly including phycoerythrin and phycocyanin. Their absorption peaks vary depending on the algal species, mainly distributed in a broad range from 490 nm to 650 nm. To cover the main phycobilin absorption regions, especially the phycocyanin absorption peak (approximately 620 nm) commonly found in cyanobacteria, the phycobilin characteristic absorption band range is set to 610 nm to 640 nm. After completing the physical setting of the band ranges, they need to be converted into specific band indices in the hyperspectral data cube. This conversion is completed by reading the metadata file of the hyperspectral data. The file records the center wavelength value corresponding to each band index. The two band indices closest to 660 nm and 690 nm are retrieved as the upper and lower bound indices of the chlorophyll characteristic absorption band range. For example, if the center wavelength of the band with index 150 is 659.8 nm and the center wavelength of the band with index 155 is 690.2 nm, then the chlorophyll band index range is locked as [150, 155]. Similarly, the band indices closest to 610 nm and 640 nm, such as [130, 138], are retrieved as the index boundaries of the phycobiliin characteristic absorption band range. After locking the index, a verification is performed to check whether the index range actually contains the known absorption peak position. This is done by drawing the range on a known pixel spectrum containing a high concentration of algae and visually inspecting it, or by automatically detecting whether there is a local minimum value in the range through an algorithm. After confirmation, the chlorophyll characteristic absorption band range and the phycobiliin characteristic absorption band range are finally generated as two fixed intervals for subsequent calculations.

[0076] Based on the chlorophyll and phycobilin characteristic absorption band ranges generated in the preceding steps, each pixel in the 3D high-fidelity hyperspectral data cube is traversed to extract and calculate its spectral feature sensitivity quantification. For the currently processed pixel, its complete absorption depth curve calculated in previous steps is first retrieved. Then, the corresponding spectral absorption depth value sequences are extracted within the chlorophyll band index interval (e.g., [150, 155]) and the phycobilin band index interval (e.g., [130, 138]), respectively. During the extraction process, it is necessary to check whether these values ​​are valid. Invalid values ​​may originate from sensor failure lines or anomalies that were not fully repaired in previous processing, usually manifested as extremely large positive or negative values. A valid value range is set, for example, [-0.1, 1.0]. Any value outside this range is invalid. Absorption depth values ​​are considered invalid and discarded. If an invalid value is found within a certain band, the gap is filled using linear interpolation of adjacent bands. Specifically, the two nearest valid absorption depth values ​​before and after the invalid value are taken, their average is calculated, and assigned to the current position. For example, if the absorption depth value at index 152 is invalid, its new value is set as the average of the absorption depth values ​​at indices 151 and 153. After data cleaning and interpolation, for each pixel, all valid absorption depth values ​​within the chlorophyll characteristic absorption band are summed to obtain the total chlorophyll absorption depth of the pixel. Similarly, all valid absorption depth values ​​within the phycobilin characteristic absorption band are summed to obtain the total phycobilin absorption depth of the pixel. These two sums together constitute the quantified value of the spectral characteristic sensitivity of the pixel.

[0077] The steps to obtain the weighted response map of algal pigments are as follows:

[0078] Based on the quantified values ​​of pixel spectral features sensitivity, the weighted response map of algal pigments is calculated using the following formula:

[0079]

[0080] Where Y is the pixel value in the algal pigment weighted response map, G is the pixel value in the spectral distortion score map, and A(λ) i Let be the spectral absorption depth value of the i-th band, C be the band index set within the characteristic absorption band range of chlorophyll, P be the band index set within the characteristic absorption band range of phycobilins, and S be the band index set within the characteristic absorption band range of phycobilins. C =

[0081] Σ i∈C A(λ i S represents the total absorption depth within the chlorophyll band. P =Σ j∈P A(λ j ) represents the total absorption depth within the phycobilin band range, and ∈ is a very small positive number used to avoid the denominator being zero.

[0082] Specifically, the formula: first, The term is the total chlorophyll uptake depth S. C Phycobilin total absorption depth S P The geometric mean represents the combined abundance of the two key pigments. Compared to the average, the geometric mean better reflects the intensity of the combined effect of the two quantities. This value is only high when both pigments have a certain absorption capacity. Secondly, The term is a balancing factor that measures the relative balance of the absorption depths of the two pigments. When S C and S P When the values ​​are similar, the factor approaches 2, giving the response value the greatest weight. When the difference between the two is large, the factor approaches 1, and the weighting effect weakens. This is intended to highlight those pixels with balanced responses from the two pigments, as this is usually a typical feature of algal blooms. Finally, the product of the above two items is multiplied by the spectral distortion score G to achieve spectral morphological weighting of the response value of pigment abundance. Only those pixels with both high pigment abundance and complex spectral morphology (high G value) can obtain the highest final response value Y.

[0083] G is the pixel value in the spectral distortion score map, representing the complexity or distortion of the pixel's spectral absorption characteristics. It is read directly from the corresponding pixel position in the generated spectral distortion score map. For example, in the aforementioned example, the G value of a pixel was calculated to be 10.333.

[0084] S C S represents the total absorption depth within the chlorophyll band. This parameter is obtained by summing all absorption depth values ​​of a pixel within the characteristic absorption band of chlorophyll (e.g., 660 nm to 690 nm). It reflects the relative content or absorption intensity of chlorophyll a in that pixel and is one of the key indicators for measuring algal biomass. Its calculation formula is S. C =Σ i∈C A(λ i ), where C is the set of band indices within the characteristic absorption band range of chlorophyll, and A(λ i Let be the spectral absorption depth value (dimensionless) of the i-th band. For example, in a pixel, if the absorption depths of the five bands in the 660-690 nm range are 0.02, 0.04, 0.07, 0.05, and 0.03 respectively, then the S of that pixel is... C The value is 0.02 + 0.04 + 0.07 + 0.05 + 0.03 = 0.21.

[0085] S P The total absorption depth within the phycobiliprotein band, and S CSimilarly, this parameter is obtained by summing all absorption depth values ​​of a pixel within the characteristic absorption band of phycobilins (e.g., 610 nm to 640 nm), reflecting the relative content of phycobilins (mainly phycocyanin). Its calculation formula is S. P =Σ j∈P A(λ j ), where P is the set of band indices within the characteristic absorption band range of phycobilins, and A(λ j ) is the spectral absorption depth value of the j-th band, S P Similarly, given a dimensionless value, for example, within the same pixel, if its absorption depths in four bands within the 610-640 nm range are 0.01, 0.03, 0.05, and 0.02 respectively, then the S of that pixel... P The value is 0.01 + 0.03 + 0.05 + 0.02 = 0.11.

[0086] ∈ is a very small positive number, and ∈ is set to 1 × 10. -9 .

[0087] Calculations based on parameters:

[0088] Using the data obtained from the aforementioned example:

[0089] G = 10.333;

[0090] S C =0.21;

[0091] S P =0.11;

[0092] ∈=1×10 -9 ;

[0093] First, calculate the balance factor:

[0094] min(S C ,S P ) = min(0.21, 0.11) = 0.11;

[0095] max(S C ,S P ) = max(0.21, 0.11) = 0.21;

[0096]

[0097] Next, the geometric mean of pigment abundance is calculated:

[0098]

[0099] Finally, the pigment-weighted response value Y of the algae was calculated:

[0100]

[0101] Y=1.5238·0.1520·10.333≈0.2316·10.333≈2.393;

[0102] The results show that the weighted response value of algal pigments for this pixel is 2.393. The higher the Y value, the greater the likelihood that the pixel belongs to red tide algae. A high Y value (e.g., greater than 2.0) indicates that the pixel not only contains two key pigments but also has a relatively balanced content, and its spectral shape also has the complexity unique to algae. On the other hand, a low Y value (e.g., less than 0.5) may mean low pigment content, a serious imbalance between the two pigments, or a simple spectral morphology, none of which are consistent with the characteristics of typical red tide algae. By performing this calculation on all pixels in the image, an algal pigment weighted response map is finally generated. The pixel value in this map is the Y value, and the highlighted area will more accurately indicate the distribution range of red tide algae.

[0103] The steps for obtaining the initial set of recognition pixels are as follows:

[0104] Based on the weighted response map of algal pigments, the pixel value distribution is statistically analyzed and a uniform resolution histogram is generated. The minimum valley of the histogram is located and a candidate threshold sequence is constructed. The number of connected components, the proportion of isolated pixels and the boundary break ratio are calculated for each candidate threshold. The candidate threshold that simultaneously satisfies the condition of stable number of connected components and minimum proportion of isolated pixels and boundary break ratio is selected to obtain the pixel recognition judgment threshold.

[0105] Based on the pixel recognition threshold, the weighted response map of algal pigments is numerically compared pixel by pixel and a binary label map is generated. The number of adjacent pixels of each foreground pixel is counted according to the spatial adjacency table, and foreground pixels whose number of adjacent pixels is lower than the lower limit of the adjacency number variable are removed. Foreground pixels that are in contact with each other or are one pixel apart are merged according to the spatial adjacency table to form the initial recognition pixel set.

[0106] Specifically, based on the weighted response map of algal pigments, all pixel values ​​in the map are first traversed, and these floating-point values ​​are linearly normalized to an integer range of 0 to 255 to generate a grayscale histogram with 256 levels of uniform resolution. The horizontal axis of this histogram represents the normalized pixel value, and the vertical axis represents the number of pixels with that value. Then, this histogram is smoothed using a moving average filter with a window size of 5 to eliminate small, meaningless peaks and valleys caused by random data fluctuations. Next, all minima are located on the smoothed histogram. A location is determined to be a minima if its count value is less than that of its two adjacent values. The count values ​​at each position are collected, and all pixel values ​​that meet this condition are arranged in ascending order to form a candidate threshold sequence. Then, each candidate threshold in this sequence is iteratively evaluated. For a candidate threshold, such as 1.5, it is first used to binarize the algal pigment-weighted response map to generate a temporary binary label map. Then, based on this map, three evaluation metrics are calculated: First, the foreground pixels are labeled using the eight-neighbor connectivity algorithm, and the total number of independent connected components is counted. Second, the proportion of isolated pixels is calculated; a foreground pixel is defined as an isolated pixel if it has no other foreground pixels in its eight neighborhoods. The ratio is calculated by dividing the total number of isolated pixels by the total number of foreground pixels. Third, the boundary break ratio is calculated. This ratio is defined as the ratio of the total edge length of foreground pixels to the square root of the total area of ​​foreground pixels in the image. The total edge length is approximated by counting the number of foreground pixels adjacent to the background pixels. After calculating the ratios for all candidate thresholds, the optimal threshold is selected. First, a stable interval for the number of connected components is determined. The candidate threshold sequence is traversed to find a continuous subsequence where the rate of change of the number of connected components (the difference in the number of connected components corresponding to adjacent thresholds divided by the current number) is less than a preset stability coefficient. This coefficient is empirically set to 0.1, for example... If the number of connected components decreases from 150 to 145 when the candidate threshold changes from 1.5 to 1.6, the rate of change is (150-145) / 150≈3.3%, which is less than 10%, so it is considered to be in a stable interval. Within all the stable intervals found, a comprehensive evaluation value is calculated for each candidate threshold. This value is equal to the sum of its corresponding isolated pixel ratio and boundary break ratio. Finally, the candidate threshold with the smallest comprehensive evaluation value is selected. For example, in a certain stable interval, the comprehensive evaluation value corresponding to the threshold 2.1 is 0.08, which is the minimum value among all candidate thresholds in the stable intervals. Then 2.1 is determined as the final pixel recognition judgment threshold.

[0107] Based on the pixel recognition threshold obtained from the aforementioned steps, for example, 2.1, the pigment-weighted response map of algae is binarized pixel by pixel. Specifically, each pixel in the response map is traversed, and its response value is read. If the value is higher than 2.1, a value of 1 (representing foreground, i.e., algae) is assigned to the corresponding position in the new binary label map; otherwise, a value of 0 (representing background) is assigned. This generates the initial binary label map. Next, noise removal processing is performed on this binary label map. This processing is based on the spatial adjacency relationship of foreground pixels, setting a lower limit variable for the number of adjacencies. This variable is an empirical value set based on the analysis of typical red tide images to effectively remove salt-and-pepper noise while retaining small algae stripes. Its value is set to 2. The processing procedure is to traverse all foreground pixels (pixels with a value of 1) in the binary label map. For each foreground pixel, the number of foreground pixels in its eight neighborhoods (i.e., adjacent pixels in the eight directions: top, bottom, left, right, top left, top right, bottom left, and bottom right) is checked. If this number is lower than the number of adjacencies... If the lower limit variable is 2, the foreground pixel is determined to be a noise point, and its value is changed from 1 to 0. This operation is completed in a complete image traversal. All modifications are based on the original binary identifier state to avoid chain reactions. After noise removal, a foreground pixel merging operation is performed. This operation aims to connect the small breaks caused by threshold segmentation and merge spatially close pixel clusters. This is achieved through a morphological closing operation. Specifically, using a 3x3 all-1 square structuring element, a dilation operation is first performed on the noise-removed binary identifier. This operation turns the neighborhood of each foreground pixel (defined by the structuring element) into the foreground, thereby filling small gaps and connecting adjacent areas. Then, an erosion operation is performed on the dilated result. This operation removes a layer of pixels at the boundary of the foreground region to restore the slight increase in size of the foreground region caused by the dilation operation. After this series of processing, the set of all foreground pixels in the final binary image is the initial identification pixel set.

[0108] The steps for obtaining the spatial distribution zoning of red tide algae are as follows:

[0109] Based on the initial set of identified pixels, pixel-by-pixel boundary tracking is performed along the outer edge of each connected region, and the nearest boundary point pairs are connected at the boundary closure gaps. Background holes completely surrounded by the foreground are filled, and neighboring connected regions with boundary spacing less than the minimum gap width variable are merged and connected regions with the number of pixels less than the lower limit variable are removed to form the spatial distribution zoning of red tide algae.

[0110] Specifically, based on the initial set of identified pixels, boundary processing is first performed on each independent connected region. The Moore-Neighbor boundary tracking algorithm is used, starting from a boundary point of each connected region, tracking and recording the coordinate sequence of all outer boundary pixels pixel by pixel in a clockwise or counterclockwise direction to form a closed contour line. During the tracking process, small gaps may exist in the contour line due to image noise or imperfect segmentation. These gaps are closed. Specifically, after completing the boundary tracking of a region, the start and end points of the contour line are checked. If they do not coincide and the Euclidean distance between them is less than a preset maximum gap distance (e.g., 5 pixels), a straight line segment is used to connect these two points, and the pixels constituting the straight line segment are also added to the boundary sequence. After closing the boundaries of all regions, internal holes are filled. This operation identifies and fills background regions completely surrounded by foreground pixels. This is achieved by inverting the colors of the binary image of the initial set of identified pixels, and then using the image's... Starting from the four boundaries, flood filling is performed on the regions with a value of 1 (the original background). After the filling is completed, all regions in the image that are still 1 are internal holes. The values ​​of these regions are changed back to 0, and the entire image is inverted to complete the filling. Then, neighboring connected regions are merged. A minimum gap width variable is set, for example, 4 pixels. A morphological dilation operation with a circular structuring element with a radius of 2 is performed on the image so that regions with a spacing of less than 4 pixels can be connected together. Then, an erosion operation is performed to roughly restore the region size. Finally, small areas are removed from the processed image. A lower limit variable for the number of pixels is set. This value is based on the consideration of the minimum effective observation area of ​​actual red tide patches and is set to 30 pixels. All connected regions in the image are marked and the total number of pixels in each region is calculated. Any connected region with a number of pixels less than 30 is considered invalid debris or noise and is removed from the image (i.e., all its pixel values ​​are set to 0). After all the above steps, the final image is the spatial distribution zoning of red tide algae.

[0111] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for identifying red tide algae based on hyperspectral images, characterized in that, Includes the following steps: Based on the original hyperspectral data cube, the gradient value of each pixel in the spatial and spectral dimensions is calculated, and the diffusion coefficient is set to perform diffusion to obtain a three-dimensional high-fidelity hyperspectral data cube. Based on the three-dimensional high-fidelity hyperspectral data cube, the spectral reflectance curve of each pixel is extracted, the upper convex hull of the spectral reflectance curve is calculated and a continuous spectrum background baseline is established, the vertical difference between the original spectral reflectance curve and the continuous spectrum background baseline is obtained, the absorption depth curve is obtained, and the absorption depth curve is then calculated to generate a spectral distortion score map. Based on the spectral distortion score map, the characteristic absorption band ranges of chlorophyll and phycobilins are set. The spectral absorption depth values ​​of the three-dimensional high-fidelity hyperspectral data cube within the set band range are called to establish the pixel spectral feature sensitivity quantification value. The weighted response map of algal pigments is obtained by calculating based on the pixel spectral feature sensitivity quantification value and the spectral distortion score map. Based on the weighted response map of algal pigments, a pixel recognition threshold is set, pixels with values ​​higher than the threshold are selected and grouped into an initial recognition pixel set, and all spatially adjacent pixels in the initial recognition pixel set are connected to form a closed region to obtain the spatial distribution zoning of red tide algae.

2. The method for identifying red tide algae based on hyperspectral images according to claim 1, characterized in that, The steps for obtaining the three-dimensional high-fidelity hyperspectral data cube are as follows: Based on the original hyperspectral data cube, the spatial gradient component is calculated along the row and column directions for each pixel, and the spectral gradient component is calculated along the band index direction. The spatial gradient component and the spectral gradient component are then merged into a unified structure according to the pixel number to form a pixel multidimensional gradient matrix. Based on the pixel multidimensional gradient matrix, calculate the difference between the spatial gradient component and the difference between the spectral gradient component for each pixel and its four neighboring pixels, count the concentrated areas of the difference within a fixed neighborhood, mark the positions where the difference is concentrated and the direction changes abruptly as edge pixels and assign them a first diffusion coefficient, mark the positions where the difference is stable and the direction is consistent as internal pixels and assign them a second diffusion coefficient, and generate a diffusion coefficient annotation map. Based on the diffusion coefficient annotation map, the edge pixel regions are diffused according to the first diffusion coefficient on the original hyperspectral data cube, and the internal pixel regions are diffused according to the second diffusion coefficient. The pixel positions of each band update result are aligned and the cube is reassembled according to the original band order to form a three-dimensional high-fidelity hyperspectral data cube.

3. The method for identifying red tide algae based on hyperspectral images according to claim 1, characterized in that, The steps for obtaining the absorption depth curve are as follows: Based on the three-dimensional high-fidelity hyperspectral data cube, the spectral reflectance curve is extracted pixel by pixel in band order, abnormal bands are excluded and missing band points are filled in to obtain the pixel spectral reflectance curve. Based on the pixel spectral reflectance curve, the endpoints and local maxima are selected to form a support point sequence. The convex hull of the spectral reflectance curve is constructed and a continuous spectrum background baseline is generated by linear connection. The vertical difference between the original pixel spectral reflectance curve and the continuous spectrum background baseline is calculated band by band to obtain the absorption depth curve.

4. The method for identifying red tide algae based on hyperspectral images according to claim 1, characterized in that, The steps for obtaining the spectral distortion rating map are as follows: Based on the absorption depth curve, a spectral distortion score map is calculated and obtained.

5. The method for identifying red tide algae based on hyperspectral images according to claim 1, characterized in that, The steps for obtaining the pixel spectral feature sensitivity quantification value are as follows: Based on the spectral distortion score, the characteristic absorption band ranges of chlorophyll and phycobilins are set, the band index boundaries are retrieved and the positions of the covered absorption peaks are verified, the upper and lower bound indices are locked as fixed intervals, and the characteristic absorption band ranges of chlorophyll and phycobilins are generated. Based on the chlorophyll characteristic absorption band range and the phycobilin characteristic absorption band range, the spectral absorption depth values ​​of the three-dimensional high-fidelity hyperspectral data cube in the corresponding band range are called. Invalid spectral absorption depth values ​​are removed pixel by pixel and gaps are interpolated according to adjacent bands. The values ​​are accumulated in the two band ranges respectively to generate a quantified value of the pixel spectral feature sensitivity.

6. The method for identifying red tide algae based on hyperspectral images according to claim 1, characterized in that, The steps for obtaining the weighted response map of algal pigments are as follows: Based on the quantified values ​​of the pixel spectral features, the weighted response map of algal pigments is calculated and obtained.

7. The method for identifying red tide algae based on hyperspectral images according to claim 1, characterized in that, The steps for obtaining the initial set of recognized pixels are as follows: Based on the weighted response map of algal pigments, the pixel value distribution is statistically analyzed and a uniform resolution histogram is generated. The minimum valley of the histogram is located and a candidate threshold sequence is constructed. The number of connected components, the proportion of isolated pixels and the boundary break ratio are calculated for each candidate threshold. The candidate threshold that simultaneously satisfies the condition of stable number of connected components and minimum proportion of isolated pixels and boundary break ratio is selected to obtain the pixel recognition judgment threshold. Based on the pixel recognition threshold, the weighted response map of algal pigments is numerically compared pixel by pixel to generate a binary identifier map. The number of adjacent pixels of each foreground pixel is counted according to the spatial adjacency table, and foreground pixels whose number of adjacent pixels is lower than the lower limit of the adjacency number variable are removed. Foreground pixels that are in contact with each other or are one pixel apart are merged according to the spatial adjacency table to form an initial set of recognized pixels.

8. The method for identifying red tide algae based on hyperspectral images according to claim 1, characterized in that, The steps for obtaining the spatial distribution zoning of red tide algae are as follows: Based on the initial set of identified pixels, pixel-by-pixel boundary tracking is performed along the outer edge of each connected region, and the nearest boundary point pairs are connected at the boundary closure gaps. Background holes completely surrounded by the foreground are filled, and neighboring connected regions with boundary spacing less than the minimum gap width variable are merged and connected regions with the number of pixels less than the lower limit variable are removed to form a spatial distribution zoning of red tide algae.

Citation Information

Cited By

  • Hyperspectral image-based desulfurization strain activity parameter intelligent detection method and system

    CN121982553A

  • Intelligent detection method and system for desulfurization strain activity parameters based on hyperspectral image

    CN121982553B