Video denoising method and apparatus, and electronic device and computer-readable storage medium

WO2025184845A8PCT designated stage Publication Date: 2025-10-02VERISILICON MICROELECTRONICS (CHENGDU) CO LTD +4
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/080405
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-03-06
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

Existing video noise reduction methods have poor noise reduction effects under low-light conditions at night, affecting image clarity.

Method used

By obtaining the target still frame number of each pixel in the current video frame, constructing the fusion weight corresponding to each pixel, fusing the current video frame with the previous video frame for noise reduction, using the still frame number record matrix to improve the noise reduction efficiency, and improving the motion detection accuracy of pixel points at the corners through mirroring.

Benefits of technology

Improves video noise reduction, especially significantly improving image clarity in low-light conditions at night, simplifies calculations and reduces memory requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024080405_02102025_PF_FP_ABST
    Figure CN2024080405_02102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of videos, and specifically relates to a video denoising method and apparatus, and an electronic device and a computer-readable storage medium. The video denoising method comprises: acquiring the number of target static frames of each pixel point in the current video frame, wherein the number of target static frames is the number of frames which are in a video to be denoised and are kept consecutive and relatively static to the current video frame; on the basis of the number of target static frames, constructing a fusion weight corresponding to each pixel point; and on the basis of the fusion weight, fusing the current video frame and the previous video frame, so as to obtain a denoised video frame corresponding to the current video frame. Compared with the prior art, the video denoising method and apparatus, and the electronic device and the computer-readable storage medium provided in the embodiments of the present application have the advantage of improving the video denoising effect.
Need to check novelty before this filing date? Find Prior Art

Description

Video noise reduction method and device, electronic device and computer-readable storage medium Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a video noise reduction method and device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Surveillance cameras are now widely used in both security monitoring and home life, and users have increasingly high expectations for image quality. They expect clear and reliable images both day and night. However, due to the inherent process characteristics of image sensors, noise issues are inevitable. For example, the thermal effect of electrons in image sensors causes fluctuations in charge potential, generating thermal noise. Inconsistent amplifier conversion characteristics within image sensors can also generate solid-state noise. Furthermore, when current flows through the potential barrier (PN junction) in an image sensor, it generates shot noise related to incident photons and dark current. These noise phenomena are particularly pronounced under low lighting conditions at night, severely impacting image clarity. However, existing video noise reduction methods are ineffective.

[0003] Summary of the Invention

[0004] The purpose of this application is to provide a video noise reduction method and device, an electronic device and a computer-readable storage medium, which can improve the video noise reduction effect.

[0005] In a first aspect, an embodiment of the present application provides a video noise reduction method, comprising: obtaining a target still frame number for each pixel point in a current video frame, the target still frame number being the number of frames that remain continuous and relatively still with the current video frame in the video to be denoised; constructing a fusion weight corresponding to each of the pixel points based on the target still frame number; and fusing the current video frame and the previous video frame based on the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame.

[0006] Compared with the prior art, in the video denoising method provided in the embodiment of the present application, when denoising is performed on any video frame in the video to be denoised that needs to be denoised, the video frame is the current video frame. When denoising is performed on the current video frame, the fusion weight of each pixel point is calculated separately according to the number of consecutive still frames of each pixel point therein, and the fusion weight of each pixel point is determined. When fusion denoising is performed on the current video frame, each pixel point is calculated according to the corresponding fusion weight, so that the denoising effect of the obtained denoised video frame is better, thereby improving the video denoising effect of the video to be denoised.

[0007] In an optional embodiment, the video noise reduction method further includes: setting and initializing a still frame number recording matrix, the still frame number recording matrix being used to record the historical still frame number of each pixel in the video to be noise reduced; obtaining a target still frame number for each pixel in the current video frame, including: obtaining a moving pixel in the current video frame that is in relative motion with respect to the previous video frame and a still pixel that is relatively stationary with respect to the previous video frame; setting the target still frame number of the moving pixel to 1; obtaining the historical still frame number of the still pixel from the still frame number recording matrix, and recording the target still frame number of the still pixel as the historical still frame number plus 1. Setting the still frame number recording matrix to record the historical still frame number of each pixel in the video to be noise reduced; when determining the target still frame number for each pixel in the current video frame, directly performing a motion comparison between the current video frame and the previous video frame; for a still pixel that remains stationary with respect to the previous video frame, directly adding 1 to the historical still frame number corresponding to the still pixel to obtain the target still frame number corresponding to the still pixel, thereby improving the efficiency of obtaining the target still frame number and thereby improving the overall noise reduction efficiency of the video to be noise reduced.

[0008] In an optional embodiment, after fusing the current video frame and the previous video frame according to the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame, the video noise reduction method further includes: setting the historical still frame count as the target still frame count. After obtaining the noise-reduced video frame corresponding to the current video frame, i.e., after noise reduction of the current video frame is completed, setting the historical still frame count as the target still frame count facilitates the direct use of the still frame count record matrix to obtain the target still frame count corresponding to subsequent video frames when noise reduction is performed on subsequent video frames, thereby improving the overall noise reduction efficiency of the video to be noise-reduced.

[0009] In an optional embodiment, the obtaining of the moving pixel points in the current video frame that are in relative motion with the previous video frame and the stationary pixel points that are relatively stationary with respect to the previous video frame includes: for any pixel point in the current video frame, obtaining the current motion detection area corresponding to the pixel point in the current video frame and the previous motion detection area corresponding to the pixel point in the previous video frame; respectively obtaining the absolute value of the difference between the pixel value sum and the absolute value of the pixel value difference of each pixel point in the current motion detection area and the previous motion detection area; setting the pixel point whose absolute value of the difference between the pixel value sum belongs to a first preset threshold range and whose absolute value of the sum of the pixel value difference belongs to a second preset threshold range as the moving pixel point, and setting the pixel point whose absolute value of the difference between the pixel value sum does not belong to the first preset threshold range or whose absolute value of the sum of the pixel value difference does not belong to the second preset threshold range as the stationary pixel point. When performing motion detection on each pixel, converting the operation of a single pixel into the operation of multiple pixels in the motion detection area corresponding to the pixel can improve the accuracy of motion detection on the pixel, and correspondingly improve the accuracy of the target still frame number. With the improvement of the accuracy of the target still frame number, the accuracy of the fusion weight of each pixel is also improved, so that the noise reduction effect of the current video frame is further improved.

[0010] In an optional embodiment, obtaining the current motion detection area corresponding to the pixel point in the current video frame and the previous motion detection area corresponding to the pixel point in the previous video frame includes: taking the pixel point as the center point of a preset window, obtaining the area of ​​the current video frame within the preset window as the current motion detection area, and obtaining the area of ​​the previous video frame within the preset window as the previous motion detection area.

[0011] In an optional embodiment, before obtaining the area of ​​the current video frame within the preset window as the current motion detection area, the video noise reduction method further includes: mirroring the current video frame using vertices and / or edges of the current video frame to obtain a mirrored frame; and obtaining the area of ​​the current video frame within the preset window as the current motion detection area includes: obtaining the area of ​​the mirrored frame within the preset window as the current motion detection area. Mirroring the video frame can improve the accuracy of motion detection of pixels at corners.

[0012] In an optional embodiment, the video denoising method further includes: setting a maximum number of fused frames; and constructing fusion weights corresponding to each pixel based on the target number of still frames, including: constructing the fusion weights based on the maximum number of fused frames when the target number of still frames is greater than or equal to the maximum number of fused frames, and constructing the fusion weights based on the target number of still frames when the target number of still frames is less than the maximum number of fused frames. Video frames that are too far away from the current video frame have a minimal impact on the denoising results of the current video frame. Setting the maximum number of fused frames can limit the fusion weights of each pixel, simplifying calculations while reducing memory requirements.

[0013] In the second aspect, an embodiment of the present application provides a video noise reduction device, including: a still frame number acquisition module, the still frame number acquisition module is used to obtain the target still frame number of each pixel point in the current video frame, the target still frame number is the number of frames that remain continuous and relatively still with the current video frame in the video to be denoised; a weight construction module, the weight construction module is used to construct a fusion weight corresponding to each of the pixel points according to the target still frame number; a noise reduction module, the noise reduction module is used to fuse the current video frame and the previous video frame according to the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame.

[0014] In a third aspect, an embodiment of the present application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the video noise reduction method as described above.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the aforementioned video noise reduction method.

[0016] Compared with the prior art, in the video denoising method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application, when denoising a video frame in a video to be denoised that needs to be denoised, the video frame is the current video frame. When denoising the current video frame, the fusion weight of each pixel is calculated separately according to the number of consecutive still frames of each pixel therein to determine the fusion weight of each pixel. When fusion denoising is performed on the current video frame, each pixel is calculated according to the corresponding fusion weight, so that the denoising effect of the obtained denoised video frame is better, thereby improving the video denoising effect of the video to be denoised. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0018] FIG1 is a flow chart of a video noise reduction method according to a first embodiment of the present invention;

[0019] FIG2 is a schematic diagram of a process for determining whether a pixel is stationary relative to a previous video frame in a video noise reduction method provided in Example 1 of the present application;

[0020] FIG3 is a schematic diagram of a current video frame and a mirrored frame in the video noise reduction method provided in Example 1 of the present application;

[0021] FIG4 is a schematic structural diagram of a video noise reduction device provided in Example 2 of the present application;

[0022] FIG5 is a schematic diagram of the structure of the electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0024] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the application as claimed, but is merely representative of selected embodiments of the present application.

[0025] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0026] It should be noted that, in the absence of conflict, the features in the embodiments of this application can be combined with each other.

[0027] In mobile phone and video surveillance applications, fusing captured images through time-domain fusion to reduce noise in photos and videos is a crucial step in improving image quality. Taking surveillance video as an example, the current mainstream time-domain noise reduction algorithms mainly include the following steps:

[0028] S1: Determine the maximum number of fusible frames N for temporal noise reduction;

[0029] S2: Based on the maximum number of available frames N, calculate the fusion weight of each frame in the fusion process during the time domain noise reduction process

[0030] S3: When performing noise reduction on the i-th frame image, Cur i Represents the i-th frame image of the captured video sequence, and Ref i-1 Represents the i-1 frame image, first calculate Ref i-1 With Cur i The frame difference information Diff=f(Ref i-1 ,Cur i );

[0031] S4: Then, according to the preset motion detection threshold th, the moving pixel points and the stationary pixel points are obtained.

[0032]

[0033] Where (x, y) represents the pixel coordinates, MotionMask(x, y) = 1 indicates that the pixel is in Ref i-1 and Cur i Relative motion in the Ref is a moving pixel, and MotionMask(x,y)=0 indicates that the pixel is in i-1 and Cur i The pixels in the image are relatively still and are stationary pixels.

[0034] S5: According to MotionMask, Ref i-1 、Cur i Fusion is performed and the fusion result is recorded as Ref i ;

[0035] Assume Cur i The noise intensity is σ, Cur i Relative to Ref i-1 There is motion (for simplicity, assume Cur i Relative to Ref i-1 Every pixel is moving), assuming Ref i-1 The noise intensity is close to 0, so the Ref after fusion i The noise intensity is σ, when Cur i+1 With Ref i When the fusion of The fusion weights are fused, then the new fusion result Ref i+1 The noise intensity is Time domain noise reduction The speed of convergence is slow, and the noise reduction effect is poor.

[0036] In order to improve the noise reduction effect of time-domain fusion noise reduction, the first embodiment of the present application provides a video noise reduction method, as shown in FIG1 , comprising:

[0037] Step S101: Obtain the target still frame number of each pixel in the current video frame.

[0038] In this step, the target number of still frames is the number of frames in the video to be denoised that remain continuous and relatively still relative to the current video frame. For example, if the current video frame is the nth video frame, for any pixel in the current video frame, if the pixel does not move relative to the n-1th video frame, that is, is relatively still, and the pixel moves in the n-1th video frame and the n-2th video frame, then in the nth video frame, the pixel is still only relative to the n-1th video frame, and the target number of still frames corresponding to the pixel is 1. If the pixel does not move relative to both the n-1th video frame and the n-2th video frame, that is, is relatively still, and the pixel moves in the n-2th video frame and the n-3th video frame, then the pixel is still relative to both the n-1th video frame and the n-2th video frame, and the target number of still frames corresponding to the pixel is 2. This is repeated in this way to obtain the target number of still frames corresponding to each pixel.

[0039] In some embodiments of the present application, referring to FIG. 2 , for any pixel in the current video frame, determining whether the pixel is in a stationary state relative to the previous video frame may specifically include:

[0040] Step S201: obtaining a current motion detection region corresponding to a pixel point in a current video frame and a previous motion detection region corresponding to a pixel point in a previous video frame.

[0041] In different embodiments of the present application, the previous video frame can be the original video frame image that is located before the current video frame in the video to be detected, or it can be the original video frame image that is located n frames before the current video frame in the video to be detected, or it can be the denoised image of the original video frame image that is located before the current video frame in the video to be detected. The specific setting can be flexibly made according to actual needs.

[0042] In this step, the same method can be used to obtain the current motion detection area and the previous motion detection area. Specifically, for example, the pixel point is used as the center point of the preset window, and the area of ​​the current video frame within the preset window is obtained as the current motion detection area, and the area of ​​the previous video frame within the preset window is obtained as the previous motion detection area. The preset window can be, for example, a circular window with a radius of r, a square window with a side length of A, or a rectangular window with a length of l and a width of w, etc., and can be flexibly selected according to actual needs. The size of the preset window can be selected based on the size of the video to be denoised, the noise reduction accuracy requirements, etc.

[0043] Furthermore, in some embodiments of the present application, as shown in FIG3 , for the current video frame 10, the current video frame is mirrored using the vertices and / or edges of the current video frame 10 to obtain a mirrored frame 20. The mirrored frame 20 includes the current video frame 10 and a mirrored image 30 obtained by mirroring the current video frame 10. The mirrored image 30 is the mirrored result of the mirroring of the video frame 10. As shown in FIG3 , taking the shape of the video frame 10 as a rectangle as an example, the rectangular video frame 10 includes four edges and four vertices. The video frame 10 is mirrored using the four edges and four vertices to obtain a total of eight mirrored images 30. The eight mirrored images 30 and the original video frame 10 together constitute the mirrored frame 20. When obtaining the current motion detection area, the acquisition is based on the mirrored frame 20, that is, the area of ​​the mirrored frame within the preset window is obtained as the current motion detection area. The video frame is mirrored to obtain a mirror frame 20, and the area of ​​the mirror frame 20 within the preset window is obtained as the current motion detection area. This can avoid the situation where the preset window may exceed the current video frame 10 when the current motion detection area corresponding to the pixel points at the corners of the current video frame 10 is increased, thereby improving the accuracy of motion detection of the pixel points at the corners.

[0044] Step S202: respectively obtaining the absolute value of the difference between the pixel values ​​and the absolute value of the sum of the pixel value differences of each pixel point in the current motion detection area and the previous motion detection area.

[0045] In this step, obtaining the absolute value of the difference between the pixel value sum of each pixel point in the current motion detection area and the previous motion detection area can be specifically performed by first obtaining the current pixel value sum of all pixels in the current motion detection area and the previous pixel value sum of all pixels in the previous motion detection area, and then taking the absolute value of the difference between the current pixel value sum and the previous pixel value sum. Obtaining the sum of the absolute values ​​of the pixel value differences of each pixel point in the current motion detection area and the previous motion detection area can be specifically performed by taking the absolute value of the difference between the pixel values ​​of the same pixel point in the current motion detection area and the previous motion detection area, and then summing the absolute values ​​of the differences corresponding to all pixels.

[0046] Taking the current motion detection area and the previous motion detection area as square areas with a side length of 2r, and the pixel coordinates corresponding to the current motion detection area and the previous motion detection area as (x, y) as an example, the formula can be used and formula The absolute value of the difference between the pixel values ​​and the absolute value of the difference between the pixel values ​​of each pixel point in the current motion detection area and the previous motion detection area are respectively calculated.

[0047] Among them, MeanDiff(x,y) is the absolute value of the difference between the pixel values ​​of the current motion detection area and the previous motion detection area corresponding to the pixel point (x, y), SAD(x,y) is the sum of the absolute values ​​of the difference between the pixel values ​​of the current motion detection area and the previous motion detection area corresponding to the pixel point (x, y), Cur i is the current video frame, Ref i-1 The previous video frame.

[0048] Step S203: Set the pixel points whose absolute value of the difference between the pixel value and the value belongs to the first preset threshold range and whose sum of the absolute values ​​of the pixel value differences belongs to the second preset threshold range as moving pixel points, and set the pixel points whose absolute value of the difference between the pixel value and the value does not belong to the first preset threshold range, or whose sum of the absolute values ​​of the pixel value differences does not belong to the second preset threshold range as stationary pixel points.

[0049] In this step, the first preset threshold range and the second preset threshold range can be set in advance according to the actual noise reduction needs. For example, thresholds th1 and th2 can be set in advance, and the range greater than the threshold th1 is used as the first preset threshold range, and the range greater than the threshold th2 is used as the second preset threshold range. The formula is expressed as:

[0050] MotionMask(x,y)=1 means that the pixel is in relative motion with the previous video frame and is a moving pixel.

[0051] MotionMask(x, y)=0 means that the pixel is relatively still compared to the previous video frame and is a stationary pixel.

[0052] It can be understood that the aforementioned use of a range greater than the threshold value th1 as the first preset threshold range and a range greater than the threshold value th2 as the second preset threshold range is merely an example in some embodiments of the present application. In some other embodiments of the present application, for example, the range less than the threshold value th1 can be used as the first preset threshold range, and the range less than the threshold value th2 can be used as the second preset threshold range, or the range greater than the threshold value th1 can be used as the first preset threshold range, and the range less than the threshold value th2 can be used as the second preset threshold range, etc. The specific settings can be made according to actual needs.

[0053] In the method shown in Figure 2, when performing motion detection on each pixel point, the operation of a single pixel point is converted into the operation of multiple pixels in the motion detection area corresponding to the pixel point, which can improve the accuracy of motion detection on the pixel point, and correspondingly improve the accuracy of the target still frame number. With the improvement of the accuracy of the target still frame number, the accuracy of the fusion weight of each pixel point is also improved, so that the noise reduction effect of the current video frame is further improved.

[0054] In some embodiments of the present application, the target number of still frames for each pixel may be acquired frame by frame according to the steps shown in FIG. 2 .

[0055] Furthermore, in some other embodiments of the present application, a still frame number recording matrix can be set, and the still frame number recording matrix includes the same number of elements as the number of pixels in the video to be denoised, and each element is used to record the historical still frame number of each pixel in the video to be denoised. When setting the still frame number recording matrix, each element is initialized to 1. After setting the still frame number recording matrix, the target still frame number of each pixel in the current video frame can be obtained by: obtaining the moving pixel points in the current video frame that are in relative motion with the previous video frame and the still pixel points that are relatively still with the previous video frame according to the steps shown in Figure 2; setting the target still frame number of the moving pixel points to 1; obtaining the historical still frame number of the still pixel points from the still frame number recording matrix, and recording the target still frame number of the still pixel points as the historical still frame number plus 1. The formula is expressed as:

[0056] Among them, FusionMask(x,y) is the target still frame number corresponding to the pixel point (x,y), and FusionMask′(x,y) is the historical still frame number corresponding to the pixel point (x,y).

[0057] A still frame number recording matrix is ​​set to record the historical still frame number of each pixel point in the denoised video. When determining the target still frame number of each pixel point in the current video frame, the current video frame is directly compared with the previous video frame in motion. For still pixels that remain still compared with the previous video frame, the historical still frame number corresponding to the still pixel point is directly added by 1 to obtain the target still frame number corresponding to the still pixel point, thereby improving the efficiency of obtaining the target still frame number and further improving the overall noise reduction efficiency of the denoised video.

[0058] Furthermore, after noise reduction is completed on the current video frame, the historical still frame count corresponding to each element in the still frame count record matrix can be set as the target still frame count for each pixel in the current video frame. This facilitates the direct use of the still frame count record matrix to obtain the target still frame count for subsequent video frames when noise reduction is performed, thereby improving the overall noise reduction efficiency of the video being denoised.

[0059] Step S102: Constructing fusion weights corresponding to each pixel point according to the target number of still frames.

[0060] In this step, the fusion weight corresponding to each pixel can be the inverse of the target still frame number. The formula is:

[0061] Step S103: fusing the current video frame and the previous video frame according to the fusion weight to obtain a noise reduction video frame corresponding to the current video frame.

[0062] In this step, the fusion denoising formula can be used: i (x,y)=Cur i *FusionWeight(x,y)+Ref i-1 *(1-Fusion_weight(x,y)) fuses the current video frame with the previous video frame to obtain the denoised video frame corresponding to the current video frame.

[0063] Assume that the current video frame Cur i The noise intensity is σ, the current video frame Cur i Relative to the previous video frame Ref i-1 There is motion (for simplicity, assume Cur i Relative to Ref i-1 Every pixel is moving). Assume Ref i-1 The noise intensity is close to 0, so the Ref after fusion i The noise intensity is σ, and the next video frame Cur i+1 Fusion result Ref with the current video frame i When performing fusion, the new fusion result Refi+1 The noise intensity is Much smaller than existing solutions

[0064] Compared with the prior art, in the video denoising method provided in the first embodiment of the present application, when denoising a video frame in a video to be denoised that needs to be denoised, the video frame is the current video frame. When denoising the current video frame, the fusion weight of each pixel is calculated separately according to the number of consecutive still frames of each pixel therein to determine the fusion weight of each pixel. When fusion denoising is performed on the current video frame, each pixel is calculated according to the corresponding fusion weight, so that the denoising effect of the obtained denoised video frame is better, thereby improving the video denoising effect of the video to be denoised.

[0065] Furthermore, in some other embodiments of the present application, the maximum number of fused frames N can also be set, and the maximum number of fused frames N can be set according to the actual noise reduction requirements. For example, if the current scene is dark and the noise is large, the maximum number of fused frames N can take a relatively large value. In some embodiments of the present application, the maximum number of fused frames N≤255 can be set, and the maximum number of fused frames N≤255 can be stored using an 8-bit storage unit. Then, the fusion weights corresponding to each pixel point constructed according to the target still frame number can be: when the target still frame number is greater than or equal to the maximum fused frame number, the fusion weights are constructed according to the maximum fused frame number; when the target still frame number is less than the maximum fused frame number, the fusion weights are constructed according to the target still frame number. The formula is expressed as:

[0066] Video frames that are too far away from the current video frame have little impact on the noise reduction result of the current video frame. Setting the maximum number of fused frames can limit the fusion weight of each pixel point, simplifying the calculation and reducing memory requirements.

[0067] Embodiment 2 of the present application provides a video noise reduction device, as shown in FIG4 , including: a still frame number acquisition module 301, the still frame number acquisition module 301 is used to obtain a target still frame number for each pixel point in the current video frame, the target still frame number being the number of frames that remain continuous and relatively still with the current video frame in the video to be denoised; a weight construction module 302, the weight construction module 302 is used to construct a fusion weight corresponding to each pixel point according to the target still frame number; and a noise reduction module 303, the noise reduction module 303 is used to fuse the current video frame and the previous video frame according to the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame.

[0068] Compared with the prior art, in the video noise reduction device provided in the embodiment of the present application, when noise reduction is performed on a video frame in a video to be noise reduced, the video frame is the current video frame. When noise reduction is performed on the current video frame, the still frame number acquisition module 301 acquires the target still frame number of each pixel point in the current video frame, and the weight construction module 302 constructs a fusion weight corresponding to each pixel point according to the target still frame number. When the noise reduction module 303 performs fusion noise reduction, each pixel point is calculated according to the corresponding fusion weight, so that the noise reduction effect of the obtained noise-reduced video frame is better, thereby improving the video noise reduction effect of the video to be noise reduced.

[0069] In some embodiments of the present application, the still frame acquisition module 301 is further configured to set and initialize a still frame record matrix, which is used to record the historical still frame counts of each pixel in the video to be denoised. The weight construction module 302 is further configured to obtain, in the current video frame, moving pixels that are in relative motion with respect to the previous video frame and still pixels that are relatively stationary with respect to the previous video frame; set the target still frame count for the moving pixels to 1; and obtain the historical still frame counts for the still pixels from the still frame record matrix, recording the target still frame count for the moving pixels as the historical still frame count plus 1.

[0070] In some embodiments of the present application, the still frame number acquisition module 301 is further configured to set the historical still frame number as the target still frame number.

[0071] In some embodiments of the present application, the weight construction module 302 is also used to obtain the absolute value of the difference between the pixel value and the value and the sum of the absolute values ​​of the pixel value differences of each pixel point in the current motion detection area and the previous motion detection area, respectively; set the pixel point whose absolute value of the difference between the pixel value and the value belongs to the first preset threshold range and the sum of the absolute values ​​of the pixel value differences belongs to the second preset threshold range as a moving pixel point, and set the pixel point whose absolute value of the difference between the pixel value and the value does not belong to the first preset threshold range or the sum of the absolute values ​​of the pixel value differences does not belong to the second preset threshold range as a stationary pixel point.

[0072] In some embodiments of the present application, the still frame number acquisition module 301 is also used to use the pixel point as the center point of the preset window, obtain the area of ​​the current video frame within the preset window as the current motion detection area, and obtain the area of ​​the previous video frame within the preset window as the previous motion detection area.

[0073] In some embodiments of the present application, the still frame number acquisition module 301 is also used to mirror the current video frame with its vertices and / or edges to obtain a mirror frame, and obtain the area of ​​the mirror frame within a preset window as the current motion detection area.

[0074] In some embodiments of the present application, the weight construction module 302 is also used to set the maximum number of frames that can be fused; constructing fusion weights corresponding to each pixel point according to the target number of still frames, including: when the target number of still frames is greater than or equal to the maximum number of frames that can be fused, constructing fusion weights according to the maximum number of frames that can be fused; when the target number of still frames is less than the maximum number of frames that can be fused, constructing fusion weights according to the target number of still frames.

[0075] Embodiment 3 of the present application relates to an electronic device, as shown in FIG5 , comprising: at least one processor 401; and a memory 402 communicatively connected to the at least one processor 401; wherein the memory 402 stores instructions that can be executed by the at least one processor 401, and the instructions are executed by the at least one processor 401 so that the at least one processor 401 can execute the methods in the above-mentioned embodiments.

[0076] The memory and processor are connected using a bus, which can include any number of interconnected buses and bridges. The bus connects various circuits of one or more processors and memories. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits. These are all well known in the art and are therefore not described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over a wireless medium via an antenna. Furthermore, the antenna receives data and transmits it to the processor.

[0077] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0078] A fourth embodiment of the present application relates to a computer-readable storage medium storing a computer program that implements the above method embodiment when executed by a processor.

[0079] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps in the various embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.

[0080] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A video noise reduction method, characterized in that: include: Obtaining a target number of still frames for each pixel in the current video frame, where the target number of still frames is the number of frames in the video to be denoised that remain continuous and relatively still with the current video frame; Constructing a fusion weight corresponding to each pixel point according to the target still frame number; The current video frame and the previous video frame are fused according to the fusion weight to obtain a noise reduction video frame corresponding to the current video frame.

2. The video noise reduction method according to claim 1, wherein: The video noise reduction method further includes: Setting and initializing a still frame number recording matrix, wherein the still frame number recording matrix is ​​used to record the historical still frame number of each pixel point in the video to be denoised; The step of obtaining the target number of still frames for each pixel in the current video frame includes: Obtaining, in the current video frame, moving pixel points that are in relative motion with respect to the previous video frame and stationary pixel points that are relatively stationary with respect to the previous video frame; Set the target number of still frames of the moving pixel to 1; The historical still frame number of the still pixel point is obtained from the still frame number recording matrix, and the target still frame number recorded for the still pixel point is the historical still frame number plus 1.

3. The video noise reduction method according to claim 2, wherein: After fusing the current video frame and the previous video frame according to the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame, the video noise reduction method further includes: The historical number of still frames is set as the target number of still frames.

4. The video noise reduction method according to claim 2, wherein: The acquiring, in the current video frame, moving pixel points that are in relative motion with respect to the previous video frame and stationary pixel points that are relatively stationary with respect to the previous video frame, includes: For any pixel point in the current video frame, obtaining a current motion detection area corresponding to the pixel point in the current video frame and a previous motion detection area corresponding to the pixel point in the previous video frame; Respectively obtaining the absolute value of the difference between the pixel values ​​and the absolute value of the difference between the pixel values ​​of each pixel point in the current motion detection area and the previous motion detection area; The pixel point whose absolute value of the difference between the pixel value and the value belongs to the first preset threshold range and whose sum of the absolute values ​​of the pixel value differences belongs to the second preset threshold range is set as the moving pixel point, and the pixel point whose absolute value of the difference between the pixel value and the value does not belong to the first preset threshold range, or whose sum of the absolute values ​​of the pixel value differences does not belong to the second preset threshold range is set as the stationary pixel point.

5. The video noise reduction method according to claim 4, characterized in that: The obtaining of the current motion detection region corresponding to the pixel point in the current video frame and the previous motion detection region corresponding to the pixel point in the previous video frame includes: Taking the pixel point as the center point of the preset window, obtaining the area of ​​the current video frame within the preset window as the current motion detection area, and obtaining the area of ​​the previous video frame within the preset window as the previous motion detection area. Motion detection area.

6. The video noise reduction method according to claim 5, characterized in that: Before obtaining the area of ​​the current video frame within the preset window as the current motion detection area, the video noise reduction method further includes: Performing mirror processing on the current video frame using vertices and / or edges of the current video frame to obtain a mirrored frame; The acquiring the area of ​​the current video frame within the preset window as the current motion detection area includes: The area of ​​the mirror frame within the preset window is obtained as the current motion detection area.

7. The video noise reduction method according to any one of claims 1 to 6, characterized in that: The video noise reduction method further includes: Set the maximum number of frames that can be fused; The constructing of fusion weights corresponding to the respective pixel points according to the target number of still frames includes: When the target number of still frames is greater than or equal to the maximum number of fused frames, the fusion weight is constructed according to the maximum number of fused frames; when the target number of still frames is less than the maximum number of fused frames, the fusion weight is constructed according to the target number of still frames.

8. A video noise reduction device, characterized in that: include: A still frame number acquisition module is used to obtain a target still frame number for each pixel in the current video frame, wherein the target still frame number is the number of frames in the video to be denoised that remain continuous and relatively still with the current video frame; A weight construction module, the weight construction module is used to construct a fusion weight corresponding to each pixel point according to the target number of still frames; A noise reduction module is configured to fuse the current video frame and the previous video frame according to the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame.

9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the video noise reduction method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: The computer program is executed by a processor to implement the video noise reduction method according to any one of claims 1 to 7.