[go: up one dir, main page]

WO2017036386A1 - Video denoising method and device, terminal and storage medium - Google Patents

Video denoising method and device, terminal and storage medium Download PDF

Info

Publication number
WO2017036386A1
WO2017036386A1 PCT/CN2016/097380 CN2016097380W WO2017036386A1 WO 2017036386 A1 WO2017036386 A1 WO 2017036386A1 CN 2016097380 W CN2016097380 W CN 2016097380W WO 2017036386 A1 WO2017036386 A1 WO 2017036386A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
value
input image
ith
type
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.)
Ceased
Application number
PCT/CN2016/097380
Other languages
French (fr)
Chinese (zh)
Inventor
滕涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanechips Technology Co Ltd
Original Assignee
Sanechips Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sanechips Technology Co Ltd filed Critical Sanechips Technology Co Ltd
Publication of WO2017036386A1 publication Critical patent/WO2017036386A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/21Circuitry for suppressing or minimising disturbance, e.g. moiré or halo

Definitions

  • the present invention relates to the field of image processing, and in particular, to a video denoising method and apparatus, a terminal, and a storage medium.
  • the original video data needs to be compressed.
  • the commonly used compression coding algorithm usually has a coefficient quantization process, and the irreversibility of the quantization process causes a large amount of mosquito noise in the final decoded video data. Most of the noise is around the edge of the font or object, which causes the video quality to drop. At the same time, the video picture with mosquito noise makes the viewer feel "dirty" and affects the viewer's visual experience.
  • the decoded video is subjected to a mosquito denoising operation, so that the final video looks clean and enhances the viewer's visual experience and video quality.
  • the common method for removing mosquito noise is to use low-pass filtering, but the commonly used low-pass filter has the following problems: 1. Filtering the entire image; 2. The strength of the low-pass filter cannot be flexibly adjusted, resulting in high The loss of frequency detail components causes the video to be blurred.
  • embodiments of the present invention are directed to a video denoising method and apparatus, a terminal, and a storage medium, so as to remove the mosquito noise existing in the video while preserving the details in the video and improving the viewer's vision. Feeling and video quality.
  • an embodiment of the present invention provides a video denoising method, including: detecting a target view a frequency input image, obtaining a mosquito noise probability of each pixel in the input image; performing low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; a noise probability, weighting the filtered pixel value and the pixel value of the input image to obtain a pixel value of the output image, and outputting the output image.
  • the detecting an input image of the target video, obtaining a mosquito noise probability of each pixel in the input image comprising: detecting an input image of the target video, obtaining the input image a pixel type of each of the pixels; based on the pixel type of each of the pixels, performing a mosquito noise probability estimation on each of the pixels in the input image to obtain a mosquito noise probability of each of the pixels.
  • the detecting an input image of the target video to obtain a pixel type of each pixel in the input image includes: performing gradient detection on the input image to obtain each of the input images a gradient value of one pixel; performing local edge detection on the input image to obtain an edge information value of each pixel of the input image; determining each of the input images based on the gradient value and the edge information value The pixel type of the pixel.
  • determining, according to the gradient value and the edge information value, a pixel type of each pixel of the input image including: when the gradient value of the ith pixel is greater than When the product of the edge information value of the ith pixel is equal to the first preset value, the pixel type of the ith pixel is determined as an edge pixel, where i is a positive integer; The gradient value of the pixel is smaller than the product of the edge information value of the ith pixel and the first preset value, and is greater than or equal to the edge information value of the ith pixel and the second preset value.
  • the pixel type of the i-th pixel is determined to be a flat pixel.
  • the low-pass filtering the input image to obtain the filtered pixel value corresponding to each pixel includes: based on the edge information value of each pixel
  • the pixel values of the input image are subjected to low-pass bilateral filtering to obtain the filtered pixel values corresponding to each pixel.
  • the mosquito noise probability estimation is performed on each pixel in the input image based on a pixel type of each pixel, and mosquito noise of each pixel is obtained.
  • the probability includes: counting the pixel types of the ith pixel and the M neighboring pixels, wherein the neighboring pixels are pixels around the ith pixel; determining the ith pixel based on a statistical result Mosquito noise probability.
  • determining the mosquito noise probability of the ith pixel based on a statistical result comprising: determining, according to the ith pixel and the M pixel, a flat pixel
  • the number of pixels is a ratio of the number of pixels of the pixel type to the detail pixel to the sum of the number of pixels of the pixel type of the edge pixel, and the mosquito noise probability of the ith pixel is determined.
  • an embodiment of the present invention provides a video denoising apparatus, including: a detecting unit, a filtering unit, and an output unit; wherein the detecting unit is configured to detect an input image of a target video, and obtain each of the input images. a mosquito-like noise probability of one pixel; the filtering unit configured to perform low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; the output unit is configured to be based on the Mosquito noise probability, weighting the filtered pixel value and the pixel value of the input image to obtain a pixel value of the output image, and outputting the output image.
  • the detecting unit includes: a pixel type detecting unit configured to detect an input image of the target video, obtain a pixel type of each pixel in the input image; and a noise probability estimating unit And configuring, according to the pixel type of each of the pixels, performing a mosquito noise probability estimation on each of the pixels in the input image to obtain a mosquito noise probability of each pixel.
  • the pixel type detecting unit includes: a gradient detecting unit configured to perform gradient detection on the input image to obtain a gradient value of each pixel of the input image; and an edge detecting unit Configuring to perform local edge detection on the input image to obtain an edge information value of each pixel of the input image; a pixel type determining unit configured to determine the input based on the gradient value and the edge information value The pixel type of each pixel of the image.
  • the pixel type determining unit is configured to: when the gradient value of the ith pixel is greater than or equal to the edge information value of the ith pixel and the first preset value
  • the pixel type of the ith pixel is determined as an edge pixel, where i is a positive integer; and is further configured to: when the gradient value of the ith pixel is smaller than the ith pixel
  • the product of the edge information value and the first preset value is greater than or equal to the product of the edge information value of the ith pixel and the second preset value, determining the pixel type of the ith pixel as the detail a pixel, wherein the first preset value is different from the second preset value
  • the pixel type of the ith pixel is determined
  • the filtering unit is configured to perform low-pass bilateral filtering based on edge information values of each pixel and pixel values of the input image to obtain corresponding to each pixel. Filtered pixel value.
  • the noise probability estimation unit includes: a pixel type statistical unit configured to perform statistics on pixel types of the ith pixel and the M neighborhood pixels, wherein the neighborhood pixel a pixel around the ith pixel; a probability calculation unit configured to determine a mosquito noise probability of the ith pixel based on a statistical result.
  • the probability calculation unit is configured to: based on the ith pixel and the M pixels, a pixel type of which is a flat pixel, and the pixel type is The ratio of the number of pixels of the detail pixel to the sum of the number of pixels of the pixel type of the edge pixel determines the mosquito noise probability of the ith pixel.
  • an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform the video denoising method provided by the first aspect of the present invention.
  • an embodiment of the present invention provides a terminal, where the terminal includes:
  • a storage medium configured to store computer executable instructions
  • a processor configured to detect an input image of the target video, obtain a mosquito noise probability of each pixel in the input image, and perform low-pass filtering on the input image to obtain a filtered pixel corresponding to each pixel And performing weighting processing on the filtered pixel value and the pixel value of the input image based on the mosquito noise probability, obtaining a pixel value of the output image, and outputting the output image.
  • Embodiments of the present invention provide a video denoising method and apparatus, a terminal, and a storage medium.
  • the device detects an input image of a target video, obtains a mosquito noise probability of each pixel in the input image, and simultaneously performs a low pass on the input image. Filtering, obtaining a filtered pixel value corresponding to each pixel; then, based on the mosquito noise probability, weighting the filtered pixel value and the pixel value of the input image to obtain a pixel value of the output image, and outputting the output image. That is to say, for each frame of the target video, only pixels with a relatively high mosquito noise probability are filtered, and other pixels are not processed, so that not only the mosquito noise existing in the video but also the mosquito noise can be removed. The details in the video are preserved to enhance the viewer's visual experience and video quality.
  • FIG. 1 is a schematic flowchart of a video denoising method according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a method for obtaining a mosquito noise probability of each pixel according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a 3 ⁇ 3 template according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of an 11 ⁇ 11 template according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a 5 ⁇ 5 template according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a curve of a function w i,j in an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a curve of a function edge_gain i,j according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a video denoising apparatus according to an embodiment of the present invention.
  • the embodiment of the present invention provides a video denoising method, which is applied to a video denoising device, and the device may be disposed in a smart phone, a tablet computer, a smart TV, a multimedia player, etc., which is not limited by the present invention.
  • the method includes:
  • S101 detecting an input image of the target video, and obtaining a mosquito noise probability of each pixel in the input image;
  • S101 may include:
  • S201 includes: performing gradient detection on the input image to obtain a gradient value of each pixel of the input image; performing local edge detection on the input image to obtain an edge information value of each pixel of the input image; and based on the gradient value and The edge information value determines the pixel type of each pixel of the input image.
  • the gradient detection process is mainly used to detect the gradient of the current point
  • the local edge detection process is mainly used to detect whether there are pixels around the current pixel that are different from the current pixel.
  • the above two processes may be performed simultaneously or sequentially, and the invention is not limited.
  • the gradient detection template is a 3 ⁇ 3 template as shown in FIG. 3, and the gradient detection output is recorded as grad, and each pixel corresponds to a gradient value. Then, for the i-th pixel in the above template, that is, the gradient value grad 0,0 of the pixel value x 0,0 of the center point (0,0) can be obtained by the following formula (1):
  • MAX represents the maximum value of all data
  • x i,j represents the pixel value of the peripheral pixel of the (i,j) offset relative to the center point (0,0) in the template
  • abs(x 0,0 -x i, j ) is the absolute value of the offset from the relative center point (0, 0) in the template.
  • 3 ⁇ 3 template is only an example, and any other size template can be used as a template, which is not limited by the present invention.
  • the local edge detection template is still an 11 ⁇ 11 template as shown in FIG. 4, and the local edge detection output is recorded as edge, and each pixel corresponds to an edge information value, then, for the ith pixel in the template,
  • the edge information value edge 0,0 of the pixel value x 0,0 of the center point (0,0) can be obtained by the following formula (2).
  • MAX represents the maximum value of all data
  • x i,j represents the pixel value of the peripheral pixel of the (i,j) offset relative to the center point (0,0) in the template
  • abs(x 0,0 -x i, j ) is the absolute value of the offset from the relative center point (0, 0) in the template.
  • any template of other sizes can be used as a template when performing local edge detection, and preferably larger than the size of the template during gradient detection.
  • the pixel types are classified into three types, that is, a flat pixel (FLAT), a detail pixel (TEXTURE), and an edge pixel (EDGE). Then, when the gradient value of the ith pixel obtained by the above process is greater than or equal to the i-th pixel When the product of the edge information value and the first preset value is determined, the pixel type of the ith pixel is determined as an edge pixel; when the gradient value of the ith pixel is smaller than the edge information value of the ith pixel and the first preset value When the product is greater than or equal to the product of the edge information value of the ith pixel and the second preset value, the pixel type of the ith pixel is determined as the detail pixel; when the gradient value of the ith pixel is smaller than the ith pixel When the product of the edge information value and the first preset value is smaller than the product of the edge information value of the ith pixel and the second preset value, the pixel type of the ith pixel is determined as a
  • the first preset value is a lower limit of a gradient value of the pixel and an edge information value ratio when the pixel type is an edge pixel
  • the second preset value is a gradient value and an edge information value of the pixel when the pixel type is a detail pixel.
  • the first preset value is different from the second preset value, and both of the parameters are system input parameters, which can be configured according to different requirements of the user.
  • the first preset value is configured to be 0.6
  • the second preset value is configured. Configured to be 0.2.
  • the pixel type of each pixel is denoted as type, and then the pixel type type m,n of the pixel whose image space coordinate is (m, n) can be obtained by the formula (3).
  • reg_edge_ratio represents the first preset value
  • reg_text_ratio represents the second preset value
  • grad i, j represents the relative center point (0,0) is offset within the template (i, j) of gradient values of peripheral pixels
  • edge i, j represents the template relative to a center point (0,0) is offset
  • the mosquito noise probability of the i-th pixel is determined. If the obtained mosquito noise probability value is larger, it means that the i-th pixel is more likely to be mosquito noise, and conversely, the possibility that the i-th pixel is mosquito noise is smaller.
  • the template used for mosquito noise probability estimation is a 5 ⁇ 5 template as shown in FIG. 5, and the mosquito noise probability output is recorded as probability, and each pixel corresponds to a mosquito noise probability. Then, the mosquito noise probability value intuition 0,0 of the pixel value x 0,0 of the i-th pixel in the above template, that is, the center point (0, 0) can be obtained by the following formula (4).
  • type i, j represents the pixel type of the pixel whose relative center point (0, 0) offset is (i, j) in the template
  • the pixel type of the pixel whose offset is (i, j) is a flat pixel
  • the 5 ⁇ 5 template is only an example, and any other size template can be used as a template, which is not limited by the present invention.
  • S102 Perform low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel.
  • S102 may also be executed in parallel while S101 is being executed.
  • the input image is subjected to bilateral low-pass filtering to obtain a filtered image, so that the filtered pixel value corresponding to each pixel is obtained.
  • the S102 may further include: performing low-pass bilateral filtering based on the edge information value of each pixel and the pixel value of the input image. And obtain the filtered pixel value corresponding to each pixel.
  • the low-pass bilateral filtering template is a 3 ⁇ 3 template as shown in FIG. 3, and the low-pass bilateral filtering output is recorded as flt, and each pixel corresponds to a filtered pixel value. Then, the filtered pixel value flt 0,0 of the pixel value x 0,0 of the i-th pixel in the above template, that is, the center point (0, 0) can be obtained by the following formula (5).
  • edge_gain i,j is the edge intensity gain of the domain pixel with the offset of (i,j) relative to the center point (0,0) in the above template, which is obtained during the local edge detection process.
  • w i,j can be obtained by the following formula (6), and can also refer to the curve as shown in FIG. 6.
  • reg_diff_low represents the lower limit of the absolute value of the difference between the two neighborhood pixels
  • reg_diff_high represents the upper limit of the absolute value of the difference between the two neighborhood pixels. Is going to The value is limited to the interval [0,1].
  • the above reg_diff_low and reg_diff_high are system input parameters, which can be configured according to user requirements.
  • reg_diff_low is configured as 30
  • reg_diff_high is configured as 100.
  • edge_gain i, j of all the neighborhood pixels in the template are equal, which is equal to the edge intensity gain of the center point (0, 0). Then, edge_gain i,j can be obtained by the following formula (8), and can also refer to the curve shown in FIG.
  • reg_gain_thr_low represents the lower limit of the edge information value of the neighborhood pixel
  • reg_gain_thr_high represents the upper limit of the edge information value of the neighborhood pixel
  • edge 0 , 0 represents the edge intensity gain of the center point (0, 0) in the template.
  • reg_gain_thr_low and reg_gain_thr_high are system input parameters, which can be configured according to user requirements.
  • reg_gain_thr_low is configured as 128, and reg_gain_thr_high is configured as 256.
  • the algorithm for low-pass filtering the input image may be other low-pass bilateral filtering algorithms in addition to the above-mentioned low-pass bilateral filtering algorithm, which is not limited by the present invention.
  • the filtered pixel values corresponding to each pixel can be obtained through the above steps.
  • S103 Perform weighting processing on the filtered pixel value and the pixel value of the input image based on the mosquito noise probability, determine a pixel value of the output image, and output an image;
  • the filtered pixel values and the pixel values of the input image are weighted by the following formula (9).
  • xout m,n represents the pixel value of the output image with the image space coordinate of (m,n)
  • probability m,n represents the mosquito noise probability value of the image space coordinate of (m,n)
  • x m,n represents the image
  • flt m, n represents the filtered pixel value of the image space coordinate of (m, n).
  • the pixel value of the output image corresponding to each pixel is obtained, and finally, the output image is output.
  • an embodiment of the present invention further provides a video denoising apparatus, which is consistent with the video denoising apparatus described in one or more of the above embodiments.
  • the apparatus includes: a detecting unit 1, a filtering unit 2, and an output unit 3; wherein the detecting unit 1 is configured to detect an input image of the target video to obtain a mosquito noise probability of each pixel in the input image;
  • the filtering unit 2 is configured to perform low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; and the output unit 3 is configured to filter the pixel value and the pixel of the input image based on the mosquito noise probability The value is weighted to obtain a pixel value of the output image, and the output image is output.
  • the detecting unit 1 includes: a pixel type detecting unit configured to detect an input image of the target video, obtain a pixel type of each pixel in the input image; and a noise probability estimating unit configured to be based on each A pixel type of a pixel, which performs a mosquito noise probability estimation for each pixel in the input image to obtain a mosquito noise probability per pixel.
  • the pixel type detecting unit includes: a gradient detecting unit configured to perform gradient detection on the input image to obtain a gradient value of each pixel of the input image; and an edge detecting unit configured to input the image Performing local edge detection to obtain an edge information value of each pixel of the input image; and a pixel type determining unit configured to determine a pixel type of each pixel of the input image based on the gradient value and the edge information value.
  • the pixel type determining unit is configured to: when the gradient value of the ith pixel is greater than or equal to the product of the edge information value of the ith pixel and the first preset value, the ith pixel
  • the pixel type is determined as an edge pixel, where i is a positive integer; and is configured to when the gradient value of the ith pixel is smaller than the product of the edge information value of the ith pixel and the first preset value, and is greater than or equal to the ith
  • the pixel type of the ith pixel is determined as the detail pixel, wherein the first preset value is different from the second preset value; and is configured to be the ith
  • the gradient value of the pixel is smaller than the product of the edge information value of the ith pixel and the first preset value, and is smaller than the product of the edge information value of the ith pixel and the second preset value
  • the pixel type of the ith pixel Determine
  • the filtering unit 2 is configured to perform low-pass bilateral filtering based on the edge information value of each pixel and the pixel value of the input image to obtain a filtered pixel value corresponding to each pixel.
  • the noise probability estimating unit includes: a pixel type statistic unit configured to perform statistics on pixel types of the ith pixel and the M neighboring pixels, wherein the neighboring pixels are the ith a pixel around the pixel; a probability calculation unit configured to determine a mosquito noise probability of the ith pixel based on the statistical result.
  • the probability calculation unit is configured to calculate, according to the ith pixel and the M pixels, the number of pixels whose pixel type is a flat pixel, the number of pixels whose pixel type is a detail pixel, and the pixel type is an edge pixel.
  • the ratio of the sum of the number of pixels determines the mosquito noise probability of the ith pixel.
  • each unit included in the device can be implemented by a processor in the terminal, and can also be implemented by a logic circuit; in the process of implementation, the processor can be a central processing unit (CPU). , microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA).
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the video denoising method described above is implemented in the form of a software function module and sold or used as a standalone product, it may also be stored in a computer readable storage medium.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • program codes such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform a video denoising method in the embodiment of the present invention.
  • the embodiment of the present invention further provides a terminal (such as a computer, a smart phone, a tablet), and the terminal includes:
  • a storage medium configured to store computer executable instructions
  • a processor configured to detect an input image of the target video to obtain a mosquito noise probability of each pixel in the input image
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions are provided to implement the work specified in one or more blocks of a flow or a flow and/or a block diagram of the flowchart The steps that can be made.
  • the input image of the target video is detected, the mosquito noise probability of each pixel in the input image is obtained, and the input image is low-pass filtered to obtain the filtered pixel value corresponding to each pixel; And performing weighting processing on the filtered pixel value and the pixel value of the input image based on the mosquito noise probability, obtaining a pixel value of the output image, and outputting the output image. That is to say, for each frame of the target video, only pixels with a relatively high mosquito noise probability are filtered, and other pixels are not processed, so that not only the mosquito noise existing in the video but also the mosquito noise can be removed. The details in the video are preserved to enhance the viewer's visual experience and video quality.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed in embodiments of the present invention is a video denoising method, comprising: detecting an input image of a target video to obtain the mosquito noise probability of each pixel in the input image; low-pass filtering the input image to obtain the pixel value corresponding to each filtered pixel; and on the basis of the mosquito noise probability, performing weighted processing on the pixel value after filtering and the pixel value of the input image to obtain the pixel value of an output image, and outputting the output image. The embodiments of the present invention also disclose a video denoising device, a terminal and a storage medium.

Description

一种视频去噪方法及装置、终端、存储介质Video denoising method and device, terminal and storage medium 技术领域Technical field

本发明涉及图像处理领域,尤其涉及一种视频去噪方法及装置、终端、存储介质。The present invention relates to the field of image processing, and in particular, to a video denoising method and apparatus, a terminal, and a storage medium.

背景技术Background technique

在视频编解码过程中,需要对原始视频数据进行压缩,常用的压缩编码算法通常带有系数量化过程,而量化过程的不可逆性会造成最终解码的视频数据中存在大量的蚊式噪声,蚊式噪声大多围绕在字体或者物体边缘附近,造成视频质量的下降,同时带有蚊式噪声的视频画面让观看者感觉很“脏”,影响观看者的视觉感受。为了解决上述问题,对解码后的视频进行蚊式去噪的操作,使得最终的视频看上去画面干净,提升观看者的视觉感受和视频质量。In the process of video encoding and decoding, the original video data needs to be compressed. The commonly used compression coding algorithm usually has a coefficient quantization process, and the irreversibility of the quantization process causes a large amount of mosquito noise in the final decoded video data. Most of the noise is around the edge of the font or object, which causes the video quality to drop. At the same time, the video picture with mosquito noise makes the viewer feel "dirty" and affects the viewer's visual experience. In order to solve the above problem, the decoded video is subjected to a mosquito denoising operation, so that the final video looks clean and enhances the viewer's visual experience and video quality.

目前,去除蚊式噪声的常用方法是采用低通滤波的方法,但是常用的低通滤波器存在如下问题:1、对整幅图像进行滤波;2、低通滤波器强度不能灵活调整,造成高频细节分量的丢失,造成视频模糊。At present, the common method for removing mosquito noise is to use low-pass filtering, but the commonly used low-pass filter has the following problems: 1. Filtering the entire image; 2. The strength of the low-pass filter cannot be flexibly adjusted, resulting in high The loss of frequency detail components causes the video to be blurred.

所以,现有技术中并不存在一种合适的去除视频中蚊式噪声的方法。Therefore, there is no suitable method for removing mosquito noise in video in the prior art.

发明内容Summary of the invention

有鉴于此,本发明实施例期望提供一种视频去噪方法及装置、终端、存储介质,以实现在去除视频中存在的蚊式噪声的同时,保留了视频中的细节,提升观看者的视觉感受和视频质量。In view of this, embodiments of the present invention are directed to a video denoising method and apparatus, a terminal, and a storage medium, so as to remove the mosquito noise existing in the video while preserving the details in the video and improving the viewer's vision. Feeling and video quality.

为达到上述目的,本发明实施例的技术方案是这样实现的:To achieve the above objective, the technical solution of the embodiment of the present invention is implemented as follows:

第一方面,本发明实施例提供一种视频去噪方法,包括:检测目标视 频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率;对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值;基于所述蚊式噪声概率,对所述滤波后的像素值以及所述输入图像的像素值进行加权处理,获得输出图像的像素值,并输出所述输出图像。In a first aspect, an embodiment of the present invention provides a video denoising method, including: detecting a target view a frequency input image, obtaining a mosquito noise probability of each pixel in the input image; performing low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; a noise probability, weighting the filtered pixel value and the pixel value of the input image to obtain a pixel value of the output image, and outputting the output image.

在本发明的一种实施例中,所述检测目标视频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率,包括:检测所述目标视频的输入图像,获得所述输入图像中每一个像素的像素类型;基于所述每一个像素的像素类型,对所述输入图像中所述每一个像素进行蚊式噪声概率估计,获得所述每一个像素的蚊式噪声概率。In an embodiment of the present invention, the detecting an input image of the target video, obtaining a mosquito noise probability of each pixel in the input image, comprising: detecting an input image of the target video, obtaining the input image a pixel type of each of the pixels; based on the pixel type of each of the pixels, performing a mosquito noise probability estimation on each of the pixels in the input image to obtain a mosquito noise probability of each of the pixels.

在本发明的一种实施例中,所述检测目标视频的输入图像,获得所述输入图像中每一个像素的像素类型,包括:对所述输入图像进行梯度检测,获得所述输入图像的每一个像素的梯度值;对所述输入图像进行局部边缘检测,获得所述输入图像的每一个像素的边缘信息值;基于所述梯度值以及所述边缘信息值,确定所述输入图像的每一个像素的像素类型。In an embodiment of the present invention, the detecting an input image of the target video to obtain a pixel type of each pixel in the input image includes: performing gradient detection on the input image to obtain each of the input images a gradient value of one pixel; performing local edge detection on the input image to obtain an edge information value of each pixel of the input image; determining each of the input images based on the gradient value and the edge information value The pixel type of the pixel.

在本发明的一种实施例中,所述基于所述梯度值以及所述边缘信息值,确定所述输入图像的每一个像素的像素类型,包括:当第i个像素的所述梯度值大于等于所述第i个像素的所述边缘信息值与第一预设值之积时,将所述第i个像素的像素类型确定为边缘像素,其中,i为正整数;当所述第i个像素的所述梯度值小于所述第i个像素的所述边缘信息值与第一预设值之积,且大于等于所述第i个像素的所述边缘信息值与第二预设值之积时,将所述第i个像素的像素类型确定为细节像素,其中,所述第一预设值不同于所述第二预设值;当所述第i个像素的所述梯度值小于所述第i个像素的所述边缘信息值与所述第一预设值之积,且小于所述第i个像素的所述边缘信息值与所述第二预设值之积时,将所述第i个像素的像素类型确定为平坦像素。 In an embodiment of the present invention, determining, according to the gradient value and the edge information value, a pixel type of each pixel of the input image, including: when the gradient value of the ith pixel is greater than When the product of the edge information value of the ith pixel is equal to the first preset value, the pixel type of the ith pixel is determined as an edge pixel, where i is a positive integer; The gradient value of the pixel is smaller than the product of the edge information value of the ith pixel and the first preset value, and is greater than or equal to the edge information value of the ith pixel and the second preset value. Determining the pixel type of the ith pixel as a detail pixel, wherein the first preset value is different from the second preset value; when the gradient value of the ith pixel When the product of the edge information value of the ith pixel and the first preset value is smaller than the product of the edge information value of the ith pixel and the second preset value, The pixel type of the i-th pixel is determined to be a flat pixel.

在本发明的一种实施例中,所述对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值,包括:基于所述每一个像素的边缘信息值和所述输入图像的像素值进行低通双边滤波,获得所述每一像素所对应的滤波后的像素值。In an embodiment of the present invention, the low-pass filtering the input image to obtain the filtered pixel value corresponding to each pixel includes: based on the edge information value of each pixel The pixel values of the input image are subjected to low-pass bilateral filtering to obtain the filtered pixel values corresponding to each pixel.

在本发明的一种实施例中,所述基于所述每一个像素的像素类型,对所述输入图像中所述每一个像素进行蚊式噪声概率估计,获得所述每一个像素的蚊式噪声概率,包括:对第i个像素以及M个邻域像素的像素类型进行统计,其中,所述邻域像素为所述第i个像素周围的像素;基于统计结果,确定所述第i个像素的蚊式噪声概率。In an embodiment of the present invention, the mosquito noise probability estimation is performed on each pixel in the input image based on a pixel type of each pixel, and mosquito noise of each pixel is obtained. The probability includes: counting the pixel types of the ith pixel and the M neighboring pixels, wherein the neighboring pixels are pixels around the ith pixel; determining the ith pixel based on a statistical result Mosquito noise probability.

在本发明的一种实施例中,所述基于统计结果,确定所述第i个像素的蚊式噪声概率,包括:基于所述第i个像素以及所述M个像素中像素类型为平坦像素的像素数目占像素类型为细节像素的像素数目与像素类型为边缘像素的像素数目之和的比例,确定所述第i个像素的蚊式噪声概率。In an embodiment of the present invention, determining the mosquito noise probability of the ith pixel based on a statistical result, comprising: determining, according to the ith pixel and the M pixel, a flat pixel The number of pixels is a ratio of the number of pixels of the pixel type to the detail pixel to the sum of the number of pixels of the pixel type of the edge pixel, and the mosquito noise probability of the ith pixel is determined.

第二方面,本发明实施例提供一种视频去噪装置,包括:检测单元、滤波单元以及输出单元;其中,所述检测单元,配置为检测目标视频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率;所述滤波单元,配置为对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值;所述输出单元,配置为基于所述蚊式噪声概率,对所述滤波后的像素值以及所述输入图像的像素值进行加权处理,获得输出图像的像素值,并输出所述输出图像。In a second aspect, an embodiment of the present invention provides a video denoising apparatus, including: a detecting unit, a filtering unit, and an output unit; wherein the detecting unit is configured to detect an input image of a target video, and obtain each of the input images. a mosquito-like noise probability of one pixel; the filtering unit configured to perform low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; the output unit is configured to be based on the Mosquito noise probability, weighting the filtered pixel value and the pixel value of the input image to obtain a pixel value of the output image, and outputting the output image.

在本发明的一种实施例中,所述检测单元,包括:像素类型检测单元,配置为检测所述目标视频的输入图像,获得所述输入图像中每一个像素的像素类型;噪声概率估计单元,配置为基于所述每一个像素的像素类型,对所述输入图像中所述每一个像素进行蚊式噪声概率估计,获得所述每一个像素的蚊式噪声概率。 In an embodiment of the present invention, the detecting unit includes: a pixel type detecting unit configured to detect an input image of the target video, obtain a pixel type of each pixel in the input image; and a noise probability estimating unit And configuring, according to the pixel type of each of the pixels, performing a mosquito noise probability estimation on each of the pixels in the input image to obtain a mosquito noise probability of each pixel.

在本发明的一种实施例中,所述像素类型检测单元,包括:梯度检测单元,配置为对所述输入图像进行梯度检测,获得所述输入图像的每一个像素的梯度值;边缘检测单元,配置为对所述输入图像进行局部边缘检测,获得所述输入图像的每一个像素的边缘信息值;像素类型确定单元,配置为基于所述梯度值以及所述边缘信息值,确定所述输入图像的每一个像素的像素类型。In an embodiment of the present invention, the pixel type detecting unit includes: a gradient detecting unit configured to perform gradient detection on the input image to obtain a gradient value of each pixel of the input image; and an edge detecting unit Configuring to perform local edge detection on the input image to obtain an edge information value of each pixel of the input image; a pixel type determining unit configured to determine the input based on the gradient value and the edge information value The pixel type of each pixel of the image.

在本发明的一种实施例中,所述像素类型确定单元,配置为当第i个像素的所述梯度值大于等于所述第i个像素的所述边缘信息值与第一预设值之积时,将所述第i个像素的像素类型确定为边缘像素,其中,i为正整数;还配置为当所述第i个像素的所述梯度值小于所述第i个像素的所述边缘信息值与第一预设值之积,且大于等于所述第i个像素的所述边缘信息值与第二预设值之积时,将所述第i个像素的像素类型确定为细节像素,其中,所述第一预设值不同于所述第二预设值;还配置为当所述第i个像素的所述梯度值小于所述第i个像素的所述边缘信息值与所述第一预设值之积,且小于所述第i个像素的所述边缘信息值与所述第二预设值之积时,将所述第i个像素的像素类型确定为平坦像素。In an embodiment of the present invention, the pixel type determining unit is configured to: when the gradient value of the ith pixel is greater than or equal to the edge information value of the ith pixel and the first preset value In the case of product, the pixel type of the ith pixel is determined as an edge pixel, where i is a positive integer; and is further configured to: when the gradient value of the ith pixel is smaller than the ith pixel When the product of the edge information value and the first preset value is greater than or equal to the product of the edge information value of the ith pixel and the second preset value, determining the pixel type of the ith pixel as the detail a pixel, wherein the first preset value is different from the second preset value; and configured to: when the gradient value of the ith pixel is smaller than the edge information value of the ith pixel When the product of the first preset value is smaller than the product of the edge information value of the ith pixel and the second preset value, the pixel type of the ith pixel is determined to be a flat pixel .

在本发明的一种实施例中,所述滤波单元,配置为基于所述每一个像素的边缘信息值和所述输入图像的像素值进行低通双边滤波,获得所述每一像素所对应的滤波后的像素值。In an embodiment of the present invention, the filtering unit is configured to perform low-pass bilateral filtering based on edge information values of each pixel and pixel values of the input image to obtain corresponding to each pixel. Filtered pixel value.

在本发明的一种实施例中,所述噪声概率估计单元,包括:像素类型统计单元,配置为对第i个像素以及M个邻域像素的像素类型进行统计,其中,所述邻域像素为所述第i个像素周围的像素;概率计算单元,配置为基于统计结果,确定所述第i个像素的蚊式噪声概率。In an embodiment of the present invention, the noise probability estimation unit includes: a pixel type statistical unit configured to perform statistics on pixel types of the ith pixel and the M neighborhood pixels, wherein the neighborhood pixel a pixel around the ith pixel; a probability calculation unit configured to determine a mosquito noise probability of the ith pixel based on a statistical result.

在本发明的一种实施例中,所述概率计算单元,配置为基于所述第i个像素以及所述M个像素中像素类型为平坦像素的像素数目占像素类型为 细节像素的像素数目与像素类型为边缘像素的像素数目之和的比例,确定所述第i个像素的蚊式噪声概率。In an embodiment of the present invention, the probability calculation unit is configured to: based on the ith pixel and the M pixels, a pixel type of which is a flat pixel, and the pixel type is The ratio of the number of pixels of the detail pixel to the sum of the number of pixels of the pixel type of the edge pixel determines the mosquito noise probability of the ith pixel.

第三方面,本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明第一方面实施例提供的视频去噪方法。In a third aspect, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform the video denoising method provided by the first aspect of the present invention.

第四方面,本发明实施例提供一种终端,所述终端包括:In a fourth aspect, an embodiment of the present invention provides a terminal, where the terminal includes:

存储介质,配置为存储计算机可执行指令;a storage medium configured to store computer executable instructions;

处理器,配置为检测目标视频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率;对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值;基于所述蚊式噪声概率,对所述滤波后的像素值以及所述输入图像的像素值进行加权处理,获得输出图像的像素值,并输出所述输出图像。a processor configured to detect an input image of the target video, obtain a mosquito noise probability of each pixel in the input image, and perform low-pass filtering on the input image to obtain a filtered pixel corresponding to each pixel And performing weighting processing on the filtered pixel value and the pixel value of the input image based on the mosquito noise probability, obtaining a pixel value of the output image, and outputting the output image.

本发明实施例提供了一种视频去噪方法及装置、终端、存储介质,该装置检测目标视频的输入图像,获得输入图像中每一个像素的蚊式噪声概率,同时,对输入图像进行低通滤波,获得每一像素所对应的滤波后的像素值;然后,基于蚊式噪声概率,对滤波后的像素值以及输入图像的像素值进行加权处理,获得输出图像的像素值,并输出该输出图像。也就是说,对于目标视频的每一帧图像来说,仅对蚊式噪声概率比较大的像素进行滤波,其它的像素不进行处理,如此,不仅能够去除视频中存在的蚊式噪声,同时也保留了视频中的细节,提升观看者的视觉感受和视频质量。Embodiments of the present invention provide a video denoising method and apparatus, a terminal, and a storage medium. The device detects an input image of a target video, obtains a mosquito noise probability of each pixel in the input image, and simultaneously performs a low pass on the input image. Filtering, obtaining a filtered pixel value corresponding to each pixel; then, based on the mosquito noise probability, weighting the filtered pixel value and the pixel value of the input image to obtain a pixel value of the output image, and outputting the output image. That is to say, for each frame of the target video, only pixels with a relatively high mosquito noise probability are filtered, and other pixels are not processed, so that not only the mosquito noise existing in the video but also the mosquito noise can be removed. The details in the video are preserved to enhance the viewer's visual experience and video quality.

附图说明DRAWINGS

图1为本发明实施例中的视频去噪方法流程示意图;1 is a schematic flowchart of a video denoising method according to an embodiment of the present invention;

图2为本发明实施例中的获得每一个像素蚊式噪声概率的方法流程示意图;2 is a schematic flow chart of a method for obtaining a mosquito noise probability of each pixel according to an embodiment of the present invention;

图3为本发明实施例中的3×3的模板的示意图; 3 is a schematic diagram of a 3×3 template according to an embodiment of the present invention;

图4为本发明实施例中的11×11的模板的示意图;4 is a schematic diagram of an 11×11 template according to an embodiment of the present invention;

图5为本发明实施例中的5×5的模板的示意图;FIG. 5 is a schematic diagram of a 5×5 template according to an embodiment of the present invention; FIG.

图6为本发明实施例中的函数wi,j的曲线的示意图;6 is a schematic diagram of a curve of a function w i,j in an embodiment of the present invention;

图7为本发明实施例中的函数edge_gaini,j的曲线的示意图;FIG. 7 is a schematic diagram of a curve of a function edge_gain i,j according to an embodiment of the present invention; FIG.

图8为本发明实施例中的视频去噪装置的结构示意图。FIG. 8 is a schematic structural diagram of a video denoising apparatus according to an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings.

本发明实施例提供一种视频去噪方法,应用于视频去噪装置中,该装置可以设置在如智能手机、平板电脑、智能电视、多媒体播放器等中,本发明不做限定。The embodiment of the present invention provides a video denoising method, which is applied to a video denoising device, and the device may be disposed in a smart phone, a tablet computer, a smart TV, a multimedia player, etc., which is not limited by the present invention.

参见图1所示,该方法包括:Referring to Figure 1, the method includes:

S101:检测目标视频的输入图像,获得输入图像中每一个像素的蚊式噪声概率;S101: detecting an input image of the target video, and obtaining a mosquito noise probability of each pixel in the input image;

在实施过程中,参见图2所示,S101可以包括:In the implementation process, as shown in FIG. 2, S101 may include:

S201:检测目标视频的输入图像,获得输入图像中每一个像素的像素类型;S201: detecting an input image of the target video, and obtaining a pixel type of each pixel in the input image;

在实际应用中,S201包括:对输入图像进行梯度检测,获得输入图像的每一个像素的梯度值;对输入图像进行局部边缘检测,获得输入图像的每一个像素的边缘信息值;基于梯度值以及边缘信息值,确定输入图像的每一个像素的像素类型。In practical applications, S201 includes: performing gradient detection on the input image to obtain a gradient value of each pixel of the input image; performing local edge detection on the input image to obtain an edge information value of each pixel of the input image; and based on the gradient value and The edge information value determines the pixel type of each pixel of the input image.

这里,梯度检测过程主要用于检测当前点的梯度,而局部边缘检测过程主要用于检测当前像素周围是否存在与当前像素差异较大的像素。上述两个处理过程可以同时进行,也可以先后依次进行,本发明不做限定。 Here, the gradient detection process is mainly used to detect the gradient of the current point, and the local edge detection process is mainly used to detect whether there are pixels around the current pixel that are different from the current pixel. The above two processes may be performed simultaneously or sequentially, and the invention is not limited.

首先,介绍梯度检测流程。First, introduce the gradient detection process.

例如,梯度检测模板为如图3所示的3×3的模板,梯度检测输出记为grad,每一个像素对应一个梯度值。那么,对于上述模板中内第i个像素,即中心点(0,0)的像素值x0,0的梯度值grad0,0,可以通过以下公式(1)获得:For example, the gradient detection template is a 3×3 template as shown in FIG. 3, and the gradient detection output is recorded as grad, and each pixel corresponds to a gradient value. Then, for the i-th pixel in the above template, that is, the gradient value grad 0,0 of the pixel value x 0,0 of the center point (0,0) can be obtained by the following formula (1):

Figure PCTCN2016097380-appb-000001
Figure PCTCN2016097380-appb-000001

其中,MAX表示取所有数据的最大值,xi,j表示模板内相对中心点(0,0)偏移量是(i,j)的周边像素的像素值,abs(x0,0-xi,j)为模板内相对中心点(0,0)偏移量取整后的绝对值。Where MAX represents the maximum value of all data, x i,j represents the pixel value of the peripheral pixel of the (i,j) offset relative to the center point (0,0) in the template, abs(x 0,0 -x i, j ) is the absolute value of the offset from the relative center point (0, 0) in the template.

可以理解地,这里的3×3模板只是一个例子,任何其它大小的模板都可以用来作为模板的,本发明不做限定。It can be understood that the 3×3 template is only an example, and any other size template can be used as a template, which is not limited by the present invention.

接下来,介绍局部边缘检测过程。Next, the local edge detection process is introduced.

例如,局部边缘检测模板仍为如图4所示的11×11的模板,局部边缘检测输出记为edge,每一个像素对应一个边缘信息值,那么,对于上述模板中内第i个像素,即中心点(0,0)的像素值x0,0的边缘信息值edge0,0,可以通过以下公式(2)获得。For example, the local edge detection template is still an 11×11 template as shown in FIG. 4, and the local edge detection output is recorded as edge, and each pixel corresponds to an edge information value, then, for the ith pixel in the template, The edge information value edge 0,0 of the pixel value x 0,0 of the center point (0,0) can be obtained by the following formula (2).

Figure PCTCN2016097380-appb-000002
Figure PCTCN2016097380-appb-000002

其中,MAX表示取所有数据的最大值,xi,j表示模板内相对中心点(0,0)偏移量是(i,j)的周边像素的像素值,abs(x0,0-xi,j)为模板内相对中心点(0,0)偏移量取整后的绝对值。Where MAX represents the maximum value of all data, x i,j represents the pixel value of the peripheral pixel of the (i,j) offset relative to the center point (0,0) in the template, abs(x 0,0 -x i, j ) is the absolute value of the offset from the relative center point (0, 0) in the template.

需要说明的是,在进行局部边缘检测时,任何其它大小的模板都可以用来作为模板的,较优地,要大于梯度检测时模板的大小。It should be noted that any template of other sizes can be used as a template when performing local edge detection, and preferably larger than the size of the template during gradient detection.

那么,在获得每一个像素的梯度值和边缘信息值之后,基于这两个值 来判断每一个像素的像素类型了。Then, after obtaining the gradient value and the edge information value of each pixel, based on these two values To determine the pixel type of each pixel.

这里,将像素类型分为3类,即平坦像素(FLAT)、细节像素(TEXTURE)、边缘像素(EDGE),那么,当通过上述过程获得的第i个像素的梯度值大于等于第i个像素的边缘信息值与第一预设值之积时,将第i个像素的像素类型确定为边缘像素;当第i个像素的梯度值小于第i个像素的边缘信息值与第一预设值之积,且大于等于第i个像素的边缘信息值与第二预设值之积时,将第i个像素的像素类型确定为细节像素;当第i个像素的梯度值小于第i个像素的边缘信息值与第一预设值之积,且小于第i个像素的边缘信息值与第二预设值之积时,将第i个像素的像素类型确定为平坦像素。Here, the pixel types are classified into three types, that is, a flat pixel (FLAT), a detail pixel (TEXTURE), and an edge pixel (EDGE). Then, when the gradient value of the ith pixel obtained by the above process is greater than or equal to the i-th pixel When the product of the edge information value and the first preset value is determined, the pixel type of the ith pixel is determined as an edge pixel; when the gradient value of the ith pixel is smaller than the edge information value of the ith pixel and the first preset value When the product is greater than or equal to the product of the edge information value of the ith pixel and the second preset value, the pixel type of the ith pixel is determined as the detail pixel; when the gradient value of the ith pixel is smaller than the ith pixel When the product of the edge information value and the first preset value is smaller than the product of the edge information value of the ith pixel and the second preset value, the pixel type of the ith pixel is determined as a flat pixel.

这里,第一预设值为当像素类型为边缘像素时,像素的梯度值和边缘信息值比例的下限,第二预设值为当像素类型为细节像素时,像素的梯度值和边缘信息值比例的下限。第一预设值与第二预设值不相同,这两个参数都为系统输入参数,可以根据用户不同需求进行配置,较优地,第一预设值配置为0.6,第二预设值配置为0.2。Here, the first preset value is a lower limit of a gradient value of the pixel and an edge information value ratio when the pixel type is an edge pixel, and the second preset value is a gradient value and an edge information value of the pixel when the pixel type is a detail pixel. The lower limit of the ratio. The first preset value is different from the second preset value, and both of the parameters are system input parameters, which can be configured according to different requirements of the user. Preferably, the first preset value is configured to be 0.6, and the second preset value is configured. Configured to be 0.2.

例如,每一个像素的像素类型记为type,那么,图像空间坐标为(m,n)的像素的像素类型typem,n,可以通过公式(3)获得。For example, the pixel type of each pixel is denoted as type, and then the pixel type type m,n of the pixel whose image space coordinate is (m, n) can be obtained by the formula (3).

Figure PCTCN2016097380-appb-000003
Figure PCTCN2016097380-appb-000003

其中,reg_edge_ratio表示上述第一预设值,reg_text_ratio表示上述第二预设值。gradi,j表示模板内相对中心点(0,0)偏移量是(i,j)的周边像素的梯度值,edgei,j表示模板内相对中心点(0,0)偏移量是(i,j)的周边像素的边缘信息值。Where reg_edge_ratio represents the first preset value, and reg_text_ratio represents the second preset value. grad i, j represents the relative center point (0,0) is offset within the template (i, j) of gradient values of peripheral pixels, edge i, j represents the template relative to a center point (0,0) is offset The edge information value of the peripheral pixels of (i, j).

S202:基于每一个像素的像素类型,对输入图像中每一个像素进行蚊 式噪声概率估计,获得每一个像素的蚊式噪声概率。S202: performing mosquito on each pixel in the input image based on the pixel type of each pixel The noise probability estimate is obtained to obtain the mosquito noise probability per pixel.

在本发明的一种实施例中,通过S201获得的每一个像素的像素类型之后,在对当前像素进行蚊式噪声概率时,首先,取当前像素周围一定范围内的M个像素,然后,对这M+1个像素,即第i个像素及第i个像素周围的M个像素的像素类型进行统计,然后,基于统计结果,确定第i个像素的蚊式噪声概率。如果得到的蚊式噪声概率数值越大,则表示第i个像素是蚊式噪声的可能性越大,反之,则表示第i个像素是蚊式噪声的可能性越小。In an embodiment of the present invention, after the pixel type of each pixel obtained by S201, when the mosquito noise probability is performed on the current pixel, first, M pixels in a certain range around the current pixel are taken, and then, The M+1 pixels, that is, the pixel types of the M pixels around the i-th pixel and the ith pixel are counted, and then, based on the statistical result, the mosquito noise probability of the i-th pixel is determined. If the obtained mosquito noise probability value is larger, it means that the i-th pixel is more likely to be mosquito noise, and conversely, the possibility that the i-th pixel is mosquito noise is smaller.

例如,蚊式噪声概率估计所使用的模板为如图5所示的5×5的模板,蚊式噪声概率输出记为probability,每一个像素对应一个蚊式噪声概率。那么,对于上述模板中内第i个像素,即中心点(0,0)的像素值x0,0的蚊式噪声概率值posibility0,0,可以通过以下公式(4)获得。For example, the template used for mosquito noise probability estimation is a 5×5 template as shown in FIG. 5, and the mosquito noise probability output is recorded as probability, and each pixel corresponds to a mosquito noise probability. Then, the mosquito noise probability value posibility 0,0 of the pixel value x 0,0 of the i-th pixel in the above template, that is, the center point (0, 0) can be obtained by the following formula (4).

Figure PCTCN2016097380-appb-000004
Figure PCTCN2016097380-appb-000004

其中,typei,j表示模板内相对中心点(0,0)偏移量为(i,j)的像素的像素类型,typei,j==FLAT表示模板内相对中心点(0,0)偏移量为(i,j)的像素的像素类型为平坦像素,typei,j==TEXTURE表示模板内相对中心点(0,0)偏移量为(i,j)的像素的像素类型为细节像素,typei,j==EDGE表示模板内相对中心点(0,0)偏移量为(i,j)的像素的像素类型为边缘像素。Where type i, j represents the pixel type of the pixel whose relative center point (0, 0) offset is (i, j) in the template, and type i, j == FLAT represents the relative center point (0, 0) in the template. The pixel type of the pixel whose offset is (i, j) is a flat pixel, and type i, j == TEXTURE indicates the pixel type of the pixel whose offset is (i, j) relative to the center point (0, 0) in the template. For the detail pixel, type i, j == EDGE indicates that the pixel type of the pixel whose relative center point (0, 0) offset is (i, j) within the template is the edge pixel.

可以理解地,这里的5×5模板只是一个例子,任何其它大小的模板都可以用来作为模板的,本发明不做限定。It can be understood that the 5×5 template is only an example, and any other size template can be used as a template, which is not limited by the present invention.

S102:对输入图像进行低通滤波,获得每一像素所对应的滤波后的像素值;S102: Perform low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel.

在本发明的其他实施例中,在执行S101的同时,还可以并行执行S102, 对输入图像进行双边低通滤波,获得滤波图像,这样,也就得到了每一像素所对应的滤波后的像素值。In other embodiments of the present invention, S102 may also be executed in parallel while S101 is being executed. The input image is subjected to bilateral low-pass filtering to obtain a filtered image, so that the filtered pixel value corresponding to each pixel is obtained.

在本发明的其他实施例中,为了极好的保留输入图像的细节边缘,并去除蚊式噪声,S102还可以包括:基于每一个像素的边缘信息值和输入图像的像素值进行低通双边滤波,获得每一像素所对应的滤波后的像素值。In other embodiments of the present invention, in order to preserve the detail edge of the input image and remove the mosquito noise, the S102 may further include: performing low-pass bilateral filtering based on the edge information value of each pixel and the pixel value of the input image. And obtain the filtered pixel value corresponding to each pixel.

例如,低通双边滤波模板为如图3所示的3×3模板,低通双边滤波输出记为flt,每一个像素对应一个滤波后的像素值。那么,对于上述模板中内第i个像素,即中心点(0,0)的像素值x0,0的滤波后的像素值flt0,0,可以通过以下公式(5)获得。For example, the low-pass bilateral filtering template is a 3×3 template as shown in FIG. 3, and the low-pass bilateral filtering output is recorded as flt, and each pixel corresponds to a filtered pixel value. Then, the filtered pixel value flt 0,0 of the pixel value x 0,0 of the i-th pixel in the above template, that is, the center point (0, 0) can be obtained by the following formula (5).

Figure PCTCN2016097380-appb-000005
Figure PCTCN2016097380-appb-000005

其中,xi,j表示上述模板内相对中心点(0,0)偏移量为(i,j)的领域像素,wi,j表示上述模板内领域像素与中心点(0,0)差值的绝对值的函数,edge_gaini,j是上述模板内相对中心点(0,0)偏移量为(i,j)的领域像素的边缘强度增益,是在局部边缘检测过程中获得的。Where x i,j represents the domain pixel with the offset of the relative center point (0,0) in the template as (i,j), and w i,j represents the difference between the domain pixel and the center point (0,0) in the template. The function of the absolute value of the value, edge_gain i,j is the edge intensity gain of the domain pixel with the offset of (i,j) relative to the center point (0,0) in the above template, which is obtained during the local edge detection process.

在实施过程中,wi,j可以通过以下公式(6)获得,同时可以参照如图6所示的曲线。In the implementation, w i,j can be obtained by the following formula (6), and can also refer to the curve as shown in FIG. 6.

Figure PCTCN2016097380-appb-000006
Figure PCTCN2016097380-appb-000006

其中,reg_diff_low表示两个邻域像素差值的绝对值的下限,reg_diff_high表示两个邻域像素差值的绝对值的上限,

Figure PCTCN2016097380-appb-000007
是将
Figure PCTCN2016097380-appb-000008
的值限制在区间[0,1]内。上述reg_diff_low和reg_diff_high为系统输入参数,可根据用户的需求进行配置,较优地,reg_diff_low配置为30,reg_diff_high 配置为100。Where reg_diff_low represents the lower limit of the absolute value of the difference between the two neighborhood pixels, and reg_diff_high represents the upper limit of the absolute value of the difference between the two neighborhood pixels.
Figure PCTCN2016097380-appb-000007
Is going to
Figure PCTCN2016097380-appb-000008
The value is limited to the interval [0,1]. The above reg_diff_low and reg_diff_high are system input parameters, which can be configured according to user requirements. Preferably, reg_diff_low is configured as 30 and reg_diff_high is configured as 100.

进一步地,上述函数CLIP(h,low,high)可以通过以下公式(7)实现。Further, the above function CLIP(h, low, high) can be implemented by the following formula (7).

Figure PCTCN2016097380-appb-000009
Figure PCTCN2016097380-appb-000009

进一步地,由于使用的为如图3所示的3×3模板,那么,该模板内所有邻域像素的edge_gaini,j相等,都等于中心点(0,0)的边缘强度增益。那么,edge_gaini,j可以通过以下公式(8)获得,同时可以参照如图7所示的曲线。Further, since the 3×3 template as shown in FIG. 3 is used, the edge_gain i, j of all the neighborhood pixels in the template are equal, which is equal to the edge intensity gain of the center point (0, 0). Then, edge_gain i,j can be obtained by the following formula (8), and can also refer to the curve shown in FIG.

Figure PCTCN2016097380-appb-000010
Figure PCTCN2016097380-appb-000010

其中,reg_gain_thr_low表示邻域像素的边缘信息值的下限,reg_gain_thr_high表示邻域像素的边缘信息值的上限,edge0,0表示上述模板内中心点(0,0)的边缘强度增益。Where reg_gain_thr_low represents the lower limit of the edge information value of the neighborhood pixel, reg_gain_thr_high represents the upper limit of the edge information value of the neighborhood pixel, and edge 0 , 0 represents the edge intensity gain of the center point (0, 0) in the template.

上述reg_gain_thr_low和reg_gain_thr_high为系统输入参数,可根据用户的需求进行配置,较优地,reg_gain_thr_low配置为128,reg_gain_thr_high配置为256。The above reg_gain_thr_low and reg_gain_thr_high are system input parameters, which can be configured according to user requirements. Preferably, reg_gain_thr_low is configured as 128, and reg_gain_thr_high is configured as 256.

在实际应用中,对输入图像进行低通滤波的算法除了上述低通双边滤波算法之外,还可以为其它现有低通双边滤波算法,本发明不做限定。In an actual application, the algorithm for low-pass filtering the input image may be other low-pass bilateral filtering algorithms in addition to the above-mentioned low-pass bilateral filtering algorithm, which is not limited by the present invention.

总之,通过上述步骤即可获得每一个像素对应的滤波后的像素值。In summary, the filtered pixel values corresponding to each pixel can be obtained through the above steps.

S103:基于蚊式噪声概率,对滤波后的像素值以及输入图像的像素值进行加权处理,确定输出图像的像素值,并输出图像;S103: Perform weighting processing on the filtered pixel value and the pixel value of the input image based on the mosquito noise probability, determine a pixel value of the output image, and output an image;

在本发明的其他实施例中,通过以下公式(9)对对滤波后的像素值以及输入图像的像素值进行加权处理。 In other embodiments of the present invention, the filtered pixel values and the pixel values of the input image are weighted by the following formula (9).

xoutm,n=probabilitym,n×fltm,n+(1-probabilitym,n)×xm,n    (9);Xout m,n =probability m,n ×flt m,n +(1-probability m,n )×x m,n (9);

其中,xoutm,n表示图像空间坐标为(m,n)的输出图像的像素值,probabilitym,n表示图像空间坐标为(m,n)的蚊式噪声概率值,xm,n表示图像空间坐标为(m,n)的输入图像的像素值,fltm,n表示图像空间坐标为(m,n)的滤波后的像素值。Where xout m,n represents the pixel value of the output image with the image space coordinate of (m,n), probability m,n represents the mosquito noise probability value of the image space coordinate of (m,n), x m,n represents the image The pixel value of the input image whose spatial coordinate is (m, n), flt m, n represents the filtered pixel value of the image space coordinate of (m, n).

然后,通过上述加权处理之后,得到每一像素所对应的输出图像的像素值,最后,输出该输出图像。Then, after the weighting process described above, the pixel value of the output image corresponding to each pixel is obtained, and finally, the output image is output.

至此,便完成了对目标视频中一帧输入图像的去噪过程,对于该视频中每一帧输入图像均执行以上步骤进行去噪,在此不再一一赘述。At this point, the denoising process of one frame of the input image in the target video is completed. For each frame of the video, the above steps are performed to perform denoising, which will not be repeated here.

由上述可知,对于目标视频的每一帧图像来说,通过仅对蚊式噪声概率比较大的像素进行滤波,其它的像素不进行处理,如此,不仅能够去除视频中存在的蚊式噪声,同时也保留了视频中的细节,提升观看者的视觉感受和视频质量。It can be seen from the above that for each frame of the target video, only the pixels with relatively high mosquito noise probability are filtered, and other pixels are not processed, so that not only the mosquito noise existing in the video can be removed, but also It also preserves the details in the video to enhance the viewer's visual experience and video quality.

基于同一发明构思,本发明实施例还提供一种视频去噪装置,与上述一个或者多个实施例中所述的视频去噪装置一致。Based on the same inventive concept, an embodiment of the present invention further provides a video denoising apparatus, which is consistent with the video denoising apparatus described in one or more of the above embodiments.

参见图8所示,该装置包括:检测单元1、滤波单元2以及输出单元3;其中,检测单元1,配置为检测目标视频的输入图像,获得输入图像中每一个像素的蚊式噪声概率;滤波单元2,配置为对输入图像进行低通滤波,获得每一像素所对应的滤波后的像素值;输出单元3,配置为基于蚊式噪声概率,对滤波后的像素值以及输入图像的像素值进行加权处理,获得输出图像的像素值,并输出所述输出图像。As shown in FIG. 8, the apparatus includes: a detecting unit 1, a filtering unit 2, and an output unit 3; wherein the detecting unit 1 is configured to detect an input image of the target video to obtain a mosquito noise probability of each pixel in the input image; The filtering unit 2 is configured to perform low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; and the output unit 3 is configured to filter the pixel value and the pixel of the input image based on the mosquito noise probability The value is weighted to obtain a pixel value of the output image, and the output image is output.

在本发明的一种实施例中,检测单元1,包括:像素类型检测单元,配置为检测目标视频的输入图像,获得输入图像中每一个像素的像素类型;噪声概率估计单元,配置为基于每一个像素的像素类型,对输入图像中每一个像素进行蚊式噪声概率估计,获得每一个像素的蚊式噪声概率。 In an embodiment of the present invention, the detecting unit 1 includes: a pixel type detecting unit configured to detect an input image of the target video, obtain a pixel type of each pixel in the input image; and a noise probability estimating unit configured to be based on each A pixel type of a pixel, which performs a mosquito noise probability estimation for each pixel in the input image to obtain a mosquito noise probability per pixel.

在本发明的一种实施例中,像素类型检测单元,包括:梯度检测单元,配置为对输入图像进行梯度检测,获得输入图像的每一个像素的梯度值;边缘检测单元,配置为对输入图像进行局部边缘检测,获得输入图像的每一个像素的边缘信息值;像素类型确定单元,配置为基于梯度值以及边缘信息值,确定输入图像的每一个像素的像素类型。In an embodiment of the present invention, the pixel type detecting unit includes: a gradient detecting unit configured to perform gradient detection on the input image to obtain a gradient value of each pixel of the input image; and an edge detecting unit configured to input the image Performing local edge detection to obtain an edge information value of each pixel of the input image; and a pixel type determining unit configured to determine a pixel type of each pixel of the input image based on the gradient value and the edge information value.

在本发明的一种实施例中,像素类型确定单元,配置为当第i个像素的梯度值大于等于第i个像素的边缘信息值与第一预设值之积时,将第i个像素的像素类型确定为边缘像素,其中,i为正整数;还配置为当第i个像素的梯度值小于第i个像素的边缘信息值与第一预设值之积,且大于等于第i个像素的边缘信息值与第二预设值之积时,将第i个像素的像素类型确定为细节像素,其中,第一预设值不同于第二预设值;还配置为当第i个像素的梯度值小于第i个像素的边缘信息值与第一预设值之积,且小于第i个像素的边缘信息值与第二预设值之积时,将第i个像素的像素类型确定为平坦像素。In an embodiment of the present invention, the pixel type determining unit is configured to: when the gradient value of the ith pixel is greater than or equal to the product of the edge information value of the ith pixel and the first preset value, the ith pixel The pixel type is determined as an edge pixel, where i is a positive integer; and is configured to when the gradient value of the ith pixel is smaller than the product of the edge information value of the ith pixel and the first preset value, and is greater than or equal to the ith When the product of the edge information value of the pixel and the second preset value, the pixel type of the ith pixel is determined as the detail pixel, wherein the first preset value is different from the second preset value; and is configured to be the ith When the gradient value of the pixel is smaller than the product of the edge information value of the ith pixel and the first preset value, and is smaller than the product of the edge information value of the ith pixel and the second preset value, the pixel type of the ith pixel Determined to be a flat pixel.

在本发明的一种实施例中,滤波单元2,配置为基于每一个像素的边缘信息值和输入图像的像素值进行低通双边滤波,获得每一像素所对应的滤波后的像素值。In an embodiment of the present invention, the filtering unit 2 is configured to perform low-pass bilateral filtering based on the edge information value of each pixel and the pixel value of the input image to obtain a filtered pixel value corresponding to each pixel.

在本发明的一种实施例中,噪声概率估计单元,包括:像素类型统计单元,配置为对第i个像素以及M个邻域像素的像素类型进行统计,其中,邻域像素为第i个像素周围的像素;概率计算单元,配置为基于统计结果,确定第i个像素的蚊式噪声概率。In an embodiment of the present invention, the noise probability estimating unit includes: a pixel type statistic unit configured to perform statistics on pixel types of the ith pixel and the M neighboring pixels, wherein the neighboring pixels are the ith a pixel around the pixel; a probability calculation unit configured to determine a mosquito noise probability of the ith pixel based on the statistical result.

在本发明的一种实施例中,概率计算单元,配置为基于第i个像素以及M个像素中像素类型为平坦像素的像素数目占像素类型为细节像素的像素数目与像素类型为边缘像素的像素数目之和的比例,确定第i个像素的蚊式噪声概率。 In an embodiment of the present invention, the probability calculation unit is configured to calculate, according to the ith pixel and the M pixels, the number of pixels whose pixel type is a flat pixel, the number of pixels whose pixel type is a detail pixel, and the pixel type is an edge pixel. The ratio of the sum of the number of pixels determines the mosquito noise probability of the ith pixel.

这里需要指出的是,所述装置所包括的各单元,都可以通过终端中的处理器来实现,当然也可通过逻辑电路实现;在实施的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。另外,以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果,因此不做赘述。对于本发明装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解,为节约篇幅,因此不再赘述。It should be noted that each unit included in the device can be implemented by a processor in the terminal, and can also be implemented by a logic circuit; in the process of implementation, the processor can be a central processing unit (CPU). , microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA). In addition, the description of the above device embodiments is similar to the description of the foregoing method embodiments, and has similar advantageous effects as the method embodiments, and thus will not be described again. For the technical details not disclosed in the embodiment of the present invention, please refer to the description of the method embodiment of the present invention, and the details are not described herein.

需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的视频去噪方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present invention, if the video denoising method described above is implemented in the form of a software function module and sold or used as a standalone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. A computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.

相应地,本发明实施例再提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明实施例中视频去噪方法。Correspondingly, the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform a video denoising method in the embodiment of the present invention.

相应地,本发明实施例再提供一种终端(例如计算机、智能手机、平板电脑),所述终端包括:Correspondingly, the embodiment of the present invention further provides a terminal (such as a computer, a smart phone, a tablet), and the terminal includes:

存储介质,配置为存储计算机可执行指令;a storage medium configured to store computer executable instructions;

处理器,配置为检测目标视频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率; a processor configured to detect an input image of the target video to obtain a mosquito noise probability of each pixel in the input image;

对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值;Performing low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel;

基于所述蚊式噪声概率,对所述滤波后的像素值以及所述输入图像的像素值进行加权处理,获得输出图像的像素值,并输出所述输出图像。And weighting the filtered pixel value and the pixel value of the input image according to the mosquito noise probability, obtaining a pixel value of the output image, and outputting the output image.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功 能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions are provided to implement the work specified in one or more blocks of a flow or a flow and/or a block diagram of the flowchart The steps that can be made.

以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.

工业实用性Industrial applicability

本发明实施例中,检测目标视频的输入图像,获得输入图像中每一个像素的蚊式噪声概率,同时,对输入图像进行低通滤波,获得每一像素所对应的滤波后的像素值;然后,基于蚊式噪声概率,对滤波后的像素值以及输入图像的像素值进行加权处理,获得输出图像的像素值,并输出该输出图像。也就是说,对于目标视频的每一帧图像来说,仅对蚊式噪声概率比较大的像素进行滤波,其它的像素不进行处理,如此,不仅能够去除视频中存在的蚊式噪声,同时也保留了视频中的细节,提升观看者的视觉感受和视频质量。 In the embodiment of the present invention, the input image of the target video is detected, the mosquito noise probability of each pixel in the input image is obtained, and the input image is low-pass filtered to obtain the filtered pixel value corresponding to each pixel; And performing weighting processing on the filtered pixel value and the pixel value of the input image based on the mosquito noise probability, obtaining a pixel value of the output image, and outputting the output image. That is to say, for each frame of the target video, only pixels with a relatively high mosquito noise probability are filtered, and other pixels are not processed, so that not only the mosquito noise existing in the video but also the mosquito noise can be removed. The details in the video are preserved to enhance the viewer's visual experience and video quality.

Claims (16)

一种视频去噪方法,包括:A video denoising method includes: 检测目标视频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率;Detecting an input image of the target video to obtain a mosquito noise probability of each pixel in the input image; 对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值;Performing low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; 基于所述蚊式噪声概率,对所述滤波后的像素值以及所述输入图像的像素值进行加权处理,获得输出图像的像素值,并输出所述输出图像。And weighting the filtered pixel value and the pixel value of the input image according to the mosquito noise probability, obtaining a pixel value of the output image, and outputting the output image. 根据权利要求1所述的方法,其中,所述检测目标视频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率,包括:The method of claim 1, wherein the detecting an input image of the target video to obtain a mosquito noise probability of each pixel in the input image comprises: 检测所述目标视频的输入图像,获得所述输入图像中每一个像素的像素类型;Detecting an input image of the target video to obtain a pixel type of each pixel in the input image; 基于所述每一个像素的像素类型,对所述输入图像中所述每一个像素进行蚊式噪声概率估计,获得所述每一个像素的蚊式噪声概率。A mosquito noise probability estimation is performed on each of the pixels in the input image based on a pixel type of each of the pixels, and a mosquito noise probability of each of the pixels is obtained. 根据权利要求2所述的方法,其中,所述检测目标视频的输入图像,获得所述输入图像中每一个像素的像素类型,包括:The method of claim 2, wherein the detecting an input image of the target video to obtain a pixel type of each pixel in the input image comprises: 对所述输入图像进行梯度检测,获得所述输入图像的每一个像素的梯度值;Performing gradient detection on the input image to obtain a gradient value of each pixel of the input image; 对所述输入图像进行局部边缘检测,获得所述输入图像的每一个像素的边缘信息值;Performing local edge detection on the input image to obtain edge information values of each pixel of the input image; 基于所述梯度值以及所述边缘信息值,确定所述输入图像的每一个像素的像素类型。A pixel type of each pixel of the input image is determined based on the gradient value and the edge information value. 根据权利要求3所述的方法,其中,所述基于所述梯度值以及所述边缘信息值,确定所述输入图像的每一个像素的像素类型,包括:The method of claim 3, wherein the determining a pixel type of each pixel of the input image based on the gradient value and the edge information value comprises: 当第i个像素的所述梯度值大于等于所述第i个像素的所述边缘信息 值与第一预设值之积时,将所述第i个像素的像素类型确定为边缘像素,其中,i为正整数;When the gradient value of the ith pixel is greater than or equal to the edge information of the ith pixel When the value is a product of the first preset value, the pixel type of the ith pixel is determined as an edge pixel, where i is a positive integer; 当所述第i个像素的所述梯度值小于所述第i个像素的所述边缘信息值与第一预设值之积,且大于等于所述第i个像素的所述边缘信息值与第二预设值之积时,将所述第i个像素的像素类型确定为细节像素,其中,所述第一预设值不同于所述第二预设值;When the gradient value of the ith pixel is smaller than the product of the edge information value of the ith pixel and the first preset value, and is greater than or equal to the edge information value of the ith pixel Determining, by the product of the second preset value, the pixel type of the ith pixel as a detail pixel, wherein the first preset value is different from the second preset value; 当所述第i个像素的所述梯度值小于所述第i个像素的所述边缘信息值与所述第一预设值之积,且小于所述第i个像素的所述边缘信息值与所述第二预设值之积时,将所述第i个像素的像素类型确定为平坦像素。When the gradient value of the ith pixel is smaller than a product of the edge information value of the ith pixel and the first preset value, and smaller than the edge information value of the ith pixel When the product of the second preset value is combined, the pixel type of the ith pixel is determined to be a flat pixel. 根据权利要求3所述的方法,其中,所述对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值,包括:The method of claim 3, wherein the low-pass filtering the input image to obtain the filtered pixel value corresponding to each pixel comprises: 基于所述每一个像素的边缘信息值和所述输入图像的像素值进行低通双边滤波,获得所述每一像素所对应的滤波后的像素值。And performing low-pass bilateral filtering on the edge information value of each of the pixels and the pixel value of the input image to obtain a filtered pixel value corresponding to each pixel. 根据权利要求2所述方法,其中,所述基于所述每一个像素的像素类型,对所述输入图像中所述每一个像素进行蚊式噪声概率估计,获得所述每一个像素的蚊式噪声概率,包括:The method according to claim 2, wherein said mosquito noise probability estimation is performed on said each pixel in said input image based on a pixel type of said each pixel, and said mosquito noise of said each pixel is obtained Probability, including: 对第i个像素以及M个邻域像素的像素类型进行统计,其中,所述邻域像素为所述第i个像素周围的像素;Counting pixel types of the ith pixel and the M neighboring pixels, wherein the neighboring pixels are pixels around the ith pixel; 基于统计结果,确定所述第i个像素的蚊式噪声概率。Based on the statistical result, the mosquito noise probability of the ith pixel is determined. 根据权利要求6所述的方法,其中,所述基于统计结果,确定所述第i个像素的蚊式噪声概率,包括:The method according to claim 6, wherein the determining a mosquito noise probability of the ith pixel based on a statistical result comprises: 基于所述第i个像素以及所述M个像素中像素类型为平坦像素的像素数目占像素类型为细节像素的像素数目与像素类型为边缘像素的像素数目之和的比例,确定所述第i个像素的蚊式噪声概率。Determining the i-th based on a ratio of a number of pixels in which the pixel type is a flat pixel in the ith pixel and the M pixels, and a ratio of a pixel number of the pixel type to the detail pixel and a pixel type of the edge type The probability of mosquito noise in pixels. 一种视频去噪装置,包括:检测单元、滤波单元以及输出单元; 其中,A video denoising device includes: a detecting unit, a filtering unit, and an output unit; among them, 所述检测单元,配置为检测目标视频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率;The detecting unit is configured to detect an input image of the target video, and obtain a mosquito noise probability of each pixel in the input image; 所述滤波单元,配置为对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值;The filtering unit is configured to perform low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; 所述输出单元,配置为基于所述蚊式噪声概率,对所述滤波后的像素值以及所述输入图像的像素值进行加权处理,获得输出图像的像素值,并输出所述输出图像。The output unit is configured to perform weighting processing on the filtered pixel value and the pixel value of the input image based on the mosquito noise probability, obtain a pixel value of the output image, and output the output image. 根据权利要求8所述的装置,其中,所述检测单元,包括:The apparatus according to claim 8, wherein the detecting unit comprises: 像素类型检测单元,配置为检测所述目标视频的输入图像,获得所述输入图像中每一个像素的像素类型;a pixel type detecting unit configured to detect an input image of the target video to obtain a pixel type of each pixel in the input image; 噪声概率估计单元,配置为基于所述每一个像素的像素类型,对所述输入图像中所述每一个像素进行蚊式噪声概率估计,获得所述每一个像素的蚊式噪声概率。The noise probability estimating unit is configured to perform a mosquito noise probability estimation on each of the pixels in the input image based on a pixel type of each of the pixels, to obtain a mosquito noise probability of each of the pixels. 根据权利要求9所述的装置,其中,所述像素类型检测单元,包括:The device of claim 9, wherein the pixel type detecting unit comprises: 梯度检测单元,配置为对所述输入图像进行梯度检测,获得所述输入图像的每一个像素的梯度值;a gradient detecting unit configured to perform gradient detection on the input image to obtain a gradient value of each pixel of the input image; 边缘检测单元,配置为对所述输入图像进行局部边缘检测,获得所述输入图像的每一个像素的边缘信息值;An edge detecting unit configured to perform local edge detection on the input image to obtain an edge information value of each pixel of the input image; 像素类型确定单元,配置为基于所述梯度值以及所述边缘信息值,确定所述输入图像的每一个像素的像素类型。A pixel type determining unit is configured to determine a pixel type of each pixel of the input image based on the gradient value and the edge information value. 根据权利要求10所述的装置,其中,所述像素类型确定单元,配置为当第i个像素的所述梯度值大于等于所述第i个像素的所述边缘信息值与第一预设值之积时,将所述第i个像素的像素类型确定为边缘像 素,其中,i为正整数;配置为当所述第i个像素的所述梯度值小于所述第i个像素的所述边缘信息值与第一预设值之积,且大于等于所述第i个像素的所述边缘信息值与第二预设值之积时,将所述第i个像素的像素类型确定为细节像素,其中,所述第一预设值不同于所述第二预设值;还配置为当所述第i个像素的所述梯度值小于所述第i个像素的所述边缘信息值与所述第一预设值之积,且小于所述第i个像素的所述边缘信息值与所述第二预设值之积时,将所述第i个像素的像素类型确定为平坦像素。The apparatus according to claim 10, wherein the pixel type determining unit is configured to: when the gradient value of the ith pixel is greater than or equal to the edge information value of the ith pixel and a first preset value When the product is the same, the pixel type of the ith pixel is determined as the edge image Is a positive integer; configured to: when the gradient value of the ith pixel is smaller than a product of the edge information value of the ith pixel and a first preset value, and greater than or equal to Determining, by the product of the edge information value of the i-th pixel, a pixel type of the i-th pixel as a detail pixel, wherein the first preset value is different from the second a preset value; the method further configured to: when the gradient value of the ith pixel is smaller than a product of the edge information value of the ith pixel and the first preset value, and smaller than the ith When the product of the edge information value of the pixel and the second preset value is used, the pixel type of the ith pixel is determined to be a flat pixel. 根据权利要求11所述的装置,其中,所述滤波单元,配置为基于所述每一个像素的边缘信息值和所述输入图像的像素值进行低通双边滤波,获得所述每一像素所对应的滤波后的像素值。The apparatus according to claim 11, wherein the filtering unit is configured to perform low-pass bilateral filtering based on edge information values of each pixel and pixel values of the input image to obtain corresponding to each pixel The filtered pixel value. 根据权利要求10所述装置,其中,所述噪声概率估计单元,包括:The apparatus according to claim 10, wherein said noise probability estimating unit comprises: 像素类型统计单元,配置为对第i个像素以及M个邻域像素的像素类型进行统计,其中,所述邻域像素为所述第i个像素周围的像素;a pixel type statistic unit configured to count pixel types of the ith pixel and the M neighboring pixels, wherein the neighborhood pixel is a pixel around the ith pixel; 概率计算单元,配置为基于统计结果,确定所述第i个像素的蚊式噪声概率。The probability calculation unit is configured to determine a mosquito noise probability of the ith pixel based on the statistical result. 根据权利要求13所述的装置,其中,所述概率计算单元,配置为基于所述第i个像素以及所述M个像素中像素类型为平坦像素的像素数目占像素类型为细节像素的像素数目与像素类型为边缘像素的像素数目之和的比例,确定所述第i个像素的蚊式噪声概率。The apparatus according to claim 13, wherein the probability calculation unit is configured to determine, according to the ith pixel and the M pixels, a pixel type that is a flat pixel, and a number of pixels whose pixel type is a detail pixel The ratio of the mosquito noise of the ith pixel is determined in proportion to the sum of the number of pixels whose pixel type is an edge pixel. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至7任一项所述的视频去噪方法。A computer storage medium having stored therein computer executable instructions for performing the video denoising method of any one of claims 1 to 7. 一种终端,所述终端包括:A terminal, the terminal comprising: 存储介质,配置为存储计算机可执行指令; a storage medium configured to store computer executable instructions; 处理器,配置为检测目标视频的输入图像,获得所述输入图像中每一个像素的蚊式噪声概率;a processor configured to detect an input image of the target video to obtain a mosquito noise probability of each pixel in the input image; 对所述输入图像进行低通滤波,获得所述每一像素所对应的滤波后的像素值;Performing low-pass filtering on the input image to obtain a filtered pixel value corresponding to each pixel; 基于所述蚊式噪声概率,对所述滤波后的像素值以及所述输入图像的像素值进行加权处理,获得输出图像的像素值,并输出所述输出图像。 And weighting the filtered pixel value and the pixel value of the input image according to the mosquito noise probability, obtaining a pixel value of the output image, and outputting the output image.
PCT/CN2016/097380 2015-09-01 2016-08-30 Video denoising method and device, terminal and storage medium Ceased WO2017036386A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510552028.0 2015-09-01
CN201510552028.0A CN106488079B (en) 2015-09-01 2015-09-01 A kind of method and device of video denoising

Publications (1)

Publication Number Publication Date
WO2017036386A1 true WO2017036386A1 (en) 2017-03-09

Family

ID=58186717

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/097380 Ceased WO2017036386A1 (en) 2015-09-01 2016-08-30 Video denoising method and device, terminal and storage medium

Country Status (2)

Country Link
CN (1) CN106488079B (en)
WO (1) WO2017036386A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763270A (en) * 2021-08-30 2021-12-07 青岛信芯微电子科技股份有限公司 Mosquito noise removing method and electronic device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118297839B (en) * 2024-06-04 2024-08-30 山东华尚电气有限公司 Transformer winding state detection method based on vision

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060245499A1 (en) * 2005-05-02 2006-11-02 Yi-Jen Chiu Detection of artifacts resulting from image signal decompression
US20080152253A1 (en) * 2006-12-20 2008-06-26 Thompson Laurence A Noise cancellation
CN101527840A (en) * 2008-03-06 2009-09-09 瑞昱半导体股份有限公司 Image processing method and device for filtering mosquito noise
CN101536017A (en) * 2006-07-19 2009-09-16 三叉微系统公司 Method and system for reducing mosquito noise in a digital image
US20100239181A1 (en) * 2009-03-17 2010-09-23 Mstar Semiconductor, Inc. Device for Removing Mosquito Noise and Associated Method
US20120002896A1 (en) * 2010-06-30 2012-01-05 Samsung Electronics Co., Ltd. System and method for reducing noise in an image
US9008455B1 (en) * 2006-09-14 2015-04-14 Marvell International Ltd. Adaptive MPEG noise reducer

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7551792B2 (en) * 2003-11-07 2009-06-23 Mitsubishi Electric Research Laboratories, Inc. System and method for reducing ringing artifacts in images
US7548660B2 (en) * 2005-09-30 2009-06-16 Intel Corporation System and method of spatio-temporal edge-preserved filtering techniques to reduce ringing and mosquito noise of digital pictures
CN1761286A (en) * 2005-11-03 2006-04-19 上海交通大学 Method for detecting movement detection by using edge detection, and for removing ripple noise through medium filtering
JP5035029B2 (en) * 2008-03-03 2012-09-26 ソニー株式会社 Signal processing apparatus and method, and program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060245499A1 (en) * 2005-05-02 2006-11-02 Yi-Jen Chiu Detection of artifacts resulting from image signal decompression
CN101536017A (en) * 2006-07-19 2009-09-16 三叉微系统公司 Method and system for reducing mosquito noise in a digital image
US9008455B1 (en) * 2006-09-14 2015-04-14 Marvell International Ltd. Adaptive MPEG noise reducer
US20080152253A1 (en) * 2006-12-20 2008-06-26 Thompson Laurence A Noise cancellation
CN101527840A (en) * 2008-03-06 2009-09-09 瑞昱半导体股份有限公司 Image processing method and device for filtering mosquito noise
US20100239181A1 (en) * 2009-03-17 2010-09-23 Mstar Semiconductor, Inc. Device for Removing Mosquito Noise and Associated Method
US20120002896A1 (en) * 2010-06-30 2012-01-05 Samsung Electronics Co., Ltd. System and method for reducing noise in an image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763270A (en) * 2021-08-30 2021-12-07 青岛信芯微电子科技股份有限公司 Mosquito noise removing method and electronic device
CN113763270B (en) * 2021-08-30 2024-05-07 青岛信芯微电子科技股份有限公司 Mosquito noise removing method and electronic equipment

Also Published As

Publication number Publication date
CN106488079A (en) 2017-03-08
CN106488079B (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN113362246B (en) Image banding artifact removal method, device, equipment and medium
JP5233014B2 (en) Method and apparatus
CN111145114B (en) Image enhancement method and device and computer readable storage medium
TWI519136B (en) A method, a data processing device and a system for adaptive filtering mechanism to remove encoding artifacts in video data
CN104272346B (en) For details enhancing and the image processing method of noise reduction
CN106373095B (en) A kind of image processing method and terminal
CN103139577B (en) The method and apparatus of a kind of depth image filtering method, acquisition depth image filtering threshold
US8244054B2 (en) Method, apparatus and integrated circuit capable of reducing image ringing noise
WO2017101489A1 (en) Method and device for image filtering
CN110796615A (en) Image denoising method and device and storage medium
WO2014070273A1 (en) Recursive conditional means image denoising
KR20110108918A (en) Apparatus and method for estimating enlargement ratio and noise intensity of coded image
CN110992264B (en) Image processing method, processing device, electronic equipment and storage medium
WO2017185772A1 (en) Method and device for video image enhancement and computer storage medium
CN115311161B (en) Image enhancement methods, devices, equipment and storage media based on artificial intelligence
CN105763768B (en) An image processing method, device and system
JPWO2002067589A1 (en) Image processing system, image processing method, and image processing program
CN104919490B (en) For the structured descriptor of image procossing
CN109934789A (en) Image de-noising method, device and electronic equipment
WO2017036386A1 (en) Video denoising method and device, terminal and storage medium
CN103871035A (en) Image denoising method and device
US8811766B2 (en) Perceptual block masking estimation system
TWI511545B (en) Block video noise detection for digital video
JP2008500757A (en) Method and system for enhancing the sharpness of a video signal
JP5807420B2 (en) Image noise reduction apparatus and image noise reduction method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16840815

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16840815

Country of ref document: EP

Kind code of ref document: A1