CN100399834C - Method and device for determining edge trend of interested pixel - Google Patents
Method and device for determining edge trend of interested pixel Download PDFInfo
- Publication number
- CN100399834C CN100399834C CNB2004100423089A CN200410042308A CN100399834C CN 100399834 C CN100399834 C CN 100399834C CN B2004100423089 A CNB2004100423089 A CN B2004100423089A CN 200410042308 A CN200410042308 A CN 200410042308A CN 100399834 C CN100399834 C CN 100399834C
- Authority
- CN
- China
- Prior art keywords
- pixel
- trend
- edge trend
- edge
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 239000000872 buffer Substances 0.000 claims description 39
- 238000003384 imaging method Methods 0.000 claims 8
- 239000003086 colorant Substances 0.000 description 4
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
Abstract
一种决定一感兴趣像素的边缘趋势的方法与装置,应用于彩色滤光片影像阵列内插系统中,其先判断在该感兴趣像素的周围像素为水平趋势或垂直趋势,跟着统计该周围像素中具有水平趋势者的数目及具有垂直趋势者的数目,再由其中数目较多者的趋势决定该感兴趣像素的边缘趋势。
A method and device for determining the edge trend of a pixel of interest are applied to a color filter image array interpolation system. The method first determines whether the surrounding pixels of the pixel of interest have a horizontal trend or a vertical trend, then counts the number of pixels with horizontal trends and the number of pixels with vertical trends among the surrounding pixels, and then determines the edge trend of the pixel of interest based on the trend of the pixel with the larger number.
Description
技术领域 technical field
本发明是有关一种影像阵列内插法,特别是关于一种在彩色滤光片影像阵列内插系统(Color Filter Array Interpolation;CFAI)中决定一感兴趣像素的边缘趋势(edge trend)的方法与装置。The present invention relates to an image array interpolation method, in particular to a method for determining an edge trend (edge trend) of a pixel of interest in a color filter array interpolation system (Color Filter Array Interpolation; CFAI) with the device.
技术背景technical background
彩色影像可以利用单一的感测器阵列来取得。这种感测器在其阵列中的每一像素位置仅感测单一色彩而产生一色彩值,但是每一像素位置遗失的其它色彩的色彩值利用其邻近像素位置的色彩值内插而产生,因而获得全彩的重建影像。具有特定对应各色彩值的像素位置排列图样(Pattern)的感测器使此种额外色彩值的内插变得容易且有效率。例如在颁给Bayer的美国专利第3,971,065号中的彩色影像阵列,其主导整个影像的色彩是由交错排列的像素位置来感测,其它的像素位置则分别感测另外的两种色彩。此类技巧应用在目前的单一感测器照相机中,其感测器上重叠一特定图样的彩色滤光片阵列,使得该感测器的每一像素位置仅产生对应红色、彩色或蓝色的单一色彩值的讯号。换言之,该感测器所产生的原始影像平面虽然包含红色、绿色及蓝色三种色彩,但是每一像素位置却只有单一色彩的色彩值。为重建全彩的影像,习知的CFAI演算法转换该原始影像平面,使每一像素位置包含红色、绿色及蓝色三个色彩信息的影像平面。因参考邻近像素位置的色彩值计算感兴趣像素位置所遗失的色彩值,因此,所使用的CFAI法将决定最终重建所得的全彩影像的品质。Color images can be obtained using a single sensor array. This sensor senses only a single color at each pixel location in its array to produce a color value, but the color values of the other colors that are missing at each pixel location are generated by interpolation of the color values at its neighboring pixel locations, A full-color reconstructed image is thus obtained. A sensor with a specific pattern of pixel positions corresponding to each color value facilitates and efficiently interpolates such additional color values. For example, in the color image array of US Pat. No. 3,971,065 issued to Bayer, the color that dominates the entire image is sensed by staggered pixel positions, and the other pixel positions sense the other two colors respectively. Such techniques are used in today's single-sensor cameras, where the sensor is overlaid with an array of color filters in a specific pattern so that each pixel position on the sensor produces only the corresponding red, colored or blue color. A signal of a single color value. In other words, although the original image plane generated by the sensor contains three colors of red, green and blue, each pixel position has only a single color value. To reconstruct a full-color image, the conventional CFAI algorithm transforms the original image plane so that each pixel position contains an image plane with three color information of red, green and blue. Since the lost color value of the pixel position of interest is calculated with reference to the color values of adjacent pixel positions, the CFAI method used will determine the quality of the final reconstructed full-color image.
最简单且直接的内插法为双线性(bilinear)内插法,其是将感兴趣像素位置的邻近像素位置的色彩值平均后作为该感兴趣像素位置的色彩值。然而,此种植基于非边缘(non-edged based)的CFAI法会在彩色影像的边缘产生假影。因而损失解析度。另一种植基于边缘的CFAI法可以降低彩色影像边缘的假影效应,因而改善影像的精锐度(Sharpness)。植基于边缘的CFAI法是先判断影像在感兴趣像素位置处的边缘趋势为水平趋势或垂直趋势,再决定采用水平或垂直方向上的邻近像素位置的色彩值进行内插运算,因此,正确地判断影像在感兴趣像素位置处为水平趋势或垂直趋势将决定内插的色彩值是否产生较佳的影像品质。感兴趣像素位置的边缘趋势可由该位置处的色彩值梯度来决定。例如,在图1中显示一6×6的像素阵列10,其中R、G及B分别表示红色、绿色及蓝色三种色彩的色彩值,其下标表示该像素位置的坐标,在括号中的色彩值表示是由内插法产生的,例如在像素(4,3)位置上原本仅存在蓝色色彩值B43,其绿色色彩值G43是从邻近像素位置的色彩值内插而产生。在一习知的CFAI法中,要内插G43时,先计算像素(4,3)位置上的水平及垂直梯度The simplest and direct interpolation method is a bilinear interpolation method, which averages the color values of adjacent pixel positions of the pixel position of interest to obtain the color value of the pixel position of interest. However, this non-edge based CFAI method produces artifacts at the edges of the color image. Thus loss of resolution. Another edge-based CFAI method can reduce the artifact effect of the edge of the color image, thereby improving the sharpness of the image. The edge-based CFAI method first judges whether the edge trend of the image at the pixel position of interest is a horizontal trend or a vertical trend, and then decides to use the color values of adjacent pixel positions in the horizontal or vertical direction for interpolation operations. Therefore, correctly Determining whether the image is trending horizontally or vertically at the pixel of interest will determine whether the interpolated color values produce better image quality. The edge tendency at a pixel location of interest can be determined by the color value gradient at that location. For example, a 6×6
ΔH=|G42-G44|+|B43-B41+B43-B45|+|G33-G32+G33-G34|,公式1及ΔH=|G 42 -G 44 |+|B 43 -B 41 +B 43 -B 45 |+|G 33 -G 32 +G 33 -G 34 |, Formula 1 and
ΔV=|G33-G53|+|B43-B23+B43-B63|+|G32-G42-G34-G44|,公式2ΔV=|G 33 -G 53 |+|B 43 -B 23 +B 43 -B 63 |+|G 32 -G 42 -G 34 -G 44 |,
假如ΔH<ΔV,则认为像素(4,3)位置上的边缘趋势为沿着水平方向,因此以水平方向上的邻近像素位置的色彩值内插G43,例如:If ΔH<ΔV, it is considered that the edge at the position of pixel (4,3) tends to be along the horizontal direction, so G 43 is interpolated with the color values of adjacent pixel positions in the horizontal direction, for example:
G43=(G42+G44)÷2公式3G 43 =(G 42 +G 44 )÷2
假如ΔH>ΔV,则认为像素(4,3)位置上的边缘趋势为沿着垂直方向,因此以垂直方向上的邻近像素位置的色彩值内插G43,例如:If ΔH>ΔV, it is considered that the edge trend at the pixel (4,3) position is along the vertical direction, so G 43 is interpolated with the color values of adjacent pixel positions in the vertical direction, for example:
G43=(G33+G53)÷2公式4G 43 =(G 33 +G 53 )÷2
此法在边缘趋势极明显时简单且有效,然而,当水平梯度ΔH及垂直梯度ΔV的值相近时,便容易发生判断错误的结果,特别是在杂讯较大时会导致趋势方向的误判。这种方法的另一个缺点是经常在影像上产生十字星号,例如在人体脸部的鼻头影像上产生十字星号。This method is simple and effective when the edge trend is very obvious. However, when the values of the horizontal gradient ΔH and vertical gradient ΔV are similar, it is easy to make wrong judgments, especially when the noise is large, it will lead to misjudgment of the direction of the trend . Another disadvantage of this method is that crosses are often generated on images, for example, crosses are generated on nose images of human faces.
因此,一种在CFAI系统中决定一感兴趣像素的边缘趋势的改良的方法与装置,乃为所冀。Accordingly, an improved method and apparatus for determining the edge trend of a pixel of interest in a CFAI system is desired.
发明内容 Contents of the invention
本发明的目的之一,在于提供一种在CFAI系统中决定一感兴趣像素的边缘趋势的方法与装置,其是藉由该感兴趣像素的周围像素的水平及垂直趋势来决定该感兴趣像素的边缘趋势。One of the objectives of the present invention is to provide a method and device for determining the edge trend of a pixel of interest in the CFAI system, which determines the pixel of interest by the horizontal and vertical trends of the surrounding pixels of the pixel of interest marginal trend.
本发明的另一目的,在于提供一种在CFAI系统中决定一感兴趣像素的边缘趋势的方法与装置,在该感兴趣像素处的水平梯度及垂直梯度的值接近时,仍可正确地判断该感兴趣像素的边缘趋势。Another object of the present invention is to provide a method and device for determining the edge trend of a pixel of interest in the CFAI system, which can still correctly determine when the values of the horizontal gradient and the vertical gradient at the pixel of interest are close The edge trend of the pixel of interest.
根据本发明,一种在CFAI系统中决定一感兴趣像素的边缘趋势的方法是先判断在该感兴趣像素位置的各个周围像素为水平或垂直趋势,其包括计算每一该周围像素在二对角方向上的色彩值的差值,再由该二差值的乘积为正值或负值来判断该周围像素为水平或垂直趋势,以及统计具有水平趋势的周围像素的数目与具有垂直趋势的周围像素的数目,当具有水平趋势的周围像素的数目大于具有垂直趋势的周围像素的数目时,则决定该感兴趣像素的边缘趋势为沿着水平方向,反之,则决定该感兴趣像素的边缘趋势为沿着垂直方向。According to the present invention, a method for determining the edge trend of a pixel of interest in the CFAI system is to first determine whether each surrounding pixel at the pixel of interest is a horizontal or vertical trend, which includes calculating each of the surrounding pixels in two pairs The difference between the color values in the angular direction, and then the product of the two differences is positive or negative to determine whether the surrounding pixels are horizontal or vertical, and count the number of surrounding pixels with a horizontal trend and the number of pixels with a vertical trend The number of surrounding pixels, when the number of surrounding pixels with a horizontal trend is greater than the number of surrounding pixels with a vertical trend, the edge trend of the pixel of interest is determined to be along the horizontal direction, otherwise, the edge of the pixel of interest is determined The trend is along the vertical direction.
执行上述方法的装置包括处理器及缓冲器,以该感兴趣像素为中心的一个像素阵列的原始色彩值储存在该缓冲器中,该处理器从该缓冲器中分别读取该各个周围像素在二对角方向上的色彩值并计算出该等差值的乘积储存至该缓冲器中,再统计该等乘积中的正值乘积及负值乘积的数目,比较此二数目的大小判断该感兴趣像素的边缘趋势为沿着水平或垂直方向。The device for performing the above method includes a processor and a buffer, the original color value of a pixel array centered on the pixel of interest is stored in the buffer, and the processor reads the values of the surrounding pixels from the buffer respectively. The color values in the two diagonal directions are calculated and the product of the difference is stored in the buffer, and then the number of positive value products and negative value products in these products is counted, and the size of the two numbers is compared to judge the sense. The edge trend of the pixel of interest is along the horizontal or vertical direction.
经由本发明所提供的方法及装置,即使在一个像素处的水平梯度及垂直梯度相等或接近,本发明也能够正确地判断在该像素处的边缘趋势。Through the method and device provided by the present invention, even if the horizontal gradient and the vertical gradient at a pixel are equal or close, the present invention can correctly judge the edge trend at the pixel.
附图说明 Description of drawings
图1显示一6×6的像素阵列;Figure 1 shows a 6×6 pixel array;
图2显示以想要内插产生绿色色彩值G33的像素(3,3)为中心的5×5像素阵列的绿色色彩值;Fig. 2 shows the green color value of a 5x5 pixel array centered on the pixel (3,3) which is desired to be interpolated to produce the green color value G 33 ;
图3A显示以图2中像素(2,3)为中心的3×3阵列的绿色色彩值;Figure 3A shows the green color values of a 3x3 array centered on pixel (2,3) in Figure 2;
图3B显示以图2中像素(3,2)为中心的3×3阵列的绿色色彩值;Figure 3B shows the green color values of a 3x3 array centered on pixel (3,2) in Figure 2;
图3C显示以图2中像素(3,4)为中心的3×3阵列的绿色色彩值;FIG. 3C shows the green color value of a 3×3 array centered on pixel (3,4) in FIG. 2;
图3D显示以图2中像素(4,3)为中心的3×3阵列的绿色色彩值;Figure 3D shows the green color values of a 3x3 array centered on pixel (4,3) in Figure 2;
图4是一个执行内插G33的装置;Fig. 4 is a device for performing interpolation G 33 ;
图5是一个执行内插G33的流程图。Fig. 5 is a flowchart for performing the interpolation G33 .
图号说明Description of figure number
106×6的像素阵列106×6 pixel array
205×5的像素阵列205×5 pixel array
22以像素(2,3)为中心的3×3阵列22 3×3 array centered at pixel (2,3)
24以像素(3,2)为中心的3×3阵列24 A 3×3 array centered at pixel (3, 2)
26以像素(3,4)为中心的3×3阵列26 3×3 array centered on pixel (3,4)
28以像素(4,3)为中心的3×3阵列28 3×3 array centered on pixel (4,3)
30执行内插G33的装置30 Means for performing interpolation G 33
32处理器32 processors
34缓冲器34 buffers
34a缓冲器34的区段34a section of
34b缓冲器34的区段34b section of
34c缓冲器34的区段34c section of
34d缓冲器34的区段34d Section of
34e缓冲器34的区段34e section of
34f缓冲器34的区段34f section of
40计算感兴趣像素(3,3)的水平梯度AH及垂直梯度ΔV40 Calculate the horizontal gradient AH and vertical gradient ΔV of the pixel of interest (3, 3)
42判断水平梯度ΔH与垂直梯度ΔV的差值的绝对值是否小于临界值TH42 Judging whether the absolute value of the difference between the horizontal gradient ΔH and the vertical gradient ΔV is less than the critical value TH
44判断水平梯度ΔH是否大于垂直梯度ΔV44 Determine whether the horizontal gradient ΔH is greater than the vertical gradient ΔV
46判断感兴趣像素(3,3)的周围像素G23、G32、G34及G43的趋势46 Determine the trend of the surrounding pixels G 23 , G 32 , G 34 and G 43 of the pixel of interest (3, 3)
48统计周围像素G23、G32、G34及G43的水平及垂直趋势的数目48 Count the number of horizontal and vertical trends of surrounding pixels G 23 , G 32 , G 34 and G 43
50判断具有水平趋势的数目是否大于具有垂直趋势的数目50 Determine whether the number with a horizontal trend is greater than the number with a vertical trend
52感兴趣像素(3,3)为水平趋势52 pixels of interest (3, 3) are horizontal trends
54判断具有水平趋势的数目是否小于具有垂直趋势的数目54 Determine whether the number with a horizontal trend is smaller than the number with a vertical trend
56感兴趣像素(3,3)为垂直趋势56 pixels of interest (3, 3) for the vertical trend
58以双线性内插法求得想要内插给感兴趣像素(3,3)的绿色色彩值G33 58 Obtain the green color value G to be interpolated to the pixel of interest (3, 3) by bilinear interpolation method 33
具体实施方式 Detailed ways
本发明的方法是先判断在一感兴趣像素位置的周围像素为水平趋势或垂直趋势,统计该等周围像素中具有水平趋势者的数目及具有垂直趋势者的数目,比较两者数目的多寡而决定该感兴趣像素的边缘趋势为沿着水平方向或垂直方向。为清楚说明本方法,图2提供一5×5像素阵列20,其中心像素(3,3)位置的绿色色彩值G33是想要藉由内插运算产生,阵列20中的其它绿色色彩值Gxy是由影像感测器直接产生的原始色彩值,用来判断感兴趣像素(3,3)的边缘趋势。首先判断感兴趣像素(3,3)的周围像素(2,3)、(3,2)、(3,4)及(4,3)为水平或垂直趋势,在判断这4个像素的趋势时,为方便了解,各以其为中心将相关的色彩值从阵列20中简化为图3A、图3B、图3C及图3D,图3A显示以像素(2,3)为中心的3×3阵列的绿色色彩值,图3B显示以像素(3,2)为中心的3×3阵列的绿色色彩值,图3C显示以像素(3,4)为中心的3×3阵列的绿色色彩值,图3D显示以像素(4,3)为中心的3×3阵列的绿色色彩值。The method of the present invention is to first judge that the surrounding pixels at a pixel of interest are of horizontal trend or vertical trend, count the number of those with horizontal trend and the number of those with vertical trend in these surrounding pixels, compare the number of the two and obtain Determine whether the edge trend of the pixel of interest is along the horizontal direction or the vertical direction. To clearly illustrate this method, FIG. 2 provides a 5×5
在图3A中,要判断像素(2,3)的趋势时,先计算在对角线方向上的像素(1,2)及(3,4)的绿色色彩值G12及G34的差值In Fig. 3A, when judging the trend of pixel (2, 3), first calculate the difference between the green color values G 12 and G 34 of pixels (1, 2) and (3, 4) in the diagonal direction
Δ1=G12-G34,公式5Δ 1 =G 12 -G 34 , formula 5
以及在另一对角线方向上的像素(1,4)及(3,2)的绿色色彩值G14及G32的差值and the difference between the green color values G 14 and G 32 of pixels (1, 4) and (3, 2) in the other diagonal direction
Δ2=G14-G32,公式6Δ 2 =G 14 -G 32 , formula 6
再将此二插值Δ1,Δ2相乘得到Then multiply the two interpolation values Δ 1 and Δ 2 to get
Buffer1=(G12-G34)×(G14-G32),公式7Buffer 1 = (G 12 -G 34 )×(G 14 -G 32 ), Formula 7
当Buffer1>0时,像素(2,3)具有水平趋势;When Buffer 1 > 0, the pixel (2, 3) has a horizontal trend;
当Buffer1<0时,象素(2,3)具有垂直趋势。When Buffer 1 <0, pixel (2, 3) has a vertical trend.
换言之,在像素(2,3)的二对角线方向上的色彩值梯度值的乘积的正负号被用来判断像素(2,3)的趋势。In other words, the sign of the product of the color value gradient values in the two diagonal directions of the pixel (2, 3) is used to judge the trend of the pixel (2, 3).
在图3B中,如同前述,要判断像素(3,2)的趋势时,先计算在二对角线方向上的绿色色彩值G21及G43的差值与G23及G41的差值,再求其乘积In Fig. 3B, as mentioned above, when judging the trend of pixel (3, 2), first calculate the difference between the green color values G 21 and G 43 and the difference between G 23 and G 41 in the two diagonal directions , and then find its product
Buffer2=(G21-G43)×(G23-G41),公式8Buffer 2 = (G 21 -G 43 )×(G 23 -G 41 ), Formula 8
当Buffer2>0时,像素(3,2)具有水平趋势;When Buffer 2 > 0, the pixel (3, 2) has a horizontal trend;
当Buffer2<0时,像素(3,2)具有垂直趋势。When Buffer 2 <0, pixel (3, 2) has a vertical trend.
同样的,从图3C及图3D分别得到Similarly, from Figure 3C and Figure 3D respectively
Buffer3=(G23-G45)×(G25-G43),公式9Buffer 3 = (G 23 -G 45 )×(G 25 -G 43 ), Formula 9
当Buffer3>0时,像素(3,4)具有水平趋势;When Buffer 3 > 0, the pixel (3, 4) has a horizontal trend;
当Buffer3<0时,像素(3,4)具有垂直趋势。When Buffer 3 <0, pixel (3, 4) has a vertical trend.
以及as well as
Buffer4=(G32-G54)×(G34-G52),公式10Buffer 4 = (G 32 -G 54 )×(G 34 -G 52 ),
当Buffer4>0时,像素(4,3)具有水平趋势;When Buffer 4 > 0, the pixel (4, 3) has a horizontal trend;
当Buffer4<0时,像素(4,3)具有垂直趋势。When Buffer 4 <0, pixel (4, 3) has a vertical trend.
在得到感兴趣像素(3,3)的周围像素(2,3)、(3,2)、(3,4)及(4,3)为水平或垂直趋势后,跟着统计这4个周围像素中具有水平趋势者的数目及具有垂直趋势者的数目,若具有水平趋势的周围像素的数目S1大于具有垂直趋势的周围像素的数目SV,则认为感兴趣像素(3,3)的边缘趋势为沿着水平方向,反之,若具有水平趋势的周围像素的数目SI小于具有垂直趋势的周围像素的数目SV,则认为感兴趣像素(3,3)的边缘趋势为沿着垂直方向。若SI与SV相等,则采用双线性内插法,平均像素G23、G32、G34及G43的色彩值做为像素(3,3)的绿色色彩值。After obtaining the horizontal or vertical trend of the surrounding pixels (2, 3), (3, 2), (3, 4) and (4, 3) of the pixel of interest (3, 3), follow the statistics of these 4 surrounding pixels The number of those with a horizontal trend and the number of those with a vertical trend, if the number S 1 of surrounding pixels with a horizontal trend is greater than the number S V of surrounding pixels with a vertical trend, the edge of the pixel of interest (3, 3) is considered The trend is along the horizontal direction, on the contrary, if the number S I of the surrounding pixels with the horizontal trend is less than the number S V of the surrounding pixels with the vertical trend, it is considered that the edge trend of the pixel of interest (3, 3) is along the vertical direction . If S I and S V are equal, bilinear interpolation is used, and the average color value of pixels G 23 , G 32 , G 34 and G 43 is used as the green color value of pixel (3, 3).
图4是用来执行内插G33的装置30,其包括处理器32及缓冲器34。以像素(3,3)为中心的阵列20的原始色彩值先被储存至缓冲器34中,如区段34a所示,再进行上述的判断方法,由处理器32读取区段34a中的阵列20的原始色彩值进行差值与乘积等运算以及计数。为减少装置30的运算,在一实施例中,缓冲器34更包含一临界值TH,由输入SET预先决定,储存在缓冲器34的区段34b中,处理器32从缓冲器34的区段34a读取阵列20的原始色彩值,为像素(3,3)计算其色彩值的水平梯度ΔH及垂直梯度ΔV储存在缓冲器34的区段34c中,以及计算二者的差值|ΔH-ΔV|与临界值TH比较,如果|ΔH-ΔV|≥TH,则依照习知的方法判断感兴趣像素(3,3)的边缘趋势,由ΔH及ΔV的相对大小决定像素(3,3)的边缘趋势,只有在|ΔH-ΔV|<TH时,始进行公式7至10的运算。当|ΔH-ΔV|<TH时,处理器32从区段34a读取色彩值并依照公式7至10运算产生BufferI至Buffer4,储存在缓冲器34的区段34d中,接着统计Buffer1至Buffer4中具有水平趋势的像素数目SI与具有垂直趋势的像素数目SV,储存在缓冲器34的区段34e中,比较SI与SV的大小后决定感兴趣像素(3,3)的边缘趋势,再根据区段34f中的内插公式计算G33,例如:FIG. 4 is an
当SI>SV,G33=(G32+G34)÷2;公式11When S I >S V , G 33 =(G 32 +G 34 )÷2; Formula 11
当SI<SV,G33=(G23+G43)÷2;公式12When S I <S V , G 33 =(G 23 +G 43 )÷2; Formula 12
当S1=SV,G33=(G23+G32+G34+G43)÷4。公式13When S 1 =S V , G 33 =(G 23 +G 32 +G 34 +G 43 )÷4. Formula 13
区段34f中的内插公式可以藉输入F决定,这些内插公式可以采用习知的技术或其改良。在不同的实施例中,处理器32不计算ΔH及ΔV以及比较其差值与临界值TH,而是直接使用公式7至10计算Buffer1至Buffer4,完全由像素(3,3)的周围像素(2,3)、(3,2)、(3,4)及(4,3)的水平及垂直趋势决定像素(3,3)的边缘趋势。The interpolation formulas in
一个执行上述作业的流程如图5所示,在为图2的像素(3,3)决定其边缘趋势时,首先处理器32在步骤40计算在像素(3,3)位置处的色彩值的水平梯度ΔH及垂直梯度ΔV,例如使用公式1及2,或者使用较简单的公式,例如,参照图2:A flow process for performing the above operations is shown in FIG. 5. When determining the edge tendency of the pixel (3, 3) in FIG. Horizontal gradient ΔH and vertical gradient ΔV, for example,
ΔH=|G34-G32|,公式14ΔH=|G 34 -G 32 |, Formula 14
及and
ΔV=|G43-G23|,公式15ΔV=|G 43 -G 23 |, Formula 15
接着在步骤42判断二者的差值|ΔH-ΔV|是否小于临界值TH,若为否,则进行步骤44,进一步判断水平梯度ΔH与垂直梯度ΔV的相对大小,如果ΔH<ΔV,则认为在像素(3,3)处为水平趋势,在步骤52中采用对应的公式进行内插G33,例如公式11,如果ΔH>ΔV,则认为在像素(3,3)处为垂直趋势,在步骤56中采用对应的公式进行内插G33,例如公式12,假如在步骤42所得的结果为|ΔH-ΔV|<TH,则进行步骤46,依照公式7至10判断像素(3,3)的周围像素G23、G32、G34及G43的趋势,跟着在步骤48统计周围像素G23、G32、G34及G43中具有水平及垂直趋势者的数目SI及SV,接下来,步骤50及54是比较SI及SV的大小,当具有水平趋势的数目大于具有垂直趋势的数目,则表示在像素(3,3)处为水平趋势,至步骤52采用对应的公式进行内插G33,例如公式11,反之,当具有水平趋势的数目小于具有垂直趋势的数目,则表示在像素(3,3)处为垂直趋势,至步骤56采用对应的公式进行内插G33,例如公式12,若周围像素G23、G32、G34及G43中具有水平及垂直趋势者的数目SI及SV相等,则进行步骤58,如公式13,以双线性内插法计算给像素(3,3)的绿色色彩值G33。在不同的实施例中,不执行步骤40至44,而是直接从步骤46开始,完全由像素(3,3)的周围像素G23、G32、G34及G43中具有水平及垂直趋势者的数目SI及SV决定在像素(3,3)处为水平或垂直趋势。Then in
经由以上所例示的方法及装置,即使在一个像素处的水平梯度及垂直梯度相等或接近,本发明也能够正确地判断在该像素处的边缘趋势。Through the methods and devices exemplified above, even if the horizontal gradient and the vertical gradient at a pixel are equal or close, the present invention can correctly determine the edge tendency at the pixel.
以上对于本发明的较佳实施例所作的叙述是为阐明的目的,而无意限定本发明精确地所揭露的形式,基于以上的教导或从本发明的实施例学习而作修改或变化是可能的,实施例是为解说本发明的原理以及让熟悉该项技术者以各种实施例利用本发明在实际应用上而选择及叙述,本发明的技术思想企图由本案的申请专利范围及其均等来决定。The above descriptions of the preferred embodiments of the present invention are for the purpose of illustration, and are not intended to limit the precise disclosed form of the present invention. It is possible to modify or change based on the above teachings or learning from the embodiments of the present invention. The embodiment is to explain the principle of the present invention and to allow those familiar with the art to use various embodiments to select and describe the present invention in practical applications. Decide.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100423089A CN100399834C (en) | 2004-05-17 | 2004-05-17 | Method and device for determining edge trend of interested pixel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100423089A CN100399834C (en) | 2004-05-17 | 2004-05-17 | Method and device for determining edge trend of interested pixel |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1700775A CN1700775A (en) | 2005-11-23 |
CN100399834C true CN100399834C (en) | 2008-07-02 |
Family
ID=35476603
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2004100423089A Expired - Fee Related CN100399834C (en) | 2004-05-17 | 2004-05-17 | Method and device for determining edge trend of interested pixel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100399834C (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100588263C (en) * | 2005-12-28 | 2010-02-03 | 华晶科技股份有限公司 | Pixel Color Information Reconstruction Method |
CN101001387B (en) * | 2006-01-11 | 2010-05-12 | 华晶科技股份有限公司 | Method for judging minimum direction of image local information change by utilizing majority decision |
CN101827273B (en) * | 2009-03-02 | 2013-03-20 | 华晶科技股份有限公司 | A color rendition method of image |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000069492A (en) * | 1998-08-26 | 2000-03-03 | Nikon Corp | Interpolation processor and storage medium in which interpolation processing program is recorded |
CN1300505A (en) * | 1998-05-08 | 2001-06-20 | 松下电器产业株式会社 | Solid-state color imager |
EP1289310A2 (en) * | 2001-08-27 | 2003-03-05 | Agilent Technologies, Inc. | Method and system for adaptive demosaicing |
US6570616B1 (en) * | 1997-10-17 | 2003-05-27 | Nikon Corporation | Image processing method and device and recording medium in which image processing program is recorded |
-
2004
- 2004-05-17 CN CNB2004100423089A patent/CN100399834C/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6570616B1 (en) * | 1997-10-17 | 2003-05-27 | Nikon Corporation | Image processing method and device and recording medium in which image processing program is recorded |
CN1300505A (en) * | 1998-05-08 | 2001-06-20 | 松下电器产业株式会社 | Solid-state color imager |
JP2000069492A (en) * | 1998-08-26 | 2000-03-03 | Nikon Corp | Interpolation processor and storage medium in which interpolation processing program is recorded |
EP1289310A2 (en) * | 2001-08-27 | 2003-03-05 | Agilent Technologies, Inc. | Method and system for adaptive demosaicing |
Also Published As
Publication number | Publication date |
---|---|
CN1700775A (en) | 2005-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5260635B2 (en) | Noise-reduced color image using panchromatic image | |
CN100521797C (en) | Color interpolation apparatus and method for reconstructing missing color using image edge indication value | |
US8571312B2 (en) | Image interpolation method and apparatus using pattern characteristics of color filter array | |
US7835573B2 (en) | Method and apparatus for edge adaptive color interpolation | |
EP1977613B1 (en) | Interpolation of panchromatic and color pixels | |
US6625325B2 (en) | Noise cleaning and interpolating sparsely populated color digital image using a variable noise cleaning kernel | |
CN101652798B (en) | Edge mapping using panchromatic pixels | |
EP1622393B1 (en) | Color interpolation using data dependent triangulation | |
US6989862B2 (en) | System and method for concurrently demosaicing and resizing raw data images | |
US20080123997A1 (en) | Providing a desired resolution color image | |
US8712191B2 (en) | Method for detecting directions of regularity in a two-dimensional image | |
WO2008063351A1 (en) | Noise reduction of panchromatic and color image | |
US11854157B2 (en) | Edge-aware upscaling for improved screen content quality | |
CN110852953B (en) | Image interpolation method and device, storage medium, image signal processor and terminal | |
JP2002305751A (en) | Reconstruction of color filter array images | |
JP2004129229A (en) | Method for reducing collar aliasing artifacts from collar digital image | |
JP4868249B2 (en) | Video signal processing device | |
CN100399834C (en) | Method and device for determining edge trend of interested pixel | |
US20070109430A1 (en) | Image noise estimation based on color correlation | |
JP2011155365A (en) | Image processing apparatus and image processing method | |
KR101327790B1 (en) | Image interpolation method and apparatus | |
Yang et al. | Quality evaluation of color demosaicing according to image resolution | |
TWI293692B (en) | ||
Jeong et al. | Edge-Adaptive Demosaicking for Reducing Artifact along Line Edge | |
CN100505890C (en) | System and method for color signal interpolation |
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 | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080702 Termination date: 20130517 |