Hyperspectral image defogging method
By decomposing the hyperspectral image into a single-band image and processing it using the atmospheric scattering model, combining spectrum characteristic segmentation and mixed cell decomposition, the problem of poor defog removal effect of hyperspectral images is solved, and a higher precision and efficiency defog removal effect is achieved.
Patent Information
- Application Number
- CN202510736091.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-04
AI Technical Summary
The existing hyperspectral image defogging methods have problems such as poor defogging effect, poor spectral fidelity, and insufficient adaptability to complex scenes.
The hyperspectral image is decomposed into single-band images, and the single-band low-frequency image is processed using the atmospheric scattering model. Through spectral characteristic segmentation and mixed cell decomposition, the influence of mist is accurately removed.
The accuracy of defog removal is improved, the main structure and contour information of the image is retained, the calculation amount is reduced, and the application value of hyperspectral images after defog removal is enhanced.
Smart Images

Figure CN120278918A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing. In particular, it relates to a method for removing fog from hyperspectral images. Background Art
[0002] A hyperspectral image is image data obtained by an imaging spectrometer over a continuous range of dozens or even hundreds of narrow bands. Each pixel point contains not only spatial information but also the reflectance or radiation intensity information of that pixel point at different wavelengths, forming a complete spectral curve.
[0003] Fog in hyperspectral images usually refers to the degradation of images caused by atmospheric scattering such as mist and haze, manifested as problems such as decreased contrast and spectral distortion. Methods for removing fog from hyperspectral images are usually applied in fields such as satellite remote sensing, environmental monitoring, military reconnaissance, agricultural monitoring, and disaster warning. However, hyperspectral images have many bands and large amounts of data; the noise in each band is complex, and the spatial and spectral distributions of fog are uneven, making it extremely difficult to remove fog. As a result, there are pain points in the practical application of hyperspectral image fog removal technology, such as low fog removal accuracy, poor spectral fidelity, and insufficient adaptability to complex scenes.
[0004] In the prior art, to effectively remove haze interference in hyperspectral images, traditional methods driven by physical models, mixed pixel decomposition techniques, etc. are usually adopted. The physical model-driven method has poor adaptability in complex scenes and is difficult to accurately separate the spectral information of the fog layer and the ground object. The mixed pixel decomposition technique is based on the spectral mixture model and can directly calculate the endmember abundance from the mixed spectrum disturbed by haze, realizing the mathematical separation of the fog layer and the ground object spectrum and avoiding the strong dependence of traditional methods on physical parameters. However, the mixed pixel decomposition technique usually processes directly in the spatial domain and is vulnerable to high-frequency noise interference. Therefore, the accuracy of endmember extraction is limited, further resulting in poor fog removal effect for hyperspectral images.
[0005] Thus, it can be seen that the existing methods for removing fog from hyperspectral images still have the problem of poor fog removal effect. Summary of the Invention
[0006] To solve the technical problem of poor defogging effect of the above-mentioned hyperspectral image defogging method, the present invention provides a method, which includes: collecting a hyperspectral image and decomposing it into multiple single-band images; for any one of the single-band images, segmenting to obtain the low-frequency image of the single-band, including: converting the single-band image from the spatial domain to the frequency domain to obtain the spectrum amplitude spectrum of the single-band; the spectrum amplitude spectrum shows the amplitude spectrum of the spectrum; performing centering processing on the spectrum amplitude spectrum to obtain the center of the spectrum amplitude spectrum, obtaining at least two annular regions in the spectrum amplitude spectrum, calculating the energy gradient between the two annular regions, and determining the segmentation threshold according to the energy gradient; segmenting the single-band image based on the segmentation threshold to obtain the low-frequency image of the single-band; the center point of the annular region is the center of the spectrum amplitude spectrum; processing the low-frequency image of the single-band using an atmospheric scattering model to obtain the defogged image of the single-band; combining the defogged images of the multiple single-bands to obtain the defogged hyperspectral image.
[0007] By decomposing the hyperspectral image into single-band images, processing each single-band image, and using the atmospheric scattering model to process the low-frequency image of the single-band, the influence of fog on the image can be removed more accurately. In the process of segmenting the single-band image to obtain the low-frequency image, first convert the image from the spatial domain to the frequency domain to obtain the spectrum amplitude spectrum and perform centering processing. By calculating the energy gradient between the annular regions to determine the segmentation threshold, this segmentation method based on spectral characteristics can make full use of the spectral information of the image. The low-frequency image contains the main structure and contour information of the image, removes high-frequency noise and details, retains the information more valuable for defogging processing, helps to perform defogging operations more accurately, and at the same time reduces unnecessary computational complexity.
[0008] As a further improvement of the method of the present invention, the calculating the energy gradient between the two annular regions includes: calculating the energy of the two annular regions respectively; calculating the energy gradient between the two annular regions ; where is the energy of the annular region in the spectrum amplitude spectrum with the inner circle radius of and the outer circle radius of , is the energy of the annular region in the spectrum amplitude spectrum with the inner circle radius of and the outer circle radius of , is the distance between the inner circle and the outer circle of the annular region, is the step size during the calculation of the energy gradient.
[0009] By calculating the energies of two circular regions separately and then calculating the energy gradient between them, the energy change between different regions in the spectrogram can be accurately reflected. The accurate calculation of the energy gradient provides a reliable basis for determining the segmentation threshold. In the process of segmenting a single-band image to obtain a low-frequency image, the reasonable determination of the segmentation threshold is crucial. By using the energy gradient to determine the threshold, the segmentation result can better conform to the spectral characteristics of the image.
[0010] As a further improvement of the method of the present invention, the energy of the circular region satisfies the relational expression: ; where is the complex spectral value of the frequency point in the spectrogram in polar coordinates , is the amplitude spectral value of the frequency point in the spectrogram in polar coordinates , is the polar angle of the frequency point in the polar coordinate system of the spectrogram, is the operation of taking the modulus of the complex spectrum.
[0011] Calculating the energy of the circular region based on polar coordinates and amplitude spectral values can more effectively reflect the characteristics of the spectrum. The polar coordinate system can clearly locate the position of the frequency point in the spectrogram. Combining with the amplitude spectral value, it can comprehensively describe the spatial distribution and energy distribution of the spectrum. In the spectral analysis of hyperspectral images, different ground objects or image features may exhibit specific energy distribution patterns in different regions of the spectrum. Through this precise energy calculation method, these features can be better identified and analyzed, such as distinguishing the spectral energy features corresponding to different structures such as edges and textures in the image.
[0012] As a further improvement of the method of the present invention, the determining the segmentation threshold according to the energy gradient includes: obtaining the outer circle radius of the circular region where the energy gradient is the largest, and the segmentation threshold is the outer circle radius.
[0013] As a further improvement of the method of the present invention, the segmenting the single-band image based on the segmentation threshold to obtain the low-frequency image of the single band includes: marking the frequency components with a radius smaller than the segmentation threshold in the spectrogram as low-frequency components, and marking the remaining frequency components as high-frequency components; setting the complex values of the frequency points of the high-frequency components to zero to obtain a low-frequency spectrum; and converting the low-frequency spectrum from the frequency domain to the spatial domain to obtain the low-frequency image of the single band.
[0014] As another improvement of the method of the present invention, the atmospheric scattering model includes the calculation of the transmittance, and the calculation of the transmittance includes: performing mixed pixel decomposition on the low-frequency image to obtain the abundance coefficient corresponding to the pixel in the low-frequency image; establishing a linear mapping relationship between the abundance coefficient of the pixel and the initial transmittance value, and calculating the initial transmittance value of the pixel based on the mapping relationship; processing the initial transmittance value based on the dark channel prior method to obtain the target transmittance.
[0015] As yet another improvement of the method of the present invention, the performing mixed pixel decomposition on the low-frequency image includes: extracting endmembers of the fog layer and spectral endmembers from the single-band low-frequency image, and constructing a fog layer endmember spectral matrix and a ground object endmember spectral matrix ; for each pixel in the low-frequency image, applying the thin fog mixed pixel model, i.e., ; where, is the spectral value of pixel in the low-frequency image, is the value of pixel in the fog layer endmember spectral matrix, is the abundance coefficient of pixel , is the value of pixel in the ground object endmember spectral matrix; defining an objective function, determining constraint conditions, and solving the objective function to obtain the abundance coefficient when the constraint conditions are satisfied.
[0016] In the thin fog mixed pixel model, the different contributions of the fog layer endmember and the ground object endmember to the pixel spectral value are considered. By defining the objective function and constraint conditions and using an optimization algorithm to solve the abundance coefficient, the relative proportion of fog and ground objects in each pixel can be calculated more accurately. This makes the restored ground object spectral value closer to the real situation, improves the accuracy of spectral information, and provides a more reliable data basis for subsequent analyses based on spectral information, such as material composition identification and ground object classification.
[0017] As yet another improvement of the method of the present invention, the objective function is ; where, is the minimization of error, is the coordinate of the pixel in the low-frequency image, is all the pixels in the low-frequency image.
[0018] As yet another improvement of the method of the present invention, the establishing a linear mapping relationship between the abundance coefficient of the pixel and the initial transmittance value includes: the linear mapping relationship is where, is the pixel The initial transmittance value, is a preset adjustment factor, is the pixel abundance coefficient.
[0019] As another improvement of the method of the present invention, combining the multiple single-band dehazed images to obtain a dehazed hyperspectral image includes: stacking the multiple single-band dehazed images in the order of their corresponding spectral wavelengths to form a dehazed hyperspectral image, where each pixel corresponds to the same spatial position in all single bands.
[0020] By accurately restoring the hyperspectral data structure, ensuring the consistency of spatial information, and maintaining the continuity of spectral information, the application value of the dehazed hyperspectral image is ultimately enhanced.
[0021] Advantages of the present invention: In the present invention, by decomposing a hyperspectral image into single-band images and using an atmospheric scattering model to process the single-band low-frequency images, the fog interference is accurately removed. When obtaining the low-frequency image, the image is converted from the spatial domain to the frequency domain, centralized processing is performed based on the spectral amplitude spectrum, the segmentation threshold is determined by calculating the energy gradient between annular regions, the spectral information is fully utilized, the main structure and contour of the image are retained, and the high-frequency noise is removed, which not only improves the dehazing accuracy but also reduces the calculation amount. At the same time, the energy and energy gradient of the annular region are accurately calculated, providing a reliable basis for determining the segmentation threshold, making the segmentation result fit the spectral characteristics of the image, and ensuring the efficiency and accuracy of the fog removal process for hyperspectral images. Description of the Drawings
[0022] Figure 1 is a flowchart of a hyperspectral image dehazing method provided by an embodiment of the present invention; Figure 2 is a schematic diagram of spectral centering provided by an embodiment of the present invention; Figure 3 is a schematic diagram of dividing annular regions on a spectrogram provided by an embodiment of the present invention.
[0023] In the figure, 1, the first quadrant; 2, the second quadrant; 3, the third quadrant; 4, the fourth quadrant; 51, the center of the spectrogram; 52, the inner circle; 53, the outer circle. Detailed Embodiments
[0024] An embodiment of the present invention provides a hyperspectral image dehazing method, as Figure 1 shown, the method includes steps S100 - step S400: Step S100, collect a hyperspectral image and decompose it into multiple single-band images.
[0025] Specifically, there are mainly two ways to acquire and decompose hyperspectral images. One is acquisition and decomposition based on scanning, and the other is acquisition and decomposition based on snapshot.
[0026] In the scanning method, the sensor scans in the spatial or spectral dimension, acquiring spectral information of the ground surface at multiple consecutive narrow single bands row by row or point by point, and finally forming three-dimensional hyperspectral data containing all single bands. The corresponding decomposition for the scanning method is to read the stored hyperspectral data file, usually a three-dimensional array, and obtain each independent single-band image by extracting the two-dimensional slice of the third dimension of the data cube, i.e., the single-band dimension.
[0027] In the snapshot method, a specially designed sensor such as a filter array or a computational spectral imaging system is used to synchronously acquire image information of the entire field of view at multiple spectral single bands in a single exposure, generating raw data containing multi-single-band information. The corresponding decomposition for the snapshot method is to read the raw snapshot data, which usually requires a demultiplexing or reconstruction process to convert it into a standard three-dimensional hyperspectral data cube arranged by single bands, and then obtain each independent single-band image by extracting the two-dimensional slice of the third dimension, i.e., the single-band dimension.
[0028] Hyperspectral images usually contain a large amount of single-band data, which increases the difficulty of data processing and analysis. After decomposing it into single-band images, redundant information can be removed to achieve data dimensionality reduction. This can not only reduce the time and computing resources for data processing, but also improve the efficiency and accuracy of data analysis. For example, in face recognition applications, features of key single bands are extracted from numerous single-band images of hyperspectral images to construct a more effective recognition model.
[0029] Step S200: Segment the image of any single band to obtain the low-frequency image of the single band.
[0030] Specifically, during the process of removing fog from hyperspectral images, the noise differences among single bands are significant. For example, the noise in the short-wave infrared single band is high, while the noise in the visible light single band is low. The traditional fixed-threshold strategy cannot adapt to this difference, resulting in the loss of high-frequency ground object details or the residue of low-frequency fog layers. The specific manifestations are as follows: In single bands with high noise (such as short-wave infrared), the fixed threshold will mistakenly retain high-frequency noise as valid signals, resulting in blurred images; while in single bands with low noise (such as visible light), the fixed threshold over-suppresses high-frequency components, causing the loss of ground object textures. To solve this problem, the low-frequency image of each single band is obtained by segmenting the image of each single band. This process includes steps S210 - S250: Step S210: Convert the image of the single band from the spatial domain to the frequency domain to obtain the frequency spectrum diagram of the single band; the frequency spectrum diagram shows the amplitude spectrum of the frequency spectrum.
[0031] Specifically, for any single band, when the image of the single band is transformed from the spatial domain to the frequency domain, the obtained result is the spectrum of the image. The spectrum is usually visualized in the form of a spectrogram so that we can understand the frequency components of the image. The spectrogram usually shows the amplitude of the spectrum, and sometimes the phase spectrum is also shown. In the present invention, it is specified to show the amplitude spectrum.
[0032] In addition, the methods for transforming the image of the single band from the spatial domain to the frequency domain and having reversibility include Fourier transform, discrete cosine transform, and wavelet transform. One of them can be selected during actual use, and these methods are all prior arts, so no further description will be given here.
[0033] Step S220: Perform centering processing on the spectrogram to obtain the center of the spectrogram.
[0034] Specifically, after the image of the single band is transformed from the spatial domain to the frequency domain, in the uncentered spectrogram, the zero-frequency component is located in the upper left corner. To facilitate the observation and analysis of the frequency distribution of the spectrum, especially the low-frequency and high-frequency components. Usually, it is necessary to move the zero-frequency component in the spectrogram to the center position of the spectrogram.
[0035] As Figure 2 shown, the spectrogram contains four quadrants. The centering operation is to rearrange the four quadrants of the spectrum, swap the first quadrant 1 (including the zero-frequency component) in the upper left corner with the third quadrant 3 in the lower right corner, and swap the second quadrant 2 in the upper right corner with the fourth quadrant 4 in the lower left corner. After the centering operation, the center position of the spectrogram corresponds to the zero-frequency component, and the lower the frequency component, the closer it is to the center, and the higher the frequency component, the farther it is from the center.
[0036] Step S230: Obtain at least two annular regions in the spectrogram.
[0037] Specifically, after obtaining the center of the spectrogram, with it as the center, with radius as the inner circle and radius as the outer circle, the region between the two circles is the annular region, is the distance between the annular regions, which can be valued according to the actual situation, usually taking 1.
[0038] As Figure 3 shown, the background in the figure is the spectrogram, where the center point of the annular region is the center 51 of the spectrogram, the circle 52 is the inner circle of the smallest annular region, and the circle 53 is the outer circle of the smallest annular region.
[0039] It should be noted that the outer circle radius and the inner circle radius should be less than the maximum effective radius of the image: ; Among them, is the maximum effective radius, , are the length and width of the spectrogram, is the minimum value function.
[0040] Step S240: Calculate the energy gradient between two annular regions, and determine the segmentation threshold according to the energy gradient.
[0041] To elaborate, to calculate the energy gradient between two annular regions, it is first necessary to calculate the respective energies of the two annular regions separately. The energy calculation formula for any annular region is: ; where, is the complex spectral value of the frequency point in the spectrogram in polar coordinates , is the amplitude spectral value of the frequency point in the spectrogram in polar coordinates , is the polar angle of the frequency point in the polar coordinate system of the spectrogram, is the operation of taking the modulus of the complex spectrum.
[0042] It should be noted that , is the distance between the inner circle and the outer circle of an annular region.
[0043] In this formula, the sum of the squares of the amplitudes of all points in the annular region corresponding to each radius is calculated as the energy. In the frequency domain characteristics, the low-frequency region is characterized by a gentle change in energy, while the high-frequency region shows a significant fluctuation in energy. For this single band, if the energy in the annular region corresponding to the inner circle radius is relatively high, it means that this annular region is very likely to be in the high-frequency region, containing rich ground object detail information or noise; on the contrary, when the energy value of this annular region is low, it is probably in the low-frequency region corresponding to the fog layer and illumination, and the signal is more stable.
[0044] Secondly, calculate the energy gradient according to the energies of the above two annular regions: ; where is the energy of the annular region in the spectrogram with the inner circle radius and the outer circle radius , is the energy of the annular region in the spectrogram with the inner circle radius and the outer circle radius , is the distance between the inner circle and the outer circle of the annular region, is the step size during the energy gradient calculation.
[0045] In the actual processing process, not only the energy gradients of the two circular regions are calculated. Instead, it is necessary to traverse the inner circle radii from 0 to the maximum effective radius . When the calculated energy gradient is relatively low, it indicates that the energy difference between the two circular regions is not significant at this time. The higher the energy gradient, the more significant the energy transition in the frequency domain at this radius. Therefore, the position corresponding to the maximum energy gradient reflects the transition of energy from a stable state to a drastic change, which can be used as the demarcation point between the low-frequency (stable region) and high-frequency (noise region).
[0046] It should be noted that when calculating the energy gradient , specific selection and adjustment can be made according to the actual situation. Figure 3 What is given in is the circular region.
[0047] Finally, take the outer circle radius of the circular region corresponding to the maximum energy gradient as the gradient mutation radius in the spectrum of this single band, that is, the segmentation threshold between the high-frequency and low-frequency.
[0048] Specifically, an energy accumulation curve can be plotted, and by analyzing the gradient change of the energy accumulation curve, the mutation point of the frequency domain energy distribution can be located and used as the segmentation threshold.
[0049] Step S250: Segment the single-band image based on the segmentation threshold to obtain the low-frequency image of the single band.
[0050] To elaborate, mark the frequency components with radii less than the segmentation threshold in the spectrogram as low-frequency components, and mark the remaining frequency components as high-frequency components; set the spectral values and phase values of the high-frequency components to zero to obtain the low-frequency spectrum; convert the low-frequency spectrum from the frequency domain to the spatial domain to obtain the low-frequency image of this single band.
[0051] In addition, it should be noted that when converting the low-frequency spectrum from the frequency domain to the spatial domain, the method used needs to correspond to the method of converting the single-band image from the spatial domain to the frequency domain in step S210, that is, it should be its inverse transformation. For example, if Fourier transformation is used in step S210, correspondingly, Fourier inverse transformation should be used for the re-conversion here.
[0052] Step S300: Process the low-frequency image of the single band using the atmospheric scattering model to obtain the dehazed image of the single band.
[0053] Specifically, the atmospheric scattering model is a physical model that describes the scattering and absorption phenomena that occur when light propagates in the atmosphere due to interactions with various particles in the atmosphere, such as air molecules, aerosols, water vapor, etc. The core objective of the defogging method based on the atmospheric scattering model is: through the observed foggy image, estimate the atmospheric light value and transmittance, and then use the atmospheric scattering model to invert a clear fog-free image.
[0054] The present invention improves the calculation of the transmittance value. It includes steps S310 - S340: Step S310: Perform mixed pixel decomposition on the low-frequency image to obtain the abundance coefficients corresponding to the pixels in the low-frequency image.
[0055] Specifically, first, use an endmember extraction method such as the N-FINDR algorithm or the minimum volume transform to extract endmembers from the single-band low-frequency image to obtain the fog layer endmember and the spectral endmember. The endmember extraction methods such as the N-FINDR algorithm and the minimum volume transform method are both prior arts and will not be elaborated here. After the endmember extraction is completed, arrange the spectral curves of the extracted fog layer endmember and the ground object endmember in rows or columns to respectively construct the fog layer endmember spectral matrix and the ground object endmember spectral matrix .
[0056] Secondly, given the original spectral image of this single band, the fog layer endmember spectral matrix, and the ground object endmember spectral matrix, set the objective function as the minimization error of the mixed pixel model: ; where, is the minimization error, is the coordinate of the pixel in the low-frequency image, are all the pixels in the low-frequency image, is the spectral value of the pixel in the low-frequency image, is the value of the pixel in the fog layer endmember spectral matrix, is the abundance coefficient of the pixel , is the value of the pixel in the ground object endmember spectral matrix.
[0057] This formula means that in this single band, calculate the square of the difference between its spectral value at the low-frequency image and the corresponding spectral value of the thin fog mixed pixel model for each pixel, then accumulate and sum the squares of the differences of all pixels within this single band, and finally obtain the error value between the value fitted by the thin fog mixed pixel model and the spectral value of the low-frequency image.
[0058] This error value quantifies the deviation between the predicted value and the true value of the haze mixed pixel model. The smaller the value, the more accurate the simulation of the actual spectrum by the haze mixed pixel model. Conversely, the larger the value, the lower the degree of fit between the haze mixed pixel model and the actual scene.
[0059] Next, the constraint conditions are determined as , and when the constraint conditions are met, the optimization algorithm is used to solve the objective function to obtain the abundance coefficients.
[0060] Specifically, for this single band, the gradient descent method is used to solve the optimal haze layer abundance coefficient map.
[0061] Step S320: Establish a linear mapping relationship between the abundance coefficient of the pixel and the initial transmittance value, and calculate the initial transmittance value of the pixel based on the mapping relationship: ; Among them, is the initial transmittance value of pixel , is the abundance coefficient of pixel , is a preset adjustment factor, with an empirical value of 0.8, which dynamically adjusts the weight of the haze layer abundance on the transmittance correction to balance the defogging effect and detail retention.
[0062] The abundance coefficient of the endmember represents the proportion of different substances in the mixed pixel. By calculating the initial transmittance through the above formula, it can assist in the analysis of the relationship between the distribution of different substances, image clarity, and light propagation characteristics. The parameter plays a role in adjusting the sensitivity of the initial transmittance to the endmember abundance coefficient. A larger value will make the initial transmittance more sensitive to changes in the endmember abundance coefficient, that is, a small change in the endmember abundance coefficient will cause a large change in the initial transmittance; a smaller value makes the change of the initial transmittance relatively gentle and less sensitive to changes in the endmember abundance coefficient. According to the specific application scenario and data characteristics, the calculation of the initial transmittance can be optimized by adjusting the value to achieve a better analysis effect.
[0063] Step S330: Generate an initial transmittance map based on the initial transmittance value.
[0064] Step S340: Process the initial transmittance value based on the dark channel prior method to obtain the target transmittance.
[0065] Specifically, in the initial transmittance map, the transmittance of the sky or highlight regions is often underestimated, resulting in over-enhancement or distortion of the dehazed image. Therefore, the visible light single band is corrected through the dark channel to optimize its transmittance map, making it more in line with the actual physical scene and avoiding overcorrection.
[0066] The above text has described the calculation of the transmittance value in the atmospheric scattering model. Next, it will be explained how to use the atmospheric scattering model to invert a clear haze-free image based on the atmospheric light value and transmittance.
[0067] Specifically, calculate the spectral value of the pixel in the dehazed single band of the low-frequency image: ; where is the spectral value of the pixel in the dehazed single band of the low-frequency image, is the spectral value of the pixel in the single band of the hyperspectral image, is the atmospheric light value of the low-frequency image, is the maximum value function, is the corrected transmittance value of the pixel in the single band of the low-frequency image, is a preset small value, and the empirical value is , and the purpose is to avoid the denominator being too small when the transmittance is close to zero.
[0068] By calculating the spectral value of the pixel in the dehazed single band of the low-frequency image, the influence of fog on the image can be effectively reduced, making the object edges in the image clearer and the details more obvious. Fog will cause light to scatter and absorb, resulting in deviation of the spectral information of the image. Calculating the spectral value after dehazing can correct this deviation, making the spectral value of the pixel closer to the real situation.
[0069] The atmospheric light value is calculated in the following way: Select the pixel points with the brightness in the top 0.1% in the fog layer abundance coefficient map of the single band, and calculate the average value of their brightness as the atmospheric light value.
[0070] Perform the above operations for all single bands to obtain dehazed images of multiple single bands.
[0071] Step S400: Combine the dehazed images of multiple single bands to obtain a dehazed hyperspectral image.
[0072] Specifically, after obtaining the dehazed images of each single band, these single band images need to be combined and stacked to form a dehazed hyperspectral image.
[0073] Specifically, the gray values of each single band are arranged in the order of wavelength to form a three-dimensional data cube. The feature point matching algorithm is used to ensure that the images of each single band are spatially aligned, that is, the positions of each pixel point in different single bands are the same.
[0074] After obtaining the haze-removed hyperspectral image, a verification step can be added. The spectral angle matching method is used to verify whether the haze-removed image is distorted.
[0075] Specifically, the reference spectrum of the target ground object is obtained from the spectral library or field measurement. For each pixel in the haze-removed hyperspectral image, the angle between it and the reference spectrum is calculated, that is, the spectral angle.
[0076] According to the actual situation, a spectral angle threshold is set. The empirical value is 0.2 radians. For each pixel in the haze-removed hyperspectral image, if the angle between it and the reference spectrum is less than the threshold, this pixel is determined to be true, otherwise the pixel is considered distorted.
[0077] The spectral angles of all pixels in the haze-removed hyperspectral image are counted to obtain the proportion of distorted pixels in the total pixels. The threshold is set to 7%. If the proportion of distorted pixels in the total pixels exceeds the threshold, the haze-removed hyperspectral image is considered distorted. Regarding the setting of the threshold, it can also be set according to actual requirements and empirical values.
[0078] Although this specification has shown and described multiple embodiments of the present invention, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art will think of many changes, alterations, and alternative ways without departing from the spirit and idea of the present invention. It should be understood that various alternative solutions to the embodiments of the present invention described herein can be adopted in the process of practicing the present invention.
Claims
1. A method for removing fog from hyperspectral images, characterized in that, Including: Collecting hyperspectral images and decomposing them into multiple single-band images; For any one of the single-band images, performing segmentation to obtain the low-frequency image of the single-band, including: converting the single-band image from the spatial domain to the frequency domain to obtain the spectrogram of the single-band; the spectrogram shows the amplitude spectrum of the frequency spectrum; performing centering processing on the spectrogram to obtain the center of the spectrogram, obtaining at least two circular regions in the spectrogram, calculating the energy gradient between the two circular regions, determining the segmentation threshold according to the energy gradient; segmenting the single-band image based on the segmentation threshold to obtain the low-frequency image of the single-band; the center point of the circular region is the center of the spectrogram; Processing the low-frequency image of the single-band using an atmospheric scattering model to obtain the haze-removed image of the single-band; Combining the multiple single-band haze-removed images to obtain the haze-removed hyperspectral image.
2. The hyperspectral image defogging method according to claim 1, characterized in that, The calculating the energy gradient between the two circular regions includes: Calculating the energy of the two circular regions respectively; Calculate the energy gradient between the two annular regions ; Among them, is the energy of the annular region with the inner circle radius of and the outer circle radius of in the spectrogram, is the energy of the annular region with the inner circle radius of and the outer circle radius of in the spectrogram, is the distance between the inner circle and the outer circle of the annular region, is the step size during the energy gradient calculation.
3. The hyperspectral image defogging method according to claim 2, wherein The energy of the annular region satisfies the relation: ; Among them, is the complex spectrum value of the frequency point in the spectrogram in polar coordinates ; is the amplitude spectrum value of the frequency point in the spectrogram in polar coordinates ; is the polar angle of the frequency point in the polar coordinate system of the spectrogram, and taking the modulus operation on the complex spectrum.
4. The hyperspectral image defogging method according to claim 1, characterized in that The determining the segmentation threshold according to the energy gradient includes: Obtaining the outer circle radius of the circular region where the energy gradient is the largest, and the segmentation threshold is the outer circle radius.
5. The hyperspectral image defogging method according to claim 1, characterized in that, The segmenting the single-band image based on the segmentation threshold to obtain the low-frequency image of the single-band includes: Marking the frequency components with a radius less than the segmentation threshold in the spectrogram as low-frequency components, and the remaining frequency components as high-frequency components; Setting the complex values of the frequency points of the high-frequency components to zero to obtain a low-frequency spectrum; Converting the low-frequency spectrum from the frequency domain to the spatial domain to obtain the low-frequency image of the single-band.
6. The hyperspectral image defogging method according to claim 1, wherein The atmospheric scattering model includes the calculation of transmittance, and the calculation of transmittance includes: Performing mixed pixel decomposition on the low-frequency image to obtain the abundance coefficients corresponding to the pixels in the low-frequency image; Establishing a linear mapping relationship between the abundance coefficients of the pixels and the initial transmittance values, and calculating the initial transmittance values of the pixels based on the mapping relationship; Processing the initial transmittance values based on the dark channel prior method to obtain the target transmittance.
7. The hyperspectral image defogging method according to claim 6, wherein Performing mixed pixel decomposition on the low-frequency image includes: extracting endmembers of a fog layer and spectral endmembers from the single-band low-frequency image, and constructing a fog layer endmember spectral matrix and a ground object endmember spectral matrix ; For each pixel in the low-frequency image, applying the thin fog mixed pixel model, that is: ; wherein, is the spectral value of the pixel in the low-frequency image, is the value of the pixel in the fog endmember spectral matrix, is the abundance coefficient of the pixel ; and is the value of the pixel in the ground object endmember spectral matrix; define an objective function, determine constraint conditions, and solve the objective function to obtain the abundance coefficient when the constraint conditions are satisfied.
8. The hyperspectral image defogging method according to claim 7, characterized in that, The objective function is ; wherein, is the minimized error, are the coordinates of the pixels in the low-frequency image, are all the pixels in the low-frequency image.
9. The hyperspectral image defogging method according to claim 6, characterized in that, Establishing the linear mapping relationship between the abundance coefficient and the initial transmittance value of the pixel includes: the linear mapping relationship is ; where is the initial transmittance value of the pixel , is a preset adjustment factor is the abundance coefficient of the pixel .
10. The hyperspectral image defogging method according to claim 1, wherein The combining the multiple single-band haze-removed images to obtain the haze-removed hyperspectral image includes: Stacking the multiple single-band haze-removed images in the order of their corresponding spectral wavelengths to form the haze-removed hyperspectral image, where each pixel corresponds to the same spatial position in all single bands.
Citation Information
Patent Citations
Band ratio method based maize embryo segmentation method in high-spectral reflection image
CN105931223A
Mixed filtering image defogging algorithm based on dark channel prior model
CN111028156A
Hyperspectral image feature extraction method, system and equipment based on waveband subsets
CN114743057A
Infant interpersonal communication puzzle training system and method based on image processing
CN116385313A
Method and System for Removal of Fog, Mist, or Haze from Images and Videos
US20140140619A1