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
JP3759983B2 - Image processing device - Google Patents
[go: Go Back, main page]

JP3759983B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP3759983B2
JP3759983B2 JP27382995A JP27382995A JP3759983B2 JP 3759983 B2 JP3759983 B2 JP 3759983B2 JP 27382995 A JP27382995 A JP 27382995A JP 27382995 A JP27382995 A JP 27382995A JP 3759983 B2 JP3759983 B2 JP 3759983B2
Authority
JP
Japan
Prior art keywords
image processing
point
image
search
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP27382995A
Other languages
Japanese (ja)
Other versions
JPH08180191A (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.)
Fuji Corp
Original Assignee
Fuji Machine Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Machine Manufacturing Co Ltd filed Critical Fuji Machine Manufacturing Co Ltd
Priority to JP27382995A priority Critical patent/JP3759983B2/en
Publication of JPH08180191A publication Critical patent/JPH08180191A/en
Application granted granted Critical
Publication of JP3759983B2 publication Critical patent/JP3759983B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は画像処理装置に関するものであり、特に、撮像装置により撮像した画像を処理する装置に関するものである。
【0002】
【従来の技術】
この種の画像処理装置は、一般に、画像処理対象物を撮像する撮像装置と、その撮像装置により撮像した画像のデータを記憶する画像データ記憶手段と、画像データ記憶手段に記憶された画像データを処理する画像データ処理手段とを含むように構成される。
例えば、撮像装置がCCDカメラにより構成された画像処理装置においては、撮像面を構成する多数の電荷結合素子の各電荷量に基づいて2値化データを得、それにより画像処理対象物のエッジ,サイズ,位置,回転角度等を求めることができる。従来、画像データを処理して画像処理対象物を認識する手法として正規化相関法やベクトル化相関法が知られている。
【0003】
【発明が解決しようとする課題】
本発明は、正規化相関法,ベクトル化相関法とは別の手法によって画像データを処理し得る装置および方法を提供することを課題として為されたものである。
【0004】
【課題を解決するための手段および発明の作用,効果】
上記の課題を解決するために、本発明に係る画像処理装置は以下ように構成され、それによって以下の作用,効果が得られる。
(1)多数の撮像素子が配列されて成る撮像面を備え、画像処理対象物を撮像する撮像装置と、
その撮像装置により撮像された画像のデータを記憶する画像データ記憶手段と、
前記画像処理対象物のエッジを間に挟むとともに、互いに前記撮像装置の前記撮像素子の配列ピッチより大きい一定の距離を隔てて位置する2個の点を一対とし、前記エッジ上の複数の位置に対応して予め設定された複数組のポイントペアを有する捜索テンプレートのデータを記憶する捜索テンプレートデータ記憶手段と、
その捜索テンプレートデータ記憶手段の捜索テンプレートを前記画像データ記憶手段の画像データの表す画像が存在する画面に重ねた場合に、前記複数組のポイントペアを構成する各対の点の光学的特性値の相違状態が設定状態以上である場合には、その対の点の一方が前記画像処理対象物のエッジ内側に位置し、他方は背景内に位置する適合状態にあるとし、前記複数組のポイントペアのうち設定量以上のものが適合状態にあれば、画像処理対象物は捜索テンプレートに適合する捜索対象物であると判定する判定手段と
を含む画像処理装置(請求項1)。
本項の画像処理装置において撮像装置により撮像されるときは、撮像面が多数の画素に分解され、1画素のそれぞれについて画像データが作成されて画像データ記憶手段に記憶される。「画像データの表す画像」とは、画像データに基づいて得られる画像であり、画素を単位とし、光学的特性値が画素毎に得られる画像でもよく、あるいは画素を単位とせず、光学的特性値が任意の点において得られる画像でもよい。
前者の一例は、多数の撮像素子を備え、各撮像素子の受光状態に応じた電気信号を発生させる撮像装置により得られた各撮像素子毎の電気信号の集合として観念される画像であり、画像は撮像素子が配列された撮像面上に物理的に形成された画像であるということができる。その意味でこの画像を物理画像と称し、物理画像が存在する画面(撮像面と一致している)を物理画面と称することとする。物理画像のデータは、各撮像素子毎の電気信号のデータを各撮像素子の位置と関連付けて記憶手段に記憶させることにより保存され、再現され得る。
また、物理画像を表す画像データは実際に存在しており、その意味で物理画像は、後述の仮想画像の対比において実在画像と称することもでき、実在画像が存する画面は実在画面と称することができる。
実在画像を表す画像データは、各撮像素子毎の電気信号の大きさ自体を表すアナログデータあるいはデジタルデータでもよく、例えば256段階の離散値で表される多段階のデジタルデータ(階調データと称する)でもよく、撮像素子毎の電気信号がしきい値を超えるか否かにより2値化された2値化データでもよい。
画素を単位とせず、光学的特性値が任意の点において得られる画像の一例は、上記物理画面の各撮像素子の電気信号のデータが各撮像素子の中央の点の光学的特性値を表すと見なし、それら多数の点の光学的特性値を満たす曲面を想定した場合に、その曲面を規定する連続的な光学的特性値の集合として観念される画像である。この画像の画像データは例えば上記曲面を表す式のデータとして保存することも可能であり、この画像データも実在画像の一種であることになる。
それに対して、上記曲面のデータを予め求めておく代わりに、画面上の任意の点が指定された場合に、その点のみの光学的特性値を各点が指定される毎に演算によって求めることも可能である。この場合には画像は実際には存在せず、存在すると仮想されているに過ぎないため、仮想画像と称し、仮想画像が存在する画面を仮想画面と称することとする。
捜索テンプレートデータは、ポイントペアを構成する2個の点の画面上における位置を規定するデータであり、「捜索テンプレートを画像データの表す画像が存在する画面に重ねる」とは、画面が物理画面の場合、捜索テンプレートデータにより指定された各位置に ある画素の画像データを画像データ記憶手段から読み出して光学的特性値を得ることであり、画面が仮想画面である場合は、捜索テンプレートを仮想画面上に置いたと想定し、捜索テンプレートデータにより指定される仮想画面上の各点の光学的特性値を物理画像のデータから演算で求めることである。この場合の物理画像データは、各撮像素子毎の電気信号の大きさ自体を表すアナログデータあるいはデジタルデータか、階調データであることが必要であり、2値化データでは意味がない。
いずれにしても、画像処理対象物に対応する画像データと背景に対応する画像データとの間には相違がある。逆に言えば、背景との間に相違がある場合でなければ、画像処理により画像処理対象物に関する情報を取得することができない。
そのため、ポイントペアの一方の点が画像処理対象物のエッジ内側に位置し、他方の点が背景内にあれば、換言すれば、ポイントペアの一方の点に対応する画像データが画像処理対象物を表すデータであり、他方の点に対応するデータが背景を表すデータであれば、ポイントペアを構成する2個の点の光学的特性値の相違状態が設定状態以上になるはずであり、相違状態が設定状態以上ではないポイントペアの組の数(または率)が予め定められた設定数(または設定率)以下である場合には、その画像処理対象物が捜索対象物であると判定することができる。また、そのようなポイントペアの組を探すことにより、画面上において画像処理対象物の像を探すことができる。
「光学的特性値」とは、例えば、輝度,色相等であり、「設定状態以上」とは、輝度や色相等の差が設定値以上であることや、輝度や色相等の比率が設定値以上であること等である。
捜索テンプレートを物理画面に重ねて光学的特性値を求める場合、画像データはアナログデータや階調データ(以下、階調データ等と称する)でもよく、2値化データでもよい。階調データ等であれば、ポイントペアの2個の点の一方の値と他方の点の値との差が設定値以上であること、あるいは両値の比率が設定比率以上であることが光学特性値の相違状態が設定状態以上であることになる。2値化データであれば、ポイントペアの2個の点の一方の値が0であり、他方の値が1であれば光学的特性値の相違状態が設定状態以上であることになる。
画像処理対象物の位置がほぼ一定である場合には、捜索テンプレートは一定の位置で画面に重ね合わされればよいが、画像処理対象物の位置と回転角度との少なくとも一方が不定である場合には、判定手段は、捜索テンプレートの位置と回転角度との少なくとも一方を、判定結果が肯定になるか、予め定められた変更限度に達するまで変更しつつ判定を繰り返すものとされる。捜索テンプレートが変更される場合、位置や回転角度の異なる複数の捜索テンプレートが予め準備されても、標準位置および標準回転角度の標準捜索テンプレートのみが準備され、一般的な位置や回転角度の捜索テンプレートは必要に応じて座標変換により作成されてもよい。「変更限度」とは、例えば、画像処理対象物を捜す捜索領域が設定されている場合に、それ以上捜索テンプレートの位置を変更すれば捜索テンプレートが捜索領域からはみ出してしまう位置に達したことや、捜索テンプレートの位置が予め定められている回数変更されたこと等である。
なお、発明に係る画像処理装置の好適な利用分野の一つは電子回路組立ラインである。例えば、電子部品装着装置においては、プリント基板等の装着対象材に装着される電子部品やプリント基板に設けられた基準マークが画像処理対象物とされ、スクリーン印刷機においては、スクリーンに設けられた基準マーク等が画像処理対象物とされる。また、画像処理対象物は、物全体の輪郭に限らず、部分が画像処理対象物にされることもある。例えば、角形のチップではチップそのものが画像処理対象物であるが、リードや半田バンプ等を有する電子部品においては、それらリードや半田バンプ等を有する本体が画像処理対象物とされる他、1本のリードや1個の半田バンプが画像処理対象物とされることもある。本体の輪郭の外側に位置するリード等は勿論、内側に位置するリード,半田バンプ等、他の部材の輪郭の内側に位置する物が画像処理対象物とされることもあるのである。後者の場合、捜索テンプレートは、物全体の輪郭の内側に位置する物の輪郭を捜索対象として作成されるとともに、物理画面上あるいは仮想画面上において、物全体の輪郭の画像の内側 であって、内側に位置する物の物理画像あるいは仮想画像の形成が予定される位置に重ねられ、画像処理対象物が捜索される。
以上の説明から明らかなように、本項の発明によれば、画像データおよび捜索テンプレートを用いて捜索対象物の有無や画像処理対象物が捜索対象物であるか否かを知ることができる。ポイントペアを構成する2個の点の光学的特性値の算出,比較をポイントペアの数だけ行うことにより判定することができ、処理を容易にかつ迅速に行うことができる画像処理装置が得られる。
(2)さらに、位置ずれのない前記画像処理対象物の前記エッジに対して設定されたマスタ捜索テンプレートの回転角度と位置との少なくとも一方を変更して前記捜索テンプレートを生成させ、前記捜索テンプレートデータ記憶手段に記憶させる捜索テンプレート生成手段と、
その捜索テンプレート生成手段による捜索テンプレートの生成および前記判定手段による判定を、その判定手段の判定結果が肯定となるまで繰り返させる繰返し手段と
を含む (1) 項に記載の画像処理装置(請求項2)。
(3)さらに、前記捜索テンプレートの前記複数組のポイントペアを構成する2点ずつを結ぶ複数本の直線を複数本のシークラインとして含む再捜索テンプレートを生成させる手段と、
その生成させられた再捜索テンプレートの前記複数本のシークラインと前記画像対象物のエッジとの交点の座標を演算することにより前記捜索対象物を再捜索する手段と
を含む (1) 項または (2) 項に記載の画像処理装置(請求項3)。
捜索テンプレートの複数組のポイントペアを構成する2点によりシークラインの両端を規定して再捜索テンプレートを設定すれば、再捜索テンプレートの設定が容易になる。この場合の捜索テンプレートは、画像処理対象物が捜索テンプレートに適合する捜索対象物であると判定した捜索テンプレートであり、設定量以上のポイントペアが適合状態にあるため、画像処理対象物に位置ずれや回転角度ずれ等があっても、設定量以上のシークラインについてエッジ点の演算を行い得ることが保証されるのである。
(4)さらに、前記判定手段の判定結果が肯定となった捜索テンプレートに基づいて、前記画像処理対象物のエッジを挟むとともに、互いに前記撮像装置の前記撮像素子の配列ピッチより大きい一定の距離を隔てて位置する2個の点を直線状に結んで成るシークラインを複数本、前記エッジ上の複数の位置に対応して有する測定テンプレートを生成させる測定テンプレート生成手段と、
その測定テンプレート生成手段により生成させられた前記測定テンプレートのデータである測定テンプレートデータを記憶する測定テンプレートデータ記憶手段と、
その測定テンプレートデータ記憶手段の測定テンプレートを前記画像データ記憶手段の画像データの表す画像が存在する画面に重ね、前記複数本のシークラインの各々の上における前記画像処理対象物のエッジ点の座標を演算するエッジ点座標演算手段と
を含む (1) 項ないし (3) 項のいずれかに記載の画像処理装置(請求項4)。
上記「画像データの表す画像が存在する画面」も、 (1) 項の発明に係る画像処理装置におけると同様に、物理画面ないし実在画面であっても、仮想画面であってもよい。
「測定テンプレートを画面に重ね、」とは、例えば、物理画面上において測定テンプレートデータにより指定される画素に対応する画像データを画像記憶装置から読み出すことであり、あるいは仮想画面上にシークラインにより指定される点の画像データ(光学的特性値)を物理画面の画像データに基づいて演算することである。
画像処理対象物と背景とでは光学的特性値に差があるため、エッジ点位置において光学的特性値の変化勾配が最大になる。したがって、物理画面上で画素毎に得られる光学的特性値の変化を求めることにより、また、仮想画面上で光学的特性値の変化勾配を求めることによりエッジ点を決定することができる。
物理画面上においてはエッジ点が画素単位で求められるが、仮想画面上においてはシークライン上の任意の点においてエッジ点が求められ、画像処理の分解能が高くなる。
本項の発明によれば、捜索対象物の捜索とエッジ点の座標の演算との両方が行われる画 像処理装置が得られる。そのため、例えば、画像処理対象物のうち、捜索対象物であると判定された物についてのみエッジ点を演算することができ、画像処理対象物にエッジ点を演算すべき対象物とは異なる物が混じっている場合、全部の画像処理対象物について演算を行わずに済み、画像処理速度の低下を回避することができる。
捜索テンプレートの複数組のポイントペアを構成する2点によりシークラインの両端を規定して測定テンプレートを設定すれば、測定テンプレートの設定が容易になる。この場合の捜索テンプレートは、画像処理対象物が捜索テンプレートに適合する捜索対象物であると判定した捜索テンプレートであり、設定量以上のポイントペアが適合状態にあるため、画像処理対象物に位置ずれや回転角度ずれ等があっても、設定量以上のシークラインについてエッジ点の演算を行い得ることが保証されるのである。
しかしながら、シークラインをポイントペアを構成する2個の点により規定することは不可欠ではなく、ポイントペアとは別に設定してもよく、シークラインの数はポイントペアの数と同じでなくてもよい。
本項の発明によれば、画像処理対象物のエッジ点を得ることができる。それにより、例えば、画像処理対象物の形状が予め判っている場合には、比較的少ないシークラインの設定で画像処理対象物のサイズ,位置,回転角度等を算出することができる。また、画像処理対象物の形状が予め判っていなくても、シークラインの数を多くし、多数のエッジ点が得られるようにすれば、エッジ点の集合から形状を求め、サイズ,位置,回転角度等を求めることが可能である。
(5)さらに、前記エッジ点座標演算手段により演算された複数のエッジ点座標に基づいて画像処理対象物が捜索対象物であることを確認する確認手段を含み、かつ、その確認手段が、前記シークライン上における前記画像処理対象物のエッジ点とシークラインの中点とのずれに基づいて前記確認を行う中点基準型確認手段を含む (4) 項に記載の画像処理装置(請求項5)。
本項の発明に係る画像処理装置においては、画像処理対象物が捜索対象物であることが確認される。例えば、画像処理対象物が複数種類あり、判定手段による判定のみでは画像処理対象物が捜索対象物である可能性があることが判るのみで、本当に捜索対象物であるか否かが判らない場合に、確認手段によって、エッジ点座標演算手段によるエッジ点の演算結果に基づいて画像対象物が本当に捜索対象物であることが確認されるのである。
その確認は、シークライン上における画像処理対象物のエッジ点とシークラインの中点とのずれに基づいて行われる。例えば、捜索対象物が長方形のチップである場合に、互に平行な2辺についてそれぞれ同じ長さのシークラインを同数設定し、これらシークラインの位置を、もし捜索対象物と測定テンプレートとの間にずれがなければ全てのシークラインの中点と捜索対象物のエッジ点とが合致する位置に決定しておけば、画像処理対象物が測定テンプレートに対してずれている場合でも、画像処理対象物のエッジ点とシークラインの中点との方向性を考慮したずれの総和が0であれば、その画像処理対象物は捜索対象物であると確認することができるのである。
本項の発明によれば、画像処理対象物が捜索対象物であるか否かを確認することができ、捜索テンプレートのみによる判定に比較して判定の信頼性が向上する効果が得られる。また、判定後にさらに別の画像処理が行われる場合には、捜索対象物ではないものについて無駄に処理が行われることを回避し得る。
(6)さらに、前記エッジ点座標演算手段により演算された複数のエッジ点座標に基づいて画像処理対象物のサイズ,位置および回転角度の少なくとも1つを演算する対象物演算手段を含み、かつ、その対象物演算手段が、前記シークライン上における前記画像処理対象物のエッジ点とシークラインの中点との距離に基づいて画像処理対象物の前記サイズ,位置および回転角度の少なくとも1つを演算する中点基準型対象物演算手段を含む
(4) 項または (5) 項に記載の画像処理装置(請求項6)。
本項の発明に係る画像処理装置においては、画像処理対象物のサイズ,位置および回転角度の少なくとも1つがエッジ点座標に基づいて演算される。サイズ,位置および回転角度のうち必要なものが演算されるのである。この演算は、シークライン上における画像処 理対象物のエッジ点とシークラインとの中点の距離に基づいて行われる。
エッジ点の座標の数が画像処理対象物の形状を特定できるほど多数あれば、エッジ点の座標のみで画像処理対象物のサイズ,位置および回転角度のいずれも演算することができる。エッジ点の座標の数が少ない場合でも、例えば、画像処理対象物の種類を示すデータ等の補助データの使用により、画像処理対象物のサイズ等を演算することができ、また、画像処理対象物の形状が、例えば矩形,円というように、1種類に決まっている場合には補助データがなくても画像処理対象物のサイズ等を演算することができる。
本項の発明によれば、画像処理対象物のサイズ,位置および回転角度の少なくとも1つが判る。その結果、例えば、形状は同じであってもサイズが異なる画像処理対象物の識別,画像処理対象物の位置決めの合否判定や位置ずれ修正量の演算,回転角度決めの合否判定や回転角度ずれ修正量の演算等を行うことができる。
しかも、画像処理対象物のサイズ等が画像処理対象物のエッジ点とシークラインの中点との距離に基づいて演算されるため、演算に用いられる値が平均的に小さくて済み、誤差が小さくなって精度の良い演算結果が得られる。
(7)さらに、前記複数本のシークラインを、それらシークライン上におけるエッジ点予定位置が前記エッジ点座標演算手段により演算されたエッジ点と一致すると予想される位置に自動で設定するシークライン自動設定手段と、
そのシークライン自動設定手段によるシークラインの自動設定と、その自動設定されたシークライン上における前記エッジ点座標演算手段によるエッジ点座標の演算とを複数回繰り返させる繰返し手段と
を含む (4) 項ないし (6) 項のいずれかに記載の画像処理装置(請求項7)。
本項の発明に係る画像処理装置においては、シークライン自動設定手段によりシークラインが自動で設定される。その最も単純な一例は、判定手段およびエッジ点座標演算手段を有する画像処理装置において、画像処理対象物が捜索テンプレートに適合する捜索対象物であると判定された捜索テンプレートのポイントペアを構成する2個の点を結ぶ直線が自動的にシークラインとされる場合である。
また、エッジ点座標演算手段により演算されたエッジ点の座標に基づいてシークラインを自動的に設定し、これを第二の測定テンプレートとして更にエッジ点を演算することも可能である。第二の測定テンプレートのシークラインの本数を、第一の測定テンプレートのシークラインの本数より多く設定すれば、エッジ点の座標がより正確かつ多数になり、サイズ,位置,回転角度等が一層正確に測定される。
このように、2回目以降のシークラインの自動設定時に、直前に演算されたエッジ点の座標に基づいて、シークライン上のエッジ点予定位置(例えば中点)が実際のエッジ点位置と一致すると予想される位置にシークラインが自動で設定されれば、演算回数が多いほど、シークライン上のエッジ点予定位置と画像処理対象物の実際のエッジ点との誤差が小さくなり、エッジ点の座標を精度良く得ることができる。
本項の発明によれば、シークラインがシークライン自動設定手段により自動的に設定されるため、画像処理装置のユーザの所要作業量が少なくて済む効果得られる。また、画像処理対象物のエッジ点の座標をより精度良く演算し得る画像処理装置が得られる。
(8)前記撮像装置が前記多数の撮像素子の各々の受光状態に応じた電気信号を発生させるものであり、前記画像データ記憶手段が、それら各撮像素子の電気信号のデータを、各撮像素子の位置と関連付けて記憶するものであって、かつ、当該画像処理装置が、
さらに、画像データ記憶手段の画像データにより形成される物理画面に対応して想定される仮想画面上の任意の点を指定する点指定手段と、
その点指定手段による点指定毎に前記物理画面上の光学的特性値のデータに基づいて指定された点の光学的特性値を演算する仮想点データ演算手段と
を含む (4) 項ないし (7) 項のいずれかに記載の画像処理装置(請求項8)。
本項の発明に係る画像処理装置においては、仮想画面上の任意の点の光学的特性値が、点指定手段によって点が指定される毎に演算される。仮想画面は無数の点の集合であるが、そのうち点指定手段により指定された必要な点のみの光学的特性値が演算されるのであ る。
このように、点指定手段によって点が指定される毎に光学的特性値が演算され、必要な点についてのみ演算が行われるため、画像処理全体に要する時間が少なくて済む効果が得られる。また、演算された光学的特性値を記憶する光学的特性値記憶手段の記憶容量も小さくて済む。
(9)前記点指定手段が、前記シークライン上に前記撮像素子の配列ピッチより小さいピッチで設定された複数の分割点の一つを前記任意の点として指定するものであり、前記仮想点データ演算手段が、その指定された分割点の光学的特性値を取得する分割点特性値取得手段を含み、当該画像処理装置が、その分割点特性値取得手段により取得された分割点の光学的特性値に基づいてシークライン上における光学的特性値の最も急激な変化点をエッジ点として捜索するエッジ点捜索手段を含む (8) 項に記載の画像処理装置(請求項9)。
本項の発明に係る画像処理装置においては、シークラインが重ねられる画面が物理画面である場合、分割点の光学的特性値は、分割点の位置に対応する画素の画像データを画像データ記憶手段から読み出すことにより取得され、それら光学的特性値に基づいてエッジ点が捜索される。エッジ点は画素単位で捜索される。
シークラインが重ねられる画面が仮想画面である場合、分割点は仮想画面上において物理画面の画素の大きさとは無関係に設定することができ、分割点の光学的特性値は物理画面上の光学的特性値のデータ(画像データ)に基づいて演算される。
本項の発明によれば、エッジ点の捜索がシークライン上においてのみ行われ、しかも、限られた数の分割点における光学的特性値に基づいてエッジ点が決定されるため、容易にかつ迅速にエッジ点を決定することができる。また、仮想画面上の分割点が撮像素子のピッチより小さいピッチで設定され、光学的特性値が物理画面上の光学的特性値のデータに基づいて演算される。シークライン上において光学的特性値の変化がより細かいピッチで捜索され、画像処理の分解能が高くなる。
(10)さらに、入力装置と、
モニタ装置と、
前記入力装置の入力に関連した入力関連データを前記モニタ装置に表示させる入力関連データ表示手段と、
当該画像処理装置による画像処理の経過や結果等の画像処理データを前記モニタ装置に表示させる画像処理データ表示手段と、
前記入力関連データ表示手段による表示を前記画像処理データ表示手段による表示に優先して行わせる入力関連データ優先表示手段と
を含む (1) 項ないし (9) 項のいずれかに記載の画像処理装置(請求項10)。
本項の発明に係る画像処理装置においては、入力関連データの表示手段と画像処理データの表示手段とが兼用され、同時に両データの表示が必要になった場合には入力関連データの表示が優先される。
「入力関連データ」とは、入力装置により入力されたデータそのものに限らず、入力されたデータに基づいて演算が行われることにより得られるデータや、記憶手段から読み出されるデータ等、データの入力に応じて得られるデータを含む。この入力関連データや画像処理データがモニタ装置に表示されることにより、作業者はデータ入力が正確に行われたか否かや画像処理の経過や結果を知ることができ、それに基づいてデータの修正等を行うことができる。
本項の発明によれば、1台のモニタ装置を用いて入力関連データと画像処理データとの両方を表示することができ、構成が簡易で安価な画像処理装置が得られる。しかも、入力関連データの表示が優先されるため、画像処理の表示によりデータ入力が妨げられることがない。
(11)前記撮像装置が、プリント基板に装着されて電子回路板を構成する電子部品、プリント基板に設けられた基準マークおよびスクリーン印刷機のスクリーンに設けられた基準マークの少なくとも一つのうちの予め定められたものを前記画像処理対象物として撮像 するものであり、前記捜索テンプレートデータ記憶手段が、その予め定められたもののエッジに対して予め設定された前記捜索テンプレートを記憶するものであり、前記判定手段が、前記撮像装置により撮像された前記画像処理対象物が前記予め定められたものであることを判定するものである (1) 項ないし (10) 項のいずれかに記載の画像処理装置。
プリント基板に装着されて電子回路板を構成する電子部品、プリント基板に設けられた基準マークおよびスクリーン印刷機のスクリーンに設けられた基準マーク等のうちの予め定められたものを捜索対象物とする場合には、それらの形状,寸法が予め判っているため、捜索テンプレート,再捜索テンプレート,測定テンプレート等の生成,設定が容易であり、また、きわめて短時間に捜索対象物の捜索や位置等の検出を行うことが要求されるため、これらは本発明の適用対象として非常に適している。
(12)前記エッジ点座標演算手段が、前記画像データ記憶手段に記憶された画像データに基づいて前記シークライン上における画像データの変化勾配の絶対値が最も大きい点を前記エッジ点としてその点の座標を演算するものである (4) 項ないし (9) 項のいずれかに記載の画像処理装置。
画像データとしては、画像各部の光学的特性値、例えば輝度値のデータを使用することができる。エッジ点においては、通常この光学的特性値の変化勾配の絶対値が最大となる。
(13)前記エッジ点座標演算手段が、前記シークライン上における画像データの変化勾配の絶対値が設定値以下である場合には、そのシークラインについてはエッジ点が検出できないフェールが発生したとして、前記エッジ点の座標の演算が行われないようにするフェール処理手段を含む (12) 項に記載の画像処理装置。
例えば、輝度値が周辺より大きい画像処理対象物のエッジ点近傍に汚れが付着し、あるいは欠損が存在する場合には、そのエッジ点近傍部の輝度値が低下して背景の輝度値との差が小さくなる。このような場合にも、シークライン上における画像データの変化勾配の絶対値が最も大きい点がエッジ点とされれば、画像処理対象物の通常表面と汚れあるいは欠損部との境界が誤ってエッジ点とされてしまう可能性がある。本態様はこのような不都合の発生を回避する上で有効である。
(14)さらに、
前記エッジ点座標演算手段により演算された複数のエッジ点座標に基づいて画像処理対象物のサイズ,位置および回転角度の少なくとも1つを演算する対象物演算手段と、
前記フェールが発生したシークラインの数が設定数より小さい場合には前記対象物演算手段に前記サイズ,位置および回転角度の少なくとも1つの演算を行わせ、フェールが発生したシークラインの数が設定数以上である場合には対象物演算手段による前記サイズ,位置および回転角度の少なくとも1つの演算を行わせない対象物演算手段制御手段と
を含む (13) 項に記載の画像処理装置。
(15)前記対象物演算手段が、前記エッジ点座標演算手段によりエッジ点の座標演算が行われたシークライン上における実際のエッジ点の座標である実エッジ点座標と、そのエッジ点の目標位置である目標エッジ点座標とのずれの集合に基づいて、前記画像処理対象物の代表点の位置を目標代表点位置からのずれの方向および量として演算する画像処理対象物位置ずれ演算手段を含む (14) 項に記載の画像処理装置。
画像処理対象物の代表点の位置の、目標代表点位置からのずれの方向および量の演算は、複数のシークラインにフェールが生じたか否か、またどのシークラインにフェールが生じたかを考慮して行われる。
(16)前記対象物演算手段が、前記画像処理対象物のサイズを演算するサイズ演算手段と、そのサイズ演算手段により演算されたサイズと正規サイズとの比率であるサイズファクタを演算するサイズファクタ演算手段とを含み、かつ、前記画像処理対象物位置ずれ演算手段が、前記サイズファクタ演算手段により演算されたサイズファクタと、正規寸法の画像処理対象物の前記シークライン上における正規エッジ点の座標である正規エッジ点座標とに基づいて前記目標エッジ点座標を演算する目標エッジ点座標演算手段を含む (15) 項に記載の画像処理装置。
(17)前記サイズファクタ演算手段が、画像処理対象物の画像の互いに異なる複数方向における実際の寸法と正規寸法との比率の単純平均値をサイズファクタとして取得する単数サイズファクタ取得手段を含む (16) 項に記載の画像処理装置。
(18)前記サイズファクタ演算手段が、前記画像処理対象物の画像の互いに異なる複数方向における実際の寸法と正規寸法との比率を個別に演算して複数のサイズファクタを取得する複数サイズファクタ取得手段を含む (16) 項または (17) 項に記載の画像処理装置。
(19)前記判定手段が、画像処理対象物が捜索テンプレートに適合する捜索対象物であると判定するまで、位置と回転角度との少なくとも一方を異にする複数種類の前記捜索テンプレートについて前記判定を行うものである (1) 項ないし (18) 項のいずれかに記載の画像処理装置。
(20)前記判定手段が、画像処理対象物が捜索テンプレートに適合する捜索対象物であると判定するまで、位置と回転角度との少なくとも一方を異にする複数種類の前記捜索テンプレートについて前記判定を行うものであり、かつ、当該画像処理装置が、前記複数種類の捜索テンプレートのうち、前記判定手段により画像処理対象物が捜索テンプレートに適合する捜索対象物であると判定された捜索テンプレートの各対のポイントペアを直線的につなぐことにより前記シークラインを設定する第一シークライン設定手段を含む (1) 項ないし (19) 項のいずれかに記載の画像処理装置。
(21)さらに前記エッジ点座標演算手段により演算されたエッジ点座標に基づいて前記シークラインを設定する第二シークライン設定手段を含み、エッジ点座標演算手段がその第二シークライン設定手段により設定されたシークラインについて再び前記エッジ点の演算を行う (20) 項に記載の画像処理装置。
(22)前記第二シークライン設定手段が、前記エッジ点座標演算手段により演算されたエッジ点座標と、予め設定されているマスタ測定テンプレートのデータとに基づいて、前記第一シークライン設定手段により設定されるシークラインの本数より多い本数のシークラインを設定するものである (21) 項に記載の画像処理装置。
(23) (1) 項ないし (22) 項のいずれかに記載の画像処理装置が、間欠回転する間欠回転体の、それの間欠回転角度と同じ角度間隔の複数部に係合させられてそれぞれ複数の位置に順次間欠移動させられる電子部品保持具を備え、その電子部品保持具に保持した電子部品を前記複数の位置の1つである始点から別の1つである終点に搬送する電子部品搬送装置に設けられ、前記始点と前記終点との間の途中点に前記撮像装置が配置されて前記電子部品保持具に保持された電子部品の像を撮像するものであり、前記画像データ記憶手段が、前記途中点から前記終点までの前記電子部品保持具の間欠移動回数と同じ回数以下の複数回の撮像によって得られた画像処理対象物の画像データをそれぞれ記憶する画像データメモリを含み、かつ、前記画像処理装置が、少なくとも撮像された各電子部品が前記終点に到達するまでに、各電子部品に対応する画像データの処理を完了する電子部品搬送装置。
この構成の電子部品搬送装置においては、画像処理に長時間を要する画像処理対象物と短時間で済む画像処理対象物とを混合して搬送する場合に、画像処理装置が、処理時間が短くて済むものの余った時間を利用して長い処理時間を要するものの処理を行うことができ、間欠回転体の1回の間欠回転時間(停止時間と回転時間との和)を短縮することができる。
(24)前記始点が、前記電子部品保持具が前記電子部品を部品供給装置から受け取る受取位置であり、前記終点が、前記電子部品保持具が前記電子部品を装着対象物に装着する装着位置である (23) 項に記載の電子部品搬送装置。
【0048】
【発明の実施の形態】
以下、本発明の一実施例である電子部品装着装置の画像処理装置を図面に基づいて詳細に説明する。
図1および図2において10はベッドであり、ベッド10上には一対の支持壁12が立設されている。支持壁12はプリント基板搬送方向であるX軸方向に距離を隔てた位置に、水平面内においてX軸と直交するY軸方向(図2において左右方向)に平行に設けられている。これら支持壁12は、その上端においてカムボックス14を支持しており、また、支持壁12の装置前端側には前壁16が設けられ、開閉可能なカバー17と共同して装置を覆っている。図2は手前側の支持壁を除去した状態を示している。
【0049】
上記一対の支持壁12の上下方向の中間部には、台板18がX軸方向に平行に掛け渡されている。前記カムボックス14には、図3に示すように円筒カム20が固定され、カムボックス14および円筒カム20によって回転軸22が軸受24,26により垂直軸線まわりに回転可能かつ軸方向に移動不能に支持されている。この回転軸22の上端部はカムボックス14の底壁28の上方へ突出させられるとともに、その突出端部に設けられた大径の円板部30には複数のローラ32が垂直軸線まわりに回転可能に取り付けられ、バレルカム34の溝36に順次係合させられるようになっている。
【0050】
また、回転軸22の下端部は円筒カム20から突出させられ、大径の嵌合部40が形成されるとともに、インデックステーブル42の嵌合穴44に嵌合されている。このインデックステーブル42は台板18により軸受46,48を介して垂直軸線まわりに回転可能かつ軸方向に移動不能に支持されており、また、嵌合部40に下方に延び出す向きに設けられたピン50とピン穴52とにおいて係合させられ、回転軸22の回転が伝達されるようになっている。したがって、バレルカム34が図示しないモータにより回転させられ、その回転に伴って複数のローラ32が順次溝36に係合し、回転軸22が回転させられるとき、インデックステーブル42が一定角度ずつ間欠回転させられる。
【0051】
インデックステーブル42には、その回転軸線を中心とする一円周上に20組の部品装着ヘッド56(図3には2組のみ示されている)が等角度間隔に取り付けられており、図4に示すように、部品吸着位置,部品姿勢検出位置,部品姿勢修正位置,部品装着位置,ノズル戻し位置等、20個の作業位置が設けられている。部品装着ヘッド56はインデックステーブル42の間欠回転により、20個の作業位置へ順次移動させられる。
【0052】
部品装着ヘッド56は、一対のガイドロッド58(図3には一方のみ示されている)においてインデックステーブル42に上下方向に摺動可能に嵌合されている。一対のガイドロッド58の下端部は支持部材60に固定されており、その支持部材60にヘッド本体62が支持されているのである。一対のガイドロッド58の上端部は連結板64により連結されるとともに、連結板64にはローラ66がインデックステーブル42の半径方向に延びる軸線まわりに回転可能に取り付けられ、円筒カム20の外周面に形成された溝68に係合させられている。溝68は、図2に示すように高さが周方向において漸変させられたものであり、インデックステーブル42が回転させられるとき、部品装着ヘッド56が最も高い部品吸着位置と最も低い部品装着位置との間で昇降させられる。
【0053】
支持部材60にはまた、インデックステーブル42に上下方向に形成された嵌合穴70に気密にかつ軸方向に移動可能に嵌合された管72の下端部が固定されている。嵌合穴70は、インデックステーブル42に形成された通路74,回転軸22に形成された通路76,円筒カム20に形成されたポート78および図示しないホースにより負圧源に接続されており、管72から部品装着ヘッド56に負圧が供給されるとともに、部品装着ヘッド56の昇降時にも管72の昇降により負圧供給状態が維持されるようになっている。
【0054】
上記ヘッド本体62には、吸着ノズル80がそれ自身の軸線のまわりに回転可能かつ軸方向に移動可能に嵌合されている。吸着ノズル80は前記管72等を経て供給されるバキュームによって電子部品82を吸着するものであり、スプリング84によってヘッド本体62に対して上方へ付勢されており、部品吸着位置および部品装着位置にそれぞれ設けられた押下装置86の押下部材88により押し下げられて電子部品82の吸着およびプリント基板90(図2参照)への装着を行う。
【0055】
前記部品吸着位置には、図2に示すように電子部品供給装置100が設けられている。電子部品供給装置100は、インデックステーブル42の回転軌跡に接し、X軸に平行な方向に延びる直線に沿って移動可能に設けられた移動台102と、その移動台102上に、移動台102の移動方向に並べられた複数の部品供給カートリッジ104とを有し、移動台102が移動台移動装置(図示省略)によって移動させられることにより、複数の部品供給カートリッジ104のうちの1つが部品供給位置へ移動させられる。
【0056】
部品供給カートリッジ104は、電子部品82を部品保持テープに保持させ、テープ化電子部品として供給するものであり、エアシリンダを駆動源とするテープ送り装置により部品保持テープが水平面内においてX軸方向と直交するY軸方向に送られ、部品保持テープの部品収容凹部を覆うカバーフィルムを剥がされた少なくとも1個の電子部品82のうち、先頭の電子部品82が電子部品取出位置に位置決めされる。
【0057】
前記部品装着位置には、図2に示すように装着対象材としての前記プリント基板90を支持してX軸方向およびY軸方向に移動させるプリント基板移動装置108が基板コンベア109(図1参照)より下方に設けられている。プリント基板移動装置108のX軸テーブル110は、X軸サーボモータ112,図示しないボールねじおよびナット等により構成されるX軸移動装置114により、ガイドレール116に案内されてX軸方向に移動させられる。
【0058】
X軸テーブル110上には、Y軸テーブル118がY軸方向に移動可能に搭載され、図示しないY軸サーボモータ,ボールねじ120およびナット(図示省略)等により構成されるY軸移動装置122により、ガイドレール124に案内されてY軸方向に移動させられる。Y軸テーブル118上には、図示は省略するが、プリント基板90を基板コンベア109から受け取り、基板押さえ部材と基板支持部材とによってプリント基板90を上下から挟んで支持するとともに昇降する基板支持昇降装置が設けられている。基板コンベア126は、プリント基板90をX軸方向に搬送するものであり、基板支持昇降装置により支持されたプリント基板90は、X軸テーブル110とY軸テーブル118との移動の組合わせにより、基板コンベア109より下の位置で水平面内において任意の位置に移動させられる。
【0059】
プリント基板90には、対角線上に隔たった2個所にそれぞれ基準マークが設けられており、ベッド10上に設けられたCCDカメラ128(図6参照)により撮像される。基板支持昇降装置により支持されたプリント基板90は、下降後、プリント基板移動装置108により移動させられて基準マークがCCDカメラ128の軸線と一致する撮像位置へ移動させられ、基準マークが撮像される。
【0060】
プリント基板移動装置108は、基板コンベア109より低く、かつ、電子部品供給装置100より低い位置に設けられている。基板支持昇降装置が基板支持面においてプリント基板90を支持した状態で部品供給カートリッジ104の下側にもぐり込むことができる高さに設けられているのである。そのため、プリント基板移動装置108を水平方向において電子部品供給装置100とオーバラップさせて設けることができ、電子部品装着装置をコンパクトに構成することができる。
【0061】
前記部品姿勢検出位置には、図5に示すように像取得装置130が設けられている。像取得装置130は、照明装置132と撮像装置としてのCCDカメラ134とを有する。照明装置132は、第一面発光体138および第二面発光体140を有する。第一面発光体138は板状を成し、水平に配設され、乳白色の拡散板により覆われた多数の発光ダイオードを備えており、拡散板から上方へ光を放射する。第一面発光体138は、部品姿勢検出位置へ移動させられた部品装着ヘッド56と同心となる位置に設けられており、中心線上を上下方向に貫通する貫通穴142が設けられている。第二面発光体140は第一面発光体138の下面に垂直に設けられており、拡散板により覆われた多数の発光ダイオードを備え、拡散板から第一面発光体138の中心線側へ光を放射する。
【0062】
第一面発光体138の下方には、ハーフミラー144が第一面発光体138の中心線に対して45度傾斜して設けられている。そのハーフミラー144を間にして第一面発光体138とは反対側にCCDカメラ134が設けられている。CCDカメラ134は、本体146にレンズ148が設けられて垂直かつ上向きに配設されており、本体146内には多数の固体撮像素子が一平面状に並べられて成る撮像面が設けられている。
【0063】
電子部品82には、第一面発光体138が発する光が照射されるとともに、第二面発光体140から照射された光がハーフミラー144により反射され、貫通穴142を通って照射される。あたかもCCDカメラ134からも光が放射されたような照明が行われるのであり、電子部品全体にむらなく光が照射される。第一面発光体138,第二面発光体140およびハーフミラー144が照明装置132を構成している。電子部品82からの反射光はハーフミラー144を透過してCCDカメラ134に入光し、撮像面に像が形成される。
【0064】
このCCDカメラ134は、前記プリント基板90の基準マーク撮像用のCCDカメラ128と共に、図6に示す制御装置150により制御される。これらCCDカメラ128,134および制御装置150が画像処理装置を構成している。制御装置150はコンピュータを主体とするものであり、CPU154,DRAM(ダイナミックラム)156,SRAM(スタティックラム)158,PROM(プログラマブルロム)160,漢字ROM162,フレームグラバメモリ164,および4面分のオーバレイ表示メモリ166を有し、これらは基板167上の図示しない内部バスによって互に接続されている。
【0065】
上記内部バスにはまた、2チャンネルのシリアルインタフェース170が接続され、入力装置172が接続されている。入力装置172は、電子部品装着装置全体の運転に必要な情報,指令と共に、画像処理対象物の種類,個数等,画像処理に必要な情報を入力する装置であり、テンキー,アルファベットキー等を有し、図1に示すように前壁16に設けられている。バスにはまた、イーサネットインタフェース174およびメモリカードインタフェース176が接続されている。
【0066】
イーサネットインタフェース174は電子部品装着装置の、画像処理装置以外の部分を制御するコンピュータとの間で通信を行うためのインタフェースである。例えば、制御装置150には、外部の制御機器(何らかのオプションが必要な場合)を接続可能であり、イーサネットインタフェース174はP1コネクタ168を介してデータ交換を行うのである。また、本電子部品装着装置において、インデックステーブル42,部品装着ヘッド56,押下装置86,電子部品供給装置100,プリント基板移動装置108,基板コンベア109等を制御する制御装置も、コンピュータを主体として画像処理装置の制御装置150とは別に設けられており、図示しない外部バスを介してP1コネクタ168に接続されている。この別の制御装置は本発明とは関連が薄いため図示および説明は省略する。メモリカードは、画像処理を行うために予め作成されたプログラムが記憶されたものであり、制御装置150にセットされれば、CPU154がPROM160を使用してメモリカード内のプログラムやプログラムの実行に必要なデータをメモリカードインタフェース176を介して読み出し、DRAM154に記憶させる。
【0067】
バスには更に、CCDカメラインタフェース180が接続され、前記プリント基板90の基準マーク撮像用のCCDカメラ128および前記像取得装置130のCCDカメラ134が接続されている。これらCCDカメラ128,134の撮像により得られた基準マーク,電子部品82の画像データはCCDカメラインタフェース180を介してそれぞれフレームグラバメモリ164に格納される。前述のように、フレームグラバメモリ164は4つ設けられており、連続して装着される4個の電子部品82の画像データが各フレームグラバメモリ164に順次格納される。また、基準マークの画像データは、電子部品82の画像データとは時期を異にして取得され、使用されるため、電子部品82の画像データを格納するためのフレームグラバメモリ164の1つが兼用される。
画像処理対象物が特に大形である場合のように、撮像装置が1ラインに多数の撮像素子を有するものであることが必要な場合や、移動中の画像処理対象物の撮像が必要である場合等には、CCDカメラに代えてラインセンサが用いられる。そのため、基板167にラインセンサ基板インタフェース184が設けられるとともに、フレームグラバメモリ164に接続されている。ラインセンサの使用時には、図示しないオプションのラインセンサ基板がラインセンサバス182によってラインセンサ基板インタフェース184に接続され、ラインセンサの撮像により得られる画像データがフレームグラバメモリ164に格納される。
【0068】
バスには更に、CRTインタフェース186が接続され、モニタCRT装置188が接続されている。モニタCRT装置188は、図1に示すように前壁16に前記入力装置172と並んで設けられており、カラー表示およびモノクロ表示の両方が可能である。
前述のように、電子部品82の撮像により得られた4つのモノクロ画像の画像データが、フレームグラバメモリ164に並列的に格納されるようになっており、一方オーバレイ表示メモリ166は、画像を16色のカラーで表示するカラー画像データを記憶し得るメモリを4面分備えている。モニタCRT装置188には、上記4つのモノクロ画像のいずれか1つに、上記4面分のカラー画像のうちモノクロ画像に対応するものが重ねて表示され、画像処理の経過や結果が表示される。
この同じモニタCRT装置188に、入力装置172を用いて入力されたデータもカラーで表示される。この表示時に漢字ROM162が使用される。
【0069】
本電子部品装着装置において電子部品82のプリント基板90への装着時には、インデックステーブル42の回転に伴って、部品装着ヘッド56が部品吸着位置において電子部品82を部品供給カートリッジ104から取り出した後、部品姿勢検出位置において電子部品82がCCDカメラ134により撮像される。電子部品82の画像データは制御装置150において処理され、電子部品82の水平位置ずれの量(X軸およびY軸方向の位置誤差)と吸着ノズル80の軸線まわりの回転角度ずれの量(回転角度誤差)とが算出され、位置ずれはプリント基板90の移動により修正され、回転角度ずれは部品姿勢修正位置において修正される。部品姿勢修正位置には、図示は省略するが、吸着ノズル80に係合して吸着ノズル80を回転させるノズル回転駆動装置が設けられており、吸着ノズル80が電子部品82の回転角度ずれを修正するに必要な角度だけ回転させられる。回転角度ずれの修正後、電子部品82は部品装着位置においてプリント基板90の所定の位置に装着される。装着後、吸着ノズル80は、ノズル戻し位置において回転角度ずれの修正のために回転させられた分、逆向きに回転させられて回転角度ずれ修正前の回転位置に戻される。
【0070】
プリント基板90は基板コンベア109により搬送され、基板支持昇降装置により支持された状態で基準マークがCCDカメラ128により撮像され、その画像データに基づいて水平位置ずれの量(水平位置誤差)および垂直軸線まわりの回転角度ずれの量(回転角度誤差)が算出される。電子部品82のプリント基板90への装着時には、プリント基板90がプリント基板移動装置108により移動させられ、水平位置誤差が電子部品82の水平位置誤差と一緒に修正される。また、プリント基板90の回転角度誤差は、吸着ノズル80を回転させることにより、電子部品82の回転位置誤差と一緒に修正される。
【0071】
以下、CCDカメラ128,134の撮像により得られた画像データの処理について説明する。
画像処理のためのプログラムやデータは前述のようにメモリカードに記憶されており、メモリカードがセットされれば読み出されてDRAM156に記憶される。メモリカードから読み出される画像処理プログラムを図7ないし図9にそれぞれ示す。
【0072】
図7に示すプログラムは事前処理プログラムである。事前処理プログラムは、一生産プログラムの立ち上げ時、すなわち事前処理プログラムのDRAM156への格納後に実行される。まず、一生産プログラムの実行に必要なすべての画像処理対象物のうちの1つについて、パターンマッチングを行うか否かが判定され、行うのであればマスタ捜索テンプレートに基づいて捜索テンプレートが生成されてDRAM156に記憶される。同様の処理がすべての画像処理対象物について順次行われる。
【0073】
上記マスタ捜索テンプレートは2個の点を一対とするポイントペアを複数組有し、それらポイントペアを規定する座標面(マスタ捜索テンプレート座標面と称する)が画像処理装置の基準座標面と一致しているものである。すなわち、マスタ捜索テンプレート座標面の原点および座標軸の方向が、CCDカメラ128,134の視野の中心に原点が設定された基準座標面の原点および座標軸の方向と一致しているのである。マスタ捜索テンプレートは、画像処理対象物の形状,サイズに基づいて予め作成されてメモリカードに記憶されており、事前処理プログラムと共にDRAM156に読み込まれる。
【0074】
図10に、画像処理対象物が正方形の電子部品である場合のマスタ捜索テンプレートの設定データの一例を示し、そのデータによって設定されるマスタ捜索テンプレート200を図11に示す。図10のデータ中、第7,8,10,11行のデータおよび第5行のhs(ハーフスパン)=5.5がマスタ捜索テンプレートの設定データである。Pairとは、ポイントペアを構成する2個の点の延長線上において、画像処理対象物の中心線に対して対称に別のポイントペアを設定することを意味する。例えば、図11に示す(7),(8),(10),(11) の各ポイントペア202に対して(7) ´,(8)´,(10) ´,(11) ´の各ポイントペア202が設定されるのである。これらポイントペア202に付された括弧付の数字は、図10における行番号と一致している。また、204は電子部品である。
【0075】
マスタ捜索テンプレートは、サイズ,位置,回転角度のいずれにも誤差のないマスタ画像処理対象物について、各組のポイントペアを構成する2個の点の一方が画像処理対象物の内側に、他方が外側に位置し、かつ、それらポイントペアの2個の点の中点がマスタ画像処理対象物のエッジ上に位置するように作成される。それを図に示せば、図11に示すようになるのである。
なお、一般的には、ポイントペアの2個の点の中点がマスタ画像処理対象物のエッジ上に位置することは不可欠ではなく、2個の点がそれぞれ画像処理対象物のエッジより内側と外側とに指定されればよい。
また、図11に示す例の場合、ポイントペア202の2個の点のうちの一方の点が別のポイントペア202の一方の点と共通にされているが、これも不可欠なことではない。
さらに、図11においては、いずれの点がポイントペア202を構成するかを判り易く示すために、ポイントペア202を構成する2個の点が直線でつながれているが、この直線は説明の都合上の線であって実際に直線のデータが設定されるわけではない。
【0076】
図14に、画像処理対象物が、一部が切り欠かれた図15の円板206である場合のマスタ捜索テンプレートのデータを示す。このマスタ捜索テンプレート208においては、円周部分に設けられた(15)〜(17)のポイントペア210は(15)´〜(17)´のポイントペア210とペアにされているが、その他のポイントペア210は他のポイントペアとペアにされてはいない。
【0077】
電子部品装着装置においては、画像処理対象物が電子部品あるいは基準マークであり、装着される全部の種類の電子部品および種類の異なる基準マークについてそれぞれマスタ捜索テンプレートデータが予め作成されてメモリカードに記憶されており、画像処理実行時にはDRAM156に格納される。そのため、捜索テンプレートの生成時には、捜索テンプレートを生成すべき画像処理対象物の種類に応じてマスタ捜索テンプレートデータがDRAM156から読み出される。マスタ捜索テンプレートは前述のように回転角度が0度の捜索テンプレートであり、マスタ捜索テンプレートが設定角度範囲内において図13に二点鎖線で示すように設定ピッチで回転させられることにより、複数種類の捜索テンプレートが生成され、そのデータがDRAM156に格納される。
【0078】
この捜索テンプレートの生成角度範囲および設定ピッチをそれぞれ指定するデータは、図10に示すように、マスタ捜索テンプレートのデータと共に記憶されている。第15行のpitchA=4.5 が設定ピッチのデータであり、第16行のstartA=-45および第17行のendA=45 が捜索テンプレートの生成角度範囲を規定するデータである。捜索テンプレートを生成する角度範囲およびピッチは画像処理対象物に応じて設定される。例えば、画像処理対象物の回転角度が大きくずれることが予想される場合には、生成角度範囲が広くされるのである。因みに、図7に示す事前処理プログラムの例では、生成角度範囲が−45度から+45度とされ、設定ピッチが5度とされている。
【0079】
1つの画像処理対象物についての捜索テンプレートの生成が終了すれば、プログラムの実行は最初に戻り、次の画像処理対象物についてパターンマッチングを行うか否かの判定および行うのであれば捜索テンプレートの生成が行われる。パターンマッチングを行わない場合にはプログラムの実行は始めに戻り、次の画像処理対象物についてパターンマッチングを行うか否かの判定が行われる。全部の画像処理対象物についてパターンマッチングを行うか否かの判定,パターンマッチングを行う画像処理対象物についての捜索テンプレートの生成が行われたならば図7のプログラムの実行は終了する。
【0080】
次に、図8に示す実行処理プログラムを説明する。このプログラムは、CCDカメラ128,134により電子部品あるいは基準マークが撮像され、画像データがフレームグラバメモリ164に格納された後に実行される。まず、画像処理対象物が角チップ等、パターンマッチングのみで処理可能であれば、図9に示すパターンマッチングプログラムに従って画像処理が行われる。
【0081】
次に、画像処理対象物がQFP(クウォード フラットパッケージ),PLCC(プラスティック リーデッド チップ キャリア),BGA(ボール グリッド アレイ)等、リードや半田バンプを備えて形状が複雑な電子部品等であって、画像処理のためにパターンマッチングを組み合わせたパターンマッチングマネージャを作動させる必要があるか否かが判定される。パターンマッチングの組合わせについては後述する。
パターンマッチングマネージャ作動の必要がなければ、仮想画面上での画像処理を行うべきか否かが判定され、判定の結果がNOであれば物理画面上での画像処理を行うべきか否かが判定される。
物理画面は、光学的特性値が画素毎に求められており、画像データが実在する画像の画面であり、仮想画面は、画素に拘束されない任意の点の光学光学的特性値が必要に応じて演算によって求められる画面である。上記パターンマッチングおよびパターンマッチングマネージャはいずれも、後に説明するように、仮想画面上で行われる処理であるが、本実施形態においては、これらの他に、パターンマッチングによらないで仮想画面上と物理画面上とでそれぞれ画像処理を行い得るようにされている。上記「仮想画面上での画像処理を行うべきか否か」および「物理画面上での画像処理を行うべきか否か」の判定は、後者2つの画像処理を行うことが指令されているか否かの判定なのである
【0082】
図9に示すパターンマッチングプログラムを説明する。
まず、サーチウインドウが設定され、画像処理対象物を捜索する捜索領域が設定される。サーチウインドウの設定は、CCDカメラ128,134の撮像面の一部あるいは全部を座標値によって指定することにより行われる。画像処理対象物が基準マークであるか電子部品であるか、電子部品であれば種類は何であるかは、作業手順中の装着データにより判っており、撮像面に形成される画像処理対象物の像の位置はおおよそ判るため、サーチウインドウは位置に多少のずれがあっても画像処理対象物を包含するに適した十分な大きさに設定される。このようにすれば捜索領域が狭くて済み、短時間で捜索することができる。
【0083】
フルセットのパターンマッチング処理は、捜索対象物を捜索する捜索ステップ,捜索対象物のおおよそのエッジ点を捜索する再捜索ステップ,捜索対象物のエッジ点を演算する測定ステップ,測定ステップを繰り返し行う再測定ステップの4つのステップを含む。通常は4つのステップ全部の終了によりパターンマッチングが終了する。1つでも異常のステップがあれば、次のステップは実行されず、直ちにパターンマッチングが終了させられる。
【0084】
まず、捜索ステップを説明する。
捜索ステップにおいては、DRAM156から捜索テンプレートが1つずつ順次読み出され、図17に示すように画像処理対象物の像220と背景とを含む画像が存在する画面221に重ねられ、捜索テンプレート222の複数のポイントペア224を構成する2個の点(以下、ポイントペア構成点と称する)の光学的特性値(本実施形態では輝度)が演算される。図10に示す例では、回転角度が−45度の捜索テンプレートから順に読み出される。
【0085】
ポイントペア構成点は仮想画面上の点であり、ポイントペア構成点の輝度は物理画面上の複数の画素の画像データとしての輝度から補間演算により求められる。捜索テンプレートのデータにより指定された仮想画面上の点の光学的特性値が物理画面の画像データに基づいて求められるのであり、これを視覚的に表したのが図17であって、請求項1にいう「捜索テンプレートを画像データの表す画像が存在する画面に重ねる」とはこのことを意味する。図17の画面221は仮想画面であり、この画面221内の画像対象物の像220はこの位置に存在すると仮想されているのみで、実際にこの像220を表す画像データは存在しない。
後述の図19,図20,図27に関しても同様である。
【0086】
ポイントペア構成点の輝度の補間演算は、例えばX,Y座標面上における4×4個の制御点の画像データによって規定される双3次スプライン曲面等の曲面を使用して行うことも可能であるが、本実施形態においては、ポイントペア構成点に隣接する4個の画素の画像データに基づいて、最も単純な線形補間により行われる。図18において(u0 ,v0 )はポイントペア構成点、f(u0 ,v0 )はポイントペア構成点の輝度、(u´,v´),(u´+1,v´),(u´,v´+1),(u´+1,v´+1)はそれぞれ線形補間に使用される4個の画素の中心位置、f(u´,v´),f(u´+1,v´),f(u´,v´+1),f(u´+1,v´+1)は4個の画素の各輝度であり、ポイントペア構成点の輝度は(1)式によって演算される。
f=(u0 ,v0 )=f(u´,v´)(1−α)(1−β)+f(u´+1,v´)α(1−β)+f(u´,v´+1)(1−β)β+f(u´+1,v´+1)αβ・・・・・・・(1)
【0087】
上記演算は図49に示す物理画面/仮想画面変換ドライバ300によって行われる。図に示すように、物理画面/仮想画面変換ドライバ300は、一般的な画像処理アプリケーションソフトウエア302とは別に構成されており、画像処理アプリケーションソフトウエア302において、物理画面304上の画像データに基づいて仮想画面306上の画像データを演算する必要が生じる度に、物理画面/仮想画面変換ドライバ300が呼び出されて、仮想画面306上の画像データの演算が行われるのである。
【0088】
各対のポイントペア224の2個の構成点について輝度が演算される毎に、それら2個のポイントペア構成点の輝度が比較される。CCDカメラ128や134による撮像時には、電子部品82や基準マーク等の画像処理対象物に照射された光は背景に照射された光より多く反射されるため、画像処理対象物に対応する部分と背景に対応する部分とでは固体撮像素子の電荷量に差が生ずる。画像処理対象物の像が明るく、背景が暗くなるのである。そのため、2個のポイントペア構成点の一方が画像処理対象物のエッジ内に位置し、他方の点が背景内に位置するのであれば、2個のポイントペア構成点の輝度に予め設定された設定値以上(設定値が正の場合)または設定値以下(設定値が負の場合)の差が生ずる。
【0089】
上記輝度差の設定値はマスタ捜索テンプレートデータと共に記憶されている。例えば、図10においては第5行に記述されているように設定値diffが−20に設定されている。この場合には、2個のポイントペア構成点のうち、画像処理対象物のエッジ内のポイントペア構成点の輝度がエッジ外のポイントペア構成点の輝度より20階調以上大きければ、設定値以下の差があると判定される。
逆に、設定値diffが20に設定されていれば、画像処理対象物のエッジ外のポイントペア構成点の輝度がエッジ内のポイントペア構成点の輝度より20階調以上大きければ、設定値以上の差があると判定される。
いずれの場合もそれら2個のポイントペア構成点は画像処理対象物のエッジを跨いでおり、適合状態にあることになる。この場合に、「2個のポイントペア構成点が設定輝度差条件を満たす」と表現することとする。
【0090】
(1) 画像処理対象物が捜索対象物ではなく、2個のポイントペア構成点がエッジを跨いでいない、(2) 吸着ミスにより吸着ノズル80が電子部品82を吸着していない、あるいは(3) 固体撮像素子にごみ等が付着して画像データが得られない等の理由により、2個のポイントペア構成点が設定輝度差条件を満たさず、適合状態にあるとは言えないことがある。この状態をポイントペアのフェールと称する。捜索テンプレートに適合する捜索対象物が存在しないと判定するためのフェール数は予め設定されている。例えば、図10においては、第3行に示すようにフェール数は0に設定されており、全部のポイントペアについて2個のポイントペア構成点が設定輝度差条件を満たさなければ、捜索テンプレートに適合する捜索対象物が存在するとは判定されないようになっている。
【0091】
フェール数が1以上に設定されているとすれば、複数組のポイントペアのうち設定輝度差条件を満たさないポイントペアが設定フェール数を越える数あれば、捜索テンプレートに適合する捜索対象物は存在しないと判定される。
0度の回転角度において捜索対象物が存在すると判定されれば、捜索ステップは終了し、再捜索ステップが実行されるが、存在しないと判定されれば、回転角度が異なる捜索テンプレートが読み出されて捜索対象物が捜索される。
【0092】
捜索対象物が存在すると判定されるまで、複数種類の捜索テンプレートが順次読み出され、捜索対象物が捜索される。全種類の捜索テンプレートを用いて捜索しても、捜索テンプレートに適合する捜索対象物が存在するとの判定が得られなければ、次に捜索テンプレートの位置をずらして捜索が行われる。X軸方向とY軸方向とにそれぞれ一定ピッチずつずらされ、各位置においてそれぞれ回転角度の異なる複数種類の捜索テンプレートを用いて捜索対象物が捜索されるのである。
【0093】
この移動ピッチは予め設定され、マスタ捜索テンプレートを規定するデータと共にメモリカードに記憶されている。図10において第13行および14行に示されているpitchX=2.2, pitchY=2.2が移動ピッチである。まず、Y軸方向に設定ピッチ移動させられる。具体的には、複数種類の捜索テンプレートの各ポイントペアの座標がY軸方向を正方向へ設定ピッチ分ずれるように座標変換が行われるのである。この捜索テンプレートを用いて捜索対象物の捜索が行われる。この位置において回転角度の異なる全種類の捜索テンプレートを用いても捜索対象物が存在するとの判定が得られなければ、次に捜索テンプレートがX軸方向を正方向へ設定ピッチ分ずらされる。さらにここでも捜索対象物が存在するとの判定が得られなければ、次に捜索テンプレートはY軸方向を負方向へ設定ピッチ分ずらされる。ここでも捜索対象物が存在するとの判定が得られなければ、次に捜索テンプレートは更にY軸方向を負方向へ設定ピッチ分ずらされ、さらにここでも捜索対象物が存在するとの判定が得られなければ、次に捜索テンプレートはX軸方向を負方向へ設定ピッチ分ずらされる。捜索テンプレートはサーチウインドウ内を角形の螺旋形を描くように移動させられるのである。
【0094】
捜索テンプレートを移動させても捜索対象物が存在するとの判定を得ることができず、座標変換を行ったとき、サーチウインドウからはみ出すポイントペアが生ずるに至れば、捜索テンプレートの移動は不可能であって捜索テンプレートに適合する捜索対象物は存在しないと判定され、捜索ステップは異常終了される。前記モニタCRT装置188に異常発生が表示されるとともに、異常の発生が記憶される。画像処理対象物が電子部品82であれば、画像処理結果が異常であると判定された吸着ノズル80は電子部品82の装着を行わないようにされる。部品装着位置において押下装置86が作動しないようにされるのである。また、捜索対象物が基準マークであれば、プリント基板90が電子部品82を装着されることなく搬出される。
【0095】
図17に示す画像処理対象物の像220のように全部のポイントペア224の2個のポイントペア構成点が像220のエッジの内側と外側とにあり、設定輝度差条件が満たされれば、そのときの捜索テンプレートの位置および回転角度がDRAM156に記憶され、再捜索ステップが実行される。再捜索ステップにおいては、図19に示すように再捜索テンプレート228を用いて画像処理対象物の像220のエッジ点が、再捜索テンプレート228の座標面である再捜索テンプレート座標面(捜索テンプレート座標面と同じである)上において捜索される。再捜索テンプレート228は、複数本のシークライン230を含む。シークライン230は、捜索ステップにおいて画像処理対象物の像220を見つけた捜索テンプレートに基づいて設定される。ポイントペアの2個のポイントペア構成点がシークライン230の両端をそれぞれ規定する点とされるのである。
【0096】
設定された複数本のシークライン230のそれぞれについて画像処理対象物の像220のエッジ点が捜索される。この捜索は、図20に示すように、予め定められたピッチ(例えば0.05mm)でシークライン230を分割し、複数の分割点P1〜P15の各々についてそれぞれ輝度を演算することにより行われる。このピッチは、CCDカメラ128,134の固体撮像素子232の対角線より短い長さに設定されている。そのため、1個の固体撮像素子232の中に分割点が3個ないし4個含まれることとなる。分割点も仮想画面上の点であり、捜索ステップにおけると同様に線形補間が行われ、分割点P1〜P15の輝度が演算される。
【0097】
線形補間によって演算された15個の分割点P1〜P15の各輝度の一例を図21に示す。なお、輝度値は正の値で表され、輝度値取得対象物が明るいほど値は大きくなる。本実施形態の像取得装置130は、画像処理対象物の表面に光を照射し、その表面からの反射光に基づいて像を取得するようにされており、以下の説明は画像処理対象物が明るくて輝度値が大きく、背景は暗くて輝度値が小さいものとして行う。
線形補間によって演算された輝度値からは、図24のグラフに示すように、どこで輝度が最も大きく変化するかが判らない。そのため、差分フィルタを用いて輝度値の微分値を求める。図22に示す差分フィルタを用いて微分値を求めた結果を図25のグラフに示す。この差分フィルタは、シークラインを規定する一方の点から他方の点に向かって、隣接する2個の点のうち上流側に位置する点の輝度を負の値とし、下流側に位置する点を正の値とし、それら2個の値の和を求めるフィルタである。この微分値は分割点の値ではなく、図25のグラフにおいては、輝度微分値の得られる位置が隣接2分割点の中央位置である「.5」で示されている。このグラフから明らかなように、輝度変化の大小は判るが、どこが最大であるかは判らない。
なお、演算方向に応じて、すなわち画像処理対象物の外側(背景内)にある分割点から画像処理対象物の内側にある分割点に向かって演算を行うか、逆に行うかにより、輝度微分値の符号が逆になる。前者の場合は輝度微分値が正の値になり、輝度微分値が最大の位置が輝度の変化勾配の絶対値が最大の位置である(変化勾配の絶対値が最大の位置の輝度微分値を極大値と称する)。後者の場合は輝度微分値が負の値になり、輝度微分値が最小の位置が輝度の変化勾配の絶対値が最大の位置である(変化勾配の絶対値が最大の位置の輝度微分値を極小値と称する)。図25および次に説明する図26のグラフに示す輝度微分値は、前者の演算により得られた値である。
【0098】
それに対し、図23に示す差分フィルタを用いて微分を行えば、図26のグラフに示すように、f8.5の位置に輝度微分値の極大値177が得られ、この位置が輝度の変化勾配の絶対値が最大の位置であることが判る。図23に示す差分フィルタは、シークライン上に設定された分割点のうちの1つに対して、その分割点を含んで演算方向において上流側の4個の分割点をいずれも負の値とし、下流側において連続する4個の分割点の輝度値をいずれも正の値とし、それらの和を求めるフィルタである。
【0099】
固体撮像素子のエッジ点に対応する部分に汚れ等が付着して電荷量に変化が生ずれば、エッジ点ではない位置において輝度微分値の極大値あるいは極小値が得られることがあるが、そのような位置における輝度の変化勾配の絶対値は小さい。それに対しエッジ点近傍においては、画像処理対象物と背景との明るさに顕著な差があって輝度の変化勾配の絶対値が大きい。そのため、設定値を設け、変化勾配の絶対値が最も大きい位置の輝度微分値が、エッジ点近傍について得られた値であるか否かを判定し、前者の場合を排除する。この設定値は、輝度微分値が正の値で得られる場合には正の値で設定され、輝度微分値の極大値が設定値以上であるか否かが判定され、極大値が設定値以上であれば、その極大値はエッジ点近傍の位置に得られた値であって、エッジ点の演算に用いることができると判定され、エッジ点の演算が行われる。また、輝度微分値が負の値で得られる場合には、設定値は負の値で設定され、輝度微分値の極小値が設定値以下であるか否かが判定され、極小値が設定値以下であれば、その極小値をエッジ点の演算に用いることができると判定される。換言すれば、輝度微分値の極大値が設定値より小さく、あるいは極小値が設定値より大きくてエッジ点が演算されないことが再捜索ステップにおけるシークラインのフェールである。
【0100】
図10に示す例においては、図25および図26に示す例とは逆に、画像処理対象物の内側にある分割点から外側に分割点に向かって輝度微分値の演算を行うように決められており、輝度値の変化勾配の絶対値が最も大きい位置において輝度微分値は最小になり、その極小値がエッジ点近傍において得られた値であるか否かを判定する設定値は、負の値、すなわち第5行に示すようにll=−200とされている。本例では画像処理対象物の方が背景より明るいため、輝度微分値が負の値で求められるとともに、その値が−200以下でなければ、エッジ点の位置の演算が行われないようにされている。
【0101】
また、図10に示すように、どのような差分フィルタを用いて演算を行うかも予め決められている。この差分フィルタ係数Nは(2)式に従って演算される。
N=gUnit/分割点間ピッチ・・・・・・・(2)
ただし、gUnit は固体撮像素子の対角線の長さである。
【0102】
差分フィルタを用いて微分が行われ、輝度微分値の極小値(または極大値)が得られれば、輝度の変化勾配の絶対値が最大の位置、すなわちエッジ点が下記の式に従って求められる。なお、(3)式および(4)式は、N=4の場合を例に取った式であり、fmax ,f(max-4) 〜f(max-1) ,f(max+1) 〜f(max+4) はそれぞれ、輝度微分値(fmax は極大(小)値)である。「f」は、図26に示すように、数字が付されてシークライン上の輝度微分値の取得位置を表すが、(3),(4)式においては、fに付された数字により指定される位置の輝度微分値を表す。fmax は輝度微分値が極大(小)の位置(図26に示す例ではf8.5 )の輝度微分値であり、f(max-1) ,f(max-2) ,f(max-3) ,f(max-4) はそれぞれ、演算方向においてfmax より上流側の4個所(図26に示す例ではf7.5 ,f6.5 ,f5.5 ,f4.5 )の各輝度微分値であり、f(max+1) ,f(max+2) ,f(max+3) ,f(max+4はそれぞれ、演算方向においてfmax より下流側の4個所(図26に示す例ではf9.5 ,f10.5,f11.5,f12.5) の各輝度微分値である。
dl=fmax ×4 −(f(max-1) +f(max-2) +f(max-3) +f(max-4) )・・・・・・・(3)
dr =fmax ×4 −(f(max+1) +f(max+2) +f(max+3) +f(max+4) )・・・・・(4)
edgePitch =(dl×N)/(dl+dr)−N/2・・・・・・(5)
エッジ点=(輝度微分値極大(小)値点ピッチ数+edgePitch)×分割点ピッチ・・・・・(6)
(3)式および(4)式はN=4の場合の式であるが、一般的には、dlを求める場合、極大(小)値点の輝度微分値にNを掛けた値から、演算方向において極大(小)値点より上流側のN個の点の各輝度微分値の和が引かれ、drを求める場合、極大(小)値点の輝度微分値にNを掛けた値から、極大(小)値点より下流側のN個の点の各輝度微分値の和が引かれる。なお、図21に示す演算結果を図23に示す差分フィルタを用いて微分を行った場合にエッジ点を求めるとき、(6)式の輝度微分値極大(小)値点ピッチ数は、8.5である。
【0103】
エッジ点の演算時には、まず、線形補間により分割点の輝度が演算され、差分フィルタ係数Nに従って微分が行われた後、(3)〜(6)式に従って演算が行われて輝度の最大変化位置、すなわちエッジ点が求められる。図20に示すシークライン230の場合、(6)式の演算結果は0.403mmになり、シークライン230の分割点P1から0.403mmの位置にエッジ点があることが判る。
【0104】
このようにして複数本のシークライン230の各々についてエッジ点が演算される。シークライン230のフェール数(ポイントペア202のフェール数が設定数以下である場合には捜索テンプレートに適合する捜索対象物が存在すると判定されるようにされている場合には、ポイントペア202のフェール数とシークライン230のフェール数との和)が設定数以下であれば正常であると判定されて測定ステップが実行され、設定数を越えるフェールがあれば異常終了される。異常発生時の処理は捜索ステップと同じである。図10においては第3行に示すようにfail Countが0に設定されており、フェールが1つでもあれば再捜索ステップは異常終了させられる。
【0105】
フェール数が設定数以下であり、再捜索ステップが正常に終了すれば、次に測定ステップが実行される。再捜索テンプレートは、捜索ステップにおいて捜索対象物ありと判定した捜索テンプレートに基づいて設定されており、シークライン230上においてエッジ点を見つけることはできるが、エッジ点とシークライン230の中点(図19に×印を付して示し、以下、アイデアルポイントと称する)との間にはずれがあるのが普通である。前記ポイントペアを構成する2個の点は、捜索対象物にサイズ,位置,回転角度のずれがなければそれら2個の点の中点が捜索対象物のエッジ上に位置するように設定されており、アイデアルポイントとエッジ点とが一致するはずであるが、実際には画像処理対象物にはずれがあり、アイデアルポイントと演算により得られたエッジ点とにはずれが生ずるのである。
【0106】
そのため、再捜索ステップが異常なく実行されれば、次に測定ステップが実行され、エッジ点の位置が演算される。測定ステップにおいては、まず、図27に示すような測定テンプレート236が自動設定される。測定テンプレート236は、複数のシークライン238を有しており、予め設定されたマスタ測定テンプレートのデータと、上記再捜索ステップにおける再捜索テンプレート座標面の基準座標面に対する相対位置のデータと、再捜索テンプレート座標面上におけるエッジ点の演算結果とに基づいて設定される。
【0107】
マスタ測定テンプレートデータは、前記図10に例示するように、マスタ捜索テンプレートデータ等と共に記憶されている。図10の第20行〜33行のデータが測定ステップ実行のためのデータであり、第21行のhs=3.5,第23行〜27行および第29行〜33行のデータがマスタ測定テンプレートデータである。このデータにより得られるマスタ測定テンプレート240を図12に示す。242はシークラインである。マスタ測定テンプレート240は同じ電子部品用のマスタ捜索テンプレートより多くのシークラインを有している。
なお、画像処理対象物が一部が切り欠かれた円板206の場合には、図16に示すように複数のシークライン246を有するマスタ測定テンプレート244が設定される。
【0108】
測定テンプレートのシークラインの一部あるいは全部がペアにされている。シークラインの延長線上に、画像処理対象物の中心線に対して対称に別のシークラインが設定されているのである。これらペアにされたシークラインをペアシークラインと称する。
測定テンプレートは、マスタ測定テンプレートデータの座標変換によって設定される。再捜索テンプレートの座標面(この再捜索テンプレートの座標面は、捜索ステップにおいて画像処理対象物が捜索テンプレートに適合する捜索対象物であると判定された際の捜索テンプレートの捜索テンプレート座標面と共通である)の基準座標面に対する相対位置および相対回転角度と、再捜索テンプレート座標面に対する画像処理対象物の相対位置および相対回転角度(これらは再捜索ステップにおいて演算されたエッジ点の座標値に基づいて演算されるが、この演算については後に説明する)とに対応する座標変換を、マスタ測定テンプレートデータ(基準座標面と一致するマスタ測定テンプレート座標面において設定されている)に施して設定されるのである。
【0109】
測定テンプレートの自動設定が終了したならば、その測定テンプレートの各シークライン上のエッジ点の演算が、再捜索ステップにおけるそれと同様に行われる。シークライン上に一定ピッチで分割点が設定され、分割点毎に線形補間によって輝度が演算されるとともに、差分フィルタが用いられて輝度微分値が演算されるとともにエッジ点が演算されるのである。測定ステップにおいても、許容されるフェールの数が設定されている。ここにおけるフェールは、再捜索ステップにおけると同様に、シークラインについてエッジ点が演算されないことを意味する。フェール数が設定数以下であれば正常とされ、次に再測定ステップが実行される。また、フェール数が設定数を越える数あれば測定ステップは異常終了させられる。異常発生時の処理は捜索ステップにおけると同じである。
【0110】
再測定ステップにおいては再測定テンプレートが設定され、エッジ点が演算される。再測定テンプレートは、測定テンプレートおよび測定ステップにおいて演算されたエッジ点に基づいて自動設定される。測定ステップにおいて得られたエッジ点に基づき、アイデアルポイントがエッジ点上に位置すると予想される位置へ測定テンプレートが座標変換により回転移動させられるのである。再測定ステップにおけるエッジ点の演算も再捜索ステップにおけると同様に行われる。
【0111】
再測定ステップにおける異常の判定は、測定ステップについて設定された許容フェール数が用いられ、エッジ点の得られないシークラインが設定数より多くあれば異常であって画像処理が終了される。異常発生時の処理は捜索ステップにおけると同じである。設定数以下であれば正常終了され、次にオブジェクトベクトル、すなわち画像処理対象物のサイズ,位置,回転角度が演算される。再測定ステップの実行回数が多いほどアイデアルポイントとエッジ点とのずれが少なくなり、エッジ点の検出精度が向上する。再測定ステップの設定回数は予め設定されて記憶されている。
なお、2回目以降の再測定ステップの実行に用いられる再測定テンプレートは、その直前の再測定ステップ実行時における再測定テンプレートとその再測定ステップにおけるエッジ点の演算結果とから自動設定される。
【0112】
モニタCRT装置188には、画像処理の経過が表示される。例えば、捜索ステップの実行時には、フレームグラバメモリ164に格納されている画像データ(例えば、4つの電子部品を撮像した4セットの画像データの1セット)に基づいて画像処理対象物の像と背景とを含む画像がモノクロ表示され、その上に捜索テンプレートの角度が設定ピッチずつ変えられるとともに角形の螺旋状に位置が変えられる様子がカラー表示され、作業者に処理の進行状況が示される。
【0113】
モニタCRT装置188は、自動選択表示モードと手動選択表示モードとの2つのモードで表示が可能なものとされており、自動選択表示モードに設定されている場合には、画像処理経過の表示と、入力装置172からの入力に関連した入力関連データ(このデータには電子部品装着装置の異常を報知し、オペレータに処置を求めるデータも含まれる)との両方が、入力関連データを優先させつつ表示される。したがって、自動選択表示モードに設定されている状態で、入力装置172によりデータが入力されれば、上記画像処理経過の表示から自動的に入力関連データの表示に切り換えられる。
手動表示選択モードにおいては、画像処理経過の表示と入力関連データの表示とのうち、オペレータの手動操作によって選択された方のみの表示が行われる。
【0114】
次に、画像処理対象物のオブジェクトベクトルの演算について説明する。以下に説明する演算を行うためのオブジェクトベクトル演算プログラムはメモリカードに記憶されており、メモリカードの制御装置150へのセット時にDRAM156に写される。
サイズ,位置,回転角度は指定がある場合に演算される。例えば、図10の例においては、第5行および第21行のvf=PAのPが位置(Position) ,Aが角度(Angle) を表し、位置および回転角度を演算することが指定されている。
【0115】
サイズ演算は例えば次の場合に必要になる。▲1▼画像処理対象物のサイズが必要な場合、▲2▼画像処理対象物を、捜索対象物に似ているが捜索対象物ではない物と識別したい場合、▲3▼エッジ測定にフェールがあり、かつ、位置測定精度を確保したい場合等である。▲2▼は、例えば、形状が同じでサイズが少し異なる電子部品を区別することが必要な場合である。▲3▼の場合にサイズ演算が必要になるのは、フェールがある場合には、後述のようにフェールを考慮して画像処理対象物の位置を求めるためにサイズが必要であるからである。
本実施形態においても、上記▲1▼〜▲3▼のいずれにも該当しない場合にはサイズ演算は行われないが、サイズ演算の必要がある場合には、位置および回転角度の演算に先立って行われる。
【0116】
以下、画像処理対象物が角チップであり、サイズ,位置,角度の演算が指定されており、かつ、フェールがある場合を例に取って説明する。
まず、サイズ演算を説明する。サイズ演算は、サイズ演算に使う旨の指示があるペアシークラインを用いて行われる。換言すれば、いずれのシークラインにもサイズ演算に使う旨の指示がない場合,指示があってもシークラインがペアシークラインでない場合にはサイズ演算が行われないのである。1つのテンプレート内にシークラインについてサイズ演算を行う旨の指定が1つもないときにはフラグが0にセットされ、1つでも指定があればフラグが1にセットされることにより、サイズ演算を行うか否かが判定される。このようにすれば、サイズ演算が不要である場合に、複数本のシークラインの一つ一つについてサイズ演算に使うことが指示されているか否かを判定することなくサイズ演算不要を知ることができ、処理時間が短くて済む。
【0117】
サイズ演算の最初はサイズファクタの演算である。サイズファクタは、画像処理対象物のサイズの、測定テンプレート座標面(測定テンプレートの設定座標面)のX軸方向とY軸方向とのそれぞれにおける過大率である。X軸方向のサイズ過大率は、図28に角チップ250を示すように、X軸方向に平行に設定された複数組のペアシークラインの各組のシークラインのエッジ点間の距離(測定スパンと称する)をペアシークラインのアイデアルポイント(図中×印が付された点)間の距離(本来のスパンと称する)で除した値を平均することにより求められる。また、Y軸方向のサイズ過大率は、Y軸方向に設定された複数組のペアシークラインの各組のペアシークラインの測定スパンを本来のスパンで除した値を平均することにより求められる。なお、図28に破線で示すのは、フェールが生じたシークラインであり、フェールの生じたシークラインを含むペアシークラインについては、サイズ過大率は演算されない。これらX軸方向のサイズ過大率およびY軸方向のサイズ過大率をそれぞれ、角チップ250のX軸方向,Y軸方向の各本来のスパンに掛けることによりサイズが演算される。
【0118】
複数本のシークラインのいずれか1つにでもフェールがあれば、フェールのないシークラインの全部についてアイデアルポイントをサイズファクタで補正した点であるサイズポイントが演算される。図29に例を示すように、Y軸方向にほぼ平行なシークラインについては、アイデアルポイントのY座標値にY軸方向のサイズ過大率を掛けることによりサイズポイントのY座標値が演算され、図示は省略するが、X軸方向に平行なシークラインについては、アイデアルポイントのX座標値にX軸方向のサイズ過大率を掛けることにより演算される。
【0119】
また、前述のように、サイズファクタの演算はX軸およびY軸に平行なシークラインであってペアにされているもののみを使用して行われるが、この得られたサイズファクタを用いたサイズポイントの演算等は、X軸ともY軸とも平行ではないシークラインについても行われる。傾斜したシークラインについてのサイズポイントの演算および以下の演算は、後述の円形の基準マークにおけるサイズポイントの演算等と実質的に同じである。
【0120】
次いで、エッジ点とサイズポイントとの差Diffが演算される。サイズポイントは、サイズ誤差を有する画像処理対象物に対して、そのサイズ誤差を承認した上で改めて測定テンプレートを設定し直したと考えた場合のアイデアルポイントに相当する。したがって、上記エッジ点とサイズポイントとの差Diffはエッジ点の位置ずれ量そのものを表していることになる。差Diffの演算は、エッジ点の座標値からサイズポイントの座標値を引くことにより行われるため、差Diffが正の値である場合にはエッジ点が測定テンプレート座標面上において正側へずれていることになるのである。
【0121】
このようにフェールがある場合にサイズポイントを演算するのは、画像処理対象物の位置の演算に対するフェールの影響を小さくし、演算誤差を小さくするためである。例えば、画像処理対象物のサイズが本来のサイズより大きいが位置ずれはない場合に、演算誤差ペアシークラインを構成する一方のシークラインにフェールがあり、他方のシークラインにフェールがないとすれば、サイズポイントを演算せず、アイデアルポイントのままで演算を行った場合には、フェールのない側においてエッジ点とアイデアルポイントとの差の和がフェールのある側より大きくなり、実際には位置ずれはないにもかかわらず画像処理対象物がフェールのないシークライン側にずれているとの演算結果が出されてしまうため、これを回避するためにサイズポイントの演算を行うのである。
【0122】
次に位置および回転角度の演算を説明する。
回転角度の演算は、0度,90度,180度,270度のシークラインであって、かつ、回転角度の演算に使用することが指示されているシークラインに基づいてのみ行われる。また、0度と180度,90度と270度との各処理は一括して行われる。
【0123】
位置および回転角度は、回転中心RCについて演算される。回転中心RCとはコンピュータの演算上の中心であり、オペレータが画像処理対象物の中心として指定する指定中心DCとは異なる場合もあり、一致する場合もある。指定中心DCは、電子部品82をプリント基板90に装着するプログラムの作成に当たり、画像処理対象物の基準とされる点であり、本実施形態では、前記マスタ捜索テンプレート座標面,マスタ測定テンプレート座標面等の原点が指定中心DCに置かれ、また、後述するように、指定中心DCについて電子部品82の水平面内における位置修正量が演算される。
【0124】
まず、図30に示す直線Lを例に取り、位置および回転角度の演算を説明する。直線Lには本来は4本のシークラインが設定されていたが1本がフェールしたか、あるいは当初から3本のシークラインが設定されていたかにより、3本のシークラインSL1 ,SL2 ,SL3 について上記差Diffはが演算されたとすれば、回転中心RCは左側の2本のシークラインSL1 ,SL2 寄りに設定される。回転中心RCは、一方の側の複数本のシークラインと回転中心RCとの各距離の和(シークラインが1本の場合、そのシークラインと回転中心RCとの距離)の絶対値と、他方の側の複数本のシークラインと回転中心との距離の和(シークラインが1本の場合、そのシークラインと回転中心RCとの距離)の絶対値とが等しくなる位置に設定される。換言すれば、回転中心RCの一方の側を正,他方の側を負とすれば、全部のシークラインまでの距離の和が0になる位置に回転中心RCが設定されるのである。回転角度(ラジアン)は、(7)式によって演算される。
回転角度=(AO・A′+BO・B′+CO・C′)/(AO2 +BO2 +CO2 )・・・・・・・・・(7)
ただし、
AO:回転中心RCとシークラインSL1 との距離
BO:回転中心RCとシークラインSL2 との距離
CO:回転中心RCとシークラインSL3 との距離
A′:シークラインA上における差Diff
B′:シークラインB上における差Diff
C′:シークラインC上における差Diff
また、回転中心RCの位置は、(8)式によって演算される。
(A´+B´+C´)/3・・・・(8)
【0125】
差Diffと、エッジ点の回転中心からの距離を用いて複数のシークラインの各々について角度を演算し、それらを平均することによっても角度を得ることができるが、その場合、例えば、凹凸があって1個所でも角度が大きく外れればその誤差が最終的な角度の値に大きな影響を与える。それに対し、上記(7)式に従って角度を演算すれば、特定のエッジ点の誤差の影響を小さくすることができ、回転角度の演算精度を向上させることができる。
【0126】
複数本のシークラインのいずれかにフェールがあり、エッジ点が得られない場合には、図31に示すように、指定中心DCと回転中心RCとにずれが生ずる。SL2 がフェールのあったシークラインである。一般に、指定中心DCは画像処理対象物の中心に設定され、シークラインはその指定中心DCに対して対称に設定されるため、シークラインにフェールが生じ、それに対応した回転中心RCの設定が行われれば、指定中心DCと回転中心RCとにずれが生じるのである。
回転中心RCは前述のように、回転中心RCの一方の側を正とし、他方の側を負とすることにより、複数のシークラインの各エッジ点と回転中心RCとの距離の和が0になるように設定されることから(9)式が成立し、この(9)式とから(10)式が得られ、回転中心RCと指定中心DCとのずれvが演算される。
0 +t1 +t3 =0・・・・・・(9)
(s0 −v)+{s0 +(s1 −s0 )−v}+{s0 +(s3 −s0 )−v}=0・・・・・・・(10)
ただし、
0 :回転中心RCとシークラインSL0 との距離
1 :回転中心RCとシークラインSL1 との距離
3 :回転中心RCとシークラインSL3 との距離
0 :指定中心DCとシークラインSL0 との距離
1 :指定中心DCとシークラインSL1 との距離
3 :指定中心DCとシークラインSL3 との距離
【0127】
図32に示すように、シークラインが矩形の画像処理対象物の互に平行な2本の辺について設定されている場合、(11)式が成立し、回転中心RCと指定中心DCとのずれ量vは(12)式に基づいて演算される。
0 +t1 +t2 +t3 +t4 +t5 =0・・・・・・(11)
0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}+{s0 +(s5 −s0 )}−6v=0・・・・・・(12)
【0128】
図33に示す画像処理対象物の場合、(13)式が成立し、回転中心RCと指定中心DCとのずれvは(14)式に基づいて演算される。
0 +t1 +t2 +t3 +t4 =0・・・・・・(13)
0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}−5v=0・・・・・・(14)
【0129】
図34に示すように、シークラインが互に直角な2方向に設定されている場合にはX軸方向およびY軸方向に関してそれぞれ(15)式および(16)式が成立し、回転中心RCと指定中心DCとのX軸方向,Y軸方向の各位置ずれvx ,vy は、それぞれ(17)式および(18)式に基づいて演算される。
0 +t1 +t2 +t3 +t4 +t5 =0・・・・・・(15)
6 +t7 +t8 +t9 +t10+t11=0・・・・・・(16)
0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}+{s0 +(s5 −s0 )}−6vx =0・・・・・・(17)
6 +{s6 +(s7 −s6 )}+{s6 +(s8 −s6 )}+{s6 +(s9 −s6 )}+{s6 +(s10−s6 )}+{s6 +(s11−s6 )}−6vy =0・・・・・・(18)
【0130】
X軸方向について(17)式に基づいて回転中心RCX の指定中心DCに対するX軸方向の位置ずれvx を演算し、それに基づいて回転中心RCX が求められる。Y軸方向について(18)式に基づいて回転中心RCY の指定中心DCに対するY軸方向の位置ずれvy を演算し、それに基づいて回転中心RCy が求められる。回転中心RCX を通り、シークライン設定座標のY軸に平行な直線と、回転中心RCY を通り、X軸に平行な直線との交点が図34に示す画像処理対象物の回転中心RCである。
【0131】
シークラインが互に直角な2方向に設定されている画像処理対象物の別の例を図35に示す。この画像処理対象物については(19)式および(20)式が成立し、回転中心RCと指定中心DCとのX軸方向,Y軸方向の各ずれvx ,vy は、それぞれ(21)式および(22)式に基づいて演算される。ただし、図34に示す画像処理対象物は、回転中心RCと指定中心DCとにずれがなく、vx =vy =0であって、シークラインと回転中心RCおよび指定中心DCとの距離は同じであるとして図示されており、したがって、(19)式および(20)式と、(21)式および(22)式とにおいて同じ符号が使用されている。
0 +s1 +s2 +s3 =0・・・・・・(19)
4 +s5 +s6 +s7 =0・・・・・・(20)
0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}−4vx =0・・・・・・(21)
4 +{s4 +(s5 −s4 )}+{s4 +(s6 −s4 )}+{s4 +(s7 −s4 )}−4vy =0・・・・・・(22)
【0132】
次に回転角度を演算するために、図36に示す角度ファクタが予め設定されている。角度ファクタは、シークラインの位置および極性によって決定される。図36に示す角度ファクタをXY座標上で示せば図37に示すようになる。
【0133】
図38に回転中心RCおよび角度ファクタを用いて画像処理対象物の位置および回転角度を演算する例を示す。回転角度は(23)式,(24)式に従って演算される。(23)式におけるd00 ないしd41 の正負の符号は角度ファクタによって決められている。(23)式で演算される回転角度は、画像処理対象物の測定テンプレート座標面に対する回転角度である。
また、回転中心RCのX軸方向の位置ずれΔx,Y軸方向の位置ずれΔyはそれぞれ(25)式,(26)式により演算される。これら位置ずれΔx,Δyは、回転中心RCの実際の位置の本来あるべき位置からのずれ量である。
回転角度=(−d00 −d11 +d22 +d30 −d41 )/ta ・・・・・(23)
a =t0 2+t1 2+t2 2+v0 2+v1 2・・・・(24)
Δx=(d3 +d4 )/2・・・・・・・・・(25)
Δy=(d0 +d1 +d2 )/3・・・・・・(26)
ただし、d0 ,d1 ,d2 ,d3 ,d4 はそれぞれ、5本のシークラインにおけるエッジ点のサイズポイントからのずれ量である。
【0134】
画像処理対象物が角チップであり、図39に示すように角チップの像250のX軸,Y軸にそれぞれ平行な2辺に各々シークラインが設定されている場合の回転角度および回転中心RCの位置ずれΔx,Δyの演算を(27)式〜(29)式に示す。
回転角度=(−d00 +d11 +d22 −d33 +d40 −d51 −d62 +d73 )/(t0 2+t1 2+t2 2+t3 2+v0 2+v1 2+v2 2+v3 2)・・・・・(27)
Δx=(d4 +d5 +d6 +d7 )/4・・・・・・(28)
Δy=(d0 +d1 +d2 +d3 )/4・・・・・・(29)
0 〜d3 は回転中心RCからの距離がt0 〜t3 のシークライン上におけるエッジ点とサイズポイントとのずれ量であり、d4 〜d7 は回転中心RCからの距離がv0 〜v3 のシークライン上におけるエッジ点とサイズポイントとのずれ量である。
【0135】
上記各式が回転角度および位置ずれΔx,Δyの演算式として妥当なものであることを数学的に証明する代わりに、具体的に数値を代入して妥当性を示す。
図40に示す形状の画像処理対象物が、回転中心RCのまわりに−0.1(ラジアン)回転するとともに、回転中心RCがY軸方向に5mm、X軸方向に0mmずれた場合を想定する。この場合に、t0 =30mm,t1 =20mm,t2 =50mm,v0 =30mm,v1 =30mmとすれば、sin θ=θと見なしてよい程に回転角度が小さい限り、d0 =+8mm,d1 =+7mm,d2 =0mm,d3 =−3mm,d4 =+3mmとなるはずである。また、ta =t0 2+t1 2+t2 2+v0 2+v1 2を演算すれば5600(mm2 )が得られる。
これらの値を(30), (31) ,(32)式に代入すれば、下記の通り、回転角度および回転中心RCの位置ずれΔx,Δyがそれぞれ、−0.1ラジアン,5mmおよび0mmと求まり、式の妥当性が確かめられる。
回転角度={−(8×30}−(7×20)+(0×50)+(−3×30)−(+3×30)}/5600=−0.1・・・・(30)
Δx=(−3+3)/2=0・・・・・・・(31)
Δy=(8+7+0)/3=5・・・・・・(32)
【0136】
以上のようにして演算されるのは回転中心RCの回転角度および位置ずれであるが、電子部品装着作業の実行上必要なのは指定中心DCの回転角度および位置ずれであるため、回転中心RCの回転角度および位置ずれから指定中心DCのそれらを演算することが必要である。ただし、回転角度は回転中心RCについても指定中心DCについても同じであるため演算の必要はなく、位置ずれのみについて演算を行えばよい。
画像処理対象物に回転角度誤差がなく、単純にX軸方向とY軸方向とに位置ずれΔx1 ,Δy1 を生じたのみであれば、回転中心RCの位置ずれも指定中心DCの位置ずれも共にΔx1 ,Δy1 となる。しかし、画像処理対象物に回転角度誤差Δθが生じた場合には、図41に示すように回転中心RCからX軸方向およびY軸方向にそれぞれvx ,vy だけ離れた位置にある指定中心DCの位置ずれは、(Δx1 −Δθ×vy ),(Δy1 +Δθ×vx )となる。
【0137】
ここで演算された回転角度Δθおよび位置ずれ(Δx1 −Δθ×vy ),(Δy1 +Δθ×vx )は画像処理対象物の指定中心DCの測定テンプレート座標面に対する回転角度および位置ずれであるが、測定テンプレート座標面自体が図42に示すように基準座標面に対して回転角度θおよび位置ずれΔx2 ,Δy2 を有しているのが普通である。
そして、基準座標は一般にCCDカメラの光軸、すなわち視野の中心に原点を有する座標面として設定され、また、部品姿勢検出位置においては吸着ノズル80の軸線がCCDカメラの光軸と一致するように位置決めされる。この場合には、上記測定テンプレート座標面の基準座標面に対する回転角度θおよび位置ずれΔx2 ,Δy2 は、測定テンプレート座標面の吸着ノズル80の軸線に対する回転角度および位置ずれであることになる。
したがって、画像処理対象物としての電子部品の指定中心DCの吸着ノズル80の軸線に対する回転角度および位置ずれはそれぞれ、θ+Δθ,Δx2 +(Δx1 −Δθ×vy )cos θ,Δy2 +(Δy1 +Δθ×vx )sin θとなる。
【0138】
フェールがある場合には回転中心の座標,回転中心から各シークラインまでの距離,回転中心と指定中心との位置ずれ等の値が前述のように演算されるが、フェールがない場合はこれらの値は各画像処理対象物とテンプレートとの組合わせに対してそれぞれ一定の値に決まるため、これらの値がデフォルト値としてメモリカードに格納されており、このデフォルト値を用いて上記各演算が行われる。なお、サイズの演算が指定されておらず、すべてのシークラインがペアにされており、かつ、フェールもない場合には、サイズポイントの演算が省略されて、サイズポイントに代えてエッジ点とアイデアルポイントとの差が演算され、その演算結果に基づいて位置および回転角度が演算されるようにしてもよい。この場合には、サイズに誤差があっても、ペアシークラインを構成する2本のシークライン同士でサイズ誤差の影響を打ち消し合い、位置の演算結果に影響を及ぼさないからである。
さらに、フェールがある場合でも、位置ずれの演算が指定されていない場合はサイズポイントが不要であり、演算を省略してもよい。
【0139】
次に、画像処理対象物がプリント基板の基準マークである場合について説明する。基準マークは、前述のようにプリント基板に付され、基準マークの撮像に基づいてプリント基板の水平位置誤差および回転位置誤差が算出される。したがって、基準マークの回転角度を演算する必要はない。
また、基準マークの位置ずれの演算も矩形の電子部品の位置ずれの演算と共通する部分が多いが、形状が円形や円形の一部が切り欠かれたものである場合が多いため、位置ずれの演算に特殊性がある。以下、この点について説明する。
【0140】
まず、図43〜図45に基づいて円形の基準マークの像260のシークラインにフェールがある場合を説明する。ここでは、図43に示すように、破線で示す0度のシークラインがフェールのシークラインであり、また、基準マークの像260が、本来のサイズ(図中二点鎖線で示す大きさ)より大きいものとする。
基準マークの像260についても始めにサイズ演算が行われる。サイズ演算においては、角チップの像250の場合と同様にサイズファクタが演算される。シークラインが図43に示すように45度間隔で放射状に8本設定されているとすれば、X軸方向,Y軸方向の各サイズファクタsizeFX,sizeFYはそれぞれ、sizeXM=sizeYM=0,baseXM=baseYM=0の初期設定を行った上で、(33)式〜(35)式によって演算される。
for(i=0; i<n;i++){sizeXM+=(測定スパン〔i〕/本来のスパン〔i〕)*|cos 角度〔i〕|;baseXM+=|cos 角度〔i〕|;sizeYM+=(測定スパン〔i〕/本来のスパン〔i〕)*|sin 角度〔i〕|;baseYM+=|sin 角度〔i〕|}; ・・・(33)
sizeFX=(sizeXM)/baseXM ; ・・・・・(34)
sizeFY=(sizeYM)/baseYM ; ・・・・・(35)
ただし、(33)式はC言語で記述されており、for(i=0; i<n;i++)は、i番目のシークラインについての{ }内の演算を、iを0からn−1まで1ずつ変化させつつ行った結果の総和を意味する。また、nはペアシークライン数であり、図43の例では4であるため、(33)式の演算に当たってiは0から3まで順次変えられることとなるが、このiがフェールのシークラインを含むペアシークラインを指定する値になった場合には、演算が行われることなく次のペアシークラインを指定する値に変えられるようになっている。したがって、図43の例では0度のシークラインを含むペアシークライン以外の3対のペアシークラインについて(33)式の演算が行われることとなる。
【0141】
円の場合、シークラインが放射状に設定されるため、X軸およびY軸に対して傾斜したシークラインが存在し、これらシークラインはX軸方向とY軸方向との両方についてサイズ過大率の成分を有する。そのため、(33)〜(35)式においては、各シークライン上におけるサイズ過大率のX軸方向の成分とY軸方向の成分とが求められ、それぞれ成分比率に応じてサイズファクタの決定に寄与させられるようになっている。
この演算によって得られるsizeFXおよびsizeFYは、それぞれX軸方向とY軸方向とのサイズ過大率である。サイズ誤差がX軸方向とY軸方向とで異なる比率で生ずる場合に対処するために、両方向で別個にサイズファクタが演算されるようになっているのである。
【0142】
次に、サイズポイントが演算される。まず、図45に示すようにアイデアルポイントとサイズポイントとの差であるpairDiffが(36)〜(43)式((36),(37)式はC言語で記述されている)によって演算され、 得られたpairDiffとアイデアルポイントとからサイズポイントが算出され、更にエッジポイントを用いてサイズポイントとエッジポイントとのずれDiffが演算されるのである。
ΔLx =pairRadius*cos θ*(sizeFX −1); ・・(36)
ΔLy =pairRadius*sin θ*(sizeFY −1); ・・(37)
ΔLx ≧0かつΔLy ≧0の場合
pairDiff=√{(ΔLx 2 +(ΔLy 2 }; ・・(38)
ΔLx <0かつΔLy <0の場合
pairDiff=−√{(ΔLx 2 +(ΔLy 2 }; ・・(39)
ΔLx <0かつΔLy ≧0であって|ΔLx |≧|ΔLy |の場合
pairDiff=−√{(ΔLx 2 −(ΔLy 2 }; ・・(40)
ΔLx <0かつΔLy ≧0であって|ΔLx |<|ΔLy |の場合
pairDiff=√{−(ΔLx 2 +(ΔLy 2 }; ・・(41)
ΔLx ≧0かつΔLy <0であって|ΔLx |≧|ΔLy |の場合
pairDiff=√{(ΔLx 2 −(ΔLy 2 }; ・・(42)
ΔLx ≧0かつΔLy <0であって|ΔLx |<|ΔLy |の場合
pairDiff=−√{−(ΔLx 2 +(ΔLy 2 }; ・・(43)
【0143】
前述のように、基準マークの像260は回転角度を演算する必要がなく、位置のみが演算される。位置を演算するにあたり、まず、位置ファクタ(posFactor) が(44)式に従って演算される。
posFactorM〔i〕=1/Σcos2(角度R〔i〕−角度〔n〕)・・・(44)
ただし、iはシークラインを指定する値であり、0から7まである。また、nの値もシークラインの本数である1から8まで1ずつ増加させられる。Σcos2(角度R〔i〕−角度〔n〕)の演算は、i番目のシークラインの角度R〔i〕とフェールのないシークラインすべての角度R〔n〕との差の余弦の2乗の和を求める演算である。この演算においても、iがフェールのシークラインを指定する値になった場合には、演算が行われることなく次のシークラインを指定する値に変えられるようになっているため、図43の例では0度のシークラインについての演算は行われず、45度〜315度の各シークラインについて位置ファクタの演算が行われる。
【0144】
次に位置ファクタを用いて基準マークの像260の位置が(45)式(C言語で記述されている)に従って演算される。
for(x=0,y=0,i=0;i<n;i++){x=x+cos (i) *posFactorM[i]*ss[i];y=y+sin(i)*posFactorM[i]*ss[i]; }・・・・(45)
ss[i]は、先に演算された各シークラインについてのサイズポイントとエッジポイントとのずれ量Diffであり、フェールのないシークラインの全部について、それぞれそのシークラインのずれ量ss[i]に位置ファクタposFactorM[i]が掛けられるとともにX軸,Y軸に平行な成分が演算されてX座標,Y座標毎にそれぞれ加算され、中心位置(x,y)が求められる。この中心位置の座標は、基準マークの像260の中心の、測定テンプレート座標面の原点からのX軸方向およびY軸方向における位置ずれを示す。前述のように、シークラインにフェールがあれば画像処理対象物の回転中心RCが、フェールがない場合の位置(正規の回転中心の位置と称すべきもの)からずれるのであるが、(44) 式により位置ファクタが演算され、その位置ファクタを用いて(45)式により位置ずれが演算されることにより、シークラインにフェールがある場合でも、フェールがない場合と同様に、像260の正規の回転中心に相当する中心の位置ずれが演算されるのである。したがって、得られた位置ずれに測定テンプレート座標面の基準座標面に対する位置ずれを加えた値が基準マーク260の基準座標面上における位置ずれを表すことになる。
【0145】
画像処理対象物が円形であってフェールがない場合には、位置ファクタ等にデフォルト値を用いて演算が行われる。この点は、画像処理対象物が角チップである前述の場合と同様である。
画像処理対象物が図30の線分や、図39の角チップ等である場合の前記説明においては、位置ファクタなる用語を使用しなかったが、実際の実施形態においては、これらの場合にも(44)式を用いて位置ファクタの演算が行われるのであって、前記 (8)式における1/3や、(28),(29)式における1/4等が位置ファクタに相当する。このことは(44)式に実際の値を代入してみれば容易に確かめ得る。(44)式は図形のいかんを問わず一般的に使用し得るものなのである。図30,図39等の説明において(44)式を使用しなかったのは、直観的に理解できるようにするためであり、これら簡単な例について直観的に演算した結果と、同じ例について(44)式を用いて演算した結果とを比較することにより(44)式の妥当性を確かめるためである。上記1/3,1/4等の値はシークラインにフェールが発生すれば勿論変わる。
また、例えば矩形の角部が斜めに45度で切り欠かれた八角形について上記円形の画像対象物についての演算がそのまま適用できることは勿論、一般的に傾斜した辺を有する画像処理対象物についてもサイズや位置の演算を同様に行い得る。
【0146】
以上、画像処理対象物がリードを有しない角チップである場合と円形の基準マークである場合とについて説明したが、プリント基板90に装着される電子部品には、クウォードフラットパッケージ型の電子部品のように複数のリード線を有するものがある。このような電子部品が画像処理対象物である場合には、パターンマッチングプロセスの組合わせであるパターンマッチングマネージャにより画像処理が行われる。パターンマッチングマネージャはパターンマッチングプロセスを複数回組み合わせることにより画像処理を行うものである。
【0147】
例えば、図46に示すQFP(クウォード フラットパッケージ型電子部品)の像270の場合は、QFP全体の輪郭に基づいてではなく、リードの像に基づいて画像処理が行われる。これは、QFPではリードの位置のデータに基づいて装着を行えばリードと基板のパターンとの誤差を最も小さくできるからであり、各リードを画像処理対象物とするパターンマッチングの組合わせによって、QFPのサイズ,位置,回転角度等が演算されるのである。
【0148】
画像処理時には、まず、リードの像272の1つが捜索される。そのために、リードの像272を1つ包含するのに適した大きさのサーチウインドウ276が設定され、その中で予め設定された複数組のポイントペアを含む捜索テンプレートを用いてリードの像272が捜索される。
【0149】
捜索ステップ,再捜索ステップ,測定ステップおよび再測定ステップのフルセットのパターンマッチングが行われてリードの像272の位置および回転角度が測定される。リードの像272の位置および回転角度が判れば、次に捜索ステップおよび再捜索ステップを含むサブセットのパターンマッチングにより1辺全部のリードの像272が捜索される。リードのピッチは予め判っており、次のリードの像272についての捜索ステップにおいて捜索テンプレート座標面の位置,回転角度は、その直前に再捜索ステップによって求められたリードの像272の位置および回転角度と、リード間のピッチとに基づいて相当正確に予測されるため、フルセットのパターンマッチングを行わなくても十分に精度良く次のリードの像272を捜索し得るのである。
【0150】
1辺全部のリードの像272についてパターンマッチングが行われ、全部のリードの像272の位置が演算されたならば、これらリードの像272の中心のX座標値,Y座標値が加算されるとともにリード本数で除され、1辺の中心座標が演算される。同様にして3辺のリードの像272がサブセットのパターンマッチングで捜索される。辺同士の位置関係は予め判っており、先に行われたパターンマッチングの再捜索テンプレート座標面の位置,回転角度に基づいて捜索テンプレートの位置,回転角度が設定される。4辺全部について各中心座標が演算されたならば、互に平行な2つの辺の各中心を結ぶ2本の直線a,bの交点が演算され、電子部品の中心座標とされる。QFPの像270の回転角度は、(46)式で求められる。
(直線aの傾き−90度+直線bの傾き)/2・・・・(46)
【0151】
電子部品がPLCC(プラスチック リーデッド チップ キャリヤ),BG(ボール グリッド アレイ)等である場合も、リードやボールを画像処理対象としてパターンマッチングマネージャによる画像処理が行われる。
例えば、電子部品がPLCCである場合、照射された光はリードにより多く反射される。本体からも反射光はあるが、リードに比べれば少なく、CCDカメラ134の撮像面には暗い本体の像の中に明るいリードの像が形成される。したがって、本体の像を背景とし、リードの像を画像処理対象物として、十分に本発明を実施し得るのである。
【0152】
このようにパターンマッチングまたはパターンマッチングマネージャによれば、殆どの種類の表面実装電子部品(基板表面に装着可能な電子部品)の像認識を行うことができる。マスタ捜索テンプレート,マスタ測定テンプレートの作成は必要であるが、それらテンプレートを使用した画像処理プログラムは共用でき、電子部品の種類毎に画像処理プログラムを作成することに比較すれば、プログラム作成に要する時間が短くて済むのである。リードをプリント基板の穴に差し込み、半田付けする垂直実装電子部品の画像もパターンマッチングやパターンマッチングの組合わせによって処理し得る。
【0153】
なお、画像処理時間は、サーチウインドウの中心からの画像処理対象物の中心のオフセット量が大きいほど長くなる。そのため、画像処理対象物が捜索された捜索テンプレート座標面の位置に基づいて、サーチウインドウの中心の位置を修正することが望ましい。例えば、QFPの像270の場合、複数個のQFPについての画像処理後、リードの像272の中心のサーチウインドウ276の中心からの平均的なはずれを求め、その平均的なはずれを0にするようにサーチウインドウの中心位置を修正するのである。
【0154】
部品装着ヘッド56が部品姿勢検出位置へ移動させられて、CCDカメラ134により電子部品が撮像される毎にパターンマッチングあるいはパターンマッチングマネージャと、オブジェクトベクトルの演算とが行われ、電子部品の識別,位置誤差および回転角度誤差の演算が行われる。図47のタイムチャートに示すように、インデックステーブル42の1回の間欠回転に要する時間Trのうち、部品装着ヘッド56が部品姿勢検出位置において停止している間に電子部品82に光が照射され、CCDカメラ134による撮像が行われる。撮像後、画像データはCCDカメラ134からフレームグラバメモリ164へ転送され、画像処理されるのであるが、画像データの転送と画像処理とは並行して行われる。
【0155】
フレームグラバメモリ164は、4個分の電子部品の画像データを並列的に記憶し得るようにされており、そのため、処理時間がインデックステーブル42の1回の間欠回転に要する時間より長い電子部品についても画像処理を行うことができる。画像処理は、画像処理結果が使用されるまでに終了すればよく、撮像から画像処理結果の使用までの間に間欠回転体としてのインデックステーブル42の複数回の間欠回転が許容されるのであれば、インデックステーブル42が1回間欠回転する間に画像処理を終了させることは不可欠ではなく、インデックステーブル42が複数回間欠回転する間に、その間欠回転数と同じ数の画像処理対象物の画像処理が行われればよい。本電子部品装着装置は、部品姿勢検出位置から部品姿勢修正位置まで4個の作業位置があり(図4参照)、インデックステーブル42が4回間欠回転する間に装着される4個の電子部品間においては、画像処理時間を融通し合うことが可能である。
【0156】
電子部品には、例えば、角チップのように形状が単純でリードを有せず、所要画像処理時間が短いものもあれば、QFPのように多数のリードを有し、所要画像処理時間が長い電子部品もあり、所要画像処理時間が短い電子部品について余った時間を所要画像処理時間が長い電子部品の処理に使うことができるのである。
全ての電子部品の画像処理がインデックステーブル42の1回の回転時間以内に終了しなければならないとすれば、インデックステーブル42の1回の間欠回転時間(停止時間と回転時間との和)が、画像処理が予定されている複数種類の電子部品のうちで最も長時間を要するものに合わせて決定される必要があり、間欠回転速度が低く抑えられてしまう。それに対して、本電子部品装着装置においては、4個の画像データが並列的にフレームグラバメモリ164に記憶され、インデックステーブル42が4回間欠回転する間にそれら画像データの処理が行われるため、4個の電子部品の各画像処理時間の合計が、画像処理が行われる電子部品の数と同じ回数の間欠回転時間以内であればよい。換言すれば、それら複数の電子部品の画像処理時間の平均が、インデックステーブル42の1回の回転時間以内であればよいのであり、間欠回転速度を高めることができる。
【0157】
その一例を図48に示す。図から明らかなように、1個の電子部品にそれぞれ要する画像処理時間Te1〜Te7には長短差があるが、4個ずつの画像処理時間の合計Tt1〜Tt4はそれぞれ、1回の間欠回転時間Trの4倍より短い時間であり、4種類の画像データの処理が可能である。
【0158】
このように本電子部品装着装置においてCCDカメラ128,134により撮像された電子部品および基準マークの画像データは、パターンマッチングやパターンマッチングマネージャによって処理されるのであるが、パターンマッチング,パターンマッチングマネージャは、捜索テンプレート,再捜索テンプレート,測定テンプレート,再測定テンプレートを用いて画像処理対象物を捜索し、エッジ点を演算するようにされており、テンプレートが設定された部分のみが捜索され、測定される。画像処理の必要な部分のみが処理され、画像処理の必要がない部分は画像データが得られても処理されないのである。そのため、電子部品に直接接触していない限り大抵の画像ノイズ(白点,黒点,しみ等)の影響を受けることなく画像処理を行うことができる。
【0159】
PLCCのようにリードが輪郭の内側にある電子部品について、リードのみの認識を行う場合のように、輪郭を認識しなくてもよい場合には、輪郭にノイズが接触していても、ノイズに影響されることなく画像処理を行うことができる。
また、PLCCのように輪郭を認識しなくてもよい画像処理対象物は、背景が黒、白あるいは柄模様であっても、背景に類似物がない限り、画像処理が可能である。例えば、本体と背景とが同色であり、あるいは背景の一部に本体と同じ色があれば、背景との混同により輪郭認識が困難なのであるが、リードは光沢があり、背景に類似の光沢物がない限り、捜索,測定することができる。捜索テンプレートや測定テンプレートの設定により画像処理対象物をリードに限定することにより、背景との混同を生ずることなく認識することができるのである。
【0160】
さらに、捜索ステップにおいては2個のポイントペア構成点の輝度差等光学的特性値の差の状態によって適合状態にあるか否かが判定され、再捜索ステップ,測定ステップ,再測定ステップにおいては、シークライン上における輝度等光学的特性値の変化勾配によってエッジ点が決定されるようになっている。そのため、QFPやPLCCのように画像処理対象物が比較的大きく、照明にむらが生じ易い場合でも、照明に殆ど差がない部分同士の間で光学的特性値の比較が行われることとなり、照明の偏りの影響を受けることなく、正確に画像処理を行うことができる。
【0161】
また、CCDカメラの固体撮像素子の大きさが変わっても、プログラムを実質的に変更することなく、容易に対応することができる。
【0162】
以上の説明から明らかなように、本実施形態においては、CCDカメラ128,134が撮像装置を構成し、フレームグラバメモリ164が画像データ記憶手段を構成し、DRAM156が捜索テンプレートデータ記憶手段,測定テンプレートデータ記憶手段を構成し、制御装置150のパターンマッチングプログラムの捜索ステップを実行する部分が判定手段を構成し、パターンマッチングプログラムのうち再捜索ステップ,測定ステップ,再測定ステップを実行する部分がエッジ点座標演算手段を構成している。制御装置150のパターンマッチングプログラムのうち再捜索ステップを実行する部分は確認手段の一種である中点基準型確認手段でもある。また、制御装置150のオブジェクトベクトル演算プログラムを実行する部分が対象物演算手段の一種である中点基準型対象物演算手段を構成している。制御装置150のパターンマッチングプログラムのうち、マスタ捜索テンプレート,マスタ測定テンプレート,捜索テンプレートあるいはエッジ点に基づいてシークラインを自動的に設定する部分がシークライン自動設定手段を構成し、パターンマッチングプログラムのうち、再測定ステップを繰り返し行う部分が繰返し手段を構成している。
【0163】
さらに、制御装置150のパターンマッチングプログラムのうち、捜索ステップ,再捜索ステップ,測定ステップ,再捜索ステップにおいて輝度を演算する点を指定する部分が点指定手段を構成し、指定された点の輝度値の演算を行う部分が仮想点データ演算手段を構成し、シークライン上の分割点の輝度値の演算を行う部分が分割点特性値取得手段を構成し、その演算結果に基づいて輝度の変化勾配が最大の点をエッジ点として捜索する部分がエッジ点捜索手段を構成している。
また、漢字ROM162,CRTインタフェース186およびCPU154が入力関連データ表示手段を構成し、オーバレイ表示メモリ166,CPU154,CRTインタフェース186が画像処理データ表示手段を構成し、CPU154の入力関連データを画像処理データに優先してモニタCRT装置188に優先して表示させる部分が入力関連データ優先表示手段を構成している。
インデックステーブル42が一定角度ずつ間欠的に回転する間欠回転体を構成し、円筒カム20,バレルカム34等がインデックステーブル42を間欠回転させる間欠回転体駆動装置としてのテーブル回転駆動装置を構成し、吸着ノズル80が間欠回転体にその間欠回転体の回転角度ピッチと等しい角度間隔で設けられ、それぞれ画像処理対象物を保持する保持手段を構成している。画像処理装置は、保持手段の停止位置の一つに保持手段に保持された画像処理対象物に対向する状態で設けられて、画像データ記憶手段に撮像装置により撮像された複数の画像のデータを並列的に記憶し、遅くとその並列的に記憶されている画像の数と同じ回数の間欠回転を間欠回転体が行う間にそれら画像のデータの処理を終了するように構成されていることとなり、電子部品装着装置が電子部品を保持手段の停止位置である20個の作業位置へ順次搬送するという意味で画像処理装置付搬送装置を構成している。
【0164】
以上、画像処理対象物の指定中心DCにマスタ測定テンプレート座標面の原点が置かれる場合について説明したが、マスタ測定テンプレート座標面の原点が指定中心DC以外の位置に置かれてもよい。この場合、回転中心RCと指定中心DCとの間の位置ずれ(または回転角度)に、指定中心DCとマスタ測定テンプレート座標面との間の位置ずれ(または回転角度)を加え、その値にさらにマスタ測定テンプレート座標面の基準座標面に対する位置ずれ(または回転角度)を加えることにより、指定中心DCの基準座標上における位置ずれ(または回転角度)が得られる。
【0165】
なお、上記実施形態においては、サイズ誤差がX軸方向とY軸方向とで異なる比率で生ずる場合に対処するために、両方向で別個にサイズファクタが演算されるようになっていたが、両方向のサイズファクタが同じであるとの仮定の下に演算されるようにしてもよい。例えば、図28の角チップ250においては、フェールの生じたシークラインを含むペアシークラインを除いて、X軸方向に平行な方向のすべてのペアシークラインについての測定スパンを本来のスパンで除した値と、Y軸方向に平行な方向のすべてのペアシークラインについての測定スパンを本来のスパンで除した値とが求められ、それら値のすべての平均値がサイズファクタとされるようにするのである。こうして求められたサイズファクタはX軸方向に平行なシークライン上のサイズポイントの演算にも、Y軸方向に平行なシークライン上のサイズポイントの演算にも共通に使用される。
【0166】
また、図43の円形の基準マークの像260のサイズファクタについても同様であって、図43に示されているペアシークラインのうち、フェールが生じたシークラインを含まないペアシークラインのすべてに関して、測定スパンを本来のスパンで除した値が求められ、それらの値の平均値であるサイズファクタがフェールが生じたシークラインを除くすべてのシークラインについてのpairRadiusに掛けられてサイズポイントが演算され、それらサイズポイントと対応するエッジポイントとのずれDiffが演算されるようにする。位置ファクタおよび位置ファクタの演算は前記実施形態と同じでよい。
【0167】
また、上記実施形態において、再捜索ステップは1回行われていたが、2回以上行われるようにしてもよい。1回目の再捜索ステップにおいてフェールが設定数以下であり、画像処理対象物のエッジ点が得られた後、更に再捜索テンプレートを設定して再捜索ステップを行うのであり、再捜索テンプレートは、前回の再捜索ステップにおいて用いられた再捜索テンプレートとエッジ点の演算結果とに基づいて、画像処理対象物とのずれがより少なくなる位置,角度で設定される。再捜索ステップが1回のみ行われるようにするより、複数回行われるようにする方が、次の測定ステップでフェールが発生する確率が低下することが経験上判っている。この理由は定かではないが、捜索ステップにおいて画像処理対象物と捜索テンプレートとのずれが大きく、辛うじて捜索対象物が存在すると判定された場合には、再捜索テンプレートと画像処理対象物とのずれがかなり大きくなる可能性があり、この場合には次の測定ステップにおいて測定テンプレートと画像処理対象物とのずれも大きくなってフェールが発生することがあるのに対し、再捜索ステップが2回以上行われれば、その確率が低下するためではないかと推測されている。
【0168】
また、画像処理対象物の形状,おおよその位置,回転角度が予め判っていれば、捜索テンプレートによる捜索を行わなくてもシークラインをエッジ点の演算可能な位置に設定することができ、始めから測定テンプレートを用いてエッジ点を求めることができる。
上記実施形態においては、再捜索テンプレートを用いて再捜索ステップを行った後、測定ステップが行われるようになっていたが、画像処理対象物のサイズ誤差や形状欠陥が小さい場合には、捜索ステップの直後に測定ステップを実行させることも可能である。この場合、前記再捜索テンプレートを測定テンプレートとして使用することも可能であるが、シークライン数がさらに多いテンプレートを使用することが望ましい。
【0169】
さらに、上記実施形態においてパターンマッチングにおける異常の判定は、プログラム中に設定された許容フェール数を越えるフェールがあるか否かにより行われていたが、例えば、フェールが一つでもあれば異常と判定し、フェールのない画像処理対象物についてのみオブジェクトベクトルの演算を行うプログラムと、少なくとも1つのフェールを許容し、フェールがあってもオブジェクトベクトルの演算を行うプログラムとを作成し、オペレータが選択し得るようにしてもよい。フェールを許容しないプログラムは画像処理に要する時間が短くて済むため、状況によってはこのプログラムを選択し、電子部品1個の装着に要する時間を短縮することが可能となる。
【0170】
また、上記実施形態において画像処理装置は、画像処理対象物の表面像を取得するものとされ、照明装置は画像処理対象物の表面に光を照射するフロントライト型とされており、画像処理対象物の投影像を取得する場合のように、吸着ノズルにバックライト発光板や反射板を設ける必要がなく、吸着ノズルが軽くなって、高速で移動させることが可能となるとともに、複数の吸着ノズルを近接して配置することが容易であり、多種類の電子部品を高速でプリント基板に装着し得る電子部品装着装置が得られる。
ただし、本発明は、画像処理対象物の投影像を取得して画像処理を行う装置にも適用することが可能である。
【0171】
また、本発明は、部品吸着ノズルが電子部品供給装置とプリント基板との間の直線的に移動して電子部品をプリント基板に装着する装置に設けられた画像処理装置、スクリーン印刷機において基準マークの画像処理を行う装置等、種々の画像処理装置に適用することができる。また、画像処理対象物は電子部品や基準マークに限らず、識別やオブジェクトベクトルの演算が必要な物は画像処理対象物となり得る。
【0172】
その他、特許請求の範囲を逸脱することなく、当業者の知識に基づいて種々の変形,改良を施した態様で本発明を実施することができる。
【図面の簡単な説明】
【図1】 本発明の一実施例である画像処理装置を備えた電子部品装着装置の外観を示す斜視図である。
【図2】上記電子部品装着装置のインデックステーブルを電子供給装置およびプリント基板移動装置と共に示す側面図である。
【図3】上記電子部品装着装置のインデックステーブルをテーブル回転駆動装置と共に示す正面断面図である。
【図4】上記電子部品装着装置に設けられた20個の作業位置を電子部品供給装置およびプリント基板と共に概略的に示す平面図である。
【図5】上記作業位置の一つである部品姿勢検出位置に設けられたCCDカメラを照明装置と共に示す正面図である。
【図6】上記CCDカメラを制御する制御装置を示すブロック図である。
【図7】上記制御装置のDRAMに記憶された事前処理プログラムを示す図である。
【図8】上記制御装置のDRAMに記憶された実行処理プログラムを示す図である。
【図9】上記制御装置のDRAMに記憶されたパターンマッチングプログラムを示す図である。
【図10】上記パターンマッチングプログラムを正方形の電子部品について実行するための設定データを示す図である。
【図11】図10に示す設定データに基づいて設定されるマスタ捜索テンプレートを電子部品と共に示す図である。
【図12】図10に示す設定データに基づいて設定されるマスタ測定テンプレートを電子部品と共に示す図である。
【図13】上記マスタ捜索テンプレートに基づく捜索テンプレートの生成を説明する図である。
【図14】上記パターンマッチングプログラムを一部が切り欠かれた円板について実行するための設定データを示す図である。
【図15】図14に示す設定データに基づいて設定されるマスタ捜索テンプレートを円板と共に示す図である。
【図16】図14に示す設定データに基づいて設定されるマスタ測定テンプレートを円板と共に示す図である。
【図17】上記パターンマッチングプログラムの捜索ステップにおいて捜索テンプレートが仮想画面に重ねられた状態を示す図である。
【図18】仮想画面上において指定された点の輝度を演算するための線形補間を説明する図である。
【図19】上記パターンマッチングプログラムの再捜索ステップの再捜索テンプレートが仮想画面に重ねられた状態を示す図である。
【図20】上記再捜索テンプレートのシークライン上に設定された分割点と撮像面を構成する固体撮像素子との関係を示す図である。
【図21】図20に示す分割点について演算された輝度を表す図表である。
【図22】上記分割点について演算された輝度を微分するための差分フィルタを示す図である。
【図23】上記分割点について演算された輝度を微分するための別の差分フィルタを示す図である。
【図24】図21に示す演算結果をグラフにして示す図である。
【図25】図22に示す差分フィルタを用いて行った微分の結果を表すグラフである。
【図26】図23に示す差分フィルタを用いて行った微分の結果を表すグラフである。
【図27】上記パターンマッチングプログラムの測定ステップにおいて測定テンプレートが仮想画面に重ねられた状態を示す図である。
【図28】パターンマッチングの実行後に行われる画像処理対象物のサイズ計算を角チップを例に取って説明する図である。
【図29】上記サイズ計算においてサイズポイントとエッジポイントとの差の演算を説明する図である。
【図30】画像処理対象物の回転中心および回転角度の演算を直線を例に取って説明する図である。
【図31】シークラインにフェールがある場合における画像処理対象物の回転中心の指定中心に対するずれの演算を説明する図である。
【図32】シークラインにフェールがある場合における画像処理対象物の回転中心の指定中心に対するずれの演算の別の例を説明する図である。
【図33】シークラインにフェールがある場合における画像処理対象物の回転中心の指定中心に対するずれの演算の更に別の例を説明する図である。
【図34】シークラインが互に直交する2方向に設定された場合における画像処理対象物の回転中心および回転中心の指定中心に対するずれの演算を説明する図である。
【図35】シークラインが互に直交する2方向に設定された場合における画像処理対象物の回転中心および回転中心の指定中心に対するずれの演算の別の例を説明する図である。
【図36】画像処理対象物の角度の演算に用いられる角度ファクタを示す図表である。
【図37】上記角度ファクタを座標面上において示す図である。
【図38】画像処理対象物の回転中心および回転角度の演算を説明する図である。
【図39】画像処理対象物の回転中心および回転角度の演算の別の例を説明する図である。
【図40】画像処理対象物の回転中心および回転角度の演算の更に別の例を説明する図である。
【図41】画像処理対象物の指定中心と回転中心とにずれがあり、画像処理対象物に位置および角度のずれがある場合における指定中心の位置の演算を説明する図である。
【図42】画像処理対象物の基準座標に対する位置ずれ量および角度ずれ量の演算を説明する図である。
【図43】画像処理対象物の一種である円形の基準マークにシークラインが設定された状態を示す図である。
【図44】上記基準マークのサイズ計算を説明する図である。
【図45】上記サイズ計算におけるサイズポイントの演算およびエッジポイントとの差の演算を説明する図である。
【図46】QFPについて行われるパターンマッチングを説明する図である。
【図47】上記電子部品装着装置のインデックステーブルの間欠回転時間とCCDカメラの露光時間および画像転送時間との関係を示すタイムチャートである。
【図48】上記電子部品装着装置における画像処理サイクルを説明するタイムチャートである。
【図49】前記撮像装置を制御する制御装置において物理画面上の画像データから仮想画面上の画像データを演算する物理画面/仮想画面変換ドライバを概念的に示す図である。
【符号の説明】
42 インデックステーブル
56 部品装着ヘッド
82 電子部品
90 プリント基板
128,134 CCDカメラ
150 制御装置
156 DRAM
164 フレームグラバメモリ
172 入力装置
188 モニタCRT装置
250 角チップ
260 基準マーク
270 QFP電子部品
[0001]
BACKGROUND OF THE INVENTION
  The present invention provides an image processing apparatus.In placeIn particular, a device for processing an image captured by an imaging device.In placeIt is related.
[0002]
[Prior art]
This type of image processing apparatus generally includes an imaging apparatus that captures an image processing object, an image data storage unit that stores data of an image captured by the imaging apparatus, and image data stored in the image data storage unit. Image data processing means for processing.
For example, in an image processing device in which the imaging device is configured by a CCD camera, binarized data is obtained based on the respective charge amounts of a large number of charge-coupled elements that constitute the imaging surface, whereby the edge of the image processing object, Size, position, rotation angle, etc. can be obtained. Conventionally, a normalized correlation method and a vectorized correlation method are known as methods for processing image data and recognizing an image processing target.
[0003]
[Problems to be solved by the invention]
An object of the present invention is to provide an apparatus and a method capable of processing image data by a method different from the normalized correlation method and the vectorized correlation method.
[0004]
[Means for solving the problems and functions and effects of the invention]
In order to solve the above problems, the image processing apparatus according to the present invention is configured as follows, and the following operations and effects are obtained.
(1) An imaging device that includes an imaging surface in which a large number of imaging elements are arranged, and that images an image processing object;
Image data storage means for storing data of an image captured by the imaging device;
While sandwiching the edge of the image processing object in between, a pair of two points located at a certain distance larger than the arrangement pitch of the image pickup device of the image pickup device, and at a plurality of positions on the edge Corresponding search template data storage means for storing data of a search template having a plurality of preset point pairs;
When the search template of the search template data storage means is overlaid on the screen on which the image represented by the image data of the image data storage means exists, the optical characteristic values of the pairs of points constituting the plurality of point pairs When the difference state is equal to or greater than the set state, it is assumed that one of the pair of points is located inside the edge of the image processing object and the other is in the matching state located in the background, and the plurality of sets of point pairs And determining means for determining that the image processing target is a search target that matches the search template if a set amount or more is in the matching state.
(Claim 1).
When an image is picked up by the image pickup apparatus in the image processing apparatus of this section, the image pickup surface is decomposed into a large number of pixels, and image data is created for each pixel and stored in the image data storage means. An “image represented by image data” is an image obtained on the basis of image data, and may be an image in which a pixel is used as a unit and an optical characteristic value is obtained for each pixel. It may be an image whose value is obtained at an arbitrary point.
An example of the former is an image that is considered as a set of electrical signals for each imaging element obtained by an imaging apparatus that includes a large number of imaging elements and generates an electrical signal corresponding to the light receiving state of each imaging element. Can be said to be an image physically formed on an imaging surface on which imaging elements are arranged. In this sense, this image is referred to as a physical image, and a screen on which the physical image exists (which matches the imaging surface) is referred to as a physical screen. The physical image data can be stored and reproduced by storing the electrical signal data for each image sensor in the storage means in association with the position of each image sensor.
In addition, image data representing a physical image actually exists. In this sense, a physical image can also be referred to as a real image in contrast to a virtual image described later, and a screen on which a real image exists may be referred to as a real screen. it can.
The image data representing the actual image may be analog data or digital data representing the magnitude of the electric signal for each image sensor, and for example, multi-stage digital data (referred to as gradation data) represented by 256 discrete values. Or binarized data binarized depending on whether or not the electrical signal for each image sensor exceeds a threshold value.
An example of an image in which an optical characteristic value is obtained at an arbitrary point without using a pixel as a unit is that the electrical signal data of each image sensor on the physical screen represents the optical characteristic value at the center point of each image sensor. It is an image that is considered as a set of continuous optical characteristic values that define the curved surface when it is assumed that the curved surface satisfies the optical characteristic values of these many points. The image data of this image can be stored as, for example, data of an expression representing the curved surface, and this image data is also a kind of real image.
On the other hand, when an arbitrary point on the screen is designated instead of obtaining the curved surface data in advance, the optical characteristic value of only that point is obtained by calculation every time each point is designated. Is also possible. In this case, the image does not actually exist, and if it exists, it is only virtualized. Therefore, it is referred to as a virtual image, and a screen on which the virtual image exists is referred to as a virtual screen.
Search template data is data that defines the position of the two points that make up a point pair on the screen. “To superimpose the search template on the screen on which the image represented by the image data exists” means that the screen is a physical screen. At each position specified by the search template data. It is to read the image data of a pixel from the image data storage means and obtain the optical characteristic value. When the screen is a virtual screen, it is assumed that the search template is placed on the virtual screen and specified by the search template data. The optical characteristic value of each point on the virtual screen is calculated from the physical image data. The physical image data in this case needs to be analog data or digital data representing the magnitude of the electric signal for each image sensor itself, or gradation data, and binary data has no meaning.
In any case, there is a difference between the image data corresponding to the image processing object and the image data corresponding to the background. In other words, unless there is a difference from the background, it is not possible to acquire information about the image processing object by image processing.
Therefore, if one point of the point pair is located inside the edge of the image processing object and the other point is in the background, in other words, the image data corresponding to one point of the point pair is the image processing object. If the data corresponding to the other point is data representing the background, the difference state of the optical characteristic values of the two points constituting the point pair should be equal to or greater than the set state. When the number (or rate) of pairs of point pairs whose state is not equal to or higher than the set state is equal to or less than a predetermined set number (or set rate), it is determined that the image processing target is a search target. be able to. Further, by searching for such a pair of point pairs, an image of the image processing object can be searched for on the screen.
“Optical characteristic value” is, for example, luminance, hue, etc., and “above set state” means that the difference in luminance, hue, etc. is greater than or equal to a set value, and the ratio of brightness, hue, etc. That is all.
When an optical characteristic value is obtained by superimposing a search template on a physical screen, the image data may be analog data or gradation data (hereinafter referred to as gradation data) or binarized data. In the case of gradation data or the like, it is optical that the difference between the value of one of the two points of the point pair and the value of the other point is greater than or equal to the set value, or the ratio of both values is greater than or equal to the set ratio. The difference state of the characteristic value is not less than the set state. In the case of binarized data, if one value of two points of the point pair is 0 and the other value is 1, the difference state of the optical characteristic value is equal to or greater than the set state.
When the position of the image processing object is substantially constant, the search template may be superimposed on the screen at a certain position, but when at least one of the position of the image processing object and the rotation angle is indefinite. The determination means repeats the determination while changing at least one of the position and the rotation angle of the search template until the determination result becomes affirmative or a predetermined change limit is reached. When a search template is changed, even if multiple search templates with different positions and rotation angles are prepared in advance, only the standard search templates with standard positions and standard rotation angles are prepared, and search templates with general positions and rotation angles are prepared. May be created by coordinate transformation as necessary. The “change limit” means that, for example, when a search area for searching for an image processing object is set, if the position of the search template is further changed, the search template has reached a position where the search template protrudes from the search area. The position of the search template has been changed a predetermined number of times.
One of the preferred fields of use of the image processing apparatus according to the invention is an electronic circuit assembly line. For example, in an electronic component mounting apparatus, an electronic component to be mounted on a mounting target material such as a printed circuit board or a reference mark provided on the printed circuit board is an image processing target. In a screen printing machine, the reference mark is provided on a screen. Reference marks and the like are image processing objects. Further, the image processing object is not limited to the outline of the entire object, and a part may be an image processing object. For example, in the case of a square chip, the chip itself is an image processing target. However, in an electronic component having leads, solder bumps, etc., the main body having the leads, solder bumps, etc. is used as the image processing target. In some cases, the lead or one solder bump is an object to be image processed. In addition to the leads positioned outside the outline of the main body, objects positioned inside the outline of other members, such as leads positioned inside and solder bumps, may be image processing objects. In the latter case, the search template is created with the outline of the object located inside the outline of the entire object as a search target, and inside the image of the outline of the entire object on the physical screen or the virtual screen. Then, the image processing target object is searched by superimposing the physical image or the virtual image of the object located inside at a position where the formation of the virtual image is scheduled.
As is clear from the above description, according to the invention of this section, it is possible to know the presence or absence of a search target and whether or not the image processing target is a search target using image data and a search template. An image processing apparatus can be obtained that can determine by performing the calculation and comparison of the optical characteristic values of two points constituting a point pair by the number of point pairs, and can perform processing easily and quickly. .
(2) Further, the search template data is generated by changing at least one of a rotation angle and a position of a master search template set with respect to the edge of the image processing object having no positional deviation, and generating the search template data. A search template generation means to be stored in the storage means;
Repeating means for repeating the search template generation by the search template generation means and the determination by the determination means until the determination result of the determination means becomes affirmative;
including (1) An image processing apparatus according to claim 2 (claim 2).
(3) Furthermore, means for generating a re-search template including a plurality of straight lines connecting two points constituting the plurality of point pairs of the search template as a plurality of seek lines,
Means for re-searching the search object by calculating coordinates of intersections of the plurality of seek lines of the generated re-search template and the edge of the image object;
including (1) Term or (2) An image processing apparatus according to claim 3 (claim 3).
If a re-search template is set by defining both ends of the seek line by two points constituting a plurality of point pairs of the search template, the re-search template can be easily set. The search template in this case is a search template that is determined that the image processing object is a search object that matches the search template, and a point pair that is greater than or equal to the set amount is in a matching state, so that the position of the image processing object is shifted to the image processing object. Even if there is a shift in the rotation angle or the like, it is guaranteed that the edge point can be calculated for a seek line larger than the set amount.
(4) Further, based on the search template in which the determination result of the determination unit is affirmative, the edges of the image processing target object are sandwiched, and a certain distance larger than the array pitch of the image pickup elements of the image pickup device is set. A measurement template generating means for generating a measurement template having a plurality of seek lines formed by connecting two points positioned apart from each other in a straight line and corresponding to a plurality of positions on the edge;
Measurement template data storage means for storing measurement template data which is data of the measurement template generated by the measurement template generation means;
The measurement template of the measurement template data storage means is overlaid on the screen on which the image represented by the image data of the image data storage means exists, and the coordinates of the edge points of the image processing object on each of the plurality of seek lines are set. Edge point coordinate calculation means to calculate and
including (1) Term or (3) An image processing apparatus according to any one of claims 1 to 4 (claim 4).
The above “screen on which the image represented by the image data exists” (1) Similarly to the image processing apparatus according to the item invention, it may be a physical screen, a real screen, or a virtual screen.
“Overlay the measurement template on the screen” means, for example, reading image data corresponding to the pixel specified by the measurement template data on the physical screen from the image storage device, or by specifying the seek line on the virtual screen The image data (optical characteristic value) of the point to be calculated is calculated based on the image data of the physical screen.
Since there is a difference in the optical characteristic value between the image processing object and the background, the change gradient of the optical characteristic value is maximized at the edge point position. Therefore, the edge point can be determined by obtaining the change in the optical characteristic value obtained for each pixel on the physical screen and by obtaining the change gradient of the optical characteristic value on the virtual screen.
On the physical screen, the edge point is obtained in units of pixels, but on the virtual screen, the edge point is obtained at an arbitrary point on the seek line, and the resolution of the image processing is increased.
According to the invention of this section, an image on which both searching for a search object and calculation of edge point coordinates is performed. An image processing apparatus is obtained. Therefore, for example, among the image processing objects, the edge point can be calculated only for the object determined to be the search object, and there is an object different from the object for which the edge point is to be calculated for the image processing object. When they are mixed, it is not necessary to perform the calculation for all the image processing objects, and a decrease in the image processing speed can be avoided.
If the measurement template is set by defining both ends of the seek line by two points constituting a plurality of point pairs of the search template, the measurement template can be easily set. The search template in this case is a search template that is determined that the image processing object is a search object that matches the search template, and a point pair that is greater than or equal to the set amount is in a matching state, so that the position of the image processing object is shifted to the image processing object. Even if there is a shift in the rotation angle or the like, it is guaranteed that the edge point can be calculated for a seek line larger than the set amount.
However, it is not essential to define the seek line by the two points that make up the point pair, and may be set separately from the point pair, and the number of seek lines may not be the same as the number of point pairs. .
According to the invention of this section, the edge point of the image processing object can be obtained. Thereby, for example, when the shape of the image processing object is known in advance, the size, position, rotation angle, etc. of the image processing object can be calculated with relatively few seek lines. If the number of seek lines is increased and many edge points are obtained even if the shape of the image processing object is not known in advance, the shape is obtained from the set of edge points, and the size, position, and rotation are obtained. An angle or the like can be obtained.
(5) Further, the image processing object includes a confirmation unit that confirms that the image processing target is a search target based on a plurality of edge point coordinates calculated by the edge point coordinate calculation unit, and the confirmation unit includes A midpoint reference type confirmation unit for performing the confirmation based on a deviation between an edge point of the image processing object on the seek line and a midpoint of the seek line. (Four) An image processing apparatus according to claim 5 (claim 5).
In the image processing apparatus according to the invention of this section, it is confirmed that the image processing object is a search object. For example, when there are multiple types of image processing objects and only the determination by the determination means can only determine that the image processing object may be a search object, and it is not possible to determine whether it is really a search object In addition, the confirmation means confirms that the image object is really a search object based on the calculation result of the edge point by the edge point coordinate calculation means.
The confirmation is performed based on the deviation between the edge point of the image processing object on the seek line and the midpoint of the seek line. For example, when the search object is a rectangular chip, the same number of seek lines of the same length are set for two sides parallel to each other, and the position of these seek lines is determined between the search object and the measurement template. If there is no deviation, it is determined that the midpoint of all seek lines matches the edge point of the search object. If the sum of the deviations considering the directionality between the edge point of the object and the midpoint of the seek line is 0, the image processing object can be confirmed to be the search object.
According to the invention of this section, it is possible to confirm whether or not the image processing object is a search object, and an effect of improving the reliability of the determination is obtained compared to the determination using only the search template. In addition, when another image process is performed after the determination, it is possible to avoid performing the process unnecessarily for the object that is not the search target.
(6) Furthermore, it includes an object calculation means for calculating at least one of the size, position and rotation angle of the image processing object based on the plurality of edge point coordinates calculated by the edge point coordinate calculation means, and The object calculation means calculates at least one of the size, position and rotation angle of the image processing object based on a distance between an edge point of the image processing object on the seek line and a midpoint of the seek line. Includes midpoint reference type object calculation means
(Four) Term or (Five) An image processing apparatus according to claim 6 (claim 6).
In the image processing apparatus according to the present invention, at least one of the size, position, and rotation angle of the image processing object is calculated based on the edge point coordinates. The necessary size, position and rotation angle are calculated. This calculation is performed on the seek line. This is performed based on the distance between the edge point of the physical object and the midpoint of the seek line.
If the number of coordinates of the edge point is so large that the shape of the image processing object can be specified, any of the size, position, and rotation angle of the image processing object can be calculated using only the coordinates of the edge point. Even when the number of coordinates of the edge point is small, for example, the size of the image processing object can be calculated by using auxiliary data such as data indicating the type of the image processing object. When the shape of the image processing object is one type such as a rectangle or a circle, the size of the image processing object can be calculated without auxiliary data.
According to the invention of this section, at least one of the size, position, and rotation angle of the image processing object can be known. As a result, for example, identification of image processing objects having the same shape but different sizes, pass / fail determination of positioning of the image processing object, calculation of misalignment correction amount, pass / fail determination of rotation angle determination, and rotation angle deviation correction A quantity calculation or the like can be performed.
Moreover, since the size of the image processing object is calculated based on the distance between the edge point of the image processing object and the midpoint of the seek line, the value used for the calculation can be small on average and the error is small. As a result, an accurate calculation result can be obtained.
(7) Further, automatic seek line setting that automatically sets the plurality of seek lines to positions where the expected positions of the edge points on the seek lines are expected to coincide with the edge points calculated by the edge point coordinate calculation means. Setting means;
Repeating means for repeating the automatic setting of the seek line by the automatic seek line setting means and the calculation of the edge point coordinates by the edge point coordinate calculating means on the automatically set seek line a plurality of times
including (Four) Term or (6) An image processing apparatus according to any one of Claims (Claim 7).
In the image processing apparatus according to the present invention, the seek line is automatically set by the seek line automatic setting means. The simplest example is that an image processing apparatus having a determination unit and an edge point coordinate calculation unit configures a point pair of a search template in which it is determined that the image processing target is a search target that matches the search template 2 This is a case where a straight line connecting points is automatically set as a seek line.
It is also possible to automatically set a seek line based on the coordinates of the edge point calculated by the edge point coordinate calculation means and further calculate the edge point using this as a second measurement template. If the number of seek lines in the second measurement template is set larger than the number of seek lines in the first measurement template, the coordinates of the edge points become more accurate and numerous, and the size, position, rotation angle, etc. are more accurate. Is measured.
In this way, when the seek line is automatically set for the second and subsequent times, based on the edge point coordinates calculated immediately before, the planned edge point position (for example, the midpoint) on the seek line matches the actual edge point position. If the seek line is automatically set at the expected position, the greater the number of operations, the smaller the error between the expected edge point position on the seek line and the actual edge point of the image processing object, and the coordinates of the edge point. Can be obtained with high accuracy.
According to the invention of this section, since the seek line is automatically set by the seek line automatic setting means, it is possible to obtain an effect that the amount of work required by the user of the image processing apparatus can be reduced. Further, an image processing apparatus that can calculate the coordinates of the edge points of the image processing object with higher accuracy is obtained.
(8) The image pickup device generates an electric signal corresponding to the light receiving state of each of the multiple image pickup devices, and the image data storage means stores the electric signal data of each of the image pickup devices. Is stored in association with the position of the image processing apparatus, and the image processing apparatus
Furthermore, a point designating unit for designating an arbitrary point on the virtual screen corresponding to the physical screen formed by the image data of the image data storage unit,
Virtual point data calculating means for calculating an optical characteristic value of a specified point based on optical characteristic value data on the physical screen for each point specification by the point specifying means;
including (Four) Term or (7) An image processing apparatus according to any one of Claims (Claim 8).
In the image processing apparatus according to the invention of this section, the optical characteristic value of an arbitrary point on the virtual screen is calculated every time a point is designated by the point designating means. A virtual screen is a collection of innumerable points, of which optical characteristic values of only necessary points specified by the point specifying means are calculated. The
In this way, every time a point is designated by the point designating means, the optical characteristic value is calculated, and the calculation is performed only for the necessary points, so that the time required for the entire image processing can be reduced. Further, the storage capacity of the optical characteristic value storage means for storing the calculated optical characteristic value may be small.
(9) The point designating unit designates one of a plurality of division points set at a pitch smaller than the arrangement pitch of the imaging elements on the seek line as the arbitrary point, and the virtual point data The calculation means includes a division point characteristic value acquisition means for acquiring the optical characteristic value of the designated division point, and the image processing apparatus acquires the optical characteristic of the division point acquired by the division point characteristic value acquisition means. Includes edge point search means for searching for the sharpest change point of the optical characteristic value on the seek line based on the value as an edge point (8) An image processing apparatus according to claim 9 (claim 9).
In the image processing apparatus according to the invention of this section, when the screen on which the seek line is superimposed is a physical screen, the optical characteristic value of the dividing point is the image data storage means that stores the image data of the pixel corresponding to the position of the dividing point. The edge point is searched for based on the optical characteristic values. Edge points are searched on a pixel-by-pixel basis.
When the screen on which the seek line is superimposed is a virtual screen, the dividing point can be set on the virtual screen regardless of the pixel size of the physical screen, and the optical characteristic value of the dividing point is the optical value on the physical screen. Calculation is performed based on characteristic value data (image data).
According to the invention of this section, the search for the edge point is performed only on the seek line, and the edge point is determined based on the optical characteristic values at the limited number of division points. Edge points can be determined. Further, the division points on the virtual screen are set at a pitch smaller than the pitch of the image sensor, and the optical characteristic value is calculated based on the optical characteristic value data on the physical screen. Changes in the optical characteristic values are searched at a finer pitch on the seek line, and the resolution of the image processing is increased.
(10) Furthermore, an input device;
A monitoring device;
Input related data display means for causing the monitor device to display input related data related to the input of the input device;
Image processing data display means for displaying on the monitor device image processing data such as progress and results of image processing by the image processing device;
Input related data priority display means for giving priority to display by the input related data display means over display by the image processing data display means;
including (1) Term or (9) An image processing apparatus according to claim 10 (claim 10).
In the image processing apparatus according to the invention of this section, the display unit of the input related data and the display unit of the image processing data are used together, and when the display of both data is necessary at the same time, the display of the input related data has priority. Is done.
“Input-related data” is not limited to the data itself input by the input device, but is used to input data such as data obtained by performing an operation based on the input data and data read from the storage means. Including data obtained accordingly. By displaying this input-related data and image processing data on the monitor device, the operator can know whether or not the data input has been performed correctly and the progress and result of the image processing. Etc. can be performed.
According to the invention of this section, it is possible to display both input-related data and image processing data using a single monitor device, and an image processing device that has a simple configuration and is inexpensive can be obtained. Moreover, since display of input related data is given priority, data input is not hindered by display of image processing.
(11) The imaging device is preliminarily selected from at least one of an electronic component mounted on a printed circuit board to form an electronic circuit board, a reference mark provided on the printed circuit board, and a reference mark provided on a screen of a screen printing machine. Imaging a defined object as the image processing object The search template data storage means stores the search template set in advance for an edge of the predetermined one, and the determination means is imaged by the imaging device. It is determined that the image processing object is the predetermined object. (1) Term or (Ten) An image processing apparatus according to any one of the items.
Search objects are predetermined ones among electronic components mounted on a printed circuit board to constitute an electronic circuit board, reference marks provided on the printed circuit board, and reference marks provided on the screen of a screen printing machine. In this case, since the shape and dimensions are known in advance, it is easy to generate and set search templates, re-search templates, measurement templates, etc. Since it is required to perform detection, these are very suitable as an application object of the present invention.
(12) The edge point coordinate calculation means uses the point having the largest absolute value of the change gradient of the image data on the seek line based on the image data stored in the image data storage means as the edge point. Is to calculate coordinates (Four) Term or (9) An image processing apparatus according to any one of the items.
As the image data, optical characteristic values of each part of the image, for example, brightness value data can be used. At the edge point, the absolute value of the change gradient of the optical characteristic value is usually maximized.
(13) When the absolute value of the change gradient of the image data on the seek line is equal to or less than a set value, the edge point coordinate calculation means determines that an edge point cannot be detected for the seek line. Includes fail processing means for preventing the calculation of the coordinates of the edge points. (12) The image processing apparatus according to item.
For example, if dirt is attached near the edge point of an image processing object whose luminance value is larger than the surrounding area, or there is a defect, the luminance value in the vicinity of the edge point decreases and differs from the background luminance value. Becomes smaller. Even in such a case, if the point where the absolute value of the change gradient of the image data on the seek line is the largest is the edge point, the boundary between the normal surface of the image processing object and the dirt or missing portion is erroneously edged. There is a possibility of being pointed. This aspect is effective in avoiding such inconvenience.
(14) Furthermore,
Object computing means for computing at least one of the size, position and rotation angle of the image processing object based on a plurality of edge point coordinates computed by the edge point coordinate computing means;
When the number of seek lines in which the failure has occurred is smaller than a set number, the object calculation means performs at least one calculation of the size, position, and rotation angle, and the number of seek lines in which the failure has occurred is set to the set number. If this is the case, object calculation means control means for preventing at least one calculation of the size, position and rotation angle by the object calculation means;
including (13) The image processing apparatus according to item.
(15) The object calculation means includes actual edge point coordinates that are the coordinates of the actual edge point on the seek line on which the edge point coordinate calculation has been performed by the edge point coordinate calculation means, and the target position of the edge point. Image processing object position deviation calculation means for calculating the position of the representative point of the image processing object as the direction and amount of deviation from the target representative point position based on a set of deviations from the target edge point coordinates. (14) The image processing apparatus according to item.
The calculation of the direction and amount of deviation of the representative point position of the image processing object from the target representative point position takes into account whether or not multiple seek lines have failed and which seek line has failed. Done.
(16) A size calculation unit that calculates a size factor that is a ratio between a size calculated by the size calculation unit and a normal size by the size calculation unit that calculates the size of the image processing target. And the image processing object position deviation calculating means includes a size factor calculated by the size factor calculating means and a coordinate of a normal edge point on the seek line of the image processing object having a normal dimension. Including target edge point coordinate calculation means for calculating the target edge point coordinates based on certain normal edge point coordinates (15) The image processing apparatus according to item.
(17) The size factor calculating unit includes a single size factor acquiring unit that acquires a simple average value of a ratio between an actual dimension and a normal dimension in different directions of an image of the image processing object as a size factor. (16) The image processing apparatus according to item.
(18) A plurality of size factor obtaining means for obtaining a plurality of size factors by separately calculating a ratio between an actual dimension and a normal dimension in different directions of the image of the image processing object. including (16) Term or (17) The image processing apparatus according to item.
(19) Until the determination unit determines that the image processing object is a search object that matches the search template, the determination is performed on a plurality of types of search templates having different positions and rotation angles. What to do (1) Term or (18) An image processing apparatus according to any one of the items.
(20) Until the determination unit determines that the image processing object is a search object that matches the search template, the determination is performed on a plurality of types of search templates having different positions and rotation angles. The image processing apparatus performs each pair of search templates determined by the determining means that the image processing object is a search object that matches the search template among the plurality of types of search templates. Including first seek line setting means for setting the seek line by connecting the point pairs in a straight line. (1) Term or (19) An image processing apparatus according to any one of the items.
(21) Further, the apparatus further includes second seek line setting means for setting the seek line based on the edge point coordinates calculated by the edge point coordinate calculation means, and the edge point coordinate calculation means is set by the second seek line setting means. The edge point is calculated again for the determined seek line. (20) The image processing apparatus according to item.
(22) The second seek line setting means is configured by the first seek line setting means based on the edge point coordinates calculated by the edge point coordinate calculation means and data of a master measurement template set in advance. Set more seek lines than the set number of seek lines. (twenty one) The image processing apparatus according to item.
(23) (1) Term or (twenty two) An electronic component in which the image processing apparatus according to any one of the items is engaged with a plurality of parts of the intermittently rotating intermittently rotating body at the same angular interval as the intermittently rotating angle and sequentially moved to a plurality of positions. Provided in an electronic component transport apparatus that includes a holder and transports an electronic component held by the electronic component holder from a start point that is one of the plurality of positions to an end point that is another one, and the start point and the end point The image pickup device is arranged at a midpoint between and the image of the electronic component held by the electronic component holder is picked up, and the image data storage means includes the image data from the midpoint to the end point. An image data memory for storing image data of an image processing object obtained by imaging a plurality of times equal to or less than the number of intermittent movements of the electronic component holder, and the image processing apparatus includes at least By the electronic component image reaches the end point, completing the electronic component transporting apparatus processing the image data corresponding to each electronic component.
In the electronic component conveying apparatus having this configuration, when an image processing object that requires a long time for image processing and an image processing object that requires a short time are mixed and conveyed, the image processing apparatus has a short processing time. However, the remaining time can be used to perform processing that requires a long processing time, and the intermittent rotation time (sum of the stop time and the rotation time) of the intermittent rotating body can be shortened.
(24) The start point is a receiving position where the electronic component holder receives the electronic component from the component supply device, and the end point is a mounting position where the electronic component holder mounts the electronic component on a mounting object. is there (twenty three) The electronic component conveying apparatus according to the item.
[0048]
DETAILED DESCRIPTION OF THE INVENTION
  Less than,It is an embodiment of the present inventionAn image processing apparatus of an electronic component mounting apparatus will be described in detail with reference to the drawings.
  1 and 2, reference numeral 10 denotes a bed, and a pair of support walls 12 are erected on the bed 10. The support wall 12 is provided in parallel to the Y-axis direction (left-right direction in FIG. 2) orthogonal to the X-axis in a horizontal plane at a position spaced apart in the X-axis direction, which is the printed board conveyance direction. These support walls 12 support the cam box 14 at their upper ends, and a front wall 16 is provided on the apparatus front end side of the support wall 12, and covers the apparatus together with an openable / closable cover 17. . FIG. 2 shows a state in which the support wall on the front side is removed.
[0049]
A base plate 18 is stretched between the pair of support walls 12 in the vertical direction so as to be parallel to the X-axis direction. As shown in FIG. 3, a cylindrical cam 20 is fixed to the cam box 14, and the cam box 14 and the cylindrical cam 20 allow the rotation shaft 22 to be rotated around a vertical axis by bearings 24 and 26 and not to move in the axial direction. It is supported. The upper end portion of the rotary shaft 22 is protruded above the bottom wall 28 of the cam box 14, and a plurality of rollers 32 are rotated around a vertical axis on a large-diameter disk portion 30 provided at the protruding end portion. It is attached so that it can be sequentially engaged with the groove 36 of the barrel cam 34.
[0050]
Further, the lower end portion of the rotary shaft 22 is projected from the cylindrical cam 20 to form a large-diameter fitting portion 40 and to be fitted into the fitting hole 44 of the index table 42. The index table 42 is supported by the base plate 18 via bearings 46 and 48 so as to be rotatable about a vertical axis and not movable in the axial direction, and is provided in the fitting portion 40 so as to extend downward. The pin 50 and the pin hole 52 are engaged to transmit the rotation of the rotary shaft 22. Therefore, when the barrel cam 34 is rotated by a motor (not shown), the rollers 32 are sequentially engaged with the grooves 36 along with the rotation, and when the rotary shaft 22 is rotated, the index table 42 is intermittently rotated by a certain angle. It is done.
[0051]
On the index table 42, 20 sets of component mounting heads 56 (only two sets are shown in FIG. 3) are attached at equal angular intervals on a circumference around the rotation axis. As shown in FIG. 5, there are 20 work positions such as a component suction position, a component posture detection position, a component posture correction position, a component mounting position, and a nozzle return position. The component mounting head 56 is sequentially moved to 20 work positions by intermittent rotation of the index table 42.
[0052]
The component mounting head 56 is fitted to the index table 42 in a pair of guide rods 58 (only one is shown in FIG. 3) so as to be slidable in the vertical direction. The lower ends of the pair of guide rods 58 are fixed to the support member 60, and the head main body 62 is supported by the support member 60. The upper ends of the pair of guide rods 58 are connected by a connecting plate 64, and a roller 66 is attached to the connecting plate 64 so as to be rotatable about an axis extending in the radial direction of the index table 42. It is engaged with the formed groove 68. The groove 68 has a height gradually changed in the circumferential direction as shown in FIG. 2, and when the index table 42 is rotated, the component mounting head 56 has the highest component suction position and the lowest component mounting position. Can be raised and lowered between.
[0053]
The support member 60 is also fixed with a lower end portion of a pipe 72 fitted in an airtight and axially movable manner in a fitting hole 70 formed in the index table 42 in the vertical direction. The fitting hole 70 is connected to a negative pressure source by a passage 74 formed in the index table 42, a passage 76 formed in the rotary shaft 22, a port 78 formed in the cylindrical cam 20, and a hose (not shown). The negative pressure is supplied from 72 to the component mounting head 56, and the negative pressure supply state is maintained by the lifting and lowering of the pipe 72 even when the component mounting head 56 is raised and lowered.
[0054]
A suction nozzle 80 is fitted to the head body 62 so as to be rotatable about its own axis and movable in the axial direction. The suction nozzle 80 sucks the electronic component 82 by a vacuum supplied through the pipe 72 and the like, and is biased upward with respect to the head main body 62 by a spring 84 and is moved to the component suction position and the component mounting position. The electronic parts 82 are sucked and mounted on the printed circuit board 90 (see FIG. 2) by being pushed down by the pressing members 88 of the respective pressing devices 86 provided.
[0055]
As shown in FIG. 2, an electronic component supply device 100 is provided at the component suction position. The electronic component supply device 100 is in contact with the rotation trajectory of the index table 42 and is provided with a movable table 102 that is movable along a straight line extending in a direction parallel to the X axis. A plurality of component supply cartridges 104 arranged in the moving direction, and the moving table 102 is moved by a moving table moving device (not shown), so that one of the plurality of component supply cartridges 104 becomes a component supply position. Moved to.
[0056]
The component supply cartridge 104 holds the electronic component 82 on a component holding tape and supplies it as a taped electronic component. The component holding tape is supplied in the X-axis direction in a horizontal plane by a tape feeder using an air cylinder as a drive source. Of the at least one electronic component 82 that is sent in the orthogonal Y-axis direction and the cover film that covers the component receiving recess of the component holding tape is peeled off, the leading electronic component 82 is positioned at the electronic component extraction position.
[0057]
At the component mounting position, as shown in FIG. 2, a printed circuit board moving device 108 that supports the printed circuit board 90 as a material to be mounted and moves it in the X-axis direction and the Y-axis direction is a substrate conveyor 109 (see FIG. 1). It is provided below. The X-axis table 110 of the printed circuit board moving device 108 is guided by the guide rail 116 and moved in the X-axis direction by an X-axis moving device 114 composed of an X-axis servo motor 112, a ball screw and a nut (not shown). .
[0058]
A Y-axis table 118 is mounted on the X-axis table 110 so as to be movable in the Y-axis direction. A Y-axis moving device 122 configured by a Y-axis servo motor, a ball screw 120, a nut (not shown), and the like (not shown). , Guided by the guide rail 124 and moved in the Y-axis direction. Although not shown on the Y-axis table 118, a substrate support lifting device that receives the printed circuit board 90 from the substrate conveyor 109, supports the printed circuit board 90 from above and below by the substrate pressing member and the substrate support member, and moves up and down. Is provided. The substrate conveyor 126 conveys the printed circuit board 90 in the X-axis direction. The printed circuit board 90 supported by the substrate support lifting device is a substrate by combining the movement of the X-axis table 110 and the Y-axis table 118. It is moved to an arbitrary position in the horizontal plane at a position below the conveyor 109.
[0059]
The printed circuit board 90 is provided with fiducial marks at two locations separated on a diagonal line, and images are taken by a CCD camera 128 (see FIG. 6) provided on the bed 10. After the printed circuit board 90 supported by the substrate supporting lifting device is lowered, it is moved by the printed circuit board moving device 108 to move the reference mark to the imaging position that coincides with the axis of the CCD camera 128, and the reference mark is imaged. .
[0060]
The printed board moving device 108 is provided at a position lower than the board conveyor 109 and lower than the electronic component supply apparatus 100. The board support lifting / lowering device is provided at such a height that the board support lifting / lowering device can be inserted into the lower side of the component supply cartridge 104 while supporting the printed board 90 on the board support surface. Therefore, the printed circuit board moving device 108 can be provided so as to overlap the electronic component supply device 100 in the horizontal direction, and the electronic component mounting device can be configured compactly.
[0061]
An image acquisition device 130 is provided at the component posture detection position as shown in FIG. The image acquisition device 130 includes an illumination device 132 and a CCD camera 134 as an imaging device. The lighting device 132 includes a first surface light emitter 138 and a second surface light emitter 140. The first surface light emitter 138 has a plate-like shape, is provided with a large number of light-emitting diodes that are horizontally disposed and covered with a milky white diffuser, and emits light upward from the diffuser. The first surface light emitter 138 is provided at a position that is concentric with the component mounting head 56 that has been moved to the component posture detection position, and a through hole 142 that passes through the center line in the vertical direction is provided. The second surface light emitter 140 is provided perpendicular to the lower surface of the first surface light emitter 138 and includes a number of light emitting diodes covered with a diffuser plate, from the diffuser plate to the center line side of the first surface light emitter 138. Emits light.
[0062]
A half mirror 144 is provided below the first surface light emitter 138 so as to be inclined by 45 degrees with respect to the center line of the first surface light emitter 138. A CCD camera 134 is provided on the opposite side of the first surface light emitter 138 with the half mirror 144 therebetween. The CCD camera 134 is provided with a lens 148 on a main body 146 and is disposed vertically and upward. In the main body 146, an imaging surface is formed by arranging a large number of solid-state imaging elements in a single plane. .
[0063]
The electronic component 82 is irradiated with light emitted from the first surface light emitter 138, and light emitted from the second surface light emitter 140 is reflected by the half mirror 144 and irradiated through the through hole 142. Illumination is performed as if light was emitted from the CCD camera 134, and the entire electronic component was irradiated with light evenly. The first surface light emitter 138, the second surface light emitter 140, and the half mirror 144 constitute the illumination device 132. The reflected light from the electronic component 82 passes through the half mirror 144 and enters the CCD camera 134, and an image is formed on the imaging surface.
[0064]
The CCD camera 134 is controlled by the control device 150 shown in FIG. 6 together with the CCD camera 128 for imaging the reference mark on the printed circuit board 90. The CCD cameras 128 and 134 and the control device 150 constitute an image processing device. The control device 150 is mainly a computer, and includes a CPU 154, a DRAM (dynamic ram) 156, an SRAM (static ram) 158, a PROM (programmable rom) 160, a kanji ROM 162, a frame grabber memory 164, and an overlay for four sides. A display memory 166 is included, and these are connected to each other by an internal bus (not shown) on the substrate 167.
[0065]
A two-channel serial interface 170 is also connected to the internal bus, and an input device 172 is connected. The input device 172 is a device for inputting information necessary for image processing, such as the type and number of objects to be processed, together with information and commands necessary for the operation of the entire electronic component mounting apparatus, and has a numeric keypad, alphabet keys, and the like. However, it is provided on the front wall 16 as shown in FIG. An Ethernet interface 174 and a memory card interface 176 are also connected to the bus.
[0066]
The Ethernet interface 174 is an interface for performing communication with a computer that controls a part other than the image processing apparatus of the electronic component mounting apparatus. For example, an external control device (if any option is required) can be connected to the control device 150, and the Ethernet interface 174 exchanges data via the P1 connector 168. In the electronic component mounting apparatus, the control device for controlling the index table 42, the component mounting head 56, the pressing device 86, the electronic component supply device 100, the printed board moving device 108, the board conveyor 109, etc. is also an image mainly using a computer. It is provided separately from the control device 150 of the processing apparatus, and is connected to the P1 connector 168 via an external bus (not shown). Since this other control device is not related to the present invention, its illustration and description are omitted. The memory card stores a program created in advance for performing image processing. If the memory card is set in the control device 150, the CPU 154 uses the PROM 160 to execute the program and the program in the memory card. Data is read through the memory card interface 176 and stored in the DRAM 154.
[0067]
Further, a CCD camera interface 180 is connected to the bus, and a CCD camera 128 for imaging a reference mark on the printed circuit board 90 and a CCD camera 134 of the image acquisition device 130 are connected. The reference marks obtained by the imaging of the CCD cameras 128 and 134 and the image data of the electronic component 82 are stored in the frame grabber memory 164 via the CCD camera interface 180, respectively. As described above, four frame grabber memories 164 are provided, and the image data of the four electronic components 82 that are continuously mounted are sequentially stored in each frame grabber memory 164. Further, since the image data of the reference mark is acquired and used at a different timing from the image data of the electronic component 82, one of the frame grabber memories 164 for storing the image data of the electronic component 82 is also used. The
As in the case where the image processing object is particularly large, it is necessary that the imaging device has a large number of imaging elements in one line, or it is necessary to image the moving image processing object. In some cases, a line sensor is used instead of the CCD camera. Therefore, the line sensor board interface 184 is provided on the board 167 and is connected to the frame grabber memory 164. When the line sensor is used, an optional line sensor board (not shown) is connected to the line sensor board interface 184 via the line sensor bus 182, and image data obtained by imaging the line sensor is stored in the frame grabber memory 164.
[0068]
Further, a CRT interface 186 is connected to the bus, and a monitor CRT device 188 is connected. As shown in FIG. 1, the monitor CRT device 188 is provided on the front wall 16 along with the input device 172, and is capable of both color display and monochrome display.
As described above, image data of four monochrome images obtained by imaging of the electronic component 82 are stored in parallel in the frame grabber memory 164, while the overlay display memory 166 stores 16 images. There are four memories for storing color image data to be displayed in color. On the monitor CRT device 188, the color image corresponding to the monochrome image among the four color images is superimposed on any one of the four monochrome images, and the progress and result of the image processing are displayed. .
Data input using the input device 172 on the same monitor CRT device 188 is also displayed in color. During this display, the kanji ROM 162 is used.
[0069]
When the electronic component 82 is mounted on the printed circuit board 90 in the electronic component mounting apparatus, the component mounting head 56 takes out the electronic component 82 from the component supply cartridge 104 at the component suction position as the index table 42 rotates, and then the component The electronic component 82 is imaged by the CCD camera 134 at the posture detection position. The image data of the electronic component 82 is processed by the control device 150, and the amount of horizontal displacement (position error in the X-axis and Y-axis directions) of the electronic component 82 and the amount of rotation angle deviation around the axis of the suction nozzle 80 (rotation angle). Error) is calculated, the positional deviation is corrected by the movement of the printed circuit board 90, and the rotational angle deviation is corrected at the component posture correction position. Although not shown, a nozzle rotation driving device that engages with the suction nozzle 80 and rotates the suction nozzle 80 is provided at the component posture correction position, and the suction nozzle 80 corrects the rotational angle deviation of the electronic component 82. It can be rotated by the necessary angle. After correcting the rotational angle deviation, the electronic component 82 is mounted at a predetermined position on the printed circuit board 90 at the component mounting position. After mounting, the suction nozzle 80 is rotated in the opposite direction by the amount rotated for correcting the rotational angle deviation at the nozzle return position, and returned to the rotational position before the rotational angle deviation correction.
[0070]
The printed circuit board 90 is conveyed by the substrate conveyor 109, and the reference mark is imaged by the CCD camera 128 while being supported by the substrate supporting lifting device. Based on the image data, the amount of horizontal displacement (horizontal position error) and the vertical axis The amount of rotation angle deviation around (rotation angle error) is calculated. When the electronic component 82 is mounted on the printed circuit board 90, the printed circuit board 90 is moved by the printed circuit board moving device 108, and the horizontal position error is corrected together with the horizontal position error of the electronic component 82. Further, the rotation angle error of the printed circuit board 90 is corrected together with the rotation position error of the electronic component 82 by rotating the suction nozzle 80.
[0071]
Hereinafter, processing of image data obtained by imaging with the CCD cameras 128 and 134 will be described.
The program and data for image processing are stored in the memory card as described above. If the memory card is set, it is read and stored in the DRAM 156. Image processing programs read from the memory card are shown in FIGS.
[0072]
The program shown in FIG. 7 is a preprocessing program. The preprocessing program is executed when one production program is started, that is, after the preprocessing program is stored in the DRAM 156. First, it is determined whether or not to perform pattern matching for one of all image processing objects necessary for execution of one production program. If so, a search template is generated based on the master search template. Stored in the DRAM 156. Similar processing is sequentially performed for all the image processing objects.
[0073]
The master search template has a plurality of point pairs each having two points as a pair, and a coordinate plane (referred to as a master search template coordinate plane) that defines the point pairs coincides with a reference coordinate plane of the image processing apparatus. It is what. That is, the origin and coordinate axis directions of the master search template coordinate plane coincide with the origin and coordinate axis directions of the reference coordinate plane in which the origin is set at the center of the field of view of the CCD cameras 128 and 134. The master search template is created in advance based on the shape and size of the image processing object and stored in the memory card, and is read into the DRAM 156 together with the preprocessing program.
[0074]
FIG. 10 shows an example of master search template setting data when the image processing object is a square electronic component, and FIG. 11 shows a master search template 200 set by the data. In the data of FIG. 10, the data of the seventh, eighth, tenth, and eleventh lines and hs (half span) = 5.5 of the fifth line are the setting data of the master search template. Pair means that another point pair is set symmetrically with respect to the center line of the image processing object on the extension line of two points constituting the point pair. For example, each of (7) ′, (8) ′, (10) ′, (11) ′ for each point pair 202 of (7), (8), (10), (11) shown in FIG. A point pair 202 is set. The numbers in parentheses attached to these point pairs 202 coincide with the line numbers in FIG. Reference numeral 204 denotes an electronic component.
[0075]
In the master search template, for a master image processing object having no error in size, position, or rotation angle, one of two points constituting each pair of point pairs is inside the image processing object, and the other is It is created such that it is located outside and the midpoint of the two points of the point pair is located on the edge of the master image processing object. If it is shown in the figure, it will be as shown in FIG.
In general, it is not indispensable that the midpoint of the two points of the point pair is positioned on the edge of the master image processing object, and the two points are respectively located inside the edge of the image processing object. It suffices to be designated as outside.
In the example shown in FIG. 11, one of the two points of the point pair 202 is shared with one point of another point pair 202, but this is not essential.
Further, in FIG. 11, two points constituting the point pair 202 are connected by a straight line in order to easily show which point constitutes the point pair 202. However, the straight line data is not actually set.
[0076]
FIG. 14 shows the data of the master search template when the image processing object is the disc 206 of FIG. 15 with a part cut away. In this master search template 208, the point pairs 210 of (15) to (17) provided in the circumferential portion are paired with the point pairs 210 of (15) ′ to (17) ′. Point pair 210 is not paired with another point pair.
[0077]
In the electronic component mounting apparatus, the image processing object is an electronic component or a reference mark, and master search template data is created in advance and stored in a memory card for all types of electronic components to be mounted and different types of reference marks. And stored in the DRAM 156 when image processing is executed. Therefore, when the search template is generated, the master search template data is read from the DRAM 156 according to the type of the image processing object for which the search template is to be generated. As described above, the master search template is a search template with a rotation angle of 0 degrees, and the master search template is rotated at a set pitch as shown by a two-dot chain line in FIG. A search template is generated and the data is stored in DRAM 156.
[0078]
Data specifying the generation angle range and set pitch of the search template are stored together with the data of the master search template as shown in FIG. The pitchA = 4.5 in the 15th line is the set pitch data, and startA = −45 in the 16th line and endA = 45 in the 17th line are data defining the generation angle range of the search template. The angle range and pitch for generating the search template are set according to the image processing object. For example, when the rotation angle of the image processing object is expected to be greatly shifted, the generation angle range is widened. Incidentally, in the example of the pre-processing program shown in FIG. 7, the generation angle range is set to −45 degrees to +45 degrees, and the set pitch is set to 5 degrees.
[0079]
When the generation of the search template for one image processing object is completed, the execution of the program returns to the beginning, and whether to perform pattern matching for the next image processing object and generation of the search template if it is performed. Is done. When pattern matching is not performed, program execution returns to the beginning, and it is determined whether or not pattern matching is performed for the next image processing object. If it is determined whether or not pattern matching is to be performed for all image processing objects, and search templates are generated for the image processing objects to be subjected to pattern matching, the execution of the program in FIG. 7 ends.
[0080]
Next, the execution processing program shown in FIG. 8 will be described. This program is executed after electronic components or reference marks are imaged by the CCD cameras 128 and 134 and image data is stored in the frame grabber memory 164. First, if the object to be processed can be processed only by pattern matching, such as a square chip, image processing is performed according to the pattern matching program shown in FIG.
[0081]
Next, the image processing target is a QFP (Quad Flat Package), PLCC (Plastic Leaded Chip Carrier), BGA (Ball Grid Array), or other electronic component having a complicated shape with leads and solder bumps. It is determined whether it is necessary to activate a pattern matching manager that combines pattern matching for processing. The combination of pattern matching will be described later.
If the pattern matching manager does not need to be operated, it is determined whether image processing on the virtual screen should be performed. If the determination result is NO, it is determined whether image processing on the physical screen should be performed. Is done.
The physical screen has an optical characteristic value obtained for each pixel, and is an image screen in which image data actually exists. The virtual screen has an optical optical characteristic value at an arbitrary point not restricted by the pixel as necessary. This screen is obtained by calculation. As will be described later, both the pattern matching and the pattern matching manager are processes performed on the virtual screen. However, in the present embodiment, in addition to these, physical processing on the virtual screen is performed independently of pattern matching. Image processing can be performed on the screen. The determination of whether or not to perform image processing on the virtual screen and whether or not to perform image processing on the physical screen is instructed to perform the latter two image processing. It is a judgment
[0082]
The pattern matching program shown in FIG. 9 will be described.
First, a search window is set, and a search area for searching for an image processing target is set. The search window is set by designating part or all of the imaging surfaces of the CCD cameras 128 and 134 by coordinate values. Whether the image processing object is a reference mark or an electronic component, or what type is an electronic component is known from the mounting data during the work procedure, and the image processing object formed on the imaging surface Since the position of the image is roughly known, the search window is set to a sufficient size suitable for including the image processing object even if the position is slightly shifted. In this way, the search area can be narrow and the search can be performed in a short time.
[0083]
The full pattern matching process consists of a search step for searching for a search object, a re-search step for searching for an approximate edge point of the search object, a measurement step for calculating the edge point of the search object, and a measurement step that repeats the measurement step. It includes four steps of measurement steps. Normally, pattern matching is completed when all four steps are completed. If there is even one abnormal step, the next step is not executed and the pattern matching is immediately terminated.
[0084]
First, the search step will be described.
In the search step, search templates are sequentially read out from the DRAM 156 one by one and superimposed on a screen 221 on which an image including an image 220 of an image processing object and a background exists as shown in FIG. Optical characteristic values (luminance in this embodiment) of two points (hereinafter referred to as point pair constituent points) constituting the plurality of point pairs 224 are calculated. In the example shown in FIG. 10, the search is sequentially performed from the search template whose rotation angle is −45 degrees.
[0085]
The point pair composing point is a point on the virtual screen, and the luminance of the point pair composing point is obtained by interpolation calculation from the luminance as image data of a plurality of pixels on the physical screen. The optical characteristic value of the point on the virtual screen specified by the data of the search template is obtained based on the image data of the physical screen, and this is visually represented in FIG. This means “superimpose the search template on the screen on which the image represented by the image data is present”. The screen 221 in FIG. 17 is a virtual screen, and the image 220 of the image object in the screen 221 is only virtual if it exists at this position, and there is actually no image data representing this image 220.
The same applies to FIGS. 19, 20, and 27 described later.
[0086]
Interpolation calculation of the luminance of the point pair constituent points can be performed using a curved surface such as a bicubic spline curved surface defined by image data of 4 × 4 control points on the X, Y coordinate plane, for example. However, in the present embodiment, it is performed by the simplest linear interpolation based on the image data of four pixels adjacent to the point pair constituent points. In FIG.0 , V0 ) Is the point pair constituent point, f (u0 , V0 ) Is the luminance of the point pair constituent points, and (u ′, v ′), (u ′ + 1, v ′), (u ′, v ′ + 1), and (u ′ + 1, v ′ + 1) are used for linear interpolation, respectively. The center positions of the four pixels to be processed are f (u ′, v ′), f (u ′ + 1, v ′), f (u ′, v ′ + 1), and f (u ′ + 1, v ′ + 1). It is each brightness | luminance of four pixels, and the brightness | luminance of a point pair constituent point is calculated by (1) Formula.
f = (u0 , V0 ) = F (u ′, v ′) (1-α) (1-β) + f (u ′ + 1, v ′) α (1-β) + f (u ′, v ′ + 1) (1-β) β + f (U ′ + 1, v ′ + 1) αβ (1)
[0087]
The above calculation is performed by the physical screen / virtual screen conversion driver 300 shown in FIG. As shown in the figure, the physical screen / virtual screen conversion driver 300 is configured separately from general image processing application software 302, and is based on image data on the physical screen 304 in the image processing application software 302. Whenever it becomes necessary to calculate the image data on the virtual screen 306, the physical screen / virtual screen conversion driver 300 is called to calculate the image data on the virtual screen 306.
[0088]
Each time the luminance is calculated for the two component points of each pair of point pairs 224, the luminance of the two point pair component points is compared. At the time of imaging by the CCD camera 128 or 134, the light applied to the image processing object such as the electronic component 82 or the reference mark is reflected more than the light applied to the background, so the portion corresponding to the image processing object and the background There is a difference in the charge amount of the solid-state imaging device from the portion corresponding to. The image of the image processing object is bright and the background is dark. Therefore, if one of the two point pair constituent points is located within the edge of the image processing object and the other point is located within the background, the luminance of the two point pair constituent points is preset. There is a difference greater than the set value (when the set value is positive) or less than the set value (when the set value is negative).
[0089]
The set value of the brightness difference is stored together with the master search template data. For example, in FIG. 10, the setting value diff is set to −20 as described in the fifth line. In this case, if the luminance of the point pair constituent point within the edge of the image processing object is greater than 20 gradations than the luminance of the point pair constituent point outside the edge, the set value or less. It is determined that there is a difference.
On the contrary, if the set value diff is set to 20, if the luminance of the point pair constituent point outside the edge of the image processing object is 20 gradations or more higher than the luminance of the point pair constituent point in the edge, the set value or higher It is determined that there is a difference.
In either case, these two point pair constituent points straddle the edge of the image processing object, and are in an adapted state. In this case, it is expressed as “two point pair constituent points satisfy the set luminance difference condition”.
[0090]
(1) The image processing object is not the search object, and the two point pair constituent points do not straddle the edge, (2) The suction nozzle 80 does not suck the electronic component 82 due to a suction error, or (3 ) Due to the reason that dust or the like adheres to the solid-state image pickup device and image data cannot be obtained, the two point pair constituent points do not satisfy the set luminance difference condition and cannot be said to be in an adapted state. This state is called a point pair failure. The number of failures for determining that there is no search object that matches the search template is preset. For example, in FIG. 10, the number of failures is set to 0 as shown in the third line, and if the two point pair constituent points do not satisfy the set brightness difference condition for all point pairs, the search template is matched. It is determined that there is an object to be searched.
[0091]
If the number of failures is set to 1 or more, if there are more than a set number of point pairs that do not satisfy the set brightness difference condition among multiple point pairs, there is a search target that matches the search template. It is determined not to.
If it is determined that there is a search object at a rotation angle of 0 degrees, the search step ends and a re-search step is executed. If it is determined that there is no search object, search templates having different rotation angles are read out. The search object is searched.
[0092]
Until it is determined that the search target exists, a plurality of types of search templates are sequentially read and the search target is searched. Even if searching using all types of search templates, if it is not determined that there is a search object that matches the search template, the search template is shifted and then searched. The search object is searched using a plurality of types of search templates that are shifted by a certain pitch in the X-axis direction and the Y-axis direction and have different rotation angles at each position.
[0093]
This movement pitch is preset and stored in the memory card together with data defining the master search template. In FIG. 10, pitchX = 2.2 and pitchY = 2.2 shown in the 13th and 14th lines are the movement pitches. First, the set pitch is moved in the Y-axis direction. Specifically, coordinate conversion is performed so that the coordinates of each point pair of a plurality of types of search templates are shifted from the Y-axis direction by a set pitch in the positive direction. The search object is searched using this search template. If it is not determined that a search target exists even if all types of search templates with different rotation angles are used at this position, the search template is then shifted in the positive direction by the set pitch in the X-axis direction. Furthermore, if it is not determined here that the search object exists, the search template is shifted from the Y-axis direction to the negative direction by the set pitch. If it cannot be determined that the search object exists again, then the search template is further shifted in the Y-axis direction by the set pitch in the negative direction, and further, it can be determined that the search object exists. For example, the search template is then shifted in the negative direction by the set pitch in the X-axis direction. The search template is moved in the search window so as to draw a square spiral.
[0094]
Even if the search template is moved, it cannot be determined that the search target exists, and if a point pair that protrudes from the search window occurs when coordinate conversion is performed, the search template cannot be moved. Thus, it is determined that there is no search object that matches the search template, and the search step is terminated abnormally. The occurrence of abnormality is displayed on the monitor CRT device 188, and the occurrence of abnormality is stored. If the image processing object is the electronic component 82, the suction nozzle 80 that has been determined to have an abnormal image processing result is prevented from mounting the electronic component 82. The pressing device 86 is prevented from operating at the component mounting position. If the search object is a reference mark, the printed circuit board 90 is carried out without the electronic component 82 mounted.
[0095]
If the two point pair composing points of all the point pairs 224 are inside and outside the edge of the image 220 as in the image 220 of the image processing object shown in FIG. 17, and if the set luminance difference condition is satisfied, The position and rotation angle of the current search template are stored in the DRAM 156, and the re-search step is executed. In the re-search step, a re-search template coordinate plane (search template coordinate plane) in which the edge point of the image 220 of the image processing object is the coordinate plane of the re-search template 228 using the re-search template 228 as shown in FIG. Is searched). The re-search template 228 includes a plurality of seek lines 230. The seek line 230 is set based on the search template in which the image 220 of the image processing object is found in the search step. The two point pair composing points of the point pair are points that define both ends of the seek line 230, respectively.
[0096]
The edge point of the image 220 of the image processing object is searched for each of the set plurality of seek lines 230. As shown in FIG. 20, this search is performed by dividing the seek line 230 at a predetermined pitch (for example, 0.05 mm) and calculating the luminance for each of the plurality of division points P1 to P15. This pitch is set to a length shorter than the diagonal line of the solid-state imaging device 232 of the CCD cameras 128 and 134. Therefore, three to four division points are included in one solid-state imaging device 232. The division points are also points on the virtual screen, and linear interpolation is performed in the same manner as in the search step, and the luminance of the division points P1 to P15 is calculated.
[0097]
An example of each brightness | luminance of 15 division | segmentation points P1-P15 calculated by linear interpolation is shown in FIG. Note that the luminance value is represented by a positive value, and the value increases as the luminance value acquisition object becomes brighter. The image acquisition device 130 according to the present embodiment is configured to irradiate the surface of the image processing object with light and acquire an image based on the reflected light from the surface. It is assumed that the brightness value is large and the brightness value is large, the background is dark and the brightness value is small.
From the luminance value calculated by linear interpolation, it cannot be determined where the luminance changes the most as shown in the graph of FIG. Therefore, the differential value of the luminance value is obtained using a difference filter. The result of obtaining the differential value using the differential filter shown in FIG. 22 is shown in the graph of FIG. This difference filter has a negative value for the luminance of a point located upstream of two adjacent points from one point that defines a seek line toward the other point, and points that are located downstream. This is a filter that takes a positive value and calculates the sum of these two values. This differential value is not the value of the dividing point, and in the graph of FIG. 25, the position where the luminance differential value is obtained is indicated by “0.5” which is the center position of the adjacent two dividing points. As is clear from this graph, the magnitude of the luminance change is known, but it is not known where it is the maximum.
Depending on the calculation direction, that is, whether the calculation is performed from the division point outside the image processing object (within the background) toward the division point inside the image processing object or vice versa, the luminance differentiation is performed. The sign of the value is reversed. In the former case, the luminance differential value becomes a positive value, and the position where the luminance differential value is the maximum is the position where the absolute value of the change gradient of the luminance is the maximum (the luminance differential value of the position where the absolute value of the change gradient is the maximum). Called maximum). In the latter case, the luminance differential value is a negative value, and the position where the luminance differential value is the minimum is the position where the absolute value of the luminance change gradient is the maximum (the luminance differential value at the position where the absolute value of the change gradient is the maximum). Called the local minimum). The luminance differential values shown in FIG. 25 and the graph of FIG. 26 described next are values obtained by the former calculation.
[0098]
On the other hand, if differentiation is performed using the differential filter shown in FIG. 23, the maximum value 177 of the luminance differential value is obtained at the position of f8.5 as shown in the graph of FIG. It can be seen that the absolute value of is the maximum position. In the difference filter shown in FIG. 23, for one of the division points set on the seek line, all four division points upstream including the division point in the calculation direction are set to negative values. In this filter, the luminance values of four consecutive dividing points on the downstream side are all positive values and the sum thereof is obtained.
[0099]
If dirt or the like adheres to the part corresponding to the edge point of the solid-state image sensor and the charge amount changes, the maximum or minimum value of the luminance differential value may be obtained at a position other than the edge point. The absolute value of the luminance change gradient at such a position is small. On the other hand, in the vicinity of the edge point, there is a significant difference between the brightness of the image processing object and the background, and the absolute value of the luminance change gradient is large. Therefore, a set value is provided, and it is determined whether or not the luminance differential value at the position where the absolute value of the change gradient is the maximum is a value obtained in the vicinity of the edge point, and the former case is excluded. This set value is set to a positive value when the luminance differential value is obtained as a positive value, it is determined whether or not the maximum value of the luminance differential value is greater than or equal to the set value, and the maximum value is greater than or equal to the set value. If so, the maximum value is a value obtained in the vicinity of the edge point, and it is determined that it can be used for the calculation of the edge point, and the calculation of the edge point is performed. In addition, when the luminance differential value is obtained as a negative value, the set value is set as a negative value, and it is determined whether or not the minimum value of the luminance differential value is less than or equal to the set value. If it is below, it is determined that the minimum value can be used for the calculation of the edge point. In other words, the failure of the seek line in the re-search step is that the edge point is not calculated because the maximum value of the luminance differential value is smaller than the set value or the minimum value is larger than the set value.
[0100]
In the example shown in FIG. 10, contrary to the examples shown in FIGS. 25 and 26, it is determined that the luminance differential value is calculated from the dividing point inside the image processing object to the dividing point outward. In the position where the absolute value of the change gradient of the luminance value is the largest, the luminance differential value is minimum, and the setting value for determining whether or not the minimum value is a value obtained in the vicinity of the edge point is a negative value. The value, that is, ll = −200 as shown in the fifth line. In this example, since the image processing object is brighter than the background, the luminance differential value is obtained as a negative value, and if the value is not −200 or less, the position of the edge point is not calculated. ing.
[0101]
In addition, as shown in FIG. 10, it is also determined in advance what kind of difference filter is used for the calculation. This differential filter coefficient N is calculated according to the equation (2).
N = gUnit / pitch between division points (2)
Where gUnit is the diagonal length of the solid-state image sensor.
[0102]
If differentiation is performed using a differential filter and the minimum value (or maximum value) of the luminance differential value is obtained, the position where the absolute value of the luminance change gradient is maximum, that is, the edge point is obtained according to the following equation. Equations (3) and (4) are equations taking N = 4 as an example, and fmax, F(max-4)~ F(max-1), F(max + 1)~ F(max + 4)Is the luminance differential value (fmaxIs the maximum (small) value. As shown in FIG. 26, “f” indicates a position where the luminance differential value is obtained on the seek line by adding a number. In the expressions (3) and (4), “f” is designated by the number added to f. Represents the luminance differential value of the position to be performed. fmaxIs the luminance differential value at the position where the luminance differential value is the maximum (small) (f8.5 in the example shown in FIG. 26), and f(max-1), F(max-2), F(max-3), F(max-4)Are respectively f in the calculation directionmaxThe luminance differential values at four locations on the upstream side (f7.5, f6.5, f5.5, f4.5 in the example shown in FIG. 26) and f(max + 1), F(max + 2), F(max + 3), F(max + 4Are respectively f in the calculation directionmaxThe luminance differential values at four locations on the downstream side (in the example shown in FIG. 26, f9.5, f10.5, f11.5, and f12.5).
dl = fmax× 4-(f(max-1)+ F(max-2)+ F(max-3)+ F(max-4)(3)
dr = fmax× 4-(f(max + 1)+ F(max + 2)+ F(max + 3)+ F(max + 4)(4)
edgePitch = (dl × N) / (dl + dr) −N / 2 (5)
Edge point = (Luminance differential value maximum (small) value point pitch + edgePitch) x division point pitch (6)
Equations (3) and (4) are equations in the case of N = 4. In general, when dl is obtained, it is calculated from a value obtained by multiplying the luminance differential value of the maximum (small) value point by N. When the sum of the luminance differential values of N points upstream of the local maximum (small) value point in the direction is subtracted and dr is obtained, the luminance differential value of the local maximum (small) value point is multiplied by N, The sum of the luminance differential values of N points downstream of the maximum (small) value point is subtracted. When the edge point is obtained when the calculation result shown in FIG. 21 is differentiated using the difference filter shown in FIG. 23, the brightness differential value maximum (small) value point pitch number in the equation (6) is 8. 5.
[0103]
At the time of calculating the edge point, first, the luminance of the dividing point is calculated by linear interpolation, and after differentiation is performed according to the difference filter coefficient N, the calculation is performed according to equations (3) to (6) to obtain the maximum luminance change position. That is, an edge point is obtained. In the case of the seek line 230 shown in FIG. 20, the calculation result of equation (6) is 0.403 mm, and it can be seen that there is an edge point at a position 0.403 mm from the division point P1 of the seek line 230.
[0104]
In this way, an edge point is calculated for each of the plurality of seek lines 230. The number of failures of the seek line 230 (if the number of failures of the point pair 202 is less than or equal to the set number, if it is determined that there is a search object that matches the search template, the failure of the point pair 202 If the sum of the number and the number of failures of the seek line 230) is equal to or less than the set number, it is determined that the operation is normal and the measurement step is executed. If there is a failure exceeding the set number, the process ends abnormally. The processing when an abnormality occurs is the same as the search step. In FIG. 10, as shown in the third line, the fail count is set to 0, and if there is even one failure, the re-search step is terminated abnormally.
[0105]
If the number of failures is less than or equal to the set number and the re-search step ends normally, the measurement step is executed next. The re-search template is set based on the search template determined to be the search object in the search step, and the edge point can be found on the seek line 230, but the midpoint between the edge point and the seek line 230 (see FIG. 19 is usually marked with a cross (hereinafter referred to as “ideal point”). The two points constituting the point pair are set so that the midpoint of the two points is located on the edge of the search object unless the search object has a deviation in size, position, and rotation angle. Although the ideal point and the edge point should match, there is actually a shift in the image processing object, and a shift occurs between the ideal point and the edge point obtained by the calculation.
[0106]
Therefore, if the re-search step is executed without abnormality, the measurement step is executed next, and the position of the edge point is calculated. In the measurement step, first, a measurement template 236 as shown in FIG. 27 is automatically set. The measurement template 236 has a plurality of seek lines 238, data of a master measurement template set in advance, data of a relative position of the re-search template coordinate plane with respect to the reference coordinate plane in the re-search step, and re-search It is set based on the calculation result of the edge point on the template coordinate plane.
[0107]
The master measurement template data is stored together with the master search template data and the like as illustrated in FIG. The data of the 20th line to the 33rd line in FIG. 10 is data for executing the measurement step, and the data of hs = 3.5 in the 21st line, the data in the 23rd line to the 27th line and the 29th line to the 33rd line are the master measurement. Template data. A master measurement template 240 obtained from this data is shown in FIG. Reference numeral 242 denotes a seek line. The master measurement template 240 has more seek lines than the master search template for the same electronic component.
When the image processing object is a disc 206 with a part cut away, a master measurement template 244 having a plurality of seek lines 246 is set as shown in FIG.
[0108]
Part or all of the measurement template seek line is paired. On the extension line of the seek line, another seek line is set symmetrically with respect to the center line of the image processing object. These paired seek lines are referred to as pair seek lines.
The measurement template is set by coordinate conversion of master measurement template data. Coordinate plane of the search template (The coordinate plane of this search template is the same as the search template coordinate plane of the search template when the image processing target is determined to be a search target that matches the search template in the search step. The relative position and relative rotation angle with respect to the reference coordinate plane, and the relative position and relative rotation angle of the image processing object with respect to the re-search template coordinate plane (these are based on the coordinate values of the edge points calculated in the re-search step). Since this calculation is performed, coordinate conversion corresponding to this calculation is applied to the master measurement template data (set in the master measurement template coordinate plane that matches the reference coordinate plane). is there.
[0109]
When the automatic setting of the measurement template is completed, the calculation of the edge point on each seek line of the measurement template is performed in the same manner as that in the re-search step. A dividing point is set on the seek line at a constant pitch, and the luminance is calculated by linear interpolation for each dividing point, and a differential filter is used to calculate a luminance differential value and an edge point is calculated. Also in the measurement step, the number of allowable failures is set. The fail here means that the edge point is not calculated for the seek line as in the re-search step. If the number of failures is less than or equal to the set number, the result is normal, and then a re-measurement step is executed. If the number of failures exceeds the set number, the measurement step is terminated abnormally. The processing when an abnormality occurs is the same as in the search step.
[0110]
In the remeasurement step, a remeasurement template is set and an edge point is calculated. The remeasurement template is automatically set based on the measurement template and the edge point calculated in the measurement step. Based on the edge point obtained in the measurement step, the measurement template is rotated by coordinate transformation to a position where the ideal point is expected to be located on the edge point. The calculation of edge points in the re-measurement step is performed in the same manner as in the re-search step.
[0111]
The determination of abnormality in the re-measurement step uses the allowable number of failures set for the measurement step, and if there are more seek lines from which edge points cannot be obtained than the set number, it is abnormal and the image processing is terminated. The processing when an abnormality occurs is the same as in the search step. If the number is less than the set number, the process ends normally, and then the object vector, that is, the size, position, and rotation angle of the image processing object are calculated. The greater the number of executions of the re-measurement step, the smaller the deviation between the ideal point and the edge point, and the edge point detection accuracy is improved. The set number of remeasurement steps is preset and stored.
Note that the remeasurement template used for execution of the second and subsequent remeasurement steps is automatically set from the remeasurement template at the time of execution of the immediately previous remeasurement step and the calculation result of the edge point in the remeasurement step.
[0112]
The monitor CRT device 188 displays the progress of image processing. For example, when the search step is executed, the image and background of the image processing object based on the image data stored in the frame grabber memory 164 (for example, one set of four sets of image data obtained by imaging four electronic components) A monochrome image is displayed, and the angle of the search template is changed by the set pitch and the position of the search template is changed to a rectangular spiral, and the progress of the process is shown to the operator.
[0113]
The monitor CRT device 188 can display in two modes, an automatic selection display mode and a manual selection display mode. When the automatic selection display mode is set, the display of the image processing progress is displayed. Both the input related data related to the input from the input device 172 (this data also includes data for notifying the abnormality of the electronic component mounting device and requesting the operator to take action) while giving priority to the input related data Is displayed. Therefore, when data is input by the input device 172 in the state where the automatic selection display mode is set, the display of the image processing progress is automatically switched to the display of input related data.
In the manual display selection mode, only the display selected by the operator's manual operation among the display of the image processing progress and the display of the input related data is performed.
[0114]
Next, the calculation of the object vector of the image processing target will be described. An object vector calculation program for performing the calculation described below is stored in the memory card, and is copied to the DRAM 156 when the memory card is set in the control device 150.
Size, position, and rotation angle are calculated when specified. For example, in the example of FIG. 10, P in the fifth and 21st lines vf = PA represents the position (Position), A represents the angle (Angle), and it is specified to calculate the position and the rotation angle. .
[0115]
For example, the size calculation is necessary in the following cases. (1) When the size of the image processing object is necessary, (2) When it is desired to identify the image processing object as an object similar to the search object but not the search object, (3) Fail in edge measurement. This is the case when it is desired to ensure position measurement accuracy. (2) is, for example, a case where it is necessary to distinguish between electronic parts having the same shape but slightly different sizes. The reason why the size calculation is necessary in the case of (3) is that if there is a failure, the size is required to determine the position of the image processing object in consideration of the failure as will be described later.
Also in this embodiment, the size calculation is not performed if none of the above (1) to (3) applies, but if the size calculation is necessary, prior to the calculation of the position and the rotation angle. Done.
[0116]
Hereinafter, a case where the image processing object is a square chip, size, position, and angle calculations are specified and there is a failure will be described as an example.
First, the size calculation will be described. The size calculation is performed using a pair seek line with an instruction to use for size calculation. In other words, if there is no instruction for use in size calculation in any seek line, size calculation is not performed if the seek line is not a pair seek line even if there is an instruction. Whether or not to perform size calculation by setting a flag to 0 when there is no designation to perform size calculation for a seek line in one template, and setting the flag to 1 if there is even one specification. Is determined. In this way, when size calculation is unnecessary, it is possible to know that size calculation is not required without determining whether or not each of the plurality of seek lines is instructed to be used for size calculation. And processing time is short.
[0117]
The first size calculation is a size factor calculation. The size factor is an excess rate of the size of the image processing object in each of the X-axis direction and the Y-axis direction of the measurement template coordinate plane (measurement template setting coordinate plane). The size excess ratio in the X-axis direction is the distance between the edge points of each set of seek lines (measurement span) of a plurality of pairs of seek lines set parallel to the X-axis direction, as shown in FIG. Is divided by the distance (referred to as the original span) between the ideal points (points marked with x in the figure) of the pair seek line. Further, the size excess ratio in the Y-axis direction can be obtained by averaging the values obtained by dividing the measurement span of each pair seek line of a plurality of pair seek lines set in the Y-axis direction by the original span. A broken line in FIG. 28 indicates a seek line in which a failure has occurred. For a pair seek line including a seek line in which a failure has occurred, the size excess rate is not calculated. The size is calculated by multiplying the size excess ratio in the X-axis direction and the size excess ratio in the Y-axis direction by the respective original spans of the square chip 250 in the X-axis direction and the Y-axis direction.
[0118]
If there is a failure in any one of the plurality of seek lines, a size point, which is a point obtained by correcting the ideal points with the size factor for all the seek lines having no failure, is calculated. As shown in FIG. 29, for a seek line substantially parallel to the Y-axis direction, the Y-coordinate value of the size point is calculated by multiplying the Y-coordinate value of the ideal point by the size excess rate in the Y-axis direction. Is omitted, the seek line parallel to the X-axis direction is calculated by multiplying the X coordinate value of the ideal point by the size excess rate in the X-axis direction.
[0119]
In addition, as described above, the size factor is calculated using only a pair of seek lines parallel to the X axis and the Y axis, and the size using the obtained size factor is used. The point calculation and the like are also performed for a seek line that is not parallel to the X axis and the Y axis. The calculation of the size point for the inclined seek line and the following calculation are substantially the same as the calculation of the size point in the circular reference mark described later.
[0120]
Next, the difference Diff between the edge point and the size point is calculated. The size point corresponds to an ideal point when an image processing object having a size error is considered to have been set again after approving the size error. Therefore, the difference Diff between the edge point and the size point represents the positional deviation amount of the edge point itself. The difference Diff is calculated by subtracting the size point coordinate value from the edge point coordinate value. If the difference Diff is a positive value, the edge point is shifted to the positive side on the measurement template coordinate plane. It will be.
[0121]
The reason for calculating the size point when there is a failure in this way is to reduce the influence of the failure on the calculation of the position of the image processing object and to reduce the calculation error. For example, if the size of the image processing object is larger than the original size but there is no position shift, if one seek line constituting the calculation error pair seek line has a failure and the other seek line has no failure, If the size point is not calculated and the calculation is performed with the ideal point, the sum of the difference between the edge point and the ideal point becomes larger on the non-failing side than on the failing side. In spite of this, a calculation result indicating that the image processing object is shifted to the seek line with no failure is output, and the size point is calculated to avoid this.
[0122]
Next, the calculation of the position and the rotation angle will be described.
The calculation of the rotation angle is performed only based on the seek line of 0 degree, 90 degrees, 180 degrees, and 270 degrees and instructed to be used for the calculation of the rotation angle. In addition, each process of 0 degree and 180 degrees, 90 degrees and 270 degrees is performed in a lump.
[0123]
The position and the rotation angle are calculated with respect to the rotation center RC. The rotation center RC is a calculation center of the computer, and may be different from or coincide with the designated center DC designated by the operator as the center of the image processing object. The designated center DC is a point that is used as a reference for an image processing object in creating a program for mounting the electronic component 82 on the printed circuit board 90. In the present embodiment, the master search template coordinate plane and the master measurement template coordinate plane are used. The position correction amount in the horizontal plane of the electronic component 82 is calculated for the designated center DC as described later.
[0124]
First, taking the straight line L shown in FIG. 30 as an example, the calculation of the position and the rotation angle will be described. Originally four seek lines were set for the straight line L, but three seek lines SL were set depending on whether one failed or three seek lines were set from the beginning.1 , SL2 , SLThree If the above-described difference Diff is calculated, the center of rotation RC is the two left seek lines SL.1 , SL2 Set close. The rotation center RC is the absolute value of the sum of the distances between the plurality of seek lines on one side and the rotation center RC (the distance between the seek line and the rotation center RC when there is one seek line), and the other The absolute value of the sum of the distances between the plurality of seek lines and the rotation center (the distance between the seek line and the rotation center RC when there is one seek line) is set to a position where they are equal. In other words, if one side of the rotation center RC is positive and the other side is negative, the rotation center RC is set at a position where the sum of distances to all seek lines becomes zero. The rotation angle (radian) is calculated by equation (7).
Rotation angle = (AO · A ′ + BO · B ′ + CO · C ′) / (AO2 + BO2 + CO2 (7)
However,
AO: Center of rotation RC and seek line SL1 Distance to
BO: Center of rotation RC and seek line SL2 Distance to
CO: Center of rotation RC and seek line SLThree Distance to
A ′: difference Diff on seek line A
B ′: Difference Diff on seek line B
C ′: Diff on the seek line C
Further, the position of the rotation center RC is calculated by the equation (8).
(A '+ B' + C ') / 3 (8)
[0125]
The angle can also be obtained by calculating the angle for each of a plurality of seek lines using the difference Diff and the distance from the center of rotation of the edge point, and averaging them. If the angle deviates greatly even at one location, the error greatly affects the final angle value. On the other hand, if the angle is calculated according to the above equation (7), the influence of the error at a specific edge point can be reduced, and the calculation accuracy of the rotation angle can be improved.
[0126]
If any of the plurality of seek lines has a failure and an edge point cannot be obtained, as shown in FIG. 31, there is a deviation between the designated center DC and the rotation center RC. SL2 Is a seek line that has failed. Generally, since the designated center DC is set at the center of the image processing object and the seek line is set symmetrically with respect to the designated center DC, a failure occurs in the seek line, and the rotation center RC corresponding to the failure is set. In other words, there is a difference between the designated center DC and the rotation center RC.
As described above, the rotation center RC is positive on one side of the rotation center RC and negative on the other side, so that the sum of the distances between the edge points of the plurality of seek lines and the rotation center RC becomes zero. Therefore, equation (9) is established, and equation (10) is obtained from this equation (9), and the deviation v between the rotation center RC and the designated center DC is calculated.
t0 + T1 + TThree = 0 (9)
(S0 −v) + {s0 + (S1 -S0 ) -V} + {s0 + (SThree -S0 ) -V} = 0 (10)
However,
t0 : Rotation center RC and seek line SL0 Distance to
t1 : Rotation center RC and seek line SL1 Distance to
tThree : Rotation center RC and seek line SLThree Distance to
s0 : Designated center DC and seek line SL0 Distance to
s1 : Designated center DC and seek line SL1 Distance to
sThree : Designated center DC and seek line SLThree Distance to
[0127]
As shown in FIG. 32, when the seek line is set for two sides parallel to each other of the rectangular image processing object, the equation (11) is established, and the deviation between the rotation center RC and the designated center DC is established. The quantity v is calculated based on equation (12).
t0 + T1 + T2 + TThree + TFour + TFive = 0 (11)
s0 + {S0 + (S1 -S0 )} + {S0 + (S2 -S0 )} + {S0 + (SThree -S0 )} + {S0 + (SFour -S0 )} + {S0 + (SFive -S0 )}-6v = 0 (12)
[0128]
In the case of the image processing object shown in FIG. 33, Expression (13) is established, and the deviation v between the rotation center RC and the designated center DC is calculated based on Expression (14).
t0 + T1 + T2 + TThree + TFour = 0 (13)
s0 + {S0 + (S1 -S0 )} + {S0 + (S2 -S0 )} + {S0 + (SThree -S0 )} + {S0 + (SFour -S0 )}-5v = 0 (14)
[0129]
As shown in FIG. 34, when the seek lines are set in two directions perpendicular to each other, equations (15) and (16) are established for the X-axis direction and the Y-axis direction, respectively. Each position deviation in the X-axis direction and Y-axis direction from the specified center DCx, VyAre calculated based on the equations (17) and (18), respectively.
t0 + T1 + T2 + TThree + TFour + TFive = 0 (15)
t6 + T7 + T8 + T9 + TTen+ T11= 0 (16)
s0 + {S0 + (S1 -S0 )} + {S0 + (S2 -S0 )} + {S0 + (SThree -S0 )} + {S0 + (SFour -S0 )} + {S0 + (SFive -S0 )}-6vx= 0 (17)
s6 + {S6 + (S7 -S6 )} + {S6 + (S8 -S6 )} + {S6 + (S9 -S6 )} + {S6 + (STen-S6 )} + {S6 + (S11-S6 )}-6vy= 0 (18)
[0130]
Center of rotation RC based on equation (17) for X-axis directionXDisplacement in the X-axis direction with respect to the specified center DCx, And based on that, the center of rotation RCXIs required. Center of rotation RC based on equation (18) for Y-axis directionYDisplacement in the Y-axis direction with respect to the specified center DC ofy, And based on that, the center of rotation RCyIs required. Center of rotation RCXThrough the straight line parallel to the Y axis of the seek line setting coordinates and the rotation center RCY, And the intersection with the straight line parallel to the X axis is the rotation center RC of the image processing object shown in FIG.
[0131]
FIG. 35 shows another example of an image processing object in which seek lines are set in two directions perpendicular to each other. With respect to this image processing object, Equations (19) and (20) are established, and each displacement v in the X-axis direction and Y-axis direction between the rotation center RC and the designated center DC is v.x, VyAre calculated based on the equations (21) and (22), respectively. However, the image processing object shown in FIG. 34 has no deviation between the rotation center RC and the designated center DC, and vx= Vy= 0, and the distance between the seek line and the rotation center RC and the designated center DC is shown to be the same, and therefore, the equations (19) and (20), and (21) and (22) The same symbols are used in the equations.
s0 + S1 + S2 + SThree = 0 (19)
sFour + SFive + S6 + S7 = 0 (20)
s0 + {S0 + (S1 -S0 )} + {S0 + (S2 -S0 )} + {S0 + (SThree -S0 )}-4vx= 0 (21)
sFour + {SFour + (SFive -SFour )} + {SFour + (S6 -SFour )} + {SFour + (S7 -SFour )}-4vy= 0 (22)
[0132]
Next, in order to calculate the rotation angle, an angle factor shown in FIG. 36 is set in advance. The angle factor is determined by the position and polarity of the seek line. If the angle factor shown in FIG. 36 is shown on XY coordinates, it will be as shown in FIG.
[0133]
FIG. 38 shows an example of calculating the position and rotation angle of the image processing object using the rotation center RC and the angle factor. The rotation angle is calculated according to equations (23) and (24). D in equation (23)0 t0 Or dFour v1 The sign of is determined by the angle factor. The rotation angle calculated by the equation (23) is the rotation angle of the image processing object with respect to the measurement template coordinate plane.
Further, the positional deviation Δx in the X-axis direction and the positional deviation Δy in the Y-axis direction of the rotation center RC are calculated by the equations (25) and (26), respectively. These positional deviations Δx and Δy are deviations from the actual position of the rotational center RC.
Rotation angle = (− d0 t0 -D1 t1 + D2 t2 + DThree v0 -DFour v1 ) / Ta·····(twenty three)
ta= T0 2+ T1 2+ T2 2+ V0 2+ V1 2····(twenty four)
Δx = (dThree + DFour ) / 2 ... (25)
Δy = (d0 + D1 + D2 ) / 3 (26)
Where d0 , D1 , D2 , DThree , DFour Are the deviations of the edge points from the size points in the five seek lines.
[0134]
The rotation angle and the rotation center RC when the image processing object is a square chip and seek lines are set on two sides parallel to the X axis and Y axis of the square chip image 250 as shown in FIG. The calculation of the positional deviations Δx and Δy is shown in equations (27) to (29).
Rotation angle = (− d0 t0 + D1 t1 + D2 t2 -DThree tThree + DFour v0 -DFive v1 -D6 v2 + D7 vThree ) / (T0 2+ T1 2+ T2 2+ TThree 2+ V0 2+ V1 2+ V2 2+ VThree 2(27)
Δx = (dFour + DFive + D6 + D7 / 4 (28)
Δy = (d0 + D1 + D2 + DThree / 4 (29)
d0 ~ DThree Is the distance from the center of rotation RC is t0 ~ TThree Is the amount of deviation between the edge point and the size point on the seek line, dFour ~ D7 Is the distance from the center of rotation RC is v0 ~ VThree This is the amount of deviation between the edge point and the size point on the seek line.
[0135]
Instead of mathematically proving that the above equations are valid as the calculation formulas for the rotation angle and the positional deviations Δx and Δy, the numerical values are specifically substituted to show the validity.
Assume that the image processing object having the shape shown in FIG. 40 rotates by −0.1 (radian) around the rotation center RC, and the rotation center RC is shifted by 5 mm in the Y-axis direction and 0 mm in the X-axis direction. . In this case, t0 = 30 mm, t1 = 20mm, T2 = 50mm, V0 = 30mm, V1 = 30mmAs long as the rotation angle is small enough to be regarded as sin θ = θ, d0 = + 8mm, d1 = + 7mm, d2 = 0 mm, dThree = -3mm, dFour = + 3mm. Ta= T0 2+ T1 2+ T2 2+ V0 2+ V1 2Is 5600 (mm2 ) Is obtained.
Substituting these values into the equations (30), (31) and (32), the rotational angles and the positional deviations Δx and Δy of the rotational center RC are −0.1 radians, 5 mm and 0 mm, respectively, as follows: The validity of the formula is confirmed.
Rotation angle = {− (8 × 30} − (7 × 20) + (0 × 50) + (− 3 × 30) − (+ 3 × 30)} / 5600 = −0.1 (30)
Δx = (− 3 + 3) / 2 = 0 (31)
Δy = (8 + 7 + 0) / 3 = 5 (32)
[0136]
Although the rotation angle and the position shift of the rotation center RC are calculated as described above, since the rotation angle and the position shift of the designated center DC are necessary for execution of the electronic component mounting work, the rotation of the rotation center RC is performed. It is necessary to calculate those of the designated center DC from the angle and the displacement. However, since the rotation angle is the same for the rotation center RC and the designated center DC, there is no need for calculation, and only the positional deviation may be calculated.
There is no rotation angle error in the image processing object, and the positional deviation Δx is simply between the X-axis direction and the Y-axis direction.1 , Δy1 If both are only generated, the positional deviation of the rotation center RC and the positional deviation of the designated center DC are both Δx.1 , Δy1 It becomes. However, when a rotation angle error Δθ occurs in the image processing object, as shown in FIG. 41, v is respectively obtained from the rotation center RC in the X-axis direction and the Y-axis direction.x, VyThe positional deviation of the designated center DC at a position separated by1 −Δθ × vy), (Δy1 + Δθ × vx)
[0137]
The calculated rotation angle Δθ and positional deviation (Δx1 −Δθ × vy), (Δy1 + Δθ × vx) Is the rotation angle and positional deviation of the designated center DC of the image processing object with respect to the measurement template coordinate plane, but the measurement template coordinate plane itself has a rotation angle θ and a positional deviation Δx with respect to the reference coordinate plane as shown in FIG.2 , Δy2 It is normal to have.
The reference coordinates are generally set as the optical axis of the CCD camera, that is, the coordinate plane having the origin at the center of the visual field, and the axis of the suction nozzle 80 coincides with the optical axis of the CCD camera at the component posture detection position. Positioned. In this case, the rotation angle θ and the positional deviation Δx with respect to the reference coordinate plane of the measurement template coordinate plane2 , Δy2 Is the rotation angle and positional deviation of the measurement template coordinate plane with respect to the axis of the suction nozzle 80.
Therefore, the rotation angle and positional deviation of the designated center DC of the electronic component as the image processing object with respect to the axis of the suction nozzle 80 are θ + Δθ and Δx, respectively.2 + (Δx1 −Δθ × vy) Cos θ, Δy2 + (Δy1 + Δθ × vx) Sin θ.
[0138]
If there is a failure, the coordinates of the center of rotation, the distance from the center of rotation to each seek line, the displacement between the center of rotation and the specified center, etc. are calculated as described above. If there is no failure, these values are calculated. Since the values are determined to be constant values for each combination of the image processing object and the template, these values are stored as default values in the memory card, and the above calculations are performed using these default values. Is called. If no size calculation is specified, all seek lines are paired, and there is no failure, the size point calculation is omitted and the edge point and the ideal are replaced with the size point. The difference from the point may be calculated, and the position and rotation angle may be calculated based on the calculation result. In this case, even if there is an error in size, the influence of the size error is canceled between the two seek lines constituting the pair seek line, and the calculation result of the position is not affected.
Furthermore, even when there is a failure, if the calculation of misregistration is not specified, the size point is unnecessary and the calculation may be omitted.
[0139]
Next, a case where the image processing object is a reference mark on a printed circuit board will be described. The reference mark is attached to the printed circuit board as described above, and the horizontal position error and the rotational position error of the printed circuit board are calculated based on the image of the reference mark. Therefore, it is not necessary to calculate the rotation angle of the reference mark.
In addition, the calculation of misalignment of fiducial marks has many parts in common with the calculation of misalignment of rectangular electronic components, but the shape is often circular or part of the circle is cut off. There is peculiarity in the operation. Hereinafter, this point will be described.
[0140]
First, a case where there is a failure in the seek line of the circular reference mark image 260 will be described with reference to FIGS. Here, as shown in FIG. 43, the 0-degree seek line indicated by the broken line is the fail seek line, and the reference mark image 260 is larger than the original size (the size indicated by the two-dot chain line in the figure). Let it be big.
The size calculation is also performed on the reference mark image 260 first. In the size calculation, the size factor is calculated as in the case of the corner chip image 250. If eight seek lines are set radially at 45 degree intervals as shown in FIG. 43, the size factors sizeFX and sizeFY in the X-axis direction and Y-axis direction are respectively sizeXM = sizeYM = 0 and baseXM = After initial setting of baseYM = 0, the calculation is performed by the equations (33) to (35).
for (i = 0; i <n; i ++) {sizeXM + = (measurement span [i] / original span [i]) * | cos angle [i] |; baseXM + = | cos angle [i] |; sizeYM + = (measurement span [i] / original span [i]) * | sin angle [i] |; baseYM + = | sin angle [i] |}; (33)
sizeFX = (sizeXM) / baseXM; (34)
sizeFY = (sizeYM) / baseYM; (35)
However, the expression (33) is written in C language, and for (i = 0; i <n; i ++) calculates the operation in {} for the i-th seek line, i from 0 to n It means the total sum of the results obtained while changing 1 by 1. In addition, since n is the number of pair seek lines and is 4 in the example of FIG. 43, i is sequentially changed from 0 to 3 in the calculation of the equation (33). When a value that specifies a pair seek line to be included is reached, the value can be changed to a value that specifies the next pair seek line without performing an operation. Therefore, in the example of FIG. 43, the calculation of Expression (33) is performed for three pairs of pair seek lines other than the pair seek line including the 0-degree seek line.
[0141]
In the case of a circle, since the seek lines are set radially, there are seek lines that are inclined with respect to the X axis and the Y axis, and these seek lines are components of an oversize factor in both the X axis direction and the Y axis direction. Have Therefore, in Equations (33) to (35), the X-axis direction component and Y-axis direction component of the size excess rate on each seek line are obtained, and each contributes to the determination of the size factor according to the component ratio. It is supposed to be made.
The sizeFX and sizeFY obtained by this calculation are oversize ratios in the X-axis direction and the Y-axis direction, respectively. In order to cope with the case where the size error occurs at different ratios in the X-axis direction and the Y-axis direction, the size factor is calculated separately in both directions.
[0142]
Next, the size point is calculated. First, as shown in FIG. 45, pairDiff, which is the difference between the ideal point and the size point, is calculated by the expressions (36) to (43) (expressions (36) and (37) are described in C language), A size point is calculated from the obtained pairDiff and the ideal point, and a shift Diff between the size point and the edge point is calculated using the edge point.
ΔLx= PairRadius * cos θ * (sizeFX -1); ・ ・ (36)
ΔLy= PairRadius * sin θ * (sizeFY -1); ・ ・ (37)
ΔLx≧ 0 and ΔLyWhen ≧ 0
pairDiff = √ {(ΔLx)2 + (ΔLy)2 }; ・ ・ (38)
ΔLx<0 and ΔLy<0
pairDiff = -√ {(ΔLx)2 + (ΔLy)2 }; ・ ・ (39)
ΔLx<0 and ΔLy≧ 0 and | ΔLx| ≧ | ΔLyIn case of |
pairDiff = -√ {(ΔLx)2 − (ΔLy)2 }; ・ ・ (40)
ΔLx<0 and ΔLy≧ 0 and | ΔLx| <| ΔLyIn case of |
pairDiff = √ {-(ΔLx)2 + (ΔLy)2 }; ・ ・ (41)
ΔLx≧ 0 and ΔLy<0 and | ΔLx| ≧ | ΔLyIn case of |
pairDiff = √ {(ΔLx)2 − (ΔLy)2 }; ・ ・ (42)
ΔLx≧ 0 and ΔLy<0 and | ΔLx| <| ΔLyIn case of |
pairDiff = -√ {-(ΔLx)2 + (ΔLy)2 }; ・ ・ (43)
[0143]
As described above, it is not necessary to calculate the rotation angle of the reference mark image 260, and only the position is calculated. In calculating the position, first, the position factor (posFactor) is calculated according to the equation (44).
posFactorM [i] = 1 / Σcos2(Angle R [i] −angle [n]) (44)
However, i is a value for specifying a seek line, and is 0 to 7. Also, the value of n is increased by 1 from 1 to 8, which is the number of seek lines. Σcos2The calculation of (angle R [i] −angle [n]) is the sum of the squares of the cosine of the difference between the angle R [i] of the i-th seek line and the angles R [n] of all unsuccessful seek lines. Is an operation for obtaining. Also in this calculation, when i becomes a value that specifies the seek line of the failure, the calculation can be changed to a value that specifies the next seek line without performing the calculation. Then, the calculation for the 0-degree seek line is not performed, and the position factor is calculated for each seek line of 45 to 315 degrees.
[0144]
Next, using the position factor, the position of the reference mark image 260 is calculated according to equation (45) (described in C language).
for (x = 0, y = 0, i = 0; i <n; i ++) {x = x + cos (i) * posFactorM [i] * ss [i]; y = y + sin (i) * posFactorM [i ] * Ss [i];} (45)
ss [i] is the previously calculated shift amount Diff between the size point and the edge point for each seek line, and the seek line shift amount ss [i] is set for all the seek lines having no failure. A position factor posFactorM [i] is multiplied and a component parallel to the X and Y axes is calculated and added for each of the X and Y coordinates to obtain a center position (x, y). The coordinates of the center position indicate a positional deviation of the center of the reference mark image 260 in the X-axis direction and the Y-axis direction from the origin of the measurement template coordinate plane. As described above, if there is a failure in the seek line, the rotation center RC of the image processing object is deviated from the position where there is no failure (which should be called the position of the normal rotation center). The position factor is calculated by, and the position deviation is calculated by using the position factor according to the equation (45), so that even if there is a failure in the seek line, the normal rotation of the image 260 is performed as in the case where there is no failure. The center misalignment corresponding to the center is calculated. Therefore, the value obtained by adding the positional deviation of the measurement template coordinate plane to the reference coordinate plane to the obtained positional deviation represents the positional deviation of the reference mark 260 on the reference coordinate plane.
[0145]
When the image processing object is circular and there is no failure, the calculation is performed using the default value for the position factor and the like. This is the same as in the above-described case where the image processing object is a square chip.
In the above description when the image processing object is the line segment of FIG. 30 or the square chip of FIG. 39, the term “position factor” has not been used. The position factor is calculated using the equation (44), and 1/3 in the equation (8), 1/4 in the equations (28) and (29), and the like correspond to the position factor. This can be easily confirmed by substituting an actual value into the equation (44). Equation (44) can be used generally regardless of the shape. The reason why the equation (44) is not used in the description of FIGS. 30, 39, etc. is to make it easy to understand intuitively. For the same example as the result of intuitive calculation of these simple examples ( This is because the validity of the equation (44) is confirmed by comparing the calculation result using the equation (44). Of course, the values of 1/3, 1/4, and the like change if a failure occurs in the seek line.
In addition, for example, the calculation for the circular image object can be applied as it is to an octagon in which a corner of the rectangle is obliquely cut at 45 degrees, as well as an image processing object having generally inclined sides. Size and position calculations can be performed similarly.
[0146]
As described above, the case where the image processing object is a square chip without a lead and the case where it is a circular reference mark has been described. The electronic component mounted on the printed circuit board 90 includes a quad flat package type electronic component. Some have a plurality of lead wires. When such an electronic component is an image processing object, image processing is performed by a pattern matching manager that is a combination of pattern matching processes. The pattern matching manager performs image processing by combining a pattern matching process a plurality of times.
[0147]
For example, in the case of a QFP (quad flat package electronic component) image 270 shown in FIG. 46, image processing is performed based on the lead image, not based on the outline of the entire QFP. This is because in QFP, if mounting is performed based on lead position data, the error between the lead and the pattern of the substrate can be minimized, and by combining pattern matching with each lead as an image processing target, QFP The size, position, rotation angle, etc. are calculated.
[0148]
At the time of image processing, first, one of the lead images 272 is searched. For this purpose, a search window 276 having a size suitable for including one lead image 272 is set, and the lead image 272 is obtained using a search template including a plurality of preset point pairs. Searched.
[0149]
A full set of pattern matching of the search step, re-search step, measurement step and re-measurement step is performed to measure the position and rotation angle of the lead image 272. If the position and rotation angle of the lead image 272 are known, then the lead image 272 of one side is searched by pattern matching of a subset including a search step and a re-search step. The lead pitch is known in advance, and the position and rotation angle of the search template coordinate plane in the search step for the next lead image 272 are the position and rotation angle of the lead image 272 obtained by the re-search step immediately before that. Therefore, the next lead image 272 can be searched with sufficient accuracy without performing full set pattern matching.
[0150]
When pattern matching is performed on the lead images 272 on all one side and the positions of all the lead images 272 are calculated, the X coordinate value and the Y coordinate value of the center of these lead images 272 are added. Divide by the number of leads to calculate the center coordinates of one side. Similarly, the three-side lead image 272 is searched by the pattern matching of the subset. The positional relationship between the sides is known in advance, and the position and rotation angle of the search template are set based on the position and rotation angle of the re-search template coordinate plane of pattern matching performed previously. If the center coordinates are calculated for all four sides, the intersection of two straight lines a and b connecting the centers of the two sides parallel to each other is calculated and used as the center coordinates of the electronic component. The rotation angle of the QFP image 270 can be obtained by equation (46).
(Slope of straight line a-90 degrees + slope of straight line b) / 2 (46)
[0151]
Even when the electronic component is a PLCC (plastic leaded chip carrier), a BG (ball grid array), or the like, image processing by a pattern matching manager is performed on a lead or a ball as an image processing target.
For example, when the electronic component is a PLCC, the irradiated light is reflected more by the leads. Although there is also reflected light from the main body, it is less than the lead, and a bright lead image is formed on the imaging surface of the CCD camera 134 in the dark main body image. Therefore, the present invention can be sufficiently implemented with the main body image as the background and the lead image as the image processing object.
[0152]
As described above, according to the pattern matching or the pattern matching manager, it is possible to perform image recognition of almost all types of surface-mounted electronic components (electronic components that can be mounted on the substrate surface). Although it is necessary to create a master search template and a master measurement template, image processing programs using these templates can be shared. Compared to creating an image processing program for each type of electronic component, the time required to create the program Is short. Images of vertically mounted electronic components to be soldered by inserting leads into holes in the printed circuit board can also be processed by pattern matching or a combination of pattern matching.
[0153]
Note that the image processing time becomes longer as the offset amount of the center of the image processing object from the center of the search window is larger. Therefore, it is desirable to correct the position of the center of the search window based on the position of the search template coordinate plane where the image processing object is searched. For example, in the case of the QFP image 270, after image processing for a plurality of QFPs, the average deviation from the center of the search window 276 at the center of the lead image 272 is obtained, and the average deviation is set to zero. The center position of the search window is corrected.
[0154]
Each time the component mounting head 56 is moved to the component orientation detection position and an electronic component is imaged by the CCD camera 134, pattern matching or a pattern matching manager and calculation of an object vector are performed to identify and position the electronic component. An error and a rotation angle error are calculated. As shown in the time chart of FIG. 47, during the time Tr required for one intermittent rotation of the index table 42, the electronic component 82 is irradiated with light while the component mounting head 56 is stopped at the component posture detection position. Then, imaging by the CCD camera 134 is performed. After the imaging, the image data is transferred from the CCD camera 134 to the frame grabber memory 164 and subjected to image processing. However, the transfer of the image data and the image processing are performed in parallel.
[0155]
The frame grabber memory 164 can store image data of four electronic components in parallel. Therefore, the processing time is longer than the time required for one intermittent rotation of the index table 42. Can also perform image processing. The image processing only needs to be completed before the image processing result is used. If the index table 42 serving as an intermittent rotating body allows a plurality of intermittent rotations from imaging to use of the image processing result. It is not essential to end the image processing while the index table 42 is intermittently rotated once. While the index table 42 is intermittently rotated a plurality of times, image processing of the same number of image processing objects as the intermittent rotation number is performed. Should just be done. This electronic component mounting apparatus has four work positions from the component posture detection position to the component posture correction position (see FIG. 4), and between the four electronic components mounted while the index table 42 rotates intermittently four times. In this case, the image processing time can be interchanged.
[0156]
For example, some electronic components have a simple shape such as a square chip and do not have a lead, and the required image processing time is short. If the electronic component has a large number of leads such as QFP, the required image processing time is long. There is also an electronic component, and the remaining time for an electronic component having a short required image processing time can be used for processing an electronic component having a long required image processing time.
If the image processing of all the electronic components must be completed within one rotation time of the index table 42, one intermittent rotation time (the sum of the stop time and the rotation time) of the index table 42 is It is necessary to determine the electronic component that requires the longest time from among a plurality of types of electronic components that are scheduled for image processing, and the intermittent rotation speed is kept low. In contrast, in the electronic component mounting apparatus, four pieces of image data are stored in parallel in the frame grabber memory 164, and processing of the image data is performed while the index table 42 rotates four times intermittently. The total of the image processing times of the four electronic components may be within the same number of intermittent rotation times as the number of electronic components on which image processing is performed. In other words, the average of the image processing times of the plurality of electronic components only needs to be within one rotation time of the index table 42, and the intermittent rotation speed can be increased.
[0157]
An example is shown in FIG. As is apparent from the figure, each image processing time T required for one electronic componente1~ Te7There is a difference in length, but the total image processing time for each four Tt1~ Tt4Are shorter than four times of one intermittent rotation time Tr, and four types of image data can be processed.
[0158]
As described above, the image data of the electronic component and the reference mark captured by the CCD cameras 128 and 134 in the electronic component mounting apparatus is processed by the pattern matching or pattern matching manager. A search template, a re-search template, a measurement template, and a re-measurement template are used to search for an image processing object, and an edge point is calculated. Only the portion where the template is set is searched and measured. Only the portion that requires image processing is processed, and the portion that does not need image processing is not processed even if image data is obtained. Therefore, image processing can be performed without being affected by most image noises (white spots, black spots, spots, etc.) as long as the electronic components are not in direct contact.
[0159]
For electronic components whose leads are inside the contour, such as PLCC, when it is not necessary to recognize the contour as in the case of recognizing only the lead, even if noise is in contact with the contour, Image processing can be performed without being affected.
In addition, an image processing target that does not need to recognize an outline, such as PLCC, can perform image processing even if the background is black, white, or a pattern, as long as there is no similar background. For example, if the main body and the background are the same color, or if the part of the background has the same color as the main body, it is difficult to recognize the outline due to confusion with the background, but the leads are glossy and the glossy object is similar to the background. As long as there is no, you can search and measure. By limiting the image processing object to the lead by setting the search template and the measurement template, it can be recognized without causing confusion with the background.
[0160]
Further, in the search step, it is determined whether or not it is in an appropriate state based on the difference in optical characteristic values such as the luminance difference between the two point pair constituent points. In the re-search step, measurement step, and re-measurement step, The edge point is determined by the change gradient of the optical characteristic value such as luminance on the seek line. Therefore, even when the image processing object is relatively large, such as QFP or PLCC, and uneven illumination is likely to occur, the optical characteristic values are compared between portions where there is almost no difference in illumination. Thus, it is possible to accurately perform image processing without being affected by the bias.
[0161]
In addition, even if the size of the solid-state image sensor of the CCD camera changes, it can be easily handled without substantially changing the program.
[0162]
As is apparent from the above description, in this embodiment, the CCD cameras 128 and 134 constitute an imaging device, the frame grabber memory 164 constitutes an image data storage means, and the DRAM 156 constitutes a search template data storage means and a measurement template. The part that constitutes the data storage means and executes the search step of the pattern matching program of the control device 150 constitutes the judging means, and the part that executes the re-search step, measurement step, and re-measurement step of the pattern matching program is the edge point Coordinate calculation means is configured. The portion of the pattern matching program of the control device 150 that executes the re-search step is also a midpoint reference type confirmation means that is a kind of confirmation means. Further, the part of the control device 150 that executes the object vector calculation program constitutes a midpoint reference type object calculation means that is a kind of object calculation means. Of the pattern matching program of the control device 150, the master search template, the master measurement template, the search template, or the part that automatically sets the seek line based on the edge point constitutes the seek line automatic setting means, The portion that repeats the re-measurement step constitutes a repeating means.
[0163]
Further, in the pattern matching program of the control device 150, a portion for designating a point for calculating the luminance in the search step, re-search step, measurement step, and re-search step constitutes a point designating means, and the luminance value of the designated point The part that performs the calculation constitutes virtual point data calculation means, the part that calculates the luminance value of the dividing point on the seek line constitutes the dividing point characteristic value acquisition means, and the luminance change gradient based on the calculation result The part that searches for the point with the largest point as the edge point constitutes the edge point searching means.
The Kanji ROM 162, the CRT interface 186, and the CPU 154 constitute input related data display means, the overlay display memory 166, the CPU 154, and the CRT interface 186 constitute image processing data display means, and the input related data of the CPU 154 is converted into image processing data. The portion that is displayed preferentially on the monitor CRT device 188 constitutes input related data priority display means.
The index table 42 constitutes an intermittent rotating body that rotates intermittently by a fixed angle, and the cylindrical cam 20, the barrel cam 34, etc. constitute a table rotation driving device as an intermittent rotating body driving device that intermittently rotates the index table 42. The nozzles 80 are provided on the intermittent rotator at an angular interval equal to the rotation angle pitch of the intermittent rotator, and constitute holding means for holding the respective image processing objects. The image processing apparatus is provided in one of the stop positions of the holding means so as to face the image processing object held by the holding means, and stores data of a plurality of images captured by the imaging device in the image data storage means. The data is stored in parallel, and the processing of the image data is completed while the intermittent rotating body performs the same number of intermittent rotations as the number of images stored in parallel at a later time. The electronic component mounting device constitutes a conveying device with an image processing device in the sense that the electronic component sequentially conveys the electronic component to 20 work positions which are the stopping positions of the holding means.
[0164]
The case where the origin of the master measurement template coordinate plane is placed at the designated center DC of the image processing object has been described above, but the origin of the master measurement template coordinate plane may be placed at a position other than the designated center DC. In this case, the positional deviation (or rotation angle) between the designated center DC and the master measurement template coordinate plane is added to the positional deviation (or rotational angle) between the rotational center RC and the designated center DC, and the value is further added. By adding a positional deviation (or rotation angle) of the master measurement template coordinate plane with respect to the reference coordinate plane, a positional deviation (or rotation angle) on the reference coordinates of the designated center DC is obtained.
[0165]
In the above embodiment, the size factor is calculated separately in both directions in order to deal with the case where the size error occurs in different ratios in the X-axis direction and the Y-axis direction. The calculation may be performed under the assumption that the size factors are the same. For example, in the square chip 250 of FIG. 28, the measurement spans for all pair seek lines in the direction parallel to the X-axis direction are divided by the original spans, except for the pair seek line including the seek line where the failure occurs. Because the value and the value obtained by dividing the measurement span for all pair seek lines in the direction parallel to the Y-axis direction by the original span are determined, and the average value of all these values is used as the size factor. is there. The size factor thus determined is commonly used for calculating the size point on the seek line parallel to the X-axis direction and for calculating the size point on the seek line parallel to the Y-axis direction.
[0166]
The same applies to the size factor of the circular reference mark image 260 in FIG. 43, and all of the pair seek lines not including the seek line in which the failure has occurred among the pair seek lines shown in FIG. Then, the value obtained by dividing the measurement span by the original span is obtained, and the size factor, which is the average value of these values, is multiplied by pairRadius for all seek lines except for the seek line where the failure occurred, and the size point is calculated. The difference Diff between the size point and the corresponding edge point is calculated. The position factor and the calculation of the position factor may be the same as in the above embodiment.
[0167]
Moreover, in the said embodiment, although the re-search step was performed once, you may make it be performed twice or more. In the first re-search step, the number of failures is less than the set number, and after the edge point of the image processing object is obtained, a re-search template is set and the re-search step is performed. On the basis of the re-search template used in the re-search step and the calculation result of the edge point, the position and angle at which the deviation from the image processing object is reduced are set. Experience has shown that the probability of a failure occurring at the next measurement step is lower when the re-search step is performed multiple times than when it is performed only once. The reason for this is not clear, but in the search step, if there is a large discrepancy between the image processing object and the search template, and it is barely determined that the search object exists, there is a discrepancy between the re-search template and the image processing object. In this case, the difference between the measurement template and the image processing object may increase in the next measurement step, and a failure may occur, while the re-search step is performed twice or more. If this is the case, it is speculated that the probability may decrease.
[0168]
  In addition, if the shape, approximate position, and rotation angle of the image processing object are known in advance, the seek line can be set to a position where the edge point can be calculated without searching using the search template. Edge points can be determined using measurement templatesThe
  In the above embodiment, after performing the re-search step using the re-search template, the measurement step is performed, but when the size error or shape defect of the image processing object is small, the search step It is also possible to execute the measurement step immediately after. In this case, it is possible to use the re-search template as a measurement template, but it is desirable to use a template having a larger number of seek lines.
[0169]
Further, in the above embodiment, the determination of abnormality in pattern matching is performed based on whether or not there is a failure exceeding the allowable number of failures set in the program. For example, if there is even one failure, it is determined as abnormal. In addition, an operator can create a program that calculates an object vector only for an image processing target that has no failure, and a program that allows at least one failure and performs an object vector calculation even when there is a failure. You may do it. Since a program that does not allow failure requires a short time for image processing, this program can be selected depending on the situation, and the time required for mounting one electronic component can be shortened.
[0170]
In the above-described embodiment, the image processing apparatus acquires a surface image of the image processing object, and the illumination apparatus is a front light type that irradiates light on the surface of the image processing object. Unlike the case of acquiring a projected image of an object, it is not necessary to provide a backlight light-emitting plate or reflector on the suction nozzle, and the suction nozzle becomes lighter and can be moved at high speed. Can be placed close to each other, and an electronic component mounting apparatus capable of mounting various types of electronic components on a printed circuit board at high speed can be obtained.
However, the present invention can also be applied to an apparatus that acquires a projection image of an image processing target and performs image processing.
[0171]
Further, the present invention provides a reference mark in an image processing apparatus and a screen printing machine provided in an apparatus for mounting an electronic component on a printed circuit board by moving a component suction nozzle linearly between the electronic component supply device and the printed circuit board. The present invention can be applied to various image processing apparatuses such as an apparatus that performs the image processing. In addition, the image processing target is not limited to an electronic component or a reference mark, and an object that requires identification or calculation of an object vector can be an image processing target.
[0172]
In addition, the present invention can be implemented in various modifications and improvements based on the knowledge of those skilled in the art without departing from the scope of the claims.
[Brief description of the drawings]
[Figure 1]It is an embodiment of the present inventionIt is a perspective view which shows the external appearance of the electronic component mounting apparatus provided with the image processing apparatus.
FIG. 2 is a side view showing an index table of the electronic component mounting device together with an electron supply device and a printed board moving device.
FIG. 3 is a front sectional view showing an index table of the electronic component mounting apparatus together with a table rotation driving device.
FIG. 4 is a plan view schematically showing 20 work positions provided in the electronic component mounting apparatus together with an electronic component supply device and a printed circuit board.
FIG. 5 is a front view showing a CCD camera provided at a component posture detection position, which is one of the work positions, together with an illumination device.
FIG. 6 is a block diagram showing a control device for controlling the CCD camera.
FIG. 7 is a diagram showing a preprocessing program stored in a DRAM of the control device.
FIG. 8 is a diagram showing an execution processing program stored in a DRAM of the control device.
FIG. 9 is a diagram showing a pattern matching program stored in a DRAM of the control device.
FIG. 10 is a diagram showing setting data for executing the pattern matching program for a square electronic component.
11 is a diagram showing a master search template set based on the setting data shown in FIG. 10 together with electronic components.
12 is a diagram showing a master measurement template set based on setting data shown in FIG. 10 together with electronic components.
FIG. 13 is a diagram illustrating generation of a search template based on the master search template.
FIG. 14 is a diagram showing setting data for executing the pattern matching program on a disc with a part cut away;
15 is a view showing a master search template set based on the setting data shown in FIG. 14 together with a disk.
16 is a view showing a master measurement template set based on the setting data shown in FIG. 14 together with a disk.
FIG. 17 is a diagram illustrating a state where a search template is superimposed on a virtual screen in the search step of the pattern matching program.
FIG. 18 is a diagram illustrating linear interpolation for calculating the luminance of a specified point on a virtual screen.
FIG. 19 is a diagram illustrating a state in which a re-search template in a re-search step of the pattern matching program is overlaid on a virtual screen.
FIG. 20 is a diagram illustrating a relationship between a division point set on a seek line of the re-search template and a solid-state imaging device constituting an imaging surface.
FIG. 21 is a chart showing the luminance calculated for the dividing points shown in FIG.
FIG. 22 is a diagram showing a difference filter for differentiating the luminance calculated for the division points.
FIG. 23 is a diagram showing another difference filter for differentiating the luminance calculated for the dividing point.
FIG. 24 is a diagram showing the calculation results shown in FIG. 21 in a graph.
25 is a graph showing the results of differentiation performed using the differential filter shown in FIG.
FIG. 26 is a graph showing the results of differentiation performed using the difference filter shown in FIG.
FIG. 27 is a diagram showing a state where a measurement template is superimposed on a virtual screen in the measurement step of the pattern matching program.
FIG. 28 is a diagram for explaining the size calculation of the image processing object performed after the execution of pattern matching, taking a square chip as an example.
FIG. 29 is a diagram for explaining calculation of a difference between a size point and an edge point in the size calculation.
FIG. 30 is a diagram for explaining the calculation of the rotation center and rotation angle of an image processing object, taking a straight line as an example.
FIG. 31 is a diagram for explaining the calculation of the deviation of the rotation center of the image processing object from the designated center when there is a failure in the seek line.
FIG. 32 is a diagram for explaining another example of the calculation of the deviation of the rotation center of the image processing target object from the designated center when there is a failure in the seek line.
FIG. 33 is a diagram illustrating still another example of the calculation of the deviation of the rotation center of the image processing target object from the designated center when there is a failure in the seek line.
FIG. 34 is a diagram for describing calculation of a rotation center of an image processing object and a shift of the rotation center with respect to a designated center when seek lines are set in two directions orthogonal to each other.
FIG. 35 is a diagram for explaining another example of the calculation of the rotation center of the image processing object and the deviation of the rotation center with respect to the designated center when the seek line is set in two directions orthogonal to each other.
FIG. 36 is a chart showing angle factors used for calculating an angle of an image processing object.
FIG. 37 is a diagram showing the angle factor on a coordinate plane.
FIG. 38 is a diagram for explaining calculation of a rotation center and a rotation angle of an image processing object.
FIG. 39 is a diagram illustrating another example of calculation of the rotation center and rotation angle of an image processing object.
FIG. 40 is a diagram illustrating still another example of calculation of the rotation center and rotation angle of an image processing object.
FIG. 41 is a diagram for explaining the calculation of the position of the designated center when there is a deviation between the designated center and the rotation center of the image processing object and the image processing object has a position and angle deviation.
FIG. 42 is a diagram for explaining the calculation of the positional deviation amount and the angular deviation amount with respect to the reference coordinates of the image processing object.
FIG. 43 is a diagram illustrating a state in which a seek line is set for a circular reference mark that is a kind of image processing object.
44 is a diagram for explaining the calculation of the size of the reference mark. FIG.
FIG. 45 is a diagram for explaining the calculation of the size point and the difference from the edge point in the size calculation.
FIG. 46 is a diagram for describing pattern matching performed for QFP.
47 is a time chart showing the relationship between the intermittent rotation time of the index table of the electronic component mounting apparatus, the exposure time of the CCD camera, and the image transfer time. FIG.
FIG. 48 is a time chart illustrating an image processing cycle in the electronic component mounting apparatus.
FIG. 49 is a diagram conceptually illustrating a physical screen / virtual screen conversion driver that calculates image data on a virtual screen from image data on a physical screen in a control device that controls the imaging apparatus.
[Explanation of symbols]
42 Index table
56 Component mounting head
82 Electronic components
90 Printed circuit board
128,134 CCD camera
150 Controller
156 DRAM
164 frame grabber memory
172 Input device
188 Monitor CRT device
250 square tip
260 Reference mark
270 QFP electronic components

Claims (10)

多数の撮像素子が配列されて成る撮像面を備え、画像処理対象物を撮像する撮像装置と、
その撮像装置により撮像された画像のデータを記憶する画像データ記憶手段と、
前記画像処理対象物のエッジを間に挟むとともに、互いに前記撮像装置の前記撮像素子の配列ピッチより大きい一定の距離を隔てて位置する2個の点を一対とし、前記エッジ上の複数の位置に対応して予め設定された複数組のポイントペアを有する捜索テンプレートのデータを記憶する捜索テンプレートデータ記憶手段と、
その捜索テンプレートデータ記憶手段の捜索テンプレートを前記画像データ記憶手段の画像データの表す画像が存在する画面に重ねた場合に、前記複数組のポイントペアを構成する各対の点の光学的特性値の相違状態が設定状態以上である場合には、その対の点の一方が前記画像処理対象物のエッジ内に位置し、他方は背景内に位置する適合状態にあるとし、前記複数のポイントペアのうち設定量以上のものが適合状態にあれば、画像処理対象物は捜索テンプレートに適合する捜索対象物であると判定する判定手段と
を含むことを特徴とする画像処理装置。
An imaging device having an imaging surface in which a large number of imaging elements are arranged , and imaging an image processing object;
An image data storing means for storing data of the image captured by the imaging device,
A plurality of positions on the edge having a pair of two points located between the edges of the image processing object and a fixed distance larger than the arrangement pitch of the imaging elements of the imaging device. Search template data storage means for storing data of a search template having a plurality of point pairs set in advance corresponding to
When the search template of the search template data storage means is overlaid on a screen on which an image represented by the image data of the image data storage means exists, the optical characteristic values of the pairs of points constituting the plurality of point pairs If difference state is equal to or greater than a set state is located at the edge within the side of one said image processing object point of the pair, the other is to be in conformity state located in the background, the plurality of sets points An image processing apparatus comprising: a determination unit that determines that an image processing object is a search object that conforms to a search template if a pair or more of a pair is in a conforming state.
さらに、位置ずれのない前記画像処理対象物の前記エッジに対して設定されたマスタ捜索テンプレートの回転角度と位置との少なくとも一方を変更して前記捜索テンプレートを生成させ、前記捜索テンプレートデータ記憶手段に記憶させる捜索テンプレート生成手段と、Further, the search template is generated by changing at least one of the rotation angle and the position of the master search template set for the edge of the image processing object without misalignment, and the search template data storage means Search template generation means for storing;
その捜索テンプレート生成手段による捜索テンプレートの生成および前記判定手段による判定を、その判定手段の判定結果が肯定となるまで繰り返させる繰返し手段とRepeating means for repeating the search template generation by the search template generation means and the determination by the determination means until the determination result of the determination means becomes affirmative;
を含む請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, comprising:
さらに、前記捜索テンプレートの前記複数組のポイントペアを構成する2点ずつを結ぶ複数本の直線を複数本のシークラインとして含む再捜索テンプレートを生成させる手段と、Further, means for generating a re-search template including a plurality of straight lines connecting two points each constituting the plurality of point pairs of the search template as a plurality of seek lines,
その生成させられた再捜索テンプレートの前記複数本のシークラインと前記画像対象物のエッジとの交点の座標を演算することにより前記捜索対象物を再捜索する手段と  Means for re-searching the search object by calculating coordinates of intersections of the plurality of seek lines of the generated re-search template and the edge of the image object;
を含む請求項1または2に記載の画像処理装置。The image processing apparatus according to claim 1, comprising:
さらに、前記判定手段の判定結果が肯定となった捜索テンプレートに基づいて、前記画像処理対象物のエッジを挟むとともに、互いに前記撮像装置の前記撮像素子の配列ピッチより大きい一定の距離を隔てて位置する2個の点を直線状に結んで成るシークラインを複数本、前記エッジ上の複数の位置に対応して有する測定テンプレートを生成させる測定テンプレート生成手段と
その測定テンプレート生成手段により生成させられた前記測定テンプレートのデータである測定テンプレートデータを記憶する測定テンプレートデータ記憶手段と、
その測定テンプレートデータ記憶手段の測定テンプレートを前記画像データ記憶手段の画像データの表す画像が存在する画面に重ね、前記複数本のシークラインの各々の上における前記画像処理対象物のエッジ点の座標を演算するエッジ点座標演算手段と
を含む請求項1〜3のいずれか1つに記載の画像処理装置。
Further, based on the search template in which the determination result of the determination unit is affirmative, the edges of the image processing target object are sandwiched, and are spaced apart from each other by a certain distance larger than the array pitch of the image pickup elements of the image pickup device. Measuring template generating means for generating a measuring template having a plurality of seek lines formed by connecting two points in a straight line and corresponding to a plurality of positions on the edge;
Measurement template data storage means for storing measurement template data which is data of the measurement template generated by the measurement template generation means ;
The measurement template of the measurement template data storage means is overlaid on the screen on which the image represented by the image data of the image data storage means exists, and the coordinates of the edge points of the image processing object on each of the plurality of seek lines are set. the image processing apparatus according to the edge point coordinate calculating means into any one of including claims 1-3 for computing.
さらに、前記エッジ点座標演算手段により演算された複数のエッジ点座標に基づいて画像処理対象物が捜索対象物であることを確認する確認手段を含み、かつ、その確認手段が、前記シークライン上における前記画像処理対象物のエッジ点とシークラインの中点とのずれに基づいて前記確認を行う中点基準型確認手段を含む請求項4に記載の画像処理装置。 Further, the image processing object includes confirmation means for confirming that the object to be searched is a search object based on a plurality of edge point coordinates calculated by the edge point coordinate calculation means, and the confirmation means is on the seek line. The image processing apparatus according to claim 4 , further comprising: a midpoint reference type confirmation unit that performs the confirmation based on a deviation between an edge point of the image processing object and a midpoint of a seek line. さらに、前記エッジ点座標演算手段により演算された複数のエッジ点座標に基づいて画像処理対象物のサイズ,位置および回転角度の少なくとも1つを演算する対象物演算手段を含み、かつ、その対象物演算手段が、前記シークライン上における前記画像処理対象物のエッジ点とシークラインの中点との距離に基づいて画像処理対象物の前記サイズ,位置および回転角度の少なくとも1つを演算する中点基準型対象物演算手段を含む請求項4または5に記載の画像処理装置。Furthermore, the size of the edge point coordinate computing means a plurality of image processing object based on the edge point coordinates calculated by, looking containing an object means for calculating at least one of the position and rotation angle, and the object The object calculation means calculates at least one of the size, position and rotation angle of the image processing object based on the distance between the edge point of the image processing object on the seek line and the midpoint of the seek line. The image processing apparatus according to claim 4, further comprising a point-based object calculation unit . さらに、前記複数本のシークラインを、それらシークライン上におけるエッジ点予定位置が前記エッジ点座標演算手段により演算されたエッジ点と一致すると予想される位置に自動で設定するシークライン自動設定手段と、
そのシークライン自動設定手段によるシークラインの自動設定と、その自動設定されたシークライン上における前記エッジ点座標演算手段によるエッジ点座標の演算とを複数回繰り返させる繰返し手段
を含む請求項4〜6のいずれか1つに記載の画像処理装置。
And a seek line automatic setting means for automatically setting the plurality of seek lines to positions where the expected edge point positions on the seek lines are expected to coincide with the edge points calculated by the edge point coordinate calculation means; ,
Repeating means for repeating the automatic setting of the seek line by the automatic seek line setting means and the calculation of the edge point coordinates by the edge point coordinate calculating means on the automatically set seek line a plurality of times
The image processing apparatus according to any one of claims 4 to 6 .
前記撮像装置が前記多数の撮像素子の各々の受光状態に応じた電気信号を発生させるものであり、前記画像データ記憶手段がそれら各撮像素子の電気信号のデータを、各撮像素子の位置と関連付けて記憶するものであって、かつ、当該画像処理装置が、さらに、画像データ記憶手段の画像データにより形成される物理画面に対応して想定される仮想画面上の任意の点を指定する点指定手段と、その点指定手段による点指定毎に前記物理画面上の光学的特性値のデータに基づいて指定された点の光学的特性値を演算する仮想点データ演算手段とを含む請求項〜7のいずれか1つに記載の画像処理装置。Is intended to generate an electrical signal that the imaging device according to the light receiving state of each of the plurality of the image pickup device, the data of the image data storage means electric signals of the imaging elements, associated with the position of each imaging element Point designation that designates an arbitrary point on the virtual screen that is assumed to correspond to the physical screen formed by the image data of the image data storage means. claim comprising means and, a virtual point data calculation means for calculating the optical characteristic value of the specified point based on the data of the optical characteristics value on the physical screen every designated point by the point specifying means 4 ~ The image processing apparatus according to any one of 7. 前記点指定手段が、前記シークライン上に前記撮像素子の配列ピッチより小さいピッチで設定された複数の分割点の一つを前記任意の点として指定するものであり、前記仮想点データ演算手段が、その指定された分割点の光学的特性値を取得する分割点特性値取得手段を含み、当該画像処理装置が、その分割点特性値取得手段により取得された分割点の光学的特性値に基づいてシークライン上における光学的特性値の最も急激な変化点をエッジ点として捜索するエッジ点捜索手段を含む請求項8に記載の画像処理装置。 The point designating unit designates one of a plurality of division points set on the seek line at a pitch smaller than the arrangement pitch of the imaging elements as the arbitrary point, and the virtual point data calculating unit A dividing point characteristic value acquiring unit that acquires an optical characteristic value of the designated dividing point , and the image processing apparatus is based on the optical characteristic value of the dividing point acquired by the dividing point characteristic value acquiring unit. The image processing apparatus according to claim 8 , further comprising an edge point search means for searching for the point at which the optical characteristic value on the seek line has the most abrupt change as an edge point. さらに、
入力装置と、
モニタ装置と、
前記入力装置の入力に関連した入力関連データを前記モニタ装置に表示させる入力関連データ表示手段と、
当該画像処理装置による画像処理の経過や結果等の画像処理データを前記モニタ装置に表示させる画像処理データ表示手段と、
前記入力関連データ表示手段による表示を前記画像処理データ表示手段による表示に優先して行わせる入力関連データ優先表示手段と
を含む請求項1〜9のいずれか1つに記載の画像処理装置。
further,
An input device;
A monitoring device;
Input related data display means for causing the monitor device to display input related data related to the input of the input device;
Image processing data display means for displaying on the monitor device image processing data such as the progress and result of image processing by the image processing device;
The image processing apparatus according to claim 1 , further comprising: an input related data priority display unit that causes the display by the input related data display unit to be performed in preference to the display by the image processing data display unit.
JP27382995A 1994-10-25 1995-10-23 Image processing device Expired - Lifetime JP3759983B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27382995A JP3759983B2 (en) 1994-10-25 1995-10-23 Image processing device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP6-260621 1994-10-25
JP26062194 1994-10-25
JP27382995A JP3759983B2 (en) 1994-10-25 1995-10-23 Image processing device

Publications (2)

Publication Number Publication Date
JPH08180191A JPH08180191A (en) 1996-07-12
JP3759983B2 true JP3759983B2 (en) 2006-03-29

Family

ID=26544685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27382995A Expired - Lifetime JP3759983B2 (en) 1994-10-25 1995-10-23 Image processing device

Country Status (1)

Country Link
JP (1) JP3759983B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102009036467A1 (en) 2008-08-09 2010-04-01 Keyence Corporation Pattern model positioning method in image processing, image processing apparatus, image processing program and computer-readable recording medium
DE102009036474A1 (en) 2008-08-09 2010-05-27 Keyence Corporation Image data compression method, pattern model positioning method in image processing, image processing apparatus, image processing program and computer readable recording medium
US8155473B2 (en) 2008-10-16 2012-04-10 Keyence Corporation Method for deciding image data reduction ratio in image processing, pattern model positioning method in image processing, pattern model creating method in image processing, image processing apparatus, image processing program, and computer readable recording medium
US8401305B2 (en) 2008-10-16 2013-03-19 Keyence Corporation Contour-information extracting method by use of image processing, pattern model creating method in image processing, pattern model positioning method in image processing, image processing apparatus, image processing program, and computer readable recording medium

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000293696A (en) 1999-04-07 2000-10-20 Matsushita Electric Ind Co Ltd Image recognition device
JP4456709B2 (en) 2000-01-12 2010-04-28 富士機械製造株式会社 Substrate support state inspection method
JP4607313B2 (en) 2000-12-08 2011-01-05 富士機械製造株式会社 Electronic component mounting system
JP4660205B2 (en) * 2005-01-07 2011-03-30 Juki株式会社 Component recognition method and apparatus
JP4950716B2 (en) 2007-03-22 2012-06-13 株式会社日立ハイテクノロジーズ Image processing system and scanning electron microscope apparatus
CN101839690B (en) * 2010-04-13 2011-12-21 河海大学常州校区 Visual inspection method for chip electronic component position error based on edge fitting
WO2019123517A1 (en) * 2017-12-18 2019-06-27 株式会社Fuji Work device and method for controlling same
CN112385328B (en) 2018-07-12 2022-08-30 株式会社富士 Template generating device and component mounting machine
CN113793293B (en) * 2020-05-25 2024-01-26 中移(苏州)软件技术有限公司 Contour detection method, apparatus, system and computer readable storage medium
CN114170287A (en) * 2021-12-09 2022-03-11 中国联合网络通信集团有限公司 Depth information acquisition method and device, electronic equipment and computer readable medium
CN115283835B (en) * 2022-07-05 2023-10-20 深圳明锐理想科技有限公司 Defect marking method and device for PCB
JPWO2024142164A1 (en) * 2022-12-26 2024-07-04
CN117036490B (en) * 2023-10-10 2024-01-19 长沙能川信息科技有限公司 Camera preset position offset detection method, device, computer equipment and media
CN119338785B (en) * 2024-10-16 2026-01-20 华中科技大学 On-line evaluation method and system for wire bonding welding quality

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102009036467A1 (en) 2008-08-09 2010-04-01 Keyence Corporation Pattern model positioning method in image processing, image processing apparatus, image processing program and computer-readable recording medium
DE102009036474A1 (en) 2008-08-09 2010-05-27 Keyence Corporation Image data compression method, pattern model positioning method in image processing, image processing apparatus, image processing program and computer readable recording medium
US8150213B2 (en) 2008-08-09 2012-04-03 Keyence Corporation Image data compression method, pattern model positioning method in image processing, image processing apparatus, image processing program, and computer readable recording medium
US8355590B2 (en) 2008-08-09 2013-01-15 Keyence Corporation Image data compression method, pattern model positioning method in image processing, image processing apparatus, image processing program, and computer readable recording medium
US8406527B2 (en) 2008-08-09 2013-03-26 Keyence Corporation Pattern model positioning method in image processing, image processing apparatus, image processing program, and computer readable recording medium
DE102009036474B4 (en) 2008-08-09 2022-06-02 Keyence Corporation Image data compression method, pattern model positioning method in image processing, image processing apparatus, image processing program and computer-readable recording medium
US8155473B2 (en) 2008-10-16 2012-04-10 Keyence Corporation Method for deciding image data reduction ratio in image processing, pattern model positioning method in image processing, pattern model creating method in image processing, image processing apparatus, image processing program, and computer readable recording medium
US8401305B2 (en) 2008-10-16 2013-03-19 Keyence Corporation Contour-information extracting method by use of image processing, pattern model creating method in image processing, pattern model positioning method in image processing, image processing apparatus, image processing program, and computer readable recording medium

Also Published As

Publication number Publication date
JPH08180191A (en) 1996-07-12

Similar Documents

Publication Publication Date Title
JP3759983B2 (en) Image processing device
US5911001A (en) Image processing apparatus
JP4637417B2 (en) Standard line setting method for reference mark part search and reference mark part search method
JP6109317B2 (en) Substrate production operation method, substrate imaging condition determination method, and substrate production operation apparatus
US6396942B1 (en) Method and apparatus for locating ball grid array packages from two-dimensional image data
JP4326641B2 (en) Mounting device, mounting accuracy detection jig set, and mounting accuracy detection method
JP3907786B2 (en) Electronic component mounting method and apparatus
CN103806225B (en) Apparatus for sewing
WO2001061275A1 (en) Method and system for automatically generating reference height data for use in a three-dimensional inspection system
US10893639B2 (en) Component mounting using feedback correction
US6597806B1 (en) Image processing method and apparatus
JP6472873B2 (en) Parts inspection machine and parts placement machine
US10869421B2 (en) Mounting device and imaging processing method
WO2017145249A1 (en) Image processing system and image processing method
JP4185186B2 (en) Imaging device
JP3691888B2 (en) Electronic component mounting method
JP2004213562A (en) Component recognition data creation method and creation device, and component recognition data creation program
JP5443894B2 (en) Electronic component mounting apparatus and suction position correction method thereof
JP2005353750A (en) Maintenance management device for electronic component mounting equipment
JP2004279304A (en) Image processing method and image processing program
JP2006013044A (en) Electronic component mounting device
US20240015943A1 (en) Image processing device, mounting device, mounting system, image processing method, and mounting method
JP6795622B2 (en) Parts mounting machine
JP7784361B2 (en) Component mounting device and component suction state inspection method
CN109844805B (en) Image processing element shape data generation system and image processing element shape data generation method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050620

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050628

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050829

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060106

R150 Certificate of patent 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: 20090113

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100113

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110113

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120113

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130113

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130113

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140113

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term