KR100780224B1 - Method of detecting and restoring defect pixels of image sensor - Google Patents

Method of detecting and restoring defect pixels of image sensor Download PDF

Info

Publication number
KR100780224B1
KR100780224B1 KR1020060042554A KR20060042554A KR100780224B1 KR 100780224 B1 KR100780224 B1 KR 100780224B1 KR 1020060042554 A KR1020060042554 A KR 1020060042554A KR 20060042554 A KR20060042554 A KR 20060042554A KR 100780224 B1 KR100780224 B1 KR 100780224B1
Authority
KR
South Korea
Prior art keywords
pixel
inspection target
pixels
inspected
target pixel
Prior art date
Application number
KR1020060042554A
Other languages
Korean (ko)
Other versions
KR20070109501A (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 KR1020060042554A priority Critical patent/KR100780224B1/en
Publication of KR20070109501A publication Critical patent/KR20070109501A/en
Application granted granted Critical
Publication of KR100780224B1 publication Critical patent/KR100780224B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • H04N25/68Noise processing, e.g. detecting, correcting, reducing or removing noise applied to defects
    • H04N25/683Noise processing, e.g. detecting, correcting, reducing or removing noise applied to defects by defect estimation performed on the scene signal, e.g. real time or on the fly detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4015Image demosaicing, e.g. colour filter arrays [CFA] or Bayer patterns

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

본 발명은 이미지 센서의 불량 화소 검출 및 복원방법에 관한 것으로서, 본 발명의 이미지 센서의 불량 화소 판단 및 복원방법은, 적색, 녹색 및 청색을 각각 검출하는 복수의 화소가 베이어 패턴의 모자이크 배열로 배치된 이미지 센서에서, 상기 각 화소별로 불량 화소를 검출하고 복원하는 방법에 있어서, 검사 대상이 되는 화소를 중심으로 수평방향에 있는 복수 화소의 신호레벨을 비교하여 상기 검사 대상 화소가 전체 이미지의 에지 영역에 포함되는지 판단하고, 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우 상기 검사 대상 화소의 불량 여부를 판단하고, 불량으로 판단된 경우 상기 검사 대상 화소를 복원하는 제1 복원단계; 및 상기 복수의 화소 전체에 대하여 상기 제1 복원단계가 완료된 후, 검사 대상 화소를 중심으로 m×n 매트릭스 배열(m, n은 3 이상의 자연수)을 형성하는 복수 화소의 신호레벨을 비교하여 상기 검사 대상 화소가 포함되는 전체 이미지에서 위치한 영역의 형식을 판별하고, 상기 검사 대상 화소가 포함되는 영역의 형식에 따라 상기 검사 대상 화소의 불량 여부를 판단하며, 불량으로 판단된 경우 상기 검사 대상 화소를 복원하는 제2 복원단계를 포함하는 것을 특징으로 한다.The present invention relates to a method for detecting and restoring a bad pixel of an image sensor. In the method of determining and restoring a bad pixel of an image sensor, a plurality of pixels respectively detecting red, green, and blue are arranged in a mosaic pattern of a Bayer pattern. In a method of detecting and restoring a bad pixel for each pixel in a predetermined image sensor, the pixel to be inspected is an edge region of the entire image by comparing signal levels of a plurality of pixels in a horizontal direction around the pixel to be inspected. A first restoring step of determining whether the control target pixel is included in the control unit, determining whether the inspection target pixel is defective when the inspection target pixel is not included in the edge region, and restoring the inspection target pixel when the inspection target pixel is determined to be defective; And comparing the signal levels of a plurality of pixels forming an m × n matrix array (m, n is a natural number of 3 or more) centering on the inspection target pixel after the first reconstruction step is completed for all of the plurality of pixels. Determine a format of a region located in the entire image including the target pixel, determine whether the inspection target pixel is defective according to the format of the region including the inspection pixel, and restore the inspection target pixel if it is determined to be defective. And a second restoration step.

이미지 센서, 불량 화소, 복원 Image sensor, bad pixels, restore

Description

이미지 센서의 불량 화소 검출 및 복원방법{METHOD OF DETECTING AND RESTORING DEFECT PIXELS OF IMAGE SENSOR}Defective pixel detection and restoration method of image sensor {METHOD OF DETECTING AND RESTORING DEFECT PIXELS OF IMAGE SENSOR}

도 1은 본 발명에 따른 이미지 센서의 화소 배열을 도시한 도면.1 shows a pixel arrangement of an image sensor according to the invention;

도 2는 본 발명에 따른 이미지 센서의 불량 화소 검출 및 복원방법에 대한 플로우차트.2 is a flowchart of a method for detecting and restoring a bad pixel of an image sensor according to the present invention;

도 3은 본 발명에 따른 제1 복원단계 과정에 대한 플로우차트.3 is a flowchart of a first restoration process according to the present invention.

도 4는 본 발명에 따른 제2 복원단계 과정에 대한 플로우차트4 is a flowchart of a second restoration process according to the present invention;

도 5는 본 발명에 따른 제2 복원단계 과정에서 이미지 에지 영역에 있는 화소의 불량 화소 검출 및 복원방법에 대한 플로우차트.5 is a flowchart illustrating a method for detecting and restoring a bad pixel of a pixel in an image edge region in a second restoration step according to the present invention.

도 6은 본 발명에 따른 이미지 센서의 불량센서 검출 및 복원 방법에 있어서 제1 윈도우 및 제2 윈도우를 도시한 도면.6 is a diagram illustrating a first window and a second window in a method for detecting and restoring a defective sensor of an image sensor according to the present invention;

본 발명은 이미지 센서의 불량 화소 검출 및 복원방법에 관한 것으로서, 더욱 상세하게는 모자이크 배열로 형성된 복수의 화소를 갖는 이미지 센서에서 발생 하는 불량 화소를 검출하고 복원하는 방법에 관한 것이다.The present invention relates to a method for detecting and restoring a bad pixel of an image sensor, and more particularly, to a method for detecting and restoring a bad pixel generated in an image sensor having a plurality of pixels formed in a mosaic array.

일반적으로 자연계에 존재하는 각 피사체들은 부분별로 빛의 밝기 및 파장이 서로 다르게 나타난다. 이미지 센서는 빛에 반응하는 반도체의 성질을 이용하여 피사체의 서로 다른 밝기 및 파장을 신호 처리 가능한 레벨의 전기적인 값으로 출력하는 소자이다. 최근 이미지 센서를 구비한 휴대용 장치(예를 들어, 디지털 카메라, 이동 통신 단말기 등)가 개발되어 판매되고 있으며, 높은 화소수를 가지는 이미지 센서가 더욱 보편화되고 있다.In general, each subject in the natural world has different brightness and wavelengths of light. An image sensor is an element that outputs different brightness and wavelengths of an object as an electrical value at a signal processing level by using a property of a semiconductor that reacts to light. Recently, portable devices (eg, digital cameras, mobile communication terminals, etc.) equipped with image sensors have been developed and sold, and image sensors having a high pixel count have become more common.

한편, 이미지 센서의 화소 수가 늘어남에 따라 제조 공정 상의 문제로 인해 발생하는 불량 화소 역시 증가하여, 제품의 수율에 영향을 미친다. 또한, 이미지 센서를 사용하는 중, 충격이나 사용에 따른 이미지 센서의 열화로 인하여 후발적으로 불량 화소가 발생한다. 이러한 불량 화소는 이미지 센서에 의해 촬상된 이미지의 화질을 저하하는 원인이 된다.On the other hand, as the number of pixels of the image sensor increases, defective pixels generated due to manufacturing process problems also increase, affecting the yield of the product. In addition, during the use of the image sensor, defective pixels are generated later due to deterioration of the image sensor due to impact or use. Such defective pixels are a cause of degrading the image quality of the image picked up by the image sensor.

본 발명은 상술한 종래 기술의 문제를 해결하기 위한 것으로서, 그 목적은 이미지 센서의 제품 수율을 증대시켜 제품의 원가 절감을 도모하고, 이미지 센서에서 촬상된 이미지를 개선하기 위한 이미지 센서에서의 불량 화소를 검출 및 복원 방법을 제공하는데 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems of the prior art, and an object thereof is to increase the product yield of an image sensor to reduce the cost of the product, and to improve the image picked up by the image sensor. To provide a method for detecting and restoring.

상기한 기술적 과제를 달성하기 위해서, 본 발명의 이미지 센서의 불량 화소 판단 및 복원방법은, 적색, 녹색 및 청색을 각각 검출하는 복수의 화소가 베이어 패턴의 모자이크 배열로 배치된 이미지 센서에서, 상기 각 화소별로 불량 화소를 검출하고 복원하는 방법에 있어서,In order to achieve the above technical problem, the bad pixel determination and restoration method of the image sensor of the present invention, in the image sensor in which a plurality of pixels for detecting red, green and blue are arranged in a mosaic array of Bayer pattern, In the method for detecting and restoring a bad pixel for each pixel,

검사 대상이 되는 화소를 중심으로 수평방향에 있는 복수 화소의 신호레벨을 비교하여 상기 검사 대상 화소가 전체 이미지의 에지 영역에 포함되는지 판단하고, 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우 상기 검사 대상 화소의 불량 여부를 판단하고, 불량으로 판단된 경우 상기 검사 대상 화소를 복원하는 제1 복원단계; 및It is determined whether the inspection target pixel is included in an edge region of the entire image by comparing signal levels of a plurality of pixels in a horizontal direction with respect to the pixel to be inspected, and when the inspection target pixel is not included in the edge region, A first restoring step of determining whether the inspection target pixel is defective and restoring the inspection target pixel when it is determined to be defective; And

상기 복수의 화소 전체에 대하여 상기 제1 복원단계가 완료된 후, 검사 대상 화소를 중심으로 m×n 매트릭스 배열(m, n은 3 이상의 자연수)을 형성하는 복수 화소의 신호레벨을 비교하여 상기 검사 대상 화소가 포함되는 전체 이미지에서 위치한 영역의 형식을 판별하고, 상기 검사 대상 화소가 포함되는 영역의 형식에 따라 상기 검사 대상 화소의 불량 여부를 판단하며, 불량으로 판단된 경우 상기 검사 대상 화소를 복원하는 제2 복원단계를 포함하는 것을 특징으로 한다.After the first reconstruction step is completed for all of the plurality of pixels, the inspection target is compared by comparing signal levels of a plurality of pixels forming an m × n matrix array (m, n is a natural number of 3 or more) centering on the inspection target pixel. Determining a format of a region located in the entire image including the pixel, determining whether the inspection target pixel is defective according to a format of the region including the inspection target pixel, and restoring the inspection target pixel if it is determined to be defective. And a second restoration step.

상기 제1 복원 단계는, 상기 검사 대상 화소를 중심에 포함하는 상기 모자이크 배열의 수평방향으로 연속 배치된 적어도 3개 이상의 화소로 이루어진 제1 윈도우를 형성하는 단계; 상기 제1 윈도우에 포함된 복수 화소의 신호 레벨을 비교하 여, 상기 검사 대상 화소가 이미지의 에지 영역에 포함되는지 여부를 판단하는 단계; 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호레벨과, 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨을 비교하여 상기 검사 대상 화소가 불량 화소인지 판단하는 단계; 및 상기 검사 대상 화소가 불량 화소이면, 상기 검사 대상 화소의 신호 레벨을 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하여 상기 검사 대상 화소를 복원하는 단계를 포함하는 것을 특징으로 한다.The first restoring step may include: forming a first window including at least three pixels continuously arranged in a horizontal direction of the mosaic array including the inspection target pixel at a center thereof; Comparing signal levels of the plurality of pixels included in the first window to determine whether the inspection target pixel is included in an edge region of the image; When the inspection target pixel is not included in the edge area, the signal level of the inspection target pixel and the same color as the inspection target pixel among the pixels of the first window are detected and disposed closest to the inspection target pixel. Comparing the signal levels of the pixels to determine whether the inspection target pixel is a bad pixel; And when the pixel to be inspected is a bad pixel, the signal level of the pixel to be inspected is the same as that of the pixel to be inspected among the pixels of the first window, and the signal level of the pixel disposed closest to the pixel to be inspected is determined. And restoring the inspection target pixel by changing to an average value.

상기 이미지의 에지 영역에 포함되는지 여부를 판단하는 단계는, 상기 제1 윈도우에 포함되는 화소 중, 동일한 색상을 검출하며 서로 근접한 화소의 신호 레벨 차들 각각이 기설정된 문턱값보다 작은 경우, 상기 검사 대상 화소는 이미지의 에지 영역에 포함되지 않는 것으로 판단하는 것을 특징으로 한다.The determining whether the image is included in the edge region of the image may include detecting the same color among pixels included in the first window, and when the signal level differences of pixels adjacent to each other are smaller than a preset threshold, the inspection target. The pixel may be determined not to be included in an edge region of the image.

상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소가 이미지의 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호레벨이 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우에 상기 검사 대상 화소를 불량 화소로 판단하는 것을 특 징으로 한다.In the determining of whether the pixel is a bad pixel, when the pixel to be inspected is not included in an edge region of the image, a signal level of the pixel to be inspected detects the same color as the pixel to be inspected among the pixels of the first window. The inspection object pixel may be determined to be a bad pixel when the signal level of the pixel disposed closest to the inspection object pixel is greater than or equal to a predetermined threshold value or less than the predetermined threshold value.

또한, 상기 제2 복원단계는, 상기 검사 대상 화소를 중심으로하는 m×n 매트릭스 배열(m, n은 3 이상의 자연수)을 형성하는 복수의 화소로 이루어진 제2 윈도우를 형성하는 단계; 상기 제2 윈도우에 포함된 화소 각각의 신호 레벨을 비교하여, 상기 검사 대상 화소가 이미지의 에지 영역에 포함되는지 여부를 판단하는 단계; 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호 레벨과, 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨을 비교하여 상기 검사 대상 화소가 불량 화소인지 판단하는 단계; 및 상기 검사 대상 화소가 불량 화소이면, 상기 검사 대상 화소의 신호 레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하여 상기 검사 대상 화소를 복원하는 단계를 포함하는 것을 특징으로 한다.The second reconstructing step may further include forming a second window including a plurality of pixels forming an m × n matrix array (m, n is a natural number of 3 or more) centered on the inspection target pixel; Comparing signal levels of each pixel included in the second window to determine whether the inspection target pixel is included in an edge region of an image; When the inspection target pixel is not included in the edge area, the signal level of the inspection target pixel and the same color as the inspection target pixel among the pixels of the second window are detected and disposed closest to the inspection target pixel. Comparing the signal levels of the pixels to determine whether the inspection target pixel is a bad pixel; And when the pixel to be inspected is a bad pixel, the signal level of the pixel to be detected is the same as that of the pixel to be inspected among the pixels of the second window, and the signal level of the pixel disposed closest to the pixel to be inspected is determined. And restoring the inspection target pixel by changing to an average value.

상기 에지 영역에 포함되는지 여부를 판단하는 단계는, 상기 제2 윈도우의 수직방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수직 에지값, 상기 제2 윈도우의 수직방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 수직방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수직 에지값, 상기 제2 윈도우의 수평방향으로 연속된 2개의 녹색 을 검출하는 화소의 신호레벨 차들의 합인 제1 수평 에지값 및 상기 제2 윈도우의 수평방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 상기 제2 윈도우의 수평방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수평 에지값을 계산하는 단계; 및 상기 제1 수직 에지값, 제2 수직 에지값, 제1 수평 에지값 및 제2 수평 에지값이 기설정된 문턱값보다 작은 경우 상기 검사 대상 화소는 상기 에지 영역에 포함되지 않는 것으로 판단하는 단계를 포함하는 것을 특징으로 한다.Determining whether or not included in the edge area, the first vertical edge value that is the sum of the signal level difference of the pixels for detecting two consecutive green in the vertical direction of the second window, in the vertical direction of the second window A second vertical edge value that is the sum of the differences between signal levels of pixels detecting two consecutive reds and the signal levels of pixels detecting two consecutive blues, and continuous in the horizontal direction of the second window; The first horizontal edge value, which is the sum of the signal level differences of the pixels detecting two greens, and the difference in the signal levels of the pixels detecting two red consecutive in the horizontal direction of the second window, and in the horizontal direction of the second window. Calculating a second horizontal edge value that is a sum of differences of signal levels of pixels for detecting two consecutive blues; And determining that the inspection target pixel is not included in the edge area when the first vertical edge value, the second vertical edge value, the first horizontal edge value, and the second horizontal edge value are smaller than a preset threshold. It is characterized by including.

상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우에 상기 검사 대상 화소를 불량 화소로 판단하는 것을 특징으로 한다.In the determining of whether the pixel is a bad pixel, when the pixel to be inspected is not included in the edge area, the signal level of the pixel to be inspected is the same color as that of the pixel to be inspected among the pixels of the second window, and the inspection is performed. The inspection object pixel may be determined to be a bad pixel when the threshold value is greater than or equal to the average value of the signal level of the pixel disposed closest to the target pixel or less than or equal to the predetermined threshold value.

상기 제2 복원 단계는, 상기 검사 대상 화소가 이미지 에지 영역에 포함되는 경우, 상기 제2 윈도우에 포함된 화소 각각의 신호 레벨을 비교하여, 상기 검사 대상 화소가 이미지의 수직 에지 영역, 수평 에지 영역 및 대각선 에지 영역 중 어느 하나에 포함되는지 판별하는 이미지 영역의 형식을 판별 단계; 상기 이미지 영역의 형식 판별 결과에 따라 상기 검사 대상 화소가 불량 화소인지 판단하는 단계; 및 상기 검사 대상 화소가 불량 화소로 판단되는 경우 상기 검사 대상 화소를 복원하는 단계를 더 포함하는 것을 특징으로 한다.In the second reconstructing step, when the inspection target pixel is included in the image edge region, the signal level of each pixel included in the second window is compared so that the inspection target pixel is a vertical edge region and a horizontal edge region of the image. And determining the format of the image area to determine which one of the diagonal edge areas is included. Determining whether the inspection target pixel is a bad pixel according to a format determination result of the image area; And restoring the inspected pixel when the inspected pixel is determined to be a bad pixel.

상기 이미지 영역의 형식을 판별하는 단계는, 상기 제2 윈도우의 수직방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수직 에지값, 상기 제2 윈도우의 수직방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 수직방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수직 에지값, 상기 제2 윈도우의 수평방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수평 에지값 및 상기 제2 윈도우의 수평방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 상기 제2 윈도우의 수평방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수평 에지값을 계산하는 단계; 상기 제1 수직 에지값이 상기 제1 수평 에지값과 기설정된 문턱값의 합보다 크고, 제2 수직 에지값이 상기 제2 수평 에지값과 기설정된 문턱값의 합보다 큰 경우, 상기 검사 대상 화소는 수평 에지 영역에 있는 것으로 판단하는 단계; 상기 제1 수평 에지값이 상기 제1 수직 에지값과 기설정된 문턱값의 합보다 크고, 제2 수평 에지값이 상기 제2 수직 에지값과 기설정된 문턱값의 합보다 큰 경우, 상기 검사 대상 화소는 수직 에지 영역에 있는 것으로 판단하는 단계; 및 상기 검사 대상 화소가 수평 에지 영역 및 수직 에지 영역에 있지 않는 경우 대각선 에지 영역에 있는 것으로 판단하는 단계를 포함하는 것을 특징으로 한다.The determining of the format of the image area may include: a first vertical edge value that is a sum of signal level differences between pixels detecting two green colors continuous in a vertical direction of the second window, and a continuous value in the vertical direction of the second window; A second vertical edge value that is the sum of the differences between the signal levels of the pixels detecting the two reds and the differences in the signal levels of the pixels detecting the two blues, and two consecutive in the horizontal direction of the second window; The first horizontal edge value, which is the sum of the signal level differences of the pixels detecting green, and the difference in the signal levels of the pixels detecting two red consecutive in the horizontal direction of the second window, and the horizontal direction of the second window. Calculating a second horizontal edge value that is a sum of differences of signal levels of pixels detecting two blues; The pixel to be inspected when the first vertical edge value is greater than the sum of the first horizontal edge value and the preset threshold and the second vertical edge value is greater than the sum of the second horizontal edge value and the preset threshold. Determining to be in the horizontal edge region; The pixel to be inspected when the first horizontal edge value is greater than the sum of the first vertical edge value and the preset threshold and the second horizontal edge value is greater than the sum of the second vertical edge value and the preset threshold. Determining that it is in the vertical edge region; And determining that the inspection target pixel is in a diagonal edge region when the pixel to be inspected is not in the horizontal edge region and the vertical edge region.

상기 검사 대상 화소가 상기 수평 에지 영역에 포함되는 경우, 상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수평방향으로 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단하고, 상기 검사 대상 화소를 복원하는 단계는, 상기 검사 대상 화소의 신호레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수평방향으로 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하는 것을 특징으로 한다.When the pixel to be inspected is included in the horizontal edge region, determining whether the pixel to be inspected is the bad pixel may include detecting a color having the same signal level as that of the pixel to be inspected among the pixels of the second window. When the threshold level is greater than or equal to a predetermined threshold value or less than or equal to a predetermined threshold value than a signal level of a pixel disposed closest to the horizontal direction of the target pixel, determining the inspection target pixel as a bad pixel and restoring the inspection target pixel may include: The signal level of the pixel to be inspected is changed to an average value of the signal levels of pixels arranged closest to each other in the horizontal direction of the pixel to be detected by detecting the same color as the pixel to be inspected among the pixels of the second window. do.

또한, 상기 검사 대상 화소가 상기 수직 에지 영역에 포함되는 경우, 상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수직방향으로 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단하고, 상기 검사 대상 화소를 복원하는 단계는, 상기 검사 대상 화소의 신호레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수직방향으로 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하는 것을 특징으로 한다.In addition, when the inspection target pixel is included in the vertical edge area, the determining of whether the inspection pixel is the bad pixel may include detecting a color having the same signal level as the inspection pixel among the pixels of the second window. Determining the inspection target pixel as a bad pixel when the signal level is greater than or equal to a predetermined threshold value or less than or equal to a signal level of a pixel disposed most closely in the vertical direction of the inspection object pixel, and restoring the inspection object pixel; Detects the same color as the inspection target pixel among the pixels in the second window and changes the signal level of the inspection target pixel to an average value of the signal levels of the pixel disposed closest in the vertical direction of the inspection target pixel. It features.

또한, 상기 검사 대상 화소가 상기 대각선 에지 영역에 포함되는 경우, 상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수직방향으로 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단하고, 상기 검사 대상 화소를 복원하는 단계는, 상기 검사 대상 화소의 신호레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일 색상을 검출하고 상기 검사 대상 화소를 둘러싸는 화소의 신호 레벨의 평균값으로 변경하는 것을 특징으로 한다.In addition, when the inspection target pixel is included in the diagonal edge area, the determining of whether the inspection pixel is the bad pixel may include detecting a color having the same signal level as the inspection pixel among the pixels of the second window. Determining the inspection target pixel as a bad pixel when the signal level is greater than or equal to a predetermined threshold value or less than or equal to a signal level of a pixel disposed most closely in the vertical direction of the inspection object pixel, and restoring the inspection object pixel; The signal level of the pixel to be inspected may be changed to an average value of a signal level of a pixel surrounding the test pixel by detecting the same color as the pixel to be inspected among the pixels of the second window.

이하, 첨부된 도면을 참조하여 본 발명의 다양한 실시형태를 더욱 상세하게 설명한다. Hereinafter, various embodiments of the present invention will be described in more detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 이미지 센서의 화소 배열을 도시한 도면이다.1 is a diagram illustrating a pixel array of an image sensor according to the present invention.

이미지 센서의 화소는 모자이크 배열을 하고 있다. 각 화소는 피사체에서 각각 적색(R), 녹색(G) 및 청색(B) 중 하나의 색상을 검출하고 필터링하여 전기신호로 변환한다. 이미지 센서에서의 모자이크 배열을 가지는 화소들은 검출하는 색상에 따른 일정 패턴을 형성하며, 가장 일반적인 패턴으로는 도 1에 도시된 바와 같이 베이어(bayer) 패턴이 있다. 즉, 화소들의 전체 개의 절반은 녹색을 검출하며, 전체 개수의 각 4분의 1은 적색 및 녹색을 수신한다. 색상 정보를 얻기 위해 이미 지 화소들은 적색, 녹색 또는 청색의 반복 패턴으로 이루어진다.The pixels of the image sensor have a mosaic arrangement. Each pixel detects, filters, and converts one color among red (R), green (G), and blue (B) into an electrical signal in the subject. Pixels having a mosaic arrangement in the image sensor form a predetermined pattern according to the detected color, and the most common pattern is a Bayer pattern as shown in FIG. 1. That is, half of all the pixels detect green, and each quarter of the total number receives red and green. In order to obtain color information, image pixels are formed of a repetitive pattern of red, green, or blue.

베이어 패턴은 사람의 눈이 피사체의 녹색 내용으로부터 루미넌스(luminance) 데이터의 대부분을 도출한다는 전제에 기초한다. 따라서, 화소들 중 더 많은 화소가 녹색에 대한 신호를 처리하게 함으로써, 동일한 수의 적색, 녹색 및 적색 신호를 검출하는 화소들이 반복하는 패턴에 비해 높은 해상도의 이미지가 생성될 수 있다.The Bayer pattern is based on the premise that the human eye derives most of the luminance data from the green content of the subject. Thus, by allowing more of the pixels to process signals for green, an image of higher resolution can be generated as compared to the pattern in which pixels detecting the same number of red, green and red signals repeat.

도 2는 본 발명에 따른 이미지 센서의 불량 화소 검출 및 복원방법을 보이는 플로우차트이다. 도 2는 이미지 센서에서 촬상된 이미지를 2번의 복원단계를 거쳐 불량 화소를 복원하는 과정을 보이고 있다.2 is a flowchart illustrating a method for detecting and restoring a bad pixel of an image sensor according to the present invention. 2 illustrates a process of restoring a bad pixel through two restoration steps of an image captured by an image sensor.

도 3은 본 발명에 따른 제1 복원단계 과정을 보이는 플로우차트이다. 도 3은 불량 화소의 제1 복원을 위한 제1 윈도우를 형성하는 것과, 검사 대상 화소가 이미지의 에지 영역에 포함되지 않는 경우에 불량 화소를 검출하고 복원하는 과정을 보이고 있다.3 is a flowchart showing a first restoration process according to the present invention. 3 illustrates a process of forming a first window for first restoration of a bad pixel, and detecting and restoring a bad pixel when the pixel to be inspected is not included in an edge region of the image.

도 4는 본 발명에 따른 제2 복원단계 과정을 보이는 플로우차트이다. 도 4는 불량 화소의 제2 복원을 위한 제2 윈도를 형성하는 것과, 검사 대상 화소가 이미지 의 에지 영역에 포함되지 않는 경우, 불량 화소를 검출하고 복원하는 과정을 보이고 있다.4 is a flowchart showing a second restoration step process according to the present invention. 4 illustrates a process of forming a second window for second restoration of a bad pixel, and detecting and restoring a bad pixel when the pixel to be inspected is not included in an edge region of the image.

도 5는 본 발명에 따른 제2 복원단계 과정에서 이미지 에지 영역에 포함되어 있는 검사 대상 화소의 불량 화소 검출 및 복원방법을 보이는 플로우차트이다. 도 5는, 검사 대상 화소가 이미지 에지 영역에 포함되는 경우에 에지 영역의 형식을 판별하고, 각 에지 영역의 형식에 따라 불량 화소를 검출하고 복원하는 과정을 보이고 있다.FIG. 5 is a flowchart illustrating a method of detecting and restoring a bad pixel of an inspection target pixel included in an image edge area in a second restoration step according to the present invention. 5 illustrates a process of determining a format of an edge region when the inspection target pixel is included in an image edge region, and detecting and restoring a bad pixel according to the format of each edge region.

도 6은 본 발명에 따른 이미지 센서의 불량센서 검출 및 복원방법을 설명하기 위한 제1 윈도우 및 제2 윈도우를 도시한 도면이다. 도 6에 도시된 바와 같이, 제1 윈도우는 수평방향으로 연속된 9개의 화소(P1, P2, P3, P4, P5, P6, P7, P8 및 P9로 정의됨)로 이루어질 수 있다. P1, P3, P5, P7 및 P9는 동일한 색으로 형성되며, 또한 P2, P4, P6 및 P8도 동일한 색상의 화소로 형성된다.6 is a diagram illustrating a first window and a second window for explaining a method of detecting and restoring a defective sensor of an image sensor according to the present invention. As shown in FIG. 6, the first window may include nine pixels (defined as P1, P2, P3, P4, P5, P6, P7, P8, and P9) which are continuous in the horizontal direction. P1, P3, P5, P7, and P9 are formed of the same color, and P2, P4, P6, and P8 are also formed of pixels of the same color.

제2 윈도우는 각 화소가 Pij(i, j는 5보다 같거나 작은 자연수)로 표현되는 25개의 화소로 이루어져 있으며, 각 행은 2개 색상의 화소가 번갈아 가며 배치된다. 상기 제1 윈도우 및 제2 윈도우에서 검사 대상 화소는 중심에 위치한 화소인 P5와 P33이 된다. The second window is composed of 25 pixels in which each pixel is represented by Pij (i, j is a natural number less than or equal to 5), and each row is alternately arranged with pixels of two colors. The inspection target pixels in the first window and the second window are P5 and P33 which are pixels located at the center.

이하, 본 발명의 작용 및 효과를 첨부된 도면을 의거하여 상세히 설명한다.Hereinafter, the operation and effects of the present invention will be described in detail with reference to the accompanying drawings.

도 2 내지 6을 참조하면, 본 발명의 불량 화소 판단 및 복원방법을 위해서는 먼저 이미지 센서를 이용하여 이미지를 촬상한다(S100). 이미지 센서의 각 화소는 피사체의 빛으로부터 해당 색상에 해당하는 신호 레벨을 갖는 전기신호를 생성한다. 상기 전기신호는 아날로그 신호로서, 이미지 프로세싱을 위하여 디지털 값으로 변환되며, 각 화소는 디지털로 변환된 신호 레벨을 가진다.2 to 6, in order to determine and restore a bad pixel of the present invention, an image is first picked up using an image sensor (S100). Each pixel of the image sensor generates an electrical signal having a signal level corresponding to the corresponding color from the light of the subject. The electrical signal is an analog signal, which is converted into a digital value for image processing, and each pixel has a digitally converted signal level.

각 화소가 이미지에 대한 신호 레벨을 가지게 되면, 검사 대상이 되는 화소를 중심으로 수평방향에 있는 복수 화소의 신호레벨을 비교하여 상기 검사 대상 화소가 전체 이미지의 에지 영역에 포함되는지 판단하고, 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우 상기 검사 대상 화소의 불량 여부를 판단하고, 불량으로 판단된 경우 상기 검사 대상 화소를 복원하는 제1 복원단계(S200)가 개시된다.When each pixel has a signal level with respect to the image, it is determined whether the inspection target pixel is included in an edge region of the entire image by comparing signal levels of a plurality of pixels in a horizontal direction with respect to the pixel to be inspected. When the target pixel is not included in the edge area, the first restoration step (S200) of determining whether the inspection target pixel is defective or restoring the inspection target pixel when the determination is determined to be defective is started.

상기 제1 복원단계(S200)는 상기 검사 대상 화소를 중심에 포함하는 상기 모자이크 배열의 수평방향으로 연속 배치된 적어도 3개 이상의 화소로 이루어진 제1 윈도우를 형성하는 단계(S210), 상기 제1 윈도우에 포함된 화소 각각의 신호 레벨을 비교하여, 상기 검사 대상 화소가 이미지의 에지 영역에 포함되는지 여부를 판단하는 단계(S220), 상기 검사 대상 화소가 이미지의 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호레벨과, 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨을 비교하여 상기 검사 대상 화소가 불량 화소인지 판단하는 단 계(S230) 및 상기 검사 대상 화소가 불량 화소이면, 상기 검사 대상 화소의 신호 레벨을 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하여 상기 검사 대상 화소를 복원하는 단계(S240)를 포함한다.The first reconstructing step (S200) is a step of forming a first window including at least three or more pixels continuously arranged in a horizontal direction of the mosaic array including the inspection target pixel at the center (S210), and the first window. Determining whether the inspection target pixel is included in an edge region of the image by comparing a signal level of each pixel included in the operation (S220), and when the inspection target pixel is not included in an edge region of the image, the inspection It is determined whether the inspection target pixel is a bad pixel by comparing a signal level of a target pixel with a signal level of a pixel disposed closest to the inspection target pixel by detecting the same color as the inspection target pixel among the pixels of the first window. In step S230 and if the inspection target pixel is a bad pixel, the signal level of the inspection target pixel is determined among the pixels of the first window. And detecting the same color as the pixel to be inspected, and changing the signal to an average value of signal levels of a pixel disposed closest to the pixel to be inspected (S240).

제1 윈도우를 형성하는 단계(S210)에서, 모자이크 배열의 수평방향으로 연속적으로 배치된 적어도 3개 이상의 화소로 이루어지는 제1 윈도우를 형성한다. 검사 대상 화소는 상기 제1 윈도의 중심에 위치한 화소이다. 바람직하게는 제1 윈도우는 9개의 화소로 이루어진 것일 수 있다.In the step S210 of forming a first window, a first window including at least three or more pixels continuously arranged in a horizontal direction of a mosaic array is formed. The inspection target pixel is a pixel located at the center of the first window. Preferably, the first window may be composed of nine pixels.

불량 화소인지 판단하기 위하여는 먼저, 검사 대상 화소가 이미지의 에지 영역에 있는지 판단하여야 한다(S220). 검사 대상 화소가 상기 이미지의 에지 영역에 있다면 상기 검사 대상 화소의 신호레벨은 상기 검사 대상 화소의 좌측 또는 우측에 있는 화소의 신호 레벨 중 어느 하나와 비교적 많은 차이를 보이게 된다.In order to determine whether the pixel is a bad pixel, it is first determined whether the inspection target pixel is in an edge region of the image (S220). If the inspection target pixel is in an edge region of the image, the signal level of the inspection pixel is relatively different from any one of the signal levels of the pixel on the left or right side of the inspection pixel.

검사 대상 화소가 불량 화소인지는 상기 검사 대상 화소가 주변의 화소에 비하여 신호레벨 차이가 얼마나 나는지에 따라 판단하므로, 검사 대상 화소가 이미지의 에지 영역에 있는 경우에는 상기 검사 대상 화소가 정상 화소라 하더라도 신호 레벨이 주변의 화소의 신호 레벨과 차이가 커서 불량 화소로 판단될 수 있다.Whether the inspection target pixel is a bad pixel is determined by how much the signal level is different from the surrounding pixels. Therefore, even when the inspection target pixel is in an edge region of the image, the inspection pixel is a normal pixel. Since the signal level is different from the signal level of surrounding pixels, the signal level may be determined to be a bad pixel.

따라서, 제1차 복원단계(S200)는 검사 대상 화소가 이미지의 에지 영역에 포함되는 경우에는 불량 화소 판단 및 복원을 하지 않고, 이미지의 에지 영역에 포함 되지않는 경우에만 불량 화소 판단을 수행한다.Therefore, in the first reconstruction step S200, when the inspection target pixel is included in the edge area of the image, the bad pixel determination and reconstruction are not performed, and the bad pixel determination is performed only when it is not included in the edge area of the image.

검사 대상 화소가 이미지의 에지 영역에 포함되지 않는 경우에는 검사 대상 화소에 인접한 동일 색상을 가진 화소들은 비슷한 신호 레벨을 가진다. 따라서, 제1 윈도우에 포함된 화소 중 동일 색상을 검출하는 화소들의 신호레벨을 비교하는 것에 의하여 검사 대상 화소가 이미지의 에지 영역에 있는지 판단할 수 있다.When the inspection pixel is not included in the edge region of the image, pixels having the same color adjacent to the inspection pixel have a similar signal level. Therefore, by comparing the signal levels of the pixels detecting the same color among the pixels included in the first window, it may be determined whether the inspection target pixel is in an edge region of the image.

바람직하게는, 상기 제1 윈도우에 포함되는 화소 중, 동일한 색상을 검출하며 서로 근접한 화소의 신호 레벨 차들 각각이 기설정된 문턱값보다 작은 경우, 상기 검사 대상 화소는 이미지의 에지 영역에 포함되지 않는 것으로 판단하는 것일 수 있다.Preferably, the pixel to be inspected is not included in an edge region of the image when each of the pixels included in the first window detects the same color and each of signal level differences of pixels adjacent to each other is smaller than a preset threshold. It may be to judge.

예를 들어, |P2-P4|, |P1-P3|, |P6-P8|, |P7-P9| 및 ||P2-P4|-|P6-P8||(설명을 위하여 P1, P2, P3, P4, P5, P6, P7, P8 및 P9는 해당 화소의 신호 레벨을 표시한다)이 기설정된 문턱값보다 작은 경우 상기 검사 대상 화소 P5는 이미지 에지 영역에 포함되지 않는 것으로 판단하는 것일 수 있다.For example, | P2-P4 |, | P1-P3 |, | P6-P8 |, | P7-P9 | And || P2-P4 |-| P6-P8 || (P1, P2, P3, P4, P5, P6, P7, P8, and P9 indicate the signal level of the corresponding pixel for explanation). If smaller, the inspection target pixel P5 may be determined not to be included in the image edge region.

검사 대상 화소 P5가 불량 화소인 경우에 제1 윈도우의 화소 중 동일 색상을 검출하는 근접한 화소와는 차별화된 값을 가지므로 화소가 이미지 에지 영역에 포함되는 경우 상기 에지 영역에 포함되는지 여부의 판단에 영향을 미치므로 제외하여 계산한다. 상기 문턱값은 이미지 에지 영역을 판단하는 정밀도를 결정하는 설정값으로, 그 값이 낮을수록 정밀도가 높다. 이하, 본 발명의 이미지 센서의 불량 화 소 검출 및 복원 방법에 대한 설명에서 여러 가지 문턱값이 사용되며, 각 사용에 따른 문턱값은 서로 다른 값일 수 있다. 문턱값이 낮을수록 불량화소 검출의 정밀도는 높아지지만, 너무 낮은 경우에는 정상화소를 불량화소로 판단할 수 있으므로 최적의 결과를 얻을 수 있도록 적절히 설정된다.In the case where the inspection target pixel P5 is a bad pixel, a value different from a neighboring pixel that detects the same color among the pixels of the first window is different from that of the pixel when the pixel is included in the image edge region. Calculate it except because it affects. The threshold value is a setting value for determining the accuracy of determining the image edge area. The lower the value, the higher the precision. Hereinafter, various threshold values are used in the description of the method for detecting and restoring defective pixels of the image sensor of the present invention, and the threshold values according to each use may be different values. The lower the threshold value is, the higher the accuracy of detection of defective pixels is. However, if the threshold value is too low, the normal pixels can be determined as defective pixels, and are set appropriately so as to obtain an optimal result.

검사 대상 화소가 이미지 에지 영역에 포함되는 경우에는 상기 검사 대상 화소에 대한 제1 복원단계를 종료하고 다음 검사 대상 화소에 대한 제1 복원단계를 수행한다.When the inspection target pixel is included in the image edge region, the first restoration step of the inspection pixel is terminated and the first restoration step of the next inspection pixel is performed.

검사 대상 화소가 이미지 에지 영역에 포함되지 않는 경우에는 상기 검사 대상 화소가 불량 화소인지 판단한다(S230). If the inspection target pixel is not included in the image edge area, it is determined whether the inspection target pixel is a bad pixel (S230).

검사 대상 화소가 이미지 에지 영역에 포함되지 않는 경우에는 검사 대상 화소의 신호 레벨이 인접한 동일 색상의 화소와 신호 레벨이 비슷하므로, 상기 검사 대상 화소의 신호 레벨을 동일한 색상을 갖는 인접한 화소의 신호 레벨과 비교하는 것에 의하여 불량 화소 여부를 판단할 수 있다.If the pixel to be inspected is not included in the image edge area, the signal level of the pixel to be inspected is similar to that of a pixel of the same color adjacent thereto, so that the signal level of the pixel to be inspected is equal to the signal level of an adjacent pixel having the same color. By comparing, it is possible to determine whether or not the defective pixel.

상기 검사 대상 화소가 이미지의 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호레벨이 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우에 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다.When the pixel to be inspected is not included in an edge region of the image, a signal level of the pixel to be inspected detects the same color as the pixel to be inspected among the pixels of the first window and is disposed closest to the pixel to be inspected. When the threshold level is greater than or equal to a predetermined threshold value or less than or equal to a signal level of the pixel, the inspection target pixel may be determined as a bad pixel.

예를 들어, {P5 > P3 + 문턱값}이고 {P5 > P7 + 문턱값}이거나, {P5 + 문턱 값 < P3}이고 {P5 + 문턱값 < P7}이면 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다. {P5 > P3 + 문턱값}이고 {P5 > P7 + 문턱값}인 경우는 검사 대상 화소 P5가 주변 화소보다 신호 레벨이 과도하게 높은 불량화소인 것을 나타내며, {P5 + 문턱값 < P3}이고 {P5 + 문턱값 < P7}인 경우는 검사 대상 화소 P5가 주변 화소보다 신호 레벨이 과도하게 낮은 불량화소인 것을 나타낸다.For example, when {P5> P3 + threshold} and {P5> P7 + threshold} or {P5 + threshold <P3} and {P5 + threshold <P7}, the inspection target pixel is determined as a bad pixel. It may be. {P5> P3 + Threshold} and {P5> P7 + Threshold} indicate that the pixel P5 to be inspected is a bad pixel whose signal level is excessively higher than the surrounding pixels, and {P5 + threshold <P3} and { When P5 + threshold <P7}, it indicates that the inspection target pixel P5 is a bad pixel whose signal level is excessively lower than the surrounding pixels.

검사 대상 화소가 불량 화소로 판단되는 경우, 상기 검사 대상 화소를 복원한다(S240). 상기 검사 대상 화소의 신호 레벨을 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하는 것에 의하여 상기 불량 화소를 복원하는 것일 수 있다.If it is determined that the inspection target pixel is a bad pixel, the inspection target pixel is restored (S240). The defective pixel is detected by changing a signal level of the inspection target pixel to a mean value of a signal level of a pixel disposed closest to the inspection target pixel by detecting the same color as the inspection target pixel among the pixels of the first window. It may be to restore.

예를 들어, 상기 검사 대상 화소의 신호 레벨을 (P3+P7)/2로 변경하는 것일 수 있다. 화소 P1 및 P9는 검사 대상 화소 P5와 동일 색상을 가지는 화소이나, P5와 상대적으로 멀리 떨어져 복원시 이용하는 경우 복원의 정확도가 떨어지므로 인접한 화소 P3 및 P7의 신호 레벨 평균값으로 화소 P5의 신호레벨을 변경하는 것일 수 있다.For example, the signal level of the inspection target pixel may be changed to (P3 + P7) / 2. The pixels P1 and P9 have the same color as the pixel P5 to be inspected. However, when the pixels P1 and P9 are relatively far from P5 and restored, the restoration accuracy is inferior. Therefore, the signal level of the pixel P5 is changed to the average value of the signal levels of the adjacent pixels P3 and P7. It may be.

검사 대상 화소에 대한 제1 복원단계(S200)가 종료되면 다음 검사 대상 화소에 대한 제1 복원단계(S200)가 반복되고, 모든 화소에 대한 제1 복원단계가 완료되면 제2 복원단계(S300)가 개시된다.When the first restoration step S200 for the inspection target pixel ends, the first restoration step S200 for the next inspection pixel is repeated, and when the first restoration step for all the pixels is completed, the second restoration step S300. Is disclosed.

모자이크 배열의 수평 방향으로 불량 화소를 1차로 검출하여 복원한 다음, 제2 복원단계(S300)를 개시함으로써, 제2 복원단계가 보다 정확하게 불량 화소를 검출하고 복원할 수 있도록 한다.After the defective pixels are first detected and restored in the horizontal direction of the mosaic array, the second restoration step S300 is started, so that the second restoration step can more accurately detect and restore the defective pixels.

제2 복원단계(S300)는 검사 대상 화소를 중심으로 m×n 매트릭스 배열(m, n은 3 이상의 자연수)을 형성하는 복수의 화소로 이루어진 제2 윈도우를 형성하는 단계(S310)와, 상기 제2 윈도우에 포함된 화소 각각의 신호 레벨을 비교하여, 상기 검사 대상 화소가 이미지 에지 영역에 포함되는지 여부를 판단하는 단계(S320)와, 상기 검사 대상 화소가 이미지 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소가 불량 화소인지 판단하는 단계(S330) 및 상기 검사 대상 화소가 불량 화소이면, 상기 검사 대상 화소의 신호 레벨을 상기 검사 대상 화소와 인접한 화소의 신호 레벨을 이용하여 변경하여 불량 화소를 복원하는 단계(S340)를 포함한다.In the second reconstructing step (S300), forming a second window including a plurality of pixels forming an m × n matrix array (m, n is a natural number of 3 or more) around the inspection target pixel (S310); Comparing the signal levels of the pixels included in the two windows to determine whether the inspection target pixel is included in the image edge region (S320); and when the inspection target pixel is not included in the image edge region, In operation S330 of determining whether the pixel to be inspected is a bad pixel and when the pixel to be inspected is a bad pixel, the signal level of the pixel to be inspected is changed using the signal level of a pixel adjacent to the test pixel to restore the bad pixel. It includes a step (S340).

제2 윈도우를 형성하는 단계(S310)에서 m×n 매트릭스 배열(m, n은 3 이상의 자연수)을 형성하는 복수의 화소로 이루어진 제2 윈도우가 형성되며, 바람직하게는, 상기 매트릭스 배열은 동일한 수의 행과 열을 가지는 것일 수 있다. 또한, 3×3 매트릭스 배열은 포함되는 화소의 수가 작아 불량 화소 검출의 정확도가 떨어지고, 7×7 이상의 매트릭스 배열은 매트릭스 배열의 외곽에 위치한 화소가 검사 대상 화소와의 연관성이 떨어지므로 바람직하지 않다. 바람직하게는 제2 윈도우는 5×5 매트릭스 배열일 수 있다. 상기 매트릭스 배열의 중심에 위치한 화소가 검사 대상 화소이다.In the step S310 of forming a second window, a second window including a plurality of pixels forming an m × n matrix array (m, n is a natural number of 3 or more) is formed. Preferably, the matrix array is the same number. It may have rows and columns of. In addition, the 3x3 matrix array is not preferable because the number of pixels included is small, so that the accuracy of bad pixel detection is inferior, and the matrix array of 7x7 or more is not correlated with the inspection target pixel. Preferably the second window may be a 5 × 5 matrix arrangement. The pixel located at the center of the matrix array is the inspection target pixel.

제2 윈도우가 형성된 후, 검사 대상 화소가 이미지 에지 영역에 포함되는지 여부를 판단한다(S320). 제1 복원단계(S200)에서도 검사 대상 화소가 이미지 에지 영역에 포함되는지 여부를 판단하는 단계(S220)가 있으나, 제1 복원단계(S200)는 수평방향의 화소의 신호레벨을 비교하여 검사 대상 화소가 이미지 에지 영역에 포함되는지 판단하는 것으로, 수평방향 및 수직방향의 화소의 신호레벨을 비교하여 검사 대상 화소가 이미지 에지 영역에 포함되는지 판단하는 제2 복원단계(S300)에서와는 차별된다.After the second window is formed, it is determined whether the inspection target pixel is included in the image edge region (S320). In the first reconstruction step (S200), there is also a step (S220) of determining whether the inspection target pixel is included in the image edge area. However, the first reconstruction step (S200) compares the signal level of the pixel in the horizontal direction to the inspection target pixel. Is determined to be included in the image edge region, and is different from the second reconstruction step (S300) of determining whether the inspection target pixel is included in the image edge region by comparing signal levels of pixels in the horizontal and vertical directions.

이미지 에지 영역에 포함되는지 여부를 판단하는 단계(S320)는 상기 제2 윈도우의 수직방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수직 에지값, 상기 제2 윈도우의 수직방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 수직방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수직 에지값, 상기 제2 윈도우의 수평방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수평 에지값 및 상기 제2 윈도우의 수평방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 상기 제2 윈도우의 수평방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수평 에지값을 계산하는 단계; 및 상기 제1 수직 에지값, 제2 수직 에지값, 제1 수평 에지값 및 제2 수평 에지값이 기설정된 문턱값보다 작은 경우 상기 검사 대상 화소는 상기 에지 영역에 포함되지 않는 것으로 판단하는 단계를 포함한다.Determining whether the image is included in the image edge area (S320) includes a first vertical edge value, which is a sum of signal level differences between pixels for detecting two consecutive greens in the vertical direction of the second window, and the vertical of the second window. A second vertical edge value that is a sum of differences between signal levels of pixels detecting two successive reds in a direction and a signal level of pixels detecting two successive blues in a vertical direction, in a horizontal direction of the second window; The first horizontal edge value that is the sum of the signal level differences of the pixels for detecting two consecutive greens, and the difference between the signal levels of the pixels for detecting two consecutive reds in the horizontal direction of the second window and the horizontal of the second window. Calculating a second horizontal edge value that is a sum of differences of signal levels of pixels for detecting two consecutive blues in the direction; And determining that the inspection target pixel is not included in the edge area when the first vertical edge value, the second vertical edge value, the first horizontal edge value, and the second horizontal edge value are smaller than a preset threshold. Include.

예를 들어, 도 6b에서 검사대상이 되는 화소인 P33가 녹색을 검출하는 화소이면, 베이어 패턴에서 P11, P13, P15, P22, P24, P31, P35, P42, P44, P51, P53 및 P55가 녹색을 검출하는 화소가 된다. 또한, P12가 청색을 검출하는 화소이면, P14, P32, P34, P52 및 P54는 청색을 검출하는 화소가 되고, P21, P23, P25, P41, P43 및 P45는 적색을 검출하는 화소가 된다.For example, if P33, the pixel to be inspected in FIG. 6B, is a pixel for detecting green color, P11, P13, P15, P22, P24, P31, P35, P42, P44, P51, P53, and P55 are green in the Bayer pattern. To be a pixel for detecting. If P12 is a pixel that detects blue, P14, P32, P34, P52, and P54 become pixels that detect blue, and P21, P23, P25, P41, P43, and P45 become pixels that detect red.

제1 수직 에지값은 상기 제2 윈도우의 수직방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합이므로, 제1 수직 에지값 = |P11-P31| + |P31-P51| + |P22-P42| + |P24-P44| + |P15-P35| + |P35-P55|로 정의될 수 있으며,Since the first vertical edge value is the sum of the signal level differences of the pixels detecting two consecutive greens in the vertical direction of the second window, the first vertical edge value = | P11-P31 | + | P31-P51 | + | P22-P42 | + | P24-P44 | + | P15-P35 | + | P35-P55 |

제2 수직 에지값은 상기 제2 윈도우의 수직방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 수직방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합이므로, 제2 수직 에지값 = |P21-P41| + |P12-P32| + |P32-P52| + |P23-P43| + |P14-P34| + |P34-P54| + |P25-P45|로 정의될 수 있으며,Since the second vertical edge value is the sum of the differences between the signal levels of the pixels detecting two consecutive reds in the vertical direction of the second window and the differences in the signal levels of the pixels detecting two consecutive blues in the vertical direction, Second vertical edge value = | P21-P41 | + | P12-P32 | + | P32-P52 | + | P23-P43 | + | P14-P34 | + | P34-P54 | + | P25-P45 |

제1 수평 에지값은 상기 제2 윈도우의 수평방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합이므로, 제1 수평 에지값 = |P11-P13| + |P13-P15| + |P22-P24| + |P42-P44| + |P51-P53| + |P53-P55|로 정의될 수 있으며,Since the first horizontal edge value is the sum of the signal level differences of the pixels detecting two consecutive greens in the horizontal direction of the second window, the first horizontal edge value = | P11-P13 | + | P13-P15 | + | P22-P24 | + | P42-P44 | + | P51-P53 | + | P53-P55 |

제2 수평 에지값은 상기 제2 윈도우의 수평방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 상기 제2 윈도우의 수평방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합이므로, 제2 수평 에지값 = |P12- P14| + |P21-P23| + |P23-P25| + |P32-P34| + |P41-P43| + |P43-P45| + |P52-P54|로 정의될 수 있다.The second horizontal edge value is the difference between the signal levels of the pixels detecting two red consecutive in the horizontal direction of the second window and the signal levels of the pixels detecting two blue consecutive in the horizontal direction of the second window. Is the sum of the differences, so the second horizontal edge value = | P12-P14 | + | P21-P23 | + | P23-P25 | + | P32-P34 | + | P41-P43 | + | P43-P45 | + | P52-P54 |.

제1 수직 에지값, 제2 수직 에지값, 제1 수평 에지값 및 제2 수평 에지값이 기설정된 문턱값보다 작은 경우는 인접한 화소간의 신호레벨 차가 작다는 것을 나타내므로 제2 윈도우의 중심에 위치한 검사 대상 화소 P33는 이미지 에지 영역에 포함되지 않는 것으로 판단할 수 있다.If the first vertical edge value, the second vertical edge value, the first horizontal edge value, and the second horizontal edge value are smaller than the preset threshold value, the difference in signal level between adjacent pixels is small. The inspection target pixel P33 may be determined not to be included in the image edge area.

검사 대상 화소가 이미지 에지 영역에 포함되지 않는 경우에는 상기 검사 대상 화소가 불량 화소인지 판단한다(S330).If the inspection target pixel is not included in the image edge area, it is determined whether the inspection target pixel is a bad pixel (S330).

이미지 에지 영역에 포함되지 않는 화소는 근접하고 동일 색상을 검출하는 화소와 신호레벨이 비슷하므로, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우에 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다Since the pixels not included in the image edge region are close and have a similar signal level to the pixels detecting the same color, the signal level of the inspected pixel detects the same color as the inspected pixel among the pixels of the second window. The inspection target pixel may be determined to be a bad pixel when the threshold value is greater than or equal to the average value of the signal level of the pixel disposed closest to the inspection pixel or less than or equal to the predetermined threshold value.

예를 들어, 도 6b에서 상기 검사 대상 화소 P33이 녹색을 검출하는 화소인 경우 상기 검사 대상 화소와 가장 근접한 녹색을 검출하는 화소는 P13, P31, P35 및 P53이며, 이들의 신호레벨을 P33의 신호레벨과 비교하여 불량 화소 여부를 판단할 수 있다.For example, in FIG. 6B, when the inspection target pixel P33 is a pixel for detecting green, the pixels for detecting green closest to the inspection pixel are P13, P31, P35, and P53, and the signal level thereof is a signal of P33. It may be determined whether or not the defective pixel is compared with the level.

즉, {P33 > (P13 + P31 + P35 + P53)/4 + 문턱값} 또는 {P33 + 문턱값 < (P13 + P31 + P35 + P53)/4 + 문턱값}인 경우 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다. {P33 > (P13 + P31 + P35 + P53)/4 + 문턱값}은 검사 대상 화소 P33이 주변 화소에 비하여 과도하게 신호레벨이 높은 불량 화소인 것을 나타내며, {P33 + 문턱값 < (P13 + P31 + P35 + P53)/4 + 문턱값}는 검사 대상 화소 P33이 주변화소에 비하여 과도하게 신호레벨이 낮은 불량 화소인 것을 나타낸다.That is, when {P33> (P13 + P31 + P35 + P53) / 4 + threshold} or {P33 + threshold <(P13 + P31 + P35 + P53) / 4 + threshold}, the pixel to be inspected is defective. It may be determined as a pixel. {P33> (P13 + P31 + P35 + P53) / 4 + Threshold} indicates that the pixel P33 to be inspected is a bad pixel whose signal level is excessively higher than that of the surrounding pixels, and {P33 + Threshold <(P13 + P31 + P35 + P53) / 4 + threshold} indicates that the inspection target pixel P33 is a bad pixel having an excessively low signal level compared to the surrounding pixels.

검사 대상 화소가 불량 화소로 판단된 경우 상기 검사 대상 화소를 복원한다(S340). 검사 대상 화소가 불량 화소이면, 상기 검사 대상 화소의 신호 레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하여 상기 검사 대상 화소를 복원하는 것일 수 있다.If the inspection target pixel is determined to be a bad pixel, the inspection target pixel is restored (S340). If the pixel to be inspected is a bad pixel, the signal level of the pixel to be inspected is the average value of the signal level of the pixel disposed closest to the pixel to be detected by detecting the same color as the pixel to be inspected among the pixels of the second window. It may change to restore the inspection target pixel.

예를 들어, 화소 P13, P31, P35 및 P53이 상기 검사 대상 화소 P33와 동일한 색상을 검출하는 가장 근접한 화소이므로, 상기 검사 대상 화소의 신호레벨을 화소 P13, P31, P35 및 P53의 신호레벨의 평균값인 (P13 + P31 + P35 + P53)/4로 변경하는 것일 수 있다.For example, since the pixels P13, P31, P35, and P53 are the closest pixels that detect the same color as the inspection target pixel P33, the signal level of the inspection target pixel is the average value of the signal levels of the pixels P13, P31, P35, and P53. It may be changed to (P13 + P31 + P35 + P53) / 4.

검사 대상 화소가 이미지 에지 영역에 포함되는 경우, 상기 검사 대상 화소가 포함되는 전체 이미지에서 위치한 영역의 형식은 수평 에지, 수직 에지 또는 대각선 에지 중 어느 하나이다. 따라서, 상기 검사 대상 화소가 이미지 에지 영역에 포함되는 경우에는, 상기 검사 대상 화소가 수평 에지 영역, 수직 에지 영역 또는 대각선 에지 영역 중 어느 이미지 형식에 포함되는지 판단하고(S500), 각 이미지 형식에 따라 불량 화소인지 판단하고 복원한다(S510 - S560).When the inspection target pixel is included in the image edge region, the format of the region located in the entire image including the inspection pixel is any one of a horizontal edge, a vertical edge, or a diagonal edge. Therefore, when the inspection target pixel is included in the image edge region, it is determined whether the inspection target pixel is included in a horizontal edge region, a vertical edge region, or a diagonal edge region (S500), and according to each image format. It determines whether it is a bad pixel and restores it (S510-S560).

예를 들어, {제1 수직 에지값 > 제1 수평 에지값 + 문턱값}이고, {제2 수직 에지값 > 제2 수평 에지값 + 문턱값}이면, 상기 검사 대상 화소는 수평 에지 영역에 포함되는 것으로 판단하는 것일 수 있다.For example, when {first vertical edge value> first horizontal edge value + threshold value} and {second vertical edge value> second horizontal edge value + threshold value}, the inspection target pixel is included in the horizontal edge area. May be judged to be.

또한, {제1 수평 에지값 < 제1 수직 에지값 + 문턱값}이거나, {제2 수평 에지값 > 제2 수직 에지값 + 문턱값}이면, 상기 검사 대상 화소는 수직 에지 영역에 포함되는 것으로 판단하는 것일 수 있다.Further, when the {first horizontal edge value <first vertical edge value + threshold value} or {second horizontal edge value> second vertical edge value + threshold value}, the inspection target pixel is included in the vertical edge area. It may be to judge.

상기 검사 대상 화소가 수평 에지 영역, 수직 에지 영역에 있지 않으면, 대각선 에지 영역에 포함되는 것으로 판단할 수 있다.If the inspection target pixel is not in the horizontal edge region or the vertical edge region, it may be determined that the pixel to be inspected is included in the diagonal edge region.

상기 검사 대상 화소가 수평 에지 영역에 있는 것으로 판단되면, 상기 검사 대상 화소의 신호레벨과 상기 검사 대상 화소와 수평 방향으로 가장 근접한 동일 색상을 검출하는 화소의 신호 레벨을 비교하여 불량 화소인지 판단한다(S510).If it is determined that the inspection target pixel is in a horizontal edge area, it is determined whether the inspection pixel is a bad pixel by comparing the signal level of the inspection pixel with a signal level of a pixel detecting the same color closest to the inspection pixel in a horizontal direction ( S510).

상기 검사 대상 화소가 수평 에지 영역에 있는 것으로 판단되면, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수평방향으로 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단한다.If it is determined that the inspection target pixel is in a horizontal edge region, the signal level of the inspection target pixel detects the same color as the inspection target pixel among the pixels of the second window and is closest to the horizontal direction of the inspection target pixel. If the threshold level is greater than or equal to a predetermined threshold value or less than or equal to a predetermined signal level, the inspection target pixel is determined to be a bad pixel.

화소가 수평 에지 영역에 있는 경우 수직 방향의 동일한 색상을 검출하는 화소는 상기 검사 대상 화소의 신호레벨과 많은 차이가 나고, 상기 검사 대상 화소가 불량 화소가 아님에도 불량 화소로 판단될 수 있으므로 수평 방향의 동일한 색상을 검출하는 화소의 신호 레벨과 비교하여 불량 화소 여부를 판단한다.When the pixel is in the horizontal edge area, the pixel detecting the same color in the vertical direction is much different from the signal level of the pixel to be inspected, and even though the pixel to be inspected is not a bad pixel, the pixel may be determined as a bad pixel. It is determined whether or not the defective pixel is compared with the signal level of the pixel for detecting the same color.

따라서, 상기 검사 대상 화소가 이미지의 수평 에지 영역에 포함되는 경우, 상기 검사 대상 화소의 신호레벨이 상기 검사 대상 화소와 수평 방향으로 근접하고 상기 검사 대상 화소와 동일 색상을 검출하는 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다.Therefore, when the inspection target pixel is included in the horizontal edge region of the image, the signal level of the inspection target pixel is closer to the inspection pixel in the horizontal direction and is higher than the signal level of the pixel detecting the same color as the inspection target pixel. If the threshold value is greater than or equal to the preset threshold or less than the preset threshold, the inspection target pixel may be determined as a bad pixel.

예를 들어, 검사 대상 화소 P33와 동일 색상을 검출하고 P33와 수평방향으로 가장 근접한 화소는 P31과 P35이므로, {P33 > P31 + 문턱값}이고 {P33 > P35 + 문턱값}이거나, {P33 + 문턱값 < P31}이고 {P33 + 문턱값 < P35}인 경우, 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다.For example, the pixels that detect the same color as the inspection target pixel P33 and are closest to P33 in the horizontal direction are P31 and P35, so {P33> P31 + threshold} and {P33> P35 + threshold}, or {P33 + When the threshold value <P31} and {P33 + threshold value <P35}, it may be determined that the inspection target pixel is a bad pixel.

{P33 > P31 + 문턱값}이고 {P33 > P35 + 문턱값}인 경우는 검사 대상 화소 P33이 주위의 화소에 비하여 신호 레벨이 높은 불량 화소인 것을 나타내며, {P33 + 문턱값 < P31}이고 {P33 + 문턱값 < P35}인 경우, 검사 대상 화소 P33이 주위의 화소에 비하여 신호 레벨이 낮은 불량 화소인 것을 나타낸다.{P33> P31 + threshold} and {P33> P35 + threshold} indicate that the pixel P33 to be inspected is a bad pixel having a higher signal level than the surrounding pixels, and {P33 + threshold <P31} and { When P33 + threshold <P35}, it indicates that the inspection target pixel P33 is a bad pixel having a lower signal level than the surrounding pixels.

상기 검사 대상 화소가 불량 화소로 판단되는 경우, 상기 검사 대상 화소를 복원한다(S520). 상기 검사 대상 화소의 신호레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수평방향으로 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하여 상기 검사 대상 화소를 복원하는 것일 수 있다.If it is determined that the inspection target pixel is a bad pixel, the inspection target pixel is restored (S520). The signal level of the inspection target pixel is detected by detecting the same color as the inspection target pixel among the pixels of the second window, and changing the signal level to an average value of the signal levels of the pixel disposed closest to the horizontal direction of the inspection target pixel. It may be to restore the pixel.

예를 들어, 상기 검사 대상 화소의 신호 레벨을 (P31 + P35)/2로 변경하는 것일 수 있다. 이와 같이, 불량 화소의 복원시 불량 화소가 수평 에지 영역에 있는 경우에는 수직방향으로 인접한 화소의 신호 레벨을 배제함으로써, 더욱 정확한 복원을 할 수 있다.For example, the signal level of the inspection target pixel may be changed to (P31 + P35) / 2. As described above, when the bad pixel is in the horizontal edge region at the time of restoring the bad pixel, the signal level of the adjacent pixel in the vertical direction is excluded, thereby making it possible to more accurately recover.

상기 검사 대상 화소가 수직 에지 영역에 있는 것으로 판단되면, 상기 검사 대상 화소의 신호레벨과 상기 검사 대상 화소와 수직 방향으로 가장 근접한 동일 색상을 검출하는 화소의 신호 레벨을 비교하여 불량 화소인지 판단한다(S530). If it is determined that the inspection target pixel is in a vertical edge area, it is determined whether the inspection pixel is a bad pixel by comparing the signal level of the inspection target pixel with the signal level of a pixel that detects the same color closest to the inspection pixel in a vertical direction ( S530).

상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수직방향으로 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다.The determining of whether the pixel is a bad pixel, the signal level of the pixel to be detected is the same color as the pixel to be inspected among the pixels of the second window and the signal of the pixel disposed closest to the vertical direction of the pixel to be inspected When the threshold value is greater than or equal to the predetermined threshold value or less than the predetermined threshold value, the inspection target pixel may be determined as a bad pixel.

화소가 수직 에지 영역에 있는 경우 수평 방향의 동일한 색상을 검출하는 화소는 상기 검사 대상 화소의 신호레벨과 많은 차이가 나고, 상기 검사 대상 화소가 불량 화소가 아님에도 불량 화소로 판단될 수 있으므로 수직 방향의 동일한 색상을 검출하는 화소의 신호 레벨과 비교하여 불량 화소 여부를 판단한다.When the pixel is in the vertical edge area, the pixel detecting the same color in the horizontal direction is different from the signal level of the pixel to be inspected, and even though the pixel to be inspected is not a bad pixel, the pixel may be determined as a bad pixel. It is determined whether or not the defective pixel is compared with the signal level of the pixel for detecting the same color.

따라서, 상기 검사 대상 화소가 이미지의 수직 에지 영역에 포함되는 경우, 상기 검사 대상 화소의 신호레벨이 상기 검사 대상 화소와 수직 방향으로 근접하고 상기 검사 대상 화소와 동일 색상을 검출하는 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다.Therefore, when the inspection target pixel is included in the vertical edge area of the image, the signal level of the inspection target pixel is closer to the inspection pixel in the vertical direction and is higher than the signal level of the pixel detecting the same color as the inspection target pixel. If the threshold value is greater than or equal to the preset threshold or less than the preset threshold, the inspection target pixel may be determined as a bad pixel.

예를 들어, 검사 대상 화소 P33와 동일 색상을 검출하고 P33와 수직방향으로 가장 근접한 화소는 P13과 P53이므로,{P33 > P13 + 문턱값}이고 {P33 > P53 + 문턱값}이거나, {P33 + 문턱값 < P13}이고 {P33 + 문턱값 < P53}인 경우, 상기 검사 대상 화소를 불량 화소로 판단하는 것일 수 있다.For example, the pixels that detect the same color as the inspection target pixel P33 and are closest to P33 in the vertical direction are P13 and P53, so {P33> P13 + threshold} and {P33> P53 + threshold}, or {P33 + When the threshold value <P13} and {P33 + threshold value <P53}, the inspection target pixel may be determined as a bad pixel.

{P33 > P13 + 문턱값}이고 {P33 > P53 + 문턱값}인 경우는 검사 대상 화소 P33이 주위의 화소에 비하여 신호 레벨이 높은 불량화소인 것을 나타내며, {P33 + 문턱값 < P13}이고 {P33 + 문턱값 < P53}인 경우, 화소 P33이 주위의 화소에 비하여 신호 레벨이 낮은 불량화소인 것을 나타낸다.{P33> P13 + Threshold} and {P33> P53 + Threshold} indicate that the pixel P33 to be inspected is a bad pixel having a higher signal level than the surrounding pixels, and {P33 + threshold <P13} and { P33 + threshold <P53} indicates that the pixel P33 is a defective pixel having a lower signal level than the surrounding pixels.

상기 검사 대상 화소가 불량 화소로 판단되는 경우, 상기 검사 대상 화소를 복원한다(S540). 상기 검사 대상 화소의 신호레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수직방향으로 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하여 상기 검사 대상 화소를 복원하는 것일 수 있다. 예를 들어, 상기 검사 대상 화소의 신호 레벨을 (P13 + P53)/2로 변경하는 것일 수 있다. 이와 같이, 불량 화소의 복원시 불량 화소가 수직 에지 영역에 있는 경우에는 수평방향으로 인접한 화소의 신호 레벨을 배제함 으로써, 더욱 정확한 복원을 할 수 있다.If it is determined that the inspection target pixel is a bad pixel, the inspection target pixel is restored (S540). The signal level of the inspection target pixel is detected by detecting the same color as the inspection pixel among the pixels of the second window, and changing the signal level to an average value of the signal levels of the pixel disposed closest to the vertical direction of the inspection pixel. It may be to restore the pixel. For example, the signal level of the inspection target pixel may be changed to (P13 + P53) / 2. As described above, when the bad pixel is in the vertical edge region at the time of restoring the bad pixel, the signal level of the adjacent pixel in the horizontal direction is excluded, thereby more accurately restoring.

상기 검사 대상 화소가 대각선 에지 영역에 있는 것으로 판단되면, 상기 검사 대상 화소의 신호레벨과 상기 검사 대상 화소와 둘러싸는 화소의 신호 레벨을 비교하여 불량 화소인지 판단한다(S550).When it is determined that the inspection target pixel is in the diagonal edge region, it is determined whether the inspection pixel is a bad pixel by comparing the signal level of the inspection target pixel with the signal level of the surrounding pixel.

상기 제2 윈도우의 화소 중 상기 검사 대상 화소를 둘러싸고 상기 검사대상 화소와 동일 색상을 검출하는 화소의 평균값과, 상기 검사 대상 화소를 둘러싸고 상기 검사대상 화소와 다른 색상을 검출하는 화소의 평균값을 상기 검사 대상 화소의 신호레벨과 비교하여 상기 검사 대상화소가 불량 화소인지 판단할 수 있다.The average value of the pixels surrounding the inspection target pixel and detecting the same color as the inspection target pixel among the pixels of the second window, and the average value of the pixels surrounding the inspection target pixel and detecting a color different from the inspection target pixel. It may be determined whether the inspection target pixel is a bad pixel compared with the signal level of the target pixel.

예를 들어, 상기 검사 대상 화소를 둘러싸고 상기 검사대상 화소와 동일 색상을 검출하는 화소의 평균값을 제1 평균이라 정의하면, 제1 평균 = (P22 + P24 + P42 + P44)/4가 되고, 상기 검사 대상 화소를 둘러싸고 상기 검사대상 화소와 다른 색상을 검출하는 화소의 평균값을 제 2 평균이라 정의하면, 제2 평균 = (P23 + P32 + P34 + P43)/4이 된다. {P33 > 제1 평균 + 문턱값}이고 {P33 > 제2 평균 + 문턱값}이거나, {P33 + 문턱값 < 제1 평균}이고 {P33 + 문턱값 < 제2 평균}인 경우, 상기 검사 대상 화소 P33을 불량 화소로 판단하는 것일 수 있다.For example, when an average value of pixels surrounding the inspection target pixel and detecting the same color as the inspection target pixel is defined as a first average, a first average = (P22 + P24 + P42 + P44) / 4, and If the average value of pixels surrounding the inspection target pixel and detecting a color different from the inspection target pixel is defined as a second average, the second average = (P23 + P32 + P34 + P43) / 4. The test subject when {P33> first average + threshold} and {P33> second average + threshold}, or {P33 + threshold <first average} and {P33 + threshold <second average}. The pixel P33 may be determined to be a bad pixel.

{P33 > 제1 평균 + 문턱값}이고 {P33 > 제2 평균 + 문턱값}인 경우는 검사 대상 화소 P33이 주위의 화소에 신호레벨이 과도하게 높은 불량화소인 것을 나타내며, {P33 + 문턱값 < 제1 평균}이고 {P33 + 문턱값 < 제2 평균}인 경우는 화소 P33 이 주위의 화소에 신호레벨이 과도하게 낮은 불량화소인 것을 나타낸다.When {P33> first average + threshold} and {P33> second average + threshold}, it indicates that the pixel P33 to be inspected is a bad pixel whose signal level is excessively high in surrounding pixels, and {P33 + threshold <1st average} and {P33 + threshold <2nd average} indicate that the pixel P33 is a defective pixel whose signal level is excessively low in the surrounding pixels.

또한, 상기 제1 평균, 제2 평균은 각각 제1 평균 = MEDIAN(P22, P24, P42, P44), 제2 평균 = MEDIAN(P23, P32, P34, P43)로 정의될 수 있다.In addition, the first average and the second average may be defined as first average = MEDIAN (P22, P24, P42, P44) and second average = MEDIAN (P23, P32, P34, P43), respectively.

상기 검사 대상 화소가 불량 화소로 판단되는 경우, 상기 검사 대상 화소를 복원한다(S560). 상기 검사 대상 화소의 신호레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일 색상을 검출하고 상기 검사 대상 화소를 둘러싸는 화소의 신호 레벨의 평균값으로 변경하는 상기 검사 대상 화소를 복원하는 것일 수 있다. 예를 들어, 상기 검사 대상 화소의 신호 레벨을 상기 제1 평균으로 변경하는 것일 수 있다.If it is determined that the inspection target pixel is a bad pixel, the inspection target pixel is restored (S560). Restoring the inspection target pixel that detects the same color as the inspection target pixel among the pixels in the second window and changes the signal level of the inspection target pixel to an average value of the signal levels of the pixel surrounding the inspection target pixel. have. For example, the signal level of the inspection target pixel may be changed to the first average.

상기 각 경우에 있어서 불량 화소의 검출 및 복원이 종료되는 경우, 다음 화소에 대한 제2 복원(S300)이 개시되며, 모든 화소에 대한 제2 복원(S300)이 종료되면, 이미지 센서의 불량 화소 검출 및 복원이 종료된다.In each of the above cases, when the detection and restoration of the bad pixels are finished, the second restoration S300 for the next pixel is started, and when the second restoration S300 for all the pixels is finished, the detection of the bad pixels in the image sensor is completed. And restoration ends.

이와 같이, 수평 방향의 화소 배열에서 제1 복원을 하고, 다시 매트릭스 형태의 배열에서 화소를 제2 복원하는 방법에 의하여 이미지 센서에서의 불량 화소를 보다 효과적이고 정확도가 높게 판별하고 복원할 수 있다.As described above, the defective pixels in the image sensor may be more effectively and accurately determined and restored by performing a first restoration in the horizontal pixel array and a second restoration of the pixels in the matrix array.

본 발명은 상술한 실시형태 및 첨부된 도면에 의해 한정되는 것이 아니며, 첨부된 청구범위에 의해 한정된다. 따라서, 청구범위에 기재된 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 다양한 형태의 치환, 변형 및 변경이 가능하다는 것은 당 기술분야의 통상의 지식을 가진 자에게는 자명할 것이며, 이 또한 첨부된 청구범위에 기재된 기술적 사상에 속한다 할 것이다.The present invention is not limited by the above-described embodiment and the accompanying drawings, but by the appended claims. Therefore, it will be apparent to those skilled in the art that various forms of substitution, modification, and alteration are possible without departing from the technical spirit of the present invention described in the claims, and the appended claims. Will belong to the technical spirit described in.

상술한 바와 같이, 본 발명에 따르면, 이미지 센서의 불량 화소를 검출하고 복원함으로써, 이미지 센서의 수율을 높이고, 촬상된 이미지의 화질을 개선하는 효과가 있다. 또한, 수평방향의 연속된 화소로부터 불량 화소를 검출하고 복원한 후, 매트릭스 형태로 배열된 화소로부터 불량 화소를 검출하고 복원함으로써, 불량 화소의 검출 및 복원의 정확도를 높일 수 있다.As described above, according to the present invention, by detecting and restoring the defective pixel of the image sensor, there is an effect of increasing the yield of the image sensor and improving the image quality of the captured image. In addition, by detecting and restoring the bad pixels from the horizontal pixels in a continuous direction, detecting and restoring the bad pixels from the pixels arranged in a matrix form, it is possible to increase the accuracy of detecting and restoring the bad pixels.

Claims (12)

적색, 녹색 및 청색을 각각 검출하는 복수의 화소가 베이어 패턴의 모자이크 배열로 배치된 이미지 센서에서, 상기 각 화소별로 불량 화소를 검출하고 복원하는 방법에 있어서,In an image sensor in which a plurality of pixels respectively detecting red, green, and blue are arranged in a mosaic pattern of a Bayer pattern, a method of detecting and restoring a bad pixel for each pixel, 검사 대상이 되는 화소를 중심으로 수평방향에 있는 복수 화소의 신호레벨을 비교하여 상기 검사 대상 화소가 전체 이미지의 에지 영역에 포함되는지 판단하고, 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우 상기 검사 대상 화소의 불량 여부를 판단하고, 불량으로 판단된 경우 상기 검사 대상 화소를 복원하는 제1 복원단계; 및It is determined whether the inspection target pixel is included in an edge region of the entire image by comparing signal levels of a plurality of pixels in a horizontal direction with respect to the pixel to be inspected, and when the inspection target pixel is not included in the edge region, A first restoring step of determining whether the inspection target pixel is defective and restoring the inspection target pixel when it is determined to be defective; And 상기 복수의 화소 전체에 대하여 상기 제1 복원단계가 완료된 후, 검사 대상 화소를 중심으로 m×n 매트릭스 배열(m, n은 3 이상의 자연수)을 형성하는 복수 화소의 신호레벨을 비교하여 상기 검사 대상 화소가 전체 이미지의 에지 영역에 포함되는지 판단하고, 상기 검사 대상 화소가 에지 영역에 포함되지 않는 경우 상기 매트릭스 배열 내에 동일한 색상을 검출한 화소의 신호레벨을 이용하여 상기 검사 대상 화소가 불량 화소인지 판단하고 복원하며, 상기 검사 대상 화소가 에지 영역에 포함된 경우 상기 검사 대상 화소가 포함된 에지의 방향성에 따라 상기 검사 대상 화소가 불량 화소인지 판단하고 복원하는 제2 복원단계After the first reconstruction step is completed for all of the plurality of pixels, the inspection target is compared by comparing signal levels of a plurality of pixels forming an m × n matrix array (m, n is a natural number of 3 or more) centering on the inspection target pixel. It is determined whether the pixel is included in the edge region of the entire image. When the pixel to be inspected is not included in the edge region, the pixel to be inspected is determined to be a bad pixel using the signal level of a pixel that detects the same color in the matrix array. A second restoration step of determining and restoring whether or not the inspection target pixel is a bad pixel according to a direction of an edge including the inspection target pixel when the inspection target pixel is included in an edge region; 를 포함하는 이미지 센서의 불량 화소 판단 및 복원방법.Bad pixel determination and restoration method of the image sensor comprising a. 제1항에 있어서,The method of claim 1, 상기 제1 복원 단계는,The first restoration step, 상기 검사 대상 화소를 중심에 포함하는 상기 모자이크 배열의 수평방향으로 연속 배치된 적어도 3개 이상의 화소로 이루어진 제1 윈도우를 형성하는 단계;Forming a first window including at least three pixels continuously arranged in a horizontal direction of the mosaic array including the inspection target pixel at a center thereof; 상기 제1 윈도우에 포함된 복수 화소의 신호 레벨을 비교하여, 상기 검사 대상 화소가 이미지의 에지 영역에 포함되는지 여부를 판단하는 단계;Comparing signal levels of the plurality of pixels included in the first window to determine whether the inspection target pixel is included in an edge region of an image; 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호레벨과, 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨을 비교하여 상기 검사 대상 화소가 불량 화소인지 판단하는 단계; 및When the inspection target pixel is not included in the edge area, the signal level of the inspection target pixel and the same color as the inspection target pixel among the pixels of the first window are detected and disposed closest to the inspection target pixel. Comparing the signal levels of the pixels to determine whether the inspection target pixel is a bad pixel; And 상기 검사 대상 화소가 불량 화소이면, 상기 검사 대상 화소의 신호 레벨을 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하여 상기 검사 대상 화소를 복원하는 단계If the pixel to be inspected is a bad pixel, the signal level of the pixel to be detected is the same value as that of the pixel to be inspected among the pixels of the first window, and an average value of the signal levels of a pixel disposed closest to the pixel to be inspected. Restoring the inspection target pixel by changing to 를 포함하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.Defective pixel detection and restoration method of the image sensor comprising a. 제2항에 있어서,The method of claim 2, 상기 이미지의 에지 영역에 포함되는지 여부를 판단하는 단계는,Determining whether it is included in the edge region of the image, 상기 제1 윈도우에 포함되는 화소 중, 서로 동일한 색상을 검출하며 서로 근접한 화소의 신호 레벨 차들 각각이 기설정된 문턱값보다 작은 경우, 상기 검사 대상 화소는 이미지의 에지 영역에 포함되지 않는 것으로 판단하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.When the same color is detected among the pixels included in the first window and each of signal level differences between pixels adjacent to each other is smaller than a preset threshold, it is determined that the inspected pixel is not included in an edge region of the image. A method for detecting and restoring defective pixels of an image sensor 제2항에 있어서, 상기 불량 화소인지 판단하는 단계는,The method of claim 2, wherein the determining of whether the pixel is defective is performed by: 상기 검사 대상 화소가 이미지의 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호레벨이 상기 제1 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우에 상기 검사 대상 화소를 불량 화소로 판단하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.When the pixel to be inspected is not included in an edge region of the image, a signal level of the pixel to be inspected detects the same color as the pixel to be inspected among the pixels of the first window and is disposed closest to the pixel to be inspected. And determining the inspection target pixel as a bad pixel when the signal level of the pixel is greater than or equal to a predetermined threshold value or less than a predetermined threshold value. 제1항에 있어서, 상기 제2 복원단계는,The method of claim 1, wherein the second restoration step, 상기 검사 대상 화소를 중심으로하는 m×n 매트릭스 배열(m, n은 3 이상의 자연수)을 형성하는 복수의 화소로 이루어진 제2 윈도우를 형성하는 단계;Forming a second window including a plurality of pixels forming an m × n matrix array (m, n is a natural number of 3 or more) centering on the inspection target pixel; 상기 제2 윈도우에 포함된 화소 각각의 신호 레벨을 비교하여, 상기 검사 대상 화소가 이미지의 에지 영역에 포함되는지 여부를 판단하는 단계;Comparing signal levels of each pixel included in the second window to determine whether the inspection target pixel is included in an edge region of an image; 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호 레벨과, 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소를 중심으로 수직 및 수평방향으로 가장 근접하여 배치된 화소의 신호 레벨을 비교하여 상기 검사 대상 화소가 불량 화소인지 판단하는 단계; 및When the inspection target pixel is not included in the edge area, the signal level of the inspection target pixel and the same color as the inspection target pixel among the pixels of the second window are detected, and are vertically and horizontally centered about the inspection target pixel. Comparing signal levels of pixels arranged closest to each other in a direction to determine whether the inspection target pixel is a bad pixel; And 상기 검사 대상 화소가 불량 화소이면, 상기 검사 대상 화소의 신호 레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소를 중심으로 수직 및 수평방향으로 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하여 상기 검사 대상 화소를 복원하는 단계If the inspected pixel is a bad pixel, the signal level of the inspected pixel is detected in the same color as the inspected pixel among the pixels of the second window, and is disposed closest to the inspected pixel in the vertical and horizontal directions. Restoring the inspection target pixel by changing to an average value of the signal levels of the pixels. 를 포함하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.Defective pixel detection and restoration method of the image sensor comprising a. 제5항에 있어서, 상기 에지 영역에 포함되는지 여부를 판단하는 단계는,The method of claim 5, wherein the determining of whether the edge region is included in the edge region comprises: 상기 제2 윈도우의 수직방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수직 에지값, 상기 제2 윈도우의 수직방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 수직방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수직 에지값, 상기 제2 윈도우의 수평방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수평 에지값 및 상기 제2 윈도우의 수평방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 상기 제2 윈도우의 수평방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수평 에지값을 계산하는 단계; 및The first vertical edge value which is the sum of the signal level differences of the pixels detecting two green consecutive in the vertical direction of the second window, and the signal level of the pixel detecting the two red continuous in the vertical direction of the second window. A second vertical edge value that is the sum of the differences between signal levels of the pixels detecting two blue colors that are continuous in the vertical direction, and a sum of the signal level differences of pixels that detect two green colors continuous in the horizontal direction of the second window; The difference between the signal level of the pixel detecting the first horizontal edge value and two red consecutive in the horizontal direction of the second window and the signal level of the pixel detecting the two blue continuous in the horizontal direction of the second window. Calculating a second horizontal edge value that is the sum of the differences; And 상기 제1 수직 에지값, 제2 수직 에지값, 제1 수평 에지값 및 제2 수평 에지값이 기설정된 문턱값보다 작은 경우 상기 검사 대상 화소는 상기 에지 영역에 포함되지 않는 것으로 판단하는 단계Determining that the inspection target pixel is not included in the edge area when the first vertical edge value, the second vertical edge value, the first horizontal edge value, and the second horizontal edge value are smaller than a preset threshold. 를 포함하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.Defective pixel detection and restoration method of the image sensor comprising a. 제5항에 있어서, 상기 불량 화소인지 판단하는 단계는,The method of claim 5, wherein the determining of whether the pixel is defective is performed. 상기 검사 대상 화소가 상기 에지 영역에 포함되지 않는 경우, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소에 가장 근접하여 배치된 화소의 신호 레벨의 평균값보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우에 상기 검사 대상 화소를 불량 화소로 판단하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.When the inspection target pixel is not included in the edge area, a pixel in which the signal level of the inspection target pixel is the same as the inspection target pixel among the pixels of the second window and detects the same color and is disposed closest to the inspection target pixel. And determining the pixel to be inspected as a bad pixel when the threshold value is greater than or equal to a predetermined threshold value or less than a mean value of a signal level. 제5항에 있어서, 상기 제2 복원 단계는,The method of claim 5, wherein the second restoration step, 상기 검사 대상 화소가 이미지 에지 영역에 포함되는 경우, 상기 제2 윈도우에 포함된 화소 각각의 신호 레벨을 비교하여, 상기 검사 대상 화소가 이미지의 수직 에지 영역, 수평 에지 영역 및 대각선 에지 영역 중 어느 하나에 포함되는지 판 별하는 이미지 영역의 형식을 판별 단계;When the inspection target pixel is included in the image edge region, the signal level of each pixel included in the second window is compared, so that the inspection target pixel is any one of a vertical edge region, a horizontal edge region, and a diagonal edge region of the image. Determining a format of an image area to determine whether the image area is included in the image area; 상기 이미지 영역의 형식 판별 결과에 따라 상기 검사 대상 화소가 불량 화소인지 판단하는 단계; 및Determining whether the inspection target pixel is a bad pixel according to a format determination result of the image area; And 상기 검사 대상 화소가 불량 화소로 판단되는 경우 상기 검사 대상 화소를 복원하는 단계Restoring the inspected pixel when the inspected pixel is determined to be a bad pixel; 를 더 포함하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.Bad pixel detection and restoration method of the image sensor, characterized in that it further comprises. 제8항에 있어서, 상기 이미지 영역의 형식을 판별하는 단계는,The method of claim 8, wherein the determining of the format of the image area comprises: 상기 제2 윈도우의 수직방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수직 에지값, 상기 제2 윈도우의 수직방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 수직방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수직 에지값, 상기 제2 윈도우의 수평방향으로 연속된 2개의 녹색을 검출하는 화소의 신호레벨 차들의 합인 제1 수평 에지값 및 상기 제2 윈도우의 수평방향으로 연속된 2개의 적색을 검출하는 화소의 신호레벨의 차들과 상기 제2 윈도우의 수평방향으로 연속된 2개의 청색을 검출하는 화소의 신호레벨의 차들의 합인 제2 수평 에지값을 계산하는 단계;The first vertical edge value which is the sum of the signal level differences of the pixels detecting two green consecutive in the vertical direction of the second window, and the signal level of the pixel detecting the two red continuous in the vertical direction of the second window. A second vertical edge value that is the sum of the differences between signal levels of the pixels detecting two blue colors that are continuous in the vertical direction, and a sum of the signal level differences of pixels that detect two green colors continuous in the horizontal direction of the second window; The difference between the signal level of the pixel detecting the first horizontal edge value and two red consecutive in the horizontal direction of the second window and the signal level of the pixel detecting the two blue continuous in the horizontal direction of the second window. Calculating a second horizontal edge value that is the sum of the differences; 상기 제1 수직 에지값이 상기 제1 수평 에지값과 기설정된 문턱값의 합보다 크고, 제2 수직 에지값이 상기 제2 수평 에지값과 기설정된 문턱값의 합보다 큰 경 우, 상기 검사 대상 화소는 수평 에지 영역에 있는 것으로 판단하는 단계;When the first vertical edge value is greater than the sum of the first horizontal edge value and a preset threshold, and the second vertical edge value is greater than the sum of the second horizontal edge value and the preset threshold. Determining that the pixel is in a horizontal edge region; 상기 제1 수평 에지값이 상기 제1 수직 에지값과 기설정된 문턱값의 합보다 크고, 제2 수평 에지값이 상기 제2 수직 에지값과 기설정된 문턱값의 합보다 큰 경우, 상기 검사 대상 화소는 수직 에지 영역에 있는 것으로 판단하는 단계; 및The pixel to be inspected when the first horizontal edge value is greater than the sum of the first vertical edge value and the preset threshold and the second horizontal edge value is greater than the sum of the second vertical edge value and the preset threshold. Determining that it is in the vertical edge region; And 상기 검사 대상 화소가 수평 에지 영역 및 수직 에지 영역에 있지 않는 경우 대각선 에지 영역에 있는 것으로 판단하는 단계Determining that the pixel to be inspected is in a diagonal edge region when the pixel to be inspected is not in a horizontal edge region and a vertical edge region; 를 포함하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.Defective pixel detection and restoration method of the image sensor comprising a. 제8항에 있어서, 상기 검사 대상 화소가 상기 수평 에지 영역에 포함되는 경우,The method of claim 8, wherein when the inspection target pixel is included in the horizontal edge area, 상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수평방향으로 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단하고,The determining of whether the pixel is a bad pixel may include detecting a signal having the same color level as that of the pixel to be inspected among the pixels of the second window, and a signal of a pixel disposed closest to the horizontal direction of the pixel to be inspected. If the threshold value is greater than or equal to a predetermined threshold value or less than a predetermined threshold value, the inspection target pixel is determined as a bad pixel, 상기 검사 대상 화소를 복원하는 단계는, 상기 검사 대상 화소의 신호레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수평방향으로 가장 근접하여 배치된 화소의 신호 레벨의 평균값 으로 변경하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.The restoring of the pixel to be inspected may include detecting a signal level of the pixel to be inspected the same color as the pixel to be inspected among the pixels of the second window and arranging the pixel closest to the horizontal direction of the pixel to be inspected. A method for detecting and restoring a bad pixel of an image sensor, the method comprising changing to an average value of a signal level. 제8항에 있어서, 상기 검사 대상 화소가 상기 수직 에지 영역에 포함되는 경우,The method of claim 8, wherein when the inspection target pixel is included in the vertical edge area, 상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소의 신호레벨이 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수직방향으로 가장 근접하여 배치된 화소의 신호 레벨보다 기설정된 문턱값 이상이거나 또는 기설정된 문턱값 이하인 경우 상기 검사 대상 화소를 불량 화소로 판단하고,The determining of whether the pixel is a bad pixel, the signal level of the pixel to be detected is the same color as the pixel to be inspected among the pixels of the second window and the signal of the pixel disposed closest to the vertical direction of the pixel to be inspected If the threshold value is greater than or equal to a predetermined threshold value or less than a predetermined threshold value, the inspection target pixel is determined as a bad pixel, 상기 검사 대상 화소를 복원하는 단계는, 상기 검사 대상 화소의 신호레벨을 상기 제2 윈도우의 화소 중 상기 검사 대상 화소와 동일한 색상을 검출하고 상기 검사 대상 화소의 수직방향으로 가장 근접하여 배치된 화소의 신호 레벨의 평균값으로 변경하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.The restoring of the pixel to be inspected may include detecting a signal level of the pixel to be inspected the same color as the pixel to be inspected among the pixels of the second window, and determining the signal level of the pixel to be most closely disposed in a vertical direction of the pixel to be inspected. A method for detecting and restoring a bad pixel of an image sensor, characterized by changing the average value of the signal level. 제8항에 있어서, 상기 검사 대상 화소가 상기 대각선 에지 영역에 포함되는 경우,The method of claim 8, wherein when the inspection target pixel is included in the diagonal edge area, 상기 불량 화소인지 판단하는 단계는, 상기 검사 대상 화소의 신호레벨과 상기 검사 대상 화소를 중심으로 수직, 수평 및 대각선 방향으로 가장 근접한 화소들의 신호레벨을 비교하여 상기 검사 대상 화소를 불량 화소로 판단하고,The determining of the bad pixel may include determining a test pixel as a bad pixel by comparing a signal level of the test target pixel with signal levels of pixels closest to each other in the vertical, horizontal, and diagonal directions about the test target pixel. , 상기 검사 대상 화소를 복원하는 단계는, 상기 검사 대상 화소의 신호레벨을 상기 검사 대상 화소를 중심으로 수직, 수평 및 대각선 방향으로 가장 근접한 화소들 중 상기 검사 대상 화소와 동일 색상을 검출하는 화소들의 신호 레벨의 평균값으로 변경하는 것을 특징으로 하는 이미지 센서의 불량 화소 검출 및 복원방법.The restoring of the pixel to be inspected may include a signal of pixels that detect the same color as the pixel to be inspected among the pixels closest to each other in the vertical, horizontal, and diagonal directions of the signal to be inspected. A method for detecting and restoring defective pixels of an image sensor, characterized by changing the average value of the levels.
KR1020060042554A 2006-05-11 2006-05-11 Method of detecting and restoring defect pixels of image sensor KR100780224B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060042554A KR100780224B1 (en) 2006-05-11 2006-05-11 Method of detecting and restoring defect pixels of image sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060042554A KR100780224B1 (en) 2006-05-11 2006-05-11 Method of detecting and restoring defect pixels of image sensor

Publications (2)

Publication Number Publication Date
KR20070109501A KR20070109501A (en) 2007-11-15
KR100780224B1 true KR100780224B1 (en) 2007-11-27

Family

ID=39064001

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060042554A KR100780224B1 (en) 2006-05-11 2006-05-11 Method of detecting and restoring defect pixels of image sensor

Country Status (1)

Country Link
KR (1) KR100780224B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102604109B1 (en) * 2020-12-09 2023-11-21 에스케이하이닉스 주식회사 Image sensing device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003189189A (en) 2001-12-21 2003-07-04 Hitachi Ltd Video camera
JP2005064697A (en) 2003-08-08 2005-03-10 Canon Inc Imaging device and imaging method
JP2005318383A (en) 2004-04-30 2005-11-10 Canon Inc Apparatus and method for correcting defective pixel

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003189189A (en) 2001-12-21 2003-07-04 Hitachi Ltd Video camera
JP2005064697A (en) 2003-08-08 2005-03-10 Canon Inc Imaging device and imaging method
JP2005318383A (en) 2004-04-30 2005-11-10 Canon Inc Apparatus and method for correcting defective pixel

Also Published As

Publication number Publication date
KR20070109501A (en) 2007-11-15

Similar Documents

Publication Publication Date Title
US8253828B2 (en) Image capture device including edge direction determination unit, and image processing method for the same
EP1401196B1 (en) Method for detecting defective pixels in a digital image sensor
US6965395B1 (en) Methods and systems for detecting defective imaging pixels and pixel values
US8212899B2 (en) Imaging apparatus capable of highly accurate defective pixel correction processing
CN105338342B (en) The detection method and device of a kind of dead pixel points of images
JP3583684B2 (en) Image defect detection apparatus and image defect detection method
TWI449027B (en) Adaptive pixel compensation method
JP2007201530A (en) Pixel defect correction apparatus
JP2016048815A (en) Image processor, image processing method and image processing system
CN103733608A (en) Image processing apparatus and control method therefor
CN105451015B (en) Detection method and device for image dead pixels
EP2373048B1 (en) Method for detecting and correcting bad pixels in image sensor
CN107248147B (en) Method for eliminating dead pixel in RAW-RGB image
US8164660B2 (en) Single row based defective pixel correction
CN104025581B (en) Imaging Device
CN103563360B (en) Imaging device and imaging method
CN103621070B (en) Imaging device and control method thereof
KR100780224B1 (en) Method of detecting and restoring defect pixels of image sensor
JP4331120B2 (en) Defective pixel detection method
US8036483B2 (en) Couplet correction in image sensors
US7433512B2 (en) Method and apparatus for finding and correcting single-pixel noise defects in a two-dimensional camera pixel field and a camera provided with such an apparatus
JP4053571B2 (en) Luminance calculation method, luminance calculation device, inspection device, luminance calculation program, and computer-readable recording medium
KR100825821B1 (en) Method of detecting Defect Pixel
CN101489142B (en) Colored interpolation method for digital image
JP2002271806A (en) Pixel defect signal correction circuit for ccd image pickup element

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
LAPS Lapse due to unpaid annual fee