JP2004219283A - Method and system for recognizing component - Google Patents

Method and system for recognizing component Download PDF

Info

Publication number
JP2004219283A
JP2004219283A JP2003007739A JP2003007739A JP2004219283A JP 2004219283 A JP2004219283 A JP 2004219283A JP 2003007739 A JP2003007739 A JP 2003007739A JP 2003007739 A JP2003007739 A JP 2003007739A JP 2004219283 A JP2004219283 A JP 2004219283A
Authority
JP
Japan
Prior art keywords
component
corner
terminal
lead
terminals
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003007739A
Other languages
Japanese (ja)
Other versions
JP4150262B2 (en
Inventor
Kimiko Fujie
公子 藤江
Yoshiaki Abe
好晃 安部
Kazunori Yamada
山田  和範
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Juki Corp
Original Assignee
Juki Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Juki Corp filed Critical Juki Corp
Priority to JP2003007739A priority Critical patent/JP4150262B2/en
Publication of JP2004219283A publication Critical patent/JP2004219283A/en
Application granted granted Critical
Publication of JP4150262B2 publication Critical patent/JP4150262B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a component discrimination method and apparatus which can accurately discriminate components, having terminals which are not necessary for centering at their corners, and increase component discrimination accuracy. <P>SOLUTION: A photographed image of an sucked component is processed, and using this image processing, corner coordinates C1-C4 are acquired (step S5). When it is determined that corner terminals L1-L4 exist, based on these acquired corner coordinates, the corner terminals are deleted (step S6); and the center and the inclination of the component are calculated, based on terminals, after the deletion of the corner terminals (step S9). The accuracy of component discrimination can be enhanced, and the precision of component mounting can be increased in formation such as this, since the component discrimination is performed, after deleting the corner terminals which do not have any relation to centering and thus are not necessary for recognized discrimination. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、部品認識方法及び装置、更に詳細には、撮像された部品の画像を処理し、その画像処理により検出される部品の端子に基づいて部品中心、部品傾きなど部品の姿勢を認識する部品認識方法及び装置に関する。
【0002】
【従来の技術】
従来、部品実装機においてプリント基板に電子部品(以下単に部品という)を精度良く搭載するために、吸着ノズルにより吸着された部品をプリント基板に搭載する前にCCDカメラなどの撮像装置により部品を撮像して認識し、吸着時の吸着姿勢、すなわち吸着ずれ(吸着位置と部品中心位置のずれ、吸着角度のずれ)を計算しそれを補正することにより正確に部品をプリント基板に搭載している。
【0003】
部品を撮像してその吸着姿勢を認識する場合、部品には各辺にリード端子が存在するので、特許文献1のように、リード端子の存在する辺毎に端子の検出を行い、その検出結果に基づいて部品認識を行い、吸着ずれを演算している。また、検出結果から端子以外のモノを削除する処理や、不良端子の検出などの検査も各辺毎に行って検出精度を高めている。
【0004】
【特許文献1】
特開平6―223185号公報(請求項1)
【0005】
【発明が解決しようとする課題】
しかしながら、従来のリード認識方法での検出リード検査は、辺単位でのみ行うために、検査できる項目が限られていた。特に検出結果の中からリード端子以外のモノを削除する処理としては、同一直線上にない端子を削除する処理と、両端のピッチが異常な場合に端のリードを削除する処理だけだった。そのためリード以外のものが同一直線上にリードピッチと同間隔で存在した場合、1辺の検出結果だけではリード端子かそうでないのかを判断することは不可能であった。従って、部品のコーナー部に様々な形状のセンタリングに関係のない端子が存在しているQFN等の部品は、従来の方法では認識が安定しないという問題点があった。
【0006】
従って、本発明は、部品コーナーにセンタリングに関係のない端子を有する部品に対する認識精度を向上させることが可能な部品認識方法及び装置を提供することを課題とする。
【0007】
【課題を解決するための手段】
上記課題を解決するために、本発明では、
撮像された部品の画像を処理し、その画像処理により検出される部品の端子に基づいて部品の姿勢を認識する部品認識方法において、
撮像された部品の画像を処理してコーナー座標を取得し、
前記取得したコーナー座標に基づきコーナー端子が存在するかどうかを判定し、
コーナー端子が存在すると判定された場合にコーナー端子を削除し、
コーナー端子を削除した後の端子に基づいて部品の姿勢を認識する構成を採用している。
【0008】
また、本発明では、
撮像された部品の画像を処理し、その画像処理により検出される部品の端子に基づいて部品の姿勢を認識する部品認識装置において、
撮像された部品の画像を処理する画像処理装置と、
前記画像処理から求められるコーナー座標に基づきコーナー端子が存在すると判定されたときにコーナー端子を削除する手段と、
コーナー端子を削除した後の端子に基づいて部品中心とその傾きを演算する手段とを有する構成も採用している。
【0009】
このような構成では、センタリングに関係のない部品認識に不要なコーナー端子を削除して部品認識が行われるので、部品認識精度を高めることができ、部品搭載精度を向上させることができる。
【0010】
コーナー端子の削除は、コーナー座標からの端子距離に基づきコーナー端子が存在するかどうかを判定して行うことができる。部品種類によりコーナー端子が隣接する端子と近接している場合には、コーナー端子を認識できない場合があるので、コーナー座標から求められる対角線上に沿って画像をスキャンし、このスキャンによりコーナー端子を検出する。このように検出されたコーナー端子は塗りつぶすことにより画像から削除される。
【0011】
このように端子の塗りつぶし処理を行うと、検出したくない端子を画像上から削除できるため、不要な端子自体を検出しないで済むだけでなく、周囲の端子の検出に影響を与えることもなくなり、必要端子だけを正確に検出することができ、正確な部品認識を行うことが可能となる。
【0012】
また、対角線スキャンによりコーナー端子を確実に検出することができるので、異部品検査、すなわち、指定された部品に対して部品認識が行われたかどうかの検査を行うことができる。
【0013】
【発明の実施の形態】
以下、図面に示す実施の形態に基づき本発明を詳細に説明する。
【0014】
<部品実装装置と画像処理装置の構成>
図1は、本発明が適用される部品実装装置(部品実装機)の制御構成を示すブロック図であり、部品実装装置は、部品供給装置(不図示)から供給される部品(電子部品)20を吸着する吸着ノズル3aを備えたヘッド部3を有している。このヘッド部3はCPUで構成されるコントローラ10により駆動されるX軸モータ11、Y軸モータ12により駆動されてXY軸方向に移動可能に構成される。またヘッド部3は、部品吸着並びに部品搭載時にZ軸モータ13によってZ軸方向に駆動されて昇降し、また吸着ノズル3aはθ軸モータ14によってノズル軸を中心に回転できるように構成される。
【0015】
また、部品実装装置には、部品20を撮像するCCDカメラのようなレンズ5aを備えた撮像装置5が配置され、ヘッド部3は、部品吸着後撮像装置5に移動して、照明装置15により照明された部品20が撮像装置5により撮像される。部品の撮影画像は、CPU7a、画像メモリ7b、A/D変換器7c、部品データメモリ7dを備えた画像処理装置7に入力される。画像処理装置7は、設定された領域の画像を取り込んで公知のアルゴリズムにより処理して部品の吸着姿勢を認識し、部品中心と吸着中心の位置ずれ、また吸着角度ずれを演算する。コントローラ10は、X軸、Y軸、θ軸モータ11、12、14を駆動するときこの位置ずれを補正し、搬送されてくる基板(不図示)に部品20を搭載する。
【0016】
また、部品実装装置には、部品データを入力するためのキーボード21、マウス22などの入力装置が設けられ、生成された部品データが、ハードディスク、フラッシュメモリなどで構成される記憶装置23や画像認識装置7内の部品データメモリ7dに格納できるようになっている。部品データは、このように入力装置を介さず、部品実装装置に接続されたホストコンピュータ(不図示)から供給されるものを記憶装置23や部品データメモリ7dに格納しておくようにしてもよい。また、モニタ(表示器)24が設けられ、この画面には、部品データ、演算データや撮像装置5で撮像した部品画像が表示できるようになっている。
【0017】
図2には、吸着ノズル3aに吸着された部品20aが、照明装置15により照明され、撮像装置5により撮像される状態が図示されている。CPU7aからの制御線7dにより撮像装置5は、設定された領域の画像を撮像する。撮像された画像は、信号線7eを介して画像処理装置7に入力され、A/D変換器7cを介してデジタル信号に変換された後、画像メモリ7bに格納され、画像処理されて部品の姿勢が認識される。また、処理される画像はモニタ24に表示させることができる。
【0018】
<部品認識の流れ>
図3には、例えば部品をQFN部品としたときの部品姿勢を認識して吸着ずれを演算する流れが図示されている。
【0019】
まず、QFN部品には、図4に示すように、種々のタイプがあるので、コーナー端子の形状によるタイプ分けを行い、コーナー端子の形状によりタイプ0〜タイプ3などのように分類する。今後、それ以外のコーナー端子形状の部品がでてきた場合は、タイプ種別を増設することで対応する。また、以下の個々の説明では、その説明に適した部品種類(タイプ、端子数、外形)について説明が行われる。
【0020】
部品は、部品の縦/横寸法とコーナー端子の存在する位置とそこに存在するコーナー端子形状、そして4辺それぞれの端子情報を記述したデータで表現される。端子情報とは、端子本数・ピッチ・端子長・端子幅・欠け情報・端子曲がり判定率などである。以上の表現方法を用いて、コーナー端子の存在する位置とその形状や、各辺の端子情報が、キーボード21など入力装置を用いて入力されるか、あるいはホストコンピュータから取得されて、部品データとしてあらかじめ画像処理装置7内の部品データメモリ7dに送信され、部品識別番号(ID)毎に管理される。
【0021】
認識実行時には、吸着された部品が撮像装置5で撮像されて、その画像が画像メモリ7bに格納されるとともに、その部品のID番号が指定され、部品データメモリ7dからその部品に係わる部品データが読み出され、図3に図示した認識処理が開始される。
【0022】
まず、ステップS1で、画像の外側から内側に向かってスキャンを行い、部品の外接点を検出し、この結果から部品の大まかな位置を示す外接ウィンドウWを設定する。続いて、辺毎にリード列ウィンドウW1〜W4をかけ(ステップS2)、リードの存在する領域に検査領域を設定する。そして、4辺それぞれについて、リード列ウィンドウ内にDOGフィルタ(Marr&PosioのDifference−Of−Gaussianフィルタ)をかけてリード端子のエッジを検出し、それを用いてリード先端(図で「+」印)の座標を検出する(ステップS3、S4)。このとき、検出本数が指定本数よりも少なければ、その時点で本数過少エラーとして認識処理を終了する。
【0023】
続いて、検出したリード先端座標から、リード先端を結んだリード列直線を求める。図5(A)に図示したように、検出した全てのリードを用いて直線を求めると、コーナー端子や他辺のリードを検出した場合にズレた直線H’になってしまう。そこで正確なリード列直線を得るために、検出したリード列座標の中から同一直線上にない点を削除する。
【0024】
その方法が、図6に図示されており、まず、図6(A)に示したように、検出リード列を左右2つのグループG1、G2に分け、各グループで、リード長手方向座標(yとする)のヒストグラムを作成する。そして、各グループで、求めたヒストグラムから中間値を求め、y座標に中間値を持つ検出端子を抜き出す。例えば、グループG1では中間値をy4、グループG2では中間値をy2として、それぞれの中間値をとるすべての点を求める。この求めた点が図6(B)で「+」で示されており、続いて図6(C)に示したように、この抜き出した端子の平均値を求め、その平均値を有する2点R1、R2を定めて、図6(D)に示したように、2点R1、R2を通る直線を基準直線Rとする。次に、図6(E)に示したように、基準直線Rから一定以上の距離が離れている検出端子R3は削除する。
【0025】
このように、同一直線上にない点を削除した後、図5(B)に示したように、残りの検出端子の座標Rnに関して最小二乗直線を求め、この直線をリード列直線Hとする。
【0026】
続いて、このリード列直線を各辺で求め、各リード列直線の交点を部品コーナー座標C1〜C4として取得する。これが、図3のステップS5に対応する。
【0027】
部品角に様々な形状の端子が存在し、このようなコーナー端子L1〜L4はセンタリング(位置決め)には不要なため、部品角にコーナー端子が検出された場合には、以下で詳細に説明するように、コーナー座標C1〜C4を基準にコーナー端子の削除処理を行う(ステップS6)。
【0028】
このコーナー端子の削除方法は、図4に示した部品のタイプごとあるいは端子形状ごとに異なるので、後述するように、タイプごとに異なった削除処理となる。例えば、図7(A)に示したようなタイプ3に属する部品で、コーナー端子L10と隣接するリード端子L11の先端部分が近すぎる場合、DOGフィルタをかけてリードエッジを検出しようとするときに2つの端子が1つになって検出されてしまい、図7(B)に示したように、2つの端子L10、L11に対してリード先端E10が検出されてしまう恐れがある。この場合は、コーナー端子L10が存在することでリード端子の検出に影響を与えてしまう。これに対し、図7(C)に示したようなタイプ1に属する部品の場合には、コーナー端子L20と隣接するリード端子L21の先端がある程度の距離がある場合は、DOGフィルタをかけても2つの端子が1つになって検出されることはない。図7(D)に示したように、それぞれリード先端E20、E21、.....が検出され、コーナー端子L20が存在してもリード端子の検出に影響はない。
【0029】
従って、タイプ1、2のように、コーナー端子がリード端子の検出に影響を与えない形状の場合は、コーナーからの距離を見て検出結果にコーナー端子が含まれているかどうかを判断する。コーナー端子は部品のコーナー部に存在するため、最もコーナーから近い端子がコーナーから所定の距離内に存在する場合はコーナー端子だと判断する。コーナー端子はセンタリングには不要なため、コーナー端子と判断した時は検出結果から削除する。該当する端子がない場合は削除を行わない。端子削除終了後、コーナー座標より2本の対角線を取得し、その対角線上をスキャンし、コーナー端子の有無をチェックする。部品データ入力時、部品タイプの種類や位置を誤入力すると、スキャンによる端子検出との相違が生じ、異部品検査を行うことができる。例えば、部品データ上からはコーナー端子が存在するはずのコーナーに対してコーナー端子を見つけられなかった場合は、異部品に対して部品認識が行われており、このような場合は、エラー終了する。
【0030】
一方、コーナー端子がリード端子の検出に影響を与えるタイプ3のような形状の場合は、まず対角線スキャンを行い、コーナー端子を検出する。そのコーナー端子の輪郭を検出して、処理画像からそのコーナー端子を塗りつぶしてコーナー端子を削除する。これを4コーナーそれぞれに行い、コーナー端子のない画像を作り出して、その画像に基づいて再度リード検出を行う。
【0031】
なお、ステップS6で行われるコーナー端子削除処理並びに異部品検査は、後でタイプごとに詳細に説明する。
【0032】
このように、コーナー端子削除処理並びに異部品検査を行った後、検出されている残りのリード端子に対して不良端子が存在するかなどのリード検査を各辺に対して行い(ステップS7、S8)、正常であれば、そのリード端子に基づいて部品の中心と傾きを算出する(ステップS9)。
【0033】
<対角線スキャンによるコーナー端子の検出>
上述したように、異部品であるかどうかの検査並びにタイプの種類によりコーナー端子を塗りつぶして画像処理をする必要があるので、以下に、対角線スキャンによるコーナー端子の検出を説明する。
【0034】
まず、コーナー端子を検出するための二値化しきい値を設定する。これは、図8に示したように、各辺のリード列直線H”上の点とその近傍の点をサンプリングしてサンプル点とし、サンプル点の濃度ヒストグラムを作成して、判別分析法を用いて各辺の二値化しきい値を求める。判別分析法は、濃度値の集合をしきい値tで2つのクラス(t以上とt未満)に分割したと仮定したとき、2つのクラス間の分離が最もよくなるようにパラメータtを決めるという考え方に基づいた一般的なしきい値選択法である。例えば、左上コーナー用しきい値は、そのコーナーを作る2辺、すなわち上辺と左辺に対して求められたしきい値の平均値とする。
【0035】
続いて、部品画像を図9に示した流れに沿って処理しコーナー端子が存在するかどうかを検査する。
【0036】
まず、部品画像のコーナー座標を取得しているので(図3のステップS5)、対角のコーナー間を結んだ対角線を取得し(ステップS11)、端子を検出するためのスキャンの方向と範囲を設定する(ステップS12)。スキャン方向は、図10(A)に示したように、検出感度を高めるために対角線の傾きとコーナー位置により異なるようにする。スキャン範囲は、コーナー座標前後にコーナー間距離の1/4の長さをとった範囲M1とM2を定め、スキャン開始点m1と終了点m2を設定する。
【0037】
このようにスキャンの方向とスキャン開始点と終了点を設定したらスキャンを開始する(ステップS13)。図10(C)に示したように、対角線の傾きが45°より緩やかな場合は、スキャン開始点から終了点まで対角線上の点と上下の点をスキャンし(y方向スキャン)、対角線の傾きが45°より急な場合は、対角線上の点と左右の点をx軸方向にスキャンする。
【0038】
ステップS14では、スキャン結果を判定する。コーナー端子用の2値化しきい値以上の点が検出できた時点で対角線スキャンは終了し、端子輪郭を取得するステップS15に進む。逆に、スキャン終了点までスキャンを行っても2値化しきい値以上の点が見つからなかった場合は、コーナー端子なしとする。
【0039】
ステップS14で端子が検出された場合は、検出点から輪郭を検出していく(ステップS15)。この輪郭を取得する状態が図11に図示されている。図11(A)において、Q1は対角線スキャンで検出された点で、その検出点Q1を除く周囲の8近傍を数字の順序で調査していく。Q2でしきい値以上となり輪郭が検出されるので、これを次の輪郭点とする。続いて、図11(B)に示したように、Q2を中心に8近傍の調査を開始し、同様な処理を最初のスタート点に戻るまで繰り返す。なお、8近傍の調査方向は、対角線スキャンの方向により決定するようにする。
【0040】
このようにして検出した輪郭点が図11(C)に図示されており、その情報は検出した順に配列へ格納していく。続いて、ステップS16、S17において、この輪郭点配列からX方向のエッジペア座標、y方向のエッジペア座標をそれぞれ求める(図11(D)、(E))。また、ステップS18において、このエッジペア座標から検出端子の重心Xg、Ygを求める(図11(F)、(G))。この重心の演算は、下記の式に従って求められる。
【0041】
Lsum(y)=Edge2(y)−Edge1(y)+1
Ladr_sum(y)=Lsum(y)×(Edge1(y)+Edge2(y))/2
SUM=ΣLsum(y)
Ymom=Σ(Lsum(y)×y)
Xmom=ΣLadr_sum(y)
Xg=Ymom/Sum
Yg=Xmom/Sum
求めた検出端子の重心が、対角線付近に存在する場合は、検出した端子はコーナー端子と見なせる。逆に、重心が対角線から離れている場合は、誤ってリード端子を検出した可能性もありコーナー端子なしと見なす。
【0042】
このような対角線スキャンによるコーナー端子の検出は、以下で説明するように、異部品検査やタイプ種類に応じて行われるコーナー端子の塗りつぶしに利用することができる。
【0043】
<コーナー端子削除と異部品検査>
ここで、図3のステップS6で行われるコーナー端子削除と異部品検査の詳細を説明する。この処理は、上述したように、図4に示したような部品タイプにより異なるので、タイプごとに行われる。
【0044】
タイプ0の部品は、コーナー端子が存在しないのでコーナー端子削除処理は行わない。しかし、異部品検査のために、上述した対角線スキャンを行いコーナー端子の有無を調べる。4コーナーともコーナー端子を検出しなかった場合は正常とする。1コーナーでもコーナー端子を検出した場合は、異部品の可能性があるので、リード検査後に再度異部品検査をするため、コーナー端子が存在したコーナー位置を覚えておく。
【0045】
図12には、タイプ1、タイプ2の部品に対するコーナー端子削除と異部品検査処理の流れが図示されている。
【0046】
まずリード端子が検出されているので、そのピッチを取得し(ステップS21)、検出リード間の距離を求める。図13(A)に示したようなリード欠けが存在しない部品の場合は、両端のリード端子L30、L31以外のリード端子間距離を平均してリードピッチPnを求める。一方、図13(B)に示したように、リード欠けL32、L33が存在する場合は、両端の端子ピッチ以外から最小リード間距離を求め、他のリード間距離をこの最小リード間距離で割り、最小リード間距離をP1とした場合の、リード間距離を整数で表現する。部品データのリード欠け情報から、1ピッチをP1としたリード間距離列を求めておく。
【0047】
検出したリード間距離の状態と、リード欠け情報から取得したリード情報に矛盾がある場合は異部品であるとしてエラー処理を行う。正常な場合は、両端のリード間距離以外のリード間距離で欠け本数を加味して平均値を求め、これをリードピッチとする。
【0048】
次に両端のリード間距離が検出ピッチの±30%以内でない場合は、端のリードはコーナー端子だと見なし削除を行う。ただし、リード曲がり判定率が±30%未満で設定されていた場合は、検出ピッチの±リード曲がり判定率[%]以内とする。例えば、図14(A)に示したように、左端のリード端子L30とその隣のリード端子間の距離P3は、検出ピッチ+30%より大きいので、端子L30はコーナー端子として削除する。一方、右端のリード端子L31との距離P4は、検出ピッチ+30%以内のため、この端子は削除しない。この状態が図14(B)に図示されている。このように、両端ピッチが不整合で一致しない場合には、異常処理を行って(ステップS22)、一方の端子を削除しておく。
【0049】
次にコーナー座標から1ピッチ以内に検出端子が存在する場合は、コーナー端子と見なし削除する(ステップS23)。ただし、先の両端リード間距離異常で削除している場合はこの処理は行わない。従って、すでに削除されている左端L30に対してはこの処理は行われない。また、1ピッチ以内に複数の検出端子が存在する場合はコーナー座標に最も近い検出端子を削除する。
【0050】
なお、ここで削除判定に用いる2つの値、両端のリード間距離の許容値とコーナーからの距離は、部品データなどからの外部指定も可能である。説明ではデフォルト値を用いている。
【0051】
最後に、上述した対角線スキャンを行い(ステップS24)、4辺のコーナー端子の有無を調べる(ステップS25、S27)。コーナー端子が存在すると指定されたコーナーでコーナー端子を検出した場合は正常とする。1コーナーでもコーナー端子の有無が指定と異なる場合は異部品の可能性がある。リード検査後に再度異部品検査をするため、コーナー端子が存在したコーナー位置を覚えておく(ステップS26)。
【0052】
タイプ3の部品のコーナー端子削除処理は、図15に示した流れに沿って行われる。タイプ3の場合には、コーナー端子がリード端子の検出に影響を与えるので、対角線スキャンを行い、コーナー端子を検出して、コーナー端子の塗りつぶし処理を行ってコーナー端子を削除するようにする。
【0053】
そのため、まず、上述した対角線スキャンを行い(ステップS31)、コーナー端子の有無を調べる(ステップS32)。端子が存在しなかった場合は、次の処理のコーナー端子の塗りつぶし処理を行うことは不可能であるため、処理をスキップし次のコーナーの処理へ進む。ただし、コーナー端子が存在すると指定されたコーナーにコーナー端子が存在しないということは異部品の可能性がある。従って、リード検査後に再度異部品検査を行うため、コーナー端子が検出されなかったコーナー位置を覚えておく(ステップS33)。
【0054】
対角線スキャンによりコーナー端子が存在することが判別された場合は、コーナー端子の塗りつぶし処理を行う(ステップS34)。この塗りつぶし処理は、図16に図示したように行われ、まずx方向のエッジ点から半ピッチ外側の2つの点X1、X2の間をスキャンし、最低濃度を持つ点X3、X4の位置を取得する。これを谷座標とする。左右の谷座標間を、濃度変化が一定になるように塗りつぶしていく。
【0055】
x方向のエッジペアでの塗りつぶしが終了したらy方向でも同様の処理を行う。エッジ上の点は既に濃度が変更されているため、エッジの1つ外側の点から半ピッチ外側の点の間をスキャンして谷座標を求める。上下の谷座標間を濃度変化が一定になるように濃度を設定する。既に塗りつぶされている濃度より新たに塗ろうとする濃度の方が低い場合にのみ塗る。このような処理によりコーナー端子Lの塗りつぶしを行うことができ、コーナー端子の画像を削除することができる。
【0056】
検出した全てのコーナー端子の塗りつぶしが終了したら(ステップS35)、再度リード検出を行って(ステップS36)、その検出結果に従って部品中心と傾きを計算する。
【0057】
このように端子の塗りつぶし処理を行うと、検出したくない端子を画像上から削除できるため、不要な端子自体を検出しないで済むだけでなく、周囲の端子の検出に影響を与えることもなくなり、必要端子だけを正確に検出することができ、正確な部品認識を行うことが可能となる。
【0058】
なお、タイプ3に関して説明した端子の塗りつぶし処理は、タイプ3のような部品だけでなく、他のコーナー端子を有するタイプ1、2に対して行うようにしてもよい。
【0059】
また、コーナー端子削除と異部品検査において行われた対角線スキャンにおいて、異部品の可能性があり、エラーが発生したコーナー端子に対しては、その位置が保存されているので(図12のステップS26、図15のステップS33)、この保存されている端子に対して再度コーナー端子の有無判定のためのスキャンを行うようにする。この処理が図17に図示されている。
【0060】
リード検査終了後はリード先端座標が決定しているため、図17(A)に図示したように、コーナー座標E40の座標とそれに隣接する2つのリード端子L41、L42のエッジE41、E42の座標が分かる。これら2本のリード端子とコーナー座標を結んだ矩形Aを求める。図17(A)に示したように、矩形Aの範囲では、リードの存在する側の辺にリード端子L41、L42の一部が入ってしまう。このリード端子部分を回避するために、図17(B)に示したように、辺から内側に向かって端子が存在しない点を見つけるスキャンをリード先端側からリード根元方向に行う。図17(C)に示したように、最も内側のリード端子が存在しない点にあわせて、先に求めた範囲を狭めた矩形A’を求める。
【0061】
そして、図17(C)で設定した範囲A’内をコーナー座標側からスキャンしていき、コーナー端子用二値化しきい値以上の点が一定数以上の画素を持つ塊で見つかったらコーナー端子は存在すると判断する。範囲A’内を全てスキャンしてもしきい値以上の点が一定数以上見つからなかった場合は、コーナー端子は存在しないと判断する。コーナー端子と見なす一定数以上の塊と判断する画素数は解像度毎に設定する。これによりコーナー端子の検出精度を向上させることができる。
【0062】
【発明の効果】
以上説明したように、本発明では、センタリングに関係のない部品認識に不要なコーナー端子を削除して部品認識が行われるので、部品認識精度を高めることができ、部品搭載精度を向上させることができる。
【0063】
また、本発明では、部品種類によりコーナー端子が隣接する端子と近接している場合には、コーナー端子を認識できない場合があるので、コーナー座標から求められる対角線上に沿って画像をスキャンし、このスキャンによりコーナー端子を検出し、この検出されたコーナー端子を塗りつぶすことによりコーナー端子を削除している。このように端子の塗りつぶし処理を行うと、検出したくない端子を画像上から削除できるため、不要な端子自体を検出しないで済むだけでなく、周囲の端子の検出に影響を与えることもなくなり、必要端子だけを正確に検出することができ、正確な部品認識を行うことが可能となる。
【図面の簡単な説明】
【図1】部品実装装置の概略構成を示すブロック図である。
【図2】部品撮像装置並びに画像処理装置の構成を示した構成図である。
【図3】部品認識の流れを示したフローチャートである。
【図4】部品の種類を示した説明図である。
【図5】リード列直線を求める流れを示した説明図である。
【図6】リード列直線を求めるための基準直線を求める流れを示した説明図である。
【図7】部品タイプによりコーナー端子が端子検出に与える影響を説明した説明図である。
【図8】2値化しきい値を求めるためのサンプリング点を示した説明図である。
【図9】対角線スキャンにより部品にコーナー端子が存在するかどうかを検出する流れを説明したフローチャートである。
【図10】対角線スキャンの方法を説明した説明図である。
【図11】検出されたコーナー端子の輪郭を求める流れを示した説明図である。
【図12】タイプ1、2の部品に対するコーナー端子削除処理並びに異部品検査の流れを示したフローチャートである。
【図13】リードピッチを定める状態を示した説明図である。
【図14】コーナー端子削除の流れを示した説明図である。
【図15】タイプ3の部品に対するコーナー端子削除処理並びに異部品検査の流れを示したフローチャートである。
【図16】タイプ3の部品に対するコーナー端子削除処理を示した説明図である。
【図17】コーナー端子検出を高めるための処理を示した説明図である。
【符号の説明】
5 撮像装置
7 画像処理装置
7b 画像メモリ
7d 部品データメモリ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method and apparatus for recognizing a component, and more particularly, processes a captured image of a component, and recognizes the orientation of the component, such as the component center and the component inclination, based on the terminal of the component detected by the image processing. The present invention relates to a component recognition method and device.
[0002]
[Prior art]
Conventionally, in order to accurately mount electronic components (hereinafter simply referred to as components) on a printed circuit board in a component mounter, the components picked up by the suction nozzle are imaged by an imaging device such as a CCD camera before being mounted on the printed circuit board. The component is accurately mounted on the printed circuit board by calculating the suction attitude at the time of suction, that is, the suction shift (the shift between the suction position and the center position of the component, the shift of the suction angle), and correcting it.
[0003]
When a component is imaged and its suction attitude is recognized, the component has a lead terminal on each side. Therefore, as in Patent Document 1, a terminal is detected for each side where a lead terminal is present, and the detection result is obtained. Is performed based on the component recognition, and the suction deviation is calculated. In addition, a process of deleting items other than terminals from the detection result and inspections such as detection of a defective terminal are also performed for each side to improve detection accuracy.
[0004]
[Patent Document 1]
JP-A-6-223185 (Claim 1)
[0005]
[Problems to be solved by the invention]
However, since the detection lead inspection by the conventional lead recognition method is performed only for each side, the items that can be inspected are limited. In particular, the only processing to delete items other than lead terminals from the detection results is processing to delete terminals that are not on the same straight line, and processing to delete leads at the ends when the pitch at both ends is abnormal. Therefore, when something other than the lead exists on the same straight line at the same interval as the lead pitch, it is impossible to determine whether the lead terminal is a lead terminal or not based on only the detection result of one side. Therefore, there is a problem that recognition of a component such as QFN in which a terminal having no relation to various types of centering exists at a corner portion of the component is not stabilized by the conventional method.
[0006]
Accordingly, an object of the present invention is to provide a component recognition method and apparatus capable of improving the recognition accuracy of a component having a terminal irrelevant to centering at a component corner.
[0007]
[Means for Solving the Problems]
In order to solve the above problems, the present invention provides:
In a component recognition method of processing a captured image of a component and recognizing a posture of the component based on a terminal of the component detected by the image processing,
Processing the image of the captured part to obtain corner coordinates,
Determine whether there is a corner terminal based on the acquired corner coordinates,
If it is determined that a corner terminal exists, delete the corner terminal,
A configuration is adopted in which the posture of the component is recognized based on the terminal after the corner terminal has been deleted.
[0008]
In the present invention,
In a component recognition device that processes a captured image of a component and recognizes the orientation of the component based on the terminal of the component detected by the image processing,
An image processing device that processes an image of the captured component;
Means for deleting the corner terminal when it is determined that there is a corner terminal based on the corner coordinates obtained from the image processing,
There is also employed a configuration having means for calculating the center of the component and its inclination based on the terminal after the corner terminal has been deleted.
[0009]
In such a configuration, corner recognition unnecessary for component recognition not related to centering is deleted, and component recognition is performed. Therefore, component recognition accuracy can be improved, and component mounting accuracy can be improved.
[0010]
Deletion of a corner terminal can be performed by determining whether a corner terminal exists based on the terminal distance from the corner coordinates. If the corner terminal is close to the adjacent terminal depending on the part type, the corner terminal may not be recognized, so the image is scanned along the diagonal obtained from the corner coordinates and the corner terminal is detected by this scan I do. The corner terminals detected in this way are removed from the image by filling them.
[0011]
By performing the terminal filling process in this manner, terminals that are not desired to be detected can be deleted from the image, so that not only unnecessary terminals themselves are not detected, but also detection of surrounding terminals is not affected. Only necessary terminals can be accurately detected, and accurate component recognition can be performed.
[0012]
In addition, since the corner terminals can be reliably detected by diagonal scan, different component inspection, that is, inspection as to whether or not component recognition has been performed on the designated component, can be performed.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described in detail based on embodiments shown in the drawings.
[0014]
<Configuration of component mounting device and image processing device>
FIG. 1 is a block diagram showing a control configuration of a component mounting apparatus (component mounting machine) to which the present invention is applied. The component mounting apparatus includes a component (electronic component) 20 supplied from a component supply device (not shown). Has a head unit 3 provided with a suction nozzle 3a for sucking. The head unit 3 is configured to be movable in the XY-axis directions by being driven by an X-axis motor 11 and a Y-axis motor 12 driven by a controller 10 composed of a CPU. The head unit 3 is configured to be driven up and down by being driven in the Z-axis direction by the Z-axis motor 13 during component suction and component mounting, and the suction nozzle 3 a to be rotated about the nozzle axis by the θ-axis motor 14.
[0015]
Further, the component mounting apparatus is provided with an imaging device 5 having a lens 5a such as a CCD camera for imaging the component 20, and the head unit 3 is moved to the imaging device 5 after the component is sucked, and is illuminated by the illumination device 15. The illuminated component 20 is imaged by the imaging device 5. The captured image of the component is input to an image processing device 7 including a CPU 7a, an image memory 7b, an A / D converter 7c, and a component data memory 7d. The image processing device 7 fetches an image of the set area, processes the image according to a known algorithm, recognizes the suction posture of the component, and calculates a positional shift between the component center and the suction center and a suction angle shift. The controller 10 corrects this displacement when driving the X-axis, Y-axis, and θ-axis motors 11, 12, and 14, and mounts the component 20 on a board (not shown) that is being conveyed.
[0016]
The component mounting apparatus is provided with input devices such as a keyboard 21 and a mouse 22 for inputting component data. The generated component data is stored in a storage device 23 such as a hard disk, a flash memory, or the like. It can be stored in the component data memory 7d in the device 7. As the component data, data supplied from a host computer (not shown) connected to the component mounting apparatus may be stored in the storage device 23 or the component data memory 7d without passing through the input device. . In addition, a monitor (display) 24 is provided, and on this screen, component data, calculation data, and component images captured by the imaging device 5 can be displayed.
[0017]
FIG. 2 illustrates a state in which the component 20 a sucked by the suction nozzle 3 a is illuminated by the illumination device 15 and is imaged by the imaging device 5. The imaging device 5 captures an image of the set area by the control line 7d from the CPU 7a. The captured image is input to the image processing device 7 through a signal line 7e, converted into a digital signal through an A / D converter 7c, stored in an image memory 7b, subjected to image processing, and processed as a component. The posture is recognized. The image to be processed can be displayed on the monitor 24.
[0018]
<Part recognition flow>
FIG. 3 illustrates a flow of calculating a suction deviation by recognizing a component posture when the component is a QFN component, for example.
[0019]
First, as shown in FIG. 4, there are various types of QFN components. Therefore, the QFN components are classified according to the shape of the corner terminals, and are classified into types 0 to 3 according to the shapes of the corner terminals. In the future, if other corner terminal-shaped parts come out, we will respond by adding more types. In each of the following descriptions, a description will be given of component types (type, number of terminals, outer shape) suitable for the description.
[0020]
The component is represented by data describing the vertical / horizontal dimensions of the component, the location of the corner terminal, the shape of the corner terminal existing there, and the terminal information of each of the four sides. The terminal information includes the number of terminals, pitch, terminal length, terminal width, chipping information, terminal bending judgment rate, and the like. Using the above expression method, the position and shape of the corner terminal and the terminal information of each side are input using an input device such as the keyboard 21 or obtained from the host computer, and are obtained as part data. It is transmitted to the component data memory 7d in the image processing apparatus 7 in advance, and is managed for each component identification number (ID).
[0021]
At the time of execution of the recognition, the picked-up component is picked up by the image pickup device 5, the image is stored in the image memory 7b, the ID number of the component is specified, and the component data relating to the component is read from the component data memory 7d. It is read out and the recognition process shown in FIG. 3 is started.
[0022]
First, in step S1, scanning is performed from the outside to the inside of the image to detect external contacts of the component, and a circumscribing window W indicating a rough position of the component is set from the result. Subsequently, the lead row windows W1 to W4 are applied to each side (step S2), and an inspection area is set in an area where a lead exists. Then, for each of the four sides, a DOG filter (Marr &Posio's Difference-Of-Gaussian filter) is applied to the lead row window to detect the edge of the lead terminal, and using that, the lead end (“+” mark in the figure) is used. The coordinates are detected (steps S3 and S4). At this time, if the number of detected lines is less than the specified number, the recognition process is terminated at that point as an undernumber error.
[0023]
Subsequently, a lead line straight line connecting the lead tips is obtained from the detected lead tip coordinates. As shown in FIG. 5A, when a straight line is obtained by using all the detected leads, a shifted straight line H ′ occurs when a corner terminal or a lead on another side is detected. Therefore, in order to obtain an accurate lead line straight line, points that are not on the same straight line are deleted from the detected lead line coordinates.
[0024]
This method is illustrated in FIG. 6. First, as shown in FIG. 6A, the detection lead row is divided into two groups G1 and G2 on the left and right sides, and the lead longitudinal coordinates (y and Create a histogram of Then, in each group, an intermediate value is obtained from the obtained histogram, and a detection terminal having an intermediate value at the y coordinate is extracted. For example, assuming that the intermediate value is y4 in the group G1 and the intermediate value is y2 in the group G2, all points having the respective intermediate values are obtained. The obtained point is indicated by “+” in FIG. 6B, and then, as shown in FIG. 6C, the average value of the extracted terminals is obtained, and two points having the average value are obtained. R1 and R2 are determined, and a straight line passing through the two points R1 and R2 is defined as a reference straight line R as shown in FIG. Next, as shown in FIG. 6E, the detection terminal R3 that is separated from the reference straight line R by a certain distance or more is deleted.
[0025]
As described above, after eliminating points that are not on the same straight line, a least-squares straight line is obtained for the coordinates Rn of the remaining detection terminals as shown in FIG.
[0026]
Subsequently, this lead line straight line is obtained for each side, and the intersection of each lead line straight line is obtained as component corner coordinates C1 to C4. This corresponds to step S5 in FIG.
[0027]
Since there are terminals of various shapes at the component corners and such corner terminals L1 to L4 are not necessary for centering (positioning), when a corner terminal is detected at the component corner, it will be described in detail below. As described above, the corner terminal is deleted based on the corner coordinates C1 to C4 (step S6).
[0028]
Since the method of deleting the corner terminals differs for each type of component or for each terminal shape shown in FIG. 4, a different deletion process is performed for each type as described later. For example, in the case of a component belonging to type 3 as shown in FIG. 7A, when the leading end of the lead terminal L11 adjacent to the corner terminal L10 is too close, a lead edge is detected by applying a DOG filter. The two terminals are detected as one, and the lead end E10 may be detected with respect to the two terminals L10 and L11 as shown in FIG. 7B. In this case, the presence of the corner terminal L10 affects the detection of the lead terminal. On the other hand, in the case of a component belonging to type 1 as shown in FIG. 7C, if the tip of the lead terminal L21 adjacent to the corner terminal L20 has a certain distance, even if a DOG filter is applied. The two terminals are not detected as one. As shown in FIG. 7D, the lead tips E20, E21,. . . . . Is detected, and the presence of the corner terminal L20 does not affect the detection of the lead terminal.
[0029]
Therefore, when the corner terminal has a shape that does not affect the detection of the lead terminal as in types 1 and 2, it is determined whether or not the detection result includes the corner terminal by looking at the distance from the corner. Since the corner terminal exists at the corner portion of the component, when the terminal closest to the corner exists within a predetermined distance from the corner, it is determined that the terminal is a corner terminal. Since the corner terminal is unnecessary for centering, when it is determined that the terminal is a corner terminal, it is deleted from the detection result. If there is no corresponding terminal, it is not deleted. After the termination of the terminal, two diagonal lines are obtained from the corner coordinates, and scanning is performed on the diagonal line to check for the presence of a corner terminal. When inputting the component data, if the type or position of the component type is erroneously input, a difference from the terminal detection by scanning occurs, and a different component inspection can be performed. For example, if a corner terminal cannot be found for a corner where a corner terminal should exist from the component data, component recognition has been performed for a different component, and in such a case, an error is terminated. .
[0030]
On the other hand, when the corner terminal has a shape such as type 3 which affects the detection of the lead terminal, first, a diagonal scan is performed to detect the corner terminal. The contour of the corner terminal is detected, the corner terminal is painted out from the processed image, and the corner terminal is deleted. This is performed for each of the four corners, an image without corner terminals is created, and lead detection is performed again based on the image.
[0031]
The corner terminal deletion processing and the different part inspection performed in step S6 will be described later in detail for each type.
[0032]
As described above, after the corner terminal deletion process and the different component inspection are performed, a lead inspection is performed on each side to determine whether or not a defective terminal exists with respect to the remaining lead terminals detected (steps S7 and S8). If it is normal, the center and inclination of the component are calculated based on the lead terminal (step S9).
[0033]
<Corner terminal detection by diagonal scan>
As described above, since it is necessary to perform the image processing by filling the corner terminals depending on the type of the inspection and the type of the different parts, the detection of the corner terminals by diagonal scanning will be described below.
[0034]
First, a binarization threshold for detecting a corner terminal is set. As shown in FIG. 8, a point on the lead line straight line H "of each side and points in the vicinity thereof are sampled to be sample points, a density histogram of the sample points is created, and a discriminant analysis method is used. In the discriminant analysis method, assuming that a set of density values is divided into two classes (at least t and less than t) by a threshold value t, the discriminant analysis method This is a general threshold value selection method based on the idea that the parameter t is determined so as to obtain the best separation.For example, the threshold value for the upper left corner is obtained for two sides forming the corner, that is, the upper side and the left side. And the average value of the threshold values.
[0035]
Subsequently, the component image is processed according to the flow shown in FIG. 9 to check whether or not a corner terminal exists.
[0036]
First, since the corner coordinates of the component image have been obtained (step S5 in FIG. 3), a diagonal line connecting the diagonal corners is obtained (step S11), and the scan direction and range for detecting the terminal are determined. It is set (step S12). As shown in FIG. 10A, the scanning direction is made different depending on the diagonal inclination and the corner position in order to increase the detection sensitivity. The scan range is defined by ranges M1 and M2 each having a length of 1/4 of the distance between corners before and after the corner coordinates, and a scan start point m1 and an end point m2 are set.
[0037]
After setting the scan direction, the scan start point, and the end point, the scan is started (step S13). As shown in FIG. 10C, when the diagonal slope is gentler than 45 °, points on the diagonal and upper and lower points are scanned from the scan start point to the end point (y-direction scan), and the diagonal slope is determined. If the angle is steeper than 45 °, the point on the diagonal line and the left and right points are scanned in the x-axis direction.
[0038]
In step S14, a scan result is determined. When a point equal to or larger than the binarization threshold value for the corner terminal is detected, the diagonal scan ends, and the process proceeds to step S15 for acquiring a terminal contour. Conversely, if no point equal to or higher than the binarization threshold is found even after scanning to the scan end point, it is determined that there is no corner terminal.
[0039]
When the terminal is detected in step S14, the contour is detected from the detected point (step S15). FIG. 11 shows a state in which this contour is obtained. In FIG. 11A, Q1 is a point detected by the diagonal scan, and eight neighboring areas excluding the detection point Q1 are investigated in numerical order. Since the contour is detected at Q2 or more because the threshold is exceeded, this is set as the next contour point. Subsequently, as shown in FIG. 11 (B), the investigation around 8 around Q2 is started, and the same processing is repeated until returning to the first start point. Note that the investigation direction near 8 is determined by the diagonal scan direction.
[0040]
The contour points detected in this way are shown in FIG. 11C, and the information is stored in an array in the order of detection. Subsequently, in steps S16 and S17, edge pair coordinates in the X direction and edge pair coordinates in the y direction are obtained from the contour point array, respectively (FIGS. 11D and 11E). In step S18, the center of gravity Xg, Yg of the detection terminal is determined from the edge pair coordinates (FIGS. 11F and 11G). The calculation of the center of gravity is obtained according to the following equation.
[0041]
Lsum (y) = Edge2 (y) -Edge1 (y) +1
Ladr_sum (y) = Lsum (y) × (Edge1 (y) + Edge2 (y)) / 2
SUM = ΣLsum (y)
Ymom = Σ (Lsum (y) × y)
Xmom = @ Ladr_sum (y)
Xg = Ymom / Sum
Yg = Xmom / Sum
If the obtained center of gravity of the detection terminal is near the diagonal line, the detected terminal can be regarded as a corner terminal. Conversely, if the center of gravity is away from the diagonal, the lead terminal may have been erroneously detected, and it is determined that there is no corner terminal.
[0042]
The detection of a corner terminal by such a diagonal scan can be used for the inspection of a different part and the filling of the corner terminal performed according to the type as described below.
[0043]
<Corner terminal deletion and inspection of different parts>
Here, the details of the corner terminal deletion and the different part inspection performed in step S6 of FIG. 3 will be described. As described above, this processing differs depending on the component type as shown in FIG. 4, and is therefore performed for each type.
[0044]
Since the type 0 component has no corner terminal, the corner terminal deletion processing is not performed. However, in order to inspect different parts, the above-described diagonal scan is performed to check for the presence of a corner terminal. If no corner terminal is detected in all four corners, it is determined to be normal. If a corner terminal is detected even in one corner, there is a possibility that a different part is present. Therefore, the different part inspection is performed again after the lead inspection.
[0045]
FIG. 12 illustrates the flow of the corner terminal deletion and the different part inspection processing for the type 1 and type 2 parts.
[0046]
First, since the lead terminals have been detected, the pitch is obtained (step S21), and the distance between the detection leads is obtained. In the case of a component having no lead chipping as shown in FIG. 13A, the lead pitch Pn is obtained by averaging the distance between the lead terminals other than the lead terminals L30 and L31 at both ends. On the other hand, as shown in FIG. 13 (B), when there are chipped leads L32 and L33, the minimum inter-lead distance is obtained from other than the terminal pitch at both ends, and the other inter-lead distance is divided by the minimum inter-lead distance. When the minimum distance between leads is P1, the distance between leads is represented by an integer. From the lead missing information of the component data, a lead distance sequence in which one pitch is P1 is determined.
[0047]
If there is an inconsistency between the detected state of the distance between leads and the lead information obtained from the missing lead information, it is determined that the parts are different and error processing is performed. In the normal case, the average value is obtained by taking into account the number of chips at the distance between leads other than the distance between the leads at both ends, and this is used as the lead pitch.
[0048]
Next, when the distance between the leads at both ends is not within ± 30% of the detection pitch, the leads at the ends are regarded as corner terminals and deleted. However, when the lead bending judgment rate is set to be less than ± 30%, the detection pitch is set within ± lead bending judgment rate [%] of the detection pitch. For example, as shown in FIG. 14A, the distance P3 between the left-most lead terminal L30 and its adjacent lead terminal is larger than the detection pitch + 30%, so the terminal L30 is deleted as a corner terminal. On the other hand, since the distance P4 from the lead terminal L31 at the right end is within the detection pitch + 30%, this terminal is not deleted. This state is shown in FIG. As described above, when the pitches at both ends are mismatched and do not match, an abnormal process is performed (step S22), and one terminal is deleted.
[0049]
Next, if the detection terminal exists within one pitch from the corner coordinates, it is regarded as a corner terminal and deleted (step S23). However, this processing is not performed when the deletion is performed due to the abnormal distance between the leads at both ends. Therefore, this processing is not performed on the left end L30 that has already been deleted. If there are a plurality of detection terminals within one pitch, the detection terminal closest to the corner coordinates is deleted.
[0050]
Note that the two values used for the deletion determination, the allowable value of the distance between the leads at both ends, and the distance from the corner can also be externally specified from component data or the like. In the description, default values are used.
[0051]
Finally, the above-described diagonal scan is performed (step S24), and the presence or absence of four-sided corner terminals is checked (steps S25 and S27). If a corner terminal is detected at a corner designated as having a corner terminal, it is determined to be normal. If the presence or absence of a corner terminal is different from the designation even at one corner, there is a possibility that a different part is used. In order to inspect the different parts again after the lead inspection, the position of the corner where the corner terminal was present is remembered (step S26).
[0052]
The corner terminal deletion processing of the type 3 component is performed according to the flow shown in FIG. In the case of type 3, since the corner terminal affects the detection of the lead terminal, a diagonal scan is performed, the corner terminal is detected, the corner terminal is painted, and the corner terminal is deleted.
[0053]
Therefore, first, the above-described diagonal scan is performed (step S31), and the presence or absence of a corner terminal is checked (step S32). If the terminal does not exist, it is impossible to paint the corner terminal in the next process, so the process is skipped and the process proceeds to the next corner. However, the absence of the corner terminal at the corner designated as having the corner terminal may indicate a different part. Therefore, in order to perform the different component inspection again after the lead inspection, the position of the corner where the corner terminal is not detected is remembered (step S33).
[0054]
If it is determined by diagonal scanning that a corner terminal is present, the corner terminal is painted (step S34). This filling process is performed as shown in FIG. 16. First, scanning is performed between two points X1 and X2 which are half a pitch outside the edge point in the x direction to obtain the positions of the points X3 and X4 having the lowest density. I do. This is defined as valley coordinates. The area between the left and right valley coordinates is painted so that the density change is constant.
[0055]
When the filling with the edge pair in the x direction is completed, the same processing is performed in the y direction. Since the density of a point on the edge has already been changed, a valley coordinate is obtained by scanning between a point outside one edge of the edge and a point outside a half pitch. The density is set so that the density change between the upper and lower valley coordinates is constant. It is applied only when the density to be newly applied is lower than the density already filled. With such processing, the corner terminal L can be painted out, and the image of the corner terminal can be deleted.
[0056]
When the filling of all the detected corner terminals is completed (step S35), lead detection is performed again (step S36), and the center and inclination of the component are calculated according to the detection result.
[0057]
By performing the terminal filling process in this manner, terminals that are not desired to be detected can be deleted from the image, so that not only unnecessary terminals themselves are not detected, but also detection of surrounding terminals is not affected. Only necessary terminals can be accurately detected, and accurate component recognition can be performed.
[0058]
Note that the terminal filling process described with respect to type 3 may be performed not only on components like type 3 but also on types 1 and 2 having other corner terminals.
[0059]
Further, in the diagonal scan performed in the corner terminal deletion and the different part inspection, there is a possibility that there is a different part, and the position of the corner terminal in which an error has occurred is stored (step S26 in FIG. 12). In step S33 in FIG. 15, the stored terminal is scanned again to determine whether or not there is a corner terminal. This process is illustrated in FIG.
[0060]
After the lead inspection is completed, the coordinates of the tip of the lead are determined, and as shown in FIG. 17A, the coordinates of the corner coordinates E40 and the coordinates of the edges E41 and E42 of the two lead terminals L41 and L42 adjacent to the corner coordinates E40. I understand. A rectangle A connecting these two lead terminals and the corner coordinates is obtained. As shown in FIG. 17A, in the range of the rectangle A, some of the lead terminals L41 and L42 enter the side where the lead exists. In order to avoid the lead terminal portion, as shown in FIG. 17B, a scan for finding a point where no terminal exists from the side to the inside is performed from the lead end side toward the lead base. As shown in FIG. 17C, a rectangle A ′ in which the previously obtained range is narrowed is determined according to the point where the innermost lead terminal does not exist.
[0061]
Then, scanning is performed from the corner coordinate side within the range A ′ set in FIG. 17C, and if a point equal to or greater than the binarization threshold value for the corner terminal is found in a block having a certain number of pixels or more, the corner terminal is determined. Judge that it exists. If a certain number or more of points equal to or larger than the threshold value are not found even after scanning the entire area A ', it is determined that there is no corner terminal. The number of pixels that are determined to be a certain number or more blocks that are regarded as corner terminals is set for each resolution. Thereby, the detection accuracy of the corner terminal can be improved.
[0062]
【The invention's effect】
As described above, according to the present invention, since the component recognition is performed by removing a corner terminal that is unnecessary for the component recognition not related to the centering, the component recognition accuracy can be improved, and the component mounting accuracy can be improved. it can.
[0063]
Further, in the present invention, if the corner terminal is close to the adjacent terminal depending on the type of component, the corner terminal may not be recognized, so the image is scanned along a diagonal line obtained from the corner coordinates, A corner terminal is detected by scanning, and the detected corner terminal is painted out to remove the corner terminal. By performing the terminal filling process in this manner, terminals that are not desired to be detected can be deleted from the image, so that not only unnecessary terminals themselves are not detected, but also detection of surrounding terminals is not affected. Only necessary terminals can be accurately detected, and accurate component recognition can be performed.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a schematic configuration of a component mounting apparatus.
FIG. 2 is a configuration diagram showing a configuration of a component imaging device and an image processing device.
FIG. 3 is a flowchart showing a flow of component recognition.
FIG. 4 is an explanatory diagram showing types of components.
FIG. 5 is an explanatory diagram showing a flow for obtaining a lead row straight line.
FIG. 6 is an explanatory diagram showing a flow of obtaining a reference straight line for obtaining a lead line straight line.
FIG. 7 is an explanatory diagram for explaining an effect of a corner terminal on terminal detection depending on a component type.
FIG. 8 is an explanatory diagram showing sampling points for obtaining a binarization threshold.
FIG. 9 is a flowchart illustrating a flow of detecting whether or not a corner terminal exists in a component by diagonal scan.
FIG. 10 is an explanatory diagram illustrating a diagonal scan method.
FIG. 11 is an explanatory diagram showing a flow for obtaining a contour of a detected corner terminal.
FIG. 12 is a flowchart showing a flow of a corner terminal deletion process and a different component inspection for components of types 1 and 2;
FIG. 13 is an explanatory diagram showing a state in which a lead pitch is determined.
FIG. 14 is an explanatory diagram showing a flow of corner terminal deletion.
FIG. 15 is a flowchart showing a flow of a corner terminal deletion process and a different component inspection for a type 3 component.
FIG. 16 is an explanatory diagram showing a corner terminal deletion process for a type 3 component.
FIG. 17 is an explanatory diagram showing a process for increasing corner terminal detection.
[Explanation of symbols]
5 Imaging device
7 Image processing device
7b Image memory
7d parts data memory

Claims (4)

撮像された部品の画像を処理し、その画像処理により検出される部品の端子に基づいて部品の姿勢を認識する部品認識方法において、
撮像された部品の画像を処理してコーナー座標を取得し、
前記取得したコーナー座標に基づきコーナー端子が存在するかどうかを判定し、
コーナー端子が存在すると判定された場合にコーナー端子を削除し、
コーナー端子を削除した後の端子に基づいて部品の姿勢を認識することを特徴とする部品認識方法。
In a component recognition method of processing a captured image of a component and recognizing a posture of the component based on a terminal of the component detected by the image processing,
Processing the image of the captured part to obtain corner coordinates,
Determine whether there is a corner terminal based on the acquired corner coordinates,
If it is determined that a corner terminal exists, delete the corner terminal,
A component recognition method characterized by recognizing a posture of a component based on a terminal after removing a corner terminal.
対角線上に沿ったスキャンによりコーナー端子を検出し、検出結果に基づき指定部品に対する認識かどうかの検査を行うことを特徴とする請求項1に記載の部品認識方法。2. The component recognition method according to claim 1, wherein a corner terminal is detected by scanning along a diagonal line, and whether or not recognition of the specified component is recognized is performed based on the detection result. 撮像された部品の画像を処理し、その画像処理により検出される部品の端子に基づいて部品の姿勢を認識する部品認識装置において、
撮像された部品の画像を処理する画像処理装置と、
前記画像処理から求められるコーナー座標に基づきコーナー端子が存在すると判定されたときにコーナー端子を削除する手段と、
コーナー端子を削除した後の端子に基づいて部品中心とその傾きを演算する手段と、
を有することを特徴とする部品認識装置。
In a component recognition device that processes a captured image of a component and recognizes the orientation of the component based on the terminal of the component detected by the image processing,
An image processing device that processes an image of the captured component;
Means for deleting the corner terminal when it is determined that there is a corner terminal based on the corner coordinates obtained from the image processing,
Means for calculating the component center and its inclination based on the terminal after removing the corner terminal,
A component recognition device comprising:
コーナー座標から求められる対角線上に沿って画像をスキャンする手段を設け、該スキャンによりコーナー端子を検出し、検出結果に基づき指定部品に対する認識かどうかの検査を行うことを特徴とする請求項3に記載の部品認識装置。4. A method according to claim 3, further comprising the step of: providing means for scanning an image along a diagonal line determined from the corner coordinates, detecting a corner terminal by the scanning, and checking whether or not the specified component is recognized based on the detection result. Component recognition device as described.
JP2003007739A 2003-01-16 2003-01-16 Component recognition method and apparatus Expired - Fee Related JP4150262B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003007739A JP4150262B2 (en) 2003-01-16 2003-01-16 Component recognition method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003007739A JP4150262B2 (en) 2003-01-16 2003-01-16 Component recognition method and apparatus

Publications (2)

Publication Number Publication Date
JP2004219283A true JP2004219283A (en) 2004-08-05
JP4150262B2 JP4150262B2 (en) 2008-09-17

Family

ID=32897745

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003007739A Expired - Fee Related JP4150262B2 (en) 2003-01-16 2003-01-16 Component recognition method and apparatus

Country Status (1)

Country Link
JP (1) JP4150262B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007047933A (en) * 2005-08-08 2007-02-22 Juki Corp Method and device for image recognition of rectangular component

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007047933A (en) * 2005-08-08 2007-02-22 Juki Corp Method and device for image recognition of rectangular component
JP4634250B2 (en) * 2005-08-08 2011-02-16 Juki株式会社 Image recognition method and apparatus for rectangular parts

Also Published As

Publication number Publication date
JP4150262B2 (en) 2008-09-17

Similar Documents

Publication Publication Date Title
JP3266429B2 (en) Pattern detection method
JP3164003B2 (en) Mounted parts inspection device
JP2006049347A (en) Method and program for detecting component edge and inspection apparatus
JP3322569B2 (en) Component image edge detection method and component shape recognition device
JP4150262B2 (en) Component recognition method and apparatus
JP4106301B2 (en) Component recognition method and apparatus
JP3049488B2 (en) Pattern inspection method and pattern inspection device
JP3857668B2 (en) Pattern alignment method
JP3111433B2 (en) Image processing device
JP4744234B2 (en) Component positioning method and apparatus
JPH11328410A (en) Method for positioning pattern
JP3342171B2 (en) Component position recognition method and position recognition device
JP3452201B2 (en) Component mounting equipment
JP3111432B2 (en) Image processing device
JP3111434B2 (en) Image processing device
JPH06260794A (en) Method and equipment for recognizing position of electronic part
JP3447538B2 (en) Pattern inspection method
JP2006112930A (en) Object-shape discriminating method and apparatus
JP4008722B2 (en) Method and apparatus for detecting floating electrode of electronic component
JP2006234793A (en) Part position detecting method and device
JP2601232B2 (en) IC lead displacement inspection equipment
JP2005030996A (en) Inspection method of substrate having repeated pattern
JPH08340194A (en) Method of measuring dimension of part and chip mounter
JPH06160040A (en) Lead end detection method
JP2003035523A (en) Method and device for parts shape testing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060111

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20070202

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070202

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080205

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080326

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080627

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

Free format text: PAYMENT UNTIL: 20110704

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4150262

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120704

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120704

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130704

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees