A two-stage correction method for non-uniform illumination in underwater turbid environment inspection images

By employing a two-stage correction method, the image degradation problems caused by non-uniform illumination and turbid scattering in underwater images were solved, achieving effective brightness correction and detail restoration in underwater images while maintaining the uniformity and realism of the image illumination.

CN123118422APending Publication Date: 2026-11-17STATE GRID SHANGHAI ELECTRIC POWER DESIGN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611314562.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies cannot effectively address image degradation caused by non-uniform lighting and turbid scattering in underwater images, especially overexposure and underexposure in strong lighting scenarios, which cause image details to be "eaten up" by the contrast between light and dark. Furthermore, existing methods struggle to achieve a balance between correction and enhancement.

Method used

A two-stage correction method is adopted. First, the overall brightness fluctuations are eliminated by large-scale low-pass estimation and multiplicative normalization. Then, the residual illumination components are separated and compressed in the logarithmic domain. Combined with multi-scale enhancement and detail back-injection, fine correction is achieved.

Benefits of technology

It effectively eliminates overall brightness fluctuations caused by fill light, while enhancing details, maintaining image lighting uniformity and realism, and avoiding residual interference from overexposure and underexposure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118422A_ABST
    Figure CN123118422A_ABST
Patent Text Reader

Abstract

This invention relates to a two-stage correction method for non-uniform illumination in underwater turbid environment inspection images, comprising the following steps: S1, acquiring original images of industrial components collected by underwater inspection equipment in turbid water, performing bit depth normalization and mild pre-denoising on the original images to obtain the RGB image to be processed; S2, converting the RGB image to be processed to HSV or Lab color space, separating independent luminance and chrominance components, and saving the chrominance components for final synthesis; S3, performing large-scale low-pass estimation on the luminance components; In this invention, the first stage performs multiplicative coarse normalization on the illumination field estimated based on the original observed luminance; the second stage re-estimates the residual illumination in the logarithmic domain on the enhanced current luminance map. The two stages are complementary rather than repetitive, eliminating the overall brightness fluctuations caused by supplemental lighting, and suppressing the local overexposure / underexposure residuals after dehazing and enhancement, thereby enhancing details while maintaining the uniformity and realism of the illumination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underwater image processing, and in particular to a two-stage correction method for non-uniform illumination in underwater turbid environment inspection images. Background Technology

[0002] During underwater facility inspections, underwater robots often require artificial lighting devices such as supplemental lighting to compensate for insufficient natural underwater light. This artificial lighting, applied locally along the water surface, results in a noticeably uneven distribution of image brightness: the central area of ​​the light spot (such as cables or metallic highlights) is severely overexposed, while shadow areas are severely underexposed, causing local details to be "eaten up" by the contrast between light and dark. This uneven lighting, combined with the scattering degradation from turbid water, constitutes one of the various degradation issues encountered in underwater industrial inspection images.

[0003] Existing image processing methods for handling non-uniform lighting can be broadly categorized as follows: (a) Homomorphic filtering: In the logarithmic domain, the image is separated into illumination (low frequency) and reflection (high frequency) components. The illumination component is compressed and the reflection component is enhanced and then restored, which can improve the overall brightness. However, single-scale homomorphic filtering has limited ability to correct large-scale non-uniform residual effects such as "overexposure of strong lighting + underexposure of shadows", and may amplify noise in underwater turbid low signal-to-noise ratio images.

[0004] (ii) Based on the Retinex approach: The image is treated as the product of reflectance and illumination, and the illumination is estimated and normalized by division. This type of method is sensitive to the illumination scale. Inaccurate illumination estimation can easily introduce non-physical shifts in the overall brightness, and it lacks a two-stage processing to match the residual illumination after descattering.

[0005] (iii) Deep learning methods: require a large amount of paired data, are prone to artifacts on low-texture metal targets, have large model size, and are difficult to embed into ROV computing-limited units.

[0006] The methods described above are mostly single-stage or single-scale processing, and do not explicitly model the superposition process of "non-uniform illumination formed by supplementary lighting + turbid scattering + subsequent enhancement and amplification": that is, they do not first perform coarse normalization based on the original brightness illumination field, and then finely correct the residual illumination by re-estimating the brightness map after enhancement. Therefore, in strong supplementary lighting scenes, it is difficult to coordinate overexposure and underexposure between correction and enhancement, and the non-uniform bright spots remaining after correction will still interfere with downstream detection. Summary of the Invention

[0007] In view of this, the present invention aims to propose a two-stage correction method for non-uniform illumination in underwater turbid environment inspection images, in order to solve the problems in the prior art.

[0008] To achieve the above objectives, the technical solution of the present invention is implemented as follows: This invention discloses a two-stage correction method for non-uniform illumination in underwater turbid environment inspection images, comprising the following steps: S1 acquires the original images of industrial components collected by the underwater inspection equipment in turbid water. The original images are then subjected to bit depth normalization and light pre-denoising to obtain the RGB image to be processed. S2, convert the RGB image to be processed to HSV or Lab color space, separate the independent luminance component and chrominance component, and save the chrominance component for final synthesis; S3, perform large-scale low-pass estimation on the brightness component to obtain the first non-uniform illumination component characterizing the overall brightness fluctuation caused by artificial lighting; S4, the first non-uniform illumination component is used to multiplicatively normalize the brightness component to complete the first-level coarse correction and obtain the coarse correction brightness map to eliminate the overall dark corners and bright spots caused by the supplementary light. S5, perform the second level of fine correction on the current luminance map: convert the current luminance map to the logarithmic domain, separate the residual illumination component and the reflection component through low-pass filtering, compress the residual illumination component and enhance the reflection component, and then return to the luminance domain through exponential transformation to obtain the finely corrected luminance map. The current brightness map is the coarsely corrected brightness map output in step S4, or the image after the coarsely corrected brightness map has been processed by descattering and contrast enhancement. S6, the finely corrected luminance component is recombined with the chromaticity component saved in step S2 to output an underwater industrial inspection image corrected by two levels of non-uniform illumination.

[0009] Furthermore, in step S3, the first non-uniform illumination component is estimated using a structure-preserving smoothing method: the illumination component is solved by minimizing the energy functional containing the data term and the smoothing term, wherein the weight of the smoothing term decreases as the brightness gradient increases, so that the resulting illumination field is smooth overall and does not cross the edge of the industrial component.

[0010] Furthermore, in step S5, the current luminance map in the logarithmic domain is decomposed into multi-scale components by bandpass operators of multiple scales, and differential enhancement coefficients are applied to the reflection components of different scales, wherein the enhancement coefficient of the finer scale corresponding to the detail texture is not less than the enhancement coefficient of the coarser scale corresponding to the overall illumination.

[0011] Furthermore, in step S5, for areas where the corrected brightness value is higher than the preset overexposure threshold, a smoothing function is used for soft compression processing to smoothly reduce the overexposure brightness of the fill light center and avoid grayscale discontinuity in the highlight area.

[0012] Furthermore, in step S5, the local structural coherence is calculated based on the local structural tensor eigenvalues ​​of the current brightness map, and the reflection enhancement coefficient is spatially adjusted according to the structural coherence. Industrial components with directional textures exhibit high regional structural coherence, resulting in an improved reflection enhancement coefficient. Flat, turbid regions exhibit low structural coherence, resulting in a decrease in the reflection enhancement coefficient.

[0013] Furthermore, a detailed back-injection step is performed before step S6: Edge-preserving filtering is used to decompose the luminance components before coarse correction in step S4 into a base layer and a detail layer. The detail layer is then superimposed onto the two-level corrected luminance map according to the back-injection coefficient that adapts to the local illumination intensity. The lower the local illumination intensity, the larger the detail back-injection coefficient.

[0014] Furthermore, in step S6, when synthesizing the image, the color saturation components are proportionally linked and modulated according to the brightness comparison before and after correction: the saturation of the underexposed areas whose brightness is increased after correction is moderately increased, and the saturation of the overexposed highlight areas whose brightness is decreased after correction naturally decreases.

[0015] Furthermore, in step S3, the filtering scale for large-scale low-pass estimation is 20-60 pixels; In step S5, the scale of the logarithmic domain low-pass filter is 10-60 pixels, and is not greater than the low-pass estimation scale in step S3. In step S5, the compression factor of the residual illumination component is 0.5-0.9, and the enhancement factor of the reflection component is 1.1-1.5.

[0016] Compared with the prior art, the present invention has the following advantages: In this invention, non-uniform illumination correction is explicitly split into two stages: the first stage performs a multiplicative coarse normalization of the illumination field based on the original observed brightness estimate, providing a consistent brightness benchmark for inverse filtering decoupling and subsequent enhancement; the second stage re-estimates the residual illumination in the logarithmic domain for the enhanced current brightness map, compresses the illumination, and enhances reflections for fine correction. The two stages are complementary rather than repetitive, eliminating the overall brightness fluctuations caused by supplemental lighting and suppressing the local overexposure / underexposure residuals that are re-magnified after dehazing and enhancement, thereby enhancing details while maintaining the uniformity and realism of the illumination. Attached Figure Description

[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the overall process of the present invention; Figure 2 This is a schematic diagram showing the brightness comparison at each stage of the two-stage correction in this invention; Figure 3 This is a schematic diagram of the image processing of the present invention. Detailed Implementation

[0018] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0019] In the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "back," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0020] Furthermore, in the description of this invention, unless otherwise explicitly defined, the terms "installation," "connection," "linking," and "connector" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention in light of the specific circumstances.

[0021] The following will refer to the appendix. Figure 1 To be continued Figure 3 The present invention will be described in detail with reference to the embodiments.

[0022] Example 1 Overall, such as Figure 1 As shown, this invention discloses a two-stage correction method for non-uniform illumination in underwater turbid environment inspection images, comprising the following steps: S1 acquires the original images of industrial components collected by the underwater inspection equipment in turbid water. The original images are then subjected to bit depth normalization and light pre-denoising to obtain the RGB image to be processed. S2, convert the RGB image to be processed to HSV or Lab color space, separate the independent luminance component and chrominance component, and save the chrominance component for final synthesis; Taking HSV as an example, the luminance component ;when Time saturation Luminance domain processing is decoupled from chrominance, and chrominance components are reused in the final synthesis to ensure the true color of metal parts.

[0023] S3, perform large-scale low-pass estimation on the brightness component to obtain the first non-uniform illumination component characterizing the overall brightness fluctuation caused by artificial lighting; Specifically, the non-uniform illumination formed by the fill light exhibits large-scale (low-frequency) fluctuations in image brightness and modulates scene brightness in a multiplicative manner. Therefore, a large-scale low-pass estimation of the brightness component is performed to estimate the non-uniform illumination component.

[0024] Low-pass scale Take a value that corresponds to the scale of the spatial distribution of illumination (e.g., 20–60 pixels). This low-frequency illumination field The overall brightness fluctuations caused by the fill light are characterized and used for coarse normalization in step S4; step S5 will re-estimate the residual illumination field after coarse normalization on the enhanced current brightness map and perform fine correction.

[0025] As an alternative to ordinary large-scale low-pass filters, step S3 can also employ structure-preserving smoothing to solve for the illumination components: for energy... Find the minimum, where the smoothing weights are... , It decreases as the brightness gradient increases. , Compared to ordinary Gaussian low-pass lighting, the resulting illumination field is smooth overall and does not cross over or leak at the edges of flanges and bolts, avoiding the mistaken flattening of component edges by coarse correction as illumination undulations.

[0026] S4, the first non-uniform illumination component is used to multiplicatively normalize the brightness component to complete the first-level coarse correction and obtain the coarse correction brightness map to eliminate the overall dark corners and bright spots caused by the supplementary light. Normalization is as follows:

[0027] when When close to 0, the minimum value Replace or against A lower limit is truncated to avoid division by zero. This level of correction provides a consistent brightness reference for subsequent dehazing and contrast enhancement, eliminating overall vignetting and bright spots caused by fill light.

[0028] S5, perform the second level of fine correction on the current luminance map: convert the current luminance map to the logarithmic domain, separate the residual illumination component and the reflection component through low-pass filtering, compress the residual illumination component and enhance the reflection component, and then return to the luminance domain through exponential transformation to obtain the finely corrected luminance map. The current brightness map is the coarsely corrected brightness map output in step S4, or the image after the coarsely corrected brightness map has been processed by descattering and contrast enhancement. It should be noted that after descattering and contrast enhancement, the first-stage coarse correction uses... The residuals and localized overexposed / underexposed areas will be magnified and revealed again. Therefore, the enhanced current brightness map... After re-separating illumination / reflection in the logarithmic domain, estimating and correcting the relationship with... Residual illumination of similar magnitude but with different distributions belongs to fine correction, which complements coarse correction:

[0029]

[0030] Among them, the light component It is a low-frequency illumination field obtained by performing a large-scale low-pass filter on the current brightness map, reflecting the non-uniform illumination remaining after coarse normalization; For high-pass filtering operators (such as Gaussian difference). Low-frequency preservation operator; coefficients Compressing low-frequency light, Enhance high-frequency reflections (details), then restore them using an exponential transform. This step outputs a brightness map refined with homomorphic filtering, denoted as... .

[0031] As another implementation, in step S5, the current brightness map in the logarithmic domain is decomposed into multi-scale components by bandpass operators of multiple scales, and differential enhancement coefficients are applied to the reflection components of different scales, wherein the enhancement coefficient of the finer scale corresponding to the detail texture is not less than the enhancement coefficient of the coarser scale corresponding to the overall illumination.

[0032] In step S5, for areas where the corrected brightness value is higher than the preset overexposure threshold, a smoothing function is used for soft compression processing to smoothly reduce the overexposure brightness of the fill light center and avoid grayscale discontinuity in the highlight area.

[0033] In step S5, the local structural coherence is calculated based on the local structural tensor eigenvalues ​​of the current brightness map, and the reflection enhancement coefficient is spatially adjusted according to the structural coherence. Industrial components with directional textures exhibit high regional structural coherence, resulting in an improved reflection enhancement coefficient. Flat, turbid regions exhibit low structural coherence, resulting in a decrease in the reflection enhancement coefficient.

[0034] Specifically: the second-level fine correction can also be implemented in a multi-scale manner: by (Take 2 to 3) bandpass operators Decompose and correct using the following formula:

[0035] Apply an enhancement factor no less than that applied to finer scales (corresponding to details such as threads and scratches) to balance detail sharpness and overall uniformity. For corrected brightness exceeding the threshold... Overexposed areas, according to Soft compression is used to smoothly reduce the overexposure in the center of the fill light instead of cutting it off hard, thus avoiding grayscale breaks in the highlight band.

[0036] To avoid amplifying noise in flat, cloudy areas along with details due to reflection component enhancement, the enhancement coefficient for the reflection component can be adaptively applied pixel-by-pixel: using the local structure tensor eigenvalues ​​of the current luminance map. Calculate structural coherence Spatialize the enhancement coefficients as ( For the average coherence of the whole map, Structural coherence characterizes the directional consistency of local gradients: directional structures such as bolt threads, cable textures, and component contours. Approaching 1, reflection enhancement is sufficient; flat turbidity area. As the value approaches 0, the enhancement level drops back to near 1, and noise is not amplified. Thus, the intensity of detail enhancement is adapted to the local structural content, and the two-level corrected image achieves a balance between detail restoration in shadow areas and noise suppression.

[0037] S6, the finely corrected luminance component is recombined with the chromaticity component saved in step S2 to output an underwater industrial inspection image corrected by two levels of non-uniform illumination.

[0038] In step S6, when compositing the image, the color saturation components are proportionally linked and modulated according to the brightness comparison before and after correction: the saturation of underexposed areas with increased brightness after correction is moderately increased, and the saturation of overexposed highlight areas with decreased brightness after correction naturally decreases.

[0039] The specific details are as follows: The luminance component output in step S5 is combined with the chrominance component retained in step S2 (in HSV, the V channel is replaced with the corrected luminance, or the original RGB is modulated to preserve hue using the luminance ratio), and an industrial inspection image with two levels of illumination correction is output under hue fidelity constraints. During the combination, the chrominance and saturation components can also be proportionally modulated based on the luminance ratio before and after correction. ( , (For corrected brightness): Brighten significantly underexposed areas by moderately increasing saturation, and darken overexposed highlights by naturally reducing saturation, so that brightness correction and color performance remain physically consistent, avoiding color shift in metal parts after normalization.

[0040] It should be further noted that, prior to step S6, a detailed back-injection step can also be performed: Edge-preserving filtering is used to decompose the luminance components before coarse correction in step S4 into a base layer and a detail layer. The detail layer is then superimposed onto the two-level corrected luminance map according to the back-injection coefficient that adapts to the local illumination intensity. The lower the local illumination intensity, the larger the detail back-injection coefficient.

[0041] Two-stage illumination correction, while smoothing out brightness fluctuations, also reduces the detail contrast in shadow areas (underexposed areas). Therefore, edge-preserving filtering (guided filtering or bilateral filtering) can be used to decompose the brightness component before coarse correction in step S4 into a base layer and a detail layer. Then, the detail layer is added back to the two-level corrected brightness map using a back-injection coefficient that adapts to local illumination fluctuations: ,in ( , (This represents the maximum value of the non-uniform illumination component). The weaker the illumination (...). The smaller the value, the larger the re-injection coefficient, meaning the stronger the illumination normalization compression, the more details in the dark areas are re-injected, restoring the texture of bolt threads and cables in the shadow areas; the re-injection coefficient for well-lit bright areas is close to 1, basically maintaining the correction result unchanged. Detail re-injection complements the two-stage correction: the two-stage correction is responsible for "flattening illumination fluctuations," while detail re-injection is responsible for "recovering the suppressed details in the dark areas." Together, they ensure that the corrected image is both uniform and retains texture.

[0042] In summary, this invention explicitly decomposes non-uniform illumination correction into two stages: the first stage performs a multiplicative coarse normalization based on the illumination field estimated from the original observed brightness, providing a consistent brightness benchmark for inverse filtering decoupling and subsequent enhancement; the second stage re-estimates the residual illumination in the logarithmic domain for the enhanced current brightness map, compresses the illumination, and enhances reflections for fine correction. These two stages are complementary rather than repetitive, eliminating overall brightness fluctuations caused by supplemental lighting while suppressing local overexposure / underexposure residuals that are re-magnified after dehazing and enhancement, thus maintaining the uniformity and realism of the illumination while enhancing details. The first-level illumination estimation, after maintaining structural smoothness, ensures that coarse correction no longer crosses the edges of components. The second level, employing a multi-scale approach and soft compression of overexposed areas, simultaneously preserves detail sharpness and highlight protection. The enhancement of the reflection component, modulated pixel-by-pixel by structural coherence, balances texture recovery in shadow areas with noise control. Combined with edge-preserving detail re-injection and brightness ratio-saturation linkage modulation before compositing, details in dark areas suppressed by illumination normalization are adaptively recovered, and brightness correction and color representation maintain physical consistency. The corrected inspection image is uniform, texture-preserving, and color-neutral.

[0043] Regarding scale-related parameters: the low-pass scale in step S3 The resolution is 20-60 pixels because the spatial scale of the bright spots formed by underwater supplementary lights is typically on the order of tens of pixels. The scale should be comparable to the bright spot scale; if it is too small, the lighting field will be mixed with the component texture, and coarse correction will mistakenly treat the component edges as lighting undulations and flatten them; if it is too large, the bright spot outline cannot be fully estimated, and vignetting will remain. (Logarithmic domain low-pass scale in step S5) Using pixels ranging from 10 to 60, the spatial scale of the residual illumination after coarse correction is tracked: the residual bright spots are smaller and more fragmented than the original bright spots, therefore... Usually not greater than The structure remains smooth. The value is set to 0.2 to 2 to balance the degree of fit between the illumination field and the observed brightness and the overall smoothness. Use a value of 0.5 to 2 to control the steepness of the smoothing weight's fall back at the component edges; the sharper the edges, the better. It should be larger.

[0044] Regarding amplitude parameters: illumination compression factor The value should be between 0.5 and 0.9. The stronger the residual brightness fluctuations, the smaller the value should be. A value that is too small will flatten the true brightness and darkness of the components themselves, resulting in a grayish image; Reflection Enhancement Coefficient A value of 1.1 to 1.5 is appropriate for texture restoration requirements; a value higher than this will amplify grain noise. Overexposure soft compression threshold. A value of 0.85–0.95 is used, positioned at the lower edge of the overexposed area in the center of the fill light; a lower value will cause premature compression that encroaches on the normal bright area, while a higher value will prevent the overexposed white spots from being suppressed. Detailed re-injection intensity. A value of 0.2 to 0.8 corresponds to the degree to which details in shadow areas are suppressed; saturation correlation index Use a value of 0.3 to 0.7 to control the amplitude of color correction linkage with brightness. Use a smaller value for metal parts where high color fidelity is required.

[0045] The implementation methods of each step can be replaced as needed without changing the complementary inventive concept of the two stages: the low-pass filtering in step S3 can be replaced by Gaussian low-pass, mean filtering, or guided filtering, or replaced by structure-preserving smoothing; the multi-scale decomposition in step S5 takes 2 to 3 scales; the edge-preserving filtering for detail back-injection can be replaced by guided filtering and bilateral filtering. The two-stage correction of this invention can also be used independently for underwater lighting scenarios, and the specific methods of downstream descattering and contrast enhancement do not affect the implementation of this invention.

[0046] Example 2 like Figure 2 As shown, taking a frame from a cross-sea pipeline inspection video as an example: the image resolution is 1920×1080, the center of the image shows a DN series flange and bolts evenly distributed around its circumference, and the upper right corner has a noticeable bright spot due to LED supplementary lighting at the camera end. This is processed according to the two-stage correction steps of this invention.

[0047] The frame is read and bit-deep normalized to [0,1]. Isolated spots are removed using a 3×3 median filter to obtain the image to be processed. It is then converted from RGB to HSV, with the V channel used for processing, while the H and S components are temporarily stored. A Gaussian low-pass filter is applied to the V channel. (corresponding to the spatial scale of the supplementary bright spot), thus obtaining the low-frequency illumination field. Illumination estimation can also replace structural smoothing. , This ensures that the light field does not cross the flange edge. Multiplicative normalization ( (When the lower limit is close to 0, the brightness is truncated) to eliminate dark corners and bright spots caused by supplementary lighting, resulting in a coarsely corrected brightness map.

[0048] After coarse correction, the brightness undergoes downstream descattering and contrast enhancement before entering the second stage of fine correction: adjusting the current brightness map. Take the logarithm for large-scale low-pass ( Pixels (corresponding to the residual illumination scale) are used to separate illumination in the logarithmic domain. With reflection With light compression coefficient Compressed illumination, using reflection enhancement coefficient After enhancing reflection and restoring the exponential curve, fine correction is performed on residual bright spots / dark areas that reappear after coarse normalization due to scattering removal and contrast enhancement, resulting in a corrected brightness map. Fine-tuning is implemented in a multi-scale manner across two to three scales, and for values ​​above a threshold... The overexposed areas are subjected to tanh soft compression; when the grain noise in the shadow areas is significant, the reflection enhancement coefficient is modulated pixel-by-pixel according to structural coherence. The directional textures such as threads and cables are fully enhanced, and the flat and murky areas automatically recede.

[0049] Before synthesizing the output, perform detail back-injection: use a guided filter (radius 8) to decompose the V component before coarse correction into a base layer and a detail layer. ,according to ( Add the detail layer back to the two-level corrected luminance map, and recover the suppressed spiral texture in the fill light shadow area; then replace the original V channel with the corrected luminance and convert it back to RGB (or modulate the original RGB to preserve hue using luminance ratio), and adjust the saturation as needed. ( The system performs linkage modulation and outputs inspection images that have undergone two levels of illumination correction.

[0050] Example 3 When deploying the system, such as Figure 3 As shown, taking the ROV inspection computing box as an example, the two-level illumination correction of the present invention is implemented as an embedded module and connected to the complete clarity link: the illumination estimation module executes step S3, the coarse correction module executes step S4, and the homomorphic fine correction module executes step S5. Each module transfers data with high-speed cache or DMA, the calculation is lightweight, and it can be processed in real time on the embedded inspection device.

[0051] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A two-stage correction method for non-uniform illumination of underwater turbid environment inspection images, characterized in that, Includes the following steps: S1 acquires the original images of industrial components collected by the underwater inspection equipment in turbid water. The original images are then subjected to bit depth normalization and light pre-denoising to obtain the RGB image to be processed. S2, convert the RGB image to be processed to HSV or Lab color space, separate the independent luminance component and chrominance component, and save the chrominance component for final synthesis; S3, perform large-scale low-pass estimation on the brightness component to obtain the first non-uniform illumination component characterizing the overall brightness fluctuation caused by artificial lighting; S4, the first non-uniform illumination component is used to multiplicatively normalize the brightness component to complete the first-level coarse correction and obtain the coarse correction brightness map to eliminate the overall dark corners and bright spots caused by the supplementary light. S5, perform the second level of fine correction on the current luminance map: convert the current luminance map to the logarithmic domain, separate the residual illumination component and the reflection component through low-pass filtering, compress the residual illumination component and enhance the reflection component, and then return to the luminance domain through exponential transformation to obtain the finely corrected luminance map. The current brightness map is the coarsely corrected brightness map output in step S4, or the image after the coarsely corrected brightness map has been processed by descattering and contrast enhancement. S6, the finely corrected luminance component is recombined with the chromaticity component saved in step S2 to output an underwater industrial inspection image corrected by two levels of non-uniform illumination.

2. The two-stage correction method for non-uniform illumination in underwater turbid environment inspection images according to claim 1, characterized in that: In step S3, the first non-uniform illumination component is estimated using a structure-preserving smoothing method: the illumination component is solved by minimizing the energy functional containing data terms and smoothing terms, wherein the weight of the smoothing term decreases as the brightness gradient increases, so that the resulting illumination field is smooth overall and does not cross the edge of the industrial component.

3. The two-stage correction method for non-uniform illumination in underwater turbid environment inspection images according to claim 1, characterized in that: In step S5, the current brightness map in the logarithmic domain is decomposed into multi-scale components by bandpass operators of multiple scales, and differential enhancement coefficients are applied to the reflection components of different scales. The enhancement coefficient of the finer scale corresponding to the detail texture is not less than the enhancement coefficient of the coarser scale corresponding to the overall illumination.

4. The two-stage correction method for non-uniform illumination in underwater turbid environment inspection images according to claim 1, characterized in that: In step S5, for areas where the corrected brightness value is higher than the preset overexposure threshold, a smoothing function is used for soft compression processing to smoothly reduce the overexposure brightness of the fill light center and avoid grayscale discontinuity in the highlight area.

5. The two-stage correction method for non-uniform illumination in underwater turbid environment inspection images according to claim 1, characterized in that: In step S5, the local structural coherence is calculated based on the local structural tensor eigenvalues ​​of the current brightness map, and the reflection enhancement coefficient is spatially adjusted according to the structural coherence. Industrial components with directional textures exhibit high regional structural coherence, resulting in an improved reflection enhancement coefficient. Flat, turbid regions exhibit low structural coherence, resulting in a decrease in the reflection enhancement coefficient.

6. The two-stage correction method for non-uniform illumination in underwater turbid environment inspection images according to claim 1, characterized in that: Before step S6, a detailed back-injection step is also performed: Edge-preserving filtering is used to decompose the luminance components before coarse correction in step S4 into a base layer and a detail layer. The detail layer is then superimposed onto the two-level corrected luminance map according to the back-injection coefficient that adapts to the local illumination intensity. The lower the local illumination intensity, the larger the detail back-injection coefficient.

7. The two-stage correction method for non-uniform illumination in underwater turbid environment inspection images according to claim 1, characterized in that: In step S6, when compositing the image, the color saturation components are proportionally linked and modulated according to the brightness comparison before and after correction: the saturation of underexposed areas with increased brightness after correction is moderately increased, and the saturation of overexposed highlight areas with decreased brightness after correction naturally decreases.

8. The two-stage correction method for non-uniform illumination in underwater turbid environment inspection images according to claim 1, characterized in that: In step S3, the filtering scale for large-scale low-pass estimation is 20-60 pixels; In step S5, the scale of the logarithmic domain low-pass filter is 10-60 pixels, and is not greater than the low-pass estimation scale in step S3. In step S5, the compression factor of the residual illumination component is 0.5-0.9, and the enhancement factor of the reflection component is 1.1-1.5.