JP2005326506A - Focus detection device and focus detection method - Google Patents

Focus detection device and focus detection method Download PDF

Info

Publication number
JP2005326506A
JP2005326506A JP2004142804A JP2004142804A JP2005326506A JP 2005326506 A JP2005326506 A JP 2005326506A JP 2004142804 A JP2004142804 A JP 2004142804A JP 2004142804 A JP2004142804 A JP 2004142804A JP 2005326506 A JP2005326506 A JP 2005326506A
Authority
JP
Japan
Prior art keywords
focus
subject
focus position
image
photographing lens
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.)
Withdrawn
Application number
JP2004142804A
Other languages
Japanese (ja)
Inventor
Yuri Yahiro
友理 八尋
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.)
Olympus Corp
Original Assignee
Olympus Corp
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 Olympus Corp filed Critical Olympus Corp
Priority to JP2004142804A priority Critical patent/JP2005326506A/en
Publication of JP2005326506A publication Critical patent/JP2005326506A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To appropriately perform an auto-focus photographing through glass. <P>SOLUTION: A control circuit 10 detects a focal position of a photographic lens 11 at each object in focusing the photographic lens on each of two or more objects shown in an image photographed through the photographic lens 11, and determines the presence of an effect of the glass on the image pickup performed through the glass, and when judging that this effect exists, the circuit selects one of the focal positions except that of the nearest object from the photographic lens among each focal position of the objects as a result of the focus detection. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、被写体像の撮像を行う技術に関し、特に、撮像に使用されるレンズを自動で被写体に合焦させる、いわゆるオートフォーカスの技術に関する。   The present invention relates to a technique for capturing a subject image, and particularly to a so-called autofocus technique in which a lens used for imaging is automatically focused on a subject.

例えば、特許文献1には、いわゆるコントラスト方式を採用しているカメラのオートフォーカス機能において、合焦動作を行わせる際の合焦評価値に対し、被写体までの撮影距離に関連する撮影条件(例えば遠景モードなど)に応じた重み付けを与えることにより、被写体のうちで撮影者が所望している主要被写体への焦点調節が適切に行われるようにするという技術が開示されている。
特開2003−107331号公報
For example, in Patent Document 1, in an autofocus function of a camera that employs a so-called contrast method, a shooting condition related to a shooting distance to a subject (for example, a focus evaluation value when performing a focusing operation (for example, A technique is disclosed in which focus adjustment is appropriately performed on a main subject desired by a photographer among subjects by giving weighting according to a distant view mode or the like.
JP 2003-107331 A

ショーウィンドウ等のガラスによって隔てられている被写体をガラス越しで撮影するべくカメラのオートフォーカスを機能させると、その焦点が、被写体にではなく、そのガラス自体に描かれている文字や図形等若しくはそのガラスに映り込んでいる像に合焦してしまい、本来の被写体が撮影画像においてぼやけた像として写ってしまうという問題が生じることがある。   When the camera's auto-focus function is activated to shoot a subject separated by glass such as a show window through the glass, the focus is not on the subject but on the character or figure drawn on the glass itself or its There may be a problem that the image reflected on the glass is in focus and the original subject appears as a blurred image in the captured image.

本発明は上述した問題に鑑みてなされたものであり、その解決しようとする課題は、ガラス越しでのオートフォーカス撮影を適切に行えるようにすることである。   The present invention has been made in view of the above-described problems, and a problem to be solved is to appropriately perform autofocus photographing through glass.

本発明の態様のひとつである焦点検出装置は、撮影レンズを通して撮像される画像に表される複数の被写体に当該撮影レンズを各々合焦させるときの当該撮影レンズの合焦位置を当該被写体毎に検出する合焦位置検出手段と、ガラス越しに行われた当該撮像に及ぼす当該ガラスの影響の有無を判定する判定手段と、当該影響が有ると判定された場合に、当該被写体についての各々の当該合焦位置のうち当該撮影レンズから最至近の被写体についてのものを除くいずれかの合焦位置を焦点検出の結果として選択する合焦位置選択手段と、を有することを特徴とすることにより、前述した課題を解決する。   A focus detection apparatus according to one aspect of the present invention provides a focus position of each photographing lens for each subject when the photographing lens is focused on a plurality of subjects represented in an image captured through the photographing lens. An in-focus position detecting means for detecting, a determining means for determining the presence or absence of the influence of the glass on the imaging performed through the glass, and when it is determined that there is the influence, A focus position selection unit that selects any focus position as a result of focus detection, except for the focus object and the subject closest to the photographic lens. Solve the problem.

なお、上述した本発明に係る焦点検出装置において、当該合焦位置検出手段は、当該撮影レンズを通して撮像された画像のコントラストに基づいて当該検出を行うように構成してもよい。
また、前述した本発明に係る焦点検出装置において、当該判定手段は、当該撮影レンズを通して撮像された画像の明るさに基づいて、当該影響の有無を判定するように構成してもよい。
In the focus detection apparatus according to the present invention described above, the focus position detection unit may be configured to perform the detection based on the contrast of the image captured through the photographing lens.
In the focus detection apparatus according to the present invention described above, the determination unit may be configured to determine the presence or absence of the influence based on the brightness of an image captured through the photographing lens.

また、前述した本発明に係る焦点検出装置において、当該合焦位置選択手段は、当該影響が有ると判定された場合に、当該複数の被写体についての各々の当該合焦位置のうち当該撮影レンズから二番目に近い被写体についてのものを選択するように構成してもよい。
なお、このときには、当該合焦位置検出手段は、当該複数の被写体の各々についての当該合焦位置を、当該撮影レンズに対して近い被写体についてのものから順に検出するように構成してもよい。
Further, in the focus detection device according to the present invention described above, when it is determined that the focus position selection unit has the influence, the focus position selection unit determines whether the focus lens from the shooting lens among the focus positions of the plurality of subjects. You may comprise so that the thing about the 2nd closest subject may be selected.
At this time, the in-focus position detecting means may be configured to detect the in-focus position for each of the plurality of subjects in order from the subject for the subject close to the photographing lens.

また、前述した本発明に係る焦点検出装置において、撮像を行う際の撮像条件の設定指示を取得する設定指示取得手段を更に有し、当該合焦位置選択手段は、当該設定指示に係る撮像条件がガラス越しの撮像を示している場合に当該判定手段による判定結果に基づいて当該選択を行う、ように構成してもよい。   The focus detection apparatus according to the present invention described above further includes a setting instruction acquisition unit that acquires an instruction for setting an imaging condition when performing imaging. May be configured to perform the selection based on the determination result by the determination unit when the image is taken through the glass.

なお、このときには、当該合焦位置検出手段は、当該撮影レンズを通して撮像された画像のコントラストに基づいて当該検出を行い、当該合焦位置選択手段は、当該設定指示に係る撮像条件がガラス越しの撮像以外の撮像を示している場合には、当該影響の有無に関わらず、当該画像においてコントラストが最大である被写体像に対応する被写体についての当該合焦位置を選択する、ように構成してもよい。   At this time, the focus position detection unit performs the detection based on the contrast of the image captured through the photographing lens, and the focus position selection unit determines that the imaging condition according to the setting instruction is over the glass. When imaging other than imaging is indicated, the in-focus position for the subject corresponding to the subject image having the maximum contrast in the image may be selected regardless of the presence or absence of the influence. Good.

また、前述した本発明に係る焦点検出装置において、当該撮影レンズを通して撮像される画像には当該画像を分割してなる複数の領域が定義されており、当該合焦位置検出手段は、各々の当該領域内の当該画像に表されている被写体像に対応する被写体についての当該合焦位置のうち当該撮影レンズから最至近の被写体についてのものを当該領域毎に検出し、当該合焦位置選択手段は、当該影響が有ると判定された場合に、当該領域毎に検出された各々の当該合焦位置のうち当該撮影レンズから最至近の被写体についてのものを除くいずれかの合焦位置を焦点検出の結果として選択する、ように構成してもよい。   In the focus detection apparatus according to the present invention described above, a plurality of regions obtained by dividing the image are defined in the image captured through the photographing lens, and the in-focus position detection means The in-focus position of the subject corresponding to the subject image represented in the image in the area is detected for the area closest to the subject from the taking lens, and the in-focus position selecting means If it is determined that there is an influence, focus detection is performed on any one of the in-focus positions detected for each area except for the object closest to the photographing lens. You may comprise so that it may select as a result.

なお、このときには、当該合焦位置検出手段は、当該影響が有ると判定された場合に、当該領域毎に検出された各々の当該合焦位置のうち二番目に当該撮影レンズから近い被写体についてのものを選択するように構成してもよい。
また、本発明の別の態様のひとつである焦点検出方法は、撮影レンズを通して撮像される画像に表される複数の被写体に当該撮影レンズを各々合焦させるときの当該撮影レンズの合焦位置を当該被写体毎に検出し、ガラス越しに行われた当該撮像に及ぼす当該ガラスの影響の有無を判定し、当該影響が有ると判定した場合に、当該被写体についての各々の当該合焦位置のうち当該撮影レンズから最至近の被写体についてのものを除くいずれかの合焦位置を焦点検出の結果として選択する、ことを特徴とすることにより、前述した課題を解決する。
At this time, when it is determined that the in-focus position detection unit has the influence, the in-focus position detection unit applies the second closest object to the photographing lens among the in-focus positions detected for each region. You may comprise so that a thing may be selected.
In addition, the focus detection method according to another aspect of the present invention provides a focus position of the photographic lens when the photographic lens is focused on each of a plurality of subjects represented in an image captured through the photographic lens. It is detected for each subject, and the presence or absence of the influence of the glass on the imaging performed through the glass is determined, and when it is determined that there is the influence, the focus position of each subject for the subject The above-described problem is solved by selecting any in-focus position as a result of focus detection except for the object closest to the photographic lens.

上述した特徴を有することにより、本発明によれば、ガラス越しでのオートフォーカス撮影が適切に行えるという効果を奏する。   By having the above-described characteristics, the present invention has an effect that the autofocus photographing through the glass can be appropriately performed.

以下、本発明の実施の形態を図面に基づいて説明する。
図1は本発明を実施するカメラの構成を示している。なお、このカメラはコントラスト方式によるオートフォーカス機能を備えている。
コントロール回路10は、CPU(Central Processing Unit :中央演算装置)と、このCPUによって実行される制御プログラムが予め格納されているROM(Read Only Memory:読み出し専用メモリ)とを備えており、CPUがこの制御プログラムをROMから読み出して実行することによって、このカメラ全体の動作制御を行う。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows the configuration of a camera that implements the present invention. This camera has an autofocus function using a contrast method.
The control circuit 10 includes a CPU (Central Processing Unit) and a ROM (Read Only Memory) in which a control program executed by the CPU is stored in advance. The operation control of the entire camera is performed by reading the control program from the ROM and executing it.

撮影レンズ11は被写体像を撮像素子12の表面に結像させる。
撮像素子12は例えばCCD(Charge Coupled Device:電荷結合素子)であり、被写体像が表されている光学像を電気信号に変換する。
A/D変換器13は、撮像素子12から出力されるアナログ信号である電気信号をデジタル信号に変換して被写体像が表されている画像を表現している画像データを出力する。
The photographing lens 11 forms a subject image on the surface of the image sensor 12.
The image sensor 12 is, for example, a CCD (Charge Coupled Device), and converts an optical image representing a subject image into an electrical signal.
The A / D converter 13 converts an electrical signal, which is an analog signal output from the image sensor 12, into a digital signal, and outputs image data representing an image representing a subject image.

ホワイトバランス補正回路14は、A/D変換器13から出力される画像データで表されている画像におけるいわゆるホワイトバランス、すなわち主に撮影環境における照明の影響によって生じる撮影画像の色彩の偏りを補正する。
Y/C分離生成回路15は、ホワイトバランス補正回路14から出力される、RGBの光の三原色の各々の輝度値で表現されている画像データのY/C(輝度−色差)成分による表現への変換処理を行う。
The white balance correction circuit 14 corrects a so-called white balance in the image represented by the image data output from the A / D converter 13, that is, a color deviation of the photographed image mainly caused by the influence of illumination in the photographing environment. .
The Y / C separation generation circuit 15 outputs the Y / C (luminance-color difference) component of the image data output from the white balance correction circuit 14 and represented by the luminance values of the three primary colors of RGB light. Perform the conversion process.

圧縮・伸張回路16は、Y/C分離生成回路15から出力される画像データに対してデータ圧縮処理を施し、また、メモリカード18に記録されている圧縮済みの画像データに対してデータ伸張処理を施す。
メモリカードI/F(インタフェース)17は、圧縮回路16によって圧縮された画像データ等の各種のデータのメモリカード18に対する書き込み・読み出しを制御する。
The compression / decompression circuit 16 performs data compression processing on the image data output from the Y / C separation generation circuit 15, and also performs data expansion processing on the compressed image data recorded in the memory card 18. Apply.
A memory card I / F (interface) 17 controls writing / reading of various data such as image data compressed by the compression circuit 16 to / from the memory card 18.

メモリカード18は、このカメラで撮影した画像を表している画像データ等各種のデータを記録して保存する。
表示部19は例えばLCD(Liquid Crystal Display:液晶表示装置)であり、撮影動作を行わせるための動作モードである撮影モードの設定がこのカメラに対してなされている場合には、撮像素子12によって撮像されている画像を表示する。また、メモリカード18に格納されている画像データの再生動作を行わせるための動作モードである再生モードの設定がこのカメラに対してなされている場合には、メモリカード18に記録されている画像データで表されている画像を表示する。また、これらの他に、このカメラに関する各種の情報を表示する。
The memory card 18 records and stores various data such as image data representing an image taken by the camera.
The display unit 19 is, for example, an LCD (Liquid Crystal Display), and when an imaging mode that is an operation mode for performing an imaging operation is set for the camera, the imaging device 12 The captured image is displayed. In addition, when the playback mode, which is an operation mode for performing the playback operation of the image data stored in the memory card 18, is set for this camera, the image recorded on the memory card 18 is displayed. Display the image represented by the data. In addition to these, various information about the camera is displayed.

DRAM(Dynamic Random Access Memory)20は、上述した各部で行われる各種の処理において、必要に応じて作業用メモリとして使用されるメモリである。
AF信号取得回路21は、撮像素子12の受光面における被写体像の合焦の程度を評価するための信号である、画像データにおける輝度信号の高周波成分を、A/D変換器13から出力される画像データから抽出して積分し、コントロール回路10へ与える。
A DRAM (Dynamic Random Access Memory) 20 is a memory that is used as a working memory as needed in various processes performed in the above-described units.
The AF signal acquisition circuit 21 outputs from the A / D converter 13 a high-frequency component of the luminance signal in the image data, which is a signal for evaluating the degree of focus of the subject image on the light receiving surface of the image sensor 12. Extracted from the image data, integrated, and supplied to the control circuit 10.

撮影レンズ駆動回路22は、コントロール回路10からの指示に応じて撮影レンズ11を変動させる。
撮像素子駆動回路23は、コントロール回路10の管理の下で撮像素子12を駆動させるための各種の信号を発生させる。
The taking lens driving circuit 22 varies the taking lens 11 in accordance with an instruction from the control circuit 10.
The image sensor drive circuit 23 generates various signals for driving the image sensor 12 under the control of the control circuit 10.

電源部24は、このカメラに内蔵の電池若しくは外部の電源から供給される電力の電圧を必要に応じて昇圧若しくは降圧し、パワースイッチ24aがオンとされるとコントロール回路10の管理の下でこのカメラの各構成要素に電力を供給する。
モード設定回路25はこのカメラの使用者(ユーザ)によって操作されるスイッチを備えており、このスイッチに対する操作に対応付けられている前述した動作モードの設定内容をコントロール回路10へ通知する。
The power supply unit 24 boosts or lowers the voltage of power supplied from a battery built in the camera or an external power supply as necessary. When the power switch 24a is turned on, the power switch 24a is controlled under the control of the control circuit 10. Power is supplied to each component of the camera.
The mode setting circuit 25 includes a switch operated by a user (user) of the camera, and notifies the control circuit 10 of the setting contents of the above-described operation mode associated with the operation on the switch.

なお、このカメラにおいては、大別して前述した撮影モード及び再生モードが動作モードとして定義されており、更に、撮影モードのひとつとしてショーウィンドウモードが定義されている。ショーウィンドウモードとは、例えばショーウィンドウで隔てられている被写体の撮影を行う場合などの、被写体をガラス越しで撮影する場合にユーザによって選択される撮影モードである。   In this camera, the above-described shooting mode and playback mode are defined as operation modes, and a show window mode is defined as one of the shooting modes. The show window mode is a shooting mode selected by the user when shooting a subject through glass, for example, when shooting a subject separated by a show window.

指示・操作部26はユーザによって操作される各種のスイッチを備えており、このスイッチに対する操作に対応付けられている使用者からの指示をコントロール回路10へ通知する。
図1に示したカメラは以上のように構成されている。
The instruction / operation unit 26 includes various switches operated by the user, and notifies the control circuit 10 of instructions from the user associated with operations on the switches.
The camera shown in FIG. 1 is configured as described above.

次に図2について説明する。同図は、図1に示したカメラで撮影動作を行う際にコントロール回路10によって行われる制御処理の処理内容を示すフローチャートである。
なお、同図に示す処理は、コントロール回路10のCPUがROMに格納されている前述した制御プログラムを実行することによって実現され、電源部24への電力の供給が開始されるとパワースイッチ24aの状態に関わらずその実行が開始される。
Next, FIG. 2 will be described. This figure is a flowchart showing the processing contents of the control processing performed by the control circuit 10 when performing the photographing operation with the camera shown in FIG.
The processing shown in the figure is realized by the CPU of the control circuit 10 executing the above-described control program stored in the ROM, and when the supply of power to the power supply unit 24 is started, the processing of the power switch 24a is performed. Its execution starts regardless of the state.

まず、S101において、パワースイッチ24aがオンとされたことが検出されたか否かを判定する処理が行われ、この検出がされるまでこの判定処理が繰り返される。
パワースイッチ24aがオンとされたことが検出されると、S102において、前述した動作モードの設定が既になされているか否かを判定する処理が行われる。ここで、動作モードの設定が既になされているのであればS103に処理を進める。一方、動作モードが未設定である場合には、動作モードの設定がなされるまで、このS102の処理を繰り返す。
First, in S101, it is determined whether or not it is detected that the power switch 24a is turned on, and this determination process is repeated until this detection is made.
When it is detected that the power switch 24a is turned on, in S102, a process for determining whether or not the above-described operation mode has been set is performed. If the operation mode has already been set, the process proceeds to S103. On the other hand, when the operation mode is not set, the process of S102 is repeated until the operation mode is set.

なお、以下の処理は、動作モードが撮影モードに設定されていたことを前提している。
S103では、ユーザが指示・操作部26のレリーズボタンを半押しして1stレリーズがされたか否か、すなわちユーザからの撮影準備動作の指示を取得したか否かを判定する処理が行われ、この指示を取得するまでこのS103の処理が繰り返される。
The following processing is based on the assumption that the operation mode is set to the shooting mode.
In S103, a process for determining whether or not the first release has been performed by half-pressing the release button of the instruction / operation unit 26, that is, whether or not an instruction for a shooting preparation operation from the user has been acquired, is performed. The process of S103 is repeated until an instruction is acquired.

S104では、このときの撮像素子12の出力信号に基づいてAE(Auto Exposure :自動露出調整)処理が行われる。
S105では、撮影モードの種類に応じたAF(Auto Focus)処理が行われる。この処理の詳細は後述する。
In S104, AE (Auto Exposure) processing is performed based on the output signal of the image sensor 12 at this time.
In S105, AF (Auto Focus) processing corresponding to the type of shooting mode is performed. Details of this processing will be described later.

S106では、ユーザが指示・操作部26のレリーズボタンを全押しして2ndレリーズがされたか否か、すなわちユーザからの撮影実行の指示を取得したか否かを判定する処理が行われ、この指示を取得したと判定されたならばS107に処理を進める。一方、この指示を取得していないと判定されたならば、S103へと処理を戻して上述した処理が繰り返される。   In S106, a process is performed to determine whether or not the user has fully pressed the release button of the instruction / operation unit 26 to release 2nd, that is, whether or not an instruction to execute shooting has been acquired from the user. If it is determined that the process is acquired, the process proceeds to S107. On the other hand, if it is determined that this instruction has not been acquired, the process returns to S103 and the above-described process is repeated.

S107では、このときにA/D変換器13から出力されている、撮像素子12で撮像された画像についての画像データをDRAM20に一旦格納させる処理が行われる。
S108では、前ステップの処理によって格納した画像データをDRAM20から読み出す処理が行われる。
In S107, processing for temporarily storing the image data of the image captured by the image sensor 12 output from the A / D converter 13 at this time in the DRAM 20 is performed.
In S108, a process for reading the image data stored in the process of the previous step from the DRAM 20 is performed.

S109では、前ステップの処理によって読み出した画像データをホワイトバランス補正回路14へ送付してその画像データで表されている画像のホワイトバランスを補正させる処理が行われる。
S110では、前ステップの処理によってホワイトバランスの補正処理が施された画像データをY/C分離生成回路15へ送付してその色表現をRGB成分表現からY/C成分表現へ変換させる処理が行われる。
In S109, the image data read out in the process of the previous step is sent to the white balance correction circuit 14, and the process of correcting the white balance of the image represented by the image data is performed.
In S110, the image data that has been subjected to the white balance correction process in the process of the previous step is sent to the Y / C separation generation circuit 15, and the color representation is converted from the RGB component representation to the Y / C component representation. Is called.

S111では、前ステップの処理による変換後の画像データを圧縮・伸張回路16へ送付してデータ圧縮させる処理が行われる。
S112では、前ステップの処理によってデータ圧縮がされた後の画像データをメモリカードI/F17へ送付してメモリカード18に記録させる処理が行われ、その後はこの図2に示した処理が終了する。
In S111, the image data after the conversion in the process of the previous step is sent to the compression / decompression circuit 16 to compress the data.
In S112, a process of sending the image data after data compression by the process of the previous step to the memory card I / F 17 and recording it on the memory card 18 is performed, and thereafter the process shown in FIG. .

次に図3について説明する。同図はAF処理の処理内容をフローチャートで示したものである。この処理は、図2に示した制御処理におけるS105の処理である。
まず、S201において、ユーザによる撮影モードの設定が具体的に何であったかを判別する処理が行われる。ここで、撮影モードとして前述したショーウィンドウモードが設定されていたならばS202においてショーウィンドウモード用のAF処理が行われる。一方、撮影モードである他のモードが設定されていたならばS203において、汎用の、すなわちショーウィンドウモード以外の撮影モード用のAF処理が行われる。
Next, FIG. 3 will be described. This figure shows the processing contents of the AF processing in a flowchart. This process is the process of S105 in the control process shown in FIG.
First, in S201, a process is performed to determine what the user has specifically set the shooting mode. Here, if the above-described show window mode is set as the shooting mode, AF processing for the show window mode is performed in S202. On the other hand, if another mode which is a shooting mode is set, in S203, a general-purpose, that is, AF processing for a shooting mode other than the show window mode is performed.

以上のS202若しくはS203の処理を終えた後には図3に示した処理が終了し、図2の制御処理へと処理が戻る。
次に図4について説明する。同図はショーウィンドウモード用AF処理の処理内容をフローチャートで示したものである。この処理は、図3におけるS202の処理である。
After finishing the process of S202 or S203 above, the process shown in FIG. 3 ends, and the process returns to the control process of FIG.
Next, FIG. 4 will be described. This figure is a flowchart showing the contents of the show window mode AF process. This process is the process of S202 in FIG.

まず、S301において、撮影レンズ駆動回路22を制御して撮影レンズ11を高速に駆動し、被写体側での合焦点が撮影レンズ11から最至近となる位置へ移動させる。
S302では、コントラスト方式によるオートフォーカス機能のための合焦位置越え判断が開始される。このオートフォーカスの動作について簡単に説明する。
First, in step S301, the photographing lens drive circuit 22 is controlled to drive the photographing lens 11 at a high speed, and the focal point on the subject side is moved to a position closest to the photographing lens 11.
In S302, the determination of exceeding the in-focus position for the autofocus function using the contrast method is started. The autofocus operation will be briefly described.

前述したように、AF信号取得回路21からは、撮影レンズ11を通して撮像素子12で撮像された画像における輝度信号の高周波成分が出力される。この高周波成分の量の大小はその画像のコントラストの高低に対応するとみなすことが可能である。一般に、コントラストの高い画像ほどより正確に合焦がされているとみなすことができる。そこで、コントロール回路10が撮影レンズ駆動回路22を制御して撮影レンズ11を移動させ、そのときにAF信号取得回路21より得られる前述した高周波成分の量が最大となったときの撮影レンズ11の位置を、その画像に表されている被写体に対する合焦位置として設定する。以上の動作が別名「山登り方式」などとも称されているコントラスト方式によるオートフォーカスの手法である。   As described above, the AF signal acquisition circuit 21 outputs a high-frequency component of a luminance signal in an image captured by the image sensor 12 through the photographing lens 11. It can be considered that the amount of the high-frequency component corresponds to the contrast level of the image. In general, it can be considered that a higher-contrast image is more accurately focused. Therefore, the control circuit 10 controls the photographic lens driving circuit 22 to move the photographic lens 11, and the photographic lens 11 when the amount of the high-frequency component obtained from the AF signal acquisition circuit 21 at that time becomes maximum is obtained. The position is set as the in-focus position for the subject represented in the image. The above operation is an autofocus method using a contrast method, which is also called “mountain climbing method”.

S302によって開始される合焦位置越え判断では、撮影レンズ駆動回路22を制御して被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させ、この移動の期間においてAF信号取得回路21から出力される信号が極大となったとき、すなわち撮像素子12で撮像された画像における輝度信号の高周波成分が極大となったときの撮影レンズ11の位置の情報を次々に検出して記録する。このようにして記録される撮影レンズ11の位置は、撮像素子12で撮像されている画像に含まれる複数の被写体の各々についての撮影レンズ11の合焦位置となる。   In the determination of exceeding the in-focus position started in S302, the photographic lens drive circuit 22 is controlled to move the photographic lens 11 from the position where the focal point on the subject side is closest to the position where it is farthest. Information on the position of the photographic lens 11 when the signal output from the AF signal acquisition circuit 21 during the period becomes maximum, that is, when the high-frequency component of the luminance signal in the image picked up by the image sensor 12 becomes maximum, one after another. To detect and record. The position of the photographic lens 11 recorded in this way is the focal position of the photographic lens 11 for each of a plurality of subjects included in the image captured by the image sensor 12.

また、ここで、被写体側での合焦点が最至近となる位置から最遠となる位置へ撮影レンズ11を移動させているので、撮像素子12で撮像されている画像に含まれる複数の被写体のうち撮影レンズ11に近いものについての合焦位置から順に検出がされる。
S303では、上述した合焦位置越え判断が完了したか否かを判定する処理が行われ、完了したと判定されたとき(判定結果がYesのとき)にはS304に処理を進める。一方、未だ完了していないと判定されたとき(判定結果がNoのとき)には、完了するまでこのS303の処理が繰り返される。
Here, since the photographing lens 11 is moved from the position where the in-focus point on the subject side is the closest to the position where the focal point is the farthest, a plurality of subjects included in the image captured by the image sensor 12 are detected. Among these, detection is performed in order from the in-focus position for the one close to the photographing lens 11.
In S303, a process for determining whether or not the above-mentioned in-focus position determination has been completed is performed. When it is determined that the determination has been completed (when the determination result is Yes), the process proceeds to S304. On the other hand, when it is determined that the process has not been completed yet (when the determination result is No), the process of S303 is repeated until the process is completed.

S304では、合焦位置越え判断を失敗したか否か、すなわち撮影レンズ11の位置を移動させてもAF信号取得回路21の出力信号の極大を検出できなかったか否かを判定する処理が行われる。ここで、合焦位置越え判断を失敗したと判定したとき(判定結果がYesのとき)には、S305としてエラー処理、例えばオートフォーカスの失敗を表示部19に表示してユーザに通知する処理が行われ、図2の制御処理を一旦終了する。一方、合焦位置越え判断の失敗ではないと判定したとき(判定結果がNoのとき)、すなわち、AF信号取得回路21の出力信号の極大を検出できたときにはS306に処理を進める。   In S304, processing is performed to determine whether or not the in-focus position determination has failed, that is, whether or not the maximum of the output signal of the AF signal acquisition circuit 21 has not been detected even when the position of the photographing lens 11 is moved. . Here, when it is determined that the in-focus position determination is unsuccessful (when the determination result is Yes), in S305, an error process, for example, a process of displaying the autofocus failure on the display unit 19 and notifying the user is performed. The control process of FIG. 2 is once ended. On the other hand, when it is determined that the in-focus position excess determination is not a failure (when the determination result is No), that is, when the maximum of the output signal of the AF signal acquisition circuit 21 can be detected, the process proceeds to S306.

なお、上述したS302からS305の処理において、被写体側での合焦点が最至近となる位置から撮影レンズ11を所定の移動量だけ移動させても、この移動の期間においてAF信号取得回路21の出力信号の極大を検出できなかった場合には、被写体側での合焦点が最遠となる位置まで撮影レンズ11を更に移動させることなく合焦位置越え判断を打ち切り、合焦位置越え判断の失敗と判定してエラー処理を行うようにしてもよい。このようにすることにより、合焦位置越え判断に要する時間が短縮される。   In the above-described processing from S302 to S305, even if the photographing lens 11 is moved by a predetermined movement amount from the position where the focal point on the subject side is closest, the output of the AF signal acquisition circuit 21 during this movement period. If the signal maximum cannot be detected, the determination of exceeding the in-focus position is aborted without further moving the photographing lens 11 to the position where the in-focus point on the subject side is farthest, and it is determined that the in-focus position determination has failed. An error process may be performed after determination. By doing so, the time required for the determination of exceeding the in-focus position is shortened.

S306では、撮像素子12で現在撮像されている画像の輝度を検出し、この輝度値が所定値以下であるか否か(すなわち、その画像の明るさが暗いか否か)を判定する処理が行われる。
ここで、輝度値が所定値以下であると判定されたとき(判定結果がYesのとき)には、S307において、前述した合焦位置越え判断において検出された撮影レンズ11の合焦位置のうち最至近の被写体についてのもの、すなわち、前述した合焦位置越え判断において、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させて検出した合焦位置のうち最初に検出されたものを選択し、撮影レンズ駆動回路22を制御して選択された合焦位置へ撮影レンズ11を移動させる処理が行われる。
In S306, processing is performed to detect the brightness of the image currently captured by the image sensor 12 and determine whether the brightness value is equal to or lower than a predetermined value (that is, whether the brightness of the image is dark). Done.
Here, when it is determined that the luminance value is equal to or less than the predetermined value (when the determination result is Yes), in S307, out of the in-focus positions of the photographing lens 11 detected in the above-described in-focus position determination. For the closest subject, that is, in the in-focus position determination described above, the in-focus position detected by moving the photographic lens 11 from the closest position to the farthest position on the subject side. Of these, the first detected one is selected, and the photographing lens drive circuit 22 is controlled to move the photographing lens 11 to the selected in-focus position.

一方、S306において、輝度値が上述した所定値よりも大きいと判定されたとき(判定結果がNoのとき)には、S308において、前述した合焦位置越え判断において検出された撮影レンズ11の合焦位置のうち二番目に近い被写体についてのもの、すなわち、前述した合焦位置越え判断において、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させて検出した合焦位置のうち二番目に検出されたものを選択し、撮影レンズ駆動回路22を制御して選択された合焦位置へ撮影レンズ11を移動させる処理が行われる。   On the other hand, when it is determined in S306 that the luminance value is larger than the predetermined value described above (when the determination result is No), in S308, the alignment of the photographing lens 11 detected in the above-described in-focus position determination is determined. For the subject closest to the focus position, that is, in the above-described determination of exceeding the focus position, the photographic lens 11 is moved from the position where the focus on the subject side is the closest to the position where the focus is farthest. A process is performed in which the second detected one of the detected in-focus positions is selected, and the photographic lens 11 is moved to the selected in-focus position by controlling the photographic lens driving circuit 22.

以上のS307若しくはS308の処理を終えた後には図4に示した処理が終了し、図3へと処理が戻る。
このS306からS308にかけての処理について、図5及び図6を用いて更に説明する。
After finishing the process of S307 or S308, the process shown in FIG. 4 is finished, and the process returns to FIG.
The processing from S306 to S308 will be further described with reference to FIGS.

図5において、(a)は、撮像素子12で撮像されている画像の輝度が十分明るく、S306の判定結果がNoとなる撮影場面の例を示している。この例は、ガラスであるショーウィンドウ33を隔てた明るい室内に位置している人物32を、夜間で暗い室外に位置しているユーザ31がカメラ30でガラス越しに撮影する場面である。   In FIG. 5, (a) shows an example of a shooting scene in which the brightness of the image captured by the image sensor 12 is sufficiently bright and the determination result in S306 is No. This example is a scene in which a user 31 located outside a dark room at night captures a person 32 located in a bright room across a show window 33 made of glass with a camera 30 through the glass.

この場面において、ユーザ31がカメラ30の光学ファインダ(光路が撮影レンズ11を通らないもの)を通して見る画を図5(b)に示す。この画には、ショーウィンドウ33に記されている文字34が、ショーウィンドウ33を透過して見える人物32と共に表されている。なお、この場合には、人物32の位置している室内が(a)においてユーザ31の背後の遠方に位置している景色(背景35)よりも極めて明るいので、背景35がショーウィンドウ33で反射して図5(b)の画に映り込むことはない。   FIG. 5B shows an image viewed by the user 31 through the optical viewfinder (the optical path does not pass through the photographing lens 11) of the camera 30 in this scene. In this image, characters 34 written on the show window 33 are shown together with a person 32 that can be seen through the show window 33. In this case, since the room in which the person 32 is located is extremely brighter than the scenery (background 35) located far behind the user 31 in (a), the background 35 is reflected by the show window 33. Thus, it does not appear in the image of FIG.

図5(c)は、図5(a)の場面における、カメラ30の撮影レンズ11の位置と、その撮影レンズ11を通して撮像素子12で撮像された画像のコントラストとの関係を示している。図5(c)において、横軸は、右端で被写体側での合焦点が最至近となるときの撮影レンズ11の位置を示しており、左端で最遠となる撮影レンズ11の位置を示している。また、縦軸はその画像のコントラストを示しており、上に向かうほどそのコントラストが高いこと、すなわちAF信号取得回路21から出力される信号のレベルが大きいことを示している。   FIG. 5C shows the relationship between the position of the photographic lens 11 of the camera 30 and the contrast of an image captured by the image sensor 12 through the photographic lens 11 in the scene of FIG. In FIG. 5C, the horizontal axis indicates the position of the photographing lens 11 when the focal point on the subject side is closest to the right end, and indicates the position of the photographing lens 11 that is farthest on the left end. Yes. The vertical axis indicates the contrast of the image. The higher the value is, the higher the contrast is, that is, the higher the level of the signal output from the AF signal acquisition circuit 21 is.

図5(c)に示されているように、図5(a)の場面においては、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させると2点でコントラストが極大となる。一方、(b)より、撮影レンズ11を通して撮像素子12で撮像されている画像には、文字34と人物32とが表されていることが分かる。   As shown in FIG. 5 (c), in the scene of FIG. 5 (a), when the photographing lens 11 is moved from the position where the in-focus point on the subject side is closest to the position where it is farthest, 2 is obtained. Contrast is maximized at a point. On the other hand, from (b), it can be seen that the character 34 and the person 32 are represented in the image captured by the image sensor 12 through the photographing lens 11.

ここで、(a)におけるカメラ30に対する文字34と人物32との位置関係を考慮すると、(c)におけるコントラストの極大点のうちで被写体側での合焦点が近い方(すなわち最至近のもの)は文字34に対する撮影レンズ11の合焦位置であり、遠い方(すなわち二番目に近いもの)は人物32に対する撮影レンズ11の合焦位置であることが分かる。従って、ショーウィンドウ33越しの人物32に合焦させるためには、撮影レンズ11の合焦位置のうち最至近の被写体についてのもの(すなわちショーウィンドウ33の文字34についてのもの)を無視し、二番目に近い被写体についてのものを選択すればよい。   Here, when the positional relationship between the character 34 and the person 32 with respect to the camera 30 in (a) is considered, among the maximum points of contrast in (c), the one with the closest focal point on the subject side (that is, the closest one) Is the focus position of the photographic lens 11 with respect to the character 34, and the far side (that is, the second closest one) is the focus position of the photographic lens 11 with respect to the person 32. Therefore, in order to focus on the person 32 through the show window 33, the object closest to the subject (that is, the character 34 of the show window 33) out of the focus position of the photographic lens 11 is ignored. You can select the one for the closest subject.

図4の処理においては、図5(a)の場面ではS306の判定結果がNoとなってS308の処理が実行されるので、人物32に合焦させる合焦位置に撮影レンズ11を移動させる。この結果、文字34にではなく、人物32に適切に合焦した画像の撮影が行われる。   In the process of FIG. 4, since the determination result of S306 is No and the process of S308 is executed in the scene of FIG. 5A, the photographing lens 11 is moved to the in-focus position where the person 32 is focused. As a result, an image in which the person 32 is properly focused, not the character 34, is captured.

次に図6について説明する。
図6において、(a)は、撮像素子12で撮像されている画像の輝度が十分暗く、S306の判定結果がYesとなる撮影場面の例を示している。この例は、ガラスであるショーウィンドウ33を隔てた暗い室内に位置している人物32を、昼間で明るい室外に位置しているユーザ31がカメラ30でガラス越しに撮影する場面である。
Next, FIG. 6 will be described.
6A illustrates an example of a shooting scene in which the brightness of an image captured by the image sensor 12 is sufficiently dark and the determination result in S306 is Yes. This example is a scene in which a user 31 located outside a bright room in the daytime takes a picture of a person 32 located in a dark room across a glass window with a camera 30 through a show window 33 made of glass.

この場面において、ユーザ30が前述したものと同様の光学ファインダを通して見る画を図6(b)に示す。この画には、ユーザ31の背後の遠方に位置している背景35がショーウィンドウ33で反射し、ショーウィンドウ33を透過して見える人物32と共に表されている。このとき、ショーウィンドウ33に記されている文字34は、背景35の反射像に融け込んでしまい、不明瞭な像となっている。   FIG. 6B shows an image viewed by the user 30 through the same optical viewfinder as that described above in this scene. In this image, a background 35 located far behind the user 31 is shown with a person 32 reflected by the show window 33 and seen through the show window 33. At this time, the characters 34 written on the show window 33 are melted into the reflected image of the background 35, resulting in an unclear image.

なお、ショーウィンドウ33はほぼ透明なガラスであるので、ショーウィンドウ33による反射によってカメラ10に入射する背景35の輝度は決して高いものではない。
図6(c)は、図6(a)の場面における、カメラ30の撮影レンズ11の位置と、その撮影レンズ11を通して撮像素子12で撮像された画像のコントラストとの関係を示している。なお、図6(c)における横軸及び縦軸の意味は図5(c)と同様のものである。
Since the show window 33 is substantially transparent glass, the brightness of the background 35 incident on the camera 10 due to reflection by the show window 33 is not high.
FIG. 6C shows the relationship between the position of the photographic lens 11 of the camera 30 and the contrast of an image captured by the image sensor 12 through the photographic lens 11 in the scene of FIG. The meanings of the horizontal and vertical axes in FIG. 6C are the same as those in FIG.

図6(c)に示されているように、図6(a)の場面においても、図5(a)の場面と同様、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させると2点でコントラストが極大となる。一方、図6(b)より、撮影レンズ11を通して撮像素子12で撮像されている画像には、背景35の反射像と人物32とが表されていることが分かる。   As shown in FIG. 6C, in the scene of FIG. 6A as well, as in the scene of FIG. 5A, the focal point on the subject side is farthest from the closest position. When the photographing lens 11 is moved to the position, the contrast becomes maximum at two points. On the other hand, it can be seen from FIG. 6B that the reflected image of the background 35 and the person 32 are represented in the image captured by the image sensor 12 through the photographing lens 11.

ここで、(a)におけるカメラ30に対する背景35と人物32との位置関係を考慮すると、(c)におけるコントラストの極大点のうちで被写体側での合焦点が近い方(すなわち最至近のもの)は人物32に対する撮影レンズ11の合焦位置であり、遠い方(すなわち二番目に近いもの)は背景35に対する撮影レンズ11の合焦位置であることが分かる。従って、ショーウィンドウ33越しの人物32に合焦させるためには、撮影レンズ11の合焦位置のうち最至近の被写体についてのものを選択すればよい。   Here, when the positional relationship between the background 35 and the person 32 with respect to the camera 30 in (a) is taken into consideration, among the maximum contrast points in (c), the one with the closest focal point on the subject side (that is, the closest one). Is the in-focus position of the taking lens 11 with respect to the person 32, and the far side (that is, the second closest one) is the in-focus position of the taking lens 11 with respect to the background 35. Therefore, in order to focus on the person 32 through the show window 33, it is only necessary to select the closest subject among the in-focus positions of the taking lens 11.

図4の処理においては、図6(a)の場面ではS306の判定結果がYesとなってS307の処理が実行されるので、人物32に合焦させる合焦位置に撮影レンズ11を移動させる。この結果、ショーウィンドウ33に映っている背景35にではなく、人物32に適切に合焦した画像の撮影が行われる。   In the process of FIG. 4, in the scene of FIG. 6A, the determination result in S <b> 306 is Yes and the process in S <b> 307 is executed, so the photographing lens 11 is moved to the in-focus position where the person 32 is focused. As a result, not the background 35 shown in the show window 33 but an image in which the person 32 is properly focused is photographed.

以上のように、図4に示したショーウィンドウモード用のAF処理では、S306の処理においてショーウィンドウ33越しの撮像がショーウィンドウ33の影響を受けるか否かを撮像素子12で現在撮像されている画像の明るさに基づいて判定する。ここで、影響を受けると判定された場合には、S308の処理において、撮影レンズ11の合焦位置のうち最至近の被写体についてのもの(すなわちショーウィンドウ33の文字34についてのもの)以外の合焦位置を選択して撮影レンズ11を移動させる。この結果、ガラス越しでのオートフォーカス撮影が適切なものとなる。   As described above, in the AF processing for the show window mode shown in FIG. 4, whether or not the imaging through the show window 33 is affected by the show window 33 in the processing of S306 is currently imaged by the image sensor 12. The determination is based on the brightness of the image. Here, if it is determined to be affected, in the process of S308, an adjustment other than that for the closest subject among the in-focus positions of the taking lens 11 (that is, for the character 34 of the show window 33). The focal position is selected and the photographing lens 11 is moved. As a result, autofocus photography through glass is appropriate.

次に図7について説明する。同図はショーウィンドウモード以外の汎用AF処理の処理内容をフローチャートで示したものである。この処理は、図3におけるS203の処理である。
まず、S401において、方向判断処理が開始される。方向判断処理は、撮影レンズ駆動回路22を制御して撮影レンズ11をわずかに駆動したときに得られるAF信号取得回路21の出力信号の大小変化に基づき、撮影レンズ11の現在の位置に対して至近側と望遠側とのどちらの方向へ移動させればコントラストが高くなるか(AF信号取得回路21の出力信号のレベルが大きくなるか)を判断する処理である。
Next, FIG. 7 will be described. This figure is a flowchart showing the contents of general AF processing other than the show window mode. This process is the process of S203 in FIG.
First, in S401, a direction determination process is started. The direction determination process is based on the change in the output signal of the AF signal acquisition circuit 21 obtained when the photographing lens drive circuit 22 is controlled to slightly drive the photographing lens 11 with respect to the current position of the photographing lens 11. This is a process for determining in which direction of the close side or the telephoto side the contrast increases (whether the level of the output signal of the AF signal acquisition circuit 21 increases).

S402では、上述した方向判断が完了したか否かを判定する処理が行われ、完了したと判定されたとき(判定結果がYesのとき)にはS405に処理を進める。
一方、未だ完了していないと判定されたとき(判定結果がNoのとき)には、S403において、この方向判断を失敗したか否か、すなわち撮影レンズ11の位置を移動させてもAF信号取得回路21の出力信号の変化を検出できなかったか否かを判定する処理が行われる。ここで、この方向判断を失敗したと判定したとき(判定結果がYesのとき)には、S404としてエラー処理、例えばオートフォーカスの失敗を表示部19に表示してユーザに通知する処理が行われ、図2の制御処理を一旦終了する。一方、この方向判断の失敗ではないと判定したとき(判定結果がNoのとき)、例えばこの方向判断が未完であるときには、S402へと処理を戻して上述した処理が繰り返される。
In S402, a process for determining whether or not the above-described direction determination is completed is performed. When it is determined that the determination is completed (when the determination result is Yes), the process proceeds to S405.
On the other hand, when it is determined that it has not been completed yet (when the determination result is No), whether or not this direction determination has failed in S403, that is, even if the position of the photographing lens 11 is moved, an AF signal is acquired. A process is performed to determine whether or not a change in the output signal of the circuit 21 could not be detected. Here, when it is determined that the direction determination has failed (when the determination result is Yes), an error process is performed as S404, for example, a process of displaying the autofocus failure on the display unit 19 and notifying the user is performed. Then, the control process of FIG. On the other hand, when it is determined that this direction determination is not a failure (when the determination result is No), for example, when this direction determination is incomplete, the processing is returned to S402 and the above-described processing is repeated.

S405では、コントラスト方式によるオートフォーカス機能のための合焦位置越え判断が開始され、続くS406において、上述した合焦位置越え判断が完了したか否かを判定する処理が行われる。この合焦位置越え判断については、図4におけるS302からS303にかけてのものと同様であるが、撮影レンズ11の合焦位置の検出結果と共に、その合焦位置においての、撮像素子12で撮像された画像における輝度信号の高周波成分の極大値を併せて記録しておく。   In S405, determination of exceeding the in-focus position for the autofocus function using the contrast method is started, and in subsequent S406, processing for determining whether or not the above-described in-focus position excess determination is completed is performed. This in-focus position excess determination is the same as that in S302 to S303 in FIG. 4, but the image is picked up by the image sensor 12 at the in-focus position along with the detection result of the in-focus position of the taking lens 11. The maximum value of the high frequency component of the luminance signal in the image is also recorded.

S406の判定処理において、合焦位置越え判断が完了したと判定されたとき(判定結果がYesのとき)にはS407に処理を進める。一方、未だ完了していないと判定されたとき(判定結果がNoのとき)には、完了するまでこのS406の処理が繰り返される。
S407では、合焦位置越え判断を失敗したか否か、すなわち撮影レンズ11の位置を移動させてもAF信号取得回路21の出力信号の極大を検出できなかったか否かを判定する処理が行われる。
In the determination process of S406, when it is determined that the in-focus position excess determination is completed (when the determination result is Yes), the process proceeds to S407. On the other hand, when it is determined that the process has not been completed yet (when the determination result is No), the process of S406 is repeated until the process is completed.
In S407, a process is performed to determine whether or not the in-focus position determination has failed, that is, whether or not the output signal maximum of the AF signal acquisition circuit 21 has not been detected even if the position of the photographing lens 11 is moved. .

ここで、合焦位置越え判断を失敗したと判定したとき(判定結果がYesのとき)には、S408としてエラー処理、例えばオートフォーカスの失敗を表示部19に表示してユーザに通知する処理が行われ、図2の制御処理を一旦終了する。一方、合焦位置越え判断の失敗ではないと判定したとき(判定結果がNoのとき)、すなわち、AF信号取得回路21の出力信号の極大を検出できたときにはS409に処理を進める。   If it is determined that the in-focus position excess determination has failed (when the determination result is Yes), an error process is performed in S408, for example, a process of displaying a failure of autofocus on the display unit 19 and notifying the user. The control process of FIG. 2 is once ended. On the other hand, when it is determined that the in-focus position excess determination is not a failure (when the determination result is No), that is, when the maximum of the output signal of the AF signal acquisition circuit 21 can be detected, the process proceeds to S409.

S409では、前述した合焦位置越え判断において検出された撮影レンズ11の合焦位置のうち、撮像素子12で撮像された画像のコントラストが最高であったもの、すなわちその画像における輝度信号の高周波成分の極大値が最大であったものを選択し、撮影レンズ駆動回路22を制御して選択された合焦位置へ撮影レンズ11を移動させる処理が行われる。その後は図7に示した処理が終了し、図3へと処理が戻る。   In S409, the in-focus position of the photographing lens 11 detected in the above-described in-focus position determination has the highest contrast of the image captured by the image sensor 12, that is, the high-frequency component of the luminance signal in the image. Is selected and the photographing lens drive circuit 22 is controlled to move the photographing lens 11 to the selected in-focus position. Thereafter, the processing shown in FIG. 7 ends, and the processing returns to FIG.

図1におけるコントロール回路10が以上の処理を行うことにより、図1に示したカメラで本発明に係るオートフォーカス機能を使用した画像の撮影が可能となる。
次に、撮像画像の複数の領域の各々に含まれる被写体に対して撮影レンズ11の合焦位置を別個に検出する、いわゆるマルチAF方式を用いる場合に本発明を実施する実施形態について説明する。
When the control circuit 10 in FIG. 1 performs the above processing, the camera shown in FIG. 1 can take an image using the autofocus function according to the present invention.
Next, an embodiment in which the present invention is implemented in the case of using a so-called multi-AF method in which the focus position of the photographing lens 11 is separately detected for a subject included in each of a plurality of regions of a captured image will be described.

この実施形態に係るカメラの構成は、図1に示したものと同様のものであるのでその説明は省略する。また、この構成のカメラでマルチAF方式を用いた撮影動作を行う際にコントロール回路10によって行われる制御処理の処理内容についても、図3におけるS202のショーウィンドウモード用のAF処理とS203のショーウィンドウモード以外の撮影モード用の汎用AF処理とを除けば、図2及び図3にフローチャートで示したものと同様であるのでこれらの説明についても省略する。   Since the configuration of the camera according to this embodiment is the same as that shown in FIG. 1, the description thereof is omitted. Further, regarding the processing contents of the control processing performed by the control circuit 10 when performing the photographing operation using the multi-AF method with the camera having this configuration, the AF processing for the show window mode in S202 and the show window in S203 in FIG. Except for the general-purpose AF processing for shooting modes other than the mode, the processing is the same as that shown in the flowcharts in FIGS.

ここで図8について説明する。同図はマルチAF時において図3におけるS202の処理として実行される、ショーウィンドウモード用マルチAF処理の処理内容をフローチャートで示したものである。
まず、S311において、撮影レンズ駆動回路22を制御して撮影レンズ11を高速に駆動し、被写体側での合焦点が撮影レンズ11から最至近となる位置へ移動させる。
Here, FIG. 8 will be described. This figure is a flowchart showing the contents of the show window mode multi-AF process executed as the process of S202 in FIG. 3 during multi-AF.
First, in step S311, the photographing lens driving circuit 22 is controlled to drive the photographing lens 11 at a high speed, and the focal point on the subject side is moved to a position closest to the photographing lens 11.

S312では、前述したものと同様のコントラスト方式によるオートフォーカス機能のための合焦位置越え判断が、撮像素子12での撮像画像に対して予め定義されている領域(マルチAFエリア)毎に開始される。但し、この合焦位置越え判断においては、撮影レンズ駆動回路22を制御して被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させ、この移動の期間においてAF信号取得回路21から出力される信号が最初に極大となったとき、すなわち撮像素子12で撮像された画像における輝度信号の高周波成分が最初に極大となったときの撮影レンズ11の位置の情報をマルチAFエリア毎に次々に検出して記録する。このようにして記録される撮影レンズ11の位置は、撮像素子12で撮像されている画像における各マルチAFエリアに含まれる最至近の被写体についての撮影レンズ11の合焦位置となる。   In S <b> 312, determination of exceeding the in-focus position for the autofocus function using the same contrast method as described above is started for each region (multi-AF area) defined in advance for the image captured by the image sensor 12. The However, in this in-focus position determination, the photographic lens drive circuit 22 is controlled to move the photographic lens 11 from the position where the focal point on the subject side is closest to the farthest position, and this period of movement. The position of the photographic lens 11 when the signal output from the AF signal acquisition circuit 21 first reaches a maximum, that is, when the high-frequency component of the luminance signal in the image captured by the image sensor 12 first reaches the maximum. Information is sequentially detected and recorded for each multi-AF area. The position of the photographic lens 11 recorded in this way is the focal position of the photographic lens 11 for the closest subject included in each multi-AF area in the image captured by the image sensor 12.

S313では、上述した合焦位置越え判断を全てのマルチAFエリアで完了したか否かを判定する処理が行われ、完了したと判定されたとき(判定結果がYesのとき)にはS314に処理を進める。一方、未だ完了していないと判定されたとき(判定結果がNoのとき)には、完了するまでこのS313の処理が繰り返される。   In S313, a process for determining whether or not the above-described in-focus position determination has been completed in all the multi-AF areas is performed. When it is determined that the determination has been completed (when the determination result is Yes), the process proceeds to S314. To proceed. On the other hand, when it is determined that the process has not been completed yet (when the determination result is No), the process of S313 is repeated until the process is completed.

S314では、合焦位置越え判断を全てのマルチAFエリアで失敗したか否か、すなわち、撮影レンズ11の位置を移動させてもAF信号取得回路21の出力信号の極大を全てのマルチAFエリアで検出できなかったか否かを判定する処理が行われる。ここで、全てのマルチAFエリアで合焦位置越え判断を失敗したと判定したとき(判定結果がYesのとき)には、S315としてエラー処理、例えばオートフォーカスの失敗を表示部19に表示してユーザに通知する処理が行われ、図2の制御処理を一旦終了する。一方、合焦位置越え判断を失敗していないと判定したとき(判定結果がNoのとき)、すなわち、いずれかのマルチAFエリアでAF信号取得回路21の出力信号の極大を検出できたときにはS316に処理を進める。   In S314, whether or not the in-focus position determination has failed in all the multi-AF areas, that is, the maximum of the output signal of the AF signal acquisition circuit 21 is detected in all the multi-AF areas even if the position of the photographing lens 11 is moved. A process is performed to determine whether or not it could be detected. Here, when it is determined that the in-focus position excess determination has failed in all the multi-AF areas (when the determination result is Yes), error processing such as autofocus failure is displayed on the display unit 19 in S315. A process of notifying the user is performed, and the control process of FIG. On the other hand, when it is determined that the in-focus position excess determination has not failed (when the determination result is No), that is, when the maximum of the output signal of the AF signal acquisition circuit 21 can be detected in any multi-AF area, S316. Proceed with the process.

S316では、撮像素子12で現在撮像されている画像の輝度を検出し、この輝度値が所定値以下であるか否か(すなわち、その画像の明るさが暗いか否か)を判定する処理が行われる。
ここで、輝度値が所定値以下であると判定されたとき(判定結果がYesのとき)には、S317において、前述した合焦位置越え判断において検出されたマルチAFエリア毎に最至近である被写体についての撮影レンズ11の合焦位置のうち撮影レンズ11に最至近である被写体についてのもの、すなわち、前述した合焦位置越え判断において、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させてマルチAFエリア毎に検出した合焦位置のうち最初に検出されたものを選択し、撮影レンズ駆動回路22を制御して選択された合焦位置へ撮影レンズ11を移動させる処理が行われ、その後はS319に処理を進める。
In S316, a process of detecting the brightness of the image currently captured by the image sensor 12 and determining whether the brightness value is equal to or less than a predetermined value (that is, whether the brightness of the image is dark). Done.
Here, when it is determined that the luminance value is equal to or smaller than the predetermined value (when the determination result is Yes), in S317, the multiple AF areas detected in the above-described in-focus position determination are closest to each other. Of the in-focus position of the photographic lens 11 with respect to the subject, the one closest to the photographic lens 11, that is, in the above-described determination of exceeding the in-focus position, the position on the subject side from the position where the in-focus point is closest. The photographic lens 11 is moved to a far position and the first detected one of the in-focus positions detected for each multi-AF area is selected, and the photographic lens driving circuit 22 is controlled to reach the selected in-focus position. A process for moving the photographic lens 11 is performed, and then the process proceeds to S319.

一方、S316において、輝度値が上述した所定値よりも大きいと判定されたとき(判定結果がNoのとき)には、S318において、前述した合焦位置越え判断において検出されたマルチAFエリア毎に最至近の撮影レンズ11の合焦位置のうち二番目に近い被写体についてのもの、すなわち、前述した合焦位置越え判断において、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させてマルチAFエリア毎に検出した合焦位置のうち二番目に検出されたものを選択し、撮影レンズ駆動回路22を制御して選択された合焦位置へ撮影レンズ11を移動させる処理が行われる。   On the other hand, when it is determined in S316 that the luminance value is larger than the predetermined value described above (when the determination result is No), in S318, for each multi-AF area detected in the above-described in-focus position determination. Among the in-focus positions of the closest photographing lens 11, the object closest to the second object, that is, the position where the in-focus position on the object side is farthest from the closest position in the above-described in-focus position determination. Of the in-focus position detected for each multi-AF area is selected, and the second detected one is selected, and the photographic lens drive circuit 22 is controlled to the selected in-focus position. The process of moving is performed.

S319では、S317若しくはS318の処理によって選択された合焦位置の検出がされていたマルチAFエリアを示す枠を、表示部19で表示中の撮像素子12の撮像画像に重畳表示させる処理が行われ、その後は図8に示した処理が終了し、図3へと処理が戻る。   In S319, a process of superimposing and displaying a frame indicating the multi-AF area in which the in-focus position selected in the process of S317 or S318 has been detected on the captured image of the image sensor 12 being displayed on the display unit 19 is performed. Thereafter, the processing shown in FIG. 8 ends, and the processing returns to FIG.

このS316からS319にかけての処理について、図9から図13の各図を用いて更に説明する。
まず図9について説明する。同図は撮像素子12による撮像画像に対するマルチAFエリアの定義例である。以下の説明においては、マルチAFエリアが同図に示すように定義されているものとする。
The processing from S316 to S319 will be further described with reference to FIGS.
First, FIG. 9 will be described. The figure shows an example of definition of a multi-AF area for an image captured by the image sensor 12. In the following description, it is assumed that the multi-AF area is defined as shown in FIG.

次に図10及び図11について説明する。
図10(a)は、撮像素子12で撮像されている画像の輝度が十分明るく、S316の判定結果がNoとなる撮影場面において、ユーザ31がカメラ30の光学ファインダ(光路が撮影レンズ11を通らないもの)を通して見る画の例を示している。なお、この撮影場面は、図5(a)と同一のものを想定している。
Next, FIGS. 10 and 11 will be described.
In FIG. 10A, in the shooting scene in which the brightness of the image captured by the image sensor 12 is sufficiently bright and the determination result in S316 is No, the user 31 passes through the optical viewfinder of the camera 30 (the optical path passes through the shooting lens 11). This is an example of a picture viewed through This shooting scene is assumed to be the same as that shown in FIG.

図10(a)に示されている画には、ショーウィンドウ33に記されている文字34が、ショーウィンドウ33を透過して見える人物32と共に表されている。なお、この場合には、人物32の位置している室内が図5(a)においてユーザ31の背後の遠方に位置している景色(背景35)よりも極めて明るいので、背景35がショーウィンドウ33で反射して図10(a)の画に映り込むことはない。   In the image shown in FIG. 10A, the characters 34 written on the show window 33 are shown together with the person 32 seen through the show window 33. In this case, since the room in which the person 32 is located is extremely brighter than the scenery (background 35) located far behind the user 31 in FIG. 5A, the background 35 is the show window 33. And is not reflected in the image of FIG.

ここで図11について説明する。同図は、図10(a)の画が得られる撮影場面における、カメラ30の撮影レンズ11の位置と、その撮影レンズ11を通して撮像素子12で撮像された画像のコントラストとの関係を、図9に示したマルチAFエリア毎に示している。   Here, FIG. 11 will be described. FIG. 9 shows the relationship between the position of the photographic lens 11 of the camera 30 and the contrast of the image captured by the image sensor 12 through the photographic lens 11 in the photographic scene where the image of FIG. Each multi-AF area shown in FIG.

図11の各図において、横軸は、右端で被写体側での合焦点が最至近となるときの撮影レンズ11の位置を示しており、左端で最遠となる撮影レンズ11の位置を示している。また、縦軸は各マルチAFエリア内の撮像画像のコントラストを示しており、上に向かうほどそのコントラストが高いこと、すなわちAF信号取得回路21から出力される信号のレベルが大きいことを示している。   11, the horizontal axis indicates the position of the photographing lens 11 when the focal point on the subject side is closest to the right end, and indicates the position of the photographing lens 11 that is farthest on the left end. Yes. The vertical axis indicates the contrast of the captured image in each multi-AF area, and the higher the contrast is, the higher the level of the signal output from the AF signal acquisition circuit 21 is. .

図11の各図について検討する。
図10(a)の画が得られる撮影場面においては、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させると、エリア(2)、(7)、(8)、及び(9)の各マルチAFエリアでは1点でコントラストが極大となり、この極大における撮影レンズ11の位置はいずれも人物32に対する合焦位置である。また、エリア(5)のマルチAFエリアでは2点でコントラストが極大となり、この極大における撮影レンズ11の位置で合焦する被写体のうち最至近のものは文字34である。一方、エリア(1)、(3)、(4)、及び(6)の各マルチAFエリアではコントラストの極大が検出されない。
Consider each figure in FIG.
In the shooting scene in which the image of FIG. 10A is obtained, if the shooting lens 11 is moved from the position where the focal point on the subject side is closest to the position where it is farthest, areas (2) and (7) In the multi-AF areas of (8) and (9), the contrast becomes maximum at one point, and the position of the photographing lens 11 at this maximum is the in-focus position with respect to the person 32. Further, in the multi-AF area of area (5), the contrast becomes maximum at two points, and the closest object among the subjects focused at the position of the photographing lens 11 at this maximum is the character 34. On the other hand, the maximum contrast is not detected in each of the multi-AF areas (1), (3), (4), and (6).

図8の処理においては、図10(a)の画が得られる撮影場面ではS316の判定結果がNoとなってS318の処理が実行されるので、マルチAFエリア毎の最至近の撮影レンズ11の合焦位置のうち二番目に近い被写体についてのものを選択する。
図11において、マルチAFエリア毎の最至近の撮影レンズ11の合焦位置のうち最至近の被写体についてのものはエリア(5)における文字34についての合焦位置であるが、これはS318の処理によっては無視される。ここで、二番目に近い被写体についてのものは、エリア(2)、(7)、(8)、若しくは(9)のマルチAFエリアにおける合焦位置のいずれかであるが、これらはいずれも人物32に対する合焦位置である。従って、人物32に合焦させる合焦位置に撮影レンズ11を移動させることとなるので、文字34にではなく、人物32に適切に合焦した画像の撮影が行われる。
In the process of FIG. 8, in the shooting scene where the image of FIG. 10A is obtained, the determination result of S316 is No and the process of S318 is executed. Select the one for the subject closest to the focus position.
In FIG. 11, among the in-focus positions of the closest photographing lens 11 for each multi-AF area, the one for the closest subject is the in-focus position for the character 34 in the area (5). This is the process of S318. Is ignored. Here, the second closest subject is one of the in-focus positions in the multi-AF area of the areas (2), (7), (8), or (9). 32 is the in-focus position. Therefore, since the photographing lens 11 is moved to the in-focus position where the person 32 is focused, an image in which the person 32 is properly focused, not the character 34, is captured.

以上のようにして合焦位置の選択が行われた結果、S319の処理によって表示部19に表示される画面例を図10(b)に示す。なお、同図に示す画面例は、二番目に近い被写体についての合焦位置を得たマルチAFエリアとして、エリア(8)が選択された場合を示している。   FIG. 10B shows an example of a screen displayed on the display unit 19 by the process of S319 as a result of the selection of the in-focus position as described above. The screen example shown in the figure shows a case where the area (8) is selected as the multi-AF area that obtains the in-focus position for the second closest subject.

次に図12及び図13について説明する。
図12(a)は、撮像素子12で撮像されている画像の輝度が十分暗く、S316の判定結果がYesとなる撮影場面において、ユーザ31が前述したものと同様の光学ファインダを通して見る画の例を示している。なお、この撮影場面は、図6(a)と同一のものを想定している。
Next, FIGS. 12 and 13 will be described.
FIG. 12A shows an example of an image viewed by the user 31 through the same optical viewfinder as described above in a shooting scene where the brightness of the image captured by the image sensor 12 is sufficiently dark and the determination result in S316 is Yes. Is shown. This shooting scene is assumed to be the same as that shown in FIG.

図12(a)に示されている画には、ユーザ31の背後の遠方に位置している背景35がショーウィンドウ33で反射し、ショーウィンドウ33を透過して見える人物32と共に表されている。このとき、ショーウィンドウ33に記されている文字34は、背景35の反射像に融け込んでしまい、不明瞭な像となっている。ここで、ショーウィンドウ33はほぼ透明なガラスであるので、ショーウィンドウ33による反射によってカメラ30に入射する背景35の輝度は決して高いものではない。   In the image shown in FIG. 12A, a background 35 located far behind the user 31 is reflected along with the person 32 reflected by the show window 33 and seen through the show window 33. . At this time, the characters 34 written on the show window 33 are melted into the reflected image of the background 35, resulting in an unclear image. Here, since the show window 33 is substantially transparent glass, the brightness of the background 35 incident on the camera 30 due to reflection by the show window 33 is never high.

ここで図13について説明する。同図は、図12(a)の画が得られる撮影場面における、カメラ30の撮影レンズ11の位置と、その撮影レンズ11を通して撮像素子12で撮像された画像のコントラストとの関係を、図9に示したマルチAFエリア毎に示している。なお、図13における横軸及び縦軸の意味は図11と同様のものである。   Here, FIG. 13 will be described. FIG. 9 shows the relationship between the position of the photographic lens 11 of the camera 30 and the contrast of the image captured by the image sensor 12 through the photographic lens 11 in the photographic scene where the image of FIG. Each multi-AF area shown in FIG. The meanings of the horizontal axis and the vertical axis in FIG. 13 are the same as those in FIG.

図12(a)の画が得られる撮影場面においては、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させると、エリア(1)、(3)、(4)、及び(6)の各マルチAFエリアでは1点でコントラストが極大となり、この極大における撮影レンズ11の位置はいずれもショーウィンドウ33に映り込んだ背景35に対する合焦位置である。また、エリア(2)、(5)、(7)、(8)、及び(9)の各マルチAFエリアでは2点でコントラストが極大となり、この極大における撮影レンズ11の位置で合焦する被写体のうち最至近のものはいずれも人物32である。   In the shooting scene in which the image of FIG. 12A is obtained, if the shooting lens 11 is moved from the position where the focal point on the subject side is closest to the position where it is farthest, areas (1) and (3) In each of the multi-AF areas of (4) and (6), the contrast becomes maximum at one point, and the position of the photographing lens 11 at this maximum is a focus position with respect to the background 35 reflected in the show window 33. In each of the multi-AF areas of areas (2), (5), (7), (8), and (9), the contrast becomes maximum at two points, and the subject is focused at the position of the photographing lens 11 at this maximum. Of these, the closest one is the person 32.

図8の処理においては、図12(a)の画が得られる撮影場面ではS316の判定結果がYesとなってS317の処理が実行されるので、マルチAFエリア毎の最至近の撮影レンズ11の合焦位置のうち最至近の被写体についてのものを選択する。
図13において、マルチAFエリア毎の最至近の撮影レンズ11の合焦位置のうち最至近の被写体についてのものはエリア(2)、(5)、(7)、(8)、若しくは(9)のマルチAFエリアにおける合焦位置のいずれかであるが、これらはいずれも人物32に対する合焦位置である。従って、人物32に合焦させる合焦位置に撮影レンズ11を移動させることとなるので、ショーウィンドウ33に映り込んだ背景35にではなく、人物32に適切に合焦した画像の撮影が行われる。
In the process of FIG. 8, in the shooting scene where the image of FIG. 12A is obtained, the determination result of S316 is Yes and the process of S317 is executed. Of the in-focus positions, the one for the closest subject is selected.
In FIG. 13, the area (2), (5), (7), (8), or (9) for the closest subject among the in-focus positions of the closest photographing lens 11 for each multi-AF area. Are in-focus positions in the multi-AF area, and these are all in-focus positions with respect to the person 32. Accordingly, since the photographing lens 11 is moved to a focus position at which the person 32 is focused, an image that is properly focused on the person 32 is captured instead of the background 35 reflected in the show window 33. .

以上のようにして合焦位置の選択が行われた結果、S319の処理によって表示部19に表示される画面例を図12(b)に示す。なお、同図に示す画面例は、最至近の被写体についての合焦位置を得たマルチAFエリアとして、エリア(5)が選択された場合を示している。   FIG. 12B shows an example of a screen displayed on the display unit 19 by the process of S319 as a result of the selection of the in-focus position as described above. The screen example shown in the figure shows a case where the area (5) is selected as the multi-AF area that has obtained the in-focus position for the closest subject.

以上のように、図8に示したショーウィンドウモード用のマルチAF処理では、S316の処理においてショーウィンドウ33越しの撮像がショーウィンドウ33の影響を受けるか否かを撮像素子12で現在撮像されている画像の明るさに基づいて判定する。ここで、影響を受けると判定された場合には、S318の処理において、マルチAFエリア毎の最至近の撮影レンズ11の合焦位置のうち最至近の被写体についてのもの(すなわちショーウィンドウ33の文字34についてのもの)以外の合焦位置を選択して撮影レンズ11を移動させる。この結果、ガラス越しでのオートフォーカス撮影が適切なものとなる。   As described above, in the multi-AF process for the show window mode shown in FIG. 8, whether or not the imaging through the show window 33 is affected by the show window 33 in the process of S316 is currently imaged by the image sensor 12. The determination is based on the brightness of the image. If it is determined that the subject is affected, in the process of S318, the closest subject among the in-focus positions of the nearest photographing lens 11 for each multi-AF area (that is, the characters in the show window 33). The in-focus position other than that for 34 is selected and the taking lens 11 is moved. As a result, autofocus photography through glass is appropriate.

次に図14について説明する。同図はマルチAF時において図3におけるS203の処理として実行される、ショーウィンドウモード以外の汎用マルチAF処理の処理内容をフローチャートで示したものである。
まず、S411において、図7のS401と同様の方向判断処理がマルチAFエリア毎に開始される。
Next, FIG. 14 will be described. This figure is a flowchart showing the contents of a general-purpose multi-AF process other than the show window mode, which is executed as the process of S203 in FIG. 3 during multi-AF.
First, in S411, a direction determination process similar to that in S401 of FIG. 7 is started for each multi-AF area.

S412では、上述した方向判断が全てのマルチAFエリアで完了したか否かを判定する処理が行われ、完了したと判定されたとき(判定結果がYesのとき)にはS413に処理を進める。一方、未だ完了していないと判定されたとき(判定結果がNoのとき)には、完了するまでこのS412の処理が繰り返される。   In S412, a process for determining whether or not the above-described direction determination is completed in all the multi-AF areas is performed. When it is determined that the determination is completed (when the determination result is Yes), the process proceeds to S413. On the other hand, when it is determined that the process has not been completed (when the determination result is No), the process of S412 is repeated until the process is completed.

S413では、上述した方向判断を全てのマルチAFエリアで失敗したか否か、すなわち撮影レンズ11の位置を移動させてもAF信号取得回路21の出力信号の変化を全てのマルチAFエリアで検出できなかったか否かを判定する処理が行われる。ここで、この方向判断を失敗したと判定したとき(判定結果がYesのとき)には、S414としてエラー処理、例えばオートフォーカスの失敗を表示部19に表示してユーザに通知する処理が行われ、図2の制御処理を一旦終了する。一方、この方向判断を失敗していないと判定したとき(判定結果がNoのとき)、すなわち撮影レンズ11の位置を移動させたときにAF信号取得回路21の出力信号の変化をいずれかのマルチAFエリアで検出できたときには、S415に処理を進める。   In S413, whether or not the direction determination described above has failed in all the multi-AF areas, that is, the change in the output signal of the AF signal acquisition circuit 21 can be detected in all the multi-AF areas even if the position of the photographing lens 11 is moved. Processing for determining whether or not there has been is performed. Here, when it is determined that the direction determination has failed (when the determination result is Yes), an error process, for example, a process of displaying the autofocus failure on the display unit 19 and notifying the user is performed as S414. Then, the control process of FIG. On the other hand, when it is determined that this direction determination has not failed (when the determination result is No), that is, when the position of the photographic lens 11 is moved, the change in the output signal of the AF signal acquisition circuit 21 is changed to one of the multi-values. If it can be detected in the AF area, the process proceeds to S415.

S415では、上述した方向判断に成功したマルチAFエリアを対象として、コントラスト方式によるオートフォーカス機能のための合焦位置越え判断が開始され、続くS416において、対象であるマルチAFエリアの全てでこの合焦位置越え判断が完了したか否かを判定する処理が行われる。この合焦位置越え判断については、図8におけるS312からS313にかけてのものと同様であるが、撮影レンズ11の合焦位置の検出結果と共に、その合焦位置においての、撮像素子12で撮像された画像における輝度信号の高周波成分の極大値をマルチAFエリア毎に併せて記録しておく。   In S415, the determination of exceeding the in-focus position for the autofocus function by the contrast method is started for the multi-AF area for which the above-described direction determination is successful, and in subsequent S416, this alignment is performed for all the target multi-AF areas. Processing for determining whether or not the over-focus position determination has been completed is performed. The determination of exceeding the in-focus position is the same as that from S312 to S313 in FIG. 8, but the image is picked up by the image sensor 12 at the in-focus position together with the detection result of the in-focus position of the photographing lens 11. The maximum value of the high-frequency component of the luminance signal in the image is recorded together for each multi-AF area.

S416の判定処理において、対象であるマルチAFエリアの全てで合焦位置越え判断が完了したと判定されたとき(判定結果がYesのとき)にはS417に処理を進める。一方、未だ完了していないと判定されたとき(判定結果がNoのとき)には、完了するまでこのS416の処理が繰り返される。   In the determination process of S416, when it is determined that the in-focus position excess determination has been completed in all of the target multi-AF areas (when the determination result is Yes), the process proceeds to S417. On the other hand, when it is determined that the process has not been completed yet (when the determination result is No), the process of S416 is repeated until the process is completed.

S417では、対象であるマルチAFエリアの全てで合焦位置越え判断を失敗したか否か、すなわち撮影レンズ11の位置を移動させても、対象であるマルチAFエリアの全てでAF信号取得回路21の出力信号の極大を検出できなかったか否かを判定する処理が行われる。ここで、合焦位置越え判断を失敗したと判定したとき(判定結果がYesのとき)には、S418としてエラー処理、例えばオートフォーカスの失敗を表示部19に表示してユーザに通知する処理が行われ、図2の制御処理を一旦終了する。一方、合焦位置越え判断を失敗していないと判定したとき(判定結果がNoのとき)、すなわち、いずれかのマルチAFエリアでAF信号取得回路21の出力信号の極大を検出できたときにはS419に処理を進める。   In S417, whether or not the in-focus position determination has failed in all of the target multi-AF areas, that is, even if the position of the photographic lens 11 is moved, the AF signal acquisition circuit 21 in all of the target multi-AF areas. A process is performed to determine whether or not the maximum of the output signal has been detected. Here, when it is determined that the in-focus position excess determination is unsuccessful (when the determination result is Yes), an error process is performed in S418, for example, a process of displaying the autofocus failure on the display unit 19 and notifying the user. The control process of FIG. 2 is once ended. On the other hand, when it is determined that the in-focus position excess determination has not failed (when the determination result is No), that is, when the maximum of the output signal of the AF signal acquisition circuit 21 can be detected in any multi-AF area, S419. Proceed with the process.

S419では、前述した合焦位置越え判断において検出されたマルチAFエリア毎の撮影レンズ11の合焦位置のうち撮影レンズ11に最至近である被写体についてのもの、すなわち、前述した合焦位置越え判断において、被写体側での合焦点が最至近となる位置から最遠となる位置まで撮影レンズ11を移動させてマルチAFエリア毎に検出した合焦位置のうち最初に検出されたものを選択し、撮影レンズ駆動回路22を制御して選択された合焦位置へ撮影レンズ11を移動させる処理が行われる。   In S419, among the in-focus positions of the photographing lens 11 for each multi-AF area detected in the above-described in-focus position determination, the subject closest to the in-focus lens 11, that is, the in-focus position determination described above. In this case, the first detected one of the in-focus positions detected for each multi-AF area is selected by moving the photographic lens 11 from the position where the focal point on the subject side is closest to the position where it is farthest. Processing for moving the photographic lens 11 to the selected in-focus position by controlling the photographic lens driving circuit 22 is performed.

S420では、S419の処理によって選択された合焦位置の検出がされていたマルチAFエリアを示す枠を、表示部19で表示中の撮像素子12の撮像画像に重畳表示させる処理が行われ、その後は図14に示した処理が終了し、図3へと処理が戻る。
図1におけるコントロール回路10が以上の処理を行うことにより、図1に示したカメラで本発明に係るオートフォーカス機能を使用したマルチAFによる画像の撮影が可能となる。
In S420, a process of superimposing and displaying a frame indicating the multi-AF area in which the in-focus position selected in the process of S419 has been detected is displayed on the captured image of the image sensor 12 being displayed on the display unit 19, and thereafter. 14 ends, and the process returns to FIG.
When the control circuit 10 in FIG. 1 performs the above processing, the camera shown in FIG. 1 can take an image by multi-AF using the autofocus function according to the present invention.

その他、本発明は、上述した実施形態に限定されることなく、本発明の要旨を逸脱しない範囲内で種々の改良・変更が可能である。   In addition, the present invention is not limited to the above-described embodiments, and various improvements and changes can be made without departing from the scope of the present invention.

本発明を実施するカメラの構成を示す図である。It is a figure which shows the structure of the camera which implements this invention. コントロール回路によって行われる制御処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the control processing performed by a control circuit. 図2におけるAF処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of AF process in FIG. ショーウィンドウモード用AF処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of AF process for show window modes. ショーウィンドウモードにおけるオートフォーカス動作を説明する図(その1)である。FIG. 6 is a diagram (part 1) for explaining an autofocus operation in a show window mode. ショーウィンドウモードにおけるオートフォーカス動作を説明する図(その2)である。FIG. 6 is a diagram (part 2) illustrating an autofocus operation in a show window mode. 汎用AF処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of a general purpose AF process. ショーウィンドウモード用マルチAF処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the multi AF process for show window modes. マルチAFエリアの定義例を示す図である。It is a figure which shows the example of a definition of a multi AF area. ショーウィンドウモードにおけるマルチAF動作を説明する図(その1)である。FIG. 6 is a diagram (part 1) for explaining a multi-AF operation in a show window mode. ショーウィンドウモードにおけるマルチAF動作を説明する図(その2)である。FIG. 10 is a second diagram illustrating the multi-AF operation in the show window mode. ショーウィンドウモードにおけるマルチAF動作を説明する図(その3)である。FIG. 10 is a third diagram illustrating the multi-AF operation in the show window mode. ショーウィンドウモードにおけるマルチAF動作を説明する図(その4)である。FIG. 10 is a diagram (No. 4) for describing the multi-AF operation in the show window mode. 汎用マルチAF処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of a general purpose multi AF process.

符号の説明Explanation of symbols

10 コントロール回路
11 撮影レンズ
12 撮像素子
13 A/D変換器
14 ホワイトバランス補正回路
15 Y/C分離回路
16 圧縮・伸張回路
17 メモリカードI/F
18 メモリカード
19 表示部
20 DRAM
21 AF信号取得回路
22 撮影レンズ駆動回路
23 撮像素子駆動回路
24 電源部
24a パワースイッチ
25 モード設定回路
26 指示・操作部

DESCRIPTION OF SYMBOLS 10 Control circuit 11 Shooting lens 12 Image pick-up element 13 A / D converter 14 White balance correction circuit 15 Y / C separation circuit 16 Compression / decompression circuit 17 Memory card I / F
18 Memory card 19 Display unit 20 DRAM
DESCRIPTION OF SYMBOLS 21 AF signal acquisition circuit 22 Shooting lens drive circuit 23 Image pick-up element drive circuit 24 Power supply part 24a Power switch 25 Mode setting circuit 26 Instruction / operation part

Claims (10)

撮影レンズを通して撮像される画像に表される複数の被写体に当該撮影レンズを各々合焦させるときの当該撮影レンズの合焦位置を当該被写体毎に検出する合焦位置検出手段と、
ガラス越しに行われた前記撮像に及ぼす当該ガラスの影響の有無を判定する判定手段と、
前記影響が有ると判定された場合に、前記被写体についての各々の前記合焦位置のうち前記撮影レンズから最至近の被写体についてのものを除くいずれかの合焦位置を焦点検出の結果として選択する合焦位置選択手段と、
を有することを特徴とする焦点検出装置。
An in-focus position detecting means for detecting, for each subject, the in-focus position of the photographing lens when the photographing lens is focused on each of a plurality of subjects represented in an image captured through the photographing lens;
Determination means for determining the presence or absence of the influence of the glass on the imaging performed through the glass;
If it is determined that there is an influence, one of the in-focus positions for the subject, excluding that for the subject closest to the photographing lens, is selected as a result of focus detection. Focusing position selection means;
A focus detection apparatus comprising:
前記合焦位置検出手段は、前記撮影レンズを通して撮像された画像のコントラストに基づいて前記検出を行うことを特徴とする請求項1に記載の焦点検出装置。   The focus detection apparatus according to claim 1, wherein the focus position detection unit performs the detection based on a contrast of an image captured through the photographing lens. 前記判定手段は、前記撮影レンズを通して撮像された画像の明るさに基づいて、前記影響の有無を判定することを特徴とする請求項1に記載の焦点検出装置。   The focus detection apparatus according to claim 1, wherein the determination unit determines the presence or absence of the influence based on brightness of an image captured through the photographing lens. 前記合焦位置選択手段は、前記影響が有ると判定された場合に、前記複数の被写体についての各々の前記合焦位置のうち前記撮影レンズから二番目に近い被写体についてのものを選択することを特徴とする請求項1に記載の焦点検出装置。   The in-focus position selecting means selects, when it is determined that there is the influence, the one for the subject closest to the photographing lens among the in-focus positions for the plurality of subjects. The focus detection apparatus according to claim 1, wherein 前記合焦位置検出手段は、前記複数の被写体の各々についての前記合焦位置を、前記撮影レンズに対して近い被写体についてのものから順に検出することを特徴とする請求項4に記載の焦点検出装置。   5. The focus detection according to claim 4, wherein the focus position detection unit detects the focus position of each of the plurality of subjects in order from the subject that is close to the photographing lens. apparatus. 撮像を行う際の撮像条件の設定指示を取得する設定指示取得手段を更に有し、
前記合焦位置選択手段は、前記設定指示に係る撮像条件がガラス越しの撮像を示している場合に前記判定手段による判定結果に基づいて前記選択を行う、
ことを特徴とする請求項1に記載の焦点検出装置。
It further includes setting instruction acquisition means for acquiring an imaging condition setting instruction when performing imaging,
The in-focus position selection unit performs the selection based on a determination result by the determination unit when an imaging condition according to the setting instruction indicates imaging through glass.
The focus detection apparatus according to claim 1.
前記合焦位置検出手段は、前記撮影レンズを通して撮像された画像のコントラストに基づいて前記検出を行い、
前記合焦位置選択手段は、前記設定指示に係る撮像条件がガラス越しの撮像以外の撮像を示している場合には、前記影響の有無に関わらず、前記画像においてコントラストが最大である被写体像に対応する被写体についての前記合焦位置を選択する、
ことを特徴とする請求項6に記載の焦点検出装置。
The in-focus position detecting means performs the detection based on a contrast of an image captured through the photographing lens;
When the imaging condition according to the setting instruction indicates imaging other than imaging through glass, the in-focus position selection unit selects a subject image having the maximum contrast in the image regardless of the presence or absence of the influence. Selecting the in-focus position for the corresponding subject,
The focus detection apparatus according to claim 6.
前記撮影レンズを通して撮像される画像には当該画像を分割してなる複数の領域が定義されており、
前記合焦位置検出手段は、各々の前記領域内の前記画像に表されている被写体像に対応する被写体についての前記合焦位置のうち前記撮影レンズから最至近の被写体についてのものを当該領域毎に検出し、
前記合焦位置選択手段は、前記影響が有ると判定された場合に、前記領域毎に検出された各々の前記合焦位置のうち前記撮影レンズから最至近の被写体についてのものを除くいずれかの合焦位置を焦点検出の結果として選択する、
ことを特徴とする請求項1から3までのうちのいずれか一項に記載の焦点検出装置。
A plurality of areas obtained by dividing the image are defined in the image captured through the photographing lens,
The in-focus position detecting unit is configured to determine, for each region, a subject for the subject closest to the photographing lens among the in-focus positions for the subject corresponding to the subject image represented in the image in each of the regions. To detect
The in-focus position selecting means, when it is determined that the influence is present, any one of the in-focus positions detected for each area except for the subject closest to the photographing lens Select the focus position as the focus detection result,
The focus detection apparatus according to any one of claims 1 to 3, wherein the focus detection apparatus includes:
前記合焦位置検出手段は、前記影響が有ると判定された場合に、前記領域毎に検出された各々の前記合焦位置のうち二番目に前記撮影レンズから近い被写体についてのものを選択することを特徴とする請求項8に記載の焦点検出装置。   When it is determined that the influence is present, the focus position detection unit selects a subject that is second closest to the photographing lens from among the focus positions detected for each region. The focus detection apparatus according to claim 8. 撮影レンズを通して撮像される画像に表される複数の被写体に当該撮影レンズを各々合焦させるときの当該撮影レンズの合焦位置を当該被写体毎に検出し、
ガラス越しに行われた前記撮像に及ぼす当該ガラスの影響の有無を判定し、
前記影響が有ると判定した場合に、前記被写体についての各々の前記合焦位置のうち前記撮影レンズから最至近の被写体についてのものを除くいずれかの合焦位置を焦点検出の結果として選択する、
ことを特徴とする焦点検出方法。

Detecting the in-focus position of the photographic lens when the photographic lens is focused on a plurality of subjects represented in an image captured through the photographic lens, for each subject;
Determine the presence or absence of the glass effect on the imaging performed through the glass,
When it is determined that there is the influence, one of the in-focus positions for the subject is selected as a focus detection result excluding the one for the subject closest to the photographing lens.
A focus detection method characterized by the above.

JP2004142804A 2004-05-12 2004-05-12 Focus detection device and focus detection method Withdrawn JP2005326506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004142804A JP2005326506A (en) 2004-05-12 2004-05-12 Focus detection device and focus detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004142804A JP2005326506A (en) 2004-05-12 2004-05-12 Focus detection device and focus detection method

Publications (1)

Publication Number Publication Date
JP2005326506A true JP2005326506A (en) 2005-11-24

Family

ID=35472930

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004142804A Withdrawn JP2005326506A (en) 2004-05-12 2004-05-12 Focus detection device and focus detection method

Country Status (1)

Country Link
JP (1) JP2005326506A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011215200A (en) * 2010-03-31 2011-10-27 Casio Computer Co Ltd Photographing device, photographing method, and program
CN116074624A (en) * 2022-07-22 2023-05-05 荣耀终端有限公司 Focusing method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011215200A (en) * 2010-03-31 2011-10-27 Casio Computer Co Ltd Photographing device, photographing method, and program
CN116074624A (en) * 2022-07-22 2023-05-05 荣耀终端有限公司 Focusing method and device
CN116074624B (en) * 2022-07-22 2023-11-10 荣耀终端有限公司 Focusing method and device

Similar Documents

Publication Publication Date Title
US8670064B2 (en) Image capturing apparatus and control method therefor
JP5676988B2 (en) Focus adjustment device
US20140071318A1 (en) Imaging apparatus
US20060008264A1 (en) Image taking apparatus
JP4804210B2 (en) Imaging apparatus and control method thereof
KR20120114177A (en) Image processing device capable of generating wide-range image
JP4509081B2 (en) Digital camera and digital camera program
KR20120115127A (en) Image processing device capable of generating wide-range image
US10477101B2 (en) Focus detection apparatus, control method and storage medium
US10477113B2 (en) Imaging device and control method therefor
JP5451259B2 (en) Imaging apparatus, control method thereof, and program
JP2007129310A (en) Imaging apparatus
JP7293025B2 (en) Imaging device and its control method
JP6833801B2 (en) Imaging equipment, imaging methods, programs and recording media
JP5883564B2 (en) Imaging device
JP2007221268A (en) Imaging apparatus
JP2005345833A (en) Imaging device and its focusing control method
US8514305B2 (en) Imaging apparatus
JP2009017517A (en) Image-capturing device
JP6768449B2 (en) Imaging control device, control method and program of imaging device
JP6084316B2 (en) Imaging device
JP5581838B2 (en) Automatic focusing control device, electronic camera and automatic focusing control method
JP2008146024A (en) Photographing apparatus and photographing method
JP2005326506A (en) Focus detection device and focus detection method
JP2009020304A (en) Auto-focus method and imaging apparatus

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070807