An underwater optical image enhancement method and system
By introducing dynamic color compensation and refined background light estimation technology into the underwater optical image enhancement method, the shortcomings of color shift and atomization effects elimination in the prior art are solved, and efficient enhancement and defogging treatment of underwater images are achieved.
Patent Information
- Application Number
- CN202510541511.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-04-28
AI Technical Summary
The existing underwater optical image enhancement methods have insufficient accuracy in color shift problems and atomization effect elimination in complex environments, and lack a color compensation mechanism that dynamically adapts to changes in water quality parameters.
The underwater optical image enhancement method based on dynamic color compensation and refined background light estimation is adopted. Through the design of dynamic compensation factor and block indexing strategy, dynamic correction of underwater image color and accurate estimation of background light are achieved.
It significantly improves the visual quality of underwater images, solves the problem of color distortion, improves the accuracy and consistency of image defog removal, and is suitable for diverse underwater scenes.
Smart Images

Figure CN120070288B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of underwater optical image processing, and particularly relates to an underwater optical image enhancement method and system. Background Art
[0002] Rivers, lakes, and seas play a central role in the ecosystem, providing a living space for countless aquatic organisms, animals, and plants, and also playing a key role in ecological processes such as the global carbon cycle and water cycle. In recent years, the rapid development of human society has increased the demand for underwater environment detection. During the process of detecting underwater scenes using modern technical means, acoustics and optics are two mainstream methods. Compared with acoustic data, underwater optical images are favored due to their advantages such as high resolution and rich color information. With the rapid development of marine resource development and underwater detection technology, underwater optical imaging systems play an irreplaceable role in fields such as marine ecological monitoring (coverage rate reaches 82%) and underwater engineering inspection (annual application growth rate is 37%). Under this background, how to improve the visibility of underwater optical images has become one of the forefront topics that need to be solved urgently at home and abroad.
[0003] However, the absorption and scattering effects of water medium on light cause serious quality degradation of the acquired images. The selective absorption of light with different wavelengths by water bodies causes significant color deviation in the images. The attenuation rate of the red light band reaches more than 80% at a water depth of 5 meters, resulting in serious color distortion of the imaging. At the same time, the backscattering effect caused by suspended particles in water forms a fogging phenomenon, causing the image contrast to decrease by more than 60% and the detail texture to be blurred, directly affecting the visual recognition accuracy and operation reliability of underwater equipment.
[0004] The applicability of traditional underwater image enhancement methods is seriously impaired in the face of diverse underwater optical data sets. Traditional physical models usually assume that the optical parameters of water bodies are fixed values, but the spatial variation of parameters such as turbidity and depth in actual environments can lead to model mismatch, especially in near-shore turbid waters, where the attenuation coefficient of the blue-green channel can fluctuate by more than 20%, causing color discontinuity in the corrected image. Some researchers have proposed a method based on global and local equalization of histograms and multi-scale fusion of dual images to improve the quality of images in the real world and low light; however, for underwater images taken by different underwater dedicated cameras in the same scene, the enhanced images cannot achieve consistency in background color, and do not involve images taken at turbidity levels (Bai et al, 2020). In terms of image dehazing, the applicability of traditional dark channel prior methods in underwater scenes is severely limited. The widespread use of artificial light sources has led to a lack of true dark pixels in images, and about 60% of underwater images cannot accurately estimate the background light intensity using traditional methods. Based on this, the underwater dark channel prior came into being. By eliminating the red channel that is greatly affected by the underwater environment, only the data of the blue and green channels are used as input to complete the underwater image defogging task (Drews et al, 2013). This method often misestimates the background light when there are bright objects in the image. Based on the current technical status, it is urgent to develop new enhancement methods to break through the following bottlenecks: establish a color compensation mechanism that dynamically adapts to changes in water quality parameters to solve the color deviation problem of traditional methods in complex environments; design an estimation model that can distinguish between real background light and interference reflections to improve the accuracy of eliminating the fog effect.
[0005] Traditional underwater image enhancement methods often focus on the optimization of enhancement algorithms, but lack comprehensive mechanism analysis such as tracing and grading of different underwater degraded images, which limits their applicability in diverse underwater scenes.
[0006] Through the above analysis, the problems and defects of the existing technology are as follows: the existing adaptive method adopts a fixed threshold compensation strategy, which is prone to over-compensation when the scene lighting conditions suddenly change. For example, when strong artificial lighting intervenes, it will cause loss of details in the highlight area. Although the deep learning solution performs well on specific data sets, its color mapping relationship deviates from the real physical process. When the water type changes, systematic color deviation will occur, which seriously affects the color consistency of cross-water equipment. Although the improved solution based on dark channel prior improves the estimation accuracy of some scenes through a priority strategy, it still produces significant deviations in areas containing metal reflectors or bioluminescence, resulting in local overexposure or artifacts in the dehazed image. Summary of the invention
[0007] To overcome the problems existing in the related technologies, the disclosed embodiments of the present invention provide an underwater optical image enhancement method and system, specifically an underwater optical image enhancement method based on dynamic color compensation and refined background light estimation.
[0008] The technical solution is as follows: An underwater optical image enhancement method includes the following steps:
[0009] S1, perform underwater image color correction based on a dynamic compensation factor. By evaluating the color attenuation degree of the underwater optical image, calculate the dynamic compensation factor; for the histogram distribution characteristics of the image pixels, use the pixel distribution standard deviation between different color channels to correct the color of the underwater image.
[0010] S2, based on the image color after correction of the underwater image color, use a block indexing strategy, and through recursive iteration, gradually locate until the set threshold is met to determine the background light estimation value.
[0011] S3, complete the enhancement of the underwater image based on the obtained background light estimation value.
[0012] Further, calculating the dynamic compensation factor includes: According to the gray world assumption, for a normally colored image, the average values of each color channel tend to the same value. For the color attenuation of the underwater image, the color attenuation degree is divided into three levels, including mild, moderate, and severe; define the dynamic compensation factor, and perform targeted color compensation on the image according to different color attenuation degrees. In the process of performing targeted color compensation, the color offset value is obtained as follows:
[0013] ;
[0014] In the formula, is the image before color compensation, is the mean value of
[0015] Further, for the histogram distribution characteristics between color channels, use the ratio of standard deviations to optimize the color compensation process for the position of the pixels in the image. The color correction method is expressed as:
[0016] ;
[0017] In the formula, is the image after preliminary color compensation, is the color channel with the largest pixel mean value, is the position in the image the final enhancement result of, is to solve the standard deviation, is the dynamic compensation factor, which adjusts its own value according to different degrees of color attenuation; is the position of the pixel in the image; is the mean value of , is the red channel, is the green channel, is the blue channel;
[0018] the position of the pixel in the image The process of color compensation includes:
[0019] Normalize the pixel values of each channel to the interval [0,1]; for the position of the pixel in the image The process of color compensation is expressed as:
[0020] .
[0021] In step S2, determine the background light estimation value, including:
[0022] S201, input the color-corrected underwater image;
[0023] S202, obtain the dark channel image;
[0024] S203, execute the block indexing strategy: divide the dark channel image into four sub-images of equal size; perform score statistics on the divided sub-images;
[0025] S204, by continuously iterating on the sub-region with the highest score, select the sub-image with the highest score as the background light candidate region until the size of the sub-region meets the set threshold; if it meets the set threshold, execute step S205;
[0026] S205, map this region to the color-corrected underwater input image, and select the maximum pixel value of the input image as the background light estimation value.
[0027] In step S203, the formula for calculating the score is:
[0028] ;
[0029] In the formula, is the score of this region, is the divided sub-region, is to solve the mean value, is to solve the standard deviation.
[0030] In step S204, if it does not meet the set threshold, return to step S203.
[0031] In step S205, the maximum pixel value of the input image is the point with the highest brightness.
[0032] Another object of the present invention is to provide an underwater optical image enhancement system, which implements the underwater optical image enhancement method. The system includes:
[0033] An underwater image color correction module, configured to perform underwater image color correction based on a dynamic compensation factor. By evaluating the color attenuation degree of the underwater optical image, calculate the dynamic compensation factor, and in view of the histogram distribution characteristics of the image pixels, use the pixel distribution standard deviation between different color channels to correct the color of the underwater image;
[0034] A background light estimated value determination module, configured to use a block indexing strategy based on the image color after the underwater image color is corrected, and through recursive iteration, gradually locate until a set threshold is met, and finally determine the background light estimated value;
[0035] An underwater image enhancement module, configured to complete the enhancement of the underwater image based on the obtained background light estimated value.
[0036] Furthermore, the underwater optical image enhancement system is carried on a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the functions in the above underwater optical image enhancement system can be realized.
[0037] Furthermore, the application of the underwater optical image enhancement system in an underwater optical imaging system for marine ecological monitoring and underwater engineering detection.
[0038] Combining all the above technical solutions, the beneficial effects of the present invention are as follows: In view of the complexity and heterogeneity of the underwater optical image imaging environment, the present invention proposes a foggy image enhancement strategy based on dynamic color compensation and refined background light estimation. First, a dynamic compensation color correction algorithm is proposed. This algorithm evaluates the color attenuation degree of the underwater optical image, calculates the dynamic compensation factor, and considering the histogram distribution characteristics of the image pixels, uses the pixel distribution standard deviation between different color channels to correct the image color, providing a more realistic image color for the next step of image defogging. Secondly, a refined background light estimation strategy is proposed. This method uses a block indexing strategy and through recursive iteration, gradually locates until a set threshold is met, and finally determines a more accurate background light estimated value to achieve good image defogging performance. The above two steps are used to greatly improve the visual quality of the underwater image.
[0039] The present invention can effectively contribute to the improvement of the quality of underwater images. Through the analysis of the degradation characteristics of underwater images, the color attenuation of underwater images is creatively classified, and a calculation formula for the color deviation value is defined. The present invention also proposes an underwater image color correction algorithm based on dynamic compensation. Through the creative design of the dynamic factor, it realizes the effective compensation for different degrees of color attenuation of underwater images, significantly improving the color correction effect of underwater images. The present invention also uses a block indexing strategy to achieve accurate background light indexing, thereby obtaining a more accurate transmittance, and combining with the dark channel prior to achieve a good underwater image defogging effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure;
[0041] Figure 1 is a flowchart of an underwater optical image enhancement method provided by an embodiment of the present invention;
[0042] Figure 2 is a color attenuation diagram of a certain underwater fish at different degrees provided by an embodiment of the present invention; wherein, Figure 2 in figure (a) is an image of the underwater fish one, Figure 2 in figure (b) is a pixel distribution diagram of the underwater fish one image;
[0043] Figure 3 is a color attenuation diagram of a certain underwater fish two at different degrees provided by an embodiment of the present invention; wherein, Figure 3 in figure (a) is an image of the underwater fish two, Figure 3 in figure (b) is a pixel distribution diagram of the underwater fish two image;
[0044] Figure 4 is a color attenuation diagram of a certain underwater diving activity at different degrees provided by an embodiment of the present invention; wherein, Figure 4 in figure (a) is an image of the underwater diving activity, Figure 4 in figure (b) is a pixel distribution diagram of the underwater diving activity image;
[0045] Figure 5 is a flowchart of determining the background light estimation value provided by an embodiment of the present invention;
[0046] Figure 6 is an effect diagram of the color correction result of the image with different degradation degrees according to the present invention;
[0047] Figure 7 is a comparison schematic diagram between the present invention and mainstream methods. DETAILED DESCRIPTION OF THE INVENTION
[0048] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention with reference to the accompanying drawings. Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0049] For the most common type of fogging and blurring degradation, the present invention proposes an enhancement strategy based on dynamic color compensation and refined background light estimation. Through the design of a dynamic compensation factor, effective compensation for different degrees of color attenuation is achieved. On this basis, a block indexing strategy is used to obtain a more accurate background light estimation value, and the dark channel prior is combined to solve the image fogging problem.
[0050] Example 1, as Figure 1 shown, the underwater optical image enhancement method provided by the embodiment of the present invention includes:
[0051] S1, perform underwater image color correction based on a dynamic compensation factor. By evaluating the degree of color attenuation of the underwater optical image, calculate the dynamic compensation factor; for the histogram distribution characteristics of image pixels, use the pixel distribution standard deviation between different color channels to correct the color of the underwater image;
[0052] Provide a true image color for image defogging in the next-step background light estimation;
[0053] Exemplarily, previous methods perform well in shallow water areas or environments with turbid water quality. Because in these cases, the green channel can retain more complete information compared to the red and blue channels. However, when the environment for obtaining underwater images changes (obtaining images in waters with better water quality and greater depth), the pixel values of the green channel are generally low, while the relative attenuation of the blue channel is less. At this time, this method cannot achieve effective color correction. To solve this problem, the present invention proposes an improved underwater image color correction method. In the conventional technology, the pixel values of each channel are normalized to the [0,1] interval. The process of color compensation for the pixels at position x in the image can be expressed as:
[0054] (1)
[0055] In the formula, is the image after preliminary color compensation, is the color channel with the largest pixel mean, is the position in the image is the final enhancement result, is to solve the standard deviation, is a dynamic compensation factor, which adjusts its own value according to different degrees of color attenuation; is the position of the pixel in the image; is the mean value of , is the red channel, is the green channel, is the blue channel; is the image before color compensation, is the mean value of
[0056] In practice, the present invention has found that when the color attenuation of the underwater image is relatively severe, the method of formula (1) cannot achieve an ideal enhancement effect. Through analysis, the main reasons of the existing technology are as follows:
[0057] (1) In the absorption and scattering effect of light by water medium, the attenuation degree of visible light underwater increases significantly with the increase of propagation distance. After reaching a certain depth, the information loss of the underwater image becomes very serious. At this time, relying only on the single metric value in formula (1) is difficult to accurately measure the degree of color attenuation of the image.
[0058] (2) The conventional underwater imaging model (formula (4)) does not consider the distribution characteristics of pixel values and only performs color correction based on the difference between the mean values of color channels. This method is obviously insufficient for complex color attenuation problems and is difficult to comprehensively reflect the actual degradation of the image.
[0059] According to the gray world assumption, for a normally colored image, the average values of its color channels should tend to the same value. Based on this theory, for the color attenuation problem of underwater images, the present invention divides the degree of color attenuation into three levels: mild, moderate and severe. For this purpose, a dynamic compensation factor is defined to perform targeted color compensation on the image according to different degrees of color attenuation. The definition of the dynamic compensation factor refers to Figure 2 a color attenuation map of a certain underwater fish with different degrees (a pixel distribution map of an image with mild color attenuation, where Figure 2 Figure (a) in Figure 2 is an image of a certain underwater fish,
[0060] Figure 3 a color attenuation map of a certain underwater fish with different degrees (a pixel distribution map of an image with moderate color attenuation, where Figure 3 Figure (a) in Figure 3 is an image of a certain underwater fish, Figure 4Diagrams of color attenuation to varying degrees during an underwater diving activity (image pixel distribution diagram of severe color attenuation, where Figure 4 Figure (a) in Figure 4 is the image during the underwater diving activity, and
[0061] Figure (b) in
[0062]
[0063] is the image pixel distribution diagram during the underwater diving activity); and Reference Table 1. The inventive concept of the present invention proposes that the color deviation value
[0064] is obtained as follows:
[0065] In the formula, is the image before color compensation, and is the mean value of
[0066] Meanwhile, considering the histogram distribution characteristics between color channels, the ratio of standard deviations is used to further optimize Formula (1). The inventive concept of the present invention finally proposes that the color correction method is expressed as:
[0067] ;
[0068] In the formula, is the image after preliminary color compensation, is the color channel with the largest pixel mean value, is the image before color compensation, is the mean value of is the position of the pixel in the image is the final enhancement result at the position is to solve the standard deviation, is the dynamic compensation factor, which adjusts its own value according to different degrees of color attenuation; is the position of the pixel in the image; is the mean value of , is the red channel, is the green channel, is the blue channel;
[0069] The position of the pixel in the image The color compensation process includes: Although color correction is an essential step in underwater image enhancement, it cannot solve the problem of fogging blur caused by the scattering effect. This is because the scattering effect will cause the loss of edge and detail information. Therefore, the present invention subsequently proposes a method capable of obtaining a more accurate background light estimation value for defogging underwater images.
[0070] S2. Based on the color of the image after color correction of the underwater image, using the block indexing strategy, through recursive iteration, gradually locate until the set threshold is met to determine the background light estimation value;
[0071] Finally, a more accurate background light estimation value is determined to achieve good image defogging performance.
[0072] Exemplarily, according to the Jaffe-McGlamey underwater optical imaging model, the information obtained by the optical image acquisition device mainly consists of three parts: (1) Direct component (DC): The part of the light directly reflected from the object surface to the camera; (2) Forward scattering component (FSC): The part of the light that reaches the camera after scattering after deviating from the original direction; (3) Backward scattering component (BSC): The part of the light that interacts with water particles and scatters before being reflected to the camera. Generally, due to the small distance between the object and the camera, the influence caused by the forward scattering component (FSC) can be ignored. The underwater imaging model can be simplified as:
[0073] (4)
[0074] In the formula, is the direct component (DC), is the backward scattering component (BSC), are the color channel intensity values of the underwater image captured by the camera and the non-degraded underwater image at the image position respectively, is the uniform background light, is the medium transmittance, and the expression is:
[0075] (5)
[0076] In the formula, is the distance between the target scene and the camera, is the attenuation coefficient of the target scene.
[0077] Dark channel prior is a priori knowledge obtained based on the statistics of outdoor fog-free images. In the local areas of most non-sky regions, some pixels usually exhibit extremely low intensities in at least one color channel (RGB). The present invention collects and analyzes a large number of outdoor images. By establishing a histogram, it can be seen that about 75% of the pixel intensities in the dark channel are zero, and 90% of the pixel intensities are lower than 25. These statistical results provide strong theoretical support for the dark channel prior hypothesis. The dark channel is defined as:
[0078] (6)
[0079] In the formula, is the dark channel image at the pixel of ; is the local pixel block, such as 3*3, 5*5 in size; is a certain color channel among the three channels, is the pixel within the region of a certain color channel among the three channels, is the three channels in the RGB image, is red, is green, is blue; is the local pixel block centered at the pixel at the
[0080] By transforming formula (4), we can obtain:
[0081] ;
[0082] In each local window the transmittance is a constant . By performing the minimum operation twice on both sides of the above formula, we get:
[0083] ;
[0084] According to the dark channel prior theory and formula (6), we know that:
[0085] ;
[0086] That is:
[0087] ;
[0088] Considering formula (4) and formula (6), in order to obtain a more accurate background light, the present invention uses the image captured by the camera and the background light To estimate the transmittance , the expression is as follows:
[0089] (7)
[0090] Considering that when the transmittance is very small, it will cause the pixel value of the restored image to be too large, resulting in the overall image transitioning to the white field. Generally, a threshold is set for constraint. The formula for the final image defogging is as follows:
[0091] (8)
[0092] It can be seen from formula (8) that as long as the present invention can obtain accurate background light and transmittance a clear image can be restored. However, directly applying the dark channel prior to the defogging of underwater optical images does not achieve ideal results.
[0093] Therefore, the present invention proposes a process for determining the estimated value of the background light, as Figure 5 shown. The refined background light estimation of the present invention is based on the underwater image after color correction. After color correction, the color deviation of the underwater image is restored to a certain extent. At this time, the phenomenon of fogging and blurring is closer to the state of outdoor foggy images, and the advantage of the dark channel prior can be better exerted. In the past, when there were over-bright non-background light objects in the image, the background light was often misestimated, which in turn affected the estimated value of the transmittance. To address this problem, the present invention utilizes the characteristics of continuous background light regions with relatively high pixel values and adopts a block search method to estimate the background light region.
[0094] The determination of the estimated value of the background light includes:
[0095] S201, input the underwater image after color correction;
[0096] S202, obtain the dark channel image;
[0097] S203, execute the block indexing strategy: divide the dark channel image into four sub-images of equal size; perform score statistics on the divided sub-images;
[0098] For the score statistics of the divided sub-images, the present invention innovatively proposes that the formula for calculating the score is:
[0099] (9)
[0100] In the formula, is the score of this region, is the divided sub-region, is to solve the mean value, To solve for the standard deviation.
[0101] S204. By continuously iterating on the sub-region with the highest score, select the sub-image with the highest score as the candidate background light region until the size of the sub-region meets the threshold set in the present invention (the size of the sub-image after segmentation, the threshold is the size (dimension) of the sub-image after segmentation, such as 32*32, and stop iterating after the size is less than this value); if it does not meet the threshold set in the present invention, return to step S203; if it meets the threshold set in the present invention, execute step S205;
[0102] S205. Map this region onto the color-corrected underwater input image, and select the maximum pixel value of the said input image as the estimated background light value.
[0103] S3. Based on the obtained estimated background light value, complete the enhancement of the underwater image.
[0104] As can be seen from the above embodiments, the present invention calculates the dynamic compensation factor by evaluating the color attenuation degree of the underwater optical image through a color correction algorithm. Considering the histogram distribution characteristics of the image pixels, the color restoration is constrained by using the standard deviation of the pixel distribution between different color channels. Using a block indexing strategy, through recursive iteration, gradually locate the region where the background light is located; the present invention solves the problem of inaccurate image color correction; solves the problem of incomplete color restoration of images with different degrees of color attenuation; and improves the accuracy of background light estimation by combining block indexing.
[0105] Embodiment 2. The present invention provides an underwater optical image enhancement system, which includes:
[0106] An underwater image color correction module, used for performing underwater image color correction based on the dynamic compensation factor, calculating the dynamic compensation factor by evaluating the color attenuation degree of the underwater optical image, and correcting the color of the underwater image by using the standard deviation of the pixel distribution between different color channels for the histogram distribution characteristics of the image pixels;
[0107] A background light estimated value determination module, used for determining the estimated background light value by using the block indexing strategy, through recursive iteration, gradually locating until the set threshold is met, based on the image color after the underwater image color is corrected;
[0108] An underwater image enhancement module, used for completing the enhancement of the underwater image based on the obtained estimated background light value.
[0109] To further illustrate the relevant effects of the embodiments of the present invention, the following experiments are carried out.
[0110] Color correction effect verification: The present invention selects underwater optical images containing a standard 24-color card for verifying the color restoration degree. The comparison results with the standard 24-color card show that the method of the present invention can achieve satisfactory effects, and the colors on the color card are accurately restored. Each picture in the image dataset used in the present invention is taken with a different camera, which indicates that the color correction method proposed by the present invention is not affected by camera parameters.
[0111] Dynamic compensation for different degradation degrees: As Figure 6 As shown in the color correction result effect diagrams of images with different degradation degrees, the present invention selects three underwater images with different degradation degrees and conducts a comparative experiment with a classical method. The experimental results show that for images with relatively severe color attenuation, the method of the present invention is significantly superior to the classical method in terms of color correction effect.
[0112] The present invention verifies the effectiveness of the proposed underwater image enhancement method by completing the process of obtaining clear underwater optical images after color correction and image dehazing of the images, and compares it with representative methods. The images used in the experiments of the present invention are all based on publicly available real underwater optical image datasets on the network (UIEB, EUVP, OceanDark, etc.).
[0113] Figure 7 For the comparison schematic between the present invention and mainstream methods, the last column is the result diagram of the present invention; the experiment shows that in image dehazing of the present invention, the optimization of background light estimation based on the block indexing strategy is carried out on the image after color correction. During the iterative process, the characteristic that the pixel intensity in the background light area is relatively high ensures that the sub-image containing the background light has a relatively large pixel average value. At the same time, the continuity of the background light distribution ensures that the standard deviation of the sub-image where the background light is located is relatively small.
[0114] As mentioned above, only the relatively optimal specific implementation manners of the present invention are described, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall all be covered by the protection scope of the present invention.
Claims
1. An underwater optical image enhancement method, characterized in that: The method comprises the following steps: S1, performs underwater image color correction based on dynamic compensation factors, calculates the dynamic compensation factors by evaluating the color attenuation of underwater optical images; and corrects the underwater image color by using the standard deviation of pixel distribution between different color channels based on the histogram distribution characteristics of image pixels; S2, based on the image color corrected by the underwater image color, using the block indexing strategy, through recursive iteration, gradually locate until the set threshold is met, and determine the background light estimation value; S3, based on the obtained background light estimation value, the underwater image is enhanced.
2. The underwater optical image enhancement method according to claim 1, characterized in that: In step S1, the dynamic compensation factor is calculated, including: according to the grayscale world assumption, for a normal color image, the average values of each color channel tend to the same value, and for the color attenuation of the underwater image, the color attenuation degree is divided into three levels, including light, medium and heavy; the dynamic compensation factor is defined, and the image is subjected to targeted color compensation according to different degrees of color attenuation. In the targeted color compensation, the color deviation value The acquisition formula is as follows: ; In the formula, is the image before color compensation, for The mean of .
3. The underwater optical image enhancement method according to claim 2, characterized in that: According to the histogram distribution characteristics between color channels, the ratio of standard deviation is used to compare the position of pixels in the image. The color compensation process is optimized and the color correction method is expressed as: ; In the formula, is the image after preliminary color compensation, is the color channel with the largest pixel mean, is the position in the image The final enhancement result is To solve for the standard deviation, It is a dynamic compensation factor, which adjusts its value according to the degree of color attenuation; is the position of the pixel in the image; for The mean of , is the red channel, For the green channel, is the blue channel; The location of the pixel in the image The color compensation process includes: Normalize the pixel value of each channel to the interval [0,1]; The process of color compensation is expressed as: 。 4. The underwater optical image enhancement method according to claim 1, characterized in that: In step S2, determining a background light estimation value includes: S201, inputting a color-corrected underwater image; S202, acquiring a dark channel image; S203, executing a block indexing strategy: dividing the dark channel image into four sub-images of equal size; and performing score statistics on the divided sub-images; S204, by continuously iterating the sub-region with the highest score, selecting the sub-image with the highest score as the background light candidate region, until the size of the sub-region meets the set threshold; if it meets the set threshold, executing step S205; S205, mapping the area to the underwater input image after color correction, and selecting the maximum pixel value of the input image as the background light estimation value.
5. The underwater optical image enhancement method according to claim 4, characterized in that: In step S203, the score calculation formula is: ; In the formula, is the score for this area, is the segmented sub-region, To find the mean, To solve for the standard deviation.
6. The underwater optical image enhancement method according to claim 4, characterized in that: In step S204, if it does not meet the set threshold, return to step S203.
7. The underwater optical image enhancement method according to claim 4, characterized in that: In step S205, the maximum pixel value of the input image is the point with the highest brightness.
8. An underwater optical image enhancement system, characterized in that: The system implements the underwater optical image enhancement method according to any one of claims 1 to 7, and the system comprises: The underwater image color correction module is used to perform underwater image color correction based on the dynamic compensation factor. The dynamic compensation factor is calculated by evaluating the color attenuation degree of the underwater optical image, and the color of the underwater image is corrected by using the standard deviation of the pixel distribution between different color channels according to the histogram distribution characteristics of the image pixels. A background light estimation value determination module is used to determine the background light estimation value based on the image color corrected by the underwater image color, using a block indexing strategy, through recursive iteration, gradually locating until a set threshold is met; The underwater image enhancement module is used to enhance the underwater image based on the obtained background light estimation value.
9. The underwater optical image enhancement system according to claim 8, characterized in that: The underwater optical image enhancement system is mounted on a computer-readable storage medium, and the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the functions of the underwater optical image enhancement system can be realized.
10. The underwater optical image enhancement system according to claim 8, characterized in that: The underwater optical image enhancement system is applied to underwater optical imaging systems for marine ecological monitoring and underwater engineering inspection.
Citation Information
Patent Citations
Underwater image enhancement method based on foreground model
CN106780368A
Underwater image defogging and color cast correction method based on bright channel transmissivity compensation
CN110322410A