JP2011248376A - Imaging apparatus, focusing method and program - Google Patents

Imaging apparatus, focusing method and program Download PDF

Info

Publication number
JP2011248376A
JP2011248376A JP2011160735A JP2011160735A JP2011248376A JP 2011248376 A JP2011248376 A JP 2011248376A JP 2011160735 A JP2011160735 A JP 2011160735A JP 2011160735 A JP2011160735 A JP 2011160735A JP 2011248376 A JP2011248376 A JP 2011248376A
Authority
JP
Japan
Prior art keywords
area
image
subject
unit
evaluation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2011160735A
Other languages
Japanese (ja)
Other versions
JP5397426B2 (en
Inventor
Kanako Nakano
加奈子 中野
Takeshi Fujita
健 藤田
daisuke Uematsu
大輔 植松
Yu Muto
祐 武藤
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2011160735A priority Critical patent/JP5397426B2/en
Publication of JP2011248376A publication Critical patent/JP2011248376A/en
Application granted granted Critical
Publication of JP5397426B2 publication Critical patent/JP5397426B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve the accuracy of automatic focusing processing.SOLUTION: An imaging apparatus 100 includes: an image region-specifying unit 7a for determining a shape of an image region of an attention subject that becomes an object to be focused in a captured image; a region-setting unit 7e for setting a plurality of AF estimation regions based on the shape of the image region of the specified attention subject; and a lens-driving unit 2 for focusing a lens unit 1 based on image data in these AF estimation regions.

Description

本発明は、オートフォーカス(自動合焦)処理を行う撮像装置、合焦方法及びプログラムに関する。   The present invention relates to an imaging apparatus, an in-focus method, and a program that perform auto-focus (auto-focus) processing.

従来、デジタルカメラのオートフォーカス(AF)処理において、撮像フレーム内に複数のAF領域を設定する技術(例えば、特許文献1参照)や、被写体を追尾してAFする技術(例えば、特許文献1参照)が知られている。   Conventionally, in autofocus (AF) processing of a digital camera, a technique for setting a plurality of AF areas in an imaging frame (see, for example, Patent Document 1), and a technique for tracking a subject to perform AF (see, for example, Patent Document 1) )It has been known.

特開2007−178576号公報JP 2007-178576 A 特開2006−184742号公報JP 2006-184742 A

しかしながら、上記特許文献1に係る技術においては、撮像フレーム内の予め決められた位置にAF領域を設定するものであり、AF対象となる特定の被写体の形状に合わせてAF領域を設定したり、AF対象となる一の被写体に対して複数のAF領域を設定するものではなかった。このため、部位によってコントラストが異なるような被写体をAFの対象とする場合には、コントラストの低い部分にAF領域が設定されてしまい、AFの精度が低下してしまうという問題があった。また、上記特許文献2に係る技術を適用しても、コントラストの低い部分にAF領域が設定されることを防止することはできなかった。
一方、被写体全体を含むように大きなAF領域を設定してしまうと、AF処理におけるコントラスト勾配が緩くなる虞もあり、この場合にはコントラストのピークを検出する精度が低下してしまうという問題が生じてしまう。
However, in the technique according to Patent Document 1, the AF area is set at a predetermined position in the imaging frame, and the AF area is set according to the shape of a specific subject to be AF target. A plurality of AF areas are not set for one subject to be AF target. For this reason, when a subject whose contrast varies depending on the part is used as an AF target, there is a problem that an AF area is set in a low-contrast portion and AF accuracy is lowered. Further, even if the technique according to Patent Document 2 is applied, it has not been possible to prevent the AF area from being set in a low contrast portion.
On the other hand, if a large AF area is set so as to include the entire subject, the contrast gradient in the AF processing may be loosened. In this case, there is a problem in that the accuracy of detecting the contrast peak is lowered. End up.

そこで、本発明の課題は、自動合焦処理の精度を向上させることができる撮像装置、合焦方法及びプログラムを提供することである。   Therefore, an object of the present invention is to provide an imaging apparatus, a focusing method, and a program that can improve the accuracy of automatic focusing processing.

上記課題を解決するため、請求項1に記載の発明の撮像装置は、
撮像手段と、この撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する特定手段と、この特定手段により特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を設定する領域設定手段と、この領域設定手段により設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる合焦制御手段と、を備えることを特徴としている。
In order to solve the above problem, an imaging apparatus according to claim 1 is provided.
An imaging unit, a specifying unit that specifies a shape of an image area of a target subject to be focused in a captured image captured by the imaging unit, and a shape of the image area of the target subject specified by the specifying unit A region setting unit that sets a plurality of contrast evaluation regions, and a focusing control unit that focuses the imaging unit based on image data in the contrast evaluation region set by the region setting unit. It is characterized by.

請求項2に記載の発明は、請求項1に記載の撮像装置において、
前記領域設定手段は、矩形状の前記コントラスト評価領域を複数隣接させて設定することを特徴としている。
The invention according to claim 2 is the imaging apparatus according to claim 1,
The area setting means sets a plurality of rectangular contrast evaluation areas adjacent to each other.

請求項3に記載の発明は、請求項2に記載の撮像装置において、
前記注目被写体の画像領域の垂直方向及び水平方向の長さの比率に応じて、複数隣接して設定される前記コントラスト評価領域の垂直方向及び水平方向の設定数を決定する決定手段を更に備えることを特徴としている。
The invention according to claim 3 is the imaging apparatus according to claim 2,
The apparatus further comprises a determining unit that determines the number of the vertical and horizontal settings of the contrast evaluation region that are set adjacent to each other in accordance with the ratio of the vertical and horizontal lengths of the image area of the subject of interest. It is characterized by.

請求項4に記載の発明は、請求項3に記載の撮像装置において、
前記特定手段は、更に、前記注目被写体の画像領域の寸法を特定し、前記決定手段は、前記注目被写体の画像領域の形状及び寸法に基づいて設定された仮コントラスト評価領域の寸法に応じて、前記コントラスト評価領域の垂直方向及び水平方向の設定数を決定することを特徴としている。
The invention according to claim 4 is the imaging apparatus according to claim 3,
The specifying means further specifies the size of the image area of the subject of interest, and the determining means is in accordance with the size of the temporary contrast evaluation area set based on the shape and size of the image area of the subject of interest. The number of set in the vertical direction and the horizontal direction of the contrast evaluation area is determined.

請求項5に記載の発明は、請求項3又は4に記載の撮像装置において、
前記決定手段により決定された前記コントラスト評価領域の垂直方向及び水平方向の設定数に応じて、前記コントラスト評価領域の寸法を算出する算出手段を更に備えることを特徴としている。
The invention according to claim 5 is the imaging apparatus according to claim 3 or 4,
The image processing apparatus further includes calculation means for calculating a dimension of the contrast evaluation area according to the number of vertical and horizontal settings of the contrast evaluation area determined by the determination means.

請求項6に記載の発明は、請求項5に記載の撮像装置において、
前記特定手段は、更に、前記注目被写体の画像領域の寸法を特定し、前記算出手段は、前記注目被写体の画像領域の形状及び寸法、並びに前記決定手段により決定された前記コントラスト評価領域の垂直方向及び水平方向の設定数に基づいて、前記コントラスト評価領域の寸法を算出することを特徴としている。
The invention described in claim 6 is the imaging apparatus according to claim 5,
The specifying means further specifies the size of the image area of the subject of interest, and the calculating means is the shape and size of the image area of the subject of interest, and the vertical direction of the contrast evaluation area determined by the determining means The size of the contrast evaluation area is calculated based on the set number in the horizontal direction.

請求項7に記載の発明は、請求項1〜6の何れか一項に記載の撮像装置において、
前記特定手段は、更に、前記注目被写体の画像領域の寸法を特定し、前記注目被写体の画像領域の寸法が前記コントラスト評価領域として設定可能な最小寸法よりも大きいか否かを判定する寸法判定手段を更に備え、前記領域設定手段は、前記寸法判定手段による判定の結果、前記注目被写体の画像領域の寸法が前記コントラスト評価領域の最小寸法よりも大きい場合、前記コントラスト評価領域を複数設定する一方で、前記注目被写体の画像領域の寸法が前記コントラスト評価領域の最小寸法以下である場合、前記コントラスト評価領域を一つ設定することを特徴としている。
The invention according to claim 7 is the imaging apparatus according to any one of claims 1 to 6,
The specifying means further specifies a size of the image area of the subject of interest and determines whether or not the size of the image area of the subject of interest is larger than a minimum dimension that can be set as the contrast evaluation area. The area setting means sets a plurality of contrast evaluation areas when the size of the image area of the subject of interest is larger than the minimum dimension of the contrast evaluation area as a result of the determination by the dimension determination means. When the size of the image area of the subject of interest is equal to or smaller than the minimum dimension of the contrast evaluation area, one contrast evaluation area is set.

請求項8に記載の発明は、請求項1〜7の何れか一項に記載の撮像装置において、
前記注目被写体の画像領域を囲む最小の矩形を当該注目被写体の画像領域の仮形状として設定する被写体設定手段と、この被写体設定手段により設定された前記注目被写体の画像領域の仮形状に合わせて前記領域設定手段により設定された複数のコントラスト評価領域について、当該注目被写体の画像領域を所定の割合以上含むか否かを判定する領域判定手段と、前記複数のコントラスト評価領域のうち、前記領域判定手段により当該注目被写体の画像領域を所定の割合以上含まないと判定されたコントラスト評価領域を評価対象から除外する除外手段と、を更に備えることを特徴としている。
The invention according to claim 8 is the imaging apparatus according to any one of claims 1 to 7,
Subject setting means for setting a minimum rectangle surrounding the image area of the subject of interest as a temporary shape of the image area of the subject of interest, and the temporary shape of the image area of the subject of interest set by the subject setting means An area determination unit that determines whether or not the image area of the subject of interest is included in a predetermined ratio or more for a plurality of contrast evaluation areas set by the area setting unit; and the area determination unit among the plurality of contrast evaluation areas And a means for excluding the contrast evaluation area determined not to include the image area of the subject of interest at a predetermined ratio or more from the evaluation target.

請求項9に記載の発明は、請求項1〜8の何れか一項に記載の撮像装置において、
前記領域設定手段は、前記注目被写体の画像領域の輪郭部分と交わるように前記コントラスト評価領域を設定することを特徴としている。
The invention according to claim 9 is the imaging apparatus according to any one of claims 1 to 8,
The region setting means sets the contrast evaluation region so as to intersect with a contour portion of an image region of the subject of interest.

請求項10に記載の発明は、請求項1〜9の何れか一項に記載の撮像装置において、
前記特定手段は、前記注目被写体の画像領域の形状を逐次特定し、前記領域設定手段は、前記特定手段により逐次特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を逐次設定することを特徴としている。
The invention according to claim 10 is the imaging apparatus according to any one of claims 1 to 9,
The specifying means sequentially specifies the shape of the image area of the target object, and the area setting means sequentially specifies a plurality of contrast evaluation areas in accordance with the shape of the image area of the target object specified by the specifying means. It is characterized by setting.

請求項11に記載の発明は、請求項1〜10の何れか一項に記載の撮像装置において、
前記合焦制御手段は、前記領域設定手段により設定された前記複数のコントラスト評価領域のうち、各評価領域内の画像データのコントラスト勾配の検出精度が所定値以上で、且つ、当該撮像装置から最も近い距離にコントラストのピークを有するコントラスト評価領域の出力結果を採用して、前記撮像手段を合焦させることを特徴としている。
The invention according to claim 11 is the imaging apparatus according to any one of claims 1 to 10,
The focus control unit has a contrast gradient detection accuracy of image data in each evaluation region of the plurality of contrast evaluation regions set by the region setting unit that is greater than or equal to a predetermined value and is the most from the imaging device. The output means of the contrast evaluation area having a contrast peak at a short distance is employed to focus the imaging means.

請求項12に記載の発明は、請求項1〜11の何れか一項に記載の撮像装置において、
前記領域設定手段は、前記注目被写体の画像領域の水平方向に対して垂直方向を優先して前記コントラスト評価領域を設定することを特徴としている。
Invention of Claim 12 in the imaging device as described in any one of Claims 1-11,
The area setting means sets the contrast evaluation area by giving priority to the vertical direction with respect to the horizontal direction of the image area of the subject of interest.

請求項13に記載の発明の合焦方法は、
撮像手段を備える撮像装置を用いた合焦方法であって、前記撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する処理と、特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を設定する処理と、設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる処理と、を行うことを特徴としている。
The focusing method of the invention according to claim 13 is:
A focusing method using an imaging apparatus including an imaging unit, the process of specifying the shape of an image area of a target object to be focused in a captured image captured by the imaging unit, and the specified attention A process of setting a plurality of contrast evaluation areas in accordance with the shape of the image area of the subject, and a process of focusing the imaging unit based on image data in the set contrast evaluation areas Yes.

請求項14に記載の発明のプログラムは、
撮像手段を備える撮像装置のコンピュータを、前記撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する特定手段、この特定手段により特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を設定する領域設定手段、この領域設定手段により設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる合焦制御手段、として機能させることを特徴としている。
The program of the invention according to claim 14 is:
A computer of an imaging apparatus including an imaging unit; a specifying unit that specifies a shape of an image area of a subject of interest to be focused in a captured image captured by the imaging unit; a target of the target subject specified by the specifying unit Area setting means for setting a plurality of contrast evaluation areas in accordance with the shape of the image area, focusing control means for focusing the imaging means based on image data in the contrast evaluation area set by the area setting means, It is characterized by making it function as.

本発明によれば、注目被写体の画像領域の形状に合わせて設定された複数のコントラスト評価領域によって自動合焦処理の精度を向上させることができる。   According to the present invention, the accuracy of the automatic focusing process can be improved by the plurality of contrast evaluation areas set in accordance with the shape of the image area of the subject of interest.

本発明を適用した一実施形態の撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device of one Embodiment to which this invention is applied. 撮像装置による自動合焦処理に係る動作の一例を示すフローチャートである。It is a flowchart which shows an example of the operation | movement which concerns on the automatic focusing process by an imaging device. 図2の自動合焦処理の続きを示すフローチャートである。3 is a flowchart showing a continuation of the automatic focusing process of FIG. 図2の自動合焦処理にて抽出される注目被写体の一例を模式的に示す図である。It is a figure which shows typically an example of the attention object extracted by the automatic focusing process of FIG. 図2の自動合焦処理に係る画像の一例を模式的に示す図である。It is a figure which shows typically an example of the image which concerns on the automatic focusing process of FIG. 図2の自動合焦処理に係る画像の一例を模式的に示す図である。It is a figure which shows typically an example of the image which concerns on the automatic focusing process of FIG. 図2の自動合焦処理に係る画像の一例を模式的に示す図である。It is a figure which shows typically an example of the image which concerns on the automatic focusing process of FIG.

以下に、本発明について、図面を用いて具体的な態様を説明する。ただし、発明の範囲は、図示例に限定されない。
図1は、本発明を適用した一実施形態の撮像装置100の概略構成を示すブロック図である。
Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples.
FIG. 1 is a block diagram illustrating a schematic configuration of an imaging apparatus 100 according to an embodiment to which the present invention is applied.

本実施形態の撮像装置100は、撮像画像(例えば、撮像画像G2;図6(a)参照)内の合焦対象となる注目被写体(例えば、注目被写体S2)の画像領域(例えば、画像領域A2;図6(b)参照)の形状を特定し、当該注目被写体の画像領域の形状に合わせてAF評価領域(例えば、AF評価領域P2;図6(d)参照)を複数設定して、これらAF評価領域内の画像データに基づいて、レンズ部1を合焦させる。
具体的には、図1に示すように、撮像装置100は、レンズ部1、レンズ駆動部2、電子撮像部3、ユニット回路4、撮像制御部5、画像生成部6、AF処理部7、画像処理部8、表示部9、画像記録部10、操作入力部11、バッファメモリ12、プログラムメモリ13、中央制御部14等を備えている。
また、レンズ駆動部2、撮像制御部5、画像生成部6、AF処理部7、画像処理部8、表示部9、画像記録部10、バッファメモリ12、プログラムメモリ13、中央制御部14は、バスライン15を介して接続されている。
The imaging apparatus 100 according to the present embodiment includes an image region (for example, an image region A2) of a target subject (for example, a target subject S2) to be focused in a captured image (for example, the captured image G2; see FIG. 6A). ; FIG. 6B) is specified, and a plurality of AF evaluation areas (for example, AF evaluation area P2; see FIG. 6D) are set in accordance with the shape of the image area of the subject of interest. Based on the image data in the AF evaluation area, the lens unit 1 is focused.
Specifically, as illustrated in FIG. 1, the imaging device 100 includes a lens unit 1, a lens driving unit 2, an electronic imaging unit 3, a unit circuit 4, an imaging control unit 5, an image generation unit 6, an AF processing unit 7, An image processing unit 8, a display unit 9, an image recording unit 10, an operation input unit 11, a buffer memory 12, a program memory 13, a central control unit 14 and the like are provided.
The lens driving unit 2, the imaging control unit 5, the image generation unit 6, the AF processing unit 7, the image processing unit 8, the display unit 9, the image recording unit 10, the buffer memory 12, the program memory 13, and the central control unit 14 are They are connected via a bus line 15.

レンズ部1は、例えば、複数のレンズを備えて構成され、具体的には、フォーカスレンズ、ズームレンズ(何れも図示略)等を備えている。   The lens unit 1 includes, for example, a plurality of lenses, and specifically includes a focus lens, a zoom lens (both not shown), and the like.

レンズ駆動部2は、レンズ部1に備わるフォーカスレンズやズームレンズをそれぞれ光軸方向に駆動させる。具体的には、レンズ駆動部2は、フォーカスモータやズームモータ等の駆動源と、中央制御部14からの制御信号に従って駆動源を駆動させるドライバ等を備えている(何れも図示略)。   The lens driving unit 2 drives the focus lens and the zoom lens provided in the lens unit 1 in the optical axis direction. Specifically, the lens driving unit 2 includes a driving source such as a focus motor and a zoom motor, and a driver that drives the driving source in accordance with a control signal from the central control unit 14 (none of which is shown).

電子撮像部3は、レンズ部1の光軸上に配置されている。また、電子撮像部3は、例えば、CCD(Charge Coupled Device)やCMOS(Complementary Metal-oxide Semiconductor)等のイメージセンサから構成され、レンズ部1の各種レンズを通過した光学像を二次元の画像信号に変換する。   The electronic imaging unit 3 is disposed on the optical axis of the lens unit 1. The electronic imaging unit 3 is composed of, for example, an image sensor such as a charge coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS), and an optical image that has passed through various lenses of the lens unit 1 is converted into a two-dimensional image signal. Convert to

ユニット回路4は、電子撮像部3から出力される被写体の光学像に応じたアナログの撮像信号が入力され、入力された撮像信号を保持するCDSと、その撮像信号を増幅するゲイン調整アンプ(AGC)、増幅された撮像信号をデジタルの撮像信号に変換するA/D変換器(ADC)等から構成されている。
そして、ユニット回路4は、デジタルの撮像信号を画像生成部6及びAF処理部7に送信する。
The unit circuit 4 receives an analog imaging signal corresponding to the optical image of the subject output from the electronic imaging unit 3, receives a CDS that holds the input imaging signal, and a gain adjustment amplifier (AGC) that amplifies the imaging signal. ), An A / D converter (ADC) that converts the amplified image signal into a digital image signal, and the like.
Then, the unit circuit 4 transmits a digital imaging signal to the image generation unit 6 and the AF processing unit 7.

撮像制御部5は、中央制御部14が設定するフレームレートに従ったタイミングで、電子撮像部3やユニット回路4を駆動させる制御を行う。具体的には、撮像制御部5は、TG(Timing Generator)、電子撮像部3を駆動するドライバ等(何れも図示略)を備え、TGを介してドライバやユニット回路4の動作タイミングを制御する。即ち、中央制御部14が、プログラムメモリ13から読み出したプログラム線図に従ってシャッタースピードを設定すると、撮像制御部5のTGは、当該シャッタースピードに対応する電荷蓄積時間をシャッターパルスとしてドライバに出力し、ドライバからの駆動パルス信号に従って電子撮像部3を動作させて電荷蓄積時間(露光時間)を制御する。   The imaging control unit 5 performs control to drive the electronic imaging unit 3 and the unit circuit 4 at a timing according to the frame rate set by the central control unit 14. Specifically, the imaging control unit 5 includes a TG (Timing Generator), a driver for driving the electronic imaging unit 3 and the like (all not shown), and controls the operation timing of the driver and the unit circuit 4 via the TG. . That is, when the central control unit 14 sets the shutter speed according to the program diagram read from the program memory 13, the TG of the imaging control unit 5 outputs the charge accumulation time corresponding to the shutter speed to the driver as a shutter pulse, The electronic image pickup unit 3 is operated in accordance with the drive pulse signal from the driver to control the charge accumulation time (exposure time).

このように構成されたレンズ部1、電子撮像部3、ユニット回路4及び撮像制御部5は、被写体を撮像する撮像手段を構成している。   The lens unit 1, the electronic imaging unit 3, the unit circuit 4, and the imaging control unit 5 configured as described above constitute imaging means for imaging a subject.

画像生成部6は、ユニット回路4から送られてきた画像データに対してγ補正処理、ホワイトバランス処理などの処理を施すとともに、輝度色差信号(YUVデータ)を生成する。そして、画像生成部6は、生成された輝度色差信号の画像データをバスライン15を介して中央制御部14に出力する。   The image generation unit 6 performs processing such as γ correction processing and white balance processing on the image data sent from the unit circuit 4 and generates a luminance color difference signal (YUV data). Then, the image generation unit 6 outputs the generated image data of the luminance color difference signal to the central control unit 14 via the bus line 15.

AF処理部7は、撮像画像(例えば、撮像画像G1、G2、G3;図5(a)、図6(a)、図7(a)参照)中の注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3;図5(b)、図6(b)、図7(b)参照)を特定する画像領域特定部7aを具備している。
画像領域特定部7aは、例えば、ユニット回路4から画像データが送られてくる毎に当該画像データに対して、水平方向(横)及び垂直方向(縦)ともに所定倍率の縮小処理を行って、低解像度の画像データ(例えば、横×縦:40×30画素;図4参照)Lを逐次生成する。そして、画像領域特定部7aは、低解像度の画像データLに対して所定の画像認識技術を利用して合焦対象となる注目被写体を特定して画像領域を抽出する。ここで、注目被写体の特定処理は、例えば、色や明るさの変化の連続性から注目被写体の輪郭を抽出することで行っても良いし、予め注目被写体の種類を特定しておき当該注目被写体の特徴情報と比較判定して輪郭を抽出することで行っても良い。
The AF processing unit 7 detects the subject of interest (for example, the subjects of interest S1 and S2) in the captured images (for example, the captured images G1, G2, and G3; see FIGS. 5A, 6A, and 7A). , S3) includes an image region specifying unit 7a that specifies the image region (for example, image regions A1, A2, and A3; see FIGS. 5B, 6B, and 7B).
For example, every time image data is sent from the unit circuit 4, the image area specifying unit 7a performs a reduction process with a predetermined magnification on the image data in both the horizontal direction (horizontal) and the vertical direction (vertical). Low-resolution image data (for example, horizontal × vertical: 40 × 30 pixels; see FIG. 4) L is sequentially generated. Then, the image area specifying unit 7a uses a predetermined image recognition technique for the low-resolution image data L to specify a target subject to be focused and extracts an image area. Here, the target subject specifying process may be performed, for example, by extracting the contour of the target subject from the continuity of changes in color and brightness, or by specifying the type of the target subject in advance. It is also possible to extract the contour by comparing with the feature information of

なお、図5(b)、図6(b)、図7(b)にあっては、画像データを二値化して表しており、ドットなし白抜きで表されている画像領域A1、A2、A3が注目被写体S1、S2、S3に相当し、ドット有りの黒で表されている画像領域が注目被写体S1、S2、S3以外の部分に相当する。
また、注目被写体は、必ずしも一つの被写体として独立している必要はなく、複数の被写体が前後方向に重なった状態であっても良いし、複数の被写体が左右若しくは上下方向に離れて分離した状態であっても良い。
5B, FIG. 6B, and FIG. 7B, the image data is represented by binarization, and the image areas A1, A2, and B, which are represented by white without dots, A3 corresponds to the subject of interest S1, S2, S3, and the image area represented by black with dots corresponds to a portion other than the subject of interest S1, S2, S3.
In addition, the subject of interest does not necessarily have to be independent as one subject, and a plurality of subjects may overlap in the front-rear direction, or a plurality of subjects may be separated in the left-right or vertical direction. It may be.

その後、画像領域特定部7aは、抽出された注目被写体の画像領域の寸法を特定した後、当該注目被写体の画像領域を囲む最小の矩形枠Wを当該注目被写体の画像領域の仮形状として設定する。具体的には、画像領域特定部7aは、注目被写体の画像領域のx軸方向(水平方向)の最大の座標x2と最小の座標x1との差から水平幅xを算出するとともに、y軸方向(垂直方向)の最大の座標y2と最小の座標y1との差から垂直幅yを算出することで(図4参照)、当該水平幅x及び垂直幅yの矩形枠(仮コントラスト評価領域)Wを注目被写体の画像領域の仮形状として設定する。   Thereafter, the image area specifying unit 7a specifies the size of the image area of the extracted subject of interest, and then sets the minimum rectangular frame W surrounding the image area of the subject of interest as the provisional shape of the image area of the subject of interest. . Specifically, the image area specifying unit 7a calculates the horizontal width x from the difference between the maximum coordinate x2 and the minimum coordinate x1 in the x-axis direction (horizontal direction) of the image area of the subject of interest, and also in the y-axis direction. By calculating the vertical width y from the difference between the maximum coordinate y2 in the (vertical direction) and the minimum coordinate y1 (see FIG. 4), a rectangular frame (temporary contrast evaluation area) W having the horizontal width x and the vertical width y is calculated. Is set as the temporary shape of the image area of the subject of interest.

ここで、画像領域特定部7aは、撮像手段としてのレンズ部1、電子撮像部3、ユニット回路4及び撮像制御部5により撮像された撮像画像内の、合焦対象となる注目被写体の画像領域を囲む最小の矩形枠Wを、当該注目被写体の画像領域の仮形状として設定する被写体設定手段を構成している。また、画像領域特定部7aは、撮像画像内の、注目被写体の画像領域の形状を特定する特定手段を構成している。   Here, the image area specifying unit 7a is an image area of a subject of interest to be focused in a captured image captured by the lens unit 1, the electronic imaging unit 3, the unit circuit 4, and the imaging control unit 5 as an imaging unit. Is configured as a subject setting means for setting a minimum rectangular frame W surrounding the image as a temporary shape of the image area of the subject of interest. The image area specifying unit 7a constitutes specifying means for specifying the shape of the image area of the subject of interest in the captured image.

また、AF処理部7は、画像領域特定部7aにより特定された注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の寸法がAF評価領域(例えば、AF評価領域P1、P2、P3;図5(c)、図6(c)、図7(c)参照)として設定可能な最小寸法よりも大きいか否かを判定する寸法判定部7bを具備している。
寸法判定部7bは、具体的には、画像領域特定部7aにより設定された矩形枠Wの寸法が、予め設定されている各AF評価領域の最小寸法よりも大きいか否かを判定する。AF評価領域の最小寸法は、例えば、低解像度(例えば、横×縦:40×30画素)の画像データLに対して、最小の水平幅Xminが6画素、最小の垂直幅Yminが4画素に設定されている。そして、寸法判定部7bによる判定の結果、領域設定部7e(後述)は、矩形枠Wの寸法が各AF評価領域の最小寸法よりも大きい場合、AF評価領域を複数設定する一方で、矩形枠Wの寸法が各AF評価領域の最小寸法以下である場合、最小寸法のAF評価領域を一つ設定する。
ここで、寸法判定部7bは、注目被写体の画像領域の寸法がAF評価領域(コントラスト評価領域)の設定可能な最小寸法よりも大きいか否かを判定する寸法判定手段を構成している。
Further, the AF processing unit 7 determines that the size of the image region (for example, the image regions A1, A2, A3) of the target subject (for example, the target subjects S1, S2, S3) specified by the image region specifying unit 7a is the AF evaluation region. (For example, AF evaluation areas P1, P2, and P3; see FIGS. 5C, 6C, and 7C) A dimension determination unit 7b that determines whether or not the minimum dimension can be set. It has.
Specifically, the dimension determining unit 7b determines whether or not the dimension of the rectangular frame W set by the image area specifying unit 7a is larger than the minimum dimension of each AF evaluation area set in advance. The minimum dimension of the AF evaluation area is, for example, a minimum horizontal width Xmin of 6 pixels and a minimum vertical width Ymin of 4 pixels for image data L of low resolution (for example, horizontal x vertical: 40 x 30 pixels). Is set. As a result of the determination by the size determination unit 7b, the region setting unit 7e (described later) sets a plurality of AF evaluation regions when the size of the rectangular frame W is larger than the minimum size of each AF evaluation region. When the dimension of W is equal to or smaller than the minimum dimension of each AF evaluation area, one AF evaluation area having the minimum dimension is set.
Here, the dimension determining unit 7b constitutes a dimension determining unit that determines whether or not the dimension of the image area of the subject of interest is larger than the minimum dimension that can be set in the AF evaluation area (contrast evaluation area).

また、AF処理部7は、画像領域特定部7aにより設定された矩形枠(仮コントラスト評価領域)Wの寸法に応じて、当該矩形枠Wの分割数を決定する分割数決定部7cを具備している。
分割数決定部7cは、矩形枠Wの垂直幅y及び水平幅xの比率(縦横比Rate)に応じて矩形枠Wの分割数、即ち、領域設定部により複数設定されるAF評価領域P1、P2、P3の設定数を算出する。具体的には、分割数決定部7cは、先ず、矩形枠Wの縦横比Rateを垂直幅y及び水平幅xから下記式(1)に従って算出する。
Rate=(x/y)×100 …式(1)
Further, the AF processing unit 7 includes a division number determining unit 7c that determines the number of divisions of the rectangular frame W according to the size of the rectangular frame (temporary contrast evaluation region) W set by the image region specifying unit 7a. ing.
The division number determination unit 7c determines the number of divisions of the rectangular frame W according to the ratio of the vertical width y and the horizontal width x of the rectangular frame W (the aspect ratio Rate), that is, a plurality of AF evaluation areas P1 set by the area setting unit, The set number of P2 and P3 is calculated. Specifically, the division number determination unit 7c first calculates the aspect ratio Rate of the rectangular frame W from the vertical width y and the horizontal width x according to the following formula (1).
Rate = (x / y) × 100 (1)

次に、分割数決定部7cは、算出した縦横比Rateに応じて、AF評価領域の全体形状(例えば、「1×n型」、「2×n型」、「n×n型」、「n×1型」、「n×2型」;nは自然数)を決定し、その後、AF評価領域の全体形状に応じて、矩形枠Wの寸法と各AF評価領域の最小寸法により規定される所定の計算式から矩形枠Wの分割数Nx、Nyを算出する。
例えば、分割数決定部7cは、縦横比Rateが44よりも小さい場合には、AF評価領域の全体形状を「1×n型」に決定した後、矩形枠Wの垂直幅yをAF評価領域の垂直方向の最小寸法Yminで除算することで矩形枠Wの垂直方向の分割数Nyを算出する。なお、矩形枠Wの水平方向の分割数Nxは、AF評価領域の全体形状が「1×n型」であるため、「1」となる。
また、例えば、分割数決定部7cは、縦横比Rateが44以上で66よりも小さい場合には、AF評価領域の全体形状を「2×n型」に決定した後、矩形枠Wの垂直幅yをAF評価領域の垂直方向の最小寸法Yminで除算することで矩形枠Wの垂直方向の分割数Nyを算出する。なお、矩形枠Wの水平方向の分割数Nxは、AF評価領域の全体形状が「2×n型」であるため、「2」となる。
また、例えば、分割数決定部7cは、縦横比Rateが66以上で266よりも小さい場合には、AF評価領域の全体形状を「n×n型」に決定した後、矩形枠Wの垂直幅yをAF評価領域の垂直方向の最小寸法Yminで除算することで矩形枠Wの垂直方向の分割数Nyを算出する。なお、矩形枠Wの水平方向の分割数Nxは、AF評価領域の全体形状が「n×n型」であるため、垂直方向の分割数Nyと等しい値となる。
また、例えば、分割数決定部7cは、縦横比Rateが266以上で400よりも小さい場合には、AF評価領域の全体形状を「n×2型」に決定した後、矩形枠Wの水平幅xをAF評価領域の水平方向の最小寸法Xminで除算することで矩形枠Wの水平方向の分割数Nxを算出する。なお、矩形枠Wの垂直方向の分割数Nyは、AF評価領域の全体形状が「n×2型」であるため、「2」となる。
また、例えば、分割数決定部7cは、縦横比Rateが400以上の場合には、AF評価領域の全体形状を「n×1型」に決定した後、矩形枠Wの水平幅xをAF評価領域の水平方向の最小寸法Xminで除算することで矩形枠Wの水平方向の分割数Nxを算出する。なお、矩形枠Wの垂直方向の分割数Nyは、AF評価領域の全体形状が「n×1型」であるため、「1」となる。
ここで、分割数決定部7cは、注目被写体の画像領域の垂直方向及び水平方向の長さの比率に応じて、複数隣接して設定されるAF評価領域の垂直方向及び水平方向の設定数を決定する決定手段を構成している。
なお、上記した縦横比Rate、AF評価領域(AF枠)の全体形状や分割数Nx、Nyは一例であって、これらに限られるものではなく、適宜任意に変更することができる。
Next, the division number determination unit 7c determines the overall shape of the AF evaluation area (for example, “1 × n type”, “2 × n type”, “n × n type”, “n”) according to the calculated aspect ratio Rate. n × 1 type ”,“ n × 2 type ”; n is a natural number), and is then defined by the size of the rectangular frame W and the minimum size of each AF evaluation region according to the overall shape of the AF evaluation region. The division numbers Nx and Ny of the rectangular frame W are calculated from a predetermined calculation formula.
For example, when the aspect ratio Rate is smaller than 44, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “1 × n type” and then sets the vertical width y of the rectangular frame W to the AF evaluation area. The vertical division number Ny of the rectangular frame W is calculated by dividing by the minimum vertical dimension Ymin. The horizontal division number Nx of the rectangular frame W is “1” because the overall shape of the AF evaluation area is “1 × n type”.
For example, when the aspect ratio Rate is 44 or more and smaller than 66, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “2 × n type”, and then the vertical width of the rectangular frame W The vertical division number Ny of the rectangular frame W is calculated by dividing y by the minimum vertical dimension Ymin of the AF evaluation area. The horizontal division number Nx of the rectangular frame W is “2” because the overall shape of the AF evaluation area is “2 × n type”.
For example, when the aspect ratio Rate is 66 or more and smaller than 266, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “n × n type”, and then the vertical width of the rectangular frame W The vertical division number Ny of the rectangular frame W is calculated by dividing y by the minimum vertical dimension Ymin of the AF evaluation area. Note that the horizontal division number Nx of the rectangular frame W is equal to the vertical division number Ny because the overall shape of the AF evaluation area is “n × n type”.
For example, when the aspect ratio Rate is 266 or more and smaller than 400, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “n × 2 type”, and then the horizontal width of the rectangular frame W The horizontal division number Nx of the rectangular frame W is calculated by dividing x by the minimum horizontal dimension Xmin of the AF evaluation area. Note that the number of divisions Ny in the vertical direction of the rectangular frame W is “2” because the overall shape of the AF evaluation area is “n × 2 type”.
Further, for example, when the aspect ratio Rate is 400 or more, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “n × 1 type”, and then performs the AF evaluation on the horizontal width x of the rectangular frame W. The horizontal division number Nx of the rectangular frame W is calculated by dividing the area by the minimum horizontal dimension Xmin. The vertical division number Ny of the rectangular frame W is “1” because the overall shape of the AF evaluation area is “n × 1 type”.
Here, the division number determination unit 7c determines the number of AF evaluation areas set in the vertical direction and the horizontal direction that are set adjacent to each other in accordance with the ratio of the vertical length and the horizontal length of the image area of the subject of interest. A determining means for determining is configured.
The aspect ratio Rate, the overall shape of the AF evaluation area (AF frame), and the division numbers Nx and Ny are merely examples, and are not limited to these, and can be arbitrarily changed as appropriate.

また、AF処理部7は、矩形状の各AF評価領域(例えば、AF評価領域P1、P2、P3)の寸法を算出する寸法算出部7dを具備している。
寸法算出部7dは、矩形枠Wの垂直幅yを分割数決定部7cにより決定された矩形枠Wの垂直方向の分割数Nyで除算してAF評価領域の垂直幅Yを算出した後、予め規定されているAF評価領域の形状(例えば、横:縦が4:3の比率等)に従ってAF評価領域の水平幅Xを演算する。
ここで、寸法算出部7dは、注目被写体の画像領域の形状及び寸法(矩形枠Wの形状及び寸法)、並びに、分割数決定部7cにより決定されたAF評価領域の垂直方向及び水平方向の設定数(矩形枠Wの分割数)に応じて、AF評価領域の寸法を算出する算出手段を構成している。
In addition, the AF processing unit 7 includes a dimension calculation unit 7d that calculates the dimensions of the rectangular AF evaluation areas (for example, AF evaluation areas P1, P2, and P3).
The dimension calculation unit 7d calculates the vertical width Y of the AF evaluation area by dividing the vertical width y of the rectangular frame W by the vertical division number Ny of the rectangular frame W determined by the division number determination unit 7c. The horizontal width X of the AF evaluation area is calculated in accordance with the defined shape of the AF evaluation area (for example, the ratio of horizontal: vertical 4: 3).
Here, the size calculation unit 7d sets the shape and size of the image region of the subject of interest (the shape and size of the rectangular frame W), and the vertical and horizontal settings of the AF evaluation region determined by the division number determination unit 7c. According to the number (the number of divisions of the rectangular frame W), a calculation unit is configured to calculate the size of the AF evaluation area.

また、AF処理部7は、寸法算出部7dにより算出された寸法のAF評価領域(例えば、AF評価領域P1、P2、P3)を注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の形状に合わせて複数設定する領域設定部7eを具備している。
領域設定部7eは、寸法算出部7dによりAF評価領域の寸法が設定される毎に、注目被写体の画像領域の形状に合わせて複数のAF評価領域を逐次設定する。具体的には、領域設定部7eは、寸法判定部7bにより矩形枠Wの寸法が所定のAF評価領域として設定可能な最小寸法よりも大きいと判定された場合に、矩形枠Wの水平幅xの中点とAF評価領域(AF枠)の水平幅Xの中点とが略重なるように矩形状のAF評価領域を複数隣接させて配置する。即ち、領域設定部7eは、注目被写体の画像領域の水平方向に対して垂直方向を優先してAF評価領域を設定する。これにより、領域設定部7eは、複数のAF評価領域からなる全体として拡張された矩形枠が設定される。
なお、図5(c)、図6(c)、図7(c)にあっては、二値化した画像データに対してAF評価領域P1、P2、P3を設定した状態を表している。
ここで、領域設定部7eは、注目被写体の画像領域の形状に合わせて複数のAF評価領域を設定する領域設定手段を構成している。
なお、領域設定部7eは、寸法判定部7bにより矩形枠Wの寸法がAF評価領域P1の最小寸法以下であると判定された場合には、AF評価領域P1を一つだけ設定する(図5(a)〜図5(c)参照)。
Further, the AF processing unit 7 uses the AF evaluation area (for example, AF evaluation areas P1, P2, and P3) having the dimensions calculated by the dimension calculation unit 7d as the image area of the target subject (for example, the target objects S1, S2, and S3). For example, a plurality of area setting sections 7e are provided for setting in accordance with the shape of the image areas A1, A2, A3.
The area setting unit 7e sequentially sets a plurality of AF evaluation areas in accordance with the shape of the image area of the subject of interest every time the dimension of the AF evaluation area is set by the dimension calculation unit 7d. Specifically, the area setting unit 7e determines that the size of the rectangular frame W is larger than the minimum dimension that can be set as a predetermined AF evaluation area by the dimension determining unit 7b. A plurality of rectangular AF evaluation areas are arranged adjacent to each other so that the midpoint of the image and the midpoint of the horizontal width X of the AF evaluation area (AF frame) substantially overlap. That is, the area setting unit 7e sets the AF evaluation area by giving priority to the vertical direction with respect to the horizontal direction of the image area of the subject of interest. As a result, the area setting unit 7e sets a rectangular frame expanded as a whole, which includes a plurality of AF evaluation areas.
5C, FIG. 6C, and FIG. 7C show a state where AF evaluation areas P1, P2, and P3 are set for binarized image data.
Here, the area setting unit 7e constitutes area setting means for setting a plurality of AF evaluation areas in accordance with the shape of the image area of the subject of interest.
The region setting unit 7e sets only one AF evaluation region P1 when the size determination unit 7b determines that the size of the rectangular frame W is equal to or less than the minimum size of the AF evaluation region P1 (FIG. 5). (See (a) to FIG. 5 (c)).

また、AF処理部7は、領域設定部7eにより設定されたAF評価領域(例えば、AF評価領域P1、P2、P3)内に注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)を所定の割合以上含むか否かを判定する領域判定部7fを具備している。
領域判定部7fは、領域判定手段として、注目被写体の画像領域の仮形状としての矩形枠Wに合わせて領域設定部7eにより設定された複数のAF評価領域について、各AF評価領域内から注目被写体の画像領域(注目被写体領域)を検出した後、当該注目被写体領域を所定の割合(例えば、5割)以上含むか否かを判定する。
The AF processing unit 7 also includes an image region (for example, the subject of interest S1, S2, S3) within the AF evaluation region (for example, AF evaluation regions P1, P2, P3) set by the region setting unit 7e. For example, an area determination unit 7f that determines whether or not the image areas A1, A2, and A3) are included in a predetermined ratio or more is provided.
The area determination unit 7f serves as an area determination unit for a plurality of AF evaluation areas set by the area setting unit 7e according to the rectangular frame W as the temporary shape of the image area of the target object, from within each AF evaluation area. After the image area (target subject area) is detected, it is determined whether or not the target subject area includes a predetermined ratio (for example, 50%) or more.

また、AF処理部7は、領域判定部7fの判定結果に応じて、注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)を所定の割合以上含まないAF評価領域を除外する評価対象除外部7gを具備している。
評価対象除外部7gは、除外手段として、複数のAF評価領域のうち、領域判定部7fにより当該注目被写体領域を所定の割合以上含まないと判定されたAF評価領域を無効AF枠として評価対象から除外する。これにより、領域判定部7fにより当該注目被写体領域を所定の割合以上含むと判定されたAF評価領域のみが有効AF枠として設定される。
In addition, the AF processing unit 7 determines an image area (for example, the image areas A1, A2, and A3) of the target subject (for example, the target objects S1, S2, and S3) according to the determination result of the area determination unit 7f at a predetermined ratio. An evaluation object exclusion unit 7g that excludes AF evaluation areas not included above is provided.
As an exclusion means, the evaluation target exclusion unit 7g uses, as an invalid AF frame, an AF evaluation region determined by the region determination unit 7f as not including a predetermined ratio or more of the target subject region among a plurality of AF evaluation regions as an invalid AF frame. exclude. Thereby, only the AF evaluation area determined by the area determination unit 7f to include the subject area of interest at a predetermined ratio or more is set as the effective AF frame.

また、AF処理部7は、合焦状態の判定に係るAF評価値を算出する評価値算出部7hを具備している。
評価値算出部7hは、ユニット回路4からAF処理部7に送られてきた各画像データについてAF評価値を算出する。具体的には、評価値算出部7hは、画像領域特定部7aにより生成された低解像度の画像データ(例えば、横×縦:40×30画素;図4参照)Lのうち、領域判定部7fにより有効AF枠として設定されたAF評価領域(例えば、AF評価領域P1、P2、P3)の画像データに基づいて、画像のコントラストの高低を示すAF評価値(コントラスト評価値)を算出する。
In addition, the AF processing unit 7 includes an evaluation value calculation unit 7h that calculates an AF evaluation value related to the determination of the in-focus state.
The evaluation value calculation unit 7 h calculates an AF evaluation value for each image data sent from the unit circuit 4 to the AF processing unit 7. Specifically, the evaluation value calculation unit 7h includes the region determination unit 7f in the low-resolution image data (for example, horizontal × vertical: 40 × 30 pixels; see FIG. 4) L generated by the image region specifying unit 7a. Based on the image data of the AF evaluation area (for example, AF evaluation areas P1, P2, and P3) set as the effective AF frame, an AF evaluation value (contrast evaluation value) indicating the level of contrast of the image is calculated.

画像処理部8は、画像生成部6により生成された画像データ(YUVデータ)を所定の符号化方式(例えば、JPEG方式等)により圧縮・符号化する符号化部(図示略)や、画像記録部10から読み出された符号化された画像データを当該符号化方式に対応する復号化方式で復号化する復号化部等(何れも図示略)を具備している。   The image processing unit 8 includes an encoding unit (not shown) that compresses and encodes image data (YUV data) generated by the image generation unit 6 using a predetermined encoding method (for example, JPEG method), and image recording. The image processing apparatus includes a decoding unit (not shown) that decodes the encoded image data read from the unit 10 using a decoding method corresponding to the encoding method.

表示部9は、バッファメモリ12に格納された1フレーム分のYUVデータをビデオ信号に変換した後、ライブビュー画像として表示画面に表示する。具体的には、表示部9は、被写体の撮像により生成された複数の画像フレームに基づいてライブビュー画像を表示したり、本撮像画像として撮像されたレックビュー画像を表示する。
また、画像再生時においては、表示部9は、画像記録部10から読み出されて画像処理部8にて復号化された画像データに基づく画像を表示する。
The display unit 9 converts the YUV data for one frame stored in the buffer memory 12 into a video signal, and then displays it as a live view image on the display screen. Specifically, the display unit 9 displays a live view image based on a plurality of image frames generated by imaging a subject, or displays a REC view image captured as a main captured image.
At the time of image reproduction, the display unit 9 displays an image based on the image data read from the image recording unit 10 and decoded by the image processing unit 8.

画像記録部10は、例えば、不揮発性メモリ(フラッシュメモリ)等により構成されている。また、画像記録部10は、画像処理部8の符号化部(図示略)により所定の符号化方式(例えば、JPEG方式やMPEG方式等)により圧縮・符号化された静止画像データや動画像データを記憶する。   The image recording unit 10 is configured by, for example, a nonvolatile memory (flash memory). The image recording unit 10 also includes still image data and moving image data that have been compressed and encoded by a coding unit (not shown) of the image processing unit 8 using a predetermined coding method (for example, JPEG method, MPEG method, etc.). Remember.

操作入力部11は、当該撮像装置100の所定操作を行うためのものである。具体的には、操作入力部11は、被写体の撮影指示に係るシャッタボタン、撮像モードや機能等の選択指示に係る選択決定ボタン、ズーム量の調整指示に係るズームボタン等を備え(何れも図示略)、これらのボタンの操作に応じて所定の操作信号を中央制御部14に出力する。   The operation input unit 11 is for performing a predetermined operation of the imaging apparatus 100. Specifically, the operation input unit 11 includes a shutter button related to an instruction to shoot a subject, a selection determination button related to an instruction to select an imaging mode or a function, a zoom button related to an instruction to adjust the zoom amount, and the like (all shown) Abbreviation), a predetermined operation signal is output to the central control unit 14 in accordance with the operation of these buttons.

バッファメモリ12は、画像データ等を一時保存するバッファであるとともに、中央制御部14のワーキングメモリ等としても使用される。   The buffer memory 12 is a buffer for temporarily storing image data and the like, and is also used as a working memory for the central control unit 14.

プログラムメモリ13には、当該撮像装置100の機能に係る各種プログラムやデータが格納されている。また、プログラムメモリ13には、静止画撮影時、連写時、ライブビュー画像撮影時等の各撮影時における適正な露出値(EV)に対応する絞り値(F)とシャッタースピードとの組み合わせを示すプログラム線図を構成するプログラムAEデータや、EV値表も格納されている。   The program memory 13 stores various programs and data related to the functions of the imaging apparatus 100. The program memory 13 also includes a combination of an aperture value (F) and a shutter speed corresponding to an appropriate exposure value (EV) at each shooting such as still image shooting, continuous shooting, and live view image shooting. Program AE data constituting the program diagram shown and an EV value table are also stored.

中央制御部14は、撮像装置100の各部を制御するワンチップマイコンである。
また、中央制御部14は、操作入力部11から出力され入力された操作信号に基づいて、撮像装置100の各部を制御する。具体的には、中央制御部14は、操作入力部11のシャッタボタンの所定操作に従って出力された撮像信号が入力されると、プログラムメモリ13に記憶されている所定のプログラムに従って、TGにより電子撮像部3及びユニット回路4の駆動タイミングを制御して静止画像を撮影する処理を実行する。この静止画像の撮影によりバッファメモリ12に格納された1フレーム分のYUVデータは、画像処理部8にてJPEG方式等により圧縮され符号化されて、画像記録部10に静止画像データとして記録される。
The central control unit 14 is a one-chip microcomputer that controls each unit of the imaging apparatus 100.
The central control unit 14 controls each unit of the imaging apparatus 100 based on the operation signal output from the operation input unit 11 and input. Specifically, when an imaging signal output in accordance with a predetermined operation of the shutter button of the operation input unit 11 is input, the central control unit 14 performs electronic imaging with a TG according to a predetermined program stored in the program memory 13. A process of taking a still image is executed by controlling the drive timing of the unit 3 and the unit circuit 4. One frame of YUV data stored in the buffer memory 12 by shooting this still image is compressed and encoded by the image processing unit 8 by the JPEG method or the like, and recorded as still image data in the image recording unit 10. .

また、中央制御部14は、AF処理部7の評価値算出部7hにより有効AF枠であるAF評価領域(例えば、AF評価領域P1、P2、P3)の画像データに基づいて算出されたAF評価値に基づいて、所定の制御信号をレンズ駆動部2に出力してフォーカスモータを駆動させることで、レンズ部1の合焦位置を調整する。このとき、中央制御部14は、AF処理部7の領域設定部7eにより設定された複数のAF評価領域のうち、評価値算出部7hにより算出された各評価領域内の画像データのコントラスト勾配の検出精度が所定値以上で、且つ、当該撮像装置100から最も近い距離にコントラストのピークを有するAF評価領域3の出力結果を採用して、撮像手段を合焦させても良い。即ち、複数の注目被写体に対して複数のAF評価領域が設定された場合であっても、至近優先で一の注目被写体にピントを合わせるようにしても良い。
ここで、中央制御部14及びレンズ駆動部2は、領域設定部7eにより設定されたAF評価領域内の画像データに基づいて、撮像手段を合焦させる合焦制御手段を構成している。
Further, the central control unit 14 calculates the AF evaluation calculated by the evaluation value calculation unit 7h of the AF processing unit 7 based on the image data of the AF evaluation area (for example, AF evaluation areas P1, P2, and P3) that are effective AF frames. Based on the value, the focus position of the lens unit 1 is adjusted by outputting a predetermined control signal to the lens driving unit 2 to drive the focus motor. At this time, the central control unit 14 among the plurality of AF evaluation regions set by the region setting unit 7e of the AF processing unit 7 calculates the contrast gradient of the image data in each evaluation region calculated by the evaluation value calculation unit 7h. The output of the AF evaluation area 3 having a detection accuracy of a predetermined value or higher and a contrast peak at the closest distance from the imaging apparatus 100 may be used to focus the imaging means. In other words, even when a plurality of AF evaluation areas are set for a plurality of attention subjects, the focus may be focused on one attention subject with close priority.
Here, the central control unit 14 and the lens driving unit 2 constitute a focusing control unit that focuses the imaging unit based on the image data in the AF evaluation region set by the region setting unit 7e.

次に、撮像装置100による合焦方法法に係る自動合焦処理について、図2〜図7を参照して説明する。
図2及び図3は、自動合焦処理に係る動作の一例を示すフローチャートである。また、図4は、自動合焦処理にて抽出される注目被写体の一例を模式的に示す図である。
自動合焦処理は、ライブビュー画像の表示中に、ユーザによって操作入力部11のシャッタボタンが所定操作(例えば、半押し操作等)された場合に、中央制御部14の制御下にて繰り返し実行される処理である。なお、シャッタボタンの操作の有無に関わらずライブビュー画像の表示中に必ず実行するようにしても良い。
Next, the automatic focusing process according to the focusing method method performed by the imaging apparatus 100 will be described with reference to FIGS.
2 and 3 are flowcharts showing an example of the operation related to the automatic focusing process. FIG. 4 is a diagram schematically illustrating an example of a subject of interest extracted by the automatic focusing process.
The automatic focusing process is repeatedly executed under the control of the central control unit 14 when the user performs a predetermined operation (for example, half-pressing operation) on the shutter button of the operation input unit 11 while the live view image is displayed. Process. Note that it may be executed during the display of the live view image regardless of whether or not the shutter button is operated.

図2に示すように、被写体の撮像により生成された撮像画像(例えば、撮像画像G1、G2、G3)の複数の画像フレーム(図5(a)、図6(a)、図7(a)等参照)に係る画像データがユニット回路4からAF処理部7に送られてくる毎に、AF処理部7は、当該画像データから注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)を抽出する処理を行う(ステップS1)。
具体的には、AF処理部7の画像領域特定部7aは、ユニット回路4から送られてきた各画像データに対して所定倍率の縮小処理を行って低解像度の画像データ(例えば、横×縦:40×30画素;図4参照)Lを生成した後、低解像度の画像データLに対して所定の画像認識技術を利用して合焦対象となる注目被写体S1、S2、S3(図5(b)、図6(b)、図7(b)等参照)を特定して抽出する。
As shown in FIG. 2, a plurality of image frames (FIG. 5A, FIG. 6A, and FIG. 7A) of a captured image (for example, captured images G 1, G 2, and G 3) generated by capturing a subject. Each time image data related to the image processing unit 7 is sent from the unit circuit 4 to the AF processing unit 7, the AF processing unit 7 reads the image area of the subject of interest (for example, the subject of interest S1, S2, S3) from the image data. A process of extracting (for example, the image areas A1, A2, A3) is performed (step S1).
Specifically, the image area specifying unit 7a of the AF processing unit 7 performs a reduction process at a predetermined magnification on each image data sent from the unit circuit 4 to obtain low resolution image data (for example, horizontal × vertical). : 40 × 30 pixels; see FIG. 4) After generating L, the subject of interest S1, S2, S3 (FIG. 5 (FIG. 5)) to be focused using low-resolution image data L using a predetermined image recognition technique. b), FIG. 6B, FIG. 7B, etc.) are specified and extracted.

次に、画像領域特定部7aは、抽出された注目被写体の画像領域を囲む最小の矩形枠Wを当該注目被写体の画像領域の仮形状として設定する(ステップS2)。
具体的には、画像領域特定部7aは、注目被写体S1、S2、S3の画像領域A1、A2、A3のx軸方向(水平方向)の水平幅x及びy軸方向(垂直方向)の垂直幅yを算出して(図4参照)、当該水平幅x及び垂直幅yの矩形枠Wを設定する。
Next, the image area specifying unit 7a sets the minimum rectangular frame W surrounding the extracted image area of the subject of interest as a temporary shape of the image area of the subject of interest (step S2).
Specifically, the image area specifying unit 7a uses the horizontal width x in the x-axis direction (horizontal direction) and the vertical width in the y-axis direction (vertical direction) of the image areas A1, A2, and A3 of the subject of interest S1, S2, and S3. y is calculated (see FIG. 4), and a rectangular frame W having the horizontal width x and the vertical width y is set.

続けて、AF処理部7の寸法判定部7bは、画像領域特定部7aにより設定された矩形枠Wの寸法が、予め設定されているAF評価領域(例えば、AF評価領域P1、P2、P3)として設定可能な最小寸法よりも大きいか否かを判定する(ステップS3)。
ここで、矩形枠Wの寸法がAF評価領域の最小寸法よりも大きくないと判定されると(ステップS3;NO)、AF処理部7の領域設定部7eは、矩形枠Wの中心座標に最小寸法のAF評価領域(AF枠)の中心座標が重なるように当該最小寸法のAF評価領域P1(図5(c)参照)を一つ設定する(ステップS4)。
その後、中央制御部14は、領域設定部7eにより設定された最小寸法のAF評価領域P1の縁部分に対応するAF枠表示F1(図5(d)参照)をライブビュー画像の注目被写体S1、S2、S3と重なるように表示部9に表示させるとともに(ステップS5)、AF処理部7の評価値算出部7hによりAF評価領域P1、P2、P3の画像データに基づいて算出されたAF評価値に基づいて、所定の制御信号をレンズ駆動部2に出力してフォーカスモータを駆動させることで、レンズ部1の合焦位置を調整する。
Subsequently, the size determination unit 7b of the AF processing unit 7 sets the size of the rectangular frame W set by the image region specifying unit 7a to an AF evaluation region (for example, AF evaluation regions P1, P2, P3) set in advance. It is determined whether it is larger than the minimum dimension that can be set as (step S3).
Here, if it is determined that the size of the rectangular frame W is not larger than the minimum size of the AF evaluation region (step S3; NO), the region setting unit 7e of the AF processing unit 7 sets the minimum to the center coordinate of the rectangular frame W. One AF evaluation area P1 (see FIG. 5C) of the minimum dimension is set so that the center coordinates of the AF evaluation area (AF frame) of the dimensions overlap (step S4).
Thereafter, the central control unit 14 displays the AF frame display F1 (see FIG. 5D) corresponding to the edge portion of the AF evaluation area P1 having the minimum dimension set by the area setting unit 7e, as the subject S1 of interest in the live view image. The display 9 is displayed so as to overlap S2 and S3 (step S5), and the AF evaluation value calculated by the evaluation value calculation unit 7h of the AF processing unit 7 based on the image data of the AF evaluation areas P1, P2, and P3. The focus position of the lens unit 1 is adjusted by outputting a predetermined control signal to the lens driving unit 2 and driving the focus motor.

一方、ステップS3にて、矩形枠Wの寸法がAF評価領域の最小寸法よりも大きいと判定されると(ステップS3;YES)、AF処理部7の分割数決定部7cは、矩形枠Wの垂直幅y及び水平幅xの比率(縦横比Rate)を垂直幅y及び水平幅xから下記式(1)に従って算出する(ステップS6)。
Rate=(x/y)×100 …式(1)
On the other hand, when it is determined in step S3 that the size of the rectangular frame W is larger than the minimum size of the AF evaluation area (step S3; YES), the division number determination unit 7c of the AF processing unit 7 The ratio of the vertical width y and the horizontal width x (the aspect ratio Rate) is calculated from the vertical width y and the horizontal width x according to the following formula (1) (step S6).
Rate = (x / y) × 100 (1)

その後、AF処理部7は、矩形枠Wの縦横比Rateに応じて処理を分岐させる(ステップS7)。
具体的には、縦横比Rateが44よりも小さい場合には、分割数決定部7cは、AF評価領域の全体形状を「1×n型」に決定し(ステップS711)、続けて、矩形枠Wの垂直幅yをAF評価領域の垂直方向の最小寸法Yminで除算することで矩形枠Wの垂直方向の分割数Nyを算出するとともに、矩形枠Wの水平方向の分割数Nxを「1」に設定する(ステップS712)。
また、縦横比Rateが44以上で66よりも小さい場合には、分割数決定部7cは、AF評価領域の全体形状を「2×n型」に決定し(ステップS721)、続けて、矩形枠Wの垂直幅yをAF評価領域の垂直方向の最小寸法Yminで除算することで矩形枠Wの垂直方向の分割数Nyを算出するとともに、矩形枠Wの水平方向の分割数Nxを「2」に設定する(ステップS722)。
また、縦横比Rateが66以上で266よりも小さい場合には、分割数決定部7cは、AF評価領域の全体形状を「n×n型」に決定し(ステップS731)、続けて、矩形枠Wの垂直幅yをAF評価領域の垂直方向の最小寸法Yminで除算することで矩形枠Wの垂直方向の分割数Nyを算出するとともに、矩形枠Wの水平方向の分割数Nxを垂直方向の分割数Nyと等しい値に設定する(ステップS732)。
また、縦横比Rateが266以上で400よりも小さい場合には、分割数決定部7cは、AF評価領域の全体形状を「n×2型」に決定し(ステップS741)、続けて、矩形枠Wの水平幅xをAF評価領域の水平方向の最小寸法Xminで除算することで矩形枠Wの水平方向の分割数Nxを算出するとともに、矩形枠Wの垂直方向の分割数Nyを「2」に設定する(ステップS742)。
また、縦横比Rateが400以上の場合には、分割数決定部7cは、AF評価領域の全体形状を「n×1型」に決定し(ステップS751)、続けて、矩形枠Wの水平幅xをAF評価領域の水平方向の最小寸法Xminで除算することで矩形枠Wの水平方向の分割数Nxを算出するとともに、矩形枠Wの垂直方向の分割数Nyを「1」に設定する(ステップS752)。
Thereafter, the AF processing unit 7 branches the process according to the aspect ratio Rate of the rectangular frame W (step S7).
Specifically, when the aspect ratio Rate is smaller than 44, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “1 × n type” (step S711), and then continues to the rectangular frame. The vertical division number Ny of the rectangular frame W is calculated by dividing the vertical width y of W by the minimum vertical dimension Ymin of the AF evaluation area, and the horizontal division number Nx of the rectangular frame W is set to “1”. (Step S712).
If the aspect ratio Rate is 44 or more and smaller than 66, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “2 × n type” (step S721), and then continues to the rectangular frame. The vertical division number Ny of the rectangular frame W is calculated by dividing the vertical width y of W by the minimum vertical dimension Ymin of the AF evaluation area, and the horizontal division number Nx of the rectangular frame W is set to “2”. (Step S722).
If the aspect ratio Rate is 66 or more and smaller than 266, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “n × n type” (step S731), and then continues to the rectangular frame. The vertical division number Ny of the rectangular frame W is calculated by dividing the vertical width y of W by the minimum vertical dimension Ymin of the AF evaluation area, and the horizontal division number Nx of the rectangular frame W is calculated in the vertical direction. A value equal to the division number Ny is set (step S732).
If the aspect ratio Rate is 266 or more and smaller than 400, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “n × 2 type” (step S741), and then continues to the rectangular frame. The horizontal division number Nx of the rectangular frame W is calculated by dividing the horizontal width x of W by the minimum horizontal dimension Xmin of the AF evaluation area, and the vertical division number Ny of the rectangular frame W is set to “2”. (Step S742).
When the aspect ratio Rate is 400 or more, the division number determination unit 7c determines the overall shape of the AF evaluation area to be “n × 1 type” (step S751), and then continues to the horizontal width of the rectangular frame W. The horizontal division number Nx of the rectangular frame W is calculated by dividing x by the horizontal minimum dimension Xmin of the AF evaluation area, and the vertical division number Ny of the rectangular frame W is set to “1” ( Step S752).

次に、AF処理部7の寸法算出部7dは、矩形枠Wの垂直幅yを分割数決定部7cにより決定された矩形枠Wの垂直方向の分割数Nyで除算してAF評価領域(例えば、AF評価領域P2、P3)の垂直幅Yを算出した後、所定のAF評価領域の形状(例えば、横:縦が4:3の比率等)に従ってAF評価領域の水平幅Xを演算することで、AF評価領域の寸法を算出する(ステップS8)。
続けて、AF処理部7の領域設定部7eは、寸法算出部7dにより算出された寸法のAF評価領域(例えば、AF評価領域P2、P3)を、低解像度の撮像画像Lに対して注目被写体(例えば、注目被写体S2、S3)の画像領域(例えば、画像領域A2、A3)の形状に合わせて複数隣接させるように配置する(ステップS9;図6(c)、図7(c)等参照)。
Next, the size calculation unit 7d of the AF processing unit 7 divides the vertical width y of the rectangular frame W by the vertical division number Ny of the rectangular frame W determined by the division number determination unit 7c, and calculates an AF evaluation area (for example, After calculating the vertical width Y of the AF evaluation areas P2, P3), the horizontal width X of the AF evaluation area is calculated according to the shape of the predetermined AF evaluation area (for example, the ratio of horizontal: vertical 4: 3). Thus, the dimension of the AF evaluation area is calculated (step S8).
Subsequently, the area setting unit 7e of the AF processing unit 7 uses the AF evaluation area (for example, the AF evaluation areas P2 and P3) having the dimensions calculated by the dimension calculation unit 7d as the subject of interest with respect to the low-resolution captured image L. (For example, subject areas S2 and S3) are arranged so as to be adjacent to each other in accordance with the shape of the image area (for example, image areas A2 and A3) (step S9; see FIGS. 6C and 7C). ).

そして、領域設定部7eは、複数のAF評価領域(例えば、AF評価領域P2、P3)の各々について低解像度の撮像画像Lの端部からはみ出しているか否かを判定する(ステップS10)。
ここで、AF評価領域が撮像画像の端部からはみ出していると判定されると(ステップS10;YES)、領域設定部7eは、撮像画像の端部からはみ出したAF評価領域が存在しないように全てのAF評価領域の配置を調整する(ステップS11)。即ち、注目被写体(例えば、注目被写体S2、S3)が撮像画像の上下左右の各端部に近い部分にある場合には、AF評価領域が撮像画像の端部からはみ出す場合がある。この場合、各AF評価領域のAF評価値を平等に判断する上で何れのAF評価領域も撮像画像からはみ出さないように、領域設定部7eは、各AF評価領域の寸法及び形状を変更することなく全てのAF評価領域が撮像画像内に配置されるようにずらす。
Then, the area setting unit 7e determines whether or not each of a plurality of AF evaluation areas (for example, AF evaluation areas P2 and P3) protrudes from the end of the low-resolution captured image L (step S10).
Here, when it is determined that the AF evaluation area protrudes from the edge of the captured image (step S10; YES), the area setting unit 7e does not include an AF evaluation area that protrudes from the edge of the captured image. The arrangement of all AF evaluation areas is adjusted (step S11). That is, when the subject of interest (for example, the subject of interest S2 and S3) is in a portion close to the top, bottom, left, and right ends of the captured image, the AF evaluation area may protrude from the end of the captured image. In this case, the area setting unit 7e changes the size and shape of each AF evaluation area so that none of the AF evaluation areas protrude from the captured image when determining the AF evaluation values of the AF evaluation areas equally. Without shifting, all the AF evaluation areas are arranged in the captured image.

続けて、領域設定部7eは、全てのAF評価領域(例えば、AF評価領域P2、P3)の中心座標を算出した後(ステップS12)、AF評価領域の寸法が予め設定されているAF評価領域として設定可能な最大寸法(例えば、横×縦:40×30画素からなる低解像度の画像データLに対して、最大の水平幅Xmaxが8画素、最大の垂直幅Ymaxが6画素)よりも大きいか否かを判定する(ステップS13)。また、ステップS10にて、AF評価領域が撮像画像の端部からはみ出していないと判定された場合も(ステップS10;NO)、領域設定部7eは、処理をステップS12に移行させて、それ以降の処理を行う。   Subsequently, the area setting unit 7e calculates the center coordinates of all the AF evaluation areas (for example, AF evaluation areas P2 and P3) (step S12), and then the AF evaluation area in which the dimensions of the AF evaluation area are set in advance. Larger than the maximum dimension that can be set as (for example, for a low resolution image data L composed of horizontal x vertical: 40 x 30 pixels, the maximum horizontal width Xmax is 8 pixels and the maximum vertical width Ymax is 6 pixels) Whether or not (step S13). If it is determined in step S10 that the AF evaluation area does not protrude from the end of the captured image (step S10; NO), the area setting unit 7e shifts the process to step S12 and thereafter. Perform the process.

そして、ステップS13にて、AF評価領域(例えば、AF評価領域P2、P3)が最大寸法よりも大きいと判定されると(ステップS13;YES)、領域設定部7eは、既に配置されているAF評価領域の代わりに最大寸法のAF評価領域を中心座標をずらさないように配置する(ステップS14)。即ち、注目被写体(例えば、注目被写体S2、S3)の寸法が大きいために、分割された複数のAF評価領域を注目被写体に対して設定しても各AF評価領域の寸法が大きくなってしまい、AF評価領域内のコントラスト評価を適正に行うことができない虞がある。この場合、最大寸法のAF評価領域を設定し直すことで、AF評価領域が隣接した状態とはならないが、AF評価領域内のコントラスト評価を適正に行うことができる。   If it is determined in step S13 that the AF evaluation area (for example, AF evaluation areas P2 and P3) is larger than the maximum dimension (step S13; YES), the area setting unit 7e is already placed in the AF. Instead of the evaluation area, the AF evaluation area of the maximum size is arranged so as not to shift the center coordinates (step S14). That is, since the size of the subject of interest (for example, the subjects of interest S2 and S3) is large, even if a plurality of divided AF evaluation regions are set for the subject of interest, the size of each AF evaluation region becomes large. There is a possibility that the contrast evaluation in the AF evaluation area cannot be properly performed. In this case, by resetting the AF evaluation area having the maximum dimension, the AF evaluation areas are not adjacent to each other, but the contrast evaluation in the AF evaluation area can be appropriately performed.

次に、AF処理部7の領域判定部7fは、領域設定部7eにより設定された複数のAF評価領域(例えば、AF評価領域P2、P3)について、各AF評価領域内から注目被写体(例えば、注目被写体S2、S3)の画像領域(注目被写体領域)を検出した後(ステップS15)、当該注目被写体領域を所定の割合(例えば、5割)以上含むか否かを判定する(ステップS16)。また、ステップS13にて、AF評価領域が最大寸法よりも大きくないと判定された場合も(ステップS13;NO)、領域判定部7fは、処理をステップS15に移行させて、それ以降の処理を行う。   Next, the area determination unit 7f of the AF processing unit 7 selects a subject of interest (for example, for example, from within each AF evaluation area for a plurality of AF evaluation areas (for example, AF evaluation areas P2 and P3) set by the area setting unit 7e. After detecting the image region (target subject region) of the subject of interest S2, S3 (step S15), it is determined whether or not the subject subject region includes a predetermined ratio (for example, 50%) or more (step S16). Also, when it is determined in step S13 that the AF evaluation area is not larger than the maximum dimension (step S13; NO), the area determination unit 7f shifts the process to step S15 and performs the subsequent processes. Do.

そして、ステップS16にて、注目被写体領域を所定の割合以上含まないと判定されると(ステップS16;NO)、AF処理部7の評価対象除外部7gは、複数のAF評価領域(例えば、AF評価領域P2、P3)のうち、注目被写体領域を所定の割合以上含まないAF評価領域を無効AF枠に設定して評価対象から除外する(ステップS17)。一方、注目被写体領域を所定の割合以上含むと判定されると(ステップS16;NO)、AF処理部7の評価対象除外部7gは、複数のAF評価領域のうち、注目被写体領域を所定の割合以上含むAF評価領域を有効AF枠に設定する(ステップS18)。   If it is determined in step S16 that the target subject area does not include a predetermined ratio or more (step S16; NO), the evaluation target exclusion unit 7g of the AF processing unit 7 includes a plurality of AF evaluation areas (for example, AF Among the evaluation areas P2 and P3), an AF evaluation area that does not include the target subject area in a predetermined ratio or more is set as an invalid AF frame and excluded from the evaluation target (step S17). On the other hand, when it is determined that the target subject area is included at a predetermined ratio or more (step S16; NO), the evaluation target exclusion unit 7g of the AF processing unit 7 includes the target subject area at a predetermined ratio among the plurality of AF evaluation areas. The AF evaluation area including the above is set as an effective AF frame (step S18).

次に、中央制御部14は、有効AF枠に設定されたAF評価領域(例えば、AF評価領域P2、P3)の縁部分に対応するAF枠表示F2、F3(図6(c)、図7(c)等参照)をライブビュー画像の注目被写体(例えば、注目被写体S2、S3)の形状に合わせて表示部9に表示させるとともに(ステップS19)、AF処理部7の評価値算出部7hにより有効AF枠であるAF評価領域の画像データに基づいて算出されたAF評価値に基づいて、所定の制御信号をレンズ駆動部2に出力してフォーカスモータを駆動させることで、レンズ部1の合焦位置を調整する。   Next, the central control unit 14 displays AF frame displays F2 and F3 (FIG. 6C and FIG. 7) corresponding to the edge portions of the AF evaluation areas (for example, AF evaluation areas P2 and P3) set in the effective AF frame. (See (c) etc.) is displayed on the display unit 9 in accordance with the shape of the subject of interest (for example, the subject of interest S2, S3) of the live view image (step S19), and the evaluation value calculator 7h of the AF processor 7 Based on the AF evaluation value calculated based on the image data of the AF evaluation area, which is an effective AF frame, a predetermined control signal is output to the lens driving unit 2 to drive the focus motor, so that the focusing of the lens unit 1 is achieved. Adjust the focal position.

従って、上記の自動合焦処理によれば、例えば、図5(a)〜図5(d)に示すように、「花」などをマクロで撮影する場合には、「花びら」の中心部分を注目被写体S1として抽出して、当該注目被写体S1の画像領域A1を囲む矩形枠Wの寸法がAF評価領域の最小寸法よりも大きくなくても、最小寸法のAF評価領域P1(図5(c)参照)を一つ設定して、最小寸法のAF評価領域P1の縁部分に対応するAF枠表示F1(図5(d)参照)をライブビュー画像にて注目被写体S1と重なるように表示する。
これに対して、例えば、図6(a)〜図6(d)に示すように、ピンポン球などの「白いボール」を晴れた日の屋外で撮影する環境のように、被写体にコントラストがない場合であっても、「白いボール」を注目被写体S2として検出し、当該注目被写体S2の画像領域A2を囲む矩形枠Wの縦横比RateからAF評価領域P2の設定数を決定した後、各AF評価領域P2の寸法を算出することができる。そして、2×2型の4つのAF評価領域P2を注目被写体S2の画像領域A2の形状に合わせて隣接させるように設定して(図6(c)参照)、AF評価領域P2の縁部分に対応する4つのAF枠表示F2(図6(d)参照)をライブビュー画像にて注目被写体S2と重なるように表示する。
また、例えば、図7(a)〜図7(d)に示すように、被写体(例えば、積み重ねられた「複数のサイコロ」)が端にある構図であっても、当該「複数のサイコロ」を注目被写体S3として検出することができ、上記と同様に、1×4型の4つのAF評価領域P3を注目被写体S3の画像領域A3の形状に合わせて隣接させるように設定して(図7(c)参照)、AF評価領域P3の縁部分に対応する4つのAF枠表示F3(図7(d)参照)をライブビュー画像にて注目被写体S3と重なるように表示する。
Therefore, according to the above-described automatic focusing process, for example, as shown in FIGS. 5A to 5D, when a “flower” or the like is photographed in a macro, the central portion of the “petal” is displayed. Even if the size of the rectangular frame W that is extracted as the subject of interest S1 and surrounds the image region A1 of the subject of interest S1 is not larger than the minimum size of the AF evaluation region, the AF evaluation region P1 having the minimum size (FIG. 5C). One reference) is set, and the AF frame display F1 (see FIG. 5D) corresponding to the edge portion of the AF evaluation area P1 having the smallest dimension is displayed so as to overlap the target subject S1 in the live view image.
On the other hand, for example, as shown in FIGS. 6A to 6D, the subject has no contrast as in an environment where a “white ball” such as a ping-pong ball is photographed outdoors on a sunny day. Even in this case, after detecting “white ball” as the subject of interest S2 and determining the set number of AF evaluation regions P2 from the aspect ratio Rate of the rectangular frame W surrounding the image region A2 of the subject of interest S2, each AF The dimension of the evaluation region P2 can be calculated. Then, four 2 × 2 type AF evaluation areas P2 are set so as to be adjacent to each other according to the shape of the image area A2 of the subject of interest S2 (see FIG. 6C), and at the edge of the AF evaluation area P2. Four corresponding AF frame displays F2 (see FIG. 6D) are displayed so as to overlap the subject of interest S2 in the live view image.
Further, for example, as shown in FIGS. 7A to 7D, even if the composition has a subject (for example, “stacked multiple dice”) at the end, the “plural dice” is displayed. It can be detected as the subject of interest S3, and similarly to the above, four 1 × 4 type AF evaluation regions P3 are set to be adjacent to each other according to the shape of the image region A3 of the subject of interest S3 (FIG. 7 ( c), and four AF frame displays F3 (see FIG. 7D) corresponding to the edge portion of the AF evaluation area P3 are displayed so as to overlap with the target subject S3 in the live view image.

以上のように、本実施形態の撮像装置100によれば、撮像画像(例えば、撮像画像G1、G2、G3)内の合焦対象となる注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の形状を特定し、当該注目被写体の画像領域の形状に合わせて複数のAF評価領域(例えば、AF評価領域P2、P3)を設定して、これらのAF評価領域内の画像データに基づいて、レンズ部1を合焦させることができる。即ち、自動合焦処理にて、注目被写体の画像領域の形状を逐次特定し、逐次特定された注目被写体の画像領域の形状に合わせて複数のAF評価領域を逐次設定するので、部位によってコントラストが異なるような注目被写体をAFの対象とする場合であってもコントラストの低い部分にAF領域が設定されてしまうことを防止することができ、さらに、注目被写体全体を含むように大きなAF領域を設定する場合のように、AF評価領域内の画像データにおけるコントラスト勾配が緩くなることを防止することができる。
従って、注目被写体の画像領域の形状に合わせて設定された複数のAF評価領域によって自動合焦処理の精度を向上させることができる。
As described above, according to the imaging apparatus 100 of the present embodiment, the target subject (for example, the target subjects S1, S2, and S3) to be focused in the captured image (for example, the captured images G1, G2, and G3). The shape of the image area (for example, image areas A1, A2, A3) is specified, and a plurality of AF evaluation areas (for example, AF evaluation areas P2, P3) are set according to the shape of the image area of the subject of interest, Based on the image data in these AF evaluation areas, the lens unit 1 can be focused. That is, in the automatic focusing process, the shape of the image area of the target object is sequentially specified, and a plurality of AF evaluation areas are sequentially set in accordance with the shape of the image area of the target object that has been sequentially specified. Even when a different subject of interest is used as an AF target, an AF area can be prevented from being set in a low-contrast portion, and a large AF area can be set to include the entire subject of interest. It is possible to prevent the contrast gradient in the image data in the AF evaluation area from becoming gradual as in the case of doing.
Therefore, the accuracy of the automatic focusing process can be improved by a plurality of AF evaluation areas set in accordance with the shape of the image area of the subject of interest.

また、注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の寸法がAF評価領域(例えば、AF評価領域P1、P2、P3)の最小寸法よりも大きい場合には、矩形状のAF評価領域P2、P3を複数隣接させて設定する一方で、注目被写体の画像領域の寸法がAF評価領域の最小寸法以下である場合、最小寸法のAF評価領域P1を一つ設定するので、注目被写体の画像領域が如何なる寸法であってもAF評価領域の設定を適正に行うことができる。   In addition, the size of the image area (for example, image areas A1, A2, and A3) of the target subject (for example, target objects S1, S2, and S3) is the minimum dimension of the AF evaluation area (for example, AF evaluation areas P1, P2, and P3). Is larger than the rectangular AF evaluation areas P2 and P3, and when the size of the image area of the subject of interest is equal to or smaller than the minimum dimension of the AF evaluation area, the AF evaluation of the minimum dimension is performed. Since one area P1 is set, the AF evaluation area can be set appropriately regardless of the size of the image area of the subject of interest.

さらに、注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の垂直方向及び水平方向の比率に応じて、即ち、注目被写体の画像領域の形状及び寸法に基づいて当該注目被写体の画像領域の仮形状として設定された矩形枠Wの寸法に応じて、AF評価領域の垂直方向及び水平方向の設定数を決定するので、注目被写体の画像領域の形状及び寸法に応じてAF評価領域の設定数を変化させることができ、複数のAF評価領域の設定を適正に行うことができる。   Further, according to the ratio of the vertical direction and the horizontal direction of the image area (for example, the image areas A1, A2, and A3) of the target object (for example, the target objects S1, S2, and S3), that is, the shape of the image area of the target object. The number of AF evaluation areas set in the vertical and horizontal directions is determined according to the dimensions of the rectangular frame W set as the temporary shape of the image area of the subject of interest based on the dimensions of the subject area. The number of AF evaluation areas set can be changed according to the shape and dimensions, and a plurality of AF evaluation areas can be set appropriately.

また、注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の形状及び寸法並びにAF評価領域(例えば、AF評価領域P1、P2、P3)の垂直方向及び水平方向の設定数に基づいて、AF評価領域の寸法を算出するので、注目被写体の画像領域の形状や当該画像領域の寸法やAF評価領域の垂直方向及び水平方向の設定数に応じてAF評価領域の寸法を変化させることができ、複数のAF評価領域の設定を適正に行うことができる。
なお、AF評価領域の寸法の算出は、AF評価領域の垂直方向及び水平方向の設定数を基準として行われば良く、必ずしも注目被写体の画像領域の形状及び寸法を基準とする必要はない。
In addition, the shape and size of the image area (for example, the image areas A1, A2, and A3) of the target object (for example, the target objects S1, S2, and S3) and the AF evaluation area (for example, the AF evaluation areas P1, P2, and P3). Since the size of the AF evaluation area is calculated based on the set number in the vertical direction and the horizontal direction, it depends on the shape of the image area of the subject of interest, the size of the image area, and the set number in the vertical and horizontal directions of the AF evaluation area. Thus, the dimension of the AF evaluation area can be changed, and a plurality of AF evaluation areas can be set appropriately.
The size of the AF evaluation area may be calculated on the basis of the number of AF evaluation areas set in the vertical and horizontal directions, and does not necessarily have to be based on the shape and size of the image area of the subject of interest.

さらに、注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の仮形状としての矩形枠Wに合わせて設定された複数のAF評価領域(例えば、AF評価領域P1、P2、P3)について、当該注目被写体の画像領域を所定の割合以上含まない場合に、当該AF評価領域を評価対象から除外するので、注目被写体の画像領域を囲む矩形枠Wに対応する複数のAF評価領域の中から、注目被写体の画像領域に対応しないAF評価領域を無効AF枠に設定して評価対象から除外することができ、注目被写体の画像領域に対応するAF評価領域のみを有効AF枠として設定することができ、複数のAF評価領域の設定を適正に行うことができる。   Further, a plurality of AF evaluation areas (for example, set in accordance with a rectangular frame W as a temporary shape of an image area (for example, the image areas A1, A2, A3) of the target object (for example, the target objects S1, S2, S3) , AF evaluation areas P1, P2, and P3), when the image area of the subject of interest is not included in a predetermined ratio or more, the AF evaluation area is excluded from the evaluation target. Therefore, the rectangular frame W surrounding the image area of the subject of interest AF evaluation areas that do not correspond to the image area of the subject of interest can be set as invalid AF frames and excluded from the evaluation object, and AF evaluation corresponding to the image area of the subject of interest Only an area can be set as an effective AF frame, and a plurality of AF evaluation areas can be set appropriately.

なお、本発明は、上記実施形態に限定されることなく、本発明の趣旨を逸脱しない範囲において、種々の改良並びに設計の変更を行っても良い。
例えば、領域設定部7eによるAF評価領域の設定にあっては、注目被写体の画像領域の輪郭部分と交わるように配置しても良い。即ち、注目被写体自体にはコントラストが少ない場合であっても、少なくとも注目被写体とそれ以外の部分との境界にコントラスト差があることから評価値算出部7hによってより適正なAF評価値を算出することができ、自動合焦処理をより適正に行うことができる。
The present invention is not limited to the above-described embodiment, and various improvements and design changes may be made without departing from the spirit of the present invention.
For example, in setting the AF evaluation area by the area setting unit 7e, the AF evaluation area may be arranged so as to intersect with the contour portion of the image area of the subject of interest. That is, even if the subject of interest itself has a low contrast, since there is a contrast difference at least at the boundary between the subject of interest and the other parts, a more appropriate AF evaluation value can be calculated by the evaluation value calculator 7h. Thus, the automatic focusing process can be performed more appropriately.

また、注目被写体の画像領域の特定にあっては、ユニット回路4から送られてきた画像データから低解像度の画像データLを生成して当該画像データLを用いて行うようにしたが、必ずしも低解像度の画像データLを生成する必要はなく、ユニット回路4から送られてきた画像データ自体を用いて行っても良い。
さらに、注目被写体の画像領域の形状及び寸法を特定するようにしたが、これに限られるものではなく、少なくとも注目被写体の画像領域の形状を特定すれば寸法を特定するか否かは適宜任意に変更することができる。
Further, in specifying the image area of the subject of interest, low-resolution image data L is generated from the image data sent from the unit circuit 4, and the image data L is used. It is not necessary to generate the resolution image data L, and the image data itself sent from the unit circuit 4 may be used.
Furthermore, the shape and size of the image area of the subject of interest are specified, but the present invention is not limited to this, and at least if the shape of the image area of the subject of interest is specified, whether or not the size is specified is arbitrarily determined as appropriate. Can be changed.

また、合焦制御手段として、中央制御部14及びレンズ駆動部2を例示したが、これに限られるものではなく、電子撮像部3を光軸方向に移動させる駆動機構(図示略)を設け、当該駆動機構を中央制御部14の制御下にて駆動させるようにしても良い。   Further, although the central control unit 14 and the lens driving unit 2 are illustrated as the focus control means, the present invention is not limited to this, and a driving mechanism (not shown) for moving the electronic imaging unit 3 in the optical axis direction is provided. The drive mechanism may be driven under the control of the central control unit 14.

さらに、撮像装置100の構成は、上記実施形態に例示したものは一例であり、これに限られるものではなく、少なくとも撮像手段、特定手段、領域設定手段、合焦制御手段を備える構成であれば適宜任意に変更することができる。   Further, the configuration of the imaging apparatus 100 is merely an example illustrated in the above-described embodiment, and is not limited thereto. The configuration of the imaging device 100 includes at least an imaging unit, a specifying unit, a region setting unit, and a focusing control unit. It can be arbitrarily changed as appropriate.

加えて、上記実施形態にあっては、特定手段、領域設定手段、合焦制御手段としての機能を、中央制御部14の制御下にて、AF処理部7が駆動することにより実現される構成としたが、これに限られるものではなく、中央制御部14によって所定のプログラム等が実行されることにより実現される構成としても良い。
即ち、プログラムを記憶するプログラムメモリ13に、特定処理ルーチン、領域設定処理ルーチン、合焦制御処理ルーチンを含むプログラムを記憶しておく。そして、特定処理ルーチンにより中央制御部14のCPUを、撮像手段により撮像された撮像画像(例えば、撮像画像G1、G2、G3)内の合焦対象となる注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の形状を特定する特定手段として機能させるようにしても良い。また、領域設定処理ルーチンにより中央制御部14のCPUを、特定処理ルーチンにより特定された注目被写体(例えば、注目被写体S1、S2、S3)の画像領域(例えば、画像領域A1、A2、A3)の形状に合わせて複数のコントラスト評価領域を設定する領域設定手段として機能させるようにしても良い。また、合焦制御処理ルーチンにより、領域設定処理ルーチンにより設定されたコントラスト評価領域内の画像データに基づいて、撮像手段を合焦させる合焦制御手段として機能させるようにしても良い。
In addition, in the above-described embodiment, the functions as the specifying unit, the region setting unit, and the focusing control unit are realized by driving the AF processing unit 7 under the control of the central control unit 14. However, the present invention is not limited to this, and a configuration realized by executing a predetermined program or the like by the central control unit 14 may be adopted.
That is, a program including a specific processing routine, an area setting processing routine, and a focusing control processing routine is stored in the program memory 13 that stores the program. Then, the CPU of the central control unit 14 causes the CPU of the central control unit 14 to execute a specific processing routine so as to focus an object to be focused in the captured images (for example, captured images G1, G2, and G3) (for example, the focused objects S1 and S2). , S3) may be made to function as specifying means for specifying the shape of the image area (for example, the image areas A1, A2, A3). In addition, the CPU of the central control unit 14 in the area setting process routine causes the CPU of the image area (for example, image areas A1, A2, and A3) of the target object (for example, the target objects S1, S2, and S3) specified by the specifying process routine. You may make it function as an area | region setting means which sets several contrast evaluation area | regions according to a shape. Further, the focusing control processing routine may cause the imaging unit to function as a focusing control unit based on the image data in the contrast evaluation region set by the region setting processing routine.

100 撮像装置
1 レンズ部
2 レンズ駆動部
3 電子撮像部
7 AF処理部
7a 画像領域特定部
7b 寸法判定部
7c 分割数決定部
7d 寸法算出部
7e 領域設定部
7f 領域判定部
7g 評価対象除外部
14 中央制御部
DESCRIPTION OF SYMBOLS 100 Imaging device 1 Lens part 2 Lens drive part 3 Electronic imaging part 7 AF process part 7a Image area specific | specification part 7b Size determination part 7c Division number determination part 7d Dimension calculation part 7e Area setting part 7f Area determination part 7g Evaluation object exclusion part 14 Central control unit

上記課題を解決するため、発明の撮像装置は、撮像手段と、この撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する特定手段と、複数のコントラスト評価領域を、前記特定手段により特定された前記注目被写体の画像領域の形状に合わせて並べて設定する領域設定手段と、この領域設定手段により設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる合焦制御手段と、前記注目被写体の画像領域の垂直方向及び水平方向の長さの比率に応じて、前記領域設定手段により並べて設定される複数のコントラスト評価領域の垂直方向及び水平方向の設定数を決定する決定手段と、を備えることを特徴としている。 To solve the above problem, an imaging apparatus of the present invention includes an imaging means, specifying means for specifying the shape of the image region of interest subject to be the focusing target in the captured image captured by the imaging means, a plurality of the contrast evaluation region, a region setting unit that sets side by side according to the shape of the image area of the target object specified by the specifying means, on the basis of the image data of the contrast evaluation region set by the region setting means, The focus control means for focusing the imaging means, and the vertical of a plurality of contrast evaluation areas set side by side by the area setting means according to the ratio of the vertical and horizontal lengths of the image area of the subject of interest Determining means for determining the set number of directions and horizontal directions .

また、好ましい態様として更に、前記領域設定手段は、同じ形状を有する複数のコントラスト評価領域を隣接させて設定し、前記決定手段は、前記注目被写体の画像領域の垂直方向及び水平方向の長さの比率に応じて、前記領域設定手段により複数隣接して設定される複数のコントラスト評価領域の垂直方向及び水平方向の設定数を決定することを特徴とする。Further, as a preferred aspect, the area setting means sets a plurality of contrast evaluation areas having the same shape adjacent to each other, and the determination means sets the length of the image area of the subject of interest in the vertical direction and the horizontal direction. According to the ratio, the number of sets in the vertical direction and the horizontal direction of a plurality of contrast evaluation regions set adjacently by the region setting means is determined.

また、好ましい態様として更に、前記特定手段は、更に、前記注目被写体の画像領域の寸法を特定し、前記決定手段は、前記注目被写体の画像領域の形状及び寸法に基づいて設定された仮コントラスト評価領域の寸法に応じて、前記コントラスト評価領域の垂直方向及び水平方向の設定数を決定することを特徴とする。Further, as a preferred aspect, the specifying means further specifies the size of the image area of the target object, and the determining means is a temporary contrast evaluation set based on the shape and size of the image area of the target object. The set number of the vertical direction and the horizontal direction of the contrast evaluation region is determined according to the size of the region.

また、好ましい態様として更に、前記決定手段により決定された前記コントラスト評価領域の垂直方向及び水平方向の設定数に応じて、前記コントラスト評価領域の寸法を算出する算出手段を更に備えることを特徴とする。Moreover, as a preferable aspect, the image processing apparatus further includes a calculation unit that calculates a dimension of the contrast evaluation region according to the number of vertical and horizontal settings of the contrast evaluation region determined by the determination unit. .

また、好ましい態様として更に、前記特定手段は、更に、前記注目被写体の画像領域の寸法を特定し、前記算出手段は、前記注目被写体の画像領域の形状及び寸法、並びに前記決定手段により決定された前記コントラスト評価領域の垂直方向及び水平方向の設定数に基づいて、前記コントラスト評価領域の寸法を算出することを特徴とする。Further, as a preferred aspect, the specifying means further specifies the size of the image area of the subject of interest, and the calculating means is determined by the shape and size of the image area of the subject of interest and the determining means. The size of the contrast evaluation area is calculated based on the set number of vertical and horizontal directions of the contrast evaluation area.

また、好ましい態様として更に、前記領域設定手段は、矩形状のコントラスト評価領域を複数隣接させて設定することを特徴とする。In a preferred aspect, the area setting means sets a plurality of rectangular contrast evaluation areas adjacent to each other.

また、好ましい態様として更に、前記領域設定手段は、前記注目被写体の画像領域の輪郭部分と交わるように前記コントラスト評価領域を設定することを特徴とする。Further, as a preferred aspect, the area setting means sets the contrast evaluation area so as to intersect with a contour portion of the image area of the subject of interest.

また、好ましい態様として更に、前記特定手段は、前記注目被写体の画像領域の形状を逐次特定し、前記領域設定手段は、前記特定手段により逐次特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を逐次設定することを特徴とする。Further, as a preferred aspect, the specifying means sequentially specifies the shape of the image area of the subject of interest, and the area setting means is adapted to match the shape of the image area of the subject of interest sequentially specified by the specifying means. A plurality of contrast evaluation areas are sequentially set.

また、好ましい態様として更に、前記合焦制御手段は、前記領域設定手段により設定された前記複数のコントラスト評価領域のうち、各評価領域内の画像データのコントラスト勾配の検出精度が所定値以上で、且つ、当該撮像装置から最も近い距離にコントラストのピークを有するコントラスト評価領域の出力結果を採用して、前記撮像手段を合焦させることを特徴とする。Further, as a preferable aspect, the focus control unit has a detection accuracy of a contrast gradient of image data in each evaluation region out of the plurality of contrast evaluation regions set by the region setting unit, a predetermined value or more, In addition, the imaging unit is focused by using an output result of a contrast evaluation region having a contrast peak at the closest distance from the imaging device.

また、他の態様の撮像装置は、撮像手段と、この撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する特定手段と、この特定手段により特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を設定する領域設定手段と、この領域設定手段により設定された複数のコントラスト評価領域のうち、各評価領域内の画像データのコントラスト勾配の検出精度が所定値以上で、且つ、当該撮像装置から最も近い距離にコントラストのピークを有するコントラスト評価領域の出力結果を採用して、前記撮像手段を合焦させる合焦制御手段と、を備えることを特徴とする。In addition, an imaging apparatus according to another aspect is specified by an imaging unit, a specifying unit that specifies a shape of an image area of a subject of interest to be focused in a captured image captured by the imaging unit, and the specifying unit. An area setting means for setting a plurality of contrast evaluation areas according to the shape of the image area of the subject of interest, and the contrast of image data in each evaluation area among the plurality of contrast evaluation areas set by the area setting means A focus control means for focusing the imaging means by adopting an output result of a contrast evaluation region having a gradient detection accuracy equal to or higher than a predetermined value and having a contrast peak at the closest distance from the imaging device; It is characterized by providing.

上記課題を解決するため、本発明の合焦方法は、撮像装置を用いた合焦方法であって、前記撮像装置のコンピュータに、撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する特定処理と、複数のコントラスト評価領域を、前記特定処理により特定された前記注目被写体の画像領域の形状に合わせて並べて設定する領域設定処理と、この領域設定処理により設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる合焦制御処理と、前記注目被写体の画像領域の垂直方向及び水平方向の長さの比率に応じて、前記領域設定処理により並べて設定される複数のコントラスト評価領域の垂直方向及び水平方向の設定数を決定する決定処理と、を実行させることを特徴とする。In order to solve the above problems, a focusing method of the present invention is a focusing method using an imaging device, and is focused on a computer in the imaging device as a focusing target in a captured image captured by an imaging unit. A specifying process for specifying the shape of the image area of the subject, an area setting process for setting a plurality of contrast evaluation areas in line with the shape of the image area of the subject of interest specified by the specifying process, and the area setting process Based on the image data in the contrast evaluation area set by the focusing control processing for focusing the imaging means, and the ratio of the vertical and horizontal lengths of the image area of the subject of interest, And a determination process for determining a set number in the vertical direction and a horizontal direction of a plurality of contrast evaluation areas set side by side by the area setting process.

上記課題を解決するため、本発明のプログラムは、撮像装置を制御するプログラムであって、前記撮像装置のコンピュータを、撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する特定手段と、複数のコントラスト評価領域を、前記特定手段により特定された前記注目被写体の画像領域の形状に合わせて並べて設定する領域設定手段と、この領域設定手段により設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる合焦制御手段と、前記注目被写体の画像領域の垂直方向及び水平方向の長さの比率に応じて、前記領域設定手段により並べて設定される複数のコントラスト評価領域の垂直方向及び水平方向の設定数を決定する決定手段と、して機能させることを特徴とする。In order to solve the above problems, a program according to the present invention is a program for controlling an imaging device, and the computer of the imaging device is used to cause an image region of a subject of interest to be focused in a captured image captured by an imaging unit. Specifying means for specifying the shape of the object, area setting means for setting a plurality of contrast evaluation areas in line with the shape of the image area of the subject of interest specified by the specifying means, and the area setting means Based on the image data in the contrast evaluation area, the focusing control means for focusing the imaging means, and the area setting means according to the ratio of the vertical and horizontal lengths of the image area of the subject of interest. It functions as a determining means for determining the number of vertical and horizontal setting numbers of a plurality of contrast evaluation areas set side by side. To.

Claims (14)

撮像手段と、
この撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する特定手段と、
この特定手段により特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を設定する領域設定手段と、
この領域設定手段により設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる合焦制御手段と、
を備えることを特徴とする撮像装置。
Imaging means;
Specifying means for specifying the shape of the image area of the subject of interest to be focused in the captured image captured by the imaging means;
Area setting means for setting a plurality of contrast evaluation areas in accordance with the shape of the image area of the target object specified by the specifying means;
A focusing control means for focusing the imaging means based on the image data in the contrast evaluation area set by the area setting means;
An imaging apparatus comprising:
前記領域設定手段は、矩形状の前記コントラスト評価領域を複数隣接させて設定することを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the area setting unit sets a plurality of rectangular contrast evaluation areas adjacent to each other. 前記注目被写体の画像領域の垂直方向及び水平方向の長さの比率に応じて、複数隣接して設定される前記コントラスト評価領域の垂直方向及び水平方向の設定数を決定する決定手段を更に備えることを特徴とする請求項2に記載の撮像装置。   The apparatus further comprises a determining unit that determines the number of the vertical and horizontal settings of the contrast evaluation region that are set adjacent to each other in accordance with the ratio of the vertical and horizontal lengths of the image area of the subject of interest. The imaging apparatus according to claim 2. 前記特定手段は、更に、前記注目被写体の画像領域の寸法を特定し、
前記決定手段は、
前記注目被写体の画像領域の形状及び寸法に基づいて設定された仮コントラスト評価領域の寸法に応じて、前記コントラスト評価領域の垂直方向及び水平方向の設定数を決定することを特徴とする請求項3に記載の撮像装置。
The specifying means further specifies the size of the image area of the subject of interest,
The determining means includes
4. The number of set in the vertical direction and the horizontal direction of the contrast evaluation area is determined according to the size of the temporary contrast evaluation area set based on the shape and size of the image area of the subject of interest. The imaging device described in 1.
前記決定手段により決定された前記コントラスト評価領域の垂直方向及び水平方向の設定数に応じて、前記コントラスト評価領域の寸法を算出する算出手段を更に備えることを特徴とする請求項3又は4に記載の撮像装置。   5. The calculation device according to claim 3, further comprising a calculation unit configured to calculate a dimension of the contrast evaluation region in accordance with the set number in the vertical direction and the horizontal direction of the contrast evaluation region determined by the determination unit. Imaging device. 前記特定手段は、更に、前記注目被写体の画像領域の寸法を特定し、
前記算出手段は、
前記注目被写体の画像領域の形状及び寸法、並びに前記決定手段により決定された前記コントラスト評価領域の垂直方向及び水平方向の設定数に基づいて、前記コントラスト評価領域の寸法を算出することを特徴とする請求項5に記載の撮像装置。
The specifying means further specifies the size of the image area of the subject of interest,
The calculating means includes
The size of the contrast evaluation area is calculated based on the shape and size of the image area of the subject of interest and the set number in the vertical and horizontal directions of the contrast evaluation area determined by the determining means. The imaging device according to claim 5.
前記特定手段は、更に、前記注目被写体の画像領域の寸法を特定し、
前記注目被写体の画像領域の寸法が前記コントラスト評価領域として設定可能な最小寸法よりも大きいか否かを判定する寸法判定手段を更に備え、
前記領域設定手段は、
前記寸法判定手段による判定の結果、前記注目被写体の画像領域の寸法が前記コントラスト評価領域の最小寸法よりも大きい場合、前記コントラスト評価領域を複数設定する一方で、前記注目被写体の画像領域の寸法が前記コントラスト評価領域の最小寸法以下である場合、前記コントラスト評価領域を一つ設定することを特徴とする請求項1〜6の何れか一項に記載の撮像装置。
The specifying means further specifies the size of the image area of the subject of interest,
Dimensional determination means for determining whether or not the size of the image area of the subject of interest is larger than a minimum dimension that can be set as the contrast evaluation area;
The area setting means includes
As a result of the determination by the dimension determining means, when the size of the image area of the target object is larger than the minimum dimension of the contrast evaluation area, a plurality of contrast evaluation areas are set, while the size of the image area of the target object is The imaging apparatus according to claim 1, wherein when the size is equal to or smaller than a minimum dimension of the contrast evaluation area, one contrast evaluation area is set.
前記注目被写体の画像領域を囲む最小の矩形を当該注目被写体の画像領域の仮形状として設定する被写体設定手段と、
この被写体設定手段により設定された前記注目被写体の画像領域の仮形状に合わせて前記領域設定手段により設定された複数のコントラスト評価領域について、当該注目被写体の画像領域を所定の割合以上含むか否かを判定する領域判定手段と、
前記複数のコントラスト評価領域のうち、前記領域判定手段により当該注目被写体の画像領域を所定の割合以上含まないと判定されたコントラスト評価領域を評価対象から除外する除外手段と、を更に備えることを特徴とする請求項1〜7の何れか一項に記載の撮像装置。
Subject setting means for setting a minimum rectangle surrounding the image area of the target object as a temporary shape of the image area of the target object;
Whether a plurality of contrast evaluation regions set by the region setting unit according to the temporary shape of the image region of the target subject set by the subject setting unit include the image region of the target subject at a predetermined ratio or more. Area determination means for determining
An exclusion means for excluding a contrast evaluation area that is determined not to include an image area of the subject of interest of a predetermined ratio or more by the area determination means from the evaluation target among the plurality of contrast evaluation areas; The imaging device according to any one of claims 1 to 7.
前記領域設定手段は、前記注目被写体の画像領域の輪郭部分と交わるように前記コントラスト評価領域を設定することを特徴とする請求項1〜8の何れか一項に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the area setting unit sets the contrast evaluation area so as to intersect with a contour portion of an image area of the subject of interest. 前記特定手段は、前記注目被写体の画像領域の形状を逐次特定し、
前記領域設定手段は、前記特定手段により逐次特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を逐次設定することを特徴とする請求項1〜9の何れか一項に記載の撮像装置。
The specifying means sequentially specifies the shape of the image area of the subject of interest,
The said area setting means sets a some contrast evaluation area | region sequentially according to the shape of the image area | region of the said to-be-photographed object sequentially specified by the said specifying means, The any one of Claims 1-9 characterized by the above-mentioned. The imaging device described.
前記合焦制御手段は、
前記領域設定手段により設定された前記複数のコントラスト評価領域のうち、各評価領域内の画像データのコントラスト勾配の検出精度が所定値以上で、且つ、当該撮像装置から最も近い距離にコントラストのピークを有するコントラスト評価領域の出力結果を採用して、前記撮像手段を合焦させることを特徴とする請求項1〜10の何れか一項に記載の撮像装置。
The focusing control means includes
Among the plurality of contrast evaluation regions set by the region setting means, the contrast accuracy of the image data in each evaluation region is equal to or higher than a predetermined value, and a contrast peak is displayed at the closest distance from the imaging device. The imaging apparatus according to claim 1, wherein the imaging unit is focused using an output result of a contrast evaluation area having the imaging apparatus.
前記領域設定手段は、前記注目被写体の画像領域の水平方向に対して垂直方向を優先して前記コントラスト評価領域を設定することを特徴とする請求項1〜11の何れか一項に記載の撮像装置。   The imaging according to any one of claims 1 to 11, wherein the area setting means sets the contrast evaluation area in preference to a vertical direction with respect to a horizontal direction of an image area of the subject of interest. apparatus. 撮像手段を備える撮像装置を用いた合焦方法であって、
前記撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する処理と、
特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を設定する処理と、
設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる処理と、
を行うことを特徴とする合焦方法。
A focusing method using an imaging device including an imaging means,
Processing for specifying the shape of the image area of the subject of interest to be focused in the captured image captured by the imaging means;
A process of setting a plurality of contrast evaluation areas in accordance with the shape of the identified image area of the subject of interest;
A process of focusing the imaging means based on the image data within the set contrast evaluation area;
Focusing method characterized by performing.
撮像手段を備える撮像装置のコンピュータを、
前記撮像手段により撮像された撮像画像内の合焦対象となる注目被写体の画像領域の形状を特定する特定手段、
この特定手段により特定された前記注目被写体の画像領域の形状に合わせて複数のコントラスト評価領域を設定する領域設定手段、
この領域設定手段により設定されたコントラスト評価領域内の画像データに基づいて、前記撮像手段を合焦させる合焦制御手段、
として機能させることを特徴とするプログラム。
A computer of an imaging apparatus comprising imaging means;
A specifying unit for specifying a shape of an image area of a subject of interest to be focused in a captured image captured by the imaging unit;
Area setting means for setting a plurality of contrast evaluation areas in accordance with the shape of the image area of the target object specified by the specifying means;
Focusing control means for focusing the imaging means based on image data in the contrast evaluation area set by the area setting means;
A program characterized by functioning as
JP2011160735A 2011-07-22 2011-07-22 Imaging apparatus, focusing method, and program Expired - Fee Related JP5397426B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011160735A JP5397426B2 (en) 2011-07-22 2011-07-22 Imaging apparatus, focusing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011160735A JP5397426B2 (en) 2011-07-22 2011-07-22 Imaging apparatus, focusing method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2009142241A Division JP5195660B2 (en) 2009-06-15 2009-06-15 Imaging apparatus, focusing method, and program

Publications (2)

Publication Number Publication Date
JP2011248376A true JP2011248376A (en) 2011-12-08
JP5397426B2 JP5397426B2 (en) 2014-01-22

Family

ID=45413619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011160735A Expired - Fee Related JP5397426B2 (en) 2011-07-22 2011-07-22 Imaging apparatus, focusing method, and program

Country Status (1)

Country Link
JP (1) JP5397426B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016186793A (en) * 2012-01-17 2016-10-27 リープ モーション, インコーポレーテッドLeap Motion, Inc. Enhanced contrast for object detection and characterization by optical imaging
US9934580B2 (en) 2012-01-17 2018-04-03 Leap Motion, Inc. Enhanced contrast for object detection and characterization by optical imaging based on differences between images
US11720180B2 (en) 2012-01-17 2023-08-08 Ultrahaptics IP Two Limited Systems and methods for machine control

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007240877A (en) * 2006-03-08 2007-09-20 Canon Inc Imaging apparatus and control method therefor
JP2008052123A (en) * 2006-08-25 2008-03-06 Eastman Kodak Co Imaging apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007240877A (en) * 2006-03-08 2007-09-20 Canon Inc Imaging apparatus and control method therefor
JP2008052123A (en) * 2006-08-25 2008-03-06 Eastman Kodak Co Imaging apparatus

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016186793A (en) * 2012-01-17 2016-10-27 リープ モーション, インコーポレーテッドLeap Motion, Inc. Enhanced contrast for object detection and characterization by optical imaging
US9934580B2 (en) 2012-01-17 2018-04-03 Leap Motion, Inc. Enhanced contrast for object detection and characterization by optical imaging based on differences between images
US10366308B2 (en) 2012-01-17 2019-07-30 Leap Motion, Inc. Enhanced contrast for object detection and characterization by optical imaging based on differences between images
US10699155B2 (en) 2012-01-17 2020-06-30 Ultrahaptics IP Two Limited Enhanced contrast for object detection and characterization by optical imaging based on differences between images
US11308711B2 (en) 2012-01-17 2022-04-19 Ultrahaptics IP Two Limited Enhanced contrast for object detection and characterization by optical imaging based on differences between images
US11720180B2 (en) 2012-01-17 2023-08-08 Ultrahaptics IP Two Limited Systems and methods for machine control
US11782516B2 (en) 2012-01-17 2023-10-10 Ultrahaptics IP Two Limited Differentiating a detected object from a background using a gaussian brightness falloff pattern

Also Published As

Publication number Publication date
JP5397426B2 (en) 2014-01-22

Similar Documents

Publication Publication Date Title
JP5195660B2 (en) Imaging apparatus, focusing method, and program
JP6082274B2 (en) Imaging apparatus and control method thereof
JP2007142965A (en) Imaging apparatus, screen display method, focus adjusting method, exposure adjusting method, and computer program
JP2011135152A (en) Image pickup apparatus and method of picking up image
JP2008187412A (en) Electronic camera
JP2012222495A (en) Image processor, image processing method, and program
JP5620196B2 (en) Imaging device
JP2006245999A (en) Imaging apparatus and program
JP7142507B2 (en) Image processing device, image processing method, and imaging device
JP5397426B2 (en) Imaging apparatus, focusing method, and program
JP4952574B2 (en) Image composition apparatus and program
JP6706167B2 (en) Imaging device, image synthesizing method, and program
JP4898151B2 (en) Imaging apparatus and imaging method
JP2012150826A (en) Image composition device and program
JP5195663B2 (en) Imaging apparatus, focusing method, and program
JP4985716B2 (en) Imaging apparatus, method for setting focus evaluation area, and program
JP5477345B2 (en) Imaging apparatus, focusing method, and program
JP5747474B2 (en) Imaging apparatus, imaging processing method, and program
JP4827811B2 (en) Electronic camera
JP5561392B2 (en) Imaging apparatus, focusing method, and program
CN106464783B (en) Image pickup control apparatus, image pickup apparatus, and image pickup control method
JP2014003417A (en) Image pickup device
JP5648563B2 (en) Image processing apparatus, image processing method, and program
JP5948960B2 (en) Camera, image processing apparatus and program
JP2009272703A (en) Imaging apparatus, and control method thereof

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110915

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110915

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130325

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130416

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130614

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130924

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131007

R150 Certificate of patent or registration of utility model

Ref document number: 5397426

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees