KR100915970B1 - Method and apparatus for compensating color of image obtained from image sensor - Google Patents

Method and apparatus for compensating color of image obtained from image sensor Download PDF

Info

Publication number
KR100915970B1
KR100915970B1 KR1020070091428A KR20070091428A KR100915970B1 KR 100915970 B1 KR100915970 B1 KR 100915970B1 KR 1020070091428 A KR1020070091428 A KR 1020070091428A KR 20070091428 A KR20070091428 A KR 20070091428A KR 100915970 B1 KR100915970 B1 KR 100915970B1
Authority
KR
South Korea
Prior art keywords
pixel
pixels
color
same
color value
Prior art date
Application number
KR1020070091428A
Other languages
Korean (ko)
Other versions
KR20090026449A (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 KR1020070091428A priority Critical patent/KR100915970B1/en
Publication of KR20090026449A publication Critical patent/KR20090026449A/en
Application granted granted Critical
Publication of KR100915970B1 publication Critical patent/KR100915970B1/en

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals

Abstract

이미지 센서에 의해 획득된 영상의 컬러를 보정하는 방법 및 장치가 개시된다. 본 발명에 따른 컬러 보정 방법은, 영상의 각 화소에 대하여 불량 화소인지 여부를 판별하는 단계, 불량 화소로 판별된 화소인 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 제1 화소의 컬러 값을 이용하지 않고, 제1 화소 주변의 화소들 및 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하는 단계, 불량 화소가 아닌 것으로 판별된 화소인 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 제2 화소의 컬러 값과 제2 화소 주변의 화소들 및 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하는 단계, 계산된 가중치에 따라서 제1 화소 또는 제2 화소의 주변에 위치하는 동종 화소의 컬러 값을 가중 평균하되, 제1 화소의 컬러 값은 제외하고 제2 화소의 컬러 값은 포함하여 가중 평균함으로써 제1 화소 또는 제2 화소의 컬러 값을 보정하는 단계를 포함하는 것을 특징으로 한다. 이러한 본 발명에 의하면 하나의 필터를 사용하여 이미지 센서에 의해 획득된 영상에 포함된 불량 화소와 잡음의 특성을 고려하여 효과적으로 영상의 컬러를 보정할 수 있다.A method and apparatus for correcting the color of an image obtained by an image sensor is disclosed. The color correction method according to the present invention includes determining whether each pixel in the image is a defective pixel, and weighting a weight corresponding to a homogeneous pixel located in the periphery of the first pixel, which is the pixel determined as the defective pixel, and the first pixel. Computing using the color values of the pixels around the first pixel and the pixels around the same pixel without using the color value of, the same pixel positioned around the second pixel which is a pixel determined to be not a bad pixel Calculating a weight corresponding to the color value of the second pixel by using the color value of the second pixel and the color values of the pixels around the second pixel and the pixels around the same pixel, according to the calculated weight. A weighted average of the color values of the same pixel positioned at, but including the color value of the second pixel except the color value of the first pixel, and the weighted average of the color of the first pixel or the second pixel And correcting the value. According to the present invention, it is possible to effectively correct the color of the image in consideration of the characteristics of the bad pixels and noise included in the image acquired by the image sensor using one filter.

컬러 보정, 이미지 센서, 불량 화소, 잡음 Color correction, image sensor, bad pixels, noise

Description

이미지 센서에 의해 획득된 영상의 컬러를 보정하는 방법 및 장치{Method and apparatus for compensating color of image obtained from image sensor}Method and apparatus for compensating color of image obtained from image sensor

본 발명은 이미지 센서에 의해 획득된 영상의 컬러를 보정하는 방법 및 장치에 관한 것으로, 특히 영상에 포함된 불량 화소와 잡음의 특성을 고려하여 효과적으로 컬러를 보정하기 위한 컬러 보정 방법 및 장치에 관한 것이다. The present invention relates to a method and apparatus for correcting color of an image obtained by an image sensor, and more particularly, to a color correction method and apparatus for effectively correcting color in consideration of characteristics of defective pixels and noise included in an image. .

이미지 센서로 주로 사용되는 CCD나 CMOS 센서에 의해 획득된 영상에는 이미지 센서의 제조상의 결함 또는 사용상의 부주의로 인해 불량 화소(defect pixel)가 발생하게 된다. 또한, 이러한 불량 화소 외에도 이미지 센서의 특성상 광량이나 열에 의해서 photon shot noise, dark-current shot noise, reset noise, 그리고 thermal noise 등과 같은 잡음이 발생하게 된다. 불량 화소 또는 잡음은 풀컬러 영상을 얻어내기 위한 과정인 컬러 보간 과정에 큰 영향을 미치게 되며, 불량 화소 또는 잡음이 포함된 컬러 정보를 이용하여 컬러 보간이 수행될 경우 결과적인 영상에는 시각적으로 크게 거슬리는 잡음(noise or artifact)이 야기된다. 특히 저조도 영상일 경우에는 불량 화소와 잡음의 영향이 커서 영상의 화질을 크게 저하시키게 된다. In an image acquired by a CCD or CMOS sensor mainly used as an image sensor, defective pixels are generated due to manufacturing defects or inadvertent use of the image sensor. In addition to the defective pixels, noises such as photon shot noise, dark-current shot noise, reset noise, and thermal noise are generated due to light quantity or heat due to the characteristics of the image sensor. Bad pixels or noise have a great influence on the color interpolation process, which is a process for obtaining a full color image, and when color interpolation is performed using color information including bad pixels or noise, the resultant image is greatly visually disturbing. Noise or artifacts are caused. In particular, in the case of a low-light image, the influence of bad pixels and noise is large, which greatly degrades the image quality of the image.

따라서 불량 화소 및 잡음을 제거하는 것은 고품질의 영상을 획득하기 위하여 매우 중요한 과정이다. 불량 화소와 잡음은 그 통계적 특성이 다른데, 불량 화소는 소금과 후추 잡음(salt and pepper noise)과 같이 라플라시안 잡음 (Laplacian noise : 확률적으로 1차 특성 잡음)의 특성을 띠고, 이미지 센서의 특성에 기인한 잡음은 가우시안 잡음(Gaussian noise)의 특성을 띤다. 따라서 불량 화소의 제거를 위해서는 메디언 필터(Median filter)가 주로 사용되고 잡음의 제거를 위해서는 가중 평균 필터(Weighted mean filter)가 주로 사용된다. Therefore, removing bad pixels and noise is a very important process for obtaining a high quality image. Bad pixels and noise have different statistical characteristics. Bad pixels have the characteristics of Laplacian noise, like salt and pepper noise. The resulting noise is characterized by Gaussian noise. Therefore, a median filter is mainly used to remove bad pixels, and a weighted mean filter is mainly used to remove noise.

그러나 가중 평균 필터를 사용하게 되면 불량 화소를 효과적으로 제거할 수 없고, 메디언 필터를 사용하게 되면 이미지 센서의 특성에 기인한 잡음을 효과적으로 제거할 수 없는 문제점이 있다.However, when the weighted average filter is used, bad pixels cannot be effectively removed, and when the median filter is used, noise due to the characteristics of the image sensor cannot be effectively removed.

본 발명이 해결하고자 하는 기술적 과제는 하나의 필터를 사용하여 이미지 센서에 의해 획득된 영상에 포함된 불량 화소와 잡음의 특성을 고려하여 효과적으로 영상의 컬러를 보정하기 위한 컬러 보정 방법 및 장치를 제공하는 데 있다. The technical problem to be solved by the present invention is to provide a color correction method and apparatus for effectively correcting the color of the image in consideration of the characteristics of the bad pixels and noise included in the image obtained by the image sensor using one filter There is.

상기 기술적 과제를 해결하기 위하여 본 발명에 따른, 이미지 센서에 의해 획득된 영상의 컬러를 보정하는 방법은, (a) 상기 영상의 각 화소에 대하여 불량 화소인지 여부를 판별하는 단계; (b) 상기 (a) 단계에서 불량 화소로 판별된 화소인 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제1 화소의 컬러 값을 이용하지 않고, 상기 제1 화소 주변의 화소들 및 상기 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하는 단계; (c) 상기 (a) 단계에서 불량 화소가 아닌 것으로 판별된 화소인 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제2 화소의 컬러 값과 상기 제2 화소 주변의 화소들 및 상기 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하는 단계; 및 (d) 상기 (b) 단계 또는 상기 (c) 단계에서 계산된 가중치에 따라서 상기 제1 화소 또는 상기 제2 화소의 주변에 위치하는 동종 화소의 컬러 값을 가중 평균하되, 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 가중 평균함으로써 상기 제1 화소 또는 상기 제2 화소의 컬러 값을 보정하는 단계를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a method of correcting a color of an image obtained by an image sensor, the method including: (a) determining whether a pixel is a bad pixel for each pixel of the image; (b) The weight corresponding to the same pixel located around the first pixel, which is the pixel identified as the bad pixel in step (a), is calculated using the color value of the first pixel, Calculating using color values of pixels and pixels around the same pixel; (c) weights corresponding to homogeneous pixels located in the periphery of the second pixel, which is the pixel determined as not being a bad pixel, in step (a), and the color value of the second pixel and the pixels around the second pixel; And calculating color values of the pixels around the same pixel. And d) weighted average of color values of the same pixel located around the first pixel or the second pixel according to the weight calculated in the step (b) or the step (c). And correcting the color value of the first pixel or the second pixel by weighted averaging including the color value of the second pixel except for the color value.

또한, 상기 (b) 단계에서 상기 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치는, 상기 제1 화소를 중심으로 상기 제1 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값과 상기 동종 화소를 중심으로 상기 동종 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산하고, 상기 (c) 단계에서 상기 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치는, 상기 제2 화소를 중심으로 상기 제2 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값과 상기 동종 화소를 중심으로 상기 동종 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산할 수 있다.In addition, in step (b), a weight corresponding to a homogeneous pixel positioned around the first pixel may include a color value of the pixel in the mask formed by excluding the first pixel with respect to the first pixel and the homogeneous pixel. Calculated using the difference of the color values of the pixels in the mask formed by excluding the homogeneous pixels, and the weight corresponding to the homogeneous pixels located in the periphery of the second pixel in the step (c) is The difference between the color value of the pixel in the mask including the second pixel centered on the pixel and the color value of the pixel in the mask including the same pixel centered on the same pixel may be calculated.

또한, 상기 (d) 단계는 상기 제1 화소의 컬러 값과 상기 제2 화소의 컬러 값을 포함하여 상기 가중 평균 연산을 수행하고, 상기 (b) 단계에서 상기 제1 화소에 대응하는 가중치는 0으로 설정하고, 상기 (c) 단계에서 상기 제2 화소에 대응하는 가중치는 0이 아닌 소정 값으로 설정함으로써, 상기 (d) 단계에서 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 가중 평균되도록 할 수 있다.In addition, the step (d) may perform the weighted average operation including the color value of the first pixel and the color value of the second pixel, and in step (b), the weight corresponding to the first pixel is 0. And the weight corresponding to the second pixel in step (c) is set to a predetermined value other than 0, so that the color of the second pixel is excluded in step (d) except for the color value of the first pixel. Values can be included and weighted averaged.

또한, 상기 (d) 단계는, 상기 (a) 단계에서 판별된 결과에 따라서 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 상기 가중 평균 연산을 수행할 수 있다.In addition, in the step (d), the weighted average operation may be performed by including the color value of the second pixel except for the color value of the first pixel according to the result determined in the step (a).

상기 다른 기술적 과제를 해결하기 위하여 본 발명에 따른, 이미지 센서에 의해 획득된 영상의 컬러를 보정하는 장치는, 상기 영상의 각 화소에 대하여 불량 화소인지 여부를 판별하는 불량 화소 판별부; 상기 불량 화소 판별부에서 불량 화 소로 판별된 화소인 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제1 화소 및 상기 동종 화소의 컬러 값을 이용하지 않고, 상기 제1 화소 주변의 화소들 및 상기 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하고, 상기 불량 화소 판별부에서 불량 화소가 아닌 것으로 판별된 화소인 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제2 화소 및 상기 동종 화소의 컬러 값과 상기 제2 화소 주변의 화소들 및 상기 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하는 가중치 계산부; 및 상기 가중치 계산부에서 계산된 가중치에 따라서 상기 제1 화소 또는 상기 제2 화소의 주변에 위치하는 동종 화소의 컬러 값을 가중 평균하되, 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 가중 평균함으로써 상기 제1 화소 또는 상기 제2 화소의 컬러 값을 보정하는 가중 평균부를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided an apparatus for correcting color of an image obtained by an image sensor, the apparatus including: a bad pixel discriminating unit configured to determine whether each pixel of the image is a bad pixel; The weights corresponding to homogeneous pixels positioned around the first pixel, which is the pixel determined as the defective pixel, are determined by the defective pixel determination unit, without using the color values of the first pixel and the same pixel, and surrounding the first pixel. A weight value corresponding to a homogeneous pixel positioned around a second pixel, which is a pixel determined as not being a defective pixel, by the pixels of the pixel and the pixels around the homogeneous pixel. A weight calculator configured to calculate color values of the second pixel and the like pixel, pixels around the second pixel, and color values of pixels around the same pixel; And a weighted average of color values of homogeneous pixels positioned around the first pixel or the second pixel according to the weight calculated by the weight calculator, except for the color values of the first pixel. And including a weighted average including a weighted average to correct a color value of the first pixel or the second pixel.

또한, 상기 가중치 계산부는, 상기 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제1 화소를 중심으로 상기 제1 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값과 상기 동종 화소를 중심으로 상기 동종 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산하는 제1 가중치 계산부; 및 상기 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제2 화소를 중심으로 상기 제2 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값과 상기 동종 화소를 중심으로 상기 동종 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산하는 제2 가중치 계산부를 포함할 수 있다.The weight calculator may include a weight corresponding to the same pixel located around the first pixel, and the color value of the pixel in the mask formed by excluding the first pixel with respect to the first pixel, and the same pixel. A first weight calculator configured to calculate a difference based on a color value of a pixel in a mask formed by removing the same pixel as a center; And a weight corresponding to a homogeneous pixel positioned around the second pixel, and a color value of a pixel in a mask formed including the second pixel with respect to the second pixel and the homogeneous pixel with respect to the same pixel. And a second weight calculator configured to calculate using a difference between color values of pixels in the mask.

또한, 상기 가중 평균부는 상기 제1 화소의 컬러 값과 상기 제2 화소의 컬러 값을 포함하여 상기 가중 평균 연산을 수행하고, 상기 제1 가중치 계산부는 상기 제1 화소에 대응하는 가중치는 0으로 설정하고, 상기 제2 가중치 계산부는 상기 제2 화소에 대응하는 가중치는 0이 아닌 소정 값으로 설정함으로써, 상기 가중 평균부에서 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 가중 평균되도록 할 수 있다.The weighted average unit may perform the weighted average operation including a color value of the first pixel and a color value of the second pixel, and the first weight calculator sets a weight corresponding to the first pixel to zero. In addition, the second weight calculator sets the weight corresponding to the second pixel to a predetermined value other than 0, thereby including the color value of the second pixel except for the color value of the first pixel in the weighted average unit. To be weighted averaged.

또한, 상기 가중 평균부는, 상기 불량 화소 판별부에서 판별된 결과에 따라서 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 상기 가중 평균 연산을 수행할 수 있다.The weighted average unit may perform the weighted average operation including the color value of the second pixel except for the color value of the first pixel according to the result determined by the bad pixel determination unit.

상기 또 다른 기술적 과제를 해결하기 위하여 상기된 본 발명에 따른, 이미지 센서에 의해 획득된 영상의 컬러를 보정하는 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다.In order to solve the above further technical problem, there is provided a computer-readable recording medium having recorded thereon a program for executing a method for correcting color of an image obtained by an image sensor according to the present invention.

상술한 본 발명에 의하면, 하나의 필터를 사용하여 이미지 센서에 의해 획득된 영상에 포함된 불량 화소와 잡음의 특성을 고려하여 효과적으로 컬러를 보정할 수 있다.According to the present invention described above, it is possible to effectively correct the color in consideration of the characteristics of the bad pixels and noise included in the image obtained by the image sensor using one filter.

이하에서는 도면을 참조하여 본 발명의 바람직한 실시예들을 상세히 설명한다. 이하 설명 및 첨부된 도면들에서 실질적으로 동일한 구성요소들은 각각 동일한 부호들로 나타냄으로써 중복 설명을 생략하기로 한다. 또한 본 발명을 설명함에 있어 관련된 공지기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하 게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description and the accompanying drawings, the substantially identical components are represented by the same reference numerals, and thus redundant description will be omitted. In addition, in the following description of the present invention, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present invention, a detailed description thereof will be omitted.

도 1은 본 발명의 일 실시예에 따른 컬러 보정 장치가 채용된 영상 처리 장치의 블록도이다. 영상 처리 장치는 이미지 센서(10), 불량 화소 판별부(20), 가중치 계산부(30), 가중 평균부(40), 컬러 보간부(50)를 포함하여 이루어진다.1 is a block diagram of an image processing apparatus employing a color correction apparatus according to an embodiment of the present invention. The image processing apparatus includes an image sensor 10, a bad pixel discriminating unit 20, a weight calculating unit 30, a weighted average unit 40, and a color interpolation unit 50.

이미지 센서(10)는 렌즈(미도시)를 통해 들어온 빛의 밝기를 감지하여 컬러 정보를 검출함으로써 영상을 획득한다. 이미지 센서(10)는 각 화소마다 R(Red), G(Green), B(Blue) 컬러 성분을 통과시키는 컬러 필터 어레이(Color Filter Array)를 갖추고 있으며, 이 컬러 필터 어레이는 예를 들면 베이어(Bayer) 패턴의 배열을 가질 수 있다.The image sensor 10 acquires an image by detecting color information by detecting brightness of light introduced through a lens (not shown). The image sensor 10 has a color filter array for passing R (Red), G (Green), and B (Blue) color components for each pixel, and the color filter array is formed by, for example, Bayer ( Bayer) can have an array of patterns.

불량 화소 판별부(20)는 이미지 센서(10)에 의해 획득된 영상의 각 화소에 대하여 불량 화소인지 여부를 판별한다. 이때, 불량 화소 판별부(20)는 불량 화소인지 여부를 판별할 대상 화소를 기준으로, 대상 화소와 대상 화소 주변에 위치하는 동일한 채널의 화소의 컬러 값 차이 또는 대상 화소 주변에 위치하는 서로 동일한 채널의 화소들 간의 컬러 값 차이를 소정의 문턱값과 비교하여 불량 화소인지 여부를 판별할 수 있다.The bad pixel determination unit 20 determines whether each pixel of the image acquired by the image sensor 10 is a bad pixel. In this case, the bad pixel determination unit 20 may be configured to determine a difference between the color values of pixels of the same channel positioned around the target pixel and the same channel positioned around the target pixel, based on the target pixel to determine whether the defective pixel is a bad pixel. The color value difference between the pixels may be compared with a predetermined threshold value to determine whether the pixel is a bad pixel.

예를 들어 도 2에 도시된 바와 같은 베이어 패턴의 영상을 가정하면, R 채널의 대상 화소 R을 기준으로 하는 컬러 값의 차이들은 다음 수학식에 의해 정의될 수 있다.For example, assuming a Bayer pattern image as illustrated in FIG. 2, differences in color values based on the target pixel R of the R channel may be defined by the following equation.

Figure 112007065456298-pat00001
Figure 112007065456298-pat00002
,
Figure 112007065456298-pat00001
Figure 112007065456298-pat00002
,

Figure 112007065456298-pat00003
,
Figure 112007065456298-pat00004
Figure 112007065456298-pat00003
,
Figure 112007065456298-pat00004

Figure 112007065456298-pat00005
,
Figure 112007065456298-pat00006
Figure 112007065456298-pat00005
,
Figure 112007065456298-pat00006

Figure 112007065456298-pat00007
,
Figure 112007065456298-pat00008
Figure 112007065456298-pat00007
,
Figure 112007065456298-pat00008

Figure 112007065456298-pat00009
,
Figure 112007065456298-pat00010
Figure 112007065456298-pat00009
,
Figure 112007065456298-pat00010

Figure 112007065456298-pat00011
,
Figure 112007065456298-pat00012
Figure 112007065456298-pat00011
,
Figure 112007065456298-pat00012

그리고 상기 수학식 1에 따라 계산된 컬러 값 차이들을 다음 수학식에서와 같이 소정의 문턱값 Th와 비교하여 대상 화소가 불량 화소인지 여부를 판별한다. The color value differences calculated according to Equation 1 are compared with a predetermined threshold Th as in the following Equation to determine whether the target pixel is a bad pixel.

Figure 112007065456298-pat00013
Figure 112007065456298-pat00013

상기된 수학식 1 및 수학식 2에 의하면 R 채널의 대상 화소의 컬러 값과 대상 화소의 수평, 수직, 대각선 위치에 있는 R 채널의 화소의 컬러 값의 차, 대상 화소 주변에 서로 수평 및 수직으로 위치하는 G 채널의 화소 간의 컬러 값의 차, 대상 화소 주변에 서로 대각선으로 위치하는 B 채널의 화소 간의 컬러 값의 차가 소정 문턱값보다 클 경우 대상 화소를 불량 화소로 판별한다. 여기서 문턱값 Th는 얻고자 하는 영상의 품질에 따라 실험을 통하여 적절히 선택될 수 있으며, 저조도 환경에서 작은 값을 가지는 것이 바람직하고, 작은 값을 가질수록 더 많은 화소를 불량 화소로 판별하게 된다.According to Equation 1 and Equation 2, the difference between the color value of the target pixel of the R channel and the color value of the pixel of the R channel in the horizontal, vertical, and diagonal positions of the target pixel, and horizontally and vertically When the difference between the color values between the pixels of the located G channel and the difference between the color values between the pixels of the B channel diagonally positioned around the target pixel is larger than a predetermined threshold, the target pixel is determined as a bad pixel. Here, the threshold Th may be appropriately selected through experiments according to the quality of an image to be obtained, and it is preferable to have a small value in a low light environment, and the smaller the value, the more pixels are identified as bad pixels.

본 실시예에 의하면 하나의 필터, 즉 후술하는 가중 평균부(40)를 사용하여 불량 화소와 불량 화소가 아닌 화소 모두에 대하여 컬러 값을 보정하는데, 후술하는 가중치 계산부(30)가 불량 화소 판별부(20)의 판별 결과에 따라 불량 화소와 불량 화소가 아닌 화소의 잡음 특성을 고려하여 이하에서 설명하는 바와 같이 서로 다른 방식으로 가중치를 계산한다.According to this embodiment, one filter, that is, the weighted average unit 40 to be described later is used to correct color values for both bad pixels and non-bad pixels. The weight calculator 30 to be described later determines bad pixels. According to the determination result of the unit 20, the weights are calculated in different manners as described below in consideration of noise characteristics of the bad pixels and non-bad pixels.

가중치 계산부(30)는 불량 화소 판별부(20)에서 불량 화소로 판별된 화소(이하, 제1 화소라 한다)의 주변에 위치하는 동종 화소에 대응하는 가중치를, 제1 화소의 컬러 값을 이용하지 않고, 제1 화소 주변의 화소들 및 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산한다. 여기서 동종 화소란, 컬러 값을 보정할 대상 화소와 채널이 동일한 화소를 의미한다. 또한, 가중치 계산부(30)는 불량 화소 판별부(20)에서 불량 화소가 아닌 것으로 판별된 화소(이하, 제2 화소라 한다)의 주변에 위치하는 동종 화소에 대응하는 가중치를, 제2 화소의 컬러 값과 제2 화소 주변의 화소들 및 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산한다. The weight calculator 30 calculates a weight corresponding to the same pixel located in the periphery of a pixel (hereinafter, referred to as a first pixel) that is determined as a bad pixel by the bad pixel determination unit 20, and determines a color value of the first pixel. Rather than using them, the color values of the pixels around the first pixel and the pixels around the same pixel are calculated. Here, the homogeneous pixel means a pixel having the same channel as a target pixel for correcting a color value. In addition, the weight calculator 30 determines a weight corresponding to the same pixel located in the periphery of the pixel (hereinafter referred to as a second pixel) that is determined as not a bad pixel by the bad pixel determination unit 20. It is calculated using the color value of and the color values of the pixels around the second pixel and the pixels around the same pixel.

가중치 계산부(30)는 불량 화소와 불량 화소가 아닌 화소에 대하여 상기된 바와 같이 서로 다른 방식으로 가중치를 계산하기 위하여 가중치 계산에 이용되는 마스크의 형태 및 컬러 값을 보정할 화소에 대응하는 가중치를 서로 다르게 설정할 수 있다. 또한, 가중치 계산부(30)는 도 2에 도시된 바와 같이 서로 다른 방식으로 가중치를 계산하는 제1 가중치 계산부(31)와 제2 가중치 계산부(32)를 포함할 수 있다.The weight calculator 30 calculates weights corresponding to pixels for correcting the shape and color value of a mask used for weight calculation in order to calculate weights in a different manner as described above for the bad pixels and the non-bad pixels. Can be set differently. In addition, the weight calculator 30 may include a first weight calculator 31 and a second weight calculator 32 that calculate weights in different ways as shown in FIG. 2.

제1 가중치 계산부(31)는 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 제1 화소를 중심으로 제1 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값과 동종 화소를 중심으로 동종 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산한다. 이때 제1 화소 주변의 컬러 패턴과 유사한 주변의 컬러 패턴을 가지는 동종 화소에 대응하는 가중치가 보다 큰 값을 가지도록 동종 화소들 각각에 대한 가중치를 계산한다. 또한, 제1 가중치 계산부(31)는 제1 화소에 대응하는 가중치는 0으로 설정한다.The first weight calculator 31 calculates a weight corresponding to a homogeneous pixel positioned around the first pixel, based on the same pixel as the color value of the pixel in the mask formed by excluding the first pixel. It calculates using the difference of the color value of the pixel in the mask formed except the homogeneous pixel. In this case, the weights of each of the pixels of the same type are calculated such that the weight corresponding to the same type of pixel having the color pattern around the first pixel has a larger value. In addition, the first weight calculator 31 sets the weight corresponding to the first pixel to zero.

도 3은 제1 화소가 R 채널의 화소일 때 가중치 계산을 위한 마스크의 형태의 일 실시예를 나타낸다. 도 3을 참조하면, 제1 화소를 제외하여 형성되는 마스크는 제1 화소와 인접한 모든 화소로 형성되고, 동종 화소를 제외하여 형성되는 마스크는 동종 화소와 인접한 모든 화소로 형성된다. 본 실시예에 따른 형태의 마스크는 B 채널의 화소와 G 채널의 화소에도 동일하게 적용될 수 있으며, 설명은 생략하기로 한다.3 illustrates an embodiment in the form of a mask for weight calculation when the first pixel is a pixel of the R channel. Referring to FIG. 3, a mask formed except for the first pixel is formed of all pixels adjacent to the first pixel, and a mask formed except of the same pixel is formed of all pixels adjacent to the same pixel. The mask of the embodiment may be equally applied to the pixels of the B channel and the pixels of the G channel, and description thereof will be omitted.

도 3을 참조하면, 불량 화소로 판별된 제1 화소는 가운데에 위치하는 R 채널의 화소이며, 제1 화소를 중심으로 제1 화소를 제외하여 형성된 마스크가 붉은색으로 표시되어 있다. 또한, 제1 화소의 동종 화소들 중 하나인 북서쪽에 위치한 R 채널의 화소를 중심으로 이 R 채널의 화소를 제외하여 형성된 마스크가 푸른색으로 표시되어 있다. Referring to FIG. 3, a first pixel determined as a bad pixel is a pixel of an R channel positioned at the center, and a mask formed by excluding the first pixel around the first pixel is displayed in red. In addition, a mask formed by excluding the pixel of the R channel, centered on the pixel of the R channel located in the northwest, which is one of the same pixels of the first pixel, is displayed in blue.

도 3에 도시된 바와 같은 형태의 마스크를 사용할 때 제1 가중치 계산부(31)는 다음 수학식에 따라서 동종 화소들 각각 및 제1 화소에 대응하는 가중치를 계산할 수 있다.When using a mask having a shape as shown in FIG. 3, the first weight calculator 31 may calculate weights corresponding to each of the pixels of the same type and the first pixel according to the following equation.

Figure 112007065456298-pat00014
Figure 112007065456298-pat00014

Figure 112007065456298-pat00015
Figure 112007065456298-pat00015

여기서,

Figure 112007065456298-pat00016
은 제1 화소를 기준으로 동종 화소의 상대적인 위치를 나타내는 좌표 (m, n)에 위치하는 동종 화소에 대응하는 가중치이며,
Figure 112007065456298-pat00017
은 제1 화소 자신에 대응하는 가중치이다. 예를 들면, 도 3에서 푸른색으로 나타난 마스크에 둘러싸인, 북서쪽에 위치한 R 채널의 화소에 대응하는 가중치는
Figure 112007065456298-pat00018
로 표현된다.
Figure 112007065456298-pat00019
(
Figure 112007065456298-pat00020
)는 좌표
Figure 112007065456298-pat00021
에서의 컬러 값을 의미하고,
Figure 112007065456298-pat00022
기호 내부의 컬러 값의 차이는 제1 화소를 둘러싼 마스크 내의 화소들 중 어느 하나의 화소의 컬러 값과 동종 화소를 둘러싼 마스크 내의 화소들 중 이와 대응하는 위치의 화소의 컬러 값의 차이를 나타낸다. 여기서, (i, j)는 제1 화소의 좌표이고, (p, q)는 제1 화소를 기준으로 상기 어느 하나의 화소의 상대적인 위치를 나타내는 좌표이며, H는 도 3에 도시된 형태의 마스크 내부를 의미한다. 도 3에 도시된 형태의 마스크에 포함되는 화소의 수는 총 8개이므로, 상기 수학식에서 합해지는 컬러 값의 차이는 모두 8개가 된다. 수식
Figure 112007065456298-pat00023
은 제1 화소에 대응하는 가중치가 0으로 설정됨을 의미한다. 그리고 상기 수학식에 포함된 문턱값 Th는 가중치의 강약을 조절하기 위한 값으로서, 잡음의 정도에 따라서 적절한 값으로 정의될 수 있다.here,
Figure 112007065456298-pat00016
Is a weight corresponding to a homogeneous pixel located at a coordinate (m, n) indicating a relative position of the homogeneous pixel with respect to the first pixel,
Figure 112007065456298-pat00017
Is a weight corresponding to the first pixel itself. For example, the weight corresponding to the pixel of the R channel located in the northwest, surrounded by the mask shown in blue in FIG.
Figure 112007065456298-pat00018
It is expressed as
Figure 112007065456298-pat00019
(
Figure 112007065456298-pat00020
) Coordinates
Figure 112007065456298-pat00021
Means the color value in
Figure 112007065456298-pat00022
The difference in the color value inside the symbol indicates the difference between the color value of one of the pixels in the mask surrounding the first pixel and the color value of the pixel at the corresponding position among the pixels in the mask surrounding the same pixel. Here, (i, j) is the coordinate of the first pixel, (p, q) is a coordinate indicating the relative position of any one pixel with respect to the first pixel, H is a mask of the form shown in FIG. It means inside. Since the total number of pixels included in the mask of the type shown in FIG. 3 is eight, the difference in color values added in the above equation is eight. Equation
Figure 112007065456298-pat00023
Means that the weight corresponding to the first pixel is set to zero. The threshold Th included in the above equation is a value for adjusting the strength and weakness of the weight, and may be defined as an appropriate value according to the degree of noise.

제2 가중치 계산부(31)는 불량 화소 판별부(20)에서 불량 화소가 아닌 것으 로 판별된 화소인 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 제2 화소를 중심으로 제2 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값과 동종 화소를 중심으로 동종 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산한다. 이때 제2 화소의 컬러 값 및 주변의 컬러 패턴과 유사한 컬러 값 및 주변의 컬러 패턴을 가지는 동종 화소에 대응하는 가중치가 보다 큰 값을 가지도록 동종 화소들 각각에 대한 가중치를 계산한다. 또한 제2 화소에 대응하는 가중치는 0이 아닌 소정 값, 예를 들면 1로 설정한다.The second weight calculator 31 calculates a weight corresponding to the same pixel located around the second pixel, which is the pixel determined as not being the bad pixel, by the bad pixel determination unit 20. It calculates using the difference of the color value of the pixel in the mask formed including two pixels, and the color value of the pixel in the mask formed including the same pixel centering on the same pixel. In this case, the weights are calculated for each of the like pixels so that the weight value corresponding to the color value of the second pixel, the color value similar to the surrounding color pattern, and the same pixel having the surrounding color pattern has a larger value. In addition, the weight corresponding to the second pixel is set to a predetermined value other than zero, for example, one.

도 4는 제2 화소가 R 채널의 화소일 때 가중치 계산을 위한 마스크의 형태의 일 실시예를 나타낸다. 도 4를 참조하면, 제2 화소를 포함하여 형성되는 마스크는 제2 화소 및 제2 화소와 인접한 모든 화소로 형성되고, 동종 화소를 포함하여 형성되는 마스크는 동종 화소 및 동종 화소와 인접한 모든 화소로 형성된다. 본 실시예에 따른 형태의 마스크는 B 채널의 화소와 G 채널의 화소에도 동일하게 적용될 수 있으며, 설명은 생략하기로 한다.4 illustrates an embodiment in the form of a mask for weight calculation when the second pixel is a pixel of the R channel. Referring to FIG. 4, the mask including the second pixel is formed of the second pixel and all the pixels adjacent to the second pixel, and the mask including the same pixel is the same pixel and all the pixels adjacent to the same pixel. Is formed. The mask of the embodiment may be equally applied to the pixels of the B channel and the pixels of the G channel, and description thereof will be omitted.

도 4를 참조하면, 불량 화소가 아닌 것으로 판별된 제2 화소는 가운데에 위치하는 R 채널의 화소이며, 제2 화소를 중심으로 제2 화소를 포함하여 형성된 마스크가 붉은색으로 표시되어 있다. 또한, 제2 화소의 동종 화소들 중 하나인 북서쪽에 위치한 R 채널의 화소를 중심으로 이 R 채널의 화소를 포함하여 형성된 마스크가 푸른색으로 표시되어 있다. Referring to FIG. 4, the second pixel determined to be not a bad pixel is a pixel of an R channel positioned at the center, and a mask including the second pixel around the second pixel is displayed in red. In addition, a mask formed of the pixels of the R channel located in the northwest, which is one of the same pixels of the second pixel, is displayed in blue.

도 4에 도시된 바와 같은 형태의 마스크를 사용할 때 제2 가중치 계산부(32)는 다음 수학식에 따라서 동종 화소들 각각 및 제1 화소에 대응하는 가중치를 계산 할 수 있다.When using a mask having a shape as shown in FIG. 4, the second weight calculator 32 may calculate weights corresponding to each of the same pixels and the first pixel according to the following equation.

Figure 112007065456298-pat00024
Figure 112007065456298-pat00024

Figure 112007065456298-pat00025
Figure 112007065456298-pat00025

여기서, 각 기호는 수학식 3에서 설명된 바와 동일하고, 다만 H'은 도 4에 도시된 형태의 마스크 내부를 의미한다. 도 4에 도시된 형태의 마스크에 포함되는 화소의 수는 총 9개이므로, 컬러 값의 차이는 모두 9개가 합해지게 된다. 수식

Figure 112007065456298-pat00026
은 제2 화소에 대응하는 가중치가 1로 설정됨을 의미한다. Here, each symbol is the same as that described in Equation 3, except that H 'means the inside of the mask of the form shown in FIG. Since the total number of pixels included in the mask of the type shown in FIG. 4 is nine, the difference in color values is added to all nine. Equation
Figure 112007065456298-pat00026
Means that the weight corresponding to the second pixel is set to one.

다시 도 2를 참조하면, 가중 평균부(40)는 가중치 계산부(30)에서 계산된 가중치를 입력받아, 가중 평균 연산을 수행하여 제1 화소 또는 제2 화소의 컬러 값을 보정한다. 가중 평균부(40)는 다음 수학식을 이용하여 가중 평균 연산을 수행할 수 있다. Referring back to FIG. 2, the weighted average unit 40 receives the weighted value calculated by the weight calculator 30 and performs a weighted average operation to correct the color value of the first pixel or the second pixel. The weighted average unit 40 may perform a weighted average operation by using the following equation.

Figure 112007065456298-pat00027
Figure 112007065456298-pat00027

여기서,

Figure 112007065456298-pat00028
는 보정된 컬러 값을 나타내고,
Figure 112007065456298-pat00029
은 가중치 계산부(30)에서 계산된 가중치이며,
Figure 112007065456298-pat00030
은 컬러를 보정할 화소를 기준으로 상대적인 위치를 나타내 는 좌표 (m, n)에 위치하는 화소의 컬러 값을 나타내며, N은 도 3 또는 도 4에 도시된 영역을 나타낸다. here,
Figure 112007065456298-pat00028
Indicates the corrected color value,
Figure 112007065456298-pat00029
Is the weight calculated by the weight calculator 30,
Figure 112007065456298-pat00030
Denotes a color value of a pixel located at coordinates (m, n) indicating a relative position with respect to a pixel to be corrected, and N denotes an area shown in FIG. 3 or 4.

특히, 가중 평균부(40)는 제1 화소 또는 제2 화소 각각에 대하여, 제1 화소 또는 제2 화소의 주변에 위치하는 동종 화소의 컬러 값을 가중 평균하되, 제1 화소의 컬러 값은 제외하고 가중 평균 연산을 수행하며, 제2 화소의 컬러 값은 포함하여 가중 평균 연산을 수행한다. In particular, the weighted average unit 40 weights each color value of the same pixel positioned around the first pixel or the second pixel with respect to each of the first pixel or the second pixel, except for the color value of the first pixel. The weighted average operation is performed, and the weighted average operation is performed by including the color value of the second pixel.

이미 설명하였지만, 불량 화소로 판별된 제1 화소에 대응하는 가중치는 0으로 설정된다. 따라서 상기 수학식에 따른 가중 평균 연산에 제1 화소의 컬러 값(R0,0)이 포함되더라도 곱해지는 가중치가 0이므로 제1 화소의 컬러 값은 가중 평균 연산에서 제외된다. 한편, 불량 화소가 아닌 것으로 판별된 제2 화소에 대응하는 가중치는 0이 아닌 소정의 값으로 설정된다. 따라서 제2 화소의 컬러 값은 가중 평균 연산에 포함되게 된다. Although already described, the weight corresponding to the first pixel determined as the bad pixel is set to zero. Therefore, even when the weighted average operation according to the above equation includes the color value R 0,0 of the first pixel, the weighted value is 0, and thus the color value of the first pixel is excluded from the weighted average operation. On the other hand, the weight corresponding to the second pixel determined as not being a bad pixel is set to a predetermined value other than zero. Therefore, the color value of the second pixel is included in the weighted average calculation.

이와 같이 가중치 계산부(30)가 불량 화소 판별부(20)의 판별 결과에 따라 컬러를 보정할 화소의 컬러 값을 선택적으로 이용함으로써 달리 계산된 가중치에 따라 가중 평균 연산을 수행하고, 가중 평균 연산에서도 불량 화소 판별부(20)의 판별 결과에 따라 컬러를 보정할 화소의 컬러 값을 선택적으로 포함시킴으로써 하나의 필터를 사용하여 영상에 포함된 불량 화소와 잡음의 특성을 고려하여 효과적으로 영상의 컬러를 보정할 수 있다.As described above, the weight calculation unit 30 selectively uses the color values of the pixels to correct the color according to the determination result of the bad pixel determination unit 20 to perform the weighted average operation according to the weights calculated differently, and the weighted average operation. In addition, by selectively including the color value of the pixel to be corrected color according to the determination result of the bad pixel discrimination unit 20 by using a single filter in consideration of the characteristics of the bad pixels and noise included in the image effectively the color of the image You can correct it.

한편, 상술한 실시예에 의하면 제1 가중치 계산부(31)가 불량 화소로 판별된 제1 화소에 대한 가중치를 0으로 설정함으로써 제1 화소의 컬러 값이 가중 평균 연산에서 제외되도록 하였으나, 제1 가중치 계산부(31)가 제1 화소에 대한 가중치를 설정함이 없이, 가중 평균부(40)가 불량 화소 판별부(20)의 판별 결과에 따라 선택적으로, 불량 화소로 판별된 제1 화소는 제외하고 가중 평균 연산을 수행하고 불량 화소가 아닌 것으로 판별된 화소는 포함하여 가중 평균 연산을 수행하도록 구현할 수도 있다. Meanwhile, according to the above-described embodiment, the first weight calculator 31 sets the weight of the first pixel determined as the bad pixel to 0 so that the color value of the first pixel is excluded from the weighted average calculation. Without the weight calculation unit 31 setting the weight for the first pixel, the weighted average unit 40 selectively selects the bad pixels according to the determination result of the bad pixel determination unit 20. Except for performing a weighted average operation and including a pixel determined to be not a bad pixel, a weighted average operation may be included.

다시 도 1을 참조하면, 컬러 보간부(50)는 가중 평균부(40)에서 각 화소의 컬러가 보정된 영상을 입력받아, 각 화소에 대하여 화소에 저장되지 않은 다른 채널의 컬러 값을 그 화소의 주변 화소의 컬러 값으로부터 보간하여 풀컬러 영상을 생성한다. 컬러 보간부(50)는 공지된 다양한 방식의 컬러 보간 방법들 중 어느 하나를 사용할 수 있다. Referring back to FIG. 1, the color interpolator 50 receives an image in which the color of each pixel is corrected by the weighted average unit 40, and outputs a color value of another channel that is not stored in the pixel for each pixel. A full color image is generated by interpolating from color values of neighboring pixels. The color interpolator 50 may use any one of various known color interpolation methods.

이하에서는, 가중치 계산부(30)에서 가중치를 계산하기 위한 마스크의 형태의 다른 실시예에 관하여 더 설명하기로 한다.Hereinafter, another embodiment in the form of a mask for calculating the weight in the weight calculator 30 will be described.

도 5는 제1 화소가 R 채널의 화소일 때 제1 가중치 계산부(31)에서 가중치를 계산하기 위하여 형성된 마스크의 형태의 다른 실시예를 나타낸다. 도 5를 참조하면, 제1 화소를 중심으로 제1 화소를 제외하여 형성된 마스크는 제1 화소와 수평 또는 수직 방향으로 인접한 G 채널의 화소들만으로 형성된다. 또한, 제1 화소 주변에 위치하는 동종 화소를 중심으로 동종 화소를 제외하여 형성되는 마스크 역시 동종 화소와 수평 또는 수직 방향으로 인접한 G 채널의 화소들만으로 형성된다. R, G, B 각 채널의 특성상 이미지 센서에 의하여 획득된 영상의 밝기 정보는 G 채널의 컬러 값이 가장 많이 가지고 있다. 따라서 도 5에 도시된 바와 같이 B 채널의 화소를 제외한 마스크를 형성하여 인접한 G 채널의 화소의 컬러 값들만을 이용하여 가중치를 계산할 수 있다. 이때 사용되는 수학식은 상기된 수학식 3과 동일하며, 다만 H가 도 5에 도시된 형태의 마스크 내부를 의미하게 된다. 도 5에 도시된 형태의 마스크에 포함되는 화소의 수는 총 4개이므로, 수학식 3에서 합해지는 컬러 값의 차이는 모두 4개가 된다. FIG. 5 illustrates another embodiment in the form of a mask formed to calculate a weight in the first weight calculator 31 when the first pixel is a pixel of the R channel. Referring to FIG. 5, a mask formed by excluding the first pixel around the first pixel is formed of only the pixels of the G channel adjacent to the first pixel in a horizontal or vertical direction. In addition, a mask formed by excluding homogeneous pixels centered on homogeneous pixels positioned around the first pixel may also be formed of pixels of G channels adjacent to the homogeneous pixel in a horizontal or vertical direction. Because of the characteristics of each of the R, G, and B channels, the brightness information of the image acquired by the image sensor has the most color value of the G channel. Accordingly, as shown in FIG. 5, a weight may be calculated using only color values of pixels of adjacent G channels by forming a mask excluding pixels of B channels. In this case, the equation used is the same as Equation 3, except that H denotes the inside of the mask shown in FIG. 5. Since the total number of pixels included in the mask of the type shown in FIG. 5 is four, the difference in color values added in Equation 3 is four.

본 실시예에 의하면, G 채널의 화소의 컬러 값만을 이용하여 가중치를 계산하므로, 가중치 계산에 따른 연산량을 줄일 수 있다. 본 실시예에 따른 형태의 마스크는 B 채널의 화소에도 동일하게 적용될 수 있으며, 설명은 생략하기로 한다.According to the present embodiment, since the weight is calculated using only the color values of the pixels of the G channel, the computation amount according to the weight calculation can be reduced. The mask of the form according to the present exemplary embodiment may be equally applied to the pixels of the B channel, and description thereof will be omitted.

도 6은 제2 화소가 R 채널의 화소일 때 제2 가중치 계산부(32)에서 가중치를 계산하기 위하여 형성된 마스크의 형태의 다른 실시예를 나타낸다. 도 6을 참조하면, 제2 화소를 중심으로 제2 화소를 포함하여 형성된 마스크는 제2 화소와 수평 또는 수직 방향으로 인접한 G 채널의 화소들로 형성된다. 또한, 제2 화소 주변에 위치하는 동종 화소를 중심으로 동종 화소를 포함하여 형성된 마스크 역시 동종 화소와 수평 또는 수직 방향으로 인접한 G 채널의 화소들로 형성된다. 이미 설명한 바와 같이, R, G, B 각 채널의 특성상 이미지 센서에 의하여 획득된 영상의 밝기 정보는 G 채널의 컬러 값이 가장 많이 가지고 있다. 따라서 도 6에 도시된 바와 같이 B 채널의 화소를 제외한 마스크를 형성하여 인접한 G 채널의 화소의 컬러 값들을 이용하여 가중치를 계산할 수 있다. 이때 사용되는 수학식은 상기된 수학식 4와 동일하며, 다만 H'가 도 6에 도시된 형태의 마스크 내부를 의미하게 된다. 도 6에 도시된 형태의 마스크에 포함되는 화소의 수는 총 5개이므로, 수학식 4에서 합해지는 컬러 값의 차이는 모두 5개가 된다. FIG. 6 illustrates another embodiment in the form of a mask formed to calculate a weight in the second weight calculator 32 when the second pixel is a pixel of the R channel. Referring to FIG. 6, a mask including the second pixel around the second pixel is formed of pixels of a G channel adjacent to the second pixel in a horizontal or vertical direction. In addition, a mask including the same pixel around the same pixel positioned around the second pixel is also formed of pixels of the G channel adjacent to the same pixel in a horizontal or vertical direction. As described above, the brightness information of the image acquired by the image sensor has the most color value of the G channel due to the characteristics of each of the R, G, and B channels. Thus, as shown in FIG. 6, a weight may be calculated using color values of pixels of adjacent G channels by forming a mask except pixels of the B channel. In this case, the equation used is the same as Equation 4, except that H 'means the inside of the mask of the form shown in FIG. Since the total number of pixels included in the mask of the type shown in FIG. 6 is five, the difference in color values added in Equation 4 is five.

본 실시예에 의하면, B 채널의 화소의 컬러 값을 제외한 G 채널의 화소의 컬러 값을 이용하여 가중치를 계산하므로, 가중치 계산에 따른 연산량을 줄일 수 있다. 본 실시예에 따른 형태의 마스크는 B 채널의 화소에도 동일하게 적용될 수 있으며, 설명은 생략하기로 한다.According to the present embodiment, since the weight is calculated using the color values of the pixels of the G channel except for the color values of the pixels of the B channel, the amount of calculation according to the weight calculation can be reduced. The mask of the form according to the present exemplary embodiment may be equally applied to the pixels of the B channel, and description thereof will be omitted.

도 7은 제1 화소가 G 채널의 화소일 때 제1 가중치 계산부(31)에서 가중치를 계산하기 위하여 형성된 마스크의 형태의 다른 실시예를 나타낸다. 도 7을 참조하면, 제1 화소를 중심으로 제1 화소를 제외하여 형성된 마스크는 제1 화소와 대각 방향으로 인접한 G 채널의 화소들만으로 형성된다. 또한, 제1 화소 주변에 위치하는 동종 화소를 중심으로 동종 화소를 제외하여 형성되는 마스크 역시 동종 화소와 대각 방향으로 인접한 G 채널의 화소들만으로 형성된다. 본 실시예에 의하면 이미 설명된 실시예들보다 많은 수의 동종 화소들에 대한 가중치를 구할 수 있다. 즉, 가운데에 위치한 제1 화소를 중심으로 대각 위치에 존재하는 8개의 G 채널 화소와 수평, 수직 방향에 위치하는 4개의 G 채널의 화소에 대응하는 가중치를 구할 수 있다. 또한, G 채널 화소의 컬러 정보만을 이용하므로 계산량이 감소될 수 있다. 이때 사용되는 수학식은 상기된 수학식 3과 동일하며, 다만 H가 도 7에 도시된 형태의 마스크 내부를 의미하게 된다. 도 7에 도시된 형태의 마스크에 포함되는 화소의 수는 총 4개이므로, 수학식 3에서 합해지는 컬러 값의 차이는 모두 4개가 된다. FIG. 7 illustrates another embodiment in the form of a mask formed to calculate a weight in the first weight calculator 31 when the first pixel is a pixel of the G channel. Referring to FIG. 7, a mask formed by excluding the first pixel around the first pixel is formed of only the pixels of the G channel that are diagonally adjacent to the first pixel. In addition, a mask formed by excluding homogeneous pixels centered on homogeneous pixels positioned around the first pixel may also be formed of pixels of G channels adjacent to the same pixel in a diagonal direction. According to the present exemplary embodiment, weights for a larger number of homogeneous pixels may be obtained. That is, weights corresponding to eight G channel pixels at diagonal positions with respect to the first pixel located at the center and four G channel pixels in horizontal and vertical directions may be obtained. Also, since only the color information of the G channel pixel is used, the amount of calculation can be reduced. In this case, the equation used is the same as Equation 3 above, except that H means the inside of the mask of the form shown in FIG. 7. Since the total number of pixels included in the mask of the type shown in FIG. 7 is four, the difference in the color values added in Equation 3 is four.

도 8은 제2 화소가 G 채널의 화소일 때 제2 가중치 계산부(32)에서 가중치를 계산하기 위하여 형성된 마스크의 형태의 다른 실시예를 나타낸다. 도 8을 참조하면, 제2 화소를 중심으로 제2 화소를 포함하여 형성된 마스크는 제2 화소와 대각 방향으로 인접한 G 채널의 화소들을 포함하여 형성된다. 또한, 제2 화소 주변에 위치하는 동종 화소를 중심으로 동종 화소를 제외하여 형성되는 마스크 역시 동종 화소와 대각 방향으로 인접한 G 채널의 화소들을 포함하여 형성된다. 본 실시예에 의하면 도 7에서 설명된 실시예와 마찬가지로, 보다 많은 수의 동종 화소들에 대한 가중치를 구할 수 있으며, G 채널 화소의 컬러 정보만을 이용하므로 계산량이 감소될 수 있다. 이때 사용되는 수학식은 상기된 수학식 4와 동일하며, 다만 H'가 도 8에 도시된 형태의 마스크 내부를 의미하게 된다. 도 8에 도시된 형태의 마스크에 포함되는 화소의 수는 총 5개이므로, 수학식 4에서 합해지는 컬러 값의 차이는 모두 5개가 된다. 8 illustrates another embodiment in the form of a mask formed to calculate a weight in the second weight calculator 32 when the second pixel is a pixel of the G channel. Referring to FIG. 8, a mask including the second pixel around the second pixel is formed to include pixels of the G channel adjacent to the second pixel in a diagonal direction. In addition, a mask formed by excluding homogeneous pixels centered on homogeneous pixels positioned around the second pixel may also include pixels of G channels adjacent to the same pixel in a diagonal direction. According to the present exemplary embodiment, similarly to the exemplary embodiment described with reference to FIG. 7, a weight for a larger number of homogeneous pixels can be obtained, and the calculation amount can be reduced by using only the color information of the G channel pixel. In this case, the equation used is the same as Equation 4, except that H 'means the inside of the mask of the form shown in FIG. Since the total number of pixels included in the mask of the type shown in FIG. 8 is five, the difference in color values added in Equation 4 is five.

도 9는 본 발명의 일 실시예에 따른 컬러 보정 방법의 흐름도이다. 본 실시예에 따른 컬러 보정 방법은 도 3에 도시된 컬러 보정 장치에서 처리되는 단계들로 구성된다. 따라서 이하 생략된 내용이라 하더라도 도 3에 도시된 컬러 보정 장치에 관하여 이상에서 기술된 내용은 본 실시예에 따른 컬러 보정 방법에도 적용된다.9 is a flowchart of a color correction method according to an embodiment of the present invention. The color correction method according to the present embodiment is composed of steps processed in the color correction device shown in FIG. Therefore, even if omitted below, the above description of the color correction apparatus shown in FIG. 3 is also applied to the color correction method according to the present embodiment.

910단계에서, 이미지 센서에 의해 획득된 영상의 각 화소에 대하여 불량 화소인지 여부를 판별한다.In operation 910, it is determined whether each pixel of the image acquired by the image sensor is a bad pixel.

그리고 920단계에서, 불량 화소로 판별되었다면 930단계로 진행하고, 불량 화소가 아닌 것으로 판별되었다면 940단계로 진행한다.In step 920, if it is determined that the pixel is bad, the process proceeds to step 930. If it is determined that the pixel is not a bad pixel, the process proceeds to step 940.

930단계에서, 불량 화소로 판별된 화소인 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 제1 화소의 컬러 값을 이용하지 않고 제1 화소 주변의 화소들 및 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산한다.In operation 930, pixels around the first pixel and pixels around the same pixel may be weighted corresponding to the same pixel located around the first pixel, which is the pixel determined as the bad pixel, without using the color value of the first pixel. Calculate using their color values.

940단계에서, 불량 화소가 아닌 것으로 판별된 화소인 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 제2 화소의 컬러 값과 제2 화소 주변의 화소들 및 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산한다.In operation 940, the weight corresponding to the homogeneous pixel positioned around the second pixel, which is the pixel determined to be not the defective pixel, may be determined by comparing the color value of the second pixel and the pixels around the second pixel and the pixels around the same pixel. Calculate using color values.

950단계에서, 상기 930단계 또는 상기 940단계에서 계산된 가중치에 따라서 제1 화소 또는 제2 화소의 주변에 위치하는 동종 화소의 컬러 값을 가중 평균하여 제1 화소 또는 제2 화소의 컬러 값을 보정한다. 이때 제1 화소의 컬러 값은 제외하고 가중 평균 연산을 수행하고, 제2 화소의 컬러 값은 포함하여 가중 평균 연산을 수행한다.In step 950, the color value of the first pixel or the second pixel is weighted and averaged to correct the color value of the first pixel or the second pixel according to the weight calculated in step 930 or 940. do. In this case, the weighted average operation is performed except for the color value of the first pixel, and the weighted average operation is performed including the color value of the second pixel.

도 10 내지 도 12는 베이어 패턴의 컬러 필터 어레이를 갖는 이미지 센서에 의해 획득된 영상으로부터 상술한 본 발명에 따른 컬러 보정 과정 없이 컬러 보간을 수행하여 얻은 영상과 상술한 본 발명에 따른 컬러 보정 과정을 거친 후 컬러 보간을 수행한 결과 얻은 영상을 비교하여 나타낸 도면이다. 도 10 내지 도 12를 참조하면, 본 발명에 따른 컬러 보정 과정을 거치지 않은 경우 불량 화소와 잡음에 의한 영상의 열화 정도가 매우 크지만, 본 발명에 따른 컬러 보정 과정을 거친 경우 대부분의 불량 화소와 잡음이 제거되어 해상도가 향상되었음을 확인할 수 있다. 10 to 12 illustrate an image obtained by performing color interpolation without the color correction process according to the present invention from an image obtained by an image sensor having a Bayer pattern color filter array, and the color correction process according to the present invention. This is a diagram comparing images obtained by performing color interpolation after rough processing. Referring to FIGS. 10 to 12, when the color correction process according to the present invention is not performed, the degree of deterioration of the image due to the bad pixels and noise is very large. However, when the color correction process according to the present invention is performed, You can see that the resolution has been improved by removing the noise.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기 록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드 디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등) 및 캐리어 웨이브(예를 들면, 인터넷을 통한 전송)와 같은 저장매체를 포함한다.Meanwhile, the above-described embodiments of the present invention can be written as a program that can be executed in a computer, and can be implemented in a general-purpose digital computer that operates the program using a computer-readable recording medium. The computer-readable recording medium may include a magnetic storage medium (eg, ROM, floppy disk, hard disk, etc.), an optical reading medium (eg, CD-ROM, DVD, etc.) and a carrier wave (eg, internet Storage medium).

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

도 1은 본 발명의 일 실시예에 따른 컬러 보정 장치가 채용된 영상 처리 장치의 블록도이다. 1 is a block diagram of an image processing apparatus employing a color correction apparatus according to an embodiment of the present invention.

도 2는 베이어 패턴의 영상의 일 예를 나타낸다.2 shows an example of an image of a Bayer pattern.

도 3은 제1 화소가 R 채널의 화소일 때 가중치 계산을 위한 마스크의 형태의 일 실시예를 나타낸다. 3 illustrates an embodiment in the form of a mask for weight calculation when the first pixel is a pixel of the R channel.

도 4는 제2 화소가 R 채널의 화소일 때 가중치 계산을 위한 마스크의 형태의 일 실시예를 나타낸다. 4 illustrates an embodiment in the form of a mask for weight calculation when the second pixel is a pixel of the R channel.

도 5는 제1 화소가 R 채널의 화소일 때 가중치 계산을 위한 마스크의 형태의 다른 실시예를 나타낸다. 5 illustrates another embodiment in the form of a mask for calculating weights when the first pixel is a pixel of the R channel.

도 6은 제2 화소가 R 채널의 화소일 때 가중치 계산을 위한 마스크의 형태의 다른 실시예를 나타낸다. 6 shows another embodiment in the form of a mask for calculating weights when the second pixel is a pixel of the R channel.

도 7은 제1 화소가 G 채널의 화소일 때 가중치 계산을 위한 마스크의 형태의 다른 실시예를 나타낸다. 7 illustrates another embodiment in the form of a mask for calculating a weight when the first pixel is a pixel of the G channel.

도 8은 제2 화소가 G 채널의 화소일 때 가중치 계산을 위한 마스크의 형태의 다른 실시예를 나타낸다. 8 illustrates another embodiment in the form of a mask for weight calculation when the second pixel is a pixel of the G channel.

도 9는 본 발명의 일 실시예에 따른 컬러 보정 방법의 흐름도이다. 9 is a flowchart of a color correction method according to an embodiment of the present invention.

도 10 내지 도 12는 본 발명에 따른 컬러 보정 과정 없이 컬러 보간을 수행하여 얻은 영상과 본 발명에 따른 컬러 보정 과정을 거친 후 컬러 보간을 수행한 결과 얻은 영상을 비교하여 나타낸 도면이다. 10 to 12 are views illustrating an image obtained by performing color interpolation without the color correction process according to the present invention and an image obtained by performing color interpolation after the color correction process according to the present invention.

Claims (19)

이미지 센서에 의해 획득된 영상의 컬러를 보정하는 방법에 있어서,In the method for correcting the color of the image obtained by the image sensor, (a) 상기 영상의 각 화소에 대하여 불량 화소인지 여부를 판별하는 단계;(a) determining whether each pixel of the image is a bad pixel; (b) 상기 (a) 단계에서 불량 화소로 판별된 화소인 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제1 화소의 컬러 값을 이용하지 않고, 상기 제1 화소 주변의 화소들 및 상기 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하는 단계-여기서 및 이하에서 동종 화소란 컬러 채널이 동일한 화소를 의미함;(b) The weight corresponding to the same pixel located around the first pixel, which is the pixel identified as the bad pixel in step (a), is calculated using the color value of the first pixel, Calculating using the color values of the pixels and pixels around the homogeneous pixel, where homogeneous pixel means a pixel having the same color channel; (c) 상기 (a) 단계에서 불량 화소가 아닌 것으로 판별된 화소인 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제2 화소의 컬러 값과 상기 제2 화소 주변의 화소들 및 상기 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하는 단계; 및(c) weights corresponding to homogeneous pixels located in the periphery of the second pixel, which is the pixel determined as not being a bad pixel, in step (a), and the color value of the second pixel and the pixels around the second pixel; And calculating color values of the pixels around the same pixel. And (d) 상기 (b) 단계 또는 상기 (c) 단계에서 계산된 가중치에 따라서 상기 제1 화소 또는 상기 제2 화소의 주변에 위치하는 동종 화소의 컬러 값을 가중 평균하되, 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 가중 평균함으로써 상기 제1 화소 또는 상기 제2 화소의 컬러 값을 보정하는 단계를 포함하는 것을 특징으로 하는 컬러 보정 방법.(d) a weighted average of color values of homogeneous pixels located around the first pixel or the second pixel according to the weight calculated in the step (b) or the step (c), wherein the color of the first pixel And correcting a color value of the first pixel or the second pixel by weighted averaging including a color value of the second pixel without a value. 제1항에 있어서,The method of claim 1, 상기 (b) 단계에서 상기 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치는, 상기 제1 화소를 중심으로 상기 제1 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값과 상기 동종 화소를 중심으로 상기 동종 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산하고,In step (b), a weight corresponding to a homogeneous pixel positioned around the first pixel may be a color value of a pixel in a mask formed by excluding the first pixel with respect to the first pixel and the same pixel. Using the difference in the color values of the pixels in the mask formed by excluding the same pixel, 상기 (c) 단계에서 상기 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치는, 상기 제2 화소를 중심으로 상기 제2 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값과 상기 동종 화소를 중심으로 상기 동종 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산하는 것을 특징으로 하는 컬러 보정 방법.In step (c), a weight corresponding to a homogeneous pixel positioned around the second pixel may include a color value of a pixel in a mask including the second pixel and the same pixel. And calculating using a difference of color values of pixels in a mask formed including the same pixel. 제1항에 있어서,The method of claim 1, 상기 (d) 단계는 상기 제1 화소의 컬러 값과 상기 제2 화소의 컬러 값을 포함하여 상기 가중 평균 연산을 수행하고,In step (d), the weighted average operation is performed by including the color value of the first pixel and the color value of the second pixel. 상기 (b) 단계에서 상기 제1 화소에 대응하는 가중치는 0으로 설정하고, 상기 (c) 단계에서 상기 제2 화소에 대응하는 가중치는 0이 아닌 소정 값으로 설정함으로써, 상기 (d) 단계에서 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 가중 평균되도록 하는 것을 특징으로 하는 컬러 보정 방법.In step (d), the weight corresponding to the first pixel is set to 0 and the weight corresponding to the second pixel is set to a predetermined value other than 0 in step (c). The color correction method of claim 1, wherein the color value of the second pixel is included in the weighted average except for the color value of the first pixel. 제1항에 있어서,The method of claim 1, 상기 (d) 단계는, 상기 (a) 단계에서 판별된 결과에 따라서 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 상기 가중 평균 연산을 수행하는 것을 특징으로 하는 컬러 보정 방법.In the step (d), the weighted average operation is performed by including the color value of the second pixel except for the color value of the first pixel according to the result determined in the step (a). Calibration method. 제1항에 있어서,The method of claim 1, 상기 (a) 단계는, 불량 화소인지 여부를 판별할 화소를 기준으로 상기 화소와 상기 화소 주변에 위치하는 동일한 채널의 화소의 컬러 값 차이 또는 상기 화소 주변에 위치하는 서로 동일한 채널의 화소들 간의 컬러 값 차이를 소정의 문턱값과 비교하여 불량 화소인지 여부를 판별하는 것을 특징으로 하는 컬러 보정 방법.In the step (a), the difference between the color values of the pixels and the pixels of the same channel positioned around the pixel or the colors of the pixels of the same channel positioned around the pixel based on the pixel to determine whether the pixel is a bad pixel. And comparing the value difference with a predetermined threshold value to determine whether or not the pixel is a defective pixel. 제1항에 있어서,The method of claim 1, 상기 이미지 센서는 베이어(Bayer) 패턴의 컬러 필터 어레이를 갖추고 있는 것을 특징으로 하는 컬러 보정 방법.And the image sensor comprises a color filter array in a Bayer pattern. 제2항에 있어서,The method of claim 2, 상기 제1 화소를 제외하여 형성된 마스크는 상기 제1 화소와 인접한 모든 화소로 형성되고, 상기 동종 화소를 제외하여 형성된 마스크는 상기 동종 화소와 인접한 모든 화소로 형성된 것을 특징으로 하는 컬러 보정 방법.The mask formed except the first pixel is formed of all pixels adjacent to the first pixel, and the mask formed except the same pixel is formed of all pixels adjacent to the same pixel. 제2항에 있어서,The method of claim 2, 상기 제2 화소를 포함하여 형성된 마스크는 상기 제2 화소 및 상기 제2 화소와 인접한 모든 화소로 형성되고, 상기 동종 화소를 포함하여 형성된 마스크는 상 기 동종 화소 및 상기 동종 화소와 인접한 모든 화소로 형성된 것을 특징으로 하는 컬러 보정 방법.The mask including the second pixel is formed of the second pixel and all pixels adjacent to the second pixel, and the mask formed of the same pixel is formed of the same pixel and all pixels adjacent to the same pixel. Color correction method characterized in that. 제2항에 있어서,The method of claim 2, 상기 제1 화소가 R 채널 또는 B 채널의 화소인 경우, 상기 제1 화소를 제외하여 형성된 마스크는 상기 제1 화소와 수평 또는 수직 방향으로 인접한 G 채널의 화소로 형성되고, 상기 동종 화소를 제외하여 형성된 마스크는 상기 동종 화소와 수평 또는 수직 방향으로 인접한 G 채널의 화소로 형성된 것을 특징으로 하는 컬러 보정 방법.When the first pixel is a pixel of an R channel or a B channel, a mask formed except the first pixel is formed of pixels of a G channel adjacent to the first pixel in a horizontal or vertical direction, except for the same pixel. And the formed mask is formed of pixels of a G channel adjacent to the same pixel in a horizontal or vertical direction. 제2항에 있어서,The method of claim 2, 상기 제2 화소가 R 채널 또는 B 채널의 화소인 경우, 상기 제2 화소를 포함하여 형성된 마스크는 상기 제2 화소 및 상기 제2 화소와 수평 또는 수직 방향으로 인접한 G 채널의 화소로 형성되고, 상기 동종 화소를 제외하여 형성된 마스크는 상기 동종 화소 및 상기 동종 화소와 수평 또는 수직 방향으로 인접한 G 채널의 화소로 형성된 것을 특징으로 하는 컬러 보정 방법.When the second pixel is a pixel of an R channel or a B channel, a mask formed of the second pixel is formed of pixels of a G channel adjacent to the second pixel and the second pixel in a horizontal or vertical direction. The mask formed by excluding the same pixel is formed of the same pixel and pixels of a G channel adjacent to the same pixel in a horizontal or vertical direction. 제2항에 있어서,The method of claim 2, 상기 제1 화소가 G 채널의 화소인 경우, 상기 제1 화소를 제외하여 형성된 마스크는 상기 제1 화소와 대각 방향으로 인접한 G 채널의 화소로 형성되고, 상기 동종 화소를 제외하여 형성된 마스크는 상기 동종 화소와 대각 방향으로 인접한 G 채널의 화소로 형성된 것을 특징으로 하는 컬러 보정 방법.When the first pixel is a pixel of a G channel, the mask formed by excluding the first pixel is formed of pixels of a G channel adjacent to the first pixel in a diagonal direction, and the mask formed by excluding the same pixel is the same kind. And a pixel of G channel adjacent to the pixel in a diagonal direction. 제2항에 있어서,The method of claim 2, 상기 제2 화소가 G 채널의 화소인 경우, 상기 제2 화소를 포함하여 형성된 마스크는 상기 제2 화소 및 상기 제2 화소와 대각 방향으로 인접한 G 채널의 화소로 형성되고, 상기 동종 화소를 포함하여 형성된 마스크는 상기 동종 화소 및 상기 동종 화소와 대각 방향으로 인접한 G 채널의 화소로 형성된 것을 특징으로 하는 컬러 보정 방법.When the second pixel is a pixel of a G channel, the mask including the second pixel is formed of the second pixel and pixels of a G channel adjacent to the second pixel in a diagonal direction, and include the same pixel. The formed mask is formed of the same pixel and the pixel of the G channel adjacent to the same pixel in the diagonal direction. 제1항 내지 제12항 중 어느 한 항의, 이미지 센서에 의해 획득된 영상의 컬러를 보정하는 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium having recorded thereon a program for executing a method for correcting color of an image obtained by an image sensor according to any one of claims 1 to 12. 이미지 센서에 의해 획득된 영상의 컬러를 보정하는 장치에 있어서,In the device for correcting the color of the image obtained by the image sensor, 상기 영상의 각 화소에 대하여 불량 화소인지 여부를 판별하는 불량 화소 판별부;A bad pixel discriminating unit for discriminating whether or not each pixel of the image is a bad pixel; 상기 불량 화소 판별부에서 불량 화소로 판별된 화소인 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제1 화소 및 상기 동종 화소의 컬러 값을 이용하지 않고, 상기 제1 화소 주변의 화소들 및 상기 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하고, 상기 불량 화소 판별부에서 불량 화소가 아닌 것으로 판별된 화소인 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제2 화소 및 상기 동종 화소의 컬러 값과 상기 제2 화소 주변의 화소들 및 상기 동종 화소 주변의 화소들의 컬러 값을 이용하여 계산하는 가중치 계산부-여기서 및 이하에서 동종 화소란 컬러 채널이 동일한 화소를 의미함; 및The weights corresponding to the same pixels located around the first pixel, which is the pixel identified as the bad pixel, are determined by the bad pixel determination unit, without using the color values of the first pixel and the same pixel, and surrounding the first pixel. A weight value corresponding to a homogeneous pixel positioned around a second pixel, which is a pixel determined as not being a defective pixel, by the pixels of the pixel and the pixels around the homogeneous pixel. A weight calculation unit that calculates the color values of the second pixel and the same pixel by using the color values of the pixels around the second pixel and the pixels around the same pixel. Means a pixel; And 상기 가중치 계산부에서 계산된 가중치에 따라서 상기 제1 화소 또는 상기 제2 화소의 주변에 위치하는 동종 화소의 컬러 값을 가중 평균하되, 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 가중 평균함으로써 상기 제1 화소 또는 상기 제2 화소의 컬러 값을 보정하는 가중 평균부를 포함하는 것을 특징으로 하는 컬러 보정 장치.The weighted average of color values of the same pixel positioned around the first pixel or the second pixel is weighted according to the weight calculated by the weight calculator, except for the color value of the first pixel. And a weighted average unit for correcting a color value of the first pixel or the second pixel by including a weighted average of the values. 제14항에 있어서, 상기 가중치 계산부는,The method of claim 14, wherein the weight calculation unit, 상기 제1 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제1 화소를 중심으로 상기 제1 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값과 상기 동종 화소를 중심으로 상기 동종 화소를 제외하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산하는 제1 가중치 계산부; 및Weight values corresponding to homogeneous pixels positioned around the first pixel are excluded from color values of pixels in a mask formed by excluding the first pixel with respect to the first pixel and the homogeneous pixel with respect to the same pixel. A first weight calculator configured to calculate the difference between the color values of the pixels in the mask; And 상기 제2 화소의 주변에 위치하는 동종 화소에 대응하는 가중치를, 상기 제2 화소를 중심으로 상기 제2 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값과 상기 동종 화소를 중심으로 상기 동종 화소를 포함하여 형성된 마스크 내의 화소의 컬러 값의 차를 이용하여 계산하는 제2 가중치 계산부를 포함하는 것을 특징으로 하는 컬러 보정 장치.A weight value corresponding to a homogeneous pixel positioned around the second pixel includes a color value of a pixel in a mask including the second pixel centered on the second pixel, and the homogeneous pixel centered on the same pixel And a second weight calculator configured to calculate the difference between the color values of the pixels in the mask. 제15항에 있어서,The method of claim 15, 상기 가중 평균부는 상기 제1 화소의 컬러 값과 상기 제2 화소의 컬러 값을 포함하여 상기 가중 평균 연산을 수행하고,The weighted average unit performs the weighted average operation including a color value of the first pixel and a color value of the second pixel, 상기 제1 가중치 계산부는 상기 제1 화소에 대응하는 가중치는 0으로 설정하고, 상기 제2 가중치 계산부는 상기 제2 화소에 대응하는 가중치는 0이 아닌 소정 값으로 설정함으로써, 상기 가중 평균부에서 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 가중 평균되도록 하는 것을 특징으로 하는 컬러 보정 장치.The first weight calculator sets the weight corresponding to the first pixel to 0, and the second weight calculator sets the weight corresponding to the second pixel to a predetermined value other than 0, thereby allowing the weighted average unit to set the weight. And a color value of the second pixel to be weighted average except for the color value of the first pixel. 제14항에 있어서,The method of claim 14, 상기 가중 평균부는, 상기 불량 화소 판별부에서 판별된 결과에 따라서 상기 제1 화소의 컬러 값은 제외하고 상기 제2 화소의 컬러 값은 포함하여 상기 가중 평균 연산을 수행하는 것을 특징으로 하는 컬러 보정 장치.The weighted average unit performs the weighted average operation including the color value of the second pixel except the color value of the first pixel according to a result determined by the bad pixel determination unit. . 제14항에 있어서,The method of claim 14, 상기 불량 화소 판별부는, 불량 화소인지 여부를 판별할 화소를 기준으로 상기 화소와 상기 화소 주변에 위치하는 동일한 채널의 화소의 컬러 값 차이 또는 상기 화소 주변에 위치하는 서로 동일한 채널의 화소들 간의 컬러 값 차이를 소정의 문턱값과 비교하여 불량 화소인지 여부를 판별하는 것을 특징으로 하는 컬러 보정 장치.The bad pixel determination unit may be configured to determine a difference between a color value of the pixel and a pixel of the same channel positioned around the pixel or a color value between pixels of the same channel positioned around the pixel, based on a pixel to determine whether the pixel is a bad pixel. And comparing the difference with a predetermined threshold to determine whether or not the pixel is a defective pixel. 제14항에 있어서,The method of claim 14, 상기 이미지 센서는 베이어(Bayer) 패턴의 컬러 필터 어레이를 갖추고 있는 것을 특징으로 하는 컬러 보정 장치.And the image sensor comprises a color filter array in a Bayer pattern.
KR1020070091428A 2007-09-10 2007-09-10 Method and apparatus for compensating color of image obtained from image sensor KR100915970B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070091428A KR100915970B1 (en) 2007-09-10 2007-09-10 Method and apparatus for compensating color of image obtained from image sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070091428A KR100915970B1 (en) 2007-09-10 2007-09-10 Method and apparatus for compensating color of image obtained from image sensor

Publications (2)

Publication Number Publication Date
KR20090026449A KR20090026449A (en) 2009-03-13
KR100915970B1 true KR100915970B1 (en) 2009-09-10

Family

ID=40694385

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070091428A KR100915970B1 (en) 2007-09-10 2007-09-10 Method and apparatus for compensating color of image obtained from image sensor

Country Status (1)

Country Link
KR (1) KR100915970B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101175737B1 (en) * 2010-12-14 2012-08-21 엠텍비젼 주식회사 Defect pixel processing method and device

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101918035B1 (en) * 2012-07-20 2019-01-29 삼성전자주식회사 Apparatus and method for filling hole area of image
KR101981573B1 (en) 2012-11-22 2019-05-23 삼성전자주식회사 Image signal processor and mobile device including image signal processor
KR101366462B1 (en) * 2013-03-08 2014-02-24 경희대학교 산학협력단 Method for extraction of pure primary color information of display
KR102346961B1 (en) 2015-03-18 2022-01-04 삼성전자주식회사 Image Process Device and Denoising System Having the Same

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1051693A (en) 1996-07-30 1998-02-20 Toshiba Medical Eng Co Ltd Defective picture element correction processing unit for image pickup element
JPH11262025A (en) 1998-03-16 1999-09-24 Toshiba Corp Image input device and image correction method therefor
JP2000308082A (en) 1999-04-23 2000-11-02 Nippon Telegr & Teleph Corp <Ntt> Picture defect correcting method and recording medium recording the same
JP2003259381A (en) 2002-03-06 2003-09-12 Olympus Optical Co Ltd Apparatus for correcting defective pixel

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1051693A (en) 1996-07-30 1998-02-20 Toshiba Medical Eng Co Ltd Defective picture element correction processing unit for image pickup element
JPH11262025A (en) 1998-03-16 1999-09-24 Toshiba Corp Image input device and image correction method therefor
JP2000308082A (en) 1999-04-23 2000-11-02 Nippon Telegr & Teleph Corp <Ntt> Picture defect correcting method and recording medium recording the same
JP2003259381A (en) 2002-03-06 2003-09-12 Olympus Optical Co Ltd Apparatus for correcting defective pixel

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101175737B1 (en) * 2010-12-14 2012-08-21 엠텍비젼 주식회사 Defect pixel processing method and device

Also Published As

Publication number Publication date
KR20090026449A (en) 2009-03-13

Similar Documents

Publication Publication Date Title
US8358835B2 (en) Method for detecting and correcting chromatic aberration, and apparatus and method for processing image using the same
JP5631325B2 (en) Defect detection method for imaging apparatus and imaging apparatus
KR101980931B1 (en) Image processing device, image processing method, and recording medium
JP2009065671A (en) Color interpolation method, color interpolation apparatus and computer program
JP5060535B2 (en) Image processing device
US9313467B2 (en) Pixel value calibration device and method
WO2016031597A1 (en) Image processing device, image processing method, and image processing system
JP2011091483A (en) Image processor, image processing method, and program
WO2007075067A1 (en) Lens shading compensation apparatus and method, and image processor using the same
US9030579B2 (en) Image processing apparatus and control method that corrects a signal level of a defective pixel
KR100915970B1 (en) Method and apparatus for compensating color of image obtained from image sensor
JP2007201530A (en) Pixel defect correction apparatus
EP3119080B1 (en) Method and system for dead pixel correction of digital image
WO2015174257A1 (en) Image-processing device, image-processing method, imaging device, electronic instrument, and program
ITVI20110009A1 (en) TEXTURE DETECTION IN IMAGE PROCESSING
WO2014013792A1 (en) Noise evaluation method, image processing device, imaging device, and program
JP4934839B2 (en) Image processing apparatus, method thereof, and program
JP2006155579A (en) Image processing method and image processing apparatus
JP2022553726A (en) Method for generating the output signal of a PDAF pixel
US20140355872A1 (en) Method for determining interpolating direction for color demosaicking
CN109360189B (en) Method for detecting pixel defect point of image of uncooled infrared movement
JP2009206552A (en) Image processing apparatus
KR101327790B1 (en) Image interpolation method and apparatus
KR102119138B1 (en) Bayesian based image restoration method for camera
JP2008148115A (en) Image defect correction system of imaging device using direction detection

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: 20130618

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20140515

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20150922

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20160830

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee