JP6060486B2 - Focus adjustment device, imaging device, and focus adjustment program - Google Patents
Focus adjustment device, imaging device, and focus adjustment program Download PDFInfo
- Publication number
- JP6060486B2 JP6060486B2 JP2012010367A JP2012010367A JP6060486B2 JP 6060486 B2 JP6060486 B2 JP 6060486B2 JP 2012010367 A JP2012010367 A JP 2012010367A JP 2012010367 A JP2012010367 A JP 2012010367A JP 6060486 B2 JP6060486 B2 JP 6060486B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- evaluation value
- control unit
- contrast
- specific area
- 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.)
- Active
Links
Images
Landscapes
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
Description
本発明は、被写体に合焦させる焦点調節装置、撮像装置、及び焦点調節プログラムに関する。 The present invention relates to a focus adjustment device, an imaging device, and a focus adjustment program for focusing on a subject.
被写体が撮像装置の方向に移動した場合でも、その被写体に合焦させることを目的とした撮像装置が、特許文献1に開示されている。 Japanese Patent Application Laid-Open No. 2004-151820 discloses an imaging apparatus that aims to focus on a subject even when the subject moves in the direction of the imaging apparatus.
しかしながら、特許文献1に開示された撮像装置は、各画素に対して画像マッチングを実行することで被写体を検出している。このため、特許文献1に開示された撮像装置は、被写体が回転した場合、画像がマッチせず、被写体に精度良く合焦させることができないという問題がある。
However, the imaging apparatus disclosed in
本発明は、前記の点に鑑みてなされたものであり、被写体に精度良く合焦させることができる焦点調節装置、撮像装置、及び焦点調節プログラムを提供することを目的とする。 SUMMARY An advantage of some aspects of the invention is that it provides a focus adjustment device, an imaging device, and a focus adjustment program that can accurately focus on a subject.
本発明の一実施形態は、上記の課題を解決するためになされたものであり、撮影された被写体の第1画像と、前記第1画像よりも後に撮影された被写体の第2画像と、から特定領域を抽出する抽出部と、前記第1画像から抽出された特定領域のコントラストに基づく評価値と、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、が異なる場合、前記第2画像から抽出された特定領域に対して合焦させるように焦点調節に用いるレンズを制御する制御部と、を備え、前記制御部は、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、記憶部に予め記憶されている、コントラスト評価値と前記レンズの位置との対応関係と、により前記レンズの移動量を制限する焦点調節装置である。
また、本発明の一実施形態は、撮影された被写体の第1画像と、前記第1画像よりも後に撮影された被写体の第2画像と、から特定領域を抽出する抽出部と、前記第1画像から抽出された特定領域のコントラストに基づく評価値と、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、が異なる場合、前記第2画像から抽出された特定領域に対して合焦させるように焦点調節に用いるレンズを制御する制御部と、を備え、前記制御部は、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、記憶部に予め記憶されている、コントラスト評価値と前記レンズの位置との対応関係と、により前記レンズの移動量を制限する撮像装置である。
One embodiment of the present invention has been made to solve the above problem, and includes a first image of a photographed subject and a second image of a subject photographed after the first image. When the extraction unit that extracts the specific region, the evaluation value based on the contrast of the specific region extracted from the first image, and the evaluation value based on the contrast of the specific region extracted from the second image are different, A control unit that controls a lens used for focus adjustment so that the specific region extracted from the second image is in focus, and the control unit adjusts the contrast of the specific region extracted from the second image. The focus adjustment device limits the amount of movement of the lens based on the evaluation value based on it and the correspondence relationship between the contrast evaluation value and the position of the lens stored in advance in a storage unit .
In one embodiment of the present invention, an extraction unit that extracts a specific region from a first image of a photographed subject and a second image of a subject photographed after the first image, and the first When the evaluation value based on the contrast of the specific area extracted from the image is different from the evaluation value based on the contrast of the specific area extracted from the second image, the evaluation value for the specific area extracted from the second image A control unit that controls a lens used for focus adjustment so as to be in focus, and the control unit stores an evaluation value based on a contrast of a specific area extracted from the second image and a storage unit in advance. The image pickup apparatus restricts the amount of movement of the lens based on the correspondence between the contrast evaluation value and the position of the lens .
また、本発明の一実施形態は、焦点調節装置のコンピュータに、撮影された被写体の第1画像と、前記第1画像よりも後に撮影された被写体の第2画像と、から特定領域を抽出する手順と、前記第1画像から抽出された特定領域のコントラストに基づく評価値と、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、が異なる場合、前記第2画像から抽出された特定領域に対して合焦させるように焦点調節に用いるレンズを制御する手順と、を実行させるための焦点調節プログラムであって、前記レンズを制御する手順は、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、記憶部に予め記憶されている、コントラスト評価値と前記レンズの位置との対応関係と、により前記レンズの移動量を制限する焦点調節プログラムである。 In one embodiment of the present invention, a specific region is extracted from a first image of a photographed subject and a second image of a subject photographed after the first image in a computer of the focus adjustment apparatus. If the procedure and the evaluation value based on the contrast of the specific area extracted from the first image are different from the evaluation value based on the contrast of the specific area extracted from the second image, it is extracted from the second image. A control program for controlling a lens used for focus adjustment so as to focus on a specific area , wherein the procedure for controlling the lens is extracted from the second image. The amount of movement of the lens is limited by the evaluation value based on the contrast of the specific area and the correspondence relationship between the contrast evaluation value and the position of the lens stored in advance in the storage unit. Is a focus adjustment program.
本発明によれば、焦点調節装置、及び撮像装置は、被写体に精度良く合焦させることができる。 According to the present invention, the focus adjustment device and the imaging device can focus on the subject with high accuracy.
[第1実施形態]
本発明の第1実施形態について図面を参照して詳細に説明する。図1には、撮像装置、レンズ鏡筒及び記憶媒体の構成が、ブロック図により表されている。撮像装置100は、レンズ鏡筒111を介して光学像(被写体像)を撮像し、得られた画像を静止画又は動画の画像として、記憶媒体200に記憶させる。
[First Embodiment]
A first embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram illustrating the configuration of the imaging device, the lens barrel, and the storage medium. The
まず、レンズ鏡筒の構成を説明する。
レンズ鏡筒111は、合焦レンズ(以下、「AF(Auto Focus)レンズ」という)112と、レンズ駆動部116と、AFエンコーダ117と、鏡筒制御部118とを備える。なお、レンズ鏡筒111は、撮像装置100に着脱可能に接続されてもよいし、撮像装置100と一体であってもよい。
First, the configuration of the lens barrel will be described.
The
AFレンズ112は、レンズ駆動部116により駆動され、撮像装置100が備える撮像部110の撮像素子119(後述)の受光面(光電変換面)に、被写体の光学像を導く。
The AF lens 112 is driven by a
AFエンコーダ117は、AFレンズ112の移動を検出し、AFレンズ112の移動量に応じた信号を、鏡筒制御部118に出力する。ここで、AFレンズ112の移動量に応じた信号とは、例えば、AFレンズ112の移動量に応じて位相が変化するサイン(sin)波信号である。
The
鏡筒制御部118は、撮像装置100から入力される駆動制御信号に応じて、レンズ駆動部116を制御する。ここで、駆動制御信号とは、AFレンズ112を光軸方向に駆動させるための制御信号である。鏡筒制御部118は、駆動制御信号に応じて、レンズ駆動部116に出力するパルス電圧のステップ数を変更する。
The lens
また、鏡筒制御部118は、AFレンズ112の移動量に応じた信号に基づいて、レンズ鏡筒111におけるAFレンズ112の位置(フォーカス・ポジション)を、撮像装置100に出力する。ここで、鏡筒制御部118は、AFレンズ112の移動量に応じた信号を、移動方向に応じて積算することで、レンズ鏡筒111におけるAFレンズ112の移動量(位置)を算出する。
Further, the lens
レンズ駆動部116は、鏡筒制御部118による制御に応じてAFレンズ112を駆動し、AFレンズ112をレンズ鏡筒111内で光軸方向に移動させる。
The
次に、撮像装置の構成を説明する。
撮像装置100は、撮像部110と、画像処理部140と、表示部150と、バッファメモリ部130と、操作部180と、記憶部160と、CPU190と、通信部170と、焦点調節装置191とを備える。
Next, the configuration of the imaging apparatus will be described.
The
撮像部110は、撮像素子119と、A/D(Analog/Digital)変換部120とを備える。撮像部110の各部は、設定された撮像条件(例えば、絞り値、露出値)に基づいてCPU190により制御される。
The imaging unit 110 includes an
撮像素子119は、光電変換面を備える。撮像素子119は、レンズ鏡筒111(光学系)により光電変換面に結像された光学像を電気信号に変換し、変換した電気信号をA/D変換部120に出力する。撮像素子119は、例えば、CMOS(Complementary Metal Oxide Semiconductor)で構成される。また、撮像素子119は、光電変換面の一部に結像された光学像を、電気信号に変換してもよい(切り出し)。
The
また、撮像素子119は、操作部180を介して撮影指示を受け付けた際に得られた画像を、A/D変換部120を介して記憶媒体200に記憶させる。一方、撮像素子119は、撮像指示を受け付けていない状態では、連続的に得られる画像をスルー画像として、焦点調節装置191及び表示部150に対して、A/D変換部120を介して出力する。
Further, the
A/D変換部120は、撮像素子119により変換された電気信号をデジタル化し、デジタル化した電気信号により表される画像を、バッファメモリ部130に出力する。
操作部180は、ユーザによる操作入力を受け付け、操作入力に応じた信号をCPU190に出力する。操作部180は、ユーザ・インターフェース(UI)として、例えば、電源スイッチ、シャッタボタン、マルチセレクタ(十字キー)、又はその他の操作キーを備える。
The A /
The
画像処理部140は、記憶部160に記憶されている画像処理条件を参照し、バッファメモリ部130に一時的に記憶されている画像に対して、画像処理を施す。画像処理部140は、画像処理を施した画像を、通信部170を介して記憶媒体200に記憶させる。
表示部150は、撮像部110により得られた画像、及び操作画面などを表示する。表示部150は、例えば、液晶ディスプレイである。
The
The
バッファメモリ部130は、撮像部110により撮像された画像を一時的に記憶する。
記憶部160は、撮像する場面を判定するシーン判定の際にCPU190から参照される判定条件、及び、判定された撮像シーン毎に対応付けられた撮像条件(例えば、絞り値、露出値)などを記憶する。
The
The
CPU190は、設定された撮像条件に従って撮像部110を制御する。また、CPU190は、操作部180から入力された「操作入力に応じた信号」に基づいて、静止画又は動画として、画像処理部140に画像を画像処理させる。
The
通信部170は、取り外しが可能な記憶媒体200(例えば、メモリカード)と接続され、記憶媒体200への情報(画像データなど)の書込み、読み出し又は消去を実行する。
記憶媒体200は、撮像装置100に対して着脱可能に接続される記憶部であって、各種の情報(画像データなど)を記憶する。なお、記憶媒体200は、撮像装置100と一体であってもよい。
The
The
次に、焦点調節装置の構成を説明する。
焦点調節装置191は、撮像された時刻が異なる複数のフレーム画像(動画、スルー画)を取得する。また、焦点調節装置191は、フレーム画像において被写体が撮像されている領域であって、ラベル(識別情報)が割り当てられた領域(以下、「ラベル領域」という)に合焦させる。
Next, the configuration of the focus adjustment device will be described.
The
焦点調節装置191は、取得部192と、制御部193とを備える。取得部192は、AFレンズ112を介して撮像された時刻が異なる複数のフレーム画像を、動画又はスルー画として、A/D変換部120を介して撮像素子119から取得する。
The
制御部193には、取得部192が取得した複数のフレーム画像が入力される。制御部193(被写体領域抽出部)は、フレーム画像において主要被写体が撮像されている領域(主要被写体領域)を、画像特徴量に基づいてフレーム画像から抽出する。ここで、画像特徴量とは、例えば、領域の分布(位置、形状(慣性モーメント))、領域の面積、領域の数、デフォーカス量(被写体距離)、動きベクトル(差分データ)、色相(色成分)、彩度、明度、及びテクスチャ(模様)である。制御部193(算出部)は、画像特徴量に基づいて、抽出された主要被写体領域の輪郭線(エッジ)及びコントラスト評価値を検出(算出)する。
A plurality of frame images acquired by the
また、制御部193は、相対的に前の時刻に撮像されたフレーム画像に対して用いた画像特徴量を、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)に対しても用いることで、フレーム画像において被写体が撮像されている領域を抽出する。これにより、制御部193は、被写体の前後移動又は回転などにより被写体の見掛けの大きさ、明るさ、面積又は形状が変化しても、フレーム画像同士の差分に基づく画像マッチングと比較して容易に領域を抽出することができる。なお、制御部193は、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)において領域を抽出しにくい場合、画像特徴量の条件を緩くしてもよい。
In addition, the
また、制御部193は、山登りオートフォーカス(山登りAF)をフレーム画像に対して実行することにより、被写体が撮像された領域に合焦させる。また、制御部193は、山登りオートフォーカスの際に検出した色成分毎のコントラスト評価値を、色成分毎のコントラスト評価値の初期値として、記憶部160に記憶させる。
In addition, the
コントラスト評価値の初期値が記憶部160に記憶されている場合、すなわち、被写体が撮像された領域に1回以上合焦させた場合、制御部193は、抽出した領域にラベルを割り当てることで、抽出した領域をラベル領域とする(ラベリング)。また、制御部193は、コントラスト・オートフォーカス(コントラストAF)を実行する際にコントラスト評価値を検出する範囲として、ラベル領域に外接するウィンドウ(測距枠)を画像に定める。ウィンドウは、例えば、矩形の枠である。
When the initial value of the contrast evaluation value is stored in the
また、制御部193は、AFレンズ112の位置を制御することで、撮像された時刻が異なる複数のフレーム画像の各ラベル領域に合焦させる。ここで、制御部193は、鏡筒制御部118に駆動制御信号を出力することにより、レンズ鏡筒111におけるAFレンズ112の位置を制御する。
In addition, the
制御部193(特徴量比較部)は、複数のフレーム画像のうち、相対的に前の時刻に撮影されたフレーム画像のラベル領域(主要被写体領域)と、相対的に後の時刻に撮影されたフレーム画像のラベル領域とを比較し、フレーム画像においてラベル領域の位置が変化したか否かを判定する。ここで、制御部193は、フレーム画像においてラベル領域の位置が変化しているか否かに係わらず、コントラスト評価値を検出するものとする。これは、フレーム画像においてラベル領域の位置が変化していなくても、被写体と撮像装置100との距離(被写体距離)が変化している場合には、被写体距離に応じてコントラスト評価値が変化するためである。
The control unit 193 (feature amount comparison unit) was photographed at a relatively later time with a label region (main subject region) of a frame image photographed at a relatively earlier time among a plurality of frame images. A comparison is made with the label area of the frame image to determine whether or not the position of the label area has changed in the frame image. Here, the
制御部193は、相対的に前の時刻に撮像されたフレーム画像におけるラベル領域の位置と、相対的に後の時刻に撮像されたフレーム画像におけるラベル領域の位置とが異なる場合、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)におけるラベル領域に、再び合焦させる。
When the position of the label area in the frame image captured at the relatively previous time is different from the position of the label area in the frame image captured at the relatively later time, the
次に、焦点調節装置の動作手順を説明する。
図2は、焦点調節装置の動作手順を表すフローチャートである。また、図3は、画像においてラベル領域の位置が変化した場合に合焦させるタイミングを説明するための図である。
操作部180は、追尾モードに状態遷移する旨の指示を、操作入力により受け付けたとする。ここで、追尾モードとは、動画又はスルー画において被写体を追尾するための動作モードである。操作部180は、追尾モードを受け付けたことを表す信号を、制御部193に出力する。これにより、制御部193は、追尾モードに状態遷移する(図2:ステップS1)。
Next, the operation procedure of the focus adjustment device will be described.
FIG. 2 is a flowchart showing an operation procedure of the focus adjustment apparatus. FIG. 3 is a diagram for explaining the timing for focusing when the position of the label area changes in the image.
It is assumed that the
また、操作部180は、制御部193が追尾する対象とする被写体の指定を、操作入力(カメラ・ユーザ・インターフェース(カメラUI))により受け付けたとする。ここで、制御部193が追尾する対象とする被写体は、動画又はスルー画における被写体の座標に基づいて指定されてもよいし、被写体距離を表す情報(例えば、マクロ撮影であるか否かを表す情報)に基づいて指定されてもよい(図2:ステップS2)。
Further, it is assumed that the
制御部193は、指定された被写体が撮像された領域に対して山登りオートフォーカスを実行し、その領域に1回以上合焦させる。さらに、制御部193は、被写体の色成分(RGB値)に基づいて、フレーム画像からラベル領域を抽出する(図2:ステップS3)。また、制御部193は、ラベル領域に外接するウィンドウ(測距枠)をフレーム画像に定める(図2:ステップS4)。ここで、ラベル領域400(図3を参照)に外接するウィンドウ500が、相対的に前の時刻に撮像されたフレーム画像300(初期のフレーム画像)に定められたとする。
The
制御部193は、ウィンドウ500内のコントラスト評価値を色成分毎に積分する(図2:ステップS5)。また、制御部193は、色成分毎に積分したコントラスト評価値を、記憶部160に記憶させる(図2:ステップS6)。また、制御部193は、ウィンドウ500内についてコントラスト・オートフォーカスを実行することにより、AFレンズ112の位置を制御し、ラベル領域400に合焦させる(図2:ステップS7)。
The
そして、制御部193は、相対的に後の時刻に撮像された画像(後続のフレーム画像)を取得する(図2:ステップS8)。ここで、制御部193は、フレーム画像301(図3を参照)を取得したとする。
And the
制御部193は、今回取得したフレーム画像301においてラベル領域400の位置が変化したか否かを判定する(図2:ステップS9)。ラベル領域400の位置が変化していない場合(ステップS9−NO)、制御部193は、前回取得したフレーム画像300に用いた画像特徴量の条件と同じ条件に基づいて、今回取得したフレーム画像301をラベリングする(図2:ステップS10)。また、制御部193は、ウィンドウ500内のコントラスト評価値を色成分毎に積分し(図2:ステップS11)、図2のステップS8に処理を戻す。
The
一方、ステップS9において、ラベル領域400の位置が変化している場合(図2:ステップS9−YES)、制御部193は、ウィンドウ500内についてコントラスト・オートフォーカスを実行することにより、AFレンズ112の位置を制御し、ラベル領域400に合焦させる(図2:ステップ12)。制御部193は、フレーム画像301(図3を参照)において、ウィンドウ500内についてコントラスト・オートフォーカスを実行することにより、AFレンズ112の位置を制御し、位置が変化しているラベル領域400に合焦させる。そして、制御部193は、図2のステップS8に処理を戻す。
On the other hand, when the position of the
以上のように、焦点調節装置191は、AFレンズ112を介して撮影された、撮影時刻が異なる複数の画像を取得する取得部192と、取得部192により取得された前記画像の特徴量に基づいて、主要被写体領域を抽出する制御部193(被写体領域抽出部)と、前記複数の画像のうち、相対的に前の時刻に撮影された画像の主要被写体領域と相対的に後の時刻に撮影された主要被写体領域とを比較する制御部193(特徴量比較部)と、制御部193(特徴量比較部)による比較結果に応じてAFレンズ112を制御する制御部193と、を備える。
この構成により、焦点調節装置は、画像同士の差分に基づく画像マッチングと比較して被写体を検出し易い(被写体の移動又は回転に対して耐性が在る)画像特徴量に基づいて抽出されたラベル領域に合焦させるので、これにより、被写体に精度良く合焦させることができる。また、焦点調節装置は、被写体が移動又は回転した場合でも、画像に撮像された被写体を追尾することができる。
As described above, the
With this configuration, the focus adjustment device can easily detect a subject as compared with image matching based on the difference between images (tolerant to movement or rotation of the subject), and a label extracted based on an image feature amount Since the area is focused, it is possible to focus on the subject with high accuracy. Further, the focus adjustment device can track the subject captured in the image even when the subject moves or rotates.
また、制御部193(被写体領域抽出部)は、画像特徴量である領域の分布、領域の面積、領域の数、デフォーカス量、動きベクトル、色成分、彩度、明度及びテクスチャのうち少なくとも1つに基づいて、ラベル領域を抽出する。
これにより、焦点調節装置は、被写体の見掛けの面積、形状又は光量が変化しても、画像同士の差分に基づく画像マッチングと比較して被写体を容易に検出して、被写体に精度良く合焦させることができる。
In addition, the control unit 193 (subject region extraction unit) includes at least one of the distribution of the region that is the image feature amount, the area of the region, the number of regions, the defocus amount, the motion vector, the color component, the saturation, the brightness, and the texture. The label area is extracted based on the one.
As a result, the focus adjustment device can easily detect the subject and accurately focus on the subject even when the apparent area, shape, or amount of light of the subject changes, compared to image matching based on the difference between images. be able to.
また、制御部193は、相対的に前の時刻に撮影された画像のラベル領域(主要被写体領域)の位置と相対的に後の時刻に撮影された画像の前記主要被写体領域の位置とが異なる場合、前記相対的に後の時刻に撮影された画像(後続のフレーム画像)の前記主要被写体領域に合焦させるようにAFレンズ112を制御する。
この構成により、焦点調節装置は、ラベル領域の位置が変化した場合、ラベル領域に再び合焦させるので、これにより、適切なタイミングで被写体に合焦させ、必要以上に頻繁に被写体に合焦させることなく、動画及びスルー画を見やすく表示させることができる。
In addition, the
With this configuration, when the position of the label area changes, the focus adjustment device refocuses the label area. Accordingly, the focus adjustment apparatus focuses the subject at an appropriate timing, and focuses the subject more frequently than necessary. Therefore, the moving image and the through image can be displayed easily.
[第2実施形態]
本発明の第2実施形態について図面を参照して詳細に説明する。第2実施形態では、画像における被写体の位置が変化しない代わりに、被写体距離が変化する点が、第1実施形態と異なる。以下では、第1実施形態との相違点についてのみ説明する。
[Second Embodiment]
A second embodiment of the present invention will be described in detail with reference to the drawings. The second embodiment is different from the first embodiment in that the subject distance changes instead of the subject position in the image not changing. Only the differences from the first embodiment will be described below.
制御部193(算出部)は、抽出されたラベル領域(主要被写体領域)のコントラスト評価値を算出する。また、制御部193(図1を参照)は、AFレンズ112を光軸方向に前後移動させる(ウォブリング)。制御部193は、ウォブリングによるコントラスト評価値の増減に基づいて、被写体の前景に合焦している状態(以下、「前ピン」という)であるか、又は、被写体の背景に合焦している状態(以下、「後ピン」という)であるかを判定する。
The control unit 193 (calculation unit) calculates the contrast evaluation value of the extracted label area (main subject area). The control unit 193 (see FIG. 1) moves the AF lens 112 back and forth in the optical axis direction (wobbling). The
制御部193は、相対的に前の時刻に撮像されたフレーム画像におけるラベル領域(主要被写体領域)のコントラスト評価値と、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)におけるラベル領域(主要被写体領域)のコントラスト評価値とが異なる場合、後続のフレーム画像におけるラベル領域に再び合焦させる。ここで、制御部193は、前ピンであるか又は後ピンであるかの判定結果に基づいて、AFレンズ112の移動方向を前ピン方向又は後ピン方向のいずれか一方に制限して、ウィンドウ内についてコントラスト・オートフォーカスを実行することにより、ラベル領域に合焦させる。
The
また、制御部193は、相対的に前の時刻に撮像されたフレーム画像におけるラベル領域のコントラスト評価値を初期値とし、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)におけるラベル領域のコントラスト評価値が初期値以上になるまでAFレンズ112の位置を制御することで、ラベル領域に再び合焦させる。
In addition, the
ここで、S0を「コントラスト評価値の初期値」とし、S1を「後続のフレーム画像におけるコントラスト評価値」とし、ΔSを(S1−S0)又は(S1/S0)とし、K1を「予め定められた閾値」とする。 Here, S0 is “initial value of contrast evaluation value”, S1 is “contrast evaluation value in subsequent frame image”, ΔS is (S1−S0) or (S1 / S0), and K1 is “predetermined. Threshold ”.
制御部193は、ΔS>K1が成立している場合、合焦していない(ピントがずれている)と判定する。また、制御部193は、この式が成立しなくなるまで、AFレンズ112の位置を制御することで、ラベル領域に再び合焦させる。
When ΔS> K1 is satisfied, the
次に、焦点調節装置の動作手順を説明する。
図4は、焦点調節装置の動作手順を表すフローチャートである。操作部180は、追尾モードに状態遷移する旨の指示を、操作入力により受け付けたとする。操作部180は、追尾モードを受け付けたことを表す信号を、制御部193に出力する。これにより、制御部193は、追尾モードに状態遷移する(図4:ステップSa1)。また、操作部180は、制御部193が追尾する対象とする被写体の指定を、操作入力(カメラUI)により受け付けたとする(図4:ステップSa2)。
Next, the operation procedure of the focus adjustment device will be described.
FIG. 4 is a flowchart showing an operation procedure of the focus adjustment apparatus. It is assumed that the
制御部193は、指定された被写体が撮像された領域に対して山登りオートフォーカスを実行し、その領域に山登りオートフォーカスにより1回以上合焦させる。さらに、制御部193は、被写体の色成分(RGB値)に基づいて、フレーム画像からラベル領域を抽出する(図4:ステップSa3)。また、制御部193は、ラベル領域に外接するウィンドウ(測距枠)を画像に定める(図4:ステップSa4)。
The
制御部193は、相対的に前の時刻に撮像されたフレーム画像(初期のフレーム画像)に定められたウィンドウ内のコントラスト評価値を、色成分毎に積分する(図4:ステップSa5)。また、制御部193は、色成分毎に積分したコントラスト評価値を、記憶部160に記憶させる(図4:ステップSa6)。
The
そして、制御部193は、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)を取得する(図4:ステップSa8)。また、制御部193は、今回取得したフレーム画像に定められたウィンドウ内のコントラスト評価値を、色成分毎に積分する(図4:ステップSa9)。
Then, the
制御部193は、今回取得したフレーム画像においてコントラスト評価値が低減(劣化)したか否かを判定する(図4:ステップSa10)。コントラスト評価値が低減した場合(ステップSa10−YES)、制御部193は、前回取得したフレーム画像に用いた画像特徴量の条件と同じ条件に基づいて、今回取得したフレーム画像についてラベリングを実行する(図4:ステップSa11)。また、制御部193は、今回取得したフレーム画像に定められたウィンドウ内のコントラスト評価値を、色成分毎に積分する(図4:ステップSa12)。
The
また、制御部193は、今回取得したフレーム画像においてコントラスト評価値が低減したか否かを判定する(図4:ステップSa13)。コントラスト評価値が低減した場合(ステップSa13−YES)、制御部193は、ウォブリングによるコントラスト評価値の増減に基づいて、前ピンであるか又は後ピンであるかを判定する。
Further, the
また、制御部193は、この判定結果に基づいて、AFレンズ112の移動方向を前ピン方向又は後ピン方向のいずれか一方に制限し、ウィンドウ内についてコントラスト・オートフォーカスを実行することにより、ラベル領域に合焦させる。ここで、制御部193は、前ピン又は後ピンのデフォーカス量(ぼけ量)に基づいて、AFレンズ112の移動量を制限しながらコントラスト・オートフォーカスを実行することにより、ラベル領域に合焦させる(図4:ステップSa15)。このように、焦点調節装置は、AFレンズ112の移動量を制限するので、ラベル領域に精度良く短時間で合焦させることができる。
Further, based on the determination result, the
一方、ステップSa10において、コントラスト評価値が低減していない場合(ステップSa10−YES)、制御部193は、図4のステップSa8に処理を戻す。
また、ステップSa13において、コントラスト評価値が低減していない場合(ステップSa13−YES)、制御部193は、図4のステップSa8に処理を戻す。
On the other hand, when the contrast evaluation value is not reduced in step Sa10 (step Sa10-YES), the
If the contrast evaluation value is not reduced in step Sa13 (step Sa13-YES), the
以上のように、焦点調節装置191は、制御部193(被写体領域抽出部)により抽出された前記主要被写体領域のコントラスト評価値を算出する算出部をさらに備える。制御部193は、相対的に前の時刻に撮影された画像の前記主要被写体領域のコントラスト評価値と相対的に後の時刻に撮影された画像(後続のフレーム画像)の前記主要被写体領域のコントラスト評価値とが異なる場合、前記相対的に後の時刻に撮影された画像の前記主要被写体領域に合焦させる。
この構成により、焦点調節装置は、コントラスト評価値が変化した場合、ラベル領域に合焦させるので、これにより、被写体に精度良く短時間で合焦させることができる。また、焦点調節装置は、被写体が移動又は回転した場合でも、画像に撮像された被写体を追尾することができる。
As described above, the
With this configuration, when the contrast evaluation value changes, the focus adjustment device focuses on the label area, so that the subject can be focused accurately and in a short time. Further, the focus adjustment device can track the subject captured in the image even when the subject moves or rotates.
また、制御部193は、相対的に前の時刻に撮像された画像の前記主要被写体領域のコントラスト評価値を初期値とし、相対的に後の時刻に撮像された画像の前記主要被写体領域のコントラスト評価値が前記初期値以上になるまでAFレンズ112の位置を制御することで、ラベル領域(主要被写体領域)に再び合焦させる。
この構成により、焦点調節装置は、コントラスト評価値を初期値に基づいて、ラベル領域に合焦させるために最適なAFレンズの位置を定めるので、ラベル領域に精度良く短時間で合焦させることができる。
In addition, the
With this configuration, the focus adjustment device determines the optimum AF lens position for focusing the label evaluation area on the basis of the contrast evaluation value based on the initial value. it can.
[第3実施形態]
本発明の第3実施形態について図面を参照して詳細に説明する。第3実施形態では、ラベル領域の輪郭線のコントラスト評価値に基づいて合焦させる点が、第1及び第2実施形態と異なる。以下では、第1及び第2実施形態との相違点についてのみ説明する。
[Third Embodiment]
A third embodiment of the present invention will be described in detail with reference to the drawings. The third embodiment is different from the first and second embodiments in that focusing is performed based on the contrast evaluation value of the outline of the label region. Only the differences from the first and second embodiments will be described below.
まず、焦点調節装置の構成を説明する。
制御部193は、エッジ検出オペレータ(微分オペレータ)を用いて演算を実行し、ラベル領域の輪郭線を色成分毎にフレーム画像から抽出する。また、制御部193は、ラベル領域の輪郭線の全体のコントラスト評価値が変化した場合、ラベル領域に再び合焦させる。
First, the configuration of the focus adjustment device will be described.
The
図5は、エッジ検出オペレータを説明するための図である。図5では、画素600と画素601とが隣接しているとする。また、画素600の画像特徴量は「+1」と、画素601の画像特徴量は「0」とする。また、エッジ検出オペレータ700は、隣接する一方の画素の画像特徴量に対する係数「−1」と、隣接する他方の画素の画像特徴量に対する係数「+1」とを有する。
FIG. 5 is a diagram for explaining an edge detection operator. In FIG. 5, it is assumed that the
制御部193(算出部)は、隣接する画素同士の画像特徴量の差(傾斜)を検出(算出)し、検出した差の絶対値に基づいて、ラベル領域の輪郭線を抽出する。具体的には、制御部193は、画素600の画像特徴量「+1」と、エッジ検出オペレータ700の係数「−1」とを乗算する。また、制御部193は、画素601の画像特徴量「0」と、エッジ検出オペレータ700の係数「+1」とを乗算する。さらに、制御部193は、これらの乗算結果を加算し、加算結果の絶対値を算出する。以下、エッジ検出オペレータの出力値を「コントラスト評価値」という。コントラスト評価値は、ラベル領域の輪郭線の画像特徴量(エッジパワー)の差に応じた値となる。
The control unit 193 (calculation unit) detects (calculates) a difference (inclination) in the image feature amount between adjacent pixels, and extracts a contour line of the label area based on the absolute value of the detected difference. Specifically, the
制御部193は、算出したコントラスト評価値に基づいて、フレーム画像からラベル領域の輪郭線を抽出する。図6には、ラベル領域の輪郭線と、輪郭線の全体を含むウィンドウとが表されている。図6では、ウィンドウ520aがラベル領域の輪郭線420aの全体を含んでいることが表されている。
The
制御部193は、画素毎の画像特徴量により定まるコントラスト評価値の度数分布(ヒストグラム)に基づいて、ラベル領域に再び合焦させる。図7には、コントラスト評価値の度数分布が、色成分毎に表されている。横軸は、コントラスト評価値を表す。縦軸は、コントラスト評価値の度数を表す。ここで、輪郭線に含まれる色成分である赤色(Rチャネル)、緑色(Gチャネル)及び青色(Bチャネル)のそれぞれのコントラスト評価値の度数分布が表されている。
The
焦点調節を実行するか否かの判定には、度数が一定以上在る色成分(色チャネル)が、制御部193により選択される。なお、判定に用いられる色成分は、コントラスト評価値の度数分布の平均値(Ave)又は分散(σ)に基づいて選択されてもよい。
In determining whether or not to perform focus adjustment, a color component (color channel) having a frequency equal to or higher than a certain level is selected by the
記憶部160(図1を参照)は、コントラスト評価値と、AFレンズ112の位置とを対応付けて予め記憶する。また、記憶部160は、制御部193による制御に応じて、色成分毎のコントラスト評価値を記憶する。
The storage unit 160 (see FIG. 1) stores the contrast evaluation value and the position of the AF lens 112 in advance in association with each other. In addition, the
図8には、コントラスト評価値の度数分布が、被写体距離毎に表されている。図8(A)には、被写体距離2[m]における度数分布が表されている。また、図8(B)には、被写体距離2.2[m]における度数分布が表されている。また、図8(C)には、被写体距離2.5[m]における度数分布が表されている。また、図8(D)には、被写体距離4[m]における度数分布が表されている。図8に表されているように、被写体距離が長いほど、度数分布の分散は大きくなる。 In FIG. 8, the frequency distribution of contrast evaluation values is represented for each subject distance. FIG. 8A shows a frequency distribution at a subject distance of 2 [m]. FIG. 8B shows a frequency distribution at a subject distance of 2.2 [m]. FIG. 8C shows a frequency distribution at a subject distance of 2.5 [m]. FIG. 8D shows a frequency distribution at a subject distance of 4 [m]. As shown in FIG. 8, the dispersion of the frequency distribution increases as the subject distance increases.
また、図9には、コントラスト評価値のピーク度数と、被写体距離との関係が表されている。図8及び図9に表されているように、被写体距離が短いほど、コントラスト評価値のピーク度数は大きくなる。 FIG. 9 shows the relationship between the peak frequency of the contrast evaluation value and the subject distance. As shown in FIGS. 8 and 9, the peak frequency of the contrast evaluation value increases as the subject distance is shorter .
制御部193は、コントラスト評価値とAFレンズ112の位置とを対応付けて予め記憶する記憶部160を参照し、規定されたパルス電圧のステップ数を、記憶部160から取得する。制御部193は、コントラスト評価値毎に規定されたパルス電圧のステップ数に基づいて、AFレンズ112の移動量を制限する。これにより、制御部193は、ラベル領域に合焦する最適な位置を、AFレンズ112が大きく越えないようにすることができる。
The
また、制御部193(特徴量比較部)は、度数が一定以上在るコントラスト評価値を色成分毎に選択し、選択した色成分の全てについて、相対的に前の時刻に撮像されたフレーム画像(前回取得したフレーム画像)におけるラベル領域のコントラスト評価値と比較する。制御部193は、相対的に後の時刻に撮像されたフレーム画像(今回取得したフレーム画像)のラベル領域のコントラスト評価値が劣る場合、相対的に後の時刻に撮像されたフレーム画像(今回取得したフレーム画像)のラベル領域に再び合焦させる。
In addition, the control unit 193 (feature amount comparison unit) selects a contrast evaluation value having a frequency equal to or greater than a certain value for each color component, and a frame image captured at a relatively previous time for all the selected color components. It is compared with the contrast evaluation value of the label area in (the frame image acquired last time). When the contrast evaluation value of the label area of the frame image captured at a later time (frame image acquired this time) is inferior, the
次に、焦点調節装置の動作手順を説明する。
図10及び図11は、焦点調節装置の動作手順を表すフローチャートである。また、図12は、ラベル領域の輪郭線を説明するための図である。操作部180は、追尾モードに状態遷移する旨の指示を、操作入力により受け付けたとする。操作部180は、追尾モードを受け付けたことを表す信号を、制御部193に出力する。これにより、制御部193は、追尾モードに状態遷移する(図10:ステップSb1)。また、操作部180は、制御部193が追尾する対象とする被写体の指定を、操作入力(カメラUI)により受け付けたとする(図10:ステップSb2)。
Next, the operation procedure of the focus adjustment device will be described.
10 and 11 are flowcharts showing the operation procedure of the focus adjustment apparatus. FIG. 12 is a diagram for explaining the outline of the label area. It is assumed that the
制御部193は、指定された被写体が撮像された領域に対して山登りオートフォーカスを実行し、その領域に1回以上合焦させる。さらに、制御部193は、被写体の色成分(RGB値)に基づいて、フレーム画像からラベル領域を抽出する(図10:ステップSb3)。また、制御部193は、ラベル領域に外接するウィンドウ(測距枠)を画像に定める(図10:ステップSb4)。
The
制御部193は、相対的に前の時刻に撮像されたフレーム画像(初期のフレーム画像)のウィンドウ内のコントラスト評価値を、色成分毎に積分する(図10:ステップSb5)。制御部193は、フレーム画像310(初期のフレーム画像)のウィンドウ510内のコントラスト評価値を、色成分毎に積分する(図12を参照)。また、制御部193は、色成分毎に積分したコントラスト評価値を、記憶部160に記憶させる(図10:ステップSb6)。
The
制御部193は、ラベル領域の輪郭線を色成分毎に抽出する。制御部193は、ラベル領域の輪郭線410aを、色成分毎に抽出する(図12を参照)。また、制御部193は、輪郭線410aの色成分量(エッジパワー)を、記憶部160に記憶させる(図10:ステップSb7)。
The
制御部193は、コントラスト評価値の度数分布(ヒストグラム)を検出する(図10:ステップSb8)。また、制御部193は、コントラスト評価値のピーク度数を、色成分毎に検出する。また、制御部193は、度数分布の分散を算出する(図10:ステップSb9)。
The
そして、制御部193は、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)を取得する(図10:ステップSb10)。また、制御部193は、前回取得したフレーム画像に用いた画像特徴量の条件と同じ条件に基づいて、今回取得したフレーム画像についてラベリングする(図10:ステップSb11)。また、制御部193は、前回取得したフレーム画像に用いた画像特徴量の条件と同じ条件に基づいて、今回取得したフレーム画像から輪郭線を抽出する(図10:ステップSb12)。
Then, the
制御部193は、度数分布の平均値及び分散を、度数が一定以上在る色成分毎に検出する(図10:ステップSb13)。また、制御部193は、検出した全ての色成分でエッジパワーが低減したか否かを判定する(図10:ステップSb14)。検出した全ての色成分でエッジパワーが低減した場合(図10:ステップSb14−YES)、制御部193は、ウォブリングとして駆動制御信号を出力し、AFレンズ112を前ピン方向にパルス駆動させる(図11:ステップSb15)。
The
そして、制御部193は、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)を取得する(図11:ステップSb16)。また、制御部193は、前回取得したフレーム画像に用いた画像特徴量の条件と同じ条件に基づいて、今回取得したフレーム画像についてラベリングする(図11:ステップSb17)。また、制御部193は、前回取得したフレーム画像に用いた画像特徴量の条件と同じ条件に基づいて、今回取得したフレーム画像から輪郭線を抽出する(図11:ステップSb18)。
Then, the
制御部193は、度数分布の平均値及び分散を、度数が一定以上在る色成分毎に検出する(図11:ステップSb19)。また、制御部193は、検出した全ての色成分でエッジパワーが増加したか否かを判定する(図11:ステップSb20)。エッジパワーが増加した場合(図11:ステップSb20−YES)、制御部193は、前ピンであることを表す前ピンフラグを立てる(図11:ステップSb21)。一方、エッジパワーが増加していない場合(図11:ステップSb20−NO)、制御部193は、後ピンであることを表す後ピンフラグを立てる(図11:ステップSb22)。
The
また、制御部193は、ラベル領域に外接するウィンドウ(測距枠)を画像に定める(図11:ステップSb23)。制御部193は、コントラスト評価値とAFレンズ112の位置とを対応付けて予め記憶する記憶部160を参照し、規定されたパルス電圧のステップ数を、記憶部160から取得する。制御部193は、規定されたパルス電圧のステップ数に基づいて、AFレンズ112の移動量を制限する。
Further, the
ステップSb21において前ピンフラグを立てた場合、制御部193は、コントラスト・オートフォーカスを実行するための準備として、AFレンズ112を後ピン方向に規定パルス電圧のステップ数だけ駆動させる。一方、ステップSb22において後ピンフラグを立てた場合、制御部193は、コントラスト・オートフォーカスを実行するための準備として、AFレンズ112を前ピン方向に規定パルス電圧のステップ数だけ駆動させる(図11:ステップSb24)。
When the front pin flag is set in step Sb21, the
そして、制御部193は、相対的に後の時刻に撮像されたフレーム画像(後続のフレーム画像)を取得する(図11:ステップSb25)。また、制御部193は、前回取得したフレーム画像に用いた画像特徴量の条件と同じ条件に基づいて、今回取得したフレーム画像から輪郭線を抽出する(図11:ステップSb26)。
And the
制御部193は、度数分布の平均値及び分散を、度数が一定以上在る色成分毎に検出する(図11:ステップSb27)。また、制御部193は、コントラスト・オートフォーカスにおけるコントラスト・スキャンを実行し、今回取得したフレーム画像のウィンドウ内のコントラスト評価値を、色成分毎に積分する(図11:ステップSb28)。制御部193は、コントラスト評価値が、合焦状態におけるコントラスト評価値以上か否かを判定する(図11:ステップSb29)。
The
コントラスト評価値が、合焦状態におけるコントラスト評価値未満である場合(図11:ステップSb29−NO)、制御部193は、コントラスト・スキャンを実行した際に、コントラスト評価値のピークを検出したか否かを判定する(図11:ステップSb30)。
When the contrast evaluation value is less than the contrast evaluation value in the in-focus state (FIG. 11: Step Sb29-NO), whether or not the
コントラスト評価値のピークを検出していない場合(図11:ステップSb30−NO)制御部193は、コントラスト・スキャンにおいてAFレンズ112が駆動する範囲であるスキャン域が終了したか否かを判定する(図11:ステップSb31)。スキャン域が終了した場合(図11:ステップSb31−YES)、制御部193は、コントラスト・スキャンにおいてAFレンズ112の位置に応じたコントラスト評価値に基づいて、内挿法により定まる内挿点に応じて合焦位置を検出し(図11:ステップSb32)、検出した合焦位置にAFレンズ112を移動させる(図11:ステップSb33)。制御部193は、コントラスト・オートフォーカスを終了し(図11:ステップSb34)、図10のステップSb10に処理を戻す。
When the peak of the contrast evaluation value is not detected (FIG. 11: Step Sb30-NO), the
一方、ステップSb14において、検出した全ての色成分でエッジパワーが低減した場合(図10:ステップSb14−NO)、制御部193は、図10のステップSb10に処理を戻す。
また、ステップSb29において、コントラスト評価値が、合焦状態におけるコントラスト評価値以上である場合(図11:ステップSb29−YES)、制御部193は、図11のステップSb34に処理を進める。
また、ステップSb30において、コントラスト評価値のピークを検出した場合(図11:ステップSb30−YES)制御部193は、図11のステップSb32に処理を進める。
また、ステップSb31において、スキャン域が終了していない場合(図11:ステップSb31−NO)、制御部193は、図11のステップSb24に処理を戻す。
On the other hand, when the edge power is reduced in all the detected color components in step Sb14 (FIG. 10: step Sb14-NO), the
In step Sb29, when the contrast evaluation value is greater than or equal to the contrast evaluation value in the in-focus state (FIG. 11: step Sb29-YES), the
Further, when the peak of the contrast evaluation value is detected in step Sb30 (FIG. 11: step Sb30-YES), the
In step Sb31, when the scan area has not ended (FIG. 11: step Sb31-NO), the
以上のように、制御部193は、ラベル領域(主要被写体領域)の輪郭線の全体のコントラスト評価値が変化した場合、ラベル領域に再び合焦させる。
この構成により、焦点調節装置は、ラベル領域の輪郭線の全体のコントラスト評価値に基づいて、被写体と背景との境界(被写体の輪郭線)を明確にするので、これにより、動画及びスルー画でも安定して、ラベル領域に精度良く合焦させることができる。
As described above, when the overall contrast evaluation value of the outline of the label area (main subject area) changes, the
With this configuration, the focus adjustment device clarifies the boundary between the subject and the background (the contour of the subject) based on the overall contrast evaluation value of the contour of the label area. It is possible to stably focus on the label area with high accuracy.
また、制御部193は、コントラスト評価値とAFレンズ112の位置とを対応付けて予め記憶する記憶部160を参照し、コントラスト評価値に基づいて、AFレンズ112の移動量を制限する。
この構成により、焦点調節装置は、前ピン又は後ピンのデフォーカス量に基づいて、AFレンズの移動量を制限するため、ラベル領域に合焦させるために最適な位置をAFレンズが越えないので、ラベル領域に精度良く短時間で合焦させることができる。
Further, the
With this configuration, the focus adjustment device limits the movement amount of the AF lens based on the defocus amount of the front pin or the rear pin, so that the AF lens does not exceed the optimum position for focusing on the label area. The label area can be focused with high accuracy in a short time.
また、制御部193(特徴量比較部)は、前記コントラスト評価値を色成分毎に選択し、選択した色成分の全てについて、相対的に前の時刻に撮像された画像(前回取得したフレーム画像)の前記主要被写体領域のコントラスト評価値と比較し、制御部193は、相対的に後の時刻に撮像された画像(今回取得したフレーム画像)の前記主要被写体領域のコントラスト評価値が劣る場合、相対的に後の時刻に撮像された画像の前記主要被写体領域に再び合焦させる。
この構成により、焦点調節装置は、度数が一定以上在る色成分毎のコントラスト評価値に基づいて、焦点調節を実行するか否かを判定するので、これにより、ラベル領域に精度良く合焦させることができる。
In addition, the control unit 193 (feature amount comparison unit) selects the contrast evaluation value for each color component, and images of all the selected color components are captured at a relatively previous time (a frame image acquired last time). ), When the contrast evaluation value of the main subject region of the image captured at a later time (the frame image acquired this time) is inferior, The main subject area of the image captured at a later time is refocused.
With this configuration, the focus adjustment device determines whether or not to perform focus adjustment based on the contrast evaluation value for each color component having a frequency equal to or greater than a certain value. Thus, the label area is accurately focused. be able to.
また、制御部193(算出部)は、隣接する画素同士の画像の特徴量の差を検出し、検出した差の絶対値に基づいて、前記主要被写体領域の輪郭線を抽出する。 In addition, the control unit 193 (calculation unit) detects a difference in image feature amount between adjacent pixels, and extracts a contour line of the main subject region based on an absolute value of the detected difference.
[第4実施形態]
本発明の第4実施形態について図面を参照して詳細に説明する。第4実施形態では、ラベル領域の輪郭線の部分のコントラスト評価値に基づいて合焦させる点が、第1〜第3実施形態と異なる。以下では、第1〜第3実施形態との相違点についてのみ説明する。
[Fourth Embodiment]
A fourth embodiment of the present invention will be described in detail with reference to the drawings. The fourth embodiment is different from the first to third embodiments in that focusing is performed based on the contrast evaluation value of the outline portion of the label area. Only the differences from the first to third embodiments will be described below.
また、以下では、説明を簡単にするため、複数のフレーム画像間で輪郭線の位置の変化、及び光量の変化はないものとして説明するが、これらに変化があるとした場合でも、本発明の要旨は変わらない。同様に、以下では、輪郭線の特性(例えば、色成分の構成)が輪郭線の全周に亘り同じ特性であるものとして説明するが、これらが同じ特性でないとした場合でも、本発明の要旨は変わらない。 Further, in the following, for the sake of simplicity, the description will be made assuming that there is no change in the position of the contour line and no change in the amount of light among the plurality of frame images. The gist is unchanged. Similarly, in the following description, it is assumed that the characteristics of the contour line (for example, the composition of the color components) are the same characteristics over the entire circumference of the contour line, but even if these are not the same characteristics, the gist of the present invention Will not change.
制御部193は、ラベル領域の輪郭線の一部分のコントラスト評価値が変化(劣化)した場合、ラベル領域に再び合焦させる。図13には、ラベル領域の輪郭線の一部分を含むウィンドウが表されている。図13では、ウィンドウ530aとウィンドウ530bとが、ラベル領域420の輪郭線の一部分を含んでいることが表されている。
When the contrast evaluation value of a part of the outline of the label area changes (deteriorates), the
ここで、Sa0を「ウィンドウ530aにおけるコントラスト評価値の初期値」とし、Saを「ウィンドウ530aにおけるコントラスト評価値」とし、ΔSaを(Sa−Sa0)又は(Sa/Sa0)とし、K2を「予め定められた閾値」とする。同様に、Sb0を「ウィンドウ530bにおけるコントラスト評価値の初期値」とし、Sbを「ウィンドウ530bにおけるコントラスト評価値」とし、ΔSbを(Sb−Sb0)又は(Sb/Sb0)とし、K2を「予め定められた閾値」とする。
Here, Sa0 is “initial value of contrast evaluation value in
制御部193は、ΔSa>K2、且つ、ΔSb>K2が成立している場合、ラベル領域に合焦していないと判定する。制御部193は、これらの式の少なくとも一方が成立しなくなるまで、AFレンズ112の位置を制御することで、ラベル領域に再び合焦させる。
When ΔSa> K2 and ΔSb> K2 are satisfied, the
また、K3を「予め定められた閾値」とする。制御部193は、(ΔSa+ΔSb)>K3が成立している場合も、ラベル領域に合焦していないと判定する。制御部193は、この式が成立しなくなるまで、AFレンズ112の位置を制御することで、ラベル領域に再び合焦させる。
Further, K3 is assumed to be a “predetermined threshold value”. The
制御部193は、ラベル領域の輪郭線における複数の部分のコントラスト評価値が変化(劣化)した場合、ラベル領域に再び合焦させる。図14には、ラベル領域の輪郭線の全体を含む複数のウィンドウが表されている。図14では、ウィンドウ540a〜540dが、ラベル領域420の輪郭線の全体を含んでいることが表されている。
When the contrast evaluation values of a plurality of portions in the outline of the label area change (deteriorate), the
制御部193は、被写体の奥行きが被写界深度(Depth of Field、DOF)以内であり、且つ、全てのウィンドウにおいてコントラスト評価値が変化(劣化)した場合、ラベル領域に再び合焦させる。この場合の判定は、図13を用いて説明した判定と同様である。
When the depth of the subject is within the depth of field (DOF) and the contrast evaluation value changes (deteriorates) in all windows, the
また、制御部193は、ラベル領域の輪郭線における複数の部分の全てにおいて、コントラスト評価値が第1閾値を下回った場合、ラベル領域に再び合焦させる。また、制御部193は、ラベル領域の輪郭線における複数の部分の一部において、コントラスト評価値が第2閾値を下回った場合、ラベル領域に再び合焦させる。
In addition, when the contrast evaluation value is lower than the first threshold value in all of the plurality of portions in the outline of the label area, the
図15には、ラベル領域の輪郭線の部分をそれぞれ含む複数のウィンドウが表されている。図15では、ウィンドウ550a〜550gが、ラベル領域420の輪郭線の部分をそれぞれ含んでいることが表されている。
FIG. 15 shows a plurality of windows each including a contour line portion of the label area. FIG. 15 shows that the
また、図16には、ウィンドウ毎のコントラスト評価値の変化が表されている。図16におけるa〜gは、ウィンドウ550a〜550gを表す。図16(A)には、合焦状態となった初期におけるウィンドウ毎のコントラスト評価値が表されている。ここで、ウィンドウ550a〜550gのコントラスト評価値の平均値を、初期値K4とする。
FIG. 16 shows the change in contrast evaluation value for each window. In FIG. 16, a to g represent
また、図16(B)には、合焦状態が変化(劣化)したウィンドウ毎のコントラスト評価値が表されている。図16(B)では、ウィンドウ550g以外のウィンドウのコントラスト評価値が、初期値K4未満の変化量で劣化したとする。ここで、ラベル領域420の輪郭線における複数の部分の全て(ウィンドウ550a〜550f)において、コントラスト評価値が第2閾値を下回っていない(変化量が初期値K4未満である)ので、制御部193は、コントラスト・オートフォーカスを実行しないと判定する。
FIG. 16B shows the contrast evaluation value for each window in which the in-focus state has changed (deteriorated). In FIG. 16B, it is assumed that the contrast evaluation values of the windows other than the window 550g have deteriorated with a change amount less than the initial value K4. Here, in all of the plurality of portions (
また、図16(C)には、合焦状態が変化(劣化)したウィンドウ毎のコントラスト評価値が表されている。例えば、被写体が斜めに傾いたことにより、図16(C)では、ウィンドウ550c〜550fのコントラスト評価値が、初期値K4以上の変化量で劣化したとする。ここで、ラベル領域420の輪郭線における複数の部分の一部(ウィンドウ550c〜550f)において、コントラスト評価値が第2閾値を下回った(初期値K4以上の変化量で劣化した)ので、制御部193は、コントラスト・オートフォーカスを実行すると判定し、ラベル領域420に再び合焦させる。
FIG. 16C shows the contrast evaluation value for each window in which the in-focus state has changed (deteriorated). For example, it is assumed that the contrast evaluation values of the
また、図16(D)には、合焦状態が変化(劣化)したウィンドウ毎のコントラスト評価値が表されている。例えば、被写体が撮像装置100(図1を参照)に対して前後に移動したことにより、図16(D)では、ウィンドウ550a〜550fのコントラスト評価値が、閾値K5以上の変化量で劣化したとする。ここで、ラベル領域420の輪郭線における複数の部分の全て(ウィンドウ550a〜550f)において、コントラスト評価値が第1閾値を下回った(変化量が閾値K5以上である)ので、制御部193は、コントラスト・オートフォーカスを実行すると判定し、ラベル領域420に再び合焦させる。
FIG. 16D shows the contrast evaluation value for each window in which the in-focus state has changed (deteriorated). For example, when the subject moves back and forth with respect to the imaging apparatus 100 (see FIG. 1), in FIG. 16D, the contrast evaluation values of the
以上のように、制御部193は、ラベル領域420の輪郭線の一部分のコントラスト評価値が変化した場合、ラベル領域420に再び合焦させる。
この構成により、焦点調節装置は、ラベル領域(被写体)における異なる部分から各コントラスト評価値を得るので、被写体が傾いたり、変形したり、回転した場合でも、被写体に精度良く合焦させることができる。
As described above, the
With this configuration, the focus adjustment device obtains each contrast evaluation value from a different part in the label area (subject), so that even when the subject is tilted, deformed, or rotated, the subject can be accurately focused. .
制御部193は、ラベル領域420の輪郭線における複数の部分のコントラスト評価値が変化した場合、ラベル領域420に再び合焦させる。
この構成により、焦点調節装置は、ラベル領域(被写体)における上下及び左右の異なる部分から各コントラスト評価値を得るので、被写体が傾いたり、変形したり、回転した場合でも、被写体に精度良く合焦させることができる。
When the contrast evaluation values of a plurality of portions in the contour line of the
With this configuration, the focus adjustment device obtains each contrast evaluation value from different parts of the label area (subject) in the vertical and horizontal directions, so that the subject can be accurately focused even when the subject is tilted, deformed, or rotated. Can be made.
制御部193は、複数の部分の全て(ウィンドウ550a〜550g)においてコントラスト評価値が第1閾値を下回った場合、ラベル領域420に再び合焦させる。
この構成により、焦点調節装置は、被写体が撮像装置100に対して前後に移動した場合でも、被写体に精度良く合焦させることができる。
When the contrast evaluation value falls below the first threshold value in all of the plurality of portions (
With this configuration, the focus adjustment device can focus the subject with high accuracy even when the subject moves back and forth with respect to the
制御部193は、ラベル領域420の輪郭線における複数の部分の一部においてコントラスト評価値が第2閾値を下回った場合、ラベル領域420に再び合焦させる。
この構成により、焦点調節装置は、被写体が斜めに傾いた場合でも、被写体に精度良く合焦させることができる。
The
With this configuration, the focus adjustment device can focus on the subject with high accuracy even when the subject is inclined obliquely.
以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.
例えば、制御部193は、他のエッジ検出オペレータ(例えば、ラプラシアン・フィルタ)を用いて、輪郭線を抽出してもよい。
For example, the
なお、以上に説明した焦点調節装置を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、実行処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものであってもよい。 The program for realizing the focus adjustment apparatus described above is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into the computer system and executed, thereby executing the execution process. You may go. Here, the “computer system” may include an OS and hardware such as peripheral devices.
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、フラッシュメモリ等の書き込み可能な不揮発性メモリ、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。 Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used. The “computer-readable recording medium” means a flexible disk, a magneto-optical disk, a ROM, a writable nonvolatile memory such as a flash memory, a portable medium such as a CD-ROM, a hard disk built in a computer system, etc. This is a storage device.
さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。
また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。
また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。
さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。
Further, the “computer-readable recording medium” refers to a volatile memory (for example, DRAM (Dynamic) in a computer system serving as a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. Random Access Memory)) that holds a program for a certain period of time is also included.
The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.
The program may be for realizing a part of the functions described above.
Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.
100…撮像装置、110…撮像部、111…レンズ鏡筒、112…AFレンズ、116…レンズ駆動部、117…AFエンコーダ、118…鏡筒制御部、119…撮像素子、120…A/D変換部、130…バッファメモリ部、140…画像処理部、150…表示部、160…記憶部、170…通信部、180…操作部、190…CPU、191…焦点調節装置、192…取得部、193…制御部、200…記憶媒体、300〜302,310…フレーム画像、400,410…ラベル領域、410a,420a…ラベル領域の輪郭線、520,530a〜530b,540a〜540d…ウィンドウ、550a〜550g…測距枠、600,601…画素、700…エッジ検出オペレータ
DESCRIPTION OF
Claims (10)
前記第1画像から抽出された特定領域のコントラストに基づく評価値と、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、が異なる場合、前記第2画像から抽出された特定領域に対して合焦させるように焦点調節に用いるレンズを制御する制御部と、を備え、
前記制御部は、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、記憶部に予め記憶されている、コントラスト評価値と前記レンズの位置との対応関係と、により前記レンズの移動量を制限する焦点調節装置。 An extraction unit that extracts a specific area from the first image of the photographed subject and the second image of the subject photographed after the first image;
If the evaluation value based on the contrast of the specific area extracted from the first image is different from the evaluation value based on the contrast of the specific area extracted from the second image, the specific area extracted from the second image A control unit for controlling a lens used for focus adjustment so as to be focused on,
The control unit is configured so that the evaluation value based on the contrast of the specific region extracted from the second image and the correspondence relationship between the contrast evaluation value and the lens position stored in advance in the storage unit are Focus adjustment device that limits the amount of movement .
前記第1画像から抽出された特定領域のコントラストに基づく評価値と、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、が異なる場合、前記第2画像から抽出された特定領域に対して合焦させるように焦点調節に用いるレンズを制御する制御部と、を備え、
前記制御部は、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、記憶部に予め記憶されている、コントラスト評価値と前記レンズの位置との対応関係と、により前記レンズの移動量を制限する撮像装置。 An extraction unit that extracts a specific area from the first image of the photographed subject and the second image of the subject photographed after the first image;
If the evaluation value based on the contrast of the specific area extracted from the first image is different from the evaluation value based on the contrast of the specific area extracted from the second image, the specific area extracted from the second image A control unit for controlling a lens used for focus adjustment so as to be focused on,
The control unit is configured so that the evaluation value based on the contrast of the specific region extracted from the second image and the correspondence relationship between the contrast evaluation value and the lens position stored in advance in the storage unit are An imaging device that limits the amount of movement .
撮影された被写体の第1画像と、前記第1画像よりも後に撮影された被写体の第2画像と、から特定領域を抽出する手順と、
前記第1画像から抽出された特定領域のコントラストに基づく評価値と、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、が異なる場合、前記第2画像から抽出された特定領域に対して合焦させるように焦点調節に用いるレンズを制御する手順と、
を実行させるための焦点調節プログラムであって、
前記レンズを制御する手順は、前記第2画像から抽出された特定領域のコントラストに基づく評価値と、記憶部に予め記憶されている、コントラスト評価値と前記レンズの位置との対応関係と、により前記レンズの移動量を制限する
焦点調節プログラム。 To the computer of the focusing device,
A procedure for extracting a specific area from a first image of a photographed subject and a second image of a subject photographed after the first image;
If the evaluation value based on the contrast of the specific area extracted from the first image is different from the evaluation value based on the contrast of the specific area extracted from the second image, the specific area extracted from the second image Controlling the lens used for focus adjustment to focus on
A focus adjustment program for executing
The procedure for controlling the lens is based on the evaluation value based on the contrast of the specific area extracted from the second image and the correspondence relationship between the contrast evaluation value and the position of the lens stored in advance in the storage unit. Limit the amount of lens movement
Focus adjustment program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012010367A JP6060486B2 (en) | 2012-01-20 | 2012-01-20 | Focus adjustment device, imaging device, and focus adjustment program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012010367A JP6060486B2 (en) | 2012-01-20 | 2012-01-20 | Focus adjustment device, imaging device, and focus adjustment program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2013148788A JP2013148788A (en) | 2013-08-01 |
| JP6060486B2 true JP6060486B2 (en) | 2017-01-18 |
Family
ID=49046334
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2012010367A Active JP6060486B2 (en) | 2012-01-20 | 2012-01-20 | Focus adjustment device, imaging device, and focus adjustment program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6060486B2 (en) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6379478B2 (en) * | 2013-11-28 | 2018-08-29 | 株式会社ニコン | Image processing apparatus, electronic camera, and image processing program |
| WO2016132566A1 (en) | 2015-02-19 | 2016-08-25 | オリンパス株式会社 | Automatic focusing device and automatic focus control device |
| WO2017169491A1 (en) | 2016-03-30 | 2017-10-05 | 富士フイルム株式会社 | Imaging device and focus control method |
| JP6723853B2 (en) * | 2016-07-19 | 2020-07-15 | キヤノン株式会社 | Imaging device and control method thereof |
| WO2021230507A1 (en) * | 2020-05-12 | 2021-11-18 | 삼성전자 주식회사 | Method and device for providing imaging guidance |
| CN113727013B (en) * | 2020-05-12 | 2025-06-20 | 三星电子株式会社 | Method or device for providing image shooting guide |
| JP7678368B2 (en) * | 2021-06-07 | 2025-05-16 | 日本電信電話株式会社 | Imaging distance estimation device, imaging distance estimation method, and program |
| CN114845041B (en) * | 2021-12-30 | 2024-03-15 | 齐之明光电智能科技(苏州)有限公司 | A focusing method, device and storage medium for nanoparticle imaging |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002214513A (en) * | 2001-01-16 | 2002-07-31 | Minolta Co Ltd | Optical system controller, optical system control method, and recording medium |
| JP2008052225A (en) * | 2006-08-28 | 2008-03-06 | Olympus Imaging Corp | Camera, focus control method, and program |
| JP2009069748A (en) * | 2007-09-18 | 2009-04-02 | Fujifilm Corp | Imaging apparatus and automatic focusing method thereof |
| JP2009198795A (en) * | 2008-02-21 | 2009-09-03 | Victor Co Of Japan Ltd | Imaging device |
-
2012
- 2012-01-20 JP JP2012010367A patent/JP6060486B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2013148788A (en) | 2013-08-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6060486B2 (en) | Focus adjustment device, imaging device, and focus adjustment program | |
| JP4315215B2 (en) | Imaging apparatus, face detection method, and face detection control program | |
| JP5757099B2 (en) | Focus adjustment device and focus adjustment program | |
| JP4341696B2 (en) | Imaging device, face area detection program, and face area detection method | |
| KR101661216B1 (en) | Digital image processing apparatus, method for digital image signal processing, medium for recording the method | |
| US10530986B2 (en) | Image capturing apparatus, image capturing method, and storage medium | |
| CN103731601A (en) | Image processing apparatus and image processing method | |
| JP2004037733A (en) | Auto focus device | |
| KR20110061918A (en) | Autofocusing method for determining the moving direction of the focus lens, recording medium recording the method, autofocusing apparatus | |
| JP2017201818A (en) | Region extraction device | |
| JP6156532B2 (en) | Region extraction device, imaging device, and region extraction program | |
| JP5899693B2 (en) | Region extraction device, imaging device, and region extraction program | |
| JP5786460B2 (en) | Region extraction device, imaging device, and region extraction program | |
| JP5673454B2 (en) | Image processing apparatus, image processing method, and program | |
| JP5899700B2 (en) | Region extraction device, imaging device, and region extraction program | |
| JP6131519B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
| JP5888069B2 (en) | Area determination apparatus, imaging apparatus, and area determination program | |
| KR20100098122A (en) | Image processing method and apparatus, and digital photographing apparatus using thereof | |
| JP6464553B2 (en) | Lens drive control device, electronic camera, and lens drive control program | |
| JP6350562B2 (en) | Region extraction device, imaging device, and region extraction program | |
| JP2014021373A (en) | Imaging device, storage device, and imaging program | |
| US20250193520A1 (en) | Image processing apparatus and method, image capturing apparatus, and storage medium | |
| JP6003974B2 (en) | Image processing apparatus, image processing method, and program | |
| JP5375943B2 (en) | Imaging apparatus and program thereof | |
| US20160198084A1 (en) | Image pickup apparatus, operation support method, and medium recording operation support program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150120 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150925 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20151104 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151228 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160517 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160715 |
|
| 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: 20161115 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161128 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6060486 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |