JP5451364B2 - Subject tracking device and control method thereof - Google Patents
Subject tracking device and control method thereof Download PDFInfo
- Publication number
- JP5451364B2 JP5451364B2 JP2009291408A JP2009291408A JP5451364B2 JP 5451364 B2 JP5451364 B2 JP 5451364B2 JP 2009291408 A JP2009291408 A JP 2009291408A JP 2009291408 A JP2009291408 A JP 2009291408A JP 5451364 B2 JP5451364 B2 JP 5451364B2
- Authority
- JP
- Japan
- Prior art keywords
- degree
- image
- subject
- evaluation value
- unit
- 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
- Image Processing (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Description
本発明は、被写体追跡装置及びその制御方法に関する。 The present invention relates to a subject tracking device and a control method thereof.
時系列的に逐次供給される画像の1フレームにおいて特定の被写体を検出し、検出した被写体を後続するフレームで追跡する画像処理技術は非常に有用である。例えば動画像中の人体領域(例えば顔領域)を検出、追跡する技術は、電話会議、マン・マシン・インタフェース、セキュリティ、特定の被写体を追跡するためのモニタ・システム、画像圧縮などの多くの分野で使用することができる。この画像処理技術を搭載したデジタルカメラやデジタルビデオカメラでは、電子ビューファインダに表示された画像で指定された被写体が適切に撮影されるよう、露出制御や合焦制御を実行するものが知られている。 An image processing technique that detects a specific subject in one frame of an image that is sequentially supplied in time series and tracks the detected subject in subsequent frames is very useful. For example, techniques for detecting and tracking a human body region (eg, a face region) in a moving image include many fields such as a conference call, a man-machine interface, security, a monitor system for tracking a specific subject, and image compression. Can be used in Digital cameras and digital video cameras equipped with this image processing technology are known to perform exposure control and focus control so that the subject specified in the image displayed on the electronic viewfinder is properly captured. Yes.
例えば、特許文献1では、撮影画像から顔を検出し、顔に焦点を合わせ、かつ顔に最適な露出で撮影する撮影装置を開示している。また、特許文献2は、あるフレームで検出された顔を、後続するフレームで検出する追跡処理を行うことを開示している。 For example, Patent Document 1 discloses a photographing apparatus that detects a face from a photographed image, focuses on the face, and photographs the face with an optimal exposure. Japanese Patent Application Laid-Open No. H10-228688 discloses performing tracking processing for detecting a face detected in a certain frame in a subsequent frame.
特定の被写体を後続するフレームで追跡する方法としては、特許文献2に開示されるような、テンプレートマッチングの手法を利用する方法が知られている。テンプレートマッチングは、追跡すべき被写体の画像(テンプレート画像又は基準画像)を、動画像のあるフレーム(基準フレームとよぶ)から抽出し、後続するフレームにおいてテンプレート画像と相関度が最も高い領域を探索する技術である。探索された領域を、後続フレームにおけるテンプレート画像の位置と推定することで、テンプレート画像に対応する被写体の追跡が可能である。 As a method for tracking a specific subject in a subsequent frame, a method using a template matching method as disclosed in Patent Document 2 is known. In template matching, an image of a subject to be tracked (template image or reference image) is extracted from a frame with a moving image (referred to as a reference frame), and a region having the highest degree of correlation with the template image is searched in subsequent frames. Technology. The subject corresponding to the template image can be tracked by estimating the searched area as the position of the template image in the subsequent frame.
テンプレートマッチングを用いた被写体追跡方法では、被写体を追跡するためのフレーム画像と、基準画像(テンプレート画像)との相関度に基づいて被写体を追跡する。ここで、フレーム画像内に、基準画像と類似する、しかし追跡すべき被写体とは異なる領域が存在する場合、その領域を被写体と誤検出することがある。この問題は、特に、フレーム画像中で被写体の見えが基準画像と変化している場合に発生しやすい。そこで、時系列的に連続な2つのフレーム画像間においては、被写体の位置が大きく変化しないという仮定を導入し、相関度の高い複数の領域のうち、画像間の移動距離が大きい領域は被写体領域でないとみなすことが考えられる。これにより、被写体の動きが小さい場合には、類似領域を被写体領域と誤検出する可能性を低減することができるであろう。 In the subject tracking method using template matching, the subject is tracked based on the degree of correlation between the frame image for tracking the subject and the reference image (template image). Here, when a region similar to the reference image but different from the subject to be tracked exists in the frame image, the region may be erroneously detected as the subject. This problem is particularly likely to occur when the appearance of the subject in the frame image changes from the reference image. Therefore, the assumption that the position of the subject does not change greatly between two frame images that are continuous in time series is introduced, and among the regions having a high degree of correlation, the region where the moving distance between the images is large is the subject region. It can be considered that it is not. As a result, when the movement of the subject is small, the possibility of erroneously detecting the similar region as the subject region will be reduced.
しかし、被写体の動きが速い場合、時系列的に連続な2つのフレーム画像間における被写体領域の位置変化は大きいため、被写体の動きが速い場合には上述の仮定の導入によりむしろ誤検出の可能性が高くなるおそれがある。 However, when the movement of the subject is fast, the change in the position of the subject area between two frame images that are continuous in time series is large. Therefore, when the movement of the subject is fast, the possibility of erroneous detection is rather increased by introducing the above assumption. May increase.
本発明はこのような従来技術の課題に鑑みてなされたものである。本発明は、基準画像と入力画像との相関度に基づく被写体追跡を行う被写体追跡装置及びその制御方法において、被写体と類似した物体が存在する場合や被写体の動きが速い場合の被写体追跡の精度を向上させることを目的とする。 The present invention has been made in view of the problems of the prior art. The present invention relates to a subject tracking device that performs subject tracking based on the degree of correlation between a reference image and an input image, and a control method thereof, in which the accuracy of subject tracking is improved when an object similar to the subject exists or when the subject moves quickly. The purpose is to improve.
上述の目的は、画像中の特定の被写体を、時系列的に入力される複数の入力画像に亘って追跡する被写体追跡装置であって、登録手段に登録された基準画像と入力画像に設定される複数の参照領域の各々との相関度を求める相関度算出手段と、基準画像の特徴量を抽出する抽出手段と、入力画像が特徴量に一致する度合いを判定する一致度判定手段と、複数の参照領域の各々と、入力画像内の所定の基準位置との距離を算出する距離算出手段と、複数の参照領域の各々について、相関度と、距離と、一致度判定手段が判定した度合いとを用いて評価値を算出する評価値算出手段と、複数の参照領域のうち、評価値が最も大きな参照領域を特定の被写体の領域であると判定する判定手段とを有し、所定の基準位置は、判定手段が直近に判定した特定の被写体の領域の位置であり、評価値算出手段は、評価値を、相関度と距離との関数の値として算出するとともに、評価値に距離が寄与する度合いが、一致度判定手段が判定した度合いが高いほど大きく、一致度判定手段が判定した度合いが低いほど小さくなるように動的に変化させて評価値を算出することを特徴とする被写体追跡装置によって達成される。 The above-described object is a subject tracking device that tracks a specific subject in an image over a plurality of input images input in time series, and is set to a reference image and an input image registered in a registration unit. A degree-of-correlation calculating means for obtaining a degree of correlation with each of a plurality of reference regions, an extracting means for extracting a feature amount of a standard image, a degree-of-match determination means for determining a degree of matching of an input image with a feature amount, A distance calculating unit that calculates a distance between each of the reference regions and a predetermined reference position in the input image, a correlation degree, a distance, and a degree determined by the matching degree determining unit for each of the plurality of reference regions And an evaluation value calculating means for calculating an evaluation value using the reference value, and a determining means for determining that the reference area having the largest evaluation value among the plurality of reference areas is the area of the specific subject. Is determined by the determination means most recently The evaluation value calculation means calculates the evaluation value as a function value of the correlation degree and the distance, and the degree of coincidence determination means determines the degree of contribution of the distance to the evaluation value. The object tracking device is characterized in that the evaluation value is dynamically calculated so that the evaluation value is dynamically changed so as to increase as the degree of determination increases and decrease as the degree of determination by the coincidence determination unit decreases.
本発明によれば、基準画像と入力画像との相関度に基づく被写体追跡を行う被写体追跡装置及びその制御方法において、被写体と類似した物体が存在する場合や被写体の動きが速い場合の被写体追跡の精度を向上させることができる。 According to the present invention, in a subject tracking device that performs subject tracking based on the degree of correlation between a reference image and an input image and a control method thereof, subject tracking can be performed when an object similar to the subject exists or when the subject moves quickly. Accuracy can be improved.
以下、添付図面を参照して、本発明の例示的な実施形態を詳細に説明する。なお、以下に説明する実施形態の説明は、本発明の理解を助けることを目的としたものであり、本発明の範囲を限定するものではなく、本発明の範囲内で様々な変更が可能である。また、以下の実施形態では、本発明を撮像装置に適用した構成について説明するが、本発明において撮像機能は必須でなく、被写体追跡を行う対象となる画像の供給元はいかなるものであってもよい。従って、本発明は、記録された画像を読み出して再生、表示したり、外部から画像を受信して処理する画像処理装置に対して広く適用可能である。このような画像処理装置には、パーソナルコンピュータや携帯情報端末、携帯電話機、メディアプレーヤなど、様々な機器が含まれる。 Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. The description of the embodiment described below is intended to help understanding of the present invention, and does not limit the scope of the present invention, and various modifications are possible within the scope of the present invention. is there. In the following embodiments, a configuration in which the present invention is applied to an imaging apparatus will be described. However, in the present invention, an imaging function is not essential, and any source of images to be subject-tracked can be supplied. Good. Therefore, the present invention can be widely applied to an image processing apparatus that reads a recorded image, reproduces and displays it, and receives and processes an image from the outside. Such an image processing apparatus includes various devices such as a personal computer, a portable information terminal, a mobile phone, and a media player.
(第1の実施形態)
図1は、本発明の第1の実施形態に係る被写体追跡の一例としての撮像装置100の機能構成例を示すブロック図である。レンズユニット101は結像光学系であり、一般にはフォーカス調整用レンズを含む複数のレンズによって構成される。レンズユニット101は被写体の光学像を撮像素子102の撮像面上に結像する。撮像素子102はCCDイメージセンサやCMOSイメージセンサなどの光電変換素子であり、被写体光学像を画素単位の電気信号に変換する。この電気信号は、撮像素子102で撮像された被写体像を示すアナログの映像信号である。撮像素子102は、撮像と出力を連続的に繰り返すことにより、所定のフレームレートで時系列的に映像信号を出力することができる。以下の説明において、「画像」とは、1フレームの映像信号と同義である。
(First embodiment)
FIG. 1 is a block diagram illustrating a functional configuration example of an
撮像素子102から出力された画像は、アナログ信号処理部103で相関二重サンプリング(CDS)等のアナログ信号処理が適用された後、A/D変換部104でデジタルデータの形式に変換され、制御部105及び画像処理部106に入力される。
The image output from the
制御部105は、CPU(Central Processing Unit)やマイクロコントローラなどであり、撮像装置100全体の動作を制御する。具体的には、制御部105は、ROM(Read Only Memory)に記憶されたプログラムコードをRAM(Random Access Memory)の作業領域に展開して順次実行することで、撮像装置100の各部を制御する。なお、制御部105を構成するCPU等は単数であっても複数であってもよく、制御部105が実現する機能を複数のCPUで分散して処理してもよい。
The
画像処理部106は、入力されたデジタル形式の画像に対して、ガンマ補正、ホワイトバランス処理などの画像処理(いわゆる現像処理)を適用する。なお、画像処理部106は、これらの画像処理に加え、後述する被写体追跡部110から供給される、画像中の特定の被写体領域に関する情報を用いた画像処理も実行する。
The
画像処理部106から出力された画像は、例えばLCDや有機ELディスプレイである表示部107で表示される。撮像装置100は、撮像素子102で撮像した動画像をリアルタイムに表示部107に表示することで、表示部107を電子ビューファインダ(EVF)として機能させることができる。また、表示部107は、電子ビューファインダとして機能している際、後述する被写体追跡部110により追跡している被写体領域の位置を示す情報を撮像画像とともに表示することができる。
The image output from the
また、画像処理部106から出力された画像は、記録部108により、例えば着脱可能なメモリーカードに記録される。なお、画像の記録先は、撮像装置100の内蔵メモリであっても、通信インターフェイスにより通信可能に接続された外部装置(いずれも図示しない)であってもよい。なお、画像処理部106は、表示部107に出力する画像と、記録部108に出力する画像とを、それぞれ表示と記録に最適化して出力することができる。画像処理部106は、画像の、例えば解像度(画素数)や信号形式(RGB形式、YCrCb形式)や、データ形式を、用途に応じて最適化することができる。また、画像処理部106は、必要に応じて画像の符号化処理や復号化処理も実行する。
Further, the image output from the
被写体指定部109は、例えば表示部107に設けられたタッチパネルや、撮像装置100の筐体に設けられたキーやボタン等の入力インターフェイスである。ユーザは、例えば表示部107に表示されている入力画像中から所望の被写体の領域を指定することにより、追跡すべき被写体を指定することができる。タッチパネルやキー、ボタン等を用いて画像中から任意の領域を指定する方法に特に制限はなく、周知の方法を採用できる。また、例えば撮像装置100が被写体検出機能を有し、検出されている被写体の領域を示す枠などの指標を撮像画像に重畳表示する場合には、所望の被写体の枠を選択することによっても被写体の領域を指定することができる。
The
被写体追跡部110は、画像処理部106から出力される画像と、被写体指定部109で指定された入力画像中の被写体の画像に基づく基準画像、もしくは更新された基準画像とのテンプレートマッチングにより、画像中の被写体画像位置を検出する。被写体追跡部110は、この検出処理を、画像処理部106から時系列的に入力される、撮像時刻の異なる複数の画像に対して適用することにより、被写体追跡機能を実現する。
The
被写体追跡部110において、特徴量抽出部116および特徴一致度判定部117が、基準画像登録部111に登録された基準画像の信頼度を算出する。評価値算出部115は、距離算出部114により算出される距離が評価値に寄与する度合いを、算出された信頼度に応じて動的に変化させる。
In the
基準画像登録部111は、画像処理部106により供給される画像から時刻の異なる複数の画像の部分画像を基準画像として登録する。登録された基準画像は、相関度算出部113によって利用される。基準画像登録部111によって登録される基準画像は、被写体追跡の開始時は被写体指定部109によって指定される領域に基づき登録され、その後は被写体追跡中に被写体抽出部118が抽出した被写体領域によって順次更新される。
The reference image registration unit 111 registers partial images of a plurality of images having different times from the image supplied by the
参照領域設定部112では、画像処理部106により時系列的に逐次供給される入力画像の一部を、相関度算出部113および距離算出部114で用いる参照領域に設定する。参照領域の大きさは、基準画像登録部111により登録された基準画像の大きさに対応する。参照領域は、画像処理部106により供給される1つの入力画像に対し、位置を水平および垂直方向に画素単位でずらしながら順次設定される。入力画像において参照領域を設定する領域(探索領域)は、画像全体であっても、直前の入力画像において被写体領域と判定された領域の位置を中心とした所定の範囲のような部分領域であっても良い。
In the reference area setting unit 112, a part of the input image sequentially supplied in time series by the
相関度算出部113では、基準画像登録部111によって登録された基準画像と、参照領域設定部112によって設定された参照領域の画像との相関度を算出する。上述のように、参照領域設定部112は同一の入力画像(の探索領域)内で位置をずらしながら参照領域を順次設定するため、入力画像(の探索領域)中、基準画像と最も相関度の高い領域を推定することができる。相関度は、例えば、参照領域の画像と基準画像の対応する位置の画素値の差分和として求めることができ、差分和の値が小さいほど相関度が高いことを示す。なお、2つの画像の相関度を算出する方法には、さまざまな方法があり、任意の方法を本実施形態に適用可能である。
The correlation
距離算出部114では、参照領域設定部112によって設定された参照領域の位置と、入力画像内の所定の基準位置との距離を算出する。所定の基準位置は、被写体追跡を実施した直前の入力画像において、被写体抽出部118が抽出した被写体領域の位置とする。あるいは、所定の位置は、被写体追跡による過去の被写体領域の動き情報に基づいて予測した、現在の入力画像における被写体領域の位置であっても良い。ここで、「被写体領域の位置」は任意に設定可能であり、例えば被写体領域の重心位置であっても良いし、被写体領域の1頂点の位置であってもよい。
The
評価値算出部115では、相関度算出部113が算出した相関度と、距離算出部114が算出した距離に応じて、参照領域ごとに評価値を算出する。なお、評価値算出部115は、評価値を算出する際、距離算出部114が算出した距離が評価値に寄与する度合いを、後述する特徴一致度判定部117が判定する一致度に応じて変化させる。
The evaluation
特徴量抽出部116は、基準画像登録部111に登録されている基準画像から特徴量を抽出する。特徴量抽出部116は、例えば、基準画像の所定領域に含まれる画素の、予め定めた成分の値についてヒストグラムを生成し、頻度が所定の閾値以上となる値を特徴量として抽出する。ヒストグラムを生成する画素の成分としては、例えば相関度算出部113によって相関度を算出するための画素の成分と同様とする。画素の成分の具体例としては、色相(H)、彩度(S)、明度(V)のHSV表現で表されたHSV画像における色相(H)などが挙げられる。なお、特徴量の抽出方法は、さまざまな方法があり、本実施形態の処理例はあくまで一例である。
The feature
特徴一致度判定部117は、画像処理部106から供給される入力画像が、特徴量抽出部116により抽出された特徴量と一致する度合いを判定する。特徴量と一致する度合いとは、入力画像全体の画素数に対する、特徴量抽出部116により抽出された特徴量に一致すると判定される画素数の割合とする。なお、特徴一致度判定の方法は、さまざまな方法があり、本実施形態の処理例はあくまで一例である。
The feature matching
被写体抽出部118では、評価値算出部115によって算出される評価値が最大となる参照領域を被写体領域と判定し、被写体領域の画像を抽出する。逐次供給される入力画像から被写体領域を判定することにより、目的とする被写体を追跡することができる。抽出した被写体領域の画像は基準画像登録部111へ供給され、登録されている基準画像を置き換える。また、判定した被写体領域の情報は制御部105に与えられる。
The
制御部105は、撮像装置100における自動焦点検出(AF)制御や、自動露出(AE)制御を行う。具体的には、制御部105は、A/D変換部104から出力された画像に基づいて、レンズユニット101の焦点制御機構や露出制御機構(いずれも図示しない)を制御する。例えば、焦点制御機構はレンズユニット101を光軸方向へ駆動させるアクチュエータなどであり、露出制御機構は絞りやシャッタ(メカニカルシャッタがある場合)を駆動させるアクチュエータなどである。
The
制御部105は、このAF制御やAE制御よる撮像条件の決定において、被写体追跡部110から供給される被写体領域の抽出結果を用いることができる。具体的には、制御部105は、被写体領域として抽出された領域に合焦するように焦点検出条件を制御してAF制御を行ったり、当該領域の露出が適正になるように露出条件を制御してAE制御することができる。また、制御部105は、撮像素子102の出力タイミングの制御や、読み出す画素の選択制御など、撮像素子102の読み出し制御も行う。
The
なお、撮像装置100が例えば顔検出部といった、特定の被写体を検出する機能を実現する構成を有する場合、検出された被写体領域(例えば顔領域)を自動的に基準画像として登録することができる。また、AF制御やAE制御に利用される、画像中の所定の領域(焦点検出領域や測光領域など)を、初期の被写体領域として基準画像に登録してもよい。これらの場合、撮像装置100は被写体指定部109を有さなくてもよい。
Note that when the
ここで、評価値算出部115における評価値の算出方法について説明する。本実施形態において、評価値算出部115は、相関度算出部113が求める相関度と距離算出部114が求める距離の関数値として参照領域ごとの評価値を算出する。
Here, a method of calculating the evaluation value in the evaluation
上述の通り、相関度のみに基づいて評価値を求めた場合、真の被写体領域の他に被写体領域(基準画像)と特徴が類似した領域(類似領域)が存在する場合、類似領域を被写体領域と誤検出する可能性がある。特に、基準画像として用いられている被写体領域を抽出した時点と、追跡を行う入力画像を撮影した時点とで被写体の見えが変わっている場合には、真の被写体領域よりも類似領域の方が基準画像との相関度が高くなる場合もある。つまり、類似領域が存在する可能性が高い場合には、相関度算出部113が求める相関度の信頼性が低下する。
As described above, when the evaluation value is obtained based only on the degree of correlation, if there is a region (similar region) similar in characteristics to the subject region (reference image) in addition to the true subject region, the similar region is determined as the subject region. May be erroneously detected. In particular, if the appearance of the subject changes between when the subject region used as the reference image is extracted and when the input image to be tracked is captured, the similar region is more likely than the true subject region. In some cases, the degree of correlation with the reference image increases. That is, when there is a high possibility that a similar region exists, the reliability of the correlation degree obtained by the correlation
そのため、本実施形態では、特徴一致度判定部117において、類似領域の存在可能性の指標となる一致度を算出し、類似領域が存在する可能性が高いと判定される場合には、評価値に距離が寄与する程度を高める。これにより、直近の被写体領域からの距離が小さい参照領域から被写体領域が決定されやすくなり、被写体の動きが大きくない一般的な状況において、相関度の高い類似領域を誤検出する可能性を低減することができる。一方、類似領域が存在する可能性が小さいと判定される場合には、相関度算出部113の算出する相関度の信頼性は高い。そのため、評価値に距離が寄与する程度を低くする。これにより、直近の被写体領域からの距離が大きくても、相関度の高い参照領域が被写体領域として判定されやすくなり、被写体の動きが大きい場合でも、被写体領域を精度良く検出することができる。
For this reason, in the present embodiment, the feature
このように、本実施形態では、相関度と、直近の被写体領域からの距離の両方を考慮して参照領域の評価値を求めるとともに、類似領域の存在の可能性に応じて、直近の被写体領域からの距離を考慮する度合いを動的に変化させる。そのため、類似領域が存在する場合における誤検出を抑制しながら、大きく動く被写体に対しても追跡を可能とすることができる。 As described above, in the present embodiment, the evaluation value of the reference region is calculated in consideration of both the degree of correlation and the distance from the nearest subject region, and the nearest subject region is determined according to the possibility of the presence of a similar region. The degree of considering the distance from is dynamically changed. Therefore, it is possible to track a subject that moves greatly while suppressing erroneous detection when a similar region exists.
本実施形態において評価値算出部115は、相関度算出部113が求める相関度と距離算出部114が求める距離の関数値として、例えば以下の式(1)によって参照領域ごとの評価値を算出する。
評価値=1/{(1/相関度)+直近の被写体領域からの距離×α} (1)
In the present embodiment, the evaluation
Evaluation value = 1 / {(1 / correlation degree) + distance from the latest subject area × α} (1)
ここで、αは係数であり、一致度が高い(すなわち、類似領域が存在する可能性が高い)場合には大きい値が、一致度が低い(すなわち、類似領域が存在する可能性が低い)場合には小さい値が評価値算出部115によって設定される。一致度と係数値との具体的な関係は予め実験的に求めておくことが可能であり、評価値算出部115は一致度と係数値とを対応付けたテーブルを有していても良いし、一致度を代入すれば係数値が得られる関係式を有していてもよい。被写体抽出部118は、評価値が最も高くなる参照領域を被写体領域として判定する。
Here, α is a coefficient, and when the degree of coincidence is high (that is, the possibility that a similar area exists is high), a large value is low, and the degree of coincidence is low (that is, the possibility that a similar area exists) is low. In this case, a small value is set by the evaluation
基準画像(直近の被写体領域の画像)及び参照領域が大きさが横M画素×縦N画素の矩形領域であり、直近の被写体領域Iの位置が(x0, y0)、参照領域の位置が(x1, y1)とする。なお、上述の通り、領域の位置は重心位置や頂点の位置など、予め定めておくことができる。また、基準画像と参照領域の画像の相関度を、対応する位置の画素値の差分和の絶対値の大きさとして求めるとすると、評価値SADを求める式(1)は以下の式(2)のようになる。
式(2)の右辺の第1項が相関度(値が小さい方が相関度が高い)を、第2項が距離(値が小さい方が距離が短い)をそれぞれ表している。ここではSADが大きい方が評価が高いものとするため、右辺の逆数を求めているが、右辺の括弧内の数式で得られる値が小さいほど評価値が高いとしてもよい。 The first term on the right side of Equation (2) represents the degree of correlation (the smaller the value, the higher the degree of correlation), and the second term represents the distance (the smaller the value, the shorter the distance). Here, since the evaluation is higher when the SAD is larger, the reciprocal of the right side is obtained, but the evaluation value may be higher as the value obtained by the mathematical expression in the parentheses on the right side is smaller.
本実施形態では、特徴量抽出部116及び特徴一致度判定部117により、類似領域の存在の可能性(あるいは、基準画像の信頼性)を示す値として一致度を求め、一致度に応じて評価値に距離が寄与する度合いを変化させる構成を説明した。しかしながら、これは単なる一例であり、同様の値を求めることができれば、他の任意の構成を用いてもよい。例えば、参照領域ごとに相関度算出部113で算出される相関度の平均値と最大値を算出し、相関度の最大値を相関度の平均値により除した値、あるいは差分の絶対値を一致度と同様に用いてもよい。なお、ここでは、相関度が高いほど相関度の値が大きいものとする。入力画像内に、基準画像と類似した領域が多い場合は、相関度の最大値と相関度の平均値の差が小さくなるため、最大値/平均値や|最大値−平均値|の値は小さくなる。一方、類似領域が少ない場合には、相関度の最大値と相関度の平均値の差が大きくなるため、最大値/平均値や|最大値−平均値|の値は大きくなる。
In the present embodiment, the feature
相関度の最大値及び平均値を用いる場合、類似領域の存在の可能性または基準画像の信頼性を示す値は評価値算出部115が算出することができ、特徴量抽出部116及び特徴一致度判定部117は不要である。
When using the maximum value and the average value of the correlation degree, the evaluation
(被写体追跡部110の動作)
次に、被写体追跡部110の処理の詳細について、図2及び図3を参照して説明する。なお、以下の説明では、検出及び追跡すべき特定の被写体が人物の顔であるものとする。
(Operation of subject tracking unit 110)
Next, details of the processing of the
基準画像登録部111は、S201において、撮像素子102で逐次撮像された撮像画像を入力画像として読み込む。なお、S201における入力画像の読み込みは、撮像された全てのフレームについて行ってもよいし、間欠的に行ってもよい。
In step S <b> 201, the reference image registration unit 111 reads captured images sequentially captured by the
次いで、基準画像登録部111はS202において、被写体指定部109から指定された部分領域に基づき、入力画像から初期基準画像(最初に用いられる基準画像)を登録する。図3(a)に、被写体指定部109からの指定に基づいて登録された基準画像301の例を示す。また、被写体追跡開始時は、基準画像301が、被写体抽出部118の被写体抽出結果となる。
Next, in step S <b> 202, the reference image registration unit 111 registers an initial reference image (reference image used first) from the input image based on the partial area specified by the
S203で次の入力画像を読み込むと、基準画像登録部111は、基準画像を特徴量抽出部116へ与える。次いで、S204において、特徴量抽出部116では基準画像から特徴量を抽出する。特徴量抽出部116は例えば基準画像に含まれる画素の、予め定めた成分の値についてヒストグラムを生成し、頻度が所定の閾値以上となる値を特徴量として抽出する。ヒストグラムを生成する画素の成分としては、例えば相関度算出部113によって相関度を算出するための画素の成分と同様とする。画素の成分の具体例としては、色相(H)、彩度(S)、明度(V)のHSV表現で表されたHSV画像における色相(H)などが挙げられる。なお、特徴量の抽出方法は、さまざまな方法があり、本実施形態の処理例はあくまで一例である。図3(a)に、基準画像301の各画素から生成した色相ヒストグラム302の例を示す。特徴量抽出部116は、色相ヒストグラム302において所定の閾値以上の頻度を示す色相値の範囲を特徴量として抽出する。
When the next input image is read in S <b> 203, the reference image registration unit 111 gives the reference image to the feature
S205において、特徴一致度判定部117は、入力画像に含まれる画素のうち、特徴量抽出部116で抽出した基準画像の特徴量と一致する(色相の値が特徴量の範囲に含まれる)画素を計数し、全画素に対する割合を算出する。例えば特徴一致度判定部117は、特徴量と一致する画素を白画素、一致しない画素を黒画素とする2値化画像を入力画像から生成し、全体の画素数に対する白画素数の割合を、入力画像が特徴量と一致する度合いとして算出する。図3(b)に、時刻t=nにおける入力画像303と、入力画像303を図3(a)の色相ヒストグラム302から得られた特徴量によって2値化した画像304の例を示す。さらに、時刻t=m(m>n)における入力画像305と、入力画像305を図3(a)の色相ヒストグラム302から得られた特徴量によって2値化した画像306の例を示す。
In S205, the feature matching
S206において、評価値算出部115は、特徴一致度判定部117によって算出された一致度合いに応じて、評価値に距離が寄与する度合い(係数αの値))を決定する。上述の通り、図3(b)に示す特徴2値化画像304のような特徴一致度合いが低い(特徴画素の割合が少ない)場合には、評価値に距離が寄与する度合いを小さくするため、係数αの値も小さくする。また、特徴2値化画像306のようなに一致度合いが大きい場合には、評価値に距離が寄与する度合いを大きくするため、係数αの値も大きくする。
In S206, the evaluation
S207において、参照領域設定部112は、入力画像に対し、基準画像の大きさに対応する参照領域を設定する。S208において、相関度算出部113では、参照領域の画像の各画素と基準画像の各画素から、参照領域の画像と基準画像との相関度を算出する。S209において、距離算出部114は、相関度を求めた参照領域の位置と、基準位置との距離を算出する。基準位置は、直近に判定された被写体領域の位置(すなわち、基準画像を抽出した画像における基準画像の位置)とする。
In S207, the reference area setting unit 112 sets a reference area corresponding to the size of the standard image for the input image. In S208, the correlation
S210で評価値算出部115は、相関度算出部113が算出した相関度と、距離算出部114が算出した距離と、S206で決定した係数αとを用い、式(2)に基づいて評価値を算出する。相関度は式(2)の右辺第1項に、距離は第2項に代入すればよい。S211で評価値算出部115は、入力画像の全体もしくは予め定められた探索領域内において、設定すべき参照領域について全て評価値が算出されたか判定する。
In S210, the evaluation
設定すべき参照領域がまだ残っている場合は(S211:NO)、S207において、参照領域設定部112は、位置を所定方向に所定画素数ずらした参照領域を新たに設定し、新たな参照領域に対して上述のS208〜210の処理が行われる。 When the reference area to be set still remains (S211: NO), in S207, the reference area setting unit 112 newly sets a reference area whose position is shifted by a predetermined number of pixels in a predetermined direction, and creates a new reference area. On the other hand, the processing of S208 to 210 described above is performed.
設定すべき参照領域の全てに対して評価値の算出がなされた場合は(S211:YES)、評価値算出部115は、評価値が最大となる参照領域の情報を被写体抽出部118に出力する。S212において、被写体抽出部118は、入力画像のうち、評価値が最大となった参照領域に対応する画像を被写体領域として判定し、抽出する。被写体抽出部は、抽出した画像を基準画像登録部111へ出力する。また、判定した被写体領域に関する情報を制御部105、画像処理部106及び距離算出部114へ出力する。
When the evaluation value is calculated for all the reference areas to be set (S211: YES), the evaluation
S213において、基準画像登録部111は、被写体抽出部118によって抽出された被写体領域を基準として基準画像を更新する。更新された基準画像は、次時刻の入力画像の被写体追跡処理(S203〜S212)において利用される。このように、抽出された被写体領域に基づいて基準画像を順次更新していくことで、被写体の向きが変化するなど時系列的に被写体の見えが変化する場合においても、適切に被写体追跡を行うことができる。基準画像が更新されることにより、S204で得られる基準画像内の特徴量も更新される。一方、時系列的な被写体の見えの変化を考慮しない場合などは、基準画像を更新せず、初期に登録された基準画像を維持してもよい。この場合は、基準画像内の特徴量も維持される。
In step S <b> 213, the reference image registration unit 111 updates the reference image based on the subject area extracted by the
なお、本実施形態では説明及び理解を容易にするため、被写体追跡処理の各処理ステップが直列的に実行されるように説明したが、並行して処理可能な処理ステップは同時に実行してもよいことは言うまでもない。例えば、入力画像に対して特徴一致度を求め、係数αを決定する処理(S204〜S206)と、入力画像に対して参照領域を設定し、相関度及び距離を算出する処理(S207〜209)は並列処理してもよい。 In the present embodiment, for ease of explanation and understanding, the processing steps of the subject tracking processing are described as being executed in series. However, processing steps that can be processed in parallel may be executed simultaneously. Needless to say. For example, a feature matching degree is obtained for the input image and a coefficient α is determined (S204 to S206), and a reference area is set for the input image and a correlation degree and a distance are calculated (S207 to 209). May be processed in parallel.
以上説明したように、本実施形態によれば、追跡すべき被写体を表す基準画像と、入力画像との相関度とを用いて被写体を追跡する被写体追跡装置において、相関度に加え、直近に判定された被写体領域からの距離を加味した評価値を参照領域ごとに算出する。さらに、入力画像において、基準画像と同様の特徴を有する画素が含まれる割合が多い場合には、評価値に距離が寄与する割合を大きくし、距離が短い参照領域が被写体領域と判定されやすくする。また、入力画像において、基準画像と同様の特徴を有する画素が含まれる割合が少ない場合には、評価値に距離が寄与する割合を小さくし、相関度の高い参照領域が被写体領域と判定されやすくする。そのため、相関度の信頼性が低い場合には誤検出を抑制することができるとともに、相関度の信頼性が高い場合には被写体の動きが大きい場合にも精度良く被写体を検出することができ、安定した被写体追跡が可能となる。 As described above, according to the present embodiment, in the subject tracking device that tracks a subject using the reference image representing the subject to be tracked and the correlation between the input image, the latest determination is made in addition to the correlation. An evaluation value in consideration of the distance from the subject area is calculated for each reference area. Furthermore, when the input image includes a large proportion of pixels having the same characteristics as the base image, the proportion of the distance that contributes to the evaluation value is increased so that the reference region with a short distance is easily determined as the subject region. . In addition, when the ratio of pixels having the same characteristics as the base image is small in the input image, the ratio of the distance to the evaluation value is reduced, and the reference area having a high degree of correlation is easily determined as the subject area. To do. Therefore, it is possible to suppress false detection when the reliability of the correlation degree is low, and to detect the subject accurately even when the movement of the subject is large when the reliability of the correlation degree is high, Stable subject tracking is possible.
(他の実施形態)
なお、上述の実施形態では、被写体追跡装置の一例としての撮像装置を説明した。しかし、上述の通り、本発明は撮像装置以外にも多様な機器に適用可能である。例えば画像データの再生表示装置に適用した場合、画像データ中の被写体領域の情報(画像中の被写体の位置、大きさなど)を用いて画像データの再生条件や表示条件を設定するといった応用が可能である。具体的には、画像中の被写体の位置に枠などの被写体を示す情報の重畳表示や、被写体部分の輝度や色情報に応じて、被写体部分が適切に表示されるように輝度や色合いなどの表示条件を制御することができる。
(Other embodiments)
In the above-described embodiment, the imaging apparatus as an example of the subject tracking apparatus has been described. However, as described above, the present invention can be applied to various devices other than the imaging apparatus. For example, when it is applied to an image data reproduction display device, it can be applied to set image data reproduction conditions and display conditions using information on the subject area in the image data (position, size, etc. of the subject in the image). It is. Specifically, information indicating the subject such as a frame is superimposed on the subject position in the image, and brightness and color tone are adjusted so that the subject portion is appropriately displayed according to the luminance and color information of the subject portion. Display conditions can be controlled.
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。 The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
なお、図中の機能ブロックは、ハードウェア、ソフトウェア又はそれらの組み合わせによって実現可能であるが、機能ブロックとそれを実現する構成とは1対1に対応する必要はない。複数の機能ブロックを1つのソフトウェア又はハードウェアモジュールで実現してもよい。 In addition, although the functional block in a figure is realizable with a hardware, software, or those combination, a functional block and the structure which implement | achieves it do not need to respond | correspond 1: 1. A plurality of functional blocks may be realized by a single software or hardware module.
Claims (7)
登録手段に登録された基準画像と前記入力画像に設定される複数の参照領域の各々との相関度を求める相関度算出手段と、
前記基準画像の特徴量を抽出する抽出手段と、
前記入力画像が前記特徴量に一致する度合いを判定する一致度判定手段と、
前記複数の参照領域の各々と、前記入力画像内の所定の基準位置との距離を算出する距離算出手段と、
前記複数の参照領域の各々について、前記相関度と、前記距離と、前記一致度判定手段が判定した度合いとを用いて評価値を算出する評価値算出手段と、
前記複数の参照領域のうち、前記評価値が最も大きな参照領域を前記特定の被写体の領域であると判定する判定手段とを有し、
前記所定の基準位置は、前記判定手段が直近に判定した前記特定の被写体の領域の位置であり、
前記評価値算出手段は、前記評価値を、前記相関度と前記距離との関数の値として算出するとともに、前記評価値に前記距離が寄与する度合いが、前記一致度判定手段が判定した度合いが高いほど大きく、前記一致度判定手段が判定した度合いが低いほど小さくなるように動的に変化させて前記評価値を算出することを特徴とする被写体追跡装置。 A subject tracking device that tracks a specific subject in an image over a plurality of input images input in time series,
Correlation degree calculating means for obtaining a correlation degree between the reference image registered in the registration means and each of the plurality of reference regions set in the input image;
Extracting means for extracting a feature amount of the reference image;
A degree of coincidence determination means for determining the degree to which the input image matches the feature amount;
Distance calculating means for calculating a distance between each of the plurality of reference regions and a predetermined reference position in the input image;
For each of the plurality of reference regions, an evaluation value calculation unit that calculates an evaluation value using the degree of correlation, the distance, and the degree determined by the matching degree determination unit;
Determination means for determining that the reference area having the largest evaluation value is the area of the specific subject among the plurality of reference areas;
The predetermined reference position is the position of the area of the specific subject that has been most recently determined by the determination unit,
The evaluation value calculation means calculates the evaluation value as a function value of the correlation degree and the distance, and the degree to which the distance contributes to the evaluation value is determined by the degree of coincidence determination means. An object tracking apparatus, wherein the evaluation value is calculated by dynamically changing the value so that the evaluation value is larger as it is higher and smaller as the degree of determination by the matching degree determination unit is lower.
最初に用いられる前記基準画像が、前記指定手段を通じてユーザによって指定された領域の画像であることを特徴とする請求項1乃至請求項4のいずれか1項に記載の被写体追跡装置。 A designating unit for designating a region in the input image;
The subject tracking device according to claim 1, wherein the reference image used first is an image of an area designated by a user through the designation unit.
相関度算出手段が、登録手段に登録された基準画像と前記入力画像に設定される複数の参照領域の各々との相関度を求める相関度算出工程と、
抽出手段が、前記基準画像の特徴量を抽出する抽出工程と、
一致度判定手段が、前記入力画像が前記特徴量に一致する度合いを判定する一致度判定工程と、
距離算出手段が、前記複数の参照領域の各々と、前記入力画像内の所定の基準位置との距離を算出する距離算出工程と、
評価値算出手段が、前記複数の参照領域の各々について、前記相関度と、前記距離と、前記一致度判定工程で判定された度合いとを用いて評価値を算出する評価値算出工程と、
判定手段が、前記複数の参照領域のうち、前記評価値が最も大きな参照領域を前記特定の被写体の領域であると判定する判定工程とを有し、
前記所定の基準位置は、前記判定工程が直近に判定した前記特定の被写体の領域の位置であり、
前記評価値算出工程は、前記評価値を、前記相関度と前記距離との関数の値として算出するとともに、前記評価値に前記距離が寄与する度合いが、前記一致度判定工程で判定された度合いが高いほど大きく、前記一致度判定工程で判定された度合いが低いほど小さくなるように動的に変化させて前記評価値を算出することを特徴とする被写体追跡装置の制御方法。 A method for controlling a subject tracking device for tracking a specific subject in an image over a plurality of input images input in time series,
Correlation degree calculating means for obtaining a correlation degree between a reference image registered in the registration means and each of a plurality of reference regions set in the input image;
An extracting step in which an extracting means extracts a feature amount of the reference image;
A degree of coincidence determination means for determining a degree of coincidence of the input image with the feature amount;
A distance calculating step of calculating a distance between each of the plurality of reference regions and a predetermined reference position in the input image;
An evaluation value calculating unit that calculates an evaluation value for each of the plurality of reference regions using the correlation, the distance, and the degree determined in the coincidence determination step;
A determination unit that determines a reference region having the largest evaluation value among the plurality of reference regions as a region of the specific subject;
The predetermined reference position is a position of the area of the specific subject that has been most recently determined by the determination step;
The evaluation value calculating step calculates the evaluation value as a value of a function of the correlation degree and the distance, and the degree to which the degree that the distance contributes to the evaluation value is determined in the coincidence degree determining step A method for controlling a subject tracking apparatus, wherein the evaluation value is calculated by dynamically changing so that the evaluation value is dynamically increased so as to increase as the value increases and decreases as the degree determined in the matching degree determination step decreases.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009291408A JP5451364B2 (en) | 2009-12-22 | 2009-12-22 | Subject tracking device and control method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009291408A JP5451364B2 (en) | 2009-12-22 | 2009-12-22 | Subject tracking device and control method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2011135227A JP2011135227A (en) | 2011-07-07 |
| JP5451364B2 true JP5451364B2 (en) | 2014-03-26 |
Family
ID=44347512
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009291408A Expired - Fee Related JP5451364B2 (en) | 2009-12-22 | 2009-12-22 | Subject tracking device and control method thereof |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5451364B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6099973B2 (en) * | 2012-12-27 | 2017-03-22 | キヤノン株式会社 | Subject area tracking device, control method thereof, and program |
| JP6020188B2 (en) * | 2013-01-18 | 2016-11-02 | 株式会社豊田中央研究所 | Object detection apparatus and program |
| CN110163221B (en) * | 2019-05-28 | 2022-12-09 | 腾讯科技(深圳)有限公司 | Method and device for detecting object in image, vehicle and robot |
-
2009
- 2009-12-22 JP JP2009291408A patent/JP5451364B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011135227A (en) | 2011-07-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8509482B2 (en) | Subject tracking apparatus, subject region extraction apparatus, and control methods therefor | |
| JP5159515B2 (en) | Image processing apparatus and control method thereof | |
| US20090002509A1 (en) | Digital camera and method of controlling same | |
| JP7223079B2 (en) | IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS | |
| US10270977B2 (en) | Imaging apparatus and a method of tracking a subject in the imaging apparatus | |
| US10013632B2 (en) | Object tracking apparatus, control method therefor and storage medium | |
| JP5166860B2 (en) | Image processing apparatus and method, and imaging apparatus | |
| US20210256713A1 (en) | Image processing apparatus and image processing method | |
| CN103118226A (en) | Light source estimation device, light source estimation method, light source estimation program, and imaging apparatus | |
| JP2009123081A (en) | Face detection method and photographing apparatus | |
| JP4807582B2 (en) | Image processing apparatus, imaging apparatus, and program thereof | |
| JP5395650B2 (en) | Subject area extraction device and control method thereof, subject tracking device, and program | |
| US10565712B2 (en) | Image processing apparatus and method for controlling the same | |
| JP5167236B2 (en) | Subject tracking device and control method thereof | |
| JP2013012940A (en) | Tracking apparatus and tracking method | |
| JP5451364B2 (en) | Subject tracking device and control method thereof | |
| JP6937603B2 (en) | Image processing equipment and its control methods, programs, and storage media | |
| JP2011134019A (en) | Image processor and control method of the same | |
| JP2010074315A (en) | Object tracking method and imaging device | |
| JP5222429B2 (en) | Subject tracking device and control method thereof | |
| JP5539565B2 (en) | Imaging apparatus and subject tracking method | |
| JP2016081095A (en) | Subject tracking device, control method thereof, imaging device, display device, and program | |
| JP5247419B2 (en) | Imaging apparatus and subject tracking method | |
| JP2020021250A (en) | Imaging device and control method thereof | |
| JP5323243B2 (en) | Image processing apparatus and control method thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20121221 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131129 |
|
| 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: 20131206 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131226 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 5451364 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |