A method and device for removing marine snow from underwater images based on shrinkage function fidelity

Through the fidelity Retinex underwater image marine snow removal method based on the shrink function, the reduction function learning and gradient sparse prior are used for optimization, which solves the problem of poor ocean snow noise removal effect in underwater images, and achieves the enhancement of image structure and details.

CN118552434BActive Publication Date: 2025-03-21UNIV OF SCI & TECH BEIJING +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410625747.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2025-03-21
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

The prior art is difficult to effectively remove ocean snow noise in underwater images, and the ocean snow noise modeling does not conform to the Gaussian distribution, resulting in poor removal effect.

Method used

The data is non-Gaussian modeled by the shrink function learning, and the first-order corrected gradient of the brightness channel is used to constrain reflectivity and the first-order gradient sparse prior of illumination, and the alternating direction multipliers method and L-BFGS method are used for optimization.

Benefits of technology

It effectively removes ocean snow noise in underwater images, enhances image structure and details, and solves the problem that ocean snow noise modeling does not conform to Gaussian distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552434B_ABST
    Figure CN118552434B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for removing marine snow from underwater images based on shrinkage function fidelity, the method comprising: converting an original underwater image containing marine snow from RGB color space to HSV color space; decomposing a brightness channel into illumination and reflectivity, and adopting non-Gaussian modeling of shrinkage function learning for data fidelity; using the first-order modified gradient of the brightness channel to constrain the first-order gradient sparse prior of reflectivity, and using the L1 norm to constrain the first-order gradient sparse prior of illumination; using the alternating direction multiplier method to decompose the joint optimization problem into illumination, reflectivity, and auxiliary variable sub-problems for solution; using a negative peak signal-to-noise ratio as a loss function, learning a shrinkage function, and minimizing the loss function; merging the enhanced brightness channel with the original chromaticity channel and saturation channel and converting back to RGB color space, and outputting an underwater image with marine snow removed. The present invention can achieve marine snow removal and enhance underwater image structure and details.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of underwater image processing, and in particular to a method and device for removing marine snow from underwater images based on shrinkage function fidelity. Background Art

[0002] In underwater imaging, the fine particles floating in the ocean (such as plankton, sediments, and other organic debris) seriously affect the propagation of underwater light, resulting in speckle noise (marine snow) in the acquired underwater images, as well as missing details and structures, which seriously affects the subjective perception of human vision and limits the subsequent analysis and processing of underwater images and other related applications. Therefore, underwater image marine snow removal is a key underwater image processing technology that removes speckle noise and improves contrast, and can be widely used in many fields such as marine biological detection, underwater ecological research, and submarine facility maintenance.

[0003] In order to solve the problem of marine snow removal in underwater images, researchers have proposed a series of methods, mainly the following: 1) Adopting an adaptive probability method, by considering the local statistics of the brightness characteristics after the RGB to YCbCr transformation, the marine snow effect in underwater images is removed in a probabilistic way; 2) Adopting a marine snow removal method based on continuous video frames, the background modeling algorithm is used to obtain reference images, and these images are used as training data to learn the scene prior information, and finally the marine snow is eliminated by restoring the scene behind the particles. However, there has been no related research and reports on the marine snow removal method for underwater images based on the Retinex variational model in the prior art. Therefore, how to construct a marine snow removal method for underwater images based on the Retinex underwater image fidelity based on the shrinkage function is one of the core problems that technicians in this field need to solve urgently. Summary of the invention

[0004] In view of the above problems, the purpose of the present invention is to provide a method and device for removing marine snow from underwater images based on shrinkage function fidelity, which uses shrinkage function learning to model data fidelity in a flexible and efficient non-Gaussian manner, so as to effectively solve the key problem that marine snow noise modeling does not conform to Gaussian distribution; at the same time, the first-order corrected gradient of the brightness channel is used to effectively constrain the first-order gradient sparse prior of the reflectivity, and the L1 norm is used to constrain the first-order gradient sparse prior of the illumination, so as to achieve the effects of marine snow (noise) removal and enhancement of underwater image structure and details.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] On the one hand, a method for removing marine snow from underwater images based on shrinkage function fidelity is provided, the method comprising the following steps:

[0007] S1, inputting the original underwater image containing marine snow as the starting input data;

[0008] S2, converting the original underwater image from RGB color space to HSV color space;

[0009] S3. According to the Retinex theory, the brightness channel of the HSV color space is decomposed into illumination and reflectance. The non-Gaussian modeling of shrinkage function learning is adopted to preserve the data fidelity. At the same time, the first-order corrected gradient of the brightness channel is used to constrain the first-order gradient sparse prior of the reflectance, and the L1 norm is used to constrain the first-order gradient sparse prior of the illumination.

[0010] S4. The problem of removing marine snow from underwater images is expressed as a joint optimization problem. The alternating direction multiplier method is used to decompose the joint optimization problem into an illumination subproblem, a reflectivity subproblem, and an auxiliary variable subproblem for iterative updating and solving. Meanwhile, a negative peak signal-to-noise ratio is used as a loss function to learn a shrinkage function, and a gradient-based L-BFGS method is used to minimize the loss function.

[0011] S5, multiplying the enhanced illumination and reflectivity by the image pixels to obtain an enhanced brightness channel;

[0012] S6. Merge the enhanced brightness channel with the original chrominance channel and saturation channel, convert the HSV color space back to the RGB color space, and output the underwater image without marine snow.

[0013] Optionally, step S3 specifically includes: according to the Retinex theory, decomposing the brightness channel V into illumination I and reflectivity R, and adopting non-Gaussian modeling of shrinkage function learning for data fidelity; at the same time, using the first-order corrected gradient of the brightness channel to constrain the first-order gradient sparse prior of the reflectivity, and using the L1 norm to constrain the first-order gradient sparse prior of the illumination; the specific operations are as follows:

[0014]

[0015] (1)

[0016] The conversion form is as follows:

[0017]

[0018] (2)

[0019] Among them, ◦ represents the pixel multiplication operation of the image, * represents the convolution operation; T i () represents the i-th nonlinear penalty function, f i represents the i-th linear filter, ▽ represents the first-order gradient operator, z, u i, d represents the auxiliary variable, G is the first-order correction gradient of the brightness channel, N f According to the experience, it is set to 8~10, β i , γ, α represent learnable parameters, and λ is set to 0.0001 based on empirical values.

[0020] Optionally, in step S4, the alternating direction multiplier method is used to decompose the joint optimization problem (2) into an illumination subproblem, a reflectivity subproblem and an auxiliary variable subproblem for solution. The specific calculation is as follows:

[0021] Lighting I sub-problem:

[0022]

[0023] (3)

[0024] in,

[0025]

[0026] F i represents the i-th linear filter f i The matrix representation of F i T Indicates F i The transpose operation of h represents the vertical direction of the first-order gradient operator, ▽ v represents the horizontal direction of the first-order gradient operator;

[0027] Reflectivity R subproblem:

[0028] (4)

[0029] in,

[0030]

[0031] Auxiliary variable z subproblem:

[0032] (5)

[0033] Among them, π 0j Represents the weight of each part, v j is the mean, α is the variance;

[0034] Auxiliary variable u i Sub-questions:

[0035] (6)

[0036] Among them, π ij Represents the weight of each part, v jis the mean, α is the variance;

[0037] To facilitate quick learning, v j and α are set to fixed values.

[0038] Optionally, in step S4, a negative peak signal-to-noise ratio is used as the loss function , learning the shrinkage functions (5) and (6), the specific operation is as follows:

[0039]

[0040] (7)

[0041] Among them, S represents the number of training samples, t represents the tth learning process, represents the brightness channel enhanced by the t-th learning, represents the brightness channel obtained by decomposing the underwater real image for the tth time, Indicates the maximum value of the brightness channel of the real underwater image; t , γ t , π ti , f ti is the parameter learned for the tth time, ξ t is a set of learnable parameters.

[0042] Optionally, in step S4, the gradient-based L-BFGS method is used to minimize the loss function, and the specific operation is as follows:

[0043] (8)

[0044] Among them, ∂ represents the partial derivative operation.

[0045] Optionally, in step S4, the iterative update process is as follows:

[0046] enter , initialize parameters and set the number of loops;

[0047] Update I by formula (3), update R by formula (4), update z by formula (5), and update u by formula (6) i , update ξ through formula (7) t ;

[0048] After reaching the set number of times, the cycle ends and the enhanced illumination and enhanced reflectivity are output.

[0049] Optionally, the step S5 specifically includes:

[0050] The enhanced illumination and reflectivity obtained in step S4 are multiplied by the image pixels to obtain the enhanced brightness channel. , the specific calculation is as follows:

[0051] (9)

[0052] in, represents the enhanced illumination, represents the enhanced reflectivity, and ◦ represents the pixel multiplication operation of the image.

[0053] On the other hand, a device for removing marine snow from underwater images based on shrinkage function fidelity is provided, which is used to implement any of the above methods, and the device comprises:

[0054] An input module, used for inputting original underwater images containing marine snow as initial input data;

[0055] A first conversion module, used for converting the original underwater image from the RGB color space to the HSV color space;

[0056] A processing module is used to decompose the brightness channel of the HSV color space into illumination and reflectance according to the Retinex theory, and adopt non-Gaussian modeling of shrinkage function learning to preserve data fidelity. At the same time, the first-order corrected gradient of the brightness channel is used to constrain the first-order gradient sparse prior of the reflectance, and the first-order gradient sparse prior of the illumination is constrained by the L1 norm;

[0057] A solution module is used to express the problem of removing marine snow from underwater images as a joint optimization problem, and use an alternating direction multiplier method to decompose the joint optimization problem into an illumination subproblem, a reflectivity subproblem, and an auxiliary variable subproblem for iterative updating and solving; a negative peak signal-to-noise ratio is used as a loss function to learn a shrinkage function, and a gradient-based L-BFGS method is used to minimize the loss function;

[0058] The dot multiplication module is used to multiply the enhanced illumination and reflectivity by the image pixels to obtain the enhanced brightness channel;

[0059] The second conversion module is used to merge the enhanced brightness channel with the original chrominance channel and saturation channel, and then convert the HSV color space back to the RGB color space to output the underwater image without marine snow.

[0060] In another aspect, an electronic device is provided, the electronic device comprising:

[0061] processor;

[0062] 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 above-mentioned method for removing marine snow from underwater images are implemented.

[0063] On the other hand, a computer-readable storage medium is provided, in which a program code is stored. The program code can be called by a processor to execute the steps of the above-mentioned method for removing marine snow from underwater images.

[0064] The beneficial effects brought about by the technical solution provided by the present invention include at least:

[0065] The present invention proposes a method and device for removing marine snow from underwater images based on Retinex, which is based on shrinkage function fidelity. Compared with the existing removal methods, the method of the present invention has the following advantages: (1) a flexible and efficient non-Gaussian modeling method is used to preserve data fidelity through shrinkage function learning, so as to effectively solve the key problem that the marine snow noise modeling does not conform to the Gaussian distribution; (2) the first-order corrected gradient of the brightness channel is used to effectively constrain the first-order gradient sparse prior of the reflectivity, and the L1 norm is used to constrain the first-order gradient sparse prior of the illumination, so as to suppress noise and enhance the underwater image structure and details. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] 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.

[0067] Figure 1 is a flow chart of a method for removing marine snow from underwater images based on shrinkage function fidelity provided by an embodiment of the present invention;

[0068] Figure 2 It is a structural schematic diagram of an underwater image marine snow removal device based on shrinkage function fidelity provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] 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.

[0070] 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, the meaning expressed by "and / or" may be both, or it may be one of the two. 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.

[0071] The embodiment of the present invention provides a method for removing marine snow from underwater images based on shrinkage function fidelity, 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:

[0072] S1. Input the original underwater image containing marine snow as the starting input data.

[0073] S2. Convert the original underwater image from RGB color space to HSV color space.

[0074] In the embodiment of the present invention, 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.

[0075] S3. According to the Retinex theory, the brightness channel of the HSV color space is decomposed into illumination and reflectance. The non-Gaussian modeling of shrinkage function learning is adopted to preserve the data fidelity. At the same time, the first-order corrected gradient of the brightness channel is used to constrain the first-order gradient sparse prior of the reflectance, and the L1 norm is used to constrain the first-order gradient sparse prior of the illumination.

[0076] The step S3 specifically includes: according to the Retinex theory, the brightness channel V is decomposed into illumination I and reflectivity R, and non-Gaussian modeling of shrinkage function learning is adopted for data fidelity; at the same time, the first-order corrected gradient of the brightness channel is used to constrain the first-order gradient sparse prior of the reflectivity, and the first-order gradient sparse prior of the illumination is constrained by the L1 norm; the specific operation is as follows:

[0077]

[0078] (1)

[0079] The conversion form is as follows:

[0080]

[0081] (2)

[0082] Among them, ◦ represents the pixel multiplication operation of the image, * represents the convolution operation; T i () represents the i-th nonlinear penalty function, f i represents the i-th linear filter, ▽ represents the first-order gradient operator, z, u i , d represents the auxiliary variable, G is the first-order correction gradient of the brightness channel, N f According to the experience, it is set to 8~10, β i , γ, α represent learnable parameters, and λ is set to 0.0001 based on empirical values.

[0083] S4. The marine snow removal problem of underwater images is expressed as a joint optimization problem, and the alternating direction multiplier method is used to decompose the joint optimization problem into illumination sub-problem, reflectivity sub-problem and auxiliary variable sub-problem for iterative updating and solving; at the same time, the negative peak signal-to-noise ratio is used as the loss function to learn the shrinkage function, and the gradient-based L-BFGS method is used to minimize the loss function.

[0084] In step S4, the alternating direction multiplier method is used to decompose the joint optimization problem (2) into an illumination subproblem, a reflectivity subproblem and an auxiliary variable subproblem for solution. The specific calculation is as follows:

[0085] Lighting I sub-problem:

[0086]

[0087] (3)

[0088] in,

[0089]

[0090] F i represents the i-th linear filter f i The matrix representation of F i T Indicates F i The transpose operation of h represents the vertical direction of the first-order gradient operator, ▽ v represents the horizontal direction of the first-order gradient operator;

[0091] Reflectivity R subproblem:

[0092] (4)

[0093] in,

[0094]

[0095] Auxiliary variable z subproblem:

[0096] (5)

[0097] Among them, π 0j Represents the weight of each part, v j is the mean, α is the variance. To facilitate fast learning, v j and α are set to fixed values.

[0098] Auxiliary variable u i Sub-questions:

[0099] (6)

[0100] Among them, π ij Represents the weight of each part, v j is the mean, α is the variance. To facilitate fast learning, v j and α are set to fixed values.

[0101] Use negative Peak Signal-to-Noise Ratio (PSNR) as the loss function , learning the shrinkage functions (5) and (6), the specific operation is as follows:

[0102]

[0103] (7)

[0104] Among them, S represents the number of training samples, t represents the tth learning process, represents the brightness channel enhanced by the t-th learning, represents the brightness channel obtained by decomposing the underwater real (ideal) image for the tth time, Represents the maximum value of the brightness channel of the real (ideal) underwater image; λ t , γ t , π ti , f ti is the parameter learned for the tth time, ξ t is a set of learnable parameters.

[0105] The gradient-based L-BFGS method is used to minimize the loss function. The specific operation is as follows:

[0106] (8)

[0107] Among them, ∂ represents the partial derivative operation.

[0108] Specifically, in step S4, the iterative update process is as follows:

[0109] enter ; Initialize parameters, λ0= 0.2, β0= 0.001; Set the number of loops n=10;

[0110] Update I by formula (3), update R by formula (4), update z by formula (5), and update u by formula (6) i, Update ξ by formula (7) t ;

[0111] After reaching the set number of times, the cycle ends and the enhanced illumination and enhanced reflectivity are output.

[0112] S5. Multiply the enhanced illumination and reflectivity by image pixels to obtain an enhanced brightness channel.

[0113] The enhanced illumination and reflectivity obtained in step S4 are multiplied by the image pixels to obtain the enhanced brightness channel. , the specific calculation is as follows:

[0114] (9)

[0115] in, represents the enhanced illumination, represents the enhanced reflectivity, and ◦ represents the pixel multiplication operation of the image.

[0116] S6, the enhanced brightness channel It is merged with the original chroma channel H and saturation channel S, and then converted back from the HSV color space to the RGB color space to output the underwater image without marine snow.

[0117] Compared with the existing removal methods, the proposed method has the following advantages: (1) Through shrinkage function learning, a flexible and efficient non-Gaussian modeling method is used to preserve data fidelity, so as to effectively solve the key problem that the marine snow noise modeling does not conform to the Gaussian distribution; (2) The first-order corrected gradient of the brightness channel is used to effectively constrain the first-order gradient sparse prior of the reflectivity, and the L1 norm is used to constrain the first-order gradient sparse prior of the illumination, so as to suppress noise and enhance the underwater image structure and details.

[0118] Accordingly, an embodiment of the present invention further provides an underwater image marine snow removal device based on shrinkage function fidelity, such as Figure 2 As shown, the device comprises:

[0119] An input module 201 is used to input an original underwater image containing marine snow as initial input data;

[0120] A first conversion module 202, configured to convert the original underwater image from an RGB color space to an HSV color space;

[0121] Processing module 203, for decomposing the brightness channel of the HSV color space into illumination and reflectance according to the Retinex theory, adopting non-Gaussian modeling of shrinkage function learning for data fidelity, and using the first-order corrected gradient of the brightness channel to constrain the first-order gradient sparse prior of the reflectance, and using the L1 norm to constrain the first-order gradient sparse prior of the illumination;

[0122] A solution module 204 is used to express the problem of removing marine snow from underwater images as a joint optimization problem, and use an alternating direction multiplier method to decompose the joint optimization problem into an illumination subproblem, a reflectivity subproblem, and an auxiliary variable subproblem for iterative updating and solving; and use a negative peak signal-to-noise ratio as a loss function to learn a shrinkage function, and use a gradient-based L-BFGS method to minimize the loss function;

[0123] A dot multiplication module 205 is used to multiply the enhanced illumination and reflectivity by image pixels to obtain an enhanced brightness channel;

[0124] The second conversion module 206 is used to merge the enhanced brightness channel with the original chrominance channel and saturation channel, and then convert the HSV color space back to the RGB color space to output the underwater image with the marine snow removed.

[0125] For ease of explanation, Figure 2 Only the main components of the device are shown. The device 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.

[0126] In an exemplary embodiment, the present invention further provides an electronic device, the electronic device comprising:

[0127] processor;

[0128] 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 above-mentioned method for removing marine snow from underwater images based on shrinkage function fidelity are implemented.

[0129] 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 marine snow removal method based on shrinkage function fidelity as described above. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0130] 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.

[0131] 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).

[0132] 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.

[0133] In the present invention, "at least one" means one or more, and "plurality" 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 items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0134] 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.

[0135] 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.

[0136] 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.

[0137] 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.

[0138] 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, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or 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: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0139] 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.

[0140] 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. A method for removing marine snow from underwater images based on shrinkage function fidelity, characterized in that: The following steps are involved: S1, inputting the original underwater image containing marine snow as the starting input data; S2, converting the original underwater image from RGB color space to HSV color space; S3. According to the Retinex theory, the brightness channel of the HSV color space is decomposed into illumination and reflectance. The non-Gaussian modeling of shrinkage function learning is adopted to preserve the data fidelity. At the same time, the first-order corrected gradient of the brightness channel is used to constrain the first-order gradient sparse prior of the reflectance, and the L1 norm is used to constrain the first-order gradient sparse prior of the illumination. S4, expressing the problem of removing marine snow from underwater images as a joint optimization problem, and using the alternating direction multiplier method to decompose the joint optimization problem into an illumination subproblem, a reflectivity subproblem, and an auxiliary variable subproblem for iterative updating and solving; At the same time, a negative peak signal-to-noise ratio is used as the loss function to learn the shrinkage function, and the gradient-based L-BFGS method is used to minimize the loss function; S5, multiplying the enhanced illumination and reflectivity by the image pixels to obtain an enhanced brightness channel; S6, merging the enhanced brightness channel with the original chrominance channel and saturation channel, and then converting from the HSV color space back to the RGB color space, and outputting the underwater image with the marine snow removed; The step S3 specifically includes: according to the Retinex theory, decomposing the brightness channel V into illumination I and reflectivity R, adopting non-Gaussian modeling of shrinkage function learning for data fidelity; at the same time, using the first-order corrected gradient of the brightness channel to constrain the first-order gradient sparse prior of the reflectivity, and using the L1 norm to constrain the first-order gradient sparse prior of the illumination; the specific operations are as follows: The conversion form is as follows: Wherein, ο represents the pixel multiplication operation of the image, * represents the convolution operation; T i () represents the i-th nonlinear penalty function, f i represents the i-th linear filter, represents the first-order gradient operator, z, u i , d represents the auxiliary variable, G is the first-order correction gradient of the brightness channel, N f According to the experience value, it is set to 8-10, β i , γ, α represent learnable parameters, and λ is set to 0.0001 based on empirical values; In step S4, the alternating direction multiplier method is used to decompose the joint optimization problem (2) into an illumination subproblem, a reflectivity subproblem and an auxiliary variable subproblem for solution. The specific calculation is as follows: Lighting I sub-problem: in, F i represents the i-th linear filter f i The matrix representation of F i T Indicates F i The transpose operation of represents the vertical direction of the first-order gradient operator, represents the horizontal direction of the first-order gradient operator; Reflectivity R subproblem: in, Auxiliary variable z subproblem: Among them, π 0j Represents the weight of each part, v j is the mean, α is the variance; Auxiliary variable u i Sub-questions: Among them, π ij Represents the weight of each part, v j is the mean, α is the variance; To facilitate quick learning, v j and α are set to fixed values; In step S4, a negative peak signal-to-noise ratio is used as a loss function. Learning the shrinkage functions (5) and (6) is as follows: Among them, S represents the number of training samples, t represents the tth learning process, represents the brightness channel enhanced by the t-th learning, represents the brightness channel obtained by decomposing the underwater real image for the tth time, Indicates the maximum value of the brightness channel of the real underwater image; t , γ t , π ti , f ti is the parameter learned for the tth time, ξ t is a set of learnable parameters; In step S4, the gradient-based L-BFGS method is used to minimize the loss function. The specific operation is as follows: in, represents partial derivative operation; In step S4, the iterative update process is as follows: enter and Initialize parameters and set the number of loops; Update I by formula (3), update R by formula (4), update z by formula (5), and update u by formula (6) i , update ξ through formula (7) t ; After reaching the set number of times, the cycle ends and the enhanced illumination and enhanced reflectivity are output.

2. The method for removing marine snow from underwater images based on shrinkage function fidelity according to claim 1, characterized in that: The step S5 specifically includes: The enhanced illumination and reflectivity obtained in step S4 are multiplied by the image pixels to obtain the enhanced brightness channel. The specific calculation is as follows: in, represents the enhanced illumination, represents the enhanced reflectivity, and ο represents the pixel multiplication operation of the image.

3. A device for removing marine snow from underwater images based on shrinkage function fidelity, the device being used to implement the method as claimed in any one of claims 1 to 2, characterized in that: The device comprises: An input module, used for inputting original underwater images containing marine snow as initial input data; A first conversion module, used for converting the original underwater image from the RGB color space to the HSV color space; A processing module is used to decompose the brightness channel of the HSV color space into illumination and reflectance according to the Retinex theory, and adopt non-Gaussian modeling of shrinkage function learning to preserve data fidelity. At the same time, the first-order corrected gradient of the brightness channel is used to constrain the first-order gradient sparse prior of the reflectance, and the first-order gradient sparse prior of the illumination is constrained by the L1 norm; A solution module is used to express the problem of removing marine snow from underwater images as a joint optimization problem, and use an alternating direction multiplier method to decompose the joint optimization problem into an illumination subproblem, a reflectivity subproblem, and an auxiliary variable subproblem for iterative updating and solving; a negative peak signal-to-noise ratio is used as a loss function to learn a shrinkage function, and a gradient-based L-BFGS method is used to minimize the loss function; The dot multiplication module is used to multiply the enhanced illumination and reflectivity by the image pixels to obtain the enhanced brightness channel; The second conversion module is used to merge the enhanced brightness channel with the original chrominance channel and saturation channel, and then convert the HSV color space back to the RGB color space to output the underwater image without marine snow.

4. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the method according to any one of claims 1 to 2 is implemented.

5. 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 2.

Citation Information

Patent Citations

  • Retinex variational underwater image enhancement method and device based on deep CNN denoising prior

    CN117593235A

  • Retinex variational underwater image enhancement method and device based on deep expansion network

    CN117934340A