JP3447716B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JP3447716B2
JP3447716B2 JP2001123365A JP2001123365A JP3447716B2 JP 3447716 B2 JP3447716 B2 JP 3447716B2 JP 2001123365 A JP2001123365 A JP 2001123365A JP 2001123365 A JP2001123365 A JP 2001123365A JP 3447716 B2 JP3447716 B2 JP 3447716B2
Authority
JP
Japan
Prior art keywords
image
template
image processing
correlation value
correlation
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 - Lifetime
Application number
JP2001123365A
Other languages
Japanese (ja)
Other versions
JP2001351102A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2001123365A priority Critical patent/JP3447716B2/en
Publication of JP2001351102A publication Critical patent/JP2001351102A/en
Application granted granted Critical
Publication of JP3447716B2 publication Critical patent/JP3447716B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 【0001】 【発明の属する技術分野】この発明はロボットや産業機
械の位置制御及び検査などに使われる視覚装置における
画像処理装置に係り、特にテンプレートマッチング法に
おけるテンプレート画像の生成に関するものである。 【0002】 【従来の技術】ここで、具体的な従来の画像処理装置の
説明をはじめる前に、まず基本的なテンプレートマッチ
ング手法について説明しておく。テンプレートマッチン
グ法(Template Matching =TM手
法)は、ティーチング・バイ・ショーイング、すなわち
対象毎にプログラムを組まなくても対象の画像を登録す
るだけで、自動的にその対象を再認識することが出来る
ような機能、が特徴であり、画像処理に関する知識のな
いユーザでも簡単に使いこなせるため、ユーザのニーズ
が高い位置合わせ手法である。また、最近のファクトリ
ーオートメーション(以下FAという)分野における画
像処理装置への要求として2値化処理だけで対応できな
いような複雑な検査や位置決めを高速に精度よく行うこ
とが要求されており、正規化相互相関係数に基づいた位
置合わせを行なう濃淡テンプレートマッチングへの期待
は大きい。しかし、濃淡テンプレートマッチングはその
膨大な計算量のために、従来専用ハードウエアなしに
は、実現不可能とされてきた。そのため、画像処理装置
が高価になり、市場開拓の障害となっていた。 【0003】次に、この濃淡テンプレートマッチング処
理の概要を、図5を用いて説明する。濃淡テンプレート
マッチングは位置(x,y)から開始されるテンプレー
トと同じ大きさの局所領域Sx,yを順にずらしなが
ら、テンプレート画像Gi,jと探索画像Fi,jの相
関値Mx,yを計算し、相関値が最も高い位置(x,
y)をテンプレートが発見された位置として、出力す
る。なお、この相関値Mx, は次の式(1)で与えら
れる。 【0004】 【数1】 【0005】ただし、上記式(1)において、F,Gは
探索画像あるいはテンプレート画像の局所領域内におけ
る画像の輝度の平均値、nは局所領域Sx,yに含まれ
る画素の個数である。また、この式(1)には分母側に
画像の輝度分散を表す項が含まれていることからもわか
るように、この相関値Mx,yは、画像の明るさの線形
的な変動F’i,j=Fi,j×k1+k2に全く影響
を受けないことがわかる。従って、濃淡テンプレートマ
ッチングを用いることによってテンプレート画像と検査
画像とのコントラストが変化したり、画像全体の明るさ
の変化やノイズへの余裕度が大きい。 【0006】しかしながら、このような濃淡テンプレー
トマッチングは相関値演算に時間がかかり、FA分野な
ど、高速化が要求される場合には時間の制限から実用的
に対応できなかった。たとえば、512×512の検査
画像中、128×128のテンプレート画像のサーチを
行う場合、次の式(2)による回数の積和演算が必要で
あり、100Mipsクラスの計算機をもってしても1
0秒以上の計算時間を要することとなる。 【0007】 128×128×(512−128)×(512−128) =2.4×10 ・・・(2) 【0008】これに対して、よく知られた高速化手法と
して粗精サーチ法があった。粗精サーチ法とは、図6に
示すように、第1ステップとして原画像を1/4や1/
8に縮退した画像(粗画像)を作り、粗画像のテンプレ
ート画像でだいたいの位置をサーチし、その周辺だけを
原画像で精サーチして正確な位置を求めるという方法で
ある。この方法で先ほどの例と同じ結果を得るのに必要
な演算量は、粗精サーチの比率を1:Nとすれば、次の
式(3)で与えられる回数で済む。 【0009】 【数2】 【0010】このようにNを変化させると、図7に示す
様に最適な粗精比が存在するが、このような場合にも、
FAラインでの実用化レベルとして目安にされる0.1
sec以内の認識を達成するにはまだ数百倍の時間短縮
を達成しなければならない。 【0011】このように、従来の粗精サーチによるテン
プレートマッチング法では、処理速度が遅く実用的でな
いという問題点があった。 【0012】このようなテンプレートマッチング技術に
対して、いくつかの技術が開発されている。図8はたと
えば、特公平2−642号公報に示された従来の部分テ
ンプレートマッチング法を示す説明図である。図におい
て、11はパターン位置検出対象である半導体ペレット
の回路素子形成領域であり、12はその2辺に規則的に
配列された接続パッドである。13a,13bはパター
ン位置検出に際して探索されるパターン探索領域(目標
パターン)である。 【0013】ここでは目標パターンとそれぞれ一致する
テンプレートを持ち、予め教示していた位置関係を利用
して、真のピークを検出しようとするものである。この
場合、対象としたいテンプレートを部分に分けて、それ
ぞれの部分でパターン探索領域13a,13bとテンプ
レートマッチングすることによって、同一の特徴を持っ
たパターンが複数個等間隔に配列されている場合でも、
目標パターンを識別できる。また、目標パターンを部分
に分けて撮像できるので、分解能を高めることができ
る。 【0014】しかしながら、この方式ではどの部分をテ
ンプレートとすれば良いのか、ユーザが判断しなければ
ならず、ノウハウが必要とされた。 【0015】一方、テンプレートの自己評価方法として
特開昭61−74082号公報では次のような方式が提
案されている。次に図9を用いてそれを説明する。図に
おいて、14は検出対象を撮像する撮像手段、15は撮
像された画像データを2値化する2値化回路、16は2
値化された画像データを格納する画像メモリ、17はシ
フトメモリ18、並列切出しレジスタ19、標準パター
ンレジスタ20、パターン照合回路21より成り、画像
データより切り出した部分パターンを標準パターンと照
合するマッチング回路、22はパターン照合回路21の
出力の最小値を検出する最小値検出回路、23は領域限
定回路、24はそれらに所定のタイミングを与えるタイ
ミング発生回路、25は当該システムの全体制御を行う
計算機である。 【0016】この方式は、撮像手段14で撮像された検
出対象の画像から、求めるべき標準パターンの大きさの
部分パターンを切り出して、標準パターンの候補とし、
順次切り出された部分パターンあるいは部分パターンと
検出対象の画像から標準パターンとしての適性を表す評
価値を求め、その値に基づいて標準パターンを決定する
ように動作する。このように、この方式によれば、画面
内から自動的にパターンマッチングに適した標準パター
ンを選択できるので、ユーザのノウハウが不要となる。 【0017】しかしながら、この方式では入力画像の中
からテンプレートを選択するのに、ユーザは予めテンプ
レートの大きさを決定しておかなければならず、せっか
く自己評価して最適なテンプレートが自動的に登録され
るとしても最適な大きさが選択されているかどうかは評
価できない。 【0018】また、この方式では入力画像全面をテンプ
レートの候補として順次切り出してそれぞれについて評
価しなければならないので、時間もかかる。多くのテン
プレートマッチングを用いて認識を行なう場合、ユーザ
が認識したい対象物は自明であることが多いのに、その
ユーザの知識が活かせず、評価値のみでテンプレートが
決定されてしまうので、不必要な処理にかかる時間が多
く、ユーザの意図も反映しにくいという問題点があっ
た。 【0019】さらに、特開平4−359388号公報で
は次のような方式が提案されている。次に図10を用い
てそれを説明する。この装置はサーチ画像を保存する探
索画像用記憶装置26、テンプレート画像を保存してお
くテンプレート画像用記憶装置27、両画像の0値を処
理する0値データ処理回路28、両画像値の比を求める
割算器29、割算器29の計算値を保存する計算値保存
用記憶装置30、割算器29の出力値と計数値保存用記
憶装置30の保存値との差の絶対値を求める絶対値計算
回路31、今回得られた絶対値と前回得られた絶対値を
加算する加算回路32、しきい値を保存するしきい値保
存回路33、加算回路32による加算値としきい値を比
較する比較回路34とで構成されている。この手法によ
れば、残差逐次検定法(Suquential Sim
ilarity Ditection Algorit
hm =SSDA法)による打ち切りを、画像間に明る
さの差があっても達成できるように変形している。従っ
て、画像取得時の周囲の明るさなどの制限がなくなっ
て、常時環境が変化するような状況でのアプリケーショ
ンに用いることができる。 【0020】この手法では、入力画像全体の明るさのコ
ントラストの幅が変化しても対応できるようになってい
るが、画像全体の明るさがシフトアップもしくはシフト
ダウンしたときには、この両画像の比はテンプレートの
位置によって変化するので対応できない。また、しきい
値処理をしており、このしきい値を決定するにはノウハ
ウを要する。 【0021】また、サブピクセルの精度を求める方法と
して、特開平5−120436号公報では次のような方
式が提案されている。次に、図11を用いてそれを説明
する。この方式は画素位置を画素単位でずらしつつ被検
出画像とテンプレート画像との相関値を算出し、その相
関値が最大となる画素位置を探索し(第1段階)、その
8近傍画素の位置と相関値を求め(第2段階)、これら
の座標と相関値から多変数多項式回帰曲面を決定し(第
3段階)、その曲面のピークからサブピクセル精度のピ
ーク検出を行なう(第4段階)ものである。この手法で
は、多変数多項式回帰曲面から、高精度でピーク位置の
変化に連続な推定ピーク位置を求めることができるの
で、画素単位を超越したサブピクセル精度で位置検出す
ることができる。 【0022】しかしながら、この手法では中心と8近傍
の全9点の相関値を最初に計算しなければならず、処理
時間がかかる。また、この手法ではXY平面と相関値の
関係が2次の曲面を形成することが仮定となっている
が、実際の相関値のピークと近傍の形状は2次曲面より
もするどいピークを描くことが多いので、2次曲面の近
似では正確にピークを求めることはできない。 【0023】 【発明が解決しようとする課題】従来の画像処理装置は
以上のように構成されているので、通常の濃淡テンプレ
ートマッチングでは相関値の演算に多大な時間がかかる
ため実用的ではなく、粗精サーチによるテンプレートマ
ッチングでも処理時間の短縮は充分とはいえず、FAな
どの高速処理が要求される分野には時間の制約から実用
的に対応することができないものであり、さらに、部分
テンプレートマッチング法によるものでは、どの部分を
テンプレートとするかをユーザが判断するためのノウハ
ウが必要であり、テンプレートの自己評価を行う方式で
は評価値のみでテンプレートが決定されてしまうため、
ユーザの知識を生かせず、不必要な処理にかかる時間が
多く、ユーザの意図も反映しにくいものであり、SSD
A法によるものでは画像全体の明るさのシフトアップや
ダウンに対応できず、しきい値処理のためのしきい値の
決定にノウハウが必要であるなどの問題点があった。 【0024】この発明は上記のような課題を解決するた
めになされたもので、特別なノウハウを必要とせず、認
識精度を低下させることなく処理時間を短縮できる画像
処理装置を得ることを目的とする。 【0025】 【課題を解決するための手段】この発明に係る画像処理
装置は、予め用意されたテンプレートデータを用いたテ
ンプレートマッチング法によって認識を行う画像処理装
置において、入力された原画像と認識対象物を構成する
外接四角形の幅が直径となる円テンプレート画像との相
関値を求める相関演算部と、相関演算部によって求めら
れた相関値としきい値とを比較することによって対象物
が存在するか否かの判定を行う相関値判定部とを備える
ものである。 【0026】 【発明の実施の形態】以下、この発明の実施の一形態を
説明する。 実施の形態1.図1はこの発明の実施の形態1による画
像処理装置の構成を示す図である。図において、80は
画像入力部より入力された原画像であり、105は長方
形の幅が直径となる円テンプレート画像であり、106
は入力された原画像80とこの円テンプレート画像10
5との相関値を求める相関演算部である。107はこの
相関演算部106によって求められた相関値をしきい値
と比較して、対象物が存在するか否かの判定を行う相関
値判定部であり、108はその判定結果が表示される結
果表示部である。 【0027】次に動作について説明する。ここで、図2
はこの実施の形態1による画像処理装置の処理の流れを
示すフローチャートであり、図3は実施の形態1による
画像処理装置の画像処理の過程をイメージ的に示した説
明図、図4は3値画像による画像処理の過程をイメージ
的に示した説明図である。この実施の形態1は、対象物
の姿勢が未知で、対象物の形状が細長い長方形やコーナ
ーを含んでいるような形状の対象物を認識するような画
像処理装置において、長方形の幅が直径になるような円
テンプレート画像と、サーチ画像との相関値を求めて、
対象物の存在を認識するものである。 【0028】予め対象物の大きさにあわせた円テンプレ
ート画像105を生成しておく。この円テンプレート画
像105の生成方法は、まず対象物の先端の大きさを計
測し、その大きさが直径になるような円画像を生成す
る。3値画像の場合、ユーザは直径(又は半径)を指定
すると、その大きさにあった3値画像の円を自動的に形
成することができる。これは対象物の画像を加工しても
良いし、描画ツールで1点ずつ画像値を指定して作るこ
ともできる。 【0029】このような円テンプレート画像105を用
いた対象物の存在認識について次に説明する。画像入力
部で撮像された画像を入力し(ステップST171)、
入力された原画像80の各座標と前記円テンプレート画
像105の相関値を相関演算部106で計算する(ステ
ップST172)。相関値判定部107はこの相関演算
部106によって算出された相関値を所定のしきい値と
比較し(ステップST173)、しきい値より大きな位
置を対象物が存在する位置として記録する(ステップS
T174)。なお、相関値がしきい値より小さかった位
置のデータは使わずにそのまま捨てる。X,Yについて
の処理が終了すると、結果を結果表示部108に表示す
る(ステップST175)。 【0030】 【発明の効果】以上のように、この発明によれば、長方
形の幅が直径となる円テンプレート画像とサーチ画像の
相関値を求めるように構成したので、予め概略の位置や
姿勢を知ることなしに位置検出を行うことが可能とな
り、処理時間を短縮することができ、また、回転角ごと
のテンプレート画像を用意する必要もなくなって資源を
節約できるという効果がある。
Description: BACKGROUND OF THE INVENTION [0001] 1. Field of the Invention [0002] The present invention relates to an image processing apparatus in a visual device used for position control and inspection of a robot or an industrial machine, and more particularly to a template image processing method in a template matching method. It is about generation. 2. Description of the Related Art Before starting a specific description of a conventional image processing apparatus, a basic template matching method will be described first. In the template matching method (Template Matching = TM method), teaching-by-showing, that is, the object can be automatically re-recognized simply by registering the image of the object without setting a program for each object Such a function is a feature of the method, and a user who has no knowledge of image processing can easily use the function easily. In addition, as a recent demand for image processing apparatuses in the field of factory automation (hereinafter referred to as FA), it is required to perform complicated inspection and positioning at high speed and with high accuracy which cannot be dealt with only by binarization processing. There is great expectation for gray-scale template matching that performs positioning based on cross-correlation coefficients. However, gray-scale template matching has heretofore been impossible to implement without dedicated hardware due to its enormous amount of calculation. For this reason, the image processing apparatus has become expensive and has been an obstacle to market development. Next, an outline of the density template matching process will be described with reference to FIG. In the gray-scale template matching , the correlation value M x, between the template image G i, j and the search image F i, j is shifted while sequentially shifting the local area S x, y having the same size as the template starting from the position (x, y) . y is calculated and the position (x,
y) is output as the position where the template is found. The correlation value M x, y is given by the following equation (1). [0004] In the above equation (1), F and G are the average values of the brightness of the image in the local area of the search image or the template image, and n is the number of pixels included in the local area Sx, y . Further, as can be seen from the fact that the expression (1) includes a term representing the luminance variance of the image on the denominator side, the correlation value M x, y is represented by a linear variation F of the brightness of the image. It can be seen that ' i, j = F i, j × k1 + k2' is not affected at all. Therefore, the contrast between the template image and the inspection image is changed by using the gray-scale template matching, and the margin for the change in brightness of the entire image and noise is large. However, such gray-scale template matching takes a long time to calculate a correlation value, and when a high speed is required, such as in the FA field, it cannot be practically coped with due to time limitations. For example, when searching for a 128 × 128 template image in a 512 × 512 inspection image, the product-sum operation of the number of times according to the following equation (2) is required.
This requires a calculation time of 0 second or more. 128 × 128 × (512-128) × (512-128) = 2.4 × 10 9 (2) On the other hand, as a well-known high-speed technique, coarse search is performed. There was a law. In the coarse search method, as shown in FIG. 6, an original image is reduced to 1/4 or 1 /
In this method, an image (coarse image) degenerated to 8 is created, a rough image is searched for a template image, and an approximate position of the rough image is searched for in the original image to obtain an accurate position. The amount of calculation required to obtain the same result as the previous example by this method can be the number of times given by the following equation (3), provided that the ratio of coarse / fine search is 1: N. [0009] [0010] When N is changed in this manner, there is an optimum coarse / fine ratio as shown in FIG. 7.
0.1 which is set as a standard for practical use in the FA line
To achieve recognition within seconds, a time reduction of several hundred times must still be achieved. As described above, the conventional template matching method using the coarse / fine search has a problem that the processing speed is slow and impractical. Several techniques have been developed for such template matching techniques. FIG. 8 is an explanatory diagram showing a conventional partial template matching method disclosed in Japanese Patent Publication No. 2-642, for example. In the figure, reference numeral 11 denotes a circuit element forming region of a semiconductor pellet to be subjected to pattern position detection, and 12 denotes connection pads regularly arranged on two sides thereof. Reference numerals 13a and 13b denote pattern search areas (target patterns) searched for pattern position detection. In this case, a template that matches each of the target patterns is provided, and a true peak is to be detected using the positional relationship taught in advance. In this case, even if a plurality of patterns having the same characteristics are arranged at regular intervals by dividing the template to be targeted into parts and performing template matching with the pattern search areas 13a and 13b in each part,
The target pattern can be identified. In addition, since the target pattern can be imaged by being divided into portions, the resolution can be increased. However, in this method, the user has to determine which part should be used as a template, and know-how is required. On the other hand, as a method for self-evaluating a template, Japanese Patent Application Laid-Open No. 61-74082 proposes the following method. Next, this will be described with reference to FIG. In the figure, reference numeral 14 denotes an image pickup means for picking up an image of a detection target; 15, a binarization circuit for binarizing imaged image data;
An image memory 17 for storing the digitized image data. A matching circuit 17 includes a shift memory 18, a parallel cutout register 19, a standard pattern register 20, and a pattern matching circuit 21, and matches a partial pattern cut out from the image data with a standard pattern. , 22 is a minimum value detection circuit for detecting the minimum value of the output of the pattern matching circuit 21, 23 is an area limiting circuit, 24 is a timing generation circuit that gives them a predetermined timing, and 25 is a computer that performs overall control of the system. is there. In this method, a partial pattern having a size of a standard pattern to be obtained is cut out from an image of a detection target imaged by the image pickup means 14 and is set as a standard pattern candidate.
An operation is performed to obtain an evaluation value indicating suitability as a standard pattern from the sequentially extracted partial pattern or the partial pattern and the image to be detected, and determine the standard pattern based on the value. As described above, according to this method, a standard pattern suitable for pattern matching can be automatically selected from within a screen, so that user know-how is not required. However, in this method, in order to select a template from the input image, the user must determine the size of the template in advance, and the self-evaluation is performed to automatically register the optimal template. Even if it does, it cannot be evaluated whether the optimal size is selected. In this method, the entire input image must be sequentially cut out as template candidates and evaluated for each template, which takes time. When performing recognition using many template matchings, the object that the user wants to recognize is often self-explanatory, but the user's knowledge cannot be used, and the template is determined only by the evaluation value, which is unnecessary. However, there is a problem that it takes a lot of time to perform various processes, and it is difficult to reflect the intention of the user. Further, Japanese Patent Application Laid-Open No. 4-359388 proposes the following system. Next, this will be described with reference to FIG. This apparatus includes a search image storage device 26 for storing a search image, a template image storage device 27 for storing a template image, a 0-value data processing circuit 28 for processing 0 values of both images, and a ratio of both image values. The divider 29 to be obtained, a calculated value storage device 30 for storing the calculated value of the divider 29, and the absolute value of the difference between the output value of the divider 29 and the stored value of the counted value storage device 30 is obtained. An absolute value calculating circuit 31, an adding circuit 32 for adding the absolute value obtained this time to the absolute value obtained last time, a threshold value storing circuit 33 for storing the threshold value, and comparing the added value by the adding circuit 32 with the threshold value And a comparison circuit 34. According to this method, the sequential sequential test method (Sequential Sim
ilality Detection Algorit
hm = SSDA method) is modified so that it can be achieved even if there is a difference in brightness between images. Therefore, there is no restriction on the brightness of the surroundings at the time of acquiring an image, and the present invention can be used for an application in a situation where the environment constantly changes. Although this method can cope with a change in the width of the contrast of the brightness of the entire input image, when the brightness of the entire image is shifted up or down, the ratio of the two images is reduced. Cannot be handled because it changes depending on the position of the template. Further, threshold processing is performed, and know-how is required to determine the threshold. Further, as a method of obtaining the accuracy of the sub-pixel, the following method is proposed in Japanese Patent Application Laid-Open No. Hei 5-120436. Next, this will be described with reference to FIG. This method calculates the correlation value between the detected image and the template image while shifting the pixel position in pixel units, searches for the pixel position where the correlation value becomes the maximum (first stage), and determines the position of the eight neighboring pixels. A correlation value is obtained (second step), a multivariable polynomial regression surface is determined from these coordinates and the correlation value (third step), and a subpixel-accurate peak is detected from the peak of the surface (fourth step). It is. According to this method, since an estimated peak position that is continuous with a change in the peak position can be obtained with high accuracy from the multivariable polynomial regression surface, the position can be detected with sub-pixel accuracy beyond the pixel unit. However, in this method, the correlation values of all 9 points near the center and 8 must be calculated first, which takes a long processing time. Also, in this method, it is assumed that the relationship between the XY plane and the correlation value forms a quadratic surface, but the shape of the actual correlation value and the vicinity thereof draw a sharper peak than the quadratic surface. Therefore, a peak cannot be accurately obtained by approximation of a quadratic surface. Since the conventional image processing apparatus is configured as described above, it takes a lot of time to calculate a correlation value in ordinary gray-scale template matching, which is not practical. Even with template matching by coarse-grained search, the reduction of processing time cannot be said to be sufficient, and in fields requiring high-speed processing such as FA, it is not possible to respond practically due to time constraints. In the case of the matching method, the user needs know-how to determine which part is used as the template. In the method of performing self-evaluation of the template, the template is determined only by the evaluation value.
SSDs do not take advantage of the user's knowledge, take a lot of time for unnecessary processing, and hardly reflect the user's intention.
The method A cannot cope with the shift up or down of the brightness of the entire image, and has a problem that know-how is required to determine a threshold for threshold processing. The present invention has been made to solve the above-described problems, and has as its object to provide an image processing apparatus which does not require special know-how and can reduce the processing time without reducing the recognition accuracy. I do. An image processing apparatus according to the present invention is an image processing apparatus for performing recognition by a template matching method using template data prepared in advance. Whether the object exists by comparing the correlation value obtained by the correlation operation unit with the correlation value obtained by the correlation operation unit with the circle template image having the diameter of the width of the circumscribed rectangle constituting the object and the threshold value And a correlation value determination unit for determining whether or not there is no correlation. Hereinafter, one embodiment of the present invention will be described. Embodiment 1 FIG. FIG. 1 is a diagram showing a configuration of an image processing apparatus according to Embodiment 1 of the present invention. In the figure, reference numeral 80 denotes an original image input from the image input unit, 105 denotes a circular template image having a rectangular width having a diameter, and 106 denotes a circular template image.
Is the input original image 80 and the circle template image 10
This is a correlation operation unit for obtaining a correlation value with the number 5. Reference numeral 107 denotes a correlation value determination unit that compares the correlation value obtained by the correlation operation unit 106 with a threshold value to determine whether an object exists or not, and 108 displays the determination result. It is a result display section. Next, the operation will be described. Here, FIG.
FIG. 3 is a flowchart showing the flow of processing of the image processing apparatus according to the first embodiment, FIG. 3 is an explanatory diagram showing the image processing process of the image processing apparatus according to the first embodiment, and FIG. FIG. 9 is an explanatory diagram schematically illustrating a process of image processing using an image. According to the first embodiment, in an image processing apparatus in which the posture of an object is unknown and the shape of the object includes an elongated rectangle or a shape including a corner, the width of the rectangle is reduced to the diameter. Find the correlation value between the circle template image and the search image
It recognizes the presence of the object. A circle template image 105 corresponding to the size of the object is generated in advance. In the method of generating the circle template image 105, first, the size of the tip of the object is measured, and a circle image whose size becomes a diameter is generated. In the case of a ternary image, when the user specifies a diameter (or radius), a circle of the ternary image corresponding to the size can be automatically formed. This can be done by processing the image of the object, or by designating image values one by one with a drawing tool. Next, recognition of the presence of an object using such a circle template image 105 will be described. The image captured by the image input unit is input (step ST171),
A correlation value between the input coordinates of the original image 80 and the circle template image 105 is calculated by the correlation operation unit 106 (step ST172). Correlation value determination section 107 compares the correlation value calculated by correlation operation section 106 with a predetermined threshold value (step ST173), and records a position larger than the threshold value as a position where the object exists (step S173).
T174). Note that data at a position where the correlation value is smaller than the threshold is discarded without being used. When the processing for X and Y is completed, the result is displayed on result display section 108 (step ST175). As described above, according to the present invention, since the correlation value between the circle template image having the diameter of the rectangle and the search image and the search image is obtained, the approximate position and posture are determined in advance. This makes it possible to perform position detection without knowing the information, shorten the processing time, and save resources by eliminating the need to prepare a template image for each rotation angle.

【図面の簡単な説明】 【図1】 この発明の実施の形態1による画像処理装置
の構成を示す図である。 【図2】 この実施の形態1による画像処理装置の処理
の流れを示すフローチャートである。 【図3】 実施の形態1による画像処理装置の画像処理
の過程をイメージ的に示した説明図である。 【図4】 3値画像による画像処理の過程をイメージ的
に示した説明図である。 【図5】 従来の基本的なテンプレートマッチング方式
を示す概念図である。 【図6】 従来の粗精サーチ法を示す概念図である。 【図7】 従来の粗精サーチによる高速化効果を示す説
明図である。 【図8】 従来の画像処理装置によるテンプレートマッ
チング法を示す説明図である。 【図9】 従来の他の画像処理装置を示す構成図であ
る。 【図10】 従来のさらに他の画像処理装置を示す構成
図である。 【図11】 従来のさらに他の画像処理装置におけるピ
クセルの精度を求める方法を示すフローチャートであ
る。 【符号の説明】 80 原画像、105 円テンプレート画像、106
相関演算部、107相関値判定部、108 結果表示
部。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram showing a configuration of an image processing device according to a first embodiment of the present invention. FIG. 2 is a flowchart showing a flow of processing of the image processing apparatus according to the first embodiment. FIG. 3 is an explanatory diagram conceptually showing an image processing process of the image processing apparatus according to the first embodiment. FIG. 4 is an explanatory diagram conceptually showing a process of image processing using a ternary image. FIG. 5 is a conceptual diagram showing a conventional basic template matching method. FIG. 6 is a conceptual diagram showing a conventional coarse / fine search method. FIG. 7 is an explanatory diagram showing a speed-up effect by a conventional coarse / fine search. FIG. 8 is an explanatory diagram showing a template matching method by a conventional image processing apparatus. FIG. 9 is a configuration diagram illustrating another conventional image processing apparatus. FIG. 10 is a configuration diagram showing still another conventional image processing apparatus. FIG. 11 is a flowchart showing a method for obtaining pixel accuracy in still another conventional image processing apparatus. [Description of Signs] 80 Original Image, 105 Circle Template Image, 106
Correlation calculation unit, 107 correlation value determination unit, 108 result display unit.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭60−229180(JP,A) 特開 平5−73678(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 7/00 - 7/60 G06T 1/00 G01B 11/00 - 11/30 G01N 21/84 - 21/958 H04N 7/18 ────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-60-229180 (JP, A) JP-A-5-73678 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06T 7/00-7/60 G06T 1/00 G01B 11/00-11/30 G01N 21/84-21/958 H04N 7/18

Claims (1)

(57)【特許請求の範囲】 【請求項1】 予め用意されたテンプレートデータを用
いたテンプレートマッチング法によって認識を行う画像
処理装置において、 入力された原画像と認識対象物を構成する外接四角形の
幅が直径となる円テンプレート画像との相関値を求める
相関演算部と、 上記相関演算部によって求められた相関値としきい値と
を比較することによって対象物が存在するか否かの判定
を行う相関値判定部とを備えたことを特徴とする画像処
理装置。
(57) [Claims 1] In an image processing apparatus for performing recognition by a template matching method using template data prepared in advance, an input original image and a circumscribed rectangle forming a recognition target are formed. A correlation operation unit for obtaining a correlation value with a circle template image having a width of a diameter, and comparing the correlation value obtained by the correlation operation unit with a threshold value to determine whether an object exists. An image processing apparatus comprising: a correlation value determination unit.
JP2001123365A 2001-04-20 2001-04-20 Image processing device Expired - Lifetime JP3447716B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001123365A JP3447716B2 (en) 2001-04-20 2001-04-20 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001123365A JP3447716B2 (en) 2001-04-20 2001-04-20 Image processing device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP27097793A Division JP3212777B2 (en) 1993-10-28 1993-10-28 Image processing device

Publications (2)

Publication Number Publication Date
JP2001351102A JP2001351102A (en) 2001-12-21
JP3447716B2 true JP3447716B2 (en) 2003-09-16

Family

ID=18972931

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001123365A Expired - Lifetime JP3447716B2 (en) 2001-04-20 2001-04-20 Image processing device

Country Status (1)

Country Link
JP (1) JP3447716B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8019164B2 (en) 2007-01-29 2011-09-13 Hitachi High-Technologies Corporation Apparatus, method and program product for matching with a template
JP4982213B2 (en) 2007-03-12 2012-07-25 株式会社日立ハイテクノロジーズ Defect inspection apparatus and defect inspection method
JP4966893B2 (en) 2008-03-13 2012-07-04 株式会社日立ハイテクノロジーズ Matching degree calculation device and method, program
WO2018053756A1 (en) * 2016-09-22 2018-03-29 华为技术有限公司 Image detection method and terminal

Also Published As

Publication number Publication date
JP2001351102A (en) 2001-12-21

Similar Documents

Publication Publication Date Title
JP3212777B2 (en) Image processing device
KR100785594B1 (en) Image process apparatus
US7340089B2 (en) Geometric pattern matching using dynamic feature combinations
US20050226494A1 (en) Pattern inspection apparatus, pattern inspection method, and recording medium
US8428335B2 (en) Combining feature boundaries
JP4776259B2 (en) Pattern evaluation method, pattern alignment method, and program
CN100372089C (en) Pattern evaluating apparatus, pattern evaluating method and program
JP4286657B2 (en) Method for measuring line and space pattern using scanning electron microscope
US20050232493A1 (en) Pattern search method
JP4003465B2 (en) Specific pattern recognition method, specific pattern recognition program, specific pattern recognition program recording medium, and specific pattern recognition apparatus
US20020051561A1 (en) Image processing apparatus, image processing method, and recording medium recording image processing program
CN114936997A (en) Detection method, detection device, electronic equipment and readable storage medium
JP3447716B2 (en) Image processing device
JP2006292615A (en) Visual examination apparatus, visual inspection method, program for making computer function as visual inspection apparatus, and recording medium
JP4788475B2 (en) Image processing apparatus and image processing method
JP3447717B2 (en) Image processing device
JP3872061B2 (en) Image processing device
JP2002183739A (en) Ellipse detection method and ellipse detection device
JP3464463B2 (en) Image processing device
CN110553581A (en) critical dimension measuring method and image processing device for measuring critical dimension
JPH1187446A (en) Apparatus and method for inspection of defect of pattern
JP2004240909A (en) Image processor and image processing method
CN110599456A (en) Method for extracting specific region of medical image
JPH06160047A (en) Pattern matching method
JP2001060265A (en) Device and method for image processing and medium

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070704

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080704

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090704

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100704

Year of fee payment: 7