Video noise reduction method, apparatus, electronic device, and computer-readable medium

The method improves video noise reduction by calculating pixel-specific fusion weights based on consecutive still frames, effectively reducing noise in surveillance camera images.

JP2026513708AActive Publication Date: 2026-05-01VERISILICON MICROELECTRONICS (CHENGDU) CO LTD +4
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
VERISILICON MICROELECTRONICS (CHENGDU) CO LTD
Filing Date
2024-03-06
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Conventional video noise reduction methods are ineffective in significantly reducing noise in surveillance camera images, particularly at night, due to thermal, shot, and solid noise generated by image sensors, which impair image resolution.

Method used

A video noise reduction method that calculates individual fusion weights for each pixel point based on the number of consecutive still frames, fusing the current video frame with previous frames to improve noise reduction efficiency.

Benefits of technology

Enhances the noise reduction effect on video frames by individually calculating fusion weights for each pixel point, resulting in a more effective noise reduction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026513708000001_ABST
    Figure 2026513708000001_ABST
Patent Text Reader

Abstract

This application belongs to the field of video and specifically relates to a video noise reduction method, apparatus, electronic device, and computer-readable medium. The video noise reduction method includes the steps of: obtaining the target still frame number for each pixel point in the current video frame; constructing a fusion weight corresponding to each of the pixel points based on the target still frame number; and fusing the current video frame with the previous frame based on the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame, wherein the target still frame number is the number of frames that are continuously and relatively still with respect to the current video frame in the video to be noise-reduced. Compared to the prior art, the video noise reduction method, apparatus, electronic device, and computer-readable medium according to the embodiments of this application have the advantage of improving the effect of video noise reduction.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application belongs to the field of image processing technology and specifically relates to a method, apparatus, electronic device, and computer-readable medium for reducing video noise. [Background technology]

[0002] Currently, surveillance cameras are widely used for both security monitoring and home life, and user demands for the quality of the generated images are increasing, requiring clear and reliable video both day and night. However, due to the technical characteristics of the image sensor itself, there is an unavoidable problem of noise. For example, thermal noise is generated due to fluctuations in charge potential caused by the thermal effect of electrons in the image sensor. For example, solid noise is generated because the conversion characteristics of the amplifier in the image sensor are not matched. Or, when current flows through a potential barrier (PN junction) in the image sensor, shot noise is generated related to incident photons and dark current. When the lighting at night is poor, these noise phenomena become particularly noticeable, and the image resolution is greatly impaired. However, conventional video noise reduction methods are not very effective at reducing noise. [Overview of the Initiative] [Problems that the invention aims to solve]

[0003] This application aims to provide a video noise reduction method, apparatus, electronic device, and computer-readable medium that improve the effectiveness of video noise reduction. [Means for solving the problem]

[0004] In the first aspect, embodiments of the present application provide a video noise reduction method. The video noise reduction method includes the steps of: obtaining the target number of still frames for each pixel point in the current video frame; constructing a fusion weight corresponding to each pixel point based on the target number of still frames; and fusing the current video frame with the previous frame based on the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame, wherein the target number of still frames is the number of frames that are continuously and relatively still with respect to the current video frame in the video to be noise-reduced.

[0005] Compared to the prior art, in the video noise reduction method according to the embodiment of this application, when noise reduction is performed on any video frame in a video to be noise-reduced that requires noise reduction processing, the video frame is the current video frame, and when noise reduction is performed on the current video frame, the fusion weight of each pixel point is individually calculated based on the number of consecutive still frames for each pixel point, and the fusion weight of each pixel point is determined. When fusion noise reduction is performed on the current video frame, by performing calculations on each pixel point based on the corresponding fusion weight, the noise reduction effect on the noise-reduced video frame is better, and therefore the video noise reduction effect on the video to be noise-reduced is improved.

[0006] In an optional embodiment, the video noise reduction method further includes setting and initializing a still frame count recording matrix, wherein the still frame count recording matrix is ​​for recording the past still frame count of each pixel point in the video to be noise reduced, and the step of obtaining the target still frame count of each pixel point in the current video frame includes the steps of obtaining a moving pixel point in the current video frame that has moved relative to the previous frame and a still pixel point that is stationary relative to the previous frame, setting the target still frame count of the moving pixel point to 1, and obtaining the past still frame count of the still pixel point from the still frame count recording matrix and recording the target still frame count of the still pixel point as the past still frame count plus 1. A still frame count recording matrix is ​​set to record the number of past still frames for each pixel point in the video to be noise-reduced. When the target still frame count for each pixel point in the current video frame is determined, a direct movement comparison is performed between the current video frame and the previous frame. For still pixel points that are still relative to the previous frame, 1 is added to the number of past still frames corresponding to the directly still pixel point to obtain the target still frame count corresponding to the still pixel point. This improves the efficiency of obtaining the target still frame count and thus improves the overall noise reduction efficiency for the video to be noise-reduced.

[0007] In an optional embodiment, after the step of fusing the current video frame with the previous frame based on the fusing weight to obtain a noise-reduced video frame corresponding to the current video frame, the video noise reduction method further includes setting the number of past still frames as the number of target still frames. After obtaining a noise-reduced video frame corresponding to the current video frame, i.e., after completing noise reduction on the current video frame, the number of past still frames is set as the number of target still frames. In this way, when noise reduction is performed on other video frames later, the number of target still frames corresponding to the later video frames can be obtained directly using the number of still frames recording matrix, thereby improving the overall noise reduction efficiency for the video to be noise-reduced.

[0008] In an optional embodiment, the step of obtaining moving pixel points in the current video frame that have moved relative to the previous frame, and stationary pixel points that are stationary relative to the previous frame, is to obtain, for any pixel point in the current video frame, a current movement detection region in the current video frame corresponding to the pixel point, and a previous movement detection region in the previous frame corresponding to the pixel point, and the sum of the pixel values ​​of each pixel point in the current movement detection region and the pixel values ​​of each pixel point in the previous movement detection region. The method includes the steps of obtaining the absolute value of the difference between the sum of and and the sum of the absolute values ​​of the differences between the pixel values ​​of each pixel point in the current motion detection region and the pixel values ​​of each pixel point in the previous motion detection region, respectively, and determining that pixel points are the moving pixel points if the absolute value of the difference of the sum of the pixel values ​​falls within a first predetermined threshold range and the sum of the absolute values ​​of the differences of the pixel values ​​falls within a second predetermined threshold range, and determining that pixel points are the stationary pixel points if the absolute value of the difference of the sum of the pixel values ​​does not fall within the first predetermined threshold range, or if the sum of the absolute values ​​of the differences of the pixel values ​​does not fall within the second predetermined threshold range. When motion detection is performed for each pixel point, converting the calculation for a single pixel point to the calculation for multiple pixel points in the motion detection region corresponding to that pixel point improves the accuracy of motion detection for that pixel point, and therefore improves the accuracy of the target stationary frame count. If the accuracy of the target stationary frame count improves, the accuracy of the fusion weight of each pixel point also improves, and the effect of noise reduction on the current video frame is further improved.

[0009] In an optional embodiment, the step of acquiring a current motion detection region corresponding to the pixel point in the current video frame and a previous motion detection region corresponding to the pixel point in the previous frame includes using the pixel point as the center point of a predetermined window, acquiring the region of the current video frame in the predetermined window as the current motion detection region, and acquiring the region of the previous frame in the predetermined window as the previous motion detection region.

[0010] In an optional embodiment, before making the area of ​​the current video frame in the predetermined window the current movement detection area, the video noise reduction method further includes performing a mirroring process on the current video frame with respect to at least one of the vertices and edges of the current video frame to obtain a mirrored frame, and making the area of ​​the current video frame in the predetermined window the current movement detection area includes making the area of ​​the mirrored frame in the predetermined window the current movement detection area. Performing a mirroring process on the video frame can improve the accuracy of detecting the movement of pixel points at corners.

[0011] In an optional embodiment, the video noise reduction method includes setting a maximum number of fused frames, and the step of constructing a fusion weight corresponding to each pixel point based on the target number of still frames includes constructing the fusion weight based on the maximum number of fused frames if the target number of still frames is equal to or greater than the maximum number of fused frames, and constructing the fusion weight based on the target number of still frames if the target number of still frames is less than the maximum number of fused frames. When the influence of video frames far from the current video frame on the noise reduction result of the current video frame is relatively small, setting a maximum number of fused frames limits the fusion weight of each pixel point, simplifying calculations and reducing memory requirements.

[0012] In a second aspect, an embodiment of the present application provides a video noise reduction device. The video noise reduction device includes a still frame number acquisition module, a weight construction module, and a noise reduction module. The still frame number acquisition module is configured to acquire 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 are relatively stationary continuously with the current video frame in the video to be noise-reduced. The weight construction module is configured to construct a fusion weight corresponding to each pixel point based on the target still frame number. The noise reduction module is configured to fuse the current video frame and the previous frame based on the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame.

[0013] In a third aspect, an embodiment of the present application provides an electronic device. The electronic device includes at least one processor and a memory communicatively connected to the at least one processor. The memory stores commands executable by the at least one processor. When the commands are executed by the at least one processor, the video noise reduction method described above is executed by the at least one processor.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable medium. A computer program is stored in the computer-readable medium. When the computer program is executed by a processor, the video noise reduction method described above is realized.

Advantages of the Invention

[0015] Compared to the prior art, the video noise reduction method, apparatus, electronic device, and computer-readable medium according to the embodiment of this application, when noise reduction is performed on video frames in a video to be noise-reduced that requires noise reduction processing, the video frame is the current video frame, and when noise reduction is performed on the current video frame, the fusion weight of each pixel point is individually calculated based on the number of consecutive static frames for each pixel point within it, and the fusion weight of each pixel point is determined. When fusion noise reduction is performed on the current video frame, the effect of noise reduction on the noise-reduced video frame is better because the calculation is performed on each pixel point based on the corresponding fusion weight, and therefore the effect of video noise reduction on the video to be noise-reduced is improved. [Brief explanation of the drawing]

[0016] To more clearly explain the technical concept of the embodiments of this application, the drawings used in the embodiments are briefly described below. The drawings described are merely examples of some embodiments of this application and do not limit their scope. Those skilled in the art can obtain other relevant drawings based on these drawings without employing inventive ability.

[0017] [Figure 1] This is a schematic flowchart of the video noise reduction method according to Embodiment 1 of this application. [Figure 2] This is a schematic flowchart for determining whether a pixel point is stationary relative to the previous frame in the video noise reduction method according to Embodiment 1 of this application. [Figure 3] This is a schematic diagram of the current video frame and mirrored frame in the video noise reduction method according to Embodiment 1 of this application. [Figure 4] This is a schematic diagram of the video noise reduction device according to Embodiment 2 of this application. [Figure 5] This is a schematic diagram of the electronic device according to Embodiment 3 of this application. [Modes for carrying out the invention]

[0018] To clarify the purpose, technical proposal, and advantages of the embodiments of this application, the technical proposal in the embodiments of this application will be described below with reference to the drawings used in the embodiments of this application. The embodiments described are only a selection of embodiments of this application, not all embodiments. The components in the embodiments of this application shown with reference to the drawings can be arranged and designed in various ways.

[0019] Therefore, the following detailed description of the embodiments of this application shown in the drawings is merely to illustrate selected embodiments of this application and does not limit the scope of this application.

[0020] Similar symbols indicate the same thing in drawings, so if they are defined in one drawing, it is unnecessary to define or interpret them further in other drawings.

[0021] Features of the embodiments of this application can be combined as long as they do not contradict each other.

[0022] In applications such as mobile phones and video surveillance, temporal domain fusion, which involves fusing captured images to reduce noise in photos and videos, is an important part of improving image quality. Taking video surveillance as an example, current mainstream temporal noise reduction algorithms mainly include the following steps.

[0023] S1: Determine the maximum number of frames N that can be merged for temporal noise reduction.

[0024] S2: Based on the maximum number of fused frames N, the fusion weight FusionWeight = 1 / N is calculated for each frame during the temporal noise reduction process.

[0025] S3: When noise reduction is performed on the i-th frame image of the captured video sequence, i Represented as , the image of the (i-1)th frame is Ref i-1represented by, first Ref i-1 and Cur i to calculate the inter-frame difference information Diff = f(Ref i-1 , Cur i ).

[0026] S4: Based on a preset motion detection threshold th, obtain moving pixel points and stationary pixel points.

[0027]

Number

[0028] If (x, y) represents the coordinates of a pixel point and MotionMask(x, y) = 1, it indicates that the pixel point moves relatively in Ref i-1 and Cur i and is a moving pixel point. If MotionMask(x, y) = 0, it indicates that the pixel point is relatively stationary in Ref i-1 and Cur i and is a stationary pixel point.

[0029] S5: Based on MotionMask, perform fusion on Ref i-1 and Cur i and represent the fusion result by Ref i .

[0030] Ref i = Cur i × MotionMask + [Cur i × (1 / N) + Ref i-1 × (1 - 1 / N)] × (1 - MotionMask). Cur i The noise intensity of is σ, and Cur i moves relative to Ref i (For simplicity, assume that Cur i moves relative to each pixel point of Ref i-1 ), and assume that the noise intensity of Ref i-1 is close to 0. Then, the noise intensity of the fused Ref i is σ, and Cur i+1 and Refi When fusing with, if the fusing is still performed with a fusing weight of 1 / N, the new fusing result will be Ref i+1 The noise intensity is ((N-1) / N)σ, and the temporal noise reduction converges at a speed of 1 / N, indicating that the noise reduction effect is relatively weak.

[0031] To improve the noise reduction effect of temporal fusion noise reduction, Embodiment 1 of this application provides a video noise reduction method. As shown in Figure 1, the video noise reduction method includes the following steps.

[0032] Step S101: Obtain the target still frame number for each pixel point in the current video frame.

[0033] In this step, the target number of still frames is the number of video frames in the video to be noise-reduced that are continuously and relatively still with respect to the current video frame. For example, if the current video frame is the nth video frame, and for any pixel point in the current video frame, that pixel point has not moved relative to the (n-1)th video frame, that is, the pixel point is relatively still in the nth video frame and the (n-1)th video frame, and the pixel point has moved in the (n-1)th video frame and the (n-2)th video frame, then in the nth video frame, the pixel point is still with respect to the (n-1)th video frame only, and the target number of still frames corresponding to that pixel point is 1. If the pixel point has not moved in relation to the (n-1)th and (n-2)th video frames, i.e., it is relatively stationary, and if the pixel point has moved in the (n-2)th and (n-3)th video frames, then the pixel point is stationary in relation to the (n-1)th and (n-2)th video frames, a total of two video frames, and the number of target stationary frames corresponding to the pixel point is 2. In this way, the number of target stationary frames corresponding to each pixel point is obtained.

[0034] In some embodiments of this application, as shown in Figure 2, determining whether any pixel point in the current video frame is stationary relative to the previous frame specifically includes the following steps.

[0035] Step S201: Obtain the current motion detection region corresponding to a pixel point in the current video frame, and the previous motion detection region corresponding to a pixel point in the previous frame.

[0036] In different embodiments of this application, the previous frame may be the original video frame image immediately preceding the current video frame in the video to be detected, the original video frame image n frames prior to the current video frame in the video to be detected, or the noise-reduced image of the original video frame image immediately preceding the current video frame in the video to be detected. Specifically, it can be freely set according to the actual needs.

[0037] In this step, the current motion detection region and the previous motion detection region can be obtained in the same manner. Specifically, for example, a pixel point can be used as the center point of a predetermined window, the region of the current video frame in the predetermined window can be obtained as the current motion detection region, and the region of the previous frame in the predetermined window can be obtained as the previous motion detection region. The predetermined window can be, for example, a circular window with radius r, or a square window with side length A, or a rectangular window with length l and width w, and can be appropriately selected according to the actual needs. The size of the predetermined window can be selected according to the size of the video to be noise-reduced, the required accuracy of noise reduction, etc.

[0038] Furthermore, in some embodiments of this application, as shown in Figure 3, a mirroring process is performed on the current video frame 10 with respect to at least one of its vertices and edges to obtain a mirrored frame 20, the mirrored frame 20 including the current video frame 10 and a mirrored image 30 obtained by performing a mirroring process on the current video frame 10. The mirrored image 30 is the mirroring result obtained by performing a mirroring process on the video frame 10. As shown in Figure 3, taking a rectangular video frame 10 as an example, the rectangular video frame 10 includes four edges and four vertices, and a mirroring process is performed on the video frame 10 with respect to each of the four edges and four vertices to obtain eight mirrored images 30, and the mirrored frame 20 is composed of the eight mirrored images 30 and the original video frame 10. When acquiring the current movement detection area, it is acquired based on the mirrored frame 20, that is, the area of ​​the mirrored frame in a predetermined window is used as the current movement detection area. By performing a mirroring process on the video frame to obtain a mirrored frame 20, and acquiring the area of ​​the mirrored frame 20 in a predetermined window as the current movement detection area, it is possible to prevent the predetermined window from overflowing the current video frame 10 when it acquires the current movement detection area corresponding to the pixel points at the corners of the current video frame 10, thereby improving the accuracy of movement detection of the pixel points at the corners.

[0039] Step S202: Obtain the absolute value of the difference between the sum of the pixel values ​​of each pixel point in the current motion detection area and the sum of the pixel values ​​of each pixel point in the previous motion detection area, and obtain the sum of the absolute values ​​of the difference between the pixel value of each pixel point in the current motion detection area and the pixel value of each pixel point in the previous motion detection area.

[0040] In this step, obtaining the absolute value of the difference between the sum of the pixel values ​​of each pixel point in the current motion detection region and the sum of the pixel values ​​of each pixel point in the previous motion detection region is done by first obtaining the sum of the current pixel values ​​of all pixel points in the current motion detection region and the sum of the pixel values ​​of all pixel points in the previous motion detection region, and then calculating the absolute value of the difference between the sum of the current pixel values ​​and the sum of the pixel values. Obtaining the sum of the absolute values ​​of the difference between the pixel value of each pixel point in the current motion detection region and the pixel value of each pixel point in the previous motion detection region is done by first calculating the absolute value of the difference between the pixel values ​​of the same pixel point in the current motion detection region and the previous motion detection region, and then calculating the sum of the absolute values ​​of the difference values ​​corresponding to all pixel points.

[0041] In an example where the current movement detection region and the previous movement detection region are square regions with side length 2r, and the coordinates of the corresponding pixel points in the current movement detection region and the previous movement detection region are (x,y),

number

number

[0042] MeanDiff(x,y) is the absolute difference between the sum of the pixel values ​​of each pixel point in the current motion detection region corresponding to pixel point (x,y) and the sum of the pixel values ​​of each pixel point in the previous motion detection region, and SAD(x,y) is the sum of the absolute differences between the pixel values ​​of each pixel point in the current motion detection region corresponding to pixel point (x,y) and the pixel values ​​of each pixel point in the previous motion detection region, and Cur i This is currently a video frame, Ref i-1That is the previous frame.

[0043] Step S203: Pixel points whose absolute value of the difference between the sums of pixel values ​​falls within a first predetermined threshold range and whose sum of the absolute values ​​of the differences between pixel values ​​falls within a second predetermined threshold range are determined to be moving pixel points, and pixel points whose absolute value of the difference between the sums of pixel values ​​does not fall within the first predetermined threshold range, or whose sum of the absolute values ​​of the differences between pixel values ​​does not fall within the second predetermined threshold range, are determined to be stationary pixel points.

[0044] In this step, a first predetermined threshold range and a second predetermined threshold range can be set in advance based on the actual noise reduction needs. For example, if thresholds th1 and th2 are set in advance, and the range greater than threshold th1 is set as the first predetermined threshold range and the range greater than threshold th2 is set as the second predetermined threshold range, the formula can be expressed as follows.

number

[0045] When MotionMask(x,y)=1, the image point moves relative to the previous frame and is a moving pixel point.

[0046] When MotionMask(x,y)=0, the image point is stationary relative to the previous frame and is therefore a stationary pixel point.

[0047] Setting the range greater than threshold th1 as the first predetermined threshold range and the range greater than threshold th2 as the second predetermined threshold range is merely illustrative in some embodiments of this application. In other embodiments of this application, for example, the range less than threshold th1 may be set as the first predetermined threshold range and the range less than threshold th2 as the second predetermined threshold range, or the range greater than threshold th1 may be set as the first predetermined threshold range and the range less than threshold th2 as the second predetermined threshold range, and these can be specifically set according to actual needs.

[0048] In the method shown in Figure 2, when motion detection is performed for each pixel point, converting the calculation for a single pixel point to the calculation for multiple pixel points in the motion detection region corresponding to that pixel point improves the accuracy of motion detection for that pixel point, and therefore improves the accuracy of the target still frame count. Improved accuracy in the target still frame count also improves the accuracy of the fusion weights for each pixel point, further enhancing the noise reduction effect on current video frames.

[0049] In some embodiments of this application, the target static frame count for each pixel point can be obtained frame by frame by following the steps shown in Figure 2.

[0050] Furthermore, in some other embodiments of this application, a static frame count recording matrix may be set. The static frame count recording matrix has the same number of elements as the number of pixel points in the video to be noise-reduced, and each element is for recording the past static frame count of each pixel point in the video to be noise-reduced. When setting the static frame count recording matrix, each of its elements is initialized to 1. After the static frame count recording matrix is ​​set, obtaining the target static frame count of each pixel point in the current video frame is done according to the steps shown in Figure 2: obtaining the moving pixel point that has moved relative to the previous frame and the static pixel point that is stationary relative to the previous frame in the current video frame; setting the target static frame count of the moving pixel point to 1; obtaining the past static frame count of the static pixel point from the static frame count recording matrix; and recording the target static frame count of the static pixel point as the past static frame count plus 1. The formula is expressed as follows.

number

[0051] FusionMask(x,y) is the target static frame number corresponding to the pixel point (x,y), and FusionMask'(x,y) is the past static frame number corresponding to the pixel point (x,y).

[0052] A still frame count recording matrix is ​​set to record the number of past still frames for each pixel point in the video to be noise-reduced. When the target still frame count for each pixel point in the current video frame is determined, a direct movement comparison is performed between the current video frame and the previous frame. For still pixel points that are still relative to the previous frame, 1 is added to the number of past still frames corresponding to the directly still pixel point to obtain the target still frame count corresponding to the still pixel point. This improves the efficiency of obtaining the target still frame count and thus improves the overall noise reduction efficiency for the video to be noise-reduced.

[0053] Alternatively, after noise reduction of the current video frame is completed, the number of past still frames corresponding to each element in the still frame count recording matrix may be set as the target still frame count for each pixel point in the current video frame. In this way, when noise reduction is performed on other video frames later, the target still frame count for those later video frames can be obtained directly using the still frame count recording matrix, thereby improving the overall noise reduction efficiency for the video being noise-reduced.

[0054] Step S102: Construct fusion weights corresponding to each pixel point based on the target number of static frames.

[0055] In this step, the reciprocal of the target static frame count is used as the fusion weight corresponding to each pixel point. The formula is expressed as follows:

[0056] FusionWeight(x,y)=1 / (FusionMask(x,y))

[0057] Step S103: Based on the fusion weights, the current video frame and the previous frame are fused to obtain a noise-reduced video frame corresponding to the current video frame.

[0058] In this step, the current video frame and the previous frame are merged using the following fusion noise reduction formula to obtain a noise-reduced video frame corresponding to the current video frame.

[0059] Ref i (x,y)=Cur i ×FusionWeight(x,y)+Ref i-1 ×(1-Fusion_weight(x,y))

[0060] Current video frame Cur i Let σ be the noise intensity, and the current video frame Cur i The previous frame Ref i-1 Move to (for simplicity, Cur i ga Ref i-1 (Assume all pixel points move relative to ), Ref i-1 Assuming the noise intensity is close to 0, the Ref after fusion i The noise intensity is σ, and the next video frame Cur i+1 And the current video frame fusion result Ref i When performing a fusion with, the new fusion result Ref i+1 The noise intensity is σ / 2, which is much smaller than the conventional ((N-1) / N)σ.

[0061] Compared to the prior art, in the video noise reduction method according to Embodiment 1 of this application, when noise reduction is performed on a video frame in a video to be noise-reduced that requires noise reduction processing, the video frame is the current video frame, and when noise reduction is performed on the current video frame, the fusion weight of each pixel point is individually calculated based on the number of consecutive static frames for each pixel point, and the fusion weight of each pixel point is determined. When fusion noise reduction is performed on the current video frame, the effect of noise reduction on the noise-reduced video frame is better because the calculation is performed on each pixel point based on the corresponding fusion weight, and therefore the effect of video noise reduction on the video to be noise-reduced is improved.

[0062] Furthermore, in some other embodiments of this application, the maximum number of fused frames N may be set. The maximum number of fused frames N can be set according to the actual noise reduction needs; for example, if the environment is dark and the noise is relatively high, the maximum number of fused frames N should be set to a relatively large value. In some embodiments of this application, the maximum number of fused frames N is set to N ≤ 255, and if the maximum number of fused frames N is set to N ≤ 255, storage can be performed by an 8-bit storage unit. Then, constructing the fusion weight corresponding to each pixel point based on the target static frame number means that if the target static frame number is greater than or equal to the maximum number of fused frames, the fusion weight is constructed based on the maximum number of fused frames, and if the target static frame number is less than the maximum number of fused frames, the fusion weight is constructed based on the target static frame number. The formula is expressed as follows.

number

[0063] When the impact of video frames far removed from the current video frame on the noise reduction result of the current video frame is relatively small, setting a maximum number of frames that can be merged limits the fusion weight of each pixel point, simplifying the calculation and reducing the memory capacity requirement.

[0064] Embodiment 2 of this application provides a video noise reduction device. As shown in Figure 4, the video noise reduction device comprises a still frame count acquisition module 301, a weight construction module 302, and a noise reduction module 303. The still frame count acquisition module 301 is configured to acquire the target still frame count for each pixel point in the current video frame, and the target still frame count is the number of frames that are continuously and relatively still with respect to the current video frame in the video to be noise reduced. The weight construction module 302 is configured to construct a fusion weight corresponding to each pixel point based on the target still frame count. The noise reduction module 303 is configured to fuse the current video frame with the previous frame based on the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame.

[0065] Compared to the prior art, in the video noise reduction device according to the embodiment of this application, when noise reduction is performed on a video frame in a video to be noise-reduced that requires noise reduction processing, the said video frame is the current video frame. When noise reduction is performed on the current video frame, the number of target still frames for each pixel point in the current video frame is obtained by the still frame number acquisition module 301, and the fusion weight corresponding to each pixel point is constructed by the weight construction module 302 based on the target number of still frames. When fusion noise reduction is performed by the noise reduction module 303, calculations are performed for each pixel point based on the corresponding fusion weight. As a result, the noise reduction effect on the noise-reduced video frame is better, and therefore, the video noise reduction effect on the video to be noise-reduced is improved.

[0066] In some embodiments of this application, the static frame count acquisition module 301 is further configured to initialize by setting a static frame count recording matrix, the static frame count recording matrix is ​​for recording the past static frame count of each pixel point in the video to be noise reduced. The weight construction module 302 is further configured to acquire moving pixel points in the current video frame that have moved relative to the previous frame, and static pixel points that are stationary relative to the previous frame, set the target static frame count of the moving pixel points to 1, acquire the past static frame count of the static pixel points from the static frame count recording matrix, and record the target static frame count of the static pixel points as the past static frame count plus 1.

[0067] In some embodiments of this application, the static frame count acquisition module 301 is further configured to set the past static frame count as the target static frame count.

[0068] In some embodiments of this application, the weight construction module 302 is configured to further obtain the absolute value of the difference between the sum of the pixel values ​​of each pixel point in the current movement detection region and the sum of the pixel values ​​of each pixel point in the previous movement detection region, and the sum of the absolute values ​​of the difference between the pixel value of each pixel point in the current movement detection region and the pixel value of each pixel point in the previous movement detection region, and to determine that pixel points whose absolute value of the difference between the sum of the pixel values ​​falls within a first predetermined threshold range and whose sum of the absolute values ​​of the difference between the pixel values ​​falls within a second predetermined threshold range are moving pixel points, and to determine that pixel points whose absolute value of the difference between the sum of the pixel values ​​does not fall within the first predetermined threshold range, or whose sum of the absolute values ​​of the difference between the pixel values ​​does not fall within the second predetermined threshold range are stationary pixel points.

[0069] In some embodiments of this application, the static frame count acquisition module 301 is further configured to acquire the area of ​​the current video frame in a predetermined window as the current motion detection area, using a pixel point as the center point of a predetermined window, and to acquire the area of ​​the previous frame in the predetermined window as the previous motion detection area.

[0070] In some embodiments of this application, the static frame count acquisition module 301 further performs a mirroring process on the current video frame with respect to at least one of the vertices and edges of the current video frame to obtain a mirrored frame, and uses the area of ​​the mirrored frame in a predetermined window as the current movement detection area.

[0071] In some embodiments of this application, the weight construction module 302 is further configured to set a maximum number of fused frames and to construct fusion weights corresponding to each pixel point based on the target number of static frames, wherein constructing fusion weights corresponding to each pixel point based on the target number of static frames includes constructing fusion weights based on the maximum number of fused frames if the target number of static frames is greater than or equal to the maximum number of fused frames, and constructing fusion weights based on the target number of static frames if the target number of static frames is less than the maximum number of fused frames.

[0072] Embodiment 3 of this application provides an electronic device. As shown in Figure 5, the electronic device comprises at least one processor 401 and a memory 402 that communicates with the at least one processor 401. The memory 402 stores commands that can be executed by the at least one processor 401, and when a command is executed by the at least one processor 401, the at least one processor 401 can execute the methods of each embodiment described above.

[0073] The memory and processor are connected by a bus, which includes any number of interconnected buses and bridges, connecting one or more processors and various circuits of the memory. The bus can connect various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or multiple elements, for example, multiple receivers and transmitters, and is used as a unit to communicate with other devices over a transmission medium. Data processed by the processor is transmitted over a wireless medium via an antenna, and the antenna further receives data and transmits it to the processor.

[0074] The processor manages the bus and performs normal operations, and can further provide various functions such as timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is configured to store data used when the processor performs operations.

[0075] Embodiment 4 of this application provides a computer-readable medium on which a computer program is stored. When the computer program is executed by a processor, an embodiment of the above method is realized.

[0076] In other words, as those skilled in the art will see, all or some of the steps of the methods according to the above embodiments are implemented by instructing the relevant hardware with a program. The program is stored in a storage medium and includes a number of commands for a device (which may be a microcontroller, chip, etc.) or processor to execute all or some of the steps of the methods according to each embodiment of this application. The storage medium includes various media capable of storing program code, such as USB disks, portable hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0077] The above are merely specific embodiments of the present application, and the scope of protection of this application is not limited to these. A person skilled in the art will know that any modification or substitution made within the scope of the art disclosed in this application falls within the scope of protection of this application. Therefore, the scope of protection of this application is equivalent to the claims.

Claims

1. The steps are: obtaining the target still frame number for each pixel point in the current video frame, The steps include constructing a fusion weight corresponding to each pixel point based on the target number of static frames, The step of fusing the current video frame with the previous frame based on the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame, The number of target still frames is the number of frames in the video subject to noise reduction that are continuously and relatively still with respect to the current video frame. A video noise reduction method characterized by the following features.

2. The aforementioned video noise reduction method is: This further includes setting and initializing the static frame count recording matrix, The static frame count recording matrix is ​​for recording the past static frame count of each pixel point in the video to be noise reduced. The step of obtaining the target still frame number for each pixel point in the current video frame is: The steps include obtaining, in the current video frame, a moving pixel point that has moved relative to the previous frame, and a stationary pixel point that is stationary relative to the previous frame, The steps include setting the target stationary frame count of the moving pixel point to 1, The step includes obtaining the number of past still frames for the still pixel point from the still frame count recording matrix, and recording the target still frame number for the still pixel point as the number of past still frames plus 1. The video noise reduction method according to feature 1.

3. After the step of fusing the current video frame and the previous frame based on the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame, the video noise reduction method is as follows: This further includes setting the aforementioned past static frame count as the target static frame count. The video noise reduction method according to feature 2.

4. The step of obtaining, in the current video frame, a moving pixel point that has moved relative to the previous frame, and a stationary pixel point that is stationary relative to the previous frame, is: The steps include obtaining, for any pixel point in the current video frame, 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 frame, The steps include obtaining the absolute value of the difference between the sum of the pixel values ​​of each pixel point in the current motion detection region and the sum of the pixel values ​​of each pixel point in the previous motion detection region, and obtaining the sum of the absolute values ​​of the difference between the pixel value of each pixel point in the current motion detection region and the pixel value of each pixel point in the previous motion detection region, The step includes determining a pixel point as the moving pixel point if the absolute value of the difference between the sums of the pixel values ​​falls within a first predetermined threshold range and the sum of the absolute values ​​of the differences between the pixel values ​​falls within a second predetermined threshold range, and determining a pixel point as the stationary pixel point if the absolute value of the difference between the sums of the pixel values ​​does not fall within the first predetermined threshold range, or if the sum of the absolute values ​​of the differences between the pixel values ​​does not fall within the second predetermined threshold range. The video noise reduction method according to feature 2.

5. The step of obtaining 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 frame is: This includes using the aforementioned pixel point as the center point of a predetermined window, acquiring the area of ​​the current video frame in the predetermined window as the current motion detection area, and acquiring the area of ​​the previous frame in the predetermined window as the previous motion detection area. The video noise reduction method according to feature 4.

6. Before the area of ​​the current video frame in the predetermined window becomes the current motion detection area, the video noise reduction method is: The method further includes performing a mirroring operation on at least one of the vertices and edges of the current video frame with respect to the current video frame to obtain a mirrored frame, The area of ​​the current video frame in the predetermined window is defined as the current motion detection area. This includes setting the area of ​​the mirrored frame in the predetermined window as the current movement detection area. The video noise reduction method according to feature 5.

7. This includes setting the maximum number of frames that can be fused, The step of constructing a fusion weight corresponding to each pixel point based on the target number of static frames is: If the number of target static frames is equal to or greater than the maximum number of fused frames, the fusion weight is constructed based on the maximum number of fused frames; if the number of target static frames is less than the maximum number of fused frames, the fusion weight is constructed based on the number of target static frames. A video noise reduction method according to any one of claims 1 to 6.

8. It comprises a static frame count acquisition module, a weight construction module, and a noise reduction module. The static frame count acquisition module is configured to acquire the target static frame count for each pixel point in the current video frame, and the target static frame count is the number of frames that are continuously and relatively still with respect to the current video frame in the video subject to noise reduction. The weight construction module is configured to construct a fusion weight corresponding to each pixel point based on the target number of static frames, The noise reduction module is configured to merge the current video frame with the previous frame based on the fusion weight to obtain a noise-reduced video frame corresponding to the current video frame. A video noise reduction device characterized by the following features.

9. It comprises at least one processor and memory that is communicated with the at least one processor, The memory stores a command that can be executed by the at least one processor, and when the command is executed by the at least one processor, the video noise reduction method according to any one of claims 1 to 7 is executed by the at least one processor. An electronic device characterized by the following features.

10. A computer program is stored, and when the computer program is executed by a processor, the video noise reduction method described in any one of claims 1 to 7 is realized. A computer-readable medium characterized by the following:

Citation Information

Patent Citations

  • Noise removing circuit

    JP1994121192A