Wireless video surveillance image enhancement method for complex lighting conditions
Patent Information
- Application Number
- CN202610554912.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-24
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-04-24
AI Technical Summary
[0004]为了解决图像增强效果不佳的技术问题,本发明的目的在于提供一种面向复杂光照条件的无线视频监控图像增强方法
[0015]The present invention has the following beneficial effects: By analyzing the grayscale histogram of a continuous video frame sequence, the embodiments of the present invention identify bright areas in the image and further distinguish between vehicle headlights and fixed light sources. This clarifies the characteristic differences of different light sources, avoids enhancement deviations caused by confusion of light source types, and improves the targeting and accuracy of image enhancement processing. By acquiring the centroid coordinates, spot area, and average brightness of the vehicle headlights in each frame in real time, dynamic prediction of the vehicle headlight status is achieved. This captures dynamic features such as positional shifts, spot size changes, and brightness fluctuations caused by vehicle movement, avoiding problems such as insufficient overexposure recovery and amplified noise in dark areas caused by dynamic changes in vehicle headlights, ensuring the stability and consistency of the enhancement effect. Based on the real-time status of the vehicle headlights, pixel positions, fixed light source parameters, and the spatial attenuation law of light intensity, an illumination weight field is constructed, which can quantify the illumination contribution of different regions in the image, enabling partitioned image processing. This illumination weighting field clearly distinguishes between overexposed, shadowed, and normally illuminated areas, assigning appropriate enhancement parameters to each area. It focuses on restoring details in overexposed areas to prevent loss of detail; moderately enhances brightness in dark areas to suppress noise amplification; and optimizes parameter transitions at the boundary between light and shadow to effectively eliminate artifacts, significantly improving the overall image quality of the enhanced image. Through weighted fusion of the brightness-corrected image and the detail-enhanced image, it balances brightness uniformity and detail richness. The resulting enhanced surveillance image exhibits neither overexposure nor underexposure, and clearly presents key details such as vehicles, pedestrians, and the environment, demonstrating excellent image enhancement performance.
Smart Images

Figure CN122415401B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and specifically to a method for enhancing wireless video surveillance images under complex lighting conditions. Background Technology
[0002] Wireless video surveillance, with its advantages of flexible deployment and wide coverage, has become a core infrastructure for security monitoring in complex scenarios such as underground parking lots and transportation hubs. In these scenarios, lighting conditions are dynamically changing, especially in underground parking garages where the headlights of moving vehicles repeatedly sweep across the monitoring screen. This can lead to problems in the video images, such as localized areas being overexposed due to direct sunlight, while areas farther from the light source are underexposed and have blurred textures. Therefore, scene-adaptive image enhancement processing for wireless video surveillance images is crucial for repairing image quality defects and restoring details of key targets, ensuring the stability and availability of the monitoring system.
[0003] In some scenarios, overexposed and shadowed areas caused by vehicle headlights not only coexist in the same frame, but their boundaries also continuously change as the vehicle moves. Traditional enhancement methods often apply a uniform transform function or parameters to the entire image, resulting in problems such as insufficient restoration of details in overexposed areas, excessive amplification of noise in dark areas, or artifacts at the boundaries of different illuminated areas, leading to poor image enhancement results. Summary of the Invention
[0004] To address the technical problem of poor image enhancement results, the present invention aims to provide a wireless video surveillance image enhancement method for complex lighting conditions.
[0005] To solve the above technical problems, the specific technical solution adopted is as follows: In a first aspect, embodiments of the present invention provide a wireless video surveillance image enhancement method for complex lighting conditions, comprising: acquiring a continuous video frame sequence captured by a surveillance camera; determining the bright areas in the image based on the grayscale histogram of each frame in the continuous video frame sequence, and identifying vehicle lights and fixed light sources within the bright areas; predicting the state of the vehicle lights in the current frame image based on the centroid coordinates, spot area, and average brightness of the vehicle lights in each frame image; determining the illumination weight field of the light source based on the state of the vehicle lights in the current frame image, the position of any pixel in the current frame image, the position of the fixed light source, and the spatial attenuation law of light intensity; performing brightness correction and texture enhancement in parallel on each frame image in the continuous video frame sequence based on the illumination weight field to obtain a brightness-corrected image and a detail-enhanced image; and performing weighted fusion of the brightness-corrected image and the detail-enhanced image to obtain an enhanced surveillance image.
[0006] Optionally, determining the bright areas in an image based on the grayscale histogram of each frame in a continuous video frame sequence, and identifying the vehicle lights and fixed light sources within the bright areas, includes: determining a grayscale threshold based on the grayscale histogram of the current frame image, and detecting bright areas from the current frame image using region growing and the grayscale threshold; determining the motion vector of the bright areas between adjacent frames using optical flow; determining the motion direction angle based on the motion vector, and determining the change in the motion direction angle between adjacent frames; constructing an adaptive sliding window based on the change in the motion direction angle between adjacent frames; and determining the vehicle lights and fixed light sources within the bright areas using the motion of multiple consecutive frames within the adaptive sliding window.
[0007] Optionally, predicting the state of the headlight in the current frame image based on the centroid coordinates, spot area, and average brightness of the headlight in each frame image includes: encapsulating the centroid coordinates, spot area, and average brightness of the headlight into a state vector; using a particle filter algorithm to predict the state vector to obtain the prediction result in the current frame image, wherein the number of particles in the particle filter algorithm is determined based on the trace of the covariance matrix estimated for the current state; determining the detection confidence based on the information between the detection result and the prediction result in the current frame image; correcting the initial observation noise covariance of the particle filter algorithm based on the detection confidence to obtain the observation noise covariance, which corresponds to optimizing the particle filter algorithm; and using the weighted optimal estimate output by the optimized particle filter algorithm as the final prediction result of the headlight state in the current frame image.
[0008] Optionally, the illumination weight field of the light source is determined based on the state of the vehicle headlight in the current frame image, the position of any pixel in the current frame image, the position of the fixed light source, and the spatial attenuation law of light intensity. This includes: when the light source is a vehicle headlight, establishing a Gaussian attenuation light intensity distribution centered on the vehicle headlight and varying with distance based on the predicted center position, equivalent radius, and average brightness of the vehicle headlight in the current frame image, thus obtaining the spatial attenuation law of light intensity; determining the distance between the position of any pixel in the current frame image and the predicted center position of the vehicle headlight; determining the dynamic illumination weight field of the vehicle headlight based on the distance, equivalent radius, average brightness, and spatial attenuation law of light intensity; when the light source is a fixed light source, setting the weight value of the region centered on the center of the fixed light source and with the equivalent radius of the fixed light source as the radius to the maximum value, and linearly attenuating with increasing distance, thus obtaining the static illumination weight field of the fixed light source; and taking the maximum value of the dynamic illumination weight field and the static illumination weight field pixel by pixel at the pixel level to obtain the final illumination weight field of the light source in the current frame image.
[0009] Optionally, determining the dynamic illumination weight field of the vehicle headlight based on distance, equivalent radius, average brightness, and spatial attenuation law of light intensity includes: determining the Gaussian attenuation form according to the spatial attenuation law of light intensity; determining the adaptive coefficient representing the attenuation rate based on the gradient magnitude of the light spot edges of adjacent frame images; determining the attenuation scale according to the adaptive coefficient, distance, and equivalent radius; determining the attenuation coefficient using the attenuation scale and distance; determining the theoretical light intensity value of the current pixel according to the attenuation coefficient and average brightness; and determining the dynamic illumination weight field of the vehicle headlight using the theoretical light intensity value of each pixel and each distance.
[0010] Optionally, performing parallel luminance correction on each frame of a continuous video frame sequence based on an illumination weight field includes: converting each frame image from an RGB image to an HSV image in the HSV color space, and extracting the luminance component from the HSV image; determining the gamma value of each pixel in each frame image based on the illumination weight field, wherein the gamma value is positively correlated with the weight value of the illumination weight field; performing a power transformation on the luminance component pixel by pixel using the gamma value to obtain the corrected luminance component; merging the corrected luminance component with the luminance component and converting it back to the RGB color space to obtain the luminance-corrected image.
[0011] Optionally, performing parallel texture enhancement on each frame of a continuous video frame sequence based on the illumination weight field to obtain a detail-enhanced image includes: performing guided filtering decomposition on each frame of the continuous video frame sequence to obtain a base layer representing the overall illumination distribution and a detail layer representing texture and other detail information; determining the texture gain coefficient of each pixel based on the illumination weight field, wherein the texture gain coefficient is negatively correlated with the weight value of the illumination weight field; and using the texture gain coefficient to amplify the detail layer to obtain the detail-enhanced image.
[0012] Optionally, determining the texture gain coefficient for each pixel based on the illumination weight field includes: calculating the local standard deviation of the detail layer and obtaining the baseline value; and determining the texture gain coefficient based on the inverse factor of the weight value of the illumination weight field, the local standard deviation, and the baseline value.
[0013] Optionally, weighted fusion of the brightness-corrected image and the detail-enhanced image to obtain an enhanced monitoring image includes: determining the fusion weights based on the illumination weight field; and superimposing the brightness-corrected image and the detail-enhanced image pixel by pixel according to the fusion weights to obtain the enhanced monitoring image.
[0014] Optionally, after weighted fusion of the brightness-corrected image and the detail-enhanced image to obtain the enhanced monitoring image, the method further includes: performing video encoding compression on the enhanced monitoring image and transmitting it to the monitoring backend via a wireless network for display and storage.
[0015] The present invention has the following beneficial effects: By analyzing the grayscale histogram of a continuous video frame sequence, the embodiments of the present invention identify bright areas in the image and further distinguish between vehicle headlights and fixed light sources. This clarifies the characteristic differences of different light sources, avoids enhancement deviations caused by confusion of light source types, and improves the targeting and accuracy of image enhancement processing. By acquiring the centroid coordinates, spot area, and average brightness of the vehicle headlights in each frame in real time, dynamic prediction of the vehicle headlight status is achieved. This captures dynamic features such as positional shifts, spot size changes, and brightness fluctuations caused by vehicle movement, avoiding problems such as insufficient overexposure recovery and amplified noise in dark areas caused by dynamic changes in vehicle headlights, ensuring the stability and consistency of the enhancement effect. Based on the real-time status of the vehicle headlights, pixel positions, fixed light source parameters, and the spatial attenuation law of light intensity, an illumination weight field is constructed, which can quantify the illumination contribution of different regions in the image, enabling partitioned image processing. This illumination weighting field clearly distinguishes between overexposed, shadowed, and normally illuminated areas, assigning appropriate enhancement parameters to each area. It focuses on restoring details in overexposed areas to prevent loss of detail; moderately enhances brightness in dark areas to suppress noise amplification; and optimizes parameter transitions at the boundary between light and shadow to effectively eliminate artifacts, significantly improving the overall image quality of the enhanced image. Through weighted fusion of the brightness-corrected image and the detail-enhanced image, it balances brightness uniformity and detail richness. The resulting enhanced surveillance image exhibits neither overexposure nor underexposure, and clearly presents key details such as vehicles, pedestrians, and the environment, demonstrating excellent image enhancement performance. Attached Figure Description
[0016] To more clearly illustrate the technical solutions and advantages 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a wireless video surveillance image enhancement method for complex lighting conditions, provided as an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a wireless video surveillance image enhancement system for complex lighting conditions, provided as an embodiment of the present invention. Detailed Implementation
[0018] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a wireless video surveillance image enhancement method for complex lighting conditions proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0020] The purpose of this invention is to address the problem of localized overexposure and unclear details in shadow areas caused by moving strong light sources sweeping across the screen during surveillance. By establishing a dynamic weight field, the image enhancement process can be adaptively adjusted according to different regions, ultimately outputting images with clear details.
[0021] This invention addresses the complex lighting problem caused by vehicle headlights in underground parking garage scenarios. It combines high-brightness area growth detection results with optical flow motion information, employing an adaptive particle filter framework to perform joint state estimation and trajectory prediction of the headlight's position, area, and average brightness. Subsequently, based on the headlight's light intensity attenuation, a spatially continuous and smooth weighted field is constructed to quantify the degree of interference from strong light on each pixel in the image. To address the issues of overexposure in highlight areas and blurred texture in dark areas in surveillance images, adaptive brightness correction and texture enhancement processing are performed on the image based on the weighted field. Finally, the two processing results are weighted and fused according to the weighted field to obtain an enhanced surveillance image.
[0022] The specific scenario addressed by this invention is: In underground parking garages, vehicle headlights repeatedly sweep across the surveillance screen as vehicles move, causing some areas of the original image to be overexposed due to direct sunlight, while shadowed areas further away from the light source are underexposed. This solution enhances the image, outputting a complete surveillance image.
[0023] The following description, in conjunction with the accompanying drawings, details a specific scheme for a wireless video surveillance image enhancement method for complex lighting conditions provided by the present invention.
[0024] Example 1: Please see Figure 1 The document illustrates a flowchart of a wireless video surveillance image enhancement method for complex lighting conditions provided by an embodiment of the present invention, comprising: Step S101: Obtain a sequence of continuous video frames captured by the surveillance camera.
[0025] Specifically, this embodiment of the invention collects a continuous video frame sequence captured by a surveillance camera in an underground parking garage as a data source, providing data support for subsequent image adaptive enhancement and other processing. The continuous video frame sequence includes multiple images, with at least one image including a fixed light source and other light sources such as vehicle headlights.
[0026] Step S102: Determine the bright areas in the image based on the grayscale histogram of each frame in the continuous video frame sequence, and determine the vehicle lights and fixed light sources in the bright areas.
[0027] Specifically, in this embodiment of the invention, high-brightness spots are detected from a continuous video frame sequence through adaptive region growing, and their instantaneous motion vectors are calculated using optical flow to distinguish between vehicle lights and fixed light sources. Then, a particle filtering framework is used to perform joint state estimation of the position, area, and average brightness of the vehicle lights, using optical flow velocity as prior data for the direction of motion. At the same time, the observation noise is adaptively adjusted according to the detection confidence to predict the state of the vehicle lights in the current frame. A spatially continuous weight field is generated based on the light intensity attenuation law of the vehicle lights to represent the degree of interference of each pixel from strong light sources.
[0028] Furthermore, in the monitoring footage, vehicle headlights sweep across the screen as the vehicle moves, causing momentary local overexposure. This necessitates dynamic trajectory prediction and compensation for lost information from historical frames. Fixed light sources, on the other hand, have constant positions and stable illumination, requiring only brightness adjustment to darken them. Therefore, to reduce unnecessary computational redundancy, the vehicle headlight area is first identified. Thus, as an optional embodiment of the present invention, determining the bright areas in an image based on the grayscale histogram of each frame in a continuous video frame sequence, and identifying vehicle headlights and fixed light sources within these bright areas, includes: determining a grayscale threshold based on the grayscale histogram of the current frame image, and detecting bright areas from the current frame image using region growing and the grayscale threshold; determining the motion vector of the bright area between adjacent frames using optical flow; determining the motion direction angle based on the motion vector, and determining the change in the motion direction angle between adjacent frames; constructing an adaptive sliding window based on the change in the motion direction angle between adjacent frames; and determining the vehicle headlights and fixed light sources within the bright areas using the motion of multiple consecutive frames within the adaptive sliding window.
[0029] Specifically, in this embodiment of the invention, the bottom 5% quantile of the grayscale histogram of the current frame image is first taken as the grayscale threshold. Then, the pixel corresponding to the maximum grayscale value within a 3×3 local neighborhood of each pixel in the image is taken as the seed point for growth. The brightness difference between the current pixel and the seed point is used as a similarity measure to grow outward (region growing method) until the brightness value of the adjacent pixel is higher than 70% of the grayscale threshold, thus obtaining the bright area in the current frame image.
[0030] Furthermore, in this embodiment of the invention, the median of the optical flow vector of the edge pixels of each highlight region is calculated using the pyramid LK optical flow method to obtain the motion vector of the image of frame t and its next adjacent frame. , This represents the motion vector of the image in frame t and its neighboring frames. This represents the motion velocity component of the highlighted area in the x-direction of the image in frame t. This represents the velocity component of the image spot in the y-direction in the t-th frame.
[0031] Furthermore, in this embodiment of the invention, the motion direction angle of the highlighted region of the image in frame t is defined. , Represents the arctangent function. It calculates the absolute value of the difference in motion direction angles between adjacent frames. Then, the absolute value of this difference is used to determine the change in the direction angle of motion. ,in, Describes the minimum value function. This represents the motion direction angle of the highlighted area in the (t-1)th frame of the image. In this embodiment of the invention, the average value of the change in motion direction angle from the start of tracking to the current frame is taken. This indicates the overall degree of drastic change in the direction of motion of the highlighted area, where... This indicates the number of frames in a continuous video frame sequence.
[0032] Furthermore, the stability of the motion direction in the highlighted area determines the appropriate length of the motion statistics window. A longer window should be used when the direction is stable to smooth noise, while a shorter window should be used when the direction changes abruptly to capture the abrupt change information. Therefore, an adaptive sliding window is constructed to collect historical information on the magnitude of the motion vector. In this embodiment of the invention, the window length of the adaptive sliding window is calculated using the following formula: In the above formula, This indicates the window length of the adaptive sliding window. This represents the average value of the change in the motion direction angle from the start of tracking to the current frame. This represents the maximum value function. The faster the motion direction changes, the shorter the window; the window automatically grows when the motion direction is stable. A lower bound of 1 ensures that at least one frame of image is included.
[0033] Furthermore, in this embodiment of the invention, a motion threshold is set. ,in To adapt the normalized motion speed within the sliding window The standard deviation, if multiple consecutive frames If the light source is a slash, it is marked as a vehicle headlight; otherwise, it is a fixed light source. The equivalent diameter of the light spot is obtained by... Quantification, The area of the highlighted region. Minimal positive number To prevent the denominator from being zero, This represents the motion speed of the image in frame t.
[0034] Step S103: Based on the centroid coordinates, spot area, and average brightness of the headlights in each frame image, predict the state of the headlights in the current frame image.
[0035] Specifically, in underground parking garage monitoring, when vehicle headlights sweep across the screen, the pixels in the central area of the headlights are saturated, making it impossible to directly obtain their position and true brightness from the current frame. Furthermore, vehicle movement involves acceleration, deceleration, and turning, and they may be briefly obscured. If only the detection results of the current frame are relied upon, tracking will be lost when the headlights are overexposed or obscured. Therefore, it is necessary to predict the state of the headlights in the current frame.
[0036] Furthermore, as an optional embodiment of the present invention, predicting the state of the vehicle headlight in the current frame image based on the centroid coordinates, spot area, and average brightness of the headlight in each frame image includes: encapsulating the centroid coordinates, spot area, and average brightness of the headlight into a state vector; using a particle filter algorithm to predict the state vector to obtain the prediction result in the current frame image, wherein the number of particles in the particle filter algorithm is determined based on the trace of the covariance matrix estimated by the current state; determining the detection confidence based on the information between the detection result and the prediction result in the current frame image; correcting the initial observation noise covariance of the particle filter algorithm based on the detection confidence to obtain the observation noise covariance, which corresponds to optimizing the particle filter algorithm; and using the weighted optimal estimate output by the optimized particle filter algorithm as the final prediction result of the state of the headlight in the current frame image.
[0037] Specifically, in this embodiment of the invention, the centroid coordinates, spot area, and average brightness of the vehicle headlight in the t-th frame image are encapsulated as a state vector. . This represents the centroid coordinates of the car headlights in the t-th frame image. This represents the area of the light spot in the t-th frame image. This represents the average brightness of the image in frame t. This indicates that the row vector Transpose to a column vector.
[0038] Furthermore, based on the characteristic that particle filtering does not depend on a fixed motion model, this embodiment of the invention uses the algorithm to predict the motion state of the vehicle lights. This embodiment of the invention calculates the estimated covariance matrix representing the uncertainty of the current state by using the weighted sample covariance of all particles in the current frame image. : In the above formula, The estimated covariance matrix represents the current state with estimated uncertainty. N is the current number of particles, initially set to 1; is the normalized weight of the i-th particle. Let be the state vector of the i-th particle, which includes the centroid coordinates, spot area, and average brightness of the headlight. It is the weighted state mean, which is the optimal estimate for the current frame.
[0039] Furthermore, the number of particles determines the balance between algorithm accuracy and computational cost, while estimating the covariance matrix... traces This reflects the sum of the estimated variances across all dimensions. The greater the uncertainty, the larger the trace. Therefore, finding the trace of a submatrix of the estimated covariance matrix P for the position state is equivalent to dynamically setting the number of particles. .in, It is the submatrix corresponding to position (x, y) in the current state estimation covariance matrix P, reflecting the uncertainty of the algorithm in estimating the position of the headlights; It is the trace of the location covariance submatrix, representing the population variance of the location estimate. The larger the trace, the more uncertain the location. This indicates rounding up to the nearest integer, ensuring the number of particles is an integer and at least 1.
[0040] Furthermore, in standard particle filtering, the observation noise covariance... Typically, a fixed value is set, assuming that the detection results of each frame have the same level of reliability. However, the reliability of vehicle headlight detection in the parking garage dynamically changes depending on whether the headlights are in an overexposed area or are obstructed. Therefore, in this embodiment of the invention, the normalized bias is first obtained by taking the ratio of the standard deviation of the current frame's innovation to the standard deviation of the historical innovation; then, the square of this ratio is taken as the negative exponent to obtain the detection confidence, which represents the level of detection reliability. The innovation is calculated as follows: after completing the particle filtering prediction step in each frame, the state prediction value of the current frame is obtained, and then the actual detection value of the current frame is subtracted from the prediction value and mapped by the observation matrix. Specifically, this embodiment of the invention uses the following formula to calculate the detection confidence: In the above formula, This indicates the confidence level of the detection. This represents the actual detection vector of the current frame image, including the centroid coordinates of the headlight, the area of the light spot, and the average brightness. This indicates that the optimal state estimate of the previous frame is... The observation vector is obtained by mapping the observation matrix H to the observation space. This represents the standard deviation of historical information. e represents the exponential function. This refers to the vector " "Take the mold length."
[0041] Furthermore, embodiments of the present invention utilize the initial observation noise covariance. The ratio of the observation noise to the detection confidence level represents the observation noise covariance, which indicates the adaptive adjustment of detection quality. When the detection is reliable, big, Automatic reduction; the filter trusts the measured values more. Among them... It is a very small positive number, which can be taken as This is used to prevent the denominator from being zero. Let represent the observation noise covariance of the t-th frame image. This represents the initial observation noise covariance. Indicates the confidence level of the detection. It is a very small positive number, which can be taken as .
[0042] Furthermore, in the first frame of tracking, since there is no historical state, the particle filter directly uses the detection result of the current frame as the initial state estimate, and initializes all particles to a random distribution state near the detection value, fluctuating up and down based on the detection value, for example, by position fluctuation. Pixels, area fluctuation Brightness fluctuation At the same time, the confidence level was tested. Temporarily set to 1, observation noise covariance Keep as The normal execution process begins from the second frame.
[0043] Furthermore, in this embodiment of the invention, the state vector of the vehicle lights in each frame of the image is... As input, after two optimized particle filters—adaptive initialization of particle number and adaptive adjustment of observation noise based on detection confidence—a weighted optimal estimate of the state of the vehicle headlights in the current frame image is obtained, which is the final prediction result, including the centroid position, spot area, and average brightness of the vehicle headlights in the current frame.
[0044] Step S104: Determine the illumination weight field of the light source based on the state of the vehicle headlight in the current frame image, the position of any pixel in the current frame image, the position of the fixed light source, and the spatial attenuation law of light intensity.
[0045] Specifically, in an underground parking garage, moving car headlights sweep across the image like searchlights, resulting in both overexposed areas directly illuminated by the headlights and shadowed areas far from the light source within the same frame. There is no clear boundary between these overexposed and shadowed areas, and the boundaries change continuously as the headlights move. To enable adaptive adjustment of image enhancement based on specific regions and avoid halos or artifacts caused by abrupt boundary changes, it is necessary to maintain spatial smoothness and temporal continuity when describing the degree of interference from strong light sources on each pixel. Based on this, a continuous weight field is constructed to represent the degree of interference from strong light sources.
[0046] Furthermore, as an optional embodiment of the present invention, determining the illumination weight field of the light source based on the state of the vehicle headlight in the current frame image, the position of any pixel in the current frame image, the position of the fixed light source, and the spatial attenuation law of light intensity includes: when the light source is a vehicle headlight, establishing a Gaussian attenuation light intensity distribution centered on the vehicle headlight and varying with distance based on the predicted center position, equivalent radius, and average brightness of the vehicle headlight in the current frame image, thus obtaining the spatial attenuation law of light intensity; determining the distance between the position of any pixel in the current frame image and the predicted center position of the vehicle headlight; determining the dynamic illumination weight field of the vehicle headlight based on the distance, equivalent radius, average brightness, and spatial attenuation law of light intensity; when the light source is a fixed light source, setting the weight value of the region centered on the center of the fixed light source and with the equivalent radius of the fixed light source as the radius to the maximum value, and linearly attenuating with increasing distance, thus obtaining the static illumination weight field of the fixed light source; taking the maximum value of the dynamic illumination weight field and the static illumination weight field pixel by pixel at the pixel level to obtain the final illumination weight field of the light source in the current frame image.
[0047] Specifically, since the brightness is highest in the center of the headlight and gradually decreases towards the edges, the predicted center position of the headlight in the current frame image is first determined based on the particle filter output. ), equivalent radius and average brightness A spatially continuous light intensity distribution with a strong center and weak edges is constructed to represent the isotropic light intensity attenuation law with the headlight center as the origin. Among these, This represents the area of the light spot estimated by particle filtering in the t-th frame image.
[0048] Furthermore, in this embodiment of the invention, for any pixel in the current frame image... The location of the vehicle and the distance from the predicted center of the headlights. .
[0049] Furthermore, as an optional embodiment of the present invention, determining the dynamic illumination weight field of the vehicle headlight based on distance, equivalent radius, average brightness, and spatial attenuation law of light intensity includes: determining the Gaussian attenuation form according to the spatial attenuation law of light intensity; determining an adaptive coefficient representing the attenuation rate based on the gradient magnitude of the light spot edges of adjacent frame images; determining the attenuation scale according to the adaptive coefficient, distance, and equivalent radius; determining the attenuation coefficient using the attenuation scale and distance; determining the theoretical light intensity value of the current pixel according to the attenuation coefficient and average brightness; and determining the dynamic illumination weight field of the vehicle headlight using the theoretical light intensity value of each pixel and each distance.
[0050] Specifically, in this embodiment of the invention, the average gradient magnitude of the pixels along the edge of the light spot region detected in the previous frame image is first used. The 99th percentile of the gradient magnitude of the edge pixels of the spot region in the current frame image. ratio This ratio indicates the steepness of the light spot edge; a larger ratio means a sharper edge and faster attenuation. Adding a minimum value constraint yields an adaptive coefficient representing the attenuation rate. , Minimal positive number To prevent the denominator from being zero.
[0051] Furthermore, in this embodiment of the invention, the attenuation scale that adaptively varies with distance is calculated using the following formula. : In the above formula, This represents the attenuation scale, which adaptively varies with distance. This represents the distance between the location of any pixel in the current frame image and the predicted center location of the headlight. Indicates the equivalent radius. This represents the adaptive coefficient. This represents the normalized distance, which is the ratio of the distance from a pixel to the center of the headlight to the radius of the light spot area, multiplied by... This represents the adjustment coefficient for the decay rate based on the steepness of the edge; the steeper the edge, the higher the decay rate. The larger the value, the faster the decay; obtain the decay factor that decreases linearly with distance by subtracting 1, then multiply by... Obtain the attenuation scale representing the current distance. .
[0052] Furthermore, since the intensity of vehicle headlights exhibits a natural attenuation characteristic from the center to the edge, with a stronger intensity at the center and a weaker intensity at the edge, and the Gaussian function can accurately describe this pattern, a Gaussian attenuation form is used to construct an attenuation coefficient that continuously varies with distance. Then multiply by the average brightness estimated by the particle filter. This yields the theoretical light intensity value at the current pixel location. .
[0053] Furthermore, for images under multi-source vehicle headlights, the distance from each pixel to the center k of each light source is calculated using Gaussian attenuation, and then... Normalization process yields the weighting factors. The final weight field is the weighted average of the original weights of each light source. Therefore, any pixel in the current frame image... Dynamic illumination weight field , This represents the distance from the current pixel position to the center k of the light source.
[0054] Furthermore, for highlighted areas detected as fixed light sources, a static weight field is directly generated: with the center of this area as the center and the equivalent radius as the radius, the weight value is set to 1, meaning the static weight field can take the maximum value of 1. This represents complete overexposure, and the exposure decreases linearly with distance to 0, with the attenuation distance being the radius. Finally, the static weight field and the aforementioned dynamic weight field are combined pixel-by-pixel to obtain the final illumination weight field of the light source in the current frame image. This ensures that fixed highlight areas also receive correct darkening processing, ultimately resulting in an illumination weight field of the same size as the original image. In this weight field, the higher the value, the stronger the interference from direct headlights on that pixel.
[0055] Furthermore, weighted fields It quantitatively characterizes the degree of specular interference to each pixel, which can serve as the basis for spatial differentiation processing of brightness adjustment and texture protection in subsequent image enhancement modules, thereby achieving pixel-level adaptive enhancement.
[0056] Step S105: Based on the illumination weight field, perform brightness correction and texture enhancement on each frame of the continuous video frame sequence in parallel to obtain a brightness-corrected image and a detail-enhanced image. Then, perform weighted fusion of the brightness-corrected image and the detail-enhanced image to obtain an enhanced monitoring image.
[0057] Specifically, this invention uses the original image and a highlight weight field as input, employing a parallel dual-branch approach to process brightness and texture issues separately. In the brightness branch, pixel-wise adaptive gamma correction is performed on the brightness component based on the HSV color space, and highlight detail restoration and dark noise suppression are achieved using the weight field. In the texture branch, guided filtering decomposes the image into a basal layer and a detail layer, and adaptive gain is applied to the detail layer using the weight field. Finally, the processing results from the two branches are weighted and fused to output an enhanced image. During image enhancement, brightness adjustment alters the signal-to-noise ratio distribution, making it difficult to distinguish between details and noise during subsequent texture processing; conversely, texture enhancement may over-amplify artifacts in highlight areas. Therefore, a parallel processing and fusion structure for brightness adjustment and texture preservation is adopted to avoid mutual interference.
[0058] Furthermore, as an optional embodiment of the present invention, parallel brightness correction of each frame image in a continuous video frame sequence based on the illumination weight field includes: converting each frame image from an RGB image to an HSV image in the HSV color space, and extracting the brightness component from the HSV image; determining the gamma value of each pixel in each frame image based on the illumination weight field, wherein the gamma value is positively correlated with the weight value of the illumination weight field; performing a power transformation on the brightness component pixel by pixel using the gamma value to obtain the corrected brightness component; merging the corrected brightness component with the brightness component and converting it back to the RGB color space to obtain the brightness-corrected image.
[0059] Specifically, in underground parking garage monitoring, the areas directly illuminated by moving vehicle headlights are extremely bright due to overexposure, while the shadowed areas far from the headlights are extremely dim. Therefore, the brightness of each pixel is independently adjusted according to the illumination weight field to achieve overall image brightness balance. In this embodiment of the invention, the original image is first converted from RGB to HSV color space, and the brightness component is extracted. Then calculate the total range of gamma values. This represents the maximum range of gamma that can be achieved when transitioning from a dark area to a highlight area; multiplying by the illumination weight field makes the gamma value increase linearly with the degree of disturbance; then adding the base value... , ensure when hour Obtain the gamma value for each pixel. The specific calculation is performed using the following formula: In the above formula, Represents pixels The gamma value. Represents pixels The illumination weight field. The baseline value representing the gamma value. This represents the maximum value of the gamma value.
[0060] Among them, in calculation and First, the luminance component of the original image is calculated. The histograms were used to take their 5th percentiles. Typical brightness and 95th percentile of dark areas Represents typical brightness in bright areas; sets the desired corrected brightness, and the target brightness in dark areas. Target brightness of bright areas Using the gamma correction formula Substitute the quantiles and the target value, ,but . ,but .
[0061] Furthermore, in this embodiment of the invention, the luminance component of the original image is corrected using a gamma correction formula. Perform a power-law transformation pixel by pixel to obtain the corrected luminance component. .
[0062] Furthermore, in this embodiment of the invention, the adjusted corrected luminance component The luminance component of the original chromaticity Merge the images, convert them back to the RGB color space, and obtain the luminance-corrected image. .
[0063] Furthermore, the texture clarity in dark areas far from the headlights is low. If uniform texture enhancement is applied to the entire image, it will amplify image noise in the highlight areas of the headlights. Therefore, targeted texture compensation and enhancement processing is required. Guided filtering can separate the image into a base layer representing overall illumination and a detail layer representing detailed features, which can better remove illumination interference and adaptively enhance details. Therefore, as an optional embodiment of the present invention, texture enhancement is performed in parallel on each frame of a continuous video frame sequence based on the illumination weight field to obtain a detail-enhanced image. This includes: performing guided filtering decomposition on each frame of the continuous video frame sequence to obtain a base layer representing the overall illumination distribution and a detail layer representing texture and other detail information; determining the texture gain coefficient of each pixel according to the illumination weight field, wherein the texture gain coefficient is negatively correlated with the weight value of the illumination weight field; and using the texture gain coefficient to amplify the detail layer to obtain a detail-enhanced image.
[0064] Specifically, in this embodiment of the invention, the images of each frame in a continuous video frame sequence are first processed. Guided filtering decomposition is performed to obtain a base layer B representing the overall illumination distribution and a detail layer D representing texture and other detail information. Further, as an optional embodiment of the invention, determining the texture gain coefficient for each pixel based on the illumination weight field includes: calculating the local standard deviation of the detail layer and obtaining a reference value; determining the texture gain coefficient based on the inverse factor of the weight values of the illumination weight field, the local standard deviation, and the reference value.
[0065] Specifically, the embodiments of the present invention are implemented through 1- This yields an inversion factor that reflects the degree to which a pixel is affected by highlight interference. The larger this value, the weaker the interference from headlight highlights in the pixel's area, indicating it's closer to a dark area and thus requires greater texture enhancement. This factor is then multiplied by the local standard deviation of the detail layer. The gain coefficient is obtained by quantizing the 3×3 neighborhood of the current pixel, representing the weakness of the local texture. The weaker the texture, the greater the corresponding gain compensation. Finally, a reference value of 1 is superimposed to obtain the pixel-by-pixel texture gain coefficient. Among them, the local standard deviation of the detail layer. The detail layer image D is obtained by subtracting the guided filter base layer from the original image; for each pixel, all detail layer pixel values within its 3×3 neighborhood are taken; the standard deviation of these 9 pixel values is calculated. Specifically, it is obtained using the following formula: In the above formula, Represents pixels Texture gain coefficient. Represents pixels The illumination weight field. This represents the local standard deviation of the detail layer.
[0066] Furthermore, as an optional embodiment of the present invention, weighted fusion of the brightness correction image and the detail enhancement image to obtain an enhanced monitoring image includes: determining the fusion weight according to the illumination weight field; and superimposing the brightness correction image and the detail enhancement image pixel by pixel according to the fusion weight to obtain the enhanced monitoring image.
[0067] Specifically, in this embodiment of the invention, the final enhanced image is composed of a brightness correction image and a detail enhancement image superimposed, wherein the fusion formula is calculated using the following formula: In the above formula, Represents pixels The pixel values of the merged pixels after brightness correction and detail enhancement. Represents pixels Texture gain coefficient, Pixels representing the detail layer The pixel value. Represents the pixels in the brightness correction map The pixel value. Represents pixels The illumination weight field.
[0068] Thus, after the pixels are fused according to the above formula, an enhanced surveillance image is obtained.
[0069] Furthermore, after weighted fusion of the brightness-corrected image and the detail-enhanced image to obtain the enhanced monitoring image, the method also includes: video encoding and compression of the enhanced monitoring image, and transmission to the monitoring backend via wireless network for display and storage.
[0070] Specifically, in this embodiment of the invention, the final enhanced monitoring image is compressed and digitally encapsulated using H.265 video encoding technology. The digital signal of the image is then converted into a radio frequency signal via a wireless network and transmitted to the monitoring backend for display and storage.
[0071] This invention identifies bright areas in an image through grayscale histogram analysis of a continuous video frame sequence, and further distinguishes between vehicle headlights and fixed light sources. This clarifies the characteristic differences of different light sources, avoiding enhancement deviations caused by confusion of light source types, and improving the targeting and accuracy of image enhancement processing. By acquiring the centroid coordinates, spot area, and average brightness of the vehicle headlights in each frame in real time, dynamic prediction of the headlight status is achieved. This captures dynamic features such as positional shifts, spot size changes, and brightness fluctuations caused by vehicle movement, avoiding problems such as insufficient overexposure recovery and amplified noise in dark areas caused by dynamic changes in the headlights, ensuring the stability and consistency of the enhancement effect. Based on the real-time status of the vehicle headlights, pixel positions, fixed light source parameters, and the spatial attenuation law of light intensity, an illumination weight field is constructed, which can quantify the illumination contribution of different regions in the image, enabling partitioned image processing. This illumination weighting field clearly distinguishes between overexposed, shadowed, and normally illuminated areas, assigning appropriate enhancement parameters to each area. It focuses on restoring details in overexposed areas to prevent loss of detail; moderately enhances brightness in dark areas to suppress noise amplification; and optimizes parameter transitions at the boundary between light and shadow to effectively eliminate artifacts, significantly improving the overall image quality of the enhanced image. Through weighted fusion of the brightness-corrected image and the detail-enhanced image, it balances brightness uniformity and detail richness. The resulting enhanced surveillance image exhibits neither overexposure nor underexposure, and clearly presents key details such as vehicles, pedestrians, and the environment, demonstrating excellent image enhancement performance.
[0072] Example 2: Corresponding to the wireless video surveillance image enhancement method for complex lighting conditions provided in the above embodiments, based on the same technical concept, this embodiment of the invention also provides a wireless video surveillance image enhancement system for complex lighting conditions. This system is used to execute the aforementioned wireless video surveillance image enhancement method for complex lighting conditions. Figure 2 This is a schematic diagram of the structure of a wireless video surveillance image enhancement system for complex lighting conditions, provided in one embodiment of the present invention. Figure 2 As shown. Wireless video surveillance image enhancement systems for complex lighting conditions can vary considerably due to differences in configuration or performance. They may include one or more processors 201 and memory 202. The memory 202 stores computer programs that can run on the processor 201. The processor 201 executes the programs stored in the memory 202 to achieve the above... Figure 1 The various steps in the method embodiment are described. The memory 202 can be temporary or persistent storage. The application stored in the memory 202 may include one or more modules (not shown in the figures), each module may include a series of computer-executable instructions for a wireless video surveillance image enhancement system oriented towards complex lighting conditions.
[0073] Furthermore, the processor 201 can be configured to communicate with the memory 202 and execute a series of computer-executable instructions stored in the memory 202 on the wireless video surveillance image enhancement system for complex lighting conditions. The wireless video surveillance image enhancement system for complex lighting conditions may also include one or more power supplies 203, one or more wired or wireless network interfaces 204, one or more input / output interfaces 205, and one or more keyboards 206.
[0074] Specifically, in this embodiment, the wireless video surveillance image enhancement system for complex lighting conditions includes a processor, a communication interface, a memory, and a communication bus; wherein, the processor, communication interface, and memory communicate with each other via the bus; the memory stores computer programs; and the processor executes the programs stored in the memory to achieve the above... Figure 1 The various steps in the method embodiments are the same as those in the above method embodiments, and have the same beneficial effects. To avoid repetition, the embodiments of the present invention will not be described again here.
[0075] It should be noted that the wireless video surveillance image enhancement system for complex lighting conditions provided in this embodiment of the invention and the wireless video surveillance image enhancement method for complex lighting conditions provided in this embodiment of the invention are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned wireless video surveillance image enhancement method for complex lighting conditions, and has the same or similar beneficial effects. Repeated parts will not be described again.
[0076] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0077] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A wireless video surveillance image enhancement method for complex lighting conditions, characterized in that, The method includes: Obtain a continuous sequence of video frames captured by a surveillance camera; The bright areas in the image are determined based on the grayscale histogram of each frame in the continuous video frame sequence, and the headlights and fixed light sources in the bright areas are identified. Based on the centroid coordinates, spot area, and average brightness of the vehicle headlight in each frame image, predict the state of the vehicle headlight in the current frame image; Based on the state of the vehicle headlight in the current frame image, the position of any pixel in the current frame image, the position of the fixed light source, and the light intensity spatial attenuation law, the illumination weight field of the light source is determined, including: when the light source is a vehicle headlight, based on the predicted center position, equivalent radius, and average brightness of the vehicle headlight in the current frame image, establishing a Gaussian attenuation light intensity distribution centered on the vehicle headlight and varying with distance to obtain the light intensity spatial attenuation law; determining the distance between the position of any pixel in the current frame image and the predicted center position of the vehicle headlight; determining the dynamic illumination weight field of the vehicle headlight based on the distance, the equivalent radius, the average brightness, and the light intensity spatial attenuation law; when the light source is a fixed light source, setting the weight value of the region centered on the center of the fixed light source and with the equivalent radius of the fixed light source as the radius to the maximum value, and linearly attenuating with increasing distance to obtain the static illumination weight field of the fixed light source; taking the maximum value of the dynamic illumination weight field and the static illumination weight field pixel by pixel at the pixel level to obtain the final illumination weight field of the light source in the current frame image; Based on the illumination weight field, brightness correction and texture enhancement are performed on each frame image in the continuous video frame sequence to obtain a brightness-corrected image and a detail-enhanced image. The brightness-corrected image and the detail-enhanced image are then weighted and fused to obtain an enhanced monitoring image.
2. The wireless video surveillance image enhancement method for complex lighting conditions according to claim 1, characterized in that, The step of determining the highlighted areas in the image based on the grayscale histogram of each frame in the continuous video frame sequence, and determining the vehicle lights and fixed light sources in the highlighted areas, includes: A grayscale threshold is determined based on the grayscale histogram of the current frame image, and the bright area is detected from the current frame image using the region growing method and the grayscale threshold. The motion vector of the highlighted region between adjacent frames is determined using optical flow. The motion direction angle is determined based on the motion vector, and the change in motion direction angle between adjacent frame images is also determined. An adaptive sliding window is constructed based on the change in motion direction angle between adjacent frame images; The motion of multiple consecutive frames within the adaptive sliding window is used to determine the headlights and fixed light sources in the highlighted area.
3. The wireless video surveillance image enhancement method for complex lighting conditions according to claim 1, characterized in that, The step of predicting the state of the vehicle headlight in the current frame image based on the centroid coordinates, spot area, and average brightness of the headlight in each frame image includes: The centroid coordinates, spot area, and average brightness of the vehicle headlight are encapsulated as a state vector; The state vector is predicted using a particle filter algorithm to obtain the prediction result in the current frame image. The number of particles in the particle filter algorithm is determined based on the trace of the covariance matrix estimated from the current state. The detection confidence level is determined based on the information between the detection result and the prediction result of the current frame image; The initial observation noise covariance of the particle filter algorithm is corrected based on the detection confidence level to obtain the observation noise covariance, which corresponds to the optimized particle filter algorithm. The weighted optimal estimate output by the optimized particle filter algorithm is used as the final prediction result of the state of the vehicle headlight in the current frame image.
4. The wireless video surveillance image enhancement method for complex lighting conditions according to claim 1, characterized in that, The determination of the dynamic illumination weight field of the vehicle headlights based on the distance, the equivalent radius, the average brightness, and the spatial attenuation law of light intensity includes: The Gaussian attenuation form is determined based on the aforementioned spatial attenuation law of light intensity. Based on the gradient magnitude of the light spot edges in adjacent frame images, an adaptive coefficient representing the attenuation rate is determined; The attenuation scale is determined based on the adaptive coefficient, the distance, and the equivalent radius; The attenuation coefficient is determined using the attenuation scale and the distance; The theoretical light intensity value of the current pixel is determined based on the attenuation coefficient and the average brightness. The dynamic illumination weight field of the vehicle headlight is determined by using the theoretical light intensity value of each pixel and the distances mentioned above.
5. The wireless video surveillance image enhancement method for complex lighting conditions according to claim 1, characterized in that, Brightness correction of each frame in the continuous video frame sequence based on the illumination weight field includes: Each frame of the image is converted from an RGB image to an HSV image in the HSV color space, and the luminance component is extracted from the HSV image. The gamma value of each pixel in each frame image is determined based on the illumination weight field, wherein the gamma value is positively correlated with the weight value of the illumination weight field. The gamma value is used to perform a power transformation on the luminance component pixel by pixel to obtain the corrected luminance component. The corrected luminance component is combined with the luminance component and converted back to the RGB color space to obtain the luminance-corrected image.
6. The wireless video surveillance image enhancement method for complex lighting conditions according to claim 1, characterized in that, Based on the illumination weight field, texture enhancement is performed on each frame of the continuous video frame sequence to obtain a detail-enhanced image, including: The guided filter decomposition is performed on each frame image in the continuous video frame sequence to obtain a base layer representing the overall illumination distribution and a detail layer representing texture and other detail information. The texture gain coefficient of each pixel is determined based on the illumination weight field, wherein the texture gain coefficient is negatively correlated with the weight value of the illumination weight field; The detail layer is magnified using the texture gain coefficient to obtain the enhanced detail image.
7. The wireless video surveillance image enhancement method for complex lighting conditions according to claim 6, characterized in that, The step of determining the texture gain coefficient of each pixel based on the illumination weight field includes: Calculate the local standard deviation of the detail layer and obtain the baseline value; The texture gain coefficient is determined based on the inverse factor of the weight value of the illumination weight field, the local standard deviation, and the reference value.
8. The wireless video surveillance image enhancement method for complex lighting conditions according to claim 1, characterized in that, The step of weightedly fusing the brightness-corrected image and the detail-enhanced image to obtain the enhanced surveillance image includes: The fusion weights are determined based on the illumination weight field; The brightness-corrected image and the detail-enhanced image are superimposed pixel by pixel according to the fusion weight to obtain the enhanced monitoring image.
9. The wireless video surveillance image enhancement method for complex lighting conditions according to claim 1, characterized in that, After weighted fusion of the brightness-corrected image and the detail-enhanced image to obtain the enhanced monitoring image, the method further includes: The enhanced surveillance images are video encoded and compressed, and then transmitted to the monitoring backend via a wireless network for display and storage.
Citation Information
Patent Citations
Image sharpening method and device
CN118229578A
Night vision strong light inhibition imaging method for expressway scene
CN121462887A