KR101327790B1 - Image interpolation method and apparatus - Google Patents

Image interpolation method and apparatus Download PDF

Info

Publication number
KR101327790B1
KR101327790B1 KR1020070085557A KR20070085557A KR101327790B1 KR 101327790 B1 KR101327790 B1 KR 101327790B1 KR 1020070085557 A KR1020070085557 A KR 1020070085557A KR 20070085557 A KR20070085557 A KR 20070085557A KR 101327790 B1 KR101327790 B1 KR 101327790B1
Authority
KR
South Korea
Prior art keywords
interpolation
image
value
current pixel
values
Prior art date
Application number
KR1020070085557A
Other languages
Korean (ko)
Other versions
KR20090020918A (en
Inventor
문영수
이시화
이호진
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020070085557A priority Critical patent/KR101327790B1/en
Publication of KR20090020918A publication Critical patent/KR20090020918A/en
Application granted granted Critical
Publication of KR101327790B1 publication Critical patent/KR101327790B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • H04N7/0135Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes
    • H04N7/0142Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes the interpolation being edge adaptive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4015Demosaicing, e.g. colour filter array [CFA], Bayer pattern

Abstract

본 발명은 영상 보간 방법 및 장치 관한 것으로서, 본 발명에 따른 영상 보간 방법은 이미지의 픽셀들 중 현재 픽셀의 복수의 소정 방향들의 주변 픽셀들의 값을 이용하여 소정 방향들 각각에 대한 현재 픽셀의 보간 값을 결정하고, 현재 픽셀의 값과 계산된 보간 값들과의 상관도들을 계산한 후, 계산된 상관도들에 따라, 소정 방향들 각각의 보간 값들 중 어느 하나를 상기 현재 픽셀의 보간 값으로 결정함으로써, 간단한 계산으로도 색상 오류 현상이나 지퍼 열화 등을 방지하여 신뢰성 있는 컬러 영상을 얻을 수 있다.The present invention relates to an image interpolation method and apparatus, wherein an image interpolation method according to the present invention uses an interpolation value of a current pixel in each of predetermined directions by using values of peripheral pixels in a plurality of predetermined directions of a current pixel among pixels of an image. By calculating the correlations between the value of the current pixel and the calculated interpolation values, and determining, according to the calculated correlations, any one of the interpolation values of each of the predetermined directions as the interpolation value of the current pixel. In addition, simple color calculations prevent color errors and zipper deterioration, resulting in reliable color images.

Description

영상 보간 방법 및 장치{Image interpolation method and apparatus}Image interpolation method and apparatus

본 발명은 영상 보간 방법 및 장치에 관한 것으로, 특히 단판식 영상 센서의 각 픽셀에서 감지된 컬러 신호로부터 상기 픽셀에서 제외된 컬러 신호를 보간하는 영상 보간 방법 및 장치에 관한 것이다.The present invention relates to an image interpolation method and apparatus, and more particularly, to an image interpolation method and apparatus for interpolating a color signal excluded from a pixel from a color signal sensed at each pixel of a single-plate image sensor.

일반적으로, 디지털 카메라나 캠코더는 필름 대신 CCD(Charge Coupled Device)나 CMOS(Complementary Metal Oxide Semiconductor) 등의 영상 센서를 이용한다. 이와 같은 영상 센서는 빛의 밝기 값을 감지하므로 이 영상 센서를 통해 획득되는 영상은 컬러 영상이 아닌 흑백 영상이다. 따라서, 컬러 영상을 획득하기 위해서, 이 영상 센서의 각 픽셀마다 R(Red), G(Green) 및 B(Blue) 컬러 성분을 통과시키는 컬러 필터 어레이(Color Filter Array, 이하, "CFA"라 함)가 설치되고, 이 영상 센서의 각 픽셀들은 CFA를 통과한 R, G, B 컬러 신호들의 밝기 강도를 감지한다.In general, a digital camera or a camcorder uses an image sensor such as a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) instead of a film. Since the image sensor senses the brightness value of light, the image obtained through the image sensor is a black and white image, not a color image. Therefore, in order to obtain a color image, a color filter array (hereinafter referred to as "CFA") which passes R (Red), G (Green) and B (Blue) color components for each pixel of the image sensor. ), And each pixel of this image sensor senses the brightness intensity of the R, G, and B color signals that pass through the CFA.

방송 장치 등에서는, 이 R, G, B 각각의 컬러 신호들을 감지하는 3 개의 CCD 또는 CMOS 센서가 사용되기도 하지만, 일반적으로는 비용 절감을 위해 단판식 CCD 또는 CMOS 센서가 많이 사용된다. 그런데, 이러한 단판식 센서의 각 픽셀에는 여러 채널의 컬러 정보 중에서 하나의 컬러 정보만이 저장되므로, RGB 풀 컬러(RGB Full color)의 완전한 영상을 얻기 위해서는 각 픽셀에 저장되어 있지 않은 다른 채널의 컬러 정보를 주변 픽셀의 컬러 정보로부터 보간(interpolation)해야 한다. In a broadcasting apparatus or the like, three CCD or CMOS sensors for detecting color signals of R, G, and B are used, but a single plate CCD or CMOS sensor is generally used for cost reduction. However, since only one color information is stored among the color information of several channels in each pixel of the single-plate sensor, in order to obtain a complete image of RGB full color, the color of another channel not stored in each pixel is obtained. The information must be interpolated from the color information of the surrounding pixels.

이때, 잘 알려진 보간법으로는 주변 픽셀의 평균값을 사용하는 양선형 보간법(bilinear interpolation)이 있다. 일 예로서, 이 양선형 보간법을 이용하여 B 값만을 가지는 픽셀을 보간하는 경우, 이 B 픽셀에서의 G 값은 이 B 픽셀의 상하좌우의 주위 4개의 픽셀들의 G 값의 평균을 계산하여 보간할 수 있으며, 이 B 픽셀에서의 R 값은 이 B 픽셀의 대각선 방향의 주위 4개의 픽셀들의 R 값의 평균을 계산하여 보간할 수 있다.At this time, a well-known interpolation method is bilinear interpolation using an average value of surrounding pixels. As an example, when interpolating a pixel having only a B value using this bilinear interpolation, the G value at this B pixel is interpolated by calculating an average of the G values of four pixels around the top, bottom, left, and right sides of the B pixel. The R value at this B pixel can be interpolated by calculating the average of the R values of the four surrounding pixels in the diagonal direction of this B pixel.

그런데, 이러한 양선형 보간법은 컬러 보간시 물체의 윤곽이나 경계선 등의 에지에서 원래의 컬러와는 다른 색으로 보간되어 일부 픽셀들이 주위와 어울리지 않게 튀어 보이는 현상인 색상 오류(false color), 경계에서 선명도가 떨어지는 영상 블러(blur), 영상 에지 부근에서 미세한 스프라이프(stripe) 패턴이 촘촘히 반복적으로 교차하여 발생하는 지퍼 열화(zipper artifact), 고주파 성분이 저주파 성분과 혼동되는 엘리어싱 효과(aliasing effect) 등의 결함이 확연하게 드러나는 문제점이 있다.However, the bilinear interpolation method is a color error (false color), which is a phenomenon in which some pixels bounce out of harmony with the surrounding color at the edges of an object's outline or boundary, etc., when color interpolation occurs. Image blur that is poor, zipper deterioration caused by minute and repeated stripe patterns crossing the image edges closely, and an aliasing effect where high frequency components are confused with low frequency components. There is a problem that the defect is clearly revealed.

그 이외에도 X. Li et. al., "New Edge-Directed Interpolation". IEEE Trans. on Image Processing, Vol.10, No.10 October 2001, pp.1521-1527에 개시된 에지 방향 보간법(Edge-Directed interpolation), S.C.Pei and I.K.Tam, "Effective color interpolation in CCD color filter arrays using signal correlation", IEEE Trans Circ Syst Video Technol 13., 503-507, 2003에 개시된 고정 휴 기반 보간법(Constant-Hue based interpolation) 및 Lanlan Chang and Yap-Peng Tan, "Hybrid Color Filter Array Demonsaicking for Effective Artifact Suppression, Journal of Electronic Imaging, vol.15, Mar.2006 에 개시된 적응적 에지 기반 보간법(Adaptive Edge-based interpolation) 등이 있다.In addition, X. Li et. al., "New Edge-Directed Interpolation". IEEE Trans. Edge-Directed interpolation, SCPei and IKTam, "Effective color interpolation in CCD color filter arrays using signal correlation" disclosed in on Image Processing, Vol. 10, No. 10 October 2001, pp. 1521-1527. , Constant-Hue based interpolation, and Lanlan Chang and Yap-Peng Tan, "Hybrid Color Filter Array Demonsaicking for Effective Artifact Suppression, Journal of IEEE Trans Circ Syst Video Technol 13., 503-507, 2003." Adaptive Edge-based interpolation as disclosed in Electronic Imaging, vol. 15, Mar. 2006, and the like.

하지만, 이러한 보간법을 사용하여도 여전히 상기 결함들이 그대로 드러나는 경우도 있으며, 특히 발생되는 결함이 적더라도 보간을 위해 많은 계산량이 요구되거나 고용량의 메모리가 요구되는 등의 문제점이 있다.However, even when the interpolation method is used, the above defects may still be revealed. In particular, even when there are few defects, a large amount of computation is required for interpolation or a high capacity memory is required.

본 발명이 이루고자 하는 기술적 과제는 간단한 계산으로 색상 오류 현상이나 지퍼 열화 등을 방지하여 신뢰성 있는 컬러 영상을 얻을 수 있게 하는 영상 보간 방법 및 장치를 제공하는 데 있다. 또한, 상기된 방법을 컴퓨터에서 실행시키기 위한 컴퓨터로 읽을 수 있는 기록 매체를 제공하는데 있다.SUMMARY OF THE INVENTION The present invention has been made in an effort to provide an image interpolation method and apparatus capable of obtaining a reliable color image by preventing color error or zipper degradation by simple calculation. It is also to provide a computer-readable recording medium for executing the above-described method on a computer.

상기 기술적 과제를 이루기 위한 본 발명에 따른 영상 보간 방법은 이미지의 픽셀들 중 현재 픽셀의 복수의 소정 방향들의 주변 픽셀들의 값을 이용하여 상기 소정 방향들 각각에 대한 현재 픽셀의 보간 값을 결정하는 단계; 상기 현재 픽셀의 값과 상기 계산된 보간 값들과의 상관도들을 계산하는 단계; 및 상기 계산된 상관도들에 따라, 상기 소정 방향들 각각의 보간 값들 중 어느 하나를 상기 현재 픽셀의 보간 값으로 결정하는 단계를 포함한다.According to an embodiment of the present invention, an image interpolation method includes determining an interpolation value of a current pixel in each of the predetermined directions by using values of peripheral pixels in a plurality of predetermined directions of a current pixel among pixels of an image. ; Calculating correlations between the value of the current pixel and the calculated interpolation values; And determining one of the interpolation values of each of the predetermined directions as the interpolation value of the current pixel according to the calculated correlations.

상기 다른 기술적 과제를 해결하기 위하여, 본 발명은 상기된 영상 보간 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다.In order to solve the above other technical problem, the present invention provides a computer-readable recording medium recording a program for executing the above-described image interpolation method in a computer.

상기 기술적 과제를 이루기 위한 본 발명에 따른 영상 보간 장치는 이미지의 픽셀들 중 현재 픽셀의 복수의 소정 방향들의 주변 픽셀들의 값을 이용하여 상기 소정 방향들 각각에 대한 현재 픽셀의 보간 값을 결정함으로써 상기 소정 방향들의 보간 영상들을 생성하는 방향 보간 영상 생성부; 상기 현재 픽셀의 값과 상기 계산 된 보간 값들과의 상관도들을 계산함으로써 상기 소정 방향들의 상관 맵을 생성하는 방향 상관 맵 생성부; 및 상기 계산된 상관도들에 따라, 상기 소정 방향들 각각의 보간 값들 중 어느 하나를 상기 현재 픽셀의 보간 값으로 결정함으로써 보간 영상을 생성하는 보간 영상 생성부를 포함한다.The image interpolation apparatus according to the present invention for achieving the technical problem is to determine the interpolation value of the current pixel in each of the predetermined direction by using the value of the peripheral pixels of the plurality of predetermined direction of the current pixel among the pixels of the image A direction interpolation image generator configured to generate interpolation images of predetermined directions; A direction correlation map generator configured to generate a correlation map of the predetermined directions by calculating correlations between the value of the current pixel and the calculated interpolation values; And an interpolation image generation unit configured to generate an interpolation image by determining any one of interpolation values of each of the predetermined directions as the interpolation value of the current pixel according to the calculated correlations.

상술한 바와 같이, 본 발명에 따른 영상 보간 방법은 수평/수직 방향의 보간 값들을 생성하고, 입력 영상의 픽셀 값들과 수평/수직 방향의 보간 값들 간의 상관도들을 계산 한 후, 이 상관도들을 이용하여 픽셀 별로 보간 방향을 결정하여 보간함으로써, 간단한 계산으로도 색상 오류 현상이나 지퍼 열화 등을 방지하여 신뢰성 있는 컬러 영상을 얻을 수 있는 효과가 있다.As described above, the image interpolation method according to the present invention generates interpolation values in the horizontal / vertical direction, calculates correlations between pixel values of the input image and interpolation values in the horizontal / vertical direction, and then uses the correlations. By interpolating and determining the interpolation direction for each pixel, it is possible to obtain a reliable color image by preventing color error or zipper deterioration even by simple calculation.

또한, 본 발명에 따른 영상 보간 방법은 상기 상관도 이외에 입력 영상의 픽셀에서의 에지에 기반하여 픽셀 별로 보간 방향을 결정하는 기법을 선택적으로 이용하여 보간함으로써, 보다 신뢰성 있는 영상을 얻을 수 있는 효과가 있다.In addition, the image interpolation method according to the present invention has an effect of obtaining a more reliable image by interpolating by selectively using a technique for determining the interpolation direction for each pixel based on the edges of the pixels of the input image in addition to the correlation. have.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일 실시예를 상세히 설명한다.Hereinafter, a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.

본 실시예에 따르면, 하나의 CFA 베이어 패턴(Color Bayer Pattern) 영상으로부터 CFA 보간(CFA Interpolation)을 통해 G 채널, B 채널 및 R 채널에 대한 보간 영상을 생성하고, 이렇게 생성된 3 개의 보간 영상들로부터 하나의 완성된 영상 즉, R, G, B 컬러로 구성된 영상을 얻을 수 있다. 그런데, 이러한 CFA 베이어 패턴 은 픽셀들의 전체 개수 중 절반은 G 픽셀이며, 전체 개수의 각 4분의 1은 R 픽셀과 B 픽셀이다. 따라서, G 픽셀의 개수가 R 픽셀이나 B 픽셀들의 개수보다 많아서, G 채널 보간을 먼저 수행하는 것이 엘리어싱 효과 등을 감쇄하는 등의 보다 신뢰성 있는 영상을 획득하는데 유리하므로, 본 실시예에서는 G 채널에 대한 보간을 수행하여 G 채널 보간 영상을 생성한 후, 이 G 채널 보간 영상을 이용하여 R, B 채널에 대한 보간을 수행한다.According to the present embodiment, an interpolation image for G channel, B channel, and R channel is generated through CFA interpolation from one CFA Bayer Pattern image, and the three interpolation images thus generated. One complete image, i.e., an image composed of R, G, and B colors, can be obtained. However, in the CFA Bayer pattern, half of the total number of pixels is G pixels, and each quarter of the total number is R pixels and B pixels. Therefore, since the number of G pixels is larger than the number of R pixels or B pixels, performing the G channel interpolation first is advantageous for obtaining a more reliable image such as attenuating an aliasing effect or the like. After the interpolation is performed to generate the G channel interpolation image, the G channel interpolation image is used to interpolate the R and B channels.

도 1은 본 발명의 일 실시예에 따른 영상 보간 장치에 관한 구성도이다.1 is a block diagram of an image interpolation apparatus according to an embodiment of the present invention.

도 1을 참조하면, 본 실시예에 따른 영상 보간 장치는 방향 보간 영상 생성부(110), 방향 상관 맵 생성부(120), 에지 기울기 계산부(130), 보간 방법 결정부(140), G 채널 영상 보간부(150), B 채널 영상 보간부(160) 및 R 채널 영상 보간부(170)로 구성된다.Referring to FIG. 1, the image interpolation apparatus according to the present exemplary embodiment includes a direction interpolation image generator 110, a direction correlation map generator 120, an edge slope calculator 130, an interpolation method determiner 140, and a G interpolator. The channel image interpolator 150, the B channel image interpolator 160, and the R channel image interpolator 170 are configured.

방향 보간 영상 생성부(110)는 입력된 CFA 베이어 패턴 (Color Filter Array bayer pattern) 영상에 대한 수평 방향의 G 채널 보간 영상과 수직 방향의 G 채널 보간 영상을 생성한다. 이하, 입력된 CFA 베이어 패턴 영상을 간략하게 "입력 CFA 영상"이라 칭하기로 한다.The direction interpolation image generator 110 generates a horizontal G channel interpolation image and a vertical G channel interpolation image with respect to the input CFA Bayer pattern image. Hereinafter, the input CFA Bayer pattern image will be briefly referred to as an "input CFA image".

먼저, 방향 보간 영상 생성부(110)가 수평 방향의 G 채널 보간 영상을 생성하는 과정에 대해서 상세히 설명한다. 도 2a에 도시된 바와 같이, (i,j)에 위치한 현재 픽셀인 R 픽셀에서 수평 방향의 보간 값인 Ghi(i,j)를 구하기 위해서, 방향 보간 영상 생성부(110)는 [-1 2 2 2 -1] 의 방향성 필터링 벡터(directional filtering vector)와 입력 CFA 영상의 픽셀 값들인 (Mb(i,j))1×5 간에 컨벌루션(convolution) 연산을 수행한다. 여기서, 현재 픽셀은 영상 보간 장치에 의해 현재 처리 중인 픽셀을 말하고, R 픽셀은 R(Red) 컬러 정보만이 저장되어 있는 픽셀을 말하고, 방향성 필터링 벡터는 이 R 픽셀의 주변에 있는 픽셀들에 가중치를 부가하여 가중 평균(weighted averaging)을 구하기 위한 벡터이다.First, a process of generating the G channel interpolation image in the horizontal direction by the direction interpolation image generator 110 will be described in detail. As shown in FIG. 2A, in order to obtain G hi (i, j), which is the horizontal interpolation value, from the R pixel, which is the current pixel located at (i, j), the direction interpolation image generator 110 [-1 2]. A convolution operation is performed between the directional filtering vector of 2 2 -1 and 1 × 5 (M b (i, j)), which are pixel values of the input CFA image. Here, the current pixel refers to a pixel currently being processed by the image interpolation apparatus, the R pixel refers to a pixel in which only R (Red) color information is stored, and the directional filtering vector is weighted to pixels around the R pixel. Is a vector for obtaining the weighted averaging.

이를 수학식으로 나타내면 다음의 수학식 1과 같다.This is represented by Equation 1 below.

Figure 112007061614245-pat00001
Figure 112007061614245-pat00001

이때, *는 컨벌루션(convolution) 연산, (Mb(i,j))1×5 는 입력 CFA 영상에서 (i,j)를 중심으로 좌우 인접한 양 두 개의 픽셀을 포함한 총 다섯 개의 픽셀 값을 의미한다. 그리고, 이때의 각 픽셀 값은 G값, R값, 또는 B값 중 어느 하나의 값이다.In this case, * means a convolution operation and (M b (i, j)) 1 × 5 means a total of five pixel values including two left and right adjacent pixels around (i, j) in the input CFA image. do. Each pixel value at this time is one of a G value, an R value, and a B value.

그리고, 방향 보간 영상 생성부(110)는 입력 CFA 영상 내의 G 픽셀들을 제외한 모든 R 픽셀들과 B 픽셀들에 대해서, 방향성 필터링 벡터와의 컨벌루션 연산을 통해 수평 방향의 보간 값들인 Ghi들을 계산하여, 이 수평 방향의 보간 값들로 구성된 수평 방향의 G 채널 보간 영상을 생성한다. 여기서, R 픽셀들은 R(Red) 컬러 정보만이 저장되어 있는 픽셀들을 말하고, B 픽셀들은 B(Blue) 컬러 정보만이 저장되어 있는 픽셀들을 말한다.In addition, the direction interpolation image generator 110 calculates G hi , which are horizontal interpolation values, for all R pixels and B pixels except G pixels in the input CFA image through a convolution operation with a directional filtering vector. In addition, a horizontal G channel interpolation image including the horizontal interpolation values is generated. Here, the R pixels refer to pixels in which only R (red) color information is stored, and the B pixels refer to pixels in which only B (Blue) color information is stored.

다음으로, 도 2b에 도시된 바와 같이 방향 보간 영상 생성부(110)가 수직 방향의 G 채널 보간 영상을 생성하는 과정은 수평 방향의 G 채널 보간 영상을 생성하는 과정과 유사하다. (i,j)에 위치한 현재 픽셀인 R 픽셀에서의 수직 방향의 보간 값인 Gvi(i,j)를 구하기 위해서, 방향 보간 영상 생성부(110)는 [-1 2 2 2 -1]T 의 방향성 필터링 벡터와 입력 CFA 영상의 픽셀 값들인 Mb(i,j)5×1 간에 컨벌루션 연산을 수행한다.Next, as shown in FIG. 2B, the process of generating the G channel interpolation image in the vertical direction by the direction interpolation image generator 110 is similar to the process of generating the G channel interpolation image in the horizontal direction. In order to obtain G vi (i, j), which is the vertical interpolation value, at the R pixel, which is the current pixel located at (i, j), the direction interpolation image generator 110 may determine [-1 2 2 2 -1] T. which are the pixel value of the directional filter and the input vector CFA image performs a convolution operation between the M b (i, j) 5 × 1.

이를 수학식으로 나타내면 다음의 수학식 2와 같다.This can be expressed by the following equation (2).

Figure 112007061614245-pat00002
Figure 112007061614245-pat00002

이때, T는 전치 행렬, *는 컨벌루션(convolution) 연산, (Mb(i,j))5×1 은 입력 CFA 영상에서 픽셀 (i,j)를 중심으로 상하 인접한 양 두 개의 픽셀을 포함한 총 다섯 개의 픽셀 값을 의미한다. 그리고, 이때의 각 픽셀 값은 G 픽셀 값, R 픽셀 값, 또는 B 픽셀 값 중 어느 하나의 값이다.Where T is the transpose matrix, * is the convolution operation, and (M b (i, j)) 5 × 1 is the total including two pixels up and down adjacent to the pixel (i, j) in the input CFA image. It means five pixel values. Each pixel value at this time is any one of a G pixel value, an R pixel value, and a B pixel value.

그리고, 방향 보간 영상 생성부(110)는 입력 CFA 영상 내의 G 픽셀들을 제외한 모든 R 픽셀들과 B 픽셀들에 대해서, 방향성 필터링 벡터와의 컨벌루션 연산을 통해 수직 방향의 보간 값들인 Gvi들을 계산하여, 이 수직 방향의 보간 값들로 구성된 수직 방향의 G 채널 보간 영상을 생성한다.In addition, the direction interpolation image generator 110 calculates G vi , which are interpolation values in the vertical direction, by convolutional calculation with a directional filtering vector for all R pixels and B pixels except G pixels in the input CFA image. In addition, a vertical G-channel interpolation image of the vertical interpolation values is generated.

방향 상관 맵 생성부(120)는 입력 CFA 영상의 R 또는 B 픽셀 값들과 방향 보간 영상 생성부(110)에 의해 생성된 수평 방향의 G 채널 보간 영상의 보간 값들 간의 상관도를 나타내는 상관 값(correlation value)들로 구성된 수평 방향 상관 맵을 생성한다. 또한, 방향 상관 맵 생성부(120)는 입력 CFA 영상의 R 또는 B 픽셀 값들과 방향 보간 영상 생성부(110)에 의해 생성된 수직 방향의 G 채널 보간 영상의 보간 값들 간의 상관도를 나타내는 상관 값들로 구성된 수직 방향 상관 맵을 생성한다.The direction correlation map generator 120 correlates the correlation between the R or B pixel values of the input CFA image and the interpolation values of the horizontal G channel interpolation image generated by the direction interpolation image generator 110. Create a horizontal correlation map of values). In addition, the direction correlation map generator 120 may generate correlation values indicating correlations between R or B pixel values of the input CFA image and interpolation values of the G channel interpolation image in the vertical direction generated by the direction interpolation image generator 110. Create a vertical correlation map composed of.

먼저, 방향 상관 맵 생성부(120)가 수평 방향 상관 맵을 생성하는 과정에 대해서 상세히 설명한다.First, a process of generating the horizontal direction correlation map by the direction correlation map generator 120 will be described in detail.

수평 방향 상관 맵을 생성하기 위해서는 먼저 수평 방향의 참조 영상을 생성해야 하는데, 방향 상관 맵 생성부(120)가 수평 방향의 참조 영상을 생성하는 방법을 도 3a 내지 도 3d를 참조하여 다음과 같이 설명한다. 도 3a 내지 도 3d는 입력 CFA 영상에서 5×5 크기를 갖는 픽셀 그룹에 대한, 수평 참조 영상을 구성하는 픽셀 그룹을 생성하는 일 예를 도시한 것이다.In order to generate the horizontal correlation map, a horizontal reference image must be generated first. A method of generating the reference image in the horizontal direction by the direction correlation map generator 120 will be described with reference to FIGS. 3A through 3D as follows. do. 3A to 3D illustrate an example of generating a pixel group constituting a horizontal reference image for a pixel group having a size of 5 × 5 in an input CFA image.

도 3a에 도시된 바와 같이, 방향 상관 맵 생성부(120)가 수평 참조 영상을 생성하기 위해서는 5×5 크기의 입력 CFA 영상의 픽셀 그룹의 픽셀 값들인 (Mb(i,j)) 5×5 와 이 입력 CFA 영상에 대한 수평 방향의 G 채널 보간 영상의 픽셀 값들인 (Ghi(i,j)) 5×5 이 필요하다. 이때, (Mb(i,j)) 5×5 중 G 픽셀들의 값을 (Gb(i,j)) 5×5 , R 픽셀들의 값을 (Rb(i,j))5×5 , B 픽셀들의 값을 (Bb(i,j))5×5 라 한다.As shown in FIG. 3A, in order for the direction correlation map generator 120 to generate a horizontal reference image, (M b (i, j)) 5 × which is pixel values of a pixel group of an input CFA image having a size of 5 × 5. 5 and (G hi (i, j)) 5 × 5 , which are the pixel values of the horizontal G channel interpolation image for this input CFA image, are required. In this case, the value of the G pixels among (M b (i, j)) 5 × 5 is (G b (i, j)) 5 × 5 , and the value of the R pixels is (R b (i, j)) 5 × 5 , The value of B pixels is (B b (i, j)) 5 × 5 .

그리고, 도 3b에 도시된 바와 같이, 방향 상관 맵 생성부(120)는 G 픽셀들의 값인 (Gb(i,j)) 5×5 을 그대로 수평 방향 참조 픽셀들의 값으로 한다.As shown in FIG. 3B, the direction correlation map generation unit 120 sets (G b (i, j)) 5 × 5 which is the value of the G pixels as the values of the horizontal direction reference pixels.

그리고, 도 3c에 도시된 바와 같이, 방향 상관 맵 생성부(120)는 R 픽셀들의 값인 (Rb(i,j)) 5 에서 DC bias를 제거하는 R-G 보상을 함으로써 수평 방향 참조 픽셀들의 값인 (GR , hc(i,j)) 5 를 계산한다. 이때, R-G 보상을 수행하여 수평 방향 참조 픽셀들의 값을 계산하는 일 예로서, 다음의 수학식 3과 수학식 4를 사용할 수 있다.As shown in FIG. 3C, the direction correlation map generator 120 performs RG compensation to remove the DC bias at (R b (i, j)) 5 × 5 , which is the value of the R pixels, to thereby remove the horizontal reference pixels. The value (G R , hc (i, j)) 5 × 5 is calculated. In this case, as an example of calculating the values of the horizontal reference pixels by performing RG compensation, the following Equations 3 and 4 may be used.

이때, 도 3c에 도시된 바와 같이, 수학식 3과 수학식 4에서 (i,j)는 5×5 크기의 픽셀 그룹의 정중앙의 위치를 의미하며, (k,l)은 그 주변의 8 개의 R 픽셀들의 위치를 의미한다.At this time, as shown in Figure 3c, (i, j) in the equation (3) and (4) means the position of the center of the pixel group of the size 5 × 5, (k, l) is eight R means the position of the pixels.

Figure 112007061614245-pat00003
Figure 112007061614245-pat00003

이때, GR , hc(k,l)은 (k,l)에서의 수평 방향 참조 픽셀 값, Rb(k,l)은 (k,l)에서의 R 값, ΔRG(i,j)는 다음의 수학식 4를 통해 얻은 값으로서, (i,j)에서의 수평 방향의 보간 값과 R 픽셀 값의 차이를 의미한다.Where G R , hc (k, l) is the horizontal reference pixel value at (k, l), R b (k, l) is the R value at (k, l), Δ RG (i, j) Is a value obtained through Equation 4 below, and means the difference between the horizontal interpolation value and the R pixel value in (i, j).

Figure 112007061614245-pat00004
Figure 112007061614245-pat00004

이때, GR , hi(i,j)는 (i,j)에서의 수평 방향의 보간 값, Rb(i,j)는 (i,j)에서의 R 픽셀 값을 의미한다.At this time, G R , hi (i, j) denotes the horizontal interpolation value in (i, j), and R b (i, j) denotes the R pixel value in (i, j).

다음으로, 도 3d에 도시된 바와 같이, 방향 상관 맵 생성부(120)는 B 픽셀들의 값인 (Bb(i,j)) 5 에서 DC bias를 제거하는 B-G 보상을 함으로써 수평 방향 참조 픽셀들의 값인 (GB , hc(i,j))) 5 를 계산한다. 이때, B-G 보상을 수행하여 수평 방향 참조 픽셀들의 값을 계산하는 일 예로서, 다음의 수학식 5와 수학식 6을 사용할 수 있다.Next, as shown in FIG. 3D, the direction correlation map generator 120 performs a BG compensation to remove the DC bias at (B b (i, j)) 5 × 5 which is a value of the B pixels, thereby performing a horizontal reference pixel. Calculate the value of (G B , hc (i, j))) 5 × 5 . In this case, as an example of calculating the values of the horizontal reference pixels by performing BG compensation, the following Equations 5 and 6 may be used.

이때, 도 3d에 도시된 바와 같이, 수학식 5와 수학식 6에서 (i,j)는 5×5 크기의 픽셀 그룹의 정중앙의 위치를 의미하며, (m,n)은 그 주변의 4 개의 B 픽셀들의 위치를 의미한다.In this case, as shown in FIG. 3D, in Equation 5 and Equation 6, (i, j) denotes a position of the center of the pixel group having a size of 5x5, and (m, n) represents four positions The position of B pixels.

Figure 112007061614245-pat00005
Figure 112007061614245-pat00005

이때, GB , hc(m,n)은 (m,n)에서의 수평 방향 참조 픽셀 값, Bb(m,n)은 (m,n)에서의 B 값, ΔBG(i,j)는 다음의 수학식 6을 통해 얻은 값으로서, (i,j)에서의 수평 방향의 보간 값과 B 픽셀 값의 차이를 의미한다.Where G B , hc (m, n) is the horizontal reference pixel value at (m, n), B b (m, n) is the B value at (m, n), Δ BG (i, j) Is a value obtained through Equation 6 below, and means the difference between the horizontal interpolation value and the B pixel value in (i, j).

Figure 112007061614245-pat00006
Figure 112007061614245-pat00006

이때, GB , hi(i,j)는 (i,j)에서의 수평 방향의 보간 값, Bhi(i,j)는 (i,j)에서 의 평균 B 픽셀 값으로서

Figure 112007061614245-pat00007
을 의미한다.Where G B , hi (i, j) is the horizontal interpolation value at (i, j), and B hi (i, j) is the average B pixel value at (i, j).
Figure 112007061614245-pat00007
.

그리고, 방향 상관 맵 생성부(120)는 G 픽셀들에 대한 수평 방향 참조 픽셀들의 값인 (Gb(i,j)) 5×5 , R 픽셀들에 대한 수평 방향 참조 픽셀들의 값인 (GR,hc(i,j)) 5×5 및 B 픽셀들에 대한 수평 방향 참조 픽셀들의 값인 (GB , hc(i,j))) 5 를 조합함으로써 도 3a에 도시된 바와 같이 5×5 크기의 수평 방향 참조 영상을 구성하는 픽셀들의 값들인 (Rhc(i,j)) 5 를 생성한다.In addition, the direction correlation map generator 120 (G b (i, j)) 5 × 5 which is the value of the horizontal reference pixels with respect to the G pixels, and (G R, which is the value of the horizontal reference pixels with respect to the R pixels. hc (i, j)) 5 × 5 and 5 × 5 as shown in FIG. 3A by combining 5 × 5, which is the value of the horizontal reference pixels for B pixels, (G B , hc (i, j))) Generate (R hc (i, j)) 5 × 5 , which is the values of the pixels constituting the horizontal reference image of size.

그리고, 방향 상관 맵 생성부(120)는 수평 방향 참조 픽셀 값들인 (Rhc(i,j)) 5×5 와 방향 보간 영상 생성부(110)에 의해 생성된 수평 방향의 G 채널 보간 값들인 (Ghi(i,j)) 5×5 간의 상관 값들을 계산한다. 이때, 상관 값을 계산하는 방법으로, 차의 절대값 합(SAD:Sum of Absolute Difference), NCC(Normalized Cross Correlation), 또는 차의 제곱 합(SSD:Sum of squared difference) 등을 사용할 수 있다.In addition, the direction correlation map generator 120 may determine the horizontal reference pixel values (R hc (i, j)) 5 × 5 and the horizontal G channel interpolation values generated by the direction interpolation image generator 110. Calculate correlation values between (G hi (i, j)) 5 × 5 . In this case, as a method of calculating a correlation value, a sum of absolute difference (SAD), a normalized cross correlation (NCC), or a sum of squared difference (SSD) may be used.

일 예로서, 차의 절대값 합(SAD)을 사용하여 상관 값을 계산하는 방법은 다음의 수학식 7과 같다.As an example, a method of calculating a correlation value using an absolute sum of differences (SAD) is shown in Equation 7 below.

Figure 112007061614245-pat00008
Figure 112007061614245-pat00008

이때, Chi(i,j)는 (i,j)에서의 수평 방향의 상관 값을, N(i,j)는 (i,j)를 중심으로 한 5×5 크기를 갖는 픽셀 그룹을 의미하고, Rhc(k,l)은 (k,l)에서의 수평 방향 참조 픽셀 값을, Ghi(k,l)은 (k,l)에서의 수평 방향의 보간 값을 의미한다.In this case, C hi (i, j) means a horizontal correlation value in (i, j), and N (i, j) means a pixel group having a 5 × 5 size centering on (i, j). R hc (k, l) denotes a horizontal reference pixel value at (k, l), and G hi (k, l) denotes a horizontal interpolation value at (k, l).

방향 상관 맵 생성부(120)는 입력 CFA 영상에 대해 5×5 크기를 갖는 픽셀 그룹 전부에 대해 이러한 수평 방향의 상관 값을 계산하여, 수평 방향의 상관 값들로 구성된 수평 방향 상관 맵을 생성한다.The direction correlation map generator 120 calculates a horizontal correlation value for all pixel groups having a size of 5 × 5 with respect to the input CFA image, and generates a horizontal correlation map composed of horizontal correlation values.

또한, 방향 상관 맵 생성부(120)는 이러한 수평 방향 상관 맵을 생성하는 과정과 대응되는 방법을 사용하여, (i,j)에서의 수직 방향의 상관 값인 Cvi(i,j)를 계산하고, 계산된 수직 방향의 상관 값들로 구성된 수직 방향 상관 맵을 생성한다.In addition, the direction correlation map generator 120 calculates C vi (i, j), which is a correlation value in the vertical direction in (i, j), using a method corresponding to the process of generating the horizontal direction correlation map. Generate a vertical correlation map composed of the calculated vertical correlation values.

에지 기울기 계산부(130)는 입력 CFA 영상을 구성하는 각 픽셀들에서의 수평 방향의 에지 기울기(Edge Gradient)와 수직 방향의 에지 기울기를 계산한다. 에지는 영상의 특성이 급격하게 변하는 경계를 말하며, 예를 들면 물체의 외각을 나타내는 선 등을 말한다. 그리고, 이러한 에지를 검출하기 위해, 에지의 강도를 표시하는 에지 기울기를 계산하는데, 특히 본 실시예에서는 수평 방향의 에지 강도를 표시하는 수평 방향의 에지 기울기 및 수직 방향의 에지 강도를 표시하는 수직 방향의 에지 기울기를 계산한다. The edge gradient calculator 130 calculates an edge gradient in the horizontal direction and an edge gradient in the vertical direction in each pixel of the input CFA image. An edge refers to a boundary in which characteristics of an image change drastically. For example, an edge refers to a line indicating an exterior of an object. In order to detect such an edge, an edge slope indicating the strength of the edge is calculated. In particular, in the present embodiment, the edge slope in the horizontal direction and the vertical strength in the vertical direction indicate the edge strength in the horizontal direction. Calculate the edge slope of.

도 4는 에지 기울기 계산부(130)가 입력 CFA 영상의 (i,j)에 위치한 픽셀에서의 수평 방향의 에지 기울기 등을 계산하는 방법의 일 예를 도시한 것이다. 도 4를 참조하면, (i,j)에 위치한 픽셀을 중심으로 수평 방향에 있는 5 개의 픽셀들을 이용하여 에지 기울기인 Eh(i,j) 계산하며, 계산하는 방법의 일 예로서, 다음의 수학식 8을 사용할 수 있다.4 illustrates an example of a method in which the edge slope calculator 130 calculates a horizontal edge slope and the like in a pixel located at (i, j) of an input CFA image. Referring to FIG. 4, E h (i, j), which is an edge slope, is calculated using five pixels in a horizontal direction about a pixel located at (i, j). Equation 8 may be used.

Figure 112007061614245-pat00009
Figure 112007061614245-pat00009

이때, Gb(i,j-1), Gb(i,j+1), Rb(i,j-2), Rb(i,j+2), Rb(i,j) 등은 모두 (i,j)에 위치한 픽셀을 중심으로 수평 방향의 5개의 픽셀 값들을 의미한다.In this case, G b (i, j-1), Gb (i, j + 1), Rb (i, j-2), Rb (i, j + 2), Rb (i, j), etc. are all (i , j) refers to five pixel values in the horizontal direction with respect to the pixel located at.

또한, 수직 방향의 에지 기울기인 Ev(i,j) 계산하는 방법도 도 4에 도시한 바와 같이, 다음의 수학식 9을 사용할 수 있다.In addition, as shown in FIG. 4, a method of calculating E v (i, j), which is an edge slope in the vertical direction, may use Equation 9 below.

Figure 112007061614245-pat00010
Figure 112007061614245-pat00010

이때, Gb(i-1,j), Gb(i+1,j), Rb(i-2,j), Rb(i+2,j), Rb(i,j) 등은 모두 (i,j)에 위치한 픽셀을 중심으로 수직 방향의 5개의 픽셀 값들을 의미한다.At this time, G b (i-1, j), Gb (i + 1, j), Rb (i-2, j), Rb (i + 2, j), Rb (i, j), etc. are all (i , means five pixel values in the vertical direction with respect to the pixel located at j).

보간 방법 결정부(140)는 입력 CFA 영상의 (i,j)에 위치한 픽셀이 한 방향성이 강한 에지 영역에 해당하는지 여부를 판단하여, 방향 상관 맵 생성부(120)에서 생성된 상관 맵들을 이용하여 G 채널 영상을 보간할 것인지, 아니면 에지 기울기 계산부(130)에서 계산된 에지 기울기들을 이용하여 G 채널 영상을 보간할 것인지를 결정한다.The interpolation method determiner 140 determines whether a pixel located at (i, j) of the input CFA image corresponds to one directional edge region, and uses the correlation maps generated by the direction correlation map generator 120. To determine whether to interpolate the G channel image or to interpolate the G channel image using the edge slopes calculated by the edge slope calculator 130.

먼저, 보간 방법 결정부(140)는 입력 CFA 영상의 (i,j)에 위치한 픽셀이 한 방향성이 강한 에지 영역인지 여부를 판단하기 위해, 에지 기울기 계산부(130)에 의해 계산된 에지 기울기들로부터 에지 비율(EAR:Edge Aspect Ratio)을 계산하고, 이 계산된 에지 비율을 사전에 설정된 문턱값(threshold)과 비교한다. 이때, 에지 비율은 어느 한 방향의 에지 기울기가 다른 방향의 에지 기울기에 비해 얼마나 큰지 즉, 해당 픽셀이 어느 한 방향의 에지를 주요하게 가지는지를 나타내는 값이다. First, the interpolation method determiner 140 determines the edge gradients calculated by the edge gradient calculator 130 to determine whether a pixel located at (i, j) of the input CFA image is an directional edge region. An edge aspect ratio is calculated from EAR, and the calculated edge ratio is compared with a preset threshold. In this case, the edge ratio is a value indicating how large the edge slope of one direction is compared to the edge slope of the other direction, that is, the pixel mainly has an edge of one direction.

먼저 에지 비율을 계산하기 위해, 보간 방법 결정부(140)는 에지 기울기 계산부(130)에 의해 계산된 수평 방향의 에지 기울기와 수직 방향의 에지 기울기로부터 다음의 수학식 10을 이용한다.First, in order to calculate the edge ratio, the interpolation method determiner 140 uses the following equation 10 from the horizontal edge slope and the vertical edge slope calculated by the edge slope calculator 130.

Figure 112007061614245-pat00011
Figure 112007061614245-pat00012
Figure 112007061614245-pat00011
Figure 112007061614245-pat00012

이때, max(Eh(i,j),Ev(i,j))는 Eh(i,j)와 Ev(i,j) 중 큰 값을 의미한다.In this case, max (E h (i, j), E v (i, j)) means a larger value of E h (i, j) and E v (i, j).

만일, 계산된 에지 비율이 문턱값보다 크면, 보간 방법 결정부(140)는 현재 픽셀이 한 방향성이 강한 에지 영역에 해당하므로, 에지 기울기 계산부(130)에서 계산된 에지 기울기들을 이용하여 G 채널의 보간 방향을 결정하는 것으로 보간 방법을 결정한다. 반면에, 계산된 에지 비율이 문턱값보다 작으면, 보간 방법 결정부(140)는 현재 픽셀이 한 방향성이 강하지 않은 에지 영역에 해당하므로, 에지 기울기들을 이용하지 않고, 방향 상관 맵 생성부(120)에서 생성된 상관 맵들을 이용 하여 G 채널의 보간 방향을 결정하는 것으로 보간 방법을 결정한다. 그리고, 이러한 문턱값은 0.5 내지 1 의 범위 내의 값을 가진다.If the calculated edge ratio is larger than the threshold value, the interpolation method determiner 140 corresponds to an edge region in which the current pixel is strong in one direction, and thus the G channel using the edge slopes calculated by the edge slope calculator 130. The interpolation method is determined by determining the interpolation direction of. On the other hand, if the calculated edge ratio is smaller than the threshold value, the interpolation method determiner 140 corresponds to an edge region in which the current pixel is not strong in one direction, and thus does not use edge slopes, and thus the direction correlation map generator 120 The interpolation method is determined by determining the interpolation direction of the G channel using the correlation maps generated in the " And this threshold has a value in the range of 0.5-1.

G 채널 영상 보간부(150)는 보간 방법 결정부(140)에 의해 결정된 보간 방법에 따라, 입력 CFA 영상의 (i,j)에 위치한 픽셀에 보간 값 Gi(i,j)를 할당함으로써 G 채널 보간 영상을 생성한다.The G channel image interpolator 150 assigns the interpolation value G i (i, j) to a pixel located at (i, j) of the input CFA image according to the interpolation method determined by the interpolation method determiner 140. Generate channel interpolation image.

만일, 보간 방법 결정부(140)에 의해 방향 상관 맵 생성부(120)에서 생성된 상관 맵들을 이용하여 G 채널의 보간 방향을 정하는 것으로 결정된 경우, G 채널 영상 보간부(150)는 (i,j)에 위치한 픽셀에서 수평 방향의 상관 값인 Chi(i,j)와 수직 방향의 상관 값인 Cvi(i,j)를 비교하고, 비교 결과에 따라 다음 세 가지 중 어느 하나에 따라 G 채널 보간 값 Gi(i,j)를 할당한다.If it is determined by the interpolation method determiner 140 to determine the interpolation direction of the G channel using the correlation maps generated by the direction correlation map generator 120, the G channel image interpolator 150 (i, Compare the horizontal correlation C hi (i, j) and the vertical correlation C vi (i, j) in the pixel at j) and interpolate the G channel according to one of the following three according to the comparison result. Assign the value G i (i, j).

첫째는, (i,j)에 위치한 픽셀에서 수평 방향의 상관 값인 Chi(i,j)가 수직 방향의 상관 값인 Cvi(i,j)보다 크면, 이 (i,j)에 위치한 픽셀은 수평 방향의 보간 값과의 상관성이 크므로 G 채널 영상 보간부(150)는 보간 값인 Gi(i,j)에 수평 방향의 보간 값인 Ghi(i,j)를 할당한다. 이때의 수평 방향의 보간 값인 Ghi(i,j)는 방향 보간 영상 생성부(110)에 의해 생성된 수평 방향의 G 채널 보간 영상의 (i,j)에서의 값이다.First, if the horizontal correlation value C hi (i, j) is greater than the vertical correlation value C vi (i, j) in the pixel at (i, j), the pixel at (i, j) is Since the correlation with the horizontal interpolation value is large, the G channel image interpolator 150 allocates G hi (i, j), which is the horizontal interpolation value, to G i (i, j), which is an interpolation value. The horizontal interpolation value G hi (i, j) is a value in (i, j) of the horizontal G channel interpolation image generated by the direction interpolation image generator 110.

둘째는, 수평 방향의 상관 값인 Chi(i,j)가 수직 방향의 상관 값인 Cvi(i,j) 보다 작으면, 이 (i,j)에 위치한 픽셀은 수직 방향의 보간 값과의 상관성이 크므로 G 채널 영상 보간부(150)는 보간 값인 Gi(i,j)에 수직 방향의 보간 값인 Gvi(i,j)를 할당한다. 이때의 수직 방향의 보간 값인 Gvi(i,j)는 방향 보간 영상 생성부(110)에 의해 생성된 수직 방향의 G 채널 보간 영상의 (i,j)에서의 값이다.Second, if the horizontal correlation value C hi (i, j) is smaller than the vertical correlation value C vi (i, j), the pixel located at this (i, j) is correlated with the vertical interpolation value. Since the G channel image interpolator 150 allocates G vi (i, j), which is an interpolation value in the vertical direction, to G i (i, j), which is an interpolation value. In this case, G vi (i, j), which is a vertical interpolation value, is a value in (i, j) of the vertical G channel interpolation image generated by the direction interpolation image generator 110.

셋째는, 수평 방향의 상관 값인 Chi(i,j)와 수직 방향의 상관 값인 Cvi(i,j)가 같으면, G 채널 영상 보간부(150)는 보간 값인 Gi(i,j)에 수평 방향의 보간 값인 Ghi(i,j)와 수직 방향의 보간 값인 Gvi(i,j)를 산술 평균한 값을 할당한다.Third, if the horizontal correlation value C hi (i, j) is equal to the vertical correlation value C vi (i, j), the G channel image interpolator 150 is connected to the interpolation value G i (i, j). An arithmetic average of the horizontal interpolation G hi (i, j) and the vertical interpolation G vi (i, j) is assigned.

반면에, 보간 방법 결정부(140)에 의해 에지 기울기 계산부(120)에서 계산된 에지 기울기들을 이용하여 G 채널의 보간 방향을 정하는 것으로 결정된 경우, G 채널 영상 보간부(150)는 (i,j)에 위치한 픽셀에서 수평 방향의 에지 기울기인 Eh(i,j)와 수직 방향의 에지 기울기인 Ev(i,j)를 비교하고, 비교 결과에 따라 다음 세 가지 중 어느 하나에 따라 G 채널 보간 값 Gi(i,j)를 할당한다.On the other hand, when it is determined by the interpolation method determination unit 140 to determine the interpolation direction of the G channel by using the edge slopes calculated by the edge slope calculator 120, the G channel image interpolator 150 (i, Compare the horizontal edge slope E h (i, j) and the vertical edge slope E v (i, j) at the pixel located at j), and, depending on the result of the comparison, Assign the channel interpolation value G i (i, j).

첫째는, (i,j)에 위치한 픽셀에서 수평 방향의 에지 기울기인 Eh(i,j)가 수직 방향의 에지 기울기인 Ev(i,j)보다 작으면, 이 (i,j)에 위치한 픽셀은 수평 방향의 에지를 가지므로 G 채널 영상 보간부(150)는 보간 값인 보간 값인 Gi(i,j)에 수평 방향의 보간 값인 Ghi(i,j)를 할당한다.First, if E h (i, j), the horizontal edge slope, is less than E v (i, j), the vertical edge slope, at this pixel at (i, j), Since the located pixel has an edge in the horizontal direction, the G channel image interpolator 150 allocates G hi (i, j), which is a horizontal interpolation value, to G i (i, j), which is an interpolation value.

둘째는, G 채널 영상 보간부(150)는 수평 방향의 에지 기울기인 Eh(i,j)가 수직 방향의 에지 기울기인 Ev(i,j)보다 크면, 이 (i,j)에 위치한 픽셀은 수직 방향의 에지를 가지므로 G 채널 영상 보간부(150)는 보간 값인 보간 값인 Gi(i,j)에 수직 방향의 보간 값인 Gvi(i,j)를 할당한다.Second, the G channel image interpolator 150 is located at (i, j) when E h (i, j), which is an edge slope in the horizontal direction, is larger than E v (i, j), which is an edge slope in the vertical direction. Since the pixel has a vertical edge, the G channel interpolator 150 allocates G vi (i, j), which is a vertical interpolation value, to G i (i, j), which is an interpolation value.

셋째는, 수평 방향의 에지 기울기인 Eh(i,j)와 수직 방향의 에지 기울기인 Ev(i,j)가 같으면, G 채널 영상 보간부(150)는 보간 값인 Gi(i,j)에 수평 방향의 보간 값인 Ghi(i,j)와 수직 방향의 보간 값인 Gvi(i,j)를 산술 평균한 값을 할당한다.Third, if the horizontal edge slope E h (i, j) is equal to the vertical edge slope E v (i, j), the G channel image interpolator 150 may use the interpolation value G i (i, j). ) Is assigned the arithmetic average of the horizontal interpolation G hi (i, j) and the vertical interpolation G vi (i, j).

이를 통해, G 채널 영상 보간부(150)는 에지 비율이 강한 영역에서는 에지 기울기에 기반한 보간을 수행하고, 그렇지 않은 영역에서는 상관 값에 기반한 보간을 수행하는 것이 가능하여, 에지 기울기에 기반한 보간만을 수행하는 경우에 비해 신뢰성 있는 G 채널 보간 영상을 생성할 수 있게 한다.Through this, the G channel interpolator 150 may perform interpolation based on the edge slope in the region where the edge ratio is strong, and perform interpolation based on the correlation value in the other region, thereby performing only interpolation based on the edge slope. Compared to the case, it is possible to generate reliable G channel interpolation images.

그리고, 보다 신뢰성 있게 보간된 G 채널 보간 영상을 이용하여 B 채널이나 R 채널 보간 영상을 생성할 수 있으므로, 전 채널에 대하여 보간 영상의 신뢰도를 개선할 수 있다.In addition, since the B channel or the R channel interpolation image may be generated using the G channel interpolation image which is more reliably interpolated, the reliability of the interpolation image may be improved for all channels.

B 채널 영상 보간부(160)는 입력 CFA 영상에 대한 B 채널 보간 영상을 생성하기 위해서, (i,j)에 위치한 픽셀의 주변에 있는 4 개의 B 픽셀들에 대한 G 채널 영상 보간부(150)에 의해 할당된 G 채널 보간 값들과 입력 CFA 영상의 B 픽셀들의 값들 간의 차이 값들을 계산한다. 이때의 차이 값들은 도 5를 참조하면, 다음의 수 학식 11과 같이 표현된다.The B channel image interpolator 160 generates a G channel interpolator 150 for four B pixels around the pixel located at (i, j) to generate a B channel interpolation image for the input CFA image. Compute the difference values between the G channel interpolation values assigned by and the values of the B pixels of the input CFA image. At this time, referring to FIG. 5, the difference values are represented by Equation 11 below.

Figure 112007061614245-pat00013
Figure 112007061614245-pat00013

이때, Gi(i-1,j-1) 등은 G 채널 영상 보간부(150)에 의해 (i-1,j-1) 등에서 생성된 G 채널 보간 값이고, B(i-1,j-1) 등은 입력 CFA 영상의 (i-1,j-1) 등에서의 B 픽셀 값이다.In this case, G i (i-1, j-1) and the like are G channel interpolation values generated by (i-1, j-1) by the G channel image interpolator 150 and B (i-1, j). -1) and the like are B pixel values in (i-1, j-1) and the like of the input CFA image.

그리고, B 채널 영상 보간부(160)는 G 채널 영상 보간부(150)에 의해 할당된 G 채널 보간 값인 Gi(i,j)와 앞서 계산된 차이값들을 이용하여, 다음 세 가지 중 어느 하나에 따라 B 채널 보간 영상인 Bi(i,j)를 생성한다.In addition, the B channel image interpolator 160 uses G i (i, j), which is the G channel interpolation value assigned by the G channel interpolator 150, and the difference values previously calculated. According to generate a B channel interpolation image B i (i, j).

첫째, 도 5에 도시된 바와 같이 먼저 대각선 방향에 B 픽셀들이 위치한 경우 즉, (i,j)에 위치한 R 픽셀에서의 B 채널 보간 값인 Bi(i,j)는, (i,j)에서의 G 채널 보간 값에서 수학식 11에서 계산된 4개의 차이값들을 산술 평균한 값을 뺀 값이며, 다음의 수학식 12와 같다.First, as shown in FIG. 5, when B pixels are positioned diagonally, that is, B i (i, j), which is a B channel interpolation value at an R pixel located at (i, j), is represented by (i, j), Is a value obtained by subtracting the arithmetic average of the four difference values calculated in Equation 11 from the G channel interpolation value of Equation (11).

Figure 112007061614245-pat00014
Figure 112007061614245-pat00014

