JP2009199250A - Object detection system - Google Patents

Object detection system Download PDF

Info

Publication number
JP2009199250A
JP2009199250A JP2008039058A JP2008039058A JP2009199250A JP 2009199250 A JP2009199250 A JP 2009199250A JP 2008039058 A JP2008039058 A JP 2008039058A JP 2008039058 A JP2008039058 A JP 2008039058A JP 2009199250 A JP2009199250 A JP 2009199250A
Authority
JP
Japan
Prior art keywords
image
template
similarity
template image
pixel
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.)
Granted
Application number
JP2008039058A
Other languages
Japanese (ja)
Other versions
JP5076956B2 (en
Inventor
Toshio Motegi
敏雄 茂出木
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2008039058A priority Critical patent/JP5076956B2/en
Publication of JP2009199250A publication Critical patent/JP2009199250A/en
Application granted granted Critical
Publication of JP5076956B2 publication Critical patent/JP5076956B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an object detection system for properly setting a decision reference value for deciding whether a template image is similar to an object in the case of extracting an object from an image as the object of retrieval such as a satellite image by using a template image including an object. <P>SOLUTION: When an object to be detected as an object is designated on a sample image, a pixel block whose shape is the same as the shape of the a template image is extracted from the sample image corresponding to the designated position, and as for both the pixel block and the template image, the collation of luminance histograms (S201), the collation of gradation fluctuation histograms (S202), the calculation of inter-centroid distance (S203), the collation of inertial moments (S204), the calculation of a gray gradation pixel difference (S205), and the calculation of normalization correlation coefficient (S206) are performed, and the values of 6 similarity evaluation values are updated. As for a prescribed position in the neighborhood of the designated position, the above processing is performed, and a decision reference value is set based on the minimum or maximum value of the six similarity evaluation values. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像中から目的とするパターンを検出するための技術に関し、特にパンクロマチック衛星画像に対して好適なパターン検出技術に関する。   The present invention relates to a technique for detecting a target pattern from an image, and more particularly to a pattern detection technique suitable for a panchromatic satellite image.

QuickBird(米国DigitalGlobe)、ALOS“だいち”(日本JAXA)、TERRA/ASTER(日本ERSDAC)など陸域観測・地球観測衛星は高度約450km上空で地球を極軌道で周回しており、高分解能な光学センサや合成開口レーダ(SAR)を搭載し、地上を連続的にスキャニングし、定時的に地球局に画像データを伝送している。主として3種類の画像が活用され、光学センサのマルチスペクトラル・モード(カラー写真)は、可視光のRGBバンドに近赤外を加えた4バンド構成で夜間も撮影でき、地上の資源探索や大規模災害などの状況を収集するのに有効である。SAR画像は電波によるレーダ画像で、雲がかかっていても透過するため、天候が悪いときでも画像を収集でき、ドップラー効果を用いて航行中の船舶を計測することもできる(特許文献1参照)。中でも、光学センサのパンクロマチック・モード(モノクロ写真)は地上の乗用車を識別できる1m弱(世界最高分解能QuickBird 0.6m)の分解能をもち、交通状況の監視などに有益である。交通状況の監視については、地上に設置された監視カメラやヘリコプター・航空機による航空写真の方が鮮明な画像が得られるが、広域を同時観測することが難しいのと、建築物などの陰に隠れた死角が必ず発生するという問題から、近年衛星画像が注目されている。   Land observation and earth observation satellites such as QuickBird (DigitalGlobe, USA), ALOS “Daichi” (Japan AXA), and TERRA / ASTER (Japan ERSDAC) orbit around the Earth in a polar orbit at an altitude of about 450 km. It is equipped with sensors and synthetic aperture radar (SAR), continuously scanning the ground, and transmitting image data to the earth station on a regular basis. Three types of images are mainly used, and the optical sensor's multi-spectral mode (color photo) can be photographed at night in a 4-band configuration that adds the near-infrared to the RGB band of visible light. It is effective for collecting disasters and other situations. The SAR image is a radar image generated by radio waves and transmits even when it is cloudy. Therefore, the image can be collected even when the weather is bad, and a ship in operation can be measured using the Doppler effect (see Patent Document 1). . Among them, the panchromatic mode (monochrome photo) of the optical sensor has a resolution of less than 1 m (the world's highest resolution QuickBird 0.6 m) that can identify passenger cars on the ground, and is useful for monitoring traffic conditions. With regard to traffic monitoring, aerial photography with a surveillance camera, helicopter, or aircraft installed on the ground provides clearer images, but it is difficult to observe a wide area at the same time, and it is hidden behind buildings. In recent years, satellite images have attracted attention due to the problem that a blind spot always occurs.

また、目標物を航空機と船舶に特化したテンプレートマッチングによる検出方法(特許文献2参照)、テンプレートをあらかじめ準備し、画像データの先頭画素から順次スキャンしながらテンプレートと同サイズの画素ブロックを抽出し、テンプレートと照合する手法(特許文献3参照)なども提案されている。
特許第3863014号 特許第3978979号 特開2001−67470号公報
In addition, a target detection method using template matching that specializes in aircraft and ships (see Patent Document 2), a template is prepared in advance, and pixel blocks of the same size as the template are extracted while sequentially scanning from the first pixel of the image data A method of matching with a template (see Patent Document 3) has also been proposed.
Japanese Patent No. 3863014 Japanese Patent No. 3978979 JP 2001-67470 A

しかしながら、上記特許文献2の手法では、マッチング判定基準は検索漏れが無いように予め甘く設定しているため、検索結果に検索ノイズが多く含まれるという問題がある。また、上記特許文献3の手法でも、最適な判定基準を設定するのが難しいという問題がある。   However, the technique disclosed in Patent Document 2 has a problem in that a lot of search noise is included in the search result because the matching criterion is set in advance so that there is no search omission. In addition, the method of Patent Document 3 also has a problem that it is difficult to set an optimum determination criterion.

そこで、本発明は、目標物を含んだテンプレート画像を用いて、衛星画像等の探索対象とする画像から目標物を抽出する際に、テンプレート画像と目標物が類似しているかどうかを判定する判定基準値の設定を適切に行うことが可能な目標物検出システムを提供することを課題とする。   Accordingly, the present invention uses a template image including a target to determine whether the template image and the target are similar when extracting the target from an image to be searched such as a satellite image. It is an object to provide a target detection system capable of appropriately setting a reference value.

上記課題を解決するため、本発明第1の態様では、目標物を含むテンプレート画像を用いて、探索対象である探索対象画像から、目標物を検出するシステムであって、前記テンプレート画像を記憶したテンプレート記憶手段と、目標物のサンプルを含むサンプル画像上で指定された画素位置から所定範囲内の各画素位置において、前記各テンプレート画像と同一サイズの画素ブロックを前記サンプル画像から抽出し、前記テンプレート画像と前記画素ブロックの類似性評価値を算出し、当該類似性評価値に所定の値を演算した値を判定基準値として設定する判定基準値設定手段と、前記探索対象画像に対して、先頭画素位置から最終画素位置まで抽出位置を順次移動させながら、前記各テンプレート画像と同一サイズの画素ブロックを前記探索対象画像から抽出し、前記テンプレート画像と前記画素ブロックの類似性評価値を算出し、当該類似性評価値と前記設定された判定基準値と比較することにより類似性を判断する類似性判断手段と、前記類似性判断手段により類似性ありと判断された場合に、その際のテンプレート画像のID、前記探索対象画像上における画素ブロックの位置を特定する画素位置、前記テンプレート画像の回転角度を出力する探索結果出力手段を有する目標物検出システムを提供する。   In order to solve the above-described problem, in the first aspect of the present invention, a template image including a target is used to detect a target from a search target image that is a search target, and the template image is stored. A template storage unit, and a pixel block having the same size as each template image is extracted from the sample image at each pixel position within a predetermined range from a pixel position designated on a sample image including a target sample; A criterion value setting means for calculating a similarity evaluation value between the image and the pixel block, and setting a value obtained by calculating a predetermined value for the similarity evaluation value as a criterion value; While sequentially extracting the extraction position from the pixel position to the final pixel position, the pixel block having the same size as each template image is searched for. Similarity determination means for extracting similarity from the target image, calculating a similarity evaluation value between the template image and the pixel block, and determining the similarity by comparing the similarity evaluation value with the set criterion value; When the similarity determination unit determines that there is similarity, the template image ID at that time, the pixel position for specifying the position of the pixel block on the search target image, and the rotation angle of the template image are output. A target detection system having search result output means is provided.

本発明第1の態様によれば、目標物を含むテンプレート画像と探索対象画像中の画素ブロックとの比較により探索対象画像から目標物を検出するにあたり、比較の際に用いる類似性評価値の判定基準値を、事前にサンプル画像との比較により得た類似性評価値に基づいて設定するようにしたので、テンプレート画像と目標物が類似しているかどうかを判定する判定基準値の設定を適切に行うことが可能となる。   According to the first aspect of the present invention, when detecting a target object from a search target image by comparing a template image including the target object and a pixel block in the search target image, determination of a similarity evaluation value used in the comparison is performed. Since the reference value is set based on the similarity evaluation value obtained by comparison with the sample image in advance, the setting of the determination reference value for determining whether the template image and the target object are similar is set appropriately. Can be done.

また、本発明第2の態様では、本発明第1の態様における前記テンプレート画像に多角形形状の有効画像領域を設定しており、前記判定基準値設定手段および前記類似性判断手段は、前記テンプレート画像内の有効画像領域に含まれる画素群と、前記画素ブロック内の前記有効画像領域内部に対応する画素群とに基づいて、前記類似性評価値を算出するようにしていることを特徴とする。本発明第2の態様によれば、前記テンプレート画像に含まれる有効画像領域の周辺画素が、本発明第1の態様における類似性評価値の算出の対象外となるため、高精度な算出が行える。   Further, in the second aspect of the present invention, a polygonal effective image area is set in the template image in the first aspect of the present invention, and the determination reference value setting means and the similarity determination means include the template The similarity evaluation value is calculated based on a pixel group included in an effective image area in the image and a pixel group corresponding to the inside of the effective image area in the pixel block. . According to the second aspect of the present invention, the peripheral pixels of the effective image area included in the template image are excluded from the calculation of the similarity evaluation value in the first aspect of the present invention, so that high-precision calculation can be performed. .

本発明第3の態様では、本発明第1、第2の態様における判定基準値設定手段、類似性判断手段において、類似性評価値は複数算出されるとともに、各類似性評価値に対応する判定基準値が設定され、前記類似性判断手段では、1つの類似性評価値で類似性なしと判断された場合に、他の類似性評価値に関する判断を行うことなく類似性なしと判断することを特徴とする。本発明第3の態様によれば、類似性評価値を複数算出し、1つの類似性評価値で類似性なしと判断された場合に、全体としても類似性なしと判断するようにし、他の類似性評価値に関する判断を行わないようにしたため、全体として処理が高速化される。   In the third aspect of the present invention, a plurality of similarity evaluation values are calculated in the determination reference value setting means and the similarity determination means in the first and second aspects of the present invention, and the determination corresponding to each similarity evaluation value is performed. When a reference value is set and the similarity determination means determines that there is no similarity with one similarity evaluation value, it is determined that there is no similarity without making a determination regarding another similarity evaluation value. Features. According to the third aspect of the present invention, when a plurality of similarity evaluation values are calculated and it is determined that there is no similarity based on one similarity evaluation value, it is determined that there is no similarity as a whole. Since the determination regarding the similarity evaluation value is not performed, the overall processing speed is increased.

本発明によれば、目標物を含むテンプレート画像と探索対象画像中の画素ブロックとの比較により探索対象画像から目標物を検出するにあたり、テンプレート画像と目標物が類似しているかどうかを判定する判定基準値の設定を適切に行うことが可能となる。   According to the present invention, in detecting a target object from a search target image by comparing a template image including the target object and a pixel block in the search target image, determination for determining whether the template image and the target object are similar to each other. It is possible to appropriately set the reference value.

以下、本発明の実施形態について図面を参照して詳細に説明する。
(1.システム構成)
まず、本発明に係る目標物検出システムの構成について説明する。図1は本発明に係る目標物検出システムの構成図である。図1において、10は探索対象画像記憶部、20はテンプレート準備部、30はテンプレート記憶部、40は目標物探索部、50は探索結果記憶部である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
(1. System configuration)
First, the configuration of the target object detection system according to the present invention will be described. FIG. 1 is a configuration diagram of a target object detection system according to the present invention. In FIG. 1, 10 is a search target image storage unit, 20 is a template preparation unit, 30 is a template storage unit, 40 is a target search unit, and 50 is a search result storage unit.

探索対象画像記憶部10は、探索対象となる画像である探索対象画像、および目標物のサンプルを記憶したサンプル画像を記憶したものである。探索対象画像上に探索対象とする目標物が多数存在していれば、その内の1つをサンプルとして用いることも可能である。この場合、探索対象画像はサンプル画像としての役割も果たすことになる。また、本実施形態では、人工衛星により撮影された画像である衛星画像を探索対象画像として記憶している。テンプレート準備部20は、サンプル画像に対して対話的に設定を行い、テンプレート画像を準備するものであり、テンプレート作成手段21、判定基準値設定手段22、テンプレート更新手段23を有している。テンプレート記憶部30は、テンプレート準備部20により準備されたテンプレート画像を記憶するものである。目標物探索部40は、探索対象画像中の所定の領域とテンプレート画像を比較することにより、目標物を探索するものであり、角度非依存類似性判断手段41、角度依存類似性判断手段42、探索結果出力手段43を有している。探索結果記憶部50は、目標物探索部40により探索された結果を記憶するものである。図1に示した目標物検出システムは、現実には汎用のコンピュータに専用のプログラムを組み込むことにより実現される。また、各記憶部は、コンピュータに内蔵または接続されたハードディスク等の記憶装置で実現される。   The search target image storage unit 10 stores a search target image that is an image to be searched and a sample image that stores a sample of the target. If there are many targets to be searched on the search target image, one of them can be used as a sample. In this case, the search target image also serves as a sample image. In the present embodiment, a satellite image that is an image taken by an artificial satellite is stored as a search target image. The template preparation unit 20 interactively sets a sample image to prepare a template image, and includes a template creation unit 21, a determination reference value setting unit 22, and a template update unit 23. The template storage unit 30 stores the template image prepared by the template preparation unit 20. The target searching unit 40 searches for a target by comparing a predetermined region in the search target image with the template image, and includes an angle-independent similarity determining unit 41, an angle-dependent similarity determining unit 42, Search result output means 43 is provided. The search result storage unit 50 stores the results searched by the target object search unit 40. The target object detection system shown in FIG. 1 is actually realized by incorporating a dedicated program into a general-purpose computer. Each storage unit is realized by a storage device such as a hard disk built in or connected to the computer.

(2.テンプレート画像の準備)
次に、図1に示した目標物検出システムの処理動作について説明する。まず、探索対象画像記憶部10には、人工衛星により撮影された衛星画像が探索対象画像として記憶される。本実施形態では、衛星画像として、Adobe社TIFF規格準拠のGeo−TIFF形式であり、画像データに地理情報(緯度経度情報など)が付加されたものを採用する。
(2. Preparation of template image)
Next, the processing operation of the target object detection system shown in FIG. 1 will be described. First, the search target image storage unit 10 stores a satellite image captured by an artificial satellite as a search target image. In the present embodiment, the satellite image is in the Geo-TIFF format compliant with the Adobe TIFF standard, and the image data with geographic information (such as latitude / longitude information) added thereto is adopted.

目標物検出システムが起動されると、まず、テンプレート準備部20は探索対象画像記憶部10に記憶された探索対象画像をソース画像の形式からワーク画像の形式に変換する。これは、探索の効率を上げるために行われるものである。具体的には、公知のヒストグラム平坦化技術を用いてワーク画像の形式に変換する。本実施形態では、ワーク画像をRXY形式で作成する。テンプレート準備部20は、この探索対象画像をサンプル画像として用いる。   When the target detection system is activated, first, the template preparation unit 20 converts the search target image stored in the search target image storage unit 10 from the source image format to the work image format. This is done to increase the search efficiency. Specifically, it is converted into a work image format using a known histogram flattening technique. In the present embodiment, the work image is created in the RXY format. The template preparation unit 20 uses this search target image as a sample image.

続いて、テンプレート準備部20は、ワーク画像形式に変換したサンプル画像としての探索対象画像を画面に表示し、テンプレート画像作成のための画像領域の指定を利用者に促す。これに対して、利用者は、画面に表示された探索対象画像において、多角形形状(本実施形態では4頂点で構成される自由な四角形形状)の画像領域の輪郭を指定する。これは、マウス操作により、四角形形状の4つの頂点を指定することにより行われる。例えば、船舶を目的物とする場合、利用者は、衛星画像に写っている船舶を見つけ、その船舶を含む有効画像領域を指定することになる。具体的には画面上に初期状態として正方形形状の四角形を表示し、利用者はいずれかの頂点を画面上で選択し、前記頂点を所望の位置までドラッギングさせることにより頂点を指示し、4つの頂点に対して順次同様な操作を行なう。このとき、図2に示されるように、指定された四角形の外側に四角形を360度回転させても、はみ出さないように外接する正方形形状(図2の外側正方形形状)を同時に自動生成させる。従って、初期状態では画面上に2重の正方形が表示されており、利用者が内側の正方形形状を所望の四角形に変形させると、それに連動して外側正方形形状が正方形を維持しながら変化する。   Subsequently, the template preparation unit 20 displays the search target image as the sample image converted into the work image format on the screen, and prompts the user to specify an image area for creating the template image. On the other hand, the user designates the contour of an image area having a polygonal shape (in this embodiment, a free rectangular shape including four vertices) in the search target image displayed on the screen. This is performed by designating four vertices of a square shape by operating the mouse. For example, when a ship is an object, the user finds a ship shown in a satellite image and designates an effective image area including the ship. Specifically, a square of a square shape is displayed as an initial state on the screen, and the user selects one of the vertices on the screen, designates the vertex by dragging the vertex to a desired position, and designates four vertices. The same operation is sequentially performed on the vertices. At this time, as shown in FIG. 2, even if the square is rotated 360 degrees outside the designated square, a circumscribed square shape (outer square shape in FIG. 2) is automatically generated at the same time so as not to protrude. Accordingly, a double square is displayed on the screen in the initial state, and when the user transforms the inner square shape into a desired quadrangle, the outer square shape changes while maintaining the square.

利用者が、表示された探索対象画像内において、所定の四角形の有効画像領域の指定を完了すると、テンプレート作成手段21は、探索対象画像内から指定された有効画像領域の外側に定義された正方形形状に基づいてトリミングする。この結果、正方形サイズのテンプレート画像が得られ、同時にテンプレート画像内で利用者が定義した四角形領域の外側部分をマスクするような情報が付加される。具体的には、図2に示されるように、テンプレート画像の各画素値は0から255の8ビットの値をもつが、利用者が定義した四角形領域の内側は1から255の画素値をもたせ、外側は全て0の画素値をもたせるようにしている。   When the user completes the specification of a predetermined quadrangular effective image area in the displayed search target image, the template creation means 21 defines a square defined outside the effective image area specified from within the search target image. Trimming based on shape. As a result, a square-sized template image is obtained, and at the same time, information for masking the outer portion of the rectangular area defined by the user in the template image is added. Specifically, as shown in FIG. 2, each pixel value of the template image has an 8-bit value from 0 to 255, but the inside of the square area defined by the user has a pixel value from 1 to 255. The outer side has a pixel value of 0.

さらに、多角形形状およびその内部だけを所定の角度で回転させたパターンも登録する。本実施形態では、角度を45度単位で回転させ、8つの異なる傾き角度に従ったテンプレート画像を作成する。角度が異なる8つのテンプレート画像を図3に示す。このとき、外側の正方形形状は利用者が指定した多角形を360度回転させても、はみ出さないように定義しているため、前記8種類の角度の多角形は同一サイズのテンプレート画像で表現することができる。本実施形態では、角度を異ならせたパターンは同一のテンプレート画像として同一のテンプレートIDで登録する。したがって、図3に示したテンプレート画像は、全て同一のテンプレートIDを持ち、各パターンは、その角度で特定する。本実施形態では、テンプレートIDを8個登録可能となっている。この場合、8個のテンプレート画像について、それぞれ8つの角度で登録されるので、全部で64パターンが登録されることになる。   Furthermore, a polygon shape and a pattern in which only the inside thereof is rotated at a predetermined angle are also registered. In the present embodiment, the angle is rotated in units of 45 degrees, and template images according to eight different inclination angles are created. FIG. 3 shows eight template images having different angles. At this time, since the outer square shape is defined so that it does not protrude even if the polygon specified by the user is rotated 360 degrees, the polygons of the eight types of angles are represented by template images of the same size. can do. In this embodiment, patterns with different angles are registered with the same template ID as the same template image. Therefore, the template images shown in FIG. 3 all have the same template ID, and each pattern is specified by its angle. In this embodiment, eight template IDs can be registered. In this case, since eight template images are registered at eight angles, 64 patterns are registered in total.

テンプレート画像が登録されたら、テンプレート準備部20は、探索対象画像上の適合とすべき対象物を指定するように促す。利用者が、適合とすべき対象物を指定すると、指定された位置付近の画素値を利用して、判定基準値の算出およびテンプレート画像の更新を行う。この判定基準値の算出およびテンプレート画像の更新について図4のフローチャートを用いて説明する。   When the template image is registered, the template preparation unit 20 prompts the user to specify an object to be matched on the search target image. When the user designates an object to be matched, the determination reference value is calculated and the template image is updated using the pixel values near the designated position. The calculation of the determination reference value and the update of the template image will be described with reference to the flowchart of FIG.

まず、利用者は、画面に表示された探索対象画像の内容を見て、探索対象に含めたいと考える対象物を見つけ、その対象物上の点を指定する(S101)。図5(a)は、対象物を指定する際の探索対象画像の様子を示す図である。探索対象画像中で、利用者が探索対象に含めたい対象物上の点を指定すると、図5(a)に示すように、テンプレート画像の正方形状の外枠および有効画像領域を示す多角形状が表示される。例えば、衛星画像の中から船舶を検出したい場合、衛星画像中の1つの船舶の上の点を指定する。   First, the user looks at the contents of the search target image displayed on the screen, finds a target object that he wants to include in the search target, and designates a point on the target object (S101). FIG. 5A is a diagram illustrating a state of a search target image when an object is specified. When the user designates a point on the target object to be included in the search target image in the search target image, as shown in FIG. 5A, a polygonal shape indicating a square outer frame of the template image and an effective image area is obtained. Is displayed. For example, when a ship is to be detected from a satellite image, a point on one ship in the satellite image is designated.

続いて、指定された位置を基点にしてテンプレート画像とのマッチング処理を行う(S102)。この処理を行う理由は、図5(a)のように、利用者が画面上で指定した点は視覚的な判断によるもので曖昧性に富むため、この点を基にそのまま判定基準値を算出すると、不適切な探索が行なわれる可能性が高いためである。そこで、本処理では利用者が指示した点を最適な位置に補正するものである。具体的には、図5(b)に示すように、指定された探索対象画像上の基点(Xc、Yc)とテンプレート画像の中心位置を合わせ、そこからテンプレート画像をx方向,y方向に1画素単位で、設定された範囲内において移動させながら、マッチング処理を行う。このマッチング処理の詳細については後述する。同一位置において、角度を変えた8通りのテンプレート画像に対してマッチング処理を行い、最も類似度の高い角度のテンプレート画像を選出するとともにその探索対象画像の画素位置を最適位置として特定する。   Subsequently, matching processing with the template image is performed using the designated position as a base point (S102). The reason for this processing is that the point specified by the user on the screen is based on visual judgment and is ambiguous as shown in FIG. 5A. Therefore, the judgment reference value is calculated as it is based on this point. This is because there is a high possibility that an inappropriate search is performed. Therefore, in this process, the point designated by the user is corrected to an optimum position. Specifically, as shown in FIG. 5B, the base point (Xc, Yc) on the designated search target image and the center position of the template image are aligned, and from there, the template image is set to 1 in the x and y directions. Matching processing is performed while moving within a set range in pixel units. Details of this matching process will be described later. At the same position, matching processing is performed on eight types of template images with different angles, a template image having the highest similarity is selected, and the pixel position of the search target image is specified as the optimum position.

次に、探索対象画像上の対象物が適合判定されるように判定基準値の設定を行う(S103)。判定基準値の設定が終わったら、最適位置における探索対象画像の画素ブロックとテンプレート画像を合成し、その合成画像でテンプレート画像を更新する(S104)。   Next, a determination reference value is set so that the object on the search target image is determined to be compatible (S103). When the setting of the determination reference value is completed, the pixel block of the search target image at the optimal position and the template image are combined, and the template image is updated with the combined image (S104).

次に、上記S102におけるマッチング処理の詳細について、図6のフローチャートを用いて説明する。マッチング処理を行う際は、まず、類似性評価値となる各変数の初期化を行う。具体的には、輝度ヒストグラムの差分の最小値、階調変動ヒストグラムの差分の最小値、重心間距離の最小値、慣性モーメント差分の最小値、グレー階調画素差分の最小値、正規化相関係数の最大値の6つの変数を初期化する。本実施形態では、これら6つの変数は全て0〜1000の値をとり、正規化相関係数については、初期値を最小値0とし、他の5つの変数については、初期値を最大値1000とする。   Next, the details of the matching process in S102 will be described with reference to the flowchart of FIG. When performing the matching process, first, each variable that becomes the similarity evaluation value is initialized. Specifically, the minimum value of the luminance histogram difference, the minimum value of the gradation fluctuation histogram, the minimum value of the distance between the centroids, the minimum value of the moment of inertia difference, the minimum value of the gray gradation pixel difference, and the normalized phase relationship Initialize the six variables with the maximum number. In the present embodiment, all of these six variables take values from 0 to 1000, with respect to the normalized correlation coefficient, the initial value is the minimum value 0, and for the other five variables, the initial value is the maximum value 1000. To do.

各変数の初期化が終わったら、輝度ヒストグラムの照合を行う(S201)。具体的には、まず、テンプレート画像のサイズをS×Sとし、テンプレート画像の画素(x,y) (0≦x≦S-1, 0≦y≦S-1)における階調値をVt(x,y)(0〜255)、探索対象画像の位置(Xc+dx,Yc+dy) を起点とする領域内のテンプレート位置(x,y)に対応する画像階調値をV(x+Xc+dx,y+Yc+dy)(1〜255)とする。S×S 画素の範囲内で、図2で示した有効画像領域内の画素に対応するVt(x,y) >0となる画素(x,y)において、V(x,y)/16の値に基づく探索対象画像の16階調の輝度ヒストグラムH(v) (0≦v≦15)、およびVt(x,y)/16の値に基づくテンプレート画像の16階調の輝度ヒストグラムHt(v) (0≦v≦15)を算出する。さらに、以下の〔数式1〕に従った処理を実行して輝度ヒストグラム差分を算出する。   When the initialization of each variable is completed, the luminance histogram is collated (S201). Specifically, first, the size of the template image is set to S × S, and the gradation value at the pixel (x, y) (0 ≦ x ≦ S−1, 0 ≦ y ≦ S−1) of the template image is set to Vt ( x, y) (0 to 255), and the image gradation value corresponding to the template position (x, y) in the region starting from the position of the search target image (Xc + dx, Yc + dy) is V (x + Xc + dx, y + Yc + dy) (1 to 255). Within the range of S × S pixels, V (x, y) / 16 of the pixel (x, y) where Vt (x, y)> 0 corresponding to the pixel in the effective image area shown in FIG. 16-gradation luminance histogram H (v) (0 ≦ v ≦ 15) of the search target image based on the value and 16-gradation luminance histogram Ht (v of the template image based on the value of Vt (x, y) / 16 ) (0 ≦ v ≦ 15) is calculated. Further, a luminance histogram difference is calculated by executing processing according to the following [Equation 1].

〔数式1〕
(輝度ヒストグラム差分)=1000・Σ v=0,15|H(v)−Ht(v)|/ Σ v=0,15(H(v)+Ht(v))
[Formula 1]
(Luminance histogram difference) = 1000 · Σv = 0,15 | H (v) −Ht (v) | / Σv = 0,15 (H (v) + Ht (v))

続いて、階調変動ヒストグラムの照合を行う(S202)。具体的には、S201と同様、テンプレート画像のサイズをS×Sとし、S×S 画素の範囲内で、図2で示した有効画像領域内の画素に対応するVt(x,y) >0となる画素(x,y)において、V(x,y)%16(16で割った余り)の値に基づく探索対象画像の16階調の階調変動ヒストグラムHD(v) (0≦v≦15)、およびVt(x,y)%16の値に基づくテンプレート画像の16階調の階調変動ヒストグラムHDt(v) (0≦v≦15)を算出する。HD(v)は各画素の下位4ビット、HDt(v)は各画素の上位4ビットに基づく階調変動ヒストグラムである。さらに、以下の〔数式2〕に従った処理を実行して階調変動ヒストグラム差分、すなわち階調変動ヒストグラム同士のユークリッド距離を算出する。   Subsequently, the gradation fluctuation histogram is collated (S202). Specifically, as in S201, the size of the template image is S × S, and Vt (x, y)> 0 corresponding to the pixels in the effective image area shown in FIG. 2 within the range of S × S pixels. 16 pixel gradation fluctuation histogram HD (v) (0 ≦ v ≦) of the search target image based on the value of V (x, y)% 16 (the remainder divided by 16) in the pixel (x, y) 15) and a gradation fluctuation histogram HDt (v) (0 ≦ v ≦ 15) of 16 gradations of the template image based on the value of Vt (x, y)% 16. HD (v) is a gradation fluctuation histogram based on the lower 4 bits of each pixel, and HDt (v) is an upper 4 bits of each pixel. Furthermore, the gradation fluctuation histogram difference, that is, the Euclidean distance between the gradation fluctuation histograms is calculated by executing processing according to the following [Equation 2].

〔数式2〕
(階調変動ヒストグラム差分)=1000・Σ v=0,15|HD(v)−HDt(v)|/ Σ v=0,15(HD(v)+HDt(v))
[Formula 2]
(Gradation fluctuation histogram difference) = 1000 · Σv = 0,15 | HD (v) −HDt (v) | / Σv = 0,15 (HD (v) + HDt (v))

次に、重心間距離の算出を行う(S203)。具体的には、まず、テンプレート画像のサイズをS×Sとし、テンプレート画像の画素(x,y) (0≦x≦S-1, 0≦y≦S-1)における階調値をVt(x,y)(0〜255)、探索対象画像の位置(Xc+dx,Yc+dy) を起点とする領域内のテンプレート画像の位置(x,y)に対応する画像階調値をV(x+Xc+dx,y+Yc+dy) (1〜255)とする。S×S 画素の範囲内で、図2で示した有効画像領域内の画素に対応する Vt(x,y) >0となる画素(x,y)を用いて、探索対象画像の重心(Xg,Yg)とテンプレート画像の重心(Xgt,Ygt)を以下の〔数式3〕に従った処理を実行して算出する。   Next, the distance between the centers of gravity is calculated (S203). Specifically, first, the size of the template image is set to S × S, and the gradation value at the pixel (x, y) (0 ≦ x ≦ S−1, 0 ≦ y ≦ S−1) of the template image is set to Vt ( x, y) (0 to 255), the image gradation value corresponding to the position (x, y) of the template image in the region starting from the position (Xc + dx, Yc + dy) of the search target image is represented by V ( x + Xc + dx, y + Yc + dy) (1 to 255). Within the range of S × S pixels, using the pixel (x, y) for which Vt (x, y)> 0 corresponding to the pixel in the effective image area shown in FIG. , Yg) and the center of gravity (Xgt, Ygt) of the template image are calculated by executing processing according to the following [Equation 3].

〔数式3〕
Xg= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y)≠0 V(x+Xc+dx,y+Yc+dy)・x
/ Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 V(x+Xc+dx,y+Yc+dy)
Yg= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 V(x+Xc+dx,y+Yc+dy)・y
/ Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 V(x+Xc+dx,y+Yc+dy)
Xgt= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 Vt(x,y)・x/ Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 Vt(x,y)
Ygt= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 Vt(x,y)・y/ Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 Vt(x,y)
[Formula 3]
Xg = Σy = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 V (x + Xc + dx, y + Yc + dy) ・ x
/ Σ y = 0, S-1 Σ x = 0, S-1 | Vt (x, y) ≠ 0 V (x + Xc + dx, y + Yc + dy)
Yg = Σy = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 V (x + Xc + dx, y + Yc + dy) ・ y
/ Σ y = 0, S-1 Σ x = 0, S-1 | Vt (x, y) ≠ 0 V (x + Xc + dx, y + Yc + dy)
Xgt = Σ y = 0, S -1 Σ x = 0, S-1 | Vt (x, y) ≠ 0 Vt (x, y) · x / Σ y = 0, S-1 Σ x = 0, S -1 | Vt (x, y) ≠ 0 Vt (x, y)
Ygt = Σ y = 0, S -1 Σ x = 0, S-1 | Vt (x, y) ≠ 0 Vt (x, y) · y / Σ y = 0, S-1 Σ x = 0, S -1 | Vt (x, y) ≠ 0 Vt (x, y)

さらに、以下の〔数式4〕に従った処理を実行して重心間距離を算出する。   Furthermore, the process according to the following [Equation 4] is executed to calculate the distance between the centers of gravity.

〔数式4〕
(重心間距離)=1000・{(Xg−Xgt)(Xg−Xgt)+(Yg−Ygt)(Yg−ygt)}1/2/ S
[Formula 4]
(Distance between centroids) = 1000 · {(Xg−Xgt) (Xg−Xgt) + (Yg−Ygt) (Yg−ygt)} 1/2 / S

次に、慣性モーメントの照合を行う(S204)。具体的には、まず、S203で求めた探索対象画像の重心(Xg,Yg)およびテンプレート画像の重心(Xgt,Ygt)を用いて、S×S 画素の範囲内で、図2で示した有効画像領域内の画素に対応する Vt(x,y) >0となる画素(x,y)を用いて、探索対象画像の慣性モーメントM、 およびテンプレート画像の慣性モーメントMtを以下の〔数式5〕に従った処理を実行して算出する。   Next, the inertia moment is collated (S204). Specifically, first, using the centroid (Xg, Yg) of the search target image obtained in S203 and the centroid (Xgt, Ygt) of the template image, within the range of S × S pixels, the validity shown in FIG. Using the pixel (x, y) with Vt (x, y)> 0 corresponding to the pixel in the image area, the inertia moment M of the search target image and the inertia moment Mt of the template image are expressed by the following [Equation 5]. Execute the process according to

〔数式5〕
M= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 V(x+Xc+dx,y+Yc+dy)・[(x-Xg)(x-Xg)+(y-Yg)(y-Yg)]
/Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 V(x+Xc+dx,y+Yc+dy)
Mt= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 Vt(x,y)・[(x-Xgt)(x-Xgt)+(y-Ygt)(y-Ygt)]
/Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 Vt(x,y)
[Formula 5]
M = Σy = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 V (x + Xc + dx, y + Yc + dy) ・ [(x-Xg) (x -Xg) + (y-Yg) (y-Yg)]
/ Σ y = 0, S-1 Σ x = 0, S-1 | Vt (x, y) ≠ 0 V (x + Xc + dx, y + Yc + dy)
Mt = Σy = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 Vt (x, y) ・ [(x-Xgt) (x-Xgt) + (y-Ygt ) (y-Ygt)]
/ Σ y = 0, S-1 Σ x = 0, S-1 | Vt (x, y) ≠ 0 Vt (x, y)

さらに、以下の〔数式6〕に従った処理を実行して慣性モーメント差分を算出する。   Further, a process according to the following [Equation 6] is executed to calculate the moment of inertia difference.

〔数式6〕
(慣性モーメント差分)=1000・|M−Mt|/ (M+Mt)
[Formula 6]
(Inertia moment difference) = 1000 · | M−Mt | / (M + Mt)

上記S201〜S204は、角度に依存しない処理である。したがって、各テンプレート画像について1回だけ行えばよい。S201〜S204の処理は、いずれの角度のテンプレート画像を用いても良いため、本実施形態では、代表して0度のテンプレート画像を用いている。ここからのS205、S206は、角度に依存する処理であるため、同一IDをもつテンプレート画像についても、角度別に処理を行う。まず、グレー階調画素差分の算出を行う(S205)。具体的には、まず、テンプレート画像のサイズをS×Sとし、テンプレート画像の画素(x,y) (0≦x≦S-1, 0≦y≦S-1)における階調値をVt(x,y) (0〜255)、探索対象画像の位置(Xc+dx,Yc+dy) を起点とする領域内のテンプレート位置(x,y)に対応する画像階調値をV(x+Xc+dx,y+Yc+dy) (1〜255)とする。ここで、シャドウ側をハイライト側に上げ、中間調部をシャドウ側に落とすような以下の階調変換を施す。Vt(x,y)≧128のとき、Vt'(x,y)=Vt(x,y)-128、 Vt(x,y)<128のとき、Vt'(x,y)=127-Vt(x,y) V(x,y) ≧128のとき、V'(x,y)=V(x,y)-128、 V(x,y)<128のとき、V'(x,y)=127-V(x,y) S×S 画素の範囲内で、図2で示した有効画像領域内の画素に対応する Vt(x,y) >0となるC個の画素(x,y)を用いて、以下の〔数式7〕に従った処理を実行して探索対象画像とテンプレート画像の画素差分であるグレー階調画素差分を算出する。   Steps S201 to S204 are processes that do not depend on the angle. Therefore, it is only necessary to perform once for each template image. Since the template image at any angle may be used in the processes of S201 to S204, a template image of 0 degree is typically used in the present embodiment. Since S205 and S206 from here are processing depending on the angle, the template image having the same ID is also processed for each angle. First, a gray gradation pixel difference is calculated (S205). Specifically, first, the size of the template image is set to S × S, and the gradation value at the pixel (x, y) (0 ≦ x ≦ S−1, 0 ≦ y ≦ S−1) of the template image is set to Vt ( x, y) (0 to 255), and the image gradation value corresponding to the template position (x, y) in the region starting from the position (Xc + dx, Yc + dy) of the search target image is represented by V (x + Xc + dx, y + Yc + dy) (1 to 255). Here, the following tone conversion is performed to raise the shadow side to the highlight side and drop the halftone portion to the shadow side. When Vt (x, y) ≥128, Vt '(x, y) = Vt (x, y) -128, when Vt (x, y) <128, Vt' (x, y) = 127-Vt (x, y) When V (x, y) ≥128, V '(x, y) = V (x, y) -128, when V (x, y) <128, V' (x, y ) = 127−V (x, y) Within the range of S × S pixels, C pixels (x, x) corresponding to the pixels in the effective image area shown in FIG. Using y), processing according to the following [Equation 7] is executed to calculate a gray gradation pixel difference which is a pixel difference between the search target image and the template image.

〔数式7〕
(グレー階調画素差分)= 1000・Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 |V'(x+Xc+dx,y+Yc+dy)−Vt'(x,y)|
/ ( V'(x+Xc+dx,y+Yc+dy)+Vt'(x,y) )
[Formula 7]
(Gray gradation pixel difference) = 1000 · Σ y = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 | V '(x + Xc + dx, y + Yc + dy ) −Vt '(x, y) |
/ (V '(x + Xc + dx, y + Yc + dy) + Vt' (x, y))

次に、正規化相関係数の算出を行う(S206)。具体的には、まず、テンプレート画像のサイズをS×Sとし、テンプレート画像の画素(x,y) (0≦x≦S-1, 0≦y≦S-1)における階調値をVt(x,y) (0〜255)、探索対象画像の位置(Xc+dx,Yc+dy) を起点とする領域内のテンプレート位置(x,y)に対応する画像階調値をV(x+Xc+dx,y+Yc+dy) (1〜255)とする。S×S 画素の範囲内で、図2で示した有効画像領域内の画素に対応する Vt(x,y) >0となるC個の画素(x,y)を用いて、探索対象画像の平均階調値Vaとテンプレート画像の平均階調値Vatを以下の〔数式8〕に従った処理を実行して算出する。   Next, a normalized correlation coefficient is calculated (S206). Specifically, first, the size of the template image is set to S × S, and the gradation value at the pixel (x, y) (0 ≦ x ≦ S−1, 0 ≦ y ≦ S−1) of the template image is set to Vt ( x, y) (0 to 255), and the image gradation value corresponding to the template position (x, y) in the region starting from the position (Xc + dx, Yc + dy) of the search target image is represented by V (x + Xc + dx, y + Yc + dy) (1 to 255). Within the range of S × S pixels, C pixels (x, y) satisfying Vt (x, y)> 0 corresponding to the pixels in the effective image area shown in FIG. The average gradation value Va and the average gradation value Vat of the template image are calculated by executing processing according to the following [Equation 8].

〔数式8〕
Va= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 V(x+Xc+dx,y+Yc+dy)/ C
Vat= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 Vt(x,y)/ C
C= Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0
[Formula 8]
Va = Σy = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 V (x + Xc + dx, y + Yc + dy) / C
Vat = Σy = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 Vt (x, y) / C
C = Σy = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 1

そして、S×S 画素の範囲内で、図2で示した有効画像領域内の画素に対応する Vt(x,y) >0となる画素(x,y)を用いて、周知の計算式に基づいて正規化相関係数を以下の〔数式9〕に従った処理を実行して算出する。ただし、正規化相関係数が負値(負の相関)となる場合は0(相関無し)として扱う。   Then, within a range of S × S pixels, a pixel (x, y) that satisfies Vt (x, y)> 0 corresponding to the pixel in the effective image area shown in FIG. Based on this, the normalized correlation coefficient is calculated by executing processing according to the following [Equation 9]. However, when the normalized correlation coefficient is a negative value (negative correlation), it is treated as 0 (no correlation).

〔数式9〕
(正規化相関係数)= 1000・Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 (V(x+Xc+dx,y+Yc+dy)-Va)・(Vt(x,y)-Vat)
/[Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 (V(x+Xc+dx,y+Yc+dy)-Va)2 Σ y=0,S-1 Σ x=0,S-1 | Vt(x,y) ≠0 (Vt(x,y)-Vat)2]1/2
[Formula 9]
(Normalized correlation coefficient) = 1000 · Σ y = 0, S-1 Σx = 0, S-1 | Vt (x, y) ≠ 0 (V (x + Xc + dx, y + Yc + dy) -Va) ・ (Vt (x, y) -Vat)
/ [Σ y = 0, S-1 Σ x = 0, S-1 | Vt (x, y) ≠ 0 (V (x + Xc + dx, y + Yc + dy) -Va) 2 Σ y = 0, S-1 Σ x = 0, S-1 | Vt (x, y) ≠ 0 (Vt (x, y) -Vat) 2 ] 1/2

続いて、各変数の更新を行う(S207)。具体的には、S201において算出した輝度ヒストグラム差分が、現在設定されている輝度ヒストグラム差分の最小値より小さく、かつS206において算出した正規化相関係数が現在設定されている正規化相関係数の最大値より大きい場合、輝度ヒストグラムの差分の最小値、階調変動ヒストグラムの差分の最小値、重心間距離の最小値、慣性モーメント差分の最小値、グレー階調画素差分の最小値、正規化相関係数の最大値の6つの変数を今回算出した値に置き換える。そして、位置、テンプレートID、角度の値を、このときの位置、テンプレートID、角度の値で更新する。   Subsequently, each variable is updated (S207). Specifically, the luminance histogram difference calculated in S201 is smaller than the minimum value of the currently set luminance histogram difference, and the normalized correlation coefficient calculated in S206 is the normalized correlation coefficient currently set. If the value is larger than the maximum value, the minimum value of the brightness histogram difference, the minimum value of the gradation fluctuation histogram difference, the minimum value of the distance between the centroids, the minimum value of the moment of inertia difference, the minimum value of the gray gradation pixel difference, and the normalization phase Replace the six variables with the maximum number of relations with the values calculated this time. Then, the position, template ID, and angle values are updated with the position, template ID, and angle values at this time.

各変数の更新が終わったら、1つのテンプレート画像について、全ての角度のパターンの処理が終わったかどうかを判断する(S208)。全ての角度のパターンについて処理が終わっていない場合は、S205に戻って、角度に依存するグレー階調画素差分の算出、正規化相関係数の算出を行う。全ての角度のパターンについて処理が終わった場合は、S209に進む。したがって、本実施形態では、1つのテンプレート画像につき、8通りの角度について、S205〜S207の処理が繰り返される。   When the update of each variable is completed, it is determined whether or not the processing of all angle patterns has been completed for one template image (S208). If the processing has not been completed for all the angle patterns, the process returns to S205 to calculate the gray gradation pixel difference depending on the angle and the normalized correlation coefficient. If the process is completed for all angle patterns, the process proceeds to S209. Therefore, in the present embodiment, the processing of S205 to S207 is repeated for eight angles for one template image.

1つのテンプレート画像の全角度について処理が終わったら、全てのテンプレート画像について処理が終わったかどうかを判断する(S209)。全てのテンプレート画像について処理が終わっていない場合は、S201〜S208の処理を繰り返す。全てのテンプレート画像について処理が終わった場合は、S210に進む。したがって、本実施形態では、1つの画素位置につき、8個のテンプレート画像について、S201〜S208の処理が繰り返される。   When processing is completed for all angles of one template image, it is determined whether or not processing has been completed for all template images (S209). If the processing has not been completed for all template images, the processing of S201 to S208 is repeated. If the processing is completed for all template images, the process proceeds to S210. Therefore, in the present embodiment, the processing of S201 to S208 is repeated for eight template images for one pixel position.

全てのテンプレート画像について処理が終わったら、全ての画素位置について処理が終わったかどうかを判断する(S210)。全ての画素位置とは、指定された基点(Xc、Yc)からx軸、y軸方向にそれぞれ所定画素の範囲に含まれる画素の位置を意味する。所定画素の範囲としては、テンプレート画像のx軸、y軸方向のそれぞれ5%程度が設定されている。例えば、テンプレート画像が100×100画素である場合、5×5の計25画素の位置について、図5に示した処理が繰り返される。全ての画素位置について処理が終わっていない場合は、S201〜S209の処理を繰り返す。全ての画素位置について処理が終わった場合は、各変数を出力して、マッチング処理を終了する。各変数は、各テンプレート画像単位で出力される。   When processing is completed for all template images, it is determined whether processing has been completed for all pixel positions (S210). All pixel positions mean the positions of pixels included in a predetermined pixel range in the x-axis and y-axis directions from the designated base point (Xc, Yc). As the predetermined pixel range, about 5% of each of the x-axis and y-axis directions of the template image is set. For example, when the template image is 100 × 100 pixels, the processing shown in FIG. 5 is repeated for a total of 25 × 5 × 5 pixel positions. If the processing has not been completed for all pixel positions, the processing of S201 to S209 is repeated. When the process is completed for all pixel positions, each variable is output and the matching process is terminated. Each variable is output for each template image.

次に、S103の判定基準値の設定の詳細について説明する。判定基準値は、マッチング処理において出力された各変数に所定の値を乗じることにより設定される。本実施形態では、正規化相関係数については、出力された正規化相関係数の最大値に0.9を乗じた値を判定基準値とし、他の5つの変数については、出力された値に1.1を乗じた値を判定基準値としている。具体的には、以下の〔数式10〕に従った処理を実行して算出する。   Next, details of setting the determination reference value in S103 will be described. The determination reference value is set by multiplying each variable output in the matching process by a predetermined value. In the present embodiment, for the normalized correlation coefficient, a value obtained by multiplying the maximum value of the output normalized correlation coefficient by 0.9 is used as a determination reference value, and for the other five variables, the output value A value obtained by multiplying 1.1 by 1.1 is used as a criterion value. Specifically, the calculation is performed by executing processing according to the following [Equation 10].

〔数式10〕
(輝度ヒストグラム差分の判定基準値)=(輝度ヒストグラム差分の最小値)×1.1
(階調変動ヒストグラム差分の判定基準値)=(階調変動ヒストグラム差分の最小値)×1.1
(重心間距離の判定基準値)=(重心間距離の最小値)×1.1
(慣性モーメント差分の判定基準値)=(慣性モーメント差分の最小値)×1.1
(グレー階調画素差分の判定基準値)=(グレー階調画素差分の最小値)×1.1
(正規化相関係数の判定基準値)=(正規化相関係数の最大値)×0.9
[Formula 10]
(Determination reference value of luminance histogram difference) = (Minimum value of luminance histogram difference) × 1.1
(Judgment reference value of gradation fluctuation histogram difference) = (minimum value of gradation fluctuation histogram difference) × 1.1
(Judgment reference value of distance between centroids) = (minimum value of distance between centroids) × 1.1
(Judgment reference value of moment of inertia difference) = (minimum value of moment of inertia difference) × 1.1
(Determination reference value of gray gradation pixel difference) = (Minimum value of gray gradation pixel difference) × 1.1
(Criteria value of normalized correlation coefficient) = (maximum value of normalized correlation coefficient) × 0.9

続いて、S104のテンプレートの更新の詳細について説明する。S104では、各テンプレート画像を更新する。具体的には、各テンプレート画像の最適位置における探索対象画像上の画素ブロックを用いて、各テンプレート画像の各角度の画像を更新する。まず、各テンプレート画像のうち、最適角度のものと探索対象画像上の画素ブロックの合成を行う。テンプレート画像においてマスク領域は合成を行わないので、テンプレート画像中の多角形領域内部についてのみ合成を行う。   Next, details of the template update in S104 will be described. In S104, each template image is updated. Specifically, the image of each angle of each template image is updated using the pixel block on the search target image at the optimum position of each template image. First, among the template images, the one with the optimum angle and the pixel block on the search target image are synthesized. Since the mask area is not synthesized in the template image, the composition is performed only within the polygon area in the template image.

合成の具体的な手法としては、多角形領域内部の各画素単位で整数の擬似乱数を順次発生させ、所定の数が出たら、探索対象画像上の画素ブロックの対応する画素の値に置き換える。例えば、奇数が出たら、探索対象画像上の画素ブロックの対応する画素に置き換えるように設定しておけば、約半分の確率で多角形領域内部の画素が探索対象画像の画素に置き換えられる。図7は、探索対象画像とテンプレート画像の合成によりテンプレート画像を更新する例を示す図である。図7の例では、説明の便宜のため、画像サイズを5×5画素に簡略化している。図7(b)はテンプレート画像であり、Tは有効画像領域(多角形領域)内部の画素を示し、空白はマスク領域の画素を示している。図7(a)はテンプレート画像に対して最適位置と判断された探索対象画像上の画素ブロックであり、Wは探索対象画像上の画素を示している。この2つの画像に上述のような合成処理を施した結果、図7(c)に示すように、テンプレート画像の有効画像領域の画素Tのうち約半数が探索対象画像の画素Wに置き換えられた合成画像が得られる。この合成画像が、更新されたテンプレート画像として登録される。なお、乱数の発生方式は処理を行う度に異なる系列になるように、シーズを毎回変更する。   As a specific method of synthesis, an integer pseudo-random number is sequentially generated for each pixel in the polygonal area, and when a predetermined number is obtained, it is replaced with the value of the corresponding pixel in the pixel block on the search target image. For example, when an odd number appears, if it is set to be replaced with a corresponding pixel of a pixel block on the search target image, a pixel in the polygonal region is replaced with a pixel of the search target image with about half probability. FIG. 7 is a diagram illustrating an example of updating the template image by combining the search target image and the template image. In the example of FIG. 7, the image size is simplified to 5 × 5 pixels for convenience of explanation. FIG. 7B shows a template image, T indicates a pixel in the effective image area (polygonal area), and a blank indicates a pixel in the mask area. FIG. 7A shows a pixel block on the search target image determined to be the optimum position with respect to the template image, and W indicates a pixel on the search target image. As a result of performing the above-described combining process on these two images, as shown in FIG. 7C, about half of the pixels T in the effective image area of the template image are replaced with the pixels W of the search target image. A composite image is obtained. This composite image is registered as an updated template image. Note that the seeds are changed each time so that the random number generation method becomes a different series each time processing is performed.

最適角度のパターンについて、更新処理が終わったら、他の角度のパターンについても更新を行う。他の角度のパターンについては、最適角度との角度の差を求め、その角度だけ探索対象画像上の画素ブロックを回転し、多角形領域内部の各画素単位を回転した探索対象画像上の画素ブロックの対応する画素に置き換える。このようにして、全ての角度についてテンプレート画像が更新される。あらかじめ用意した全てのテンプレート画像に対して同様の処理を行うことにより、全てのテンプレート画像を更新する。図8はテンプレート画像の更新の様子を示す図である。図8に示すように、探索対象画像上における最適位置の画素ブロックを用いて、全ての角度の画像を更新する。   When the update process is completed for the optimum angle pattern, the other angle patterns are also updated. For other angle patterns, the difference between the angle and the optimum angle is obtained, the pixel block on the search target image is rotated by that angle, and the pixel block on the search target image is rotated for each pixel unit inside the polygonal area. Replace with the corresponding pixel. In this way, the template image is updated for all angles. All template images are updated by performing the same process on all template images prepared in advance. FIG. 8 is a diagram showing how the template image is updated. As shown in FIG. 8, images at all angles are updated using the pixel block at the optimum position on the search target image.

(3.探索処理)
以上のようにして、テンプレート画像の準備が完了したら、準備されたテンプレート画像を用いて、目標物探索部40が目標物の探索を行う。この目標物の探索処理について図9のフローチャートを用いて説明する。利用者が目標物探索処理を指示すると、目標物探索部40の角度非依存類似性判断手段41、角度依存類似性判断手段42が連携して、順次マッチング処理を行う(S301)。具体的には、探索対象画像中の始点画素位置から順次パターンマッチング処理を実行し、類似判定する位置を見つける。
(3. Search process)
As described above, when the preparation of the template image is completed, the target object search unit 40 searches for the target object using the prepared template image. The target searching process will be described with reference to the flowchart of FIG. When the user instructs the target searching process, the angle-independent similarity determining unit 41 and the angle-dependent similarity determining unit 42 of the target searching unit 40 cooperate to sequentially perform the matching process (S301). Specifically, pattern matching processing is sequentially executed from the start pixel position in the search target image to find a position for determining similarity.

図10は、順次マッチング処理の概略を示す図である。順次マッチング処理は、最初に、探索対象画像中の始点画素位置(0,0)を起点として(S−1,S−1)までの正方形状の画素ブロックと、テンプレート画像との比較を行い、(1,0)を起点とする正方形領域、(2,0)を起点とする正方形領域…というように、X方向スキャン範囲に1画素づつ移動させて比較を行っていき、x軸方向について終了したら、Y方向スキャン範囲に1画素分移動し、(0,1)を起点とする正方形領域、(1,1)を起点とする正方形領域…というように順次探索対象画像全体についてテンプレート画像との比較を行っていく。   FIG. 10 is a diagram showing an outline of the sequential matching process. In the sequential matching process, first, a square pixel block up to (S-1, S-1) from the start pixel position (0, 0) in the search target image is compared with the template image, A square area starting at (1, 0), a square area starting at (2, 0), and so on. Then, it moves to the Y direction scan range by one pixel, and the entire search target image is sequentially compared with the template image such as a square area starting from (0, 1), a square area starting from (1, 1), and so on. Make a comparison.

各画素位置におけるマッチング処理は、まず、同一IDのテンプレート画像のうちの1つとのマッチングを行う角度非依存テンプレートマッチングと、同一IDのテンプレート画像のうちの全8個とのマッチングを行う角度依存テンプレートマッチングとに分けて行われる。角度非依存テンプレートマッチングで不適合と判断された場合は、角度依存テンプレートマッチングを行うことなく、次の画素位置に移動する。   In the matching process at each pixel position, first, angle-independent template matching for matching with one of the template images with the same ID and angle-dependent template for matching with all eight of the template images with the same ID. It is divided into matching. If it is determined that the angle-independent template matching is incompatible, the position shifts to the next pixel position without performing the angle-dependent template matching.

画素位置を特定した場合の順次マッチング処理の詳細を図11のフローチャートに示す。まず、S102のマッチング処理と同様、類似性評価値となる各変数の初期化を行う。具体的には、輝度ヒストグラムの差分の最小値、階調変動ヒストグラムの差分の最小値、重心間距離の最小値、慣性モーメント差分の最小値、グレー階調画素差分の最小値、正規化相関係数の最大値の6つの変数を初期化する。探索処理で用いる6つの類似性評価値も全て0〜1000の値をとり、正規化相関係数については、初期値を最小値0とし、他の5つの変数については、初期値を最大値1000とする。続いて、輝度ヒストグラムの照合を行う(S401)。具体的には、上記S201と同様に、〔数式1〕に従った処理を実行して輝度ヒストグラム差分を算出する。そして、この輝度ヒストグラム差分と、S103で設定した判定基準値の比較を行い、判定基準値以上の場合は、不適合となる。不適合とは、類似性がないことを意味する。不適合となった場合は、現在利用しているテンプレート画像では適合しないと判断し、全てのテンプレート画像との処理を終えたかどうかを判断する(S409)。全てのテンプレート画像との処理が終了していない場合は、別のテンプレート画像に変更して(S410)、S401に戻る。   Details of the sequential matching process when the pixel position is specified are shown in the flowchart of FIG. First, as in the matching process in S102, each variable that becomes a similarity evaluation value is initialized. Specifically, the minimum value of the luminance histogram difference, the minimum value of the gradation fluctuation histogram, the minimum value of the distance between the centroids, the minimum value of the moment of inertia difference, the minimum value of the gray gradation pixel difference, and the normalized phase relationship Initialize the six variables with the maximum number. All of the six similarity evaluation values used in the search process also take a value of 0 to 1000. For the normalized correlation coefficient, the initial value is set to the minimum value 0, and for the other five variables, the initial value is set to the maximum value 1000. And Subsequently, the brightness histogram is collated (S401). Specifically, as in S201 above, the process according to [Formula 1] is executed to calculate the luminance histogram difference. Then, the luminance histogram difference is compared with the determination reference value set in S103. Nonconforming means that there is no similarity. If it does not match, it is determined that the currently used template image does not match, and it is determined whether or not processing with all template images has been completed (S409). If processing with all template images has not been completed, the template image is changed to another template image (S410), and the process returns to S401.

S401において、輝度ヒストグラム差分が判定基準値より小さい場合は、階調変動ヒストグラムの照合を行う(S402)。具体的には、上記S202と同様に、〔数式2〕に従った処理を実行して階調変動ヒストグラム差分を算出する。そして、この階調変動ヒストグラム差分と、S103で設定した判定基準値の比較を行い、判定基準値以上の場合は、不適合となる。不適合となった場合の処理は、S401で不適合となった場合と同様である。   If the luminance histogram difference is smaller than the determination reference value in S401, the gradation fluctuation histogram is collated (S402). Specifically, similar to S202 above, the gradation fluctuation histogram difference is calculated by executing the processing according to [Formula 2]. Then, the gradation fluctuation histogram difference is compared with the determination reference value set in S103. Processing in the case of nonconformity is the same as that in the case of nonconformity in S401.

S402において、階調変動ヒストグラム差分が判定基準値より小さい場合は、重心間距離の算出を行う(S403)。具体的には、上記S203と同様に、〔数式3〕〔数式4〕に従った処理を実行して重心間距離を算出する。そして、この重心間距離と、S103で設定した判定基準値の比較を行い、判定基準値以上の場合は、不適合となる。不適合となった場合の処理は、S401で不適合となった場合と同様である。   If the gradation fluctuation histogram difference is smaller than the determination reference value in S402, the distance between the centers of gravity is calculated (S403). Specifically, similarly to S203, the processing according to [Formula 3] and [Formula 4] is executed to calculate the distance between the centers of gravity. Then, the distance between the centers of gravity and the determination reference value set in S103 are compared. Processing in the case of nonconformity is the same as that in the case of nonconformity in S401.

S403において、重心間距離が判定基準値より小さい場合は、慣性モーメントの照合を行う(S404)。具体的には、上記S204と同様に、〔数式5〕〔数式6〕に従った処理を実行して慣性モーメント差分を算出する。そして、この慣性モーメント差分と、S103で設定した判定基準値の比較を行い、判定基準値以上の場合は、不適合となる。不適合となった場合の処理は、S401で不適合となった場合と同様である。S401〜S404の処理は、角度に依存しない処理であるため、それぞれテンプレート画像と照合して1回でも不適合であれば、別のテンプレート画像との処理に移行することになる。   If the distance between the centers of gravity is smaller than the determination reference value in S403, the inertia moment is collated (S404). Specifically, similar to S204, the processing according to [Formula 5] and [Formula 6] is executed to calculate the moment of inertia difference. Then, this moment of inertia difference is compared with the determination reference value set in S103. Processing in the case of nonconformity is the same as that in the case of nonconformity in S401. Since the processing of S401 to S404 is processing that does not depend on the angle, if the template image is not matched even once after matching with the template image, the process proceeds to processing with another template image.

S404において、慣性モーメント差分が判定基準値より小さい場合は、グレー階調画素差分の算出を行う(S405)。具体的には、上記S205と同様に、〔数式7〕に従った処理を実行してグレー階調画素差分を算出する。グレー階調画素差分の算出処理においては、S401〜S404の処理とは異なり、同一のテンプレート画像について全ての角度に対して処理を行う。グレー階調画素差分は、最小のものに更新され、そのときの角度が記録される。そして、全ての角度に対してグレー階調画素差分の算出が終わったら(S406)、最小となったグレー階調画素差分と、S103で設定した判定基準値の比較を行い、グレー階調画素差分が判定基準値以上の場合は、不適合となる。不適合となった場合の処理は、S401で不適合となった場合と同様である。   If the moment of inertia difference is smaller than the determination reference value in S404, the gray gradation pixel difference is calculated (S405). Specifically, similarly to S205 described above, the processing according to [Formula 7] is executed to calculate the gray gradation pixel difference. In the gray tone pixel difference calculation process, unlike the processes in S401 to S404, the same template image is processed for all angles. The gray gradation pixel difference is updated to the minimum, and the angle at that time is recorded. When the calculation of the gray gradation pixel difference is completed for all angles (S406), the minimum gray gradation pixel difference is compared with the determination reference value set in S103 to obtain the gray gradation pixel difference. If is more than the criterion value, it is not conforming. Processing in the case of nonconformity is the same as that in the case of nonconformity in S401.

グレー階調画素差分が判定基準値より小さい場合は、正規化相関係数の算出を行う(S407)。具体的には、上記S206と同様に、〔数式8〕〔数式9〕に従った処理を実行して正規化相関係数を算出する。正規化相関係数の算出処理においても、S405におけるグレー階調画素差分の算出処理と同様、同一のテンプレート画像について全ての角度に対して処理を行う。正規化相関係数は、最大のものに更新され、そのときの角度が記録される。そして、全ての角度に対して正規化相関係数の算出が終わった場合の処理は、S401で不適合となった場合と同様である。   When the gray gradation pixel difference is smaller than the determination reference value, a normalized correlation coefficient is calculated (S407). Specifically, the normalized correlation coefficient is calculated by executing processing according to [Equation 8] and [Equation 9] as in S206. In the normalized correlation coefficient calculation process, similar to the gray gradation pixel difference calculation process in S405, the same template image is processed for all angles. The normalized correlation coefficient is updated to the maximum value, and the angle at that time is recorded. Then, the processing when the normalized correlation coefficient has been calculated for all the angles is the same as that in the case of nonconformity in S401.

全テンプレート画像について処理が終わったら、正規化相関係数の照合を行う(S411)。具体的には、最大となった正規化相関係数と、S103で設定した判定基準値の比較を行い、正規化相関係数が判定基準値より大きい場合は、適合となる。正規化相関係数が適合となった場合は、全項目すなわち6つの類似性評価値全てが適合であるテンプレートがあるかどうかを判断する(S412)。全項目が適合であるテンプレートがある場合は、全項目が適合であるテンプレートと、その角度が一致するかどうかを判断する(S413)。すなわち、S405およびS406におけるグレー階調画素差分の算出処理において最小値を与えるテンプレートおよび角度と、S407およびS408における正規化相関係数の算出処理において最大値を与えるテンプレートおよび角度とが各々一致し、前記一致するテンプレートがS401、S402、S403、S404、S406およびS411において全て適合すると判断された場合は、適合終了となり、各変数、すなわちテンプレートID、画素位置(Xc、Yc)、角度、6つの類似性評価値を出力する。いずれかにおいて、不適合となる場合は、不適合終了となり、次の画素位置に対して、順次マッチング処理を行う。   When the processing is completed for all template images, the normalized correlation coefficient is collated (S411). Specifically, the maximum normalized correlation coefficient is compared with the determination reference value set in S103, and if the normalized correlation coefficient is larger than the determination reference value, the result is relevant. If the normalized correlation coefficient is matched, it is determined whether there is a template that matches all items, that is, all six similarity evaluation values (S412). If there is a template in which all items are compatible, it is determined whether or not the angle of the template in which all items are compatible matches the angle (S413). That is, the template and the angle that give the minimum value in the calculation processing of the gray gradation pixel difference in S405 and S406 and the template and the angle that give the maximum value in the calculation processing of the normalized correlation coefficient in S407 and S408 respectively match. If it is determined in S401, S402, S403, S404, S406, and S411 that the matching templates are all matched, matching ends, and each variable, that is, template ID, pixel position (Xc, Yc), angle, and six similarities. The sex evaluation value is output. In any case, in the case of non-conformity, the non-conformance ends, and matching processing is sequentially performed on the next pixel position.

図11に示した順次マッチング処理においては、S401の輝度ヒストグラムの照合、S402の階調変動ヒストグラムの照合、S403の重心間距離の算出、S404の慣性モーメントの照合、S405、S406のグレー階調画素差分の算出、S407、S408の正規化相関係数の算出の6つの適合性判定処理が行われるが、これらの適合性判定処理は、処理負荷が小さいものから順に行われるように設定されている。すなわち、本実施形態では、輝度ヒストグラムの照合が最も処理負荷が小さく、正規化相関係数の算出が最も処理負荷が大きい。これは、1つの処理で不適合と判定された場合に、全体としても不適合と判断するという条件とすると、処理負荷が小さいものから先に行った方が効率が良いからである。特に、グレー階調画素差分の算出、正規化相関係数の算出については、各角度について実行するため、1つの角度についてのみ実行する輝度ヒストグラムの照合、階調変動ヒストグラムの照合、重心間距離の算出、慣性モーメントの照合に比べて処理負荷は格段に大きくなる。   In the sequential matching processing shown in FIG. 11, the luminance histogram collation in S401, the gradation variation histogram collation in S402, the distance between the centers of gravity in S403, the moment of inertia collation in S404, and the gray gradation pixels in S405 and S406. The six suitability determination processes of difference calculation and normalization correlation coefficient calculation of S407 and S408 are performed, and these suitability determination processes are set to be performed in order from the smallest processing load. . That is, in the present embodiment, the comparison of luminance histograms has the smallest processing load, and the calculation of the normalized correlation coefficient has the largest processing load. This is because, when it is determined that the non-conformity is determined in one process, it is more efficient to perform the processing first from the one with the smallest processing load if it is determined as non-conforming as a whole. In particular, since the calculation of the gray gradation pixel difference and the calculation of the normalized correlation coefficient are performed for each angle, the comparison of the brightness histogram, the comparison of the gradation fluctuation histogram, and the distance between the centroids performed only for one angle are performed. Compared to calculation and moment of inertia verification, the processing load is significantly increased.

S301の順次マッチング処理が適合終了となったら、目標物探索部40は、次に、局所マッチング処理を行う(S302)。S301の順次マッチング処理は、探索対象画像全体における目標物の大まかな位置を探索するのに対し、S302の局所マッチング処理は、目標物の詳細な位置を探索する。具体的には、順次マッチング処理で最適と判断された位置(Xc、Yc)を起点に、画素スキャン進行方向(右方向、下方向)に所定の微小幅(ΔX、ΔY)だけ動かしながらテンプレートマッチングを実行し、6つの類似性評価値を最小値、最大値に更新し、そのときのテンプレートID、画素位置(Xm、Ym)、角度Amを出力する。マッチング処理の詳細は、図11に示した順次マッチング処理とは異なり図4のS102のマッチング処理、具体的には図6に示される処理と同じである。順次マッチング処理はある位置(Xc,Yc)で適合するか否かだけを判定すれば良かったが、局所マッチング処理は適合判定される微小範囲内で、更に最良の条件で適合する位置を探索する必要があるためである。   When the sequential matching process in S301 is completed, the target object search unit 40 next performs a local matching process (S302). The sequential matching process in S301 searches for a rough position of the target in the entire search target image, whereas the local matching process in S302 searches for a detailed position of the target. Specifically, template matching is performed by moving a predetermined minute width (ΔX, ΔY) in the pixel scan progression direction (rightward, downward) starting from the position (Xc, Yc) determined to be optimal by sequential matching processing. And the six similarity evaluation values are updated to the minimum value and the maximum value, and the template ID, pixel position (Xm, Ym), and angle Am at that time are output. The details of the matching process are the same as the matching process in S102 of FIG. 4, specifically the process shown in FIG. 6, unlike the sequential matching process shown in FIG. The sequential matching process only has to determine whether or not the matching is performed at a certain position (Xc, Yc), but the local matching process searches for a matching position under the best condition within a minute range in which the matching is determined. This is necessary.

局所マッチング処理が終了したら、目標物探索部40の探索結果出力手段43は、次に、探索結果の出力を行う(S303)。具体的には、テンプレートID、位置(Xm、Ym)、角度Am、および6つの類似性評価値をリスト出力する。   When the local matching process is completed, the search result output unit 43 of the target object search unit 40 next outputs the search result (S303). Specifically, the template ID, position (Xm, Ym), angle Am, and six similarity evaluation values are output as a list.

続いて、目標物探索部40は、検出領域の消去を行う(S304)。具体的には、探索対象画像において、最適位置におけるテンプレート画像の図2で示した有効画像領域内部に相当する部分を消去する。すなわち、有効画像領域内部に位置する探索対象画像上の画素の値を全て0にする。図12は、探索対象画像上における探索の結果の最適位置と、消去された領域を示す図である。探索の結果、探索対象画像上の目標物に対して、図12(a)に示すような位置がテンプレート画像の有効画像領域の最適位置となった場合、図12(b)に示すように、探索対象画像上における有効画像領域に相当する部分が消去される。ただし、本探索処理終了後に探索位置を探索対象画像上でグラフィカルに表示する要求に応えるため、消去前のオリジナルの探索対象画像はバックアップ保存されている。   Subsequently, the target searching unit 40 deletes the detection area (S304). Specifically, in the search target image, a portion corresponding to the inside of the effective image area shown in FIG. 2 of the template image at the optimum position is deleted. That is, all the pixel values on the search target image located inside the effective image area are set to zero. FIG. 12 is a diagram showing the optimum position of the search result on the search target image and the erased area. As a result of the search, when the position shown in FIG. 12A is the optimum position of the effective image area of the template image with respect to the target on the search target image, as shown in FIG. A portion corresponding to the effective image area on the search target image is deleted. However, the original search target image before erasure is backed up and saved in order to meet the request for graphically displaying the search position on the search target image after the end of the search process.

S301〜S304の処理は、探索対象画像上の全画素に対して行われる。その際、S304において、適合した領域の内部が消去されるため、その付近の画素に対して順次マッチング処理を行っても適合となることはなく、1つの目標物を重複して見つけてしまうことを防ぐことができる。   The processing of S301 to S304 is performed for all pixels on the search target image. At that time, in S304, the inside of the conforming region is erased, so that matching is not performed even if the matching processing is sequentially performed on the neighboring pixels, and one target is found redundantly. Can be prevented.

S303において出力された結果は、探索結果として出力される。この段階では、探索された箇所が全て消去されているため、グラフィカルに探索位置を表示する場合はバックアップ保存されたオリジナルの探索対象画像を再ロードする必要がある。S304の処理を行っても、重複する結果が存在する場合には、人手により1つを残して他は削除するような操作が行なわれる。   The result output in S303 is output as a search result. At this stage, all searched parts are erased. Therefore, when the search position is displayed graphically, it is necessary to reload the original search target image stored in the backup. Even if the process of S304 is performed, if there are overlapping results, an operation is performed in which one is manually deleted and the other is deleted.

本発明に係る目標物検出システムの構成図である。It is a block diagram of the target object detection system which concerns on this invention. テンプレート画像領域と多角形形状の関係を示す図である。It is a figure which shows the relationship between a template image area | region and a polygonal shape. 角度が異なる8つのテンプレート画像を示す図である。It is a figure which shows eight template images from which an angle differs. 判定基準値の算出およびテンプレート画像の更新の処理概要を示すフローチャートである。It is a flowchart which shows the process outline | summary of the calculation of a determination reference value, and the update of a template image. 探索対象画像上における処理の様子を示す図である。It is a figure which shows the mode of the process on a search object image. マッチング処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a matching process. 探索対象画像とテンプレート画像の合成によりテンプレート画像を更新する例を示す図である。It is a figure which shows the example which updates a template image by the synthesis | combination of a search object image and a template image. テンプレート画像の更新の様子を示す図である。It is a figure which shows the mode of the update of a template image. 探索処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of a search process. 順次マッチング処理の概略を示す図である。It is a figure which shows the outline of a sequential matching process. 順次マッチング処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a sequential matching process. 探索対象画像上における探索の結果の最適位置と、消去された領域を示す図である。It is a figure which shows the optimal position of the result of the search on a search object image, and the erased area.

符号の説明Explanation of symbols

10・・・探索対象画像記憶部
20・・・テンプレート準備部
21・・・テンプレート作成手段
22・・・判定基準値設定手段
23・・・テンプレート更新手段
30・・・テンプレート記憶部
40・・・目標物探索部
41・・・角度非依存類似性判断手段
42・・・角度依存類似性判断手段
43・・・探索結果出力手段
50・・・探索結果記憶部
DESCRIPTION OF SYMBOLS 10 ... Search object image storage part 20 ... Template preparation part 21 ... Template preparation means 22 ... Determination reference value setting means 23 ... Template update means 30 ... Template storage part 40 ... Target searching unit 41... Angle-independent similarity determining means 42... Angle-dependent similarity determining means 43... Search result output means 50.

Claims (12)

目標物を含むテンプレート画像を用いて、探索対象である探索対象画像から、目標物を検出するシステムであって、
前記テンプレート画像を記憶したテンプレート記憶手段と、
目標物のサンプルを含むサンプル画像上で指定された画素位置から所定範囲内の各画素位置において、前記各テンプレート画像と同一サイズの画素ブロックを前記サンプル画像から抽出し、前記テンプレート画像と前記画素ブロックの類似性評価値を算出し、当該類似性評価値に所定の値を演算した値を判定基準値として設定する判定基準値設定手段と、
前記探索対象画像に対して、先頭画素位置から最終画素位置まで抽出位置を順次移動させながら、前記各テンプレート画像と同一サイズの画素ブロックを前記探索対象画像から抽出し、前記テンプレート画像と前記画素ブロックの類似性評価値を算出し、当該類似性評価値と前記設定された判定基準値と比較することにより類似性を判断する類似性判断手段と、
前記類似性判断手段により類似性ありと判断された場合に、その際のテンプレート画像のID、前記探索対象画像上における画素ブロックの位置を特定する画素位置、前記テンプレート画像の回転角度を出力する探索結果出力手段と、
を有することを特徴とする目標物検出システム。
A system for detecting a target from a search target image, which is a search target, using a template image including the target,
Template storage means for storing the template image;
A pixel block having the same size as each template image is extracted from the sample image at each pixel position within a predetermined range from a pixel position designated on the sample image including the target sample, and the template image and the pixel block are extracted. Determination reference value setting means for calculating a similarity evaluation value of the image and setting a value obtained by calculating a predetermined value to the similarity evaluation value as a determination reference value;
A pixel block having the same size as each template image is extracted from the search target image while sequentially moving the extraction position from the first pixel position to the last pixel position with respect to the search target image, and the template image and the pixel block are extracted. Similarity determination means for calculating the similarity evaluation value of the image and comparing the similarity evaluation value with the set criterion value;
A search for outputting the template image ID, the pixel position for specifying the position of the pixel block on the search target image, and the rotation angle of the template image when the similarity determination unit determines that there is similarity. A result output means;
A target detection system comprising:
請求項1において、
前記テンプレート画像には多角形形状の有効画像領域が設定されており、前記判定基準値設定手段および前記類似性判断手段は、前記テンプレート画像内の有効画像領域に含まれる画素群と、前記画素ブロック内の前記有効画像領域内部に対応する画素群とに基づいて、前記類似性評価値を算出するようにしていることを特徴とする目標物検出システム。
In claim 1,
A polygonal effective image area is set in the template image, and the determination reference value setting means and the similarity determination means include a pixel group included in the effective image area in the template image, and the pixel block. A similarity detection value is calculated based on a pixel group corresponding to the inside of the effective image area in the target object detection system.
請求項1または請求項2において、
前記判定基準値設定手段、類似性判断手段において、類似性評価値は複数算出されるとともに、各類似性評価値に対応する判定基準値が設定され、前記類似性判断手段では、1つの類似性評価値で類似性なしと判断された場合に、他の類似性評価値に関する判断を行うことなく類似性なしと判断するものであることを特徴とする目標物検出システム。
In claim 1 or claim 2,
In the determination reference value setting means and the similarity determination means, a plurality of similarity evaluation values are calculated, and a determination reference value corresponding to each similarity evaluation value is set. In the similarity determination means, one similarity A target object detection system characterized in that, when it is determined that there is no similarity based on an evaluation value, it is determined that there is no similarity without making a determination regarding another similarity evaluation value.
請求項1または請求項2において、
前記判定基準値設定手段、類似性判断手段における類似性評価値は、前記テンプレート画像の角度を回転させず、前記テンプレート画像に含まれる画素とそれに対応する前記画素ブロック内の画素とを所定の照合方法で照合して、角度に依存せずに算出する類似性評価値と、前記テンプレート画像を所定の角度で回転させながら、前記テンプレート画像に含まれる画素とそれに対応する前記画素ブロック内の画素とを所定の照合方法で照合して、角度に依存させて算出する類似性評価値の2種類が存在することを特徴とする目標物検出システム。
In claim 1 or claim 2,
The similarity evaluation value in the determination reference value setting means and the similarity determination means is a predetermined collation between the pixels included in the template image and the corresponding pixels in the pixel block without rotating the angle of the template image. The similarity evaluation value calculated without depending on the angle by collating with the method, and the pixels included in the template image and the corresponding pixels in the pixel block while rotating the template image at a predetermined angle There are two types of similarity evaluation values that are calculated by depending on the angle by collating with a predetermined collation method.
請求項3または請求項4において、
前記判定基準値設定手段、類似性判断手段は、前記テンプレート画像に含まれる画素とそれに対応する前記画素ブロック内の画素の各々に対する階調変動ヒストグラムを算出し、双方の階調変動ヒストグラム同士のユークリッド距離を、前記類似性評価値として算出するものであることを特徴とする目標物検出システム。
In claim 3 or claim 4,
The determination reference value setting means and the similarity determination means calculate a gradation fluctuation histogram for each of the pixels included in the template image and the corresponding pixels in the pixel block, and Euclidean between both gradation fluctuation histograms. A target detection system, wherein a distance is calculated as the similarity evaluation value.
請求項5において、
前記階調変動ヒストグラム同士のユークリッド距離は、各画素値から抽出した上位ビットに基づく階調変動ヒストグラムと下位ビットに基づく階調変動ヒストグラム同士のユークリッド距離であることを特徴とする目標物検出システム。
In claim 5,
The Euclidean distance between the gradation fluctuation histograms is a Euclidean distance between a gradation fluctuation histogram based on upper bits extracted from each pixel value and a gradation fluctuation histogram based on lower bits.
請求項3から請求項6のいずれかにおいて、
前記判定基準値設定手段、類似性判断手段は、前記テンプレート画像に含まれる画素とそれに対応する前記画素ブロック内の画素の各々の階調値を重みとした重心位置を算出し、双方の重心間距離および双方の慣性モーメントの差分値を類似性評価値として用いるものであることを特徴とする目標物検出システム。
In any one of Claims 3-6,
The determination reference value setting unit and the similarity determination unit calculate a centroid position using the gradation values of the pixels included in the template image and the corresponding pixels in the pixel block as weights, and between the centroids. A target object detection system using a difference value between a distance and a moment of inertia of both as a similarity evaluation value.
請求項3から請求項7のいずれかにおいて、
前記判定基準値設定手段、類似性判断手段は、前記テンプレート画像に含まれる画素とそれに対応する前記画素ブロック内の画素の階調値の差分値を、前記類似性評価値として用いるものであることを特徴とする目標物検出システム。
In any one of Claims 3-7,
The determination reference value setting unit and the similarity determination unit use a difference value between gradation values of a pixel included in the template image and a corresponding pixel in the pixel block as the similarity evaluation value. A target detection system.
請求項3から請求項8のいずれかにおいて、
前記判定基準値設定手段、類似性判断手段は、前記テンプレート画像に含まれる画素とそれに対応する前記画素ブロック内の画素の階調値に基づく正規化相関係数を、前記類似性評価値として用いるものであることを特徴とする目標物検出システム。
In any one of Claims 3-8,
The determination reference value setting unit and the similarity determination unit use, as the similarity evaluation value, a normalized correlation coefficient based on a gradation value of a pixel included in the template image and a corresponding pixel in the pixel block. A target detection system characterized by being a thing.
請求項1から請求項9のいずれかにおいて、
前記サンプル画像から指定された所定の多角形領域を切り出してテンプレート画像の有効画像領域を定義し、前記有効画像領域を任意の角度に回転させても包含するように定義された正方形形状のテンプレート画像を作成し、当該テンプレート画像を前記定義された有効画像領域の情報とともに、前記テンプレート記憶手段に記憶させるテンプレート作成手段をさらに有することを特徴とする目標物検出システム。
In any one of Claims 1-9,
A template image having a square shape defined so as to be included even if the effective image area of the template image is defined by cutting out a predetermined polygonal area specified from the sample image and the effective image area is rotated to an arbitrary angle. And a template creation means for storing the template image in the template storage means together with information on the defined effective image area.
請求項10において、
前記探索結果出力手段は、前記類似性判断手段により類似性ありと判断された場合に、その際のテンプレート画像のID、前記探索対象画像上における画素ブロックの位置を特定する画素位置、前記テンプレート画像の回転角度に対応したテンプレート画像の有効画像領域の輪郭線を、前記探索対象画像上に重ねて出力することを特徴とする目標物検出システム。
In claim 10,
When the similarity determination unit determines that there is similarity, the search result output unit includes an ID of a template image at that time, a pixel position that specifies the position of a pixel block on the search target image, and the template image A target object detection system, wherein a contour line of an effective image area of a template image corresponding to a rotation angle of the template image is superimposed on the search target image and output.
コンピュータを、請求項1から請求項11のいずれかに記載の目標物検出システムとして機能させるためのプログラム。   The program for functioning a computer as the target object detection system in any one of Claims 1-11.
JP2008039058A 2008-02-20 2008-02-20 Target detection system Expired - Fee Related JP5076956B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008039058A JP5076956B2 (en) 2008-02-20 2008-02-20 Target detection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008039058A JP5076956B2 (en) 2008-02-20 2008-02-20 Target detection system

Publications (2)

Publication Number Publication Date
JP2009199250A true JP2009199250A (en) 2009-09-03
JP5076956B2 JP5076956B2 (en) 2012-11-21

Family

ID=41142693

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008039058A Expired - Fee Related JP5076956B2 (en) 2008-02-20 2008-02-20 Target detection system

Country Status (1)

Country Link
JP (1) JP5076956B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009205638A (en) * 2008-02-29 2009-09-10 Dainippon Printing Co Ltd Object detection system
JP2009205421A (en) * 2008-02-27 2009-09-10 Dainippon Printing Co Ltd Object detection system
JP2009211657A (en) * 2008-03-06 2009-09-17 Dainippon Printing Co Ltd Object detection system
CN114898229A (en) * 2022-04-18 2022-08-12 中国人民解放军战略支援部队航天工程大学 Airport dynamic event on-orbit interpretation method and system for microsatellite application

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04180183A (en) * 1990-11-15 1992-06-26 Mitsubishi Electric Corp Picture processing system
JPH0535549B2 (en) * 1985-03-14 1993-05-26 Fuji Electrochemical Co Ltd
JPH05165968A (en) * 1991-12-18 1993-07-02 Komatsu Ltd Device for recognizing position and attitude of body
JPH1063842A (en) * 1996-08-27 1998-03-06 Sanyo Electric Co Ltd Template matching method
JP2005128628A (en) * 2003-10-21 2005-05-19 Toshiba Corp Generation of template used for matching in pattern identification, and method, apparatus, and program for pattern identification using the template
JP2005173649A (en) * 2003-12-05 2005-06-30 Institute Of Physical & Chemical Research Template matching processing method and processor for image processing
JP2005293334A (en) * 2004-04-01 2005-10-20 Nikon Corp Template matching device
JP2005352543A (en) * 2004-06-08 2005-12-22 Nikon Corp Template matching device
JP2009199176A (en) * 2008-02-19 2009-09-03 Dainippon Printing Co Ltd Object detection system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0535549B2 (en) * 1985-03-14 1993-05-26 Fuji Electrochemical Co Ltd
JPH04180183A (en) * 1990-11-15 1992-06-26 Mitsubishi Electric Corp Picture processing system
JPH05165968A (en) * 1991-12-18 1993-07-02 Komatsu Ltd Device for recognizing position and attitude of body
JPH1063842A (en) * 1996-08-27 1998-03-06 Sanyo Electric Co Ltd Template matching method
JP2005128628A (en) * 2003-10-21 2005-05-19 Toshiba Corp Generation of template used for matching in pattern identification, and method, apparatus, and program for pattern identification using the template
JP2005173649A (en) * 2003-12-05 2005-06-30 Institute Of Physical & Chemical Research Template matching processing method and processor for image processing
JP2005293334A (en) * 2004-04-01 2005-10-20 Nikon Corp Template matching device
JP2005352543A (en) * 2004-06-08 2005-12-22 Nikon Corp Template matching device
JP2009199176A (en) * 2008-02-19 2009-09-03 Dainippon Printing Co Ltd Object detection system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009205421A (en) * 2008-02-27 2009-09-10 Dainippon Printing Co Ltd Object detection system
JP2009205638A (en) * 2008-02-29 2009-09-10 Dainippon Printing Co Ltd Object detection system
JP2009211657A (en) * 2008-03-06 2009-09-17 Dainippon Printing Co Ltd Object detection system
CN114898229A (en) * 2022-04-18 2022-08-12 中国人民解放军战略支援部队航天工程大学 Airport dynamic event on-orbit interpretation method and system for microsatellite application
CN114898229B (en) * 2022-04-18 2022-10-11 中国人民解放军战略支援部队航天工程大学 Airport dynamic event on-orbit interpretation method and system for microsatellite application

Also Published As

Publication number Publication date
JP5076956B2 (en) 2012-11-21

Similar Documents

Publication Publication Date Title
US9245345B2 (en) Device for generating three dimensional feature data, method for generating three-dimensional feature data, and recording medium on which program for generating three-dimensional feature data is recorded
CN104574347B (en) Satellite in orbit image geometry positioning accuracy evaluation method based on multi- source Remote Sensing Data data
Duarte et al. Towards a more efficient detection of earthquake induced facade damages using oblique UAV imagery
JP5035549B2 (en) Target detection system
JP7077961B2 (en) Image analysis device, image analysis method and program
CN103218787B (en) Multi-source heterogeneous remote sensing image reference mark automatic acquiring method
JP4103898B2 (en) Map information updating method and map updating apparatus
KR100948099B1 (en) System and method for calculating vegetation area using airborne laser surveying
US11804025B2 (en) Methods and systems for identifying topographic features
JP5076956B2 (en) Target detection system
JP4984261B2 (en) Target detection system
JP5076969B2 (en) Target detection system
JP5076972B2 (en) Target detection system
JP4941420B2 (en) Target detection system
WO2019198634A1 (en) Learning data generation device, variable region detection method, and computer program
JP5076976B2 (en) Target detection system
WO2014112909A1 (en) Method and system for geo-referencing at least one sensor image
KR101877173B1 (en) Coastline Detection System using Satellite Image and method thereof
JP5012703B2 (en) Target detection system
EP4354393A1 (en) Image processing device and image processing method
JP4941421B2 (en) Target detection system
JP4030318B2 (en) Map data update device and map data update method
Beumier et al. Building change detection by histogram classification
JP4904449B2 (en) Judgment method and apparatus of ridge line and ridge line by image processing
JP5126533B2 (en) Target detection system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101210

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120229

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120313

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120509

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

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

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

Free format text: PAYMENT UNTIL: 20150907

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5076956

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees