JP2012133049A - Imaging apparatus - Google Patents

Imaging apparatus Download PDF

Info

Publication number
JP2012133049A
JP2012133049A JP2010283829A JP2010283829A JP2012133049A JP 2012133049 A JP2012133049 A JP 2012133049A JP 2010283829 A JP2010283829 A JP 2010283829A JP 2010283829 A JP2010283829 A JP 2010283829A JP 2012133049 A JP2012133049 A JP 2012133049A
Authority
JP
Japan
Prior art keywords
evaluation frame
evaluation
image
unit
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010283829A
Other languages
Japanese (ja)
Inventor
Masataka Ohashi
正隆 大橋
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.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics 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 Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Priority to JP2010283829A priority Critical patent/JP2012133049A/en
Priority to KR1020110127520A priority patent/KR101799600B1/en
Priority to US13/324,392 priority patent/US8643730B2/en
Publication of JP2012133049A publication Critical patent/JP2012133049A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/02Mountings, adjusting means, or light-tight connections, for optical elements for lenses
    • G02B7/04Mountings, adjusting means, or light-tight connections, for optical elements for lenses with mechanism for focusing or varying magnification

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Studio Devices (AREA)
  • Automatic Focus Adjustment (AREA)
  • Focusing (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an imaging apparatus capable of accurately focusing on a subject without an auxiliary operation by a user in a situation in which a shielding object is present in front of the subject.SOLUTION: An imaging apparatus includes: an imaging part for obtaining an image by converting light passing through a focus lens into an image signal; an arrangement part for arranging an evaluation frame on the image obtained by the imaging part; a determination part for determining a focusing position of the focus lens based on an evaluation of pixel values in the evaluation frame arranged by the arrangement part; and a driving part for moving the focus lens to the focusing position determined by the determination part. When the evaluation frame is overlapped with a linear component appearing on the image, the arrangement part re-arranges the evaluation frame by scaling down, moving, or deforming the evaluation frame.

Description

本発明は、撮像装置に関する。   The present invention relates to an imaging apparatus.

従来、オートフォーカス機能を有する撮像装置を用いて被写体を撮像する際に、被写体と撮像装置との間に金網、柵、フェンス又は窓枠などの遮蔽物が存在すると、手前の遮蔽物に焦点が合ってしまう問題が存在した。   Conventionally, when a subject is imaged using an imaging device having an autofocus function, if there is a shield such as a wire mesh, a fence, a fence, or a window frame between the subject and the imaging device, the front shield is focused. There was a problem that would fit.

これを解決するために、下記特許文献1は、被写体上の1点と非被写体上の1点とをユーザに指定させることにより、オートフォーカスの精度を向上させることを提案している。また、下記特許文献2は、フォーカスレンズ位置のスキャン範囲を制限するモードを設けることにより、前後に位置する被写体と非被写体との分離を容易にすることを提案している。   In order to solve this problem, Japanese Patent Application Laid-Open No. 2004-228561 proposes to improve the autofocus accuracy by allowing the user to designate one point on the subject and one point on the non-subject. Japanese Patent Application Laid-Open No. 2004-228561 proposes that a mode for limiting the scan range of the focus lens position is provided to facilitate separation of a subject positioned in front and back and a non-subject.

特開2006−245792号公報JP 2006-245792 A 特開2006−349744号公報JP 2006-349744 A

しかしながら、上記特許文献1に記載された手法では、ユーザが被写体及び非被写体上の点を指定している間に、シャッターチャンスを逃してしまうリスクが大きい。また、遮蔽物が細い棒状又は線状の要素から構成される構造体であるような場合には、画像内で遮蔽物上の1点を指定することは容易でない。さらに、上記特許文献1には、多点フォーカスにおいて焦点距離に連続的なパターンが存在する場合には金網に合焦していると認識し得るとの記載があるが、かかる手法は撮像面と金網とが平行な位置関係にあるという限定的な状況においてしか有効でない。   However, with the method described in Patent Document 1, there is a high risk that the user misses a photo opportunity while the user designates a subject and a point on the non-subject. In addition, when the shielding object is a structure composed of thin rod-like or linear elements, it is not easy to designate one point on the shielding object in the image. Further, Patent Document 1 describes that when a continuous pattern exists at the focal length in multi-point focus, it can be recognized that the wire mesh is in focus. It is effective only in a limited situation where the wire mesh is in a parallel positional relationship.

また、上記特許文献2に記載された手法では、被写体と遮蔽物との間の距離が近い場合、フォーカスレンズ位置のスキャン範囲を制限したとしても制限されたスキャン範囲内で被写体及び遮蔽物の双方に合焦が可能となり、結果として被写体と遮蔽物とを分離できないことがあった。   Further, in the method described in Patent Document 2, when the distance between the subject and the shield is short, even if the scan range of the focus lens position is limited, both the subject and the shield are within the limited scan range. In some cases, the subject and the shield cannot be separated.

そこで、本発明は、被写体の手前に遮蔽物が存在する状況において、ユーザによる補助的な操作を要することなく高い精度で被写体にフォーカスを合わせることのできる撮像装置を提供しようとするものである。   Therefore, the present invention is intended to provide an imaging apparatus capable of focusing on a subject with high accuracy without requiring an auxiliary operation by a user in a situation where an obstacle exists in front of the subject.

本発明のある実施形態によれば、フォーカスレンズを通過する光を画像信号に変換することにより画像を取得する撮像部と、上記撮像部により取得される上記画像に評価枠を配置する配置部と、上記配置部により配置される上記評価枠内の画素値の評価に基づいて、上記フォーカスレンズの合焦位置を決定する決定部と、上記決定部により決定される上記合焦位置に上記フォーカスレンズを移動する駆動部と、を備え、上記配置部は、上記画像に現れる直線成分と上記評価枠とが重なる場合に、上記評価枠を縮小、移動又は変形することにより、上記評価枠を再配置する、撮像装置が提供される。   According to an embodiment of the present invention, an imaging unit that acquires an image by converting light passing through a focus lens into an image signal, and an arrangement unit that arranges an evaluation frame in the image acquired by the imaging unit; A determination unit that determines a focus position of the focus lens based on an evaluation of a pixel value within the evaluation frame disposed by the placement unit, and the focus lens at the focus position determined by the determination unit. And the arrangement unit rearranges the evaluation frame by reducing, moving, or deforming the evaluation frame when the linear component appearing in the image and the evaluation frame overlap. An imaging device is provided.

かかる構成によれば、オートフォーカスのための評価値の算出に用いられる評価枠が、縮小、移動又は変形され、画像に現れる直線成分と重ならないように自動的に再配置される。従って、ユーザによる補助的な操作を要することなく、直線成分により構成される遮蔽物を避けて、被写体にフォーカスを合わせることができる。   According to this configuration, the evaluation frame used for calculating the evaluation value for autofocus is reduced, moved, or deformed, and automatically rearranged so as not to overlap with the linear component appearing in the image. Accordingly, it is possible to focus on the subject while avoiding the shielding object constituted by the linear component without requiring an auxiliary operation by the user.

また、上記配置部は、上記評価枠の1点(例えば、矩形の頂点)を固定した上で、上記評価枠の各辺が上記画像に現れる直線成分と重ならないように上記評価枠を縮小してもよい。かかる構成によれば、評価枠を大きく動かすことなく、簡易に遮蔽物を避けて評価枠を再配置することができる。   In addition, the placement unit fixes one point (for example, a rectangular vertex) of the evaluation frame, and reduces the evaluation frame so that each side of the evaluation frame does not overlap a linear component appearing in the image. May be. According to such a configuration, the evaluation frame can be easily rearranged while avoiding the shielding object without largely moving the evaluation frame.

また、上記配置部は、上記直線成分が多角形を形成する場合に、上記評価枠の重心と上記直線成分により形成される1つの多角形の重心とが一致するように、上記評価枠を移動してもよい。かかる構成によれば、評価枠と直線成分とが重なる範囲を減少させた上で、評価枠を縮小し又は変形することができる。   In addition, when the linear component forms a polygon, the placement unit moves the evaluation frame so that the center of gravity of the evaluation frame matches the center of gravity of one polygon formed by the linear component. May be. According to this configuration, the evaluation frame can be reduced or deformed after the range in which the evaluation frame and the linear component overlap is reduced.

また、上記配置部は、さらに上記評価枠の重心を固定した上で、上記評価枠の各辺が上記画像に現れる直線成分と重ならないように上記評価枠を縮小してもよい。このように、直線成分により形成される多角形の重心に評価枠の重心を移動させた上で評価枠を縮小することで、評価枠の面積が過度に小さくなる可能性が低減され、合焦位置の決定のための適切な評価を維持することができる。   Further, the arrangement unit may further reduce the evaluation frame so that each side of the evaluation frame does not overlap with a linear component appearing in the image after fixing the center of gravity of the evaluation frame. In this way, by reducing the evaluation frame after moving the center of gravity of the evaluation frame to the center of gravity of the polygon formed by the linear component, the possibility that the area of the evaluation frame becomes excessively small is reduced, and the focus is reduced. Appropriate evaluation for position determination can be maintained.

以上説明したように、本発明に係る撮像装置によれば、被写体の手前に遮蔽物が存在する状況において、ユーザによる補助的な操作を要することなく高い精度で被写体にフォーカスを合わせることができる。   As described above, according to the imaging apparatus of the present invention, it is possible to focus on a subject with high accuracy without requiring an auxiliary operation by a user in a situation where there is a shield in front of the subject.

一実施形態に係る撮像装置の構成の一例を示すブロック図である。It is a block diagram showing an example of composition of an imaging device concerning one embodiment. 画像に配置される評価枠の一例を示す説明図である。It is explanatory drawing which shows an example of the evaluation frame arrange | positioned at an image. フォーカスレンズ位置に応じたAF評価値の第1の例を示す説明図である。It is explanatory drawing which shows the 1st example of AF evaluation value according to a focus lens position. フォーカスレンズ位置に応じたAF評価値の第2の例を示す説明図である。It is explanatory drawing which shows the 2nd example of AF evaluation value according to a focus lens position. フォーカスレンズ位置に応じたAF評価値の第3の例を示す説明図である。It is explanatory drawing which shows the 3rd example of AF evaluation value according to a focus lens position. 被写体と遮蔽物とが重なっている状況の一例を示す説明図である。It is explanatory drawing which shows an example of the condition where a to-be-photographed object and a shield have overlapped. 一実施形態に係る撮像装置による撮像処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the imaging process by the imaging device which concerns on one Embodiment. 直線成分の検出結果の一例を示す説明図である。It is explanatory drawing which shows an example of the detection result of a linear component. 直線成分と評価枠との重なりの判定について説明するための第1の説明図である。It is a 1st explanatory view for explaining judgment of an overlap with a straight line ingredient and an evaluation frame. 直線成分と評価枠との重なりの判定について説明するための第2の説明図である。It is the 2nd explanatory view for explaining judgment of an overlap with a straight line ingredient and an evaluation frame. 第1の実施例に係る評価枠再配置処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the evaluation frame rearrangement process which concerns on a 1st Example. 第1の実施例に係る評価枠再配置処理の結果の一例を示す説明図である。It is explanatory drawing which shows an example of the result of the evaluation frame rearrangement process which concerns on a 1st Example. 第2の実施例に係る評価枠再配置処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the evaluation frame rearrangement process which concerns on a 2nd Example. 第2の実施例に係る評価枠再配置処理による評価枠の移動の様子を示す説明図である。It is explanatory drawing which shows the mode of the movement of the evaluation frame by the evaluation frame rearrangement process which concerns on a 2nd Example. 評価枠の重心から頂点への線分と直線成分との交点の算出について説明するための説明図である。It is explanatory drawing for demonstrating calculation of the intersection of the line segment from the gravity center of an evaluation frame to a vertex, and a linear component. 第2の実施例に係る評価枠再配置処理による評価枠の縮小の様子を示す説明図である。It is explanatory drawing which shows the mode of the reduction | decrease of the evaluation frame by the evaluation frame rearrangement process which concerns on a 2nd Example.

以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付すことにより重複説明を省略する。   Exemplary embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In addition, in this specification and drawing, about the component which has the substantially same function structure, duplication description is abbreviate | omitted by attaching | subjecting the same code | symbol.

<1.撮像装置の構成例>
図1は、本発明の一実施形態に係る撮像装置1の構成の一例を示すブロック図である。図1を参照すると、撮像装置1は、レンズ部10、撮像部20、画像入力制御部30、VRAM(Video Random Access Memory)32、SDRAM(Synchronous Random Access Memory)34、メディアコントローラ36、記録メディア38、LCDドライバ40、LCD(Liquid Crystal Display)42、圧縮部44、バス46、評価値算出部50、合焦位置決定部52、レンズ制御部54、駆動部56、直線成分検出部60及び評価枠配置部62を備える。
<1. Configuration Example of Imaging Device>
FIG. 1 is a block diagram illustrating an example of a configuration of an imaging apparatus 1 according to an embodiment of the present invention. Referring to FIG. 1, an imaging apparatus 1 includes a lens unit 10, an imaging unit 20, an image input control unit 30, a video random access memory (VRAM) 32, a synchronous random access memory (SDRAM) 34, a media controller 36, and a recording medium 38. LCD driver 40, LCD (Liquid Crystal Display) 42, compression unit 44, bus 46, evaluation value calculation unit 50, focus position determination unit 52, lens control unit 54, drive unit 56, linear component detection unit 60, and evaluation frame An arrangement unit 62 is provided.

レンズ部10は、撮像装置1が実世界の光を撮像するための光学的なレンズ群及び関連する構成要素を含む。本実施形態において、レンズ部10のレンズ群には、フォーカスレンズ11が含まれる。フォーカスレンズ11を通過する光は、後に説明する撮像部20の撮像素子へ入射する。また、例えば、レンズ部10は、ズームレンズ及び絞り機構などを含んでよい。   The lens unit 10 includes an optical lens group and related components for the imaging apparatus 1 to capture light in the real world. In the present embodiment, the lens group of the lens unit 10 includes a focus lens 11. The light passing through the focus lens 11 enters an image sensor of the image capturing unit 20 described later. For example, the lens unit 10 may include a zoom lens, a diaphragm mechanism, and the like.

撮像部20は、レンズ部10のレンズ群を通過する光を電気的な画像信号に変換することにより、画像を取得する。撮像部20は、典型的には、CCD(Charge Coupled Device)又はCMOS(Complementary Metal Oxide Semiconductor)などの撮像素子、CDS(Correlated Double Sampling)回路及び増幅回路(AMP)などの信号処理回路、並びにA/D(Analog-to-Digital)変換回路を含む。撮像部20において、撮像素子に入射した光は、光電変換により電気信号に変換される。そして、電気信号は、信号処理回路で整形及び増幅された後、デジタル形式の画像信号に変換される。   The imaging unit 20 acquires an image by converting light passing through the lens group of the lens unit 10 into an electrical image signal. The imaging unit 20 typically includes an imaging element such as a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS), a signal processing circuit such as a CDS (Correlated Double Sampling) circuit and an amplification circuit (AMP), and A A / D (Analog-to-Digital) conversion circuit is included. In the imaging unit 20, the light incident on the imaging element is converted into an electric signal by photoelectric conversion. The electric signal is shaped and amplified by a signal processing circuit and then converted into a digital image signal.

