+

CN105513021A - Image noise reduction device and method - Google Patents

Image noise reduction device and method Download PDF

Info

Publication number
CN105513021A
CN105513021A CN201510864687.8A CN201510864687A CN105513021A CN 105513021 A CN105513021 A CN 105513021A CN 201510864687 A CN201510864687 A CN 201510864687A CN 105513021 A CN105513021 A CN 105513021A
Authority
CN
China
Prior art keywords
image
component
difference
average value
value
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.)
Granted
Application number
CN201510864687.8A
Other languages
Chinese (zh)
Other versions
CN105513021B (en
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201510864687.8A priority Critical patent/CN105513021B/en
Publication of CN105513021A publication Critical patent/CN105513021A/en
Priority to PCT/CN2016/102390 priority patent/WO2017088609A1/en
Application granted granted Critical
Publication of CN105513021B publication Critical patent/CN105513021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20201Motion blur correction

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image noise reduction device and method, and the method comprises the steps: obtaining a plurality of continuous frame images photographed by a terminal, enabling one of the frame images to serve as a sample image, and enabling the other frame images to serve as to-be-compared images; respectively obtaining the brightness values of R, G and B components of all pixels of the sample image, and the brightness values of R, G and B components of all pixels of the to-be-compared images; and obtaining the image after noise reduction according to the mean value of the brightness values of R components of all pixels of the sample image and the to-be-compared images, the mean value of the brightness values of G components of all pixels of the sample image and the to-be-compared images and the mean value of the brightness values of B components of all pixels of the sample image and the to-be-compared images if the difference between the brightness value of the R components of all pixels of the sample image and the to-be-compared images, the difference between the brightness value of the G components of all pixels of the sample image and the to-be-compared images and the difference between the brightness value of the B components of all pixels of the sample image and the to-be-compared images are within a first preset range. The method and device solve problems of large calculation burden and poor effect of noise reduction in a noise reduction process of the image, and also solve a problem that the details of the edge of the image are liable to be lost.

Description

图像去噪装置和方法Image denoising device and method

技术领域technical field

本发明涉及图像领域,尤其涉及一种图像去噪装置和方法。The present invention relates to the image field, in particular to an image denoising device and method.

背景技术Background technique

随着科学技术的发展,智能手机的拍照功能也越来越完善。相对于数码相机来说,智能手机具有体积小便于携带等特性。因此,越来越多的人更热衷于使用智能手机拍照功能来记录生活中的美好瞬间。与此同时,人们对智能手机拍摄的图像质量要求也越来越高。但是如果在亮度不够的场合,智能手机所拍摄出来的图像中经常会带有一些噪声(亮度噪声加色度噪声),并且亮度越低,噪声越大,由于噪声的存在,严重的影响图像的质量。With the development of science and technology, the camera function of smart phones is becoming more and more perfect. Compared with digital cameras, smart phones are small in size and easy to carry. Therefore, more and more people are more keen on using the smart phone camera function to record the beautiful moments in life. At the same time, people's requirements for the image quality captured by smartphones are getting higher and higher. However, if the brightness is not enough, the image captured by the smart phone will often contain some noise (luminance noise plus chroma noise), and the lower the brightness, the greater the noise. Due to the existence of noise, it will seriously affect the quality of the image. quality.

传统去噪算法有:均值,中值,高斯滤波,双边滤波等等。双边滤波能在去除噪声的同时,较好的保留边缘,但是在噪声比较大的情况下滤波效果不明显,并且计算量很大,在滤波窗口增大的情况下,很难做到实时处理;均值,中值,高斯能较好的滤除噪声,但是很容易模糊掉边缘,并且随着滤波窗口的增大,也很难做到实时处理。还有可以通过带运动估计的3D(3Dimensions,三维)去噪,在使用带运动估计的3D去噪的过程中,首先要进行运动估计,然后再进行3D去噪操作,而运动估计需要很大的计算量,并且也不能保证百分之百的准确性。Traditional denoising algorithms include: mean, median, Gaussian filtering, bilateral filtering, etc. Bilateral filtering can better preserve the edge while removing the noise, but the filtering effect is not obvious when the noise is relatively large, and the amount of calculation is large. When the filtering window is enlarged, it is difficult to achieve real-time processing; Mean, median, and Gaussian can better filter out noise, but it is easy to blur the edges, and it is difficult to achieve real-time processing as the filtering window increases. There is also 3D (3Dimensions, three-dimensional) denoising with motion estimation. In the process of using 3D denoising with motion estimation, motion estimation must be performed first, and then 3D denoising operation, and motion estimation requires a lot of , and cannot guarantee 100% accuracy.

发明内容Contents of the invention

本发明的主要目的在于提出一种图像去噪装置和方法,旨在解决现有技术在对图像进行去噪的过程中,计算量大,去噪效果差,容易造成图像边缘细节损失的技术问题。The main purpose of the present invention is to propose an image denoising device and method, aiming to solve the technical problems of large amount of calculation, poor denoising effect, and easy loss of image edge details in the process of image denoising in the prior art .

为实现上述目的,本发明提供的一种图像去噪装置,所述装置包括:In order to achieve the above object, the present invention provides an image denoising device, which includes:

第一获取模块,用于获取终端拍摄的连续的多帧图像,将所述多帧图像中的其中一帧图像作为样本图像,其余的作为待对比图像,其中,所述多帧图像的格式为RGB图像格式;The first acquisition module is configured to acquire continuous multi-frame images taken by the terminal, and use one of the multi-frame images as a sample image, and the rest as images to be compared, wherein the format of the multi-frame images is: RGB image format;

第二获取模块,用于分别获取所述样本图像各个像素点的R、G和B分量的亮度值,和所述待对比图像各个像素点的R、G和B分量的亮度值;The second acquisition module is used to respectively acquire the brightness values of the R, G and B components of each pixel point of the sample image, and the brightness values of the R, G and B components of each pixel point of the image to be compared;

处理模块,用于若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。A processing module, configured to if the difference between the luminance values of the R, G and B components of each pixel of the sample image and the luminance values of the R, G and B components corresponding to each pixel of the image to be compared Within a preset range, the denoised image is obtained according to the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component between the image to be compared and each pixel point of the sample image. Image.

可选地,所述图像去噪装置还包括:Optionally, the image denoising device also includes:

计算模块,用于分别计算所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值,将所述差值作为第一差值;a calculation module, configured to calculate the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared, using said difference as a first difference;

判断模块,用于判断所述第一差值是否都未在第一预设范围内;A judging module, configured to judge whether the first difference is not within the first preset range;

选取模块,用于若所述第一差值都未在所述第一预设范围内,则在所述样本图像各个像素点的预设范围内选取预设个数的像素点;A selecting module, configured to select a preset number of pixels within a preset range of each pixel of the sample image if none of the first difference values is within the first preset range;

所述第二获取模块,还用于获取所述预设个数的像素点的R、G和B分量的亮度值;The second obtaining module is also used to obtain brightness values of R, G and B components of the preset number of pixels;

所述计算模块,还用于分别计算所述预设个数的像素点的R、G和B分量的亮度值与所述样本图像像素点的R、G和B分量的亮度值之间的差值,作为第二差值;The calculation module is also used to separately calculate the difference between the brightness values of the R, G and B components of the preset number of pixels and the brightness values of the R, G and B components of the sample image pixels value, as the second difference;

所述处理模块,还用于若所述第二差值在第二预设范围内,则根据所述在第二预设范围内所对应的所述预设个数的像素点与所述样本图像的各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。The processing module is further configured to: if the second difference is within a second preset range, according to the preset number of pixels corresponding to the second preset range and the sample The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component among each pixel of the image obtain the image after denoising.

可选地,所述判断模块,还用于判断所述第二差值是否在第二预设范围内;Optionally, the judging module is further configured to judge whether the second difference is within a second preset range;

所述图像去噪装置还包括丢弃模块,用于若所述第二差值未在所述第二预设范围内,则丢弃所述未在所述第二预设范围内的第二差值所对应的所述预设个数的像素点。The image denoising device further includes a discarding module, configured to discard the second difference that is not within the second preset range if the second difference is not within the second preset range The corresponding preset number of pixels.

可选地,所述处理模块包括:Optionally, the processing module includes:

获取单元,用于若所述第二差值在所述第二预设范围内,则获取在所述第二预设范围内的第二差值所对应的所述预设个数的像素点的R、G和B分量的亮度值;An acquiring unit, configured to acquire the preset number of pixels corresponding to the second difference within the second preset range if the second difference is within the second preset range Luminance values of the R, G and B components of ;

第一计算单元,用于分别计算所获取的所述预设个数的像素点与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;The first calculation unit is used to separately calculate the average value of R component luminance values, the average value of G component luminance values and the B component luminance between the obtained preset number of pixels and each pixel point of the sample image the average of the values;

第一处理单元,用于将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The first processing unit is configured to recombine the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component into new pixels, so as to obtain a denoised image.

可选地,所述处理模块还包括:Optionally, the processing module also includes:

确定单元,用于若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则确定所述差值在所述第一预设范围内所对应的所述待对比图像各个像素点的R、G和B分量的亮度值;The determination unit is configured to determine if the difference between the luminance values of the R, G and B components of each pixel of the sample image and the luminance values of the R, G and B components corresponding to each pixel of the image to be compared Within a preset range, determine the brightness values of the R, G, and B components of the respective pixels of the image to be compared corresponding to the difference within the first preset range;

第二计算单元,用于分别计算在所述第一预设范围内的所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;The second calculation unit is used to respectively calculate the average value of the R component brightness value, the average value of the G component brightness value and the average value of the G component brightness value between the image to be compared and each pixel point of the sample image within the first preset range. The average value of the brightness value of the B component;

第二处理单元,用于将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The second processing unit is configured to recombine the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component into new pixels, so as to obtain a denoised image.

此外,为实现上述目的,本发明还提供一种图像去噪方法所述方法包括以下步骤:In addition, in order to achieve the above object, the present invention also provides an image denoising method. The method includes the following steps:

获取终端拍摄的连续的多帧图像,将所述多帧图像中的其中一帧图像作为样本图像,其余的作为待对比图像,其中,所述多帧图像的格式为RGB图像格式;Acquiring continuous multi-frame images taken by the terminal, using one of the multi-frame images as a sample image, and the rest as images to be compared, wherein the format of the multi-frame images is an RGB image format;

分别获取所述样本图像各个像素点的R、G和B分量的亮度值,和所述待对比图像各个像素点的R、G和B分量的亮度值;Respectively acquire brightness values of R, G and B components of each pixel point of the sample image, and brightness values of R, G and B components of each pixel point of the image to be compared;

若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。If the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared is within the first preset range , the image after denoising is obtained according to the average value of R component luminance values, the average value of G component luminance values and the average value of B component luminance values between the image to be compared and each pixel point of the sample image.

可选地,所述分别获取所述样本图像各个像素点的R、G和B分量的亮度值,和所述待对比图像各个像素点的R、G和B分量的亮度值的步骤之后,还包括:Optionally, after the step of respectively acquiring the brightness values of the R, G and B components of each pixel point of the sample image, and the brightness values of the R, G and B components of each pixel point of the image to be compared, further include:

分别计算所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值,将所述差值作为第一差值;Calculate the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared, and convert the difference as the first difference;

判断所述第一差值是否都未在第一预设范围内;judging whether the first difference is not within a first preset range;

若所述第一差值都未在所述第一预设范围内,则在所述样本图像各个像素点的预设范围内选取预设个数的像素点;If none of the first difference values is within the first preset range, selecting a preset number of pixels within a preset range of each pixel of the sample image;

获取所述预设个数的像素点的R、G和B分量的亮度值;Obtain the brightness values of the R, G and B components of the preset number of pixels;

分别计算所述预设个数的像素点的R、G和B分量的亮度值与所述样本图像像素点的R、G和B分量的亮度值之间的差值,作为第二差值;Calculate the difference between the luminance values of the R, G, and B components of the preset number of pixels and the luminance values of the R, G, and B components of the sample image pixels, as the second difference;

若所述第二差值在第二预设范围内,则根据所述在第二预设范围内所对应的所述预设个数的像素点与所述样本图像的各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。If the second difference is within the second preset range, according to the R between the preset number of pixels corresponding to the second preset range and each pixel of the sample image The average value of component luminance values, the average value of G component luminance values, and the average value of B component luminance values obtain a denoised image.

可选地,所述分别计算所述预设个数的像素点的R、G和B分量的亮度值与所述样本图像像素点的R、G和B分量的亮度值之间的差值,作为第二差值的步骤之后,还包括:Optionally, calculating the difference between the luminance values of the R, G and B components of the preset number of pixels and the luminance values of the R, G and B components of the sample image pixels, After the second difference step, also include:

判断所述第二差值是否在第二预设范围内;judging whether the second difference is within a second preset range;

若所述第二差值未在所述第二预设范围内,则丢弃所述未在所述第二预设范围内的第二差值所对应的所述预设个数的像素点。If the second difference value is not within the second preset range, discarding the preset number of pixel points corresponding to the second difference value not within the second preset range.

可选地,所述若所述第二差值在第二预设范围内,则根据所述在第二预设范围内所对应的所述预设个数的像素点与所述样本图像的各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像的步骤包括:Optionally, if the second difference is within a second preset range, according to the difference between the preset number of pixels corresponding to the second preset range and the sample image The average value of the R component luminance value, the average value of the G component luminance value and the average value of the B component luminance value between each pixel point obtain a denoised image. The steps include:

若所述第二差值在所述第二预设范围内,则获取在所述第二预设范围内的第二差值所对应的所述预设个数的像素点的R、G和B分量的亮度值;If the second difference is within the second preset range, obtain the R, G and R values of the preset number of pixels corresponding to the second difference within the second preset range The brightness value of the B component;

分别计算所获取的所述预设个数的像素点与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;Calculate the average value of R component brightness values, the average value of G component brightness values, and the average value of B component brightness values between the obtained preset number of pixels and each pixel point of the sample image;

将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component are recombined into new pixels to obtain a denoised image.

可选地,所述若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像的步骤包括:Optionally, if the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared is within Within the first preset range, denoising is obtained according to the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component between the image to be compared and each pixel point of the sample image The steps after the image include:

若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则确定所述差值在所述第一预设范围内所对应的所述待对比图像各个像素点的R、G和B分量的亮度值;If the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared is within the first preset range , then determine the luminance values of the R, G and B components of the respective pixels of the image to be compared corresponding to the difference within the first preset range;

分别计算在所述第一预设范围内的所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;respectively calculating the average value of R component brightness values, the average value of G component brightness values and the average value of B component brightness values between the image to be compared and each pixel point of the sample image within the first preset range ;

将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component are recombined into new pixels to obtain a denoised image.

本发明通过分别获取终端中的样本图像的R、G和B分量的亮度值,待对比图像各个像素点的R、G和B分量的亮度值,当所述样本图像的R、G和B分量的亮度值与所述待对比图像各个像素点的R、G和B分量的亮度值之间对应的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。通过了分别对图像的R、G和B分量的亮度值进行去噪,再将去噪后的R、G和B分量的亮度值重新组合成新的像素点,将所述新的像素点作为去噪后图像的像素点的方法得到去噪后的图像,避免了在对图像去噪过程中计算量大,去噪效果差,容易造成图像边缘细节损失的问题。The present invention separately obtains the brightness values of the R, G and B components of the sample image in the terminal, and the brightness values of the R, G and B components of each pixel of the image to be compared, when the R, G and B components of the sample image If the corresponding difference between the luminance value of the image to be compared and the luminance values of the R, G, and B components of each pixel of the image to be compared is within the first preset range, then according to the image to be compared and each pixel of the sample image The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component among the points obtain the image after denoising. By denoising the luminance values of the R, G and B components of the image respectively, and then recombining the luminance values of the denoised R, G and B components into new pixels, and using the new pixels as The pixel of the denoised image is used to obtain the denoised image, which avoids the problem of large amount of calculation in the process of image denoising, poor denoising effect, and easy loss of image edge details.

附图说明Description of drawings

图1为实现本发明各个实施例一个可选的移动终端的硬件结构示意图;FIG. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention;

图2为图1中相机的电气结构框图;Fig. 2 is the electrical structural block diagram of camera in Fig. 1;

图3为本发明图像去噪装置第一实施例的功能模块示意图;3 is a schematic diagram of functional modules of the first embodiment of the image denoising device of the present invention;

图4为本发明图像去噪装置第二实施例的功能模块示意图;4 is a schematic diagram of functional modules of the second embodiment of the image denoising device of the present invention;

图5为本发明图像去噪方法第一实施例的流程示意图;5 is a schematic flow chart of the first embodiment of the image denoising method of the present invention;

图6为本发明图像去噪方法第二实施例的流程示意图;FIG. 6 is a schematic flowchart of a second embodiment of the image denoising method of the present invention;

图7为本发明实施例中终端所拍摄的未经过去噪处理所得图像的一种示意图;FIG. 7 is a schematic diagram of an image captured by a terminal without denoising processing in an embodiment of the present invention;

图8为本发明实施例中终端所拍摄的经过去噪处理所得图像的一种示意图;FIG. 8 is a schematic diagram of an image captured by a terminal in an embodiment of the present invention after denoising processing;

图9为本发明实施例中终端在样本图像总某个像素点的预设范围内选取预设个数的像素点的一种示意图;9 is a schematic diagram of a terminal selecting a preset number of pixels within a preset range of a certain pixel in a sample image in an embodiment of the present invention;

图10为本发明实施例中样本图像的某个像素点的R分量的亮度值和预设个数像素点的R分量的亮度值的一种示意图。10 is a schematic diagram of the luminance value of the R component of a certain pixel of the sample image and the luminance values of the R component of a preset number of pixels in the embodiment of the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

具体实施方式detailed description

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

现在将参考附图描述实现本发明各个实施例的移动终端。在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本发明的说明,其本身并没有特定的意义。因此,“模块”与“部件”可以混合地使用。A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, use of suffixes such as 'module', 'part' or 'unit' for denoting elements is only for facilitating description of the present invention and has no specific meaning by itself. Therefore, "module" and "component" may be mixedly used.

移动终端可以以各种形式来实施。例如,本发明中描述的终端可以包括诸如移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。下面,假设终端是移动终端。然而,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本发明的实施方式的构造也能够应用于固定类型的终端。Mobile terminals may be implemented in various forms. For example, terminals described in the present invention may include devices such as mobile phones, smart phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), navigation devices, etc. mobile terminals and fixed terminals such as digital TVs, desktop computers, etc. In the following, it is assumed that the terminal is a mobile terminal. However, those skilled in the art will understand that the configuration according to the embodiments of the present invention can also be applied to stationary type terminals, in addition to elements specifically used for mobile purposes.

图1为实现本发明各个实施例一个可选的移动终端的硬件结构示意图。FIG. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.

移动终端100可以包括A/V(音频/视频)输入单元120、用户输入单元130、感测单元140、输出单元150、存储器160、接口单元170、控制器180和电源单元190等等。图1示出了具有各种组件的移动终端,但是应理解的是,并不要求实施所有示出的组件。可以替代地实施更多或更少的组件。将在下面详细描述移动终端的元件。The mobile terminal 100 may include an A/V (audio/video) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, a power supply unit 190, and the like. FIG. 1 shows a mobile terminal having various components, but it is understood that implementing all shown components is not a requirement. Greater or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.

A/V输入单元120用于接收音频或视频信号。A/V输入单元120可以包括相机121和麦克风122,相机121对在视频捕获模式或图像捕获模式中由图像捕获装置获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元151上。经相机121处理后的图像帧可以存储在存储器160(或其它存储介质)中,可以根据移动终端的构造提供两个或更多相机121。麦克风122可以在电话通话模式、记录模式、语音识别模式等等运行模式中经由麦克风接收声音(音频数据),并且能够将这样的声音处理为音频数据。处理后的音频(语音)数据可以在电话通话模式的情况下转换为可经由移动通信模块112发送到移动通信基站的格式输出。麦克风122可以实施各种类型的噪声消除(或抑制)算法以消除(或抑制)在接收和发送音频信号的过程中产生的噪声或者干扰。The A/V input unit 120 is used to receive audio or video signals. The A/V input unit 120 may include a camera 121 that processes image data of still pictures or videos obtained by an image capture device in a video capture mode or image capture mode, and a microphone 122 . The processed image frames may be displayed on the display unit 151 . The image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium), and two or more cameras 121 may be provided according to the configuration of the mobile terminal. The microphone 122 may receive sound (audio data) via the microphone in a phone call mode, recording mode, voice recognition mode, and the like operating modes, and can process such sound as audio data. The processed audio (voice) data may be converted into a format transmittable to a mobile communication base station via the mobile communication module 112 for output in case of a phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the process of receiving and transmitting audio signals.

用户输入单元130可以根据用户输入的命令生成键输入数据以控制移动终端的各种操作。用户输入单元130允许用户输入各种类型的信息,并且可以包括键盘、锅仔片、触摸板(例如,检测由于被接触而导致的电阻、压力、电容等等的变化的触敏组件)、滚轮、摇杆等等。特别地,当触摸板以层的形式叠加在显示单元151上时,可以形成触摸屏。The user input unit 130 may generate key input data according to commands input by the user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, domes, touch pad (e.g., a touch-sensitive component that detects changes in resistance, pressure, capacitance, etc. due to being touched), a scroll wheel , joystick, etc. In particular, when a touch pad is superimposed on the display unit 151 in a layer form, a touch screen may be formed.

感测单元140检测移动终端100的当前状态,(例如,移动终端100的打开或关闭状态)、移动终端100的位置、用户对于移动终端100的接触(即,触摸输入)的有无、移动终端100的取向、移动终端100的加速或将速移动和方向等等,并且生成用于控制移动终端100的操作的命令或信号。例如,当移动终端100实施为滑动型移动电话时,感测单元140可以感测该滑动型电话是打开还是关闭。另外,感测单元140能够检测电源单元190是否提供电力或者接口单元170是否与外部装置耦接。The sensing unit 140 detects the current state of the mobile terminal 100, (for example, the open or closed state of the mobile terminal 100), the position of the mobile terminal 100, the presence or absence of the user's contact with the mobile terminal 100 (that is, a touch input), the mobile terminal 100, the acceleration or movement and direction of the mobile terminal 100, etc., and generate commands or signals for controlling the operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide type mobile phone, the sensing unit 140 may sense whether the slide type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device.

接口单元170用作至少一个外部装置与移动终端100连接可以通过的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。识别模块可以是存储用于验证用户使用移动终端100的各种信息并且可以包括用户识别模块(UIM)、客户识别模块(SIM)、通用客户识别模块(USIM)等等。另外,具有识别模块的装置(下面称为“识别装置”)可以采取智能卡的形式,因此,识别装置可以经由端口或其它连接装置与移动终端100连接。接口单元170可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端100内的一个或多个元件或者可以用于在移动终端和外部装置之间传输数据。The interface unit 170 serves as an interface through which at least one external device can be connected with the mobile terminal 100 . For example, an external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM) and the like. In addition, a device having an identification module (hereinafter referred to as "identification device") may take the form of a smart card, and thus, the identification device may be connected to the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (eg, data information, power, etc.) transfer data between.

另外,当移动终端100与外部底座连接时,接口单元170可以用作允许通过其将电力从底座提供到移动终端100的路径或者可以用作允许从底座输入的各种命令信号通过其传输到移动终端的路径。从底座输入的各种命令信号或电力可以用作用于识别移动终端是否准确地安装在底座上的信号。输出单元150被构造为以视觉、音频和/或触觉方式提供输出信号(例如,音频信号、视频信号、警报信号、振动信号等等)。输出单元150可以包括显示单元151。In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may be used as a path allowing various command signals input from the cradle to be transmitted to the mobile terminal 100 therethrough. The path to the terminal. Various command signals or power input from the base may be used as a signal for identifying whether the mobile terminal is accurately mounted on the base. The output unit 150 is configured to provide output signals (eg, audio signals, video signals, alarm signals, vibration signals, etc.) in a visual, audio and/or tactile manner. The output unit 150 may include a display unit 151 .

显示单元151可以显示在移动终端100中处理的信息。例如,当移动终端100处于电话通话模式时,显示单元151可以显示与通话或其它通信(例如,文本消息收发、多媒体文件下载等等)相关的用户界面(UI)或图形用户界面(GUI)。当移动终端100处于视频通话模式或者图像捕获模式时,显示单元151可以显示捕获的图像和/或接收的图像、示出视频或图像以及相关功能的UI或GUI等等。The display unit 151 can display information processed in the mobile terminal 100 . For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 may display a user interface (UI) or a graphical user interface (GUI) related to calls or other communications (eg, text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an image capture mode, the display unit 151 may display captured images and/or received images, a UI or GUI showing videos or images and related functions, and the like.

同时,当显示单元151和触摸板以层的形式彼此叠加以形成触摸屏时,显示单元151可以用作输入装置和输出装置。显示单元151可以包括液晶显示器(LCD)、薄膜晶体管LCD(TFT-LCD)、有机发光二极管(OLED)显示器、柔性显示器、三维(3D)显示器等等中的至少一种。这些显示器中的一些可以被构造为透明状以允许用户从外部观看,这可以称为透明显示器,典型的透明显示器可以例如为TOLED(透明有机发光二极管)显示器等等。根据特定想要的实施方式,移动终端100可以包括两个或更多显示单元(或其它显示装置),例如,移动终端可以包括外部显示单元(未示出)和内部显示单元(未示出)。触摸屏可用于检测触摸输入压力以及触摸输入位置和触摸输入面积。Meanwhile, when the display unit 151 and the touch pad are superimposed on each other in a layer to form a touch screen, the display unit 151 may serve as an input device and an output device. The display unit 151 may include at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays can be configured to be transparent to allow a user to view from the outside, which can be called a transparent display, and a typical transparent display can be, for example, a TOLED (Transparent Organic Light Emitting Diode) display or the like. Depending on the particular desired implementation, the mobile terminal 100 may include two or more display units (or other display means), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown). . The touch screen can be used to detect touch input pressure as well as touch input position and touch input area.

存储器160可以存储由控制器180执行的处理和控制操作的软件程序等等,或者可以暂时地存储己经输出或将要输出的数据(例如,电话簿、消息、静态图像、视频等等)。而且,存储器160可以存储关于当触摸施加到触摸屏时输出的各种方式的振动和音频信号的数据。The memory 160 may store software programs and the like for processing and controlling operations executed by the controller 180, or may temporarily store data that has been output or will be output (eg, phonebook, messages, still images, videos, etc.). Also, the memory 160 may store data on various patterns of vibration and audio signals output when a touch is applied to the touch screen.

存储器160可以包括至少一种类型的存储介质,所述存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。而且,移动终端100可以与通过网络连接执行存储器160的存储功能的网络存储装置协作。Memory 160 may include at least one type of storage medium including flash memory, hard disk, multimedia card, card-type memory (eg, SD or DX memory, etc.), random access memory (RAM), static random access memory ( SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. Also, the mobile terminal 100 may cooperate with a web storage device performing a storage function of the memory 160 through a network connection.

控制器180通常控制移动终端的总体操作。例如,控制器180执行与语音通话、数据通信、视频通话等等相关的控制和处理。另外,控制器180可以包括用于再现(或回放)多媒体数据的多媒体模块181,多媒体模块181可以构造在控制器180内,或者可以构造为与控制器180分离。控制器180可以执行模式识别处理,以将在触摸屏上执行的手写输入或者图片绘制输入识别为字符或图像。The controller 180 generally controls the overall operations of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, and the multimedia module 181 may be constructed within the controller 180 or may be constructed separately from the controller 180 . The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.

电源单元190在控制器180的控制下接收外部电力或内部电力并且提供操作各元件和组件所需的适当的电力。The power supply unit 190 receives external power or internal power and supplies appropriate power required to operate various elements and components under the control of the controller 180 .

这里描述的各种实施方式可以以使用例如计算机软件、硬件或其任何组合的计算机可读介质来实施。对于硬件实施,这里描述的实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行这里描述的功能的电子单元中的至少一种来实施,在一些情况下,这样的实施方式可以在控制器180中实施。对于软件实施,诸如过程或功能的实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储器160中并且由控制器180执行。Various implementations described herein can be implemented on a computer readable medium using, for example, computer software, hardware, or any combination thereof. For hardware implementation, the embodiments described herein can be implemented by using Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays ( FPGA), processors, controllers, microcontrollers, microprocessors, electronic units designed to perform the functions described herein, in some cases, such implementations may be implemented in the controller 180 implemented in. For software implementation, an embodiment such as a procedure or a function may be implemented with a separate software module that allows at least one function or operation to be performed. The software codes may be implemented by a software application (or program) written in any suitable programming language, which may be stored in memory 160 and executed by controller 180 .

至此,己经按照其功能描述了移动终端。下面,为了简要起见,将描述诸如折叠型、直板型、摆动型、滑动型移动终端等等的各种类型的移动终端中的滑动型移动终端作为示例。因此,本发明能够应用于任何类型的移动终端,并且不限于滑动型移动终端。So far, the mobile terminal has been described in terms of its functions. Hereinafter, for the sake of brevity, a slide-type mobile terminal among various types of mobile terminals such as folder-type, bar-type, swing-type, slide-type mobile terminals, etc. will be described as an example. Therefore, the present invention can be applied to any type of mobile terminal and is not limited to a slide type mobile terminal.

参照图2,图2为图1中相机的电气结构框图。Referring to FIG. 2 , FIG. 2 is a block diagram of the electrical structure of the camera in FIG. 1 .

摄影镜头1211由用于形成被摄体像的多个光学镜头构成,为单焦点镜头或变焦镜头。摄影镜头1211在镜头驱动器1221的控制下能够在光轴方向上移动,镜头驱动器1221根据来自镜头驱动控制电路1222的控制信号,控制摄影镜头1211的焦点位置,在变焦镜头的情况下,也可控制焦点距离。镜头驱动控制电路1222按照来自微型计算机1217的控制命令进行镜头驱动器1221的驱动控制。The photographing lens 1211 is composed of a plurality of optical lenses for forming a subject image, and is a single focus lens or a zoom lens. The photographic lens 1211 can move in the optical axis direction under the control of the lens driver 1221. The lens driver 1221 controls the focus position of the photographic lens 1211 according to the control signal from the lens drive control circuit 1222. In the case of a zoom lens, it can also control focus distance. The lens drive control circuit 1222 performs drive control of the lens driver 1221 in accordance with control commands from the microcomputer 1217 .

在摄影镜头1211的光轴上、由摄影镜头1211形成的被摄体像的位置附近配置有摄像元件1212。摄像元件1212用于对被摄体像摄像并取得摄像图像数据。在摄像元件1212上二维且呈矩阵状配置有构成各像素的光电二极管。各光电二极管产生与受光量对应的光电转换电流,该光电转换电流由与各光电二极管连接的电容器进行电荷蓄积。各像素的前表面配置有拜耳排列的RGB滤色器。An imaging element 1212 is arranged on the optical axis of the taking lens 1211 near the position of the subject image formed by the taking lens 1211 . The imaging element 1212 is used to capture a subject image and obtain captured image data. On the imaging element 1212, photodiodes constituting each pixel are arranged two-dimensionally in a matrix. Each photodiode generates a photoelectric conversion current corresponding to the amount of received light, and the photoelectric conversion current is charged by a capacitor connected to each photodiode. RGB color filters in a Bayer arrangement are arranged on the front surface of each pixel.

摄像元件1212与摄像电路1213连接,该摄像电路1213在摄像元件1212中进行电荷蓄积控制和图像信号读出控制,对该读出的图像信号(模拟图像信号)降低重置噪声后进行波形整形,进而进行增益提高等以成为适当的信号电平。摄像电路1213与A/D转换器1214连接,该A/D转换器1214对模拟图像信号进行模数转换,向总线1227输出数字图像信号(以下称之为图像数据)。The imaging element 1212 is connected to an imaging circuit 1213. The imaging circuit 1213 performs charge accumulation control and image signal readout control in the imaging element 1212, and performs waveform shaping on the readout image signal (analog image signal) after reducing reset noise. Furthermore, a gain increase etc. are performed so that an appropriate signal level may be obtained. The imaging circuit 1213 is connected to an A/D converter 1214 that performs analog-to-digital conversion of an analog image signal and outputs a digital image signal (hereinafter referred to as image data) to a bus 1227 .

总线1227是用于传送在相机的内部读出或生成的各种数据的传送路径。在总线1227连接着上述A/D转换器1214,此外还连接着图像处理器1215、JPEG处理器1216、微型计算机1217、SDRAM(SynchronousDynamicrandomaccessmemory,同步动态随机存取内存)1218、存储器接口(以下称之为存储器I/F)1219、LCD(LiquidCrystalDisplay,液晶显示器)驱动器1220。The bus 1227 is a transmission path for transmitting various data read or generated inside the camera. The above-mentioned A/D converter 1214 is connected to the bus 1227, and an image processor 1215, a JPEG processor 1216, a microcomputer 1217, SDRAM (Synchronous Dynamic Random Access Memory, Synchronous Dynamic Random Access Memory) 1218, a memory interface (hereinafter referred to as These are memory I/F) 1219 and LCD (Liquid Crystal Display, liquid crystal display) driver 1220 .

图像处理器1215对基于摄像元件1212的输出的图像数据进行OB相减处理、白平衡调整、颜色矩阵运算、伽马转换、色差信号处理、噪声去除处理、同时化处理、边缘处理等各种图像处理。JPEG处理器1216在将图像数据记录于记录介质1225时,按照JPEG压缩方式压缩从SDRAM1218读出的图像数据。此外,JPEG处理器1216为了进行图像再现显示而进行JPEG图像数据的解压缩。进行解压缩时,读出记录在记录介质1225中的文件,在JPEG处理器1216中实施了解压缩处理后,将解压缩的图像数据暂时存储于SDRAM1218中并在LCD1226上进行显示。另外,在本实施方式中,作为图像压缩解压缩方式采用的是JPEG方式,然而压缩解压缩方式不限于此,当然可以采用MPEG、TIFF、H.264等其他的压缩解压缩方式。The image processor 1215 performs various image processing such as OB subtraction processing, white balance adjustment, color matrix calculation, gamma conversion, color difference signal processing, noise removal processing, synchronization processing, and edge processing on the image data based on the output of the imaging element 1212. deal with. The JPEG processor 1216 compresses the image data read from the SDRAM 1218 according to the JPEG compression method when recording the image data on the recording medium 1225 . Also, the JPEG processor 1216 decompresses JPEG image data for image reproduction and display. When performing decompression, the file recorded on the storage medium 1225 is read out, and after decompression processing is performed in the JPEG processor 1216 , the decompressed image data is temporarily stored in the SDRAM 1218 and displayed on the LCD 1226 . In addition, in this embodiment, the JPEG method is adopted as the image compression/decompression method, but the compression/decompression method is not limited to this, and of course other compression/decompression methods such as MPEG, TIFF, H.264, etc. can be used.

微型计算机1217发挥作为该相机整体的控制部的功能,统一控制相机的各种处理序列。微型计算机1217连接着操作单元1223和闪存1224。The microcomputer 1217 functions as a control unit for the entire camera, and collectively controls various processing sequences of the camera. The microcomputer 1217 is connected to an operation unit 1223 and a flash memory 1224 .

操作单元1223包括但不限于实体按键或者虚拟按键,该实体或虚拟按键可以为电源按钮、拍照键、编辑按键、动态图像按钮、再现按钮、菜单按钮、十字键、OK按钮、删除按钮、放大按钮等各种输入按钮和各种输入键等操作控件,检测这些操作控件的操作状态,。The operation unit 1223 includes but is not limited to physical keys or virtual keys, the physical or virtual keys can be a power button, a camera key, an edit key, a dynamic image button, a playback button, a menu button, a cross key, an OK button, a delete button, and an enlargement button Various input buttons and various input keys and other operation controls are used to detect the operation status of these operation controls.

将检测结果向微型计算机1217输出。此外,在作为显示器的LCD1226的前表面设有触摸面板,检测用户的触摸位置,将该触摸位置向微型计算机1217输出。微型计算机1217根据来自操作单元1223的操作位置的检测结果,执行与用户的操作对应的各种处理序列。The detection result is output to the microcomputer 1217 . Also, a touch panel is provided on the front surface of LCD 1226 as a display, detects a user's touch position, and outputs the touch position to microcomputer 1217 . The microcomputer 1217 executes various processing sequences corresponding to the user's operation based on the detection result of the operation position from the operation unit 1223 .

闪存1224存储用于执行微型计算机1217的各种处理序列的程序。微型计算机1217根据该程序进行相机整体的控制。此外,闪存1224存储相机的各种调整值,微型计算机1217读出调整值,按照该调整值进行相机的控制。The flash memory 1224 stores programs for executing various processing sequences of the microcomputer 1217 . The microcomputer 1217 controls the entire camera according to the program. In addition, the flash memory 1224 stores various adjustment values of the camera, and the microcomputer 1217 reads out the adjustment values, and controls the camera according to the adjustment values.

SDRAM1218是用于对图像数据等进行暂时存储的可电改写的易失性存储器。该SDRAM1218暂时存储从A/D转换器1214输出的图像数据和在图像处理器1215、JPEG处理器1216等中进行了处理后的图像数据。The SDRAM 1218 is an electrically rewritable volatile memory for temporarily storing image data and the like. The SDRAM 1218 temporarily stores image data output from the A/D converter 1214 and image data processed by the image processor 1215, the JPEG processor 1216, and the like.

存储器接口1219与记录介质1225连接,进行将图像数据和附加在图像数据中的文件头等数据写入记录介质1225和从记录介质1225中读出的控制。记录介质1225例如为能够在相机主体上自由拆装的存储器卡等记录介质,然而不限于此,也可以是内置在相机主体中的硬盘等。The memory interface 1219 is connected to a recording medium 1225 , and performs control of writing image data and data such as a file header attached to the image data to and from the recording medium 1225 . The recording medium 1225 is, for example, a recording medium such as a memory card detachable from the camera body, but is not limited thereto, and may be a hard disk built in the camera body or the like.

LCD驱动器1210与LCD1226连接,将由图像处理器1215处理后的图像数据存储于SDRAM1218,需要显示时,读取SDRAM1218存储的图像数据并在LCD1226上显示,或者,JPEG处理器1216压缩过的图像数据存储于SDRAM1218,在需要显示时,JPEG处理器1216读取SDRAM1218的压缩过的图像数据,再进行解压缩,将解压缩后的图像数据通过LCD1226进行显示。LCD driver 1210 is connected to LCD 1226, stores the image data processed by image processor 1215 in SDRAM 1218, reads the image data stored in SDRAM 1218 and displays them on LCD 1226 when it needs to be displayed, or stores the image data compressed by JPEG processor 1216 In SDRAM 1218 , when display is required, JPEG processor 1216 reads the compressed image data in SDRAM 1218 , decompresses it, and displays the decompressed image data through LCD 1226 .

LCD1226配置在相机主体的背面进行图像显示。该LCD1226LCD),然而不限于此,也可以采用有机EL等各种显示面板(LCD1226),然而不限于此,也可以采用有机EL等各种显示面板。LCD1226 is arranged on the back of the camera body for image display. The LCD1226LCD) is not limited thereto, and various display panels such as organic EL (LCD1226) may be used, but not limited thereto, and various display panels such as organic EL may be used.

基于上述移动终端硬件结构以及相机的电气结构示意图,提出本发明方法各个实施例。Based on the above-mentioned schematic diagram of the hardware structure of the mobile terminal and the electrical structure of the camera, various embodiments of the method of the present invention are proposed.

本发明提供一种图像去噪装置。The invention provides an image denoising device.

参照图3,图3为本发明图像去噪装置第一实施例的功能模块示意图。Referring to FIG. 3 , FIG. 3 is a schematic diagram of functional modules of a first embodiment of an image denoising device according to the present invention.

在本实施例中,所述图像去噪装置包括:In this embodiment, the image denoising device includes:

第一获取模块10,用于获取终端拍摄的连续的多帧图像,将所述多帧图像中的其中一帧图像作为样本图像,其余的作为待对比图像,其中,所述多帧图像的格式为RGB图像格式;The first acquisition module 10 is configured to acquire continuous multi-frame images taken by the terminal, and use one of the multi-frame images as a sample image, and the rest as images to be compared, wherein the format of the multi-frame images For RGB image format;

当终端在使用内置或者外置的摄像头拍摄时,所述终端获取在拍摄过程中连续的多帧图像,将所述多帧图像中的其中一帧图像作为样本图像,将除所述样本图像之外的图像作为待对比图像,所述样本图像和所述待对比图像为RGB图像格式。所述终端包括但不限于智能手机,个人电脑。在本实施例中,所述终端为智能手机,如所述智能手机在其内置摄像头进行拍摄图像时,获取连续的四帧图像,将所获取的第一帧图像作为样本图像,将所获取的第二、第三和第四帧图像作为待对比图像。When the terminal is shooting with a built-in or external camera, the terminal acquires continuous multiple frames of images during the shooting process, and uses one of the multiple frames of images as a sample image, and uses the The image outside is used as the image to be compared, and the sample image and the image to be compared are in RGB image format. The terminals include but are not limited to smart phones and personal computers. In this embodiment, the terminal is a smart phone. For example, when the smart phone captures images with its built-in camera, it acquires four consecutive frames of images, uses the first frame of images acquired as a sample image, and uses the acquired first frame of images as a sample image. The second, third and fourth frames of images are used as images to be compared.

第二获取模块20,用于分别获取所述样本图像各个像素点的R、G和B分量的亮度值,和所述待对比图像各个像素点的R、G和B分量的亮度值;The second acquiring module 20 is configured to respectively acquire brightness values of R, G and B components of each pixel point of the sample image, and brightness values of R, G and B components of each pixel point of the image to be compared;

当所述终端获取得到所述样本图像和所述待对比图像时,解析所述样本图像和所述待对比图像,获取所述样本图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值,和获取所述待对比图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值。如当所述智能手机获取得到一帧所述样本图像和三帧所述待对比图像时,解析所述样本图像,得到所述样本图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值;并分别解析三帧所述待对比图像,得到第一帧所述待对比图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值;得到第二帧所述待对比图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值;得到第三帧所述待对比图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值。When the terminal acquires the sample image and the image to be compared, analyze the sample image and the image to be compared, and obtain the brightness value of the R component and the brightness of the G component of each pixel in the sample image value and the brightness value of the B component, and obtain the brightness value of the R component, the brightness value of the G component, and the brightness value of the B component of each pixel in the image to be compared. For example, when the smart phone acquires one frame of the sample image and three frames of the image to be compared, analyze the sample image to obtain the brightness value of the R component and the brightness of the G component of each pixel in the sample image value and the brightness value of the B component; and respectively analyze the three frames of the image to be compared to obtain the brightness value of the R component, the brightness value of the G component and the brightness value of the B component of each pixel in the image to be compared in the first frame Obtain the luminance value of the R component, the luminance value of the G component and the luminance value of the B component of each pixel in the image to be compared in the second frame; obtain the R component of each pixel in the image to be compared in the third frame A brightness value, a brightness value of the G component, and a brightness value of the B component.

处理模块30,用于若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。The processing module 30 is configured to if the difference between the luminance values of the R, G and B components of each pixel of the sample image and the luminance values of the R, G and B components corresponding to each pixel of the image to be compared is within Within the first preset range, denoising is obtained according to the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component between the image to be compared and each pixel point of the sample image after the image.

进一步地,所述处理模块30包括:Further, the processing module 30 includes:

确定单元,用于若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则确定所述差值在所述第一预设范围内所对应的所述待对比图像各个像素点的R、G和B分量的亮度值;The determination unit is configured to determine if the difference between the luminance values of the R, G and B components of each pixel of the sample image and the luminance values of the R, G and B components corresponding to each pixel of the image to be compared Within a preset range, determine the brightness values of the R, G, and B components of the respective pixels of the image to be compared corresponding to the difference within the first preset range;

第二计算单元,用于分别计算在所述第一预设范围内的所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;The second calculation unit is used to respectively calculate the average value of the R component brightness value, the average value of the G component brightness value and the average value of the G component brightness value between the image to be compared and each pixel point of the sample image within the first preset range. The average value of the brightness value of the B component;

第二处理单元,用于将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The second processing unit is configured to recombine the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component into new pixels, so as to obtain a denoised image.

当所述终端获得所述样本图像和所述待对比图像各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值时,将所述样本图像各个像素点的R分量的亮度值对应与所述待对比图像各个像素点的R分量的亮度值进行对比,得到所述样本图像各个像素点的R分量的亮度值对应与所述待对比图像各个像素点的R分量的亮度值之间的差值;将所述样本图像各个像素点的G分量的亮度值对应与所述待对比图像各个像素点的G分量的亮度值进行对比,得到所述样本图像各个像素点的G分量的亮度值对应与所述待对比图像各个像素点的G分量的亮度值之间的差值;将所述样本图像各个像素点的B分量的亮度值对应与所述待对比图像各个像素点的B分量的亮度值进行对比,得到所述样本图像各个像素点的B分量的亮度值对应与所述待对比图像各个像素点的B分量的亮度值之间的差值。所述终端判断所述样本图像各个像素点与所述待对比图像各个像素点之间的R分量亮度值的差值、G分量亮度值的差值和B分量亮度值的差值是否在第一预设范围内。当所述终端判定所述样本图像各个像素点与所述待对比图像各个像素点之间的R分量亮度值的差值、G分量亮度值的差值和B分量亮度值的差值在所述第一预设范围内时,确定在所述第一预设范围内R分量亮度值的差值所对应的所述待对比图像的R分量的亮度值,记为R0分量的亮度值;确定在所述第一预设范围内G分量亮度值的差值所对应的所述待对比图像的G分量的亮度值,记为G0分量的亮度值;确定在所述第一预设范围内B分量亮度值的差值所对应的所述待对比图像的B分量的亮度值,记为B0分量的亮度值。所述终端计算所述样本图像的R分量的亮度值与所述R0分量亮度值的平均值,得到R分量亮度值的平均值;计算所述样本图像的G分量的亮度值与所述G0分量亮度值的平均值,得到G分量亮度值的平均值;计算所述样本图像的B分量的亮度值与所述B0分量亮度值的平均值,得到B分量亮度值的平均值。所述终端将各个像素点的R分量亮度值的平均值作为去噪后图像的R分量图像、G分量亮度值的平均值作为去噪后图像的G分量图像、B分量亮度值的平均值作为去噪后图像的B分量图像,所述终端将所述去噪后图像的R分量图像、G分量图像和B分量图像重新组合成新的图像,所述重新组合的新的图像即为去噪后的图像。所述终端还可以将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,将所述新的像素点作为新的图像的像素点,得到所述新的图像,所述新的图像即为去噪后的图像。进一步地,所述终端将所述去噪后的图像输出显示在其屏幕中。其中,所述第一预设范围根据当前拍摄时所在环境噪声的大小而定,如可设置为-10至10,或者设置为-20至20。When the terminal obtains the brightness value of the R component, the brightness value of the G component, and the brightness value of the B component of each pixel point of the sample image and the image to be compared, the R component of each pixel point of the sample image The brightness value is compared with the brightness value of the R component of each pixel point of the image to be compared, and the brightness value of the R component of each pixel point of the sample image is corresponding to the brightness value of the R component of each pixel point of the image to be compared The difference between the values; compare the brightness value of the G component of each pixel of the sample image with the brightness value of the G component of each pixel of the image to be compared to obtain the G of each pixel of the sample image The brightness value of the component corresponds to the difference between the brightness value of the G component of each pixel point of the image to be compared; the brightness value of the B component of each pixel point of the sample image corresponds to each pixel point of the image to be compared Comparing the brightness values of the B components of each pixel of the sample image to obtain the difference between the brightness values of the B components corresponding to each pixel of the sample image and the brightness values of the B components of each pixel of the image to be compared. The terminal judges whether the difference between the R component brightness value, the G component brightness value difference, and the B component brightness value difference between each pixel point of the sample image and each pixel point of the image to be compared is within the first within the preset range. When the terminal determines that the difference between the R component brightness value, the G component brightness value difference and the B component brightness value difference between each pixel point of the sample image and each pixel point of the image to be compared is within the When within the first preset range, determine the brightness value of the R component of the image to be compared corresponding to the difference in the R component brightness value within the first preset range, and record it as the brightness value of the R0 component; The brightness value of the G component of the image to be compared corresponding to the difference of the G component brightness value within the first preset range is recorded as the brightness value of the G0 component; determine the B component within the first preset range The brightness value of the B component of the image to be compared corresponding to the brightness value difference is recorded as the brightness value of the B0 component. The terminal calculates the average value of the brightness value of the R component of the sample image and the brightness value of the R0 component to obtain the average value of the brightness value of the R component; calculates the brightness value of the G component of the sample image and the average value of the G0 component The average value of the luminance value is to obtain the average value of the luminance value of the G component; the average value of the luminance value of the B component of the sample image and the luminance value of the B0 component is calculated to obtain the average value of the luminance value of the B component. The terminal uses the average value of the R component luminance values of each pixel as the R component image of the image after denoising, the average value of the G component luminance value as the G component image of the denoised image, and the average value of the B component luminance values as The B component image of the denoised image, the terminal recombines the R component image, G component image and B component image of the denoised image into a new image, and the recombined new image is the denoised image after the image. The terminal may also recombine the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component into new pixels, and use the new pixels as a new image pixels to obtain the new image, which is the denoised image. Further, the terminal displays the denoised image output on its screen. Wherein, the first preset range is determined according to the magnitude of the environmental noise in the current shooting, for example, it can be set to -10 to 10, or set to -20 to 20.

如所述智能手机获得所述样本图像某个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值,并获得三帧所述待对比图像中对应像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值时,所述智能手机通过所述样本图像像素点的R分量的亮度值与第一帧所述待对比图像中对应像素点的R分量的亮度值,得到所述样本图像像素点的R分量的亮度值与第一帧所述待对比图像中对应像素点的R分量的亮度值之间的差值,记为R1;通过所述样本图像像素点的R分量的亮度值与第二帧所述待对比图像中对应像素点的R分量的亮度值,得到所述样本图像像素点的R分量的亮度值与第二帧所述待对比图像中对应像素点的R分量的亮度值之间的差值,记为R2;通过所述样本图像像素点的R分量的亮度值与第三帧所述待对比图像中对应像素点的R分量的亮度值,得到所述样本图像像素点的R分量的亮度值与第三帧所述待对比图像中对应像素点的R分量的亮度值之间的差值,记为R3。所述智能手机判断所述R1、R2和R3是在-10至10的范围内(在本实施例中,所述第一预设范围取值为-10至10),即所述R1、R2和R3是否大于或者等于-10,且小于或者等于10。若所述智能手机判定所述R1、R2和R3都大于或者等于-10,且小于或者等于10,则计算所述样本图像像素点的R分量的亮度值、第一帧待对比图像中对应像素点的R分量的亮度值、第二帧待对比图像中对应像素点的R分量的亮度值和第三帧待对比图像中对应像素点的R分量的亮度值四个R分量的亮度值之间的平均值,将所述四个R分量的亮度值之间的平均值作为去噪后的图像对应位置新的像素点的R分量的亮度值。若所述智能手机判定所述R1和R3大于或者等于-10,且小于或者等于10,则计算所述样本图像像素点的R分量的亮度值、第一帧待对比图像中对应像素点的R分量的亮度值和第三帧待对比图像中对应像素点的R分量的亮度值三个R分量的亮度值之间的平均值,将所述三个R分量的亮度值之间的平均值作为去噪后的图像对应位置新的像素点的R分量的亮度值。若所述智能手机判定所述R1大于或者等于-10,且小于或者等于10,则计算所述样本图像应像素点的R分量的亮度值和第一帧待对比图像中对应像素点的R分量的亮度值两个R分量的亮度值之间的平均值,将所述两个R分量的亮度值之间的平均值作为去噪后的图像对应位置新的像素点的R分量的亮度值。(当所述R1和R3或R2和R3或R2或R3满足所述第一预设范围时,处理过程如上,在此不再赘述)。所述智能手机对所述G分量的亮度值和B分量的亮度值的处理过程与对所述R分量的亮度值的处理过程类似,在此不再赘述。当所述智能手机得到所述样本图像与所述待对比图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值时,所述智能手机将各个像素点的R分量亮度值的平均值作为去噪后图像的R分量图像、G分量亮度值的平均值作为去噪后图像的G分量图像、B分量亮度值的平均值作为去噪后图像的B分量图像,所述智能手机将所述去噪后图像的R分量图像、G分量图像和B分量图像重新组合成新的图像,所述重新组合的新的图像即为去噪后的图像。具体地,参照图7和图8,图7为本发明实施例中终端所拍摄的未经过去噪处理所得图像的一种示意图;图8为本发明实施例中终端所拍摄的经过去噪处理所得图像的一种示意图。对比所述图7和所述图8可知,当图像经过去噪之后,清晰度明显提高。For example, the smart phone obtains the luminance value of the R component, the luminance value of the G component, and the luminance value of the B component of a certain pixel point of the sample image, and obtains the luminance value of the R component of the corresponding pixel point in the three frames of the image to be compared. When the brightness value, the brightness value of the G component, and the brightness value of the B component, the smart phone passes the brightness value of the R component of the sample image pixel and the R component of the corresponding pixel in the image to be compared in the first frame Brightness value, the difference between the brightness value of the R component of the pixel point of the sample image and the brightness value of the R component of the corresponding pixel point in the image to be compared in the first frame is obtained, denoted as R1; through the sample image The brightness value of the R component of the pixel point and the brightness value of the R component of the corresponding pixel point in the image to be compared in the second frame are obtained, and the brightness value of the R component of the pixel point in the sample image and the image to be compared in the second frame are obtained. The difference between the luminance value of the R component of the corresponding pixel in the corresponding pixel, denoted as R2; through the luminance value of the R component of the sample image pixel and the R component of the corresponding pixel in the image to be compared in the third frame The brightness value is obtained by obtaining the difference between the brightness value of the R component of the sample image pixel and the brightness value of the R component of the corresponding pixel in the image to be compared in the third frame, which is denoted as R3. The smart phone determines that the R1, R2, and R3 are in the range of -10 to 10 (in this embodiment, the first preset range is -10 to 10), that is, the R1, R2 Whether and R3 is greater than or equal to -10 and less than or equal to 10. If the smart phone determines that the R1, R2, and R3 are all greater than or equal to -10 and less than or equal to 10, then calculate the brightness value of the R component of the pixel point of the sample image, and the corresponding pixel in the first frame of the image to be compared between the brightness value of the R component of the point, the brightness value of the R component of the corresponding pixel in the second frame of the image to be compared, and the brightness value of the R component of the corresponding pixel in the third frame of the image to be compared The average value of the brightness values of the four R components is used as the brightness value of the R component of the new pixel at the corresponding position of the image after denoising. If the smart phone determines that the R1 and R3 are greater than or equal to -10 and less than or equal to 10, then calculate the brightness value of the R component of the pixel point of the sample image, and the R value of the corresponding pixel point in the first frame of the image to be compared. The brightness value of the component and the brightness value of the R component of the corresponding pixel in the third frame image to be compared are the average value between the brightness values of the three R components, and the average value between the brightness values of the three R components is taken as The luminance value of the R component of the corresponding new pixel in the denoised image. If the smart phone determines that the R1 is greater than or equal to -10 and less than or equal to 10, then calculate the brightness value of the R component of the corresponding pixel in the sample image and the R component of the corresponding pixel in the first frame of the image to be compared The brightness value is the average value between the brightness values of the two R components, and the average value between the brightness values of the two R components is used as the brightness value of the R component of the new pixel at the corresponding position of the image after denoising. (When the R1 and R3 or R2 and R3 or R2 or R3 meet the first preset range, the processing process is as above, and will not be repeated here). The processing process of the smart phone on the luminance value of the G component and the luminance value of the B component is similar to the processing process of the luminance value of the R component, and will not be repeated here. When the smart phone obtains the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component between the sample image and each pixel point of the image to be compared, the smart phone The average value of the R component luminance value of each pixel is used as the R component image of the image after denoising, the average value of the G component luminance value is used as the G component image of the denoised image, and the average value of the B component luminance value is used as the denoised image. The B component image of the image, the smart phone recombines the R component image, G component image and B component image of the denoised image into a new image, and the recombined new image is the denoised image. Specifically, referring to Figures 7 and 8, Figure 7 is a schematic diagram of an image captured by a terminal in an embodiment of the present invention without denoising processing; A schematic representation of the resulting image. Comparing the above-mentioned FIG. 7 with the above-mentioned FIG. 8, it can be seen that after the image is denoised, the definition is obviously improved.

本实施例通过分别获取终端中的样本图像的R、G和B分量的亮度值,待对比图像各个像素点的R、G和B分量的亮度值,当所述样本图像的R、G和B分量的亮度值与所述待对比图像各个像素点的R、G和B分量的亮度值之间对应的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。通过了分别对图像的R、G和B分量的亮度值进行去噪,再将去噪后的R、G和B分量的亮度值重新组合成新的像素点,将所述新的像素点作为去噪后图像的像素点的方法得到去噪后的图像,避免了在对图像去噪过程中计算量大,去噪效果差,容易造成图像边缘细节损失的问题。In this embodiment, the brightness values of the R, G, and B components of the sample image in the terminal are obtained respectively, and the brightness values of the R, G, and B components of each pixel of the image to be compared are obtained when the R, G, and B components of the sample image If the corresponding differences between the brightness values of the components and the brightness values of the R, G, and B components of each pixel of the image to be compared are within a first preset range, then according to each of the image to be compared and the sample image The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component among the pixels are used to obtain a denoised image. By denoising the luminance values of the R, G and B components of the image respectively, and then recombining the luminance values of the denoised R, G and B components into new pixels, and using the new pixels as The pixel of the denoised image is used to obtain the denoised image, which avoids the problem of large amount of calculation in the process of image denoising, poor denoising effect, and easy loss of image edge details.

参照图4,图4为本发明图像去噪装置第二实施例的功能模块示意图,基于第一实施例提出本发明图像去噪装置的第二实施例。Referring to FIG. 4 , FIG. 4 is a schematic diagram of the functional modules of the second embodiment of the image denoising device of the present invention, and the second embodiment of the image denoising device of the present invention is proposed based on the first embodiment.

在本实施例中,所述图像去噪装置还包括:In this embodiment, the image denoising device further includes:

计算模块40,用于分别计算所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值,将所述差值作为第一差值;Calculation module 40, used to respectively calculate the difference between the luminance values of the R, G and B components of each pixel point of the sample image and the luminance values of the R, G and B components corresponding to each pixel point of the image to be compared , using the difference as the first difference;

判断模块50,用于判断所述第一差值是否都未在第一预设范围内;A judging module 50, configured to judge whether the first difference is not within a first preset range;

当所述终端获取得到所述样本图像各个像素点的R分量的亮度值和所述待对比图像各个像素点的R分量的亮度值时,所述终端计算所述样本图像的像素点的R分量的亮度值与所述待对比图像中对应像素点的R分量的亮度值之间差值,并将所述差值作为R分量亮度值的第一差值。所述终端获得G分量亮度值的第一差值和B分量亮度值的第一差值的过程与获得所述R分量亮度值的第一差值过程类似,在此不再赘述。当所述终端获得所述R分量亮度值的第一差值时,判断所述R分量亮度值的第一差值是否都在第一预设范围内。当所述终端获取得到所述样本图像各个像素点的G分量的亮度值和B分量的亮度值与所述待对比图像各个像素点的G分量的亮度值和B分量的亮度值时,所述终端对所述样本图像像素点的G分量的亮度值和B分量的亮度值与所述待对比图像中对应像素点的G分量的亮度值和B分量的亮度值之间差值的处理过程,和所述终端对所述样本图像的像素点的R分量的亮度值与所述待对比图像中对应像素点的R分量的亮度值之间差值类似,在此不再赘述。如所述智能手机在计算所述样本图像像素点的R分量的亮度值和三帧所述待对比图像中对应像素点的R分量的亮度值之间的差值,得到所述样本图像像素点的R分量的亮度值和所述第一帧待对比图像中对应像素点的R分量的亮度值之间的差值R1;得到所述样本图像像素点的R分量的亮度值和所述第二帧待对比图像中对应像素点的R分量的亮度值之间的差值R2;得到所述样本图像像素点的R分量的亮度值和所述第三帧待对比图像中对应像素点的R分量的亮度值之间的差值R3。所述智能手机判断所述R1、R2和R3是否都大于或者等于-10,且小于或者等于10。所述智能手机对所述样本图像像素点的G分量的亮度值和B分量的亮度值与三帧所述待对比图像中对应像素点的G分量的亮度值和B分量的亮度值之间差值的处理过程和所述样本图像的像素点的R分量的亮度值与三帧所述待对比图像中对应像素点的R分量的亮度值之间差值类似,在此不再赘述。When the terminal obtains the brightness value of the R component of each pixel point of the sample image and the brightness value of the R component of each pixel point of the image to be compared, the terminal calculates the R component of the pixel point of the sample image The difference between the luminance value of , and the luminance value of the R component of the corresponding pixel in the image to be compared, and use the difference as the first difference of the R component luminance value. The process by which the terminal obtains the first difference between the brightness values of the G component and the first difference between the brightness values of the B component is similar to the process of obtaining the first difference between the brightness values of the R component, and will not be repeated here. When the terminal obtains the first difference of the brightness values of the R components, it is determined whether the first differences of the brightness values of the R components are all within a first preset range. When the terminal obtains the brightness value of the G component and the brightness value of the B component of each pixel point of the sample image and the brightness value of the G component and the brightness value of the B component of each pixel point of the image to be compared, the The terminal processes the difference between the brightness value of the G component and the brightness value of the B component of the pixel point of the sample image and the brightness value of the G component and the brightness value of the B component of the corresponding pixel point in the image to be compared, It is similar to the difference between the luminance value of the R component of the pixel of the sample image and the luminance value of the R component of the corresponding pixel in the image to be compared by the terminal, and will not be repeated here. For example, when the smart phone calculates the difference between the brightness value of the R component of the sample image pixel and the brightness value of the R component of the corresponding pixel in the three frames of the image to be compared, the sample image pixel is obtained The difference R1 between the luminance value of the R component of the image to be compared and the luminance value of the R component of the corresponding pixel in the image to be compared in the first frame; obtain the luminance value of the R component of the sample image pixel and the second The difference R2 between the brightness values of the R components of the corresponding pixels in the image to be compared in the frame; the brightness value of the R component of the pixels in the sample image and the R component of the corresponding pixels in the third frame of the image to be compared are obtained The difference between the luminance values R3. The smart phone judges whether the R1, R2 and R3 are all greater than or equal to -10 and less than or equal to 10. The difference between the brightness value of the G component and the brightness value of the B component of the pixel point of the sample image by the smart phone and the brightness value of the G component and the brightness value of the B component of the corresponding pixel point in the three frames of the image to be compared The value processing process is similar to the difference between the brightness value of the R component of the pixel in the sample image and the brightness value of the R component of the corresponding pixel in the three frames of the image to be compared, and will not be repeated here.

选取模块60,用于若所述第一差值都未在所述第一预设范围内,则在所述样本图像各个像素点的预设范围内选取预设个数的像素点;A selection module 60, configured to select a preset number of pixels within a preset range of each pixel of the sample image if none of the first difference values is within the first preset range;

所述第二获取模块20,还用于获取所述预设个数的像素点的R、G和B分量的亮度值;The second acquiring module 20 is further configured to acquire brightness values of R, G and B components of the preset number of pixels;

当所述终端判定所述R分量亮度值的第一差值都未在所述第一预设范围内,即所述样本图像的R分量的亮度值与所述待对比图像的R分量的亮度值之间的差值都未在所述第一预设范围内时,所述终端在所述样本图像各个像素点的预设范围内选取预设个数的像素点,并获取所述预设个数的像素点的R分量的亮度值。所述预设个数当时拍摄场景中的噪声大小而设定,如可以设置为以所述终端当前所选取的像素点为中心,选取3*3、或者5*5等区域中的像素点。所述终端判定所述G分量亮度值的第一差值和/或所述B分量亮度值的第一差值都未在所述第一预设范围内时,所述终端的处理过程和判定所述R分量亮度值的第一差值都未在所述第一预设范围内的类似,在此不再赘述。具体地,参照图9,图9为本发明实施例中终端在样本图像总某个像素点的预设范围内选取预设个数的像素点的一种示意图。在所述图9中,当所述智能手机判定所述R1、R2和R3都未在-10至10的范围内,则所述智能手机在所述样本图像的像素点的3*3范围内选取8个像素点,如所述智能手机正在处理所述样本图像中处于位置P22像素点的R分量的亮度值,则在所述P22像素点3*3范围内选取P11、P12、P12、P21、P23、P31、P32和P33这8个像素点。所述智能手机分别获取所述P11、P12、P12、P21、P23、P31、P32和P33这8个像素点的R分量的亮度值。当所述智能手机判定所述G分量亮度值的第一差值和/或所述B分量亮度值的第一差值都未在-10至10的范围内时,所述终端的处理过程和判定所述R1、R2和R3都未在-10至10的范围内的类似,在此不再赘述。When the terminal determines that the first difference between the brightness values of the R components is not within the first preset range, that is, the brightness value of the R component of the sample image and the brightness of the R component of the image to be compared When the difference between the values is not within the first preset range, the terminal selects a preset number of pixels within the preset range of each pixel of the sample image, and obtains the preset The brightness value of the R component of the number of pixels. The preset number is set based on the amount of noise in the shooting scene at that time, for example, it can be set to center on the pixel currently selected by the terminal, and select pixels in areas such as 3*3 or 5*5. When the terminal determines that the first difference of the G component luminance value and/or the first difference of the B component luminance value is not within the first preset range, the processing procedure and determination of the terminal None of the first difference values of the R-component luminance values are similar within the first preset range, which will not be repeated here. Specifically, referring to FIG. 9 , FIG. 9 is a schematic diagram of a terminal selecting a preset number of pixels within a preset range of a certain pixel of a sample image in an embodiment of the present invention. In the Figure 9, when the smart phone determines that none of the R1, R2 and R3 is within the range of -10 to 10, the smart phone is within the range of 3*3 pixels of the sample image Select 8 pixels, if the smart phone is processing the luminance value of the R component at the position P22 pixel in the sample image, then select P11, P12, P12, P21 within the range of 3*3 of the P22 pixel , P23, P31, P32 and P33 these 8 pixels. The smart phone respectively acquires the luminance values of the R components of the eight pixels of P11, P12, P12, P21, P23, P31, P32 and P33. When the smart phone determines that the first difference between the G component luminance values and/or the first difference between the B component luminance values is not within the range of -10 to 10, the processing procedure of the terminal and It is determined that none of R1, R2, and R3 is within the range of -10 to 10, so details will not be repeated here.

所述计算模块40,还用于分别计算所述预设个数的像素点的R、G和B分量的亮度值与所述样本图像像素点的R、G和B分量的亮度值之间的差值,作为第二差值;The calculation module 40 is also used to calculate the difference between the luminance values of the R, G and B components of the preset number of pixels and the luminance values of the R, G and B components of the sample image pixels. difference, as the second difference;

当所述终端获取得到所述预设个数的像素点的R分量的亮度值时,计算所述预设个数的像素点的R分量的亮度值与所述样本图像像素点的R分量的亮度值之间的差值,将所述差值作为R分量亮度值的第二差值;当所述终端获取得到所述预设个数的像素点的G分量的亮度值时,计算所述预设个数的像素点的G分量的亮度值与所述样本图像像素点的G分量的亮度值之间的差值,将所述差值作为G分量亮度值的第二差值;当所述终端获取得到所述预设个数的像素点的B分量的亮度值时,计算所述预设个数的像素点的B分量的亮度值与所述样本图像像素点的B分量的亮度值之间的差值,将所述差值作为B分量亮度值的第二差值。如所述智能手机获取得到所述P11、P12、P12、P21、P23、P31、P32和P33这8个像素点的R分量的亮度值时,计算所述样本图像中P22像素点的R分量的亮度值与所述P11、P12、P12、P21、P23、P31、P32和P33这8个像素点的R分量的亮度值之间的差值。具体地,参照图10,所述图10为本发明实施例中样本图像的某个像素点和预设个数像素点的R分量的亮度值的一种示意图。由所述图10可知,所述P22像素点的R分量的亮度值为5,所述P11像素点的R分量的亮度值为1,所述P12像素点的R分量的亮度值为2,所述P13像素点的R分量的亮度值为3,所述P21像素点的R分量的亮度值为4,所述P23像素点的R分量的亮度值为6,所述P31像素点的R分量的亮度值为9,所述P32像素点的R分量的亮度值为8,所述P33像素点的R分量的亮度值为7。所述智能手机计算得到所述样本图像中P22像素点的R分量的亮度值与所述P11、P12、P12、P21、P23、P31、P32和P33这8个像素点的R分量的亮度值之间的差值分别为4、3、2、1、-1、-4、-3和-2。When the terminal acquires the brightness values of the R components of the preset number of pixels, calculate the brightness value of the R components of the preset number of pixels and the ratio of the R components of the sample image pixels The difference between the brightness values, the difference is used as the second difference of the brightness value of the R component; when the terminal obtains the brightness value of the G component of the preset number of pixels, calculate the The difference between the luminance value of the G component of the preset number of pixels and the luminance value of the G component of the sample image pixel, using the difference as the second difference of the G component luminance value; when the When the terminal acquires the brightness values of the B components of the preset number of pixels, calculate the brightness values of the B components of the preset number of pixels and the brightness values of the B components of the sample image pixels The difference between them is used as the second difference of the brightness value of the B component. For example, when the smart phone obtains the brightness values of the R components of the eight pixels P11, P12, P12, P21, P23, P31, P32 and P33, calculate the R component of the P22 pixel in the sample image The difference between the luminance value and the luminance value of the R component of the eight pixels of P11, P12, P12, P21, P23, P31, P32 and P33. Specifically, referring to FIG. 10 , the FIG. 10 is a schematic diagram of a certain pixel of a sample image and brightness values of R components of a preset number of pixels in an embodiment of the present invention. 10, it can be seen that the brightness value of the R component of the P22 pixel point is 5, the brightness value of the R component of the P11 pixel point is 1, and the brightness value of the R component of the P12 pixel point is 2, so The brightness value of the R component of the P13 pixel point is 3, the brightness value of the R component of the P21 pixel point is 4, the brightness value of the R component of the P23 pixel point is 6, and the R component value of the P31 pixel point is The brightness value is 9, the brightness value of the R component of the P32 pixel point is 8, and the brightness value of the R component of the P33 pixel point is 7. The smart phone calculates the difference between the brightness value of the R component of the P22 pixel point in the sample image and the brightness value of the R component of the eight pixel points P11, P12, P12, P21, P23, P31, P32, and P33. The differences between them are 4, 3, 2, 1, -1, -4, -3, and -2, respectively.

所述处理模块30,还用于若所述第二差值在第二预设范围内,则根据所述在第二预设范围内所对应的所述预设个数的像素点与所述样本图像的各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。The processing module 30 is further configured to: if the second difference is within a second preset range, according to the preset number of pixels corresponding to the second preset range and the The average value of R component luminance value, the average value of G component luminance value and the average value of B component luminance value among each pixel of the sample image obtains the image after denoising.

进一步地,所述处理模块30还包括:Further, the processing module 30 also includes:

获取单元,用于若所述第二差值在所述第二预设范围内,则获取在所述第二预设范围内的第二差值所对应的所述预设个数的像素点的R、G和B分量的亮度值;An acquiring unit, configured to acquire the preset number of pixels corresponding to the second difference within the second preset range if the second difference is within the second preset range Luminance values of the R, G and B components of ;

第一计算单元,用于分别计算所获取的所述预设个数的像素点与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;The first calculation unit is used to separately calculate the average value of R component luminance values, the average value of G component luminance values and the B component luminance between the obtained preset number of pixels and each pixel point of the sample image the average of the values;

第一处理单元,用于将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The first processing unit is configured to recombine the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component into new pixels, so as to obtain a denoised image.

当所述终端得到所述R分量亮度值的第二差值,且判定所述R分量亮度值的第二差值在第二预设范围内时,获取所述在所述第二预设范围内的R分量亮度值的第二差值所对应的所述预设个数的像素点的R分量的亮度值,计算所获取的所述预设个数的像素点的R分量的亮度值和所述样本图像的各个像素点的R分量亮度值的平均值,将所述R分量亮度值的平均值作为新的像素点的R分量的亮度值。当所述终端判定所述G分量亮度值的第二差值和/或所述B分量亮度值的第二差值在所述第二预设范围内,所述终端的处理过程与判定所述R分量亮度值的第二差值在所述第二预设范围内的过程类似,在此不再赘述。其中,所述第二预设范围可以与所述第一预设范围一致,也可以与所述第一预设范围不一致。当所述终端得到新的像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值时,将所述新的像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值重新组合成新的像素点,将所述新的像素点作为新的图像的像素点,得到所述新的图像,所述新的图像即为去噪后的图像。如当所述第二预设范围为-2到2时,所述智能手机判定所述P22像素点的R分量的亮度值与所述P13、P21、P23和P33像素点的R分量的亮度值之间的差值在-2到2范围内,则对应获取所述P13、P21、P23和P33像素点的R分量的亮度值为3、4、6和7。所述智能手机计算所述P22像素点的R分量的亮度值5与所述P13、P21、P23和P33像素点的R分量的亮度值为3、4、6和7的平均值,得到的平均值为5,则将5作为去噪图像P22位置像素点的R分量的亮度值。当所述智能手机得到去噪图像P22位置像素点的G分量的亮度值和B分量的亮度值时,将所述P22位置像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值重新组合成去噪图像的P22位置像素点。所述智能手机通过这种方法,得到完整的一幅去噪后的图像。When the terminal obtains the second difference value of the R component luminance value and determines that the second difference value of the R component luminance value is within a second preset range, acquire the The brightness values of the R components of the preset number of pixels corresponding to the second difference value of the brightness values of the R components in the interior are calculated, and the sum of the acquired brightness values of the R components of the preset number of pixels is calculated. The average value of the R component luminance values of each pixel in the sample image is used as the new R component luminance value of the pixel. When the terminal determines that the second difference of the luminance value of the G component and/or the second difference of the luminance value of the B component is within the second preset range, the processing procedure of the terminal is the same as that of determining the The process of the second difference of R component luminance values being within the second preset range is similar, and will not be repeated here. Wherein, the second preset range may be consistent with the first preset range, or may be inconsistent with the first preset range. When the terminal obtains the luminance value of the R component, the luminance value of the G component, and the luminance value of the B component of the new pixel, the luminance value of the R component, the luminance value of the G component, and the B The brightness values of the components are recombined into new pixels, and the new pixels are used as pixels of a new image to obtain the new image, and the new image is a denoised image. For example, when the second preset range is -2 to 2, the smart phone determines the brightness value of the R component of the P22 pixel point and the brightness value of the R component of the P13, P21, P23, and P33 pixel points If the difference between them is in the range of -2 to 2, the brightness values of the R components of the P13, P21, P23 and P33 pixels are correspondingly obtained as 3, 4, 6 and 7. The smart phone calculates the average value of the luminance value 5 of the R component of the P22 pixel point and the luminance value of the R component of the P13, P21, P23, and P33 pixel points 3, 4, 6, and 7, and the obtained average If the value is 5, then 5 is used as the brightness value of the R component of the pixel at the P22 position of the denoised image. When the smart phone obtains the brightness value of the G component and the brightness value of the B component of the pixel at the P22 position of the denoising image, the brightness value of the R component, the brightness value of the G component and the brightness value of the B component of the pixel at the P22 position The brightness value is recombined into the P22 pixel of the denoised image. In this way, the smart phone obtains a complete image after denoising.

更进一步地,所述判断模块50,还用于判断所述第二差值是否在第二预设范围内;Furthermore, the judging module 50 is also used to judge whether the second difference is within a second preset range;

所述图像去噪装置还包括丢弃模块,用于若所述第二差值未在所述第二预设范围内,则丢弃所述未在所述第二预设范围内的第二差值所对应的所述预设个数的像素点。The image denoising device further includes a discarding module, configured to discard the second difference that is not within the second preset range if the second difference is not within the second preset range The corresponding preset number of pixels.

当所述终端获取得到所述R分量亮度值的第二差值时,判断所述R分量亮度值的第二差值是否在所述第二预设范围内。若所述R分量亮度值的第二差值未在所述第二预设范围内,所述终端则丢弃所述未在所述第二预设范围内的R分量亮度值的第二差值所对应的所述预设个数的像素点的R分量的亮度值。如所述智能手机判定所述P22像素点的R分量的亮度值与所述P11、P12、P31和P32像素点的R分量的亮度值之间的差值未在-2到2范围内时,则丢弃所述P11、P12、P31和P32像素点的R分量的亮度值,不对所述P11、P12、P31和P32像素点的R分量的亮度值进行计算。当所述终端判定所述G分量亮度值的第二差值和/或所述B分量亮度值的第二差值未在所述第二预设范围内,所述终端的处理过程与所述R分量亮度值的第二差值未在所述第二预设范围内的过程类似,在此不再赘述。When the terminal obtains the second difference of the brightness value of the R component, it is determined whether the second difference of the brightness value of the R component is within the second preset range. If the second difference value of the R component luminance value is not within the second preset range, the terminal discards the second difference value of the R component luminance value not within the second preset range Brightness values of the R components of the corresponding preset number of pixels. If the smart phone determines that the difference between the luminance value of the R component of the P22 pixel point and the luminance value of the R component of the P11, P12, P31, and P32 pixel points is not within the range of -2 to 2, Then the brightness values of the R components of the P11, P12, P31 and P32 pixels are discarded, and the brightness values of the R components of the P11, P12, P31 and P32 pixels are not calculated. When the terminal determines that the second difference of the luminance value of the G component and/or the second difference of the luminance value of the B component is not within the second preset range, the processing procedure of the terminal is the same as that of the The process in which the second difference of the luminance value of the R component is not within the second preset range is similar and will not be repeated here.

本实施例通过当所述样本图像各个像素点的R、G和B分量的亮度值对应与所述待对比图像各个像素点的R、G和B分量的亮度值之间的差值都未在第一预设范围内时,在所述样本图像各个像素点的预设范围内选取预设个数的像素点,从而得到去噪后的图像,避免了在对图像去噪过程中计算量大,去噪效果差,容易造成图像边缘细节损失的问题。In this embodiment, when the brightness values of the R, G, and B components of each pixel in the sample image correspond to the brightness values of the R, G, and B components of each pixel in the image to be compared, the difference between the brightness values is not within When within the first preset range, select a preset number of pixels within the preset range of each pixel of the sample image to obtain a denoised image, avoiding a large amount of calculation in the image denoising process , the denoising effect is poor, and it is easy to cause the loss of image edge details.

本发明进一步提供一种图像去噪方法。The present invention further provides an image denoising method.

参照图5,图5为本发明图像去噪方法第一实施例的流程示意图。Referring to FIG. 5 , FIG. 5 is a schematic flowchart of a first embodiment of an image denoising method according to the present invention.

在本实施例中,所述图像去噪方法包括:In this embodiment, the image denoising method includes:

步骤S10,获取终端拍摄的连续的多帧图像,将所述多帧图像中的其中一帧图像作为样本图像,其余的作为待对比图像,其中,所述多帧图像的格式为RGB图像格式;Step S10, acquiring continuous multi-frame images captured by the terminal, using one of the multi-frame images as a sample image, and the rest as images to be compared, wherein the format of the multi-frame images is an RGB image format;

当终端在使用内置或者外置的摄像头拍摄时,所述终端获取在拍摄过程中连续的多帧图像,将所述多帧图像中的其中一帧图像作为样本图像,将除所述样本图像之外的图像作为待对比图像,所述样本图像和所述待对比图像为RGB图像格式。所述终端包括但不限于智能手机,个人电脑。在本实施例中,所述终端为智能手机,如所述智能手机在其内置摄像头进行拍摄图像时,获取连续的四帧图像,将所获取的第一帧图像作为样本图像,将所获取的第二、第三和第四帧图像作为待对比图像。When the terminal is shooting with a built-in or external camera, the terminal acquires continuous multiple frames of images during the shooting process, and uses one of the multiple frames of images as a sample image, and uses the The image outside is used as the image to be compared, and the sample image and the image to be compared are in RGB image format. The terminals include but are not limited to smart phones and personal computers. In this embodiment, the terminal is a smart phone. For example, when the smart phone captures images with its built-in camera, it acquires four consecutive frames of images, uses the first frame of images acquired as a sample image, and uses the acquired first frame of images as a sample image. The second, third and fourth frames of images are used as images to be compared.

步骤S20,分别获取所述样本图像各个像素点的R、G和B分量的亮度值,和所述待对比图像各个像素点的R、G和B分量的亮度值;Step S20, respectively acquiring the brightness values of the R, G and B components of each pixel of the sample image, and the brightness values of the R, G and B components of each pixel of the image to be compared;

当所述终端获取得到所述样本图像和所述待对比图像时,解析所述样本图像和所述待对比图像,获取所述样本图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值,和获取所述待对比图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值。如当所述智能手机获取得到一帧所述样本图像和三帧所述待对比图像时,解析所述样本图像,得到所述样本图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值;并分别解析三帧所述待对比图像,得到第一帧所述待对比图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值;得到第二帧所述待对比图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值;得到第三帧所述待对比图像中各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值。When the terminal acquires the sample image and the image to be compared, analyze the sample image and the image to be compared, and obtain the brightness value of the R component and the brightness of the G component of each pixel in the sample image value and the brightness value of the B component, and obtain the brightness value of the R component, the brightness value of the G component, and the brightness value of the B component of each pixel in the image to be compared. For example, when the smart phone acquires one frame of the sample image and three frames of the image to be compared, analyze the sample image to obtain the brightness value of the R component and the brightness of the G component of each pixel in the sample image value and the brightness value of the B component; and respectively analyze the three frames of the image to be compared to obtain the brightness value of the R component, the brightness value of the G component and the brightness value of the B component of each pixel in the image to be compared in the first frame Obtain the luminance value of the R component, the luminance value of the G component and the luminance value of the B component of each pixel in the image to be compared in the second frame; obtain the R component of each pixel in the image to be compared in the third frame A brightness value, a brightness value of the G component, and a brightness value of the B component.

步骤S30,若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。Step S30, if the difference between the luminance values of the R, G and B components of each pixel of the sample image and the luminance values of the R, G and B components corresponding to each pixel of the image to be compared is within the first preset If it is within the range, the image after denoising is obtained according to the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component between the image to be compared and each pixel point of the sample image .

进一步地,所述步骤S30包括:Further, the step S30 includes:

若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则确定所述差值在所述第一预设范围内所对应的所述待对比图像各个像素点的R、G和B分量的亮度值;If the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared is within the first preset range , then determine the luminance values of the R, G and B components of the respective pixels of the image to be compared corresponding to the difference within the first preset range;

分别计算在所述第一预设范围内的所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;respectively calculating the average value of R component brightness values, the average value of G component brightness values and the average value of B component brightness values between the image to be compared and each pixel point of the sample image within the first preset range ;

将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component are recombined into new pixels to obtain a denoised image.

当所述终端获得所述样本图像和所述待对比图像各个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值时,将所述样本图像各个像素点的R分量的亮度值对应与所述待对比图像各个像素点的R分量的亮度值进行对比,得到所述样本图像各个像素点的R分量的亮度值对应与所述待对比图像各个像素点的R分量的亮度值之间的差值;将所述样本图像各个像素点的G分量的亮度值对应与所述待对比图像各个像素点的G分量的亮度值进行对比,得到所述样本图像各个像素点的G分量的亮度值对应与所述待对比图像各个像素点的G分量的亮度值之间的差值;将所述样本图像各个像素点的B分量的亮度值对应与所述待对比图像各个像素点的B分量的亮度值进行对比,得到所述样本图像各个像素点的B分量的亮度值对应与所述待对比图像各个像素点的B分量的亮度值之间的差值。所述终端判断所述样本图像各个像素点与所述待对比图像各个像素点之间的R分量亮度值的差值、G分量亮度值的差值和B分量亮度值的差值是否在第一预设范围内。当所述终端判定所述样本图像各个像素点与所述待对比图像各个像素点之间的R分量亮度值的差值、G分量亮度值的差值和B分量亮度值的差值在所述第一预设范围内时,确定在所述第一预设范围内R分量亮度值的差值所对应的所述待对比图像的R分量的亮度值,记为R0分量的亮度值;确定在所述第一预设范围内G分量亮度值的差值所对应的所述待对比图像的G分量的亮度值,记为G0分量的亮度值;确定在所述第一预设范围内B分量亮度值的差值所对应的所述待对比图像的B分量的亮度值,记为B0分量的亮度值。所述终端计算所述样本图像的R分量的亮度值与所述R0分量亮度值的平均值,得到R分量亮度值的平均值;计算所述样本图像的G分量的亮度值与所述G0分量亮度值的平均值,得到G分量亮度值的平均值;计算所述样本图像的B分量的亮度值与所述B0分量亮度值的平均值,得到B分量亮度值的平均值。所述终端将各个像素点的R分量亮度值的平均值作为去噪后图像的R分量图像、G分量亮度值的平均值作为去噪后图像的G分量图像、B分量亮度值的平均值作为去噪后图像的B分量图像,所述终端将所述去噪后图像的R分量图像、G分量图像和B分量图像重新组合成新的图像,所述重新组合的新的图像即为去噪后的图像。所述终端还可以将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,将所述新的像素点作为新的图像的像素点,得到所述新的图像,所述新的图像即为去噪后的图像。进一步地,所述终端将所述去噪后的图像输出显示在其屏幕中。其中,所述第一预设范围根据当前拍摄时所在环境噪声的大小而定,如可设置为-10至10,或者设置为-20至20。When the terminal obtains the brightness value of the R component, the brightness value of the G component, and the brightness value of the B component of each pixel point of the sample image and the image to be compared, the R component of each pixel point of the sample image The brightness value is compared with the brightness value of the R component of each pixel point of the image to be compared, and the brightness value of the R component of each pixel point of the sample image is corresponding to the brightness value of the R component of each pixel point of the image to be compared The difference between the values; compare the brightness value of the G component of each pixel of the sample image with the brightness value of the G component of each pixel of the image to be compared to obtain the G of each pixel of the sample image The brightness value of the component corresponds to the difference between the brightness value of the G component of each pixel point of the image to be compared; the brightness value of the B component of each pixel point of the sample image corresponds to each pixel point of the image to be compared Comparing the brightness values of the B components of each pixel of the sample image to obtain the difference between the brightness values of the B components corresponding to each pixel of the sample image and the brightness values of the B components of each pixel of the image to be compared. The terminal judges whether the difference between the R component brightness value, the G component brightness value difference, and the B component brightness value difference between each pixel point of the sample image and each pixel point of the image to be compared is within the first within the preset range. When the terminal determines that the difference between the R component brightness value, the G component brightness value difference and the B component brightness value difference between each pixel point of the sample image and each pixel point of the image to be compared is within the When within the first preset range, determine the brightness value of the R component of the image to be compared corresponding to the difference in the R component brightness value within the first preset range, and record it as the brightness value of the R0 component; The brightness value of the G component of the image to be compared corresponding to the difference of the G component brightness value within the first preset range is recorded as the brightness value of the G0 component; determine the B component within the first preset range The brightness value of the B component of the image to be compared corresponding to the brightness value difference is recorded as the brightness value of the B0 component. The terminal calculates the average value of the brightness value of the R component of the sample image and the brightness value of the R0 component to obtain the average value of the brightness value of the R component; calculates the brightness value of the G component of the sample image and the average value of the G0 component The average value of the luminance value is to obtain the average value of the luminance value of the G component; the average value of the luminance value of the B component of the sample image and the luminance value of the B0 component is calculated to obtain the average value of the luminance value of the B component. The terminal uses the average value of the R component luminance values of each pixel as the R component image of the image after denoising, the average value of the G component luminance value as the G component image of the denoised image, and the average value of the B component luminance values as The B component image of the denoised image, the terminal recombines the R component image, G component image and B component image of the denoised image into a new image, and the recombined new image is the denoised image after the image. The terminal may also recombine the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component into new pixels, and use the new pixels as a new image pixels to obtain the new image, which is the denoised image. Further, the terminal displays the denoised image output on its screen. Wherein, the first preset range is determined according to the magnitude of the environmental noise in the current shooting, for example, it can be set to -10 to 10, or set to -20 to 20.

如所述智能手机获得所述样本图像某个像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值,并获得三帧所述待对比图像中对应像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值时,所述智能手机通过所述样本图像像素点的R分量的亮度值与第一帧所述待对比图像中对应像素点的R分量的亮度值,得到所述样本图像像素点的R分量的亮度值与第一帧所述待对比图像中对应像素点的R分量的亮度值之间的差值,记为R1;通过所述样本图像像素点的R分量的亮度值与第二帧所述待对比图像中对应像素点的R分量的亮度值,得到所述样本图像像素点的R分量的亮度值与第二帧所述待对比图像中对应像素点的R分量的亮度值之间的差值,记为R2;通过所述样本图像像素点的R分量的亮度值与第三帧所述待对比图像中对应像素点的R分量的亮度值,得到所述样本图像像素点的R分量的亮度值与第三帧所述待对比图像中对应像素点的R分量的亮度值之间的差值,记为R3。所述智能手机判断所述R1、R2和R3是在-10至10的范围内(在本实施例中,所述第一预设范围取值为-10至10),即所述R1、R2和R3是否大于或者等于-10,且小于或者等于10。若所述智能手机判定所述R1、R2和R3都大于或者等于-10,且小于或者等于10,则计算所述样本图像像素点的R分量的亮度值、第一帧待对比图像中对应像素点的R分量的亮度值、第二帧待对比图像中对应像素点的R分量的亮度值和第三帧待对比图像中对应像素点的R分量的亮度值四个R分量的亮度值之间的平均值,将所述四个R分量的亮度值之间的平均值作为去噪后的图像对应位置新的像素点的R分量的亮度值。若所述智能手机判定所述R1和R3大于或者等于-10,且小于或者等于10,则计算所述样本图像像素点的R分量的亮度值、第一帧待对比图像中对应像素点的R分量的亮度值和第三帧待对比图像中对应像素点的R分量的亮度值三个R分量的亮度值之间的平均值,将所述三个R分量的亮度值之间的平均值作为去噪后的图像对应位置新的像素点的R分量的亮度值。若所述智能手机判定所述R1大于或者等于-10,且小于或者等于10,则计算所述样本图像应像素点的R分量的亮度值和第一帧待对比图像中对应像素点的R分量的亮度值两个R分量的亮度值之间的平均值,将所述两个R分量的亮度值之间的平均值作为去噪后的图像对应位置新的像素点的R分量的亮度值。(当所述R1和R3或R2和R3或R2或R3满足所述第一预设范围时,处理过程如上,在此不再赘述)。所述智能手机对所述G分量的亮度值和B分量的亮度值的处理过程与对所述R分量的亮度值的处理过程类似,在此不再赘述。当所述智能手机得到所述样本图像与所述待对比图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值时,所述智能手机将各个像素点的R分量亮度值的平均值作为去噪后图像的R分量图像、G分量亮度值的平均值作为去噪后图像的G分量图像、B分量亮度值的平均值作为去噪后图像的B分量图像,所述智能手机将所述去噪后图像的R分量图像、G分量图像和B分量图像重新组合成新的图像,所述重新组合的新的图像即为去噪后的图像。具体地,参照图7和图8,图7为本发明实施例中终端所拍摄的未经过去噪处理所得图像的一种示意图;图8为本发明实施例中终端所拍摄的经过去噪处理所得图像的一种示意图。对比所述图7和所述图8可知,当图像经过去噪之后,清晰度明显提高。For example, the smart phone obtains the luminance value of the R component, the luminance value of the G component, and the luminance value of the B component of a certain pixel point of the sample image, and obtains the luminance value of the R component of the corresponding pixel point in the three frames of the image to be compared. When the brightness value, the brightness value of the G component, and the brightness value of the B component, the smart phone passes the brightness value of the R component of the sample image pixel and the R component of the corresponding pixel in the image to be compared in the first frame Brightness value, the difference between the brightness value of the R component of the pixel point of the sample image and the brightness value of the R component of the corresponding pixel point in the image to be compared in the first frame is obtained, denoted as R1; through the sample image The brightness value of the R component of the pixel point and the brightness value of the R component of the corresponding pixel point in the image to be compared in the second frame are obtained, and the brightness value of the R component of the pixel point in the sample image and the image to be compared in the second frame are obtained. The difference between the luminance value of the R component of the corresponding pixel in the corresponding pixel, denoted as R2; through the luminance value of the R component of the sample image pixel and the R component of the corresponding pixel in the image to be compared in the third frame The brightness value is obtained by obtaining the difference between the brightness value of the R component of the sample image pixel and the brightness value of the R component of the corresponding pixel in the image to be compared in the third frame, which is denoted as R3. The smart phone determines that the R1, R2, and R3 are in the range of -10 to 10 (in this embodiment, the first preset range is -10 to 10), that is, the R1, R2 Whether and R3 is greater than or equal to -10 and less than or equal to 10. If the smart phone determines that the R1, R2, and R3 are all greater than or equal to -10 and less than or equal to 10, then calculate the brightness value of the R component of the pixel point of the sample image, and the corresponding pixel in the first frame of the image to be compared between the brightness value of the R component of the point, the brightness value of the R component of the corresponding pixel in the second frame of the image to be compared, and the brightness value of the R component of the corresponding pixel in the third frame of the image to be compared The average value of the brightness values of the four R components is used as the brightness value of the R component of the new pixel at the corresponding position of the image after denoising. If the smart phone determines that the R1 and R3 are greater than or equal to -10 and less than or equal to 10, then calculate the brightness value of the R component of the pixel point of the sample image, and the R value of the corresponding pixel point in the first frame of the image to be compared. The brightness value of the component and the brightness value of the R component of the corresponding pixel in the third frame image to be compared are the average value between the brightness values of the three R components, and the average value between the brightness values of the three R components is taken as The luminance value of the R component of the corresponding new pixel in the denoised image. If the smart phone determines that the R1 is greater than or equal to -10 and less than or equal to 10, then calculate the brightness value of the R component of the corresponding pixel in the sample image and the R component of the corresponding pixel in the first frame of the image to be compared The brightness value is the average value between the brightness values of the two R components, and the average value between the brightness values of the two R components is used as the brightness value of the R component of the new pixel at the corresponding position of the image after denoising. (When the R1 and R3 or R2 and R3 or R2 or R3 meet the first preset range, the processing process is as above, and will not be repeated here). The processing process of the smart phone on the luminance value of the G component and the luminance value of the B component is similar to the processing process of the luminance value of the R component, and will not be repeated here. When the smart phone obtains the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component between the sample image and each pixel point of the image to be compared, the smart phone The average value of the R component luminance value of each pixel is used as the R component image of the image after denoising, the average value of the G component luminance value is used as the G component image of the denoised image, and the average value of the B component luminance value is used as the denoised image. The B component image of the image, the smart phone recombines the R component image, G component image and B component image of the denoised image into a new image, and the recombined new image is the denoised image. Specifically, referring to Figures 7 and 8, Figure 7 is a schematic diagram of an image captured by a terminal in an embodiment of the present invention without denoising processing; A schematic representation of the resulting image. Comparing the above-mentioned FIG. 7 with the above-mentioned FIG. 8, it can be seen that after the image is denoised, the definition is obviously improved.

本实施例通过分别获取终端中的样本图像的R、G和B分量的亮度值,待对比图像各个像素点的R、G和B分量的亮度值,当所述样本图像的R、G和B分量的亮度值与所述待对比图像各个像素点的R、G和B分量的亮度值之间对应的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。通过了分别对图像的R、G和B分量的亮度值进行去噪,再将去噪后的R、G和B分量的亮度值重新组合成新的像素点,将所述新的像素点作为去噪后图像的像素点的方法得到去噪后的图像,避免了在对图像去噪过程中计算量大,去噪效果差,容易造成图像边缘细节损失的问题。In this embodiment, the brightness values of the R, G, and B components of the sample image in the terminal are obtained respectively, and the brightness values of the R, G, and B components of each pixel of the image to be compared are obtained when the R, G, and B components of the sample image If the corresponding differences between the brightness values of the components and the brightness values of the R, G, and B components of each pixel of the image to be compared are within a first preset range, then according to each of the image to be compared and the sample image The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component among the pixels are used to obtain a denoised image. By denoising the luminance values of the R, G and B components of the image respectively, and then recombining the luminance values of the denoised R, G and B components into new pixels, and using the new pixels as The pixel of the denoised image is used to obtain the denoised image, which avoids the problem of large amount of calculation in the process of image denoising, poor denoising effect, and easy loss of image edge details.

参照图6,图6为本发明图像去噪方法第二实施例的流程示意图,基于本发明第一实施例提出本发明图像去噪方法第二实施例。Referring to FIG. 6 , FIG. 6 is a schematic flowchart of the second embodiment of the image denoising method of the present invention, and proposes the second embodiment of the image denoising method of the present invention based on the first embodiment of the present invention.

在本实施例中,所述图像去噪方法还包括:In this embodiment, the image denoising method further includes:

步骤S40,分别计算所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值,将所述差值作为第一差值;Step S40, respectively calculating the difference between the luminance values of the R, G and B components of each pixel of the sample image and the luminance values of the R, G and B components corresponding to each pixel of the image to be compared, and dividing the said difference as the first difference;

步骤S50,判断所述第一差值是否都未在第一预设范围内;Step S50, judging whether the first difference is not within the first preset range;

当所述终端获取得到所述样本图像各个像素点的R分量的亮度值和所述待对比图像各个像素点的R分量的亮度值时,所述终端计算所述样本图像的像素点的R分量的亮度值与所述待对比图像中对应像素点的R分量的亮度值之间差值,并将所述差值作为R分量亮度值的第一差值。所述终端获得G分量亮度值的第一差值和B分量亮度值的第一差值的过程与获得所述R分量亮度值的第一差值过程类似,在此不再赘述。当所述终端获得所述R分量亮度值的第一差值时,判断所述R分量亮度值的第一差值是否都在第一预设范围内。当所述终端获取得到所述样本图像各个像素点的G分量的亮度值和B分量的亮度值与所述待对比图像各个像素点的G分量的亮度值和B分量的亮度值时,所述终端对所述样本图像像素点的G分量的亮度值和B分量的亮度值与所述待对比图像中对应像素点的G分量的亮度值和B分量的亮度值之间差值的处理过程,和所述终端对所述样本图像的像素点的R分量的亮度值与所述待对比图像中对应像素点的R分量的亮度值之间差值类似,在此不再赘述。如所述智能手机在计算所述样本图像像素点的R分量的亮度值和三帧所述待对比图像中对应像素点的R分量的亮度值之间的差值,得到所述样本图像像素点的R分量的亮度值和所述第一帧待对比图像中对应像素点的R分量的亮度值之间的差值R1;得到所述样本图像像素点的R分量的亮度值和所述第二帧待对比图像中对应像素点的R分量的亮度值之间的差值R2;得到所述样本图像像素点的R分量的亮度值和所述第三帧待对比图像中对应像素点的R分量的亮度值之间的差值R3。所述智能手机判断所述R1、R2和R3是否都大于或者等于-10,且小于或者等于10。所述智能手机对所述样本图像像素点的G分量的亮度值和B分量的亮度值与三帧所述待对比图像中对应像素点的G分量的亮度值和B分量的亮度值之间差值的处理过程和所述样本图像的像素点的R分量的亮度值与三帧所述待对比图像中对应像素点的R分量的亮度值之间差值类似,在此不再赘述。When the terminal obtains the brightness value of the R component of each pixel point of the sample image and the brightness value of the R component of each pixel point of the image to be compared, the terminal calculates the R component of the pixel point of the sample image The difference between the luminance value of , and the luminance value of the R component of the corresponding pixel in the image to be compared, and use the difference as the first difference of the R component luminance value. The process by which the terminal obtains the first difference between the brightness values of the G component and the first difference between the brightness values of the B component is similar to the process of obtaining the first difference between the brightness values of the R component, and will not be repeated here. When the terminal obtains the first difference of the brightness values of the R components, it is determined whether the first differences of the brightness values of the R components are all within a first preset range. When the terminal obtains the brightness value of the G component and the brightness value of the B component of each pixel point of the sample image and the brightness value of the G component and the brightness value of the B component of each pixel point of the image to be compared, the The terminal processes the difference between the brightness value of the G component and the brightness value of the B component of the pixel point of the sample image and the brightness value of the G component and the brightness value of the B component of the corresponding pixel point in the image to be compared, It is similar to the difference between the luminance value of the R component of the pixel of the sample image and the luminance value of the R component of the corresponding pixel in the image to be compared by the terminal, and will not be repeated here. For example, when the smart phone calculates the difference between the brightness value of the R component of the sample image pixel and the brightness value of the R component of the corresponding pixel in the three frames of the image to be compared, the sample image pixel is obtained The difference R1 between the luminance value of the R component of the image to be compared and the luminance value of the R component of the corresponding pixel in the image to be compared in the first frame; obtain the luminance value of the R component of the sample image pixel and the second The difference R2 between the brightness values of the R components of the corresponding pixels in the image to be compared in the frame; the brightness value of the R component of the pixels in the sample image and the R component of the corresponding pixels in the third frame of the image to be compared are obtained The difference between the brightness values R3. The smart phone judges whether the R1, R2 and R3 are all greater than or equal to -10 and less than or equal to 10. The difference between the brightness value of the G component and the brightness value of the B component of the pixel point of the sample image by the smart phone and the brightness value of the G component and the brightness value of the B component of the corresponding pixel point in the three frames of the image to be compared The value processing process is similar to the difference between the brightness value of the R component of the pixel in the sample image and the brightness value of the R component of the corresponding pixel in the three frames of the image to be compared, and will not be repeated here.

步骤S60,若所述第一差值都未在所述第一预设范围内,则在所述样本图像各个像素点的预设范围内选取预设个数的像素点;Step S60, if none of the first difference values is within the first preset range, select a preset number of pixels within the preset range of each pixel of the sample image;

步骤S70,获取所述预设个数的像素点的R、G和B分量的亮度值;Step S70, acquiring brightness values of R, G and B components of the preset number of pixels;

当所述终端判定所述R分量亮度值的第一差值都未在所述第一预设范围内,即所述样本图像的R分量的亮度值与所述待对比图像的R分量的亮度值之间的差值都未在所述第一预设范围内时,所述终端在所述样本图像各个像素点的预设范围内选取预设个数的像素点,并获取所述预设个数的像素点的R分量的亮度值。所述预设个数当时拍摄场景中的噪声大小而设定,如可以设置为以所述终端当前所选取的像素点为中心,选取3*3、或者5*5等区域中的像素点。所述终端判定所述G分量亮度值的第一差值和/或所述B分量亮度值的第一差值都未在所述第一预设范围内时,所述终端的处理过程和判定所述R分量亮度值的第一差值都未在所述第一预设范围内的类似,在此不再赘述。具体地,参照图9,图9为本发明实施例中终端在样本图像总某个像素点的预设范围内选取预设个数的像素点的一种示意图。在所述图9中,当所述智能手机判定所述R1、R2和R3都未在-10至10的范围内,则所述智能手机在所述样本图像的像素点的3*3范围内选取8个像素点,如所述智能手机正在处理所述样本图像中处于位置P22像素点的R分量的亮度值,则在所述P22像素点3*3范围内选取P11、P12、P12、P21、P23、P31、P32和P33这8个像素点。所述智能手机分别获取所述P11、P12、P12、P21、P23、P31、P32和P33这8个像素点的R分量的亮度值。当所述智能手机判定所述G分量亮度值的第一差值和/或所述B分量亮度值的第一差值都未在-10至10的范围内时,所述终端的处理过程和判定所述R1、R2和R3都未在-10至10的范围内的类似,在此不再赘述。When the terminal determines that the first difference between the brightness values of the R components is not within the first preset range, that is, the brightness value of the R component of the sample image and the brightness of the R component of the image to be compared When the difference between the values is not within the first preset range, the terminal selects a preset number of pixels within the preset range of each pixel of the sample image, and obtains the preset The brightness value of the R component of the number of pixels. The preset number is set based on the amount of noise in the shooting scene at that time, for example, it can be set to center on the pixel currently selected by the terminal, and select pixels in areas such as 3*3 or 5*5. When the terminal determines that the first difference of the G component luminance value and/or the first difference of the B component luminance value is not within the first preset range, the processing procedure and determination of the terminal None of the first difference values of the R-component luminance values are similar within the first preset range, which will not be repeated here. Specifically, referring to FIG. 9 , FIG. 9 is a schematic diagram of a terminal selecting a preset number of pixels within a preset range of a certain pixel of a sample image in an embodiment of the present invention. In the Figure 9, when the smart phone determines that none of the R1, R2 and R3 is within the range of -10 to 10, the smart phone is within the range of 3*3 pixels of the sample image Select 8 pixels, if the smart phone is processing the luminance value of the R component at the position P22 pixel in the sample image, then select P11, P12, P12, P21 within the range of 3*3 of the P22 pixel , P23, P31, P32 and P33 these 8 pixels. The smart phone respectively acquires the luminance values of the R components of the eight pixels of P11, P12, P12, P21, P23, P31, P32 and P33. When the smart phone determines that the first difference between the G component luminance values and/or the first difference between the B component luminance values is not within the range of -10 to 10, the processing procedure of the terminal and It is determined that none of R1, R2, and R3 is within the range of -10 to 10, so details will not be repeated here.

步骤S80,分别计算所述预设个数的像素点的R、G和B分量的亮度值与所述样本图像像素点的R、G和B分量的亮度值之间的差值,作为第二差值;Step S80, respectively calculating the difference between the luminance values of the R, G and B components of the preset number of pixels and the luminance values of the R, G and B components of the sample image pixels, as the second difference;

当所述终端获取得到所述预设个数的像素点的R分量的亮度值时,计算所述预设个数的像素点的R分量的亮度值与所述样本图像像素点的R分量的亮度值之间的差值,将所述差值作为R分量亮度值的第二差值;当所述终端获取得到所述预设个数的像素点的G分量的亮度值时,计算所述预设个数的像素点的G分量的亮度值与所述样本图像像素点的G分量的亮度值之间的差值,将所述差值作为G分量亮度值的第二差值;当所述终端获取得到所述预设个数的像素点的B分量的亮度值时,计算所述预设个数的像素点的B分量的亮度值与所述样本图像像素点的B分量的亮度值之间的差值,将所述差值作为B分量亮度值的第二差值。如所述智能手机获取得到所述P11、P12、P12、P21、P23、P31、P32和P33这8个像素点的R分量的亮度值时,计算所述样本图像中P22像素点的R分量的亮度值与所述P11、P12、P12、P21、P23、P31、P32和P33这8个像素点的R分量的亮度值之间的差值。具体地,参照图10,所述图10为本发明实施例中样本图像的某个像素点和预设个数像素点的R分量的亮度值的一种示意图。由所述图10可知,所述P22像素点的R分量的亮度值为5,所述P11像素点的R分量的亮度值为1,所述P12像素点的R分量的亮度值为2,所述P13像素点的R分量的亮度值为3,所述P21像素点的R分量的亮度值为4,所述P23像素点的R分量的亮度值为6,所述P31像素点的R分量的亮度值为9,所述P32像素点的R分量的亮度值为8,所述P33像素点的R分量的亮度值为7。所述智能手机计算得到所述样本图像中P22像素点的R分量的亮度值与所述P11、P12、P12、P21、P23、P31、P32和P33这8个像素点的R分量的亮度值之间的差值分别为4、3、2、1、-1、-4、-3和-2。When the terminal acquires the brightness values of the R components of the preset number of pixels, calculate the brightness value of the R components of the preset number of pixels and the ratio of the R components of the sample image pixels The difference between the brightness values, the difference is used as the second difference of the brightness value of the R component; when the terminal obtains the brightness value of the G component of the preset number of pixels, calculate the The difference between the luminance value of the G component of the preset number of pixels and the luminance value of the G component of the sample image pixel, using the difference as the second difference of the G component luminance value; when the When the terminal acquires the brightness values of the B components of the preset number of pixels, calculate the brightness values of the B components of the preset number of pixels and the brightness values of the B components of the sample image pixels The difference between them is used as the second difference of the brightness value of the B component. For example, when the smart phone obtains the brightness values of the R components of the eight pixels P11, P12, P12, P21, P23, P31, P32 and P33, calculate the R component of the P22 pixel in the sample image The difference between the luminance value and the luminance value of the R component of the eight pixels of P11, P12, P12, P21, P23, P31, P32 and P33. Specifically, referring to FIG. 10 , the FIG. 10 is a schematic diagram of a certain pixel of a sample image and brightness values of R components of a preset number of pixels in an embodiment of the present invention. 10, it can be seen that the brightness value of the R component of the P22 pixel point is 5, the brightness value of the R component of the P11 pixel point is 1, and the brightness value of the R component of the P12 pixel point is 2, so The brightness value of the R component of the P13 pixel point is 3, the brightness value of the R component of the P21 pixel point is 4, the brightness value of the R component of the P23 pixel point is 6, and the R component value of the P31 pixel point is The brightness value is 9, the brightness value of the R component of the P32 pixel point is 8, and the brightness value of the R component of the P33 pixel point is 7. The smart phone calculates the difference between the brightness value of the R component of the P22 pixel point in the sample image and the brightness value of the R component of the eight pixel points P11, P12, P12, P21, P23, P31, P32, and P33. The differences between them are 4, 3, 2, 1, -1, -4, -3, and -2, respectively.

步骤S90,若所述第二差值在第二预设范围内,则根据所述在第二预设范围内所对应的所述预设个数的像素点与所述样本图像的各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。Step S90, if the second difference is within the second preset range, according to the preset number of pixels corresponding to the second preset range and each pixel of the sample image The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component are used to obtain a denoised image.

进一步地,所述步骤S90包括:Further, the step S90 includes:

若所述第二差值在所述第二预设范围内,则获取在所述第二预设范围内的第二差值所对应的所述预设个数的像素点的R、G和B分量的亮度值;If the second difference is within the second preset range, obtain the R, G and R values of the preset number of pixels corresponding to the second difference within the second preset range The brightness value of the B component;

分别计算所获取的所述预设个数的像素点与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;Calculate the average value of R component brightness values, the average value of G component brightness values, and the average value of B component brightness values between the obtained preset number of pixels and each pixel point of the sample image;

将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component are recombined into new pixels to obtain a denoised image.

当所述终端得到所述R分量亮度值的第二差值,且判定所述R分量亮度值的第二差值在第二预设范围内时,获取所述在所述第二预设范围内的R分量亮度值的第二差值所对应的所述预设个数的像素点的R分量的亮度值,计算所获取的所述预设个数的像素点的R分量的亮度值和所述样本图像的各个像素点的R分量亮度值的平均值,将所述R分量亮度值的平均值作为新的像素点的R分量的亮度值。当所述终端判定所述G分量亮度值的第二差值和/或所述B分量亮度值的第二差值在所述第二预设范围内,所述终端的处理过程与判定所述R分量亮度值的第二差值在所述第二预设范围内的过程类似,在此不再赘述。其中,所述第二预设范围可以与所述第一预设范围一致,也可以与所述第一预设范围不一致。当所述终端得到新的像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值时,将所述新的像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值重新组合成新的像素点,将所述新的像素点作为新的图像的像素点,得到所述新的图像,所述新的图像即为去噪后的图像。如当所述第二预设范围为-2到2时,所述智能手机判定所述P22像素点的R分量的亮度值与所述P13、P21、P23和P33像素点的R分量的亮度值之间的差值在-2到2范围内,则对应获取所述P13、P21、P23和P33像素点的R分量的亮度值为3、4、6和7。所述智能手机计算所述P22像素点的R分量的亮度值5与所述P13、P21、P23和P33像素点的R分量的亮度值为3、4、6和7的平均值,得到的平均值为5,则将5作为去噪图像P22位置像素点的R分量的亮度值。当所述智能手机得到去噪图像P22位置像素点的G分量的亮度值和B分量的亮度值时,将所述P22位置像素点的R分量的亮度值、G分量的亮度值和B分量的亮度值重新组合成去噪图像的P22位置像素点。所述智能手机通过这种方法,得到完整的一幅去噪后的图像。When the terminal obtains the second difference value of the R component luminance value and determines that the second difference value of the R component luminance value is within a second preset range, acquire the The brightness values of the R components of the preset number of pixels corresponding to the second difference value of the brightness values of the R components in the interior are calculated, and the sum of the acquired brightness values of the R components of the preset number of pixels is calculated. The average value of the R component luminance values of each pixel in the sample image is used as the new R component luminance value of the pixel. When the terminal determines that the second difference of the luminance value of the G component and/or the second difference of the luminance value of the B component is within the second preset range, the processing procedure of the terminal is the same as that of determining the The process of the second difference of R component luminance values being within the second preset range is similar, and will not be repeated here. Wherein, the second preset range may be consistent with the first preset range, or may be inconsistent with the first preset range. When the terminal obtains the luminance value of the R component, the luminance value of the G component, and the luminance value of the B component of the new pixel, the luminance value of the R component, the luminance value of the G component, and the B The brightness values of the components are recombined into new pixels, and the new pixels are used as pixels of a new image to obtain the new image, and the new image is a denoised image. For example, when the second preset range is -2 to 2, the smart phone determines the brightness value of the R component of the P22 pixel point and the brightness value of the R component of the P13, P21, P23, and P33 pixel points If the difference between them is in the range of -2 to 2, the brightness values of the R components of the P13, P21, P23 and P33 pixels are correspondingly obtained as 3, 4, 6 and 7. The smart phone calculates the average value of the luminance value 5 of the R component of the P22 pixel point and the luminance value of the R component of the P13, P21, P23, and P33 pixel points 3, 4, 6, and 7, and the obtained average If the value is 5, then 5 is used as the brightness value of the R component of the pixel at the P22 position of the denoised image. When the smart phone obtains the brightness value of the G component and the brightness value of the B component of the pixel at the P22 position of the denoising image, the brightness value of the R component, the brightness value of the G component and the brightness value of the B component of the pixel at the P22 position The brightness value is recombined into the P22 pixel of the denoised image. In this way, the smart phone obtains a complete image after denoising.

更进一步地,所述图像去噪方法还包括:Further, the image denoising method also includes:

判断所述第二差值是否在第二预设范围内;judging whether the second difference is within a second preset range;

若所述第二差值未在所述第二预设范围内,则丢弃所述未在所述第二预设范围内的第二差值所对应的所述预设个数的像素点。If the second difference value is not within the second preset range, discarding the preset number of pixel points corresponding to the second difference value not within the second preset range.

当所述终端获取得到所述R分量亮度值的第二差值时,判断所述R分量亮度值的第二差值是否在所述第二预设范围内。若所述R分量亮度值的第二差值未在所述第二预设范围内,所述终端则丢弃所述未在所述第二预设范围内的R分量亮度值的第二差值所对应的所述预设个数的像素点的R分量的亮度值。如所述智能手机判定所述P22像素点的R分量的亮度值与所述P11、P12、P31和P32像素点的R分量的亮度值之间的差值未在-2到2范围内时,则丢弃所述P11、P12、P31和P32像素点的R分量的亮度值,不对所述P11、P12、P31和P32像素点的R分量的亮度值进行计算。当所述终端判定所述G分量亮度值的第二差值和/或所述B分量亮度值的第二差值未在所述第二预设范围内,所述终端的处理过程与所述R分量亮度值的第二差值未在所述第二预设范围内的过程类似,在此不再赘述。When the terminal obtains the second difference of the brightness value of the R component, it is determined whether the second difference of the brightness value of the R component is within the second preset range. If the second difference value of the R component luminance value is not within the second preset range, the terminal discards the second difference value of the R component luminance value not within the second preset range Brightness values of the R components of the corresponding preset number of pixels. If the smart phone determines that the difference between the luminance value of the R component of the P22 pixel point and the luminance value of the R component of the P11, P12, P31, and P32 pixel points is not within the range of -2 to 2, Then the brightness values of the R components of the P11, P12, P31 and P32 pixels are discarded, and the brightness values of the R components of the P11, P12, P31 and P32 pixels are not calculated. When the terminal determines that the second difference of the luminance value of the G component and/or the second difference of the luminance value of the B component is not within the second preset range, the processing procedure of the terminal is the same as that of the The process in which the second difference of the luminance value of the R component is not within the second preset range is similar and will not be repeated here.

本实施例通过当所述样本图像各个像素点的R、G和B分量的亮度值对应与所述待对比图像各个像素点的R、G和B分量的亮度值之间的差值都未在第一预设范围内时,在所述样本图像各个像素点的预设范围内选取预设个数的像素点,从而得到去噪后的图像,避免了在对图像去噪过程中计算量大,去噪效果差,容易造成图像边缘细节损失的问题。In this embodiment, when the brightness values of the R, G, and B components of each pixel in the sample image correspond to the brightness values of the R, G, and B components of each pixel in the image to be compared, the difference between the brightness values is not within When within the first preset range, select a preset number of pixels within the preset range of each pixel of the sample image to obtain a denoised image, avoiding a large amount of calculation in the image denoising process , the denoising effect is poor, and it is easy to cause the loss of image edge details.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.

Claims (10)

1.一种图像去噪装置,其特征在于,所述图像去噪装置包括:1. An image denoising device, characterized in that the image denoising device comprises: 第一获取模块,用于获取终端拍摄的连续的多帧图像,将所述多帧图像中的其中一帧图像作为样本图像,其余的作为待对比图像,其中,所述多帧图像的格式为RGB图像格式;The first acquisition module is configured to acquire continuous multi-frame images taken by the terminal, and use one of the multi-frame images as a sample image, and the rest as images to be compared, wherein the format of the multi-frame images is: RGB image format; 第二获取模块,用于分别获取所述样本图像各个像素点的R、G和B分量的亮度值,和所述待对比图像各个像素点的R、G和B分量的亮度值;The second acquisition module is used to respectively acquire the brightness values of the R, G and B components of each pixel point of the sample image, and the brightness values of the R, G and B components of each pixel point of the image to be compared; 处理模块,用于若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。A processing module, configured to if the difference between the luminance values of the R, G and B components of each pixel of the sample image and the luminance values of the R, G and B components corresponding to each pixel of the image to be compared Within a preset range, the denoised image is obtained according to the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component between the image to be compared and each pixel point of the sample image. Image. 2.如权利要求1所述的图像去噪装置,其特征在于,所述图像去噪装置还包括:2. The image denoising device according to claim 1, wherein the image denoising device further comprises: 计算模块,用于分别计算所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值,将所述差值作为第一差值;a calculation module, configured to calculate the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared, using said difference as a first difference; 判断模块,用于判断所述第一差值是否都未在第一预设范围内;A judging module, configured to judge whether the first difference is not within the first preset range; 选取模块,用于若所述第一差值都未在所述第一预设范围内,则在所述样本图像各个像素点的预设范围内选取预设个数的像素点;A selecting module, configured to select a preset number of pixels within a preset range of each pixel of the sample image if none of the first difference values is within the first preset range; 所述第二获取模块,还用于获取所述预设个数的像素点的R、G和B分量的亮度值;The second obtaining module is also used to obtain brightness values of R, G and B components of the preset number of pixels; 所述计算模块,还用于分别计算所述预设个数的像素点的R、G和B分量的亮度值与所述样本图像像素点的R、G和B分量的亮度值之间的差值,作为第二差值;The calculation module is also used to separately calculate the difference between the brightness values of the R, G and B components of the preset number of pixels and the brightness values of the R, G and B components of the sample image pixels value, as the second difference; 所述处理模块,还用于若所述第二差值在第二预设范围内,则根据所述在第二预设范围内所对应的所述预设个数的像素点与所述样本图像的各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。The processing module is further configured to: if the second difference is within a second preset range, according to the preset number of pixels corresponding to the second preset range and the sample The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component among each pixel of the image obtain the image after denoising. 3.如权利要求2所述的图像去噪装置,其特征在于,所述判断模块,还用于判断所述第二差值是否在第二预设范围内;3. The image denoising device according to claim 2, wherein the judging module is further configured to judge whether the second difference is within a second preset range; 所述图像去噪装置还包括丢弃模块,用于若所述第二差值未在所述第二预设范围内,则丢弃所述未在所述第二预设范围内的第二差值所对应的所述预设个数的像素点。The image denoising device further includes a discarding module, configured to discard the second difference that is not within the second preset range if the second difference is not within the second preset range The corresponding preset number of pixels. 4.如权利要求2所述的图像去噪装置,其特征在于,所述处理模块包括:4. image denoising device as claimed in claim 2, is characterized in that, described processing module comprises: 获取单元,用于若所述第二差值在所述第二预设范围内,则获取在所述第二预设范围内的第二差值所对应的所述预设个数的像素点的R、G和B分量的亮度值;An acquiring unit, configured to acquire the preset number of pixels corresponding to the second difference within the second preset range if the second difference is within the second preset range Luminance values of the R, G and B components of ; 第一计算单元,用于分别计算所获取的所述预设个数的像素点与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;The first calculation unit is used to separately calculate the average value of R component luminance values, the average value of G component luminance values and the B component luminance between the obtained preset number of pixels and each pixel point of the sample image the average of the values; 第一处理单元,用于将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The first processing unit is configured to recombine the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component into new pixels, so as to obtain a denoised image. 5.如权利要求1至4任一项所述的图像去噪装置,其特征在于,所述处理模块还包括:5. The image denoising device according to any one of claims 1 to 4, wherein the processing module further comprises: 确定单元,用于若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则确定所述差值在所述第一预设范围内所对应的所述待对比图像各个像素点的R、G和B分量的亮度值;The determination unit is configured to determine if the difference between the luminance values of the R, G and B components of each pixel of the sample image and the luminance values of the R, G and B components corresponding to each pixel of the image to be compared Within a preset range, determine the brightness values of the R, G, and B components of the respective pixels of the image to be compared corresponding to the difference within the first preset range; 第二计算单元,用于分别计算在所述第一预设范围内的所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;The second calculation unit is used to respectively calculate the average value of the R component brightness value, the average value of the G component brightness value and the average value of the G component brightness value between the image to be compared and each pixel point of the sample image within the first preset range. The average value of the brightness value of the B component; 第二处理单元,用于将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The second processing unit is configured to recombine the average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component into new pixels, so as to obtain a denoised image. 6.一种图像去噪方法,其特征在于,所述图像去噪方法包括以下步骤:6. An image denoising method, characterized in that, the image denoising method comprises the following steps: 获取终端拍摄的连续的多帧图像,将所述多帧图像中的其中一帧图像作为样本图像,其余的作为待对比图像,其中,所述多帧图像的格式为RGB图像格式;Acquiring continuous multi-frame images taken by the terminal, using one of the multi-frame images as a sample image, and the rest as images to be compared, wherein the format of the multi-frame images is an RGB image format; 分别获取所述样本图像各个像素点的R、G和B分量的亮度值,和所述待对比图像各个像素点的R、G和B分量的亮度值;Respectively acquire brightness values of R, G and B components of each pixel point of the sample image, and brightness values of R, G and B components of each pixel point of the image to be compared; 若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。If the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared is within the first preset range , the image after denoising is obtained according to the average value of R component luminance values, the average value of G component luminance values and the average value of B component luminance values between the image to be compared and each pixel point of the sample image. 7.如权利要求6所述的图像去噪方法,其特征在于,所述分别获取所述样本图像各个像素点的R、G和B分量的亮度值,和所述待对比图像各个像素点的R、G和B分量的亮度值的步骤之后,还包括:7. The image denoising method according to claim 6, wherein the brightness values of the R, G and B components of each pixel point of the sample image are respectively obtained, and the brightness values of each pixel point of the image to be compared are respectively obtained. After the steps of the luminance values of the R, G and B components, also include: 分别计算所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值,将所述差值作为第一差值;Calculate the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared, and convert the difference as the first difference; 判断所述第一差值是否都未在第一预设范围内;judging whether the first difference is not within a first preset range; 若所述第一差值都未在所述第一预设范围内,则在所述样本图像各个像素点的预设范围内选取预设个数的像素点;If none of the first difference values is within the first preset range, selecting a preset number of pixels within a preset range of each pixel of the sample image; 获取所述预设个数的像素点的R、G和B分量的亮度值;Obtain the brightness values of the R, G and B components of the preset number of pixels; 分别计算所述预设个数的像素点的R、G和B分量的亮度值与所述样本图像像素点的R、G和B分量的亮度值之间的差值,作为第二差值;Calculate the difference between the luminance values of the R, G, and B components of the preset number of pixels and the luminance values of the R, G, and B components of the sample image pixels, as the second difference; 若所述第二差值在第二预设范围内,则根据所述在第二预设范围内所对应的所述预设个数的像素点与所述样本图像的各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像。If the second difference is within the second preset range, according to the R between the preset number of pixels corresponding to the second preset range and each pixel of the sample image The average value of component luminance values, the average value of G component luminance values, and the average value of B component luminance values obtain a denoised image. 8.如权利要求7所述的图像去噪方法,其特征在于,所述分别计算所述预设个数的像素点的R、G和B分量的亮度值与所述样本图像像素点的R、G和B分量的亮度值之间的差值,作为第二差值的步骤之后,还包括:8. The image denoising method according to claim 7, wherein said calculation of the luminance values of the R, G and B components of the preset number of pixels and the R of the sample image pixels respectively , the difference between the luminance values of the G and B components, after the step of the second difference, also includes: 判断所述第二差值是否在第二预设范围内;judging whether the second difference is within a second preset range; 若所述第二差值未在所述第二预设范围内,则丢弃所述未在所述第二预设范围内的第二差值所对应的所述预设个数的像素点。If the second difference value is not within the second preset range, discarding the preset number of pixel points corresponding to the second difference value not within the second preset range. 9.如权利要求7所述的图像去噪方法,其特征在于,所述若所述第二差值在第二预设范围内,则根据所述在第二预设范围内所对应的所述预设个数的像素点与所述样本图像的各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像的步骤包括:9. The image denoising method according to claim 7, wherein if the second difference is within a second preset range, then according to the corresponding value within the second preset range The step of obtaining the denoised image by the average value of R component luminance value, the average value of G component luminance value and the average value of B component luminance value between the preset number of pixels and each pixel point of the sample image include: 若所述第二差值在所述第二预设范围内,则获取在所述第二预设范围内的第二差值所对应的所述预设个数的像素点的R、G和B分量的亮度值;If the second difference is within the second preset range, obtain the R, G and R values of the preset number of pixels corresponding to the second difference within the second preset range The brightness value of the B component; 分别计算所获取的所述预设个数的像素点与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;Calculate the average value of R component brightness values, the average value of G component brightness values, and the average value of B component brightness values between the obtained preset number of pixels and each pixel point of the sample image; 将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component are recombined into new pixels to obtain a denoised image. 10.如权利要求6至9任一项所述的图像去噪方法,其特征在于,所述若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则根据所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值得到去噪后的图像的步骤包括:10. The image denoising method according to any one of claims 6 to 9, wherein if the luminance values of the R, G and B components of each pixel of the sample image are the same as those of the image to be compared If the difference between the luminance values of the R, G and B components corresponding to the pixel is within the first preset range, then according to the average value of the luminance values of the R component between the image to be compared and each pixel of the sample image , the average value of the G component luminance value and the average value of the B component luminance value obtain the denoised image and include: 若所述样本图像各个像素点的R、G和B分量的亮度值与所述待对比图像各个像素点对应的R、G和B分量的亮度值之间的差值在第一预设范围内,则确定所述差值在所述第一预设范围内所对应的所述待对比图像各个像素点的R、G和B分量的亮度值;If the difference between the brightness values of the R, G and B components of each pixel of the sample image and the brightness values of the R, G and B components corresponding to each pixel of the image to be compared is within the first preset range , then determine the luminance values of the R, G and B components of the respective pixels of the image to be compared corresponding to the difference within the first preset range; 分别计算在所述第一预设范围内的所述待对比图像与所述样本图像各个像素点之间R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值;respectively calculating the average value of R component brightness values, the average value of G component brightness values and the average value of B component brightness values between the image to be compared and each pixel point of the sample image within the first preset range ; 将所述R分量亮度值的平均值、G分量亮度值的平均值和B分量亮度值的平均值重新组合成新的像素点,以得到去噪后的图像。The average value of the brightness values of the R component, the average value of the brightness values of the G component, and the average value of the brightness values of the B component are recombined into new pixels to obtain a denoised image.
CN201510864687.8A 2015-11-27 2015-11-27 Image denoising device and method Active CN105513021B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510864687.8A CN105513021B (en) 2015-11-27 2015-11-27 Image denoising device and method
PCT/CN2016/102390 WO2017088609A1 (en) 2015-11-27 2016-10-18 Image denoising apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510864687.8A CN105513021B (en) 2015-11-27 2015-11-27 Image denoising device and method

Publications (2)

Publication Number Publication Date
CN105513021A true CN105513021A (en) 2016-04-20
CN105513021B CN105513021B (en) 2019-07-12

Family

ID=55720979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510864687.8A Active CN105513021B (en) 2015-11-27 2015-11-27 Image denoising device and method

Country Status (2)

Country Link
CN (1) CN105513021B (en)
WO (1) WO2017088609A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017088609A1 (en) * 2015-11-27 2017-06-01 努比亚技术有限公司 Image denoising apparatus and method
WO2017088564A1 (en) * 2015-11-26 2017-06-01 努比亚技术有限公司 Image processing method, device, terminal, and storage medium
CN107220951A (en) * 2017-05-31 2017-09-29 广东欧珀移动通信有限公司 Face image noise reduction method, device, storage medium and computer equipment
CN107230192A (en) * 2017-05-31 2017-10-03 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and mobile terminal
CN108053369A (en) * 2017-11-27 2018-05-18 努比亚技术有限公司 A kind of method of image procossing, equipment and storage medium
CN108769525A (en) * 2018-06-12 2018-11-06 广州视源电子科技股份有限公司 Image adjusting method, device, equipment and storage medium
CN109363630A (en) * 2018-09-03 2019-02-22 浙江大华技术股份有限公司 A kind of vital sign information measurement method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100091194A1 (en) * 2007-03-31 2010-04-15 Sony Deutschland Gmbh Noise reduction method and unit for an image frame
WO2012005081A1 (en) * 2010-07-08 2012-01-12 Ricoh Company, Ltd. Image processing unit, image processing method, and image processing program
CN102843519A (en) * 2011-06-23 2012-12-26 鸿富锦精密工业(深圳)有限公司 Image processing system and method
CN104915940A (en) * 2015-06-03 2015-09-16 厦门美图之家科技有限公司 Alignment-based image denoising method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3965402B2 (en) * 2004-08-23 2007-08-29 富士フイルム株式会社 Noise reduction apparatus and method, and noise reduction program
CN103020908B (en) * 2012-12-05 2015-09-09 华为技术有限公司 The method and apparatus of image noise reduction
CN104123699A (en) * 2013-04-26 2014-10-29 富士通株式会社 Method of reducing image noise and device
CN105513021B (en) * 2015-11-27 2019-07-12 努比亚技术有限公司 Image denoising device and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100091194A1 (en) * 2007-03-31 2010-04-15 Sony Deutschland Gmbh Noise reduction method and unit for an image frame
WO2012005081A1 (en) * 2010-07-08 2012-01-12 Ricoh Company, Ltd. Image processing unit, image processing method, and image processing program
CN102843519A (en) * 2011-06-23 2012-12-26 鸿富锦精密工业(深圳)有限公司 Image processing system and method
CN104915940A (en) * 2015-06-03 2015-09-16 厦门美图之家科技有限公司 Alignment-based image denoising method and system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017088564A1 (en) * 2015-11-26 2017-06-01 努比亚技术有限公司 Image processing method, device, terminal, and storage medium
WO2017088609A1 (en) * 2015-11-27 2017-06-01 努比亚技术有限公司 Image denoising apparatus and method
CN107220951A (en) * 2017-05-31 2017-09-29 广东欧珀移动通信有限公司 Face image noise reduction method, device, storage medium and computer equipment
CN107230192A (en) * 2017-05-31 2017-10-03 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and mobile terminal
WO2018219013A1 (en) * 2017-05-31 2018-12-06 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image processing method and device, computer readable storage medium and electronic device
US10497097B2 (en) 2017-05-31 2019-12-03 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image processing method and device, computer readable storage medium and electronic device
TWI696146B (en) * 2017-05-31 2020-06-11 大陸商Oppo廣東移動通信有限公司 Method and apparatus of image processing, computer reading storage medium and mobile terminal
CN107230192B (en) * 2017-05-31 2020-07-21 Oppo广东移动通信有限公司 Image processing method, apparatus, computer-readable storage medium, and mobile terminal
CN108053369A (en) * 2017-11-27 2018-05-18 努比亚技术有限公司 A kind of method of image procossing, equipment and storage medium
CN108769525A (en) * 2018-06-12 2018-11-06 广州视源电子科技股份有限公司 Image adjusting method, device, equipment and storage medium
CN108769525B (en) * 2018-06-12 2021-04-09 广州视源电子科技股份有限公司 Image adjusting method, device, equipment and storage medium
CN109363630A (en) * 2018-09-03 2019-02-22 浙江大华技术股份有限公司 A kind of vital sign information measurement method and device

Also Published As

Publication number Publication date
CN105513021B (en) 2019-07-12
WO2017088609A1 (en) 2017-06-01

Similar Documents

Publication Publication Date Title
CN105513021B (en) Image denoising device and method
CN105491358B (en) An image processing method, device, and terminal
US10810720B2 (en) Optical imaging method and apparatus
CN109671106B (en) Image processing method, device and equipment
CN105959543B (en) It is a kind of to remove reflective filming apparatus and method
US10516860B2 (en) Image processing method, storage medium, and terminal
CN105430295A (en) Image processing device and method
CN110933334B (en) Video noise reduction method, device, terminal and storage medium
CN113810600A (en) Image processing method, device and terminal device for terminal
CN106603917A (en) Shooting device and method
CN105611264B (en) A kind of auto white balance method and device
CN105183755B (en) A kind of display methods and device of picture
CN105704369A (en) Information-processing method and device, and electronic device
CN113810601A (en) Terminal image processing method and device and terminal equipment
CN105472246A (en) Photographing device and method
US20200059597A1 (en) Shooting method and terminal
CN105872361A (en) Shooting guidance device, system and method
CN105744170A (en) Picture photographing device and method
US12159373B2 (en) Image processing method and apparatus
CN110876014B (en) Image processing method and device, electronic device and storage medium
CN106569666B (en) Mask processing control device and method and terminal
CN105426081B (en) Interface switching device and method of mobile terminal
CN105607810B (en) Leather sheath window information generation method and device
CN104871532B (en) Filming apparatus and its method of controlling operation
CN106993138B (en) Time-gradient image shooting device and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载