JP2012134783A - Image processor and image processing method - Google Patents

Image processor and image processing method Download PDF

Info

Publication number
JP2012134783A
JP2012134783A JP2010285363A JP2010285363A JP2012134783A JP 2012134783 A JP2012134783 A JP 2012134783A JP 2010285363 A JP2010285363 A JP 2010285363A JP 2010285363 A JP2010285363 A JP 2010285363A JP 2012134783 A JP2012134783 A JP 2012134783A
Authority
JP
Japan
Prior art keywords
pixel
pixels
defective
image
ratio
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.)
Granted
Application number
JP2010285363A
Other languages
Japanese (ja)
Other versions
JP5737929B2 (en
Inventor
Takeshi Ogawa
武志 小川
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 JP2010285363A priority Critical patent/JP5737929B2/en
Publication of JP2012134783A publication Critical patent/JP2012134783A/en
Application granted granted Critical
Publication of JP5737929B2 publication Critical patent/JP5737929B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processor for highly accurately detecting a defective pixel of an imaging device by utilizing a pupil-divided luminous flux.SOLUTION: The image processor includes: focus degree evaluation means for processing images obtained from the imaging device including a plurality of first pixels and a plurality of second pixels for respectively photoelectrically converting pupil-divided first luminous flux and second luminous flux and evaluating a focus degree using the output of the first pixels and the second pixels; defect detection means for detecting the defective pixel of the imaging device; interpolation means for interpolating the defective pixel; and signal processing means for generating a photographed image using the output of the first pixels, the second pixels and the pixels obtained by interpolating the defective pixel. The defect detection means determines whether or not a first specified pixel or a second specified pixel is a defective pixel by comparing the first ratio of pixel values of the first specified pixel of the plurality of first pixels and the second specified pixel of the plurality of second pixels with the second ratio of the pixel values of a first vicinity pixel positioned near the first specified pixel and a second vicinity pixel positioned near the second specified pixel.

Description

本発明は、撮像素子の欠陥画素を検出して画像処理を行う画像処理装置に関する。   The present invention relates to an image processing apparatus that performs image processing by detecting defective pixels of an image sensor.

従来から、撮像素子における欠陥画素の補正方法として、製造工程において検出用のチャートを撮影して欠陥を検出し、検出した欠陥位置を製品ROMに記憶させ、欠陥補正を行う方法がある。一方、撮像素子の製造工程では欠陥ではなかった画素が実使用時に欠陥画素となる場合がある。この場合、被写体を撮影しながら欠陥画素を検出する必要がある。また、従来から、撮像素子のマイクロレンズ1つにつき複数のフォトダイオードを配置して光束の瞳分割を行い、位相差に基づいてデフォーカス量を計算して焦点検出を行う焦点検出方法がある。   Conventionally, as a method for correcting defective pixels in an image sensor, there is a method in which a defect is detected by photographing a detection chart in a manufacturing process, the detected defect position is stored in a product ROM, and defect correction is performed. On the other hand, pixels that were not defective in the manufacturing process of the image sensor may become defective pixels during actual use. In this case, it is necessary to detect defective pixels while photographing the subject. Conventionally, there has been a focus detection method in which a plurality of photodiodes are arranged for each microlens of the image sensor to divide the pupil of the light beam, calculate the defocus amount based on the phase difference, and perform focus detection.

特許文献1には、特定画素と近傍画素との画像値の差を利用して欠陥画素候補を検出し、欠陥画素候補が誤検出か否かを画像のエッジ部か否かで判定して誤検出を防ぐ構成が開示されている。また特許文献2には、撮像素子のマイクロレンズ1つにつき複数のフォトダイオードを配置して瞳分割を行う構成が開示されている。瞳分割したそれぞれの画素群に投影された被写体の投影位置のずれ量と方向からデフォーカス量とデフォーカス方向を計算して焦点検出を行う。   In Patent Document 1, a defective pixel candidate is detected using a difference between image values of a specific pixel and a neighboring pixel, and whether or not the defective pixel candidate is erroneously detected is determined based on whether it is an edge portion of the image. A configuration for preventing detection is disclosed. Patent Document 2 discloses a configuration in which a plurality of photodiodes are arranged for each microlens of the image sensor to perform pupil division. The focus detection is performed by calculating the defocus amount and the defocus direction from the shift amount and direction of the projection position of the subject projected on each pixel group divided by the pupil.

特許第3984936号Japanese Patent No. 3984936 特開2001−083407号公報JP 2001-083407 A

しかしながら、特許文献1に開示された方法では、画像のエッジではない場所の欠陥部分に関して誤検出が生じる。またこの方法では、欠陥画素か否かを判定するためのしきい値を高めると欠陥検出漏れによるノイズの増大を招き、逆にしきい値を低下させると誤検出により本来画像にあるべき輝度の起伏を補正して消してしまう。一方、特許文献2のように撮像素子のマイクロレンズ1つにつき複数のフォトダイオードを配置して光束の瞳分割を行う構成において、その構成の特性を利用した欠陥画素検出方法は提案されていない。   However, in the method disclosed in Patent Document 1, erroneous detection occurs with respect to a defective portion that is not an edge of an image. In this method, if the threshold value for determining whether or not the pixel is a defective pixel is increased, noise is increased due to defect detection failure. Conversely, if the threshold value is decreased, the undulation of the luminance that should originally be present in the image is caused by erroneous detection. Corrects and disappears. On the other hand, in a configuration in which a plurality of photodiodes are arranged per microlens of an image sensor as in Patent Document 2 and pupil division of a light beam is performed, a defective pixel detection method using characteristics of the configuration has not been proposed.

そこで本発明は、瞳分割された光束を利用して撮像素子の欠陥画素を高精度に検出する画像処理装置及び画像処理方法を提供する。   Therefore, the present invention provides an image processing apparatus and an image processing method for detecting defective pixels of an image sensor with high accuracy using a pupil-divided light beam.

本発明の一側面としての画像処理装置は、撮像光学系からの光束を瞳分割して第1光束及び第2光束を得て、該第1光束を光電変換する複数の第1画素及び該第2光束を光電変換する複数の第2画素を含む撮像素子を用いて得られた画像を処理する画像処理装置であって、前記複数の第1画素及び前記複数の第2画素の出力を用いて合焦度を評価する合焦度評価手段と、前記合焦度評価手段により評価された前記合焦度が所定値以上である場合に、前記撮像素子の欠陥画素を検出する欠陥検出手段と、前記欠陥検出手段により検出された前記欠陥画素を補間する補間手段と、前記複数の第1画素、前記複数の第2画素、及び、前記補間手段により前記欠陥画素を補間して得られた画素の出力を用いて撮影画像を生成する信号処理手段とを有し、前記欠陥検出手段は、前記複数の第1画素の第1特定画素と前記複数の第2画素の第2特定画素との画素値の第1比率と、該第1特定画素の近傍に位置する第1近傍画素と該第2特定画素の近傍に位置する第2近傍画素との画素値の第2比率とを比較することにより、該第1特定画素又は該第2特定画素が前記欠陥画素であるか否かを判定する。   An image processing apparatus according to one aspect of the present invention includes a plurality of first pixels that photoelectrically convert a first light beam and a second light beam by subjecting a light beam from an imaging optical system to pupil division and the first pixel. An image processing apparatus that processes an image obtained using an imaging device including a plurality of second pixels that photoelectrically convert two light beams, and using outputs of the plurality of first pixels and the plurality of second pixels A degree-of-focus evaluation means for evaluating the degree of focus; and a defect detection means for detecting a defective pixel of the image sensor when the degree of focus evaluated by the degree-of-focus evaluation means is a predetermined value or more; Interpolation means for interpolating the defective pixels detected by the defect detection means, the plurality of first pixels, the plurality of second pixels, and pixels obtained by interpolating the defective pixels by the interpolation means Signal processing means for generating a captured image using the output The defect detection means includes a first ratio of pixel values of a first specific pixel of the plurality of first pixels and a second specific pixel of the plurality of second pixels, and a first ratio located in the vicinity of the first specific pixel. The first specific pixel or the second specific pixel is the defective pixel by comparing a second ratio of pixel values of one neighboring pixel and a second neighboring pixel located in the vicinity of the second specific pixel It is determined whether or not.

本発明の他の側面としての画像処理方法は、撮像光学系からの光束を瞳分割して第1光束及び第2光束を得て、該第1光束を光電変換する複数の第1画素及び該第2光束を光電変換する複数の第2画素を含む撮像素子を用いて得られた画像を処理する画像処理方法であって、前記複数の第1画素及び前記複数の第2画素の出力を用いて合焦度を評価する合焦度評価ステップと、前記合焦度が所定値以上である場合に、前記撮像素子の欠陥画素を検出する欠陥検出ステップと、前記欠陥画素を補間する補間ステップと、前記複数の第1画素、前記複数の第2画素、及び、前記欠陥画素を補間して得られた画素の出力を用いて撮影画像を生成する信号処理ステップとを有し、前記欠陥検出ステップは、前記複数の第1画素の第1特定画素と前記複数の第2画素の第2特定画素との画素値の第1比率と、該第1特定画素の近傍に位置する第1近傍画素と該第2特定画素の近傍に位置する第2近傍画素との画素値の第2比率とを比較することにより、該第1特定画素又は該第2特定画素が前記欠陥画素であるか否かを判定する。   An image processing method according to another aspect of the present invention includes a plurality of first pixels that photoelectrically convert the first light flux by obtaining a first light flux and a second light flux by dividing a light flux from an imaging optical system into a pupil. An image processing method for processing an image obtained by using an imaging device including a plurality of second pixels that photoelectrically convert a second light beam, using outputs of the plurality of first pixels and the plurality of second pixels. A focus degree evaluation step for evaluating a focus degree, a defect detection step for detecting a defective pixel of the image sensor when the focus degree is a predetermined value or more, and an interpolation step for interpolating the defective pixel; A signal processing step of generating a photographed image using an output of the pixels obtained by interpolating the plurality of first pixels, the plurality of second pixels, and the defective pixels, and the defect detecting step A first specific pixel of the plurality of first pixels and the plurality of first pixels. The first ratio of the pixel value of the second pixel to the second specific pixel, and the first neighboring pixel located in the vicinity of the first specific pixel and the second neighboring pixel located in the vicinity of the second specific pixel By comparing with a second ratio of pixel values, it is determined whether or not the first specific pixel or the second specific pixel is the defective pixel.

本発明の他の目的及び特徴は、以下の実施例において説明される。   Other objects and features of the present invention are illustrated in the following examples.

本発明によれば、瞳分割された光束を利用して撮像素子の欠陥画素を高精度に検出する画像処理装置及び画像処理方法を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the image processing apparatus and image processing method which detect the defective pixel of an image pick-up element with high precision using the pupil-divided light beam can be provided.

実施例1における画像処理装置のブロック図である。1 is a block diagram of an image processing apparatus in Embodiment 1. FIG. 実施例1における撮像素子の画素構造を示す図である。FIG. 2 is a diagram illustrating a pixel structure of an image sensor in Example 1. 実施例1における撮像素子の画素配列を示す図である。FIG. 2 is a diagram illustrating a pixel array of an image sensor in Embodiment 1. 実施例1における第二の欠陥検出回路のサブブロック図である。4 is a sub-block diagram of a second defect detection circuit in Embodiment 1. FIG. 実施例1における第一の欠陥検出回路の回路図である。2 is a circuit diagram of a first defect detection circuit in Embodiment 1. FIG. 実施例1における第二の欠陥検出回路のサブブロック図である。4 is a sub-block diagram of a second defect detection circuit in Embodiment 1. FIG. 実施例1におけるシーディング原理の説明図である。It is explanatory drawing of the seeding principle in Example 1. FIG. 実施例1において、シェーディングによるA画素及びB画素の比率の説明図である。In Example 1, it is explanatory drawing of the ratio of A pixel and B pixel by shading. 実施例1における合焦度評価部の回路図である。3 is a circuit diagram of a focus degree evaluation unit in Embodiment 1. FIG. 実施例1において、第一の欠陥検出回路による着目画素と参照画素の関係図である。In Example 1, it is a related figure of the focused pixel and reference pixel by a 1st defect detection circuit. 実施例1において、第二の欠陥検出回路による着目画素と参照画素の関係図である。In Example 1, it is a related figure of the focused pixel and reference pixel by a 2nd defect detection circuit. 実施例1において、合焦度(デフォーカス量)と第二の欠陥検出回路によるしきい値のルックアップテーブルの関係を示すグラフである。In Example 1, it is a graph which shows the relationship between the focus degree (defocus amount) and the look-up table of the threshold value by the 2nd defect detection circuit. 実施例1において、画面の位置とケラレ形状の関係図である。In Example 1, it is a relationship figure of the position of a screen, and a vignetting shape. 実施例1における第二の欠陥検出回路と画素位置の関係図である。FIG. 3 is a diagram illustrating a relationship between a second defect detection circuit and pixel positions in Example 1. 実施例3における撮像素子の画素の構造図である。6 is a structural diagram of a pixel of an image sensor in Example 3. FIG. 実施例2における画像処理方法のフローチャートである。10 is a flowchart of an image processing method in Embodiment 2. 実施例4におけるシステムの光学的構造図である。FIG. 6 is an optical structural diagram of a system in Example 4. 実施例1における欠陥画素と通常画素の区別についての説明図である。FIG. 6 is an explanatory diagram for distinguishing between defective pixels and normal pixels in the first embodiment. 実施例3における4分割画素のカラーフィルタの配列図である。FIG. 10 is an array diagram of a color filter of four-divided pixels in Example 3. 実施例1における第二の欠陥検出回路のブロック図である。4 is a block diagram of a second defect detection circuit in Embodiment 1. FIG.

以下、本発明の実施例について、図面を参照しながら詳細に説明する。各図において、同一の部材については同一の参照番号を付し、重複する説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In each figure, the same members are denoted by the same reference numerals, and redundant description is omitted.

まず、図1を参照して、本発明の実施例1における画像処理装置に構成について説明する。本実施例の画像処理装置は、撮像光学系からの光束を瞳分割して第1光束及び第2光束を得て、第1光束を光電変換する複数の第1画素及び第2光束を光電変換する複数の第2画素を含む撮像素子を用いて得られた画像を処理するように構成されている。   First, the configuration of the image processing apparatus according to the first embodiment of the present invention will be described with reference to FIG. The image processing apparatus of the present embodiment pupil-divides a light beam from the imaging optical system to obtain a first light beam and a second light beam, and photoelectrically converts a plurality of first pixels and second light beams that photoelectrically convert the first light beam. An image obtained using an imaging device including a plurality of second pixels is processed.

図1は、本実施例における画像処理装置100のブロック図である。図1において、101は撮像レンズ(撮像光学系)であり、102は撮像素子である。撮像素子102は、撮像レンズ101からの光束を瞳分割して得られた第1光束及び第2光束それぞれの光電変換を行う複数の第1画素(A画素)及び複数の第2画素(B画素)を有する。103はAD変換器、105は欠陥位置記憶ROM、104は欠陥マーク挿入部、106は第一の欠陥検出回路、107は欠陥補間回路である。   FIG. 1 is a block diagram of an image processing apparatus 100 in the present embodiment. In FIG. 1, 101 is an imaging lens (imaging optical system), and 102 is an imaging device. The image sensor 102 includes a plurality of first pixels (A pixels) and a plurality of second pixels (B pixels) that perform photoelectric conversion of the first light beam and the second light beam obtained by pupil division of the light beam from the imaging lens 101. ). Reference numeral 103 denotes an AD converter, 105 denotes a defect position storage ROM, 104 denotes a defect mark insertion unit, 106 denotes a first defect detection circuit, and 107 denotes a defect interpolation circuit.

108は、複数の第1画素及び複数の第2画素の出力を用いて合焦度(焦点状態)を評価する合焦度評価回路(合焦度評価手段)である。109は第二の欠陥検出回路(欠陥検出手段)であり、合焦度評価部108により評価された合焦度が所定値以上である場合に、撮像素子102の欠陥画素を検出する。110は欠陥補間回路(補間手段)であり、第二の欠陥検出回路109により検出された欠陥画素を補間する。111は、瞳分割画素(第1画素及び第2画素)を加算してベイヤー配列にする加算ベイヤー化回路である。112は映像信号処理回路(信号処理手段)であり、複数の第1画素、複数の第2画素、及び、欠陥補間回路110により欠陥画素を補間して得られた画素の出力を用いて撮影画像を生成する。113は画像処理装置100の全体を制御するマイクロコンピュータである。画像処理装置100において、撮像レンズ101を通過した光が撮像素子102に結像する。   Reference numeral 108 denotes a focus degree evaluation circuit (focus degree evaluation means) that evaluates the focus degree (focus state) using the outputs of the plurality of first pixels and the plurality of second pixels. Reference numeral 109 denotes a second defect detection circuit (defect detection means), which detects a defective pixel of the image sensor 102 when the focus degree evaluated by the focus degree evaluation unit 108 is equal to or greater than a predetermined value. Reference numeral 110 denotes a defect interpolation circuit (interpolation means) that interpolates the defective pixels detected by the second defect detection circuit 109. Reference numeral 111 denotes an addition Bayer circuit that adds pupil division pixels (first pixel and second pixel) to form a Bayer array. Reference numeral 112 denotes a video signal processing circuit (signal processing means), which uses a plurality of first pixels, a plurality of second pixels, and a pixel image obtained by interpolating defective pixels by the defect interpolation circuit 110. Is generated. Reference numeral 113 denotes a microcomputer that controls the entire image processing apparatus 100. In the image processing apparatus 100, light that has passed through the imaging lens 101 forms an image on the imaging element 102.

続いて、図2を参照して、撮像素子102の画素構造について説明する。図2(a)は、撮像素子102の画素の正面図を示し、図2(b)は画素の断面図を示す。図2において、201はマイクロレンズであり、202及び203はそれぞれフォトダイオードである。1つのマイクロレンズに対して2つのフォトダイオードを用いて画像を読み出すことにより、図中の左右に瞳分割を行っている。以下、左右の画素をそれぞれA画素及びB画素、また、左右の画素(A画素及びB画素)を集めて形成される像をそれぞれA像、B像という。図3は、本実施例における撮像素子の画素配列(カラーフィルタの配列)を示す図である。図3に示されるように、カラーフィルタの配列は、マイクロレンズ201ごとに加算することにより、通常のベイヤー配列となる。   Next, the pixel structure of the image sensor 102 will be described with reference to FIG. 2A shows a front view of the pixel of the image sensor 102, and FIG. 2B shows a cross-sectional view of the pixel. In FIG. 2, 201 is a microlens, and 202 and 203 are photodiodes, respectively. By reading out an image using two photodiodes for one microlens, pupil division is performed on the left and right in the figure. Hereinafter, the left and right pixels are referred to as A pixel and B pixel, and the images formed by collecting the left and right pixels (A pixel and B pixel) are referred to as A image and B image, respectively. FIG. 3 is a diagram showing a pixel array (color filter array) of the image sensor in the present embodiment. As shown in FIG. 3, the color filter array is added to each microlens 201 to be a normal Bayer array.

図1に示されるように、撮像素子102からの出力信号はAD変換器103によりデジタル変換され、欠陥マーク挿入部104に入力される。欠陥マーク挿入部104には、欠陥位置記憶ROM105(メモリ)から画像に同期して欠陥位置を示す信号が出力される。欠陥位置記憶ROM105は、ワンタイムROMやフラッシュROMで構成され、製造工程において検出された画素の欠陥位置を記憶している。欠陥マーク挿入部104は、欠陥位置記憶ROM105からの信号を受け取り、欠陥画素である場合にはそれを示す特定の値を設定する。本実施例では、欠陥画素を示すマークとして値0(ゼロ)を用いるが、これに限定されるものではない。欠陥位置記憶ROM105からの信号により、特定の画素に対して欠陥マークを示す値0が設定されると、以後の全ての処理においてその画素は欠陥画素として取り扱われる。欠陥ではない通常の画素に対しては、その値が0にならないように、0が設定されている場合には1に置き換える。   As shown in FIG. 1, the output signal from the image sensor 102 is digitally converted by the AD converter 103 and input to the defect mark insertion unit 104. A signal indicating the defect position is output from the defect position storage ROM 105 (memory) to the defect mark insertion unit 104 in synchronization with the image. The defect position storage ROM 105 is constituted by a one-time ROM or a flash ROM, and stores a defect position of a pixel detected in the manufacturing process. The defect mark insertion unit 104 receives a signal from the defect position storage ROM 105 and sets a specific value indicating the signal if it is a defective pixel. In this embodiment, the value 0 (zero) is used as a mark indicating a defective pixel, but the present invention is not limited to this. When a value 0 indicating a defect mark is set for a specific pixel by a signal from the defect position storage ROM 105, the pixel is treated as a defective pixel in all subsequent processes. For a normal pixel that is not defective, it is replaced with 1 when 0 is set so that the value does not become 0.

ただし、撮像素子102からの信号にはオプティカルブラックと呼ばれる露光していない部分が存在し、オプティカルブラック部分のばらつきを吸収するためのオフセットが信号成分として含まれている。このため、通常、0付近のデータは入力されない。このように、製造工程で検出済の欠陥画素に関しては、欠陥マーク挿入部104において欠陥マークに置き換えられる。欠陥マーク挿入部104の出力は、第一の欠陥検出回路106に入力される。   However, the signal from the image sensor 102 includes an unexposed portion called optical black, and an offset for absorbing variations in the optical black portion is included as a signal component. For this reason, normally, data near 0 is not input. As described above, the defective pixels detected in the manufacturing process are replaced with defect marks in the defect mark insertion unit 104. The output of the defect mark insertion unit 104 is input to the first defect detection circuit 106.

続いて、図5を参照して、第一の欠陥検出回路106の回路構成について説明する。図5は、第一の欠陥検出回路106の回路図である。図5において、501は信号を入力する端子、505及び506は2ライン遅延回路である。2ライン遅延回路505の出力に対して、端子501に入力される信号及び2ライン遅延回路506の出力がそれぞれ2ライン上の画素及び2ライン下の画素となるように同期がとられている。502、511、503、504は遅延素子である。遅延素子502、503、504の出力と2ライン遅延回路505の出力は、加算器507、508、509により全て加算され、シフト回路510により4分の1にされる。これにより、遅延素子511の出力のタイミングを中心として、同色同瞳の上下左右の平均値が端子501からの入力信号に対する出力として計算される。   Next, the circuit configuration of the first defect detection circuit 106 will be described with reference to FIG. FIG. 5 is a circuit diagram of the first defect detection circuit 106. In FIG. 5, reference numeral 501 denotes a signal input terminal, and reference numerals 505 and 506 denote two-line delay circuits. The output of the two-line delay circuit 505 is synchronized so that the signal input to the terminal 501 and the output of the two-line delay circuit 506 are the pixels on the two lines and the pixels on the two lines, respectively. Reference numerals 502, 511, 503, and 504 denote delay elements. The outputs of the delay elements 502, 503, and 504 and the output of the two-line delay circuit 505 are all added by the adders 507, 508, and 509 and are reduced to a quarter by the shift circuit 510. As a result, centering on the output timing of the delay element 511, the average value of the same color and same pupil in the vertical and horizontal directions is calculated as the output for the input signal from the terminal 501.

次に、図10を参照して、画素の位置関係について説明する。図10は、第一の欠陥検出回路106による参照画素を示す図である。中心の欠陥検査画素が遅延素子511の出力とすると、それぞれ上下左右の同じカラーフィルタの同じ瞳形状の画素の平均がシフト回路510の出力となる。減算器512は、シフト回路510の出力と遅延素子511の出力の差をとり、絶対値回路516で差の絶対値に変換される。すなわち、絶対値回路516は、上下左右の同色同瞳の平均値と着目画素の差の絶対値を出力する。比較器513の一方の入力として絶対値回路516の出力が入力され、その他方の入力として外部から端子515にしきい値が入力される。   Next, the positional relationship of the pixels will be described with reference to FIG. FIG. 10 is a diagram illustrating a reference pixel by the first defect detection circuit 106. Assuming that the center defect inspection pixel is the output of the delay element 511, the average of the same pupil-shaped pixels of the same color filter in the upper, lower, left and right directions is the output of the shift circuit 510. The subtractor 512 takes the difference between the output of the shift circuit 510 and the output of the delay element 511 and converts it to the absolute value of the difference by the absolute value circuit 516. That is, the absolute value circuit 516 outputs the absolute value of the difference between the average value of the same color and same pupil on the top, bottom, left and right and the pixel of interest. The output of the absolute value circuit 516 is input as one input of the comparator 513, and the threshold value is input from the outside to the terminal 515 as the other input.

このように、近傍同色同瞳の平均値と着目画素値の差の絶対値としきい値の比較結果として、特定の画素が欠陥画素であるか否かを示す検出信号が生成され、端子514から出力される。端子514から検出信号が出力されることにより、第一の欠陥検出回路106の後段において欠陥マーク挿入部104と同様に欠陥マークが挿入される。なお、端子515にしきい値として入力される値は、マイクロコンピュータ113から与えられる。   As described above, a detection signal indicating whether or not a specific pixel is a defective pixel is generated as a comparison result of the absolute value of the difference between the average value of the same color and the same pupil in the vicinity, the difference between the target pixel value, and the threshold value. Is output. By outputting a detection signal from the terminal 514, a defect mark is inserted in the subsequent stage of the first defect detection circuit 106 in the same manner as the defect mark insertion unit 104. Note that a value input as a threshold value to the terminal 515 is given from the microcomputer 113.

第一の欠陥検出回路106の出力は、第二の欠陥検出回路109と欠陥補間回路107に入力される。欠陥マーク挿入部104と第一の欠陥検出回路106により欠陥画素と判断された画素は、欠陥補間回路107により補間されることで、欠陥の無い画素として扱われる。なお、欠陥補間回路107による補間の方法に関しては、本発明の本質と深く関連しないため、ここでの説明を省略する。欠陥補間回路107により補間処理された信号は、合焦度評価部108により評価される。   The output of the first defect detection circuit 106 is input to the second defect detection circuit 109 and the defect interpolation circuit 107. Pixels determined to be defective pixels by the defect mark insertion unit 104 and the first defect detection circuit 106 are treated as pixels having no defect by being interpolated by the defect interpolation circuit 107. Note that the interpolation method by the defect interpolation circuit 107 is not deeply related to the essence of the present invention, and thus the description thereof is omitted here. The signal subjected to the interpolation processing by the defect interpolation circuit 107 is evaluated by the focus degree evaluation unit 108.

続いて、合焦度評価部108及び第二の欠陥検出回路109の詳細を説明する前に、本実施例の原理について説明をする。欠陥画素には白傷や黒傷等の固定値が出力される画素と、他の画素に対して黒レベルや感度が異なる画素が存在し、感度や黒レベルの異なる画素の検出は困難である。本実施例における第二の欠陥検出回路109は、感度や黒レベルが異なるような、検出が困難な欠陥画素の検出を容易にする。   Next, the principle of this embodiment will be described before the details of the in-focus level evaluation unit 108 and the second defect detection circuit 109 are described. Defective pixels include pixels that output fixed values such as white and black scratches, and pixels with different black levels and sensitivities compared to other pixels, making it difficult to detect pixels with different sensitivities and black levels. . The second defect detection circuit 109 in this embodiment facilitates detection of defective pixels that are difficult to detect, such as those with different sensitivities and black levels.

図18は、欠陥画素と通常画素の区別についての説明図であり、合焦の際にA画素(第1画素)の信号のみで生成したA像信号とB画素(第2画素)の信号のみで生成したB像信号を示している。合焦の際には、瞳分割した光束(第1光束及び第2光束)の撮像面での投影位置が一致しているため、A像とB像は同じ像となる。図18に示されるように、A像とB像に若干のレベル差があるのは、シェーディング特性がAの瞳とBの瞳で異なるからである。ここで、部分1801、1802はそれぞれ、前後のレベルに対してピンポイントで高いレベルとなっている。部分1801は、A像及びB像ともにピンポイントでレベル差があるため、被写体そのものにハイライト部があると考えられる。それに対して、部分1802は、B像のみがピンポイントで高いレベルとなっており、同じ部分がA像にないのは原理上ありえない。したがって、部分1802は欠陥画素によるものと判断できる。本実施例は、部分1801は欠陥として誤検出することなく、部分1802のみを欠陥として検出する。   FIG. 18 is an explanatory diagram for distinguishing between a defective pixel and a normal pixel, and only the A image signal and the B pixel (second pixel) signal generated only by the A pixel (first pixel) signal at the time of focusing. The B image signal generated in FIG. At the time of focusing, since the projection positions of the pupil-divided light beams (the first light beam and the second light beam) on the imaging surface coincide with each other, the A image and the B image are the same image. As shown in FIG. 18, there is a slight level difference between the A image and the B image because the shading characteristics are different between the A pupil and the B pupil. Here, each of the portions 1801 and 1802 is at a pinpoint higher level than the previous and next levels. The portion 1801 is considered to have a highlight portion in the subject itself because there is a pinpoint level difference in both the A and B images. On the other hand, in the portion 1802, only the B image is at a high level pinpoint, and it is impossible in principle that the same portion is not in the A image. Therefore, it can be determined that the portion 1802 is due to a defective pixel. In the present embodiment, the portion 1801 is not erroneously detected as a defect, and only the portion 1802 is detected as a defect.

次に、第二の欠陥検出回路109による検出方法の原理について詳述する。左右に瞳分割したA像とB像によって得られる像は、合焦状態の場合にはほぼ一致し、非合焦状態の場合には左右に像の投影位置がずれるという性質を有する。この性質を使って焦点検出を行う方法が知られている。合焦状態においても、A像とB像は異なるシェーディング特性を有するため、若干のレベル差が発生する。レンズに対して中心から遠く、すなわち像高が高くなると、レベル差も大きくなる。   Next, the principle of the detection method by the second defect detection circuit 109 will be described in detail. The images obtained by the A image and the B image divided into pupils on the right and left sides have a property that they substantially coincide in the in-focus state and the projected positions of the images shift to the left and right in the out-of-focus state. A method of performing focus detection using this property is known. Even in the in-focus state, the A and B images have different shading characteristics, so that a slight level difference occurs. The level difference increases as the distance from the center of the lens, that is, as the image height increases.

続いて、図7を参照して、シェーディングの原理について詳述する。図7(a)はレンズの断面図であり、撮像素子704上における光軸中心に位置する点xと像高の高い位置の点yが矢印で示されている。図7(b)は、点xと点yの位置からレンズを見た場合に投影される枠の位置関係を示している。図7において、701、702、703はそれぞれ、被写体側のレンズ、絞り、撮像素子704側のレンズにより形成される枠である。撮像素子704上の点xから見ると、枠701、702、703は、同心円に設けられており、光が通過できる形状が絞り702によって決定づけられる。撮像素子704上の点yから見ると、上側が枠703によって削られ、下側が枠701によって削られ、側面は枠702によって削られる。図7(b)は、3つの枠により削られた光の通過できる場所の形状を示している。一般にこの形状のことを口径食、またはケラレ形状と呼ぶ。   Next, the principle of shading will be described in detail with reference to FIG. FIG. 7A is a cross-sectional view of the lens, and a point x located at the center of the optical axis on the image sensor 704 and a point y at a high image height are indicated by arrows. FIG. 7B shows the positional relationship of the frames projected when the lens is viewed from the positions of the points x and y. In FIG. 7, reference numerals 701, 702, and 703 denote frames formed by a subject-side lens, a diaphragm, and a lens on the image sensor 704 side, respectively. When viewed from the point x on the image sensor 704, the frames 701, 702, and 703 are provided in concentric circles, and the shape through which light can pass is determined by the diaphragm 702. When viewed from the point y on the image sensor 704, the upper side is cut by the frame 703, the lower side is cut by the frame 701, and the side surface is cut by the frame 702. FIG. 7B shows the shape of the place where the light cut by the three frames can pass. This shape is generally called vignetting or vignetting.

図8は、シェーディングによるA画素及びB画素の比率の説明図であり、ケラレ形状に対して2つに瞳分割されたフォトダイオードを重ねた図である。フォトダイオードに対して光が届くのは、図8中の斜線部のみである。図8の状態において、フォトダイオード202には、フォトダイオード203よりも多くの面積に対して光が到達する。このため、合焦状態でA像とB像が一致していても、口径食(ケラレ形状)の影響によりレベル差が発生する。   FIG. 8 is an explanatory diagram of the ratio of the A pixel and the B pixel by shading, and is a diagram in which photodiodes divided into two pupils are superimposed on the vignetting shape. Light reaches the photodiode only in the shaded area in FIG. In the state of FIG. 8, light reaches the photodiode 202 over a larger area than the photodiode 203. For this reason, even if the A image and the B image coincide with each other in a focused state, a level difference occurs due to the influence of vignetting (vignetting shape).

図13は、撮像素子上の場所(画面の位置)とケラレ形状の関係図(特性図)である。像高が高くなるとケラレ形状もいびつとなり、場所により形状に違いが生じる。しかし、いずれの場所においても、近傍画素同士のケラレ形状は非常に類似している。このことから、図8のように、フォトダイオード202、203のレベル差は発生するが、近傍画素では同じ特性でレベル差が発生していることになる。   FIG. 13 is a relationship diagram (characteristic diagram) between a location on the image sensor (screen position) and a vignetting shape. As the image height increases, the vignetting shape also becomes irregular, and the shape varies depending on the location. However, the vignetting shapes of neighboring pixels are very similar at any location. Thus, as shown in FIG. 8, a level difference occurs between the photodiodes 202 and 203, but a level difference occurs with the same characteristics in the neighboring pixels.

本実施例における第二の欠陥検出回路109は、次の2つの原理を利用する。
(1)合焦時はA像及びB像が重なって同じ像となるため、A画素とB画素のレベル差はケラレ形状によるものが支配的となる。
(2)近傍画素同士のケラレ形状は極めて類似している。
以上の2つの原理を利用することにより、本実施例では以下のように画素欠陥を検出する。すなわち、近傍画素のA画素とB画素のレベル比を着目画素と同じマイクロレンズの対面する側の画素値に掛け、これを基準値とする。そして、この基準値と着目画素の信号値との差が所定のしきい値を超えた場合に、その着目画素が欠陥画素であると判定する。また、合焦度が大きいほどしきい値が低くなるように、合焦度が小さいほどそのしきい値が高くなるように設定する。本実施例では、合焦度評価部108と第二の欠陥検出回路109により、このようなアルゴリズムを実現することができる。
The second defect detection circuit 109 in the present embodiment uses the following two principles.
(1) At the time of focusing, the A image and the B image are overlapped to form the same image. Therefore, the level difference between the A pixel and the B pixel is dominant due to the vignetting shape.
(2) The vignetting shapes of neighboring pixels are very similar.
By utilizing the above two principles, pixel defects are detected in the present embodiment as follows. That is, the level ratio of the A pixel and the B pixel of the neighboring pixels is multiplied by the pixel value on the facing side of the same microlens as the target pixel, and this is used as the reference value. When the difference between the reference value and the signal value of the target pixel exceeds a predetermined threshold value, it is determined that the target pixel is a defective pixel. In addition, the threshold value is set to be lower as the degree of focus is higher, and the threshold value is set to be higher as the degree of focus is lower. In this embodiment, such an algorithm can be realized by the in-focus degree evaluation unit 108 and the second defect detection circuit 109.

続いて、図9を参照して、合焦度評価部108の回路構成について詳述する。図9は、合焦度評価部108の回路図であり、説明を簡単にするため実際よりも少ない回路規模で記載されている。図9において、端子901に入力される信号は、欠陥補間回路107の出力信号である。902は、同一サイクルで異なる位置の画素を参照するための遅延素子群である。本実施例では、隣接した6個の画素を同時に取り出す。遅延素子群902に対して遅延素子903〜907に供給されるクロックは、端子915から入力されるEVEN/ODD信号でゲートされて2分の1になり、見かけ上A画素及びB画素の2画素が入力される毎に1サイクル処理される。遅延素子903〜907は、互いに同じ回路構成を有し、入力される2つの画素位置が異なるだけである。遅延素子903〜907からは、2つの画素値の差を二乗して7サイクル分加算した信号が出力される。   Next, the circuit configuration of the in-focus level evaluation unit 108 will be described in detail with reference to FIG. FIG. 9 is a circuit diagram of the in-focus level evaluation unit 108, which is illustrated with a circuit scale smaller than the actual size for the sake of simplicity. In FIG. 9, a signal input to the terminal 901 is an output signal of the defect interpolation circuit 107. Reference numeral 902 denotes a delay element group for referring to pixels at different positions in the same cycle. In this embodiment, six adjacent pixels are taken out simultaneously. The clock supplied to the delay elements 903 to 907 with respect to the delay element group 902 is gated by the EVEN / ODD signal input from the terminal 915 and becomes half, apparently two pixels of A pixel and B pixel. Each time is input, one cycle is processed. The delay elements 903 to 907 have the same circuit configuration as each other, and only two input pixel positions are different. From the delay elements 903 to 907, a signal obtained by squaring the difference between two pixel values and adding them for seven cycles is output.

この回路は、SSD(Sum of Squared Difference)演算法による相関量を算出している。遅延素子905の入力は、A画素とB画素が同じマイクロレンズに対応したものとなっている。それに対して、遅延素子904の入力は、A画素に対して隣のマイクロレンズのB画素、遅延素子903はさらに隣のマイクロレンズのB画素、遅延素子906、907は遅延素子905と同じB画素に対してA画素をずらしたものが入力されている。遅延素子903〜907により、A像とB像が±2のシフト量の範囲における一致度を示す相関量が出力される。SSD演算法では、像の一致度が高い程、評価値が小さくなる。909は、評価値が低く像の一致度が高いシフトに対応したビットが1つだけ1となり他のビットが0となる回路である。908は、2入力のコンパレータで比較した結果、予期した大小関係の場合には1を、そうでない場合には0を出力する。それら出力結果の組み合わせが設定値と合致する後段論理回路のみが1を出力する。合焦している部分であればシフト量0を示す出力(端子912)が1となり、合焦度が下がるとシフト量の大きな場所に対応した出力(端子910、911、913、914の出力)が1となる。   This circuit calculates a correlation amount by an SSD (Sum of Squared Difference) calculation method. The input of the delay element 905 is such that the A pixel and the B pixel correspond to the same microlens. On the other hand, the input of the delay element 904 is the B pixel of the micro lens adjacent to the A pixel, the delay element 903 is the B pixel of the further adjacent micro lens, and the delay elements 906 and 907 are the same B pixel as the delay element 905. In this case, a pixel shifted from the A pixel is input. The delay elements 903 to 907 output a correlation amount indicating the degree of coincidence in the range of the shift amount of ± 2 between the A image and the B image. In the SSD calculation method, the evaluation value decreases as the image matching degree increases. Reference numeral 909 denotes a circuit in which only one bit corresponding to a shift having a low evaluation value and a high image matching degree is set to 1 and the other bits are set to 0. As a result of comparison by a two-input comparator, 908 outputs 1 if the expected magnitude relationship and 0 otherwise. Only the latter stage logic circuit whose combination of output results matches the set value outputs 1. If the in-focus portion, the output indicating the shift amount 0 (terminal 912) becomes 1, and if the in-focus level decreases, the output corresponding to the place where the shift amount is large (output of the terminals 910, 911, 913, 914) Becomes 1.

図9においては、説明を簡単にするために遅延素子群902での遅延量を6、遅延素子903〜907での積算幅を7に設定しており、それぞれ、シフト量と一致度評価幅に対応している。シフト量としては、レンズの光学的特性で決定されるA像とB像の基線長と最大デフォーカス量に依存した最大シフト量をカバーできるだけの幅が必要である。合焦度評価部108の結果は、マイクロコンピュータ113により読み出され、オートフォーカスにも利用される。また、合焦度評価部108の出力は、第二の欠陥検出回路109にも入力される。   In FIG. 9, the delay amount in the delay element group 902 is set to 6 and the integration width in the delay elements 903 to 907 is set to 7 to simplify the explanation. It corresponds. The shift amount needs to be wide enough to cover the maximum shift amount depending on the base line length and the maximum defocus amount of the A and B images determined by the optical characteristics of the lens. The result of the focusing degree evaluation unit 108 is read by the microcomputer 113 and is also used for autofocus. Further, the output of the focus degree evaluation unit 108 is also input to the second defect detection circuit 109.

次に、図20、図4及び図6を参照して、第二の欠陥検出回路109について詳述する。図20は、第二の欠陥検出回路109のブロック図である。図20において、2004〜2007は基準値を生成する回路であり、2008は端子2001から入力された入力信号と端子2002から入力された所定のしきい値信号とを比較してマスク信号を生成する回路である。2009は、回路2010に対して端子2001からの入力信号を同期させるための遅延回路である。2010は、端子2003から入力された合焦度(デフォーカス量)に関する信号を用いて、最終的に画素欠陥か否かを判定し、その判定結果に応じた出力信号を端子2011に出力する判定回路である。   Next, the second defect detection circuit 109 will be described in detail with reference to FIGS. 20, 4 and 6. FIG. 20 is a block diagram of the second defect detection circuit 109. In FIG. 20, 2004 to 2007 are circuits for generating reference values, and 2008 is a circuit that generates a mask signal by comparing an input signal input from a terminal 2001 with a predetermined threshold signal input from a terminal 2002. Circuit. 2009 is a delay circuit for synchronizing the input signal from the terminal 2001 with the circuit 2010. In 2010, a signal regarding the degree of focus (defocus amount) input from the terminal 2003 is used to determine whether or not the pixel is finally defective, and an output signal corresponding to the determination result is output to the terminal 2011. Circuit.

図4は、第二の欠陥検出回路109のサブブロック図であり、左側基準値を生成する回路2005の回路図である。図4において、401は第一の欠陥検出回路106からの信号を入力する端子であり、402〜405は入力信号を遅延させる遅延素子である。411は、A画素のサイクルとB画素のサイクルの区別をつけるための信号を入力する端子である。端子411から入力された信号は、各サイクルトグルで動作する。408は、演算結果としての信号を出力する端子である。   FIG. 4 is a sub-block diagram of the second defect detection circuit 109, and is a circuit diagram of a circuit 2005 that generates a left reference value. In FIG. 4, 401 is a terminal for inputting a signal from the first defect detection circuit 106, and 402 to 405 are delay elements for delaying the input signal. Reference numeral 411 denotes a terminal for inputting a signal for distinguishing between the cycle of the A pixel and the cycle of the B pixel. The signal input from the terminal 411 operates at each cycle toggle. A terminal 408 outputs a signal as a calculation result.

端子408に出力される信号は、遅延素子404によって遅延した出力タイミングに相当する遅延を有する補間信号である。ここで、遅延素子404の出力タイミングをx[n]とすると、遅延素子405の出力タイミングはx[n−1]、遅延素子403の出力タイミングはx[n+1]と考えることができる。また、遅延素子402の出力タイミングはx[n+2]、端子401からの入力信号のタイミングはx[n+3]となる。この回路は、各サイクルにおいて端子408に対して基準値を出力する。端子411からの入力信号によりスイッチ406、409が切り替わり、除算器410と乗算器407に対する入力が切り替わる。その結果、端子408に出力される信号の演算式は、端子411からの入力信号が1のサイクルと0のサイクルで切り替わる。端子411からの入力信号が1のサイクルがODD、0のサイクルがEVENとすると、演算式は以下のように表される。   The signal output to the terminal 408 is an interpolation signal having a delay corresponding to the output timing delayed by the delay element 404. Here, if the output timing of the delay element 404 is x [n], the output timing of the delay element 405 can be considered as x [n−1], and the output timing of the delay element 403 can be considered as x [n + 1]. The output timing of the delay element 402 is x [n + 2], and the timing of the input signal from the terminal 401 is x [n + 3]. This circuit outputs a reference value to terminal 408 in each cycle. Switches 406 and 409 are switched by an input signal from the terminal 411, and inputs to the divider 410 and the multiplier 407 are switched. As a result, the arithmetic expression of the signal output to the terminal 408 is switched between the cycle in which the input signal from the terminal 411 is 1 and 0. If the cycle of the input signal from the terminal 411 is ODD and the cycle of 0 is EVEN, the arithmetic expression is expressed as follows.

EVEN:基準値x[n]=(x[n+2]/x[n+3])*x[n+1]
ODD:基準値x[n]=(x[n+1]/x[n+3])*x[n−1]
図14を参照して、上記の演算式と画素位置の対応を説明する。EVENのタイミングでは、x[n]がB画素、対応するA画素がx[n+1]、隣のA画素がx[n+3]、B画素がx[n+2]となる。一方、ODDのサイクルでは、x[n]がA画素となり、対応するB画素がx[n−1]となる。また、隣のA画素がx[n+2]、B画素がx[n+1]となる。このように回路2005は、A画素とB画素が交互に配置されているため、サイクル毎に演算式が変化するように構成されている。図4に示される回路2005だけでも、本実施例として機能するが、隣の画素が低輝度である場合やノイズが多い場合には、影響を受ける可能性がある。このため、本実施例では後段の回路において上下左右から算出した値の平均値が用いられる。
EVEN: reference value x [n] = (x [n + 2] / x [n + 3]) * x [n + 1]
ODD: reference value x [n] = (x [n + 1] / x [n + 3]) * x [n−1]
With reference to FIG. 14, the correspondence between the above arithmetic expression and the pixel position will be described. At the EVEN timing, x [n] is B pixel, the corresponding A pixel is x [n + 1], the adjacent A pixel is x [n + 3], and the B pixel is x [n + 2]. On the other hand, in the ODD cycle, x [n] is an A pixel and the corresponding B pixel is x [n−1]. The adjacent A pixel is x [n + 2], and the B pixel is x [n + 1]. As described above, the circuit 2005 is configured such that the arithmetic expression changes every cycle because the A pixel and the B pixel are alternately arranged. Only the circuit 2005 shown in FIG. 4 functions as the present embodiment. However, when the adjacent pixel has low luminance or there is a lot of noise, it may be affected. For this reason, in this embodiment, an average value of values calculated from the top, bottom, left, and right in the subsequent circuit is used.

図6は、第二の欠陥検出回路109における回路2010のブロック図である。4つの端子601〜604に入力される信号はそれぞれ、上下左右画素の比を用いて計算した基準値である。図4の回路2005が比の参照画素として左側の画素を参照しているのに対して、入力602〜604に接続された回路ではそれぞれ、上下右を参照しているところが異なる。   FIG. 6 is a block diagram of the circuit 2010 in the second defect detection circuit 109. The signals input to the four terminals 601 to 604 are reference values calculated using the ratio of the upper, lower, left, and right pixels, respectively. While the circuit 2005 of FIG. 4 refers to the left pixel as the reference pixel of the ratio, the circuits connected to the inputs 602 to 604 are different in that they refer to the upper and lower right.

図11は、第二の欠陥検出回路109において、着目画素と参照画素の位置関係を示している。図11に示されるように、着目画素を画素B0(第2画素の第2特定画素)とした場合、画素A0(第1画素の第1特定画素)と画素B0との画素値の比率を第1比率と定義する。また、画素A0、B0に隣接する画素A1〜A4、B1〜B4を参照画素とし、画素A1〜A4と画素B1〜B4の画素値の平均値の比率を第2比率と定義する。なお、本実施例において、参照画素は画素A0、B0に隣接する画素に限定されるものではなく、近傍に位置する画素であればよい。   FIG. 11 shows the positional relationship between the pixel of interest and the reference pixel in the second defect detection circuit 109. As shown in FIG. 11, when the target pixel is the pixel B0 (second specific pixel of the second pixel), the ratio of the pixel values of the pixel A0 (first specific pixel of the first pixel) and the pixel B0 is set to It is defined as 1 ratio. The pixels A1 to A4 and B1 to B4 adjacent to the pixels A0 and B0 are used as reference pixels, and the ratio of the average value of the pixel values of the pixels A1 to A4 and the pixels B1 to B4 is defined as the second ratio. In this embodiment, the reference pixel is not limited to the pixel adjacent to the pixels A0 and B0, and may be any pixel located in the vicinity.

図6において、端子601〜604から入力された信号は、加算器605〜607により加算され、シフト回路608で4分の1倍されることにより、それらの平均値(基準値)が得られる。端子610から入力された信号は、基準値と同期した信号値を有する。減算器609により基準値と信号値の差分が計算され、絶対値回路611によりその差分の絶対値が得られる。一方、図9の合焦度評価部108から端子612に合焦度が入力され、ルックアップテーブル613によりその合焦度に応じたしきい値に変換される。   In FIG. 6, signals input from terminals 601 to 604 are added by adders 605 to 607 and multiplied by a quarter by a shift circuit 608 to obtain an average value (reference value) thereof. The signal input from the terminal 610 has a signal value synchronized with the reference value. The subtractor 609 calculates the difference between the reference value and the signal value, and the absolute value circuit 611 obtains the absolute value of the difference. On the other hand, the degree of focus is input to the terminal 612 from the degree-of-focus evaluation unit 108 in FIG. 9 and converted into a threshold value corresponding to the degree of focus by the lookup table 613.

図12は、ルックアップテーブル613の特性を示すグラフであり、縦軸が入力値である合焦度(デフォーカス量)、横軸が出力値であるしきい値である。入力値(合焦度)は、0に近いほど合焦しており、大きくなるほど焦点が合っていないことを示す。それに対し、出力値(しきい値)は、合焦しているとしきい値は低く、焦点が合っていないとしきい値は高くなる。このようにして生成されたしきい値と絶対値回路611の出力(基準値と信号値との差の絶対値)を比較器614により比較し、基準値と信号値との差の絶対値がしきい値を超えた場合、その画素が欠陥画素と判定される。   FIG. 12 is a graph showing the characteristics of the look-up table 613, where the vertical axis represents the degree of focus (defocus amount) as an input value, and the horizontal axis represents a threshold value as an output value. The input value (degree of focus) indicates that the closer to 0, the more focused, and the larger the value, the less focused. On the other hand, the output value (threshold value) is low when the focus is in focus, and high when the focus is not achieved. The threshold value thus generated and the output of the absolute value circuit 611 (the absolute value of the difference between the reference value and the signal value) are compared by the comparator 614, and the absolute value of the difference between the reference value and the signal value is obtained. When the threshold value is exceeded, the pixel is determined as a defective pixel.

A像とB像の比を対面する画素に掛けて得られた基準値を用いると、図18中の部分1802で欠陥画素があることを認識できるが、A画素及びB画素のいずれ又は両方が欠陥であるかを区別することができない。その結果、比較器614の出力として、A画素及びB画素の両方を欠陥として検出される。   Using the reference value obtained by multiplying the ratio of the A image and the B image by the facing pixels, it can be recognized that there is a defective pixel in the portion 1802 in FIG. 18, but either or both of the A pixel and the B pixel are It cannot be distinguished whether it is a defect. As a result, both the A pixel and the B pixel are detected as defects as the output of the comparator 614.

図20において、2008は上記問題を解決するためのマスク生成回路である。マスク生成回路2008は、図5の第一の欠陥検出回路106と同様の構成を有し、入力されるしきい値が第一の欠陥検出回路106より厳しい。具体的には、図18中におけるB像に対して、部分1801、1802の両方とも欠陥として検出してしまうほどしきい値は小さい。しかし、A像に対する部分1802では欠陥を検出しない。マスク生成回路2008の出力が端子616から回路2010に入力され、AND素子617によりマスクされ、最終的に欠陥検出結果として端子615に出力される。   In FIG. 20, reference numeral 2008 denotes a mask generation circuit for solving the above problem. The mask generation circuit 2008 has the same configuration as the first defect detection circuit 106 in FIG. 5, and the input threshold value is stricter than the first defect detection circuit 106. Specifically, for the B image in FIG. 18, the threshold is so small that both portions 1801 and 1802 are detected as defects. However, no defect is detected in the portion 1802 for the A image. The output of the mask generation circuit 2008 is input from the terminal 616 to the circuit 2010, masked by the AND element 617, and finally output to the terminal 615 as a defect detection result.

比較器614は、図18中の部分1801において、A画素及びB画素ともに欠陥として検出しないが、部分1802ではA画素及びB画素ともに欠陥として検出する。それに対して、マスク生成回路2008は、部分1801においてA画素及びB画素ともに欠陥画素として検出し、部分1802ではB画素のみを欠陥画素として検出する。その結果、AND素子617を通過する欠陥検出信号は、部分1802におけるB画素のみとなる。   The comparator 614 does not detect both the A pixel and the B pixel as defects in the portion 1801 in FIG. 18, but detects both the A pixel and the B pixel as defects in the portion 1802. On the other hand, the mask generation circuit 2008 detects both the A pixel and the B pixel as defective pixels in the portion 1801, and detects only the B pixel as a defective pixel in the portion 1802. As a result, the defect detection signal that passes through the AND element 617 is only the B pixel in the portion 1802.

このように、第二の欠陥検出回路109は、複数の第1画素(A画素)の第1特定画素(A0)と複数の第2画素(B画素)の第2特定画素(B0)との画素値の第1比率を算出する。また、第二の欠陥検出回路109は、第1特定画素の近傍に位置する第1近傍画素(A1、A2、A3、A4)と第2特定画素の近傍に位置する第2近傍画素(B1、B2、B3、B4)との画素値の第2比率を算出する。そして、第二の欠陥検出回路109は、第1比率と第2比率とを比較し、着目画素としての第1特定画素又は第2特定画素が欠陥画素であるか否かを判定する。好ましくは、第1近傍画素及び第2近傍画素はそれぞれ複数の近傍画素(A1〜A4、B1〜B4)からなり、第2比率は、複数の近傍画素の画素値の平均値を用いて算出される。なお、第1近傍画素及び第2近傍画素それぞれの数は4画素に限定されるものではなく、ノイズの影響を抑制するために例えば8画素や16画素をそれぞれの近傍画素として用いてもよい。   As described above, the second defect detection circuit 109 includes the first specific pixel (A0) of the plurality of first pixels (A pixels) and the second specific pixel (B0) of the plurality of second pixels (B pixels). A first ratio of pixel values is calculated. The second defect detection circuit 109 includes a first neighboring pixel (A1, A2, A3, A4) located in the vicinity of the first specific pixel and a second neighboring pixel (B1, B2) located in the vicinity of the second specific pixel. A second ratio of pixel values to B2, B3, B4) is calculated. Then, the second defect detection circuit 109 compares the first ratio and the second ratio, and determines whether or not the first specific pixel or the second specific pixel as the target pixel is a defective pixel. Preferably, each of the first neighboring pixel and the second neighboring pixel includes a plurality of neighboring pixels (A1 to A4, B1 to B4), and the second ratio is calculated using an average value of pixel values of the plurality of neighboring pixels. The Note that the number of each of the first neighboring pixels and the second neighboring pixels is not limited to four pixels. For example, 8 pixels or 16 pixels may be used as the neighboring pixels in order to suppress the influence of noise.

また第二の欠陥検出回路109は、第1比率と第2比率との比率が所定のしきい値を超えた場合に、着目画素(第1特定画素又は第2特定画素)が欠陥画素であると判定する。このとき、好ましくは、合焦度評価部108により評価された合焦度が高くなるにつれてしきい値が低くなるように、しきい値をなだらかに変更する。   The second defect detection circuit 109 determines that the pixel of interest (first specific pixel or second specific pixel) is a defective pixel when the ratio between the first ratio and the second ratio exceeds a predetermined threshold value. Is determined. At this time, preferably, the threshold value is changed gently so that the threshold value decreases as the in-focus degree evaluated by the in-focus degree evaluation unit 108 increases.

以上のとおり、本実施例によれば、通常の信号レベルとの差が少ない欠陥画素を効果的に検出する画像処理装置及び画像処理方法を提供することができる。   As described above, according to the present embodiment, it is possible to provide an image processing apparatus and an image processing method that can effectively detect defective pixels having a small difference from a normal signal level.

次に、図16を参照して、本発明の実施例2について説明する。近年のデジタルカメラにおいて、撮影時には撮像素子の出力をそのままファイルとして記録しておき、後でパーソナルコンピュータのソフトウェアを用いて信号処理(画像処理)を行う方法がある。このような画像処理を行うソフトウェアは、RAW現像ソフトと呼ばれる。   Next, Embodiment 2 of the present invention will be described with reference to FIG. In recent digital cameras, there is a method in which an image sensor output is recorded as a file as it is at the time of shooting, and signal processing (image processing) is performed later using software of a personal computer. Software that performs such image processing is called RAW development software.

実施例1では、撮像装置に組み込まれた回路によって上述の画像処理が行われるが、本実施例ではRAW現像ソフトにより画像処理が行われる。図16は、本実施例における画像処理方法のフローチャートである。図16のフローチャートの各ステップは、例えばパーソナルコンピュータのCPU(マイクロコンピュータ)の指示に基づいて実行される。   In the first embodiment, the above-described image processing is performed by a circuit incorporated in the imaging apparatus. In the present embodiment, image processing is performed by RAW development software. FIG. 16 is a flowchart of the image processing method in the present embodiment. Each step of the flowchart of FIG. 16 is executed based on an instruction of a CPU (microcomputer) of a personal computer, for example.

まず、ステップS1601において画像処理を開始し、ステップS1602においてRAWファイルをメモリに取り込む。続いてステップS1603において、第一の欠陥画素検出を行う。第一の欠陥画素検出は、実施例1における第一の欠陥検出回路106と同様の方法により行われる。そしてステップS1604において、全画素に対してステップS1603の第一の欠陥画素検出が完了したか否かが判定される。全画素に対して第一の欠陥画素検出が完了していない場合にはステップS1603に戻り、未完了の画素に対して、第一の欠陥画素検出が行われる。一方、全画素に対して第一の欠陥画素検出が完了した場合には、ステップS1605に進み、欠陥画素補間処理が行われる。欠陥画素補間処理は、実施例1における欠陥補間回路107と同様の方法により行われる。   First, image processing is started in step S1601, and a RAW file is taken into the memory in step S1602. In step S1603, first defective pixel detection is performed. The first defective pixel detection is performed by the same method as the first defect detection circuit 106 in the first embodiment. In step S1604, it is determined whether or not the first defective pixel detection in step S1603 has been completed for all pixels. If the first defective pixel detection has not been completed for all the pixels, the process returns to step S1603, and the first defective pixel detection is performed for the incomplete pixels. On the other hand, when the first defective pixel detection is completed for all the pixels, the process proceeds to step S1605, and defective pixel interpolation processing is performed. The defective pixel interpolation process is performed by the same method as the defect interpolation circuit 107 in the first embodiment.

続いて、ステップS1606において、合焦度判定が行われる(合焦度評価ステップ)。合焦度判定は、実施例1における合焦度評価部108と同様の方法により行われる。合焦度が所定値以上である場合(H)には、ステップS1607において第二の欠陥画素検出が行われる(欠陥検出ステップ)。第二の欠陥画素検出は、実施例1における第二の欠陥検出回路109と同様の方法により行われる。一方、合焦度が所定値未満である場合(L)には、第二の欠陥画素検出を行うことなくステップS1608に進む。   Subsequently, in step S1606, focus degree determination is performed (focus degree evaluation step). The in-focus degree determination is performed by the same method as the in-focus degree evaluation unit 108 in the first embodiment. If the in-focus degree is equal to or greater than the predetermined value (H), second defective pixel detection is performed in step S1607 (defect detection step). The second defective pixel detection is performed by the same method as the second defect detection circuit 109 in the first embodiment. On the other hand, if the focus level is less than the predetermined value (L), the process proceeds to step S1608 without performing the second defective pixel detection.

なお、本実施例では、ステップS1606にて合焦度が所定値以上である場合に限りステップS1607にて第二の欠陥画素検出が行われるように説明したが、本実施例はこれに限定されるものではない。ステップS1606で得られた合焦度に応じて、ステップS1607の第二の欠陥画素検出時に欠陥画素として検出されるためのしきい値を変更するようにしてもよい。このとき、合焦度が高くなるにつれてしきい値を低くするように(合焦度が低くなるにつれてしきい値を高くするように)、しきい値を合焦度に応じてなだらかに変化させる。   In the present embodiment, it has been described that the second defective pixel detection is performed in step S1607 only when the focus degree is equal to or greater than the predetermined value in step S1606. However, the present embodiment is not limited to this. It is not something. Depending on the degree of focus obtained in step S1606, the threshold value for detection as a defective pixel may be changed when the second defective pixel is detected in step S1607. At this time, the threshold value is gently changed in accordance with the degree of focus so that the threshold value is lowered as the degree of focusing increases (the threshold value is increased as the degree of focusing decreases). .

続いてステップS1607において、全画素に対してステップS1606の合焦度判定が行われたか否かが判定される。全画素に対して合焦度判定が完了していない場合には、ステップS1606に戻り、未完了の画素に対して合焦度判定が行われる。一方、全画素に対して合焦度判定が完了した場合には、ステップS1609に進み、欠陥画素補間処理が行われる(補間ステップ)。欠陥画素補間処理は、実施例1における欠陥補間回路110と同様の方法により行われる。その後、ステップS1610において映像信号処理が行われる(信号処理ステップ)。   Subsequently, in step S1607, it is determined whether or not the focus degree determination in step S1606 has been performed for all pixels. If the focus level determination has not been completed for all the pixels, the process returns to step S1606, and the focus level determination is performed for uncompleted pixels. On the other hand, if the in-focus degree determination has been completed for all the pixels, the process advances to step S1609 to perform defective pixel interpolation processing (interpolation step). The defective pixel interpolation process is performed by the same method as the defect interpolation circuit 110 in the first embodiment. Thereafter, video signal processing is performed in step S1610 (signal processing step).

本実施例によれば、RAW現像ソフトを用いて、通常の信号レベルとの差が少ない欠陥画素を効果的に検出する画像処理方法を提供することができる。   According to this embodiment, it is possible to provide an image processing method for effectively detecting defective pixels having a small difference from a normal signal level using RAW development software.

次に、図15を参照して、本発明の実施例3について説明する。図15は、本実施例における撮像素子の構造図であり、図15(a)は撮像素子の画素の正面図、図15(b)はその画素の断面図である。図15において、201はマイクロレンズ、202、203、204、205は、それぞれ、フォトダイオードである。本実施例では、図15に示されるように、1つのマイクロレンズ201に対して4つの画素(フォトダイオード202〜205)を配置して瞳分割を行う。   Next, Embodiment 3 of the present invention will be described with reference to FIG. FIG. 15 is a structural diagram of the image sensor in the present embodiment. FIG. 15A is a front view of a pixel of the image sensor, and FIG. 15B is a cross-sectional view of the pixel. In FIG. 15, 201 is a microlens, and 202, 203, 204, and 205 are photodiodes, respectively. In this embodiment, as shown in FIG. 15, four pixels (photodiodes 202 to 205) are arranged for one microlens 201 to perform pupil division.

図19は、本実施例におけるカラーフィルタ(4分割画素)の配列図である。図19(a)は、センサーの構造を示し、同一のマイクロレンズ201には同一のカラーフィルタが貼られている。図19(b)は、4分割された画素の値をマイクロレンズ201毎に加算した状態を示し、通常のベイヤー配列と同一である。したがって、そのまま従来の画像処理回路によって処理することができる。図19(c)は、上下の画素を加算した状態を示し、左右に瞳分割したのと等価である。図19(d)は、左右の画素を加算した状態を示し、上下に瞳分割したのと等価である。このように、画素の加算方向を変えることにより、上下方向又は左右方向に瞳分割すると、被写体のエッジが上下又は左右のいずれか一方にしかない場合にも、一方の方法で合焦度を正確に判定することができる。   FIG. 19 is an arrangement diagram of color filters (four-divided pixels) in the present embodiment. FIG. 19A shows the structure of the sensor, and the same color filter is attached to the same microlens 201. FIG. 19B shows a state where the values of the pixels divided into four are added for each microlens 201, and is the same as a normal Bayer array. Therefore, it can be processed as it is by a conventional image processing circuit. FIG. 19C shows a state in which the upper and lower pixels are added, which is equivalent to dividing the pupil left and right. FIG. 19D shows a state in which the left and right pixels are added, which is equivalent to dividing the pupil vertically. In this way, when the pupil is divided in the vertical direction or the horizontal direction by changing the pixel addition direction, the degree of focus can be accurately adjusted by one method even when the subject edge is only one of the vertical and horizontal sides. Can be determined.

実施例1では、A画素(第1画素)とB画素(第2画素)の2つの比を利用しており、いずれか一方の画素が欠陥画素である場合に、いずれの画素が欠陥画素であるかを判定することができない。そのため、近傍平均との差を利用する必要がある。それに対して、本実施例では画素が4種類あるため、種々の組み合わせにおいて比を利用することができる。例えば、フォトダイオード202、203、204、205をそれぞれA、B、C、D画素(第1、2、3、4画素)と定義すると、比として利用できる組み合わせとして、A:B、B:C、C:D、D:A、B:D、C:Aがある。ここで、D画素が欠陥画素であると仮定すると、C:DとD:AとD:Cの比率が近傍画素のそれと異なる比率となるが、他の組み合わせの比は近傍画素と同じ比率となる。このように、4分割に瞳分離を行うことで、比のみを利用して欠陥画素の特定が可能となる。本実施例は、合焦度と近傍画素と着目画素の瞳種類別画素値の比のみを利用して欠陥画素の検出をする。   In the first embodiment, two ratios of the A pixel (first pixel) and the B pixel (second pixel) are used, and when any one pixel is a defective pixel, any pixel is a defective pixel. Cannot determine if there is. Therefore, it is necessary to use the difference from the neighborhood average. On the other hand, since there are four types of pixels in this embodiment, the ratio can be used in various combinations. For example, if the photodiodes 202, 203, 204, and 205 are defined as A, B, C, and D pixels (first, second, third, and fourth pixels), A: B, B: C , C: D, D: A, B: D, and C: A. Assuming that the D pixel is a defective pixel, the ratio of C: D, D: A, and D: C is different from that of neighboring pixels, but the ratio of other combinations is the same as that of neighboring pixels. Become. In this way, by performing pupil separation in four divisions, it becomes possible to specify defective pixels using only the ratio. In this embodiment, a defective pixel is detected by using only the degree of focus and the ratio of the pixel value by pupil type of the neighboring pixel and the pixel of interest.

次に、図17を参照して、本発明の実施例4について説明する。図17は、リレーレンズにおける平行光領域(物体側焦点位置の点光源から広がる光が平行になる領域)で、入射光を同時に左右の画像に分離し、A像とB像を別の撮像素子を用いて露光するシステムの光学的構造図である。1701はミラー、1702は絞り、1703はリレーレンズである。リレーレンズ1703により平行領域になった光をミラー1701により左右に分割する。ミラー1701で分割された光は、ミラー1705、1704においてそれぞれ反射する。反射光は、結像レンズ1706、1707に導かれ、撮像素子1708、1709にそれぞれ結像する。これにより、A像とB像を同時に2つの撮像素子で得ることができる。なお、本実施例において、A像とB像を時分割で露光してもよい。以上のような構成に対しても、上記各実施例で説明した欠陥画素検出を適用することが可能である。   Next, Embodiment 4 of the present invention will be described with reference to FIG. FIG. 17 shows a parallel light region in the relay lens (a region where light spreading from the point light source at the object-side focal position is parallel), in which incident light is simultaneously separated into left and right images, and A image and B image are separated into different image sensors. FIG. Reference numeral 1701 denotes a mirror, 1702 denotes an aperture, and 1703 denotes a relay lens. The light that has become a parallel region by the relay lens 1703 is divided into left and right by the mirror 1701. The light divided by the mirror 1701 is reflected by the mirrors 1705 and 1704, respectively. The reflected light is guided to imaging lenses 1706 and 1707 and forms images on imaging elements 1708 and 1709, respectively. Thereby, an A image and a B image can be obtained simultaneously by two image sensors. In this embodiment, the A image and the B image may be exposed in a time division manner. It is possible to apply the defective pixel detection described in the above embodiments to the above configuration.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.

例えば、上記各実施例において、1つのマイクロレンズに対して複数のフォトダイオードで瞳分割をした例を示したが、瞳分割されている信号であれば、マイクロレンズとフォトダイオードの間で遮光して瞳分割した信号でも同様の効果がある。また、各実施例において、単板撮像素子による画像を想定しているが、2板又は3板撮像素子においても同様に効果がある。また瞳分割は、マイクロレンズとフォトダイオードの間でなくてもよい。また、上記各実施例では、合焦度合を算出する方法として瞳分割された像の一致度を元に算出したが、コントラスト法や、コントラスト法とのハイブリッドにより合焦度を算出してもよい。   For example, in each of the above embodiments, an example is shown in which pupil division is performed on one microlens with a plurality of photodiodes. However, if the signal is divided into pupils, light is shielded between the microlens and the photodiode. The same effect can be obtained by dividing the pupil signal. Moreover, in each Example, the image by a single plate image pick-up element is assumed, However, A 2 plate or 3 plate image pick-up element has an effect similarly. The pupil division may not be between the microlens and the photodiode. Further, in each of the above embodiments, the calculation is based on the coincidence of the pupil-divided images as a method for calculating the degree of focus. However, the degree of focus may be calculated by a contrast method or a hybrid with the contrast method. .

上記各実施例によれば、瞳分割された光束を利用して撮像素子の欠陥画素を高精度に検出する画像処理装置及び画像処理方法を提供することができる。   According to each of the above-described embodiments, it is possible to provide an image processing apparatus and an image processing method that detect defective pixels of an image sensor with high accuracy by using pupil-divided light beams.

108…合焦度評価部
109…第二の欠陥検出回路
110…欠陥補間回路
112…映像信号処理回路
108: In-focus degree evaluation unit 109 ... Second defect detection circuit 110 ... Defect interpolation circuit 112 ... Video signal processing circuit

Claims (4)

撮像光学系からの光束を瞳分割して第1光束及び第2光束を得て、該第1光束を光電変換する複数の第1画素及び該第2光束を光電変換する複数の第2画素を含む撮像素子を用いて得られた画像を処理する画像処理装置であって、
前記複数の第1画素及び前記複数の第2画素の出力を用いて合焦度を評価する合焦度評価手段と、
前記合焦度評価手段により評価された前記合焦度が所定値以上である場合に、前記撮像素子の欠陥画素を検出する欠陥検出手段と、
前記欠陥検出手段により検出された前記欠陥画素を補間する補間手段と、
前記複数の第1画素、前記複数の第2画素、及び、前記補間手段により前記欠陥画素を補間して得られた画素の出力を用いて撮影画像を生成する信号処理手段と、を有し、
前記欠陥検出手段は、前記複数の第1画素の第1特定画素と前記複数の第2画素の第2特定画素との画素値の第1比率と、該第1特定画素の近傍に位置する第1近傍画素と該第2特定画素の近傍に位置する第2近傍画素との画素値の第2比率とを比較することにより、該第1特定画素又は該第2特定画素が前記欠陥画素であるか否かを判定する、
ことを特徴とする画像処理装置。
The pupil beam of the imaging optical system is divided into pupils to obtain a first beam and a second beam, and a plurality of first pixels that photoelectrically convert the first beam and a plurality of second pixels that photoelectrically convert the second beam. An image processing apparatus that processes an image obtained using an imaging element including:
A focus degree evaluation means for evaluating a focus degree using outputs of the plurality of first pixels and the plurality of second pixels;
A defect detection means for detecting a defective pixel of the image sensor when the focus degree evaluated by the focus degree evaluation means is a predetermined value or more;
Interpolation means for interpolating the defective pixels detected by the defect detection means;
Signal processing means for generating a captured image using the plurality of first pixels, the plurality of second pixels, and the output of the pixel obtained by interpolating the defective pixel by the interpolation means;
The defect detection means includes a first ratio of pixel values of a first specific pixel of the plurality of first pixels and a second specific pixel of the plurality of second pixels, and a first ratio located in the vicinity of the first specific pixel. The first specific pixel or the second specific pixel is the defective pixel by comparing a second ratio of pixel values of one neighboring pixel and a second neighboring pixel located in the vicinity of the second specific pixel Whether or not
An image processing apparatus.
前記第1近傍画素及び前記第2近傍画素はそれぞれ複数の近傍画素からなり、
前記第2比率は、前記複数の近傍画素の画素値の平均値を用いて算出されることを特徴とする請求項1に記載の画像処理装置。
Each of the first neighboring pixel and the second neighboring pixel includes a plurality of neighboring pixels,
The image processing apparatus according to claim 1, wherein the second ratio is calculated using an average value of pixel values of the plurality of neighboring pixels.
前記欠陥検出手段は、
前記第1比率と前記第2比率との比率が所定のしきい値を超えた場合に、前記第1特定画素又は前記第2特定画素が前記欠陥画素であると判定し、
前記合焦度評価手段により評価された前記合焦度が高くなるにつれて前記しきい値が低くなるように、該しきい値を変更することを特徴とする請求項1に記載の画像処理装置。
The defect detection means includes
When the ratio between the first ratio and the second ratio exceeds a predetermined threshold, it is determined that the first specific pixel or the second specific pixel is the defective pixel,
The image processing apparatus according to claim 1, wherein the threshold value is changed so that the threshold value decreases as the focus degree evaluated by the focus degree evaluation unit increases.
撮像光学系からの光束を瞳分割して第1光束及び第2光束を得て、該第1光束を光電変換する複数の第1画素及び該第2光束を光電変換する複数の第2画素を含む撮像素子を用いて得られた画像を処理する画像処理方法であって、
前記複数の第1画素及び前記複数の第2画素の出力を用いて合焦度を評価する合焦度評価ステップと、
前記合焦度が所定値以上である場合に、前記撮像素子の欠陥画素を検出する欠陥検出ステップと、
前記欠陥画素を補間する補間ステップと、
前記複数の第1画素、前記複数の第2画素、及び、前記欠陥画素を補間して得られた画素の出力を用いて撮影画像を生成する信号処理ステップと、を有し、
前記欠陥検出ステップは、前記複数の第1画素の第1特定画素と前記複数の第2画素の第2特定画素との画素値の第1比率と、該第1特定画素の近傍に位置する第1近傍画素と該第2特定画素の近傍に位置する第2近傍画素との画素値の第2比率とを比較することにより、該第1特定画素又は該第2特定画素が前記欠陥画素であるか否かを判定する、
ことを特徴とする画像処理方法。
The pupil beam of the imaging optical system is divided into pupils to obtain a first beam and a second beam, and a plurality of first pixels that photoelectrically convert the first beam and a plurality of second pixels that photoelectrically convert the second beam. An image processing method for processing an image obtained using an imaging element including:
A focus degree evaluation step for evaluating a focus degree using outputs of the plurality of first pixels and the plurality of second pixels;
A defect detection step of detecting a defective pixel of the image sensor when the in-focus degree is a predetermined value or more;
An interpolation step of interpolating the defective pixels;
A signal processing step of generating a captured image using an output of the pixels obtained by interpolating the plurality of first pixels, the plurality of second pixels, and the defective pixels,
The defect detection step includes a first ratio of pixel values of a first specific pixel of the plurality of first pixels and a second specific pixel of the plurality of second pixels, and a first ratio located in the vicinity of the first specific pixel. The first specific pixel or the second specific pixel is the defective pixel by comparing a second ratio of pixel values of one neighboring pixel and a second neighboring pixel located in the vicinity of the second specific pixel Whether or not
An image processing method.
JP2010285363A 2010-12-22 2010-12-22 Image processing apparatus and image processing method Expired - Fee Related JP5737929B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010285363A JP5737929B2 (en) 2010-12-22 2010-12-22 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010285363A JP5737929B2 (en) 2010-12-22 2010-12-22 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2012134783A true JP2012134783A (en) 2012-07-12
JP5737929B2 JP5737929B2 (en) 2015-06-17

Family

ID=46649843

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010285363A Expired - Fee Related JP5737929B2 (en) 2010-12-22 2010-12-22 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP5737929B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014045352A (en) * 2012-08-27 2014-03-13 Canon Inc Image processing apparatus, method, and program, and image pickup apparatus having image processing apparatus
JP2014057141A (en) * 2012-09-11 2014-03-27 Canon Inc Image processing device, method and program, and imaging apparatus including image processing device
US20140354875A1 (en) * 2013-05-31 2014-12-04 Canon Kabushiki Kaisha Image capturing apparatus and control method therefor
JP2016138999A (en) * 2015-01-27 2016-08-04 キヤノン株式会社 Focus adjustment device and imaging device using the same and focus adjustment method
WO2018168492A1 (en) * 2017-03-15 2018-09-20 オリンパス株式会社 Image processing device, imaging apparatus, pixel abnormality detection method, and program
JP2019115032A (en) * 2017-12-20 2019-07-11 キヤノン株式会社 Solid-state imaging device, imaging apparatus, and imaging method
CN114697546A (en) * 2020-12-25 2022-07-01 汇顶科技(香港)有限公司 Shooting system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005328134A (en) * 2004-05-12 2005-11-24 Sony Corp Imaging apparatus and defect detecting method of solid-state imaging element
JP2006026234A (en) * 2004-07-20 2006-02-02 Olympus Corp Apparatus and system for imaging inside of living body
JP2006166450A (en) * 2004-12-09 2006-06-22 Agilent Technol Inc System and method for detecting and correcting defective pixel in digital image sensor
JP2008015754A (en) * 2006-07-05 2008-01-24 Nikon Corp Image pickup device, image processor and image processing method
JP2010107770A (en) * 2008-10-30 2010-05-13 Canon Inc Imaging apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005328134A (en) * 2004-05-12 2005-11-24 Sony Corp Imaging apparatus and defect detecting method of solid-state imaging element
JP2006026234A (en) * 2004-07-20 2006-02-02 Olympus Corp Apparatus and system for imaging inside of living body
JP2006166450A (en) * 2004-12-09 2006-06-22 Agilent Technol Inc System and method for detecting and correcting defective pixel in digital image sensor
JP2008015754A (en) * 2006-07-05 2008-01-24 Nikon Corp Image pickup device, image processor and image processing method
JP2010107770A (en) * 2008-10-30 2010-05-13 Canon Inc Imaging apparatus

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014045352A (en) * 2012-08-27 2014-03-13 Canon Inc Image processing apparatus, method, and program, and image pickup apparatus having image processing apparatus
US9456155B2 (en) 2012-08-27 2016-09-27 Canon Kabushiki Kaisha Image processing apparatus, method, and program, and image pickup apparatus having image processing apparatus
JP2014057141A (en) * 2012-09-11 2014-03-27 Canon Inc Image processing device, method and program, and imaging apparatus including image processing device
US20140354875A1 (en) * 2013-05-31 2014-12-04 Canon Kabushiki Kaisha Image capturing apparatus and control method therefor
US9578230B2 (en) * 2013-05-31 2017-02-21 Canon Kabushiki Kaisha Image capturing apparatus that performs shading correction and control method therefor
JP2016138999A (en) * 2015-01-27 2016-08-04 キヤノン株式会社 Focus adjustment device and imaging device using the same and focus adjustment method
WO2018168492A1 (en) * 2017-03-15 2018-09-20 オリンパス株式会社 Image processing device, imaging apparatus, pixel abnormality detection method, and program
JP2018152829A (en) * 2017-03-15 2018-09-27 オリンパス株式会社 Image processing apparatus, imaging apparatus, pixel abnormality detection method, and program
US10880508B2 (en) 2017-03-15 2020-12-29 Olympus Corporation Image processing apparatus, imaging apparatus, pixel-abnormality detecting method, and computer-readable recording medium
JP2019115032A (en) * 2017-12-20 2019-07-11 キヤノン株式会社 Solid-state imaging device, imaging apparatus, and imaging method
JP7149784B2 (en) 2017-12-20 2022-10-07 キヤノン株式会社 Solid-state imaging device, imaging device, and imaging method
CN114697546A (en) * 2020-12-25 2022-07-01 汇顶科技(香港)有限公司 Shooting system

Also Published As

Publication number Publication date
JP5737929B2 (en) 2015-06-17

Similar Documents

Publication Publication Date Title
JP5737929B2 (en) Image processing apparatus and image processing method
JP5264131B2 (en) Imaging device
JP6643122B2 (en) Range image apparatus, imaging apparatus, and range image correction method
JP5697433B2 (en) Image processing apparatus and image processing method
US9807325B2 (en) Imaging apparatus, control method for imaging apparatus, and non-transitory computer-readable storage medium
US9398207B2 (en) Imaging apparatus and image correction method, and image processing apparatus and image processing method
JP2007310043A (en) Correlation calculation method, correlation calculation device, focus detector and imaging apparatus
US9503661B2 (en) Imaging apparatus and image processing method
JP2015142364A (en) Image processing device, imaging apparatus and image processing method
JP5786355B2 (en) Defocus amount detection device and electronic camera
US9578230B2 (en) Image capturing apparatus that performs shading correction and control method therefor
JP2010193178A (en) Unit, method and program for processing image
JP6362070B2 (en) Image processing apparatus, imaging apparatus, image processing method, program, and storage medium
JPWO2019202984A1 (en) Imaging device and distance measurement method, distance measurement program and recording medium
US11201998B2 (en) Imaging apparatus and control method thereof
JP7445508B2 (en) Imaging device
JP6316140B2 (en) Image processing apparatus, image processing method, and program
US10880508B2 (en) Image processing apparatus, imaging apparatus, pixel-abnormality detecting method, and computer-readable recording medium
JP2002250857A (en) Range finder
JP2012103285A (en) Focus detecting device and method for controlling the same
JP2005010353A (en) Projector
JP6415139B2 (en) Focus detection apparatus, imaging apparatus, focus detection method, and focus detection program
JP2018014626A (en) Image processing apparatus and control method thereof, imaging device
JP2024002255A (en) Imaging device
JP2015069196A (en) Focus detector, control method thereof and control program, and imaging apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131224

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140805

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140812

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141014

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150421

R151 Written notification of patent or utility model registration

Ref document number: 5737929

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees