CN107317959B - Image filtering device and image filtering method thereof - Google Patents
Image filtering device and image filtering method thereof Download PDFInfo
- Publication number
- CN107317959B CN107317959B CN201610264679.4A CN201610264679A CN107317959B CN 107317959 B CN107317959 B CN 107317959B CN 201610264679 A CN201610264679 A CN 201610264679A CN 107317959 B CN107317959 B CN 107317959B
- Authority
- CN
- China
- Prior art keywords
- pixel
- pixels
- image
- value
- absolute difference
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
一种影像滤波装置,用以对影像进行滤波,并包含:像素差计算模组、适应性亮度调整模组、权重计算模组及滤波计算模组。像素差计算模组使任一像素做为像素视窗中的中心像素,与像素视窗内的所有像素计算像素绝对差值。适应性亮度调整模组将像素绝对差值各乘以调整参数产生调整后像素绝对差值。权重计算模组根据调整后像素绝对差值产生权重值。滤波计算模组将像素视窗内的各像素的像素值与对应的权重值进行卷积,以产生中心像素的滤波结果。
An image filtering device is used to filter an image, and comprises: a pixel difference calculation module, an adaptive brightness adjustment module, a weight calculation module and a filter calculation module. The pixel difference calculation module uses any pixel as the central pixel in the pixel window and calculates the absolute pixel difference with all pixels in the pixel window. The adaptive brightness adjustment module multiplies the absolute pixel difference by an adjustment parameter to generate an adjusted absolute pixel difference. The weight calculation module generates a weight value according to the adjusted absolute pixel difference. The filter calculation module convolves the pixel value of each pixel in the pixel window with the corresponding weight value to generate a filter result of the central pixel.
Description
技术领域technical field
本发明是有关于一种图像处理技术,且特别是有关于一种影像滤波装置及其影像滤波方法。The present invention relates to an image processing technology, and more particularly, to an image filtering device and an image filtering method thereof.
背景技术Background technique
在影像资料处理过程中,常需要特定核心(kernel)的滤波器对输入影像进行滤波,以产生优化的输出影像。然而,当影像的杂讯强度很大时,边缘保留滤波器的效果往往并不理想。因为中心像素的数值通常不具备代表性,所以边缘保留滤波器动态产生的滤波器权重并不恰当。并且,在相同的数值差异下,一般滤波器经常产生同样一组权重,无法反映出人眼对于不同环境亮度的感受。再者,一般的边缘保留滤波器运算复杂度非常地高,对于硬体实作十分不利。In the process of image data processing, a filter of a specific kernel (kernel) is often required to filter the input image to generate an optimized output image. However, when the noise intensity of the image is very high, the effect of edge preservation filter is often not ideal. Because the value of the center pixel is usually not representative, the filter weights dynamically generated by the edge-preserving filter are not appropriate. Moreover, under the same numerical difference, the general filter often generates the same set of weights, which cannot reflect the human eye's perception of different environmental brightness. Furthermore, the computational complexity of the general edge preserving filter is very high, which is very unfavorable for hardware implementation.
因此,如何设计一个新的影像滤波装置及其影像滤波方法,以解决上述的问题,乃为此一业界亟待解决的问题。Therefore, how to design a new image filtering device and an image filtering method to solve the above problems is an urgent problem to be solved in the industry.
发明内容SUMMARY OF THE INVENTION
因此,本发明的一态样是在提供一种影像滤波装置,用以对影像进行滤波,其中影像包含复数像素(pixel),像素各具有像素值。影像滤波装置包含:像素差计算模组、适应性亮度调整模组、权重计算模组以及滤波计算模组。像素差计算模组配置以使任一像素做为像素视窗中的中心像素,并根据中心像素的像素值与像素视窗内的所有像素的各像素值以计算复数像素绝对差值。适应性亮度调整模组配置以将像素绝对差值各乘以调整参数产生对应的复数调整后像素绝对差值,当各像素绝对差值对应的一对像素的参考亮度愈小时,调整参数愈大,当各像素绝对差值对应的一对像素的参考亮度愈大时,调整参数愈小。权重计算模组配置以根据调整后像素绝对差值产生对应的复数权重值,当调整后像素绝对差值的大小愈小时,所产生的权重值愈大,当调整后像素绝对差值的大小愈大时,所产生权重值愈小。滤波计算模组配置以将像素视窗内的各像素的像素值与对应的权重值进行卷积(convolution),以产生中心像素的滤波结果。Therefore, an aspect of the present invention is to provide an image filtering apparatus for filtering an image, wherein the image includes a plurality of pixels (pixels), each of which has a pixel value. The image filtering device includes: a pixel difference calculation module, an adaptive brightness adjustment module, a weight calculation module and a filter calculation module. The pixel difference calculation module is configured so that any pixel is used as the center pixel in the pixel window, and the absolute difference value of the complex number of pixels is calculated according to the pixel value of the center pixel and each pixel value of all the pixels in the pixel window. The adaptive brightness adjustment module is configured to multiply the pixel absolute difference by the adjustment parameter to generate a corresponding complex adjusted pixel absolute difference. When the reference brightness of a pair of pixels corresponding to each pixel absolute difference is smaller, the adjustment parameter is larger. , when the reference brightness of a pair of pixels corresponding to the absolute difference of each pixel is larger, the adjustment parameter is smaller. The weight calculation module is configured to generate a corresponding complex weight value according to the adjusted absolute pixel difference value. When the size of the adjusted pixel absolute difference value is smaller, the generated weight value is larger. When the value is larger, the generated weight value is smaller. The filtering calculation module is configured to perform convolution between the pixel value of each pixel in the pixel window and the corresponding weight value, so as to generate the filtering result of the central pixel.
本发明的另一态样是在提供一种影像滤波方法,用以对来自摄像装置并包含复数像素的影像进行滤波,影像滤波方法包含:使任一像素做为像素视窗中的中心像素,并根据中心像素的像素值与像素视窗内的所有像素的各像素值以计算复数像素绝对差值;将像素绝对差值各乘以调整参数产生对应的复数调整后像素绝对差值,当各像素绝对差值对应的一对像素的参考亮度愈小时,调整参数愈大,当各像素绝对差值对应的一对像素的参考亮度愈大时,调整参数愈小;根据调整后像素绝对差值产生对应的复数权重值,当调整后像素绝对差值的大小愈小时,所产生的权重值愈大,当调整后像素绝对差值的大小愈大时,所产生权重值愈小;以及将像素视窗内的各像素的像素值与对应的权重值进行卷积,以产生中心像素的滤波结果。Another aspect of the present invention is to provide an image filtering method for filtering an image from a camera device and including a plurality of pixels, the image filtering method comprising: making any pixel as a center pixel in a pixel window, and Calculate the absolute difference value of complex pixels according to the pixel value of the central pixel and each pixel value of all pixels in the pixel window; multiply the absolute pixel difference value by the adjustment parameter to generate the corresponding complex adjusted pixel absolute difference value. The smaller the reference brightness of a pair of pixels corresponding to the difference value is, the larger the adjustment parameter is. When the reference brightness of a pair of pixels corresponding to the absolute difference of each pixel is larger, the adjustment parameter is smaller; The complex weight value of , when the size of the adjusted pixel absolute difference is smaller, the generated weight value is larger, when the adjusted pixel absolute difference value is larger, the generated weight value is smaller; The pixel value of each pixel is convolved with the corresponding weight value to generate the filtering result of the central pixel.
应用本发明的优点在于本发明的影像滤波装置可藉由像素差计算模组计算像素绝对差值,并由适应性亮度调整模组调整像素绝对差值,一方面使权重计算模组动态地针对影像不同的内容产生权重值,一方面可使调整像素绝对差值反映人眼对于亮度的感受能力,以提高滤波品质并达到边缘保留的目的,大幅降低计算以及硬体实现的复杂度。The advantage of applying the present invention is that the image filtering device of the present invention can calculate the absolute pixel difference value by the pixel difference calculation module, and adjust the pixel absolute difference value by the adaptive brightness adjustment module. Different content of the image generates weight values. On the one hand, the absolute difference of the adjusted pixels can reflect the human eye's perception of brightness, so as to improve the filtering quality and achieve the purpose of edge preservation, which greatly reduces the complexity of calculation and hardware implementation.
附图说明Description of drawings
图1为本发明一实施例中,一种影像滤波装置的方块图;FIG. 1 is a block diagram of an image filtering apparatus according to an embodiment of the present invention;
图2A为本发明一实施例中,影像的示意图;2A is a schematic diagram of an image according to an embodiment of the present invention;
图2B为本发明一实施例中,经过前处理后的影像的示意图;2B is a schematic diagram of an image after preprocessing in an embodiment of the present invention;
图2C为本发明一实施例中,由像素差计算模组根据前处理后的像素计算产生的像素绝对差值计算结果的示意图;2C is a schematic diagram of a pixel absolute difference calculation result generated by a pixel difference calculation module according to pre-processed pixel calculation according to an embodiment of the present invention;
图2D为本发明一实施例中,由适应性亮度调整模组根据像素绝对差值计算产生的调整后像素绝对差值计算结果的示意图;2D is a schematic diagram of a calculation result of the adjusted absolute pixel difference value generated by the adaptive brightness adjustment module according to the calculation of the pixel absolute difference value according to an embodiment of the present invention;
图2E为本发明一实施例中,由权重计算模组根据调整后像素绝对差值产生的权重值计算结果的示意图;以及2E is a schematic diagram of a weight value calculation result generated by the weight calculation module according to the adjusted absolute pixel difference according to an embodiment of the present invention; and
图3为本发明一实施例中,一种影像滤波方法的流程图。FIG. 3 is a flowchart of an image filtering method according to an embodiment of the present invention.
符号说明Symbol Description
1:影像滤波装置 100:前处理模组1: Image filtering device 100: Pre-processing module
101、101’:影像 102:像素差计算模组101, 101’: Image 102: Pixel Difference Calculation Module
103:像素绝对差值计算结果 104:适应性亮度调整模组103: Calculation result of pixel absolute difference 104: Adaptive brightness adjustment module
105:调整后像素绝对差值计算 106:权重计算模组105: Calculation of absolute pixel difference after adjustment 106: Weight calculation module
结果 107:权重值计算结果Result 107: Weight value calculation result
108:滤波计算模组 109:滤波结果108: Filter calculation module 109: Filter result
2:摄像装置 300:影像滤波方法2: Camera device 300: Image filtering method
301-305:步骤301-305: Steps
具体实施方式Detailed ways
请参照图1。图1为本发明一实施例中,一种影像滤波装置1的方块图。影像滤波装置1可用以对来自摄像装置2并包含复数像素(pixel)的影像101进行滤波,以产生滤波后的影像。其中,各像素具有一个像素值,此像素值可为例如,但不限于在YUV色彩空间中的Y值,或是由RGB色彩空间中的红色像素值、绿色像素值及蓝色像素值转换为YUV色彩空间中的Y值而产生。Please refer to Figure 1. FIG. 1 is a block diagram of an image filtering
于本实施例中,影像滤波装置1包含:前处理模组100、像素差计算模组102、适应性亮度调整模组104、权重计算模组106以及滤波计算模组108。In this embodiment, the
于不同实施例中,摄像装置2可为例如,但不限于包括电荷耦合元件(Charge-coupled device;CCD)或互补式金氧半导体(Complementary Metal OxideSemiconductor;CMOS)的感光元件的数位摄像装置,以产生影像101。In different embodiments, the
前处理模组100配置以接收摄像装置2的影像101,并根据摄像装置2的杂讯特性对影像101进行前处理。摄像装置2的杂讯特性可经由训练(training)得知。于一实施例中,摄像装置2的杂讯特性为高斯(Gaussian)形式或随机形式。此时前处理模组100所进行的前处理可为例如,但不限于高斯滤波。于另一实施例中,摄像装置2的杂讯特性为脉冲(impulse)形式。此时前处理模组100所进行的前处理为例如,但不限于中位数滤波。The
请同时参照图2A。图2A为本发明一实施例中,影像101的示意图。需注意的是,于图2A中,是范例性的绘示25个像素。然而本发明中影像101的像素数目并不以此为限。Please also refer to FIG. 2A . FIG. 2A is a schematic diagram of an
于一实施例中,对影像101中的任一个像素进行的前处理,是以该像素做为中心像素,并与其周围例如,但不限于3×3的大小的像素视窗中包含的像素进行运算。In one embodiment, the pre-processing performed on any pixel in the
举例来说,图2A中的影像101包含像素P00-P22。其中像素P00-P22形成一个以像素P11做为中心像素的像素视窗。其中,像素P00-P22的像素值分别为例如,但不限于200、220、240、150、70、140、180、100及120。For example,
当前处理为高斯滤波时,前处理模组100将像素P00-P22的像素值进行平均或是加权平均,所产生的数值将为像素P11经过前处理后的像素值。以平均运算为例,如前处理模组100将像素P00-P22的像素值直接进行平均,所产生的数值157将是像素P11经过前处理后的像素值。When the current processing is Gaussian filtering, the
当前处理为中位数滤波时,前处理模组100将取像素P00-P22的像素值的中位数,该中位数将为像素P11经过前处理后的像素值。其中,中位数滤波可有效地去除高斯滤波无法移除的突波杂讯。When the current processing is median filtering, the
于一实施例中,前处理模组100可以例如,但不限于比较网路(comparisonnetwork)的电路(未绘示)实现。比较网路电路可平行地同时将像素P00-P22进行两个一组的比较,使得在固定次数的比较下找出中位数,有利于硬体上的平行处理。In one embodiment, the
请同时参照图2B。图2B为本发明一实施例中,经过前处理后的影像101’的示意图。Please also refer to FIG. 2B . FIG. 2B is a schematic diagram of an image 101' after preprocessing according to an embodiment of the present invention.
由于像素P00-P22的中位数为150,因此经过中位数滤波后,影像101’中的像素P11的像素值将为150。类似地,像素P00-P10以及P12-P22亦可分别根据以其为中心的周边像素进行中位数滤波。于本实施例中,像素P00-P10以及P12-P22经过前处理后,像素值分别为200、220、220、150、130、120、120及110。Since the median of pixels P 00 -P 22 is 150, the pixel value of pixel P 11 in
像素差计算模组102接收前处理后的影像101’,使任一像素P00-P22做为像素视窗中的中心像素,并根据中心像素的像素值与像素视窗内的所有像素的各像素值以计算像素绝对差值。举例来说,当以像素P11做为中心像素,并与3×3的像素视窗内的像素进行计算时,将可得到像素绝对差值计算结果103,包含例如,但不限于多个像素绝对差值D00-D22。每个像素绝对差值D00-D22分别为像素视窗内的中心像素P11与像素视窗内的各像素P00-P22间的绝对差值。The pixel
请同时参照图2C。图2C为本发明一实施例中,由像素差计算模组102根据前处理后的像素计算产生的像素绝对差值计算结果103的示意图。Please also refer to FIG. 2C. FIG. 2C is a schematic diagram of the pixel absolute difference calculation result 103 generated by the pixel
于本实施例中,像素绝对差值D00-D22是中心像素P11与像素视窗内的各像素P00-P22间的差值的绝对值。因此,根据图2B中经过前处理后的像素值,像素绝对差值D00-D22将分别为50、70、80、0、0、20、30、30及40。需注意的是,于不同实施例中,像素差计算模组102可以一范数(one-norm,或称曼哈顿距离)或是二范数(two-norm,或称欧几里得距离)方式来计算像素绝对差值像素绝对差值D00-D22,而不限于上述的计算方式。In this embodiment, the pixel absolute difference values D 00 -D 22 are the absolute values of the differences between the central pixel P 11 and the pixels P 00 -P 22 in the pixel window. Therefore, according to the pre-processed pixel values in FIG. 2B , the absolute pixel differences D 00 -D 22 will be 50, 70, 80, 0, 0, 20, 30, 30, and 40, respectively. It should be noted that, in different embodiments, the pixel
接着,适应性亮度调整模组104将像素绝对差值D00-D22各乘以调整参数以产生对应的调整后像素绝对差值计算结果105,包含例如,但不限于多个调整后像素绝对差值D00’-D22’。Next, the adaptive
请同时参照图2D。图2D为本发明一实施例中,由适应性亮度调整模组104根据像素绝对差值D00-D22计算产生的调整后像素绝对差值计算结果105的示意图。Please also refer to Figure 2D. FIG. 2D is a schematic diagram of a
于一实施例中,当像素绝对差值D00-D22对应的一对像素的参考亮度愈小时,调整参数愈大。当像素绝对差值对应的像素的参考亮度愈大时,调整参数愈小。于一实施例中,可藉由该对像素的两个像素值选取最小的一者,作为参考亮度。并且,调整参数可由与参考亮度相关的函数决定。In one embodiment, when the reference luminance of a pair of pixels corresponding to the absolute pixel difference values D 00 -D 22 is smaller, the adjustment parameter is larger. When the reference brightness of the pixel corresponding to the pixel absolute difference is larger, the adjustment parameter is smaller. In one embodiment, the smallest one can be selected from the two pixel values of the pair of pixels as the reference luminance. Also, the adjustment parameter may be determined by a function related to the reference luminance.
举例来说,如一个像素的值介于0~255间,则对于一对像素Pi,j及Pi+m,j+n来说,其对应的调整参数可为二的幂次方,例如2K,且此幂次方K的大小是由例如,但不限于下面的函数所决定:For example, if the value of a pixel is between 0 and 255, for a pair of pixels P i,j and P i+m,j+n , the corresponding adjustment parameter can be a power of two, For example, 2 K , and the size of this power K is determined by functions such as, but not limited to, the following:
其中,F1[0]=0、F1[1]=1、F1[2]=1、F1[3]=2、F1[4]=2、F1[5]=3、F1[6]=3、F1[7]=3。Wherein, F 1 [0]=0, F 1 [1]=1, F 1 [2]=1, F 1 [3]=2, F 1 [4]=2, F 1 [5]=3, F 1 [6]=3, F 1 [7]=3.
以对应于像素绝对差值D00的一对像素P00与P11为例,参考亮度是两者间最小的像素值,亦即150。其调整参数所对应的幂次方K将由下式所计算出:Taking a pair of pixels P 00 and P 11 corresponding to the pixel absolute difference value D 00 as an example, the reference luminance is the smallest pixel value between them, that is, 150. The power K corresponding to the adjustment parameter will be calculated by the following formula:
因此,调整后像素绝对差值D00’将为像素绝对差值D00和调整参数2K的相乘结果,亦即D00’=D00×2K=D00×22=50×4=200。于一实施例中,如果计算出的调整后像素绝对差值超过255,则将直接取值为255。Therefore, the adjusted pixel absolute difference value D 00 ′ will be the multiplication result of the pixel absolute difference value D 00 and the
调整后像素绝对差值D01’-D22’可由相同的方式进行计算产生,分别为255、255、0、0、80、120、120及160。The adjusted absolute pixel difference values D 01 ′-D 22 ′ can be calculated in the same way, and are 255, 255, 0, 0, 80, 120, 120 and 160, respectively.
上述的方式相当于将像素值的大小区分为0~31、32~63、…、224~255共八个区间,以反映出该像素的亮度,并根据像素的亮度,对于对应的像素绝对差值的大小进行不同程度的调整。一般来说,人眼对于亮度较低的区域中的亮度变化较为敏感。因此藉由上述的方式,将可使亮度较低的区域的像素绝对差值进行较大程度的调整,亮度较高的区域的像素绝对差值则仅微幅调整,以符合人眼视觉的需求。并且,以2的幂次方实现的调整参数,将可使像素绝对差值直接进行位元左位移得到调整后像素绝对差值,大幅节省计算复杂度。当适应性亮度调整模组104由硬体实现时,将不需要设置大量的乘法器,可大幅节省硬体成本和降低运算时间。The above method is equivalent to dividing the size of the pixel value into eight intervals from 0 to 31, 32 to 63, ..., 224 to 255, so as to reflect the brightness of the pixel, and according to the brightness of the pixel, the absolute difference of the corresponding pixel is calculated. The size of the value is adjusted to different degrees. In general, the human eye is more sensitive to changes in brightness in areas of low brightness. Therefore, by the above method, the absolute pixel difference value of the area with low brightness can be adjusted to a large extent, and the absolute difference value of the pixel in the area with high brightness can be adjusted only slightly, so as to meet the needs of human vision. . In addition, the adjustment parameter realized by the power of 2 will make the absolute difference value of the pixel directly shift the bit to the left to obtain the absolute difference value of the pixel after adjustment, which greatly saves the computational complexity. When the adaptive
需注意的是,上述调整参数的计算方式仅为一范例。于其他实施例中,参考亮度可由例如,但不限于对应的一对像素的平均像素值或是加权平均像素值决定。并且,函数的设计亦可视实际需求而有所不同,不为上述的范例所限。It should be noted that the above-mentioned calculation method of the adjustment parameter is only an example. In other embodiments, the reference luminance may be determined by, for example, but not limited to, the average pixel value or the weighted average pixel value of a corresponding pair of pixels. Moreover, the design of the function may also vary according to actual needs, and is not limited by the above examples.
接着,权重计算模组106判断调整后像素绝对差值D00’-D22’的大小以产生对应的权重值计算结果107,包含多个例如,但不限于多个权重值W00-W22。Next, the
请同时参照图2E。图2E为本发明一实施例中,由权重计算模组106根据调整后像素绝对差值D00’-D22’产生的权重值计算结果107的示意图。Please also refer to FIG. 2E. 2E is a schematic diagram of a weight
于一实施例中,当调整后像素绝对差值D00’-D22’的大小愈小时,权重计算模组106产生愈大的权重值,当调整后像素绝对差值D00’-D22’的大小愈大时,权重计算模组106产生愈小的权重值。于一实施例中,权重值分别为二的幂次方。于其他实施例中,权重值亦可由其他方式产生,不为上述实施例所限。In one embodiment, when the size of the adjusted absolute pixel difference value D 00 ′-D 22 ′ is smaller, the
举例来说,如一个调整后像素绝对差值D00’的值介于0~255间,则对应的权重值W00可为例如2S,且此幂次方S的大小是由例如,但不限于下面的函数所决定:For example, if the value of an adjusted pixel absolute difference value D 00 ′ is between 0 and 255, the corresponding weight value W 00 can be, for example, 2 S , and the size of the power S is determined by, for example, but Not limited to the following functions:
其中,F2[0]=0、F2[1]=1、F2[2]=2、F2[3]=3、F2[4]=4、F2[5]=5、F2[6]=6、F2[7]=7。Wherein, F 2 [0]=0, F 2 [1]=1, F 2 [2]=2, F 2 [3]=3, F 2 [4]=4, F 2 [5]=5, F 2 [6]=6, F 2 [7]=7.
以对应于调整后像素绝对差值D00’为例,其对应的权重值W00将由下式所计算出:Taking the absolute difference value D 00 ′ corresponding to the adjusted pixel as an example, the corresponding weight value W 00 will be calculated by the following formula:
因此,权重值W00将为2S=21=2。Therefore, the weight value W 00 will be 2 S =2 1 =2.
权重值W01-W22可由相同的方式进行计算产生,分别为20、20、27、27、25、24、24及22。The weight values W 01 -W 22 can be calculated in the same way, and are respectively 2 0 , 2 0 , 2 7 , 2 7 , 2 5 , 2 4 , 2 4 and 2 2 .
上述的方式相当于将调整后像素绝对差值的大小区分为0~31、32~63、…、224~255共八个区间,并根据调整后像素绝对差值的大小产生不同的权重值。需注意的是,上述权重值的计算方式仅为一范例。于其他实施例中,函数的设计亦可视实际需求而有所不同,不为上述的范例所限。The above method is equivalent to dividing the size of the adjusted pixel absolute difference into eight intervals of 0-31, 32-63, . . . , 224-255, and generating different weight values according to the adjusted pixel absolute difference. It should be noted that the above calculation method of the weight value is only an example. In other embodiments, the design of the function may vary according to actual requirements, and is not limited by the above examples.
接着,滤波计算模组108将根据影像101’以及权重值计算结果107进行计算。更详细地说,滤波计算模组108将像素视窗内的各像素与对应的权重值进行卷积(convolution),以产生中心像素的滤波结果109。以前述像素P11做为中心像素的范例来说,各像素P00-P22与对应的权重值进行卷积的结果为:Next, the
(200×21+220×20+240×20+150×27+70×27+140×25+180×24+100×24+120×22)/(21+20+20+27+27+25+24+24+22)=38460/328=117(200×2 1 +220×2 0 +240×2 0 +150×2 7 +70×2 7 +140×2 5 +180×2 4 +100×2 4 +120×2 2 )/(2 1 +2 0 +2 0 +2 7 +2 7 +2 5 +2 4 +2 4 +2 2 )=38460/328=117
因此,滤波结果109,亦即像素P11经过滤波后的值将为117。Therefore, the filtered result of 109, ie the filtered value of pixel P 11 , will be 117.
由于权重值是以2的幂次方实现,因此滤波结果FR的计算不需要进行大量的乘法运算,而以位元左位移取代,最终仅需进行一次除法,大幅节省计算复杂度。当滤波计算模组108由硬体实现时,将不需要设置大量的乘法器,可大幅节省硬体成本和降低运算时间。Since the weight value is realized by a power of 2, the calculation of the filtering result FR does not require a large number of multiplication operations, but is replaced by a bit left shift, and finally only one division is required, which greatly saves the computational complexity. When the
需注意的是,对于每个影像101’,每个像素均须经过上述的运算过程,以完成对每个像素的滤波。It should be noted that, for each image 101', each pixel must undergo the above-mentioned operation process to complete the filtering of each pixel.
本发明的影像滤波装置1可藉由像素差计算模组102计算像素绝对差值,并由适应性亮度调整模组104调整像素绝对差值,一方面使权重计算模组106动态地针对影像101不同的内容产生权重值,一方面可使调整像素绝对差值反映人眼对于亮度的感受能力,以提高滤波品质并达到边缘保留的目的。进一步,藉由权重计算模组106产生二的幂次方的权重值,滤波过程在计算以及硬体实现的复杂度可大幅下降。并且,藉由前处理模组100的前处理机制,影像滤波装置1可根据摄像装置2的杂讯特性以适当的方式去除杂讯,降低不同类型的杂讯对影像的影响程度。The
请参照图3。图3为本发明一实施例中,一种影像滤波方法300的流程图。影像滤波方法300可应用于例如,但不限于图1所绘示的影像滤波装置1中。影像滤波方法300包含下列步骤(应了解到,在本实施方式中所提及的步骤,除特别叙明其顺序者外,均可依实际需要调整其前后顺序,甚至可同时或部分同时执行)。Please refer to Figure 3. FIG. 3 is a flowchart of an
于步骤301,由前处理模组100根据摄像装置2的杂讯特性对影像101进行前处理。In
于步骤302,由像素差计算模组102使影像101中的任一像素,例如图2A的像素P11做为像素视窗中的中心像素,并根据中心像素的像素值与像素视窗内的所有像素P00-P22的各像素值以计算像素绝对差值D00-D22。In
于步骤303,由适应性亮度调整模组104将像素绝对差值D00-D22各乘以调整参数产生对应的调整后像素绝对差值D00’-D22’。其中,当各像素绝对差值D00’-D22’对应的一对像素的参考亮度愈小时,调整参数愈大,当各像素绝对差值D00’-D22’对应的一对像素的参考亮度愈大时,调整参数愈小。In
于步骤304,由权重计算模组106根据调整后像素绝对差值D00’-D22’产生对应的权重值W00-W22。其中,当调整后像素绝对差值D00’-D22’的大小愈小时,所产生的权重值愈大,当调整后像素绝对差值D00’-D22’的大小愈大时,所产生权重值愈小。于一实施例中,权重值分别为二的幂次方。In
于步骤305,由滤波计算模组108将像素视窗内的各像素P00-P22与对应的权重值W00-W22进行卷积,以产生中心像素P11的滤波结果109。In
虽然本案内容已以实施方式揭露如上,然其并非配置以限定本案内容,任何熟习此技艺者,在不脱离本案内容的精神和范围内,当可作各种的更动与润饰,因此本案内容的保护范围当视后附的申请专利范围所界定者为准。Although the content of this case has been disclosed as above in an embodiment, it is not configured to limit the content of this case. Anyone who is familiar with this technique can make various changes and modifications without departing from the spirit and scope of the content of this case. Therefore, the content of this case is The scope of protection shall be determined by the scope of the appended patent application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610264679.4A CN107317959B (en) | 2016-04-26 | 2016-04-26 | Image filtering device and image filtering method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610264679.4A CN107317959B (en) | 2016-04-26 | 2016-04-26 | Image filtering device and image filtering method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107317959A CN107317959A (en) | 2017-11-03 |
| CN107317959B true CN107317959B (en) | 2020-01-14 |
Family
ID=60184830
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610264679.4A Active CN107317959B (en) | 2016-04-26 | 2016-04-26 | Image filtering device and image filtering method thereof |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107317959B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110072034B (en) * | 2018-01-23 | 2021-10-08 | 瑞昱半导体股份有限公司 | Image processing method and image processing device |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1925543A (en) * | 2006-08-10 | 2007-03-07 | 威盛电子股份有限公司 | Weight adjusting module and weight adjusting method |
| TW200743372A (en) * | 2006-05-12 | 2007-11-16 | Realtek Semiconductor Corp | Apparatus and method for reducing temporal noise |
| JP2009188605A (en) * | 2008-02-05 | 2009-08-20 | Toshiba Corp | Image processing apparatus and method |
| CN101877759A (en) * | 2009-04-30 | 2010-11-03 | 晨星软件研发(深圳)有限公司 | Image processing device and image processing method |
| CN101883210A (en) * | 2009-05-06 | 2010-11-10 | 晨星软件研发(深圳)有限公司 | Image processing device and image processing method |
| CN101959073A (en) * | 2009-07-16 | 2011-01-26 | 晨星软件研发(深圳)有限公司 | Image processing device and image processing method |
| CN102045488A (en) * | 2009-10-12 | 2011-05-04 | 晨星软件研发(深圳)有限公司 | Image processing method and image processing device |
| CN103312942A (en) * | 2012-03-12 | 2013-09-18 | 华晶科技股份有限公司 | Noise processing method for dynamic range image and image capture device thereof |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7822285B2 (en) * | 2004-05-20 | 2010-10-26 | Omnivision Technologies, Inc. | Methods and systems for locally adaptive image processing filters |
| TWI392334B (en) * | 2009-04-22 | 2013-04-01 | Mstar Semiconductor Inc | Image processing device and image processing method |
-
2016
- 2016-04-26 CN CN201610264679.4A patent/CN107317959B/en active Active
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW200743372A (en) * | 2006-05-12 | 2007-11-16 | Realtek Semiconductor Corp | Apparatus and method for reducing temporal noise |
| CN1925543A (en) * | 2006-08-10 | 2007-03-07 | 威盛电子股份有限公司 | Weight adjusting module and weight adjusting method |
| JP2009188605A (en) * | 2008-02-05 | 2009-08-20 | Toshiba Corp | Image processing apparatus and method |
| CN101877759A (en) * | 2009-04-30 | 2010-11-03 | 晨星软件研发(深圳)有限公司 | Image processing device and image processing method |
| CN101883210A (en) * | 2009-05-06 | 2010-11-10 | 晨星软件研发(深圳)有限公司 | Image processing device and image processing method |
| CN101959073A (en) * | 2009-07-16 | 2011-01-26 | 晨星软件研发(深圳)有限公司 | Image processing device and image processing method |
| CN102045488A (en) * | 2009-10-12 | 2011-05-04 | 晨星软件研发(深圳)有限公司 | Image processing method and image processing device |
| CN103312942A (en) * | 2012-03-12 | 2013-09-18 | 华晶科技股份有限公司 | Noise processing method for dynamic range image and image capture device thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107317959A (en) | 2017-11-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109087269B (en) | Weak light image enhancement method and device | |
| US8014034B2 (en) | Image contrast enhancement | |
| US9076218B2 (en) | Method and image processing device for image dynamic range compression with local contrast enhancement | |
| CN107680056B (en) | Image processing method and device | |
| US8594452B2 (en) | System and method for processing an image edge | |
| US8165420B2 (en) | Noise reduction circuit and image processing device | |
| WO2016206087A1 (en) | Low-illumination image processing method and device | |
| CN109389560B (en) | Adaptive weighted filtering image noise reduction method and device and image processing equipment | |
| CN107993189B (en) | Image tone dynamic adjustment method and device based on local blocking | |
| US20150302558A1 (en) | Image processing device, image processing method, image processing program, and recording medium | |
| JP5767064B2 (en) | Image edge enhancement method | |
| CN109325918B (en) | Image processing method and device and computer storage medium | |
| US20220005165A1 (en) | Image enhancement method and apparatus | |
| CN115937029A (en) | A Method of Underwater Image Enhancement | |
| CN109493296A (en) | Image enchancing method, device, electronic equipment and computer-readable medium | |
| CN107895350A (en) | A kind of HDR image generation method based on adaptive double gamma conversion | |
| CN104318535A (en) | Image defogging method and device and mobile terminal | |
| CN107317959B (en) | Image filtering device and image filtering method thereof | |
| CN114363532B (en) | Focusing method and related device | |
| CN111429381A (en) | Image edge enhancement method and device, storage medium and computer equipment | |
| TWI584642B (en) | Filtering device and filter method of the same | |
| Morel et al. | What is the right center/surround for Retinex? | |
| CN110971837B (en) | ConvNet-based dim light image processing method and terminal equipment | |
| WO2006106750A1 (en) | Image processing device, image processing method, and image processing program | |
| Terai et al. | Color image contrast enhancement by retinex model |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |