An image halo suppression method based on double adaptive factors and region positioning
By using a method based on dual adaptive factors and region localization, local gamma values are generated using brightness and contrast adaptive factors. Combined with joint smoothing weights and gradient direction consistency algorithms, halos are accurately located and suppressed. This solves the problems of accidental deletion of light sources, color cast, and large computational load in existing halo suppression methods, achieving efficient and artifact-free halo suppression.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHENSHENZHI WEILAICO LTD
- Filing Date
- 2026-06-05
- Publication Date
- 2026-07-14
AI Technical Summary
Existing halo suppression methods are prone to accidentally deleting key light sources, causing image color casts and artifacts, requiring large amounts of computation and having low inference efficiency. They cannot accurately suppress halos and are prone to halo diffusion.
A method based on dual adaptive factors and region localization is adopted. Local adaptive gamma values are generated by brightness and contrast adaptive factors. Combined with joint smoothing weights, gradient direction consistency and local binary mode algorithm, the halo region is accurately located. The halo is suppressed by using spatial constraint weights for quadratic linear interpolation.
It achieves precise positioning and efficient suppression of halo areas, fully preserves key light sources and image colors, reduces computational overhead, improves operating efficiency, and avoids halo diffusion and artifacts.
Smart Images

Figure CN122391048A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically to an image halo suppression method based on dual adaptive factors and region localization. Background Technology
[0002] In complex nighttime lighting environments, vehicle headlights, streetlights, and various artificial high-intensity light sources, after being scattered by the medium, easily produce bright halos or radial spots in images. This phenomenon leads to localized overexposure, loss of detail, reduced contrast, and blurred object edges, severely impacting the accuracy and reliability of nighttime surveillance, autonomous driving perception, and target recognition systems. Therefore, researching methods to suppress halos can provide clearer, more informative images for various vision applications, effectively improving the accuracy of subsequent visual model detection and recognition. It can also enhance the reliability and effectiveness of systems in fields such as security and transportation.
[0003] Currently, the mainstream halo suppression methods can be divided into three main categories.
[0004] One type is the end-to-end training method based on deep learning, which includes supervised and unsupervised learning. The former relies on paired "halo-no-halo" data for model training, while the latter uses unpaired halo-no-halo images for adversarial training to achieve the effects of light effect suppression and dark area enhancement. This type of method can achieve batch processing from halo image input to halo-suppressed image output.
[0005] The second type of method is based on the physical principles of optical imaging. It establishes an atmospheric point spread function model to model the halo formation process of nighttime images and restores the clear scene from the image through dehazing techniques such as dark channel prior.
[0006] The third category is general image enhancement algorithms, such as traditional local gamma correction methods. This method is not designed for halo removal tasks. It usually analyzes the local brightness characteristics of the image and adaptively adjusts the gamma value to improve local contrast and enhance the visual effect of the image. It is often used for high dynamic range (HDR) compression.
[0007] However, supervised end-to-end training methods based on deep learning heavily rely on high-quality paired datasets, but halo images of real-world scenes are difficult to acquire, while synthetic data lacks realism. This results in poor model generalization ability and easily leads to the removal of key real light sources such as streetlights and car lights, thus destroying the semantic information of the images.
[0008] Unsupervised light effect suppression methods based on deep learning are not specifically designed for halo features. When suppressing light effects and enhancing dark areas, the lack of accurate stripping of the physical properties of the halo layer can easily lead to overall color cast and artifacts in the image while suppressing light effects.
[0009] The physical principle-based method models the generation mechanism of real halos, and the theoretical derivation is rigorous. However, it usually involves a complex iterative solution process, which is computationally intensive, time-consuming, and has low inference efficiency.
[0010] Traditional local gamma correction methods are mainly aimed at general contrast enhancement and lack mechanisms for identifying and suppressing halo distribution characteristics. If applied directly to halo scenes, there will be no obvious halo suppression effect, and it may even mistakenly enhance the brightness of the halo edge as the area to be enhanced, resulting in the negative effect of "halo diffusion".
[0011] Therefore, how to provide an image halo suppression method based on dual adaptive factors and region localization that can accurately locate the halo region, efficiently suppress the halo and avoid halo diffusion, retain the key light source without deleting the image color and semantic information, have low computational overhead and high operating efficiency, and process smooth boundaries without artifacts and visual distortion is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0012] In view of this, the present invention provides an image halo suppression method based on dual adaptive factors and region localization. It aims to address the technical pain points of existing halo suppression methods, such as accidental deletion of key light sources, causing image color casts and artifacts, high computational cost and low inference efficiency, inability to accurately suppress halos, and easy generation of halo diffusion. The invention achieves precise localization and efficient suppression of halo regions, fully preserving key light sources, image color, and semantic information, significantly reducing computational overhead and improving operational efficiency, while ensuring smooth transitions at the processing region boundaries without artifacts or visual distortion.
[0013] To achieve the above objectives, the present invention adopts the following technical solution: An image halo suppression method based on dual adaptive factors and region localization includes: Step 1: Generate a local adaptive gamma value based on the brightness and contrast adaptive factors, and use joint smoothing weights to perform linear interpolation between the local adaptive gamma value and the original gamma adjustment value to obtain the local gamma adjustment value for the halo feature; wherein, the joint smoothing weights are constructed based on the brightness and contrast activation functions; Step 2: Use gradient direction consistency and local binary mode algorithms to distinguish halo regions from local gradient direction and micro-texture respectively, and obtain gradient direction consistency index and local texture variability index to construct the final halo discrimination index. Step 3: Based on the distance of each pixel to the nearest halo region and the preset maximum radius, calculate the normalized spatial constraint weights, and use the spatial constraint weights to perform quadratic linear interpolation on the local gamma adjustment value and the original gamma adjustment value. Based on the quadratic linear interpolation result, suppress the image halo.
[0014] Optionally, in step 1, the calculation method for the brightness and contrast adaptive factors is as follows: The Gaussian blur function is used to calculate the local average brightness and local contrast of each pixel in a grayscale image, as follows:
[0015] Normalization:
[0016] in, It is a Gaussian blur function; In pixels; This represents the local average brightness. For local contrast; Based on a quadratic function, a brightness adaptive factor is constructed as follows: Within the preset brightness range Internally, a quadratic function is used to set the brightness adaptive factor. This makes the specified brightness range Inside, ;
[0017] in, To adjust the intensity; Based on the maximum value function, a contrast adaptive factor is constructed as follows: Use the maximum value function to set the contrast adaptive factor. This makes the specified low contrast range Inside, ; .
[0018] Optionally, in step 1, a local adaptive gamma value is generated based on the brightness and contrast adaptive factors, as follows:
[0019] in, For locally adaptive gamma values; This is the original gamma adjustment value; This is the brightness adaptive factor; This is the contrast adaptive factor.
[0020] Optionally, in step 1, the calculation method for the joint smoothing weights is as follows: First, determine the brightness range. Normalized mapping, defining normalized variables This ensures that the distribution of weights remains consistent regardless of how wide or narrow the set brightness range is.
[0021] in, To ensure the truncation operation ; This represents the local average brightness. Set brightness activation function The weights converge to 0 when the light source is close to the upper and lower limits of the interval, preventing suppression of the light source or loss of background dark details. The algorithm's maximum correction force is concentrated in the middle brightness region, as follows:
[0022] Set the contrast activation function ,as follows:
[0023] in, For local contrast; Obtain joint smoothing weights ,as follows: .
[0024] Optionally, in step 1, a linear interpolation is performed between the local adaptive gamma value and the original gamma adjustment value using joint smoothing weights to obtain the local gamma adjustment value for the halo features, as follows:
[0025] in, This refers to the local gamma adjustment value for halo characteristics; For joint smoothing weights; This is the original gamma adjustment value; This is a locally adaptive gamma value.
[0026] Optionally, in step 2, the halo region is distinguished from the local gradient direction using a gradient direction consistency algorithm to obtain a gradient direction consistency index, specifically: The image is divided into blocks, and each pixel is processed. Calculate its horizontal gradient using the Sobel operator. and vertical gradient ,as follows:
[0027] Obtain the gradient direction angle ,as follows:
[0028] Mapping the angle onto the unit circle, as follows:
[0029] The average vector length within the image patch is calculated as an indicator of gradient direction consistency, as follows:
[0030] in, As a gradient direction consistency index, The closer to 0, the more consistent the directions. The closer it is to 1, the more chaotic the directions are; This represents the number of valid pixels within the image block.
[0031] Optionally, in step 2, the halo region is distinguished from the micro-texture using the local binary pattern algorithm to obtain the local texture variability index, specifically: The local binary pattern algorithm is used to encode the image blocks obtained after block processing, and the number of different equivalent patterns appearing in the image blocks is counted. The local texture variability index is obtained by normalization, as follows:
[0032] in, The number of samples in the neighborhood; As a local texture variability index, the halo region is usually very smooth, and the local binary encoding pattern is uniform. The brightness is very low, while other objects, even those with higher brightness, exhibit rich microscopic coding patterns. Relatively high.
[0033] Optionally, in step 2, based on the gradient direction consistency index and the local texture variability index, the final halo differentiation index is constructed as follows:
[0034] in, For the final halo differentiation index, when the gradient direction is highly consistent or the texture pattern is uniform, If the value approaches 0, the area is considered a suspected halo area; otherwise, it is considered a normal texture area. This is a gradient direction consistency index; This is an index of local texture variability.
[0035] Optionally, in step 3, based on the distance of each pixel to the nearest halo region and the preset maximum radius, a normalized spatial constraint weight is calculated, specifically as follows:
[0036] in, For normalized spatial constraint weights, when a pixel is in the halo region, The adjustment is entirely based on algorithms; when a pixel is in the neighborhood of the halo region... The pixel decays linearly from 1 to 0 to achieve an edge transition; when the pixel is located in the distant background... It does not use any algorithmic adjustment; For truncation operation; The distance from each pixel to the nearest halo region; This is the preset maximum radius.
[0037] Optionally, in step 3, quadratic linear interpolation is performed on the local gamma adjustment value and the original gamma adjustment value using spatial constraint weights. Image halo suppression is then based on the quadratic linear interpolation result. Specifically: Quadratic linear interpolation is performed on the local gamma adjustment value and the original gamma adjustment value using spatial constraint weights, and numerical stability constraints are applied as follows:
[0038] in, This is the result of quadratic linear interpolation; For truncation operation; This is a local gamma adjustment value; For spatial constraint weights; Extract the normalized luminance of the Y channel in the YUV color space. A nonlinear mapping is performed based on the quadratic linear interpolation results, as follows:
[0039] in, The corrected Y channel luminance value; merge Combined with the original U and V components, the final image after halo suppression is obtained.
[0040] As can be seen from the above technical solution, compared with the prior art, the present invention discloses an image halo suppression method based on dual adaptive factors and region localization, which achieves the following beneficial effects: (1) In view of the distribution characteristics of "large brightness range and low contrast" in halo regions, this invention differs from the traditional general gamma algorithm by constructing a brightness adaptive factor based on a quadratic function and a contrast adaptive factor based on a maximum value function. Through the coupling of these two factors, a local adaptive gamma adjustment formula for halo is generated. This formula achieves accurate response and efficient darkening of low-contrast halo regions within a reasonable brightness range, effectively avoiding the "halo diffusion" phenomenon caused by erroneous enhancement.
[0041] (2) To address the shortcomings of deep learning models, such as the tendency to accidentally delete key light sources (e.g., car lights, streetlights) and the tendency for image color distortion to occur during light effect suppression, this invention utilizes two features—local brightness gradient direction and local texture change pattern—for joint analysis. This strategy analyzes the image from two dimensions: brightness features and geometric features, achieving precise delineation of the halo region and ensuring that the algorithm only processes the located halo region, while the color and brightness of non-halo regions of the image remain unaffected.
[0042] (3) Based on the above gamma adjustment mechanism, a joint weight is established by constructing a dual activation function of brightness and contrast to ensure that when the image features gradually deviate from the preset halo range, the adjustment intensity also transitions to 0 synchronously and smoothly, eliminating artifacts and visual distortions that may be generated at the processing boundary.
[0043] (4) This invention is based entirely on mathematical analytical formulas, which eliminates the need for collecting massive amounts of data for time-consuming deep learning model training and avoids the complex iterative solution process in physical models. Under the premise of accurately locating the halo without eliminating the light source, it greatly reduces the computational overhead and improves the operating efficiency. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0045] Figure 1 This is a schematic diagram of the method flow provided by the present invention. Detailed Implementation
[0046] 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.
[0047] Example 1: Embodiment 1 of this invention discloses an image halo suppression method based on dual adaptive factors and region localization, such as... Figure 1 As shown, it includes: Step 1: Generate a local adaptive gamma value based on the brightness and contrast adaptive factors, and use joint smoothing weights to perform linear interpolation between the local adaptive gamma value and the original gamma adjustment value to obtain the local gamma adjustment value for the halo feature; wherein, the joint smoothing weights are constructed based on the brightness and contrast activation functions.
[0048] The calculation method for brightness and contrast adaptive factors is as follows: The Gaussian blur function is used to calculate the local average brightness and local contrast of each pixel in a grayscale image, as follows:
[0049] Normalization:
[0050] in, It is a Gaussian blur function; In pixels; This represents the local average brightness. For local contrast; It should be noted that the method of obtaining the local average brightness and local contrast of pixels in this invention is not limited to the Gaussian blur function, but can be replaced by other functions, such as mean filtering, variance filtering, etc.
[0051] Based on a quadratic function, a brightness adaptive factor is constructed as follows: Within the preset brightness range Internal (the parameters set in this invention are) , A quadratic function is used to set the brightness adaptive factor. This makes the specified brightness range Inside, ;
[0052] in, To adjust the intensity (the present invention takes) =1.25); It should be noted that the method of constructing the brightness adaptive factor in this invention is not limited to a quadratic function, but can also be replaced by a cubic function, a piecewise linear function, or a lookup table mapping method, etc.
[0053] Based on the maximum value function, a contrast adaptive factor is constructed as follows: Use the maximum value function to set the contrast adaptive factor. This makes the specified low contrast range (This invention takes) =0.2), ; .
[0054] It should be noted that the method of constructing the contrast adaptive factor in this invention is not limited to the maximum value function, and can also be replaced by other nonlinear mapping functions.
[0055] Local adaptive gamma values are generated based on brightness and contrast adaptive factors, as follows:
[0056] in, For locally adaptive gamma values; The original gamma adjustment value (taken in this invention) =1); This is the brightness adaptive factor; This is the contrast adaptive factor.
[0057] Adaptive local gamma correction is a traditional algorithm that applies different gamma values to different regions of an image based on its local characteristics, thereby improving the image's visual quality. Traditional local gamma correction methods are often used for high dynamic range compression and lack specificity for halo suppression. This invention builds upon this by utilizing the characteristics of halo regions to accurately calculate local gamma values, achieving the goal of halo suppression.
[0058] The calculation method for the joint smoothing weights is as follows: To achieve a smooth transition between the halo area and the non-halo area after adjustment, a brightness activation function is set. and contrast activation function Then construct joint weights First, determine the brightness range. Normalized mapping, defining normalized variables This ensures that the distribution of weights remains consistent regardless of how wide or narrow the set brightness range is.
[0059] in, To ensure the truncation operation ; This represents the local average brightness. Set brightness activation function The weights converge to 0 when the light source approaches the upper limit (e.g., the edge of a saturated light source) and the lower limit (e.g., the background area), preventing suppression of the light source or loss of background dark details. The algorithm's maximum correction force is concentrated in the intermediate brightness area, as follows:
[0060] Set the contrast activation function ,as follows:
[0061] in, For local contrast; Obtain joint smoothing weights ,as follows: .
[0062] By using joint smoothing weights to perform linear interpolation between the local adaptive gamma value and the original gamma adjustment value, the pixel value change from the halo region to the background region is gradual, resulting in a local gamma adjustment value tailored to the halo feature, as follows:
[0063] in, This refers to the local gamma adjustment value for halo characteristics; For joint smoothing weights; This is the original gamma adjustment value; This is a locally adaptive gamma value.
[0064] The linear interpolation here is for numerical continuity, to prevent numerical discontinuities, such as a point with a brightness of 0.8 being darkened, while a point with a brightness of 0.81 is not darkened.
[0065] Step 2: Use gradient direction consistency and local binary mode algorithms to distinguish the halo region from the local gradient direction and micro-texture respectively, and obtain the gradient direction consistency index and local texture variability index to construct the final halo discrimination index and further locate the halo region.
[0066] A halo region typically exhibits a smooth, gradual gradient spreading outwards from the center of the light source, with a high degree of consistency in its local gradient direction; while the gradient directions of other background regions (such as walls and fabrics) show random characteristics. Based on this, a gradient direction consistency algorithm is used to distinguish halo regions from local gradient directions, resulting in a gradient direction consistency index, specifically: The image is divided into patches, and each pixel is processed. Calculate its horizontal gradient using the Sobel operator. and vertical gradient ,as follows:
[0067] Obtain the gradient direction angle ,as follows:
[0068] To avoid statistical errors caused by angular periodicity (e.g.) and (Even with large numerical differences but the same physical direction), the angles are mapped onto the unit circle as follows:
[0069] The average vector length within an image patch is calculated as an indicator of gradient direction consistency, as follows:
[0070] in, As a gradient direction consistency index, The closer to 0, the more consistent the directions, similar to a halo effect. The closer it is to 1, the more chaotic the direction; this indicator approaches 0 in the halo region. This represents the number of valid pixels within the image block.
[0071] Besides the difference in brightness gradient, the micro-texture of the halo region is relatively smooth, less detailed than the micro-texture of the background scene. The Local Binary Pattern (LBP) algorithm is used to distinguish the halo region based on its micro-texture, yielding a local texture variability index, specifically: Local Binary Patterns (LCBs) are lightweight features used to describe the local texture of an image. They encode each neighborhood as a binary number by comparing the grayscale values of the center pixel with those of its neighbors. This binary number acts as a local texture descriptor, representing the spatial structure of the texture.
[0072] The local binary pattern algorithm is used to encode the image blocks obtained after block processing, and the number of different equivalent patterns appearing in the image blocks is counted. The local texture variability index is obtained by normalization, as follows:
[0073] LBP is an effective method for measuring the microstructure of images. The number of samples in the neighborhood (as in this invention) ); As a local texture variability index, the halo region is usually very smooth, and the local binary encoding pattern is uniform. The brightness is very low, while other objects (such as ground textures), even with higher brightness, exhibit rich microscopic coding patterns. Relatively high.
[0074] Based on the gradient direction consistency index and the local texture variability index, the final halo differentiation index is constructed as follows:
[0075] in, For the final halo differentiation index, when the gradient direction is highly consistent or the texture pattern is uniform, If the value approaches 0, the area is considered a suspected halo area; otherwise, it is considered a normal texture area. This is a gradient direction consistency index; This is an index of local texture variability.
[0076] Step 3: Based on the distance of each pixel to the nearest halo region and the preset maximum radius, calculate the normalized spatial constraint weights, and use the spatial constraint weights to perform quadratic linear interpolation on the local gamma adjustment value and the original gamma adjustment value. Based on the quadratic linear interpolation result, suppress the image halo.
[0077] To eliminate noise in the texture scoring map, the final halo discrimination index is first... Gaussian smoothing is obtained Then set a low texture threshold. (This invention takes) When the texture score is below a certain threshold, it is identified as a halo feature region, and a binary mask is generated accordingly. ,as follows: The area is the halo region that needs to be darkened by gamma. Using the Euclidean distance transformation algorithm, the distance from each pixel to the nearest halo region is calculated. When the pixel is located inside the halo region, When the pixel is located in a non-halo area, The value is the Euclidean distance of the point from the edge of the halo region.
[0078] Based on the distance of each pixel to the nearest halo region and the preset maximum radius, the normalized spatial constraint weights are calculated as follows:
[0079] in, For normalized spatial constraint weights, when a pixel is in the halo region, The adjustment is entirely based on algorithms; when a pixel is in the neighborhood of the halo region... The pixel decays linearly from 1 to 0 to achieve an edge transition; when the pixel is located in the distant background... It does not use any algorithmic adjustment; For truncation operation; The distance from each pixel to the nearest halo region; The preset maximum radius (in this invention, it is taken as...) ).
[0080] It should be noted that the Euclidean distance transformation algorithm used to calculate spatial constraint weights in this invention can also be replaced by other distance calculation methods, such as morphological dilation operations.
[0081] A quadratic linear interpolation is performed on the local gamma adjustment value and the original gamma adjustment value using spatial constraint weights. Image halo suppression is then based on the quadratic linear interpolation result. Specifically: Quadratic linear interpolation is performed on the local gamma adjustment value and the original gamma adjustment value using spatial constraint weights, and numerical stability constraints are applied as follows:
[0082] in, This is the result of quadratic linear interpolation; For truncation operation; This is a local gamma adjustment value; For spatial constraint weights; This linear interpolation ensures that there are no abrupt edges at the spatial boundary between the halo area and the background area, thus guaranteeing the naturalness of visual perception.
[0083] To preserve chromaticity information, the normalized luminance of the Y channel in the YUV color space is extracted. A nonlinear mapping is performed based on the quadratic linear interpolation results, as follows:
[0084] in, The corrected Y channel luminance value; merge Combined with the original U and V components, the final image after halo suppression is obtained.
[0085] It should be noted that this invention selects the Y channel in the YUV color space for processing, but it is also applicable to other color spaces that include a luminance component, such as the L channel of HSL. Similarly, this algorithm can also be applied directly to the three channels in the RGB color space and then weighted and fused.
[0086] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0087] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image halo suppression method based on dual adaptive factors and region localization, characterized in that, include: Step 1: Generate a local adaptive gamma value based on the brightness and contrast adaptive factors, and use joint smoothing weights to perform linear interpolation between the local adaptive gamma value and the original gamma adjustment value to obtain a local gamma adjustment value for the halo feature; wherein, the joint smoothing weights are constructed based on the brightness and contrast activation functions; Step 2: Use gradient direction consistency and local binary mode algorithms to distinguish halo regions from local gradient direction and micro-texture respectively, and obtain gradient direction consistency index and local texture variability index to construct the final halo discrimination index. Step 3: Based on the distance of each pixel to the nearest halo region and the preset maximum radius, calculate the normalized spatial constraint weights, and use the spatial constraint weights to perform quadratic linear interpolation on the local gamma adjustment value and the original gamma adjustment value. Suppress the image halo based on the quadratic linear interpolation result.
2. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 1, the calculation method for the brightness and contrast adaptive factors is as follows: The Gaussian blur function is used to calculate the local average brightness and local contrast of each pixel in a grayscale image, as follows: Normalization: in, It is a Gaussian blur function; In pixels; This represents the local average brightness. For local contrast; Based on a quadratic function, a brightness adaptive factor is constructed as follows: Within the preset brightness range Internally, a quadratic function is used to set the brightness adaptive factor. This makes the specified brightness range Inside, ; in, To adjust the intensity; Based on the maximum value function, a contrast adaptive factor is constructed as follows: Use the maximum value function to set the contrast adaptive factor. This makes the specified low contrast range Inside, ; 。 3. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 1, a local adaptive gamma value is generated based on the brightness and contrast adaptive factors, as follows: in, For locally adaptive gamma values; This is the original gamma adjustment value; This is the brightness adaptive factor; This is the contrast adaptive factor.
4. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 1, the calculation method for the joint smoothing weights is as follows: First, determine the brightness range. Normalized mapping, defining normalized variables This ensures that the distribution of weights remains consistent regardless of how wide or narrow the set brightness range is. in, To ensure the truncation operation ; This represents the local average brightness. Set brightness activation function The weights converge to 0 when the light source is close to the upper and lower limits of the interval, preventing suppression of the light source or loss of background dark details. The algorithm's maximum correction force is concentrated in the middle brightness region, as follows: Set the contrast activation function ,as follows: in, For local contrast; Obtain joint smoothing weights ,as follows: 。 5. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 1, a linear interpolation is performed between the local adaptive gamma value and the original gamma adjustment value using joint smoothing weights to obtain the local gamma adjustment value for the halo feature, as follows: in, This refers to the local gamma adjustment value for halo characteristics; For joint smoothing weights; This is the original gamma adjustment value; This is a locally adaptive gamma value.
6. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 2, the gradient direction consistency algorithm is used to distinguish the halo region from the local gradient direction to obtain the gradient direction consistency index, specifically: The image is divided into blocks, and each pixel is processed. Calculate its horizontal gradient using the Sobel operator. and vertical gradient ,as follows: Obtain the gradient direction angle ,as follows: Mapping the angle onto the unit circle, as follows: The average vector length within the image patch is calculated as an indicator of gradient direction consistency, as follows: in, As a gradient direction consistency index, The closer to 0, the more consistent the directions. The closer it is to 1, the more chaotic the directions are; This represents the number of valid pixels within the image block.
7. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 2, the local binary pattern algorithm is used to distinguish the halo region from the microscopic texture, and the local texture variability index is obtained, specifically: The local binary pattern algorithm is used to encode the image blocks obtained after block processing, and the number of different equivalent patterns appearing in the image blocks is counted. The local texture variability index is obtained by normalization, as follows: in, The number of samples in the neighborhood; As a local texture variability index, the halo region is usually very smooth, and the local binary encoding pattern is uniform. The brightness is very low, while other objects, even those with higher brightness, exhibit rich microscopic coding patterns. Relatively high.
8. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 2, based on the gradient direction consistency index and the local texture variability index, the final halo differentiation index is constructed as follows: in, For the final halo differentiation index, when the gradient direction is highly consistent or the texture pattern is uniform, If the value approaches 0, the area is considered a suspected halo area; otherwise, it is considered a normal texture area. This is a gradient direction consistency index; This is an index of local texture variability.
9. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 3, based on the distance of each pixel to the nearest halo region and the preset maximum radius, the normalized spatial constraint weights are calculated, specifically as follows: in, For normalized spatial constraint weights, when a pixel is in the halo region, The adjustment is entirely based on algorithms; when a pixel is in the neighborhood of the halo region... The pixel decays linearly from 1 to 0 to achieve an edge transition; when the pixel is located in the distant background... It does not use any algorithmic adjustment; For truncation operation; The distance from each pixel to the nearest halo region; This is the preset maximum radius.
10. The image halo suppression method based on dual adaptive factors and region localization according to claim 1, characterized in that, In step 3, the local gamma adjustment value and the original gamma adjustment value are subjected to quadratic linear interpolation using the spatial constraint weights. Image halo is then suppressed based on the quadratic linear interpolation result. Specifically: The local gamma adjustment value and the original gamma adjustment value are subjected to quadratic linear interpolation using the spatial constraint weights, and numerical stability constraints are applied as follows: in, This is the result of quadratic linear interpolation; For truncation operation; This is a local gamma adjustment value; For spatial constraint weights; Extract the normalized luminance of the Y channel in the YUV color space. A nonlinear mapping is performed based on the quadratic linear interpolation results, as follows: in, The corrected Y channel luminance value; merge Combined with the original U and V components, the final image after halo suppression is obtained.