둘째, 도 5에 도시된 바와 같이 좌우에 B 픽셀들이 위치한 경우 즉, (i-1,j)에 위치한 G 픽셀에서의 B 채널 보간 값인 Bi(i-1,j)는, (i-1,j)에서의 G 채널 보간 값에서 (i-1,j)의 좌우에 위치 픽셀들에서의 차이값들을 산술 평균한 값을 뺀 값이며, 다음의 수학식 13과 같다.Second, as shown in FIG. 5, when B pixels are positioned at the left and right, that is, B i (i-1, j), which is the B channel interpolation value at the G pixel located at (i-1, j), is (i-1 is a value obtained by subtracting the arithmetic mean value of the difference values of the position pixels to the left and right of (i-1, j) from the G channel interpolation value at (j).

Figure 112007061614245-pat00015
Figure 112007061614245-pat00015

셋째, 도 5에 도시된 바와 같이 상하에 B 픽셀들이 위치한 경우 즉, (i,j-1)에 위치한 G 픽셀에서의 B 채널 보간 값인 Bi(i,j-1)는, (i,j-1)에서의 G 채널 보간 값에서 (i,j-1)의 상하에 위치한 픽셀들에서의 차이값들을 산술 평균한 값을 뺀 값이며, 다음의 수학식 14와 같다.Third, when B pixels are positioned above and below, as shown in FIG. 5, that is, B i (i, j-1), which is the B channel interpolation value at the G pixel located at (i, j-1), is represented by (i, j It is the value obtained by subtracting the arithmetic mean value of the difference values of the pixels located above and below (i, j-1) from the G channel interpolation value in −1).

Figure 112007061614245-pat00016
Figure 112007061614245-pat00016

그리고, B 채널 영상 보간부(160)는 입력 CFA 영상 내의 모든 R 픽셀들과 G 픽셀들에 대해서, 수학식 12 내지 수학식 14 중 어느 하나를 이용하여 B 채널 보간 값들을 계산함으로써, B 채널 보간 값들로 구성된 B 채널 보간 영상을 생성한다.In addition, the B channel interpolation unit 160 calculates B channel interpolation values by using any one of Equations 12 to 14 for all R pixels and G pixels in the input CFA image. Generates a B-channel interpolation image composed of values.

R 채널 영상 보간부(170)도 B 채널 영상 보간부(160)와 마찬가지로, (i,j)에 위치한 픽셀의 주변에 있는 4 개의 R 픽셀들에 대하여 G 채널 영상 보간부(150)에 의해 할당된 G 채널 보간 값들과 입력 CFA 영상의 R 픽셀들의 값들 간의 차이 값들 을 계산하고, G 채널 영상 보간부(150)에 의해 할당된 G 채널 보간 값인 Gi(i,j)와 앞서 계산된 차이값들을 이용하여 R 채널 보간 값들을 계산하고, 계산된 R 채널 보간 값들로 구성된 R 채널 보간 영상을 생성한다.The R channel image interpolator 170, like the B channel image interpolator 160, is allocated by the G channel image interpolator 150 to four R pixels around the pixel located at (i, j). Calculates difference values between the G channel interpolation values and the R pixels of the input CFA image, and calculates the difference value G i (i, j) previously calculated by the G channel interpolation unit 150. R channel interpolation values are calculated, and an R channel interpolation image composed of the calculated R channel interpolation values is generated.

도 6은 본 발명의 일 실시예에 따른 영상 보간 방법에 관한 흐름도이다. 도 6을 참조하면, 본 실시예에 따른 영상 보간 방법은 도 1에 도시된 영상 보간 장치에서 시계열적으로 처리되는 단계들로 구성된다. 따라서, 이하 생략된 내용이라 하더라도 도 1에 도시된 영상 보간 장치에 관하여 이상에서 기술된 내용은 본 실시예에 따른 데이터 압축 방법에도 적용된다.6 is a flowchart illustrating an image interpolation method according to an embodiment of the present invention. Referring to FIG. 6, the image interpolation method according to the present embodiment includes steps that are processed in time series in the image interpolation apparatus illustrated in FIG. 1. Therefore, even if omitted below, the above descriptions of the image interpolation apparatus shown in FIG. 1 also apply to the data compression method according to the present embodiment.

도 6을 참조하면, 610 단계에서 영상 보간 장치는 입력 CFA 영상에 대한 수평 방향의 G 채널 보간 영상과 수직 방향의 G 채널 보간 영상을 생성한다. 이를 위해, 일 예로서, 입력 CFA 영상에 대해 [-1 2 2 2 -1] 또는 [-1 2 2 2 -1]T 의 방향성 필터링 벡터를 컨벌루션 연산함으로써 수평 방향의 G 채널 보간 영상과 수직 방향의 G 채널 보간 영상을 생성한다.Referring to FIG. 6, in operation 610, the image interpolation apparatus generates a horizontal G channel interpolation image and a vertical G channel interpolation image with respect to the input CFA image. To this end, as an example, by convolutional operation of the directional filtering vector of [-1 2 2 2 -1] or [-1 2 2 2 -1] T on the input CFA image, the horizontal direction of the G channel interpolation image and the vertical direction Generate G channel interpolation images.

620 단계에서 영상 보간 장치는 610 단계에서 생성된 수평 방향의 G 채널 보간 영상과 입력 CFA 영상을 이용하여 5×5 크기를 갖는 수평 방향의 참조 영상들을 생성하고, 610 단계에서 생성된 수직 방향의 G 채널 보간 영상과 입력 CFA 영상을 이용하여 5×5 크기를 갖는 수직 방향의 참조 영상들을 생성한다. 이때, 입력 CFA 영상 중 G 픽셀들에 대해서는 입력 CFA 영상의 G 값을 그대로 참조 픽셀들의 값으로 사용한다. 그리고, 입력 CFA 영상 중 R 픽셀들에 대해서는 수학식 3과 수학식 4 에서와 같이 이 R 픽셀들의 값에서 DC bias를 제거하는 R-G 보상을 함으로써 참조 픽셀들의 값을 계산한다. 또한, 입력 CFA 영상 중 B 픽셀들에 대해서도 이 B 픽셀들의 값에서 DC bias를 제거하는 B-G 보상을 함으로써 참조 픽셀들의 값을 계산한다. 그리고, 이 계산된 참조 픽셀들의 값으로 구성된 수평 방향의 참조 영상을 생성한다. 그리고, 이와 대응되는 방법을 사용하여 수직 방향의 참조 영상을 생성한다.In operation 620, the image interpolation apparatus generates horizontal reference images having a 5 × 5 size by using the horizontal G channel interpolation image and the input CFA image generated in operation 610, and generates the vertical G generated in operation 610. A vertical reference image having a size of 5 × 5 is generated using the channel interpolation image and the input CFA image. In this case, the G values of the input CFA image are used as the reference pixels as the G values of the input CFA image. The R pixels of the input CFA image are calculated by performing R-G compensation that removes a DC bias from the R pixels as shown in Equations 3 and 4, thereby calculating the values of the reference pixels. In addition, the values of the reference pixels are calculated by performing B-G compensation on the B pixels of the input CFA image by removing the DC bias from the values of the B pixels. Then, a horizontal reference image composed of the calculated reference pixels is generated. The reference image in the vertical direction is generated using the corresponding method.

630 단계에서 영상 보간 장치는 620 단계에서 생성된 수평 방향의 참조 영상과 610 단계에서 생성된 수평 방향의 G 채널 보간 영상 간의 상관도를 나타내는 상관 값들을 계산하고, 이 계산된 상관 값들로 구성된 수평 방향의 G 채널 보간 영상의 상관 맵을 생성한다. 이때, 상관 값을 계산하는 방법은 620 단계에서 생성된 수평 방향의 참조 영상과 610 단계에서 생성된 수평 방향의 G 채널 보간 영상 간의 차의 절대값 합(SAD:Sum of Absolute Difference), Normalized correlation coefficients, 또는 차의 제곱 합(SSD:Sum of squared difference) 등의 다양한 방법을 사용할 수 있다. 또한, 같은 방법으로 수직 방향의 G 채널 보간 영상의 상관 맵을 생성한다.In operation 630, the image interpolation apparatus calculates correlation values representing correlations between the horizontal reference image generated in step 620 and the horizontal G channel interpolated image generated in step 610, and includes the calculated correlation values. Create a correlation map of G channel interpolation images. In this case, the method of calculating correlation values includes sum of absolute difference (SAD) and normalized correlation coefficients between the horizontal reference image generated in step 620 and the horizontal G channel interpolated image generated in step 610. Various methods can be used, such as, or sum of squared difference (SSD). In addition, a correlation map of the G channel interpolation image in the vertical direction is generated in the same manner.

640 단계에서 영상 보간 장치는 입력 CFA 영상을 구성하는 각 픽셀들에서의 수평 방향의 에지 기울기(Edge Gradient)와 수직 방향의 에지 기울기를 계산한다. 이때 일 예로서, 수평 방향의 에지 기울기를 계산하기 위해 수학식 8을 사용할 수 있고, 수직 방향의 에지 기울기를 계산하기 위해 수학식 9를 사용할 수 있다. In operation 640, the image interpolation apparatus calculates an edge gradient in the horizontal direction and an edge gradient in the vertical direction in each pixel of the input CFA image. In this case, as an example, Equation 8 may be used to calculate the edge slope in the horizontal direction, and Equation 9 may be used to calculate the edge slope in the vertical direction.

650 단계에서 영상 보간 장치는 입력 CFA 영상을 구성하는 각 픽셀들이 한 방향성이 강한 에지 영역에 해당하는지 여부를 판단한다. 이를 위해, 영상 보간 장치는 640 단계에서 계산된 수평 방향의 에지 기울기와 수직 방향의 에지 기울기로부터 에지 비율을 계산하고, 만일 계산된 에지 비율이 문턱값보다 크면, 현재 픽셀이 한 방향성이 강한 에지 영역에 해당한다고 판단한다.In operation 650, the image interpolation apparatus determines whether each pixel constituting the input CFA image corresponds to an edge region having one strong direction. To this end, the image interpolation apparatus calculates an edge ratio from the horizontal edge slope and the vertical edge slope calculated in step 640, and if the calculated edge ratio is larger than the threshold value, the edge region where the current pixel is strongly oriented We judge that it corresponds to.

660 단계에서 영상 보간 장치는 650 단계에서의 판단 결과 현재 픽셀이 한 방향성이 강한 에지 영역에 해당하지 않는다고 판단되면, 630 단계에서 생성된 상관 맵을 이용하여 G 채널 보간 영상을 생성한다. 상세하게는, (i,j)에 위치한 픽셀에서 수평 방향의 상관 값인 Chi(i,j)와 수직 방향의 상관 값인 Cvi(i,j)를 비교하고, 비교 결과에 따라 다음 세 가지 방법 중 어느 하나의 방법으로 G 채널 보간 값 Gi(i,j)를 할당한다.In operation 660, when the image interpolation apparatus determines that the current pixel does not correspond to an edge region having a strong directionality, in operation 650, the image interpolation apparatus generates a G-channel interpolation image using the correlation map generated in operation 630. Specifically, in the pixel located at (i, j), the horizontal correlation value C hi (i, j) and the vertical correlation value C vi (i, j) are compared, and the following three methods are used. The G channel interpolation value G i (i, j) is assigned by either method.

첫째는, (i,j)에 위치한 픽셀에서 수평 방향의 상관 값인 Chi(i,j)가 수직 방향의 상관 값인 Cvi(i,j)보다 크면, 이 (i,j)에 위치한 픽셀은 수평 방향의 보간 값과의 상관성이 크므로, 보간 값인 Gi(i,j)에 수평 방향의 보간 값인 Ghi(i,j)를 할당한다. 이때의 수평 방향의 보간 값인 Ghi(i,j)는 610 단계에서 생성된 수평 방향의 G 채널 보간 영상의 (i,j)에서의 값이다.First, if the horizontal correlation value C hi (i, j) is greater than the vertical correlation value C vi (i, j) in the pixel at (i, j), the pixel at (i, j) is as a large correlation with the interpolation in the horizontal direction, and assigns an interpolation value G i G hi (i, j ) of the interpolation values in the horizontal direction (i, j). The horizontal interpolation value G hi (i, j) is a value in (i, j) of the horizontal G channel interpolation image generated in step 610.

둘째는, 수평 방향의 상관 값인 Chi(i,j)가 수직 방향의 상관 값인 Cvi(i,j)보다 작으면, 이 (i,j)에 위치한 픽셀은 수직 방향의 보간 값과의 상관성이 크므로, 보간 값인 Gi(i,j)에 수직 방향의 보간 값인 Gvi(i,j)를 할당한다. 이때의 수직 방향의 보간 값인 Gvi(i,j)는 610 단계에서 생성된 수직 방향의 G 채널 보간 영상의 (i,j)에서의 값이다.Second, if the horizontal correlation value C hi (i, j) is smaller than the vertical correlation value C vi (i, j), the pixel located at this (i, j) is correlated with the vertical interpolation value. Since the interpolation value G i (i, j) is large, the interpolation value G vi (i, j) in the vertical direction is assigned. In this case, G vi (i, j), which is a vertical interpolation value, is a value in (i, j) of the vertical G channel interpolation image generated in step 610.

셋째는, 수평 방향의 상관 값인 Chi(i,j)와 수직 방향의 상관 값인 Cvi(i,j)가 같으면, 보간 값인 Gi(i,j)에 수평 방향의 보간 값인 Ghi(i,j)와 수직 방향의 보간 값인 Gvi(i,j)를 산술 평균한 값을 할당한다.Third, if the horizontal correlation value C hi (i, j) is equal to the vertical correlation value C vi (i, j), the interpolation value G i (i, j) is equal to the horizontal interpolation value G hi (i and arithmetic average of the vertical interpolation G vi (i, j).

670 단계에서 영상 보간 장치는 650 단계에서의 650 단계에서의 판단 결과 현재 픽셀이 한 방향성이 강한 에지 영역에 해당한다고 판단되면, 640 단계에서 계산된 에지 기울기들을 이용하여 G 채널 보간 영상을 생성한다. 상세하게는, (i,j)에 위치한 픽셀에서 수평 방향의 에지 기울기인 Eh(i,j)와 수직 방향의 에지 기울기인 Ev(i,j)를 비교하고, 비교 결과에 따라 다음 세 가지 방법 중 어느 하나의 방법으로 G 채널 보간 값 Gi(i,j)를 할당한다.In operation 670, if the image interpolation apparatus determines that the current pixel corresponds to a strong directional edge region in operation 650, the image interpolation apparatus generates a G-channel interpolation image using the edge slopes calculated in operation 640. Specifically, in the pixel located at (i, j), the horizontal edge slope E h (i, j) and the vertical edge slope E v (i, j) are compared, and the following three The G channel interpolation value G i (i, j) is assigned by one of the methods.

첫째는, (i,j)에 위치한 픽셀에서 수평 방향의 에지 기울기인 Eh(i,j)가 수직 방향의 에지 기울기인 Ev(i,j)보다 작으면, 이 (i,j)에 위치한 픽셀은 수평 방향의 에지를 가지므로, 보간 값인 보간 값인 Gi(i,j)에 수평 방향의 보간 값인 Ghi(i,j)를 할당한다.First, if E h (i, j), the horizontal edge slope, is less than E v (i, j), the vertical edge slope, at this pixel at (i, j), located pixel is assigned a hi G (i, j) which is the value of the interpolation values in the horizontal direction because of an edge in the horizontal direction, the interpolation value interpolated G i (i, j).

둘째는, G 채널 영상 보간부(150)는 수평 방향의 에지 기울기인 Eh(i,j)가 수직 방향의 에지 기울기인 Ev(i,j)보다 크면, 이 (i,j)에 위치한 픽셀은 수직 방향의 에지를 가지므로, 보간 값인 보간 값인 Gi(i,j)에 수직 방향의 보간 값인 Gvi(i,j)를 할당한다.Second, the G channel image interpolator 150 is located at (i, j) when E h (i, j), which is an edge slope in the horizontal direction, is larger than E v (i, j), which is an edge slope in the vertical direction. Since the pixel has a vertical edge, the interpolation value G i (i, j) is assigned to the interpolation value G vi (i, j).

셋째는, 수평 방향의 에지 기울기인 Eh(i,j)와 수직 방향의 에지 기울기인 Ev(i,j)가 같으면, 보간 값인 Gi(i,j)에 수평 방향의 보간 값인 Ghi(i,j)와 수직 방향의 보간 값인 Gvi(i,j)를 산술 평균한 값을 할당한다.Third, if the horizontal edge slope E h (i, j) and the vertical edge slope E v (i, j) are equal, the interpolation value G i (i, j) is the horizontal interpolation value G hi It assigns the arithmetic mean of (i, j) and G vi (i, j), which is the vertical interpolation value.

680 단계에서 영상 보간 장치는 모든 R 픽셀들과 B 픽셀들에 대하여 G 채널 보간 값인 Gi(i,j)가 할당되어 있는지 여부를 판단함으로써 G 채널 보간 영상의 생성이 완료되었는지 여부를 판단하고, 판단 결과 아직 완료되지 않았으면 640 단계로 진행한다.In operation 680, the image interpolation apparatus determines whether generation of the G channel interpolation image is completed by determining whether G i (i, j), which is a G channel interpolation value, is allocated to all the R pixels and the B pixels. If the determination is not yet completed, the process proceeds to step 640.

690 단계에서 영상 보간 장치는 입력 CFA 영상과 660 단계 또는 670 단계에서 생성된 G 채널 보간 영상을 이용하여, B 채널 보간 영상을 생성한다. 또한, 영상 보간 장치는 입력 CFA 영상과 660 단계 또는 670 단계에서 생성된 G 채널 보간 영상을 이용하여, R 채널 보간 영상을 생성한다.In operation 690, the image interpolation apparatus generates a B channel interpolation image by using the input CFA image and the G channel interpolation image generated in operation 660 or 670. In addition, the image interpolation apparatus generates an R channel interpolation image by using the input CFA image and the G channel interpolation image generated in step 660 or 670.

먼저, B 채널 보간 영상을 생성하기 위해, (i,j)에 위치한 픽셀의 주변에 있는 4 개의 B 픽셀들에 대한 G 채널 보간 값들과 입력 CFA 영상의 B 픽셀들의 값들 간의 차이 값들을 수학식 11을 이용하여 계산 한 후, 계산된 차이 값들과 G 채널 보간 값들로부터 수학식 12 내지 수학식 14를 이용하여 B 채널 보간 값들을 계산한 다. 그리고, 입력 CFA 영상 내의 모든 R 픽셀들과 G 픽셀들에 대해서, 수학식 12 내지 수학식 14을 이용하여 B 채널 보간 값들을 계산함으로써, B 채널 보간 값들로 구성된 B 채널 보간 영상을 생성한다.First, in order to generate a B channel interpolation image, the difference between the G channel interpolation values for four B pixels around the pixel located at (i, j) and the values of the B pixels of the input CFA image is represented by Equation 11 After the calculation, the B channel interpolation values are calculated using the equations (12) to (14) from the calculated difference values and the G channel interpolation values. Then, for all R pixels and G pixels in the input CFA image, B channel interpolation values are calculated using Equations 12 to 14 to generate a B channel interpolation image composed of B channel interpolation values.

그리고, R 채널 보간 영상을 생성하기 위해서도, (i,j)에 위치한 픽셀의 주변에 있는 4 개의 R 픽셀들에 대한 G 채널 보간 값들과 입력 CFA 영상의 R 픽셀들의 값들 간의 차이 값들을 계산하고, 계산된 차이 값들과 G 채널 보간 값들을 이용하여 R 채널 보간 값들을 계산한다. 그리고, 모든 B 픽셀들과 G 픽셀들에 대하여 R 채널 보간 값들을 계산함으로써 R 채널 보간 영상을 생성한다.In addition, to generate an R channel interpolation image, a difference value between G channel interpolation values for four R pixels around a pixel located at (i, j) and R pixels of an input CFA image is calculated, The R channel interpolation values are calculated using the calculated difference values and the G channel interpolation values. The R channel interpolation image is generated by calculating the R channel interpolation values for all the B pixels and the G pixels.

그리고, 본 발명의 다른 일 실시예에 따른 영상 보간 방법으로써, 도 6의 620 단계와 630 단계를 650 단계 이후에 수행함으로써 상관 맵을 이용하여 G 채널 영상을 보간하는 경우에만, 수평 방향의 G 채널 보간 영상의 상관 맵과 수직 방향의 G 채널 상관 맵을 생성하도록 할 수 있다. 즉, 본 실시예에서는 도 6의 650 단계에서의 판단 결과, 현재 픽셀이 한 방향성이 강한 에지 영역에 해당하지 않는 경우에 수평 및 수직 방향의 참조 영상을 생성하고, 수평 및 수직 방향의 G 채널 보간 영상의 상관 맵을 생성한 후, 도 6의 660 단계로 진행하여 생성된 상관 맵들을 이용하여 G 채널 영상을 보간한다.In addition, as an image interpolation method according to another embodiment of the present invention, the G channel in the horizontal direction is performed only when the G channel image is interpolated using the correlation map by performing steps 620 and 630 of FIG. 6 after step 650. A correlation map of the interpolated image and a G channel correlation map in the vertical direction may be generated. That is, in the present embodiment, as a result of the determination in step 650 of FIG. 6, when the current pixel does not correspond to one directional edge region, the reference image is generated in the horizontal and vertical directions, and the G channel interpolation in the horizontal and vertical directions is performed. After generating a correlation map of the image, the process proceeds to step 660 of FIG. 6 and interpolates the G channel image using the generated correlation maps.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The present invention can also be embodied as computer-readable codes on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. Examples of the computer-readable recording medium include a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like, and may be implemented in the form of a carrier wave (for example, transmission via the Internet) . The computer readable recording medium may also be distributed over a networked computer system so that computer readable code can be stored and executed in a distributed manner.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far I looked at the center of the preferred embodiment for the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

도 1은 본 발명의 일 실시예에 따른 영상 보간 장치의 구성도이다.1 is a block diagram of an image interpolation apparatus according to an embodiment of the present invention.

도 2a와 도 2b는 방향 보간 영상 생성부(110)가 수평 방향의 G 채널 보간 영상과 수직 방향의 G 채널 보간 영상을 생성하는 과정의 일 예를 도시한 것이다.2A and 2B illustrate an example of a process in which the direction interpolation image generator 110 generates a G channel interpolation image in a horizontal direction and a G channel interpolation image in a vertical direction.

도 3a 내지 도 3d는 방향 상관 맵 생성부(120)가 수평 방향의 참조 영상을 생성하는 과정의 일 예를 도시한 것이다.3A to 3D illustrate an example of a process in which the direction correlation map generator 120 generates a reference image in a horizontal direction.

도 4는 에지 기울기 계산부(130)가 입력 CFA 영상의 (i,j)에서의 수평 방향의 에지 기울기와 수직 방향의 에지 기울기를 계산하는 방법의 일 예를 도시한 것이다.4 illustrates an example of a method in which the edge slope calculator 130 calculates a horizontal edge slope and a vertical edge slope in (i, j) of an input CFA image.

도 5는 B 채널 영상 보간부(160)에서 B 채널 보간 영상을 생성하는 것을 설명하기 위한 입력 CFA 영상의 일 예이다.5 is an example of an input CFA image for explaining generation of a B channel interpolation image by the B channel image interpolator 160.

도 6은 본 발명의 일 실시예에 따른 영상 보간 방법에 관한 흐름도이다.6 is a flowchart illustrating an image interpolation method according to an embodiment of the present invention.

Claims (14)

이미지의 픽셀들 중 현재 픽셀의 복수의 소정 방향들의 주변 픽셀들의 값을 이용하여 상기 소정 방향들 각각에 대한 현재 픽셀의 보간 값을 결정하는 단계;Determining an interpolation value of the current pixel in each of the predetermined directions using the value of the peripheral pixels in the plurality of predetermined directions of the current pixel among the pixels of the image; 상기 현재 픽셀의 값과 상기 보간 값들과의 상관도들을 계산하는 단계; 및Calculating correlations between the value of the current pixel and the interpolation values; And 상기 계산된 상관도들에 따라, 상기 소정 방향들 각각의 보간 값들 중 어느 하나를 상기 현재 픽셀의 보간 값으로 결정하는 단계를 포함하고,Determining, according to the calculated correlations, any one of interpolation values of each of the predetermined directions as an interpolation value of the current pixel, 상기 상관도들을 계산하는 단계는Computing the correlations 상기 현재 픽셀의 값들에 대하여, 상기 보간 값들을 이용하여 보정을 함으로써 상기 소정 방향들에 따른 참조 픽셀들의 값을 계산하는 단계; 및Calculating values of reference pixels along the predetermined directions by correcting the values of the current pixel using the interpolation values; And 상기 계산된 참조 픽셀들의 값과 상기 보간 값들의 차이를 이용하여 상기 상관도들을 계산하는 단계를 포함하는 것을 특징으로 하는 영상 보간 방법.And calculating the correlations using the difference between the calculated values of the reference pixels and the interpolation values. 삭제delete 제1 항에 있어서,The method according to claim 1, 상기 현재 픽셀의 상기 소정 방향들에 따른 에지 기울기들을 계산하는 단계; 및Calculating edge slopes in the predetermined directions of the current pixel; And 상기 계산된 에지 기울기들을 이용하여 상기 현재 픽셀이 한 방향성이 강한 에지 영역에 해당하는지를 판단하는 단계를 더 포함하고,Determining whether the current pixel corresponds to one directional edge region by using the calculated edge slopes, 상기 현재 픽셀의 보간 값을 결정하는 단계는 상기 판단 결과에 따라 선택적으로 상기 각각의 보간 값들 중 어느 하나를 상기 현재 픽셀의 보간 값으로 결정하는 것을 특징으로 하는 영상 보간 방법.The determining of the interpolation value of the current pixel may include selectively determining any one of the respective interpolation values as the interpolation value of the current pixel according to the determination result. 제3 항에 있어서, 상기 현재 픽셀의 보간 값을 결정하는 단계는The method of claim 3, wherein the determining of the interpolation value of the current pixel comprises: 상기 판단 결과에 따라 선택적으로 상기 계산된 상기 에지 기울기들의 크기를 비교하는 단계; 및Selectively comparing the calculated magnitudes of the edge slopes according to the determination result; And 상기 비교 결과에 따라, 상기 각각의 보간 값들 중 어느 하나를 상기 현재 픽셀의 보간 값으로 결정하는 단계를 포함하는 것을 특징으로 하는 영상 보간 방법.And determining one of the interpolation values as the interpolation value of the current pixel according to the comparison result. 제1 항에 있어서, 상기 복수의 소정 방향들은The method of claim 1, wherein the plurality of predetermined directions 상기 현재 픽셀의 수평 방향 및 수직 방향인 것을 특징으로 하는 영상 보간 방법.And the horizontal and vertical directions of the current pixel. 제1 항에 있어서,The method according to claim 1, 상기 보간 값은 CFA 베이어 패턴 (Color Filter Array Bayer Pattern) 영상에서의 G 채널 영상의 보간 값인 것을 특징으로 하는 영상 보간 방법.The interpolation value is an interpolation method of a G channel image in a CFA Bayer Pattern (Color Filter Array Bayer Pattern) image. 제6 항에 있어서,The method according to claim 6, 상기 현재 픽셀의 값과 상기 결정된 G 채널 영상의 보간 값을 이용하여, R 채널 영상의 보간 값을 계산하는 단계; 및Calculating an interpolation value of the R channel image by using the current pixel value and the determined interpolation value of the G channel image; And 상기 현재 픽셀의 값과 상기 결정된 G 채널 영상의 보간 값을 이용하여, B 채널 영상의 보간 값을 계산하는 단계를 더 포함하는 것을 특징으로 하는 영상 보간 방법.And calculating an interpolation value of the B channel image by using the current pixel value and the determined interpolation value of the G channel image. 이미지의 픽셀들 중 현재 픽셀의 복수의 소정 방향들의 주변 픽셀들의 값을 이용하여 상기 소정 방향들 각각에 대한 현재 픽셀의 보간 값을 결정함으로써 상기 소정 방향들의 보간 영상들을 생성하는 방향 보간 영상 생성부;A direction interpolation image generation unit generating interpolation images of the predetermined directions by determining an interpolation value of the current pixel in each of the predetermined directions using values of peripheral pixels of the plurality of predetermined directions of the current pixel among the pixels of the image; 상기 현재 픽셀의 값과 상기 보간 값들과의 상관도들을 계산함으로써 상기 소정 방향들의 상관 맵을 생성하는 방향 상관 맵 생성부; 및A direction correlation map generation unit generating a correlation map of the predetermined directions by calculating correlations between the current pixel value and the interpolation values; And 상기 계산된 상관도들에 따라, 상기 소정 방향들 각각의 보간 값들 중 어느 하나를 상기 현재 픽셀의 보간 값으로 결정함으로써 보간 영상을 생성하는 보간 영상 생성부를 포함하고,An interpolation image generation unit configured to generate an interpolation image by determining any one of interpolation values of each of the predetermined directions as the interpolation value of the current pixel, according to the calculated correlations, 상기 방향 상관 맵 생성부는The direction correlation map generator 상기 현재 픽셀의 값들에 대하여, 상기 계산된 보간 값들을 이용하여 보정을 함으로써 상기 소정 방향들에 따른 참조 픽셀들의 값을 계산함으로써 참조 영상들을 생성하는 참조 영상 생성부; 및A reference image generation unit configured to generate reference images by calculating values of reference pixels along the predetermined directions by correcting the calculated values of the current pixel using the calculated interpolation values; And 상기 계산된 참조 픽셀들의 값과 상기 계산된 보간 값들의 차이를 이용하여 상기 상관도들을 계산함으로써 상관 맵들을 생성하는 상관 맵 생성부를 포함하는 것을 특징으로 하는 영상 보간 장치.And a correlation map generator configured to generate correlation maps by calculating the correlations by using the difference between the calculated reference pixels and the calculated interpolation values. 삭제delete 제8 항에 있어서,9. The method of claim 8, 상기 현재 픽셀의 상기 소정 방향들에 따른 에지 기울기들을 계산하는 에지 기울기 계산부;An edge gradient calculator for calculating edge gradients in the predetermined directions of the current pixel; 상기 계산된 에지 기울기들을 이용하여 상기 현재 픽셀이 한 방향성이 강한 에지 영역에 해당하는지를 판단하여 보간 방법을 결정하는 보간 방법 결정부를 더 포함하고,And an interpolation method determiner configured to determine an interpolation method by determining whether the current pixel corresponds to one directional edge region by using the calculated edge gradients. 상기 보간 영상 생성부는 상기 판단 결과에 따라 선택적으로 상기 각각의 보간 값들 중 어느 하나를 상기 현재 픽셀에 대한 보간 값으로 결정하는 것을 특징으로 하는 영상 보간 장치.And the interpolation image generator selectively determines any one of the interpolation values as an interpolation value for the current pixel according to the determination result. 제8 항에 있어서, 상기 복수의 소정 방향들은The method of claim 8, wherein the plurality of predetermined directions 상기 현재 픽셀의 수평 방향 및 수직 방향인 것을 특징으로 하는 보간 영상 생성 장치.And an horizontal direction and a vertical direction of the current pixel. 제8 항에 있어서,9. The method of claim 8, 상기 보간 값은 CFA 베이어 패턴 (Color Filter Bayer Pattern) 영상에서의 G 채널 영상의 보간 값인 것을 특징으로 하는 영상 보간 장치.And the interpolation value is an interpolation value of a G channel image in a CFA Bayer pattern image. 제12 항에 있어서,13. The method of claim 12, 상기 현재 픽셀의 값과 상기 결정된 G 채널 영상의 보간 값을 이용하여, R 채널 영상의 보간 값을 계산함으로써 R 채널 영상을 보간하는 R 채널 영상 보간부; 및An R channel image interpolator configured to interpolate an R channel image by calculating an interpolation value of the R channel image by using the current pixel value and the determined interpolation value of the G channel image; And 상기 현재 픽셀의 값과 상기 결정된 G 채널 영상의 보간 값을 이용하여, B 채널 영상의 보간 값을 계산함으로써 B 채널 영상을 보간하는 B 채널 영상 보간부를 더 포함하는 것을 특징으로 하는 영상 보간 장치.And a B channel image interpolator configured to interpolate the B channel image by calculating an interpolation value of the B channel image by using the current pixel value and the determined interpolation value of the G channel image. 제1 항, 제3항 내지 제7 항 중 어느 한 항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium having recorded thereon a program for executing the method of any one of claims 1 and 3 to a computer.
KR1020070085557A 2007-08-24 2007-08-24 Image interpolation method and apparatus KR101327790B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070085557A KR101327790B1 (en) 2007-08-24 2007-08-24 Image interpolation method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070085557A KR101327790B1 (en) 2007-08-24 2007-08-24 Image interpolation method and apparatus

Publications (2)

Publication Number Publication Date
KR20090020918A KR20090020918A (en) 2009-02-27
KR101327790B1 true KR101327790B1 (en) 2013-11-11

Family

ID=40688138

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070085557A KR101327790B1 (en) 2007-08-24 2007-08-24 Image interpolation method and apparatus

Country Status (1)

Country Link
KR (1) KR101327790B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101634141B1 (en) 2009-11-18 2016-06-28 삼성전자주식회사 Image interpolation method using reference block according to direction and apparatus for performing the method
KR102116095B1 (en) * 2014-03-17 2020-05-27 한화에어로스페이스 주식회사 Method for minimizing color interpolation error
KR101706554B1 (en) * 2015-09-07 2017-02-16 (주)넥스트칩 Apparatus and method for processing image for clear edge reproduction

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11205808A (en) * 1998-01-09 1999-07-30 Fuji Photo Film Co Ltd Signal processing unit and its processing method
JPH11220746A (en) * 1997-11-28 1999-08-10 Sony Corp Device method for camera signal processing
KR20010043961A (en) * 1998-06-01 2001-05-25 오노 시게오 Interpolation processor and recording medium recording interpolation processing program
KR20060089019A (en) * 2005-02-03 2006-08-08 삼성전자주식회사 Method for color filter array interpolation using color correlation simlilarity and multi-direction edge information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11220746A (en) * 1997-11-28 1999-08-10 Sony Corp Device method for camera signal processing
JPH11205808A (en) * 1998-01-09 1999-07-30 Fuji Photo Film Co Ltd Signal processing unit and its processing method
KR20010043961A (en) * 1998-06-01 2001-05-25 오노 시게오 Interpolation processor and recording medium recording interpolation processing program
KR20060089019A (en) * 2005-02-03 2006-08-08 삼성전자주식회사 Method for color filter array interpolation using color correlation simlilarity and multi-direction edge information

Also Published As

Publication number Publication date
KR20090020918A (en) 2009-02-27

Similar Documents

Publication Publication Date Title
US9582863B2 (en) Image processing apparatus, image processing method, and program
JP4054184B2 (en) Defective pixel correction device
US9179113B2 (en) Image processing device, and image processing method, and program
KR100782812B1 (en) Method and apparatus for edge adaptive color interpolation
US6724945B1 (en) Correcting defect pixels in a digital image
KR101703354B1 (en) Image processing device, image processing method, and recording medium
US7825965B2 (en) Method and apparatus for interpolating missing colors in a color filter array
US8837853B2 (en) Image processing apparatus, image processing method, information recording medium, and program providing image blur correction
TWI516132B (en) An image processing apparatus, an image processing method, and a program
JP4882374B2 (en) Image processing method, image processing program, and image processing apparatus
US8571312B2 (en) Image interpolation method and apparatus using pattern characteristics of color filter array
JP5672776B2 (en) Image processing apparatus, image processing method, and program
US20090052797A1 (en) Imaging device, image processing device, image processing method, program for image processing method, and recording medium having program for image processing method recorded thereon
US8837852B2 (en) Apparatus and method for removing defective pixels
JP2011091483A (en) Image processor, image processing method, and program
JP2007259401A (en) Noise reduction apparatus, method and program for controlling same, image sensor and digital camera
JP2004153823A (en) Image processing system using local linear regression
KR101637488B1 (en) Image interpolation method and apparatus using pattern characteristics of color filter array
CN110852953B (en) Image interpolation method and device, storage medium, image signal processor and terminal
CN110430403B (en) Image processing method and device
US20210042881A1 (en) Method and apparatus for image processing
JP2013066157A (en) Image processing apparatus, image processing method, and program
JP2013055623A (en) Image processing apparatus, image processing method, information recording medium, and program
KR20060078646A (en) Color interpolation algorithm of digital camera
JP4305071B2 (en) Signal correction method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20161028

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20171030

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee