Underwater image enhancement method based on Retinex algorithm

By using an underwater image enhancement method based on the Retinex algorithm, combined with multi-dimensional feature analysis and multi-scale processing, the adaptability and multi-scale processing problems of the traditional Retinex algorithm in underwater image enhancement are solved, and high-quality enhancement effects of underwater images are achieved.

CN120707394AActive Publication Date: 2025-09-26福州海洋研究院

Patent Information

Application Number
CN202510815728.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-26
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

The traditional Retinex algorithm has difficulty in adaptively adjusting parameters in underwater image enhancement, cannot fully optimize color correction, contrast enhancement and detail restoration, and lacks a multi-scale processing mechanism, resulting in poor enhancement effects.

Method used

An underwater image enhancement method based on the Retinex algorithm is adopted. Multi-dimensional feature analysis is performed through the preprocessing module, multi-scale processing is supported, and a multi-branch fusion structure is used for color correction, contrast adjustment and detail restoration. The fusion strategy is dynamically adjusted to adapt to different underwater environments.

Benefits of technology

It achieves comprehensive enhancement of underwater images, improves image quality, adapts to the precise processing of targets of different scales, enhances the stability and balance of processing, and improves the visual effect of images and the accuracy of subsequent processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707394A_ABST
    Figure CN120707394A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses an underwater image enhancement method based on a Retinex algorithm, and the method comprises the steps: firstly obtaining an underwater original image, and extracting multi-dimensional feature information through a preprocessing module (including a histogram analysis unit, a filtering analysis unit and the like); and multi-scale processing is supported, a target processing scale is detected during multi-scale simultaneous processing, and the feature confidence is calculated to screen the optimal feature. The Retinex algorithm processing unit adopts a multi-branch fusion structure (color correction, contrast adjustment and detail recovery branch), generates coefficients and fuses the coefficients to realize enhancement, and can dynamically adjust weights and parameters according to coefficient differences. The method comprehensively extracts features, performs adaptive multi-scale processing, balances the enhancement effect, improves the underwater image quality, and is suitable for underwater image optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an underwater image enhancement method based on a Retinex algorithm. Background Art

[0002] Underwater imaging is a complex environment, with water significantly absorbing and scattering light. This leads to widespread problems in underwater images, such as low contrast, color distortion, and blurred details. These problems severely impact the visual quality of underwater images and the accuracy of subsequent processing (such as target detection and image recognition). Traditional image enhancement methods often struggle to achieve optimal results underwater, primarily due to significant differences in the degradation mechanisms of underwater images compared to terrestrial images. For example, water absorbs light of different wavelengths to varying degrees, resulting in image color imbalance; and the scattering effect of suspended particles reduces image contrast and clarity.

[0003] The Retinex algorithm, a classic image enhancement algorithm, decomposes an image into reflected light and ambient light components, enhancing image detail and contrast by removing the influence of the ambient light component. However, the traditional Retinex algorithm has several limitations when directly applied to underwater images. Firstly, the characteristics of underwater images are complex and varied, with factors such as lighting conditions and water turbidity varying significantly across different scenes. Traditional algorithms struggle to adaptively adjust parameters to accommodate diverse underwater environments. Secondly, underwater images often require simultaneous resolution of multiple issues, including color correction, contrast enhancement, and detail restoration. A single Retinex algorithm struggles to fully optimize these aspects.

[0004] While research on underwater image enhancement has made some progress, several shortcomings remain. Existing methods typically rely on a single feature analysis method (such as histogram analysis or simple filtering) to process underwater images. These methods fail to fully extract the multidimensional features of underwater images (such as brightness distribution, spatial information, frequency components, and structural information), resulting in inaccurate subsequent enhancement. Objects of different scales in underwater images (such as small objects in the near distance and large structures in the distant) have different feature distributions. Traditional methods lack effective multi-scale processing mechanisms, making it difficult to simultaneously address image enhancement effects at different scales. During multi-scale processing or multi-branch fusion, parameter settings in existing methods often rely on manual experience and fail to automatically adjust based on real-time image features, resulting in poor algorithm robustness. When underwater images require simultaneous color correction, contrast adjustment, and detail restoration, traditional fusion strategies typically employ fixed weight allocations, failing to dynamically adjust priorities based on the differences in branch outputs across different scenarios, impacting the balanced enhancement effect.

[0005] Therefore, there is an urgent need for an underwater image enhancement method that can comprehensively analyze underwater image features, support multi-scale adaptive processing, and flexibly adjust parameters and fusion strategies to improve the quality of underwater images and meet the needs of practical applications. Summary of the Invention

[0006] The purpose of the present invention is to provide an underwater image enhancement method based on the Retinex algorithm to solve the problems raised in the above background technology.

[0007] To achieve the above object, the present invention provides the following technical solution: an underwater image enhancement method based on the Retinex algorithm, the method comprising:

[0008] Acquiring underwater raw image data to be processed;

[0009] Performing feature analysis on the underwater original image data through a preprocessing module to extract feature information of the underwater original image data;

[0010] Based on the extracted feature information, a Retinex algorithm processing unit is used to perform an enhancement operation on the underwater original image data.

[0011] Preferably, the preprocessing module includes one or more of a histogram analysis unit, a filtering analysis unit, a frequency domain transformation unit, and a feature extraction unit;

[0012] The performing feature analysis on the underwater original image data by a pre-processing module includes:

[0013] Calculating brightness distribution data of the underwater original image data by the histogram analysis unit, and when the brightness distribution data meets a preset condition, determining corresponding feature information according to a preset distribution-feature mapping relationship as the feature information of the underwater original image data;

[0014] Performing spatial domain processing on the underwater original image data by the filtering analysis unit to obtain first processed data, generating second processed data in combination with original channel data of the underwater original image data, and fusing the first processed data and the second processed data to obtain feature information; and / or,

[0015] Convert the frequency domain components of the underwater original image data by the frequency domain conversion unit, and analyze the frequency domain components to obtain feature information; and / or,

[0016] The feature extraction unit identifies structural information of the underwater original image data, and decomposes the structural information to obtain feature information.

[0017] Preferably, the method supports a multi-scale processing mode, each processing scale is configured with an independent feature analysis module, and each feature analysis module is used to process image data;

[0018] The method further comprises:

[0019] detecting whether at least two processing scales simultaneously initiate processing of the underwater raw image data;

[0020] When the detection result is negative, performing the operation of performing enhancement calculation using the Retinex algorithm processing unit;

[0021] When the detection result is yes, it is determined whether there is a target processing scale among all processing scales, where the target processing scale is a scale at which the corresponding feature analysis module can simultaneously process multiple sets of image data;

[0022] When it is determined that the target processing scale does not exist, the operation of performing enhancement calculation using the Retinex algorithm processing unit is executed.

[0023] Preferably, the method further comprises:

[0024] When it is determined that the target processing scale exists, for any of the target processing scales:

[0025] Obtaining processing parameters for each set of image data by a feature analysis module of the target processing scale, calculating feature confidence levels for each set of image data by the feature analysis module based on all elements included in the processing parameters, and selecting feature information corresponding to the highest feature confidence level from feature information of all image data as output feature information of the target processing scale;

[0026] The enhanced operation performed by the Retinex algorithm processing unit includes:

[0027] When all target processing scales determine output feature information, an enhancement operation is performed based on the output feature information of each target processing scale.

[0028] Preferably, the processing parameters of each set of image data include one or more of the following elements: a processing orientation, a processing angle, a processing distance, and a processing range with reference to a base position of the feature analysis module.

[0029] Preferably, the method further comprises:

[0030] Verify whether the processing parameters of each set of image data include a processing angle and / or a processing range;

[0031] When the verification result is negative, performing the operation of calculating the feature confidence;

[0032] When the verification result is yes, determining attribute parameters of each set of image data, wherein the attribute parameters include texture type and / or size specification;

[0033] Determine whether the attribute parameters of all image data are consistent;

[0034] When the judgments are consistent, the operation of calculating the feature confidence is triggered.

[0035] Preferably, the processing parameters of each set of image data further include a processing distance; and the method further comprises:

[0036] When the judgment is inconsistent, the image data corresponding to the minimum processing distance is associated with the remaining image data one by one to generate at least one data group;

[0037] For any of the data sets:

[0038] Calculating the difference metrics of the same type of attribute parameters item by item based on all attribute parameters of the two groups of image data in the data group, and calculating the comprehensive difference between the two groups of image data based on the difference metrics;

[0039] selecting a target data set for the adaptation parameter correction strategy from the data set based on the processing distance and attribute parameters of the two sets of image data;

[0040] The processing angle and / or processing range of the target data group is corrected based on the comprehensive difference to obtain a corrected processing parameter. After completing the correction of all data groups, the operation of calculating the feature confidence is performed.

[0041] Preferably, the Retinex algorithm processing unit includes a multi-branch fusion structure, and the multi-branch fusion structure includes a color correction branch, a contrast adjustment branch, and a detail restoration branch;

[0042] The performing of the enhancement operation based on the output feature information includes:

[0043] Analyzing color feature data through the color correction branch to generate color correction coefficients;

[0044] Analyzing the brightness feature data through the contrast adjustment branch to generate a contrast mapping coefficient;

[0045] Analyzing edge feature data through the detail recovery branch to generate detail enhancement coefficients;

[0046] The color correction coefficient, contrast mapping coefficient and detail enhancement coefficient are fused to generate enhanced image data.

[0047] Preferably, the method further comprises:

[0048] activating a priority determination module when a numerical difference between the color correction coefficient and the contrast mapping coefficient exceeds a preset threshold;

[0049] analyzing the scene identification information of the underwater original image data by the priority determination module, and determining the operation priority of the color correction branch or the contrast adjustment branch according to the scene identification information;

[0050] The fusion weights of the color correction coefficients and the contrast mapping coefficients are redistributed according to the operation priority.

[0051] Preferably, the method further comprises:

[0052] When the fluctuation range of the detail enhancement coefficient exceeds a preset fluctuation range, a stability detection module is activated;

[0053] Calculating variance data of adjacent output frames of the detail recovery branch through the stability detection module;

[0054] If the variance data is less than a preset variance threshold, the detail enhancement coefficient is maintained unchanged;

[0055] If the variance data is greater than or equal to the preset variance threshold, the detail enhancement coefficient is normalized using the contrast mapping coefficient.

[0056] Compared with the prior art, the present invention has the following beneficial effects:

[0057] The present invention integrates multiple feature analysis methods, such as a histogram analysis unit, a filter analysis unit, a frequency domain transformation unit, and a feature extraction unit, in a preprocessing module. This allows for comprehensive extraction of feature information from underwater raw image data across multiple dimensions, including brightness distribution, spatial domain information, frequency domain components, and structural information. For example, the histogram analysis unit accurately determines feature information based on brightness distribution data, the filter analysis unit generates feature information by fusing spatial domain processing with raw channel data, the frequency domain transformation unit analyzes frequency domain components to obtain features, and the feature extraction unit decomposes structural information to obtain features. This multi-dimensional feature analysis approach enables the algorithm to more comprehensively perceive the characteristics of underwater images, providing richer and more accurate input for subsequent Retinex enhancement operations, thereby improving the pertinence and effectiveness of the enhancement process.

[0058] The method supports multi-scale processing, with each processing scale configured with an independent feature analysis module, enabling specialized processing of image data at different scales. When multiple processing scales are detected to be activated simultaneously, the optimal feature information is selected by determining whether a target processing scale exists that can simultaneously process multiple sets of image data and calculating feature confidence based on the processing parameters. For example, processing parameters include processing orientation, angle, distance, and range. Feature confidence is calculated to select the most confident feature information as output, ensuring that the advantages of features at different scales are fully utilized during multi-scale processing, avoiding information redundancy and interference, achieving precise enhancement of targets of different scales in underwater images, and improving the overall quality of images at multiple scales.

[0059] During the verification and correction of processing parameters, the decision to trigger feature confidence calculation or perform parameter correction is made by determining whether the processing parameters include the processing angle and / or processing range, as well as whether the attribute parameters (texture type, size specifications, etc.) are consistent. When the attribute parameters are inconsistent, the image data with the minimum processing distance is used as a benchmark, and an association group is established with the remaining data. The comprehensive difference is calculated and the processing angle and range are corrected. This mechanism enables the algorithm to automatically adjust the processing parameters based on the actual characteristics of the image data, avoiding poor enhancement effects caused by improper parameter settings, improving the algorithm's adaptability to different underwater scenes, and enhancing the stability and reliability of the processing.

[0060] The Retinex algorithm's processing unit utilizes a multi-branch fusion architecture, encompassing branches for color correction, contrast adjustment, and detail restoration. These branches generate coefficients for color, brightness, and edge features, respectively, and then fuse them together to produce an enhanced image. This multi-branch parallel processing approach simultaneously addresses color distortion, low contrast, and blurred details in underwater images, achieving comprehensive image optimization. Furthermore, when the difference between the color correction coefficient and the contrast mapping coefficient exceeds a preset threshold, a priority determination module analyzes scene identification information and dynamically adjusts the fusion weights. When the detail enhancement coefficient fluctuates abnormally, a stability detection module performs normalization based on variance data. These mechanisms enable the algorithm to dynamically adjust computational priorities and parameters based on the output differences between branches in different scenarios, ensuring a balance between color correction, contrast enhancement, and detail restoration. This prevents image distortion caused by overprocessing in any one branch, further improving the balance and naturalness of the enhancement. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is a working principle diagram of the underwater image enhancement method based on the Retinex algorithm of the present invention;

[0062] Figure 2 This is a design diagram of the multi-scale processing mode control system;

[0063] Figure 3 Design diagram of the target processing scale feature analysis module;

[0064] Figure 4 This is the design diagram of the multi-branch fusion structure processing unit. DETAILED DESCRIPTION

[0065] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0066] See also Figure 1-Figure 4 The underwater image enhancement method based on the Retinex algorithm of the present invention is specifically implemented as follows:

[0067] Acquire the raw underwater image data to be processed. This step is accomplished using image acquisition equipment (such as underwater cameras or sonar imaging devices). The acquired image data contains the raw pixel information of the underwater scene, covering color channels such as red, green, and blue, as well as brightness distribution characteristics, providing basic data for subsequent processing.

[0068] The preprocessing module performs feature analysis on the raw underwater image data and extracts its characteristic information. The preprocessing module integrates multiple analysis units, allowing selection of single or combined analysis methods based on image characteristics. For example, the histogram analysis unit calculates brightness distribution data and determines characteristic information based on preset conditions and distribution-feature mapping relationships. Alternatively, the filtering analysis unit performs spatial domain processing, combining raw channel data to generate processed data and fuse them to obtain characteristic information. Alternatively, the frequency domain transformation unit converts frequency domain components, while the feature extraction unit identifies structural information, completing feature analysis and extraction.

[0069] Based on the extracted feature information, the Retinex algorithm processing unit performs enhancement operations on the underwater raw image data. Based on the feature information, the Retinex algorithm processing unit optimizes the image's color, contrast, detail, and other dimensions to achieve enhanced effects such as improved underwater image clarity and color restoration.

[0070] The present invention will be further described below in conjunction with Examples 1 to 5:

[0071] Example 1: The preprocessing module includes one or more of a histogram analysis unit, a filtering analysis unit, a frequency domain transformation unit, and a feature extraction unit. The specific processing process of each unit is as follows:

[0072] When calculating the brightness distribution data of the underwater raw image data using the histogram analysis unit, the system first counts the image's grayscale values ​​to generate a brightness histogram. This histogram reflects the distribution of pixels with different brightness values ​​within the image. Preset brightness distribution conditions may include a brightness mean range, brightness variance threshold, and peak brightness interval. For example, if the brightness mean falls below a preset low brightness threshold, the image is considered overall dark; if the brightness variance is less than a specific value, the image contrast is low. When the brightness distribution data meets one or a combination of these preset conditions, the system determines the corresponding feature information based on a pre-established distribution-feature mapping relationship. This mapping relationship is established by analyzing a large number of underwater image samples from different scenes. For example, a brightness distribution with a low brightness mean and low variance typically corresponds to low contrast and dark colors in underwater images. In this case, the system will mark feature information such as "low contrast and insufficient brightness" as the feature information of the current image.

[0073] When the filtering and analysis unit performs spatial domain processing on the underwater raw image data, it first applies an appropriate filtering algorithm to the image. The mean filtering algorithm smoothes the image by calculating the mean of a pixel neighborhood, effectively reducing Gaussian noise. The median filtering algorithm removes salt-and-pepper noise by taking the median of a pixel neighborhood. The resulting first processed data after filtering reduces noise interference in the image and highlights the overall image structure. Simultaneously, the system analyzes the data for each channel, combining the original channel data (i.e., the pixel values ​​of the three RGB color channels) of the underwater raw image data. For example, due to the absorption and scattering of light of different wavelengths by the underwater environment, images often exhibit a blue-green color cast. In this case, the pixel values ​​of the blue and green channels in the original channel data may be higher than those of the red channel. By performing normalization and weighting on the channel data, second processed data is generated. This data can highlight differences between color channels or balance color distribution. The first and second processed data are then fused using methods such as matrix addition and channel-by-channel concatenation. For example, by adding the filtered image data to the adjusted channel data, feature information containing both denoised structural information and color-corrected channel information can be obtained. This feature information can reflect the texture details and color distribution characteristics of the image.

[0074] When converting the frequency domain components of the underwater raw image data through the frequency domain transform unit, the system employs frequency domain transform algorithms such as Fourier transform and discrete cosine transform to convert the image from the spatial domain to the frequency domain. In the frequency domain, low-frequency components of an image primarily represent the image background and slowly changing areas, such as large expanses of water and gently sloping seafloor topography. High-frequency components primarily represent image edges, details, and noise, such as the outlines of objects and the texture of aquatic plants. By analyzing the frequency domain components, the system can separate low-frequency and high-frequency features. For example, by setting a cutoff frequency to retain low-frequency components and suppress high-frequency noise, characteristic information about the image background can be obtained; or by retaining high-frequency components to highlight edge details, characteristic information about image details can be obtained. Furthermore, by analyzing the energy distribution of frequency domain components, the presence of periodic noise or interference of specific frequencies can be determined, thereby identifying the corresponding characteristic information.

[0075] When the feature extraction unit identifies structural information in underwater raw image data, the system first processes the image using an edge detection algorithm. The Canny operator uses steps such as Gaussian filtering to smooth the image, calculate gradient magnitude and direction, perform non-maximum suppression, and perform hysteresis thresholding to accurately detect edges within the image. The Sobel operator uses horizontal and vertical gradients to identify the location and direction of edges. Using this edge detection algorithm, the system identifies edge pixels within the image and forms edge contours. Morphological operations are then used to decompose and process these edge contours. Morphological operations include dilation, erosion, opening, and closing. For example, dilation connects adjacent edge pixels to fill small gaps within the edge, while erosion removes small noise points around the edge. Through these operations, the system can decompose image structural information, such as object shape, edge direction, and region boundaries. For example, for underwater fish images, the feature extraction unit can use edge detection and morphological operations to identify structural features such as the fish's outline shape and the direction of its fin edges, and output these features as image features.

[0076] In the actual processing process, the preprocessing module can select a single analysis unit for feature analysis based on the characteristics of the underwater original image data, or it can combine multiple analysis units for collaborative processing. For example, for underwater images with high noise and color cast, denoising can be performed first through the filtering analysis unit, and then the brightness distribution can be analyzed through the histogram analysis unit. At the same time, the feature extraction unit can be used to identify the edge structure. Finally, the feature information obtained by each unit is fused to fully extract the feature information of the image, providing richer and more accurate input data for the subsequent Retinex algorithm enhancement operation. Through this multi-unit collaborative processing method, it is possible to more effectively deal with the complex degradation problems of underwater images, improve the accuracy and comprehensiveness of feature analysis, and thus lay the foundation for improving the image enhancement effect.

[0077] Example 2: Based on the overall implementation scheme, this example supports a multi-scale processing mode. Each processing scale is configured with an independent feature analysis module, and each module can process image data of different dimensions. The specific implementation method is as follows:

[0078] The system first detects the activation status of the processing scale to determine whether at least two processing scales are simultaneously activated to process the underwater raw image data. The division of processing scales is set according to the image analysis requirements. For example, it can be divided into high-resolution scale, medium-resolution scale, and low-resolution scale according to the image resolution, corresponding to detail enhancement, medium-region analysis, and overall scene recognition, respectively. It can also be divided into local scale, sub-region scale, and global scale according to the size of the analysis area. The local scale targets specific points of interest in the image (such as the key parts of underwater objects), the sub-region scale targets pre-divided image blocks (such as dividing the image into four sub-regions: upper left, upper right, lower left, and lower right), and the global scale targets the entire image range. The feature analysis module configured for each processing scale operates independently, with specific parameter settings and processing logic. For example, the local scale feature analysis module can use a small-sized convolution kernel to extract detailed features, while the global scale module can use a large-sized filter to analyze the overall brightness distribution.

[0079] When the detection result shows that there are no at least two processing scales activated at the same time, that is, only a single processing scale is active, the system directly executes the operation of using the Retinex algorithm processing unit to perform the enhancement operation. At this time, the feature analysis module only outputs feature information at a single scale, and the Retinex algorithm processing unit performs targeted enhancement on the image based on this feature information. For example, if only global scale processing is activated, the feature analysis module extracts features such as uneven brightness and color cast of the entire image, and the Retinex algorithm processing unit achieves overall image quality improvement through global illumination estimation and color correction.

[0080] When the detection result shows that there are at least two processing scales started at the same time, the system enters the judgment process of the target processing scale. The target processing scale is defined as the scale at which the corresponding feature analysis module can process multiple groups of image data at the same time. The division methods of multiple groups of image data include but are not limited to: division based on spatial position (such as dividing the image into multiple strips by rows or columns, and each group of data corresponds to a strip), division based on feature regions (such as extracting multiple regions of interest through a saliency detection algorithm, and each group of data corresponds to a region of interest), and division based on time series (such as when processing continuous video frames, each group of data corresponds to a frame image at a different moment). For example, the feature analysis module of a certain processing scale supports parallel processing of image data of four sub-regions, and each sub-region corresponds to a set of independent pixel data. This scale belongs to the target processing scale.

[0081] When determining whether there is a target processing scale among all processing scales, the system checks the processing capabilities of the feature analysis modules at each scale one by one. If the feature analysis modules at all processing scales can only process a single set of image data (e.g., each scale can only analyze the entire image or a single sub-region), it is determined that there is no target processing scale. At this time, the system still performs a single Retinex algorithm enhancement operation. The feature analysis modules at each scale output a single set of feature information sequentially or in parallel. The Retinex algorithm processing unit integrates the features of all scales for global optimization. For example, the medium-resolution scale and the low-resolution scale are started at the same time. The feature analysis modules of the two scales process the medium-resolution and low-resolution versions of the entire image respectively. The output feature information reflects the medium details and overall structure of the image respectively. The Retinex algorithm processing unit adjusts the contrast and color balance based on these two types of features.

[0082] If at least one processing scale's feature analysis module can simultaneously process multiple sets of image data, the target processing scale is determined to exist. The system then performs subsequent feature information screening and enhancement operations for each target processing scale. For example, assuming a high-resolution scale is the target processing scale, its feature analysis module can simultaneously process data from three regions of interest (ROIs) in the image. Each ROI corresponds to a set of pixel data containing local details. The system then performs feature analysis and confidence calculations on each of these three sets of data to determine the feature information ultimately used for enhancement.

[0083] When processing multiple sets of image data, the feature analysis module of the target processing scale needs to assign independent processing parameters to each set of data. These parameters include spatial positioning parameters such as processing orientation, processing angle, and processing distance, as well as operational parameters such as processing range and filter kernel size. For example, for regions of interest at different locations in the image, the processing orientation can be set to a coordinate offset relative to the upper left corner of the image, the processing angle can be adjusted according to the main direction of the objects in the region (such as 0° for horizontal objects and 45° for diagonal objects), the processing distance can be defined as the pixel distance from the reference point of the feature analysis module (such as the center of the module) to the center of the region of interest, and the processing range can be set to the size of the rectangular box containing the region of interest. The settings of these parameters directly affect the accuracy of the feature analysis. For example, when the processing angle is consistent with the main direction of the object, the edge detection algorithm can more effectively extract contour features.

[0084] The system achieves flexible control of multi-scale processing modes by detecting the startup status of the processing scale and the existence of the target processing scale. When processing at a single scale, the system completes image enhancement in an efficient manner; when processing at multiple scales in a collaborative manner, the system fully utilizes feature information at different scales and regions by identifying the target processing scale and processing multiple sets of data, providing the Retinex algorithm with richer input dimensions, thereby achieving more accurate image enhancement effects at the global and local levels. This multi-scale processing mechanism can adapt to the complex scene changes of underwater images. For example, in underwater images that contain both distant backgrounds and close-up objects, the global scale analyzes the background illumination distribution, while the local scale extracts the object details. The combination of the two can effectively improve the overall clarity and color reproduction of the image, avoiding the problem of detail loss or global distortion that may be caused by single-scale processing.

[0085] In specific implementations, the configuration and switching of processing scales can be achieved through software parameter settings or hardware module scheduling. For example, independent computing units are allocated for different scales in the image processing chip, and the startup and data interaction of each unit are coordinated through the bus control unit; at the software level, multi-threading technology is used to achieve parallel operation of feature analysis modules at different scales to improve processing efficiency. The detection and judgment process is implemented through conditional statements and status registers to ensure the logical correctness of the system in different processing modes. The entire multi-scale processing process is closely centered around the needs of image feature analysis. Through hierarchical and regional processing strategies, the adaptability and robustness of the underwater image enhancement method are improved, providing a solid feature foundation for the subsequent multi-dimensional optimization of the Retinex algorithm.

[0086] Example 3: Based on Example 2, when it is determined that a target processing scale exists, a feature information screening and processing process needs to be performed for any target processing scale. The specific implementation method is as follows:

[0087] Obtain the processing parameters of the feature analysis module for each set of image data at the target processing scale. The processing parameters are referenced to the feature analysis module's reference position and include one or more elements: processing orientation, processing angle, processing distance, and processing range. The reference position can be set to the fixed coordinate origin of the feature analysis module (e.g., the upper left vertex or geometric center of the module's processing area). The processing orientation is used to identify the relative position of each set of image data in the reference coordinate system (e.g., with the reference position as the origin, the processing orientation can be expressed as "the area 100 to 200 pixels to the right of the reference position" or "30° below and to the left of the reference position"). The processing angle is the rotation angle of the feature analysis operation relative to the reference direction (e.g., horizontal to the right is 0°). For example, in edge detection, the processing angle is set to 45° to detect diagonal edges. The processing distance is the Euclidean distance (in pixels) from the reference position to the center of each set of image data, used to measure the spatial relationship between the data set and the module's core processing area. The processing range defines the spatial coverage of each set of image data (e.g., the width and height of the rectangular area in pixels). For example, a certain target processing scale divides the underwater image into four sub-areas, and each set of image data corresponds to one sub-area. Its processing parameters can be expressed as follows: the processing orientation of sub-area A is to the right of the reference position, the processing angle is 0°, the processing distance is 150 pixels, and the processing range is 200×200 pixels.

[0088] The feature analysis module calculates the feature confidence of each set of image data based on all the elements included in the processing parameters. Feature confidence is a quantitative indicator that measures the degree of match between processing parameters and image data features. Its calculation logic is based on a preset confidence model. For example, if the processing direction coincides with the distribution area of ​​the main objects in the image (such as the processing direction covers the main area of ​​underwater organisms), the confidence weight corresponding to this element is higher; if the processing angle is consistent with the main direction of the object edge (such as the processing angle is set to 30° parallel to the axis of the fish body), the accuracy of edge feature extraction can be improved, and the confidence contribution value of this element can be increased accordingly; when the processing distance is small (such as less than 100 pixels), it usually means that the image data contains finer details, and its confidence weight is higher than that of long-distance data; when the processing range completely covers the target object (such as including the entire body of the fish rather than just a part), it can be regarded as a more effective feature analysis range, thereby improving the confidence score. The weight distribution of each factor is determined by prior knowledge or training data. For example, in the processing of underwater coral images, the weight of the processing range factor can be set to 0.4, the processing angle factor to 0.3, and the processing direction and distance factors to 0.15 each. The feature confidence value of each set of data is obtained by weighted summation.

[0089] The feature information corresponding to the highest feature confidence level is selected from the feature information of all image data and used as the output feature information for the target processing scale. The screening mechanism ensures that when multiple sets of data are processed in parallel, the feature information with the highest matching degree with the processing parameters is preferentially used to avoid feature noise caused by parameter setting deviations. For example, if a target processing scale contains three sets of image data with feature confidence levels of 0.85, 0.72, and 0.91, respectively, the feature information corresponding to the confidence level of 0.91 is selected as the output of the scale. This feature information can generally more accurately reflect the image characteristics of the corresponding area (such as clear edge structure or balanced color distribution).

[0090] When using the Retinex algorithm processing unit for enhancement operations, it is necessary to wait until all target processing scales have determined the output feature information, and then perform the enhancement operation based on the output feature information of each target processing scale. This mechanism ensures the synchronization and integrity of multi-scale features, avoiding feature loss or timing disorder caused by incomplete processing of some scales. For example, assuming there are two target processing scales, scale 1 processes the global brightness features of the image (outputs brightness distribution information with a confidence level of 0.9), and scale 2 processes the color features of the local area (outputs color cast information with a confidence level of 0.88). The system needs to wait until both output feature information before fusing the brightness distribution with the color cast information to drive the Retinex algorithm for global illumination estimation and color correction.

[0091] The diverse design of processing parameters enables it to adapt to different underwater image scenarios. For example, when processing underwater images containing multiple objects in different orientations, by setting different processing angles for each data set (such as 0°, 90°, 45°, and 135°), edge features in all directions can be comprehensively detected. When processing images containing both long-distance and close-up objects, by setting different processing distances (such as 30 pixels for close-up and 200 pixels for long-distance), targeted analysis of details and background can be performed separately. The calculation of feature confidence provides a quantitative assessment method for the feature validity of multiple data sets, avoiding feature conflicts or redundancies caused by blindly fusing multiple data sets. For example, when the processing parameters of two data sets are obviously inconsistent (such as one set is processed at a 0° angle to detect horizontal edges, while the other set is processed at a 90° angle to detect vertical edges, but the image is actually dominated by horizontal edges), the feature confidence can accurately identify the former as more valid, thereby screening out more reliable feature information.

[0092] In the specific implementation, the acquisition and storage of processing parameters are realized through data structures. Each data group corresponds to a structure variable containing fields such as direction, angle, distance, and range, which is convenient for program calls and calculations. The calculation of feature confidence can be implemented through a custom function. The function performs numerical conversion and weighted operations on the input processing parameters according to the preset weight matrix and feature matching rules. The screening of feature information adopts a traversal comparison algorithm, compares the confidence values ​​group by group, and records the feature information pointer corresponding to the maximum value. The synchronous control of multi-target processing scales is achieved through a semaphore or event-driven mechanism to ensure that the feature output of all scales is completed before triggering the calculation process of the Retinex algorithm processing unit.

[0093] This multi-data processing mechanism, based on processing parameters and feature confidence, enables the target processing scale to efficiently extract the most representative feature information from multiple sets of parallel processed image data. This mechanism fully leverages the spatial diversity of the multi-set data while ensuring the reliability of the feature information through a confidence screening mechanism. Combined with the multi-dimensional enhancement capabilities of the Retinex algorithm, this mechanism simultaneously achieves global illumination uniformity, local detail sharpening, and color distortion correction during underwater image enhancement, thereby improving the overall visual quality of the image and the accuracy of subsequent analyses (such as target detection and image segmentation). By flexibly configuring processing parameters and confidence models, this method can adapt to the needs of underwater image feature analysis under diverse imaging conditions, such as low-contrast images in turbid water, overexposed images under strong illumination, or color-distorted images under complex illumination. By adjusting parameters and confidence calculation rules, accurate feature extraction and optimized enhancement operations can be achieved.

[0094] Example 4: Based on Example 3, when the processing parameters of each set of image data include a processing angle and / or a processing range, the integrity and consistency of the parameters need to be verified and processed. The specific implementation method is as follows:

[0095] The system verifies the processing parameters of each set of image data to determine whether it includes a processing angle and / or a processing range. The processing angle is used to define the direction of the feature analysis operation (such as the gradient direction of edge detection, the rotation angle of the filter kernel, etc.), and the processing range limits the area of ​​action of the feature analysis (such as a rectangular window, a circular area, etc.). If the verification result is that the processing parameters do not include a processing angle and a processing range (that is, they only include other parameters such as the processing orientation and processing distance), the operation of calculating the feature confidence is directly executed without the need for additional parameter correction or attribute analysis. For example, when the processing parameters of a set of image data only include a circular processing range with a radius of 50 pixels centered on the reference position (indirectly defined by the processing distance and orientation), and the processing angle is not explicitly set, the system defaults to a 0° processing angle or automatically assigns an angle based on the main direction of the image, and directly enters the feature confidence calculation process.

[0096] If the verification result indicates that the processing parameters include processing angle and / or processing range, further attribute parameters for each set of image data must be determined. Attribute parameters include texture type and size. Texture type reflects the grayscale variation pattern of a localized image region and can be extracted using algorithms such as gray-level co-occurrence matrices and local binary patterns (LBP). For example, it can be categorized as "smooth" (e.g., large water bodies), "rough" (e.g., rock surfaces), or "mixed" (e.g., the interface between coral and water). Size describes the size of objects or regions in the image and can be determined by calculating the area of ​​connected regions or bounding box dimensions. For example, it can be categorized as "small" (less than 100×100 pixels), "medium" (100×100 pixels to 500×500 pixels), and "large" (greater than 500×500 pixels). For example, a set of image data corresponding to an underwater rock region can be identified as "rough" through texture analysis and "medium" through bounding box measurement.

[0097] The system determines whether the attribute parameters of all image data are consistent. The consistency judgment includes dual matching of texture type and size specification: if the texture type of all data is the same and the size specification belongs to the same level (such as all are "medium size"), the attribute parameters are determined to be consistent; if there are different texture types (such as some are "smooth" and some are "rough") or the size specifications cross levels (such as including "small size" and "large size"), the attribute parameters are determined to be inconsistent. For example, when the target processing scale contains three sets of image data, two of which have a texture type of "smooth" and a size specification of "large size", and the other has a texture type of "rough" and a size specification of "medium size", the attribute parameters are determined to be inconsistent.

[0098] When the attribute parameters are consistent, the operation of calculating the feature confidence is triggered, and no parameter correction is required. At this time, multiple groups of image data have similar texture features and size scales. The settings of the processing angle and processing range can be optimized based on unified rules. The calculation results of the feature confidence can effectively reflect the degree of matching between the parameters and image features. For example, all three groups of water area data have "smooth" texture and "large size" specifications. The processing angle can be uniformly set to 0° to detect horizontal lighting changes. The processing range covers a large area. The system uses confidence calculation to select a group of data with the most stable lighting distribution characteristics as output.

[0099] When the attribute parameters are inconsistent, the system will establish association groups for the image data corresponding to the minimum processing distance and the remaining image data one by one to generate at least one data group. The image data corresponding to the minimum processing distance is usually located in the area closest to the reference position and may contain clearer details or more critical targets (such as underwater creatures photographed at close range). It is used as a reference group to be paired with other data groups to facilitate parameter adjustment based on high-priority areas. For example, if the processing distances of four groups of data are 50 pixels, 100 pixels, 150 pixels, and 200 pixels, respectively, the group with a minimum processing distance of 50 pixels is used as the reference group, and association groups are established with the other three groups (reference group-100 pixel group, reference group-150 pixel group, reference group-200 pixel group).

[0100] For any data set, the system calculates the difference measure of the same type of attribute parameters item by item based on all the attribute parameters of the two sets of image data in the group. For texture type, the cosine similarity of the feature vector is used to calculate the difference (for example, when the texture feature is converted into a multidimensional vector, the closer the cosine value is to 1, the smaller the difference); for size specifications, the absolute difference or relative difference of the size values ​​is calculated (for example, absolute difference = |A size - B size|, For example, the difference measure between the benchmark group (texture type "rough", size specification 200×200 pixels) and a data group (texture type "smooth", size specification 500×500 pixels) is: the texture type difference calculated by cosine similarity is 0.3 (large difference), and the relative size difference is (500-200) / 500=0.6 (large difference). The two items are combined to obtain the attribute difference characteristics of the data group.

[0101] Based on various difference metrics, the system calculates the comprehensive difference between the two sets of image data through methods such as weighted averaging and principal component analysis. The weighting can be adjusted based on the application scenario. For example, in a detail enhancement scenario, the weight for texture type difference can be set to 0.6, and the weight for size difference to 0.4; in a global illumination correction scenario, both weights can be set to 0.5. The value range of the comprehensive difference is typically standardized to [0, 1], with larger values ​​indicating more significant differences in the attributes of the two sets of data.

[0102] Based on the processing distance and attribute parameters of the two sets of image data, the system selects a target data set from the data set that is adapted to the parameter correction strategy. The parameter correction strategy predefines adjustment rules for different processing distances and attribute differences. For example, when the processing distance is close (such as less than 100 pixels) and the comprehensive difference is greater than 0.7, the non-reference group in the target data set is determined to require parameter correction based on the reference group; when the processing distance is far (such as greater than 200 pixels) and the difference is less than 0.3, the two sets of data are determined to belong to different feature areas, and no parameter correction is required, and they are directly processed according to the original parameters. The selection of the target data set usually follows the principle of "prioritizing correction for close distances and high differences" to ensure the accuracy of parameters in key areas.

[0103] The processing angle and / or processing range of the target data set is modified based on the comprehensive difference. Correction methods include linear adjustment, scaling, and table lookup mapping. For example, if the comprehensive difference is 0.8 (high difference), and the processing angle of the non-reference group of the target data set differs by 45° from that of the reference group, but the texture type of the reference group is "rough" (requiring multi-angle edge detection), the processing angle of the non-reference group is adjusted to be consistent with the reference group or the angle sampling points are increased (e.g., from a single angle of 0° to 0°, 45°, 90°, and 135°). If the processing range differs significantly (e.g., the reference group covers local details, while the non-reference group covers the global background), the range of the non-reference group is scaled according to the processing range of the reference group to ensure scale consistency of feature analysis. After the correction is completed, the system substitutes the new processing parameters (i.e., the corrected processing parameters) into the feature confidence calculation process to re-evaluate the matching degree between the parameters and the image features.

[0104] The entire processing flow solves the parameter adaptation problem caused by feature differences in multiple sets of image data by verifying the integrity of processing parameters, judging the consistency of attribute parameters, and making differentiated corrections. For example, in underwater images that contain both close-range rough-textured objects and long-range smooth-textured backgrounds, the processing angle of the long-range group can be adjusted from the default 0° to any angle that adapts to the smooth characteristics of the background (such as removing the angle limit and using omnidirectional averaging processing) through the correlation correction between the minimum processing distance group and other groups. The processing range is expanded to cover the entire world based on the background size, thereby ensuring that image data with different attributes can obtain reasonable feature analysis parameters and avoiding feature extraction bias caused by "one-size-fits-all" parameters. This mechanism enhances the adaptability of the target processing scale to complex scenes, ensures that the feature information of multiple sets of data is optimized and adjusted before confidence screening, and provides more balanced and accurate input features for the Retinex algorithm, thereby improving the overall effect of underwater image enhancement.

[0105] Example 5: Based on Example 4, the Retinex algorithm processing unit includes a multi-branch fusion structure, which consists of a color correction branch, a contrast adjustment branch, and a detail restoration branch. The specific implementation method of each branch performing an enhancement operation based on the output feature information is as follows:

[0106] The color correction branch analyzes the color feature data in the output feature information, which includes the mean, variance and color distribution ratio of each color channel (such as R, G, B channels). To address the common blue-green color cast problem of underwater images, the color correction branch generates a color correction coefficient C through nonlinear transformation. corr , which is used to adjust the gain of each color channel to restore the true color. For example, if the output feature information shows that the mean value of the blue channel is significantly higher than that of the red channel, then C corr Attenuate the blue channel and enhance the red channel.

[0107] The brightness feature data in the feature information is analyzed and output by the contrast adjustment branch, and the brightness feature data includes the brightness mean μ L , Brightness range [L min ,L max ] and histogram distribution. The contrast adjustment branch generates the contrast mapping coefficient M based on the brightness feature data. cont , which adjusts the brightness distribution of the image by linear stretching or nonlinear transformation (such as logarithmic transformation, gamma transformation) to enhance the contrast. For example, when the brightness range is narrow, M cont Expand the brightness range to make the image's light and dark levels clearer.

[0108] The edge feature data in the output feature information is parsed by the detail recovery branch, and the edge feature data includes edge strength E, edge direction θ and edge position coordinates (x, y). The detail recovery branch generates a detail enhancement coefficient S through high-pass filtering or edge enhancement algorithm. detail , this coefficient is used to enhance the edges and details of the image. For example, for pixels whose edge strength E is greater than the threshold, S detail Increase the weight of its grayscale value to make the edge sharper.

[0109] Fusion of the color correction coefficient C corr , contrast mapping coefficient M cont and detail enhancement coefficient S detail When the weighted fusion strategy is adopted, the enhanced image data I is generated. enhanced The fusion formula is:

[0110] I enhanced =α·C corr I raw +β·M cont I raw+γ·S detail I raw

[0111] Among them, I raw The input raw image data, α, β, and γ are fusion weight coefficients, satisfying α + β + γ = 1. The weight coefficients are dynamically adjusted based on the image characteristics. For example, in scenes with severe color distortion, the value of α is increased; in scenes with low contrast, the value of β is increased; and in scenes where details need to be highlighted, the value of γ is increased.

[0112] When the color correction coefficient C corr and contrast mapping coefficient M cont When the numerical difference exceeds the preset threshold T1, the priority determination module is activated. This module analyzes the scene identification information of the underwater raw image data (such as shallow sea, deep sea, illuminated, unilluminated, etc.) and determines the operation priority of the color correction branch or contrast adjustment branch based on the scene identification information. For example, in deep-sea scenes, the color cast problem is more prominent, and the color correction branch is executed first. In this case, α is set to 0.6, β is set to 0.3, and γ is set to 0.1. In low-contrast scenes caused by low light, the contrast adjustment branch is executed first, and β is set to 0.5, α is set to 0.3, and γ is set to 0.2. After redistributing the fusion weights according to the operation priority, the above fusion formula is executed to calculate the enhanced image.

[0113] When the detail enhancement coefficient S detail The fluctuation range exceeds the preset fluctuation range [S min ,S max ], the stability detection module is started. This module calculates the variance data σ of adjacent output frames of the detail recovery branch 2 , the variance data reflects the degree of change in detail enhancement effect between adjacent frames. If the variance data σ 2 If the variance is less than the preset threshold T2, it means that the detail enhancement effect is stable and the S detail unchanged; if the variance data σ 2 If the value is greater than or equal to the preset variance threshold T2, the contrast mapping coefficient M is used. cont Detail enhancement coefficient S detail Perform normalization processing, the normalization formula is:

[0114]

[0115] Among them, S′ detail is the normalized detail enhancement coefficient, max(M cont ) is the maximum value of the contrast mapping coefficient. Through normalization, S detail The fluctuation range of the contrast is consistent with the contrast adjustment range, thus stabilizing the detail enhancement effect.

[0116] This implementation achieves multi-dimensional enhancement of underwater image color, contrast, and detail through a multi-branch fusion architecture. Dynamic weight allocation and stability detection mechanisms address priority conflicts and detail fluctuations among different enhancement requirements. The processing logic of each branch is closely centered around output feature information, ensuring targeted and effective enhancement operations, ultimately producing visually superior underwater images.

[0117] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0118] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. An underwater image enhancement method based on the Retinex algorithm, characterized in that: The method comprises: Acquiring underwater raw image data to be processed; Performing feature analysis on the underwater original image data through a preprocessing module to extract feature information of the underwater original image data; Based on the extracted feature information, a Retinex algorithm processing unit is used to perform an enhancement operation on the underwater original image data.

2. The underwater image enhancement method based on the Retinex algorithm according to claim 1, characterized in that: The preprocessing module includes one or more of a histogram analysis unit, a filtering analysis unit, a frequency domain transformation unit, and a feature extraction unit; The performing feature analysis on the underwater original image data by a pre-processing module includes: Calculating brightness distribution data of the underwater original image data by the histogram analysis unit, and when the brightness distribution data meets a preset condition, determining corresponding feature information according to a preset distribution-feature mapping relationship as the feature information of the underwater original image data; Performing spatial domain processing on the underwater original image data by the filtering analysis unit to obtain first processed data, generating second processed data in combination with original channel data of the underwater original image data, and fusing the first processed data and the second processed data to obtain feature information; and / or, Convert the frequency domain components of the underwater original image data by the frequency domain conversion unit, and analyze the frequency domain components to obtain feature information; and / or, The feature extraction unit identifies structural information of the underwater original image data, and decomposes the structural information to obtain feature information.

3. The underwater image enhancement method based on the Retinex algorithm according to claim 1 or 2, characterized in that: The method supports a multi-scale processing mode, each processing scale is configured with an independent feature analysis module, and each feature analysis module is used to process image data; The method further comprises: detecting whether at least two processing scales simultaneously initiate processing of the underwater raw image data; When the detection result is negative, performing the operation of performing enhancement calculation using the Retinex algorithm processing unit; When the detection result is yes, it is determined whether there is a target processing scale among all processing scales, where the target processing scale is a scale at which the corresponding feature analysis module can simultaneously process multiple sets of image data; When it is determined that the target processing scale does not exist, the operation of performing enhancement calculation using the Retinex algorithm processing unit is executed.

4. The underwater image enhancement method based on the Retinex algorithm according to claim 3, characterized in that: The method further comprises: When it is determined that the target processing scale exists, for any of the target processing scales: Obtaining processing parameters for each set of image data by a feature analysis module of the target processing scale, calculating feature confidence levels for each set of image data by the feature analysis module based on all elements included in the processing parameters, and selecting feature information corresponding to the highest feature confidence level from feature information of all image data as output feature information of the target processing scale; The enhanced operation performed by the Retinex algorithm processing unit includes: When all target processing scales determine output feature information, an enhancement operation is performed based on the output feature information of each target processing scale.

5. The underwater image enhancement method based on the Retinex algorithm according to claim 4, characterized in that: The processing parameters of each set of image data include one or more of the following elements: a processing orientation, a processing angle, a processing distance, and a processing range with reference to a base position of the feature analysis module.

6. The underwater image enhancement method based on the Retinex algorithm according to claim 4 or 5, characterized in that: The method further comprises: Verify whether the processing parameters of each set of image data include a processing angle and / or a processing range; When the verification result is negative, performing the operation of calculating the feature confidence; When the verification result is yes, determining attribute parameters of each set of image data, wherein the attribute parameters include texture type and / or size specification; Determine whether the attribute parameters of all image data are consistent; When the judgments are consistent, the operation of calculating the feature confidence is triggered.

7. The underwater image enhancement method based on the Retinex algorithm according to claim 6, characterized in that: The processing parameters of each set of image data further include a processing distance; the method further includes: When the judgment is inconsistent, the image data corresponding to the minimum processing distance is associated with the remaining image data one by one to generate at least one data group; For any of the data sets: Calculating the difference metrics of the same type of attribute parameters item by item based on all attribute parameters of the two groups of image data in the data group, and calculating the comprehensive difference between the two groups of image data based on the difference metrics; selecting a target data set for the adaptation parameter correction strategy from the data set based on the processing distance and attribute parameters of the two sets of image data; The processing angle and / or processing range of the target data group is corrected based on the comprehensive difference to obtain a corrected processing parameter. After completing the correction of all data groups, the operation of calculating the feature confidence is performed.

8. The underwater image enhancement method based on the Retinex algorithm according to claim 7, characterized in that: The Retinex algorithm processing unit includes a multi-branch fusion structure, which includes a color correction branch, a contrast adjustment branch, and a detail restoration branch; The performing of the enhancement operation based on the output feature information includes: Analyzing color feature data through the color correction branch to generate color correction coefficients; Analyzing the brightness feature data through the contrast adjustment branch to generate a contrast mapping coefficient; Analyzing edge feature data through the detail recovery branch to generate detail enhancement coefficients; The color correction coefficient, contrast mapping coefficient and detail enhancement coefficient are fused to generate enhanced image data.

9. The underwater image enhancement method based on the Retinex algorithm according to claim 8, characterized in that: The method further comprises: activating a priority determination module when a numerical difference between the color correction coefficient and the contrast mapping coefficient exceeds a preset threshold; analyzing the scene identification information of the underwater original image data by the priority determination module, and determining the operation priority of the color correction branch or the contrast adjustment branch according to the scene identification information; The fusion weights of the color correction coefficients and the contrast mapping coefficients are redistributed according to the operation priority.

10. The underwater image enhancement method based on the Retinex algorithm according to claim 9, characterized in that: The method further comprises: When the fluctuation range of the detail enhancement coefficient exceeds a preset fluctuation range, a stability detection module is activated; Calculating variance data of adjacent output frames of the detail recovery branch through the stability detection module; If the variance data is less than a preset variance threshold, the detail enhancement coefficient is maintained unchanged; If the variance data is greater than or equal to the preset variance threshold, the detail enhancement coefficient is normalized using the contrast mapping coefficient.

Citation Information

Patent Citations

  • Retinex image enhancement method based on Laplacian pyramid

    CN110175964A

  • Low-illumination underwater image enhancement method based on multi-scale detail enhancement

    CN112561804A

  • Nuclear power station underwater image enhancement method based on pixel multi-scale fusion

    CN118261810A

  • Variable attention low-illumination underwater image enhancement method based on Retinex

    CN119359603A

  • Image processing method for heterogeneous imager array of underwater robot

    CN120107138A

Cited By

  • Tailing dry discharge dynamic control method based on visual detection

    CN122321498A

  • An underwater image enhancement method based on a multi-scale cross-domain fusion network

    CN122510115A