JP3706431B2 - Part shape recognition device - Google Patents
Part shape recognition device Download PDFInfo
- Publication number
- JP3706431B2 JP3706431B2 JP11672596A JP11672596A JP3706431B2 JP 3706431 B2 JP3706431 B2 JP 3706431B2 JP 11672596 A JP11672596 A JP 11672596A JP 11672596 A JP11672596 A JP 11672596A JP 3706431 B2 JP3706431 B2 JP 3706431B2
- Authority
- JP
- Japan
- Prior art keywords
- edge
- edge point
- gradient direction
- distance
- distribution
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
この発明は、画像処理技術を応用して部品の形状認識を行なう部品形状認識装置に関する。
【0002】
【従来の技術】
電気製品の小型化、軽量化に伴い、チップ状電子部品のプリント基板上への実装は、さらなる高密度化が要求されている。その要求を満たす実装精度を実現するためには、画像処理技術を応用した電子部品の位置決め処理が必要不可欠となっている。
【0003】
位置決め処理は、部品のコーナ位置、部品の輪郭のエッジ位置を検出することによって行なわれるので、部品の各種のサイズのみならず、コーナ形状、エッジ形状等の部品の局所形状に関する情報が必要となる。
【0004】
このような部品の局所形状に関する情報の登録は、作業者の手入力によって行なわれているのが現状であり、作業者の負担が大きいという問題がある。
【0005】
【発明が解決しようとする課題】
この発明は、部品の局所形状を自動的に認識できる部品形状認識装置を提供することを目的とする。
【0006】
【課題を解決するための手段】
この発明による部品形状認識装置は、部品画像に基づいて、部品画像の輪郭上の点をエッジ点として検出するエッジ検出手段、部品画像を大局的に四角形とみなして、その四角形の4辺ごとに、エッジ点をクラス分けするクラスタリング手段、各クラスごとに、そのクラスに対応する辺とそのクラスに属する各エッジ点との距離の分布を求める分布作成手段、および求められた分布に基づいて、部品の局所形状を認識する認識手段を備えているものである。
【0007】
エッジ検出手段としては、たとえば、部品画像の重心位置から放射状に走査しながら微分処理を行なうことにより、部品画像の重心位置を原点とする極座標系において、部品画像の輪郭上のエッジ点の位置を検出するとともに、各エッジ点のグラディエント方向を検出するものが用いられる。
【0008】
クラスタリング手段としては、たとえば、部品画像を大局的に四角形とみなして、その四角形の各辺に対する法線ベクトルを求める法線ベクトル算出手段、各辺に対する法線ベクトルおよびハフ変換式により得られた方程式に基づいて、部品画像の重心位置から各辺までの距離を求める距離算出手段、ならびに各辺に対する法線ベクトルおよび部品画像の重心位置から各辺までの距離に基づいて4つの辺を特定し、特定された4辺における隣り合う辺の交点位置に対応する極座標系の方向と、各エッジ点の極座標系の方向とに基づいて、各エッジ点がどの辺に属するかをクラス分けする手段を備えているものが用いられる。
【0009】
法線ベクトル算出手段としては、たとえば、グラディエント方向に対するエッジ点の度数分布に基づいて、四角形の各辺に対する法線ベクトルを求めるものが用いられる。
【0010】
グラディエント方向に対するエッジ点の度数分布は、各エッジ点の第1のグラディエント方向および第2のグラディエント方向の両方を考慮して作成されることが好ましい。各エッジ点の第1のグラディエント方向は、部品画像の重心位置から放射状に走査しながら微分処理を行なうことにより求められたグラディエント方向である。各エッジ点の第2のグラディエント方向は、注目エッジ点を中心として互いに反対方向にある2つのエッジ点であって、第1のグラディエント方向が注目エッジ点の第1のグラディエント方向とほぼ等しい2つのエッジ点を結ぶ直線に対する法線ベクトルである。
【0011】
距離算出手段は、上記四角形の各辺ごとに、部品画像の重心位置から注目辺までの距離を求めるものであり、たとえば、法線ベクトル算出手段によって求められた注目辺に対する法線ベクトルに似通ったグラディエント方向を持つエッジ点を選択し、選択した各エッジ点ごとに、注目辺に対する法線ベクトルとハフ変換式により得られた方程式とを用いて、その点を通りかつ注目辺に対する法線ベクトルと等しい法線ベクトルを持つ直線と部品画像の重心位置との距離を算出する手段、ならびに、算出された距離に対するエッジ点の度数分分布を作成し、度数の最も大きい距離を部品画像の重心位置から注目辺までの距離として選択する手段を備えているものが用いられる。
【0012】
注目辺に対する法線ベクトルに似通ったグラディエント方向を持つエッジ点は、各エッジ点の第1のグラディエント方向および第2のグラディエント方向の両方を考慮して選択されることが好ましい。各エッジ点の第1のグラディエント方向は、部品画像の重心位置から放射状に走査しながら微分処理を行なうことにより求められたグラディエント方向である。各エッジ点の第2のグラディエント方向は、注目エッジ点を中心として互いに反対方向にある2つのエッジ点であって、第1のグラディエント方向が注目エッジ点の第1のグラディエント方向とほぼ等しい2つのエッジ点を結ぶ直線に対する法線ベクトルである。
【0013】
分布作成手段としては、たとえば、ハフ変換式により得られた方程式および各辺に対する法線ベクトルに基づいて、エッジ点を通りかつそのエッジ点が属するクラスの辺に対して平行な直線と、部品画像の重心位置との距離を、各エッジ点ごとに求める手段、およびエッジ点を通りかつそのエッジ点が属する辺と平行な直線と部品画像の重心位置との距離と、部品画像の重心位置からそのエッジ点が属するクラスの辺までの距離との差を各エッジ点ごとに求め、求められた差に基づいて、各クラスごとにそのクラスに対応する辺とそのクラスに属する各エッジ点との距離の分布を作成する手段を備えているものが用いられる。
【0014】
認識手段としては、たとえば、各エッジ点を4つのコーナ部分と4つのエッジ部分とにクラス分けする手段、分布作成手段によって作成された各エッジ部分に対する距離分布に基づいてエッジ形状を認識するエッジ形状認識手段、および分布作成手段によって作成された各コーナ部分に対する距離分布に基づいてコーナ形状を認識するコーナ形状認識手段を備えているものが用いられる。
【0015】
エッジ形状認識手段としては、たとえば、対象エッジ部分に属するエッジ点がその対象エッジ部分に対応する辺上に位置しているか否かを判定するしきい値を、上記辺に直交する方向の距離として設定し、当該対象エッジ部分に属する各エッジ点と上記辺との距離を、しきい値と比較することにより、対象エッジ部分のエッジ形状を認識するものが用いられる。
【0016】
エッジ形状認識手段として、複数の部品画像から得られた複数のエッジ部分に対する距離分布を入力パターンとし、入力パターンに対応するエッジ形状を表す信号を教師信号として、学習が行なわれたニューラルネットワークに、分布作成手段によって作成された対象エッジ部分に対する距離分布を入力することによって、対象エッジ部分のエッジ形状を認識するものを用いてもよい。
【0017】
コーナ形状認識手段として、複数の部品画像から得られた複数のコーナ部分に対する距離分布を入力パターンとし、入力パターンに対応するコーナ形状を表す信号を教師信号として、学習が行なわれたニューラルネットワークに、分布作成手段によって作成された対象コーナ部分に対する距離分布を入力することによって、対象コーナ部分のコーナ形状を認識するものを用いてもよい。
【0018】
【発明の実施の形態】
以下、図面を参照して、この発明を電子部品自動装着システムに適用した場合の実施の形態について説明する。
【0019】
図1は、電子部品自動装着システムの全体的な構成を示している。
【0020】
電子部品自動装着システムは、システム全体を制御するホストコンピュータ1、電子部品をプリント基板に装着する電子部品装着装置2、および部品位置認識、形状認識等を行なう画像処理装置3を備えている。ホストコンピュータ1は、電子部品の位置認識に用いられる標準データが記憶されたデータベース4を備えている。画像処理装置3には、モニタ5およびユーザーインタフェース6が接続されている。
【0021】
電子部品装着装置2は、ノズルに吸着された電子部品をCCDカメラで撮像し、部品画像を取得する部品画像入力手段21を備えている。
【0022】
画像処理装置3は、部品画像入力手段21によって得られた部品画像を、たとえば512×512画素、8ビット256階調の濃淡画像として画像メモリに取込み、画像処理により電子部品の位置認識、標準データの計測等を行なう。モニタ5には、部品画像、処理結果等が表示される。
【0023】
画像処理装置3は、位置認識手段31および標準データ計測手段32を備えている。位置認識手段31は、電子部品画像と、ホストコンピュータ1から供給される電子部品の種類、サイズ、形状等の標準データとに基づいて、電子部品の重心位置、傾き角度等を検出する。標準データ計測手段32は、電子部品画像に基づいて、電子部品の種類、サイズ、形状情報等の標準データを求める。
【0024】
ユーザーインタフェース6は、必要に応じて、標準データ計測手段32によって求められた標準データの修正等を行なう。ホストコンピュータは、各装置の制御の他、標準データの統計学的処理、標準データのデータベースへの登録、更新および読み出しを行なう。
【0025】
図2および図3は、標準データとして用いられる電子部品の局所形状を示している。図2はエッジ形状の例を示し、図3はコーナ形状の例を示している。
【0026】
エッジ形状には、”直線形状”(図2(a))、”突起あり”(図2(b))、”陥没あり”(図2(c))およびその他の形状(”不良形状”)(図2(d))がある。
【0027】
コーナ形状には、”R面取り”(図3(a))、”C面取り”(図3(b))およびその他の形状(”不良形状”)(図3(c))がある。
【0028】
図4は、標準データ計測手段32によって行なわれる局所形状認識処理手順を示している。
【0029】
(1) まず、図5に示すように、部品画像の重心位置Gが、ブロブ解析等によって求められる(ステップ1)。
【0030】
(2) そして、重心位置Gを極座標系(r,θ)の原点として、放射状に画像データをアクセス(ラジアルスキャン)しながら、微分処理を行なうことにより、部品の輪郭上の点(エッジ点)が検出される(ステップ2)。つまり、エッジ点の位置(r,θ)およびその点のグラディエント(gradient) 方向(エッジベクトル)αが検出される。
【0031】
このエッジ検出には、たとえば、sobel の微分オペレータが用いられる。図6(a)は、sobel のx方向の微分オペレータの重み付けを示している。図6(b)は、sobel のy方向の微分オペレータの重み付けを示している。図6(c)のように、局所領域内の画素の位置および値をA〜Hで表すと、水平方向の微分値Sxは数式1で表され、垂直方向の微分値Syは数式2で表される。
【0032】
【数1】
【0033】
【数2】
【0034】
そして、画素Eの場所におけるエッジ強度Sは次の数式3で与えられ、グラディエント方向αは次の数式4で与えられる。
【0035】
【数3】
【0036】
【数4】
【0037】
ただし、通常arctanは、−π/2〜π/2の範囲で計算されるが、ここでは、極座標系の方向θに合わせて0〜2πの範囲で計算される。
【0038】
ラジアルスキャン方向θごとに、エッジ強度Sが最大となる点(r,θ)が、部品のエッジ(輪郭)として抽出される。また、この点のグラディエント方向αがそのエッジ点でのエッジベクトルとされる。このようにして、部品画像の各エッジ点のr、θ、αが抽出される。
【0039】
(3) 次に、エッジベクトルの補正処理が行なわれる(ステップ3)。つまり、図5に示すように、注目エッジ点Aから互いに反対方向に所定距離離れた2つのエッジ点B、Cが選択され、選択された2つのエッジ点B、Cを結ぶ直線の方向に直交する方向(内側から外側に向かう方向)が、注目エッジ点Aのエッジベクトルαとされる。
【0040】
ただし、注目エッジ点から互いに反対方向に所定距離離れた2つのエッジ点であっても、その点のグラディエント方向αが注目エッジ点のグラディエント方向αとほぼ等しくない場合には、その点は選択されない。このような場合には、グラディエント方向αが注目エッジ点のグラディエント方向αと等しくないエッジ点の代わりに、そのエッジ点から注目エッジ点により近いエッジ点であって、グラディエント方向αが注目エッジ点のグラディエント方向αとほぼ等しいエッジ点が選択される。
【0041】
このようなエッジベクトルαの補正が全てのエッジ点に対して行なわれる。ステップ2で抽出された各エッジ点のグラディエント方向αにノイズ誤差があっても、上記補正処理により精度の高いグラディエント方向(エッジベクトル)αが得られる。なお、ステップ2で求められた各エッジ点のグラディエント方向αを補正前のグラディエント方向αといい、ステップ3で求められた各エッジ点のグラディエント方向αを補正後のグラディエント方向αということにする。
【0042】
次に、部品画像を対局的に四角形とみなし、その四角形の4辺(以下、モールド直線という)に対する法線ベクトルα1〜α4と、原点Gから各モールド直線までの距離ρ1〜ρ4が求められる(ステップ4、5)。
【0043】
まず、直線の方程式について説明する。図5において、重心Gを原点とするXY座標を想定すると、原点Gからθ方向に距離rのエッジ点DのXY座標値は、rとθとを用いて次の数式5で表される。
【0044】
【数5】
【0045】
また、電子部品の上辺の直線の方程式は、原点Gからその直線までの距離をρとし、その直線の法線ベクトルをαとすると、ハフ変換により数式6で与えられる。
【0046】
【数6】
【0047】
数式6から、x、yを消去すると、数式7が得られる。
【0048】
【数7】
【0049】
数式7で得られた直線の方程式のパラメータには、法線ベクトルαと原点Gから直線までの距離ρとがある。
【0050】
(4) そこで、まず、各モールド直線に対する法線ベクトルα1〜α4が求められる(ステップ4)。
【0051】
図7(a)は、横軸にエッジベクトルα(補正前のエッジベクトルαおよび補正後のエッジベクトルαの両方を含む)をとり、縦軸にラジアルスキャン方向θをとって、各エッジ点の分布を表したものである。この分布に基づいて、エッジベクトルαに対するエッジ点の度数を表すヒストグラムが生成される。エッジベクトルαに対するエッジ点のヒストグラムを図7(b)に示す。
【0052】
電子部品は大局的に四角形とみなすことができるので、その4辺に対応して4箇所に、エッジベクトルαの度数のピークP1〜P4ができる。四角形の各辺の方向は90°ずつ異なっているので、エッジベクトルαの度数のピークP1〜P4の間隔も90°ごとに現れる。
【0053】
図7(b)のヒストグラムが90°単位に4分割され、各90°単位のヒストグラムが足し合わされる。これにより、図7(c)に示すヒストグラムが得られる。図7(c)のヒストグラムには、1つの大きなピークPが現れる。このピークPに対応するエッジベクトルが、1つのモールド直線に対する法線ベクトルα1として抽出される。
【0054】
抽出された1つのモールド直線に対する法線ベクトルα1に、90°、180°および270°がそれぞれ加算されることにより、他の3つのモールド直線に対する法線ベクトルα2、α3およびα4が求められる。このような法線ベクトルα1〜α4の求め方を第1方法ということにする。
【0055】
ところで、実際の部品には、微小な形状の歪みがあるため、対辺どうしが平行になるとは限らない。そこで、微小な形状の歪みを吸収するために、4つのモールド直線に対する法線ベクトルα1〜α4を、次のようにして求めてもよい。ここでは、法線ベクトルα2についてのみ説明する。
【0056】
図7(b)のヒストグラムの横軸上において、第1方法によって求められた法線ベクトルα2を中心とする幅±Δαの範囲を設定する。Δαとしては、たとえば5°が設定される。そして、その範囲内の各αごとに、αの値とそれに対するエッジ点の度数との積を求め、求められた積を加算する。つまり、αの値とそれに対するエッジ点の度数との積の累積値を求める。得られた累積値を、上記範囲内の度数の累積値で除算することにより、その範囲内でのαの平均値を算出する。そして、得られた平均値を法線ベクトルα2とする。このような法線ベクトルα1〜α4の求め方を第2方法ということにする。
【0057】
また、部品の中には、1辺が隣り合う2辺と直角でない台形状のものがある。このような部品においては、隣り合う2辺と直角でない傾斜辺において、その辺に沿ったモールド直線を検出することが好ましい。
【0058】
そこで、4つのモールド直線に対する法線ベクトルα1〜α4を、次のようにして求めてもよい。ここでは、法線ベクトルα2についてのみ説明する。
【0059】
図7(b)のヒストグラムにおいて、図7(c)に基づいて上記のようにして求められた法線ベクトルα2の付近で度数がピークとなるαを局所的に探索し、探索されたαを法線ベクトルα2とする。この方法では、図7(b)のP1、P2、P3、P4が法線ベクトルα1、α2、α3、α4となる。このような法線ベクトルα1〜α4の求め方を第3方法ということにする。
【0060】
なお、第2方法と同様に、第3方法によって求められた法線ベクトルα1、α2、α3、α4付近のαの平均値を法線ベクトルα1、α2、α3、α4としてもよい。
【0061】
(5) 次に、原点Gから各モールド直線までの距離ρ1〜ρ4が求められる(ステップ5)。
【0062】
つまり、ステップ4で求められた4個の法線ベクトルα1〜α4のうち、まず、法線ベクトルα1に似通ったエッジベクトル(補正前のエッジベクトルαおよび補正後のエッジベクトルαの両方を含む)を持つエッジ点が選択される。そして、選択された各エッジ点ごとに、数式7により、ρが計算される。この際、数式7のαとしては、α1が用いられる。そして、得られたρに基づいて、ρに対するエッジ点の度数を表すヒストグラムを作成し、度数の最も大きいρが、法線ベクトルα1に対応するモールド直線に対するρ(=ρ1)として抽出される。これにより、法線ベクトルがα1である直線のうちの最も長い直線と、原点Gとの距離がρ1として選択される。
【0063】
同様にして、法線ベクトルα2、α3およびα4に対応するモールド直線のρ2、ρ3およびρ4が抽出される。
【0064】
通常のハフ変換では、全ての検出エッジ点に対してその点のグラディエント方向αをパラメータとしてρが計算される。そして、各エッジ点のグラディエント方向αおよびρがα−ρ空間に投票され、票の多いα、ρの組み合わせを用いて直線が決定される。しかしながら、この方法では角チップのように4本の直線しか存在しない部品では問題はないが、異形部品、IC等のリード部品ではモールドの他、コーナ部分、モールドから突出した部分にも直線部分があるので、票の多い順に4本の直線を選択すると、モールドの4直線以外の直線が選択されてしまうことがある。
【0065】
上記実施の形態では、モールド直線の法線ベクトルが先に決定され、この法線ベクトルに似通ったエッジベクトルを持つエッジ点に対してのみρの計算を行なっているので、モールド直線とは別の法線ベクトルを持つ直線が検出されるといったことがない。
【0066】
(6) 次に、各エッジ点が、四角形の4辺ごとにクラス分けされる(ステップ6)。つまり、隣り合う2本のモールド直線の交点に対する極座標系の方向θ1、θ2、θ3およびθ4が求められる。隣り合う2本のモールド直線の交点を、コーナ位置と定義する。各エッジ点のθにより、各エッジ点がどの辺(モールド直線)に属するかがクラス分けされる。
【0067】
隣り合う2本のモールド直線の交点に対する極座標系の方向θ1、θ2、θ3およびθ4は、次のようにして求められる。
【0068】
法線ベクトルがα1のモールド直線に対するρをρ1とし、法線ベクトルがα2のモールド直線に対するρをρ2とし、これらのモールド直線の交点(コーナ位置)のXY座標を(xo,yo)とすると、数式6から次の数式8が成り立つ。
【0069】
【数8】
【0070】
数式8から、上記両モールド直線の交点のXY座標(xo,yo)は、次の数式9によって求められる。
【0071】
【数9】
【0072】
このようにして、4つのコーナ位置のXY座標が求められると、各コーナ位置が原点Gからどの方向に位置しているかが計算されることにより、隣り合う2本のモールド直線の交点に対する極座標系の方向θ1、θ2、θ3およびθ4が求められる。
【0073】
(7) 次に、各クラス毎に、各エッジ点からそのエッジ点が属するクラスの辺(モールド直線)までの距離Δρが算出される(ステップ7)。
【0074】
つまり、まず、数式7を用いて各エッジ点ごとにρが求められる。この際、法線ベクトルαとしては、当該エッジ点が属するクラスのモールド直線の法線ベクトルα1、α2、α3、α4が用いられる。つまり、エッジ点を通りかつそのエッジ点が属するモールド直線と平行な直線と、原点Gとの距離ρが算出される。
【0075】
次に、各エッジ点に対して求められたρと、そのエッジ点が属するモールド直線のρ1、ρ2、ρ3またはρ4との差Δρ、すなわち、エッジ点からモールド直線までの距離が求められる。図8は、モールド直線Lに対応するクラスに属するエッジ点と、これらのエッジ点ごとに求められたΔρを示している。図8において、R1およびR2は、コーナ位置を示している。エッジ点がモールド直線上にある場合には、そのΔρは0となる。エッジ点がモールド直線より外側にある場合には、そのΔρは正の値(Δρ>0)となる。エッジ点がモールド直線より内側にある場合には、そのΔρは負の値(Δρ<0)となる。
【0076】
(8)次に、各エッジ点が、エッジ部分とコーナ部分とにクラス分けされる(ステップ8)。
【0077】
まず、コーナ位置の方向θ付近にあるエッジ点からモールド直線の中央部に向かって、各エッジ点のΔρが調べられ、最初にΔρが0となるエッジ点がエッジ端点とされる。図8の例では、点Q1、Q2、Q3、Q8がエッジ端点である。モールド直線上の2つのエッジ端点Q1、Q2の間部分がエッジ部分とされる。また、2つのモールド直線のコーナ点付近にある2のエッジ端点の間部分、すなわち、図8の点Q1とQ8との間部分、点Q2とQ3との間部分がコーナ部分とされる。
【0078】
(9)次に、4つのエッジ部分におけるΔρの分布に基づいてエッジ形状が認識され、4つのコーナ部分におけるΔρの分布に基づいてコーナ形状が認識される。
【0079】
エッジ形状認識は、たとえば、次のようにして行なわれる。まず、エッジ点がモールド直線上に位置しているか否かを判定するしきい値を、モールド直線に直交する方向の距離として設定する。そして、エッジ部分に属するエッジ点のうち、そのΔρが+方向および−方向にそのしきい値を越えているエッジ点が存在しない場合には、そのエッジ部分の形状を”直線形状”と判定する。
【0080】
エッジ部分のエッジ点のうち、そのΔρが+方向にそのしきい値を越えているエッジ点が存在する場合には、原則的にそのエッジ部分の形状を”突起あり”と判定する。また、エッジ部分のエッジ点のうち、そのΔρが−方向にそのしきい値を越えているエッジ点が存在する場合には、原則的にそのエッジ部分の形状を”陥没あり”と判定する。ただし、突起または陥没が3個以上存在する場合には、そのエッジ部分の形状を”不良形状”と判定する。
【0081】
コーナ形状認識は、コーナ部分のΔρの分布だけでなく、コーナ部分の2つのエッジ端点を結ぶ直線を一方の対角線とする正方形または長方形領域内の部品部分の面積と背景部分の面積との比やコーナ部分の各エッジ点のベクトルの方向の変化に基づいて判定してもよい。
【0082】
図9は部品画像の一例を示している。図10は、図9の画像から求められたΔρの分布を示している。図9において、R1〜R4はコーナ位置を示し、Q1〜Q8はエッジ端点を示している。この例では、各エッジ部分のΔρの分布に基づいて、左側エッジ部ELは”突起あり”と認識され、下側エッジ部EDは”直線形状”と認識され、右側エッジ部ERは”不良形状”と認識され、上側エッジ部EUは”直線形状”と認識される。
【0083】
また、各コーナ部分のΔρの分布に基づいて、右上コーナ部および右下コーナ部は”C面取り”と認識され、左上コーナ部および左下コーナ部は”不良形状”と認識される。左上コーナ部および左下コーナ部が”R面取り”と認識されず、”不良形状”と認識されているのは、コーナ部が突起に連続している場合には、”不良形状”と認識するようにしたことによる。
【0084】
コーナ形状認識を、コーナ部分の2つのエッジ点を結ぶ直線を一方の対角線とする正方形領域内の部品部分の面積と背景部分の面積との比に基づいて判定する方法について説明する。
【0085】
図11の(a)、(b)、(c)は、コーナ部分の2つのエッジ端点を結ぶ直線を一方の対角線とする正方形領域を示している。図11(a)はコーナ形状が”C面取り”の例を示し、図11(b)はコーナ形状が”R面取り”の例を示し、図11(c)はコーナ形状が”不良形状”の例を示している。
【0086】
正方形領域内の背景部分の面積S1と部品部分の面積S2との比(S1/S2)がほぼ1であれば、そのコーナ形状は”C面取り”と判定される。正方形領域内の背景部分の面積S1と部品部分の面積S2との比(S1/S2)が{(4−π)/π}=0.27にほぼ等しければ、そのコーナ形状は”R面取り”と判定される。正方形領域内の背景部分の面積S1と部品部分の面積S2との比(S1/S2)が、1または0.27にほぼ等しくない場合には、そのコーナ形状は”不良形状”と判定される。
【0087】
なお、エッジ形状の認識およびコーナ形状の認識を、ニューラルネットワークを用いて行なうようにしてもよい。ニューラルネットワークとしては、たとえば、図12に示すように、入力層、中間層および出力層からなる階層型ニューラルネットワークが用いられる。
【0088】
このようなニューラルネットワークを用いてエッジ形状の認識を行なう場合について説明する。複数の電子部品画像から得られた複数のエッジ部分におけるモールド直線との差分Δρの分布を入力パターンとし、入力パターンに対応するエッジ形状を表す信号を教師信号として、ニューラルネットワークを学習させる。出力層のユニット数が4である場合には、図13に示すように、”直線形状”に対応する教師信号としては(1,0,0,0)が、”突起あり”に対応する教師信号としては(0,1,0,0)が、”陥没あり”に対応する教師信号としては(0,0,1,0)が、”不良形状”に対応する教師信号としては(0,0,0,1)が用いられる。
【0089】
学習後のニューラルネットワークに、形状認識対象である電子部品画像から得られたエッジ部分におけるΔρの分布を入力信号として与えると、そのエッジ部分の形状に応じた出力が得られる。なお、エッジ部分の長さが異なる場合には、たとえば写像変換により、当該エッジ部分におけるΔρの数を、入力層のユニット数に合わせればよい。
【0090】
ニューラルネットワークを用いてコーナ形状の認識を行なう場合は、複数の電子部品画像から得られた複数のコーナ部分におけるΔρの分布を入力パターンとし、入力パターンに対応するコーナ形状を表す信号を教師信号として、ニューラルネットワークを学習させる。
【0091】
学習後のニューラルネットワークに、形状認識対象である電子部品画像から得られたコーナ部分におけるΔρの分布を入力信号として与えると、そのコーナ部分の形状に応じた出力が得られる。
【0092】
【発明の効果】
この発明によれば、部品の局所形状を自動的に認識できるようになる。
【図面の簡単な説明】
【図1】電子部品自動装着システムの全体的な構成を示すブロック図である。
【図2】エッジ形状の種類を示す模式図である。
【図3】コーナ形状の種類を示す模式図である。
【図4】局所形状認識処理の手順を示すフローチャートである。
【図5】部品画像の一例を示す模式図である。
【図6】微分オペレータの重み付けを示す模式図である。
【図7】各モールド直線に対する法線ベクトルα1〜α4を求める方法を説明するためのグラフである。
【図8】モールド直線Lに対応するクラスに属するエッジ点と、これらのエッジ点ごとに求められたΔρを示す模式図である。
【図9】部品画像の一例を示す模式図である。
【図10】図9の画像から求められたΔρの分布を示すグラフである。
【図11】コーナ部分の2つのエッジ端点を結ぶ直線を一方の対角線とする正方形領域を示す模式図である。
【図12】ニューラルネットワークの構成例を示す模式図である。
【図13】教師信号の一例を示す説明図である。
【符号の説明】
1 ホストコンピュータ
2 電子部品装着装置
3 画像処理装置
4 データベース
31 位置認識手段
32 標準データ計測手段[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a component shape recognition apparatus that recognizes the shape of a component by applying an image processing technique.
[0002]
[Prior art]
As electronic products become smaller and lighter, mounting of chip-shaped electronic components on a printed circuit board requires higher density. In order to realize mounting accuracy that satisfies the requirements, positioning processing of electronic components using image processing technology is indispensable.
[0003]
Since the positioning process is performed by detecting the corner position of the part and the edge position of the contour of the part, information on the local shape of the part such as the corner shape and the edge shape is required as well as various sizes of the part. .
[0004]
The registration of information related to the local shape of such parts is currently performed by manual input by the operator, and there is a problem that the burden on the operator is heavy.
[0005]
[Problems to be solved by the invention]
An object of this invention is to provide the component shape recognition apparatus which can recognize the local shape of components automatically.
[0006]
[Means for Solving the Problems]
An apparatus for recognizing a part shape according to the present invention is an edge detection means for detecting a point on a contour of a part image as an edge point based on the part image. The part image is generally regarded as a quadrangle, and every four sides of the square A clustering means for classifying edge points, a distribution creating means for obtaining a distance distribution between the edge corresponding to the class and each edge point belonging to the class, and a component based on the obtained distribution. It has a recognition means for recognizing the local shape.
[0007]
As the edge detection means, for example, by performing differential processing while scanning radially from the center of gravity position of the component image, the position of the edge point on the contour of the component image is determined in a polar coordinate system having the center of gravity position of the component image as the origin. What detects is used to detect the gradient direction of each edge point.
[0008]
As the clustering means, for example, a part image is generally regarded as a quadrangle, a normal vector calculation means for obtaining a normal vector for each side of the quadrangle, an equation obtained by a normal vector for each side and a Hough transform formula Based on the distance calculation means for obtaining the distance from the center of gravity of the component image to each side, and specifying the four sides based on the normal vector for each side and the distance from the center of gravity of the component image to each side, A means for classifying to which side each edge point belongs is provided on the basis of the direction of the polar coordinate system corresponding to the intersection position of adjacent sides in the specified four sides and the direction of the polar coordinate system of each edge point Is used.
[0009]
As the normal vector calculation means, for example, one that obtains a normal vector for each side of a quadrilateral based on the frequency distribution of edge points with respect to the gradient direction is used.
[0010]
The frequency distribution of edge points with respect to the gradient direction is preferably created in consideration of both the first gradient direction and the second gradient direction of each edge point. The first gradient direction of each edge point is a gradient direction obtained by performing differentiation processing while scanning radially from the barycentric position of the component image. The second gradient direction of each edge point is two edge points that are opposite to each other about the target edge point, and the first gradient direction is substantially equal to the first gradient direction of the target edge point. This is a normal vector for a straight line connecting edge points.
[0011]
The distance calculation means calculates the distance from the center of gravity of the component image to the target side for each side of the quadrangle. For example, the distance calculation unit resembles the normal vector for the target side determined by the normal vector calculation unit. Select an edge point with a gradient direction, and for each selected edge point, use the normal vector for the target side and the equation obtained by the Hough transform formula, A means for calculating the distance between the straight line having the same normal vector and the gravity center position of the component image, and the frequency distribution of the edge points with respect to the calculated distance are created, and the distance with the highest frequency is calculated from the gravity center position of the component image. What is provided with the means to select as a distance to an attention side is used.
[0012]
An edge point having a gradient direction similar to the normal vector for the target side is preferably selected in consideration of both the first gradient direction and the second gradient direction of each edge point. The first gradient direction of each edge point is a gradient direction obtained by performing differentiation processing while scanning radially from the barycentric position of the component image. The second gradient direction of each edge point is two edge points that are opposite to each other about the target edge point, and the first gradient direction is substantially equal to the first gradient direction of the target edge point. This is a normal vector for a straight line connecting edge points.
[0013]
As the distribution creation means, for example, based on the equation obtained by the Hough transform equation and the normal vector for each side, a straight line that passes through the edge point and is parallel to the side of the class to which the edge point belongs, and a component image Means for determining the distance from the center of gravity position of each edge point, and the distance between the center of gravity of the component image and the distance between the straight line passing through the edge point and parallel to the side to which the edge point belongs, The difference between the distance to the edge of the class to which the edge point belongs is obtained for each edge point, and the distance between the edge corresponding to the class and each edge point belonging to the class for each class based on the obtained difference. A device having a means for creating a distribution of is used.
[0014]
Examples of the recognition means include, for example, a means for classifying each edge point into four corner parts and four edge parts, and an edge shape for recognizing an edge shape based on a distance distribution for each edge part created by the distribution creation means. A device provided with a recognizing means and a corner shape recognizing means for recognizing a corner shape based on a distance distribution for each corner portion created by the distribution creating means is used.
[0015]
As the edge shape recognition means, for example, a threshold value for determining whether or not an edge point belonging to a target edge portion is located on a side corresponding to the target edge portion is set as a distance in a direction orthogonal to the side. The one that recognizes the edge shape of the target edge portion is set by comparing the distance between each edge point belonging to the target edge portion and the above side with a threshold value.
[0016]
As an edge shape recognition means, the distance distribution for a plurality of edge portions obtained from a plurality of component images is used as an input pattern, and a signal representing the edge shape corresponding to the input pattern is used as a teacher signal to the learned neural network. You may use what recognizes the edge shape of a target edge part by inputting the distance distribution with respect to the target edge part produced by the distribution creation means.
[0017]
As a corner shape recognition means, a distance distribution for a plurality of corner portions obtained from a plurality of component images is used as an input pattern, and a signal representing a corner shape corresponding to the input pattern is used as a teacher signal to the learned neural network. You may use what recognizes the corner shape of a target corner part by inputting the distance distribution with respect to the target corner part created by the distribution creation means.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention applied to an electronic component automatic mounting system will be described below with reference to the drawings.
[0019]
FIG. 1 shows the overall configuration of an electronic component automatic mounting system.
[0020]
The electronic component automatic mounting system includes a
[0021]
The electronic
[0022]
The
[0023]
The
[0024]
The
[0025]
2 and 3 show local shapes of electronic components used as standard data. FIG. 2 shows an example of an edge shape, and FIG. 3 shows an example of a corner shape.
[0026]
Edge shapes include “linear shape” (FIG. 2 (a)), “with protrusion” (FIG. 2 (b)), “with depression” (FIG. 2 (c)), and other shapes (“defective shape”) (FIG. 2 (d)).
[0027]
The corner shape includes “R chamfer” (FIG. 3A), “C chamfer” (FIG. 3B), and other shapes (“defective shape”) (FIG. 3C).
[0028]
FIG. 4 shows a local shape recognition processing procedure performed by the standard data measuring means 32.
[0029]
(1) First, as shown in FIG. 5, the center-of-gravity position G of the component image is obtained by blob analysis or the like (step 1).
[0030]
(2) A point (edge point) on the contour of the component is obtained by performing differentiation while using the gravity center position G as the origin of the polar coordinate system (r, θ) and accessing (radial scanning) the image data radially. Is detected (step 2). That is, the position (r, θ) of the edge point and the gradient direction (edge vector) α of the point are detected.
[0031]
For this edge detection, for example, a sobel differential operator is used. FIG. 6 (a) shows the weighting of the sobel differential operator in the x direction. FIG. 6B shows the weighting of the differential operator in the y direction of sobel. As shown in FIG. 6C, when the positions and values of the pixels in the local region are expressed by A to H, the horizontal differential value Sx is expressed by
[0032]
[Expression 1]
[0033]
[Expression 2]
[0034]
The edge intensity S at the location of the pixel E is given by the following
[0035]
[Equation 3]
[0036]
[Expression 4]
[0037]
However, arctan is usually calculated in the range of −π / 2 to π / 2, but here it is calculated in the range of 0 to 2π in accordance with the direction θ of the polar coordinate system.
[0038]
For each radial scan direction θ, the point (r, θ) at which the edge strength S is maximum is extracted as the edge (contour) of the part. Also, the gradient direction α of this point is the edge vector at that edge point. In this way, r, θ, and α of each edge point of the component image are extracted.
[0039]
(3) Next, edge vector correction processing is performed (step 3). That is, as shown in FIG. 5, two edge points B and C that are separated from the target edge point A by a predetermined distance in the opposite direction are selected, and orthogonal to the direction of the straight line connecting the two selected edge points B and C. The direction (direction from the inside toward the outside) is the edge vector α of the target edge point A.
[0040]
However, even if two edge points are separated from the target edge point by a predetermined distance in the opposite direction, the point is not selected if the gradient direction α of the point is not substantially equal to the gradient direction α of the target edge point. . In such a case, instead of the edge point where the gradient direction α is not equal to the gradient direction α of the target edge point, the edge point is closer to the target edge point, and the gradient direction α is the target edge point. Edge points that are approximately equal to the gradient direction α are selected.
[0041]
Such an edge vector α is corrected for all edge points. Even if there is a noise error in the gradient direction α of each edge point extracted in
[0042]
Next, the part image is considered as a square, and normal vectors α1 to α4 with respect to four sides of the square (hereinafter referred to as mold straight lines) and distances ρ1 to ρ4 from the origin G to each mold straight line are obtained (
[0043]
First, the linear equation will be described. In FIG. 5, assuming an XY coordinate having the center of gravity G as the origin, the XY coordinate value of the edge point D at a distance r in the θ direction from the origin G is expressed by the following
[0044]
[Equation 5]
[0045]
Further, the equation of the straight line on the upper side of the electronic component is given by
[0046]
[Formula 6]
[0047]
When x and y are deleted from
[0048]
[Expression 7]
[0049]
The parameters of the straight line equation obtained by
[0050]
(4) Therefore, first, normal vectors α1 to α4 for each mold straight line are obtained (step 4).
[0051]
In FIG. 7A, the horizontal axis represents the edge vector α (including both the uncorrected edge vector α and the corrected edge vector α), and the vertical axis represents the radial scan direction θ. It represents the distribution. Based on this distribution, a histogram representing the frequency of edge points with respect to the edge vector α is generated. FIG. 7B shows a histogram of edge points with respect to the edge vector α.
[0052]
Since the electronic component can be generally regarded as a quadrangle, peaks P1 to P4 of the frequency of the edge vector α are formed at four locations corresponding to the four sides. Since the directions of the sides of the square are different by 90 °, the intervals between the peaks P1 to P4 of the frequency of the edge vector α also appear every 90 °.
[0053]
The histogram of FIG. 7B is divided into four 90 ° units, and the histograms of each 90 ° unit are added. Thereby, the histogram shown in FIG. 7C is obtained. One large peak P appears in the histogram of FIG. An edge vector corresponding to this peak P is extracted as a normal vector α1 for one mold line.
[0054]
By adding 90 °, 180 °, and 270 ° to the normal vector α1 for one extracted mold line, normal vectors α2, α3, and α4 for the other three mold lines are obtained. Such a method of obtaining the normal vectors α1 to α4 is referred to as a first method.
[0055]
By the way, an actual part has a minute shape distortion, so that the opposite sides are not always parallel to each other. Therefore, in order to absorb the distortion of a minute shape, normal vectors α1 to α4 for the four mold straight lines may be obtained as follows. Here, only the normal vector α2 will be described.
[0056]
On the horizontal axis of the histogram of FIG. 7B, a range of width ± Δα centering on the normal vector α2 obtained by the first method is set. For example, 5 ° is set as Δα. Then, for each α in the range, a product of the value of α and the frequency of the edge point is obtained, and the obtained products are added. That is, the cumulative value of the product of the value of α and the frequency of the edge point corresponding thereto is obtained. The average value of α within the range is calculated by dividing the obtained cumulative value by the cumulative value of the frequency within the range. The obtained average value is defined as a normal vector α2. Such a method of obtaining the normal vectors α1 to α4 is referred to as a second method.
[0057]
Further, some parts have a trapezoidal shape in which one side is not perpendicular to two adjacent sides. In such a component, it is preferable to detect a mold straight line along an inclined side that is not perpendicular to two adjacent sides.
[0058]
Therefore, the normal vectors α1 to α4 for the four mold straight lines may be obtained as follows. Here, only the normal vector α2 will be described.
[0059]
In the histogram of FIG. 7 (b), a search is made locally for α having a frequency peak in the vicinity of the normal vector α2 obtained as described above based on FIG. 7 (c). The normal vector is α2. In this method, P1, P2, P3, and P4 in FIG. 7B become normal vectors α1, α2, α3, and α4. Such a method of obtaining the normal vectors α1 to α4 is referred to as a third method.
[0060]
Similar to the second method, the average values of α around the normal vectors α1, α2, α3, and α4 obtained by the third method may be used as the normal vectors α1, α2, α3, and α4.
[0061]
(5) Next, distances ρ1 to ρ4 from the origin G to each mold straight line are obtained (step 5).
[0062]
That is, among the four normal vectors α1 to α4 obtained in
[0063]
Similarly, ρ2, ρ3, and ρ4 of the mold straight lines corresponding to the normal vectors α2, α3, and α4 are extracted.
[0064]
In normal Hough transform, ρ is calculated for all detected edge points with the gradient direction α of the points as a parameter. Then, the gradient directions α and ρ of each edge point are voted on the α-ρ space, and a straight line is determined using a combination of α and ρ with many votes. However, with this method, there is no problem with a part that has only four straight lines, such as a square chip. However, with a deformed part or a lead part such as an IC, a straight part is also present in the corner part and the part protruding from the mold. Therefore, if four straight lines are selected in descending order of votes, straight lines other than the four straight lines of the mold may be selected.
[0065]
In the above embodiment, the normal vector of the mold straight line is determined first, and ρ is calculated only for edge points having edge vectors similar to this normal vector. A straight line having a normal vector is not detected.
[0066]
(6) Next, each edge point is classified into four sides of the quadrangle (step 6). That is, the polar coordinate system directions θ1, θ2, θ3, and θ4 with respect to the intersection of two adjacent mold straight lines are obtained. The intersection of two adjacent mold straight lines is defined as the corner position. Which edge (mold straight line) each edge point belongs to is classified according to θ of each edge point.
[0067]
The directions θ1, θ2, θ3, and θ4 of the polar coordinate system with respect to the intersection of two adjacent mold straight lines are obtained as follows.
[0068]
Ρ for a mold line with a normal vector α1 is ρ1, ρ for a mold line with a normal vector α2 is ρ2, and the XY coordinates of the intersection (corner position) of these mold lines are (xo, yo). From
[0069]
[Equation 8]
[0070]
From
[0071]
[Equation 9]
[0072]
When the XY coordinates of the four corner positions are obtained in this way, the polar coordinate system for the intersection of two adjacent mold straight lines is calculated by calculating in which direction each corner position is located from the origin G. Directions θ1, θ2, θ3, and θ4 are obtained.
[0073]
(7) Next, for each class, the distance Δρ from each edge point to the side of the class to which the edge point belongs (mold straight line) is calculated (step 7).
[0074]
That is, first, ρ is obtained for each edge
[0075]
Next, the difference Δρ between ρ obtained for each edge point and ρ1, ρ2, ρ3 or ρ4 of the mold line to which the edge point belongs, that is, the distance from the edge point to the mold line is obtained. FIG. 8 shows edge points belonging to the class corresponding to the mold straight line L, and Δρ obtained for each of these edge points. In FIG. 8, R1 and R2 indicate corner positions. When the edge point is on the mold straight line, the Δρ is zero. In the case where the edge point is outside the mold straight line, the Δρ is a positive value (Δρ> 0). When the edge point is inside the mold straight line, Δρ is a negative value (Δρ <0).
[0076]
(8) Next, each edge point is classified into an edge portion and a corner portion (step 8).
[0077]
First, Δρ of each edge point is examined from the edge point in the vicinity of the direction θ of the corner position toward the center of the mold straight line, and the edge point where Δρ is first 0 is set as the edge end point. In the example of FIG. 8, points Q1, Q2, Q3, and Q8 are edge end points. A portion between two edge end points Q1 and Q2 on the mold straight line is an edge portion. Further, a portion between the two edge end points in the vicinity of the corner points of the two mold straight lines, that is, a portion between the points Q1 and Q8 and a portion between the points Q2 and Q3 in FIG.
[0078]
(9) Next, the edge shape is recognized based on the distribution of Δρ in the four edge portions, and the corner shape is recognized based on the distribution of Δρ in the four corner portions.
[0079]
Edge shape recognition is performed as follows, for example. First, a threshold value for determining whether or not the edge point is located on the mold straight line is set as a distance in a direction orthogonal to the mold straight line. If there is no edge point whose Δρ exceeds the threshold value in the + and − directions among the edge points belonging to the edge portion, the shape of the edge portion is determined as a “linear shape”. .
[0080]
In the case where there is an edge point whose Δρ exceeds the threshold value in the + direction among the edge points of the edge portion, in principle, the shape of the edge portion is determined as “protrusion”. If there is an edge point whose Δρ exceeds the threshold value in the − direction among the edge points of the edge portion, in principle, the shape of the edge portion is determined to be “depressed”. However, when there are three or more protrusions or depressions, the shape of the edge portion is determined as a “defective shape”.
[0081]
Corner shape recognition is not only the distribution of Δρ in the corner part, but also the ratio of the area of the part part in the square or rectangular area with the straight line connecting the two edge endpoints of the corner part to the area of the background part. You may determine based on the change of the direction of the vector of each edge point of a corner part.
[0082]
FIG. 9 shows an example of a component image. FIG. 10 shows the distribution of Δρ obtained from the image of FIG. In FIG. 9, R1 to R4 indicate corner positions, and Q1 to Q8 indicate edge end points. In this example, based on the distribution of Δρ of each edge portion, the left edge portion EL is recognized as “protruded”, the lower edge portion ED is recognized as “straight shape”, and the right edge portion ER is “defective shape”. ", And the upper edge EU is recognized as a" linear shape ".
[0083]
Further, based on the distribution of Δρ of each corner portion, the upper right corner portion and the lower right corner portion are recognized as “C chamfering”, and the upper left corner portion and the lower left corner portion are recognized as “defective shapes”. The upper left corner and the lower left corner are not recognized as “R chamfer”, but are recognized as “defective shape”. When the corner is continuous with the protrusion, it is recognized as “defective shape”. It depends on what you did.
[0084]
A method of determining the corner shape recognition based on the ratio of the area of the part portion in the square area and the area of the background portion with a straight line connecting two edge points of the corner portion as one diagonal line will be described.
[0085]
(A), (b), and (c) of FIG. 11 show a square region having one straight line connecting two edge end points of the corner portion as one diagonal line. 11A shows an example in which the corner shape is “C chamfering”, FIG. 11B shows an example in which the corner shape is “R chamfering”, and FIG. 11C shows that the corner shape is “bad shape”. An example is shown.
[0086]
If the ratio (S1 / S2) of the area S1 of the background portion to the area S2 of the component portion in the square region is approximately 1, the corner shape is determined as “C chamfering”. If the ratio (S1 / S2) of the area S1 of the background portion to the area S2 of the part in the square region is substantially equal to {(4-π) / π} = 0.27, the corner shape is “R chamfer”. It is determined. When the ratio (S1 / S2) of the area S1 of the background portion and the area S2 of the component portion in the square region is not substantially equal to 1 or 0.27, the corner shape is determined as “defective shape”. .
[0087]
Note that edge shape recognition and corner shape recognition may be performed using a neural network. As the neural network, for example, as shown in FIG. 12, a hierarchical neural network including an input layer, an intermediate layer, and an output layer is used.
[0088]
A case where edge shape recognition is performed using such a neural network will be described. The neural network is trained using the distribution of the difference Δρ from the mold straight line at a plurality of edge portions obtained from a plurality of electronic component images as an input pattern and a signal representing the edge shape corresponding to the input pattern as a teacher signal. When the number of units in the output layer is 4, as shown in FIG. 13, the teacher signal corresponding to “straight shape” is (1, 0, 0, 0) as the teacher signal corresponding to “protrusion”. (0, 1, 0, 0) is a signal, (0, 0, 1, 0) is a teacher signal corresponding to “with depression”, and (0, 1, 0, 0) is a teacher signal corresponding to “defective shape”. 0, 0, 1) is used.
[0089]
When the Δρ distribution in the edge portion obtained from the electronic component image that is the shape recognition target is given as an input signal to the learned neural network, an output corresponding to the shape of the edge portion is obtained. When the lengths of the edge portions are different, the number of Δρ in the edge portions may be matched with the number of units in the input layer, for example, by mapping conversion.
[0090]
When recognizing a corner shape using a neural network, the distribution of Δρ in a plurality of corner portions obtained from a plurality of electronic component images is used as an input pattern, and a signal representing the corner shape corresponding to the input pattern is used as a teacher signal. , Learn neural networks.
[0091]
When the distribution of Δρ in the corner portion obtained from the electronic component image that is the shape recognition target is given as an input signal to the learned neural network, an output corresponding to the shape of the corner portion is obtained.
[0092]
【The invention's effect】
According to the present invention, the local shape of a part can be automatically recognized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an overall configuration of an electronic component automatic mounting system.
FIG. 2 is a schematic diagram showing types of edge shapes.
FIG. 3 is a schematic diagram showing types of corner shapes.
FIG. 4 is a flowchart illustrating a procedure of local shape recognition processing.
FIG. 5 is a schematic diagram illustrating an example of a component image.
FIG. 6 is a schematic diagram showing weighting of a differential operator.
FIG. 7 is a graph for explaining a method of obtaining normal vectors α1 to α4 for each mold straight line.
FIG. 8 is a schematic diagram showing edge points belonging to a class corresponding to a mold straight line L and Δρ obtained for each of these edge points.
FIG. 9 is a schematic diagram illustrating an example of a component image.
10 is a graph showing a distribution of Δρ obtained from the image of FIG. 9;
FIG. 11 is a schematic diagram showing a square region in which a straight line connecting two edge end points of a corner portion is one diagonal line.
FIG. 12 is a schematic diagram illustrating a configuration example of a neural network.
FIG. 13 is an explanatory diagram showing an example of a teacher signal.
[Explanation of symbols]
1 Host computer
2 Electronic component mounting device
3 Image processing device
4 Database
31 Position recognition means
32 Standard data measurement means
Claims (11)
部品画像を大局的に四角形とみなして、その四角形の4辺ごとに、エッジ点をクラス分けするクラスタリング手段、
各クラスごとに、そのクラスに対応する辺とそのクラスに属する各エッジ点との距離の分布を求める分布作成手段、および
求められた分布に基づいて、部品の局所形状を認識する認識手段、
を備えている部品形状認識装置。Edge detection means for detecting a point on the contour of the component image as an edge point based on the component image;
A clustering means that regards a part image as a square and classifies edge points for each of the four sides of the square;
For each class, a distribution creating means for obtaining a distribution of distances between the edge corresponding to the class and each edge point belonging to the class, and a recognition means for recognizing the local shape of the component based on the obtained distribution,
A component shape recognition device.
各辺に対する法線ベクトルおよびハフ変換式により得られた方程式に基づいて、部品画像の重心位置から各辺までの距離を求める距離算出手段、ならびに
各辺に対する法線ベクトルおよび部品画像の重心位置から各辺までの距離に基づいて4つの辺を特定し、特定された4辺における隣り合う辺の交点位置に対応する極座標系の方向と、各エッジ点の極座標系の方向とに基づいて、各エッジ点がどの辺に属するかをクラス分けする手段、
を備えていることを特徴とする請求項1および2のいずれかに記載の部品形状認識装置。The clustering means regards the part image as a quadrangle globally, and calculates a normal vector calculation means for obtaining a normal vector for each side of the quadrangle.
Based on the normal vector for each side and the equation obtained by the Hough transform formula, distance calculation means for obtaining the distance from the center of gravity of the part image to each side, and from the normal vector for each side and the center of gravity of the part image Four sides are identified based on the distance to each side, and based on the direction of the polar coordinate system corresponding to the intersection position of adjacent sides in the identified four sides and the direction of the polar coordinate system of each edge point, A means of classifying which side an edge point belongs to,
3. The component shape recognition apparatus according to claim 1, further comprising:
各エッジ点の第1のグラディエント方向は、部品画像の重心位置から放射状に走査しながら微分処理を行なうことにより求められたグラディエント方向であり、
各エッジ点の第2のグラディエント方向は、注目エッジ点を中心として互いに反対方向にある2つのエッジ点であって、第1のグラディエント方向が注目エッジ点の第1のグラディエント方向とほぼ等しい2つのエッジ点を結ぶ直線に対する法線ベクトルであり、
各エッジ点の第1のグラディエント方向および第2のグラディエント方向の両方を考慮して、グラディエント方向に対するエッジ点の度数分布が作成される請求項4に記載の部品形状認識装置。The gradient direction of each edge point has a first gradient direction and a second gradient direction,
The first gradient direction of each edge point is a gradient direction obtained by performing differentiation processing while scanning radially from the center of gravity position of the component image,
The second gradient direction of each edge point is two edge points that are opposite to each other about the target edge point, and the first gradient direction is substantially equal to the first gradient direction of the target edge point. It is a normal vector for a straight line connecting edge points,
The component shape recognition apparatus according to claim 4, wherein a frequency distribution of the edge points with respect to the gradient direction is created in consideration of both the first gradient direction and the second gradient direction of each edge point.
法線ベクトル算出手段によって求められた注目辺に対する法線ベクトルに似通ったグラディエント方向を持つエッジ点を選択し、選択した各エッジ点ごとに、注目辺に対する法線ベクトルとハフ変換式により得られた方程式とを用いて、その点を通りかつ注目辺に対する法線ベクトルと等しい法線ベクトルを持つ直線と部品画像の重心位置との距離を算出する手段、ならびに
算出された距離に対するエッジ点の度数分布を作成し、度数の最も大きい距離を部品画像の重心位置から注目辺までの距離として選択する手段、
を備えている請求項3に記載の部品形状認識装置。The distance calculation means obtains the distance from the center of gravity position of the component image to the attention side for each side of the rectangle.
An edge point having a gradient direction similar to the normal vector for the target side obtained by the normal vector calculation means is selected, and for each selected edge point, the normal vector for the target side and the Hough transform formula are used. Means for calculating the distance between the straight line passing through the point and having a normal vector equal to the normal vector for the side of interest and the gravity center position of the component image, and the frequency distribution of edge points with respect to the calculated distance Means for selecting the distance with the highest frequency as the distance from the center of gravity of the part image to the target side,
The part shape recognition apparatus of Claim 3 provided with.
各エッジ点の第1のグラディエント方向は、部品画像の重心位置から放射状に走査しながら微分処理を行なうことにより求められたグラディエント方向であり、
各エッジ点の第2のグラディエント方向は、注目エッジ点を中心として互いに反対方向にある2つのエッジ点であって、第1のグラディエント方向が注目エッジ点の第1のグラディエント方向とほぼ等しい2つのエッジ点を結ぶ直線に対する法線ベクトルであり、
各エッジ点の第1のグラディエント方向および第2のグラディエント方向の両方を考慮して、注目辺に対する法線ベクトルに似通ったグラディエント方向を持つエッジ点が選択される請求項6に記載の部品形状認識装置。The gradient direction of each edge point has a first gradient direction and a second gradient direction,
The first gradient direction of each edge point is a gradient direction obtained by performing differentiation processing while scanning radially from the center of gravity position of the component image,
The second gradient direction of each edge point is two edge points that are opposite to each other about the target edge point, and the first gradient direction is substantially equal to the first gradient direction of the target edge point. It is a normal vector for a straight line connecting edge points,
The part shape recognition according to claim 6, wherein an edge point having a gradient direction similar to a normal vector with respect to the target side is selected in consideration of both the first gradient direction and the second gradient direction of each edge point. apparatus.
ハフ変換式により得られた方程式および各辺に対する法線ベクトルに基づいて、エッジ点を通りかつそのエッジ点が属するクラスの辺に対して平行な直線と、部品画像の重心位置との距離を、各エッジ点ごとに求める手段、および
エッジ点を通りかつそのエッジ点が属する辺と平行な直線と部品画像の重心位置との距離と、部品画像の重心位置からそのエッジ点が属するクラスの辺までの距離との差を各エッジ点ごとに求め、求められた差に基づいて、各クラスごとにそのクラスに対応する辺とそのクラスに属する各エッジ点との距離の分布を作成する手段、
を備えている請求項1、2および3のいずれかに記載の部品形状認識装置。Distribution creation means
Based on the equation obtained by the Hough transform equation and the normal vector for each side, the distance between the straight line passing through the edge point and parallel to the side of the class to which the edge point belongs, and the centroid position of the component image, Means to find for each edge point, distance between the straight line passing through the edge point and parallel to the side to which the edge point belongs, and the centroid position of the component image, and from the centroid position of the component image to the side of the class to which the edge point belongs A means for creating a distribution of distances between edges corresponding to the class and edge points belonging to the class for each class based on the obtained difference, for each edge point
The part shape recognition apparatus according to claim 1, further comprising:
各エッジ点を4つのコーナ部分と4つのエッジ部分とにクラス分けする手段、
分布作成手段によって作成された各エッジ部分に対する距離分布に基づいてエッジ形状を認識するエッジ形状認識手段、および
分布作成手段によって作成された各コーナ部分に対する距離分布に基づいてコーナ形状を認識するコーナ形状認識手段、
を備えている請求項1、2、3および8のいずれかに記載の部品形状認識装置。The recognition means is
Means for classifying each edge point into four corner parts and four edge parts;
Edge shape recognition means for recognizing edge shape based on distance distribution for each edge portion created by distribution creation means, and corner shape for recognizing corner shape based on distance distribution for each corner portion created by distribution creation means Recognition means,
The component shape recognition device according to claim 1, comprising:
コーナ形状認識手段は、複数の部品画像から得られた複数のコーナ部分に対する距離分布を入力パターンとし、入力パターンに対応するコーナ形状を表す信号を教師信号として、学習が行なわれたニューラルネットワークに、分布作成手段によって作成された対象コーナ部分に対する距離分布を入力することによって、対象コーナ部分のコーナ形状を認識するものである請求項9に記載の部品形状認識装置。The edge shape recognition means uses a distance distribution for a plurality of edge portions obtained from a plurality of component images as an input pattern, a signal representing an edge shape corresponding to the input pattern as a teacher signal, and a learned neural network, By inputting the distance distribution for the target edge portion created by the distribution creation means, the edge shape of the target edge portion is recognized,
The corner shape recognition means uses a distance distribution for a plurality of corner portions obtained from a plurality of component images as an input pattern, and a signal representing the corner shape corresponding to the input pattern as a teacher signal to the learned neural network, The component shape recognition apparatus according to claim 9, wherein the corner shape of the target corner portion is recognized by inputting a distance distribution with respect to the target corner portion created by the distribution creating means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11672596A JP3706431B2 (en) | 1996-05-10 | 1996-05-10 | Part shape recognition device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11672596A JP3706431B2 (en) | 1996-05-10 | 1996-05-10 | Part shape recognition device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH09305763A JPH09305763A (en) | 1997-11-28 |
| JP3706431B2 true JP3706431B2 (en) | 2005-10-12 |
Family
ID=14694263
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP11672596A Expired - Fee Related JP3706431B2 (en) | 1996-05-10 | 1996-05-10 | Part shape recognition device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3706431B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5783569B2 (en) * | 2011-11-22 | 2015-09-24 | 国立大学法人鳥取大学 | Straight line detection device, straight line detection method, straight line detection program, and imaging system |
| CN119904548A (en) * | 2025-04-02 | 2025-04-29 | 成都圭目机器人有限公司 | An automatic synthesis method for airport cement pavement panels based on intersection rectangle verification |
-
1996
- 1996-05-10 JP JP11672596A patent/JP3706431B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH09305763A (en) | 1997-11-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5699788B2 (en) | Screen area detection method and system | |
| JP6197340B2 (en) | Image processing apparatus, image processing method, and program | |
| CN107563330B (en) | A method for correcting horizontally tilted license plates in surveillance video | |
| JP2745764B2 (en) | Position recognition device | |
| US20070104358A1 (en) | Object recognizing method, program and storage medium for recognizing object, and object recognizing apparatus | |
| CN115375608B (en) | Detection method and device, detection equipment and storage medium | |
| JP7705488B2 (en) | Method for detecting template mark and correcting template position using a single camera | |
| JP6177541B2 (en) | Character recognition device, character recognition method and program | |
| CN114187253A (en) | Circuit board part installation detection method | |
| CN106815830B (en) | Image defect detection method | |
| JP3322569B2 (en) | Component image edge detection method and component shape recognition device | |
| CN115375610B (en) | Detection methods and apparatus, detection equipment and storage media | |
| JP4707249B2 (en) | Component position detection method and apparatus | |
| JPH041869A (en) | Image collating method | |
| JPH04198741A (en) | Shape defect detecting device | |
| JP3706431B2 (en) | Part shape recognition device | |
| JP3460356B2 (en) | Method and apparatus for detecting circle or ellipse | |
| JP4097255B2 (en) | Pattern matching apparatus, pattern matching method and program | |
| CN117094929B (en) | Processing method and system for detecting position accuracy of antenna and chip of RFID tag | |
| JP3700214B2 (en) | Dimension measuring device | |
| JP3580088B2 (en) | Appearance inspection method | |
| JP3520758B2 (en) | Image recognition method | |
| JP2005091181A (en) | Image processor | |
| CN119672133B (en) | Computing method and device for remapping parameters based on calibration plate | |
| JP2710685B2 (en) | Defect detection method by visual inspection |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050701 |
|
| 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: 20050720 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050729 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090805 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100805 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |