Security video image enhancement method under complex illumination condition
By generating row phase maps and consistency maps, and combining cross-channel staggered sampling and orientation comparison guided by structural edges, the problem of artifacts in security video images under complex lighting conditions is solved, achieving precise suppression of artifacts and reconstruction of real information, thus improving image quality and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-03-10
AI Technical Summary
Under complex lighting conditions, traditional enhancement methods struggle to distinguish between real textures and decoding artifacts in security video images, leading to color shifts, edge blurring, and detail breakage. Furthermore, existing technologies lack the ability to recognize line phase differences and sub-pixel response differences.
By reading video frames, the inter-line phase difference and sub-pixel response consistency are calculated to generate a line phase map and a consistency map. Combined with structural edge guidance, cross-channel interleaved sampling and direction comparison are performed to generate a color interleaved map and locate the color edge and the suspected core of the chessboard. Consistency is checked along the time axis to generate a temporal flicker map. Multiple maps are fused in the edge domain to output an artifact region map, and fine-tuning and priority processing of the artifact region are implemented.
It effectively suppresses artifacts caused by exposure and decoding coupling under complex lighting conditions, reconstructs true information in dark areas, improves the overall image quality and robustness of security videos, and ensures time stability.
Smart Images

Figure CN121639867A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing, more particularly, the present application relates to a security video image enhancement method under complex lighting conditions. BACKGROUND
[0002] The security view of the city at night is often in an environment interwoven with multiple light sources. The exterior facade of the business district, the entrance of the basement and the road node frequently appear alternating changes of LED lighting and screen light. The monitoring camera completes exposure in a progressive manner, and then outputs the picture through color filter array decoding and common brightening, contrast enhancement, sharpening and other links. The lighting rhythm and progressive exposure are not synchronized, and there are differences in the response of adjacent scanning lines to color and brightness; after the picture enters the enhancement process, the local anomaly is pulled up as a whole, and small characters, distant outlines and dark textures are more likely to be disturbed near the highlight edge.
[0003] When complex lighting and progressive exposure are superimposed, the smoothness and consistency assumption relied on by color filter array decoding is broken, and color edges and chessboard-like fine textures appear at edges and fine lines; the enhancement link misjudges these artifacts caused by the coupling of acquisition and decoding as real details and presents flicker along the time axis. The distortion is not caused by noise or glare alone, but is the result of the mutual triggering of the pulse rhythm of the LED, the timing difference of the progressive readout and the decoding priori. The traditional enhancement in the brightness domain or single-frame color domain lacks the ability to recognize the line phase difference and sub-pixel excitation difference, and it is difficult to distinguish real textures from decoding artifacts, resulting in color drift, boundary ghosting and detail breakage.
[0004] In order to solve the above problems, a technical scheme is provided. SUMMARY
[0005] In order to overcome the above-mentioned defects of the prior art, the embodiments of the present application provide a security video image enhancement method under complex lighting conditions, which reads video frames, calculates the interline phase difference and sub-pixel response consistency in the progressive order to generate a line phase map and a consistency map and caches them in time sequence, performs cross-channel interleaved sampling and direction comparison under the guidance of structural edges to generate a color interleaving map and locate color edge and chessboard suspected cores while keeping coordinate alignment with the line phase map, performs consistency inspection on the color interleaving map along the time axis to generate a time flicker map and corrects the flicker period and phase with reference to the line phase map while giving time credibility labels to suspected cores, fuses the line phase map, the color interleaving map and the time flicker map in the edge domain to output an artifact area map and a reconstruction guide map and sends an interleaved suppression prompt to step two to constrain subsequent frames, performs one-time verification in the preselected target area according to edge stability and text confidence, fine-tunes the artifact area map and the reconstruction guide map, generates an artifact mask and a priority processing sequence, and writes the verification record back to the cache of step one as initialization information for the next segment, so as to solve the problems raised in the above background.
[0006] To achieve the above objectives, the present invention provides the following technical solution: S1: Read video frames and calculate the line phase difference and sub-pixel response consistency in line-by-line order, generate line phase map and consistency map and cache them in time order; S2: Under the guidance of the structural edge, perform cross-channel staggered sampling and orientation comparison to generate a color staggered map and locate the color edge and the suspected core of the chessboard, and keep the coordinates of the color staggered map and the row phase map aligned one by one. S3: Perform consistency checks on the color interlacing map along the time axis to generate a temporal flashing map, and use the row phase map as a temporal reference to correct the flashing period and phase, while assigning time credibility labels to suspected cores; S4: Fuse the line phase map, color interlacing map, and temporal flicker map within the edge domain, output the artifact region map and reconstruction guidance map, and send an interlacing suppression prompt to step S2 to constrain the interlacing detection intensity and direction of subsequent frames of the same segment; S5: Perform a one-time verification in the pre-selected target area based on edge stability and text confidence. After fine-tuning the artifact region map and reconstruction guidance map, generate an artifact mask and priority processing sequence, and write the verification record back to the cache of step S1 as the initialization information for the next segment.
[0007] Furthermore, the line phase difference is subjected to monotonicity and abrupt change threshold checks in the time dimension to eliminate discrete jump points caused by jitter. The checks include concatenating the current frame line phase difference with the previous frame line phase difference sequence in the time buffer to form a time series, calculating the sign consistency ratio of adjacent differences in the sequence as a monotonicity index, eliminating jump points that exceed the abrupt change threshold, and filling them with linear interpolation.
[0008] Furthermore, the subpixel response consistency establishes gradient direction differences and amplitude ratio deviations for the three color channels at the same pixel location within the edge neighborhood. The calculation includes using the Sobel operator to detect edges and form an edge neighborhood mask, calculating the average of the absolute values of three pairs of directional differences for the red channel gradient, green channel gradient, and blue channel gradient as the directional consistency score, and the average of three pairs of amplitude deviations as the amplitude consistency score, and then taking the product of the two.
[0009] Furthermore, the line phase map and the consistency map use the same coordinate system and the same resolution and are included in the time buffer. The reviewed line phase difference is mapped to a two-dimensional grid with the same resolution as the video frame to form the line phase map, and the sub-pixel response consistency is mapped to the same grid to form the consistency map. They are appended to the time buffer in frame order to ensure the alignment and reference consistency between subsequent maps.
[0010] Furthermore, under the guidance of structural edges, cross-channel staggered sampling and orientation comparison are performed. The main edge direction and its normal are obtained by structural tensor. For each edge point, pixel values and gradients of different color channels are alternately selected at equal intervals on both sides of the normal to form a channel staggered sequence. Calculation is performed in the region where the sub-pixel response consistency in the consistency map is lower than a preset threshold.
[0011] Furthermore, direction comparison and amplitude comparison are performed on the interleaved sequence. The adjacent direction difference sequence of gradient direction angle of adjacent channels is calculated. If the alternation of positive and negative signs in the difference sequence exceeds the preset proportion of the sequence length, it is determined to be an alternation of direction. The amplitude ratio sequence of gradient amplitude of adjacent channels is calculated. If the peak and valley of the ratio sequence alternates more than the preset proportion of the sequence length, it is determined to be a regular fluctuation of amplitude.
[0012] Furthermore, positions that satisfy alternating flipping and regular amplitude fluctuations are marked as colored edges and suspected cores of the chessboard. Short-range connectivity clustering is performed around the suspected cores along the main edge direction to merge isolated points and generate a color staggered map. The coordinates are then aligned one-to-one with the row phase map to remove inconsistent pixel sites.
[0013] Furthermore, a consistency check is performed on the color interlacing map along the time axis. The row index of each suspected core in the color interlacing map is taken and the phase trajectory of the same index in the row phase map is taken to construct a phase-aligned brightness differential sequence. Autocorrelation detection and spectral peak sparsity review are performed in the phase-aligned domain to determine whether there is a stable periodic component in order to mark the temporal scintillation intensity and generate a temporal scintillation map.
[0014] Furthermore, the temporal flicker intensity is combined with the sub-pixel response consistency of the consistency map according to rules. If the temporal flicker intensity exceeds the high flicker intensity threshold and the sub-pixel response consistency is lower than the low consistency threshold, a high temporal confidence is assigned. If the temporal flicker intensity is lower than the low flicker intensity threshold and the sub-pixel response consistency is higher than the high consistency threshold, a low temporal confidence is assigned, thus forming a temporal confidence labeling layer.
[0015] Furthermore, the row phase map, color interlacing map, and temporal flicker map are fused within the edge domain to obtain an edge domain mask using a structural tensor. Fusion is performed only within the edge domain. The fusion input includes the row phase map, color interlacing map, temporal flicker map, and temporal confidence annotation layer. Pixels are selected according to three criteria: spatial consistency, phase consistency, and temporal consistency, and merged along the finite extension area of the normal direction to form an artifact region map.
[0016] The technical effects and advantages of the security video image enhancement method under complex lighting conditions of this invention are as follows: This invention generates and caches a base map by reading video frames, calculating the inter-line phase difference and sub-pixel response consistency, and provides a temporal reference for cross-channel interleaved sampling and comparison guided by structural edges. This accurately locates the suspected core of colored edges and chessboard patterns and ensures coordinate alignment. Subsequently, a temporal flicker map is generated by examining along the time axis, and the period and phase are corrected by the phase map to assign confidence labels, thereby achieving dynamic correction of flicker artifacts. In the edge domain, multiple images are fused to output artifact regions and reconstruction guidelines, and feedback suppression prompts constrain subsequent frames, forming a closed-loop adaptive mechanism. Finally, in the pre-selected area, the mask and priority sequence are fine-tuned based on edge stability and text confidence verification, and the initialization information is written back. The cooperation of the entire process effectively suppresses artifacts caused by exposure and decoding coupling under complex lighting conditions, while reconstructing the true information in dark areas and maintaining temporal stability, thereby improving the overall image quality and robustness of security videos. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the security video image enhancement method under complex lighting conditions according to the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Example 1: Figure 1 The present invention provides a method for enhancing security video images under complex lighting conditions, comprising: S1: Read video frames and calculate the line phase difference and sub-pixel response consistency in line-by-line order, generate line phase map and consistency map and cache them in time order.
[0020] S2: Under the guidance of the structural edge, perform cross-channel interleaved sampling and direction comparison to generate a color interleaved map and locate the color edge and the suspected core of the chessboard, and keep the coordinates of the color interleaved map and the row phase map aligned one by one.
[0021] S3: Perform consistency checks on the color interlacing map along the time axis to generate a temporal flashing map, and use the row phase map as a temporal reference to correct the flashing period and phase, while assigning time credibility labels to suspected cores.
[0022] S4: Fuse the line phase map, color interlacing map, and temporal flicker map within the edge domain, output the artifact region map and reconstruction guidance map, and send an interlacing suppression prompt to step S2 to constrain the interlacing detection intensity and direction of subsequent frames of the same segment.
[0023] S5: Perform a one-time verification in the pre-selected target area based on edge stability and text confidence. After fine-tuning the artifact region map and reconstruction guidance map, generate an artifact mask and priority processing sequence, and write the verification record back to the cache of step S1 as the initialization information for the next segment.
[0024] Urban nighttime surveillance scenarios often face the interplay of multiple light sources, such as alternating LED illumination and screen light, which causes differences in the color and brightness responses of adjacent scan lines during the progressive exposure process of the surveillance camera. These differences cause artifacts such as color fringing, checkerboard textures, and temporal flicker in the color filter array decoding and subsequent enhancement stages. The core challenge lies in the back-end processing link needing to identify and suppress decoding artifacts caused by the coupling between narrow-spectrum illumination and progressive readout, while reconstructing the true information in the dark areas and maintaining temporal stability.
[0025] Video frame reading serves as the starting point of the entire method, directly addressing the inter-line response differences caused by line-by-line exposure under complex lighting conditions. To accurately capture these differences and provide timing references for subsequent steps, it is necessary to generate line phase maps and consistency maps by calculating line phase differences and sub-pixel response consistency, and cache them in time order to ensure cross-frame alignment.
[0026] Step S1: Specific processing logic: Step S1.1: Compile the luminance sequence by row and construct the row luminance waveform. After reading the current video frame, to address the differences in luminance response between adjacent scan rows caused by line-by-line exposure under complex lighting conditions, compile the luminance sequence for each row to construct the row luminance waveform. For each row of pixels in the current video frame, extract the luminance values of all pixels from left to right to form a luminance sequence with a length equal to the width of the row pixels; then, apply a Fourier transform to this luminance sequence to extract the frequency components, constructing the row luminance waveform, represented as a waveform function. ,in For row index, This represents the pixel position along the row direction. It outputs a row-by-row brightness waveform, providing row-by-row brightness characteristics for phase alignment, ensuring the capture of inter-row temporal differences in complex lighting scenes.
[0027] Step S1.2: Perform phase alignment with the corresponding row brightness waveform in the time buffer. Phase alignment is performed using the corresponding row brightness waveform from the previous frame in the time buffer to quantify the timing offset caused by line-by-line readout under complex lighting conditions. The corresponding row index of the previous frame is extracted from the time buffer. Line brightness waveform , with the current row brightness waveform Perform sliding cross-correlation calculation, the cross-correlation function is defined as follows: ,in For displacement offset; select The peak value corresponding to Used as the initial phase offset value. Outputs the initial phase offset value, providing a basis for phase alignment and ensuring that interline differences caused by the rhythm of light source pulses are handled in security video.
[0028] Step S1.3: Perform monotonicity and abrupt change threshold checks on the line phase difference in the time dimension. Using the initial phase offset value as the line phase difference, check in the time dimension to eliminate discrete jumps caused by jitter, addressing anomalies that may be introduced by camera jitter under complex lighting conditions. Concatenate the line phase difference of the current frame with the line phase difference sequence of the previous frame in the time buffer to form a time series. ,in The frame index is used; the monotonicity index of the sequence is calculated as the adjacent difference. The sign consistency ratio is set, and if the ratio is lower than a preset threshold, it is marked as non-monotonic; at the same time, the mutation threshold is set to twice the median of the sequence. If the threshold is exceeded, the jump point is discarded and filled with a linear interpolation of the phase difference before and after. The output is the reviewed row phase difference to ensure data smoothness and provide a reliable time series reference for generating the row phase map, eliminating interference other than light source changes in nighttime security scenarios.
[0029] Step S1.4: Establish sub-pixel response consistency metrics within the edge neighborhood. Based on the reviewed line phase difference, calculate the gradient direction difference and amplitude ratio deviation for the three color channels within the edge neighborhood to form sub-pixel response consistency, thereby identifying regions where the color filter array decoding fails under complex lighting conditions. First, use the Sobel operator to detect edges in the current video frame, forming an edge neighborhood mask; then, for the red channel gradient at the same pixel location... Green channel gradient Blue channel gradient The difference in gradient direction is calculated as follows: Similar calculations and The average of the absolute values of the three pairs of differences is taken as the directional consistency score; the amplitude ratio deviation is... Similar to calculating other pairs, the average of the deviations of the three pairs is taken as the amplitude consistency score; sub-pixel response consistency is the product of the orientation consistency score and the amplitude consistency score. The sub-pixel response consistency is output, quantifying the response differences between channels and providing a metric for generating the consistency map.
[0030] Step S1.5: Draw the row phase map and consistency map and incorporate them into the time buffer. Integrate the reviewed row phase difference and sub-pixel response consistency, draw two maps and cache them, ensuring that the coordinate system and resolution are consistent, providing a basis for alignment. Map the reviewed row phase difference to a two-dimensional grid with the same resolution as the video frame to form a row phase map, where each pixel value corresponds to the phase difference of its row; map the sub-pixel response consistency to the same grid to form a consistency map; both maps use the same row index and column pixel coordinate system, with resolution matching the video frame size, and are appended to the time buffer in frame order. Output cached versions of the row phase map and consistency map to ensure temporal stability and lay a coordinate consistency foundation for cross-frame fusion in complex lighting security scenarios.
[0031] Step S1 involves reading video frames and collecting the luminance sequence line by line to construct a line luminance waveform. Then, phase alignment is performed with the corresponding line luminance waveform in the time buffer to calculate the line phase difference. Monotonicity and abrupt change threshold checks are performed in the time dimension to eliminate discrete jump points caused by jitter. At the same time, gradient direction differences and amplitude ratio deviations are established for the three color channels at the same pixel position in the edge neighborhood to form sub-pixel response consistency. Finally, the line phase difference is drawn as a line phase map and the sub-pixel response consistency is drawn as a consistency map. The two maps use the same coordinate system and resolution and are included in the time buffer, thereby ensuring the consistency of map alignment and referencing and providing a timing basis for cross-frame processing.
[0032] Step S1 has generated the row phase map and consistency map and cached them in chronological order, which provides a basis for capturing inter-row temporal differences and sub-pixel response consistency. In order to further locate the color edge and checkerboard artifacts at the edge under complex lighting, this step needs to perform cross-channel interleaved sampling and orientation comparison under the guidance of the structural edge to generate a color interleaved map and ensure that it is aligned with the coordinates of the row phase map.
[0033] Step S2: Specific processing logic: Step S2.1: Obtain the main edge direction and its normal using the structure tensor. Based on the row phase map and consistency map generated in step S1, the structure tensor of the current video frame is first calculated to obtain the main edge direction and its normal, providing edge guidance for interleaving sampling, especially for scenes where small text and dark textures near highlight edges are easily disturbed under complex lighting conditions. The structure tensor matrix is calculated for each pixel position in the current video frame. This matrix is composed of the average of the outer products of the horizontal and vertical gradient components. By solving for the eigenvalues and eigenvectors of the structure tensor matrix, the eigenvector corresponding to the largest eigenvalue is selected as the main edge direction vector. Its perpendicular vector is used as the normal vector. The main edge direction vector represents the extension direction of the edge, and the normal vector represents the perpendicular direction of the edge. This calculation is performed only in areas where the sub-pixel response consistency in the consistency map is below a preset threshold, in order to focus on potential artifact areas. This logic outputs the main edge direction vector and the normal vector, which form the basis for determining the direction of interleaved sampling along the normal, ensuring accurate location of edge anomalies caused by the rhythm of light source pulses in security videos.
[0034] Step S2.2: Intersample each edge point along the normal to form a channel interleaved sequence. Using the main edge direction vector and the normal vector, sample points at equal intervals on both sides of each edge point along the normal, alternately selecting pixel values and gradients of the red, green, and blue channels to form a channel interleaved sequence, in order to capture the channel response differences caused by the decoding assumptions of the color filter array under complex lighting conditions. Select the edge point indicated by the main edge direction vector in the current video frame as the starting point; along the normal vector... In both positive and negative directions, 5 to 7 sampling points are collected at equal intervals with a fixed step size (e.g., 1 pixel unit); at these sampling points, pixel value sequences are extracted alternately in a cyclical order of red channel-green channel-blue channel-red channel. With gradient sequence The pixel value sequence records brightness or color intensity, while the gradient sequence records direction and amplitude. The sequence length is fixed at the number of sampling points to ensure alternating coverage of channels on both sides of the normal direction. The output channel interleaved sequence includes pixel value and gradient sequences, supporting the recognition of fine textures generated by the coupling of line-by-line readout and decoding in nighttime security scenarios.
[0035] Step S2.3: Perform direction and amplitude comparison on the interlaced sequence. Based on the channel interlaced sequence, perform direction and amplitude comparison to determine whether the gradient direction alternates and whether the amplitude fluctuates regularly, targeting the characteristics of color fringing and checkerboard artifacts at edges and fine lines under complex lighting. For gradient sequences Calculate the gradient direction angle of adjacent channels. Then calculate the difference sequence in adjacent directions. If the alternation of positive and negative signs in the difference sequence exceeds a predetermined percentage of the sequence length, it is determined to be an alternation of direction; for amplitude comparison, the gradient amplitude of adjacent channels is calculated. Then calculate the amplitude ratio sequence. If the alternation of peaks and troughs in the ratio sequence (alternation between ratios greater than 1 and less than 1) exceeds the preset standard for sequence length, it is determined to be a regular fluctuation in amplitude. The resulting direction comparison results and amplitude comparison results are used to quantify the abnormal patterns of the interlaced sequence, providing criteria for labeling suspected cores and distinguishing real details from decoding artifacts in security video enhancement.
[0036] Step S2.4: Mark the suspected core of the colored edge and the checkerboard. Based on the direction comparison and amplitude comparison results, mark the edge points that satisfy the alternating flip and obvious amplitude fluctuation as suspected cores, addressing the boundary blur and detail breakage caused by the overall elevation of local anomalies under complex lighting. If the direction comparison result shows alternating flip and the amplitude comparison result shows regular fluctuation, then mark the edge point as the suspected core of the colored edge and the checkerboard, and record its pixel coordinates and row index; the marking threshold is set to satisfy both criteria simultaneously to avoid isolated noise interference; all suspected core point sets are initially stored in a temporary list, sorted by row index to match the row phase map of step S1. The obtained suspected core point set includes coordinates and indexes, providing seed points for clustering, and effectively locating the artifact core caused by the pulse rhythm of light-emitting diodes in urban nighttime monitoring.
[0037] Step S2.5: Perform short-range connected clustering along the main edge direction to generate a color staggered map. Using the set of suspected core points, perform short-range connected clustering along the main edge direction vector, merging isolated points to generate a color staggered map, targeting the connectivity characteristics of the checkerboard-like fine texture under complex lighting. Starting from each suspected core point, perform short-range connected clustering along the main edge direction vector... The algorithm searches for other suspected core points within a neighborhood (e.g., a radius of 3 pixels) in both positive and negative directions. If the distance is less than a preset connectivity threshold (e.g., 2 pixels), they are merged into the same cluster. A flood-fill algorithm is used to expand the cluster boundaries, but the expansion distance is limited to no more than 5 pixels in the main edge direction to achieve short-range clustering. All clusters are mapped to a two-dimensional grid with the same resolution as the video frame, forming a color interlacing map, where pixels within a cluster have a value of 1 (representing an interlacing region) and pixels outside the cluster have a value of 0. The color interlacing map serves as a region representation of suspected artifacts, preparing data for alignment and fusion, and integrating isolated artifact points in security videos to improve detection accuracy.
[0038] Step S2.6: Perform one-to-one coordinate alignment verification between the color interlacing map and the row phase map, and remove inconsistent pixel sites. Based on the color interlacing map and the row phase map from step S1, perform one-to-one coordinate alignment verification and remove inconsistent pixel sites to avoid coordinate drift during fusion, especially important for scenarios where strict alignment is required for time buffers under complex lighting conditions. Compare the coordinates of each pixel in the color interlacing map and the row phase map. If a pixel with a value of 1 in the color interlacing map has no valid phase difference value at its corresponding position in the row phase map (i.e., null value or out of range), then directly set that pixel to 0 in the color interlacing map. The verification process is performed row by row index to ensure that the coordinate system, row index, and pixel position of the two maps are completely matched. After removal, update the cluster boundaries of the color interlacing map. This ensures no coordinate drift and provides reliable input for timing verification.
[0039] Step S2 obtains the main edge direction and its normal using the structure tensor, and performs staggered sampling along the normal for each edge point to form a channel staggered sequence. Then, it performs direction comparison on the staggered sequence to determine whether the gradient direction alternates and flips, and magnitude comparison to determine whether the gradient magnitude fluctuates regularly. This marks the colored edges and suspected cores of the chessboard that meet the conditions. Short-range connectivity clustering is then performed around the suspected cores along the main edge direction to merge isolated points and generate a color staggered map. Finally, it performs coordinate alignment verification with the row phase map to remove inconsistent pixel sites, thereby locating spatial artifacts and avoiding coordinate drift during fusion.
[0040] Step S2 has generated a color interlacing map under the guidance of the structural edge and located the color edge and the suspected core of the chessboard. At the same time, it ensures that the coordinates are aligned with the row phase map, which provides a basis for capturing spatial interlacing anomalies. In order to further test the stability of these anomalies on the time axis and correct the flickering, this step needs to perform a consistency test on the color interlacing map along the time axis to generate a temporal flickering map and use the row phase map as a temporal reference. At the same time, a temporal credibility label is assigned to the suspected core.
[0041] Step S3: Specific processing logic: Step S3.1: For each suspected core in the color interlacing map, extract the row index and phase trajectory to construct a phase-aligned luminance differential sequence. Based on the color interlacing map generated in Step S2 and its suspected core point set, extract the row index of each suspected core, and obtain the phase trajectory with the same index from the row phase map in Step S1 to construct a phase-aligned luminance differential sequence, addressing the scenario where temporal flicker under complex lighting is caused by the difference between the LED pulse rhythm and line-by-line readout. Traverse each pixel position marked as 1 in the color interlacing map and record its row index. Then, the corresponding row index is extracted from the row phase map in the time cache, along with the pixel coordinates. Phase trajectory sequence ,in The frame index represents the phase difference value across multiple frames; for the same pixel coordinates in the current video frame and the previous few frames (e.g., the first 5 frames), a sequence of luminance values is extracted. And based on the phase trajectory sequence Perform shift alignment, which involves shifting the brightness value of each frame backward or forward. One unit is used to eliminate inter-line temporal offset; after alignment, the first-order difference is calculated on the luminance value sequence to form the luminance differential sequence. It is used to capture minute fluctuations in brightness. The output phase-aligned brightness differential sequence provides a time-aligned data basis for autocorrelation detection, ensuring that the flicker period caused by the alternating changes of light sources is accurately reflected in security videos. At the same time, it inherits the row index and coordinate system of steps S1 and S2, which facilitates the connection of spectral peak review and prepares preliminary temporal features for the time credibility annotation layer.
[0042] Step S3.2: Perform autocorrelation detection and spectral peak sparsity review within the phase-aligned domain to determine stable periodic components. Using the phase-aligned brightness differential sequence, perform autocorrelation detection and spectral peak sparsity review to determine the presence of stable periodic components, addressing the flickering characteristic of decoding artifacts along the time axis under complex lighting conditions. The phase-aligned brightness differential sequence... Calculate the autocorrelation function ,in A lag shift is used, covering one-third of the sequence length, to detect periodic correlation peaks; then, a Fourier transform is applied to the autocorrelation function to obtain the power spectrum. ,in The system performs a spectral sparsity check on the frequency; that is, it identifies the number of peaks in the power spectrum. If the number of peaks is less than 3 and the main peak energy accounts for more than a preset percentage of the total energy, a stable periodic component is determined to exist. The frequency corresponding to the main peak is the flicker period, and the peak phase is extracted by inverse Fourier transform. If there are too many peaks or the energy is dispersed, no stable periodic component is determined to exist. The output results of the stable periodic component judgment, including flicker period and phase, provide a quantitative basis for labeling the temporal flicker intensity, effectively distinguishing between real dynamic changes and periodic flicker caused by artifacts in nighttime security scenarios.
[0043] Step S3.3: Label the temporal flicker intensity and generate a temporal flicker map. Based on the stable periodic component judgment result, label the temporal flicker intensity at the locations where stable periodic components exist, and generate a temporal flicker map to address flickering caused by artifact amplification in the enhancement process under complex lighting conditions. If a stable periodic component is determined to exist, calculate the temporal flicker intensity as the ratio of the main peak energy of the power spectrum to the total energy, normalizing it to the range of 0 to 1; assign this intensity value to the pixel coordinates of the suspected core; traverse all suspected cores, mapping the intensity values to a two-dimensional grid with the same resolution as the color interlacing map to form a temporal flicker map, where the intensity value is a quantification of the flicker degree, and non-suspected core locations are set to 0; the temporal flicker map is organized by row index and pixel coordinates to ensure resolution matching with the row phase map. The output temporal flicker map contains flicker intensity labels for each suspected core, providing temporal domain features for rule combinations.
[0044] Step S3.4: Combine temporal flicker intensity and sub-pixel response consistency using rules to assign temporal credibility labels, forming a temporal credibility labeling layer. Integrate temporal flicker intensity with the sub-pixel response consistency in the consistency map from Step S1, and perform rule combinations to assign temporal credibility labels, forming a temporal credibility labeling layer. This is for scenes under complex lighting conditions where spatial and temporal cues need to be combined to distinguish between real textures and artifacts. For each suspected core pixel coordinate, extract the temporal flicker intensity from the temporal flicker map. Extracting sub-pixel response consistency from the consistency map Application rule combination: If Exceeding the high flicker intensity threshold and If the value is below the low consistency threshold, a high time reliability (value of 3) is assigned; if Below the low flicker intensity threshold and If the value is higher than the high consistency threshold, a low temporal confidence level (value 1) is assigned; otherwise, a medium temporal confidence level (value 2) is assigned. The confidence level values are mapped to a grid with the same resolution as the suspected core, forming a temporal confidence level annotation layer, with non-suspected core locations set to 0. This method quantifies the temporal reliability of suspected cores, providing a temporal consistency criterion for the fusion rules in step S4, thereby improving the confidence level of artifact detection in security video enhancement.
[0045] Step S3.5: Ensure all data is strictly aligned with the row phase map using both row index and pixel coordinate constraints. Based on the time confidence annotation layer and the time-series scintillation map, the double constraints of row index and pixel coordinates ensure that all data is strictly aligned with the row phase map, addressing scenarios where coordinate drift needs to be avoided in time buffers under complex lighting conditions. Compare the pixel coordinates and row indexes of each pixel in the time-series scintillation map, the time confidence annotation layer, and the row phase map. If a pixel with a non-zero value in the time-series scintillation map or annotation layer has no valid phase trajectory at the corresponding position in the row phase map, then set that pixel to 0. The double constraints include verifying row index matching row by row and aligning the column positions of pixel coordinates. After alignment, update the boundaries of the two maps to ensure that the resolution is consistent with the buffer in step S1, and append the updated data to the time buffer.
[0046] Step S3 performs a consistency check on the color interlacing map along the time axis. For each suspected core, the row index and phase trajectory in the row phase map are extracted to construct a phase-aligned brightness differential sequence. Then, autocorrelation detection and spectral peak sparsity review are performed in the phase-aligned domain to determine the stable periodic component. When the component exists, the temporal flicker intensity is labeled to generate a temporal flicker map. At the same time, the temporal flicker intensity and the consistency of the sub-pixel response of the consistency map are combined according to rules to assign temporal credibility labels to suspected cores, forming a temporal credibility labeling layer. This ensures that all data is strictly aligned with the row phase map through the dual constraints of row index and pixel coordinates, thereby providing a temporally stable artifact feature reference for fusion.
[0047] Step S3 has generated a temporal flicker map and a temporal credibility annotation layer along the time axis, and corrected the flicker period and phase with the line phase map as a reference, providing support for the temporal artifact features. In order to integrate spatial, phase and temporal clues to accurately define artifacts, it is necessary to fuse the line phase map, color interlacing map and temporal flicker map in the edge domain, output the artifact region map and reconstruction guidance map, and send an interlacing suppression prompt to step S2 to constrain subsequent frame processing.
[0048] Step S4: Specific processing logic: Step S4.1: Obtain the edge domain mask using the structure tensor and perform fusion within the edge domain. Based on the aligned temporal flicker map and temporal reliability annotation layer from step S3, calculate the structure tensor of the current video frame to generate the edge domain mask, limiting the fusion range to the edge region. Recalculate the structure tensor matrix for each pixel position of the current video frame, which is composed of the average of the outer products of the horizontal and vertical gradient components; solve for the eigenvalues of the structure tensor matrix, and select the pixels with the largest eigenvalue exceeding a preset threshold as edge points to form a binary edge domain mask, where edge points have a value of 1 and non-edge points have a value of 0; the fusion operation is limited to the region where the mask value is 1 to focus on areas with high artifact incidence, while inheriting the main edge direction vector from step S2 as an auxiliary reference. The edge domain mask defines the spatial range of fusion, providing boundary constraints for rule application, avoiding irrelevant calculations in non-edge regions to improve efficiency, and ensuring that the mask resolution matches the previous phase. Figure 1 To.
[0049] Step S4.2: Prepare the fusion input, including the row phase map, color interlacing map, temporal flicker map, and temporal confidence annotation layer. Using an edge domain mask, extract the fusion input data from the temporal cache and previous steps. Extract the row phase map and consistency map from the temporal cache of step S1; extract the aligned color interlacing map from step S2; extract the temporal flicker map and temporal confidence annotation layer from step S3; all input maps are uniformly cropped to the area covered by the edge domain mask, ensuring that the resolution, row index, and pixel coordinates of each map are perfectly matched; the input data is organized in a layered manner for easy pixel-by-pixel access. By integrating multi-source artifact cues, a complete data source is provided for rule-based criterion applications, enabling joint spatial-temporal analysis and accumulating necessary gradient information for reconstructing the channel imbalance indication of the guide map.
[0050] Step S4.3: Apply fusion rules, following three criteria: spatial consistency, phase consistency, and temporal consistency. Based on the fused input layer set, apply the three criteria pixel-by-pixel to filter pixels that meet the conditions. For each pixel within the edge domain mask, first check spatial consistency: compare the main edge direction vector of the suspected core in the color interlacing map with the edge direction derived from the structure tensor. If the angle difference is less than a fixed value, it satisfies the same or nearly same direction. Second, check phase consistency: extract the phase trajectory sequence of the row where the suspected core is located. With adjacent trajectory sequences Calculate the trajectory difference sequence If the absolute value of the difference sequence does not exceed a preset multiple of the phase difference review threshold, a smooth relationship is formed. Finally, time consistency is checked: values are extracted from the time confidence level annotation layer; if the value is 2 or 3, it meets the medium-to-high level requirement. A pixel is marked as a valid fusion point only when all three criteria are met simultaneously. By screening reliable artifact candidates and eliminating isolated or inconsistent anomalies, false positives are reduced. Simultaneously, the criteria parameters are ensured to be coordinated with the review threshold in step S1 and the confidence level layer in step S3, facilitating merging and expansion, and providing a screening basis for the spatial distribution of interleaving suppression prompts.
[0051] Step S4.4: Merge the pixels that meet the criteria with their finite extension regions along the normal to form an artifact region map. Based on the set of valid merge points, extend and merge along the normal to form the artifact region map. Starting from each valid merge point, extend along the normal vector of step S2. The positive and negative directions are extended by a limited distance (e.g., 3 pixels), incorporating pixels within the extended area into the same region. A connected component labeling algorithm is used to merge adjacent valid points with the extended area, forming connected clusters. All clusters are mapped to a two-dimensional grid, generating an artifact region map, where pixels within a cluster have a value of 1 and pixels outside have a value of 0, with resolution matching the input map. The artifact region map is used to define the complete artifact boundaries, providing a regional basis for reconstructing the guidance map. This captures the extended forms of colored edges and checkerboard patterns in security video enhancement, while inheriting the previous coordinate system to facilitate the localization of channel imbalance calculations and providing a framework for the connected structure analysis of suppressed prompts.
[0052] Step S4.5: Calculate the channel imbalance indicator and edge normal half-width within the artifact region, and output a reconstruction guide map. Calculate the channel imbalance indicator and normal half-width within the region based on gradient differences, generating a reconstruction guide map that includes direction and extent. For each pixel within the artifact region map, extract the gradient direction differences of the three channels from the consistency map. , , Deviation from amplitude ratio , , The channel imbalance indicator is the pair of channels with the largest deviation. The maximum value indicates an imbalance between red and green channels, prioritizing the suppression of channels with larger deviations. The edge normal half-width is the distance at which the gradient magnitude decays to a preset percentage of its initial value along the normal vector. The output reconstruction guidance map is a multi-channel map; one channel stores the normal vector direction, another stores the normal half-width, and the third stores the channel imbalance indicator code. The reconstruction guidance map includes reconstruction direction, range, and channel priority indication, providing guidance for the exploratory reconstruction in step S5, supporting targeted channel compensation in the monitoring video, while ensuring that the calculated parameters are consistent with the gradient in step S1, facilitating the verification of fine-tuning applications, and accumulating repair strategies for overall artifact suppression.
[0053] Step S4.6: Based on the connectivity structure and spatial distribution of temporal reliability in the artifact region map, generate an interleaving suppression cues and send them to step S2. Integrate the reconstruction guidance map and artifact region map from step S4.5, analyze the connectivity structure and reliability distribution to generate interleaving suppression cues. Extract the boundaries and sizes of connected clusters from the artifact region map, and extract the average reliability within the clusters from the temporal reliability annotation layer; generate suppression cues, including the suppressed interleaving detection region (a rectangle extending 1 pixel from the cluster boundary) and the constraint band along the main edge direction (5-pixel buffers at both ends of the cluster length); the cues are encoded into a record list and stored sequentially by frame segment; send them to step S2 for interleaving sampling to adjust the detection intensity (reducing the comparison threshold of the suppressed region) and direction (restricting to the main edge direction) of subsequent frames. Interleaving suppression cues achieve cross-frame feedback constraints, reducing repeated artifact detection in security video processing to optimize real-time performance, and providing suppression record support for the initialization information of the next segment.
[0054] Step S4 obtains the edge domain mask using the structure tensor and prepares the fusion input, including the row phase map, color interlacing map, temporal flicker map, and temporal credibility annotation layer. Then, it applies three criteria—spatial consistency, phase consistency, and temporal consistency—to filter effective fusion points and expands and merges them along the normal direction to form an artifact region map. At the same time, it calculates the channel imbalance indicator and edge normal half-width within the artifact region to output a reconstruction guidance map that includes the directional range. Based on the connectivity structure of the artifact region map and the spatial distribution of temporal credibility, it generates an interlacing suppression prompt and sends it to step S2, thereby realizing multi-clue fusion and feedback constraints and providing an artifact definition basis for subsequent verification.
[0055] Step S4 has fused multiple images in the edge domain to output the artifact region map and reconstruction guidance map, and sent interleaving suppression prompts to constrain subsequent frames. In order to finally verify the authenticity of the artifacts and optimize the processing, a one-time verification needs to be performed in the pre-selected target area based on edge stability and text confidence. After fine-tuning the artifact region map and reconstruction guidance map, an artifact mask and priority processing sequence are generated, and the verification record is written back to the time buffer of step S1 as the initialization of the next segment.
[0056] Step S5: Specific processing logic: Step S5.1: Calculate the edge steady-state index. Based on the artifact region map and reconstruction guidance map from Step S4, calculate the edge steady-state index within the pre-selected target region to quantify the difference in gradient direction and magnitude between adjacent frames at the same coordinate. Extract the same pixel coordinates of the current frame and the previous frame from the time buffer. Calculate the gradient direction difference as the absolute value of the current frame's direction angle minus the previous frame's direction angle; calculate the gradient magnitude difference as the ratio of the current frame's magnitude to the absolute value of the previous frame's magnitude; use the product of the direction difference and the magnitude difference as the steady-state index. A lower steady-state index indicates a more stable and reliable edge. This calculation is performed only in the pre-selected target region marked as 1 in the artifact region map. The pre-selected target region is defined as a user-specified or default focal area, such as the center of the image or a densely highlighted area. Calculating the edge steady-state index provides a stability benchmark for text confidence calculation and index change comparison, assesses the impact of light source changes on edge continuity, facilitates targeted applications of exploratory reconstruction, and accumulates initial measurement data for verifying index changes to support cross-segment stability.
[0057] Step S5.2: Calculate the text confidence index. The text confidence index is calculated using the edge steady-state index to evaluate stroke width consistency, bimodality of foreground-background contrast, and hole integrity of connected glyphs. Within the pre-selected target region, the foreground and background are segmented using the Otsu thresholding algorithm. The bimodality of foreground-background contrast is calculated as the distance between the bimodals of the brightness histogram divided by the total range. Contours are extracted from connected glyphs, and hole integrity is calculated as the ratio of the number of closed holes to the expected number of holes, with the expected number of holes based on a pre-defined glyph topology. Stroke width consistency is calculated as the product of the relative deviations of the stroke widths sampled along the contour. The weighted sum of the normalized bimodality, hole integrity, and stroke width consistency is used as the text confidence index; a higher index indicates more reliable text features. The text confidence index quantifies the reliability of text within the region, providing a text benchmark for comparing changes after exploratory reconstruction.
[0058] Step S5.3: Perform tentative local channel reconstruction. Based on the text confidence index and the reconstruction guidance map from step S4, perform tentative local channel reconstruction along the normal direction within the area indicated by the artifact region map. Based on the channel imbalance indication, perform directional suppression on imbalanced channels and directional compensation on opposing channels, while maintaining the monotonicity of brightness in the edge direction without reversal. Extract the normal vector direction, normal half-width, and channel imbalance indication from the reconstruction guidance map; along the normal vector within the half-width range, apply a linear decay function to imbalanced channels (such as channels with large suppression deviations when red and green are imbalanced) to make their pixel values approximate the neighborhood average; apply compensation gain to opposing channels to increase their pixel values towards the original amplitude, but not exceeding a preset multiple of the original; simultaneously monitor the brightness sequence in the edge direction to ensure that the compensated sequence remains monotonically increasing or decreasing without reversal, and adjust the gain iteratively until monotonicity is satisfied; reconstruction is limited to pixels within the artifact region map, and a temporary reconstructed area is output. The temporary area after tentative reconstruction simulates the effect of artifact restoration, providing before-and-after comparison data for comparing index changes, and testing the impact of channel balance on the reconstruction of dark area information.
[0059] Step S5.4: Compare the changes in the edge steady-state index and the text confidence index, fine-tune them, and generate an artifact mask and a priority processing sequence. Compare the changes in the edge steady-state index and the text confidence index before and after reconstruction. If the steady-state index increases and the text confidence index increases, the artifact is confirmed and an artifact mask and a priority processing sequence are generated; otherwise, local contraction is performed. Calculate the edge steady-state index and the text confidence index after reconstruction using the same method as in substeps S5.1 and S5.2; compare the changes: the steady-state change is the negative value of the post-reconstruction steady-state index minus the initial steady-state index (an increase indicates a smaller negative value), and the text confidence change is the positive value of the post-reconstruction index minus the initial index; if the steady-state change is lower than the steady-state improvement threshold and the text confidence change is higher than the text enhancement threshold, the corresponding region artifact is confirmed, and the region is written into the artifact mask (binary map, confirmation area is 1); at the same time, it is added to the priority processing sequence according to the region size and confidence level, and the sequence is arranged in descending order of text confidence; if the conditions are not met, the artifact region map and the reconstruction guidance map are locally contracted, the normal half-width ratio is reduced, and the boundary is updated. The artifact mask and priority processing sequence, as well as the fine-tuned artifact region map and reconstruction guide map, provide verification results for the final write-back. By quantifying the changes, false artifacts are eliminated, thereby maintaining temporal stability. At the same time, it ensures that the fine-tuning and the expansion region of step S4 are merged and coordinated, which facilitates the seamless integration of initialization information and accumulates priority sequences for the next segment processing to improve overall efficiency and accuracy.
[0060] Step S5.5: Write the verification record and write it back to the time buffer of Step S1. Write the region determination, direction range, channel imbalance indication, and index changes to the verification record and write it back to the time buffer of Step S1, ensuring consistency in name, coordinates, resolution, and alignment. The verification record includes region determination (confirmed or shrunken binary code), direction range (updated normal vector and half-width), channel imbalance indication (copied from the reconstruction guide map), and index changes (difference between steady state and text). The record format is a structured list, organized by row index and pixel coordinates. Write it back to the end of the time buffer as initialization information for the next segment, ensuring that the coordinate system and resolution of the record completely match the previous row phase map and other data products, without drift. Output the written-back version of the verification record to achieve closed-loop initialization, providing a preset artifact reference for subsequent video segments, supporting continuous enhancement under dynamic lighting in security videos, and providing a feedback mechanism for the overall method's temporal stability to reduce accumulated errors.
[0061] Step S5 calculates the edge steady-state index and text confidence index in the pre-selected target area, and then performs exploratory local channel reconstruction in the area indicated by the artifact region map and reconstruction guidance map to compare index changes. If the changes indicate improvement, the artifact is confirmed and an artifact mask and priority processing sequence are generated. Otherwise, local contraction is performed. Finally, the region determination, direction range, channel imbalance indication and index changes are written into the verification record and written back to the time cache, thereby completing the verification fine-tuning and providing a consistent basis for the initialization of the next segment.
[0062] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0063] It should be noted that the system of the present invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting a variety of hardware environments and usage requirements.
[0064] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
[0065] It should be noted that, in this document, the use of relational terms such as "first" and "second" is merely to distinguish one entity or operation from another, and does not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0066] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for security video image enhancement under complex lighting conditions, characterized in that, The method comprises the steps of: S1: reading video frames and calculating row phase difference and sub-pixel response consistency in row order to generate row phase map and consistency map and cache in time order; S2: performing cross-channel interlacing sampling and direction comparison under the guidance of structural edges to generate color interlacing map and locate color edges and chessboard suspected cores, and align the color interlacing map and the row phase map in coordinates one by one; S3: performing consistency test on the color interlacing map along the time axis to generate a time sequence flicker map, and correcting the flicker period and phase with the row phase map as the time sequence reference, and giving time credibility label to the suspected cores; S4: fusing the row phase map and the color interlacing map and the time sequence flicker map in the edge domain to output the artifact area map and the reconstruction guide map, and sending the interlacing suppression prompt to step S2 to constrain the interlacing detection strength and direction of subsequent frames in the same segment; S5: performing one-time verification in the preselected target area according to the edge stability and text confidence, fine-tuning the artifact area map and the reconstruction guide map to generate the artifact mask and the priority processing sequence, and writing the verification record back to the cache of step S1 as the initialization information of the next segment.
2. The security video image enhancement method under complex lighting conditions according to claim 1, wherein: The row phase difference is subjected to monotonicity and mutation threshold review in the time dimension to eliminate discrete jump points caused by jitter, and the review includes connecting the current row phase difference and the row phase difference sequence in the time cache to form a time sequence, calculating the consistent proportion of the signs of the adjacent differences in the sequence as a monotonicity index, and eliminating the jump points exceeding the mutation threshold and filling them with linear interpolation.
3. The security video image enhancement method under complex lighting conditions according to claim 2, wherein: The sub-pixel response consistency establishes gradient direction difference and amplitude proportion deviation of three color channels at the same pixel position in the edge neighborhood, and the calculation includes using Sobel operator to detect edges to form an edge neighborhood mask, calculating the average of the absolute values of three pairs of direction differences of the red channel gradient, green channel gradient and blue channel gradient as the direction consistency score, and the average of the three pairs of amplitude deviation as the amplitude consistency score, and taking the product of the two.
4. The security video image enhancement method under complex lighting conditions according to claim 3, wherein: The row phase map and the consistency map adopt the same coordinate system and the same resolution and are included in the time cache, the reviewed row phase difference is mapped to a two-dimensional grid with the same resolution as the video frame to form the row phase map, and the sub-pixel response consistency is mapped to the same grid to form the consistency map, which is appended to the time cache in frame order to ensure the alignment and consistency of subsequent maps.
5. The security video image enhancement method under complex lighting conditions according to claim 1, wherein: Cross-channel interlacing sampling and direction comparison are performed under the guidance of structural edges, the principal edge direction and its normal are obtained from the structural tensor, the pixel values and gradients of different color channels are alternately selected by sampling points equidistant on both sides of the normal at each edge point to form a channel interlacing sequence, and the calculation is performed in the area where the sub-pixel response consistency in the consistency map is lower than the pre-set threshold.
6. The security video image enhancement method under complex lighting conditions according to claim 5, characterized in that: Performing directional comparison and amplitude comparison on the interleaved sequence, calculating the adjacent direction difference sequence of the gradient direction angle of adjacent channels, and determining the direction alternating flip if the positive and negative signs in the difference sequence alternate more than a preset proportion of the sequence length, and calculating the amplitude ratio sequence of the gradient amplitude of adjacent channels, and determining the amplitude regular fluctuation if the peak and valley in the ratio sequence alternate more than a preset proportion of the sequence length.
7. The security video image enhancement method under complex lighting conditions according to claim 6, characterized in that: The positions satisfying alternating flip and amplitude regular fluctuation are marked as color edge and chessboard suspected core, and isolated points are merged to generate a color interleaving map along the main edge direction around the suspected core.
8. The security video image enhancement method under complex lighting conditions according to claim 1, characterized in that: Performing consistency test on the color interleaving map along the time axis, taking the row index of each suspected core in the color interleaving map and the phase trajectory of the same index in the row phase map, constructing a phase-aligned brightness differential sequence, and performing autocorrelation detection and spectral peak sparsity review in the phase-aligned domain to determine whether there is a stable periodic component to label the temporal flicker intensity and generate a temporal flicker map.
9. The security video image enhancement method under complex lighting conditions according to claim 8, characterized in that: Combining the temporal flicker intensity and the sub-pixel response consistency of the consistency map regularly, if the temporal flicker intensity exceeds the high flicker intensity threshold and the sub-pixel response consistency is lower than the low consistency threshold, it is given a high temporal credibility, if the temporal flicker intensity is lower than the low flicker intensity threshold and the sub-pixel response consistency is higher than the high consistency threshold, it is given a low temporal credibility, forming a temporal credibility labeling layer.
10. The security video image enhancement method under complex lighting conditions according to claim 9, characterized in that: Fusing the row phase map, the color interleaving map and the temporal flicker map in the edge domain, obtaining an edge domain mask with a structure tensor, performing fusion only in the edge domain, the fusion input includes the row phase map, the color interleaving map, the temporal flicker map and the temporal credibility labeling layer, following the three criteria of spatial consistency, phase consistency and temporal consistency to filter the pixel points and merge along the normal direction to form an artifact region map.