Water area unmanned aerial vehicle hyperspectral image flare processing method, device and storage medium
By processing shadows and flares in UAV hyperspectral water images using a method of neighborhood linear correction of shadow contours and flare gain estimation, the accuracy problem of water quality parameter monitoring is solved, and high-precision water quality parameter inversion is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- POWERCHINA ZHONGNAN ENG
- Filing Date
- 2022-12-29
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to effectively handle shadows and flares in UAV hyperspectral water images, affecting the accuracy of water quality parameter monitoring.
The shadow region is processed by a neighborhood linear correction method based on the shadow contour line, and the flare region is recovered by the flare gain estimation method. The correction and recovery are performed by utilizing the relationship between the red, green, blue and near-infrared bands of the hyperspectral image.
It improves the accuracy and monitoring capabilities of water quality parameter inversion results, effectively removes the effects of shadows and flares, and maintains the integrity of spectral characteristics.
Smart Images

Figure CN116245751B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to shadow and flare processing technology for hyperspectral water images from unmanned aerial vehicles (UAVs), and in particular to a method, device, and storage medium for processing flare in hyperspectral images of water UAVs. Background Technology
[0002] Water pollution is becoming increasingly serious, and cities, with their numerous rivers, intricate water networks, and fragile ecosystems, are high-risk areas for urban water pollution. Current water environment risk monitoring mainly relies on manual sampling using chemical reagents and online monitoring with fixed-point equipment. Traditional water quality sampling and testing methods are costly, and monitoring equipment suffers from drawbacks such as immobility, slow response, small coverage area, large blind spots, high labor costs, and difficulty in quickly and effectively handling sudden water environment problems. With technological advancements, remote sensing technology, due to its non-contact and global monitoring advantages, can supplement existing monitoring methods and enhance the monitoring capabilities of the urban environment. However, the spatiotemporal resolution limitations of existing satellite remote sensing detectors restrict their monitoring to large water bodies, failing to meet the water quality monitoring needs of small and medium-sized urban rivers. Unmanned aerial vehicle (UAV) remote sensing technology offers advantages such as mobility, low cost, ease of operation, rapid response, and high spatiotemporal resolution. Even under complex weather conditions (such as cloudy or foggy weather), it avoids cloud cover issues and can ignore the influence of the atmosphere and clouds at a certain altitude (<1km). The emergence of UAV remote sensing technology enables real-time and rapid monitoring of water pollution and other conditions. It allows for rapid aerial photography and inspection of monitoring targets, comprehensive information collection across a wide area, and real-time transmission of on-site information. This monitoring of potential hazards provides data for water resource surveys, timely understanding of hydrological conditions, and offers new opportunities and approaches for water quality monitoring and evaluation. Intelligent sensing systems integrating high-definition cameras and hyperspectral cameras, using UAVs as carriers, can conduct rapid, wide-area, and high-frequency aerial photography of key projects and areas. This enables rapid perception, identification, and precise location of polluted water bodies, pollution types, and discharge outlets, solving problems such as large blind spots and insufficient spatiotemporal representativeness in traditional point-based monitoring.
[0003] UAV hyperspectral images offer high spatial and spectral resolution, providing clear image details and playing a crucial role in the surface monitoring of water quality parameters. The accuracy of water quality parameters is directly influenced by the authenticity of the hyperspectral data used to retrieve key water quality parameters. To ensure sufficient water surface reflection light is received by the hyperspectral imager, hyperspectral UAVs must operate under abundant sunlight. They are more likely to receive light sources such as direct sunlight causing specular reflections from the water surface, light reflected from nearby tall glass buildings, and water ripples. These factors can cause flare phenomena in the images. Furthermore, surrounding environmental features such as mountains, tall buildings, and fences can cast shadows on the water surface. Therefore, shadows and flares are unavoidable on the water surface, significantly interfering with image quality and water quality parameter monitoring. Thus, it is necessary to employ methods to process water surface shadows and flares, restoring the true spectral information of the water body, and using the constructed hyperspectral water quality parameter retrieval model to detect the water quality parameters of the study area.
[0004] CN114355367A provides a method for measuring shallow seawater depth based on spaceborne single-photon lidar data. It employs a linear regression model to establish the correspondence between the visible light band and the near-infrared band, thereby eliminating flare components in visible light images. However, this scheme does not provide a specific implementation process for removing flare components and cannot recover small flare areas. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method, device and storage medium for processing hyperspectral images of water bodies by UAVs, which addresses the shortcomings of the existing technology, restores the true reflection information of the water body and avoids the impact of flare phenomena on the identification of hyperspectral water quality parameters.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for processing hyperspectral image flares from a water-based unmanned aerial vehicle (UAV), the method comprising the following steps:
[0007] S1. Select the reflectance images of the red, green and blue bands in the hyperspectral image and calculate the non-reflective images of the three bands.
[0008] S2. Correct the non-reflective image and obtain the bright pixels in the corrected non-reflective image. All bright pixels constitute a bright area.
[0009] S3. Establish the mapping relationship between information of each band and information of the near-infrared band using regression analysis, and correct the bright area;
[0010] S4. Using information from the infrared band, remove the corrected bright areas from the hyperspectral image to obtain the image after flare recovery processing.
[0011] This invention addresses the issue of flare phenomena in hyperspectral images caused by specular reflections from direct sunlight, reflections from nearby tall glass buildings, and water ripples, which severely impact the imaging quality of hyperspectral images. It proposes a flare recovery method based on flare gain estimation, which can effectively recover small flare areas while maintaining spectral characteristics, thereby improving the scope and intensity of water quality monitoring.
[0012] Furthermore, prior to step S1 of the present invention, the method further includes:
[0013] 1) Acquire the original hyperspectral image and extract a complete binary image of the water body, including the shaded areas;
[0014] 2) Cut the complete binary image of the water body and extract the binary image of the shaded area of the water surface;
[0015] 3) Perform multiple dilation processes on the binary image of the water surface shadow area to obtain a binary image of the outer neighborhood containing the shadow coverage area; perform edge extraction on the binary image of the outer neighborhood containing the shadow coverage area to obtain the outline of the outer neighborhood of the water body shadow coverage area;
[0016] The binary image of the water surface shadow area is subjected to multiple erosion processes to obtain the internal neighborhood binary image within the shadow coverage area; edge extraction is performed on the internal neighborhood binary image within the shadow coverage area to obtain the outline of the internal neighborhood within the water body shadow coverage area;
[0017] 4) Calculate the slope a and intercept b of the linear correction formula according to the following formulas:
[0018]
[0019] Where, μ y k and σ y k μ represents the mean and standard deviation of the contour of the outer neighborhood of the shaded area, respectively. y k and σ y k These represent the mean and standard deviation of the contour of the neighborhood within the shaded area, respectively.
[0020] 5) Substitute the slope a and intercept b into the formula I′(i,j)=a * I(i,j)+b performs spectral correction on the entire hyperspectral image, completing the spectral correction process for the shadowed area; where I(i,j) and I'(i,j) are the water surface pixels that need to be shadow corrected and the water surface pixels after shadow correction, respectively.
[0021] This invention addresses the problem of unknown information in shadowed areas, making it impossible to monitor the water quality in these areas. It employs a shadow correction method based on neighborhood linear correction of the shadow contour line. By transferring the relationship between the visible light and near-infrared reflectance of the normal water body in the neighborhood, the shadow compensation amount of the water body in the shadowed area is calculated. The shadow area correction is completed by eliminating the area boundary through spatial filtering, thereby improving the accuracy of water quality parameter inversion results.
[0022] In this invention, in order to further improve the accuracy of shadow region correction and thus improve the accuracy of flare recovery, after step 5), the method further includes: performing spatial smoothing processing on the negatively corrected image to obtain a preprocessed hyperspectral image.
[0023] Therefore, step S1 is replaced with:
[0024] The reflectance images of the red, green, and blue bands in the preprocessed hyperspectral image were selected, and the specular reflection images of the three bands were calculated.
[0025] In step S2, the corrected specular-free image MSF i The calculation formula is: SF i =I i (p,q)-min(I r (p,q),I g (p,q),I b (p,q)); where I i (p,q) represents the reflectance image of the i-th visible light band, I r (p,q) represents the reflectance image in the red light band, I g (p,q) represents the reflectance image in the green light band, I b (p,q) represents the reflectance image of the blue light band, where (p,q) represents the position of the image pixel. This represents the average of the minimum values of the reflectance images for the red, green, and blue bands.
[0026] The specific implementation process of step S3 includes:
[0027] The image of the flare region can be obtained using the following formula:
[0028]
[0029] Where H(p,q) being 1 indicates that the identified pixel is a flare region; D i (p,q)=I i (p,q)-MSF i (p,q);
[0030] Using the brightness of the near-infrared band as the X-axis and the brightness of each visible light band as the Y-axis, linear regression is performed on all pixels in each visible light band. The linear regression equation for each visible light band is calculated, and the slope of the linear regression equation is obtained. The difference between the near-infrared band pixel brightness value and the minimum near-infrared band pixel brightness value in the water study area is the value that the corresponding pixel in the visible light band needs to be corrected.
[0031] ′
[0032] In step S4 of this invention, the calculation formula for the image after flare recovery processing is R. i =R i -b i (R NIR -
[0033] ′
[0034] MinNIR; where R i R is the brightness of the i-th visible band after solar flare recovery processing; NIR It is the near-infrared pixel brightness value, Min. NIR It is the smallest pixel brightness value in the near-infrared band in the water body study area, b i R is the slope of the linear regression equation for the i-th visible band; i It is the brightness of the i-th visible band before solar flare recovery processing.
[0035] As an inventive concept, the present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the steps of the method described above.
[0036] As an inventive concept, the present invention also provides a computer-readable storage medium having a computer program / instructions stored thereon; when the computer program / instructions are executed by a processor, they implement the steps of the method described above.
[0037] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0038] 1. This invention addresses the problem of unknown information in shadowed areas, making it impossible to monitor the water quality environment in these areas. It adopts a shadow correction method based on neighborhood linear correction of shadow contour lines. The method uses the relationship between visible light and near-infrared reflectance of normal water bodies in the neighborhood to calculate the shadow compensation amount of water bodies in the shadowed area. The shadow area correction is completed by eliminating the area boundary through spatial filtering, thereby improving the accuracy of water quality parameter inversion results.
[0039] 2. This invention addresses the severe flare phenomenon left by specular reflection and water surface ripples on hyperspectral images by employing a water surface flare recovery method based on flare gain estimation. This method can effectively recover small flare areas while preserving spectral characteristics relatively completely, thereby improving the intensity and scope of water quality monitoring. Attached Figure Description
[0040] Figure 1 This is the original hyperspectral image;
[0041] Figure 2 This is a refined binary map of the complete water body region according to an embodiment of the present invention;
[0042] Figure 3 This is a schematic diagram of the neighborhood inside and outside the outline of the shaded area in an embodiment of the present invention;
[0043] Figure 4 This is the original shadow overlay image of an embodiment of the present invention;
[0044] Figure 5 This is a hyperspectral image of water after shadow correction, according to an embodiment of the present invention.
[0045] Figure 6 Original flare image;
[0046] Figure 7 This is a hyperspectral image of water after flare repair according to an embodiment of the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] In this document, the terms "first," "second," and other similar words are not intended to imply any order, quantity, or importance, but are merely used to distinguish different elements. The terms "one," "a," and other similar words are not intended to indicate the existence of only one of the stated things, but rather that the description pertains to only one of the two stated things, which may include one or more. The terms "comprising," "including," and other similar words are intended to indicate a logical relationship, not a spatial relationship. For example, "A includes B" means that logically B belongs to A, not that spatially B is located inside A. Furthermore, the meanings of the terms "comprising," "including," and other similar words should be considered open-ended, not closed. For example, "A includes B" means that B belongs to A, but B does not necessarily constitute all of A; A may also include other elements such as C, D, and E.
[0049] This invention fully utilizes the spectral characteristics of water bodies and proposes a method for linearly correcting water surface shadows through neighborhood correlation. The shadowed and unshadowed areas on both sides of the water body shadow boundary belong to the same land cover type, exhibiting statistical similarity in spectral characteristics. Therefore, morphological operations are used to extract the contour lines within and outside the shadowed area, selecting the water surface areas within the shadowed area and the neighboring unshadowed area. Linear correlation is then used to correct the shadowed area. The method for linearly correcting water surface shadows through neighborhood correlation can be divided into three parts: water surface shadow area extraction, reference band conversion and conversion coefficient calculation, and shadow area compensation. The specific process is as follows:
[0050] Original hyperspectral images such as Figure 1 As shown, before correcting the shadow area, it is necessary to extract the water body and the water surface shadow. Since the reflectance of the water surface shadow area is severely attenuated in the green light band, the Normalized Difference Water Index (NDVI) cannot be used to extract the water body in the shadow-covered area. Based on the spectral characteristics of the water body, the reflectance of the water body in the shadow-covered area has a peak in the red light band. Therefore, this embodiment calculates the NDVI index, combines it with threshold extraction, retains areas with an NDVI index less than zero for pore filling, and optimizes the boundary part of the result using morphological filtering to obtain a refined binary image of the complete water body including the shadow-covered area, as shown. Figure 2 As shown.
[0051]
[0052] Where R RED R is the reflectivity in the red light band. NIR This refers to the reflectivity in the near-infrared band.
[0053] In this embodiment, after extracting the complete water body region, the Sobel edge detection method (Gao W, Zhang X, Yang L, et al. An improved Sobel edge detection [C] / / 2010 3rd International conference on computer science and information technology. IEEE, 2010, 5: 67-71.) is used to extract the edge lines inside the water body, based on the obvious brightness difference between the boundary between the shadowed area and the unshadowed area. Combined with the curve closure algorithm (Akima HA new method of interpolation and smoothcurve fitting based on local procedures [J]. Journal of the ACM (JACM), 1970, 17(4): 589-602.), the binary image extraction of the shadowed area of the water body is realized. In this embodiment, the Sobel operator is used to operate on the image to obtain the binary image of the edge lines. Based on a piecewise function composed of a set of polynomials, and applicable to continuous intervals of given points, the fitted closed edge lines are obtained.
[0054] Several discrete edge lines are obtained based on the Sobel detection operator. For each pair of adjacent edge lines, interpolation is performed using the following method: An image pixel coordinate system is obtained with the top-left corner as the origin, downwards as the y-axis, and to the right as the x-axis. The coordinates of the two nearest endpoints of the two adjacent edge lines, A1(x1,y1) and A2(x2,y2), are recorded.
[0055] The slope of the edge line at point A1 is t1, and the slope of the edge line at point A2 is t2.
[0056] The curve fitting formula for the interval x1 to x2 is:
[0057] y=p0+p1(x-x1)+p2(x-x1)2+p3(x-x1)3;
[0058] Where p0 = y1, p1 = t1,
[0059] p2=[3(y2-y1) / (x2-x1)-2t1-t2] / (x2-x1);
[0060] p3=[t1+t2-2(y2-y1) / (x2-x1)] / (x2-x1)2.
[0061] By performing multiple dilation processes on the binary image of the shadow-covered area, a binary image of the outer neighborhood containing the shadow-covered area is obtained. The outer water body neighborhood is unobstructed by shadows, reflecting the true spectral information. Edge extraction is then performed to obtain the contour line of the outer neighborhood of the water body shadow-covered area.
[0062] By performing multiple erosion processes on the binary image of the shadow-covered area, a binary image of the internal neighborhood within the shadow-covered area is obtained. The internal water body neighborhood is obscured by the shadow and cannot reflect the true spectral information of the water body. Edge extraction is then performed to obtain the contour line of the internal neighborhood within the shadow-covered area of the water body.
[0063] In this embodiment, the inner and outer contour lines of the water body shadow range neighborhood are obtained as follows: Figure 3 As shown, based on the spectral characteristics of a linear correlation between the shaded and unshaded areas of the water surface, namely:
[0064] I′(i,j)=a * I(i,j)+b;
[0065] Where I(i,j) and I'(i,j) are the water surface pixels that need shadow correction and the water surface pixels after shadow correction, respectively. The mean and standard deviation of the reflectance of each band of the outer neighborhood contour and the inner contour of the shadow range are calculated according to the following formula, yielding the slope a and intercept b of the linear correction formula:
[0066]
[0067] b = μ yk -a·μ sk ;
[0068] Where, μ yk and σ yk μ represents the mean and standard deviation of the contour of the neighborhood outside the shaded area. yk and σ yk The mean and standard deviation of the contour of the neighborhood within the shaded area.
[0069] Substituting the slopes a and b into the linear dependence formula (I′(i,j)=a) * I(i,j)+b) is used to correct the entire hyperspectral image, completing the spectral correction process for the shadowed areas.
[0070] By using statistical information from the water surface shadowed areas and the non-shadowed areas, regression analysis was performed to obtain the slope and intercept in the linear relationship. However, methods for shadow correction may result in insufficient coherence between neighboring areas after shadow restoration. Therefore, to eliminate the lack of smoothness at region boundaries, SG filtering was used for spatial smoothing to obtain the shadow-corrected image, as shown below. Figure 4 and Figure 5 As shown.
[0071] This embodiment addresses the flare phenomenon in hyperspectral images caused by specular reflection from direct sunlight, reflection from nearby high-rise glass buildings, and water ripples, which severely affect the imaging quality of hyperspectral images. A flare recovery algorithm based on flare gain estimation is proposed. The specific process can be divided into three parts: water flare detection, establishing the correlation between near-infrared and visible light bands of water bodies through regression analysis, and band-by-band correction of the water flare region in the hyperspectral image.
[0072] 1. Flares typically correspond to bright areas, therefore, flare areas in water body images can be detected by identifying bright areas. Reflectance images of the red (650nm), green (550nm), and blue (450nm) bands are selected, and the specular-free reflection images of the three visible light bands are calculated using the following formula.
[0073] SF i =I i (p,q)-min(I r (p,q),I g (p,q),I b (p,q));
[0074] The corrected non-reflective image is calculated using the following formula:
[0075]
[0076] Among them, I i (p,q) represents the reflectance image in the visible light band, where (p,q) represents the position of the image pixel. min This represents the average of the minimum values of the reflectance images for the red, green, and blue band channels.
[0077] The difference between the original visible light band reflectance image and the corrected specular-free reflectance image MSFZ is calculated using the following formula.
[0078] D i (p,q)=I i (p,q)-MSF i (p,q);
[0079] 2. Based on the difference threshold, determine whether the pixels in the hyperspectral image of the water body obtained in step 1 of the shadow extraction are bright pixels, and obtain the binary image of the flare bright area by the color separation method.
[0080]
[0081] 3. Water irradiance in the near-infrared band is almost zero; the non-zero portion can be considered as the gain of solar flares. Therefore, the flare gain of each pixel can be obtained using the reflectance image in the near-infrared band. Regression analysis is used to establish the mapping relationship between information from each band and the near-infrared band information, thus correcting the flare region. Using the brightness of the near-infrared band as the X-axis and the brightness of each visible light band as the Y-axis, linear regression is performed on all pixels in each visible light band, and the linear regression equation is calculated to obtain the slope b of the linear regression equation for the i-th visible light band. i .
[0082] 4. Using information from the near-infrared band, the solar flare portion of the spectral signal is removed from various visible light bands to eliminate the flare effect. The flare-restored image is then obtained according to the flare removal formula, such as... Figure 6 and Figure 7 As shown.
[0083] ′
[0084] R i =R i -b i (R NIR -Min NIR );
[0085] ′
[0086] Among them, R i It is the brightness after solar flare recovery processing of band i; R NIR It is the near-infrared pixel brightness value, Min. NIR It represents the minimum pixel brightness value in the near-infrared band within the water study area, indicating a pixel brightness value without solar flares.
[0087] After the above processing, the final hyperspectral image of the water body in the study area after shadow correction and flare recovery is obtained, which reflects the true spectral information of the water surface.
[0088] Example 2
[0089] Embodiment 2 of the present invention provides a terminal device corresponding to Embodiment 1 above. The terminal device can be a processing device for a client, such as a mobile phone, a laptop, a tablet computer, a desktop computer, etc., to execute the method of the above embodiments.
[0090] The terminal device in this embodiment includes a memory, a processor, and a computer program stored in the memory; the processor executes the computer program in the memory to implement the steps of the method in Embodiment 1 described above.
[0091] In some implementations, the memory may be high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage device.
[0092] In other implementations, the processor can be any type of general-purpose processor, such as a central processing unit (CPU) or a digital signal processor (DSP), and there is no limitation here.
[0093] Example 3
[0094] Embodiment 3 of the present invention provides a computer-readable storage medium corresponding to Embodiment 1 above, on which a computer program / instructions are stored. When the computer program / instructions are executed by a processor, they implement the steps of the method of Embodiment 1 above.
[0095] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof.
[0096] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0097] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0098] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0099] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0100] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for processing flare spots in hyperspectral images of aquatic unmanned aerial vehicles (UAVs), characterized in that, The method includes the following steps: S1. Select the reflectance images of the red, green and blue bands in the hyperspectral image and calculate the non-reflective images of the three bands. S2. Correct the non-reflective image, and obtain the bright pixels in the corrected non-reflective image, where all bright pixels constitute a bright area; the corrected non-reflective image The calculation formula is: ; ;in, This represents the reflectance image of the i-th visible light band. A reflectance image representing the red light band. A reflectance image representing the green light band. A reflectance image representing the blue light band. Indicates the position of the image pixel. This represents the average of the minimum values of the reflectance images for the red, green, and blue bands. Images of the three visible light bands without specular reflection; S3. Establish the mapping relationship between information of each band and information of the near-infrared band using regression analysis, and correct the bright area; S4. Using information from the infrared band, remove the corrected bright areas from the hyperspectral image to obtain the image after flare recovery processing. in: The specific implementation process of step S3 includes: The image of the flare region can be obtained using the following formula: ; in, A value of 1 indicates that the identified pixel is from the flare region; ; Using the near-infrared band brightness as the X-axis and the brightness of each visible light band as the Y-axis, a linear regression is performed on all pixels in each visible light band. The linear regression equation for each visible light band is calculated, and the slope of the linear regression equation is obtained. This slope, multiplied by the difference between the near-infrared band pixel brightness value and the minimum near-infrared band pixel brightness value in the water study area, gives the value that the corresponding pixel in the visible light band needs to be corrected. The original reflectance image in the visible light band and the corrected image without specular reflection. The difference between them; In step S4, the formula for calculating the image after flare restoration is as follows: ;in, It is the brightness of the i-th visible band after solar flare recovery processing; It is the pixel brightness value in the near-infrared band. It is the smallest pixel brightness value in the near-infrared band in the water body research area. Let be the slope of the linear regression equation for the i-th visible band. It is the brightness of the i-th visible band before solar flare recovery processing.
2. The method for processing hyperspectral image flares from aquatic unmanned aerial vehicles according to claim 1, characterized in that, Before step S1, the following are also included: 1) Acquire the original hyperspectral image and extract a complete binary image of the water body, including the shaded areas; 2) Cut the complete binary image of the water body and extract the binary image of the shaded area on the water surface; 3) Perform multiple dilation processes on the binary image of the water surface shadow area to obtain a binary image of the outer neighborhood containing the shadow coverage area; perform edge extraction on the binary image of the outer neighborhood containing the shadow coverage area to obtain the outline of the outer neighborhood of the water body shadow coverage area. The binary image of the water surface shadow area is subjected to multiple erosion processes to obtain the internal neighborhood binary image within the shadow coverage area; edge extraction is performed on the internal neighborhood binary image within the shadow coverage area to obtain the outline of the internal neighborhood within the water body shadow coverage area; 4) Calculate the slope a and intercept b of the linear correction formula according to the following formulas: ; ; in, and Let represent the mean and standard deviation of the contour of the neighborhood outside the shaded area, respectively. and These represent the mean and standard deviation of the contour of the neighborhood within the shaded area, respectively. 5) Substitute the slope a and intercept b into the formula The hyperspectral image is corrected across the entire spectral band, completing the spectral correction process for the shadowed areas; among which, and These are the water surface pixels that need shadow correction and the water surface pixels after shadow correction, respectively.
3. The method for processing hyperspectral image flares from aquatic unmanned aerial vehicles according to claim 2, characterized in that, After step 5), the process also includes: spatial smoothing the negatively corrected image to obtain a preprocessed hyperspectral image; Therefore, step S1 is replaced with: The reflectance images of the red, green, and blue bands in the preprocessed hyperspectral image were selected, and the specular reflection images of the three bands were calculated.
4. A terminal device, comprising a memory, a processor, and a computer program stored in the memory; characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 3.
5. A computer-readable storage medium having a computer program / instructions stored thereon; characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 3.