Image defogging method based on HSV color space double channels

Through the dual-channel method based on HSV color space, atmospheric light and transmittance are estimated, and image defog removal is combined with atmospheric scattering model, which solves the problem of poor fog removal in the existing technology and achieves an efficient and accurate image defog removal effect.

CN119067885APending Publication Date: 2024-12-03ANHUI UNIV

Patent Information

Application Number
CN202411211366.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing image defog removal technology lacks universality when defog removal, has a large amount of calculation and poor defog removal effect.

Method used

Using the image defogging method based on the HSV color space dual-channel, by acquiring the original fogging image and converting it to the HSV color space, sorting the pixel values ​​of the saturation and brightness images, estimating the atmospheric light and transmittance, and using the equilibrium coefficient to compensate for saturation Defog removal treatment combined with atmospheric scattering model.

Benefits of technology

Improve the fog removal effect, reduce the block effect, improve the fog removal speed and image quality, making the image after fog removal clearer and more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067885A_ABST
    Figure CN119067885A_ABST
Patent Text Reader

Abstract

The invention discloses an HSV (hue, saturation and value) color space dual-channel-based image defogging method, which comprises the following steps of: acquiring an original foggy image, and transferring the original foggy image to an HSV space to obtain a saturation image and a brightness image; sorting the pixel values of the saturation image from small to large, selecting the coordinates of the first n% pixels, and finding the coordinate of the maximum pixel in the corresponding coordinates in the brightness image; finding a coordinate corresponding to the maximum pixel in the original fog-containing image, and obtaining a pixel value as an atmospheric light estimation value; the pixel values of the S channel and the V channel are used for constructing a balance coefficient to compensate the saturation, and then the transmissivity is compensated; according to the atmospheric light estimation value, the transmissivity and the atmospheric scattering model, the original fog-containing image is processed, the defogged image is obtained, the low-saturation and high-brightness pixels are selected as the final atmospheric light, and the good defogging effect is achieved; the transmittance is estimated through the compensated saturation, and based on pixel estimation, the defogging speed is increased while the blocking effect is reduced, and the defogging quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image defogging method based on a dual-channel HSV color space. Background Art

[0002] Particles, aerosols and water droplets in the atmosphere cause scattering and absorption of light, resulting in a haze effect. This phenomenon can cause blurred details, reduced contrast and distorted colors in images. Image dehazing technology aims to improve image clarity and quality by removing haze from images affected by haze.

[0003] Existing image dehazing technologies can be mainly divided into four categories: heuristic methods, deep learning methods, multimodal methods, and methods based on physical models. Although heuristic methods are simple and easy to implement, they require manual adjustment of parameters, have limited adaptability to different scenes and haze levels, and lack universality. Image dehazing technology based on deep learning methods mainly trains deep neural networks to learn the mapping relationship from haze images to clear images, and then uses this network to dehaze new haze images. This means that a large amount of labeled training data is required, which requires high computing resources. Multimodal methods achieve dehazing by integrating information from multiple sensors or data sources, but reality usually cannot meet the input of multiple sensor data for this method. Methods based on physical models use atmospheric scattering models to provide more accurate haze estimates, but existing methods still have poor haze effects on complex scenes. Summary of the invention

[0004] The present invention provides an image defogging method based on HSV color space dual channels, so as to overcome the technical problems that the existing defogging technology lacks universality, has a large amount of calculation and has a poor defogging effect.

[0005] In order to achieve the above object, the technical solution of the present invention is:

[0006] An image defogging method based on dual channels of HSV color space, comprising:

[0007] S1: Acquire an original foggy image, and convert the original foggy image from the RGB color space to the HSV color space to obtain an S channel image, that is, a saturation image, and obtain a V channel image, that is, a brightness image;

[0008] S2: sorting the pixel values ​​of the saturation image from small to large, selecting the coordinates of the first n% pixels in the saturation image, and then finding the coordinates of the largest pixel in the corresponding coordinates in the brightness image;

[0009] S3: Find the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image, and obtain the pixel value of the coordinates as the atmospheric light estimation value;

[0010] S4: constructing a balance coefficient using the pixel values ​​of the S channel image and the V channel image, wherein the balance coefficient is used to compensate for the saturation of the original foggy image;

[0011] S5: using the compensated saturation to compensate for the transmittance of the original foggy image to obtain a compensated transmittance;

[0012] S6: Processing the original foggy image according to the atmospheric light estimation value, the compensated transmittance and the atmospheric scattering model to obtain a defogged image.

[0013] Furthermore, S2 sorts the pixel values ​​of the saturation image from small to large, and selects the coordinates of the first n% pixels in the saturation image, including:

[0014] Select the coordinates of the first n% pixels in the saturation image, as shown in formula (1),

[0015]

[0016] Among them, Ω represents the position of the first n% pixels selected in the S channel, I S (x, y) represents the pixel value of the saturation image, (x′, y′) represents the coordinates of the first n% pixels, Indicates the locations of remaining pixels in the saturation image.

[0017] Further, S2 finds the coordinates of the maximum pixel in the corresponding coordinates in the brightness image, including:

[0018] Find the coordinates of the largest pixel in the corresponding first n% pixels in the brightness image, as shown in formula (2),

[0019]

[0020] Among them, (x * ,y * ) represents the coordinates of the maximum pixel, argmin(f(a)) represents the value of a when f(a) reaches the minimum value, f(a) represents the intermediate variable, and a refers to (I V (x′, y′)-255) 2 (x′, y′), I V (x, y) represents the pixel value of the brightness image, I V (x', y') represents the coordinates of the corresponding first n% pixels found in the brightness image.

[0021] Further, S3 finds the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image, and obtains the pixel value of the coordinates as the atmospheric light estimation value, including:

[0022] Find the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image, and obtain the pixel value at this position as the atmospheric light estimation value, as shown in formula (3):

[0023] A=I(x * ,y * ) (3)

[0024] Where A is the estimated value of atmospheric light.

[0025] Furthermore, S4 constructs a balance coefficient using the pixel values ​​of the S channel image and the V channel image, and the balance coefficient is used to compensate for the saturation of the original foggy image, including:

[0026] The pixel values ​​of the S channel image and the V channel image are used to construct a balance coefficient to compensate for the saturation. The pixel value of the saturation image after compensation is shown in formula (4):

[0027]

[0028] in, represents the compensated saturation image pixel value, α is a constant parameter, and ρ is the constructed balance coefficient. The expression is shown in formula (5).

[0029]

[0030] Among them, std(b) is the standard deviation of b, b is the intermediate variable, referring to I V or I S , M V (x, y) and M S (x, y) represent intermediate variables, as shown in formulas (6) and (7),

[0031]

[0032] Among them, mmin(c, d) indicates that the smaller value of c and d is selected, c and d represent intermediate variables, and c refers to or d refers to or Indicates the average value of the S channel or V channel.

[0033] Further, S5 uses the compensated saturation to compensate the transmittance of the original foggy image to obtain the compensated transmittance, including:

[0034] S51, obtain the brightness and saturation in the RGB space, as shown in formulas (8) and (9),

[0035]

[0036] Among them, I k (x, y) represents the pixel value of one of the R, G, and B channels at the position (x, y). Indicates that the maximum value of each pixel in the three channels of R, G, and B is selected as the brightness in the RGB space;

[0037] S52, obtaining the pixel value of the dark image containing fog, as shown in formula (10),

[0038]

[0039] Among them, δ(x, y) is a local window centered at the self-set coordinate point (x, y) in the original foggy image. The window is set according to the actual situation. k (p, q) represents the pixel value of the image in the window;

[0040] The pixel values ​​of the dark image containing fog are re-expressed using the brightness and saturation in the RGB space, as shown in formula (11):

[0041]

[0042] Among them, I S (p, q) and I V (p, q) represents the brightness and saturation of the image in this window;

[0043] S53, obtaining the atmospheric scattering model, as shown in formula (12),

[0044] I(x,y)=J(x,y)t(x,y)+A(1-t(x,y)) (12)

[0045] Where I(x, y) is the foggy image, J(x, y) is the real image to be restored, A is the atmospheric light, and t(x, y) is the transmittance;

[0046] The transmittance is simplified and estimated based on the dark channel prior, as shown in formula (13):

[0047]

[0048] Among them, A k Indicates the value of atmospheric light in one of the three channels R, G and B;

[0049] Simplifying formula (13), we get the simplified transmittance, as shown in formula (14):

[0050]

[0051] Where t′(x, y) represents the simplified transmittance;

[0052] S54, using the compensated saturation to estimate transmittance, as shown in formula (15),

[0053]

[0054] Where t(x, y) represents the transmittance estimated using the compensated saturation, that is, the transmittance finally input into the atmospheric scattering model; Indicates the saturation after compensation in the local window.

[0055] Further, S6 processes the original foggy image according to the atmospheric light estimation value, the compensated transmittance and the atmospheric scattering model to obtain a defogged image, including:

[0056] Rearrange the atmospheric scattering model formula, as shown in formula (16),

[0057]

[0058] Set the lower limit of t(x,y) to t0 and optimize formula (16), as shown in formula (17),

[0059]

[0060] Substitute the obtained atmospheric light estimation value and the compensated transmittance into formula (17) to obtain the dehazed image.

[0061] Beneficial effect: The present invention proposes an image defogging method based on dual channels of HSV color space, which selects the positions of the first n% small pixels in the saturation image and the position of the maximum pixel in the corresponding coordinates in the brightness image, and selects pixels with low saturation and high brightness as the final atmospheric light. The estimation conforms to the principle of atmospheric scattering and has a good defogging effect. The pixel values ​​of the S channel and the V channel are used to construct a balance coefficient to compensate for the saturation, which can be closer to the saturation of the fog-free image, and then the transmittance is estimated by the compensated saturation. Compared with the traditional strategy of using block estimation, the present invention is based on pixel estimation, which reduces the block effect while increasing the defogging speed and improving the defogging quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0063] Figure 1A method flow chart of an image defogging method based on dual channels of HSV color space according to the present invention;

[0064] Figure 2a The original image containing fog is inputted by the present invention;

[0065] Figure 2b It is a saturation image after the original image of the present invention is converted from the RGB color space to the HSV color space;

[0066] Figure 2c It is a brightness image after the original image of the present invention is converted from the RGB color space to the HSV color space;

[0067] Figure 2d This is the optimized saturation image of the present invention;

[0068] Figure 2e The transmittance image with optimized saturation estimation is used for the present invention;

[0069] Figure 2f It is the fog-free image finally output by the present invention;

[0070] Figures 3a to 3l An input foggy image for using the method of the present invention;

[0071] Figure 3a'~3l' This is the output fog-free image finally obtained using the method of the present invention. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] This embodiment provides an image defogging method based on HSV color space dual channels. Figure 1 As shown, including:

[0074] S1: Acquire an original foggy image, and convert the original foggy image from the RGB color space to the HSV color space to obtain an S channel image, that is, a saturation image, and obtain a V channel image, that is, a brightness image;

[0075] S2: sorting the pixel values ​​of the saturation image from small to large, selecting the coordinates of the first n% pixels in the saturation image, and then finding the coordinates of the largest pixel in the corresponding coordinates in the brightness image;

[0076] S3: Find the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image, and obtain the pixel value of the coordinates as the atmospheric light estimation value;

[0077] S4: constructing a balance coefficient using the pixel values ​​of the S channel image and the V channel image, wherein the balance coefficient is used to compensate for the saturation of the original foggy image;

[0078] S5: using the compensated saturation to compensate for the transmittance of the original foggy image to obtain a compensated transmittance;

[0079] S6: Processing the original foggy image according to the atmospheric light estimation value, the compensated transmittance and the atmospheric scattering model to obtain a defogged image.

[0080] Specifically, first, the original foggy image is obtained, and the original foggy image is converted from the RGB color space to the HSV color space to obtain the image of the S channel, that is, the saturation image, and the image of the V channel, that is, the brightness image, is obtained from the open source database, and the image is converted from RGB to an image in the HSV space to obtain pixel values, in preparation for the subsequent use of the pixel values ​​of the S channel and the V channel to process the foggy image; secondly, the pixel values ​​of the saturation image are sorted from small to large, the coordinates of the first n% pixels in the saturation image are selected, and then the coordinates of the maximum pixel in the corresponding coordinates are found in the brightness image. Usually, the atmospheric light of the image has the characteristics of low saturation and high brightness, so the position of the maximum pixel is selected in the brightness image to prepare for the subsequent acquisition of atmospheric light; the coordinates of the maximum pixel corresponding to the brightness image are found in the original foggy image, and the pixel value of the coordinate is obtained as is the atmospheric light estimation value, which can obtain atmospheric light with low saturation and high brightness at the same time, conforms to the characteristics of atmospheric light, can more accurately determine the atmospheric light of the image, and the estimation conforms to the atmospheric scattering principle, and has a good defogging effect; the pixel values ​​of the S channel image and the V channel image are used to construct a balance coefficient, and the balance coefficient is used to compensate for the saturation of the original foggy image, which can reflect the correlation between brightness and saturation, making it closer to the saturation of the fog-free image; the compensated saturation is used to compensate the transmittance of the original foggy image to obtain the compensated transmittance, so that the saturation is closer to the saturation of the fog-free image, so that the final transmittance is more accurate, and the obtained defogging image quality is higher; finally, the original foggy image is processed according to the atmospheric light estimation value, the compensated transmittance and the atmospheric scattering model to obtain a defogged image, and the defogged image obtained at this time is a clear and accurate image.

[0081] In a specific embodiment, the original foggy image is obtained, and the original foggy image is converted from the RGB color space to the HSV color space to obtain an S channel image, that is, a saturation image, and obtain a V channel image, that is, a brightness image. The scheme is:

[0082] Normalize the R, G, and B values ​​to between 0 and 1, as shown in formula (18):

[0083]

[0084] Among them, I R′ (x, y), I G , (x, y), I B′ (x, y) represent the normalized pixel values, I R (x, y), I G (x, y), I B (x, y) represents the unnormalized value;

[0085] Calculate the pixel values ​​of the H, S, and V channels as shown in formulas (19), (20), and (21),

[0086]

[0087] Among them, I k (x, y) represents the pixel value of one of the R, G, and B channels at the position (x, y). Indicates that the maximum value of each pixel in the three channels of R, G, and B is selected as the brightness in the RGB space;

[0088] The original image obtained is Figure 2a As shown in the figure, the saturation image after the original image is converted from RGB color space to HSV color space is as follows Figure 2b As shown in the figure, the brightness image after the original image is converted from RGB color space to HSV color space is as follows Figure 2c shown.

[0089] In this solution, a foggy image is obtained from an open source database, and the image is converted from RGB to an image in the HSV space to obtain pixel values, in preparation for the subsequent use of the pixel values ​​of the S channel and the V channel to process the foggy image.

[0090] In a specific embodiment, the scheme of sorting the pixel values ​​of the saturation image from small to large, selecting the coordinates of the first n% pixels in the saturation image, and then finding the coordinates of the largest pixel in the corresponding coordinates in the brightness image is:

[0091] Select the coordinates of the first n% pixels in the saturation image, as shown in formula (22),

[0092]

[0093] Among them, Ω represents the position of the first n% pixels selected in the S channel, I S (x, y) represents the pixel value of the saturation image, (x′, y′) represents the coordinates of the first n% pixels, Indicates the location of the remaining pixels in the saturation image;

[0094] Find the coordinates of the maximum pixel in the corresponding coordinates in the brightness image, as shown in formula (23),

[0095]

[0096] Where (x*, y*) represents the coordinates of the maximum pixel, argmin(f(a)) represents the value of a when f(a) reaches the minimum value, f(a) represents the intermediate variable, and a refers to (I V (x′, y′)-255) 2 (x′, y′), I V (x, y) represents the pixel value of the brightness image, I V (x', y') represents the coordinates of the corresponding first n% pixels found in the brightness image.

[0097] In this scheme, after experiments and tests, the first 10% of pixels are selected to find the pixels with low saturation in the saturation image. Usually, the atmospheric light of the image has the characteristics of low saturation and high brightness. Therefore, the position of the maximum pixel is selected in the brightness image to prepare for the subsequent acquisition of atmospheric light.

[0098] In a specific embodiment, the solution of finding the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image and obtaining the pixel value of the coordinates as the atmospheric light estimation value is:

[0099] Find the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image, and obtain the pixel value at this position as the atmospheric light estimation value, as shown in formula (24):

[0100] A=I(x * ,y * ) (twenty four)

[0101] Where A is the estimated value of atmospheric light.

[0102] Finding the pixel value corresponding to the maximum pixel position in the original image as the atmospheric light estimation value can obtain atmospheric light with low saturation and high brightness, which conforms to the characteristics of atmospheric light. The atmospheric light of the image can be determined more accurately, and the estimation conforms to the principle of atmospheric scattering, with a good defogging effect.

[0103] In a specific embodiment, the pixel values ​​of the S channel image and the V channel image are used to construct a balance coefficient, and the balance coefficient is used to compensate for the saturation of the original foggy image in the following manner:

[0104] The pixel values ​​of the S channel image and the V channel image are used to construct a balance coefficient to compensate for the saturation. The pixel value of the saturation image after compensation is shown in formula (25):

[0105]

[0106] in, represents the compensated saturation image pixel value, α is a constant parameter, ρ is the constructed balance coefficient, and the expression is shown in formula (26):

[0107]

[0108] Among them, std(b) is the standard deviation of b, b is the intermediate variable, referring to I V or I S , M V (x, y) and M S (x, y) represent intermediate variables, as shown in formulas (27) and (28),

[0109]

[0110] Among them, mmin(c, d) indicates that the smaller value of c and d is selected, c and d represent intermediate variables, and c refers to or d refers to or Indicates the average value of the S channel or V channel.

[0111] The optimized saturation image is as follows Figure 2d shown.

[0112] In this scheme, due to the existence of scattered light, the saturation of the foggy image is reduced and the brightness is increased. Therefore, in order to ensure the accuracy of the image saturation estimation, the balance coefficient is constructed through the pixel values ​​of brightness and saturation, and the correlation between brightness and saturation is measured to ensure that the saturation after compensation is not distorted. The saturation of the foggy image is compensated. At this time, the formula obtained is a linear formula, which can reflect the correlation between brightness and saturation, making it closer to the saturation of the fog-free image.

[0113] In a specific embodiment, the compensated saturation is used to compensate the transmittance of the dark channel prior, and the scheme for obtaining the compensated transmittance is:

[0114] S51, obtaining brightness and saturation in RGB space, which is formula (19) and formula (20);

[0115] S52, obtaining the pixel value of the dark image of the foggy image, as shown in formula (29),

[0116]

[0117] Among them, δ(x, y) is a local window centered at the self-set coordinate point (x, y) in the original foggy image. The window is set according to the actual situation. The window size is usually set to 15x15. k (p, q) represents the pixel value of the image in the window;

[0118] The pixel values ​​of the dark image containing fog are re-expressed using brightness and saturation, as shown in formula (30):

[0119]

[0120] Among them, I S (p, q) and I V (p, q) represents the brightness and saturation of the image in this window;

[0121] S53, obtaining the atmospheric scattering model, as shown in formula (31),

[0122] I(x,y)=J(x,y)t(x,y)+A(1-t(x,y)) (31)

[0123] Where I(x, y) is the foggy image, J(x, y) is the real image to be restored, A is the atmospheric light, and t(x, y) is the transmittance;

[0124] According to the dark channel prior, the dark image of the haze-free image is close to 0, that is, Assuming it is a constant of 0, and since the atmospheric light value is usually large, that is, close to the pixel value 1, the transmittance can be simplified estimated as shown in formula (32):

[0125]

[0126] Among them, A k Indicates the value of atmospheric light in one of the three channels R, G and B;

[0127] For most blurred images, the atmospheric light in formula (32) is larger and is roughly the same for all RGB channels. Formula (32) is simplified to obtain the simplified transmittance, as shown in formula (33):

[0128]

[0129] Where t′(x, y) represents the simplified transmittance;

[0130] S64. Considering that the dark channel prior is not applicable to all cases, the use of formula (32) will lead to underestimation of transmittance. The compensated saturation is used to estimate the transmittance, as shown in formula (34).

[0131]

[0132] Where t(x, y) represents the transmittance estimated using the compensated saturation, that is, the transmittance finally input into the atmospheric scattering model; Indicates the saturation after compensation in the local window.

[0133] The transmittance image estimated using the optimized saturation is shown in Figure 2e shown.

[0134] In this solution, the dark channel prior method is used to estimate the transmittance of the foggy image, which is a common method for obtaining transmittance. Since the saturation of the foggy image is reduced, if the transmittance is directly obtained using the dark channel image for transmittance estimation, the final estimated transmittance will be smaller than the actual transmittance. In order to make the saturation closer to that of the fog-free image, the transmittance is estimated by using the saturation closer to the fog-free image after compensation, so that the final transmittance is more accurate and the defogging image is of higher quality.

[0135] In a specific embodiment, the original foggy image is processed according to the atmospheric light estimation value, the compensated transmittance and the atmospheric scattering model to obtain a defogged image:

[0136] Rearrange the atmospheric scattering model formula, as shown in formula (35),

[0137]

[0138] Considering that when the transmittance decays to near zero, it will affect the attenuation of J(x, y)t(x, y), and the real image directly restored is prone to noise. The lower limit value t0 of t(x, y) is set to retain a small amount of mist in the distance, and the formula (35) is optimized, as shown in formula (36),

[0139]

[0140] Substitute the obtained atmospheric light estimation value and the compensated transmittance into formula (36) to obtain the dehazed image.

[0141] The fog-free image finally output by the present invention is as follows: Figure 2f shown.

[0142] Figures 3a to 3lFor the input foggy image of the method of the present invention, Figure 3a'~3l' This is the output fog-free image finally obtained by using the method of the present invention. It can be seen from the figure that the method can effectively remove fog from the image, and the obtained image is clear and accurate.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image dehazing method based on dual channels of HSV color space, characterized in that: include: S1: Acquire an original foggy image, and convert the original foggy image from the RGB color space to the HSV color space to obtain an S channel image, that is, a saturation image, and obtain a V channel image, that is, a brightness image; S2: sorting the pixel values ​​of the saturation image from small to large, selecting the coordinates of the first n% pixels in the saturation image, and then finding the coordinates of the largest pixel in the corresponding coordinates in the brightness image; S3: Find the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image, and obtain the pixel value of the coordinates as the atmospheric light estimation value; S4: constructing a balance coefficient using the pixel values ​​of the S channel image and the V channel image, wherein the balance coefficient is used to compensate for the saturation of the original foggy image; S5: using the compensated saturation to compensate the transmittance of the original foggy image to obtain the compensated transmittance; S6: Processing the original foggy image according to the atmospheric light estimation value, the compensated transmittance and the atmospheric scattering model to obtain a defogged image.

2. The image defogging method based on HSV color space dual channels according to claim 1, characterized in that: S2 sorts the pixel values ​​of the saturation image from small to large, and selects the coordinates of the first n% pixels in the saturation image, including: Select the coordinates of the first n% pixels in the saturation image, as shown in formula (1), Among them, Ω represents the position of the first n% pixels selected in the S channel, I S (x,y) represents the pixel value of the saturation image, (x′,y′) represents the coordinates of the first n% pixels, Indicates the locations of remaining pixels in the saturation image.

3. The image defogging method based on HSV color space dual channels according to claim 2 is characterized in that: S2 finds the coordinates of the maximum pixel in the corresponding coordinates in the brightness image, including: Find the coordinates of the maximum pixel in the corresponding coordinates in the brightness image, as shown in formula (2), Among them, (x * ,y * ) represents the coordinates of the maximum pixel, argmin(f(a)) represents the value of a when f(a) reaches the minimum value, f(a) represents the intermediate variable, and a refers to (I V (x′,y′)-255) 2 (x′, y′), I V (x, y) represents the pixel value of the brightness image, I V (x′, y′) represents the coordinates of the corresponding first n% pixels found in the brightness image.

4. The image defogging method based on HSV color space dual channels according to claim 1, characterized in that: S3 finds the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image, and obtains the pixel value of the coordinates as the atmospheric light estimation value, including: Find the coordinates of the maximum pixel corresponding to the brightness image in the original foggy image, and obtain the pixel value at this position as the atmospheric light estimation value, as shown in formula (3): A=I(x * ,y * ) (3) Where A is the estimated value of atmospheric light.

5. The image dehazing method based on HSV color space dual channels according to claim 1, characterized in that: S4 constructs a balance coefficient using the pixel values ​​of the S channel image and the V channel image. The balance coefficient is used to compensate for the saturation of the original foggy image, including: The pixel values ​​of the S channel image and the V channel image are used to construct a balance coefficient to compensate for the saturation. The pixel value of the saturation image after compensation is shown in formula (4): in, represents the compensated saturation image pixel value, α is a constant parameter, and ρ is the constructed balance coefficient. The expression is shown in formula (5). Among them, std(b) is the standard deviation of b, b is the intermediate variable, referring to I V or I S , M V (x,y) and M S (x, y) represent intermediate variables, as shown in formulas (6) and (7), Among them, min(c,d) indicates that the smaller value of c and d is selected, c and d represent intermediate variables, and c refers to or d refers to or Indicates the average value of the S channel or V channel.

6. The image dehazing method based on HSV color space dual channels according to claim 1, characterized in that: S5 uses the compensated saturation to compensate the transmittance of the original foggy image to obtain the compensated transmittance, including: S51, obtain the brightness and saturation in the RGB space, as shown in formulas (8) and (9), Among them, I k (x, y) represents the pixel value of one of the R, G, and B channels at the (x, y) position. Indicates that the maximum value of each pixel in the three channels of R, G, and B is selected as the brightness in the RGB space; S52, obtaining the pixel value of the dark image containing fog, as shown in formula (10), Among them, δ(x, y) is a local window centered at the self-set coordinate point (x, y) in the original foggy image. The window is set according to the actual situation. k (p,q) represents the pixel value of the image in the window; The pixel values ​​of the dark image containing fog are re-expressed using the brightness and saturation in the RGB space, as shown in formula (11): Among them, I S (p,q) and I V (p,q) represents the brightness and saturation of the image in this window; S53, obtaining the atmospheric scattering model, as shown in formula (12), I(x,y)=J(x,y)t(x,y)+A(1-t(x,y)) (12) Among them, I(x, y) is the foggy image, J(x, y) is the real image to be restored, A is the atmospheric light, and t(x, y) is the transmittance; The transmittance is simplified and estimated based on the dark channel prior, as shown in formula (13): Among them, A k Indicates the value of atmospheric light in one of the three channels R, G and B; Simplifying formula (13), we get the simplified transmittance, as shown in formula (14): Where t′(x,y) represents the simplified transmittance; S54, using the compensated saturation to estimate transmittance, as shown in formula (15), Among them, t(x,y) represents the transmittance estimated using the compensated saturation, that is, the transmittance finally input into the atmospheric scattering model; Indicates the compensated saturation in the local window.

7. The image dehazing method based on HSV color space dual channels according to claim 1, characterized in that: S6 processes the original foggy image according to the atmospheric light estimation value, the compensated transmittance and the atmospheric scattering model to obtain a defogged image, including: Rearrange the atmospheric scattering model formula, as shown in formula (16), Set the lower limit of t(x,y) to t0 and optimize formula (16), as shown in formula (17), Substitute the obtained atmospheric light estimation value and the compensated transmittance into formula (17) to obtain the dehazed image.

Citation Information

Patent Citations

  • Image defogging method based on RGB and HSV double-color space

    CN111598812A

  • Single image defogging method based on morphological reconstruction and saturation compensation

    CN113191982A

  • Rapid image defogging method based on depth estimation prior and electronic equipment

    CN114240766A

  • Fog-containing image defogging method and system based on multi-label image segmentation

    CN118195956A

  • Method for image defogging based on dark channel prior

    US20240104702A1

Cited By

  • Underwater image enhancement method based on segmented color balance and multi-scale enhancement fusion

    CN119904398A

  • Rapid image restoration method and system suitable for complex environment under mine

    CN122530039A

  • An image rapid restoration method and system suitable for complex underground environment

    CN122530039B