画像入力制御部30は、撮像部20からの画像の入力を制御する。例えば、画像入力制御部30は、ライブビューモードにおいて、撮像部20から入力される画像をLCD42に表示させる。また、画像入力制御部30は、例えばシャッターボタンの押下又はセルフタイマーの失効などのトリガに応じて、撮像部20から入力される画像を記録メディア38に記録させる。   The image input control unit 30 controls input of an image from the imaging unit 20. For example, the image input control unit 30 displays an image input from the imaging unit 20 on the LCD 42 in the live view mode. In addition, the image input control unit 30 causes the recording medium 38 to record an image input from the imaging unit 20 in response to a trigger such as pressing of a shutter button or expiration of a self timer.

VRAM32は、撮像部20から入力される画像を一時的に記憶するためのメモリである。VRAM32により記憶される画像は、後に説明する評価値算出部50及び直線成分検出部60による処理の際に参照される。   The VRAM 32 is a memory for temporarily storing an image input from the imaging unit 20. The image stored in the VRAM 32 is referred to when processing is performed by the evaluation value calculation unit 50 and the linear component detection unit 60 described later.

SDRAM34は、撮像装置1による様々な処理のための一時的な記憶領域として利用される。撮像装置1による処理を実現するソフトウェアは、SDRAM34に格納された上で、撮像装置1の各部により実行される。   The SDRAM 34 is used as a temporary storage area for various processes by the imaging device 1. Software for realizing processing by the imaging apparatus 1 is stored in the SDRAM 34 and then executed by each unit of the imaging apparatus 1.

メディアコントローラ36は、記録メディア38へのデータの読み書きを制御するコントローラである。記録メディア38は、撮像装置1により撮像される画像、映像及びその他の様々なデータを記録する。記録メディア38は、撮像装置1に内蔵されるメディアであってもよく、着脱可能なメディアであってもよい。撮像装置1は、複数の記録メディア38を有していてもよい。   The media controller 36 is a controller that controls reading and writing of data from and to the recording medium 38. The recording medium 38 records an image, video, and other various data captured by the imaging device 1. The recording medium 38 may be a medium built in the imaging apparatus 1 or a removable medium. The imaging device 1 may have a plurality of recording media 38.

LCDドライバ40は、LCD42による画像の表示を制御するドライバである。LCD42は、撮像部20から入力される撮像前の画像、シャッターボタンが押下されることにより撮像される画像、及び撮像に関する設定をユーザが変更するためのユーザインタフェース画像など、様々な画像を画面上に表示する。LCD42により表示されるユーザインタフェース画像は、例えば、後に説明する遮蔽物除外モードのオン/オフをユーザが切り替えるためのユーザインタフェースに関する画像を含み得る。   The LCD driver 40 is a driver that controls display of images on the LCD 42. The LCD 42 displays various images such as an image before imaging input from the imaging unit 20, an image captured when the shutter button is pressed, and a user interface image for the user to change settings related to imaging on the screen. To display. The user interface image displayed by the LCD 42 may include, for example, an image relating to a user interface for the user to switch on / off of the shielding object exclusion mode described later.

圧縮部44は、撮像装置1により撮像される画像を所定の画像圧縮フォーマットに従って圧縮し、画像のデータ量を削減する。所定の画像圧縮フォーマットとは、例えば、JPEG、JPEG200又はTIFFなど、任意のフォーマットであってよい。   The compression unit 44 compresses an image captured by the imaging apparatus 1 according to a predetermined image compression format, and reduces the data amount of the image. The predetermined image compression format may be an arbitrary format such as JPEG, JPEG200, or TIFF.

バス46は、画像入力制御部30、VRAM32、SDRAM34、メディアコントローラ36、LCDドライバ40、圧縮部44、評価値算出部50、合焦位置決定部52、レンズ制御部54、直線成分検出部60及び評価枠配置部62を相互に接続する。   The bus 46 includes an image input control unit 30, a VRAM 32, an SDRAM 34, a media controller 36, an LCD driver 40, a compression unit 44, an evaluation value calculation unit 50, an in-focus position determination unit 52, a lens control unit 54, a linear component detection unit 60, and the like. The evaluation frame arrangement parts 62 are connected to each other.

評価値算出部50は、評価枠配置部62により画像内に配置される評価枠内の画素値を評価し、AF(Auto Focus)評価値を算出する。図2は、画像に設定される評価枠の一例として、画像Im00内に配置された評価枠EFを示している。評価値算出部50により算出されるAF評価値は、典型的には、画像のコントラスト値である。例えば、評価値算出部50は、評価枠の範囲内の画像信号をバンドパスフィルタでフィルタリングすることにより高周波成分を抽出し、抽出された高周波成分の積算値(即ち、コントラスト値)を算出する。評価値算出部50によるAF評価値の算出は、例えば、シャッターボタンの半押しなどのオートフォーカス開始のトリガに応じて、スキャン範囲内の複数のフォーカスレンズ位置の各々について行われる。なお、評価値算出部50により算出されるAF評価値は、コントラスト値とは異なる種類の値であってもよい。   The evaluation value calculation unit 50 evaluates the pixel values in the evaluation frame arranged in the image by the evaluation frame arrangement unit 62, and calculates an AF (Auto Focus) evaluation value. FIG. 2 shows an evaluation frame EF arranged in the image Im00 as an example of the evaluation frame set for the image. The AF evaluation value calculated by the evaluation value calculation unit 50 is typically an image contrast value. For example, the evaluation value calculation unit 50 extracts a high frequency component by filtering an image signal within the range of the evaluation frame with a band pass filter, and calculates an integrated value (that is, a contrast value) of the extracted high frequency component. The AF evaluation value is calculated by the evaluation value calculation unit 50 for each of a plurality of focus lens positions in the scan range, for example, in response to an autofocus start trigger such as half-pressing the shutter button. Note that the AF evaluation value calculated by the evaluation value calculation unit 50 may be a different type of value from the contrast value.

合焦位置決定部52は、評価値算出部50により算出されるAF評価値に基づいて、フォーカスレンズの合焦位置を決定する。本明細書において、合焦位置とは、被写体にフォーカスが合っていると撮像装置1により判定されたフォーカスレンズ位置をいう。合焦位置決定部52は、例えば、スキャン範囲内の複数のフォーカスレンズ位置のうち、AF評価値の最も高い(コントラストが極大となる)位置を合焦位置として決定し得る。   The focus position determination unit 52 determines the focus position of the focus lens based on the AF evaluation value calculated by the evaluation value calculation unit 50. In the present specification, the in-focus position refers to a focus lens position that is determined by the imaging apparatus 1 as being in focus on the subject. For example, the focus position determination unit 52 can determine, as the focus position, a position having the highest AF evaluation value (a contrast becomes maximum) among a plurality of focus lens positions in the scan range.

レンズ制御部54は、レンズ部10の設定を制御するコントローラである。レンズ部10の設定は、例えば、フォーカスレンズ位置、絞り値、シャッタースピード及びズーム量などを含み得る。本実施形態において、レンズ制御部54は、合焦位置決定部52により合焦位置が決定されると、駆動部56を駆動し、決定された合焦位置にフォーカスレンズを移動させる。   The lens control unit 54 is a controller that controls the setting of the lens unit 10. The setting of the lens unit 10 may include, for example, a focus lens position, an aperture value, a shutter speed, and a zoom amount. In the present embodiment, when the in-focus position is determined by the in-focus position determination unit 52, the lens control unit 54 drives the drive unit 56 to move the focus lens to the determined in-focus position.

駆動部56は、ドライバ及びモータを含み、レンズ制御部54による制御に応じてレンズ部10のレンズ群及び関連する構成要素の物理的構成を変化させる。例えば、駆動部56は、合焦位置決定部52により合焦位置が決定されると、決定された合焦位置にフォーカスレンズを移動する。それにより、被写体にフォーカスが合った状態で画像を撮像することが可能となる。   The drive unit 56 includes a driver and a motor, and changes the physical configuration of the lens group of the lens unit 10 and related components according to control by the lens control unit 54. For example, when the in-focus position is determined by the in-focus position determining unit 52, the driving unit 56 moves the focus lens to the determined in-focus position. As a result, an image can be taken with the subject in focus.

図3〜図6を用いて、コントラスト方式でのオートフォーカスの制御についてより詳細に説明する。コントラス方式でのオートフォーカスの制御は、レンズを介して取得される画像信号のコントラストの高低に基づいて合焦位置を決定する手法である。上述したように、画像のコントラストはAF評価値に対応しており、AF評価値は、評価枠(AF評価枠)内の画像信号の高周波成分を抽出することにより生成される。焦点距離が一定の場合、即ちズーム量が一定の場合には、フォーカスレンズ位置と被写体距離とは意味的に等価である。   The autofocus control in the contrast method will be described in more detail with reference to FIGS. The contrast-based autofocus control is a method of determining a focus position based on the level of contrast of an image signal acquired through a lens. As described above, the contrast of the image corresponds to the AF evaluation value, and the AF evaluation value is generated by extracting a high-frequency component of the image signal in the evaluation frame (AF evaluation frame). When the focal length is constant, that is, when the zoom amount is constant, the focus lens position and the subject distance are semantically equivalent.

図3は、フォーカスレンズ位置に応じたAF評価値の第1の例を示す説明図である。フォーカスレンズ位置を複数の位置に変化させながら各々の位置でAF評価値を算出すると、AF評価値が極大値をとるフォーカスレンズ位置(位置P01)において、被写体にフォーカスが合う(画像Im01参照)。これに対し、AF評価値が極大値から離れたフォーカスレンズ位置(例えば、位置P02及びP03)では、被写体にフォーカスが合わず、取得される画像は被写体がボケた画像となる(画像Im02及びIm03参照)。図3の例の場合、位置P01が合焦位置である。   FIG. 3 is an explanatory diagram illustrating a first example of an AF evaluation value corresponding to the focus lens position. When the AF evaluation value is calculated at each position while changing the focus lens position to a plurality of positions, the subject is focused at the focus lens position (position P01) where the AF evaluation value takes the maximum value (see image Im01). On the other hand, at the focus lens position where the AF evaluation value is far from the maximum value (for example, positions P02 and P03), the subject is not focused, and the acquired image is a blurred image of the subject (images Im02 and Im03). reference). In the case of the example in FIG. 3, the position P01 is the in-focus position.

図4は、画像内に2つの物体が存在する場合のフォーカスレンズ位置に応じたAF評価値の一例を示している。図4の例では、AF評価値が極大値を取るフォーカスレンズ位置が2つ存在する(位置P11、P12)。この場合、一方のフォーカスレンズ位置は被写体にフォーカスが合う位置であって、他方のフォーカスレンズ位置は遮蔽物にフォーカスが合う位置である可能性がある。   FIG. 4 shows an example of the AF evaluation value corresponding to the focus lens position when two objects are present in the image. In the example of FIG. 4, there are two focus lens positions at which the AF evaluation value takes a maximum value (positions P11 and P12). In this case, one focus lens position may be a position where the subject is focused, and the other focus lens position may be a position where the shielding object is focused.

図5もまた、画像内に2つの物体が存在する場合のフォーカスレンズ位置に応じたAF評価値の一例を示している。被写体と撮像装置1との間に金網などの遮蔽物があり、被写体と遮蔽物とが比較的近くに存在する場合には、図5の例のようなAF評価値の曲線が得られる。また、焦点距離(ズーム量)が広角側に設定され被写界深度が深い場合にも、被写体と遮蔽物とのピーク位置の分離が適切になされず、図5の例のようなAF評価値の曲線が得られることが多い。被写界深度とは、合焦位置の周辺でフォーカスが合っているように見える範囲をいう。一般に、光学ズームの広角側では被写界深度が深く、望遠側では被写界深度が浅い。但し、実際に1つの物体にフォーカスが合う位置は、被写界深度内の一点である。図4及び図5のような場合には、従来のオートフォーカス機能では、ユーザによる補助的な操作を要することなく合焦位置を適切に決定することが困難であった。   FIG. 5 also shows an example of the AF evaluation value corresponding to the focus lens position when there are two objects in the image. When there is a shield such as a wire mesh between the subject and the imaging apparatus 1 and the subject and the shield are relatively close to each other, an AF evaluation value curve as in the example of FIG. 5 is obtained. Further, even when the focal length (zoom amount) is set to the wide angle side and the depth of field is deep, the peak position of the subject and the shielding object is not properly separated, and the AF evaluation value as in the example of FIG. This curve is often obtained. The depth of field refers to a range that appears to be in focus around the in-focus position. Generally, the depth of field is deep on the wide angle side of the optical zoom, and the depth of field is shallow on the telephoto side. However, the position where one object is actually focused is one point within the depth of field. In the cases as shown in FIGS. 4 and 5, it is difficult for the conventional autofocus function to appropriately determine the in-focus position without requiring an auxiliary operation by the user.

図6は、被写体と遮蔽物とが重なっている状況の一例を示す説明図である。図6に示した画像Im10では、被写体TGTの手前に遮蔽物OBSが存在している。この場合、評価枠EF内に被写体TGT及び遮蔽物OBSの双方が映っているため、AF評価値の曲線は図4又は図5の例のようになる。しかし、評価枠EFを単純に移動させても評価枠EF内に遮蔽物OBSが映る状況を解消できないため、合焦位置を適切に決定することは困難である。   FIG. 6 is an explanatory diagram illustrating an example of a situation where the subject and the shielding object overlap each other. In the image Im10 illustrated in FIG. 6, the shielding object OBS exists in front of the subject TGT. In this case, since both the subject TGT and the shielding object OBS are shown in the evaluation frame EF, the AF evaluation value curve is as shown in the example of FIG. 4 or FIG. However, even if the evaluation frame EF is simply moved, the situation in which the shielding object OBS is reflected in the evaluation frame EF cannot be resolved, so that it is difficult to appropriately determine the in-focus position.

そこで、本実施形態に係る撮像装置1は、本明細書で説明する評価枠再配置の仕組みを備えることにより、自動的に適切な合焦位置を決定することを可能とする。   Therefore, the imaging apparatus 1 according to the present embodiment can automatically determine an appropriate in-focus position by including the evaluation frame rearrangement mechanism described in this specification.

図1に戻り、撮像装置1の構成の一例の説明を継続する。   Returning to FIG. 1, the description of an example of the configuration of the imaging apparatus 1 is continued.

直線成分検出部60は、撮像部20により取得される画像に現れる直線成分を検出する。直線成分検出部60は、例えば、特開平6−314339号公報に記載されている手法に従って、画像に現れる直線成分を検出してもよい。その場合、直線成分検出部60は、画像内で検出されるエッジをハフ変換し、ハフ変換された関数値からヒストグラムを生成してピーク点を識別することにより、直線成分を検出する。その代わりに、直線成分検出部60は、例えば、画像内のエッジにより分割される領域にHilditch法又はZhang Suen法などの細線化(Thinning)アルゴリズムを適用することにより、直線成分を検出してもよい。   The linear component detection unit 60 detects a linear component that appears in the image acquired by the imaging unit 20. The straight line component detection unit 60 may detect a straight line component appearing in the image, for example, according to a technique described in Japanese Patent Laid-Open No. 6-314339. In that case, the straight line component detection unit 60 detects a straight line component by performing Hough transform on the edge detected in the image, generating a histogram from the function value subjected to the Hough transform, and identifying a peak point. Instead, the straight line component detection unit 60 may detect a straight line component by applying a thinning algorithm such as a Hilditch method or a Zhang Suen method to a region divided by an edge in an image, for example. Good.

評価枠配置部62は、撮像部20により取得される画像に、上述したAF評価値を算出するための評価枠を配置する。評価枠の初期の配置は、予め設定される画像の中央などの固定的な位置であってよい。評価枠の初期のサイズ及び形状は、予め設定される固定的なサイズ及び形状であってよい。本実施形態において、評価枠配置部62は、直線成分検出部60により検出される1つ以上の直線成分と評価枠とが重なる場合に、評価枠を縮小、移動又は変形することにより、評価枠を再配置する。本明細書では、このような評価枠の再配置を自動的に行うモードを、遮蔽物除外モードという。   The evaluation frame arrangement unit 62 arranges an evaluation frame for calculating the AF evaluation value described above on the image acquired by the imaging unit 20. The initial arrangement of the evaluation frame may be a fixed position such as the center of the preset image. The initial size and shape of the evaluation frame may be a fixed size and shape set in advance. In the present embodiment, the evaluation frame arrangement unit 62 reduces, moves, or deforms the evaluation frame when one or more linear components detected by the linear component detection unit 60 and the evaluation frame overlap each other. Rearrange. In this specification, a mode in which such rearrangement of evaluation frames is automatically performed is referred to as a shielding object exclusion mode.

例えば、評価枠配置部62は、評価枠の1点(例えば矩形の4つの頂点のうちの1点)を固定した上で、評価枠の各辺がいずれの直線成分とも重ならないように、評価枠を縮小してもよい。その代わりに、評価枠配置部62は、直線成分が多角形を形成する場合に、評価枠の重心と直線成分により形成される1つの多角形の重心とが一致するように、評価枠を移動してもよい。後者の場合、移動後にさらに1つ以上の直線成分と評価枠とが重なるときには、評価枠配置部62は、さらに評価枠の重心を固定した上で、評価枠の各辺がいずれの直線成分とも重ならないように評価枠を縮小し得る。このような評価枠配置部62による評価枠再配置処理の2つの実施例について、後にさらに具体的に説明する。   For example, the evaluation frame arrangement unit 62 fixes one point of the evaluation frame (for example, one of the four vertices of the rectangle) and evaluates each side of the evaluation frame so that it does not overlap any of the linear components. The frame may be reduced. Instead, when the straight line component forms a polygon, the evaluation frame placement unit 62 moves the evaluation frame so that the center of gravity of the evaluation frame matches the center of gravity of one polygon formed by the straight line component. May be. In the latter case, when one or more linear components and the evaluation frame further overlap after the movement, the evaluation frame placement unit 62 further fixes the evaluation frame's center of gravity, and each side of the evaluation frame has any linear component. The evaluation window can be reduced so as not to overlap. Two examples of the evaluation frame rearrangement processing by the evaluation frame arrangement unit 62 will be described more specifically later.

<2.撮像処理の流れ>
図7は、本実施形態に係る撮像装置1による撮像処理の流れの一例を示すフローチャートである。図7に示した撮像処理は、例えば、撮像装置1が静止画撮影モードにある間、繰り返し行われ得る。
<2. Flow of imaging process>
FIG. 7 is a flowchart illustrating an example of the flow of imaging processing by the imaging apparatus 1 according to the present embodiment. The imaging process illustrated in FIG. 7 can be repeatedly performed while the imaging apparatus 1 is in the still image shooting mode, for example.

まず、直線成分検出部60は、現在のオートフォーカス機能のモードが遮蔽物除外モードであるか否かを判定する(ステップS102)。ここで、現在のオートフォーカス機能のモードが遮蔽物除外モードではない場合には、ステップS104〜S108の処理はスキップされる。一方、現在のオートフォーカス機能のモードが遮蔽物除外モードである場合には、直線成分検出部60は、撮像部20により取得される画像に現れる直線成分を検出する(ステップS104)。図8は、直線成分の検出結果の一例を示す説明図である。図8の例では、画像Im11に映る遮蔽物(斜線の網掛け部分)に対応する直線成分L1〜L13が直線成分の検出結果として示されている。   First, the linear component detection unit 60 determines whether or not the current autofocus function mode is the shielding object exclusion mode (step S102). If the current autofocus function mode is not the shielding object exclusion mode, the processes in steps S104 to S108 are skipped. On the other hand, if the current autofocus function mode is the shielding object exclusion mode, the linear component detection unit 60 detects a linear component that appears in the image acquired by the imaging unit 20 (step S104). FIG. 8 is an explanatory diagram illustrating an example of the detection result of the linear component. In the example of FIG. 8, linear components L1 to L13 corresponding to the shielding object (shaded hatched portion) shown in the image Im11 are shown as detection results of the linear components.

次に、評価枠配置部62は、直線成分検出部60により検出された直線成分が現在の評価枠に重なっているか否かを判定する(ステップS106)。直線成分と評価枠との重なりの有無は、例えば、次のように評価枠の一辺と直線成分との交点の有無を検証することにより判定され得る。   Next, the evaluation frame arrangement unit 62 determines whether or not the linear component detected by the linear component detection unit 60 overlaps the current evaluation frame (step S106). The presence / absence of an overlap between the linear component and the evaluation frame can be determined, for example, by verifying the presence / absence of an intersection between one side of the evaluation frame and the linear component as follows.

即ち、直線成分L1を、撮像面に対応するx−y平面においてy=ax+bのように表されるものとする。また、評価枠のある一辺の両端の頂点をV1(x1,y1)及びV2(x2,y2)とする。V1及びV2の双方が直線成分L1で分割される領域の一方にあれば、直線成分L1と頂点V1及びV2の間の辺とは交点を有しない。V1及びV2がそれぞれ直線成分L1の両側にあれば、直線成分L1と頂点V1及びV2の間の辺とは交点を有する(図9参照)。各頂点が直線成分L1のいずれの側にあるかは、z=y−ax−bという判定式に頂点座標を代入し、zの値の符号を検証することで判定可能である。例えば、頂点V1の座標を代入した結果及び頂点V2の座標を代入した結果の符号が異なっていれば、頂点V1及び頂点V2は別々の領域にある。それら符号が等しければ、頂点V1及び頂点V2は同じ領域にある。さらに、直線成分L1が線分である場合には、頂点V1及びV2の間の辺を直線成分と仮定し、直線成分L1の2つの端点について同様の検証を行うことで、頂点V1及びV2の間の辺と直線成分L1との交点の有無を判定することができる。例えば、2つの検証の結果が共に交点ありを示している場合には、頂点V1及びV2の間の辺と直線成分L1とは交点を有する。そうでなければ、頂点V1及びV2の間の辺と直線成分L1とは交点を有しない(図10参照)。評価枠配置部62は、このような判定を、直線成分検出部60により検出された直線成分と評価枠の辺との全ての組合せについて行う。なお、ここで説明した直線成分と評価枠との重なりの有無の判定の手法は一例に過ぎず、他の手法が用いられてもよい。   That is, the linear component L1 is expressed as y = ax + b in the xy plane corresponding to the imaging surface. In addition, vertices at both ends of one side with the evaluation frame are defined as V1 (x1, y1) and V2 (x2, y2). If both V1 and V2 are in one of the regions divided by the straight line component L1, the straight line component L1 and the side between the vertices V1 and V2 have no intersection. If V1 and V2 are on both sides of the linear component L1, respectively, the linear component L1 and the side between the vertices V1 and V2 have intersections (see FIG. 9). Which side of each vertex the straight line component L1 can be determined by substituting vertex coordinates into a determination formula z = y−ax−b and verifying the sign of the value of z. For example, if the sign of the result of assigning the coordinates of the vertex V1 and the result of assigning the coordinates of the vertex V2 are different, the vertex V1 and the vertex V2 are in different areas. If the signs are equal, the vertex V1 and the vertex V2 are in the same region. Furthermore, when the straight line component L1 is a line segment, it is assumed that the side between the vertices V1 and V2 is a straight line component, and the same verification is performed on the two end points of the straight line component L1, whereby the vertices V1 and V2 It is possible to determine whether or not there is an intersection between the side in between and the linear component L1. For example, if the two verification results indicate that there is an intersection, the side between the vertices V1 and V2 and the straight line component L1 have an intersection. Otherwise, the side between the vertices V1 and V2 and the straight line component L1 have no intersection (see FIG. 10). The evaluation frame arrangement unit 62 makes such a determination for all combinations of the straight line component detected by the straight line component detection unit 60 and the sides of the evaluation frame. Note that the method for determining whether or not the linear component and the evaluation frame overlap with each other described above is merely an example, and other methods may be used.

ステップS106において、いずれの直線成分も現在の評価枠に重なっていないと判定された場合には、ステップS108の評価枠再配置処理はスキップされる。一方、いずれかの直線成分が現在の評価枠に重なっていると判定された場合には、評価枠配置部62は、評価枠再配置処理を実行し、直線成分と評価枠とが重ならないように評価枠を再配置する(ステップS108)。   If it is determined in step S106 that no straight line component overlaps the current evaluation frame, the evaluation frame rearrangement process in step S108 is skipped. On the other hand, if it is determined that any of the straight line components overlaps the current evaluation frame, the evaluation frame placement unit 62 executes the evaluation frame rearrangement process so that the straight line component does not overlap the evaluation frame. The evaluation frames are rearranged at (Step S108).

次に、画像入力制御部30は、例えばシャッターボタンの押下などのオートフォーカス開始のトリガを判定する(ステップS110)。ここで、オートフォーカスが開始されない場合には、処理はステップS102へ戻る。なお、この場合にも、LCD42の画面上への画像の表示は行われてよい。一方、オートフォーカス開始のトリガがあった場合には、処理はステップS112へ進む。   Next, the image input control unit 30 determines an autofocus start trigger such as pressing of a shutter button (step S110). If autofocus is not started, the process returns to step S102. In this case as well, an image may be displayed on the screen of the LCD 42. On the other hand, if there is an autofocus start trigger, the process proceeds to step S112.

ステップS112及びS114の処理は、複数のフォーカスレンズ位置について繰り返し行われる。まず、評価値算出部50は、その時点で配置されている評価枠内のコントラスト値、即ちAF評価値を算出する(ステップS112)。また、レンズ制御部54及び駆動部56は、次のフォーカスレンズ位置へフォーカスレンズを移動させる(ステップS114)。このようなループ処理の結果、複数のフォーカスレンズ位置の各々についてAF評価値が算出される。   The processes in steps S112 and S114 are repeated for a plurality of focus lens positions. First, the evaluation value calculation unit 50 calculates the contrast value in the evaluation frame arranged at that time, that is, the AF evaluation value (step S112). Further, the lens control unit 54 and the drive unit 56 move the focus lens to the next focus lens position (step S114). As a result of such loop processing, an AF evaluation value is calculated for each of the plurality of focus lens positions.

次に、合焦位置決定部52は、評価値算出部50により算出されたAF評価値が極大値となるフォーカスレンズ位置を合焦位置として決定する(ステップS116)。次に、レンズ制御部54及び駆動部56は、合焦位置決定部52により決定された合焦位置にフォーカスレンズを移動させる(ステップS118)。そして、画像入力部30は、被写体にフォーカスの合った状態で、画像を撮像する(ステップS120)。なお、ステップS110においてシャッターボタンが半押しされていた場合には、画像入力部30は、シャッターボタンの全押しの検出を待って画像を撮像してもよい。   Next, the focus position determination unit 52 determines the focus lens position at which the AF evaluation value calculated by the evaluation value calculation unit 50 is a maximum value as the focus position (step S116). Next, the lens control unit 54 and the drive unit 56 move the focus lens to the in-focus position determined by the in-focus position determination unit 52 (step S118). Then, the image input unit 30 captures an image with the subject in focus (step S120). If the shutter button is half-pressed in step S110, the image input unit 30 may capture an image after detecting the full-press of the shutter button.

<3.評価枠再配置処理の第1の実施例>
本節では、図7に例示した撮像処理のステップS108の評価枠再配置処理の第1の実施例について説明する。
<3. First Example of Evaluation Frame Rearrangement Processing>
In this section, a first example of the evaluation frame rearrangement process in step S108 of the imaging process illustrated in FIG. 7 will be described.

[3−1.処理の流れ]
図11は、第1の実施例に係る評価枠再配置処理の流れの一例を示すフローチャートである。図11を参照すると、評価枠配置部62は、まず、その時点の評価枠の4つの頂点のうち、固定すべき(即ち、移動させない)1つの頂点V1を選択する(ステップS132)。頂点V1は、例えば、画像の中央に最も近い頂点又は予め設定される特定の頂点などであってよい。ここでは、矩形の評価枠の左上の頂点を頂点V1とし、左下、右下及び右上の頂点をそれぞれ頂点V2、V3及びV4とする。
[3-1. Process flow]
FIG. 11 is a flowchart illustrating an example of the flow of evaluation frame rearrangement processing according to the first embodiment. Referring to FIG. 11, the evaluation frame arrangement unit 62 first selects one vertex V1 to be fixed (that is, not to be moved) among the four vertices of the evaluation frame at that time (step S132). The vertex V1 may be, for example, a vertex closest to the center of the image or a specific vertex set in advance. Here, the upper left vertex of the rectangular evaluation frame is defined as a vertex V1, and the lower left, lower right, and upper right vertexes are defined as vertices V2, V3, and V4, respectively.

次に、評価枠配置部62は、選択した頂点V1と頂点V2とを結ぶ辺と直線成分との交点P12を算出する(ステップS134)。なお、頂点V1と頂点V2とを結ぶ辺がいずれの直線成分とも交差しない場合には、ステップS134の処理はスキップされてよい。また、頂点V1と頂点V2とを結ぶ辺が複数の直線成分と交差する場合には、頂点V1に近い交点が交点P12として算出される。同様に、評価枠配置部62は、選択した頂点V1と頂点V3とを結ぶ対角線と直線成分との交点P13を算出する(ステップS136)。また、評価枠配置部62は、選択した頂点V1と頂点V4とを結ぶ辺と直線成分との交点P14を算出する(ステップS138)。 Next, evaluation frame arranging unit 62 calculates the intersection point P 12 of the side and the straight line component connecting the vertex and the vertex V1 selected V2 (step S134). If the side connecting the vertex V1 and the vertex V2 does not intersect any straight line component, the process of step S134 may be skipped. Further, when the side connecting the vertices V1 and vertex V2 intersects the plurality of linear components, the intersection near the vertex V1 is calculated as the intersection P 12. Similarly, evaluation frame arranging unit 62 calculates the intersection point P 13 of the diagonal and the line component connecting the vertices V1 and vertex V3 selected (step S136). The evaluation frame arranging unit 62 calculates the intersection point P 14 of the side and the straight line component connecting the vertices V1 and vertex V4 selected (step S138).

次に、評価枠配置部62は、ステップS134、S136及びS138において算出した交点P12、P13及びP14の位置に応じて、頂点V2、V3及びV4の新たな位置を決定する(ステップS140)。例えば、交点P12、P13及びP14がいずれも存在する場合には、固定される頂点V1の対角にある頂点V3の新たな位置V3´(V3´,V3´)は、次のように決定され得る。なお、下付文字のx及びyは、装飾される記号が表す位置のx座標及びy座標をそれぞれ表す: Next, evaluation frame arranging unit 62, depending on the position of the step S134, S136 and the intersection P 12 calculated in S138, P 13 and P 14, to determine the new position of the vertex V2, V3 and V4 (step S140 ). For example, when the intersection points P 12 , P 13 and P 14 are all present, the new position V 3 ′ (V 3 ′ x , V 3 ′ y ) of the vertex V 3 on the opposite side of the fixed vertex V 1 is It can be determined as follows. Note that the subscripts x and y represent the x and y coordinates of the position represented by the symbol to be decorated, respectively:

Figure 2012133049
(1)
Figure 2012133049
(1)

交点P12及びP13が存在し、交点P14が存在しない場合には、頂点V3の新たな位置V3´は、次のように決定され得る: There is an intersection P 12 and P 13, if the intersection point P 14 is not present, the new position V3' vertex V3 may be determined as follows:

Figure 2012133049
(2)
Figure 2012133049
(2)

交点P13及びP14が存在し、交点P12が存在しない場合には、頂点V3の新たな位置V3´は、次のように決定され得る: There is an intersection P 13 and P 14, if the intersection point P 12 is not present, the new position V3' vertex V3 may be determined as follows:

Figure 2012133049
(3)
Figure 2012133049
(3)

交点P13のみが存在する場合には、頂点V3の新たな位置V3´は、次のように決定され得る: If only intersections P 13 is present, the new position V3' vertex V3 may be determined as follows:

Figure 2012133049
(4)
Figure 2012133049
(4)

その他の場合にも、頂点V3の新たな位置V3´は同様の考え方に従って決定されてよい。   In other cases, the new position V3 ′ of the vertex V3 may be determined according to the same concept.

また、頂点V2及びV4の新たな位置V2´及びV4´は、頂点V3の新たな位置V3´に応じて次のように決定され得る:   Also, the new positions V2 ′ and V4 ′ of the vertices V2 and V4 can be determined as follows according to the new position V3 ′ of the vertex V3:

Figure 2012133049
(5)
Figure 2012133049
(5)

そして、評価枠配置部62は、決定した新たな位置に、頂点V2、V3及びV4を移動する(ステップS142)。   Then, the evaluation frame arrangement unit 62 moves the vertices V2, V3, and V4 to the determined new position (step S142).

[3−2.処理結果の一例]
図12は、第1の実施例に係る評価枠再配置処理の結果の一例を示す説明図である。図12を参照すると、評価枠が再配置される前の画像Im11a(図中左)において、評価枠EFの頂点V1と頂点V2とを結ぶ辺は、直線成分L1と交差していた。また、頂点V1と頂点V3とを結ぶ対角線は、直線成分L2に交差していた。頂点V1と頂点V4とを結ぶ辺は、直線成分L4と交差していた。これに対し、評価枠が再配置された後の画像Im11b(図中右)では、評価枠EFは、頂点V2、V3及びV4が新たな位置に移動することで縮小されており、いずれの直線成分とも重なっていない。
[3-2. Example of processing results]
FIG. 12 is an explanatory diagram illustrating an example of a result of the evaluation frame rearrangement process according to the first embodiment. Referring to FIG. 12, in the image Im11a (left in the figure) before the evaluation frame is rearranged, the side connecting the vertex V1 and the vertex V2 of the evaluation frame EF intersects the linear component L1. Further, the diagonal line connecting the vertex V1 and the vertex V3 intersects the linear component L2. The side connecting the vertex V1 and the vertex V4 intersected with the straight line component L4. On the other hand, in the image Im11b (right in the figure) after the evaluation frames are rearranged, the evaluation frame EF is reduced by moving the vertices V2, V3, and V4 to new positions, and any straight line is obtained. Does not overlap with ingredients.

<4.評価枠再配置処理の第2の実施例>
本節では、図7に例示した撮像処理のステップS108の評価枠再配置処理の第2の実施例について説明する。
<4. Second Example of Evaluation Frame Rearrangement Processing>
In this section, a second example of the evaluation frame rearrangement process in step S108 of the imaging process illustrated in FIG. 7 will be described.

[4−1.処理の流れ]
図13は、第2の実施例に係る評価枠再配置処理の流れの一例を示すフローチャートである。図13を参照すると、評価枠配置部62は、まず、直線成分検出部60により検出された直線成分で形成される全ての多角形の重心を算出する(ステップS152)。また、評価枠配置部62は、その時点の評価枠の重心を算出する(ステップS154)。重心は、対象とする多角形又は評価枠の頂点の位置ベクトルから、次のように算出され得る:
[4-1. Process flow]
FIG. 13 is a flowchart illustrating an example of the flow of evaluation frame rearrangement processing according to the second embodiment. Referring to FIG. 13, the evaluation frame arrangement unit 62 first calculates the centroids of all polygons formed by the linear components detected by the linear component detection unit 60 (step S152). Moreover, the evaluation frame arrangement unit 62 calculates the center of gravity of the evaluation frame at that time (step S154). The centroid can be calculated from the target polygon or the position vector of the vertex of the evaluation frame as follows:

Figure 2012133049
Figure 2012133049

次のステップS156の処理は、ステップS154で算出された全ての多角形の重心について繰り返される。評価枠配置部62は、評価枠の重心と注目する多角形の重心との間の距離を算出する(ステップS156)。なお、評価枠の重心G0(G0,G0)と1つの多角形の重心G1(G1,G1)との間の距離D1は、一例として、次のようにユークリッド距離として算出されてよい: The process of the next step S156 is repeated for the centroids of all the polygons calculated in step S154. The evaluation frame arrangement unit 62 calculates the distance between the center of gravity of the evaluation frame and the center of gravity of the polygon of interest (step S156). The distance D1 between the center of gravity G0 (G0 x , G0 y ) of the evaluation frame and the center of gravity G1 (G1 x , G1 y ) of one polygon is calculated as an Euclidean distance as follows as an example. Good:

Figure 2012133049
(7)
Figure 2012133049
(7)

次に、評価枠配置部62は、評価枠の重心が最も近傍の多角形の重心に一致するように、評価枠を移動する(ステップS158)。評価枠の重心及び各頂点を移動させるための移動ベクトル(ΔG,ΔG)は、次のように算出され得る: Next, the evaluation frame placement unit 62 moves the evaluation frame so that the center of gravity of the evaluation frame matches the center of gravity of the nearest polygon (step S158). The movement vector (ΔG x , ΔG y ) for moving the center of gravity and each vertex of the evaluation frame can be calculated as follows:

Figure 2012133049
(8)
Figure 2012133049
(8)

図14は、一例として、評価枠EFの重心G0が最も近傍の多角形の重心G1に一致するように評価枠EFが移動される様子を示している。なお、評価枠の移動先の多角形は、最も近傍の多角形ではなく、より面積の広い多角形であってもよい。   FIG. 14 shows, as an example, how the evaluation frame EF is moved so that the centroid G0 of the evaluation frame EF matches the centroid G1 of the nearest polygon. Note that the polygon to which the evaluation frame is moved may not be the nearest polygon but may be a polygon with a larger area.

次のステップS160の処理は、ステップS158において選択された多角形の各辺について繰り返される。評価枠配置部62は、新たな重心から評価枠の頂点への線分と対象の多角形の各辺との交点までの、対応する頂点からの距離を算出する(ステップS160)。   The process in the next step S160 is repeated for each side of the polygon selected in step S158. The evaluation frame arrangement unit 62 calculates the distance from the corresponding vertex to the intersection of the line segment from the new center of gravity to the vertex of the evaluation frame and each side of the target polygon (step S160).

次に、評価枠配置部62は、算出された距離の最も短い辺に対応する交点を選択する(ステップS162)。次に、評価枠配置部62は、選択された交点の位置へ、対応する頂点を移動する(ステップS164)。なお、評価枠の重心から1つの頂点への線分をax+by+c=0、遮蔽物の一部に相当する1つの直線成分をax+by+c=0とすると、これらの交点(P,P)は次のように算出され得る(図15参照): Next, the evaluation frame arrangement unit 62 selects an intersection corresponding to the shortest side of the calculated distance (step S162). Next, the evaluation frame arrangement unit 62 moves the corresponding vertex to the position of the selected intersection (step S164). If a line segment from the center of gravity of the evaluation frame to one vertex is a 1 x + b 1 y + c 1 = 0, and one linear component corresponding to a part of the shield is a 2 x + b 2 y + c 2 = 0, these The intersection points (P x , P y ) can be calculated as follows (see FIG. 15):

Figure 2012133049
(9)
Figure 2012133049
(9)

次に、評価枠配置部62は、ステップS164において移動した頂点の対角の頂点と重心とを結ぶ線分がいずれかの直線成分と交点を有するか否かを判定する(ステップS166)。ここで、当該線分が交点を有しないと判定された場合には、ステップS168の処理はスキップされる。一方、当該線分が交点を有すると判定された場合には、評価枠配置部62は、対角の頂点を当該交点の位置へ移動する(ステップS168)。   Next, the evaluation frame arrangement unit 62 determines whether or not the line segment connecting the diagonal vertex of the vertex moved in step S164 and the center of gravity has an intersection with any straight line component (step S166). Here, if it is determined that the line segment has no intersection, the process of step S168 is skipped. On the other hand, when it is determined that the line segment has an intersection, the evaluation frame arrangement unit 62 moves the diagonal vertex to the position of the intersection (step S168).

次に、評価枠配置部62は、評価枠と交差する直線成分が残っているか否かを判定する(ステップS170)。ここで、評価枠と交差する直線成分が残っていると判定された場合には、処理はステップS160へ戻る。一方、評価枠と交差する直線成分が残っていないと判定された場合には、評価枠配置部62による評価枠再配置処理は終了する。   Next, the evaluation frame arrangement unit 62 determines whether or not a straight line component that intersects the evaluation frame remains (step S170). Here, if it is determined that a straight line component that intersects the evaluation frame remains, the process returns to step S160. On the other hand, if it is determined that no straight line component intersecting with the evaluation frame remains, the evaluation frame rearrangement process by the evaluation frame arrangement unit 62 ends.

[4−2.処理結果の一例]
図16は、第2の実施例に係る評価枠再配置処理による評価枠の縮小の様子を示す説明図である。図16の左上には、図13のステップS158において評価枠EFの重心G0が多角形の重心に一致するように移動された後の評価枠EFを含む画像Im21aが示されている。画像Im21aにおいて、評価枠EFは、直線成分L1、L2、L4及びL5と交差している。その後、図13のステップS164により、頂点V1が新たな位置V1´に移動される(図16の中央上参照)。さらに、図13のステップS168により、頂点V1の対角の頂点V3が新たな位置V3´に移動される(図16の右上参照)。また、ステップS170の判定の結果として繰り返される、図13のステップS164により、頂点V2´が新たな位置V2´´に移動される(図16の左下参照)。さらに、図13のステップS168により、頂点V4´が新たな位置V4´´に移動される(図16の中央下参照)。このような処理の結果として、図16の右下の画像Im21fにおいていずれの直線成分とも重ならないように再配置された評価枠EFが示されている。
[4-2. Example of processing results]
FIG. 16 is an explanatory diagram showing how the evaluation frame is reduced by the evaluation frame rearrangement process according to the second embodiment. In the upper left of FIG. 16, an image Im21a including the evaluation frame EF after being moved so that the center of gravity G0 of the evaluation frame EF coincides with the center of gravity of the polygon in step S158 of FIG. In the image Im21a, the evaluation frame EF intersects with the straight line components L1, L2, L4, and L5. Thereafter, in step S164 in FIG. 13, the vertex V1 is moved to a new position V1 ′ (see the upper center in FIG. 16). Furthermore, the diagonal vertex V3 of the vertex V1 is moved to a new position V3 ′ by the step S168 in FIG. 13 (see the upper right in FIG. 16). Also, as a result of the determination in step S170, the vertex V2 ′ is moved to a new position V2 ″ in step S164 in FIG. 13 (see the lower left in FIG. 16). Further, in step S168 in FIG. 13, the vertex V4 ′ is moved to a new position V4 ″ (see the lower center in FIG. 16). As a result of such processing, the evaluation frame EF rearranged so as not to overlap any of the linear components in the lower right image Im21f of FIG. 16 is shown.

<5.まとめ>
ここまで、図1〜図16を用いて、本発明の一実施形態に係る撮像装置1の構成の一例と評価枠再配置処理の2つの実施例を説明した。本実施形態によれば、オートフォーカスのための評価値の算出に用いられる評価枠が、画像内で検出される直線成分と重ならないように自動的に再配置される。それにより、被写体の手前に遮蔽物が存在する状況においても、ユーザによる補助的な操作を要することなく、高い精度で被写体にフォーカスを合わせることが可能となる。従って、ユーザがシャッターチャンスを逃すことなく適切にフォーカスの合った画像を撮像できる可能性が高められる。また、被写体と遮蔽物との間の距離が近い場合にも、遮蔽物を避けて評価枠が再配置されるため、誤って遮蔽物にフォーカスが合うこと防止される。
<5. Summary>
Up to this point, an example of the configuration of the imaging apparatus 1 according to an embodiment of the present invention and two examples of the evaluation frame rearrangement process have been described with reference to FIGS. According to this embodiment, the evaluation frame used for calculating the evaluation value for autofocus is automatically rearranged so as not to overlap with the linear component detected in the image. Accordingly, even in a situation where there is a shield in front of the subject, it is possible to focus on the subject with high accuracy without requiring an auxiliary operation by the user. Therefore, it is possible to increase the possibility that the user can capture an image with an appropriate focus without missing a photo opportunity. Even when the distance between the subject and the shielding object is short, the evaluation frame is rearranged while avoiding the shielding object, so that the shielding object is prevented from being inadvertently focused.

第1の実施例では、評価枠を大きく動かすことなく、少ない計算コストで、簡易に遮蔽物を避けて評価枠を再配置することができる。第2の実施例では、検出される直線成分により形成される多角形の重心に評価枠の重心を移動させた上で評価枠が縮小されるため、評価枠の面積が過度に小さくなる可能性が低減され、合焦位置の決定のための適切な評価を維持することができる。   In the first embodiment, the evaluation frames can be easily rearranged while avoiding the shielding object with a small calculation cost without moving the evaluation frames greatly. In the second embodiment, the evaluation frame is reduced after the center of gravity of the evaluation frame is moved to the center of gravity of the polygon formed by the detected linear component, and therefore the area of the evaluation frame may be excessively reduced. Can be reduced and an appropriate evaluation for the determination of the in-focus position can be maintained.

なお、上述した2つの実施例では、主に評価枠が移動又は縮小される例について説明した。しかしながら、例えば、直線成分により形成される多角形と評価枠との位置関係から評価枠を広げる方向に評価枠の頂点を移動可能である場合には、当該方向に頂点が移動されてもよい。   In the two embodiments described above, the example in which the evaluation frame is mainly moved or reduced has been described. However, for example, when the vertex of the evaluation frame can be moved in the direction of expanding the evaluation frame from the positional relationship between the polygon formed by the linear component and the evaluation frame, the vertex may be moved in that direction.

以上、添付図面を参照しながら本発明の好適な実施形態について詳細に説明したが、本発明はかかる例に限定されない。本発明の属する技術の分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本発明の技術的範囲に属するものと了解される。   The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field to which the present invention pertains can come up with various changes or modifications within the scope of the technical idea described in the claims. Of course, it is understood that these also belong to the technical scope of the present invention.

1 撮像装置
11 フォーカスレンズ
20 撮像部
62 配置部
52 決定部
56 駆動部
EF 評価枠
DESCRIPTION OF SYMBOLS 1 Imaging device 11 Focus lens 20 Imaging part 62 Arrangement part 52 Determination part 56 Drive part EF Evaluation frame

Claims (4)

フォーカスレンズを通過する光を画像信号に変換することにより画像を取得する撮像部と、
前記撮像部により取得される前記画像に評価枠を配置する配置部と、
前記配置部により配置される前記評価枠内の画素値の評価に基づいて、前記フォーカスレンズの合焦位置を決定する決定部と、
前記決定部により決定される前記合焦位置に前記フォーカスレンズを移動する駆動部と、
を備え、
前記配置部は、前記画像に現れる直線成分と前記評価枠とが重なる場合に、前記評価枠を縮小、移動又は変形することにより、前記評価枠を再配置する、
撮像装置。
An imaging unit that acquires an image by converting light passing through the focus lens into an image signal;
An arrangement unit that arranges an evaluation frame on the image acquired by the imaging unit;
A determination unit that determines a focus position of the focus lens based on an evaluation of a pixel value in the evaluation frame arranged by the arrangement unit;
A drive unit that moves the focus lens to the in-focus position determined by the determination unit;
With
The arrangement unit rearranges the evaluation frame by reducing, moving, or deforming the evaluation frame when a linear component appearing in the image and the evaluation frame overlap.
Imaging device.
前記配置部は、前記評価枠の1点を固定した上で、前記評価枠の各辺が前記画像に現れる直線成分と重ならないように前記評価枠を縮小する、請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the placement unit reduces the evaluation frame so that each side of the evaluation frame does not overlap a linear component appearing in the image after fixing one point of the evaluation frame. . 前記配置部は、前記直線成分が多角形を形成する場合に、前記評価枠の重心と前記直線成分により形成される1つの多角形の重心とが一致するように、前記評価枠を移動する、請求項1に記載の撮像装置。   The placement unit moves the evaluation frame so that the center of gravity of the evaluation frame and the center of gravity of one polygon formed by the linear component coincide when the linear component forms a polygon. The imaging device according to claim 1. 前記配置部は、さらに前記評価枠の重心を固定した上で、前記評価枠の各辺が前記画像に現れる直線成分と重ならないように前記評価枠を縮小する、請求項3に記載の撮像装置。
The imaging device according to claim 3, wherein the placement unit further reduces the evaluation frame so that each side of the evaluation frame does not overlap a linear component appearing in the image after fixing the center of gravity of the evaluation frame. .
JP2010283829A 2010-12-20 2010-12-20 Imaging apparatus Pending JP2012133049A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2010283829A JP2012133049A (en) 2010-12-20 2010-12-20 Imaging apparatus
KR1020110127520A KR101799600B1 (en) 2010-12-20 2011-12-01 Imaging device and method for taking image
US13/324,392 US8643730B2 (en) 2010-12-20 2011-12-13 Imaging device and image capturing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010283829A JP2012133049A (en) 2010-12-20 2010-12-20 Imaging apparatus

Publications (1)

Publication Number Publication Date
JP2012133049A true JP2012133049A (en) 2012-07-12

Family

ID=46648738

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010283829A Pending JP2012133049A (en) 2010-12-20 2010-12-20 Imaging apparatus

Country Status (2)

Country Link
JP (1) JP2012133049A (en)
KR (1) KR101799600B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003185911A (en) * 2001-12-18 2003-07-03 Minolta Co Ltd Optical system control device
JP2010152395A (en) * 2010-03-19 2010-07-08 Casio Computer Co Ltd Imaging apparatus, autofocus control method, and autofocus control program
JP2010160297A (en) * 2009-01-08 2010-07-22 Sony Corp Imaging apparatus, automatic focusing method, and computer program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5215818B2 (en) * 2008-11-13 2013-06-19 キヤノン株式会社 Imaging apparatus, control method thereof, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003185911A (en) * 2001-12-18 2003-07-03 Minolta Co Ltd Optical system control device
JP2010160297A (en) * 2009-01-08 2010-07-22 Sony Corp Imaging apparatus, automatic focusing method, and computer program
JP2010152395A (en) * 2010-03-19 2010-07-08 Casio Computer Co Ltd Imaging apparatus, autofocus control method, and autofocus control program

Also Published As

Publication number Publication date
KR101799600B1 (en) 2017-11-20
KR20120069558A (en) 2012-06-28

Similar Documents

Publication Publication Date Title
US9521320B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JP5789091B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2006018246A (en) Imaging apparatus and imaging method
JP2008191683A (en) Imaging apparatus and imaging method
KR102228456B1 (en) Image pickup apparatus and image pickup method of generating image having depth information
WO2017080237A1 (en) Camera imaging method and camera device
US10395348B2 (en) Image pickup apparatus, image processing apparatus, and control method of image pickup apparatus
JP2003167182A (en) Automatic focusing device
JP2014081420A (en) Tracking device and method thereof
JP5949559B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2010279054A (en) Image pickup device, image processing device, image pickup method, and image processing method
JP6833405B2 (en) Focus detection device, focus adjustment device, imaging device and focus detection method
JP5471130B2 (en) Image processing apparatus and method
US8643730B2 (en) Imaging device and image capturing method
JP2008089811A (en) Imaging apparatus and control method therefor
CN115812177A (en) Image processing device, imaging device, image processing method, and program
JP2010066728A (en) Imaging apparatus, and control method for imaging apparatus
US20130076868A1 (en) Stereoscopic imaging apparatus, face detection apparatus and methods of controlling operation of same
JP2012133049A (en) Imaging apparatus
JP2014232477A (en) Subject specifying device, imaging device, subject specifying method, and subject specifying program
JP2012220890A (en) Focus adjustment device
JP5965654B2 (en) TRACKING DEVICE, IMAGING DEVICE, TRACKING METHOD USED FOR IMAGING DEVICE
JP6200240B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP2014134723A (en) Image processing system, image processing method and program
JP5853369B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141203

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141224

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150602