JP4387889B2 - Template collation apparatus and method - Google Patents

Template collation apparatus and method Download PDF

Info

Publication number
JP4387889B2
JP4387889B2 JP2004209089A JP2004209089A JP4387889B2 JP 4387889 B2 JP4387889 B2 JP 4387889B2 JP 2004209089 A JP2004209089 A JP 2004209089A JP 2004209089 A JP2004209089 A JP 2004209089A JP 4387889 B2 JP4387889 B2 JP 4387889B2
Authority
JP
Japan
Prior art keywords
template
sub
local region
distance
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004209089A
Other languages
Japanese (ja)
Other versions
JP2006031392A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2004209089A priority Critical patent/JP4387889B2/en
Publication of JP2006031392A publication Critical patent/JP2006031392A/en
Application granted granted Critical
Publication of JP4387889B2 publication Critical patent/JP4387889B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

本発明は、テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合装置および方法であって、例えば、入力信号が音・映像の場合は、テレビ・ラジオ放送などからのCM・楽曲検出技術などに、画像の場合は、人物や物体などのコンテンツの検索・位置推定などに用いて好適な、テンプレート照合装置および方法に関する。   The present invention relates to a template collation apparatus and method for detecting a signal similar to a known signal given as a template from an input signal that is input and taken in, and obtaining the position thereof, for example, when the input signal is sound / video Relates to a template collation apparatus and method suitable for CM / music detection technology from TV / radio broadcasting, etc., and in the case of images, for searching / position estimation of content such as a person or an object.

画像から目的の物体を探索して見つけ出す技術は,画像データベースからの検索、映像データに対するインデックスの付与、物体の追跡など、広範な応用分野における要素技術である。代表的な技術にテンプレート照合法がある(例えば、非特許文献1参照)。   A technique for searching for and finding a target object from an image is an elemental technique in a wide range of application fields such as searching from an image database, assigning an index to video data, and tracking an object. A typical technique is a template matching method (see Non-Patent Document 1, for example).

テンプレート照合法は、目的物体の画像(テンプレート)と類似する入力画像上の部分領域を見つけ出す技術である。テンプレート内の各画素のRGB値を要素とするベクトルをTと表記する。テンプレート照合法では、入力画像上にテンプレートTと同じサイズの窓をあて、窓とテンプレートの距離を計算する。その距離には,絶対値距離(SAD:Sum of Absolute Differences)や2乗距離(SSD:Sum of Square Differences)が広く用いられる。画像上のある位置(u,v)における窓の各面素のRGB値を要素とするベクトルをW(u,v)で表現したとき、絶対値距離SADは、以下の式(1)で示される。 The template matching method is a technique for finding a partial region on an input image similar to an image (template) of a target object. A vector having the RGB value of each pixel in the template as an element is denoted as T. In the template matching method, a window having the same size as the template T is assigned to the input image, and the distance between the window and the template is calculated. As the distance, an absolute value distance (SAD: Sum of Absolute Differences) and a square distance (SSD: Sum of Square Differences) are widely used. When a vector whose elements are RGB values of each surface element of a window at a certain position (u, v) on the image is expressed by W (u, v) , the absolute value distance SAD is expressed by the following equation (1). It is.

Figure 0004387889
Figure 0004387889

ここで、T、WはそれぞれT,W(u,v)のp番目の輝度である。入力画像上で窓を走査して(u,vを変えて)距離を計算し、距離が最小、あるいはあらかじめ設定した閾値以下の位置を求める。
テンプレート照合法では、テンプレートと窓の距離の計算量が大きく、また、走査する窓の数が多いという問題がある。計算量を削減するために、距離の計算量を削減する手法と、距離計算回数を削減する手法がある。
Here, T p and W p are the p-th luminances of T and W (u, v) , respectively. The window is scanned on the input image (by changing u and v), and the distance is calculated, and the position where the distance is the minimum or less than the preset threshold is obtained.
The template matching method has a problem that the amount of calculation of the distance between the template and the window is large and the number of windows to be scanned is large. In order to reduce the amount of calculation, there are a method of reducing the amount of calculation of distance and a method of reducing the number of distance calculations.

距離の計算量を削減する代表的な手法には、逐次残差検定法(SSDA:Sequential Similarity Detection Algorithm)がある(例えば、非特許文献2参照)。逐次残差検定法では、距離計算の途中で閾値と随時比較し、閾値を超えたとき、その処理を終了する。Chaoらは、距離計算時における閾値を計算した画素数に応じて適切に変えることで、SSDAを効果的に実行している(例えば、非特許文献3参照)。   A typical method for reducing the amount of calculation of distance is a sequential residual test method (SSDA: Sequential Similarity Detection Algorithm) (see, for example, Non-Patent Document 2). In the sequential residual test method, a comparison is made with a threshold value at any time during distance calculation, and when the threshold value is exceeded, the processing is terminated. Chao et al. Effectively executes SSDA by appropriately changing the threshold value at the time of distance calculation according to the calculated number of pixels (see, for example, Non-Patent Document 3).

距離計算の回数を削減する代表的な手法には、2段階テンプレート照合法がある(例えば、非特許文献4参照)。2段階テンプレートでは、テンプレートの一部であるサブテンプレートを用いて、各窓での、距離下限値を計算し、距離下限値が閾値以下の窓のみテンプレート全休で照合を行う。また、Liらは、テンプレートTのベクトルの大きさ|T|と各窓のベクトルWの大きさ|W|に対して三角不等式を適用し、照合不要な領域を算出している(非特許文献5参照)。
Leeらは、低解像度の画像で距離を計算し、その距離から高解像度画像での距離下限値を計算することによって、効率的に照合不要な領域を計算している(例えば、非特許文献6参照)。しかしながら、上記の手法は、既に照合した窓とテンプレートの距離と、閾値との差から削減可能かどうかを判定するものがほとんどであるため、計算量の削減幅には限界があった。
A typical method for reducing the number of distance calculations is a two-step template matching method (see, for example, Non-Patent Document 4). In the two-stage template, a sub-template that is a part of the template is used to calculate the lower limit value of the distance in each window, and only the windows whose distance lower limit value is equal to or less than the threshold value are collated with all template rest. Li et al. Calculate a region that does not require matching by applying a triangular inequality to the vector size | T | of the template T and the size | W | of each window vector W (non-patent document). 5).
Lee et al. Calculate an area that does not need to be collated efficiently by calculating a distance with a low-resolution image and calculating a distance lower limit value with a high-resolution image from the distance (for example, Non-Patent Document 6). reference). However, most of the above methods determine whether or not reduction is possible based on the difference between the already-matched distance between the window and the template and the threshold value.

一方、これまで我々が開発してきたアクティブ探索法は、ある窓での照合結果を利用してその近傍の窓における類似値の上限値を計算し、上限値が閾値を下回る場合に、照合を省略するため、極めて効率よく、不要な照合を省略できる(例えば、非特許文献7、8、特許文献1、2参照)。
しかしながら、特徴にヒストグラムを利用するため、形状情報や色の距離情報が失われ、細かい形の違いや、位置決め制度が重要になる場合には適用することが難しく、また類似色ヒストグラムを持つ異なる窓を誤検出することも起こりえた。
On the other hand, the active search method we have developed so far calculates the upper limit value of similar values in a neighboring window using the result of matching in a certain window, and omits matching when the upper limit value falls below the threshold. Therefore, unnecessary verification can be omitted very efficiently (see, for example, Non-Patent Documents 7 and 8 and Patent Documents 1 and 2).
However, since the histogram is used for the feature, shape information and color distance information are lost, so it is difficult to apply when the difference in fine shape or positioning system is important, and different windows with similar color histograms It was also possible to falsely detect.

また、我々はこれまで、テンプレート内のサブテンプレートの類似性を利用して効率よ<照合の省略を行うSkipping Template Matching(STM)法を開発した(例えば、非特許文献9、10参照)。
ここに開示された技術によれば、目的とする物体のテンプレートから生成されるサブテンプレート間の類似性が高いことが多い場合には、上記した従来の手法よりも効果的に照合操作を省略できる。
In addition, we have developed a Skipping Template Matching (STM) method that uses the similarity of sub-templates in a template to efficiently perform matching (see, for example, Non-Patent Documents 9 and 10).
According to the technology disclosed herein, when the similarity between sub-templates generated from a template of a target object is often high, the matching operation can be omitted more effectively than the conventional method described above. .

しかしながら、物体が3次元形状を持つ場合、カメラと物体の位置関係によって、カメラが撮影した物体の画像は、見え方(物体の向きや大きさ)が異なるため、見え方に対応した多数のテンプレートを準備する必要がある。物休の画像が異なっても高速に探索する技術には、サイズや向きの異なる多数の物体の画像を探索する手法がある。多数のテンプレートを用いることによる計算量の増大を軽減するため、部分空開法を使ってテンプレートの次元数を圧縮する手法などが提案されている(例えば、非特許文献11参照)。しかしながら、次元圧縮の計算量コストが大きく、さらなる高速化が期待されている。
尾上(編):“画像処理ハンドブッグ、昭晃堂(1987) D.I. Barnea and H.F. Silverman: A class of algorithms for fast digital image registration¥", IEEE Trans. on Comput・, C-21, 2, pp.179-186(1972) H.C. Chao, Y.P.Hung and W.L Hwang:Adaptive early jump-out technique for fast motion estimation in video coding", Proc. 0f ICPR1996,Vol.2, pp.864-868(1996) A, Hatabu, T, Miyazaki and I.Kuroda:‘'Optimization of decision-timing for early termination of SDDA-based block matching", Proc. of 1CME 2003, vol・2,pp.821-824 (2003) G.J, Vanderbrug and A・ Rosenfeld: "Two stage template matching",IEEE Trans. on Comput・ , C-26, 4, pp.384-393, 1 977 W. Li and E, Salari: '‘Successive elimination algorithm for motion estimation"FIEEE Trans. on Image Processing, 4.1 , pp. 105-107 (1995) V.V, Vinod and H . M urase: ‘'Focused color intersection with efficient searching for object extraction“, Pattern Recognition, 30, 10pp. 1787-1797(1997) T. Kawanishi, H. M urase, S. Takagi and M. Werner:j' Dynamic Active Search for quick object detection with pantilt-zoom camera", Proc. of ICIP 2001,Vol. 31 pp. 716-719(2001) 川西、黒住、柏野、高木:“参照画像の部分領域の残瀋情報を利用した高速テンプレート照合法", FIT2003情報科学技術フォーラム情報レターズ,2,pp.175-176 (2003) T, Kawanishi, T. Kurozumi, S. Takagi and K, Kashino: “Skipping Template Matching guaranteeing same accuracy as exhaustive search", Proc. of the Fifth Intl.Conf.of Advances on Pattern Recognition, pp. 209-212 (2003) 村瀬,S.K.Nayer:“2次元照合による3次元物体認識−パラメトリック固有空間法−”信学会(D-II),J77-D-II,11,pp.2179-2187(1994) 特開平9330404号公報 特開2002−312343号公報
However, when the object has a three-dimensional shape, the image of the object photographed by the camera differs depending on the positional relationship between the camera and the object, so that the appearance (the direction and size of the object) differs. Need to prepare. There is a technique for searching for images of a large number of objects having different sizes and orientations as a technique for searching at high speed even when the images of the holiday are different. In order to reduce the increase in the amount of calculation due to the use of a large number of templates, a method of compressing the number of dimensions of the template using a partial empty method has been proposed (for example, see Non-Patent Document 11). However, the computational cost of dimensional compression is large, and further speedup is expected.
Onoe (edit): “Image processing handbook, Shosodo (1987) DI Barnea and HF Silverman: A class of algorithms for fast digital image registration ¥ ", IEEE Trans. On Comput ・, C-21, 2, pp.179-186 (1972) HC Chao, YPHung and WL Hwang: Adaptive early jump-out technique for fast motion estimation in video coding ", Proc. 0f ICPR1996, Vol.2, pp.864-868 (1996) A, Hatabu, T, Miyazaki and I. Kuroda: `` Optimization of decision-timing for early termination of SDDA-based block matching '', Proc. Of 1CME 2003, vol.2, pp.821-824 (2003) GJ, Vanderbrug and A. Rosenfeld: "Two stage template matching", IEEE Trans. On Comput, C-26, 4, pp. 384-393, 1 977 W. Li and E, Salari: '' Successive elimination algorithm for motion estimation '' FIEEE Trans. On Image Processing, 4.1, pp. 105-107 (1995) VV, Vinod and H. Murase: '' Focused color intersection with efficient searching for object extraction “, Pattern Recognition, 30, 10pp. 1787-1797 (1997) T. Kawanishi, H. Murase, S. Takagi and M. Werner: j 'Dynamic Active Search for quick object detection with pantilt-zoom camera ", Proc. Of ICIP 2001, Vol. 31 pp. 716-719 (2001) Kawanishi, Kurosumi, Sugano, Takagi: “High-speed template matching method using residual information of partial region of reference image”, FIT2003 Information Science and Technology Forum Information Letters, 2, pp.175-176 (2003) T, Kawanishi, T. Kurozumi, S. Takagi and K, Kashino: “Skipping Template Matching guaranteeing same accuracy as exhaustive search”, Proc. Of the Fifth Intl. Conf. Of Advances on Pattern Recognition, pp. 209-212 (2003 ) Murase, SKNayer: "3D object recognition by 2D matching-parametric eigenspace method-" Shinsei Gakkai (D-II), J77-D-II, 11, pp.2179-2187 (1994) Japanese Patent Laid-Open No. 9330404 JP 2002-31343 A

本発明は上記事情に鑑みてなされたものであり、ヒストグラムを用いない場合であっても全照合とおなじ照合精度を保証しながら、テンプレートの一部であるサブテンプレートとある局所領域の一部での照合結果を利用して、テンプレートとその局所領域、さらにはその近傍の局所領域との照合を極力省略し、上記したテンプレート照合の一層の高速化をはかった、テンプレート照合装置および方法を提供することを目的とする。   The present invention has been made in view of the above circumstances, and even in the case where a histogram is not used, while guaranteeing the same collation accuracy as the entire collation, the sub-template which is a part of the template and a part of a certain local region. By using the result of matching, a template matching apparatus and method are provided that eliminates matching between a template and its local region, as well as a local region in the vicinity thereof, as much as possible, and further speeds up the template matching described above. For the purpose.

また、上記したように3次元物体の認識では多数のテンプレートが必要となり、STM法を個々のテンプレートに独立に適用すれば、計算時間はテンプレートの枚数に比例して増大し、このため、向きやカメラまでの距離等の撮影パラメータが類似したテンプレート同士は、類似性を持つと予想される。このため、テンプレート間の類似性を利用することにより照合回数を削減することのできるテンプレート照合装置および方法を提供することも目的とする。   In addition, as described above, a large number of templates are required for recognition of a three-dimensional object, and if the STM method is applied to each template independently, the calculation time increases in proportion to the number of templates. Templates having similar imaging parameters such as the distance to the camera are expected to have similarities. Therefore, another object of the present invention is to provide a template collation apparatus and method that can reduce the number of collations by utilizing the similarity between templates.

上記した課題を解決するために本発明は、テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合装置であって、前記テンプレートから段階的にサイズの異なるサブテンプレートを生成するサブテンプレート生成部と、前記入力信号と、前記サブテンプレート生成部によって順次生成されるサブテンプレートとの距離値を計算し、類似することが確認された場合、テンプレート全体との距離値を追加計算するマッチング演算部と、を具備することを特徴とする。   In order to solve the above-described problem, the present invention is a template collation apparatus that detects a signal similar to a known signal given as a template from an input signal that is inputted and taken in, and obtains the position thereof. When calculating a distance value between a sub-template generation unit that generates sub-templates of different sizes, the input signal, and sub-templates sequentially generated by the sub-template generation unit, and confirming that they are similar, And a matching operation unit that additionally calculates a distance value with respect to the entire template.

また、本発明において、前記マッチング演算部は、前記段階的にサイズの異なるすべてのサブテンプレートについて、前記テンプレート上の当該サブテンプレートと同じ大きさのあらゆる部分領域との距離値を計算する自己距離値計算部と、前記入力信号上で、前記テンプレートと同じ大きさのあらゆる局所領域を設定する局所領域設定部と、前記局所領域の順序を並び換える局所領域順序設定部と、前記局所領域順序設定部で設定された順に一つの局所領域を取り出し候補局所領域とし、該候補局所領域と前記テンプレート間の距離下限値をあらかじめ定義された閾値と比較した結果、次に照合すべき候補局所領域を選択する候補局所領域選択部と、前記段階的サブテンプレート生成部で得られる複数のサブテンプレートから、サイズの小さい順にサブテンプレートを一つ選択するサブテンプレート選択部と、前記候補局所領域選択部から得られる候補局所領域の一部の領域と、前記サブテンプレート選択部で得られるサブテンプレートとを逐次照合して部分距離値を計算する部分距離値計算部と、前記部分距離値計算部で得られた部分距離値が類似する場合、前記テンプレートの残りの領域と、前記候補局所領域の残りの領域との距離を追加して、前記テンプレートと当該候補局所領域間との距離値を求める追加距離値計算部と、前記追加距離値計算部で得られた距離値が目標とする閾値を下回る場合、その検出結果と前記閾値を更新する検出結果更新部と、前記自己距離値計算部、ならびに前記部分距離値計算部で計算され出力されるそれぞれの距離値を用いて、前記候補局所領域近傍の局所領域の距離下限値を更新することにより、前記テンプレートに類似する信号が存在する可能性がない局所領域候補を削除する候補局所領域枝刈部と、を具備することを特徴とする。   Further, in the present invention, the matching calculation unit calculates a distance value between all sub-templates having different sizes in stages and any partial area having the same size as the sub-template on the template. A calculation unit, a local region setting unit for setting any local region having the same size as the template on the input signal, a local region order setting unit for rearranging the order of the local regions, and the local region order setting unit One local region is extracted in the order set in step (3) and set as a candidate local region. The lower limit of the distance between the candidate local region and the template is compared with a predefined threshold value, and the candidate local region to be matched next is selected. From the plurality of subtemplates obtained by the candidate local region selection unit and the stepwise subtemplate generation unit, the size is reduced. A sub template selection unit that selects one sub template in order, a partial region of the candidate local region obtained from the candidate local region selection unit, and a sub template obtained by the sub template selection unit are sequentially collated. When the partial distance value calculation unit that calculates the partial distance value and the partial distance value obtained by the partial distance value calculation unit are similar, the distance between the remaining area of the template and the remaining area of the candidate local area When the distance value obtained by the additional distance value calculation unit for obtaining the distance value between the template and the candidate local region is less than the target threshold value, the detection result And the detection result update unit for updating the threshold, the self-distance value calculation unit, and the respective distance values calculated and output by the partial distance value calculation unit, A candidate local region pruning unit that deletes a local region candidate that is unlikely to have a signal similar to the template by updating a distance lower limit value of the local region in the vicinity of the region. .

また、本発明は、テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合装置であって、前記テンプレートから所定のサイズのサブテンプレートを複数生成するサブテンプレート生成部と、前記サブテンプレートから照合を行う参照サブテンプレートを前記テンプレート毎に決定する参照サブテンプレート決定部と、前記テンプレートのうち特徴が類似するテンプレートをグルーピングし、当該グループ内で前記テンプレートに跨るサブテンプレートの自己距離値を事前に算出し、前記ある参照サブテンプレートで照合した結果を前記グループ内に反映させるマッチング演算部と、を具備することを特徴とする。   Further, the present invention is a template collation device that detects a signal similar to a known signal given as a template from an input signal that is inputted and taken in, and obtains the position thereof. A sub-template of a predetermined size is obtained from the template. A plurality of sub-template generation units, a reference sub-template determination unit that determines, for each template, a reference sub-template to be collated from the sub-template, and templates having similar characteristics among the templates are grouped, and A matching calculation unit that calculates in advance a self-distance value of a sub-template straddling the template and reflects the result of matching with the certain reference sub-template in the group.

また、本発明において、前記マッチング演算部は、前記参照サブテンプレート決定部で決定される参照サブテンプレートと、同グループ内のサブテンプレートとの距離値をテンプレートに跨ってすべて計算する自己距離値計算部と、前記入力信号上で前記テンプレートと同じサイズのあらゆる局所領域を設定する局所領域設定部と、前記局所領域の順序を並び換える局所領域順序設定部と、前記参照サブテンプレート決定部で決定された参照サブテンプレートの集合から、順次参照サブテンプレートを取り出す参照サブテンプレート選択部と、前記局所領域順序設定部により設定された順に一つの局所領域を取り出し候補局所領域とする候補局所領域選択部と、前記候補局所領域選択部で選択された候補局所領域と前記テンプレートとの距離下限値をあらかじめ定義された閾値と比較する距離下限値評価部と、前記候補局所領域選択部から得られる候補局所領域の一部と、前記参照サブテンプレート選択部で選択された参照サブテンプレートとを照合し、部分距離値を計算する部分距離値計算部と、前記部分距離値計算部で得られた部分距離値が類似する場合、前記テンプレートの残りの領域と、前記候補局所領域の残りの領域との距離を追加して、前記テンプレートと候補局所領域間との距離値を計算する追加距離値計算部と、前記追加距離値計算部で得られた距離値が、目標とする閾値を下回る場合に、その検出結果と前記閾値を更新する検出結果更新部と、前記自己距離値計算部、ならびに前記部分距離値計算部で計算されたそれぞれの距離値を用い、前記候補局所領域近傍の局所領域の距離下限値を更新することにより前記テンプレートに類似する信号が存在する可能性のない局所領域候補を削除する候補局所領域枝刈部と、を具備することを特徴とする。   Further, in the present invention, the matching calculation unit is a self-distance value calculation unit that calculates all distance values between the reference sub template determined by the reference sub template determination unit and a sub template in the same group across the template. And a local region setting unit that sets every local region of the same size as the template on the input signal, a local region order setting unit that rearranges the order of the local regions, and the reference subtemplate determination unit A reference sub-template selection unit that sequentially extracts reference sub-templates from a set of reference sub-templates, a candidate local region selection unit that extracts one local region in the order set by the local region order setting unit and serves as a candidate local region, The distance between the candidate local region selected by the candidate local region selector and the template A distance lower limit evaluation unit that compares a limit value with a predefined threshold, a part of a candidate local region obtained from the candidate local region selection unit, and a reference subtemplate selected by the reference subtemplate selection unit If the partial distance value obtained by the partial distance value calculation unit and the partial distance value calculation unit that collate and calculate the partial distance value are similar, the remaining area of the template and the remaining area of the candidate local area When the distance value obtained by the additional distance value calculation unit calculating the distance value between the template and the candidate local region is less than the target threshold value And using the respective distance values calculated by the detection result update unit for updating the detection result and the threshold, the self-distance value calculation unit, and the partial distance value calculation unit, Characterized by comprising a candidate local region pruning unit to remove the local region candidate similar signal is not likely to be present in the template by updating the distance limit value of the local region.

また、本発明において、前記部分距離値計算部、および前記追加距離値計算部は、前記距離値を順次計算し、近似的に計算の必要がない、もしくは既に計算の必要がないと判断された時点で計算を終了することを特徴とする。   Further, in the present invention, the partial distance value calculation unit and the additional distance value calculation unit sequentially calculate the distance value, and it is determined that there is no need for calculation approximately or that calculation is not necessary. The calculation is terminated at the time.

また、本発明において、前記サブテンプレート生成部は、前記自己距離値計算部によって算出される自己距離値の最大値が、最小になるサブテンプレートを段階的に生成することを特徴とする。   In the present invention, the sub template generation unit may generate a sub template in which the maximum value of the self distance value calculated by the self distance value calculation unit is minimized.

また、本発明において、前記参照テンプレート決定部は、グループ内のすべてのサブテンプレート間距離値の最大値が、最小となるようなサブテンプレートを参照サブテンプレートとして決定することを特徴とする。   In the present invention, the reference template determining unit may determine a sub template having a minimum maximum distance value between all the sub templates in the group as a reference sub template.

また、本発明において、前記局所領域順序設定部は、所定の間隔を空けて前記順序の並び替えを行うことを特徴とする。   In the present invention, the local region order setting unit rearranges the order at a predetermined interval.

また、本発明において、前記局所領域順序設定部は、前記距離値の分布に基づき、適当な間隔を持つように並び替えを随時行うことを特徴とする。   In the present invention, the local region order setting unit may perform rearrangement at any time based on the distribution of the distance values so as to have an appropriate interval.

また、本発明において、前記局所領域順序設定部は、前記入力信号を再帰的に分割したピラミッド画像の中心の位置を大きな画像から順に並べ、前記候補局所領域を取り出す順序に用いることを特徴とする。   Further, in the present invention, the local region order setting unit arranges the positions of the centers of pyramid images obtained by recursively dividing the input signal in order from a large image, and uses the order for extracting the candidate local regions. .

また、本発明において、前記局所領域順序設定部は、前記局所領域候補順序を2進数表現し、最上位の1より下位の値をビット反転し、昇順もしくは降順に並べ直したものから順に並べ、前記候補局所領域を取り出す順序に用いることを特徴とする。   In the present invention, the local region order setting unit expresses the local region candidate order as a binary number, bit-inverts a value lower than the highest one, and rearranges them in ascending or descending order, The candidate local regions are used in the order of extraction.

また、本発明において、前記入力信号および前記テンプレートに1次元の音信号を用いることを特徴とする。   In the present invention, a one-dimensional sound signal is used for the input signal and the template.

また、本発明において、前記入力信号およびテンプレートに1次元の映像信号を用いることを特徴とする。   In the present invention, a one-dimensional video signal is used for the input signal and the template.

また、本発明において、前記入力信号およびテンプレートに2次元の画像信号を用いることを特徴とする。   In the present invention, a two-dimensional image signal is used for the input signal and the template.

また、本発明は、テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合方法であって、前記テンプレートから段階的にサイズの異なるサブテンプレートを生成する第1のステップと、前記入力信号と、順次生成されるサブテンプレートとの距離値を計算し、類似することが確認された場合、テンプレート全体との距離値を追加計算する第2のステップと、を有することを特徴とする。   The present invention also relates to a template matching method for detecting a signal similar to a known signal given as a template from an input signal that is input and fetched, and obtaining the position thereof. A first step of generating a template; a second value for calculating a distance value between the input signal and sequentially generated sub-templates; These steps are included.

また、本発明において、前記第2のステップは、前記段階的にサイズの異なるすべてのサブテンプレートについて、前記テンプレート上の当該サブテンプレートと同じ大きさのあらゆる部分領域との自己距離値を計算するサブステップと、前記入力信号上で、前記テンプレートと同じ大きさのあらゆる局所領域を設定するサブステップと、前記局所領域の順序を並び換えるサブステップと、前記設定された順に一つの局所領域を取り出し候補距離所領域とし、該候補局所領域と前記テンプレート間の距離下限値をあらかじめ定義された閾値と比較した結果、次に照合すべき候補局所領域を選択するサブステップと、前記複数のサブテンプレートから、サイズの小さい順にサブテンプレートを一つ選択するサブステップと、前記選択された候補局所領域の一部の領域と、前記選択されたサブテンプレートとを逐次照合して部分距離値を計算するサブステップと、前記得られた部分距離値が類似する場合、前記テンプレートの残りの領域と、前記候補局所領域の残りの領域との距離を追加して、前記テンプレートと当該候補局所領域間との距離値を求めるサブステップと、前記得られた距離値が目標とする閾値を下回る場合、その検出結果と前記閾値を更新するサブステップと、前記計算され出力される自己距離値ならびに部分距離値を用いて、前記候補局所領域近傍の局所領域の距離下限値を更新することにより、前記テンプレートに類似する信号が存在する可能性がない局所領域候補を削除するサブステップと、を有することを特徴とする。   Also, in the present invention, the second step is a sub-calculation for calculating a self-distance value with respect to all sub-templates having different sizes in a stepwise manner with any partial region having the same size as the sub-template on the template. A sub-step for setting all local regions of the same size as the template on the input signal, a sub-step for rearranging the order of the local regions, and extracting one local region in the set order and selecting candidates As a result of comparing the lower limit value of the distance between the candidate local region and the template with a predefined threshold as a distance area, a sub-step of selecting a candidate local region to be matched next, from the plurality of sub-templates, A sub-step of selecting one sub-template in ascending order of size, and the selected candidate A sub-step of calculating a partial distance value by sequentially comparing a partial area of the predetermined area and the selected sub-template, and if the obtained partial distance value is similar, the remaining area of the template Adding a distance with the remaining area of the candidate local area, substep for obtaining a distance value between the template and the candidate local area, and when the obtained distance value is below a target threshold value, The template is obtained by updating a distance lower limit value of a local region in the vicinity of the candidate local region using the detection result and a sub-step of updating the threshold, and the calculated and output self-distance value and partial distance value. And a sub-step of deleting a local region candidate that is unlikely to have a signal similar to.

また、本発明は、テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合方法であって、前記テンプレートから所定のサイズのサブテンプレートを複数生成する第1のステップと、前記サブテンプレートから照合を行う参照サブテンプレートを前記テンプレート毎に決定する第2のステップと、前記テンプレートのうち特徴が類似するテンプレートをグルーピングし、当該グループ内で前記テンプレートに跨るサブテンプレートの自己距離値を事前に算出し、前記ある参照サブテンプレートで照合した結果を前記グループ内に反映させる第3のステップと、
を有することを特徴とする。
Further, the present invention is a template matching method for detecting a signal similar to a known signal given as a template from an input signal that is inputted and taken in, and obtaining the position thereof. A sub-template of a predetermined size is obtained from the template. A first step of generating a plurality of steps, a second step of determining for each template a reference sub-template to be matched from the sub-template, and templates having similar characteristics among the templates, and grouping the templates within the group A third step of calculating in advance the self-distance value of the sub-template straddling the template and reflecting the result collated with the certain reference sub-template in the group;
It is characterized by having.

また、本発明において、前記第3のステップは、前記決定される参照サブテンプレートと、同グループ内のサブテンプレートとの自己距離値をテンプレートに跨ってすべて計算するサブステップと、前記入力信号上で前記テンプレートと同じサイズのあらゆる局所領域を設定するサブステップと、前記局所領域の順序を並び換えるサブステップと、前記決定された参照サブテンプレートの集合から、順次参照サブテンプレートを選択するサブステップと、前記設定された順に候補局所領域を選択するサブステップと、前記選択された候補局所領域と前記テンプレートとの距離下限値をあらかじめ定義された閾値と比較するサブステップと、前記選択された候補局所領域の一部と、前記選択された参照サブテンプレートとを照合し、部分距離値を計算するサブステップと、前記部分距離値が類似する場合、前記テンプレートの残りの領域と、前記候補局所領域の残りの領域との距離を追加して、前記テンプレートと候補局所領域間との距離値を計算するサブステップと、前記得られた前記テンプレートと候補局所領域間の距離値が、目標とする閾値を下回る場合に、その検出結果と前記閾値を更新するサブステップと、前記計算された自己距離値ならびに部分距離値を用いて、前記候補局所領域近傍の局所領域の距離下限値を更新することにより、前記テンプレートに類似する信号が存在する可能性のない局所領域候補を削除するサブステップと、を有することを特徴とする。   In the present invention, the third step includes a sub-step of calculating all self-distance values between the determined reference sub-template and a sub-template in the same group across the template, and the input signal. A sub-step of setting any local region having the same size as the template, a sub-step of rearranging the order of the local regions, and a sub-step of sequentially selecting a reference sub-template from the set of the determined reference sub-templates; A sub-step of selecting candidate local regions in the set order; a sub-step of comparing a distance lower limit value between the selected candidate local region and the template with a predefined threshold; and the selected candidate local region Are compared with the selected reference sub-template to obtain a partial distance value. When the sub-step to calculate and the partial distance value are similar, add the distance between the remaining area of the template and the remaining area of the candidate local area, and the distance value between the template and the candidate local area A sub-step of calculating the detection result and the threshold when the distance value between the obtained template and the candidate local region is lower than a target threshold, and the calculated self A sub-step of deleting a local region candidate that is unlikely to have a signal similar to the template by updating a distance lower limit value of a local region near the candidate local region using a distance value and a partial distance value; and It is characterized by having.

本発明によれば、テンプレートからサイズの異なるサブテンプレートを生成し、小さいものから順に照合操作を行い、距離値が近いと判断されたときに段階的にサイズの大きなサブテンプレートで照合することで、従来技術における2段階テンプレートマッチング法、SSDA法、AEJO法に比べ、ある領域を照合した結果、距離下限値が閾値を上回った場合に、その領域だけでなく周辺の照合を省略できるため、照合回数を少なくすることができ、このためも目的とする信号を高速に探索することができる。   According to the present invention, by generating sub-templates of different sizes from the template, performing the collating operation in order from the smallest one, and collating with the sub-template having a large size step by step when it is determined that the distance value is close, Compared to the two-step template matching method, SSDA method, and AEJO method in the prior art, when the distance lower limit value exceeds the threshold as a result of matching a certain area, it is possible to omit not only the area but also the surrounding matching. Therefore, the target signal can be searched at high speed.

また、特徴にヒストグラムを利用するアクティブ探索法に比べて、形状の情報や色の距離情報を含めて照合を行うため、細かい形の違いが重要になる場合や明度の変化などの影響を大きく受ける場合に精度が良い。特に、テンプレート内の特徴に低周波成分が多い場合には効果が大きい。   Compared with the active search method that uses histograms for features, matching is performed including shape information and color distance information, so it is greatly affected by differences in fine shapes and changes in brightness. If the accuracy is good. This is particularly effective when there are many low-frequency components in the features in the template.

また、本発明によれば、類似するテンプレート同士をグループ化し、グループ内でテンプレートに跨ったサブテンプレートの自己距離値を事前に算出しておくことで、ある参照サブテンプレートで照合した結果をグループ内で反映し、三角不等式の原理で計算の省略を行う。このため、SSDA法やテンプレート照合法、或いは部分空間法に比べて、ある領域を照合した結果、距離下限値が閾値を上回った場合、その領域だけでなく周辺の照合を省略できるため照合回数を少なくすることができ、目的とする信号を高速に探索できる。特に、テンプレートをグループ化したことで、テンプレートを跨っても距離下限値を計算することができ、従来のSTM法を高速化することができる。幾つものテンプレートを同時に照合することから、多数のテンプレートが存在する3次元物体の探索に顕著な効果が得られる。   Further, according to the present invention, similar templates are grouped together, and the self-distance value of the sub-template straddling the template within the group is calculated in advance, so that the result of matching with a certain reference sub-template The calculation is omitted by the principle of triangular inequality. For this reason, compared to the SSDA method, the template matching method, or the subspace method, if the distance lower limit value exceeds the threshold value as a result of matching a certain region, not only the region but also the surrounding matching can be omitted. The number of signals can be reduced, and the target signal can be searched at high speed. In particular, by grouping templates, the distance lower limit value can be calculated even across the templates, and the conventional STM method can be speeded up. Since a number of templates are collated at the same time, a remarkable effect can be obtained in searching for a three-dimensional object having a large number of templates.

以下、本発明実施形態に関し、図面を用いて詳細に説明する。図1は、本発明を適用した一実施形態を示すブロック図である。
本発明のテンプート照合装置は、テンプレート入力部1と、サブテンプレート生成部2と、段階的サブテンプレート生成部3と、自己距離値計算部4と、入力信号取込み部5と、局所領域設定部6と、局所領域順序設定部7と、候補局所領域選択部8と、サブテンプレート選択部9と、部分距離値計算部10と、追加距離値計算部11と、検出結果更新部12と、局所領域枝刈部13とで構成され、テンプレートと入力信号を入力とし、入力信号にテンプレートが含まれているか否かを検出し、含まれている場合にその位置と距離値を出力する機能を持つ。
なお、図1中、実線矢印は処理の流れを、点線矢印はデータ流れを示し、また、各機能ブロックは、ソフトウェアないしハードウェアによって構成されるものであり、またソフトウェアとハードウェアの組み合わせによっても実現できるものである。図2にその処理手順を、図3にテンプレート画像を、図4に入力画像の一例を示す。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment to which the present invention is applied.
The template collation apparatus of the present invention includes a template input unit 1, a sub template generation unit 2, a stepwise sub template generation unit 3, a self-distance value calculation unit 4, an input signal capture unit 5, and a local region setting unit 6. A local region order setting unit 7, a candidate local region selection unit 8, a sub template selection unit 9, a partial distance value calculation unit 10, an additional distance value calculation unit 11, a detection result update unit 12, and a local region The pruning unit 13 is configured to receive a template and an input signal, detect whether or not the template is included in the input signal, and output the position and distance value when the template is included.
In FIG. 1, the solid line arrows indicate the flow of processing, the dotted line arrows indicate the data flow, and each functional block is configured by software or hardware, or by a combination of software and hardware. It can be realized. FIG. 2 shows the processing procedure, FIG. 3 shows a template image, and FIG. 4 shows an example of an input image.

ここでは、テンプレートと入力信号中の一部の領域を、距離値によって評価する。はじめに適当な閾値を与え、探索中に見つけた最小値dminを閾値として更新することによって最も類似する局所領域を発見する方法を述べる。閾値を更新せず、閾値を下回る全てを記録してその結果を返すことももちろん容易に構成できる。
ここでは、2次元の例を用いているが、F個の要素からなる1次元の入力信号を1xFの2次元と考えることで、1次元の信号も全く同様に扱えることは明らかであり、3次元以上の信号にもまったく同じ手法で扱える。また、画像以外にも、気象データ、地図データ、遺伝子データなどの多次元ベクトル系列にも適用できる。
Here, the template and a part of the area in the input signal are evaluated by the distance value. First, a method for finding the most similar local region by giving an appropriate threshold value and updating the minimum value dmin found during the search as a threshold value will be described. Of course, it is easy to configure not to update the threshold value, but to record all the values below the threshold value and return the result.
Although a two-dimensional example is used here, it is obvious that a one-dimensional signal can be handled in exactly the same way by considering a one-dimensional input signal composed of F elements as a two-dimensional 1 × F. It is possible to handle signals of higher dimensions in exactly the same way. In addition to images, the present invention can also be applied to multidimensional vector sequences such as weather data, map data, and gene data.

具体的に、テンプレート入力部1は、さまざまな画像フォーマットで与えられた2次元画像ファイル、あるいはさまざまなフォーマットで与えられた動画ファイルから切り出された1フレームの画像の一部、リアルタイムでキャプチャされる1フレームの画像の一部から、窓関数などを用いて物体領域を抽出し、サブテンプレート生成部2に送出する(S21)。例えば、物体の窓関数としては、矩形形状でその内側だけを取り出すもの、円形状で内の内側だけを取り出すもの、物体の形状に合わせた形でその内側だけを取り出すものなどの窓関数が上げられる。ここでは矩形形状の例で説明する。
この取り出された信号をテンプレートと呼ぶ。テンプレートは、その画素値を要素とするベクトルで表現される。このテンプレートをTと表現する。サブテンプレート生成部2は、テンプレート入力部1から受理したテンプレートTからその内部のサブテンプレートRを生成する(S22)。ここで、例えば、テンプレートのもっとも左上の領域、あるいはもっとも右下の領域を用いる。また、1つのテンプレートを、多数の入力画像から探索する場合には自己距離値計算部4における自己距離値の最大値が、最小となるようなサブテンプレートを生成することもできる。
Specifically, the template input unit 1 captures in real time a part of a one-frame image cut out from a two-dimensional image file given in various image formats or a moving image file given in various formats. An object region is extracted from a part of an image of one frame using a window function or the like, and sent to the sub-template generation unit 2 (S21). For example, the window function of an object can be raised such as a rectangular shape that extracts only the inside, a circular shape that extracts only the inside, or a shape that matches the shape of the object that extracts only the inside. It is done. Here, an example of a rectangular shape will be described.
This extracted signal is called a template. The template is represented by a vector having the pixel value as an element. This template is expressed as T. The sub template generation unit 2 generates a sub template R therein from the template T received from the template input unit 1 (S22). Here, for example, the upper left region or the lower right region of the template is used. Further, when searching for a single template from a large number of input images, it is possible to generate a sub template in which the maximum value of the self-distance value in the self-distance value calculation unit 4 is minimized.

段階的サブテンプレート生成部3は、サブテンプレート生成部2から受理したサブテンプレートを最大値Rとする大きさの異なる複数の段階的サブテンプレートRを生成する。このとき、図に示されるように、段階的に拡大する多数のサブテンプレートR,…,Rが得られる。テンプレートの左上を原点として、位置(i,j)のサブテンプレートをR (i,j)と表現する。
サブテンプレート生成部2で、テンプレートの最も左上の領域をサブテンブレートに用いた場合、このサブテンプレートはR(0,0)と表現できる。この場合、段階的サブテンプレート生成部3でもサブテンプレートR(0,0)左上の領域、すなわちテンプレートの原点を基点として拡大する段階的サブテンプレートR (0,0)を生成する(S23)。一方、サブテンプレート生成部2で、テンプレートの最も右下の領域をサブテンプレートとして生成したならば、段階的サブテンプレートはテンプレートの左下を基点に生成されることになる。これらのすべてのサブテンプレートを、自己距離値計算部4に送出する(S24)。
Stepwise sub template generating unit 3 generates a plurality of phased sub-template R q of different sizes for the sub-template of acceptance from the sub-template generating unit 2 and the maximum value R Q. At this time, as shown in Figure, a number of sub-templates R O expanding stepwise, ..., R Q is obtained. The sub template at position (i, j) is expressed as R q (i, j) with the upper left corner of the template as the origin.
When the sub-template generation unit 2 uses the upper left region of the template as a sub template, this sub template can be expressed as R (0, 0) . In this case, the stepwise subtemplate generation unit 3 also generates a stepwise subtemplate R q (0,0) that expands from the upper left region of the subtemplate R (0,0) , that is, the origin of the template (S23). On the other hand, if the sub-template generation unit 2 generates the lower right region of the template as a sub template, the stepwise sub template is generated based on the lower left of the template. All these sub-templates are sent to the self-distance value calculation unit 4 (S24).

自己距離値計算部4は、段階的サブテンプレート生成部3で得られた段階的サブテンプレートR (i,j)と、テンプレート上の段階的サブテンプレートR (i,j)と同じサイズのテンプレート部分領域T (k,l)との距離値(または類似値)を、全ての大きさの異なる段階的サプテンプレートについて求める。仮にテンプレートの大きさより(m,n)小さいサブテンプレートの場合、図6に示されるような重なりを許した多数のテンプレート部分領域が得られる。その総数はこのサブテンプレートあたりm×nである。テンプレート本手法の距離尺度には、絶対値距離、2乗距離などが利用でき、類似尺度として、例えば、「足立他“正規化相互相関テンプレートマッチングのKL展開を用いたSSDA化”,信学技報PRMU96-173, pp. 23-30, 1997.」に示される正規化相互相関値も用いることができる。以下の例では、式(2)に示す絶対値距離を用いる。 Self distance value calculation unit 4, a gradual subphase obtained by the template generation unit 3 specific sub-template R q (i, j), stepwise sub-template R q (i, j) on the template with the same size A distance value (or similarity value) with the template partial region T q (k, l) is obtained for all graded sub-templates having different sizes. If the sub-template is smaller than the template size by (m, n), a large number of template partial areas permitting overlapping as shown in FIG. 6 are obtained. The total number is mxn per sub-template. Template The absolute distance, square distance, etc. can be used as the distance scale of this method. As a similar scale, for example, “Adachi et al.“ SSDA conversion using KL expansion of normalized cross-correlation template matching ”, IEICE The normalized cross-correlation values shown in the report PRMU96-173, pp. 23-30, 1997. can also be used. In the following example, the absolute value distance shown in Expression (2) is used.

Figure 0004387889
Figure 0004387889

次に、段階的サブテンプレート生成部3から受理したサブテンプレートR (i,j)と大きさが対応するすべてのテンプレート部分領域T (k,l)間の距離d(R (k,l),T (k,l))を段階的にあらかじめ計算する。さらにその距離d(R (k,l),T (k,l))と、距離d(R (i,j),T (k,l))の最大値dmaxとを局所領域枝刈部13に送出する(S31)。 Next, the distances d (R q (k, l, k) between all the template partial regions T q (k, l) whose sizes correspond to the sub templates R q (i, j) received from the stepwise sub-template generation unit 3 . l) , T q (k, l) ) in advance step by step. Further, the distance d ( Rq (k, l) , Tq (k, l) ) and the maximum value dmax of the distance d ( Rq (i, j) , Tq (k, l) ) are locally determined. The data is sent to the area pruning unit 13 (S31).

一方、入力信号入力部5は、さまざまな画像フォーマットのいずれかで与えられた2次元画像ファイル、あるいはさまざまなフォーマットのうちのいずれかで与えられた動画ファイルから切り出された1フレームの画像の一部または全部、リアルタイムでキャプチャされる1フレームの画像に一部または全部を受理し、得られた画素値のベクトルSを、局所領域設定部6に送出する(S25)。
局所領域設定部6は、入力信号取込み部5から受理した入力画像中の照合すべき全ての局所領域の集合を作成し、局所領域順序設定部7に送出する(S26)。局所領域の大きさは、テンプレートTと同じ大きさである。入力画像S上の、座標(u,v)に位置する、テンプレートTと同じ大きさの局所領域S(u,v)と表記する。局所領域の集合W={S(u,v)|u,v}としたとき、テンプレートマッチシグ法による探索は、Wの中から、距離d(T,S(u,v))が最小になる位置S(u,v)を見つける技術である。W中の全てのS(u,v)に対して距離下限値bound (u,v)を導入する。全ての(u,v)に対するbound (u,v)の初期値は0にする。bound(u,v)=0。
On the other hand, the input signal input unit 5 is an image of one frame cut out from a two-dimensional image file given in any of various image formats or a moving image file given in any of various formats. Part or all of the image is received in part or all in one frame image captured in real time, and the obtained vector S of pixel values is sent to the local region setting unit 6 (S25).
The local region setting unit 6 creates a set of all local regions to be collated in the input image received from the input signal capturing unit 5, and sends them to the local region order setting unit 7 (S26). The size of the local area is the same as that of the template T. A local region S (u, v) having the same size as the template T located at the coordinates (u, v) on the input image S is described. When the set of local regions is W = {S (u, v) | u, v}, the search by the template match sig method minimizes the distance d (T, S (u, v)) from W. This is a technique for finding a position S (u, v). The lower bound value bound (u, v) is introduced for all S (u, v) in W. The initial value of bound (u, v) for all (u, v) is 0. bound (u, v) = 0.

局所領域順序設定部8は、Wに含まれる局所領域の順序(入力画像上をスキャンする順序)を設定する(S27)。例えば、サブテンプレート生成部2でテンプレートの最も左上の領域をサブテンプレートとして取り出し照合をおこなう場合には、「右下から左上へ」の順の走査である。
逆にテンプレートの最も右下の領域をサプテンプレートに使って照合する場合には、「左上から右下へ」の順の走査になる。これは左上のテンプレートの場合には、左方向上方向へずらした局所領域の省略を可能にでき、右下のサブテンプレートの場合には、右方向下方向へずらした局所領域の省略を可能にするからである。逆に走査した場合には探索省略の効果はみられない。
The local region order setting unit 8 sets the order of local regions included in W (the order in which the input image is scanned) (S27). For example, when the sub-template generation unit 2 takes out and collates the upper left area of the template as a sub template, scanning is performed in the order of “from lower right to upper left”.
Conversely, when collating using the lower right area of the template as a sub template, scanning is performed in the order of “from upper left to lower right”. In the case of the upper left template, it is possible to omit the local region shifted in the upper left direction, and in the case of the lower right sub template, it is possible to omit the local region shifted in the lower right direction. Because it does. On the contrary, the effect of omitting the search is not seen when scanning.

一方、高速化のため、適当な間隔をあけるように並び替えを行った局所領域を順に選んだ方が効果的である。この方法には、距離値の分布に基づいた適当な間隔を持つように並び替えを随時行う方法や、入力信号を再帰的に分割したピラミッド画像の中心の位置を大きな画像から順に並べたものを局所領域候補順序に用いた方法、連続的な局所領域候補順序(左上から右下など)を、2進数表現し、最上位の1より下位の値をピット反転し、小さい順または大きい順に並べ直す方法などがある。このように作成したWを候補局所領域選択部8へ送出する。   On the other hand, in order to increase the speed, it is more effective to sequentially select the local regions that have been rearranged so as to have appropriate intervals. This method includes a method of rearranging as needed so as to have an appropriate interval based on the distribution of distance values, and a method in which the positions of the centers of pyramid images obtained by recursively dividing the input signal are arranged in order from the largest image. The method used for the local area candidate order and the continuous local area candidate order (upper left to lower right, etc.) are expressed in binary numbers, the values lower than the highest 1 are pit-inverted and rearranged in ascending order. There are methods. The W thus created is sent to the candidate local region selection unit 8.

候補局所領域選択部8は、局所領域順序設定部7から受理した局所領域の集合Wからテンプレートがある可能性のある候補局所領域を選び出し、サブテンプレート選択9へ送出する(S28)。そしてWから先頭のS(u,v)を取り出す。ここで、bound(u,v)>dminなら、候補局所領域選択部8による候補局所領域選択操作をもう一度実行する。bound(u,v)≦dminなら、(u,v)をサブテンプレート選択部9へ送出する(S29)。Wに含まれる局所領域がなくなった場合には探索を終了する。
サブテンプレート選択部9は、段階的サブテンプレート生成部3で得られた大きさの異なるサブテンプレート群から小さい順にサプテンプレートR (i,j)を選び出し、部分距離値計算部10へ送出する。部分距離値計算部10は、候補局所領域選択部8から候補局所領域の位置(u,v)を受理すると、段階的サブテンプレートの最小サブテンプレートを取り出し、(u.v)とともに部分距難値計算部10に送出する。部分距離値計算部9から、目的の信号である可能性があるとこれらの値が帰ってきた場合、次に大きいサブテンプレートRq+1 (i,j)を選択する。
The candidate local region selection unit 8 selects a candidate local region having a template from the set of local regions W received from the local region order setting unit 7, and sends it to the sub template selection 9 (S28). Then, the first S (u, v) is extracted from W. Here, if bound (u, v)> d min , the candidate local region selection operation by the candidate local region selection unit 8 is executed again. If bound (u, v) ≦ d min , (u, v) is sent to the sub-template selection unit 9 (S29). If there is no local area included in W, the search is terminated.
The sub template selection unit 9 selects the sub templates R q (i, j) in ascending order from the sub template groups having different sizes obtained by the stepwise sub template generation unit 3 and sends them to the partial distance value calculation unit 10. When the partial distance value calculation unit 10 receives the position (u, v) of the candidate local region from the candidate local region selection unit 8, the partial distance value calculation unit 10 extracts the minimum subtemplate of the stepwise subtemplate, and the partial distance value calculation unit together with (uv) 10 to send. If these values are returned from the partial distance value calculation unit 9 as a possible target signal, the next largest sub-template R q + 1 (i, j) is selected.

部分距離値計算部10は、サブテンプレート選択部9から受理したサブテンプレートR (i,j)と、候補局所領域選択部9から受理した候補局所領域S(u,v)のR (i,j)と同じ位置、サイズの一部の領域S(i,j) (u,v)との間で、距離d(R (i,j) S(i,j) (u,v))を計算する。この距離計算の途中において、距離置計算が終了した画素が単調増加するため、距離値も同様に単調増加する。そこで、部分距離値計算部10は、この計算途中で、遂次的に距離値が閾値を越えるかどうかを近似的に評価し、計算を打ち切るか否かを判断する(S30)。このように構成することで、不要な距離計算を省略するSSDA法またはAEJO法を用いることができる。 The partial distance value calculation unit 10 receives the sub template R q (i, j) received from the sub template selection unit 9 and the R q (i ) of the candidate local region S (u, v) received from the candidate local region selection unit 9. , J) and a distance d (R q (i, j) S (i, j) (u, v) between a part of the region S (i, j) (u, v) having the same position and size. ). In the middle of this distance calculation, the pixels for which the distance calculation has been completed monotonously increase, so that the distance value also monotonously increases. Therefore, the partial distance value calculation unit 10 approximately evaluates whether or not the distance value eventually exceeds the threshold value during the calculation, and determines whether or not to terminate the calculation (S30). With this configuration, it is possible to use the SSDA method or the AEJO method that omits unnecessary distance calculation.

ここで、閾値として、dmin+dmaxを用いる。距離値が、dmin+dmaxを越えた場合、部分距離値計算部10は、この部分局所領域及び周辺の部分局所領域には目的の物体が含まれないことから、計算を打ち切る。または、全ての距離計算が終了後、その距離値がdminを越えた場合、同様に、この局所領域には、目的の物体が含まれない。距離値がdmin以上の場合、部分距離値計算部10は、周辺領域に物体が含まれるかどうかを更に調べるために、その距離値dを、局所領域枝刈部13に送出する。 Here, d min + d max is used as the threshold value. When the distance value exceeds d min + d max , the partial distance value calculation unit 10 terminates the calculation because the target object is not included in this partial local region and the peripheral partial local region. Alternatively, when the distance value exceeds d min after all the distance calculations are completed, similarly, the target object is not included in this local region. When the distance value is equal to or greater than d min , the partial distance value calculation unit 10 sends the distance value d to the local region pruning unit 13 in order to further investigate whether or not an object is included in the surrounding region.

一方、全ての計算が終了後、その距離値がdminを越えない場合、目的の物体である可能性があるので、さらに大きな領域で距離を計算するためサブテンプレート選択部9を再度実行し、次に大きいサブテンプレートRq+1 (i,j)を選択する。最大のサブテンプレートR (i,j)の距離計算が終了後、距離値d(R (i,j),S (i,j)(u,v)がdminを越えない場合、その距離値を、追加距離値計算部11へ送出する。 On the other hand, if the distance value does not exceed d min after all calculations are completed, the object may be the target object, so the sub-template selection unit 9 is executed again to calculate the distance in a larger area, Next, the next larger sub-template R q + 1 (i, j) is selected. When the distance value d (R Q (i, j), S Q (i, j) (u, v) does not exceed d min after the distance calculation of the maximum sub-template R Q (i, j) is completed, The distance value is sent to the additional distance value calculation unit 11.

追加距離値計算部11は、部分距離値計算部10で計算した領域の距離値に、テンプレートの残りの部分と、局所領域の残りの部分との間の距離を加えることによって、テンプレートと局所領域間の距離を求める(S32)。
ここで、テンプレートの領域がTで、サブテンプレートR (i,j)に含まれない領域が~R (i,j)とすれば、テンプレートTからサブテンプレートR (i,j)の領域を差し引いた領域はT∩~R (i,j)である。同様に、局所領域S(u,v)から部分局所領域S (i,j)(u,v)を差し引いた領域は以下の式(3)で表現される。
The additional distance value calculation unit 11 adds the distance between the remaining part of the template and the remaining part of the local region to the distance value of the region calculated by the partial distance value calculation unit 10, thereby The distance between them is obtained (S32).
Here, if the region of the template is T and the region not included in the sub template R Q (i, j) is ~ R Q (i, j) , the template T to the sub template R Q (i, j) The area obtained by subtracting the area is T∩ ~ R Q (i, j) . Similarly, a region obtained by subtracting the partial local region S Q (i, j) (u, v) from the local region S (u, v) is expressed by the following equation (3).

Figure 0004387889
Figure 0004387889

つまり、部分距離計算部10で得られた部分距離値d(T (i,j)(u,v), ~R (i,j))に、これらの間の距離d(T∩~R (i,j),S(u,v) ∩~S (i,j)(u,v)を加えることで、テンプレートと候補局所領域の距離d(T,S(u,v))が得られる。すなわち、以下の式(4)で示される。 That is, the partial distance value d (T Q (i, j) (u, v), ~ R Q (i, j) ) obtained by the partial distance calculation unit 10 is added to the distance d (T∩ ~ By adding R Q (i, j), S (u, v) ∩ ~ S Q (i, j) (u, v), the distance d (T, S (u, v) between the template and the candidate local region That is, the following equation (4) is obtained.

Figure 0004387889
Figure 0004387889

ここでも、部分距離値計算部11と同様にSSDA法またはAEJO法を用いる。逐次的に距離値を計算した結果が、途中でdminを越えた場合、目的の物体ではないので、距離値計算を中断し、候補局所領域選択部9による局所領域選択処理を実行する。最後の画業まで計算して、テンプレートの距離と局所領域間の距離dがdminを越えないとき、dを検出結果更新部12に送出する。
検出結果更新部12は、追加距離値計算部11から得た距離値dにより最小値dminを更新し、その位置(u.v)を記録して候補局所領域選択部8による候補局所領域選択を実行する(S33)。
Here too, the SSDA method or the AEJO method is used as in the partial distance value calculation unit 11. If the result of calculating the distance value sequentially exceeds d min in the middle, it is not the target object, so the distance value calculation is interrupted, and the local area selection process by the candidate local area selection unit 9 is executed. When the calculation is performed up to the last drawing, and the distance d between the template and the local area does not exceed d min , d is sent to the detection result update unit 12.
The detection result update unit 12 updates the minimum value d min with the distance value d obtained from the additional distance value calculation unit 11, records the position (uv), and executes candidate local region selection by the candidate local region selection unit 8. (S33).

一方、局所領域枝刈部13は、得られた段階的サブテンプレートと、局所領域の一部との距離関係から、テンプレートと周囲における局所領域の距離値の下限値を実行する。大きな下限値を得た局所領域では、候補局所領域選択部8においてその局所領域での照合が省略できるため、精度を犠牲にすることなく探索を高速化できる。その原理を以下に示す。
AEJO法を用いることができる距離は、画素毎の距離を逐次的に加算することによって距離値が得られるため、比較する画素が増えると、その距離値も単調に増加する。このため、図7で示されるようなサブテンプレートR (i,j)と、サブテンプレートと同じ大きさの局所領域の一部S (i,j)(u,v)との距離と、テンプレートと局所領域の距離d(T,S(u,v))との間に以下の式(5)の関係が成り立つ。
On the other hand, the local region pruning unit 13 executes the lower limit value of the distance value between the template and the surrounding local region from the distance relationship between the obtained stepwise subtemplate and a part of the local region. In the local region that has obtained a large lower limit value, the candidate local region selection unit 8 can omit collation in the local region, so that the search can be speeded up without sacrificing accuracy. The principle is shown below.
The distance at which the AEJO method can be used is obtained by sequentially adding the distances for each pixel. Therefore, when the number of pixels to be compared increases, the distance value also increases monotonously. For this reason, the distance between the sub template R q (i, j) as shown in FIG. 7 and a part S q (i, j) (u, v) of the local region having the same size as the sub template, The relationship of the following formula (5) is established between the template and the distance d (T, S (u, v)) between the local regions.

Figure 0004387889
Figure 0004387889

すなわち、サブテンプレートでの照合の結果不一致の場合、テンプレート全体で照合しても不一致である。さらにサブテンプレートR (i,j)、テンプレート部分領域T (k,l)と、S (i,j)(u,v)に関して三角不等式の原理を適用すると、以下の式(6)が成り立つ。 That is, if the sub-templates do not match as a result of matching, the entire template does not match. Furthermore, when the principle of the triangle inequality is applied to the sub template R q (i, j) , the template partial region T q (k, l) , and S q (i, j) (u, v), the following equation (6) Holds.

Figure 0004387889
Figure 0004387889

以上の原理に基づき、u+j-m<x<=u+i、v+j-n<y<=v+jを満たす(x,y)に関して以下の式(7)で示す下限値bound(x,y)を更新する。   Based on the above principle, the lower limit value bound (x, y) expressed by the following equation (7) with respect to (x, y) satisfying u + jm <x <= u + i and v + jn <y <= v + j ) Is updated.

Figure 0004387889
Figure 0004387889

上記した本発明実施形態によるテンプレート照合装置が従来手法に比べてどの程度高速であるかにつき評価を行った結果を以下に説明する。
ここでは、図4に示す画像のRGB各8ビット、CIFサイズ(352×288)画素を持つ画像を使用し、そしてその内部に合まれる5種類の物体(人、猫、梟、達磨、熊)を切り出した画像をテンプレートとした。各テンプレートの大きさは50×50画素である。また、入力画像には、図4に示す画像にガウスノイズを加えて生成したS/N比20dBの人工画像10枚を用いた。
実験にはCPUとしてIntel社製のPentium4(登録商標)プロセッサ (3.06GHZ)、OSとして Red Hat Linux 8.0 の計算機を用い、コンパイラにGNU g++、最適化オプションに-03を用いて生成した実行ファイルを使用した。コードの重要な部分には、Pentium 4 SSE2命令を使用した。
The results of evaluating how fast the template matching apparatus according to the above-described embodiment of the present invention is compared with the conventional method will be described below.
In this example, the image shown in FIG. 4 is an image having 8 bits for each of RGB and having a CIF size (352 × 288) pixels, and five kinds of objects (people, cats, frogs, daruma, bears) fitted inside the image. ) Was used as a template. Each template has a size of 50 × 50 pixels. As the input image, ten artificial images with an S / N ratio of 20 dB generated by adding Gaussian noise to the image shown in FIG. 4 were used.
In the experiment, an Intel Pentium4 (registered trademark) processor (3.06GHZ) was used as the CPU, a Red Hat Linux 8.0 computer as the OS, GNU g ++ as the compiler, and -03 as the optimization option. Used file. Pentium 4 SSE2 instructions were used for important parts of the code.

本発明実施形態によれば、サブテンプレートをどの程度の大きさで選ぶかによって、探索時間が異なる。仮に、テンプレートの大きさより(m,n)だけ小さいサブテンプレートを考える。(m,n)が大きいほど、照合を省略できる範囲が増える一方、テンプレートの類似性が小さ<距離が大きくなるため、下限値が小さくなり照合を省略できる可能性が小さくなる。このトレードオフを検討するため、サブテンプレートの大きさを(m=n=0,1,2,‥・,9)のように変化させその探索時間を調べた。但し、(m=n=0)は、SSDA法と一致する。部分距離値を計算するサブテンプレートは最も左上のサブテンプレートR(o,・)を用い、左下から右上へ順に探索した。   According to the embodiment of the present invention, the search time varies depending on the size of the sub-template to be selected. Consider a sub-template that is (m, n) smaller than the template size. As (m, n) is larger, the range in which collation can be omitted increases. On the other hand, since the similarity of the template is smaller <the distance is larger, the lower limit value is smaller and the possibility that collation can be omitted is reduced. In order to examine this trade-off, the size of the sub-template was changed as (m = n = 0,1,2, ..., 9) and the search time was examined. However, (m = n = 0) is consistent with the SSDA method. The sub template for calculating the partial distance value was the upper left sub template R (o ,.), and the search was performed in order from the lower left to the upper right.

上記による実験結果を図8に示す。結果、どの物体に関しても、3〜7程度小さいサブンプレートを用いたときに探索時間が最小になった。5以上小さいサブテンプレートを用いても探索時間の変化は小さかった。このため、3から4あたりのマージンサイズを選択すればよいと考えられる。   The experimental result by the above is shown in FIG. As a result, for any object, the search time was minimized when a subn plate as small as 3 to 7 was used. Even when sub-templates smaller than 5 were used, the change in search time was small. For this reason, it is considered that a margin size of 3 to 4 should be selected.

また、サブテンプレートの大きさを最遠の直に設定し、初期閾値を150000としてその割合を10−3から10に変化させて探索時間を測定した。実験結果を図9に示す。結果、閾値の割合が小さくなるにしたがって近似の傾向が強まり、AEJO法も提案手法も探索時間が短くなる。一方、本発明実施形態によれば、10−2より小さくなると検出漏れを生じた。
これは、AEJO法がサブテンプレート選択部9で選択されたサブテンプレートによる検出漏れ以外生じないのに比べ、本発明実施形態では。他のサブテンプレートによる検出漏れが生じるためである。検出率100%になる初期閾値の割合が10−2より大きい範囲において常に本発明実施形態による手法がAEJO法よりも高速であった。
In addition, the size of the sub template was set to the farthest right, the initial threshold value was set to 150,000, and the ratio was changed from 10 −3 to 100 0 to measure the search time. The experimental results are shown in FIG. As a result, the tendency of approximation increases as the threshold ratio decreases, and the search time for both the AEJO method and the proposed method is shortened. On the other hand, according to the embodiment of the present invention, detection omission occurred when it was smaller than 10 −2 .
This is in the embodiment of the present invention as compared to the case where the AEJO method does not occur other than the detection omission by the sub template selected by the sub template selection unit 9. This is because a detection omission due to another sub-template occurs. The method according to the embodiment of the present invention was always faster than the AEJO method in the range where the ratio of the initial threshold value at which the detection rate becomes 100% is larger than 10 −2 .

以上説明のように本発明実施形態によれば、従来技術と同じ結果を得ることを保証し、更に、従来技術より高速に目的とする信号を検出できるという優れた効果を奏し得る。この結果、本発明を画像に適用した場合には人物や物体などのコンテンツの検索、動画像中からの移動物体の追跡、ステレオ照合における対応点検出などに役立つ。また、音・映像情報に対して本発明を適用した場合には、CMや希望シーンの検索などの高精度化、高速化に役立つ。   As described above, according to the embodiment of the present invention, it can be ensured that the same result as that of the prior art is obtained, and further, an excellent effect that the target signal can be detected at a higher speed than the prior art can be obtained. As a result, when the present invention is applied to an image, it is useful for searching for contents such as a person and an object, tracking a moving object from a moving image, and detecting corresponding points in stereo matching. Further, when the present invention is applied to sound / video information, it is useful for increasing the accuracy and speed of searching for a CM or a desired scene.

図10は、本発明の他の実施形態を示すブロック図である。ここでは、本発明のテンプレート照合装置は、マルチテンプレート入力部101と、サブテンプレート生成部102と、リファレンスサブテンプレート決定部103と、マルチテンプレートグループ化部104と、自己距離値計算部105と、入力信号取込み部106と、局所領域設定部107と、局所領域順序設定部108と、リファレンスサブテンプレート選択部109と、候補局所領域選択部110と、距離下限値評価部111と、部分距離値計算部112と、追加距離値計算部113と、検出結果更新部114と、局所領域枝刈部115で構成され、多数のテンプレートと入力信号を入力し、入力信号中にテンプレートと類似する信号が含まれているか否かを判断し、含まれている場合に、その位置と距離値を出力する機能を持つ。   FIG. 10 is a block diagram showing another embodiment of the present invention. Here, the template matching apparatus of the present invention includes a multi-template input unit 101, a sub-template generation unit 102, a reference sub-template determination unit 103, a multi-template grouping unit 104, a self-distance value calculation unit 105, an input Signal capturing unit 106, local region setting unit 107, local region order setting unit 108, reference sub template selection unit 109, candidate local region selection unit 110, distance lower limit value evaluation unit 111, partial distance value calculation unit 112, an additional distance value calculation unit 113, a detection result update unit 114, and a local region pruning unit 115, which input a large number of templates and an input signal, and a signal similar to the template is included in the input signal. And if it is included, the position and distance value are output.

なお、図10中、実線矢印は処理の流れを、点線矢印はデータ流れを示し、また、各機能ブロックは、ソフトウェアないしハードウェアによって構成されるものであり、またソフトウェアとハードウェアの組み合わせによっても実現できるものである。図11にその処理手順が、図12にテンプレート画像の一例が示されている。また、図13に、マルチテンプレート入力部101、サブテンプレート生成部102、リファレンスサブテンプレート決定部103のそれぞれにおいて処理されるテンプレートの一例が(a)〜(c)に、図14に、マルチテンプレートグループ化部104、自己距離値計算部105のそれぞれにおいて処理されるテンプレートの一例が、(a)〜(c)に示されている。   In FIG. 10, the solid line arrows indicate the flow of processing, the dotted line arrows indicate the data flow, and each functional block is configured by software or hardware, or by a combination of software and hardware. It can be realized. FIG. 11 shows the processing procedure, and FIG. 12 shows an example of a template image. FIG. 13 shows examples of templates processed in each of the multi-template input unit 101, the sub-template generation unit 102, and the reference sub-template determination unit 103, and FIGS. An example of a template processed in each of the conversion unit 104 and the self-distance value calculation unit 105 is shown in (a) to (c).

ここでは図12にテンプレートの一例が示されるように、複数のテンプレートを用いて入力画像から目的の3次元物体を探索する。ここでは、テンプレートと入力信号中の一部の領域を、距離値によって評価する。はじめに適当な閾値を与え、探索中に見つけた最小値dminを閾値として更新することによって最も類似する局所領域を発見する方法を述べる。閾値を更新せず、閾値を下回る全てを記録してその結果を返すことももちろん容易に構成できる。また、ここでは、2次元の例を用いているが、F個の要素からなる1次元の入力信号を1×Fの2次元と考えることで、1次元の信号も全く同様に扱えることは明らかであり、3次元以上の信号にも全く同じ手法で扱える。また、画像以外にも、気象データ、地図データ、遺伝子データなどの多次元ベクトル系列にも適用できる。 Here, as shown in FIG. 12 as an example of a template, a target three-dimensional object is searched from an input image using a plurality of templates. Here, the template and a part of the area in the input signal are evaluated by the distance value. First, a method for finding the most similar local region by giving an appropriate threshold value and updating the minimum value d min found during the search as a threshold value will be described. Of course, it is easy to configure not to update the threshold value, but to record all the values below the threshold value and return the result. In addition, although a two-dimensional example is used here, it is clear that a one-dimensional signal can be handled in the same way by considering a one-dimensional input signal composed of F elements as a two-dimensional 1 × F. It is possible to handle signals of more than three dimensions with the same method. In addition to images, the present invention can also be applied to multidimensional vector sequences such as weather data, map data, and gene data.

以下、詳細について説明する。マルチテンプレート入力部101は、さまざまな画像フォーマットで与えられた2次元画像ファイル、あるいはさまざまなフオーマットで与えられた動画ファイルから切り出された1フレームの画像の一部、リアルタイムでキャプチャされる1フレームの画像の一部から、窓関数などを用いて物体領域を抽出し、サブテンプレート生成部102へ送出する(S111)。例えば物体の窓関数としては、矩形形状でその内側だけを取り出すもの、円形状で円の内側だけを取り出すもの、物体の形状に合わせた形でその内側だけを取り出すものなどの窓関数が上げられる。ここでは図13(a)に示されるように、矩形形状テンプレートの例で説明する。また、テンプレートは以下に示す方法で系統的に作成されたものとする。すなわち、物体をある軸のまわりに回転させる、スケールを段階的に変える等である。前者は、計算機などで、回転角を制御可能な回転音に物体をのせ、回転台を回転させながら物体を撮影することでテンプレートが得られる。後者は、ズームカメラのズームパラメータを変え、あるいはカメラと物体の距離を変えて物休を撮影することで所望のテンプレートが得られる。また、得られた画像をコンピュータグラフィックス処理により拡大縮小しても得られる。   Details will be described below. The multi-template input unit 101 is a two-dimensional image file given in various image formats or a part of one frame image cut out from a moving image file given in various formats, one frame captured in real time. An object region is extracted from a part of the image using a window function or the like, and sent to the sub-template generation unit 102 (S111). For example, the window function of an object can be raised such as a rectangular shape that takes out only the inside of it, a circular shape that takes out only the inside of a circle, or a shape that matches the shape of the object and takes out only the inside of the circle. . Here, an example of a rectangular template will be described as shown in FIG. Further, it is assumed that the template is systematically created by the following method. That is, the object is rotated around a certain axis, the scale is changed stepwise, and so on. The former can be obtained with a computer or the like by placing an object on a rotating sound whose rotation angle can be controlled and photographing the object while rotating the turntable. In the latter case, a desired template can be obtained by changing the zoom parameter of the zoom camera or by changing the distance between the camera and the object and photographing the holiday. It can also be obtained by enlarging or reducing the obtained image by computer graphics processing.

サブテンプレート生成部102は、マルチテンプレート入力部1で得られた、すべてのテンプレートTからその内部のサブテンプレートTsubを生成する(S112)。図13(b)に示されるように、仮に、テンプレートの大きさより(m,n)だけ小さいサブテンプレートを考える。テンプレートの左上を原点として、位置(k,l)のサブテンプレートをTsub (k,j)と表現する。このとき、図15に示されるように重なりを許した多数のサブテンプレートTsub (k,j)…Tsub (m−l,n−l)が得られる。その総数はテンプレートあたりm×nである。これらのすべてのサブテンプレートを、リファレンスサブテンプレート決定部103に送出する。 The sub-template generation unit 102 generates an internal sub-template T sub from all the templates T obtained by the multi-template input unit 1 (S112). As shown in FIG. 13B, suppose a sub-template smaller by (m, n) than the template size. The sub template at position (k, l ) is expressed as T sub (k, j) with the upper left corner of the template as the origin. At this time, as shown in FIG. 15, a large number of sub-templates T sub (k, j) ... T sub (m−l, n−l) that allow overlapping are obtained. The total number is mxn per template. All these sub-templates are sent to the reference sub-template determination unit 103.

リファレンスサブテンプレート決定部103は、サブテンプレート生成部102で生成された多数のサブテンプレートから、テンプレート毎にリファレンスサブテンプレートTsub (i,j)を決定する(図13(c)およびS113)。このとき、左上端あるいは、右下端のサブテンプレートを用いる。また、1つのテンプレートを、多数の入力画像から探索する場合には、効果的に高速化を実現するために、自己距離値計算部105におけるグループ内の全サブテンプレート間距離値の最大値が、最小となるようなサブテンプレートをリファレンスサブテンプレートとして選択することもできる。ここで生成されたリファレンスサブテンプレートの集合をQとする。 The reference sub template determination unit 103 determines a reference sub template T sub (i, j) for each template from the multiple sub templates generated by the sub template generation unit 102 (FIG. 13 (c) and S113). At this time, the sub-template at the upper left corner or the lower right corner is used. Further, when searching for a single template from a large number of input images, the maximum value of the distance values between all the sub-templates in the group in the self-distance value calculation unit 105 is set to A sub template that is minimized can be selected as a reference sub template. Let Q be the set of reference sub-templates generated here.

マルチテンプレートグループ化部104は、マルチテンプレート入力部101で系統的に生成された多数のテンプレートを、角度、あるいはスケールの類似性によりグループ化し、自己距離値計算部105に送出する(S114)。本発明実施形態では、テンプレートごとに、そのテンプレートTに類似するテンプレートT'を集合させたグループのテンプレート数は最大N枚とした。ここで、グループ数はマルチテンプレートの数だけ存在する(図14(a))。
自己距離計算部105は、リファレンスサブテンプレート決定部104から受理したリファレンスサブテンプレートと、グループ内における他のサブテンプレートの距離を計算する(図14(b)、およびS115)。ここでは、距離尺度に絶対値距離、2乗距離などが利用でき、類似尺度として、上記した正規化相互相関値も用いることができる。以下の例では、以下の式(8)で示される絶対値距離を用いる。
The multi-template grouping unit 104 groups a large number of templates systematically generated by the multi-template input unit 101 according to the similarity of angles or scales, and sends them to the self-distance value calculation unit 105 (S114). In the embodiment of the present invention, for each template, the maximum number of templates in a group in which templates T ′ similar to the template T are assembled is N. Here, there are as many groups as there are multiple templates (FIG. 14A).
The self-distance calculation unit 105 calculates the distance between the reference sub template received from the reference sub template determination unit 104 and other sub templates in the group (FIG. 14B and S115). Here, an absolute value distance, a square distance, or the like can be used as a distance scale, and the above-described normalized cross-correlation value can also be used as a similarity scale. In the following example, an absolute value distance represented by the following formula (8) is used.

Figure 0004387889
Figure 0004387889

リファレンスサブテンプレート部104から受理したリファレンスサブテンプレートTsub (i,j)とグループ内のすべてのサブテンプレートTsub (k,l)間の距離d(Tsub (i,j),Tsub (k,l))をテンプレートに跨って計算する。さらにその距離d(Tsub (i,j),Tsub (k,l))と、距離d(Tsub (i,j),Tsub (k,l))の最大値を局所領域枝刈部115に送出する(S115)。
入力信号取込み部106は、さまざまな画像フォーマットのいずれかで与えられた2次元画像ファイル、あるいはさまざまなフォーマットのうちのいずれかで与えられた動画ファイルから切り出された1フレームの画像の一部または全部、リアルタイムでキャプチャされる1フレームの画像に一部または全部を受理し、得られた画素値のベクトルWを、局所領域設定部107に送出する(S116)。局所領域設定部107は、入力信号取込み部106から受理した入力画像中の照合すべき全ての局所領域の集合を作成し、局所領域順序設定部108に送出する(S117)。局所領域の大きさは、テンプレートと同じ大きさである。入力画像W上の、座標(u,v)に位置する、テンプレートと同じ大きさの局所領域をW(u,v)と表記する。ここでは、局所領域の集合をW={S(u,v)|u,v}としたとき、W中のすべてのW(u,v)に対して距離下限値bound (u,v)を導入し、距離d(T,W(u,v))が最小になる位置W(u,v)を見つける。全ての(u,v)に対するbound (u,v)の初期値は実装において適宜設定されるものであるが、以下、一例として、bound(u,v)=0として説明する。
Distances d (T sub (i, j) , T sub (k ) between the reference sub template T sub (i, j) received from the reference sub template unit 104 and all the sub templates T sub (k, l) in the group. , l) ) is calculated across the template. Further the distance d (T sub (i, j ), T sub (k, l)) and the distance d (T sub (i, j ), T sub (k, l)) local region pruning the maximum value of The data is sent to the unit 115 (S115).
The input signal capturing unit 106 is a part of a one-frame image cut out from a two-dimensional image file given in any of various image formats or a moving image file given in any of various formats, or All or part of the one-frame image captured in real time is accepted, and the obtained pixel value vector W is sent to the local region setting unit 107 (S116). The local region setting unit 107 creates a set of all local regions to be collated in the input image received from the input signal capturing unit 106, and sends them to the local region order setting unit 108 (S117). The local area is the same size as the template. A local region having the same size as the template located at the coordinates (u, v) on the input image W is denoted as W (u, v) . Here, when the set of local regions is W = {S (u, v) | u, v}, the distance lower limit value bound (u, v) is set for all W (u, v) in W. Then, a position W (u, v) where the distance d (T, W (u, v) ) is minimized is found. The initial value of bound (u, v) for all (u, v) is set as appropriate in the implementation, but will be described as bound (u, v) = 0 as an example below.

局所領域順序設定部108は、Wに合まれる局所領域の順序(入力画像上をスキヤンする順序)を設定する(S118)。例えば、リファレンスサブテンプレート生成部102でテンプレートの最も左上の領域Tsub (i,j)をリファレンスサブテンプレートとして取り出し照合をおこなう場合には、「右下から左上へ」の順の走査である。逆にテンプレートの最も右下の領域Tsub (i,j)_(k,l)をリファレンスサブテンプレートに使って照合する場合には、「左上から右下へ」の順の走査になる。これは左上のテンプレートの場合には、左方向上方向へずらした局所領域の省略を可能にでき、右下のサブテンプレートの場合には、右方向下方向へずらした局所領域の省略を可能にするからである。逆に走査した場合には探索省略の効果はみられない。 The local region order setting unit 108 sets the order of local regions (the order in which the input image is scanned) matched with W (S118). For example, when the reference sub template generation unit 102 extracts and collates the upper left region T sub (i, j) of the template as a reference sub template, scanning is performed in the order from “lower right to upper left”. Conversely, when collation is performed using the lower right region T sub (i, j) _ (k, l) of the template as a reference sub template, scanning is performed in the order of “upper left to lower right”. In the case of the upper left template, it is possible to omit the local region shifted in the upper left direction, and in the case of the lower right sub template, it is possible to omit the local region shifted in the lower right direction. Because it does. On the contrary, the effect of omitting the search is not seen when scanning.

一方、高速化のため、中央付近のリファレンスサブテンプレートを使って照合する場合には、適当な間隔を空けるように並び替えを行った局所領域を順に選んだ方が効果的である。この方法には、距離値の分布に基づいた適当な間隔を持つように並び替えを随時行う方法や、入力信号を再帰的に分割したピラミッド画像の中心の位置を大きな画像から順に並べたものを局所領域候補順序に用いた方法、連続的な局所領域候補順序(左上から右下など)を、2進数表現し、最上位の1より下位の値をビット反転し、小さい順または大きい順に並べ直す方法などがある。   On the other hand, for speeding up, when collating using a reference sub-template near the center, it is more effective to sequentially select local regions that have been rearranged so as to have an appropriate interval. This method includes a method of rearranging as needed so as to have an appropriate interval based on the distribution of distance values, and a method in which the positions of the centers of pyramid images obtained by recursively dividing the input signal are arranged in order from the largest image. The method used for the local region candidate order and the continuous local region candidate order (upper left to lower right, etc.) are expressed in binary numbers, and the values lower than the most significant 1 are bit-inverted and rearranged in ascending order. There are methods.

リファレンスサブテンプレート選択部109は、リファレンスサブテンプレート決定部103で決定されたリファレンスサブテンプレートの集合Qから順にリファレンスサブテンプレートTsub (i,j)を取り出し、候補局所領域選択部110に送出する(S119)。集合Qに含まれるリファレンスサブテンプレートがなくなった場合には探索を終了する。
候補局所領域選択部110は、リファレンスサブテンプレート選択部109からリファレンスサブテンプレートTsub (i,j)を受理すると、局所領域の集合WからテンプレートTに類似した信号が含まれる可能性のある候補局所領域W(u,v)を、局所領域順序設定部109で設定された順に選び出し、距離下限値評価部111へ送出する。Wに含まれる局所領域がなくなった場合には、リファレンスサブテンプレート選択部109による選択処理を再度実行する。
The reference sub template selection unit 109 extracts the reference sub template T sub (i, j) in order from the reference sub template set Q determined by the reference sub template determination unit 103, and sends it to the candidate local region selection unit 110 (S119). ). When there are no more reference subtemplates included in the set Q, the search is terminated.
When the candidate local region selection unit 110 receives the reference sub template T sub (i, j) from the reference sub template selection unit 109, the candidate local region selection unit 110 may include a signal similar to the template T from the local region set W. The region W (u, v) is selected in the order set by the local region order setting unit 109 and sent to the distance lower limit value evaluation unit 111. When there is no more local area included in W, the selection process by the reference sub template selection unit 109 is executed again.

距離下限値評価部111は、候補局所領域選択部110で取り出されたW(u,v)について、距離下限値bound(u,v)と閾値dminとを比較する(S121)。このとき、bound(u,v)>dminとなる場合、つまり、距離下限値が閾値より大きい場合、候補局所領域選択部110による候補局所領域選択を再度実行する。また、比較の結果、bound(u,v)≦dminとなる場合、距離下限値評価部111は、この候補局所領域W(u,v)にテンプレートTに類似した信号が含まれる可能性があることから、位置(u,v)を部分距離値計算部112へ送出する。 The distance lower limit evaluation unit 111 compares the distance lower limit value bound (u, v) with the threshold value d min for W (u, v) extracted by the candidate local region selection unit 110 (S121). At this time, if bound (u, v)> d min , that is, if the distance lower limit value is larger than the threshold value, the candidate local region selection unit 110 performs candidate local region selection again. If the comparison results in bound (u, v) ≦ d min , the distance lower limit evaluation unit 111 may include a signal similar to the template T in the candidate local region W (u, v). Therefore, the position (u, v) is sent to the partial distance value calculation unit 112.

部分距離値計算部112は、リファレンスサブテンプレート選択部109から受理したリファレンスサブテンプレートTsub (i,j)と、候補局所領域選択部110で取り出されたW(u,v)と同じ位置、サイズの一部の領域Wsub (u,v)(ここでは部分局所領域という)との間で、距離d(Tsub (i,j),Wsub (u,v))を計算する(S122)。
この距離計算過程において、距離値計算が終了した画集が単調増加するため、距離鎧も同様に単調に増加する。そこで、部分距離値計算部112は、この計算の途中で、逐次的に距離値が閾値を越えるかどうかを評価し、計算を打ち切るか否か判定する。このように構成することで、不要な距離計算を省略するSSDA法を用いることができる。ここで、閾値として、dmin+dmaxを用いる。距離値がdmin+dmaxを越えた場合、この部分候補局所領域Wsub (u,v)および周辺の部分候補局所領域には目的の物体が含まれないことから、計算を打ち切る。また、すべての距離計算が終了後、その距離値がdminを越えた場合、同様に、この候補局所領域W(u,v)には目的の物体が含まれない。
The partial distance value calculation unit 112 has the same position and size as the reference sub template T sub (i, j) received from the reference sub template selection unit 109 and W (u, v) extracted by the candidate local region selection unit 110. A distance d (T sub (i, j) , W sub (u, v) ) is calculated with respect to a partial area W sub (u, v) (here, referred to as a partial local area) (S122). .
In this distance calculation process, the collection of images for which distance value calculation has been completed monotonously increases, so the distance armor also monotonously increases. Therefore, the partial distance value calculation unit 112 sequentially evaluates whether or not the distance value exceeds the threshold value during the calculation, and determines whether or not to terminate the calculation. By configuring in this way, the SSDA method can be used in which unnecessary distance calculation is omitted. Here, d min + d max is used as the threshold value. When the distance value exceeds d min + d max , the calculation is terminated because the target object is not included in the partial candidate local area W sub (u, v) and the surrounding partial candidate local areas. Further, when the distance value exceeds d min after all the distance calculations are completed, similarly, the target local area W (u, v) does not include the target object.

距離値がdmin以上の場合、部分距離値計算部112は、W(u,v)周辺領域に物体が含まれるか否かを調べるために、その距離値dを局所領域枝刈部115に送出する。
一方、全ての距離計算が終了後、その距離値がdmin以下の場合、目的の物体である可能性があるため、部分距離値計算部112は、その距離値dを追加距離値計算部113へ送出する。追加距離値計算部113は、部分距離値計算部112で計算した領域の距離値に、テンプレートの残りの部分と、局所領域の残りの部分との間の距離を加えることによって、テンプレートと局所領域間の距離を求める。
When the distance value is greater than or equal to d min , the partial distance value calculation unit 112 sends the distance value d to the local region pruning unit 115 in order to check whether an object is included in the W (u, v) peripheral region. Send it out.
On the other hand, after all the distance calculations are completed, if the distance value is equal to or less than d min , there is a possibility that the object is the target object. To send. The additional distance value calculating unit 113 adds the distance between the remaining part of the template and the remaining part of the local region to the distance value of the region calculated by the partial distance value calculating unit 112, thereby Find the distance between.

ここで、テンプレート上の領域がTで、リファレンスサブテンプレートTsub (i,j)に含まれない領域が~Tsub (i,j)であるなら、テンプレートからリファレンスサブテンプレートの領域を差し引いた領域はT∩~Tsub (i,j)である。同様に、局所領域W(u,v)から部分局所領域Wsub (u,v)を差し引いた領域はW(u,v)∩~Wsub (u,v)である。
つまり、部分距離計算部112で得られた部分距離値d(Tsub (i,j),Wsub (u,v))に、これらの間の距離d(T∩~Tsub (i,j),W(u,v)∩~Wsub (u,v)を加えることで、テンプレートと候補局所領域の距離d(T, W(u,v))が得られる。このため、テンプレートと候補局所領域の距離d(T, W(u,v))は、以下の式(9)によって示される。
Here, if the region on the template is T and the region not included in the reference sub template T sub (i, j) is ~ T sub (i, j) , the region obtained by subtracting the region of the reference sub template from the template Is T∩ ~ T sub (i, j) . Similarly, the area obtained by subtracting the partial local area W sub (u, v) from the local area W (u, v) is W (u, v) ∩ to W sub (u, v) .
That is, the partial distance value d (T sub (i, j) , W sub (u, v) ) obtained by the partial distance calculation unit 112 is added to the distance d (T∩˜T sub (i, j ) between them. ) , W (u, v) ∩ ~ W sub (u, v) is added to obtain the distance d (T, W (u, v) ) between the template and the candidate local region. The distance d (T, W (u, v) ) of the local region is expressed by the following equation (9).

Figure 0004387889
Figure 0004387889

このとき、部分距離値計算部112と同様にSSDA法を用いる。そして、逐次的に距離値を計算した結果、途中でdminを越えた場合、目的の物体ではないことから、追加距離値計算部113は、距離値計算を中断し、候補局所領域選択部110において次の候補局所領域を選択する。一方、最後の画素まで計算して、テンプレートの距離と、局所領域間の距離dがdminを越えないとき、追加距離値計算部113は、距離dを検出結果更新部114に送出する。
検出結果更新部114は、追加距離値計算部113から得た距離値dにより最小値dminを更新し(dmin=dとなる)、その位置(u,v)を記録する(S124)。そして、集合Wが空集合でなければ、候補局所領域選択部110による候補局所領域選択処理を実行し、次の候補局所領域を選択する。
At this time, the SSDA method is used similarly to the partial distance value calculation unit 112. Then, as a result of sequentially calculating the distance value, if it exceeds d min in the middle, it is not the target object, so the additional distance value calculation unit 113 interrupts the distance value calculation, and the candidate local region selection unit 110 The next candidate local region is selected at. On the other hand, when calculating to the last pixel and the distance between the template and the distance d between the local areas does not exceed d min , the additional distance value calculation unit 113 sends the distance d to the detection result update unit 114.
The detection result update unit 114 updates the minimum value d min with the distance value d obtained from the additional distance value calculation unit 113 (d min = d), and records the position (u, v) (S124). If the set W is not an empty set, candidate local region selection processing by the candidate local region selection unit 110 is executed, and the next candidate local region is selected.

局所領域枝刈部115は、リファレンスサブテンプレートと、局所領域の一部との距離関係から、テンプレートと周囲の局所領域の距離下限値bound(u,v)の更新処理を実行する。大きな距離下限値bound(u,v)が得られた局所領域では、距離下限値評価部111に、bound(u,v)>dminが成立する局所領域においては、その局所領域での照合が省略できる。したがって、精度を犠牲にすることなく探索を高速化できる。 The local region pruning unit 115 performs an update process of the distance lower limit value bound (u, v) between the template and the surrounding local region from the distance relationship between the reference sub template and a part of the local region. In the local region where a large distance lower limit value bound (u, v) is obtained, the distance lower limit value evaluation unit 111 checks in the local region where bound (u, v)> d min is satisfied. Can be omitted. Therefore, the search can be speeded up without sacrificing accuracy.

自己距離値計算部105で得られた、リファレンステンプレートと類似したテンプレートのサブテンプレートの自己距離値により、リファレンスサブテンプレートと局所領域の部分領域の距離計算を行った場合には、他のテンプレートにまたがって距離下限値の計算を行うことができる。以下にその原理を示す。
SSDA法を適用する距離値は、局所領域の画素およびサブテンプレートの画素毎の距離を逐次的に加算して得られる。すなわち、比較する画素が増えると、その距離値も単調に増加する。このため、図15で示されるようなリファレンスサブテンプレートTsub (i,j)と、リファレンスサブテンプレートと同じ大きさの局所領域の一部Wsub (u,v)との距離d(Tsub (i,j),Wsub (u,v))と、テンプレートと局所領域の距離d(T,W(u,v))との間に以下の式(10)が成り立つ。
When the distance between the reference sub template and the partial region of the local region is calculated based on the self-distance value of the sub-template of the template similar to the reference template obtained by the self-distance value calculation unit 105, it extends over other templates. Thus, the lower limit of distance can be calculated. The principle is shown below.
The distance value to which the SSDA method is applied is obtained by sequentially adding the distance for each pixel of the local region and each pixel of the sub template. That is, as the number of pixels to be compared increases, the distance value also increases monotonously. For this reason, the distance d (T sub ( ) between the reference sub template T sub (i, j) as shown in FIG. 15 and a part W sub (u, v) of the local region having the same size as the reference sub template. i, j) , Wsub (u, v) ) and the distance d (T, W (u, v) ) between the template and the local region, the following equation (10) holds.

Figure 0004387889
Figure 0004387889

すなわち、リファレンスサブテンプレートでの照合の結果不一致の場合、テンプレート全体で照合しても不一致である。さらにリファレンスサブテンプレートTsub (i,j)と、同じグループ内の他のサブテンプレートT’sub (i,j)、更にWsub (u,v)に関して三角不等式の原理を適用すると、以下の式(11)で示される関係が成り立つ。 In other words, if the reference sub-template does not match as a result of matching, the entire template is not matched. Further, applying the principle of triangular inequality with respect to the reference sub template T sub (i, j) , other sub templates T ′ sub (i, j) in the same group, and W sub (u, v) , the following equation The relationship shown by (11) is established.

Figure 0004387889
Figure 0004387889

リファレンスサブテンプレートTsub (i,j)と、部分候補局所領域Wsub (u,v)との照合結果を用いて、他のテンプレートT'で照合するときの距離下限値も同様に計算することができる。例えば、以下の式(12)で示される。 Using the matching result of the reference sub template T sub (i, j) and the partial candidate local region W sub (u, v) , the lower limit value of distance when matching with another template T ′ is calculated in the same way. Can do. For example, it is represented by the following formula (12).

Figure 0004387889
Figure 0004387889

以上の原理に基づき、u-m < x <= u、v-n<y<=vを満たす(x,y)に関して下限値bound(x,y)を更新する。更新は以下の式(13)で示すことができる。   Based on the above principle, the lower limit value bound (x, y) is updated for (x, y) that satisfies u−m <x <= u and v−n <y <= v. The update can be expressed by the following equation (13).

Figure 0004387889
Figure 0004387889

上記した本発明実施形態が従来手法に比べてどの程度高速であるかの評価を行った結果を以下に説明する。
ここでは、マージンm=n、同時に処理を行うテンプレート数Nを変化させたときの探索時間を測定し、他の手法と比較した。実験は、回転角のみを変化させたテンプレート、スケールのみを変化させたテンプレートの2種類に分けて行った。実験にはCPUとしてIntel社製のXEON CPU (2.2GHz)、3GBメモリ、OSとして、Microsoft社製のWindows XP(登録商標) Professional(SP1)の計算機を用い、ソフトにMATLABを使用した。
The results of evaluating how fast the above-described embodiment of the present invention is compared with the conventional method will be described below.
Here, the search time when the margin m = n and the number N of templates to be processed simultaneously was changed was measured and compared with other methods. The experiment was divided into two types: a template in which only the rotation angle was changed, and a template in which only the scale was changed. In the experiment, an Intel XEON CPU (2.2 GHz) as a CPU, a 3 GB memory, a Microsoft Windows XP (registered trademark) Professional (SP1) computer as the OS, and MATLAB as the software were used.

前者の「回転角を変化させたテンプレートによる探索」では、対象物体を10度おきに撮影した36枚のテンプレートを用いた。また、テンプレートのサイズは48×48画素、入力画像のサイは320×320画素とした。閾値は1度おきに撮影した360枚の入力画像からテンプレートと角度が異なる324枚を使用して探索を行い、Precision=Recall=100%となる閾値を測定して求めた値1×10に設定した。
上記したNとmを変化させて本発明を適用したときの探索時間(物体は図17(d)に示す「fuku」とした)について図18にグラフ表示した。
マージンに関しては、mが13付近で探索時間が最短となり、同時に処理を行うテンプレート数に関しては、Nが3あたりまで探索時間が急激に減少し、以後ほぼ変化がないことがわかる。また、探索時間が最短となるN=11において、mを変化させたときの探索時間を図19に示す。図19によれば、mが増加すると探索時間は急激に減少し、9[pixel]から13[pixel]付近で最短となって、その後増加する。マージンを大きくとると、1回の照合で省略可能な領域が増大するもののサブリファレンス間の距離が大きくなり照合省略の可能性が減少する。単純な物体ほどmを大きくとることで探索時間が減少している。
In the former “search using a template with a changed rotation angle”, 36 templates obtained by photographing the target object every 10 degrees were used. The template size was 48 × 48 pixels, and the input image size was 320 × 320 pixels. The threshold is a value 1 × 10 5 obtained by performing a search from 360 input images photographed every other time using 324 images having different angles from the template and measuring the threshold value where Precision = Recall = 100%. Set.
The search time (the object is “fuku” shown in FIG. 17 (d)) when the present invention is applied while changing N and m described above is graphically displayed in FIG.
With respect to the margin, it can be seen that the search time is the shortest when m is around 13, and the number of templates to be processed simultaneously decreases rapidly until N reaches around 3, and there is almost no change thereafter. FIG. 19 shows the search time when m is changed at N = 11 where the search time is the shortest. According to FIG. 19, as m increases, the search time decreases rapidly, becomes the shortest around 9 [pixel] to 13 [pixel], and then increases. If the margin is increased, the area that can be omitted by one verification increases, but the distance between sub-references increases and the possibility of the verification omitted decreases. The search time is reduced by increasing m for simple objects.

同様に、図18に示す例より探索時間が最短となるm=13においてNを変化させたときの探索時間を図20に示す。
図20によれば、探索時間はN=4付近まで急激に減少し、以後変化が少ない。各物体とも同じ減少傾向を示しているが、高周波成分を含む画像ほど探索時間が最短となるNが減少している様子が確認できる。
Similarly, FIG. 20 shows the search time when N is changed at m = 13 where the search time is the shortest in the example shown in FIG.
According to FIG. 20, the search time decreases rapidly to near N = 4 and thereafter changes little. Although each object shows the same decreasing tendency, it can be confirmed that the N including the shortest search time decreases as the image includes a high-frequency component.

比較のため、STM、SSDA、部分空間法,テンプレート照合法による探索時間を測定した。STMおよびSSDAは上記した閾値を用いた。また、部分空間法はPrecision=Recall=100%となる最小の次元数で探索時間を測定した。その結果を図24(a)に<表1>として示してある。いずれも探索時間が最短となったときの時間である。本発明方法によれば、STM法に比べ約2.7倍、部分空開法に比べ7倍の速度で探索を終えていることがわかる。   For comparison, the search time by STM, SSDA, subspace method, and template matching method was measured. STM and SSDA used the above threshold values. In the subspace method, the search time was measured with the minimum number of dimensions such that Precision = Recall = 100%. The result is shown as <Table 1> in FIG. Both are times when the search time is the shortest. According to the method of the present invention, it can be seen that the search is completed at a speed approximately 2.7 times that of the STM method and 7 times that of the partial empty method.

後者の「スケールを変化させたテンプレートによる探索」について説明する。ここでは、撮影画像から切り抜いた48×83ピクセルの画像を(15/16)kに縮小したものをテンプレートして用いた。但し、k=1、‥・,14。また、入力画像には320×240の撮影画像を縦横70%に縮小したものを用いる。また、閾値は、Precision=Recall=100%となる閾値を測定して1ピクセルあたり30になるように設定した。   The latter “search using a template with a changed scale” will be described. Here, a 48 × 83 pixel image cut out from the photographed image and reduced to (15/16) k was used as a template. However, k = 1, ..., 14. The input image is a 320 × 240 photographed image reduced to 70% vertically and horizontally. Further, the threshold value was set to 30 per pixel by measuring the threshold value at which Precision = Recall = 100%.

物体を「fuku」とし、その結果が図21にグラフ表示されている。図21によれば、マージンに関しては、mが9付近で探索時間が最短となり、同時に処理を行うテンプレート数に関しては、Nが3あたりまで探索時間が急激に減少し、以後、緩やかに増加していることがわかる。図21から探索時間が最短となるN=3においてmを変化させたときの各物体の探索時間について図22に示す。図22から、mが7から9付近で各物体とも探索時間が最短となっていることがわかる。
同様に、探索時間が最短となるm=9付近においてNを変化させたときの各物体の探索時間を図23に示す。図23によれば、各物体ともN=3付近で探索時間が最短となり、その後暖やかに増加している。
The object is “fuku”, and the result is displayed in a graph in FIG. According to FIG. 21, with respect to the margin, the search time is the shortest when m is about 9, and the number of templates to be processed simultaneously decreases rapidly until N reaches around 3, and then increases gradually. I understand that. FIG. 22 shows the search time for each object when m is changed at N = 3 where the search time is the shortest from FIG. From FIG. 22, it can be seen that when m is from 7 to 9, the search time is the shortest for each object.
Similarly, FIG. 23 shows the search time for each object when N is changed in the vicinity of m = 9 where the search time is the shortest. According to FIG. 23, the search time is shortest around N = 3 for each object, and then warmly increases.

更に、他の手法との比較のため、STM、SSDA、テンプレートマッング法による探索時間を測定した。ここでは、STMおよびSSDAは上記した閾値を用いた。その結果を、図24(b)に<表2>として示している。いずれも探索時間が最短となったときの時間である。<表2>によれば、STM法に比べ約2倍、SSDA法に比べ20倍の速度で探索を終えていることがわかる。
Further, for comparison with other methods, was measured STM, SSDA, the search time by the template matcher switch ing method. Here, the above-described threshold values are used for STM and SSDA. The result is shown as <Table 2> in FIG. Both are times when the search time is the shortest. According to <Table 2>, it can be seen that the search is completed at a speed approximately twice that of the STM method and 20 times that of the SSDA method.

以上説明のように本発明実施形態によれば、回転角、スケールを変化させた多数のテンプレートを用いて3次元物体を高速に探索できるようにテンプレート照合方法を拡張することができる。具体的に、複数のテンプレートを纏めて探索可能となり、またサイズの異なるテンプレートを纏めて扱えるようになる。このことにより、回転する物体に対して実験を行った結果、従来のSTM法と比べ約2.7倍、部分空開法に比べ約7倍の高速化を実現できる。また、撮影サイズが変化する物体に対してSTM法と比べ約2倍、SSDA法と比べ約20倍の高速化を実現することができる。
この結果、本発明を画像に適用した場合には人物や物体などのコンテンツの検索、動画像中からの移動物体の追跡、ステレオ照合における対応点検出などに役立つ。また、音・映像情報に対して適用した場合には、CMや希望シーンの検索などの高精度化、高速化に役立つ。
As described above, according to the embodiment of the present invention, the template collation method can be extended so that a three-dimensional object can be searched at high speed using a large number of templates whose rotation angles and scales are changed. Specifically, a plurality of templates can be searched together, and templates of different sizes can be handled together. As a result of experiments on a rotating object, a speed increase of about 2.7 times that of the conventional STM method and about 7 times that of the partial empty method can be realized. Further, it is possible to realize a speed increase of about twice as high as that of the STM method and about 20 times as high as that of the SSDA method for an object whose photographing size changes.
As a result, when the present invention is applied to an image, it is useful for searching for contents such as a person and an object, tracking a moving object from a moving image, and detecting corresponding points in stereo matching. In addition, when applied to sound / video information, it is useful for increasing the accuracy and speed of searching for a CM or a desired scene.

本発明の一実施形態を示すブロック構成図である。It is a block block diagram which shows one Embodiment of this invention. 本発明一実施形態の動作を説明するために引用したフローチャートである。It is the flowchart quoted in order to demonstrate operation | movement of one Embodiment of this invention. 本発明実施形態に係わるテンプレートの一例である。It is an example of the template concerning this embodiment. 本発明実施形態に係わる入力信号の一例である。It is an example of the input signal concerning this embodiment. 入力信号中からテンプレートと類似する領域を検出した結果の一例を示す図である。It is a figure which shows an example of the result of having detected the area | region similar to a template from an input signal. テンプレート内に含まれる段階的サブテンプレートの一例を示す図である。It is a figure which shows an example of the stepwise sub template contained in a template. 本発明の一実施形態の動作を説明するために引用した動作概念図である。It is the operation | movement conceptual diagram quoted in order to demonstrate operation | movement of one Embodiment of this invention. サブテンプレートのサイズを変化させたときの探索時間の変化を示した実験結果をグラフ表示した図である。It is the figure which displayed the experimental result which showed the change of the search time when changing the size of a sub template in the graph. 閾値を変えたときの従来手法と本発明の探索時間の変化を示した実験結果を表す図である。It is a figure showing the experimental result which showed the change of the search time of the conventional method and this invention when a threshold value was changed. 本発明の他の実施形態を示すブロック構成図である。It is a block block diagram which shows other embodiment of this invention. 本発明の他の実施形態の動作を説明するために引用したフローチャートである。It is the flowchart quoted in order to demonstrate operation | movement of other embodiment of this invention. 本発明の他の実施形態において探索される物体の一例を示す図である。It is a figure which shows an example of the object searched in other embodiment of this invention. 図10に示す構成の一部とテンプレートとの関係を説明するために引用した図である。It is the figure quoted in order to demonstrate the relationship between a part of structure shown in FIG. 10, and a template. 図10に示す構成の一部とテンプレートとの関係を説明するために引用した図である。It is the figure quoted in order to demonstrate the relationship between a part of structure shown in FIG. 10, and a template. テンプレート内に含まれるサブテンプレートの一例を示す図である。It is a figure which shows an example of the sub template contained in a template. 本発明の他の実施形態における動作を説明するために引用した動作概念図である。It is the operation | movement conceptual diagram quoted in order to demonstrate the operation | movement in other embodiment of this invention. 本発明の他の実施形態において探索する3次元物体の一例を示す図である。It is a figure which shows an example of the three-dimensional object searched in other embodiment of this invention. 図17に示す回転物体(fuku)の探索時間を説明するために引用したグラフである。It is the graph quoted in order to demonstrate the search time of the rotating object (fuku) shown in FIG. 探索時間のマージン依存性と回転物体との関係をグラフ表示した図である。It is the figure which displayed the relationship between the margin dependence of search time, and a rotating object in the graph. 探索時間のグループサイズ(N)依存性と回転物体との関係をグラフ表示した図である。It is the figure which displayed the relationship between the group size (N) dependence of search time, and a rotating object on the graph. 図17に示すサイズ変化物体(fuku)の探索時間を説明するために引用したグラフである。It is the graph quoted in order to demonstrate the search time of the size change object (fuku) shown in FIG. 探索時間のマージンサイズ依存性とサイズ変化物体との関係をグラフ表示した図である。It is the figure which displayed the relationship between the margin size dependence of search time and a size change object in the graph. 探索時間のグループサイズ(N)依存性とサイズ変化物体との関係をグラフ表示した図である。It is the figure which displayed the relationship between the group size (N) dependence of search time and a size change object by the graph display. 探索時間に関し、本発明実施形態と従来例との対比を表形式で示した図である。It is the figure which showed contrast with embodiment of this invention and a prior art example by tabular form regarding search time.

符号の説明Explanation of symbols

1…テンプレート入力部、2…サブテンプレート生成部、3…段階的サブテンプレート生成部、4…自己距離値計算部、5…入力信号取込み部、6…局所領域設定部、7…局所領域順序設定部、8…候補局所領域選択部、9…サブテンプレート選択部、10…部分距離値計算部、11…追加距離値計算部、12…検出結果更新部、13…候補局所領域枝刈部、101…マルチテンプレート入力部、102…サブテンプレート生成部、103…リファレンスサブテンプレート決定部、104…マルチテンプレートグループ化部、105…自己距離値計算部、106…入力信号取込み部、107…局所領域設定部、108…局所領域順序設定部、109…リファレンスサブテンプレート選択部、110…候補局所領域選択部、111…距離下限値評価部、112…部分距離値計算部、113…追加距離値計算部、114…検出結果更新部、115…候補局所領域枝刈部
DESCRIPTION OF SYMBOLS 1 ... Template input part, 2 ... Sub template production | generation part, 3 ... Gradual sub template production | generation part, 4 ... Self distance value calculation part, 5 ... Input signal capture part, 6 ... Local area | region setting part, 7 ... Local area | region order setting , 8 ... Candidate local area selection section, 9 ... Sub template selection section, 10 ... Partial distance value calculation section, 11 ... Additional distance value calculation section, 12 ... Detection result update section, 13 ... Candidate local area pruning section, 101 DESCRIPTION OF SYMBOLS ... Multi template input part, 102 ... Sub template production | generation part, 103 ... Reference sub template determination part, 104 ... Multi template grouping part, 105 ... Self distance value calculation part, 106 ... Input signal capture part, 107 ... Local area setting part , 108 ... Local region order setting unit, 109 ... Reference sub-template selection unit, 110 ... Candidate local region selection unit, 111 ... Distance lower limit value Valence unit, 112 ... partial distance value calculation unit, 113 ... Add distance value calculation unit, 114 ... detection result update unit, 115 ... candidate local region pruning unit

Claims (11)

テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合装置であって、
前記テンプレートから段階的にサイズの異なるサブテンプレートを生成するサブテンプレート生成部と、
前記入力信号と、前記サブテンプレート生成部によって順次生成されるサブテンプレートとの距離値を計算し、類似することが確認された場合、テンプレート全体との距離値を追加計算するマッチング演算部と
を有し、
前記マッチング演算部は、
前記段階的にサイズの異なるすべてのサブテンプレートについて、前記テンプレート上の当該サブテンプレートと同じ大きさのあらゆる部分領域との距離値を計算する自己距離値計算部と、
前記入力信号上で、前記テンプレートと同じ大きさのあらゆる局所領域を設定する局所領域設定部と、
前記局所領域の順序を並び換える局所領域順序設定部と、
前記局所領域順序設定部で設定された順に一つの局所領域を取り出し候補局所領域とし、該候補局所領域と前記テンプレート間の距離下限値をあらかじめ定義された閾値と比較した結果、次に照合すべき候補局所領域を選択する候補局所領域選択部と、
前記段階的サブテンプレート生成部で得られる複数のサブテンプレートから、サイズの小さい順にサブテンプレートを一つ選択するサブテンプレート選択部と、
前記候補局所領域選択部から得られる候補局所領域の一部の領域と、前記サブテンプレート選択部で得られるサブテンプレートとを逐次照合して部分距離値を計算する部分距離値計算部と、
前記部分距離値計算部で得られた部分距離値が類似する場合、前記テンプレートの残りの領域と、前記候補局所領域の残りの領域との距離を追加して、前記テンプレートと当該候補局所領域間との距離値を求める追加距離値計算部と、
前記追加距離値計算部で得られた距離値が目標とする閾値を下回る場合、その検出結果と前記閾値を更新する検出結果更新部と、
前記自己距離値計算部、ならびに前記部分距離値計算部で計算され出力されるそれぞれの距離値を用いて、前記候補局所領域近傍の局所領域の距離下限値を更新することにより、前記テンプレートに類似する信号が存在する可能性がない局所領域候補を削除する候補局所領域枝刈部と、
を具備することを特徴とするテンプレート照合装置。
A template matching device that detects a signal similar to a known signal given as a template from an input signal that is input and captured, and obtains its position,
A sub-template generation unit that generates sub-templates of different sizes from the template in stages;
Calculating a distance value between the input signal and the sub-template sequentially generated by the sub-template generation unit, and when it is confirmed that the similarity is similar, a matching calculation unit that additionally calculates a distance value between the entire template;
Have
The matching operation unit
A self-distance value calculation unit for calculating a distance value with respect to all the sub-templates having different sizes in steps, with respect to any partial region having the same size as the sub-template on the template;
On the input signal, a local region setting unit that sets any local region having the same size as the template,
A local region order setting unit for rearranging the order of the local regions;
One local region is extracted in the order set by the local region order setting unit as a candidate local region, and the lower limit distance between the candidate local region and the template is compared with a predefined threshold value. A candidate local region selection unit for selecting a candidate local region;
A sub template selection unit that selects one sub template in ascending order of size from a plurality of sub templates obtained by the stepwise sub template generation unit;
A partial distance value calculation unit that calculates a partial distance value by sequentially comparing a partial region of the candidate local region obtained from the candidate local region selection unit and a sub template obtained by the sub template selection unit;
If the partial distance values obtained by the partial distance value calculation unit are similar, add the distance between the remaining area of the template and the remaining area of the candidate local area, and between the template and the candidate local area An additional distance value calculation unit for obtaining a distance value between and
When the distance value obtained by the additional distance value calculation unit is below a target threshold value, the detection result and a detection result update unit that updates the threshold value;
Similar to the template by updating the distance lower limit value of the local region in the vicinity of the candidate local region, using the respective distance values calculated and output by the self-distance value calculating unit and the partial distance value calculating unit. A candidate local region pruning unit that deletes local region candidates that may not have a signal to be
The template collation apparatus characterized by comprising.
テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合装置であって、
前記テンプレートから所定のサイズのサブテンプレートを複数生成するサブテンプレート生成部と、
前記サブテンプレートから照合を行う参照サブテンプレートを前記テンプレート毎に決定する参照サブテンプレート決定部と、
前記テンプレートのうち特徴が類似するテンプレートをグルーピングし、当該グループ内で前記テンプレートに跨るサブテンプレートの自己距離値を事前に算出し、前記ある参照サブテンプレートで照合した結果を前記グループ内に反映させるマッチング演算部と
を有し、
前記マッチング演算部は、
前記参照サブテンプレート決定部で決定される参照サブテンプレートと、同グループ内のサブテンプレートとの距離値をテンプレートに跨ってすべて計算する自己距離値計算部と、
前記入力信号上で前記テンプレートと同じサイズのあらゆる局所領域を設定する局所領域設定部と、
前記局所領域の順序を並び換える局所領域順序設定部と、
前記参照サブテンプレート決定部で決定された参照サブテンプレートの集合から、順次参照サブテンプレートを取り出す参照サブテンプレート選択部と、
前記局所領域順序設定部により設定された順に一つの局所領域を取り出し候補局所領域とする候補局所領域選択部と、
前記候補局所領域選択部で選択された候補局所領域と前記テンプレートとの距離下限値をあらかじめ定義された閾値と比較する距離下限値評価部と、
前記候補局所領域選択部から得られる候補局所領域の一部と、前記参照サブテンプレート選択部で選択された参照サブテンプレートとを照合し、部分距離値を計算する部分距離値計算部と、
前記部分距離値計算部で得られた部分距離値が類似する場合、前記テンプレートの残りの領域と、前記候補局所領域の残りの領域との距離を追加して、前記テンプレートと候補局所領域間との距離値を計算する追加距離値計算部と、
前記追加距離値計算部で得られた距離値が、目標とする閾値を下回る場合に、その検出結果と前記閾値を更新する検出結果更新部と、
前記自己距離値計算部、ならびに前記部分距離値計算部で計算されたそれぞれの距離値を用い、前記候補局所領域近傍の局所領域の距離下限値を更新することにより前記テンプレートに類似する信号が存在する可能性のない局所領域候補を削除する候補局所領域枝刈部と、
を具備することを特徴とするテンプレート照合装置。
A template matching device that detects a signal similar to a known signal given as a template from an input signal that is input and captured, and obtains its position,
A sub-template generation unit that generates a plurality of sub-templates of a predetermined size from the template;
A reference sub-template determination unit that determines, for each template, a reference sub-template for matching from the sub-template,
A grouping of templates having similar characteristics among the templates, a self-distance value of a sub-template straddling the template in the group is calculated in advance, and a result of matching with the certain reference sub-template is reflected in the group Calculation unit and
Have
The matching operation unit
A self-distance value calculating unit that calculates all the distance values between the reference sub-template determined by the reference sub-template determining unit and the sub-templates in the same group across the template;
A local area setting unit for setting any local area of the same size as the template on the input signal;
A local region order setting unit for rearranging the order of the local regions;
A reference subtemplate selection unit that sequentially extracts reference subtemplates from the set of reference subtemplates determined by the reference subtemplate determination unit;
A candidate local region selection unit that takes out one local region in the order set by the local region order setting unit and sets it as a candidate local region;
A distance lower limit evaluation unit that compares a distance lower limit between the candidate local region selected by the candidate local region selection unit and the template with a predefined threshold;
A partial distance value calculation unit that compares a part of the candidate local region obtained from the candidate local region selection unit with the reference subtemplate selected by the reference subtemplate selection unit, and calculates a partial distance value;
If the partial distance values obtained by the partial distance value calculation unit are similar, add the distance between the remaining area of the template and the remaining area of the candidate local area, and between the template and the candidate local area An additional distance value calculator for calculating the distance value of
A detection result updating unit for updating the detection result and the threshold when the distance value obtained by the additional distance value calculation unit is lower than a target threshold;
Using the distance values calculated by the self-distance value calculation unit and the partial distance value calculation unit, there is a signal similar to the template by updating the distance lower limit value of the local region near the candidate local region. A candidate local region pruning unit that deletes local region candidates that are not likely to
The template collation apparatus characterized by comprising.
前記部分距離値計算部、および前記追加距離値計算部は、
前記距離値を順次計算し、近似的に計算の必要がない、もしくは既に計算の必要がないと判断された時点で計算を終了することを特徴とする請求項またはに記載のテンプレート照合装置。
The partial distance value calculator and the additional distance value calculator are
Said distance value sequentially calculated and approximately no computational need of, or already template matching apparatus according to claim 1 or 2, characterized in that the calculation ends when the need is found not in the calculation .
前記サブテンプレート生成部は、
前記自己距離値計算部によって算出される自己距離値の最大値が、最小になるサブテンプレートを段階的に生成することを特徴とする請求項記載のテンプレート照合装置。
The sub-template generation unit
The maximum value of the self-distance value calculated by the self-distance calculation section, template matching apparatus according to claim 1, wherein the generating stepwise sub-template is minimized.
前記参照サブテンプレート決定部は、
グループ内のすべてのサブテンプレート間距離値の最大値が、最小となるようなサブテンプレートを参照サブテンプレートとして決定することをと特徴とする請求項に記載のテンプレート照合装置。
The reference sub- template determination unit
3. The template matching apparatus according to claim 2 , wherein a sub template having a minimum maximum distance value between all sub templates in the group is determined as a reference sub template.
前記局所領域順序設定部は、
所定の間隔を空けて前記順序の並び替えを行うことを特徴とする請求項またはに記載のテンプレート照合装置。
The local region order setting unit includes:
Template matching apparatus according to claim 1 or 2, characterized in that at predetermined intervals rearranges the order.
前記局所領域順序設定部は、
前記距離値の分布に基づき、適当な間隔を持つように並び替えを随時行うことを特徴とする請求項またはに記載のテンプレート照合装置。
The local region order setting unit includes:
Template matching apparatus according to claim 1 or 2, characterized in that on the basis of the distribution of the distance values, rearranged to have a suitable distance from time to time.
前記局所領域順序設定部は、
前記入力信号を再帰的に分割したピラミッド画像の中心の位置を大きな画像から順に並べ、前記候補局所領域を取り出す順序に用いることを特徴とする請求項またはに記載のテンプレート照合装置。
The local region order setting unit includes:
The template collation apparatus according to claim 1 or 2 , wherein the center positions of the pyramid images obtained by recursively dividing the input signal are arranged in order from a large image, and used in the order of extracting the candidate local regions.
前記局所領域順序設定部は、
前記局所領域候補順序を2進数表現し、最上位の1より下位の値をビット反転し、昇順もしくは降順に並べ直したものから順に並べ、前記候補局所領域を取り出す順序に用いることを特徴とする請求項またはに記載のテンプレート照合装置。
The local region order setting unit includes:
The local region candidate order is expressed in binary notation, and the value lower than the highest one is bit-inverted, arranged in ascending order or descending order, and used in the order of extracting the candidate local areas. The template collation apparatus according to claim 1 or 2 .
テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合装置を動作させるテンプレート照合方法であって、
サブテンプレート生成部が、前記テンプレートから段階的にサイズの異なるサブテンプレートを生成する第1のステップと、
マッチング演算部が、前記入力信号と、順次生成されるサブテンプレートとの距離値を計算し、類似することが確認された場合、テンプレート全体との距離値を追加計算する第2のステップと、
有し、
前記第2のステップは、
自己距離値計算部が、前記段階的にサイズの異なるすべてのサブテンプレートについて、前記テンプレート上の当該サブテンプレートと同じ大きさのあらゆる部分領域との距離値を計算するサブステップと、
局所領域設定部が、前記入力信号上で、前記テンプレートと同じ大きさのあらゆる局所領域を設定するサブステップと、
局所領域順序設定部が、前記局所領域の順序を並び換えるサブステップと、
候補局所領域選択部が、前記設定された順に一つの局所領域を取り出し候補局所領域とし、該候補局所領域と前記テンプレート間の距離下限値をあらかじめ定義された閾値と比較した結果、次に照合すべき候補局所領域を選択するサブステップと、
サブテンプレート選択部が、前記複数のサブテンプレートから、サイズの小さい順にサブテンプレートを一つ選択するサブステップと、
部分距離値計算部が、前記選択された候補局所領域の一部の領域と、前記選択されたサブテンプレートとを逐次照合して部分距離値を計算するサブステップと、
追加距離値計算部が、前記得られた部分距離値が類似する場合、前記テンプレートの残りの領域と、前記候補局所領域の残りの領域との距離を追加して、前記テンプレートと当該候補局所領域間との距離値を求めるサブステップと、
検出結果更新部が、前記得られた距離値が目標とする閾値を下回る場合、その検出結果と前記閾値を更新するサブステップと、
候補局所領域枝刈部が、前記計算され出力される自己距離値ならびに部分距離値を用いて、前記候補局所領域近傍の局所領域の距離下限値を更新することにより、前記テンプレートに類似する信号が存在する可能性がない局所領域候補を削除するサブステップと、
を有することを特徴とするテンプレート照合方法。
A template collation method for operating a template collation apparatus that detects a signal similar to a known signal given as a template from an input signal that is inputted and captured and determines its position,
A first step in which a sub-template generation unit generates sub-templates having different sizes from the template in stages;
A matching calculation unit calculates a distance value between the input signal and the sequentially generated sub-template, and when it is confirmed that the similarity is similar, a second step of additionally calculating a distance value with the entire template;
Have
The second step includes
A sub-step in which a self-distance value calculation unit calculates, for all sub-templates having different sizes in stages, a distance value between all sub-regions having the same size as the sub-template on the template;
A sub-step in which a local region setting unit sets any local region having the same size as the template on the input signal;
A local region order setting unit, a sub-step of rearranging the order of the local regions;
The candidate local region selection unit extracts one local region in the set order as a candidate local region, compares the lower limit of the distance between the candidate local region and the template with a predefined threshold value, and then compares them. A sub-step of selecting candidate local regions to be
A sub-step for selecting one sub-template from the plurality of sub-templates in ascending order of size;
A partial step of calculating a partial distance value by sequentially comparing a partial area of the selected candidate local area and the selected subtemplate;
If the obtained partial distance value is similar, the additional distance value calculation unit adds the distance between the remaining area of the template and the remaining area of the candidate local area, and the template and the candidate local area A sub-step for obtaining a distance value between
When the detection result update unit is below the target threshold value, the sub-step of updating the detection result and the threshold value,
The candidate local region pruning unit updates the distance lower limit value of the local region in the vicinity of the candidate local region using the calculated and output self-distance value and partial distance value, so that a signal similar to the template is obtained. A sub-step of removing local region candidates that may not exist;
A template matching method characterized by comprising:
テンプレートとして与えられる既知の信号と類似する信号を、入力され取り込まれる入力信号から検出し、その位置を求めるテンプレート照合装置を動作させるテンプレート照合方法であって、
サブテンプレート生成部が、前記テンプレートから所定のサイズのサブテンプレートを複数生成する第1のステップと、
参照サブテンプレート決定部が、前記サブテンプレートから照合を行う参照サブテンプレートを前記テンプレート毎に決定する第2のステップと、
マッチング演算部が、前記テンプレートのうち特徴が類似するテンプレートをグルーピングし、当該グループ内で前記テンプレートに跨るサブテンプレートの自己距離値を事前に算出し、前記ある参照サブテンプレートで照合した結果を前記グループ内に反映させる第3のステップと、
有し、
前記第3のステップは、
自己距離値計算部が、前記決定される参照サブテンプレートと、同グループ内のサブテンプレートとの自己距離値をテンプレートに跨ってすべて計算するサブステップと、
局所領域設定部が、前記入力信号上で前記テンプレートと同じサイズのあらゆる局所領域を設定するサブステップと、
局所領域順序設定部が、前記局所領域の順序を並び換えるサブステップと、
参照サブテンプレート選択部が、前記決定された参照サブテンプレートの集合から、順次参照サブテンプレートを選択するサブステップと、
候補局所領域選択部が、前記局所領域順序設定部により設定された順に一つの局所領域を取り出し候補局所領域として選択するサブステップと、
距離下限値評価部が、前記選択された候補局所領域と前記テンプレートとの距離下限値をあらかじめ定義された閾値と比較するサブステップと、
部分距離値計算部が、前記選択された候補局所領域の一部と、前記選択された参照サブテンプレートとを照合し、部分距離値を計算するサブステップと、
追加距離値計算部が、前記部分距離値が類似する場合、前記テンプレートの残りの領域と、前記候補局所領域の残りの領域との距離を追加して、前記テンプレートと候補局所領域間との距離値を計算するサブステップと、
検出結果更新部が、前記得られた前記テンプレートと候補局所領域間の距離値が、目標とする閾値を下回る場合に、その検出結果と前記閾値を更新するサブステップと、
候補局所領域枝刈部が、前記計算された自己距離値ならびに部分距離値を用いて、前記候補局所領域近傍の局所領域の距離下限値を更新することにより、前記テンプレートに類似する信号が存在する可能性のない局所領域候補を削除するサブステップと、
を有することを特徴とするテンプレート照合方法。
A template collation method for operating a template collation apparatus that detects a signal similar to a known signal given as a template from an input signal that is inputted and captured and determines its position,
A first step of generating a plurality of sub-templates of a predetermined size from the template;
A second step in which a reference subtemplate determination unit determines a reference subtemplate to be matched from the subtemplate for each template;
The matching calculation unit groups templates having similar characteristics among the templates, calculates in advance the self-distance value of the sub-template straddling the template in the group, and compares the result of the reference sub-template with the group. A third step to reflect in,
Have
The third step includes
A sub-step in which a self-distance value calculation unit calculates all self-distance values between the determined reference sub-template and sub-templates in the same group across the template;
A sub-step in which a local region setting unit sets any local region having the same size as the template on the input signal;
A local region order setting unit, a sub-step of rearranging the order of the local regions;
A sub-step in which a reference sub-template selection unit sequentially selects a reference sub-template from the determined set of reference sub-templates;
A candidate local region selection unit takes out one local region in the order set by the local region order setting unit and selects it as a candidate local region; and
A sub-step in which a distance lower limit evaluation unit compares a distance lower limit between the selected candidate local region and the template with a predefined threshold;
A partial step of calculating a partial distance value by collating a part of the selected candidate local region with the selected reference sub-template, and
If the partial distance value is similar, the additional distance value calculation unit adds the distance between the remaining area of the template and the remaining area of the candidate local area, and the distance between the template and the candidate local area A substep of calculating a value;
A detection result updating unit, when a distance value between the obtained template and the candidate local region is below a target threshold value, a sub-step of updating the detection result and the threshold value;
The candidate local area pruning unit uses the calculated self-distance value and partial distance value to update the distance lower limit value of the local area in the vicinity of the candidate local area, so that a signal similar to the template exists. A sub-step of removing local area candidates that are not possible;
A template matching method characterized by comprising:
JP2004209089A 2004-07-15 2004-07-15 Template collation apparatus and method Expired - Fee Related JP4387889B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004209089A JP4387889B2 (en) 2004-07-15 2004-07-15 Template collation apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004209089A JP4387889B2 (en) 2004-07-15 2004-07-15 Template collation apparatus and method

Publications (2)

Publication Number Publication Date
JP2006031392A JP2006031392A (en) 2006-02-02
JP4387889B2 true JP4387889B2 (en) 2009-12-24

Family

ID=35897655

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004209089A Expired - Fee Related JP4387889B2 (en) 2004-07-15 2004-07-15 Template collation apparatus and method

Country Status (1)

Country Link
JP (1) JP4387889B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8606020B2 (en) 2011-05-16 2013-12-10 Kabushiki Kaisha Toshiba Search skip region setting function generation method, search skip region setting method, object search method, search skip region setting function generation apparatus, search skip region setting apparatus, and object search apparatus
CN105260740A (en) * 2015-09-23 2016-01-20 广州视源电子科技股份有限公司 Element recognition method and apparatus

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7894649B2 (en) * 2006-11-02 2011-02-22 Accuray Incorporated Target tracking using direct target registration
JP4950716B2 (en) 2007-03-22 2012-06-13 株式会社日立ハイテクノロジーズ Image processing system and scanning electron microscope apparatus
JP5322416B2 (en) * 2007-09-12 2013-10-23 株式会社メガチップス Block matching circuit and data update method
CN102057399A (en) * 2009-04-10 2011-05-11 松下电器产业株式会社 Object detection device, object detection system, integrated circuit for object detection, camera with object detection function, and object detection method
CN104991943A (en) * 2015-07-10 2015-10-21 百度在线网络技术(北京)有限公司 Music searching method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8606020B2 (en) 2011-05-16 2013-12-10 Kabushiki Kaisha Toshiba Search skip region setting function generation method, search skip region setting method, object search method, search skip region setting function generation apparatus, search skip region setting apparatus, and object search apparatus
CN105260740A (en) * 2015-09-23 2016-01-20 广州视源电子科技股份有限公司 Element recognition method and apparatus
CN105260740B (en) * 2015-09-23 2019-03-29 广州视源电子科技股份有限公司 A kind of component recognizing method and device

Also Published As

Publication number Publication date
JP2006031392A (en) 2006-02-02

Similar Documents

Publication Publication Date Title
JP4915655B2 (en) Automatic tracking device
CN112288770A (en) Video real-time multi-target detection and tracking method and device based on deep learning
WO2019114036A1 (en) Face detection method and device, computer device, and computer readable storage medium
WO2018082308A1 (en) Image processing method and terminal
CN111062263B (en) Method, apparatus, computer apparatus and storage medium for hand gesture estimation
WO2019071976A1 (en) Panoramic image saliency detection method based on regional growth and eye movement model
US20210027094A1 (en) Image processing method, related device, and computer storage medium
JP2010165046A (en) Information processing apparatus and information processing method
CN104978738A (en) Method of detection of points of interest in digital image
WO2023030182A1 (en) Image generation method and apparatus
CN113837079A (en) Automatic focusing method and device for microscope, computer equipment and storage medium
CN111401196A (en) Method, computer device and computer readable storage medium for self-adaptive face clustering in limited space
CN114556268A (en) Gesture recognition method and device and storage medium
KR20150114950A (en) Increasing frame rate of an image stream
WO2019188458A1 (en) Method, system, and computer readable medium for performance modeling of crowd estimation techniques
JP4387889B2 (en) Template collation apparatus and method
CN106033613B (en) Method for tracking target and device
JP5335554B2 (en) Image processing apparatus and image processing method
JP2003022442A (en) Method and device for object detection and position measurement, execution program for the same method, and its recording medium
KR20160148806A (en) Object Detecter Generation Method Using Direction Information, Object Detection Method and Apparatus using the same
CN112784828B (en) Image detection method and device based on direction gradient histogram and computer equipment
RU2626551C1 (en) Method for generating panoramic images from video stream of frames in real time mode
CN113033593B (en) Text detection training method and device based on deep learning
US20220157077A1 (en) Method for verifying the identity of a user by identifying an object within an image that has a biometric characteristic of the user and separating a portion of the image comprising the biometric characteristic from other portions of the image
CN113011415A (en) Improved target detection method and system based on Grid R-CNN model

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060804

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090630

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090831

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: 20090924

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091001

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121009

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121009

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131009

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees