JP5173883B2 - Imaging device - Google Patents
Imaging device Download PDFInfo
- Publication number
- JP5173883B2 JP5173883B2 JP2009038484A JP2009038484A JP5173883B2 JP 5173883 B2 JP5173883 B2 JP 5173883B2 JP 2009038484 A JP2009038484 A JP 2009038484A JP 2009038484 A JP2009038484 A JP 2009038484A JP 5173883 B2 JP5173883 B2 JP 5173883B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- image
- distortion
- distortion correction
- coordinate position
- 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
Links
Images
Landscapes
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
Description
本発明は、固体撮像素子を使用した焦点検出において、検出精度の低下を抑制する技術に関する。 The present invention relates to a technique for suppressing a decrease in detection accuracy in focus detection using a solid-state imaging device.
デジタルカメラやデジタルビデオカメラ等の撮像装置では、一般に、撮像レンズのフォーカス制御を自動的に行うオートフォーカス機構が備えられており、被写体が常に合焦状態となるようにしている。このオートフォーカス機構は、合焦方式の原理から分類すると、測距方式とピント検出方式がある。測距方式は、被写体までの距離を測距し、これに応じてレンズ位置を制御するものである。ピント検出方式は、撮像面でのピントを検出し、ピントの合った位置にレンズの位置を制御するものである。代表的なピント検出方式として、コントラスト検出方式、位相差検出方式等があるが、位相差検出方式については、その原理が、特許文献1に開示されている。 An imaging apparatus such as a digital camera or a digital video camera is generally provided with an autofocus mechanism that automatically performs focus control of an imaging lens so that the subject is always in focus. This autofocus mechanism is classified into a distance measurement method and a focus detection method, based on the principle of the focus method. The distance measuring method measures the distance to the subject and controls the lens position according to the distance. The focus detection method detects the focus on the imaging surface and controls the position of the lens at a focused position. As typical focus detection methods, there are a contrast detection method, a phase difference detection method, and the like. The principle of the phase difference detection method is disclosed in Patent Document 1.
特許文献1の技術を図19〜図21を用いて説明する。例えば、ピントが合った合焦時には、図19のAに示すように、撮像レンズlの各部を通過した光、a0, b0, c0が撮像面mに収束し、図19のBに示すように、撮像面mでピントの合った像Z0が、得られる。そして、この図19に示す合焦状態よりもフォーカス位置がずれている、いわゆる前ピン状態になると、図20のAに示すように、撮像レンズlの各部を通過した光a1, b1, c1が、撮像面mよりも後に収束する。そして、図20のBに示すように、撮像面mで各光がそれぞれ別の像Za1, Zb1, Zc1となってしまう。また、いわゆる後ピン状態になると、図21のAに示すように、撮像レンズlの各部を通過した光a2, b2, c2が、撮像面mよりも前で収束し、図21のBに示すように、撮像面mで各光がそれぞれ別の像Za2, Zb2, Zc2となってしまう。この場合、前ピン状態と後ピン状態とでは、像のずれる方向が逆になり、ずれる方向とずれ量、いわゆるデフォーカス量を算出することができる。光学系により、デフォーカス量とレンズを合焦位置まで駆動する量との関係は決まっているので、レンズを合焦位置まで駆動することによって、オートフォーカス制御ができる。 The technique of Patent Document 1 will be described with reference to FIGS. For example, at the time of focusing, as shown in FIG. 19A, the light a0, b0, c0 that has passed through each part of the imaging lens l converges on the imaging surface m, and as shown in FIG. 19B. An image Z0 in focus on the imaging surface m is obtained. Then, when a so-called front pin state in which the focus position is shifted from the in-focus state shown in FIG. 19, the light a1, b1, c1 that has passed through each part of the imaging lens l is obtained as shown in A of FIG. , It converges after the imaging surface m. And as shown to B of FIG. 20, each light will become another image Za1, Zb1, Zc1 in the imaging surface m, respectively. In a so-called rear pin state, as shown in FIG. 21A, the light a2, b2, c2 that has passed through each part of the imaging lens l converges before the imaging surface m, and is shown in FIG. 21B. In this way, each light on the imaging surface m becomes a different image Za2, Zb2, Zc2. In this case, the image shift direction is reversed between the front pin state and the rear pin state, and the shift direction and the shift amount, so-called defocus amount, can be calculated. Since the relationship between the defocus amount and the amount by which the lens is driven to the in-focus position is determined by the optical system, auto-focus control can be performed by driving the lens to the in-focus position.
位相差検出方式におけるデフォーカス量の演算処理については、特許文献2等に、公知のアルゴリズムとして“MINアルゴリズム”が開示されている。図22は、本アルゴリズムにより位相差の相関を検出するための一般的なカメラ内部の構成を示す図である。レンズから入射した光は、メインミラーである45度ミラーの後ろに取り付けられているサブミラーによって、装置下方に反射され、メガネレンズと呼ばれる2次光学系のレンズにより2つの像に分離されて、AFセンサに入射される。そして、これら2つのAFセンサからの出力データを取り込み、センサ出力の相関を取る。それぞれのAFセンサを、センサ1、センサ2とし、センサ1のデータをA[1]〜A[n]、センサ2のデータをB[1]〜B[n]とすると、相関量U0は、
Regarding the defocus amount calculation processing in the phase difference detection method,
(min(a,b)は、a,bの小さい方の値)
と表される。まずこのU0を計算する。次に、図23のように、A像をAFセンサの1ビットシフトしたデータとB像のデータの相関量U1を計算する。このU1は、
(Min (a, b) is the smaller value of a, b)
It is expressed. First, U0 is calculated. Next, as shown in FIG. 23, the correlation amount U1 between the data obtained by shifting the A image by 1 bit of the AF sensor and the data of the B image is calculated. This U1 is
(min(a,b)は、a,bの小さい値)
となる。このように1ビットずつシフトした相関量を次々計算する。2像が一致していれば、この相関量は最大となるので、その最大値を取るシフト量と方向を求める。この値が、デフォーカス量となる。このデフォーカス量から撮影レンズが合焦状態になるレンズ駆動量を算出することができる。
(Min (a, b) is a small value of a, b)
It becomes. Thus, the correlation amount shifted by 1 bit is calculated one after another. If the two images match, the correlation amount is maximized, and the shift amount and direction for obtaining the maximum value are obtained. This value is the defocus amount. From this defocus amount, it is possible to calculate the lens drive amount at which the photographing lens is brought into focus.
ところで、位相差検出方式のオートフォーカスを行う装置として、特許文献3には、図24に示すようなものが開示されている。すなわち、光学系における光学像を電気信号に変換する光電変換セルが、2次元に配列された固体撮像素子(以下イメージセンサ)において、一部の光電変換セル(図24では、画素S1,S2)が、位相差検出方式での焦点検出に使用される。特許文献3によれば、図22のような測距センサへの結像レンズ、位相差を生成するためのメガネレンズ等が、必要なくなり、撮像装置を小さくすることができ、コストを低減することができる。
Incidentally, as an apparatus for performing phase difference detection type autofocusing,
光学レンズには収差があるため、光学レンズを介して撮像素子に結像される被写体光学像には光学歪みが発生してしまい、その結果、映像信号も歪みをもつ画像となってしまう。光学歪みとしては、図25(A)に示すような「糸まき型歪み」や図25(B)に示すような「たる型歪み」がある。これらの歪みは、図25において、本来点線で示される位置にあるべき画像情報が実線位置に結像するような歪みである。このような光学歪みを伴う画像信号の歪みを補正する補正処理としては、メモリ上に一時保持された画像信号を、歪みに応じて読み出しアドレスをずらして読み出す方法がある。 Since the optical lens has aberration, optical distortion occurs in the subject optical image formed on the image sensor via the optical lens. As a result, the video signal also becomes an image having distortion. As the optical distortion, there are “thread-wound distortion” as shown in FIG. 25A and “barrel distortion” as shown in FIG. These distortions are distortions such that image information that should originally be at the position indicated by the dotted line in FIG. 25 forms an image at the solid line position. As a correction process for correcting the distortion of the image signal accompanied with the optical distortion, there is a method of reading the image signal temporarily stored in the memory by shifting the read address according to the distortion.
特許文献4では、光学レンズを通して入力される光束のレンズ中心からの距離が大きくなるにつれて歪が大きくなるという歪特性に対して、それを補正する補正方法が説明されている。図26に、ズームレンズにおける光軸(レンズの中心)からの相対距離(%)と歪み率D(%)の関係である光学歪特性の一例を示す。この歪み率Dについて、図27を用いて説明する。矩形で囲まれた範囲は、歪が発生しない場合の画像出力位置である。たる状で囲まれた範囲は、実際に歪みが発生した画像の出力位置である。例えば、図のA点の本来の画像出力位置は、歪の発生しない画像出力位置A’であった場合、Aと、A’の像高(光軸からA,A’までの距離)を、それぞれ、h、h’とすると、そのときの歪み率は、
D(%)=h/h’ …(1)
のように表すことができる。この歪み率Dは、図26の特性に示されるように、光軸からの距離に応じて大きくなる。また、一般的なレンズの光学特性では、光軸に対する同心円状に分布した歪み率を持つ。
D (%) = h / h ′ (1)
It can be expressed as This distortion rate D increases with the distance from the optical axis, as shown in the characteristics of FIG. Further, the optical characteristics of a general lens have a distortion rate distributed concentrically with respect to the optical axis.
ところで、上記の歪み率による歪補正を特許文献3のような通常の撮像用画素(以下、通常画素)と、焦点検出用の画素(以下、AF画素)を配した構成の撮像素子に適用した場合、通常画素と同等の処理をAF画素に施してしまうと、焦点検出の精度が劣化することが懸念される。
By the way, the distortion correction based on the above distortion rate is applied to an imaging element having a configuration in which a normal imaging pixel (hereinafter referred to as a normal pixel) and a focus detection pixel (hereinafter referred to as an AF pixel) as in
本発明は、上述した課題に鑑みてなされたものであり、その目的は、通常の撮像用画素と、AF画素を配した構成の撮像素子において、歪み補正を行った場合でも、焦点検出の精度の低下を抑制できるようにすることである。 The present invention has been made in view of the above-described problems, and an object of the present invention is to achieve focus detection accuracy even when distortion correction is performed in an imaging element having a configuration in which normal imaging pixels and AF pixels are arranged. It is to be able to suppress the decrease in the number of times.
上述した課題を解決し、目的を達成するために、本発明に係わる撮像装置は、撮像レンズにより結像される被写体像を光電変換して画像生成用の第1の信号を生成する第1の画素群と、前記撮像レンズの瞳領域を分割して、分割された瞳領域からの被写体像を光電変換して位相差検出用の第2の信号を生成する第2の画素群とを有する撮像素子と、前記第1の画素群から得られる第1の信号に対して、前記撮像レンズにより生じる画像の歪みの補正を行なう第1の歪み補正手段と、前記第2の画素群から得られる第2の信号に対して、前記撮像レンズにより生じる画像の歪みの補正を行なう第2の歪み補正手段と、前記第2の歪み補正手段により歪みを補正された前記第2の信号から前記撮像レンズの合焦位置を検出する合焦位置検出手段と、前記第1の歪み補正手段と、前記第2の歪み補正手段とに、それぞれ異なる歪み補正処理を行わせる制御手段と、を備えることを特徴とする。 In order to solve the above-described problems and achieve the object, an imaging apparatus according to the present invention generates a first signal for generating an image by photoelectrically converting a subject image formed by an imaging lens. Imaging having a pixel group and a second pixel group that divides a pupil region of the imaging lens and photoelectrically converts a subject image from the divided pupil region to generate a second signal for phase difference detection A first distortion correction means for correcting distortion of an image generated by the imaging lens with respect to a first signal obtained from the element, the first pixel group, and a first signal obtained from the second pixel group; A second distortion correction unit that corrects distortion of an image generated by the imaging lens with respect to the second signal, and the second signal that has been corrected for distortion by the second distortion correction unit. Focusing position detection means for detecting the focusing position; Said first distortion correction means, in said second distortion correction means, and control means for causing the different distortion correction process, characterized in that it comprises a.
本発明によれば、通常の撮像用画素と、AF画素を配した構成の撮像素子において、歪み補正を行った場合でも、焦点検出の精度の低下を抑制することが可能となる。 According to the present invention, it is possible to suppress a decrease in focus detection accuracy even when distortion correction is performed in an imaging device having a configuration in which normal imaging pixels and AF pixels are arranged.
以下、本発明の好適な実施形態について、図面を参照して詳細に説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
(第1の実施形態)
図1は、本発明の第1の実施形態に係わる撮像装置としてのデジタルスチルカメラのシステム構成を示したブロック図である。
(First embodiment)
FIG. 1 is a block diagram showing a system configuration of a digital still camera as an imaging apparatus according to the first embodiment of the present invention.
図1において、100は、被写体像を結像させるための光学系であり、撮像レンズ、シャッター、絞り等で構成される。また、本実施形態では撮像レンズには、焦点距離が可変のズームレンズが用いられる。101は、イメージセンサ(撮像素子)である。たとえば、CCD(Charge Coupled Device)やCMOSセンサなどによって構成されている。本実施形態では、撮像素子は、被写体を撮像しJPEG圧縮などで画像データ(第1の信号)を生成する目的の(画像生成用の)通常画素(第1の画素群)と、焦点検出用の信号(第2の信号)を生成するAF画素(位相差検出用の第2の画素群)とを備えている。このような撮像素子において、AF画素は、図4に示すように間に通常画素を挟んで10画素置きに並んでいるものとする。なお、AF画素は、撮像レンズの瞳領域を分割して、分割された瞳領域からの被写体像を光電変換して位相差検出用の信号を生成する。
In FIG. 1,
102は、モータドライブ回路であり、CPU109の制御信号にてモータ114を駆動する駆動信号を発生する。114は、モータであり、モータドライブ回路102の駆動信号により光学系100を駆動する。103は、イメージセンサ駆動部である。イメージセンサ101が、CCDによって構成された場合に、光電変換された電気信号を読み出すための水平および垂直転送駆動信号を生成する。104は、アナログ処理部である。入力される撮像信号に含まれるリセットノイズを除去する相関二重サンプリングと撮像信号のレベルを利得可変に増幅する利得可変増幅等を行う。105は、アナログ処理部104より出力されたアナログ信号をデジタルデータに量子化するA/D変換部である。107は、A/D変換部105から出力された画像データを一旦蓄積するための記憶装置であるDRAMである。また、DRAM107は、後述のデジタル信号処理部108によって信号処理された画像データを、一旦蓄積するための記憶装置としても機能する。108は、A/D変換部105から出力されたデジタル画像データを画像処理するデジタル信号処理部である。一般的には、画像データに対してホワイトバランスの調整や、ゲイン調整、フィルタリング処理、補間処理等を行い、適切な画像サイズにリサイズし、圧縮処理を行い、メディア112に記録する。或いは、表示部111のLCD等に表示を行うための処理を行う。106は、イメージセンサ駆動部103、アナログ処理部104、A/D変換部105、デジタル信号処理部108へのタイミング信号を生成し送信するためのタイミングジェネレータである。109は、システム全体を制御するCPUである。110は、ユーザによって外部から操作されるスイッチ等の操作部である。113は、CPUの命令等が格納されているROMである。本実施形態では、ROMに、歪み補正に用いられる歪み率が格納されている。
図2は図1における、デジタル信号処理部108の内部について、歪み補正を行うブロックを詳細に示した図であり、歪み補正処理の動作を説明するための図である。また、図3は、本実施形態において、AF画素を歪補正して焦点検出処理(合焦位置検出処理)を行い、合焦後、撮像した通常画素に対して歪補正を行う処理フローについて説明した図である。図2を用いて、歪み補正ブロックの機能について説明する。
FIG. 2 is a diagram showing in detail a block for performing distortion correction for the inside of the digital
図2において、200は、AF画素について歪み補正を行う際に用いるアドレスを生成するAF画素歪み補正アドレス生成部(第2の歪み補正手段)である。201は、通常画素について歪み補正を行う際に用いるアドレスを生成する通常画素歪み補正アドレス生成部(第1の歪み補正手段)である。209は、AF画素の補間を行う際に用いるアドレスを生成するAF画素補間アドレス生成部である。なお、AF画素の補間とは、AF画素は通常の画像の撮影においては欠陥画素として扱われるため、それを周囲の通常画素の信号を用いて補間する動作を意味する。
In FIG. 2,
202はCPU109からの命令を受け、DRAM107に送信するアドレスを選択するセレクタである。203は、AF画素データを蓄積し、AF画素データを複数領域に分割した後、それぞれの領域に応じたデフォーカス量の算出を行うデフォーカス量算出部である。204は、AF画素補間アドレス生成部209により指定された通常画素データよりAF画素の補間値を計算するAF画素補間値生成部である。205は、AF画素補間処理後にDRAM107に書き込まれているデータを信号処理するための信号処理部である。AF画素補間処理後にDRAMに記録されているデータは、CCDで一般に用いられている点順次のベイヤー配列の画素データ(以下、RGBデータ)であり、信号処理部205では、このRGBデータをYUVデータに変換して再度DRAMに書き戻す。
A
206は、通常画素歪み補正アドレス生成部201で算出したアドレスをもとに読み出された通常画素に対して歪み補正値の算出を行う通常画素歪み補正値生成部である。207は処理フローに基づき、DRAMと各処理部間でやり取りするデータ及びアドレスを選択するメモリコントローラである。歪み補正、AF画素補間処理以外のDRAMのアドレスを作り出すこともできる。208は歪み補正された通常画素データをメディア112に書き込むためのメディアコントロール部である。
歪補正データの生成方法について図5を用いて、詳細に説明する。Aは、実際に歪みが発生した画像の出力位置であり、A’は、歪の発生しないAに対応する画像出力位置である。実際に歪みが発生しない画像が画像中心Oから距離r’だけ離れた座標A’(x2,y2)だとすると、歪みの発生した画像は、式(1)を用いて、画像中心OからD*r’の距離の座標A(x1,y1)に結像する。よって、A’の座標は歪み率Dを用いて、
(x2,y2)=(x1/D,y1/D) …(2)
と表すことができる。よって、歪み補正により (x2,y2)の座標位置にある画素を求める場合、式(2)より逆算出した歪み補正前の(x1,y1)の画素を読み出し、(x2,y2)の画素に置き換えればよい。しかし、式(2)から逆算出したA(x1,y1)の座標の計算結果は、実際には整数値の座標となることは少なく、計算した座標位置に画素が存在しないことが多い。
A method for generating distortion correction data will be described in detail with reference to FIG. A is an output position of an image where distortion has actually occurred, and A ′ is an image output position corresponding to A where distortion does not occur. Assuming that an image in which distortion does not actually occur is a coordinate A ′ (x2, y2) that is separated from the image center O by a distance r ′, the image in which distortion has occurred is expressed by D * r from the image center O using Equation (1). The image is formed at the coordinate A (x1, y1) of the distance '. Therefore, the coordinates of A ′ use the distortion rate D,
(X2, y2) = (x1 / D, y1 / D) (2)
It can be expressed as. Therefore, when obtaining the pixel at the coordinate position of (x2, y2) by distortion correction, the pixel of (x1, y1) before distortion correction calculated backward from equation (2) is read out, and the pixel of (x2, y2) is read. Replace it. However, the calculation result of the coordinates of A (x1, y1) calculated backward from Equation (2) is rarely an integer value coordinate, and there are often no pixels at the calculated coordinate position.
そこで、算出した座標(x1,y1)の周辺画素を読み出し、補間により画素値を求めなければならない。この際に用いられる補間方法として、最近傍法、線形補間法、3次補間法などの方法がある。通常画素の場合、多くの画素から多項式を用いて補間すると画像の品質が向上することが多い。しかし、AF画素に対してこうした多項式補間を行った場合、焦点検出の精度が劣化することが懸念される。 Therefore, it is necessary to read out the peripheral pixel of the calculated coordinates (x1, y1) and obtain the pixel value by interpolation. As an interpolation method used in this case, there are methods such as a nearest neighbor method, a linear interpolation method, and a cubic interpolation method. In the case of normal pixels, interpolation from many pixels using a polynomial often improves image quality. However, when such polynomial interpolation is performed on AF pixels, there is a concern that the accuracy of focus detection deteriorates.
そこで本実施形態では、通常画素については近傍4画素の補間演算により歪補正後の画素データを求め、AF画素については最近傍のAF画素データに置換することにより歪補正後の画素データを求める。以下、AF画素、通常画素それぞれの画素値の求め方について説明する。 Therefore, in this embodiment, pixel data after distortion correction is obtained by interpolation calculation of four neighboring pixels for normal pixels, and pixel data after distortion correction is obtained by replacing the AF pixels with the nearest AF pixel data. Hereinafter, how to obtain the pixel values of the AF pixel and the normal pixel will be described.
AF画素については、計算で求められた歪補正前の座標位置(x1,y1)の最も近傍の座標にあるAF画素を、DRAM107より読み出す。図6で、AF画素がB,C,D,Eのように並び、AF画素の補正前の座標がAだったとすると、Aは最も近傍のDの値に置き換えられる。よって補正後の値は
A’=D
と表すことが出来る。
As for the AF pixel, the AF pixel at the nearest coordinates of the coordinate position (x1, y1) before distortion correction obtained by calculation is read from the
Can be expressed as
通常画素については、近傍4画素の補間演算により画素データを求める。図7で、通常画素がW,X,Y,Zのように並び、通常画素の補正前の座標がAだったとする。Aの水平、垂直近傍4点の通常画素である、W,X,Y,Zを読み出し、これら4つの画素データから補間演算によって求める。図7のk,l,m,nのようにAと各画素間の距離を表すと、補間後の値は、
A’=(lnW+lmX+knY+kmZ)/(k+l)(m+n) …(3)
と表すことができる。
For normal pixels, pixel data is obtained by interpolation of four neighboring pixels. In FIG. 7, it is assumed that normal pixels are arranged as W, X, Y, and Z, and the coordinates before correction of the normal pixels are A. W, X, Y, and Z, which are four normal pixels in the horizontal and vertical vicinity of A, are read out and obtained from these four pixel data by interpolation calculation. When the distance between A and each pixel is represented as k, l, m, and n in FIG.
A ′ = (lnW + lmX + knY + kmZ) / (k + 1) (m + n) (3)
It can be expressed as.
なお、歪み率DはあらかじめROM113に格納しておくが、ズーム倍率によって歪み率が異なってしまうので、ズーム倍率に応じて、複数の歪み率をROM113に記録しておく。
The distortion rate D is stored in the
図3のフローチャートを用いて、本実施形態の動作について説明する。まず、AF画素の歪み補正フローについて説明する。 The operation of the present embodiment will be described using the flowchart of FIG. First, the AF pixel distortion correction flow will be described.
ステップS300で、歪み補正処理が開始される。AF画素の歪みを補正するので、CPU109はセレクタ202にAF画素歪み補正アドレス生成部200のアドレスを選択するように命令し、AF画素値を求める座標位置を指定する。ステップS301にて、AF画素歪み補正アドレス生成部200は、指定した座標位置とズーム倍率に対応したAF画素の歪み率Dを、ROM113より読み出し、AF画素の歪み補正前の座標位置を式(2)から逆算出する。ステップS302では、図6で示したように、式(2)で逆算出された座標位置の最近傍のAF画素がDRAM107より読み出され、歪補正後のAF画素に置換される。歪み補正後のAF画素はデフォーカス量算出部203に蓄積される。ステップS303では、歪み補正するAF画素が最終画素であるかを判定して、最終画素でない場合は、座標位置をインクリメントしてステップS301に遷移する。最終画素と判定された場合、ステップS304へ遷移する。ステップS304で、デフォーカス量算出部203は蓄積した歪補正後のAF画素データに対して、例えば、図8のように、画像を複数の領域に分割する。そして、それぞれの領域に対して、前述のMINアルゴリズムによりデフォーカス量を算出する。CPU109はそのデフォーカス量に基づいて、合焦したい領域に合焦させるようにレンズを駆動させる。レンズを駆動させ合焦状態になった後は、ステップS305で再び撮像を行い、画像をDRAMに取得し、AのAF画素の補間処理フローに移る。
In step S300, distortion correction processing is started. Since the distortion of the AF pixel is corrected, the
次に、AF画素の補間処理フローについて説明する。なお、AF画素の補間処理とは、既に述べたように、AF画素は通常の画像の撮影においては欠陥画素として扱われるため、それを周囲の通常画素の信号を用いて補間する動作を意味する。また、ここでAF画素の補間処理を行う理由は、後の通常画素歪み補正において、AF画素補間後の画素値を用いることがあるからである。 Next, an AF pixel interpolation processing flow will be described. As described above, the AF pixel interpolation processing means that an AF pixel is treated as a defective pixel in normal image shooting, and therefore, an operation of interpolating it using a signal of a surrounding normal pixel is meant. . The reason why the AF pixel interpolation processing is performed here is that the pixel value after the AF pixel interpolation may be used in the subsequent normal pixel distortion correction.
CPU109はセレクタ202にAF画素補間アドレス生成部209のアドレスを選択するように設定し、再撮像により取得された画像データの座標位置を指定する。ステップS310では、その座標位置に対応する画素が、AF画素か、通常画素かを判定する。AF画素と判定された場合はステップS311に遷移し、AF画素でない場合には、再度ステップS310で同じ処理を行う。ステップS311では、AF画素補間アドレス生成部209より、AF画素の補間に用いるAF画素周囲の通常画素のアドレスを算出する。ステップS312では、ステップS311で算出した通常画素をDRAMから読み出す。ステップS313では、AF画素補間値生成部204にてAF画素の周辺の通常画素から補間値を作成する。図9に補間値作成に使用する通常画素の位置を示す。補間するAF画素SがRGBのどの画素の位置に相当するかにより、補間方法が異なり、それぞれ、図9の左側(G画素補間方法)、真中(R画素補間方法)、右側(B画素補間方法)のような通常画素4画素の選び方となる。通常画素4画素を選んだら平均値をとり、ステップS314で、AF画素補間アドレス生成部209がAF画素該当箇所のアドレスを計算し、そこへ算出した平均値を書き込む。ステップS315では、補間処理するAF画素が最終画素かを判定し、最終画素でない場合は、座標位置をインクリメントしてステップS310へ遷移する。最終画素の場合は、Bの通常画素の歪み補正フローへ移る。
The
最後に、通常画素の歪み補正フローについて説明する。 Finally, a normal pixel distortion correction flow will be described.
ステップS320では、信号処理部205により、AF画素の補間処理をされたRGBデータを信号処理してYUVデータにする。ステップS321でYUVデータをDRAM107に書き込む。これらの処理の際に用いる一連のアドレスはメモリコントローラ207から生成する。ステップS322では、現在の座標位置が最終画素かを判定し、最終画素でない場合は、座標位置をインクリメントしてステップS320へ遷移する。CPU109はセレクタ202に通常画素歪み補正アドレス生成部201のアドレスを選択するように設定する。ステップS323で、通常画素歪み補正アドレス生成部201は、歪補正後の画像の座標位置より、ROM113から通常画素の歪み率Dを読み出し、歪み補正される前の座標位置を式(2)で逆計算する。算出した座標位置が整数値とならない場合がほとんどであるので、図7にて説明したように、近傍の4点の座標点のアドレスを算出する。ステップS324では、このアドレスより、DRAM107からYUVデータを読み出す。ステップS325では、通常画素歪み補正値生成部206にて、近傍の4点の歪み補正後のYUVデータから、歪み補正後のYUVデータを補間演算によって生成する。ステップS326では、ステップS324で生成されたYUVの補間データをDRAMに書き込む。ステップS327では、現在の座標位置が最終画素かを判定し、最終画素でない場合は、座標位置をインクリメントしてステップS323へ遷移する。最終画素の場合は、ステップS328へ遷移する。ステップS328では、上記の歪み補正されたYUVデータをメディアコントロール部208を通して、メディア112へ書き込む。このとき、表示部111へ表示を行っても良い。また、図示していない圧縮処理を行って、画像データに圧縮処理を施してファイル化を行い、メディア112へ書き込んでも良い。メディア書き込み後はステップS329で終了となる。
In step S320, the
(第2の実施形態)
図10は、本発明の第2の実施形態におけるデジタル信号処理部108について詳細に説明した図である。図10の内容は、図2とほぼ同じであるため、異なる部分についてのみ説明する。
(Second Embodiment)
FIG. 10 is a diagram illustrating in detail the digital
第1の実施形態では、通常画素では、一度信号処理を行い、信号処理されたYUVデータに対して歪み補正を行っていたが、本実施形態では、信号処理前のRGBデータに対して歪み補正を行う。 In the first embodiment, the normal pixel is subjected to signal processing once, and distortion correction is performed on the signal-processed YUV data. However, in this embodiment, distortion correction is performed on RGB data before signal processing. I do.
1006は、AF画素補間処理後、DRAM107に書き戻されたRGBの画像データを読み出し、読み出されたRGBデータに対して歪み補正処理を行うための、通常画素歪み補正値生成部である。
通常画素歪み補正アドレス生成部1001により、通常画素歪み補正に用いる画素のアドレスを生成する。本実施形態においても、第1の実施形態の図7と同じように、近傍の4画素から補間処理により画素データを求める。しかし、本実施形態では、補間する通常画素がRGBのいずれに該当するかによって画素データの取り方が異なる。すなわち、R画素を補間するときは図12の左側、G画素を補間するときは同図の真中、B画素を補間するときは同図の右側の黒点に示すように同色の近傍4画素をとる。そして、それらの4点を用いて、式(3)から補間値を算出する。
A normal pixel distortion correction
1005は、通常画素歪み補正後のデータを信号処理するための信号処理部である。RGBデータをYUVデータに変換し、DRAMに書き込む。その他の構成については第1の実施形態と同様である。
次に、図11のフローチャートを用いて、本実施形態の動作について説明する。 Next, the operation of this embodiment will be described using the flowchart of FIG.
ステップS1100からステップS1115のフローは、AF画素の歪み補正からAF画素を補間するまでの処理であり、第1の実施形態における図3のステップS300からステップS305と同じである。本実施形態では、RGBデータに対して歪み補正を行うため、ステップS1100からステップS1115でAF画素補間処理を行った後、ステップS1120からステップS1122で通常画素の歪み補正前の値を算出する。その後、ステップS1123で信号処理し、RGBをYUVに変換し、ステップS1126で信号処理されたYUVデータをメディア112へ書き込む。 The flow from step S1100 to step S1115 is processing from AF pixel distortion correction to AF pixel interpolation, and is the same as step S300 to step S305 in FIG. 3 in the first embodiment. In the present embodiment, in order to perform distortion correction on RGB data, after performing AF pixel interpolation processing from step S1100 to step S1115, values before normal pixel distortion correction are calculated from step S1120 to step S1122. Thereafter, signal processing is performed in step S1123, RGB is converted into YUV, and YUV data subjected to signal processing in step S1126 is written to the medium 112.
(第3の実施形態)
本実施形態では、レンズの歪に応じて合焦評価の領域を変えることで、光学歪みを補正したAF処理を行う。
(Third embodiment)
In the present embodiment, AF processing in which optical distortion is corrected is performed by changing the focus evaluation area in accordance with lens distortion.
図13は、第3の実施形態におけるデジタル信号処理部108について詳細に説明した図である。図13の内容は、第1の実施形態の図2とほぼ同じであるため、異なる部分についてのみ説明する。
FIG. 13 is a diagram illustrating in detail the digital
図2では、各AF画素について、歪み補正アドレスの算出を行っていたが、本実施形態では、AF画素は歪み補正アドレスの算出は行わない。そのため、図13の1300はAF画素のアドレスを生成するのみに留めたAF画素アドレス生成部になっている。AF画素の歪み補正アドレスを生成しないことにより、計算量を削減し、処理時間を短縮することができる。その他の構成は第1の実施形態の図2と同じだが、デフォーカス量算出部1303での合焦評価の領域がレンズ歪みにより変わる点が第1の実施形態と異なる。例えば、図8のように歪補正後の画像を領域分割したとすると、歪みに応じてそれぞれのエリアにどのAF画素の評価値を用いるのかを決定しておき、このマッピング情報をROM113に格納しておく。デフォーカス量算出部は歪みに応じ、このマッピング情報をROMから読み出し、図8の各領域内のAF画素が評価され、これらのAF画素からデフォーカス量を算出する。
In FIG. 2, the distortion correction address is calculated for each AF pixel. However, in this embodiment, the AF pixel does not calculate the distortion correction address. For this reason,
以下、図8の通常画素歪み補正後の画像のA1の領域にピントを合わせることを考える。 In the following, let us consider focusing on the area A1 of the image after normal pixel distortion correction in FIG.
図15は、図8のA1領域付近の拡大画像である。実線が歪み補正前、点線が歪み補正後の画像である。A1領域にピントを合わせる場合、AF画素歪み補正前のA1領域に対応するAF画素である図の灰色の4点をAFに用いると、通常画素歪み補正後の画像ではA1領域の枠外にピントを合わせてしまい、A1領域にピントが合わない。そこで、本実施形態では、AF枠の取り方を変えることで、A1領域にピントが合うようにAF画素の歪み補正を行う。図16は本実施形態によるAF枠のとり方の一例について説明した図である。点線は歪みが無い場合のAF評価枠、実線は歪みがある場合のAF評価枠を示しており、丸点はAF画素である。図17は、図15の左上を拡大した図である。本実施形態の場合、歪み無しの場合には図17の点線で囲まれた左上の領域が図8のA1の領域に該当する。よって歪みが無い場合には点線内にある00,01,10,11の4つのAF画素をA1の合焦評価に用いる。歪みがある場合には、実線で囲まれた左上の領域が図8のA1の領域に該当する。よって、歪みがある場合には実線枠内の11,20の2点のAF画素をA1の合焦評価に用いる。もし、より多くのAF画素を焦点検出に用いたい場合には、実線枠外のある範囲内のAF画素をとってもよい。例えば、図18の一点鎖線のように、歪みのある場合のAF枠外を拡大し、拡大した枠内にあるAF画素10,21の2点を追加して焦点検出に用いてもよい。このような光学歪みに応じたAF評価に用いるAF画素のマッピング情報を、ROMに格納しておき、A1領域の合焦評価の際に、このROMの値を読み出し、A1領域に対応したAF画素をAF評価に用いる。
FIG. 15 is an enlarged image near the area A1 in FIG. Solid lines are images before distortion correction, and dotted lines are images after distortion correction. When focusing on the A1 area, if the four gray points in the figure, which are AF pixels corresponding to the A1 area before the AF pixel distortion correction, are used for AF, the image after the normal pixel distortion correction is focused outside the frame of the A1 area. They are aligned and the A1 area is not in focus. Therefore, in the present embodiment, the AF pixel distortion is corrected so that the A1 area is in focus by changing the AF frame. FIG. 16 is a diagram for explaining an example of how to set an AF frame according to the present embodiment. A dotted line indicates an AF evaluation frame when there is no distortion, a solid line indicates an AF evaluation frame when there is distortion, and a round dot indicates an AF pixel. FIG. 17 is an enlarged view of the upper left of FIG. In the present embodiment, when there is no distortion, the upper left area surrounded by the dotted line in FIG. 17 corresponds to the area A1 in FIG. Therefore, when there is no distortion, four
このようにして、全ての領域に対応したマッピング情報をROMにもたせ、合焦する領域に対応したAF画素を合焦評価に用いることにより、通常画素歪み補正後の画像のAF領域と、実際に評価に用いるAF領域を合致させることができる。なお、本実施形態では、4つ及び2つのAF画素でAF評価を行っているが、より多くのAF画素を用いてAF評価を行ってもよい。 In this way, mapping information corresponding to all areas is provided in the ROM, and AF pixels corresponding to the in-focus area are used for in-focus evaluation, so that the AF area of the image after normal pixel distortion correction is actually The AF area used for evaluation can be matched. In the present embodiment, the AF evaluation is performed using four and two AF pixels, but the AF evaluation may be performed using more AF pixels.
図14のフローチャートを用いて、本実施形態の動作について説明する。 The operation of the present embodiment will be described using the flowchart of FIG.
図14の内容は、図3とほぼ同じである。ただし、ステップS1401で、AF画素の歪み補正アドレスを算出せずにAF画素を読み出している点と、ステップS1404でAF処理を行う前に、ステップS1403にてデフォーカス量算出部1303で歪み補正AF評価枠の算出を行っている点のみ異なる。
The content of FIG. 14 is almost the same as FIG. However, in step S1401, the AF pixel is read without calculating the AF pixel distortion correction address, and before performing the AF process in step S1404, the defocus
Claims (3)
前記第1の画素群から得られる第1の信号に対して、前記撮像レンズにより生じる画像の歪みの補正を行なう第1の歪み補正手段と、
前記第2の画素群から得られる第2の信号に対して、前記撮像レンズにより生じる画像の歪みの補正を行なう第2の歪み補正手段と、
前記第2の歪み補正手段により歪みを補正された前記第2の信号から前記撮像レンズの合焦位置を検出する合焦位置検出手段と、
前記第1の歪み補正手段と、前記第2の歪み補正手段とに、それぞれ異なる歪み補正処理を行わせる制御手段と、
を備えることを特徴とする撮像装置。 A first pixel group that photoelectrically converts an object image formed by the imaging lens to generate a first signal for generating an image, and a pupil region of the imaging lens are divided, and from the divided pupil region An image sensor having a second pixel group that photoelectrically converts a subject image to generate a second signal for phase difference detection;
First distortion correction means for correcting distortion of an image generated by the imaging lens with respect to the first signal obtained from the first pixel group;
Second distortion correction means for correcting image distortion caused by the imaging lens with respect to the second signal obtained from the second pixel group;
A focus position detecting means for detecting a focus position of the imaging lens from the second signal whose distortion is corrected by the second distortion correcting means;
Control means for causing the first distortion correction means and the second distortion correction means to perform different distortion correction processes;
An imaging apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009038484A JP5173883B2 (en) | 2009-02-20 | 2009-02-20 | Imaging device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009038484A JP5173883B2 (en) | 2009-02-20 | 2009-02-20 | Imaging device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010191390A JP2010191390A (en) | 2010-09-02 |
JP5173883B2 true JP5173883B2 (en) | 2013-04-03 |
Family
ID=42817461
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009038484A Expired - Fee Related JP5173883B2 (en) | 2009-02-20 | 2009-02-20 | Imaging device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5173883B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5786355B2 (en) * | 2011-02-17 | 2015-09-30 | 株式会社ニコン | Defocus amount detection device and electronic camera |
JP5789542B2 (en) * | 2012-02-29 | 2015-10-07 | 日立マクセル株式会社 | Imaging device |
JP5989375B2 (en) * | 2012-03-28 | 2016-09-07 | ラピスセミコンダクタ株式会社 | Semiconductor device and battery monitoring system |
JP5901801B2 (en) | 2013-01-04 | 2016-04-13 | 富士フイルム株式会社 | Image processing apparatus, imaging apparatus, program, and image processing method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3285376B2 (en) * | 1991-11-29 | 2002-05-27 | キヤノン株式会社 | Automatic focus detection device |
JP4007716B2 (en) * | 1999-04-20 | 2007-11-14 | オリンパス株式会社 | Imaging device |
JP4047687B2 (en) * | 2002-09-30 | 2008-02-13 | 富士フイルム株式会社 | Digital camera |
JP4935162B2 (en) * | 2006-04-11 | 2012-05-23 | 株式会社ニコン | Imaging apparatus, camera, and image processing method |
-
2009
- 2009-02-20 JP JP2009038484A patent/JP5173883B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2010191390A (en) | 2010-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5225151B2 (en) | Imaging apparatus and image processing method | |
JP4749959B2 (en) | Imaging device, manufacturing apparatus and manufacturing method thereof | |
JP2008048293A (en) | Imaging device and method for manufacturing same | |
JP6298362B2 (en) | Imaging apparatus, control method therefor, and imaging system | |
JP5572700B2 (en) | Imaging apparatus and imaging method | |
JP2008011492A (en) | Imaging device and its method | |
JP5657184B2 (en) | Imaging apparatus and signal processing method | |
JP2011028048A (en) | Image capturing apparatus, and method of controlling the same | |
JP2012037574A (en) | Electronic imaging apparatus | |
JP5173883B2 (en) | Imaging device | |
JP2013219675A (en) | Imaging device and control method for imaging device | |
JP2001186533A (en) | Image processing unit | |
JP2008245266A (en) | Imaging apparatus and method | |
JP5268533B2 (en) | Image processing method, image processing apparatus, imaging apparatus, and image processing program | |
JP6759088B2 (en) | Imaging device and its control method and program | |
JP2011217363A (en) | Imaging apparatus | |
JP2012173334A (en) | Defocus quantity detection device and electronic camera | |
JP5409588B2 (en) | Focus adjustment method, focus adjustment program, and imaging apparatus | |
JP2002372662A (en) | Interchangeable lens and camera system having it | |
JP6576114B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
JP6223135B2 (en) | Imaging apparatus and control method thereof | |
JP2012222431A (en) | Imaging apparatus and control method of the same | |
JP2010258871A (en) | Imaging system and imaging method | |
JP5597273B2 (en) | Imaging apparatus and image processing method | |
JP2007181193A (en) | Imaging apparatus and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120216 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121126 |
|
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: 20121130 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121227 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5173883 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160111 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |