A night vision strong light suppression imaging method for highway scenes

By extracting statistical features of illumination and identifying differential suppression factors, combined with local exposure and infrared illumination control, the problems of low illumination and strong glare in highway nighttime imaging have been solved, achieving stable and efficient imaging results and meeting the needs of nighttime monitoring.

CN121462887BActive Publication Date: 2026-03-31SHANDONG EXPRESSWAY INFORMATION GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-06
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for nighttime environmental imaging on highways suffer from insufficient low-light imaging capabilities, difficulty in suppressing strong glare, and instability of fixed parameters in dynamic scenes, making it difficult to meet the needs of nighttime safety monitoring and vehicle detection.

Method used

By extracting statistical features of illumination and determining the scene, strong light areas are identified and differentiated suppression factors are assigned to achieve automatic switching of imaging modes. Combined with local exposure suppression, halo reduction and infrared fill light control, the brightness and details of dark areas are improved, and the WDR and HLC functions are coordinated.

Benefits of technology

It achieves stable imaging in complex lighting conditions on highways at night, effectively suppresses glare without sacrificing detail, improves low-light imaging capabilities, and ensures clear identification of key information such as vehicle outlines and license plates, meeting the needs of highway monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121462887B_ABST
    Figure CN121462887B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of complex illumination scene adaptive control, and particularly relates to a night vision strong light suppression imaging method for highway scenes. The method completes scene preliminary judgment through illumination statistical feature extraction, identifies strong light regions and extracts connected domain features, assigns differentiated suppression intensity factors based on light source types, automatically switches imaging modes, combines local exposure suppression, halo weakening, night vision enhancement, and infrared light supplementing with exposure closed-loop control, and realizes precise suppression of strong light glare, dark detail improvement, and dynamic stability of image brightness. The present application solves the problems of insufficient low-illumination imaging, difficulty in suppressing strong light, and unstable fixed parameters in the prior art, and is suitable for complex illumination scenes at night on highways, ensuring clear key information such as vehicle outlines and license plates, and meeting the needs of night safety monitoring and vehicle detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of adaptive control technology for complex lighting scenes, and particularly relates to a night vision strong light suppression imaging method for highway scenes. Background Technology

[0002] Nighttime environmental imaging on highways is a typical complex scenario characterized by high dynamics, strong contrast, rapid changes, and numerous interferences. Factors such as sudden changes in illumination caused by high-speed vehicle travel, large differences in the brightness of high and low beam headlights, significant differences in the light patterns of different vehicle lights, high reflectivity of reflective markings, and alternating periods of strong and dark light at tunnel entrances and exits collectively make night vision imaging one of the most challenging sub-problems in intelligent transportation systems.

[0003] Existing technologies have significant limitations, specifically as follows:

[0004] (1) Insufficient low-light imaging capability:

[0005] On highways with no or weak lighting, traditional cameras suffer from increased noise in dark areas and insufficient grayscale levels, making it impossible to reliably image distant targets.

[0006] (2) Strong light glare is difficult to suppress:

[0007] The bright areas produced by vehicle headlights, high beams, high-mounted brake lights, etc., are extremely intense and can easily form saturated light spots, trailing halos, and flare diffusion in the image, which seriously affects target recognition.

[0008] (3) Fixed-parameter ISPs exhibit unstable performance in dynamic scenarios:

[0009] Existing cameras generally use fixed exposure, gain, and wide dynamic range parameters. Once the distance, brightness, or direction of the vehicle's headlights changes, these devices cannot respond in real time, resulting in inconsistent brightness, blacked-out night vision images, or uncontrollable strong light.

[0010] (4) The traditional use of WDR and HLC lacks coordination:

[0011] Wide Dynamic Range (WDR) improves the overall dynamic range, but can cause the image to appear grayish in areas with strong noise; High Light Suppression (HLC) can suppress bright areas, but sacrifices detail in dark areas. Traditional devices cannot intelligently switch between and dynamically adjust between the two.

[0012] To address the above issues, existing technologies generally cannot simultaneously adapt to "near-range strong light, long-range vehicle headlights, rapidly changing lighting, and extremely low-light environments" in highway scenarios, making it difficult to meet the requirements of modern highways for nighttime safety monitoring, vehicle detection, and event recognition. Therefore, it is necessary to propose a night vision strong light suppression imaging device and method that can quickly adapt to strong and weak light in highway scenarios and possess high dynamic imaging capabilities in low-light environments. Summary of the Invention

[0013] In view of the technical problems existing in the background art, the present invention proposes a night vision strong light suppression imaging method for highway scenarios.

[0014] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:

[0015] S1. Lighting statistical feature extraction and preliminary scene determination: After the camera captures the current frame image, the ISP performs overall brightness statistics on the frame image, calculates the average gray value, gray median, proportion of bright pixels and maximum pixel brightness, reads the current frame exposure time and compares it with the upper limit of exposure, and determines the current scene as a candidate for normal lighting scene, low light scene, or strong light scene based on the above statistical features.

[0016] S2. Strong light region identification and connected component feature extraction: When the scene is a candidate for a strong light scene, the pixels with gray values ​​higher than the high brightness threshold are binarized to obtain a high brightness region mask. The strong light region is divided by region growing and connected component analysis methods. The number of pixels, equivalent diffusion radius, peak brightness and brightness gradient distribution of each strong light region are statistically analyzed.

[0017] S3. Vehicle Light Type Identification and Differential Suppression Intensity Factor Determination: Based on the area, diffusion radius, peak brightness, brightness gradient distribution and continuous frame stability characteristics of the strong light region, the light source type is identified, and a differential suppression intensity factor positively correlated with the glare level of the vehicle light is assigned to each strong light region.

[0018] S4. Automatic switching of imaging mode: Based on the initial scene judgment results and the illumination statistics of multiple consecutive frames, it automatically switches between normal mode, night vision mode and strong light suppression mode. Normal mode adopts standard exposure and adjustment strategy, night vision mode increases gain, extends exposure and increases gamma enhancement, and strong light suppression mode enables local exposure suppression algorithm.

[0019] S5. Local exposure suppression and image brightness equalization: In strong light suppression mode, the Euclidean distance from the pixel to the center is calculated with the geometric center of the strong light area as the reference point. An exponential local exposure suppression weight function is constructed by combining the equivalent diffusion radius and the differential suppression intensity factor to perform nonlinear mapping on the pixel brightness, thereby achieving compression of the strong light area, linear maintenance of the intermediate brightness range, and stretching of the low brightness range.

[0020] S6. Halo reduction and edge detail restoration: Calculate the pixel brightness gradient magnitude based on the brightness gradient distribution of the strong light area, construct the halo reduction weight and adjust the pixel brightness, perform halo reduction on the edge of the strong light area, and perform edge detail restoration on key structural areas such as vehicle outline and license plate characters.

[0021] S7. Night Vision Enhancement Processing: Based on the global brightness statistics, the target area for night vision enhancement is divided, a night vision gain coefficient is applied to the target area, noise is suppressed by a gradient-driven noise suppression factor, and adaptive gamma correction is applied to improve the brightness and detail in dark areas.

[0022] S8. Infrared illumination and exposure closed-loop control: Read the current frame exposure time, calculate the global average brightness of the enhanced image, and dynamically adjust the infrared illumination intensity and exposure time based on the target brightness value and the current brightness error to achieve dynamic stability of image brightness.

[0023] Step S7 involves dividing the night vision enhancement target area based on global brightness statistics, applying a night vision gain coefficient to the target area, suppressing noise using a gradient-driven noise suppression factor, and applying adaptive gamma correction to enhance brightness and detail in dark areas, including:

[0024] S71. Based on the global brightness statistics, obtain the average brightness of the current frame. And the brightness will be lower than the preset night vision enhancement threshold. The pixels are divided into night vision enhancement target areas;

[0025] S72. For any pixel (x, y) in the image, if its brightness... satisfy: Then, for pixels in the night vision enhancement target area, a night vision gain coefficient is applied to them: ,in, This represents the night vision gain factor. This refers to the pixel brightness after night vision enhancement.

[0026] S73. Apply spatial neighborhood-based consistency constraints to the gained image to construct a noise suppression factor: ,in, This is the noise suppression coefficient. This represents the gradient magnitude of the pixel brightness after gain.

[0027] S74. Night vision enhancement brightness is obtained by suppressing noise using a noise suppression factor: ; and on Adaptive gamma correction is performed to further conform to the human eye's perception of brightness in dark areas, resulting in the image pixel brightness: ,in is the gamma coefficient.

[0028] Preferably, in step S1, the ISP performs overall brightness statistics on the frame image, calculates the average grayscale value, median grayscale value, proportion of bright pixels, and maximum pixel brightness, reads the current frame exposure time and compares it with the exposure limit, and determines the current scene as a candidate for normal lighting scene, low-light scene, or strong light scene based on the above statistical characteristics, including:

[0029] S11. Calculate the average gray value: ,in, Let N be the grayscale value of the i-th pixel in the current frame, and N be the total number of pixels in the current frame.

[0030] S12. Simultaneously calculate the median grayscale value by sorting all pixel grayscale values: When N is odd, the (N+1) / 2th value is taken; when N is even, the average of the N / 2th and N / 2+1th gray values ​​is taken.

[0031] S13. Calculate the proportion of highlight pixels: ,in, For grayscale values ​​greater than the preset highlight threshold Number of pixels, proportion of highlight pixels It reflects the area proportion of the brightly lit region in the entire image;

[0032] S14. Obtain the maximum pixel brightness of the current frame: and the preset saturation brightness threshold A comparison is made to determine if there are any obvious areas of overexposure, the current frame's exposure time (Exposure) is read, and an exposure cap is set. ;

[0033] S15, when , , When the current scene is identified as a candidate for a normal lighting scene, then... Low light threshold, The upper limit threshold for normal brightness The threshold for determining weak and strong light; when Or Exposure and When the difference meets the set threshold, the current scene is judged as a candidate for a low-light scene; when or The current scene is identified as a candidate for a strong light scene.

[0034] Preferably, in step S2, when the scene is a candidate for a strong light scene, pixels with grayscale values ​​higher than the high brightness threshold are binarized to obtain a high brightness region mask. The strong light region is then divided using region growing and connected component analysis methods. The number of pixels, equivalent diffusion radius, peak brightness, and brightness gradient distribution of each strong light region are statistically analyzed, including:

[0035] S21. When the current scene is determined to be a candidate for a strong light scene, the gray values ​​in the current frame image that are higher than the high brightness threshold are... The pixels are binarized to obtain a preliminary highlight area mask.

[0036] S22. Using region growing and connected component analysis, cluster the initial set of bright area masks to divide them into one or more spatially continuous strong light regions; for each strong light region, count the number of pixels within the region to obtain the area A; treat each strong light region as an equivalent circular region and calculate its equivalent diffusion radius. ;

[0037] S23. Calculate the average brightness and peak brightness of the region, and obtain the horizontal gradient components by using the Sobel differential operator. gradient components in the vertical direction Its gradient magnitude can be expressed as: .

[0038] Preferably, step S3 identifies the light source type based on the area, diffusion radius, peak brightness, brightness gradient distribution, and continuous frame stability characteristics of the strong light region, and assigns a differential suppression intensity factor positively correlated with the degree of vehicle headlight glare to each strong light region, including:

[0039] S31. Based on the obtained regional diffusion radius R and its brightness distribution characteristics, the strong light regions are pre-classified;

[0040] S32. Make a judgment based on the preset diffusion radius R, the threshold of peak brightness, and the uniformity of gradient descent.

[0041] S33. The position of the vehicle's headlights in the image is usually determined by the continuity of the vehicle's motion trajectory relative to the camera.

[0042] S34. The two results are weighted and fused to obtain the final classification result. Based on the classification result, a corresponding suppression intensity factor is assigned to each strong light region. .

[0043] Preferably, step S4 automatically switches between normal mode, night vision mode, and strong light suppression mode based on the initial scene judgment result and the illumination statistics of multiple consecutive frames. The normal mode adopts a standard exposure and adjustment strategy, the night vision mode increases gain, extends exposure, and increases gamma enhancement, and the strong light suppression mode enables a local exposure suppression algorithm. The specific implementation of the algorithm is as follows:

[0044] Based on average gray level Highlight pixel ratio Maximum brightness Exposure time statistics are used to further confirm the current scene type, and a continuous frame judgment window is introduced. In any continuous Within a frame, imaging mode switching is performed according to the following rules: when the following conditions are met simultaneously in several consecutive frames... , , Maintain or switch to normal mode; when The value remains below a certain level for a set number of consecutive frames. Or Exposure and When the difference meets the set threshold, switch to night vision mode; when For a given number of consecutive frames, the value is continuously greater than [a certain value]. Or in any frame Switch to strong light suppression mode.

[0045] Preferably, in the strong light suppression mode, step S5 calculates the Euclidean distance from the pixel to the center using the geometric center of the strong light region as a reference point, constructs an exponential local exposure suppression weight function by combining the equivalent diffusion radius and the differential suppression intensity factor, and performs nonlinear mapping on the pixel brightness to achieve compression of the strong light region, linear preservation of the intermediate brightness range, and stretching of the low brightness range, including:

[0046] S51. In the strong light suppression mode, for each obtained strong light region, using the geometric center of the region as a reference point, calculate the Euclidean distance from any pixel (x,y) in the image to the center of the strong light region. ;

[0047] S52, combined with the equivalent diffusion radius R of the strong light region and the suppression intensity factor Construct a local exposure suppression weight function: ,in, For pixels The local exposure suppression weight, when a pixel is close to the center of a strong light area, the distance... Approaching 0, at this point As the pixels gradually move away from the center of the bright light area, Enlargement leads to Gradually getting smaller;

[0048] S53. Next, a non-linear mapping is performed on the pixel brightness L to construct a brightness mapping lookup table (LUT) so that the output brightness satisfies: Where L is the pixel brightness after processing by the local exposure suppression function. This represents the output brightness value after LUT mapping.

[0049] Preferably, step S6, halo reduction and edge detail restoration, involves: calculating pixel brightness gradient magnitudes based on the brightness gradient distribution of the strong light region, constructing halo reduction weights and adjusting pixel brightness, performing halo reduction on the edges of the strong light region, and performing edge detail restoration on key structural areas such as vehicle outlines and license plate characters, including:

[0050] S61. Based on the brightness gradient magnitude of each pixel in the image Constructing a halo to weaken weights: ,in, This is the halo attenuation coefficient, used to control the intensity of halo suppression;

[0051] S62. During the halo reduction process, adjust the pixel brightness: ,in, The pixel brightness after local exposure suppression and brightness mapping. To achieve pixel brightness after halo reduction.

[0052] Preferably, step S8 reads the current frame exposure time, calculates the global average brightness of the enhanced image, and dynamically adjusts the infrared fill light intensity and exposure time based on the error between the target brightness value and the current brightness to achieve dynamic stability of the image brightness, including:

[0053] S81, First, read the exposure time of the current frame from the camera's ISP. The brightness of the output image pixels Calculate its global average brightness Set the target brightness value Compared with global average brightness The difference is used to obtain the brightness error. ,when This indicates that the overall image is too dark. This indicates that the overall image is too bright;

[0054] S82, Based on brightness error Perform infrared illumination adjustment and construct infrared illumination control parameters: ,in, This is the infrared supplementary lighting ratio coefficient. The intensity adjustment amount for the IR fill light;

[0055] S83. Further perform closed-loop adjustment of the camera exposure parameters. The exposure adjustment formula is: ,in, This is the exposure adjustment factor. The adjusted exposure time is subject to the maximum exposure limit, and the infrared illumination is subject to the maximum output power limit.

[0056] Compared with existing technologies, the advantages and positive effects of this invention are as follows: It has stronger adaptability, achieving intelligent switching between three imaging modes through multi-dimensional illumination statistics and continuous frame judgment, solving the instability problem of fixed parameters in dynamic scenes; it has more precise strong light suppression, allocating differentiated suppression factors based on vehicle headlight type, combined with local exposure suppression and halo reduction, effectively suppressing glare without sacrificing detail; it has better low-light imaging, improving brightness and detail in dark areas through night vision gain, noise suppression, and adaptive gamma correction, compensating for the low-light shortcomings of traditional equipment; and it has higher brightness stability, dynamically adjusting brightness through infrared illumination and exposure closed-loop control, coordinating WDR and HLC functions to avoid sudden brightening and dimming of the image, ensuring that key information such as vehicle outlines and license plates are clearly distinguishable, meeting the needs of highway nighttime monitoring. Attached Figure Description

[0057] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is a schematic diagram of the structural process of a night vision strong light suppression imaging method for highway scenarios. Detailed Implementation

[0059] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0060] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.

[0061] In this embodiment, to address the shortcomings of existing technologies in nighttime highway imaging, such as insufficient low-light imaging capability, difficulty in suppressing strong glare, and instability of fixed-parameter ISPs in dynamic scenes, a nighttime glare suppression imaging method for highway scenarios is proposed. The implementation idea is as follows: Figure 1 As shown.

[0062] First, the lighting statistical features are extracted and the scene is initially determined: After the camera captures the current frame image, the ISP performs overall brightness statistics on the frame image, calculates the average gray value, gray median, proportion of bright pixels and maximum pixel brightness, reads the current frame exposure time and compares it with the exposure limit, and determines the current scene as a candidate for normal lighting scene, low light scene, or strong light scene based on the above statistical features.

[0063] Specifically, the average grayscale value is calculated as follows: ,in, Let N be the grayscale value of the i-th pixel in the current frame, and N be the total number of pixels in the current frame. The median grayscale value is calculated by sorting all pixel grayscale values. When N is odd, the (N+1) / 2th value is used; when N is even, the average of the N / 2th and N / 2+1th grayscale values ​​is used. Calculate the proportion of highlight pixels: ,in, For grayscale values ​​greater than the preset highlight threshold Number of pixels, proportion of highlight pixels Reflects the area ratio of brightly lit regions in the entire image; obtains the maximum pixel brightness of the current frame: and the preset saturation brightness threshold A comparison is made to determine if there are any obvious areas of overexposure, the current frame's exposure time (Exposure) is read, and an exposure cap is set. ;when , , When the current scene is identified as a candidate for a normal lighting scene, then... Low light threshold, The upper limit threshold for normal brightness The threshold for determining weak and strong light; when Or Exposure and When the difference meets the set threshold, the current scene is judged as a candidate for a low-light scene; when or The current scene is then identified as a candidate for a strong light scene. The initial scene assessment result obtained in this step will serve as the basis for subsequent imaging mode selection and strong light suppression strategies.

[0064] Strong light region identification and connected component feature extraction: When the scene is a candidate for a strong light scene, the pixels with gray values ​​higher than the high brightness threshold are binarized to obtain a high brightness region mask. The strong light region is divided by region growing and connected component analysis methods. The number of pixels, equivalent diffusion radius, peak brightness and brightness gradient distribution of each strong light region are counted.

[0065] Specifically, when the current scene is determined to be a candidate for a strong light scene, the grayscale value of the current frame image is higher than the high brightness threshold. The pixels are binarized, where The brightness threshold used to identify bright pixels is typically set within the range of 220–240. After binarization, a preliminary bright area mask is obtained. Subsequently, region growing and connected component analysis methods are used to cluster the aforementioned set of bright pixels, dividing it into one or more spatially continuous bright areas. For each bright area, the number of pixels within that area is counted. To describe the spatial diffusion range of the bright areas in the image, each bright area is considered as an equivalent circular region, and its equivalent diffusion radius is calculated using the following formula. Where A is the pixel area of ​​the strong light region, and R is the diffusion radius obtained through area equivalence, used to characterize the diffusion degree of the strong light region. A larger R indicates that the strong light region has a wider spot distribution, often corresponding to vehicle high beams or high-brightness reflectors; a smaller R indicates that the strong light range is more concentrated, mostly appearing in the core area of ​​the headlights or small reflective components. In addition, to evaluate the brightness structure within the strong light region, the average brightness, peak brightness, and brightness gradient distribution of the region can be further calculated. The brightness gradient can be calculated using first-order differential operators such as Sobel and Prewitt to obtain the horizontal gradient components. gradient components in the vertical direction Its gradient magnitude can be expressed as: The number of strong light regions, area A, diffusion radius R, peak brightness, and brightness gradient distribution characteristics obtained in this step will serve as important inputs for vehicle headlight type identification and will directly affect the construction method of local exposure suppression weights in the next step.

[0066] The area of ​​the region where light is obtained diffusion radius Based on characteristics such as peak brightness and brightness gradient distribution, the light source type of each strong light region is further identified. In highway scenarios, vehicle headlight types (high beam, low beam, LED, xenon lamps, halogen lamps, taillights, brake lights) have different spatial spot characteristics and brightness variation patterns, so a comprehensive judgment can be made based on regional shape and brightness characteristics. Based on the area, diffusion radius, peak brightness, brightness gradient distribution, and continuous frame stability characteristics of the strong light region, the light source type is identified, and a differentiated suppression intensity factor positively correlated with the degree of vehicle headlight glare is assigned to each strong light region.

[0067] Specifically, based on the obtained regional diffusion radius R and its brightness distribution characteristics, strong light areas are pre-classified; a judgment is made based on the preset diffusion radius R, the peak brightness threshold, and the uniformity of gradient descent; generally speaking, high beam areas usually have a larger diffusion radius. and higher peak brightness The brightness gradient of the headlights decreases relatively slowly from the center to the edge; the low beam has a relatively small diffusion radius, resulting in a smoother brightness transition. Taillights and brake lights exhibit distinct red spectral characteristics, which can be aided in identification using chromaticity information. Non-light sources such as road reflective markings and license plate reflective films often exhibit smaller [luminance / brightness]. The classification process considers irregular gradient change patterns. It also considers the continuity between the position of the vehicle's headlights in the image and the vehicle's motion trajectory relative to the camera. The stability of strong light regions across consecutive frames is analyzed. Therefore, strong light regions exhibit a stable positional change pattern across consecutive frames; while reflective markings and road surface reflections may show inconsistent changes with vehicle position, which can be distinguished by their inter-frame morphological changes. The two results are weighted and fused to obtain the final classification result. Based on the classification result, a corresponding suppression intensity factor is assigned to each strong light region. Inhibition strength factor This is a dimensionless parameter used to control the decay rate of the exponential decay function in subsequent local exposure suppression. Its value is positively correlated with the glare level of the headlight type. Generally speaking, LED high beams and xenon headlights, due to their high peak brightness and wide glare range, should be allocated a larger glare. Value; the low beam light spot is relatively soft and can be allocated to a medium degree. Low-glare light sources such as taillights or reflective markings should be allocated smaller amounts of light. Value. By setting different suppression intensity factors for different types of vehicle lights. This allows subsequent steps to perform differentiated processing on different light sources, enabling strong light suppression to effectively reduce glare while avoiding image detail loss due to excessive suppression.

[0068] Automatic imaging mode switching: Based on the initial scene judgment and continuous multi-frame illumination statistics, it automatically switches between normal mode, night vision mode and strong light suppression mode. Normal mode adopts standard exposure and adjustment strategy, night vision mode increases gain, extends exposure and increases gamma enhancement, and strong light suppression mode enables local exposure suppression algorithm.

[0069] Specifically, based on the initial scene assessment and illumination statistics across multiple frames, the camera automatically switches between three imaging modes: normal mode, night vision mode, and strong light suppression mode, thereby achieving adaptive adjustment to the complex lighting conditions of highways at night. This is based on the average grayscale... Highlight pixel ratio Maximum brightness Exposure time statistics are used to further confirm the current scene type, and a continuous frame judgment window is introduced. In any continuous Within a frame, imaging mode switching is performed according to the following rules: when the following conditions are met simultaneously in several consecutive frames... , , Maintain or switch to normal mode. Normal mode uses standard exposure, gain, and gamma adjustment strategies and is suitable for general road lighting environments. The value remains below a certain level for a set number of consecutive frames. Or Exposure and When the difference meets the set threshold, switch to night vision mode. In this mode, gain will be automatically increased, exposure will be extended, and gamma enhancement will be increased to enhance details in dark areas. For a given number of consecutive frames, the value is continuously greater than [a certain value]. Or in any frame Switch to strong light suppression mode. This mode automatically activates algorithms such as local exposure suppression, spot compression, and halo reduction to suppress glare caused by vehicle lights, reflective markings, etc. Through the above mode switching mechanism, the camera can achieve fast, stable, and adaptive adjustment of imaging parameters in complex lighting environments such as highway night driving scenarios, thereby obtaining stable and clear imaging effects in strong light, low light, and normal lighting conditions.

[0070] Next, local exposure suppression and image brightness equalization are performed: In strong light suppression mode, the Euclidean distance from the pixel to the center is calculated with the geometric center of the strong light area as the reference point. An exponential local exposure suppression weight function is constructed by combining the equivalent diffusion radius and the differential suppression intensity factor to perform nonlinear mapping on the pixel brightness, thereby achieving compression of the strong light area, linear preservation of the intermediate brightness range, and stretching of the low brightness range.

[0071] Specifically, when the system is in the aforementioned strong light suppression mode, a local exposure suppression weight distribution is constructed for each identified strong light region to achieve focused suppression of the central strong light region and gradual weakening of the surrounding areas, thereby obtaining a smooth and natural strong light suppression effect. In strong light suppression mode, for each identified strong light region, using the geometric center of that region as a reference point, the Euclidean distance from any pixel (x, y) in the image to the center of that strong light region is calculated. Combining the equivalent diffusion radius R of the strong light region with the suppression intensity factor Construct a local exposure suppression weight function: ,in, For pixels The local exposure suppression weight, when a pixel is close to the center of a strong light area, the distance... Approaching 0, at this point As the pixels gradually move away from the center of the bright light area, Enlargement leads to By gradually decreasing the size of the pixel, the above method enables focused suppression of the central area of ​​strong light and gentle suppression of the surrounding areas, avoiding obvious hard edges or localized over-darkness. Next, a non-linear mapping is applied to the pixel brightness L to construct a brightness mapping lookup table (LUT) to ensure that the output brightness satisfies the following: Where L is the pixel brightness after processing by the local exposure suppression function. This represents the output brightness value after LUT mapping. In practical design, the LUT employs differentiated mapping strategies for different brightness ranges: compression mapping is used for the bright areas corresponding to strong light regions, significantly reducing the brightness of these areas and thus suppressing glare; approximately linear mapping is used for the intermediate brightness range to maintain scene brightness levels and contrast; and moderate stretching mapping is used for the low brightness range to improve the visibility of details in dark areas. This is achieved through exponential local exposure suppression weights. Combined with the nonlinear luminance mapping LUT, this step suppresses glare from strong light sources such as vehicle headlights and reflective markings while ensuring the overall brightness balance of the image and the effective presentation of dark information, providing a good base image for subsequent halo reduction and night vision enhancement processing.

[0072] Furthermore, halo reduction and edge detail restoration are performed: the pixel brightness gradient magnitude is calculated based on the brightness gradient distribution of the strong light area, halo reduction weights are constructed and pixel brightness is adjusted, halo reduction is performed on the edges of the strong light area, and edge detail restoration is performed on key structural areas such as vehicle outline and license plate characters.

[0073] Specifically, after completing local exposure suppression and brightness mapping processing, high-brightness light sources such as vehicle headlights may still produce a certain range of halo effect around them, that is, the brightness gradually spreads along the edge of the area, forming a halo-shaped brightness overflow area. To further improve image quality and restore target details, this step weakens the halo at the edge of the strong light area and performs edge detail restoration on key structural areas. This is based on the brightness gradient magnitude of each pixel in the image. Constructing a halo to weaken weights: ,in, This is the halo attenuation coefficient, used to control the intensity of halo suppression; during halo attenuation, pixel brightness is adjusted. ,in, The pixel brightness after local exposure suppression and brightness mapping. To achieve pixel brightness reduction after halo reduction, this formula achieves the following effect: when a pixel is located at the edge of a strong light area with a large gradient... Increase, making This reduces the brightness of the area, resulting in a stronger reduction and a significant halo suppression effect; when the pixel is located inside a strong light area (with a smaller gradient) or in a normal area, Approaching 0 ensures that brightness is almost unaffected, thus avoiding false suppression of areas outside of strong light suppression. After halo attenuation, to further avoid edge blurring caused by local suppression, this invention introduces gradient-based moderate edge enhancement operations in key areas such as vehicle outlines and license plate character edges. By enhancing local high-frequency components, the target area structure becomes clearer, thereby compensating for the blurring effect that strong light suppression may introduce.

[0074] Night vision enhancement processing: Based on the global brightness statistics, the target area for night vision enhancement is divided, a night vision gain coefficient is applied to the target area, noise is suppressed by a gradient-driven noise suppression factor, and adaptive gamma correction is applied to improve the brightness and detail in dark areas.

[0075] Specifically, after local exposure suppression and halo reduction, this step performs night vision enhancement processing on the dark areas of the image to further improve visibility in low-light areas at night, thereby improving overall brightness and detail rendering in low-light environments. First, based on global brightness statistics, the average brightness of the current frame is obtained. And the brightness will be lower than the preset night vision enhancement threshold. The pixels are divided into night vision enhancement target areas; for any pixel (x, y) in the image, if its brightness... satisfy: Then, for pixels in the night vision enhancement target area, a night vision gain coefficient is applied to them: ,in, This represents the night vision gain factor. The pixel brightness after night vision gain is calculated; a noise suppression factor is constructed by applying a spatial neighborhood-based consistency constraint to the gained image. ,in, This is the noise suppression coefficient. The gradient magnitude of pixel brightness after gain; night vision enhanced brightness is obtained by noise suppression using a noise suppression factor: ; and on Adaptive gamma correction is performed to further conform to the human eye's perception of brightness in dark areas, resulting in the image pixel brightness: ,in The gamma coefficient is dynamically adjusted based on the current frame's brightness: when the overall brightness is low, it is taken as... <1 to increase the brightness of dark areas; when the brightness is moderate, take The value is approximately 1 to maintain stable brightness. Through joint processing of threshold-based dark area gain, gradient-driven noise suppression, and adaptive gamma mapping, the dark area brightness of nighttime images is significantly improved while effectively suppressing noise, resulting in a more natural and clear image.

[0076] Finally, infrared illumination and exposure closed-loop control are performed: the exposure time of the current frame is read, the global average brightness of the enhanced image is calculated, and the infrared illumination intensity and exposure time are dynamically adjusted based on the target brightness value and the current brightness error to achieve dynamic stability of image brightness.

[0077] Specifically, after completing night vision enhancement, to further ensure overall image quality in low-light nighttime scenes, this step achieves dynamic stabilization of image brightness through a closed-loop feedback mechanism of infrared illumination control and exposure adjustment. First, the exposure time of the current frame is read from the camera's ISP. The brightness of the output image pixels Calculate its global average brightness Set the target brightness value Compared with global average brightness The difference is used to obtain the brightness error. ,when This indicates that the overall image is too dark. This indicates that the overall image is too bright; based on brightness error. Perform infrared illumination adjustment and construct infrared illumination control parameters: ,in, This is the infrared supplementary lighting ratio coefficient. This is the intensity adjustment amount for the IR fill light; further, closed-loop adjustment is performed on the camera exposure parameters, and the exposure adjustment formula is: ,in, This is the exposure adjustment factor. The adjusted exposure time is subject to a maximum exposure limit, while the infrared illumination is limited by the maximum output power. Through closed-loop control of infrared illumination adjustment and exposure time adjustment, this step can correct imaging parameters in real time according to changes in image brightness, ensuring that the brightness in low-light nighttime scenes remains within a stable and visible range, thereby further improving the imaging quality of highway nighttime scenes.

[0078] Ultimately, through the above processing steps, the camera can achieve the following in various scenarios on highways: long-distance headlight flashes, close-range light impacts, alternating strong and dark conditions at tunnel entrances, and low moonlight: stable brightness, significantly reduced halos, improved visibility in dark areas, and clear visibility of vehicle bodies, license plates, and road signs, thus meeting the real-time and high reliability requirements of highway monitoring.

