JP6062483B2 - Digital camera - Google Patents
Digital camera Download PDFInfo
- Publication number
- JP6062483B2 JP6062483B2 JP2015095681A JP2015095681A JP6062483B2 JP 6062483 B2 JP6062483 B2 JP 6062483B2 JP 2015095681 A JP2015095681 A JP 2015095681A JP 2015095681 A JP2015095681 A JP 2015095681A JP 6062483 B2 JP6062483 B2 JP 6062483B2
- Authority
- JP
- Japan
- Prior art keywords
- frame image
- unit
- image
- area
- search
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、デジタルカメラに関する。 The present invention relates to a digital camera.
近年の光学カメラ付機器では、予め登録された顔画像などのオブジェクトを追跡処理し、その位置情報を出力することで、オートフォーカスなどの用途に利用されている。 2. Description of the Related Art In recent optical camera-equipped devices, an object such as a face image registered in advance is tracked and the position information is output, so that it is used for applications such as autofocus.
カメラのズームの変化によってオブジェクトのサイズが変化した場合に、オブジェクトの追跡処理を可能とする技術が特許文献1(特開2008−287648号公報)および特許文献2(特開2001−243476号公報)に開示されている。 Patent Document 1 (Japanese Patent Laid-Open No. 2008-287648) and Patent Document 2 (Japanese Patent Laid-Open No. 2001-243476) are technologies that enable object tracking processing when the size of an object changes due to a change in camera zoom. Is disclosed.
特許文献1では、サイズが変化するオブジェクトを追跡するため、基本となるテンプレート画像を拡大・縮小して倍率を変えた複数のテンプレート画像と、撮影画像とのマッチングを行なう。
In
特許文献2では、基本となるテンプレート画像を拡大・縮小した複数のテンプレート画像からズーム倍率に応じたテンプレート画像を選択して、撮影画像とのマッチングを行なう。
In
しかしながら、特許文献1では、サイズの変化するオブジェクト追跡に対応するために、複数のテンプレート画像とのマッチングが必要となり、処理負荷が大きくなるという問題点がある。
However,
特許文献2では、ズーム倍率に応じた1つのテンプレート画像でカメラ画像とのマッチングを行なうので、特許文献1よりも高速化が可能であるが、複数の倍率のテンプレート画像を作成して記憶しておく必要がある。また、ズームによって撮影画像が拡大した場合に、画素数が増加したテンプレート画像を用いてマッチングを行なうので、マッチングに時間を要することになる。
In
それゆえに、本発明の目的は、ズーム処理によって対象オブジェクトのサイズが変化しても、高速かつ高精度に対象オブジェクトを追跡することができるデジタルカメラを提供することである。 Therefore, an object of the present invention is to provide a digital camera that can track a target object at high speed and with high accuracy even if the size of the target object changes due to zoom processing.
本発明の一実施形態のオブジェクト追跡方法は、フレーム画像に含まれるオブジェクトを追跡するオブジェクト追跡方法であって、記憶部が、追跡対象のオブジェクトのテンプレート画像を記憶し、画像入力部が、時系列でフレーム画像を入力し、探索領域設定部が、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と異なる場合には、前時点のフレーム画像におけるオブジェクト領域、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、現時点のフレーム画像におけるオブジェクトの探索領域を設定し、正規化部が、現時点のフレーム画像に含まれるオブジェクトの探索領域の画像を固定サイズに正規化し、マッチング部が、正規化された探索領域の画像の中から、テンプレート画像と類似するオブジェクト領域を検索することを特徴とする。 An object tracking method according to an embodiment of the present invention is an object tracking method for tracking an object included in a frame image, in which a storage unit stores a template image of an object to be tracked, and an image input unit includes a time series. When the zoom region of the current frame image is different from the zoom factor of the previous frame image, the search region setting unit determines that the object region in the previous frame image and the previous frame image Based on the center coordinates of the zoom, the ratio of the zoom magnification of the previous frame image to the zoom magnification of the current frame image, the search area of the object in the current frame image is set, and the normalization unit sets the current frame image Normalize the image of the search area of the object contained in the And from the image of the normalized search area, characterized by searching for objects area similar to the template image.
本発明の一実施形態によれば、ズーム処理によって対象オブジェクトのサイズが変化しても、高速かつ高精度に対象オブジェクトを追跡することができる。 According to an embodiment of the present invention, even if the size of the target object changes due to zoom processing, the target object can be tracked at high speed and with high accuracy.
以下、本発明の実施形態について図面を参照して説明する。
[第1の実施形態]
(デジタルスチルカメラ)
図1は、本発明の実施の形態におけるデジタルカメラの構成例を示すブロック図である。本発明の実施形態では、検出および追跡対象のオブジェクトとして顔を例にして説明するが、本発明の実施形態の手法は、顔に限定されるものではなく、その他のオブジェクトの検出および追跡にも用いることができる。
Embodiments of the present invention will be described below with reference to the drawings.
[First Embodiment]
(Digital still camera)
FIG. 1 is a block diagram illustrating a configuration example of a digital camera according to an embodiment of the present invention. In the embodiment of the present invention, a face is described as an example of an object to be detected and tracked. However, the method of the embodiment of the present invention is not limited to a face, and the detection and tracking of other objects are also performed. Can be used.
図1を参照して、このデジタルカメラは半導体装置を有し、半導体装置は、カメラI/F(Interface)1001と、CPU(Central Processing Unit)1002と、SDRAM(Synchronous Dynamic Random Access Memory)1003と、ROM(Read Only Memory)1004と、ユーザ操作部I/F1005と、LCDI/F1007と、カードI/F1008と、オブジェクト検出装置1006、オブジェクト追跡装置1009とを含み、これらがバス1010を介して接続されている。オブジェクト検出装置1006、オブジェクト追跡装置1009とは画像処理装置1011を構成する。
Referring to FIG. 1, this digital camera includes a semiconductor device, which includes a camera interface (Interface) 1001, a CPU (Central Processing Unit) 1002, an SDRAM (Synchronous Dynamic Random Access Memory) 1003, and the like. ROM (Read Only Memory) 1004, user operation unit I /
カメラI/F1001は、カメラセンサに接続されており、カメラセンサによって撮像された画像を受け、SDRAM1003やカードI/F1008を介して接続される図示しないSDメモリカードなどにその画像を書き込む。
The camera I /
CPU1002は、SDRAM1003やROM1004に記憶されるプログラムを実行することによって、システム全体の制御を行なう。CPU1002は、SDRAM1003に格納された顔(オブジェクト)の位置を表わす情報を焦点合わせのためにカメラI/F1001を通じてカメラの撮像系に送る。また、CPU1002は、オブジェクト検出装置1006およびオブジェクト追跡装置1009から送られる顔(オブジェクト)の位置を表わす情報から顔の位置を表わす図形(矩形など)をLCDI/F1007に送る。
The
ROM1004は、オブジェクトの検出、オブジェクトの追跡に用いられるデータを記憶する。
The
ユーザ操作部I/F1005は、図示しないシャッターボタンなどに接続され、シャッターボタンが押されたときに、割り込みなどによってその旨をCPU1002に通知する。CPU1002は、割り込み要求を受けると、カメラI/F1001を制御してカメラセンサによって撮像された画像をSDRAM1003などに格納する。また、ユーザが図示しないズームスイッチなどを操作して、ズーム倍率を変更した場合、ユーザ操作部I/F1005を介してズーム倍率は、CPU1002に送られる。
The user operation unit I / F 1005 is connected to a shutter button (not shown) and the like, and when the shutter button is pressed, notifies the
LCDI/F1007は、図示しないLCDパネルに接続され、LCDの表示の制御などを行なう。カメラセンサによって撮影された画像をプレビューとしてLCDに表示する。また、LCDI/F1007は、CPU1002から送られた顔(オブジェクト)の位置を表わす図形を撮影された画像上に重畳表示する。
The LCD I /
カードI/F1008は、SDメモリカードなどの外部の記録媒体に接続され、記録媒体に対するデータの読み出しや書き込みを行なう。
A card I /
オブジェクト検出装置1006は、カメラセンサによって撮影されてカメラI/F1001から入力される画像から顔(オブジェクト)の検出処理を行なって、顔(オブジェクト)の位置を表わす情報をSDRAM1003に格納する。オブジェクト検出装置1006は、検出したオブジェクトの領域をテンプレートとして登録する。
The
オブジェクト追跡装置1009は、カメラセンサによって撮影されてカメラI/F1001から入力される画像においてオブジェクト検出装置1006で検出された顔(オブジェクト)の追跡処理を行なって、顔(オブジェクト)の位置を表わす情報をSDRAM1003に格納する。オブジェクト追跡装置1009は、撮影された画像から、オブジェクト検出装置で得られたテンプレートと類似する領域を検索することによって、オブジェクトの追跡を行なう。オブジェクト追跡装置1009は、CPU1002から送られる探索範囲倍率K、ズーム倍率、ズームの中心座標を受ける。オブジェクト追跡装置1009は、オブジェクト検出装置1006から追跡対象のオブジェクトのテンプレート画像、オブジェクト領域を受ける。
The
(構成)
図2は、第1の実施形態のオブジェクト追跡装置の構成を表わす図である。
(Constitution)
FIG. 2 is a diagram illustrating the configuration of the object tracking apparatus according to the first embodiment.
図2を参照して、このオブジェクト追跡装置1009は、画像入力部2と、パラメータ入力部3と、オブジェクト領域入力部4と、オブジェクト領域設定部6と、テンプレート入力部5と、テンプレート登録部7と、テンプレート記憶部8と、探索領域設定部9と、正規化部10と、マッチング部11とを備える。
Referring to FIG. 2, this
画像入力部2は、カメラI/Fから追跡対象となるオブジェクトを探索するためのフレーム画像を所定のフレームレートで受ける。ユーザによって被写体がズーム(拡大または縮小)された場合には、画像入力部2は、ズームされたフレーム画像を受ける。
The
パラメータ入力部3は、CPU1002から探索範囲倍率Kの入力を受ける。さらに、パラメータ入力部3は、ユーザによって被写体がズームされて、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率から変化した場合には、CPU1002からズーム倍率と、ズームの中心座標とを受ける。
テンプレート入力部5は、オブジェクト検出装置から出力される追跡対象のオブジェクトのテンプレート画像を受ける。 The template input unit 5 receives a template image of an object to be tracked output from the object detection device.
テンプレート記憶部8は、追跡対象のオブジェクトのテンプレート画像を記憶する。
テンプレート登録部7は、テンプレート入力部5に入力されたテンプレート画像を初期テンプレートとしてテンプレート記憶部8に記憶する。テンプレート登録部7は、マッチング部11によって特定されたオブジェクト領域の画像でテンプレート記憶部8内のテンプレート画像を更新する。
The
The template registration unit 7 stores the template image input to the template input unit 5 in the
オブジェクト領域入力部4は、オブジェクト検出装置から追跡対象とするオブジェクト領域を表わす情報を受ける。
The object
オブジェクト領域設定部6は、オブジェクト領域入力部4に入力されたオブジェクト領域を初期のオブジェクト領域に設定する。オブジェクト領域設定部6は、マッチング部11によってテンプレート画像と類似するとして検索されたオブジェクト領域を新たなオブジェクト領域に設定する。
The object
探索領域設定部9は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と同一の場合には、前時点のフレーム画像におけるオブジェクト領域を含み、そのオブジェクト領域よりも探索範囲倍率Kだけ大きな領域(基準領域)を、現時点のフレーム画像におけるオブジェクト領域に設定する。
When the zoom magnification of the current frame image is the same as the zoom magnification of the previous frame image, the search
探索領域設定部9は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と異なる場合には、上述の基準領域を求め、この基準領域を前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する。
When the zoom magnification of the current frame image is different from the zoom magnification of the previous frame image, the search
正規化部10は、現時点のフレーム画像におけるオブジェクトの探索領域の画像を固定サイズに正規化して正規化探索画像を生成する。
The
マッチング部11は、正規化探索画像の中から、テンプレート記憶部8に記憶されているテンプレート画像と類似する領域を検索して、類似度が所定値以上となる部分を発見した場合に、その部分を現フレームのオブジェクト領域として特定し、その領域を表わす情報をCPU1002へ出力する。ここで、類似度とは、たとえば、2つの画像の画素値の絶対差の逆数や相互相関を用いることができる。
When the
マッチング部11は、類似度が所定値以上となる部分が発見できなかった場合に、オブジェクト検出装置に対してオブジェクトを再度検出するように指示する。
The matching
(探索領域の例)
図3は、現時点のフレーム画像が前時点のフレーム画像とズーム倍率が同一の場合の現時点のフレーム画像の探索領域を説明するための図である。
(Example of search area)
FIG. 3 is a diagram for explaining a search area for the current frame image when the current frame image has the same zoom magnification as the previous frame image.
図3(a)は、前時点のフレーム画像を表わす図である。
フレーム画像201において、左上の座標をO(0,0)、右上の座標がA(DX,0)、左下の座標がB(0,DY)、右下の座標がC(DX,DY)とする。
FIG. 3A shows a frame image at the previous time point.
In the
前時点のフレームで検出されたオブジェクト領域202の位置を以下とする。
中心座標がM(X1、Y1)、左上の座標がD(X1−ax,Y1−ay)、右上の座標がE(X1+ax,Y1−ay)、左下の座標がF(X1−ax,Y1+ay)、右下の座標がG(X1+ax,Y1+ay)とする。
The position of the
The center coordinate is M (X1, Y1), the upper left coordinate is D (X1-ax, Y1-ay), the upper right coordinate is E (X1 + ax, Y1-ay), and the lower left coordinate is F (X1-ax, Y1 + ay). The lower right coordinate is G (X1 + ax, Y1 + ay).
図3(b)は、現時点のフレーム画像を表わす図である。
フレーム画像203において、前時点と同様に、左上の座標がO(0,0)、右上の座標がA(DX,0)、左下の座標がB(0,DY)、右下の座標がC(DX,DY)である。現時点のフレーム画像における探索領域204の位置は、以下となる。
FIG. 3B shows a current frame image.
In the
中心座標はM(X1,Y1)であり、左上の座標がH(X1−ax′,Y1−ay′)、右上の座標がI(X1+ax′,Y1−ay′)、左下の座標がJ(X1−ax′,Y1+ay′)、右下の座標がK(X1+ax′,Y1+ay′)とする。ここで、ax′=K×ax、ay′=K×ayである。Kは探索範囲倍率である。 The central coordinate is M (X1, Y1), the upper left coordinate is H (X1-ax ', Y1-ay'), the upper right coordinate is I (X1 + ax ', Y1-ay'), and the lower left coordinate is J ( X1-ax ′, Y1 + ay ′), and the lower right coordinate is K (X1 + ax ′, Y1 + ay ′). Here, ax ′ = K × ax and ay ′ = K × ay. K is a search range magnification.
したがって、現時点のフレーム画像が前時点のフレーム画像とズーム倍率が同一の場合には、現時点のフレームの探索領域は、H,I,J,Kを頂点とした矩形領域(基準領域)204に設定されることになる。この矩形領域204は、前時点のフレーム画像におけるオブジェクト領域202を含み、そのオブジェクト領域よりもK倍だけ大きな領域である。
Therefore, if the current frame image has the same zoom magnification as the previous frame image, the current frame search area is set to a rectangular area (reference area) 204 with H, I, J, and K as vertices. Will be. The
図4は、現時点のフレーム画像が前時点のフレーム画像とズーム倍率が異なる場合の現時点のフレーム画像の探索領域を説明するための図である。 FIG. 4 is a diagram for explaining a search area for the current frame image when the current frame image has a zoom magnification different from that of the previous frame image.
図4(a)は、前時点のフレーム画像を表わす図である。
フレーム画像201において、左上の座標をO(0,0)、右上の座標がA(DX,0)、左下の座標がB(0,DY)、右下の座標がC(DX,DY)とする。
FIG. 4A shows a frame image at the previous time point.
In the
前時点のフレームで検出されたオブジェクト領域202の位置を以下とする。
中心座標がM(X1、Y1)、左上の座標がD(X1−ax,Y1−ay)、右上の座標がE(X1+ax,Y1−ay)、左下の座標がF(X1−ax,Y1+ay)、右下の座標がG(X1+ax,Y1+ay)とする。
The position of the
The center coordinate is M (X1, Y1), the upper left coordinate is D (X1-ax, Y1-ay), the upper right coordinate is E (X1 + ax, Y1-ay), and the lower left coordinate is F (X1-ax, Y1 + ay). The lower right coordinate is G (X1 + ax, Y1 + ay).
ここで、位置L(X0,Y0)をズームの中心座標とし、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比をZRとして、カメラがズームされた結果、前時点のフレーム画像におけるP、Q、R、Sを頂点とした矩形領域205が拡大されて現時点のフレーム画像の全領域とされたとする。ここで、Pの位置は(X0−EX/2,Y0−EY/2)、Qの位置は(X0+EX/2,Y0−EY/2)、Rの位置は(X0−EX/2,Y0+EY/2)、Sの位置は(X0+EX/2,Y0+EY/2)である。ズーム倍率の比ZR=DX/EX=DY/EYである。たとえば、前時点のカメラのズーム倍率が2であって、現時点のカメラのズーム倍率が4である場合には、ズーム倍率の比ZRは2(=4/2)となる。ズーム倍率が増加した、すなわち拡大した場合には、ズーム倍率の比ZRは1よりも大きくなり、ズーム倍率が減少した、すなわち縮小した場合には、ズーム倍率の比ZRは1よりも小さくなる。
Here, as a result of zooming the camera with the position L (X0, Y0) as the center coordinate of zoom and the ratio of the zoom magnification of the previous frame image to the zoom magnification of the current frame image as ZR, It is assumed that the
図4(b)は、現時点のフレーム画像を表わす図である。
フレーム画像206において、前時点と同様に、左上の座標がO(0,0)、右上の座標がA(DX,0)、左下の座標がB(0,DY)、右下の座標がC(DX,DY)である。
FIG. 4B shows a current frame image.
In the
また、前時点でのズームの中心Lが、フレーム画像206の中心のカメラ画像の中心を表わす位置L′に移動する。
Further, the zoom center L at the previous time point moves to a position L ′ representing the center of the camera image at the center of the
前時点のフレームで検出されたオブジェクト領域202は、中心がM′で、D′、E′、F′、G′を頂点とした矩形領域207に移動およびズームされる。ここで、M′の位置は(XP、YP)である。ただし、XP=DX/2+ZR×(X1−X0)、YP=DY/2+ZR×(Y1−Y0)である。D′の位置は(XP−ax×ZR,YP−ay×ZR)、E′の位置は(XP+ax×ZR,YP−ay×ZR)、F′の位置は(XP−ax×ZR,YP+ay×ZR)、G′の位置は(XP+ax×ZR,YP+ay×ZR)である。
The
探索領域208の位置は、中心がM′で、H′、I′、J′、K′を頂点とした矩形領域208に設定される。
The position of the
ここで、M′の位置は(XP,YP)であり、H′の位置は(XP−ax′×ZR,YP−ay′×ZR)であり、I′の位置は(XP+ax′×ZR,YP−ay′×ZR)であり、J′の位置は(XP−ax′×ZR,YP+ay′×ZR)であり、K′の位置は(XP+ax′×ZR,YP+ay′×ZR)である。ここで、ax′=K×ax、ay′=K×ayである。Kは探索範囲倍率である。 Here, the position of M ′ is (XP, YP), the position of H ′ is (XP−ax ′ × ZR, YP−ay ′ × ZR), and the position of I ′ is (XP + ax ′ × ZR, YP−ay ′ × ZR), the position of J ′ is (XP−ax ′ × ZR, YP + ay ′ × ZR), and the position of K ′ is (XP + ax ′ × ZR, YP + ay ′ × ZR). Here, ax ′ = K × ax and ay ′ = K × ay. K is a search range magnification.
したがって、現時点のフレーム画像が前時点のフレーム画像とズーム倍率が相違する場合には、現時点のフレームの探索領域は、H′、I′、J′、K′を頂点とした矩形領域208に設定されることになる。
Therefore, when the current frame image has a zoom magnification different from that of the previous frame image, the current frame search area is set to a
この矩形領域208は、前時点のフレーム画像におけるオブジェクト領域202をズームした領域207を含み、そのオブジェクト領域207よりもK倍だけ大きな領域である。また、この矩形領域208は、現時点のフレーム画像が前時点のフレーム画像とズーム倍率が同一の場合の現時点のフレーム画像の探索領域(図3(b)の領域204)を前時点のフレーム画像におけるズームの中心座標L、ズーム倍率の比ZRに基づいて、ズーム(拡大または縮小)した領域である。
This
(正規化の例)
図5は、正規化の例を説明するための図である。
(Normalization example)
FIG. 5 is a diagram for explaining an example of normalization.
図5で、正規化部10は、フレーム画像から探索領域303の画像を抽出する。図4(b)のように、現時点のフレーム画像が前時点のフレーム画像とズーム倍率が異なる場合には抽出された画像の横方向の画素数が2×ax′×ZRであり、縦方向の画素数が2×ay′×ZRである。
In FIG. 5, the
正規化部10は、抽出した画像を固定サイズに拡大または縮小して正規化探索画像304を生成する。図5に示すように、固定サイズは、横方向の画素数がXSで、縦方向の画素数がYSとする。正規化部10は、拡大する場合には、たとえば補間などの処理を行ない、縮小する場合には、たとえば間引きなどの処理を行なう。
The
(動作)
図6は、第1の実施形態のオブジェクト追跡処理の動作手順を表わすフローチャートである。
(Operation)
FIG. 6 is a flowchart showing the operation procedure of the object tracking process of the first embodiment.
図6を参照して、まず、オブジェクト領域入力部4は、オブジェクト検出装置から追跡対象とするオブジェクト領域を表わす情報を受ける。オブジェクト領域設定部6は、オブジェクト検出装置から出力されるオブジェクト領域を初期のオブジェクト領域に設定する(ステップS101)。
Referring to FIG. 6, first, object
次に、テンプレート登録部7は、オブジェクト検出装置から出力される対象オブジェクトの画像を初期テンプレートとしてテンプレート記憶部8に記憶する(ステップS102)。
Next, the template registration unit 7 stores the image of the target object output from the object detection device in the
次に、画像入力部2は、カメラI/Fから現時点のフレーム画像を受ける(ステップS103)。
Next, the
次に、パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けた場合には(ステップS104でYES)、探索領域設定部9は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と相違するので、前時点のフレーム画像におけるオブジェクト領域を含み、そのオブジェクト領域よりも所定倍数だけ大きな領域(基準領域)を求め、さらにその基準領域を、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する(ステップS105)。
Next, when the
一方、パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けない場合には(ステップS104でNO)、探索領域設定部9は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と同一であるので、前時点のフレーム画像におけるオブジェクト領域を含み、そのオブジェクト領域よりも所定倍数だけ大きな基準領域を、現時点のフレーム画像におけるオブジェクト領域に設定する(ステップS106)。
On the other hand, when the
次に、正規化部10は、現時点のフレーム画像におけるオブジェクトの探索領域の画像を固定サイズに正規化して正規化探索画像を生成する(ステップS107)。
Next, the
次に、マッチング部11は、正規化探索画像の中から、テンプレート記憶部8に記憶されているテンプレート画像と類似する領域を検索して、類似度が所定値以上となる部分を探す。
Next, the matching
マッチング部11が、類似度が所定値以上となる部分を発見した場合、すなわちマッチングが成功した場合には(ステップS108でYES)、マッチング部11は、その発見した部分を現フレームのオブジェクト領域として特定し、その領域を表わす情報をCPU1002へ出力する(ステップS109)。
When the
オブジェクト領域設定部6は、マッチング部11によって特定されたオブジェクト領域を新たなオブジェクト領域に設定する(ステップS110)。
The object
テンプレート登録部7は、マッチング部11によって特定されたオブジェクト領域の画像でテンプレート記憶部8内のテンプレート画像を更新する(ステップS111)。
The template registration unit 7 updates the template image in the
その後、ステップS103に戻って、次のフレーム画像の入力からの処理が繰返される。 Thereafter, the process returns to step S103, and the processing from the input of the next frame image is repeated.
マッチング部11が、類似度が所定値以上となる部分を発見しなかった場合、すなわちマッチングが失敗した場合には(ステップS108でNO)、マッチング部11は、オブジェクト検出装置に対してオブジェクトを再度検出するように指示する(ステップS112)。
If the
(効果)
以上のように、本実施の形態では、ズーム倍率とズームの中心座標を用いて、ズーム処理で入力されるフレーム画像の倍率が変わっても、対象オブジェクトの大きさと位置の変化を考慮した探索領域を設定することができる。これによって、複数のテンプレート画像とのマッチングが不要となる。
(effect)
As described above, in the present embodiment, a search area that takes into account changes in the size and position of the target object even if the magnification of the frame image input in the zoom process changes using the zoom magnification and the center coordinates of the zoom. Can be set. This eliminates the need for matching with a plurality of template images.
また、本実施の形態では、探索領域の画像を一定の大きさの正規化画像に縮小して、テンプレートマッチングを行なうので、従来のように、テンプレート画像を拡大してマッチング処理することによって、処理時間が長くなるのを防止できる。 In the present embodiment, since the image of the search area is reduced to a normalized image of a certain size and template matching is performed, processing is performed by enlarging the template image and performing matching processing as in the past. It can prevent the time from becoming longer.
[第2の実施形態]
対象オブジェクトを追跡中に、拡大によって、追跡対象のオブジェクトがフレーム画像の外へフレームアウトすることがある。従来は、一旦、フレームアウトした対象オブジェクトはフレーム画像内に存在しないため、その位置情報は保存されない。その後、対象オブジェクトが再度フレーム画像の中へフレームインした場合でも、追跡処理を開始する基準となる位置(つまり、探索領域の中央のオブジェクト検出領域)の情報がないので、オブジェクトを追跡することができない。それゆえ、従来では、追跡対象のオブジェクトがフレームアウトした場合に、追跡処理を停止して、再度オブジェクトの検出処理をするしかなかった。
[Second Embodiment]
While tracking the target object, the object to be tracked may be out of the frame image due to enlargement. Conventionally, since the target object once out of the frame does not exist in the frame image, the position information is not saved. After that, even when the target object is framed into the frame image again, there is no information on the reference position for starting the tracking process (that is, the object detection area at the center of the search area), so the object can be tracked. Can not. Therefore, conventionally, when an object to be tracked is out of frame, there is no choice but to stop the tracking process and perform the object detection process again.
図7は、第2の実施形態のオブジェクト追跡装置の構成を表わす図である。
図7のオブジェクト追跡装置51が、図2のオブジェクト追跡装置1009と相違する点は以下である。
FIG. 7 is a diagram illustrating the configuration of the object tracking device according to the second embodiment.
The
保持部28は、探索領域設定部29によって設定されたオブジェクトの探索領域の一部または全部が、現時点のフレーム画像に含まれない場合に、設定されたオブジェクトの探索領域を保持する。
The holding
図8(a)が、第i番目のフレーム画像を表わす図である。図8(b)が第(i+1)番目のフレーム画像を表わす図である。 FIG. 8A shows the i-th frame image. FIG. 8B shows the (i + 1) th frame image.
第i番目のフレーム画像601において、ズーム中心をL1とし、ズーム倍率の比をZR1として拡大された画像が、第(i+1)番目のフレーム画像603であるとする。ここで、ZR1>1である。
In the i-
図8(b)に示すように、M′を中心とし、H′、I′、J′、K′を頂点とした探索領域605がフレーム画像603の外部にはみ出した場合に、保持部28は、M′、H′、I′、J′、K′の座標を保持する。M′の位置は(XP,YP)であり、H′の位置は(XP−ax′×ZR1,YP−ay′×ZR1)であり、I′の位置は(XP+ax′×ZR1,YP−ay′×ZR1)であり、J′の位置は(XP−ax′×ZR1,YP+ay′×ZR1)であり、K′の位置は(XP+ax′×ZR1,YP+ay′×ZR1)である。ただし、XP=DX/2+ZR1×(X1−X0)、YP=DY/2+ZR1×(Y1−Y0)である。
As shown in FIG. 8B, when the
探索領域設定部29は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と相違する場合には、保持部28で前時点のフレーム画像におけるオブジェクト探索領域が保持されていれば、その保持されているオブジェクトの探索領域と、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する。
If the zoom magnification of the current frame image is different from the zoom magnification of the previous frame image, the search
図9(a)が、第(i+1)番目のフレーム画像を表わす図である。図9(b)が第(i+2)番目のフレーム画像を表わす図である。 FIG. 9A shows the (i + 1) th frame image. FIG. 9B shows the (i + 2) th frame image.
第i+1番目のフレーム画像603において、ズーム中心をL2とし、ズーム倍率の比をZR2として縮小された画像が、第(i+2)番目のフレーム画像610であるとする。ここで、ZR2<1である。
In the (i + 1)
探索領域設定部29は、保持部28で保持されているM′、H′、I′、J′、K′の位置と、ズームの中心座標L2(X0′,Y0′)、ズーム倍率の比ZR2を用いて、M″を中心とし、H″、I″、J″、K″を頂点としたオブジェクトの探索領域612を求める。
The search
M″の位置は(XP′,YP′)であり、H″の位置は(XP′−ax′×ZR1×ZR2,YP′−ay′×ZR1×ZR2)であり、I″の位置は(XP′+ax′×ZR1×ZR2,YP′−ay′×ZR1×ZR2)であり、J″の位置は(XP′−ax′×ZR1×ZR2,YP′+ay′×ZR1×ZR2)であり、K″の位置は(XP′+ax′×ZR1×ZR2,YP′+ay′×ZR1×ZR2)である。ただし、XP′=DX/2+ZR2×(XP−X0′)、YP′=DY/2+ZR2×(YP−Y0′)である。 The position of M ″ is (XP ′, YP ′), the position of H ″ is (XP′−ax ′ × ZR1 × ZR2, YP′−ay ′ × ZR1 × ZR2), and the position of I ″ is ( XP ′ + ax ′ × ZR1 × ZR2, YP′−ay ′ × ZR1 × ZR2), and the position of J ″ is (XP′−ax ′ × ZR1 × ZR2, YP ′ + ay ′ × ZR1 × ZR2), The position of K ″ is (XP ′ + ax ′ × ZR1 × ZR2, YP ′ + ay ′ × ZR1 × ZR2), where XP ′ = DX / 2 + ZR2 × (XP−X0 ′), YP ′ = DY / 2 + ZR2 × (YP-Y0 ').
(動作)
図10は、第2の実施形態のオブジェクト追跡処理の動作手順を表わすフローチャートである。
(Operation)
FIG. 10 is a flowchart illustrating an operation procedure of object tracking processing according to the second embodiment.
図10を参照して、まず、オブジェクト領域入力部4は、オブジェクト検出装置から追跡対象とするオブジェクト領域を表わす情報を受ける。オブジェクト領域設定部6は、オブジェクト検出装置から出力されるオブジェクト領域を初期のオブジェクト領域に設定する(ステップS101)。
Referring to FIG. 10, first, object
次に、テンプレート登録部7は、オブジェクト検出装置から出力される対象オブジェクトの画像を初期テンプレートとしてテンプレート記憶部8に記憶する(ステップS102)。
Next, the template registration unit 7 stores the image of the target object output from the object detection device in the
次に、画像入力部2は、カメラI/Fから現時点のフレーム画像を受ける(ステップS103)。
Next, the
次に、パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けた場合には(ステップS104でYES)、探索領域設定部29は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と相違するので、前時点のフレーム画像におけるオブジェクト領域を含み、そのオブジェクト領域よりも所定倍数だけ大きな領域(基準領域)を求め、さらにその基準領域を、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する(ステップS105)。
Next, when the
設定された探索領域の一部または全部が現時点のフレーム画像の外にはみ出した場合には(ステップS401でYES)、後述の復帰処理が行なわれる(ステップS402)。 When a part or all of the set search area is outside the current frame image (YES in step S401), a return process described later is performed (step S402).
一方、パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けない場合には(ステップS104でNO)、探索領域設定部29は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と同一であるので、前時点のフレーム画像におけるオブジェクト領域を含み、そのオブジェクト領域よりも所定倍数だけ大きな基準領域を、現時点のフレーム画像におけるオブジェクト領域に設定する(ステップS106)。
On the other hand, when the
次に、正規化部10は、現時点のフレーム画像におけるオブジェクトの探索領域の画像を固定サイズに正規化して正規化探索画像を生成する(ステップS107)。
Next, the
次に、マッチング部11は、正規化探索画像の中から、テンプレート記憶部8に記憶されているテンプレート画像と類似する領域を検索して、類似度が所定値以上となる部分を探す。
Next, the matching
マッチング部11が、類似度が所定値以上となる部分を発見した場合、すなわちマッチングが成功した場合には(ステップS108でYES)、マッチング部11は、その発見した部分を現フレームのオブジェクト領域として特定し、その領域を表わす情報をCPU1002へ出力する(ステップS109)。
When the
オブジェクト領域設定部6は、マッチング部11によって特定されたオブジェクト領域を新たなオブジェクト領域に設定する(ステップS110)。
The object
テンプレート登録部7は、マッチング部11によって特定されたオブジェクト領域の画像でテンプレート記憶部8内のテンプレート画像を更新する(ステップS111)。
The template registration unit 7 updates the template image in the
その後、ステップS103に戻って、次のフレーム画像の入力からの処理が繰返される。 Thereafter, the process returns to step S103, and the processing from the input of the next frame image is repeated.
マッチング部11が、類似度が所定値以上となる部分を発見しなかった場合、すなわちマッチングが失敗した場合には(ステップS108でNO)、マッチング部11は、オブジェクト検出装置に対してオブジェクトを再度検出するように指示する(ステップS112)。
If the
(復帰処理)
図11は、図10のステップS402の復帰処理の手順を表わすフローチャートである。
(Return processing)
FIG. 11 is a flowchart showing the procedure of the return process in step S402 of FIG.
まず、保持部28は、設定された探索領域を表わす情報を保持する(ステップS501)。
First, the holding
画像入力部2は、カメラI/Fから次の時点のフレーム画像を受ける(ステップS502)。
The
パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けた場合には(ステップS503でYES)、探索領域設定部29は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と相違するので、保存している前時点のフレーム画像におけるオブジェクト探索領域と、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する(ステップS504)。
When the
設定された探索領域の一部または全部が現時点のフレーム画像の外にはみ出した場合には(ステップS505でYES)、ステップS501からの処理を繰返す。 If a part or all of the set search area is outside the current frame image (YES in step S505), the processing from step S501 is repeated.
(効果)
以上のように、第2の実施形態によれば、拡大によって、追跡対象のオブジェクトがフレーム画像の外へフレームアウトしたとしても、フレームアウトしたオブジェクトの探索領域を保持して、次のフレームにおける探索領域の設定に用いるので、オブジェクトの追跡を継続することができる。
(effect)
As described above, according to the second embodiment, even if the object to be tracked is out of the frame image due to the enlargement, the search area of the object out of the frame is held and the search in the next frame is performed. Since it is used for setting an area, it is possible to continue tracking an object.
なお、本実施の形態の図11のステップS505でYESの場合、常に、ステップS501に戻ることとしたが、図11の復帰処理が所定時間以上継続した場合、または、ステップS501〜S505のループが所定回数以上継続した場合に、復帰処理を終了してオブジェクト検出部に再度オブジェクト検出処理をさせることとしてもよい。 If YES in step S505 in FIG. 11 of the present embodiment, the process always returns to step S501. However, if the return process in FIG. 11 continues for a predetermined time or more, or the loop of steps S501 to S505 continues. When continuing for a predetermined number of times or more, the return process may be terminated and the object detection unit may be caused to perform the object detection process again.
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
2 画像入力部、3 パラメータ入力部、4 オブジェクト領域入力部、5 テンプレート入力部、6 オブジェクト領域設定部、7 テンプレート登録部、8 テンプレート記憶部、9,29 探索領域設定部、10 正規化部、11 マッチング部、28 保持部、1000 デジタルカメラ、1001 カメラI/F、1002 CPU、1003 SDRAM、1004 ROM、1005 ユーザ操作部I/F、1006 オブジェクト検出装置、1007 LCDI/F、1008 カードI/F、51,1009 オブジェクト追跡装置、1011 画像処理装置。
2 image input unit, 3 parameter input unit, 4 object region input unit, 5 template input unit, 6 object region setting unit, 7 template registration unit, 8 template storage unit, 9, 29 search region setting unit, 10 normalization unit, DESCRIPTION OF
Claims (5)
ユーザが動作指示を行う操作部と、
前記フレーム画像からオブジェクトを検出して追跡する画像処理部と、
ユーザからの動作指示に応じて、前記画像処理部を制御する制御部とを備え、
前記画像処理部は、
第1フレーム画像から追跡対象オブジェクトを検出し、前記追跡対象オブジェクトを含む矩形領域として第1探索領域を設定するオブジェクト検出部と、
前記第1フレーム画像に引き続くフレーム画像群から前記追跡対象オブジェクトを追跡するための第2探索領域を設定するオブジェクト探索部とを有し、
前記第2探索領域は、前記第1探索領域、前記第1フレーム画像のズームの中心座標、および前記第1フレーム画像のズーム倍率と前記フレーム画像群の各々のズーム倍率との比に基づいて設定されることを特徴とするデジタルカメラ。 An image acquisition unit for acquiring frame images in time series;
An operation unit in which a user gives an operation instruction;
An image processing unit for detecting and tracking an object from the frame image;
A control unit that controls the image processing unit in response to an operation instruction from a user ,
The image processing unit
An object detection unit that detects a tracking target object from the first frame image and sets a first search region as a rectangular region including the tracking target object;
An object search unit that sets a second search region for tracking the tracking target object from a group of frame images subsequent to the first frame image;
The second search area is set based on the first search area, the zoom center coordinates of the first frame image, and the ratio between the zoom magnification of the first frame image and each zoom magnification of the frame image group. A digital camera characterized by being made.
前記第2探索領域を固定サイズに拡大または縮小する正規化部を有することを特徴とする請求項1記載のデジタルカメラ。 The object search unit further includes:
The digital camera according to claim 1, further comprising a normalization unit that enlarges or reduces the second search area to a fixed size.
前記オブジェクト探索部は、探索領域倍率に従って、前記第1探索領域を拡大して前記第2探索領域とすることを特徴とする請求項1または2記載のデジタルカメラ。 When the user has not instructed zooming from the operation unit,
Prior Symbol object searching unit, searches according to area ratio, according to claim 1 or 2 digital camera according to, characterized in that by enlarging the first search area and the second search area.
前記オブジェクト探索部は、ズーム倍率とズーム中心座標とに従って、前記第1探索領域を拡大または縮小し、さらに、前記探索領域倍率に従って拡大して前記第2探索領域とすることを特徴とする請求項3記載のデジタルカメラ。 When the user gives a zoom instruction from the operation unit,
The object search unit according to FIG. Over arm magnification and's over arm center coordinates, the first to increase or decrease the search area, further characterized in that enlarged in accordance with the search area ratio and the second search area The digital camera according to claim 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015095681A JP6062483B2 (en) | 2015-05-08 | 2015-05-08 | Digital camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015095681A JP6062483B2 (en) | 2015-05-08 | 2015-05-08 | Digital camera |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011190583A Division JP5746937B2 (en) | 2011-09-01 | 2011-09-01 | Object tracking device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015180091A JP2015180091A (en) | 2015-10-08 |
JP6062483B2 true JP6062483B2 (en) | 2017-01-18 |
Family
ID=54263787
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015095681A Expired - Fee Related JP6062483B2 (en) | 2015-05-08 | 2015-05-08 | Digital camera |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6062483B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110456829B (en) * | 2019-08-07 | 2022-12-13 | 深圳市维海德技术股份有限公司 | Positioning tracking method, device and computer readable storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08286098A (en) * | 1995-04-18 | 1996-11-01 | Canon Inc | Image pickup device |
JPH1175103A (en) * | 1997-08-29 | 1999-03-16 | Hitachi Denshi Ltd | Television camera |
JP2006254321A (en) * | 2005-03-14 | 2006-09-21 | Matsushita Electric Ind Co Ltd | Person tracking apparatus and program |
JP5167750B2 (en) * | 2006-10-03 | 2013-03-21 | 株式会社ニコン | TRACKING DEVICE, IMAGING DEVICE, AND TRACKING METHOD |
JP4983666B2 (en) * | 2008-03-18 | 2012-07-25 | パナソニック株式会社 | Imaging device |
US8130282B2 (en) * | 2008-03-31 | 2012-03-06 | Panasonic Corporation | Image capture device |
-
2015
- 2015-05-08 JP JP2015095681A patent/JP6062483B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2015180091A (en) | 2015-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5746937B2 (en) | Object tracking device | |
US9578248B2 (en) | Method for generating thumbnail image and electronic device thereof | |
JP5810296B2 (en) | Image display device and image display method | |
JP5906028B2 (en) | Image processing apparatus and image processing method | |
JP4814375B2 (en) | Detection device, detection method, and integrated circuit for detection | |
CN109286755B (en) | Information processing apparatus and control method for controlling image capturing apparatus | |
WO2019042426A1 (en) | Augmented reality scene processing method and apparatus, and computer storage medium | |
US10915998B2 (en) | Image processing method and device | |
WO2019179233A1 (en) | Qr code identifying and reading method and apparatus, and device | |
JP6500355B2 (en) | Display device, display program, and display method | |
KR20160048140A (en) | Method and apparatus for generating an all-in-focus image | |
JP2021533660A (en) | Optical image stabilization behavior to generate super-resolution images of scenes | |
CN113556464B (en) | Shooting method and device and electronic equipment | |
CN109543534B (en) | Method and device for re-detecting lost target in target tracking | |
JP6234188B2 (en) | Translation display device, translation display method, and control program | |
JP6311372B2 (en) | Image processing apparatus and image processing method | |
JP6062483B2 (en) | Digital camera | |
US10990802B2 (en) | Imaging apparatus providing out focusing and method for controlling the same | |
US11790483B2 (en) | Method, apparatus, and device for identifying human body and computer readable storage medium | |
WO2020145138A1 (en) | Video editing device, method of same, and program | |
US20210104082A1 (en) | Text display in augmented reality | |
KR20230116565A (en) | Electronic device and controlling method thereof | |
JP2013232738A (en) | Image processing device, image processing method, and image processing program | |
JP2017004185A (en) | Image processing device, image processing method, and image processing system | |
JP2014187505A (en) | Imaging apparatus, control method therefor and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160222 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160315 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160428 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160614 |
|
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: 20161129 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161214 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6062483 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |