CN116523765B - Real-time video image noise reduction method, device and memory - Google Patents
Real-time video image noise reduction method, device and memory Download PDFInfo
- Publication number
- CN116523765B CN116523765B CN202310235443.8A CN202310235443A CN116523765B CN 116523765 B CN116523765 B CN 116523765B CN 202310235443 A CN202310235443 A CN 202310235443A CN 116523765 B CN116523765 B CN 116523765B
- Authority
- CN
- China
- Prior art keywords
- motion
- current frame
- module
- noise reduction
- motion coefficient
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000009467 reduction Effects 0.000 title claims abstract description 107
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012545 processing Methods 0.000 claims description 31
- 238000004364 calculation method Methods 0.000 claims description 28
- 238000012937 correction Methods 0.000 claims description 9
- 238000001914 filtration Methods 0.000 claims description 8
- 230000000694 effects Effects 0.000 abstract description 7
- 238000004590 computer program Methods 0.000 description 15
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000012935 Averaging Methods 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000002146 bilateral effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/91—Television signal processing therefor
- H04N5/911—Television signal processing therefor for the suppression of noise
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Signal Processing (AREA)
- Picture Signal Circuits (AREA)
Abstract
The invention provides a method, a device and a memory for noise reduction of a real-time video image, wherein the method comprises the following steps: s1, acquiring a real-time video; s2, calculating the motion coefficient of the real-time video to obtain the motion coefficient of the current frame; s3, correcting the motion coefficient of the current frame according to the motion coefficient of the previous 4 frames of images of the current frame to obtain a corrected motion coefficient of the current frame; s4, carrying out noise reduction treatment on the current frame according to the corrected current frame motion coefficient. According to the method, the motion coefficient of the real-time video image is calculated, the motion coefficient of the current frame is corrected according to the motion coefficient of the previous 4 frames of images of the current frame, the accuracy of judging the moving object can be improved to a large extent, and the effect of the image after noise reduction is improved.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, and a memory for real-time video image noise reduction.
Background
With the development of science and technology and society, the real-time video processing device is widely applied, and higher requirements are also put on the performance of the real-time video processing device. In the process of video acquisition and processing, noise is inevitably introduced, the quality of the video can be greatly reduced by the noise, the experience of a viewer is influenced, and the difficulty of subsequent processing is increased. To reduce the effect of noise on video, video noise reduction devices are typically added. The video noise reduction devices commonly used at present are divided into two types of time domain noise reduction and space domain noise reduction. The spatial domain noise reduction only uses a single frame image, and uses the correlation of the pixel spatial domain of the image to perform noise reduction processing. The time domain noise reduction not only uses the current frame image, but also uses a plurality of adjacent frame images, and noise reduction is carried out by utilizing the correlation of the pixel time domain of the images, so that the noise reduction effect is better than that of the space domain noise reduction.
The time domain noise reduction uses multiple frames of images, and the sampling time of each frame of image is different. If a moving object exists in the scene, the simple arithmetic average is directly carried out on a plurality of frames of images, and the phenomena of blurring and tailing of the moving object are generated. Therefore, the judgment of the moving object is necessary to be carried out in the time domain noise reduction, and the accuracy of the judgment of the moving object determines the final effect of the video noise reduction device.
The background description provided herein is for the purpose of generally presenting the context of the disclosure. Unless otherwise indicated herein, the materials described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
Disclosure of Invention
Aiming at the technical problems in the related art, the invention provides a real-time video image noise reduction method, which comprises the following steps:
s1, acquiring a real-time video;
s2, calculating the motion coefficient of the real-time video to obtain the motion coefficient of the current frame;
s3, correcting the motion coefficient of the current frame according to the motion coefficient of the previous 4 frames of images of the current frame to obtain a corrected motion coefficient of the current frame;
s4, carrying out noise reduction treatment on the current frame according to the corrected current frame motion coefficient.
Specifically, the step S2 specifically includes the following steps:
s21, calculating the absolute difference and SAD of a current frame and a reference frame, wherein the reference frame is the frame which is the last frame of the current frame and has undergone noise reduction treatment;
s22, calculating a reference brightness value L of the current pixel position;
s23, calculating a motion threshold Thr according to the brightness value L;
s24, calculating a motion coefficient d,
。
specifically, the step 3 specifically includes:
s31, sorting the motion coefficients of the current frame and the previous 4 frames according to the size, and discarding the maximum value;
s32, carrying out arithmetic average on the rest motion coefficients to obtain corrected current frame motion coefficients D.
Specifically, the step S4 specifically includes:
if D> Judging the current pixel point as a moving object, and directly taking the current frame pixel point as the output of a time domain filter module in the case:
if D<= Judging the current pixel point as a stationary object, and calculating the output of the time domain filter module according to the following formula in this case:
wherein , pixel value representing the pixel at the corresponding position in the macroblock of the current frame,/pixel value representing the pixel at the corresponding position in the macroblock of the current frame>Pixel value representing the pixel at the corresponding position in the reference frame +.>Representing the calculated output result after noise reduction, +.>Is a motion judgment parameter.
Specifically, the step S1 further includes: and carrying out low-pass filtering on the real-time video.
In a second aspect, another embodiment of the present invention discloses a real-time video image noise reduction apparatus, which includes: the device comprises a video image acquisition module, a time domain noise reduction module, a motion coefficient storage module and a reference frame storage module;
the video image acquisition module is used for acquiring real-time video;
the motion coefficient storage module is connected with the time domain noise reduction module and is used for storing motion coefficients calculated and generated by the time domain noise reduction module and storing motion coefficients of 4 frames of images before the current frame of image altogether;
the reference frame storage module is connected with the time domain noise reduction module and is used for storing the image generated after the processing of the time domain noise reduction module;
the time domain noise reduction module is used for carrying out noise reduction processing on the input video image and outputting the processed image according to the reference frame provided by the reference frame storage module and the motion coefficient provided by the motion coefficient storage module; meanwhile, the motion coefficient generated by new calculation is stored in a motion coefficient storage module, and the image after noise reduction is stored in a reference frame storage module;
the time domain noise reduction module includes: the motion coefficient calculation module, the motion coefficient correction module and the time domain filter module;
the motion coefficient calculation module is used for calculating the motion coefficient of the real-time video to obtain the motion coefficient of the current frame;
the motion coefficient correction module is used for correcting the motion coefficient of the current frame according to the motion coefficient of the previous 4-frame image of the current frame to obtain a corrected motion coefficient of the current frame;
and the time domain filter module is used for carrying out noise reduction processing on the current frame according to the corrected current frame motion coefficient.
Specifically, the motion coefficient calculation module includes the following modules:
the absolute difference sum calculating module is used for calculating the absolute difference sum SAD of the current frame and a reference frame, wherein the reference frame is the frame which is the last frame of the current frame and has undergone noise reduction treatment;
the reference brightness value calculation module is used for calculating a reference brightness value L of the current pixel position;
the motion threshold calculation module is used for calculating a motion threshold Thr according to the brightness value L;
a motion coefficient calculation module for calculating a motion coefficient d,
。
specifically, the motion coefficient correction module includes the following modules:
the sorting module is used for sorting the motion coefficients of the current frame and the previous 4 frames according to the size, and discarding the maximum value;
an averaging unit for arithmetically averaging the remaining motion coefficients to obtain a corrected motion coefficient D;
specifically, the time domain filter module specifically includes:
if D> Determining the current pixel point as a moving object,in this case, the pixel point of the current frame is directly used as the output of the time domain filter module:
if D<= Judging the current pixel point as a stationary object, and calculating the output of the time domain filter module according to the following formula in this case:
wherein , pixel value representing the pixel at the corresponding position in the macroblock of the current frame,/pixel value representing the pixel at the corresponding position in the macroblock of the current frame>Pixel value representing the pixel at the corresponding position in the reference frame +.>Representing the calculated output result after noise reduction, +.>Is a motion judgment parameter.
Specifically, the time domain noise reduction module includes a low-pass filter, where the low-pass filter is configured to perform low-pass filtering on the real-time video.
In a third aspect, another embodiment of the present invention discloses a non-volatile memory having instructions stored thereon, which when executed by a processor, are configured to implement a real-time video image noise reduction method as described above.
According to the real-time video image noise reduction method, the motion coefficient of the real-time video image is calculated, the motion coefficient of the current frame is corrected according to the motion coefficient of the previous 4 frames of images of the current frame, the accuracy of judging the moving object can be improved to a large extent, and the effect of the noise-reduced image is improved. In the moving object determination, the motion coefficients of the multi-frame images are used. Furthermore, when noise reduction is performed, only the reference frame of one frame and the motion coefficient of 4 frames are required to be stored, and the used storage space is small.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for denoising real-time video images according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a real-time video image noise reduction device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a time domain noise reduction module according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a real-time video image noise reduction apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the invention, fall within the scope of protection of the invention.
Example 1
Referring to fig. 1, the embodiment discloses a real-time video image noise reduction method, which includes the following steps:
s1, acquiring a real-time video;
in particular, the real-time video may be acquired from a video image capturing device, such as a camera.
In another embodiment, the real-time video may be acquired from an image sensor, for example, the image sensor acquires the real-time video, and the implemented video is sent to an image processing unit (image Signal Processor, ISP) or a central processing unit for processing, so that the implemented video image noise reduction method of the embodiment runs in the ISP or the central processing unit to process the received real-time video.
Further, the embodiment may perform noise processing on the acquired real-time video. The embodiment adopts a low-pass filter to carry out noise reduction processing on the real-time video. In this embodiment, gaussian or bilateral filtering is used to perform noise reduction processing on real-time video. The low-pass filtering can suppress noise of an input image and remove single abnormal dead pixels. And the pixel point at rest is prevented from being misjudged as a moving object during the subsequent calculation of the motion coefficient.
When the video image acquisition device works, the scene can be continuously shot. Video image acquisition devices in common use today operate at frame rates greater than 30fps (frames per second). I.e. at least 30 frames per second or acquired, the real-time video image noise reduction method of the present embodiment processes each frame of image in the video.
S2, calculating the motion coefficient of the real-time video to obtain the motion coefficient of the current frame;
specifically, in this embodiment, a video frame image to be processed, that is, a current frame, is obtained from the real-time video, and the motion coefficient is calculated from the current frame, which is generally a frame that is being noise-reduced.
Specifically, the step S2 includes the following steps:
s21, calculating the absolute difference and SAD of a current frame and a reference frame, wherein the reference frame is the frame which is the last frame of the current frame and has undergone noise reduction treatment;
the 7x7 pixel macro block taking the current pixel as the center in the current frame, and the 7x7 pixel macro block also taking the corresponding position in the reference frame. The following formula is adopted for calculation:
wherein , pixel value representing the pixel at the corresponding position in the macroblock of the current frame,/pixel value representing the pixel at the corresponding position in the macroblock of the current frame>Representing the pixel values of the corresponding position pixels in the reference frame.
S22, calculating a reference brightness value L of the current pixel position;
the present embodiment calculates the reference luminance value L of the current pixel position using the following formula:
wherein , representing pixel values of corresponding position pixels in the macroblock of the current frame.
S23, calculating a motion threshold Thr according to the brightness value L;
wherein Thr represents the calculated threshold of the motion threshold, and L represents the reference luminance value calculated in step S22 above. The slope and base are used to adjust the start value and slope of Thr, and these two parameters are related to the performance of the video image capturing device, and in a specific practical application, parameter adjustment needs to be performed according to the characteristics of the video image capturing device.
S24, calculating a motion coefficient d,
steps S21-S24 are repeatedly performed until the motion coefficient of each pixel point in the current frame is acquired.
The SAD calculated in the step S21 and the Thr calculated in the step S23 can calculate the motion coefficient d of the current pixel point position;
the motion coefficient d indicates the probability that the pixel point at the current position is a moving object, and the smaller the value is, the lower the probability of representing the moving object is; the larger the value, the higher the probability expressed as a moving object.
And calculating a motion coefficient d for each pixel point in a frame of image, wherein each pixel point obtains an independent motion coefficient d.
S3, correcting the motion coefficient of the current frame according to the motion coefficient of the previous 4 frames of images of the current frame to obtain a corrected motion coefficient of the current frame;
motion coefficients calculated from the previous 4 frames of the current frame by sign 、/> 、/> and />Representing the motion coefficient of the current frame in the sign +.>And (3) representing.
Calculating the corrected motion coefficients according to the following steps:
s31, sorting the motion coefficients of the current frame and the previous 4 frames according to the size, and discarding the maximum value;
s32, carrying out arithmetic average on the rest motion coefficients to obtain corrected motion coefficients D;
when the video image acquisition device works, a scene can be continuously shot. The video image capturing apparatus now in common use operates at a frame rate of greater than 30fps (frames per second) so that the time interval between successive images is small. In a practical scenario, a moving object must appear continuously in successive multi-frame images in such small time intervals. According to the principle, when the motion coefficient is corrected, the motion coefficient of a plurality of frames is adopted, and the maximum value is discarded, so that misjudgment of a moving object can be avoided; the motion coefficients of the rest multi-frames are arithmetically averaged, so that more accurate motion coefficients can be obtained; the corrected motion coefficients are smoother between the previous and subsequent frames, which also helps to suppress noise.
S4, carrying out noise reduction treatment on the current frame according to the corrected current frame motion coefficient;
setting motion judgment parameters by taking the motion coefficient corrected by the current pixel point as D 。
If D> And judging the current pixel point as a moving object, and directly taking the current frame pixel point as the output of the time domain filter module in the case.
If D<= The current pixel point is determined to be a stationary object, in which case the output of the time-domain filter module is calculated according to the following formula.
wherein , pixel value representing the pixel at the corresponding position in the macroblock of the current frame,/pixel value representing the pixel at the corresponding position in the macroblock of the current frame>Representing the pixel values of the corresponding position pixels in the reference frame. />And representing the calculated output result after noise reduction.
Meanwhile, the calculated output result after noise reduction is simultaneously output to a reference frame storage module so as to be provided for subsequent video image processing.
According to the real-time video image noise reduction method, the motion coefficient of the real-time video image is calculated, the motion coefficient of the current frame is corrected according to the motion coefficient of the previous 4 frames of images of the current frame, the accuracy of judging the moving object can be improved to a large extent, and the effect of the noise-reduced image is improved. In the moving object determination, the motion coefficients of the multi-frame images are used. Furthermore, when noise reduction is performed, only the reference frame of one frame and the motion coefficient of 4 frames are required to be stored, and the used storage space is small.
Example two
Referring to fig. 2-3, the present embodiment discloses a real-time video image noise reduction device, which includes the following modules: the device comprises a video image acquisition module, a time domain noise reduction module, a motion coefficient storage module and a reference frame storage module.
The motion coefficient storage module is connected with the time domain noise reduction module and is used for storing motion coefficients calculated and generated by the time domain noise reduction module and storing motion coefficients of 4 frames of images before the current frame of image altogether. And when the noise reduction device works, the motion coefficients of the pixels corresponding to the previous 4 frames of images are output to the time domain noise reduction module.
The reference frame storage module is connected with the time domain noise reduction module and is used for storing the image generated after the processing of the time domain noise reduction module. And when the noise reduction device works, outputting a time domain noise reduction result of the previous frame to the time domain noise reduction module as a reference frame.
The video image acquisition module is used for acquiring real-time video;
in particular, the real-time video may be acquired from a video image capturing device, such as a camera.
In another embodiment, the real-time video may be acquired from an image sensor, for example, the image sensor acquires the real-time video, and the implemented video is sent to an image processing unit (image Signal Processor, ISP) or a central processing unit for processing, so that the implemented video image noise reduction method of the embodiment runs in the ISP or the central processing unit to process the received real-time video.
The time domain noise reduction module is used for acquiring image data by the video image acquisition device, and carrying out noise reduction processing on an input video image according to the reference frame provided by the reference frame storage module and the motion coefficient provided by the motion coefficient storage module and outputting the processed image. Meanwhile, the motion coefficient generated by new calculation is stored in a motion coefficient storage module, and the image after noise reduction is stored in a reference frame storage module;
the time domain noise reduction module specifically includes: the motion coefficient calculation module, the motion coefficient correction module and the time domain filter module;
the motion coefficient calculation module is used for calculating the motion coefficient of the real-time video to obtain the motion coefficient of the current frame;
specifically, in this embodiment, a video frame image to be processed, that is, a current frame, is obtained from the real-time video, and the motion coefficient is calculated from the current frame, which is generally a frame that is being noise-reduced.
Specifically, the motion coefficient calculation module includes the following modules:
the absolute difference sum calculating module is used for calculating the absolute difference sum SAD of the current frame and a reference frame, wherein the reference frame is the frame which is the last frame of the current frame and has undergone noise reduction treatment;
the 7x7 pixel macro block taking the current pixel as the center in the current frame, and the 7x7 pixel macro block also taking the corresponding position in the reference frame. The following formula is adopted for calculation:
wherein ,pixel value representing the pixel at the corresponding position in the macroblock of the current frame,/pixel value representing the pixel at the corresponding position in the macroblock of the current frame>Representing the pixel values of the corresponding position pixels in the reference frame.
The reference brightness value calculation module is used for calculating a reference brightness value L of the current pixel position;
the present embodiment calculates the reference luminance value L of the current pixel position using the following formula:
wherein , representing pixel values of corresponding position pixels in the macroblock of the current frame.
The motion threshold calculation module is used for calculating a motion threshold Thr according to the brightness value L;
wherein Thr represents the calculated threshold of the motion threshold, and L represents the reference luminance value calculated in step S22 above. The slope and base are used to adjust the start value and slope of Thr, and these two parameters are related to the performance of the video image capturing device, and in a specific practical application, parameter adjustment needs to be performed according to the characteristics of the video image capturing device.
A motion coefficient calculation module for calculating a motion coefficient d,
further, the embodiment further includes a low-pass filtering module, configured to perform noise processing on the acquired real-time video. The embodiment adopts a low-pass filter to carry out noise reduction processing on the real-time video. In this embodiment, gaussian or bilateral filtering is used to perform noise reduction processing on real-time video. The low-pass filtering can suppress noise of an input image and remove single abnormal dead pixels. And the pixel point at rest is prevented from being misjudged as a moving object during the subsequent calculation of the motion coefficient.
The motion coefficient correction module is used for correcting the motion coefficient of the current frame according to the motion coefficient of the previous 4-frame image of the current frame to obtain a corrected motion coefficient of the current frame;
motion coefficients calculated from the previous 4 frames of the current frame by sign 、/> 、/> and />Representing the motion coefficient of the current frame in the sign +.>And (3) representing.
The motion coefficient correction module comprises the following modules:
the sorting module is used for sorting the motion coefficients of the current frame and the previous 4 frames according to the size, and discarding the maximum value;
an averaging unit for arithmetically averaging the remaining motion coefficients to obtain a corrected motion coefficient D;
when the video image acquisition device works, a scene can be continuously shot. The video image capturing apparatus now in common use operates at a frame rate of greater than 30fps (frames per second) so that the time interval between successive images is small. In a practical scenario, a moving object must appear continuously in successive multi-frame images in such small time intervals. According to the principle, when the motion coefficient is corrected, the motion coefficient of a plurality of frames is adopted, and the maximum value is discarded, so that misjudgment of a moving object can be avoided; the motion coefficients of the rest multi-frames are arithmetically averaged, so that more accurate motion coefficients can be obtained; the corrected motion coefficients are smoother between the previous and subsequent frames, which also helps to suppress noise.
The time domain filter module is used for carrying out noise reduction treatment on the current frame according to the corrected current frame motion coefficient;
setting motion judgment parameters by taking the motion coefficient corrected by the current pixel point as D 。
If D> And judging the current pixel point as a moving object, and directly taking the current frame pixel point as the output of the time domain filter module in the case.
If D<= The current pixel point is determined to be a stationary object, in which case the output of the time-domain filter module is calculated according to the following formula.
wherein , pixel value representing the pixel at the corresponding position in the macroblock of the current frame,/pixel value representing the pixel at the corresponding position in the macroblock of the current frame>Representing the pixel values of the corresponding position pixels in the reference frame. />Representation ofAnd (5) calculating and outputting a result after noise reduction.
Meanwhile, the calculated output result after noise reduction is simultaneously output to a reference frame storage module so as to be provided for subsequent video image processing.
According to the real-time video image noise reduction device, the motion coefficient of the real-time video image is calculated, the motion coefficient of the current frame is corrected according to the motion coefficient of the previous 4 frames of images of the current frame, the accuracy of judging the moving object can be improved to a large extent, and the effect of the image after noise reduction is improved. In the moving object determination, the motion coefficients of the multi-frame images are used. Furthermore, when noise reduction is performed, only the reference frame of one frame and the motion coefficient of 4 frames are required to be stored, and the used storage space is small.
Example III
Referring to fig. 4, fig. 4 is a schematic structural diagram of a real-time video image noise reduction apparatus of the present embodiment. The real-time video image noise reduction device 20 of this embodiment comprises a processor 21, a memory 22 and a computer program stored in said memory 22 and executable on said processor 21. The steps of the above-described method embodiments are implemented by the processor 21 when executing the computer program. Alternatively, the processor 21 may implement the functions of the modules/units in the above-described device embodiments when executing the computer program.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program in the real-time video image noise reduction device 20. For example, the computer program may be divided into modules in the second embodiment, and specific functions of each module refer to the working process of the apparatus described in the foregoing embodiment, which is not described herein.
The real-time video image noise reduction device 20 may include, but is not limited to, a processor 21, a memory 22. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the real-time video image noise reduction device 20 and does not constitute a limitation of the real-time video image noise reduction device 20, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the real-time video image noise reduction device 20 may also include input and output devices, network access devices, buses, etc.
The processor 21 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 21 is a control center of the real-time video image noise reduction device 20, and connects the respective parts of the entire real-time video image noise reduction device 20 using various interfaces and lines.
The memory 22 may be used to store the computer program and/or module, and the processor 21 may implement various functions of the real-time video image noise reduction device 20 by running or executing the computer program and/or module stored in the memory 22 and invoking data stored in the memory 22. The memory 22 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
Wherein the modules/units integrated with the real-time video image noise reduction device 20 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as a stand alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and the computer program may implement the steps of each of the method embodiments described above when executed by the processor 21. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that the above-described apparatus embodiments are merely illustrative, and the units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the invention, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
Claims (10)
1. A real-time video image noise reduction method is characterized in that: the method comprises the following steps:
s1, acquiring a real-time video;
s2, calculating the motion coefficient of the real-time video to obtain the motion coefficient of the current frame; the step S2 specifically includes the following steps:
s21, calculating the absolute difference and SAD of a current frame and a reference frame, wherein the reference frame is the frame which is the last frame of the current frame and has undergone noise reduction treatment;
s22, calculating a reference brightness value L of the current pixel position;
s23, calculating a motion threshold Thr according to the reference brightness value L;
s24, calculating a motion coefficient d,
;
s3, correcting the motion coefficient of the current frame according to the motion coefficient of the previous 4 frames of images of the current frame to obtain a corrected motion coefficient D of the current frame;
s4, carrying out noise reduction treatment on the current frame according to the corrected current frame motion coefficient; the step S4 specifically includes:
if D>Judging the current pixel point as a moving object, and directly taking the current frame pixel point as the output of a time domain filter module in the case:
,
if D<=Judging the current pixel point as a stationary object, and calculating the output of the time domain filter module according to the following formula in this case:
,
wherein , representing the corresponding position in the macroblock of the current frame +.>Pixel value of pixel,/->Representing the corresponding position in the reference frame->Pixel value of pixel,/->Representing the calculated output result after noise reduction, +.>Is a motion judgment parameter.
2. The method according to claim 1, characterized in that: the step 3 specifically includes:
s31, sorting the motion coefficients of the current frame and the previous 4 frames according to the size, and discarding the maximum value;
s32, carrying out arithmetic average on the rest motion coefficients to obtain corrected current frame motion coefficients D.
3. The method according to claim 1, characterized in that: the step S1 further includes: and carrying out low-pass filtering on the real-time video.
4. The method according to claim 1, characterized in that: the step S21 specifically includes:
the 7x7 pixel macro block taking the current pixel as the center in the current frame, and the 7x7 pixel macro block also taking the corresponding position of the reference frame, and the following formula is adopted for calculation:
。
5. the method according to claim 1, characterized in that: the step S23 specifically includes: the motion threshold Thr is calculated using the following formula:
,
wherein Thr represents the calculated threshold of the motion threshold, and slope and base are used to adjust the start value and slope of Thr.
6. The utility model provides a real-time video image noise reduction device which characterized in that: the device comprises a video image acquisition module, a time domain noise reduction module, a motion coefficient storage module and a reference frame storage module;
the video image acquisition module is used for acquiring real-time video;
the motion coefficient storage module is connected with the time domain noise reduction module and is used for storing motion coefficients calculated and generated by the time domain noise reduction module and storing motion coefficients of 4 frames of images before the current frame of image altogether;
the reference frame storage module is connected with the time domain noise reduction module and is used for storing the image generated after the processing of the time domain noise reduction module;
the time domain noise reduction module is used for carrying out noise reduction processing on the input video image and outputting the processed image according to the reference frame provided by the reference frame storage module and the motion coefficient provided by the motion coefficient storage module; meanwhile, the motion coefficient generated by new calculation is stored in a motion coefficient storage module, and the image after noise reduction is stored in a reference frame storage module;
the time domain noise reduction module includes: the motion coefficient calculation module, the motion coefficient correction module and the time domain filter module;
the motion coefficient calculation module is used for calculating the motion coefficient of the real-time video to obtain the motion coefficient of the current frame; the motion coefficient calculation module comprises the following modules:
the absolute difference sum calculating module is used for calculating the absolute difference sum SAD of the current frame and a reference frame, wherein the reference frame is the frame which is the last frame of the current frame and has undergone noise reduction treatment;
the reference brightness value calculation module is used for calculating a reference brightness value L of the current pixel position;
the motion threshold calculation module is used for calculating a motion threshold Thr according to the brightness value L;
a motion coefficient calculation module for calculating a motion coefficient d,
;
the motion coefficient correction module is used for correcting the motion coefficient of the current frame according to the motion coefficient of the previous 4-frame image of the current frame to obtain a corrected motion coefficient D of the current frame;
the time domain filter module is used for carrying out noise reduction treatment on the current frame according to the corrected current frame motion coefficient; the time domain filter module specifically comprises:
if D> Judging the current pixel point as a moving object, and directly taking the current frame pixel point as the output of a time domain filter module in the case:
;
if D<= Judging the current pixel point as a stationary object, and calculating the output of the time domain filter module according to the following formula in this case:
;
wherein , representing the corresponding position in the macroblock of the current frame +.>Pixel value of pixel,/->Representing the corresponding position in the reference frame->Pixel value of pixel,/->Representing the calculated output result after noise reduction, +.>Is a motion judgment parameter.
7. The apparatus according to claim 6, wherein: the motion coefficient correction module comprises the following modules:
the sorting module is used for sorting the motion coefficients of the current frame and the previous 4 frames according to the size, and discarding the maximum value;
and the average unit is used for carrying out arithmetic average on the residual motion coefficients to obtain a corrected current frame motion coefficient D.
8. The apparatus according to claim 6, wherein: the absolute difference sum calculating module specifically comprises:
the 7x7 pixel macro block taking the current pixel as the center in the current frame, and the 7x7 pixel macro block also taking the corresponding position of the reference frame, and the following formula is adopted for calculation:
。
9. the apparatus according to claim 6, wherein: the reference brightness value calculation module specifically comprises: the motion threshold Thr is calculated using the following formula:
;
wherein Thr represents the calculated threshold of the motion threshold, and slope and base are used to adjust the start value and slope of Thr.
10. A non-volatile memory having instructions stored thereon, characterized by: the instructions, when executed by a processor, for implementing a real-time video image denoising method as claimed in any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310235443.8A CN116523765B (en) | 2023-03-13 | 2023-03-13 | Real-time video image noise reduction method, device and memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310235443.8A CN116523765B (en) | 2023-03-13 | 2023-03-13 | Real-time video image noise reduction method, device and memory |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116523765A CN116523765A (en) | 2023-08-01 |
CN116523765B true CN116523765B (en) | 2023-09-05 |
Family
ID=87391053
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310235443.8A Active CN116523765B (en) | 2023-03-13 | 2023-03-13 | Real-time video image noise reduction method, device and memory |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116523765B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0610972D0 (en) * | 2006-06-02 | 2006-07-12 | Tandberg Television Asa | Recursive filtering of a video image |
CN101853489A (en) * | 2009-04-02 | 2010-10-06 | 深圳艾科创新微电子有限公司 | Video image denoising device and method |
KR20130105316A (en) * | 2012-03-14 | 2013-09-25 | 삼성테크윈 주식회사 | Method and apparatus for noise reduction |
CN103369209A (en) * | 2013-07-31 | 2013-10-23 | 上海通途半导体科技有限公司 | Video noise reduction device and video noise reduction method |
WO2016165112A1 (en) * | 2015-04-16 | 2016-10-20 | 中国科学院自动化研究所 | Video denoising system having contrast adaptation |
CN109639929A (en) * | 2019-01-11 | 2019-04-16 | 珠海全志科技股份有限公司 | Image denoising method, computer installation and computer readable storage medium |
CN111583151A (en) * | 2020-05-09 | 2020-08-25 | 浙江大华技术股份有限公司 | Video denoising method and device, and computer readable storage medium |
CN112311962A (en) * | 2019-07-29 | 2021-02-02 | 深圳市中兴微电子技术有限公司 | Video denoising method and device and computer readable storage medium |
CN115546047A (en) * | 2022-09-02 | 2022-12-30 | 合肥埃科光电科技股份有限公司 | Video image noise reduction method, device and medium based on improved local filtering algorithm |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9374506B2 (en) * | 2013-01-04 | 2016-06-21 | Qualcomm Incorporated | Method and apparatus of reducing random noise in digital video streams |
CN109859126B (en) * | 2019-01-17 | 2021-02-02 | 浙江大华技术股份有限公司 | Video noise reduction method and device, electronic equipment and storage medium |
-
2023
- 2023-03-13 CN CN202310235443.8A patent/CN116523765B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0610972D0 (en) * | 2006-06-02 | 2006-07-12 | Tandberg Television Asa | Recursive filtering of a video image |
CN101853489A (en) * | 2009-04-02 | 2010-10-06 | 深圳艾科创新微电子有限公司 | Video image denoising device and method |
KR20130105316A (en) * | 2012-03-14 | 2013-09-25 | 삼성테크윈 주식회사 | Method and apparatus for noise reduction |
CN103369209A (en) * | 2013-07-31 | 2013-10-23 | 上海通途半导体科技有限公司 | Video noise reduction device and video noise reduction method |
WO2016165112A1 (en) * | 2015-04-16 | 2016-10-20 | 中国科学院自动化研究所 | Video denoising system having contrast adaptation |
CN109639929A (en) * | 2019-01-11 | 2019-04-16 | 珠海全志科技股份有限公司 | Image denoising method, computer installation and computer readable storage medium |
CN112311962A (en) * | 2019-07-29 | 2021-02-02 | 深圳市中兴微电子技术有限公司 | Video denoising method and device and computer readable storage medium |
CN111583151A (en) * | 2020-05-09 | 2020-08-25 | 浙江大华技术股份有限公司 | Video denoising method and device, and computer readable storage medium |
CN115546047A (en) * | 2022-09-02 | 2022-12-30 | 合肥埃科光电科技股份有限公司 | Video image noise reduction method, device and medium based on improved local filtering algorithm |
Non-Patent Citations (1)
Title |
---|
结合运动补偿的球体双边滤波视频降噪算法;谭洪涛;田逢春;张莎;张静;邱宇;;系统工程与电子技术(第12期);215-220 * |
Also Published As
Publication number | Publication date |
---|---|
CN116523765A (en) | 2023-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8243150B2 (en) | Noise reduction in an image processing method and image processing apparatus | |
US9202263B2 (en) | System and method for spatio video image enhancement | |
US9514525B2 (en) | Temporal filtering for image data using spatial filtering and noise history | |
US20150310594A1 (en) | Method for imaging processing, and image processing device | |
CN109978774B (en) | Denoising fusion method and device for multi-frame continuous equal exposure images | |
CN110263699B (en) | Video image processing method, device, equipment and storage medium | |
US9558395B2 (en) | Image correction device, image correction method, and imaging device | |
TWI382754B (en) | Method of adjusting blur image | |
KR100793284B1 (en) | Apparatus for digital image stabilizing, method using the same and computer readable medium stored thereon computer executable instruction for performing the method | |
KR20120074960A (en) | Noise filtering method and apparatus considering noise variance and motion detection | |
CN114586337B (en) | Video anti-shake optimization processing method and device and electronic equipment | |
CN108769523B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
US20230069014A1 (en) | Method and apparatus for generating low bit width hdr image, storage medium, and terminal | |
US9014503B2 (en) | Noise-reduction method and apparatus | |
CN111127347A (en) | Noise reduction method, terminal and storage medium | |
WO2023273868A1 (en) | Image denoising method and apparatus, terminal, and storage medium | |
JP2012199774A (en) | Image processing apparatus, imaging apparatus, image processing program, and image processing method | |
JP2003134385A (en) | Image synthesizing device | |
JP2006325274A (en) | Imaging device | |
EP3001669B1 (en) | Image processing apparatus, image processing method and program | |
JP2024037722A (en) | Content based image processing | |
JP2005150903A (en) | Image processing apparatus, noise elimination method, and noise elimination program | |
JP2008288947A (en) | Image processing apparatus and program thereof | |
CN116523765B (en) | Real-time video image noise reduction method, device and memory | |
CN113379702B (en) | Blood vessel path extraction method and device for microcirculation image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |