JP2011124806A - Image pickup device, control method thereof, and program - Google Patents

Image pickup device, control method thereof, and program Download PDF

Info

Publication number
JP2011124806A
JP2011124806A JP2009280956A JP2009280956A JP2011124806A JP 2011124806 A JP2011124806 A JP 2011124806A JP 2009280956 A JP2009280956 A JP 2009280956A JP 2009280956 A JP2009280956 A JP 2009280956A JP 2011124806 A JP2011124806 A JP 2011124806A
Authority
JP
Japan
Prior art keywords
image
focus
imaging
image data
focus detection
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
JP2009280956A
Other languages
Japanese (ja)
Other versions
JP5576644B2 (en
Inventor
Kazuo Nakagawa
和男 中川
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 JP2009280956A priority Critical patent/JP5576644B2/en
Publication of JP2011124806A publication Critical patent/JP2011124806A/en
Application granted granted Critical
Publication of JP5576644B2 publication Critical patent/JP5576644B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent a reproduction and printing of a non-focused image, when an image is reproduced and printed. <P>SOLUTION: An image pickup device includes: an imaging element having a plurality of imaging pixels receiving light passing through all areas of an exit pupil of a photographing lens and a plurality of focusing detection pixels receiving a light passing through a part of the exit pupil of the photographing lens; a storing portion storing image data generated based on a signal outputted from the imaging pixels and focusing detection information generated based on a signal outputted from the focusing detection pixels; and determining portion determining a focusing state of the image data corresponding to the focusing detection information stored in the storing portion based on the focusing detection information stored in the storing portion. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は撮像面に配置された焦点検出用画素により、位相差検出方式のオートフォーカスが可能な撮像装置に関する。   The present invention relates to an imaging apparatus capable of phase difference detection type auto-focusing using focus detection pixels arranged on an imaging surface.

デジタルカメラの機能の一つに、記録メディアに記録された画像ファイルをデジタルカメラの液晶モニタや、デジタルカメラと接続したテレビやパソコンのモニタに自動再生するスライドショー機能がある。しかしながら、記録された画像ファイルの中にはピントが合っていない画像が混ざっている場合がある。そのピントが合っていない失敗画像はユーザーにとってはスライドショーでの自動再生が不要である。そのため再生時に、画像ファイルに記録されている撮影直前の測距データを用いて、被写体にピントが合っている(合焦している)か否かの解析を行っている。そしてピントが合っていない(非合焦)と判断された画像ファイルはスキップして、合焦している画像ファイルのみ再生するようにしたデジタルカメラが提案されている(特許文献1参照)。   One of the functions of a digital camera is a slide show function that automatically reproduces an image file recorded on a recording medium on a liquid crystal monitor of the digital camera or a monitor of a television or personal computer connected to the digital camera. However, there are cases where images that are not in focus are mixed in the recorded image file. The failed image that is not in focus does not need to be automatically reproduced in a slide show for the user. Therefore, at the time of reproduction, the distance measurement data immediately before shooting recorded in the image file is used to analyze whether or not the subject is in focus (in-focus). A digital camera has been proposed in which an image file determined to be out of focus (out of focus) is skipped and only the focused image file is reproduced (see Patent Document 1).

また記録メディアに記録された画像ファイルをデジタルカメラと接続したプリンターに自動印刷する機能もある。この場合もスライドショーと同様に、失敗画像の印刷はユーザーにとっては無駄であるため、画像ファイルの合焦箇所を自動判定して無駄な印刷を防止するデジタルカメラが提案されている(特許文献2参照)。   There is also a function for automatically printing image files recorded on a recording medium on a printer connected to a digital camera. In this case as well as the slide show, the printing of the failed image is useless for the user, so a digital camera that automatically determines the in-focus position of the image file and prevents useless printing has been proposed (see Patent Document 2). ).

特開2003−78859号公報JP 2003-78859 A 特開2004−186872号公報Japanese Patent Laid-Open No. 2004-186872

しかしながら、特許文献1においては、測距データは撮影直前のデータである。そのため、被写体が動体の場合は測距から撮影されるまでのタイムラグにより、測距データでは合焦していても実際の画像ファイルに写っている被写体はピントが合っていない場合がある。   However, in Patent Document 1, the distance measurement data is data immediately before photographing. For this reason, when the subject is a moving object, the subject in the actual image file may not be in focus due to the time lag from the distance measurement until the image is taken, even if the distance measurement data is in focus.

また、特許文献2においては、画像ファイルの周波数スペクトルを解析し、画像内で閾値以上の周波数成分を最も多く持つ箇所を合焦箇所と判定しているため、画面を大まかに分割してその領域毎の合焦状態しか分からない。被写体部分のみ等の詳細領域毎に合焦状態を判定しようとすると、解析負荷が多くなり判定する時間が掛かり過ぎるため、自動印刷のタイミングに合わせて処理することができないといった問題がある。   In Patent Document 2, the frequency spectrum of the image file is analyzed, and the portion having the highest frequency component equal to or higher than the threshold in the image is determined as the in-focus portion. Only the state of each focus is known. If it is attempted to determine the in-focus state for each detailed area such as only the subject portion, the analysis load increases and it takes too much time to determine, so there is a problem that processing cannot be performed in accordance with the timing of automatic printing.

本発明は上述した課題に鑑みてなされたものであり、その目的は、画像を再生する場合や印刷する場合に、非合焦の画像の再生や印刷を防止できるようにすることである。   The present invention has been made in view of the above-described problems, and an object thereof is to prevent reproduction and printing of an out-of-focus image when reproducing or printing an image.

上述した課題を解決し、目的を達成するために、本発明に係わる撮像装置は、撮影レンズの射出瞳の全域を通る光を受光する複数の撮像用画素と、前記撮影レンズの射出瞳の一部の領域を通る光を受光する複数の焦点検出用画素とを有する撮像素子と、前記撮像用画素から出力された信号に基づいて生成された画像データと、前記焦点検出用画素から出力された信号に基づいて生成された焦点検出情報とを記憶する記憶手段と、前記記憶手段に記憶されている前記焦点検出情報に基づいて、前記記憶手段に記憶されている、前記焦点検出情報に対応する前記画像データの合焦状態を判定する判定手段と、を備えることを特徴とする。   In order to solve the above-described problems and achieve the object, an imaging apparatus according to the present invention includes a plurality of imaging pixels that receive light passing through the entire exit pupil of the photographing lens, and one of the exit pupils of the photographing lens. An image pickup device having a plurality of focus detection pixels that receive light passing through the region of the image, image data generated based on a signal output from the image pickup pixel, and output from the focus detection pixel Corresponding to the focus detection information stored in the storage means based on the focus detection information stored in the storage means and storage means for storing focus detection information generated based on the signal Determining means for determining an in-focus state of the image data.

本発明によれば、画像を再生する場合や印刷する場合に、非合焦の画像の再生や印刷を防止することが可能となる。   According to the present invention, it is possible to prevent reproduction and printing of an out-of-focus image when reproducing or printing an image.

本発明の第1の実施形態のデジタル一眼レフカメラの断面図。1 is a cross-sectional view of a digital single-lens reflex camera according to a first embodiment of the present invention. 第1の実施形態のデジタルカメラの制御系のブロック図。1 is a block diagram of a control system of a digital camera according to a first embodiment. ライブビュー時の撮像面位相差AF動作の説明図。Explanatory drawing of the imaging surface phase difference AF operation | movement at the time of live view. Exif圧縮形式の画像ファイルフォーマット構造を示す図。The figure which shows the image file format structure of an Exif compression format. RAWデータ形式の画像ファイルフォーマット構造を示す図。The figure which shows the image file format structure of a RAW data format. 第1の実施形態のデジタルカメラの基本動作を示すフローチャート。3 is a flowchart showing basic operations of the digital camera according to the first embodiment. 図6に示す通常撮影ルーチンの詳細を説明するフローチャート。7 is a flowchart for explaining details of a normal photographing routine shown in FIG. 図6に示すライブビュー表示ルーチンの詳細を説明するフローチャート。The flowchart explaining the detail of the live view display routine shown in FIG. 図6に示すライブビュー撮影ルーチンの詳細を説明するフローチャート。The flowchart explaining the detail of the live view imaging | photography routine shown in FIG. 第1の実施形態のデジタルカメラの画像再生動作を示すフローチャート。5 is a flowchart illustrating an image reproduction operation of the digital camera according to the first embodiment. デジタルカメラの液晶モニタでの合焦画像再生表示、及び非合焦画像再生表示を示す図。The figure which shows the focus image reproduction | regeneration display and non-focus image reproduction | regeneration display on the liquid crystal monitor of a digital camera. デジタルカメラにおけるスライドショー時のフローチャート。The flowchart at the time of the slide show in a digital camera. 画像処理装置における画像処理ソフトの基本動作を示すメインフローチャート。The main flowchart which shows the basic operation | movement of the image processing software in an image processing apparatus. 画像処理装置のディスプレイに画像処理ソフトが表示された状態を示す図。The figure which shows the state by which image processing software was displayed on the display of an image processing apparatus.

(第1の実施形態)
以下、本発明の第1の実施形態を図面を参照しながら説明する。図1は、本実施形態のデジタル一眼レフカメラ(撮像装置)の断面図である。図1において、1はカメラ本体、2は後述の撮影レンズ3をカメラ本体1に着脱可能とするためのマウントであり、各種信号を通信したり、駆動電源を供給したりするためのインターフェース部を有する。3は交換可能な撮影レンズであり、内部にフォーカスレンズ群やズームレンズ群、不図示の絞り装置を有している。図1では、各レンズ群を便宜上1枚のレンズで図示しており、例えば、フォーカスレンズ群をフォーカスレンズ3aとして示している。しかし、実際には多数のレンズにより複雑なレンズ群の組み合わせで構成されている。なお、図1では、フォーカスレンズ3aを撮影レンズ3の前側に配置しているが、本発明は、フォーカスレンズ3aを撮影レンズ3の前側に配置する構成に限定されるものではない。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a cross-sectional view of a digital single-lens reflex camera (imaging device) according to the present embodiment. In FIG. 1, reference numeral 1 denotes a camera body, and 2 denotes a mount for making a photographic lens 3 (described later) detachable from the camera body 1, and includes an interface unit for communicating various signals and supplying drive power. Have. Reference numeral 3 denotes an interchangeable photographic lens, which includes a focus lens group, a zoom lens group, and a diaphragm device (not shown). In FIG. 1, each lens group is illustrated as a single lens for convenience, and for example, the focus lens group is illustrated as a focus lens 3a. However, in actuality, it is composed of a complex combination of lens groups with a large number of lenses. In FIG. 1, the focus lens 3 a is disposed on the front side of the photographing lens 3, but the present invention is not limited to the configuration in which the focus lens 3 a is disposed on the front side of the photographing lens 3.

4はハーフミラーで構成された主ミラーであり、カメラの動作状態に応じて回動可能となっている。主ミラー4は、被写体をファインダーで観察する時は、図1(a)に示されるように撮影光路へ斜設され、撮影レンズ3からの光束を折り曲げて後述のファインダー光学系へ導く。主ミラー4は、撮影時やライブビュー時は、図1(b)に示されるように撮影光路から退避して、撮影レンズ3からの光束を後述の撮像素子6へ導く。5は撮影レンズ3からの光束を後述の撮像素子6に入射制御するためのシャッターで、通常は図1(a)に示されるように閉じた状態で、撮影時やライブビュー時に図1(b)に示されるように開いた状態となる。   Reference numeral 4 denotes a main mirror composed of a half mirror, which can be rotated according to the operating state of the camera. When the subject is observed with the finder, the main mirror 4 is obliquely arranged on the photographing optical path as shown in FIG. 1A, and bends the light beam from the photographing lens 3 and guides it to a finder optical system described later. The main mirror 4 is retracted from the photographing optical path as shown in FIG. 1B during photographing or live view, and guides the light flux from the photographing lens 3 to the image sensor 6 described later. Reference numeral 5 denotes a shutter for controlling the incidence of a light beam from the photographing lens 3 to an image sensor 6 described later. Normally, the shutter is closed as shown in FIG. ) As shown.

6はCMOSイメージセンサとその周辺回路で構成された撮像素子である。撮像素子6は、全画素独立出力が可能なように構成されている。また一部の画素が焦点検出用画素となっており、撮像面で位相差検出方式の焦点検出(撮像面位相差AF)が可能となっている。より具体的には、撮像素子6は、被写体の像を形成する撮影レンズ3の射出瞳の全域を通る光を各々が受光して被写体の像を生成する複数の撮像用画素を有する。更に撮像素子6は、各々が撮影レンズ3の射出瞳の一部の領域を通る光を受光する複数の焦点検出用画素も有する。複数の焦点検出用画素は全体として撮影レンズ3の射出瞳の全域を通る光を受光することができる。またこの撮像素子6は、受光画素上にベイヤー配列の原色カラーモザイクフィルタがオンチップで形成された、2次元単板カラーセンサである。   Reference numeral 6 denotes an image sensor composed of a CMOS image sensor and its peripheral circuits. The image sensor 6 is configured so that all pixels can be independently output. Also, some pixels are focus detection pixels, and focus detection (imaging surface phase difference AF) using a phase difference detection method is possible on the imaging surface. More specifically, the imaging device 6 includes a plurality of imaging pixels that each receive light passing through the entire exit pupil of the photographing lens 3 that forms an image of the subject and generate an image of the subject. Furthermore, the imaging device 6 also includes a plurality of focus detection pixels that each receive light passing through a partial region of the exit pupil of the photographing lens 3. The plurality of focus detection pixels as a whole can receive light passing through the entire exit pupil of the photographing lens 3. The imaging device 6 is a two-dimensional single-plate color sensor in which a Bayer array primary color mosaic filter is formed on a light receiving pixel on-chip.

7は主ミラー4とともに回動するサブミラーであり、図1(a)のように主ミラー4が撮影光路へ斜設されている時に、主ミラー4を透過した光束を後述のAFセンサ8に向かって折り曲げてAFセンサ8へ導く。サブミラー7は、撮影時やライブビュー時は図1(b)のように主ミラー4と共に回動して撮影光路から退避する。サブミラー7はハーフミラーではなく撮像素子6を遮光する。8はAFセンサであり、2次結像レンズや複数のCCD又はCMOSセンサからなるエリアセンサ等から構成されており、位相差AF(オートフォーカス)が可能となっている。   Reference numeral 7 denotes a sub-mirror that rotates together with the main mirror 4. When the main mirror 4 is obliquely arranged on the photographing optical path as shown in FIG. 1A, the light beam that has passed through the main mirror 4 is directed to an AF sensor 8 described later. And bent and guided to the AF sensor 8. The sub mirror 7 rotates together with the main mirror 4 and retracts from the photographing optical path as shown in FIG. 1B during photographing or live view. The sub mirror 7 is not a half mirror but shields the image sensor 6. Reference numeral 8 denotes an AF sensor, which includes a secondary imaging lens, an area sensor including a plurality of CCD or CMOS sensors, and the like, and can perform phase difference AF (autofocus).

9は撮影レンズ3の一次結像面に配置されたピント板であり、入射面にはフレネルレンズ(集光レンズ)が設けられ、射出面には被写体像(ファインダー像)が結像している。10はファインダー光路変更用のペンタプリズムであり、ピント板9の射出面に結像した被写体像を正立正像に補正する。11、12は接眼レンズである。ここで、ピント板9、ペンタプリズム10、接眼レンズ11、12により構成されている光学系をファインダー光学系と称する。   Reference numeral 9 denotes a focusing plate disposed on the primary image forming surface of the photographing lens 3, a Fresnel lens (condenser lens) is provided on the incident surface, and a subject image (finder image) is formed on the exit surface. . Reference numeral 10 denotes a finder optical path changing pentaprism that corrects a subject image formed on the exit surface of the focusing plate 9 into an erect image. Reference numerals 11 and 12 are eyepiece lenses. Here, an optical system including the focus plate 9, the pentaprism 10, and the eyepieces 11 and 12 is referred to as a finder optical system.

13は自動露光(AE)センサであり、多分割された撮像領域内の各領域に対応したフォトダイオードから構成されており、ピント板9の射出面に結像した被写体像の輝度を測定する。14は撮影した画像や各種の撮影情報を表示する液晶モニタ(表示部)である。液晶モニタ14は、ライブビューモード時に撮像素子6が撮像した被写体の像(被写体像)を逐次表示すると共に、後述するAF枠設定部としてのマルチコントローラ33が設定可能なAF枠とマルチコントローラ33が設定したAF枠を表示する。   Reference numeral 13 denotes an automatic exposure (AE) sensor, which is composed of photodiodes corresponding to respective areas in the multi-divided imaging area, and measures the luminance of the subject image formed on the exit surface of the focusing screen 9. A liquid crystal monitor (display unit) 14 displays captured images and various types of shooting information. The liquid crystal monitor 14 sequentially displays subject images (subject images) captured by the image sensor 6 in the live view mode, and includes an AF frame and a multi-controller 33 that can be set by a multi-controller 33 as an AF frame setting unit described later. The set AF frame is displayed.

図2は本実施形態のデジタル一眼レフカメラの制御系のブロック図である。20はカメラ部の制御とカメラ全体の制御を行うマイクロコンピュータ(中央処理装置;以下、「MPU」と称す)である。MPU(制御部)20は、後述する枠設定部であるマルチコントローラ33が設定したAF枠内の焦点検出用画素の出力信号を演算することによってAF枠に対して位相差AFを行って焦点検出枠内の焦点ずれ量を算出する。   FIG. 2 is a block diagram of a control system of the digital single-lens reflex camera of the present embodiment. Reference numeral 20 denotes a microcomputer (central processing unit; hereinafter referred to as “MPU”) that controls the camera unit and the entire camera. The MPU (control unit) 20 performs phase difference AF on the AF frame by calculating an output signal of the focus detection pixels in the AF frame set by the multi-controller 33 which is a frame setting unit described later, and performs focus detection. The amount of defocus within the frame is calculated.

21は画像データの各種制御を行うメモリコントローラ、22は各種制御を行うための設定、調整データ等を格納しているEEPROMである。23は撮影レンズ3内にあるレンズ制御回路であり、マウント2を介してMPU20と接続されており、後述の各情報に基づいて不図示のフォーカスレンズ群の焦点調節(合焦駆動)や不図示の絞り駆動を行う。   Reference numeral 21 denotes a memory controller that performs various controls of image data. Reference numeral 22 denotes an EEPROM that stores settings and adjustment data for performing various controls. A lens control circuit 23 in the photographic lens 3 is connected to the MPU 20 via the mount 2, and performs focus adjustment (focus driving) of a focus lens group (not shown) or not shown based on each information described later. The aperture drive is performed.

24は焦点検出回路であり、AFセンサ8の蓄積制御と読み出し制御とを行って、各焦点検出点の画素情報をMPU20に出力する。MPU20は各焦点検出点の画素情報を用いて周知の位相差AFを行い、検出した焦点検出情報をレンズ制御回路23へ送出して不図示のフォーカスレンズ群の焦点調節を行う。この焦点検出から焦点調節までの一連の動作をAF動作と称する。   A focus detection circuit 24 performs accumulation control and read control of the AF sensor 8 and outputs pixel information of each focus detection point to the MPU 20. The MPU 20 performs known phase difference AF using the pixel information of each focus detection point, sends the detected focus detection information to the lens control circuit 23, and adjusts the focus of a focus lens group (not shown). A series of operations from focus detection to focus adjustment is referred to as AF operation.

25は測光回路であり、AEセンサ13の各領域からの輝度信号をMPU20に出力する。MPU20は、輝度信号をA/D変換して被写体の測光情報とし、この測光情報を用いて撮影露出を演算し設定する。この測光情報を得てから撮影露出の設定までの一連の動作をAE動作と称する。26はモータ駆動回路であり、主ミラー4を駆動する不図示のモータやシャッター5のチャージを行う不図示のモータを制御する。27はシャッター駆動回路であり、シャッター5を開閉するための不図示のコイルへの電力供給制御を行う。28は電源29の電圧を各回路に必要な電圧に変換するDC/DCコンバータである。   A photometric circuit 25 outputs a luminance signal from each area of the AE sensor 13 to the MPU 20. The MPU 20 performs A / D conversion of the luminance signal to obtain photometric information of the subject, and uses this photometric information to calculate and set the photographic exposure. A series of operations from obtaining this photometric information to setting the photographic exposure is called an AE operation. A motor driving circuit 26 controls a motor (not shown) that drives the main mirror 4 and a motor (not shown) that charges the shutter 5. Reference numeral 27 denotes a shutter drive circuit that controls power supply to a coil (not shown) for opening and closing the shutter 5. A DC / DC converter 28 converts the voltage of the power source 29 into a voltage necessary for each circuit.

30はレリーズボタンであり、SW1とSW2の信号をMPU20へ出力する。SW1は、レリーズボタン30の第1ストローク(半押し)操作でONし、測光(AE)、AF動作を開始させるためのスイッチである。SW2は、レリーズボタン30の第2ストローク(全押し)操作でONし、露光動作を開始させるためのスイッチである。31はモードボタンであり、ボタン操作後、後述の電子ダイヤル32やマルチコントローラ33を操作すると、その入力に応じて各種モードが変更され、再度ボタンを操作すると決定される。例えば撮影画像の記録画質の種類等が変更可能である。32は電子ダイヤルであり、ダイヤルの回転クリックに応じたON信号がMPU20内の不図示のアップダウンカウンタに出力され、その数がカウントされる。このカウントに応じて各種の数値やデータ等の選択が行われる。   A release button 30 outputs SW1 and SW2 signals to the MPU 20. SW1 is a switch that is turned on by a first stroke (half-pressing) operation of the release button 30 to start photometry (AE) and AF operations. SW2 is a switch that is turned on by a second stroke (full press) operation of the release button 30 to start an exposure operation. Reference numeral 31 denotes a mode button. When an electronic dial 32 or a multi-controller 33 described later is operated after the button is operated, various modes are changed according to the input, and it is determined that the button is operated again. For example, the type of recording image quality of a photographed image can be changed. Reference numeral 32 denotes an electronic dial. An ON signal corresponding to a dial rotation click is output to an up / down counter (not shown) in the MPU 20 and the number thereof is counted. Various numerical values and data are selected according to this count.

33はマルチコントローラ(MC)であり、後述するライブビュー時に液晶モニタ14に表示されるAF枠(焦点検出枠)や各種モードを選択、決定するために用いられる入力装置である。マルチコントローラ33は、上下左右、斜め右上、斜め右下、斜め左上、斜め左下の8方向の入力と、押し操作による入力を行うことができる。マルチコントローラ33は、ライブビューモードを設定するモード設定部として機能する。また、マルチコントローラ33は、焦点検出の対象であるAF枠を撮像素子6の撮像領域の任意の位置に設定する枠設定部としても機能する。34は電源ボタンであり、操作するとカメラの電源がON/OFFされる。35は再生ボタンであり、操作すると後述のメディア48内に記録された画像を液晶モニタ14に表示する。   Reference numeral 33 denotes a multi-controller (MC), which is an input device used for selecting and determining an AF frame (focus detection frame) displayed on the liquid crystal monitor 14 and various modes during live view described later. The multi-controller 33 can perform input in eight directions, up and down, left and right, diagonally upper right, diagonally lower right, diagonally upper left, and diagonally lower left, and input by a push operation. The multi-controller 33 functions as a mode setting unit that sets a live view mode. The multi-controller 33 also functions as a frame setting unit that sets an AF frame that is a focus detection target at an arbitrary position in the imaging region of the imaging device 6. A power button 34 turns on / off the camera when operated. A reproduction button 35 displays an image recorded in a medium 48 described later on the liquid crystal monitor 14 when operated.

40は撮像素子6から出力される画像信号をサンプルホールド及び自動ゲイン調整するCDS(相関2重サンプリング)/AGC(自動ゲイン調整)回路である。41はCDS/AGC回路40のアナログ出力をデジタル信号に変換するA/D変換器である。42はTG(タイミング発生)回路であり、撮像素子6に駆動信号を、CDS/AGC回路40にサンプルホールド信号を、A/D変換器41にサンプルクロック信号を供給する。   Reference numeral 40 denotes a CDS (correlated double sampling) / AGC (automatic gain adjustment) circuit that samples and holds an image signal output from the image sensor 6 and performs automatic gain adjustment. Reference numeral 41 denotes an A / D converter that converts the analog output of the CDS / AGC circuit 40 into a digital signal. Reference numeral 42 denotes a TG (timing generation) circuit, which supplies a drive signal to the image sensor 6, a sample hold signal to the CDS / AGC circuit 40, and a sample clock signal to the A / D converter 41.

43はA/D変換器41でデジタル変換された画像等を一時的に記録するためのSDRAM(メモリ)である。SDRAM43は、撮像素子6の撮像領域の全域の焦点検出用画素の出力信号を記録することができる。あるいは、SDRAM43は、撮像素子6の撮像領域の全域に対して位相差AFを行って算出された焦点ずれ量を記録する。   Reference numeral 43 denotes an SDRAM (memory) for temporarily recording an image or the like digitally converted by the A / D converter 41. The SDRAM 43 can record the output signal of the focus detection pixels in the entire imaging area of the imaging device 6. Alternatively, the SDRAM 43 records the defocus amount calculated by performing the phase difference AF on the entire imaging region of the imaging device 6.

44は画像に対して、Y/C(輝度信号/色差信号)分離、ホワイトバランス補正、γ補正等を行う画像処理回路である。45は画像をJPEG等の形式に従って圧縮したり、圧縮された画像の伸張を行う画像圧縮/伸張回路である。ここでメモリコントローラ21は、撮像素子6から出力される画像信号を画像処理回路44で画像処理することにより、被写体の測光情報を得ることが可能である。46はSDRAM43や後述するメディア48に記録された画像を液晶モニタ14に表示するために、画像をアナログ信号に変換するD/A変換器である。47は画像を記録保存するためのメディア48とのI/F(インターフェース)である。49はUSB接続可能なプリンター50等の外部機器を接続するためのUSBインターフェースである。   An image processing circuit 44 performs Y / C (luminance signal / color difference signal) separation, white balance correction, γ correction, and the like on the image. An image compression / decompression circuit 45 compresses an image according to a format such as JPEG or decompresses the compressed image. Here, the memory controller 21 can obtain photometric information of the subject by performing image processing on the image signal output from the image sensor 6 by the image processing circuit 44. A D / A converter 46 converts an image into an analog signal in order to display an image recorded on the SDRAM 43 or a medium 48 described later on the liquid crystal monitor 14. Reference numeral 47 denotes an I / F (interface) with the medium 48 for recording and storing images. Reference numeral 49 denotes a USB interface for connecting an external device such as a printer 50 capable of USB connection.

続いて、撮像素子6による撮像面位相差AFについて大まかに説明する。詳細については、本願出願人が出願した特開2009−003122号公報等で説明しているため、本実施形態では割愛する。本実施形態においては、画素ピッチが8μm、有効画素数が縦3000行×横4500列=1350万画素、撮像画面サイズが横36mm×縦24mmの撮像素子を例に挙げて説明する。また撮像面位相差AFを撮像素子6の全領域で行うために、焦点検出用画素を有効画素内に離散的に配置してある。その配置規則単位として、100行×100列=1万画素で構成された画素領域をフィールドと称する。   Next, the imaging surface phase difference AF by the imaging device 6 will be roughly described. Details are described in Japanese Patent Application Laid-Open No. 2009-003122 and the like filed by the applicant of the present application, and are therefore omitted in this embodiment. In the present embodiment, an image pickup device having a pixel pitch of 8 μm, an effective pixel number of 3000 rows × 4500 columns = 13.5 million pixels, and an image pickup screen size of 36 mm × 24 mm will be described as an example. Further, in order to perform the imaging plane phase difference AF in the entire area of the imaging element 6, the focus detection pixels are discretely arranged in the effective pixels. As an arrangement rule unit, a pixel region composed of 100 rows × 100 columns = 10,000 pixels is referred to as a field.

図3はライブビュー時の撮像面位相差AF動作を説明する図で、ライブビュー時に液晶モニタ14に画像が表示されている状態を示している。撮像面に形成された被写体像には、中央に人物、左下に近景の柵、右上に遠景の山が写っており、それらが画面に表示されている。また画面中央にはAF枠が表示されている。本実施形態では一例として、AF枠は横方向に6フィールド、縦方向に6フィールドの大きさに設定されている。更にAF枠はマルチコントローラ33の入力信号に従って、撮像領域内の任意位置に移動可能となっている。撮像素子6上においては、一番左上のフィールドをFLD(q,r)=FLD(1,1)とする。本実施形態においては有効画素数が縦3000行×横4500列=1350万画素なので、前述のフィールドは垂直方向に30個、水平方向に45個配列され、撮像領域は1350個のフィールドで構成されている。   FIG. 3 is a diagram for explaining the imaging surface phase difference AF operation during live view, and shows a state in which an image is displayed on the liquid crystal monitor 14 during live view. In the subject image formed on the imaging surface, a person is shown in the center, a foreground fence in the lower left, and a distant mountain in the upper right, which are displayed on the screen. An AF frame is displayed at the center of the screen. In this embodiment, as an example, the AF frame is set to have a size of 6 fields in the horizontal direction and 6 fields in the vertical direction. Further, the AF frame can be moved to an arbitrary position in the imaging area in accordance with an input signal from the multi-controller 33. On the image sensor 6, the upper left field is assumed to be FLD (q, r) = FLD (1,1). In the present embodiment, since the effective pixel count is 3000 vertical rows × 4500 horizontal columns = 13.5 million pixels, 30 fields are arranged in the vertical direction and 45 pixels are arranged in the horizontal direction, and the imaging region is composed of 1350 fields. ing.

図3においては画面中央に人物の顔が存在している。そこで公知の顔認識技術によって顔の存在が検出されると、顔領域と検知された部分にAF枠が表示され、AF枠内の焦点検出が行なわれる。まず横ずれ方向の焦点検出のためにAF枠領域AFARH(1)〜(6)と、縦ずれ方向の焦点検出のためにAF枠領域AFARV(1)〜(6)が設定される。図3では、横ずれ方向の焦点検出及び縦ずれ方向の焦点検出のためのAF枠領域をAFARH(3)とAFARV(5)として1領域ずつ示しており、他のそれぞれ5領域は図示を割愛している。   In FIG. 3, a human face exists in the center of the screen. Therefore, when the presence of a face is detected by a known face recognition technique, an AF frame is displayed in a portion detected as a face area, and focus detection in the AF frame is performed. First, AF frame areas AFARH (1) to (6) are set for detecting the focus in the lateral shift direction, and AF frame areas AFARV (1) to (6) are set for detecting the focus in the vertical shift direction. In FIG. 3, one AF frame region for detecting the focus in the lateral shift direction and the focus detection in the vertical shift direction is shown as AFARH (3) and AFAVR (5), and the other five regions are not shown. ing.

横ずれ方向の焦点検出のためのAF枠領域AFARH(1)は、AF枠内の上から1行目のフィールドFLD(13,21)からフィールドFLD(13,26)までの6フィールド分を連結している。AF枠領域AFARH(2)は、AF枠内の上から2行目のフィールドFLD(14,21)からフィールドFLD(14,26)までを連結している。AF枠領域AFARH(3)は、AF枠内の上から3行目のフィールドFLD(15,21)からフィールドFLD(15,26)までを連結している。AF枠領域AFARH(4)は、AF枠内の上から4行目のフィールドFLD(16,21)からフィールドFLD(16,26)までを連結している。AF枠領域AFARH(5)は、AF枠内の上から5行目のフィールドFLD(17,21)からフィールドFLD(17,26)までを連結している。AF枠領域AFARH(6)は、AF枠内の上から6行目のフィールドFLD(18,21)からフィールドFLD(18,26)までを連結している。   The AF frame area AFARH (1) for focus detection in the lateral shift direction connects six fields from the field FLD (13, 21) to the field FLD (13, 26) in the first row from the top of the AF frame. ing. The AF frame area AFARH (2) connects the field FLD (14, 21) to the field FLD (14, 26) in the second row from the top in the AF frame. The AF frame area AFARH (3) connects the field FLD (15, 21) to the field FLD (15, 26) on the third line from the top in the AF frame. The AF frame area AFARH (4) connects the field FLD (16, 21) to the field FLD (16, 26) on the fourth line from the top in the AF frame. The AF frame area AFARH (5) connects the field FLD (17, 21) to the field FLD (17, 26) on the fifth line from the top in the AF frame. The AF frame area AFARH (6) connects the field FLD (18, 21) to the field FLD (18, 26) on the sixth line from the top in the AF frame.

縦ずれ方向の焦点検出のためのAF枠領域AFARV(1)は、AF枠内の左から1列目のフィールドFLD(13,21)からフィールドFLD(18,21)までの6フィールド分を連結している。AF枠領域AFARV(2)は、AF枠内の左から2列目のフィールドFLD(13,22)からフィールドFLD(18,22)までを連結している。AF枠領域AFARV(3)は、AF枠内の左から3列目のフィールドFLD(13,23)からフィールドFLD(18,23)までを連結している。AF枠領域AFARV(4)は、AF枠内の左から4列目のフィールドFLD(13,24)からフィールドFLD(18,24)までを連結している。AF枠領域AFARV(5)は、AF枠内の左から5列目のフィールドFLD(13,25)からフィールドFLD(18,25)までを連結している。AF枠領域AFARV(6)は、AF枠内の左から6列目のフィールドFLD(13,26)からフィールドFLD(18,26)までを連結している。   The AF frame area AFARV (1) for focus detection in the longitudinal shift direction connects six fields from the field FLD (13, 21) to the field FLD (18, 21) in the first column from the left in the AF frame. is doing. The AF frame area AFARV (2) connects the field FLD (13, 22) to the field FLD (18, 22) in the second column from the left in the AF frame. The AF frame area AFARV (3) connects the field FLD (13, 23) to the field FLD (18, 23) in the third column from the left in the AF frame. The AF frame area AFARV (4) connects the field FLD (13, 24) to the field FLD (18, 24) in the fourth column from the left in the AF frame. The AF frame area AFARV (5) connects the field FLD (13, 25) to the field FLD (18, 25) in the fifth column from the left in the AF frame. The AF frame area AFARV (6) connects the fields FLD (13, 26) to the fields FLD (18, 26) in the sixth column from the left in the AF frame.

横ずれ方向の焦点検出のためのAF枠領域AFARH(3)内に含まれる焦点検出用画素を加算し、連結した位相差検出用のA像信号がAFSIGH(A3)である。同様に、焦点検出用画素を加算し、連結した位相差検出用のB像信号がAFSIGh(B3)である。A像信号AFSIGH(A3)とB像信号AFSIGH(B3)の相対的な横ずれ量を公知の相関演算によって演算することで、被写体の焦点ずれ量を求める。AF枠領域AFARH(1)〜(6)それぞれで被写体の焦点ずれ量を求める。   The focus detection pixels included in the AF frame area AFARH (3) for focus detection in the lateral shift direction are added, and the connected A image signal for phase difference detection is AFSIGH (A3). Similarly, the focus detection pixels are added, and the connected B image signal for phase difference detection is AFSIGh (B3). The defocus amount of the subject is obtained by calculating the relative lateral shift amount between the A image signal AFSIGH (A3) and the B image signal AFSIGH (B3) by a known correlation calculation. The defocus amount of the subject is obtained in each of the AF frame areas AFARH (1) to (6).

縦ずれ方向の焦点検出のためのAF枠領域AFARV(5)についても同様である。即ち、焦点検出用画素を加算し、連結した位相差検出用のC像信号がAFSIGV(C5)である。また、焦点検出用画素を加算し、連結した位相差検出用のD像信号がAFSIGV(D5)である。そしてC像信号AFSIGV(C5)とD像信号AFSIGV(D5)の相対的な横ずれ量を公知の相関演算によって演算することで、被写体の焦点ずれ量を求める。AF枠領域AFARV(1)〜(6)それぞれで被写体の焦点ずれ量を求める。   The same applies to the AF frame area AFARV (5) for detecting the focus in the vertical deviation direction. That is, the C image signal for phase difference detection obtained by adding focus detection pixels and connecting them is AFSIGV (C5). A D image signal for phase difference detection obtained by adding focus detection pixels and connecting them is AFSIGV (D5). Then, the amount of defocus of the subject is obtained by calculating the relative lateral shift amount between the C image signal AFSIGV (C5) and the D image signal AFSIGV (D5) by a known correlation calculation. The defocus amount of the subject is obtained in each of the AF frame areas AFALV (1) to (6).

そして横ずれ及び縦ずれのAF枠領域で検出した計12の焦点ずれ量を比較し、信頼性の高い値を採用することで、AF枠内の焦点ずれ量を求めることができる。ここで信頼性とは、2像の一致度を指し、2像の一致度が良い場合は一般的に焦点検出結果の信頼性が高い。そこで複数の焦点検出領域の焦点検出結果がある場合は、信頼性の高い情報を優先的に使用する。また信頼性ではなく、計12の焦点ずれ量の平均値としたり、それらの中の最至近値とする等の方法でAF枠内の焦点ずれ量を決めても構わない。   Then, by comparing the defocus amounts of the total 12 detected in the lateral and vertical misalignment AF frame areas and adopting a highly reliable value, the defocus amount in the AF frame can be obtained. Here, the reliability refers to the degree of coincidence between the two images. When the degree of coincidence between the two images is good, the reliability of the focus detection result is generally high. Therefore, when there are focus detection results of a plurality of focus detection areas, highly reliable information is preferentially used. Further, instead of reliability, the defocus amount in the AF frame may be determined by a method such as an average value of a total of 12 defocus amounts or the closest value among them.

一方、画面左下の柵部分にAF枠を移動した時は、同様に横ずれ方向の焦点検出及び縦ずれ方向の焦点検出のためにAF枠領域を再設定して被写体の焦点ずれ量を求めることができる。しかし、柵部分は縦線成分が主体、即ち、横方向に輝度分布を有しているため、横ずれ方向の焦点検出に適した被写体と判断することができる。このため、横ずれ方向の焦点検出のためのAF枠領域AFARH(n)だけを設定して、AF枠領域AFARH(3)と同様に、A像信号とB像信号から横ずれ量を演算して、被写体の焦点ずれ量を求めることもできる。   On the other hand, when the AF frame is moved to the lower left fence part of the screen, similarly, the AF frame region is reset for the focus detection in the lateral shift direction and the focus detection in the vertical shift direction to obtain the defocus amount of the subject. it can. However, since the fence portion is mainly composed of vertical line components, that is, has a luminance distribution in the horizontal direction, it can be determined that the subject is suitable for focus detection in the lateral shift direction. For this reason, only the AF frame area AFARH (n) for focus detection in the lateral deviation direction is set, and the lateral deviation amount is calculated from the A image signal and the B image signal in the same manner as the AF frame area AFARH (3). The amount of defocus of the subject can also be obtained.

また画面右上の山部分にAF枠を移動した時も、上記同様に横ずれ方向の焦点検出及び縦ずれ方向の焦点検出のためにAF枠領域を設定して被写体の焦点ずれ量を求めることができる。しかし、山の稜線は横線成分が主体、即ち、縦方向に輝度分布を有しているため、縦ずれ方向の焦点検出に適した被写体と判断することができる。このため、縦ずれ方向の焦点検出のためのAF枠領域AFARV(n)だけを設定して、AF枠領域AFARV(5)と同様に、C像信号とD像信号から縦ずれ量を演算して、被写体の焦点ずれ量を求めることもできる。   Also, when the AF frame is moved to the top right corner of the screen, the focus shift amount of the subject can be obtained by setting the AF frame area for focus detection in the lateral shift direction and focus detection in the vertical shift direction as described above. . However, since the ridgeline of the mountain is mainly composed of a horizontal line component, that is, has a luminance distribution in the vertical direction, it can be determined that the subject is suitable for focus detection in the vertical shift direction. Therefore, only the AF frame area AFARV (n) for focus detection in the vertical shift direction is set, and the vertical shift amount is calculated from the C image signal and the D image signal in the same manner as the AF frame area AFARV (5). Thus, the defocus amount of the subject can be obtained.

ここではAF枠領域を設定した前提で焦点ずれ量を求める説明を行なった。しかし、AF枠領域を設定しなくても、撮像領域の全領域においてA像信号とB像信号から横ずれ量を、C像信号とD像信号から縦ずれ量を演算してもよい。そして、全領域の焦点検出結果から信頼性の高い情報を基にして、被写体の焦点ずれ量を求めることも可能である。即ち、顔認識により主被写体と判断された画面中央の人物の顔部分の焦点ずれ量を求めると同時に、撮像領域内にある他の被写体(画面左下の柵や画面右上の山)の焦点ずれ量も求めることが可能である。   Here, the description has been given of obtaining the defocus amount on the assumption that the AF frame region is set. However, the lateral shift amount may be calculated from the A image signal and the B image signal and the vertical shift amount may be calculated from the C image signal and the D image signal in the entire imaging region without setting the AF frame region. It is also possible to determine the defocus amount of the subject based on highly reliable information from the focus detection results of the entire area. That is, the amount of defocus of the face portion of the person at the center of the screen determined to be the main subject by face recognition is calculated, and at the same time, the amount of defocus of other subjects in the imaging area (the lower left fence or the upper right mountain of the screen) Can also be sought.

続いて、撮影情報を画像ファイルに記録する方法について説明する。図4はExif圧縮形式の画像ファイルフォーマット構造を示した図である。60はJPEG圧縮方式の画像ファイルで、ファイルの先頭を表すSOIマーカ61から始まり、Exif付属情報を記録するアプリケーションマーカセグメント1(APP1)62、Exif拡張データを記録するアプリケーションマーカセグメント2(APP2)63、量子化テーブルマーカセグメント(DQT)64、ハフマンテーブルマーカセグメント(DHT)65、リスタートマーカセグメント(DRI)66、フレームヘッダマーカセグメント(SOF)67、スキャンヘッダマーカセグメント(SOS)68、画像圧縮データ(Compressed Data)69、ファイルの終端を表すEOIマーカ70の順番で構成されている。   Next, a method for recording shooting information in an image file will be described. FIG. 4 is a diagram showing an Exif compression format image file format structure. Reference numeral 60 denotes a JPEG compression image file, which starts from an SOI marker 61 indicating the head of the file, and application marker segment 1 (APP1) 62 for recording Exif attached information, and application marker segment 2 (APP2) 63 for recording Exif extension data. , Quantization table marker segment (DQT) 64, Huffman table marker segment (DHT) 65, restart marker segment (DRI) 66, frame header marker segment (SOF) 67, scan header marker segment (SOS) 68, compressed image data (Compressed Data) 69, and an EOI marker 70 indicating the end of the file.

APP1(62)の内部構造は、アプリケーション領域であることを表すAPP1マーカ71から始まり、その大きさを表すLength72、Exif識別コード73、付属情報本体から構成されている。付属情報はFile Header74を含むTIFFの構造をとり、圧縮されている画像(主画像)に関する付属情報を記録する0th IFD75、0th IFDにExif固有の付属情報を記録するExif IFD76、サムネイル画像を記録する1st IFD77で構成されている。   The internal structure of APP1 (62) starts with an APP1 marker 71 indicating that it is an application area, and is composed of a Length 72 indicating the size, an Exif identification code 73, and an attached information main body. Attached information has a TIFF structure including File Header 74, 0th IFD75 that records attached information about the compressed image (main image), Exif IFD76 that records Exif-specific attached information to 0th IFD, and thumbnail image 1st IFD77 is comprised.

Exif IFD76に記録される付属情報のタグ構造は、Exif Versionタグ81から始まり、メーカーが個別の情報を記録可能なMaker Noteタグ82、ユーザーが個別の情報を記録可能なUser Commentタグ83、IFDへのポインタ(Interoperabiliy IFD Pointer)84、実際にデータを記録する領域(Value of Exif IFD)85で構成されている。   The tag structure of the attached information recorded in the Exif IFD 76 starts with the Exif Version tag 81, the manufacturer note tag 82 that allows the manufacturer to record individual information, the user comment tag 83 that allows the user to record individual information, and the IFD Pointer (Interoperability IFD Pointer) 84 and an area (Value of Exif IFD) 85 for actually recording data.

85aは撮像面位相差AFデータ記録の一例で、撮像面位相差AFによる各焦点検出領域毎の焦点ずれ量(測距データ)を記録している。まずはMaker Noteタグ82内に焦点ずれ量データ85aがデータ記録領域85のどの領域に記録されているかの情報が記録されている。焦点ずれ量データ85aは図3において撮像面の左上の焦点検出領域、即ちフィールドFLD(1,1)から記録を開始し、撮像面の右下の焦点検出領域、即ちフィールドFLD(30,45)までを記録し終了する。記録順はフィールドFLD(15,21)、フィールドLD(15,22)、フィールドFLD(15,23)、フィールドFLD(15,24)、フィールドFLD(15,25)、フィールドFLD(15,26)と水平方向のフィールドから記録し、その水平方向の行が終了すると垂直方向の次の行のフィールドを記録している。   Reference numeral 85a denotes an example of imaging surface phase difference AF data recording, which records a defocus amount (ranging data) for each focus detection area by the imaging surface phase difference AF. First, in the Maker Note tag 82, information on which area of the data recording area 85 the defocus amount data 85a is recorded is recorded. In FIG. 3, the defocus amount data 85a starts to be recorded from the focus detection area at the upper left of the imaging surface, that is, the field FLD (1, 1), and the focus detection area at the lower right of the imaging surface, that is, the field FLD (30, 45). Record until and finish. The recording order is field FLD (15, 21), field LD (15, 22), field FLD (15, 23), field FLD (15, 24), field FLD (15, 25), field FLD (15, 26). Are recorded from the horizontal field, and when the horizontal line ends, the field of the next line in the vertical direction is recorded.

図5はRAWデータ形式の画像ファイルフォーマット構造を示した図である。ここでRAWデータとは、撮像素子6から出力された画像信号をA/D変換器41でデジタル変換しただけの画像形式で、Y/C分離、ホワイトバランス補正、γ補正、圧縮加工等の各種画像処理を行う前の、所謂、生画像データである。従ってRAWデータは非常に多くの情報量を持つため、ユーザーが後から画像処理を行う場合の自由度が高い。そのためユーザー自身が撮影した画像を、高画質のまま好みの画像に自由に調整可能といった特徴がある。   FIG. 5 is a diagram showing an image file format structure of the RAW data format. Here, the RAW data is an image format in which the image signal output from the image sensor 6 is digitally converted by the A / D converter 41, and includes various Y / C separation, white balance correction, γ correction, compression processing, and the like. This is so-called raw image data before image processing. Therefore, since RAW data has a very large amount of information, the degree of freedom when a user performs image processing later is high. Therefore, there is a feature that an image captured by the user can be freely adjusted to a desired image while maintaining high image quality.

90はRAWデータ形式の画像ファイルで、ヘッダー91から始まり撮影で使用したカメラ機種情報92、Exif形式のタグ形式に則って各種情報を記録可能な画像付加情報93、RAWデータを現像するためのホワイトバランス値、γ値等の現像用パラメータ94、サムネイルデータ95、RAWデータ96で構成されている。また画像付加情報93内には撮像素子6上のどの位置に焦点検出用画素が配置されているかの焦点検出用画素位置情報93aが記録されている。   Reference numeral 90 denotes an image file in the RAW data format. The camera model information 92 used for shooting starts from the header 91, the image additional information 93 capable of recording various information according to the tag format of the Exif format, and the white for developing the RAW data. It comprises development parameters 94 such as a balance value and a γ value, thumbnail data 95, and RAW data 96. Further, in the image additional information 93, focus detection pixel position information 93a indicating at which position on the image sensor 6 the focus detection pixels are arranged is recorded.

96aはRAWデータ内の一例で、フィールドFLD(15,25)内の右下隅の焦点検出用画素を有する領域を示しており、各画素毎の出力データが記録されている。データは焦点ずれ量データ85aと同様に撮像面の左上の画素データから記録を開始し、右下の画素データまでを記録して終了している。RAWデータ96aは、詳しくはフィールドFLD(15,25)内の右下隅の所定領域内の1行目と2行目を示している。1行目では、画素(1491,2491)は撮像用R画素でRデータ、画素(1491,2492)は撮像用G画素でGデータ、画素(1491,2493)は撮像用R画素でRデータ、画素(1491,2494)は撮像用G画素でGデータ、画素(1491,2495)は撮像用R画素でRデータ、画素(1491,2496)は撮像用G画素でGデータ、画素(1491,2497)は撮像用R画素でRデータ、画素(1491,2498)は撮像用G画素でGデータ、画素(1491,2499)は焦点検出用SHA画素でSHAデータ、画素(1491,2500)は撮像用G画素でGデータが記録されている。2行目は画素(1492,2491)は撮像用G画素でGデータ、画素(1492,2492)は撮像用B画素でBデータ、画素(1492,2493)は撮像用G画素でGデータ、画素(1492,2494)は撮像用B画素でBデータ、画素(1492,2495)は撮像用G画素でGデータ、画素(1492,2496)は撮像用B画素でBデータ、画素(1492,2497)は撮像用G画素でGデータ、画素(1492,2498)は撮像用B画素でBデータ、画素(1492,2499)は撮像用G画素でGデータ、画素(1492,2500)は焦点検出用SHB画素でSHBデータが記録されている。このように全画素のデータ記録順は水平方向の画素から記録し、その水平方向の行が終了すると垂直方向次の行の画素を記録している。   Reference numeral 96a denotes an example in the RAW data, which indicates an area having focus detection pixels at the lower right corner in the field FLD (15, 25), in which output data for each pixel is recorded. Data is recorded from the upper left pixel data on the imaging surface in the same manner as the defocus amount data 85a, and is recorded up to the lower right pixel data. Specifically, the RAW data 96a indicates the first and second rows in a predetermined area at the lower right corner in the field FLD (15, 25). In the first row, the pixel (1491, 2491) is an R pixel for imaging and R data, the pixel (1491, 2492) is G data for imaging G pixel, and the pixel (1491, 2493) is an R pixel for imaging, R data, Pixels (1491, 2494) are G data for imaging G pixels, pixels (1491, 2495) are R data for imaging R pixels, pixels (1491, 2496) are G data for imaging, G data, and pixels (1491, 2497). ) Is R data for imaging R pixels, pixels (1491, 2498) are G data for imaging G pixels, pixels (1491, 2499) are SHA data for focus detection SHA pixels, and pixels (1491, 2500) are for imaging G data is recorded by G pixels. In the second row, pixels (1492, 2491) are G data for imaging G pixels, pixels (1492, 2492) are B data for imaging B pixels, and pixels (1492, 2493) are G data for imaging, G data, pixels (1492, 2494) are B data for imaging, B data, pixels (1492, 2495) are G data for imaging G pixels, and pixels (1492, 2496) are B data for imaging, B data, pixels (1492, 2497) Is G data for imaging G pixels, pixels (1492, 2498) are B data for imaging B pixels, pixels (1492, 2499) are G data for imaging G pixels, and pixels (1492, 2500) are focus detection SHBs. SHB data is recorded in pixels. As described above, the data recording order of all the pixels is recorded from the pixels in the horizontal direction, and when the horizontal row ends, the pixels in the next row in the vertical direction are recorded.

続いて本実施形態のデジタル一眼レフカメラの動作を、図6〜図10の制御フローを用いて説明する。図6はデジタル一眼レフカメラの基本動作を示すメインフローである。   Next, the operation of the digital single-lens reflex camera of the present embodiment will be described using the control flows of FIGS. FIG. 6 is a main flow showing the basic operation of the digital single-lens reflex camera.

S101では、ユーザーが電源ボタン34を操作してカメラの電源をONする。電源がONされるとMPU20はカメラ内の各アクチュエータや撮像素子6の動作確認を行う。そしてメモリ内容や実行プログラムの初期化状態を検出すると共に、撮影準備動作を実行する。   In S101, the user operates the power button 34 to turn on the camera. When the power is turned on, the MPU 20 checks the operation of each actuator and the image sensor 6 in the camera. Then, the memory contents and the initialization state of the execution program are detected, and the shooting preparation operation is executed.

S102では、ユーザが各種ボタンを操作してカメラの各種設定を行う。例えば、モードボタン31を操作して撮影モードを選択したり、電子ダイヤル32を操作してシャッタースピードや絞り、撮影画像の記録画質の設定を行ったりする。   In S102, the user operates various buttons to make various settings for the camera. For example, the mode button 31 is operated to select a shooting mode, or the electronic dial 32 is operated to set the shutter speed, aperture, and recorded image recording quality.

S103では、マルチコントローラ33によりライブビューモードが設定されているか否かの判定を行い、ライブビューモードに設定されていればライブビューモードルーチンのS111へ進み、設定されていなければ通常モードルーチンのS104へ進む。   In S103, it is determined whether or not the live view mode is set by the multi-controller 33. If the live view mode is set, the process proceeds to S111 of the live view mode routine, and if not set, S104 of the normal mode routine is set. Proceed to

まず通常モード(ユーザーがファインダーを覗いて撮影する一眼レフカメラの通常使用モード)の動作ルーチンを説明する。S104では、レリーズボタン30が半押しされてSW1がONされたか否かの判定を行い、ONされていればS105へ進み、ONされていなければONされるまで待機する。   First, an operation routine in a normal mode (a normal use mode of a single-lens reflex camera in which a user takes a picture through a viewfinder) will be described. In S104, it is determined whether or not the release button 30 is half-pressed and SW1 is turned on. If it is turned on, the process proceeds to S105, and if it is not turned on, the process waits until it is turned on.

S105では、専用のAFセンサ8を用いたAF動作を行なう。S106では、AEセンサ13を用いたAE動作を行なう。S107では、ファインダー内に合焦した焦点検出点が何処かを不図示の表示装置で表示する。   In S105, an AF operation using the dedicated AF sensor 8 is performed. In S106, an AE operation using the AE sensor 13 is performed. In step S107, the focus detection point in the finder is displayed on a display device (not shown).

S108では、レリーズボタン30が全押しされてSW2がONされたか否かの判定を行い、ONされていればS109へ進み、ONされていなければONされるまで待機する。S109では、通常撮影ルーチンを実行する。   In S108, it is determined whether or not the release button 30 is fully pressed and the SW2 is turned on. If it is turned on, the process proceeds to S109, and if it is not turned on, the process waits until it is turned on. In S109, a normal photographing routine is executed.

図7は通常撮影ルーチンのフローである。S131では、モータ駆動回路26により不図示のミラー駆動用モータを制御し、主ミラー4とサブミラー7を撮影光路から退避(ミラーアップ)させる(図1(b)の状態となる)。   FIG. 7 is a flowchart of a normal photographing routine. In S131, a motor for driving a mirror (not shown) is controlled by the motor drive circuit 26, and the main mirror 4 and the sub mirror 7 are retracted (mirrored up) from the photographing optical path (the state shown in FIG. 1B).

S132では、AE結果により演算された撮影露出に従って、レンズ制御回路23により撮影レンズ3内の不図示の絞りを駆動する。S133では、シャッター駆動回路27によりシャッター5を開閉する。S134では、メモリコントローラ21により撮像素子6で受光された画像信号を読み込んでSDRAM43に一時記録する。この一時記録されたデータが撮像データである。   In S132, the lens control circuit 23 drives a diaphragm (not shown) in the photographic lens 3 according to the photographic exposure calculated from the AE result. In S133, the shutter 5 is opened and closed by the shutter drive circuit 27. In S <b> 134, the image signal received by the image sensor 6 is read by the memory controller 21 and temporarily recorded in the SDRAM 43. This temporarily recorded data is imaging data.

S135では、メモリコントローラ21がSDRAM43から読み出した画像信号の欠損画素補間を行なう。何故ならば、焦点検出用画素の出力は撮像のためのRGBカラー情報を有しておらず、画像を得る上では欠陥画素に相当するため、周囲の撮像用画素の情報から補間により画像信号を生成するからである。生成した画像信号と元の画像信号から欠陥画素補間画像を作成し、SDRAM43に一時記録しておく。   In S135, the memory controller 21 performs defective pixel interpolation of the image signal read from the SDRAM 43. This is because the output of the focus detection pixel does not have RGB color information for imaging and corresponds to a defective pixel in obtaining an image. Therefore, an image signal is interpolated from information on surrounding imaging pixels. It is because it generates. A defective pixel interpolation image is created from the generated image signal and the original image signal, and is temporarily recorded in the SDRAM 43.

S136では、メモリコントローラ21で欠陥画素補間画像からサムネイル画像を作成し、SDRAM43に一時記録する。S137では、撮影画像の記録画質がJPEGまたはRAWのどちらに選択されているかを判定し、JPEGが選択されている場合はS138へ進み、RAWが選択されている場合はS140へ進む。   In S136, the memory controller 21 creates a thumbnail image from the defective pixel interpolation image and temporarily records it in the SDRAM 43. In S137, it is determined whether the recording quality of the captured image is selected as JPEG or RAW. If JPEG is selected, the process proceeds to S138, and if RAW is selected, the process proceeds to S140.

S138では、SDRAM43に一時記録された画像信号から、メモリコントローラ21により各焦点検出用画素を読み出し、MPU20により所定の処理を行い、各フィールド毎の焦点ずれ量を演算し、SDRAM43に一時記録する。ここで図3で説明したように焦点ずれ量のデータ数は1350個分となる。   In S 138, each focus detection pixel is read by the memory controller 21 from the image signal temporarily recorded in the SDRAM 43, predetermined processing is performed by the MPU 20, a defocus amount for each field is calculated, and temporarily recorded in the SDRAM 43. Here, as described with reference to FIG. 3, the number of defocus amount data is 1350.

S139では、欠損画素補間画像に対して画像処理回路44でホワイトバランス補正、γ補正、エッジ強調等の画像処理を行ない、画像圧縮/伸張回路45でJPEG形式に従って圧縮し、メモリコントローラ21により画像圧縮データ部69に記録する。またサムネイル画像を1st IFD77に、焦点ずれ量データ85aをデータ記録領域85に記録する。更にはカメラの各種設定(シャッタースピード、絞り、レンズ焦点距離等)をExifルールに則り記録することにより、画像および各種データをJPEGファイル化する。   In S139, the image processing circuit 44 performs image processing such as white balance correction, γ correction, and edge enhancement on the defective pixel interpolation image, the image compression / decompression circuit 45 compresses the image according to the JPEG format, and the memory controller 21 compresses the image. Record in the data section 69. Further, the thumbnail image is recorded in the 1st IFD 77 and the defocus amount data 85a is recorded in the data recording area 85. Further, various settings of the camera (shutter speed, aperture, lens focal length, etc.) are recorded in accordance with the Exif rules, whereby the image and various data are converted into JPEG files.

S140では、メモリコントローラ21によりSDRAM43に一時記録されている画像信号をRAWデータ96に96aのように記録する。また焦点検出用画素位置情報93a、カメラの各種設定(シャッタースピード、絞り、レンズ焦点距離等)等をExifルールに則り画像付加情報93に、サムネイル画像をサムネイルデータ95に記録することにより画像および各種データをRAWファイル化する。S141では、JPEGファイルまたはRAWファイルとなった画像ファイルをメディア48に記録する。   In S140, the image signal temporarily recorded in the SDRAM 43 by the memory controller 21 is recorded in the RAW data 96 like 96a. Further, by recording the focus detection pixel position information 93a, various camera settings (shutter speed, aperture, lens focal length, etc.) in the image additional information 93 according to the Exif rule, and the thumbnail image in the thumbnail data 95, the image and the various Data is converted into a RAW file. In S <b> 141, the image file that is a JPEG file or a RAW file is recorded on the medium 48.

S142では、モータ駆動回路26により不図示のミラー駆動用モータを制御し、撮影光路から退避している主ミラー4とサブミラー7を、撮影光束をファインダーへと反射し導く観察位置へ駆動(ミラーダウン)する(図1(a)の状態となる)。S143では、モータ駆動回路26により不図示のチャージ用モータを通電制御し、シャッター5をチャージする。そして図6のメインルーチン内のS110にリターンする。   In S142, a motor for driving a mirror (not shown) is controlled by the motor drive circuit 26, and the main mirror 4 and the sub mirror 7 retracted from the imaging optical path are driven to an observation position that reflects and guides the imaging luminous flux to the viewfinder (mirror down). (The state shown in FIG. 1A is obtained). In S143, the motor drive circuit 26 controls energization of a charging motor (not shown) to charge the shutter 5. Then, the process returns to S110 in the main routine of FIG.

S110では、ユーザーが電源ボタン34を操作して、カメラの電源がOFFされたか否かを判断し、OFFされていなければS102へ進み次の撮影に備え、OFFされていれば一連のカメラ動作を終了する。   In S110, the user operates the power button 34 to determine whether or not the camera is turned off. If not, the process proceeds to S102 to prepare for the next shooting, and if it is turned off, a series of camera operations are performed. finish.

続いてライブビューモード(ユーザーがライブビューを使用して撮影するモード)の動作ルーチンを説明する。S111では、ライブビュー表示ルーチンを実行する。   Next, an operation routine in the live view mode (a mode in which the user takes a picture using the live view) will be described. In S111, a live view display routine is executed.

図8はライブビュー表示ルーチンのフローである。S161では、モータ駆動回路26により不図示のミラー駆動用モータを制御し、主ミラー4とサブミラー7を撮影光路から退避(ミラーアップ)させる。S162では、シャッター駆動回路27によりシャッター5を開放状態にする(図1(b)の状態となる)。S163では、メモリコントローラ21により撮像素子6で受光された動画像の読み込みを開始する。   FIG. 8 is a flow of the live view display routine. In S161, a motor for driving a mirror (not shown) is controlled by the motor drive circuit 26, and the main mirror 4 and the sub mirror 7 are retracted (mirror up) from the photographing optical path. In S162, the shutter 5 is opened by the shutter drive circuit 27 (the state shown in FIG. 1B). In S163, reading of the moving image received by the image sensor 6 by the memory controller 21 is started.

S164では、読み出した動画像を液晶モニタ14に表示する。ユーザーはこのライブビュー画像を目視して撮影時の構図決定を行なう。そして図6のメインルーチン内のS112にリターンする。   In S164, the read moving image is displayed on the liquid crystal monitor 14. The user visually determines this live view image and determines the composition at the time of shooting. Then, the process returns to S112 in the main routine of FIG.

S112では、撮像領域内に顔が存在するか認識処理(顔検知)を行う。S113では、ライブビュー画像に重ねてAF枠を灰色で表示する。ここでS112において、撮像領域内に顔が存在していると認識された場合には、認識された顔領域にAF枠の表示を行なう。撮像領域内に顔が存在していないと認識された場合には、画面中央にAF枠の表示を行なう。本実施形態では図11(a)の通り、画面中央の人物の顔が顔検知によって認識され、顔領域にAF枠が表示さる。   In S112, recognition processing (face detection) is performed to determine whether a face exists in the imaging region. In S113, the AF frame is displayed in gray on the live view image. If it is recognized in S112 that a face is present in the imaging area, an AF frame is displayed in the recognized face area. When it is recognized that no face exists in the imaging area, an AF frame is displayed at the center of the screen. In this embodiment, as shown in FIG. 11A, the face of the person at the center of the screen is recognized by face detection, and an AF frame is displayed in the face area.

S114では、AF枠領域設定を行なう。AF枠領域設定は前述の通り、横ずれ検知のためにAF枠領域AFARH(1)〜(6)と、縦ずれ検知のためにAF枠領域AFARV(1)〜(6)が設定される。   In S114, AF frame area setting is performed. As described above, the AF frame area is set with AF frame areas AFARH (1) to (6) for detecting lateral shift and AF frame areas AFAVR (1) to (6) for detecting vertical shift.

S115では、ユーザーによりマルチコントローラ33が操作されて、AF枠が移動されたか否かの判定を行い、移動されていればS114へ進み、移動されていなければS116へ進む。ここでのAF枠移動は例えば、顔認識がされずAF枠が画面中央に表示されたのに対して、ユーザーが画面中央以外の被写体にピントを合わせたい場合などが考えられる。   In S115, the multi-controller 33 is operated by the user to determine whether or not the AF frame has been moved. If it has been moved, the process proceeds to S114, and if not, the process proceeds to S116. For example, the AF frame is moved when the face is not recognized and the AF frame is displayed at the center of the screen, but the user wants to focus on a subject other than the center of the screen.

S116では、レリーズボタン30が半押しされてSW1がONされたか否かの判定を行い、ONされていればS117へ進み、ONされていなければ構図が変更された可能性を考慮してS112へ進む。   In S116, it is determined whether or not the release button 30 is half-pressed and SW1 is turned on. If it is turned on, the process proceeds to S117. If not, the process proceeds to S112 in consideration of the possibility that the composition has been changed. move on.

S117では、メモリコントローラ21により撮像素子6からAF枠領域に設定されているフィールドに含まれる各焦点検出用画素を読み出し、MPU20により所定の処理を行い、AF枠内の焦点ずれ量を決定する。本実施形態においては、まずは図3に示したAFSIGH(A3)とAFSIGH(B3)、又はAFSIGV(C5)とAFSIGV(D5)等の2像の信号を生成し、それら2像の相関演算を行い、2像の相対的な位置ずれ量を演算する。次に相関演算結果の信頼性を判定し、信頼性の高い検出結果から焦点ずれ量を演算する。そして焦点ずれ量をレンズ制御回路23へ送出して、撮影レンズ3内の不図示のフォーカスレンズ群の合焦駆動を行なう。   In S117, the memory controller 21 reads out each focus detection pixel included in the field set in the AF frame area from the image sensor 6, performs predetermined processing by the MPU 20, and determines the defocus amount in the AF frame. In this embodiment, first, two image signals such as AFSIGH (A3) and AFSIGH (B3) or AFSIGV (C5) and AFSIGV (D5) shown in FIG. The relative positional deviation amount between the two images is calculated. Next, the reliability of the correlation calculation result is determined, and the defocus amount is calculated from the highly reliable detection result. Then, the amount of defocus is sent to the lens control circuit 23, and a focus lens group (not shown) in the photographing lens 3 is driven to focus.

ここでは、AF枠領域に設定されていないフィールドについては、それらの焦点ずれ量を演算していない。これは相関演算がMPU20で行なう処理の中では比較的時間が掛かるためで、この時点で焦点ずれ量そのものが不必要なAF枠外のフィールドについては、データ処理を行なわないことで僅かでもMPU20の処理時間を短くするためである。もちろんMPU20の処理能力に余裕があれば、全フィールドにおける焦点ずれ量を演算して一時記録しておき、AF枠が移動された場合に素早く合焦駆動出来るようにしても構わない。   Here, for the fields that are not set in the AF frame region, their defocus amounts are not calculated. This is because it takes a relatively long time for the correlation calculation to be performed by the MPU 20, and for the field outside the AF frame where the defocus amount itself is not necessary at this point, the MPU 20 does not perform data processing at all. This is to shorten the time. Of course, if the processing capability of the MPU 20 is sufficient, the defocus amount in all fields may be calculated and temporarily recorded so that the focus drive can be performed quickly when the AF frame is moved.

S118では、AF枠の色を灰色から緑色に変更してAF枠内が合焦したことをユーザーに知らせる。S119では、レリーズボタン30が全押しされてSW2がONされたか否かの判定を行い、ONされていればS120へ進み、ONされていなければONされるまで待機する。S120では、ライブビュー撮影ルーチンを実行する。   In S118, the color of the AF frame is changed from gray to green to notify the user that the AF frame is in focus. In S119, it is determined whether or not the release button 30 is fully pressed and the SW2 is turned on. If it is turned on, the process proceeds to S120, and if it is not turned on, the process waits until it is turned on. In S120, a live view shooting routine is executed.

図9はライブビュー撮影ルーチンのフローである。S181では、メモリコントローラ21により撮像素子6から画像信号を読み込み、合焦している主被写体及びその周りの測光情報を得る、所謂、撮像面AE動作を行なう。S182では、撮像面AE結果により演算された撮影露出に従って、レンズ制御回路23により撮影レンズ3内の不図示の絞りを駆動する。   FIG. 9 is a flow of the live view shooting routine. In S181, an image signal is read from the image sensor 6 by the memory controller 21, and a so-called imaging surface AE operation is performed to obtain a focused main subject and photometric information around it. In S182, the lens control circuit 23 drives a diaphragm (not shown) in the photographic lens 3 according to the photographic exposure calculated from the imaging surface AE result.

S183では、メモリコントローラ21により撮像素子6に受光されている画像信号をリセットして撮像素子6の受光状態を初期状態、即ち何も撮像されていない状態に戻す。S184では、再びメモリコントローラ21により撮像素子6の受光を行い、画像信号を読み込んでSDRAM43に一時記録する。   In S183, the image signal received by the image pickup device 6 by the memory controller 21 is reset to return the light receiving state of the image pickup device 6 to the initial state, that is, the state in which nothing is picked up. In S184, the memory controller 21 receives light again from the image sensor 6, reads an image signal, and temporarily records it in the SDRAM 43.

S185では、メモリコントローラ21で読み出した画像信号の欠損画素補間を行なう。何故ならば、焦点検出用画素の出力は撮像のためのRGBカラー情報を有しておらず、画像を得る上では欠陥画素に相当するため、周囲の撮像用画素の情報から補間により画像信号を生成するからである。生成した画像信号と元の画像信号から欠陥画素補間画像を作成し、SDRAM43に一時記録しておく。   In S185, defective pixel interpolation of the image signal read by the memory controller 21 is performed. This is because the output of the focus detection pixel does not have RGB color information for imaging and corresponds to a defective pixel in obtaining an image. Therefore, an image signal is interpolated from information on surrounding imaging pixels. It is because it generates. A defective pixel interpolation image is created from the generated image signal and the original image signal, and is temporarily recorded in the SDRAM 43.

S186では、メモリコントローラ21で欠陥画素補間画像からサムネイル画像を作成し、SDRAM43に一時記録する。S187では、撮影画像の記録画質がJPEGまたはRAWのどちらに選択されているかを判定し、JPEGが選択されている場合はS188へ進み、RAWが選択されている場合はS190へ進む。   In S186, the memory controller 21 creates a thumbnail image from the defective pixel interpolation image and temporarily records it in the SDRAM 43. In S187, it is determined whether the recording quality of the captured image is selected as JPEG or RAW. If JPEG is selected, the process proceeds to S188, and if RAW is selected, the process proceeds to S190.

S188では、SDRAM43に一時記録された画像信号から、メモリコントローラ21により各焦点検出用画素を読み出し、MPU20により所定の処理を行い、各フィールド毎の焦点ずれ量を演算し、SDRAM43に一時記録する。ここで図3で説明したように焦点ずれ量のデータ数は1350個分となる。   In S188, each focus detection pixel is read by the memory controller 21 from the image signal temporarily recorded in the SDRAM 43, predetermined processing is performed by the MPU 20, a defocus amount for each field is calculated, and is temporarily recorded in the SDRAM 43. Here, as described with reference to FIG. 3, the number of defocus amount data is 1350.

S189では、欠損画素補間画像に対して画像処理回路44でホワイトバランス補正、γ補正、エッジ強調等の画像処理を行ない、画像圧縮/伸張回路45でJPEG形式に従って圧縮し、メモリコントローラ21により画像圧縮データ部69に記録する。またサムネイル画像を1st IFD77に、焦点ずれ量データをデータ記録領域85に85aのように記録する。更にはカメラの各種設定(シャッタースピード、絞り、レンズ焦点距離等)等をExifルールに則り記録することにより、画像および各種データをJPEGファイル化する。   In S189, the image processing circuit 44 performs image processing such as white balance correction, γ correction, and edge enhancement on the defective pixel interpolation image, the image compression / decompression circuit 45 compresses the image according to the JPEG format, and the memory controller 21 compresses the image. Record in the data section 69. Further, the thumbnail image is recorded in the first IFD 77 and the defocus amount data is recorded in the data recording area 85 as indicated by 85a. Further, various settings of the camera (shutter speed, aperture, lens focal length, etc.) are recorded in accordance with the Exif rules, thereby converting the image and various data into JPEG files.

S190では、メモリコントローラ21によりSDRAM43に一時記録されている画像信号をRAWデータ96に96aのように記録する。またカメラの各種設定(シャッタースピード、絞り、レンズ焦点距離等)等をExifルールに則り画像付加情報93に、サムネイル画像をサムネイルデータ95に記録することにより画像および各種データをRAWファイル化する。   In S190, the image signal temporarily recorded in the SDRAM 43 by the memory controller 21 is recorded in the RAW data 96 like 96a. Further, various settings of the camera (shutter speed, aperture, lens focal length, etc.) and the like are recorded in the image additional information 93 according to the Exif rule, and the thumbnail image is recorded in the thumbnail data 95, whereby the image and various data are converted into a RAW file.

S191では、JPEGファイルまたはRAWファイルとなった画像ファイルをメディア48に記録する。S192では、シャッター駆動回路27によりシャッター5を閉じる。S193では、モータ駆動回路26により不図示のミラー駆動用モータを制御し、主ミラー4とサブミラー7をミラーダウンする(図1(a)の状態となる)。S194では、モータ駆動回路26により不図示のチャージ用モータを通電制御し、シャッター5をチャージする。そして図6のメインルーチン内のS110にリターンする。   In S 191, the image file that is a JPEG file or a RAW file is recorded on the medium 48. In S192, the shutter 5 is closed by the shutter drive circuit 27. In S193, the motor drive circuit 26 controls a mirror drive motor (not shown), and the main mirror 4 and the sub mirror 7 are mirrored down (the state shown in FIG. 1 (a)). In S194, the motor drive circuit 26 controls energization of a charging motor (not shown) to charge the shutter 5. Then, the process returns to S110 in the main routine of FIG.

図10は画像再生動作を示すフローチャートである。S201では、再生ボタン35がONされてカメラは撮影モードから再生モードに切り替る。本実施形態においては、図3相当の画像がJPEGファイル60でメディア48に記録されているとする。   FIG. 10 is a flowchart showing the image reproduction operation. In S201, the playback button 35 is turned on and the camera switches from the shooting mode to the playback mode. In the present embodiment, it is assumed that the image corresponding to FIG. 3 is recorded on the medium 48 as the JPEG file 60.

S202では、メディア48に記録された画像ファイルの中から、再生しようとするJPEGファイル60に対して、メモリコントローラ21により各フィールド毎の焦点ずれ量データ85aを読み出しSDRAM43に一時記録する。S203では、読み出した各フィールド毎の焦点ずれ量データ85aを判定閾値と比較して合焦状態を判定する。具体的には、閾値未満の焦点ずれ量があれば画像は合焦していると判定しS204へ進み、閾値未満の焦点ずれ量がなければ画像は合焦していない(非合焦)と判定しS208へ進む。   In S 202, the memory controller 21 reads out the defocus amount data 85 a for each field from the image file recorded on the medium 48 and temporarily records it in the SDRAM 43. In S203, the in-focus state is determined by comparing the read defocus amount data 85a for each field with a determination threshold value. Specifically, if there is a defocus amount less than the threshold value, it is determined that the image is in focus, and the process proceeds to S204. If there is no defocus amount less than the threshold value, the image is not in focus (unfocused). Determine and proceed to S208.

S204では、JPEGファイル60の画像圧縮データ69から主画像を読み出し、液晶モニタ14に再生表示する。S205では、S203で判定された焦点ずれ量が閾値未満の領域を合焦領域枠として画像に重ねて表示する。これによりユーザーは画像の合焦領域を確認することができる。この状態が図11(a)である。   In S204, the main image is read from the compressed image data 69 of the JPEG file 60, and is reproduced and displayed on the liquid crystal monitor 14. In S205, an area where the amount of defocus determined in S203 is less than the threshold is displayed as an in-focus area frame so as to overlap the image. As a result, the user can confirm the in-focus area of the image. This state is shown in FIG.

S206では、電子ダイヤル32やマルチコントローラ33の操作により、別の画像ファイルの再生が選択されたか否かの判定を行い、選択されればS202へ進み、選択されなければS207へ進む。   In S206, it is determined whether playback of another image file has been selected by operating the electronic dial 32 or the multi-controller 33. If selected, the process proceeds to S202, and if not selected, the process proceeds to S207.

S207では、再生モードで使用しない操作ボタン(例えばレリーズボタン30や電源ボタン34等)が操作されたか否かを判定し、操作されれば再生モードを終了し、操作されなければS206へ進む。   In S207, it is determined whether or not an operation button (for example, the release button 30 or the power button 34) that is not used in the playback mode has been operated. If operated, the playback mode is terminated. If not operated, the process proceeds to S206.

S208では、JPEGファイル60の画像圧縮データ69から主画像を読み出し、液晶モニタ14に再生表示する。S209では、表示した画像には焦点ずれ量が閾値未満の領域がなく非合焦であるため、警告表示を画像に重ねて表示する。これによりユーザーは画像が非合焦であることを確認することができる。この状態が図11(b)である。   In S 208, the main image is read from the compressed image data 69 of the JPEG file 60 and is reproduced and displayed on the liquid crystal monitor 14. In S209, the displayed image does not have a region where the amount of defocus is less than the threshold and is out of focus, so a warning display is displayed over the image. As a result, the user can confirm that the image is out of focus. This state is shown in FIG.

以上説明したように、本実施形態によれば、画像再生表示時に画像ファイルに記録されている撮影された瞬間の焦点ずれ量を利用して画像の合焦判定を行うことにより、ユーザーは再生表示された画像が合焦しているか否かを簡単に確認することができる。   As described above, according to the present embodiment, the user can reproduce and display the image by using the defocus amount at the moment of shooting recorded in the image file when the image is reproduced and displayed. It is possible to easily confirm whether or not the captured image is in focus.

本実施形態においては、画像撮影および撮影時の撮像面位相差AFデータの画像ファイル内への記録をデジタル一眼レフカメラで行なったが、デジタルコンパクトカメラ、デジタルビデオカメラ、各種検査デジタルカメラ、監視デジタルカメラ、内視鏡デジタルカメラ、ロボット用デジタルカメラ等、撮像素子による位相差AFが可能な撮像装置に適用可能である。また撮像面位相差AFデータの読み出し制御および表示は、撮影したデジタル一眼レフカメラで行なった。しかし、画像を表示可能な装置(例えばパソコン、メディアスロットと液晶モニタを有するプリンター等)に組み込まれた画像ファイル処理ソフトで制御および表示しても構わない。   In this embodiment, the digital single-lens reflex camera records the image and the imaging plane phase difference AF data at the time of shooting with the digital single-lens reflex camera. However, the digital compact camera, digital video camera, various inspection digital cameras, surveillance digital The present invention can be applied to an imaging apparatus capable of phase difference AF using an imaging element, such as a camera, an endoscope digital camera, and a robot digital camera. Further, the readout control and display of the imaging plane phase difference AF data were performed by a photographed digital single-lens reflex camera. However, it may be controlled and displayed by image file processing software incorporated in a device capable of displaying an image (for example, a personal computer, a printer having a media slot and a liquid crystal monitor).

更に合焦判定に用いた撮像面位相差AFデータは各フィールドにおける焦点ずれ量としたが、焦点ずれ量に限定するものではなく、撮影レンズ3の情報と焦点ずれ量から演算されるカメラから被写体までの距離等の測距データとしてもよい。また再生表示する画像ファイルを前記の通りJPEGファイルとして説明したので、各フィールド毎の焦点ずれ量を読み出し、判定閾値と比較して合焦判定している。しかし、RAWファイルの場合ならば、各焦点検出用画素の生データを読み出し判定閾値と比較して合焦判定しても構わない。また合焦判定の結果、非合焦の場合は“非合焦”の文字を画像に重ねて表示して警告表示を行ったが、ユーザーが画像が非合焦であることを分かればどのような警告表示でも構わない。   Furthermore, although the imaging plane phase difference AF data used for focusing determination is the amount of defocus in each field, it is not limited to the amount of defocus, but it is not limited to the amount of defocus. Ranging data such as a distance up to may be used. Further, since the image file to be reproduced and displayed has been described as a JPEG file as described above, the focus shift amount for each field is read and compared with a determination threshold value to determine focus. However, in the case of a RAW file, the focus determination may be performed by comparing the raw data of each focus detection pixel with the read determination threshold value. As a result of in-focus determination, if out-of-focus is displayed, the word “in-focus” is displayed over the image and a warning is displayed. If the user knows that the image is out-of-focus A warning may be displayed.

(第2の実施形態)
以下、本発明の第2の実施形態を図面を参照しながら説明する。基本構成は第1の実施形態と同一であるため説明を割愛し、異なる部分を説明する。
(Second Embodiment)
Hereinafter, a second embodiment of the present invention will be described with reference to the drawings. Since the basic configuration is the same as that of the first embodiment, a description thereof will be omitted, and different parts will be described.

図12はデジタル一眼レフカメラにおけるスライドショー時のフローである。S221では、再生ボタン35がONされてカメラは撮影モードから再生モードに切り替わる。本実施形態においては、画像がJPEGファイル60でメディア48に記録されているとする。   FIG. 12 is a flowchart at the time of a slide show in the digital single-lens reflex camera. In S221, the playback button 35 is turned on, and the camera switches from the shooting mode to the playback mode. In the present embodiment, it is assumed that an image is recorded on the medium 48 as a JPEG file 60.

S222では、モードボタン31の操作によりスライドショーモードを選択し、スライドショーを行うために必要な各種設定を行う。まずはメディア48に記録されている画像ファイルの中からスライドショーの対象画像ファイルを選択設定する。例えば記録されている全画像ファイルや撮影日付によって選択したり、画像ファイルを液晶モニタ14にサムネイル表示してその中から1枚ずつ選択したりする。他には再生表示時間等の設定も行う。   In S222, the slideshow mode is selected by operating the mode button 31, and various settings necessary for performing the slideshow are performed. First, a target image file for a slide show is selected and set from image files recorded on the medium 48. For example, all the recorded image files and shooting dates are selected, or the image files are displayed as thumbnails on the liquid crystal monitor 14 and selected one by one. In addition, the playback display time is set.

S223では、再生表示枚数maxに選択された画像ファイルのファイル数を代入する。S224では、合焦判定するための焦点ずれ量の閾値を入力する。ここではユーザーが10cmと設定したとする。S225では、スライドショーを行うための全ての設定が終了したら、スライドショーが開始される。   In step S223, the number of selected image files is substituted for the maximum number of displayed images for reproduction. In step S224, a defocus amount threshold value for determining focus is input. Here, it is assumed that the user sets 10 cm. In S225, when all settings for performing the slide show are completed, the slide show is started.

S226では、再生表示カウンタnに1を代入する。S227では、再生しようとする画像ファイルに対して、顔検知を行い画像内に顔が存在しているか否かを判定し、顔が存在していると認識された場合はS228へ進み、顔が存在していないと認識された場合はS229へ進む。   In S226, 1 is substituted into the reproduction display counter n. In S227, face detection is performed on the image file to be reproduced to determine whether a face exists in the image. If it is recognized that a face exists, the process proceeds to S228, where the face is detected. If it is recognized that it does not exist, the process proceeds to S229.

S228では、メモリコントローラ21により、顔と認識された領域における各フィールド毎の焦点ずれ量データ85aを読み出しSDRAM43に一時記録する。S229では、メモリコントローラ21により再生しようとするJPEGファイル60の0th IFD75に記録された撮影時の測距領域を読み出し、その領域における各フィールド毎の焦点ずれ量データ85aを読み出しSDRAM43に一時記録する。ここで測距領域とは、撮影レンズ3の合焦動作に用いた測距データが、撮像素子6の撮像面位相差AFを使用した場合は焦点ずれ量を求めたAF枠を示し、AFセンサ8を使用した場合はファインダー内に合焦表示した焦点検出点(測距点)のことを示す。   In S228, the memory controller 21 reads out the defocus amount data 85a for each field in the area recognized as the face and temporarily records it in the SDRAM 43. In S229, the distance measuring area at the time of shooting recorded in the 0th IFD 75 of the JPEG file 60 to be reproduced by the memory controller 21 is read, and the defocus amount data 85a for each field in the area is read and temporarily recorded in the SDRAM 43. Here, the distance measurement area indicates an AF frame in which the distance measurement data used for the focusing operation of the photographic lens 3 calculates the defocus amount when the imaging surface phase difference AF of the image sensor 6 is used. When 8 is used, it indicates a focus detection point (ranging point) displayed in focus in the viewfinder.

S230では、読み出した各フィールド毎の焦点ずれ量データ85aを設定した判定閾値と比較し、閾値未満の焦点ずれ量があれば画像は合焦していると判定しS231へ進む。また、閾値未満の焦点ずれ量がなければ画像は合焦していない(非合焦)と判定しS232へ進む。   In S230, the read defocus amount data 85a for each field is compared with the set determination threshold value. If there is a defocus amount less than the threshold value, it is determined that the image is in focus, and the process proceeds to S231. If there is no defocus amount less than the threshold, it is determined that the image is not in focus (out of focus), and the process proceeds to S232.

S231では、画像は焦点ずれ量が10cm以下の合焦画像と判定され、JPEGファイル60の画像圧縮データ69から主画像を読み出し、液晶モニタ14に再生表示する。S232では、画像ファイルを設定した所定時間再生表示したら、再生表示カウンタnを+1カウントアップする。   In S231, the image is determined to be an in-focus image with a defocus amount of 10 cm or less, and the main image is read from the compressed image data 69 of the JPEG file 60 and reproduced and displayed on the liquid crystal monitor 14. In S232, when the image file is reproduced and displayed for a predetermined time, the reproduction display counter n is incremented by +1.

S233では、再生表示カウンタnが再生表示枚数maxになったか否かの判定を行い、再生表示枚数maxになっていればS234へ進み、再生表示枚数maxになっていなければS227へ進み、引き続きスライドショーを行う。   In S233, it is determined whether or not the reproduction display counter n has reached the reproduction display number max. If it is the reproduction display number max, the process proceeds to S234, and if it is not the reproduction display number max, the process proceeds to S227 to continue the slide show. I do.

S234では、スライドショーを終了するか否かを液晶モニタ14に表示し、ユーザーが終了を選択した場合はスライドショーを終了し、終了を選択しない場合はS222へ進み新たなスライドショーの設定を行う。   In S234, whether or not to end the slide show is displayed on the liquid crystal monitor 14. If the user selects the end, the slide show ends, and if the end is not selected, the process proceeds to S222 to set a new slide show.

以上説明したように、本実施形態によれば、スライドショーによる画像再生表示時に画像ファイル内に記録されている撮影された瞬間の焦点ずれ量を利用して画像の合焦判定を行う。これにより、非合焦の画像をスキップして再生表示できるため、ユーザーにとって無駄な再生動作を省くことができる。   As described above, according to the present embodiment, the in-focus determination of the image is performed using the defocus amount at the moment of shooting that is recorded in the image file at the time of image reproduction display by the slide show. As a result, the out-of-focus image can be skipped and reproduced and displayed, so that unnecessary reproduction operations for the user can be omitted.

本実施形態においては、スライドショーを画像を撮影したデジタル一眼レフカメラで行なった。しかし、デジタルコンパクトカメラ、デジタルビデオカメラ等や、画像を表示可能な装置(例えばパソコン、メディアスロットと液晶モニタを有するプリンター等)に組み込まれた画像ファイル処理ソフトで行っても構わない。   In this embodiment, the slide show was performed with a digital single-lens reflex camera that captured images. However, image file processing software incorporated in a digital compact camera, digital video camera, or other device capable of displaying images (for example, a personal computer, a printer having a media slot and a liquid crystal monitor) may be used.

また合焦判定に用いた撮像面位相差AFデータは各フィールドにおける焦点ずれ量としたが、焦点ずれ量に限定するものではなく、撮影レンズ3の情報と焦点ずれ量から演算されるカメラから被写体までの距離等の測距データとしてもよい。またスライドショーにより画像再生表示する画像ファイルを前記の通りJPEGファイルとして説明しているが、RAWファイルとして各焦点検出用画素の生データを読み出し判定閾値と比較して合焦判定しても構わない。   The imaging plane phase difference AF data used for focusing determination is the amount of defocus in each field, but is not limited to the amount of defocus, and is not limited to the amount of defocus. Ranging data such as a distance up to may be used. Further, the image file to be reproduced and displayed by the slide show is described as a JPEG file as described above, but the focus determination may be performed by comparing the raw data of each focus detection pixel as a RAW file and comparing it with a determination threshold value.

更に合焦判定に用いる閾値をユーザーが設定可能としたことで、個々のユーザーにとってベストな合焦判定が実現できる。またスライドショーの再生表示時間が短くても対応できるように、合焦判定領域を顔検知領域やAF枠や測距点に対応した測距領域に限定することで、合焦判定に掛かる演算時間が短くできる。もちろん演算処理能力に余裕がある場合は撮像領域全体で合焦判定しても構わない。   Furthermore, since the user can set the threshold value used for the focus determination, the best focus determination for each user can be realized. In addition, by limiting the focus determination area to the face detection area, the AF frame, and the distance measurement area corresponding to the distance measurement point so that the playback display time of the slide show can be dealt with, the computation time required for the focus determination is reduced. Can be shortened. Of course, when there is a margin in the arithmetic processing capability, the in-focus determination may be performed on the entire imaging region.

(第3の実施形態)
以下、本発明の第3の実施形態を図面を参照しながら説明する。図13は不図示の画像処理装置(本実施形態においてはパソコンとパソコンに接続されたプリンターとする)の画像処理ソフトの基本動作を示すメインフローである。図14はパソコンのディスプレイ301に画像処理ソフト302を表示している状態を示している。ここでパソコンのメモリはSDRAM43と同一機能である。また同様にMPU20、メモリコントローラ21の機能はパソコンのCPUが行なう。
(Third embodiment)
Hereinafter, a third embodiment of the present invention will be described with reference to the drawings. FIG. 13 is a main flow showing the basic operation of image processing software of an image processing apparatus (not shown) (in this embodiment, a personal computer and a printer connected to the personal computer). FIG. 14 shows a state in which the image processing software 302 is displayed on the display 301 of the personal computer. Here, the memory of the personal computer has the same function as the SDRAM 43. Similarly, the functions of the MPU 20 and the memory controller 21 are performed by the CPU of the personal computer.

S351では、パソコンにインストールされた画像処理ソフト302を起動する。図14のディスプレイ301に画像処理ソフト302が表示される。S352では、パソコンのHDD内やパソコンのメディアスロットに挿入されたメディア48内に記録されているJPEGファイル60の1st IFD77からサムネイルデータを読み出し、図14のサムネイル画像304として一覧表示する。   In S351, the image processing software 302 installed in the personal computer is activated. Image processing software 302 is displayed on the display 301 of FIG. In S352, thumbnail data is read from the 1st IFD 77 of the JPEG file 60 recorded in the HDD of the personal computer or in the media 48 inserted in the media slot of the personal computer, and displayed as a list of thumbnail images 304 in FIG.

S353では、サムネイル画像304の中から各種処理を行いたい画像を選択する。例えばパソコンのマウスを操作して、ポインタ305を選択したいサムネイル画像304の上に移動し、ダブルクリックする。図14では、サムネイル画像304の左端(IMG_0001)が選択されている。   In S353, an image to be subjected to various processes is selected from the thumbnail images 304. For example, by operating the mouse of the personal computer, the pointer 305 is moved over the thumbnail image 304 to be selected and double-clicked. In FIG. 14, the left end (IMG_0001) of the thumbnail image 304 is selected.

S354では、選択されたJPEGファイル60の画像圧縮データ69から主画像303を読み出し、パソコンのディスプレイ301に再生表示する。S355では、選択されたJPEGファイル60の0th IFD75、Exif IFD76から画像付加情報を読み出し、付加情報領域307に表示する。   In S354, the main image 303 is read from the compressed image data 69 of the selected JPEG file 60, and is reproduced and displayed on the display 301 of the personal computer. In S355, the image additional information is read from the 0th IFD 75 and the Exif IFD 76 of the selected JPEG file 60 and displayed in the additional information area 307.

S356では、主画像303の上に測距枠306を表示する。測距枠306の位置およびサイズは、画像を撮影した際にレンズが合焦動作を行なうために使用したAF枠に従う。ここでは第1の実施形態の図3のライブビューモードで撮影されたとして、図3で設定されたAF枠の位置とサイズで表示している。またこのAF枠の情報は、画像付加情報に記録されている。   In S356, the distance measurement frame 306 is displayed on the main image 303. The position and size of the distance measurement frame 306 are in accordance with the AF frame used for the lens to perform a focusing operation when an image is taken. Here, assuming that the image was captured in the live view mode of FIG. 3 of the first embodiment, the position and size of the AF frame set in FIG. 3 are displayed. The information of the AF frame is recorded in the image additional information.

S357では、測距枠306内にある各フィールド毎の焦点ずれ量データ85aをJPEGファイル60から読み出し、メモリに一時記録する。S358では、読み出された焦点ずれ量データ85aに対してCPUにより所定の処理を行い、AF枠306内の焦点ずれ量308を演算する。   In S357, the defocus amount data 85a for each field in the distance measurement frame 306 is read from the JPEG file 60 and temporarily recorded in the memory. In S358, the CPU performs a predetermined process on the read defocus amount data 85a to calculate the defocus amount 308 in the AF frame 306.

S359では、演算された焦点ずれ量308を表示する。図14では、焦点ずれ量が“0mm”と表示されている。S360では、主画像303に対して各種画像処理を実施する。画像処理は画像処理メニューボタン309をオンすると不図示のメニュー画面が表示され、その中からユーザーの意図に合ったメニューを選択して実施する。   In S359, the calculated defocus amount 308 is displayed. In FIG. 14, the defocus amount is displayed as “0 mm”. In S360, various image processes are performed on the main image 303. When the image processing menu button 309 is turned on, a menu screen (not shown) is displayed for image processing, and a menu suitable for the user's intention is selected from the menu screen.

S361では、画像処理ソフト302のファイル印刷ボタン310の上にポインタ305を移動してダブルクリックし、ファイル印刷ボタン310をオンする。S362では、まずはメディア48に記録されている画像ファイルの中から印刷する画像ファイルを選択する。例えば記録されている全画像ファイルや撮影日付によって選択したり、サムネイル画像304の中から1枚ずつ選択したりする。   In S361, the pointer 305 is moved onto the file print button 310 of the image processing software 302 and double-clicked to turn on the file print button 310. In S362, first, an image file to be printed is selected from the image files recorded on the medium 48. For example, selection is made according to all recorded image files and shooting dates, or one thumbnail image 304 is selected at a time.

S363では、印刷枚数maxに選択された画像ファイルのファイル数を代入する。S364では、画像処理ソフト302の合焦判定閾値311の上にポインタ305を移動してダブルクリックし、パソコンのキーボードで合焦判定するための焦点ずれ量の閾値を入力する。ここではユーザーが10cmと設定したとする。   In S363, the number of selected image files is substituted for the maximum number of printed sheets. In step S364, the pointer 305 is moved over the focus determination threshold value 311 of the image processing software 302 and double-clicked, and a defocus amount threshold value for determining focus with a personal computer keyboard is input. Here, it is assumed that the user sets 10 cm.

S365では、印刷を行うための全ての設定が終了したら、印刷が開始される。S366では、印刷カウンタnに1を代入する。S367では、印刷しようとする画像ファイルに対して、顔検知を行い画像内に顔が存在しているか否かを判定し、顔が存在していると認識された場合はS368へ進み、顔が存在していないと認識された場合はS369へ進む。   In S365, printing is started when all the settings for printing are completed. In S366, 1 is substituted into the print counter n. In S367, face detection is performed on the image file to be printed to determine whether a face exists in the image. If it is recognized that a face exists, the process proceeds to S368, where the face is detected. If it is recognized that it does not exist, the process proceeds to S369.

S368では、CPUにより、顔と認識された領域における各フィールド毎の焦点ずれ量データ85aを読み出し、メモリに一時記録する。S369では、CPUにより印刷しようとするJPEGファイル60の0th IFD75に記録された撮影時の測距領域を読み出し、その領域における各フィールド毎の焦点ずれ量データ85aを読み出し、メモリに一時記録する。ここで測距領域とは、撮影レンズ3の合焦動作に用いた測距データが、撮像素子6の撮像面位相差AFを使用している場合は焦点ずれ量を求めたAF枠を示し、AFセンサ8を使用している場合はファインダー内に合焦表示した焦点検出点(測距点)のことを示す。   In S368, the CPU reads out the defocus amount data 85a for each field in the area recognized as the face and temporarily stores it in the memory. In S369, the distance measurement area at the time of shooting recorded in the 0th IFD 75 of the JPEG file 60 to be printed by the CPU is read, and the defocus amount data 85a for each field in the area is read and temporarily recorded in the memory. Here, the distance measurement area indicates an AF frame in which the amount of defocus is obtained when the distance measurement data used for the focusing operation of the photographing lens 3 uses the imaging surface phase difference AF of the image sensor 6. When the AF sensor 8 is used, it indicates a focus detection point (ranging point) displayed in focus in the viewfinder.

S370では、読み出した各フィールド毎の焦点ずれ量データ85aを、設定した判定閾値と比較し、閾値未満の焦点ずれ量があれば画像は合焦していると判定しS371へ進む。また、閾値未満の焦点ずれ量がなければ画像は合焦していない(非合焦)と判定しS372へ進む。   In S370, the read defocus amount data 85a for each field is compared with a set determination threshold value. If there is a defocus amount less than the threshold value, it is determined that the image is in focus, and the process proceeds to S371. If there is no defocus amount less than the threshold value, it is determined that the image is not in focus (out of focus), and the process proceeds to S372.

S371では、画像は焦点ずれ量が10cm以下の合焦画像と判定され、JPEGファイル60の画像圧縮データ69から主画像303を読み出し、接続されているプリンターにデータを転送し画像を印刷する。S372では、画像のデータ転送が終了したら、印刷カウンタnを+1カウントアップする。   In S371, the image is determined to be a focused image with a defocus amount of 10 cm or less, the main image 303 is read from the compressed image data 69 of the JPEG file 60, the data is transferred to a connected printer, and the image is printed. In S372, when the image data transfer is completed, the print counter n is incremented by one.

S373では、印刷カウンタnが印刷枚数maxになったか否かの判定を行い、印刷枚数maxになっていればS374へ進み、印刷枚数maxになっていなければS367へ進み、引き続き印刷を行う。   In S373, it is determined whether or not the print counter n has reached the maximum number of prints. If the print number max is reached, the process proceeds to S374, and if not, the process proceeds to S367 to continue printing.

S374では、S362で選択された印刷予定の画像ファイルの内、実際には何枚の画像が印刷され、何枚の画像が非合焦判定で印刷されなかったのか、結果をディスプレイ301に表示する。S375では、終了ボタン312が操作されたか否かを判定し、操作されれば画像処理ソフト302を終了し、操作されなければS352へ進み、引き続き別の画像処理を行なう。   In step S374, the display 301 displays the number of images actually printed out of the image file to be printed selected in step S362 and the number of images not printed due to out-of-focus determination. . In S375, it is determined whether or not the end button 312 has been operated. If operated, the image processing software 302 is terminated. If not operated, the process proceeds to S352, and another image process is continued.

以上説明したように、本実施形態によれば、画像印刷時に画像ファイル内に記録されている撮影された瞬間の焦点ずれ量を利用して画像の合焦判定を行うことにより、非合焦の画像をスキップして印刷できる。そのため、ユーザーにとって印刷の無駄を省くことができる。   As described above, according to the present embodiment, an in-focus state is determined by performing an in-focus determination using an instantaneous defocus amount recorded in an image file at the time of image printing. You can skip images and print. Therefore, it is possible to eliminate printing waste for the user.

本実施形態においては、印刷をパソコンとパソコンに接続されたプリンターおよびパソコンに組み込まれた画像処理ソフトで行なったが、画像を撮影したデジタル一眼レフカメラや、デジタルコンパクトカメラ、デジタルビデオカメラ等と接続されたプリンターでも構わないし、メディアスロットと液晶モニタを有するプリンターで行っても構わない。   In this embodiment, printing is performed by a personal computer, a printer connected to the personal computer, and image processing software incorporated in the personal computer, but it is connected to a digital single-lens reflex camera, a digital compact camera, a digital video camera, or the like that captured the image. It is also possible to use a printer having a media slot and a liquid crystal monitor.

また合焦判定に用いた撮像面位相差AFデータは各フィールドにおける焦点ずれ量としたが、焦点ずれ量に限定するものではなく、撮影レンズ3の情報と焦点ずれ量から演算されるカメラから被写体までの距離等の測距データとしてもよい。また画像印刷する画像ファイルをJPEGファイルとして説明しているが、RAWファイルとして各焦点検出用画素の生データを読み出し判定閾値と比較して合焦判定しても構わない。もしくは画像処理ソフトにより生データから各フィールドにおける焦点ずれ量を演算してから合焦判定しても構わない。   The imaging plane phase difference AF data used for focusing determination is the amount of defocus in each field, but is not limited to the amount of defocus, and is not limited to the amount of defocus. Ranging data such as a distance up to may be used. Further, although the image file to be printed is described as a JPEG file, the focus determination may be performed by comparing the raw data of each focus detection pixel as a RAW file with a read determination threshold value. Alternatively, the focus determination may be performed after calculating the defocus amount in each field from the raw data by image processing software.

更に合焦判定に用いる閾値をユーザーが設定可能としたことで、個々のユーザーにとってベストな合焦判定が実現できる。また合焦判定領域を顔検知領域やAF枠や測距点に対応した測距領域に限定することで、合焦判定に掛かる演算時間を短くし、印刷時間も短縮できる。もちろん演算処理能力に余裕がある場合は撮像領域全体で合焦判定しても構わない。   Furthermore, since the user can set the threshold value used for the focus determination, the best focus determination for each user can be realized. Further, by limiting the focus determination area to the face detection area, the AF frame, and the distance measurement area corresponding to the distance measurement point, the calculation time required for the focus determination can be shortened and the printing time can be shortened. Of course, when there is a margin in the arithmetic processing capability, the in-focus determination may be performed on the entire imaging region.

なお、上記の各実施形態に記載された構成要素の配置や数値等は例示的なものであり、本発明の範囲をそれらのみに限定する趣旨のものではない。   In addition, arrangement | positioning, a numerical value, etc. of the component described in each said embodiment are an illustration, and the thing which does not limit the scope of the present invention only to them.

(他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (8)

撮影レンズの射出瞳の全域を通る光を受光する複数の撮像用画素と、前記撮影レンズの射出瞳の一部の領域を通る光を受光する複数の焦点検出用画素とを有する撮像素子と、
前記撮像用画素から出力された信号に基づいて生成された画像データと、前記焦点検出用画素から出力された信号に基づいて生成された焦点検出情報とを記憶する記憶手段と、
前記記憶手段に記憶されている前記焦点検出情報に基づいて、前記記憶手段に記憶されている、前記焦点検出情報に対応する前記画像データの合焦状態を判定する判定手段と、
を備えることを特徴とする撮像装置。
An imaging device having a plurality of imaging pixels that receive light passing through the entire exit pupil of the photographing lens, and a plurality of focus detection pixels that receive light passing through a partial region of the exit pupil of the photographing lens;
Storage means for storing image data generated based on a signal output from the imaging pixel and focus detection information generated based on a signal output from the focus detection pixel;
Determination means for determining the in-focus state of the image data corresponding to the focus detection information stored in the storage means based on the focus detection information stored in the storage means;
An imaging apparatus comprising:
前記記憶手段に記憶されている前記画像データを表示装置に表示する場合に、前記判定手段により焦点が合っていないと判定された前記画像データについては、該画像データとともに、該画像データが焦点が合っていない画像データである旨を表示することを特徴とする請求項1に記載の撮像装置。   When the image data stored in the storage unit is displayed on a display device, the image data that is determined to be out of focus by the determination unit is focused on the image data together with the image data. The imaging apparatus according to claim 1, wherein the image data indicating that the image data does not match is displayed. 前記記憶手段に記憶されている前記画像データを表示装置に表示する場合に、前記判定手段により焦点が合っていないと判定された前記画像データについては、該画像データを前記表示装置に表示しないことを特徴とする請求項1に記載の撮像装置。   When the image data stored in the storage unit is displayed on a display device, the image data that is determined to be out of focus by the determination unit is not displayed on the display device. The imaging apparatus according to claim 1. 前記記憶手段に記憶されている前記画像データを印刷装置で印刷する場合に、前記判定手段により焦点が合っていないと判定された前記画像データについては、該画像データを前記印刷装置で印刷しないことを特徴とする請求項1ないし3のいずれか1項に記載の撮像装置。   When the image data stored in the storage means is printed by a printing apparatus, the image data that is determined to be out of focus by the determination means is not printed by the printing apparatus. The imaging device according to any one of claims 1 to 3, wherein 前記判定手段は、前記記憶手段に記憶されている前記焦点検出情報に基づく焦点ずれ量が予め設定した閾値を超えている場合に、前記画像データが焦点が合っていないと判定することを特徴とする請求項1ないし4のいずれか1項に記載の撮像装置。   The determination unit determines that the image data is out of focus when a defocus amount based on the focus detection information stored in the storage unit exceeds a preset threshold value. The imaging device according to any one of claims 1 to 4. 前記閾値をユーザが設定可能であることを特徴とする請求項5に記載の撮像装置。   The imaging apparatus according to claim 5, wherein the threshold value can be set by a user. 撮影レンズの射出瞳の全域を通る光を受光する複数の撮像用画素と、前記撮影レンズの射出瞳の一部の領域を通る光を受光する複数の焦点検出用画素とを有する撮像素子を備える撮像装置を制御する方法であって、
前記撮像用画素から出力された信号に基づいて生成された画像データと、前記焦点検出用画素から出力された信号に基づいて生成された焦点検出情報とを記憶手段に記憶する記憶工程と、
前記記憶手段に記憶されている前記焦点検出情報に基づいて、前記記憶手段に記憶されている、前記焦点検出情報に対応する前記画像データの合焦状態を判定する判定工程と、
を備えることを特徴とする撮像装置の制御方法。
An imaging device having a plurality of imaging pixels that receive light passing through the entire exit pupil of the photographic lens and a plurality of focus detection pixels that receive light passing through a partial area of the exit pupil of the photographic lens. A method for controlling an imaging device, comprising:
A storage step of storing, in a storage unit, image data generated based on the signal output from the imaging pixel and focus detection information generated based on the signal output from the focus detection pixel;
A determination step of determining an in-focus state of the image data corresponding to the focus detection information stored in the storage unit based on the focus detection information stored in the storage unit;
An image pickup apparatus control method comprising:
請求項7に記載の制御方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the control method according to claim 7.
JP2009280956A 2009-12-10 2009-12-10 Imaging apparatus, control method thereof, and program Active JP5576644B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009280956A JP5576644B2 (en) 2009-12-10 2009-12-10 Imaging apparatus, control method thereof, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009280956A JP5576644B2 (en) 2009-12-10 2009-12-10 Imaging apparatus, control method thereof, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2014139155A Division JP6014631B2 (en) 2014-07-04 2014-07-04 Imaging apparatus, control method thereof, and program

Publications (2)

Publication Number Publication Date
JP2011124806A true JP2011124806A (en) 2011-06-23
JP5576644B2 JP5576644B2 (en) 2014-08-20

Family

ID=44288263

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009280956A Active JP5576644B2 (en) 2009-12-10 2009-12-10 Imaging apparatus, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP5576644B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013015559A (en) * 2011-06-30 2013-01-24 Nikon Corp Focus detector and imaging apparatus
WO2015040935A1 (en) * 2013-09-17 2015-03-26 オリンパス株式会社 Imaging device, imaging method, and image display program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010179A (en) * 2000-06-19 2002-01-11 Olympus Optical Co Ltd Print image selector, photograph printer with automatic selecting function and automatic selecting print system as well as storage medium
JP2003298907A (en) * 2002-04-03 2003-10-17 Fuji Photo Film Co Ltd Digital camera and image display apparatus
JP2003304492A (en) * 2002-02-08 2003-10-24 Canon Inc Image processing device
JP2004289214A (en) * 2003-03-19 2004-10-14 Minolta Co Ltd Imaging apparatus
JP2008187524A (en) * 2007-01-30 2008-08-14 Fujifilm Corp Image taking device and control method for image taking
JP2009027401A (en) * 2007-07-19 2009-02-05 Ricoh Co Ltd Electronic imaging apparatus
JP2009105681A (en) * 2007-10-23 2009-05-14 Canon Inc Image processing apparatus and image processing program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010179A (en) * 2000-06-19 2002-01-11 Olympus Optical Co Ltd Print image selector, photograph printer with automatic selecting function and automatic selecting print system as well as storage medium
JP2003304492A (en) * 2002-02-08 2003-10-24 Canon Inc Image processing device
JP2003298907A (en) * 2002-04-03 2003-10-17 Fuji Photo Film Co Ltd Digital camera and image display apparatus
JP2004289214A (en) * 2003-03-19 2004-10-14 Minolta Co Ltd Imaging apparatus
JP2008187524A (en) * 2007-01-30 2008-08-14 Fujifilm Corp Image taking device and control method for image taking
JP2009027401A (en) * 2007-07-19 2009-02-05 Ricoh Co Ltd Electronic imaging apparatus
JP2009105681A (en) * 2007-10-23 2009-05-14 Canon Inc Image processing apparatus and image processing program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013015559A (en) * 2011-06-30 2013-01-24 Nikon Corp Focus detector and imaging apparatus
WO2015040935A1 (en) * 2013-09-17 2015-03-26 オリンパス株式会社 Imaging device, imaging method, and image display program
JP2015059998A (en) * 2013-09-17 2015-03-30 オリンパス株式会社 Photographing apparatus and imaging method
US9756235B2 (en) 2013-09-17 2017-09-05 Olympus Corporation Photographing apparatus, photographing method and recording medium on which photographing/display program is recorded
US10367990B2 (en) 2013-09-17 2019-07-30 Olympus Corporation Photographing apparatus, photographing method and recording medium on which photographing/display program is recorded

Also Published As

Publication number Publication date
JP5576644B2 (en) 2014-08-20

Similar Documents

Publication Publication Date Title
JP5543098B2 (en) Imaging device
US8670064B2 (en) Image capturing apparatus and control method therefor
TW200904156A (en) Imaging device and image processing method
JP2001281529A (en) Digital camera
JP2007232793A (en) Imaging apparatus
KR20070086061A (en) Image processing and image processing program of image processing
JP5932210B2 (en) Imaging apparatus and focus adjustment method
JP2011135191A (en) Imaging apparatus and image processor
JP2009048136A (en) Focusing device and focusing method
JP5576644B2 (en) Imaging apparatus, control method thereof, and program
JP5982040B2 (en) Imaging apparatus and control method thereof
JP2009272799A (en) Imaging device and program
JP2011191340A (en) Imaging apparatus
JP6014631B2 (en) Imaging apparatus, control method thereof, and program
JP4393177B2 (en) Imaging apparatus and imaging method
JP2011130256A (en) Imaging apparatus
JP5845313B2 (en) Information processing apparatus and control method thereof
JP5773659B2 (en) Imaging apparatus and control method
JP2008011244A (en) Imaging apparatus, its control method, and program
JP2007271809A (en) Imaging apparatus and imaging method
JP2017034344A (en) Imaging apparatus and control method therefor
TW202402042A (en) Imaging apparatus, imaging control method and program
JP2006171144A (en) Auxiliary light device for focus detection of camera
JP5470873B2 (en) camera
JP2007034175A (en) Imaging apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130924

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130927

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140422

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140704

R151 Written notification of patent or utility model registration

Ref document number: 5576644

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151