Underwater Image Enhancement Method Based on Retinex Algorithm

By employing a Retinex-based underwater image enhancement method, which utilizes multi-dimensional feature analysis and multi-scale processing, the problems of adaptability and multi-scale processing in the traditional Retinex algorithm for underwater image enhancement are solved, achieving high-quality enhancement results for underwater images.

CN120707394BActive Publication Date: 2026-01-30福州海洋研究院
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional Retinex algorithms struggle to adapt to different underwater environments in underwater image enhancement, fail to fully optimize color correction, contrast enhancement, and detail restoration, and lack multi-scale processing mechanisms, resulting in poor enhancement effects.

Method used

An underwater image enhancement method based on the Retinex algorithm is adopted. The preprocessing module performs multi-dimensional feature analysis, supports multi-scale processing, and dynamically adjusts parameters and fusion strategies, including histogram analysis, filtering analysis, frequency domain transformation and feature extraction. It also combines a multi-branch fusion structure for color correction, contrast adjustment and detail restoration.

Benefits of technology

It achieves comprehensive enhancement of underwater images, improves image quality, adapts to different underwater scenarios, and enhances the targeting, stability, and balance of enhancement processing, ensuring accurate enhancement of targets at different scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707394B_ABST
    Figure CN120707394B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing technology and discloses an underwater image enhancement method based on the Retinex algorithm. This method first acquires the original underwater image and then extracts multi-dimensional feature information through a preprocessing module (including histogram analysis, filtering analysis, etc.). It supports multi-scale processing, detecting the target processing scale when processing at multiple scales simultaneously, and calculating feature confidence to select the optimal features. The Retinex algorithm processing unit adopts a multi-branch fusion structure (color correction, contrast adjustment, and detail restoration branches), generating coefficients and fusing them to achieve enhancement. It can also dynamically adjust weights and parameters based on coefficient differences. The method comprehensively extracts features, adaptively processes at multiple scales, balances enhancement effects, improves 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] This invention relates to the field of image processing technology, specifically to an underwater image enhancement method based on the Retinex algorithm. Background Technology

[0002] Underwater imaging environments are complex, with water significantly absorbing and scattering light, resulting in common problems such as low contrast, color distortion, and blurred details in underwater images. These issues 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 fail to achieve ideal results in underwater environments, primarily because the degradation mechanisms of underwater images differ significantly from those of terrestrial images. For example, water absorbs different wavelengths of light to varying degrees, leading to color imbalances in the image; and the scattering effect of suspended particles reduces image contrast and sharpness.

[0003] The Retinex algorithm, a classic image enhancement algorithm, is based on the idea of ​​decomposing an image into reflected light and ambient light components, and enhancing image details and contrast by removing the influence of the ambient light component. However, when traditional Retinex algorithms are directly applied to underwater images, they have some limitations. On the one hand, underwater images have complex and varied features, with significant differences in lighting conditions, water turbidity, and other factors in different scenes, making it difficult for traditional algorithms to adaptively adjust parameters to adapt to different underwater environments. On the other hand, underwater images often require addressing multiple issues simultaneously, such as color correction, contrast enhancement, and detail restoration, and a single Retinex algorithm cannot comprehensively optimize all these aspects.

[0004] While some progress has been made in underwater image enhancement research, the following shortcomings remain: Existing methods typically employ only single feature analysis techniques (such as histogram analysis or simple filtering) when processing underwater images, failing to fully extract multi-dimensional features (such as brightness distribution, spatial domain information, frequency domain components, and structural information), resulting in inaccurate subsequent enhancement processing. Targets at different scales in underwater images (such as small objects in the foreground and large structures in the background) 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, the parameter settings of existing methods often rely on human experience and cannot be automatically adjusted according to real-time image features, leading to poor algorithm robustness. When underwater images require simultaneous color correction, contrast adjustment, and detail restoration, traditional fusion strategies typically use fixed weight allocations, failing to dynamically adjust priorities based on differences in branch outputs across different scenes, thus affecting the balance of enhancement effects.

[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 this invention is to provide an underwater image enhancement method based on the Retinex algorithm to solve the problems mentioned in the background art.

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

[0008] Acquire the raw underwater image data to be processed;

[0009] The underwater raw image data is analyzed by a preprocessing module to extract feature information from the underwater raw image data.

[0010] Based on the extracted feature information, the Retinex algorithm processing unit is used to perform enhancement operations on the raw underwater image data.

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

[0012] The feature analysis of the raw underwater image data by the preprocessing module includes:

[0013] The brightness distribution data of the underwater raw image data is calculated by the histogram analysis unit. When the brightness distribution data meets the preset conditions, the corresponding feature information is determined according to the preset distribution-feature mapping relationship and used as the feature information of the underwater raw image data.

[0014] The underwater raw image data is spatially processed by the filtering and analysis unit to obtain first processed data, and second processed data is generated by combining the original channel data of the underwater raw image data. Feature information is obtained by fusing the first processed data and the second processed data; and / or,

[0015] The frequency domain transformation unit converts the frequency domain components of the original underwater image data, and the frequency domain components are analyzed to obtain feature information; and / or...

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

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

[0018] The method further includes:

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

[0020] If the detection result is negative, the operation of performing enhanced calculations using the Retinex algorithm processing unit is executed.

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

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

[0023] Preferably, the method further includes:

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

[0025] The processing parameters of the feature analysis module for each group of image data at the target processing scale are obtained. The feature confidence of the feature analysis module for each group of image data is calculated based on all the elements contained in the processing parameters. The feature information corresponding to the highest feature confidence is selected from the feature information of all image data and used as the output feature information of the target processing scale.

[0026] The enhanced computation using the Retinex algorithm processing unit includes:

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

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

[0029] Preferably, the method further includes:

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

[0031] If the verification result is negative, perform the operation of calculating the feature confidence.

[0032] When the verification result is yes, determine the attribute parameters for each group of image data, including texture type and / or size specifications;

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

[0034] When the judgment is consistent, the operation of calculating the confidence of the features is triggered.

[0035] Preferably, the processing parameters for each set of image data further include processing distance; the method further includes:

[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 groups mentioned:

[0038] Based on all attribute parameters of the two sets of image data in the data set, calculate the difference measure of the same type of attribute parameters item by item, and calculate the comprehensive difference degree of the two sets of image data based on the difference measure.

[0039] Based on the processing distance and attribute parameters of the two sets of image data, a target data set that matches the parameter correction strategy is selected from the data set.

[0040] Based on the comprehensive difference, the processing angle and / or processing range of the target data group are corrected to obtain the corrected processing parameters. After the correction of all data groups is completed, the operation of calculating the feature confidence is performed.

[0041] Preferably, 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.

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

[0043] The color correction branch is used to parse color feature data and generate color correction coefficients;

[0044] The contrast adjustment branch is used to analyze the brightness feature data and generate contrast mapping coefficients.

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

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

[0047] Preferably, the method further includes:

[0048] When the difference between the color correction coefficient and the contrast mapping coefficient exceeds a preset threshold, the priority determination module is activated.

[0049] The priority determination module analyzes the scene identification information of the underwater raw image data and determines the operation priority of the color correction branch or the contrast adjustment branch based on the scene identification information.

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

[0051] Preferably, the method further includes:

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

[0053] The stability detection module calculates the variance data of adjacent output frames of the detail recovery branch.

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

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

[0056] Compared with the prior art, the beneficial effects of the present invention are:

[0057] This invention integrates multiple feature analysis methods, including histogram analysis, filtering analysis, frequency domain transformation, and feature extraction, through a preprocessing module. This enables comprehensive extraction of feature information from raw underwater image data across multiple dimensions, such as 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 filtering analysis unit generates feature information by fusing spatial domain processing with raw channel data; the frequency domain transformation unit parses frequency domain components to obtain features; and the feature extraction unit decomposes structural information to obtain features. This multi-dimensional feature analysis approach allows 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 targeting and effectiveness of the enhancement process.

[0058] The method supports multi-scale processing modes, 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 running simultaneously, the method determines whether there is a target processing scale capable of processing multiple sets of image data simultaneously, and selects the optimal feature information based on feature confidence scores calculated according to processing parameters. For example, processing parameters include elements such as processing orientation, angle, distance, and range. By calculating feature confidence scores, the feature information with the highest confidence is selected as the output, ensuring that the feature advantages at different scales can be fully utilized during multi-scale processing, avoiding information redundancy and interference, achieving accurate enhancement of targets at different scales in underwater images, and improving the overall image quality at multiple scales.

[0059] In the parameter verification and correction stage, the algorithm determines whether to trigger feature confidence calculation or perform parameter correction by judging whether the processing parameters include processing angle and / or processing range, and whether the attribute parameters (texture type, size specifications, etc.) are consistent. When the attribute parameters are inconsistent, the image data with the smallest processing distance is used as the benchmark, and an association group is established with the remaining data to calculate the comprehensive difference and correct the processing angle and range. This mechanism enables the algorithm to automatically adjust the processing parameters according to 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 employs a multi-branch fusion structure, including color correction, contrast adjustment, and detail restoration branches. These branches generate corresponding coefficients for color, brightness, and edge features, respectively, and are then fused to generate an enhanced image. This multi-branch parallel processing approach simultaneously addresses color distortion, low contrast, and detail blurring 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 fluctuation range of the detail enhancement coefficient is abnormal, a stability detection module performs normalization based on variance data. These mechanisms enable the algorithm to dynamically adjust the computational priority and parameters according to the output differences of each branch under different scenes, ensuring a balance between color correction, contrast enhancement, and detail restoration. This avoids image distortion caused by over-processing of any one branch, further improving the uniformity and naturalness of the enhancement effect. Attached Figure Description

[0061] Figure 1 This is a schematic diagram illustrating the working principle of the underwater image enhancement method based on the Retinex algorithm described in this invention.

[0062] Figure 2 Design drawings for a multi-scale processing mode control system;

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

[0064] Figure 4 This is a design drawing for a multi-branch fusion structure processing unit. Detailed Implementation

[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0066] Please see Figures 1-4 The underwater image enhancement method based on the Retinex algorithm involved in this invention has the following specific implementation steps:

[0067] Acquire raw underwater image data to be processed. This step is completed using image acquisition equipment (such as underwater cameras, sonar imaging equipment, etc.). The acquired image data contains 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 raw underwater image data to extract its feature information. This module integrates multiple analysis units, allowing users to select single or combined analysis methods based on image characteristics. For example, the histogram analysis unit calculates brightness distribution data and determines feature information based on preset conditions and the distribution-feature mapping relationship; or the filtering analysis unit performs spatial domain processing, combining the raw channel data to generate processed data and fusing it to obtain feature information; or the frequency domain transformation unit converts frequency domain components, and the feature extraction unit identifies structural information to complete feature analysis and extraction.

[0069] Based on the extracted feature information, the Retinex algorithm processing unit is used to enhance the raw underwater image data. The Retinex algorithm processing unit optimizes dimensions such as color, contrast, and detail of the image according to the feature information, achieving enhanced effects such as improved underwater image clarity and color reproduction.

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

[0071] Example 1: The preprocessing module includes one or more of the following: histogram analysis unit, filter analysis unit, frequency domain transformation unit, and feature extraction unit. The specific processing procedures of each unit are as follows:

[0072] When calculating the brightness distribution data of raw underwater image data using the histogram analysis unit, the system first statistically analyzes the grayscale values ​​of the image to generate a brightness histogram. This histogram reflects the distribution of the number of pixels with different brightness values ​​in the image. Preset brightness distribution conditions can include the mean brightness range, brightness variance threshold, and peak brightness interval. For example, when the mean brightness is detected to be lower than a preset low brightness threshold, the image is determined to be generally dark; if the brightness variance is less than a specific value, it indicates low image contrast. When the brightness distribution data meets one or a combination of the above preset conditions, the system determines the corresponding feature information based on a pre-established distribution-feature mapping relationship. This mapping relationship is established through the analysis of a large number of underwater image samples from different scenes. For example, a brightness distribution with a low mean brightness and low variance usually corresponds to underwater image features of low contrast and dark colors. In this case, the system will mark features such as "low contrast and insufficient brightness" as the feature information of the current image.

[0073] When performing spatial domain processing on raw underwater image data using the filtering analysis unit, the image is first processed using a suitable filtering algorithm. The mean filtering algorithm smooths the image by calculating the mean of the pixel's neighborhood, effectively reducing Gaussian noise; the median filtering algorithm removes salt-and-pepper noise by taking the median of the pixel's neighborhood. The first processed data, obtained after filtering, reduces noise interference in the image and highlights the overall structure of the image. Simultaneously, the system analyzes the raw channel data (i.e., the pixel values ​​of the three RGB color channels) of the raw underwater image data. For example, due to the absorption and scattering of different wavelengths of light in the underwater environment, the image often exhibits a blue-green color cast; in this case, the pixel values ​​of the blue and green channels in the raw channel data may be higher than those of the red channel. By performing normalization and weighted adjustments on the channel data, second processed data is generated, which highlights the differences between color channels or balances the color distribution. Subsequently, the first and second processed data are fused, which can be done through matrix addition, channel-wise concatenation, etc. For example, by adding the filtered image data to the adjusted channel data, we can obtain feature information that simultaneously contains denoised structural information and color-corrected channel information. This feature information can reflect the texture details and color distribution characteristics of the image.

[0074] When converting the frequency domain components of raw underwater image data using the frequency domain transformation unit, the system employs frequency domain transformation 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, the low-frequency components of the image mainly represent the background and slowly changing areas, such as large bodies of water and gentle seabed topography; while the high-frequency components mainly represent the edges, details, and noise of the image, such as the outlines of objects and the texture of seaweed. 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, feature information about the image background can be obtained; or high-frequency components can be retained to highlight the edge details of the image, obtaining feature information about the image details. In addition, by analyzing the energy distribution of the frequency domain components, it is possible to determine whether there is periodic noise or interference of specific frequencies in the image, thereby determining the corresponding feature information.

[0075] When identifying the structural information of raw underwater image data through the feature extraction unit, the system first processes the image using an edge detection algorithm. The Canny operator, through steps such as Gaussian filtering to smooth the image, calculating gradient magnitude and direction, non-maximum suppression, and hysteresis thresholding, can detect relatively accurate edges in the image; the Sobel operator identifies the position and direction of edges by calculating the gradients of the image in the horizontal and vertical directions. Through the edge detection algorithm, the system can obtain the edge pixels in the image, thus forming edge contours. Then, morphological operations are used to decompose and process the edge contours. Morphological operations include dilation, erosion, opening, and closing operations. For example, dilation can connect adjacent edge pixels and fill small gaps in the edges; erosion can remove small noise points around the edges. Through these operations, the system can decompose the structural information of the image, such as the shape of objects, the direction of edges, and the boundaries of regions. For example, for underwater fish images, the feature extraction unit can identify the outline shape of the fish, the edge direction of the fins, and other structural features through edge detection and morphological operations, and output these as the image's feature information.

[0076] In practical processing, the preprocessing module can select a single analysis unit for feature analysis based on the characteristics of the raw underwater image data, or it can combine multiple analysis units for collaborative processing. For example, for underwater images with significant noise and color cast, denoising can be performed first using a filtering analysis unit, followed by brightness distribution analysis using a histogram analysis unit, while edge structures are identified using a feature extraction unit. Finally, the feature information obtained from each unit is fused to comprehensively extract the image's feature information, providing richer and more accurate input data for subsequent Retinex algorithm enhancement operations. This multi-unit collaborative processing approach can more effectively address the complex degradation problems of underwater images, improve the accuracy and comprehensiveness of feature analysis, and thus lay the foundation for improved image enhancement effects.

[0077] Example 2: Based on the overall implementation scheme, this example supports multi-scale processing modes. 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 startup status of the processing scales to determine if at least two processing scales are simultaneously processing the raw underwater image data. The division of processing scales is set according to image analysis requirements. For example, it can be divided into high-resolution, medium-resolution, and low-resolution scales based on different image resolutions, corresponding to detail enhancement, medium-area analysis, and overall scene recognition, respectively. Alternatively, it can be divided into local, sub-region, and global scales based on the size of the analysis area. Local scales target specific points of interest in the image (such as key parts of underwater objects), sub-region scales target pre-divided image blocks (such as dividing the image into four sub-regions: upper left, upper right, lower left, and lower right), and global scales target the entire image area. Each processing scale's feature analysis module runs independently, with specific parameter settings and processing logic. For example, the feature analysis module at the local scale can use small-sized convolutional kernels to extract detailed features, while the module at the global scale can use large-sized filters to analyze the overall brightness distribution.

[0079] When the detection result indicates that no two processing scales are simultaneously activated, meaning only a single processing scale is active, the system directly executes the enhancement operation using the Retinex algorithm processing unit. In this case, the feature analysis module outputs feature information at only one scale, and the Retinex algorithm processing unit performs targeted image enhancement based on this feature information. For example, if only global scale processing is activated, the feature analysis module extracts features such as overall image brightness unevenness and color cast, and the Retinex algorithm processing unit achieves overall image quality improvement through global illumination estimation and color correction.

[0080] When the detection result indicates that at least two processing scales are simultaneously activated, the system enters the target processing scale determination process. The target processing scale is defined as the scale at which the corresponding feature analysis module can simultaneously process multiple sets of image data. The methods for dividing multiple sets of image data include, but are not limited to: spatial location-based division (e.g., dividing an image into multiple strips by rows or columns, with each set of data corresponding to one strip), feature region-based division (e.g., extracting multiple regions of interest using a saliency detection algorithm, with each set of data corresponding to one region of interest), and time series-based division (e.g., when processing consecutive video frames, each set of data corresponds to frames from different times). For example, if the feature analysis module of a certain processing scale supports parallel processing of image data from four sub-regions, with each sub-region corresponding to an independent set of pixel data, this scale belongs to the target processing scale.

[0081] When determining whether a target processing scale exists across all processing scales, the system checks the processing capabilities of each scale's feature analysis module. If all 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), then it is determined that no target processing scale exists. In this case, the system still executes a single Retinex algorithm enhancement operation. The feature analysis modules at each scale output single sets of feature information sequentially or in parallel, and the Retinex algorithm processing unit integrates the features from all scales for global optimization. For example, if the medium-resolution scale and the low-resolution scale are started simultaneously, their feature analysis modules process the medium-resolution and low-resolution versions of the entire image, respectively. The output feature information reflects the medium detail and overall structure of the image, respectively. The Retinex algorithm processing unit combines these two types of features to adjust contrast and color balance.

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

[0083] When processing multiple sets of image data, the feature analysis module at 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 the coordinate offset relative to the upper left corner of the image; the processing angle can be adjusted according to the main direction of objects within the region (e.g., 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 (e.g., the module center) to the center of the region of interest; and the processing range can be set to the size of the rectangle containing the region of interest. The settings of these parameters directly affect the accuracy of feature analysis. For example, when the processing angle is consistent with the main direction of the object, the edge detection algorithm can extract contour features more effectively.

[0084] The system achieves flexible control over multi-scale processing modes by detecting the activation status of the processing scale and the existence of the target processing scale. In single-scale processing, the system efficiently enhances the image; in multi-scale collaborative processing, it fully utilizes feature information from different scales and regions through target processing scale identification and multi-set data processing, providing richer input dimensions for the Retinex algorithm, thus achieving more accurate image enhancement at both global and local levels. This multi-scale processing mechanism can adapt to complex scene changes in underwater images. For example, in underwater images containing both distant backgrounds and near objects, global-scale analysis of background illumination distribution and local-scale extraction of object detail features, combined, effectively improve the overall image clarity and color reproduction, avoiding detail loss or global distortion problems that may occur with single-scale processing.

[0085] In practical implementation, 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 to different scales in the image processing chip, and the startup and data interaction of each unit are coordinated through a bus control unit. At the software level, multi-threading technology is used to achieve parallel operation of feature analysis modules at different scales, improving processing efficiency. The detection and judgment process is implemented through conditional statements and status registers to ensure the logical correctness of the system under different processing modes. The entire multi-scale processing process is closely centered on the needs of image feature analysis. Through hierarchical and regional processing strategies, the adaptability and robustness of underwater image enhancement methods are improved, providing a solid feature foundation for subsequent multi-dimensional optimization of the Retinex algorithm.

[0086] Example 3: Based on Example 2, when a target processing scale is determined to exist, a feature information filtering and processing procedure needs to be executed for any target processing scale. The specific implementation method is as follows:

[0087] The feature analysis module obtains the processing parameters for each set of image data at the target processing scale. These parameters, referenced to the reference position of the feature analysis module, include one or more of the following: processing orientation, processing angle, processing distance, and processing range. The reference position can be set as the fixed origin of the feature analysis module's coordinates (e.g., the upper left corner or geometric center of the module's processing area). The processing orientation identifies 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 from the 100th to the 200th pixel 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., 0° to the right horizontally). For example, in edge detection, the processing angle is set to 45° to detect oblique edges. The processing distance is the Euclidean distance (in pixels) from the reference position to the data center of each set of images, used to measure the spatial relationship between the data set and the module's core processing area. The processing range defines the spatial coverage size of each set of image data (e.g., the width and height pixel values ​​of a rectangular area). For example, a certain target processing scale divides an underwater image into four sub-regions, with each group of image data corresponding to one sub-region. The processing parameters can be expressed as follows: the processing orientation of sub-region 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 score for each set of image data based on all elements included in the processing parameters. Feature confidence score is a quantitative indicator that measures the degree of matching between processing parameters and image data features, and its calculation logic is based on a preset confidence score model. For example, if the processing orientation coincides with the distribution area of ​​the main object in the image (e.g., the processing orientation covers the main area of ​​underwater organisms), the confidence score weight corresponding to that element is higher; if the processing angle is consistent with the main direction of the object's edge (e.g., the processing angle is set to 30° parallel to the fish's body axis), the accuracy of edge feature extraction can be improved, and the confidence score contribution value of that element can be increased accordingly; when the processing distance is small (e.g., less than 100 pixels), it usually means that the image data contains finer details, and its confidence score weight is higher than that of data from a long distance; when the processing range completely covers the target object (e.g., including the whole body of a fish rather than a part of it), it can be considered a more effective feature analysis range, thereby improving the confidence score. The weights of each element are determined through prior knowledge or training data. For example, in the processing of underwater coral images, the weight of the processing range element can be set to 0.4, the processing angle element to 0.3, and the processing orientation and distance elements to 0.15 each. The feature confidence value of each set of data is obtained by weighted summation.

[0089] The feature information with the highest feature confidence score is selected from all image data and used as the output feature information for that target processing scale. This selection mechanism ensures that when processing multiple sets of data in parallel, the feature information with the highest matching degree to the processing parameters is prioritized, avoiding feature noise caused by parameter setting deviations. For example, if a target processing scale contains three sets of image data with feature confidence scores of 0.85, 0.72, and 0.91, the feature information corresponding to a confidence score of 0.91 is selected as the output for that scale. This feature information typically reflects the image features of the corresponding region more accurately (such as clear edge structures 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 their output feature information before performing enhancement operations 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 temporal disorder caused by incomplete processing at some scales. For example, assuming there are two target processing scales, scale 1 processes the global brightness features of the image (outputting brightness distribution information with a confidence level of 0.9), and scale 2 processes the color features of local regions (outputting color cast information with a confidence level of 0.88), the system needs to wait until both scales have output their feature information before fusing the brightness distribution and color cast information to drive the Retinex algorithm for global illumination estimation and color correction.

[0091] The diverse design of processing parameters allows it to adapt to different underwater image scenarios. For example, when processing underwater images containing objects in multiple directions, different processing angles (such as 0°, 90°, 45°, and 135°) can be set for each set of data to comprehensively detect edge features in all directions. When processing images where objects at both near and far distances coexist, different processing distances (such as 30 pixels for near distance and 200 pixels for far distance) can be set to perform targeted analysis of details and background respectively. The calculation of feature confidence provides a quantitative evaluation method for the effectiveness of features from multiple sets of data, avoiding feature conflicts or redundancy caused by blindly fusing multiple sets of data. For example, when there are obvious contradictions in the processing parameters of two sets of data (such as one set using a 0° processing angle to detect horizontal edges and another set using a 90° processing angle to detect vertical edges, but the image actually contains mainly horizontal edges), feature confidence can accurately identify that the former is more effective, thus filtering out more reliable feature information.

[0092] In the implementation, the acquisition and storage of processing parameters are achieved through data structures. Each data group corresponds to a structure variable containing fields such as orientation, angle, distance, and range, facilitating program calls and calculations. Feature confidence is calculated through a custom function, which internally performs numerical transformations and weighted calculations on the input processing parameters based on a preset weight matrix and feature matching rules. Feature information filtering employs a traversal comparison algorithm, comparing confidence values ​​group by group and recording the feature information pointer corresponding to the maximum value. Synchronization control of multi-target processing scales is achieved through semaphores or event-driven mechanisms, ensuring that the Retinex algorithm processing unit's computation flow is triggered only after feature output at all scales is completed.

[0093] This multi-set 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 image data processed in parallel. It fully utilizes the spatial diversity of the multiple sets of data while ensuring the reliability of the feature information through a confidence-based filtering mechanism. Combined with the multi-dimensional enhancement capabilities of the Retinex algorithm, this mechanism can simultaneously achieve global illumination homogenization, 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 underwater image feature analysis needs under different imaging conditions. For example, it can handle low-contrast images in turbid water, overexposed images under strong light, or color-distorted images under complex lighting conditions. By adjusting parameters and confidence calculation rules, it can achieve accurate feature extraction and optimized enhancement operations.

[0094] Example 4: Based on Example 3, when the processing parameters for each set of image data include processing angle and / or 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 for each set of image data to determine whether they include a processing angle and / or a processing range. The processing angle defines the direction of feature analysis operations (e.g., gradient direction for edge detection, rotation angle of the filter kernel), while the processing range defines the area of ​​effect of feature analysis (e.g., rectangular window, circular region). If the verification result indicates that the processing parameters do not include a processing angle or processing range (i.e., only processing orientation, processing distance, and other parameters), the system directly performs the feature confidence calculation without additional parameter correction or attribute analysis. For example, if the processing parameters for a set of image data only include a circular processing range centered on a reference position with a radius of 50 pixels (indirectly defined by 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, directly entering the feature confidence calculation process.

[0096] If the verification result indicates that the processing parameters include processing angle and / or processing range, then the attribute parameters for each set of image data need to be further determined. Attribute parameters include texture type and size specifications: Texture type reflects the grayscale variation pattern of a local area of ​​the image and can be extracted using algorithms such as Gray-Level Co-occurrence Matrix (GLCM) and Local Binary Pattern (LBP). For example, it can be categorized as "smooth" (e.g., large areas of water), "rough" (e.g., rock surfaces), and "mixed" (e.g., the boundary between coral and water). Size specifications describe the size of objects or regions in the image and can be determined by calculating the area of ​​connected regions and the size of bounding boxes. For example, it can be categorized as "small size" (less than 100×100 pixels), "medium size" (100×100 pixels to 500×500 pixels), and "large size" (greater than 500×500 pixels). For example, a set of image data corresponds to an underwater rock region; texture analysis determines its texture type to be "rough," and bounding box measurement determines its size specification to be "medium size."

[0097] The system determines whether the attribute parameters of all image data are consistent. Consistency determination includes a dual matching of texture type and size: if all data have the same texture type and belong to the same size level (e.g., all are "medium"), then the attribute parameters are considered consistent; if there are different texture types (e.g., some are "smooth" and some are "coarse") or size levels that span (e.g., include "small" and "large"), then the attribute parameters are considered inconsistent. For example, if the target processing scale contains three sets of image data, two of which have a texture type of "smooth" and a size of "large," and the other has a texture type of "coarse" and a size of "medium," then the attribute parameters are considered inconsistent.

[0098] When the attribute parameters are consistent, the operation of calculating feature confidence is triggered without the need for parameter correction. In this case, multiple sets of image data have similar texture features and size. The processing angle and processing range can be optimized based on unified rules, and the calculated feature confidence result can effectively reflect the degree of matching between the parameters and image features. For example, for three sets of water body region data that are all "smooth" textures and "large" in size, the processing angle can be uniformly set to 0° to detect horizontal illumination changes, and the processing range can cover a large area. The system uses confidence calculation to select the set of data with the most stable illumination distribution characteristics as the output.

[0099] When attribute parameters are inconsistent, the system establishes association groups between the image data corresponding to the minimum processing distance and the remaining image data one by one, generating 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 the reference group to pair with other data groups, making it easier to adjust parameters based on high-priority areas. For example, if the processing distances of the four data groups are 50 pixels, 100 pixels, 150 pixels, and 200 pixels, 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 respectively (reference group - 100 pixel group, reference group - 150 pixel group, reference group - 200 pixel group).

[0100] For any given set of data, the system calculates the difference measure of the same type of attribute parameters item by item based on all attribute parameters of the two sets of image data within that set. For texture types, the difference is calculated using the cosine similarity of feature vectors (e.g., converting texture features into multi-dimensional vectors, the closer the cosine value is to 1, the smaller the difference); for size specifications, the absolute or relative difference of the size values ​​is calculated (e.g., absolute difference = |size A - size B|). For example, the difference between the baseline group (texture type "rough", size 200×200 pixels) and a certain data group (texture type "smooth", size 500×500 pixels) is measured as follows: the texture type difference is calculated as 0.3 (large difference) by cosine similarity, and the relative difference in size is (500-200) / 500 = 0.6 (large difference). Combining the two, the attribute difference feature of the data group is obtained.

[0101] Based on various difference measures, the system calculates the overall difference between the two sets of image data using methods such as weighted average and principal component analysis. The weight allocation can be adjusted according to 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 overall difference value is typically standardized to [0,1], with a larger value indicating a more significant difference in attributes between the two sets of data.

[0102] The system selects a target data group from the two sets of image data based on their processing distance and attribute parameters, ensuring the appropriate 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 (e.g., less than 100 pixels) and the overall difference is greater than 0.7, the non-baseline group in the target data group needs parameter correction with reference to the baseline group. When the processing distance is far (e.g., greater than 200 pixels) and the difference is less than 0.3, the two sets of data are determined to belong to different feature regions, requiring no parameter correction and being processed directly with the original parameters. The selection of the target data group typically follows the principle of "prioritizing close-range corrections and prioritizing high-difference corrections" to ensure parameter accuracy in key areas.

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

[0104] The entire processing flow addresses 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 correcting for differences. For example, in underwater images containing both near-distance coarse-textured objects and far-distance smooth-textured backgrounds, by correcting the correlation between the minimum processing distance group and other groups, the processing angle of the far-distance group can be adjusted from the default 0° to any angle that adapts to the smoothness of the background (e.g., removing angle restrictions and using omnidirectional averaging). The processing range is expanded to cover the entire background, ensuring that image data with different attributes can obtain reasonable feature analysis parameters and avoiding feature extraction bias caused by a "one-size-fits-all" approach to parameters. This mechanism enhances the adaptability of the target processing scale to complex scenes, ensuring that the feature information of multiple sets of data is optimized and adjusted before confidence screening, providing 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 of the enhancement operation performed by each branch based on the output feature information is as follows:

[0106] The color correction branch analyzes the color feature data in the output feature information. This color feature data includes the mean, variance, and color distribution ratio of each color channel (e.g., R, G, B channels). Addressing the common blue-green color cast problem in underwater images, the color correction branch generates color correction coefficients C through a non-linear transformation. corr This coefficient is used to adjust the gain of each color channel to reproduce true colors. 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 The blue channel is attenuated, and the red channel is enhanced.

[0107] The brightness feature data in the output feature information is analyzed through the contrast adjustment branch. The brightness feature data includes the average brightness value μ. L Brightness range [L] min ,L max [and histogram distribution. The contrast adjustment branch generates contrast mapping coefficients M based on luminance feature data.] cont This coefficient adjusts the brightness distribution of an image through linear stretching or nonlinear transformations (such as logarithmic transforms and gamma transforms) to enhance contrast. For example, when the brightness range is narrow, M... cont Expanding the brightness range makes the image's light and dark levels more distinct.

[0108] The detail recovery branch parses the edge feature data in the output feature information. This edge feature data includes edge intensity E, edge direction θ, and edge position coordinates (x, y). The detail recovery branch generates detail enhancement coefficients S using high-pass filtering or edge enhancement algorithms. detail This coefficient is used to enhance the edges and details of an image. For example, for pixels with an edge intensity E greater than a threshold, S... detail Increase the weight of its grayscale value to make the edges sharper.

[0109] The color correction coefficient C is integrated. corr Contrast mapping coefficient M cont and detail enhancement coefficient S detail At that time, a weighted fusion strategy is adopted to generate enhanced image data I. 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 is the original image data, and α, β, and γ are the fusion weight coefficients, satisfying α + β + γ = 1. The weight coefficients are dynamically adjusted according to the image features. For example, in scenes with severe color distortion, the value of α is increased; in low-contrast scenes, the value of β is increased; and in scenes where details need to be highlighted, the value of γ is increased.

[0112] When the color correction factor C corr Mapping coefficients M with contrast cont When the numerical difference exceeds a preset threshold T1, the priority determination module is activated. This module analyzes the scene identification information (such as shallow sea, deep sea, lit, unlit, etc.) of the raw underwater image data and determines the operation priority of the color correction branch or contrast adjustment branch based on the scene identification information. For example, color cast is more prominent in deep-sea scenes, so the color correction branch is executed first, with α = 0.6, β = 0.3, and γ = 0.1; while in low-contrast scenes caused by low lighting, the contrast adjustment branch is executed first, with β = 0.5, α = 0.3, and γ = 0.2. After redistributing the fusion weights according to the operation priority, the above fusion formula is then 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 When [the condition is met], the stability detection module is activated. This module calculates the variance data σ of adjacent output frames of the detail recovery branch. 2 Variance data reflects the degree of change in detail enhancement effects between adjacent frames. If the variance data σ 2 If the variance is less than the preset variance threshold T2, it indicates that the detail enhancement effect is stable and maintains S. detail If the variance data σ remains unchanged; 2 If the variance is greater than or equal to the preset variance threshold T2, then the contrast mapping coefficient M is used. cont Detail enhancement factor S detail Normalization is performed using the following formula:

[0114]

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

[0116] The above implementation achieves multi-dimensional enhancement of underwater image color, contrast, and detail through a multi-branch fusion structure. Furthermore, it resolves priority conflicts and detail fluctuations arising from different enhancement needs through dynamic weight allocation and stability detection mechanisms. The processing logic of each branch closely revolves around the output feature information, ensuring the targeted and effective nature of the enhancement operations and ultimately generating underwater images with superior visual quality.

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

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

Claims

1. An underwater image enhancement method based on Retinex algorithm, characterized in that, The method comprises: acquiring underwater original image data to be processed; performing feature analysis on the underwater original image data by a preprocessing module, and extracting feature information of the underwater original image data; performing enhancement operation on the underwater original image data by a Retinex algorithm processing unit based on the extracted feature information; the preprocessing module comprises one or more of a histogram analysis unit, a filter analysis unit, a frequency domain conversion unit and a feature extraction unit; the feature analysis on the underwater original image data by the preprocessing module comprises: calculating luminance distribution data of the underwater original image data by the histogram analysis unit, and determining corresponding feature information as the feature information of the underwater original image data according to a preset distribution-feature mapping relationship when the luminance distribution data meets a preset condition; performing spatial domain processing on the underwater original image data by the filter analysis unit to obtain first processing data, and combining original channel data of the underwater original image data to generate second processing data, and fusing the first processing data and the second processing data to obtain feature information; and / or, converting frequency domain components of the underwater original image data by the frequency domain conversion unit, and analyzing the frequency domain components to obtain feature information; and / or, recognizing structural information of the underwater original image data by the feature extraction unit, and decomposing the structural information to obtain feature information; 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 for processing image data; the method further comprises: detecting whether at least two processing scales simultaneously initiate processing of the underwater original image data; when the detection result is no, performing the operation of performing enhancement operation by the Retinex algorithm processing unit; when the detection result is yes, judging whether there is a target processing scale in all processing scales, the target processing scale being a scale corresponding to a feature analysis module that can simultaneously process multiple groups of image data; when it is judged that there is no target processing scale, performing the operation of performing enhancement operation by the Retinex algorithm processing unit.

2. The underwater image enhancement method based on Retinex algorithm according to claim 1, characterized in that, the method further comprises: when it is judged that there is a target processing scale, for any target processing scale: acquiring processing parameters of each group of image data of the feature analysis module of the target processing scale, calculating feature confidence of each group of image data of the feature analysis module according to all elements contained in the processing parameters, and screening feature information corresponding to the highest feature confidence from feature information of all image data as output feature information of the target processing scale; the operation of performing enhancement operation by the Retinex algorithm processing unit comprises: when all target processing scales determine output feature information, performing enhancement operation based on the output feature information of each target processing scale.

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

4. The underwater image enhancement method based on Retinex algorithm according to claim 2 or 3, characterized in that, the method further comprises: verifying whether the processing parameters of each group of image data include a processing angle and / or a processing range; when the verification result is no, performing the operation of calculating the feature confidence; when the verification result is yes, determining attribute parameters of each group of image data, the attribute parameters including a texture type and / or a size specification; judging whether the attribute parameters of all image data are consistent; when the judgment is consistent, triggering the operation of calculating the feature confidence.

5. The underwater image enhancement method based on Retinex algorithm according to claim 4, characterized in that, The processing parameters of each group of image data further include a processing distance; the method further includes: when the judgment is inconsistent, establishing a correlation group between the image data corresponding to the minimum processing distance and the remaining image data one by one to generate at least one data group; for any data group: calculating a difference measure of the same type of attribute parameter item by item according to all attribute parameters of two groups of image data in the data group, and calculating a comprehensive difference degree of the two groups of image data based on the difference measure; selecting a target data group with an adaptive parameter correction strategy from the data group according to the processing distance and the attribute parameters of the two groups of image data; based on the comprehensive difference degree, correcting the processing angle and / or the processing range of the target data group to obtain corrected processing parameters, and after the correction of all data groups is completed, performing the operation of calculating the feature confidence.

6. The underwater image enhancement method based on Retinex algorithm according to claim 2 or 5, characterized in that, 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 recovery branch; The output feature information performs an enhancement operation, which includes: analyzing color feature data through the color correction branch to generate a color correction coefficient; analyzing 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 a detail enhancement coefficient; fusing the color correction coefficient, the contrast mapping coefficient, and the detail enhancement coefficient to generate enhanced image data.

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

8. The underwater image enhancement method based on Retinex algorithm according to claim 7, characterized in that, The method further includes: when the fluctuation amplitude of the detail enhancement coefficient exceeds a preset fluctuation range, starting a stability detection module; 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, maintaining the detail enhancement coefficient unchanged; if the variance data is greater than or equal to the preset variance threshold, performing normalization processing on the detail enhancement coefficient using the contrast mapping coefficient.

Citation Information

Patent Citations

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

    CN112561804A