Bayesian retinex deep-sea image enhancement method based on multi-constraint prior
By employing a Bayesian Retinex method based on multi-constraint priors, and combining smoothing, structure, and non-uniform illumination priors, the problems of color distortion and non-uniform illumination in deep-sea images are solved, thereby achieving image sharpening and improving image quality and computational efficiency.
Patent Information
- Application Number
- CN202210986322.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-17
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-08-17
AI Technical Summary
The image quality degradation problems of deep-sea images caused by artificial light sources, such as color distortion, scattering blur, and uneven illumination, are difficult to solve effectively.
We employ the Bayesian Retinex method based on multiple constraints priors, combining smoothness priors, structure priors, and priors for bright areas under uneven illumination. We decompose deep-sea images using a Bayesian model, adaptively adjust brightness using a gradient descent strategy, and perform gamma correction to optimize the illumination map.
It effectively restores the natural colors of deep-sea images, improves illumination uniformity, avoids over-enhancement, ensures the natural appearance of images and efficient computation, and is suitable for various deep-sea environments.
Smart Images

Figure CN115393209B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to computer image processing methods, specifically to a Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors; a method for image processing of deep-sea images to improve the clarity of deep-sea images that suffer from image degradation. Background Technology
[0002] Underwater image enhancement has always been a research hotspot in the field of computer image processing. In recent years, the development and utilization of marine resources have been continuously advancing, and my country is making steady progress toward the goal of becoming a maritime power. Research on deep-sea underwater image enhancement will also contribute to the development and research of deep-sea organisms and geographical resources.
[0003] In the field of underwater image restoration and enhancement, many scholars both domestically and internationally have achieved significant results through continuous research. Galdran A et al. proposed a method for underwater image color restoration using red light wave compensation by studying the phenomenon of underwater light wave absorption. Jie Li et al. proposed a CNN-based underwater image color correction model, which is based on synthetic underwater images generated through weakly supervised learning. Ancuti C et al. proposed a fusion-based method that fuses contrast-improved underwater images with color-corrected underwater images obtained from the input, and uses four weights to determine which pixel is more likely to appear in the final image during multi-scale fusion. Chongyi Li et al. proposed a fusion method based on color correction and underwater image deblurring, which uses image color prior to correct the color projection of underwater images and improves visibility through an improved image deblurring algorithm. Drews P et al. proposed an Underwater Dark Channel Prior (UDCP) method to process underwater images based on the previous Dark Channel Prior (DCP) method, and achieved good results. Wenhao Zhang et al. calculated the mean and variance of the eigenvalues of the three color channels in the RGB space of underwater images, achieving the effect of restoring the natural colors of underwater images while enhancing image contrast (VCIP). Summary of the Invention
[0004] The purpose of this invention is to provide a Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors. This method can achieve the effect of sharpening deep-sea images and effectively solve the image degradation problems caused by artificial light source illumination, such as color distortion, scattering blur, and uneven illumination.
[0005] The objective of this invention is achieved through the following technical solution:
[0006] A Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors is proposed. The deep-sea image enhancement process includes the following steps:
[0007] Step 1: Use a statistically based effective color correction method to perform color correction processing on the deep-sea underwater image to restore its color to the normal image color;
[0008] Step 2: Use a Bayesian model to combine smoothness priors, structure priors, and non-uniform illumination highlight region priors to describe the deep-sea image decomposition process in Retinex theory;
[0009] Step 3: Convert the pre-corrected deep-sea underwater image from RGB space to Lab space, select the L component representing the brightness value as the initial illumination value, and perform calculations;
[0010] Step 4: Enhance the illumination map of the deep-sea underwater image using a Bayesian estimation Retinex method based on multiple constraint priors (smoothness prior, structure prior, and non-uniform illumination highlight region prior).
[0011] Step 5: Adaptively adjust the brightness value of the bright areas in the unevenly lit deep-sea underwater image using a gradient descent strategy;
[0012] Step 6: Optimize the illumination map using an approximate estimation method;
[0013] Step 7: Use gamma correction to process the enhanced lighting to make it smoother, and convert the enhanced deep-sea image back from the Lab color space to the RGB color space.
[0014] Complete deep-sea image enhancement.
[0015] The color correction of deep-sea images includes:
[0016] Step 1.1: Calculate the image values in the original RGB deep-sea image. U The mean and mean variance;
[0017] Step 1.2: Calculate the minimum and maximum values of each of the three RGB channels using the formulas;
[0018]
[0019] Step 1.3: Obtain the color-corrected image using the formula.
[0020]
[0021] in and Representing images respectively UThe maximum and minimum values of the image in the R, G, and B channels. and Represents the mean and the variance of the mean. It is a parameter used to adjust the saturation of underwater image enhancement results. Based on experience, it is usually... Set to 2.5. U CR This represents the color-corrected image. The final color-corrected RGB image is obtained through the calculation using the formula above.
[0022] Step 2 specifically includes the following steps:
[0023] Step 2.1: Based on Retinex theory, the color-corrected deep-sea image... U CR Represented as the product of the illumination diagram L and the reflection diagram R:
[0024] ;
[0025] Step 2.2: Using a Bayesian model, the smoothness prior, structure prior, and uneven illumination highlight region prior are combined to describe the image decomposition process in the Retinex theory above. U CR As an observed image, L, R, and Q are considered as a set of hypothetical model parameters. Assuming that the model parameters are independent, then:
[0026]
[0027] Known U CR The key to the problem is to deduce all the unknowns based on the maximum a posteriori principle, which is:
[0028]
[0029] Step 2.3: Based on the Retinex theoretical formula The above prior Bayesian model can be simplified to:
[0030]
[0031] Therefore, it can be inferred that the prior conditions only include the prior for the illumination diagram L, which simplifies the analysis and solution steps.
[0032] Step 3 specifically includes the following steps:
[0033] Step 3.1: Convert the deep-sea underwater image after color correction in Step 1 from the RGB color space to the Lab color space;
[0034] Step 3.2: Select the L component in the Lab color space as the initial illumination value.
[0035] Step 4 specifically includes the following steps:
[0036] Step 4.1: In the method for solving the illumination map L, redefine the prior. Applying this to a Bayesian framework model, the optimization formula for the illumination map L becomes:
[0037]
[0038] In the formula, This represents the coefficient between the two balancing terms. and Represent and Regular terms Derived from the prior terms of the lighting diagram , Represents the initial lighting diagram. It is the weight matrix in the structural prior;
[0039] Step 4.2: Define the smoothing prior. In the spatial smoothing prior, the total variation regularization term is widely used to make the illumination map region smooth. Therefore, smooth prior is reflected in middle;
[0040] Step 4.3: Define structural priors. It is the weight matrix in the structural prior, so the structural prior is reflected in middle;
[0041]
[0042] Step 4.4: Define the prior for the highlighted regions under non-uniform illumination. To simultaneously ensure the region smoothness prior and the structure prior in the estimation of the illumination map, this method incorporates the prior condition for the highlighted regions under non-uniform illumination into the optimization formula of the illumination map L. In this project, a non-uniform illumination highlight region and structure-aware smoothing regularization technique were used to optimize the illumination map. During the optimization process, three prior conditions worked together.
[0043] Step 5 specifically includes the following steps:
[0044] Step 5.1: In the process of solving the weight matrix, the gradient of the initial lighting map is used. Adjusted gradient As a weight matrix The parameters to be solved. The weight matrix. Set as:
[0045]
[0046] Step 5.2: To more reasonably adjust the gradient in the bright areas of uneven illumination, the method of this invention designs a nonlinear smooth function. Z ( x The gradient acting on the initial lighting map This allows us to obtain the adjusted gradient. Then we have:
[0047]
[0048] Step 5.3: Define the unevenly illuminated high-brightness regions in the deep-sea image. This method uses gradient thresholding. H To define unevenly illuminated high-brightness regions in deep-sea images, exceeding a gradient threshold. H The portion identified as unevenly lit, high-brightness areas in the deep-sea image was processed using gradient descent. To ensure the overall gradient descent processing was reasonable and the processed lighting had a natural appearance, the gradient reduction factor was adaptively adjusted based on the brightness level: higher brightness areas received a larger reduction factor, while lower brightness areas received a smaller reduction factor. For areas less than or equal to a gradient threshold... H For the part where the gradient remains unchanged, it is represented by a multiple of 1.
[0049] Step 5.4: Define the nonlinear smooth function Z ( x When the brightness value of the initial illumination map From the highest point to H When decreasing, the corresponding Z ( x The value should decrease smoothly until it reaches 1. To make... Z ( x The value decreases smoothly, and the method of this invention uses parameters. To control the speed of descent. Z ( x The function is defined as:
[0050]
[0051] Step 5.5: Define parameters and gradient threshold H ,
[0052]
[0053] In the formula: Represents the reduction factor. Represents the initial lighting diagram The average brightness, taken here. ;
[0054] For the initial lighting diagram The depth distribution generally follows a Gaussian distribution, and this method uses an interval... The left endpoint is used as the gradient threshold. H ,
[0055]
[0056] In the formula: Represents the initial lighting diagram The average brightness Represents the initial lighting diagram The standard deviation of brightness.
[0057] Step 6 specifically includes the following steps:
[0058] Step 6.1: Quickly solve the optimization formula for the illumination diagram L:
[0059]
[0060] Step 6.2: Use To approximate estimate
[0061]
[0062] Step 6.3: Convert the illumination diagram L formula in Step 6.1 to:
[0063]
[0064] This optimization formula contains only quadratic terms. By taking the derivative of this formula with respect to L and setting the derivative to 0, we obtain the following formula:
[0065]
[0066] in, E Represents an identity matrix. These represent vectors in their respective directions. This represents a diagonal matrix, whose diagonal elements are... . D d and D v It is the forward difference matrix representing the discrete gradient operator.
[0067] Step 6.4: Calculate the final output vector By restoring the original image to its original size, the optimized lighting image L can be obtained.
[0068] Step 7 specifically includes the following steps:
[0069] Step 7.1: Adjust the obtained illumination image L using gamma correction, including adjustment parameters. The L adjustment formula can be written as:
[0070]
[0071] In the formula, M and Typically set to 255 and 2.2, the final enhanced image is as follows:
[0072]
[0073] Step 7.2: Finally, convert the enhanced image from the Lab color space to the RGB color space to obtain the final enhanced clear deep-sea underwater image for output.
[0074] The present invention has the following beneficial effects and advantages:
[0075] Based on a thorough analysis and understanding of the imaging principles of deep-sea images, this invention incorporates smoothness priors, structure priors, and non-uniform illumination highlight region priors into the illumination map estimation. These three prior conditions are then integrated into the Bayesian model. This design ensures that the estimated illumination map of deep-sea images is smooth in terms of region, complete in terms of structure, and uniform in terms of illumination.
[0076] The color-corrected deep-sea image is converted from the RGB color space to the Lab color space. The L component in the Lab color space is selected as the initial illumination map for the optimal solution of illumination map estimation, which reduces the computational complexity and improves the computational efficiency.
[0077] This invention designs and employs an adaptive gradient descent strategy to adaptively adjust the brightness of bright areas under uneven lighting. The gradient descent factor is determined based on the pixel brightness value of the bright area, and different brightness areas have different descent factors. This design avoids unnatural results in bright areas under uneven lighting during the gradient descent process.
[0078] 2. The focus of this invention is to enhance deep-sea underwater images, ensuring the restoration of natural colors, improving the rationality of illumination map optimization, reducing the computational complexity of illumination map optimization, avoiding over-enhancement of deep-sea underwater images, and ensuring the universality of this method for deep-sea image enhancement. Attached Figure Description
[0079] Figure 1 This is a flowchart of the method of the present invention;
[0080] Figure 2(1) is a deep-sea underwater imaging model diagram;
[0081] Figure 2 (2) is a schematic diagram of artificial light absorption in the deep sea;
[0082] Figure 3(1) is the original ordinary underwater image;
[0083] Figure 3(2) is the original deep-sea underwater image;
[0084] Figure 4 This is a comparison chart showing the effects of this invention on processing deep-sea images with traditional methods;
[0085] Figure 5 This is a comparison chart of evaluation indicators for deep-sea image processing using the present invention and traditional methods. Detailed Implementation
[0086] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0087] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0088] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0089] like Figure 1 As shown, this invention provides a Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors, comprising the following steps:
[0090] Step 1: Use a statistically based effective color correction method to perform color correction processing on the deep-sea underwater image to restore its color to the normal image color;
[0091] As shown in Figure 2, the yellow line represents the light emitted by artificial light sources in the deep sea. Part of this light is absorbed by the seawater, part is blocked by planktonic particles in the deep sea, and part reaches the surface of the target object. The dashed lines represent forward-scattered and back-scattered light, while the direct light is the portion of the light that directly reaches the camera surface from the target object.
[0092] As can be seen from the deep-sea underwater image imaging model analysis in Figure 2 and the underwater image example in Figure 3, due to light absorption in the deep sea, deep-sea underwater images often appear blue-green. In this method, color correction is first performed to eliminate the interference of color distortion on deep-sea image restoration. First, in the original RGB deep-sea image, the image is calculated separately. U The mean and mean variance of the RGB channels are calculated; then the minimum and maximum values of each channel in the RGB channels are calculated using the formula.
[0093]
[0094] Finally, the color-corrected image is obtained using a formula.
[0095]
[0096] in and Representing images respectively The maximum and minimum values of the image in the R, G, and B channels. and Represents the mean and the variance of the mean. It is a parameter used to adjust the saturation of underwater image enhancement results. Based on experience, it is usually... Set to 2.5. U CR This represents the color-corrected image. The final color-corrected RGB image is obtained through the calculation using the formula above.
[0097] Step 2: Use a Bayesian model to combine smoothness priors, structure priors, and non-uniform illumination highlight region priors to describe the deep-sea image decomposition process in Retinex theory;
[0098] As can be seen from the direct comparison of ordinary underwater images and deep-sea underwater images in Figure 3, the biggest difference between deep-sea underwater images and ordinary underwater images is that, due to the artificial light source used for framing, deep-sea images mostly exhibit uneven illumination. These areas of uneven illumination pose a certain obstacle to the enhancement and restoration of deep-sea images. Therefore, in the process of enhancing and restoring deep-sea illumination images, it is necessary to ensure the restoration of uniform illumination.
[0099] According to Retinex theory, the color-corrected deep-sea images U CR Represented as the product of the illumination diagram L and the reflection diagram R:
[0100] ;
[0101] The image decomposition process in the Retinex theory above is described by combining smoothness prior, structure prior, and non-uniform illumination highlight region prior using a Bayesian model. U CR As an observed image, L, R, and Q are considered as a set of hypothetical model parameters. Assuming that the model parameters are independent, then:
[0102]
[0103] Known U CR The key to the problem is to deduce all the unknowns based on the maximum a posteriori principle, which is:
[0104]
[0105] According to the Retinex theoretical formula The above prior Bayesian model can be simplified to:
[0106]
[0107] Therefore, it can be inferred that the prior conditions only include the prior for the illumination diagram L, which simplifies the analysis and solution steps.
[0108] Step 3: Convert the pre-corrected deep-sea underwater image from RGB space to Lab space, select the L component representing the brightness value as the initial illumination value, and perform calculations;
[0109] The original RGB deep-sea image presents computational complexity during image enhancement. Therefore, in order to speed up the calculation and reduce its complexity, the color-corrected deep-sea underwater image is converted from the RGB color space to the Lab color space, and the L component in the Lab color space is directly selected as the initial illumination value.
[0110] Step 4: Enhance the illumination map of the deep-sea underwater image using a Bayesian estimation Retinex method based on multiple constraint priors (smoothness prior, structure prior, and non-uniform illumination highlight region prior).
[0111] In the method for solving the illumination map L, the prior is redefined. Applying this to a Bayesian framework model, the optimization formula for the illumination map L becomes:
[0112]
[0113] In the formula, This represents the coefficient between the two balancing terms. and Represent and Regular terms Derived from the prior terms of the lighting diagram , Represents the initial lighting diagram. W It is the weight matrix in the structural prior;
[0114] In spatial smoothing priors, total variation regularization terms are widely used to smooth the illumination map region. Therefore, the smooth prior is reflected in it;
[0115] W It is the weight matrix in the structural prior, so the structural prior is reflected in W middle;
[0116]
[0117] To simultaneously preserve both region smoothness and structure priors in the estimation of illumination maps, this method incorporates the prior condition of highlighted regions under non-uniform illumination into the optimization formula for illumination map L. In this project, a non-uniform illumination highlight region and structure-aware smoothing regularization technique were used to optimize the illumination map. During the optimization process, three prior conditions worked together.
[0118] Step 5: Adaptively adjust the brightness value of the bright areas in the unevenly lit deep-sea underwater image using a gradient descent strategy;
[0119] In solving the weight matrix, this method uses the gradient of the initial illumination map. Adjusted gradient As a weight matrix W The parameters to be solved. The weight matrix. W Set as:
[0120]
[0121] To more effectively adjust the gradient in the bright areas of uneven illumination, the method of this invention designs a nonlinear smooth function. Z ( x The gradient acting on the initial lighting map This allows us to obtain the adjusted gradient. Then we have:
[0122]
[0123] The method of this invention uses gradient thresholding H To define unevenly illuminated high-brightness regions in deep-sea images, exceeding a gradient threshold. HThe portion identified as unevenly lit, high-brightness areas in the deep-sea image was processed using gradient descent. To ensure the overall gradient descent processing was reasonable and the processed lighting had a natural appearance, the gradient reduction factor was adaptively adjusted based on the brightness level: higher brightness areas received a larger reduction factor, while lower brightness areas received a smaller reduction factor. For areas less than or equal to a gradient threshold... H For the part where the gradient remains unchanged, it is represented by a multiple of 1.
[0124] When the brightness value of the initial lighting map From the highest point to H When decreasing, the corresponding Z ( x The value should decrease smoothly until it reaches 1. To make... Z ( x The value decreases smoothly; this method uses parameters. To control the speed of descent. Z ( x The function is defined as:
[0125]
[0126] To enable this method to process more types of deep-sea images, the parameters were adjusted. and gradient threshold H Define:
[0127]
[0128] In the formula: Represents the reduction factor. Represents the initial lighting diagram The average brightness, taken here. ;
[0129] For the initial lighting diagram The depth distribution generally follows a Gaussian distribution, and this method uses an interval... The left endpoint is used as the gradient threshold. H ,
[0130]
[0131] In the formula: Represents the initial lighting diagram The average brightness Represents the initial lighting diagram The standard deviation of brightness.
[0132] Step 6: Optimize the illumination map using an approximate estimation method;
[0133] A fast solution is provided for the optimization formula of the illumination diagram L:
[0134]
[0135] use To approximate estimate
[0136]
[0137] Convert the formula for illumination diagram L to:
[0138]
[0139] This optimization formula contains only quadratic terms. By taking the derivative of this formula with respect to L and setting the derivative to 0, we obtain the following formula:
[0140]
[0141] in, E Represents an identity matrix. These represent vectors in their respective directions. It is a diagonal element diagonal matrix, D d and D v It is the Toplitz matrix obtained by forward difference of the discrete gradient operator.
[0142] Solve for the vector Then, it is transformed back to the size of the original image to obtain the illumination image L.
[0143] Step 7: Use gamma correction to process the enhanced lighting to make it smoother, and convert the enhanced deep-sea image back from the Lab color space to the RGB color space.
[0144] Since over-enhancing of the reflection image R may occur during the image illumination enhancement adjustment process, this invention employs gamma correction to adjust the obtained illumination image L based on the above operations, including adjustment parameters. The L adjustment formula can be written as:
[0145]
[0146] In the formula, M and Typically set to 255 and 2.2, the final enhanced image is as follows:
[0147] Finally, the enhanced image is converted from the Lab color space to the RGB color space to obtain the final enhanced clear deep-sea underwater image for output.
[0148] Complete deep-sea image enhancement.
[0149] To verify the effectiveness and stability of the method of this invention for deep-sea image enhancement, several advanced underwater image enhancement algorithms, including RED, UDCP, and VCIP, were selected for comparison. Real deep-sea images collected by the "Striver" full-ocean-depth manned submersible at a depth of 10,000 meters in the Mariana Trench were used as the research object. The images were enhanced using the aforementioned algorithms and the method of this invention, respectively. The resulting image enhancement results are shown below. Figure 4 As shown.
[0150] Subjective Evaluation: Overall, it can be seen that the method proposed by RED, when processing deep-sea underwater images, more or less causes overcompensation of the red channel, resulting in the enhanced deep-sea image appearing reddish. The method proposed by UDCP, when processing deep-sea images, clearly shows that the enhanced deep-sea image is clearer than the original image, achieving the effects of dehazing and enhancement, but the enhanced deep-sea image still has color distortion. The method proposed by VCIP produces a more pleasing deep-sea image than the previous two methods, but due to the severe uneven lighting in deep-sea images, the resulting image still has blurring caused by lighting. The deep-sea underwater image processed by the algorithm of this invention is more effective in both image color correction and handling uneven lighting blurring, and the resulting image can clearly observe the seabed topography, organisms, etc. at depths of 10,000 meters.
[0151] In detail, due to the artificial light source used for framing deep-sea images, the images all exhibit uneven illumination. Furthermore, Image 1 shows green distortion and blurring. In the detail processing of Image 1, the methods proposed by RED and UDCP have a certain impact on the observation of seabed rock formations. The VCIP method can reveal the general shape of the rocks after image enhancement. The method of this invention, in processing Image 1, can remove the effects of illumination blurring, clearly showing the true color and outline of the rocks, making their shapes clearer. The original image of Image 2 shows blue distortion and blurring; the method proposed by RED causes severe distortion in Image 2. The image exhibits severe color cast and whitening. While UDCP removes the haze, it exacerbates color distortion. Compared to VCIP, the method of this invention provides greater clarity in the central highlight area and rock outlines of image 2. The original image in image 3 appears pale yellow-green. Compared to RED and UDCP, the method of this invention demonstrates better color correction. Furthermore, compared to VCIP, the upper left area of image 3 processed by this invention clearly shows some transparent sea cucumbers from the 10,000-meter deep seabed, while the image processed by VCIP does not clearly show sea cucumbers due to lighting blur.
[0152] Objective evaluation: The enhanced image is objectively evaluated using three commonly used objective image quality evaluation metrics: natural image quality evaluator (NIQE), structural similarity index (SSIM), and peak signal-to-noise ratio (PSNR).
[0153] NIQE represents the natural statistical properties of an image. A higher NIQE value indicates a greater difference from a natural image and lower quality. SSIM, or structural similarity, measures the brightness, contrast, and structural information of two images. It is a number between 0 and 1, with a maximum value of 1. It particularly reflects the similarity of image contours and details. A higher SSIM value indicates higher similarity between the two images, meaning less image distortion and a closer resemblance to the original image. PSNR is measured in dB; a higher value indicates less distortion.
[0154] In summary, the above three parameters are mainly considered to judge the quality of an image. The objective evaluation indicators are as follows: Figure 5 As shown. From Figure 5As can be seen, in terms of PSNR and SSIM metrics, the VCIP method and the method of this invention significantly outperform the RED and UDCP methods, while the method of this invention outperforms the VCIP method. This indicates that the deep-sea images processed by the proposed method have high structural similarity and low distortion. After processing by the method of this invention, the NIQE values of the three images are 2.79, 3.48, and 3.58, respectively, which are significantly lower than the NIQE values of the images processed by the other three methods. This indicates that the deep-sea images processed by the method of this invention have a smaller difference from natural images and possess excellent quality. These data metrics objectively demonstrate the effectiveness of the method of this invention in enhancing deep-sea underwater images.
[0155] It should be emphasized that the embodiments described in this invention are illustrative rather than limiting. Therefore, this invention includes, but is not limited to, the embodiments described in the specific implementation. Any other implementations derived by those skilled in the art based on the technical solutions of this invention are also within the scope of protection of this invention.
Claims
1. A Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors, characterized in that, The method includes the following steps: Step 1: Use a statistically based effective color correction method to perform color correction processing on the deep-sea underwater image to restore its color to the normal image color; Step 2: Use a Bayesian model to combine smoothness priors, structure priors, and non-uniform illumination highlight region priors to describe the deep-sea image decomposition process in Retinex theory; Step 3: Convert the pre-corrected deep-sea underwater image from RGB space to Lab space, select the L component representing the brightness value as the initial illumination value, and perform calculations; Step 4: Enhance the illumination map of the deep-sea underwater image using a Bayesian estimation Retinex method based on multiple constraints priors; the multiple constraints priors include smoothness prior, structure prior, and non-uniform illumination highlight region prior. Step 5: Adaptively adjust the brightness value of the bright areas in the unevenly lit deep-sea underwater image using a gradient descent strategy; Step 6: Optimize the illumination map using an approximate estimation method; Step 7: Use gamma correction to process the enhanced lighting to make it smoother, and convert the enhanced deep-sea image back from the Lab color space to the RGB color space. Complete deep-sea image enhancement; Step 4 specifically includes the following steps: Step 4.1: In the method for solving the illumination map L, redefine the prior. Applying this to a Bayesian framework model, the optimization formula for the illumination map L becomes: ; In the formula, This represents the coefficient between the two balancing terms. and Represent and Regular terms Priors derived from lighting maps , Represents the initial lighting diagram. W It is the weight matrix in the structural prior; Step 4.2: Define the smoothing prior. In the spatial smoothing prior, the total variation regularization term is widely used to make the illumination map region smooth. Therefore, smooth prior is reflected in middle; Step 4.3: Define structural priors. W It is the weight matrix in the structural prior, so the structural prior is reflected in W middle; ; Step 4.4: Define the prior for the highlighted regions under non-uniform illumination. To simultaneously ensure the region smoothness prior and the structure prior in the estimation of the illumination map, the prior condition for the highlighted regions under non-uniform illumination is incorporated into the optimization formula of the illumination map L. In the middle; Step 5 specifically includes the following steps: Step 5.1: In the process of solving the weight matrix, the gradient of the initial lighting map is used. Adjusted gradient As a weight matrix W The parameters to be solved; the weight matrix W Set as: ; Step 5.2: To more reasonably adjust the gradient in the bright areas of uneven illumination, a non-linear smooth function was designed. Z ( x The gradient acting on the initial lighting map This allows us to obtain the adjusted gradient. Then we have: ; Step 5.3: Define the unevenly illuminated highlight areas in the deep-sea image using gradient thresholding. H To define unevenly illuminated high-brightness regions in deep-sea images, exceeding a gradient threshold. H The portion identified as unevenly lit, high-brightness areas in the deep-sea image was processed using gradient descent. To ensure the overall gradient descent processing was reasonable and the processed lighting had a natural appearance, the gradient reduction factor was adaptively adjusted based on the brightness level: higher brightness areas received a larger reduction factor, while lower brightness areas received a smaller reduction factor. For areas less than or equal to a gradient threshold... H For the part where the gradient remains unchanged, it is represented by a multiple of 1. Step 5.4: Define the nonlinear smooth function Z ( x When the brightness value of the initial illumination map From the highest point to H When decreasing, the corresponding Z ( x The value should decrease smoothly until it reaches 1; to make Z ( x The value decreases smoothly, using parameters. To control the speed of descent; Z ( x The function is defined as: ; Step 5.5: Define parameters and gradient threshold H , ; In the formula: Represents the reduction factor. Represents the initial lighting diagram The average brightness, taken here. ; For the initial lighting diagram The depth distribution generally follows a Gaussian distribution, using interval... The left endpoint is used as the gradient threshold. H , ; In the formula: Represents the initial lighting diagram The average brightness Represents the initial lighting diagram The standard deviation of brightness.
2. The Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors as described in claim 1, characterized in that: Step 1 specifically includes the following steps: Step 1.1: Calculate the image values in the original RGB deep-sea image. U The mean and mean variance; Step 1.2: Calculate the minimum and maximum values of each of the three RGB channels using the formulas; ; Step 1.3: Obtain the color-corrected image using the formula; ; in and Representing images respectively The maximum and minimum values of the image in the R, G, and B channels. and Represents the mean and the variance of the mean. It is a parameter used to adjust the saturation of underwater image enhancement results. Based on experience, it is usually... Set to 2.
5. U CR This represents the color-corrected image; the final color-corrected RGB image is obtained through the calculation using the formula above.
3. The Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors as described in claim 1, characterized in that: Step 2 specifically includes the following steps: Step 2.1: Based on Retinex theory, the color-corrected deep-sea image... U CR Represented as the product of the illumination diagram L and the reflection diagram R: ; Step 2.2: Using a Bayesian model, the smoothness prior, structure prior, and uneven illumination highlight region prior are combined to describe the image decomposition process in the Retinex theory above. U CR As an observed image, L, R, and Q are considered as a set of hypothetical model parameters. Assuming that the model parameters are independent, then: ; Known U CR The key to the problem is to deduce all the unknowns based on the maximum a posteriori principle, which is: ; Step 2.3: Based on the Retinex theoretical formula The above prior Bayesian model can be simplified to: 。 4. The Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors as described in claim 1, characterized in that: Step 3 specifically includes the following steps: Step 3.1: Convert the deep-sea underwater image after color correction in Step 1 from the RGB color space to the Lab color space; Step 3.2: Select the L component in the Lab color space as the initial illumination value.
5. The Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors as described in claim 1, characterized in that: Step 6 specifically includes the following steps: Step 6.1: Quickly solve the optimization formula for the illumination diagram L: ; Step 6.2: Use To approximate estimate ; ; Step 6.3: Convert the illumination diagram L formula in Step 6.1 to: ; This optimization formula contains only quadratic terms. By taking the derivative of this formula with respect to L and setting the derivative to 0, we obtain the following formula: ; in, E Represents an identity matrix. These represent vectors in their respective directions. This represents a diagonal matrix, whose diagonal elements are... ; D d and D v It is the forward difference matrix representing the discrete gradient operator; Step 6.4: Calculate the final output vector By restoring the original image to its original size, the optimized lighting image L can be obtained.
6. The Bayesian Retinex deep-sea image enhancement method based on multi-constraint priors according to claim 1, characterized in that: Step 7 specifically includes the following steps: Step 7.1: Adjust the obtained illumination image L using gamma correction, including adjustment parameters. The L adjustment formula can be written as: ; In the formula, M and Typically set to 255 and 2.2, the final enhanced image is as follows: ; Step 7.2: Finally, convert the enhanced image from the Lab color space to the RGB color space to obtain the final enhanced clear deep-sea underwater image for output.