CN103986922B - Image processing method - Google Patents
Image processing method Download PDFInfo
- Publication number
- CN103986922B CN103986922B CN201310049795.0A CN201310049795A CN103986922B CN 103986922 B CN103986922 B CN 103986922B CN 201310049795 A CN201310049795 A CN 201310049795A CN 103986922 B CN103986922 B CN 103986922B
- Authority
- CN
- China
- Prior art keywords
- image
- noise
- luminance
- generate
- map
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000012545 processing Methods 0.000 claims abstract description 63
- 238000001914 filtration Methods 0.000 claims abstract description 35
- 241000023320 Luma <angiosperm> Species 0.000 claims abstract description 7
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 claims abstract description 7
- 230000009467 reduction Effects 0.000 claims abstract description 6
- 230000001629 suppression Effects 0.000 claims abstract 2
- 238000000034 method Methods 0.000 claims description 17
- 230000008569 process Effects 0.000 claims description 12
- 238000010586 diagram Methods 0.000 abstract description 6
- 230000000694 effects Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 238000012937 correction Methods 0.000 description 5
- 238000000926 separation method Methods 0.000 description 5
- 239000000203 mixture Substances 0.000 description 3
- 238000009499 grossing Methods 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 229920006395 saturated elastomer Polymers 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本发明是有关于一种图像处理技术,且特别是有关于一种重现图像自然感(naturalappearancereproduction)的图像处理方法。The present invention relates to an image processing technology, and in particular to an image processing method for reproducing natural appearance reproduction of images.
背景技术Background technique
在数码相机的应用中,感光元件或电子信号的噪声滤除是很重要的一环,对于高感光度(HighISO)的数码图像来说尤其重要。在数码图像噪声滤除的过程中,往往会将物体本身的细节纹理以及渐层光影变化等也一并滤除,使得数码图像中的细节纹理呈现块状分布,失去自然风貌。In the application of digital cameras, noise filtering of photosensitive elements or electronic signals is a very important part, especially for high-sensitivity (High ISO) digital images. In the process of digital image noise filtering, the detailed texture and gradient light and shadow changes of the object itself are often filtered out together, so that the detailed texture in the digital image presents a blocky distribution and loses its natural appearance.
为了维持数码图像的自然感,一般针对图像噪声滤除的后处理,主要是利用图像的锐利度(sharpness)强化算法,以强化图像中的物体边缘,达到锐化的效果。对于噪声滤除后导致失去自然风貌的副作用,一般常见的处理方式是调整噪声滤除算法中的参数以减轻此效应,或是在噪声滤除时检测图像的平滑区(smoothingarea)、纹理区(texturearea)及锐利边缘(sharpnessedge),以分别给予不同的噪声滤除参数。In order to maintain the natural feeling of digital images, the post-processing for image noise filtering generally uses image sharpness enhancement algorithms to enhance the edges of objects in the image to achieve a sharpening effect. For the side effect of losing the natural appearance after noise filtering, the common way to deal with it is to adjust the parameters in the noise filtering algorithm to alleviate this effect, or to detect the smoothing area (smoothing area) and texture area ( texturearea) and sharpnessedge (sharpnessedge) to give different noise filtering parameters respectively.
针对噪声滤除后的过度模糊图像,虽然可以使用清晰度强化算法来将物体边缘或纹理区进行锐化,使得图像细节感增加。但在噪声滤除算法中,根据图像平滑区、纹理区及锐利边缘的不同,分别给予不同的噪声滤除参数的作法会造成图像中各个区域的差异性变大,因为不同区域的噪声滤除参数往往会有一定程度的差异。如此一来,视觉上会感觉更加不自然。而如果调整噪声滤除参数以减弱各个区域的差异性,又会形成噪声无法滤除干净的问题。因此,针对噪声滤除后的图像如何呈现图像自然风貌实为待解决的问题。For the excessively blurred image after noise filtering, although the sharpness enhancement algorithm can be used to sharpen the edge or texture area of the object, the image detail is increased. However, in the noise filtering algorithm, according to the smooth area, texture area and sharp edge of the image, giving different noise filtering parameters respectively will cause the difference of each area in the image to become larger, because the noise filtering of different areas Parameters tend to vary to some degree. In this way, it will feel more unnatural visually. However, if the noise filtering parameters are adjusted to weaken the differences in each area, the problem that the noise cannot be filtered out will be formed. Therefore, how to present the natural appearance of the image after noise filtering is a problem to be solved.
发明内容Contents of the invention
本发明提供一种图像处理方法,针对噪声滤除后的图像进行后处理,由此保留较多图像细节信息并且重现图像自然感。The present invention provides an image processing method, which performs post-processing on the noise-filtered image, thereby retaining more image detail information and reproducing the natural sense of the image.
本发明的一种图像处理方法,包括下列步骤。获取贝尔图(Bayerpattern)色彩排列的源图像。对源图像执行第一阶图像处理以产生第一亮度色度格式图像。并对源图像执行第二阶图像处理以产生第二亮度色度格式图像。然后,对第一亮度色度格式图像执行噪声滤除(denoise)处理后产生噪声抑制图像。先对噪声抑制图像中的亮度(luminance)图像与第二亮度色度格式图像中的亮度图像进行权重处理后,合并第二亮度色度格式图像中的色度(chrominance)图像以产生处理后图像。其中噪声抑制图像的噪声降噪程度高于第二亮度色度格式图像的噪声降噪程度。An image processing method of the present invention includes the following steps. Get the source image for the color arrangement of the Bayer pattern. A first stage of image processing is performed on the source image to produce a first luma-chroma format image. And performing second-order image processing on the source image to generate a second luma-chroma format image. Then, a denoise process is performed on the first luminance-chrominance format image to generate a noise-suppressed image. After weighting the luminance image in the noise-suppressed image and the luminance image in the second luminance-chroma format image, merging the chrominance (chrominance) image in the second luminance-chroma format image to generate a processed image . The noise reduction degree of the noise-suppressed image is higher than the noise reduction degree of the second luma-chroma format image.
在本发明的一实施例中,上述的执行第一阶图像处理的步骤包括先对源图像执行贝尔噪声滤除(Bayerdenoise)处理后,再执行颜色插值(colorinterpolation)处理及色彩重建(colorreproduction)处理,以产生第一亮度色度格式图像。In an embodiment of the present invention, the above-mentioned step of performing the first-order image processing includes first performing Bayer denoise processing on the source image, and then performing color interpolation (color interpolation) processing and color reconstruction (color reproduction) processing , to produce a first luma-chroma format image.
在本发明的一实施例中,上述的执行第二阶图像处理的步骤包括直接对源图像执行颜色插值处理及色彩重建处理,以产生第二亮度色度格式图像。In an embodiment of the present invention, the step of performing the second-level image processing includes directly performing color interpolation processing and color reconstruction processing on the source image to generate a second luminance-chroma format image.
在本发明的一实施例中,上述在对源图像执行第二阶图像处理以产生第二亮度色度格式图像的步骤之后,还包括对第二亮度色度格式图像进行转换,以分离出亮度图像与色度图像。接着,针对亮度图像产生对应的噪声图(noisemap)。并且,将亮度图像、噪声图以及色度图像进行混合(blend),以产生具不同特性噪声的输出图像。In an embodiment of the present invention, after the step of performing the second-level image processing on the source image to generate the second luminance-chroma format image, it further includes converting the second luminance-chroma format image to separate the luminance Image and chroma image. Next, a corresponding noise map (noisemap) is generated for the luminance image. Furthermore, the luminance image, the noise image and the chrominance image are blended to generate output images with noises of different characteristics.
在本发明的一实施例中,上述的噪声图的图像尺寸相同于亮度图像的图像尺寸。In an embodiment of the present invention, the image size of the aforementioned noise map is the same as that of the brightness image.
在本发明的一实施例中,上述的噪声图包括多数个正号或负号的数值,每一数值分别对应至亮度图像中的每一像素。In an embodiment of the present invention, the aforementioned noise map includes a plurality of positive or negative values, and each value corresponds to each pixel in the luminance image.
在本发明的一实施例中,其中针对亮度图像产生对应的噪声图的步骤包括:对亮度图像中的每一像素决定各自的噪声数值范围(noiserange)以及各自的噪声偏移量(noiseoffset),由此产生单点噪声图(singlepixelnoisemap);对亮度图像中的每一像素决定各自的模糊遮罩(blurmask),以产生图像遮罩指示图;以及依据图像遮罩指示图将对应的单点噪声图进行模糊化处理,以产生上述的噪声图。In an embodiment of the present invention, the step of generating a corresponding noise map for the luminance image includes: determining a respective noise value range (noiserange) and a respective noise offset (noiseoffset) for each pixel in the luminance image, A single-point noise map (singlepixelnoisemap) is thus generated; a respective blur mask (blurmask) is determined for each pixel in the brightness image to generate an image mask indication map; and the corresponding single-point noise is generated according to the image mask indication map map is blurred to produce the noise map described above.
在本发明的一实施例中,其中先分别对亮度图像中的各个像素决定各个噪声数值范围以及各个噪声偏移量,由此产生上述的单点噪声图的步骤包括:依据亮度图像的区块特性及亮度数值决定噪声数值范围;在噪声数值范围内随机数产生噪声数值;依据亮度图像的亮度数值进行查表,以获得噪声偏移量;以及分别将各个像素的各个噪声数值加上各个噪声偏移量,以获得上述的单点噪声图。In an embodiment of the present invention, each noise value range and each noise offset are determined for each pixel in the luminance image, and the step of generating the above-mentioned single-point noise map includes: according to the block of the luminance image The noise value range is determined by the characteristics and the brightness value; the noise value is generated by a random number within the noise value range; the look-up table is performed according to the brightness value of the brightness image to obtain the noise offset; and each noise value of each pixel is added to each noise value offset to obtain the single-point noise map described above.
在本发明的一实施例中,其中对亮度图像中的各个像素决定各个模糊遮罩,以产生上述的图像遮罩指示图的步骤包括:依据亮度图像的区块特性及各个像素的亮度数值,分别自一模糊遮罩数据库中选取对应的模糊遮罩集合;以及针对各个像素分别自各个模糊遮罩集合中随机数选取一模糊遮罩,以形成上述的图像遮罩指示图。In an embodiment of the present invention, the step of determining each blur mask for each pixel in the luminance image to generate the above-mentioned image mask indication map includes: according to the block characteristics of the luminance image and the luminance value of each pixel, Selecting a corresponding blur mask set from a blur mask database; and selecting a blur mask by random number from each blur mask set for each pixel, so as to form the above-mentioned image mask indication map.
在本发明的一实施例中,上述的模糊遮罩数据库中存储多数个具不同尺寸以及不同样式的模糊遮罩。In an embodiment of the present invention, the above-mentioned blur mask database stores a plurality of blur masks with different sizes and styles.
基于上述,本发明所提供的图像处理方法可输出包含图像细节信息且达到滤除噪声效果的处理后图像,且此方法可避免一般噪声滤除后所产生的块状效应并且消除图像不连续感,以使处理后图像具自然风貌。Based on the above, the image processing method provided by the present invention can output a processed image that contains image detail information and achieves the effect of filtering noise, and this method can avoid the block effect generated after general noise filtering and eliminate the sense of image discontinuity , so that the processed image has a natural look.
为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.
附图说明Description of drawings
图1是依照本发明第一实施例所示的图像处理装置的方块图;FIG. 1 is a block diagram of an image processing device according to a first embodiment of the present invention;
图2是依照本发明第一实施例所示的图像处理方法的流程图;FIG. 2 is a flowchart of an image processing method according to the first embodiment of the present invention;
图3是依照本发明第二实施例所示的图像处理装置的方块图;3 is a block diagram of an image processing device according to a second embodiment of the present invention;
图4是依照本发明第二实施例所示的图像处理方法的流程图;FIG. 4 is a flowchart of an image processing method according to a second embodiment of the present invention;
图5是依照本发明第二实施例所示的噪声产生模块的一种详细实施方式;Fig. 5 is a detailed implementation of the noise generating module according to the second embodiment of the present invention;
图6是依照本发明第二实施例所示的针对亮度图像产生对应的噪声图的一种详细实施方式。Fig. 6 is a detailed implementation manner of generating a corresponding noise map for a luminance image according to the second embodiment of the present invention.
附图标记说明:Explanation of reference signs:
100、300:图像处理装置;100, 300: image processing device;
110:图像获取模块;110: image acquisition module;
120:第一噪声滤除模块;120: a first noise filtering module;
130:色彩重建模块;130: color reconstruction module;
140:第二噪声滤除模块;140: a second noise filtering module;
150、330:合并模块;150, 330: merge modules;
200、400:方法流程;200, 400: method flow;
310:图像分离模块;310: image separation module;
320:噪声产生模块;320: noise generation module;
510:单点噪声决定单元;510: single-point noise determination unit;
512:随机数产生器;512: random number generator;
514:混合器;514: mixer;
520:模糊遮罩决定单元;520: fuzzy mask decision unit;
530:模糊处理单元;530: fuzzy processing unit;
Img1~Img9:图像;Img1~Img9: image;
S210~S250:图像处理方法的各步骤;S210~S250: each step of the image processing method;
S410~S440:图像处理方法的各步骤。S410-S440: each step of the image processing method.
具体实施方式detailed description
第一实施例first embodiment
在本实施例中,为了避免噪声滤除后的图像有不自然感,通过将源图像分离成两个不同图像处理流程进而产生出两张结果图像,其中一张图像包含较多噪声及图像细节信息,另一张图像则较为模糊,最后将两张结果图像作加权总合,以产生具有噪声滤除效果并且包含较多图像细节信息的处理后图像。In this embodiment, in order to avoid the unnatural feeling of the image after noise filtering, the source image is separated into two different image processing processes to generate two result images, one of which contains more noise and image details information, the other image is more blurred, and finally the two resulting images are weighted and summed to produce a processed image with noise filtering effect and more image detail information.
图1是依照本发明第一实施例所示的图像处理装置的方块图。图像处理装置100例如是数码相机、单反相机、数码摄像机或是其他具有图像处理功能的智能手机、平板电脑、笔记本电脑、台式电脑等电子装置,不限于上述。FIG. 1 is a block diagram of an image processing device according to a first embodiment of the present invention. The image processing device 100 is, for example, a digital camera, a SLR camera, a digital video camera, or other electronic devices with image processing functions such as smart phones, tablet computers, notebook computers, and desktop computers, and is not limited to the above.
请参照图1,图像处理装置100包括图像获取模块110、第一噪声滤除模块120、色彩重建模块130、第二噪声滤除模块140以及合并模块150。其中,图像获取模块110包括镜头、感光元件等构件,用以获取图像。色彩重建模块130、第一与第二噪声滤除模块120、140以及合并模块150可为硬件及/或软件所实现的功能模块。其中硬件可包括中央处理器、芯片组、微处理器等具有图像运算处理功能的硬件设备或上述硬件设备的组合,而软件则可以是操作系统、驱动程序等。Referring to FIG. 1 , the image processing device 100 includes an image acquisition module 110 , a first noise filtering module 120 , a color reconstruction module 130 , a second noise filtering module 140 and a combining module 150 . Wherein, the image acquisition module 110 includes components such as a lens, a photosensitive element, etc., to acquire images. The color reconstruction module 130, the first and second noise filtering modules 120, 140, and the combining module 150 may be functional modules implemented by hardware and/or software. The hardware may include central processing unit, chipset, microprocessor and other hardware devices with image computing and processing functions, or a combination of the above hardware devices, while the software may be an operating system, driver program, etc.
图2是依照本发明第一实施例所示的图像处理方法的流程图。请参照图2,本实施例的方法200适用于图像处理装置100,以下即搭配图像处理装置100中的各模块说明本实施例的详细步骤:FIG. 2 is a flowchart of an image processing method according to the first embodiment of the present invention. Please refer to FIG. 2, the method 200 of this embodiment is applicable to the image processing device 100, and the detailed steps of this embodiment are described below with each module in the image processing device 100:
首先,在步骤S210中,图像获取模块110用以获取贝尔图(Bayerpattern)色彩排列的源图像Img1。First, in step S210, the image acquisition module 110 is used to acquire the source image Img1 of the Bayer pattern color arrangement.
接着于步骤S220,对源图像Img1执行第一阶图像处理以产生第一亮度色度格式图像(即YCbCr格式图像,以下简称为第一YCbCr图像Img2)。其中,步骤S120还可分为子步骤S222及S224。也就是说,第一阶图像处理的步骤包括先利用第一噪声滤除模块120来对源图像Img1执行贝尔噪声滤除处理(步骤S122)。之后,色彩重建模块130再执行颜色插值处理及色彩重建处理,以产生第一YCbCr图像Img2。Next, in step S220 , a first-stage image processing is performed on the source image Img1 to generate a first luminance and chrominance format image (ie, a YCbCr format image, hereinafter referred to as the first YCbCr image Img2 ). Wherein, step S120 can also be divided into sub-steps S222 and S224. That is to say, the steps of the first-stage image processing include using the first noise filtering module 120 to perform Bell noise filtering on the source image Img1 (step S122 ). Afterwards, the color reconstruction module 130 performs color interpolation processing and color reconstruction processing to generate the first YCbCr image Img2.
详细而言,由于贝尔图色彩排列的源图像Img1中的每一像素只有红色通道(Rchannel)、绿色通道(Gchannel)或蓝色通道(Bchannel)的其中一种颜色,并非一般显示用的RGB格式图像或YCbCr格式图像。因此,色彩重建模块130会做颜色插值处理以产生一般显示用的三原色图像。更进一步,为了颜色正确呈现,色彩重建模块130还会进行黑色补偿(blackoffset)、RGB增益(RGBgain)调整、色彩校正(Colorcorrection)、伽玛校正(Gammacorrection)等色彩重建处理。之后,色彩重建模块130转换并输出第一YCbCr图像Img2。In detail, since each pixel in the source image Img1 of the Bell diagram color arrangement has only one color of the red channel (Rchannel), green channel (Gchannel) or blue channel (Bchannel), it is not the RGB format for general display image or YCbCr format image. Therefore, the color reconstruction module 130 performs color interpolation processing to generate a three primary color image for general display. Furthermore, in order to present the color correctly, the color reconstruction module 130 also performs color reconstruction processes such as black offset, RGB gain adjustment, color correction, and gamma correction. After that, the color reconstruction module 130 converts and outputs the first YCbCr image Img2.
接着于步骤S230,第二噪声滤除模块140还对第一YCbCr图像Img2进行噪声滤除,产生出较为模糊的噪声抑制图像Img3。此噪声抑制图像Img3中的物体细节或纹理通常随着噪声滤除处理而消失,人眼通常会感觉不自然。Next, in step S230 , the second noise filtering module 140 also performs noise filtering on the first YCbCr image Img2 to generate a blurred noise-suppressed image Img3 . Object details or textures in the noise-suppressed image Img3 usually disappear with the noise filtering process, and human eyes usually feel unnatural.
另一方面,如步骤S240所述,色彩重建模块130再对源图像Img1执行第二阶图像处理以产生第二YCbCr图像Img4。执行第二阶图像处理的步骤包括由色彩重建模块130直接对源图像Img1执行颜色插值处理及色彩重建处理,以产生细节较为清晰的第二YCbCr图像Img4。其中,色彩重建模块130进行部份处理(例如进行色彩校正)会使噪声分布发生变化,产生不自然的噪声感(例如某些颜色饱和区域的噪声较高)。因此,色彩重建模块130会调整色彩校正的对应参数,相较于第一阶图像处理来说,校正强度减弱许多,以使第二YCbCr图像Img4的图像亮度噪声保持自然的感觉。换句话说,噪声抑制图像Img3的噪声降噪程度高于第二YCbCr图像Img4的噪声降噪程度。On the other hand, as described in step S240 , the color reconstruction module 130 performs second-level image processing on the source image Img1 to generate the second YCbCr image Img4 . The step of performing the second-level image processing includes the color reconstruction module 130 directly performing color interpolation processing and color reconstruction processing on the source image Img1 to generate a second YCbCr image Img4 with clearer details. Wherein, the partial processing performed by the color reconstruction module 130 (for example, color correction) will change the noise distribution, resulting in an unnatural sense of noise (for example, the noise in certain color-saturated areas is relatively high). Therefore, the color reconstruction module 130 will adjust the corresponding parameters of the color correction. Compared with the first-stage image processing, the correction intensity is much weaker, so that the image luminance noise of the second YCbCr image Img4 maintains a natural feeling. In other words, the degree of noise reduction of the noise-suppressed image Img3 is higher than that of the second YCbCr image Img4.
在步骤S250,合并模块150先将较模糊的噪声抑制图像Img3中的亮度(luminance)图像与含有较多噪声及细节的第二YCbCr图像Img4中的亮度图像进行权重处理(也称,加权和(weightingsum)运算)。最后,合并模块150再合并第二YCbCr图像中的色度(chrominance)图像以产生包含较多物体细节信息的处理后图像Img5。须说明的是,由于此权重处理也会将噪声一并混合至输出的处里后图像Img5中,这些噪声可以减轻一些噪声滤除后呈区块状的不自然感,使图像更加自然。In step S250, the merging module 150 performs weight processing (also called weighted sum ( weightingsum) operation). Finally, the merging module 150 merges the chrominance images in the second YCbCr image to generate a processed image Img5 containing more object detail information. It should be noted that since this weighting process will also mix noises into the output processed image Img5, these noises can alleviate some unnatural feeling of block-like appearance after noise filtering and make the image more natural.
由于人眼对明暗噪声的感受程度不同,因此合并模块150在最后进行加权和运算时,会参考噪声抑制图像Img3的亮度值来决定权重,以产生出人眼感受较佳的处理后图像Img5。举例来说,对于噪声抑制图像Img3中亮度值为100的像素,合并模块150混合噪声抑制图像Img3与第二YCbCr图像Img4的权重例如设定为80∶20;由于人眼对暗部噪声往往会较为敏感,因此对噪声抑制图像Img3中亮度值为10的像素,合并模块150混合噪声抑制图像Img3与第二YCbCr图像Img4的权重例如设定为90∶10。在一实施例中,针对不同亮度值所设定的权重例如可由本领域具通常知识者预先做设定并存储为表格形式,以使合并模块150能在存储器单元(未在图1示出)中快速查询对应的权重设定值。Since human eyes have different perceptions of bright and dark noises, when performing the weighted sum operation at the end, the combining module 150 will refer to the brightness value of the noise-suppressed image Img3 to determine weights, so as to generate a processed image Img5 that is better perceived by human eyes. For example, for a pixel with a brightness value of 100 in the noise-suppressed image Img3, the weight of the combined module 150 to mix the noise-suppressed image Img3 and the second YCbCr image Img4 is, for example, set to 80:20; Therefore, for pixels with a brightness value of 10 in the noise-suppressed image Img3, the weight of the merging module 150 to mix the noise-suppressed image Img3 and the second YCbCr image Img4 is set to 90:10, for example. In one embodiment, the weights set for different luminance values can be pre-set by those skilled in the art and stored in a table form, so that the combining module 150 can be stored in the memory unit (not shown in FIG. 1 ). Quickly query the corresponding weight setting value in .
在本实施例中,由于第一阶图像处理流程与第二阶图像处理流程中有许多相同或类似的处理步骤,因此可以采用相同硬件(例如是色彩重建模块130)但多次运算的方式,以减少硬件设计上的成本。本实施例不仅可以让噪声滤除后的图像保留图像细节信息,还可消除图像的画质不连续感,提升处理后图像的自然感与图像品质。In this embodiment, since the first-level image processing flow and the second-level image processing flow have many identical or similar processing steps, the same hardware (such as the color reconstruction module 130) can be used but multiple calculations, To reduce the cost of hardware design. This embodiment not only allows the noise-filtered image to retain image detail information, but also eliminates the sense of discontinuity in image quality, and improves the naturalness and image quality of the processed image.
第二实施例second embodiment
在本实施例中,为了避免噪声滤除后造成图像的不自然感,还可通过在图像中随机产生出许多噪声点,并将这些具不同特性的噪声点混和到噪声滤除后的图像中,以达到自然感重现的技术。In this embodiment, in order to avoid the unnatural feeling of the image after noise filtering, it is also possible to randomly generate many noise points in the image and mix these noise points with different characteristics into the image after noise filtering , in order to achieve the technology of natural reproduction.
图3是依照本发明第二实施例所示的图像处理装置的方块图。图像处理装置300例如是数码相机、单反相机、数码摄像机或是其他具有图像处理功能的智能手机、平板电脑、笔记本电脑、台式电脑等电子装置,不限于上述。FIG. 3 is a block diagram of an image processing device according to a second embodiment of the present invention. The image processing device 300 is, for example, a digital camera, a SLR camera, a digital video camera, or other electronic devices with image processing functions such as smart phones, tablet computers, notebook computers, and desktop computers, and is not limited to the above.
请参照图3,图像处理装置300包括图像分离模块310、噪声产生模块320以及合并模块330。图像分离模块310用以将所接收的输入图像分为亮度图像与色度图像。噪声产生模块320用以产生噪声图(noisemap)。合并模块330将亮度图像、噪声图以及色度图像进行混合(blend),以产生具不同特性噪声的输出图像。上述各模块可为硬件及/或软件所实现的功能模块。其中硬件可包括中央处理器、芯片组、微处理器等具有图像运算处理功能的硬件设备或上述硬件设备的组合,而软件则可以是操作系统、驱动程序等。Referring to FIG. 3 , the image processing device 300 includes an image separation module 310 , a noise generation module 320 and a combination module 330 . The image separation module 310 is used for separating the received input image into a luma image and a chrominance image. The noise generating module 320 is used for generating a noise map (noisemap). The merging module 330 blends the luma image, the noise image, and the chrominance image to generate output images with noises of different characteristics. Each of the above-mentioned modules may be a functional module realized by hardware and/or software. The hardware may include central processing unit, chipset, microprocessor and other hardware devices with image computing and processing functions, or a combination of the above hardware devices, while the software may be an operating system, driver program, etc.
图4是依照本发明第二实施例所示的图像处理方法的流程图。请参照图4,本实施例的方法400适用于图像处理装置300,以下即搭配图像处理装置300中的各模块说明本实施例的详细步骤:FIG. 4 is a flowchart of an image processing method according to a second embodiment of the present invention. Please refer to FIG. 4, the method 400 of this embodiment is applicable to the image processing device 300, and the detailed steps of this embodiment are described below with each module in the image processing device 300:
步骤S410,图像分离模块310接收一输入图像Img6。其中,此输入图像Img6例如是第一实施例中的第二YCbCr图像Img4。接下来,在步骤S420,图像分离模块310将此输入图像Img6进行转换,分离出亮度图像(即,Y通道图像)Img7以及色度图像(即,CbCr通道图像)Img8。其中,亮度图像Img7分别传送至噪声产生模块320以及合并模块330;色度图像Img8则直接传送至合并模块330。In step S410, the image separation module 310 receives an input image Img6. Wherein, the input image Img6 is, for example, the second YCbCr image Img4 in the first embodiment. Next, in step S420, the image separation module 310 converts the input image Img6 to separate a luminance image (ie, Y channel image) Img7 and a chrominance image (ie, CbCr channel image) Img8. Wherein, the luminance image Img7 is sent to the noise generation module 320 and the merging module 330 respectively; the chrominance image Img8 is directly sent to the merging module 330 .
在步骤S430,噪声产生模块320针对亮度图像Img7产生对应的噪声图Img9。其中,噪声图Img9的图像尺寸(size)相同于亮度图像Img7的图像尺寸。噪声图Img9为包括多数个正号或负号的数值,其中每一数值分别对应至亮度图像Img7中的每一像素。In step S430 , the noise generating module 320 generates a corresponding noise image Img9 for the luminance image Img7 . Among them, the image size (size) of the noise image Img9 is the same as that of the brightness image Img7. The noise image Img9 is a value including a plurality of positive or negative signs, and each value corresponds to each pixel in the luminance image Img7.
最后,在步骤S440,合并模块330将亮度图像Img7、噪声图Img9以及色度图像Img8进行混合,以产生具不同特性噪声的输出图像Img10。详细地说,合并模块330先将亮度图像Img7中的每一像素的亮度值分别与噪声图Img9中相对应的噪声数值相加,以产生包含噪声点的亮度图像。接着,合并模块330再将包含噪声点的亮度图像与色度图像Img8进行混合,以产生具有自然感的输出图像Img10。其中,此输入图像Img10例如可作为第一实施例中输入合并模块150的图像。Finally, in step S440 , the merging module 330 mixes the luminance image Img7 , the noise image Img9 , and the chrominance image Img8 to generate an output image Img10 with noises of different characteristics. Specifically, the merging module 330 first adds the brightness value of each pixel in the brightness image Img7 to the corresponding noise value in the noise map Img9 to generate a brightness image containing noise points. Next, the merging module 330 mixes the luma image containing noise points with the chrominance image Img8 to generate a natural output image Img10 . Wherein, the input image Img10 can be used as an image input to the merging module 150 in the first embodiment, for example.
须说明的是,在亮度图像Img7中加入噪声点等同于抵销噪声滤除的功能,因此这些噪声点并非可任意随机产生,必须符合使用者的自然观点。也就是说必须参考人眼视觉的喜好,本实施例是根据图像亮度的不同而加入不同尺寸、不同强度以及不同趋势的噪声点,让使用者有更好的视觉感受。以下将以图5与图6来详细说明本实施例的噪声产生模块320如何针对亮度图像Img7来产生对应的噪声图Img9。It should be noted that adding noise points to the luminance image Img7 is equivalent to canceling the function of noise filtering, so these noise points cannot be randomly generated randomly, and must conform to the user's natural viewpoint. That is to say, it is necessary to refer to the preference of human vision. In this embodiment, noise points of different sizes, different intensities, and different trends are added according to the brightness of the image, so that the user can have a better visual experience. How the noise generation module 320 of this embodiment generates the corresponding noise image Img9 for the brightness image Img7 will be described in detail below with reference to FIG. 5 and FIG. 6 .
图5是依照本发明第二实施例所示的噪声产生模块320的一种详细实施方式。请参照图5,噪声产生模块320包括单点噪声决定单元510、模糊遮罩(blurmask)决定单元520以及模糊处理单元530。其中,单点噪声决定单元510还包括随机数产生器512以及混合器(mixer)514。FIG. 5 is a detailed implementation of the noise generating module 320 according to the second embodiment of the present invention. Referring to FIG. 5 , the noise generation module 320 includes a single-point noise determination unit 510 , a blur mask (blurmask) determination unit 520 and a blur processing unit 530 . Wherein, the single point noise determining unit 510 further includes a random number generator 512 and a mixer 514 .
图6是依照本发明第二实施例所示的针对亮度图像产生对应的噪声图的一种详细实施方式。以下请同时配合参照图5与图6。Fig. 6 is a detailed implementation manner of generating a corresponding noise map for a luminance image according to the second embodiment of the present invention. Please refer to Fig. 5 and Fig. 6 together below.
首先,在步骤S610,噪声产生模块320接收一亮度图像Img7。亮度图像Img7分别传送至单点噪声决定单元510以及模糊遮罩决定单元520进行处理。First, in step S610, the noise generating module 320 receives a brightness image Img7. The luminance image Img7 is respectively sent to the single-point noise determination unit 510 and the blur mask determination unit 520 for processing.
在步骤S620,单点噪声决定单元510先对亮度图像中的每一像素决定各自的噪声数值范围(noiserange)以及各自的噪声偏移量(noiseoffset),由此产生单点噪声图(singlepixelnoisemap)。详细地说,单点噪声决定单元510先依据亮度图像Img7的区块特性及每一像素的亮度数值来决定噪声数值范围(-THrange,THrange),其中THrange为大于0的正数。接着,由随机数产生器512随机数产生一噪声数值,其中此噪声数值落在噪声数值范围(-THrange,THrange)之间。接下来,混合器514再将此噪声数值加上对应的一噪声偏移量,用以控制噪声平均强度。亮度图像Img7中的每一像素都经过上述处理后,就可以获得单点噪声图(singlepixelnoisemap)。其中,噪声偏移量可由本领域具通常知识者以表格的形式做预先的设定,依据亮度图像Img7的亮度数值进行查表,便可获得噪声偏移量。噪声偏移量的功用还包括增强图像对比度,以使图像亮部更亮、暗部更暗。In step S620, the single-point noise determining unit 510 first determines a noise range and a noise offset for each pixel in the luminance image, thereby generating a single-pixel noise map. Specifically, the single-point noise determining unit 510 first determines the noise value range (-TH range , TH range ) according to the block characteristics of the brightness image Img7 and the brightness value of each pixel, wherein TH range is a positive number greater than 0. Next, a noise value is randomly generated by the random number generator 512 , wherein the noise value falls within the noise value range (−TH range , TH range ). Next, the mixer 514 adds a corresponding noise offset to the noise value to control the average noise intensity. After each pixel in the brightness image Img7 undergoes the above processing, a single pixel noise map (single pixel noise map) can be obtained. Wherein, the noise offset can be pre-set in the form of a table by those skilled in the art, and the noise offset can be obtained by looking up the table according to the luminance value of the luminance image Img7. The function of noise offset also includes enhancing the contrast of the image, so that the bright part of the image is brighter and the dark part is darker.
另一方面,在步骤S630,模糊遮罩决定单元520对亮度图像中的每一像素决定各自的模糊遮罩(blurmask),以产生图像遮罩指示图。详细地说,由于单点噪声图中每一噪声的数值变化与自然噪声的外观分布会有所不同,自然噪声可能会群聚形成圆形或是其他形状的分布。因此,还需要对单点噪声图使用图像遮罩以产生出不同风格的噪声,所谓的图像遮罩即为模糊遮罩。On the other hand, in step S630 , the blur mask determining unit 520 determines a respective blur mask (blur mask) for each pixel in the luminance image to generate an image mask indication map. In detail, since the numerical variation of each noise in a single-point noise map is different from the apparent distribution of natural noise, natural noise may cluster to form a circular or other shaped distribution. Therefore, it is also necessary to use an image mask on the single-point noise map to generate different styles of noise. The so-called image mask is a blur mask.
由于图像中噪声风格随着亮度略有不同,且相同亮度也会有多种噪声风格。因此,模糊遮罩决定单元520可先依据亮度图像的区块特性及各个像素的亮度数值,自一模糊遮罩数据库中选取对应的模糊遮罩集合。模糊遮罩数据库中存储多数个具不同尺寸以及不同样式的模糊遮罩。举例来说,模糊遮罩可为标准的N*N遮罩,N为大于0的正整数。模糊遮罩数据库中会给予每一模糊遮罩一个编号,假设模糊遮罩数据库中有10组模糊遮罩,则分别编号为1~10。Because the noise style in the image is slightly different with the brightness, and there will be multiple noise styles at the same brightness. Therefore, the blur mask determining unit 520 can firstly select a corresponding blur mask set from a blur mask database according to the block characteristics of the brightness image and the brightness value of each pixel. The blur mask database stores multiple blur masks with different sizes and styles. For example, the blur mask can be a standard N*N mask, where N is a positive integer greater than 0. Each fuzzy mask is given a number in the fuzzy mask database, assuming that there are 10 groups of fuzzy masks in the fuzzy mask database, the numbers are 1-10 respectively.
举例来说,表1是依照第二实施例所示的一种亮度与模糊遮罩集合表。请参照下表1,对应于亮度数值为0例如可以使用编号为1、2或5的模糊遮罩;对应于亮度数值为1例如可以使用编号为2、3或4的模糊遮罩;依次类推。For example, Table 1 is a brightness and blur mask set table according to the second embodiment. Please refer to the following table 1, corresponding to the brightness value of 0, for example, you can use the blur mask numbered 1, 2 or 5; corresponding to the brightness value of 1, for example, you can use the blur mask numbered 2, 3 or 4; and so on .
表1Table 1
模糊遮罩决定单元520再依据亮度值进行查表,以从对应的模糊遮罩集合中随机数选择对应此像素的一个模糊遮罩,并记录其编号。对于每一个像素都记录其对应的模糊遮罩编号之后,即产生本实施例的图像遮罩指示图。The blur mask determining unit 520 then performs table lookup according to the brightness value to randomly select a blur mask corresponding to the pixel from the corresponding blur mask set, and record its number. After recording its corresponding blur mask number for each pixel, the image mask indication map of this embodiment is generated.
回到图6,在步骤S640,模糊处理单元530依据图像遮罩指示图将对应的单点噪声图进行模糊化处理,便可产生具不同特性的噪声图Img9。Returning to FIG. 6 , in step S640 , the blurring processing unit 530 performs blurring processing on the corresponding single-point noise map according to the image mask indication map, so as to generate a noise map Img9 with different characteristics.
综上所述,本发明采用双图像处理路径的方式,第一阶图像处理为产生噪声滤除后的模糊图像,第二阶图像处理为保留图像细节信息及/或具不同特性噪声的清晰图像。通过考虑图像亮暗程度来将两张图像做加权混合,以输出包含图像细节信息且达到滤除噪声效果的处理后图像。此外,本发明采用的图像处理方法可避免一般噪声滤除后所产生的块状效应并且消除图像不连续感,以使处理后图像具自然风貌。To sum up, the present invention adopts a dual image processing path, the first-stage image processing is to generate blurred images after noise filtering, and the second-stage image processing is to retain image detail information and/or clear images with different characteristic noises . By considering the brightness and darkness of the image, the two images are weighted and mixed to output a processed image that contains image detail information and achieves the effect of filtering noise. In addition, the image processing method adopted in the present invention can avoid the block effect produced after general noise filtering and eliminate the sense of image discontinuity, so that the processed image has a natural appearance.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310049795.0A CN103986922B (en) | 2013-02-07 | 2013-02-07 | Image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310049795.0A CN103986922B (en) | 2013-02-07 | 2013-02-07 | Image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103986922A CN103986922A (en) | 2014-08-13 |
CN103986922B true CN103986922B (en) | 2016-03-02 |
Family
ID=51278736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310049795.0A Active CN103986922B (en) | 2013-02-07 | 2013-02-07 | Image processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103986922B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106531125B (en) * | 2017-01-04 | 2019-02-01 | 深圳创维-Rgb电子有限公司 | Method of adjustment, device and the television set of image display brightness |
CN111915528B (en) * | 2020-08-05 | 2024-06-21 | 广州市百果园信息技术有限公司 | Image brightening method and device, mobile terminal and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744702A (en) * | 2004-09-03 | 2006-03-08 | 乐金电子(中国)研究开发中心有限公司 | Image sharpness regulation device of mobile terminal and method thereof |
CN101188773A (en) * | 2006-11-24 | 2008-05-28 | 奥林巴斯映像株式会社 | Camera and image processing method |
WO2010101292A1 (en) * | 2009-03-03 | 2010-09-10 | Sharp Kabushiki Kaisha | Method of and apparatus for processing a video image |
CN102222326A (en) * | 2011-06-28 | 2011-10-19 | 青岛海信信芯科技有限公司 | Method and device for deblurring images based on single low resolution |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003304550A (en) * | 2002-04-11 | 2003-10-24 | Fuji Photo Film Co Ltd | Apparatus for revising reproduction band of video signal |
US7391933B2 (en) * | 2003-10-30 | 2008-06-24 | Samsung Electronics Co., Ltd. | Method and apparatus for image interpolation based on adaptive polyphase filters |
-
2013
- 2013-02-07 CN CN201310049795.0A patent/CN103986922B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744702A (en) * | 2004-09-03 | 2006-03-08 | 乐金电子(中国)研究开发中心有限公司 | Image sharpness regulation device of mobile terminal and method thereof |
CN101188773A (en) * | 2006-11-24 | 2008-05-28 | 奥林巴斯映像株式会社 | Camera and image processing method |
WO2010101292A1 (en) * | 2009-03-03 | 2010-09-10 | Sharp Kabushiki Kaisha | Method of and apparatus for processing a video image |
CN102222326A (en) * | 2011-06-28 | 2011-10-19 | 青岛海信信芯科技有限公司 | Method and device for deblurring images based on single low resolution |
Also Published As
Publication number | Publication date |
---|---|
CN103986922A (en) | 2014-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI511559B (en) | Image processing method | |
US9852499B2 (en) | Automatic selection of optimum algorithms for high dynamic range image processing based on scene classification | |
WO2018176925A1 (en) | Hdr image generation method and apparatus | |
US8311355B2 (en) | Skin tone aware color boost for cameras | |
JP4319620B2 (en) | Local color correction | |
US11323676B2 (en) | Image white balance processing system and method | |
CN112330531B (en) | Image processing method, image processing device, electronic equipment and storage medium | |
US6262778B1 (en) | Image processing system | |
US20210374925A1 (en) | Image Enhancement System and Method | |
EP3953896A1 (en) | High-dynamic-range image generation with pre-combination denoising | |
Kao | High dynamic range imaging by fusing multiple raw images and tone reproduction | |
CN111626967A (en) | Image enhancement method, image enhancement device, computer device and readable storage medium | |
TW202046698A (en) | Image adjustment method and associated image processing circuit | |
JP7296745B2 (en) | Image processing device, image processing method, and program | |
US20180025476A1 (en) | Apparatus and method for processing image, and storage medium | |
Eilertsen | The high dynamic range imaging pipeline | |
CN106341613B (en) | Wide dynamic range image method | |
CN103986922B (en) | Image processing method | |
JP2013114692A (en) | Video processor and video processing method for automatic video correction | |
JP2010102426A (en) | Image processing apparatus and image processing method | |
WO2010128683A1 (en) | Blue sky color detection technique | |
CN113507572A (en) | Video picture display method, device, terminal and storage medium | |
JP2009010636A (en) | Adaption histogram equalization method, and adaption histogram equalization apparatus | |
JP2003304400A (en) | Image processing apparatus and method, program, and recording medium | |
CN117876284A (en) | Image processing method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |