JP2010191390A - Imaging apparatus - Google Patents

Imaging apparatus Download PDF

Info

Publication number
JP2010191390A
JP2010191390A JP2009038484A JP2009038484A JP2010191390A JP 2010191390 A JP2010191390 A JP 2010191390A JP 2009038484 A JP2009038484 A JP 2009038484A JP 2009038484 A JP2009038484 A JP 2009038484A JP 2010191390 A JP2010191390 A JP 2010191390A
Authority
JP
Japan
Prior art keywords
pixel
distortion
image
distortion correction
pixel group
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
JP2009038484A
Other languages
Japanese (ja)
Other versions
JP5173883B2 (en
Inventor
Masahiro Aimi
真宏 会見
Yuichiro Kimijima
裕一郎 君島
Yoshihiro Honma
義浩 本間
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 JP2009038484A priority Critical patent/JP5173883B2/en
Publication of JP2010191390A publication Critical patent/JP2010191390A/en
Application granted granted Critical
Publication of JP5173883B2 publication Critical patent/JP5173883B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To suppress degradation in the focus detection accuracy, even when correcting a distortion in an imaging element in which normal imaging pixels and AF pixels are arranged. <P>SOLUTION: This imaging apparatus includes the imaging element having a first pixel group that generates a first signal for image formation by photoelectrically converting a subject image formed by an imaging lens, and a second pixel group that generates a second signal for phase difference detection; a first distortion correcting part 201 that corrects an image distortion caused by the imaging lens, for a first signal obtained from the first pixel group; a second distortion correcting part 200 that corrects an image distortion caused by the imaging lens, for a second signal obtained from the second pixel group; a focusing position detecting part 203 that detects the focusing position of the imaging lens from the second signal corrected by the second distortion correcting part; and a control part 109 that causes the first distortion correcting part and second distortion correcting part to perform distortion correcting processes that are different. <P>COPYRIGHT: (C)2010,JPO&INPIT

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, Patent Document 2 discloses “MIN algorithm” as a known algorithm. FIG. 22 is a diagram showing a general internal structure of a camera for detecting a phase difference correlation by this algorithm. The light incident from the lens is reflected to the lower part of the apparatus by a sub-mirror attached behind the 45-degree mirror, which is the main mirror, and is separated into two images by a lens of a secondary optical system called a spectacle lens, and AF It is incident on the sensor. Then, the output data from these two AF sensors is taken in and the sensor output is correlated. If each AF sensor is sensor 1 and sensor 2, the data of sensor 1 is A [1] to A [n], and the data of sensor 2 is B [1] to B [n], the correlation amount U0 is

Figure 2010191390
Figure 2010191390

(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

Figure 2010191390
Figure 2010191390

(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, Patent Document 3 discloses a device as shown in FIG. That is, in a solid-state imaging device (hereinafter referred to as an image sensor) in which photoelectric conversion cells that convert an optical image in an optical system into an electrical signal are arranged in two dimensions, some photoelectric conversion cells (pixels S1 and S2 in FIG. 24). Are used for focus detection in the phase difference detection method. According to Patent Document 3, an image forming lens for a distance measuring sensor as shown in FIG. 22, a spectacle lens for generating a phase difference, and the like are not necessary, and the imaging apparatus can be reduced in size and cost can be reduced. Can do.

特開平4−267211号公報JP-A-4-267211 特開平9−43507号公報Japanese Patent Laid-Open No. 9-43507 特開平2000−156823号公報Japanese Unexamined Patent Publication No. 2000-156823 特開平6−237413号公報JP-A-6-237413

光学レンズには収差があるため、光学レンズを介して撮像素子に結像される被写体光学像には光学歪みが発生してしまい、その結果、映像信号も歪みをもつ画像となってしまう。光学歪みとしては、図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の特性に示されるように、光軸からの距離に応じて大きくなる。また、一般的なレンズの光学特性では、光軸に対する同心円状に分布した歪み率を持つ。
Patent Document 4 describes a correction method for correcting distortion characteristics in which distortion increases as the distance from the lens center of a light beam input through an optical lens increases. FIG. 26 shows an example of an optical distortion characteristic that is a relationship between a relative distance (%) from the optical axis (the center of the lens) and a distortion rate D (%) in the zoom lens. The distortion rate D will be described with reference to FIG. A range surrounded by a rectangle is an image output position when no distortion occurs. A range surrounded by a barrel is an output position of an image in which distortion has actually occurred. For example, when the original image output position at the point A in FIG. 9 is the image output position A ′ where distortion does not occur, the image heights of A and A ′ (distances from the optical axis to A and A ′) are If h and h ′, respectively, the distortion rate at that time is
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 Patent Document 3 are arranged. In this case, if the AF pixel is subjected to the same processing as that of the normal pixel, there is a concern that the accuracy of focus detection deteriorates.

本発明は、上述した課題に鑑みてなされたものであり、その目的は、通常の撮像用画素と、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.

本発明の第1の実施形態に係るシステムの全体構成の概略を示す機能ブロック図である。It is a functional block diagram showing the outline of the whole composition of the system concerning a 1st embodiment of the present invention. 本発明の第1の実施形態における歪み補正を行うデジタル信号処理部の詳細を示す説明図である。It is explanatory drawing which shows the detail of the digital signal processing part which performs distortion correction in the 1st Embodiment of this invention. 本発明の第1の実施形態における歪み補正処理のフローチャートである。It is a flowchart of the distortion correction process in the 1st Embodiment of this invention. 本発明の第1の実施形態における撮像素子の並び方を示す説明図である。It is explanatory drawing which shows how to arrange the image pick-up element in the 1st Embodiment of this invention. 本発明の第1の実施形態における歪み補正前の座標位置の求め方を示す説明図である。It is explanatory drawing which shows how to obtain | require the coordinate position before distortion correction in the 1st Embodiment of this invention. 本発明の第1の実施形態のAF画素歪み補正における補間方法を示す図である。It is a figure which shows the interpolation method in AF pixel distortion correction of the 1st Embodiment of this invention. 本発明の第1の実施形態の通常画素歪み補正における補間方法を示す図である。It is a figure which shows the interpolation method in the normal pixel distortion correction of the 1st Embodiment of this invention. 歪み補正後の画像の領域分割の例を示す図である。It is a figure which shows the example of the area | region division of the image after distortion correction. 本発明の第1の実施形態におけるAF画素補間方法を示す説明図である。It is explanatory drawing which shows the AF pixel interpolation method in the 1st Embodiment of this invention. 本発明の第2の実施形態における歪み補正を行うデジタル信号処理部の詳細を示す説明図である。It is explanatory drawing which shows the detail of the digital signal processing part which performs distortion correction in the 2nd Embodiment of this invention. 本発明の第2の実施形態における歪み補正処理のフローチャートである。It is a flowchart of the distortion correction process in the 2nd Embodiment of this invention. 本発明の第2の実施形態の通常画素歪み補正における補間方法を示す図である。It is a figure which shows the interpolation method in the normal pixel distortion correction of the 2nd Embodiment of this invention. 本発明の第3の実施形態における歪み補正を行うデジタル信号処理部の詳細を示す説明図である。It is explanatory drawing which shows the detail of the digital signal processing part which performs distortion correction in the 3rd Embodiment of this invention. 本発明の第3の実施形態における歪み補正処理のフローチャートである。It is a flowchart of the distortion correction process in the 3rd Embodiment of this invention. 通常画素歪み補正処理における被写体の変化を示す説明図である。It is explanatory drawing which shows the change of the to-be-photographed object in a normal pixel distortion correction process. 本発明の第3の実施形態におけるAF枠の取り方を示す図である。It is a figure which shows how to take the AF frame in the 3rd Embodiment of this invention. 本発明の第3の実施形態における図8のA1付近でのAF枠の取り方を示す図である。It is a figure which shows the method of taking the AF frame in A1 vicinity of FIG. 8 in the 3rd Embodiment of this invention. 本発明の第3の実施形態における図8のA1付近でのAF枠の取り方を示す図である。It is a figure which shows the method of taking the AF frame in A1 vicinity of FIG. 8 in the 3rd Embodiment of this invention. 合焦状態を示す説明図である。It is explanatory drawing which shows a focusing state. 前ピン状態を示す説明図である。It is explanatory drawing which shows a front pin state. 後ピン状態を示す説明図である。It is explanatory drawing which shows a back pin state. 位相差AF光学系の概略的構成を示す図である。It is a figure which shows schematic structure of a phase difference AF optical system. 相関計算(MINアルゴリズム)の説明図である。It is explanatory drawing of a correlation calculation (MIN algorithm). 測距画素を含む固体撮像素子の例を示す図である。It is a figure which shows the example of the solid-state image sensor containing a ranging pixel. 光学歪みの例を示す図である。It is a figure which shows the example of an optical distortion. 光学歪み特性の例を示す図である。It is a figure which shows the example of an optical distortion characteristic. 歪み率の説明図である。It is explanatory drawing of a distortion rate.

以下、本発明の好適な実施形態について、図面を参照して詳細に説明する。   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, reference numeral 100 denotes an optical system for forming a subject image, which includes an imaging lens, a shutter, a diaphragm, and the like. In the present embodiment, a zoom lens having a variable focal length is used as the imaging lens. Reference numeral 101 denotes an image sensor (imaging device). For example, it is constituted by a CCD (Charge Coupled Device), a CMOS sensor, or the like. In the present embodiment, the imaging element captures a subject and generates normal image data (first pixel group) (first pixel group) for generating image data (first signal) by JPEG compression or the like, and for focus detection. And an AF pixel (second pixel group for phase difference detection) that generates the above signal (second signal). In such an image sensor, it is assumed that AF pixels are arranged at intervals of 10 pixels with normal pixels in between as shown in FIG. The AF pixel divides the pupil region of the imaging lens, and photoelectrically converts the subject image from the divided pupil region to generate a signal for phase difference detection.

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に、歪み補正に用いられる歪み率が格納されている。   Reference numeral 102 denotes a motor drive circuit, which generates a drive signal for driving the motor 114 by a control signal from the CPU 109. Reference numeral 114 denotes a motor that drives the optical system 100 by a drive signal from the motor drive circuit 102. Reference numeral 103 denotes an image sensor driving unit. When the image sensor 101 is constituted by a CCD, it generates horizontal and vertical transfer drive signals for reading out the photoelectrically converted electric signal. Reference numeral 104 denotes an analog processing unit. Correlated double sampling for removing reset noise contained in the input image pickup signal, variable gain amplification for amplifying the image pickup signal level with variable gain, and the like are performed. Reference numeral 105 denotes an A / D conversion unit that quantizes the analog signal output from the analog processing unit 104 into digital data. Reference numeral 107 denotes a DRAM which is a storage device for temporarily storing the image data output from the A / D conversion unit 105. The DRAM 107 also functions as a storage device for temporarily storing image data that has been signal-processed by a digital signal processing unit 108 described later. Reference numeral 108 denotes a digital signal processing unit that performs image processing on the digital image data output from the A / D conversion unit 105. In general, the image data is subjected to white balance adjustment, gain adjustment, filtering processing, interpolation processing, and the like, resized to an appropriate image size, compressed, and recorded on the media 112. Alternatively, a process for displaying on the LCD or the like of the display unit 111 is performed. A timing generator 106 generates and transmits timing signals to the image sensor driving unit 103, the analog processing unit 104, the A / D conversion unit 105, and the digital signal processing unit 108. Reference numeral 109 denotes a CPU that controls the entire system. Reference numeral 110 denotes an operation unit such as a switch operated by the user from the outside. A ROM 113 stores CPU instructions and the like. In the present embodiment, a distortion rate used for distortion correction is stored in the 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 signal processing unit 108 in FIG. 1, and is a diagram for explaining the operation of the distortion correction processing. FIG. 3 illustrates a processing flow in the present embodiment in which AF pixels are subjected to distortion correction, focus detection processing (focus position detection processing) is performed, and distortion is corrected for captured normal pixels after focusing. FIG. The function of the distortion correction block will be described with reference to FIG.

図2において、200は、AF画素について歪み補正を行う際に用いるアドレスを生成するAF画素歪み補正アドレス生成部(第2の歪み補正手段)である。201は、通常画素について歪み補正を行う際に用いるアドレスを生成する通常画素歪み補正アドレス生成部(第1の歪み補正手段)である。209は、AF画素の補間を行う際に用いるアドレスを生成するAF画素補間アドレス生成部である。なお、AF画素の補間とは、AF画素は通常の画像の撮影においては欠陥画素として扱われるため、それを周囲の通常画素の信号を用いて補間する動作を意味する。   In FIG. 2, reference numeral 200 denotes an AF pixel distortion correction address generation unit (second distortion correction unit) that generates an address used when distortion correction is performed on the AF pixel. Reference numeral 201 denotes a normal pixel distortion correction address generation unit (first distortion correction unit) that generates an address used when distortion correction is performed on a normal pixel. Reference numeral 209 denotes an AF pixel interpolation address generation unit that generates an address used when AF pixel interpolation is performed. Note that the interpolation of the AF pixel means an operation of interpolating the AF pixel using a signal of a surrounding normal pixel because the AF pixel is treated as a defective pixel in normal image shooting.

202はCPU109からの命令を受け、DRAM107に送信するアドレスを選択するセレクタである。203は、AF画素データを蓄積し、AF画素データを複数領域に分割した後、それぞれの領域に応じたデフォーカス量の算出を行うデフォーカス量算出部である。204は、AF画素補間アドレス生成部209により指定された通常画素データよりAF画素の補間値を計算するAF画素補間値生成部である。205は、AF画素補間処理後にDRAM107に書き込まれているデータを信号処理するための信号処理部である。AF画素補間処理後にDRAMに記録されているデータは、CCDで一般に用いられている点順次のベイヤー配列の画素データ(以下、RGBデータ)であり、信号処理部205では、このRGBデータをYUVデータに変換して再度DRAMに書き戻す。   A selector 202 receives an instruction from the CPU 109 and selects an address to be transmitted to the DRAM 107. Reference numeral 203 denotes a defocus amount calculation unit that accumulates AF pixel data, divides the AF pixel data into a plurality of regions, and calculates a defocus amount corresponding to each region. Reference numeral 204 denotes an AF pixel interpolation value generation unit that calculates an interpolation value of the AF pixel from the normal pixel data designated by the AF pixel interpolation address generation unit 209. A signal processing unit 205 performs signal processing on data written in the DRAM 107 after AF pixel interpolation processing. The data recorded in the DRAM after the AF pixel interpolation process is pixel data (hereinafter referred to as RGB data) in a dot sequential Bayer array that is generally used in a CCD. The signal processing unit 205 converts the RGB data into YUV data. And write back to DRAM again.

206は、通常画素歪み補正アドレス生成部201で算出したアドレスをもとに読み出された通常画素に対して歪み補正値の算出を行う通常画素歪み補正値生成部である。207は処理フローに基づき、DRAMと各処理部間でやり取りするデータ及びアドレスを選択するメモリコントローラである。歪み補正、AF画素補間処理以外のDRAMのアドレスを作り出すこともできる。208は歪み補正された通常画素データをメディア112に書き込むためのメディアコントロール部である。   Reference numeral 206 denotes a normal pixel distortion correction value generation unit that calculates a distortion correction value for a normal pixel read based on the address calculated by the normal pixel distortion correction address generation unit 201. Reference numeral 207 denotes a memory controller that selects data and addresses exchanged between the DRAM and each processing unit based on the processing flow. DRAM addresses other than distortion correction and AF pixel interpolation processing can also be created. Reference numeral 208 denotes a media control unit for writing normal pixel data whose distortion has been corrected to the media 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 the pixel at the coordinate position (x2, y2) is obtained by distortion correction, the pixel (x1, y1) before distortion correction calculated backward from Equation (2) is read, and the pixel at (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 DRAM 107. In FIG. 6, if the AF pixels are arranged as B, C, D, and E, and the coordinates before correction of the AF pixels are A, A is replaced with the nearest D value. Therefore, the corrected value is A '= D
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 ROM 113 in advance. However, since the distortion rate varies depending on the zoom magnification, a plurality of distortion rates are recorded in the ROM 113 according to the zoom magnification.

図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 CPU 109 instructs the selector 202 to select the address of the AF pixel distortion correction address generation unit 200 and designates the coordinate position for obtaining the AF pixel value. In step S301, the AF pixel distortion correction address generation unit 200 reads the AF pixel distortion rate D corresponding to the designated coordinate position and zoom magnification from the ROM 113, and calculates the coordinate position of the AF pixel before distortion correction using the formula (2). ) To calculate backward. In step S302, as shown in FIG. 6, the nearest AF pixel of the coordinate position inversely calculated by equation (2) is read from the DRAM 107 and replaced with the AF pixel after distortion correction. The AF pixels after distortion correction are accumulated in the defocus amount calculation unit 203. In step S303, it is determined whether the AF pixel whose distortion is to be corrected is the final pixel. If the AF pixel is not the final pixel, the coordinate position is incremented and the process proceeds to step S301. If it is determined that the pixel is the last pixel, the process proceeds to step S304. In step S304, the defocus amount calculation unit 203 divides the image into a plurality of regions, for example, as shown in FIG. 8 for the accumulated AF pixel data after distortion correction. Then, the defocus amount is calculated for each region by the MIN algorithm described above. Based on the defocus amount, the CPU 109 drives the lens so as to focus on the region to be focused. After the lens is driven and brought into the in-focus state, the image is picked up again in step S305, the image is acquired in the DRAM, and the process proceeds to the interpolation process flow of the AF pixel A.

次に、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 CPU 109 sets the selector 202 to select the address of the AF pixel interpolation address generation unit 209, and designates the coordinate position of the image data acquired by re-imaging. In step S310, it is determined whether the pixel corresponding to the coordinate position is an AF pixel or a normal pixel. If it is determined that the pixel is an AF pixel, the process proceeds to step S311. If it is not an AF pixel, the same process is performed again in step S310. In step S311, the AF pixel interpolation address generation unit 209 calculates the addresses of normal pixels around the AF pixel used for AF pixel interpolation. In step S312, the normal pixel calculated in step S311 is read from the DRAM. In step S313, the AF pixel interpolation value generation unit 204 creates an interpolation value from normal pixels around the AF pixel. FIG. 9 shows the positions of normal pixels used for creating an interpolation value. The interpolation method differs depending on which RGB position the AF pixel S to be interpolated corresponds to. The left side (G pixel interpolation method), the middle (R pixel interpolation method), and the right side (B pixel interpolation method) in FIG. ) Is a method of selecting four normal pixels. When four normal pixels are selected, an average value is taken. In step S314, the AF pixel interpolation address generation unit 209 calculates the address of the AF pixel corresponding portion and writes the calculated average value there. In step S315, it is determined whether the AF pixel to be interpolated is the final pixel. If the AF pixel is not the final pixel, the coordinate position is incremented and the process proceeds to step S310. In the case of the final pixel, the process proceeds to the distortion correction flow for the B normal pixel.

最後に、通常画素の歪み補正フローについて説明する。   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 signal processing unit 205 performs signal processing on the RGB data that has undergone the AF pixel interpolation processing to produce YUV data. In step S321, YUV data is written into the DRAM 107. A series of addresses used in these processes is generated from the memory controller 207. In step S322, it is determined whether the current coordinate position is the last pixel. If the current pixel position is not the last pixel, the coordinate position is incremented and the process proceeds to step S320. The CPU 109 sets the selector 202 to select the address of the normal pixel distortion correction address generation unit 201. In step S323, the normal pixel distortion correction address generation unit 201 reads the distortion rate D of the normal pixel from the ROM 113 based on the coordinate position of the image after distortion correction, and reverses the coordinate position before distortion correction using Equation (2). calculate. Since the calculated coordinate position is not an integer value in most cases, as described with reference to FIG. 7, the addresses of four nearby coordinate points are calculated. In step S324, YUV data is read from the DRAM 107 from this address. In step S325, the normal pixel distortion correction value generation unit 206 generates YUV data after distortion correction from YUV data after distortion correction at four neighboring points by interpolation calculation. In step S326, the YUV interpolation data generated in step S324 is written into the DRAM. In step S327, it is determined whether the current coordinate position is the last pixel. If the current pixel position is not the last pixel, the coordinate position is incremented and the process proceeds to step S323. If it is the last pixel, the process proceeds to step S328. In step S328, the distortion-corrected YUV data is written to the medium 112 through the media control unit 208. At this time, display on the display unit 111 may be performed. Alternatively, compression processing (not shown) may be performed, the image data may be subjected to compression processing, converted into a file, and written to the medium 112. After writing the medium, the process ends in step S329.

(第2の実施形態)
図10は、本発明の第2の実施形態におけるデジタル信号処理部108について詳細に説明した図である。図10の内容は、図2とほぼ同じであるため、異なる部分についてのみ説明する。
(Second Embodiment)
FIG. 10 is a diagram illustrating in detail the digital signal processing unit 108 according to the second embodiment of the present invention. Since the content of FIG. 10 is substantially the same as FIG. 2, only different parts will be described.

第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データに対して歪み補正処理を行うための、通常画素歪み補正値生成部である。   Reference numeral 1006 denotes a normal pixel distortion correction value generation unit for reading the RGB image data written back to the DRAM 107 after the AF pixel interpolation process and performing the distortion correction process on the read RGB data.

通常画素歪み補正アドレス生成部1001により、通常画素歪み補正に用いる画素のアドレスを生成する。本実施形態においても、第1の実施形態の図7と同じように、近傍の4画素から補間処理により画素データを求める。しかし、本実施形態では、補間する通常画素がRGBのいずれに該当するかによって画素データの取り方が異なる。すなわち、R画素を補間するときは図12の左側、G画素を補間するときは同図の真中、B画素を補間するときは同図の右側の黒点に示すように同色の近傍4画素をとる。そして、それらの4点を用いて、式(3)から補間値を算出する。   A normal pixel distortion correction address generation unit 1001 generates an address of a pixel used for normal pixel distortion correction. Also in the present embodiment, pixel data is obtained by interpolation processing from four neighboring pixels, as in FIG. 7 of the first embodiment. However, in the present embodiment, the way of taking pixel data differs depending on which of RGB is the normal pixel to be interpolated. That is, when the R pixel is interpolated, the left side of FIG. 12 is taken, when the G pixel is interpolated, the middle of the figure, and when the B pixel is interpolated, the neighboring four pixels of the same color are taken as shown by the black dot on the right side of FIG. . Then, using these four points, an interpolation value is calculated from Equation (3).

1005は、通常画素歪み補正後のデータを信号処理するための信号処理部である。RGBデータをYUVデータに変換し、DRAMに書き込む。その他の構成については第1の実施形態と同様である。   Reference numeral 1005 denotes a signal processing unit for performing signal processing on data after normal pixel distortion correction. RGB data is converted to YUV data and written to DRAM. Other configurations are the same as those in the first embodiment.

次に、図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 signal processing unit 108 in the third embodiment. Since the content of FIG. 13 is substantially the same as FIG. 2 of the first embodiment, only different parts will be described.

図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, reference numeral 1300 in FIG. 13 is an AF pixel address generation unit that only generates an AF pixel address. By not generating the AF pixel distortion correction address, the calculation amount can be reduced and the processing time can be shortened. Other configurations are the same as those in FIG. 2 of the first embodiment, but differ from the first embodiment in that the focus evaluation area in the defocus amount calculation unit 1303 changes due to lens distortion. For example, if the image after distortion correction is divided into regions as shown in FIG. 8, it is determined which AF pixel evaluation value is used for each area according to the distortion, and this mapping information is stored in the ROM 113. Keep it. The defocus amount calculation unit reads this mapping information from the ROM according to the distortion, evaluates the AF pixels in each area of FIG. 8, and calculates the defocus amount from these AF pixels.

以下、図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 AF pixels 00, 01, 10, and 11 within the dotted line are used for the focus evaluation of A1. When there is distortion, the upper left area surrounded by the solid line corresponds to the area A1 in FIG. Therefore, when there is distortion, the two AF pixels 11 and 20 in the solid line frame are used for the focus evaluation of A1. If more AF pixels are to be used for focus detection, AF pixels within a certain range outside the solid line frame may be taken. For example, like the one-dot chain line in FIG. 18, the outside of the AF frame when there is distortion may be enlarged, and two points of AF pixels 10 and 21 within the enlarged frame may be added and used for focus detection. AF pixel mapping information used for AF evaluation according to such optical distortion is stored in the ROM, and the value of this ROM is read out during the focus evaluation of the A1 area, and the AF pixel corresponding to the A1 area Are used for AF evaluation.

このようにして、全ての領域に対応したマッピング情報を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 AF processing in step S1404, the defocus amount calculation unit 1303 performs distortion correction AF in step S1403. The only difference is that an evaluation frame is calculated.

Claims (3)

撮像レンズにより結像される被写体像を光電変換して画像生成用の第1の信号を生成する第1の画素群と、前記撮像レンズの瞳領域を分割して、分割された瞳領域からの被写体像を光電変換して位相差検出用の第2の信号を生成する第2の画素群とを有する撮像素子と、
前記第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:
前記第1の歪み補正手段は、前記画像の歪みがない場合の前記第1の画素群の座標位置から、前記画像に歪みがある場合の前記第1の画素群の座標位置を算出し、該算出された座標位置の近傍の画素値から補間によって求められた画素値を、前記画像の歪みがない場合の前記第1の画素群の座標位置の画素値とすることを特徴とする請求項1に記載の撮像装置。   The first distortion correction means calculates a coordinate position of the first pixel group when the image is distorted from a coordinate position of the first pixel group when the image is not distorted; 2. The pixel value obtained by interpolation from pixel values in the vicinity of the calculated coordinate position is set as a pixel value at the coordinate position of the first pixel group when there is no distortion of the image. The imaging device described in 1. 前記第2の歪み補正手段は、前記画像の歪みがない場合の前記第2の画素群の座標位置から、前記画像に歪みがある場合の前記第2の画素群の座標位置を算出し、該算出された座標位置の近傍の画素値を、前記画像の歪みがない場合の前記第2の画素群の座標位置の画素値とすることを特徴とする請求項1に記載の撮像装置。   The second distortion correction means calculates a coordinate position of the second pixel group when the image is distorted from a coordinate position of the second pixel group when the image is not distorted, The imaging apparatus according to claim 1, wherein a pixel value in the vicinity of the calculated coordinate position is set as a pixel value at the coordinate position of the second pixel group when there is no distortion of the image.
JP2009038484A 2009-02-20 2009-02-20 Imaging device Expired - Fee Related JP5173883B2 (en)

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 true JP2010191390A (en) 2010-09-02
JP5173883B2 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012173334A (en) * 2011-02-17 2012-09-10 Nikon Corp Defocus quantity detection device and electronic camera
WO2013128693A1 (en) * 2012-02-29 2013-09-06 日立コンシューマエレクトロニクス株式会社 Imaging device
CN103364733A (en) * 2012-03-28 2013-10-23 拉碧斯半导体株式会社 Semiconductor device and battery monitoring system
WO2014106935A1 (en) * 2013-01-04 2014-07-10 富士フイルム株式会社 Image processing device, imaging device, program, and image processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05150155A (en) * 1991-11-29 1993-06-18 Canon Inc Automatic focus detection device and semiconductor photoelectric area sensor device
JP2000305010A (en) * 1999-04-20 2000-11-02 Olympus Optical Co Ltd Image pickup unit
JP2004128565A (en) * 2002-09-30 2004-04-22 Fuji Photo Film Co Ltd Digital camera
JP2007282109A (en) * 2006-04-11 2007-10-25 Nikon Corp Imaging apparatus, camera and image processing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05150155A (en) * 1991-11-29 1993-06-18 Canon Inc Automatic focus detection device and semiconductor photoelectric area sensor device
JP2000305010A (en) * 1999-04-20 2000-11-02 Olympus Optical Co Ltd Image pickup unit
JP2004128565A (en) * 2002-09-30 2004-04-22 Fuji Photo Film Co Ltd Digital camera
JP2007282109A (en) * 2006-04-11 2007-10-25 Nikon Corp Imaging apparatus, camera and image processing method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012173334A (en) * 2011-02-17 2012-09-10 Nikon Corp Defocus quantity detection device and electronic camera
WO2013128693A1 (en) * 2012-02-29 2013-09-06 日立コンシューマエレクトロニクス株式会社 Imaging device
JP2013179513A (en) * 2012-02-29 2013-09-09 Hitachi Consumer Electronics Co Ltd Imaging apparatus
US9154757B2 (en) 2012-02-29 2015-10-06 Hitachi Maxell, Ltd. Imaging device
CN103364733A (en) * 2012-03-28 2013-10-23 拉碧斯半导体株式会社 Semiconductor device and battery monitoring system
CN103364733B (en) * 2012-03-28 2017-12-22 拉碧斯半导体株式会社 Semiconductor device and battery monitoring system
WO2014106935A1 (en) * 2013-01-04 2014-07-10 富士フイルム株式会社 Image processing device, imaging device, program, and image processing method
CN104919789A (en) * 2013-01-04 2015-09-16 富士胶片株式会社 Image processing device, imaging device, program, and image processing method
JP5901801B2 (en) * 2013-01-04 2016-04-13 富士フイルム株式会社 Image processing apparatus, imaging apparatus, program, and image processing method
US9560243B2 (en) 2013-01-04 2017-01-31 Fujifilm Corporation Image processing device, imaging device, program, and image processing method suppressing a reduction in visibility of an image to check focus when distortion is corrected
CN104919789B (en) * 2013-01-04 2018-10-02 富士胶片株式会社 Image processing apparatus, photographic device and image processing method

Also Published As

Publication number Publication date
JP5173883B2 (en) 2013-04-03

Similar Documents

Publication Publication Date Title
JP5225151B2 (en) Imaging apparatus and image processing method
JP2008017157A (en) Imaging device, and its manufacturing device and method
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
KR20070004202A (en) Method for correcting lens distortion in digital camera
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
JP5769773B2 (en) Camera system and focus detection pixel correction method
JP2012037574A (en) Electronic imaging apparatus
JP2013219675A (en) Imaging device and control method for imaging device
JP5173883B2 (en) 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
JP2011217363A (en) Imaging apparatus
JP5409588B2 (en) Focus adjustment method, focus adjustment program, and imaging apparatus
JP2002372662A (en) Interchangeable lens and camera system having it
JP2009239460A (en) Focus control method, distance measuring equipment, imaging device
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
JP6759088B2 (en) Imaging device and its control method and program
JP2010258871A (en) Imaging system and imaging method

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