Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4090895B2 - Component positioning method and apparatus - Google Patents
[go: Go Back, main page]

JP4090895B2 - Component positioning method and apparatus - Google Patents

Component positioning method and apparatus Download PDF

Info

Publication number
JP4090895B2
JP4090895B2 JP2003007740A JP2003007740A JP4090895B2 JP 4090895 B2 JP4090895 B2 JP 4090895B2 JP 2003007740 A JP2003007740 A JP 2003007740A JP 2003007740 A JP2003007740 A JP 2003007740A JP 4090895 B2 JP4090895 B2 JP 4090895B2
Authority
JP
Japan
Prior art keywords
positioning
feature
component
contour line
fine
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
JP2003007740A
Other languages
Japanese (ja)
Other versions
JP2004219284A (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 JP2003007740A priority Critical patent/JP4090895B2/en
Publication of JP2004219284A publication Critical patent/JP2004219284A/en
Application granted granted Critical
Publication of JP4090895B2 publication Critical patent/JP4090895B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、部品の位置決め方法および装置、更に詳細には、部品実装装置などにおいて撮像された任意形状の電子部品の画像の輪郭線から部品の位置決め、すなわち部品の位置(部品中心)と傾きを求めるための部品の位置決め方法及び装置に関する。
【0002】
【従来の技術】
画像中のパターン、特に吸着ノズルなどにより吸着された電子部品のパターンを位置決めする方法は、従来からさまざまな方法が提案され、実施されてきた。なかでも検出したい部品のテンプレート画像を、入力画像(吸着された電子部品の撮影画像)にあてて相互相関値を算出し、この値が最も大きくなる位置と角度を出力するテンプレートマッチング法が古くから有名である。
【0003】
さらに近年、輪郭線を使ったマッチングも数多く実施されている。たとえは特許文献1では、学習においては、位置決めすべき部品の基準(テンプレート)となる基準画像(学習画像)から輪郭線を抽出し、輪郭線上の座標とその点における画像の勾配ベクトルを組にして学習データとし、位置決めにおいては入力画像から輪郭線を抽出し、輪郭線と学習データの一致度を計算する方式のマッチングを行っている。
【0004】
さらに、たとえは特許文献2では、学習においては学習画像から輪郭線を抽出し、輪郭線上の座標とその点における画像の勾配ベクトルを使用してマッチングを行っている。この特許文献では、ある固定の基準座標があり、輪郭線上の点と基準座標を結ぶ直線に関して、2点間の距離と、輪郭線の法線との開き角度を組にして学習データとし、位置決めにおいては入力画像から輪郭線を抽出し、輪郭線の各点において、いわゆる投票と呼ばれる方式により、角度と距離が示す座標に落ちる回数を記録し、得票の最も多い座標が基準座標であるという原理によるマッチングを行っている。
【0005】
【特許文献1】
特開2001−251097
【特許文献2】
特開2001−291105
【0006】
【発明が解決しようとする課題】
輪郭線を使う従来の方式は、いずれも学習データの基本組は座標と角度である。しかしながら、従来の方法では、この時どの組も同じ位置決め能力(影響度ないし位置決め性能)を持つものと仮定しているので、位置決め精度が低下するという問題がある。すなわち一般に部品の外周が一様であることは稀であり、明瞭な直線部もあればまったく反対にぼやけた曲線部もある。位置決め能力は前者が高く、後者は低い。しかし従来の方式では、どこから採った組でもそれらを対等に扱うため、位置決め能力が低い組の参加が結果的に位置決め精度を落とす要因となっていた。しかし一方では一般の複雑な形状の部品の位置決めを正しく行うためには組を部品外周からまんべんなく抽出する必要があり両者の要求は対立していた。
【0007】
従って、本発明は、このような問題点を解決するもので、輪郭線から抽出され部品位置決めに用いられる特徴に基づいて行われる部品の位置決め精度を向上させることができる部品の位置決め方法及び装置を提供することを課題とする。
【0008】
【課題を解決するための手段】
上記課題を解決するために、本発明では、
部品の基準画像の輪郭線から特徴を抽出し、該抽出された特徴に基づいて部品の位置決めを行う部品の位置決め方法において、
前記輪郭線から、輪郭線上の点とその点の濃度勾配ベクトルを組とするとき2組からなる1本の梁でなる特徴を抽出し、
前記抽出された特徴に対して位置決め性能を示す値を付加し、
位置決めすべき部品の入力画像から輪郭線を抽出し、
位置決め性能を示す値が大きい特徴と前記入力画像の輪郭線の位置合わせから部品の位置決めを行う構成を採用している。
【0009】
また、本発明では、
部品の基準画像の輪郭線から特徴を抽出し、該抽出された特徴に基づいて部品の位置決めを行う部品の位置決め装置において、
部品の画像から輪郭線を抽出する輪郭線抽出部と、
部品の基準画像の輪郭線から、輪郭線上の点とその点の濃度勾配ベクトルを組とするとき2組からなる1本の梁でなる特徴を抽出し、該抽出された特徴に対して位置決め性能を示す値を付加する手段(部品学習部)と、
位置決め性能を示す値が大きい特徴と位置決めすべき部品の画像の輪郭線の位置合わせから部品の位置決めを行う部品位置決め部と、
を有する構成も採用している。
【0010】
このような構成では、部品の基準画像(学習画像)から求められる輪郭線から出力された位置決めに用いられる特徴に対して位置決め性能(位置決め能力)を示す値が付加され、位置決め時に、大きい位置決め性能をもつ特徴を用いて、位置決めが行われるので、高精度の位置決めが可能となる。
【0012】
また、本発明では、位置決めに用いられる特徴として、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして梁の両端の形状代表点での濃度勾配ベクトル同士がなす角度が90度に近い粗い位置決め用特徴、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして濃度勾配ベクトルのいずれについても、直線となす角度が90度に近い角度微修正用特徴、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして濃度勾配ベクトルのいずれについても、直線となす角度が0度に近い倍率微修正用特徴が抽出され、まず、位置決め速度を優先して粗い位置決め用特徴を用いて位置決めが行われる。この粗い位置決め用特徴だけでは、位置決め精度が得られない場合には、角度微修正用特徴、あるいは倍率微修正用特徴あるいはその両方を用いて微修正が行われる。粗い位置決め用特徴、角度微修正用特徴、倍率微修正用特徴のいずれにも、位置決め性能を示す値が付与されており、高い位置決め性能を有する各特徴が選択されて、粗い位置決め、あるいは微修正が行われるので、高精度の位置決めが可能となる。
【0013】
上記粗い位置決め用特徴、角度微修正用特徴、倍率微修正用特徴の各特徴の位置決め性能は、梁の信頼性、梁の長さ、梁の両端での濃度勾配ベクトルのなす角度に基づいて決定され、梁の信頼性は、梁の両端を構成する形状代表点の安定性から決定される。また、輪郭線上の形状代表点の安定性は、形状代表点の明瞭度の評価値、形状代表点の曲率の評価値、および/または該曲率を保持している曲率保持長の評価値から決定される。
【0014】
【発明の実施の形態】
以下、図面に示す実施の形態に基づいて本発明を詳細に説明する。
【0015】
<全体の構成>
図1は、本発明の部品位置決めを行う装置の概略構成を示すブロック図である。制御部10はCPUなどで構成され、全体の流れを制御する。部品学習部11は、画像入力部13により学習画像を取得し、輪郭線抽出部14が出力する学習画像の輪郭線から部品特徴を出力し、出力された特徴に対して位置決め性能を示す評価値を付加する。学習画像は、位置決めすべき部品の基準(テンプレート)となる基準画像ないし基本画像であり、この学習画像から輪郭線が抽出され部品特徴が出力される。部品位置決め部12は、画像入力部13により位置決めすべき部品の画像を入力し、輪郭線抽出部14が出力した部品画像の輪郭線と、学習画像の輪郭線から抽出される特徴とのマッチングを行い部品の位置と傾きを出力し、部品の位置決めを行う。
【0016】
<部品学習>
部品学習は、部品学習部11により、図2に図示した流れに従って行われる。
【0017】
ステップS10で、部品の学習画像、すなわち基準画像が入力される。入力画像は濃淡画像であり、たとえば画素値は0(最低明度)から255(最大明度)までの値をとるものとする。
【0018】
ステップS11で、学習画像から輪郭線抽出部14により輪郭線が抽出される。あらかじめ適当なしきい値が設けられており、そのしきい値により明度の境界線を追跡すれば可能で、従来の輪郭線抽出方法、たとえは特開2001−251097に記載されている方式を使うことができる。抽出された輪郭線には輪郭線を構成する頂点の座標と、その座標における濃度勾配ベクトルが格納されている。濃度勾配ベクトルとは、その座標近傍において、明度が低いところから高いところに向き、ベクトルの大きさが明度差をあらわすようなベクトルである。
【0019】
[形状代表点とその安定性]
続いて、ステップS12で、抽出された輪郭線からその形状を代表する形状代表点の集合を取得する。図3には、形状代表点の集合を抽出する方法が図示されている。20は、輪郭線抽出部14により抽出された学習画像の輪郭線であり、その輪郭線の頂点列を始点から終点まで、頂点につけられた位置指標について、適当な間隔で選んだ頂点R0、R1、R2、.....Rn−2、Rn−1を形状代表点とする。たとえば間隔を3とすれば、先頭頂点[0]を出発とし、[3]、[6]、..の順に選ばれることになる。すなわち、各形状代表点間の間隔は3となっており、点Rkはそのように選ばれた頂点のうちのひとつである。Gはその濃度勾配ベクトルである。本発明では、各点Rに「安定性」と呼ぶところの値(0〜1)が生成されて、各形状代表点にその値が記録される。従って、形状代表点は、その輪郭線上の座標と、濃度勾配ベクトルと、安定性の3つのパラメータを有することになる。
【0020】
各形状代表点Rの安定度は、以下のようにして付与される。
【0021】
まず、R点の明瞭度gを濃度勾配ベクトルGの大きさとして定義する(g=|G|)。R点の曲率を計算し、その絶対値をkとする(k≧0)。本実施形態ではこのkについて、図5に示すように曲率を零帯M0、中間帯M1、無限帯M2の3つに分類する。ここでk0、k1はあらかじめ決められた定数である。ただしk0は緩やかな曲線部に相当する曲率であり、k1は急カーブの曲線部に相当する曲率である。定数k0、k1を決めるには、それぞれの曲線部を円で代表する。それぞれの半径について、輪郭線と同じ座標系で記述したのち逆数をとれば目的の曲率が得られる。輪郭線20から抽出した曲率kは、0≦k≦k0の零帯M0、k0<k≦k1の中間帯M1、およびk1<kの無限帯M2のどれかに入ることになる。また各帯には図5に示すように、定数ω0またはω1で広げられた零帯M0、中間帯M1および無限帯M2の許容帯が付加されている。
【0022】
また、図3の輪郭線20に対して「曲率保持長」sを求めることができる。sは頂点ZbからZfまでの周長である。頂点Zbは、頂点Rkから出発して頂点の進行方向と逆向きに頂点を順次たどり、各点の曲率kについて、kが最初に属していた帯の許容帯から外にでたとき停止するものとするとき、その頂点列末尾の頂点であり、一方頂点Zfは、頂点Rkから出発して今度は頂点の進行方向と同じ向きに頂点を順次たどるとき、Zbのときと同様に得られる末尾の頂点である。従って、曲率保持長sは、所定の頂点の曲率がその前後に許容帯で保持されているときのその長さである。
【0023】
形状代表点Rの安定性は、明瞭度gが大きいほど高く、曲率kが小さいほど高く、曲率保持長sが大きいほど高いと考えられるので、本実施形態では、αを明瞭度の評価値(0≦α≦1)、βを曲率の評価値(0≦β≦1)、γを曲率保持長の評価値(0≦γ≦1)として、点Rの安定性rをr=αβγで表現している。従って、安定性rは、最も低い0から最も高い1までの実数値0≦r≦1で表現されることになる。
【0024】
上記の明瞭度g、曲率k、曲率保持長sの評価値を生成する関数が図4に図示されており、図4(a)は明瞭度gの評価値αを生成する関数E1を示し、あらかじめ決められたG_0、G_1があり、関数E1はg≦G_0でα=0、g≧G_1でα=1、中間は1次補間とした評価値を生成する。図4(b)は曲率kの評価値βを生成する関数E2を示し、あらかじめ決められたK_0、K_1があり、関数E2はk≦K_1でβ=1、k≧K_0でβ=0、中間は1次補間とする評価値を生成する。また図4(c)は曲率保持長sの評価値γを生成する関数E3を示し、あらかじめ決められたS_0、S_1があり、関数E3はs≦S_0でγ=0、s≧S_1でγ=1、中間は1次補間とする評価値を生成する。
【0025】
このように、図3の輪郭線20の各形状代表点R0、R1、R2、...、Rn−1に関して、上記処理を施すことにより、全周にわたる形状代表点の集合{R0、R1、R2、...、Rn−1}を得ることができ、この集合は、輪郭線上の座標、濃度勾配ベクトル、安定性などのデータを各形状代表点に有する集合となっている。以上が、図2のステップS12で示した処理である。
【0026】
[粗い位置決め用特徴]
続いて、ステップS13で粗い位置決め用特徴が出力される。後述するように、部品の位置決め時には、図8(a)に示したように、位置決め用の正数εが用意されており、位置決めすべき部品画像の輪郭線30の進行方向左右に、輪郭線30から距離ε離れた点線で示す仮想境界線30’、30”が設定される。この境界線で挟まれた領域において、学習したテンプレート(学習画像)の特徴を輪郭線30に合わせる作業が粗い位置決めである。粗い位置決めにおいては精度よりも速度が優先される。
【0027】
図6は、学習画像の輪郭線20から粗い位置決め用特徴を出力する状態を示した図である。粗い位置決め用特徴とは梁_A(BEAM_A)の型の特徴のことをいう。すなわちこの型は、形状代表点の集合のうち2個の形状代表点A1、A2で構成される梁である。粗い位置決めによい梁とは梁の両端の形状代表点の安定性がともに高く、梁が長く、そして梁の両端の形状代表点での濃度勾配ベクトルU1、U2同士がなす角度が90度に近いものをいう。従って、本実施形態では、λを梁の信頼性の評価値(0≦λ≦1)とし、μを梁の長さの評価値(0≦μ≦1)とし、νを梁の両端での濃度勾配ベクトルのなす角度の評価値(0≦ν≦1)として、梁_Aの位置決め性能fを、f=λμνと表現する。従って、梁_Aの位置決め性能fは、最も低い0から最も高い1までの実数値0≦f≦1で表される。
【0028】
信頼性の評価値λは、λ=MIN{r1、r2}で求める。ここでr1、r2はそれぞれ形状代表点A1、A2の安定性である。たとえは図6のように、点A1の安定性がr1=0.8、点A2の安定性がr2=0.3のとき、λ=0.3となる。また、長さの評価値μは、μ=h/Hで求める。ここでhは形状代表点A1、A2の距離、Hは部品の直径(=端から端までの最大距離)程度に大きい適当な正数である。また、角度の評価値νは、ν=|sinθ|で求める。ここでθは形状代表点の濃度勾配ベクトルU1とU2がなす開き角度である。
【0029】
特徴としての梁に関しては、位置決め性能の値が大きい値の梁が選び出される。すなわち、ある梁について、もし位置決め性能を示すf値があらかじめ定めた水準に達しないときはその梁を棄てる。これにより一定水準以上の梁が集まるので安定した位置決めが保証される。粗い位置決め用特徴には要求個数がある。本実施形態では、例えば6個の梁(形状代表点の数は12点)としたが、原理的に1以上の任意値でよい。この要求個数に達するまで特徴の出力を続ける。その場合、f値が最も大きいものから出力するように制御することが重要である。そのためには以下の手順を踏めばよい。
【0030】
すなわち最初にすべての形状代表点を未使用とする。次の特徴を出力する前に「f値の最大値」を0にしておく。形状代表点集合から未使用である2個の点の組をすべて選びだすことを続け、選ばれた組の、すなわち梁のf値を計算してそれまでの最大値と比較し、今回のほうが大きければその組を最大値として更新する。すべての組み合わせが完了したとき、最大値を記録している組を出力し、その形状代表点2個を使用済みとする。以上の手順により、粗い位置決め用特徴を要求数出力する。
【0031】
有限の点集合から2個の点の組み合わせを選び出す総数にはもちろん限りがあり、しかも未使用条件があり、さらにf値の水準条件があるので、部品によっては要求個数に達するまでに梁の資源が枯渇することもある。すなわち一般に最終的に出力される粗い位置決め用特徴の数は要求個数以下となる。
【0032】
[角度微修正用特徴]
続いて、ステップS14で角度微修正用特徴が出力される。角度微修正用特徴とは、図6において、梁_B(BEAM_B)の型の特徴のことをいう。すなわちこの型は2個の形状代表点B1、B2で構成される梁である。角度微修正によい梁とは、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして濃度勾配ベクトルV1、V2のいずれについても、直線B1B2となす角度が90度に近いものをいう。従って、λを梁の信頼性の評価値(0≦λ≦1)とし、μを梁の長さの評価値(0≦μ≦1)とし、νを梁の両端での濃度勾配ベクトルのなす角度の評価値(0≦ν≦1)として、梁_Bの位置決め性能fを、f=λμνとして表現する。このf値は、最も低い0から最も高い1までの実数値0≦f≦1で表される。λ、μは、粗い位置決め用特徴のときと同じ評価式で求められ、一方、νは、ν=MIN{|sinθ1|、|sinθ2|}で求められる。ここでθ1、θ2はそれぞれ濃度勾配ベクトルV1、V2がベクトルB1B2となす開き角度である。
【0033】
梁_Bの出力基準と出力方法は梁_Aのときと同じである。ただし、角度微修正用特徴の要求個数は16個とした。一般に最終的に出力される角度微修正用特徴の数はこの要求個数以下となる。
【0034】
[倍率微修正用特徴]
また、ステップS15で倍率微修正用特徴が出力される。倍率微修正用特徴とは、図6において、梁_C(BEAM_C)の型の特徴のことをいう。すなわちこの型は2個の形状代表点C1、C2で構成される梁である。倍率微修正によい梁とは梁の両端の形状代表点の安定性がともに高く、梁が長く、そして濃度勾配ベクトルW1、W2のいずれについても、直線C1C2となす角度が0度に近いものをいう。従って、λを梁の信頼性の評価値(0≦λ≦1)とし、μを梁の長さの評価値(0≦μ≦1)とし、νを梁の両端での濃度勾配ベクトルのなす角度の評価値(0≦ν≦1)として、梁_Cの位置決め性能fを、f=λμνと表現する。f値は最も低い0から最も高い1までの実数値0≦f≦1で表される。λ、μは、粗い位置決め用特徴のときと同じ評価式で求められ、νは、ν=MIN{|cosθ1|、|cosθ2|}で求められる。ここでθ1、θ2はそれぞれ濃度勾配ベクトルW1、W2がベクトルC1C2となす開き角度である。
【0035】
梁_Cの出力基準と出力方法は梁_Aのときと同じである。ただし、倍率微修正用特徴の要求個数は10個とした。一般に最終的に出力される倍率微修正用特徴の数はこの要求個数以下となる。
【0036】
以上のようにして、部品学習部11においては、基準画像の輪郭線から粗い位置決め用特徴、角度微修正用特徴、倍率微修正用特徴がそれぞれ抽出され、各特徴に対して位置決め性能を示す値が付加され、そのうち位置決め性能の高い特徴が選び出される。
【0037】
<部品の位置決め>
部品の位置決めは、部品位置決め部12により図7の流れに従って行われる。
【0038】
ステップS20で、吸着ノズルにより吸着された、位置決めすべき部品の画像が画像入力部13を介して入力され、また部品学習部11で得た上述した学習データ(形状代表点の集合、高い位置決め性能を有する粗い位置決め用特徴、角度微修正用特徴、倍率微修正用特徴など)が入力される。続いて、ステップS21で位置決めすべき部品の画像から輪郭線抽出部14により輪郭線が抽出される。抽出された輪郭線の断片が図8で符号30で図示されている。
【0039】
[粗い位置決め]
次のステップS22では、粗い位置決めを行う。粗い位置決めは、たとえば特開2001−251097に記述の方式を使うことができ、粗い位置決め用特徴を、輪郭線30上で接線ベクトル(濃度勾配ベクトルの直交ベクトル)を合わせながら移動させ、粗い位置決め用特徴の両端の形状代表点が輪郭線30上にあるかどうかを調べることにより行なわれる。そのために、操作者は位置決めの許容幅εを設定し、各粗い位置決め用特徴が、輪郭線からの距離がε以下であり、仮想境界線30’、30”の範囲内にあるかどうかが調べられ、該範囲内に存在するように、粗い位置決め用特徴が移動される。このように、粗い位置決めでは、図8(a)で、符号31で示した特徴BEAM_Aの両端の代表形状点31a、31bが、許容幅εで輪郭線30上に存在するように、位置決めが行われる。
【0040】
粗い位置決め終了後は、各粗い位置決め用特徴(BEAM_A)を構成する形状代表点のほとんどすべてがε帯の領域に収まっている。従って、精度が要求されない場合には、この粗い位置決めだけで位置決めを終了することができる。しかしこの状況(平行移動・角度・倍率)は、学習画像の輪郭線20と部品画像の輪郭線30が完全に一致をしていることを示しているわけではなく、平行移動にも角度にも倍率にもなお微修正の余地を残している。
【0041】
そのために、微修正の繰り返しが行われ、ステップS23でその微修正の繰り返し条件を検査する。一般に微修正を繰り返せば繰り返すほど精度が上がる反面、それだけ時間もかかるので適当なところで打ち切ることが必要である。本実施形態では精度条件として固定の3回繰り返すことにした。もちろん後述するように、位置決めの使用目的に応じてここの条件を変えることができる。
【0042】
学習した部品固有の座標系(基準座標系)をUV座標系、位置決めすべき部品の画像の座標系をXY座標系とすれば、座標(u、v)と(x、y)は次の式で結びつくことが知られている。
【0043】
(x、y)=S・{(a11、a12)(a21、a22)}(u、v)+(Tx、Ty)
ただしSは倍率、{(a11、a12)(a21、a22)}は2×2回転マトリクス、(Tx、Ty)は平行移動である。
【0044】
[平行移動の微修正]
繰り返される第1の微修正は、ステップS24で行われる平行移動の微修正である。本実施形態では平行移動の微修正にすべての梁すなわち粗い位置決め用と角度微修正用と倍率微修正用のすべての梁を参加させた。これは個数が多いとき得られる統計的な効果を狙ったものである。図8(a)において、梁(BEAM_A)31は粗い位置決め終了後または何回かの微修正終了後の状況を示すもので、梁31の両端31a、31bの座標は、現在の座標変換式で生成された座標である。各座標にはそれぞれ輪郭線座標すなわち輪郭線上最も近い座標(黒点で示す)が存在する。梁の座標から輪郭線座標へのベクトルをe0、e1とする。
【0045】
この梁固有の修正ベクトルvを、|e0|≧|e1|のときv=e0、|e0|<|e1|のときv=e1とする。たとえば図8(a)の場合、e1のほうが大きいのでv=e1である。平行移動微修正に参加する梁が全部でN個あるとき、梁固有の修正ベクトル集合{v0、v1、...、vN−1}が得られる。
【0046】
部品の平行移動微修正ベクトルΔTを、ΔT=Σ(|vi|・vi)/Σ|vi|とする。ここで分子は|vi|・viのN個の総和(ベクトル)、分母は|vi|のN個の総和(スカラー)である。この式は、Viの大きさによる加重平均の式であり、viが大きいほど結果に占めるviの比率が大きい。図8(d)において、その妥当性が示されている。図8(d)には、N=3個の梁BEAM0、BEAM1、BEAM2が図示されており、梁固有の修正ベクトルはそれぞれv0、v1、v2とする。X方向のずれとY方向のずれがあるが、Y方向のずれが目立つのでY方向が大きく改善されなければならない。もし仮に単純な算術平均(重み=1)を採った場合、ΔTのY成分はほぼv0/3となるので目的を達成することができないが、本実施形態の方式ではΔTのY成分はほぼv0となるので、効果的な微修正を行うことができ、目的を達成することができる。
【0047】
このように、平行移動の微修正において、部品の平行移動微修正ベクトルΔTを、ΔT=Σ(|vi|・vi)/Σ|vi|としたことにより、大きな誤差を早く解消できるので高速で正確な修正を行うことができる。
【0048】
現在の座標変換式の平行移動の項について、ΔTを加算したものをあらたに平行移動の項とする。
【0049】
[角度の微修正]
続く、ステップS25で角度の微修正が行われる。角度の微修正には角度微修正用の梁を使う。図8(b)において、梁(BEAM_B)32は粗い位置決め終了後または何回かの微修正終了後の状況を示す。梁32の両端32a、32bの座標は、現在の座標変換式で生成された座標である。各座標にはそれぞれ輪郭線上最も近い座標(黒点で示す)が存在する。点線はこの輪郭線上の2点を結ぶベクトルの方向を示す。梁からこのベクトルへの符号つき開き角度をδラジアンとすれば、δはこの梁固有の修正角度である。角度微修正に参加する梁が全部でN個あるとき、梁固有の修正角度集合{δ0、δ1、...、δN−1}が得られる。
【0050】
部品の角度微修正ΔΘを、ΔΘ=Σ(|fi|・δi)/Σ|fi|、ただしfiは梁の位置決め性能(0〜1)、とする。ここで分子は|fi|・δiのN個の総和(ラジアン)、分母は|fi|のN個の総和(スカラー)である。この式は、fiの大きさによる加重平均の式であり、fiが大きいほど結果に占めるδiの比率が大きい。梁の性能が高い(f値が大きい)ほどその影響度を強めることにより正確な微修正が可能となる。
【0051】
このように、角度の微修正において、部品の角度微修正ΔΘを、ΔΘ=Σ(|fi|・δi)/Σ|fi|、ただしfiは梁の性能(0〜1)、としたことにより、正確な修正を行うことができる。
【0052】
現在の座標変換式の回転マトリクスにΔΘに対応するマトリクスを前から乗じたものをあらたに回転マトリクスとする。
【0053】
[倍率の微修正]
続いて、ステップS26で倍率の微修正が行われる。倍率の微修正には倍率微修正用の梁を使う。図8(c)において、梁(BEAM_C)33は粗い位置決め終了後または何回かの微修正終了後の状況を示す。梁33の両端33a、33bの座標は、現在の座標変換式で生成された座標である。各座標にはそれぞれ輪郭線上最も近い座標(黒点で示す)が存在する。梁33の長さをd0、点線で示す輪郭線黒点間距離をd1とすれば、s=d1/d0はこの梁固有の修正倍率である。倍率微修正に参加する梁が全部でN個あるとき、梁固有の修正倍率集合{s0、s1、...、sN−1}が得られる。
【0054】
部品の倍率微修正ΔSを、ΔS=Σ(|fi|・si)/Σ|fi|、ただしfiは梁の位置決め性能(0〜1)、とする。ここで分子は|fi|・siのN個の総和(スカラー)、分母は|fi|のN個の総和(スカラー)である。この式は、fiの大きさによる加重平均の式であり、fiが大きいほど結果に占めるsiの比率が大きい。梁の性能が高い(f値が大きい)ほどその影響度を強めることにより正確な微修正が可能となる。
【0055】
このように、倍率の微修正において、部品の倍率微修正ΔSを、ΔS=Σ(|fi|・si)/Σ|fi|、ただしfiは梁の性能(0〜1)、としたことにより、正確な修正を行うことができる。
【0056】
現在の座標変換式の倍率にΔSを乗じたものをあらたに倍率とし、このあとステップS23に戻る。
【0057】
このように、各特徴31、32、33と輪郭線30の位置合わせ(マッチング)の微修正を繰り返すことにより、各特徴と輪郭線30の位置合わせが完全になる。
【0058】
<他の実施形態>
ステップS12で形状代表点の座標と濃度勾配ベクトルをそれぞれ輪郭線から直接得られた座標と濃度勾配ベクトルとしたが、その代わりにそれぞれ補間した座標、補間した濃度勾配ベクトルとしても効果は変わらない。
【0059】
また、ステップS12で曲率の分類を3個としたが、2以上の任意個にしても同じ効果が得られ、またステップS12で評価関数E1、E2、E3として図4の関数を使ったが、中間部を0〜1の値をとる1次補間以外のものに変えても効果は変わらない。
【0060】
さらに、ステップS13〜S15の各ステップにおいて、梁の信頼性λを安定性r1、r2の関数λ=MIN{r1、r2}としたが、他の関数たとえばλ=r1×r2にしても効果は変わらない。
【0061】
また、ステップS23で微修正の繰り返し条件を固定の3回繰り返すことにしたが、その代わりに他の条件としても効果は変わらない。たとえば、輪郭線と梁の両端点それぞれとの距離に着目して、最大距離が定めた距離以内となったときループを抜けるとしてもよいし、あるいはテンプレート各点と輪郭線各点との一致度を測る関数を用意して、その関数値が定めた値以上となったときループを抜けるとしてもよい。
【0062】
また、ステップS24〜S26の微修正の実行順序に関して、実施形態では平行移動→回転→倍率としたが、任意の順序にしても効果は変わらない。
【0063】
また、微修正に関しては、角度微修正と倍率微修正の両方を行うのではなく、いずれか一方だけとすることもできる。
【0064】
【発明の効果】
以上説明したように、本発明では、部品の基準画像から求められる輪郭線から出力された位置決めに用いられる特徴に対して位置決め性能を示す値が付加され、位置決め時に、高い位置決め性能をもつ特徴を用いて、位置決めが行われるので、高精度の位置決めが可能となる。
【0065】
また、本発明では、位置決めに用いられる特徴として、粗い位置決め用特徴と、角度微修正用特徴、倍率微修正用特徴が抽出され、位置決め速度を優先して粗い位置決め用特徴を用いて位置決めが行われるので、高速な位置決めが可能となる。この粗い位置決め用特徴だけでは、位置決め精度が得られない場合には、角度微修正用特徴、あるいは倍率微修正用特徴あるいはその両方を用いて微修正を行うようにしているので、位置決め精度を向上させることができ、その場合、粗い位置決め用特徴、角度微修正用特徴、倍率微修正用特徴のいずれにも、位置決め性能を示す値が付与されており、高い位置決め性能を有する各特徴が選び出されて粗い位置決め、あるいは微修正が行われるので、位置決め精度を飛躍的に高めることができる。
【図面の簡単な説明】
【図1】本発明装置の1実施形態を示す全体ブロック図である。
【図2】 部品学習の流れを概略示す流れ図である。
【図3】 部品学習部における形状代表点の抽出原理を示す説明図である。
【図4】 部品学習部における形状代表点の安定性を求めるための評価式の特性を示す線図である。
【図5】 部品学習部における曲率分類を示す説明図である。
【図6】 部品学習部から出力される特徴データの種類を示した説明図である。
【図7】 部品位置決め部での位置決めの流れを概略示した流れ図である。
【図8】 部品位置決め部における各種微修正の原理を示した説明図である。
【符号の説明】
10 制御部
11 部品学習部
12 部品位置決め部
13 画像入力部
14 輪郭線抽出部
20 学習画像の輪郭線
30 位置決めすべき部品の画像の輪郭線
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a component positioning method and apparatus, and more specifically, the positioning of a component, that is, the position of the component (part center) and inclination, from the contour line of an image of an electronic component of an arbitrary shape captured by a component mounting apparatus or the like. The present invention relates to a component positioning method and apparatus for obtaining the same.
[0002]
[Prior art]
Various methods for positioning a pattern in an image, particularly a pattern of an electronic component sucked by a suction nozzle have been proposed and implemented. In particular, the template matching method for calculating the cross-correlation value by applying the template image of the component to be detected to the input image (photographed image of the sucked electronic component) and outputting the position and angle at which this value is the largest has been used for a long time. It is famous.
[0003]
In recent years, many matching operations using contour lines have been performed. For example, in Patent Document 1, in learning, a contour line is extracted from a reference image (learning image) that serves as a reference (template) for a component to be positioned, and coordinates on the contour line and the gradient vector of the image at that point are paired. In the positioning, the contour line is extracted from the input image, and matching is performed by calculating the degree of coincidence between the contour line and the learning data.
[0004]
Furthermore, for example, in Patent Document 2, in learning, a contour line is extracted from a learning image, and matching is performed using coordinates on the contour line and a gradient vector of the image at that point. In this patent document, there is a fixed reference coordinate, and for a straight line connecting the point on the contour line and the reference coordinate, the distance between the two points and the opening angle between the normal line of the contour line are used as learning data, and positioning is performed. The principle of extracting the contour line from the input image, recording the number of times it falls to the coordinates indicated by the angle and the distance by the so-called voting method at each point of the contour line, and the principle that the coordinates with the most votes are the reference coordinates Matching is performed.
[0005]
[Patent Document 1]
JP2001-251097
[Patent Document 2]
JP 2001-291105 A
[0006]
[Problems to be solved by the invention]
In all conventional methods using contour lines, the basic set of learning data is coordinates and angles. However, in the conventional method, since it is assumed that all sets have the same positioning ability (influence or positioning performance) at this time, there is a problem that positioning accuracy is lowered. That is, in general, the outer periphery of a part is rarely uniform, and there is a clear straight line part and, on the contrary, a blurred curve part. The positioning ability is high in the former and low in the latter. However, in the conventional method, pairs taken from anywhere are treated equally, so participation of a pair having a low positioning ability resulted in a decrease in positioning accuracy. However, on the other hand, in order to correctly position a general complex-shaped part, it is necessary to extract the set evenly from the outer periphery of the part.
[0007]
Therefore, the present invention solves such problems, and a component positioning method and apparatus capable of improving the component positioning accuracy performed based on the features extracted from the contour line and used for component positioning. The issue is to provide.
[0008]
[Means for Solving the Problems]
  In order to solve the above problems, in the present invention,
  In a component positioning method for extracting a feature from the contour line of a reference image of a component and positioning the component based on the extracted feature,
From the contour line, when a point on the contour line and a density gradient vector of the point are paired, a feature composed of two beams is extracted,
  A value indicating positioning performance is added to the extracted feature,
  Extract the contour line from the input image of the part to be positioned,
  A configuration is employed in which the component is positioned based on the feature having a large value indicating the positioning performance and the alignment of the contour line of the input image.
[0009]
  In the present invention,
  In a component positioning apparatus that extracts a feature from the contour line of a reference image of a component and positions the component based on the extracted feature,
  An outline extraction unit for extracting an outline from an image of a part;
  From the outline of the reference image of the partWhen the point on the contour line and the density gradient vector at that point are paired, it consists of two beamsMeans for extracting a feature and adding a value indicating positioning performance to the extracted feature (component learning unit);
  A component positioning unit for positioning the component from the alignment of the feature with a large value indicating the positioning performance and the contour line of the image of the component to be positioned;
  The structure which has is also employ | adopted.
[0010]
In such a configuration, a value indicating the positioning performance (positioning capability) is added to the feature used for positioning output from the contour line obtained from the reference image (learning image) of the component, and a large positioning performance is obtained during positioning. Since the positioning is performed using a feature having a high-precision positioning.
[0012]
  In the present invention, as features used for positioning,The stability of the shape representative points at both ends of the beam is high, the beam is long, and the angle formed by the concentration gradient vectors at the shape representative points at both ends of the beam is close to 90 degrees.Coarse positioning features,The stability of the shape representative points at both ends of the beam is high, the beam is long, and the angle formed by the straight line is close to 90 degrees for any concentration gradient vector.Features for fine angle correction,Both the shape representative points at both ends of the beam are highly stable, the beam is long, and the angle formed by the straight line is close to 0 degrees for any of the concentration gradient vectors.Features for fine correction of magnification are extracted, and positioning is first performed using coarse positioning features in preference to positioning speed. If positioning accuracy cannot be obtained with only this rough positioning feature, fine correction is performed using the fine angle correction feature and / or the fine magnification correction feature. Each of the coarse positioning feature, angle fine correction feature, and magnification fine correction feature is given a value indicating positioning performance, and each feature having high positioning performance is selected to perform rough positioning or fine correction. Therefore, highly accurate positioning is possible.
[0013]
The positioning performance of the coarse positioning feature, angle fine correction feature, and magnification fine correction feature is determined based on the reliability of the beam, the length of the beam, and the angle formed by the density gradient vectors at both ends of the beam. The reliability of the beam is determined from the stability of the shape representative points constituting both ends of the beam. In addition, the stability of the shape representative point on the contour line is determined from the evaluation value of the clarity of the shape representative point, the evaluation value of the curvature of the shape representative point, and / or the evaluation value of the curvature holding length holding the curvature. Is done.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in detail based on embodiments shown in the drawings.
[0015]
<Overall configuration>
FIG. 1 is a block diagram showing a schematic configuration of an apparatus for positioning a component according to the present invention. The control unit 10 is composed of a CPU or the like, and controls the entire flow. The component learning unit 11 acquires a learning image by the image input unit 13, outputs a component feature from the contour line of the learning image output by the contour line extraction unit 14, and an evaluation value indicating positioning performance with respect to the output feature Is added. The learning image is a reference image or basic image serving as a reference (template) for a component to be positioned, and a contour line is extracted from the learning image and a component feature is output. The component positioning unit 12 inputs an image of a component to be positioned by the image input unit 13, and performs matching between the contour line of the component image output from the contour line extraction unit 14 and the feature extracted from the contour line of the learning image. The position and inclination of the part are output, and the part is positioned.
[0016]
<Parts learning>
The component learning is performed by the component learning unit 11 according to the flow illustrated in FIG.
[0017]
In step S10, a part learning image, that is, a reference image is input. The input image is a grayscale image. For example, the pixel value takes a value from 0 (minimum brightness) to 255 (maximum brightness).
[0018]
In step S11, a contour line is extracted from the learning image by the contour line extraction unit 14. An appropriate threshold value is set in advance, and it is possible to trace the lightness boundary line based on the threshold value. A conventional contour line extraction method, for example, a method described in Japanese Patent Laid-Open No. 2001-251097 is used. Can do. The extracted contour line stores coordinates of vertices constituting the contour line and density gradient vectors at the coordinates. The density gradient vector is a vector in the vicinity of the coordinates, which is directed from a low lightness to a high lightness, and the magnitude of the vector represents a lightness difference.
[0019]
[Shape representative points and their stability]
Subsequently, in step S12, a set of shape representative points representing the shape is acquired from the extracted contour line. FIG. 3 illustrates a method for extracting a set of shape representative points. Reference numeral 20 denotes a contour line of the learning image extracted by the contour line extraction unit 14, and vertices R0 and R1 selected at appropriate intervals with respect to the position index attached to the vertex from the start point to the end point of the vertex line of the contour line. , R2,. . . . . Let Rn-2 and Rn-1 be shape representative points. For example, if the interval is 3, the start vertex [0] is taken as the starting point, and [3], [6],. . Will be chosen in the order. That is, the interval between the shape representative points is 3, and the point Rk is one of the vertices so selected. G is the concentration gradient vector. In the present invention, a value (0 to 1) called “stability” is generated at each point R, and the value is recorded at each shape representative point. Therefore, the shape representative point has three parameters: coordinates on the contour line, density gradient vector, and stability.
[0020]
The stability of each shape representative point R is given as follows.
[0021]
First, the clarity g at the point R is defined as the magnitude of the density gradient vector G (g = | G |). The curvature of the R point is calculated, and the absolute value is k (k ≧ 0). In the present embodiment, for k, the curvature is classified into three, a zero band M0, an intermediate band M1, and an infinite band M2, as shown in FIG. Here, k0 and k1 are predetermined constants. However, k0 is a curvature corresponding to a gentle curve portion, and k1 is a curvature corresponding to a curve portion of a sharp curve. In order to determine the constants k0 and k1, each curve portion is represented by a circle. Each radius is described in the same coordinate system as the contour, and then the reciprocal is taken to obtain the desired curvature. The curvature k extracted from the contour line 20 falls into one of a zero band M0 where 0 ≦ k ≦ k0, an intermediate band M1 where k0 <k ≦ k1, and an infinite band M2 where k1 <k. Further, as shown in FIG. 5, an allowable band of zero band M0, intermediate band M1, and infinite band M2 widened by a constant ω0 or ω1 is added to each band.
[0022]
Further, the “curvature retention length” s can be obtained for the contour line 20 of FIG. s is the circumference from the vertices Zb to Zf. The vertex Zb starts from the vertex Rk and sequentially follows the vertex in the direction opposite to the vertex traveling direction, and stops when the curvature k of each point is outside the allowable band of the band to which k originally belonged. , And the vertex Zf is the last vertex obtained in the same way as in Zb, when the vertex Zf starts from the vertex Rk and sequentially follows the vertex in the same direction as the vertex moving direction. It is a vertex. Therefore, the curvature holding length s is the length when the curvature of a predetermined vertex is held in the permissible band before and after the curvature.
[0023]
The stability of the shape representative point R is considered to be higher as the intelligibility g is larger, higher as the curvature k is smaller, and higher as the curvature holding length s is larger. In this embodiment, α is an evaluation value of intelligibility ( 0 ≦ α ≦ 1), β is the evaluation value of curvature (0 ≦ β ≦ 1), γ is the evaluation value of curvature retention length (0 ≦ γ ≦ 1), and the stability r of point R is expressed by r = αβγ is doing. Therefore, the stability r is expressed by a real value 0 ≦ r ≦ 1 from the lowest 0 to the highest 1.
[0024]
A function for generating evaluation values of the above-described intelligibility g, curvature k, and curvature holding length s is shown in FIG. 4, and FIG. 4A shows a function E1 for generating an evaluation value α of intelligibility g. There are G_0 and G_1 determined in advance, and the function E1 generates an evaluation value in which g ≦ G_0 and α = 0, g ≧ G_1 and α = 1, and the middle is primary interpolation. FIG. 4B shows a function E2 for generating an evaluation value β of the curvature k, and there are predetermined K_0 and K_1. The function E2 is β = 1 when k ≦ K_1, β = 0 when k ≧ K_0, and intermediate. Generates an evaluation value for primary interpolation. FIG. 4C shows a function E3 for generating an evaluation value γ of the curvature retention length s. There are predetermined S_0 and S_1, and the function E3 is γ = 0 when s ≦ S_0, and γ = when s ≧ S_1. 1 and an intermediate value generate an evaluation value for primary interpolation.
[0025]
Thus, the shape representative points R0, R1, R2,. . . , Rn−1, by performing the above processing, a set of shape representative points {R0, R1, R2,. . . , Rn−1}, and this set is a set having data such as coordinates on the contour line, density gradient vector, and stability at each shape representative point. The above is the process shown in step S12 of FIG.
[0026]
[Rough positioning features]
Subsequently, coarse positioning features are output in step S13. As will be described later, at the time of component positioning, as shown in FIG. 8A, a positive number ε for positioning is prepared, and contour lines are provided on the left and right in the advancing direction of the contour line 30 of the component image to be positioned. Virtual boundary lines 30 ′ and 30 ″ indicated by dotted lines separated by a distance ε from 30 are set. In the region sandwiched between the boundary lines, the work of matching the features of the learned template (learned image) with the contour line 30 is rough. Positioning, speed is given priority over accuracy in coarse positioning.
[0027]
FIG. 6 is a diagram illustrating a state in which coarse positioning features are output from the contour line 20 of the learning image. The rough positioning feature means a feature of the beam_A (BEAM_A) type. That is, this type is a beam composed of two shape representative points A1 and A2 in the set of shape representative points. A beam suitable for rough positioning has high stability at the shape representative points at both ends of the beam, the beam is long, and the angle formed by the concentration gradient vectors U1 and U2 at the shape representative points at both ends of the beam is close to 90 degrees. Say things. Therefore, in this embodiment, λ is the evaluation value of the beam reliability (0 ≦ λ ≦ 1), μ is the evaluation value of the beam length (0 ≦ μ ≦ 1), and ν is the value at both ends of the beam. As an evaluation value (0 ≦ ν ≦ 1) of an angle formed by the concentration gradient vector, the positioning performance f of the beam _A is expressed as f = λμν. Accordingly, the positioning performance f of the beam_A is represented by a real value 0 ≦ f ≦ 1 from the lowest 0 to the highest 1.
[0028]
The reliability evaluation value λ is obtained by λ = MIN {r1, r2}. Here, r1 and r2 are the stability of the shape representative points A1 and A2, respectively. For example, as shown in FIG. 6, when the stability of the point A1 is r1 = 0.8 and the stability of the point A2 is r2 = 0.3, λ = 0.3. The length evaluation value μ is obtained by μ = h / H. Here, h is a distance between the shape representative points A1 and A2, and H is an appropriate positive number as large as the diameter of the part (= maximum distance from end to end). The angle evaluation value ν is obtained by ν = | sin θ |. Here, θ is an opening angle formed by the density gradient vectors U1 and U2 of the shape representative points.
[0029]
With respect to the characteristic beam, a beam having a large positioning performance value is selected. That is, if the f value indicating the positioning performance does not reach a predetermined level for a certain beam, the beam is discarded. As a result, beams of a certain level or more gather, so that stable positioning is guaranteed. There is a required number of coarse positioning features. In the present embodiment, for example, six beams (the number of shape representative points is twelve), but in principle, any arbitrary value of 1 or more may be used. The feature output continues until the required number is reached. In that case, it is important to perform control so that the output value is the one with the largest f value. To do so, follow the steps below.
[0030]
That is, first, all the shape representative points are unused. The “maximum value of f value” is set to 0 before outputting the next feature. Continue to select all unused pairs of points from the shape representative point set, calculate the f-value of the selected set, that is, the beam, and compare it with the maximum value so far. If it is larger, the set is updated as the maximum value. When all the combinations are completed, the group in which the maximum value is recorded is output, and the two shape representative points are used. By the above procedure, the required number of rough positioning features are output.
[0031]
Of course, the total number of combinations of two points selected from a finite set of points is limited, there are unused conditions, and there is an f-value level condition. May be depleted. That is, generally, the number of coarse positioning features finally output is less than the required number.
[0032]
[Features for fine angle correction]
Subsequently, the fine angle correction feature is output in step S14. The feature for fine angle correction refers to a feature of a beam_B (BEAM_B) type in FIG. That is, this die is a beam composed of two shape representative points B1 and B2. A beam that is good for fine angle correction is one in which the shape representative points at both ends of the beam are both highly stable, the beam is long, and the angle between the density gradient vectors V1 and V2 and the straight line B1B2 is close to 90 degrees. Say. Therefore, λ is a beam reliability evaluation value (0 ≦ λ ≦ 1), μ is a beam length evaluation value (0 ≦ μ ≦ 1), and ν is a concentration gradient vector at both ends of the beam. As an angle evaluation value (0 ≦ ν ≦ 1), the positioning performance f of the beam _B is expressed as f = λμν. The f value is represented by a real value 0 ≦ f ≦ 1 from the lowest 0 to the highest 1. λ and μ are obtained by the same evaluation formula as in the case of the coarse positioning feature, while ν is obtained by ν = MIN {| sinθ1 |, | sinθ2 |}. Here, θ1 and θ2 are the opening angles formed by the density gradient vectors V1 and V2 with the vector B1B2, respectively.
[0033]
The output standard and output method of beam_B are the same as those of beam_A. However, the required number of features for fine angle correction was set to 16. Generally, the number of fine angle correction features that are finally output is less than or equal to this required number.
[0034]
[Features for fine correction]
In step S15, the feature for fine magnification correction is output. The feature for fine magnification correction refers to a feature of a beam_C (BEAM_C) type in FIG. That is, this mold is a beam composed of two shape representative points C1 and C2. A beam that is good for fine magnification correction is one in which the shape representative points at both ends of the beam are both highly stable, the beam is long, and the angle formed by the straight line C1C2 is close to 0 degrees in either of the gradient vectors W1 and W2. Say. Therefore, λ is a beam reliability evaluation value (0 ≦ λ ≦ 1), μ is a beam length evaluation value (0 ≦ μ ≦ 1), and ν is a concentration gradient vector at both ends of the beam. As an angle evaluation value (0 ≦ ν ≦ 1), the positioning performance f of the beam _C is expressed as f = λμν. The f value is represented by a real value 0 ≦ f ≦ 1 from the lowest 0 to the highest 1. λ and μ are obtained by the same evaluation formula as in the case of the rough positioning feature, and ν is obtained by ν = MIN {| cos θ1 |, | cos θ2 |}. Here, θ1 and θ2 are opening angles formed by the density gradient vectors W1 and W2 with the vector C1C2, respectively.
[0035]
The output standard and output method of beam_C are the same as those of beam_A. However, the required number of features for fine magnification correction was 10. In general, the number of magnification correction features to be finally output is less than or equal to this required number.
[0036]
As described above, the component learning unit 11 extracts the coarse positioning feature, the fine angle correction feature, and the fine magnification correction feature from the outline of the reference image, and indicates the positioning performance for each feature. Is added, and features with high positioning performance are selected.
[0037]
<Part positioning>
The component positioning is performed by the component positioning unit 12 according to the flow of FIG.
[0038]
In step S20, the image of the component to be positioned, which is sucked by the suction nozzle, is input via the image input unit 13, and the learning data (a set of shape representative points, high positioning performance) obtained by the component learning unit 11 is obtained. Coarse positioning features, angle fine correction features, magnification fine correction features, etc.). Subsequently, a contour line is extracted by the contour line extraction unit 14 from the image of the component to be positioned in step S21. The extracted outline fragment is shown at 30 in FIG.
[0039]
[Coarse positioning]
In the next step S22, rough positioning is performed. For rough positioning, for example, the method described in Japanese Patent Laid-Open No. 2001-251097 can be used, and the rough positioning feature is moved on the contour line 30 while matching the tangent vector (orthogonal vector of the density gradient vector), for rough positioning This is done by checking whether the shape representative points at both ends of the feature are on the contour line 30. For this purpose, the operator sets an allowable positioning width ε, and checks whether each coarse positioning feature has a distance from the contour line of ε or less and is within the range of the virtual boundary lines 30 ′ and 30 ″. In this way, in the rough positioning, the representative shape points 31a at both ends of the feature BEAM_A indicated by reference numeral 31 in FIG. Positioning is performed so that 31b exists on the contour line 30 with an allowable width ε.
[0040]
After the rough positioning, almost all of the shape representative points constituting each rough positioning feature (BEAM_A) are within the ε-band region. Therefore, when accuracy is not required, positioning can be completed only by this rough positioning. However, this situation (parallel movement / angle / magnification) does not indicate that the contour line 20 of the learning image and the contour line 30 of the component image are completely coincident with each other. The magnification still leaves room for fine correction.
[0041]
Therefore, the fine correction is repeated, and the repeat condition of the fine correction is inspected in step S23. In general, the more precise corrections are made, the higher the accuracy becomes. However, it takes much time, so it is necessary to stop at an appropriate place. In this embodiment, the accuracy condition is fixed three times. Of course, as will be described later, the conditions here can be changed according to the purpose of use of positioning.
[0042]
If the learned component-specific coordinate system (reference coordinate system) is the UV coordinate system and the coordinate system of the image of the component to be positioned is the XY coordinate system, the coordinates (u, v) and (x, y) are expressed by the following equations: It is known to be tied together.
[0043]
(X, y) = S · {(a11, a12) (a21, a22)} (u, v) + (Tx, Ty)
However, S is a magnification, {(a11, a12) (a21, a22)} is a 2 × 2 rotation matrix, and (Tx, Ty) is a translation.
[0044]
[Fine correction of translation]
The first fine correction to be repeated is a parallel movement fine correction performed in step S24. In the present embodiment, all the beams, that is, all the beams for coarse positioning, fine angle correction, and fine magnification correction are allowed to participate in the fine correction of translation. This is aimed at the statistical effect obtained when the number is large. In FIG. 8A, a beam (BEAM_A) 31 shows a situation after the end of rough positioning or after several fine corrections, and the coordinates of both ends 31a and 31b of the beam 31 are the current coordinate conversion formulas. The generated coordinates. Each coordinate has outline coordinates, that is, coordinates closest to the outline (indicated by black dots). The vectors from the beam coordinates to the contour line coordinates are represented by e0 and e1.
[0045]
The beam-specific correction vector v is v = e0 when | e0 | ≧ | e1 |, and v = e1 when | e0 | <| e1 |. For example, in the case of FIG. 8A, since e1 is larger, v = e1. When there are a total of N beams participating in the translational fine correction, correction vector sets {v0, v1,. . . , VN−1} is obtained.
[0046]
Let the component parallel movement fine correction vector ΔT be ΔT = Σ (| vi | · vi) / Σ | vi |. Here, the numerator is the N totals (vector) of | vi | · vi, and the denominator is the N totals (scalar) of | vi |. This equation is a weighted average equation based on the magnitude of Vi, and the larger the vi, the larger the ratio of vi to the result. The validity is shown in FIG. 8 (d). FIG. 8D shows N = 3 beams BEAM0, BEAM1, and BEAM2, and beam-specific correction vectors are v0, v1, and v2, respectively. There is a shift in the X direction and a shift in the Y direction, but since the shift in the Y direction is conspicuous, the Y direction must be greatly improved. If a simple arithmetic average (weight = 1) is taken, the Y component of ΔT is approximately v0 / 3, and thus the purpose cannot be achieved. However, in the method of this embodiment, the Y component of ΔT is approximately v0. Therefore, effective fine correction can be performed and the object can be achieved.
[0047]
In this way, in the fine correction of the translation, by setting the translation fine correction vector ΔT of the part to ΔT = Σ (| vi | · vi) / Σ | vi | Accurate corrections can be made.
[0048]
Regarding the translation term of the current coordinate conversion formula, the term obtained by adding ΔT is newly referred to as a translation term.
[0049]
[Fine angle correction]
In step S25, the angle is finely corrected. The angle fine correction beam is used for fine angle correction. In FIG. 8B, a beam (BEAM_B) 32 shows a situation after the end of rough positioning or after the end of several fine corrections. The coordinates of both ends 32a and 32b of the beam 32 are coordinates generated by the current coordinate conversion formula. Each coordinate has a coordinate closest to the contour line (indicated by a black dot). A dotted line indicates the direction of a vector connecting two points on the contour line. If the signed opening angle from the beam to this vector is δ radians, δ is a correction angle unique to this beam. When there are a total of N beams participating in angle fine correction, a set of correction angles {δ0, δ1,. . . , ΔN−1} is obtained.
[0050]
The component angle fine correction ΔΘ is ΔΘ = Σ (| fi | · δi) / Σ | fi |, where fi is the beam positioning performance (0 to 1). Here, the numerator is N sums (radians) of | fi | · δi, and the denominator is N sums (scalar) of | fi |. This equation is a weighted average equation based on the magnitude of fi, and the larger the fi, the larger the proportion of δi in the result. As the beam performance is higher (the f value is larger), the degree of influence becomes stronger, thereby enabling accurate fine correction.
[0051]
Thus, in the fine angle correction, the angle fine correction ΔΘ of the component is ΔΘ = Σ (| fi | · δi) / Σ | fi |, where fi is the beam performance (0 to 1). Accurate corrections can be made.
[0052]
A rotation matrix obtained by multiplying the rotation matrix of the current coordinate transformation formula by a matrix corresponding to ΔΘ from the front is defined as a rotation matrix.
[0053]
[Fine correction of magnification]
Subsequently, in step S26, the magnification is finely corrected. A beam for fine correction of magnification is used for fine correction of magnification. In FIG. 8C, a beam (BEAM_C) 33 shows a situation after the rough positioning is completed or after several fine corrections are completed. The coordinates of both ends 33a and 33b of the beam 33 are coordinates generated by the current coordinate conversion formula. Each coordinate has a coordinate closest to the contour line (indicated by a black dot). Assuming that the length of the beam 33 is d0 and the distance between the outline black points indicated by the dotted line is d1, s = d1 / d0 is a correction magnification specific to this beam. When there are a total of N beams participating in the magnification fine correction, the beam-specific correction magnification set {s0, s1,. . . , SN-1}.
[0054]
The component magnification fine correction ΔS is ΔS = Σ (| fi | · si) / Σ | fi |, where fi is the beam positioning performance (0 to 1). Here, the numerator is N totals (scalar) of | fi | · si, and the denominator is N totals (scalar) of | fi |. This equation is a weighted average equation based on the size of fi, and the larger the fi, the larger the proportion of si in the result. As the beam performance is higher (the f value is larger), the degree of influence becomes stronger, thereby enabling accurate fine correction.
[0055]
In this way, in the fine correction of the magnification, the component fine correction ΔS is ΔS = Σ (| fi | · si) / Σ | fi |, where fi is the beam performance (0 to 1). Accurate corrections can be made.
[0056]
The magnification obtained by multiplying the current coordinate conversion formula by ΔS is set as a new magnification, and then the process returns to step S23.
[0057]
In this way, by repeating the fine correction of the alignment (matching) between the features 31, 32, and 33 and the contour line 30, the alignment between the features and the contour line 30 is completed.
[0058]
<Other embodiments>
In step S12, the coordinates of the shape representative point and the density gradient vector are the coordinates and density gradient vector obtained directly from the outline, respectively. However, the effect is not changed even if the interpolated coordinates and the interpolated density gradient vector are used instead.
[0059]
In addition, although the curvature classification is set to 3 in step S12, the same effect can be obtained even if it is 2 or more, and the function of FIG. 4 is used as the evaluation functions E1, E2, and E3 in step S12. The effect does not change even if the intermediate portion is changed to something other than the primary interpolation taking a value of 0-1.
[0060]
Further, in each of the steps S13 to S15, the beam reliability λ is set to the function λ = MIN {r1, r2} of the stability r1, r2, but it is effective even if other functions, for example, λ = r1 × r2. does not change.
[0061]
In addition, in step S23, the repetition condition for fine correction is fixed three times, but the effect is not changed even if other conditions are used instead. For example, paying attention to the distance between the contour line and each end point of the beam, it may be possible to exit the loop when the maximum distance is within a predetermined distance, or the degree of coincidence between each point of the template and each point of the contour line It is also possible to prepare a function for measuring and to exit the loop when the function value exceeds a predetermined value.
[0062]
In addition, regarding the execution order of the fine corrections in steps S24 to S26, in the embodiment, parallel movement → rotation → magnification is used, but the effect does not change even in an arbitrary order.
[0063]
As for the fine correction, both the angle fine correction and the magnification fine correction are not performed, but only one of them can be performed.
[0064]
【The invention's effect】
As described above, in the present invention, a value indicating the positioning performance is added to the feature used for positioning output from the contour line obtained from the reference image of the component, and the feature having high positioning performance at the time of positioning is added. Since positioning is performed using this, positioning with high accuracy becomes possible.
[0065]
In the present invention, the coarse positioning feature, the fine angle correction feature, and the fine magnification correction feature are extracted as the features used for positioning, and positioning is performed using the coarse positioning feature giving priority to the positioning speed. Therefore, high-speed positioning is possible. If positioning accuracy cannot be obtained with this rough positioning feature alone, fine correction is performed using the fine angle correction feature and / or the fine magnification correction feature, thus improving positioning accuracy. In this case, a value indicating the positioning performance is assigned to each of the rough positioning feature, angle fine correction feature, and magnification fine correction feature, and each feature having high positioning performance is selected. As a result, rough positioning or fine correction is performed, so that the positioning accuracy can be dramatically improved.
[Brief description of the drawings]
FIG. 1 is an overall block diagram showing an embodiment of an apparatus of the present invention.
FIG. 2 is a flowchart schematically showing a flow of parts learning.
FIG. 3 is an explanatory diagram illustrating a principle of extracting shape representative points in a part learning unit.
FIG. 4 is a diagram showing characteristics of an evaluation formula for obtaining the stability of a shape representative point in a part learning unit.
FIG. 5 is an explanatory diagram showing curvature classification in a part learning unit.
FIG. 6 is an explanatory diagram showing types of feature data output from a part learning unit.
FIG. 7 is a flowchart schematically showing a flow of positioning in a component positioning unit.
FIG. 8 is an explanatory diagram showing the principle of various fine corrections in the component positioning unit.
[Explanation of symbols]
10 Control unit
11 Parts learning department
12 Parts positioning part
13 Image input section
14 Outline extraction unit
20 Outline of learning image
30 Contour line of part image to be positioned

Claims (6)

部品の基準画像の輪郭線から特徴を抽出し、該抽出された特徴に基づいて部品の位置決めを行う部品の位置決め方法において、
前記輪郭線から、輪郭線上の点とその点の濃度勾配ベクトルを組とするとき2組からなる1本の梁でなる特徴を抽出し、
前記抽出された特徴に対して位置決め性能を示す値を付加し、
位置決めすべき部品の入力画像から輪郭線を抽出し、
位置決め性能を示す値が大きい特徴と前記入力画像の輪郭線の位置合わせから部品の位置決めを行うことを特徴とする部品の位置決め方法。
In a component positioning method for extracting a feature from the contour line of a reference image of a component and positioning the component based on the extracted feature,
From the contour line, when a point on the contour line and a density gradient vector of the point are paired, a feature composed of two beams is extracted,
A value indicating positioning performance is added to the extracted feature,
Extract the contour line from the input image of the part to be positioned,
A component positioning method comprising positioning a component based on a feature having a large value indicating positioning performance and alignment of a contour line of the input image.
前記特徴は、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして梁の両端の形状代表点での濃度勾配ベクトル同士がなす角度が90度に近い粗い位置決め用特徴であり、そのほかに、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして濃度勾配ベクトルのいずれについても、直線となす角度が90度に近い角度微修正用特徴、および/または、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして濃度勾配ベクトルのいずれについても、直線となす角度が0度に近い倍率微修正用特徴を抽出し、粗い位置決め用特徴に基づいて行われた位置決めを、角度微修正用特徴および/または倍率微修正用特徴により微修正することを特徴とする請求項1に記載の部品の位置決め方法。The above features are features for positioning that the shape representative points at both ends of the beam are both highly stable, the beam is long, and the angle formed by the density gradient vectors at the shape representative points at both ends of the beam is close to 90 degrees . Besides, the stability of the shape representative points at both ends of the beam is both high, the beam is long, and for any of the concentration gradient vectors, an angle fine correction feature whose angle to a straight line is close to 90 degrees , and / or Both the shape representative points at both ends of the beam are highly stable, the beam is long, and for any density gradient vector, a feature for fine magnification correction whose angle to the straight line is close to 0 degrees is extracted to make it a rough positioning feature 2. The component positioning method according to claim 1, wherein the positioning performed based on the angle fine correction feature and / or the magnification fine correction feature is finely corrected. 前記各特徴の位置決め性能は、梁の信頼性、梁の長さ、梁の両端での濃度勾配ベクトルのなす角度に基づいて決定されることを特徴とする請求項に記載の部品の位置決め方法。 3. The component positioning method according to claim 2 , wherein the positioning performance of each feature is determined based on the reliability of the beam, the length of the beam, and the angle formed by the concentration gradient vectors at both ends of the beam. . 部品の基準画像の輪郭線から特徴を抽出し、該抽出された特徴に基づいて部品の位置決めを行う部品の位置決め装置において、
部品の画像から輪郭線を抽出する輪郭線抽出部と、
部品の基準画像の輪郭線から、輪郭線上の点とその点の濃度勾配ベクトルを組とするとき2組からなる1本の梁でなる特徴を抽出し、該抽出された特徴に対して位置決め性能を示す値を付加する手段と、
位置決め性能を示す値が大きい特徴と位置決めすべき部品の画像の輪郭線の位置合わせから部品の位置決めを行う部品位置決め部と、
を有することを特徴とする部品の位置決め装置。
In a component positioning apparatus that extracts a feature from the contour line of a reference image of a component and positions the component based on the extracted feature,
An outline extraction unit for extracting an outline from an image of a part;
When a point on the contour line and a density gradient vector of the point are paired from the contour line of the reference image of the part , a feature composed of two beams is extracted, and positioning performance is obtained with respect to the extracted feature. Means for adding a value indicating
A component positioning unit for positioning the component from the alignment of the feature with a large value indicating the positioning performance and the contour line of the image of the component to be positioned;
An apparatus for positioning a part, comprising:
前記特徴は、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして梁の両端の形状代表点での濃度勾配ベクトル同士がなす角度が90度に近い粗い位置決め用特徴であり、そのほかに、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして濃度勾配ベクトルのいずれについても、直線となす角度が90度に近い角度微修正用特徴、および/または、梁の両端の形状代表点の安定性がともに高く、梁が長く、そして濃度勾配ベクトルのいずれについても、直線となす角度が0度に近い倍率微修正用特徴を抽出し、粗い位置決め用特徴に基づいて行われた位置決めを、角度微修正用特徴および/または倍率微修正用特徴により微修正することを特徴とする請求項に記載の部品の位置決め装置。The above features are features for positioning that the shape representative points at both ends of the beam are both highly stable, the beam is long, and the angle formed by the density gradient vectors at the shape representative points at both ends of the beam is close to 90 degrees . Besides, the stability of the shape representative points at both ends of the beam is both high, the beam is long, and for any of the concentration gradient vectors, an angle fine correction feature whose angle to a straight line is close to 90 degrees , and / or Both the shape representative points at both ends of the beam are highly stable, the beam is long, and for any density gradient vector, a feature for fine magnification correction whose angle to the straight line is close to 0 degrees is extracted to make it a rough positioning feature 5. The component positioning apparatus according to claim 4 , wherein the positioning performed based on the angle fine correction and / or the magnification fine correction feature is finely corrected. 前記各特徴の位置決め性能は、梁の信頼性、梁の長さ、梁の両端での濃度勾配ベクトルのなす角度に基づいて決定されることを特徴とする請求項に記載の部品の位置決め装置。6. The component positioning apparatus according to claim 5 , wherein the positioning performance of each feature is determined based on the reliability of the beam, the length of the beam, and the angle formed by the concentration gradient vectors at both ends of the beam. .
JP2003007740A 2003-01-16 2003-01-16 Component positioning method and apparatus Expired - Fee Related JP4090895B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003007740A JP4090895B2 (en) 2003-01-16 2003-01-16 Component positioning method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003007740A JP4090895B2 (en) 2003-01-16 2003-01-16 Component positioning method and apparatus

Publications (2)

Publication Number Publication Date
JP2004219284A JP2004219284A (en) 2004-08-05
JP4090895B2 true JP4090895B2 (en) 2008-05-28

Family

ID=32897746

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003007740A Expired - Fee Related JP4090895B2 (en) 2003-01-16 2003-01-16 Component positioning method and apparatus

Country Status (1)

Country Link
JP (1) JP4090895B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4943228B2 (en) * 2007-05-22 2012-05-30 Juki株式会社 Image matching processing method
JP5160366B2 (en) * 2008-10-10 2013-03-13 Juki株式会社 Pattern matching method for electronic parts
JP7122524B2 (en) * 2017-12-05 2022-08-22 パナソニックIpマネジメント株式会社 Inspection program generation system, inspection program generation method, and inspection program generation program

Also Published As

Publication number Publication date
JP2004219284A (en) 2004-08-05

Similar Documents

Publication Publication Date Title
CN113706381B (en) Method and device for splicing three-dimensional point cloud data
EP3537375B1 (en) Image segmentation methods, image segmentation system and device comprising same, and storage medium
JP2020526845A (en) Systems and methods for face position adjustment that is robust against posture changes
CN102567970B (en) Image restoring method and device
CN111598087B (en) Irregular character recognition method, device, computer equipment and storage medium
CN101369309A (en) Human ear image normalization method based on active appearance model and outer ear long axis
CN115790401A (en) Displacement measurement method based on visual measurement and related equipment
CN115345946A (en) External parameter calibration method and device of automobile panoramic image system based on deep learning
CN118169661A (en) Laser radar and camera joint calibration method, device, equipment and storage medium
CN115984103A (en) Depth map splicing method and system for sampling CAD model and matching point set
JP4090895B2 (en) Component positioning method and apparatus
KR102178444B1 (en) Apparatus for analyzing microstructure
JP7177280B2 (en) Image recognition device, image recognition method, and image recognition program
US20050053282A1 (en) Apparatus and method for character recognition and program thereof
CN114623832B (en) Method and system for characterization, analysis and judgment of observable ability dimension reduction of autonomous navigation system
JP5949002B2 (en) Image matching method, and image matching apparatus and program using the method
CN113720349A (en) Odometer information smoothing method based on Kalman filtering
CN116540272A (en) Large-scale satellite orbit calculation method based on Newton interpolation formula and Hohner law
JP6441032B2 (en) Corresponding point search device, corresponding point search program, and corresponding point search method
CN110260888B (en) A swing angle measurement method, device and system
CN111156948A (en) Three-dimensional data coordinate correction method and device for 3C glass panel detection
CN114662679B (en) Data processing method based on neural network
JP3930379B2 (en) Measurement data analysis apparatus and analysis method
CN116012430B (en) A method and system for depth map completion guided by weakly aligned RGB-D images
US12020441B2 (en) Device and method for estimating the movement of an image sensor between two images, and associated computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20070202

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070202

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071025

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071030

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071225

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080227

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4090895

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110307

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110307

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120307

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120307

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130307

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130307

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140307

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees