An underwater image enhancement method based on the fusion of color correction and detail restoration
Through the adaptive bright channel color compensation and the details recovery method of the CLAHE algorithm, the problems of underwater image color offset and blurred details are solved, and better image enhancement effect is achieved.
Patent Information
- Application Number
- CN202410917843.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-07-10
AI Technical Summary
Due to the influence of water media and suspended particles, underwater optical images often experience color shifts, low contrast and blurred details, which seriously hinder the understanding of underwater scenes and the accuracy of underwater target detection.
The color correction is performed using the adaptive bright channel color compensation formula, and the details are restored in combination with the CLAHE algorithm of local areas at different scales. The pixel value is adjusted through block processing and weight calculation, and the color correction and detail recovery results are integrated.
It effectively improves the color correction effect and detail recovery effect of underwater images, enhances the contrast of images, reduces noise, and improves the overall quality of images.
Smart Images

Figure CN118710506B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image enhancement and restoration, and in particular to an underwater image enhancement method based on the fusion of color correction and detail restoration. Background Art
[0002] In recent years, marine resources have attracted much attention and become one of the key areas of concern for coastal countries. As land resources are gradually depleted, people's exploration and monitoring of marine resources have become particularly important. Underwater detection technology is crucial in marine environmental monitoring, resource exploration and military applications. At present, underwater detection mainly relies on optical and acoustic technologies. Optical detection images have high resolution and rich visual information, which has unique advantages over sonar. However, underwater optical images often suffer from image degradation such as color shift, low contrast, and blurred details due to scattering and absorption caused by water media and suspended particles. These degradations seriously hinder human understanding of underwater scenes and reduce the accuracy of underwater target detection and marine life identification. Therefore, finding an effective solution to restore the color and details of underwater images is a very challenging task. Summary of the invention
[0003] In view of the above existing problems, the present invention is proposed.
[0004] Therefore, the present invention provides an underwater image enhancement method, apparatus, computer equipment and storage medium based on the fusion of color correction and detail restoration to solve the effectiveness and robustness problems in existing image enhancement.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides an underwater image enhancement method based on the fusion of color correction and detail restoration, which comprises:
[0007] Adopting the adaptive bright channel color compensation formula, the R, G, and B channels of the underwater image are adaptively compensated to generate a compensated color-corrected image.
[0008] Convert the color correction image to LAB space, perform CLAHE algorithm on the L channel twice in local areas of different scales, and calculate the value of L' channel;
[0009] Based on the calculation results, the L'AB space is converted into the RGB space to obtain a detail restored image;
[0010] The color correction image and detail restoration image are divided into blocks, and the contrast and saliency weight of the grayscale image and LAB space of the divided sub-image are calculated respectively;
[0011] According to the contrast weight and the saliency weight, the normalized weight map of the sub-image after segmentation is calculated respectively;
[0012] The normalized weight map of each sub-image is multiplied by its corresponding color correction map and detail restoration map to obtain the enhanced image 1 and enhanced image 2 of the sub-image. The sub-images are fused by adding corresponding pixels, and each sub-image is directly spliced to obtain the final image.
[0013] As a preferred solution of the underwater image enhancement method based on the fusion of color correction and detail restoration described in the present invention, wherein: an adaptive bright channel color compensation formula is used to adaptively compensate the R, G, and B channels of the underwater image to generate a compensated color-corrected image. The specific operations are as follows:
[0014] By acquiring the original underwater RGB image and using the adaptive bright channel color compensation method, the enhanced image after color correction is obtained. The expression is:
[0015] ;
[0016] Among them, I CR (x, y) is the pixel value of each pixel in the R, G, and B channels of the color-corrected image after color compensation. L<> means linearly stretching the pixel value to the interval [0, 255]. C (x, y) represents the normalized pixel value at each pixel in the R, G, and B channels of the underwater attenuation image, and F(x, y) represents the adaptive pixel adjustment function. Represents the normalized mean value of the bright channel image pixel value, Represents the normalized mean value of the local pixel values of the R, G, and B channels of the underwater attenuation image;
[0017] According to the pixel value of each pixel in the R, G, and B channels of the underwater attenuation image, the bright channel image is calculated. The expression is:
[0018] ;
[0019] Among them, I L (x, y) represents the pixel value of each pixel in the bright channel image of the underwater attenuation image. CL (x,y) represents the underwater attenuation image, It means taking the maximum value of each pixel point of the R, G, and B channels of the underwater attenuation image as the value of the pixel point. Indicates maximum filtering, the maximum value in the neighborhood of the pixel point (x, y) is taken as the pixel value of the point, and the size of the filter window is 15;
[0020] By determining the size S*S of the local area, taking the value S of the local area as the size of the sliding window, and calculating the normalized mean of the pixel values within the sliding window S*S as the value of each pixel point (x, y) of the R, G, and B channels in the area , calculate the adaptive pixel adjustment function, the expression is:
[0021] ;
[0022] ;
[0023] in, It means that when the pixel value is less than 128, the attenuation is large and a larger compensation is performed. When the pixel value is greater than 128, the attenuation is small and a smaller compensation is performed. F(x,y) represents a nonlinear function.
[0024] As a preferred solution of the underwater image enhancement method based on the fusion of color correction and detail restoration described in the present invention, the color correction image is converted into the LAB space, the CLAHE algorithm of the local area of different scales is performed twice on the L channel, and the value of the L' channel is calculated. The specific operations are as follows:
[0025] By applying the CLAHE algorithm of different scales of local areas to the L channel twice, two sets of L channel values L1 and L2 are generated, and the value of the L' channel is calculated using the weighted method. The expression is:
[0026] ;
[0027] Among them, L'(x,y) represents the value of the L' channel, Represents the variance value of each pixel in the L1 channel of the local area of scale S1*S1, Represents the variance value at each pixel in the L2 channel of the local area of scale S2*S2.
[0028] As a preferred solution of the underwater image enhancement method based on the fusion of color correction and detail restoration described in the present invention, wherein: based on the calculation result, the L'AB space is converted into the RGB space to obtain a detail restoration image, and the specific operations are as follows:
[0029] The L'AB space is formed by generating the value of the L' channel and the value of the AB channel, and the L'AB color space is converted into the RGB color space to obtain a detail restoration map.
[0030] As a preferred solution of the underwater image enhancement method based on the fusion of color correction and detail restoration described in the present invention, the color correction image is divided into blocks, and the contrast and significance weight of the grayscale image and LAB space of the sub-image after the block division are calculated. The specific operations are as follows:
[0031] By converting the color correction image into a grayscale image, the contrast weight is calculated as follows:
[0032] ;
[0033] in, represents the contrast weight of the color correction map, G x , G y Represents the gradient of each sub-image in the x and y directions respectively;
[0034] The significance weight is calculated by converting the color correction image RGB space to LAB space. The expression is:
[0035] ;
[0036] in, represents the significance weight of the color correction map, , , It is expressed as the mean of L, A, and B channels;
[0037] As a preferred solution of the underwater image enhancement method based on the fusion of color correction and detail restoration described in the present invention, the detail restoration image is divided into blocks, and the contrast and significance weight of the grayscale image and LAB space of the sub-image after block division are calculated. The specific operations are as follows:
[0038] By converting the detail recovery image into a grayscale image, the contrast weight is calculated, and the expression is:
[0039] ;
[0040] in, Represents the contrast weight of the detail restoration map;
[0041] By converting the RGB space of the detail recovery image to the LAB space, the saliency weight is calculated, and the expression is:
[0042] ;
[0043] in, Represents the saliency weight of the detail recovery map;
[0044] As a preferred solution of the underwater image enhancement method based on the fusion of color correction and detail restoration described in the present invention, wherein: according to the contrast weight and the saliency weight, the normalized weight map of the sub-image after the block is calculated respectively;
[0045] According to the contrast weight and saliency weight of the color correction map, the normalized weight map is calculated, and the expression is:
[0046] ;
[0047] Wherein, W1 represents the normalized weight map of the color correction map;
[0048] According to the contrast weight and saliency weight of the detail recovery map, the normalized weight map is calculated, and the expression is:
[0049] ;
[0050] Among them, W2 represents the normalized weight map of the detail recovery map;
[0051] As a preferred solution of the underwater image enhancement method based on color correction and detail restoration fusion described in the present invention, wherein: the normalized weight map of each sub-image is multiplied by its corresponding color correction map and detail restoration map to obtain the enhanced image 1 and enhanced image 2 of the sub-image, the corresponding pixels of the sub-images are added and fused, and each sub-image is directly spliced to obtain the final image. The specific operations are as follows:
[0052] Obtain its block normalized weight map according to the contrast weight and saliency weight;
[0053] The block normalized weight map is multiplied with the corresponding sub-image area to obtain a color correction block sub-image enhanced image 1 and a detail restoration block sub-image enhanced image 2;
[0054] Directly add enhanced images 1 and 2 to obtain an enhanced image of the sub-image area;
[0055] The sub-images are stitched and fused to get the final image.
[0056] In a second aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the underwater image enhancement method based on the fusion of color correction and detail restoration as described in the first aspect of the present invention is implemented.
[0057] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the underwater image enhancement method based on the fusion of color correction and detail restoration as described in the first aspect of the present invention is implemented.
[0058] The beneficial effects of the present invention are as follows: using the bright channel as the color compensation channel, through the adaptive compensation method, it is more universal and achieves a good underwater image color correction effect; using the CLAHE algorithm of two local areas of different scales, adjusting the pixel value through weight calculation, effectively improving the contrast of the image texture area, and reducing the appearance of noise in the flat area, better restoring the details of the image; the overall block idea is adopted to process the image, and the parallel computing method is used to realize fast image processing, which has strong practicality and can be widely promoted in the fields of image processing and so on. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0060] Figure 1 It is a flowchart of the underwater image enhancement method based on the fusion of color correction and detail restoration in Example 1.
[0061] Figure 2 This is the original image of the comparison image of the enhancement effect of the present invention on underwater images.
[0062] Figure 3 This is a color correction diagram of the contrast diagram of the enhancement effect of underwater images according to the present invention.
[0063] Figure 4 This is a detail recovery diagram of the contrast diagram of the enhancement effect of the underwater image according to the present invention.
[0064] Figure 5 This is the final comparison diagram of the enhancement effect of the present invention on underwater images. DETAILED DESCRIPTION
[0065] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 only 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 should fall within the scope of protection of the present invention.
[0066] Example 1, reference Figures 2 to 5 , which is the first embodiment of the present invention, provides an underwater image enhancement method based on the fusion of color correction and detail restoration, comprising the following steps:
[0067] S1. Adopting the adaptive bright channel color compensation formula, adaptively compensate the R, G, and B channels of the underwater image to generate a compensated color-corrected image.
[0068] S1.1. By acquiring the original underwater RGB image, an adaptive bright channel color compensation method is used to obtain a color-corrected enhanced image, which is expressed as:
[0069] ;
[0070] Among them, I CR (x, y) is the pixel value of each pixel in the R, G, and B channels of the color-corrected image after color compensation. L<> means linearly stretching the pixel value to the interval [0, 255]. C (x, y) represents the normalized pixel value at each pixel in the R, G, and B channels of the underwater attenuation image, and F(x, y) represents the adaptive pixel adjustment function. Represents the normalized mean value of the bright channel image pixel value, Represents the normalized mean value of the local pixel values of the R, G, and B channels of the underwater attenuation image;
[0071] According to the pixel value of each pixel in the R, G, and B channels of the underwater attenuation image, the bright channel image is calculated. The expression is:
[0072] ;
[0073] Among them, I L (x, y) represents the pixel value of each pixel in the bright channel image of the underwater attenuation image. CL (x,y) represents the underwater attenuation image, It means taking the maximum value of each pixel point of the R, G, and B channels of the underwater attenuation image as the value of the pixel point. Indicates maximum filtering, the maximum value in the neighborhood of the pixel point (x, y) is taken as the pixel value of the point, and the size of the filter window is 15;
[0074] By determining the size S*S of the local area, taking the value S of the local area as the size of the sliding window, and calculating the normalized mean of the pixel values in the sliding window S*S as the value of each pixel point (x, y) of the R, G, and B channels in the area , calculate the adaptive pixel adjustment function, the expression is:
[0075] ;
[0076] ;
[0077] in, It means that when the pixel value is less than 128, the attenuation is large and a larger compensation is performed. When the pixel value is greater than 128, the attenuation is small and a smaller compensation is performed. F(x,y) represents a nonlinear function.
[0078] S2. Convert the color correction image to LAB space, perform CLAHE algorithm on the L channel twice in local areas of different scales, and calculate the value of L' channel.
[0079] S2.1. By applying the CLAHE algorithm of different scales of local areas to the L channel twice, two sets of L channel values L1 and L2 are generated, and the value of the L' channel is calculated by the weighted method. The expression is:
[0080] ;
[0081] Among them, L'(x,y) represents the value of the L' channel, Represents the variance value of each pixel in the L1 channel of the local area of scale S1*S1, Represents the variance value at each pixel in the L2 channel of the local area of scale S2*S2.
[0082] S3. Based on the calculation results, the L'AB space is converted into the RGB space to obtain a detail restored image.
[0083] S3.1. By generating the value of the L' channel and the value of the AB channel into an L'AB space, the L'AB color space is converted into an RGB color space to obtain a detail restoration image.
[0084] S4, dividing the color correction image into blocks, and calculating the contrast and significance weight of the grayscale image of the sub-image after the block division and the LAB space.
[0085] S4.1. Calculate the contrast weight by converting the color correction image into a grayscale image. The expression is:
[0086] ;
[0087] in, represents the contrast weight of the color correction map, G x , G y Represents the gradient of each sub-image in the x and y directions respectively;
[0088] The significance weight is calculated by converting the color correction image RGB space to LAB space. The expression is:
[0089] ;
[0090] in, represents the significance weight of the color correction map, , , It is expressed as the mean of L, A, and B channels;
[0091] S5. Divide the detail restoration image into blocks, and calculate the contrast and significance weight of the grayscale image and LAB space of the sub-image after division.
[0092] S5.1. Calculate the contrast weight by converting the detail recovery image into a grayscale image. The expression is:
[0093] ;
[0094] in, Represents the contrast weight of the detail restoration map;
[0095] By converting the RGB space of the detail recovery image to the LAB space, the saliency weight is calculated, and the expression is:
[0096] ;
[0097] in, Represents the saliency weight of the detail recovery map.
[0098] S6. Calculate normalized weight maps of the sub-images after segmentation according to the contrast weight and the saliency weight.
[0099] S6.1. Calculate the normalized weight map based on the contrast weight and significance weight of the color correction map. The expression is:
[0100] ;
[0101] Wherein, W1 represents the normalized weight map of the color correction map;
[0102] According to the contrast weight and saliency weight of the detail recovery map, the normalized weight map is calculated, and the expression is:
[0103] ;
[0104] Among them, W2 represents the normalized weight map of the detail recovery map.
[0105] S7. Multiply the normalized weight map of each sub-image with its corresponding color correction map and detail restoration map to obtain enhanced image 1 and enhanced image 2 of the sub-image, perform fusion by adding corresponding pixels of the images, and directly splice each sub-image to obtain the final image.
[0106] S7.1, obtaining a block normalized weight map according to the contrast weight and the saliency weight;
[0107] The block normalized weight map is multiplied with the corresponding sub-image area to obtain a color correction block sub-image enhanced image 1 and a detail restoration block sub-image enhanced image 2;
[0108] Directly add enhanced images 1 and 2 to obtain an enhanced image of the sub-image area;
[0109] The sub-images are stitched and fused to get the final image.
[0110] This embodiment also provides a computer device, which is suitable for the underwater image enhancement method based on the fusion of color correction and detail restoration, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the underwater image enhancement method based on the fusion of color correction and detail restoration proposed in the above embodiment.
[0111] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0112] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the underwater image enhancement method based on color correction and detail restoration fusion as proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0113] In summary, using the bright channel as the color compensation channel through adaptive compensation is more universal and achieves a good underwater image color correction effect. The CLAHE algorithm is used twice in local areas of different scales to adjust the pixel value through weight calculation, which effectively improves the contrast of the image texture area and reduces the appearance of noise in the flat area, and better restores the details of the image. The overall block idea is used to process the image, and parallel computing is used to achieve rapid image processing. It has strong practicality and can be widely promoted in image processing and other fields.
[0114] Reference Figures 2 to 5 ,In order to further verify the advancement of the present invention, ,the experimental simulation data of the underwater image enhancement method based on ,the fusion of color correction and detail restoration are given in Table 1.
[0115] Table 1 Comparison of image enhancement effect experiments:
[0116]
[0117] Figure 2 This is an underwater greenish image. Figure 3 To color correct the image, the contrast of texture details is not obvious. Figure 4 To restore the image in detail, the contrast in the texture area is more obvious. Figure 5 For the final enhanced image, the color distortion of the image is corrected and the details of the image are restored.
[0118] 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 underwater image enhancement method based on the fusion of color correction and detail restoration, characterized in that: include, Adopting the adaptive bright channel color compensation formula, the R, G, and B channels of the underwater image are adaptively compensated to generate a compensated color-corrected image. Convert the color correction image to LAB space, perform CLAHE algorithm on the L channel twice in local areas of different scales, and calculate the value of L' channel; Based on the calculation results, the L'AB space is converted into the RGB space to obtain a detail restored image; The color correction image and detail restoration image are divided into blocks, and the contrast and saliency weight of the grayscale image and LAB space of the divided sub-image are calculated respectively; According to the contrast weight and the saliency weight, the normalized weight map of the sub-image after segmentation is calculated respectively; The normalized weight map of each sub-image is multiplied by its corresponding color correction map and detail restoration map to obtain the enhanced image 1 and enhanced image 2 of the sub-image. The corresponding pixels of the sub-images are added and fused, and each sub-image is directly spliced to obtain the final image.
2. The underwater image enhancement method based on the fusion of color correction and detail restoration as claimed in claim 1, characterized in that: Adopt the adaptive bright channel color compensation formula to adaptively compensate the R, G, and B channels of the underwater image to generate a compensated color-corrected image. The specific operations are as follows: By acquiring the original underwater RGB image and using the adaptive bright channel color compensation method, the enhanced image after color correction is obtained. The expression is: ; Among them, I CR (x, y) is the pixel value of each pixel in the R, G, and B channels of the color-corrected image after color compensation. L<> means linearly stretching the pixel value to the interval [0, 255]. C (x, y) represents the normalized pixel value at each pixel in the R, G, and B channels of the underwater attenuation image, and F(x, y) represents the adaptive pixel adjustment function. Represents the normalized mean value of the bright channel image pixel value, Represents the normalized mean value of the local pixel values of the R, G, and B channels of the underwater attenuation image; According to the pixel value of each pixel in the R, G, and B channels of the underwater attenuation image, the bright channel image is calculated. The expression is: ; Among them, I L (x, y) represents the pixel value of each pixel in the bright channel image of the underwater attenuation image. CL (x,y) represents the underwater attenuation image, It means taking the maximum value of each pixel point of the R, G, and B channels of the underwater attenuation image as the value of the pixel point. Indicates maximum filtering, the maximum value in the neighborhood of the pixel point (x, y) is taken as the pixel value of the point, and the size of the filter window is 15; By determining the size S*S of the local area, taking the value S of the local area as the size of the sliding window, and calculating the normalized mean of the pixel values in the sliding window S*S as the value of each pixel point (x, y) of the R, G, and B channels in the area , calculate the adaptive pixel adjustment function, the expression is: ; in, It means that when the pixel value is less than 128, the attenuation is large and a large compensation is performed. When the pixel value is greater than 128, the attenuation is small and a small compensation is performed. F(x,y) represents a nonlinear function.
3. The underwater image enhancement method based on the fusion of color correction and detail restoration as claimed in claim 2, characterized in that: Convert the color correction image to LAB space, perform CLAHE algorithm on the L channel twice in different scales of local areas, and calculate the value of the L' channel. The specific operations are as follows: By applying the CLAHE algorithm of different scales of local areas to the L channel twice, two sets of L channel values L1 and L2 are generated, and the value of the L' channel is calculated using the weighted method. The expression is: ; Among them, L'(x,y) represents the value of the L' channel, Represents the variance value of each pixel in the L1 channel of the local area of scale S1*S1, Represents the variance value at each pixel in the L2 channel of the local area of scale S2*S2.
4. The underwater image enhancement method based on the fusion of color correction and detail restoration as claimed in claim 3, characterized in that: Based on the calculation results, the L'AB space is converted to the RGB space to obtain the detail restored image. The specific operations are as follows: The L'AB space is formed by generating the value of the L' channel and the value of the AB channel, and the L'AB color space is converted into the RGB color space to obtain a detail restoration map.
5. The underwater image enhancement method based on the fusion of color correction and detail restoration as claimed in claim 4, characterized in that: The color correction image is divided into blocks, and the contrast and significance weight of the grayscale image and LAB space of the sub-image after block division are calculated. The specific operations are as follows: By converting the color correction image into a grayscale image, the contrast weight is calculated as follows: ; in, represents the contrast weight of the color correction map, G x , G y Represents the gradient of each sub-image in the x and y directions respectively; The significance weight is calculated by converting the color correction image RGB space to LAB space. The expression is: ; in, represents the significance weight of the color correction map, , , Expressed as the mean of L, A, and B channels.
6. The underwater image enhancement method based on the fusion of color correction and detail restoration as claimed in claim 5, characterized in that: The detail restoration image is divided into blocks, and the contrast and significance weight of the grayscale image and LAB space of the sub-image after block division are calculated. The specific operations are as follows: By converting the detail recovery image into a grayscale image, the contrast weight is calculated, and the expression is: ; in, Represents the contrast weight of the detail restoration map; By converting the RGB space of the detail recovery image to the LAB space, the saliency weight is calculated, and the expression is: ; in, Represents the saliency weight of the detail recovery map.
7. The underwater image enhancement method based on the fusion of color correction and detail restoration as claimed in claim 6, characterized in that: According to the contrast weight and saliency weight, the normalized weight map of the sub-image after segmentation is calculated. According to the contrast weight and saliency weight of the color correction map, the normalized weight map is calculated, and the expression is: ; Wherein, W1 represents the normalized weight map of the color correction map; According to the contrast weight and saliency weight of the detail recovery map, the normalized weight map is calculated, and the expression is: ; Among them, W2 represents the normalized weight map of the detail recovery map.
8. The underwater image enhancement method based on the fusion of color correction and detail restoration as claimed in claim 7, characterized in that: The normalized weight map of each sub-image is multiplied by its corresponding color correction map and detail restoration map to obtain the enhanced image 1 and enhanced image 2 of the sub-image. The corresponding pixels of the sub-images are added and fused, and each sub-image is directly spliced to obtain the final image. The specific operations are as follows: Obtain its block normalized weight map according to the contrast weight and saliency weight; The block normalized weight map is multiplied with the corresponding sub-image area to obtain a color correction block sub-image enhanced image 1 and a detail restoration block sub-image enhanced image 2; Directly add enhanced images 1 and 2 to obtain an enhanced image of the sub-image area; The sub-images are stitched and fused to get the final image.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the underwater image enhancement method based on the fusion of color correction and detail restoration as described in any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the underwater image enhancement method based on the fusion of color correction and detail restoration as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
White balance and dark primary color adaptive histogram underwater image enhancement method
CN106897972A
Underwater image enhancement method based on color correction and contrast stretching
CN110517327A