JP2016038428A - Focus detection device and method, and program as well as imaging device - Google Patents

Focus detection device and method, and program as well as imaging device Download PDF

Info

Publication number
JP2016038428A
JP2016038428A JP2014160264A JP2014160264A JP2016038428A JP 2016038428 A JP2016038428 A JP 2016038428A JP 2014160264 A JP2014160264 A JP 2014160264A JP 2014160264 A JP2014160264 A JP 2014160264A JP 2016038428 A JP2016038428 A JP 2016038428A
Authority
JP
Japan
Prior art keywords
focus detection
image signals
pair
correlation
calculated
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.)
Pending
Application number
JP2014160264A
Other languages
Japanese (ja)
Inventor
瓦田 昌大
Masahiro Kawarada
昌大 瓦田
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 JP2014160264A priority Critical patent/JP2016038428A/en
Publication of JP2016038428A publication Critical patent/JP2016038428A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a focus detection device that appropriately amplifies a signal in accordance with a focus detection condition when performing the focus detection on the basis of a phase difference between a pair of image signals obtained from an image pick-up element, and performs a highly accurate focus detection.SOLUTION: A digital camera is configured to calculate an amount of defocus relative to an in-focus position on the basis of a phase difference obtained from an amount of correlation calculated by first calculation means when it is determined that a mode is an operation mode with a heavy processing load. On the other hand, when it is determined that the mode is an operation mode with a light processing load, the digital camera is configured to calculate an amount of defocus relative to the in-focus position on the basis of a phase difference obtained from an amount of correlation calculated by second calculation means. Then, a focus detection is performed based on the calculated amounts of defocus.SELECTED DRAWING: Figure 10

Description

本発明は、焦点検出装置及び方法、並びにプログラム、撮像装置に関し、特に、焦点検出装置及び方法、並びにプログラム、撮像装置に関し、特に、撮像装置における焦点検出装置および自動焦点検出技術に関する。   The present invention relates to a focus detection apparatus and method, a program, and an imaging apparatus, and more particularly to a focus detection apparatus and method, a program, and an imaging apparatus, and more particularly, to a focus detection apparatus and an automatic focus detection technique in the imaging apparatus.

従来、被写体像の光束を射出瞳面で分割して、それぞれを1対のラインセンサの各々に結像させ、ラインセンサで光電変換された各像信号の位相差に基づいて焦点検出を行う位相差検出方式の焦点検出装置が提案されている。例えば、特許文献1では、1対のラインセンサから得られる1対の像信号について、一方の像信号に対して他方の像信号を所定量ずつシフトさせたときのシフト量ごとの相関量を演算して記憶する。そして、記憶されている複数の相関量を対応するシフト量ごとに加算して加算相関量を求め、その加算相関量を用いて焦点検出を行うことを特徴とする。   Conventionally, the luminous flux of an object image is divided on the exit pupil plane, and each is formed on each of a pair of line sensors, and focus detection is performed based on the phase difference of each image signal photoelectrically converted by the line sensor. Phase detection type focus detection devices have been proposed. For example, in Patent Document 1, for a pair of image signals obtained from a pair of line sensors, a correlation amount is calculated for each shift amount when the other image signal is shifted by a predetermined amount with respect to one image signal. And remember. A plurality of stored correlation amounts are added for each corresponding shift amount to obtain an added correlation amount, and focus detection is performed using the added correlation amount.

また、撮像素子の一部の画素に焦点検出用の画素を離散的に設けて、被写体像の光束を射出瞳面で分割した光束を、それぞれ対応する1対の焦点検出用の画素に結像させ、上述した位相差検出方式で焦点検出を行う撮像装置が提案されている。   Also, focus detection pixels are discretely provided on some pixels of the image sensor, and light beams obtained by dividing the light beam of the subject image on the exit pupil plane are formed on a corresponding pair of focus detection pixels, respectively. In addition, an imaging apparatus that performs focus detection using the above-described phase difference detection method has been proposed.

また、特許文献2では、離散的に焦点検出用画素が配置された複数対の焦点検出用の画素列を備え、焦点検出用の画素列が並ぶ方向と直交する方向に、別の1対の焦点検出用の画素列が隣接して配置される撮像素子が提案されている。このような撮像素子において、被写体像に含まれるノイズが大きいと判定した場合は、隣接する同種類の像信号を近い配置の画素同士が加算されるよう画素単位で加算し、加算した像信号の位相差に基づいて焦点検出を行う。被写体像に含まれるノイズが大きくないと判定した場合は、1対の焦点検出用の画素列ごとに独立して算出された各位相差を平均して、その平均位相差に基づいて焦点検出を行うことを特徴とする。   Further, in Patent Document 2, a plurality of pairs of focus detection pixel rows in which focus detection pixels are discretely arranged are provided, and another pair of focus detection pixel rows is arranged in a direction perpendicular to the direction in which the focus detection pixel rows are arranged. There has been proposed an image sensor in which pixel rows for focus detection are arranged adjacent to each other. In such an image sensor, when it is determined that the noise included in the subject image is large, adjacent image signals of the same type are added in units of pixels so that pixels in a close arrangement are added, and the added image signal Focus detection is performed based on the phase difference. When it is determined that the noise included in the subject image is not large, the phase differences calculated independently for each pair of focus detection pixel columns are averaged, and focus detection is performed based on the average phase difference. It is characterized by that.

特許文献2と同様、撮像素子の一部に焦点検出用画素を設けて、複数のフレームにおける1対の焦点検出用の画素列を同一画素同士で加算した加算画素列を生成し、1対の加算画素列の位相差に基づいて焦点検出を行う撮像装置が提案されている(特許文献3参照)。   Similarly to Patent Document 2, a focus detection pixel is provided in a part of an image sensor, and a pair of focus detection pixel columns in a plurality of frames is added together to generate an addition pixel column. An imaging apparatus that performs focus detection based on the phase difference of the added pixel columns has been proposed (see Patent Document 3).

特許第4888084号明細書Japanese Patent No. 4888084 特許第5202289号明細書Japanese Patent No. 5202289 特開2012−220925号公報JP 2012-220925 A

しかしながら、上記特許文献1のように、複数の相関量を対応するシフト量ごとに加算して加算相関量を求め、その加算相関量を用いて焦点検出を行う場合、条件によっては不具合が生じるおそれがある。例えば、元の1対のラインセンサにおける像信号にノイズが多く混入していると、ノイズの影響による疑似相関が表れてしまうため、疑似相関の結果を複数加算しても、正しい相関結果を得ることができない。   However, as in Patent Document 1, when a plurality of correlation amounts are added for each corresponding shift amount to obtain an addition correlation amount, and focus detection is performed using the addition correlation amount, a problem may occur depending on conditions. There is. For example, if a large amount of noise is mixed in the image signal of the original pair of line sensors, a pseudo correlation due to the influence of noise appears, so that even if a plurality of pseudo correlation results are added, a correct correlation result is obtained. I can't.

また、上記特許文献3のように、複数のフレームにおける1対の焦点検出用の画素列を同一画素同士で加算して、その加算された1対の画素列の位相差に基づいて焦点検出を行う場合も、条件によっては不具合が生じるおそれがある。例えば、被写体あるいは撮像装置が動いてしまい、被写体像の輪郭がフレーム毎に異なる場合、同一画素同士で加算しても、輪郭を示す被写体像の信号が増幅されず、かえって加算することで輪郭が滲んだような信号が得られる。この場合、相関演算で求められる位相差にばらつき誤差が乗りやすくなり、結果として焦点検出精度が劣化してしまう。   Further, as in Patent Document 3, a pair of focus detection pixel rows in a plurality of frames are added together by the same pixel, and focus detection is performed based on the phase difference of the added pair of pixel rows. Even if it is carried out, there is a risk of malfunction depending on conditions. For example, if the subject or the imaging device moves and the contour of the subject image differs from frame to frame, even if the same pixels are added together, the signal of the subject image indicating the contour is not amplified. A blurred signal is obtained. In this case, a variation error is easily applied to the phase difference obtained by the correlation calculation, and as a result, the focus detection accuracy is deteriorated.

そこで、本発明の目的は、撮像素子から得られた1対の像信号の位相差に基づいて焦点検出を行う際に、焦点検出条件に応じて適切に信号増幅を行って高精度な焦点検出を行うことができる技術を提供することにある。   Accordingly, an object of the present invention is to perform high-precision focus detection by appropriately performing signal amplification according to focus detection conditions when performing focus detection based on the phase difference between a pair of image signals obtained from an image sensor. It is to provide a technology capable of performing the above.

上記目的を達成するために、本発明の焦点検出装置は、複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、前記1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出手段と、前記1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出手段と、動作モードを判定する判定手段と、前記判定手段により処理負荷の重い動作モードと判定された場合には、前記第1の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定手段により処理負荷の軽い動作モードと判定された場合には、前記第2の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出手段と、前記デフォーカス量検出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする。   In order to achieve the above object, a focus detection apparatus according to the present invention has a plurality of focus detection pixel arrays that are paired with each other in a part of a plurality of pixels, and a pair of images from a pair of focus detection pixel arrays. An imaging unit that outputs a signal, a first calculation unit that calculates a correlation amount by performing a correlation operation from the pair of image signals, and adds the calculated correlation amount, and the pair of image signals, A second calculation unit that adds image signals between corresponding pixels, calculates a correlation amount by performing a correlation operation from the added image signals, a determination unit that determines an operation mode, and a processing load is heavy due to the determination unit When the operation mode is determined, the defocus amount to the in-focus position is calculated based on the phase difference obtained from the correlation amount calculated by the first calculation unit, and the processing load is light by the determination unit. When the operation mode is determined, the second calculation is performed. A defocus amount detecting means for calculating a defocus amount to the in-focus position based on a phase difference obtained from the correlation amount calculated by the means, and a focus based on the defocus amount calculated by the defocus amount detecting means. Focus detection means for performing detection is provided.

本発明によれば、撮像素子から得られた1対の像信号の位相差に基づいて焦点検出を行う際に、焦点検出条件に応じて適切に信号増幅を行って高精度な焦点検出を行うことができる。   According to the present invention, when focus detection is performed based on a phase difference between a pair of image signals obtained from an image sensor, high-precision focus detection is performed by appropriately performing signal amplification in accordance with focus detection conditions. be able to.

本発明の第1の実施形態に係る撮像装置の一例であるデジタルカメラの概略構成を示す図である。1 is a diagram illustrating a schematic configuration of a digital camera that is an example of an imaging apparatus according to a first embodiment of the present invention. 図1における撮像部の画素面の態様を示す模式図である。It is a schematic diagram which shows the aspect of the pixel surface of the imaging part in FIG. 図2における第1の焦点検出画素S1の構造を示す図である。It is a figure which shows the structure of 1st focus detection pixel S1 in FIG. 図2における第2の焦点検出画素S2の構造を示す図である。It is a figure which shows the structure of 2nd focus detection pixel S2 in FIG. ピントが合ったときの第1の焦点検出画素S1と第2の焦点検出画素S2の像信号の位相差を示す図である。It is a figure which shows the phase difference of the image signal of 1st focus detection pixel S1 and 2nd focus detection pixel S2 when it was focused. ピントが合う前の第1の焦点検出画素S1と第2の焦点検出画素S2の像信号の位相差を示す図である。It is a figure which shows the phase difference of the image signal of 1st focus detection pixel S1 and 2nd focus detection pixel S2 before focusing. 一対のラインセンサにおける被写体像の位相差とレンズの焦点位置のデフォーカス量との関係を示す図である。It is a figure which shows the relationship between the phase difference of the to-be-photographed image in a pair of line sensor, and the defocus amount of the focus position of a lens. デフォーカス量が小さいときのラインセンサに投影される被写体像を表した模式図である。It is a schematic diagram showing a subject image projected on a line sensor when a defocus amount is small. デフォーカス量が大きいときのラインセンサに投影される被写体像を表した模式図である。It is a schematic diagram showing a subject image projected on a line sensor when a defocus amount is large. 本発明の第1の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。3 is a flowchart showing a flow of AF operation of the digital camera in the first embodiment of the present invention. 本発明の第2の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 2nd Embodiment of this invention. 本発明の第3の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 3rd Embodiment of this invention. 本発明の第4の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 4th Embodiment of this invention. 本発明の第5の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 5th Embodiment of this invention. 本発明の第6の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 6th Embodiment of this invention. 本発明の第7の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 7th Embodiment of this invention. 本発明の第8の実施形態に係る撮像装置の概略構成を示す図である。It is a figure which shows schematic structure of the imaging device which concerns on the 8th Embodiment of this invention. 本発明の第8の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 8th Embodiment of this invention. 本発明の第9の実施形態に係る撮像装置の概略構成を示す図である。It is a figure which shows schematic structure of the imaging device which concerns on the 9th Embodiment of this invention. 焦点検出センサの詳細を示す図である。It is a figure which shows the detail of a focus detection sensor. 本発明の第9の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 9th Embodiment of this invention. 本発明の第10の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。It is a flowchart which shows the flow of AF operation | movement of the digital camera in the 10th Embodiment of this invention.

以下、本発明の実施の形態を図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

[第1の実施形態]
図1は、本発明の第1の実施形態に係る撮像装置の一例であるデジタルカメラの概略構成を示す図である。
[First Embodiment]
FIG. 1 is a diagram illustrating a schematic configuration of a digital camera which is an example of an imaging apparatus according to the first embodiment of the present invention.

図1において、デジタルカメラは、レンズ部100とカメラ部200からなる。レンズ部100は、不図示のマウント部のレンズ装着機構を介してカメラ部200に着脱可能に取り付けられている。マウント部には、電気接点ユニット108が設けられている。この電気接点ユニット108には、通信クロックライン、データ転送ライン、データ受信ラインなどからなる通信バスライン用の端子がある。これらにより、レンズ部100とカメラ部200が通信可能になっている。   In FIG. 1, the digital camera includes a lens unit 100 and a camera unit 200. The lens unit 100 is detachably attached to the camera unit 200 via a lens mounting mechanism of a mount unit (not shown). An electrical contact unit 108 is provided on the mount portion. The electrical contact unit 108 has a communication bus line terminal including a communication clock line, a data transfer line, a data reception line, and the like. As a result, the lens unit 100 and the camera unit 200 can communicate with each other.

レンズ部100には、撮像光学系を構成し、フォーカスやズームを行うレンズ群101、入射光線を制御する絞り102が設けられている。また、レンズ群101のズームやフォーカスを行うためのステッピングモータからなる駆動系、及び駆動系を制御するレンズ駆動ユニット103が設けられている。レンズ駆動ユニット103などは焦点制御手段を構成する。   The lens unit 100 includes an imaging optical system, a lens group 101 that performs focusing and zooming, and a diaphragm 102 that controls incident light. In addition, a driving system including a stepping motor for performing zooming and focusing of the lens group 101 and a lens driving unit 103 for controlling the driving system are provided. The lens driving unit 103 and the like constitute a focus control unit.

また、レンズ部100には、絞り102の開口を制御する絞り制御ユニット104と、レンズ群101のズーム、フォーカス、絞りの各種光学設計値が記録された光学情報記録部106が設けられている。   In addition, the lens unit 100 includes an aperture control unit 104 that controls the aperture of the aperture 102 and an optical information recording unit 106 that records various optical design values of the zoom, focus, and aperture of the lens group 101.

レンズ駆動ユニット103、絞り制御ユニット104、および光学情報記録部106は、レンズ部100全体の動作を制御するCPUからなるレンズコントローラ105に接続されている。   The lens driving unit 103, the aperture control unit 104, and the optical information recording unit 106 are connected to a lens controller 105 that includes a CPU that controls the operation of the entire lens unit 100.

また、レンズ部100には、レンズ駆動ユニット103に内包されたステッピングモータの位相波形を、レンズ駆動ユニット103からレンズコントローラ105を通じて取得してレンズの位置情報を検出するレンズ位置検出部107が設けられている。   In addition, the lens unit 100 is provided with a lens position detection unit 107 that acquires the phase waveform of the stepping motor included in the lens driving unit 103 from the lens driving unit 103 through the lens controller 105 and detects lens position information. ing.

カメラ部200は、レンズ部100と電気接点ユニット108を介して通信を行い、レンズ群101のズームやフォーカス、絞り102の開口について制御要求を送信し、制御結果を受信する。   The camera unit 200 communicates with the lens unit 100 via the electrical contact unit 108, transmits a control request for the zoom and focus of the lens group 101, and the aperture of the diaphragm 102, and receives a control result.

入射光線は、レンズ群101及び絞り102を介して、カメラ部200内における不図示の光電変換素子及び現像演算を行うプロセッサからなる撮像部213へ導かれる。撮像部213では、入射した被写体像を光電変換して現像演算することで撮像データが得られる。   The incident light is guided through the lens group 101 and the diaphragm 102 to an imaging unit 213 that includes a photoelectric conversion element (not shown) in the camera unit 200 and a processor that performs a development operation. In the imaging unit 213, imaging data is obtained by photoelectrically converting an incident subject image and performing development calculation.

また、カメラ部200には、カメラ部200へ操作入力を行うための操作スイッチ214が設けられている。操作スイッチ214は、2段ストロークタイプのスイッチで構成されている。1段目のスイッチ(SW1)は、撮像信号を用いた測光や焦点検出など撮影準備動作を開始させるためのスイッチである。2段目のスイッチ(SW2)は、静止画を取得するため、撮像部213で電荷蓄積及び電荷読み出しといった撮影動作を開始させるためのスイッチである。   In addition, the camera unit 200 is provided with an operation switch 214 for performing an operation input to the camera unit 200. The operation switch 214 is a two-stage stroke type switch. The first-stage switch (SW1) is a switch for starting a shooting preparation operation such as photometry or focus detection using an imaging signal. The second-stage switch (SW2) is a switch for starting an imaging operation such as charge accumulation and charge reading in the imaging unit 213 in order to acquire a still image.

撮像部213は、1対の焦点検出用画素列を複数有する撮像素子である。1対の焦点検出用画素列から光電変換して得られた1対の像信号は、カメラコントローラ215と接続されているメモリ216に一時記憶される。メモリ216に一時記憶された1対の被写体像の像信号は、カメラコントローラ215と接続されている画素加算部217へ送られる。   The imaging unit 213 is an imaging device having a plurality of pairs of focus detection pixel columns. A pair of image signals obtained by photoelectric conversion from a pair of focus detection pixel arrays is temporarily stored in a memory 216 connected to the camera controller 215. The image signals of the pair of subject images temporarily stored in the memory 216 are sent to the pixel addition unit 217 connected to the camera controller 215.

画素加算部217は、1対の焦点検出用画素列から得られた1対の像信号に対して、位置的に対応する画素から得られた像信号を、加算カウンタ218でカウントされた回数が所定回数に達するまで加算する。加算された1対の像信号は、カメラコントローラ215と接続されている相関演算部219へ送られ、相関演算により像シフト量ごとの相関量が算出される。算出された相関量は、カメラコントローラ215と接続されている相関量加算部220で、加算カウンタ218で回数をカウントしながら、所定回数だけ加算される。加算された相関量は、位相差検出部221で最も相関量が高くなる位相差が算出される。   The pixel addition unit 217 counts the number of times that the addition counter 218 counts an image signal obtained from a positionally corresponding pixel with respect to a pair of image signals obtained from a pair of focus detection pixel rows. Add until the predetermined number of times is reached. The added pair of image signals is sent to a correlation calculation unit 219 connected to the camera controller 215, and a correlation amount for each image shift amount is calculated by the correlation calculation. The calculated correlation amount is added a predetermined number of times while the correlation amount adding unit 220 connected to the camera controller 215 counts the number of times by the addition counter 218. As the added correlation amount, the phase difference at which the correlation amount becomes the highest in the phase difference detection unit 221 is calculated.

デフォーカス量検出部222は、位相差検出部221で算出された位相差とレンズ部100の光学特性に基づいて、公知の位相差検出方式によりデフォーカス量を算出する。算出されたデフォーカス量は、デフォーカス量加算部223へ送られ、加算カウンタ218で回数をカウントしながら、所定回数だけ加算される。   The defocus amount detection unit 222 calculates the defocus amount by a known phase difference detection method based on the phase difference calculated by the phase difference detection unit 221 and the optical characteristics of the lens unit 100. The calculated defocus amount is sent to the defocus amount adding unit 223, and is added a predetermined number of times while the addition counter 218 counts the number of times.

カメラコントローラ215は、電気接点ユニット108を介してレンズコントローラ105と制御情報を送受信し、デフォーカス量検出部222あるいはデフォーカス量加算部223で算出されたデフォーカス量に基づいて、レンズ群101の焦点位置を制御する。   The camera controller 215 transmits / receives control information to / from the lens controller 105 via the electrical contact unit 108, and based on the defocus amount calculated by the defocus amount detection unit 222 or the defocus amount addition unit 223, Control the focal position.

本実施形態におけるデジタルカメラは、撮像部213で撮像された被写体像や各種の操作状況を表示する表示部224と、撮像部213の動作を後述する2つの動作モード、ライブビューモードあるいは動画記録モードに切り替えるための操作部225を備える。また、デジタルカメラでは、電源投入とともにライブビューモードが自動で設定され、撮像部213で撮像を開始して、撮像した被写体像が現像演算されて表示部224で表示される。撮像部213で撮像された静止画や動画は、所定のデータフォーマットで記録部226に記録される。   The digital camera according to the present embodiment includes a display unit 224 that displays a subject image captured by the imaging unit 213 and various operation situations, and two operation modes, a live view mode or a moving image recording mode, which will be described later. An operation unit 225 for switching to is provided. Further, in the digital camera, the live view mode is automatically set when the power is turned on, the imaging unit 213 starts imaging, the captured subject image is developed and displayed on the display unit 224. Still images and moving images captured by the imaging unit 213 are recorded in the recording unit 226 in a predetermined data format.

次に、撮像部213における画素の配置について説明する。   Next, the arrangement of pixels in the imaging unit 213 will be described.

撮像部213は、記録表示のための被写体像を得る撮像画素と、後述する位相差検出方式の焦点検出を行うための焦点検出画素とを備える。撮像画素と焦点検出画素が配置された撮像部213の態様を図2に示す。   The imaging unit 213 includes imaging pixels for obtaining a subject image for recording display and focus detection pixels for performing focus detection by a phase difference detection method described later. FIG. 2 shows an aspect of the imaging unit 213 in which the imaging pixels and the focus detection pixels are arranged.

図2において、R,G,Bはそれぞれ赤フィルタ、緑フィルタ、青フィルタが配置された通常の撮像画素である。また、S1,S2は第1および第2の焦点検出画素であり、撮像画素とは光学特性が異なる。第1および第2の焦点検出画素(S1,S2)は、それぞれ離散的な1ラインで対をなしており、そのラインの対を単位にして焦点検出エリアが構成される。第1および第2の焦点検出画素(S1,S2)の対が上下に2つ配置されており、それぞれ第1の焦点検出エリアおよび第2の焦点検出エリアを構成する。   In FIG. 2, R, G, and B are normal imaging pixels in which a red filter, a green filter, and a blue filter are arranged, respectively. S1 and S2 are first and second focus detection pixels, which have optical characteristics different from those of the imaging pixels. Each of the first and second focus detection pixels (S1, S2) is paired with one discrete line, and a focus detection area is configured with the pair of lines as a unit. Two pairs of the first and second focus detection pixels (S1, S2) are arranged in the vertical direction, and constitute a first focus detection area and a second focus detection area, respectively.

図2に示すように、焦点検出画素は撮像部213に離散的に一列に並んでおり、第1の焦点検出画素S1の列と第2の焦点検出画素S2の列が対をなすように近接して配置される。   As shown in FIG. 2, the focus detection pixels are discretely arranged in a line in the imaging unit 213, and are close to each other so that the first focus detection pixel S1 and the second focus detection pixel S2 form a pair. Arranged.

図3は、図2における第1の焦点検出画素S1の構造を示す図である。   FIG. 3 is a diagram showing the structure of the first focus detection pixel S1 in FIG.

図3において、第1の焦点検出画素S1の光入射側には、マイクロレンズ301が形成されている。302は、マイクロレンズ301を形成するための平面を構成する平滑層である。303は遮光層であり、第1の焦点検出画素S1の光電変換領域304の中心0に対して一方向に偏心した絞り開口部を有する。   In FIG. 3, a microlens 301 is formed on the light incident side of the first focus detection pixel S1. Reference numeral 302 denotes a smooth layer constituting a plane for forming the microlens 301. Reference numeral 303 denotes a light shielding layer, which has a diaphragm aperture that is eccentric in one direction with respect to the center 0 of the photoelectric conversion region 304 of the first focus detection pixel S1.

図4は、図2における第2の焦点検出画素S2の構造を示す図である。   FIG. 4 is a diagram showing the structure of the second focus detection pixel S2 in FIG.

図4において、第2の焦点検出画素S2の光入射側には、マイクロレンズ401が形成されている。402は、マイクロレンズ401を形成するための平面を構成する平滑層である。403は遮光層であり、第2の焦点検出画素S2の光電変換領域404の中心0に対して、第1の焦点検出画素S1とは反対方向に偏心した絞り開口部を有する。   In FIG. 4, a microlens 401 is formed on the light incident side of the second focus detection pixel S2. Reference numeral 402 denotes a smooth layer constituting a plane for forming the microlens 401. Reference numeral 403 denotes a light shielding layer, which has an aperture opening that is decentered in the opposite direction to the first focus detection pixel S1 with respect to the center 0 of the photoelectric conversion region 404 of the second focus detection pixel S2.

図3および図4に示す構成によれば、撮像光学系を第1の焦点検出画素S1から見た場合と第2の焦点検出画素S2から見た場合とで、撮像光学系の瞳が対称に分割されたことと等価になる。   3 and 4, the pupil of the imaging optical system is symmetrical when the imaging optical system is viewed from the first focus detection pixel S1 and when viewed from the second focus detection pixel S2. Equivalent to being divided.

図2において、第1の焦点検出画素S1および第2の焦点検出画素S2を含む行には、撮像素子の画素数が多くなるにつれて近似した2像が形成されるようになる。撮像光学系が被写体に対してピントが合っている状態では、第1の焦点検出画素S1で形成される一列の像信号と、第2の焦点検出画素S2で形成される一列の像信号は互いに一致する。これに対して、撮像光学系のピントがずれているならば、第1の焦点検出画素S1で形成される一列の像信号と、第2の焦点検出画素S2で形成される一列の像信号には、位相差が生じる。そして、その位相差の方向は前ピン状態と後ピン状態とで逆になる。   In FIG. 2, two approximate images are formed in the row including the first focus detection pixel S1 and the second focus detection pixel S2 as the number of pixels of the image sensor increases. In a state where the imaging optical system is in focus with respect to the subject, the row of image signals formed by the first focus detection pixel S1 and the row of image signals formed by the second focus detection pixel S2 are mutually Match. On the other hand, if the imaging optical system is out of focus, the image signal of one row formed by the first focus detection pixel S1 and the image signal of one row formed by the second focus detection pixel S2 are changed. Causes a phase difference. The direction of the phase difference is reversed between the front pin state and the rear pin state.

図5は、ピントが合ったときの第1の焦点検出画素S1と第2の焦点検出画素S2の像信号の位相差を示す図であり、図6は、ピントが合う前の第1の焦点検出画素S1と第2の焦点検出画素S2の像信号の位相差を示す図である。   FIG. 5 is a diagram showing the phase difference between the image signals of the first focus detection pixel S1 and the second focus detection pixel S2 when in focus, and FIG. 6 shows the first focus before focus. It is a figure which shows the phase difference of the image signal of detection pixel S1 and 2nd focus detection pixel S2.

図5および図6において、両焦点検出画素S1,S2を互いに近づけて、それぞれをA,Bの点として示している。なお、撮像画素については省略している。   5 and FIG. 6, the two focus detection pixels S1 and S2 are brought close to each other and are shown as points A and B, respectively. Note that imaging pixels are omitted.

被写体上の特定点からの光束は、焦点検出画素Aに対応する分割瞳を通って該焦点検出画素Aに入射する光束ΦLaと、焦点検出画素Bに対応する分割瞳を通って該焦点検出画素Bに入射する光束ΦLbとに分割される。これら2つの光束は、被写体上の同一点から入射しているため、撮像光学系のピントが合った状態では、図5に示すように、同一のマイクロレンズを通過して撮像素子上の1点に到達する。したがって、第1の焦点検出画素A(S1)からなる一列の像信号と、第2の焦点検出画素B(S2)からなる一列の像信号は互いに一致する。   The light beam from a specific point on the subject passes through the divided pupil corresponding to the focus detection pixel A, enters the focus detection pixel A, and passes through the divided pupil corresponding to the focus detection pixel B. It is divided into a light beam ΦLb incident on B. Since these two light beams are incident from the same point on the subject, when the imaging optical system is in focus, one point on the image sensor passes through the same microlens as shown in FIG. To reach. Therefore, the image signal of one column composed of the first focus detection pixels A (S1) and the image signal of the column composed of the second focus detection pixels B (S2) coincide with each other.

しかしながら、図6に示すように、xだけピントがずれている状態では、光束ΦLa,ΦLbのマイクロレンズへの入射角の変化分だけ両光束ΦLa,ΦLbの到達位置が互いにずれる。したがって、第1の焦点検出画素A(S1)からなる一列の像信号と、第2の焦点検出画素B(S2)からなる一列の像信号には、位相差が生じる。   However, as shown in FIG. 6, in the state where the focus is shifted by x, the arrival positions of the two light beams ΦLa and ΦLb are shifted from each other by the change in the incident angle of the light beams ΦLa and ΦLb to the microlens. Therefore, there is a phase difference between the row of image signals composed of the first focus detection pixels A (S1) and the row of image signals composed of the second focus detection pixels B (S2).

図7は、ラインセンサa及びラインセンサbからなる一対のラインセンサにおける被写体像の位相差とレンズ群101の焦点位置のデフォーカス量との関係を示す図である。   FIG. 7 is a diagram illustrating the relationship between the phase difference of the subject image and the defocus amount of the focal position of the lens group 101 in the pair of line sensors including the line sensor a and the line sensor b.

図7に示すように、位相差が大きくなるにつれてデフォーカス量が単調に増加する。また、位相差の向きとデフォーカス量の向き(至近側/無限側)が対応する。   As shown in FIG. 7, the defocus amount monotonously increases as the phase difference increases. Further, the direction of the phase difference corresponds to the direction of the defocus amount (closest side / infinite side).

図8は、デフォーカス量が小さいときのラインセンサに投影される被写体像を表した模式図、図9は、デフォーカス量が大きいときのラインセンサに投影される被写体像を表した模式図である。   FIG. 8 is a schematic diagram showing a subject image projected on the line sensor when the defocus amount is small, and FIG. 9 is a schematic diagram showing a subject image projected on the line sensor when the defocus amount is large. is there.

瞳面で分割された光線がラインセンサ上に2次結像された被写体像であるA像及びB像は、それぞれ、ラインセンサa及びラインセンサbの光軸中心位置に対してオフセットを持って結像している。また、A像とB像の各オフセットは光軸中心に対して対称である。   The A and B images, which are subject images obtained by secondarily focusing the light beam divided on the pupil plane on the line sensor, have an offset with respect to the optical axis center positions of the line sensor a and the line sensor b, respectively. An image is formed. Further, each offset of the A image and the B image is symmetric with respect to the optical axis center.

図8はデフォーカス量が小さい場合を示しており、図9はデフォーカス量が大きい場合を示している。図9における光軸中心位置に対するオフセットが、図8のそれに比べて大きくなっている。このように、レンズ群101の焦点位置のデフォーカス量に応じて、ラインセンサaとラインセンサbにそれぞれ結像される2つの被写体像の位相差が変化する。位相差は、公知の手法によりデフォーカス量に変換することができ、さらにデフォーカス量とレンズ群101の倍率関係に基づき、公知の手法により被写体までの距離を算出することもできる。 次に、位相差検出方式による焦点検出結果を加算平均することによる、焦点検出結果の信頼性向上について説明する。   FIG. 8 shows a case where the defocus amount is small, and FIG. 9 shows a case where the defocus amount is large. The offset with respect to the optical axis center position in FIG. 9 is larger than that in FIG. In this way, the phase difference between the two subject images formed on the line sensor a and the line sensor b changes according to the defocus amount of the focal position of the lens group 101. The phase difference can be converted into a defocus amount by a known method, and the distance to the subject can be calculated by a known method based on the relationship between the defocus amount and the magnification ratio of the lens group 101. Next, improvement in the reliability of the focus detection result by averaging the focus detection results by the phase difference detection method will be described.

位相差検出方式による焦点検出では、カメラのフォーカス状態と被写体像の合焦位置との差分が検出される。焦点検出で得られるデフォーカス量が、例えば低輝度で十分な信号が得られていない場合、被写体像の信号に含まれるノイズの比率が高まるために信号に歪みが生じて、位相差を算出する際の相関演算に誤差が生じる。その結果、デフォーカス量にばらつきが生じて誤差が生じる。例えば、ノイズレベルより被写体像の信号レベルの方が大きい場合、焦点検出画素で得られる被写体像の信号は、ノイズによる変形が軽微なため、1対の被写体像の信号に基づくデフォーカス量は比較的正しい。この場合、同一条件で複数のデフォーカス量の結果を加算平均することで、デフォーカス量のばらつきを抑えることができ、焦点検出精度を向上できる。一方、被写体像の信号レベルよりノイズレベルの方が大きい場合、焦点検出画素で得られる被写体像の信号は、ノイズによる変形が著しく、1対の被写体像の信号に基づくデフォーカス量は、被写体像に無関係の誤った結果を示す。この場合、同一条件で複数のデフォーカス量の結果を加算平均しても、被写体像によらない結果の平均をとるため、結果サンプルをいくら増やしても正しい焦点検出結果が得られない。   In focus detection by the phase difference detection method, the difference between the focus state of the camera and the focus position of the subject image is detected. When the defocus amount obtained by focus detection is low, for example, when a sufficient signal is not obtained, the ratio of noise included in the signal of the subject image increases, so that the signal is distorted and the phase difference is calculated. An error occurs in the correlation calculation. As a result, the defocus amount varies and an error occurs. For example, when the signal level of the subject image is higher than the noise level, the subject image signal obtained by the focus detection pixel is not significantly deformed by noise, so the defocus amount based on the pair of subject image signals is compared. Right. In this case, by averaging the results of a plurality of defocus amounts under the same conditions, variations in the defocus amount can be suppressed, and focus detection accuracy can be improved. On the other hand, when the noise level is higher than the signal level of the subject image, the subject image signal obtained by the focus detection pixel is significantly deformed by noise, and the defocus amount based on the signal of the pair of subject images is the subject image. Indicates an incorrect result unrelated to. In this case, even if the results of a plurality of defocus amounts are added and averaged under the same conditions, the average of the results not depending on the subject image is averaged. Therefore, no matter how many result samples are increased, a correct focus detection result cannot be obtained.

そこで、本実施形態では、ノイズレベルより被写体像の信号レベルが低くなる低輝度といった被写体条件において、デフォーカス量の加算平均の手法を用いず、後述する別の手法で信頼性を向上させるように制御する。   Therefore, in this embodiment, in the subject condition such as low luminance in which the signal level of the subject image is lower than the noise level, the reliability is improved by another method to be described later without using the method of averaging the defocus amount. Control.

本実施形態におけるデジタルカメラは、撮像部213で撮像した被写体像を表示部224に適宜表示する。表示する動作モードは2種類あり、静止画を撮影するために構図を確認する目的で表示するライブビューモードと、動画を撮影する動画記録モードを有する。   The digital camera according to the present embodiment appropriately displays the subject image captured by the imaging unit 213 on the display unit 224. There are two types of operation modes to be displayed, and there are a live view mode for displaying a composition for shooting a still image and a moving image recording mode for shooting a moving image.

動画記録モードは、記録部226が常時記録状態となるため、ライブビューモードと比べてカメラコントローラ215の処理負荷が増大する。このため、動画記録モード時には、焦点検出処理といった他の処理を軽負荷にすることが好ましい。   In the moving image recording mode, since the recording unit 226 is always in a recording state, the processing load on the camera controller 215 increases compared to the live view mode. For this reason, in the moving image recording mode, it is preferable to lighten other processing such as focus detection processing.

図10は、本発明の第1の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 10 is a flowchart showing the flow of the AF operation of the digital camera in the first embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、動作モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the operation mode is automatically set to the live view mode, and the captured subject image is displayed on the display unit 224 while the imaging unit 213 continuously performs imaging. To do.

まず、操作スイッチ214のSW1が押下されて、焦点検出命令が発生することにより処理が開始される。   First, when SW1 of the operation switch 214 is pressed and a focus detection command is generated, processing is started.

ステップS1001では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS1002へ進む。   In step S1001, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S1002.

ステップS1002では、カメラコントローラ215は、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS1003へ進む。   In step S <b> 1002, the camera controller 215 acquires image signals obtained from a pair of focus detection pixel arrays that the imaging unit 213 has. After acquisition, the process proceeds to step S1003.

ステップS1003では、カメラコントローラ215は、ステップS1002で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS1004へ進む。   In step S1003, the camera controller 215 performs correction processing for suppressing various signal level fluctuations, such as black level correction and a decrease in peripheral light amount of the imaging optical system, for the pair of image signals acquired in step S1002. After the correction process, the process proceeds to step S1004.

ステップS1004では、カメラコントローラ215は、操作部225で動画記録モードが選択されていて、記録部226へ動画記録がなされているか判定する。処理負荷の重い動画記録中である場合は、後述する処理負荷の比較的軽い方法を行うために、ステップS1005へ進む。一方、動画記録中でない場合は、ステップS1009へ進む。   In step S <b> 1004, the camera controller 215 determines whether the moving image recording mode is selected on the operation unit 225 and moving image recording is performed on the recording unit 226. If a moving image with a heavy processing load is being recorded, the process advances to step S1005 to perform a method with a relatively light processing load, which will be described later. On the other hand, if the moving image is not being recorded, the process proceeds to step S1009.

ステップS1005では、ステップS1003で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1006へ進む。   In step S1005, the correlation calculation unit 219 performs a correlation calculation from the pair of focus detection image signals subjected to the correction process in step S1003, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1006.

ステップS1006では、相関量加算部220がステップS1005で算出した相関量を相関演算の像ずらし量ごとに対応するよう加算する。本実施形態では、加算カウンタ218のカウント値が所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。このように、相関演算の像ずらし量ごとに対応するよう相関量の値を加算するだけなので、加算にかかる処理負荷を比較的軽くできる。また、相関演算の像ずらし量ごとに対応するよう相関量を加算することで、仮に値にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1107へ進む。   In step S1006, the correlation amount adding unit 220 adds the correlation amount calculated in step S1005 so as to correspond to each image shift amount of the correlation calculation. In this embodiment, addition is performed until the count value of the addition counter 218 reaches a predetermined number of times, but only the count is performed because there is no addition target in the first process. In this way, since only the correlation amount value is added so as to correspond to each image shift amount of the correlation calculation, the processing load for the addition can be made relatively light. In addition, by adding the correlation amount so as to correspond to each image shift amount of the correlation calculation, even if the value includes a variation, the variation is reduced according to the number of additions, so the reliability of the phase difference used for focus detection Can be increased. After the addition, the process proceeds to step S1107.

ステップS1007では、カメラコントローラ215は、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS1008へ進む。   In step S1007, the camera controller 215 updates the count value n of the addition counter 218 by adding 1. After the update, the process proceeds to step S1008.

ステップS1008では、カメラコントローラ215は、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、所定回数の加算処理を終えているかを判定する。一方、加算カウンタ218のカウント値nが所定回数以上であれば、レンズ群101のフォーカス制御を行う動作に進めるため、ステップS1011へ進む。   In step S <b> 1008, the camera controller 215 has completed a predetermined number of addition processes on the image signal obtained from the pair of focus detection pixel columns that the imaging unit 213 has a count value n of the addition counter 218. Determine. On the other hand, if the count value n of the addition counter 218 is equal to or greater than the predetermined number, the process proceeds to step S1011 in order to proceed to the operation of performing the focus control of the lens group 101.

一方、ステップS1008で加算カウンタ218のカウント値nが所定回数未満であれば、ステップS1002に戻る。これは、所定回数の加算ができるよう、撮像部213が複数有する1対の焦点検出画素列のうち、まだ像信号を取得していない画素列から像信号を取得し、残る1対の像信号に対して、上述したステップの処理を同様に行うためである。   On the other hand, if the count value n of the addition counter 218 is less than the predetermined number in step S1008, the process returns to step S1002. This is because an image signal is obtained from a pixel row that has not yet obtained an image signal among a plurality of pairs of focus detection pixel rows that the imaging unit 213 has so that a predetermined number of additions can be performed, and the remaining pair of image signals On the other hand, it is for performing the process of the step mentioned above similarly.

ステップS1009では、画素加算部217は、ステップS1003で補正処理が行われた焦点検出用の1対の像信号に対して、位置的に対応する画素同士で加算する。本実施形態では、加算カウンタ218のカウント値が所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対して個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1010へ進む。   In step S1009, the pixel addition unit 217 adds the pixels corresponding in position to the pair of image signals for focus detection subjected to the correction process in step S1003. In this embodiment, addition is performed until the count value of the addition counter 218 reaches a predetermined number of times, but only the count is performed because there is no addition target in the first process. Since addition processing is individually performed on each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S1010.

ステップS1010では、ステップS1009で加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1007へ進む。   In step S1010, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added in step S1009, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1007.

ステップS1011では、ステップS1006あるいはステップS1010で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1012へ進む。   In step S1011, the phase difference detection unit 221 calculates the phase difference having the highest correlation amount from the correlation amount for each image shift amount obtained in step S1006 or step S1010. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S1012.

ステップS1012では、算出されたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御が完了することでAF動作が終了となる。   In step S1012, the focal position of the lens group 101 is controlled via the lens controller 105 based on the calculated defocus amount. When the control is completed, the AF operation ends.

本第1の実施形態によれば、処理負荷の重い動画記録モード時と処理負荷の軽い他モードの時とで、異なる焦点検出結果の信頼性向上手法を適切に選択させることができ、処理負荷のいかんにかかわらず、高精度な焦点検出を実現できる。   According to the first embodiment, it is possible to appropriately select different focus detection result reliability improvement methods in the moving image recording mode with a heavy processing load and the other mode with a light processing load. Regardless of the time, high-precision focus detection can be realized.

[第2の実施形態]
本発明の第2の実施の形態に係る撮像装置は、その構成(図1)が上記第1の実施の形態に係る撮像装置と同じであり、第1の実施の形態と同様の部分については、同一の符号を用いてその説明を省略する。以下に、上記第1の実施の形態と異なる点のみを説明する。
[Second Embodiment]
The imaging apparatus according to the second embodiment of the present invention has the same configuration (FIG. 1) as that of the imaging apparatus according to the first embodiment, and the same parts as those in the first embodiment. The description will be omitted using the same reference numerals. Only differences from the first embodiment will be described below.

上記第1の実施形態では、処理負荷が高いモード時に、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、相関量の状態で加算することで、焦点検出の信頼性を向上させていた。本発明の第2の実施形態では、相関量の状態で加算する代わりに、相関量から算出されるデフォーカス量の状態で加算するものである。   In the first embodiment, focus detection is performed by adding, in a correlation amount state, image signals obtained from a pair of focus detection pixel arrays that the imaging unit 213 has in a mode with a high processing load. The reliability of the was improved. In the second embodiment of the present invention, instead of adding in the state of the correlation amount, addition is performed in the state of the defocus amount calculated from the correlation amount.

図11は、本発明の第2の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 11 is a flowchart showing a flow of AF operation of the digital camera according to the second embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、動作モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the operation mode is automatically set to the live view mode, and the captured subject image is displayed on the display unit 224 while the imaging unit 213 continuously performs imaging. To do.

まず、操作スイッチ214のSW1が押下されて、焦点検出命令が発生することにより処理が開始される。   First, when SW1 of the operation switch 214 is pressed and a focus detection command is generated, processing is started.

ステップS1101では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS1102へ進む。   In step S1101, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S1102.

ステップS1102では、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS1103へ進む。   In step S1102, an image signal obtained from a pair of focus detection pixel arrays that the imaging unit 213 has is acquired. After acquisition, the process proceeds to step S1103.

ステップS1103では、カメラコントローラ215は、ステップS1102で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS1104へ進む。   In step S1103, the camera controller 215 performs correction processing for suppressing various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system on the pair of image signals acquired in step S1102. After the correction process, the process proceeds to step S1104.

ステップS1104では、カメラコントローラ215は、操作部225で動画記録モードが選択されていて、記録部226へ動画記録がなされているか判定する。処理負荷の重い動画記録中である場合は、後述する処理負荷の比較的軽い方法を行うために、ステップS1105へ進む。一方、動画記録中でない場合は、ステップS1110へ進む。   In step S <b> 1104, the camera controller 215 determines whether the moving image recording mode is selected on the operation unit 225 and moving image recording is performed on the recording unit 226. If a moving image with a heavy processing load is being recorded, the process advances to step S1105 to perform a method with a relatively light processing load, which will be described later. On the other hand, if the moving image is not being recorded, the process proceeds to step S1110.

ステップS1105では、ステップS1103で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1106へ進む。   In step S1105, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals for focus detection subjected to the correction process in step S1103, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1106.

ステップS1106では、ステップS1105で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1107へ進む。   In step S1106, the phase difference detection unit 221 calculates the phase difference having the highest correlation amount from the correlation amount for each image shift amount obtained in step S1105. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S1107.

ステップS1107では、算出したデフォーカス量をデフォーカス量加算部223が加算平均する。本実施形態では、加算カウンタ218のカウント値が所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。デフォーカス量の値を加算平均するだけなので、加算平均にかかる処理負荷が非常に軽くできる。また、デフォーカス量を加算平均することで、仮にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算平均後、ステップS1108へ進む。   In step S1107, the defocus amount adding unit 223 averages the calculated defocus amounts. In this embodiment, addition is performed until the count value of the addition counter 218 reaches a predetermined number of times, but only the count is performed because there is no addition target in the first process. Since only the defocus amount value is averaged, the processing load required for the averaging can be greatly reduced. In addition, by averaging the defocus amounts, even if a variation is included, the variation is reduced according to the number of additions, so that the reliability of the phase difference used for focus detection can be improved. After the addition averaging, the process proceeds to step S1108.

ステップS1108では、カメラコントローラ215は、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS1109へ進む。   In step S1108, the camera controller 215 updates the count value n of the addition counter 218 by adding 1. After the update, the process proceeds to step S1109.

ステップS1109では、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、所定回数の加算処理を終えているかを判定する。加算カウンタのカウント値nが所定回数以上であれば、レンズ群101のフォーカス制御を行う動作に進めるため、ステップS1113へ進む。   In step S <b> 1109, it is determined whether the count value n of the addition counter 218 has completed a predetermined number of addition processes for image signals obtained from a pair of focus detection pixel arrays included in the imaging unit 213. If the count value n of the addition counter is equal to or greater than the predetermined number, the process proceeds to step S1113 to proceed to the operation of performing the focus control of the lens group 101.

一方、加算カウンタ218のカウント値nが所定回数未満であれば、ステップS1102に戻る。これは、所定回数の加算ができるよう、撮像部213が複数有する1対の焦点検出画素列のうち、まだ像信号を取得していない画素列から像信号を取得し、残る1対の像信号に対して、上述したステップの処理を同様に行うためである。   On the other hand, if the count value n of the addition counter 218 is less than the predetermined number, the process returns to step S1102. This is because an image signal is obtained from a pixel row that has not yet obtained an image signal among a plurality of pairs of focus detection pixel rows that the imaging unit 213 has so that a predetermined number of additions can be performed, and the remaining pair of image signals On the other hand, it is for performing the process of the step mentioned above similarly.

ステップS1110では、画素加算部217は、ステップS1103で補正処理が行われた焦点検出用の1対の像信号に対して、位置的に対応する画素から得られる像信号を加算する。本実施形態では、加算カウンタ218のカウント値が所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対して個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1111へ進む。   In step S1110, the pixel addition unit 217 adds the image signal obtained from the positionally corresponding pixel to the pair of focus detection image signals subjected to the correction process in step S1103. In this embodiment, addition is performed until the count value of the addition counter 218 reaches a predetermined number of times, but only the count is performed because there is no addition target in the first process. Since addition processing is individually performed on each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S1111.

ステップS1111では、ステップS1110で加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1112へ進む。   In step S <b> 1111, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added in step S <b> 1110, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1112.

ステップS1112では、ステップS1111で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、相関量に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1108へ進む。   In step S1112, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount obtained in step S1111. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is calculated by multiplying the correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. After the calculation, the process proceeds to step S1108.

ステップS1113では、ステップS1107あるいはステップS1112で得られたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御が完了することでAF動作が終了となる。   In step S1113, the focal position of the lens group 101 is controlled via the lens controller 105 based on the defocus amount obtained in step S1107 or step S1112. When the control is completed, the AF operation ends.

本第2の実施形態によれば、上記第1の実施形態と同様の効果が得られる。具体的には、処理負荷の重い動画記録モード時と処理負荷の軽い他モードの時とで、異なる焦点検出結果の信頼性向上手法を適切に選択させることができ、処理負荷のいかんにかかわらず、高精度な焦点検出を実現できる。   According to the second embodiment, the same effect as the first embodiment can be obtained. Specifically, it is possible to select different methods for improving the reliability of focus detection results in the video recording mode with a heavy processing load and the other mode with a light processing load, regardless of the processing load. Highly accurate focus detection can be realized.

[第3の実施形態]
本発明の第3の実施の形態に係る撮像装置は、その構成(図1)が上記第1の実施の形態に係る撮像装置と同じであり、第1の実施の形態と同様の部分については、同一の符号を用いてその説明を省略する。以下に、上記第1の実施の形態と異なる点のみを説明する。
[Third Embodiment]
The imaging apparatus according to the third embodiment of the present invention has the same configuration (FIG. 1) as that of the imaging apparatus according to the first embodiment, and the same parts as those in the first embodiment. The description will be omitted using the same reference numerals. Only differences from the first embodiment will be described below.

上記第1の実施形態では、撮像部213で撮像された1フレームに含まれる、撮像部213が複数有する1対の焦点検出画素列から得られた像信号、あるいはその像信号から算出される相関量を加算し、その加算した結果を用いて焦点検出を行っている。   In the first embodiment, an image signal obtained from a pair of focus detection pixel arrays included in a plurality of imaging units 213 included in one frame captured by the imaging unit 213, or a correlation calculated from the image signals. The amount is added, and focus detection is performed using the added result.

本発明の第3の実施形態では、撮像部213で複数のフレームを撮像し、撮像した各フレームで得られる1対の焦点検出画素列から得られた像信号、あるいはその像信号から算出される相関量を、フレームを跨いて加算するものである。   In the third embodiment of the present invention, a plurality of frames are imaged by the imaging unit 213, and an image signal obtained from a pair of focus detection pixel arrays obtained in each captured frame, or calculated from the image signal. The correlation amount is added across the frames.

図12は、本発明の第3の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 12 is a flowchart showing the flow of the AF operation of the digital camera in the third embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、動作モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the operation mode is automatically set to the live view mode, and the captured subject image is displayed on the display unit 224 while the imaging unit 213 continuously performs imaging. To do.

まず、操作スイッチ214のSW1が押下されて、焦点検出命令が発生することにより処理が開始される。   First, when SW1 of the operation switch 214 is pressed and a focus detection command is generated, processing is started.

ステップS1201では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS1202へ進む。   In step S1201, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S1202.

ステップS1202では、撮像部213で被写体像を撮像し、1フレームの撮像信号を取得する。取得後、ステップS1203へ進む。   In step S1202, the imaging unit 213 captures a subject image, and acquires an imaging signal of one frame. After acquisition, the process proceeds to step S1203.

ステップS1203では、カメラコントローラ215は、撮像部213における1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS1204へ進む。   In step S <b> 1203, the camera controller 215 acquires an image signal obtained from a pair of focus detection pixel rows in the imaging unit 213. After acquisition, the process proceeds to step S1204.

ステップS1204では、カメラコントローラ215は、ステップS1203で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS1205へ進む。   In step S1204, the camera controller 215 performs correction processing for suppressing various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system on the pair of image signals acquired in step S1203. After the correction process, the process proceeds to step S1205.

ステップS1205では、カメラコントローラ215は、操作部225で動画記録モードが選択されていて、記録部226へ動画記録がなされているか判定する。処理負荷の重い動画記録中である場合は、後述する処理負荷の比較的軽い方法を行うために、ステップS1206へ進む。一方、動画記録中でない場合は、ステップS1210へ進む。   In step S <b> 1205, the camera controller 215 determines whether the moving image recording mode is selected on the operation unit 225 and moving image recording is performed on the recording unit 226. If a moving image with a heavy processing load is being recorded, the process advances to step S1206 to perform a method with a relatively light processing load, which will be described later. On the other hand, if the moving image is not being recorded, the process proceeds to step S1210.

ステップS1206では、ステップS1204で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1207へ進む。   In step S1206, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals for focus detection subjected to the correction process in step S1204, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1207.

ステップS1207では、異なるフレームにおける同じ焦点検出画素列の像信号から算出された相関量を相関演算の像ずらし量ごとに対応するよう相関量加算部220が加算する。本実施形態では、加算カウンタ218のカウント値が所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。このように、異なるフレームで個々に算出した相関演算の像ずらし量ごとの相関量を加算するだけなので、加算にかかる処理負荷を比較的軽くできる。また、相関演算の像ずらし量ごとに対応するよう相関量を加算することで、仮に値にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1108へ進む。   In step S1207, the correlation amount adding unit 220 adds the correlation amount calculated from the image signals of the same focus detection pixel row in different frames so as to correspond to each image shift amount of the correlation calculation. In this embodiment, addition is performed until the count value of the addition counter 218 reaches a predetermined number of times, but only the count is performed because there is no addition target in the first process. As described above, since only the correlation amount for each image shift amount of the correlation calculation individually calculated in different frames is added, the processing load for the addition can be relatively reduced. In addition, by adding the correlation amount so as to correspond to each image shift amount of the correlation calculation, even if the value includes a variation, the variation is reduced according to the number of additions, so the reliability of the phase difference used for focus detection Can be increased. After the addition, the process proceeds to step S1108.

ステップS1208では、カメラコントローラ215は、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS1209へ進む。   In step S1208, the camera controller 215 adds 1 to the count value n of the addition counter 218 and updates it. After the update, the process proceeds to step S1209.

ステップS1209では、カメラコントローラ215は、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、フレームを跨いで所定回数の加算処理を終えているかを判定する。加算カウンタ218のカウント値nが所定回数以上であれば、レンズ群101のフォーカス制御を行う動作に進めるため、ステップS1212へ進む。   In step S <b> 1209, the camera controller 215 adds a predetermined number of times across the frame with respect to the image signal obtained from the pair of focus detection pixel columns in which the count value n of the addition counter 218 includes a plurality of imaging units 213. Determine whether you have finished. If the count value n of the addition counter 218 is equal to or greater than the predetermined number, the process proceeds to step S1212 in order to proceed to the operation of performing the focus control of the lens group 101.

一方、加算カウンタ218のカウント値nが所定回数未満であれば、所定回数の加算ができるよう、次フレームにおける1対の焦点検出画素列で得られる像信号を取得して、上述したステップの処理を同様に行うために、ステップS1202に戻る。   On the other hand, if the count value n of the addition counter 218 is less than the predetermined number of times, an image signal obtained by a pair of focus detection pixel columns in the next frame is acquired so that the predetermined number of additions can be performed, and the processing of the above-described steps In the same manner, the process returns to step S1202.

ステップS1210では、画素加算部217は、ステップS1204で補正処理が行われた焦点検出用の1対の像信号に対して、それぞれ対応する画素同士で加算する。本実施形態では、加算カウンタ218のカウント値が所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対してフレームを跨いて個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1211へ進む。   In step S1210, the pixel addition unit 217 adds the corresponding pixels to the pair of focus detection image signals subjected to the correction process in step S1204. In this embodiment, addition is performed until the count value of the addition counter 218 reaches a predetermined number of times, but only the count is performed because there is no addition target in the first process. Since addition processing is individually performed across the frames for each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S1211.

ステップS1211では、ステップS1210にてフレームを跨いで加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1208へ進む。   In step S1211, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added across the frames in step S1210, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1208.

ステップS1212では、ステップS1207あるいはステップS1211で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1213へ進む。   In step S1212, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount obtained in step S1207 or step S1211. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After calculation, the process proceeds to step S1213.

ステップS1213では、算出されたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御が完了することでAF動作が終了となる。   In step S1213, the focal position of the lens group 101 is controlled via the lens controller 105 based on the calculated defocus amount. When the control is completed, the AF operation ends.

本第3の実施形態によれば、上記第1の実施形態と同様の効果が得られる。具体的には、処理負荷の重い動画記録モード時と処理負荷の軽い他モードの時とで、異なる焦点検出結果の信頼性向上手法を適切に選択させることができ、処理負荷のいかんにかかわらず、高精度な焦点検出を実現できる。   According to the third embodiment, the same effect as in the first embodiment can be obtained. Specifically, it is possible to select different methods for improving the reliability of focus detection results in the video recording mode with a heavy processing load and the other mode with a light processing load, regardless of the processing load. Highly accurate focus detection can be realized.

[第4の実施形態]
本発明の第4の実施の形態に係る撮像装置は、その構成(図1)が上記第1の実施の形態に係る撮像装置と同じであり、第1の実施の形態と同様の部分については、同一の符号を用いてその説明を省略する。以下に、上記第1の実施の形態と異なる点のみを説明する。
[Fourth Embodiment]
The imaging apparatus according to the fourth embodiment of the present invention has the same configuration (FIG. 1) as that of the imaging apparatus according to the first embodiment, and the same parts as those in the first embodiment. The description will be omitted using the same reference numerals. Only differences from the first embodiment will be described below.

上記第2の実施形態では、撮像部213で撮像された1フレームに含まれる、撮像部213が複数有する1対の焦点検出画素列から得られた像信号、またはその像信号から算出されるデフォーカス量を加算し、その加算した結果を用いて焦点検出が行われる。   In the second embodiment, an image signal obtained from a pair of focus detection pixel columns included in a plurality of imaging units 213 included in one frame captured by the imaging unit 213, or a data calculated from the image signals. The focus amount is added, and focus detection is performed using the added result.

本発明の第4の実施形態では、撮像部213で複数のフレームを撮像し、撮像した各フレームで得られる1対の焦点検出画素列から得られた像信号、あるいはその像信号から相関量の算出を経て算出されるデフォーカス量を、フレームを跨いて加算するものである。   In the fourth embodiment of the present invention, a plurality of frames are imaged by the imaging unit 213, and an image signal obtained from a pair of focus detection pixel arrays obtained in each captured image, or a correlation amount from the image signal is obtained. The defocus amount calculated through the calculation is added across the frames.

図13は、本発明の第4の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 13 is a flowchart showing the flow of the AF operation of the digital camera in the fourth embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、動作モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the operation mode is automatically set to the live view mode, and the captured subject image is displayed on the display unit 224 while the imaging unit 213 continuously performs imaging. To do.

まず、操作スイッチ214のSW1が押下されて、焦点検出命令が発生することにより処理が開始される。   First, when SW1 of the operation switch 214 is pressed and a focus detection command is generated, processing is started.

ステップS1301では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS1302へ進む。   In step S1301, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S1302.

ステップS1302では、撮像部213で被写体像を撮像し、1フレームの撮像信号を取得する。取得後、ステップS1303へ進む。   In step S1302, the imaging unit 213 captures a subject image and obtains an imaging signal for one frame. After acquisition, the process proceeds to step S1303.

ステップS1303では、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS1304へ進む。   In step S1303, an image signal obtained from a pair of focus detection pixel arrays that the imaging unit 213 has is acquired. After acquisition, the process proceeds to step S1304.

ステップS1304では、カメラコントローラ215は、ステップS1303で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS1305へ進む。   In step S1304, the camera controller 215 performs correction processing for suppressing various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system on the pair of image signals acquired in step S1303. After the correction process, the process proceeds to step S1305.

ステップS1305では、カメラコントローラ215は、操作部225で動画記録モードが選択されていて、記録部226へ動画記録がなされているか判定する。処理負荷の重い動画記録中である場合は、後述する処理負荷の比較的軽い方法を行うために、ステップS1306へ進む。一方、動画記録中でない場合は、ステップS1311へ進む。   In step S <b> 1305, the camera controller 215 determines whether the moving image recording mode has been selected by the operation unit 225 and moving image recording has been performed on the recording unit 226. If a moving image with a heavy processing load is being recorded, the process advances to step S1306 to perform a method with a relatively light processing load, which will be described later. On the other hand, if the moving image is not being recorded, the process proceeds to step S1311.

ステップS1306では、ステップS1304で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1307へ進む。   In step S1306, the correlation calculation unit 219 performs a correlation calculation from the pair of focus detection image signals subjected to the correction process in step S1304, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1307.

ステップS1307では、ステップS1306で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、相関量に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1308へ進む。   In step S1307, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount obtained in step S1306. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is calculated by multiplying the correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. After the calculation, the process proceeds to step S1308.

ステップS1308では、異なるフレームにおける同じ焦点検出画素列の像信号からそれぞれ算出したデフォーカス量をデフォーカス量加算部223が加算平均する。本実施形態では、加算カウンタ218のカウント値が所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。異なるフレームで個々に算出したデフォーカス量の値を加算平均するだけなので、加算平均にかかる処理負荷が非常に軽くできる。また、デフォーカス量を加算平均することで、仮にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算平均後、ステップS1309へ進む。   In step S1308, the defocus amount adding unit 223 averages the defocus amounts calculated from the image signals of the same focus detection pixel row in different frames. In this embodiment, addition is performed until the count value of the addition counter 218 reaches a predetermined number of times, but only the count is performed because there is no addition target in the first process. Since only the defocus amount values calculated individually in different frames are added and averaged, the processing load required for the averaging can be made very light. In addition, by averaging the defocus amounts, even if a variation is included, the variation is reduced according to the number of additions, so that the reliability of the phase difference used for focus detection can be improved. After the addition averaging, the process proceeds to step S1309.

ステップS1309では、カメラコントローラ215は、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS1310へ進む。   In step S1309, the camera controller 215 updates the count value n of the addition counter 218 by adding 1. After the update, the process proceeds to step S1310.

ステップS1310では、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、フレームを跨いで所定回数の加算処理を終えているかを判定する。加算カウンタ218のカウント値nが所定回数以上であれば、レンズ群101のフォーカス制御を行う動作に進めるため、ステップS1314へ進む。   In step S1310, it is determined whether the count value n of the addition counter 218 has completed a predetermined number of addition processes across frames with respect to image signals obtained from a pair of focus detection pixel arrays included in the imaging unit 213. judge. If the count value n of the addition counter 218 is equal to or greater than the predetermined number, the process proceeds to step S1314 in order to proceed to the operation of performing the focus control of the lens group 101.

一方、加算カウンタ218のカウント値nが所定回数未満であれば、所定回数の加算ができるよう、次フレームにおける1対の焦点検出画素列で得られる像信号を取得して、上述したステップの処理を同様に行うために、ステップS1302に戻る。   On the other hand, if the count value n of the addition counter 218 is less than the predetermined number of times, an image signal obtained by a pair of focus detection pixel columns in the next frame is acquired so that the predetermined number of additions can be performed, and the processing of the above-described steps To return to step S1302.

ステップS1311では、ステップS1304で補正処理が行われた焦点検出用の1対の像信号を、画素加算部217がそれぞれ対応する画素同士で加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対してフレームを跨いて個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出処理の信頼性を高めることができる。加算後、ステップS1312へ進む。   In step S1311, the pixel adder 217 adds the pair of focus detection image signals that have undergone the correction processing in step S1304 to the corresponding pixels. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since addition processing is individually performed across the frames for each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between the corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the focus detection process can be improved. After the addition, the process proceeds to step S1312.

ステップS1312では、ステップS1311にてフレームを跨いで加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1313へ進む。   In step S1312, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added across the frames in step S1311, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1313.

ステップS1313では、ステップS1312で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1309へ進む。   In step S1313, the phase difference detection unit 221 calculates the phase difference having the highest correlation amount from the correlation amount for each image shift amount obtained in step S1312. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S1309.

ステップS1314では、ステップS1308あるいはステップS1313で得られたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御が完了することでAF動作が終了となる。   In step S1314, the focal position of the lens group 101 is controlled via the lens controller 105 based on the defocus amount obtained in step S1308 or step S1313. When the control is completed, the AF operation ends.

本第4の実施形態によれば、上記第1の実施形態と同様の効果が得られる。具体的には、処理負荷の重い動画記録モード時と処理負荷の軽い他モードの時とで、異なる焦点検出結果の信頼性向上手法を適切に選択させることができ、処理負荷のいかんにかかわらず、高精度な焦点検出を実現できる。   According to the fourth embodiment, the same effect as in the first embodiment can be obtained. Specifically, it is possible to select different methods for improving the reliability of focus detection results in the video recording mode with a heavy processing load and the other mode with a light processing load, regardless of the processing load. Highly accurate focus detection can be realized.

[第5の実施形態]
本発明の第5の実施の形態に係る撮像装置は、その構成(図1)が上記第1の実施の形態に係る撮像装置と同じであり、第1の実施の形態と同様の部分については、同一の符号を用いてその説明を省略する。以下に、上記第1の実施の形態と異なる点のみを説明する。
[Fifth Embodiment]
An imaging apparatus according to the fifth embodiment of the present invention has the same configuration (FIG. 1) as that of the imaging apparatus according to the first embodiment, and the same parts as those in the first embodiment. The description will be omitted using the same reference numerals. Only differences from the first embodiment will be described below.

上記第3の実施形態では、カメラ部200の処理負荷の重い動画記録モード時と処理負荷の軽い他モードの時とで、異なる焦点検出結果の信頼性向上手法を選択していた。   In the third embodiment, different methods for improving the reliability of focus detection results are selected in the moving image recording mode with a heavy processing load of the camera unit 200 and in another mode with a light processing load.

しかしながら、像信号の各画素を加算する方式の信頼性向上手法では、被写体が移動したり、デジタルカメラがぶれたりした場合に、被写体像が多重になったり輪郭に尾を引くような像になったりして、焦点検出に適した加算ができない。そこで、本発明の第5の実施形態では、撮像部213が撮像するフレームレートに応じて、異なる焦点検出結果の信頼性向上手法を選択するものである。   However, in the method of improving the reliability of the method of adding each pixel of the image signal, when the subject moves or the digital camera shakes, the subject image is multiplexed or the image has a tail. Therefore, addition suitable for focus detection cannot be performed. Therefore, in the fifth embodiment of the present invention, different methods for improving the reliability of focus detection results are selected according to the frame rate captured by the imaging unit 213.

本第5の実施形態におけるデジタルカメラは、上記第1の実施形態におけるデジタルカメラに対して、操作部225が後述する撮像部213の撮像フレームレートの切り替え操作を行える点が異なる。具体的には、デジタルカメラは、撮像部213で撮像する間隔、つまりフレームレートを複数備える。例えば、24.0,29.27,59.94[フレーム/秒]の各フレームレートで撮像される撮像モードを備える。24.0[フレーム/秒]の撮像モード(以降、「24pモード」と称す。)は、主に映画撮影向けのフレームレートであり、撮像部213の画素の各行を読み飛ばしなく順次読み出す。29.27[フレーム/秒]の撮像モード(以降、「30pモード」と称す。)は、主にパーソナル・コンピュータのディスプレイで表示するのに適したフレームレートであり、撮像部213の画素の各行を読み飛ばしなく順次読み出す。59.94[フレーム/秒]の撮像モード(以降、「60iモード(登録商標)」と称す。)は、テレビ受像機で表示するのに適したフレームレートである。この60iモード(登録商標)は、撮像部213の画素の各行を1つ飛ばしで読出し、結果として奇数行と偶数行のいずれかのみで構成されるフレームが、交互に得られる。撮像モードの変更は、操作部225にて不図示のメニューに従いユーザーの操作入力によりなされる。   The digital camera according to the fifth embodiment is different from the digital camera according to the first embodiment in that the operation unit 225 can perform an imaging frame rate switching operation of the imaging unit 213 described later. Specifically, the digital camera includes a plurality of intervals at which the image capturing unit 213 captures images, that is, a frame rate. For example, an imaging mode is provided in which imaging is performed at each frame rate of 24.0, 29.27, and 59.94 [frames / second]. An imaging mode of 24.0 [frames / second] (hereinafter referred to as “24p mode”) is a frame rate mainly for movie shooting, and sequentially reads out each row of pixels of the imaging unit 213 without skipping. The imaging mode of 29.27 [frame / second] (hereinafter referred to as “30p mode”) is a frame rate mainly suitable for display on a display of a personal computer, and each row of pixels of the imaging unit 213. Are read sequentially without skipping. The 59.94 [frame / second] imaging mode (hereinafter referred to as “60i mode (registered trademark)”) is a frame rate suitable for display on a television receiver. In the 60i mode (registered trademark), each row of pixels of the image pickup unit 213 is read out by skipping one, and as a result, frames composed of only odd rows or even rows are obtained alternately. The imaging mode is changed by a user operation input in accordance with a menu (not shown) on the operation unit 225.

図14は、本発明の第5の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 14 is a flowchart showing a flow of AF operation of the digital camera in the fifth embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、撮像フレームレートを変更する撮像モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the imaging mode for changing the imaging frame rate is automatically set to the live view mode, and while the imaging unit 213 continuously performs imaging, the captured subject image is displayed on the display unit 224. Assume that it is displayed.

まず、操作スイッチ214のSW1が押下されて、焦点検出命令が発生することにより処理が開始される。   First, when SW1 of the operation switch 214 is pressed and a focus detection command is generated, processing is started.

ステップS1401では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS1402へ進む。   In step S1401, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S1402.

ステップS1402では、撮像部213で被写体像を撮像し、1フレームの撮像信号を取得する。取得後、ステップS1403へ進む。   In step S1402, the imaging unit 213 captures a subject image, and acquires an imaging signal of one frame. After acquisition, the process proceeds to step S1403.

ステップS1403では、カメラコントローラ215は、撮像部213における1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS1404へ進む。   In step S1403, the camera controller 215 acquires an image signal obtained from a pair of focus detection pixel columns in the imaging unit 213. After acquisition, the process proceeds to step S1404.

ステップS1404では、カメラコントローラ215は、ステップS1403で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS1405へ進む。   In step S <b> 1404, the camera controller 215 performs correction processing for suppressing various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system on the pair of image signals acquired in step S <b> 1403. After the correction process, the process proceeds to step S1405.

ステップS1405では、カメラコントローラ215は、操作部225で設定されている撮像モードのフレームレートが所定のフレームレート以上か判定する。所定のフレームレート未満の場合は、被写体が移動したり、デジタルカメラがぶれたりすることで、被写体像の像信号を加算した際に、被写体像が多重になったり輪郭に尾を引くような像になる可能性が高い。この場合、焦点検出に適した加算ができなくなってしまうことから、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を加算しないようにすることが望ましい。そこで、像信号の加算なく焦点検出の信頼性を向上させる効果が高い手法を行うために、ステップS1406へ進む。   In step S1405, the camera controller 215 determines whether the frame rate of the imaging mode set by the operation unit 225 is equal to or higher than a predetermined frame rate. If the frame rate is less than the predetermined frame rate, the subject will move or the digital camera may shake, so that when the subject image signal is added, the subject image will be multiplexed or the contour will be tailed. Is likely to be. In this case, since addition suitable for focus detection cannot be performed, it is desirable not to add image signals obtained from a pair of focus detection pixel arrays that the imaging unit 213 has. Therefore, the process proceeds to step S1406 in order to perform a technique that is highly effective in improving the reliability of focus detection without adding image signals.

一方、ステップS1405で撮影モードのフレームレートが所定のフレームレート以上であれば、焦点検出の信頼性を向上させる効果が高い像信号を得るために、ステップS1410へ進む。   On the other hand, if the frame rate of the shooting mode is greater than or equal to the predetermined frame rate in step S1405, the process proceeds to step S1410 in order to obtain an image signal that is highly effective in improving the reliability of focus detection.

ステップS1406では、ステップS1404で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1407へ進む。   In step S1406, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals for focus detection subjected to the correction process in step S1404, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1407.

ステップS1407では、異なるフレームにおける同じ焦点検出画素列の像信号から算出した相関量を相関演算の像ずらし量ごとに対応するよう相関量加算部220が加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。このように、異なるフレームで個々に算出された相関演算の像ずらし量ごとの相関量を加算するだけなので、加算にかかる処理負荷を比較的軽くできる。また、関演算の像ずらし量ごとに対応するよう相関量を加算することで、仮に値にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1108へ進む。   In step S1407, the correlation amount adding unit 220 adds the correlation amount calculated from the image signals of the same focus detection pixel row in different frames so as to correspond to each image shift amount of the correlation calculation. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. In this way, since only the correlation amount for each image shift amount of correlation calculation individually calculated in different frames is added, the processing load for the addition can be made relatively light. In addition, by adding the correlation amount so as to correspond to each image shift amount of the function calculation, even if the value includes a variation, the variation is reduced according to the number of additions, so the reliability of the phase difference used for focus detection Can be increased. After the addition, the process proceeds to step S1108.

ステップS1408では、カメラコントローラ215は、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS1409へ進む。   In step S1408, the camera controller 215 updates the count value n of the addition counter 218 by adding 1. After the update, the process proceeds to step S1409.

ステップS1409では、カメラコントローラ215は、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、フレームを跨いで所定回数の加算処理を終えているかを判定する。加算カウンタ218のカウント値nが所定回数以上であれば、レンズ群101のフォーカス制御を行う動作に進めるため、ステップS1412へ進む。   In step S1409, the camera controller 215 adds the predetermined number of times across the frame with respect to the image signal obtained from the pair of focus detection pixel arrays having a plurality of count values n of the addition counter 218 in the imaging unit 213. Determine whether you have finished. If the count value n of the addition counter 218 is equal to or greater than the predetermined number, the process proceeds to step S1412 in order to proceed to the operation of performing the focus control of the lens group 101.

一方、加算カウンタ218のカウント値nが所定回数未満であれば、所定回数の加算ができるよう、次フレームにおける1対の焦点検出画素列で得られる像信号を取得して、上述したステップの処理を同様に行うために、ステップS1402に戻る。   On the other hand, if the count value n of the addition counter 218 is less than the predetermined number of times, an image signal obtained by a pair of focus detection pixel columns in the next frame is acquired so that the predetermined number of additions can be performed, and the processing of the above-described steps To return to step S1402.

ステップS1410では、ステップS1404で補正処理が行われた焦点検出用の1対の像信号を、画素加算部217がそれぞれ対応する画素同士で加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対してフレームを跨いて個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1411へ進む。   In step S1410, the pixel adding unit 217 adds the pair of image signals for focus detection subjected to the correction process in step S1404 to corresponding pixels. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since addition processing is individually performed across the frames for each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S1411.

ステップS1411では、ステップS1410にてフレームを跨いで加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1408へ進む。   In step S1411, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added across the frames in step S1410, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1408.

ステップS1412では、ステップS1407あるいはステップS1411で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1413へ進む。   In step S1412, the phase difference detection unit 221 calculates the phase difference having the highest correlation amount from the correlation amount for each image shift amount obtained in step S1407 or step S1411. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S1413.

ステップS1413では、算出されたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御が完了することでAF動作が終了となる。   In step S1413, the focal position of the lens group 101 is controlled via the lens controller 105 based on the calculated defocus amount. When the control is completed, the AF operation ends.

上記第5の実施形態によれば、撮像フレームレートに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させることができ、フレームレートのいかんにかかわらず、高精度な焦点検出を実現できる。   According to the fifth embodiment, it is possible to appropriately select a method for improving the reliability of different focus detection results according to the imaging frame rate, and realizes highly accurate focus detection regardless of the frame rate. it can.

[第6の実施形態]
本発明の第6の実施の形態に係る撮像装置は、その構成(図1)が上記第1の実施の形態に係る撮像装置と同じであり、第1の実施の形態と同様の部分については、同一の符号を用いてその説明を省略する。以下に、上記第1の実施の形態と異なる点のみを説明する。
[Sixth Embodiment]
The imaging apparatus according to the sixth embodiment of the present invention has the same configuration (FIG. 1) as that of the imaging apparatus according to the first embodiment, and the same parts as those in the first embodiment. The description will be omitted using the same reference numerals. Only differences from the first embodiment will be described below.

上記第5の実施形態では、撮像フレームレートが所定フレームレート閾値より低い場合に、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、相関量の状態で加算することで、焦点検出の信頼性を向上させていた。本発明の第6の実施形態では、相関量の状態で加算する代わりに、相関量から算出されるデフォーカス量の状態で加算するものである。   In the fifth embodiment, when the imaging frame rate is lower than the predetermined frame rate threshold, the image signal obtained from the pair of focus detection pixel columns that the imaging unit 213 has is added in the state of the correlation amount. By doing so, the reliability of focus detection was improved. In the sixth embodiment of the present invention, instead of adding in the correlation amount state, addition is performed in the defocus amount state calculated from the correlation amount.

図15は、本発明の第6の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 15 is a flowchart showing the flow of AF operation of the digital camera in the sixth embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、動作モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the operation mode is automatically set to the live view mode, and the captured subject image is displayed on the display unit 224 while the imaging unit 213 continuously performs imaging. To do.

まず、操作スイッチ214のSW1が押下されて、焦点検出命令が発生することにより処理が開始される。   First, when SW1 of the operation switch 214 is pressed and a focus detection command is generated, processing is started.

ステップS1501では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS1502へ進む。   In step S1501, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S1502.

ステップS1502では、撮像部213で被写体像を撮像し、1フレームの撮像信号を取得する。取得後、ステップS1503へ進む。   In step S1502, a subject image is picked up by the image pickup unit 213, and an image pickup signal of one frame is acquired. After acquisition, the process proceeds to step S1503.

ステップS1503では、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS1504へ進む。   In step S1503, an image signal obtained from a pair of focus detection pixel arrays that the imaging unit 213 has is acquired. After acquisition, the process proceeds to step S1504.

ステップS1504では、カメラコントローラ215は、ステップS1503で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS1505へ進む。   In step S1504, the camera controller 215 performs correction processing for suppressing various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system on the pair of image signals acquired in step S1503. After the correction process, the process proceeds to step S1505.

ステップS1505では、カメラコントローラ215は、操作部225で設定されている撮像モードのフレームレートが所定のフレームレート以上か判定する。所定のフレームレート未満の場合は、被写体が移動したり、デジタルカメラがぶれたりすることで、被写体像の像信号を加算した際に、被写体像が多重になったり輪郭に尾を引くような像になる可能性が高い。この場合、焦点検出に適した加算ができなくなってしまうことから、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を加算しないようにすることが望ましい。そこで、像信号の加算なく焦点検出の信頼性を向上させる効果が高い手法を行うために、ステップS1506へ進む。   In step S1505, the camera controller 215 determines whether the frame rate of the imaging mode set by the operation unit 225 is equal to or higher than a predetermined frame rate. If the frame rate is less than the predetermined frame rate, the subject will move or the digital camera may shake, so that when the subject image signal is added, the subject image will be multiplexed or the contour will be tailed. Is likely to be. In this case, since addition suitable for focus detection cannot be performed, it is desirable not to add image signals obtained from a pair of focus detection pixel arrays that the imaging unit 213 has. Therefore, the process proceeds to step S1506 in order to perform a technique that is highly effective in improving the reliability of focus detection without adding image signals.

一方、ステップS1505で撮影モードのフレームレートが所定のフレームレート以上であれば、焦点検出の信頼性を向上させる効果の高い、像信号を加算する手法を行うために、ステップS1511へ進む。   On the other hand, if the frame rate of the shooting mode is equal to or higher than the predetermined frame rate in step S1505, the process proceeds to step S1511 in order to perform a method of adding image signals that is highly effective in improving the reliability of focus detection.

ステップS1506では、ステップS1504で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1507へ進む。   In step S1506, the correlation calculation unit 219 performs a correlation calculation from the pair of focus detection image signals subjected to the correction process in step S1504, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1507.

ステップS1507では、ステップS1506で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1508へ進む。   In step S1507, the phase difference detection unit 221 calculates the phase difference having the highest correlation amount from the correlation amount for each image shift amount obtained in step S1506. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S1508.

ステップS1508では、異なるフレームにおける同じ焦点検出画素列の像信号から算出された相関量を相関演算の像ずらし量ごとに対応するよう相関量加算部220が加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。異なるフレームで個々に算出した相関演算の像ずらし量ごとの相関量を加算するだけなので、加算にかかる処理負荷を比較的軽くできる。また、相関演算の像ずらし量ごとに対応するよう相関量を加算することで、仮に値にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算平均後、ステップS1509へ進む。   In step S1508, the correlation amount adding unit 220 adds the correlation amount calculated from the image signals of the same focus detection pixel row in different frames to correspond to each image shift amount of the correlation calculation. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since only the correlation amount for each image shift amount of the correlation calculation individually calculated in different frames is added, the processing load for the addition can be made relatively light. In addition, by adding the correlation amount so as to correspond to each image shift amount of the correlation calculation, even if the value includes a variation, the variation is reduced according to the number of additions, so the reliability of the phase difference used for focus detection Can be increased. After the addition averaging, the process proceeds to step S1509.

ステップS1509では、カメラコントローラ215は、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS1510へ進む。   In step S1509, the camera controller 215 adds 1 to the count value n of the addition counter 218 and updates it. After the update, the process proceeds to step S1510.

ステップS1510では、カメラコントローラ215は、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、フレームを跨いで所定の加算数だけ加算処理を終えているかを判定する。加算カウンタ218のカウント値nが所定回数以上であれば、レンズ群101のフォーカス制御を行う動作に進めるため、ステップS1514へ進む。加算カウンタ218のカウント値nが所定回数未満であれば、所定回数の加算ができるよう、次フレームにおける1対の焦点検出画素列で得られる像信号を取得して、上述したステップの処理を同様に行うために、ステップS1502に戻る。   In step S <b> 1510, the camera controller 215 determines that the count value n of the addition counter 218 is a predetermined addition number across the frame with respect to the image signal obtained from the pair of focus detection pixel rows that the imaging unit 213 has. It is determined whether the addition process has been completed. If the count value n of the addition counter 218 is equal to or greater than the predetermined number, the process proceeds to step S1514 to proceed to the operation of performing the focus control of the lens group 101. If the count value n of the addition counter 218 is less than a predetermined number of times, an image signal obtained by a pair of focus detection pixel columns in the next frame is acquired so that the predetermined number of times can be added, and the above-described steps are performed in the same manner. Therefore, the process returns to step S1502.

ステップS1511では、ステップS1504で補正処理が行われた焦点検出用の1対の像信号を、画素加算部217がそれぞれ対応する画素同士で加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対してフレームを跨いて個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1512へ進む。   In step S <b> 1511, the pixel addition unit 217 adds the pair of image signals for focus detection subjected to the correction process in step S <b> 1504 to corresponding pixels. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since addition processing is individually performed across the frames for each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S1512.

ステップS1512では、ステップS1511にてフレームを跨いで加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1513へ進む。   In step S1512, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added across the frames in step S1511 to calculate a correlation amount for each image shift amount. After calculation, the process proceeds to step S1513.

ステップS1513では、ステップS1512で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1509へ進む。   In step S1513, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount obtained in step S1512. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S1509.

ステップS1514では、ステップS1508あるいはステップS1513で得られたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御が完了することでAF動作が終了となる。   In step S1514, the focal position of the lens group 101 is controlled via the lens controller 105 based on the defocus amount obtained in step S1508 or step S1513. When the control is completed, the AF operation ends.

本第6の実施形態によれば、上記第5の実施形態と同様の効果が得られる。具体的には、撮像フレームレートに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させることができ、フレームレートのいかんにかかわらず、高精度な焦点検出を実現できる。   According to the sixth embodiment, the same effect as in the fifth embodiment can be obtained. Specifically, a technique for improving the reliability of different focus detection results can be appropriately selected according to the imaging frame rate, and high-precision focus detection can be realized regardless of the frame rate.

[第7の実施形態]
本発明の第7の実施の形態に係る撮像装置は、その構成(図1)が上記第1の実施の形態に係る撮像装置と同じであり、第1の実施の形態と同様の部分については、同一の符号を用いてその説明を省略する。以下に、上記第1の実施の形態と異なる点のみを説明する。
[Seventh Embodiment]
The imaging apparatus according to the seventh embodiment of the present invention has the same configuration (FIG. 1) as that of the imaging apparatus according to the first embodiment, and the same parts as those in the first embodiment. The description will be omitted using the same reference numerals. Only differences from the first embodiment will be described below.

上記第3の実施形態では、カメラ部200の処理負荷の重い動画記録モード時と処理負荷の軽い他モードの時とで、異なる焦点検出結果の信頼性向上手法を選択していた。   In the third embodiment, different methods for improving the reliability of focus detection results are selected in the moving image recording mode with a heavy processing load of the camera unit 200 and in another mode with a light processing load.

しかしながら、屋外の撮影において、晴れたり曇ったりする変化が頻繁に繰り返されることで、被写体の輝度が大きく変化する場合、絞り102の開口が頻繁に制御される可能性がある。この場合、焦点検出に用いる像信号の各画素を加算する手法だと、1対の像信号の基線長が絞り変化によって相対的に変化してしまうため、焦点検出に適した加算ができない。そこで、第7の実施形態におけるデジタルカメラでは、絞り102の変動状況によって、異なる焦点検出結果の信頼性向上手法を選択するものである。   However, in outdoor shooting, when the brightness of the subject changes greatly due to frequent changes such as clear or cloudy, the aperture of the aperture 102 may be frequently controlled. In this case, with the method of adding each pixel of the image signal used for focus detection, the base line length of the pair of image signals changes relatively due to the change of the aperture, so that addition suitable for focus detection cannot be performed. Therefore, in the digital camera according to the seventh embodiment, different methods for improving the reliability of the focus detection result are selected depending on the fluctuation state of the aperture 102.

本第7の実施形態におけるデジタルカメラは、上記第3の実施形態におけるデジタルカメラに対して、連続的に焦点検出を行い続けるコンティニュアスAFモードを有し、操作部225への操作入力によってモードの入/切が切り替えできる点が異なる。   The digital camera according to the seventh embodiment has a continuous AF mode in which focus detection is continuously performed with respect to the digital camera according to the third embodiment, and the mode is determined by an operation input to the operation unit 225. The difference is that you can switch on / off.

図16は、本発明の第7の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 16 is a flowchart showing the flow of AF operation of the digital camera in the seventh embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、動作モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the operation mode is automatically set to the live view mode, and the captured subject image is displayed on the display unit 224 while the imaging unit 213 continuously performs imaging. To do.

まず、操作スイッチ214のSW1が押下されることにより処理が開始される。   First, processing is started when SW1 of the operation switch 214 is pressed.

ステップS1601では、カメラコントローラ215は、操作部225の操作入力によって、コンティニュアスAFモードに入れられているか判定する。モードに入っていればステップS1602へ進む。一方、モードに入っていなければ、動作を終了する。   In step S <b> 1601, the camera controller 215 determines whether the continuous AF mode is set based on an operation input from the operation unit 225. If the mode is entered, the process proceeds to step S1602. On the other hand, if the mode is not entered, the operation is terminated.

ステップS1602では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS1603へ進む。   In step S1602, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S1603.

ステップS1603では、カメラコントローラ215は、絞り102で現在設定されている絞り値を、絞り状況の変化を監視するため、一時記憶する。記憶後、ステップS1604へ進む。   In step S1603, the camera controller 215 temporarily stores the aperture value currently set for the aperture 102 in order to monitor changes in the aperture status. After storing, the process proceeds to step S1604.

ステップS1604では、撮像部213で被写体像を撮像し、1フレームの撮像信号を取得する。取得後、ステップS1605へ進む。   In step S1604, the imaging unit 213 captures a subject image, and acquires an imaging signal of one frame. After acquisition, the process proceeds to step S1605.

ステップS1605では、撮像部213における1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS1606へ進む。   In step S1605, an image signal obtained from a pair of focus detection pixel rows in the imaging unit 213 is acquired. After acquisition, the process proceeds to step S1606.

ステップS1606では、カメラコントローラ215は、ステップS1605で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS1607へ進む。   In step S <b> 1606, the camera controller 215 performs correction processing for suppressing various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system on the pair of image signals acquired in step S <b> 1605. After the correction process, the process proceeds to step S1607.

ステップS1607では、カメラコントローラ215は、絞り102の絞り値が前フレームから変化しているか判定する。絞り値が変化している場合、1対の像信号の位相差の検出にあたり、合焦時に生じる位相差である基線長が変化する。被写体像の像信号を加算した際に、異なる基線長の被写体像を重ねるため、絞り値の変化に応じた被写体像の位相ずれが生じて、被写体像が多重になってしまい、焦点検出に適した加算ができなくなってしまう。そこで、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を加算しないようにすることが望ましい。そこで、像信号の加算なく焦点検出の信頼性を向上させる効果が高い手法を行うために、ステップS1608へ進む。   In step S1607, the camera controller 215 determines whether the aperture value of the aperture 102 has changed from the previous frame. When the aperture value changes, the base line length, which is the phase difference generated during focusing, changes when detecting the phase difference between a pair of image signals. When the image signals of the subject images are added, subject images with different baseline lengths are overlapped, so that the subject images are phase-shifted according to the change of the aperture value, and the subject images are multiplexed, which is suitable for focus detection. It becomes impossible to add. Therefore, it is desirable not to add image signals obtained from a pair of focus detection pixel rows that the imaging unit 213 has. Therefore, the process proceeds to step S1608 in order to perform a technique that is highly effective in improving the reliability of focus detection without adding image signals.

一方、ステップS1607で絞り値が変化していなければ、焦点検出の信頼性を向上させる効果が高い像信号を得るために、ステップS1611へ進む。   On the other hand, if the aperture value has not changed in step S1607, the process proceeds to step S1611 in order to obtain an image signal that is highly effective in improving the reliability of focus detection.

ステップS1608では、ステップS1606で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1609へ進む。   In step S1608, the correlation calculation unit 219 performs a correlation calculation from the pair of focus detection image signals subjected to the correction process in step S1606, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1609.

ステップS1609では、ステップS1608で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1610へ進む。   In step S1609, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount obtained in step S1608. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S1610.

ステップS1610では、像信号の加算なく焦点検出の信頼性を向上させる手法を用いるために、異なるフレームにおける同じ焦点検出画素列の像信号からそれぞれ算出したデフォーカス量をデフォーカス量加算部223が加算平均する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。異なるフレームで個々に算出したデフォーカス量の値を加算平均するだけなので、加算平均にかかる処理負荷が非常に軽くできる。また、デフォーカス量を加算平均することで、仮にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算平均後、ステップS1614へ進む。   In step S1610, the defocus amount adding unit 223 adds the defocus amounts calculated from the image signals of the same focus detection pixel column in different frames in order to use the technique for improving the focus detection reliability without adding the image signals. Average. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since only the defocus amount values calculated individually in different frames are added and averaged, the processing load required for the averaging can be made very light. In addition, by averaging the defocus amounts, even if a variation is included, the variation is reduced according to the number of additions, so that the reliability of the phase difference used for focus detection can be improved. After the addition averaging, the process proceeds to step S1614.

ステップS1611では、被写体やデジタルカメラの移動を考慮する必要がなく効果の高い手法を用いるために、ステップS1606で補正処理が行われた焦点検出用の1対の像信号を、画素加算部217がそれぞれ対応する画素同士で加算する。本実施形態では、加算カウンタ218がカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対してフレームを跨いて個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1612へ進む。   In step S <b> 1611, the pixel adding unit 217 outputs the pair of image signals for focus detection corrected in step S <b> 1606 in order to use a highly effective method without considering the movement of the subject or the digital camera. Each corresponding pixel is added. In the present embodiment, the addition counter 218 performs addition until the count value n reaches a predetermined number of times. However, since there is no addition target in the first process, only counting is performed. Since addition processing is individually performed across the frames for each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S1612.

ステップS1612では、ステップS1611にてフレームを跨いで加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1613へ進む。   In step S1612, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added across the frames in step S1611, and calculates a correlation amount for each image shift amount. After calculation, the process proceeds to step S1613.

ステップS1613では、ステップS1612で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1614へ進む。   In step S1613, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount obtained in step S1612. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S1614.

ステップS1614では、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、フレームを跨いで所定の加算数だけ像信号が取得できているかを判定する。加算カウンタ218のカウント値nが所定回数以上であれば、ステップS1615へ進み、所定回数分の過去のフレームの古いデータを削除する。削除する古いデータの種類は、ステップS1009で過去に算出されたデフォーカス量、あるいはステップS1005乃至ステップS1006で過去に得られた補正済みの焦点検出用の1対の像信号である。削除後、ステップS1617へ進む。   In step S1614, the count value n of the addition counter 218 can acquire an image signal of a predetermined number of additions across the frame with respect to an image signal obtained from a pair of focus detection pixel arrays that the imaging unit 213 has. Judge whether it is. If the count value n of the addition counter 218 is equal to or greater than the predetermined number, the process proceeds to step S1615, and the old data of the past frame for the predetermined number of times is deleted. The type of old data to be deleted is the defocus amount calculated in the past in step S1009 or the corrected pair of image signals for focus detection obtained in the past in steps S1005 to S1006. After deletion, the process proceeds to step S1617.

ステップS1614において、加算カウンタ218のカウント値nが所定回数未満であれば、ステップS1616へ進み、カメラコントローラ215は、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS1617へ進む。   If the count value n of the addition counter 218 is less than the predetermined number in step S1614, the process proceeds to step S1616, and the camera controller 215 adds 1 to the count value n of the addition counter 218 and updates it. After the update, the process proceeds to step S1617.

ステップS1617では、ステップS1610あるいはステップS1613で得られたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御後、ステップS1618へ進む。   In step S1617, the focal position of the lens group 101 is controlled via the lens controller 105 based on the defocus amount obtained in step S1610 or step S1613. After control, the process proceeds to step S1618.

ステップS1618では、コンティニュアスAFモードの動作を続けるか否かを判定するため、SW1の押下状況を判定する。SW1が解放されずに押下し続けられていれば、コンティニュアスAFモードの動作を続けるため、ステップS1603へ戻る。SW1が解放されていれば、コンティニュアスAFモードの動作が終了となる。   In step S1618, in order to determine whether or not to continue the operation in the continuous AF mode, the pressing state of SW1 is determined. If SW1 is kept pressed without being released, the operation returns to step S1603 to continue the operation in the continuous AF mode. If SW1 is released, the operation in the continuous AF mode is completed.

本第7の実施形態によれば、撮像部213における焦点検出画素列に結像する各光線において、絞り102の絞り値の変化によって各光線の基線長が変化しているか否かを確認できる。また、確認された結果に応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させることができ、絞り値の変化の有無にかかわらず、高精度な焦点検出を実現できる。   According to the seventh embodiment, it is possible to confirm whether or not the base line length of each light beam has changed due to the change in the aperture value of the diaphragm 102 in each light beam that forms an image on the focus detection pixel column in the imaging unit 213. In addition, depending on the confirmed result, a method for improving the reliability of different focus detection results can be appropriately selected, and high-precision focus detection can be realized regardless of whether or not the aperture value has changed.

[第8の実施形態]
上記第3の実施形態では、カメラ部200の処理負荷の重い動画記録モード時と処理負荷の軽い他モードの時とで、異なる焦点検出結果の信頼性向上手法を選択していた。
[Eighth Embodiment]
In the third embodiment, different methods for improving the reliability of focus detection results are selected in the moving image recording mode with a heavy processing load of the camera unit 200 and in another mode with a light processing load.

しかしながら、像信号の各画素を加算する方式の信頼性向上手法では、被写体が移動したり、デジタルカメラがぶれたりした場合に、被写体像が多重になったり輪郭に尾を引くような像になったりして、焦点検出に適した加算ができない。特に、人物を被写体にした場合において、さらにその人物の顔の大きさが大きい場合、人物の移動による構図変化は大きいと考えられる。そこで、本発明の第8の実施形態では、撮像部213で得られる被写体像から顔を検出して、その顔の大きさを算出する手段を備え、検出された顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を選択するものである。   However, with the method of improving the reliability of the method of adding each pixel of the image signal, when the subject moves or the digital camera shakes, the subject image is multiplexed or the image has a tail. Therefore, addition suitable for focus detection cannot be performed. In particular, when a person is a subject and the face size of the person is larger, the composition change due to the movement of the person is considered to be large. Therefore, in the eighth embodiment of the present invention, there is provided means for detecting a face from the subject image obtained by the imaging unit 213 and calculating the size of the face, and according to the detected face size, A method for improving the reliability of different focus detection results is selected.

図17は、本発明の第8の実施形態に係る撮像装置の概略構成を示す図である。   FIG. 17 is a diagram showing a schematic configuration of an imaging apparatus according to the eighth embodiment of the present invention.

図17に示すデジタルカメラは、図1に示すデジタルカメラに対して、撮像部213で得られる被写体像から顔を検出して、その顔の大きさを算出する顔検出部227が追加されている点が異なる。   The digital camera shown in FIG. 17 has a face detection unit 227 that detects a face from the subject image obtained by the imaging unit 213 and calculates the size of the face in addition to the digital camera shown in FIG. The point is different.

図18は、本発明の第8の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 18 is a flowchart showing a flow of AF operation of the digital camera in the eighth embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、動作モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the operation mode is automatically set to the live view mode, and the captured subject image is displayed on the display unit 224 while the imaging unit 213 continuously performs imaging. To do.

まず、操作スイッチ214のSW1が押下されることにより処理が開始される。   First, processing is started when SW1 of the operation switch 214 is pressed.

ステップS180では、カメラコントローラ215は、操作部225の操作入力によって、コンティニュアスAFモードに入れられているか判定する。モードに入っていればステップS1802へ進む。一方、モードに入っていなければ、動作を終了する。   In step S <b> 180, the camera controller 215 determines whether the continuous AF mode is set based on an operation input from the operation unit 225. If it is in the mode, the process proceeds to step S1802. On the other hand, if the mode is not entered, the operation is terminated.

ステップS1802では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS1803へ進む。   In step S1802, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S1803.

ステップS1803では、撮像部213で被写体像を撮像し、1フレームの撮像信号を取得する。取得後、ステップS1804へ進む。   In step S1803, the imaging unit 213 captures a subject image and obtains an imaging signal for one frame. After acquisition, the process proceeds to step S1804.

ステップS1804では、撮像部213で得られた1フレームの撮像信号に人物の顔が含まれているか顔検出部227が検出し、また顔が含まれている場合はさらに顔検出部227がその顔サイズを検出する。顔検出の有無や検出された顔の大きさといった顔情報は、後述する処理で顔の大きさの変化を監視するため、一時記憶される。記憶後、ステップS1805へ進む。   In step S1804, the face detection unit 227 detects whether a person's face is included in one frame of the imaging signal obtained by the imaging unit 213. If the face is included, the face detection unit 227 further detects the face. Detect the size. Face information such as the presence / absence of face detection and the size of the detected face is temporarily stored in order to monitor changes in the size of the face in the process described later. After storing, the process proceeds to step S1805.

ステップS1805では、撮像部213における1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS1806へ進む。   In step S1805, an image signal obtained from a pair of focus detection pixel rows in the imaging unit 213 is acquired. After acquisition, the process proceeds to step S1806.

ステップS1806では、カメラコントローラ215は、ステップS1805で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS1807へ進む。   In step S1806, the camera controller 215 performs correction processing for suppressing various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system on the pair of image signals acquired in step S1805. After the correction process, the process proceeds to step S1807.

ステップS1807では、カメラコントローラ215は、所定の条件を満足するか否か、すなわち顔が検出されていてその顔の大きさが所定の閾値以上か判定する。顔が検出されていてその顔の大きさが閾値以上である場合は、人物の移動による構図変化が大きいと考えられる。このまま被写体像の像信号を加算した際に、異なる位置の顔が重ねられるため、被写体像が多重になってしまい、焦点検出に適した加算ができない。この場合は、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を加算しないようにすることが望ましい。そこで、像信号の加算なく焦点検出の信頼性を向上させる効果が高い手法を行うために、ステップS1808へ進む。   In step S1807, the camera controller 215 determines whether or not a predetermined condition is satisfied, that is, whether or not a face is detected and the size of the face is greater than or equal to a predetermined threshold. If a face is detected and the size of the face is greater than or equal to the threshold, it is considered that the composition change due to the movement of the person is large. When the image signals of the subject images are added as they are, faces at different positions are overlapped, so that the subject images are multiplexed, and addition suitable for focus detection cannot be performed. In this case, it is desirable not to add image signals obtained from a pair of focus detection pixel rows that the imaging unit 213 has. Therefore, the process proceeds to step S1808 in order to perform a technique that is highly effective in improving the reliability of focus detection without adding image signals.

一方、ステップS1807で顔が検出されていない場合、あるいは顔が検出されているもののその顔の大きさが閾値未満である場合は、焦点検出の信頼性を向上させる効果が高い像信号を得るために、ステップS1811へ進む。   On the other hand, if a face is not detected in step S1807, or if a face is detected but the size of the face is less than a threshold, an image signal that is highly effective in improving focus detection reliability is obtained. Then, the process proceeds to step S1811.

ステップS1808では、ステップS1806で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1809へ進む。   In step S1808, the correlation calculation unit 219 performs a correlation calculation from the pair of focus detection image signals that have been corrected in step S1806, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1809.

ステップS1809では、異なるフレームにおける同じ焦点検出画素列の像信号から算出された相関量を相関量加算部220が加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。相関量の値を加算するだけなので、加算にかかる処理負荷を比較的軽くできる。また、相関量を加算することで、仮に値にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1812へ進む。   In step S1809, the correlation amount adding unit 220 adds the correlation amounts calculated from the image signals of the same focus detection pixel row in different frames. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since only the correlation value is added, the processing load for the addition can be made relatively light. Further, by adding the correlation amount, even if the value includes a variation, the variation is settled according to the number of additions, so that the reliability of the phase difference used for focus detection can be improved. After the addition, the process proceeds to step S1812.

ステップS1810では、被写体やデジタルカメラの移動を考慮する必要がなく効果の高い手法を用いるために、ステップS1806で補正処理が行われた焦点検出用の1対の像信号を、画素加算部217がそれぞれ対応する画素同士で加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対してフレームを跨いて個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS1811へ進む。   In step S1810, the pixel adding unit 217 uses the pair of image signals for focus detection corrected in step S1806 in order to use a highly effective method without considering the movement of the subject or the digital camera. Each corresponding pixel is added. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since addition processing is individually performed across the frames for each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S1811.

ステップS1811では、ステップS1810にてフレームを跨いで加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS1812へ進む。   In step S1811, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added across the frames in step S1810, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S1812.

ステップS1812では、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、フレームを跨いで所定回数の像信号が取得できているかを判定する。加算カウンタのカウント値nが所定回数以上であれば、ステップS1813へ進み、所定回数分の過去のフレームの古いデータを削除する。削除する古いデータの種類は、ステップS1809で過去に算出されたデフォーカス量、あるいはステップS1805乃至ステップS1806で過去に得られた補正済みの焦点検出用の1対の像信号である。削除後、ステップS1815へ進む。一方、加算カウンタのカウント値nが所定回数未満であれば、ステップS1814へ進み、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS1815へ進む。   In step S1812, whether the count value n of the addition counter 218 has acquired the image signal a predetermined number of times across the frame with respect to the image signal obtained from a pair of focus detection pixel columns included in the imaging unit 213. Determine. If the count value n of the addition counter is equal to or greater than the predetermined number, the process advances to step S1813 to delete old data of the past frame for the predetermined number of times. The type of old data to be deleted is the defocus amount calculated in the past in step S1809 or a corrected pair of image signals for focus detection obtained in the past in steps S1805 to S1806. After deletion, the process proceeds to step S1815. On the other hand, if the count value n of the addition counter is less than the predetermined number, the process proceeds to step S1814, where 1 is added to the count value n of the addition counter 218 and updated. After the update, the process proceeds to step S1815.

ステップS1815では、ステップS1809あるいはステップS1811で算出された像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS1816へ進む。   In step S1815, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount calculated in step S1809 or step S1811. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After calculation, the process proceeds to step S1816.

ステップS1816では、ステップS1815で得られたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御後、ステップS1817へ進む。   In step S1816, the focal position of the lens group 101 is controlled via the lens controller 105 based on the defocus amount obtained in step S1815. After control, the process proceeds to step S1817.

ステップS1817では、コンティニュアスAFモードの動作を続けるか否かを判定するため、SW1の押下状況を判定する。SW1が解放されずに押下し続けられていれば、コンティニュアスAFモードの動作を続けるため、ステップS1803へ戻る。一方、SW1が解放されていれば、コンティニュアスAFモードの動作が終了となる。   In step S1817, in order to determine whether or not to continue the operation in the continuous AF mode, the pressing state of SW1 is determined. If SW1 is kept pressed without being released, the operation returns to step S1803 to continue the operation in the continuous AF mode. On the other hand, if SW1 is released, the operation in the continuous AF mode is completed.

本第8の実施形態によれば、被写体が人物かどうか顔検出を行い、顔の有無や顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させることができる。このため、人物の被写体が移動するか否かにかかわらず、高精度な焦点検出を実現できる。   According to the eighth embodiment, face detection can be performed to determine whether or not the subject is a person, and a different focus detection result reliability improvement method can be appropriately selected according to the presence or absence of the face and the size of the face. For this reason, high-precision focus detection can be realized regardless of whether or not a person's subject moves.

上記第8の実施形態では、顔を検出して、その顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させていた。しかし、これに限らず、顔を検出してその顔サイズを撮像される度に監視して、顔の大きさが前フレームから変化しているか検出し、変化の有無あるいは程度に応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させる構成でもよい。なお、このような構成の場合、デジタルカメラの動作は、基本的に上記第8の実施形態と同様であるが、図18におけるステップS1807が、顔の大きさが前フレームから変化しているか、あるいは所定閾値以上の変化があるか、という判定になる。   In the eighth embodiment, a face is detected, and a different focus detection result reliability improvement method is appropriately selected according to the size of the face. However, the present invention is not limited to this, and each time a face is detected and its face size is imaged, it is detected whether the face size has changed from the previous frame, and varies depending on whether or not there is a change. A configuration may be adopted in which a technique for improving the reliability of the focus detection result is appropriately selected. In the case of such a configuration, the operation of the digital camera is basically the same as that in the eighth embodiment, but step S1807 in FIG. 18 determines whether the face size has changed from the previous frame. Alternatively, it is determined whether there is a change greater than a predetermined threshold.

上述の動作を行うことにより、上記第8の実施形態と同様の効果が得られるようになる。具体的には、被写体が人物かどうか顔検出を行い、顔の大きさが変化して人物が移動しているかの判定に基づき、異なる焦点検出結果の信頼性向上手法を適切に選択させることができる。このため、人物の被写体が移動するか否かにかかわらず、高精度な焦点検出を実現できる。   By performing the above-described operation, the same effect as in the eighth embodiment can be obtained. Specifically, it is possible to perform face detection to determine whether the subject is a person, and to appropriately select a method for improving the reliability of different focus detection results based on the determination of whether the person is moving as the face size changes. it can. For this reason, high-precision focus detection can be realized regardless of whether or not a person's subject moves.

また、上記第8の実施形態では、顔を検出して、その顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させていた。しかし、これに限らず、顔を検出した検出数に応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させてもよい。   In the eighth embodiment, a face is detected, and different methods for improving the reliability of focus detection results are appropriately selected according to the size of the face. However, the present invention is not limited to this, and different methods for improving the reliability of focus detection results may be appropriately selected according to the number of detected faces.

また、本変形例のデジタルカメラの動作は、基本的に上記第8の実施形態と同様の動作である。しかし、上記第8の実施形態の動作を説明した図18における、ステップS1807の動作が変わり、顔の検出数が所定閾値以上かという判定である。   The operation of the digital camera according to the present modification is basically the same as that of the eighth embodiment. However, in FIG. 18 illustrating the operation of the eighth embodiment, the operation in step S1807 is changed, and it is determined whether the number of detected faces is equal to or greater than a predetermined threshold.

上述の動作を行うことにより、上記第8の実施形態と同様の効果が得られるようになる。具体的には、被写体が人物かどうか顔検出を行い、顔の検出数が所定閾値以上であれば集合写真と推測して、人物の移動が少ないと判定する。一方、顔の検出数が所定閾値未満であれば、少人数のポートレート写真と推測して、人物の移動の可能性があると判定する。このように、検出された顔の数に基づいて、人物の移動の可能性を判定して、異なる焦点検出結果の信頼性向上手法を適切に選択させることができる。このため、人物の被写体が移動するか否かにかかわらず、高精度な焦点検出を実現できる。   By performing the above-described operation, the same effect as in the eighth embodiment can be obtained. Specifically, face detection is performed to determine whether or not the subject is a person. If the number of detected faces is equal to or greater than a predetermined threshold, it is estimated that the photograph is a group photo, and it is determined that the movement of the person is small. On the other hand, if the number of detected faces is less than the predetermined threshold value, it is estimated that the portrait photograph is a small number of people and it is determined that there is a possibility of movement of the person. In this way, it is possible to determine the possibility of movement of a person based on the number of detected faces and to appropriately select a method for improving the reliability of different focus detection results. For this reason, high-precision focus detection can be realized regardless of whether or not a person's subject moves.

[第9の実施形態]
本発明の第9の実施形態では、撮像部213に有する1対の焦点検出画素列から得られる像信号を、複数フレーム分それぞれ取得して、各像信号あるいは各像信号から個々に算出された相関量を加算していた。しかし、これに限らず、撮像部213とは別に、撮像部213へ入射する光束を途中で光路分割して、独立した焦点検出センサへ結像させる構成であっても、同様の加算動作を行え、同様の効果を得ることができる。
[Ninth Embodiment]
In the ninth embodiment of the present invention, image signals obtained from a pair of focus detection pixel arrays included in the imaging unit 213 are acquired for a plurality of frames, and each image signal or each image signal is calculated individually. The amount of correlation was added. However, the present invention is not limited to this, and the same addition operation can be performed even in a configuration in which a light beam incident on the imaging unit 213 is split in the middle of the optical path and imaged on an independent focus detection sensor separately from the imaging unit 213. The same effect can be obtained.

図19は、本発明の第9の実施形態に係る撮像装置の概略構成を示す図である。   FIG. 19 is a diagram showing a schematic configuration of an imaging apparatus according to the ninth embodiment of the present invention.

図19において、デジタルカメラは、レンズ部100とカメラ部200からなる。レンズ部100は、不図示のマウント部のレンズ装着機構を介してカメラ部200に着脱可能に取り付けられている。マウント部には、電気接点ユニット108が設けられている。この電気接点ユニット108には、通信クロックライン、データ転送ライン、データ受信ラインなどからなる通信バスライン用の端子がある。これらにより、レンズ部100とカメラ部200が通信可能になっている。   In FIG. 19, the digital camera includes a lens unit 100 and a camera unit 200. The lens unit 100 is detachably attached to the camera unit 200 via a lens mounting mechanism of a mount unit (not shown). An electrical contact unit 108 is provided on the mount portion. The electrical contact unit 108 has a communication bus line terminal including a communication clock line, a data transfer line, a data reception line, and the like. As a result, the lens unit 100 and the camera unit 200 can communicate with each other.

レンズ部100には、撮像光学系を構成し、フォーカスやズームを行うレンズ群101、入射光線を制御する絞り102が設けられている。また、レンズ群101のズームやフォーカスを行うためのステッピングモータからなる駆動系、及び駆動系を制御するレンズ駆動ユニット103が設けられている。レンズ駆動ユニット103などは焦点制御手段を構成する。   The lens unit 100 includes an imaging optical system, a lens group 101 that performs focusing and zooming, and a diaphragm 102 that controls incident light. In addition, a driving system including a stepping motor for performing zooming and focusing of the lens group 101 and a lens driving unit 103 for controlling the driving system are provided. The lens driving unit 103 and the like constitute a focus control unit.

また、レンズ部100には、絞り102の開口を制御する絞り制御ユニット104と、レンズ群101のズーム、フォーカス、絞りの各種光学設計値が記録された光学情報記録部106が設けられている。   In addition, the lens unit 100 includes an aperture control unit 104 that controls the aperture of the aperture 102 and an optical information recording unit 106 that records various optical design values of the zoom, focus, and aperture of the lens group 101.

レンズ駆動ユニット103、絞り制御ユニット104、および光学情報記録部106は、レンズ部100全体の動作を制御するCPUからなるレンズコントローラ105に接続されている。   The lens driving unit 103, the aperture control unit 104, and the optical information recording unit 106 are connected to a lens controller 105 that includes a CPU that controls the operation of the entire lens unit 100.

また、レンズ部100には、レンズ駆動ユニット103に内包されたステッピングモータの位相波形を、レンズ駆動ユニット103からレンズコントローラ105を通じて取得してレンズの位置情報を検出するレンズ位置検出部107が設けられている。   In addition, the lens unit 100 is provided with a lens position detection unit 107 that acquires the phase waveform of the stepping motor included in the lens driving unit 103 from the lens driving unit 103 through the lens controller 105 and detects lens position information. ing.

カメラ部200は、レンズ部100と電気接点ユニット108を介して通信を行い、レンズ群101のズームやフォーカス、絞り102の開口について制御要求を送信し、制御結果を受信する。   The camera unit 200 communicates with the lens unit 100 via the electrical contact unit 108, transmits a control request for the zoom and focus of the lens group 101, and the aperture of the diaphragm 102, and receives a control result.

入射光線は、レンズ群101及び絞り102を介して、カメラ部200内のクイックリターンミラー203に導かれる。クイックリターンミラー203は、撮影光路内に、光軸に対して斜めに配置されている。そして、クイックリターンミラー203がアップまたはダウンすることにより、被写体からの光束を上方のファインダ光学系に導く第1の位置(図示した位置)と、撮影光路外に退避する第2の位置とに移動が可能である。   The incident light beam is guided to the quick return mirror 203 in the camera unit 200 through the lens group 101 and the diaphragm 102. The quick return mirror 203 is disposed obliquely with respect to the optical axis in the photographing optical path. Then, the quick return mirror 203 is moved up or down to move to a first position (illustrated position) for guiding the light beam from the subject to the upper viewfinder optical system and a second position for retreating from the photographing optical path. Is possible.

クイックリターンミラー203の中央部はハーフミラーになっており、クイックリターンミラー203が第1の位置にダウンしているときには、被写体からの光束の一部が該ハーフミラー部を透過する。そして、この透過した光束は、クイックリターンミラー203の背面側に設けられたサブミラー204で反射される。サブミラー204で反射された光束は、焦点検出に不要な光束をカットする視野マスク205、赤外カットフィルタ206、フィールドレンズ207、焦点検出用の絞り208、2次結像レンズ209を経て、焦点検出装置の焦点検出センサ210上に結像する。この像を光電変換して得られる像信号を処理することで、レンズ群101の焦点位置を検出することができる。   The central portion of the quick return mirror 203 is a half mirror, and when the quick return mirror 203 is down to the first position, a part of the light beam from the subject passes through the half mirror portion. The transmitted light beam is reflected by the sub mirror 204 provided on the back side of the quick return mirror 203. The light beam reflected by the sub-mirror 204 passes through a field mask 205 that cuts a light beam that is not necessary for focus detection, an infrared cut filter 206, a field lens 207, a focus detection diaphragm 208, and a secondary imaging lens 209. An image is formed on the focus detection sensor 210 of the apparatus. By processing an image signal obtained by photoelectrically converting this image, the focal position of the lens group 101 can be detected.

以上のように、本実施形態では、1対の複数画素列を複数有するセンサが、被写体からの光線を撮像面へ結像させる1次結像系の途中で光路分割された2次結像系に設けられている。   As described above, in the present embodiment, a secondary imaging system in which a sensor having a plurality of pairs of a plurality of pixel columns is optically divided in the middle of a primary imaging system that forms an image of light rays from a subject on an imaging surface. Is provided.

一方、クイックリターンミラー203で反射された光束は、ピント面に設けられたファインダスクリーン202、ペンタプリズム201、接眼レンズ211により構成されるファインダ光学系を介して、撮影者の目に至る。また、測光部212が、ペンタプリズム201で折り曲げられた光束を斜めから観察するように配置され、光束のうち2次元の撮影平面に相当する領域内で、さらに複数に分割された区分領域ごとに測光が行われる。上記区分領域の各測光結果は、CPUからなりカメラ部200の全体を制御するカメラコントローラ215へ出力される。   On the other hand, the light beam reflected by the quick return mirror 203 reaches the eyes of the photographer through a finder optical system including a finder screen 202, a pentaprism 201, and an eyepiece 211 provided on the focus surface. In addition, the photometry unit 212 is arranged so as to observe the light beam bent by the pentaprism 201 from an oblique direction, and is divided into a plurality of divided regions in an area corresponding to a two-dimensional imaging plane of the light beam. Photometry is performed. Each photometric result in the segmented area is output to a camera controller 215 that is composed of a CPU and controls the entire camera unit 200.

クイックリターンミラー203が第2の位置にアップした際には、レンズ部100からの光束は、不図示の光電変換素子及び現像演算を行うプロセッサからなる撮像部213へ至る。撮像部213では、入射した被写体像を光電変換して現像演算することで撮像データが得られる。   When the quick return mirror 203 is raised to the second position, the light beam from the lens unit 100 reaches the imaging unit 213 including a photoelectric conversion element (not shown) and a processor that performs development calculation. In the imaging unit 213, imaging data is obtained by photoelectrically converting an incident subject image and performing development calculation.

また、カメラ部200へ操作入力を行うための操作スイッチ214が設けられている。操作スイッチ214は、2段ストロークタイプのスイッチで構成されており、1段目のスイッチ(SW1)は、測光や焦点検出など撮影準備動作を開始させるためのスイッチである。2段目のスイッチ(SW2)は、静止画を取得するため、撮像部213で電荷蓄積及び電荷読み出しといった撮影動作を開始させるためのスイッチである。   In addition, an operation switch 214 for performing an operation input to the camera unit 200 is provided. The operation switch 214 is composed of a two-stage stroke type switch, and the first-stage switch (SW1) is a switch for starting a photographing preparation operation such as photometry and focus detection. The second-stage switch (SW2) is a switch for starting an imaging operation such as charge accumulation and charge reading in the imaging unit 213 in order to acquire a still image.

また、撮像部213には1対の焦点検出用画素列を複数有し、1対の焦点検出用画素列から光電変換して得られた1対の像信号は、カメラコントローラ215と接続されているメモリ216に一時記憶される。メモリ216に一時記憶された1対の被写体像の像信号は、カメラコントローラ215と接続されている画素加算部217へ送られ、撮像部213上の位置的に対応する画素単位で所定回数だけ加算される。加算状況は加算カウンタ218で数えられ、画素加算部217は、加算カウンタが所定回数に達するまで加算する。加算された1対の像信号は、カメラコントローラ215と接続されている相関演算部219へ送られ、相関演算により像シフト量ごとの相関量が算出される。算出された相関量は、カメラコントローラ215と接続されている相関量加算部220で、加算カウンタ218で回数をカウントしながら、所定回数だけ加算される。加算された相関量は、位相差検出部221で最も相関量が高くなる位相差が算出される。デフォーカス量検出部222は、算出された位相差とレンズ部100の光学特性に基づいて、公知の位相差検出方式の焦点検出方法によりデフォーカス量が算出される。算出されたデフォーカス量は、デフォーカス量加算部223へ送られ、加算カウンタ218で回数をカウントしながら、所定回数だけ加算される。カメラコントローラ215は、電気接点ユニット108を介してレンズコントローラ105と制御情報を送受信し、デフォーカス量検出部222あるいはデフォーカス量加算部223で算出されたデフォーカス量に基づいて、レンズ群101の焦点位置を制御する。   The imaging unit 213 includes a plurality of pairs of focus detection pixel arrays, and a pair of image signals obtained by photoelectric conversion from the pair of focus detection pixel arrays is connected to the camera controller 215. Is temporarily stored in the memory 216. The image signals of the pair of subject images temporarily stored in the memory 216 are sent to the pixel adder 217 connected to the camera controller 215, and are added a predetermined number of times in units of corresponding pixels on the image pickup unit 213. Is done. The addition status is counted by the addition counter 218, and the pixel addition unit 217 adds until the addition counter reaches a predetermined number of times. The added pair of image signals is sent to a correlation calculation unit 219 connected to the camera controller 215, and a correlation amount for each image shift amount is calculated by the correlation calculation. The calculated correlation amount is added a predetermined number of times while the correlation amount adding unit 220 connected to the camera controller 215 counts the number of times by the addition counter 218. As the added correlation amount, the phase difference at which the correlation amount becomes the highest in the phase difference detection unit 221 is calculated. Based on the calculated phase difference and the optical characteristics of the lens unit 100, the defocus amount detection unit 222 calculates the defocus amount by a known focus detection method using a phase difference detection method. The calculated defocus amount is sent to the defocus amount adding unit 223, and is added a predetermined number of times while the addition counter 218 counts the number of times. The camera controller 215 transmits / receives control information to / from the lens controller 105 via the electrical contact unit 108, and based on the defocus amount calculated by the defocus amount detection unit 222 or the defocus amount addition unit 223, Control the focal position.

また、本実施形態のデジタルカメラは、撮像部213で撮像された被写体像や各種の操作状況を表示する表示部224と、撮像部213の動作を後述する2つの動作モード、ライブビューモードあるいは動画記録モードに切り替えるための操作部225を備える。   In addition, the digital camera according to the present embodiment includes a display unit 224 that displays a subject image captured by the imaging unit 213 and various operation situations, and two operation modes, a live view mode or a moving image, which will be described later. An operation unit 225 for switching to the recording mode is provided.

本実施形態におけるデジタルカメラでは、電源投入とともにライブビューモードが自動で設定され、撮像部213で撮像を開始して、撮像した被写体像が現像演算されて表示部224で表示される。また、撮像部213で撮像された静止画や動画は、所定のデータフォーマットで記録部226に記録される。   In the digital camera according to the present embodiment, the live view mode is automatically set when the power is turned on, imaging is started by the imaging unit 213, and the captured subject image is developed and displayed on the display unit 224. Still images and moving images captured by the imaging unit 213 are recorded in the recording unit 226 in a predetermined data format.

本実施形態におけるデジタルカメラは、連続的に焦点検出を行い続けるコンティニュアスAFモードを有し、操作部225への操作入力によってモードの入/切が切り替えできる。   The digital camera according to the present embodiment has a continuous AF mode in which focus detection is continuously performed, and the mode can be switched on / off by an operation input to the operation unit 225.

図20は、焦点検出センサ210の詳細を示す図であり、瞳面で分割された2つの被写体像(以後、一方を「A像」、他方を「B像」とも呼ぶ。)の位相差を検出するために焦点検出センサ内に配置されたラインセンサの配置が示されている。   FIG. 20 is a diagram showing details of the focus detection sensor 210, and shows the phase difference between two subject images divided on the pupil plane (hereinafter, one is also referred to as “A image” and the other as “B image”). An arrangement of line sensors arranged in the focus detection sensor for detection is shown.

図20において、A像が結像するラインセンサaと、B像が結像するラインセンサbが、焦点検出センサ210上に左右に配置されている。得られたA像とB像について相関演算を行うことにより、被写体像の位相差が算出される。   In FIG. 20, a line sensor a on which an A image is formed and a line sensor b on which a B image is formed are arranged on the left and right on the focus detection sensor 210. By performing a correlation operation on the obtained A image and B image, the phase difference of the subject image is calculated.

焦点検出センサ210には、1対の複数画素列が複数設けられている。複数備わる焦点検出センサ210の各画素は、CMOS(相補型金属酸化膜半導体)やCCD(電荷結合素子)から構成される。レンズ群101等を介して焦点検出センサ210上に結像した被写体像は、各画素により光電変換され、電気信号(被写体像信号)の列に変換される。   The focus detection sensor 210 is provided with a plurality of pairs of a plurality of pixel rows. Each pixel of the plurality of focus detection sensors 210 includes a CMOS (complementary metal oxide semiconductor) or a CCD (charge coupled device). A subject image formed on the focus detection sensor 210 via the lens group 101 or the like is photoelectrically converted by each pixel and converted into a sequence of electrical signals (subject image signals).

図21は、本発明の第9の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 21 is a flowchart showing an AF operation flow of the digital camera according to the ninth embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラは、あらかじめ電源が投入されているものとする。   It is assumed that the digital camera is already turned on.

まず、操作スイッチ214のSW1が押下されることにより処理が開始される。   First, processing is started when SW1 of the operation switch 214 is pressed.

ステップS2101では、カメラコントローラ215は、操作部225の操作入力によって、コンティニュアスAFモードに入れられているか判定する。モードに入っていればステップS2102へ進む。一方、モードに入っていなければ、動作を終了する。   In step S <b> 2101, the camera controller 215 determines whether the continuous AF mode is set based on an operation input from the operation unit 225. If it is in the mode, the process proceeds to step S2102. On the other hand, if the mode is not entered, the operation is terminated.

ステップS2102では、カメラコントローラ215は、加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS2103へ進む。   In step S2102, the camera controller 215 initializes the count value n of the addition counter 218 to 0. After initialization, the process proceeds to step S2103.

ステップS2103では、測光部212で被写体像を撮像して撮像信号を取得する。測光部212で得られた撮像信号は、その輝度積分値に基づいて公知の測光演算がなされる。また、測光部212で得られた撮像信号は、顔検出部227へ送られる。上記処理の後、ステップS2104へ進む。   In step S2103, the photometric unit 212 captures a subject image and acquires an imaging signal. A known photometric calculation is performed on the image signal obtained by the photometric unit 212 based on the integrated luminance value. Further, the imaging signal obtained by the photometry unit 212 is sent to the face detection unit 227. After the above process, the process proceeds to step S2104.

ステップS2104では、測光部212で得られた1フレームの撮像信号に人物の顔が含まれているか顔検出部227が検出し、また顔が含まれている場合はさらに顔検出部227がその顔サイズを検出する。顔検出の有無や検出された顔の大きさといった顔情報は、後述する処理で顔の大きさの変化を監視するため、一時記憶される。記憶後、ステップS2105へ進む。   In step S2104, the face detection unit 227 detects whether a person's face is included in one frame of the imaging signal obtained by the photometry unit 212. If a face is included, the face detection unit 227 further detects the face. Detect the size. Face information such as the presence / absence of face detection and the size of the detected face is temporarily stored in order to monitor changes in the size of the face in the process described later. After storing, the process proceeds to step S2105.

ステップS2105では、焦点検出センサ210における1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS2106へ進む。   In step S2105, an image signal obtained from a pair of focus detection pixel arrays in the focus detection sensor 210 is acquired. After acquisition, the process proceeds to step S2106.

ステップS2106では、カメラコントローラ215は、ステップS2105で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS2107へ進む。   In step S <b> 2106, the camera controller 215 performs correction processing for suppressing various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system on the pair of image signals acquired in step S <b> 2105. After the correction process, the process proceeds to step S2107.

ステップS2107では、カメラコントローラ215は、所定の条件を満足するか否か、すなわち顔が検出されていてその顔の大きさが所定の閾値以上か判定する。顔が検出されていてその顔の大きさが閾値以上である場合は、人物の移動による構図変化が大きいと考えられる。このまま被写体像の像信号を加算した際に、異なる位置の顔が重ねられるため、被写体像が多重になってしまい、焦点検出に適した加算ができなくなってしまう。この場合は、焦点検出センサ210が複数有する1対の焦点検出画素列から得られた像信号を加算しないようにすることが望ましい。そこで、像信号の加算なく焦点検出の信頼性を向上させる効果が高い手法を行うために、ステップS2108へ進む。   In step S2107, the camera controller 215 determines whether or not a predetermined condition is satisfied, that is, whether or not a face is detected and the size of the face is greater than or equal to a predetermined threshold. If a face is detected and the size of the face is greater than or equal to the threshold, it is considered that the composition change due to the movement of the person is large. When the image signals of the subject images are added as they are, faces at different positions are overlapped, so that the subject images are multiplexed, and addition suitable for focus detection cannot be performed. In this case, it is desirable not to add image signals obtained from a pair of focus detection pixel arrays that a plurality of focus detection sensors 210 have. Therefore, the process proceeds to step S2108 in order to perform a technique that is highly effective in improving the reliability of focus detection without adding image signals.

一方、ステップS2107で顔が検出されていない場合、あるいは顔が検出されているもののその顔の大きさが閾値未満である場合は、焦点検出の信頼性を向上させる効果が高い像信号を得るために、ステップS2111へ進む。   On the other hand, if no face is detected in step S2107, or if a face is detected but the size of the face is less than the threshold value, an image signal that is highly effective in improving focus detection reliability is obtained. Then, the process proceeds to step S2111.

ステップS2108では、ステップS2106で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS2109へ進む。   In step S2108, the correlation calculation unit 219 performs a correlation calculation from the pair of focus detection image signals subjected to the correction process in step S2106, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S2109.

ステップS2109では、異なるフレームにおける同じ焦点検出画素列の像信号から算出された相関量を相関量加算部220が加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。相関量の値を加算するだけなので、加算にかかる処理負荷を比較的軽くできる。また、相関量を加算することで、仮に値にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS2112へ進む。   In step S2109, the correlation amount adding unit 220 adds the correlation amounts calculated from the image signals of the same focus detection pixel row in different frames. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since only the correlation value is added, the processing load for the addition can be made relatively light. Further, by adding the correlation amount, even if the value includes a variation, the variation is settled according to the number of additions, so that the reliability of the phase difference used for focus detection can be improved. After the addition, the process proceeds to step S2112.

ステップS2110では、被写体やデジタルカメラの移動を考慮する必要がなく効果の高い手法を用いるために、ステップS2106で補正処理が行われた焦点検出用の1対の像信号を、画素加算部217がそれぞれ対応する画素同士で加算する。本実施形態では、加算カウンタ218のカウント値nが所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対してフレームを跨いて個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS2111へ進む。   In step S2110, in order to use a highly effective method without considering the movement of the subject or the digital camera, the pixel addition unit 217 outputs the pair of image signals for focus detection subjected to the correction process in step S2106. Each corresponding pixel is added. In the present embodiment, addition is performed until the count value n of the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the count is performed. Since addition processing is individually performed across the frames for each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S2111.

ステップS2111では、ステップS2110にてフレームを跨いで加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS2112へ進む。   In step S2111, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added across the frames in step S2110, and calculates a correlation amount for each image shift amount. After calculation, the process proceeds to step S2112.

ステップS2112では、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、フレームを跨いで所定回数の像信号が取得できているかを判定する。加算カウンタのカウント値nが所定回数以上であれば、ステップS2113へ進み、所定回数分の過去のフレームの古いデータを削除する。削除する古いデータの種類は、ステップS2109で過去に算出されたデフォーカス量、あるいはステップS2105乃至ステップS2106で過去に得られた補正済みの焦点検出用の1対の像信号である。削除後、ステップS2115へ進む。一方、加算カウンタのカウント値nが所定回数未満であれば、ステップS2114へ進み、加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS2115へ進む。   In step S2112, whether the count value n of the addition counter 218 has acquired the image signal a predetermined number of times across the frame with respect to the image signal obtained from the pair of focus detection pixel arrays included in the imaging unit 213. Determine. If the count value n of the addition counter is equal to or greater than the predetermined number, the process proceeds to step S2113, and old data of the past frame for the predetermined number of times is deleted. The type of old data to be deleted is a defocus amount calculated in the past in step S2109 or a corrected pair of image signals for focus detection obtained in the past in steps S2105 to S2106. After deletion, the process proceeds to step S2115. On the other hand, if the count value n of the addition counter is less than the predetermined number, the process advances to step S2114 to add 1 to the count value n of the addition counter 218 and update it. After the update, the process proceeds to step S2115.

ステップS2115では、ステップS2109あるいはステップS2111で算出された像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS2116へ進む。   In step S2115, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount calculated in step S2109 or step S2111. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S2116.

ステップS2116では、ステップS2115で得られたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御後、ステップS2117へ進む。   In step S2116, the focal position of the lens group 101 is controlled via the lens controller 105 based on the defocus amount obtained in step S2115. After control, the process proceeds to step S2117.

ステップS2117では、コンティニュアスAFモードの動作を続けるか否かを判定するため、SW1の押下状況を判定する。SW1が解放されずに押下し続けられていれば、コンティニュアスAFモードの動作を続けるため、ステップS2103へ戻る。一方、SW1が解放されていれば、コンティニュアスAFモードの動作が終了となる。   In step S2117, in order to determine whether or not to continue the operation in the continuous AF mode, the pressing state of SW1 is determined. If SW1 is kept pressed without being released, the operation returns to step S2103 to continue the operation in the continuous AF mode. On the other hand, if SW1 is released, the operation in the continuous AF mode is completed.

上述の動作を行うことにより、撮像部213へ入射する光束を途中で光路分割して、独立した焦点検出センサへ結像させる構成であっても、上記第8の実施形態と同様の効果を得ることができる。具体的には、被写体が人物かどうか顔検出を行い、顔の有無や顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させることができる。このため、人物の被写体が移動するか否かにかかわらず、高精度な焦点検出を実現できる。   By performing the above-described operation, the same effect as in the eighth embodiment can be obtained even in a configuration in which the light beam incident on the imaging unit 213 is divided in the middle of the optical path and imaged on an independent focus detection sensor. be able to. Specifically, face detection can be performed to determine whether the subject is a person, and a different focus detection result reliability improvement method can be appropriately selected according to the presence or absence of the face and the size of the face. For this reason, high-precision focus detection can be realized regardless of whether or not a person's subject moves.

[第10の実施形態]
本発明の第10の実施の形態に係る撮像装置は、その構成が上記第8の実施の形態に係る撮像装置と同じであり、第8の実施の形態と同様の部分については、同一の符号を用いてその説明を省略する。以下に、上記第8の実施の形態と異なる点のみを説明する。
[Tenth embodiment]
The imaging apparatus according to the tenth embodiment of the present invention has the same configuration as that of the imaging apparatus according to the eighth embodiment, and the same reference numerals are used for the same parts as those in the eighth embodiment. The description is omitted using. Only differences from the eighth embodiment will be described below.

上記第4の実施形態では、カメラ部200の処理負荷の重い動画記録モード時と処理負荷の軽い他モードの時とで、異なる焦点検出結果の信頼性向上手法を選択していた。ここで、像信号の各画素を加算する方式の信頼性向上手法では、被写体が移動したり、デジタルカメラがぶれたりした場合に、被写体像が多重になったり輪郭に尾を引くような像になったりして、焦点検出に適した加算ができない。特に、人物を被写体にした場合において、さらにその人物の顔の大きさが大きい場合、人物の移動による構図変化は大きいと考えられる。そこで、上記実施形態に限らず、撮像部213で得られる被写体像から顔を検出して、その顔の大きさを算出する手段を備え、検出された顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を選択するようにしてもよい。   In the fourth embodiment, different focus detection result reliability improvement methods are selected in the moving image recording mode in which the processing load of the camera unit 200 is heavy and in the other mode in which the processing load is light. Here, in the method of improving the reliability of the method in which each pixel of the image signal is added, when the subject moves or the digital camera shakes, the subject image is multiplexed or the image has a trailing edge. Therefore, addition suitable for focus detection cannot be performed. In particular, when a person is a subject and the face size of the person is larger, the composition change due to the movement of the person is considered to be large. Therefore, not limited to the above embodiment, a means for detecting a face from the subject image obtained by the imaging unit 213 and calculating the size of the face is provided, and different focus detection is performed according to the detected face size. A method for improving the reliability of the result may be selected.

図22は、本発明の第10の実施形態におけるデジタルカメラのAF動作の流れを示すフローチャートである。本処理は、カメラコントローラ215が各部を制御することにより実現される。   FIG. 22 is a flowchart showing a flow of AF operation of the digital camera in the tenth embodiment of the present invention. This process is realized by the camera controller 215 controlling each unit.

デジタルカメラでは、電源オン後に、動作モードがライブビューモードに自動的に設定されて、撮像部213で撮像を連続的に行いつつ、撮像された被写体像が表示部224で表示されているものとする。   In the digital camera, after the power is turned on, the operation mode is automatically set to the live view mode, and the captured subject image is displayed on the display unit 224 while the imaging unit 213 continuously performs imaging. To do.

まず、操作スイッチ214のSW1が押下されることにより処理が開始される。   First, processing is started when SW1 of the operation switch 214 is pressed.

ステップS2201では、操作部225の操作入力によって、コンティニュアスAFモードに設定されているか判定する。コンティニュアスAFモードに設定されていればステップS2202へ進む。一方、コンティニュアスAFモードに設定されていなければ、本処理を終了する。   In step S2201, it is determined whether or not the continuous AF mode is set by an operation input of the operation unit 225. If the continuous AF mode is set, the process advances to step S2202. On the other hand, if the continuous AF mode is not set, this process ends.

ステップS2202では、各種の演算結果の加算回数を数えるカメラコントローラ215に内包された加算カウンタ218のカウント値nを0に初期化する。初期化後、ステップS2203へ進む。   In step S2202, the count value n of the addition counter 218 included in the camera controller 215 that counts the number of additions of various calculation results is initialized to zero. After initialization, the process proceeds to step S2203.

ステップS2203では、撮像部213で被写体像を撮像し、1フレームの撮像信号を取得する。取得後、ステップS2204へ進む。   In step S2203, the imaging unit 213 captures a subject image, and acquires an imaging signal of one frame. After acquisition, the process proceeds to step S2204.

ステップS2204では、撮像部213で得られた被写体像1フレームの撮像信号に人物の顔が含まれているか顔検出部227が検出し、また顔が含まれている場合はさらに顔検出部227がその顔サイズを検出する。顔検出の有無や検出された顔の大きさといった顔情報は、後述する処理ステップで顔の大きさの変化を監視するため、一時記憶される。記憶後、ステップS2205へ進む。   In step S2204, the face detection unit 227 detects whether a person's face is included in the imaging signal of one frame of the subject image obtained by the imaging unit 213. If a face is included, the face detection unit 227 further detects the face. The face size is detected. Face information such as the presence / absence of face detection and the size of the detected face is temporarily stored in order to monitor changes in the size of the face in processing steps described later. After storing, the process proceeds to step S2205.

ステップS2205では、撮像部213における1対の焦点検出画素列から得られた像信号を取得する。取得後、ステップS2206へ進む。   In step S2205, an image signal obtained from a pair of focus detection pixel rows in the imaging unit 213 is acquired. After acquisition, the process proceeds to step S2206.

ステップS2206では、ステップS2205で取得した1対の像信号に対して、黒レベル補正や撮像光学系の周辺光量落ちなど各種の信号レベル変動を抑える補正処理を行う。補正処理後、ステップS2207へ進む。   In step S2206, correction processing is performed on the pair of image signals acquired in step S2205 to suppress various signal level fluctuations such as black level correction and a decrease in peripheral light amount of the imaging optical system. After the correction process, the process proceeds to step S2207.

ステップS2207では、カメラコントローラ215は、所定の条件を満足するか否か、すなわち顔が検出されていてその顔の大きさが所定の閾値以上か判定する。顔が検出されていてその顔の大きさが閾値以上である場合は、人物の移動による構図変化が大きいと考えられる。このまま被写体像の像信号を加算した際に、異なる位置の顔が重ねられるため、被写体像が多重になってしまい、焦点検出に適した加算ができない。この場合は、撮像部213が複数有する1対の焦点検出画素列から得られた像信号を加算しないようにすることが望ましい。そこで、像信号の加算なく焦点検出の信頼性を向上させる手法が用いられる、ステップS2208へ進む。   In step S2207, the camera controller 215 determines whether or not a predetermined condition is satisfied, that is, whether or not a face is detected and the size of the face is greater than or equal to a predetermined threshold. If a face is detected and the size of the face is greater than or equal to the threshold, it is considered that the composition change due to the movement of the person is large. When the image signals of the subject images are added as they are, faces at different positions are overlapped, so that the subject images are multiplexed, and addition suitable for focus detection cannot be performed. In this case, it is desirable not to add image signals obtained from a pair of focus detection pixel rows that the imaging unit 213 has. Therefore, the process proceeds to step S2208 in which a technique for improving the reliability of focus detection without adding image signals is used.

ステップS2207で顔が検出されていない場合、あるいは顔が検出されているもののその顔の大きさが閾値未満である場合は、焦点検出の信頼性を向上させる効果の高い、像信号を加算する手法を行うために、ステップS2211へ進む。   If no face is detected in step S2207, or if a face is detected but the size of the face is less than a threshold, a method for adding image signals that is highly effective in improving focus detection reliability. In order to perform the process, the process proceeds to step S2211.

ステップS2208では、ステップS2206で補正処理が行われた焦点検出用の1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS2209へ進む。   In step S2208, the correlation calculation unit 219 performs a correlation calculation from the pair of focus detection image signals that have been corrected in step S2206, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S2209.

ステップS2209では、ステップS2208で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS2210へ進む。   In step S2209, the phase difference detection unit 221 calculates the phase difference with the highest correlation amount from the correlation amount for each image shift amount obtained in step S2208. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S2210.

ステップS2210では、像信号の加算なく焦点検出の信頼性を向上させる手法を用いるために、異なるフレームにおける同じ焦点検出画素列の像信号からそれぞれ算出したデフォーカス量をデフォーカス量加算部223が加算平均する。本実施形態では、加算カウンタ218が所定回数に達するまで加算が行われるが、初回の処理では加算対象がないためカウントだけなされる。異なるフレームで個々に算出したデフォーカス量の値を加算平均するだけなので、加算平均にかかる処理負荷が非常に軽くできる。また、デフォーカス量を加算平均することで、仮にばらつきが含まれていても加算数に応じてばらつきが収まるため、焦点検出に用いる位相差の信頼性を高めることができる。加算平均後、ステップS2214へ進む。   In step S2210, the defocus amount adding unit 223 adds the defocus amounts calculated from the image signals of the same focus detection pixel column in different frames in order to use a technique for improving the reliability of focus detection without adding image signals. Average. In this embodiment, addition is performed until the addition counter 218 reaches a predetermined number of times, but only the count is performed because there is no addition target in the first process. Since only the defocus amount values calculated individually in different frames are added and averaged, the processing load required for the averaging can be made very light. In addition, by averaging the defocus amounts, even if a variation is included, the variation is reduced according to the number of additions, so that the reliability of the phase difference used for focus detection can be improved. After the addition averaging, the process proceeds to step S2214.

ステップS2211では、被写体やデジタルカメラの移動を考慮する必要がなく効果の高い手法を用いるために、ステップS2206で補正処理が行われた焦点検出用の1対の像信号を、画素加算部217がそれぞれ対応する画素同士で加算する。本実施形態では、加算は加算カウンタ218が所定回数に達するまで行われるが、初回の処理では加算対象がないためカウントだけなされる。1対の像信号における各画素に対してフレームを跨いて個別に加算処理を行うため、加算にかかる処理負荷が比較的重くなってしまう。しかし、像信号を対応する画素同士で加算することで、後段の相関演算に用いる像信号に混入するノイズ成分が効果的に抑制されるため、焦点検出に用いる位相差の信頼性を高めることができる。加算後、ステップS2212へ進む。   In step S2211, the pixel adding unit 217 outputs the pair of image signals for focus detection corrected in step S2206, in order to use a highly effective method without considering the movement of the subject or the digital camera. Each corresponding pixel is added. In this embodiment, the addition is performed until the addition counter 218 reaches a predetermined number of times. However, since there is no addition target in the first process, only the counting is performed. Since addition processing is individually performed across the frames for each pixel in a pair of image signals, the processing load for addition becomes relatively heavy. However, by adding the image signal between corresponding pixels, noise components mixed in the image signal used for the subsequent correlation calculation are effectively suppressed, so that the reliability of the phase difference used for focus detection can be improved. it can. After the addition, the process proceeds to step S2212.

ステップS2212では、ステップS2211にてフレームを跨いで加算した1対の像信号から相関演算部219が相関演算を行い、像ずらし量ごとの相関量を算出する。算出後、ステップS2213へ進む。   In step S2212, the correlation calculation unit 219 performs a correlation calculation from the pair of image signals added across the frames in step S2211, and calculates a correlation amount for each image shift amount. After the calculation, the process proceeds to step S2213.

ステップS2213では、ステップS2212で得られた像ずらし量ごとの相関量から位相差検出部221が最も相関量が高い位相差を算出する。そして、その位相差に基づいて、デフォーカス量検出部222が現在の焦点位置から被写体の合焦位置までのデフォーカス量を算出する。算出方法は、公知の位相差検出方式の焦点検出で行われているものであり、最も相関量の高い位相差に撮像光学系に基づく所定の係数を掛けてデフォーカス量に変換するといった演算となる。算出後、ステップS2214へ進む。   In step S2213, the phase difference detection unit 221 calculates the phase difference having the highest correlation amount from the correlation amount for each image shift amount obtained in step S2212. Based on the phase difference, the defocus amount detector 222 calculates the defocus amount from the current focus position to the in-focus position of the subject. The calculation method is performed by focus detection using a known phase difference detection method, and is performed by multiplying a phase difference having the highest correlation amount by a predetermined coefficient based on the imaging optical system and converting it to a defocus amount. Become. After the calculation, the process proceeds to step S2214.

ステップS2214では、加算カウンタ218のカウント値nが、撮像部213が複数有する1対の焦点検出画素列から得られた像信号に対して、フレームを跨いで所定の加算数だけ像信号が取得できているかを判定する。加算カウンタのカウント値nが所定回数以上であれば、ステップS2215へ進み、所定回数分の過去のフレームの古いデータを削除する。削除する古いデータの種類は、ステップS1009で過去に算出されたデフォーカス量、あるいはステップS1005乃至ステップS1006で過去に得られた補正済みの焦点検出用の1対の像信号である。削除後、ステップS2217へ進む。一方、加算カウンタのカウント値nが所定回数未満であれば、ステップS2217へ進み、演算結果の加算回数を数えるカメラコントローラ215に内包された加算カウンタ218のカウント値nに1を加算して更新する。更新後、ステップS2217へ進む。   In step S2214, the count value n of the addition counter 218 can acquire an image signal for a predetermined number of additions across the frame with respect to the image signal obtained from a pair of focus detection pixel rows that the imaging unit 213 has. Judge whether it is. If the count value n of the addition counter is equal to or greater than the predetermined number, the process advances to step S2215 to delete old data of the past frame for the predetermined number of times. The type of old data to be deleted is the defocus amount calculated in the past in step S1009 or the corrected pair of image signals for focus detection obtained in the past in steps S1005 to S1006. After deletion, the process proceeds to step S2217. On the other hand, if the count value n of the addition counter is less than the predetermined number, the process advances to step S2217 to update by adding 1 to the count value n of the addition counter 218 included in the camera controller 215 that counts the number of additions of the calculation result. . After the update, the process proceeds to step S2217.

ステップS2217では、ステップS2210あるいはステップS2213で得られたデフォーカス量に基づいて、レンズコントローラ105を介して、レンズ群101の焦点位置が制御される。制御後、ステップS2218へ進む。   In step S2217, the focal position of the lens group 101 is controlled via the lens controller 105 based on the defocus amount obtained in step S2210 or step S2213. After control, the process proceeds to step S2218.

ステップS2218では、コンティニュアスAFモードの動作を続けるか否かを判定するため、SW1の押下状況を確認する。SW1が解放されずに押下し続けられていれば(ステップS2218でNO)、コンティニュアスAFモードの動作を続けるため、ステップS2203へ戻る。一方、SW1が解放されていれば(ステップS2218でYES)、本処理を終了する。   In step S2218, in order to determine whether or not to continue the operation in the continuous AF mode, the pressing state of SW1 is confirmed. If SW1 is kept pressed without being released (NO in step S2218), the process returns to step S2203 to continue the operation in the continuous AF mode. On the other hand, if SW1 is released (YES in step S2218), the process ends.

上述の動作を行うことにより、上記第8の実施形態と同様の効果が得られるようになる。具体的には、被写体が人物かどうか顔検出を行い、顔の有無や顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させることができる。このため、人物の被写体が移動するか否かにかかわらず、高精度な焦点検出を実現できる。   By performing the above-described operation, the same effect as in the eighth embodiment can be obtained. Specifically, face detection can be performed to determine whether the subject is a person, and a different focus detection result reliability improvement method can be appropriately selected according to the presence or absence of the face and the size of the face. For this reason, high-precision focus detection can be realized regardless of whether or not a person's subject moves.

上記第10の実施形態では、顔を検出して、その顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させていた。しかし、これに限らず、顔を検出してその顔サイズを撮像される度に監視して、顔の大きさが前フレームから変化しているか検出し、変化の有無あるいは程度に応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させてもよい。この場合、本変形例のデジタルカメラの構成は、上記第10の実施形態と同様の構成である。   In the tenth embodiment, a face is detected, and a different focus detection result reliability improvement method is appropriately selected according to the size of the face. However, the present invention is not limited to this, and each time a face is detected and its face size is imaged, it is detected whether the face size has changed from the previous frame, and varies depending on whether or not there is a change. A method for improving the reliability of the focus detection result may be appropriately selected. In this case, the configuration of the digital camera of the present modification is the same as that of the tenth embodiment.

また、本変形例のデジタルカメラの動作は、基本的に上記第10の実施形態と同様の動作である。しかしながら、図22におけるステップS2207の動作が変わり、顔の大きさが前フレームから変化しているか、あるいは所定閾値以上の変化があるか、という判定である。   The operation of the digital camera according to the present modification is basically the same as that of the tenth embodiment. However, the operation in step S2207 in FIG. 22 is changed, and it is determined whether the size of the face has changed from the previous frame or whether there has been a change beyond a predetermined threshold.

上述の動作を行うことにより、上記第10の実施形態と同様の効果が得られるようになる。具体的には、被写体が人物かどうか顔検出を行い、顔の大きさが変化して人物が移動しているかの判定に基づき、異なる焦点検出結果の信頼性向上手法を適切に選択させることができる。このため、人物の被写体が移動するか否かにかかわらず、高精度な焦点検出を実現できる。   By performing the above-described operation, the same effect as in the tenth embodiment can be obtained. Specifically, it is possible to perform face detection to determine whether the subject is a person, and to appropriately select a method for improving the reliability of different focus detection results based on the determination of whether the person is moving as the face size changes. it can. For this reason, high-precision focus detection can be realized regardless of whether or not a person's subject moves.

また、上記第10の実施形態では、顔を検出して、その顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させていた。しかし、これに限らず、顔を検出した検出数に応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させてもよい。   In the tenth embodiment, a face is detected, and a different focus detection result reliability improvement method is appropriately selected according to the size of the face. However, the present invention is not limited to this, and different methods for improving the reliability of focus detection results may be appropriately selected according to the number of detected faces.

また、本変形例のデジタルカメラの動作は、基本的に上記第8の実施形態と同様の動作である。しかしながら、図22におけるステップS2207の動作が変わり、顔の検出数が所定閾値以上かという判定である。   The operation of the digital camera according to the present modification is basically the same as that of the eighth embodiment. However, the operation in step S2207 in FIG. 22 changes, and it is determined whether the number of detected faces is greater than or equal to a predetermined threshold value.

上述の動作を行うことにより、上記第10の実施形態と同様の効果が得られるようになる。具体的には、被写体が人物かどうか顔検出を行い、顔の検出数が所定閾値以上であれば集合写真と推測して、人物の移動が少ないと判定する。一方、顔の検出数が所定閾値未満であれば、少人数のポートレート写真と推測して、人物の移動の可能性があると判定する。このように、検出された顔の数に基づいて、人物の移動の可能性を判定して、異なる焦点検出結果の信頼性向上手法を適切に選択させることができる。このため、人物の被写体が移動するか否かにかかわらず、高精度な焦点検出を実現できる。   By performing the above-described operation, the same effect as in the tenth embodiment can be obtained. Specifically, face detection is performed to determine whether or not the subject is a person. If the number of detected faces is equal to or greater than a predetermined threshold, it is estimated that the photograph is a group photo, and it is determined that the movement of the person is small. On the other hand, if the number of detected faces is less than the predetermined threshold value, it is estimated that the portrait photograph is a small number of people and it is determined that there is a possibility of movement of the person. In this way, it is possible to determine the possibility of movement of a person based on the number of detected faces and to appropriately select a method for improving the reliability of different focus detection results. For this reason, high-precision focus detection can be realized regardless of whether or not a person's subject moves.

また、上記第10の実施形態では、顔を検出して、その顔の大きさに応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させていた。しかし、これに限らず、選択の切れ目が目立たないよう、選択変更前後の手法で得られたデフォーカス量を所定比率で加算平均して、加算平均した結果に基づいてフォーカス制御してもよい。   In the tenth embodiment, a face is detected, and a different focus detection result reliability improvement method is appropriately selected according to the size of the face. However, the present invention is not limited to this, and defocus amounts obtained by the methods before and after the selection change may be added and averaged at a predetermined ratio, and focus control may be performed based on the result of the addition and averaging so that selection breaks are not noticeable.

このような動作を行うことにより、特に動画記録時のコンティニュアスAFにおける焦点検出に伴う被写体像の急変を緩和でき、画像品位を高めることができる。   By performing such an operation, it is possible to alleviate a sudden change in the subject image caused by focus detection in continuous AF, particularly during moving image recording, and to improve image quality.

また、上記第10の実施形態では、像信号の加算か相関量の加算という手法を用いていた。また、第10の実施形態では、像信号の加算かデフォーカス量の加算平均という手法を用いていた。しかし、これに限らず、像信号の加算、相関量の加算、デフォーカス量の加算平均の各手法でぞれぞれの結果を出力し、撮像部213の撮像設定、測光部212の露出設定、顔検出部227のいずれかに比較用の閾値を設定し、その閾値との大小を比較してもよい。さらに、各手法のうち少なくとも2種類の結果を取得して、それぞれの閾値と大小を比較して、比較結果に応じて、異なる焦点検出結果の信頼性向上手法を適切に選択させるようにしてもよい。   In the tenth embodiment, a method of adding image signals or adding correlation amounts is used. In the tenth embodiment, a method of adding image signals or adding and averaging defocus amounts is used. However, the present invention is not limited to this, and each result is output by each of the image signal addition, the correlation amount addition, and the defocus amount addition average method, and the imaging setting of the imaging unit 213 and the exposure setting of the photometric unit 212 Alternatively, a comparison threshold value may be set in any of the face detection units 227, and the magnitude may be compared with the threshold value. Furthermore, at least two types of results among the respective methods are acquired, and the respective threshold values are compared with the magnitudes, and different reliability detection methods for different focus detection results are appropriately selected according to the comparison results. Good.

上述の動作を行うことにより、撮像設定、露出設定、被写体検出状況に応じて、焦点検出の信頼性向上手法を適切に選択できる。   By performing the above-described operation, it is possible to appropriately select a focus detection reliability improvement method according to the imaging setting, the exposure setting, and the subject detection situation.

上記第1〜第10の実施形態および変形例では、本発明を撮像装置に適用した場合について説明したが、焦点検出装置に適用してもよいことは云うまでもない。   In the above first to tenth embodiments and modifications, the case where the present invention is applied to an imaging apparatus has been described, but it goes without saying that the present invention may be applied to a focus detection apparatus.

また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。   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.

100 レンズ部
107 レンズ位置検出部
200 カメラ部
210 焦点検出センサ
213 撮像部
215 カメラコントローラ
217 画素加算部
219 相関演算部
220 相関量加算部
221 位相差検出部
DESCRIPTION OF SYMBOLS 100 Lens part 107 Lens position detection part 200 Camera part 210 Focus detection sensor 213 Imaging part 215 Camera controller 217 Pixel addition part 219 Correlation calculation part 220 Correlation amount addition part 221 Phase difference detection part

Claims (22)

複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、
前記1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出手段と、
前記1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出手段と、
動作モードを判定する判定手段と、
前記判定手段により処理負荷の重い動作モードと判定された場合には、前記第1の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定手段により処理負荷の軽い動作モードと判定された場合には、前記第2の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出手段と、
前記デフォーカス量検出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
An imaging unit that has a plurality of paired focus detection pixel columns in a part of the plurality of pixels and outputs a pair of image signals from the pair of focus detection pixel columns;
First calculating means for calculating a correlation amount from the pair of image signals to calculate a correlation amount, and adding the calculated correlation amount;
Second calculation means for adding the image signals between corresponding pixels to the pair of image signals and calculating a correlation amount by performing a correlation operation from the added image signals;
Determination means for determining an operation mode;
If the determination unit determines that the operation mode is a heavy processing load, the defocus amount to the in-focus position is calculated based on the phase difference obtained from the correlation amount calculated by the first calculation unit; If the determination unit determines that the operation mode is light processing load, the defocus amount to the in-focus position is calculated based on the phase difference obtained from the correlation amount calculated by the second calculation unit. Focus amount detection means;
A focus detection apparatus comprising: focus detection means for performing focus detection based on the defocus amount calculated by the defocus amount detection means.
前記像信号は、前記撮像手段で撮像された1フレームに含まれる像信号または前記撮像手段で撮像された複数フレームに含まれる像信号であることを特徴とする請求項1に記載の焦点検出装置。   The focus detection apparatus according to claim 1, wherein the image signal is an image signal included in one frame imaged by the imaging unit or an image signal included in a plurality of frames imaged by the imaging unit. . 複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、
前記1対の像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、算出したデフォーカス量を加算平均する第1の算出手段と、
前記1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出する第2の算出手段と、
動作モードを判定する判定手段と、
前記判定手段により処理負荷の重い動作モードと判定された場合には、前記第1の算出手段により算出されたデフォーカス量に基づいて焦点検出を行い、前記判定手段により処理負荷の軽い動作モードと判定された場合には、前記第2の算出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
An imaging unit that has a plurality of paired focus detection pixel columns in a part of the plurality of pixels and outputs a pair of image signals from the pair of focus detection pixel columns;
First calculation means for calculating a defocus amount to the in-focus position based on a phase difference obtained by performing a correlation operation from the pair of image signals and calculating an average of the calculated defocus amounts. When,
Defocusing to the in-focus position based on the phase difference obtained from the correlation amount calculated by adding the image signals between the corresponding pixels to the pair of image signals and performing correlation calculation from the added image signals A second calculating means for calculating an amount;
Determination means for determining an operation mode;
When the operation mode with a heavy processing load is determined by the determination unit, focus detection is performed based on the defocus amount calculated by the first calculation unit, and the operation mode with a light processing load is performed by the determination unit. A focus detection device comprising: a focus detection unit that performs focus detection based on the defocus amount calculated by the second calculation unit when the determination is made.
前記像信号は、前記撮像手段で撮像された1フレームに含まれる像信号または前記撮像手段で撮像された複数フレームに含まれる像信号であることを特徴とする請求項3に記載の焦点検出装置。   The focus detection apparatus according to claim 3, wherein the image signal is an image signal included in one frame captured by the imaging unit or an image signal included in a plurality of frames captured by the imaging unit. . 複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出手段と、
前記撮像手段のフレームレートを判定する判定手段と、
前記判定手段により前記フレームレートが所定のフレームレート未満であると判定された場合には、前記第1の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定手段により前記フレームレートが所定のフレームレート以上であると判定された場合には、前記第2の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出手段と、
前記デフォーカス量検出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
An imaging unit that has a plurality of paired focus detection pixel columns in a part of the plurality of pixels and outputs a pair of image signals from the pair of focus detection pixel columns;
First calculating means for calculating a correlation amount from a pair of image signals included in a plurality of frames imaged by the imaging means, calculating a correlation amount, and adding the calculated correlation amount;
Second, calculating a correlation amount by adding image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals. Means for calculating
Determining means for determining a frame rate of the imaging means;
When the determination unit determines that the frame rate is less than a predetermined frame rate, the defocusing to the in-focus position is performed based on the phase difference obtained from the correlation amount calculated by the first calculation unit. When the determination means determines that the frame rate is equal to or higher than a predetermined frame rate, focusing is performed based on the phase difference obtained from the correlation amount calculated by the second calculation means. Defocus amount detection means for calculating the defocus amount to the position;
A focus detection apparatus comprising: focus detection means for performing focus detection based on the defocus amount calculated by the defocus amount detection means.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、算出したデフォーカス量を加算平均する第1の算出手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出する第2の算出手段と、
前記撮像手段のフレームレートを判定する判定手段と、
前記判定手段により前記フレームレートが所定のフレームレート未満であると判定された場合には、前記第1の算出手段により算出されたデフォーカス量に基づいて焦点検出を行い、前記判定手段により前記フレームレートが所定のフレームレート以上であると判定された場合には、前記第2の算出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
An imaging unit that has a plurality of paired focus detection pixel columns in a part of the plurality of pixels and outputs a pair of image signals from the pair of focus detection pixel columns;
A defocus amount up to the in-focus position is calculated based on a phase difference obtained from a correlation amount calculated by performing a correlation operation from a pair of image signals included in a plurality of frames captured by the imaging unit. First calculating means for averaging the defocus amounts;
Obtained from the correlation amount calculated by adding the image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals A second calculating means for calculating a defocus amount to the in-focus position based on the phase difference;
Determining means for determining a frame rate of the imaging means;
When the determination unit determines that the frame rate is less than a predetermined frame rate, focus detection is performed based on the defocus amount calculated by the first calculation unit, and the determination unit performs the frame detection. Focus detection means comprising: focus detection means for performing focus detection based on the defocus amount calculated by the second calculation means when it is determined that the rate is equal to or higher than a predetermined frame rate. apparatus.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、算出したデフォーカス量を加算平均する第1の算出手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出する第2の算出手段と、
現在設定されている絞り値が前フレームから変化したかを判定する判定手段と、
前記判定手段により前記絞り値が変化したと判定された場合には、前記第1の算出手段により算出されたデフォーカス量に基づいて焦点検出を行い、前記判定手段により前記絞り値が変化していないと判定された場合には、前記第2の算出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
An imaging unit that has a plurality of paired focus detection pixel columns in a part of the plurality of pixels and outputs a pair of image signals from the pair of focus detection pixel columns;
A defocus amount up to the in-focus position is calculated based on a phase difference obtained from a correlation amount calculated by performing a correlation operation from a pair of image signals included in a plurality of frames captured by the imaging unit. First calculating means for averaging the defocus amounts;
Obtained from the correlation amount calculated by adding the image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals A second calculating means for calculating a defocus amount to the in-focus position based on the phase difference;
Determination means for determining whether the currently set aperture value has changed from the previous frame;
When the determination means determines that the aperture value has changed, focus detection is performed based on the defocus amount calculated by the first calculation means, and the aperture value has changed by the determination means. A focus detection apparatus comprising: a focus detection unit that performs focus detection based on the defocus amount calculated by the second calculation unit when it is determined that the second calculation unit does not.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出手段と、
前記撮像手段の出力から顔の有無および検出された顔のサイズを検出する顔検出手段と、
前記顔検出手段による検出結果から所定の条件を満足するかを判定する判定手段と、
前記判定手段により前記所定の条件として顔が検出され且つ検出された顔のサイズが閾値以上であると判定された場合には、前記第1の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定手段により前記所定の条件を満たしていないと判定された場合には、前記第2の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出手段と、
前記デフォーカス量検出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
An imaging unit that has a plurality of paired focus detection pixel columns in a part of the plurality of pixels and outputs a pair of image signals from the pair of focus detection pixel columns;
First calculating means for calculating a correlation amount from a pair of image signals included in a plurality of frames imaged by the imaging means, calculating a correlation amount, and adding the calculated correlation amount;
Second, calculating a correlation amount by adding image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals. Means for calculating
Face detection means for detecting the presence of a face and the size of the detected face from the output of the imaging means;
Determination means for determining whether a predetermined condition is satisfied from a detection result by the face detection means;
If the determination unit detects a face as the predetermined condition and determines that the detected face size is greater than or equal to a threshold value, the phase difference obtained from the correlation amount calculated by the first calculation unit Is calculated from the correlation amount calculated by the second calculation means when the determinating means determines that the predetermined condition is not satisfied by the determination means. Defocus amount detection means for calculating a defocus amount to the in-focus position based on the phase difference;
A focus detection apparatus comprising: focus detection means for performing focus detection based on the defocus amount calculated by the defocus amount detection means.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、算出したデフォーカス量を加算平均する第1の算出手段と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出する第2の算出手段と、
前記撮像手段の出力から顔の有無および検出された顔のサイズを検出する顔検出手段と、
前記顔検出手段による検出結果から所定の条件を満足するかを判定する判定手段と、
前記判定手段により前記所定の条件として顔が検出され且つ検出された顔のサイズが閾値以上であると判定された場合には、前記第1の算出手段により算出されたデフォーカス量に基づいて焦点検出を行い、前記判定手段により前記所定の条件を満たしていないと判定された場合には、前記第2の算出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
An imaging unit that has a plurality of paired focus detection pixel columns in a part of the plurality of pixels and outputs a pair of image signals from the pair of focus detection pixel columns;
A defocus amount up to the in-focus position is calculated based on a phase difference obtained from a correlation amount calculated by performing a correlation operation from a pair of image signals included in a plurality of frames captured by the imaging unit. First calculating means for averaging the defocus amounts;
Obtained from the correlation amount calculated by adding the image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals A second calculating means for calculating a defocus amount to the in-focus position based on the phase difference;
Face detection means for detecting the presence of a face and the size of the detected face from the output of the imaging means;
Determination means for determining whether a predetermined condition is satisfied from a detection result by the face detection means;
When the determination unit detects a face as the predetermined condition and determines that the detected face size is greater than or equal to a threshold value, the focus is determined based on the defocus amount calculated by the first calculation unit. And a focus detection unit that performs focus detection based on the defocus amount calculated by the second calculation unit when the determination unit determines that the predetermined condition is not satisfied. A focus detection apparatus.
撮像手段に入射する光束を分割して結像させるように構成され、1対の焦点検出用画素列から1対の像信号を出力する焦点センサと、
前記1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出手段と、
前記1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出手段と、
前記撮像手段とは異なる測光手段の出力から顔の有無および検出された顔のサイズを検出する顔検出手段と、
前記顔検出手段による検出結果から所定の条件を満足するかを判定する判定手段と、
前記判定手段により前記所定の条件として顔が検出され且つ検出された顔のサイズが閾値以上であると判定された場合には、前記第1の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定手段により前記所定の条件を満たしていないと判定された場合には、前記第2の算出手段により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出手段と、
前記デフォーカス量検出手段により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
A focus sensor configured to divide and form a light beam incident on the imaging unit and output a pair of image signals from a pair of focus detection pixel arrays;
First calculating means for calculating a correlation amount from the pair of image signals to calculate a correlation amount, and adding the calculated correlation amount;
Second calculation means for adding the image signals between corresponding pixels to the pair of image signals and calculating a correlation amount by performing a correlation operation from the added image signals;
Face detection means for detecting the presence or absence of a face and the size of the detected face from the output of photometry means different from the imaging means;
Determination means for determining whether a predetermined condition is satisfied from a detection result by the face detection means;
If the determination unit detects a face as the predetermined condition and determines that the detected face size is greater than or equal to a threshold value, the phase difference obtained from the correlation amount calculated by the first calculation unit Is calculated from the correlation amount calculated by the second calculation means when the determinating means determines that the predetermined condition is not satisfied by the determination means. Defocus amount detection means for calculating a defocus amount to the in-focus position based on the phase difference;
A focus detection apparatus comprising: focus detection means for performing focus detection based on the defocus amount calculated by the defocus amount detection means.
前記焦点検出手段による焦点検出はコンティニュアスAFモードの時に行われることを特徴とする請求項7乃至10に記載の焦点検出装置。   11. The focus detection apparatus according to claim 7, wherein focus detection by the focus detection means is performed in a continuous AF mode. 前記加算の回数が所定回数以上の場合には、所定回数分の古いデータを削除することを特徴とする請求項7乃至10のいずれか1項に記載の焦点検出装置。   11. The focus detection apparatus according to claim 7, wherein when the number of additions is equal to or greater than a predetermined number, old data corresponding to the predetermined number of times is deleted. 請求項1乃至12のいずれか1項に記載の焦点検出装置を搭載したことを特徴とする撮像装置。   An imaging apparatus comprising the focus detection apparatus according to any one of claims 1 to 12. 複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段を備える焦点検出装置の焦点検出方法であって、
前記1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出工程と、
前記1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出工程と、
動作モードを判定する判定工程と、
前記判定工程により処理負荷の重い動作モードと判定された場合には、前記第1の算出工程により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定工程により処理負荷の軽い動作モードと判定された場合には、前記第2の算出工程により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出工程と、
前記デフォーカス量検出工程により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出工程とを備えることを特徴とする焦点検出方法。
A focus detection method for a focus detection apparatus, comprising a plurality of focus detection pixel columns that are paired with each other in a part of a plurality of pixels, and an imaging unit that outputs a pair of image signals from the pair of focus detection pixel columns. There,
A first calculation step of calculating a correlation amount from the pair of image signals to calculate a correlation amount, and adding the calculated correlation amount;
A second calculation step of adding an image signal between corresponding pixels to the pair of image signals and calculating a correlation amount by performing a correlation operation from the added image signals;
A determination step of determining an operation mode;
When it is determined in the determination step that the operation mode is heavy processing load, the defocus amount to the in-focus position is calculated based on the phase difference obtained from the correlation amount calculated in the first calculation step, If it is determined in the determination step that the operation mode is light processing load, the defocus amount to the in-focus position is calculated based on the phase difference obtained from the correlation amount calculated in the second calculation step. A focus amount detection step;
And a focus detection step of performing focus detection based on the defocus amount calculated by the defocus amount detection step.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段を備える焦点検出装置の焦点検出方法であって、
前記1対の像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、算出したデフォーカス量を加算平均する第1の算出工程と、
前記1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出する第2の算出工程と、
動作モードを判定する判定工程と、
前記判定工程により処理負荷の重い動作モードと判定された場合には、前記第1の算出工程により算出されたデフォーカス量に基づいて焦点検出を行い、前記判定工程により処理負荷の軽い動作モードと判定された場合には、前記第2の算出工程により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出工程とを備えることを特徴とする焦点検出方法。
A focus detection method for a focus detection apparatus, comprising a plurality of focus detection pixel columns that are paired with each other in a part of a plurality of pixels, and an imaging unit that outputs a pair of image signals from the pair of focus detection pixel columns. There,
A first calculation step of calculating a defocus amount to the in-focus position based on a phase difference obtained by performing a correlation operation from the pair of image signals and calculating an average of the calculated defocus amounts. When,
Defocusing to the in-focus position based on the phase difference obtained from the correlation amount calculated by adding the image signals between the corresponding pixels to the pair of image signals and performing correlation calculation from the added image signals A second calculation step for calculating an amount;
A determination step of determining an operation mode;
When it is determined that the operation mode has a heavy processing load in the determination step, focus detection is performed based on the defocus amount calculated in the first calculation step, and the operation mode with a light processing load is performed in the determination step. A focus detection method comprising: a focus detection step of performing focus detection based on the defocus amount calculated in the second calculation step when the determination is made.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段を備える焦点検出装置の焦点検出方法であって、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出工程と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出工程と、
前記撮像手段のフレームレートを判定する判定工程と、
前記判定工程により前記フレームレートが所定のフレームレート未満であると判定された場合には、前記第1の算出工程により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定工程により前記フレームレートが所定のフレームレート以上であると判定された場合には、前記第2の算出工程により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出工程と、
前記デフォーカス量検出工程により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出工程とを備えることを特徴とする焦点検出方法。
A focus detection method for a focus detection apparatus, comprising a plurality of focus detection pixel columns that are paired with each other in a part of a plurality of pixels, and an imaging unit that outputs a pair of image signals from the pair of focus detection pixel columns. There,
A first calculation step of calculating a correlation amount by performing a correlation operation from a pair of image signals included in a plurality of frames captured by the imaging unit, and adding the calculated correlation amount;
Second, calculating a correlation amount by adding image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals. The calculation process of
A determination step of determining a frame rate of the imaging means;
If the determination step determines that the frame rate is less than a predetermined frame rate, defocusing to the in-focus position is performed based on the phase difference obtained from the correlation amount calculated in the first calculation step. When the determination step determines that the frame rate is equal to or higher than a predetermined frame rate, focusing is performed based on the phase difference obtained from the correlation amount calculated in the second calculation step. A defocus amount detection step for calculating a defocus amount to the position;
And a focus detection step of performing focus detection based on the defocus amount calculated by the defocus amount detection step.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段を備える焦点検出装置の焦点検出方法であって、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、算出したデフォーカス量を加算平均する第1の算出工程と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出する第2の算出工程と、
前記撮像手段のフレームレートを判定する判定工程と、
前記判定工程により前記フレームレートが所定のフレームレート未満であると判定された場合には、前記第1の算出工程により算出されたデフォーカス量に基づいて焦点検出を行い、前記判定工程により前記フレームレートが所定のフレームレート以上であると判定された場合には、前記第2の算出工程により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出工程とを備えることを特徴とする焦点検出方法。
A focus detection method for a focus detection apparatus, comprising a plurality of focus detection pixel columns that are paired with each other in a part of a plurality of pixels, and an imaging unit that outputs a pair of image signals from the pair of focus detection pixel columns. There,
A defocus amount up to the in-focus position is calculated based on a phase difference obtained from a correlation amount calculated by performing a correlation operation from a pair of image signals included in a plurality of frames captured by the imaging unit. A first calculation step of averaging the defocus amounts;
Obtained from the correlation amount calculated by adding the image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals A second calculation step of calculating a defocus amount to the in-focus position based on the phase difference;
A determination step of determining a frame rate of the imaging means;
When it is determined by the determination step that the frame rate is less than a predetermined frame rate, focus detection is performed based on the defocus amount calculated by the first calculation step, and the frame is determined by the determination step. And a focus detection step of performing focus detection based on the defocus amount calculated in the second calculation step when it is determined that the rate is equal to or higher than a predetermined frame rate. Method.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段を備える焦点検出装置の焦点検出方法であって、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、算出したデフォーカス量を加算平均する第1の算出工程と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出する第2の算出工程と、
現在設定されている絞り値が前フレームから変化したかを判定する判定工程と、
前記判定工程により前記絞り値が変化したと判定された場合には、前記第1の算出工程により算出されたデフォーカス量に基づいて焦点検出を行い、前記判定工程により前記絞り値が変化していないと判定された場合には、前記第2の算出工程により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出工程とを備えることを特徴とする焦点検出方法。
A focus detection method for a focus detection apparatus, comprising a plurality of focus detection pixel columns that are paired with each other in a part of a plurality of pixels, and an imaging unit that outputs a pair of image signals from the pair of focus detection pixel columns. There,
A defocus amount up to the in-focus position is calculated based on a phase difference obtained from a correlation amount calculated by performing a correlation operation from a pair of image signals included in a plurality of frames captured by the imaging unit. A first calculation step of averaging the defocus amounts;
Obtained from the correlation amount calculated by adding the image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals A second calculation step of calculating a defocus amount to the in-focus position based on the phase difference;
A determination step of determining whether the currently set aperture value has changed from the previous frame;
When it is determined by the determination step that the aperture value has changed, focus detection is performed based on the defocus amount calculated by the first calculation step, and the aperture value has changed by the determination step. And a focus detection step of performing focus detection based on the defocus amount calculated in the second calculation step when it is determined that there is no focus detection method.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、前記撮像手段の出力から顔の有無および検出された顔のサイズを検出する顔検出手段とを備える焦点検出装置の焦点検出方法であって、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出工程と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出工程と、
前記顔検出手段による検出結果から所定の条件を満足するかを判定する判定工程と、
前記判定工程により前記所定の条件として顔が検出され且つ検出された顔のサイズが閾値以上であると判定された場合には、前記第1の算出工程により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定工程により前記所定の条件を満たしていないと判定された場合には、前記第2の算出工程により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出工程と、
前記デフォーカス量検出工程により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出工程とを備えることを特徴とする焦点検出方法。
A plurality of focus detection pixel columns that are paired with each other in a part of the plurality of pixels, an imaging unit that outputs a pair of image signals from the pair of focus detection pixel columns; A focus detection method for a focus detection device comprising face detection means for detecting presence / absence and size of a detected face,
A first calculation step of calculating a correlation amount by performing a correlation operation from a pair of image signals included in a plurality of frames captured by the imaging unit, and adding the calculated correlation amount;
Second, calculating a correlation amount by adding image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals. The calculation process of
A determination step of determining whether a predetermined condition is satisfied from a detection result by the face detection means;
When a face is detected as the predetermined condition by the determination step and the size of the detected face is determined to be greater than or equal to a threshold value, the phase difference obtained from the correlation amount calculated by the first calculation step Is calculated from the correlation amount calculated in the second calculation step when it is determined that the predetermined condition is not satisfied by the determination step. A defocus amount detection step of calculating a defocus amount to the in-focus position based on the phase difference;
And a focus detection step of performing focus detection based on the defocus amount calculated by the defocus amount detection step.
複数の画素の一部に互いに対をなす焦点検出用画素列を複数有し、1対の焦点検出用画素列から1対の像信号を出力する撮像手段と、前記撮像手段の出力から顔の有無および検出された顔のサイズを検出する顔検出手段とを備える焦点検出装置の焦点検出方法であって、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、算出したデフォーカス量を加算平均する第1の算出工程と、
前記撮像手段で撮像された複数フレームに含まれる、1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って算出した相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出する第2の算出工程と、
前記顔検出手段による検出結果から所定の条件を満足するかを判定する判定工程と、
前記判定工程により前記所定の条件として顔が検出され且つ検出された顔のサイズが閾値以上であると判定された場合には、前記第1の算出工程により算出されたデフォーカス量に基づいて焦点検出を行い、前記判定工程により前記所定の条件を満たしていないと判定された場合には、前記第2の算出工程により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出工程とを備えることを特徴とする焦点検出方法。
A plurality of focus detection pixel columns that are paired with each other in a part of the plurality of pixels, an imaging unit that outputs a pair of image signals from the pair of focus detection pixel columns; A focus detection method for a focus detection device comprising face detection means for detecting presence / absence and size of a detected face,
A defocus amount up to the in-focus position is calculated based on a phase difference obtained from a correlation amount calculated by performing a correlation operation from a pair of image signals included in a plurality of frames captured by the imaging unit. A first calculation step of averaging the defocus amounts;
Obtained from the correlation amount calculated by adding the image signals between corresponding pixels to a pair of image signals included in a plurality of frames imaged by the imaging means, and performing a correlation operation from the added image signals A second calculation step of calculating a defocus amount to the in-focus position based on the phase difference;
A determination step of determining whether a predetermined condition is satisfied from a detection result by the face detection means;
When the determination step detects a face as the predetermined condition and determines that the detected face size is greater than or equal to a threshold value, the focus is determined based on the defocus amount calculated in the first calculation step. And a focus detection step of performing focus detection based on the defocus amount calculated by the second calculation step when it is determined by the determination step that the predetermined condition is not satisfied. A focus detection method characterized by the above.
撮像手段に入射する光束を分割して結像させるように構成され、1対の焦点検出用画素列から1対の像信号を出力する焦点センサと、前記撮像手段とは異なる測光手段の出力から顔の有無および検出された顔のサイズを検出する顔検出手段とを備える焦点検出装置の焦点検出方法であって、
前記1対の像信号から相関演算を行って相関量を算出し、算出した相関量を加算する第1の算出工程と、
前記1対の像信号に対して、対応する画素同士で像信号を加算し、加算した像信号から相関演算を行って相関量を算出する第2の算出工程と、
前記顔検出手段による検出結果から所定の条件を満足するかを判定する判定工程と、
前記判定工程により前記所定の条件として顔が検出され且つ検出された顔のサイズが閾値以上であると判定された場合には、前記第1の算出工程により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出し、前記判定工程により前記所定の条件を満たしていないと判定された場合には、前記第2の算出工程により算出された相関量から得た位相差に基づいて合焦位置までのデフォーカス量を算出するデフォーカス量検出工程と、
前記デフォーカス量検出工程により算出されたデフォーカス量に基づいて焦点検出を行う焦点検出工程とを備えることを特徴とする焦点検出方法。
A focus sensor configured to divide and form a light beam incident on the imaging unit and output a pair of image signals from a pair of focus detection pixel arrays, and from an output of a photometric unit different from the imaging unit A focus detection method of a focus detection device comprising face detection means for detecting the presence of a face and the size of the detected face,
A first calculation step of calculating a correlation amount from the pair of image signals to calculate a correlation amount, and adding the calculated correlation amount;
A second calculation step of adding an image signal between corresponding pixels to the pair of image signals and calculating a correlation amount by performing a correlation operation from the added image signals;
A determination step of determining whether a predetermined condition is satisfied from a detection result by the face detection means;
When a face is detected as the predetermined condition by the determination step and the size of the detected face is determined to be greater than or equal to a threshold value, the phase difference obtained from the correlation amount calculated by the first calculation step Is calculated from the correlation amount calculated in the second calculation step when it is determined that the predetermined condition is not satisfied by the determination step. A defocus amount detection step of calculating a defocus amount to the in-focus position based on the phase difference;
And a focus detection step of performing focus detection based on the defocus amount calculated by the defocus amount detection step.
請求項14乃至21のいずれか1項に記載の焦点検出方法を焦点検出装置または撮像装置に実行させるためのコンピュータに読み取り可能なプログラム。
A computer-readable program for causing a focus detection apparatus or an imaging apparatus to execute the focus detection method according to any one of claims 14 to 21.
JP2014160264A 2014-08-06 2014-08-06 Focus detection device and method, and program as well as imaging device Pending JP2016038428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014160264A JP2016038428A (en) 2014-08-06 2014-08-06 Focus detection device and method, and program as well as imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014160264A JP2016038428A (en) 2014-08-06 2014-08-06 Focus detection device and method, and program as well as imaging device

Publications (1)

Publication Number Publication Date
JP2016038428A true JP2016038428A (en) 2016-03-22

Family

ID=55529553

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014160264A Pending JP2016038428A (en) 2014-08-06 2014-08-06 Focus detection device and method, and program as well as imaging device

Country Status (1)

Country Link
JP (1) JP2016038428A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108933881A (en) * 2017-05-22 2018-12-04 中兴通讯股份有限公司 A kind of method for processing video frequency and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108933881A (en) * 2017-05-22 2018-12-04 中兴通讯股份有限公司 A kind of method for processing video frequency and device
CN108933881B (en) * 2017-05-22 2022-05-27 中兴通讯股份有限公司 Video processing method and device

Similar Documents

Publication Publication Date Title
JP5388544B2 (en) Imaging apparatus and focus control method thereof
US9185317B2 (en) Image capturing apparatus capable of storing focus detection data
JP6405243B2 (en) Focus detection apparatus and control method thereof
US7889985B2 (en) Imaging apparatus
US10904425B2 (en) Image processing apparatus, control method therefor, and storage medium for evaluating a focusing state of image data
JP4697606B2 (en) Imaging apparatus and focus control method
US8988579B2 (en) Imaging apparatus
KR101692398B1 (en) Digital photographing apparatus and control method thereof
JP6289017B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP5954933B2 (en) Imaging device and lens device
JP2011048276A (en) Stereoscopic imaging apparatus
US20160044231A1 (en) Image capturing apparatus and method of controlling the same
JP5503438B2 (en) 3D image display apparatus and 3D image display method
JP2007212724A (en) Focusing position determination method and device
JP4997043B2 (en) Imaging apparatus, method and program
JP2007225897A (en) Focusing position determination device and method
JP4949717B2 (en) In-focus position determining apparatus and method
JP2018091977A (en) Focus controller, imaging apparatus, focus control method, and focus control program
JP2016038428A (en) Focus detection device and method, and program as well as imaging device
JP2020181147A (en) Focusing apparatus, image pickup apparatus, focusing method, and program
CN116095258A (en) Electronic device, control method of electronic device, and computer-readable medium
JP6859388B2 (en) Imaging device, focus adjustment device, and its control method
JPH09181954A (en) Electronic still camera and method for focus-controlling the same
JP5896947B2 (en) IMAGING DEVICE AND ITS CONTROL METHOD, IMAGING SYSTEM, PROGRAM, AND STORAGE MEDIUM
JP3395769B2 (en) Digital still camera