Video surveillance image optimization processing method based on low-light image enhancement algorithm
By combining the dark channel prior algorithm and multiple image enhancement technologies, the problem of poor quality of video surveillance images in low-light environments is solved, the clarity and recognizability of the images are improved, and the naturalness and practicality of the images are enhanced.
Patent Information
- Application Number
- CN202510311143.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-03-17
AI Technical Summary
The images obtained by existing video surveillance systems in low-light environments are of poor quality, with problems such as low contrast, blurred details, and obvious noise, which affects the quality and usability of surveillance images.
A low-light image enhancement algorithm is used to improve the brightness, contrast and clarity of low-light video surveillance images through the combination of dark channel prior algorithm and multiple image enhancement technologies, including the acquisition of illumination component images, weighted fusion of reflection component images, color restoration processing and optimization processing of deep learning models.
It significantly improves the clarity and recognizability of low-light video surveillance images, enhances the naturalness and practicality of images, improves the image processing speed and reliability, and ensures image enhancement effects.
Smart Images

Figure CN119809956B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a video surveillance image optimization processing method based on a low-light image enhancement algorithm. Background Art
[0002] With the widespread adoption of video surveillance technology, the quality of surveillance images in low-light conditions is receiving increasing attention. Traditional video surveillance systems often capture low-light images in low-light environments or in low-light conditions, such as at night, on cloudy days, or in dimly lit indoor environments. These low-light images suffer from low contrast, blurred details, and significant noise, severely impacting the quality and usability of surveillance images and significantly inconveniencing security monitoring operations. Therefore, there is an urgent need for video surveillance image optimization processing methods based on low-light image enhancement algorithms to address the poor image quality of existing video surveillance systems in low-light environments. Summary of the Invention
[0003] The purpose of this invention is to propose a video surveillance image optimization processing method based on a low-light image enhancement algorithm, which optimizes video surveillance images through an effective low-light image enhancement method, improves the clarity and recognizability of the image, and thus improves the performance and reliability of the video surveillance system.
[0004] To achieve the above objectives, the present invention provides a video surveillance image optimization processing method based on a low-light image enhancement algorithm, comprising the following steps:
[0005] S1. Filter and process the video surveillance image to obtain a low-light video surveillance image;
[0006] S2. Obtaining an image enhancement result of the low-light video surveillance image based on a low-light image enhancement algorithm according to the low-light video surveillance image;
[0007] S3. Perform optimization processing according to the image enhancement result of the low-light video surveillance image to obtain a video surveillance image optimization processing result.
[0008] Optionally, the filtering and processing of the video surveillance image to obtain the low-light video surveillance image includes:
[0009] S1-1, using a video surveillance device to collect video surveillance images in real time;
[0010] S1-2. Acquire historical low-light video surveillance images based on the video surveillance image and the corresponding historical video surveillance images to construct a historical low-light video surveillance image dataset;
[0011] S1-3. Filtering the video surveillance image using the historical low-light video surveillance image dataset to obtain the low-light video surveillance image;
[0012] The video surveillance images include low-light, normal-light and over-exposed video surveillance images.
[0013] Optionally, performing screening processing on the video surveillance image using the historical low-light video surveillance image dataset to obtain the low-light video surveillance image includes:
[0014] S1-3-1. Using the historical low-light video surveillance image dataset, obtain brightness standards, contrast standards, and color feature standards of historical low-light video surveillance images as screening criteria for low-light video surveillance images;
[0015] S1-3-2. Filter the video surveillance image using the screening criteria for the low-light video surveillance image to obtain an initial low-light video surveillance image;
[0016] S1-3-3, acquiring the low-light video surveillance image according to the screening criteria for the low-light video surveillance image and the initial low-light video surveillance image;
[0017] Among them, the brightness standard is that the grayscale value of the low-light video surveillance image is less than 50, the contrast standard is that the contrast of the low-light video surveillance image is lower than 15, and the color feature standard is that the hue value of the low-light video surveillance image is 200-300 degrees.
[0018] Optionally, acquiring the low-light video surveillance image according to the screening criteria of the low-light video surveillance image and the initial low-light video surveillance image includes:
[0019] S1-3-3-1. Perform grayscale processing on the initial low-light video surveillance image to obtain a grayscale value of the initial low-light video surveillance image as a brightness feature of the initial low-light video surveillance image;
[0020] S1-3-3-2. Using a Soble operator according to the initial low-light video surveillance image, obtain the gradient amplitude of the initial low-light video surveillance image as a contrast feature of the initial low-light video surveillance image;
[0021] S1-3-3-3. Convert the initial low-light video surveillance image from the RGB color space to the HSV color space to obtain a hue value of the initial low-light video surveillance image as a color feature of the initial low-light video surveillance image;
[0022] S1-3-3-4. Determine whether the brightness feature of the initial low-light video surveillance image meets the brightness standard. If so, execute S1-3-3-5. Otherwise, use the brightness feature that does not meet the standard to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2.
[0023] S1-3-3-5. Determine whether the contrast feature of the initial low-light video surveillance image meets the contrast standard. If so, execute S1-3-3-6. Otherwise, use the non-compliant contrast feature to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2.
[0024] S1-3-3-6. Determine whether the color features of the initial low-light video surveillance image meet the color feature standards. If so, obtain the initial low-light video surveillance image as the low-light video surveillance image. Otherwise, use the non-compliant color features to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2.
[0025] Optionally, obtaining an image enhancement result of the low-light video surveillance image based on a low-light image enhancement algorithm according to the low-light video surveillance image includes:
[0026] S2-1, obtaining an illumination component image of the low-light video surveillance grayscale image based on the low-light video surveillance image using a dark channel priori algorithm;
[0027] S2-2, obtaining a reflection component image of the low-light video surveillance grayscale image using the illumination component image of the low-light video surveillance grayscale image;
[0028] S2-3. Perform weighted fusion on the illumination component image of the low-light video surveillance grayscale image and the reflection component image of the low-light video surveillance grayscale image to obtain a fusion result of the low-light video surveillance grayscale image as an enhanced image of the low-light video surveillance grayscale image;
[0029] S2-4. Perform color restoration processing on the enhanced image of the low-light video surveillance grayscale image to obtain an image enhancement result of the low-light video surveillance image.
[0030] Optionally, obtaining an illumination component image of a low-light video surveillance grayscale image by using a dark channel priori algorithm based on the low-light video surveillance image includes:
[0031] S2-1-1. Obtain a low-light video surveillance grayscale image using a weighted average method using the low-light video surveillance image;
[0032] S2-1-2. Perform segmentation processing on the low-light video surveillance grayscale image to obtain a plurality of local areas;
[0033] S2-1-3. Obtaining a minimum pixel value of each local area according to the plurality of local areas as a pixel value of a dark channel video surveillance image;
[0034] S2-1-4. Obtaining an atmospheric light value using the low-light video surveillance grayscale image based on the pixel value of the dark channel video surveillance image;
[0035] S2-1-5. Obtain a preliminary predicted value of the illumination component based on the weight coefficient, the pixel value of the low-light video surveillance grayscale image, and the atmospheric light value;
[0036] S2-1-6. Perform Gaussian filtering on the preliminary predicted value of the illumination component to obtain an illumination prediction result of the low-light video surveillance grayscale image as the illumination component image of the low-light video surveillance grayscale image;
[0037] The weight coefficient is a parameter for adjusting the difference between the pixel value of the low-light video surveillance grayscale image and the atmospheric light value.
[0038] Optionally, obtaining a reflection component image of the low-light video surveillance grayscale image by using the illumination component image of the low-light video surveillance grayscale image includes:
[0039] S2-2-1. Obtain a reflection component prediction image of the low-light video surveillance grayscale image using the illumination component image of the low-light video surveillance grayscale image and the low-light video surveillance grayscale image;
[0040] S2-2-2. Perform contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain an initial reflection component image of the low-light video surveillance grayscale image.
[0041] S2-2-3. Using a Laplace operator, based on the initial reflection component image of the low-light video surveillance grayscale image, obtain Laplace response values of pixels corresponding to the initial reflection component image as grayscale change values of the pixels in the initial reflection component image;
[0042] S2-2-4. Setting a grayscale change threshold of the initial reflection component image pixel according to the grayscale change value of the initial reflection component image pixel;
[0043] S2-2-5. Perform edge detection on the low-light video surveillance grayscale image according to the grayscale change value of the initial reflection component image pixel and the grayscale change threshold of the initial reflection component image pixel to obtain the edge area and non-edge area of the low-light video surveillance grayscale image as the edge detection result;
[0044] S2-2-6. Perform detail enhancement processing on the initial reflection component image of the low-light video surveillance grayscale image according to the edge detection result to obtain a detail enhancement processing result of the initial reflection component image as the reflection component image of the low-light video surveillance grayscale image;
[0045] Among them, the edge area of the low-light video surveillance grayscale image is the pixel whose grayscale change value of the initial reflection component image pixel is greater than the grayscale change threshold of the initial reflection component image pixel, and the non-edge area of the low-light video surveillance grayscale image is the pixel whose grayscale change value of the initial reflection component image pixel is less than or equal to the grayscale change threshold of the initial reflection component image pixel, and the grayscale change threshold of the initial reflection component image pixel is 20.
[0046] Optionally, performing contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain the initial reflection component image of the low-light video surveillance grayscale image includes:
[0047] S2-2-2-1. Using the reflection component prediction image of the low-light video surveillance grayscale image to perform segmentation, a plurality of local image blocks of the reflection component prediction image are obtained;
[0048] S2-2-2-2. Obtaining the grayscale variance of each local image block according to the local image blocks of the plurality of reflection component prediction images;
[0049] S2-2-2-3. Obtaining an average grayscale variance of the reflection component prediction image based on the grayscale variance of each local image block;
[0050] S2-2-2-4. Setting a grayscale variance threshold of the reflection component prediction image according to the grayscale variance average value of the reflection component prediction image;
[0051] S2-2-2-5. Determine whether the grayscale variance averages of the reflection component prediction image meet the grayscale variance threshold of the reflection component prediction image. If so, execute S2-2-2-6; otherwise, directly execute S2-2-2-7.
[0052] S2-2-2-6. Perform linear contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain an initial reflection component image of the low-light video surveillance grayscale image;
[0053] S2-2-2-7. Perform nonlinear contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain the initial reflection component image of the low-light video surveillance grayscale image.
[0054] Optionally, performing optimization processing according to the image enhancement result of the low-light video surveillance image to obtain the video surveillance image optimization processing result includes:
[0055] S3-1. Obtain an image enhancement result corresponding to the historical low-light video surveillance image using the historical low-light video surveillance image;
[0056] S3-2. Setting an image enhancement standard for the historical low-light video surveillance image according to the image enhancement result of the historical low-light video surveillance image;
[0057] S3-3. Determine whether the image enhancement result of the low-light video surveillance image meets the image enhancement standard of the historical low-light video surveillance image; if so, obtain the image enhancement result of the low-light video surveillance image as the video surveillance image optimization processing result; otherwise, execute S3-4;
[0058] S3-4. Perform optimization processing according to the image enhancement result of the low-light video surveillance image to obtain the video surveillance image optimization processing result.
[0059] Optionally, performing optimization processing according to the image enhancement result of the low-light video surveillance image to obtain the video surveillance image optimization processing result includes:
[0060] S3-4-1. Obtain a standard enhanced image of a historical low-light video surveillance image using an image enhancement standard for historical low-light video surveillance images;
[0061] S3-4-2. Using the standard enhanced image of the historical low-light video surveillance image as input and the optimization processing result corresponding to the standard enhanced image as output, constructing a video surveillance image enhancement model based on deep learning;
[0062] S3-4-3. Performing optimization processing on the low-light video surveillance image using the video surveillance image enhancement model to obtain an optimized image enhancement result;
[0063] S3-4-4. Determine whether the optimization processing result of the image enhancement result meets the image enhancement standard of the historical low-light video surveillance image. If so, obtain the optimization processing result of the image enhancement result as the optimization processing result of the video surveillance image. Otherwise, obtain the optimization processing result of the image enhancement result that does not meet the standards, add it to the video surveillance image, and return to S1-2.
[0064] Compared with the closest prior art, the present invention has the following beneficial effects:
[0065] The present invention adopts a combination of a dark channel prior algorithm and multiple image enhancement technologies to effectively improve the brightness, contrast and clarity of low-light video surveillance images, enrich the detail information in the image, thereby significantly improving the clarity and recognizability of the image, and providing more accurate and reliable image information for security monitoring; image fusion and color restoration processing can make the enhanced image more natural and realistic, consistent with the color style of the original image, improve the practicality and aesthetics of the image, and facilitate the observation and analysis of image information by monitoring personnel; the image enhancement results of the low-light video surveillance images are optimized using the video surveillance image enhancement model, and the optimization processing results that do not meet the image enhancement standards are iteratively processed, thereby improving the processing speed as well as the clarity and reliability of the image, and ensuring the image enhancement effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0067] Figure 1 The flowchart of the video surveillance image optimization processing method based on the low-light image enhancement algorithm according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0068] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0069] The terms used in the embodiments of the present invention are only used to explain the specific embodiments of the present invention and are not intended to limit the present invention.
[0070] like Figure 1 As shown, an embodiment of the present invention provides a video surveillance image optimization processing method based on a low-light image enhancement algorithm, comprising the following steps:
[0071] S1. Filter and process the video surveillance image to obtain a low-light video surveillance image;
[0072] S2. Obtaining an image enhancement result of the low-light video surveillance image based on a low-light image enhancement algorithm according to the low-light video surveillance image;
[0073] S3. Perform optimization processing according to the image enhancement result of the low-light video surveillance image to obtain a video surveillance image optimization processing result.
[0074] S1 specifically includes:
[0075] S1-1, using a video surveillance device to collect video surveillance images in real time;
[0076] S1-2. Acquire historical low-light video surveillance images based on the video surveillance image and the corresponding historical video surveillance images to construct a historical low-light video surveillance image dataset;
[0077] S1-3. Filtering the video surveillance image using the historical low-light video surveillance image dataset to obtain the low-light video surveillance image;
[0078] The video surveillance images include low-light, normal-light and over-exposed video surveillance images.
[0079] S1-3 specifically includes:
[0080] S1-3-1. Using the historical low-light video surveillance image dataset, obtain the brightness standard, contrast standard, and color feature standard of historical low-light video surveillance images as screening criteria for low-light video surveillance images. In this embodiment, the brightness standard is set to a grayscale value of the low-light video surveillance image of less than 50, the contrast standard is set to a contrast of the low-light video surveillance image of less than 15, and the color feature standard is set to a hue value of the low-light video surveillance image of 200-300 degrees.
[0081] S1-3-2. Filter the video surveillance image using the screening criteria for the low-light video surveillance image to obtain an initial low-light video surveillance image;
[0082] S1-3-3. Acquire the low-light video surveillance image according to the screening criteria for the low-light video surveillance image and the initial low-light video surveillance image.
[0083] S1-3-3 specifically includes:
[0084] S1-3-3-1. Perform grayscale processing on the initial low-light video surveillance image to obtain a grayscale value of the initial low-light video surveillance image as a brightness feature of the initial low-light video surveillance image;
[0085] S1-3-3-2. Using the Soble operator according to the initial low-light video surveillance image, obtain the gradient amplitude of the initial low-light video surveillance image as a contrast feature of the initial low-light video surveillance image;
[0086] S1-3-3-3. Convert the initial low-light video surveillance image from the RGB color space to the HSV color space to obtain a hue value of the initial low-light video surveillance image as a color feature of the initial low-light video surveillance image;
[0087] S1-3-3-4. Determine whether the brightness feature of the initial low-light video surveillance image meets the brightness standard. If so, execute S1-3-3-5. Otherwise, use the brightness feature that does not meet the standard to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2.
[0088] S1-3-3-5. Determine whether the contrast feature of the initial low-light video surveillance image meets the contrast standard. If so, execute S1-3-3-6. Otherwise, use the non-compliant contrast feature to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2.
[0089] S1-3-3-6. Determine whether the color features of the initial low-light video surveillance image meet the color feature standards. If so, obtain the initial low-light video surveillance image as the low-light video surveillance image. Otherwise, use the non-compliant color features to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2.
[0090] S2 specifically includes:
[0091] S2-1, obtaining an illumination component image of the low-light video surveillance grayscale image based on the low-light video surveillance image using a dark channel priori algorithm;
[0092] S2-2, obtaining a reflection component image of the low-light video surveillance grayscale image using the illumination component image of the low-light video surveillance grayscale image;
[0093] S2-3. Perform weighted fusion on the illumination component image of the low-light video surveillance grayscale image and the reflection component image of the low-light video surveillance grayscale image to obtain a fusion result of the low-light video surveillance grayscale image as an enhanced image of the low-light video surveillance grayscale image;
[0094] S2-4. Perform color restoration processing on the enhanced image of the low-light video surveillance grayscale image to obtain an image enhancement result of the low-light video surveillance image.
[0095] S2-1 specifically includes:
[0096] S2-1-1. Obtain a low-light video surveillance grayscale image using a weighted average method using the low-light video surveillance image;
[0097] S2-1-2. Divide the low-light video surveillance grayscale image into several local areas. In this embodiment, a square area of 15×15 pixels is used as a sub-block (the size can be adjusted according to the actual image resolution and effect);
[0098] S2-1-3. Obtaining a minimum pixel value of each local area according to the plurality of local areas as a pixel value of a dark channel video surveillance image;
[0099] S2-1-4. Obtaining atmospheric light values using the low-light video surveillance grayscale image based on the pixel values of the dark channel video surveillance image, specifically:
[0100] Setting a target pixel point of the dark channel video surveillance image, wherein the atmospheric light value is obtained at the target pixel point of the dark channel video surveillance image. In this embodiment, the atmospheric light value is set to be obtained at the brighter 0.1% (the ratio can be fine-tuned) pixel point in the dark channel video surveillance image;
[0101] Obtaining a pixel value corresponding to the target pixel in the low-light video surveillance grayscale image according to the target pixel of the dark channel video surveillance image and the pixel value of the dark channel video surveillance image;
[0102] Obtaining a maximum pixel value as the atmospheric light value based on the corresponding pixel value of the target pixel point in the low-light video surveillance grayscale image;
[0103] S2-1-5. Obtain a preliminary predicted value of the illumination component based on the weight coefficient, the pixel value of the low-light video surveillance grayscale image, and the atmospheric light value. Specifically:
[0104] First, a difference adjustment parameter between the pixel value of the low-light video surveillance grayscale image and the atmospheric light value is set as a weight coefficient based on the pixel value of the low-light video surveillance grayscale image and the atmospheric light value. When the weight coefficient is closer to 1, it means that the difference between the pixel value of the low-light video surveillance grayscale image and the atmospheric light value is adjusted less, and the relative proportion of the original lighting information is more likely to be retained. This facilitates the subsequent processing of some low-light images with relatively uniform lighting and rich details. It can better restore the original light and shadow structure of the image and avoid image distortion caused by over-correction;
[0105] Then, the preliminary prediction value of the illumination component is calculated according to the weight coefficient in combination with the pixel value of the low-light video surveillance grayscale image and the atmospheric light value. The preliminary prediction value J(x) of the illumination component is:
[0106]
[0107] Where A is the atmospheric light value, is the weight coefficient, which is generally set to 0.95~1. In this embodiment, the weight coefficient is set to 0.95. I(x) is the pixel value of the low-light video surveillance grayscale image;
[0108] S2-1-6. Perform Gaussian filtering based on the preliminary predicted value of the illumination component to obtain the illumination prediction result of the low-light video surveillance grayscale image as the illumination component image of the low-light video surveillance grayscale image. The standard deviation of the Gaussian filter in this embodiment is selected between 10-30.
[0109] S2-2 specifically includes:
[0110] S2-2-1. Obtain a reflection component prediction image of the low-light video surveillance grayscale image using the illumination component image of the low-light video surveillance grayscale image and the low-light video surveillance grayscale image;
[0111] S2-2-2. Perform contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain an initial reflection component image of the low-light video surveillance grayscale image.
[0112] S2-2-3. Using a Laplace operator, based on the initial reflection component image of the low-light video surveillance grayscale image, obtain Laplace response values of pixels corresponding to the initial reflection component image as grayscale change values of the pixels in the initial reflection component image;
[0113] S2-2-4. Setting a grayscale change threshold of the initial reflection component image pixel according to the grayscale change value of the initial reflection component image pixel;
[0114] S2-2-5. Perform edge detection on the low-light video surveillance grayscale image according to the grayscale change value of the initial reflection component image pixel and the grayscale change threshold of the initial reflection component image pixel to obtain the edge area and non-edge area of the low-light video surveillance grayscale image as the edge detection result;
[0115] S2-2-6. Perform detail enhancement processing on the initial reflection component image of the low-light video surveillance grayscale image according to the edge detection result to obtain a detail enhancement processing result of the initial reflection component image as the reflection component image of the low-light video surveillance grayscale image;
[0116] Among them, the edge area of the low-light video surveillance grayscale image is the pixel whose grayscale change value of the initial reflection component image pixel is greater than the grayscale change threshold of the initial reflection component image pixel, and the non-edge area of the low-light video surveillance grayscale image is the pixel whose grayscale change value of the initial reflection component image pixel is less than or equal to the grayscale change threshold of the initial reflection component image pixel.
[0117] In low-light monitoring images of clear building outlines, due to low noise and distinct edge features, a higher threshold (i.e., a grayscale change threshold of 50) can effectively eliminate interference and accurately identify true building edges. In contrast, in low-light, foggy road monitoring images, due to high noise and blurred edges, a lower threshold (i.e., a grayscale change threshold of 20) can capture more of the edges of the true road and vehicles obscured by fog. In this embodiment, the grayscale change threshold for the pixels in the initial reflection component image is set to 20.
[0118] A high-frequency boost filtering algorithm is used in the edge areas of low-light video surveillance grayscale images, and a local adaptive histogram equalization algorithm is used in the non-edge areas of low-light video surveillance grayscale images. The high-frequency boost filtering and local adaptive histogram equalization algorithms can perform targeted enhancement processing on different areas of the image, making the edges of the image clearer and sharper, and further improving the local contrast, thereby enhancing the overall visual effect of the image.
[0119] S2-2-2 specifically includes:
[0120] S2-2-2-1. Using the reflection component prediction image of the low-light video surveillance grayscale image to perform segmentation, a plurality of local image blocks of the reflection component prediction image are obtained;
[0121] S2-2-2-2. Obtaining the grayscale variance of each local image block according to the local image blocks of the plurality of reflection component prediction images;
[0122] S2-2-2-3. Obtain the average grayscale variance of the reflection component prediction image based on the grayscale variance of each local image block. Specifically:
[0123] The grayscale variance of all local image blocks is added and divided by the total number of image blocks to calculate the average grayscale variance of the reflection component prediction image. ;
[0124] S2-2-2-4. Setting a grayscale variance threshold of the reflection component prediction image according to the grayscale variance average value of the reflection component prediction image. Specifically:
[0125] According to the grayscale variance average of the reflection component prediction image, the grayscale variance threshold of the reflection component prediction image is set to , k is a constant greater than 1, generally between 1.5 and 3;
[0126] S2-2-2-5. Determine whether the grayscale variance averages of the reflection component prediction image meet the grayscale variance threshold of the reflection component prediction image. If so, execute S2-2-2-6; otherwise, directly execute S2-2-2-7.
[0127] S2-2-2-6. Perform linear contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain an initial reflection component image of the low-light video surveillance grayscale image. Specifically:
[0128] Obtaining all pixels of the reflection component prediction image according to the reflection component prediction image of the low-light video surveillance grayscale image, and calculating the minimum grayscale value and the maximum grayscale value, which define the grayscale range of the reflection component prediction image;
[0129] The target range to which the image grayscale range is stretched is determined based on actual needs. This range is usually the full range from 0 to 255, i.e., the minimum target grayscale value is 0 and the maximum target grayscale value is 255. In this embodiment, the target grayscale range is set based on the grayscale range of the image predicted by the reflection component.
[0130] Performing linear contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image based on the linear transformation coefficient to obtain an initial reflection component image of the low-light video surveillance grayscale image;
[0131] S2-2-2-7. Perform nonlinear contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain an initial reflection component image of the low-light video surveillance grayscale image. Specifically:
[0132] Obtaining all pixels of the reflection component prediction image according to the reflection component prediction image of the low-light video surveillance grayscale image, and normalizing the grayscale values to the interval [0, 1] to obtain normalized grayscale values of the reflection component prediction image;
[0133] A nonlinear transformation formula is used based on the normalized grayscale value of the reflection component prediction image and the nonlinear transformation coefficient to obtain the nonlinear transformation grayscale value of the reflection component prediction image, wherein the nonlinear transformation coefficient is selected or adjusted according to the actual situation of the reflection component prediction image;
[0134] The nonlinear transformation grayscale value of the reflection component prediction image is denormalized to the interval [0, 255] to obtain the initial reflection component image of the low-light video surveillance grayscale image, completing the nonlinear contrast stretching.
[0135] S3 specifically includes:
[0136] S3-1. Obtain an image enhancement result corresponding to the historical low-light video surveillance image using the historical low-light video surveillance image;
[0137] S3-2. Setting an image enhancement standard for the historical low-light video surveillance image according to the image enhancement result of the historical low-light video surveillance image;
[0138] S3-3. Determine whether the image enhancement result of the low-light video surveillance image meets the image enhancement standard of the historical low-light video surveillance image; if so, obtain the image enhancement result of the low-light video surveillance image as the video surveillance image optimization processing result; otherwise, execute S3-4;
[0139] S3-4. Perform optimization processing according to the image enhancement result of the low-light video surveillance image to obtain the video surveillance image optimization processing result.
[0140] S3-4 specifically includes:
[0141] S3-4-1. Obtain a standard enhanced image of a historical low-light video surveillance image using an image enhancement standard for historical low-light video surveillance images;
[0142] S3-4-2. Using the standard enhanced image of the historical low-light video surveillance image as input and the optimization processing result corresponding to the standard enhanced image as output, constructing a video surveillance image enhancement model based on deep learning;
[0143] S3-4-3. Performing optimization processing on the low-light video surveillance image using the video surveillance image enhancement model to obtain an optimized image enhancement result;
[0144] S3-4-4. Determine whether the optimization processing result of the image enhancement result meets the image enhancement standard of the historical low-light video surveillance image. If so, obtain the optimization processing result of the image enhancement result as the optimization processing result of the video surveillance image. Otherwise, obtain the optimization processing result of the image enhancement result that does not meet the standards, add it to the video surveillance image, and return to S1-2.
[0145] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0146] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0147] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A video surveillance image optimization processing method based on a low-light image enhancement algorithm, characterized in that: The specific steps include: S1. Filter and process the video surveillance image to obtain a low-light video surveillance image; The low-light video surveillance images are obtained by screening and processing the video surveillance images, including: S1-1, using a video surveillance device to collect video surveillance images in real time; S1-2. Acquire historical low-light video surveillance images based on the video surveillance image and the corresponding historical video surveillance images to construct a historical low-light video surveillance image dataset; S1-3. Filtering the video surveillance image using the historical low-light video surveillance image dataset to obtain the low-light video surveillance image; The video surveillance images include low-light, normal-light and over-exposed video surveillance images; S2. Obtaining an image enhancement result of the low-light video surveillance image based on a low-light image enhancement algorithm according to the low-light video surveillance image; Obtaining an image enhancement result of the low-light video surveillance image based on the low-light image enhancement algorithm according to the low-light video surveillance image includes: S2-1, obtaining an illumination component image of the low-light video surveillance grayscale image based on the low-light video surveillance image using a dark channel priori algorithm; S2-2, obtaining a reflection component image of the low-light video surveillance grayscale image using the illumination component image of the low-light video surveillance grayscale image; S2-3. Perform weighted fusion on the illumination component image of the low-light video surveillance grayscale image and the reflection component image of the low-light video surveillance grayscale image to obtain a fusion result of the low-light video surveillance grayscale image as an enhanced image of the low-light video surveillance grayscale image; S2-4. Performing color restoration processing on the enhanced image of the low-light video surveillance grayscale image to obtain an image enhancement result of the low-light video surveillance image; S3. Performing optimization processing on the low-light video surveillance image according to the image enhancement result to obtain a video surveillance image optimization processing result; Performing optimization processing according to the image enhancement result of the low-light video surveillance image to obtain the video surveillance image optimization processing result includes: S3-1. Obtain an image enhancement result corresponding to the historical low-light video surveillance image using the historical low-light video surveillance image; S3-2. Setting an image enhancement standard for the historical low-light video surveillance image according to the image enhancement result of the historical low-light video surveillance image; S3-3. Determine whether the image enhancement result of the low-light video surveillance image meets the image enhancement standard of the historical low-light video surveillance image; if so, obtain the image enhancement result of the low-light video surveillance image as the video surveillance image optimization processing result; otherwise, execute S3-4; S3-4. Perform optimization processing according to the image enhancement result of the low-light video surveillance image to obtain the video surveillance image optimization processing result.
2. The video surveillance image optimization processing method based on the low-light image enhancement algorithm according to claim 1 is characterized in that: The method of obtaining the low-light video surveillance image by filtering the video surveillance image using the historical low-light video surveillance image dataset includes: S1-3-1. Using the historical low-light video surveillance image dataset, obtain brightness standards, contrast standards, and color feature standards of historical low-light video surveillance images as screening criteria for low-light video surveillance images; S1-3-2. Filter the video surveillance image using the screening criteria for the low-light video surveillance image to obtain an initial low-light video surveillance image; S1-3-3, acquiring the low-light video surveillance image according to the screening criteria for the low-light video surveillance image and the initial low-light video surveillance image; Among them, the brightness standard is that the grayscale value of the low-light video surveillance image is less than 50, the contrast standard is that the contrast of the low-light video surveillance image is lower than 15, and the color feature standard is that the hue value of the low-light video surveillance image is 200-300 degrees.
3. The video surveillance image optimization processing method based on the low-light image enhancement algorithm according to claim 2 is characterized in that: Acquiring the low-light video surveillance image according to the screening criteria of the low-light video surveillance image and the initial low-light video surveillance image includes: S1-3-3-1. Perform grayscale processing on the initial low-light video surveillance image to obtain a grayscale value of the initial low-light video surveillance image as a brightness feature of the initial low-light video surveillance image; S1-3-3-2. Using the Soble operator according to the initial low-light video surveillance image, obtain the gradient amplitude of the initial low-light video surveillance image as a contrast feature of the initial low-light video surveillance image; S1-3-3-3. Convert the initial low-light video surveillance image from the RGB color space to the HSV color space to obtain a hue value of the initial low-light video surveillance image as a color feature of the initial low-light video surveillance image; S1-3-3-4. Determine whether the brightness feature of the initial low-light video surveillance image meets the brightness standard. If so, execute S1-3-3-5. Otherwise, use the brightness feature that does not meet the standard to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2. S1-3-3-5. Determine whether the contrast feature of the initial low-light video surveillance image meets the contrast standard. If so, execute S1-3-3-6. Otherwise, use the non-compliant contrast feature to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2. S1-3-3-6. Determine whether the color features of the initial low-light video surveillance image meet the color feature standards. If so, obtain the initial low-light video surveillance image as the low-light video surveillance image. Otherwise, use the non-compliant color features to obtain the corresponding initial low-light video surveillance image, add it to the video surveillance image, and return to S1-2.
4. The video surveillance image optimization processing method based on the low-light image enhancement algorithm according to claim 1 is characterized in that: Acquiring an illumination component image of a low-light video surveillance grayscale image using a dark channel priori algorithm based on the low-light video surveillance image includes: S2-1-1. Obtain a low-light video surveillance grayscale image using a weighted average method using the low-light video surveillance image; S2-1-2. Perform segmentation processing on the low-light video surveillance grayscale image to obtain a plurality of local areas; S2-1-3. Obtaining a minimum pixel value of each local area according to the plurality of local areas as a pixel value of a dark channel video surveillance image; S2-1-4. Obtaining an atmospheric light value using the low-light video surveillance grayscale image based on the pixel value of the dark channel video surveillance image; S2-1-5. Obtain a preliminary predicted value of the illumination component based on the weight coefficient, the pixel value of the low-light video surveillance grayscale image, and the atmospheric light value; S2-1-6. Perform Gaussian filtering on the preliminary predicted value of the illumination component to obtain an illumination prediction result of the low-light video surveillance grayscale image as the illumination component image of the low-light video surveillance grayscale image; The weight coefficient is a parameter for adjusting the difference between the pixel value of the low-light video surveillance grayscale image and the atmospheric light value.
5. The video surveillance image optimization processing method based on the low-light image enhancement algorithm according to claim 4 is characterized in that: Obtaining a reflection component image of the low-light video surveillance grayscale image using the illumination component image of the low-light video surveillance grayscale image includes: S2-2-1. Obtain a reflection component prediction image of the low-light video surveillance grayscale image using the illumination component image of the low-light video surveillance grayscale image and the low-light video surveillance grayscale image; S2-2-2. Perform contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain an initial reflection component image of the low-light video surveillance grayscale image. S2-2-3. Using a Laplace operator, based on the initial reflection component image of the low-light video surveillance grayscale image, obtain Laplace response values of pixels corresponding to the initial reflection component image as grayscale change values of the pixels in the initial reflection component image; S2-2-4. Setting a grayscale change threshold of the initial reflection component image pixel according to the grayscale change value of the initial reflection component image pixel; S2-2-5. Perform edge detection on the low-light video surveillance grayscale image according to the grayscale change value of the initial reflection component image pixel and the grayscale change threshold of the initial reflection component image pixel to obtain the edge area and non-edge area of the low-light video surveillance grayscale image as the edge detection result; S2-2-6. Perform detail enhancement processing on the initial reflection component image of the low-light video surveillance grayscale image according to the edge detection result to obtain a detail enhancement processing result of the initial reflection component image as the reflection component image of the low-light video surveillance grayscale image; Among them, the edge area of the low-light video surveillance grayscale image is the pixel whose grayscale change value of the initial reflection component image pixel is greater than the grayscale change threshold of the initial reflection component image pixel, and the non-edge area of the low-light video surveillance grayscale image is the pixel whose grayscale change value of the initial reflection component image pixel is less than or equal to the grayscale change threshold of the initial reflection component image pixel, and the grayscale change threshold of the initial reflection component image pixel is 20.
6. The video surveillance image optimization processing method based on the low-light image enhancement algorithm according to claim 5 is characterized in that: Performing contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain the initial reflection component image of the low-light video surveillance grayscale image includes: S2-2-2-1. Using the reflection component prediction image of the low-light video surveillance grayscale image to perform segmentation, a plurality of local image blocks of the reflection component prediction image are obtained; S2-2-2-2. Obtaining the grayscale variance of each local image block according to the local image blocks of the plurality of reflection component prediction images; S2-2-2-3. Obtaining an average grayscale variance of the reflection component prediction image based on the grayscale variance of each local image block; S2-2-2-4. Setting a grayscale variance threshold of the reflection component prediction image according to the grayscale variance average value of the reflection component prediction image; S2-2-2-5. Determine whether the grayscale variance averages of the reflection component prediction image meet the grayscale variance threshold of the reflection component prediction image. If so, execute S2-2-2-6; otherwise, directly execute S2-2-2-7. S2-2-2-6. Perform linear contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain an initial reflection component image of the low-light video surveillance grayscale image; S2-2-2-7. Perform nonlinear contrast stretching on the reflection component prediction image of the low-light video surveillance grayscale image to obtain the initial reflection component image of the low-light video surveillance grayscale image.
7. The video surveillance image optimization processing method based on the low-light image enhancement algorithm according to claim 1 is characterized in that: Performing optimization processing according to the image enhancement result of the low-light video surveillance image to obtain the video surveillance image optimization processing result includes: S3-4-1. Obtain a standard enhanced image of a historical low-light video surveillance image using an image enhancement standard for historical low-light video surveillance images; S3-4-2. Using the standard enhanced image of the historical low-light video surveillance image as input and the optimization processing result corresponding to the standard enhanced image as output, constructing a video surveillance image enhancement model based on deep learning; S3-4-3. Performing optimization processing on the low-light video surveillance image using the video surveillance image enhancement model to obtain an optimized image enhancement result; S3-4-4. Determine whether the optimization processing result of the image enhancement result meets the image enhancement standard of the historical low-light video surveillance image. If so, obtain the optimization processing result of the image enhancement result as the optimization processing result of the video surveillance image. Otherwise, obtain the optimization processing result of the image enhancement result that does not meet the standards, add it to the video surveillance image, and return to S1-2.
Citation Information
Patent Citations
Low-illumination image enhancement method and device, electronic equipment and storage medium
CN115482169A
Low-illumination image enhancement method based on Retinex theory
CN117635438A
Image defogging method and device, equipment and storage medium
CN119067872A