[0079] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for high way scene night vision glare inhibition imaging, characterized in that, The method comprises the following steps: S1, light statistical feature extraction and scene preliminary determination: after the camera collects the current frame image, the ISP performs overall brightness statistics on the frame image, calculates the average gray value, the high-light pixel proportion and the maximum pixel brightness, reads the current frame exposure time and compares it with the exposure upper limit, and determines the current scene as a normal light scene candidate, a low-illumination scene candidate or a strong light scene candidate based on the above statistical features; S2, strong light region identification and connected domain feature extraction: when the scene is a strong light scene candidate, the pixels with a gray value higher than the high-light threshold value are binarized to obtain a high-light region mask, the strong light region is divided by using the region growing and connected domain analysis method, and the pixel number, equivalent diffusion radius, peak brightness and brightness gradient distribution of each strong light region are counted; S3, vehicle lamp type identification and differentiated suppression intensity factor determination: based on the area, equivalent diffusion radius, peak brightness, brightness gradient distribution and continuous frame stability features of the strong light region, the vehicle lamp type is identified, and a differentiated suppression intensity factor which is positively correlated with the degree of vehicle lamp glare is assigned to each strong light region; S4, automatic switching of imaging mode: based on the scene preliminary determination result and the continuous frame light statistics, the imaging mode is automatically switched between the normal mode, the night vision mode and the strong light suppression mode, the normal mode adopts the standard exposure and adjustment strategy, the night vision mode increases the gain, prolongs the exposure and increases the gamma enhancement, and the strong light suppression mode enables the local exposure suppression algorithm; S5, local exposure suppression and image brightness equalization: in the strong light suppression mode, the Euclidean distance of the pixel to the center is calculated with the geometric center of the strong light region as the reference point, an exponential local exposure suppression weight function is constructed in combination with the equivalent diffusion radius and the differentiated suppression intensity factor, the pixel brightness is nonlinearly mapped, the strong light region is compressed, the intermediate brightness interval is linearly maintained and the low brightness interval is stretched; S6, halo weakening and edge detail recovery: the pixel brightness gradient amplitude is calculated based on the brightness gradient distribution of the strong light region, the halo weakening weight is constructed and the pixel brightness is adjusted, the halo of the edge of the strong light region is weakened, and the edge detail recovery is performed on the vehicle contour and the license plate character key structure region; S7, night vision enhancement processing: the night vision enhancement target region is divided according to the global brightness statistical result, the night vision gain coefficient is applied to the target region, the noise suppression factor driven by the gradient is used for noise suppression, and the adaptive gamma correction is applied to improve the brightness and details in the dark part; S8, infrared light supplement and exposure closed-loop control: the current frame exposure time is read, the global average brightness of the enhanced image is calculated, the infrared light supplement intensity and the exposure time are dynamically adjusted based on the target brightness value and the current brightness error, and the dynamic stability of the image brightness is realized; The step S7 comprises: dividing a night vision enhancement target region according to a global brightness statistical result, applying a night vision gain coefficient to the target region, performing noise suppression through a gradient-driven noise suppression factor, and applying adaptive gamma correction to improve brightness and details in a dark part. S71、According to the global brightness statistical result, the average brightness of the current frame is obtained And the pixels with brightness lower than the preset night vision enhancement threshold are divided into a night vision enhancement target region; S72, for any pixel point (x, y) in the image, if its brightness satisfies: then for the pixel in the night vision enhanced target region, a night vision gain coefficient is applied to it: wherein, is the night vision gain coefficient, is the pixel brightness after night vision gain. S73, performing a spatial neighborhood based consistency constraint on the gain image to construct a noise suppression factor: wherein, is a noise suppression coefficient, is a gradient magnitude of the gain pixel intensity; S74, noise suppression by noise suppression factor to obtain night vision enhanced brightness: ; and adaptive gamma correction is performed on to further conform to the perception characteristics of the human eye to the dark part of the brightness, to obtain the image pixel brightness: , wherein is the gamma coefficient; The step S1 includes: the ISP performs overall brightness statistics on the frame image, calculates average gray value, gray median, high-light pixel proportion and maximum pixel brightness, reads current frame exposure time and compares it with exposure upper limit, and determines the current scene as normal light scene candidate, low-illumination scene candidate or strong light scene candidate based on the statistical characteristics. S11, calculating average gray value: wherein, is the gray value of the i-th pixel of the current frame, and N is the total number of pixels of the current frame. S12, calculate the highlight pixel proportion: wherein, is the number of pixels with a gray value greater than a preset highlight threshold , the highlight pixel proportion reflects the area proportion of the strong light region in the entire image. S13, acquire the maximum pixel brightness of the current frame: and compare with the preset saturation brightness threshold to determine whether there is a significant highlight overflow area, read the exposure time Exposure of the current frame, and set the upper limit of exposure ; S14, when , , the current scene is determined as a normal light scene candidate, wherein is a low light determination threshold, is a normal brightness upper threshold, is a strong light determination threshold; when or Exposure and satisfy a set threshold, the current scene is determined as a low light scene candidate; when or the current scene is determined as a strong light scene candidate; The step S5 includes: in the strong light suppression mode, the Euclidean distance of pixels to the geometric center of the strong light region is calculated based on the geometric center as the reference point, an exponential local exposure suppression weight function is constructed by combining equivalent diffusion radius and differentiated suppression intensity factor, the pixel brightness is nonlinearly mapped, the strong light region is compressed, the intermediate brightness interval is linearly maintained and the low brightness interval is stretched. S51, in the strong light inhibition mode, for each strong light region obtained, taking the geometric center of the region as a reference point, calculating the Euclidean distance of any pixel point (x, y) in the image to the center of the strong light region ; S52, combine the equivalent diffusion radius R of the strong light area and the suppression intensity factor , construct a local exposure suppression weight function: , wherein, is the local exposure suppression weight of the pixel point , when the pixel point is close to the center of the strong light area, the distance is close to 0, at this time , as the pixel point gradually moves away from the center of the strong light area, increases, resulting in gradually becoming smaller; S53. Next, a non-linear mapping is performed on the pixel brightness L to construct a brightness mapping lookup table (LUT) so that the output brightness satisfies: Where L is the pixel brightness after processing by the local exposure suppression function. This represents the output brightness value after LUT mapping.

2. The method for high way scene night vision glare inhibition imaging according to claim 1, characterized in that, The step S2 includes: when the scene is the strong light scene candidate, the pixels with gray value higher than the high-light threshold value are binarized to obtain a high-light region mask, the region growing and connected domain analysis method is used to divide the strong light region, and the pixel number, equivalent diffusion radius, peak brightness and brightness gradient distribution of each strong light region are counted. S21、when the current scene is determined as a strong light scene candidate, performing binaryzation processing on pixels with a gray value higher than a high-light threshold value in the current frame image, and obtaining a preliminary high-light region mask after binaryzation; S21、when the current scene is determined as a strong light scene candidate, performing binaryzation processing on pixels with a gray value higher than a high-light threshold value in the current frame image, and obtaining a preliminary high-light region mask after binaryzation; S22, using region growing and connected component analysis method, clustering the preliminary highlight region mask set, dividing it into one or more strong light regions with spatial continuity; for each strong light region, counting the number of pixels in the region to obtain the area A; regarding each strong light region as an equivalent circular region, calculating its equivalent diffusion radius ; S23, the average brightness of the region, peak brightness, and through the Sobel differential operator for calculation, respectively, get horizontal direction gradient component With the vertical direction gradient component The gradient amplitude can be expressed as: .

3. The method for high way scene night vision glare inhibition imaging according to claim 1, characterized in that, The step S3 includes: based on the area, equivalent diffusion radius, peak brightness, brightness gradient distribution and continuous frame stability characteristics of the strong light region, the vehicle light type is identified, and the differentiated suppression intensity factor positively correlated with the glare degree of each strong light region is assigned. S31, according to the obtained region equivalent diffusion radius R and its brightness distribution characteristics, the strong light region is pre-classified; S32, according to the preset thresholds of equivalent diffusion radius R and peak brightness and gradient descent uniformity, the judgment is performed; S33, the judgment is performed in combination with the continuity factor that the position of the vehicle light source in the image is usually continuous with the motion trajectory of the vehicle relative to the camera; S34, the two results are weighted and fused to obtain a final classification result, and based on the classification result, a corresponding suppression intensity factor is assigned to each strong light region .

4. The method for high way scene night vision glare inhibition imaging according to claim 1, characterized in that, The step S4 includes: based on the scene preliminary judgment result and the continuous frame light statistics, the system is automatically switched between the normal mode, the night vision mode and the strong light suppression mode, the standard exposure and adjustment strategy are used in the normal mode, the gain is increased, the exposure is prolonged and the gamma enhancement strength is increased in the night vision mode, and the specific implementation of the local exposure suppression algorithm is enabled in the strong light suppression mode. According to the average gray level , the proportion of highlight pixels , the maximum brightness , the exposure time Exposure statistics, further confirm the current scene type, introduce a continuous frame judgment window , in any continuous frame, according to the following rules to perform imaging mode switching: when in continuous setting several frames at the same time meet , , , keep or switch to normal mode; when , the difference between or Exposure and satisfies the set threshold, switch to night vision mode; when , greater than or in any frame , switch to strong light suppression mode.

5. The method for high way scene night vision glare inhibition imaging according to claim 1, characterized in that, The step S6 includes: based on the brightness gradient distribution of the strong light region, the pixel brightness gradient amplitude is calculated, the halo weakening weight is constructed and the pixel brightness is adjusted, the halo weakening is performed on the edge of the strong light region, and the edge detail recovery is performed on the vehicle contour, license plate character key structure region. S61、According to the luminance gradient amplitude of each pixel point in the image , construct halo weakening weight: , wherein, is a halo weakening coefficient, used to control the intensity of halo suppression; S62, in the halo weakening process, adjusting the pixel brightness: wherein, is the pixel brightness after local exposure suppression and brightness mapping, is the pixel brightness after completing the halo weakening.

6. The method for high way scene night vision glare inhibition imaging according to claim 1, characterized in that, The step S8 includes: the current frame exposure time is read, the global average brightness of the enhanced image is calculated, the infrared light supplement intensity and the exposure time are dynamically adjusted based on the target brightness value and the current brightness error, and the dynamic stability of the image brightness is realized. S81, first read the exposure time of the current frame from the camera ISP , the output image pixel brightness Calculate its global average brightness Set the target brightness value And the global average brightness Subtract the brightness error When When the overall picture is dark, when The overall picture is bright S82, based on the brightness error Perform infrared light supplement adjustment, construct infrared light supplement control quantity: Wherein, is the infrared light supplement proportion coefficient, is the intensity adjustment quantity of the IR light supplement lamp; S83、 further closed-loop adjustment is performed on the camera exposure parameter, and an exposure adjustment formula is: wherein, is an exposure adjustment coefficient, is the adjusted exposure time; the exposure time adjustment is limited by the maximum exposure, and the infrared fill light is limited by the maximum output power.

Citation Information

Patent Citations

  • Rearview mirror visual field adjusting method and system capable of resisting strong light interference

    CN118977648A

  • Method for improving image effect through intelligent strong light suppression

    CN119420876A