A method, system, device and medium for clarifying underwater non-uniform illumination images

Through multi-exposure fusion illumination enhancement, improved color compensation and dark channel deblurring algorithms, the problems of uneven illumination, color cast and blur of underwater images in non-uniform lighting environments are solved, achieving better visual effects and color balance. , suppressing overexposure in high-brightness areas and improving the failure problem of the dark channel algorithm.

CN118333902BActive Publication Date: 2024-09-06QINGDAO EARTH SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410748405.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-06
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Underwater images have problems of uneven illumination, color cast, and blur in non-uniform lighting environments. Existing technologies fail to effectively solve the impact of lighting models on images, resulting in poor enhancement effects, serious overexposure, and poor color balance and deblurring effects. Not ideal.

Method used

An underwater image illumination enhancement algorithm using multi-exposure fusion is used to establish an illumination model through camera response model and layer separation technology, and is combined with Laplacian pyramid fusion to generate an illumination-enhanced image; the improved color compensation method is performed by calculating the compensation coefficient of the attenuation channel. Color balance; the improved dark channel deblurring algorithm divides the ocean background and non-ocean background areas based on the difference in grayscale changes, and performs deblurring processing respectively.

Benefits of technology

It effectively solves the problems of uneven illumination, color cast and blur, improves the clarity of underwater non-uniform illumination images, suppresses overexposure in high-brightness areas, removes red artifacts, and makes the color correction effect consistent with human vision, improving The failure problem of the dark channel prior algorithm in the ocean background area is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333902B
    Figure CN118333902B
Patent Text Reader

Abstract

The present invention belongs to the technical field of underwater image processing, and specifically discloses a method, system, device and medium for clarifying underwater non-uniform illumination images. Aiming at the problems of uneven illumination, color cast and blur existing in underwater images, the method of the present invention first uses a camera response model to obtain an optimal exposure rate map to enhance the image in the low-illuminance area; establishes an illumination model based on layer separation technology, and obtains a reduced-exposure image after removing the glow effect; proposes an underwater image illumination enhancement algorithm that proposes multi-exposure rate fusion in combination with the original image, and generates an illumination enhanced image through weighted fusion; then proposes an improved color compensation method, combining channel compensation theory and gray world algorithm for color correction; on this basis, proposes an improved dark channel deblurring algorithm, divides the image into non-ocean and ocean background areas according to the difference in grayscale changes, and deblurs the two areas based on the dark channel prior algorithm, and finally fuses them to generate a clear underwater image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater image processing, and in particular to a method, system, equipment and medium for clarifying an underwater non-uniform illumination image. Background Art

[0002] Underwater tasks such as marine resource exploration, marine ecological research, deep-sea facility monitoring and naval military applications require clear underwater images to assist in analysis. However, the underwater environment is complex, and underwater images generally have problems such as uneven lighting, color cast, and blur. Color cast and blur are caused by the propagation of light in water. Light enhancement is the basis for clarifying underwater images.

[0003] Specifically, the lighting conditions in the underwater environment are poor, and artificial light sources are usually used to increase the brightness of the image during underwater operations. However, the image is brighter near the near light point and darker near the far light point, resulting in uneven lighting. At the same time, due to the different attenuation rates of red, green, and blue light, red light attenuates most severely underwater, and the image exhibits a blue-green bias. Since light is absorbed and scattered by water and suspended particles during underwater propagation, the image has low contrast and blur problems.

[0004] At present, in the field of image processing technology, the general approach to problems such as uneven lighting, color cast, and blur is as follows:

[0005] To address the problem of uneven illumination, Guo et al. combined the camera response model with the traditional Retinex model to optimize the initial illumination map and achieve low illumination enhancement. Tang Zilin et al. proposed an adaptive image enhancement algorithm based on Retinex, which achieves illumination enhancement through an adaptive gamma correction function. However, the above method has a good overall enhancement effect, with obvious enhancement in low illumination areas, while enhancing the high exposure areas of the image, resulting in severe overexposure.

[0006] In order to solve the problem of blue-green color cast, Song et al. proposed an underwater image color correction method based on the gray world theory. The red channel was compensated based on the green channel, and the gray world algorithm was used to correct the image. Zhu et al. proposed an improved channel compensation algorithm. The parameters were constructed by the average value of the three channels and the overall average value of the image to compensate for the red channel. However, the above method did not consider the influence of illumination on underwater images, the constructed compensation coefficient was small, and the red channel was not effectively compensated, resulting in over-compensation of the red channel using the gray world algorithm, causing red artifacts near the light source.

[0007] To address the blur problem, Sethi et al. performed histogram equalization and dark channel prior dehazing on underwater images, and then obtained enhanced images through Laplacian pyramid fusion. However, the above method does not consider that the dark channel prior algorithm will fail in the ocean background area, so color distortion will occur in the ocean background area.

[0008] In summary, the underwater environment is complex, and there are degradation problems such as uneven illumination, color cast, and blur. The above image sharpening methods do not consider the illumination model, and the enhancement effect is poor. For the problem of uneven illumination, the above methods have obvious enhancement in low-illuminance areas, while strengthening the high-exposure areas of the image, resulting in serious overexposure. For the color cast and blur problems, the above methods do not consider the illumination model, and do not solve the impact of illumination before performing color balancing and deblurring, resulting in unsatisfactory results. Summary of the invention

[0009] The purpose of the present invention is to propose a method for clarifying underwater images with non-uniform illumination. The method solves the problems of uneven illumination, color cast and blurring of underwater images by proposing a multi-exposure fusion underwater image illumination enhancement algorithm, an improved color compensation method and an improved dark channel deblurring algorithm, which is beneficial to improving the clarity effect of underwater images with non-uniform illumination.

[0010] In order to achieve the above object, the present invention adopts the following technical scheme:

[0011] A method for clarifying an underwater non-uniform illumination image comprises the following steps:

[0012] Step 1. Use the camera response model to obtain the optimal exposure rate map and enhance the image in the low-light area; establish a lighting model based on the layer separation technology, and obtain a reduced-exposure image after removing the glow effect; add the glow map to construct a weight function based on the saturation weight, contrast weight, and exposure weight, and combine it with the original image to generate a lighting-enhanced image using Laplacian pyramid fusion;

[0013] Step 2. First, calculate the average values ​​of the three channels of the illumination-enhanced image, then determine the channel with the least attenuation based on the average value, use the average value of the channel with the least attenuation to calculate the compensation coefficient, and compensate the attenuated channel; use the gray world algorithm to obtain a color-balanced image for the compensated image;

[0014] Step 3. First, the color-balanced image is divided into two areas, ocean background and non-ocean background, according to the difference in grayscale changes. For the non-ocean background area, dark channel prior deblurring is used. For the ocean background area, the improved transmittance and atmospheric light value estimation method is used for deblurring. Finally, the two deblurred images are fused to obtain a clear underwater image.

[0015] In addition, based on the above-mentioned underwater non-uniform illumination image clearing method, the present invention also proposes a corresponding underwater non-uniform illumination image clearing system, which adopts the following technical solutions:

[0016] An underwater non-uniform illumination image clarity system includes the following modules:

[0017] The illumination enhancement module is used to obtain the optimal exposure rate map using the camera response model and enhance the image in the low-light area; the illumination model is established based on the layer separation technology, and the reduced-exposure image is obtained after removing the glow effect; based on the saturation weight, contrast weight and exposure weight, the glow map is added to construct the weight function, and the original image is combined to generate the illumination-enhanced image using the Laplace pyramid fusion;

[0018] The color compensation module is used to first calculate the average value of the three channels of the light-enhanced image, then determine the channel with the least attenuation according to the size of the average value, use the average value of the channel with the least attenuation to calculate the compensation coefficient, and compensate the attenuated channel; the gray world algorithm is used to obtain a color-balanced image for the compensated image;

[0019] And a deblurring module, which is used to first divide the color-balanced image into two areas, ocean background and non-ocean background, according to the difference in grayscale changes; for the non-ocean background area, a dark channel prior deblurring process is adopted; for the ocean background area, an improved transmittance and atmospheric light value estimation method is used for deblurring; finally, the two deblurred images are fused to obtain a clear underwater image.

[0020] In addition, based on the above-mentioned underwater non-uniform illumination image clearing method, the present invention also proposes a computer device for implementing the above-mentioned underwater non-uniform illumination image clearing method.

[0021] The computer device includes a memory and a processor. The memory stores executable codes. When the processor executes the executable codes, the computer device is used to implement the steps of the above-mentioned underwater non-uniform illumination image clearing method.

[0022] In addition, based on the above-mentioned underwater non-uniform illumination image clearing method, the present invention also proposes a computer-readable storage medium for implementing the above-mentioned underwater non-uniform illumination image clearing method.

[0023] The computer-readable storage medium stores a program thereon, and when the program is executed by a processor, it is used to implement the steps of the above-mentioned underwater non-uniform illumination image clearing method.

[0024] The present invention has the following advantages:

[0025] As described above, the present invention proposes a method for clarifying underwater non-uniform illumination images in view of the problems of uneven illumination, color cast, and blur in underwater images. The method proposes several different stages of clarifying processes, and the clarifying process is carried out in the order of illumination enhancement, color correction, and deblurring. In the multi-exposure rate fusion process, the glow map weight is added to reduce the weight of the high-exposure area of ​​the original image, and the weight of the high-exposure area of ​​the reduced-exposure image is increased. The multi-exposure rate fusion illumination enhancement based on the glow map weight improves the brightness of the low-brightness area of ​​the image while suppressing the overexposure of the high-brightness area, which significantly improves the visual effect of the image. On the basis of illumination enhancement, a compensation coefficient is constructed according to the channel with the smallest attenuation to perform color balance. The problem of insufficient compensation of the red channel is effectively solved, the red artifacts are effectively removed, and the effect of color correction is more in line with human visual perception. On the basis of illumination enhancement and color balance, the color-balanced image is divided into an ocean background area and a non-ocean background area, and the atmospheric light value and transmittance of the two areas are estimated respectively, so as to achieve the deblurring effect. Light enhancement and color balance effectively solve the problem of failure of dark channel a priori algorithm in underwater images; the image is divided into ocean background area and non-ocean background area, which effectively solves the problem of failure of dark channel a priori algorithm in ocean background area; finally, the weight fusion method is used to obtain the final deblurred image. The method of the present invention effectively solves the problems of uneven lighting, color cast, and blur, which is conducive to improving the clarity effect of underwater non-uniform lighting images, and achieves good results in both subjective and objective experiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 4 is a processing flow chart of the underwater non-uniform illumination image clearing method in an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0028] Example 1

[0029] In view of the problems of uneven illumination, color cast and blur in underwater images, this embodiment 1 proposes a method for clarifying underwater non-uniform illumination images. The overall inventive concept of the method is as follows: first, the camera response model is used to obtain the optimal exposure rate map to enhance the image in the low-illuminance area; a lighting model is established based on the layer separation technology, and a reduced-exposure image is obtained after removing the glow effect; an underwater image illumination enhancement algorithm that proposes multi-exposure rate fusion is proposed in combination with the original image, and an illumination enhanced image is generated by weighted fusion; then an improved color compensation method is proposed, which combines the channel compensation theory and the gray world algorithm for color correction; finally, an improved dark channel deblurring algorithm is proposed, which divides the image into non-ocean and ocean background areas according to the difference in grayscale changes, and deblurs the two areas based on the dark channel prior algorithm, and finally fuses them to generate a clear underwater image.

[0030] like Figure 1 As shown, the underwater non-uniform illumination image clearing method in this embodiment includes the following steps:

[0031] Step 1. Use the camera response model to obtain the optimal exposure rate map and enhance the image in the low-light area; establish a lighting model based on layer separation technology, and obtain a reduced-exposure image after removing the glow effect; add the glow map to construct a weight function based on the saturation weight, contrast weight, and exposure weight, and use the Laplace pyramid fusion with the original image to generate a lighting-enhanced image.

[0032] Aiming at the problem of uneven illumination in underwater images, the present invention proposes a method for underwater image illumination enhancement by fusion of multiple exposure rates. The specific processing process is as follows:

[0033] Step 1.1. The specific process of enhancing the low-light area image is as follows:

[0034] The camera response model is used to enhance the low-illuminance area, and the maximum value of the three channels R, G, and B is taken as the initial illumination map. :

[0035] (1)

[0036] in Represents a single channel value, , Indicates the maximum value of the three channels R, G, and B.

[0037] In order to maintain the overall structure and smooth texture details, the initial illumination map To optimize:

[0038] (2)

[0039] Where T(x,y) represents the optimized illumination map, || || Fand || ||1 represent the F-norm and 1-norm respectively. is a first-order derivative filter, including horizontal and vertical directions, W is the weight matrix, and τ is the balance parameter; normalized pixels below 0.5 are set as low-illuminance pixels, and the pixel values ​​of the optimized illumination map are normalized to obtain pixels in the low-illuminance area:

[0040] (3)

[0041] in, Represents a set of pixels that only contain low-light areas. Represents pixel coordinates.

[0042] The brightness of the image under different exposure rates will change, but the color is basically the same, so when estimating the exposure rate, only the brightness component is considered. The optimal exposure rate map of the image is obtained by maximizing the image information entropy:

[0043] (4)

[0044] in, represents information entropy, The gray value in the image is The proportion of pixels in is 256; Y represents the brightness component, and the brightness component Y is obtained by three channels: (5)

[0045] in, , , Represents the red, green, and blue channels in the low-light area (i.e. three channels in the .

[0046] The formula for maximizing image information entropy is as follows:

[0047] (6)

[0048] in represents the optimal exposure ratio graph, Indicates BTF, Indicates exposure rate, Determined by the camera parameters.

[0049] Substituting the optimal exposure ratio map into the brightness conversion function generates the optimal low-light enhanced image.

[0050] Step 1.2. In order to solve the overexposure phenomenon caused by the influence of the light source and the surrounding area (glow) in the underwater image, the specific process of obtaining the reduced exposure image is as follows:

[0051] Create a glow model:

[0052] (7)

[0053] in is the original degraded image, To deglow the image, For the light source, Represents the glow point spread function; the illumination effect belongs to the low-frequency component, and the point spread light source has a short-tail distribution characteristic in the statistical law. The layer separation objective function is used to obtain the de-glow image :

[0054] (8)

[0055] in represents the objective function, are filters in both vertical and horizontal directions. is a second-order Laplace filter, represents convolution, is the smoothing parameter, It is a robust function that can preserve image edge detail information.

[0056] Step 1.3. The specific process of generating a lighting enhanced image using Laplacian pyramid fusion is as follows:

[0057] The present invention proposes an image fusion method based on exposure, contrast weight, saturation weight and glow map weight. First, the exposure weight is calculated. , contrast weight and saturation weight :

[0058] (9)

[0059] in, is the standard deviation; Represents images with different exposure levels, =1,2,3; Represents three channels of images with different exposure levels, ; Indicates that the normalized pixel value is 0.5.

[0060] when =1, 2, 3, they represent the original degraded image, low-illumination enhanced image, and de-glowed image, respectively.

[0061] (10)

[0062] in, Represents images with different exposure levels, represents the Laplace operator; Represents a grayscale image.

[0063] (11)

[0064] in, is the standard deviation; , , Three-channel values ​​representing different pixels with different exposures.

[0065] Since the glow is given a large weight in the weight map corresponding to the original image, the glow problem will still exist in the enhanced result, reducing the visibility near the light source. To address this problem, the present invention uses three weight measurement indicators: contrast, saturation, and exposure to calculate the weight corresponding to each pixel. :

[0066] (12)

[0067] in, , , Indicates the weight index of contrast, saturation, and exposure.

[0068] Weight Normalize it, the formula is as follows:

[0069] (13)

[0070] in represents the normalized weight, Represents the weight sum of three images with different exposure levels; based on the three metric weights, add the glow image as a new weight indicator to calculate the weight map :

[0071] (14)

[0072] in, To control the glow level, For the glow image.

[0073] The original degraded image, low-light enhanced image and reduced-exposure image are fused using the Laplacian pyramid to generate a light-enhanced image.

[0074] The illumination enhancement algorithm based on multi-exposure rate fusion proposed in the present invention can improve the brightness of low-brightness areas of the image while suppressing overexposure of high-brightness areas, thereby significantly improving the visual effect of the image.

[0075] Step 2. First, calculate the average value of the three channels of the image, then determine the channel with the least attenuation based on the size of the average value, use the average value of the channel with the least attenuation to calculate the compensation coefficient, and compensate the attenuated channel; use the gray world algorithm to obtain a color balanced image for the compensated image.

[0076] Step 2.1. Based on the illumination enhancement in step 1 above, the present invention proposes an improved color compensation method for the color cast problem of underwater images caused by water absorption and scattering. The process of compensating the attenuation channel is as follows:

[0077] First, the average of the three channels of the image is calculated, and then the channel with the least attenuation is determined based on the size of the average.

[0078] (15)

[0079] in, , , They represent the mean of the red channel, green channel, and blue channel of the image pixels respectively.

[0080] Use the channel with the least attenuation The compensation coefficient is calculated based on the average value of the attenuation channel.

[0081] (16)

[0082] in, Indicates the channel with the least attenuation; and It indicates the two channels remaining after removing the channel with the smallest attenuation, namely channel 1 and channel 2; , They represent channel 1 and channel 2 after color compensation respectively. is the compensation constant.

[0083] and Respectively represent the compensation coefficients of channel 1 and channel 2.

[0084] For example, the compensation coefficient is calculated by taking the average value of the least attenuated green channel, and the attenuated channel is compensated;

[0085] ;

[0086] in, and Respectively represent the red and blue channels after color compensation; Indicates the channel with the least attenuation.

[0087] and Respectively represent the red and blue channel compensation coefficients.

[0088] Similarly, when the mean value of the blue channel of the image pixels is the largest, the blue channel is used to compensate for the red and green channels.

[0089] Step 2.2. The process of using the gray world algorithm to obtain a color balanced image on the compensated image is as follows:

[0090] The gray world algorithm is based on the gray world hypothesis, which states that for an image with a lot of color changes, the average values ​​of the three channels R, G, and B tend to the same gray value g:

[0091] (17)

[0092] in, , , Respectively represent the average values ​​of the red, green, and blue channels after color compensation.

[0093] [ J r ' J g ' J b ' ] = [ g J ¯ r c 0 0 0 g J ¯ g c 0 0 0 g J ¯ b c ] ∗ [ J r c J g c J b c ] (18)

[0094] in, , , These are the red, green, and blue channel values ​​after color correction, thus generating a color balanced image.

[0095] Step 3. First, the color-balanced image is divided into two areas, ocean background and non-ocean background, according to the difference in grayscale changes. For the non-ocean background area, dark channel prior deblurring is used. For the ocean background area, the improved transmittance and atmospheric light value estimation method is used for deblurring. Finally, the two deblurred images are fused to obtain a clear underwater image.

[0096] Step 3.1. First, calculate the pixel gradient to obtain the gradient information, set the threshold to obtain a binary image, perform corrosion operation to remove its small noise points; secondly, use the connected component algorithm to identify and connect discontinuous areas; finally, use distance transform and morphological operations to supplement the ocean background area, complete the underwater image segmentation, and obtain the ocean background area and non-ocean background area.

[0097] Step 3.2. For non-ocean background areas, the dark channel prior deblurring process is as follows:

[0098] After illumination enhancement and color correction, the simplified imaging model of the underwater image is expressed as:

[0099] I ( x ) = J ( x ) t ( x ) + A [ 1 - t ( x ) ] (19)

[0100] in To blur the image, For the desired image, is the scene transmittance, is the atmospheric light value.

[0101] First, the minimum grayscale value of each pixel in the RGB three channels is extracted to generate a grayscale image. Then, the dark channel image is generated using the minimum value filter. The minimum channel is calculated for both sides of equation (19) to obtain:

[0102] (20)

[0103] in, Represents a color image RGB channels, represents the dark channel of the image, It's pixels A local area centered on is the atmospheric light value of the RGB channel; Represents a pixel in a pixel collection.

[0104] According to the dark channel prior theory, the dark channel value of the fog-free image is close to zero, so we get:

[0105] (twenty one)

[0106] in represents the transmittance of non-ocean background areas, Represents non-ocean background area image RGB channels, Represents the atmospheric light value of the RGB channels in the non-ocean background area.

[0107] Set the lower threshold when removing fog To control the minimum transmittance, the dehazed image is obtained by formula (22);

[0108] (twenty two)

[0109] in represents the deblurred image of the non-ocean background area, The value is estimated by first finding the 0.1% pixels with the highest brightness in the dark channel, and then taking these pixels in The corresponding maximum pixel value in ; Usually 0.1; Represents the non-ocean background areas of the blurred image.

[0110] Step 3.3. The deblurring process of the ocean background area using the improved transmittance and atmospheric light value estimation method is as follows:

[0111] In the ocean background area, the transmittance Multiply by a factor greater than 1 to correct the transmittance and set the upper and lower limits. , then the transmittance of the ocean background area is:

[0112] (twenty three)

[0113] in, represents the deblurred image of the ocean background area, represents the ocean background area of ​​the blurred image, Represents the atmospheric light value of the ocean background area, represents a positive parameter, usually 0.06.

[0114] get After the parameters are calculated, the deblurred image of the ocean background area is obtained by substituting it into the imaging model of formula (19). .

[0115] Step 3.4. The process of fusing the two deblurred images to obtain a clear underwater image is as follows:

[0116] Get the minimum value channel by RGB channel for:

[0117] (twenty four)

[0118] in Represents a single channel value, ;

[0119] When the minimum channel If it is greater than the set value, it is the ocean background area, and the weight value Set to 1, as follows:

[0120] (25)

[0121] in, is the setting value, set to 0.6.

[0122] When the minimum value channel is less than or equal to the set value, it is the non-ocean background area; the pixels in the non-ocean background area are:

[0123] (26)

[0124] Normalize the pixels in the non-ocean background area to:

[0125] (27)

[0126] in, represents the normalized pixel; Indicates pixels in non-ocean background areas; Indicates the minimum value of pixels in the non-ocean background area; Indicates the maximum value of pixels in the non-ocean background area.

[0127] The weight value is calculated as:

[0128] (28)

[0129] The deblurred images of the non-ocean background area and the ocean background area are fused through the weight function to obtain the global deblurred image. The calculation formula is as follows:

[0130] (29)

[0131] in Represents the deblurred image, and the underwater clear image is obtained.

[0132] In addition, in order to verify the effectiveness of the method proposed in the present invention, the following experiments were conducted:

[0133] Firstly, in the experiment, the three traditional algorithms, SR-LIME algorithm, Zero-DCE algorithm and RRDNet algorithm, are used as comparison algorithms for the illumination enhancement proposed in the present invention to verify the effectiveness of the illumination enhancement algorithm proposed in the present invention.

[0134] Experiments have shown that the above four algorithms have certain illumination enhancement effects on underwater images. After the SR-LIME algorithm is enhanced, the image brightness is greatly improved, but the overexposed area is over-enhanced, and color deviation occurs; after the Zero-DCE algorithm is enhanced, although the image brightness is improved, whitening occurs; after the RRDNet algorithm is enhanced, the overexposed area is over-enhanced, and there is no obvious improvement in the low-illuminance area. The method of the present invention not only improves the brightness of the low-brightness area of ​​the image, but also suppresses the overexposure of the high-brightness area, which significantly improves the visual effect of the image. Table 1 shows the objective comparison of illumination enhancement of the SR-LIME algorithm, the Zero-DCE algorithm, the RRDNet algorithm and the method of the present invention.

[0135] Table 1 Objective comparison of illumination enhancement

[0136]

[0137] It can be seen from Table 1 that for underwater images with uneven illumination, the four algorithms have effectively improved the problem of uneven illumination, increased the information entropy of the image, made the information contained in the image richer, reduced the NIQE index of the image, and made the image quality better. However, the contrast algorithm has a serious overexposure phenomenon, resulting in less improvement in image clarity and contrast. The illumination enhancement method of the present invention is better in terms of information entropy and NIQE, indicating its superiority in processing color cast underwater images under artificial light conditions, improving the phenomenon of uneven illumination of the image, and significantly enhancing the image contrast and clarity, with better effects.

[0138] Secondly, in the experiment, two traditional color correction algorithms, namely the gray world algorithm and the ERH algorithm, are used as comparison algorithms of the method of the present invention to verify the effectiveness of the improved color compensation method proposed in the present invention.

[0139] Experiments have shown that the above three color correction methods have certain color correction effects on underwater images. Among them, the image processed by the gray world algorithm will appear reddish, and red artifacts will appear near the light source; the ERH algorithm fails to effectively compensate the red channel due to its small compensation coefficient, resulting in excessive compensation of the red channel using the gray world algorithm, causing red artifacts to appear near the light source; the improved color compensation method proposed in the present invention solves the problem of insufficient compensation of the red channel, effectively removes red artifacts, and the color correction effect is more in line with human visual perception. Table 2 shows the objective comparison of color correction of the gray world algorithm, the ERH algorithm and the improved color compensation method proposed in the present invention.

[0140] Table 2 Objective comparison of color correction

[0141]

[0142] It can be seen from Table 2 that the two traditional color correction algorithms improve the UIQM index of the image, making the image color more balanced, and reduce the NIQE index of the image, making the image quality better. However, the contrast algorithm has local color cast or distortion, resulting in poor performance of the UIQM and NIQE indicators. The improved color compensation method proposed in the present invention has a good effect on color correction of color cast images, better increases the quality of the image, and makes the color more balanced, so the indicators are better than the other two algorithms.

[0143] In addition, in order to verify that the method of the present invention has good effects in three aspects of illumination enhancement, color correction and deblurring in the process of underwater image processing, the JOE algorithm and the TEBCF algorithm were introduced as comparison algorithms.

[0144] Experiments have shown that both traditional algorithms have certain image enhancement effects on underwater images. The JOE algorithm changes the overall style of the image, and distortion occurs in the ocean background area, over-enhancing the overexposed area; the TEBCF algorithm has no practical effect in the ocean background area and does not solve the problem of uneven illumination; while the method of the present invention has good effects in illumination enhancement, color correction and deblurring. Table 3 shows a comprehensive objective comparison of the JOE algorithm, the TEBCF algorithm and the method of the present invention.

[0145] Table 3 Comprehensive objective comparison

[0146]

[0147] It can be seen from Table 3 that both traditional algorithms effectively enhance underwater images, improve the UIQM index of the image, make the image color more balanced, and improve the clarity and contrast, and reduce the NIQE index of the image, so that the image quality is better. The underwater non-uniform illumination image clearing method proposed in the present invention is superior to the other two algorithms in both UIQM and NIQE indicators, achieving an ideal effect and showing more stable performance.

[0148] In summary, the method of the present invention has the following advantages over the traditional method in the underwater image clearing process:

[0149] To address the problem of uneven illumination, the present invention suppresses overexposure in high-brightness areas while increasing the brightness of low-brightness areas of the image, significantly improving the visual effect of the image. To address the problem of blue-green color cast, the improved color correction method proposed by the present invention is based on an illumination enhancement algorithm, which solves the problem of insufficient red channel compensation, effectively removes red artifacts, and the color correction effect is more in line with human visual perception. To address the blur problem, the method of the present invention effectively solves the problem of failure of the dark channel prior algorithm in the ocean background area, and can also effectively deblur the non-ocean background area.

[0150] Example 2

[0151] This embodiment 2 describes an underwater non-uniform illumination image clearing system, which is based on the same inventive concept as the underwater non-uniform illumination image clearing method described in the above embodiment 1.

[0152] The underwater non-uniform illumination image clearing system in this embodiment includes the following modules:

[0153] The illumination enhancement module is used to obtain the optimal exposure rate map using the camera response model and enhance the image in the low-light area; the illumination model is established based on the layer separation technology, and the reduced-exposure image is obtained after removing the glow effect; based on the saturation weight, contrast weight and exposure weight, the glow map is added to construct the weight function, and the original image is combined to generate the illumination-enhanced image using the Laplace pyramid fusion;

[0154] The color compensation module is used to first calculate the average value of the three channels of the light-enhanced image, then determine the channel with the least attenuation according to the size of the average value, use the average value of the channel with the least attenuation to calculate the compensation coefficient, and compensate the attenuated channel; the gray world algorithm is used to obtain a color-balanced image for the compensated image;

[0155] And a deblurring module, which is used to first divide the color-balanced image into two areas, ocean background and non-ocean background, according to the difference in grayscale changes; for the non-ocean background area, a dark channel prior deblurring process is adopted; for the ocean background area, an improved transmittance and atmospheric light value estimation method is used for deblurring; finally, the two deblurred images are fused to obtain a clear underwater image.

[0156] It should be noted that, in the underwater non-uniform illumination image clearing system described in this embodiment 2, the implementation process of the functions and effects of each functional module is specifically described in the implementation process of the corresponding steps in the method in the above embodiment 1, and will not be repeated here.

[0157] Example 3

[0158] This embodiment 3 describes a computer device, which includes a memory and one or more processors. The memory stores executable code. When the processor executes the executable code, it is used to implement the steps of the underwater non-uniform illumination image clearing method in the above embodiment 1.

[0159] In this embodiment, the computer device is any device or apparatus with data processing capability, which will not be described in detail here.

[0160] Example 4

[0161] This embodiment 4 describes a computer-readable storage medium on which a program is stored. When the program is executed by a processor, it is used to implement the steps of the underwater non-uniform illumination image clearing method in the above-mentioned embodiment 1.

[0162] The computer-readable storage medium may be an internal storage unit of any device or apparatus with data processing capabilities, such as a hard disk or memory, or an external storage device of any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc., equipped on the device.

[0163] Of course, the above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiments. It should be noted that all equivalent substitutions and obvious deformation forms made by any technician familiar with the field under the guidance of this specification fall within the essential scope of this specification and should be protected by the present invention.

Claims

1. A method for clarifying underwater non-uniform illumination images, characterized in that: The steps include: Step 1. Use the camera response model to obtain the optimal exposure rate map and enhance the image in the low-light area; establish an illumination model based on layer separation technology, and obtain a reduced-exposure image after removing the glow effect; add the glow map to construct a weight function based on the saturation weight, contrast weight, and exposure weight, and use the Laplace pyramid fusion to generate a lighting-enhanced image in combination with the original image; Step 2. First, calculate the average values ​​of the three channels of the illumination-enhanced image, then determine the channel with the least attenuation based on the size of the average values, use the average value of the channel with the least attenuation to calculate the compensation coefficient, and compensate the attenuated channel; use the gray world algorithm to obtain a color-balanced image for the compensated image; In step 2, the process of compensating the attenuation channel is as follows: First, calculate the average of the three channels of the image, and then determine the channel with the least attenuation based on the size of the average; in, Respectively represent the mean of the red channel, green channel, and blue channel of the image pixels; The compensation coefficient is calculated using the average value of the channel J with the least attenuation, and the attenuated channel is compensated; Where J represents the channel with the smallest attenuation; J1 and J2 represent the two channels remaining after removing the channel with the smallest attenuation, namely channel 1 and channel 2; J c1 , J c2 They represent channel 1 and channel 2 after color compensation, respectively, and α is the compensation constant; and Respectively represent the compensation coefficients of channel 1 and channel 2; Step 3. First, the color-balanced image is divided into two regions, ocean background and non-ocean background, according to the difference in grayscale changes. For the non-ocean background region, dark channel prior deblurring is used; for the ocean background region, the improved transmittance and atmospheric light value estimation method is used for deblurring. Finally, the two deblurred images are fused to obtain a clear underwater image. In step 3, for the non-ocean background area, the process of using dark channel prior deblurring is as follows: After illumination enhancement and color correction, the simplified imaging model of the underwater image is expressed as: I(x)=J(x)t(x)+A[1-t(x)] (19) Where I(x) is the blurred image, J(x) is the desired image, t(x) is the scene transmittance, and A is the atmospheric light value; First, the minimum grayscale value of each pixel in the RGB three channels is extracted to generate a grayscale image. Then, the dark channel image is generated using the minimum value filter. The minimum channel is calculated for both sides of equation (19) to obtain: Among them, J c (y) represents the RGB channels of the color image J(y), represents the dark channel of the image, Ω(x) is a local area centered at pixel x; A c is the atmospheric light value of the RGB channel; y represents the pixel in the pixel set; According to the dark channel prior theory, the dark channel value of the fog-free image is close to zero, so we get: where t nonsky (x) represents the transmittance of the non-ocean background area, Represents the non-ocean background area image I nonsky (y) the RGB channels, Represents the atmospheric light value of the RGB channel in the non-ocean background area; When defogging, the lower threshold t0 is set to control the minimum transmittance, and the defogging image is obtained by formula (20); Among them, I nonsky (x) indicates the non-ocean background area of ​​the blurred image; J nonsky (x) represents the deblurred image of the non-ocean background area, A nonsky The value is estimated by first finding the 0.1% pixels with the highest brightness in the dark channel and then taking these pixels in I nonsky The corresponding maximum pixel value in (x) is taken as A nonsky ; The process of deblurring the ocean background area using the improved transmittance and atmospheric light value estimation method is as follows: In the ocean background area, the transmittance t1=max(t nonsky (x), t0) is multiplied by a factor greater than 1 to correct the transmittance and set the upper and lower limits. Then the transmittance of the ocean background area is: t sky (x)=min(t1*t2,1) (23) Among them, t sky (x) represents the deblurred image of the ocean background area, I sky (x) represents the ocean background area of ​​the blurred image, A sky represents the atmospheric light value of the ocean background area, and K represents a positive parameter; Get sky After the (x) parameter is substituted into the imaging model of formula (19), the deblurred image J of the ocean background area is obtained. sky (x); In step 3, the process of fusing the two deblurred images to obtain a clear underwater image is as follows: Get the minimum value channel I through RGB channels min (x,y) is: Among them I c (x,y) represents a single channel value, c∈{R,G,B}; When the minimum channel I min When (x, y) is greater than the set value, it is the ocean background area, and the weight value μ(x, y) is set to 1, as follows: If I min (x,y)>ω,μ(x,y)=1 (25) Among them, ω is the set value; When the minimum value channel is less than or equal to the set value, it is the non-ocean background area; the pixels in the non-ocean background area are: P(x,y)={I min (x,y)∣I min (x,y)≤ω} (26) Normalize the pixels in the non-ocean background area to: Among them, P g (x, y) represents the normalized pixel; P(x, y) represents the pixel in the non-ocean background area; minP(x, y) represents the minimum value of the pixel in the non-ocean background area; maxP(x, y) represents the maximum value of the pixel in the non-ocean background area; If I min (x,y)≤ω,μ(x,y)=P g (x,y)(28) The deblurred images of the non-ocean background area and the ocean background area are fused through the weight function to obtain the global deblurred image. The calculation formula is as follows: J z (x,y)=µ(x,y)J nonsky (x)+(1-µ(x,y))J sky (x) (29) Among them J z (x, y) represents the deblurred image, and the underwater clear image is obtained.

2. The underwater non-uniform illumination image clearing method according to claim 1, characterized in that: In step 1, the specific process of enhancing the low-illumination area image is as follows: The camera response model is used to enhance the low-illuminance area, and the maximum value of the three channels R, G, and B is taken as the initial illumination map. Among them I c (x, y) represents a single channel value, c∈{R,G,B}, Indicates the maximum value of the three channels R, G, and B; Initial illumination map To optimize: Among them, T(x,y) represents the optimized illumination map, |||| F and ||||1 represent the F-norm and 1-norm respectively. is a first-order derivative filter, including horizontal and vertical directions, W is the weight matrix, and τ is the balance parameter; normalized pixels below 0.5 are set as low-illuminance pixels, and the pixel values ​​of the optimized illumination map are normalized to obtain pixels in the low-illuminance area: Q={(x,y)|T(x,y)<0.5} (3) Where Q represents a set of pixels that only contain low-illuminance areas, and (x, y) represents pixel coordinates; The optimal exposure rate graph of the image is obtained by maximizing the image information entropy: Among them, H(Y) represents information entropy, p i is the proportion of pixels with gray value i in the image, N is 256; Y represents the brightness component, and the brightness component Y is obtained from three channels: Among them, Q r , Q g , Q b Respectively represent the red, green and blue channels in low illumination areas; The formula for maximizing image information entropy is as follows: Where K1 represents the optimal exposure rate map, g represents BTF, K γ represents the exposure rate, γ is determined by the camera parameters; Substituting the optimal exposure ratio map into the brightness conversion function to generate the optimal low-light enhanced image; In step 1, the specific process of obtaining the reduced exposure image is as follows: Create a glow model: I(x,y)=J(x,y)+L α (x,y)*APSF(7) Where I(x,y) is the original degraded image, J(x,y) is the de-glow image, and L α (x, y) is the light source, APSF represents the glow point spread function; the layer separation objective function is used to obtain the de-glow image J(x, y): Where E(J(x,y)) represents the objective function, f 1,2 are filters in the vertical and horizontal directions, f3 is a second-order Laplace filter, * represents convolution, ξ is a smoothing parameter, ρ(J(x,y)*f 1,2 ) is a robust function that can preserve image edge detail information.

3. The underwater non-uniform illumination image clearing method according to claim 1, characterized in that: In step 1, the specific process of using Laplacian pyramid fusion to generate the illumination enhanced image is as follows: Calculate exposure weight E x,y,k , contrast weight C x,y,k and saturation weight S x,y,k : Where, σ is the standard deviation; I k (x, y) represents images with different exposure levels, k = 1, 2, 3; Represents the three channels of images with different exposure levels, c∈{R,G,B}; 0.5 means the normalized pixel value is 0.5; When k = 1, 2, and 3, they represent the original degraded image, the low-illumination enhanced image, and the de-glowed image, respectively; Among them, I k (x,y) represents images with different exposure levels. represents the Laplace operator; gray(I k (x,y)) represents a grayscale image; S x,y,k =Std(R x,y,k ,G x,y,k ,B x,y,k ) (11) Where Std( ) is the standard deviation; R x,y,k , G x,y,k , B x,y,k Represents the three-channel values ​​of different pixels at different exposures; Use contrast, saturation, and exposure as three weighted metrics to calculate the weight W corresponding to each pixel. x,y,k : Among them, w c 、w e 、w s Represents the weight index of contrast, saturation, and exposure; Weight W x,y,k Normalize it, the formula is as follows: in represents the normalized weight, Represents the weights and sum of three images with different exposure levels; based on the three metric weights, add the glow image as a new weight indicator to calculate the weight map W' x,y,k : Among them, λ is the coefficient that controls the degree of glow, H x,y,k For the glow image; The original degraded image, low-light enhanced image and reduced-exposure image are fused using the Laplacian pyramid to generate a light-enhanced image.

4. The underwater non-uniform illumination image clearing method according to claim 1, characterized in that: In step 2, the process of using the gray world algorithm to obtain a color balanced image on the compensated image is as follows: For an image with a lot of color changes, the average values ​​of its R, G, and B channels tend to the same grayscale value g; in, Respectively represent the average values ​​of red, green, and blue channels after color compensation; Among them, J' r , J' g , J' b These are the red, green, and blue channel values ​​after color correction, thus generating a color balanced image.

5. An underwater non-uniform illumination image clearing system for implementing the underwater non-uniform illumination image clearing method according to any one of claims 1 to 4, characterized in that: The underwater non-uniform illumination image clarity system includes the following modules: The illumination enhancement module is used to obtain the optimal exposure rate map using the camera response model and enhance the image in the low-light area; the illumination model is established based on the layer separation technology, and the reduced-exposure image is obtained after removing the glow effect; based on the saturation weight, contrast weight and exposure weight, the glow map is added to construct the weight function, and the original image is combined to generate the illumination-enhanced image using the Laplace pyramid fusion; The color compensation module is used to first calculate the average value of the three channels of the light-enhanced image, then determine the channel with the least attenuation according to the size of the average value, use the average value of the channel with the least attenuation to calculate the compensation coefficient, and compensate the attenuated channel; the gray world algorithm is used to obtain a color-balanced image for the compensated image; And a deblurring module, which is used to first divide the color-balanced image into two areas, ocean background and non-ocean background, according to the difference in grayscale changes; for the non-ocean background area, a dark channel prior deblurring process is adopted; for the ocean background area, an improved transmittance and atmospheric light value estimation method is used for deblurring; finally, the two deblurred images are fused to obtain a clear underwater image.

6. A computer device comprising a memory and a processor, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, it is used to implement the steps of the underwater non-uniform illumination image clearing method as described in any one of claims 1 to 4 above.

7. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, it is used to implement the steps of the underwater non-uniform illumination image clearing method as described in any one of claims 1 to 4 above.