JP4301977B2 - Imaging method and imaging apparatus - Google Patents
Imaging method and imaging apparatus Download PDFInfo
- Publication number
- JP4301977B2 JP4301977B2 JP2004064646A JP2004064646A JP4301977B2 JP 4301977 B2 JP4301977 B2 JP 4301977B2 JP 2004064646 A JP2004064646 A JP 2004064646A JP 2004064646 A JP2004064646 A JP 2004064646A JP 4301977 B2 JP4301977 B2 JP 4301977B2
- Authority
- JP
- Japan
- Prior art keywords
- focal length
- color information
- image data
- image
- evaluation value
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Color Television Image Signal Generators (AREA)
- Studio Devices (AREA)
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
Description
本発明は、画像データから焦点距離を検出する撮像方法及び撮像装置に関する。 The present invention relates to an imaging method and an imaging apparatus that detect a focal length from image data.
従来、ビデオカメラあるいは電子スチルカメラなどの撮像装置において、撮影された画像データの高周波成分を抽出してレンズの焦点を合わせる構成が知られている。この構成は、レンズを駆動して焦点を移動させながら撮影を行い、レンズの各位置において画像データの高周波成分を抽出してコントラストの評価値(以下、コントラストと称する)を算出する。そして、コントラストが大きくなる方向へレンズの位置を移動させ、このコントラストが最大となる位置を、レンズの合焦位置としている。 2. Description of the Related Art Conventionally, in an imaging apparatus such as a video camera or an electronic still camera, a configuration is known in which a high-frequency component of captured image data is extracted to focus a lens. In this configuration, photographing is performed while moving the focus by driving the lens, and a high-frequency component of the image data is extracted at each position of the lens to calculate a contrast evaluation value (hereinafter referred to as contrast). Then, the position of the lens is moved in the direction in which the contrast increases, and the position where the contrast is maximized is set as the in-focus position of the lens.
この点、1回の撮影動作で複数の画像データを連続的に撮影し、撮影者の意図する被写体を確実に撮影することを図ったいわゆるブラケット撮影と呼ばれる撮影方法が知られている。このブラケット撮影については、適正と判断される露出を中心にプラス側とマイナス側に露出を変化させる露出ブラケット撮影の他、複数のホワイトバランスで撮影する構成や、複数の焦点距離で撮影するフォーカスブラケット撮影が知られている。 In this regard, a so-called bracketing photographing method is known in which a plurality of pieces of image data are continuously photographed by one photographing operation and a subject intended by the photographer is reliably photographed. For this bracket shooting, in addition to exposure bracket shooting that changes the exposure to the plus side and minus side around the exposure that is judged to be appropriate, a configuration that shoots with multiple white balances, and a focus bracket that shoots with multiple focal lengths Shooting is known.
例えば、ホワイトバランスについてのブラケット撮影では、撮影画面を複数の領域に分割し、各領域に対応して設定したホワイトバランスの設定で画像を撮影する構成が知られている(例えば、特許文献1参照。)。 For example, in bracket shooting for white balance, a configuration is known in which a shooting screen is divided into a plurality of areas and an image is shot with a white balance setting set corresponding to each area (see, for example, Patent Document 1). .).
また、フォーカスブラケット撮影については、撮影範囲中に存在する複数の被写体までの距離をそれぞれ測距し、それぞれのフォーカス位置で撮影する構成が知られている(例えば、特許文献2参照。)。この構成では、複数の被写体の測定は、レンズを移動させながら高周波成分の評価値のピークの位置を検出し、あるいは、複数の測距エリア毎に被写体距離を測定して行っている。
上記のように、フォーカスブラケット撮影を行うことにより、意図した被写体に合焦する可能性が向上するが、意図した被写体の輝度情報のコントラストが低い場合には、高周波成分の評価値のピークとして検出されず、あるいは測距エリア内での被写体として検出されず、意図した被写体に合焦しない可能性がある。 As described above, focus bracket shooting improves the possibility of focusing on the intended subject. However, when the contrast of luminance information of the intended subject is low, it is detected as the peak of the evaluation value of the high-frequency component. Or it may not be detected as a subject in the distance measurement area and may not focus on the intended subject.
本発明は、このような点に鑑みなされたもので、撮影者が意図した被写体に合焦した画像を撮像できる可能性の大きい撮像方法及び撮像装置を提供することを目的とする。 SUMMARY An advantage of some aspects of the invention is that it provides an imaging method and an imaging apparatus that can capture an image focused on a subject intended by a photographer.
本発明の1つの態様の撮像方法は、複数の色情報の画像データを用い、各色情報毎にそれぞれ焦点距離を検出し、各色情報毎に検出した焦点距離でそれぞれ撮像を実行するものである。 An imaging method according to one aspect of the present invention uses a plurality of pieces of color information image data, detects a focal length for each color information, and executes imaging at each focal length detected for each color information.
そして、この構成では、複数の色情報を用いてそれぞれ検出した焦点距離でそれぞれ撮像を実行することにより、特定の色情報に特徴のある被写体に合焦して撮影し、撮影者が意図した被写体に合焦した画像を撮像できる可能性が大きくなる。 In this configuration, by performing imaging at each of the focal lengths detected using a plurality of pieces of color information, the subject that is characteristic of specific color information is photographed in focus, and the subject intended by the photographer The possibility of capturing an image focused on is increased.
本発明の他の1つの態様の撮像方法は、複数の色情報の画像データを用い、前記複数の色情報のそれぞれについて焦点距離を検出し、前記複数の色情報のそれぞれについて検出した焦点距離でそれぞれ撮像を実行し、前記複数の色情報のそれぞれについての焦点距離の検出において、当該色情報の画像データについて、光学系の焦点距離を変化させることで、複数の異なる焦点距離にそれぞれ対応する複数の画像データを取得し、当該色情報の画像データには、互いに隣接する複数の画像検出領域を設定し、取得した前記複数の画像データのそれぞれにおいて、前記各画像検出領域について、コントラストの最大値に基づく評価値及びこの最大値を記録したピーク位置を求め、前記各画像検出領域について、前記複数の画像データにおける前記評価値のピークが、いずれの焦点距離に対応する画像データで記録されたかにより部分焦点距離を算出するとともに、前記複数の画像データのうち少なくとも2つの画像データにおける前記ピーク位置同士の差を求め、求めた差が大きい程より低い信頼度となるように当該画像検出領域の信頼度を算出し、前記信頼度と前記評価値との積が所定値を越える画像検出領域について算出された前記部分焦点距離及び所定の焦点距離の中から、予め設定された条件に従って当該色情報についての焦点距離を選択することを特徴とする。 An imaging method according to another aspect of the present invention uses image data of a plurality of color information, detects a focal length for each of the plurality of color information, and uses a focal length detected for each of the plurality of color information. In the detection of the focal length for each of the plurality of color information, a plurality of images corresponding to a plurality of different focal lengths are obtained by changing the focal length of the optical system for the image data of the color information. A plurality of image detection areas adjacent to each other are set in the image data of the color information, and in each of the acquired image data, the maximum contrast value for each of the image detection areas An evaluation value based on the above and a peak position where the maximum value is recorded are obtained, and each image detection area is pre- The partial focal length is calculated depending on which focal length corresponds to the peak of the evaluation value, and the difference between the peak positions in at least two of the plurality of image data is obtained, The reliability of the image detection area is calculated such that the greater the difference obtained is, the lower the reliability is, and the partial focus calculated for the image detection area in which the product of the reliability and the evaluation value exceeds a predetermined value A focal length for the color information is selected according to a preset condition from the distance and a predetermined focal length.
そして、この構成では、画像データの各画像検出領域について、コントラストの最大値を記録したピーク位置を求め、複数の画像データのうち少なくとも2つの画像データにおけるピーク位置同士の差が大きい程より低い信頼度となるように当該画像検出領域の信頼度を算出するため、被写体が相対的に移動した信頼度の低い画像検出領域の部分焦点距離は選択の対象から外し、各色情報毎に正確な焦点距離の検出が可能になる。 In this configuration, the peak position at which the maximum contrast value is recorded is obtained for each image detection area of the image data, and the greater the difference between the peak positions in at least two of the plurality of image data, the lower the reliability. In order to calculate the reliability of the image detection area so that the degree of accuracy is high, the partial focal length of the low-reliability image detection area in which the subject has moved relatively is excluded from the selection target, and the accurate focal length for each color information Can be detected.
本発明の他の1つの態様の撮像方法において、最至近距離選択モード及び最遠距離選択モードのいずれかの撮影モードによる撮像を実行可能であり、前記最至近距離選択モード及び前記最遠距離選択モードの両方による撮像を実行するよう指示された場合に、前記撮影モードのそれぞれについて、前記複数の色情報のそれぞれについて焦点距離を検出し、検出した焦点距離でそれぞれ撮像を実行し、前記最至近距離選択モードでは、前記複数の色情報のそれぞれについての焦点距離の検出において、前記信頼度と前記評価値との積が所定値を超える画像検出領域について算出された前記部分焦点距離のうち最小の部分焦点距離又は所定の第1焦点距離を、当該色情報についての焦点距離として選択し、前記最遠距離選択モードでは、前記複数の色情報のそれぞれについての焦点距離の検出において、前記信頼度と前記評価値との積が所定値を超える画像検出領域について算出された前記部分焦点距離のうち最大の部分焦点距離又は所定の焦点距離であって前記第1焦点距離より大きい第2焦点距離を、当該色情報についての焦点距離として選択するものとしてよい。 In the imaging method according to another aspect of the present invention, it is possible to perform imaging in any one of the nearest distance selection mode and the farthest distance selection mode, and the nearest distance selection mode and the farthest distance selection. When instructed to perform imaging in both modes, a focal length is detected for each of the plurality of color information for each of the shooting modes, and imaging is performed at each of the detected focal lengths, and the closest distance is detected. In the distance selection mode, in the detection of the focal length for each of the plurality of color information, the smallest of the partial focal lengths calculated for the image detection region in which the product of the reliability and the evaluation value exceeds a predetermined value A partial focal length or a predetermined first focal length is selected as the focal length for the color information, and in the farthest distance selection mode, the plurality of In detection of the focal length for each color information, the maximum partial focal length or the predetermined focal length among the partial focal lengths calculated for the image detection area in which the product of the reliability and the evaluation value exceeds a predetermined value Then, a second focal length that is larger than the first focal length may be selected as the focal length for the color information.
そして、この構成では、複数の撮影モードでそれぞれ複数の色情報を用いて検出した焦点距離で撮像を実行することにより、特定の色情報に特徴のある被写体に合焦して撮影し、撮影者が意図した被写体に合焦した画像を撮像できる可能性が大きくなる。 In this configuration, by performing imaging at a focal length detected using a plurality of pieces of color information in a plurality of shooting modes, the subject is photographed while focusing on a subject characteristic of specific color information. The possibility of capturing an image focused on the intended subject increases.
本発明1つの態様の撮像装置は、撮像素子と、この撮像素子に被写体を結像させる光学系と、この光学系の焦点距離を変化させる光学系駆動手段と、前記撮像素子から出力された画像データを処理するとともに前記光学系駆動手段を制御する画像処理手段とを具備し、この画像処理手段は、複数の色情報のそれぞれについて焦点距離を検出する処理であって、当該色情報の画像データについて、前記光学系の焦点距離を変化させることで、複数の異なる焦点距離にそれぞれ対応する複数の画像データを取得し、当該色情報の画像データには、互いに隣接する複数の画像検出領域を設定し、取得した前記複数の画像データのそれぞれにおいて、前記各画像検出領域について、コントラストの最大値に基づく評価値及びこの最大値を記録したピーク位置を求め、前記各画像検出領域について、前記複数の画像データにおける前記評価値のピークが、いずれの焦点距離に対応する画像データで記録されたかにより部分焦点距離を算出するとともに、前記複数の画像データのうち少なくとも2つの画像データにおける前記ピーク位置同士の差を求め、求めた差が大きい程より低い信頼度となるように当該画像検出領域の信頼度を算出し、前記信頼度と前記評価値との積が所定値を越える画像検出領域について算出された前記部分焦点距離及び所定の焦点距離の中から、予め設定された条件に従って当該色情報についての焦点距離を選択する、処理を行い、前記複数の色情報のそれぞれについて算出した焦点距離でそれぞれ撮像を実行することを特徴とする。 An image pickup apparatus according to an aspect of the present invention includes an image pickup element, an optical system that forms an object on the image pickup element, an optical system driving unit that changes a focal length of the optical system, and an image output from the image pickup element. Image processing means for processing the data and controlling the optical system driving means, the image processing means for detecting a focal length for each of a plurality of color information, and image data of the color information With respect to the optical system, a plurality of image data respectively corresponding to a plurality of different focal lengths are obtained by changing a focal length of the optical system, and a plurality of image detection regions adjacent to each other are set in the image data of the color information In each of the acquired plurality of image data, the evaluation value based on the maximum contrast value and the peak value recording the maximum value are recorded for each image detection region. A position is obtained, and for each of the image detection regions, a partial focal length is calculated based on which focal length corresponds to the peak of the evaluation value recorded in the plurality of image data, and the plurality of images The difference between the peak positions in at least two image data among the data is calculated, the reliability of the image detection area is calculated so that the higher the calculated difference is, the lower the reliability, the reliability and the evaluation value A process of selecting a focal length for the color information according to a preset condition from the partial focal length and the predetermined focal length calculated for the image detection region whose product exceeds a predetermined value, Imaging is performed at each focal length calculated for each of a plurality of color information.
そして、この構成では、画像データの各画像検出領域について、コントラストの最大値を記録したピーク位置を求め、複数の画像データのうち少なくとも2つの画像データにおけるピーク位置同士の差が大きい程より低い信頼度となるように当該画像検出領域の信頼度を算出するため、被写体が相対的に移動した信頼度の低い画像検出領域の部分焦点距離は選択の対象から外し、各色情報毎に正確な焦点距離の検出が可能になる。 In this configuration, the peak position at which the maximum contrast value is recorded is obtained for each image detection area of the image data, and the greater the difference between the peak positions in at least two of the plurality of image data, the lower the reliability. In order to calculate the reliability of the image detection area so that the degree of accuracy is high, the partial focal length of the low-reliability image detection area in which the subject has moved relatively is excluded from the selection target, and the accurate focal length for each color information Can be detected.
本発明の1つの態様の撮像装置において、撮像を実行中であることを示す警告手段を備えるものとしてよい。 In the imaging device of one aspect of the present invention, it may as shall comprise a warning means for indicating that it is running imaging.
そして、この構成では、複数の画像を順次撮像する際に、撮影者が撮像装置を被写体から動かさないように警告できる。 In this configuration, when a plurality of images are sequentially captured, the photographer can warn the user not to move the imaging device from the subject.
本発明によれば、複数の色情報を用いてそれぞれ検出した焦点距離でそれぞれ撮像を実行することにより、特定の色情報に特徴のある被写体に合焦して撮影し、撮影者が意図した被写体に合焦した画像を撮像できる可能性を大きくできる。 According to the present invention, by performing imaging at each focal length detected using a plurality of pieces of color information, the subject that is characteristic of specific color information is photographed in focus, and the subject intended by the photographer It is possible to increase the possibility of capturing an image focused on.
以下、本発明の撮像方法及び撮像装置の一実施の形態を図面を参照して説明する。 Hereinafter, an embodiment of an imaging method and an imaging apparatus according to the present invention will be described with reference to the drawings.
図1において、10は撮像装置で、この撮像装置10は、合焦装置を備え、静止画あるいは動画を撮影するためのデジタルカメラであり、レンズ及び絞りなどを備えた光学系11、撮像素子としてのCCD12、このCCD12の出力が順次入力されるアナログ回路13、A/D変換器14、情報選択手段及び画像処理手段を構成する画像処理回路15、記憶手段としてのRAMなどのメモリ16、画像処理手段を構成する制御手段を構成するCPU17、このCPU17に制御されてCCD12を駆動するCCD駆動回路18、このCPU17に制御される光学系駆動手段を構成するモータ駆動回路19、このモータ駆動回路19に駆動されて光学系11のフォーカスレンズすなわち焦点レンズなどのレンズなどを前後に駆動して焦点距離を変化させる光学系駆動手段を構成するモータ20、警告手段を構成する液晶ディスプレイなどの画像表示装置21、メモリカードなどの画像記録媒体22、情報選択手段を構成する補助光装置23、及び、図示しない筐体、撮影ボタンや切替スイッチあるいは撮影モード選択手段などを構成する操作手段、電源装置、入出力端子などを備えている。
In FIG. 1,
そして、CCD12は、電荷結合素子(CCD : charge coupled device)を用いたイメージセンサである電荷結合素子型の固体撮像素子である。また、CPU17は、いわゆるマイクロプロセッサであり、システムの制御を司っている。そして、この実施の形態では、CPU17は、光学系11の絞り制御及び焦点距離変倍制御(フォーカス制御)を行い、特に、モータ駆動回路19を介してモータ20により光学系11を駆動し、すなわち、単数あるいは複数の焦点レンズの位置を前後に変化させ、フォーカスの制御を行う。さらに、このCPU17は、CCD駆動回路18の制御を介してのCCD12の駆動制御、アナログ回路13の制御、画像処理回路15の制御、メモリ16に記録されるデータの処理、画像表示装置21の制御、画像記録媒体22への画像データの記録及び読み出し、及び補助光装置23による補助光の投光などを行う。さらに、メモリ16は、安価なDRAMなどで構成され、CPU17のプログラム領域、CPU17及び画像処理回路15のワーク領域、画像記録媒体22への入出力バッファ、画像表示装置21用のビデオバッファ、その他画像データの一時記録領域として共用される。
The
そして、CCD12に入射する被写体光は、CPU17が光学系11の絞りなどを制御することにより光量調整される。そして、CCD12は、CCD駆動回路18により駆動され、被写体光が光電変換された結果のアナログ映像信号をアナログ回路13へ出力する。また、CPU17はCCD駆動回路18を介してCCD12の電子シャッタの制御なども行う。また、アナログ回路13は、相関2重サンプリング及びゲインコントロールアンプからなり、CCD12から出力されるアナログ映像信号のノイズ除去、及び画像信号の増幅などを行う。また、例えば、アナログ回路13のゲインコントロールアンプの増幅度などが、CPU17により制御される。
Then, the amount of light of the subject light incident on the
そして、アナログ回路13の出力は、A/D変換器14へ入力され、このA/D変換器14でデジタル映像信号へと変換される。そして、変換された映像信号は、そのままメモリ16へ一時記録され、以後の処理を待つか、あるいは、画像処理回路15へ入力されて画像処理を施された後、メモリ16を介して画像表示装置21により表示され、あるいは使用者の意図により、画像記録媒体22へ動画像あるいは静止画像として記録される。また、メモリ16へ一時記録された処理前の画像データは、CPU17か、あるいは画像処理回路15により、あるいはこれら両者により処理される。
The output of the
さらに、本実施の形態の画像処理回路15は、図2に示すように、マトリクス補完回路27、スイッチ28、エリア判定回路31、コントラスト検出手段としてのフィルタ回路32、ピーク判定回路33、ピーク位置判定回路34、及び演算回路35を備えている。
Further, as shown in FIG. 2, the
所定のレンズ位置で、すなわち、光学系11が適宜の焦点距離に設定された状態で、光学系11に入射した被写体像は、CCD12を通じてアナログ画像信号化され、アナログ回路13とA/D変換器14を通してデジタルの画像データに変換される。そして、A/D変換器14から出力されたデジタルの画像データは、メモリ16に記憶され、同時に、合焦及び露出などの制御のためのデータ処理が、画像処理回路15にて行なわれる。すなわち、A/D変換器14によりデジタルの画像データに変換された画像データは、マトリクス補完回路27に入力され、このマトリクス補完回路27で、色変換あるいは補完処理を受け、合焦制御あるいは露出制御に対応した画像データとして、YCC形式の輝度データ(以下、輝度情報と称する)及びRGB形式の信号データ(以下、色情報と称する)が出力される。なお、この変換処理の設定は、プログラムに応じてCPU17により変更可能である。そして、これらマトリクス補完回路27から出力された輝度情報及び色情報は、CPU17により制御されるスイッチ28に入力され、撮影条件などに応じて制御用の画像データとして選択されて出力される。すなわち、通常のYCC形式の輝度データの画像データの他、RGB形式の画像データのR(赤)信号、G(緑)信号、及びB(青)信号を画像データとして出力可能になっている。
A subject image incident on the
そして、このスイッチ28から出力された画像データは、エリア判定回路31に入力され、図3などに示す合焦のための画像エリアである合焦画像範囲Wの判定のため、このエリア判定回路31でエリア判定処理を行う。この合焦画像範囲Wは、2個以上の複数の画像検出領域Whを有するが、ここでは、画像検出領域WhはウインドウW1〜W9により構成され、各ウインドウW1〜W9において、すなわち、被写体Tの複数部分の範囲において光学系11から被写体Tまでの距離(以下、被写体距離と称する)を算出する手段を有しているものとして説明する。すなわち、合焦画像範囲Wの各ウインドウW1〜W9のコントラストの大小の検出のため、フィルタ回路32により高周波成分が解析され、各ウインドウW1〜W9についてコントラストの評価値が算出される。なお、このフィルタ回路32は、比較的コントラストの高いハイパスフィルタ(HPF)を用いると良い。
The image data output from the
さらに、本実施の形態では、各ウインドウW1〜W9毎の画像に対して、各水平方向のフィルタ回路32から算出された評価値の内、ピーク判定回路33により、最も高い評価値が、各ウインドウW1〜W9の評価値として出力される。また、同時に、ピーク判定回路33で最も高い評価値が得られた画像データ上の位置(以下、ピーク位置と称する)を、算出中のウインドウW1〜W9の起点となる位置から算出するピーク位置判定回路34を備えている。そして、これらピーク判定回路33とピーク位置判定回路34の出力は、すなわち、各ウインドウW1〜W9の水平ライン毎のコントラストの評価値のピーク値とこのピーク値を記録したピーク位置とは、それぞれメモリ16に一時的に格納して保持される。
Furthermore, in the present embodiment, among the evaluation values calculated from the
そして、これらCCD12の各水平ライン毎に算出されたピーク値とピーク位置とは、演算手段として加算器である演算回路35により各ウインドウW1〜W9内で加算され、各ウインドウW1〜W9毎の加算ピーク値とピーク位置の水平ライン方向の平均位置である加算ピーク位置として出力され、これら加算ピーク値と加算ピーク位置とが各ウインドウW1〜W9の値としてCPU17に送られる。なお、各ウインドウW1〜W9毎の加算ピーク値の算出に当たる演算回路35は、規定の範囲以上のピーク値のみを対象として演算する構成とすることもできる。
The peak value and the peak position calculated for each horizontal line of the
そして、光学系11を駆動し、設定された範囲(駆動範囲)内でレンズ位置を変化させ、各レンズ位置における加算ピーク値と加算ピーク位置とを算出し、メモリ16に保存していく。なお、この駆動範囲すなわち合焦処理用の撮影枚数は、レンズ倍率、撮影される距離情報、撮影者が指定する撮影条件などにより適宜の値を設定することもできる。また、この駆動範囲については、以下に示すように、評価値の演算結果から、評価値が予め設定した図3(b)のFVTHn以上ある場合など、被写体距離が小さい場合には、数を減らし、合焦時間を短くすることもできる。
Then, the
そして、この駆動範囲で、各ウインドウW1〜W9毎にピーク値を比較し、レンズの駆動方向に対してピーク値にピークがある場合、各ウインドウW1〜W9のピークとする。 Then, in this driving range, the peak value is compared for each window W1 to W9, and if there is a peak in the peak value with respect to the driving direction of the lens, it is set as the peak of each window W1 to W9.
そして、このピークの近傍で被写体Tに合焦することが推定できる。このピークの値から推定される焦点距離を、各ウインドウW1〜W9の部分焦点距離とする。 Then, it can be estimated that the subject T is focused in the vicinity of this peak. The focal length estimated from the peak value is set as the partial focal length of each of the windows W1 to W9.
ここで、合焦画像範囲Wには、複数のウインドウW1〜W9を設定しているため、例えば、ピークの近傍で被写体Tが移動しているウインドウが存在する一方、ピークの近傍でブレなく確実に被写体Tをとらえているウインドウも存在する。 Here, since a plurality of windows W1 to W9 are set in the focused image range W, for example, there is a window in which the subject T is moving in the vicinity of the peak, while there is no blurring in the vicinity of the peak. There is also a window that captures the subject T.
すなわち、各ウインドウW1〜W9の部分焦点距離には、信頼度の高いもの(有効であるもの)と、信頼度の低いもの(無効であるもの)が存在する。そこで、CPU17は、ピーク値とピーク位置との演算結果を用いて、各ウインドウW1〜W9毎に、信頼度を判断し、すなわち、合焦位置特定手段に重み付けを行う。
That is, the partial focal lengths of the windows W1 to W9 include those with high reliability (effective) and those with low reliability (invalid). Therefore, the
例えば、部分焦点距離の近傍で、ピーク位置の平均位置が急激に移動している場合や、あるいは、各ウインドウW1〜W9の水平方向に隣接したウインドウW1〜W9のピーク位置の平均位置が急激に移動している場合は、被写体Tが移動するブレなどが生じていると推定できるため、当該ウインドウW1〜W9の重み付けは小さくする。一方、ピーク位置の平均位置があまり変化していない場合は、被写体Tが移動していないと判断し、重み付けを小さくしない。 For example, when the average position of the peak position is rapidly moving near the partial focal length, or the average position of the peak positions of the windows W1 to W9 adjacent in the horizontal direction of the windows W1 to W9 is abrupt. If it is moving, it can be estimated that blurring or the like that the subject T moves has occurred, so the weights of the windows W1 to W9 are reduced. On the other hand, if the average position of the peak positions has not changed much, it is determined that the subject T has not moved, and the weighting is not reduced.
また、ウインドウの被写体Tのピーク位置が他のウインドウに移動した場合は、ピーク値及びピーク位置が大きく変化する。そこで、このようにピーク値及びピーク位置が大きく変化したウインドウは、重み付けを小さくし、すなわち、ウインドウの信頼度を下げて、結果的に、被写体Tをとらえているウインドウの部分焦点距離を優先させる。 Further, when the peak position of the subject T in the window moves to another window, the peak value and the peak position change greatly. Therefore, the window whose peak value and peak position have changed greatly in this way is reduced in weighting, that is, the reliability of the window is lowered, and as a result, the partial focal length of the window capturing the subject T is prioritized. .
なお、各ウインドウW1〜W9内での水平方向のコントラストのピークを評価するため、当該ウインドウW1〜W9内に被写体Tのコントラストのピークが存在すれば、被写体Tが移動したとしても、評価値としては変化がない。 In order to evaluate the horizontal contrast peak in each of the windows W1 to W9, if there is a contrast peak of the subject T in the windows W1 to W9, the evaluation value is obtained even if the subject T moves. There is no change.
また、ピーク値のピーク位置がレンズ位置を移動させるごとにばらついている場合は、ノイズなどウインドウ内にコントラストがない場合などが多いため、被写体Tがないと判断し、重み付け量を小さくする。 Also, if the peak position of the peak value varies each time the lens position is moved, it is often the case that there is no contrast in the window, such as noise, so it is determined that there is no subject T, and the weighting amount is reduced.
なお、この重み付け量は、予め設定する他、輝度情報や焦点倍率などの撮影条件に基づく画像データの評価値などから算出することもできる。 This weighting amount can be set in advance, or can be calculated from an evaluation value of image data based on photographing conditions such as luminance information and focus magnification.
そして、CPU17は、各ウインドウW1〜W9毎に、評価値に重み付けを乗算し、重み付けを行った評価値を得る。
Then, the
また、ここで、判断手段としてのCPU17は、重み付けを行った評価値が所定の値以下であると、その評価値は無効とし、以後利用しない。
Here, the
そして、選択手段としてのCPU17は、重み付けを行った評価値をレンズ駆動の位置毎に加算し、コントラストが最大になる最終的な合焦位置を算出する。すなわち、評価値の演算結果がCPU17に送られると、CPU17は、各ウインドウW1〜W9で得られた各評価値(加算ピーク値と加算ピーク位置)を加算し、現在のレンズ位置での被写体位置を一つの評価値として演算を行う。この演算の際、ピーク位置は各ウインドウW1〜W9内の垂直方向ライン数で割った値とすると、ピーク位置の重心がわかる。その変化量の大きいものや、水平方向のウインドウから重心がウインドウ隅へ移動したものなどは、そのウインドウ評価値の重み付けを減らした上で加算を行い、最終評価値を得る。
Then, the
そして、有効とされた評価値の中で最小の部分被写体距離を選び、この部分被写体距離を合焦距離として選択する。すなわち、CPU17は、最終評価値の大きさを基に、モータ駆動回路19とモータ20により、最終評価値が最も高い位置まで、光学系11のレンズの移動を指示する。もし、最終評価値に変化がない場合は、モータ駆動回路19を介してモータ20の停止を指示する。
Then, the minimum partial subject distance is selected from the evaluation values that are validated, and this partial subject distance is selected as the in-focus distance. That is, the
すなわち、重み付けをしているため、被写体Tのブレによる誤ったピークを選択することを回避できるため、複数領域を有する複数の焦点距離算出においても、被写体Tをブレと間違えずに選択できる。このため、一般的に有効とされる近距離を優先する手法により、正確に合焦位置を選択して撮影できる。 In other words, since the weighting is performed, it is possible to avoid selecting an erroneous peak due to blurring of the subject T, so that the subject T can be selected without mistakes for blurring even when calculating a plurality of focal lengths having a plurality of regions. For this reason, it is possible to accurately select an in-focus position and take a picture by a method that gives priority to a short distance that is generally effective.
なお、光学系11を構成するレンズのピント位置、すなわち、所定の距離に合焦するレンズの位置は、設計上の撮影距離範囲に対して、焦点倍率による変動や絞り口径位置による変化、及びレンズを支持する鏡筒の温度条件や姿勢差などの条件により変化する。そこで、光学系11には、設計上のピント位置で計算された駆動範囲に加え、さらに、これら条件の変動による変化量を考慮し、近距離側と遠距離側とに変化量分の移動可能範囲すなわちオーバーストローク領域を設けているとともに、CPU17などからなる制御手段は、このオーバーストローク領域にレンズを駆動可能にレンズ位置を駆動可能に設定されている。
It should be noted that the focus position of the lens constituting the
例えば、設計上の撮影距離範囲を50cmから無限遠までとしたときのレンズのピント位置の移動量の総量が10mmであり、上記の変化量の積算最大値が1mmであったとすると、それぞれ近距離側に1mm、遠距離側に1mmのオーバーストローク領域を設け、レンズのピント位置の移動量の総量すなわち駆動範囲を10+1+1より12mmに設定する。このようにオーバーストローク領域を設け、このオーバーストローク領域にレンズ位置を駆動可能としたため、設計上規定した撮影距離範囲を満足できるようになっている。 For example, assuming that the total moving amount of the focus position of the lens when the designed shooting distance range is from 50 cm to infinity is 10 mm, and the integrated maximum value of the above change amount is 1 mm, each short distance An overstroke area of 1 mm on the side and 1 mm on the far side is provided, and the total amount of movement of the focal position of the lens, that is, the driving range is set to 10 mm from 10 + 1 + 1. Since the overstroke area is provided in this way and the lens position can be driven in this overstroke area, the photographing distance range defined in the design can be satisfied.
また、補助光装置23は、焦点合わせ処理の補助として、撮影環境すなわち被写体が暗い場合に、被写体の輝度に応じて発光する複数の、本実施の形態では、互いに色の異なる2個の光源である補助光L1,L2を備えている。そして、各補助光L1,L2は、それぞれ光源回路43,44に接続され、さらに、これら光源回路43,44は、第1及び第2のスイッチ45,46を介してCPU17に接続されている。そして、各補助光L1,L2は、光源回路43,44で制御されて発光し、さらに、補助光L1,L2の発光が必要か否かの指示や点灯タイミングの制御はCPU17が行う。また、第1のスイッチ45は、CPU17の制御により、2個の補助光L1,L2のいずれを制御するかを切り替える。また、第2のスイッチ46は、CPU17の制御により、2個の補助光L1,L2の両者を同時に制御するか否かを切り替える。
In addition, the auxiliary
なお、補助光L1,L2は、2個に限られず、3個以上の複数(N個)の補助光L1,L2,…LNを用いることもできる。そして、これら複数の補助光L1,L2,…LNは、互いに異なる色で発光する他、互いに同じ色で発光するものとしても良い。また、これら補助光L1,L2,…LNは、それぞれ単独で制御して発光する構成の他、複数の補助光L1,L2,…LNを組み合わせて制御し、同時に複数の補助光L1,L2,…LNを発光させることにより、単独で発光させたときとは異なる色の光を発光することもできる。 The auxiliary lights L1, L2 are not limited to two, and a plurality of (N) auxiliary lights L1, L2,. The plurality of auxiliary lights L1, L2,... LN may emit light of the same color in addition to light of different colors. In addition, the auxiliary lights L1, L2,... LN are controlled independently and controlled in combination with a plurality of auxiliary lights L1, L2,... LN, and at the same time, a plurality of auxiliary lights L1, L2,. ... By emitting LN, it is possible to emit light having a different color from that when light is emitted alone.
次に、本実施の形態による撮影動作の自動合焦動作及び撮影動作を図3ないし図19を参照して説明する。 Next, the automatic focusing operation and the photographing operation of the photographing operation according to this embodiment will be described with reference to FIGS.
本実施の形態は、ブラケット撮影の個々の撮影について、レンズの位置を確定するため、すなわち、正確に合焦するため、撮影者が、通常の輝度情報を用いる他、色情報及び補助光を用いることができるとともに、画像データを複数のウインドウに分割することにより、被写体にブレが生じても正確に合焦できるものである。 In the present embodiment, in order to determine the lens position for each bracket shooting, that is, in order to focus accurately, the photographer uses color information and auxiliary light in addition to using normal luminance information. In addition, by dividing the image data into a plurality of windows, it is possible to focus accurately even if the subject is blurred.
まず、図3を参照して、画像データを複数のウインドウに分割する構成について、手振れなどによる被写体ブレがない場合の動作を説明する。 First, with reference to FIG. 3, an operation when there is no subject blur due to camera shake or the like will be described for a configuration in which image data is divided into a plurality of windows.
本実施の形態では、図3(a)に示すように、合焦画像範囲WがCCD12の画面の中央部に配置され、さらに、この合焦画像範囲Wを、水平方向に3個、垂直方向に3個の合計9個に分割してウインドウW1〜W9が設定されている。なお、このようなウインドウは、隣り合ったエリア部分が複数存在するように構成すれば、個数は適宜の数に設定できる。被写体ブレのない場合の被写体Tは、各ウインドウW1〜W9内で十分コントラストがとれるような配置に設定されている。
In the present embodiment, as shown in FIG. 3A, the focused image range W is arranged at the center of the screen of the
そして、図3(a)に示す状態で、コントラストを評価した結果を、図3(b)の曲線Tcに示す。この例は、モータ20により焦点を近(NEAR)から遠(FAR)に駆動された光学系11により被写体Tを撮影した複数の画像データを評価した場合の評価値を加算した最終評価値を示しており、被写体距離Tdが、評価値のピークPに明確に示される。
The result of evaluating the contrast in the state shown in FIG. 3A is shown by a curve Tc in FIG. This example shows a final evaluation value obtained by adding evaluation values when a plurality of image data obtained by photographing the subject T by the
次に、図4ないし図6を参照して、手振れなどによる被写体のブレがある場合の動作を説明する。 Next, with reference to FIG. 4 to FIG. 6, an operation in the case where there is blurring of the subject due to camera shake or the like will be described.
まず、図4を参照して、複数領域を有する方式の被写体移動または手振れなどのブレについて説明する。 First, with reference to FIG. 4, blurring such as subject movement or camera shake in a method having a plurality of regions will be described.
図4は、合焦動作中に、手振れ、すなわち撮影中に意に反して撮像装置10が被写体Tに対して相対的に移動してしまった場合を示し、時系列に沿ってシーンS(H-1)からシーンS(H)を経てシーンS(H+1)に至る過程で、光学系11のレンズ位置を移動させながら画像データを入力した状態の合焦画像を示している。すなわち、被写体移動あるいは手振れの現象が起こると、例えば、シーンS(H-1)ではウインドウW1に存在した被写体Tのコントラストの大きい部分は、移動によりシーンS(H)ではウインドウW5に相対的に移動し、シーンS(H+1)ではウインドウW9に相対的に移動している。そこで、この状態でウインドウW1など特定のウインドウのみでコントラストの評価値を評価すると、正しい評価が行われない。
FIG. 4 shows a case where the
また、図5も、合焦動作中に手振れが生じた場合を示している。そして、図5(a)は、図3(a)と同様の合焦画像範囲Wが設定されているが、被写体Tが破線T4に示す位置から実線T5に示す位置まで相対的に移動する被写体ブレが発生し、被写体Tのコントラストの大きい部分が例えばウインドウW4からウインドウW5まで相対的に移動した状態を示している。そして、この被写体TのT4からT5への移動の間に、光学系11のレンズを駆動する合焦動作が行われると、図5(b)に示すように、ウインドウW4のコントラストを評価した結果である評価値は、曲線Tc4で示され、また、ウインドウW5の評価の結果は曲線Tc5で示され、例えばウインドウW4の評価値である曲線Tc4に注目すると、被写体距離Tdとは異なる位置Td4が評価値のピークP4となり、被写体が距離毎に複数存在する場合などに区別できないなど、誤作動の原因となる。
FIG. 5 also shows a case where camera shake occurs during the focusing operation. In FIG. 5A, a focused image range W similar to that in FIG. 3A is set, but the subject T moves relatively from the position indicated by the broken line T4 to the position indicated by the solid line T5. This shows a state in which blurring has occurred and the portion of the subject T where the contrast is high has moved relatively, for example, from the window W4 to the window W5. When the focusing operation for driving the lens of the
また、図6に、ウインドウW1〜W9を相対的に移動するピーク位置について示す。被写体Tが水平方向に相対的に移動する場合、ピーク位置の範囲は、各ウインドウW1〜W9の水平方向の画素数で決まり、ピーク位置X1は、図5(a)のウインドウW4でピーク位置の基準点をA、ピーク位置X2は、図5(a)のウインドウW5でピーク位置の基準点をBとした場合を示している。そして、光学系11の焦点距離すなわちレンズ位置をNとしたとき、このNに対して近(NEAR)方向をN−1、遠(FAR)方向をN+1とする。ここで、光学系11のレンズ位置がN−1から遠方向にN+1まで移動した時点で、ピーク位置がウインドウW4からウインドウW5に移動している。この状態では、ピーク位置は明らかに変化するので、合焦動作の実行中であっても被写体ブレの検出は容易にできる。
FIG. 6 shows the peak positions relatively moving in the windows W1 to W9. When the subject T moves relatively in the horizontal direction, the range of the peak position is determined by the number of pixels in the horizontal direction of each of the windows W1 to W9, and the peak position X1 is the peak position in the window W4 in FIG. The reference point is A, and the peak position X2 shows the case where the reference point of the peak position is B in the window W5 of FIG. When the focal length of the
しかしながら、このような被写体ブレが生じている場合でも、例えば、ウインドウW9のように、複数のウインドウにまたがってコントラストの大きい部分が移動しなければ、正しい評価値をもつウインドウも存在する。従って、このような複数のウインドウにまたがるピーク位置変化部分の検出を行うと同時にその変化のあったウインドウに対する評価値を重み付けによって小さくすることにより、正しい評価値のピークの位置を算出できる。 However, even when such subject blurring occurs, for example, a window having a correct evaluation value exists as long as a portion having a large contrast does not move across a plurality of windows, such as the window W9. Therefore, the peak position of the correct evaluation value can be calculated by detecting the peak position changing portion extending over the plurality of windows and simultaneously reducing the evaluation value for the window having the change by weighting.
まず、説明を容易にするため、本実施の形態の前提となる構成について、図7ないし図10のフローチャートを参照して、上記の重み付け処理を行う合焦制御方法について説明する。図7は合焦処理の全体を示し、図8ないし図10は図7の合焦処理の一部の処理を詳細に示すものである。また、この図7は、ブラケット撮影を行わず、1個の焦点距離を算出する動作で説明する。 First, for ease of explanation, a focusing control method for performing the above-described weighting process will be described with reference to the flowcharts of FIGS. FIG. 7 shows the entire focusing process, and FIGS. 8 to 10 show a part of the focusing process in FIG. 7 in detail. Further, FIG. 7 will be described with an operation of calculating one focal length without performing bracket photographing.
図7に示すように、合焦処理では、複数の画像データを用いるが、まず、初期位置あるいは現状のレンズ位置で、1画面の合焦処理用撮影を行い、合焦画像範囲Wの画像データを得る(ステップ101)。次いで、撮影された画像データについて、合焦画像範囲Wの各ウインドウW1〜W9毎にコントラストの評価値を算出する(ステップ102)。この算出に当たっては、各ウインドウW1〜W9毎に全ラインのピーク値を加算する。次いで、各ウインドウW1〜W9毎の全ラインのピーク値の各基準となる位置からの相対位置を求め、各ウインドウW1〜W9毎に加算し、被写体Tの平均位置を算出する(ステップ103)。そして、撮影枚数Nの算出を行い(ステップ104)、このN回が終了するまで(ステップ105)、光学系11のレンズを移動しながら撮影を行い(ステップ106)、すなわちレンズの移動及び合焦処理用撮影をN回繰り返し(ステップ101〜106)、連続した画像データの評価値を取得する。
As shown in FIG. 7, a plurality of pieces of image data are used in the focusing process. First, one screen is shot for focusing processing at the initial position or the current lens position, and image data of the focused image range W is obtained. Is obtained (step 101). Next, for the captured image data, a contrast evaluation value is calculated for each of the windows W1 to W9 in the focused image range W (step 102). In this calculation, the peak values of all lines are added for each of the windows W1 to W9. Next, the relative positions from the reference positions of the peak values of all the lines for each window W1 to W9 are obtained and added for each window W1 to W9 to calculate the average position of the subject T (step 103). Then, the number of shots N is calculated (step 104), and shooting is performed while moving the lens of the optical system 11 (step 106), that is, the movement and focusing of the lens, until N times are completed (step 105). Processing photographing is repeated N times (
そして、ステップ106で駆動されたレンズ位置が被写体Tの距離に比較的近い場合は、ステップ101で合焦処理用撮影した画像データからステップ103で算出した平均位置には、被写体Tの主となるコントラストの特徴が十分に反映される。従って、特にレンズ位置が被写体Tの距離に近いウインドウで、手振れなどによる被写体移動があった場合は、ピーク位置の平均位置が変化することになる。
If the lens position driven in
ここで、合焦動作時の画像データの撮影枚数Nの算出部分(ステップ104)について、図8のフローチャートを参照して説明する。 Here, the calculation part (step 104) of the number N of photographed image data during the focusing operation will be described with reference to the flowchart of FIG.
この撮影枚数Nの設定は、光学系11のレンズの倍率や、撮影される被写体Tの距離情報、あるいは、撮影者が指定する撮影条件などに応じて、撮影枚数Nを変化させることにより、必要十分な画像データを取得するものである。
This setting of the number of shots N is necessary by changing the number of shots N according to the magnification of the lens of the
まず、図7のステップ102で算出した各ウインドウW1〜W9の評価値FVを、所定の基準値FVTHnと比較し(ステップ201)、評価値FVが基準値FVTHnより大きい場合は、NにN0を入力する(ステップ202)。なお、このステップ201の工程は設けないこともできあるいは、N0は、焦点倍率に応じた変数としてNに入力することもできる。また、評価値FVが基準値FVTHn以下であり(ステップ201)、撮像装置10の操作者である撮影者の設定などにより近距離撮影とされ(ステップ203)、あるいは焦点倍率が比較的大きい、例えば2倍以上の場合は(ステップ204)、NにN2を入力する(ステップ205)。一方、上記の条件から外れる場合、すなわち、評価値FVが基準値FVTHn以下であり(ステップ201)、近距離撮影でなく(ステップ203)、かつ焦点倍率が比較的小さい、例えば2倍未満の場合は(ステップ204)、NにN1を入力する(ステップ206)。ここで、値N0,N1,N2については、N0<N1<N2の関係があり、近距離撮影や焦点倍率が大きい場合には、撮影枚数Nを大きくして光学系11のレンズ駆動を設定を細かく設定し、詳細な評価を可能にするとともに、算出した評価値FVが所定の基準値FVTHn以上である場合など、被写体Tが光学系11に近接している場合などは、撮影枚数Nを少なくして、合焦時間を短縮することができる。すなわち、レンズ駆動範囲を評価値により選択設定する手段を設けることにより、合焦の精度を低下させずに合焦時間を短縮できる。
First, the evaluation value FV of each window W1 to W9 calculated in
そして、図7に示すように、N回の撮影を行って取得したピーク位置の平均位置に対し、手振れなどを判定し、各ウインドウWh(W1〜W9)毎の信頼度である重み付け量を算出する(ステップ111)。以下、図9のフローチャートを参照して、この判定手段による重み付け量の算出について詳細に説明する。 Then, as shown in FIG. 7, camera shake or the like is determined with respect to the average position of the peak positions obtained by performing N times of imaging, and a weighting amount that is a reliability for each window Wh (W1 to W9) is calculated. (Step 111). Hereinafter, the calculation of the weighting amount by the determination unit will be described in detail with reference to the flowchart of FIG.
この処理では、まず、ピーク値平均位置移動量PTHの初期値Kp=PTH(base)を予め設定し(ステップ301)、各シーンを撮影した合焦画像範囲WのウインドウWhのそれぞれについて、ステップ102で算出した評価値から最も高い評価値を示した単数あるいは複数のシーンS(H)Whを求める(ステップ302)。 In this process, first, an initial value Kp = PTH (base) of the peak value average position movement amount PTH is set in advance (step 301), and step 102 is performed for each window Wh of the focused image range W in which each scene is photographed. One or a plurality of scenes S (H) Wh showing the highest evaluation value is obtained from the evaluation values calculated in (Step 302).
また、このピーク値平均位置移動量PTHは、各ウインドウWhの重み付け量を選択する最終的な判定値として用いるもので、撮影条件、例えば輝度や焦点距離などに応じて変化する変数となっている。 Further, the peak value average position movement amount PTH is used as a final determination value for selecting the weighting amount of each window Wh, and is a variable that changes in accordance with photographing conditions such as luminance and focal length. .
すなわち、撮影シーンの輝度が比較的高い場合は(ステップ303)、シャッタスピードが比較的速くなるため、一つのウインドウWh内の移動量は小さくなる傾向がある。そこで、ピーク値平均位置移動量PTHの値の割合を予め設定した初期値Kp=PTH(base)より小さくし、すなわち、ピーク値平均位置移動量PTHに乗算する割合K(L)を例えば80%とする(ステップ304)。一方、撮影シーンの輝度がそれ以外、例えば比較的低い場合は(ステップ303)、割合K(L)を例えば100%とする(ステップ305)。続いて、焦点倍率が比較的高い場合は(ステップ306)、焦点倍率が低い場合に較べて手振れの可能性が高いことから、ピーク値平均位置移動量PTHの値の割合を予め設定した初期値PTH(base)より小さくし、すなわち、ピーク値平均位置移動量PTHに乗算する割合K(f)を例えば80%とする(ステップ307)。一方、焦点倍率がそれ以外、例えば比較的低い場合は(ステップ306)、割合K(f)を例えば100%とする(ステップ308)。 That is, when the luminance of the shooting scene is relatively high (step 303), the shutter speed is relatively high, and therefore the amount of movement within one window Wh tends to be small. Therefore, the ratio of the peak value average position movement amount PTH is made smaller than a preset initial value Kp = PTH (base), that is, the ratio K (L) by which the peak value average position movement amount PTH is multiplied is, for example, 80%. (Step 304). On the other hand, when the brightness of the photographic scene is other than that, for example, it is relatively low (step 303), the ratio K (L) is set to 100%, for example (step 305). Subsequently, when the focus magnification is relatively high (step 306), since the possibility of camera shake is higher than when the focus magnification is low, the ratio of the peak value average position movement amount PTH is set to an initial value set in advance. The ratio K (f) to be multiplied by the peak value average position movement amount PTH is set to 80%, for example, 80% (step 307). On the other hand, when the focus magnification is other than that, for example, when it is relatively low (step 306), the ratio K (f) is set to 100%, for example (step 308).
そして、予め設定した初期値PTH(base)に対して、求めた輝度及び焦点倍率に対する割合K(L),K(f)を乗じて、撮影シーンに最適な判定値としての、ピーク値平均位置移動量PTHを算出する(ステップ309)。すなわち、PTH=Kp×K(L)×K(f) の演算を行う。なお、ここでは、輝度及び焦点倍率に応じて、ピーク値平均位置移動量PTHを算出したが、予め最適判定値を求めることができれば、ピーク値平均位置移動量PTHの初期値PTH(base)をそのままピーク値平均位置移動量PTHとして用いることもできる。 Then, the peak value average position as the optimum judgment value for the shooting scene is obtained by multiplying the preset initial value PTH (base) by the ratios K (L) and K (f) to the obtained luminance and focus magnification. A movement amount PTH is calculated (step 309). That is, PTH = Kp × K (L) × K (f) is calculated. Here, the peak value average position movement amount PTH is calculated according to the luminance and the focus magnification. However, if the optimum determination value can be obtained in advance, the initial value PTH (base) of the peak value average position movement amount PTH is calculated. The peak value average position movement amount PTH can be used as it is.
次いで、各ウインドウWhの信頼度を算出する動作として、まず、重み付け量である重み付け係数を初期化する(ステップ310)。この重み付け係数は、100%に対する割合で示され、例えば100%に初期化される。同時に、求めたピーク値平均位置移動量PTHに応じて、重み付け係数を変数として設定できるように変数mを設ける。例えば、重み付け係数を4段階に設ける場合は、mは初期値を4として、4,3,2,1の値が与えられる。 Next, as an operation for calculating the reliability of each window Wh, first, a weighting coefficient as a weighting amount is initialized (step 310). This weighting coefficient is shown as a ratio with respect to 100%, and is initialized to 100%, for example. At the same time, a variable m is provided so that the weighting coefficient can be set as a variable according to the obtained peak value average position movement amount PTH. For example, when the weighting coefficient is provided in four stages, m is given a value of 4, 3, 2, 1 with an initial value of 4.
そして、重み付けの判定を行う際は、求めたピーク値平均位置移動量PTHに対しその割合を、変数mを使ってピーク値平均位置移動量PTH(m)と変化可能に設定する(ステップ311)。具体的には、求めたピーク値平均位置移動量PTHを変数mで除して、ピーク値平均位置移動量PTH(m)を求める。 When weighting is determined, the ratio of the obtained peak value average position movement amount PTH is set to be variable with the peak value average position movement amount PTH (m) using the variable m (step 311). . Specifically, the peak value average position movement amount PTH (m) is obtained by dividing the obtained peak value average position movement amount PTH by the variable m.
そして、シーンS(H)Whで表されるピーク値平均位置ΔPS(H)Whと、前シーンS(H-1)Whで表されるピーク値平均位置ΔPS(H-1)Whとの差の絶対値が、ピーク値平均位置移動量PTH(m)より大きい場合には、判定手段であるCPU17は、手振れなどにより被写体TがウインドウW1〜W9間を移動し、あるいは評価値演算に影響があると判断する(ステップ312)。また、同様に、シーンS(H)Whで表されるピーク値平均位置ΔPS(H)Whと、後シーンS(H+1)Whで表されるピーク値平均位置ΔPS(H+1)Whとの差の絶対値が、ピーク値平均位置移動量PTH(m)より大きい場合には、判定手段は、手振れなどにより被写体TがウインドウW1〜W9間を移動し、あるいは評価値演算に影響があると判断する(ステップ313)。一方、これらの差の絶対値が両者ともピーク値平均位置移動量PTH(m)以下である場合は、手振れはない、または、評価値演算に影響がないものとして、当該ウインドウWhの重み付け係数は下げない。そして、変数mが大きいほど、比較するピーク値平均位置移動量PTH(m)は小さくなるが、ピーク値平均位置移動量の判定は厳しくなり、重み付け係数は、そのピーク値平均位置移動量PTH(m)に応じて決定する(ステップ315)。そして、ステップ312あるいはステップ313において、いずれかの差の絶対値が設定したピーク値平均位置移動量PTH(m)より大きい場合は、手振れがあるものとして、当該ウインドウWhの重み付けを下げ、重み付け係数を例えば最大25%まで下げる(ステップ315)。そして、この比較演算を、変数mを初期値例えば4から1つずつ減算し(ステップ316)、変数が0になるまで繰り返し(ステップ311〜317)、各変数に応じて重み付け量を決定する(ステップ314,315)。なお、この重み付け係数は、例えば最小25%としたが、この構成に限られず、例えば最小0%とすることもできる。また、ピーク値平均位置移動量PTH(m)は、前工程で求めたピーク値平均位置移動量PTHに対する割合として設定したが、可能であれば、予め設定した複数の最適判定値を用いることもできる。
The difference between the peak value average position ΔPS (H) Wh represented by the scene S (H) Wh and the peak value average position ΔPS (H-1) Wh represented by the previous scene S (H-1) Wh. Is larger than the peak value average position movement amount PTH (m), the
そして、このように、手振れがあったか否かを複数の判定基準を設けて判断することにより、信頼度のレベルをより細かく複数設定することが可能になる。 In this way, it is possible to set a plurality of levels of reliability more finely by determining whether or not there is a camera shake by providing a plurality of determination criteria.
さらに、全てのウインドウW1〜W9について演算が終了するまで、この動作を繰り返す(ステップ301〜318)。この重み付けにより、各ウインドウW1〜W9の信頼度を重み付け係数として数値化できる。
Further, this operation is repeated until the calculation is completed for all windows W1 to W9 (
そして、ウインドウS(H)Whに隣り合ったウインドウについて、前記の処理を行うことにより、手振れなどピークとなる被写体の移動の影響があったか否かを知ることができる。すなわち、図7に示すように、各ウインドウWhの重み付け係数(信頼度)を算出した後、まず、Eval FLGを0にセットする(ステップ112)。この後、重み付け係数すなわち信頼度が100%であるウインドウWhの数が所定値以上、例えば50%以上ある場合(ステップ113)、あるいは、互いに隣り合ったウインドウWhの信頼度が共に所定値以上、例えば共に100%のウインドウWhが存在する場合(ステップ114)は、シーンに被写体Tの移動がないと判断し、以下説明する評価重み付けは行わず、評価値が予め決められた判定値より大きいか否かを比較して(ステップ117)有効か無効かの判定を行う。 Then, by performing the above-described processing on the window adjacent to the window S (H) Wh, it is possible to know whether or not there has been an influence of the movement of the peak subject such as camera shake. That is, as shown in FIG. 7, after calculating the weighting coefficient (reliability) of each window Wh, first, Eval FLG is set to 0 (step 112). Thereafter, when the number of windows Wh having a weighting coefficient, that is, reliability of 100% is equal to or greater than a predetermined value, for example, 50% or greater (step 113), or the reliability of adjacent windows Wh is equal to or greater than a predetermined value. For example, if both windows Wh exist (step 114), it is determined that there is no movement of the subject T in the scene, and evaluation weighting described below is not performed, and is the evaluation value larger than a predetermined determination value? Is compared (step 117) to determine whether it is valid or invalid.
一方、ステップ113及びステップ114の条件をいずれも満たさなかった場合は、以下に示すように、重み付け係数を加味した演算処理を行う。すなわち、各ウインドウW1〜W9の重み付け係数を算出した後、求めた重み付け係数を各ウインドウW1〜W9毎の各評価値全体に乗算し、評価値の重み付けを各評価値自身に反映させる(ステップ115)。このとき、重み付けを加味した演算処理を行ったことを示すため、Eval FLGを1にセットする(ステップ116)。
On the other hand, when neither of the conditions of
次いで、重み付けされた各評価値について、予め決められた判定値VTHより大きいか比較して(ステップ117)、評価対象として有効か(ステップ118)、無効か(ステップ119)を判断する動作を全てのウインドウW1〜W9について行う(ステップ117〜120)。
Next, each weighted evaluation value is compared with whether it is larger than a predetermined determination value VTH (step 117), and all operations for determining whether the evaluation target is valid (step 118) or invalid (step 119) are all performed. For windows W1 to W9 (
そして、複数のウインドウが有効となった場合は、CPU17は、有効とされたウインドウの合焦位置すなわち部分合焦位置のなかから、合焦距離演算を行い(ステップ121)、合焦距離を求める。
When a plurality of windows are enabled, the
このステップ121の合焦距離演算の詳細を図10に示す。ここでは、まず、評価値の演算で重み付けを加味したか否かをEval FLGの状態から判定し(ステップ401)、重み付けをしている場合は、それらの評価値を距離毎に加算し(ステップ402)、重み付けをしていない場合は、加算を行わない。そして、これら評価値から、ピーク合焦位置(ピーク位置)を求める(ステップ403)。そして、これらピーク合焦位置が全て設定された撮影範囲外にあった場合(ステップ404)、または、全てのピーク合焦位置の信頼度が所定値以下、例えば25%以下の場合(ステップ405)は、被写体距離の算出が不能と判断し、予め設定した所定距離を合焦位置(合焦焦点位置)として強制的に設定する(ステップ406)。この時、合焦距離判定がNGであると判定する(ステップ407)。
Details of the focus distance calculation in
また、上記以外の場合、すなわち設定された撮影範囲内にあるピーク合焦位置(ピーク位置)が少なくとも一つ存在し(ステップ404)、かつ、この設定された撮影範囲内にあるピーク合焦位置が所定値より大きい、例えば25%より大きい信頼度を有する場合(ステップ405)は、被写体距離の算出が可能と判断し、有効とされたウインドウW1〜W9の中から、ピーク位置が最至近の部分合焦位置を選択し、この位置を合焦位置とする(ステップ408)。この時、合焦距離判定がOKであると判定する(ステップ409)。 In other cases, that is, there is at least one peak focus position (peak position) within the set shooting range (step 404), and the peak focus position is within the set shooting range. Is greater than a predetermined value, for example, greater than 25% (step 405), it is determined that the subject distance can be calculated, and the peak position is the closest among the valid windows W1 to W9. A partial focus position is selected, and this position is set as the focus position (step 408). At this time, it is determined that the in-focus distance determination is OK (step 409).
なお、この合焦距離演算において、重み付けした場合は、ステップ402にて、それぞれの評価値を加算して算出するため、評価値は一つとなり、ピーク位置は複数の評価値を含んだ重心の位置となるが、この構成に限られず、ピーク位置が近距離のウインドウのみを選択し、ウインドウ毎に加算した上で、部分焦点位置を算出し、この位置を合焦位置とすることもできる。また、重み付けしない場合は、評価値が有効なウインドウW1〜W9から最至近の部分焦点位置を選んで、合焦位置とすることもできる。
In this in-focus distance calculation, when weighting is performed, the respective evaluation values are added and calculated in
そして、このように合焦距離演算(ステップ121)から求められた合焦距離判定の結果(ステップ407,409)に応じて、図7に示すように、合焦距離判定がOKかNGかの判定を行い(ステップ122)、OKの場合には算出した合焦位置に光学系11のレンズを移動させ(ステップ123)、NGの場合には予め設定した所定の合焦位置に光学系11のレンズを移動させ(ステップ124)ることにより、最終合焦位置にレンズを配置することができる。
Then, depending on the result of the focus distance determination (
このように、この構成によれば、デジタルカメラ、ビデオカメラなどの撮像装置に用いる画像データ利用の自動合焦装置であって、画面を複数の領域に分割し、各領域でそれぞれ合焦位置を判定する方式の自動合焦動作において、被写体の移動や手振れなど、測距に障害があるシーンにおいても、ブレを検出し、最適データのみを用いて適正に距離を測定し光学系11を合焦できる。
Thus, according to this configuration, an automatic focusing device using image data used for an imaging device such as a digital camera or a video camera, the screen is divided into a plurality of regions, and the focusing position is set in each region. In the autofocus operation of the determination method, even in scenes where distance measurement is disturbed, such as subject movement or camera shake, the blur is detected, the distance is appropriately measured using only the optimum data, and the
すなわち、複数の領域でそれぞれ評価値のピークが算出された場合に、最も高い評価値を示した合焦位置である部分焦点距離を単に合焦位置とする構成に較べ、信頼度を加味した評価重み付けの手法により、手振れなどによる信頼度の低いウインドウから得られる部分焦点距離を除外し、評価値が最も高くなくとも、信頼できる評価値のみを利用して判断し、有効とされた評価値のなかで最至近の部分焦点距離を用いることにより、正確に合焦する確率を向上し、合焦位置を正確に判断して焦点の合った撮影をすることができる。特に、光学系11のズームの倍率の大きいいわゆる高倍率モデルで有効に機能させることができる。
In other words, when the peak of the evaluation value is calculated in each of the plurality of regions, the evaluation taking into account the reliability compared to the configuration in which the partial focal length that is the in-focus position showing the highest evaluation value is simply the in-focus position. By using the weighting method, the partial focal length obtained from a window with low reliability due to camera shake, etc. is excluded, and even if the evaluation value is not the highest, judgment is made using only the reliable evaluation value, and In particular, by using the closest partial focal length, it is possible to improve the probability of accurate focusing, accurately determine the in-focus position, and perform in-focus shooting. In particular, the
また、ノイズなどの影響による評価値や有効な被写体が当該ウインドウ内にない場合の評価値など、重み付け前の評価値自体が低い場合にも、当該ウインドウを無効とすることにより、焦点距離を正確に検出できる。 In addition, even if the evaluation value before weighting is low, such as an evaluation value due to the influence of noise or an evaluation value when there is no valid subject in the window, the focal length can be accurately determined by invalidating the window. Can be detected.
すなわち、複数領域を有する複数の焦点距離算出において、一般的に有効とされる近距離を優先とした場合、従来の方法では、被写体移動や手振れなどにより誤ったピークが被写体より近距離にあると、被写体を合焦位置と判断できず、誤ったピークを合焦位置と判断し、合焦位置を正しく設定できない場合があるが、本実施の形態では、被写体移動や手振れによる誤ったピークが近距離にあっても、被写体移動や手振れを検出して、最適データのみを用いて適正でかつ近距離を優先した合焦位置を正しく設定できる。 In other words, in the calculation of a plurality of focal lengths having a plurality of regions, when priority is given to a generally effective short distance, in the conventional method, an erroneous peak due to subject movement, camera shake, or the like is closer to the subject. In some cases, the subject cannot be determined as the in-focus position, and an incorrect peak is determined as the in-focus position, and the in-focus position cannot be set correctly. Even if it is at a distance, it is possible to detect subject movement and camera shake, and to correctly set an in-focus position that is appropriate and prioritizes short distance using only optimum data.
また、従来の、画像検出領域を変更することにより被写体の画像ブレや手振れの補正を行い、画像検出領域を変更した後に再度焦点の評価を行う方法では、合焦位置を算出するまでに時間がかかり、シャッターチャンスを逃すおそれがあるが、この構成では、予め設定された画像検出領域から与えられた情報のみから合焦位置を算出するため、迅速な処理が可能になり、シャッターチャンスをとらえることができる。 Further, in the conventional method of correcting the image blur or camera shake of the subject by changing the image detection area and performing the focus evaluation again after changing the image detection area, it takes time to calculate the in-focus position. However, in this configuration, the in-focus position is calculated only from the information given from the preset image detection area, so that quick processing is possible and the photo opportunity is captured. Can do.
また、被写体の画像ブレや手振れなどを検出する加速度センサなどの特別な機器を備える必要がなく、構成を簡略化して、製造コストを低減できる。 Further, it is not necessary to provide a special device such as an acceleration sensor for detecting image blur or camera shake of a subject, and the configuration can be simplified and the manufacturing cost can be reduced.
また、算出された複数の被写体距離の信頼性が高くなるので、その他のアルゴリズムを組むことが可能になる。 In addition, since the reliability of the calculated plurality of subject distances becomes high, other algorithms can be assembled.
また、予め設定された画像検出領域内で評価値を取得して焦点位置を算出するため、意図しない被写体に合焦することによる撮影者の違和感を抑制できる。 In addition, since the evaluation value is acquired within the preset image detection area and the focal position is calculated, it is possible to suppress the photographer's uncomfortable feeling caused by focusing on an unintended subject.
また、蛍光灯などによるフリッカーのある画像の輝度変化に影響されず、画像の評価値のピーク位置が変動しないため、評価値の大きさに係わらず、複数領域毎の信頼性を評価できる。 In addition, since the peak position of the evaluation value of the image does not fluctuate without being affected by the luminance change of the flickered image due to a fluorescent lamp or the like, the reliability for each of the plurality of regions can be evaluated regardless of the size of the evaluation value.
なお、上記の実施の形態では、光学系11の動作を伴いながら複数の位置の評価値を取得し、評価値が増加から減少に転じた時点でピークを判定するいわゆる山登り方式の測距方式を採用しているが、被写体ブレの場合には、ピーク位置が各ウインドウ内を移動し、やがて隣接するウインドウW1〜W9に移動する。そして、被写体Tのコントラストのピーク部分が一つのウインドウから他のウインドウに移動する際には、評価値のピーク値も急激に小さくなる。このように、前後に撮影されたシーンに対して評価値が急激に変化したウインドウは、重み付けを小さくすることにより、手振れのあるデータを排除し、最適データのみを用いて適正に測距し合焦できる。
In the above-described embodiment, a so-called hill-climbing distance measuring method is used in which evaluation values at a plurality of positions are acquired while the operation of the
また、この構成では、評価値のピーク位置を加算しており、比較的ぼけた画像のピーク位置はばらつく。そこで、ばらつきの大きいものは重み付けを低くすることができ、また、もともとピーク値も低い場合は評価値の重み付けを小さくすることができる。 In this configuration, the peak position of the evaluation value is added, and the peak position of the relatively blurred image varies. Therefore, the weighting of a large variation can be reduced, and when the peak value is originally low, the weighting of the evaluation value can be decreased.
このように、光学系11のレンズ位置の移動毎に、同一のウインドウの評価値のピーク値の差を測定し、または、互いに隣接したウインドウのピーク位置の平均位置の移動量の差を測定し、あるいはこれらの両者を測定することにより、当該ウインドウの評価値に対する信頼度を判定し、信頼度を高めることができる。従って、最終合焦位置を決める際に、複数領域に対する焦点位置から近距離を選択する場合、手振れの場合や被写体が移動する場合にも測距の信頼度を向上できる。
In this way, each time the lens position of the
このようにして、被写体ブレなどがある場合にも、合焦信頼性を向上できる。 In this way, it is possible to improve the focusing reliability even when there is a subject blur or the like.
なお、この構成では、水平方向の被写体Tの移動に対応する構成について説明したが、この構成に加え、あるいは、この構成とともに、垂直方向あるいは斜め方向についても、同様に適用することができる。 In this configuration, the configuration corresponding to the movement of the subject T in the horizontal direction has been described. However, in addition to this configuration or in addition to this configuration, the configuration can be similarly applied to the vertical direction or the oblique direction.
また、図1及び図2に示す画像処理回路15は、例えばCPU17など他の回路と同一のチップで構成し、あるいは、CPU17のソフトウェア上で実現し、回路を簡素化して製造コストを低減することもできる。また、この画像処理回路15のフィルタ回路32は、コントラストの検出ができれば、どのような構成でも実現できる。
Further, the
また、測距方式は、いわゆる山登り方式に限られず、自動合焦装置の動作可能な範囲を全てスキャンすることもできる。 Further, the distance measuring method is not limited to the so-called hill-climbing method, and it is also possible to scan the entire operable range of the automatic focusing device.
また、各ウインドウ毎の評価値を、図9に示す重み付けの処理の後に、互いに隣接する複数のウインドウについて加算し、あるいは、選択した複数のウインドウの評価値を加算した後に、重み付けの処理を行うこともできる。 Also, the evaluation value for each window is added to a plurality of windows adjacent to each other after the weighting process shown in FIG. 9, or the weighting process is performed after adding the evaluation values of a plurality of selected windows. You can also.
また、図7及び図9に示す処理においては、ピーク値平均位置移動量PTH値及び判定値VTHは予め一つ設定したが、複数設定した中から選択可能とし、また、評価値の大小、あるいは輝度情報やシャッタスピード、焦点倍率などの光学系11の情報などの撮影条件などに応じて可変とし、最適値を選択可能とし、あるいは、これら条件を変数として演算を行い最適値を求めることにより、シーンに応じた評価を行うことができる。
In the processing shown in FIGS. 7 and 9, one peak value average position movement amount PTH value and one determination value VTH are set in advance, but can be selected from a plurality of set values. By making it variable according to shooting conditions such as information on the
さらに、ストロボを使用する場合の撮影においては、合焦処理用撮影に同期してストロボを発光させ、各シーンに対する画像データを得ることにより、上記の焦点距離検出方法を用いて合焦距離を検出できる。そして、このストロボを用いる構成においては、合焦距離に応じたストロボの発光制御と、カメラの絞りやシャッタスピードなどの光量制御とに基づいて、撮影を行うことができる。 Furthermore, when shooting with a strobe, the in-focus distance is detected using the above-mentioned focal length detection method by emitting the strobe in synchronization with in-focus processing shooting and obtaining image data for each scene. it can. In the configuration using the strobe, photographing can be performed based on the light emission control of the strobe according to the in-focus distance and the light amount control such as the aperture and shutter speed of the camera.
また、この構成においては、有効とされた評価値のなかで最至近の部分焦点距離を用い、すなわち、ピーク位置が最至近の部分合焦位置を選択し、この位置を合焦位置とした(ステップ408)が、この構成に限られず、使用者すなわち撮影者の意図すなわち撮影モードを選択する操作に応じて、撮影者の操作により直接的に、あるいは撮影者の操作に応じた制御手段の選択により自動的に、最至近以外の部分合焦位置を選択して合焦位置とすることもできる。また、上記の実施の形態においては、合焦距離判定がNGの場合(ステップ122)、予め設定した所定の合焦位置に光学系11のレンズを移動させ(ステップ124)たが、予め複数の所定の合焦位置を設定し、撮影者の意図すなわち撮影モードを選択する操作に応じて、いずれかの所定の合焦位置に光学系11のレンズを移動させることができる。
Further, in this configuration, the closest partial focal length is used among the evaluation values that are validated, that is, the partial focusing position with the closest peak position is selected, and this position is set as the focusing position ( The step 408) is not limited to this configuration, and the control means is selected directly by the photographer's operation or according to the photographer's operation according to the user's or photographer's intention, that is, the operation for selecting the photographing mode. Thus, it is possible to automatically select a partial in-focus position other than the closest to the in-focus position. In the above embodiment, when the in-focus distance determination is NG (step 122), the lens of the
このように、この焦点距離検出方法では、互いに隣接する複数の画像検出領域を設定し、光学系の焦点距離を変化させながら複数の画像データを取得し、取得した前記複数の画像データから、各画像検出領域毎に、それぞれコントラストの評価値のピーク値がいずれの画像データで記録されたかにより部分焦点距離を算出するとともに、それぞれ前記ピーク値を記録した位置の前記複数の画像データ間における移動に応じた信頼度を算出し、前記信頼度及び前記評価値に応じて、前記部分焦点距離及び所定の焦点距離の中から焦点距離を選択するものである。そして、この構成では、コントラストの評価値のピーク値を記録した位置の画像データ間における移動に応じた信頼度を算出したため、被写体が相対的に移動した信頼度の低い画像検出領域の部分焦点距離は選択の対象から外し、正確な焦点距離の検出が可能になる。 Thus, in this focal length detection method, a plurality of image detection areas adjacent to each other are set, a plurality of pieces of image data are obtained while changing the focal length of the optical system, and each of the obtained pieces of image data is For each image detection area, the partial focal length is calculated based on which image data is recorded with the peak value of the contrast evaluation value, and the position where the peak value is recorded is moved between the plurality of image data. A corresponding reliability is calculated, and a focal length is selected from the partial focal length and a predetermined focal length according to the reliability and the evaluation value. In this configuration, since the reliability corresponding to the movement between the image data at the position where the peak value of the contrast evaluation value is recorded is calculated, the partial focal length of the image detection region with low reliability where the subject has moved relatively Is removed from the selection target, and the focal length can be detected accurately.
また、この焦点距離検出方法では、算出した信頼度に応じて、評価値に重み付けを行い、重み付けを行った評価値に応じて、画像検出領域の部分焦点距離の中から焦点距離を選択するものである。そして、この構成では、算出した信頼度に応じて重み付けを行った評価値を用いることにより、信頼度の低い画像検出領域の部分焦点距離は選択の対象から外し、正確な焦点距離の検出が可能になる。 In this focal length detection method, the evaluation value is weighted according to the calculated reliability, and the focal length is selected from the partial focal lengths of the image detection area according to the weighted evaluation value. It is. In this configuration, by using the evaluation value weighted according to the calculated reliability, the partial focal length of the image detection area with low reliability is excluded from the selection target, and the accurate focal length can be detected. become.
また、この焦点距離検出方法では、ピーク値を記録した位置が前記ピーク値を記録した位置のある少なくとも一つの画像検出領域から他の少なくとも一つの画像検出領域に移動した場合に、信頼度を下げるものである。そして、この構成では、被写体が相対的に移動した信頼度の低い画像検出領域の部分焦点距離は選択の対象から外し、正確な焦点距離の検出が可能になる。 In this focal length detection method, the reliability is lowered when the position where the peak value is recorded moves from at least one image detection area where the peak value is recorded to another at least one image detection area. Is. In this configuration, the partial focal length of the image detection region with low reliability in which the subject has moved relatively is excluded from the selection target, and the accurate focal length can be detected.
また、この焦点距離検出方法では、ピーク値を記録した位置が前記ピーク値を記録した位置のある複数の画像データ間で所定の距離を超えて移動した場合に、信頼度を下げるものである。そして、この構成では、被写体が相対的に移動した信頼度の低い画像検出領域の部分焦点距離は選択の対象から外し、正確な焦点距離の検出が可能になる。 Further, in this focal length detection method, when the position where the peak value is recorded moves beyond a predetermined distance between a plurality of image data where the peak value is recorded, the reliability is lowered. In this configuration, the partial focal length of the image detection region with low reliability in which the subject has moved relatively is excluded from the selection target, and the accurate focal length can be detected.
また、この焦点距離検出方法では、ピーク値が大きい画像データを取得した場合には、取得する画像データの数を減少させるものである。そして、この構成では、必要十分な画像データのみを取得することにより、合焦時間の短縮が可能となる。 Further, in this focal length detection method, when image data having a large peak value is acquired, the number of image data to be acquired is reduced. In this configuration, the focusing time can be shortened by acquiring only necessary and sufficient image data.
また、この焦点距離検出方法では、信頼度の算出の際に、ピーク値を記録した位置が移動したか否かを判定するピーク位置移動判定値は、撮影条件に応じて求められる変数であるものである。そして、この構成では、撮影条件に応じてピーク位置移動判定値を設定することにより、撮影条件に応じたより適切な信頼度が算出され、適切な焦点距離の検出が可能になる。 Further, in this focal length detection method, when calculating the reliability, the peak position movement determination value for determining whether or not the position where the peak value is recorded has moved is a variable obtained according to the shooting conditions. It is. In this configuration, by setting the peak position movement determination value according to the imaging condition, a more appropriate reliability according to the imaging condition is calculated, and an appropriate focal length can be detected.
また、この焦点距離検出方法では、信頼度の算出の際に、ピーク値を記録した位置が移動したか否かを判定するピーク位置移動判定値は、複数設定され、順次画像データと比較されるものである。そして、この構成では、ピーク位置移動判定値を複数設定し、順次画像データと比較することにより、段階的な信頼度の設定が可能になり、適切な焦点距離の検出が可能になる。 Further, in this focal length detection method, when calculating the reliability, a plurality of peak position movement determination values for determining whether or not the position where the peak value is recorded have moved are set and sequentially compared with the image data. Is. In this configuration, by setting a plurality of peak position movement determination values and sequentially comparing them with the image data, it is possible to set the reliability stepwise and to detect an appropriate focal length.
また、この合焦装置では、撮像素子と、この撮像素子に被写体を結像させる光学系と、この光学系の焦点距離を変化させる光学系駆動手段と、前記撮像素子から出力された画像データを処理するとともに前記光学系駆動手段を制御する画像処理手段とを具備し、この画像処理手段は、前記光学系駆動手段を制御し前記光学系の焦点距離を変化させながら複数の画像データを取得し、取得した前記複数の画像データに、互いに隣接する複数の画像検出領域を設定し、各画像検出領域毎に、それぞれコントラストの評価値のピーク値がいずれの画像データで記録されたかにより部分焦点距離を算出するとともに、それぞれ前記ピーク値を記録した位置の前記複数の画像データ間における移動に応じた信頼度を算出し、前記信頼度及び前記評価値に応じて、前記部分焦点距離及び所定の焦点距離の中から焦点距離を選択するものである。そして、この構成では、コントラストの評価値のピーク値を記録した位置の画像データ間における移動に応じた信頼度を算出したため、被写体が相対的に移動した信頼度の低い画像検出領域の部分焦点距離は選択の対象から外し、正確な焦点距離の選択及び合焦が可能になる。 Further, in this focusing device, an image sensor, an optical system that forms an image of a subject on the image sensor, an optical system drive unit that changes a focal length of the optical system, and image data output from the image sensor Image processing means for processing and controlling the optical system driving means, the image processing means controlling the optical system driving means to acquire a plurality of image data while changing the focal length of the optical system. A plurality of adjacent image detection areas are set in the acquired plurality of image data, and for each image detection area, a partial focal length depends on which image data is recorded with the peak value of the contrast evaluation value. And calculating the reliability according to the movement between the plurality of image data at the position where the peak value is recorded, and calculating the reliability and the evaluation value. Flip and is for selecting the focal length from among the partial focal lengths and a predetermined focal length. In this configuration, since the reliability corresponding to the movement between the image data at the position where the peak value of the contrast evaluation value is recorded is calculated, the partial focal length of the image detection region with low reliability where the subject has moved relatively Can be removed from the selection target, and an accurate focal length can be selected and focused.
次に、図11ないし図16を参照して、本実施の形態の前提として、ブラケット撮影の個々の撮影のレンズの位置すなわち焦点距離を算出する動作を説明する。 Next, with reference to FIG. 11 to FIG. 16, as a premise of the present embodiment, an operation for calculating a lens position, that is, a focal length of each bracket shooting will be described.
この実施の形態では、上記の図7ないし図10に示す構成を前提とし、撮影者は、レンズ位置を確定するため、すなわち、ブラケット撮影の各色情報に対応する撮影の焦点距離の決定のために用いる画像データとして、輝度情報すなわち通常のYCC形式の輝度データの他、色情報すなわちRGB形式の画像データのR(赤)信号、G(緑)信号、及びB(青)信号を自動あるいは手動で選択可能になっている。さらに、撮影者は、通常の撮影モードである通常モードすなわち近距離優先モードに加え、遠距離優先モードを選択して設定可能であり、さらに遠景モードあるいは無限モードと称しうるモードにより撮影距離範囲を指定することができる。なお、図1ないし図10などに示す実施の形態の構成と同一の部分については、説明を省略する。また、この図11は、ブラケット撮影を行わず、1個の焦点距離を算出する動作で説明する。 In this embodiment, on the premise of the configuration shown in FIG. 7 to FIG. 10, the photographer decides the lens position, that is, decides the focal length of photographing corresponding to each color information of bracket photographing. As image data to be used, in addition to luminance information, that is, normal YCC format luminance data, color information, that is, R (red) signal, G (green) signal, and B (blue) signal of RGB format image data are automatically or manually. It can be selected. Furthermore, the photographer can select and set the long-distance priority mode in addition to the normal mode, that is, the short-distance priority mode, which is the normal photographing mode, and can further set the photographing distance range by a mode that can be referred to as a distant view mode or an infinite mode. Can be specified. The description of the same parts as those of the embodiment shown in FIGS. 1 to 10 will be omitted. Further, FIG. 11 will be described with an operation of calculating one focal length without performing bracket photographing.
すなわち、この構成では、撮影者が焦点距離の決定のために用いる画像データとして、輝度情報か色情報かを自動的に選択するかあるいは手動で選択するかを決定する操作手段と、手動の場合に、何色の光を用いるかを設定する操作手段とを備えているとともに、撮影者が遠距離優先モードや遠景モードを選択できる撮影モード選択手段である操作手段を備えている。そこで、図7に示す合焦装置の動作のフローチャートに対し、図11に示すように、合焦処理用撮影(ステップ101)の前に、撮影モードの設定処理(ステップ11)と画像信号判定処理(ステップ12)とが行われるとともに、画像信号判定処理で選択された画像データに対して、焦点距離の演算に用いる評価値の重み付け量を決定するため、各ウインドウの信頼度算出処理(ステップ111)と合焦距離演算(ステップ121)との内容が変更されている。 That is, in this configuration, an operation unit that determines whether luminance information or color information is automatically or manually selected as image data used by the photographer for determining the focal length, and a manual case Operating means for setting what color of light to be used, and operating means that is a photographing mode selecting means for allowing the photographer to select a long distance priority mode or a distant view mode. Therefore, in contrast to the flowchart of the operation of the focusing device shown in FIG. 7, as shown in FIG. 11, the shooting mode setting process (step 11) and the image signal determination process are performed before focusing processing shooting (step 101). (Step 12) is performed, and the reliability calculation process (Step 111) of each window is performed to determine the weighting amount of the evaluation value used for the focal length calculation for the image data selected in the image signal determination process. ) And the in-focus distance calculation (step 121).
すなわち、撮影モードの設定処理については、撮影距離範囲を指定する場合、焦点合わせ処理では、まず、焦点合わせの条件として、撮像装置10の撮影モードに合わせて、レンズの駆動範囲に伴う撮影距離範囲を把握する必要がある。もし、撮像装置10の撮影モードが、例えば通常モードで50cmから無限位置までであれば、レンズの駆動範囲をこれに応じて設定する。また、撮像装置10が、通常モード以外に、遠景モード(無限モード)、マクロモードなどを設定可能であれば、これらモードを撮影者が選択可能な操作手段、すなわち、撮影者が撮影距離範囲すなわちレンズの駆動範囲を指定できる操作手段を備える。
That is, for the shooting mode setting process, when specifying a shooting distance range, in the focusing process, first, as a focusing condition, the shooting distance range associated with the lens driving range is set in accordance with the shooting mode of the
また、焦点合わせ処理では、焦点合わせの条件として、最終焦点距離の決定方法について、近距離優先とするか、遠距離優先とするか、撮影者が撮像装置10に備えた操作手段を操作し、撮影モードを選択する。そして、撮像装置10の撮影モードが遠距離優先モードであれば、撮影画像の中の一番遠距離が合焦距離となるようにレンズを駆動する最遠距離選択モードを設定する。また、近距離優先モードでは、撮影画像の中から一番近距離が合焦距離となる最至近距離選択モードが設定され、一般的に用いられる近距離優先の撮影が可能になる。
Further, in the focusing process, as a focusing condition, the final focal length determination method is a short distance priority or a long distance priority, or the photographer operates the operating means provided in the
すなわち、図11に示す撮影モードの設定処理(ステップ11)は、図12に示すように、まず、撮影者が撮影距離範囲を指定しているかを判断する(ステップ1201)。そして、撮影距離範囲を選択するモードが選択されていると、さらに、遠景モードが選択されているかを判断する(ステップ1202)。さらに、遠景モードが選択されている場合は、最遠距離選択モードを設定し(ステップ1203)、遠景モードが選択されていない場合すなわち通常モードあるいはマクロモードの場合は、最至近距離選択モードを選択する(ステップ1204)。すなわち、ここでは、撮影距離範囲に応じて、近距離を優先するか、遠距離を優先するかの撮影モードが自動的に決定される。 That is, in the shooting mode setting process (step 11) shown in FIG. 11, first, as shown in FIG. 12, it is determined whether the photographer specifies the shooting distance range (step 1201). If the mode for selecting the shooting distance range is selected, it is further determined whether or not the distant view mode is selected (step 1202). Furthermore, when the distant view mode is selected, the farthest distance selection mode is set (step 1203), and when the distant view mode is not selected, that is, in the normal mode or the macro mode, the closest distance selection mode is selected. (Step 1204). That is, here, depending on the shooting distance range, the shooting mode for prioritizing the short distance or prioritizing the long distance is automatically determined.
一方、ステップ1201において、撮影距離範囲を選択するモードが選択されていない場合は、さらに、遠距離優先モードが選択されているかを判断する(ステップ1205)。ここで、撮影者が遠距離優先モードを選択している場合は、最遠距離選択モードを設定し(ステップ1203)、遠距離優先モードが選択されていない場合は、最至近距離選択モードを設定する(ステップ1204)。すなわち、ここでは、撮影者の意図に従い最終的な合焦距離を優先的に決定できる撮影モードが決定される。
On the other hand, when the mode for selecting the shooting distance range is not selected in
次に、図11に示す画像信号判定処理(ステップ12)は、図11のステップ11からステップ106までの焦点合わせ処理について、撮影者が被写体などに応じて輝度情報か色情報かを手動で設定するか、あるいは、撮像装置10側で自動的に設定するかの選択を行うものである。そして、この画像信号判定処理では、図13に詳細に示すように、まず、画像データが有している情報の内、輝度情報と色情報とのいずれを使用するかについて、撮影者が手動モードを選択しているかを判断する(ステップ1301)。そして、予め手動モードが設定されている場合は、さらに撮影者が色情報を利用するモードを選択しているかを判断する(ステップ1302)。そして、色情報を利用しない場合は、単一の輝度情報のみを利用するモードとし(ステップ1303)、RGBの色情報は選択しないため、変数CNを1(CN=1)として記憶する(ステップ1304)。また、ステップ1302で、焦点合わせのために輝度情報ではなく色情報を利用するモードを選択していた場合には、焦点距離演算に対するRGBの各色の色情報の重み付け量をそれぞれ設定値として任意に数値化して設定可能となる(ステップ1305)。例えば、RGBの3個の色情報を選択した場合は、色情報の数を示す変数CNを3(CN=3)として記憶する(ステップ1306)。そして、これら変数CNなど、色情報及び輝度情報の設定に応じて、図2に示すマトリクス補完回路27及びスイッチ28が設定される。
Next, in the image signal determination process (step 12) shown in FIG. 11, in the focusing process from
一方、ステップ1301で手動モードが選択されていない場合は、色情報及び輝度情報を自動的に選択する自動モードとなる。この自動モードでは、まず、撮影環境の輝度値を見る(ステップ1307)。もし、予め設定された輝度値LVTHよりも現在の輝度値LVが低い場合は、色情報が不足しているため、輝度情報のみで焦点合わせ用の画像データとする方が良いと判断し、ステップ1303に移行する。また、ステップ1307で、色情報を用いることが可能であると判断した場合は、ステップ11で設定された撮影モードなどの各種の設定に基づき、RGBの色情報の重み付けがそれぞれ自動的に設定される。
On the other hand, if the manual mode is not selected in
まず、ホワイトバランス追従モードに設定されている場合は(ステップ1308)、現在の被写体の色情報やホワイトバランスWBなどの情報に基づいてRGBの色情報の重み付け量がそれぞれ自動的に設定される(ステップ1309)。例えば、R(赤)の被写体が多いと判断した場合は、評価値の重み付け量を演算する場合、Rの重み付け量を大きくし、G(緑)やB(青)の重み付け量を小さくするように設定する。 First, when the white balance tracking mode is set (step 1308), the weighting amounts of the RGB color information are automatically set based on information such as the current subject color information and white balance WB ( Step 1309). For example, when it is determined that there are many R (red) subjects, the weighting amount of R is increased and the weighting amount of G (green) or B (blue) is decreased when calculating the weighting amount of the evaluation value. Set to.
なお、図示しないが、複数の画像エリアを設定可能な場合においては、設定された複数の画像エリアの色情報をそれぞれ検出し、一番値の大きい色の重み付け量を大きくすることもできる。 Although not shown, when a plurality of image areas can be set, the color information of the set plurality of image areas can be detected, respectively, and the weighting amount of the color having the largest value can be increased.
さらに、ステップ11で設定される以外の複数の撮影モードに対応して、評価値の重み付量を設定できる(ステップ1310)。 Further, the weighting amount of the evaluation value can be set corresponding to a plurality of shooting modes other than those set in step 11 (step 1310).
例えば、補助光装置23を備えた実施の形態では、補助光装置23による補助光L1,L2の発光の制御についての設定に基づき(ステップ1311)、予め定められたRGBの色情報の重み付け量がそれぞれ自動的にあるいは手動により設定される(ステップ1312,1305)。これら補助光L1,L2の制御である補助光判定処理について、図14を用いて詳細に説明する。撮影者は、補助光L1,L2を自動で発光させるか、手動で発光させるかを撮影モードとして選択することができる(ステップ1401)。このステップ1401で、手動モードが選択されていた場合は、撮影者の選択に従い、撮像装置10の補助光装置23の複数の補助光L1,L2の中から、発光させる補助光L1,L2を単独であるいは複数の組み合わせとして設定する(ステップ1402)。一方、ステップ1401で手動モードが選択されていなかった場合は、自動モードとなり、必要に応じて自動的に補助光L1,L2を発光させる(ステップ1403)。ここで、補助光L1,L2の発光が必要かどうかは、輝度情報などを用いてCPU17が判断する。さらに、補助光L1,L2を自動的に発光させる場合は、被写体の輝度情報や色情報などを用いて演算を行い(ステップ1404)、どのような色の補助光L1,L2が適しているか判断する。そして、この演算の結果、あるいは手動の設定に基づき、複数の補助光L1,L2を発光させる必要があるか否かを判断する(ステップ1405)。そして、いずれか1個の補助光L1,L2を発光すれば良い場合は、さらに、選択された第1の補助光L1(ステップ1406)あるいは第2の補助光L2(ステップ1407)の色情報に応じて、最適な重み付け量を、すなわち、評価値が最大となるように、RGBの各色情報の評価値に対する重み付け量を選択する(ステップ1408,1409)。
For example, in the embodiment provided with the auxiliary
さらに、3個以上のN個の補助光L1,L2,…LNを用い、これら補助光L1,L2,…LNにそれぞれ応じた重み付け量を設定することもできる(ステップ1410,1411)。なお、各補助光L1,L2,…LNの色情報が不定の場合には、エラーとして処理する必要があるが、このエラーの場合の設定値は、一般的な補助光である第1の補助光L1と仮定して重み付け量を設定する(ステップ1408)。また、自動あるいは手動により複数の補助光L1,L2を発光させる場合は(ステップ1405)、例えば、第1の補助光L1と第2の補助光L2とを同時に発光させる場合は(ステップ1412)、これら補助光L1,L2が同時に発光した状態での色情報に応じて、最適な重み付け量を、すなわち、評価値が最大となるように、RGBの各色情報の評価値に対する重み付け量を選択する(ステップ1413)。また、N個の補助光L1,L2,…LNを組み合わせて発光させる場合には(ステップ1414)、2個の補助光L1,L2を組み合わせて発光させる場合と同様に、補助光L1,L2,…LNの組み合わせに応じて最適な重み付け量を選択する(ステップ1415)。なお、組み合わせた状態の補助光L1,L2,…LNの色情報が不定の場合には、単独の補助光L1,L2,…LNを発光させる場合と同様に、エラーとして処理する必要があるが、このエラーの場合の設定値は、一般的な補助光の組み合わせとして第1の補助光L1と第2の補助光L2の組み合わせと仮定して重み付けを設定する(ステップ1413)。そして、この補助光判定処理で、最終的にいずれかの補助光L1,L2,…LNを発光させる場合には、変数LWeightFlgを1として記憶し(ステップ1416)、いずれの補助光L1,L2,…LNをも発光させない場合には、変数LWeightFlgを0として記憶し(ステップ1417)、図13に示すフローチャートに復帰する。なお、この変数LWeightFlgは、図13に示すフローチャートの撮影モード(ステップ1304)で、補助光L1,L2,…LNを発光させる場合に、上記の重み付け量の設定が終了しているか否かの判断のために用いる。
Further, using three or more N auxiliary lights L1, L2,... LN, the weighting amounts corresponding to these auxiliary lights L1, L2,... LN can be set (
また、ステップ1311で補助光L1,L2,…LNの発光を設定せず、撮影する範囲が近距離、すなわち、マクロ撮影の場合は(ステップ1313)、被写体は比較的鮮やかな色情報と推定できるため、RGBの色情報の重み付け量はRGB全ての色情報について大きくなるように設定する(ステップ1314)。
Further, if the emission of the auxiliary lights L1, L2,... LN is not set in
さらに、被写体が特定のものに限定される場合は、当該被写体の色に合焦しやすいように、また、当該被写体に近接して配置されることが予想される被写体以外の部材の色に合焦しにくいように、重み付け量を設定する。例えば、被写体を明確に花と指定するモードに設定された場合は(ステップ1315)、花に合焦したいのに緑色の葉に合焦してしまうことがないように、緑(G)の重み付けを小さくする(ステップ1316)。 Furthermore, when the subject is limited to a specific subject, it is easy to focus on the color of the subject and matches the color of a member other than the subject that is expected to be placed close to the subject. Set the weighting amount so that it is hard to burn. For example, when the mode is set so that the subject is clearly designated as a flower (step 1315), the weight of green (G) is set so that the user wants to focus on the flower but does not focus on the green leaf. Is reduced (step 1316).
また、上記いずれの条件にも該当しない場合、すなわち、色温度やホワイトバランスなどに追従するモードに設定されておらず(ステップ1308)、また、撮影モードが特に指定されていない、いわば設定なしモードの場合は(ステップ1310)、予め定めた所定の重み付け量を設定し(ステップ1317)、色情報の数を示す変数CNを3(CN=3)として記憶する(ステップ1306)。なお、この設定なしモードの場合は、例えば、人物の肌色に合焦しやすい重み付け量を設定することもできる。 If none of the above conditions is met, that is, the mode that follows the color temperature, white balance, etc. is not set (step 1308), and the shooting mode is not specified, so-called no setting mode. In this case (step 1310), a predetermined weighting amount set in advance is set (step 1317), and the variable CN indicating the number of color information is stored as 3 (CN = 3) (step 1306). In the no-setting mode, for example, a weighting amount that can easily focus on the skin color of a person can be set.
このようにして、図13及び図14に示す画像信号判定処理及び補助光判定処理において、ステップ1309,1312,1314,1316,1317,1408,1409,1411,1413,1415において、予め決められた重み付け量を設定する。そして、このように設定された色情報あるいは輝度情報に応じて、手動モード及び自動モードにおいて、図2に示すマトリクス補完回路27及びスイッチ28に色情報あるいは輝度情報が設定される。
In this way, in the image signal determination process and the auxiliary light determination process shown in FIGS. 13 and 14, the weights determined in advance in
次いで、図11のステップ101からステップ120の処理を行った後、設定された撮影モードに従い、合焦処理での最終合焦処理が決定される。
Next, after performing the processing from
ここで、ステップ11からステップ106の処理を繰り返し、1組の連続した画像データの評価値を取得するが、色情報の数が複数ある場合などには、複数組の評価値が取得される。そして、これら複数組の評価値を処理するため、ステップ111の各ウインドウの信頼度算出の処理及びステップ115の評価値の重み付け乗算の処理が、図7に示す実施の形態の構成と異なっている。
Here, the processing from
すなわち、選択された輝度情報あるいは色情報の画像データから得られた評価値は、図11のステップ111すなわち図15に示す処理で重み付け量が得られるが、画像データの色情報が複数ある場合は、予め記憶した色情報数CNを用いて、各ウインドウ毎の評価値Window(Wh)を求める。まず、図9に示す処理と同様に、図15のステップ301からステップ318の一連の処理を行う。ついで、CNB=CN−1の値を求める(ステップ319)。この後、求めた評価値Window(Wh)の値を、重み付け量Window(Wh)(CNB)に置き換える(ステップ320)。そして、CNBの演算結果が0となっている場合は(ステップ321)、輝度情報のみか、1色の色情報のみの対応で良いことがわかるため、ステップ320で置き換えた重み付け量Window(Wh)(CNB)の値を信頼度算出の結果としてストックする(ステップ322)。また、CN=3の場合には、3個の色情報について処理が終わるまで、重み付け量Window(Wh)(CNB)を求める。そして、全ての組すなわち全ての色の演算結果をそれぞれ算出したのち、各ウインドウの評価値Window(Wh)の色情報に応じた重み付け量Window(Wh)(CNB)がストックされる(ステップ322)。
That is, the evaluation value obtained from the image data of the selected luminance information or color information can be weighted in the process shown in
そして、図11に示すフローチャートのステップ112からステップ114の処理の後、各ウインドウのWindow(Wh)の色情報に応じた重み付け量Window(Wh)(CNB)を用い、評価値に重み付け乗算を行う演算処理を行う(ステップ115)。そして、この演算処理は、評価値に重み付け量すなわち信頼度を乗算する処理であるが、この実施の形態では、それぞれのウインドウ毎に色情報毎の評価値と信頼度とが得られているため、各色情報に合わせて演算処理を行う。すなわち、この重み付け演算は、一つのウインドウの評価値Window(Wh)に対して、
評価値(Wh)=Σ { FocusValue(CNB) × Window(CNB)} / CNB
となる。但し、CN=1の場合は、図7に示すステップ115と同様の演算処理となる。
Then, after the processing from
Evaluation value (Wh) = Σ {FocusValue (CNB) x Window (CNB)} / CNB
It becomes. However, in the case of CN = 1, the calculation process is the same as in
そして、この評価値(Wh)は、各ウインドウW1〜W9の各評価値全体に乗算される。 Then, this evaluation value (Wh) is multiplied by the entire evaluation value of each of the windows W1 to W9.
さらに、図11のステップ117からステップ120の処理を行った後、ステップ121では、図10に示す構成に代えて、図16に示す合焦距離演算を行う。
Further, after performing the processing from
ここでは、まず、図10の処理と同様に、評価値の演算で重み付けを加味したか否かをEval FLGの状態から判定し(ステップ1601)、重み付けをしている場合は、それらの評価値を距離毎に加算し(ステップ1602)、重み付けをしていない場合は、加算を行わない。そして、これら評価値から、ピーク合焦位置(ピーク位置)を求める(ステップ1603)。そして、図11のステップ11で決定された撮影モードに基づいて、連動範囲選択が設定されていれば(ステップ1604)、これらピーク合焦位置が設定された撮影距離範囲に対して全て範囲外にあった場合(ステップ1605)、または、全てのピーク合焦位置の信頼度が所定値以下、例えば25%以下の場合(ステップ1606)は、被写体距離の算出が不能と判断する(ステップ1607)。この場合、ステップ11で予め設定した撮影モードに応じて、所定距離を合焦位置(合焦焦点位置)として強制的に設定する。ここで、撮影モードは、最至近距離選択モードか最遠距離選択モードであるから、被写体距離の算出が不能と判断した場合、最遠距離選択モードであるか否かを判断し(ステップ1607)、最遠距離選択モードの場合は所定距離1を設定し(ステップ1608)を設定し、最遠距離選択モードでない場合は所定距離2を設定する(ステップ1609)。ここで、所定距離1は所定距離2より遠距離に設定されている(所定距離1>所定距離2)。そして、合焦距離判定がNGであると判定する(ステップ1610)。
Here, first, similarly to the processing of FIG. 10, it is determined from the state of Eval FLG whether or not weighting is taken into account in the evaluation value calculation (step 1601). Is added for each distance (step 1602), and when weighting is not performed, addition is not performed. Then, a peak focus position (peak position) is obtained from these evaluation values (step 1603). If the interlocking range selection is set based on the shooting mode determined in
また、図11のステップ11で決定された撮影モードに基づいて、連動範囲選択が設定されていない場合についても(ステップ1604)、全てのピーク合焦位置の信頼度が所定値以下、例えば25%以下の場合(ステップ1606)は、被写体距離の算出が不能と判断し(ステップ1607)、同様に処理する(ステップ1608〜1610)。
Further, even when the interlocking range selection is not set based on the shooting mode determined in
一方、ステップ1604〜1605において、上記以外の場合、すなわち、連動範囲選択が設定されており(ステップ1604)、設定された撮影モードで与えられる撮影モードに対応した撮影距離範囲内にあるピーク合焦位置(ピーク位置)が少なくとも一つ存在し(ステップ1605)、かつ、この設定された撮影範囲内にあるピーク合焦位置が所定値より大きい、例えば25%より大きい信頼度を有する場合(ステップ1606)は、被写体距離の算出が可能と判断する。そして、ピーク位置を決定するにあたり、ステップ11の撮影モードで決定された選択モードの内の、最遠距離選択モードの場合は(ステップ1611)、有効とされたウインドウW1〜W9の中から、ピーク位置が最遠の部分合焦位置を選択し、この位置を合焦位置とし(ステップ1612)最遠距離選択モードでない場合は(ステップ1611)、すなわち、最至近距離選択モードの場合は、有効とされたウインドウW1〜W9の中から、ピーク位置が最至近の部分合焦位置を選択し、この位置を合焦位置とする(ステップ1613)。そして、合焦距離判定がOKであると判定する(ステップ1614)。
On the other hand, in
また、図11のステップ11で決定された撮影モードに基づいて、連動範囲選択が設定されていない場合についても(ステップ1604)、所定値より大きい信頼度を有するピーク合焦位置が少なくとも一つ存在し(ステップ1606)、例えば25%より大きい信頼度を有するピーク合焦位置が存在する場合(ステップ1606)は、被写体距離の算出が可能と判断し、同様に処理する(ステップ1611〜1614)。
Further, even when the interlocking range selection is not set based on the photographing mode determined in
そして、このような合焦距離演算(ステップ121)から求められた合焦距離判定の結果(ステップ1610,1614)に応じて、図7に示すように、合焦距離判定がOKかNGかの判定を行い(ステップ122)、OKの場合には算出した合焦位置に光学系11のレンズを移動させ(ステップ123)、NGの場合には予め設定した所定の合焦位置である所定距離1または所定距離2に光学系11のレンズを移動させる(ステップ124)ことにより、最終合焦位置にレンズを配置することができる。
Then, depending on the result of the focus distance determination (
このように、この構成によれば、画像データを用いて焦点距離を検出するにあたり、色情報を用いることにより、種々の色情報を有する被写体に対し、種々の撮影環境下において、正確に焦点距離を検出できる。すなわち、画像信号の色信号のコントラストの評価値に重み付け演算を行い、最適データのみを用いる測距方法および合焦装置により、合焦精度を向上できる。そして、画像データから得られる輝度信号の高周波成分のみを抽出して得た評価値に応じて焦点合わせを行う構成に比べ、色情報など輝度情報以外の情報を用いることにより、輝度差のみの高周波成分による評価値では測距できない被写体についても測距が可能になり、合焦制御において苦手とする被写体を減らすことができる。 As described above, according to this configuration, when the focal length is detected using the image data, the color information is used to accurately detect the focal length under various shooting environments for a subject having various color information. Can be detected. That is, focusing accuracy can be improved by a distance measuring method and a focusing device that perform weighting calculation on the contrast evaluation value of the color signal of the image signal and use only optimum data. Compared to the configuration in which focusing is performed according to the evaluation value obtained by extracting only the high-frequency component of the luminance signal obtained from the image data, the high-frequency of only the luminance difference is obtained by using information other than luminance information such as color information. Distance measurement is possible even for subjects that cannot be measured by the evaluation value based on the components, and subjects that are not good at focusing control can be reduced.
すなわち、本実施の形態の合焦装置は、複数の色情報について、いわば少なくとも2個の互いに異なる色のカラーフィルタを通して得られるそれぞれの画像データについて、それぞれコントラストの評価値を検出する手段を有し、これら複数の画像データ毎に合焦処理を行うとともに、これら複数の画像データを選択及び演算処理する手段(マトリクス補完回路27、スイッチ28参照)及び処理工程(図11におけるステップ12参照)を備え、さらに、これら選択及び演算処理で得られた画像データ毎に評価値へ重み付け演算処理を行い、被写体に合焦する手段を有している。
In other words, the focusing device of the present embodiment has means for detecting the evaluation value of the contrast for each of the plurality of color information, that is, for each image data obtained through at least two different color filters. In addition to performing a focusing process for each of the plurality of image data, a means for selecting and calculating the plurality of image data (see
また、本実施の形態では、各画像データに設定された複数の画像検出領域毎に、複数の画像データに応じて得られた評価値それぞれに、信頼度の重み付け量を算出している(図15のステップ319〜322参照)。 Further, in the present embodiment, for each of a plurality of image detection regions set in each image data, a reliability weighting amount is calculated for each evaluation value obtained according to the plurality of image data (FIG. 15 steps 319-322).
さらに、撮影モードに応じて、得られた評価値(図11のステップ11〜12、図12、図13参照)に重み付け(図11のステップ111参照)加算(図11のステップ115参照)を行い、この評価値に応じて、画像検出領域の部分焦点距離の中から撮影モードに応じた所定の焦点距離を選択している。
Furthermore, weighting (see
また、色情報あるいはホワイトバランスの出力に応じて、CPU17などで構成される画像処理回路15が、得られた評価値に重み付け(図11のステップ111、図13のステップ1309など参照)加算(図11のステップ115参照)を行い、この重み付けされた評価値を用いて画像検出領域の部分焦点距離の中から撮影モードに応じた所定の焦点距離を選択する。
Further, the
そして、焦点距離を算出するための複数の画像データ(マトリクス補完回路27,スイッチ28、図11のステップ12参照)を自動(図13のステップ1301のNO以降参照)で切り替える手段を有している。
Further, there is means for automatically switching a plurality of image data (
また、焦点距離を算出するための複数の画像データ(マトリクス補完回路27,スイッチ28、図11のステップ12参照)を手動(図13のステップ1301のYES以降参照)で切り替える手段を有している。
Further, there is means for manually switching a plurality of image data (
また、焦点距離を算出するための色情報の画像データ(マトリクス補完回路27参照)を被写体の輝度値に応じて(図13のステップ1307参照)自動的に切り替える手段を有している。
Further, there is means for automatically switching image data of color information for calculating the focal length (see matrix complementing circuit 27) according to the luminance value of the subject (see
また、焦点距離を算出するための画像データ(マトリクス補完回路27,スイッチ28、図11のステップ12参照)から得られるコントラストの評価値のそれぞれの重み付けを撮影者が任意に設定可能(図11のステップ12参照)とする手段(図13のステップ1301〜1305参照)を備えている。
Further, the photographer can arbitrarily set the respective weights of the contrast evaluation values obtained from the image data for calculating the focal length (
さらに、重み付けに基づいた評価(図11のステップ111参照)を行い、画像検出領域の部分焦点距離の中から撮影モードに応じた所定の焦点距離を選択する。
Further, evaluation based on weighting (see
このように、本実施の形態では、複数の異なる画像データの中から、単数あるいは複数の異なる画像信号を選択し、かつ、演算する手段を備えているため、コントラストの評価値を用いて合焦を行う手段として、より広い状況で、すなわち、種々の色情報を有する被写体に対し、種々の撮影環境下において、画像のコントラストの認識を可能にするとともに、撮影した複数の異なる画像データごとに評価値に重み付け演算を行うため、被写体の特徴に適した合焦演算が可能になる。 As described above, in the present embodiment, since a means for selecting and calculating one or a plurality of different image signals from a plurality of different image data is provided, focusing is performed using the evaluation value of contrast. As a means for performing image recognition, it is possible to recognize the contrast of an image in a wider range of situations, that is, for a subject having various color information under various photographing environments, and to evaluate each of a plurality of different photographed image data. Since the value is subjected to a weighting calculation, a focusing calculation suitable for the characteristics of the subject can be performed.
そして、色情報あるいはホワイトバランスに応じて複数の画像データ毎にコントラストの評価値へ重み付けすることにより、被写体に最適な条件でコントラストの評価を行うことができる。 Then, by evaluating the contrast evaluation value for each of a plurality of image data according to the color information or white balance, the contrast can be evaluated under the optimum conditions for the subject.
また、複数の画像データの選択を、被写体に応じて自動的に選択する自動モードを備えたため、この自動モードの利用により、撮影者は撮影に専念することができる。 In addition, since an automatic mode for automatically selecting a plurality of image data according to the subject is provided, the photographer can concentrate on shooting by using this automatic mode.
一方、複数の画像データの選択を、手動で設定できる手動モードを備えたため、この手動モードの利用により、撮影者の意図を直接的に合焦処理に反映できる。また、手動による設定は、画像データの選択のみならず、合焦処理の重み付け演算に欠かせない重み付け量を直接設定できるため、従来の構成では合焦が困難であった特殊な撮影条件においても、合焦させることができる。 On the other hand, since a manual mode in which selection of a plurality of image data can be manually set is provided, the intention of the photographer can be directly reflected in the focusing process by using this manual mode. In addition, the manual setting can directly set the weighting amount that is indispensable for the weighting calculation of the focusing process as well as the selection of the image data. Therefore, even in special shooting conditions where focusing is difficult with the conventional configuration. , Can be focused.
また、この手動による設定については、撮影モードなど被写体の撮影条件の選択などに合わせて、合焦の画像データの選択や重み付け量を設定できるモードを備えたため、撮影者の意図に合わせた合焦位置を選択できる。 In addition, this manual setting has a mode that allows you to select the focus image data and set the weighting amount according to the selection of shooting conditions such as the shooting mode. The position can be selected.
言い換えれば、本実施の形態では、従来、複数領域を有する複数の焦点距離算出及び最終焦点距離決定において、輝度情報のみか、あるいは、輝度情報に近い単一の情報などを用いて行われている合焦処理について、互いに異なる色情報に基づく評価値を用い、さらに、これら評価値に対し、撮影モードの設定などにより撮影者の意図を反映させた状態で重み付けを行い、精度良く焦点合わせできるとともに、自動モードの場合は、被写体の色情報による特徴を判断し、自動的に評価値を重み付けできるため、簡単かつ精度良く焦点合わせできる。 In other words, in the present embodiment, conventionally, calculation of a plurality of focal lengths having a plurality of regions and determination of the final focal length are performed using only luminance information or single information close to the luminance information. For focusing processing, evaluation values based on different color information are used, and these evaluation values are weighted in a state reflecting the photographer's intention by setting the shooting mode, etc. In the automatic mode, the feature based on the color information of the subject can be determined and the evaluation value can be automatically weighted, so that focusing can be performed easily and accurately.
また、人間の目で見ると色情報にてコントラストを認識できる場合でも、単一の色情報あるいは輝度情報のみを用いる構成では、輝度が同じ場合はコントラストを検出できない場合があり得る。この点、本実施の形態では、さらに、暗い環境で、手振れや被写体の移動などがある悪条件であっても、複数の色情報または輝度情報を用いて、コントラストのエッジを検出するとともに、間違った評価値のピークを認識することがなく、従来合焦しにくかった被写体に精度良く合焦できる。 Further, even when the contrast can be recognized by color information when viewed by human eyes, in the configuration using only single color information or luminance information, the contrast may not be detected if the luminance is the same. In this respect, in this embodiment, even in a dark environment, even under adverse conditions such as camera shake or subject movement, a plurality of color information or luminance information is used to detect contrast edges and Therefore, it is possible to focus accurately on a subject that has been difficult to focus on conventionally.
また、撮影者が被写体の特定の色情報のみに合焦させるために手動モードを利用する場合、合焦に用いる画像データの分光色情報あるいは輝度情報に応じて、撮影者が評価値の重み付け量を設定可能としたため、例えば、被写体の特定の色に合わせて色情報の選択及び各色情報の重み付け量を任意に設定でき、撮影者の意図に合った合焦制御ができる。例えば、人物の顔などは、コントラストが比較的低いが、他の色に影響されないように、肌色を特定色として色情報あるいは輝度情報を選択し、かつ、肌色のみに評価値演算時の重み付け量を大きく設定することができる。 In addition, when the photographer uses the manual mode to focus only on specific color information of the subject, the photographer weights the evaluation value according to the spectral color information or luminance information of the image data used for focusing. Therefore, for example, the selection of color information and the weighting amount of each color information can be arbitrarily set in accordance with a specific color of the subject, and the focus control suitable for the photographer's intention can be performed. For example, for human faces, etc., the contrast is relatively low, but color information or luminance information is selected with the skin color as a specific color so that it is not affected by other colors, and only the skin color is weighted when calculating the evaluation value Can be set large.
また、植物の花などを撮影する状況において、撮影者が花びらに合焦したい場合、輝度情報のみで評価を行うと、花びらの周辺の緑色の葉が評価値のピークとなってしまい、花びら合焦しない場合があり得る。この点、本実施の形態では、例えば、花びらが青い場合は、青の色情報のみを用いて評価することにより、合焦装置が確実に花びらを被写体として認識でき、野外で風などによる多少の揺れがあっても、確実に青い花びらに合焦することができる。このように、被写体に応じて、所定の色情報の画像データのみを用いて焦点距離を算出する撮影モードを備えることにより、所定の色情報の画像データのみを用いることにより、他の色情報に影響されずに、操作者が意図する被写体に容易に合焦できる。 In addition, if the photographer wants to focus on the petal in a situation where the flower of a plant is photographed, if the evaluation is performed only with luminance information, the green leaf around the petal becomes the peak of the evaluation value, and the petal matching It may not burn. In this regard, in the present embodiment, for example, when the petals are blue, the focusing device can surely recognize the petals as a subject by evaluating using only the blue color information. Even if there is shaking, you can definitely focus on the blue petals. In this way, by providing a shooting mode that calculates the focal length using only image data of predetermined color information according to the subject, by using only image data of predetermined color information, other color information can be obtained. It is possible to easily focus on the subject intended by the operator without being affected.
また、本実施の形態では、輝度を測定するためのCPU17などからなる輝度検出回路と、輝度に応じて焦点距離検出用の画像データの撮影を補助するための複数の光源である補助光L1,L2と、それぞれの補助光L1,L2を制御するための光源回路43,44とを備え、輝度情報あるいは色情報(図14のステップ1403,1404参照)に応じて、補助光L1,L2の発光の制御(図14のステップ1406,1407,1410,1412,1414参照)及び重み付け(図14のステップ1408,1409,1411,1413,1415参照)演算を行っている。
In this embodiment, a luminance detection circuit including a
また、補助光L1,L2を1灯で発光させ、あるいは補助光L1,L2を複数同時に発光させることができる、いわば選択制御可能回路(図2に示す光源回路43,44、スイッチ45,46参照)を備えている。
The auxiliary light L1 and L2 can be emitted by a single lamp, or a plurality of auxiliary lights L1 and L2 can be emitted simultaneously. In other words, a selectable controllable circuit (see
さらに、補助光L1,L2の選択のための補助光判定処理手段は、自動または手動で制御するための選択手段(図14のステップ1401参照)を備えている。
Further, the auxiliary light determination processing means for selecting the auxiliary lights L1 and L2 includes selection means (see
そして、手動で補助光L1,L2の選択を行う際は(図14のステップ1402参照)、複数の補助光L1,L2の色情報に応じて(図14のステップ1406,1407,1410,1412,1414参照)、重み付け演算を行う(図14のステップ1408,1409,1411,1413,1415参照)ことが可能になっている。
When the auxiliary lights L1 and L2 are manually selected (see
そこで、暗い環境で撮影を行う際に、合焦を補助するための複数の補助光L1,L2を有し、使用時には、補助光L1,L2の色温度などの特性に応じて、最適な画像データを複数の画像データの中から選択し、重み付けを行うことにより、合焦を最適化できる。 Therefore, when shooting in a dark environment, it has a plurality of auxiliary lights L1 and L2 for assisting in focusing, and in use, an optimum image is selected according to characteristics such as the color temperature of the auxiliary lights L1 and L2. Focusing can be optimized by selecting data from a plurality of image data and performing weighting.
すなわち、焦点合わせのための補助光源である補助光L1,L2を少なくとも1個備え、かつ、これら補助光L1,L2の中から最適な色情報を有する補助光L1,L2を用いて発光させるとともに、各補助光L1,L2の色温度などに応じて色情報を選択し、評価値に重み付けするため、補助光L1,L2を効率良く利用しつつ、精度良く合焦できる。例えば、補助光として、赤色(R)の発光ダイオード(LED)を用いる場合は、赤色の画像データから評価値を得るとともに、赤色の色情報に重み付けを大きくすることにより、他の色より安価にかつ遠くまで補助光で照らすことができ、暗い場所に位置する被写体についても精度良く合焦できる。 That is, at least one auxiliary light L1, L2 which is an auxiliary light source for focusing is provided, and the auxiliary light L1, L2 having optimum color information is emitted from the auxiliary lights L1, L2, and is emitted. Since the color information is selected in accordance with the color temperature of each auxiliary light L1, L2, and the evaluation value is weighted, the auxiliary light L1, L2 can be focused efficiently while being efficiently used. For example, when a red (R) light emitting diode (LED) is used as auxiliary light, the evaluation value is obtained from the red image data, and the weighting of the red color information is increased, thereby making it cheaper than other colors. In addition, it is possible to illuminate far away with auxiliary light, and it is possible to focus accurately on a subject located in a dark place.
また、補助光L1,L2を複数備えた場合は、被写体の特徴に応じて、補助光L1,L2を選択して発光させることにより、合焦の確率を向上できる。ここで、被写体の特徴とは、例えば、図示しないが、3個の補助光L1,L2,L3を備える場合は、それぞれ赤色、青色、緑色に発光するものとして、撮影した画像データの中から被写体の色情報に基づいて最も評価値として有効と認識される色を選択して発光させることが有効である。 When a plurality of auxiliary lights L1 and L2 are provided, the probability of focusing can be improved by selecting and emitting the auxiliary lights L1 and L2 according to the characteristics of the subject. Here, the characteristics of the subject are, for example, not shown, but when the three auxiliary lights L1, L2, and L3 are provided, the subject is assumed to emit light in red, blue, and green, respectively. It is effective to select a color that is recognized as the most effective evaluation value based on the color information and emit light.
さらに、いずれの補助光L1,L2を発光させるかの選択を手動か自動か設定可能としたため、撮影者が補助光源の知識がある場合、被写体の条件に応じて最適な補助光L1,L2を任意に設定できるとともに、知識がない場合には、自動で選択させることができ、被写体に対して簡単にかつ最適な光源を使用して合焦できる。 Furthermore, since the selection of which auxiliary light L1, L2 to emit can be set to manual or automatic, when the photographer has knowledge of the auxiliary light source, the optimum auxiliary light L1, L2 is selected according to the condition of the subject. In addition to being able to set arbitrarily, if there is no knowledge, it can be selected automatically, and the subject can be focused easily using an optimal light source.
なお、上記の実施の形態では、画像信号から評価値を得る情報として、YCC輝度あるいはRGB形式の画像データを用いたが、例えば、図2に示すマトリクス補完回路27を用いて、シアン(C)、マゼンダ(M)、イエロー(Y)の色差形式や特定の色情報の画像データを生成し、処理に用いることもできる。そして、各色情報に応じて、重み付けの変数を適切に設定し、正確に焦点距離を検出できる。
In the above embodiment, YCC luminance or RGB format image data is used as information for obtaining an evaluation value from an image signal. For example, cyan (C) is used by using the
さらに、本実施の形態によれば、撮影者の意図に応じて、遠距離側にも合焦可能にしたため、撮影者の意図に応じて遠距離側に合焦した撮影が容易にできる。すなわち、撮影距離の範囲に応じて、通常モードなる撮影距離範囲、及び、遠景モードあるいは無限モードなどの遠距離の撮影を目的とするモード、あるいは、撮影距離範囲をレンズの全撮影距離範囲としつつ、近距離優先または遠距離優先の撮影をするモードを選択できるため、撮影者は意図した撮影を容易にできる。そして、これらの合焦位置の判定は、複数の画像領域から被写体の急激な移動などによる影響を受けていないと評価できるいわば合焦が有効と判断されたデータを用いるため、撮影者の意図を反映した撮影が可能になる。すなわち、画面を複数の領域に分割し、各領域でそれぞれ合焦位置を判定する方式の自動合焦動作において、被写体の移動や手振れなど、測距に障害があるシーンにおいて、ブレを検出し、最適データのみを用いて適正に距離を測定し光学系11を合焦できるため、遠距離モードでの合焦精度を向上できる。
Furthermore, according to the present embodiment, since it is possible to focus on the long distance side according to the photographer's intention, it is possible to easily perform photographing focused on the long distance side according to the photographer's intention. That is, depending on the range of the shooting distance, the shooting distance range in the normal mode and the mode for shooting at a long distance, such as the distant view mode or the infinite mode, or the shooting distance range as the entire shooting distance range of the lens Since the mode for taking a short distance priority or a long distance priority can be selected, the photographer can easily perform the intended shooting. The determination of the in-focus position uses data that is determined to be effective in focus because it can be evaluated that it is not affected by a sudden movement of the subject from a plurality of image areas. Reflected shooting becomes possible. In other words, in an automatic focusing operation in which the screen is divided into a plurality of areas and the focus position is determined in each area, a blur is detected in a scene where there is an obstacle in distance measurement such as movement of a subject or camera shake, Since the
すなわち、複数領域を有する複数の焦点距離算出及び最終焦点距離決定において、一般的に有効とされる近距離を優先した場合、従来の方法では、被写体移動や手ぶれによって誤ったピークが被写体より近距離にあると、被写体を合焦位置と判断できず、誤ったピークを合焦位置と判断してしまい、合焦位置を正しく設定できない場合がある。また、近距離の被写体の撮影でなく、遠距離の被写体の撮影を意図している場合には、反対に被写体移動や手ぶれによって、近距離側のピークを合焦位置として誤った判断をしてしまい、あるいは、撮影者が意図している遠距離よりもさらに遠距離側(例えば、撮影された画像の最も遠距離の被写体よりもさらに遠距離)のピークを合焦位置として誤った判断を行い、撮影者の意図に反する場合がある。この点、本実施の形態によれば、被写体移動や手ぶれによる誤ったピークが近距離あるいは遠距離のいずれに存在しても、被写体の移動や手ぶれを検出し、正しい評価値のみを用いて適正に判断し、かつ、撮影モードに応じて近距離優先あるいは遠距離優先で正しい合焦位置を設定できる。 In other words, when prioritizing a generally effective short distance in calculating a plurality of focal lengths having a plurality of regions and determining a final focal length, in the conventional method, an erroneous peak due to subject movement or camera shake is closer to the subject. In this case, the subject cannot be determined as the in-focus position, and an incorrect peak is determined as the in-focus position, and the in-focus position may not be set correctly. In addition, when shooting a long-distance subject rather than a short-distance subject is intended, on the other hand, an erroneous determination is made with the peak on the short-distance side as the in-focus position due to subject movement or camera shake. Or, a wrong determination is made with the peak at the far side (for example, farther than the farthest subject in the captured image) as the in-focus position than the long distance intended by the photographer. , May be contrary to the intention of the photographer. In this regard, according to the present embodiment, even if an erroneous peak due to subject movement or camera shake exists at either a short distance or a long distance, movement of the subject or camera shake is detected, and only an appropriate evaluation value is used for proper detection. And the correct in-focus position can be set with a short distance priority or a long distance priority according to the shooting mode.
また、撮影距離範囲について、通常モードが設定されている場合は、自動的に最至近距離選択モードとなるとともに、撮影距離範囲が遠距離に設定されている場合は、自動的に最遠距離選択モードとなるため、遠距離モードで選択される撮影距離範囲の中の最至近を最終合焦位置としてしまうことがなく、複数の画像領域の中から最遠距離の被写体を最終合焦位置にでき、撮影者の意図に合致した撮影が可能になる。 For the shooting distance range, when the normal mode is set, the closest distance selection mode is automatically selected. When the shooting distance range is set to the long distance, the longest distance selection is automatically performed. Since this is a mode, the closest focus in the shooting distance range selected in the long-distance mode is not set as the final focus position, and the subject at the longest distance from multiple image areas can be set as the final focus position. This makes it possible to shoot in accordance with the photographer's intention.
また、全撮影距離範囲で遠距離優先モードと近距離優先モードとを選択可能とする構成では、撮影者は遠距離優先モードを選択するのみで良く、目測などによりマクロ領域なのか通常領域なのかといった、撮影者が目測で撮影距離範囲を予め決定する煩雑な作業の必要がなく、信頼性を評価した後に最終焦点距離を決定する正確な合焦動作と相まって、撮影者の意図に合致して正確に合焦した撮影が可能になる。 In the configuration in which the long distance priority mode and the short distance priority mode can be selected in the entire shooting distance range, the photographer only has to select the long distance priority mode. It is not necessary for the photographer to perform the complicated task of predetermining the shooting distance range by eye measurement, and it matches the photographer's intention, coupled with an accurate focusing operation that determines the final focal length after evaluating the reliability. Accurately focused shooting is possible.
さらに、遠距離優先モードを利用することにより、無限以外の遠距離にも正確に合焦させることができる。 Furthermore, by using the long distance priority mode, it is possible to accurately focus on long distances other than infinity.
また、複数領域でそれぞれ被写体距離を算出し評価する構成のため、被写体が移動しあるいは背景がぶれてしまった場合にも、誤動作の心配を抑制できるとともに、合焦位置の評価を正確にできない厳しい条件の場合、すなわち、全ての画像領域でコントラストのよる評価値が低く、有効な合焦位置が得られずに測距が不能になった場合にも、撮影モードに応じた所定距離を合焦距離とすることにより、撮影者の意図を反映した撮影が可能になる。 In addition, since the subject distance is calculated and evaluated in each of the plurality of areas, even when the subject moves or the background is blurred, it is possible to suppress the fear of malfunction and to be unable to accurately evaluate the in-focus position. In the case of the condition, that is, when the evaluation value by contrast is low in all the image areas and the effective focus position cannot be obtained and the distance measurement becomes impossible, the predetermined distance corresponding to the shooting mode is focused. By setting the distance, shooting that reflects the photographer's intention becomes possible.
また、本実施の形態では、近距離優先か遠距離優先かで明確に示されている撮影者の意図に従うため、近距離優先あるいは遠距離優先に加え画像から経験則を使ってカメラが自動認識して焦点距離を決定する構成に比べ、焦点距離の確認が撮影前に直感的に可能であり、複雑なアルゴリズムを用いる必要がないとともに、一眼レフの光学ファインダーや演算部品を用いた液晶パネルによる拡大表示などの装置を備える必要もなく、構成を簡略化して製造コストを低減できる。 Also, in this embodiment, the camera automatically recognizes images using empirical rules in addition to short-range priority or long-range priority in order to follow the intention of the photographer clearly indicated as short-range priority or long-range priority. Compared to a configuration that determines the focal length, the focal length can be confirmed intuitively before shooting, and it is not necessary to use a complicated algorithm. It is also possible to use a single-lens reflex optical finder and a liquid crystal panel using computing components. It is not necessary to provide a device such as an enlarged display, and the configuration can be simplified and the manufacturing cost can be reduced.
また、レンズの駆動範囲は、設計上の撮影距離範囲に対して、焦点倍率による変動や絞り口径位置による変化、及びレンズを支持する鏡筒の温度条件や姿勢差などの条件により変化する。そこで、光学系11には、設計上のピント位置で計算された駆動範囲に加え、さらに、これら条件の変動による変化量を考慮し、近距離側と遠距離側とに変化量分の移動可能範囲すなわちオーバーストローク領域を設けているとともに、CPU17などからなる制御手段は、このオーバーストローク領域に合焦用レンズ部のレンズ位置を駆動可能に設定されている。
In addition, the lens driving range changes with respect to the designed shooting distance range depending on conditions such as a variation due to the focus magnification, a change due to the aperture position, and a temperature condition and a posture difference of the lens barrel that supports the lens. Therefore, in addition to the driving range calculated at the designed focus position, the
そこで、最遠距離選択モードの場合は、ピント位置がレンズ駆動範囲の遠距離端付近にあり、さらに、例えば姿勢差が遠距離側にあっても、遠距離側のオーバーストローク領域に合焦用レンズ部のレンズ位置を駆動することにより、撮影距離範囲を満足できる。 Therefore, in the farthest distance selection mode, the focus position is near the far distance end of the lens drive range, and for example, even if the posture difference is on the far distance side, it is used for focusing on the overstroke area on the far distance side. The driving distance range can be satisfied by driving the lens position of the lens unit.
また、最至近距離選択モードの場合は、ピント位置がレンズ駆動範囲の最至近距離端付近にあり、さらに、例えば姿勢差が至近距離側にあっても、近距離側のオーバーストローク領域に合焦用レンズ部のレンズ位置を駆動することにより、撮影距離範囲を満足できる。 In the closest distance selection mode, the focus position is near the closest distance end of the lens driving range. Further, for example, even if the posture difference is on the closest distance side, the focus is on the overstroke area on the near distance side. The driving distance range can be satisfied by driving the lens position of the lens unit.
このように、近距離側端部及び遠距離側端部において、焦点のずれ分を考慮した撮影が可能になり、容易に設計上の撮影距離範囲を満足できるため、機械(メカ)的あるいは制御(ソフトウェア)的な高精度の距離補正作業を必要とせず、製造コストを低減できる。 In this way, it is possible to shoot in consideration of the amount of defocus at the short distance side end and the long distance side edge, and easily satisfy the designed shooting distance range. Manufacturing cost can be reduced without requiring high-precision distance correction work (software).
なお、上記の実施の形態では、撮影距離範囲と、遠距離優先モードとを、撮影者がいずれも設定できる構成としたが、いずれか一方のみを設定できる構成とし、構成及び操作を簡略化することもできる。 In the above embodiment, the photographing distance range and the long distance priority mode are configured to be set by the photographer, but only one of them can be set to simplify the configuration and operation. You can also.
このように、本実施の形態の焦点距離検出方法は、操作者の選択に応じ、画像検出領域の部分焦点距離の中の最近の部分焦点距離と最遠の部分焦点距離とのをいずれかを焦点距離として選択するものである。そして、この構成では、操作者の意図に応じて近距離あるいは遠距離の正確な焦点距離が選択される。 As described above, the focal length detection method of the present embodiment selects either the latest partial focal length or the farthest partial focal length in the partial focal lengths of the image detection area according to the operator's selection. This is selected as the focal length. In this configuration, an accurate focal distance at a short distance or a long distance is selected according to the intention of the operator.
また、本実施の形態の焦点距離検出方法は、操作者の撮影距離範囲の選択に応じ、制御手段が、画像検出領域の部分焦点距離の中の最近の部分焦点距離と最遠の部分焦点距離とのをいずれかを焦点距離として選択するものである。そして、この構成では、操作者の撮影距離範囲の選択に応じて、制御手段が、画像検出領域の部分焦点距離の中の最近の部分焦点距離と最遠の部分焦点距離とのをいずれかを焦点距離として選択することにより、操作者の意図に応じた正確な焦点距離が選択される。 Further, according to the focal length detection method of the present embodiment, according to the selection of the shooting distance range of the operator, the control means is arranged such that the most recent partial focal length and the farthest partial focal length among the partial focal lengths of the image detection area. Is selected as the focal length. In this configuration, according to the selection of the shooting distance range by the operator, the control unit selects either the latest partial focal length or the farthest partial focal length in the partial focal lengths of the image detection area. By selecting the focal length, an accurate focal length according to the operator's intention is selected.
また、本実施の形態の焦点距離検出方法は、信頼度に応じて、画像検出領域の部分焦点距離の中から選択した部分焦点距離と、所定の焦点距離とのいずれかを焦点距離として選択するものである。そして、この構成では、信頼度の高い部分焦点距離の中から、焦点距離を選択する構成を前提とし、正確な焦点距離が選択される。また、信頼度の高い部分焦点距離がない場合、あるいは全体として部分焦点距離の信頼度が低い場合は、所定の焦点距離を用いることにより、不正確な焦点距離の選択が回避される。 The focal length detection method according to the present embodiment selects either a partial focal length selected from the partial focal lengths of the image detection area or a predetermined focal length as the focal length according to the reliability. Is. In this configuration, an accurate focal length is selected on the assumption that the focal length is selected from partial focal lengths with high reliability. Further, when there is no partial focal distance with high reliability, or when the reliability of partial focal distance is low as a whole, the selection of an incorrect focal distance is avoided by using a predetermined focal distance.
また、本実施の形態の焦点距離検出方法は、信頼度に応じて、画像検出領域の部分焦点距離の中から選択した部分焦点距離と、操作者の選択に応じて選択された所定の焦点距離とのいずれかを焦点距離として選択するものである。 In addition, the focal length detection method of the present embodiment uses a partial focal length selected from the partial focal lengths of the image detection area according to the reliability and a predetermined focal length selected according to the operator's selection. Is selected as the focal length.
そして、この構成では、信頼度の高い部分焦点距離の中から、焦点距離を選択する構成を前提とし、操作者の意図に応じて近距離あるいは遠距離の正確な焦点距離が選択される。また、信頼度の高い部分焦点距離がない場合、あるいは全体として部分焦点距離の信頼度が低い場合は、操作者の選択に応じた所定の焦点距離を用いることにより、操作者の意図を反映しつつ不正確な焦点距離の選択が回避される。 In this configuration, on the premise of a configuration in which a focal length is selected from among partial focal lengths with high reliability, an accurate focal length that is short or far is selected according to the intention of the operator. Also, when there is no partial focal length with high reliability, or when the reliability of partial focal length as a whole is low, the operator's intention is reflected by using a predetermined focal length according to the operator's selection. While selecting an incorrect focal length is avoided.
また、本実施の形態の合焦装置は、近距離優先モードと遠距離優先モードとを選択する撮影モード選択手段を備え、画像処理手段は、前記撮影モード選択手段の操作に応じて、最近距離の部分焦点距離と最遠の部分焦点距離とのいずれかを優先して焦点距離を選択するものである。そして、この構成では、操作者の意図に応じて近距離あるいは遠距離の正確な焦点距離が選択される。構成を複雑化することなく、製造コストが抑制される。 In addition, the focusing device according to the present embodiment includes a shooting mode selection unit that selects a short distance priority mode and a long distance priority mode, and the image processing unit is configured to change the closest distance according to an operation of the shooting mode selection unit. The focal length is selected with priority given to either the partial focal length or the farthest partial focal length. In this configuration, an accurate focal distance at a short distance or a long distance is selected according to the intention of the operator. Manufacturing cost is suppressed without complicating the configuration.
また、本実施の形態の合焦装置は、光学系駆動手段は、設計上の合焦可能な焦点距離の範囲を超えたオーバーストローク領域に光学系を駆動可能に設定されたものである。そして、この構成では、温度条件や姿勢による光学系の焦点のずれに関わらず、近距離あるいは遠距離において容易に正確な合焦が可能になる。 Further, in the focusing apparatus of the present embodiment, the optical system driving means is set so that the optical system can be driven in an overstroke region exceeding the range of the focal length that can be focused on the design. In this configuration, accurate focusing can be easily performed at a short distance or a long distance regardless of the shift of the focus of the optical system due to the temperature condition or posture.
次に、図17及び図18を参照して、本実施の形態の撮像装置を説明する。 Next, the imaging apparatus of the present embodiment will be described with reference to FIGS. 17 and 18.
本実施の形態は、上記の構成を前提とし、撮影者は、画像データから生成した複数の色情報の画像データを用いることにより、色情報毎に異なる部分焦点距離を算出し、算出した各部分焦点距離でそれぞれ撮影を行う、フォーカスブラケット撮影を行うものである。すなわち、本実施の形態のブラケット撮影の構成は、前提条件として、上記の図12の撮影モードの選択(ステップ11)にて、連動範囲の選択(ステップ1201)に応じた範囲での色情報を用いた部分焦点距離の算出や、図13の画像信号判定処理に含まれる撮影モードの選択(ステップ1310)、例えば補助光L1,L2の発光の有無などの制御や、複数の撮影モードの組み合わせなどの構成を含むものである。 The present embodiment is based on the above configuration, and the photographer uses the image data of the plurality of color information generated from the image data to calculate different partial focal lengths for each color information, Focus bracket shooting is performed in which shooting is performed at each focal length. That is, the configuration of the bracket shooting according to the present embodiment is based on the assumption that the color information in the range corresponding to the selection of the interlocking range (step 1201) in the shooting mode selection (step 11) in FIG. Calculation of the partial focal length used, selection of the shooting mode included in the image signal determination processing of FIG. 13 (step 1310), for example, control of whether or not the auxiliary lights L1 and L2 are emitted, combinations of a plurality of shooting modes, etc. The configuration is included.
まず、図17のフローチャートを参照して、静止画を撮影するシーケンスであるS1シーケンスを説明する。このS1シーケンスは、シャッターが半押し状態のシーケンスで、まず、撮影者がブラケット撮影をするか否かについて予め設定しているかを確認し(ステップ1701)、ブラケット撮影をすると設定されている場合は、変数BL_FLGを1とし(BL_FLG=1)(ステップ1702)、ブラケット撮影をすると設定されていない場合は、変数BL_FLGを0とする(BL_FLG=0)(ステップ1703)。この変数BL_FLGは、この後のステップにおいて、ブラケット撮影か否かの判定に用いる。次いで、露出合わせ処理を行う(ステップ1704)。この露出合わせ処理は、被写体を適正な露出とするための制御を決定する処理で、主に、シャッタースピードや絞り、及び撮像素子としてのCCD12のゲインの設定などを決定する。
First, the S1 sequence, which is a sequence for capturing a still image, will be described with reference to the flowchart of FIG. This S1 sequence is a sequence in which the shutter is half-pressed. First, it is confirmed whether the photographer has set in advance whether or not to perform bracket shooting (step 1701). The variable BL_FLG is set to 1 (BL_FLG = 1) (step 1702), and when the bracket shooting is not set, the variable BL_FLG is set to 0 (BL_FLG = 0) (step 1703). This variable BL_FLG is used for determining whether bracket shooting is performed in the subsequent steps. Next, exposure matching processing is performed (step 1704). This exposure adjustment process is a process for determining control for setting the subject to an appropriate exposure, and mainly determines the shutter speed, aperture, and gain setting of the
次いで、焦点合わせ処理を行う(ステップ1705)。この焦点合わせ処理について、まず、補助光の選択がなされていない場合についての詳細について、図18を中心に説明する。この図18においては、図11に示す処理と同様に、ステップ11からステップ106の処理を行う。そして、各ウインドウの信頼度を算出するステップ111では、図15に示すように、色情報毎に信頼度に対する重み付け量Window(Wh)(CNB)を求める(ステップ322)。そして、図18のステップ112〜114の処理を経て、この重み付け量を用いて、図7に示す処理と同様に、色情報毎に、評価値に対して重み付け演算(ステップ115)を行う。さらに、ステップ116〜120の処理を経て、演算された評価値に基づいて、合焦距離演算を行う(ステップ121)。そして、合焦処理判定が可(OK)なら(ステップ122)、その状態の焦点距離すなわち焦点レンズ位置P(CNB)を記憶する(ステップ125)。一方、合焦処理判定が不可(NG)なら(ステップ122)、予め定められた所定の焦点距離すなわち所定の焦点レンズ位置P(CNB)を記憶する(ステップ126)。ここで、CNBは色情報の数を示しており、例えば、R(Red 赤),B(Blue 青),G(Green 緑)の3色を使う場合には、CNBは3となり、3種類の焦点距離を算出する。そして、全ての焦点距離を算出するまで演算を行い(ステップ127)、図17のフローチャートに復帰する。すなわち、この焦点合わせ処理(ステップ1705)が終了した段階で、各色の色情報に応じた焦点レンズ位置が算出されている。
Next, a focusing process is performed (step 1705). With respect to this focusing process, first, details of a case where the auxiliary light is not selected will be described with reference to FIG. In FIG. 18, the processing from
そして、図17のフローチャートで、変数BL_FLGが0の場合は(ステップ1706)、実際の撮影を行うか否かの判定(ステップ1711)に移行する。一方、変数BL_FLGが1の場合は(ステップ1706)、算出された焦点レンズ位置P(CNB)を焦点距離が近い順に並べ替え(ステップ1707)、まず、光学系11のレンズを最も近い焦点レンズ位置P(CNB)に移動させる(ステップ1708)。この動作は、複数の焦点レンズ位置P(CNB)で順次撮影するために、初期設定として、連動範囲の中の端の位置にレンズを移動すること意味している。従って、この実施の形態では、算出された焦点レンズ位置P(CNB)を焦点距離が近い順に並べ替え、この近い順で撮影するが、算出された焦点レンズ位置P(CNB)を焦点距離が遠い順に並べ替え、遠い順で撮影することもできる。
If the variable BL_FLG is 0 in the flowchart of FIG. 17 (step 1706), the process proceeds to determination of whether or not to perform actual shooting (step 1711). On the other hand, when the variable BL_FLG is 1 (step 1706), the calculated focal lens positions P (CNB) are rearranged in order of increasing focal length (step 1707). First, the lens of the
次いで、ステップ1705の焦点合わせ処理の中で、補助光判断手段などにより補助光の使用が選択されているか(図13のステップ1311参照)を確認し(ステップ1709)、使用する補助光が単数であれば(ステップ1710)、撮影判断(ステップ1711)へ移行する。また、使用する補助光が複数であれば(ステップ1710)、複数の補助光の全ての組み合わせについて焦点合わせ処理を行い、それぞれ焦点レンズ位置P(CNB)を求める(ステップ1710)。
Next, in the focusing process in
そして、上記のレンズの移動の後、シャッターボタンが押し込まれ、静止画撮影が許可されている場合には(ステップ1711)、撮影処理(ステップ1712)を開始する。そして、撮影処理が終わるまで待ち(ステップ1713)、撮影処理が完了した後、指定枚数の撮影が終了したか否かを確認する(ステップ1714)。 If the shutter button is pressed after the lens has been moved and still image shooting is permitted (step 1711), shooting processing (step 1712) is started. Then, it waits until the photographing process is finished (step 1713), and after the photographing process is completed, it is confirmed whether or not the designated number of photographings is finished (step 1714).
ここで、補助光が単数の場合は、ブラケット撮影の枚数はCNB枚となる。そして、ステップ1714で指定枚数を終了していなかった場合は、指定枚数カウンタを−1した後(ステップ1716)、現在より遠距離側の焦点レンズ位置P(CNB)へ、レンズを移動させる(ステップ1717)。そして、指定枚数(CNB)分の撮影が終わるまで、レンズの移動と撮影を繰り返す(ステップ1711〜1717)。
Here, when the number of auxiliary lights is singular, the number of bracket shootings is CNB. If the designated number is not completed in
このようにして、色情報毎に得られた画像検出領域の部分焦点距離を用いて、各焦点距離において順次撮影するブラケット撮影を行うことができる。 In this way, bracket shooting for sequentially shooting at each focal length can be performed using the partial focal length of the image detection region obtained for each color information.
なお、このS1シーケンスは、シャッターが半押し状態のシーケンスで、露出合わせ処理(ステップ1707)や焦点合わせ処理(ステップ1708)を主に行うものである。そして、シャッターが押しきられた全押しの状態で(ステップ1711)、実際の静止画のブラケット撮影を実行し、すなわち、撮影処理(ステップ1712)を行う。また、シャッターが全押しでない状態では(ステップ1711)、また、指定枚数の撮影が完了した状態では(ステップ1714)、このS1シーケンスを終了する(ステップ1715)。 This S1 sequence is a sequence in which the shutter is half-pressed, and mainly performs exposure adjustment processing (step 1707) and focus adjustment processing (step 1708). Then, with the shutter fully depressed (step 1711), actual still image bracket shooting is performed, that is, shooting processing (step 1712) is performed. Further, when the shutter is not fully pressed (step 1711), and when the designated number of images has been taken (step 1714), the S1 sequence is terminated (step 1715).
また、図示しないが、このS1シーケンスが終了した場合は、シャッターが半押しの状態であれば、再度シャッターが全押しの状態になるまで、焦点レンズ位置P(CNB)のデータは保持され、さらに、シャッターを全押しにすることにより、ブラケット撮影を行うことができる。 Although not shown, when this S1 sequence is completed, if the shutter is half-pressed, the data of the focal lens position P (CNB) is held until the shutter is fully pressed again, and further, By fully pressing the shutter, bracket shooting can be performed.
また、ステップ1711で撮影が許可されていない場合は、レンズの位置は、色情報毎に求められた焦点距離の内、撮影モードに応じた所定位置に設定する。
If photographing is not permitted in
また、このブラケット撮影の撮影処理(ステップ1712)が開始される時に、画像表示装置21にブラケット撮影であることを警告表示する。この警告表示は、1回目の撮影処理が終了するまで(ステップ1713)としても良く、あるいは、S1シーケンスの全体が終了(ステップ1715)するまで警告表示を継続するとしても良い。このように、ブラケット撮影の撮影中であることを撮影者に知らせることにより、撮影中に撮影者が被写体から撮像装置10を動かしてしまうことを防止できる。なお、図示しないが、スピーカなどの発声手段を備え、上記の警告表示と同じタイミングで、音声により、すなわち聴覚上で警告することもできる。この音声の警告は、警告表示に代えて実行し、あるいは、警告表示とともに実行することができる。
Further, when this bracketing photographing process (step 1712) is started, a warning is displayed on the image display device 21 that bracket photographing is being performed. This warning display may be until the first shooting process is completed (step 1713), or the warning display may be continued until the entire S1 sequence is completed (step 1715). In this way, by notifying the photographer that the bracket photographing is being performed, the photographer can be prevented from moving the
このように、本実施の形態は、いわば色信号毎に最適な合焦位置でブラケット撮影することにより、すなわち、画像信号の色情報のコントラストの評価値に重み付け演算を行って求めた色信号毎に、最適なピント位置でブラケット撮影を行う合焦装置により、撮影者の意図した被写体に合焦した画像を撮影できる可能性を向上できる。 In this way, the present embodiment is, for each color signal obtained by performing bracketing photographing at the optimum in-focus position for each color signal, that is, by performing a weighting operation on the contrast evaluation value of the color information of the image signal. In addition, it is possible to improve the possibility that an image focused on the subject intended by the photographer can be captured by the focusing device that performs bracket shooting at the optimum focus position.
すなわち、本実施の形態は、いわば少なくとも2個以上の異なるカラーフィルタを通して得られるそれぞれの画像データ(マトリクス補完回路27参照)のコントラストの評価値を検出する手段を有し、これら複数の画像信号毎に上記の図1ないし図16に示す構成と同様の合焦処理を行う演算処理であって、上記の複数の画像信号を選択及び演算処理する手段(マトリクス補完回路27、スイッチ28、図18のステップ12参照)を有するとともに、これら選択及び手段で得られた画像データ毎に評価値に重み付け演算処理を施すとことにより、被写体へ合焦する手段を有するものである。さらに、複数の画像データ毎にそれぞれ複数の画像検出領域を設定し、各画像検出領域に応じて得られた評価値の信頼度の重み付け量を算出し(図15のステップ319〜322参照)、出力された色情報毎に、画像検出領域の部分焦点距離の中からその評価値(図7のステップ115、図18のステップ115参照)及び撮影モード(図18のステップ11)に応じた所定の焦点距離を選択し、全ての色情報毎の距離情報を記憶し(図18のステップ125,126参照)、それぞれ異なる色情報から得られた画像データのコントラストの評価値により、複数の部分焦点距離において順次撮影を行うブラケット撮影のモードを備えている(図14参照)。
In other words, the present embodiment has means for detecting the contrast evaluation value of each image data (see matrix interpolation circuit 27) obtained through at least two or more different color filters, and each of the plurality of image signals. 1 to 16 is a calculation process for performing the focusing process similar to the configuration shown in FIGS. 1 to 16, and means for selecting and calculating the plurality of image signals (
このように、この実施の形態では、撮影された画像データから生成した複数の画像データ(図18のステップ12参照)から、画像データ毎に求められた部分焦点距離の中から撮影モードに応じた所定の焦点距離を算出するとともに、求めた焦点距離に対して順次撮影を行う手段を設けたので、被写体の微妙な色の差による合焦位置のずれを気にすることなく、被写体の特徴に合った合焦位置で撮影できる。
As described above, in this embodiment, a plurality of pieces of image data (see
すなわち、複数の画像検出領域を有する複数の焦点距離算出及び最終焦点距離決定において、互いに異なる色情報の画像データから部分焦点距離を算出しているので、各色情報の画像データについて、それぞれ最適な部分焦点距離を算出し、これら部分焦点距離に基づき、ブラケット撮影を行い、撮影者に対し、1回の撮影動作で最適な画像を提供することができる。さらに、本実施の形態では、手動モードでは、色情報の違いに伴う評価値に対して重み付けを可能とし、撮影モードの設定などに応じて撮影者の意図を反映させたブラケット撮影を実現可能としている一方、自動モードでは、ホワイトバランスや補助光の色情報などを自動で認識することにより、被写体の色情報による特徴を判断し、評価値を重み付けし、簡単かつ精度良く焦点合わせできる。 That is, in calculating a plurality of focal lengths having a plurality of image detection regions and determining a final focal length, partial focal lengths are calculated from image data of different color information, so that each image data of each color information The focal length is calculated, bracket shooting is performed based on these partial focal lengths, and an optimal image can be provided to the photographer with a single shooting operation. Furthermore, in this embodiment, in the manual mode, it is possible to weight the evaluation value according to the difference in color information, and to realize bracket shooting reflecting the photographer's intention according to the setting of the shooting mode, etc. On the other hand, in the automatic mode, by automatically recognizing white balance, auxiliary light color information, and the like, it is possible to judge features of the subject color information, weight evaluation values, and focus easily and accurately.
すなわち、従来の合焦装置では、単一の輝度情報あるいは色情報のみを用いる場合、人間の目で見ると色情報にて被写体のコントラストを認識できるのに、被写体を構成する模様の各部の輝度が同じ場合はコントラストを検出できない場合があるが、本実施の形態では、特に暗い環境や、手ぶれや被写体の移動などが合った場合にも、上記のように互いに異なる色情報の画像データを用いて、それぞれの色情報について最適な部分焦点距離を1回の撮影動作で順次撮影できるため、撮影者に色情報の知識がなくても、従来自動では合焦し難かった被写体にも精度良く合焦した画像を撮影できる。 That is, in the conventional focusing device, when only single luminance information or color information is used, the contrast of the subject can be recognized by the color information when viewed with the human eye, but the luminance of each part of the pattern constituting the subject. However, in this embodiment, image data with different color information is used as described above even in a dark environment, or when camera shake or movement of the subject is suitable. Therefore, the optimum partial focal length for each color information can be taken sequentially with a single shooting operation, so that even if the photographer has no knowledge of color information, it can accurately focus on subjects that were difficult to focus on automatically in the past. You can take a sharp image.
また、例えば、植物の花などのを撮影する際には、撮影者が花びらに合焦したい場合、輝度情報のみで評価を行うと、花の周辺の緑色の葉が評価値のピークとなり、花びらに合焦しない場合があるが、本実施の形態では、例えば、色情報から部分焦点距離を算出するため、特定の色の花びらに対して、その花びらの色情報に合わせた色情報の部分焦点距離を検出して撮影できるとともに、互いに異なる複数の色の花がある場合にも、1回の撮影で各花びらに合焦した撮影を順次行い、最適な合焦位置を含めた撮影が可能になる。 For example, when photographing a flower of a plant and the like, when the photographer wants to focus on the petal, if evaluation is performed only with luminance information, the green leaf around the flower becomes the peak of the evaluation value, and the petal In this embodiment, for example, in order to calculate the partial focal length from the color information, for the petal of a specific color, the partial focus of the color information that matches the color information of the petal In addition to being able to shoot by detecting distance, even when there are multiple different colors of flowers, it is possible to shoot with the best focus position by sequentially shooting each petal in one shot. Become.
さらに、ブラケット撮影の撮影中あるいは開始時に、画像表示装置21を用いてブラケット撮影であることを視覚的に表示し、この表示に代えて、あるいは、この表示とともに、図示しない発声手段を用いて音声によりブラケット撮影であることを通知する、警告手段を備えることにより、ブラケット撮影中に撮影者が撮像装置10を移動させてしまうことを防止できる。
Further, during or during the shooting of bracket shooting, the image display device 21 is used to visually display that bracket shooting is being performed, and in place of this display or together with this display, sound is output using voice means (not shown). By providing a warning means for notifying that bracket shooting is performed, it is possible to prevent the photographer from moving the
なお、図17に示す実施の形態では、撮影モードとしては、補助光の有無についてのみ例示したが、この構成に限られず、複数の撮影モード(図12のステップ11参照)を選択可能とし、各撮影モードにおいて、それぞれ異なる色情報から得られた画像データのコントラストの評価値により、複数の部分焦点距離において順次撮影を行うブラケット撮影のモードを設けることもできる。
In the embodiment shown in FIG. 17, only the presence / absence of auxiliary light is exemplified as the photographing mode. However, the present invention is not limited to this configuration, and a plurality of photographing modes (see
例えば、図17のステップ1709,1710に示す補助光の処理に代えて、図19に示すステップ1709,1710のように処理することができる。すなわち、算出された焦点レンズ位置P(CNB)を焦点距離が近い順に並べ替え(ステップ1707)、光学系11のレンズを最も近い焦点レンズ位置P(CNB)に移動させた後(ステップ1708)、ステップ1705の焦点合わせ処理の中で、撮影モード(図13のステップ1310参照)を確認し(ステップ1709)、使用する撮影モードが単数であれば(ステップ1710)、撮影判断(ステップ1711)へ移行する。また、使用する撮影モードが複数であれば(ステップ1710)、複数の撮影モードの全てについて焦点合わせ処理を行い、それぞれ焦点レンズ位置P(CNB)を求める(ステップ1710)。
For example, instead of the auxiliary light processing shown in
そして、図17に示す処理と同様に、上記のレンズの移動の後、シャッターボタンが押し込まれ、静止画撮影が許可されている場合には(ステップ1711)、撮影処理(ステップ1712)を開始する。そして、撮影処理が終わるまで待ち(ステップ1713)、撮影処理が完了した後、指定枚数の撮影が終了したか否かを確認する(ステップ1714)。 Similarly to the processing shown in FIG. 17, after the movement of the lens, when the shutter button is pressed and still image shooting is permitted (step 1711), the shooting processing (step 1712) is started. . Then, it waits until the photographing process is finished (step 1713), and after the photographing process is completed, it is confirmed whether or not the designated number of photographings is finished (step 1714).
そして、撮影モードが単数の場合は、ブラケット撮影の枚数はCNB枚となる。そして、ステップ1714で指定枚数を終了していなかった場合は、指定枚数カウンタを−1した後(ステップ1716)、現在より遠距離側の焦点レンズ位置P(CNB)へ、レンズを移動させる(ステップ1717)。そして、指定枚数(CNB)分の撮影が終わるまで、レンズの移動と撮影を繰り返す(ステップ1711〜1717)。
When the shooting mode is single, the number of bracket shooting is CNB. If the designated number is not completed in
このようにして、色情報毎に得られた画像検出領域の部分焦点距離を用いて、各焦点距離において順次撮影するブラケット撮影を行うことができる。 In this way, bracket shooting for sequentially shooting at each focal length can be performed using the partial focal length of the image detection region obtained for each color information.
本発明は、デジタルカメラ、ビデオカメラなどの撮像装置に適用できる。 The present invention can be applied to an imaging apparatus such as a digital camera or a video camera.
10 撮像装置
11 光学系
12 撮像素子としてのCCD
15 画像処理手段を構成する画像処理回路
17 画像処理手段を構成するCPU
19 光学系駆動手段を構成するモータ駆動回路
20 光学系駆動手段を構成するモータ
21 警告手段を構成する画像表示装置
T 被写体
W1〜W9 画像検出領域を構成するウインドウ
Wh 画像検出領域
10 Imaging device
11 Optical system
12 CCD as an image sensor
15 Image processing circuit constituting image processing means
17 CPU constituting image processing means
19 Motor drive circuit constituting optical system drive means
20 Motor constituting optical system drive means
21 Image display device constituting warning means T Subject W1-W9 Window constituting image detection area Wh Image detection area
Claims (4)
前記複数の色情報のそれぞれについての焦点距離の検出において、
当該色情報の画像データについて、光学系の焦点距離を変化させることで、複数の異なる焦点距離にそれぞれ対応する複数の画像データを取得し、
当該色情報の画像データには、互いに隣接する複数の画像検出領域を設定し、
取得した前記複数の画像データのそれぞれにおいて、前記各画像検出領域について、コントラストの最大値に基づく評価値及びこの最大値を記録したピーク位置を求め、
前記各画像検出領域について、前記複数の画像データにおける前記評価値のピークが、いずれの焦点距離に対応する画像データで記録されたかにより部分焦点距離を算出するとともに、前記複数の画像データのうち少なくとも2つの画像データにおける前記ピーク位置同士の差を求め、求めた差が大きい程より低い信頼度となるように当該画像検出領域の信頼度を算出し、
前記信頼度と前記評価値との積が所定値を越える画像検出領域について算出された前記部分焦点距離及び所定の焦点距離の中から、予め設定された条件に従って当該色情報についての焦点距離を選択する
ことを特徴とする撮像方法。 Using the image data of a plurality of color information, respectively to detect the focal length for the plurality of color information to perform each captured at a focal length detected with each of the plurality of color information,
In the detection of the focal length for each of the plurality of color information,
With respect to the image data of the color information, by changing the focal length of the optical system, to obtain a plurality of image data respectively corresponding to a plurality of different focal lengths,
In the image data of the color information, a plurality of adjacent image detection areas are set,
In each of the obtained plurality of image data, for each image detection region, an evaluation value based on the maximum value of contrast and a peak position where the maximum value is recorded are obtained,
For each of the image detection regions, a partial focal length is calculated according to which peak of the evaluation value in the plurality of image data is recorded with image data corresponding to which focal length, and at least of the plurality of image data Find the difference between the peak positions in the two image data, calculate the reliability of the image detection region so that the greater the difference obtained, the lower the reliability,
A focal length for the color information is selected from the partial focal length and the predetermined focal length calculated for the image detection area in which the product of the reliability and the evaluation value exceeds a predetermined value according to a preset condition. An imaging method characterized by:
前記撮影モードのそれぞれについて、
前記複数の色情報のそれぞれについて焦点距離を検出し、検出した焦点距離でそれぞれ撮像を実行し、
前記最至近距離選択モードでは、前記複数の色情報のそれぞれについての焦点距離の検出において、前記信頼度と前記評価値との積が所定値を超える画像検出領域について算出された前記部分焦点距離のうち最小の部分焦点距離又は所定の第1焦点距離を、当該色情報についての焦点距離として選択し、
前記最遠距離選択モードでは、前記複数の色情報のそれぞれについての焦点距離の検出において、前記信頼度と前記評価値との積が所定値を超える画像検出領域について算出された前記部分焦点距離のうち最大の部分焦点距離又は所定の焦点距離であって前記第1焦点距離より大きい第2焦点距離を、当該色情報についての焦点距離として選択する
ことを特徴とする請求項1記載の撮像方法。 When it is possible to execute imaging in either the closest distance selection mode or the farthest distance selection mode, and when it is instructed to execute imaging in both the closest distance selection mode and the farthest distance selection mode In addition,
For each of the shooting mode,
A focal length is detected for each of the plurality of color information , and imaging is performed at each detected focal length ,
In the closest distance selection mode, in the detection of the focal length for each of the plurality of color information, the partial focal length calculated for the image detection region in which the product of the reliability and the evaluation value exceeds a predetermined value. The smallest partial focal length or the predetermined first focal length is selected as the focal length for the color information,
In the farthest distance selection mode, in the detection of the focal length for each of the plurality of color information, the partial focal length calculated for the image detection region in which the product of the reliability and the evaluation value exceeds a predetermined value The imaging method according to claim 1 , wherein a second focal length that is a maximum partial focal length or a predetermined focal length and is larger than the first focal length is selected as a focal length for the color information .
この撮像素子に被写体を結像させる光学系と、 An optical system for forming an image of a subject on the image sensor;
この光学系の焦点距離を変化させる光学系駆動手段と、 An optical system driving means for changing the focal length of the optical system;
前記撮像素子から出力された画像データを処理するとともに前記光学系駆動手段を制御する画像処理手段とを具備し、 Image processing means for processing the image data output from the image sensor and controlling the optical system driving means,
この画像処理手段は、 This image processing means
複数の色情報のそれぞれについて焦点距離を検出する処理であって、 A process of detecting a focal length for each of a plurality of color information,
当該色情報の画像データについて、前記光学系の焦点距離を変化させることで、複数の異なる焦点距離にそれぞれ対応する複数の画像データを取得し、 For the image data of the color information, by changing the focal length of the optical system, to obtain a plurality of image data respectively corresponding to a plurality of different focal lengths,
当該色情報の画像データには、互いに隣接する複数の画像検出領域を設定し、 In the image data of the color information, a plurality of adjacent image detection areas are set,
取得した前記複数の画像データのそれぞれにおいて、前記各画像検出領域について、コントラストの最大値に基づく評価値及びこの最大値を記録したピーク位置を求め、 In each of the obtained plurality of image data, for each image detection region, an evaluation value based on the maximum value of contrast and a peak position where the maximum value is recorded are obtained,
前記各画像検出領域について、前記複数の画像データにおける前記評価値のピークが、いずれの焦点距離に対応する画像データで記録されたかにより部分焦点距離を算出するとともに、前記複数の画像データのうち少なくとも2つの画像データにおける前記ピーク位置同士の差を求め、求めた差が大きい程より低い信頼度となるように当該画像検出領域の信頼度を算出し、 For each of the image detection regions, a partial focal length is calculated according to which peak of the evaluation value in the plurality of image data is recorded with image data corresponding to which focal length, and at least of the plurality of image data Find the difference between the peak positions in the two image data, calculate the reliability of the image detection area so that the greater the difference, the lower the reliability,
前記信頼度と前記評価値との積が所定値を越える画像検出領域について算出された前記部分焦点距離及び所定の焦点距離の中から、予め設定された条件に従って当該色情報についての焦点距離を選択する、処理を行い、 A focal length for the color information is selected according to a preset condition from the partial focal length and the predetermined focal length calculated for an image detection region in which the product of the reliability and the evaluation value exceeds a predetermined value. Do the processing,
前記複数の色情報のそれぞれについて算出した焦点距離でそれぞれ撮像を実行する Execute imaging at each focal length calculated for each of the plurality of color information
ことを特徴とする撮像装置。 An imaging apparatus characterized by that.
ことを特徴とする請求項3記載の撮像装置。 Provide warning means to indicate that imaging is in progress
The imaging apparatus according to claim 3 .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004064646A JP4301977B2 (en) | 2004-03-08 | 2004-03-08 | Imaging method and imaging apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004064646A JP4301977B2 (en) | 2004-03-08 | 2004-03-08 | Imaging method and imaging apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005250402A JP2005250402A (en) | 2005-09-15 |
| JP4301977B2 true JP4301977B2 (en) | 2009-07-22 |
Family
ID=35030902
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004064646A Expired - Fee Related JP4301977B2 (en) | 2004-03-08 | 2004-03-08 | Imaging method and imaging apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4301977B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4659586B2 (en) * | 2005-10-19 | 2011-03-30 | 富士フイルム株式会社 | Interchangeable lens camera, lens unit, and camera body of interchangeable lens camera |
| JP5597942B2 (en) * | 2009-06-10 | 2014-10-01 | 株式会社ニコン | Electronic camera |
| JP6124538B2 (en) * | 2012-09-06 | 2017-05-10 | キヤノン株式会社 | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM |
| JP6598028B2 (en) * | 2016-02-22 | 2019-10-30 | パナソニックIpマネジメント株式会社 | Imaging device |
-
2004
- 2004-03-08 JP JP2004064646A patent/JP4301977B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2005250402A (en) | 2005-09-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20050212950A1 (en) | Focal length detecting method, focusing device, image capturing method and image capturing apparatus | |
| JP4364078B2 (en) | Imaging method and imaging apparatus | |
| US20050099522A1 (en) | Variable length encoding method and variable length decoding method | |
| JP5176483B2 (en) | Image recognition device, image tracking device, and imaging device | |
| JP3541820B2 (en) | Imaging device and imaging method | |
| JP5082631B2 (en) | Imaging device | |
| JP4872834B2 (en) | Image recognition device, focus adjustment device, and imaging device | |
| JP2005309323A (en) | Focal length detecting method of imaging, and imaging apparatus | |
| JP5247076B2 (en) | Image tracking device, focus adjustment device, and imaging device | |
| US8411159B2 (en) | Method of detecting specific object region and digital camera | |
| JP2004264827A (en) | Focal length detection method and focusing device | |
| US7864239B2 (en) | Lens barrel and imaging apparatus | |
| JP4893334B2 (en) | Image tracking device and imaging device | |
| JP2009109839A (en) | Image tracking device, imaging device | |
| US20040252223A1 (en) | Image pickup device, image pickup system and image pickup method | |
| JP5115302B2 (en) | Focus detection apparatus and focus detection method | |
| JP2005250401A (en) | Method for detecting focal distance and focusing device | |
| JP2012155149A (en) | Imaging apparatus and method for controlling the same | |
| JP4888249B2 (en) | Focus detection apparatus and imaging apparatus | |
| JP4301977B2 (en) | Imaging method and imaging apparatus | |
| JP4170194B2 (en) | Imaging device | |
| JP4985155B2 (en) | Focus adjustment device and imaging device | |
| JP2005173254A (en) | Camera system | |
| JP2007133301A (en) | Auto focus camera | |
| JP2010200138A (en) | Photographic subject tracking device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051213 |
|
| A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20070208 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070810 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070828 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071122 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20090407 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090421 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120501 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130501 Year of fee payment: 4 |
|
| LAPS | Cancellation because of no payment of annual fees | ||
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
| R371 | Transfer withdrawn |
Free format text: JAPANESE INTERMEDIATE CODE: R371 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |