JP6062483B2 - Digital camera - Google Patents

Digital camera Download PDF

Info

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
Application number
JP2015095681A
Other languages
Japanese (ja)
Other versions
JP2015180091A (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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2015095681A priority Critical patent/JP6062483B2/en
Publication of JP2015180091A publication Critical patent/JP2015180091A/en
Application granted granted Critical
Publication of JP6062483B2 publication Critical patent/JP6062483B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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 Patent Document 1, in order to track an object whose size changes, matching is performed between a plurality of template images obtained by enlarging / reducing a basic template image and changing the magnification, and captured images.

特許文献2では、基本となるテンプレート画像を拡大・縮小した複数のテンプレート画像からズーム倍率に応じたテンプレート画像を選択して、撮影画像とのマッチングを行なう。   In Patent Document 2, a template image corresponding to a zoom magnification is selected from a plurality of template images obtained by enlarging or reducing a basic template image, and matching with a captured image is performed.

特開2008−287648号公報JP 2008-287648 A 特開2001−243476号公報JP 2001-243476 A

しかしながら、特許文献1では、サイズの変化するオブジェクト追跡に対応するために、複数のテンプレート画像とのマッチングが必要となり、処理負荷が大きくなるという問題点がある。   However, Patent Document 1 has a problem that matching with a plurality of template images is required in order to cope with object tracking whose size changes, and processing load increases.

特許文献2では、ズーム倍率に応じた1つのテンプレート画像でカメラ画像とのマッチングを行なうので、特許文献1よりも高速化が可能であるが、複数の倍率のテンプレート画像を作成して記憶しておく必要がある。また、ズームによって撮影画像が拡大した場合に、画素数が増加したテンプレート画像を用いてマッチングを行なうので、マッチングに時間を要することになる。   In Patent Document 2, since matching with a camera image is performed using a single template image corresponding to the zoom magnification, the speed can be increased as compared to Patent Document 1, but template images having a plurality of magnifications are created and stored. It is necessary to keep. In addition, when a captured image is enlarged by zooming, matching is performed using a template image with an increased number of pixels, so matching takes time.

それゆえに、本発明の目的は、ズーム処理によって対象オブジェクトのサイズが変化しても、高速かつ高精度に対象オブジェクトを追跡することができるデジタルカメラを提供することである。   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.

本発明の実施の形態におけるデジタルカメラの構成例を示すブロック図である。It is a block diagram which shows the structural example of the digital camera in embodiment of this invention. 第1の実施形態のオブジェクト追跡装置の構成を表わす図である。It is a figure showing the structure of the object tracking device of 1st Embodiment. 現時点のフレーム画像が前時点のフレーム画像とズーム倍率が同一の場合の現時点のフレーム画像の探索領域を説明するための図である。It is a figure for demonstrating the search area | region of the present frame image when the present frame image has the same zoom magnification as the previous frame image. 現時点のフレーム画像が前時点のフレーム画像とズーム倍率が異なる場合の現時点のフレーム画像の探索領域を説明するための図である。It is a figure for demonstrating the search area | region of the present frame image when the present frame image differs in zoom magnification from the previous frame image. 正規化の例を説明するための図である。It is a figure for demonstrating the example of normalization. 第1の実施形態のオブジェクト追跡処理の動作手順を表わすフローチャートである。It is a flowchart showing the operation | movement procedure of the object tracking process of 1st Embodiment. 第2の実施形態のオブジェクト追跡装置の構成を表わす図である。It is a figure showing the structure of the object tracking device of 2nd Embodiment. (a)は、第i番目のフレーム画像を表わす図である。(b)は第(i+1)番目のフレーム画像を表わす図である。(A) is a figure showing the i-th frame image. (B) is a diagram showing the (i + 1) -th frame image. (a)は、第(i+1)番目のフレーム画像を表わす図である。(b)は第(i+2)番目のフレーム画像を表わす図である。(A) is a figure showing the (i + 1) th frame image. (B) is a diagram showing the (i + 2) -th frame image. 第2の実施形態のオブジェクト追跡処理の動作手順を表わすフローチャートである。It is a flowchart showing the operation | movement procedure of the object tracking process of 2nd Embodiment. 図10のステップS402の復帰処理の手順を表わすフローチャートである。It is a flowchart showing the procedure of the return process of step S402 of FIG.

以下、本発明の実施形態について図面を参照して説明する。
[第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 / F 1005, LCD I / F 1007, card I / F 1008, object detection device 1006, and object tracking device 1009, which are connected via a bus 1010 Has been. The object detection device 1006 and the object tracking device 1009 constitute an image processing device 1011.

カメラI/F1001は、カメラセンサに接続されており、カメラセンサによって撮像された画像を受け、SDRAM1003やカードI/F1008を介して接続される図示しないSDメモリカードなどにその画像を書き込む。   The camera I / F 1001 is connected to a camera sensor, receives an image captured by the camera sensor, and writes the image to an SD memory card (not shown) connected via the SDRAM 1003 or the card I / F 1008.

CPU1002は、SDRAM1003やROM1004に記憶されるプログラムを実行することによって、システム全体の制御を行なう。CPU1002は、SDRAM1003に格納された顔(オブジェクト)の位置を表わす情報を焦点合わせのためにカメラI/F1001を通じてカメラの撮像系に送る。また、CPU1002は、オブジェクト検出装置1006およびオブジェクト追跡装置1009から送られる顔(オブジェクト)の位置を表わす情報から顔の位置を表わす図形(矩形など)をLCDI/F1007に送る。   The CPU 1002 controls the entire system by executing programs stored in the SDRAM 1003 and the ROM 1004. The CPU 1002 sends information representing the position of the face (object) stored in the SDRAM 1003 to the imaging system of the camera through the camera I / F 1001 for focusing. Further, the CPU 1002 sends a graphic (such as a rectangle) representing the position of the face to the LCD I / F 1007 from the information representing the position of the face (object) sent from the object detection device 1006 and the object tracking device 1009.

ROM1004は、オブジェクトの検出、オブジェクトの追跡に用いられるデータを記憶する。   The ROM 1004 stores data used for object detection and object tracking.

ユーザ操作部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 CPU 1002 to that effect by an interrupt or the like. Upon receiving an interrupt request, the CPU 1002 controls the camera I / F 1001 and stores an image captured by the camera sensor in the SDRAM 1003 or the like. When the user operates a zoom switch (not shown) or the like to change the zoom magnification, the zoom magnification is sent to the CPU 1002 via the user operation unit I / F 1005.

LCDI/F1007は、図示しないLCDパネルに接続され、LCDの表示の制御などを行なう。カメラセンサによって撮影された画像をプレビューとしてLCDに表示する。また、LCDI/F1007は、CPU1002から送られた顔(オブジェクト)の位置を表わす図形を撮影された画像上に重畳表示する。   The LCD I / F 1007 is connected to an LCD panel (not shown) and controls display on the LCD. An image taken by the camera sensor is displayed on the LCD as a preview. The LCD I / F 1007 superimposes and displays a graphic representing the position of the face (object) sent from the CPU 1002 on the captured image.

カードI/F1008は、SDメモリカードなどの外部の記録媒体に接続され、記録媒体に対するデータの読み出しや書き込みを行なう。   A card I / F 1008 is connected to an external recording medium such as an SD memory card, and reads / writes data from / to the recording medium.

オブジェクト検出装置1006は、カメラセンサによって撮影されてカメラI/F1001から入力される画像から顔(オブジェクト)の検出処理を行なって、顔(オブジェクト)の位置を表わす情報をSDRAM1003に格納する。オブジェクト検出装置1006は、検出したオブジェクトの領域をテンプレートとして登録する。   The object detection device 1006 performs face (object) detection processing from an image photographed by the camera sensor and input from the camera I / F 1001, and stores information representing the position of the face (object) in the SDRAM 1003. The object detection apparatus 1006 registers the detected object area as a template.

オブジェクト追跡装置1009は、カメラセンサによって撮影されてカメラI/F1001から入力される画像においてオブジェクト検出装置1006で検出された顔(オブジェクト)の追跡処理を行なって、顔(オブジェクト)の位置を表わす情報をSDRAM1003に格納する。オブジェクト追跡装置1009は、撮影された画像から、オブジェクト検出装置で得られたテンプレートと類似する領域を検索することによって、オブジェクトの追跡を行なう。オブジェクト追跡装置1009は、CPU1002から送られる探索範囲倍率K、ズーム倍率、ズームの中心座標を受ける。オブジェクト追跡装置1009は、オブジェクト検出装置1006から追跡対象のオブジェクトのテンプレート画像、オブジェクト領域を受ける。   The object tracking device 1009 performs tracking processing of the face (object) detected by the object detection device 1006 in the image captured by the camera sensor and input from the camera I / F 1001, and information representing the position of the face (object) Is stored in the SDRAM 1003. The object tracking device 1009 tracks an object by searching a captured image for a region similar to the template obtained by the object detection device. The object tracking device 1009 receives the search range magnification K, zoom magnification, and zoom center coordinates sent from the CPU 1002. The object tracking device 1009 receives a template image and an object region of an object to be tracked from the object detection device 1006.

(構成)
図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 object tracking apparatus 1009 includes an image input unit 2, a parameter input unit 3, an object region input unit 4, an object region setting unit 6, a template input unit 5, and a template registration unit 7. A template storage unit 8, a search region setting unit 9, a normalization unit 10, and a matching unit 11.

画像入力部2は、カメラI/Fから追跡対象となるオブジェクトを探索するためのフレーム画像を所定のフレームレートで受ける。ユーザによって被写体がズーム(拡大または縮小)された場合には、画像入力部2は、ズームされたフレーム画像を受ける。   The image input unit 2 receives a frame image for searching for an object to be tracked from the camera I / F at a predetermined frame rate. When the subject is zoomed (enlarged or reduced) by the user, the image input unit 2 receives the zoomed frame image.

パラメータ入力部3は、CPU1002から探索範囲倍率Kの入力を受ける。さらに、パラメータ入力部3は、ユーザによって被写体がズームされて、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率から変化した場合には、CPU1002からズーム倍率と、ズームの中心座標とを受ける。   Parameter input unit 3 receives an input of search range magnification K from CPU 1002. Further, when the subject is zoomed by the user and the zoom magnification of the current frame image is changed from the zoom magnification of the previous frame image, the parameter input unit 3 receives the zoom magnification, the zoom center coordinates, and the like from the CPU 1002. Receive.

テンプレート入力部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 template storage unit 8 stores a template image of an object to be tracked.
The template registration unit 7 stores the template image input to the template input unit 5 in the template storage unit 8 as an initial template. The template registration unit 7 updates the template image in the template storage unit 8 with the image of the object area specified by the matching unit 11.

オブジェクト領域入力部4は、オブジェクト検出装置から追跡対象とするオブジェクト領域を表わす情報を受ける。   The object area input unit 4 receives information representing an object area to be tracked from the object detection device.

オブジェクト領域設定部6は、オブジェクト領域入力部4に入力されたオブジェクト領域を初期のオブジェクト領域に設定する。オブジェクト領域設定部6は、マッチング部11によってテンプレート画像と類似するとして検索されたオブジェクト領域を新たなオブジェクト領域に設定する。   The object area setting unit 6 sets the object area input to the object area input unit 4 as an initial object area. The object area setting unit 6 sets the object area searched by the matching unit 11 as being similar to the template image as a new object area.

探索領域設定部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 area setting unit 9 includes the object area in the previous frame image, and the search area magnification K is larger than the object area. A region (reference region) that is as large as possible is set as the object region in the current frame image.

探索領域設定部9は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と異なる場合には、上述の基準領域を求め、この基準領域を前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する。   When the zoom magnification of the current frame image is different from the zoom magnification of the previous frame image, the search area setting unit 9 obtains the above-described reference area, and uses this reference area as the zoom center coordinate in the previous frame image. Based on the ratio between the zoom magnification of the previous frame image and the zoom magnification of the current frame image, the zoomed (enlarged or reduced) region is set as the object search region in the current frame image.

正規化部10は、現時点のフレーム画像におけるオブジェクトの探索領域の画像を固定サイズに正規化して正規化探索画像を生成する。   The normalization unit 10 normalizes the image of the object search area in the current frame image to a fixed size to generate a normalized search image.

マッチング部11は、正規化探索画像の中から、テンプレート記憶部8に記憶されているテンプレート画像と類似する領域を検索して、類似度が所定値以上となる部分を発見した場合に、その部分を現フレームのオブジェクト領域として特定し、その領域を表わす情報をCPU1002へ出力する。ここで、類似度とは、たとえば、2つの画像の画素値の絶対差の逆数や相互相関を用いることができる。   When the matching unit 11 searches the normalized search image for a region similar to the template image stored in the template storage unit 8 and finds a portion where the similarity is equal to or greater than a predetermined value, Is specified as the object area of the current frame, and information representing the area is output to the CPU 1002. Here, as the similarity, for example, the reciprocal of the absolute difference between the pixel values of two images or a cross-correlation can be used.

マッチング部11は、類似度が所定値以上となる部分が発見できなかった場合に、オブジェクト検出装置に対してオブジェクトを再度検出するように指示する。   The matching unit 11 instructs the object detection device to detect the object again when a part having a similarity greater than or equal to a predetermined value cannot be found.

(探索領域の例)
図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 frame image 201, the upper left coordinate is O (0, 0), the upper right coordinate is A (DX, 0), the lower left coordinate is B (0, DY), and the lower right coordinate is C (DX, DY). To do.

前時点のフレームで検出されたオブジェクト領域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 object area 202 detected in the previous frame is as follows.
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 frame image 203, as in the previous time point, the upper left coordinate is O (0, 0), the upper right coordinate is A (DX, 0), the lower left coordinate is B (0, DY), and the lower right coordinate is C. (DX, DY). The position of the search area 204 in the current frame image is as follows.

中心座標は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 rectangular area 204 includes the object area 202 in the previous frame image, and is an area K times larger than the object area.

図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 frame image 201, the upper left coordinate is O (0, 0), the upper right coordinate is A (DX, 0), the lower left coordinate is B (0, DY), and the lower right coordinate is C (DX, DY). To do.

前時点のフレームで検出されたオブジェクト領域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 object area 202 detected in the previous frame is as follows.
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 rectangular area 205 having P, Q, R, and S as vertices in the frame image is enlarged to be the entire area of the current frame image. Here, the position of P is (X0−EX / 2, Y0−EY / 2), the position of Q is (X0 + EX / 2, Y0−EY / 2), and the position of R is (X0−EX / 2, Y0 + EY / 2) The position of S is (X0 + EX / 2, Y0 + EY / 2). The ratio of zoom magnification ZR = DX / EX = DY / EY. For example, when the zoom magnification of the camera at the previous time point is 2 and the zoom magnification of the current camera is 4, the zoom magnification ratio ZR is 2 (= 4/2). When the zoom magnification is increased, that is, when the zoom magnification is increased, the zoom magnification ratio ZR is larger than 1. When the zoom magnification is decreased, that is, when the zoom magnification is reduced, the zoom magnification ratio ZR is smaller than 1.

図4(b)は、現時点のフレーム画像を表わす図である。
フレーム画像206において、前時点と同様に、左上の座標がO(0,0)、右上の座標がA(DX,0)、左下の座標がB(0,DY)、右下の座標がC(DX,DY)である。
FIG. 4B shows a current frame image.
In the frame image 206, as in the previous time point, the upper left coordinate is O (0, 0), the upper right coordinate is A (DX, 0), the lower left coordinate is B (0, DY), and the lower right coordinate is C. (DX, DY).

また、前時点でのズームの中心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 frame image 206.

前時点のフレームで検出されたオブジェクト領域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 object area 202 detected in the previous frame is moved and zoomed to a rectangular area 207 whose center is M ′ and whose vertices are D ′, E ′, F ′, and G ′. Here, the position of M ′ is (XP, YP). However, XP = DX / 2 + ZR × (X1−X0) and YP = DY / 2 + ZR × (Y1−Y0). The position of D ′ is (XP−ax × ZR, YP−ay × ZR), the position of E ′ is (XP + ax × ZR, YP−ay × ZR), and the position of F ′ is (XP−ax × ZR, YP + ay ×). The position of ZR) and G ′ is (XP + ax × ZR, YP + ay × ZR).

探索領域208の位置は、中心がM′で、H′、I′、J′、K′を頂点とした矩形領域208に設定される。   The position of the search area 208 is set to a rectangular area 208 whose center is M ′ and whose vertices are H ′, I ′, J ′, and K ′.

ここで、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 rectangular area 208 having vertices at H ′, I ′, J ′, and K ′. Will be.

この矩形領域208は、前時点のフレーム画像におけるオブジェクト領域202をズームした領域207を含み、そのオブジェクト領域207よりもK倍だけ大きな領域である。また、この矩形領域208は、現時点のフレーム画像が前時点のフレーム画像とズーム倍率が同一の場合の現時点のフレーム画像の探索領域(図3(b)の領域204)を前時点のフレーム画像におけるズームの中心座標L、ズーム倍率の比ZRに基づいて、ズーム(拡大または縮小)した領域である。   This rectangular area 208 includes an area 207 obtained by zooming the object area 202 in the previous frame image, and is an area K times larger than the object area 207. Further, the rectangular area 208 is obtained by changing the current frame image search area (the area 204 in FIG. 3B) when the current frame image has the same zoom magnification as the previous frame image in the previous frame image. This is a zoomed (enlarged or reduced) area based on the zoom center coordinate L and the zoom magnification ratio ZR.

(正規化の例)
図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 normalization unit 10 extracts an image of the search area 303 from the frame image. As shown in FIG. 4B, when the current frame image has a zoom magnification different from that of the previous frame image, the number of pixels in the horizontal direction of the extracted image is 2 × ax ′ × ZR, The number of pixels is 2 × ay ′ × ZR.

正規化部10は、抽出した画像を固定サイズに拡大または縮小して正規化探索画像304を生成する。図5に示すように、固定サイズは、横方向の画素数がXSで、縦方向の画素数がYSとする。正規化部10は、拡大する場合には、たとえば補間などの処理を行ない、縮小する場合には、たとえば間引きなどの処理を行なう。   The normalization unit 10 generates a normalized search image 304 by enlarging or reducing the extracted image to a fixed size. As shown in FIG. 5, in the fixed size, the number of pixels in the horizontal direction is XS, and the number of pixels in the vertical direction is YS. The normalizing unit 10 performs a process such as interpolation when enlarging, and performs a process such as thinning out when reducing.

(動作)
図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 region input unit 4 receives information representing an object region to be tracked from an object detection device. The object area setting unit 6 sets the object area output from the object detection apparatus as an initial object area (step S101).

次に、テンプレート登録部7は、オブジェクト検出装置から出力される対象オブジェクトの画像を初期テンプレートとしてテンプレート記憶部8に記憶する(ステップS102)。   Next, the template registration unit 7 stores the image of the target object output from the object detection device in the template storage unit 8 as an initial template (step S102).

次に、画像入力部2は、カメラI/Fから現時点のフレーム画像を受ける(ステップS103)。   Next, the image input unit 2 receives the current frame image from the camera I / F (step S103).

次に、パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けた場合には(ステップS104でYES)、探索領域設定部9は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と相違するので、前時点のフレーム画像におけるオブジェクト領域を含み、そのオブジェクト領域よりも所定倍数だけ大きな領域(基準領域)を求め、さらにその基準領域を、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する(ステップS105)。   Next, when the parameter input unit 3 receives the zoom magnification and the zoom center coordinates from the CPU 1002 (YES in step S104), the search area setting unit 9 sets the current frame image zoom magnification to the previous time point. Since it is different from the zoom magnification of the frame image, an object area in the previous frame image is obtained, and an area (reference area) larger than the object area by a predetermined multiple is obtained, and the reference area is further determined in the previous frame image. Based on the zoom center coordinates and the ratio of the zoom magnification of the previous frame image to the zoom magnification of the current frame image, the zoomed (enlarged or reduced) area is set as the object search area in the current frame image ( Step S105).

一方、パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けない場合には(ステップS104でNO)、探索領域設定部9は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と同一であるので、前時点のフレーム画像におけるオブジェクト領域を含み、そのオブジェクト領域よりも所定倍数だけ大きな基準領域を、現時点のフレーム画像におけるオブジェクト領域に設定する(ステップS106)。   On the other hand, when the parameter input unit 3 does not receive the zoom magnification and the zoom center coordinates from the CPU 1002 (NO in step S104), the search area setting unit 9 determines that the current frame image has a zoom magnification of the previous time point. Since it is the same as the zoom magnification of the image, a reference area that includes the object area in the previous frame image and is larger than the object area by a predetermined multiple is set as the object area in the current frame image (step S106).

次に、正規化部10は、現時点のフレーム画像におけるオブジェクトの探索領域の画像を固定サイズに正規化して正規化探索画像を生成する(ステップS107)。   Next, the normalization unit 10 normalizes the image of the object search area in the current frame image to a fixed size to generate a normalized search image (step S107).

次に、マッチング部11は、正規化探索画像の中から、テンプレート記憶部8に記憶されているテンプレート画像と類似する領域を検索して、類似度が所定値以上となる部分を探す。   Next, the matching unit 11 searches the normalized search image for a region similar to the template image stored in the template storage unit 8 and searches for a portion where the similarity is equal to or greater than a predetermined value.

マッチング部11が、類似度が所定値以上となる部分を発見した場合、すなわちマッチングが成功した場合には(ステップS108でYES)、マッチング部11は、その発見した部分を現フレームのオブジェクト領域として特定し、その領域を表わす情報をCPU1002へ出力する(ステップS109)。   When the matching unit 11 finds a part where the similarity is equal to or greater than a predetermined value, that is, when the matching is successful (YES in step S108), the matching unit 11 sets the found part as the object area of the current frame. The information specifying the area is output to the CPU 1002 (step S109).

オブジェクト領域設定部6は、マッチング部11によって特定されたオブジェクト領域を新たなオブジェクト領域に設定する(ステップS110)。   The object area setting unit 6 sets the object area specified by the matching unit 11 as a new object area (step S110).

テンプレート登録部7は、マッチング部11によって特定されたオブジェクト領域の画像でテンプレート記憶部8内のテンプレート画像を更新する(ステップS111)。   The template registration unit 7 updates the template image in the template storage unit 8 with the image of the object area specified by the matching unit 11 (step S111).

その後、ステップ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 matching unit 11 has not found a portion where the degree of similarity is equal to or greater than the predetermined value, that is, if the matching has failed (NO in step S108), the matching unit 11 returns the object to the object detection device again. The detection is instructed (step S112).

(効果)
以上のように、本実施の形態では、ズーム倍率とズームの中心座標を用いて、ズーム処理で入力されるフレーム画像の倍率が変わっても、対象オブジェクトの大きさと位置の変化を考慮した探索領域を設定することができる。これによって、複数のテンプレート画像とのマッチングが不要となる。
(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 object tracking device 51 of FIG. 7 is different from the object tracking device 1009 of FIG. 2 as follows.

保持部28は、探索領域設定部29によって設定されたオブジェクトの探索領域の一部または全部が、現時点のフレーム画像に含まれない場合に、設定されたオブジェクトの探索領域を保持する。   The holding unit 28 holds the set object search area when a part or all of the object search area set by the search area setting unit 29 is not included in the current frame image.

図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-th frame image 601, it is assumed that an enlarged image with the zoom center as L <b> 1 and the zoom magnification ratio as ZR <b> 1 is the (i + 1) -th frame image 603. Here, ZR1> 1.

図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 search area 605 centering on M ′ and having vertices H ′, I ′, J ′, K ′ protrudes outside the frame image 603, the holding unit 28 , M ′, H ′, I ′, J ′, K ′. The position of M ′ is (XP, YP), the position of H ′ is (XP-ax ′ × ZR1, YP-ay ′ × ZR1), and the position of I ′ is (XP + ax ′ × ZR1, YP-ay). ′ × ZR1), the position of J ′ is (XP−ax ′ × ZR1, YP + ay ′ × ZR1), and the position of K ′ is (XP + ax ′ × ZR1, YP + ay ′ × ZR1). However, XP = DX / 2 + ZR1 × (X1−X0) and YP = DY / 2 + ZR1 × (Y1−Y0).

探索領域設定部29は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と相違する場合には、保持部28で前時点のフレーム画像におけるオブジェクト探索領域が保持されていれば、その保持されているオブジェクトの探索領域と、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する。   If the zoom magnification of the current frame image is different from the zoom magnification of the previous frame image, the search area setting unit 29 may hold the object search area in the previous frame image in the holding unit 28. Zoom (enlarge or reduce) based on the search area of the held object, the center coordinates of the zoom in the previous frame image, and the ratio of the zoom factor of the previous frame image to the zoom factor of the current frame image ) Is set as an object search area in the current frame image.

図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) th frame image 603, it is assumed that an image reduced by setting the zoom center to L2 and the zoom magnification ratio to ZR2 is the (i + 2) th frame image 610. Here, ZR2 <1.

探索領域設定部29は、保持部28で保持されているM′、H′、I′、J′、K′の位置と、ズームの中心座標L2(X0′,Y0′)、ズーム倍率の比ZR2を用いて、M″を中心とし、H″、I″、J″、K″を頂点としたオブジェクトの探索領域612を求める。   The search area setting unit 29 compares the positions of M ′, H ′, I ′, J ′, and K ′ held by the holding unit 28 with the zoom center coordinates L2 (X0 ′, Y0 ′) and the zoom magnification. Using ZR2, a search area 612 of an object having M ″ as the center and H ″, I ″, J ″, and K ″ as vertices is obtained.

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 region input unit 4 receives information representing an object region to be tracked from the object detection device. The object area setting unit 6 sets the object area output from the object detection apparatus as an initial object area (step S101).

次に、テンプレート登録部7は、オブジェクト検出装置から出力される対象オブジェクトの画像を初期テンプレートとしてテンプレート記憶部8に記憶する(ステップS102)。   Next, the template registration unit 7 stores the image of the target object output from the object detection device in the template storage unit 8 as an initial template (step S102).

次に、画像入力部2は、カメラI/Fから現時点のフレーム画像を受ける(ステップS103)。   Next, the image input unit 2 receives the current frame image from the camera I / F (step S103).

次に、パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けた場合には(ステップS104でYES)、探索領域設定部29は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と相違するので、前時点のフレーム画像におけるオブジェクト領域を含み、そのオブジェクト領域よりも所定倍数だけ大きな領域(基準領域)を求め、さらにその基準領域を、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する(ステップS105)。   Next, when the parameter input unit 3 receives the zoom magnification and the zoom center coordinates from the CPU 1002 (YES in step S104), the search area setting unit 29 sets the current frame image zoom magnification to the previous time point. Since it is different from the zoom magnification of the frame image, an object area in the previous frame image is obtained, and an area (reference area) larger than the object area by a predetermined multiple is obtained, and the reference area is further determined in the previous frame image. Based on the zoom center coordinates and the ratio of the zoom magnification of the previous frame image to the zoom magnification of the current frame image, the zoomed (enlarged or reduced) area is set as the object search area in the current frame image ( Step S105).

設定された探索領域の一部または全部が現時点のフレーム画像の外にはみ出した場合には(ステップ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 parameter input unit 3 does not receive the zoom magnification and the zoom center coordinates from the CPU 1002 (NO in step S104), the search area setting unit 29 determines that the current frame image has a zoom magnification of the previous time point. Since it is the same as the zoom magnification of the image, a reference area that includes the object area in the previous frame image and is larger than the object area by a predetermined multiple is set as the object area in the current frame image (step S106).

次に、正規化部10は、現時点のフレーム画像におけるオブジェクトの探索領域の画像を固定サイズに正規化して正規化探索画像を生成する(ステップS107)。   Next, the normalization unit 10 normalizes the image of the object search area in the current frame image to a fixed size to generate a normalized search image (step S107).

次に、マッチング部11は、正規化探索画像の中から、テンプレート記憶部8に記憶されているテンプレート画像と類似する領域を検索して、類似度が所定値以上となる部分を探す。   Next, the matching unit 11 searches the normalized search image for a region similar to the template image stored in the template storage unit 8 and searches for a portion where the similarity is equal to or greater than a predetermined value.

マッチング部11が、類似度が所定値以上となる部分を発見した場合、すなわちマッチングが成功した場合には(ステップS108でYES)、マッチング部11は、その発見した部分を現フレームのオブジェクト領域として特定し、その領域を表わす情報をCPU1002へ出力する(ステップS109)。   When the matching unit 11 finds a part where the similarity is equal to or greater than a predetermined value, that is, when the matching is successful (YES in step S108), the matching unit 11 sets the found part as the object area of the current frame. The information specifying the area is output to the CPU 1002 (step S109).

オブジェクト領域設定部6は、マッチング部11によって特定されたオブジェクト領域を新たなオブジェクト領域に設定する(ステップS110)。   The object area setting unit 6 sets the object area specified by the matching unit 11 as a new object area (step S110).

テンプレート登録部7は、マッチング部11によって特定されたオブジェクト領域の画像でテンプレート記憶部8内のテンプレート画像を更新する(ステップS111)。   The template registration unit 7 updates the template image in the template storage unit 8 with the image of the object area specified by the matching unit 11 (step S111).

その後、ステップ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 matching unit 11 has not found a portion where the degree of similarity is equal to or greater than the predetermined value, that is, if the matching has failed (NO in step S108), the matching unit 11 returns the object to the object detection device again. The detection is instructed (step S112).

(復帰処理)
図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 unit 28 holds information representing the set search area (step S501).

画像入力部2は、カメラI/Fから次の時点のフレーム画像を受ける(ステップS502)。   The image input unit 2 receives the next frame image from the camera I / F (step S502).

パラメータ入力部3が、CPU1002からズーム倍率とズームの中心座標とを受けた場合には(ステップS503でYES)、探索領域設定部29は、現時点のフレーム画像のズーム倍率が前時点のフレーム画像のズーム倍率と相違するので、保存している前時点のフレーム画像におけるオブジェクト探索領域と、前時点のフレーム画像におけるズームの中心座標、前時点のフレーム画像のズーム倍率と現時点のフレーム画像のズーム倍率との比に基づいて、ズーム(拡大または縮小)した領域を現時点のフレーム画像におけるオブジェクトの探索領域に設定する(ステップS504)。   When the parameter input unit 3 receives the zoom magnification and the zoom center coordinates from the CPU 1002 (YES in step S503), the search area setting unit 29 determines that the current frame image zoom magnification is that of the previous frame image. Since it is different from the zoom magnification, the object search area in the frame image at the previous time point stored, the center coordinates of the zoom in the frame image at the previous time point, the zoom magnification of the frame image at the previous time point, and the zoom magnification of the current frame image Based on this ratio, the zoomed (enlarged or reduced) area is set as the object search area in the current frame image (step S504).

設定された探索領域の一部または全部が現時点のフレーム画像の外にはみ出した場合には(ステップ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 SYMBOLS 11 Matching part, 28 Holding part, 1000 Digital camera, 1001 Camera I / F, 1002 CPU, 1003 SDRAM, 1004 ROM, 1005 User operation part I / F, 1006 Object detection apparatus, 1007 LCD I / F, 1008 Card I / F 51,1009 Object tracking device, 1011 Image processing device.

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.
前記第2探索領域に前記追跡対象オブジェクトの一部または全部が含まれない場合、前記フレーム画像群からの探索を継続することを特徴とする請求項3または4記載のデジタルカメラ。 The second case of the the search area does not contain some or all of the tracked object, according to claim 3 or 4 digital camera, wherein the to continue the search from the frame image group.
JP2015095681A 2015-05-08 2015-05-08 Digital camera Expired - Fee Related JP6062483B2 (en)

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)

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

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

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