JP2024056441A - Image processing device, method and program for controlling the image processing device - Google Patents
Image processing device, method and program for controlling the image processing device Download PDFInfo
- Publication number
- JP2024056441A JP2024056441A JP2022163309A JP2022163309A JP2024056441A JP 2024056441 A JP2024056441 A JP 2024056441A JP 2022163309 A JP2022163309 A JP 2022163309A JP 2022163309 A JP2022163309 A JP 2022163309A JP 2024056441 A JP2024056441 A JP 2024056441A
- Authority
- JP
- Japan
- Prior art keywords
- subject
- image
- correlation
- distance
- evaluation value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 134
- 238000000034 method Methods 0.000 title claims abstract description 79
- 238000004364 calculation method Methods 0.000 claims abstract description 105
- 238000011156 evaluation Methods 0.000 claims abstract description 102
- 238000001514 detection method Methods 0.000 claims description 44
- 230000008859 change Effects 0.000 claims description 10
- 238000010801 machine learning Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 description 52
- 238000010586 diagram Methods 0.000 description 21
- 238000004886 process control Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 16
- 238000013527 convolutional neural network Methods 0.000 description 9
- 230000000875 corresponding effect Effects 0.000 description 7
- 239000000284 extract Substances 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000001276 controlling effect Effects 0.000 description 4
- 238000003384 imaging method Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 241000282472 Canis lupus familiaris Species 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Images
Abstract
【課題】被写体の動きが速い場合の被写体追跡の精度を向上させることができる画像処理装置、画像処理装置の制御方法およびプログラムを提供することを目的とする。【解決手段】逐次の入力画像で特定の被写体を追跡する画像処理装置101は、特定の被写体に対応する基準画像を登録する基準画像登録回路202、入力画像に設定される複数の部分領域304毎に基準画像との相関度を求める相関度算出回路203、部分領域304毎に入力画像内の所定の基準位置からの距離を算出する距離算出回路204、部分領域304毎に相関度と距離とを用いて評価値を算出する評価値算出回路205、評価値に基づいて複数の部分領域304のうち特定の被写体を含む領域を決定する追跡処理制御回路206を備える。評価値算出回路205は、評価値を算出する際に距離が評価値に寄与する度合いを、相関度算出回路203で相関度を求めるときのフレームレートに応じて変化させる。【選択図】図2[Problem] To provide an image processing device, a control method for an image processing device, and a program capable of improving the accuracy of tracking a subject when the subject moves quickly. [Solution] An image processing device 101 for tracking a specific subject in successive input images includes a reference image registration circuit 202 for registering a reference image corresponding to the specific subject, a correlation degree calculation circuit 203 for calculating the degree of correlation between each of a plurality of partial regions 304 set in the input image and the reference image, a distance calculation circuit 204 for calculating the distance from a predetermined reference position in the input image for each of the partial regions 304, an evaluation value calculation circuit 205 for calculating an evaluation value for each of the partial regions 304 using the correlation degree and the distance, and a tracking processing control circuit 206 for determining an area including the specific subject among the plurality of partial regions 304 based on the evaluation value. The evaluation value calculation circuit 205 changes the degree to which the distance contributes to the evaluation value when calculating the evaluation value according to the frame rate when the correlation degree calculation circuit 203 calculates the correlation degree. [Selected Figure] FIG.
Description
本発明は、画像処理装置、画像処理装置の制御方法およびプログラムに関する。 The present invention relates to an image processing device, a control method for an image processing device, and a program.
時系列的に逐次供給される1フレームの画像において特定の被写体を検出し、その検出した被写体を追跡する技術が非常に有用であり、例えば、動画像における人間の顔領域や人体領域の特定に利用されている。このような技術は、電話会議、マン・マシン・インターフェース、セキュリティ、任意の被写体を追跡するためのモニタ・システム、画像圧縮などの多くの分野で使用することができる。 Technology that detects a specific subject in a frame of image that is supplied sequentially in a time series and tracks the detected subject is very useful, and is used, for example, to identify human face areas and human body areas in moving images. Such technology can be used in many fields, such as telephone conferences, man-machine interfaces, security, monitor systems for tracking arbitrary subjects, and image compression.
また、デジタルスチルカメラやデジタルビデオカメラなどにおいて、撮像画像に含まれる任意の被写体を抽出および追跡して、被写体に対する焦点状態や露出状態を最適化する技術が知られている。例えば、特許文献1には、撮像画像に含まれる顔の位置を検出(抽出)および追跡し、その顔に対して、焦点を合わせると共に最適な露出で撮影する画像処理装置が開示されている。このとき、検出された顔を追跡することにより、時系列に対して安定的な制御が可能になる。また、特許文献2は、あるフレームで検出された顔を、後続するフレームで検出する追跡処理を行うことを開示している。特定の被写体を後続するフレームで追跡する方法としては、特許文献2に開示されるような、テンプレートマッチングの手法を利用する方法が知られている。なお、テンプレートマッチングとは、追跡対象となる特定の被写体を含む画像領域を切り出した部分画像を基準画像(テンプレート画像)として登録し、基準画像と最も相関度が高い領域を算出し、特定の被写体を追跡する技術である。 In addition, in digital still cameras and digital video cameras, a technique is known for extracting and tracking an arbitrary subject included in a captured image to optimize the focus and exposure of the subject. For example, Patent Document 1 discloses an image processing device that detects (extracts) and tracks the position of a face included in a captured image, focuses on the face, and captures the image with optimal exposure. At this time, tracking the detected face enables stable control over time series. Patent Document 2 discloses a tracking process that detects a face detected in a certain frame in a subsequent frame. As a method for tracking a specific subject in subsequent frames, a method that uses a template matching technique, as disclosed in Patent Document 2, is known. Template matching is a technique in which a partial image obtained by cutting out an image area including a specific subject to be tracked is registered as a reference image (template image), and the area with the highest correlation with the reference image is calculated to track the specific subject.
テンプレートマッチングを用いた被写体追跡方法では、被写体を追跡するためのフレーム画像と、基準画像(テンプレート画像)との相関度に基づいて被写体を追跡する。ここで、フレーム画像内に基準画像と類似する、しかし追跡すべき被写体とは異なる領域が存在する場合、その領域(以下、「類似領域」という)を被写体と誤検出することがある。この問題は、特に、フレーム画像中で被写体の見えが基準画像から変化している場合に発生しやすい。そこで、時系列的に連続な2つのフレーム画像間においては、被写体の位置が大きく変化しないという仮定を導入し、相関度の高い複数の領域のうち、画像間の移動距離が大きい領域は、被写体を含む領域でないとみなすことが考えられる。以下、被写体を含む領域を「被写体領域」という。これにより、被写体の動きが遅い場合には、類似領域を被写体領域と誤検出する可能性を低減することができるであろう。しかしながら、被写体の動きが速い場合、時系列的に連続な2つのフレーム画像間における被写体領域の位置変化は大きいため、被写体の動きが速い場合には上述の仮定の導入により、むしろ誤検出の可能性が高くなるおそれがある。 In a subject tracking method using template matching, a subject is tracked based on the degree of correlation between a frame image for tracking the subject and a reference image (template image). Here, if there is an area in a frame image that is similar to the reference image but different from the subject to be tracked, that area (hereinafter referred to as a "similar area") may be erroneously detected as the subject. This problem is particularly likely to occur when the appearance of the subject in the frame image has changed from the reference image. Therefore, it is possible to introduce an assumption that the position of the subject does not change significantly between two chronologically consecutive frame images, and to consider an area with a large moving distance between images among multiple areas with high correlation as not including the subject. Hereinafter, an area including the subject is referred to as a "subject area". This will reduce the possibility of erroneously detecting a similar area as the subject area when the subject moves slowly. However, when the subject moves quickly, the position of the subject area changes significantly between two chronologically consecutive frame images, so the introduction of the above assumption may actually increase the possibility of erroneous detection when the subject moves quickly.
本発明は、上記の課題に鑑みてなされたものである。本発明は、被写体の動きが速い場合の被写体追跡の精度を向上させることができる画像処理装置、画像処理装置の制御方法およびプログラムを提供することを目的とする。 The present invention has been made in consideration of the above problems. It is an object of the present invention to provide an image processing device, a control method for the image processing device, and a program that can improve the accuracy of subject tracking when the subject is moving quickly.
上記目的を達成するために、本発明の画像処理装置は、逐次供給される複数の入力画像に亘って特定の被写体を追跡する画像処理装置であって、前記特定の被写体に対応する基準画像を登録する登録手段と、前記入力画像に設定される複数の部分領域の各々について前記基準画像との相関度を求める相関算出手段と、前記複数の部分領域の各々について前記入力画像内の所定の基準位置からの距離を算出する距離算出手段と、前記複数の部分領域の各々について前記相関度と前記距離とを用いて評価値を算出する評価算出手段と、前記評価値に基づいて前記複数の部分領域の各々のうち前記特定の被写体を含む領域を決定する決定手段と、前記評価算出手段が前記評価値を算出する際に前記距離が前記評価値に寄与する度合いを、前記相関算出手段で前記相関度を求めるときのフレームレート、前記特定の被写体の種類、または前記特定の被写体の速度に応じて変化させる変化手段と、を備えることを特徴とする。 In order to achieve the above object, the image processing device of the present invention is an image processing device that tracks a specific subject across multiple input images that are sequentially supplied, and is characterized in that it comprises: a registration means for registering a reference image corresponding to the specific subject; a correlation calculation means for calculating a degree of correlation between each of multiple partial regions set in the input image and the reference image; a distance calculation means for calculating a distance from a predetermined reference position in the input image for each of the multiple partial regions; an evaluation calculation means for calculating an evaluation value for each of the multiple partial regions using the degree of correlation and the distance; a determination means for determining an area that includes the specific subject among the multiple partial regions based on the evaluation value; and a change means for changing the degree to which the distance contributes to the evaluation value when the evaluation calculation means calculates the evaluation value, depending on the frame rate, the type of the specific subject, or the speed of the specific subject when the correlation calculation means calculates the degree of correlation.
本発明によれば、被写体の動きが速い場合の被写体追跡の精度を向上させることができる。 The present invention can improve the accuracy of tracking a subject when the subject is moving quickly.
以下、本発明の各実施形態について図面を参照しながら詳細に説明する。ただし、以下の各実施形態に記載されている構成はあくまで例示に過ぎず、本発明の範囲は各実施形態に記載されている構成によって限定されることはない。例えば、本発明を構成する各部は、同様の機能を発揮し得る任意の構成のものと置換することができる。また、任意の構成物が付加されていてもよい。また、各実施形態のうちの、任意の2以上の構成(特徴)を組み合わせることもできる。なお、各図面を通じて同一の構成要素には同一の符号を付し、その説明を簡略化又は省略することがある。 Each embodiment of the present invention will be described in detail below with reference to the drawings. However, the configurations described in the following embodiments are merely examples, and the scope of the present invention is not limited by the configurations described in the embodiments. For example, each part constituting the present invention can be replaced with any configuration that can perform a similar function. In addition, any component may be added. In addition, any two or more configurations (features) of each embodiment can be combined. Note that the same components are given the same reference numerals throughout the drawings, and their descriptions may be simplified or omitted.
<第1実施形態>
以下、図1~図5を参照して、第1実施形態について説明する。図1は、第1実施形態に係わる画像処理装置101の概略構成を示すブロック図である。画像処理装置101は、被写体の画像を撮像するデジタルスチルカメラやデジタルビデオカメラとして具現化される。また、画像処理装置101は、時系列的に逐次供給される画像に含まれる被写体を追跡する被写体追跡装置としても機能する。画像処理装置101は、レンズなどの光学系102、撮像素子103、アナログ信号処理回路104、A/D変換器105、制御回路106、画像処理回路107、表示器108、記録媒体109、被写体指定部110、および被写体追跡回路111を有する。
First Embodiment
The first embodiment will be described below with reference to Figs. 1 to 5. Fig. 1 is a block diagram showing a schematic configuration of an
被写体の像を表す光は、光学系102によって集光され、CCDイメージセンサやCMOSイメージセンサなどで構成された撮像素子103に入射する。撮像素子103は、入射する光の強度に応じた電気信号を画素単位で出力する。すなわち、撮像素子103は、光学系102によって形成された被写体の像を光電変換する。撮像素子103から出力される電気信号は、撮像素子103で撮像された被写体の像を示すアナログの映像信号である。撮像素子103から出力された映像信号に対しては、アナログ信号処理回路104で相関二重サンプリング(CDS)などのアナログ信号処理が行われる。アナログ信号処理回路104から出力された映像信号は、A/D変換器105でデジタルデータの形式に変換され、制御回路106および画像処理回路107に入力される。
Light representing the image of the subject is collected by the
制御回路106は、CPU(Central Processing Unit)やマイクロコントローラなどであり、画像処理装置101の動作を制御する。具体的には、制御回路106は、ROM(Read Only Memory)に記憶されたプログラムをRAM(Random Access Memory)の作業領域に展開して順次実行することで、画像処理装置101の各部を制御する。
The
制御回路106は、撮像素子103で撮像する際の焦点の状況や露出の状況などの撮影条件を制御する。具体的には、制御回路106は、A/D変換器105から出力された映像信号に基づいて、光学系102の焦点制御機構や露出制御機構(いずれも不図示)を制御する。例えば、焦点制御機構は、光学系102に含まれるレンズを光軸方向へ駆動させるアクチュエータなどであり、露出制御機構は、絞りやシャッタを駆動させるアクチュエータなどである。また、制御回路106は、撮像素子103の出力タイミングや出力画素など、撮像素子103の読み出し制御を行う。
The
画像処理回路107は、A/D変換器105から出力された映像信号に対して、ガンマ補正、ホワイトバランス処理などの画像処理を行う。また、画像処理回路107は、通常の画像処理に加え、後述する被写体追跡回路111から供給される画像中の被写体領域に関する情報を用いた画像処理を行う機能も有する。画像処理回路107から出力された映像信号は、表示器108に送られる。表示器108は、例えば、LCDや有機ELディスプレイで構成され、映像信号を表示する。従って、撮像素子103で時系列的に逐次撮像した画像が、表示器108に逐次表示される。これにより、表示器108は、電子ビューファインダ(EVF)として機能する。また、表示器108は、被写体追跡回路111によって追跡している被写体を含む被写体領域を矩形などで表示する。また、画像処理回路107から出力された映像信号は、記録媒体109(例えば、着脱可能なメモリーカードなど)に記録される。なお、映像信号の記録先は、画像処理装置101の内蔵メモリであっても、通信インターフェースによる通信可能に接続された外部装置(不図示)であってもよい。
The image processing circuit 107 performs image processing such as gamma correction and white balance processing on the video signal output from the A/
被写体指定部110は、例えば表示器108に設けられたタッチパネルや、画像処理装置101の筐体に設けられたキーやボタンなどの入力インターフェースである。ユーザ(撮影者)は、例えば表示器108に表示されている映像信号中から所望の被写体の領域を被写体指定部110で指定することにより、追跡すべき被写体を指定することができる。タッチパネルや、キー、ボタンなどを用いて画像中から任意の領域を指定する方法は、特に制限はなく、周知の方法を採用できる。
The
被写体追跡回路111は、画像処理回路107から時系列的に逐次供給される(すなわち、撮影された時刻の異なる)画像に含まれる被写体を追跡する。被写体追跡回路111は、顔検出など特定の被写体を検出する被写体検出回路を有しており、検出された被写体を追跡する。また、被写体追跡回路111は、被写体指定部110によって指定された被写体を被写体の画素パターンに基づき、逐次供給される画像から被写体領域を推定してもよい。被写体追跡回路111の詳細については後述する。制御回路106は、上述の焦点制御機構や露出制御機構の制御に、被写体追跡回路111から供給された被写体領域の情報を用いることができる。具体的には、制御回路106は、被写体領域のコントラスト値を用いた焦点制御や、被写体領域の輝度値を用いた露出制御を行う。これにより、画像処理装置101では、撮像画像における特定の被写体領域を考慮した撮像を行うことができる。
The
ここで、被写体追跡回路111に関して詳細を説明する。被写体追跡回路111は、マッチング手段として機能する。つまり、被写体追跡回路111は、追跡対象とする被写体を示す部分画像をテンプレートとして、供給された画像の部分領域と照合し、照合する部分領域を変化させて、相関度が高い領域を推定するマッチング手段として機能する。以下、このようなマッチング手段を、「テンプレートマッチング」という。図2は、被写体追跡回路111の構成を示すブロック図である。被写体追跡回路111は、被写体検出回路201、基準画像登録回路202、相関度算出回路203、距離算出回路204、評価値算出回路205、および追跡処理制御回路206により構成される。被写体検出回路201から追跡処理制御回路206の各ブロックは、バスによって接続され、データのやり取りができる。
Here, the
被写体検出回路201は、供給される画像から追跡対象とする被写体を検出し特定する。追跡対象とする被写体としては、例えば、人物の顔などが代表的である。この場合、被写体検出回路201は、被写体領域として人物の顔領域を特定し、その人物の顔領域を追跡対象とする。被写体検出回路201における被写体の検出方法には、例えば、検出対象が人物の顔である場合、公知の顔検出方法を用いてもよい。顔検出の公知技術として、顔に関する知識(肌色情報、目・鼻・口などのパーツ)を利用する方法と、ニューラルネットに代表される学習アルゴリズムにより顔検出のための識別器を構成する方法などがある。また、顔検出では、認識率向上のために、これらを組み合わせて顔認識を行うのが一般的である。そのような顔検出の方法には、例えば、ウェーブレット変換と画像特徴量を利用して顔検出する方法がある。基準画像登録回路202(登録手段)は、追跡対象とする被写体を示す部分画像を基準画像(テンプレート)として登録する。相関度算出回路203(相関算出手段)は、基準画像登録回路202により登録されたテンプレートと、供給された画像の部分領域を照合し、照合する部分領域を変化させて、相関度が高い領域を推定する(テンプレートマッチング)。
The
図3を参照して、テンプレートマッチングの詳細について説明する。図3(a)は、テンプレートマッチングにおける基準画像の一例を示す図である。テンプレート301は、追跡対象となる被写体を示す部分画像(基準画像)であり、この部分画像の画素パターンが特徴量として扱われる。特徴量302は、テンプレート301における複数領域の各座標の特徴量を表現したものであり、第1実施形態では、画素データの輝度信号を特徴量とする。特徴量T(i,j)は、テンプレート301の領域内の座標を(i,j)、水平画素数をW、垂直画素数をHとすると、式(1)で表現される。
T(i,j)={T(0,0),T(1,0),・・・,T(W-1,H-1)}・・・(1)
Template matching will be described in detail with reference to Fig. 3. Fig. 3(a) is a diagram showing an example of a reference image in template matching. A
T(i,j)={T(0,0), T(1,0), ..., T(W-1,H-1)} ... (1)
図3(b)は、追跡対象を探索する画像の情報を示す図である。303は、テンプレートマッチング処理を行う範囲の探索画像である。なお、以下では、探索画像303を「入力画像」と表記する場合がある。探索画像303における座標は、(x,y)で表現する。部分領域304は、テンプレートマッチングの評価値を取得するための領域である。特徴量305は、部分領域304の特徴量を表現したものであり、テンプレート301と同様に画像データの輝度信号を特徴量とする。特徴量S(i,j)は、部分領域304内の座標を(i,j)、水平画素数をW、垂直画素数をHとすると、式(2)で表現される。
S(i,j)={S(0,0),S(1,0),・・・,S(W-1,H-1)}・・・(2)
FIG. 3B is a diagram showing information of an image for searching for a tracking target. 303 is a search image within a range in which template matching processing is performed. In the following, the
S(i,j)={S(0,0), S(1,0), ..., S(W-1,H-1)} ... (2)
第1実施形態では、テンプレート301と部分領域304との相違度を評価する演算方法として、差分絶対値和、いわゆるSAD(Sum of Absolute Difference)値が用いられる。SAD値は、式(3)により算出される。
相関度算出回路203は、部分領域304を探索画像303の左上から順に1画素ずつずらしながら、SAD値V(x,y)を演算する。演算されたV(x,y)が最小値を示す座標(x,y)がテンプレート301と最も似た位置を示す。つまり、最小値を示す位置が、探索画像303において、目的とする追跡対象が存在する可能性が高い位置となる。なお、第1実施形態では、特徴量として輝度信号の1次元の情報を用いて説明したが、明度・色相・彩度の信号などの3次元の情報が特徴量として扱われてもよい。また、テンプレートマッチングの評価値の演算方法として、SAD値に関して説明したが、正規相互相関いわゆるNCC(Normalized Correlation Coffiecient)などの異なる演算方法が用いられてもよい。
The
テンプレートマッチングによって得られるSAD値において、最小となるSAD値が最も相関が高いため、第1実施形態では、相関度は、式(4)のようにSAD値の逆数により算出される。
相関度(x,y)=1/V(x,y)・・・(4)
Among the SAD values obtained by template matching, the smallest SAD value has the highest correlation, so in the first embodiment, the degree of correlation is calculated as the reciprocal of the SAD value as in equation (4).
Correlation degree (x, y) = 1 / V (x, y) (4)
図2に戻る。距離算出回路204(距離算出手段)は、入力画像内の所定の基準位置との距離を算出する。所定の基準位置は、被写体の追跡を実施した直前の入力画像において、被写体指定部110で指定されたあるいは被写体検出回路201が特定した被写体領域の位置とする。あるいは、所定の基準位置は、被写体追跡による過去の被写体領域の動き情報に基づいて予測した、現在の入力画像における被写体領域の位置でもよい。ここで、所定の基準位置、つまり被写体領域の位置は、任意に設定可能であり、例えば被写体領域の重心位置であってもよいし、被写体領域の1頂点の位置でもよい。なお、以下では、入力画像内の所定の基準位置との距離を、距離算出回路204が求める距離、または単に距離と表記する場合がある。
Returning to FIG. 2, the distance calculation circuit 204 (distance calculation means) calculates the distance to a predetermined reference position in the input image. The predetermined reference position is the position of the subject area specified by the
評価値算出回路205(評価算出手段)は、評価値を、相関度算出回路203が求める相関度と距離算出回路204が求める距離の関数値とし、探索画像303内の部分領域304ごとの評価値を算出する。上述の通り、相関度のみに基づいて評価値が求められると、被写体領域の他に被写体領域(基準画像)と特徴が類似した領域(類似領域)が存在する場合、類似領域を被写体領域と誤検出する可能性がある。特に、基準画像として用いられている被写体領域が登録された時点と、追跡を行う入力画像が撮影された時点とで被写体の見えが変わっている場合には、被写体領域よりも類似領域の方が基準画像との相関度が高くなる場合もある。つまり、類似領域が存在する可能性が高い場合には、相関度算出回路203が求める相関度の信頼性は低下する。
The evaluation value calculation circuit 205 (evaluation calculation means) calculates an evaluation value for each
そのため、第1実施形態では、相関度算出回路203で相関度を求めるときのフレームレートを用いて、評価値に距離が寄与する程度が決められる。相関度を求めるときのフレームレートは、撮像素子103から出力される撮像のレートでもよいし、撮像素子103から逐次供給される入力画像を周期的に間引いたレートとしてもよい。これは、相関度を求めるときのフレームレートを、撮影の条件などによって切り換えるケースを想定したものである。例えば、動画の記録中や静止画の連写中は、撮像のレートと相関度を求めるときのフレームレートは同じであるが、記録はせずに表示器108のみに表示画像を表示している撮影条件の場合には、低消費電力の目的で撮像のレートを間引くケースが想定される。
Therefore, in the first embodiment, the degree to which distance contributes to the evaluation value is determined using the frame rate when the
相関度を求めるときのフレームレートは高くなればなるほど、被写体の移動量は相対的に小さくなるため、評価値に距離が寄与する程度が高められる。これにより、直近の被写体領域からの距離が小さい領域から被写体領域が決定されやすくなり、類似領域が存在する可能性が高い場合でも、誤検出する可能性を低減することができる。これに対して、相関度を求めるときのフレームレートが低い場合は、被写体の移動量は相対的に大きくなるため、評価値に距離が寄与する程度が低くされる。これにより、直近の被写体領域からの距離が大きくても、相関度の高い領域が被写体領域として判定されやすくなり、被写体の動きが速い場合でも、被写体領域を精度よく検出することができる。 The higher the frame rate when calculating the correlation, the smaller the amount of movement of the subject becomes relative to the object, and the greater the contribution of distance to the evaluation value. This makes it easier to determine the object area from an area that is close to the nearest object area, and reduces the possibility of erroneous detection even when there is a high possibility of a similar area existing. In contrast, when the frame rate when calculating the correlation is low, the amount of movement of the subject becomes relatively large, and the greater the contribution of distance to the evaluation value becomes. This makes it easier to determine an area with a high correlation as the object area even if it is far from the nearest object area, and allows the object area to be detected with high accuracy even when the object moves quickly.
このように、第1実施形態では、相関度と直近の被写体領域からの距離の両方を考慮して部分領域304の評価値が求められるとともに、相関度を求めるときのフレームレートに応じて、直近の被写体領域からの距離を考慮する度合いを動的に変化させる。そのため、フレームレートが高い場合は、類似領域が存在する場所における誤検出を抑制しながら、速く動く被写体に対しても追跡を可能とすることができる。また、フレームレートが低い場合においては、評価値に距離が寄与する程度が低くされるため、フレームレートが高い場合と同様にして、速く動く被写体に対して追跡を可能とすることができる。
In this way, in the first embodiment, the evaluation value of the
評価値算出回路205は、相関度算出回路203が求める相関度と距離算出回路204が求める距離の関数値として、例えば以下の式(5)によって部分領域304ごとの評価値を算出する。
評価値=相関度×GAIN・・・(5)
The evaluation
Evaluation value = correlation degree × GAIN (5)
ここで、GAINは、下記の3条件で算出される。
距離≦αの場合、GAIN=1.0
α<距離≦βの場合、GAIN=1.0-(直近の被写体領域からの距離-α)×γ
β<距離の場合、GAIN=0.1
Here, GAIN is calculated under the following three conditions:
If distance≦α, GAIN=1.0
If α<distance≦β, GAIN=1.0-(distance from nearest subject area-α)×γ
If β<distance, then GAIN=0.1
図4は、第1実施形態における距離とゲイン(GAIN)の関係を示す図である。図4では、横軸に距離をとり、縦軸をGAINとしている。図4(a)は、初期状態の距離とゲイン(GAIN)の関係を示す図である。初期状態では、相関度を求めるときのフレームレートは、60fpsを想定している。α、β、γは係数であり、α=20、β=60、γ=0.0225としている。距離は、被写体領域の位置(x,y)と基準位置(bx,by)の差分値である。距離の単位は、[pix]である。距離≦αの場合は、GAINは1.0としている。初期状態では、被写体はフレーム単位で距離が20[pix]までは動く可能性があるということを考慮している。距離がα<距離≦βの場合は、線形的にGAINを小さくすることで遠くの被写体の評価値を下げるような処理をしている。距離がβ<距離の場合は、予期しない高速に移動する被写体の可能性もあるため、GAINは、0にはせず、0.1という下限値をもうけている。 Figure 4 is a diagram showing the relationship between distance and gain (GAIN) in the first embodiment. In Figure 4, the horizontal axis is distance, and the vertical axis is GAIN. Figure 4 (a) is a diagram showing the relationship between distance and gain (GAIN) in the initial state. In the initial state, the frame rate when calculating the correlation is assumed to be 60 fps. α, β, and γ are coefficients, and α = 20, β = 60, and γ = 0.0225. The distance is the difference value between the position (x, y) of the subject area and the reference position (bx, by). The unit of distance is [pix]. If distance ≦ α, GAIN is set to 1.0. In the initial state, it is considered that the subject may move up to a distance of 20 [pix] per frame. If the distance is α < distance ≦ β, the GAIN is linearly reduced to reduce the evaluation value of the distant subject. If the distance is β < distance, there is a possibility that the subject is moving unexpectedly at high speed, so GAIN is not set to 0 but has a lower limit of 0.1.
図4(b)は、相関度を求めるときのフレームレートが高い場合の距離とゲイン(GAIN)の関係を示す図である。図4(b)では、相関度を求めるときのフレームレートは、120fpsを想定している。α=10、β=30、γ=0.045としている。α=10とすることで、図4(a)の初期状態と比較して、GAINが1.0になる距離範囲を1/2にしている。また、β=30とすることで、図4(a)の初期状態と比較して、GAINが0.1になる距離範囲も1/2にしている。これは、フレームレートが高いため、被写体の移動量が相対的に小さくなると考えられるためである。 Figure 4(b) is a diagram showing the relationship between distance and gain (GAIN) when the frame rate when calculating the correlation is high. In Figure 4(b), the frame rate when calculating the correlation is assumed to be 120 fps. α = 10, β = 30, and γ = 0.045. By setting α = 10, the distance range where GAIN is 1.0 is halved compared to the initial state of Figure 4(a). Also, by setting β = 30, the distance range where GAIN is 0.1 is also halved compared to the initial state of Figure 4(a). This is because it is believed that the amount of movement of the subject will be relatively small due to the high frame rate.
図4(c)は、相関度を求めるときのフレームレートが低い場合の距離とゲイン(GAIN)の関係を示す図である。図4(c)では、相関度を求めるときのフレームレートは、30fpsを想定している。α=30、β=90、γ=0.015としている。α=30とすることで、図4(a)の初期状態と比較して、GAINが1.0になる距離範囲を1.5倍にしている。また、β=90とすることで、図4(a)の初期状態と比較して、GAINが0.1になる距離範囲も1.5倍にしている。これは、フレームレートが低いため、被写体の移動量が相対的に大きくなると考えられるためである。 Figure 4(c) is a diagram showing the relationship between distance and gain (GAIN) when the frame rate when calculating the correlation is low. In Figure 4(c), the frame rate when calculating the correlation is assumed to be 30 fps. α = 30, β = 90, and γ = 0.015. By setting α = 30, the distance range where GAIN is 1.0 is increased by 1.5 times compared to the initial state of Figure 4(a). Also, by setting β = 90, the distance range where GAIN is 0.1 is also increased by 1.5 times compared to the initial state of Figure 4(a). This is because it is considered that the amount of movement of the subject will be relatively large due to the low frame rate.
なお、相関度を求めるときのフレームレートと係数α、β、γの具体的な関係は、あらかじめ実験的に求めておくことが可能である。評価値算出回路205は、フレームレートと係数α、β、γとを対応付けたテーブルを有していてもよいし、フレームレートを代入すれば係数α、β、γが得られる関数式を有していてもよい。
The specific relationship between the frame rate and the coefficients α, β, and γ when calculating the correlation degree can be experimentally determined in advance. The evaluation
図2に戻る。追跡処理制御回路206は、CPU、ROM、およびRAMなどで構成され、被写体追跡処理の制御を行う。具体的には、追跡処理制御回路206は、ROMに記憶されたプログラムをRAMの作業領域に展開して順次実行することで、被写体追跡処理の制御を行う。これにより、被写体検出回路201から評価値算出回路205では、追跡処理制御回路206を介して処理が実行される。追跡処理制御回路206(決定手段)は、評価値算出回路205が算出する評価値が最も高くなる部分領域304を被写体領域に決定する。
Returning to FIG. 2, the tracking
図5は、第1実施形態における被写体追跡処理を示すフローチャートである。図5の処理(画像処理装置の制御方法)は、追跡処理制御回路206のCPU(コンピュータ)がROMに記憶されたプログラムをRAMに展開して実行し、被写体検出回路201から評価値算出回路205を制御することで実現される。ステップS501において、被写体検出回路201は、フレームt=0における入力画像を読み込み、例えば顔検出処理といった被写体検出処理を行って、被写体領域を抽出し、被写体検出結果を得る。ステップS502において、追跡処理制御回路206は、ステップS501の被写体検出結果から初期の基準画像を生成し、基準画像登録回路202に登録する(登録工程)。
Figure 5 is a flowchart showing the subject tracking process in the first embodiment. The process in Figure 5 (control method of the image processing device) is realized by the CPU (computer) of the tracking
ステップS503において、評価値算出回路205(変化手段)は、相関度を求めるときのフレームレートに応じて評価値に距離が寄与する度合いを決定する(変化工程)。具体的には、評価値算出回路205は、式(5)のGAINを算出するために、係数α、β、γを決定する。ステップS504において、相関度算出回路203は、次のフレームt=1における入力画像を読み込む。さらに、相関度算出回路203は、入力画像の部分領域304と、フレームt=0の入力画像において登録された基準画像とのテンプレートマッチング処理を行い、基準画像との相関度を算出する(相関算出工程)。ステップS505において、距離算出回路204は、相関度を求めた位置と基準位置との距離を算出する(距離算出工程)。基準位置は、直近に判定された被写体領域の位置(すなわち、基準画像を抽出した入力画像における基準画像の位置)とする。
In step S503, the evaluation value calculation circuit 205 (changing means) determines the degree to which the distance contributes to the evaluation value according to the frame rate when the correlation degree is calculated (changing step). Specifically, the evaluation
ステップS506において、評価値算出回路205は、ステップS504で算出された相関度、ステップS505で算出された距離、およびステップS503で決定された係数α、β、γを用い、式(5)に基づいて評価値を算出する(評価算出工程)。ステップS507において、追跡処理制御回路206は、入力画像のうち、評価値が最大となった部分領域304に対応する画像を被写体領域として判定し、抽出する(決定工程)。また、追跡処理制御回路206は、抽出した画像を基準画像登録回路202へ出力する。また、追跡処理制御回路206は、判定した被写体領域に関する情報を、制御回路106、画像処理回路107、距離算出回路204へ出力する。ステップS508において、基準画像登録回路202は、ステップS507で抽出された被写体領域を基準として基準画像を更新する。更新された基準画像は、後続する次のフレームのテンプレートマッチング処理(ステップS504)において利用される。
In step S506, the evaluation
ステップS509において、追跡処理制御回路206は、被写体追跡処理を終了するかどうかを判定する。この判定は、画像処理装置101の電源がオフにされたかどうかに基づいて行われる。画像処理装置101の電源がオフにされていない場合、つまり追跡処理制御回路206が被写体追跡処理を終了しないと判定した場合、処理はステップS503に戻る。これにより、処理はステップS503から実行され、被写体追跡処理は継続される。これに対して、画像処理装置101の電源がオフにされた場合、つまり追跡処理制御回路206が被写体追跡処理を終了すると判定した場合、図5のフローチャートは終了する。
In step S509, the tracking
このように、画像処理装置101は、抽出された被写体領域に基づいて基準画像を順次更新していくことで、被写体の向きが変化するなど時系列的に被写体の見えが変化する場合においても、適切に被写体追跡を行うことができる。もっとも、画像処理装置101は、時系列的な被写体の見えの変化を考慮しない場合などは、基準画像を更新せず、初期に登録された基準画像を維持してもよい。
In this way, the
なお、第1実施形態では、説明および理解を容易にするため、被写体追跡処理の各処理ステップが直列的に実行されるように説明したが、並行して処理可能な処理ステップは同時に実行されてもよい。例えば、係数α、β、γを決定する処理(ステップS503)と、相関度および距離を算出する処理(ステップS504~S505)は並列処理されてもよい。 In the first embodiment, for ease of explanation and understanding, the processing steps of the subject tracking process are described as being executed serially, but processing steps that can be executed in parallel may be executed simultaneously. For example, the process of determining the coefficients α, β, and γ (step S503) and the processes of calculating the correlation degree and distance (steps S504 to S505) may be executed in parallel.
以上説明したように、第1実施形態によれば、被写体追跡装置としても機能する画像処理装置101は、追跡すべき被写体を表す基準画像と、入力画像との相関度とを用いて被写体を追跡する。その際、画像処理装置101は、相関度に加え、直近に判定された被写体領域からの距離を加味した評価値を部分領域304ごとに算出する。さらに、画像処理装置101は、相関度を求めるときのフレームレートが高い場合、評価値に距離が寄与する割合を大きくし、距離が短い部分領域304が被写体領域と判定されやすくする。また、画像処理装置101は、相関度を求めるときのフレームレートが低い場合、評価値に距離が寄与する割合を小さくし、相関度の高い部分領域304が被写体領域と判定されやすくする。そのため、画像処理装置101では、被写体の動きが速い場合にも精度よく被写体を検出することができ、安定した被写体追跡が可能となる。このようにして、画像処理装置101は、被写体追跡の精度を向上させる。
As described above, according to the first embodiment, the
<第2実施形態>
以下、図6および図7を参照して、第2実施形態について説明する。ここでは、第1実施形態との差異を中心に説明する。なお、第1実施形態で説明した、図1の画像処理装置101の概略構成、図2の被写体追跡回路111は、第2実施形態に係わる画像処理装置101においても同様である。
Second Embodiment
The second embodiment will be described below with reference to Fig. 6 and Fig. 7. Here, the differences from the first embodiment will be mainly described. Note that the schematic configuration of the
第2実施形態における被写体検出回路201は、既知の機械学習で獲得した辞書データを用いて被写体の検出を行う被写体検出回路である。被写体検出回路201が機械学習で獲得した辞書データを用いて被写体の検出を行うために画像中の被写体を学習、認識する際は、深層学習と呼ばれる手法が使用される。深層学習の代表的な手法としては、コンボリューショナル・ニューラル・ネットワーク(以下、CNNと記す)と呼ばれる手法がある。一般的なCNNは、多段階の演算からなる。CNNは、各段階において、畳み込み演算を行って画像の局所の特徴を空間的に統合し、次の段階の中間層のニューロンへ入力する。さらに、CNNは、プーリングやサブサンプリングと呼ばれる、特徴量を空間方向へ圧縮する操作を行う。CNNは、このような多段階の特徴変換を通じて複雑な特徴表現を獲得することができる。そのため、CNNは、特徴量に基づいて画像中の被写体のカテゴリ認識や被写体検出を高精度に行うことができる。CNNに代表される機械学習では、画像信号と教師信号がセットとして学習される。学習の結果、被写体検出の処理パラメータである辞書データが生成される。辞書データは、例えば、人物や、車、飛行機などの乗り物、犬、鳥などの動物など種々存在する。CNNは、辞書データを他の辞書データに切り替えることで、目的とする被写体を検出する。
The
図6は、第2実施形態における距離とゲイン(GAIN)の関係を示す図である。図6(a)は、初期状態の距離とゲイン(GAIN)の関係を示す図である。初期状態では、検出した被写体が人の場合を想定している。図6(a)は、図4(a)と同じであるため、説明は省略する。図6(b)は、検出した被写体が車や飛行機の場合の距離とゲイン(GAIN)の関係を示す図である。α=30、β=90、γ=0.015としている。α=30とすることで、図6(a)の初期状態と比較して、GAINが1.0になる距離範囲を1.5倍にしている。また、β=90とすることで、図6(a)の初期状態と比較して、GAINが0.1になる距離範囲も1.5倍にしている。これは、車や飛行機という被写体が人と比較して相対的に高速に移動することが考えられるためである。 Figure 6 is a diagram showing the relationship between distance and gain (GAIN) in the second embodiment. Figure 6 (a) is a diagram showing the relationship between distance and gain (GAIN) in the initial state. In the initial state, it is assumed that the detected subject is a person. Since Figure 6 (a) is the same as Figure 4 (a), the description will be omitted. Figure 6 (b) is a diagram showing the relationship between distance and gain (GAIN) when the detected subject is a car or an airplane. α = 30, β = 90, γ = 0.015. By setting α = 30, the distance range where GAIN is 1.0 is 1.5 times larger than the initial state of Figure 6 (a). Also, by setting β = 90, the distance range where GAIN is 0.1 is 1.5 times larger than the initial state of Figure 6 (a). This is because it is considered that subjects such as cars and airplanes move relatively faster than people.
なお、検出した被写体と係数α、β、γの具体的な関係は、あらかじめ実験的に求めておくことが可能である。評価値算出回路205は、検出した被写体と係数α、β、γとを対応付けたテーブルを有していてもよいし、検出した被写体に紐づく値を代入すれば係数α、β、γが得られる関数式を有していてもよい。
The specific relationship between the detected object and the coefficients α, β, and γ can be experimentally determined in advance. The evaluation
図7は、第2実施形態における被写体追跡処理を示すフローチャートである。図7の処理(画像処理装置の制御方法)は、追跡処理制御回路206のCPU(コンピュータ)がROMに記憶されたプログラムをRAMに展開して実行し、被写体検出回路201から評価値算出回路205を制御することで実現される。ステップS701において、被写体検出回路201(検出手段)は、フレームt=0における入力画像を読み込み、上述したように機械学習に基づく辞書データを用いて被写体およびその種類の検出を行い、被写体領域を抽出し、被写体検出結果を得る。ステップS702において、追跡処理制御回路206は、ステップS701の被写体検出結果から初期の基準画像を生成し、基準画像登録回路202に登録する(登録工程)。
Figure 7 is a flowchart showing the subject tracking process in the second embodiment. The process in Figure 7 (control method of the image processing device) is realized by the CPU (computer) of the tracking
ステップS703において、評価値算出回路205(変化手段)は、ステップS701で検出した被写体の種類に応じて評価値に距離が寄与する度合いを決定する(変化工程)。具体的には、評価値算出回路205は、式(5)のGAINを算出するために、係数α、β、γを決定する。ステップS704において、相関度算出回路203は、次のフレームt=1における入力画像を読み込む。さらに、相関度算出回路203は、入力画像の部分領域304と、フレームt=0の入力画像において登録された基準画像とのテンプレートマッチング処理を行い、基準画像との相関度を算出する(相関算出工程)。ステップS705において、距離算出回路204は、相関度を求めた位置と基準位置との距離を算出する(距離算出工程)。基準位置は、直近に判定された被写体領域の位置(すなわち、基準画像を抽出した入力画像における基準画像の位置)とする。
In step S703, the evaluation value calculation circuit 205 (changing means) determines the degree to which the distance contributes to the evaluation value according to the type of subject detected in step S701 (changing process). Specifically, the evaluation
ステップS706において、評価値算出回路205は、ステップS704で算出された相関度、ステップS705で算出された距離、およびステップS703で決定された係数α、β、γを用い、式(5)に基づいて評価値を算出する(評価算出工程)。ステップS707において、追跡処理制御回路206は、入力画像のうち、評価値が最大となった部分領域304に対応する画像を被写体領域として判定し、抽出する(決定工程)。また、追跡処理制御回路206は、抽出した画像を基準画像登録回路202へ出力する。また、追跡処理制御回路206は、判定した被写体領域に関する情報を、制御回路106、画像処理回路107、距離算出回路204へ出力する。ステップS708において、基準画像登録回路202は、ステップS707で抽出された被写体領域を基準として基準画像を更新する。更新された基準画像は、後続する次のフレームのテンプレートマッチング処理(ステップS704)において利用される。
In step S706, the evaluation
ステップS709において、追跡処理制御回路206は、被写体追跡処理を終了するかどうかを判定する。この判定は、画像処理装置101の電源がオフにされたかどうかに基づいて行われる。画像処理装置101の電源がオフにされていない場合、つまり追跡処理制御回路206が被写体追跡処理を終了しないと判定した場合、処理はステップS703に戻る。これにより、処理はステップS703から実行され、被写体追跡処理は継続される。これに対して、画像処理装置101の電源がオフにされた場合、つまり追跡処理制御回路206が被写体追跡処理を終了すると判定した場合、図7のフローチャートは終了する。
In step S709, the tracking
このように、画像処理装置101は、抽出された被写体領域に基づいて基準画像を順次更新していくことで、被写体の向きが変化するなど時系列的に被写体の見えが変化する場合においても、適切に被写体追跡を行うことができる。もっとも、画像処理装置101は、時系列的な被写体の見えの変化を考慮しない場合などは、基準画像を更新せず、初期に登録された基準画像を維持してもよい。
In this way, the
なお、第2実施形態では、説明および理解を容易にするため、被写体追跡処理の各処理ステップが直列的に実行されるように説明したが、並行して処理可能な処理ステップは同時に実行してもよい。例えば、係数α、β、γを決定する処理(ステップS703)と、相関度および距離を算出する処理(ステップS704~S705)は並列処理されてもよい。 In the second embodiment, for ease of explanation and understanding, the processing steps of the subject tracking process are described as being executed serially, but processing steps that can be executed in parallel may be executed simultaneously. For example, the process of determining the coefficients α, β, and γ (step S703) and the processes of calculating the correlation degree and distance (steps S704 to S705) may be executed in parallel.
以上説明したように、第2実施形態によれば、被写体追跡装置としても機能する画像処理装置101は、追跡すべき被写体を表す基準画像と、入力画像との相関度とを用いて被写体を追跡する。その際、画像処理装置101は、相関度に加え、直近に判定された被写体領域からの距離を加味した評価値を部分領域304ごとに算出する。さらに、画像処理装置101は、機械学習に基づく辞書データを用いた被写体およびその種類の検出を行い、検出された被写体が例えば人の場合、評価値に距離が寄与する割合を大きくし、距離が短い部分領域304が被写体領域と判定されやすくする。また、画像処理装置101は、検出された被写体が例えば車や飛行機の場合、評価値に距離が寄与する割合を小さくし、相関度の高い部分領域304が被写体領域と判定されやすくする。そのため、画像処理装置101では、被写体の動きが速い場合にも精度よく被写体を検出することができ、安定した被写体追跡が可能となる。このようにして、画像処理装置101は、被写体追跡の精度を向上させる。
As described above, according to the second embodiment, the
<第3の実施形態>
以下、図8および図9を参照して、第3実施形態について説明する。ここでは、第1実施形態との差異を中心に説明する。なお、第1実施形態で説明した、図1の画像処理装置101の概略構成は、第3実施形態に係わる画像処理装置101においても同様である。第3実施形態において、画像処理装置101は、過去の被写体の速度を記憶しておき、その被写体の速度に応じて評価値に距離が寄与する度合いを決定する。
Third Embodiment
The third embodiment will be described below with reference to Fig. 8 and Fig. 9. The differences from the first embodiment will be mainly described. The schematic configuration of the
図8は、被写体追跡回路111のブロック図である。被写体追跡回路111は、被写体検出回路801、基準画像登録回路802、相関度算出回路803、距離算出回路804、評価値算出回路805、追跡処理制御回路806、および速度記憶回路807により構成される。ここで、801から806は、図2の201から206と同じであるため、説明は省略する。速度記憶回路807(速度記憶手段)は、直前に決定された被写体の速度を記憶しておく回路である。なお、被写体の速度は、例えば、現在のフレームをnとすると、n-2の被写体領域(基準位置)からn-1の被写体領域(基準位置)の差である距離と、フレームレートから算出することができる。
Figure 8 is a block diagram of the
また、第2実施形態における距離とゲイン(GAIN)の関係は、第3実施形態における距離とゲイン(GAIN)の関係に相当する。つまり、図6(a)は、算出した被写体の速度が小さい場合の距離とゲイン(GAIN)の関係を示す図に相当する。図6(b)は、算出した被写体の速度が大きい場合の距離とゲイン(GAIN)の関係を示す図に相当する。 The relationship between distance and gain (GAIN) in the second embodiment corresponds to the relationship between distance and gain (GAIN) in the third embodiment. That is, FIG. 6(a) corresponds to a diagram showing the relationship between distance and gain (GAIN) when the calculated speed of the subject is low. FIG. 6(b) corresponds to a diagram showing the relationship between distance and gain (GAIN) when the calculated speed of the subject is high.
なお、算出した被写体の速度と係数α、β、γの具体的な関係は、あらかじめ実験的に求めておくことが可能である。評価値算出回路205は、算出した被写体の速度と係数α、β、γとを対応付けたテーブルを有していてもよいし、算出した被写体の速度に紐づく値を代入すれば係数α、β、γが得られる関数式を有していてもよい。
The specific relationship between the calculated subject speed and the coefficients α, β, and γ can be experimentally determined in advance. The evaluation
図9は、第3実施形態における被写体追跡処理を示すフローチャートである。図9の処理(画像処理装置の制御方法)は、追跡処理制御回路806のCPU(コンピュータ)がROMに記憶されたプログラムをRAMに展開して実行し、被写体検出回路801から評価値算出回路805、速度記憶回路807を制御することで実現される。ステップS901において、被写体検出回路801は、フレームt=0における入力画像を読み込み、例えば顔検出処理といった被写体検出処理を行って、被写体領域を抽出し、被写体検出結果を得る。ステップS902において、追跡処理制御回路806は、ステップS901の被写体検出結果から初期の基準画像を生成し、基準画像登録回路802に登録する(登録工程)。
Figure 9 is a flowchart showing the subject tracking process in the third embodiment. The process in Figure 9 (control method of the image processing device) is realized by the CPU (computer) of the tracking
ステップS903において、評価値算出回路805(変化手段)は、速度記憶回路807に記憶された被写体の速度に応じて、評価値に距離が寄与する度合いを決定する(変化工程)。具体的には、評価値算出回路805は、式(5)のGAINを算出するために、係数α、β、γを決定する。なお、被写体の速度は、上述したように、現在のフレームをnとすると、n-2の被写体領域(基準位置)からn-1の被写体領域(基準位置)の差である距離と、フレームレートとから算出される。但し、t=1のときの、被写体の速度は、所定値(例えば、0)とされる。ステップS904において、相関度算出回路803は、次のフレームt=1における入力画像を読み込む。さらに、相関度算出回路803は、入力画像の部分領域304と、フレームt=0の入力画像において登録された基準画像とのテンプレートマッチング処理を行い、基準画像との相関度を算出する(相関算出工程)。
In step S903, the evaluation value calculation circuit 805 (changing means) determines the degree to which the distance contributes to the evaluation value according to the speed of the subject stored in the speed memory circuit 807 (changing process). Specifically, the evaluation
ステップS905において、距離算出回路804は、相関度を求めた位置と基準位置との距離を算出する(距離算出工程)。基準位置は、直近に判定された被写体領域の位置(すなわち、基準画像を抽出した入力画像における基準画像の位置)とする。ステップS906において、評価値算出回路805は、ステップS904で算出された相関度、ステップS905で算出された距離、およびステップS903で決定された係数α、β、γを用い、式(5)に基づいて評価値を算出する(評価算出工程)。ステップS907において、追跡処理制御回路806は、入力画像のうち、評価値が最大となった部分領域304に対応する画像を被写体領域として判定し、抽出する(決定工程)。また、追跡処理制御回路806は、抽出した画像を基準画像登録回路802へ出力する。また、追跡処理制御回路806は、判定した被写体領域に関する情報を、制御回路106、画像処理回路107、距離算出回路804へ出力する。
In step S905, the
ステップS908において、追跡処理制御回路806は、ステップS907の判定、抽出の対象とされた被写体領域の速度、つまり被写体の速度を算出し、速度記憶回路807に記憶する。記憶された被写体の速度は、後続する次のフレームのステップS903の処理において利用することができる。ステップS909において、基準画像登録回路802は、ステップS907で抽出された被写体領域を基準として基準画像を更新する。更新された基準画像は、後続する次のフレームのテンプレートマッチング処理(ステップS904)において利用される。
In step S908, the tracking
ステップS910において、追跡処理制御回路806は、被写体追跡処理を終了するかどうかを判定する。この判定は、画像処理装置101の電源がオフにされたかどうかに基づいて行われる。画像処理装置101の電源がオフにされていない場合、つまり追跡処理制御回路806が被写体追跡処理を終了しないと判定した場合、処理はステップS903に戻る。これにより、処理はステップS903から実行され、被写体追跡処理は継続される。これに対して、画像処理装置101の電源がオフにされた場合、つまり追跡処理制御回路806が被写体追跡処理を終了すると判定した場合、図9のフローチャートは終了する。
In step S910, the tracking
このように、画像処理装置101は、抽出された被写体領域に基づいて基準画像を順次更新していくことで、被写体の向きが変化するなど時系列的に被写体の見えが変化する場合においても、適切に被写体追跡を行うことができる。もっとも、画像処理装置101は、時系列的な被写体の見えの変化を考慮しない場合などは、基準画像を更新せず、初期に登録された基準画像を維持してもよい。
In this way, the
なお、第3実施形態では、説明および理解を容易にするため、被写体追跡処理の各処理ステップが直列的に実行されるように説明したが、並行して処理可能な処理ステップは同時に実行してもよい。例えば、係数α、β、γを決定する処理(ステップS903)と、相関度および距離を算出する処理(ステップS904~S905)は並列処理されてもよい。 In the third embodiment, for ease of explanation and understanding, the processing steps of the subject tracking process are described as being executed serially, but processing steps that can be executed in parallel may be executed simultaneously. For example, the process of determining the coefficients α, β, and γ (step S903) and the processes of calculating the correlation degree and distance (steps S904 to S905) may be executed in parallel.
以上説明したように、第3実施形態によれば、被写体追跡装置としても機能する画像処理装置101は、追跡すべき被写体を表す基準画像と、入力画像との相関度とを用いて被写体を追跡する。その際、画像処理装置101は、相関度に加え、直近に判定された被写体領域からの距離を加味した評価値を部分領域304ごとに算出する。さらに、画像処理装置101は、過去の被写体の速度を記憶しておき、その速度が小さい場合、評価値に距離が寄与する割合を大きくし、距離が短い部分領域304が被写体領域と判定されやすくする。また、画像処理装置101は、過去の速度が大きい場合、評価値に距離が寄与する割合を小さくし、相関度の高い部分領域304が被写体領域と判定されやすくする。そのため、画像処理装置101では、被写体の動きが速い場合にも精度よく被写体を検出することができ、安定した被写体追跡が可能となる。このようにして、画像処理装置101は、被写体追跡の精度を向上させる。
As described above, according to the third embodiment, the
なお、入力画像で被写体が占める割合(以下、「被写体の面積」という)が大きい場合、例えば、被写体が拡大されて撮影された場合、フレーム間で被写体が大きく移動する可能性があるので、第3実施形態における被写体の速度と同様に考えることができる。つまり、第3実施形態における被写体の速度の大小は、被写体の面積の大小を含む概念として扱うことが可能である。 Note that if the proportion of the subject in the input image (hereinafter referred to as "subject area") is large, for example if the subject is photographed enlarged, the subject may move significantly between frames, and this can be considered similar to the subject speed in the third embodiment. In other words, the speed of the subject in the third embodiment can be treated as a concept that includes the area of the subject.
<他の実施形態>
以上、本発明の好ましい実施形態について説明したが、本発明は上述した各実施形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。本発明は、上述の各実施形態の1以上の機能を実現するプログラムを、ネットワークや記録媒体を介してシステムや装置に供給し、そのシステムまたは装置のコンピュータの1つ以上のプロセッサがプログラムを読み出して実行する処理でも実現可能である。また、本発明は、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other embodiments>
Although the preferred embodiments of the present invention have been described above, the present invention is not limited to the above-mentioned embodiments, and various modifications and changes are possible within the scope of the gist of the present invention. The present invention can also be realized by supplying a program that realizes one or more functions of the above-mentioned embodiments to a system or device via a network or a recording medium, and having one or more processors of a computer in the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.
また、図中の機能ブロックは、ハードウェア、ソフトウェア又はそれらの組み合わせによって実現可能であるが、機能ブロックとそれを実現する構成とは1対1に対応する必要はない。複数の機能ブロックを1つのソフトウェア又はハードウェアモジュールで実現してもよい。 Furthermore, the functional blocks in the diagram can be realized by hardware, software, or a combination of both, but there is no need for a one-to-one correspondence between the functional blocks and the configuration that realizes them. Multiple functional blocks may be realized by a single software or hardware module.
上述の各実施形態では、被写体追跡の一例として画像処理装置101を説明した。しかし、上述の通り、本発明は画像処理装置以外にも多様な機器に適用可能である。例えば、本発明が画像データの再生表示装置に適用された場合、画像データの再生表示装置は、画像データ中の被写体領域の情報(画像中の被写体の位置、大きさなど)を用いて、画像データの再生条件や表示条件を設定するといった応用が可能である。具体的には、画像データの再生表示装置は、画像中の被写体の位置に枠などの被写体を示す情報の重畳表示や、被写体部分の輝度や色情報に応じて、被写体部分が適切に表示されるように、輝度や色合いなどの表示条件を制御することができる。
In each of the above-described embodiments, the
各実施形態の開示は、以下の構成、方法およびプログラムを含む。
(構成1) 逐次供給される複数の入力画像に亘って特定の被写体を追跡する画像処理装置であって、
前記特定の被写体に対応する基準画像を登録する登録手段と、
前記入力画像に設定される複数の部分領域の各々について前記基準画像との相関度を求める相関算出手段と、
前記複数の部分領域の各々について前記入力画像内の所定の基準位置からの距離を算出する距離算出手段と、
前記複数の部分領域の各々について前記相関度と前記距離とを用いて評価値を算出する評価算出手段と、
前記評価値に基づいて前記複数の部分領域の各々のうち前記特定の被写体を含む領域を決定する決定手段と、
前記評価算出手段が前記評価値を算出する際に前記距離が前記評価値に寄与する度合いを、前記相関算出手段で前記相関度を求めるときのフレームレート、前記特定の被写体の種類、または前記特定の被写体の速度に応じて変化させる変化手段と、を備えることを特徴とする画像処理装置。
(構成2) 前記変化手段は、前記逐次供給される前記入力画像のレートを、前記相関算出手段で前記相関度を求めるときのフレームレートとして扱うことを特徴とする構成1に記載の画像処理装置。
(構成3) 前記変化手段は、前記逐次供給される前記入力画像を周期的に間引いたレートを、前記相関算出手段で前記相関度を求めるときのフレームレートとして扱うことを特徴とする構成1に記載の画像処理装置。
(構成4) 機械学習によって獲得された辞書データを参照することによって、前記特定の被写体および前記特定の被写体の種類を初期の前記入力画像から検出する検出手段を備えることを特徴とする構成1に記載の画像処理装置。
(構成5) 前記入力画像における前記特定の被写体の速度を記憶する速度記憶手段を備え、
前記変化手段は、後続して入力された前記入力画像に設定される前記複数の部分領域の各々について前記評価算出手段が前記評価値を算出する際に前記距離が前記評価値に寄与する度合いを、前記速度記憶手段で記憶された前記特定の被写体の速度に応じて変化させることを特徴とする構成1に記載の画像処理装置。
(方法1) 逐次供給される複数の入力画像に亘って特定の被写体を追跡する画像処理装置の制御方法であって、
前記特定の被写体に対応する基準画像を登録する登録工程と、
前記入力画像に設定される複数の部分領域の各々について前記基準画像との相関度を求める相関算出工程と、
前記複数の部分領域の各々について前記入力画像内の所定の基準位置からの距離を算出する距離算出工程と、
前記複数の部分領域の各々について前記相関度と前記距離とを用いて評価値を算出する評価算出工程と、
前記評価値に基づいて前記複数の部分領域の各々のうち前記特定の被写体を含む領域を決定する決定工程と、
前記評価算出工程が前記評価値を算出する際に前記距離が前記評価値に寄与する度合いを、前記相関算出工程で前記相関度を求めるときのフレームレート、前記特定の被写体の種類、または前記特定の被写体の速度に応じて変化させる変化工程と、を備えることを特徴とする画像処理装置の制御方法。
(プログラム1) 構成1乃至5のいずれか一項に記載の画像処理装置の各手段をコンピュータに実行させるためのプログラム。
The disclosure of each embodiment includes the following configurations, methods, and programs.
(Configuration 1) An image processing device for tracking a specific subject across a plurality of input images that are sequentially supplied, comprising:
a registration means for registering a reference image corresponding to the specific subject;
a correlation calculation means for calculating a degree of correlation between the input image and the reference image for each of a plurality of partial regions set in the input image;
a distance calculation means for calculating a distance from a predetermined reference position in the input image to each of the plurality of partial regions;
an evaluation calculation means for calculating an evaluation value for each of the plurality of partial regions using the degree of correlation and the distance;
a determining means for determining an area including the specific subject among the plurality of partial areas based on the evaluation value;
and a change means for changing the degree to which the distance contributes to the evaluation value when the evaluation calculation means calculates the evaluation value, depending on a frame rate, a type of the specific subject, or a speed of the specific subject when the correlation calculation means calculates the correlation degree.
(Configuration 2) The image processing apparatus according to configuration 1, wherein the changing means treats the rate of the input images successively supplied as a frame rate when the correlation calculation means calculates the degree of correlation.
(Configuration 3) The image processing device according to configuration 1, wherein the changing means treats a rate at which the successively supplied input images are periodically thinned out as a frame rate when the correlation calculation means calculates the degree of correlation.
(Configuration 4) The image processing device according to Configuration 1, further comprising a detection means for detecting the specific subject and a type of the specific subject from the initial input image by referring to dictionary data acquired by machine learning.
(Configuration 5) A speed storage means for storing the speed of the specific object in the input image,
The image processing device described in configuration 1, characterized in that the change means changes the degree to which the distance contributes to the evaluation value when the evaluation calculation means calculates the evaluation value for each of the multiple partial areas set in the subsequently input input image, in accordance with the speed of the specific subject stored in the speed storage means.
(Method 1) A method for controlling an image processing device that tracks a specific subject across a plurality of input images that are sequentially supplied, comprising the steps of:
a registration step of registering a reference image corresponding to the specific subject;
a correlation calculation step of calculating a correlation degree between the reference image and each of a plurality of partial regions set in the input image;
a distance calculation step of calculating a distance from a predetermined reference position in the input image to each of the plurality of partial regions;
an evaluation calculation step of calculating an evaluation value for each of the plurality of partial regions using the correlation degree and the distance;
a determining step of determining an area including the specific subject among each of the plurality of partial areas based on the evaluation value;
a change step of changing the degree to which the distance contributes to the evaluation value when the evaluation calculation step calculates the evaluation value, depending on the frame rate, the type of the specific subject, or the speed of the specific subject when the correlation degree is calculated in the correlation calculation step.
(Program 1) A program for causing a computer to execute each unit of the image processing device according to any one of configurations 1 to 5.
101 画像処理装置
202、802 基準画像登録回路(登録手段)
203、803 相関度算出回路(相関算出手段)
204、804 距離算出回路(距離算出手段)
205、805 評価値算出回路(評価算出手段)(変化手段)
206、806 追跡処理制御回路(決定手段)
301 テンプレート(基準画像)
303 探索画像(入力画像)
304 部分領域
101
203, 803 Correlation degree calculation circuit (correlation calculation means)
204, 804 Distance calculation circuit (distance calculation means)
205, 805 Evaluation value calculation circuit (evaluation calculation means) (changing means)
206, 806 Tracking processing control circuit (determination means)
301 Template (reference image)
303 Search image (input image)
304 Partial Area
Claims (7)
前記特定の被写体に対応する基準画像を登録する登録手段と、
前記入力画像に設定される複数の部分領域の各々について前記基準画像との相関度を求める相関算出手段と、
前記複数の部分領域の各々について前記入力画像内の所定の基準位置からの距離を算出する距離算出手段と、
前記複数の部分領域の各々について前記相関度と前記距離とを用いて評価値を算出する評価算出手段と、
前記評価値に基づいて前記複数の部分領域の各々のうち前記特定の被写体を含む領域を決定する決定手段と、
前記評価算出手段が前記評価値を算出する際に前記距離が前記評価値に寄与する度合いを、前記相関算出手段で前記相関度を求めるときのフレームレート、前記特定の被写体の種類、または前記特定の被写体の速度に応じて変化させる変化手段と、を備えることを特徴とする画像処理装置。 1. An image processing device for tracking a particular subject across a plurality of input images provided sequentially, comprising:
a registration means for registering a reference image corresponding to the specific subject;
a correlation calculation means for calculating a degree of correlation between the input image and the reference image for each of a plurality of partial regions set in the input image;
a distance calculation means for calculating a distance from a predetermined reference position in the input image to each of the plurality of partial regions;
an evaluation calculation means for calculating an evaluation value for each of the plurality of partial regions using the degree of correlation and the distance;
a determining means for determining an area including the specific subject among the plurality of partial areas based on the evaluation value;
and a change means for changing the degree to which the distance contributes to the evaluation value when the evaluation calculation means calculates the evaluation value, depending on a frame rate, a type of the specific subject, or a speed of the specific subject when the correlation calculation means calculates the correlation degree.
前記変化手段は、後続して入力された前記入力画像に設定される前記複数の部分領域の各々について前記評価算出手段が前記評価値を算出する際に前記距離が前記評価値に寄与する度合いを、前記速度記憶手段で記憶された前記特定の被写体の速度に応じて変化させることを特徴とする請求項1に記載の画像処理装置。 a velocity storage means for storing a velocity of the specific object in the input image;
The image processing device according to claim 1, characterized in that the change means changes the degree to which the distance contributes to the evaluation value when the evaluation calculation means calculates the evaluation value for each of the multiple partial regions set in the subsequently input input image, in accordance with the speed of the specific subject stored in the speed storage means.
前記特定の被写体に対応する基準画像を登録する登録工程と、
前記入力画像に設定される複数の部分領域の各々について前記基準画像との相関度を求める相関算出工程と、
前記複数の部分領域の各々について前記入力画像内の所定の基準位置からの距離を算出する距離算出工程と、
前記複数の部分領域の各々について前記相関度と前記距離とを用いて評価値を算出する評価算出工程と、
前記評価値に基づいて前記複数の部分領域の各々のうち前記特定の被写体を含む領域を決定する決定工程と、
前記評価算出工程が前記評価値を算出する際に前記距離が前記評価値に寄与する度合いを、前記相関算出工程で前記相関度を求めるときのフレームレート、前記特定の被写体の種類、または前記特定の被写体の速度に応じて変化させる変化工程と、を備えることを特徴とする画像処理装置の制御方法。 1. A method for controlling an image processing device for tracking a specific subject across a plurality of input images that are sequentially supplied, comprising:
a registration step of registering a reference image corresponding to the specific subject;
a correlation calculation step of calculating a degree of correlation between the input image and the reference image for each of a plurality of partial regions set in the input image;
a distance calculation step of calculating a distance from a predetermined reference position in the input image to each of the plurality of partial regions;
an evaluation calculation step of calculating an evaluation value for each of the plurality of partial regions using the correlation degree and the distance;
a determining step of determining an area including the specific subject among each of the plurality of partial areas based on the evaluation value;
a change step of changing the degree to which the distance contributes to the evaluation value when the evaluation calculation step calculates the evaluation value, depending on the frame rate, the type of the specific subject, or the speed of the specific subject when the correlation degree is calculated in the correlation calculation step.
2. A program for causing a computer to execute each of the means of the image processing apparatus according to claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022163309A JP2024056441A (en) | 2022-10-11 | 2022-10-11 | Image processing device, method and program for controlling the image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022163309A JP2024056441A (en) | 2022-10-11 | 2022-10-11 | Image processing device, method and program for controlling the image processing device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2024056441A true JP2024056441A (en) | 2024-04-23 |
Family
ID=90749158
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022163309A Pending JP2024056441A (en) | 2022-10-11 | 2022-10-11 | Image processing device, method and program for controlling the image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2024056441A (en) |
-
2022
- 2022-10-11 JP JP2022163309A patent/JP2024056441A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102574141B1 (en) | Image display method and device | |
CN113286194A (en) | Video processing method and device, electronic equipment and readable storage medium | |
JP6049448B2 (en) | Subject area tracking device, control method thereof, and program | |
US10013632B2 (en) | Object tracking apparatus, control method therefor and storage medium | |
US20200412982A1 (en) | Laminated image pickup device, image pickup apparatus, image pickup method, and recording medium recorded with image pickup program | |
WO2020171379A1 (en) | Capturing a photo using a mobile device | |
JP2010114752A (en) | Device and method of imaging and program | |
JP2009123081A (en) | Face detection method and photographing apparatus | |
JP2021128537A (en) | Image processing device, image processing method, program and storage medium | |
JP2011071925A (en) | Mobile tracking apparatus and method | |
JP5167236B2 (en) | Subject tracking device and control method thereof | |
JP2021071794A (en) | Main subject determination device, imaging device, main subject determination method, and program | |
JP2021132362A (en) | Subject tracking device, subject tracking method, computer program, and storage medium | |
JP5539565B2 (en) | Imaging apparatus and subject tracking method | |
JP6087615B2 (en) | Image processing apparatus and control method therefor, imaging apparatus, and display apparatus | |
JP6555940B2 (en) | Subject tracking device, imaging device, and method for controlling subject tracking device | |
JP5451364B2 (en) | Subject tracking device and control method thereof | |
JP2024056441A (en) | Image processing device, method and program for controlling the image processing device | |
JP2016081095A (en) | Subject tracking device, control method thereof, image-capturing device, display device, and program | |
JP5222429B2 (en) | Subject tracking device and control method thereof | |
WO2023106103A1 (en) | Image processing device and control method for same | |
JP5247419B2 (en) | Imaging apparatus and subject tracking method | |
CN113691731B (en) | Processing method and device and electronic equipment | |
JP2014216694A (en) | Tracking pan head device with resolution increase processing | |
JP2013157675A (en) | Imaging device, method for controlling the same, program, and storage medium |