Underwater image enhancement method and system based on denoising and multi-order sparse joint prior
Through the introduction of the Retinex transformation model of noise and multi -order sparse united priority in the underwater image enhancement method, the problem of insufficient contrast and structural details in the existing technologies, and achieve better underwater images enhancement effects.
Patent Information
- Application Number
- CN202410507215.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-04-25
AI Technical Summary
Existing underwater image enhancement methods fail to make full use of the denoising prior and the multi-order sparse prior of reflectivity and light, resulting in insufficient improvement of the contrast and structural details of underwater images.
Using the Retinex variable model based on the removal and multi -order sparse combination, through the transformation of HSV color space, brightness channel decomposition, and multi -order sparse gradient priority constraints by the original images of underwater, combined with expansion Lediang Day method Optimize the solution, and finally use gamma correction to correct the light and multiply with the reflectivity to obtain the enhanced brightness channel.
Effectively improve the contrast and structural details of underwater images, and improve the deserture performance of the image.
Smart Images

Figure CN118411305B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of underwater image enhancement, and in particular to an underwater image enhancement method and system based on denoising and multi-order sparse joint prior. Background Art
[0002] Due to the particularity and complexity of the underwater environment, underwater imaging equipment is easily affected by the absorption and scattering of visible light by water, the particle noise introduced by suspended matter in the water, and the electronic noise of the camera itself when collecting images. These effects can easily cause noise interference, reduced contrast, and blurred structural details in underwater images, which seriously affects the subjective perception of human vision and limits related applications such as subsequent analysis and processing of underwater images. Therefore, underwater image enhancement is a key underwater image processing technology that removes noise and improves visibility. It has been widely used in many underwater fields such as marine resource observation, robot autonomous navigation, and fishery management.
[0003] In response to the above-mentioned underwater image degradation problems (noise interference, contrast reduction, and blurred structural details), researchers have proposed a series of underwater image enhancement methods. Among them, compared with the traditional Retinex model, the underwater image enhancement method based on the Retinex variational model shows a significant improvement in performance.
[0004] In the prior art, there are mainly the following underwater image enhancement methods based on the Retinex variational model: 1) Using the L1 norm to constrain the smoothness of illumination, and using the fidelity term for the first-order gradient of reflectivity to reveal and enhance the structure and details in low-light images, so as to improve the enhancement performance of noisy low-light images; 2) First, using the statistical color correction method to remove color cast and restore naturalness, and then based on the Retinex variational model, decomposing the brightness channel into reflectivity and illumination, multi-order gradient prior constraints are imposed on reflectivity and illumination, and the L1 norm is used to model the piecewise and piecewise linearity of reflectivity, while the L2 norm is used to constrain the spatial smoothness and spatial linear smoothness of illumination. However, the underwater Retinex variational model in the above method does not make full use of the denoising prior, as well as the multi-order sparse priors of reflectivity and illumination. Therefore, how to construct a Retinex variational underwater image enhancement method based on denoising and multi-order sparse joint priors is one of the core issues that technicians in this field need to solve urgently. Summary of the invention
[0005] In view of the above problems, the purpose of the present invention is to provide an underwater image enhancement method and system based on denoising and multi-order sparse joint prior to solve the denoising problem of the existing underwater imaging model; at the same time, the multi-order (first-order and second-order) sparse gradient priors of illumination and reflectivity are comprehensively adopted to effectively improve the contrast and structural details of underwater images.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] On the one hand, a method for underwater image enhancement based on denoising and multi-order sparse joint prior is provided, the method comprising the following steps:
[0008] S1, inputting an underwater original image, and converting the underwater original image from an RGB color space to an HSV color space;
[0009] S2. Processing the brightness channel V of the HSV color space, including: expanding the Retinex variational model and adding a noise term, decomposing the brightness channel V into reflectance and illumination, and performing multi-order sparse gradient prior constraints on the reflectance and illumination; wherein the multi-order includes first order and second order;
[0010] S3, the underwater image enhancement and denoising problem is expressed as a multivariable joint optimization problem, and the augmented Lagrangian method is used to optimize and solve it;
[0011] S4, iterating and updating the optimization solution process N times to obtain enhanced reflectivity and illumination;
[0012] S5. Use the gamma correction method to correct the enhanced illumination and multiply the enhanced reflectivity by pixel to obtain the enhanced brightness channel.
[0013] S6, the enhanced brightness channel Merge it with the original chroma channel H and saturation channel S, and then convert the merged image from the HSV color space back to the RGB color space to obtain the final underwater enhanced image.
[0014] Optionally, the step S2 specifically includes:
[0015] The Retinex variational model is extended and a noise term is added, and the L1 norm is used to constrain the noise prior. At the same time, the brightness channel V in the HSV color space is decomposed into reflectance R and illumination I, and the first-order sparse gradient prior and second-order sparse gradient prior of the reflectance are L1-constrained. 1 / 2 Norm constraint, L2 norm constraint is applied to the first-order sparse gradient prior and the second-order sparse gradient prior of illumination; the specific calculation is as follows:
[0016]
[0017] Among them, R represents reflectivity, I represents illumination, and E represents noise. and Δ represent the first-order gradient operator and the second-order gradient operator respectively, Represents the pixel-level dot multiplication operation of an image; Represents the first-order sparse gradient prior constraining the illumination using the L2 norm represents the second-order sparse gradient prior ΔI constraining the illumination using the L2 norm, Indicates the use of L 1 / 2 First-order sparse gradient prior for norm-constrained reflectivity ||ΔR|| 1 / 2 Indicates the use of L 1 / 2 The second-order sparse gradient prior ΔR of the norm-constrained reflectivity, ||E||1 represents the L1-norm-constrained noise prior; α, β, γ1, γ2, ρ are weight balancing parameters.
[0018] Optionally, in step S3, solving the multivariable joint optimization problem by using an augmented Lagrangian method includes:
[0019] The alternating direction multiplier method is used to decompose the multivariable joint optimization problem into multiple sub-problems including reflectivity, illumination, noise, auxiliary variables and residual errors, and the multiple sub-problems are iteratively updated and optimized respectively.
[0020] Optionally, the step S3 specifically includes:
[0021] The multivariable joint optimization problem is solved by the augmented Lagrangian method, and the calculation is as follows:
[0022]
[0023] Among them, d, h represent auxiliary variables, m, n represent residual errors, λ1, λ2 are weight balancing parameters;
[0024] The alternating direction multiplier method is used to decompose the multivariable joint optimization problem (2) into multiple sub-problems for solution. The calculation is as follows:
[0025] Auxiliary variables d and h subproblem: Fix R, I, E, m, n of the k-1th iteration, and update the auxiliary variables d and h as follows:
[0026]
[0027]
[0028]
[0029] in, and They represent [-1, 1], [-1, 1] respectively; Δ represents [010; 1-41; 010]; and They represent the half-threshold operator respectively; μ>0, set to the inverse of the total number of image pixels;
[0030] Reflectivity R subproblem: Fixing I, E, m, n of the k-1th iteration and d, h of the kth iteration, the reflectivity R is updated as:
[0031]
[0032] in, represents the fast Fourier transform operation, represents the transpose operation of the fast Fourier transform, represents the inverse operation of fast Fourier transform;
[0033] Residual error m and n subproblems: Fixing I, E of the k-1th iteration and d, h, R of the kth iteration, the residual errors m and n are updated as:
[0034]
[0035]
[0036] n k =n k-1 +ΔR k -d k (7)
[0037] Lighting I subproblem: Fixing E of the k-1th iteration and R, m, n, d, h of the kth iteration, lighting I is updated as:
[0038]
[0039] Noise E subproblem: Fix I, R, m, n, d, h of the kth iteration and update the noise E to:
[0040]
[0041] Wherein, shrink(x,c)=sign(x)max(|x|-c,0), shrink(·) is the operation on the pixel point x, and c is the threshold constant.
[0042] Optionally, in step S4, the optimization solution process is iterated and updated N=4 times to obtain the enhanced reflectivity R D and Lighting I D .
[0043] Optionally, in step S5, the enhanced illumination is corrected using a gamma correction method, which is calculated as follows:
[0044]
[0045] in, represents the gamma-corrected illumination, I Drepresents the enhanced illumination, and γ is the balance parameter.
[0046] Optionally, in step S5, the gamma-corrected illumination is pixel-multiplied with the enhanced reflectivity to obtain an enhanced brightness channel. The calculation is as follows:
[0047]
[0048] in, represents the gamma-corrected illumination, R D represents the enhanced reflectivity, Represents image pixel-level dot multiplication operation.
[0049] On the other hand, an underwater image enhancement system based on denoising and multi-order sparse joint prior is provided, for implementing any of the above methods, the system comprising:
[0050] A first conversion module, used for inputting an underwater original image and converting the underwater original image from an RGB color space to an HSV color space;
[0051] A denoising and multi-order sparse joint prior module is used to process the brightness channel V of the HSV color space, including: expanding the Retinex variational model and adding a noise term, decomposing the brightness channel V into reflectance and illumination, and performing multi-order sparse gradient prior constraints on the reflectance and illumination; wherein the multi-order includes first order and second order;
[0052] The optimization solution module is used to express the underwater image enhancement and denoising problem as a multivariable joint optimization problem and use the augmented Lagrangian method for optimization solution;
[0053] An iterative update module is used to iteratively update the optimization solution process N times to obtain enhanced reflectivity and illumination;
[0054] The correction module is used to correct the enhanced illumination using the gamma correction method and multiply the enhanced reflectivity by pixels to obtain the enhanced brightness channel.
[0055] The second conversion module is used to convert the enhanced brightness channel Merge it with the original chroma channel H and saturation channel S, and then convert the merged image from the HSV color space back to the RGB color space to obtain the final underwater enhanced image.
[0056] In another aspect, an electronic device is provided, the electronic device comprising:
[0057] processor;
[0058] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the steps of the underwater image enhancement method described above are implemented.
[0059] On the other hand, a computer-readable storage medium is provided, in which program codes are stored. The program codes can be called by a processor to execute the steps of the underwater image enhancement method as described above.
[0060] The beneficial effects brought about by the technical solution provided by the present invention include at least:
[0061] The present invention proposes a Retinex variational underwater image enhancement method and system based on denoising and multi-order sparse joint prior. Compared with the existing Retinex variational underwater image enhancement method, the present invention has the following advantages: (1) the Retinex variational model is expanded to incorporate noise terms, and the L1 norm is used to constrain the noise prior to achieve the denoising function; (2) the multi-order (first-order and second-order) sparse gradient priors of illumination and reflectivity are comprehensively utilized to effectively improve the contrast and structural details of underwater images. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0063] Figure 1 It is a flow chart of an underwater image enhancement method based on denoising and multi-order sparse joint prior provided by an embodiment of the present invention;
[0064] Figure 2 is a schematic diagram of a specific process of iterative updating for the kth time provided by an embodiment of the present invention;
[0065] Figure 3 It is a structural schematic diagram of an underwater image enhancement system based on denoising and multi-order sparse joint prior provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a concrete way. In addition, in the embodiments of the present invention, "image" and "picture" may sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript form such as W1. When the distinction between them is not emphasized, the meanings to be expressed are consistent.
[0068] The embodiment of the present invention provides an underwater image enhancement method based on denoising and multi-order sparse joint priors, which can be implemented by an electronic device, which can be a terminal or a server. Figure 1 As shown, the processing flow of the method may include the following steps:
[0069] S1. Input an original underwater image, and convert the original underwater image from an RGB color space to an HSV color space.
[0070] In the embodiment of the present invention, an underwater original image (or underwater degraded image) is input as initial input data, and then the input underwater original image is converted from the RGB color space to the HSV color space.
[0071] S2. Processing the brightness channel V of the HSV color space, including: expanding the Retinex variational model and adding a noise term, decomposing the brightness channel V into reflectance and illumination, and performing multi-order (first-order, second-order) sparse gradient prior constraints on the reflectance and illumination.
[0072] In this step, only the brightness channel V of the HSV color space needs to be processed, and the chroma channel H and the saturation channel S remain unchanged.
[0073] Specifically, the Retinex variational model is extended and a noise term is added, and the L1 norm is used to constrain the noise prior. At the same time, the brightness channel V in the HSV color space is decomposed into reflectance R and illumination I, and the first-order sparse gradient prior and second-order sparse gradient prior of the reflectance are L1-constrained. 1 / 2 Norm constraint, L2 norm constraint is applied to the first-order sparse gradient prior and the second-order sparse gradient prior of illumination; the specific calculation is as follows:
[0074]
[0075] Among them, R represents reflectivity, I represents illumination, and E represents noise. and Δ represent the first-order gradient operator and the second-order gradient operator respectively, Represents the pixel-level dot multiplication operation of an image; Represents the first-order sparse gradient prior constraining the illumination using the L2 norm represents the second-order sparse gradient prior ΔI constraining the illumination using the L2 norm, Indicates the use of L 1 / 2 First-order sparse gradient prior for norm-constrained reflectivity ||ΔR|| 1 / 2 Indicates the use of L 1 / 2 The second-order sparse gradient prior ΔR of the norm-constrained reflectivity, ||E||1 represents the L1 norm-constrained noise prior; α, β, γ1, γ2, ρ are weight balancing parameters, which are set to 1, 10 respectively according to empirical values. -3 , 10 -4 , 10 -3 , 1.
[0076] S3. The underwater image enhancement and denoising problem is expressed as a multivariable joint optimization problem, and the augmented Lagrangian method is used to optimize and solve it.
[0077] In an embodiment of the present invention, the multivariable joint optimization problem is solved by an augmented Lagrangian method, including: using an alternating direction multiplier method to decompose the multivariable joint optimization problem into multiple sub-problems including reflectivity, illumination, noise, auxiliary variables and residual errors, and iteratively updating and optimizing the multiple sub-problems respectively.
[0078] The specific calculation process is as follows:
[0079]
[0080]
[0081] Among them, d and h are auxiliary variables, m and n are residual errors, and λ1 and λ2 are weight balancing parameters, which are set to 10 respectively according to empirical values. -5 , 10 -3 ;
[0082] The alternating direction multiplier method is used to decompose the multivariable joint optimization problem (2) into multiple sub-problems for solution. The calculation is as follows:
[0083] Auxiliary variables d and h subproblem: Fix R, I, E, m, n of the k-1th iteration, and update the auxiliary variables d and h as follows:
[0084]
[0085]
[0086]
[0087] in, and They represent [-1, 1], [-1, 1] respectively; Δ represents [010; 1-41; 010]; and They represent the half-threshold operator respectively; μ>0, usually set to the inverse of the total number of image pixels;
[0088] Reflectivity R subproblem: Fixing I, E, m, n of the k-1th iteration and d, h of the kth iteration, the reflectivity R is updated as:
[0089]
[0090] in, represents the fast Fourier transform operation, represents the transpose operation of the fast Fourier transform, represents the inverse operation of fast Fourier transform;
[0091] Residual error m and n subproblems: Fixing I, E of the k-1th iteration and d, h, R of the kth iteration, the residual errors m and n are updated as:
[0092]
[0093]
[0094] n k =n k-1 +ΔR k -d k (7)
[0095] Lighting I subproblem: Fixing E of the k-1th iteration and R, m, n, d, h of the kth iteration, lighting I is updated as:
[0096]
[0097] Noise E subproblem: Fix I, R, m, n, d, h of the kth iteration and update the noise E to:
[0098]
[0099] Wherein, shrink(x,c)=sign(x)max(|x|-c,0), shrink(·) is the operation on the pixel point x, and c is the threshold constant.
[0100] S4. Iterate and update the optimization solution process N times to obtain enhanced reflectivity and illumination.
[0101] refer to Figure 2 As shown, Figure 2 As an optional embodiment of the present invention, the optimization solution process is iteratively updated N = 4 times to obtain the enhanced reflectivity R D and Lighting I D .
[0102] S5. Use the gamma correction method to correct the enhanced illumination and multiply the enhanced reflectivity by pixel to obtain the enhanced brightness channel.
[0103] Specifically, the enhanced illumination is corrected using the gamma correction method, which is calculated as follows:
[0104]
[0105] in, represents the gamma-corrected illumination, I D represents the enhanced illumination, and γ is the balance parameter.
[0106] Multiply the gamma-corrected illumination by the enhanced reflectivity pixel by pixel to get the enhanced brightness channel The calculation is as follows:
[0107]
[0108] Among them, R D represents the enhanced reflectivity, Represents image pixel-level dot multiplication operation.
[0109] S6, the enhanced brightness channel Merge it with the original chroma channel H and saturation channel S, and then convert the merged image from the HSV color space back to the RGB color space to obtain the final underwater enhanced image.
[0110] Compared with the existing Retinex variational underwater image enhancement method, the method of the present invention has the following advantages: (1) the Retinex variational model is expanded to incorporate the noise term, and the L1 norm is used to constrain the noise prior to achieve the denoising function; (2) the multi-order (first-order and second-order) sparse gradient priors of illumination and reflectivity are comprehensively utilized to effectively improve the contrast and structural details of underwater images.
[0111] Accordingly, an embodiment of the present invention further provides an underwater image enhancement system based on denoising and multi-order sparse joint prior, such as Figure 3 As shown, the system includes:
[0112] The first conversion module 201 is used to input an underwater original image and convert the underwater original image from an RGB color space to an HSV color space;
[0113] The denoising and multi-order sparse joint prior module 202 is used to process the brightness channel V of the HSV color space, including: expanding the Retinex variational model and adding a noise term, decomposing the brightness channel V into reflectivity and illumination, and performing multi-order sparse gradient prior constraints on the reflectivity and illumination; wherein the multi-order includes first order and second order;
[0114] The optimization solution module 203 is used to express the underwater image enhancement and denoising problem as a multivariable joint optimization problem and use the augmented Lagrangian method to optimize and solve it;
[0115] Iterative update module 204, used to iteratively update the optimization solution process N times to obtain enhanced reflectivity and illumination;
[0116] Correction module 205, used to correct the enhanced illumination using the gamma correction method, and multiply the enhanced reflectivity by pixel to obtain the enhanced brightness channel
[0117] The second conversion module 206 is used to convert the enhanced brightness channel Merge it with the original chroma channel H and saturation channel S, and then convert the merged image from the HSV color space back to the RGB color space to obtain the final underwater enhanced image.
[0118] For ease of explanation, Figure 3 Only the main components of the system are shown. The system of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0119] In an exemplary embodiment, the present invention further provides an electronic device, the electronic device comprising:
[0120] processor;
[0121] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the steps of the underwater image enhancement method described above are implemented.
[0122] In an exemplary embodiment, the present invention further provides a computer-readable storage medium, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is loaded and executed by a processor to implement the steps of the underwater image enhancement method as described above. For example, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0123] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0124] References in the specification to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments", etc. indicate that the described embodiments may include a particular feature, structure, or characteristic, but not every embodiment may include the particular feature, structure, or characteristic. In addition, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the relevant art to implement such feature, structure, or characteristic in conjunction with other embodiments (whether or not explicitly described).
[0125] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0126] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0127] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0128] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0131] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0132] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.
[0133] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An underwater image enhancement method based on denoising and multi-order sparse joint prior, characterized in that: The following steps are involved: S1, inputting an underwater original image, and converting the underwater original image from an RGB color space to an HSV color space; S2. Processing the brightness channel V of the HSV color space, including: expanding the Retinex variational model and adding a noise term, decomposing the brightness channel V into reflectance and illumination, and performing multi-order sparse gradient prior constraints on the reflectance and illumination; wherein the multi-order includes first order and second order; The step S2 specifically includes: The Retinex variational model is extended and a noise term is added, and the L1 norm is used to constrain the noise prior. At the same time, the brightness channel V in the HSV color space is decomposed into reflectance R and illumination I, and the first-order sparse gradient prior and second-order sparse gradient prior of the reflectance are L1-constrained. 1 / 2 Norm constraint, L2 norm constraint is applied to the first-order sparse gradient prior and the second-order sparse gradient prior of illumination; the specific calculation is as follows: Among them, R represents reflectivity, I represents illumination, and E represents noise. and Δ represent the first-order gradient operator and the second-order gradient operator respectively, Represents the pixel-level dot multiplication operation of an image; Represents the first-order sparse gradient prior constraining the illumination using the L2 norm represents the second-order sparse gradient prior ΔI constraining the illumination using the L2 norm, Indicates the use of L 1 / 2 First-order sparse gradient prior for norm-constrained reflectivity ||ΔR|| 1 / 2 Indicates the use of L 1 / 2 The second-order sparse gradient prior ΔR of the norm-constrained reflectivity, ||E||1 represents the L1-norm-constrained noise prior; α, β, γ1, γ2, ρ are weight balancing parameters; S3, the underwater image enhancement and denoising problem is expressed as a multivariable joint optimization problem, and the augmented Lagrangian method is used to optimize and solve it; In step S3, solving the multivariable joint optimization problem by using an augmented Lagrangian method includes: The multivariable joint optimization problem is decomposed into a plurality of sub-problems including reflectivity, illumination, noise, auxiliary variables and residual error by using an alternating direction multiplier method, and the plurality of sub-problems are iteratively updated and optimized respectively; The step S3 specifically includes: The multivariable joint optimization problem is solved by the augmented Lagrangian method, and the calculation is as follows: Among them, d, h represent auxiliary variables, m, n represent residual errors, λ1, λ2 are weight balancing parameters; The alternating direction multiplier method is used to decompose the multivariable joint optimization problem (2) into multiple sub-problems for solution. The calculation is as follows: Auxiliary variables d and h subproblem: Fix R, I, E, m, n of the k-1th iteration, and update the auxiliary variables d and h as follows: in, and They represent [-1, 1], [-1, 1] respectively; Δ represents [010; 1-41; 010]; and They represent the half-threshold operator respectively; μ>0, set to the inverse of the total number of image pixels; Reflectivity R subproblem: Fixing I, E, m, n of the k-1th iteration and d, h of the kth iteration, the reflectivity R is updated as: in, represents the fast Fourier transform operation, represents the transpose operation of the fast Fourier transform, represents the inverse operation of fast Fourier transform; Residual error m and n subproblems: Fixing I, E of the k-1th iteration and d, h, R of the kth iteration, the residual errors m and n are updated as: n k =n k-1 +ΔR k -d k (7) Lighting I subproblem: Fixing E of the k-1th iteration and R, m, n, d, h of the kth iteration, lighting I is updated as: Noise E subproblem: Fix I, R, m, n, d, h of the kth iteration and update the noise E to: Where, shrink(x,c)=sign(x)max(|x|-c,0), shrink(·) is the operation on pixel x, and c is the threshold constant; S4, iterating and updating the optimization solution process N times to obtain enhanced reflectivity and illumination; S5. Use the gamma correction method to correct the enhanced illumination and multiply the enhanced reflectivity by pixel to obtain the enhanced brightness channel. S6, the enhanced brightness channel It is merged with the original chroma channel H and saturation channel S, and then the merged image is converted from the HSV color space back to the RGB color space to obtain the final underwater enhanced image.
2. The underwater image enhancement method according to claim 1, characterized in that: In step S4, the optimization solution process is iterated and updated N=4 times to obtain the enhanced reflectivity R D and Lighting I D .
3. The underwater image enhancement method according to claim 1, characterized in that: In step S5, the enhanced illumination is corrected using a gamma correction method, which is calculated as follows: in, represents the gamma-corrected illumination, I D represents the enhanced illumination, and γ is the balance parameter.
4. The underwater image enhancement method according to claim 1, characterized in that: In step S5, the gamma-corrected illumination is pixel-wise multiplied with the enhanced reflectivity to obtain an enhanced brightness channel. The calculation is as follows: in, represents the gamma-corrected illumination, R D represents the enhanced reflectivity, Represents image pixel-level dot multiplication operation.
5. An underwater image enhancement system based on denoising and multi-order sparse joint prior, the system is used to implement the method according to any one of claims 1 to 4, characterized in that: The system comprises: A first conversion module, used for inputting an underwater original image and converting the underwater original image from an RGB color space to an HSV color space; A denoising and multi-order sparse joint prior module is used to process the brightness channel V of the HSV color space, including: expanding the Retinex variational model and adding a noise term, decomposing the brightness channel V into reflectance and illumination, and performing multi-order sparse gradient prior constraints on the reflectance and illumination; wherein the multi-order includes first order and second order; The optimization solution module is used to express the underwater image enhancement and denoising problem as a multivariable joint optimization problem and use the augmented Lagrangian method for optimization solution; An iterative update module is used to iteratively update the optimization solution process N times to obtain enhanced reflectivity and illumination; The correction module is used to correct the enhanced illumination using the gamma correction method and multiply the enhanced reflectivity by pixels to obtain the enhanced brightness channel. The second conversion module is used to convert the enhanced brightness channel It is merged with the original chroma channel H and saturation channel S, and then the merged image is converted from the HSV color space back to the RGB color space to obtain the final underwater enhanced image.
6. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when loaded and executed by the processor, implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Retinex variational underwater image enhancement method and device based on deep CNN denoising prior
CN117593235A
Underwater image enhancement method based on retinex model
WO2019019695A1