Underwater image enhancement method and system based on gradient line prior

Through the gradient line prior method, the underwater imaging model and window gradient operation operator are used to solve the problems of low contrast and color distortion caused by light attenuation in underwater images, and the clarity and color performance of underwater images are improved.

CN120495128APending Publication Date: 2025-08-15HUNAN UNIV OF SCI & TECH SANYA RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510731676.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The prior art has problems with low contrast and color distortion caused by light attenuation in underwater imaging. The existing methods such as dark channel priors and maximum intensity priors have defects in contrast enhancement and color reduction, affecting the accuracy of underwater image enhancement.

Method used

Using a gradient line prior method, the slope and intercept are obtained through the underwater imaging model and the window gradient operation operator, the gradient lines are fitted using the linear distribution characteristics of the pixels in the local area, and the transmission map is processed in combination with guide filtering to restore the clear underwater image.

Benefits of technology

It improves the clarity and color performance of underwater images, enhances image details, improves visibility, and solves the problems of blur and color distortion caused by light attenuation in underwater imaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495128A_ABST
    Figure CN120495128A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an underwater image enhancement method and system based on gradient line prior, and the method comprises the steps: collecting an underwater image, determining a corresponding water-light value, and obtaining a preprocessed image through an underwater imaging model; performing normalization processing on the underwater imaging model, and determining a window gradient operator; performing window gradient operation on the preprocessed image based on a window gradient operator in combination with the normalized underwater imaging model, respectively obtaining a slope and an intercept, obtaining a transmission image corresponding to a local image block, and determining a gradient line prior; fitting a gradient line by using the linear distribution characteristics of the pixels in the local area to obtain a transmission value; processing the transmission image, and inputting the processed transmission image and the corresponding water-light value into the normalized underwater imaging model for recovery to obtain a target image; according to the method, the details of the underwater image are enhanced, the color expression of the underwater image is improved, the visibility is improved, and the underwater image is clearer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an underwater image enhancement method and system based on gradient line prior. Background Art

[0002] Underwater vision technology plays a vital role in marine science research and marine engineering. Through underwater imaging technology, scientists can explore deep into the seabed, study the diversity and distribution of marine life, and conduct detailed surveys of the geological environment. In addition, autonomous underwater vehicles often rely on visual methods to achieve their own navigation and control when performing missions, especially in complex and changing underwater environments.

[0003] However, underwater imaging systems face the problem of light attenuation, which poses a serious threat to the acquisition of high-quality underwater images and videos. This makes the underwater imaging system's environment blurry and hinders the effective application of most computer vision technologies in marine environments. Light attenuation is mainly caused by two factors: scattering and absorption. In underwater environments, due to the presence of a large number of suspended dust-like particles, underwater images are always affected by the scattering effect. That is, when light reflected from the surface of an object propagates to the camera, it interacts with particles suspended in the imaging medium, forming scattering. The scattering effect can be further divided into two types: backscattering and forward scattering. Backscattering occurs when light from an ambient light source is scattered into the line of sight and ultimately reaches the imaging plane, resulting in a foggy, water-like effect in the underwater image and reducing the contrast of the scene. Forward scattering occurs when part of the reflected light diffuses at a small angle relative to the viewpoint, resulting in a blurred image. In addition, the absorption rate of light of different wavelengths in water also varies, causing light of different colors to gradually disappear as the water depth increases. Since water mainly absorbs red light with a longer wavelength, red light will gradually disappear in underwater images. Blue light, due to its shorter wavelength, can penetrate the farthest distance in water, so underwater images usually appear blue or green. Therefore, low contrast and color distortion are two major problems that must be solved in the underwater imaging process.

[0004] In the existing technology, patch-based local prior methods, such as dark channel prior (DCP) or maximum intensity projection (MIP), are usually used. They attempt to predict and compensate for the impact of light attenuation by utilizing some local features in the image. However, there are still defects in contrast enhancement and color restoration, resulting in low accuracy of underwater image enhancement. Summary of the Invention

[0005] In order to solve the technical problem that the existing technology has defects in contrast enhancement and color restoration, which affects underwater image restoration, the purpose of the present invention is to provide an underwater image enhancement method based on gradient line prior. The technical solution adopted is as follows: Collect underwater images and determine the corresponding water light value, and obtain pre-processed images through the underwater imaging model; Normalizing the underwater imaging model according to the preprocessed image and determining the window gradient operation operator; Based on the window gradient operation operator combined with the normalized underwater imaging model, the pre-processed image is subjected to window gradient operation to obtain the slope and intercept respectively, and the transmission map of the corresponding local image block is obtained, and the gradient line prior is determined; The linear distribution characteristics of pixels in the local area are used to fit the gradient line to obtain the transmission value; The transmission map is processed by the transmission value, and the processed transmission map and the corresponding water light value are input into the normalized underwater imaging model to restore the target image.

[0006] Preferably, collecting underwater images and determining corresponding water light values, and obtaining pre-processed images through an underwater imaging model, include: The calculation formula corresponding to the underwater imaging model is: in, Represents underwater images; Indicates pixel position; Indicates scene transmission; Indicates the clear underwater image after processing; Indicates water light value; Get the preprocessed image, the corresponding calculation formula is: in, represents the preprocessed image; Represents the three channels of the underwater image, that is, the three channels of the RGB image, .

[0007] Preferably, the underwater imaging model is normalized according to the preprocessed image, and a window gradient operation operator is determined, including: The underwater imaging model is normalized according to the preprocessed image, and the corresponding calculation formula is: in, represents the preprocessed image; Indicates pixel position; Indicates water light value; Three channels representing underwater images; Indicates scene transmission; represents the normalized clear underwater image; Determine the window gradient operation operator, and the corresponding calculation formula is: in, Represents the window gradient operation operator; Indicates pixel position; represents a set of pixel locations of an underwater image; Indicates standard deviation The weight of the Gaussian filter in the local window; 、 Represent the partial derivatives of the horizontal and vertical coordinates of the pixel position respectively.

[0008] Preferably, a window gradient operation is performed on the preprocessed image based on a window gradient operation operator combined with a normalized underwater imaging model to obtain the slope and intercept respectively, obtain a transmission map corresponding to the local image block, and determine the gradient line prior, including: A window gradient operation operator is used to perform a window gradient operation on the normalized underwater imaging model and simplify the model to obtain a first intermediate state; Obtaining a second intermediate state through the first intermediate state, and obtaining a slope and an intercept respectively, and obtaining a transmission map corresponding to the local image block according to the slope; A gradient line prior is determined based on a ratio of the first intermediate state to the second intermediate state.

[0009] Preferably, a window gradient operation operator is used to perform a window gradient operation on the normalized underwater imaging model, and the model is simplified to obtain a first intermediate state, including: The calculation formula corresponding to the window gradient operation is: in, Represents the window gradient operation operator; represents the preprocessed image; Indicates pixel position; Indicates water light value; Three channels representing underwater images; Indicates scene transmission; represents the normalized clear underwater image; Get the first intermediate state, the corresponding calculation formula is: in, Indicates the first intermediate state; Represents a constant term, used to avoid the denominator being 0; represents the slope; represents the intercept.

[0010] Preferably, obtaining the second intermediate state through the first intermediate state, respectively obtaining the slope and the intercept, and obtaining the transmission map corresponding to the local image block according to the slope includes: The second intermediate state is obtained through the first intermediate state, wherein, Indicates the second intermediate state; Get the slope and intercept respectively, and get the transmission map of the corresponding local image block according to the slope. The corresponding calculation formula is: in, Represents the transmission map corresponding to the local image patch.

[0011] Preferably, the gradient line prior is determined based on the linear relationship between the first intermediate state and the second intermediate state, specifically: .

[0012] Preferably, the linear distribution characteristics of pixels in the local area are used to fit the gradient line to obtain the transmission value, including: Define the first intermediate state as , , the second intermediate state is , ,in, 、 Any image patch representing the first intermediate state and the second intermediate state respectively; 、 They represent the set of corresponding image patches respectively; The image patch is converted into a vectorized format using a vectorization operator, and the slope of the gradient line is obtained by the least squares technique. The corresponding calculation formula is: in, represents the slope of the gradient line; 、 Both represent vectorized formats of image patches; The length of the vectorized format representing the image patch; 、 They represent the average values of the vectorized formats of the corresponding image patches; Represents the element-wise multiplication operator; Determine the slopes of the gradient lines of the three channels of the underwater image respectively and calculate the transmission value. The corresponding calculation formula is: in, Indicates the transmission value; 、 、 Represents the channels of underwater images 、 、 The slope of the gradient line.

[0013] Preferably, the transmission map is processed by the transmission value, and the processed transmission map and the corresponding water light value are input into the normalized underwater imaging model to restore the target image, including: The transmission map is smoothed by transmission value guided filtering, and the features in the underwater image are transferred to the transmission map. The corresponding calculation formula is: in, represents the transmission image after processing; represents the guided filtering operator; Indicates the transmission value; Substitute the processed transmission map and the corresponding water light value into the processed underwater imaging model for restoration to obtain a clear underwater image. The clear underwater image is defined as the target image. The corresponding calculation formula is: in, Indicates clear underwater images; Represents underwater images; Indicates the water light value corresponding to the underwater image; Represents the transmission image after processing.

[0014] To solve the above problems, the present application also provides: an underwater image enhancement system based on gradient line prior, wherein the system stores program data, and when the program data is executed, an underwater image enhancement method based on gradient line prior as described in any of the above items is implemented.

[0015] The present invention has the following beneficial effects: 1. A gradient line prior (GLP) is obtained through a windowed gradient operator and an underwater imaging model. This means that in the normalized underwater image, there is a linear relationship between the inverse of the gradient distributed in different regions of the underwater image plane and the ratio of the corresponding pixel intensity to the gradient. The inherent linear distribution characteristics of local pixels are used to fit the gradient line, accurately estimating the transmission value. The transmission map is then processed based on the relationship between the gradient lines of different channels and guided filtering. The processed transmission map and the corresponding water light value are then used to restore the underwater image to obtain a clear underwater image. This enhances the details of the underwater image, improves its color representation, and enhances its visibility, making the underwater image clearer.

[0016] 2. The underwater image enhancement system based on gradient line prior provided by the present invention has the same beneficial effects as the underwater image enhancement method based on gradient line prior provided by the present invention, and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. 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 paying any creative work.

[0018] Figure 1 A flowchart of a method for underwater image enhancement based on gradient line priors provided by one embodiment of the present invention; Figure 2 A schematic diagram of the comparison between an underwater image and a target image in an underwater image enhancement method based on gradient line prior provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0019] To further illustrate the technical means and effectiveness of the present invention in achieving its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of a method and system for underwater image enhancement based on gradient line priors proposed by the present invention. In the following description, references to different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

[0020] Unless defined otherwise, 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 belongs.

[0021] The specific scheme of the underwater image enhancement method and system based on gradient line prior provided by the present invention is described in detail below with reference to the accompanying drawings.

[0022] See also Figure 1 , which shows a flowchart of a method for underwater image enhancement based on gradient line priors provided by one embodiment of the present invention, the method comprising: Step S1: Collect underwater images and determine the corresponding water light value, and obtain a pre-processed image through the underwater imaging model; Step S2: normalizing the underwater imaging model according to the preprocessed image and determining the window gradient operation operator; Step S3: performing a window gradient operation on the preprocessed image based on the window gradient operation operator combined with the normalized underwater imaging model, obtaining the slope and intercept respectively, obtaining the transmission map of the corresponding local image block, and determining the gradient line prior; Step S4: fitting the gradient line using the linear distribution characteristics of the pixels in the local area to obtain the transmission value; Step S5: Processing the transmission map through the transmission value, inputting the processed transmission map and the corresponding water light value into the normalized underwater imaging model to restore the target image.

[0023] For better explanation, the present application proposes an underwater image enhancement method based on gradient line prior, which can not only restore visibility for underwater images, but also restore images under different weather and imaging conditions, such as foggy weather, low light illumination at night and other complex scenes, to improve the recognition and clarity of the corresponding images, making the images easier to identify and analyze.

[0024] Furthermore, step S1 includes: Step S11: The calculation formula corresponding to the underwater imaging model is: in, Represents underwater images; Indicates pixel position; Indicates scene transmission; Indicates the clear underwater image after processing; Indicates the water light value.

[0025] It is explained that the underwater imaging model describes the degradation caused by the absorption and scattering of light by particles in the water. This degradation makes the images taken underwater become blurred and causes color distortion of the underwater images. The underwater imaging model refers to a mathematical model used to simulate and describe the absorption and scattering effects experienced by such light during underwater propagation, so as to understand and compensate for the degradation phenomenon of underwater imaging and improve image quality. The water light value refers to the attenuation degree of light in water measured by conventional methods in an underwater environment, which is used to correct and compensate for image degradation in underwater imaging, that is, it usually relies on pre-set parameters and empirical formulas, and estimates the water light value by measuring the optical properties of the water body, namely the absorption coefficient and scattering coefficient, so as to improve the quality and accuracy of underwater imaging.

[0026] Step S12: Obtain the pre-processed image. The corresponding calculation formula is: in, represents the preprocessed image; Represents the three channels of the underwater image, that is, the three channels of the RGB image, .

[0027] It can be explained that the underwater image and its corresponding water light value are input into the underwater imaging model for deduction to obtain a preprocessed image, that is, the data in the underwater image is subjected to preliminary preprocessing such as noise removal and contrast adjustment to ensure the quality of the underwater image; among them, the three channels of the underwater image correspond to the red, green, and blue color channels of the standard RGB image, and in the underwater image, due to the scattering and absorption characteristics of light, the color and contrast of the image will be affected. Comprehensive processing of these three channels can effectively improve the quality of the underwater image and enhance the color restoration performance.

[0028] Furthermore, step S2 includes: Step S21: normalize the underwater imaging model according to the pre-processed image. The corresponding calculation formula is: in, represents the preprocessed image; Indicates pixel position; Indicates water light value; Three channels representing underwater images; Indicates scene transmission; Represents the normalized clear underwater image.

[0029] It is explained that the underwater imaging model is normalized, that is, the pixel value range of the underwater image is adjusted to a unified standard range, usually between 0 and 1. It is generally obtained by dividing each pixel value of the image by the maximum pixel value of the image. The normalization process makes the pixel value distribution of the underwater image more uniform, and then makes the processed underwater imaging model conducive to image enhancement, feature extraction and classification, etc., which is helpful for subsequent image processing and analysis.

[0030] Step S22: Determine the window gradient operation operator, and the corresponding calculation formula is: in, Represents the window gradient operation operator; Indicates pixel position; represents a set of pixel locations of an underwater image; Indicates standard deviation The weight of the Gaussian filter in the local window; 、 Represent the partial derivatives of the horizontal and vertical coordinates of the pixel position respectively.

[0031] To better illustrate, the window gradient operator is used to calculate the gradient information of each pixel in the image, that is, the rate of change of the pixel in the horizontal and vertical directions; Indicates standard deviation The weight of the Gaussian filter in the local window is used to clarify the contribution of the Gaussian filter to each pixel in the local window when calculating the image window gradient. It depends on the distance between the pixel and the center of the window. The closer the distance, the greater the weight. 、 They represent the partial derivatives of the horizontal and vertical coordinates of the pixel position, respectively, and represent the rate of change of the pixel point along the horizontal and vertical coordinate directions, thereby determining the gradient vector, which is used to analyze the local features of the underwater image.

[0032] Furthermore, step S3 includes: Step S31: using a window gradient operation operator to perform a window gradient operation on the normalized underwater imaging model, and simplifying it to obtain a first intermediate state.

[0033] Furthermore, step S31 includes: Step S311: The calculation formula corresponding to the window gradient operation is: in, Represents the window gradient operation operator; represents the preprocessed image; Indicates pixel position; Indicates water light value; Three channels representing underwater images; Indicates scene transmission; represents the normalized clear underwater image; Step S312: Obtain the first intermediate state, the corresponding calculation formula is: in, Indicates the first intermediate state; Represents a constant term, used to avoid the denominator being 0; represents the slope; represents the intercept.

[0034] Preferably, Represents a constant term to avoid division by zero, which is a small positive number close to zero and is set to 10e -9 .

[0035] It can be explained that the window gradient operation refers to the gradient calculation of the local area of the underwater image, which effectively extracts the edge and texture information in the underwater image to enhance the edge features and detail information of the image. That is, the window gradient operation is a linear change, which is then simplified, that is, the scene is transmitted As a local constant, the calculation formula in step S311 is simplified to .

[0036] The corresponding calculation formula obtained by integrating the simplified formula is: Explanation: Due to scene transmission Too small will lead to abnormal recovery of underwater images, so usually a constant lower bound is given to scene transmission, which is generally set to 0.05. It can be considered as a small positive number close to zero, and the above calculation formula can be simplified to: Further deduction based on the calculation formula in step S311 yields: because It can be regarded as a constant, denoted as , and then further deduce the calculation formula to obtain: That is, the calculation formula in step S312 is obtained to determine the first intermediate state.

[0037] Step S32: obtaining a second intermediate state through the first intermediate state, and obtaining a slope and an intercept respectively, and obtaining a transmission map corresponding to the local image block according to the slope.

[0038] As an optional implementation, in order to improve efficiency and based on local constant transmission, that is, the characteristics and transmission characteristics of the local area are relatively constant; the entire underwater image is divided into several networks, and the image blocks are screened into non-overlapping networks to efficiently perform image analysis and processing, and better cope with the complexity and variability of the underwater environment.

[0039] Furthermore, step S32 includes: Step S321: Obtain a second intermediate state through the first intermediate state, wherein: Indicates the second intermediate state; Step S322: Obtain the slope and intercept respectively, and obtain the transmission map of the corresponding local image block according to the slope. The corresponding calculation formula is: in, Represents the transmission map corresponding to the local image patch.

[0040] It can be explained that the slope is used to represent the brightness change trend of the underwater image. A larger slope indicates that the brightness change of the corresponding image area is more drastic. Conversely, a smaller slope indicates that the brightness change of the corresponding image area is relatively gentle. The intercept is used to represent the brightness baseline of the underwater image, that is, the brightness level of the corresponding image area when there are no other factors affecting it. The transmission map refers to the image formed when light passes through an object in the image, which contains information such as the shape and texture of the object. Through the transmission map, the local brightness and contrast of the image can be controlled more accurately, so as to enhance the image details and improve the visual effect.

[0041] Step S33: determining a gradient line prior based on the ratio of the first intermediate state to the second intermediate state.

[0042] Furthermore, in step S33, the gradient line prior is determined based on the linear relationship between the first intermediate state and the second intermediate state, specifically: .

[0043] Furthermore, step S4 includes: Step S41: Define the first intermediate state as , , the second intermediate state is , ,in, 、 Any image patch representing the first intermediate state and the second intermediate state respectively; 、 They represent the set of corresponding image patches respectively.

[0044] To explain, an image patch refers to a partial area extracted from an image, usually a small rectangular area, which contains a specific feature, texture or part of an object in the image; , , Indicates the spatial size of the image patch.

[0045] Step S42: convert the image patch into a vectorized format using a vectorization operator, and obtain the slope of the gradient line using the least squares technique. The corresponding calculation formula is: in, represents the slope of the gradient line; 、 Both represent vectorized formats of image patches; The length of the vectorized format representing the image patch; 、 They represent the average values of the vectorized formats of the corresponding image patches; Represents the element-wise multiplication operator.

[0046] Make a statement, use vectorized operators Convert the image patch into a vectorized format, that is, map the pixel information in the image patch into a vector space, and get the vector representation as , , whose length is , the length of the vector is the dimension of the vector, in order to capture the local features of the image patch for subsequent analysis tasks; among them, the image patch in vectorized format is conducive to accurately representing and manipulating the geometric shape and features of the image, ensuring that there will be no distortion or blur when transforming it; therefore, without eliminating abnormal pixels, that is, abnormal pixel points that interfere with the results, the ordinary least squares technique is directly used to obtain the slope of the gradient line.

[0047] Step S43: Determine the slopes of the gradient lines of the three channels of the underwater image respectively and calculate the transmission value. The corresponding calculation formula is: in, Indicates the transmission value; 、 、 Represents the channels of underwater images 、 、 The slope of the gradient line.

[0048] To explain, the underwater image is an RGB image, which includes three channels, namely red, green and blue. Therefore, the slope of the gradient line is calculated for each of the three channels, and then the average value is calculated as the transmission value of the gradient line. A lower bound of 0.05 is set to prevent the gradient value from being too small, resulting in image color distortion, thereby ensuring the quality and effect of image processing.

[0049] It can be understood that in step S5, the transmission map is processed by the transmission value, that is, the transmission map is refined, and the transmission map is optimized using the guided filter and the multi-channel gradient line relationship, so as to enhance the image details and suppress the noise, and restore the clarity and color of the underwater image; that is, since the transmission map includes a variety of important information, after processing it, the information can be better retained, the image clarity and detail expression can be improved, and the clarity and color of the underwater image can be restored.

[0050] Furthermore, step S5 includes: Step S51: Smoothing the transmission map through transmission value guided filtering to transfer the features in the underwater image to the transmission map. The corresponding calculation formula is: in, represents the transmission image after processing; represents the guided filtering operator; Indicates the transfer value.

[0051] It is explained that the image patches determined by different image blocks are used to determine the transmission, which may cause image block artifacts and affect the overall quality of the underwater image. Therefore, in order to refine the transmission map, the transmission map is smoothed by using guided filtering combined with the transmission values confirmed by multiple channels, which effectively reduces the noise and artifacts in the image and improves the overall clarity of the image; at the same time, the important structures in the underwater blurred image are transferred to the transmission map, that is, the important information of the underwater image is retained through the transmission map, ensuring that a more realistic image effect can be presented when it is subsequently restored.

[0052] Step S52: Substitute the processed transmission image and the corresponding water light value into the processed underwater imaging model for restoration to obtain a clear underwater image. The clear underwater image is defined as the target image. The corresponding calculation formula is: in, Indicates clear underwater images; Represents underwater images; Indicates the water light value corresponding to the underwater image; Represents the transmission image after processing.

[0053] See also Figure 2 , which shows a schematic diagram of the comparison between an underwater image and a target image of an underwater image enhancement method based on gradient line prior provided by the first embodiment of the present invention; wherein, the vertically arranged (a) and (b) are a group of corresponding images, and the first row of the horizontally arranged images are the underwater images determined to be processed; the second row is the processed transmission image and the underwater clear image obtained after the corresponding water light value processing; it can be seen that the restoration effect of the underwater image after the gradient line prior processing is very good, presenting more details, better color restoration, and clearer image presentation.

[0054] It can be understood that a gradient line prior is obtained through the window gradient operation operator and the underwater imaging model, that is, in the normalized underwater image, there is a linear relationship between the inverse of the gradient distributed in different areas of the underwater image plane and the ratio of the corresponding pixel intensity to the gradient; the gradient line is fitted using the inherent linear distribution characteristics of local pixel points to accurately estimate the transmission value, and the transmission map is processed according to the relationship between the gradient lines of different channels and the guided filter, and then the underwater image is restored through the processed transmission map and the corresponding water light value to obtain a clear underwater image, that is, the details of the underwater image are enhanced, the color performance of the underwater image is improved, the visibility of the underwater image is improved, and the underwater image is clearer.

[0055] The second embodiment of the present invention proposes an underwater image enhancement system based on gradient line prior. The system stores program data. When the program data is executed, it implements an underwater image enhancement method based on gradient line prior as described in the aforementioned embodiment. The system is essentially a software system, which is composed of various units that implement corresponding functions. It has the same beneficial effects as the aforementioned underwater image enhancement method based on gradient line prior, and will not be repeated here.

[0056] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0057] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

Claims

1. A method for underwater image enhancement based on gradient line prior, characterized in that: The method comprises: Collect underwater images and determine the corresponding water light value, and obtain pre-processed images through the underwater imaging model; Normalizing the underwater imaging model according to the preprocessed image and determining the window gradient operation operator; Based on the window gradient operation operator combined with the normalized underwater imaging model, the pre-processed image is subjected to window gradient operation to obtain the slope and intercept respectively, and the transmission map of the corresponding local image block is obtained, and the gradient line prior is determined; The linear distribution characteristics of pixels in the local area are used to fit the gradient line to obtain the transmission value; The transmission map is processed by the transmission value, and the processed transmission map and the corresponding water light value are input into the normalized underwater imaging model to restore the target image.

2. The underwater image enhancement method based on gradient line prior according to claim 1, characterized in that: Collect underwater images and determine the corresponding water light values, and obtain pre-processed images through the underwater imaging model, including: The calculation formula corresponding to the underwater imaging model is: in, Represents underwater images; Indicates pixel position; Indicates scene transmission; Indicates the clear underwater image after processing; Indicates water light value; Get the preprocessed image, the corresponding calculation formula is: in, represents the preprocessed image; Represents the three channels of the underwater image, that is, the three channels of the RGB image, .

3. The underwater image enhancement method based on gradient line prior according to claim 1, characterized in that: The underwater imaging model is normalized according to the preprocessed image, and the window gradient operation operator is determined, including: The underwater imaging model is normalized according to the preprocessed image, and the corresponding calculation formula is: in, represents the preprocessed image; Indicates pixel position; Indicates water light value; Three channels representing underwater images; Indicates scene transmission; represents the normalized clear underwater image; Determine the window gradient operation operator, and the corresponding calculation formula is: in, Represents the window gradient operation operator; Indicates pixel position; represents a set of pixel locations of an underwater image; Indicates standard deviation The weight of the Gaussian filter in the local window; 、 Represent the partial derivatives of the horizontal and vertical coordinates of the pixel position respectively.

4. The underwater image enhancement method based on gradient line prior according to claim 1, characterized in that: Based on the window gradient operation operator combined with the normalized underwater imaging model, the pre-processed image is subjected to window gradient operation to obtain the slope and intercept respectively, and the transmission map of the corresponding local image block is obtained. The gradient line prior is determined, including: A window gradient operation operator is used to perform a window gradient operation on the normalized underwater imaging model and simplify the model to obtain a first intermediate state; Obtaining a second intermediate state through the first intermediate state, and obtaining a slope and an intercept respectively, and obtaining a transmission map corresponding to the local image block according to the slope; A gradient line prior is determined based on a ratio of the first intermediate state to the second intermediate state.

5. The underwater image enhancement method based on gradient line prior according to claim 4, characterized in that: The window gradient operation operator is used to perform the window gradient operation on the normalized underwater imaging model and simplify it to obtain the first intermediate state, including: The calculation formula corresponding to the window gradient operation is: in, Represents the window gradient operation operator; represents the preprocessed image; Indicates pixel position; Indicates water light value; Three channels representing underwater images; Indicates scene transmission; represents the normalized clear underwater image; Get the first intermediate state, the corresponding calculation formula is: in, Indicates the first intermediate state; Represents a constant term, used to avoid the denominator being 0; represents the slope; represents the intercept.

6. The underwater image enhancement method based on gradient line prior according to claim 5, characterized in that: The second intermediate state is obtained through the first intermediate state, and the slope and intercept are respectively obtained, and the transmission map corresponding to the local image block is obtained according to the slope, including: The second intermediate state is obtained through the first intermediate state, wherein, Indicates the second intermediate state; Get the slope and intercept respectively, and get the transmission map of the corresponding local image block according to the slope. The corresponding calculation formula is: in, Represents the transmission map corresponding to the local image patch.

7. The underwater image enhancement method based on gradient line prior according to claim 6, characterized in that: The gradient line prior is determined based on the linear relationship between the first intermediate state and the second intermediate state, specifically: .

8. The underwater image enhancement method based on gradient line prior according to claim 6, characterized in that: The linear distribution characteristics of the pixels in the local area are used to fit the gradient line to obtain the transmission value, including: Define the first intermediate state as , , the second intermediate state is , ,in, 、 Any image patch representing the first intermediate state and the second intermediate state respectively; 、 They represent the set of corresponding image patches respectively; The image patch is converted into a vectorized format using a vectorization operator, and the slope of the gradient line is obtained by the least squares technique. The corresponding calculation formula is: in, represents the slope of the gradient line; 、 Both represent vectorized formats of image patches; The length of the vectorized format representing the image patch; 、 They represent the average values of the vectorized formats of the corresponding image patches; Represents the element-wise multiplication operator; Determine the slopes of the gradient lines of the three channels of the underwater image respectively and calculate the transmission value. The corresponding calculation formula is: in, Indicates the transmission value; 、 、 Represents the channels of underwater images 、 、 The slope of the gradient line.

9. The underwater image enhancement method based on gradient line prior according to claim 1, characterized in that: The transmission map is processed by the transmission value, and the processed transmission map and the corresponding water light value are input into the normalized underwater imaging model to restore the target image, including: The transmission map is smoothed by transmission value guided filtering, and the features in the underwater image are transferred to the transmission map. The corresponding calculation formula is: in, represents the transmission image after processing; represents the guided filtering operator; Indicates the transmission value; Substitute the processed transmission map and the corresponding water light value into the processed underwater imaging model for restoration to obtain a clear underwater image. The clear underwater image is defined as the target image. The corresponding calculation formula is: in, Indicates clear underwater images; Represents underwater images; Indicates the water light value corresponding to the underwater image; Represents the transmission map after processing.

10. An underwater image enhancement system based on gradient line prior, characterized in that: The system stores program data, and when the program data is executed, the underwater image enhancement method based on gradient line prior according to any one of claims 1 to 9 is implemented.