Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3950864B2 - Defective pixel correction apparatus and method - Google Patents
[go: Go Back, main page]

JP3950864B2 - Defective pixel correction apparatus and method - Google Patents

Defective pixel correction apparatus and method Download PDF

Info

Publication number
JP3950864B2
JP3950864B2 JP2004099726A JP2004099726A JP3950864B2 JP 3950864 B2 JP3950864 B2 JP 3950864B2 JP 2004099726 A JP2004099726 A JP 2004099726A JP 2004099726 A JP2004099726 A JP 2004099726A JP 3950864 B2 JP3950864 B2 JP 3950864B2
Authority
JP
Japan
Prior art keywords
pixel
correction
pixels
output
defective pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004099726A
Other languages
Japanese (ja)
Other versions
JP2005286824A (en
Inventor
幸助 信岡
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2004099726A priority Critical patent/JP3950864B2/en
Priority to US11/086,057 priority patent/US7542082B2/en
Publication of JP2005286824A publication Critical patent/JP2005286824A/en
Application granted granted Critical
Publication of JP3950864B2 publication Critical patent/JP3950864B2/en
Priority to US12/433,783 priority patent/US7929032B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)

Description

本発明は、撮像素子の画素欠陥の補正技術に関するものである。   The present invention relates to a technique for correcting pixel defects in an image sensor.

CCD等の撮像素子においては、二次元に配列された画素の内、その製造過程もしくは製造後において半導体の局部的な感度不良が生ずることが知られている。これらの現象が起きると、入射した光量に応じた電荷出力が得られなくなるため、撮像画像上に被写体とは無関係に白点や黒点が見て取れる、いわゆる欠陥画素となって現れる。   In an image sensor such as a CCD, it is known that local sensitivity failure of a semiconductor occurs in a manufacturing process or after manufacturing among pixels arranged in two dimensions. When these phenomena occur, it becomes impossible to obtain a charge output according to the amount of incident light, so that it appears as a so-called defective pixel in which white spots and black spots can be seen on the captured image regardless of the subject.

こうした欠陥画素の撮像出力に起因する画質劣化を信号処理によって補正するために、従来は、半導体工場で、撮像素子に含まれる欠陥画素についての欠陥信号を検出して、不揮発性メモリに予め記憶させて、撮影時に不揮発性メモリの欠陥画素信号を基に、欠陥画素補正を行なっていた。あるいは、撮像素子を用いた撮像装置側において、撮像装置のシャッターを遮光状態としたとき、所定の出力レベルを超える画素(白点欠陥画素)、並びに、撮像装置への入射光量を所定のレベルとしたとき、所定の出力レベルに達しない画素(黒点欠陥画素)の位置信号を不揮発性メモリに記憶しておいて、通常撮像時に、この不揮発性メモリに記憶されている位置信号に基づいて欠陥画素を特定し、その欠陥画素の撮像出力に代えて、例えば、1画素前の撮像出力を用いることにより、欠陥画素補正を行っていた。   Conventionally, in order to correct image quality degradation caused by imaging output of such defective pixels by signal processing, a defect signal for defective pixels included in an image sensor is detected in a semiconductor factory and stored in advance in a nonvolatile memory. At the time of shooting, defective pixel correction is performed based on the defective pixel signal of the nonvolatile memory. Alternatively, on the side of the image pickup apparatus using the image pickup device, when the shutter of the image pickup apparatus is in a light-shielded state, the pixel exceeding the predetermined output level (white point defective pixel) and the incident light amount to the image pickup apparatus are set to the predetermined level. In this case, the position signal of a pixel that does not reach the predetermined output level (black spot defective pixel) is stored in the nonvolatile memory, and the defective pixel is based on the position signal stored in the nonvolatile memory during normal imaging. And the defective pixel correction is performed by using, for example, the imaging output of the previous pixel instead of the imaging output of the defective pixel.

ところで、近年の撮像素子に求められる画素数が、以前の数十万画素程度から数百万画素に増大したこともあり、撮像素子の製造技術の進歩にも関わらず、撮像素子に現れる欠陥画素の発生確率は増大する傾向にある。特に低コストが求められる民生機器に使用される撮像素子では、その製造歩留まりを上げるためには、欠陥画素数を従来に比して桁違いに多く許容せざるを得なくなってきている。   By the way, the number of pixels required for an image sensor in recent years has increased from about several hundred thousand pixels to millions of pixels, and defective pixels appearing in the image sensor in spite of progress in manufacturing technology of the image sensor. The probability of occurrence tends to increase. In particular, in an image sensor used for a consumer device that requires low cost, in order to increase the manufacturing yield, the number of defective pixels has to be allowed to be much larger than the conventional one.

したがって、従来のように、欠陥画素の位置信号を高価な不揮発性メモリに記憶することが困難になってきている。   Accordingly, it has become difficult to store a position signal of a defective pixel in an expensive non-volatile memory as in the prior art.

こうした状況に対して、例えば特開平06−030425号公報(特許文献1)では、通常の撮像時において、ある1画素とそれに隣接する同色画素との各画素信号間のレベル差を検出し、所定の閾値判定をすることで欠陥画素補正を行い、欠陥画素の位置情報をあらかじめ記憶しておくための不揮発性メモリを省くようにしている。同様に、例えば特開2002−027323号公報(特許文献2)では、撮像素子の所定領域に含まれる欠陥画素については不揮発性メモリに記憶し、所定領域外に含まれる欠陥画素については、不揮発性メモリに記憶した欠陥画素の補正を行った後に、通常撮像時に欠陥画素の検出と補正を同時に行なうことにより、限られた不揮発性メモリであっても、多数の欠陥画素に対応するようにしている。   In response to such a situation, for example, Japanese Patent Laid-Open No. 06-030425 (Patent Document 1) detects a level difference between pixel signals of a certain pixel and the same color pixel adjacent thereto during normal imaging, and performs predetermined processing. By determining the threshold value, the defective pixel is corrected, and the nonvolatile memory for storing the position information of the defective pixel in advance is omitted. Similarly, for example, in Japanese Patent Application Laid-Open No. 2002-027323 (Patent Document 2), a defective pixel included in a predetermined area of the image sensor is stored in a nonvolatile memory, and a defective pixel included outside the predetermined area is nonvolatile. After correcting defective pixels stored in the memory, detection and correction of defective pixels are performed simultaneously during normal imaging, so that even a limited non-volatile memory can handle a large number of defective pixels. .

また、欠陥画素数を多く許容すればするほど、欠陥画素補正を多く行なわなければならないため、当然のことながら撮像装置出力画像に補正による画質劣化が増大してしまうという問題がある。   In addition, as the number of defective pixels is increased, the defective pixel correction has to be performed more. Therefore, there is a problem that the image quality deterioration due to the correction is naturally increased in the output image of the imaging apparatus.

こうした問題に対して、例えば特開平07−336602号公報(特許文献3)では、欠陥画素周辺の画素間の境界の大きさを互いに比較し、境界の大きさを順位付けすることにより、欠陥画素近傍に複雑な境界が存在している場合であっても、識別された境界のパターンごとに最適な補間方法を適用して補正による画質劣化を防止している。
特開平06−030425号公報 特開2002−027323号公報 特開平07−336602号公報
For example, Japanese Patent Application Laid-Open No. 07-336602 (Patent Document 3) solves such a problem by comparing the sizes of boundaries between pixels around defective pixels and ranking the size of the boundaries. Even when a complex boundary exists in the vicinity, an optimum interpolation method is applied to each identified boundary pattern to prevent image quality deterioration due to correction.
Japanese Patent Laid-Open No. 06-030425 JP 2002-027323 A JP 07-336602 A

しかしながら、特開平06−030425号公報においては、通常撮像時に、ある一画素と隣接する同色画素との各画素信号間のレベル差を検出し、所定の閾値判定をすることで欠陥画素補正を行なうのであるから、当然ながら被写体エッジ等の高周波成分をも誤検出して補正してしまう。このことは、正常画素の出力画像の画質を阻害してしまうことになり、この問題について十分検討されているとはいえなかった。特開2002−027323号公報においても、所定領域以外では、通常撮像時の状態で欠陥画素を判定して補正しているが、被写体エッジ等の高周波成分の誤検出に関する対応は、全く考慮されていなかった。   However, in Japanese Patent Laid-Open No. 06-030425, a defective pixel correction is performed by detecting a level difference between pixel signals of a certain pixel and an adjacent same color pixel and performing a predetermined threshold determination during normal imaging. Therefore, naturally, high-frequency components such as subject edges are also erroneously detected and corrected. This hinders the image quality of the output image of normal pixels, and it cannot be said that this problem has been sufficiently studied. In Japanese Patent Application Laid-Open No. 2002-027323, defective pixels are determined and corrected in the normal imaging state except for a predetermined area, but the correspondence regarding erroneous detection of high-frequency components such as subject edges is completely taken into consideration. There wasn't.

また、特開平07−336602号公報では、欠陥画素周辺の境界のパターンを識別する際に、欠陥画素位置はすでに特定されていることが前提にあり、今後増えつづける欠陥画素全ての位置情報を不揮発性メモリにあらかじめ記憶しなければならないという問題が残る。さらに、仮に不揮発性メモリを用いずに欠陥画素を判定し、欠陥画素周辺の境界パターンを識別したとしても、境界パターンを識別するための周辺画素に欠陥画素が含まれた場合には、境界パターンの識別自体が正しく行なわれないため、この技術で目指す効果が全く得られなくなるという問題があった。   In Japanese Patent Laid-Open No. 07-336602, it is assumed that the position of the defective pixel has already been specified when identifying the boundary pattern around the defective pixel, and the position information of all the defective pixels that will continue to increase in the future is nonvolatile. The problem remains that it must be stored in advance in the memory. Further, even if a defective pixel is determined without using a non-volatile memory and a boundary pattern around the defective pixel is identified, if the peripheral pixel for identifying the boundary pattern includes a defective pixel, the boundary pattern Since the identification itself is not performed correctly, there is a problem that the effect aimed by this technique cannot be obtained at all.

したがって、本発明は上述した課題に鑑みてなされたものであり、その目的は、画質劣化を招くことなく、欠陥画素の補正を効果的に行なえるようにすることである。   Accordingly, the present invention has been made in view of the above-described problems, and an object of the present invention is to enable correction of defective pixels effectively without causing deterioration in image quality.

上述した課題を解決し、目的を達成するために、本発明に係わる欠陥画素補正装置は、被写体像を撮像して画像信号を取得する複数の画素を備えた撮像素子の欠陥画素情報を検出する陥画素検出手段と、前記撮像素子から得られる画像信号と、前記陥画素検出手段の検出結果とに基づいて、被写体のエッジ方向を検出するエッジ方向検出手段と、前記撮像素子の欠陥画素情報を検出し、検出された欠陥画素の出力信号の補正を複数の方向の画素の信号を用いて各々行ない、複数の補正信号を生成する欠陥画素検出補正手段と、前記エッジ方向検出手段の検出結果に基づいて、前記複数の補正信号から1つの補正信号を選択する選択手段と、を具備することを特徴とする。 In order to solve the above-described problems and achieve the object, a defective pixel correction apparatus according to the present invention detects defective pixel information of an image sensor including a plurality of pixels that capture an image of a subject and acquire an image signal. a defect pixel detection means and the image signal obtained from the image sensor, based on a detection result of the defect pixel detector, the edge direction detection means for detecting an edge direction of the object, a defective pixel of the imaging device Detecting information, correcting the output signal of the detected defective pixel by using the signals of the pixels in a plurality of directions, and generating a plurality of correction signals, and detection by the edge direction detecting means And selecting means for selecting one correction signal from the plurality of correction signals based on the result .

また、本発明に係わる欠陥画素補正方法は、被写体像を撮像して画像信号を取得する複数の画素を備えた撮像素子の欠陥画素情報を検出する陥画素検出工程と、
前記撮像素子から得られる画像信号と、前記陥画素検出工程の検出結果とに基づいて、被写体のエッジ方向を検出するエッジ方向検出工程と、前記撮像素子の欠陥画素情報を検出し、検出された欠陥画素の出力信号の補正を複数の方向の画素の信号を用いて各々行ない、複数の補正信号を生成する欠陥画素検出補正工程と、前記エッジ方向検出工程の検出結果に基づいて、前記複数の補正信号から1つの補正信号を選択する選択工程と、を具備することを特徴とする。
Further, the defective pixel correction method according to the present invention, a defect pixel detection step for detecting a defective pixel information of an image pickup device having a plurality of pixels to acquire an image signal by imaging an object image,
An image signal obtained from the image sensor, based on a detection result of the defect pixel detection step, the edge direction detection step of detecting an edge direction of the object, detecting a defective pixel information of the image sensor, is detected Based on the detection results of the defective pixel detection and correction step for generating a plurality of correction signals by performing correction of the output signals of the defective pixels using the signals of the pixels in a plurality of directions, respectively, And a selection step of selecting one correction signal from the correction signals .

本発明によれば、画質劣化を招くことなく、欠陥画素の補正を効果的に行なうことが可能となる。   According to the present invention, it is possible to effectively correct a defective pixel without causing image quality degradation.

以下、本発明の好適な実施形態について説明する。   Hereinafter, preferred embodiments of the present invention will be described.

(第1の実施形態)
図1は、本発明を白黒撮像装置、または、RGB3板など各色成分毎に撮像素子を構成したカラー撮像装置の1色に関して、特に白点欠陥画素の補正を行なう欠陥画素補正装置へ適用した第1の実施形態を示す図である。
(First embodiment)
FIG. 1 shows a first embodiment in which the present invention is applied to a black-and-white image pickup device or a defective pixel correction device that corrects white point defective pixels with respect to one color of a color image pickup device having an image pickup element for each color component such as an RGB3 plate. It is a figure which shows 1 embodiment.

図1において、1−1は図示しない撮像素子からの画像信号入力端子、1−21は第1のラインメモリ、1−22は第2のラインメモリ、1−23は第3のラインメモリ、1−24は第4のラインメモリ、1−31は第1の欠陥画素仮検出部、1−32は第2の欠陥画素仮検出部、1−33は第3の欠陥画素仮検出部、1−34は第4の欠陥画素仮検出部、1−35は第5の欠陥画素仮検出部、1−4は欠陥画素仮検出用の第1の閾値入力端子、1−5は画像のエッジ方向に直交する輝度勾配方向検出部、1−6は二次元欠陥画素検出・補正部、1−7は二次元欠陥画素検出用の第2の閾値入力端子、1−8は切り替えスイッチ、1−9は補正済み画像出力端子である。   In FIG. 1, 1-1 is an image signal input terminal from an image sensor (not shown), 1-21 is a first line memory, 1-22 is a second line memory, 1-23 is a third line memory, -24 is a fourth line memory, 1-31 is a first defective pixel temporary detection unit, 1-32 is a second defective pixel temporary detection unit, 1-33 is a third defective pixel temporary detection unit, 1- 34 is a fourth defective pixel temporary detection unit, 1-35 is a fifth defective pixel temporary detection unit, 1-4 is a first threshold input terminal for temporary defective pixel detection, and 1-5 is in the edge direction of the image. An orthogonal luminance gradient direction detection unit, 1-6 is a two-dimensional defective pixel detection / correction unit, 1-7 is a second threshold input terminal for detecting a two-dimensional defective pixel, 1-8 is a changeover switch, and 1-9 is This is a corrected image output terminal.

図2は、図1の各欠陥画素仮検出部1−31〜1−35の詳細図である。   FIG. 2 is a detailed view of each defective pixel provisional detection unit 1-31 to 1-35 in FIG.

図2において、2−1は図1の画像信号入力端子1−1もしくは各ラインメモリ出力1−21〜1−24につながる画像入力端子、2−2は第1のフリップフロップ回路、2−3は第2のフリップフロップ回路、2−4は加算回路、2−5は減算回路、2−6はリミッタ回路、2−7は図1の第1の閾値入力端子1−4につながる閾値入力端子、2−8は比較回路、2−9は欠陥画素仮検出結果出力端子、2−10はリミッタ2−6の代わりに使用することが可能な絶対値算出回路である。   2, reference numeral 2-1 denotes an image input terminal 1-1 connected to the image signal input terminal 1-1 or line memory outputs 1-21 to 1-24 shown in FIG. 1, and 2-2 denotes a first flip-flop circuit. Is a second flip-flop circuit, 2-4 is an addition circuit, 2-5 is a subtraction circuit, 2-6 is a limiter circuit, and 2-7 is a threshold input terminal connected to the first threshold input terminal 1-4 in FIG. , 2-8 are comparison circuits, 2-9 is a defective pixel provisional detection result output terminal, and 2-10 is an absolute value calculation circuit that can be used in place of the limiter 2-6.

図3は図1の輝度勾配方向検出部1−5の詳細図である。   FIG. 3 is a detailed diagram of the luminance gradient direction detector 1-5 of FIG.

図3において、3−1は図1の画像信号入力端子1−1につながる第1の画像信号入力端子、3−2は図1の第1のラインメモリ出力1−21につながる第2の画像信号入力端子、3−3は図1の第2のラインメモリ出力1−22につながる第3の画像信号入力端子、3−4は図1の第3のラインメモリ出力1−23につながる第4の画像信号入力端子、3−5は図1の第4のラインメモリ出力1−24につながる第5の画像信号入力端子、3−6は図1の第1の欠陥画素仮検出部1−31の出力につながる第1の仮検出フラグ入力端子、3−7は図1の第2の欠陥画素仮検出部1−32の出力につながる第2の仮検出フラグ入力端子、3−8は図1の第3の欠陥画素仮検出部1−33の出力につながる第3の仮検出フラグ入力端子、3−9は図1の第4の欠陥画素仮検出部1−34の出力につながる第4の仮検出フラグ入力端子、3−10は図1の第5の欠陥画素仮検出部1−35の出力につながる第5の仮検出フラグ入力端子である。   In FIG. 3, 3-1 is a first image signal input terminal connected to the image signal input terminal 1-1 of FIG. 1, and 3-2 is a second image connected to the first line memory output 1-21 of FIG. A signal input terminal 3-3 is a third image signal input terminal connected to the second line memory output 1-22 in FIG. 1, and a third image signal input terminal 3-4 is connected to the third line memory output 1-23 in FIG. , 3-5 is a fifth image signal input terminal connected to the fourth line memory output 1-24 in FIG. 1, and 3-6 is a first defective pixel provisional detection unit 1-31 in FIG. The first temporary detection flag input terminal connected to the output of the second temporary detection flag input terminal 3-7, the second temporary detection flag input terminal connected to the output of the second defective pixel temporary detection unit 1-32 of FIG. A third temporary detection flag input terminal connected to the output of the third defective pixel temporary detection unit 1-33, 3-9 A fourth provisional detection flag input terminal 3-10 connected to the output of the fourth defective pixel provisional detection unit 1-34 in FIG. 1 and a third provisional output 3-10 connected to the output of the fifth defective pixel provisional detection unit 1-35 in FIG. 5 is a temporary detection flag input terminal.

3−11−1〜3−11−5は、各画像信号入力端子3−1〜3−5と、各仮検出フラグ入力端子3−6〜3−10の位相を合わせるフリップフロップ回路、3−12−1〜3−12−12は、輝度勾配方向検出の対象画素を中心として、水平方向に左右2画素ずつ、垂直方向に上下2画素ずつ、計8画素分の周辺画素値を保持するためのフリップフロップ回路、3−13−1〜3−13−12は、輝度勾配方向検出の対象画素を中心として、水平方向に左右2画素ずつ、垂直方向に上下2画素ずつ、計8画素分の仮検出フラグを保持するためのフリップフロップ回路、3−14−1〜3−14−4は、輝度勾配方向検出の対象画素を中心として垂直方向に上下2画素の各画素に対して、上下2画素の仮検出フラグ値に応じた論理式を加えるためのAND素子、3−15−1〜3−15−4は、輝度勾配方向検出の対象画素を中心として水平方向に左右2画素の各画素に対して、左右2画素の仮検出フラグ値に応じた論理式を加えるためのAND素子、3−16−1〜3−16−3は、輝度勾配方向検出の対象画素を中心として、垂直方向の微分値を算出するための演算回路、3−17−1〜3−17−3は、輝度勾配方向検出の対象画素を中心として、水平方向の微分値を算出するための演算回路、3−18は垂直方向の微分値のゲインを切り替えるための第1の切り替え部、3−19は水平方向の微分値のゲインを切り替えるための第2の切り替え部、3−20は各切り替え部3−18および3−19によりゲイン調整された、輝度勾配方向検出の対象画素を中心とした垂直微分値と水平微分値の比を演算する割り算回路、3−21は割り算回路出力3−20の逆正接関数を算出するテーブル、3−22は輝度勾配方向信号出力である。   Reference numerals 3-11-1 to 3-11-5 denote flip-flop circuits that match the phases of the image signal input terminals 3-1 to 3-5 and the temporary detection flag input terminals 3-6 to 3-10, 3- 12-1 to 13-12-12 hold the peripheral pixel values for a total of 8 pixels, centering on the target pixel of luminance gradient direction detection, 2 pixels on the left and right in the horizontal direction, and 2 pixels on the top and bottom in the vertical direction. The flip-flop circuits 3-13-1 to 13-13-12 are centered on the target pixel of luminance gradient direction detection, 2 pixels on the left and right in the horizontal direction, and 2 pixels on the top and bottom in the vertical direction for a total of 8 pixels The flip-flop circuits 3-14-1 to 3-14-4 for holding the provisional detection flag have two upper and lower two pixels for each of the upper and lower two pixels in the vertical direction around the target pixel for luminance gradient direction detection. Add a logical expression according to the temporary detection flag value of the pixel AND elements 3-15-1 to 3-15-4 have the left and right provisional detection flag values for the left and right two pixels in the horizontal direction around the target pixel for luminance gradient direction detection. AND elements 3-16-1 to 3-16-3 for adding a corresponding logical expression are arithmetic circuits for calculating a differential value in the vertical direction around the target pixel for luminance gradient direction detection. 17-1 to 3-17-3 are arithmetic circuits for calculating a horizontal differential value centering on the target pixel for luminance gradient direction detection, and 3-18 is for switching the gain of the vertical differential value. A first switching unit, 3-19 is a second switching unit for switching the gain of the differential value in the horizontal direction, and 3-20 is a luminance gradient direction whose gain is adjusted by the switching units 3-18 and 3-19. Vertical fine around the target pixel Division circuit for computing the ratio of the values and the horizontal differential value, 3-21 table for calculating the inverse tangent function of the division circuit output 3-20 is 3-22 a brightness gradient direction signal output.

図4は図1の二次元欠陥画素検出・補正部1−6の詳細図である。   FIG. 4 is a detailed view of the two-dimensional defective pixel detection / correction unit 1-6 of FIG.

図4において、4−1は図1の第1のラインメモリ1−21の出力につながる第1の画像信号入力端子、4−2は図1の第2のラインメモリ1−22の出力につながる第2の画像信号入力端子、4−3は図1の第3のラインメモリ1−23の出力につながる第3の画像信号入力端子、4−4−1〜4−4−6は、欠陥画素の検出と補正の対象となる中心画素と、その垂直、水平、斜め方向に隣接する周辺8画素分の画像信号を保持するフリップフロップ回路である。   4, 4-1 is a first image signal input terminal connected to the output of the first line memory 1-21 of FIG. 1, and 4-2 is connected to the output of the second line memory 1-22 of FIG. The second image signal input terminal, 4-3 is a third image signal input terminal connected to the output of the third line memory 1-23 in FIG. 1, and 4-4-1 to 4-4-6 are defective pixels. This is a flip-flop circuit that holds the center pixel that is the object of detection and correction, and the image signals of eight neighboring pixels adjacent in the vertical, horizontal, and diagonal directions.

4−6−1は欠陥画素の検出と補正の対象となる中心画素の垂直方向に隣接した上下2画素の平均値を算出する第1の加算回路、4−6−2は前記中心画素と前記垂直方向に隣接した上下2画素の平均値との差分値を算出する第1の減算回路、4−6−3は前記差分値が負の場合は0とする第1のリミッタ回路、4−6−4は前記第1のリミッタ回路により処理された前記差分値と閾値入力4−5の閾値とを比較し、前記差分値が前記閾値より大きい場合にHigh論理を出力する第1の比較回路、4−6−5は前記比較回路出力に応じて、前記中心画素値もしくは前記垂直方向に隣接した上下2画素の平均値を切り替える第1のスイッチ、4−6−6は前記第1のスイッチの出力である垂直方向の欠陥画素補正済み画像を出力する第1の出力端子である。   4-6-1 is a first addition circuit that calculates an average value of upper and lower two pixels adjacent to each other in the vertical direction of the center pixel to be detected and corrected, and 4-6-2 is the center pixel and the center pixel. A first subtractor circuit for calculating a difference value from the average value of the upper and lower two adjacent pixels in the vertical direction, 4-6-3 is a first limiter circuit that sets 0 when the difference value is negative, 4-6 -4 is a first comparison circuit that compares the difference value processed by the first limiter circuit with the threshold value of the threshold value input 4-5, and outputs a High logic when the difference value is greater than the threshold value; 4-6-5 is a first switch for switching the center pixel value or the average value of the upper and lower two pixels adjacent in the vertical direction according to the output of the comparison circuit, and 4-6-6 is the first switch of the first switch. A first output terminal for outputting a corrected image of defective pixels in the vertical direction as an output It is.

4−7−1は欠陥画素の検出と補正の対象となる中心画素の水平方向に隣接した左右2画素の平均値を算出する第2の加算回路、4−7−2は前記中心画素と前記水平方向に隣接した左右2画素の平均値との差分値を算出する第2の減算回路、4−7−3は前記差分値が負の場合は0とする第2のリミッタ回路、4−7−4は前記第2のリミッタ回路により処理された前記差分値と閾値入力4−5の閾値とを比較し、前記差分値が前記閾値より大きい場合にHigh論理を出力する第2の比較回路、4−7−5は前記比較回路出力に応じて、前記中心画素値もしくは前記水平方向に隣接した左右2画素の平均値を切り替える第2のスイッチ、4−7−6は前記第2のスイッチの出力である水平方向の欠陥画素補正済み画像を出力する第2の出力端子である。   4-7-1 is a second addition circuit that calculates an average value of two left and right pixels adjacent in the horizontal direction of the center pixel to be detected and corrected, and 4-7-2 is the center pixel and the center pixel. A second subtractor circuit for calculating a difference value from the average value of the left and right two adjacent pixels in the horizontal direction; 4-7-3 is a second limiter circuit that sets 0 when the difference value is negative; 4-7 -4 compares the difference value processed by the second limiter circuit with the threshold value of the threshold value input 4-5, and outputs a High logic when the difference value is larger than the threshold value; 4-7-5 is a second switch for switching the central pixel value or the average value of the two left and right pixels adjacent in the horizontal direction in accordance with the output of the comparison circuit, and 4-7-6 is the second switch. A second output terminal for outputting a horizontal defective pixel corrected image as an output It is.

4−8−1は欠陥画素の検出と補正の対象となる中心画素の斜め45度方向に隣接した斜め2画素の平均値を算出する第3の加算回路、4−8−2は前記中心画素と前記斜め45度方向に隣接した斜め2画素の平均値との差分値を算出する第2の減算回路、4−8−3は前記差分値が負の場合は0とする第3のリミッタ回路、4−8−4は前記第3のリミッタ回路により処理された前記差分値と閾値入力4−5の閾値とを比較し、前記差分値が前記閾値より大きい場合にHigh論理を出力する第3の比較回路、4−8−5は前記比較回路出力に応じて、前記中心画素値もしくは前記斜め45度方向に隣接した斜め2画素の平均値を切り替える第3のスイッチ、4−8−6は前記第3のスイッチの出力である斜め45度方向の欠陥画素補正済み画像を出力する第3の出力端子である。   4-8-1 is a third adder circuit that calculates an average value of two diagonal pixels adjacent to each other in the 45-degree direction of the center pixel to be detected and corrected, and 4-8-2 is the center pixel. And a second subtractor circuit 4-8-3 for calculating a difference value between the average value of two diagonal pixels adjacent in the 45-degree direction, and 4-8-3 is a third limiter circuit that sets 0 when the difference value is negative. 4-8-4 compares the difference value processed by the third limiter circuit with the threshold value of the threshold value input 4-5, and outputs a high logic when the difference value is larger than the threshold value. 4-8-5 is a third switch for switching the central pixel value or the average value of two diagonal pixels adjacent in the 45-degree oblique direction according to the comparison circuit output, and 4-8-6 Defect pixel corrected image in a 45 degree oblique direction, which is the output of the third switch Is a third output terminal.

4−9−1は欠陥画素の検出と補正の対象となる中心画素の斜め135度方向に隣接した斜め2画素の平均値を算出する第4の加算回路、4−9−2は前記中心画素と前記斜め135度方向に隣接した斜め2画素の平均値との差分値を算出する第4の減算回路、4−9−3は前記差分値が負の場合は0とする第4のリミッタ回路、4−9−4は前記第4のリミッタ回路により処理された前記差分値と閾値入力4−5の閾値とを比較し、前記差分値が前記閾値より大きい場合にHigh論理を出力する第4の比較回路、4−9−5は前記比較回路出力に応じて、前記中心画素値もしくは前記斜め135度方向に隣接した斜め2画素の平均値を切り替える第4のスイッチ、4−9−6は前記第4のスイッチの出力である斜め135度方向の欠陥画素補正済み画像を出力する第4の出力端子である。   4-9-1 is a fourth addition circuit that calculates an average value of two diagonal pixels adjacent to each other in the direction of diagonal 135 degrees of the central pixel to be detected and corrected, and 4-9-2 is the central pixel. And 4-9-3 is a fourth limiter circuit that calculates 0 if the difference value is negative. 4-9-4 compares the difference value processed by the fourth limiter circuit with the threshold value of the threshold value input 4-5, and outputs a high logic when the difference value is larger than the threshold value. 4-9-5 is a fourth switch for switching the central pixel value or the average value of two diagonal pixels adjacent in the oblique 135 degree direction according to the output of the comparison circuit, and 4-9-6 Defect pixel correction in the oblique 135 degree direction which is the output of the fourth switch A fourth output terminal for outputting a completed image.

図5は、図1の輝度勾配方向検出部1−5で実施している処理の理論説明図である。   FIG. 5 is a theoretical explanatory diagram of processing executed by the luminance gradient direction detection unit 1-5 in FIG.

図1〜図5に従い、第1の実施形態の動作について説明する。図1の画像信号入力端子1−1から入力された、欠陥画素を含む撮像素子の出力画像信号は、各ラインメモリ1−21〜1−24により、それぞれ1水平期間ずつ遅延され、画像信号入力端子1−1の信号を含め、合計5水平期間分の画像信号が生成される。前記5水平期間分の画像信号は、輝度勾配方向検出部1−5と、各欠陥画素仮検出部1−31〜1−35に入力される。   The operation of the first embodiment will be described with reference to FIGS. The image signal output from the image sensor including the defective pixel input from the image signal input terminal 1-1 in FIG. 1 is delayed by one horizontal period by each line memory 1-21 to 1-24, and the image signal is input. A total of five horizontal period image signals including the signal at the terminal 1-1 are generated. The image signals for the five horizontal periods are input to the luminance gradient direction detector 1-5 and the defective pixel temporary detectors 1-31 to 1-35.

輝度勾配方向検出部1−5では、前記5水平期間分の画像信号の他、前記各欠陥画素仮検出部1−31〜1−35において、欠陥画素仮検出用の第1の閾値入力端子1−4で設定される第1の閾値を用いて生成された、5水平期間分の仮検出フラグも入力され、これらに基づき、画素毎に輝度勾配方向信号が算出される。一方、各ラインメモリ1−21〜1−23の出力である、合計3水平期間分の画像信号(前記5水平期間分の画像信号の中心部分の3水平期間に当たる)は、二次元欠陥画素検出・補正部1−6に入力される。   In the luminance gradient direction detection unit 1-5, in addition to the image signals for the five horizontal periods, each defective pixel temporary detection unit 1-31 to 1-35 has a first threshold input terminal 1 for temporary defective pixel detection. Temporary detection flags for five horizontal periods generated using the first threshold set at -4 are also input, and based on these, a luminance gradient direction signal is calculated for each pixel. On the other hand, image signals for a total of three horizontal periods (corresponding to three horizontal periods in the central portion of the image signals for the five horizontal periods), which are outputs of the line memories 1-21 to 1-23, are detected by two-dimensional defective pixel detection. -It inputs into the correction | amendment part 1-6.

二次元欠陥画素検出・補正部1−6では、前記3水平期間分の画像信号それぞれについて、3画素分の画素値を生成し、中心画素と、中心画素に隣接する上下左右斜めの合計8個の周辺画素を保持すると共に、二次元欠陥画素検出用の第2の閾値入力端子1−7から設定された第2の閾値を用いて、中心画素に対し、水平方向での欠陥画素検出による補正出力の生成、垂直方向での欠陥画素検出による補正出力の生成、斜め45度方向での欠陥画素検出による補正出力の生成、斜め135度方向での欠陥画素検出による補正出力の生成、すなわち、計4方向での補正出力の生成を行なう。前記4方向での補正出力は、スイッチ1−8に送られ、前記輝度勾配方向信号に基づき、いずれかひとつの補正出力が選択され、補正済み画像出力端子1−9から出力される。   In the two-dimensional defective pixel detection / correction unit 1-6, pixel values for three pixels are generated for each of the image signals for the three horizontal periods, and a total of eight pixels that are adjacent to the center pixel and are vertically and horizontally oblique. And correcting the defect by detecting the defective pixel in the horizontal direction with respect to the center pixel using the second threshold value set from the second threshold value input terminal 1-7 for detecting the two-dimensional defective pixel. Generation of output, generation of correction output by detection of defective pixels in the vertical direction, generation of correction output by detection of defective pixels in the direction of 45 degrees diagonally, generation of correction output by detection of defective pixels in the direction of 135 degrees diagonally, ie, total A correction output is generated in four directions. The correction outputs in the four directions are sent to the switch 1-8, and one of the correction outputs is selected based on the luminance gradient direction signal, and is output from the corrected image output terminal 1-9.

前記各欠陥画素仮検出部1−31〜1−35は、各々まったく同じ構成になっており、各々の詳細な動作については図2により説明する。   Each of the defective pixel provisional detection units 1-31 to 1-35 has exactly the same configuration, and the detailed operation of each will be described with reference to FIG.

画像入力端子2−1からの画像信号は、第1のフリップフロップ回路2−2と第2のフリップフロップ回路2−3により遅延され、合計3画素分の画素が保持される。第1のフリップフロップ回路2−2の値が中心画素であり、画像入力信号2−1と第2のフリップフロップ回路2−3の保持信号の加算平均、すなわち、中心画素の左右隣接画素の平均を、加算回路2−4にて算出し、減算回路2−5にて、前記中心画素と前記左右隣接画素平均との差分値を算出する。   The image signal from the image input terminal 2-1 is delayed by the first flip-flop circuit 2-2 and the second flip-flop circuit 2-3, and a total of three pixels are held. The value of the first flip-flop circuit 2-2 is the center pixel, and the addition average of the image input signal 2-1 and the holding signal of the second flip-flop circuit 2-3, that is, the average of the left and right adjacent pixels of the center pixel Is calculated by the adder circuit 2-4, and a subtraction circuit 2-5 calculates a difference value between the central pixel and the average of the left and right adjacent pixels.

本実施形態では白点欠陥画素の検出と補正を目的としているので、前記差分値が負の場合には補正しないため、前記差分値に対して、リミッタ回路2−6においてリミット処理を行なう。なお、本実施形態ではリミット処理としたが、絶対値算出回路2−10を、リミッタ回路2−6に代えて用いることも可能であり、この場合には白点欠陥画素だけではなく、黒点欠陥画素の検出が可能となる。リミット処理後の差分値と、閾値入力2−7を比較し、前記リミット処理後の差分値が前記閾値より大きい場合には、欠陥画素仮検出結果出力2−9にHigh論理を、前記リミット処理後の差分値が前記閾値以下の場合にはLow論理を出力する。   In this embodiment, the purpose is to detect and correct white point defective pixels. Therefore, since the correction is not performed when the difference value is negative, limit processing is performed on the difference value in the limiter circuit 2-6. Although the limit processing is used in the present embodiment, the absolute value calculation circuit 2-10 can be used instead of the limiter circuit 2-6. In this case, not only the white point defect pixel but also the black point defect Pixel detection is possible. The difference value after the limit process is compared with the threshold value input 2-7. If the difference value after the limit process is larger than the threshold value, High logic is set to the defective pixel provisional detection result output 2-9, and the limit process is performed. When the subsequent difference value is less than or equal to the threshold value, a low logic is output.

輝度勾配方向検出部1−5の詳細な動作と、その処理内容について、図3および図5により説明する。   The detailed operation of the luminance gradient direction detection unit 1-5 and the processing contents thereof will be described with reference to FIGS.

図5は画像の輝度の変化が最も急激に生じている方向を、二次元平面内で求める手法を説明する図である。図5に示す如く、二次元の画像に対して基準となる軸(基準軸x)を定義しておき、前記二次元画像の任意の画素における輝度の変化が最も激しい方向が、前記基準軸xとなす角度θは、二方向の空間微分と三角関数を用いて、数学的に以下のように表すことができる。   FIG. 5 is a diagram for explaining a method for obtaining the direction in which the luminance change of an image is most abruptly generated in a two-dimensional plane. As shown in FIG. 5, a reference axis (reference axis x) is defined for the two-dimensional image, and the direction in which the luminance changes most at any pixel of the two-dimensional image is the reference axis x. Can be expressed mathematically as follows using a spatial differentiation in two directions and a trigonometric function.

θ= arctan( diffY / diffX ) …式(1)
diffY = dI(x, y)/dy …式(2)
diffX = dI(x, y)/dx …式(3)
ここで、arctanは、正接関数tanの逆関数であり、diffXとは、前記基準軸xに沿って得られる画像の空間微分値、diffYとは、前記基準軸xに直交する第2の基準軸yに沿って得られる画像の空間微分値である。各々の空間微分値は、以下の式で表されるような、FIR型ディジタルフィルタにより求めることができる。
θ = arctan (diffY / diffX) (1)
diffY = dI (x, y) / dy (2)
diffX = dI (x, y) / dx (3)
Here, arctan is an inverse function of the tangent function tan, diffX is a spatial differential value of the image obtained along the reference axis x, and diffY is a second reference axis orthogonal to the reference axis x It is a spatial differential value of an image obtained along y. Each spatial differential value can be obtained by an FIR type digital filter represented by the following equation.

diff=a(−d0−d1+d3+d4) …式(4)
ここで、aはゲインであって、サンプリング周波数に依存して決まる。ただし、本実施形態では直交する2軸の微分値の比をとるため、aは求めていない。d0、d1、d3、d4は、式(4)には表記していないd2を中心画素としたときの、左右、もしくは上下に隣接する計4画素である。また、式(4)よりも計算精度は落ちるが、以下の式であっても、空間微分値を求めることができる。タップ数の違いにより、ゲインを2倍とする必要がある。
diff = a (−d0−d1 + d3 + d4) (4)
Here, a is a gain and is determined depending on the sampling frequency. However, in the present embodiment, a is not obtained in order to obtain the ratio of the differential values of two orthogonal axes. d 0, d 1, d 3, and d 4 are a total of four pixels adjacent to the left and right or the top and bottom, where d 2 not represented in Equation (4) is the central pixel. Further, although the calculation accuracy is lower than that of the equation (4), the spatial differential value can be obtained even with the following equation. It is necessary to double the gain due to the difference in the number of taps.

diff=2a(−d1+d3) …式(5)
diff=2a(−d0+d4) …式(6)
このようにして得られる角度θは、基準軸xを0度として、90度から−90度の範囲で連続した値として算出することが出来る。従って、撮像画像に対して、例えば、水平方向と垂直方向それぞれの偏微分値を算出することにより、水平方向に対する輝度勾配方向θを求めることができる。画像のエッジ方向は、前記輝度勾配方向に直交するはず(輝度変化の最も緩やかな方向)であるから、前記角度θから一律に求めることができる。
diff = 2a (-d1 + d3) (5)
diff = 2a (-d0 + d4) (6)
The angle θ obtained in this way can be calculated as a continuous value in the range of 90 ° to −90 ° with the reference axis x as 0 °. Therefore, for example, by calculating partial differential values in the horizontal direction and the vertical direction for the captured image, the luminance gradient direction θ with respect to the horizontal direction can be obtained. Since the edge direction of the image should be orthogonal to the luminance gradient direction (the slowest direction of luminance change), it can be determined uniformly from the angle θ.

図3は、図5により説明した上記輝度勾配方向の算出部の構成例である。   FIG. 3 is a configuration example of the calculation unit of the luminance gradient direction described with reference to FIG.

画像信号入力端子1−1及び各ラインメモリ1−21〜1−24から入力された5水平期間分の、欠陥画素を含む撮像素子の画像信号は、各入力端子3−1〜3−5から入力され、前記5水平期間分の仮検出フラグは、各入力端子3−6〜3−10から入力される。   Image signals of the image sensor including defective pixels for five horizontal periods input from the image signal input terminal 1-1 and the line memories 1-21 to 1-24 are input from the input terminals 3-1 to 3-5. The provisional detection flags for the five horizontal periods are input from the input terminals 3-6 to 3-10.

図2の各欠陥画素仮検出部において前記仮検出フラグを生成する際に、1画素分の遅延が生じるため、各画像入力3−1〜3−5について、各フリップフロップ回路3−11−1〜3−11−5により1画素分遅延させ、前記仮検出フラグと前記5水平期間分の画像信号の位相を合わせている。その後、前記5水平期間分の画像信号は、各フリップフロップ回路3−12−1〜3−12−12により、中心画素(3−12−6のフリップフロップ出力)に対し、水平方向に左右2画素ずつ(3−11−3、3−12−5、3−12−7、3−12−8の各フリップフロップ出力)、垂直方向に上下2画素ずつ(3−12−2、3−12−4、3−12−10、3−12−12の各フリップフロップ出力)、計8画素分の周辺画素値が保持される。同時に、上記8画素分の周辺画素に対応した仮検出フラグも、中心画素(3−13−6のフリップフロップ出力)に対し、水平方向に左右2画素ずつ(3−8の仮検出フラグ入力、3−13−5、3−13−7、3−13−8の各フリップフロップ出力)、垂直方向に上下2画素ずつ(3−13−2、3−13−4、3−13−10、3−13−12の各フリップフロップ出力)保持される。各加減算回路3−16−1〜3−16−3は、前記中心画素の上下2画素、計4画素の隣接画素に対して、式(4)の演算を実現している。また、加減算回路3−17−1〜3−17−3では、前記中心画素の左右2画素、計4画素の隣接画素に対して、式(4)の演算を行なうものである。   When the temporary detection flag is generated in each defective pixel temporary detection unit in FIG. 2, a delay of one pixel occurs, so that each flip-flop circuit 3-11-1 for each of the image inputs 3-1 to 3-5. Are delayed by one pixel by ˜3-11-5, and the phases of the provisional detection flag and the image signal for the five horizontal periods are matched. After that, the image signals for the five horizontal periods are horizontally converted by the flip-flop circuits 3-12-1 to 13-12-12 in the horizontal direction with respect to the center pixel (3-12-6 flip-flop output). Each pixel (3-11-3, 3-12-5, 3-12-7, 3-12-8 flip-flop output), vertically two pixels (3-12-2, 3-12) -4, 3-12-10, and 3-12-12 flip-flop outputs), the peripheral pixel values for a total of 8 pixels are held. At the same time, the provisional detection flags corresponding to the peripheral pixels for the above eight pixels are also two pixels left and right in the horizontal direction with respect to the central pixel (3-13-6 flip-flop output) (3-8 provisional detection flag input, 3-13-5, 3-13-7, and 3-13-8 flip-flop outputs), two pixels in the vertical direction (3-13-2, 3-13-4, 3-13-10, 3-13-12 flip-flop outputs). Each of the addition / subtraction circuits 3-16-1 to 3-16-3 realizes the calculation of Expression (4) with respect to the adjacent pixels of two pixels above and below the central pixel, that is, a total of four pixels. In addition, the adder / subtracter circuits 3-17-1 to 3-17-3 perform the calculation of the expression (4) for the two adjacent pixels of the central pixel, that is, a total of four adjacent pixels.

ここで、各加算回路3−16−1、3−16−2では、前記中心画素に対し、上下2画素ずつ計4画素(3−12−2、3−12−4、3−12−10、3−12−12の各フリップフロップ出力)の各値と、上記4画素に各々対応する仮検出フラグ(3−13−2、3−13−4、3−13−10、3−13−12の各フリップフロップ出力)の論理否定との論理積をとった値が入力されて加算される。前記論理積は、AND素子3−14−1〜3−14−4により行なわれる。前記仮検出フラグはHigh論理のときは、対応する画素が欠陥画素と判断されることから、論理積の前に論理否定をとっている。上記のように、前記仮検出フラグによる論理積を行なうことで、式(4)のd0、d1、d3、d4のいずれの画素にも欠陥画素が含まれない場合には、垂直方向の微分値diffは、式(4)そのものにより算出されるが、もし、d0もしくはd4のいずれか一方でも欠陥画素が含まれる場合には、d0とd4を強制的に0値として、その結果、式(5)による微分値diffの算出となる。同様に、d1もしくはd3のいずれか一方でも欠陥画素が含まれる場合には、d1とd3を強制的に0値として、その結果、式(6)による微分値diffの算出となる。   Here, in each of the adder circuits 3-16-1 and 3-16-2, a total of four pixels (3-12-2, 3-12-4, 3-12-10), each of the upper and lower two pixels with respect to the central pixel. , 3-12-12 flip-flop outputs) and provisional detection flags (3-13-2, 3-13-4, 3-13-10, 3-13-) respectively corresponding to the four pixels. A value obtained by ANDing the logical negation of each of the 12 flip-flop outputs) is input and added. The logical product is performed by AND elements 3-14-1 to 3-14-4. When the temporary detection flag is high logic, the corresponding pixel is determined to be a defective pixel, and therefore logical negation is performed before the logical product. As described above, by performing a logical product using the temporary detection flag, if any of d0, d1, d3, and d4 in equation (4) does not contain a defective pixel, the differential value in the vertical direction. diff is calculated by the equation (4) itself. If either d0 or d4 includes a defective pixel, d0 and d4 are forcibly set to 0 values, and as a result, the equation (5) ) To calculate the differential value diff. Similarly, when defective pixels are included in either d1 or d3, d1 and d3 are forcibly set to 0 values, and as a result, the differential value diff is calculated by equation (6).

ここでは、d0とd1、もしくはd3とd4いずれも欠陥画素となることはないものとしている。   Here, neither d0 and d1, or d3 and d4 are assumed to be defective pixels.

同様に水平方向に対しても、各加算回路3−17−1、3−17−2において、前記中心画素に対し、左右2画素ずつ計4画素(3−11−3、3−12−5、3−12−7、3−12−8各フリップフロップ出力)の各値と、上記4画素に各々対応する仮検出フラグ(3−8の仮検出フラグ入力、3−13−5、3−13−7、3−13−8の各フリップフロップ出力)の論理否定との論理積をとった値が入力されて加算される(前記論理積は、AND素子3−15−1〜3−15−4により行なわれる)。これにより、式(4)〜式(6)のいずれかを、欠陥画素の有無により適応的に選択して微分値diffを算出する。   Similarly, in the horizontal direction, in each of the adder circuits 3-17-1 and 3-17-2, a total of four pixels (3-11-3, 3-12-5 , 3-12-7, 3-12-8 flip-flop outputs) and provisional detection flags (3-8 provisional detection flag inputs, 3-13-5, 3- 13-7 and 3-13-8 flip-flop outputs) and a logical product with the logical negation of the logical negation is input and added (the logical product is AND elements 3-15-1 to 3-15). -4). Thereby, any one of the equations (4) to (6) is adaptively selected depending on the presence / absence of the defective pixel, and the differential value diff is calculated.

式(5)および式(6)による微分値diffの算出結果は、式(4)による算出結果に対して、タップ数の関係でゲインが1/2となっている。そのため、各切り替え部3−18および3−19において、式(5)もしくは式(6)が用いられてdiffが算出される場合には、ゲイン2倍となるように切り替え制御される。   The calculation result of the differential value diff according to the equations (5) and (6) has a gain of 1/2 with respect to the calculation result according to the equation (4) due to the number of taps. Therefore, in each of the switching units 3-18 and 3-19, when the diff is calculated using the equation (5) or the equation (6), the switching is controlled so that the gain is doubled.

切り替え部3−18の出力である、垂直方向の微分値と、切り替え部3−19の出力である、水平方向の微分値は、割り算回路3−20において、比をとられ、テーブル3−21において逆正接関数による関数変換が行なわれて、水平方向を基準とした輝度勾配方向θの値として、輝度勾配方向信号出力端子3−22から出力される。前記輝度勾配方向信号は、水平方向を0度として、垂直方向90度乃至−90度の計180度の範囲を表すことができる。   The vertical differential value, which is the output of the switching unit 3-18, and the horizontal differential value, which is the output of the switching unit 3-19, are compared in the division circuit 3-20, and a table 3-21 is obtained. Is converted from the luminance gradient direction signal output terminal 3-22 as the value of the luminance gradient direction θ with respect to the horizontal direction. The luminance gradient direction signal can represent a total range of 180 degrees from 90 degrees to -90 degrees in the vertical direction, where the horizontal direction is 0 degrees.

図1の二次元欠陥画素検出・補正部1−6の詳細な動作説明を、図4により行なう。   Detailed operation of the two-dimensional defective pixel detection / correction unit 1-6 in FIG. 1 will be described with reference to FIG.

図4において、各画像信号入力端子4−1〜4−3から入力された、前記3水平期間分の画像信号(画像信号入力端子1−1から入力された画像信号と、各ラインメモリ1−21〜1−24から出力された画像信号の合計5水平期間分の画像信号の中心部分の3水平期間に当たる)を受け、各フリップフロップ回路4−4−1〜4−4−6により、中心画素(4−4−3のフリップフロップ出力)と、その垂直、水平、斜め方向に隣接する周辺8画素分の画像信号を保持する。   In FIG. 4, the image signals for the three horizontal periods (image signals input from the image signal input terminal 1-1 and the line memories 1- 1) input from the image signal input terminals 4-1 to 4-3. The image signals output from 21 to 1-24 correspond to the three horizontal periods of the central portion of the image signal for a total of five horizontal periods), and the flip-flop circuits 4-4-1 to 4-4-6 The pixel (4-4-3 flip-flop output) and the image signals for the eight neighboring pixels adjacent in the vertical, horizontal, and diagonal directions are held.

まず、前記中心画素の上下に隣接する2画素(4−4−1と4−4−5のフリップフロップ出力)が第1の加算回路4−6−1にて加算平均され、垂直方向の周辺画素平均値として算出される。前記垂直方向の周辺画素平均値は、第1の減算回路4−6−2にて前記中心画素から前記垂直方向の周辺画素平均値を差し引く差分演算され、第1のリミッタ回路4−6−3により負の値は0値にリミットされる。これは本実施形態が白点欠陥画素補正のみへ適用されることを示している。   First, two pixels (4-4-1 and 4-4-5 flip-flop outputs) adjacent to the upper and lower sides of the central pixel are added and averaged by the first adder circuit 4-6-1 to obtain a peripheral in the vertical direction. Calculated as the pixel average value. The average value of the peripheral pixels in the vertical direction is calculated by subtracting the average value of the peripheral pixels in the vertical direction from the central pixel by the first subtractor circuit 4-6-2, and the first limiter circuit 4-6-3. Will limit negative values to zero. This indicates that this embodiment is applied only to white point defect pixel correction.

前記第1のリミッタ出力は第1の比較回路4−6−4において、閾値入力端子4−5で設定された閾値と比較され、前記差分値が前記閾値より大きい場合にHigh論理が出力される。これにより、第1のスイッチ4−6−5では、第1の比較回路出力がHigh論理の場合は、中心画素を垂直方向でみた場合に欠陥画素とみられることとなり、第1の加算回路4−6−1の出力である前記垂直方向の周辺画素平均値を補正値として出力する。   The first limiter output is compared with the threshold set at the threshold input terminal 4-5 in the first comparison circuit 4-6-4, and when the difference value is larger than the threshold, High logic is output. . Thus, in the first switch 4-6-5, when the output of the first comparison circuit is high logic, the first pixel is regarded as a defective pixel when the center pixel is viewed in the vertical direction. The average value of peripheral pixels in the vertical direction, which is the output of 6-1, is output as a correction value.

第1の比較回路出力がLow論理の場合は、中心画素を垂直方向でみた場合に正常画素とみられることとなり、フリップフロップ回路4−4−3の出力である中心画素がそのまま出力される。このようにして、中心画素を垂直方向でみた欠陥画素補正出力が、第1の出力端子4−6−6から出力される。   When the first comparison circuit output is low logic, the center pixel is regarded as a normal pixel when viewed in the vertical direction, and the center pixel that is the output of the flip-flop circuit 4-4-3 is output as it is. In this way, a defective pixel correction output when the center pixel is viewed in the vertical direction is output from the first output terminal 4-6-6.

以下、同様に、中心画素を水平方向でみた欠陥画素補正処理は、4−7−1〜4−7−5の各演算回路、リミッタ、比較回路、スイッチにより行なわれ、第2の出力端子4−7−6から出力され、中心画素を斜め45度方向でみた欠陥画素補正処理は、4−8−1〜4−8−5の各演算回路、リミッタ、比較回路、スイッチにより行なわれ、第3の出力端子4−8−6から出力され、中心画素を斜め135度方向でみた欠陥画素補正処理は、4−9−1〜4−9−5の各演算回路、リミッタ、比較回路、スイッチにより行なわれ、第4の出力端子4−9−6から出力される。   Hereinafter, similarly, the defective pixel correction process in which the center pixel is seen in the horizontal direction is performed by the arithmetic circuits 4-7 to 4-7-5, limiter, comparison circuit, and switch, and the second output terminal 4. -7-6, and the defective pixel correction process in which the central pixel is seen in the oblique 45 degree direction is performed by each arithmetic circuit, limiter, comparison circuit, and switch of 4-8-1 to 4-8-5. 3 is output from the output terminal 4-8-6, and the defective pixel correction processing in which the central pixel is seen in the oblique 135 degree direction is performed by each arithmetic circuit, limiter, comparison circuit, and switch of 4-9-1 to 4-9-5. And output from the fourth output terminal 4-9-6.

図1の切り替えスイッチ1−8での切り替え制御について、詳細に説明する。   The switching control by the selector switch 1-8 in FIG. 1 will be described in detail.

図4で説明したように、欠陥画素補正対象となる中心画素に対して、垂直、水平、斜め45度、斜め135度の4方向に沿った欠陥画素補正出力は、図1でいえば二次元欠陥画素検出・補正部1−6から出力されて、切り替えスイッチ1−8に各々入力されている。また、図3で説明したように、欠陥画素補正対象となる中心画素における輝度勾配方向信号が、周辺画素に存在する可能性のある欠陥画素の有無に関わらず、安定して算出され、切り替えスイッチ1−8の制御に用いられる。   As described with reference to FIG. 4, the defective pixel correction output along the four directions of vertical, horizontal, diagonal 45 degrees, and diagonal 135 degrees with respect to the central pixel that is the defective pixel correction target is two-dimensional. Output from the defective pixel detection / correction unit 1-6 and input to the changeover switch 1-8. In addition, as described with reference to FIG. 3, the luminance gradient direction signal at the center pixel that is a defective pixel correction target is stably calculated regardless of the presence or absence of a defective pixel that may exist in the surrounding pixels. Used for control 1-8.

ここで、例えば前記輝度勾配方向信号が0度を示す場合、前記中心画素の輝度勾配が水平方向に対して最も急激に変化しているのであるから、そのエッジ方向は垂直方向ということとなり、前記垂直方向に沿った欠陥画素補正出力を選択するのが最も望ましい。同様に、前記輝度勾配方向信号が90度もしくは−90度を示す場合には、前記水平方向に沿った欠陥画素補正出力の選択が望ましく、前記輝度勾配方向信号が45度の場合には、前記斜め135度方向に沿った欠陥画素補正出力の選択、前記輝度勾配方向信号が−45度の場合には、前記斜め45度方向に沿った欠陥画素補正出力の選択が望ましいこととなる。これらの間の角度については、当然それに近い方の方向に沿った補間結果を選択すればよい。本実施例では、欠陥画素を仮に検出し、仮補正を行った後に、エッジ方向を検出しているので、エッジ方向を検出する際の誤差を少なくすることができる。また、相関のある方向で補正を行なうので精度の高い補正を実現できる。   Here, for example, when the luminance gradient direction signal indicates 0 degree, the luminance gradient of the central pixel changes most rapidly with respect to the horizontal direction, so the edge direction is the vertical direction, It is most desirable to select a defective pixel correction output along the vertical direction. Similarly, when the luminance gradient direction signal indicates 90 degrees or −90 degrees, it is desirable to select a defective pixel correction output along the horizontal direction, and when the luminance gradient direction signal is 45 degrees, When the defective pixel correction output is selected along the oblique 135 degree direction and the luminance gradient direction signal is −45 degrees, it is desirable to select the defective pixel correction output along the oblique 45 degree direction. As for the angle between these, naturally, an interpolation result along a direction closer to it may be selected. In this embodiment, since the edge direction is detected after the defective pixel is temporarily detected and temporarily corrected, an error in detecting the edge direction can be reduced. Further, since correction is performed in a correlated direction, highly accurate correction can be realized.

以上の動作により、本実施形態において、被写体のエッジ方向に沿った欠陥画素補正を、安定かつ良好に動作させることができる。   With the above operation, in this embodiment, defective pixel correction along the edge direction of the subject can be operated stably and satisfactorily.

(第2の実施形態)
図6は本発明をRGB(赤、緑、青)ベイヤ−配列の単板撮像素子を用いたカラー撮像装置に関して、特に、欠陥画素誤検出による画質劣化の目立つG画素に、適用した第2の実施形態を示す図である。
(Second Embodiment)
FIG. 6 shows a second example in which the present invention is applied to a color image pickup apparatus using a single-plate image pickup device of RGB (red, green, blue) Bayer array, particularly to a G pixel in which image quality deterioration is noticeable due to erroneous detection of defective pixels. It is a figure which shows embodiment.

図6において、6−1は図示しない撮像素子からの画像信号入力端子、6−21は第1のラインメモリ、6−22は第2のラインメモリ、6−23は第3のラインメモリ、6−24は第4のラインメモリ、6−31は第1の欠陥画素仮検出部、6−32は第2の欠陥画素仮検出部、6−34は第3の欠陥画素仮検出部、6−35は第4の欠陥画素仮検出部、6−4は欠陥画素仮検出用の第1の閾値入力端子、6−5はRとB画素用の欠陥画素補正部、6−6は画像のエッジ方向に直交する輝度勾配方向検出部、6−7は二次元欠陥画素検出・補正部、6−8は二次元欠陥画素検出用の第2の閾値入力端子、6−9は信号ミックス部、6−10はG画素とRB画素の切り替えスイッチ、6−11はG画素とRB画素の識別信号入力端子、6−12は補正済み画像出力端子である。   In FIG. 6, 6-1 is an image signal input terminal from an image sensor (not shown), 6-21 is a first line memory, 6-22 is a second line memory, 6-23 is a third line memory, 6 -24 is a fourth line memory, 6-31 is a first defective pixel temporary detection unit, 6-32 is a second defective pixel temporary detection unit, 6-34 is a third defective pixel temporary detection unit, 6- 35 is a fourth defective pixel temporary detection unit, 6-4 is a first threshold input terminal for temporary defective pixel detection, 6-5 is a defective pixel correction unit for R and B pixels, and 6-6 is an edge of an image. Luminance gradient direction detection unit orthogonal to the direction, 6-7 is a two-dimensional defective pixel detection / correction unit, 6-8 is a second threshold input terminal for two-dimensional defective pixel detection, 6-9 is a signal mixing unit, 6 -10 is a selector switch for G pixel and RB pixel, 6-11 is an identification signal input terminal for G pixel and RB pixel, 6-1 Is a corrected image output terminal.

図7は、図6の画像のエッジ方向に直交する輝度勾配方向検出部6−6の詳細図である。   FIG. 7 is a detailed view of the luminance gradient direction detector 6-6 orthogonal to the edge direction of the image of FIG.

図7において、7−1は図6の画像信号入力端子6−1につながる第1の画像信号入力端子、7−2は図6の第1のラインメモリ6−21の出力につながる第2の画像信号入力端子、7−4は図6の第3のラインメモリ6−23の出力につながる第3の画像信号入力端子、7−5は図6の第4のラインメモリ6−24の出力につながる第4の画像信号入力端子、7−6は図6の第1の欠陥画素仮検出部6−31の出力につながる第1の仮検出フラグ入力端子、7−7は図6の第2の欠陥画素仮検出部6−32の出力につながる第2の仮検出フラグ入力端子、7−9は図6の第3の欠陥画素仮検出部6−34の出力につながる第3の仮検出フラグ入力端子、7−10は図6の第4の欠陥画素仮検出部6−35の出力につながる第4の仮検出フラグ入力端子である。   In FIG. 7, 7-1 is a first image signal input terminal connected to the image signal input terminal 6-1 of FIG. 6, and 7-2 is a second image signal connected to the output of the first line memory 6-21 of FIG. An image signal input terminal, 7-4 is a third image signal input terminal connected to the output of the third line memory 6-23 in FIG. 6, and 7-5 is an output of the fourth line memory 6-24 in FIG. The fourth image signal input terminal connected, 7-6 is the first temporary detection flag input terminal connected to the output of the first defective pixel temporary detection unit 6-31 of FIG. 6, and 7-7 is the second of FIG. A second temporary detection flag input terminal connected to the output of the defective pixel temporary detection unit 6-32, and 7-9, a third temporary detection flag input connected to the output of the third defective pixel temporary detection unit 6-34 of FIG. A terminal 7-10 is a fourth temporary detection flag connected to the output of the fourth defective pixel temporary detection unit 6-35 in FIG. An input terminal.

7−11−1〜7−11−4は、各画像信号入力7−1〜7−5と、各仮検出フラグ入力7−6〜7−10の位相を合わせるフリップフロップ回路、7−12−1〜7−12−7は輝度勾配方向検出の対象画素に対して2ライン上のラインの計5画素分のG画素値を保持するためのフリップフロップ回路、7−12−8〜7−12−13は輝度勾配方向検出の対象画素に対して1ライン上のラインの計4画素分のG画素値を保持するためのフリップフロップ回路、7−12−14〜7−12−19は輝度勾配方向検出の対象画素に対して1ライン下のラインの計4画素分のG画素値を保持するためのフリップフロップ回路、7−12−20〜7−12−26は輝度勾配方向検出の対象画素に対して2ライン下のラインの計5画素分のG画素値を保持するためのフリップフロップ回路、7−13−1〜7−13−5は輝度勾配方向検出の対象画素に対して2ライン上のラインの各G画素に対応する仮検出フラグを保持するフリップフロップ回路、7−13−8〜7−13−11は輝度勾配方向検出の対象画素に対して1ライン上のラインの各G画素に対応する仮検出フラグを保持するフリップフロップ回路、7−13−14〜7−13−17は輝度勾配方向検出の対象画素に対して1ライン下のラインの各G画素に対応する仮検出フラグを保持するフリップフロップ回路、7−13−20〜7−13−24は輝度勾配方向検出の対象画素に対して2ライン下のラインの各G画素に対応する仮検出フラグを保持するフリップフロップ回路である。   7-11-1 to 7-11-4 are flip-flop circuits that match the phases of the image signal inputs 7-1 to 7-5 and the temporary detection flag inputs 7-6 to 7-10. 1 to 7-12-7 are flip-flop circuits for holding G pixel values for a total of five pixels on two lines with respect to the target pixel of luminance gradient direction detection, and 7-12-8 to 7-12. −13 is a flip-flop circuit for holding G pixel values for a total of four pixels on one line with respect to the target pixel of the luminance gradient direction detection, and 7-12-14 to 7-12-19 are luminance gradients. Flip-flop circuit 7-12-20 to 7-12-26 for holding G pixel values for a total of four pixels of the line one line below the direction detection target pixel, 7-12-20 to 7-12-26 are luminance gradient direction detection target pixels G pixel value for a total of 5 pixels in the line 2 lines below Flip-flop circuits for holding, 7-13-1 to 7-13-5 are flip-flops for holding temporary detection flags corresponding to the G pixels of the line on two lines with respect to the target pixel of the luminance gradient direction detection. Circuits 7-13-8 to 7-13-11 are flip-flop circuits for holding temporary detection flags corresponding to the G pixels on one line with respect to the target pixel of the luminance gradient direction detection, 7-13. 14 to 7-13-17 are flip-flop circuits for holding temporary detection flags corresponding to the G pixels in the line one line below the target pixel for luminance gradient direction detection, and 7-13-20 to 7-13. Reference numeral 24 denotes a flip-flop circuit that holds a temporary detection flag corresponding to each G pixel in the line two lines below the target pixel for luminance gradient direction detection.

7−14−1〜7−14−4は輝度勾配方向検出の対象画素に対して、斜め135度方向に隣接した計4個のG画素のいずれかが欠陥画素の場合に、予め補正処理を行なう補正ブロック、7−14−5〜7−14−8は輝度勾配方向検出の対象画素に対して斜め45度方向に隣接した計4個のG画素のいずれかが欠陥画素の場合に、予め補正処理を行なう補正ブロックである。   7-14-1 to 7-14-4 perform correction processing in advance when any of the four G pixels adjacent in the oblique 135 ° direction is a defective pixel with respect to the target pixel of the luminance gradient direction detection. The correction block 7-14-5 to 7-14-8 is performed in advance when any of the four G pixels adjacent to the target pixel of the luminance gradient direction detection obliquely in the direction of 45 degrees is a defective pixel. It is a correction block for performing correction processing.

7−15−1〜7−15−3は前記斜め135度方向に隣接した計4個のG画素を用いた微分演算を行なう加減算回路、7−16−1〜7−16−3は前記斜め45度方向に隣接した計4個のG画素を用いた微分演算を行なう加減算回路、7−17は第1の絶対値算出回路、7−18は第2の絶対値算出回路、7−19は比較回路、7−20は第1の切り替えスイッチ、7−21は第2の切り替えスイッチ、7−22は割り算回路、7−23は輝度勾配方向フラグ出力端子、7−24は輝度勾配方向信号出力端子である。   Reference numerals 7-15-1 to 7-15-3 denote addition / subtraction circuits for performing a differential operation using a total of four G pixels adjacent in the oblique 135 degree direction, and 7-16-1 to 7-16-3 denotes the oblique operation. Addition / subtraction circuit for performing differential operation using a total of four G pixels adjacent in the 45 degree direction, 7-17 is a first absolute value calculation circuit, 7-18 is a second absolute value calculation circuit, and 7-19 is Comparison circuit, 7-20 is a first changeover switch, 7-21 is a second changeover switch, 7-22 is a division circuit, 7-23 is a luminance gradient direction flag output terminal, and 7-24 is a luminance gradient direction signal output. Terminal.

図8は、図7の各補正ブロック7−14−1〜7−14−8の詳細図である。   FIG. 8 is a detailed view of each of the correction blocks 7-14-1 to 7-14-8 in FIG.

図8において、8−1と8−2は周辺画素入力端子、8−3は中心画素入力端子、8−4は仮検出フラグ入力端子、8−5は加算平均を演算する加算回路、8−6は切り替えスイッチ、8−7は補正出力である。   In FIG. 8, 8-1 and 8-2 are peripheral pixel input terminals, 8-3 is a central pixel input terminal, 8-4 is a temporary detection flag input terminal, 8-5 is an adder circuit for calculating an addition average, 8- 6 is a changeover switch, and 8-7 is a correction output.

図9は、図6の二次元欠陥画素検出・補正部6−7の詳細図である。   FIG. 9 is a detailed view of the two-dimensional defective pixel detection / correction unit 6-7 in FIG.

図9において9−1は図6の画像信号入力端子6−1につながる第1の画像信号入力端子、9−2は図6の第1のラインメモリ6−21の出力につながる第2の画像信号入力端子、9−3は図6の第2のラインメモリ6−22の出力につながる第3の画像信号入力端子、9−4は図6の第3のラインメモリ6−23の出力につながる第4の画像信号入力端子、9−5は図6の第4のラインメモリ6−24の出力につながる第5の画像信号入力端子である。   9, 9-1 is a first image signal input terminal connected to the image signal input terminal 6-1 in FIG. 6, and 9-2 is a second image connected to the output of the first line memory 6-21 in FIG. The signal input terminal, 9-3 is connected to the third image signal input terminal connected to the output of the second line memory 6-22 of FIG. 6, and 9-4 is connected to the output of the third line memory 6-23 of FIG. A fourth image signal input terminal 9-5 is a fifth image signal input terminal connected to the output of the fourth line memory 6-24 in FIG.

9−6−1〜9−6−14は、欠陥画素検出と補正の対象画素と、前記対象画素を中心として、垂直方向に隣接する4画素、および、水平方向に隣接する4画素、および、斜め45度方向に隣接する2画素、および、斜め135度方向に隣接する2画素の、計13個の画素を保持するためのフリップフロップ回路である。   9-6-1 to 9-6-14 are defective pixel detection and correction target pixels, four pixels adjacent in the vertical direction around the target pixel, four pixels adjacent in the horizontal direction, and This is a flip-flop circuit for holding a total of 13 pixels, two pixels adjacent in a 45-degree direction and two pixels adjacent in a 135-degree direction.

9−7−1は前記対象画素に対して斜め135度方向に欠陥画素検出と補正を行なう第1の検出・補正回路、9−7−2は前記対象画素に対して垂直方向に欠陥画素検出と補正を行なう第2の検出・補正回路、9−7−3は前記対象画素に対して水平方向に欠陥画素検出と補正を行なう第3の検出・補正回路、9−7−4は前記対象画素に対して斜め45度方向に欠陥画素検出と補正を行なう第4の検出・補正回路である。   9-7-1 is a first detection / correction circuit that detects and corrects a defective pixel in a direction of 135 degrees obliquely with respect to the target pixel, and 9-7-2 detects a defective pixel in a direction perpendicular to the target pixel. 9-7-3 is a third detection / correction circuit for detecting and correcting defective pixels in the horizontal direction with respect to the target pixel, and 9-7-4 is the target. This is a fourth detection / correction circuit for detecting and correcting defective pixels in a 45-degree oblique direction with respect to the pixels.

9−8は図6の二次元欠陥画素検出用の第2の閾値入力端子6−8につながる閾値入力端子、9−9は斜め135度方向の補正画像信号出力端子、9−10は垂直方向の補正画像信号出力端子、9−11は水平方向の補正画像信号出力端子、9−12は斜め45度方向の補正画像信号出力端子である。   9-8 is a threshold input terminal connected to the second threshold input terminal 6-8 for detecting a two-dimensional defective pixel in FIG. 6, 9-9 is a corrected image signal output terminal in a diagonal 135 degree direction, and 9-10 is a vertical direction. The corrected image signal output terminal 9-11 is a corrected image signal output terminal in the horizontal direction, and 9-12 is a corrected image signal output terminal in the oblique 45 degree direction.

図10は、図9の各検出・補正回路9−7−1〜9−7−4の詳細図である。   FIG. 10 is a detailed diagram of each of the detection / correction circuits 9-7-1 to 9-7-4 in FIG.

図10において、10−1および10−2は欠陥画素検出と補正の対象画素に隣接する周辺画素が入力される画像入力端子、10−3は欠陥画素検出と補正の対象画素が入力される画像入力端子、10−4は閾値入力端子、10−5は前記周辺画素の加算平均を算出する加算回路、10−6は前記加算平均と前記対象画素値との差分を算出する減算回路、10−7は絶対値算出回路、10−8は比較回路、10−9は切り替えスイッチ、10−10は補正画像出力端子である。   In FIG. 10, 10-1 and 10-2 are image input terminals to which peripheral pixels adjacent to the defective pixel detection and correction target pixels are input, and 10-3 is an image to which the defective pixel detection and correction target pixels are input. An input terminal, 10-4 is a threshold input terminal, 10-5 is an addition circuit for calculating an addition average of the peripheral pixels, and 10-6 is a subtraction circuit for calculating a difference between the addition average and the target pixel value. 7 is an absolute value calculation circuit, 10-8 is a comparison circuit, 10-9 is a changeover switch, and 10-10 is a corrected image output terminal.

図11は、図6の信号ミックス部6−9において、前記輝度勾配方向信号と前記輝度勾配方向フラグに応じて、前記図9の各補正画像信号9−9〜9−12のミックス制御の説明図である。   FIG. 11 illustrates the mix control of each of the corrected image signals 9-9 to 9-12 in FIG. 9 according to the luminance gradient direction signal and the luminance gradient direction flag in the signal mixing unit 6-9 in FIG. FIG.

図6〜図11を用いて、本発明の第2の実施形態の動作について説明する。   The operation of the second embodiment of the present invention will be described with reference to FIGS.

図6の画像信号入力端子6−1から入力された、欠陥画素を含む撮像素子の出力画像信号は、各ラインメモリ6−21〜6−24により、それぞれ1水平期間ずつ遅延され、画像信号入力端子6−1の信号を含め、合計5水平期間分の画像信号が生成される。前記5水平期間分の画像信号は、二次元欠陥画素検出・補正部6−7に入力され、欠陥画素の検出と補正の対象画素を中心として、垂直、水平、斜め45度、斜め135度の計4方向に沿った欠陥画素の検出と補正が行なわれ、各々の補正画像出力が出力される。その詳細な動作については、図9と図10により後述する。   The output image signal of the image sensor including the defective pixel input from the image signal input terminal 6-1 in FIG. 6 is delayed by one horizontal period by each line memory 6-21 to 6-24, and the image signal is input. A total of five horizontal period image signals including the signal at the terminal 6-1 are generated. The image signals for the five horizontal periods are input to the two-dimensional defective pixel detection / correction unit 6-7, and the vertical, horizontal, diagonal 45 degrees, and diagonal 135 degrees are centered on the defective pixel detection and correction target pixels. Detection and correction of defective pixels along a total of four directions are performed, and respective corrected image outputs are output. The detailed operation will be described later with reference to FIGS.

次に、前記5水平期間分の画像信号の内、それらの中央ラインである第2のラインメモリ6−22の出力画像信号は、RとB画素用の欠陥画素補正部6−5に送られ、従来と同様の処理内容により、欠陥画素の検出と補正が行なわれる。また、前記5水平期間分の画像信号のうち、前記中央ライン以外の計4水平期間分の画像信号は、各欠陥画素仮検出部6−31〜6−35と、画像のエッジ方向に直交する輝度勾配方向検出部6−6に送られ、図7と図8を用いて後述するように、前記欠陥画素の検出と補正の対象画素における、輝度勾配方向信号、および、輝度勾配方向フラグが生成される。   Next, among the image signals for the five horizontal periods, the output image signal of the second line memory 6-22, which is the center line thereof, is sent to the defective pixel correction unit 6-5 for R and B pixels. Detecting and correcting defective pixels is performed by the same processing contents as in the prior art. Among the image signals for the five horizontal periods, the image signals for a total of four horizontal periods other than the central line are orthogonal to the defective pixel temporary detection units 6-31 to 6-35 and the edge direction of the image. As will be described later with reference to FIGS. 7 and 8, a luminance gradient direction signal and a luminance gradient direction flag are generated in the target pixel for detection and correction of the defective pixel. Is done.

前記垂直、水平、斜め45度、斜め135度の計4方向に沿った補正画像出力と、前記輝度勾配方向信号および輝度勾配方向フラグは、信号ミックス部6−9に送られ、図11により後述するように、前記輝度勾配方向信号および輝度勾配方向フラグに応じて、前記垂直、水平、斜め45度、斜め135度の計4方向に沿った補正画像出力の混合処理が行なわれて二次元欠陥画素補正出力として出力される。前記二次元欠陥画素補正出力は、本実施形態ではG画素にのみ有効であるため、切り替えスイッチ6−10において、G画素とRB画素の識別信号入力6−11に従って、前記二次元欠陥画素補正出力と、前記RとB画素用の欠陥画素補正部出力6−5を切り替えて、補正済み画像出力端子6−12より出力される。   The corrected image output along a total of four directions of the vertical, horizontal, diagonal 45 degrees, and diagonal 135 degrees, the luminance gradient direction signal, and the luminance gradient direction flag are sent to the signal mixing unit 6-9, which will be described later with reference to FIG. As described above, in accordance with the luminance gradient direction signal and the luminance gradient direction flag, the correction image output is mixed along the total of the four directions of the vertical, horizontal, oblique 45 degrees, and oblique 135 degrees to perform a two-dimensional defect. Output as pixel correction output. Since the two-dimensional defective pixel correction output is effective only for the G pixel in this embodiment, the two-dimensional defective pixel correction output is performed at the changeover switch 6-10 according to the identification signal input 6-11 for the G pixel and the RB pixel. The defective pixel correction unit output 6-5 for the R and B pixels is switched and output from the corrected image output terminal 6-12.

引き続き、各要素の説明を行なう。図6の二次元欠陥画素検出・補正部6−7は、図9に示すように、前記5水平期間分の画像信号が、各画像信号入力端子9−1〜9−5より与えられ、各フリップフロップ回路9−6−1〜9−6−14により、各ラインそれぞれ複数画素分が保持されることとなる。すなわち、第3の画像信号入力端子9−2より与えられる2水平期間遅れの画像信号が、欠陥画素検出と補正の対象画素を含む中心のラインであり、ここでは前記対象画素と、その左右2画素分の、計5画素分が保持される(9−3の入力と9−6−6〜9−6−9のフリップフロップ出力)。前記対象画素はフリップフロップ出力9−6−7となる。   Next, each element will be described. As shown in FIG. 9, the two-dimensional defective pixel detection / correction unit 6-7 in FIG. 6 receives the image signals for the five horizontal periods from the image signal input terminals 9-1 to 9-5. The flip-flop circuits 9-6-1 to 9-6-14 hold a plurality of pixels for each line. That is, the image signal delayed by two horizontal periods given from the third image signal input terminal 9-2 is a central line including the target pixel for defective pixel detection and correction. Here, the target pixel and its right and left 2 A total of 5 pixels are retained (9-3 input and 9-6-6 to 9-6-9 flip-flop output). The target pixel becomes the flip-flop output 9-6-7.

前記対象画素を含む中心のラインの、上下のラインについては、前記対象画素と同じ水平位置の画素およびその左右1画素分の、計3画素が保持される(9−6−3〜9−6−5のフリップフロップ出力と、9−6−10〜9−6−12のフリップフロップ出力)。さらに、前記上下のラインのさらに上下のラインについては、前記対象画素と同じ水平位置の画素が保持される(9−6−2と9−6−14の各フリップフロップ出力)。9−6−1と9−6−13は遅延調整のためのフリップフロップである。   With respect to the upper and lower lines of the central line including the target pixel, a total of three pixels are held (9-6-3 to 9-6) corresponding to the pixel at the same horizontal position as the target pixel and its left and right pixels. -5 flip-flop output and 9-6-10-9-6-12 flip-flop output). Further, for the upper and lower lines of the upper and lower lines, the pixels at the same horizontal position as the target pixel are held (the flip-flop outputs of 9-6-2 and 9-6-14). Reference numerals 9-6-1 and 9-6-13 are flip-flops for delay adjustment.

上述したように、本実施形態は、RGBベイヤ−配列の単板撮像素子を用いたカラー撮像装置の、特に、欠陥画素誤検出による画質劣化の目立つG画素にのみに本発明を適用したものであることから、前記対象画素をG画素と見た場合に、9−1〜9−5の各画像信号入力、および9−6−1〜9−6−14の各フリップフロップで保持されているG画素は以下のようになる。   As described above, the present embodiment is an embodiment in which the present invention is applied only to a color image pickup apparatus using an RGB Bayer array single-plate image pickup device, in particular, only to G pixels in which image quality deterioration is conspicuous due to erroneous detection of defective pixels. For this reason, when the target pixel is regarded as a G pixel, it is held by the image signal inputs 9-1 to 9-5 and the flip-flops 9-6-1 to 9-6-14. The G pixel is as follows.

前記対象画素の垂直方向に隣接するG画素は、9−6−2と9−6−14の各フリップフロップ出力であり、水平方向に隣接するG画素は、9−3の画像信号入力と9−6−9のフリップフロップ出力であり、斜め45度に隣接するG画素は、9−6−10と9−6−5の各フリップフロップ出力であり、斜め135度に隣接するG画素は、9−6−3と9−6−12の各フリップフロップ出力である。   The G pixels adjacent in the vertical direction of the target pixel are the flip-flop outputs of 9-6-2 and 9-6-14, and the G pixels adjacent in the horizontal direction are the image signal input of 9-3 and 9 G-pixels that are -6-9 flip-flop outputs and are adjacent to each other at 45 degrees diagonally are the outputs of 9-6-10 and 9-6-5 flip-flops. These are the flip-flop outputs of 9-6-3 and 9-6-12.

このようにして各フリップフロップに保持された画素値のうち、前記対象画素と斜め135度方向に隣接するG画素は第1の検出・補正回路9−7−1へ、前記対象画素と垂直方向に隣接するG画素は第2の検出・補正回路9−7−2へ、前記対象画素と水平方向に隣接するG画素は第3の検出・補正回路9−7−3へ、前記対象画素と斜め45度方向に隣接するG画素は第4の検出・補正回路9−7−4へ送られ、図10に示すように、4方向各々に対して、隣接画素平均値と対象画素との差分値の閾値処理により、欠陥画素か否かを判定し、欠陥画素と判定された場合には、前記隣接画素平均値を補正値として、対象画素に変えて出力している。以上により、9−9〜9−12の各出力においては、前記対象画素を、垂直、水平、斜め45度、斜め135度の4方向で欠陥画素検出・補正した画像信号が出力される。   Of the pixel values held in the respective flip-flops in this way, the G pixel adjacent to the target pixel in the oblique direction of 135 degrees is sent to the first detection / correction circuit 9-7-1 in the direction perpendicular to the target pixel. G pixel adjacent to the second detection / correction circuit 9-7-2, and the G pixel adjacent to the target pixel in the horizontal direction to the third detection / correction circuit 9-7-3 G pixels that are adjacent in the 45-degree direction are sent to the fourth detection / correction circuit 9-7-4, and as shown in FIG. 10, the difference between the average value of the adjacent pixels and the target pixel in each of the four directions. Whether or not the pixel is defective is determined by the threshold processing of the value. If the pixel is determined to be defective, the adjacent pixel average value is output as a correction value instead of the target pixel. As described above, in each output of 9-9 to 9-12, an image signal in which the target pixel is detected and corrected in four directions of vertical, horizontal, 45 degrees oblique, and 135 degrees oblique is output.

図6の輝度勾配方向検出部6−6の詳細な動作について図7および図2により説明する。   The detailed operation of the luminance gradient direction detection unit 6-6 in FIG. 6 will be described with reference to FIGS.

輝度勾配方向検出部においては、前記欠陥画素検出と補正の対象画素を含む中心のライン以外の上下2ラインずつ計4ライン分の画像信号が、各画像信号入力端子7−1〜7−5から入力される。前記4ライン分の画像信号は、まず、フリップフロップ回路7−11−1〜7−11−4により、後述する仮検出フラグとの位相合わせの後、それぞれ、各フリップフロップ回路7−12−1〜7−12−26にて各ラインに応じた複数画素分の画像信号が保持される。前記輝度勾配方向検出部においては、前記欠陥画素検出と補正の対象画素は入力されないが、前記対象画素がG画素である場合、7−1〜7−5の各画像信号入力と、各フリップフロップ回路7−12−1〜7−12−26で保持された画像信号のうち、同じくG画素となるのは、各ライン別に以下のとおりとなる。   In the luminance gradient direction detection unit, a total of four lines of image signals are provided from each of the image signal input terminals 7-1 to 7-5 except for the center line including the defective pixel detection and correction target pixels. Entered. The image signals for the four lines are first subjected to phase matching with a temporary detection flag (to be described later) by flip-flop circuits 7-11-1 to 7-11-4, and then each flip-flop circuit 7-12-1. Image signals for a plurality of pixels corresponding to each line are held at ˜7-12-26. In the luminance gradient direction detection unit, the target pixel for the defective pixel detection and correction is not input, but when the target pixel is a G pixel, each image signal input of 7-1 to 7-5 and each flip-flop Of the image signals held by the circuits 7-12-1 to 7-12-26, the same G pixel is as follows for each line.

前記対象画素ラインより2ライン上のラインでは、7−1の画像信号入力と、7−12−1、7−12−3、7−12−5、7−12−7の各フリップフロップ出力、前記対象ラインより1ライン上のラインでは、7−11−2、7−12−9、7−12−11、7−12−13の各フリップフロップ出力、前記撮像ラインより1ライン下のラインでは、7−11−3、7−12−15、7−12−17、7−12−19の各フリップフロップ出力、前記撮像ラインより2ライン下のラインでは、7−5の画像信号入力と、7−12−20、7−12−22、7−12−24、7−12−26の各フリップフロップ出力となる。   In a line two lines above the target pixel line, an image signal input of 7-1 and outputs of flip-flops of 7-12-1, 7-12-3, 7-12-5, 7-12-7, 7-11-2, 7-12-9, 7-12-11, 7-12-13 flip-flop output in the line one line above the target line, and in the line one line below the imaging line 7-11-3, 7-12-15, 7-12-17, 7-12-19 flip-flop outputs, and in the line 2 lines below the imaging line, 7-5 image signal input, 7-12-20, 7-12-22, 7-12-24, and 7-12-26 flip-flop outputs.

前記対象画素における輝度勾配方向を検出するために、図5で説明したように、二つの基準軸に沿った微分値を算出する必要があるが、本実施形態においては、RGBベイヤ−配列のG画素の配列の特徴にあわせている。   In order to detect the luminance gradient direction in the target pixel, as described with reference to FIG. 5, it is necessary to calculate differential values along two reference axes. In this embodiment, the RGB Bayer array G It matches the characteristics of the pixel array.

すなわち、対象画素の斜め45度方向と、斜め135度方向にみた方が、対象画素との相関距離が短く、かつ、各ライン上でG画素を得られることから、これらの方向を基準軸にとるものとしている。そのため、微分値の算出に用いるG画素としては、斜め45度方向では、7−12−5、7−12−11、7−12−15、7−12−20の4個のフリップフロップ出力となり、斜め135度方向では、7−12−1、7−12−9、7−12−17、7−12−24の4個のフリップフロップ出力となる。すなわち、前記対象画素を中心として、各方向で隣接4画素を用いた微分値算出を行なうこととなり、前記式(4)に従い、前記7−12−5、7−12−11、7−12−15、7−12−20、および、7−12−1、7−12−9、7−12−17、7−12−24の各フリップフロップ出力を用いて算出すればよい。ただし、前記7−12−5、7−12−11、7−12−15、7−12−20、および、7−12−1、7−12−9、7−12−17、7−12−24の各フリップフロップ出力である各画素の中に、欠陥画素が含まれると、正しく微分値を算出できないので、前記7−12−5、7−12−11、7−12−15、7−12−20、および、7−12−1、7−12−9、7−12−17、7−12−24の各フリップフロップ出力をそのまま微分値算出に用いるのではなく、それらに対して、水平方向に隣接する左右2画素のG画素を用いた補正処理を、7−14−1〜7−14−8の各補正ブロックにおいて行ってから微分値演算している。   That is, since the correlation distance with the target pixel is shorter and the G pixel can be obtained on each line when viewing the target pixel in the oblique 45 degree direction and the oblique 135 degree direction, these directions are used as reference axes. It is supposed to be taken. Therefore, the G pixels used for calculating the differential value are four flip-flop outputs 7-12-5, 7-12-11, 7-12-15, and 7-12-20 in the 45-degree direction. In the diagonal direction of 135 degrees, four flip-flop outputs 7-12-1, 7-12-9, 7-12-17, and 7-12-24 are obtained. That is, the differential value is calculated using the four adjacent pixels in each direction with the target pixel as the center, and according to the equation (4), the above 7-12-5, 7-12-11, 7-12. 15, 7-12-20, and 7-12-1, 7-12-9, 7-12-17, 7-12-24. However, 7-12-5, 7-12-11, 7-12-15, 7-12-20, and 7-12-1, 7-12-9, 7-12-17, 7-12. Since a differential value cannot be calculated correctly if a defective pixel is included in each pixel that is each flip-flop output of −24, 7-12-5, 7-12-11, 7-12-15, 7 -12-20, and 7-12-1, 7-12-9, 7-12-17, 7-12-24 flip-flop outputs are not directly used for differential value calculation, The differential value calculation is performed after the correction processing using the two right and left G pixels adjacent in the horizontal direction is performed in each of the correction blocks 7-14-1 to 7-14-8.

前記各補正ブロックにて補正処理を行なうか否かの判別は、各検出フラグ入力7−6〜7−10より与えられ、7−13−1〜7−13−24で保持された各画素に対応した仮検出フラグを参照して行なわれる。前記仮検出フラグは、第1の実施形態において図2にて説明した通りに生成され、欠陥画素であると判定された場合にはHigh論理となっている。ただし、本実施形態では、図2において絶対値算出回路2−10を用いることにより、白点欠陥画素および黒点欠陥画素のいずれであっても仮検出フラグがHighとなるようにするものとする。   The determination as to whether or not the correction processing is performed in each correction block is given from each detection flag input 7-6 to 7-10, and each pixel held by 7-13-1 to 7-13-24 is determined. This is performed with reference to the corresponding temporary detection flag. The temporary detection flag is generated as described in FIG. 2 in the first embodiment, and becomes High logic when it is determined that the pixel is a defective pixel. However, in the present embodiment, by using the absolute value calculation circuit 2-10 in FIG. 2, the temporary detection flag is set to be high regardless of whether the pixel is a white point defective pixel or a black point defective pixel.

前記各補正ブロックにおける入力をまとめると、以下のとおりとなる。補正ブロック7−14−1では、前記7−12−1の出力と、前記7−12−1に水平方向に隣接したG画素である7−1の画像信号入力と、7−12−3の出力と、前記7−12−1に対応した仮検出フラグである7−13−1の出力が入力される。補正ブロック7−14−2では、前記7−12−9の出力と、前記7−12−9に水平方向に隣接したG画素である7−11−2の出力と、7−12−11の出力と、前記7−12−9に対応した仮検出フラグである7−13−9の出力が入力される。補正ブロック7−14−3では、前記7−12−17の出力と、前記7−12−17に水平方向に隣接したG画素である7−12−15の出力と、7−12−19の出力と、前記7−12−17に対応した仮検出フラグである7−13−17の出力が入力される。補正ブロック7−14−4では、前記7−12−24の出力と、前記7−12−24に水平方向に隣接したG画素である7−12−22の出力と、7−12−26の出力と、前記7−12−24に対応した仮検出フラグである7−13−24の出力が入力される。補正ブロック7−14−5では、前記7−12−5の出力と、前記7−12−5に水平方向に隣接したG画素である7−12−3の出力と、7−12−7の出力と、前記7−12−5に対応した仮検出フラグである7−13−5の出力が入力される。補正ブロック7−14−6では、前記7−12−11の出力と、前記7−12−11に水平方向に隣接したG画素である7−12−9の出力と、7−12−13の出力と、前記7−12−11に対応した仮検出フラグである7−13−11の出力が入力される。補正ブロック7−14−7では、前記7−12−15の出力と、前記7−12−15に水平方向に隣接したG画素である7−11−3の出力と、7−12−17の出力と、前記7−12−15に対応した仮検出フラグである7−13−15の出力が入力される。補正ブロック7−14−8では、前記7−12−20の出力と、前記7−12−20に水平方向に隣接したG画素である7−5の画像信号入力と、7−12−22の出力と、前記7−12−20に対応した仮検出フラグである7−13−20の出力が入力される。   The inputs in each correction block are summarized as follows. In the correction block 7-14-1, the output of 7-12-1, the image signal input of 7-1 which is a G pixel horizontally adjacent to the 7-12-1, and the output of 7-12-3. The output and the output of 7-13-1, which is a temporary detection flag corresponding to the above 7-12-1, are input. In the correction block 7-14-2, the output of 7-12-9, the output of 7-11-2 which is a G pixel adjacent to the 7-12-9 in the horizontal direction, and the output of 7-12-11 The output and the output of 7-13-9 which is a provisional detection flag corresponding to 7-12-9 are input. In the correction block 7-14-3, the output of 7-12-17, the output of 7-12-15 which is a G pixel adjacent to the 7-12-17 in the horizontal direction, and 7-12-19 The output and the output of 7-13-17, which is a temporary detection flag corresponding to 7-12-17, are input. In the correction block 7-14-4, the output of 7-12-24, the output of 7-12-22 which is a G pixel adjacent to the 7-12-24 in the horizontal direction, and 7-12-26 The output and the output of 7-13-24, which is a temporary detection flag corresponding to 7-12-24, are input. In the correction block 7-14-5, the output of 7-12-5, the output of 7-12-3 which is a G pixel adjacent to the 7-12-5 in the horizontal direction, and the output of 7-12-7 The output and the output of 7-13-5, which is a temporary detection flag corresponding to 7-12-5, are input. In the correction block 7-14-6, the output of 7-12-11, the output of 7-12-9 which is a G pixel adjacent to the 7-12-11 in the horizontal direction, and 7-12-13 The output and the output of 7-13-11, which is a temporary detection flag corresponding to the 7-12-11, are input. In the correction block 7-14-7, the output of 7-12-15, the output of 7-11-3 which is a G pixel adjacent to the 7-12-15 in the horizontal direction, and 7-12-17 The output and the output of 7-13-15, which is a temporary detection flag corresponding to the 7-12-15, are input. In the correction block 7-14-8, the output of 7-12-20, the input of an image signal of 7-5 which is a G pixel adjacent to the 7-12-20 in the horizontal direction, and the output of 7-12-22 The output and the output of 7-13-20, which is a temporary detection flag corresponding to 7-12-20, are input.

以上述べた7−14−1〜7−14−8の各補正ブロックの内容は、全て共通で、図8のとおりとなっている。すなわち、前記水平方向に隣接したG画素は、周辺画素入力端子8−1と8−2から入力され、前記微分値算出の対象となるG画素は、中心画素入力端子8−3から入力され、前記仮検出フラグは、仮検出フラグ入力端子8−4から入力され、8−5は加算平均を演算する加算回路、8−6は切り替えスイッチにより、仮検出フラグがHighのとき、すなわち、前記微分値算出の対象となるG画素が欠陥画素と判断されるときは、前記隣接したG画素からの加算平均値を選択して出力することとなる。   The contents of the correction blocks 7-14-1 to 7-14-8 described above are all common and are as shown in FIG. That is, the G pixel adjacent in the horizontal direction is input from the peripheral pixel input terminals 8-1 and 8-2, and the G pixel to be subjected to the differential value calculation is input from the center pixel input terminal 8-3. The temporary detection flag is input from the temporary detection flag input terminal 8-4, 8-5 is an addition circuit for calculating an addition average, 8-6 is a changeover switch, and when the temporary detection flag is high, that is, the differentiation When the G pixel whose value is to be calculated is determined as a defective pixel, the addition average value from the adjacent G pixel is selected and output.

以上説明したように、前記各微分値算出に用いるG画素の欠陥画素の影響は抑圧され、各加減算回路7−15−1〜7−15−3および7−16−1〜7−16−3により、前記式(4)の微分値算出の演算が実行され、前記斜め45度方向、および斜め135度方向の二つの微分値が算出される。前記二つの微分値は、各絶対値算出回路7−17と7−18において、その絶対値が求められ、比較回路7−19において、いずれの方向の微分値が、大きいかが判定される。   As described above, the influence of defective pixels of the G pixel used for calculating each differential value is suppressed, and each of the addition / subtraction circuits 7-15-1 to 7-15-3 and 7-16-1 to 7-16-3. Accordingly, the calculation of the differential value calculation of the equation (4) is executed, and the two differential values in the oblique 45 degree direction and the oblique 135 degree direction are calculated. The absolute values of the two differential values are obtained in the absolute value calculation circuits 7-17 and 7-18, and in which direction the differential value is larger is determined in the comparison circuit 7-19.

前記比較回路の判定結果は輝度勾配方向フラグ出力端子7−23から出力されるとともに、各切り替えスイッチ7−20と7−21の制御に用いられる。各切り替えスイッチ7−20と7−21では、その後段の割り算回路7−22において、分母が分子以上の状態になるように切り替え制御する。すなわち、斜め45度方向の微分値の大きさが、斜め135度方向の微分値の大きさより大きい場合には、割り算回路7−22では、斜め135度/斜め45度が演算されるように切り替え、逆の場合には、斜め45度/斜め135度が演算されるように切り替える。このように、割り算回路での演算を、常に分母が大きくなるようにすると、前記式(1)の逆正接関数を省略しても、演算結果の誤差が小さくなり、割り算の結果をそのまま輝度勾配方向信号として用いることができる。また、分母は常に分子以上であるから、前記輝度勾配方向信号は、±1の範囲におさまる値となる。こうして得られた前記輝度勾配方向信号は、輝度勾配方向信号出力端子7−24から出力される。   The determination result of the comparison circuit is output from the luminance gradient direction flag output terminal 7-23 and is used to control the changeover switches 7-20 and 7-21. In each of the change-over switches 7-20 and 7-21, the division circuit 7-22 at the subsequent stage performs switching control so that the denominator is in a state equal to or higher than the numerator. That is, when the magnitude of the differential value in the oblique 45 degree direction is larger than the magnitude of the differential value in the oblique 135 degree direction, the division circuit 7-22 switches so as to calculate the oblique 135 degree / diagonal 45 degree. In the opposite case, switching is performed so that 45 degrees / 135 degrees is calculated. As described above, when the calculation in the division circuit is made to always have a large denominator, even if the arctangent function of the equation (1) is omitted, the error of the calculation result is small, and the result of the division is directly used as the luminance gradient. It can be used as a direction signal. Further, since the denominator is always greater than or equal to the numerator, the luminance gradient direction signal has a value that falls within a range of ± 1. The luminance gradient direction signal thus obtained is output from the luminance gradient direction signal output terminal 7-24.

次に、図6の信号ミックス部6−9の動作の詳細な説明を行なう。   Next, detailed operation of the signal mix unit 6-9 in FIG. 6 will be described.

前記輝度勾配方向フラグとして、斜め45度方向の微分値の大きさ>斜め135度方向の微分値の大きさの場合に、フラグ=High論理となるものとすると、図6の信号ミックス部6−9における動作は以下のとおりとなる。   As the luminance gradient direction flag, when the magnitude of the differential value in the oblique 45 ° direction> the magnitude of the differential value in the oblique 135 ° direction, the flag = High logic, the signal mixing unit 6-6 in FIG. The operation in 9 is as follows.

図11はその動作を概念的に説明したもので、まず、前記信号ミックス部に入力される輝度勾配方向フラグと輝度勾配方向との関係は、前記フラグがHigh論理=斜め45度方向(図11ではd1と表記)が輝度勾配方向0度となることを意味しており、前記フラグがLow論理=斜め135度方向(図11ではd2と表記)が輝度勾配方向0度となることを意味する。従って、例えば、輝度勾配方向がちょうど45度である場合には、前記輝度勾配方向信号は0で、前記輝度勾配方向フラグはHigh論理である。同様に135度である場合には、前記輝度勾配方向信号は0で、前記輝度勾配方向フラグはLow論理となる。   FIG. 11 conceptually illustrates the operation. First, the relationship between the luminance gradient direction flag and the luminance gradient direction input to the signal mixing unit is as follows. Means that the luminance gradient direction is 0 degree, and the flag indicates that Low logic = an oblique 135 degree direction (denoted as d2 in FIG. 11) is 0 degree luminance gradient direction. . Thus, for example, if the luminance gradient direction is exactly 45 degrees, the luminance gradient direction signal is 0 and the luminance gradient direction flag is high logic. Similarly, when the angle is 135 degrees, the luminance gradient direction signal is 0, and the luminance gradient direction flag is low logic.

次に、斜め45度方向から垂直方向(図11ではVと表記)の間では、前記輝度勾配方向フラグはHigh論理で、前記輝度勾配方向信号は0〜1の間の値となる。同様に斜め45度方向から水平方向(図11ではHと表記)の間では前記フラグはHigh論理で、前記輝度勾配方向信号は0〜−1の間の値となる。   Next, between the oblique 45 degree direction and the vertical direction (denoted as V in FIG. 11), the luminance gradient direction flag has a high logic, and the luminance gradient direction signal has a value between 0 and 1. Similarly, the flag has a high logic between 45 degrees and a horizontal direction (indicated as H in FIG. 11), and the luminance gradient direction signal has a value between 0 and -1.

同様に斜め135度方向から垂直方向の間では、前記フラグがLow、前記輝度勾配方向信号が0〜1の間の値、斜め135度と水平方向の間では、前記フラグがLow、前記勾配方向信号が0〜−1の間の値となる。   Similarly, the flag is low and the luminance gradient direction signal is a value between 0 and 1 between the diagonal direction of 135 degrees and the vertical direction, and the flag is low and the gradient direction is between 135 degrees and the horizontal direction. The signal is a value between 0 and -1.

さて、図6の信号ミックス部6−9には、図6の二次元欠陥画素検出・補正部6−7より、前記欠陥画素の検出と補正の対象画素を中心に、垂直、水平、斜め45度、斜め135度の4方向で欠陥画素補正した補正画像信号が入力されており、それら4個の補正画像信号をミックスして、二次元補正画像信号を生成するが、本実施形態では、以下に従って行なう。   Now, the signal mix unit 6-9 in FIG. 6 receives vertical, horizontal, and diagonal 45 pixels from the two-dimensional defective pixel detection / correction unit 6-7 in FIG. The corrected image signal corrected for defective pixels in four directions of 1 degree and 135 degrees is input, and the four corrected image signals are mixed to generate a two-dimensional corrected image signal. In this embodiment, Follow the instructions.

すなわち、前記フラグがHighで、前記輝度勾配方向信号が正値の場合、前記欠陥画素の検出と補正の対象画素における輝度変化は、斜め45度と垂直方向の間のいずれかの方向が最も激しいのであるから、二次元補正画像信号としては、水平方向の補正画像信号と、斜め135度方向の補正画像信号を、前記輝度勾配方向信号の絶対値をゲインとして、重み付け加算することにより、画像のエッジの劣化を最小限に止めながら欠陥画素補正することができる。   That is, when the flag is high and the luminance gradient direction signal is a positive value, the luminance change in the target pixel for detection and correction of the defective pixel is most severe in any direction between 45 degrees and the vertical direction. Therefore, as the two-dimensional corrected image signal, the corrected image signal in the horizontal direction and the corrected image signal in the oblique 135 degree direction are weighted and added by using the absolute value of the luminance gradient direction signal as a gain, thereby obtaining an image of the image. It is possible to correct defective pixels while minimizing edge degradation.

以下、同様に、前記フラグHighで前記輝度勾配方向信号が負値の場合、垂直方向の補正画像信号と斜め135度方向の補正画像信号の重み付け加算、前記フラグLowで前記輝度勾配方向信号が正値の場合、水平方向の補正画像信号と、斜め45度方向の補正画像信号の重み付け加算、前記フラグLowで前記輝度勾配方向信号が負値の場合、垂直方向の補正画像信号と斜め45度方向の補正画像信号の重み付け加算を行なうことにより、最も良好な欠陥画素補正を行なうことができる。   Hereinafter, similarly, when the luminance gradient direction signal is negative with the flag High, weighted addition of the corrected image signal in the vertical direction and the corrected image signal in the oblique 135 degree direction, and the luminance gradient direction signal is positive with the flag Low. In the case of the value, the weighted addition of the corrected image signal in the horizontal direction and the corrected image signal in the oblique 45 degree direction, and when the luminance gradient direction signal is negative with the flag Low, the corrected image signal in the vertical direction and the inclined 45 degree direction By performing the weighted addition of the corrected image signals, it is possible to perform the best defective pixel correction.

このように、欠陥画素誤検出による画質劣化の目立つG画素の欠陥画素補正を本実施形態のように行なえば、より画質のよい画像が得られる。   As described above, when the defective pixel correction of the G pixel in which the image quality deterioration due to the defective pixel erroneous detection is conspicuous is performed as in the present embodiment, an image with higher image quality can be obtained.

以上説明したように、上記の実施形態によれば、エッジ方向を検出する際に用いる所定範囲の画素の中に欠陥画素があったとしても、当該欠陥画素によるエッジ方向検出精度の低下を防止することができ、不揮発性メモリにあらかじめ欠陥画素位置を記憶する必要がない。従って、不揮発性メモリに欠陥画素の位置情報を書き込むための工程そのものを廃止することができ、撮像装置自体の生産性についても飛躍的な向上が見込まれる。   As described above, according to the above-described embodiment, even if a defective pixel is included in a predetermined range of pixels used when detecting the edge direction, a decrease in edge direction detection accuracy due to the defective pixel is prevented. Therefore, it is not necessary to previously store the defective pixel position in the nonvolatile memory. Accordingly, the process itself for writing the position information of the defective pixel in the nonvolatile memory can be abolished, and the productivity of the imaging apparatus itself is expected to be dramatically improved.

さらに、不揮発性メモリを使用した欠陥画素補正では、撮像素子の製造後に新たに発生する欠陥画素への対応をする必要があり、従来は、例えば特開2001−218115号公報、特開2001−257939号公報にあるように、欠陥画素追加のための操作が必要であったが、上記の実施形態によれば、製造後に新たに発生する欠陥画素も問題なく補正することができる。   Further, in the defective pixel correction using the nonvolatile memory, it is necessary to cope with a defective pixel newly generated after the image pickup device is manufactured. Conventionally, for example, Japanese Patent Application Laid-Open Nos. 2001-218115 and 2001-257939. However, according to the above-described embodiment, a defective pixel newly generated after manufacturing can be corrected without any problem.

さらに、被写体のエッジ方向に沿って欠陥画素を検出して、被写体のエッジ方向に沿って前記欠陥画素を補正するので、被写体エッジ等の高周波成分の誤検出を生ずることなく、極めて良好な欠陥画素補正を実現することができる。   Further, since defective pixels are detected along the edge direction of the subject and the defective pixels are corrected along the edge direction of the subject, extremely good defective pixels are generated without causing erroneous detection of high-frequency components such as the subject edge. Correction can be realized.

本発明は、撮像素子を使用した撮像装置、例えば、ディジタルカメラ、ビデオカメラ、カメラ付き携帯電話などに対して、全てに利用可能である。   The present invention can be applied to all image pickup apparatuses using an image pickup device, such as a digital camera, a video camera, and a camera-equipped mobile phone.

本発明の第1の実施形態の欠陥画素補正装置を示す図である。It is a figure which shows the defective pixel correction apparatus of the 1st Embodiment of this invention. 図1の各欠陥画素仮検出部の詳細図である。FIG. 2 is a detailed view of each defective pixel provisional detection unit in FIG. 1. 図1の輝度勾配方向検出部の詳細図である。FIG. 2 is a detailed diagram of a luminance gradient direction detection unit in FIG. 1. 図1の二次元欠陥画素検出・補正部の詳細図である。FIG. 2 is a detailed view of a two-dimensional defective pixel detection / correction unit in FIG. 1. 図1の輝度勾配方向検出処理の理論説明図である。FIG. 2 is a theoretical explanatory diagram of luminance gradient direction detection processing in FIG. 1. 本発明の第2の実施形態の欠陥画素補正装置を示す図である。It is a figure which shows the defective pixel correction apparatus of the 2nd Embodiment of this invention. 図6の画像のエッジ方向に直交する輝度勾配方向検出部の詳細図である。FIG. 7 is a detailed diagram of a luminance gradient direction detection unit orthogonal to the edge direction of the image of FIG. 6. 図7の各補正ブロックの詳細図である。FIG. 8 is a detailed view of each correction block in FIG. 7. 図6の二次元欠陥画素検出・補正部の詳細図である。FIG. 7 is a detailed diagram of a two-dimensional defective pixel detection / correction unit in FIG. 6. 図9の各検出・補正回路の詳細図である。FIG. 10 is a detailed diagram of each detection / correction circuit in FIG. 9. 図6の信号ミックス部の各補正画像信号のミックス制御の説明図である。It is explanatory drawing of the mix control of each correction | amendment image signal of the signal mix part of FIG.

符号の説明Explanation of symbols

1−1 画像信号入力端子
1−21 第1のラインメモリ
1−22 第2のラインメモリ
1−23 第3のラインメモリ
1−24 第4のラインメモリ
1−31 第1の欠陥画素仮検出部
1−32 第2の欠陥画素仮検出部
1−33 第3の欠陥画素仮検出部
1−34 第4の欠陥画素仮検出部
1−35 第5の欠陥画素仮検出部
1−4 第1の閾値入力端子
1−5 輝度勾配方向検出部
1−6 二次元欠陥画素検出・補正部
1−7 第2の閾値入力端子
1−8 切り替えスイッチ
1−9 補正済み画像出力端子
6−1 画像信号入力端子
6−21 第1のラインメモリ
6−22 第2のラインメモリ
6−23 第3のラインメモリ
6−24 第4のラインメモリ
6−31 第1の欠陥画素仮検出部
6−32 第2の欠陥画素仮検出部
6−34 第3の欠陥画素仮検出部
6−35 第4の欠陥画素仮検出部
6−4 第1の閾値入力端子
6−5 RとB画素用の欠陥画素補正部
6−6 輝度勾配方向検出部
6−7 二次元欠陥画素検出・補正部
6−8 第2の閾値入力端子
6−9 信号ミックス部
6−10 G画素とRB画素の切り替えスイッチ
6−11 G画素とRB画素の識別信号入力
6−12 補正済み画像出力端子
1-1 Image signal input terminal 1-21 1st line memory 1-22 2nd line memory 1-23 3rd line memory 1-24 4th line memory 1-31 1st defective pixel temporary detection part 1-32 Second defective pixel provisional detection unit 1-33 Third defective pixel provisional detection unit 1-34 Fourth defective pixel provisional detection unit 1-35 Fifth defective pixel provisional detection unit 1-4 First Threshold input terminal 1-5 Luminance gradient direction detection unit 1-6 Two-dimensional defective pixel detection / correction unit 1-7 Second threshold input terminal 1-8 Changeover switch 1-9 Corrected image output terminal 6-1 Image signal input Terminal 6-21 1st line memory 6-22 2nd line memory 6-23 3rd line memory 6-24 4th line memory 6-31 1st defective pixel temporary detection part 6-32 2nd Defective Pixel Temporary Detection Unit 6-34 Third Defect Image Temporary detection unit 6-35 Fourth defective pixel temporary detection unit 6-4 First threshold input terminal 6-5 Defective pixel correction unit for R and B pixels 6-6 Luminance gradient direction detection unit 6-7 Two-dimensional defect Pixel Detection / Correction Unit 6-8 Second Threshold Input Terminal 6-9 Signal Mix Unit 6-10 G Pixel and RB Pixel Changeover Switch 6-11 G Pixel and RB Pixel Identification Signal Input 6-12 Corrected Image Output Terminal

Claims (3)

被写体像を撮像して画像信号を取得する複数の画素を備えた撮像素子の欠陥画素情報を検出する陥画素検出手段と、
前記撮像素子から得られる画像信号と、前記陥画素検出手段の検出結果とに基づいて、被写体のエッジ方向を検出するエッジ方向検出手段と、
前記撮像素子の欠陥画素情報を検出し、検出された欠陥画素の出力信号の補正を複数の方向の画素の信号を用いて各々行ない、複数の補正信号を生成する欠陥画素検出補正手段と、
前記エッジ方向検出手段の検出結果に基づいて、前記複数の補正信号から1つの補正信号を選択する選択手段と、
を具備することを特徴とする欠陥画素補正装置。
A defect pixel detection means for detecting a defective pixel information of an image pickup device having a plurality of pixels to acquire an image signal by imaging an object image,
An image signal obtained from the image sensor, on the basis of the detection result of the defect pixel detector, the edge direction detection means for detecting an edge direction of the object,
Defective pixel detection and correction means for detecting defective pixel information of the image sensor, performing correction of output signals of the detected defective pixels, respectively, using signals of pixels in a plurality of directions, and generating a plurality of correction signals;
Selection means for selecting one correction signal from the plurality of correction signals based on the detection result of the edge direction detection means;
A defective pixel correction apparatus comprising:
前記撮像素子の複数の画素は、2次元状に配列されており、前記陥画素検出手段は、前記撮像素子から得られる画像信号の一次元方向について、欠陥画素を検出することを特徴とする請求項に記載の欠陥画素補正装置。 A plurality of pixels of the image sensor are arranged two-dimensionally, the defect pixel detection means for one-dimensional direction of an image signal obtained from the image sensor, and detects the defective pixel The defective pixel correction apparatus according to claim 1 . 被写体像を撮像して画像信号を取得する複数の画素を備えた撮像素子の欠陥画素情報を検出する陥画素検出工程と、
前記撮像素子から得られる画像信号と、前記陥画素検出工程の検出結果とに基づいて、被写体のエッジ方向を検出するエッジ方向検出工程と、
前記撮像素子の欠陥画素情報を検出し、検出された欠陥画素の出力信号の補正を複数の方向の画素の信号を用いて各々行ない、複数の補正信号を生成する欠陥画素検出補正工程と、
前記エッジ方向検出工程の検出結果に基づいて、前記複数の補正信号から1つの補正信号を選択する選択工程と、
を具備することを特徴とする欠陥画素補正方法。
A defect pixel detection step for detecting a defective pixel information of an image pickup device having a plurality of pixels to acquire an image signal by imaging an object image,
An image signal obtained from the image sensor, on the basis of the detection result of the defect pixel detection step, the edge direction detection step of detecting an edge direction of the object,
Detecting defective pixel information of the image sensor, performing a correction of the output signal of the detected defective pixel, respectively using a pixel signal in a plurality of directions, and generating a plurality of correction signals, a defective pixel detection correction step,
A selection step of selecting one correction signal from the plurality of correction signals based on the detection result of the edge direction detection step;
A defective pixel correction method comprising:
JP2004099726A 2004-03-30 2004-03-30 Defective pixel correction apparatus and method Expired - Fee Related JP3950864B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2004099726A JP3950864B2 (en) 2004-03-30 2004-03-30 Defective pixel correction apparatus and method
US11/086,057 US7542082B2 (en) 2004-03-30 2005-03-22 Method and apparatus for correcting a defective pixel
US12/433,783 US7929032B2 (en) 2004-03-30 2009-04-30 Method and apparatus for correcting a defective pixel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004099726A JP3950864B2 (en) 2004-03-30 2004-03-30 Defective pixel correction apparatus and method

Publications (2)

Publication Number Publication Date
JP2005286824A JP2005286824A (en) 2005-10-13
JP3950864B2 true JP3950864B2 (en) 2007-08-01

Family

ID=35184723

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004099726A Expired - Fee Related JP3950864B2 (en) 2004-03-30 2004-03-30 Defective pixel correction apparatus and method

Country Status (1)

Country Link
JP (1) JP3950864B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5175670B2 (en) * 2008-09-25 2013-04-03 株式会社東芝 Edge detection apparatus and method
CN102576455B (en) * 2009-07-02 2015-05-20 斯基恩特-X公司 Reduction of noise caused by absorption of X-ray photons in pixelated image sensors
WO2011061983A1 (en) * 2009-11-18 2011-05-26 コニカミノルタエムジー株式会社 Radiation image capturing system and console
JP5957106B2 (en) * 2015-02-12 2016-07-27 キヤノン株式会社 Image processing apparatus, image processing apparatus control method, and program

Also Published As

Publication number Publication date
JP2005286824A (en) 2005-10-13

Similar Documents

Publication Publication Date Title
US7929032B2 (en) Method and apparatus for correcting a defective pixel
US8077228B2 (en) Processing of sensor values in imaging systems
US7777791B2 (en) Defective pixel correction device
US8699820B2 (en) Image processing apparatus, camera apparatus, image processing method, and program
US7656443B2 (en) Image processing apparatus for correcting defect pixel in consideration of distortion aberration
JP2005102134A (en) Image processing apparatus and method, recording medium, and program
US8736743B2 (en) Color imaging element, imaging device, and storage medium storing a control program for imaging device
US8723992B2 (en) Color imaging element, imaging device, and storage medium storing an imaging program
US8842214B2 (en) Color imaging element, imaging device, and storage medium storing an imaging program
CN102111544A (en) Camera module, image processing apparatus, and image recording method
WO2013183378A1 (en) Imaging apparatus, image processing apparatus, and image processing method
US9503661B2 (en) Imaging apparatus and image processing method
US8804016B2 (en) Color imaging element, imaging device, and storage medium storing an imaging program
JP3950864B2 (en) Defective pixel correction apparatus and method
US8922684B2 (en) Imaging device, control method for imaging device, and storage medium storing a control program for imaging device
JP2011114473A (en) Pixel defect correction device
JP2008252397A (en) Imaging data processing method and imaging apparatus
JP3662949B2 (en) Signal interpolation method
US8957997B2 (en) Image sensor and image data processing method using the same
KR20240143209A (en) Image signal processor and method for processing image signal
JP6525522B2 (en) Image processing apparatus and image processing method
CN117256158A (en) Method for detecting defective pixels and image processor unit
JP2001016599A (en) Pixel defect correction device, pixel defect detector and pixel defect detecting method
US12506978B2 (en) Image signal processor and processing method capable of determining directionality strength information
CN121367831A (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070115

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070315

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070413

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070423

R150 Certificate of patent or registration of utility model

Ref document number: 3950864

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110427

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130427

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130427

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140427

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees