Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5451364B2 - Subject tracking device and control method thereof - Google Patents
[go: Go Back, main page]

JP5451364B2 - Subject tracking device and control method thereof - Google Patents

Subject tracking device and control method thereof Download PDF

Info

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
Application number
JP2009291408A
Other languages
Japanese (ja)
Other versions
JP2011135227A (en
Inventor
良介 辻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2009291408A priority Critical patent/JP5451364B2/en
Publication of JP2011135227A publication Critical patent/JP2011135227A/en
Application granted granted Critical
Publication of JP5451364B2 publication Critical patent/JP5451364B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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.

特開2005−318554号公報JP 2005-318554 A 特開2001−60269号公報JP 2001-60269 A

テンプレートマッチングを用いた被写体追跡方法では、被写体を追跡するためのフレーム画像と、基準画像(テンプレート画像)との相関度に基づいて被写体を追跡する。ここで、フレーム画像内に、基準画像と類似する、しかし追跡すべき被写体とは異なる領域が存在する場合、その領域を被写体と誤検出することがある。この問題は、特に、フレーム画像中で被写体の見えが基準画像と変化している場合に発生しやすい。そこで、時系列的に連続な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.

本発明の実施形態に係る被写体追跡装置の一例としての撮像装置の機能構成例を示すブロック図。1 is a block diagram illustrating an example of a functional configuration of an imaging apparatus as an example of a subject tracking apparatus according to an embodiment of the present invention. 本発明の実施形態に係る被写体追跡の処理を示すフローチャート。6 is a flowchart showing subject tracking processing according to the embodiment of the present invention. 本発明の実施形態に係る被写体追跡の説明図。Explanatory drawing of the subject tracking which concerns on embodiment of this invention.

以下、添付図面を参照して、本発明の例示的な実施形態を詳細に説明する。なお、以下に説明する実施形態の説明は、本発明の理解を助けることを目的としたものであり、本発明の範囲を限定するものではなく、本発明の範囲内で様々な変更が可能である。また、以下の実施形態では、本発明を撮像装置に適用した構成について説明するが、本発明において撮像機能は必須でなく、被写体追跡を行う対象となる画像の供給元はいかなるものであってもよい。従って、本発明は、記録された画像を読み出して再生、表示したり、外部から画像を受信して処理する画像処理装置に対して広く適用可能である。このような画像処理装置には、パーソナルコンピュータや携帯情報端末、携帯電話機、メディアプレーヤなど、様々な機器が含まれる。   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 imaging apparatus 100 as an example of subject tracking according to the first embodiment of the present invention. The lens unit 101 is an imaging optical system, and generally includes a plurality of lenses including a focus adjustment lens. The lens unit 101 forms an optical image of the subject on the imaging surface of the image sensor 102. The imaging element 102 is a photoelectric conversion element such as a CCD image sensor or a CMOS image sensor, and converts the subject optical image into an electrical signal in units of pixels. This electrical signal is an analog video signal indicating a subject image captured by the image sensor 102. The image sensor 102 can output video signals in time series at a predetermined frame rate by continuously repeating imaging and output. In the following description, “image” is synonymous with a one-frame video signal.

撮像素子102から出力された画像は、アナログ信号処理部103で相関二重サンプリング(CDS)等のアナログ信号処理が適用された後、A/D変換部104でデジタルデータの形式に変換され、制御部105及び画像処理部106に入力される。   The image output from the image sensor 102 is subjected to analog signal processing such as correlated double sampling (CDS) in the analog signal processing unit 103, and then converted into a digital data format in the A / D conversion unit 104. The data is input to the unit 105 and the image processing unit 106.

制御部105は、CPU(Central Processing Unit)やマイクロコントローラなどであり、撮像装置100全体の動作を制御する。具体的には、制御部105は、ROM(Read Only Memory)に記憶されたプログラムコードをRAM(Random Access Memory)の作業領域に展開して順次実行することで、撮像装置100の各部を制御する。なお、制御部105を構成するCPU等は単数であっても複数であってもよく、制御部105が実現する機能を複数のCPUで分散して処理してもよい。   The control unit 105 is a CPU (Central Processing Unit), a microcontroller, or the like, and controls the operation of the entire imaging apparatus 100. Specifically, the control unit 105 controls each unit of the imaging apparatus 100 by developing program codes stored in a ROM (Read Only Memory) in a work area of a RAM (Random Access Memory) and sequentially executing the program codes. . Note that the control unit 105 may include a single CPU or a plurality of CPUs, and the functions realized by the control unit 105 may be distributed and processed by a plurality of CPUs.

画像処理部106は、入力されたデジタル形式の画像に対して、ガンマ補正、ホワイトバランス処理などの画像処理(いわゆる現像処理)を適用する。なお、画像処理部106は、これらの画像処理に加え、後述する被写体追跡部110から供給される、画像中の特定の被写体領域に関する情報を用いた画像処理も実行する。   The image processing unit 106 applies image processing such as gamma correction and white balance processing (so-called development processing) to the input digital format image. In addition to the image processing, the image processing unit 106 also executes image processing using information on a specific subject area in the image supplied from the subject tracking unit 110 described later.

画像処理部106から出力された画像は、例えばLCDや有機ELディスプレイである表示部107で表示される。撮像装置100は、撮像素子102で撮像した動画像をリアルタイムに表示部107に表示することで、表示部107を電子ビューファインダ(EVF)として機能させることができる。また、表示部107は、電子ビューファインダとして機能している際、後述する被写体追跡部110により追跡している被写体領域の位置を示す情報を撮像画像とともに表示することができる。   The image output from the image processing unit 106 is displayed on the display unit 107 which is an LCD or an organic EL display, for example. The imaging apparatus 100 can cause the display unit 107 to function as an electronic viewfinder (EVF) by displaying the moving image captured by the imaging element 102 on the display unit 107 in real time. Further, when the display unit 107 functions as an electronic viewfinder, the display unit 107 can display information indicating the position of the subject area tracked by the subject tracking unit 110 described later together with the captured image.

また、画像処理部106から出力された画像は、記録部108により、例えば着脱可能なメモリーカードに記録される。なお、画像の記録先は、撮像装置100の内蔵メモリであっても、通信インターフェイスにより通信可能に接続された外部装置(いずれも図示しない)であってもよい。なお、画像処理部106は、表示部107に出力する画像と、記録部108に出力する画像とを、それぞれ表示と記録に最適化して出力することができる。画像処理部106は、画像の、例えば解像度(画素数)や信号形式(RGB形式、YCrCb形式)や、データ形式を、用途に応じて最適化することができる。また、画像処理部106は、必要に応じて画像の符号化処理や復号化処理も実行する。   Further, the image output from the image processing unit 106 is recorded by the recording unit 108 on, for example, a removable memory card. Note that the image recording destination may be the built-in memory of the imaging apparatus 100 or an external apparatus (none of which is shown) that is communicably connected via a communication interface. Note that the image processing unit 106 can optimize and output the image output to the display unit 107 and the image output to the recording unit 108 for display and recording, respectively. The image processing unit 106 can optimize, for example, the resolution (number of pixels), the signal format (RGB format, YCrCb format), and the data format of the image according to the application. The image processing unit 106 also executes image encoding processing and decoding processing as necessary.

被写体指定部109は、例えば表示部107に設けられたタッチパネルや、撮像装置100の筐体に設けられたキーやボタン等の入力インターフェイスである。ユーザは、例えば表示部107に表示されている入力画像中から所望の被写体の領域を指定することにより、追跡すべき被写体を指定することができる。タッチパネルやキー、ボタン等を用いて画像中から任意の領域を指定する方法に特に制限はなく、周知の方法を採用できる。また、例えば撮像装置100が被写体検出機能を有し、検出されている被写体の領域を示す枠などの指標を撮像画像に重畳表示する場合には、所望の被写体の枠を選択することによっても被写体の領域を指定することができる。   The subject designating unit 109 is an input interface such as a touch panel provided on the display unit 107 and keys and buttons provided on the housing of the imaging apparatus 100. For example, the user can designate a subject to be tracked by designating a desired subject region from the input image displayed on the display unit 107. There is no particular limitation on a method for designating an arbitrary area from an image using a touch panel, keys, buttons, or the like, and a well-known method can be adopted. Further, for example, when the imaging apparatus 100 has a subject detection function and an index such as a frame indicating the detected subject area is superimposed on the captured image, the subject can also be selected by selecting a desired subject frame. Can be specified.

被写体追跡部110は、画像処理部106から出力される画像と、被写体指定部109で指定された入力画像中の被写体の画像に基づく基準画像、もしくは更新された基準画像とのテンプレートマッチングにより、画像中の被写体画像位置を検出する。被写体追跡部110は、この検出処理を、画像処理部106から時系列的に入力される、撮像時刻の異なる複数の画像に対して適用することにより、被写体追跡機能を実現する。   The subject tracking unit 110 performs image matching by template matching between the image output from the image processing unit 106 and a reference image based on the subject image in the input image specified by the subject specifying unit 109 or an updated reference image. The object image position inside is detected. The subject tracking unit 110 implements the subject tracking function by applying this detection process to a plurality of images input in time series from the image processing unit 106 and having different imaging times.

被写体追跡部110において、特徴量抽出部116および特徴一致度判定部117が、基準画像登録部111に登録された基準画像の信頼度を算出する。評価値算出部115は、距離算出部114により算出される距離が評価値に寄与する度合いを、算出された信頼度に応じて動的に変化させる。   In the subject tracking unit 110, the feature amount extraction unit 116 and the feature matching degree determination unit 117 calculate the reliability of the reference image registered in the reference image registration unit 111. The evaluation value calculation unit 115 dynamically changes the degree that the distance calculated by the distance calculation unit 114 contributes to the evaluation value according to the calculated reliability.

基準画像登録部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 image processing unit 106 as a reference image. The registered reference image is used by the correlation degree calculation unit 113. The reference image registered by the reference image registration unit 111 is registered based on the region specified by the subject specifying unit 109 at the start of subject tracking, and then sequentially by the subject region extracted by the subject extracting unit 118 during subject tracking. Updated.

参照領域設定部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 image processing unit 106 is set as a reference area used in the correlation calculation unit 113 and the distance calculation unit 114. The size of the reference area corresponds to the size of the standard image registered by the standard image registration unit 111. The reference area is sequentially set with respect to one input image supplied by the image processing unit 106 while shifting the position in units of pixels in the horizontal and vertical directions. The area (search area) in which the reference area is set in the input image is a partial area such as a predetermined range centered on the position of the area determined as the subject area in the immediately preceding input image, even in the entire image. May be.

相関度算出部113では、基準画像登録部111によって登録された基準画像と、参照領域設定部112によって設定された参照領域の画像との相関度を算出する。上述のように、参照領域設定部112は同一の入力画像(の探索領域)内で位置をずらしながら参照領域を順次設定するため、入力画像(の探索領域)中、基準画像と最も相関度の高い領域を推定することができる。相関度は、例えば、参照領域の画像と基準画像の対応する位置の画素値の差分和として求めることができ、差分和の値が小さいほど相関度が高いことを示す。なお、2つの画像の相関度を算出する方法には、さまざまな方法があり、任意の方法を本実施形態に適用可能である。   The correlation degree calculation unit 113 calculates the degree of correlation between the standard image registered by the standard image registration unit 111 and the image of the reference area set by the reference area setting unit 112. As described above, since the reference region setting unit 112 sequentially sets the reference region while shifting the position in the same input image (search region), the reference image has the highest correlation with the reference image in the input image (search region). A high region can be estimated. The degree of correlation can be obtained, for example, as the sum of differences between pixel values at corresponding positions in the reference region image and the base image, and the smaller the difference sum value, the higher the degree of correlation. There are various methods for calculating the degree of correlation between two images, and any method can be applied to this embodiment.

距離算出部114では、参照領域設定部112によって設定された参照領域の位置と、入力画像内の所定の基準位置との距離を算出する。所定の基準位置は、被写体追跡を実施した直前の入力画像において、被写体抽出部118が抽出した被写体領域の位置とする。あるいは、所定の位置は、被写体追跡による過去の被写体領域の動き情報に基づいて予測した、現在の入力画像における被写体領域の位置であっても良い。ここで、「被写体領域の位置」は任意に設定可能であり、例えば被写体領域の重心位置であっても良いし、被写体領域の1頂点の位置であってもよい。   The distance calculation unit 114 calculates the distance between the position of the reference area set by the reference area setting unit 112 and a predetermined reference position in the input image. The predetermined reference position is the position of the subject area extracted by the subject extraction unit 118 in the input image immediately before subject tracking. Alternatively, the predetermined position may be a position of the subject area in the current input image predicted based on past subject area motion information obtained by subject tracking. Here, the “position of the subject area” can be arbitrarily set, and may be, for example, the position of the center of gravity of the subject area or the position of one vertex of the subject area.

評価値算出部115では、相関度算出部113が算出した相関度と、距離算出部114が算出した距離に応じて、参照領域ごとに評価値を算出する。なお、評価値算出部115は、評価値を算出する際、距離算出部114が算出した距離が評価値に寄与する度合いを、後述する特徴一致度判定部117が判定する一致度に応じて変化させる。   The evaluation value calculation unit 115 calculates an evaluation value for each reference area according to the correlation degree calculated by the correlation degree calculation unit 113 and the distance calculated by the distance calculation unit 114. When calculating the evaluation value, the evaluation value calculation unit 115 changes the degree that the distance calculated by the distance calculation unit 114 contributes to the evaluation value according to the degree of matching determined by the feature matching level determination unit 117 described later. Let

特徴量抽出部116は、基準画像登録部111に登録されている基準画像から特徴量を抽出する。特徴量抽出部116は、例えば、基準画像の所定領域に含まれる画素の、予め定めた成分の値についてヒストグラムを生成し、頻度が所定の閾値以上となる値を特徴量として抽出する。ヒストグラムを生成する画素の成分としては、例えば相関度算出部113によって相関度を算出するための画素の成分と同様とする。画素の成分の具体例としては、色相(H)、彩度(S)、明度(V)のHSV表現で表されたHSV画像における色相(H)などが挙げられる。なお、特徴量の抽出方法は、さまざまな方法があり、本実施形態の処理例はあくまで一例である。   The feature amount extraction unit 116 extracts a feature amount from the reference image registered in the reference image registration unit 111. For example, the feature amount extraction unit 116 generates a histogram for predetermined component values of pixels included in a predetermined region of the reference image, and extracts a value having a frequency equal to or higher than a predetermined threshold as a feature amount. The pixel component for generating the histogram is the same as the pixel component for calculating the correlation degree by the correlation degree calculation unit 113, for example. Specific examples of pixel components include hue (H) in an HSV image represented by HSV representation of hue (H), saturation (S), and brightness (V). Note that there are various methods for extracting feature amounts, and the processing example of this embodiment is merely an example.

特徴一致度判定部117は、画像処理部106から供給される入力画像が、特徴量抽出部116により抽出された特徴量と一致する度合いを判定する。特徴量と一致する度合いとは、入力画像全体の画素数に対する、特徴量抽出部116により抽出された特徴量に一致すると判定される画素数の割合とする。なお、特徴一致度判定の方法は、さまざまな方法があり、本実施形態の処理例はあくまで一例である。   The feature matching degree determination unit 117 determines the degree to which the input image supplied from the image processing unit 106 matches the feature amount extracted by the feature amount extraction unit 116. The degree of matching with the feature amount is a ratio of the number of pixels determined to match the feature amount extracted by the feature amount extraction unit 116 to the number of pixels of the entire input image. Note that there are various methods for determining the degree of feature matching, and the processing example of this embodiment is merely an example.

被写体抽出部118では、評価値算出部115によって算出される評価値が最大となる参照領域を被写体領域と判定し、被写体領域の画像を抽出する。逐次供給される入力画像から被写体領域を判定することにより、目的とする被写体を追跡することができる。抽出した被写体領域の画像は基準画像登録部111へ供給され、登録されている基準画像を置き換える。また、判定した被写体領域の情報は制御部105に与えられる。   The subject extraction unit 118 determines that the reference region having the maximum evaluation value calculated by the evaluation value calculation unit 115 is the subject region, and extracts an image of the subject region. By determining the subject area from the sequentially supplied input images, the target subject can be tracked. The extracted image of the subject area is supplied to the reference image registration unit 111 and replaces the registered reference image. Information on the determined subject area is given to the control unit 105.

制御部105は、撮像装置100における自動焦点検出(AF)制御や、自動露出(AE)制御を行う。具体的には、制御部105は、A/D変換部104から出力された画像に基づいて、レンズユニット101の焦点制御機構や露出制御機構(いずれも図示しない)を制御する。例えば、焦点制御機構はレンズユニット101を光軸方向へ駆動させるアクチュエータなどであり、露出制御機構は絞りやシャッタ(メカニカルシャッタがある場合)を駆動させるアクチュエータなどである。   The control unit 105 performs automatic focus detection (AF) control and automatic exposure (AE) control in the imaging apparatus 100. Specifically, the control unit 105 controls the focus control mechanism and the exposure control mechanism (neither shown) of the lens unit 101 based on the image output from the A / D conversion unit 104. For example, the focus control mechanism is an actuator that drives the lens unit 101 in the optical axis direction, and the exposure control mechanism is an actuator that drives an aperture or a shutter (when there is a mechanical shutter).

制御部105は、このAF制御やAE制御よる撮像条件の決定において、被写体追跡部110から供給される被写体領域の抽出結果を用いることができる。具体的には、制御部105は、被写体領域として抽出された領域に合焦するように焦点検出条件を制御してAF制御を行ったり、当該領域の露出が適正になるように露出条件を制御してAE制御することができる。また、制御部105は、撮像素子102の出力タイミングの制御や、読み出す画素の選択制御など、撮像素子102の読み出し制御も行う。   The control unit 105 can use the extraction result of the subject area supplied from the subject tracking unit 110 in the determination of the imaging condition by the AF control or the AE control. Specifically, the control unit 105 performs AF control by controlling the focus detection condition so that the region extracted as the subject region is in focus, or controls the exposure condition so that the exposure of the region is appropriate. Thus, AE control can be performed. The control unit 105 also performs readout control of the image sensor 102 such as control of output timing of the image sensor 102 and selection control of pixels to be read out.

なお、撮像装置100が例えば顔検出部といった、特定の被写体を検出する機能を実現する構成を有する場合、検出された被写体領域(例えば顔領域)を自動的に基準画像として登録することができる。また、AF制御やAE制御に利用される、画像中の所定の領域(焦点検出領域や測光領域など)を、初期の被写体領域として基準画像に登録してもよい。これらの場合、撮像装置100は被写体指定部109を有さなくてもよい。   Note that when the imaging apparatus 100 has a configuration for realizing a function of detecting a specific subject, such as a face detection unit, the detected subject region (for example, a face region) can be automatically registered as a reference image. Also, a predetermined area (focus detection area, photometry area, etc.) in the image used for AF control or AE control may be registered in the reference image as an initial subject area. In these cases, the imaging apparatus 100 may not have the subject specifying unit 109.

ここで、評価値算出部115における評価値の算出方法について説明する。本実施形態において、評価値算出部115は、相関度算出部113が求める相関度と距離算出部114が求める距離の関数値として参照領域ごとの評価値を算出する。   Here, a method of calculating the evaluation value in the evaluation value calculation unit 115 will be described. In this embodiment, the evaluation value calculation unit 115 calculates an evaluation value for each reference region as a function value of the correlation degree obtained by the correlation degree calculation unit 113 and the distance obtained by the distance calculation unit 114.

上述の通り、相関度のみに基づいて評価値を求めた場合、真の被写体領域の他に被写体領域(基準画像)と特徴が類似した領域(類似領域)が存在する場合、類似領域を被写体領域と誤検出する可能性がある。特に、基準画像として用いられている被写体領域を抽出した時点と、追跡を行う入力画像を撮影した時点とで被写体の見えが変わっている場合には、真の被写体領域よりも類似領域の方が基準画像との相関度が高くなる場合もある。つまり、類似領域が存在する可能性が高い場合には、相関度算出部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 degree calculation unit 113 is reduced.

そのため、本実施形態では、特徴一致度判定部117において、類似領域の存在可能性の指標となる一致度を算出し、類似領域が存在する可能性が高いと判定される場合には、評価値に距離が寄与する程度を高める。これにより、直近の被写体領域からの距離が小さい参照領域から被写体領域が決定されやすくなり、被写体の動きが大きくない一般的な状況において、相関度の高い類似領域を誤検出する可能性を低減することができる。一方、類似領域が存在する可能性が小さいと判定される場合には、相関度算出部113の算出する相関度の信頼性は高い。そのため、評価値に距離が寄与する程度を低くする。これにより、直近の被写体領域からの距離が大きくても、相関度の高い参照領域が被写体領域として判定されやすくなり、被写体の動きが大きい場合でも、被写体領域を精度良く検出することができる。   For this reason, in the present embodiment, the feature coincidence determination unit 117 calculates the coincidence as an index of the possibility of the presence of the similar region, and if it is determined that the similar region is likely to exist, the evaluation value Increase the degree to which distance contributes. This makes it easy to determine the subject area from the reference area with a small distance from the nearest subject area, and reduces the possibility of erroneously detecting a similar area with a high degree of correlation in a general situation where the movement of the subject is not large. be able to. On the other hand, when it is determined that the possibility that a similar region exists is small, the reliability of the correlation calculated by the correlation calculation unit 113 is high. Therefore, the extent to which the distance contributes to the evaluation value is lowered. As a result, even if the distance from the nearest subject area is large, a reference area having a high degree of correlation is easily determined as the subject area, and the subject area can be accurately detected even when the subject moves greatly.

このように、本実施形態では、相関度と、直近の被写体領域からの距離の両方を考慮して参照領域の評価値を求めるとともに、類似領域の存在の可能性に応じて、直近の被写体領域からの距離を考慮する度合いを動的に変化させる。そのため、類似領域が存在する場合における誤検出を抑制しながら、大きく動く被写体に対しても追跡を可能とすることができる。   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 value calculation unit 115 calculates an evaluation value for each reference region as a function value of the correlation degree obtained by the correlation degree calculation unit 113 and the distance obtained by the distance calculation unit 114, for example, using the following equation (1). .
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 value calculation unit 115. The specific relationship between the degree of coincidence and the coefficient value can be experimentally obtained in advance, and the evaluation value calculation unit 115 may have a table in which the degree of coincidence is associated with the coefficient value. , A relational expression that can obtain a coefficient value by substituting the degree of coincidence may be provided. The subject extraction unit 118 determines the reference region having the highest evaluation value as the subject region.

基準画像(直近の被写体領域の画像)及び参照領域が大きさが横M画素×縦N画素の矩形領域であり、直近の被写体領域Iの位置が(x0, y0)、参照領域の位置が(x1, y1)とする。なお、上述の通り、領域の位置は重心位置や頂点の位置など、予め定めておくことができる。また、基準画像と参照領域の画像の相関度を、対応する位置の画素値の差分和の絶対値の大きさとして求めるとすると、評価値SADを求める式(1)は以下の式(2)のようになる。

Figure 0005451364
The reference image (the image of the nearest subject area) and the reference area are rectangular areas with a size of horizontal M pixels × vertical N pixels, the position of the nearest subject area I is (x0, y0), and the position of the reference area is ( x1, y1). As described above, the position of the region can be determined in advance, such as the position of the center of gravity or the position of the vertex. Further, when the degree of correlation between the standard image and the reference region image is obtained as the magnitude of the absolute value of the difference sum of the pixel values at the corresponding positions, the equation (1) for obtaining the evaluation value SAD is the following equation (2): become that way.
Figure 0005451364

式(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 amount extraction unit 116 and the feature matching degree determination unit 117 obtain a matching degree as a value indicating the possibility of the presence of a similar region (or the reliability of the reference image), and evaluate according to the matching degree. A configuration has been described in which the degree to which the distance contributes to the value is changed. However, this is merely an example, and other arbitrary configurations may be used as long as similar values can be obtained. For example, the average value and the maximum value of the correlation degree calculated by the correlation degree calculation unit 113 are calculated for each reference region, and the value obtained by dividing the maximum value of the correlation degree by the average value of the correlation degree or the absolute value of the difference is matched. It may be used in the same way as the degree. Here, it is assumed that the higher the degree of correlation, the larger the degree of correlation. When there are many regions similar to the reference image in the input image, the difference between the maximum value of the correlation degree and the average value of the correlation degree becomes small, so the value of the maximum value / average value or | maximum value−average value | Get smaller. On the other hand, when the number of similar regions is small, the difference between the maximum value of the correlation degree and the average value of the correlation degree is large, so that the value of the maximum value / average value or | maximum value−average value |

相関度の最大値及び平均値を用いる場合、類似領域の存在の可能性または基準画像の信頼性を示す値は評価値算出部115が算出することができ、特徴量抽出部116及び特徴一致度判定部117は不要である。   When using the maximum value and the average value of the correlation degree, the evaluation value calculation unit 115 can calculate the value indicating the possibility of the presence of the similar region or the reliability of the reference image, and the feature amount extraction unit 116 and the feature matching degree The determination unit 117 is not necessary.

(被写体追跡部110の動作)
次に、被写体追跡部110の処理の詳細について、図2及び図3を参照して説明する。なお、以下の説明では、検出及び追跡すべき特定の被写体が人物の顔であるものとする。
(Operation of subject tracking unit 110)
Next, details of the processing of the subject tracking unit 110 will be described with reference to FIGS. In the following description, it is assumed that a specific subject to be detected and tracked is a human face.

基準画像登録部111は、S201において、撮像素子102で逐次撮像された撮像画像を入力画像として読み込む。なお、S201における入力画像の読み込みは、撮像された全てのフレームについて行ってもよいし、間欠的に行ってもよい。   In step S <b> 201, the reference image registration unit 111 reads captured images sequentially captured by the image sensor 102 as input images. Note that the input image reading in S201 may be performed for all captured frames or may be performed intermittently.

次いで、基準画像登録部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 subject specifying unit 109. FIG. 3A shows an example of the reference image 301 registered based on the designation from the subject designation unit 109. When the subject tracking is started, the reference image 301 becomes the subject extraction result of the subject extraction unit 118.

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 amount extraction unit 116. In step S204, the feature amount extraction unit 116 extracts feature amounts from the reference image. For example, the feature amount extraction unit 116 generates a histogram for predetermined component values of pixels included in the reference image, and extracts a value having a frequency equal to or higher than a predetermined threshold value as the feature amount. The pixel component for generating the histogram is the same as the pixel component for calculating the correlation degree by the correlation degree calculation unit 113, for example. Specific examples of pixel components include hue (H) in an HSV image represented by HSV representation of hue (H), saturation (S), and brightness (V). Note that there are various methods for extracting feature amounts, and the processing example of this embodiment is merely an example. FIG. 3A shows an example of a hue histogram 302 generated from each pixel of the reference image 301. The feature amount extraction unit 116 extracts a range of hue values indicating a frequency equal to or higher than a predetermined threshold in the hue histogram 302 as a feature amount.

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 degree determination unit 117 matches the feature amount of the reference image extracted by the feature amount extraction unit 116 among the pixels included in the input image (the hue value is included in the feature amount range). Are counted and the ratio to all pixels is calculated. For example, the feature matching degree determination unit 117 generates a binarized image from the input image in which the pixel that matches the feature amount is a white pixel and the non-matching pixel is a black pixel, and the ratio of the number of white pixels to the total number of pixels is It is calculated as the degree that the input image matches the feature amount. FIG. 3B shows an example of the input image 303 at time t = n and an image 304 obtained by binarizing the input image 303 with the feature amount obtained from the hue histogram 302 of FIG. Furthermore, an example of an input image 305 at time t = m (m> n) and an image 306 obtained by binarizing the input image 305 with the feature amount obtained from the hue histogram 302 of FIG.

S206において、評価値算出部115は、特徴一致度判定部117によって算出された一致度合いに応じて、評価値に距離が寄与する度合い(係数αの値))を決定する。上述の通り、図3(b)に示す特徴2値化画像304のような特徴一致度合いが低い(特徴画素の割合が少ない)場合には、評価値に距離が寄与する度合いを小さくするため、係数αの値も小さくする。また、特徴2値化画像306のようなに一致度合いが大きい場合には、評価値に距離が寄与する度合いを大きくするため、係数αの値も大きくする。   In S206, the evaluation value calculation unit 115 determines the degree of contribution of the distance to the evaluation value (value of the coefficient α) according to the degree of matching calculated by the feature matching degree determination unit 117. As described above, when the feature matching degree is low (feature pixel ratio is small) as in the feature binarized image 304 shown in FIG. 3B, in order to reduce the degree that the distance contributes to the evaluation value, The value of the coefficient α is also reduced. Further, when the degree of coincidence is large as in the feature binarized image 306, the value of the coefficient α is also increased in order to increase the degree that the distance contributes to the evaluation value.

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 degree calculation unit 113 calculates the degree of correlation between the reference area image and the standard image from each pixel of the reference area image and the standard image. In S209, the distance calculation unit 114 calculates the distance between the position of the reference area for which the degree of correlation is obtained and the standard position. The reference position is the position of the most recently determined subject area (that is, the position of the reference image in the image from which the reference image is extracted).

S210で評価値算出部115は、相関度算出部113が算出した相関度と、距離算出部114が算出した距離と、S206で決定した係数αとを用い、式(2)に基づいて評価値を算出する。相関度は式(2)の右辺第1項に、距離は第2項に代入すればよい。S211で評価値算出部115は、入力画像の全体もしくは予め定められた探索領域内において、設定すべき参照領域について全て評価値が算出されたか判定する。   In S210, the evaluation value calculation unit 115 uses the correlation degree calculated by the correlation calculation unit 113, the distance calculated by the distance calculation unit 114, and the coefficient α determined in S206, based on Expression (2). Is calculated. The degree of correlation may be substituted into the first term on the right side of equation (2), and the distance may be substituted into the second term. In S211, the evaluation value calculation unit 115 determines whether evaluation values have been calculated for all reference areas to be set in the entire input image or in a predetermined search area.

設定すべき参照領域がまだ残っている場合は(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 value calculation unit 115 outputs information on the reference area having the maximum evaluation value to the subject extraction unit 118. . In step S212, the subject extraction unit 118 determines and extracts an image corresponding to the reference region having the maximum evaluation value from the input images as the subject region. The subject extraction unit outputs the extracted image to the reference image registration unit 111. Also, information regarding the determined subject area is output to the control unit 105, the image processing unit 106, and the distance calculation unit 114.

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 subject extraction unit 118. The updated reference image is used in subject tracking processing (S203 to S212) of the input image at the next time. In this way, by sequentially updating the reference image based on the extracted subject area, even when the subject appearance changes in time series, such as when the orientation of the subject changes, subject tracking is performed appropriately. be able to. By updating the reference image, the feature amount in the reference image obtained in S204 is also updated. On the other hand, when the change in appearance of the subject in time series is not taken into consideration, the reference image registered in the initial stage may be maintained without updating the reference image. In this case, the feature amount in the reference image is also maintained.

なお、本実施形態では説明及び理解を容易にするため、被写体追跡処理の各処理ステップが直列的に実行されるように説明したが、並行して処理可能な処理ステップは同時に実行してもよいことは言うまでもない。例えば、入力画像に対して特徴一致度を求め、係数αを決定する処理(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に記載の被写体追跡装置。   2. The extraction unit according to claim 1, wherein the extraction unit generates a histogram for a predetermined component value of a pixel included in the reference image, and extracts a value having a frequency equal to or higher than a predetermined threshold as the feature amount. The subject tracking device described. 前記一致度判定手段は、前記入力画像に含まれる画素のうち前記特徴量に一致する画素を計数し、前記入力画像全体の画素数に対する前記特徴量に一致する画素数の割合を、前記入力画像が前記特徴量と一致する度合いとして算出することを特徴とする請求項1又は請求項2記載の被写体追跡装置。   The coincidence degree determination unit counts pixels that match the feature amount among pixels included in the input image, and calculates a ratio of the number of pixels that matches the feature amount to the number of pixels of the entire input image. The subject tracking device according to claim 1, wherein the subject tracking amount is calculated as a degree of coincidence with the feature amount. 前記入力画像の、前記判定手段が判定した前記特定の被写体の領域に対応する画像により、前記基準画像を更新する更新手段をさらに有することを特徴とする請求項1乃至請求項3のいずれか1項に記載の被写体追跡装置。   4. The image processing apparatus according to claim 1, further comprising an update unit configured to update the reference image with an image of the input image corresponding to the specific subject area determined by the determination unit. The subject tracking device according to Item. 前記入力画像中の領域を指定するための指定手段をさらに有し、
最初に用いられる前記基準画像が、前記指定手段を通じてユーザによって指定された領域の画像であることを特徴とする請求項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.
請求項6に記載の被写体追跡装置の制御方法の各工程をコンピュータに実行させるためのプログラム。   The program for making a computer perform each process of the control method of the to-be-photographed object tracking apparatus of Claim 6.
JP2009291408A 2009-12-22 2009-12-22 Subject tracking device and control method thereof Expired - Fee Related JP5451364B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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