JP3765888B2 - Part position detection method - Google Patents

Part position detection method Download PDF

Info

Publication number
JP3765888B2
JP3765888B2 JP26804496A JP26804496A JP3765888B2 JP 3765888 B2 JP3765888 B2 JP 3765888B2 JP 26804496 A JP26804496 A JP 26804496A JP 26804496 A JP26804496 A JP 26804496A JP 3765888 B2 JP3765888 B2 JP 3765888B2
Authority
JP
Japan
Prior art keywords
template
image
matching
window
center
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP26804496A
Other languages
Japanese (ja)
Other versions
JPH10117100A (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.)
Juki Corp
Original Assignee
Juki 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 Juki Corp filed Critical Juki Corp
Priority to JP26804496A priority Critical patent/JP3765888B2/en
Publication of JPH10117100A publication Critical patent/JPH10117100A/en
Application granted granted Critical
Publication of JP3765888B2 publication Critical patent/JP3765888B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Supply And Installment Of Electrical Components (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、部品の位置検出方法、更に詳細には、チップマウンタで搭載される電子部品等の部品が吸着されて装着基板に搬送されるとき、吸着時の位置ずれを検出するための部品の位置検出方法に関する。
【0002】
【従来の技術】
従来より、チップマウンタでは、対象物、例えばICチップ部品等の電子部品(以下単に部品という)を吸着する吸着ノズルを備えた吸着ヘッドが設けられており、フィーダから供給される部品が吸着ノズルにより吸着され、回路基板上に移送、搭載されている。通常部品は、必ずしも正しい姿勢で吸着されるわけではないので、部品の吸着姿勢がCCDカメラ等の撮像装置により撮像され、部品の画像認識が行なわれ、この画像認識に基づき得られる部品の吸着ノズルの中心位置からのずれ並びに傾き量が補正された後、部品が回路基板上に搭載されている。
【0003】
この位置ずれ量を求めないし補正するために、部品の種類に応じた位置検出アルゴリズムが開発されているが、各アルゴリズムに必要な部品データを部品毎に記述しなければならない、という問題がある。この煩雑さを解決するために、汎用的なアルゴリズムとして、例えば、特公平8ー12050号公報に記載されたようなテンプレートマッチングが知られている。テンプレートマッチングとは、部品を表すテンプレートを作成し、これを部品の含まれている画像中を移動させ画像とテンプレート間に大きな類似性が得られるテンプレート位置に部品があると認識する方法である。
【0004】
上記公報では、部品(基準マーク)の一部もしくは全部を含む第1のテンプレート並びにこれと点対称な第2のテンプレートを登録し、検査すべき部品の画像と第1及び第2のテンプレートとのマッチングをそれぞれとり、マッチングがとれたときの各テンプレートの対応する2点の中点を部品の中心として中心ずれを求めている。
【0005】
この公報で述べられている手法は、部品の中心位置を検出することは可能であるが、部品の傾きを検出することはできない。また、上述の公報では、登録されたテンプレートを用いるのではなく、部品の一部もしくは全部を含むウィンドウを予め設定し、このウィンドウと点対称なテンプレートを作成しそれとのマッチングを行なうことにより中心位置を求める例も示されている。この例の場合、テンプレートを格納するメモリを省略できる利点がある。しかし、部品が画像内でほぼ一定な位置に存在するならば安定した結果を得られるが、そうでない場合、部品がウィンドウにはいらず、有効な特徴を含まないことが発生し、期待した結果を得られない、という問題がある。
【0006】
これに対しては、ウィンドウを大きくすることである程度の対応は可能ではあるが、テンプレートに余分な情報が多く含まれ、マッチング精度を低下させるばかりか、演算時間も増大する。テンプレートを予め登録して実行する場合は、上記のようなことは発生しないが、部品が傾きを持ち、テンプレートとの間に回転ずれがある場合、マッチング精度は低下し、やはり期待した精度で中心位置を得ることはできない。
【0007】
【発明が解決しようとする課題】
テンプレートマッチング法は、従来の位置ずれ検出アルゴリズムの範疇からもれるような異型部品に対して汎用的な位置検出アルゴリズムとして実装できることから、本発明は、このテンプレートマッチング法の手法を用いて、汎用的で、高精度な位置検出アルゴリズムで部品の位置検出が可能な部品の位置検出方法を提供することを課題とする。
【0008】
【課題を解決するための手段】
請求項1に記載の発明は
自身の中心について点対称形状の部品の画像を撮像し、
座標値を用いて部品の画像の一部又は全部が入る基準ウィンドウを指定し
前記部品の中心を通るX軸あるいはY軸に関して前記基準ウィンドウと対称なウィンドウをテンプレートとして設定し
前記基準ウィンドウと対称なウィンドウのテンプレートと、前記画像を自身の中心回りに回転させることにより得られる画像とのマッチングをとり、マッチングがとれたときの回転量に基づき部品の傾きを検出することを特徴とし
また、請求項2に記載の発明は
自身の中心について点対称形状の部品の画像を撮像し
前記部品の画像から部品の一部又は全部が入るテンプレートを作成して、これを登録し
前記登録したテンプレートと前記部品の画像とのマッチングをとって最も相関度が大きくなるテンプレート位置に基準ウィンドウを設定し
前記部品の中心を通るX軸あるいはY軸に関して前記基準ウィンドウと対称なウィンドウをテンプレートとして設定し
前記基準ウィンドウと対称なウィンドウのテンプレートと、前記画像を自身の中心回りに回転させることにより得られる画像とのマッチングをとり、マッチングがとれたときの回転量に基づき部品の傾きを検出することを特徴とする
【0009】
また、請求項3と4に記載の発明は、それぞれ請求項1と2に記載の発明において、基準ウィンドウを第1のテンプレートとして、該第1のテンプレートと点対称な第2のテンプレートを作成し、部品画像と第2のテンプレートとのマッチングが得られたときの第1のテンプレートの領域内の点と、この点に対応する第2のテンプレートの領域内の点とを結ぶ直線の中点を、請求項1と2に記載の発明における部品の中心として求めることを特徴としている
【0010】
このような構成では、テンプレートマッチングにより部品の中心並びに傾きを精度よく検出できる。
【0012】
また、本発明(請求項2と4)では、部品の画像から部品の一部又は全部が入るテンプレートを作成して、これを登録し、この登録したテンプレートと部品の画像とのマッチングをとって最も相関度が大きくなるテンプレート位置に基準ウィンドウを設定しているので、取得された部品の画像の位置が不安定な場合でも、ウインドウ内に部品の一部または全部が確実に存在することが保証される。
【0013】
更に、前記回転が所定の刻み角で行なわれ、マッチングの相関値の差分あるいは微分を求め、その差分値あるいは微分値のゼロクロス点を求めることにより部品の傾きが検出される。これにより刻み角の分解能を大きくしたのと同様な効果が得られ、傾き検出の精度を向上させることができる。
【0015】
【発明の実施の形態】
以下、本発明の実施の形態を図面に基づいて具体的に説明する。
【0016】
[全体の構成]
図1は、本発明による部品の位置検出方法を実施するためのシステムの構成図である。以下では、処理される対象物をチップマウンタの吸着ノズルにより吸着される、自身の中心に対して点対称な部品とする。
【0017】
このシステムは、部品撮像ステージ1と、部品の姿勢を制御する位置制御装置2と、オペレータが位置制御装置2と画像処理装置12を制御するためのマンマシンインタフェース3と、部品を撮像するTVカメラ4と、その画像を表示するための表示装置5と、その画像データを処理して部品の中心、傾きを検出する画像処理装置12とによって構成される。また、画像処理装置12は、格納されたテンプレートが展開されるテンプレートメモリ6と、TVカメラ4からの画像を格納する画像メモリ7と、作成したテンプレートを格納する不揮発性メモリ11と、テンプレートマッチングを演算する演算部10と、外部回路とのインターフェース8と、各データの流れ、処理を制御する制御部9とから構成される。
【0018】
図2は、全体の作業、および処理の流れを概略示すフローである。位置検出モジュールは様々な部品、動作条件(演算速度優先、精度優先等)に柔軟に対応できるよう予め作成された認識条件のデータを元に駆動する。オペレータは、部品の特徴、動作条件を考慮し、認識条件モジュール(データ群)を作成することで、システムに合わせた位置検出処理を選択することができる。
【0019】
以下、これらについて説明する。
【0020】
まず、ステップS1において、テンプレートマッチングによる基準ウィンドウ設定位置機能を使用するか否かが判断される。この機能は、画像上での部品の位置が不安定な場合においてもウィンドウ内に部品の一部または全部が確実に存在することを保証するための機能である。
【0021】
部品の位置が安定している場合は、この機能を用いず、ステップS2に進み、基準ウィンドウを定める。この基準ウィンドウは、既知の座標値として指定することもできるし、部品の種類によりウィンドウ位置を可変にできる。オペレータは、ウィンド領域を認識条件モジュールに設定する。
【0022】
[テンプレート作成]
一方、部品の位置が不安定な場合には、ステップS3に進んでテンプレートを作成する。このテンプレートの作成ルーチンが図3に詳細に図示されている。まず予め、正常姿勢の部品を含む画像を入力する(ステップT1)。この撮像は、図1の部品撮像ステージ1にセットされた部品の全部を含む画像をTVカメラ4により撮像して画像メモリ7に取り込むことによって行なわれる。そして、この画像が表示装置5に表示される。この画像上で部品が正常姿勢を取っているとは限らないので、オペレータが、マンマシンインタフェース3を介し、位置制御装置2を制御し、部品撮像ステージ1を移動させ部品姿勢を補正する(ステップT2、T3)。この動作時に画像は、上述したようにリアルタイムに画像メモリ7に取り込まれ、表示装置5に表示される。この部品姿勢の補正の様子が図7に模式的に図示されており、最初点線で図示された位置にあった部品20の画像は、上述した補正により実線で示したように正常な姿勢となる。
【0023】
次にオペレータは、図8に示したように、マンマシンインタフェース3を介して画像処理装置12に部品20の一部又は全部が入るテンプレート21を作成するための基準点R及びエリアを指定する(ステップT4)。このテンプレートで確定の場合には(ステップT5)、画像処理装置の制御部9はこの指定をインタフェース8を介して受け取り、画像メモリ7より画像データを取得し、テンプレートを不揮発性メモリ11に登録する(ステップT6)。一方、登録すべきテンプレートが未だ定まらない場合には、ステップT1に戻って上述の処理を繰り返す。
【0024】
このようにしてテンプレートが作成、登録されたら、図2のステップS4に戻り、テンプレートを認識条件モジュールに設定する。続いて、図14に関連して説明する部品の隅点の相対位置により傾き計算機能を使用する場合には、部品外形寸法を認識条件モジュールに設定し(ステップS6)、そうでない場合には、このステップS6をスキップしてステップS7で認識条件のデータ群を送信し、ステップS8で部品の位置検出を行なう。
【0025】
この位置検出のルーチンが図4に詳細に図示されている。まず、ステップR1で示すように、ステップS2あるいはS4で設定された認識条件データに従いテンプレートを指定するか、ウィンドウ位置を指定する。画像上での部品位置が安定な場合には、ウィンドウ位置が指定され、一方不安定な場合には、ステップR2において基準ウィンドウ設定位置が取得される。これは以下のような処理で行なわれる。
【0026】
[基準ウィンドウ]
図9に示したように、検査すべき部品20の画像をTVカメラ4より画像メモリ7に取り込み、制御部9は、先に登録したテンプレート21を不揮発性メモリ11よりテンプレートメモリ6に展開し、演算部10にマッチング演算処理を委ねる。マッチング処理は、例えばテンプレートをX方向及びY方向へ1ピクセルずつ移動させて、その都度それに対応する領域の撮像画像との相関をとり、最も相関度が大きい位置をマッチングがとれた位置とすることにより終了する。制御部9は演算部11にマッチング演算終了を確認の後、検査すべき部品画像上のテンプレート21の位置を知ることができる。この位置を左上とし、テンプレート幅、高さをそれぞれ幅、高さとする矩形領域を部品の中心位置取得のための領域22、すなわち基準ウィンドウとする。
【0027】
[中心位置の検出]
続いて、ステップR2で取得された基準ウィンドウ位置あるいは指定されたウィンドウ位置に基づき、部品の中心位置が検出される(ステップR3)。その詳細が図5のサブルーチンに示されている。その実質は、ステップR32に示された点対称な2つのテンプレートによるテンプレートマッチングである。これは図10、図11に図示のごとく行なわれる。部品を含む画像上で、部品の一部又は全部が入るウィンドウ22(領域A)を上述したテンプレート21によるテンプレートマッチングで設定する。このウィンドウの実画像(あるいは基準ウィンドウそのもの)を第1のテンプレートとし、このテンプレートに対して、点対称(180度回転)な第2のテンプレート23を作成する(図10)。図11に示したように、部品の画像と第2のテンプレート23のマッチングがとれた段階で領域B、すなわち第2のテンプレート領域23を検出する。第1のテンプレート22の領域内の任意の点aとその点に対応する第2のテンプレートの領域の点bとを結ぶ直線の中点Mを部品の中心点として検出する。
【0028】
なお、ウィンドウの実画像を第1のテンプレートとする場合には(図5のステップR30の「はい」への分岐)、上述した点対称テンプレートによるマッチングを行なって(ステップR35)、中心の検出を行なうが、基準ウィンドウそのものを第1のテンプレートとする場合には、部品が傾きを持ち、ステップS3で作成したテンプレートとの間の回転ずれが発生する場合がある。その回転ずれが大きな場合、マッチング精度は低下しているのでステップR2で必ずしも最適の基準ウィンドウ領域を設定できたとは限らない。そこで、基準ウィンドウで得られた位置の近辺でステップR32の処理を数回繰り返し(ステップR31)、ステップR33で基準ウィンドウを補正する。このうち、最も相関値が高い組み合わせを採用し、中心位置を得ることにする(ステップR34)。
【0029】
[傾き検出]
続いて、図4に戻りステップR4において、部品の傾きを検出する。これは、図6に示したルーチンに従って行なわれる。部品が自身の中心に対して点対称な図形である場合、図12に示す部品の中心を原点としたXY座標系において、ステップR2で取得した領域22、すなわちウィンドウAに対してY軸対称な領域24(ウィンドウC)を設定する。この領域を傾き検出用のテンプレートとする(ステップR41)。部品の傾きを仮にθとすると、ウィンドウCの図形を部品の中心を回転中心として、−2*θ回転させたとき、ウィンドウAの図形に対してY軸対称な図形が現れる。
【0030】
この関係を利用し、ウィンドウCにおいて回転角を所定の刻み角で連続して画像を変化させる。そのとき得られる回転画像との間でマッチングをとり(ステップR44)、ステップR45で刻み角を更新して図形を回転させ(ステップR43)、これを繰り返す(ステップR42)。
【0031】
回転の刻み角を更新したときのマッチングの相関値は、図13に図示したような分布曲線Cになり、相関値が最大となる刻み角iを求めることで部品の傾きθを求めることができる(ステップR46)。さらに、精度を上げるために、最も高い相関値Y1をとる位置iとその両隣の刻み角(i−1)、(i+1)での相関値Y2、Y3とのそれぞれ差分をとりその差分値のゼロクロス点Zを求めることにより刻み角以上の分解能で傾きθを求めることができる(R47)。また、図13で点線C’で図示したように、分布曲線Cの微分をとりそのゼロクロス点を求めるようにしてもよい。
【0032】
なお、図示の例では、Y軸対称のテンプレート24を作成しているが、X軸対称のテンプレートを作成して同様にテンプレートマッチングを行なうことにより部品の傾斜を求めることも可能である。
【0033】
傾き精度を向上させるためには、刻み角を細かくしていけばよいがそれでは演算時間がかかってしまう。また回転ずれが1ピクセル内に収まってしまう場合、そのずれ量は検出できない。そこでさらに精度を向上させたい場合には(ステップR47’の「はい」への分岐)、これまでの処理で部品の中心、ある程度の傾きが分かっているので、部品の外形寸法を取得することにより(ステップR48)、最もずれ量が大きくなる部品の最遠点Pをほぼ中心とする最良のテンプレートウィンドウの設定が可能となる(ステップR49、R50)。これが、図14に図示されている。
【0034】
たとえば、部品の外形寸法がわかっているので、部品の左上隅Pをほぼ中心にするウィンドウ(D)30を設定することができる。部品の画像を、このウィンドウの中心を回転中心とし、−2*θ回転させ、Y軸対称になるテンプレート31を作成した場合、そのテンプレートは部品の右上隅Q付近の特徴を示すテンプレートとなる。このテンプレートをX、Y方向に移動し、図14の下方に図示したように、マッチングをとることで画像上での部品右上隅Qの位置を得ることができ、PQの位置関係より傾きθを求めることができる(ステップR51、R52)。
【0035】
ここで用いるウィンドウ30が、図12のウィンドウ22より中心から遠くに位置するのであれば、この手法により図12、図13で得られる以上の精度を期待できる。このマッチング時には、最も高い相関値をとる位置とその近傍の9つの相関値からサブピクセル演算により、サブピクセル精度でその位置を求めることができ、またPQは最もX成分の差の大きい組み合わせであるのでマッチング誤差の影響力がより少なくなり、よりよい精度が期待できる。このようにして、回転量に基づいて得られた傾きを検証し、またこれを補正して高精度の傾きを求めることができる。
【0036】
このように、部品の位置検出が終了すると、図2のフローに戻り、ステップS8に続くステップS9において検出結果を受信し、ステップS10でその検出結果に基づいて中心位置及び/又は傾き補正をして部品の吸着姿勢を補正する。
【0037】
【発明の効果】
以上説明したように、本発明によれば、テンプレートマッチング法を用いて部品の中心並びに傾きを精度よく検出できる。従って、チップマウンタ等におけるより汎用的なアルゴリズムとして実装でき、より手軽に精度よく、電子部品の搭載が可能となる。
【0038】
また画像を回転させて傾きを求める場合、マッチング領域とテンプレートサイズが等しくなるので、各検査角度につき1回の相関演算で済み、かつ画像上からテンプレートを作成するので、正規化の必要もない。このため差分をマッチングの評価関数として使え、演算時間が短縮される。また、マッチング領域が既に確定しているので回転画像を取得する際、マッチング領域のみの回転変換演算をすればよく、この点でも演算時間の短縮が可能である。
【図面の簡単な説明】
【図1】本発明が用いられるシステムの全体構成を示したブロック図である。
【図2】全体の流れを示したフローチャート図である。
【図3】テンプレートの作成並びに登録を行なうルーチンを示すフローチャート図である。
【図4】位置検出を行なうルーチンを示すフローチャート図である。
【図5】部品の中心位置を検出するルーチンを示すフローチャート図である。
【図6】部品の傾きを検出するルーチンを示すフローチャート図である。
【図7】テンプレートを作成するときの部品姿勢を補正する状態を示す説明図である。
【図8】テンプレートの作成を示す説明図である。
【図9】基準ウィンドウ位置を取得する状態を説明する説明図である。
【図10】基準ウィンドウから点対称なテンプレートを形成する状態を示す説明図である。
【図11】点対称なテンプレートとのマッチングを示す説明図である。
【図12】部品の傾きを検出する状態を示す説明図である。
【図13】傾き検出時のマッチングによる相関値の分布を示す線図である。
【図14】他の傾き検出例を示す説明図である。
【符号の説明】
1 部品撮像ステージ
2 位置制御装置
3 マンマシンインターフェース
4 TVカメラ
5 表示装置
12 画像処理装置
20 部品
21、23、31 テンプレート
22、24、30 ウィンドウ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method for detecting the position of a component, and more specifically, a component for detecting a positional deviation at the time of suction when a component such as an electronic component mounted on a chip mounter is sucked and transported to a mounting substrate. The present invention relates to a position detection method.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, a chip mounter has been provided with a suction head having a suction nozzle that sucks an electronic component (hereinafter simply referred to as a component) such as an IC chip component. Adsorbed, transferred and mounted on the circuit board. Since normal parts are not necessarily picked up in the correct posture, the picking posture of the part is picked up by an image pickup device such as a CCD camera, and image recognition of the part is performed. After the deviation from the center position and the amount of inclination are corrected, the component is mounted on the circuit board.
[0003]
In order to obtain or correct this positional deviation amount, a position detection algorithm corresponding to the type of component has been developed, but there is a problem that component data necessary for each algorithm must be described for each component. In order to solve this complexity, for example, template matching as described in Japanese Patent Publication No. 8-12050 is known as a general-purpose algorithm. Template matching is a method in which a template representing a part is created and moved in an image including the part, and a part is recognized at a template position where a large similarity can be obtained between the image and the template.
[0004]
In the above publication, a first template including part or all of a part (reference mark) and a second template that is point-symmetric with the first template are registered, and an image of the part to be inspected and the first and second templates are registered. Each of the matching is taken, and the center deviation is obtained with the midpoint of the two corresponding points of each template when the matching is taken as the center of the part.
[0005]
The technique described in this publication can detect the center position of a component, but cannot detect the inclination of the component. Further, in the above-mentioned publication, the center position is determined by setting a window including a part or all of the parts in advance, creating a point-symmetric template with this window, and matching it with the registered template. An example for obtaining is also shown. In this example, there is an advantage that the memory for storing the template can be omitted. However, a stable result can be obtained if the part is in a nearly constant position in the image, but if it is not, the part will not be in the window and will not contain valid features. There is a problem that it cannot be obtained.
[0006]
This can be dealt with to some extent by increasing the window size, but the template contains a lot of extra information, which not only reduces the matching accuracy but also increases the computation time. When a template is registered and executed in advance, the above does not occur, but if the part has an inclination and there is a rotational deviation from the template, the matching accuracy will decrease, and the center will still be at the expected accuracy. Can't get position.
[0007]
[Problems to be solved by the invention]
Since the template matching method can be implemented as a general-purpose position detection algorithm for atypical parts that fall within the category of the conventional positional deviation detection algorithm, the present invention uses the template matching method to Thus, an object is to provide a component position detection method capable of detecting the position of a component with a highly accurate position detection algorithm.
[0008]
[Means for Solving the Problems]
The invention described in claim 1
Take an image of a point-symmetric part about its center,
Specify a reference window that contains part or all of the part image using coordinate values ,
A window symmetrical to the reference window with respect to the X axis or Y axis passing through the center of the part is set as a template ,
Matching a template of a window symmetrical to the reference window and an image obtained by rotating the image around its center, and detecting the inclination of the component based on the amount of rotation when the matching is achieved Features and
The invention according to claim 2
Take an image of a point-symmetric part about its center ,
Create a template that contains part or all of the part from the image of the part, register it ,
Set the reference window at the template position where the degree of correlation is maximized by matching the registered template and the image of the part ,
A window symmetrical to the reference window with respect to the X axis or Y axis passing through the center of the part is set as a template ,
Matching a template of a window symmetrical to the reference window and an image obtained by rotating the image around its center, and detecting the inclination of the component based on the amount of rotation when the matching is achieved Features .
[0009]
Further, in the inventions described in claims 3 and 4, in the inventions described in claims 1 and 2, respectively, a second template that is point-symmetric with the first template is created using the reference window as the first template. A midpoint of a straight line connecting a point in the region of the first template when matching between the component image and the second template is obtained and a point in the region of the second template corresponding to this point is obtained. The present invention is characterized in that it is obtained as the center of a part in the inventions of claims 1 and 2 .
[0010]
In such a configuration, the center and inclination of the component can be detected with high accuracy by template matching.
[0012]
Further, in the present invention (claims 2 and 4), a template in which a part or all of a part is entered from the part image is created, registered, and matching between the registered template and the part image is performed. Since the reference window is set at the template position where the degree of correlation is the highest, even if the position of the acquired image of the part is unstable, it is guaranteed that part or all of the part will be surely present in the window Is done.
[0013]
Further, the rotation is performed at a predetermined step angle, the difference or derivative of the correlation value of matching is obtained , and the inclination of the component is detected by obtaining the zero cross point of the difference value or derivative value . As a result, the same effect as increasing the resolution of the step angle can be obtained, and the accuracy of inclination detection can be improved.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0016]
[Overall configuration]
FIG. 1 is a block diagram of a system for carrying out a component position detection method according to the present invention. In the following, the object to be processed is assumed to be a part that is point-symmetric with respect to its own center and is sucked by the suction nozzle of the chip mounter.
[0017]
This system includes a component imaging stage 1, a position control device 2 for controlling the posture of the component, a man-machine interface 3 for an operator to control the position control device 2 and the image processing device 12, and a TV camera for imaging the component. 4, a display device 5 for displaying the image, and an image processing device 12 for processing the image data to detect the center and inclination of the component. In addition, the image processing apparatus 12 performs template matching on a template memory 6 in which a stored template is expanded, an image memory 7 that stores an image from the TV camera 4, a non-volatile memory 11 that stores a created template, and template matching. The calculation unit 10 includes a calculation unit 10, an interface 8 with an external circuit, and a control unit 9 that controls the flow and processing of each data.
[0018]
FIG. 2 is a flowchart schematically showing the overall work and the flow of processing. The position detection module is driven based on recognition condition data created in advance so as to be able to flexibly cope with various components and operation conditions (calculation speed priority, accuracy priority, etc.). The operator can select a position detection process suitable for the system by creating a recognition condition module (data group) in consideration of the characteristics of the parts and the operation conditions.
[0019]
Hereinafter, these will be described.
[0020]
First, in step S1, it is determined whether or not to use a reference window setting position function based on template matching. This function is a function for ensuring that a part or all of the parts are surely present in the window even when the position of the parts on the image is unstable.
[0021]
If the position of the component is stable, this function is not used and the process proceeds to step S2 to define a reference window. The reference window can be designated as a known coordinate value, and the window position can be made variable depending on the type of part. The operator sets the window area in the recognition condition module.
[0022]
[Create template]
On the other hand, if the position of the component is unstable, the process proceeds to step S3 to create a template. The template creation routine is illustrated in detail in FIG. First, an image including a normal posture component is input in advance (step T1). This imaging is performed by capturing an image including all of the components set on the component imaging stage 1 of FIG. Then, this image is displayed on the display device 5. Since the part does not always have a normal posture on this image, the operator controls the position control device 2 via the man-machine interface 3 to move the part imaging stage 1 to correct the part posture (step). T2, T3). During this operation, the image is taken into the image memory 7 in real time and displayed on the display device 5 as described above. FIG. 7 schematically shows how the component posture is corrected, and the image of the component 20 that was initially in the position indicated by the dotted line is in a normal posture as indicated by the solid line by the above-described correction. .
[0023]
Next, as shown in FIG. 8, the operator designates a reference point R and an area for creating a template 21 in which part or all of the component 20 enters the image processing apparatus 12 via the man-machine interface 3 ( Step T4). When the template is confirmed (step T5), the control unit 9 of the image processing apparatus receives this designation via the interface 8, acquires the image data from the image memory 7, and registers the template in the nonvolatile memory 11. (Step T6). On the other hand, if the template to be registered is not yet determined, the process returns to step T1 and the above-described processing is repeated.
[0024]
When the template is created and registered in this way, the process returns to step S4 in FIG. 2, and the template is set in the recognition condition module. Subsequently, when using the inclination calculation function based on the relative position of the corner of the component described with reference to FIG. 14, the component outer dimension is set in the recognition condition module (step S <b> 6). This step S6 is skipped, a recognition condition data group is transmitted in step S7, and the position of the component is detected in step S8.
[0025]
This position detection routine is illustrated in detail in FIG. First, as shown in step R1, a template is designated according to the recognition condition data set in step S2 or S4, or a window position is designated. When the component position on the image is stable, the window position is designated, and when it is unstable, the reference window setting position is acquired in step R2. This is done by the following process.
[0026]
[Reference window]
As shown in FIG. 9, the image of the component 20 to be inspected is taken into the image memory 7 from the TV camera 4, and the control unit 9 expands the previously registered template 21 into the template memory 6 from the nonvolatile memory 11, A matching calculation process is entrusted to the calculation unit 10. In the matching process, for example, the template is moved one pixel at a time in the X direction and the Y direction, and each time the template is correlated with the captured image of the corresponding region, the position with the highest degree of correlation is set as the position where the matching is obtained. End with. The control unit 9 can know the position of the template 21 on the component image to be inspected after confirming the completion of the matching calculation with the calculation unit 11. A rectangular area having this position as the upper left and the template width and height as the width and height, respectively, is used as an area 22 for obtaining the center position of the component, that is, a reference window.
[0027]
[Center position detection]
Subsequently, the center position of the component is detected based on the reference window position acquired in step R2 or the designated window position (step R3). The details are shown in the subroutine of FIG. In essence, the template matching is based on two point-symmetric templates shown in step R32. This is performed as shown in FIGS. A window 22 (region A) in which a part or all of the part enters on the image including the part is set by template matching using the template 21 described above. The actual image of this window (or the reference window itself) is used as the first template, and a second template 23 that is point-symmetric (rotated 180 degrees) is created with respect to this template (FIG. 10). As shown in FIG. 11, the region B, that is, the second template region 23 is detected when the part image and the second template 23 are matched. A midpoint M of a straight line connecting an arbitrary point a in the area of the first template 22 and a point b in the area of the second template corresponding to the point is detected as the center point of the part.
[0028]
If the actual image of the window is the first template (branch to “Yes” in step R30 in FIG. 5), the above-described matching with the point-symmetric template is performed (step R35) to detect the center. However, if the reference window itself is used as the first template, the part may have an inclination and a rotational deviation from the template created in step S3 may occur. If the rotational deviation is large, the matching accuracy is lowered, and therefore the optimum reference window area cannot always be set in step R2. Therefore, the process of step R32 is repeated several times near the position obtained in the reference window (step R31), and the reference window is corrected in step R33. Among these, the combination having the highest correlation value is adopted to obtain the center position (step R34).
[0029]
[Tilt detection]
Subsequently, returning to FIG. 4, in step R4, the inclination of the component is detected. This is performed according to the routine shown in FIG. When the part is a figure that is point-symmetric with respect to its own center, in the XY coordinate system with the center of the part shown in FIG. 12 as the origin, it is Y-axis symmetric with respect to the region 22 acquired in step R2, ie, window A. Region 24 (window C) is set. This region is used as a template for inclination detection (step R41). Assuming that the inclination of the part is θ, when the figure of window C is rotated by −2 * θ around the center of the part, a figure symmetrical with respect to the figure of window A appears.
[0030]
Using this relationship, the image is continuously changed in the window C with a predetermined angle of rotation. Matching is performed with the rotation image obtained at that time (step R44), the step angle is updated at step R45 to rotate the figure (step R43), and this is repeated (step R42).
[0031]
The correlation value of matching when the rotation step angle is updated becomes a distribution curve C as shown in FIG. 13, and the component inclination θ can be obtained by obtaining the step angle i that maximizes the correlation value. (Step R46). Further, in order to increase accuracy, the difference between the position i at which the highest correlation value Y1 is taken and the correlation values Y2 and Y3 at the adjacent step angles (i-1) and (i + 1) is taken, and the zero cross of the difference value is taken. By obtaining the point Z, the inclination θ can be obtained with a resolution greater than the step angle (R47). Further, as shown by the dotted line C ′ in FIG. 13, the distribution curve C may be differentiated to obtain the zero cross point.
[0032]
In the example shown in the figure, the Y-axis symmetric template 24 is created. However, it is also possible to obtain the inclination of the part by creating an X-axis symmetric template and performing template matching in the same manner.
[0033]
In order to improve the tilt accuracy, it is only necessary to make the step angle finer, but that takes time. Further, when the rotational deviation falls within one pixel, the deviation amount cannot be detected. Therefore, if you want to further improve the accuracy (branch to “Yes” in step R47 ′), the center of the part and a certain degree of inclination are known in the processing so far, so by acquiring the external dimensions of the part (Step R48), it is possible to set the best template window with the center of the farthest point P of the part having the largest deviation amount (Steps R49, R50). This is illustrated in FIG.
[0034]
For example, since the external dimensions of the part are known, the window (D) 30 having the upper left corner P of the part as the center can be set. When the image of the part is rotated by −2 * θ with the center of this window as the center of rotation to create a template 31 that is symmetric with respect to the Y axis, the template is a template that shows the characteristics near the upper right corner Q of the part. By moving this template in the X and Y directions and taking the matching as shown in the lower part of FIG. 14, the position of the upper right corner Q of the part on the image can be obtained, and the inclination θ is determined from the positional relationship of PQ. (Steps R51 and R52).
[0035]
If the window 30 used here is located farther from the center than the window 22 shown in FIG. 12, it is possible to expect accuracy higher than that obtained in FIGS. At the time of this matching, the position can be obtained with subpixel accuracy from the position having the highest correlation value and nine neighboring correlation values by subpixel calculation, and PQ is the combination having the largest difference in X components. Therefore, the influence of the matching error is reduced, and better accuracy can be expected. In this way, it is possible to verify the inclination obtained based on the rotation amount and correct it to obtain a highly accurate inclination.
[0036]
As described above, when the position detection of the component is completed, the flow returns to the flow of FIG. 2, and the detection result is received in step S9 following step S8, and the center position and / or the inclination is corrected based on the detection result in step S10. Correct the suction posture of the parts.
[0037]
【The invention's effect】
As described above, according to the present invention, the center and inclination of a component can be detected with high accuracy using the template matching method. Therefore, it can be mounted as a more general-purpose algorithm in a chip mounter or the like, and electronic components can be mounted more easily and accurately.
[0038]
In addition, when the image is rotated and the inclination is obtained, the matching area and the template size are equal. Therefore, only one correlation operation is required for each inspection angle, and the template is created from the image, so that there is no need for normalization. For this reason, the difference can be used as a matching evaluation function, and the calculation time is shortened. In addition, since the matching area has already been determined, it is only necessary to perform rotation conversion calculation for only the matching area when acquiring a rotated image, and in this respect, the calculation time can be shortened.
[Brief description of the drawings]
FIG. 1 is a block diagram showing the overall configuration of a system in which the present invention is used.
FIG. 2 is a flowchart showing the overall flow.
FIG. 3 is a flowchart showing a routine for creating and registering a template.
FIG. 4 is a flowchart showing a routine for performing position detection.
FIG. 5 is a flowchart showing a routine for detecting the center position of a component.
FIG. 6 is a flowchart showing a routine for detecting the inclination of a component.
FIG. 7 is an explanatory diagram illustrating a state in which a component posture is corrected when a template is created.
FIG. 8 is an explanatory diagram showing creation of a template.
FIG. 9 is an explanatory diagram illustrating a state in which a reference window position is acquired.
FIG. 10 is an explanatory diagram showing a state in which a point-symmetric template is formed from a reference window.
FIG. 11 is an explanatory diagram showing matching with a point-symmetric template.
FIG. 12 is an explanatory diagram showing a state in which the inclination of a component is detected.
FIG. 13 is a diagram showing a distribution of correlation values by matching at the time of inclination detection.
FIG. 14 is an explanatory diagram showing another example of tilt detection.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Component imaging stage 2 Position control apparatus 3 Man-machine interface 4 TV camera 5 Display apparatus 12 Image processing apparatus 20 Components 21, 23, 31 Templates 22, 24, 30 Window

Claims (5)

自身の中心について点対称形状の部品の画像を撮像し、
座標値を用いて部品の画像の一部又は全部が入る基準ウィンドウを指定し
前記部品の中心を通るX軸あるいはY軸に関して前記基準ウィンドウと対称なウィンドウをテンプレートとして設定し、
前記基準ウィンドウと対称なウィンドウのテンプレートと、前記画像を自身の中心回りに回転させることにより得られる画像とのマッチングをとり、マッチングがとれたときの回転量に基づき部品の傾きを検出することを特徴とする部品の位置検出方法。
Take an image of a point-symmetric part about its center,
Specify a reference window that contains part or all of the part image using coordinate values ,
A window symmetrical to the reference window with respect to the X axis or Y axis passing through the center of the part is set as a template,
Matching a template of a window symmetrical to the reference window and an image obtained by rotating the image around its center, and detecting the inclination of the component based on the amount of rotation when the matching is achieved A feature position detection method.
自身の中心について点対称形状の部品の画像を撮像し、
前記部品の画像から部品の一部又は全部が入るテンプレートを作成して、これを登録し
前記登録したテンプレートと前記部品の画像とのマッチングをとって最も相関度が大きくなるテンプレート位置に基準ウィンドウを設定し
前記部品の中心を通るX軸あるいはY軸に関して前記基準ウィンドウと対称なウィンドウをテンプレートとして設定し
前記基準ウィンドウと対称なウィンドウのテンプレートと、前記画像を自身の中心回りに回転させることにより得られる画像とのマッチングをとり、マッチングがとれたときの回転量に基づき部品の傾きを検出することを特徴とする部品の位置検出方法
Take an image of a point-symmetric part about its center,
Create a template that contains part or all of the part from the image of the part, register it ,
Set the reference window at the template position where the degree of correlation is maximized by matching the registered template and the image of the part ,
A window symmetrical to the reference window with respect to the X axis or Y axis passing through the center of the part is set as a template ,
Matching a template of a window symmetrical to the reference window and an image obtained by rotating the image around its center, and detecting the inclination of the component based on the amount of rotation when the matching is achieved A feature position detection method .
自身の中心について点対称形状の部品の画像を撮像し、
座標値を用いて部品の画像の一部又は全部が入る基準ウィンドウを指定し
前記基準ウィンドウを第1のテンプレートとして、該第1のテンプレートと点対称な第2のテンプレートを作成し、
前記画像と第2のテンプレートとのマッチングが得られたときの前記第1のテンプレートの領域内の点と、この点に対応する前記第2のテンプレートの領域内の点とを結ぶ直線の中点を部品の中心として求め、
前記部品の中心を通るX軸あるいはY軸に関して前記基準ウィンドウと対称なウィンドウをテンプレートとして設定し
前記基準ウィンドウと対称なウィンドウのテンプレートと、前記画像を自身の中心回りに回転させることにより得られる画像とのマッチングをとり、マッチングがとれたときの回転量に基づき部品の傾きを検出することを特徴とする部品の位置検出方法。
Take an image of a point-symmetric part about its center,
Specify a reference window that contains part or all of the part image using coordinate values ,
Using the reference window as a first template, creating a second template that is point-symmetric with the first template,
A midpoint of a straight line connecting a point in the first template region when matching between the image and the second template is obtained, and a point in the second template region corresponding to this point As the center of parts,
A window symmetrical to the reference window with respect to the X axis or Y axis passing through the center of the part is set as a template ,
Matching a template of a window symmetrical to the reference window and an image obtained by rotating the image around its center, and detecting the inclination of the component based on the amount of rotation when the matching is achieved A feature position detection method.
自身の中心について点対称形状の部品の画像を撮像し
前記部品の画像から部品の一部又は全部が入るテンプレートを作成して、これを登録し
前記登録したテンプレートと前記部品の画像とのマッチングをとって最も相関度が大きくなるテンプレート位置に基準ウィンドウを設定し
前記基準ウィンドウを第1のテンプレートとして、該第1のテンプレートと点対称な第2のテンプレートを作成し
前記画像と第2のテンプレートとのマッチングが得られたときの前記第1のテンプレートの領域内の点と、この点に対応する前記第2のテンプレートの領域内の点とを結ぶ直線の中点を部品の中心として求め
前記部品の中心を通るX軸あるいはY軸に関して前記基準ウィンドウと対称なウィンドウをテンプレートとして設定し
前記基準ウィンドウと対称なウィンドウのテンプレートと、前記画像を自身の中心回りに回転させることにより得られる画像とのマッチングをとり、マッチングがとれたときの回転量に基づき部品の傾きを検出することを特徴とする部品の位置検出方法
Take an image of a point-symmetric part about its center ,
Create a template that contains part or all of the part from the image of the part, register it ,
Set the reference window at the template position where the degree of correlation is maximized by matching the registered template and the image of the part ,
Using the reference window as a first template, creating a second template that is point-symmetric with the first template ,
A midpoint of a straight line connecting a point in the first template region when matching between the image and the second template is obtained, and a point in the second template region corresponding to this point As the center of parts ,
A window symmetrical to the reference window with respect to the X axis or Y axis passing through the center of the part is set as a template ,
Matching a template of a window symmetrical to the reference window and an image obtained by rotating the image around its center, and detecting the inclination of the component based on the amount of rotation when the matching is achieved A feature position detection method .
前記回転が所定の刻み角で行なわれ、マッチングの相関値の差分あるいは微分を求め、その差分値あるいは微分値のゼロクロス点を求めることにより部品の傾きを検出することを特徴とする請求項1から4のいずれか1項に記載の方法。The rotation is performed at a predetermined step angle, the difference or derivative of the matching correlation value is obtained , and the inclination of the component is detected by obtaining the zero cross point of the difference value or the derivative value. 5. The method according to any one of 4 above.
JP26804496A 1996-10-09 1996-10-09 Part position detection method Expired - Fee Related JP3765888B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26804496A JP3765888B2 (en) 1996-10-09 1996-10-09 Part position detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26804496A JP3765888B2 (en) 1996-10-09 1996-10-09 Part position detection method

Publications (2)

Publication Number Publication Date
JPH10117100A JPH10117100A (en) 1998-05-06
JP3765888B2 true JP3765888B2 (en) 2006-04-12

Family

ID=17453108

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26804496A Expired - Fee Related JP3765888B2 (en) 1996-10-09 1996-10-09 Part position detection method

Country Status (1)

Country Link
JP (1) JP3765888B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4686329B2 (en) * 2005-10-18 2011-05-25 Juki株式会社 Component recognition method and apparatus
JP7253905B2 (en) * 2018-11-28 2023-04-07 Juki株式会社 Mounting device and mounting method

Also Published As

Publication number Publication date
JPH10117100A (en) 1998-05-06

Similar Documents

Publication Publication Date Title
US7330582B2 (en) Bonding program
JP4446609B2 (en) Image processing method and apparatus
EP1031812A2 (en) Measurement apparatus
CN109213090B (en) Position control system, position detection device, and recording medium
JP4128513B2 (en) Bonding pattern identification method, bonding pattern identification apparatus, and bonding pattern identification program
JP3765888B2 (en) Part position detection method
JP3101853B2 (en) Teaching method of bonding coordinates
JP4172728B2 (en) Image processing method
JP4106301B2 (en) Component recognition method and apparatus
JP4566686B2 (en) Method and apparatus for determining shape of object
JP3763229B2 (en) Position detection method by image recognition
JP2000180138A (en) Calibration plate and calibration system for visual sensor utilizing it
JPH06260794A (en) Method and equipment for recognizing position of electronic part
JP5022598B2 (en) Bonding apparatus and semiconductor device manufacturing method
JPH11328410A (en) Method for positioning pattern
JP2004273578A (en) Electronic component mounting method and equipment thereof
JP2002216130A (en) Image recognizing method, image recognizing device and parts mounting device
JPH11295036A (en) Method and apparatus for judging direction of electronic component
WO2022224645A1 (en) Data creation system and installation system
JP4306353B2 (en) Pixel rate calculation method in image recognition apparatus
JP3046421B2 (en) Electronic component mounting method and device
JPH07286819A (en) Method and device for recognizing position of parts
JP4226866B2 (en) Component recognition device for mounting machine
JPH0410074A (en) Picture pattern inclination detecting method
JP3345496B2 (en) Electronic component position detection method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051011

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051208

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060125

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100203

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100203

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110203

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120203

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120203

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130203

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees