JP2005341020A - Pixel defect detector and pixel defect correction device - Google Patents

Pixel defect detector and pixel defect correction device Download PDF

Info

Publication number
JP2005341020A
JP2005341020A JP2004154500A JP2004154500A JP2005341020A JP 2005341020 A JP2005341020 A JP 2005341020A JP 2004154500 A JP2004154500 A JP 2004154500A JP 2004154500 A JP2004154500 A JP 2004154500A JP 2005341020 A JP2005341020 A JP 2005341020A
Authority
JP
Japan
Prior art keywords
value
pixel
comparison reference
maximum value
reference value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004154500A
Other languages
Japanese (ja)
Inventor
Katsumi Tokuyama
克巳 徳山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004154500A priority Critical patent/JP2005341020A/en
Publication of JP2005341020A publication Critical patent/JP2005341020A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To realize the correction of pixel defects at two parts in filters with the same color by suppressing the degradation of image quality to a minimum while reducing a circuit scale. <P>SOLUTION: A first maximum value propriety determination/comparison reference value candidate selector 105 makes either of a maximum value Pm and a second value Ps, which is determined to be more proper than the other with the determination on the basis of the comparison between the maximum value Pm and the second value Ps, as a first comparison reference value candidate Pth1. A second maximum value propriety determination/comparison reference value candidate selector 109 makes a proper maximum value as a second comparison reference value candidate Pth2 with the determination on the basis of the comparison between a specific direction maximum value and a pixel value of a different color pixel by a specific direction maximum value detector 108. A comparison reference value selector 110 makes either of the first/second comparison reference value candidates, which is more proper than the other as the final comparison reference value Pth. A target pixel value propriety determining part 106 determines a target pixel value P0 on the basis of the final comparison reference value. A pixel value replacement control unit 107 replaces the target pixel value P0 with the comparison reference value Pth when a correction control signal Sc is effective. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、撮像装置、映像装置等における画素欠陥(特に白キズなど)を検出する画素欠陥検出装置、および、欠陥画素を補正する画素欠陥補正装置に関する。   The present invention relates to a pixel defect detection device that detects pixel defects (particularly white defects) in an imaging device, a video device, and the like, and a pixel defect correction device that corrects defective pixels.

従来の画素欠陥補正装置として、適応型のフィルタを用いたものが知られている。それは、注目画素に対して、それと同色の複数の周辺画素を対象とし、それら周辺画素の画素値のうちの最大値を用いる。その最大値に対して注目画素の画素値の比較を行い、比較結果(差分)が閾値以上であれば、注目画素を欠陥画素と判断し、注目画素の画素値を周辺最大値と置き換え、補正する。   As a conventional pixel defect correction apparatus, an apparatus using an adaptive filter is known. It targets a plurality of peripheral pixels of the same color as the target pixel, and uses the maximum value among the pixel values of the peripheral pixels. The pixel value of the target pixel is compared with the maximum value, and if the comparison result (difference) is equal to or greater than the threshold value, the target pixel is determined to be a defective pixel, the pixel value of the target pixel is replaced with the peripheral maximum value, and correction is performed. To do.

図7を用いて従来の画素欠陥補正装置を説明する。   A conventional pixel defect correction apparatus will be described with reference to FIG.

入力映像信号はラインメモリ回路301において1ライン、2ライン、3ライン遅延された信号となり、画素単位で遅延する遅延素子の組み合わせからなる画像データ保持回路302に入力され、画像データ保持回路302で保持された信号は図8のフィルタ構成400の配列となる。RGBのベイヤー配列の場合、フィルタ構成401のような画素配列となり、この画素配列は1画素単位で変化してゆく。P32を注目画素とした場合、G処理画素402、R処理画素403、B処理画素404のように周辺画素を設定し処理を行う。以下では、注目画素が、P32の場合について説明する。   The input video signal becomes a signal delayed by 1 line, 2 lines, or 3 lines in the line memory circuit 301, and is input to the image data holding circuit 302 including a combination of delay elements that are delayed in units of pixels, and held in the image data holding circuit 302. The resulting signals are arranged in the filter configuration 400 of FIG. In the case of the RGB Bayer arrangement, the pixel arrangement is similar to the filter configuration 401, and this pixel arrangement changes in units of one pixel. When P32 is the target pixel, peripheral pixels are set and processed, such as the G processing pixel 402, the R processing pixel 403, and the B processing pixel 404. Hereinafter, a case where the target pixel is P32 will be described.

まず、最大値検出部303は、周辺画素P12,P52,P14,P34,P54の周辺5画素の中から最大値を検出し、比較判定処理部304へとデータを送る。比較判定処理部304では、注目画素が欠陥画素か否かを判定するために、最大値検出部303で検出された最大値Pmと注目画素P32の画素値P0を用い、(P0−Pm)>Th0の比較を行う。比較結果が注目画素判定用閾値Th0より大きい場合、すなわち、注目画素値P0が最大値Pmに比べて過剰に大きい場合、これは白きず等を意味する。そこで、注目画素P32を欠陥画素と判断し、補正制御信号Scを画素値置換制御部305に送る。画素値置換制御部305では補正制御信号Scを受け取ると、注目画素値P32の画素値P0を最大値Pmに置き換える処理を行う。   First, the maximum value detection unit 303 detects the maximum value from the five surrounding pixels of the peripheral pixels P12, P52, P14, P34, and P54, and sends the data to the comparison determination processing unit 304. The comparison determination processing unit 304 uses the maximum value Pm detected by the maximum value detection unit 303 and the pixel value P0 of the target pixel P32 in order to determine whether or not the target pixel is a defective pixel, and (P0−Pm)> Comparison of Th0 is performed. If the comparison result is larger than the target pixel determination threshold Th0, that is, if the target pixel value P0 is excessively larger than the maximum value Pm, this means white spots or the like. Therefore, the target pixel P32 is determined as a defective pixel, and a correction control signal Sc is sent to the pixel value replacement control unit 305. When the pixel value replacement control unit 305 receives the correction control signal Sc, the pixel value replacement control unit 305 performs a process of replacing the pixel value P0 of the target pixel value P32 with the maximum value Pm.

逆に、比較判定処理部304の比較結果が注目画素判定用閾値Th0以下の場合、注目画素P32は欠陥画素ではないと判断する。この場合、画素置き換えは発生せず、注目画素P32の画素値P0をそのまま出力する。   Conversely, when the comparison result of the comparison determination processing unit 304 is equal to or less than the target pixel determination threshold Th0, it is determined that the target pixel P32 is not a defective pixel. In this case, pixel replacement does not occur, and the pixel value P0 of the target pixel P32 is output as it is.

図9は従来の画素欠陥補正装置の動作を示すフローチャートである。従来の構成では、ステップS31において、周辺の最大値Pmを検出する。次いでステップS32において、注目画素値P0と周辺最大値Pmとの差分の絶対値D4が注目画素判定用閾値Th0を超えているか否かを判定する(D4=P0−Pm>Th0?)。注目画素値P0が周辺最大値Pmに対して過剰に大きいときは、注目画素は欠陥画素であるので、ステップS33に進んで、欠陥画素である注目画素の画素値P0を最大値Pmに置き換える補正を行う。一方、注目画素値P0が最大値Pmに対して余り変わらないときは、注目画素は正常画素であるので、ステップS34に進んで、画素値置き換えの補正は行わないで、その注目画素値P0のまま出力する。   FIG. 9 is a flowchart showing the operation of the conventional pixel defect correction apparatus. In the conventional configuration, the peripheral maximum value Pm is detected in step S31. Next, in step S32, it is determined whether or not the absolute value D4 of the difference between the target pixel value P0 and the peripheral maximum value Pm exceeds the target pixel determination threshold Th0 (D4 = P0−Pm> Th0?). When the target pixel value P0 is excessively large with respect to the peripheral maximum value Pm, the target pixel is a defective pixel. Therefore, the process proceeds to step S33, and correction is performed to replace the pixel value P0 of the target pixel that is a defective pixel with the maximum value Pm. I do. On the other hand, when the target pixel value P0 does not change much with respect to the maximum value Pm, the target pixel is a normal pixel. Therefore, the process proceeds to step S34, and correction of pixel value replacement is not performed. Output as is.

この構成の場合、周辺画素の最も近い画素値と置き換えを行うため、周波数特性の劣化も少なく、画質劣化も最小限に抑えることができる。
特開2001−86517号公報(第4頁、第4図)
In the case of this configuration, since the pixel value is replaced with the closest pixel value of the surrounding pixels, the frequency characteristics are hardly deteriorated and the image quality deterioration can be minimized.
JP 2001-86517 A (Page 4, FIG. 4)

しかしながら、注目画素と同色の周辺画素に2箇所の画素欠陥があった場合、そのときの周辺最大値は欠陥画素の画素値であるため、比較基準としては不適切なものとなる。すなわち、注目画素が欠陥画素であるとして、その注目画素値は周辺最大値と接近することになる。その差分(=注目画素値−最大値)は小さくなり、比較判定処理部304での比較結果が注目画素判定用閾値Th0以下となってしまう。その結果、注目画素が欠陥画素であっても画素欠陥と判断できず、補正することができない。   However, when there are two pixel defects in a peripheral pixel of the same color as the target pixel, the peripheral maximum value at that time is the pixel value of the defective pixel, and thus is inappropriate as a comparison criterion. That is, assuming that the target pixel is a defective pixel, the target pixel value approaches the peripheral maximum value. The difference (= target pixel value−maximum value) becomes small, and the comparison result in the comparison determination processing unit 304 becomes equal to or smaller than the target pixel determination threshold Th0. As a result, even if the target pixel is a defective pixel, it cannot be determined as a pixel defect and cannot be corrected.

ところで、2箇所以上の画素欠陥の補正を可能にするためには、最大値Pmを用いる代わりに、周辺画素値で2番目に大きな値をセカンド値Psとし、セカンド値Psを比較基準として比較処理を行う方式がある。これによれば、欠陥画素が2つあっても、最大値Pmは比較基準としないで、セカンド値Psを比較基準とするため、欠陥画素である注目画素の補正が可能である。   By the way, in order to enable correction of pixel defects at two or more locations, instead of using the maximum value Pm, the second largest value of peripheral pixel values is set as the second value Ps, and the comparison processing is performed using the second value Ps as a comparison reference. There is a method to do. According to this, even if there are two defective pixels, the maximum value Pm is not used as a comparison reference, and the second value Ps is used as a comparison reference. Therefore, it is possible to correct a target pixel that is a defective pixel.

しかし、セカンド値Psを比較基準とすることに起因して、上記処理に比べ映像信号の周波数特性の劣化、画質劣化が発生する。   However, since the second value Ps is used as a comparison reference, the frequency characteristics of the video signal and the image quality are deteriorated as compared with the above processing.

画質劣化防止のため、フィルタ領域を広く取り、周辺画素の画素情報を基に補正方法を変更する方法等もあるが(例えば、特許文献1参照)、回路規模が大きくなる課題がある。   In order to prevent image quality degradation, there is a method of taking a wide filter area and changing a correction method based on pixel information of peripheral pixels (see, for example, Patent Document 1), but there is a problem that the circuit scale becomes large.

イメージセンサの画素サイズは増大しており、画素欠陥の補正が課題となっている。また、その反面、システムの小型化も課題になっている。   The pixel size of image sensors is increasing, and correction of pixel defects has become a problem. On the other hand, downsizing of the system is also an issue.

4ライン以下で構成した場合に、周辺のセカンド値を採用するときは、精度が劣化する。それは、垂直方向には注目画素に対して同色画素データは1画素のデータしかないからである。垂直方向で差分が大きい高周波信号の場合に、欠陥データか否かの判断がつかず、誤補正を行う可能性がある。特に目に付くのは、無彩色の垂直成分の高周波信号である。   When it is configured with 4 lines or less, accuracy is deteriorated when surrounding second values are adopted. This is because in the vertical direction, the same color pixel data is only one pixel data with respect to the target pixel. In the case of a high-frequency signal having a large difference in the vertical direction, it is not possible to determine whether or not the data is defective data, and there is a possibility of erroneous correction. Particularly noticeable is the high-frequency signal of the achromatic vertical component.

また、センサーの画素欠陥(白キズ)に関しては、露光時間が長くなるほど欠陥データの値は大きくなるため、画質として目に付くようになる。アンプ動作により信号を増幅した場合も同様である。   Further, regarding the pixel defect (white defect) of the sensor, the value of the defect data becomes larger as the exposure time becomes longer, so that it becomes noticeable as the image quality. The same applies when the signal is amplified by the amplifier operation.

本発明は、このような事情に鑑みて創作したものであり、回路規模を小さくしながら、画質劣化を最小限に抑え、同色のフィルタ内の2箇所の画素欠陥に関しても補正が可能な画素欠陥補正装置を提供することを目的としている。   The present invention has been created in view of such circumstances, and is capable of correcting pixel defects at two locations in a filter of the same color while minimizing image quality degradation while reducing the circuit scale. An object of the present invention is to provide a correction device.

本発明は、上記の課題を解決するために次のような手段を講じる。   The present invention takes the following means in order to solve the above problems.

本発明による第1の画素欠陥検出装置は、
注目画素の周辺の複数の画素の画素値の最大値を検出する最大値検出手段と、
前記注目画素の周辺の複数の画素の画素値のセカンド値を検出するセカンド値検出手段と、
前記最大値と前記セカンド値との比較に基づいて前記最大値の採用の適否を判定し、前記最大値が適正のときは比較基準値として前記最大値を採用し、前記最大値が不適正のときは比較基準値として前記セカンド値を採用する最大値適正判定・比較基準値選択手段と、
前記最大値適正判定・比較基準値選択手段によって採用された前記比較基準値に基づいて前記注目画素値の適正を判定する注目画素値適正判定手段と
を備えた構成とされている。
A first pixel defect detection device according to the present invention includes:
Maximum value detecting means for detecting the maximum value of the pixel values of a plurality of pixels around the pixel of interest;
Second value detection means for detecting second values of pixel values of a plurality of pixels around the target pixel;
Based on the comparison between the maximum value and the second value, whether or not the maximum value is adopted is determined. When the maximum value is appropriate, the maximum value is adopted as a comparison reference value, and the maximum value is inappropriate. When the maximum value appropriateness determination / comparison reference value selection means adopting the second value as the comparison reference value,
And a target pixel value appropriate determining means for determining the appropriateness of the target pixel value based on the comparison reference value adopted by the maximum value appropriate determining / comparison reference value selecting means.

周辺画素に欠陥画素が2以上ある場合の補償として、最大値が果たして、注目画素値の適正を判定するための比較基準値として適正であるか否かを判定する。すなわち、最大値適正判定・比較基準値選択手段は、最大値検出手段からの最大値とセカンド値検出手段からのセカンド値とを比較することを通じて、最大値が比較基準値として適正か否かを判定する。最大値適正判定・比較基準値選択手段は、前記の判定の結果、最大値が比較基準値として適正であるときは、最大値を比較基準値として採用するが、最大値が比較基準値として不適正なときは、比較基準値としてセカンド値を採用する。そして、採用した比較基準値を注目画素値適正判定手段に与える。注目画素値適正判定手段は、前記の採用された比較基準値(最大値またはセカンド値)に基づいて前記注目画素値の適正を判定する。   As compensation when there are two or more defective pixels in the peripheral pixels, it is determined whether or not the maximum value is achieved and is appropriate as a comparison reference value for determining the appropriateness of the target pixel value. That is, the maximum value appropriateness determination / comparison reference value selection means compares the maximum value from the maximum value detection means with the second value from the second value detection means to determine whether the maximum value is appropriate as the comparison reference value. judge. The maximum value appropriateness determination / comparison reference value selection means adopts the maximum value as the comparison reference value when the maximum value is appropriate as the comparison reference value as a result of the above determination. When appropriate, the second value is adopted as the comparison reference value. Then, the adopted comparison reference value is given to the target pixel value appropriate determination means. The target pixel value appropriateness determination means determines the appropriateness of the target pixel value based on the adopted comparison reference value (maximum value or second value).

上記構成において好ましい態様は、前記最大値適正判定・比較基準値選択手段について次のように構成することである。すなわち、前記最大値と前記セカンド値との差分を第1の差分判定閾値と比較し、前記差分が前記第1の差分判定閾値未満のときは前記最大値が適正であるとして前記比較基準値として前記最大値を採用し、前記差分が前記第1の差分判定閾値以上のときは前記最大値が不適正であるとして前記比較基準値として前記セカンド値を採用するように前記最大値適正判定・比較基準値選択手段が構成されていることである。   A preferable aspect of the above configuration is that the maximum value appropriateness determination / comparison reference value selection unit is configured as follows. That is, the difference between the maximum value and the second value is compared with a first difference determination threshold value, and when the difference is less than the first difference determination threshold value, the maximum value is determined to be appropriate as the comparison reference value. Adopting the maximum value, when the difference is equal to or greater than the first difference determination threshold, it is determined that the maximum value is inappropriate, and the second value is used as the comparison reference value, so that the maximum value appropriateness determination / comparison is performed. The reference value selection means is configured.

最大値とセカンド値との差分が過剰に大きい場合は、最大値が異常であるとしてよい。この場合は、注目画素値に対する比較基準値として、セカンド値を採用し、そうでなければ、比較基準値として最大値を採用する。   When the difference between the maximum value and the second value is excessively large, the maximum value may be abnormal. In this case, the second value is adopted as the comparison reference value for the target pixel value, and otherwise, the maximum value is adopted as the comparison reference value.

なお、上記において、最大値とセカンド値の差分は広義のもので、最大値からセカンド値を減算した結果でもよいし、最大値とセカンド値との比でもよい。   In the above, the difference between the maximum value and the second value is broad, and may be the result of subtracting the second value from the maximum value, or may be the ratio of the maximum value to the second value.

上記構成において好ましい態様は、前記最大値適正判定・比較基準値選択手段が、前記第1の差分判定閾値を可変可能に構成されていることである。   A preferable aspect of the above configuration is that the maximum value appropriateness determination / comparison reference value selection unit is configured to be able to vary the first difference determination threshold value.

その好ましい例は、イメージセンサの露光時間に応じて前記第1の差分判定閾値を可変するように構成されていることである。   A preferred example is that the first difference determination threshold is made variable according to the exposure time of the image sensor.

別の好ましい例は、映像信号増幅率に応じて前記第1の差分判定閾値を可変するように構成されていることである。   Another preferred example is that the first difference determination threshold is made variable in accordance with the video signal amplification factor.

第1の差分判定閾値を調整することにより、最大値とセカンド値のいずれを比較基準値として採用するかの基準が変化する。すなわち、明るい場所で露光時間が短くなるときには、第1の差分判定閾値を大きめにシフトさせ、最大値が適正である可能性を広げる。逆に、暗い場所で露光時間が長くなるときには、第1の差分判定閾値を小さめにシフトさせ、最大値が不適正である可能性を広げてセカンド値の採用の可能性を広げる。   By adjusting the first difference determination threshold value, the criterion of which of the maximum value and the second value is adopted as the comparison reference value is changed. That is, when the exposure time is shortened in a bright place, the first difference determination threshold value is shifted to a larger value, and the possibility that the maximum value is appropriate is expanded. On the contrary, when the exposure time becomes long in a dark place, the first difference determination threshold value is shifted to a smaller value to widen the possibility that the maximum value is inappropriate and widen the possibility of adopting the second value.

また、映像信号増幅率が高いときには、第1の差分判定閾値を大きめにシフトさせ、最大値が適正である可能性を広げる。逆に、映像信号増幅率が低いときには、第1の差分判定閾値を小さめにシフトさせ、最大値が不適正である可能性を広げてセカンド値の採用の可能性を広げる。   Further, when the video signal amplification factor is high, the first difference determination threshold value is shifted to a larger value to widen the possibility that the maximum value is appropriate. On the other hand, when the video signal amplification factor is low, the first difference determination threshold value is shifted to a smaller value to widen the possibility that the maximum value is inappropriate and widen the possibility of adopting the second value.

上記構成において好ましい態様は、前記注目画素値適正判定手段について次のように構成することである。すなわち、前記注目画素値と前記最大値適正判定・比較基準値選択手段によって採用された前記比較基準値との差分を注目画素判定用閾値と比較し、前記差分が前記注目画素判定用閾値以下のときは前記注目画素値が適正と判定し、前記差分が前記注目画素判定用閾値を超えるときは前記注目画素値が不適正と判定するように前記注目画素値適正判定手段が構成されていることである。   A preferred aspect of the above configuration is that the pixel value appropriateness determining means is configured as follows. That is, the difference between the target pixel value and the comparison reference value adopted by the maximum value appropriate determination / comparison reference value selection unit is compared with a target pixel determination threshold, and the difference is equal to or less than the target pixel determination threshold. The pixel-of-interest value determination unit is configured to determine that the pixel-of-interest value is appropriate, and to determine that the pixel-of-interest value is inappropriate when the difference exceeds the pixel-of-interest determination threshold. It is.

以下は、画素値判定のフィルタ領域が狭い場合に対応するものである。   The following corresponds to the case where the filter region for pixel value determination is narrow.

本発明による第2の画素欠陥検出装置は、
注目画素の周辺の複数の画素の画素値の最大値を検出する最大値検出手段と、
前記注目画素の周辺の複数の画素の画素値のセカンド値を検出するセカンド値検出手段と、
前記最大値と前記セカンド値との比較に基づいて前記最大値の採用の適否を判定し、前記最大値が適正のときは第1の比較基準値候補として前記最大値を採用し、前記最大値が不適正のときは第1の比較基準値候補として前記セカンド値を採用する第1の最大値適正判定・比較基準値候補選択手段と、
前記注目画素の特定方向の最直近の同色画素の画素値が前記最大値か否かを判定する特定方向最大値検出手段と、
前記特定方向最大値検出手段によって前記注目画素の特定方向の最直近の同色画素の画素値が最大値と判定されたときに、その最大値を前記注目画素の特定方向の最直近の異色画素の画素値と比較して前記最大値が第2の比較基準値候補として適正か否かを判定し、適正と判定したときに第2の比較基準値候補として前記最大値を採用する第2の最大値適正判定・比較基準値候補選択手段と、
前記第2の最大値適正判定・比較基準値候補選択手段の判定結果が前記最大値を第2の比較基準値候補としては不適正とするときに、前記第1の最大値適正判定・比較基準値候補選択手段によって採用された前記第1の比較基準値候補を最終の比較基準値として採用し、前記判定結果が前記最大値を第2の比較基準値候補として適正とするときに、前記第2の最大値適正判定・比較基準値候補選択手段によって採用された前記第2の比較基準値候補を最終の比較基準値として採用する比較基準値選択手段と、
前記比較基準値選択手段によって採用された前記最終の比較基準値に基づいて前記注目画素値の適正を判定する注目画素値適正判定手段と
を備えた構成とされている。
The second pixel defect detection apparatus according to the present invention is:
Maximum value detecting means for detecting the maximum value of the pixel values of a plurality of pixels around the pixel of interest;
Second value detection means for detecting second values of pixel values of a plurality of pixels around the target pixel;
Based on a comparison between the maximum value and the second value, it is determined whether or not the maximum value is appropriate. When the maximum value is appropriate, the maximum value is used as a first comparison reference value candidate, and the maximum value is determined. Is not appropriate, a first maximum value appropriateness determination / comparison reference value candidate selection means that adopts the second value as the first comparison reference value candidate;
Specific direction maximum value detecting means for determining whether or not the pixel value of the same color pixel closest to the target pixel in the specific direction is the maximum value;
When the pixel value of the closest same color pixel in the specific direction of the target pixel is determined to be the maximum value by the specific direction maximum value detection means, the maximum value of the closest different color pixel in the specific direction of the target pixel is determined. It is determined whether or not the maximum value is appropriate as a second comparison reference value candidate in comparison with a pixel value, and when it is determined to be appropriate, the second maximum is adopted as the second comparison reference value candidate. Value appropriateness judgment / comparison reference value candidate selection means,
When the determination result of the second maximum value appropriateness determination / comparison reference value candidate selecting means makes the maximum value inappropriate as the second comparison reference value candidate, the first maximum value appropriateness determination / comparison reference When the first comparison reference value candidate adopted by the value candidate selection means is adopted as a final comparison reference value and the determination result makes the maximum value appropriate as a second comparison reference value candidate, the first comparison reference value candidate is adopted. A comparison reference value selection means that adopts the second comparison reference value candidate adopted by the maximum value appropriateness determination / comparison reference value candidate selection means of 2 as a final comparison reference value;
The apparatus includes a target pixel value appropriate determination unit that determines the appropriateness of the target pixel value based on the final comparison reference value adopted by the comparison reference value selection unit.

画素値判定のフィルタ領域が狭い場合には、注目画素の特定方向では比較対象の周辺画素が1つしかない場合がある。例えば、垂直方向4ライン分のフィルタ領域の場合、特定方向を垂直方向とすると、比較対象の周辺画素は1つしかない。したがって、その特定方向の最直近の同色画素の画素値が最大値の場合に、その最大値が果たして比較基準値として適正なものか否かの判定が困難になる。このことは垂直方向に限ってのものではなく、水平方向の場合にも当てはまる。   When the filter region for pixel value determination is narrow, there may be only one peripheral pixel to be compared in the specific direction of the target pixel. For example, in the case of a filter area for four lines in the vertical direction, if the specific direction is the vertical direction, there is only one peripheral pixel to be compared. Therefore, when the pixel value of the closest same color pixel in the specific direction is the maximum value, it is difficult to determine whether or not the maximum value is appropriate as the comparison reference value. This is not limited to the vertical direction, but also applies to the horizontal direction.

第1の最大値適正判定・比較基準値候補選択手段で最大値が不適正と判定し、セカンド値を採用することになった場合に、第2の最大値適正判定・比較基準値候補選択手段で最大値を再チェックする。最大値は同色画素の画素値であるが、それが特定方向の最直近の同色画素の画素値である場合に、その最大値を特定方向の最直近の異色画素の画素値と比較する。これにより、第1の最大値適正判定・比較基準値候補選択手段による最大値不適正の判定が適正か否かを再チェックしている。これで、最大値がやはり不適正であれば、セカンド値を最終の比較基準値とする。最大値が結果として適正であれば、その最大値を最終の比較基準値とする。このようにして、画素値判定のフィルタ領域が狭い場合でも、画素欠陥の判定の精度を高いものにすることができる。   The second maximum value appropriateness determination / comparison reference value candidate selection means when the first maximum value appropriateness determination / comparison reference value candidate selection means determines that the maximum value is inappropriate and adopts the second value. To recheck the maximum value. Although the maximum value is the pixel value of the same color pixel, if it is the pixel value of the nearest same color pixel in the specific direction, the maximum value is compared with the pixel value of the nearest different color pixel in the specific direction. Thus, it is rechecked whether or not the determination of whether or not the maximum value is appropriate by the first maximum value appropriateness determination / comparison reference value candidate selection unit is appropriate. If the maximum value is still inappropriate, the second value is set as the final comparison reference value. If the maximum value is appropriate as a result, the maximum value is used as the final comparison reference value. In this way, even when the filter region for pixel value determination is narrow, the accuracy of pixel defect determination can be increased.

上記構成において好ましい態様は、前記第2の最大値適正判定・比較基準値候補選択手段について次のように構成することである。すなわち、前記注目画素の特定方向の最直近の同色画素の画素値と特定方向の最直近の異色画素の画素値との差分の絶対値を第2の差分判定閾値と比較し、前記差分の絶対値が前記第2の差分判定閾値以下のときは前記最直近の同色画素の画素値の最大値が適正であるとし、それ以外のときは不適正と判定するように前記第2の最大値適正判定・比較基準値候補選択手段が構成されていることである。   A preferable aspect of the above configuration is that the second maximum value appropriateness determination / comparison reference value candidate selection unit is configured as follows. That is, the absolute value of the difference between the pixel value of the nearest same color pixel in the specific direction of the target pixel and the pixel value of the nearest different color pixel in the specific direction is compared with a second difference determination threshold, and the absolute value of the difference When the value is less than or equal to the second difference determination threshold, the maximum value of the pixel values of the nearest same color pixel is determined to be appropriate, and otherwise, the second maximum value is determined to be determined to be inappropriate The determination / comparison reference value candidate selection means is configured.

また、上記において好ましい態様は、前記特定方向最大値検出手段が、前記注目画素の垂直方向の最直近の同色画素の画素値が前記最大値か否かを判定するように構成されているものである。ここでは。特定方向が垂直方向であるとしている。   In the above aspect, the specific direction maximum value detecting unit is configured to determine whether or not the pixel value of the closest same color pixel in the vertical direction of the target pixel is the maximum value. is there. here. The specific direction is assumed to be the vertical direction.

この第2の画素欠陥検出装置は、上記の第1の画素欠陥検出装置と同様に、次のように構成することが好ましい態様である。   The second pixel defect detection device is preferably configured as follows, similarly to the first pixel defect detection device described above.

前記第1の最大値適正判定・比較基準値候補選択手段について、前記最大値と前記セカンド値との差分を第1の差分判定閾値と比較し、前記差分が前記第1の差分判定閾値未満のときは前記最大値が適正であるとして前記第1の比較基準値候補として前記最大値を採用し、前記差分が前記第1の差分判定閾値以上のときは前記最大値が不適正であるとして前記第1の比較基準値候補として前記セカンド値を採用するように構成されていることが好ましい。   For the first maximum value appropriateness determination / comparison reference value candidate selection means, the difference between the maximum value and the second value is compared with a first difference determination threshold value, and the difference is less than the first difference determination threshold value. When the maximum value is appropriate, the maximum value is adopted as the first comparison reference value candidate, and when the difference is greater than or equal to the first difference determination threshold, the maximum value is inappropriate. It is preferable that the second value is adopted as the first comparison reference value candidate.

また、前記第1の最大値適正判定・比較基準値候補選択手段について、前記第1の差分判定閾値が可変可能に構成されていることが好ましい。   The first maximum value appropriateness determination / comparison reference value candidate selection unit is preferably configured such that the first difference determination threshold is variable.

また、前記第1の最大値適正判定・比較基準値候補選択手段について、イメージセンサの露光時間に応じて前記第1の差分判定閾値を可変するように構成されていることが好ましい。   Further, it is preferable that the first maximum value appropriateness determination / comparison reference value candidate selection unit is configured to vary the first difference determination threshold according to the exposure time of the image sensor.

また、前記第1の最大値適正判定・比較基準値候補選択手段について、映像信号増幅率に応じて前記第1の差分判定閾値を可変するように構成されていることが好ましい。   Moreover, it is preferable that the first maximum value appropriateness determination / comparison reference value candidate selection unit is configured to vary the first difference determination threshold according to a video signal amplification factor.

また、前記注目画素値適正判定手段について、前記比較基準値選択手段によって選択された前記最終の比較基準値との差分を注目画素判定用閾値と比較し、前記差分が前記注目画素判定用閾値以下のときは前記注目画素値が適正と判定し、前記差分が前記注目画素判定用閾値を超えるときは前記注目画素値が不適正と判定するように構成されていることが好ましい。   Further, the target pixel value appropriateness determining unit compares a difference from the final comparison reference value selected by the comparison reference value selecting unit with a target pixel determination threshold value, and the difference is equal to or smaller than the target pixel determination threshold value. In this case, it is preferable that the target pixel value is determined to be appropriate, and that the target pixel value is determined to be inappropriate when the difference exceeds the target pixel determination threshold.

以上は画素欠陥検出装置についてのものであったが、画素欠陥補正装置として次のように展開することが可能である。   The above is for the pixel defect detection device, but it can be developed as a pixel defect correction device as follows.

本発明による第1の画素欠陥補正装置は、
上記第1の構成の画素欠陥補正装置と、
前記注目画素値適正判定手段が前記注目画素値を適正と判定するときは、前記注目画素値の画素値置き換えを行わず、前記注目画素値を不適正と判定するときは、前記注目画素値を前記比較基準値と置き換える画素値置換制御手段を備えた構成とされている。
A first pixel defect correction apparatus according to the present invention includes:
A pixel defect correction apparatus of the first configuration;
When the pixel-of-interest value determination unit determines that the pixel-of-interest value is appropriate, pixel value replacement of the pixel-of-interest value is not performed, and when the pixel-of-interest value is determined inappropriate, the pixel-of-interest value is A pixel value replacement control unit that replaces the comparison reference value is provided.

画素欠陥があるときの欠陥画素の画素値を最適な補正画素値で補正することができる。採用された比較基準値が最大値のときは、画質を優先する最大値置き換えモードとなり、採用された比較基準値がセカンド値のときは欠陥補正優先のセカンド値置き換えモードとなる。   The pixel value of the defective pixel when there is a pixel defect can be corrected with an optimal correction pixel value. When the adopted comparison reference value is the maximum value, the maximum value replacement mode is given priority to image quality, and when the adopted comparison reference value is the second value, the second value replacement mode is given priority to defect correction.

また、本発明による第2の画素欠陥補正装置は、
上記第2の構成の画素欠陥検出装置と、
前記注目画素値適正判定手段が前記注目画素値を適正と判定するときは、前記注目画素値の画素値置き換えを行わず、前記注目画素値を不適正と判定するときは、前記注目画素値を前記最終の比較基準値と置き換える画素値置換制御手段を備えた構成とされている。
The second pixel defect correcting device according to the present invention is
A pixel defect detection device of the second configuration;
When the pixel-of-interest value determination unit determines that the pixel-of-interest value is appropriate, pixel value replacement of the pixel-of-interest value is not performed, and when the pixel-of-interest value is determined inappropriate, the pixel-of-interest value is A pixel value replacement control unit that replaces the final comparison reference value is provided.

画素値判定のフィルタ領域が狭い場合において、画素欠陥があるときの欠陥画素の画素値を最適な補正画素値で補正することができる。   When the filter region for pixel value determination is narrow, the pixel value of the defective pixel when there is a pixel defect can be corrected with an optimal correction pixel value.

本発明によれば、複数種類の閾値を用いて最大値置き換えモードとセカンド値置き換えモードを切り替えるもので、小規模の回路構成で実現可能である。ローコストのシステムに取り込む上で有利である。また、センサの露光時間またはセンサの増幅率等に応じた切り替えも可能で、最適な画質の画像を得ることができる。   According to the present invention, the maximum value replacement mode and the second value replacement mode are switched using a plurality of types of threshold values, and can be realized with a small circuit configuration. This is advantageous for incorporation into a low-cost system. In addition, switching according to the exposure time of the sensor or the amplification factor of the sensor is possible, and an image with optimum image quality can be obtained.

以下、本発明にかかわる画素欠陥補正装置の実施の形態を図面に基づいて詳細に説明する。   Embodiments of a pixel defect correction apparatus according to the present invention will be described below in detail with reference to the drawings.

(実施の形態1)
図1は本発明の実施の形態1における画素欠陥補正装置の構成を示すブロック図である。図6は画素欠陥補正装置に相当する画素欠陥補正回路が撮像装置において占める位置関係を示している。図6において、601は撮像素子、602はRAWデータ処理回路、603はラインメモリ、604は画素欠陥補正回路、605は輝度信号処理回路、606は色差信号処理回路、607は出力切替回路である。
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of a pixel defect correction apparatus according to Embodiment 1 of the present invention. FIG. 6 shows the positional relationship that the pixel defect correction circuit corresponding to the pixel defect correction apparatus occupies in the imaging apparatus. In FIG. 6, reference numeral 601 denotes an image sensor, 602 denotes a RAW data processing circuit, 603 denotes a line memory, 604 denotes a pixel defect correction circuit, 605 denotes a luminance signal processing circuit, 606 denotes a color difference signal processing circuit, and 607 denotes an output switching circuit.

図1において、101はラインメモリ回路、102は遅延素子の組み合わせからなる画像データ保持回路、103は最大値検出部、104はセカンド値検出部、105は最大値適正判定・比較基準値選択部、106は注目画素値適正判定部、107は画素値置換制御部である。画素値置換制御部107を除いた構成が画素欠陥検出装置に相当する。   In FIG. 1, 101 is a line memory circuit, 102 is an image data holding circuit composed of a combination of delay elements, 103 is a maximum value detection unit, 104 is a second value detection unit, 105 is a maximum value appropriateness determination / comparison reference value selection unit, Reference numeral 106 denotes a target pixel value appropriateness determination unit, and 107 denotes a pixel value replacement control unit. The configuration excluding the pixel value replacement control unit 107 corresponds to a pixel defect detection device.

ラインメモリ回路101は、複数のラインメモリをシリーズに接続し、入力映像信号を1ライン、2ライン、3ライン遅延させるために一時記憶するものである。   The line memory circuit 101 connects a plurality of line memories in series and temporarily stores an input video signal for delaying one line, two lines, and three lines.

画像データ保持回路102は、各ラインメモリからのライン遅延された映像信号を画素単位で遅延させて画像データを画素単位で保持するもので、フリップフロップ等から構成されている。   The image data holding circuit 102 delays the line-delayed video signal from each line memory in units of pixels and holds the image data in units of pixels, and includes a flip-flop or the like.

最大値検出部103は、画像データ保持回路102に保持されているN行M列の複数の画素の画素値の中から最大値Pmを検出するものである。   The maximum value detection unit 103 detects the maximum value Pm from the pixel values of a plurality of pixels of N rows and M columns held in the image data holding circuit 102.

セカンド値検出部104は、最大値の次に大きい画素値であるセカンド値Psを検出するものである。   The second value detection unit 104 detects a second value Ps that is the next largest pixel value after the maximum value.

最大値適正判定・比較基準値選択部105は、最大値検出部103が検出した最大値Pmとセカンド値検出部104が検出したセカンド値Psとの差分D1(=Pm−Ps)が第1の差分判定閾値Th1未満か否かを判定し、最大値Pmが適正で差分D1が第1の差分判定閾値Th1未満であるときは比較基準値Pthとして最大値Pmを選択して出力し、最大値Pmが不適正で差分D1が第1の差分判定閾値Th1以上であるときは比較基準値Pthとしてセカンド値Psを選択して出力するものである。   The maximum value appropriateness determination / comparison reference value selection unit 105 has a first difference D1 (= Pm−Ps) between the maximum value Pm detected by the maximum value detection unit 103 and the second value Ps detected by the second value detection unit 104. It is determined whether or not the difference determination threshold value Th1 is less than the threshold value. When the maximum value Pm is appropriate and the difference D1 is less than the first difference determination threshold value Th1, the maximum value Pm is selected and output as the comparison reference value Pth. When Pm is inappropriate and the difference D1 is greater than or equal to the first difference determination threshold Th1, the second value Ps is selected and output as the comparison reference value Pth.

注目画素値適正判定部106は、画像データ保持回路102に保持されている注目画素の画素値P0と最大値適正判定・比較基準値選択部105からの比較基準値Pthとを入力し、注目画素値P0と比較基準値Pthとの差分D2(=P0−Pth)が所定の注目画素判定用閾値Th0よりも大きいか否かを判定し、注目画素値P0についての補正の要否を示す補正制御信号Scを画素値置換制御部107に出力するものである。   The target pixel value appropriateness determination unit 106 receives the pixel value P0 of the target pixel held in the image data holding circuit 102 and the comparison reference value Pth from the maximum value appropriateness determination / comparison reference value selection unit 105, and receives the target pixel It is determined whether or not a difference D2 (= P0−Pth) between the value P0 and the comparison reference value Pth is greater than a predetermined threshold value for pixel determination Th0, and correction control indicating whether or not the target pixel value P0 needs to be corrected. The signal Sc is output to the pixel value replacement control unit 107.

注目画素値P0と比較基準値Pth(最大値Pmまたはセカンド値Ps)との差分D2が注目画素判定用閾値Th0を超えているか否かを判定し、差分D2が比較基準値Pthを超えているときは画素置き換えを行う必要があるため、補正制御信号Scをアクティブにし、超えていないときは補正制御信号Scをインアクティブとする。   It is determined whether or not the difference D2 between the target pixel value P0 and the comparison reference value Pth (maximum value Pm or second value Ps) exceeds the target pixel determination threshold Th0, and the difference D2 exceeds the comparison reference value Pth. In some cases, it is necessary to perform pixel replacement, so that the correction control signal Sc is made active, and when it does not exceed, the correction control signal Sc is made inactive.

画素値置換制御部107は、注目画素値適正判定部106からの補正制御信号Scが補正要を示しているときは、注目画素値P0を比較基準値Pthと置き換えることによって補正を行うものである。   When the correction control signal Sc from the target pixel value appropriateness determination unit 106 indicates that correction is necessary, the pixel value replacement control unit 107 performs correction by replacing the target pixel value P0 with the comparison reference value Pth. .

本実施の形態の画素欠陥補正装置は、垂直方向の相関を見ないタイプのものである。   The pixel defect correction apparatus according to the present embodiment is of a type that does not see a correlation in the vertical direction.

次に、以上のように構成された本実施の形態の画素欠陥補正装置の動作を説明する。   Next, the operation of the pixel defect correction apparatus of the present embodiment configured as described above will be described.

入力映像信号はラインメモリ回路101において1ライン、2ライン、3ライン遅延された信号となり、画素単位で遅延させながら画像データを保持する画像データ保持回路102に入力される。画像データ保持回路102で遅延された信号は図2のフィルタ構成200の配列となる。   The input video signal becomes a signal delayed by one line, two lines, or three lines in the line memory circuit 101, and is input to the image data holding circuit 102 that holds the image data while being delayed in units of pixels. The signals delayed by the image data holding circuit 102 are arranged in the filter configuration 200 of FIG.

RGBのベイヤー配列の場合、フィルタ構成201のような画素配列となる。ベイヤー配列の場合、1画素単位で変化してゆく。例えば、P32を注目画素とした場合、G処理画素202、R処理画素203、B処理画素204のように周辺画素を設定し、処理を行う。このとき、注目画素の比較対照画素について、G画素の場合は、R画素,B画素とは異なっていて、斜め方向は1画素隣の画素P23,P43を用いる(R画素,B画素の場合は、P14,P54)。この構成とすることで、G画素に関しては、注目画素に対して、比較対照画素が2画素存在する構成となる。   In the case of the RGB Bayer array, a pixel array like the filter configuration 201 is obtained. In the case of the Bayer array, it changes in units of one pixel. For example, when P32 is the target pixel, peripheral pixels are set like the G processing pixel 202, the R processing pixel 203, and the B processing pixel 204, and processing is performed. At this time, the comparison pixel of the target pixel is different from the R pixel and the B pixel in the case of the G pixel, and the adjacent pixels P23 and P43 are used in the oblique direction (in the case of the R pixel and the B pixel). , P14, P54). With this configuration, the G pixel has a configuration in which two comparison pixels exist with respect to the target pixel.

以下、注目画素がP32の場合について説明する。   Hereinafter, a case where the target pixel is P32 will be described.

まず、最大値検出部103は、G画素のときは、周辺画素P12,P52,P23,P43,P34の周辺5画素の中から最大値Pmを検出する。R画素、B画素のときは、周辺画素P12,P52,P14,P34,P54の周辺5画素の中から最大値Pmを検出する。これと同時に、セカンド値検出部104は、上記周辺5画素の中から2番目に大きな値をセカンド値Psとして検出する。   First, the maximum value detection unit 103 detects the maximum value Pm from the five peripheral pixels of the peripheral pixels P12, P52, P23, P43, and P34 when the pixel is a G pixel. In the case of the R pixel and the B pixel, the maximum value Pm is detected from the five peripheral pixels of the peripheral pixels P12, P52, P14, P34, and P54. At the same time, the second value detection unit 104 detects the second largest value from the five surrounding pixels as the second value Ps.

最大値検出部103、セカンド値検出部104で検出されたデータは最大値適正判定・比較基準値選択部105に転送され、
D1=Pm−Ps<Th1 ?
の判定処理を行う。Th1は、最大値Pmとセカンド値Psとの差分D1を判定するための第1の差分判定閾値である。
The data detected by the maximum value detection unit 103 and the second value detection unit 104 is transferred to the maximum value appropriateness determination / comparison reference value selection unit 105,
D1 = Pm−Ps <Th1?
The determination process is performed. Th1 is a first difference determination threshold value for determining the difference D1 between the maximum value Pm and the second value Ps.

最大値適正判定・比較基準値選択部105は、判定結果が“真”のとき、すなわち、最大値Pmがセカンド値Psに比べて余り大きくならないとき、その最大値Pmは欠陥データではないと判断し、比較基準値Pthとして最大値Pmを選択する。これが最大値置き換えモードであり、画質優先の補正モードとなる。   The maximum value appropriateness determination / comparison reference value selection unit 105 determines that the maximum value Pm is not defective data when the determination result is “true”, that is, when the maximum value Pm does not become much larger than the second value Ps. Then, the maximum value Pm is selected as the comparison reference value Pth. This is the maximum value replacement mode, which is the image quality priority correction mode.

一方、判定結果が“偽”の場合、すなわち、最大値Pmがセカンド値Psに比べて過剰に大きいとき、最大値Pmは欠陥データであると判断し、比較基準値Pthとしては、最大値Pmを排除し、代わりにより適切なセカンド値Psを選択する。これがセカンド値置き換えモードであり、欠陥補正優先の補正モードとなる。   On the other hand, when the determination result is “false”, that is, when the maximum value Pm is excessively larger than the second value Ps, it is determined that the maximum value Pm is defective data, and the comparison reference value Pth is the maximum value Pm. And a more appropriate second value Ps is selected instead. This is a second value replacement mode, and is a defect correction priority correction mode.

以上のように、最大値Pmとセカンド値Psとの差分D1を判定することにより、最大値置き換えモードとセカンド値置き換えモードとを切り替えるように構成している。   As described above, the maximum value replacement mode and the second value replacement mode are switched by determining the difference D1 between the maximum value Pm and the second value Ps.

次に、以上のように構成された本実施の形態の画素欠陥補正装置の動作を図3のフローチャートに従って説明する。   Next, the operation of the pixel defect correction apparatus of the present embodiment configured as described above will be described with reference to the flowchart of FIG.

ステップS1において、注目画素の周辺の最大値Pmを検出し、次いでステップS2において、周辺のセカンド値Psを検出し、次いでステップS3において、最大値Pmとセカンド値Psとの差分D1が第1の差分判定閾値Th1未満か否かを判定する(D1=(Pm−Ps)<Th1?)。これは、最大値Pmが適正なものか否かを見ている。最大値Pmが適正であれば、この正常な最大値Pmを、比較判定の基準値である比較基準値Pthとして用いることができる。したがって、この場合は、ステップS4に進む。最大値Pmが異常であれば、最大値Pmとセカンド値Psとの差分D1は第1の差分判定閾値Th1以上となる。この場合、最大値Pmは比較基準値Pthとして用いることは、誤判定の原因になる。すなわち、比較基準値Pthとしてセカンド値Psを用いるべく、ステップS6に進む。   In step S1, the maximum value Pm around the pixel of interest is detected, then in step S2, the peripheral second value Ps is detected, and in step S3, the difference D1 between the maximum value Pm and the second value Ps is the first value. It is determined whether it is less than the difference determination threshold Th1 (D1 = (Pm−Ps) <Th1?). This checks whether or not the maximum value Pm is appropriate. If the maximum value Pm is appropriate, the normal maximum value Pm can be used as the comparison reference value Pth, which is a reference value for comparison determination. Therefore, in this case, the process proceeds to step S4. If the maximum value Pm is abnormal, the difference D1 between the maximum value Pm and the second value Ps is equal to or greater than the first difference determination threshold Th1. In this case, using the maximum value Pm as the comparison reference value Pth causes erroneous determination. That is, the process proceeds to step S6 to use the second value Ps as the comparison reference value Pth.

最大値Pmが正常と確認できると、ステップS4において、比較基準値Pthとして最大値Pmを設定し、注目画素値P0と正常な最大値Pmである比較基準値Pthとの差分D2が注目画素判定用閾値Th0を超えているか否かを判定する。   If the maximum value Pm can be confirmed to be normal, the maximum value Pm is set as the comparison reference value Pth in step S4, and the difference D2 between the target pixel value P0 and the comparison reference value Pth that is the normal maximum value Pm is determined as the target pixel determination. It is determined whether the threshold value Th0 is exceeded.

D2=P0−Pth=P0−Pm>Th0 ?
差分D2が注目画素判定用閾値Th0よりも大きく、注目画素値P0が比較基準値Pth(正常な最大値Pm)に対して過剰に大きいときは、注目画素は欠陥画素であるので、ステップS5に進んで、欠陥画素である注目画素の画素値P0を最大値Pmに置き換える補正を行う(P0←Pm(最大値)=Pth)。これが“最大値置き換えモード”である。ステップS3からステップS4、ステップS5の流れが最大値置き換えモードとなる。
D2 = P0−Pth = P0−Pm> Th0?
When the difference D2 is larger than the target pixel determination threshold Th0 and the target pixel value P0 is excessively larger than the comparison reference value Pth (normal maximum value Pm), the target pixel is a defective pixel. Then, correction is performed to replace the pixel value P0 of the target pixel, which is a defective pixel, with the maximum value Pm (P0 ← Pm (maximum value) = Pth). This is the “maximum value replacement mode”. The flow from step S3 to step S4 and step S5 is the maximum value replacement mode.

一方、差分D2が注目画素判定用閾値Th0以下で、注目画素値P0が比較基準値Pth(正常な最大値Pm)に対して余り変わらないときは、注目画素は正常画素であるので、ステップS8に進んで、正常である注目画素値P0は画素値置き換えの補正をしないで、その注目画素値P0のまま出力することにする。   On the other hand, when the difference D2 is equal to or less than the target pixel determination threshold Th0 and the target pixel value P0 is not much different from the comparison reference value Pth (normal maximum value Pm), the target pixel is a normal pixel. Then, the normal target pixel value P0 is output as the target pixel value P0 without correcting the pixel value replacement.

一方、ステップS3の判断において最大値Pmが異常で比較基準値Pthとして採用できないとき、すなわち、比較基準値Pthとしてセカンド値Psを採用したときは、ステップS6に進む。ステップS6において、比較基準値Pthとしてセカンド値Psを設定し、注目画素値P0とセカンド値Psである比較基準値Pthとの差分D2が注目画素判定用閾値Th0を超えているか否かを判定する。   On the other hand, when the maximum value Pm is abnormal and cannot be adopted as the comparison reference value Pth in the determination in step S3, that is, when the second value Ps is adopted as the comparison reference value Pth, the process proceeds to step S6. In step S6, the second value Ps is set as the comparison reference value Pth, and it is determined whether or not the difference D2 between the target pixel value P0 and the comparison reference value Pth that is the second value Ps exceeds the target pixel determination threshold Th0. .

D2=P0−Pth=P0−Ps>Th0 ?
差分D2が注目画素判定用閾値Th0よりも大きく、注目画素値P0が比較基準値Pth(セカンド値Ps)に対して過剰に大きいときは、注目画素はやはり欠陥画素であるとして、ステップS7に進む。ステップS7において、欠陥画素である注目画素の画素値P0をセカンド値Psに置き換える補正を行う(P0←Ps(セカンド値)=Pth)。これが“セカンド値置き換えモード”である。ステップS3からステップS6、ステップS7の流れがセカンド値置き換えモードとなる。
D2 = P0-Pth = P0-Ps> Th0?
When the difference D2 is larger than the target pixel determination threshold Th0 and the target pixel value P0 is excessively larger than the comparison reference value Pth (second value Ps), it is determined that the target pixel is still a defective pixel and the process proceeds to step S7. . In step S7, correction is performed to replace the pixel value P0 of the target pixel, which is a defective pixel, with the second value Ps (P0 ← Ps (second value) = Pth). This is the “second value replacement mode”. The flow from step S3 to step S6 and step S7 is the second value replacement mode.

一方、注目画素値P0が比較基準値Pth(セカンド値Ps)に対して余り変わらないときは、注目画素は実は正常画素であるので、ステップS8に進んで、正常である注目画素値P0は画素値置き換えの補正をしないことにする。   On the other hand, when the target pixel value P0 does not change much with respect to the comparison reference value Pth (second value Ps), the target pixel is actually a normal pixel. Therefore, the process proceeds to step S8, and the normal target pixel value P0 is the pixel. The value replacement is not corrected.

以上のように、ステップS3の判断が、最大値置き換えモードとセカンド値置き換えモードのいずれかの選択の起点となっている。この判定のために、最大値Pmとセカンド値Psと第1の差分判定閾値Th1を用いている。   As described above, the determination in step S3 is the starting point for selecting either the maximum value replacement mode or the second value replacement mode. For this determination, the maximum value Pm, the second value Ps, and the first difference determination threshold Th1 are used.

なお、ステップS4とステップS6とで、注目画素判定用閾値Th0は互いに異なっていてもよい。   In step S4 and step S6, the pixel-of-interest determination threshold Th0 may be different from each other.

(実施の形態2)
図4は本発明の実施の形態2における画素欠陥補正装置の構成を示すブロック図である。図4において、実施の形態1の図1におけるのと同じ符号は同一構成要素を指しているので、詳しい説明は省略する。画素値置換制御部107を除いた構成が画素欠陥検出装置に相当する。
(Embodiment 2)
FIG. 4 is a block diagram showing the configuration of the pixel defect correction apparatus according to Embodiment 2 of the present invention. In FIG. 4, the same reference numerals as those in FIG. The configuration excluding the pixel value replacement control unit 107 corresponds to a pixel defect detection device.

図4において、105′は第1の最大値適正判定・比較基準値候補選択部、108は特定方向最大値検出部、109は第2の最大値適正判定・比較基準値候補選択部、110は比較基準値選択部である。第1の最大値適正判定・比較基準値候補選択部105′は実施の形態1の場合の最大値適正判定・比較基準値選択部105と同等のものである。本実施の形態で特定方向は垂直方向とする。   In FIG. 4, 105 ′ is a first maximum value appropriateness determination / comparison reference value candidate selection unit, 108 is a specific direction maximum value detection unit, 109 is a second maximum value appropriateness determination / comparison reference value candidate selection unit, and 110 is It is a comparison reference value selection unit. The first maximum value appropriateness determination / comparison reference value candidate selection unit 105 ′ is equivalent to the maximum value appropriateness determination / comparison reference value selection unit 105 in the first embodiment. In this embodiment, the specific direction is the vertical direction.

特定方向最大値検出部108は、注目画素の垂直方向の直下の同色の比較画素(直下同色比較画素)の画素値Pvが周辺の最大値Pmかどうかを判定するものである。ここで、注目画素の垂直方向の直下の同色の比較画素について、図2を参照して説明する。注目画素がP32である場合、注目画素P32に対する直下同色比較画素とはP34であり、直下異色比較画素とはP33である。これは、R,G,Bのいずれにも当てはまることである。   The specific direction maximum value detection unit 108 determines whether or not the pixel value Pv of the same color comparison pixel (the same color comparison pixel immediately below) in the vertical direction of the target pixel is the peripheral maximum value Pm. Here, a comparison pixel of the same color immediately below the pixel of interest in the vertical direction will be described with reference to FIG. When the pixel of interest is P32, the same color comparison pixel directly below the pixel of interest P32 is P34, and the different color comparison pixel directly below is P33. This is true for any of R, G, and B.

第2の最大値適正判定・比較基準値候補選択部109は、特定方向最大値検出部108が検出した最大値Pmである直下同色比較画素値Pvがやはり最終の比較基準値Pthとして不適正なものなのか否かを判定し、適正・不適正の判定信号Sjを出力し、適正のときは判定信号Sjを“1”に設定して比較基準値選択部110に出力するとともに、第2の比較基準値候補Pth2として直下同色比較画素値Pv(=最大値Pm)を選択して出力し、不適正のときは判定信号Sjとして“0”を出力するものである。   The second maximum value appropriateness determination / comparison reference value candidate selection unit 109 determines that the immediately-same color comparison pixel value Pv, which is the maximum value Pm detected by the specific direction maximum value detection unit 108, is inappropriate as the final comparison reference value Pth. It is determined whether or not the signal is proper, and an appropriate / inappropriate determination signal Sj is output. When the signal is appropriate, the determination signal Sj is set to “1” and output to the comparison reference value selection unit 110. The comparison pixel value Pv (= maximum value Pm) immediately below is selected and output as the comparison reference value candidate Pth2, and “0” is output as the determination signal Sj when it is inappropriate.

比較基準値選択部110は、第2の最大値適正判定・比較基準値候補選択部109からの判定信号Sjが“0”のときに、第1の最大値適正判定・比較基準値候補選択部105′からの第1の比較基準値候補Pth1(最大値Pmまたはセカンド値Ps)を選択し、判定信号Sjが“1”のときは第2の最大値適正判定・比較基準値候補選択部109からの第2の比較基準値候補Pth2を選択するものである。   When the determination signal Sj from the second maximum value appropriateness determination / comparison reference value candidate selection unit 109 is “0”, the comparison reference value selection unit 110 is the first maximum value appropriateness determination / comparison reference value candidate selection unit. When the first comparison reference value candidate Pth1 (maximum value Pm or second value Ps) from 105 ′ is selected and the determination signal Sj is “1”, the second maximum value appropriateness determination / comparison reference value candidate selection unit 109 is selected. The second comparison reference value candidate Pth2 is selected.

次に、以上のように構成された本実施の形態の画素欠陥補正装置の動作(垂直方向の相関を見る)を図5のフローチャートに従って説明する。   Next, the operation (see the correlation in the vertical direction) of the pixel defect correction apparatus of the present embodiment configured as described above will be described with reference to the flowchart of FIG.

ステップS11からステップS12,S13,S14を経てステップS15に進む流れは、図3の場合のステップS1→S2,S3,S4→S5の流れと同じである。再説明すると、ステップS11において、周辺の最大値Pmを検出し、次いでステップS12において、周辺のセカンド値Psを検出し、次いでステップS13において、最大値Pmが異常でないかを見るために、最大値Pmとセカンド値Psとの差分D1が第1の差分判定閾値Th1未満か否かを判定する。最大値Pmが正常で最終の比較基準値Pthとしてよいので、ステップS14に進み、注目画素が欠陥画素かを見るために、注目画素値P0と正常な最大値Pmとの差分D2が注目画素判定用閾値Th0を超えているか否かを判定する。注目画素が欠陥画素であるので、ステップS15に進んで、欠陥画素である注目画素を最大値Pmに置き換える補正を行う(最大値置き換えモード)。   The flow from Step S11 to Step S15 through Steps S12, S13, and S14 is the same as the flow of Steps S1, S2, S3, S4, and S5 in the case of FIG. To explain again, in step S11, the surrounding maximum value Pm is detected, then in step S12 the surrounding second value Ps is detected, and in step S13, the maximum value Pm is checked to see if it is abnormal. It is determined whether or not the difference D1 between Pm and the second value Ps is less than the first difference determination threshold Th1. Since the maximum value Pm is normal and may be used as the final comparison reference value Pth, the process proceeds to step S14, and the difference D2 between the target pixel value P0 and the normal maximum value Pm is determined as the target pixel determination in order to see whether the target pixel is a defective pixel. It is determined whether the threshold value Th0 is exceeded. Since the target pixel is a defective pixel, the process proceeds to step S15, and correction is performed to replace the target pixel that is a defective pixel with the maximum value Pm (maximum value replacement mode).

一方、注目画素が正常画素であれば、ステップS20に進んで、画素値置き換えの補正はせず、注目画素値P0をそのまま採用する。   On the other hand, if the target pixel is a normal pixel, the process proceeds to step S20, the pixel value replacement is not corrected, and the target pixel value P0 is adopted as it is.

さて、ステップS13の判断で最大値Pmがセカンド値Psに対して過剰に大きいときは、その最大値Pmは異常の可能性があるが、必ずしも異常と断定してよいとは限らない。なぜならば、ステップS11で最大値Pmと検出した画素がもしも注目画素の直下同色画素であれば、その最大値Pmの正常・異常の判別がむずかしいからである。   If the maximum value Pm is excessively larger than the second value Ps in the determination in step S13, the maximum value Pm may be abnormal, but it may not always be determined that it is abnormal. This is because if the pixel detected as the maximum value Pm in step S11 is the same color pixel immediately below the pixel of interest, it is difficult to determine whether the maximum value Pm is normal or abnormal.

そこで、ステップS16に進んで、ステップS11で求めた最大値Pmが直下同色比較画素の画素値Pvと同じか否かを判定する。その判定結果が、最大値Pmが直下同色比較画素値Pvであれば、ステップS17に進む。   Therefore, the process proceeds to step S16, and it is determined whether or not the maximum value Pm obtained in step S11 is the same as the pixel value Pv of the same color comparison pixel directly below. If the determination result is that the maximum value Pm is the same color comparison pixel value Pv immediately below, the process proceeds to step S17.

ステップS17は、ステップS13での最大値Pmが異常との判定が果たして疑義のないもの否かを判定するものである。ステップS17の判定は、第2の最大値適正判定・比較基準値候補選択部109における処理に対応している。ステップS17では、直下同色比較画素値Pv(=最大値Pm)と直下異色比較画素値Pdとの差分の絶対値D3をとり、この差分の絶対値D3が第2の差分判定閾値Th2以下であるか否かを判定する。この判定の結果の肯定、否定は、第2の最大値適正判定・比較基準値候補選択部109が出力する判定信号Sjの“1”,“0”に対応する。   In step S17, it is determined whether the maximum value Pm in step S13 is determined to be abnormal and there is no doubt. The determination in step S17 corresponds to the processing in the second maximum value appropriateness determination / comparison reference value candidate selection unit 109. In step S17, the absolute value D3 of the difference between the immediately lower same color comparison pixel value Pv (= maximum value Pm) and the immediately lower different color comparison pixel value Pd is taken, and the absolute value D3 of this difference is equal to or smaller than the second difference determination threshold Th2. It is determined whether or not. The affirmative or negative result of this determination corresponds to “1” or “0” of the determination signal Sj output from the second maximum value appropriateness determination / comparison reference value candidate selection unit 109.

最大値Pmであるとされた直下同色比較画素値Pvがそれの1つ上に隣接する直下異色比較画素値Pdとの差をあまりもたないものであるとき、その最大値Pmは不適正なものではなく、最終の比較基準値Pthとして採用してよいことになる。これは、判定信号Sj=1に相当する。この場合、ステップS14へと戻る。   When the directly-same color comparison pixel value Pv, which is considered to be the maximum value Pm, does not have much difference from the immediately-lower adjacent color comparison pixel value Pd, the maximum value Pm is inappropriate. Instead, it may be adopted as the final comparison reference value Pth. This corresponds to the determination signal Sj = 1. In this case, the process returns to step S14.

回路規模を小さいものとするため、4ライン以下で構成した場合、注目画素に対する同色画素は垂直方向には1画素しかない。そのため、垂直成分の高周波信号が2画素の欠陥データか否か判断がつかない。これでは、垂直成分の高周波信号に対して誤補正を行う可能性が残る。特に目に付く部分は、無彩色の垂直成分の高周波信号である。そこで、色を異にする画素との比較を行うことで誤補正をなくすのである。   In order to reduce the circuit scale, when it is configured with four lines or less, the same color pixel with respect to the target pixel is only one pixel in the vertical direction. Therefore, it cannot be determined whether the high-frequency signal of the vertical component is defective data of two pixels. In this case, there remains a possibility that erroneous correction is performed on the high-frequency signal of the vertical component. Particularly noticeable is an achromatic vertical component high-frequency signal. Therefore, the erroneous correction is eliminated by comparing the pixels with different colors.

ステップS17において、その判定結果が否定的であった場合、これは判定信号Sj=0に相当するが、このときの処理は次のようになる。直下同色比較画素値Pv(=最大値Pm)と直下異色比較画素値Pdとの差分の絶対値D3が第2の差分判定閾値Th2を超えているか否かを判定する。   If the determination result is negative in step S17, this corresponds to the determination signal Sj = 0, but the processing at this time is as follows. It is determined whether or not the absolute value D3 of the difference between the immediately lower same color comparison pixel value Pv (= maximum value Pm) and the immediately lower different color comparison pixel value Pd exceeds the second difference determination threshold Th2.

D3=|Pv−Pd|≦Th2 ?
第2の最大値適正判定・比較基準値候補選択部109が直下同色比較画素値Pvと直下異色比較画素値Pdとの比較を行うとき、注目画素がGの場合は、直下異色比較画素値Pdの画素は、G画素ではなく、R画素またはB画素である。ただし、無彩色の場合、G=R=Bの近似式が成り立つ。垂直方向に無彩色の高周波信号が存在するか否かを検出している。
D3 = | Pv−Pd | ≦ Th2?
When the second maximum value appropriateness determination / comparison reference value candidate selection unit 109 performs a comparison between the immediately lower same color comparison pixel value Pv and the immediately lower different color comparison pixel value Pd, if the target pixel is G, the immediately lower different color comparison pixel value Pd. These pixels are not G pixels but R pixels or B pixels. However, in the case of an achromatic color, an approximate expression of G = R = B is established. It is detected whether an achromatic high-frequency signal is present in the vertical direction.

上記の判定の結果、差分の絶対値D3が第2の差分判定閾値Th2を超えているときは、そのときの最大値Pmとしての直下同色比較画素値Pvは最終の比較基準値Pthとしてはやはり適正でないことになる。その理由は次のとおりである。ステップS17では、最大値Pmはセカンド値Psとの差分が過剰に大きいことを前提としている。その最大値Pmがさらに直下異色比較画素値Pdに対しての差分が過剰となっている。これは、その最大値Pmが2つの画素値から過剰に大きく離れていることを意味している。したがって、最大値Pmは適正でないと結論付けることが可能である。   As a result of the above determination, when the absolute value D3 of the difference exceeds the second difference determination threshold Th2, the immediately-same color comparison pixel value Pv as the maximum value Pm at that time is still the final comparison reference value Pth. It will not be appropriate. The reason is as follows. In step S17, the maximum value Pm is premised on that the difference from the second value Ps is excessively large. The difference between the maximum value Pm and the directly different color comparison pixel value Pd is excessive. This means that the maximum value Pm is excessively far from the two pixel values. Therefore, it can be concluded that the maximum value Pm is not appropriate.

この場合、ステップS18に進んで、最終の比較基準値Pthをセカンド値Psとした上で(Pth←Ps)、注目画素値P0と最終の比較基準値Pth(=セカンド値Ps)との差分D2を求め、その差分D2が注目画素判定用閾値Th0を超えているか否かを判定する。   In this case, the process proceeds to step S18, the final comparison reference value Pth is set to the second value Ps (Pth ← Ps), and the difference D2 between the target pixel value P0 and the final comparison reference value Pth (= second value Ps). And whether or not the difference D2 exceeds the threshold value Th0 for the target pixel determination is determined.

D2=P0−Pth=P0−Ps>Th0 ?
差分D2が注目画素判定用閾値Th0よりも大きく、注目画素値P0が最終の比較基準値Pth(=セカンド値Ps)に対して過剰に大きいときは、注目画素は欠陥画素であるので、ステップS19に進んで、欠陥画素である注目画素の画素値P0をセカンド値Psに置き換える補正を行う(P0←Ps(セカンド値)=Pth:セカンド値置き換えモード)。
D2 = P0-Pth = P0-Ps> Th0?
If the difference D2 is larger than the target pixel determination threshold Th0 and the target pixel value P0 is excessively larger than the final comparison reference value Pth (= second value Ps), the target pixel is a defective pixel, so step S19 Then, correction is performed to replace the pixel value P0 of the target pixel, which is a defective pixel, with the second value Ps (P0 ← Ps (second value) = Pth: second value replacement mode).

一方、注目画素値P0が最終の比較基準値Pth(セカンド値Ps)に対して余り変わらないときは、注目画素は正常画素であるので、ステップS20に進んで、正常である注目画素値P0は画素値置き換えの補正をしないことにする。   On the other hand, when the target pixel value P0 does not change much with respect to the final comparison reference value Pth (second value Ps), the target pixel is a normal pixel. Therefore, the process proceeds to step S20, and the normal target pixel value P0 is determined. The pixel value replacement is not corrected.

ステップS13からステップS14への流れは、第1の最大値適正判定・比較基準値候補選択部105′が第1の比較基準値候補Pth1として最大値Pmを出力する場合に相当する(Pth1←Pm)。   The flow from step S13 to step S14 corresponds to the case where the first maximum value appropriateness determination / comparison reference value candidate selection unit 105 ′ outputs the maximum value Pm as the first comparison reference value candidate Pth1 (Pth1 ← Pm). ).

ステップS13→S16→S18の流れは、第1の最大値適正判定・比較基準値候補選択部105′が第1の比較基準値候補Pth1としてセカンド値Psを出力する場合に相当する(Pth1←Ps)。   The flow of steps S13 → S16 → S18 corresponds to the case where the first maximum value appropriateness determination / comparison reference value candidate selection unit 105 ′ outputs the second value Ps as the first comparison reference value candidate Pth1 (Pth1 ← Ps). ).

ステップS13→S16→S17の流れは、第2の最大値適正判定・比較基準値候補選択部109が第2の比較基準値候補Pth2として直下同色比較画素値Pv(=最大値Pm)を出力する場合に相当する(Pth2←Pv(=Pm))。そして、判定結果がYesは、判定信号Sj=1に対応し、判定結果がNoは、判定信号Sj=0に対応する。   In the flow of steps S13 → S16 → S17, the second maximum value appropriateness determination / comparison reference value candidate selection unit 109 outputs the immediately lower same color comparison pixel value Pv (= maximum value Pm) as the second comparison reference value candidate Pth2. (Pth2 ← Pv (= Pm)). The determination result Yes corresponds to the determination signal Sj = 1, and the determination result No corresponds to the determination signal Sj = 0.

なお、上記においては、特定方向の相関に関しては垂直方向に限定しているが、必ずしも垂直方向に限定する必要性はない。注目画素に対して比較画素が1画素しかない場合は、すべての方向について有効である。   In the above description, the correlation in the specific direction is limited to the vertical direction, but it is not necessarily limited to the vertical direction. If there is only one comparison pixel for the target pixel, it is effective in all directions.

なお、特定方向の場合にセカンド値Psを用いない構成もある。それには、第2の差分判定閾値Th2の値を充分に大きく設定すれば対応できる。ステップS17の判断が必ずYesになるからである。   There is a configuration in which the second value Ps is not used in the case of a specific direction. This can be handled by setting the second difference determination threshold value Th2 to a sufficiently large value. This is because the determination in step S17 is always Yes.

また、特定方向最大値検出部108について、注目画素の直下同色比較画素が最大値となっているときは、その最大値を必ず採用するように構成してもよい。これは、図5において、ステップS17を省略し、ステップS16のYesの流れをステップS14につないだものに対応する。有彩色に関しても誤動作を防止できる。   The specific direction maximum value detection unit 108 may be configured to always adopt the maximum value when the same color comparison pixel immediately below the target pixel has the maximum value. This corresponds to the case where step S17 is omitted in FIG. 5 and the flow of Yes in step S16 is connected to step S14. Malfunctions can also be prevented for chromatic colors.

実施の形態2はフィルタ領域が垂直方向に4ライン以下の場合に有効である。6ライン以上ある場合は、実施の形態1が適している。注目画素に対する同色比較画素が垂直方向で2画素以上存在するため、垂直方向の相関を見る必要がないからである。   The second embodiment is effective when the filter area is 4 lines or less in the vertical direction. If there are 6 lines or more, the first embodiment is suitable. This is because there is no need to see the correlation in the vertical direction because there are two or more same-color comparison pixels for the target pixel in the vertical direction.

本発明の画素欠陥補正装置は、イメージセンサ等の撮像素子からの入力信号に対する画素欠陥補正装置等として有用である。また、本発明の画素欠陥検出装置は、イメージセンサ等の撮像素子からの入力信号に対する画素欠陥検出装置等として有用である。   The pixel defect correction apparatus of the present invention is useful as a pixel defect correction apparatus for an input signal from an image sensor such as an image sensor. The pixel defect detection device of the present invention is useful as a pixel defect detection device for an input signal from an image sensor such as an image sensor.

本発明の実施の形態1における画素欠陥補正装置の構成を示すブロック図1 is a block diagram showing a configuration of a pixel defect correction apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態におけるフィルタ構成図Filter configuration diagram according to the embodiment of the present invention 本発明の実施の形態1における画素欠陥補正装置の動作を示すフローチャートThe flowchart which shows operation | movement of the pixel defect correction apparatus in Embodiment 1 of this invention. 本発明の実施の形態2における画素欠陥補正装置の構成を示すブロック図The block diagram which shows the structure of the pixel defect correction apparatus in Embodiment 2 of this invention. 本発明の実施の形態2における画素欠陥補正装置の動作を示すフローチャートThe flowchart which shows operation | movement of the pixel defect correction apparatus in Embodiment 2 of this invention. 本発明の実施の形態における画素欠陥補正装置が搭載される撮像装置の概略構成を示すブロック図1 is a block diagram showing a schematic configuration of an imaging device on which a pixel defect correction device according to an embodiment of the present invention is mounted. 従来技術における画素欠陥補正装置の構成を示すブロック図The block diagram which shows the structure of the pixel defect correction apparatus in a prior art 従来技術におけるフィルタ構成図Filter configuration diagram in the prior art 従来技術における画素欠陥補正装置の動作を示すフローチャートThe flowchart which shows operation | movement of the pixel defect correction apparatus in a prior art.

符号の説明Explanation of symbols

101 ラインメモリ回路
102 画像データ保持回路
103 最大値検出部
104 セカンド値検出部
105 最大値適正判定・比較基準値選択部
105′ 第1の最大値適正判定・比較基準値候補選択部
106 注目画素値適正判定部
107 画素値置換制御部
108 特定方向最大値検出部
109 第2の最大値適正判定・比較基準値候補選択部
110 比較基準値選択部
Pm 最大値
Ps セカンド値
Pv 直下同色比較画素値
Pd 直下異色比較画素値
Pth 比較基準値(最終の比較基準値)
Pth1 第1の比較基準値候補
Pth2 第2の比較基準値候補
Sc 補正制御信号
Sj 判定信号
Th0 注目画素判定用閾値
Th1 第1の差分判定閾値
Th2 第2の差分判定閾値
101 Line memory circuit 102 Image data holding circuit 103 Maximum value detection unit 104 Second value detection unit 105 Maximum value appropriateness determination / comparison reference value selection unit 105 ′ First maximum value appropriateness determination / comparison reference value candidate selection unit 106 Target pixel value Appropriateness determination unit 107 Pixel value replacement control unit 108 Specific direction maximum value detection unit 109 Second maximum value appropriateness determination / comparison reference value candidate selection unit 110 Comparison reference value selection unit Pm Maximum value Ps Second value Pv Same color comparison pixel value immediately below Pd Directly different color comparison pixel value Pth comparison reference value (final comparison reference value)
Pth1 first comparison reference value candidate Pth2 second comparison reference value candidate Sc correction control signal Sj determination signal Th0 threshold for target pixel determination Th1 first difference determination threshold Th2 second difference determination threshold

Claims (16)

注目画素の周辺の複数の画素の画素値の最大値を検出する最大値検出手段と、
前記注目画素の周辺の複数の画素の画素値のセカンド値を検出するセカンド値検出手段と、
前記最大値と前記セカンド値との比較に基づいて前記最大値の採用の適否を判定し、前記最大値が適正のときは比較基準値として前記最大値を採用し、前記最大値が不適正のときは比較基準値として前記セカンド値を採用する最大値適正判定・比較基準値選択手段と、
前記最大値適正判定・比較基準値選択手段によって採用された前記比較基準値に基づいて前記注目画素値の適正を判定する注目画素値適正判定手段と
を備える画素欠陥検出装置。
Maximum value detecting means for detecting the maximum value of the pixel values of a plurality of pixels around the pixel of interest;
Second value detection means for detecting second values of pixel values of a plurality of pixels around the target pixel;
Based on the comparison between the maximum value and the second value, whether or not the maximum value is adopted is determined. When the maximum value is appropriate, the maximum value is adopted as a comparison reference value, and the maximum value is inappropriate. When the maximum value appropriateness determination / comparison reference value selection means adopting the second value as the comparison reference value,
A pixel defect detection apparatus comprising: a target pixel value appropriate determination unit that determines the appropriateness of the target pixel value based on the comparison reference value employed by the maximum value appropriate determination / comparison reference value selection unit.
前記最大値適正判定・比較基準値選択手段は、前記最大値と前記セカンド値との差分を第1の差分判定閾値と比較し、前記差分が前記第1の差分判定閾値未満のときは前記最大値が適正であるとして前記比較基準値として前記最大値を採用し、前記差分が前記第1の差分判定閾値以上のときは前記最大値が不適正であるとして前記比較基準値として前記セカンド値を採用する請求項1に記載の画素欠陥検出装置。   The maximum value appropriateness determination / comparison reference value selection means compares the difference between the maximum value and the second value with a first difference determination threshold, and when the difference is less than the first difference determination threshold, the maximum The maximum value is adopted as the comparison reference value assuming that the value is appropriate, and when the difference is equal to or greater than the first difference determination threshold value, the maximum value is inappropriate and the second value is used as the comparison reference value. The pixel defect detection device according to claim 1, which is employed. 前記最大値適正判定・比較基準値選択手段は、前記第1の差分判定閾値が可変可能に構成されている請求項2に記載の画素欠陥検出装置。   The pixel defect detection device according to claim 2, wherein the maximum value appropriateness determination / comparison reference value selection unit is configured such that the first difference determination threshold value is variable. 前記最大値適正判定・比較基準値選択手段は、イメージセンサの露光時間に応じて前記第1の差分判定閾値を可変するように構成されている請求項3に記載の画素欠陥検出装置。   The pixel defect detection device according to claim 3, wherein the maximum value appropriateness determination / comparison reference value selection unit is configured to vary the first difference determination threshold according to an exposure time of an image sensor. 前記最大値適正判定・比較基準値選択手段は、映像信号増幅率に応じて前記第1の差分判定閾値を可変するように構成されている請求項3に記載の画素欠陥検出装置。   The pixel defect detection device according to claim 3, wherein the maximum value appropriateness determination / comparison reference value selection unit is configured to vary the first difference determination threshold according to a video signal amplification factor. 前記注目画素値適正判定手段は、前記注目画素値と前記最大値適正判定・比較基準値選択手段によって採用された前記比較基準値との差分を注目画素判定用閾値と比較し、前記差分が前記注目画素判定用閾値以下のときは前記注目画素値が適正と判定し、前記差分が前記注目画素判定用閾値を超えるときは前記注目画素値が不適正と判定する請求項1から請求項5までのいずれかに記載の画素欠陥検出装置。   The target pixel value appropriateness determination unit compares the difference between the target pixel value and the comparison reference value adopted by the maximum value appropriateness determination / comparison reference value selection unit with a target pixel determination threshold, and the difference is 6. The pixel-of-interest value is determined to be appropriate when the pixel-of-interest determination threshold is less than or equal to the pixel-of-interest determination threshold, and the pixel-of-interest value is determined to be inappropriate when the difference exceeds the pixel-of-interest determination threshold. The pixel defect detection device according to any one of the above. 注目画素の周辺の複数の画素の画素値の最大値を検出する最大値検出手段と、
前記注目画素の周辺の複数の画素の画素値のセカンド値を検出するセカンド値検出手段と、
前記最大値と前記セカンド値との比較に基づいて前記最大値の採用の適否を判定し、前記最大値が適正のときは第1の比較基準値候補として前記最大値を採用し、前記最大値が不適正のときは第1の比較基準値候補として前記セカンド値を採用する第1の最大値適正判定・比較基準値候補選択手段と、
前記注目画素の特定方向の最直近の同色画素の画素値が前記最大値か否かを判定する特定方向最大値検出手段と、
前記特定方向最大値検出手段によって前記注目画素の特定方向の最直近の同色画素の画素値が最大値と判定されたときに、その最大値を前記注目画素の特定方向の最直近の異色画素の画素値と比較して前記最大値が第2の比較基準値候補として適正か否かを判定し、適正と判定したときに第2の比較基準値候補として前記最大値を採用する第2の最大値適正判定・比較基準値候補選択手段と、
前記第2の最大値適正判定・比較基準値候補選択手段の判定結果が前記最大値を第2の比較基準値候補としては不適正とするときに、前記第1の最大値適正判定・比較基準値候補選択手段によって採用された前記第1の比較基準値候補を最終の比較基準値として採用し、前記判定結果が前記最大値を第2の比較基準値候補として適正とするときに、前記第2の最大値適正判定・比較基準値候補選択手段によって採用された前記第2の比較基準値候補を最終の比較基準値として採用する比較基準値選択手段と、
前記比較基準値選択手段によって採用された前記最終の比較基準値に基づいて前記注目画素値の適正を判定する注目画素値適正判定手段と
を備えた画素欠陥検出装置。
Maximum value detecting means for detecting the maximum value of the pixel values of a plurality of pixels around the pixel of interest;
Second value detection means for detecting second values of pixel values of a plurality of pixels around the target pixel;
Based on the comparison between the maximum value and the second value, it is determined whether or not the maximum value is adopted. When the maximum value is appropriate, the maximum value is adopted as a first comparison reference value candidate. Is not appropriate, a first maximum value appropriateness determination / comparison reference value candidate selection means that adopts the second value as the first comparison reference value candidate;
Specific direction maximum value detection means for determining whether or not the pixel value of the same color pixel closest to the target pixel in the specific direction is the maximum value;
When the pixel value of the closest same color pixel in the specific direction of the target pixel is determined to be the maximum value by the specific direction maximum value detection means, the maximum value of the closest different color pixel in the specific direction of the target pixel is determined. It is determined whether or not the maximum value is appropriate as a second comparison reference value candidate by comparing with a pixel value, and when it is determined to be appropriate, the second maximum is adopted as the second comparison reference value candidate. Value appropriateness judgment / comparison reference value candidate selection means,
When the determination result of the second maximum value appropriateness determination / comparison reference value candidate selecting means makes the maximum value inappropriate as the second comparison reference value candidate, the first maximum value appropriateness determination / comparison reference When the first comparison reference value candidate adopted by the value candidate selection means is adopted as a final comparison reference value and the determination result makes the maximum value appropriate as a second comparison reference value candidate, the first comparison reference value candidate is adopted. A comparison reference value selection means that adopts the second comparison reference value candidate adopted by the maximum value appropriateness determination / comparison reference value candidate selection means as a final comparison reference value;
A pixel defect detection apparatus comprising: a target pixel value appropriate determination unit that determines appropriateness of the target pixel value based on the final comparison reference value adopted by the comparison reference value selection unit.
前記第2の最大値適正判定・比較基準値候補選択手段は、前記注目画素の特定方向の最直近の同色画素の画素値と特定方向の最直近の異色画素の画素値との差分の絶対値を第2の差分判定閾値と比較し、前記差分の絶対値が前記第2の差分判定閾値以下のときは前記最直近の同色画素の画素値の最大値が適正であるとし、それ以外のときは不適正と判定する請求項7に記載の画素欠陥検出装置。   The second maximum value appropriateness determination / comparison reference value candidate selecting unit is configured to calculate an absolute value of a difference between the pixel value of the closest same color pixel in the specific direction of the target pixel and the pixel value of the closest different color pixel in the specific direction. Is compared with a second difference determination threshold value, and when the absolute value of the difference is equal to or smaller than the second difference determination threshold value, the maximum value of the pixel values of the nearest same color pixel is determined to be appropriate, and otherwise The pixel defect detection device according to claim 7, wherein the pixel defect is determined to be inappropriate. 前記特定方向最大値検出手段は、前記注目画素の垂直方向の最直近の同色画素の画素値が前記最大値か否かを判定するように構成されている請求項7または請求項8に記載の画素欠陥検出装置。   The said specific direction maximum value detection means is comprised so that the pixel value of the nearest same color pixel of the perpendicular direction of the said attention pixel may be determined whether it is the said maximum value. Pixel defect detection device. 前記第1の最大値適正判定・比較基準値候補選択手段は、前記最大値と前記セカンド値との差分を第1の差分判定閾値と比較し、前記差分が前記第1の差分判定閾値未満のときは前記最大値が適正であるとして前記第1の比較基準値候補として前記最大値を採用し、前記差分が前記第1の差分判定閾値以上のときは前記最大値が不適正であるとして前記第1の比較基準値候補として前記セカンド値を採用する請求項7から請求項9までのいずれかに記載の画素欠陥検出装置。   The first maximum value appropriateness determination / comparison reference value candidate selection unit compares a difference between the maximum value and the second value with a first difference determination threshold value, and the difference is less than the first difference determination threshold value. When the maximum value is appropriate, the maximum value is adopted as the first comparison reference value candidate, and when the difference is equal to or greater than the first difference determination threshold, the maximum value is inappropriate. The pixel defect detection device according to claim 7, wherein the second value is adopted as a first comparison reference value candidate. 前記第1の最大値適正判定・比較基準値候補選択手段は、前記第1の差分判定閾値が可変可能に構成されている請求項10に記載の画素欠陥検出装置。   The pixel defect detection device according to claim 10, wherein the first maximum value appropriateness determination / comparison reference value candidate selection unit is configured such that the first difference determination threshold value is variable. 前記第1の最大値適正判定・比較基準値候補選択手段は、イメージセンサの露光時間に応じて前記第1の差分判定閾値を可変するように構成されている請求項11に記載の画素欠陥検出装置。   The pixel defect detection according to claim 11, wherein the first maximum value appropriateness determination / comparison reference value candidate selection unit is configured to vary the first difference determination threshold according to an exposure time of an image sensor. apparatus. 前記第1の最大値適正判定・比較基準値候補選択手段は、映像信号増幅率に応じて前記第1の差分判定閾値を可変するように構成されている請求項11に記載の画素欠陥検出装置。   The pixel defect detection device according to claim 11, wherein the first maximum value appropriateness determination / comparison reference value candidate selection unit is configured to vary the first difference determination threshold according to a video signal amplification factor. . 前記注目画素値適正判定手段は、前記比較基準値選択手段によって選択された前記最終の比較基準値との差分を注目画素判定用閾値と比較し、前記差分が前記注目画素判定用閾値以下のときは前記注目画素値が適正と判定し、前記差分が前記注目画素判定用閾値を超えるときは前記注目画素値が不適正と判定する請求項7から請求項13までのいずれかに記載の画素欠陥検出装置。   The target pixel value appropriate determination unit compares a difference from the final comparison reference value selected by the comparison reference value selection unit with a target pixel determination threshold, and the difference is equal to or smaller than the target pixel determination threshold. The pixel defect according to any one of claims 7 to 13, wherein the pixel value is determined to be appropriate and the target pixel value is determined to be inappropriate when the difference exceeds the target pixel determination threshold value. Detection device. 請求項1から請求項6までのいずれかに記載の画素欠陥補正装置と、
前記注目画素値適正判定手段が前記注目画素値を適正と判定するときは、前記注目画素値の画素値置き換えを行わず、前記注目画素値を不適正と判定するときは、前記注目画素値を前記比較基準値と置き換える画素値置換制御手段を備える画素欠陥補正装置。
A pixel defect correction device according to any one of claims 1 to 6,
When the pixel-of-interest value determination unit determines that the pixel-of-interest value is appropriate, pixel value replacement of the pixel-of-interest value is not performed, and when the pixel-of-interest value is determined inappropriate, the pixel-of-interest value is A pixel defect correction apparatus comprising pixel value replacement control means for replacing the comparison reference value.
請求項7から請求項14までのいずれかに記載の画素欠陥補正装置と、
前記注目画素値適正判定手段が前記注目画素値を適正と判定するときは、前記注目画素値の画素値置き換えを行わず、前記注目画素値を不適正と判定するときは、前記注目画素値を前記最終の比較基準値と置き換える画素値置換制御手段を備える画素欠陥補正装置。

A pixel defect correction device according to any one of claims 7 to 14,
When the pixel-of-interest value determination unit determines that the pixel-of-interest value is appropriate, pixel value replacement of the pixel-of-interest value is not performed, and when the pixel-of-interest value is determined inappropriate, the pixel-of-interest value is A pixel defect correction apparatus comprising pixel value replacement control means for replacing the final comparison reference value.

JP2004154500A 2004-05-25 2004-05-25 Pixel defect detector and pixel defect correction device Pending JP2005341020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004154500A JP2005341020A (en) 2004-05-25 2004-05-25 Pixel defect detector and pixel defect correction device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004154500A JP2005341020A (en) 2004-05-25 2004-05-25 Pixel defect detector and pixel defect correction device

Publications (1)

Publication Number Publication Date
JP2005341020A true JP2005341020A (en) 2005-12-08

Family

ID=35494109

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004154500A Pending JP2005341020A (en) 2004-05-25 2004-05-25 Pixel defect detector and pixel defect correction device

Country Status (1)

Country Link
JP (1) JP2005341020A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100683415B1 (en) 2005-12-29 2007-02-22 엠텍비젼 주식회사 Method for processing dead pixel
WO2007075065A1 (en) * 2005-12-29 2007-07-05 Mtekvision Co., Ltd. Device of processing dead pixel
KR100906606B1 (en) 2007-06-28 2009-07-09 엠텍비젼 주식회사 Method and apparatus for processing dead pixel
JP2009218994A (en) * 2008-03-12 2009-09-24 Victor Co Of Japan Ltd Imaging apparatus and defective pixel correction method implemented therein
JP2009232146A (en) * 2008-03-24 2009-10-08 Mega Chips Corp Noise reduction device, and digital camera
JP2011120202A (en) * 2009-11-02 2011-06-16 Sony Corp Pixel defect correction device, imaging apparatus, pixel defect correction method, and program
JP2012028988A (en) * 2010-07-22 2012-02-09 Toshiba Corp Image processing apparatus

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100683415B1 (en) 2005-12-29 2007-02-22 엠텍비젼 주식회사 Method for processing dead pixel
WO2007075065A1 (en) * 2005-12-29 2007-07-05 Mtekvision Co., Ltd. Device of processing dead pixel
US8131111B2 (en) 2005-12-29 2012-03-06 Mtekvision Co., Ltd. Device of processing dead pixel
KR100906606B1 (en) 2007-06-28 2009-07-09 엠텍비젼 주식회사 Method and apparatus for processing dead pixel
JP2009218994A (en) * 2008-03-12 2009-09-24 Victor Co Of Japan Ltd Imaging apparatus and defective pixel correction method implemented therein
JP2009232146A (en) * 2008-03-24 2009-10-08 Mega Chips Corp Noise reduction device, and digital camera
JP2011120202A (en) * 2009-11-02 2011-06-16 Sony Corp Pixel defect correction device, imaging apparatus, pixel defect correction method, and program
JP2012028988A (en) * 2010-07-22 2012-02-09 Toshiba Corp Image processing apparatus

Similar Documents

Publication Publication Date Title
US7375749B2 (en) Method of correcting pixel defect in image sensing element, and image sensing apparatus using the same
US7593569B2 (en) Pixel defect correction device
KR100699834B1 (en) Method and apparatus for processing bayer-pattern color digital image signal
JP3747909B2 (en) Pixel defect detection correction apparatus and pixel defect detection correction method
US8964069B2 (en) Image processing device and solid-state imaging device including a defect correcting function
US20080278609A1 (en) Imaging apparatus, defective pixel correcting apparatus, processing method in the apparatuses, and program
US8593546B2 (en) Image processing apparatus, image processing method, and camera module for detecting and correcting defective pixels based on contrast and illuminance
JP2006304231A (en) Pixel defect correction device
JP2010081511A (en) Imaging device, method of changing set value, and program
JP4059686B2 (en) White spot fault complement circuit and image sensor using the white spot fault complement circuit
KR20030005009A (en) Image data correcting method and image signal processing apparatus
JP2009194776A (en) Noise filter
JP4899255B2 (en) Display device
KR0181286B1 (en) Defect compensating circuit for ccd camera
JP4679174B2 (en) Image processing apparatus and digital camera equipped with the image processing apparatus
JP2005341020A (en) Pixel defect detector and pixel defect correction device
JP2011114473A (en) Pixel defect correction device
JP2012070319A (en) Image processing method, image processing apparatus, and image processing program
JP2006166194A (en) Pixel defect detection circuit and pixel defect detection method
US9918028B2 (en) Image capturing apparatus comprising a plurality of processing circuits for correcting defective pixel by using information of defective pixel detected in different frames and control method for the same
JP2010056817A (en) Imaging apparatus
JP2005210164A (en) Correction apparatus for defective pixel
JP2007228269A (en) Image signal processing device and method
JP4287356B2 (en) Image processing method and apparatus
JP4900435B2 (en) Defective pixel output signal correction method