Video noise reduction method and device, electronic equipment and storage medium
By using layered judgment and adaptation processing, the problems of trailing and blurring in video images in scenes with moving objects were solved, thereby improving image clarity and smoothness in dynamic scenes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies often result in video footage exhibiting trailing and blurring when processing scenes with moving objects, and their noise reduction effects are poor.
By determining the motion state of the current pixel in layers, filtering and weighted fusion are used to adapt the processing to moving and stationary pixels respectively, thereby improving image clarity and smoothness in dynamic scenes.
It effectively suppresses motion blur and trailing in moving areas, ensuring image clarity and smoothness in dynamic scenes during video noise reduction.
Smart Images

Figure CN121814910A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a video noise reduction method and apparatus, electronic device and storage medium. Background Technology
[0002] With the increasing demand for public safety, urban security systems are widely used. As a component of security systems, video surveillance's image quality directly affects the effectiveness of video analysis.
[0003] In related technologies, noise reduction is achieved by using inter-frame information iteration. Combined with background modeling technology, noise suppression is achieved by updating inter-frame information. However, when dealing with scenes with moving objects, the image will exhibit trailing and blurring phenomena. Summary of the Invention
[0004] This disclosure provides a video noise reduction method, apparatus, electronic device, and storage medium to solve problems in related technologies. By judging the motion state of the current pixel in layers, it achieves precise processing of the moving area, improves the image trailing and blurring phenomenon after the moving object passes by, and ensures the image clarity and smoothness of dynamic scenes during the video noise reduction process.
[0005] According to a first aspect of this disclosure, a video noise reduction method is provided, comprising: Based on the pixel difference between the current frame image and the background frame image, determine whether the current pixel is the first moving pixel in the current frame image; If the current pixel is determined to be the first moving pixel in the current frame image, the motion state of the current pixel in the current frame image is determined based on the pixel difference value between the current frame image and the previous adjacent frame image. Based on the motion state of the current pixel in the current frame image, the current pixel is filtered, and the filtering result is used as the pixel value of the current pixel in the target image.
[0006] In some embodiments of this disclosure, the filtering process for the current pixel based on the motion state of the current pixel in the current frame image includes: If it is determined that the current pixel is the second moving pixel in the current frame image, the pixel values in the current frame image are filtered using a specified pixel region, where the specified pixel region includes the current pixel. If it is determined that the current pixel is the second stationary pixel in the current frame image, the pixel values of the current pixel in the current frame image and the previous adjacent frame image are weighted and fused.
[0007] In some embodiments of this disclosure, after determining whether the current pixel is a first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image, the method further includes: If the current pixel is determined to be the first stationary pixel in the current frame image, the pixel values of the current pixel in the current frame image and the background frame image are weighted and fused.
[0008] In some embodiments of this disclosure, when it is determined that the current pixel is a first stationary pixel in the current frame image, the step of performing a weighted fusion process on the pixel values of the current pixel in the current frame image and the background frame image includes: If it is determined that the current pixel is the first stationary pixel in the current frame image, the number of consecutive frames in which the current pixel maintains the first stationary pixel is recorded, and the number of consecutive frames in which the first stationary pixel is stored in the stationary counting area. Based on the number of consecutive frames of the first static pixel stored in the static counting region, the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image is determined, and the weighted fusion processing is performed on the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value of the current pixel.
[0009] In some embodiments of this disclosure, when it is determined that the current pixel is a second stationary pixel in the current frame image, the step of performing a weighted fusion process on the pixel values of the current pixel in the current frame image and the previous adjacent frame image includes: If it is determined that the current pixel is the second static pixel in the current frame image, record the number of consecutive frames that the current pixel maintains the second static pixel, and store the number of consecutive frames that the second static pixel maintains the second static pixel in the static counting area. Based on the number of consecutive frames of the second static pixel stored in the static counting region, the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image is determined, and the weighted fusion processing is performed on the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value in the previous adjacent frame image.
[0010] In some embodiments of this disclosure, when the current pixel is determined to be a second stationary pixel in the current frame image, the method further includes: If the number of times the current pixel is continuously identified as the second stationary pixel exceeds a preset threshold, the pixel value of the current pixel at the target pixel position in the background frame image is updated to the pixel value of the current pixel in the previous adjacent frame image.
[0011] According to a second aspect of this disclosure, a video noise reduction apparatus is provided, comprising: The judgment unit is used to determine whether the current pixel is a first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image; The determining unit is configured to, when determining that the current pixel is the first moving pixel in the current frame image, determine the motion state of the current pixel in the current frame image based on the pixel difference value between the current frame image and the previous adjacent frame image; The first processing unit is configured to perform filtering processing on the current pixel based on the motion state of the current pixel in the current frame image, and the filtering processing result is used as the pixel value of the current pixel in the target image.
[0012] In some embodiments of this disclosure, the first processing unit includes: The first processing module is configured to, when it is determined that the current pixel is a second moving pixel in the current frame image, perform filtering processing using the pixel values of a specified pixel region in the current frame image, wherein the specified pixel region includes the current pixel. The second processing module is used to perform weighted fusion processing on the pixel values of the current pixel in the current frame image and the previous adjacent frame image when it is determined that the current pixel is the second stationary pixel in the current frame image.
[0013] In some embodiments of this disclosure, the apparatus further includes: The second processing unit is configured to perform weighted fusion processing on the pixel values of the current pixel in the current frame image and the background frame image after the judgment unit determines whether the current pixel is a first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image.
[0014] In some embodiments of this disclosure, the second processing unit includes: The recording module is used to record the number of consecutive frames in which the current pixel point maintains the first static pixel point when it is determined that the current pixel point is the first static pixel point in the current frame image, and to store the number of consecutive frames in which the first static pixel point is the first static pixel point in the static counting area. The third processing module is used to determine the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image based on the number of consecutive frames of the first static pixel stored in the static counting region, and to perform weighted fusion processing on the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value in the background frame image.
[0015] In some embodiments of this disclosure, the second processing module includes: The recording submodule is used to record the number of consecutive frames in which the current pixel point remains the second static pixel point when it is determined that the current pixel point is the second static pixel point in the current frame image, and to store the number of consecutive frames in which the second static pixel point remains the second static pixel point in the static counting area. The processing submodule is used to determine the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image based on the number of consecutive frames of the second static pixel stored in the static counting region, and to perform weighted fusion processing on the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value in the previous adjacent frame image.
[0016] In some embodiments of this disclosure, the apparatus further includes: The updating unit is configured to, when the determining unit determines that the current pixel is the first moving pixel in the current frame image, and after determining the motion state of the current pixel in the current frame image based on the pixel difference value between the current frame image and the previous adjacent frame image, update the pixel value of the current pixel at the target pixel position in the background frame image to the pixel value of the current pixel in the previous adjacent frame image if the number of times the current pixel is continuously determined to be the second stationary pixel is greater than a preset threshold.
[0017] According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect embodiment.
[0018] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are configured to cause the computer to perform the method described in the first aspect of the present disclosure.
[0019] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in the first aspect of the preceding embodiments.
[0020] In summary, the video noise reduction method, apparatus, electronic device, and storage medium disclosed herein include: determining whether a current pixel is a first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image; if the current pixel is determined to be a first moving pixel in the current frame image, determining the motion state of the current pixel in the current frame image based on the pixel difference value between the current frame image and the previous adjacent frame image; performing filtering processing on the current pixel based on its motion state in the current frame image, and using the filtering result as the pixel value of the current pixel in the target image; by determining the motion state of the current pixel in layers, precise processing of moving areas is achieved, improving the image trailing and blurring phenomenon after moving objects pass by, and ensuring the image clarity and smoothness of dynamic scenes during the video noise reduction process.
[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0022] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 A schematic flowchart illustrating a video noise reduction method provided in an embodiment of this disclosure; Figure 2 This is a schematic flowchart of another video noise reduction method provided in an embodiment of the present disclosure; Figure 3 This is a schematic flowchart of another video noise reduction method provided in an embodiment of the present disclosure; Figure 4 This is a schematic flowchart of another video noise reduction method provided in an embodiment of the present disclosure; Figure 5 This is a schematic flowchart of another video noise reduction method provided in an embodiment of the present disclosure; Figure 6 This is a schematic flowchart of another video noise reduction method provided in an embodiment of the present disclosure; Figure 7 This is a schematic flowchart of another video noise reduction method provided in an embodiment of the present disclosure; Figure 8 This is a schematic diagram of the structure of a video noise reduction device provided in an embodiment of the present disclosure; Figure 9 This is a schematic diagram of another video noise reduction device provided in an embodiment of the present disclosure; Figure 10 A schematic block diagram of an example electronic device provided for embodiments of this disclosure. Detailed Implementation
[0023] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0024] The following description, with reference to the accompanying drawings, outlines a video noise reduction method, apparatus, electronic device, and storage medium according to embodiments of the present disclosure.
[0025] This invention has a wide range of applications, especially in products involving extremely low-light scenarios such as starlight-level cameras and blacklight-level cameras. At the same time, this video noise reduction solution based on background modeling can also be applied to various conventional video acquisition devices and monitoring products.
[0026] In some feasible implementations, the current frame image is the raw data output by the sensor, i.e., the unprocessed image data; the background frame image is an image frame storing static data from the scene; and the previous adjacent frame image is any frame data preceding the current frame image in time sequence. Both the background frame image and the previous adjacent frame image are cached in hardware storage media, including but not limited to DDR storage media. During image acquisition, the current frame image is acquired and output in real time by the sensor, while the background frame image and the previous adjacent frame image are read from the hardware storage media. The reading operation is performed synchronously with the sensor acquisition operation to ensure the continuity of image frame data. This approach can acquire image frame data that retains the original signal characteristics, providing a reliable data foundation for motion judgment based on pixel differences and targeted noise reduction processing.
[0027] Figure 1 This is a schematic flowchart of a video noise reduction method provided in an embodiment of the present disclosure.
[0028] like Figure 1 As shown, the method includes the following steps: Step 101: Based on the pixel difference value between the current frame image and the background frame image, determine whether the current pixel is the first moving pixel in the current frame image.
[0029] In some embodiments, the calculation of pixel difference values includes, but is not limited to, calculating the absolute value of the signal difference between corresponding pixels in the current frame image and the background frame image pixel by pixel. Any pixel in the current frame image is selected as the current pixel, and its signal value is extracted. Simultaneously, the signal values of pixels in the background frame image at the same coordinates as the current frame image are extracted. The absolute difference between the signal values of the background frame image and the current frame image is calculated; this absolute difference is the pixel difference value. During the judgment process, a fixed judgment threshold is preset. The calculated pixel difference value is compared with the judgment threshold. If the pixel difference value is greater than the judgment threshold, the current pixel is determined to be a first moving pixel. If the pixel difference value is less than or equal to the judgment threshold, the current pixel is determined to be a first stationary pixel. The judgment threshold can be adjusted according to the illumination conditions of the video capture scene. It should be noted that the essence of calculating pixel difference values is to identify moving pixels using a difference method. The absolute value of the difference is only one calculation method, and any variation of the difference method is applicable to this invention.
[0030] Using the above method, we can accurately distinguish the regions where the current frame image differs from the background frame image at the pixel level, clarify the distribution of the first moving pixel, and provide a basis for judgment for differential processing.
[0031] Step 102: If it is determined that the current pixel is the first moving pixel in the current frame image, the motion state of the current pixel in the current frame image is determined according to the pixel difference value between the current frame image and the previous adjacent frame image.
[0032] In some embodiments, the pixel difference value is calculated by calculating the absolute value of the signal difference between the corresponding pixels in the current frame image and the previous adjacent frame image. The motion state is determined based on a preset judgment threshold. The pixel difference value is compared with the judgment threshold. If the pixel difference value is greater than the judgment threshold, the motion state of the current pixel is continuous motion; if the pixel difference value is less than or equal to the judgment threshold, the motion state of the current pixel is stopped motion.
[0033] The above method can further accurately identify the real-time motion state of the first moving pixel, avoid processing deviations caused by a single judgment of motion state, and improve the targeting of noise reduction processing.
[0034] Step 103: Filter the current pixel according to its motion state in the current frame image, and use the filtering result as the pixel value of the current pixel in the target image.
[0035] In some embodiments, the filtering method is determined based on the motion state of the current pixel: if the current pixel is in continuous motion, spatial filtering is performed on the pixel value of the current pixel in the current frame image. Spatial filtering methods include, but are not limited to, non-local mean filtering. Other pixels in the current frame image with similar signal features to the current pixel are searched, and the signal mean of similar pixels is used as the processing result of the current pixel. The target image refers to the final image after noise reduction output after motion state judgment and corresponding filtering of the current frame image. The filtering result is used as the pixel value of the current pixel in the target image. If the current pixel is in a stationary motion state, fusion filtering is performed on the signals at the corresponding positions of the current pixel in the current frame image and the previous adjacent frame image. Noise suppression is achieved through signal superposition, and the fused signal value is used as the pixel value of the current pixel in the target image. Finally, after processing all pixels, a complete noise-reduced target image is formed.
[0036] The above method can be used to adapt the processing to different motion states of the current pixel, effectively suppressing video noise while avoiding trailing and blurring after processing of moving areas, thus ensuring the signal integrity and image quality stability of the target image.
[0037] In summary, the video noise reduction method provided in this disclosure includes: determining whether a current pixel is a first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image; if the current pixel is determined to be a first moving pixel in the current frame image, determining the motion state of the current pixel in the current frame image based on the pixel difference value between the current frame image and the previous adjacent frame image; performing filtering processing on the current pixel based on its motion state in the current frame image, and using the filtering result as the pixel value of the current pixel in the target image; by determining the motion state of the current pixel in layers, accurate processing of the moving area is achieved, improving the image trailing and blurring phenomenon after moving objects pass by, and ensuring the image clarity and smoothness of dynamic scenes during the video noise reduction process.
[0038] In some embodiments, layered judgment refers to determining the motion state of the current pixel in two levels: the first level compares the current frame image with the background frame image, and distinguishes the first moving pixel (the pixel that differs from the background) and the first stationary pixel (the pixel that does not differ from the background) based on the pixel difference value between the current frame image and the background frame image; the second level further compares the current frame image with the previous adjacent frame image for the first moving pixel determined in the first level, and distinguishes the second moving pixel (the pixel that is still moving relative to the previous frame) and the second stationary pixel (the pixel that has stopped moving relative to the previous frame) based on the pixel difference value between the current frame image and the previous adjacent frame image.
[0039] Figure 2 A flowchart illustrating a video noise reduction method provided in an embodiment of this disclosure is further illustrated. For example... Figure 2 As shown, the method includes the following steps: Step 201: If it is determined that the current pixel is the second moving pixel in the current frame image, filter processing is performed using the pixel values of a specified pixel region in the current frame image, wherein the specified pixel region includes the current pixel.
[0040] In some embodiments, the current frame image is a Raw data type output by the sensor, and the previous adjacent frame image is the previous frame image (Raw data type) cached in the hardware storage medium. The absolute value of the difference between corresponding pixels in the current frame image and the previous adjacent frame image is calculated using a difference method, i.e., the pixel difference value. When the pixel difference value is greater than a determination threshold, the current pixel is determined to be a second moving pixel. At this time, the consecutive frame count record corresponding to the second stationary pixel is cleared to zero. Spatial domain filtering is performed using the pixel values within a specified pixel region containing the second moving pixel in the current frame image. The filtering method includes, but is not limited to, non-local mean filtering. The pixel values of the current pixel within the specified pixel region are extracted and processed. The resulting filtering result is used as the output value of the second moving pixel and output to the target image. The specified pixel region is related to the image processing method, and this invention does not limit it.
[0041] Step 202: If it is determined that the current pixel is the second stationary pixel in the current frame image, the pixel values of the current pixel in the current frame image and the previous adjacent frame image are weighted and fused.
[0042] In some embodiments, when the pixel difference value between the current frame image calculated by the difference method and the corresponding pixel of the previous adjacent frame image is less than or equal to the determination threshold, the current pixel is determined to be the second stationary pixel. At this time, the number of consecutive frames in which the current pixel maintains the state of being the second stationary pixel is recorded, and the consecutive frame count is incremented by 1 for each new frame in which the pixel maintains the state of being the second stationary pixel. The weighted fusion processing uses a preset weighted fusion weight, and an exemplary scheme for this weight is as follows: The weight values from left to right correspond to the weighted fusion weights of the previous adjacent frame when the current pixel remains stationary from the first frame to the 9th frame. If the current pixel continues to maintain the state of the second stationary pixel (i.e., the number of consecutive frames exceeds 9), the weighted fusion weight corresponding to the 9th frame is used. Based on the weighted fusion weights determined above, the pixel value of the current pixel in the current frame image is weighted and fused with the pixel value in the previous adjacent frame image. The fused pixel value is output to the target image, and the pixel value at the corresponding position in the previous adjacent frame image is updated. It should be noted that the above example is only for illustrative purposes and does not limit the specific content.
[0043] The above method allows for the application of appropriate processing techniques to the second moving pixel and the second stationary pixel, effectively suppressing noise while avoiding trailing in the moving area and ensuring the image quality stability of the target image.
[0044] Figure 3 A flowchart illustrating a video noise reduction method provided in an embodiment of this disclosure is further illustrated. For example... Figure 3 As shown, the method includes the following steps: Step 301: Based on the pixel difference value between the current frame image and the background frame image, determine whether the current pixel is the first moving pixel in the current frame image.
[0045] Step 302: If it is determined that the current pixel is the first moving pixel in the current frame image, the motion state of the current pixel in the current frame image is determined according to the pixel difference value between the current frame image and the previous adjacent frame image.
[0046] For specific embodiments of steps 301 and 302, please refer to the embodiments of steps 101 and 102, which will not be repeated here.
[0047] Step 303: If it is determined that the current pixel is the first stationary pixel in the current frame image, the pixel values of the current pixel in the current frame image and the background frame image are weighted and fused.
[0048] In some embodiments, when the current pixel is determined to be a first stationary pixel, the number of consecutive frames in which the current pixel maintains the first stationary state is recorded and incremented by 1. The weighted fusion process adopts a preset weighted fusion weight. Based on the determined weighted fusion weight, the pixel value of the current pixel in the current frame image and the pixel value in the background frame image are weighted and fused. The fused pixel value is output to the target image, and the pixel values at the corresponding positions in the background frame image and the previous adjacent frame image are updated.
[0049] The above method can accurately distinguish the motion state of pixels through two-level motion judgment, and achieve a balance between noise suppression and image quality preservation by combining the differential fusion processing of the background frame image and the previous adjacent frame image.
[0050] Figure 4 A flowchart illustrating a video noise reduction method provided in an embodiment of this disclosure is further illustrated. For example... Figure 4 As shown, the method includes the following steps: Step 401: If it is determined that the current pixel is the first stationary pixel in the current frame image, record the number of consecutive frames that the current pixel maintains the first stationary pixel status, and store the number of consecutive frames of the first stationary pixel in the stationary counting area.
[0051] In some embodiments, after the current pixel is determined to be a first stationary pixel by the pixel difference value between the current frame image and the background frame image, the number of consecutive frames in which the pixel maintains the first stationary state is recorded. For each frame in which the first stationary state is maintained, the consecutive frame count is incremented by 1, and the consecutive frame count is stored in a preset stationary count area in real time.
[0052] Step 402: Based on the number of consecutive frames of the first static pixel stored in the static counting region, determine the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image, and perform weighted fusion processing on the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value in the background frame image.
[0053] In some embodiments, the weighted fusion weight is determined based on the number of consecutive frames stored in the static counting region. The weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image is determined based on the number of consecutive frames. Based on the weighted fusion weight corresponding to the background frame image, the pixel value of the current pixel in the background frame image and the pixel value in the current frame image are weighted and fused to obtain the fused value of the current pixel and output to the target image. At the same time, the pixel data of the corresponding coordinate positions in the background frame image and the previous adjacent frame image are updated.
[0054] The above method can adapt the weighted fusion weights to the static duration of the pixels, improve the noise reduction effect in the background area, and ensure the accuracy of the processing by updating frame data in real time.
[0055] Figure 5 A flowchart illustrating a video noise reduction method provided in an embodiment of this disclosure is further illustrated. For example... Figure 5 As shown, the method includes the following steps: Step 501: If it is determined that the current pixel is the second stationary pixel in the current frame image, record the number of consecutive frames that the current pixel maintains the second stationary pixel status, and store the number of consecutive frames of the second stationary pixel in the stationary counting area.
[0056] In some embodiments, the current pixel is determined to be a first moving pixel by the current frame image and the background frame image, and then determined to be a second stationary pixel by the current frame image and the previous adjacent frame image. The number of consecutive frames in which the current pixel maintains the second stationary state is recorded. For each frame in the second stationary state, the consecutive frame count is incremented by 1. The consecutive frame count is stored in a preset stationary count area.
[0057] Step 502: Based on the number of consecutive frames of the second static pixel stored in the static counting region, determine the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image, and perform weighted fusion processing on the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value in the previous adjacent frame image.
[0058] In some embodiments, the weighted fusion weight is determined based on the number of consecutive frames stored in the static counting region. The weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image is determined based on the number of consecutive frames. Based on the weighted fusion weight corresponding to the previous adjacent frame, the pixel value of the current pixel in the previous adjacent frame image and the pixel value in the current frame image are weighted and fused to obtain the fused value of the current pixel and output to the target image. At the same time, the pixel data at the corresponding coordinate position in the previous adjacent frame image is updated.
[0059] The above method can be used to apply fusion weights that are adapted to the duration of stillness for pixels that have been in motion, thereby suppressing noise while maintaining the continuity of pixel signals and improving the image quality stability after dynamic scene transitions.
[0060] Figure 6 A flowchart illustrating a video noise reduction method provided in an embodiment of this disclosure is further illustrated. For example... Figure 6 As shown, the method includes the following steps: Step 601: If it is determined that the current pixel is the first moving pixel in the current frame image, the motion state of the current pixel in the current frame image is determined according to the pixel difference value between the current frame image and the previous adjacent frame image.
[0061] For specific embodiments of step 601, please refer to the embodiment of step 102, which will not be repeated here.
[0062] Step 602: If the number of times the current pixel is continuously determined to be the second stationary pixel exceeds a preset threshold, update the pixel value of the current pixel at the target pixel position in the background frame image to the pixel value of the current pixel in the previous adjacent frame image.
[0063] In some embodiments, the target pixel position is the coordinate position of the second stationary pixel in the current frame image. When the number of times the target pixel position is continuously determined to be the second stationary pixel (i.e. the corresponding number of consecutive frames of the second stationary pixel) is greater than a preset threshold, the pixel value of the target pixel position in the background frame image is updated to the pixel value of the corresponding target pixel position in the previous adjacent frame image, and the number of consecutive frames corresponding to the background frame image is updated to the number of consecutive frames of the second stationary pixel.
[0064] The above method can update the background frame image with stable and static pixel data in a timely manner, ensuring the accuracy of the background frame image and providing a reliable background reference for motion judgment and noise reduction processing of the frame image.
[0065] As one way that this disclosure can be implemented Figure 7 The diagram illustrates a flow chart of a video noise reduction method provided in an embodiment of this disclosure, such as... Figure 7As shown, the sensor outputs the current frame image and simultaneously retrieves the background frame image and the previous adjacent frame image corresponding to the current frame image from the hardware storage medium. Then, motion is determined based on the current frame image and the background frame image. The sensor determines whether the current pixel is the first moving pixel based on the pixel difference between corresponding pixels in the current frame image and the background frame image. If the determination result is negative (i.e., the current pixel is the first stationary pixel), a weighted fusion process is performed on the current frame image and the background frame image, and the number of consecutive frames in which the current pixel remains the first stationary pixel is incremented by 1. The processed pixel value is output to the target image. If the determination result is positive (i.e., the current pixel is the first moving pixel), motion is determined by comparing the current frame image with the previous adjacent frame image, and the pixel difference between corresponding pixels in the current frame image and the previous adjacent frame image is used to determine whether the current pixel is the first moving pixel. The value determines the motion state of the current pixel. A further judgment is made based on this motion state. If the judgment result is negative (i.e., the current pixel is the second stationary pixel), a weighted fusion process is performed on the current frame image and the previous adjacent frame image. Simultaneously, the number of consecutive frames in which the current pixel remains the second stationary pixel is incremented by 1. The processed pixel value is output to the target image. If the judgment result is positive (i.e., the current pixel is the second moving pixel), the number of consecutive frames in which the current pixel is the second stationary pixel is reset to zero. The current frame image is then filtered, and the processed pixel value is output to the target image. Furthermore, when the number of consecutive frames in which the current pixel is the second stationary pixel is greater than a preset threshold, the pixel data at the target pixel position in the background frame image is updated to the pixel data at the target pixel position in the previous adjacent frame image.
[0066] Corresponding to the video noise reduction method described above, this invention also proposes a video noise reduction apparatus. Since the apparatus embodiments of this invention correspond to the method embodiments described above, details not disclosed in the apparatus embodiments can be referred to in the method embodiments described above, and will not be repeated here.
[0067] Figure 8 This is a schematic diagram of the structure of a video noise reduction device provided in an embodiment of the present disclosure, as shown below. Figure 8 As shown, it includes: a judgment unit 81, a determination unit 82, and a first processing unit 83.
[0068] The judgment unit 81 is used to determine whether the current pixel is the first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image; The determining unit 82 is used to determine the motion state of the current pixel in the current frame image based on the pixel difference value between the current frame image and the previous adjacent frame image when the current pixel is determined to be the first moving pixel in the current frame image. The first processing unit 83 is configured to perform filtering processing on the current pixel according to the motion state of the current pixel in the current frame image, and the filtering processing result is used as the pixel value of the current pixel in the target image.
[0069] In summary, the video noise reduction apparatus provided in this disclosure includes: acquiring a current frame image, a background frame image, and the previous adjacent frame image of the current frame image in the video to be processed; determining whether a current pixel is a first moving pixel based on the pixel difference value between the current frame image and the background frame image; wherein the current pixel is any pixel in the current frame image; if the current pixel is determined to be a first moving pixel, determining the motion state of the current pixel based on the pixel difference value between the current frame image and the previous adjacent frame image; filtering the current frame image based on the motion state of the current pixel to obtain a target image; and achieving precise processing of moving areas by determining the motion state of the current pixel in layers, thereby improving the image trailing and blurring phenomena after moving objects pass by, and ensuring the image clarity and smoothness of dynamic scenes during the video noise reduction process.
[0070] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 9 As shown, the first processing unit 83 includes: The first processing module 831 is used to perform filtering processing on the pixel values of a specified pixel region in the current frame image when it is determined that the current pixel is a second moving pixel in the current frame image, wherein the specified pixel region includes the current pixel. The second processing module 832 is used to perform weighted fusion processing on the pixel values of the current pixel in the current frame image and the previous adjacent frame image when it is determined that the current pixel is the second stationary pixel in the current frame image.
[0071] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 9 As shown, the device further includes: The second processing unit 84 is used to perform weighted fusion processing on the pixel values of the current pixel in the current frame image and the background frame image after the judgment unit 81 determines whether the current pixel is a first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image, and if it is determined that the current pixel is a first stationary pixel in the current frame image.
[0072] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 9 As shown, the second processing unit 84 includes: Recording module 841 is used to record the number of consecutive frames in which the current pixel point maintains the first static pixel point when it is determined that the current pixel point is the first static pixel point in the current frame image, and to store the number of consecutive frames in which the first static pixel point is the first static pixel point in the static counting area. The third processing module 842 is used to determine the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image based on the number of consecutive frames of the first static pixel stored in the static counting region, and to perform weighted fusion processing on the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value in the background frame image.
[0073] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 9 As shown, the second processing module 832 includes: The recording submodule 8321 is used to record the number of consecutive frames in which the current pixel point remains the second static pixel point when it is determined that the current pixel point is the second static pixel point in the current frame image, and to store the number of consecutive frames in which the second static pixel point remains the second static pixel point in the static counting area. The processing submodule 8322 is used to determine the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image based on the number of consecutive frames of the second static pixel stored in the static counting region, and to perform weighted fusion processing on the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value in the previous adjacent frame image.
[0074] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 9 As shown, the device further includes: The updating unit 85 is configured to, when the determining unit 82 determines that the current pixel is the first moving pixel in the current frame image, and after determining the motion state of the current pixel in the current frame image based on the pixel difference value between the current frame image and the previous adjacent frame image, update the pixel value of the current pixel at the target pixel position in the background frame image to the pixel value of the current pixel in the previous adjacent frame image if the number of times the current pixel is continuously determined as the second stationary pixel is greater than a preset threshold.
[0075] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.
[0076] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0077] Figure 10 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as security cameras, surveillance cameras, edge boxes, laptop computers, desktop computers, workstations, personal digital assistants, servers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0078] like Figure 10 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 702 or loaded from storage unit 708 into RAM (Random Access Memory) 703. The RAM 703 can also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An I / O (Input / Output) interface 705 is also connected to the bus 704.
[0079] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of displays, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0080] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as video noise reduction methods. For example, in some embodiments, the video noise reduction method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the aforementioned video noise reduction method by any other suitable means (e.g., by means of firmware).
[0081] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0082] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0083] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0085] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.
[0086] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0087] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0088] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0089] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A video noise reduction method, characterized in that, The method includes: Based on the pixel difference between the current frame image and the background frame image, determine whether the current pixel is the first moving pixel in the current frame image; If it is determined that the current pixel is the first moving pixel in the current frame image, the motion state of the current pixel in the current frame image is determined according to the pixel difference value between the current frame image and the previous adjacent frame image; Based on the motion state of the current pixel in the current frame image, the current pixel is filtered, and the filtering result is used as the pixel value of the current pixel in the target image.
2. The method according to claim 1, characterized in that, The step of filtering the current pixel based on its motion state in the current frame image includes: If it is determined that the current pixel is the second moving pixel in the current frame image, the pixel values in the current frame image are filtered using a specified pixel region, where the specified pixel region includes the current pixel. If it is determined that the current pixel is the second stationary pixel in the current frame image, the pixel values of the current pixel in the current frame image and the previous adjacent frame image are weighted and fused.
3. The method according to claim 1, characterized in that, After determining whether the current pixel is a first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image, the method further includes: If the current pixel is determined to be the first stationary pixel in the current frame image, the pixel values of the current pixel in the current frame image and the background frame image are weighted and fused.
4. The method according to claim 3, characterized in that, When it is determined that the current pixel is a first stationary pixel in the current frame image, the step of performing a weighted fusion process on the pixel values of the current pixel in the current frame image and the background frame image includes: If it is determined that the current pixel is the first stationary pixel in the current frame image, the number of consecutive frames in which the current pixel maintains the first stationary pixel is recorded, and the number of consecutive frames in which the first stationary pixel is stored in the stationary counting area. Based on the number of consecutive frames of the first static pixel stored in the static counting region, the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image is determined, and the weighted fusion processing is performed on the weighted fusion weight corresponding to the pixel value of the current pixel in the background frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value of the current pixel.
5. The method according to claim 2, characterized in that, When it is determined that the current pixel is the second stationary pixel in the current frame image, the step of performing a weighted fusion process on the pixel values of the current pixel in the current frame image and the previous adjacent frame image includes: If it is determined that the current pixel is the second stationary pixel in the current frame image, the number of consecutive frames in which the current pixel remains the second stationary pixel is recorded, and the number of consecutive frames in which the second stationary pixel remains the second stationary pixel is stored in the stationary counting area. Based on the number of consecutive frames of the second static pixel stored in the static counting region, the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image is determined, and the weighted fusion processing is performed on the weighted fusion weight corresponding to the pixel value of the current pixel in the previous adjacent frame image and the current frame image based on the weighted fusion weight corresponding to the pixel value in the previous adjacent frame image.
6. The method according to any one of claims 1-5, characterized in that, If the current pixel is determined to be the second stationary pixel in the current frame image, the method further includes: If the number of times the current pixel is continuously identified as the second stationary pixel exceeds a preset threshold, the pixel value of the current pixel at the target pixel position in the background frame image is updated to the pixel value of the current pixel in the previous adjacent frame image.
7. A video noise reduction device, characterized in that, include: The judgment unit is used to determine whether the current pixel is a first moving pixel in the current frame image based on the pixel difference value between the current frame image and the background frame image; The determining unit is configured to, when determining that the current pixel is the first moving pixel in the current frame image, determine the motion state of the current pixel in the current frame image based on the pixel difference value between the current frame image and the previous adjacent frame image; The first processing unit is configured to perform filtering processing on the current pixel based on the motion state of the current pixel in the current frame image, and the filtering processing result is used as the pixel value of the current pixel in the target image.
8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.
Citation Information
Cited By
A real scene video deblurring system and method based on a single-step video diffusion model
CN122265096A