Underwater image enhancement method based on background light optimization and gamma transformation

An underwater image, gamma transformation technology, applied in the field of computer vision, can solve the problems of color cast, color distortion, poor visual effect, etc.

Pending Publication Date: 2021-06-04
DALIAN MARITIME UNIVERSITY
0 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0004] When the traditional dark channel prior method is applied to underwater images, due to the influence of underwater noise, the background light estimation error of the underwate...
View more

Method used

Although the image restored by the dark channel method is clearer, the contrast still has a large room for improvement. Based on this, the present invention introduces gamma transformation to further enhance the image contrast, making the image m...
View more

Abstract

The invention discloses an underwater image enhancement method based on background light optimization and gamma transformation, and belongs to the field of computer vision, and the method comprises the following steps: carrying out the defogging processing of an underwater image, and obtaining a defogged underwater image; gamma transformation is carried out on the defogged underwater image to obtain an underwater image after contrast improvement; and carrying out color correction on the contrast-improved underwater image by adopting a main channel pixel extreme value method to obtain a color-balanced underwater image. According to the method, an improved background light estimation method is adopted, whether the point can serve as the background light of the whole image is measured by using the color saturation of the neighborhood of the candidate point, the estimation error is reduced, and the image quality is improved; in order to solve the problems of color distortion, color cast and the like of the restored image, a gamma transformation and color correction combined method is utilized to improve the contrast of the image and improve the condition of uneven brightness of the image.

Application Domain

Image enhancementImage analysis

Technology Topic

Color saturationComputational physics +10

Image

  • Underwater image enhancement method based on background light optimization and gamma transformation
  • Underwater image enhancement method based on background light optimization and gamma transformation
  • Underwater image enhancement method based on background light optimization and gamma transformation

Examples

  • Experimental program(1)

Example Embodiment

[0041] In order to make the technical solutions and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described below in conjunction with the drawings in the embodiments of the present invention:
[0042] Invented and designed an underwater image enhancement method based on background light optimization and gamma transformation. This method is an underwater image restoration method that combines an improved dark channel prior algorithm and gamma transformation. By considering neighborhood pixel saturation Gamma transformation and color correction are combined to improve the image contrast and restore the real underwater image.
[0043] An underwater image enhancement method based on background light optimization and gamma transformation, comprising the following steps:
[0044] S1: Perform defogging processing on the underwater image to obtain the defogged underwater image;
[0045] S2: Perform gamma transformation on the dehazed underwater image to obtain an underwater image with enhanced contrast;
[0046] S3: For the underwater image after contrast enhancement, color correction is performed by using the method of maximum pixel value of the main channel to obtain a color-balanced underwater image.
[0047] Further, the process of dehazing the underwater image is as follows:
[0048] Combine the dark channel and color saturation to extract the background light of the underwater image to obtain the real background light of the underwater image, and estimate the transmittance of each channel of the underwater image to obtain the red, green and blue of the underwater image The transmittance of the 3 channels, that is, to complete the dehazing process of the underwater image.
[0049] Usually, a complete underwater image mainly consists of direct transmission E D (x), forward scatter E F (x) and backscatter E B (x) consists of three parts, figure 1 It is a schematic diagram of underwater optical imaging, the light intensity E received by pixel point x in the camera λ (x) is:
[0050] E. λ (x)=E D (x)+E F (x)+E B (x) (1)
[0051] Neglecting the image blur caused by forward scattering, the underwater image imaging model is:
[0052] I λ (x)=J λ (x)t λ (x)+B λ,∞ (1-t λ (x)) (2)
[0053] In the formula, I λ (x) is the obtained observation image, J λ (x) is the real scene to be restored, t λ (x) is the transmittance, B λ,∞ for the background light.
[0054] The dark channel prior theory uses the dark pixels in the image to describe the projection information of fog and light, and the main work of restoring the image is to estimate the background light and transmittance of the image.
[0055] The first is to estimate the background light:
[0056] The dark channel of an underwater image refers to the minimum value of light intensity in a certain area in the image, expressed as:
[0057]
[0058] where Ω(x) is a local window centered at x, I λ (y) is the pixel value of a color channel in the image. According to the dark channel prior theory, in a natural image of a clear, fog-free and non-sky area, the dark channel value in a certain window area tends to be 0, that is:
[0059] J dark →0 (4)
[0060] The traditional dark channel prior method selects the top 0.1% of the pixels with the highest brightness in the dark channel, and searches for the point with the highest brightness value in the image as the background light according to the position of these points. However, due to uneven underwater lighting, the overall brightness It is too dark, which leads to blurred underwater images, and the overall brightness of the dark channel is high, and the underwater images are seriously affected by the noise in the water, which makes the selection of background light easily disturbed, and wrong estimated values ​​are obtained.
[0061] In order to ensure the accuracy of background light selection, the present invention proposes an improved background light extraction method, which combines the characteristics of background light with higher brightness and color saturation to determine whether a candidate point is background light. The combination of dark channel and color Saturation extracts the background light of the underwater image, and the process of obtaining the real background light of the underwater image is as follows:
[0062] S1-1: Select the first 0.1% pixels of the dark channel of the underwater image;
[0063] S1-2: According to the positions of the pixels in the first 0.1% of the dark channel of the underwater image, select the point x with the highest brightness;
[0064] S1-3: Calculate the color saturation S of the point x with the maximum brightness, and establish a local window W with the point x as the center, and set the threshold S according to the average saturation in the local window W L;
[0065] S1-4: When S>S L , then set the pixel value of point x as background light, when S≤S L , select the next brightest pixel, and return to S1-2.
[0066] The color saturation S of the present invention is defined as follows:
[0067] S=max x (R,G,B)-min x (R,G,B) (5)
[0068] max in formula (5) x (R,G,B), min x (R, G, B) are the maximum and minimum values ​​of pixels in the three channels at point x, respectively;
[0069]
[0070] In formula (6): ω 1 , ω 2 are the length and width of the window W respectively, and ω is taken in the present invention 1 = ω 2 = 3, S i is the color saturation of the pixel at point i;
[0071]
[0072] S in formula (7) L is the preset threshold, and ρ is the threshold adjustment coefficient.
[0073] When the saturation of the central pixel point in the window W is lower than the preset threshold, it is considered that the point does not have the characteristics that the background light should have and is ignored, and the point with the second brightest brightness in the dark channel is selected as the candidate background light, and the above steps are repeated. , until the saturation of the candidate point is higher than the preset saturation, and the real background light is obtained, image 3 Flow chart of dark channel background light selection combined with color saturation.
[0074] After obtaining the real background light of the underwater image, the transmittance t λ For estimation, according to the underwater image imaging model (2) and the prior condition formula (4), it can be obtained:
[0075]
[0076] Since the attenuation coefficient of red light in water is the largest, the transmission of the red channel in the underwater image is the smallest, so the transmission rate estimated by using the dark channel prior is the transmission rate of the red channel:
[0077]
[0078] After obtaining the transmittance of the red channel, estimate the transmittance of the other two color channels; the transmittance of the pixel captured in the underwater image, the distance d from the camera, and the attenuation coefficient η of the corresponding band are called inverse proportional relationships, expressed as:
[0079]
[0080] Since the distance d between the pixel and the camera is the same in the three channels, the transmittance of different channels is calculated by the ratio of the attenuation coefficients of different color channels, namely:
[0081]
[0082] In the formula, t λ (x) is the transmittance of the λ channel at the pixel point x, η λ is the attenuation coefficient of the λ channel, (λ=R, G, B).
[0083] In an underwater environment, the scattering rate b of the global background light of the image in water is positively correlated with the attenuation rate of light in water, namely:
[0084]
[0085] The relationship between light scattering rate and wavelength is shown in the following formula:
[0086] b(λ)=(-0.00113λ+1.62517)b(λ c ) (13)
[0087] In formula (13), λ represents the wavelength, and λ c As the reference wavelength, the present invention selects red, green, and blue wavelengths as 620, 540, and 450 nm, respectively. In this way, the estimated background light of each channel includes the values ​​of three channels, that is, B=[Br, Bg, Bb] into formula (12), combined with formula (13) to solve the ratio of the scattering rate of each channel, through Equation (11) is solved to obtain the transmittance of the G and B channels, and the solution of the transmittance of the three channels is completed.
[0088] Although the image restored by the dark channel method is clearer, the contrast still has a large room for improvement. Based on this, the present invention introduces gamma transformation to further improve the image contrast and make the image more layered. The gamma of the image used in the present invention The horse transformation formula is defined as follows:
[0089] V out =V max (V in /V max ) γ (14)
[0090] where V in , V out are the brightness of pixels in the input and output images, V max is the pixel value with the highest brightness in the channel.
[0091] Finally, color correction is performed on the restored underwater image to balance the colors of each channel and improve the overall visual effect of the underwater image.
[0092] The steps included in the main channel pixel most value method are as follows:
[0093] S3-1: Calculate the maximum pixel value of the three color channels of red, blue, and green in the underwater image after contrast enhancement;
[0094] S3-2: Compare the maximum pixel values ​​of the red, blue, and green color channels, and make the color channel corresponding to the maximum pixel value the main channel, keep the main channel unchanged, and use the other two color channels as secondary channels;
[0095] S3-3: Enlarge the pixel value of the secondary channel according to the enlargement factor, so that the color of the underwater image after the contrast is improved can be balanced.
[0096] Further, the amplification factor g min , g med It is defined as follows:
[0097]
[0098] Apply a magnification factor to the other two subpasses to obtain a balanced image:
[0099]
[0100] In the formula, I min (R max ,G max ,B max ) is the color channel with the minimum pixel maximum value, I med (R max ,G max ,B max ) is the color channel centered on the maximum value of the pixel, I min , I med are the pixel values ​​corresponding to the two color channels after balancing.
[0101] Figure 4 (a) is the original picture; (b) is the effect figure after the traditional DCP method is processed to the original picture; (c) is the effect figure after adopting this method to the original picture process, and the experimental results show the image enhanced by the inventive method The contrast is significantly improved, and the visual effect is better.
[0102] The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, any person familiar with the technical field within the technical scope disclosed in the present invention, according to the technical solution of the present invention Any equivalent replacement or change of the inventive concepts thereof shall fall within the protection scope of the present invention.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products