JP3711599B2 - Mounting component inspection equipment - Google Patents

Mounting component inspection equipment Download PDF

Info

Publication number
JP3711599B2
JP3711599B2 JP28476595A JP28476595A JP3711599B2 JP 3711599 B2 JP3711599 B2 JP 3711599B2 JP 28476595 A JP28476595 A JP 28476595A JP 28476595 A JP28476595 A JP 28476595A JP 3711599 B2 JP3711599 B2 JP 3711599B2
Authority
JP
Japan
Prior art keywords
edge
electronic component
angle
votes
plane
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP28476595A
Other languages
Japanese (ja)
Other versions
JPH09128547A (en
Inventor
智宣 成岡
秀昭 川村
祐二 丸山
俊彦 辻川
健二 岡本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP28476595A priority Critical patent/JP3711599B2/en
Publication of JPH09128547A publication Critical patent/JPH09128547A/en
Application granted granted Critical
Publication of JP3711599B2 publication Critical patent/JP3711599B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、プリント基板上に実装した電子部品の実装状態の不良を検査するための実装部品検査装置に関するものである。
【0002】
【従来の技術】
従来、プリント基板上に実装された部品の位置ずれや欠品等の良/不良の検査は人間による目視検査に頼っていた。ところが製品の小型化や軽量化が進むにつれ、プリント基板上の部品の小型化や高密度実装化もより一層進んできている。このような状況の中で、人間が高い検査精度を保ちつつ非常に細かな部品の実装状態をしかも長時間検査し続けることは困難に近い作業であった。そこで最近、検査の自動化が強く望まれている中で画像処理により部品の位置ずれ等を検査する装置が提案されている。
例えば、「目視検査の自動化技術調査委員会編集:”画像処理による目視検査の自動化事例集”、(株)新技術コミュニケーションズ(1991年4月10日第1版発行)」の中で目視検査の自動化例が多く紹介されている。基板実装部品検査装置では、チップ部品に斜め2方向から交互に照明し、撮像した両者の画像の差分を取り影画像を作り、影画像をX、Yそれぞれの方向に投影し、その累積画素数から部品の中心位置を求めるものである。
【0003】
【発明が解決しようとする課題】
以上のように、チップ部品に斜め2方向から交互に照明し、撮像した両者の画像の差分を取り影画像を作り検査する方法は、チップ部品が比較的大きく厚みがありかつ実装密度が低い場合は効果的であると言えます。しかし、昨今のようにチップ部品を含む電子部品は小さくしかも薄くなり一層の小型化により高密度実装化が進み、部品が薄くなったことで影が出来にくい点や部品と部品との間隔が狭く影を検出することが難しくなってきている。
【0004】
本発明は上記課題に鑑み、簡単な構成で高密度に実装された電子部品の位置と傾きを高精度に検出する実装部品検査装置を提供するものである。
【0005】
【課題を解決するための手段】
上記課題を解決するため本発明の技術的解決手段は、第1に、プリント基板上に実装された電子部品を撮像する画像入力手段と、前記画像入力手段からの濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジ点を検出するエッジ検出手段と、前記エッジ検出手段からのエッジ点座標をρ=xi・cosθ+yj・sinθ(ただし、0≦θ<π)を演算するハフ(Hough)変換処理によりρθ平面に展開するハフ変換手段と、前記ハフ変換手段で展開したρθ平面(ヒストグラム・メモリ)で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータからPmax=Pθ+P(θ+90゜)(ただし、θは0〜90゜とする)の演算によりその最大値である電子部品の角度θpを求める角度検出手段と、前記ハフ変換手段からのρθ平面において、前記角度検出手段からの電子部品の角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出する線分検出手段と、前記線分検出手段でρθ平面上で抽出された角度および平行な線分から、xy平面上に逆変換し電子部品の位置と角度を演算し、予め設定した基準データ記憶手段からの基準位置と比較し許容範囲内であるかを判定する部品位置判定手段とを設けたものである。
【0006】
第2に、エッジ検出手段において、濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジ点を検出する際に、立ち上がりエッジから立ち下がりエッジまでのエッジ対の距離を予め設定された電子部品のサイズLw、Lsに近いエッジ対のみ検出するようにしたものである。 第3に、プリント基板上に実装された電子部品を撮像する画像入力手段と、エッジ検出手段において、濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジ点を検出する際に、立ち上がりエッジから立ち下がりエッジまでの距離を予め設定された電子部品のサイズLw、Lsに近いエッジ対のみ検出し、さらにエッジ対間の濃度値の平均値から電極部を検出するエッジ検出手段と、前記エッジ検出手段からのエッジ点座標をρ=xi・cosθ+yj・sinθ(ただし、0≦θ<π)演算しハフ(Hough)変換処理する際に、電極部に重み付けをして得票しρθ平面に展開するハフ変換手段と、前記ハフ変換手段で展開したρθ平面で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータからPmax=Pθ+P(θ+90゜)(ただし、θは0から90゜とする)の演算によりその最大値である電子部品の角度θpを求める角度検出手段と、前記ハフ変換手段からのρθ平面において、前記角度検出手段からの電子部品の角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出する線分検出手段と、前記線分検出手段でρθ平面上で抽出された角度および平行な線分から、xy平面上に逆変換し電子部品の位置と角度を演算し、予め設定した基準データ記憶手段からの基準位置と比較し許容範囲内であるかを判定する部品位置判定手段とを設けたものである。
【0007】
第4に、プリント基板上に実装された電子部品を撮像する画像入力手段と、前記画像入力手段からの濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジ点を検出するエッジ検出手段と、前記エッジ検出手段からのエッジ点座標をρ=xi・cosθ+yj・sinθ(ただし、0≦θ<π)演算するハフ(Hough)変換処理によりρθ平面に展開する第1のハフ変換手段と、前記第1のハフ変換手段で展開したρθ平面で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータからPmax=Pθ+P(θ+90゜)(ただし、θは0から90゜とする)の演算によりその最大値である電子部品の角度θpを求める第1の角度検出手段と、前記第1のハフ変換手段からのρθ平面において、前記角度検出手段からの電子部品の角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsより外側の2つのピークより電子部品の短辺および長辺の平行な仮の線分を検出する第1の線分検出手段と、前記第1の線分検出手段で求められた電子部品の短辺および長辺の平行な線分を囲む領域からはずれたエッジ特徴点座標のみρ=xi・cosθ+yj・sinθ(ただし、0≦θ<π)演算するハフ(Hough)変換処理を行い、前記第1のハフ変換手段で求めたρθ平面から減算する第2のハフ変換手段と、前記第2のハフ変換手段で展開したρθ平面で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータからPmax=Pθ+P(θ+90゜)(ただし、θは0から90゜とする)の演算によりその最大値である電子部品の角度θpを求める第2の角度検出手段と、前記第2のハフ変換手段からのρθ平面において、前記第2の角度検出手段からの電子部品の角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出する第2の線分検出手段と、前記第2の線分検出手段でρθ平面上で抽出された角度および平行な線分から、xy平面上に逆変換し電子部品の位置と角度を演算し、予め設定した基準データ記憶手段からの基準位置と比較し許容範囲内であるかを判定する部品位置判定手段とを設けたものである。
【0008】
第5に、エッジ検出手段に先立ち、前記画像入力手段からの濃淡画像に対して、予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のサイズによらず処理する画像サイズが一定となるように拡大縮小手段を設け拡大縮小した後に、電子部品のエッジ点を検出するようにしたものである。
【0009】
【発明の実施の形態】
本発明は、第1に、プリント基板上に実装された電子部品を撮像し、その濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジを検出する。得られたエッジ点座標をハフ(Hough)変換処理により展開したρθ平面で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータの最大値である電子部品の角度θpを求め、角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出する。抽出された角度および平行な線分から、xy平面上に逆変換し電子部品の位置と角度を演算し、予め設定した基準データ記憶手段からの基準位置と比較し許容範囲内であるかを判定することで高密度に実装された電子部品を高精度に検出でき、また電子部品の一部が汚れや酸化により濃淡レベルが低下しても角度の検出範囲が広く高精度に位置を検出することができる。
【0010】
第2に、エッジ検出手段において、濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジを検出する際に、立ち上がりエッジから立ち下がりエッジまでのエッジ対の距離を予め設定された電子部品のサイズLw、Lsに近いエッジ対のみ検出することで電子部品以外の周辺のエッジ検出を抑制し、高精度に位置を検出することができる。
【0011】
第3に、エッジ検出手段において、濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジ点を検出する際に、立ち上がりエッジから立ち下がりエッジまでのエッジ対の距離を予め設定された電子部品のサイズLw、Lsに近いエッジ対のみ検出し、さらにエッジ対間の濃度値の平均値から電極部を検出する。エッジ点座標からハフ(Hough)変換処理する際に、電極部に重み付けをして得票しρθ平面に展開することにより部品周辺および文字付き部品内部のエッジ点による線分の誤検出を抑制し高精度に位置を検出することができる。
【0012】
第4に、第1のハフ変換手段からのρθ平面において、前記第1の角度検出手段からの電子部品の角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsより外側の2つのピークより電子部品の短辺および長辺の平行な線分を検出しその線分を囲む領域からはずれたエッジ点座標のみハフ(Hough)変換処理を行い、前記第1のハフ変換手段で求めたρθ平面から減算する。減算したρθ平面からθ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータの最大値である電子部品の角度θpを求め、角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出することにより、部品周辺の影響を受けずに高精度に位置の検出ができる。
【0013】
第5に、エッジ検出手段において、前記画像入力手段からの濃淡画像から電子部品のエッジ点を検出する際に、予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のサイズによらず処理する画像サイズが一定となるように拡大縮小した後に、電子部品のエッジ点を検出することにより、小さい部品は拡大処理により見かけ上エッジ点数が増え位置精度が向上し、大きな部品は縮小処理によりエッジ点数を削減し処理速度を向上することができる。
【0014】
【実施例】
(実施例1)
以下、図1を参照しながら本発明の第1の実施例について説明する。
【0015】
図1は本発明の実装部品検査装置の第1の実施例を示すブロック図である。図1において、101はプリント基板、102は電子部品、103は照明装置、104はCCDカメラ等の画像入力手段、105は画像入力手段からの濃淡画像から電子部品のエッジ点を検出するエッジ検出手段、106はエッジ点座標のハフ(Hough)変換処理によりρθ平面に展開するハフ変換手段、107はρθ平面(ヒストグラム・メモリ)で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータの最大値である電子部品の角度θpを求める角度検出手段、108は角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出する線分検出手段、109は抽出された角度および平行な線分から、xy平面上に逆変換し電子部品の位置と角度を演算し、予め設定した基準データ記憶手段110からの基準位置と比較し許容範囲内であるかを判定する部品位置判定手段である。
【0016】
図1に基づき、以下にその動作を説明する。
画像入力手段104は、プリント基板101上に実装された電子部品102を、照明装置103で照明しCCDカメラ等で撮像する。エッジ検出手段105は、画像入力手段104からの濃淡画像から電子部品102のエッジ点を検出するもので、エッジ検出手法としては数多くの方法が提案されており、例えば「土屋、深田共著:”画像処理 第3章画像処理の基本アルゴリズム”、pp50−86、コロナ社(1990)」に記載されている。本実施例では、良く知られているSobel(ソーベル)オペレータを用いて、図2(a)(b)に示す方向マスクを用いて方向別にエッジを求めるものとする。図2(a)(b)の方向マスクの各要素を同図(c)のように表わすと、x方向を(数1)により、y方向を(数2)より求めるものである。
【0017】
【数1】

Figure 0003711599
【0018】
【数2】
Figure 0003711599
ハフ変換手段106は、エッジ検出手段105からのエッジ点の座標を(数3)により演算しハフ(Hough)変換処理によりρθ平面(ヒストグラムメモリ)に展開するものである。
【0019】
【数3】
Figure 0003711599
ハフ変換処理については、直線を検出する手法で「米国特許:3、069、654(1962)」および「松山隆司、輿水大和:”Hough変換とパターンマッチング”、情報処理学会誌、Vol.30、No.9、pp1035-1046(1989)に詳細に記述されているのでここでは概要を説明するものとする。
【0020】
図3(a)(b)を用いてハフ変換の原理を説明する。同図(a)はエッジ点をxy平面で表わし、同図(b)はハフ変換後のρθ平面を表わす。同図(a)のエッジ点301(xi,yi)を通る直線はyi=axi+bで表せる。エッジ点の座標を(数3)により垂直θと原点からの符号付き距離ρに表現し、同図(b)のパラメータ空間で示すように正弦曲線の軌跡が重なった点303のρ0およびθ0が線分302となる。また、xy座標系への変換は、(数4)により逆変換できる。
【0021】
【数4】
Figure 0003711599
次に、角度検出手段107について、図4(a)〜(d)を用いて説明する。図4(a)は、ハフ変換手段106で変換されたρθ平面(ヒストグラム・メモリ)である。図4(a)のρθ平面上において、得票数Pが閾値a以上の得票数のみをθ毎に累積したものを図4(b)に示す。図4(b)において、最大累積得票数Pmaxを(数5)で求め、そのときの電子部品の角度をθpとして検出する。図4(b)では、最大累積得票数として点線で示した角度θ1およびθ2(θ1+90゜)が求められる。また、最大累積得票数Pmaxを(数6)で求めても良い。
【0022】
【数5】
Figure 0003711599
【0023】
【数6】
Figure 0003711599
次に線分検出手段108について、図4を用いて説明する。線分検出手段108は、角度検出手段107で検出された角度θp(角度θ1又は角度θ2)を基に図4(a)のρθ平面において、角度θ1±b(0<b<45)の範囲のみρ方向に得票数を累積し、最大累積得票数の極大点を求める。更に、基準データ記憶手段110から予め設定された電子部品のサイズLw、Lsを読み出し、求められた複数の極大点の距離が長辺サイズLwまたは短辺サイズLsに一致するような、2つの極大点を検出する。図4(c)にρ(θ1)方向累積得票数と求められた長辺の線分を表わすρm1、ρm2を点線で示す。同様に、角度θ2±bの範囲のみρ方向に得票数を累積し、最大累積得票数の極大点を求める。更に、求められた複数の極大点の距離が予め設定された電子部品の長辺サイズLwまたは短辺サイズLsに一致する2つの極大点を検出する。図4(d)にρ(θ2)方向累積得票数と求められた短辺の線分を表わすρn1、ρn2を点線で示す。図4(c)および図4(d)で示すように、電子部品の短辺および長辺の平行な線分を検出することができる。この場合はθ2がθpを表わす。
【0024】
次に部品位置判定手段109について図5を用いて説明する。図5は電子部品がxy平面上にある様子を示している。部品位置判定手段109は、線分検出手段108で検出された電子部品の線分ρm1、ρm2、ρn1およびρn2と角度θpから(数7)により電子部品の位置(xi,yi、θp)を求め、基準データ記憶手段110からの電子部品の基準位置(xr,yr、θr)と比較し許容範囲内であるかを判定するものである。
【0025】
【数7】
Figure 0003711599
以上、図1に基づき本発明の第1の実施例の動作を説明したが、具体的には図6(a)に示すように画像入力手段104で撮像した画像データを一旦イメージメモリ601に記憶し、エッジ検出手段105からをすべてCPUシステムで処理を行うものも可能である。図6(a)において、601は画像入力手段104で撮像した画像データを一旦格納するためのイメージメモリ、602は演算処理を行うCPU(中央演算ユニット)、603は演算処理の途中結果を記憶するためのワークメモリ、604はハフ変換処理の得票数を格納するヒストグラムメモリ、605はθ方向の累積得票数を格納するθ累積得票数メモリ、606はρ方向の累積得票数を格納するρ累積得票数メモリ、607は部品の位置検出結果および判定結果を格納する結果格納メモリである。
【0026】
次に、図7の処理フローを用いて、構成要素毎に説明する。
1)開始
(a):開始
(b):基準データ記憶手段110は、検査に先立ち予め各部品毎に位置
(xr,yr,θr)、検査領域(xs,ys,xe.ye)、許容範囲および検査パラメータ等を登録し、各処理毎に必要に応じて読み出すものである。
2)画像入力手段104
(c):プリント基板101上に実装された電子部品102を、照明装置103で照明しCCDカメラで撮像、イメージメモリ601に格納する。
3)エッジ検出手段105
(d):基準データ記憶手段110に記憶された対象となる部品の位置・検査領域を読み込む。
【0027】
(e):イメージメモリ601上の検査領域内をエッジ点を検出し、エッジ点データをワークメモリ603に記憶する。
4)ハフ変換手段106
(f):ワークメモリ603からエッジ点の座標を読み出し、ハフ変換を(数3)式で演算し、ヒストグラムメモリ604に記憶する。
【0028】
(g):ワークメモリ603内にエッジ点の有無を判定し、エッジ点がなくなるまで(f)の処理を繰り返す。
5)角度検出手段107
(h):ヒストグラムメモリ604内の得票数が閾値a以上の得票数のみθ毎に累積し、θ累積得票数メモリ605に記憶する。
【0029】
(i):θ累積得票数メモリ605内の累積得票数から最大累積得票数Pmaxを(数5)で求め、最大値である電子部品の角度θp(角度θ1=θp、角度θ2=θ1+90)として求める。
6)線分検出手段108
(j):角度検出手段107で求めた電子部品の角度θ1およびθ2から、角度θ1±b、角度θ2±bの範囲のみρ方向に得票数を個別に累積し、ρ累積得票数メモリ606に記憶する。
【0030】
(k):ρ累積得票数メモリ606内の累積得票数から最大累積得票数の極大点を求め、求められた複数の極大点の距離が予め設定された電子部品の長辺サイズLwまたは短辺サイズLsに一致する2組の極大点から、長辺の線分ρm1、ρm2と短辺の線分ρn1、ρn2を検出する。
7)部品位置判定手段109
(l):線分検出手段108で検出された電子部品の線分ρm1、ρm2、ρn1、ρn2および角度θpから(数7)により電子部品の位置
(xi,yi、θp)を求める。
【0031】
(m):基準データ記憶手段110からの電子部品の基準位置(xr,yr、θr)と比較し許容範囲内であるかを判定し、結果を結果格納メモリ607に記憶する。
8)終了
(n):基準データ記憶手段110に登録された対象部品の有無の判定を行い、有の場合は(d)の処理へ、無の場合は(o)の処理に進む。
【0032】
(o):終了
また、図6(b)に示すようにエッジ検出手段105およびハフ変換手段106は処理時間がかかるのでハードウエアで構成し、処理の複雑な角度検出手段107、線分検出手段108および部品位置判定手段109はCPUシステムによりソフトウエアで処理することも考えられる。
よって、図6(a)と図6(b)とで異なるエッジ検出手段105とハフ変換手段106のハードウエア化について説明する。
最初に、エッジ検出手段105について説明する。エッジ検出手段105は、前述したしたように方向別に検出するものとし、図6(c)にブロック図を示し説明する。図6(c)において、610は画像入力端子、611は1ライン分のシフトレジスタ、612は3×3の走査窓、613は積和演算ユニット、614および615はエッジ出力である。画像入力手段104からの濃淡画像は画像入力端子610から入力され、2ライン分の1Hシフトレジスタ611と3×3走査窓612とで走査窓を走査させその9画素データを積和演算ユニット613に入力し、SxおよびSyを(数1)および(数2)の演算を行い、2値化閾値信号616と比較しエッジ点Sx614およびエッジ点Sy615を出力するものである。
【0033】
次に、ハフ変換手段106について説明する。ハフ変換手段106をハードウエアで実現する方法としては、(数3)式のcosθ部およびsinθ部をROMテーブルにして実現する方法があり、「花原他:”実時間Hough変換プロセッサ”、昭和60年度電子通信学会情報・システム部門全国大会、92、(1985)」に記述されているので説明は省略するものとする。
【0034】
(実施例2)
以下、図8(a)(b)を参照しながら本発明の第2の実施例について説明する。
本発明の第2の実施例は、本発明の第1の実施例におけるエッジ検出手段105において、電子部品周辺のエッジ点の検出を抑制しハフ変換手段による部品位置検出精度を向上させたものである。ハフ変換処理は、線分検出おいては非常に優れた性質を持っているが、周辺ノイズに弱く実用化を妨げていた要因でもある。よって、電子部品周辺のエッジ点の検出を抑制し、高品質なエッジ検出を行うことは非常に重要な点であり、図8(a)を用いて以下に説明する。
【0035】
図8(a)において、800は検査領域内の原点座標、801は検査領域、802は部品、803は部品の電極部、809は部品周辺の配線パターン、804は検査領域内を水平に走査した際の1水平方向走査ライン、807は検査領域内を垂直に走査した際の1垂直方向走査ラインを示す。また、806および808は水平および垂直に走査した際の輝度プロファイルを示すものである。
【0036】
本発明の第2の実施例におけるエッジ検出手段105は、検査領域801内をまず水平方向に原点座標800から水平走査ライン804のように順次走査し、輝度プロファイル806を得る。各水平走査ライン毎の輝度プロファイル806から立ち上がりエッジ812および立ち下がりエッジ811を検出し、エッジ点の候補とする。各水平走査ライン毎にエッジ点候補を検出し、立ち上がりエッジ点候補に対して立ち下がりエッジ点候補の距離を求め、予め設定された電子部品のサイズLw、Lsに近いエッジ対をエッジ点として選択するもので、輝度プロファイル806の場合は候補としてkw1、kw2、kw3の3種類検出され電子部品のサイズLwと最も近いkw1が選択されることになる。この処理を、各水平走査ラインについて行う。
【0037】
垂直方向についても同様に、垂直方向に原点座標800から垂直走査ライン807のように順次走査し、輝度プロファイル808を得る。各垂直走査ライン毎の輝度プロファイル808から立ち上がりエッジ812および立ち下がりエッジ811を検出し、エッジ点の候補とする。各垂直走査ライン毎にエッジ点候補を検出し、立ち上がりエッジ点候補に対して立ち下がりエッジ点候補の距離を求め、予め設定された電子部品のサイズLw、Lsに近いエッジ対をエッジ点として選択するもので、輝度プロファイル808の場合は候補としてks1、ks2、ks3の3種類検出され電子部品のサイズLsと最も近いks2が選択されることになる。
また、ここでは水平方向および垂直方向とも立ち上がりエッジ点候補に対して立ち下がりエッジ点候補の距離を求め、予め設定された電子部品のサイズLw、Lsに近いエッジ対をエッジ点として選択すると説明したが、予め電子部品の実装される位置が判っている場合は、その方向のサイズLw(あるいは、Ls)に近いエッジ対のみそれぞれ選択することも可能である。
【0038】
本発明の第2の実施例の処理フローは、図7と同様であるが異なるエッジ検出手段105のみを図8(b)に処理フロー(e)を示す。
【0039】
以上の処理を、各水平方向および垂直方向について行い、図8(a)に示すようにエッジ点813が検出され、電子部品内部や周辺の配線パターン809などで検出されたエッジ点候補を削除することができ、電子部品の外周囲のみの極めて高品質なエッジ点のみを検出することが出来る。これにより、この後のハフ変換による部品位置検出が高精度でかつ安定に検出でき信頼性の向上が図れるものである。
【0040】
(実施例3)
以下、図を参照しながら本発明の第3の実施例について説明する。
本発明の第3の実施例は、特に電子部品のボディ部の色が黒い部品について有効であり、ボディ部の色が黒いと周囲との輝度差がなくエッジ検出が出来ないために、電極部のエッジ点しか検出されないことがあり、ハフ変換において得票数が少なく累積得票数を求めても極大点の検出が難しく正しい線分が検出されない場合がある。これを改善するために、ハフ変換時に電極部のエッジ点にフラグを付与し得票する際に重み付けをすることにより累積得票数における極大点をでやすくすることにより検出精度を向上させるものである。
【0041】
本発明の第3の実施例は、エッジ検出手段105およびハフ変換手段106における動作が第1の実施例と異なり、エッジ検出手段105においては、エッジ検出は予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジ候補点を検出して、立ち上がりエッジから立ち下がりエッジまでのエッジ対の距離を予め設定された電子部品のサイズLw、Lsに近いエッジ対のみ検出し、さらにエッジ対間の濃度値の平均値から電極部を検出する。ハフ変換手段106においては、エッジ検出手段105からのエッジ点座標から(数3)式でハフ(Hough)変換処理する際に、電極部に重み付けをして得票しρθ平面に展開するものである。
【0042】
本発明の第3の実施例について、図8(a)、図9(a)および図9(b)を用いてエッジ検出手段105およびハフ変換手段106について説明する。
エッジ検出手段105は、図8(a)に示ように検査領域801内をまず水平方向に原点座標800から水平走査ライン804のように順次走査し、輝度プロファイル806を得る。各水平走査ライン毎の輝度プロファイル806から立ち上がりエッジ812および立ち下がりエッジ811を検出し、エッジ点の候補とする。各水平走査ライン毎にエッジ点候補を検出し、立ち上がりエッジ点候補に対して立ち下がりエッジ点候補の距離を求め、予め設定された電子部品のサイズLw、Lsに近いエッジ対をエッジ点として選択するもので、輝度プロファイル806の場合は候補としてkw1、kw2、kw3の3種類検出され電子部品のサイズLwと最も近いkw1が選択されることになる。この処理を、各水平走査ラインについて行う。
【0043】
垂直方向についても同様に、垂直方向に原点座標800から垂直走査ライン807のように順次走査し、輝度プロファイル808を得る。各垂直走査ライン毎の輝度プロファイル808から立ち上がりエッジ812および立ち下がりエッジ811を検出し、エッジ点の候補とする。各垂直走査ライン毎にエッジ点候補を検出し、立ち上がりエッジ点候補に対して立ち下がりエッジ点候補の距離を求め、予め設定された電子部品のサイズLw、Lsに近いエッジ対をエッジ点として選択するもので、輝度プロファイル808の場合は候補としてks1、ks2、ks3の3種類検出され電子部品のサイズLsと最も近いks2が選択されることになる。更に、選択されたエッジ対間の平均輝度を求め、立ち上がりエッジ点および立ち下がりエッジ点の座標および平均輝度値を図9(a)に示すよう表形式でワークメモリ603に記憶する。また、平均輝度値が予め設定された輝度値Brs以上なら電極部とみなし電極フラグを”1”とする。ただし、図9(b)は説明の都合上、垂直方向の一部のみを示したが、実際は水平方向および垂直方向について同様なエッジ情報を検出するものとする。
【0044】
以上の処理を、各水平方向および垂直方向について行い、図9(a)に示したようなエッジ点検出を行う。
ハフ変換手段106は、ワークメモリ603からエッジ点の座標および電極フラグを読み出し、ハフ変換処理を(数3)式で演算し、電極フラグが”1”の場合は2点を得票し、電極フラグが”0”の場合は1点を得票してヒストグラムメモリ604に記憶するようにしたものである。
【0045】
また、本発明の第3の実施例の処理フローは、図7と同様であるが異なるエッジ検出手段105およびハフ変換手段106のみを図9(b)に処理フロー(e)(f)および(g)を示す。
本発明の第3の実施例としては、電子部品の短辺(図8(a)における垂直方向)側しか平均輝度を検出しなかったが、短辺および長辺の両者について行ってよく、短辺しか検出しなかったのは特にボディ部の黒い電子部品では短辺側のエッジ点数が少ないことからである。
【0046】
また、長辺側で平均輝度から電極部を判定する場合は、図8(a)で示した輝度プロファイル806において、kw2およびkw3間の平均輝度値から電極部として判定することも容易に考えられる。
【0047】
(実施例4)
以下、図を参照しながら本発明の第4の実施例について説明する。
本発明の第4の実施例は、電子部品の周辺に配線パターン、シルク印刷および電子部品ボディ部に記述された記号等により、線分を誤認識することがありこれを防止することを目的として、図10に基づき以下に説明する。
【0048】
図10は本発明の第4の実施例の実装部品検査装置の一実施例を示すブロック図である。図10において、101はプリント基板、102は電子部品、103は照明装置、104はCCDカメラ等の画像入力手段、105は画像入力手段からの濃淡画像から電子部品のエッジ点を検出するエッジ検出手段、106はエッジ点座標からρを(数3)で演算するハフ(Hough)変換処理によりρθ平面に展開する第1のハフ変換手段、107はρθ平面(ヒストグラム・メモリ)で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータからPmaxを(数5)で演算し、その最大値である電子部品の角度θpを求める第1の角度検出手段、108は電子部品の角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsより外側の2つのピークより電子部品の短辺および長辺の平行な線分を検出する第1の線分検出手段、111は第1の線分検出手段108で得られた線分に囲まれた領域以外のエッジ点座標からρを(数3)により演算するハフ(Hough)変換処理を行い、ρθ平面から減算する第2のハフ変換手段、112はρθ平面(ヒストグラム・メモリ)で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータからPmaxを(数5)で演算し、その最大値である電子部品の角度θpを求める第2の角度検出手段、108は電子部品の角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出する第2の線分検出手段、109は抽出された角度および平行な線分から、xy平面上に逆変換し電子部品の位置と角度を演算し、予め設定した基準データ記憶手段110からの基準位置と比較し許容範囲内であるかを判定する部品位置判定手段である。
【0049】
以上、図10に基づき本発明の第4の実施例の構成要素について説明したが、具体的には本発明の第1の実施例と同様に図6(a)に示すように画像入力手段104で撮像した画像データを一旦イメージメモリ601に記憶し、エッジ検出手段105からをすべてCPUシステムで処理を行うものも可能である。図6(a)において、601は画像入力手段104で撮像した画像データを一旦格納するためのイメージメモリ、602は演算処理を行うCPU(中央演算ユニット)、603は演算処理の途中結果を記憶するためのワークメモリ、604はハフ変換処理の得票数を格納するヒストグラムメモリ、605はθ方向の累積得票数を格納するθ累積得票数メモリ、606はρ方向の累積得票数を格納するρ累積得票数メモリ、607は部品の位置検出結果および判定結果を格納する結果格納メモリである。
【0050】
次に、図12及び図13に処理フローを示し、構成要素毎に説明する。
1)開始
(a):開始
(b):基準データ記憶手段110は、検査に先立ち予め各部品毎に位置(xr,yr,θr)、検査領域(xs,ys,xe.ye)、許容範囲および検査パラメータ等を登録し、各処理毎に必要に応じて読み出すものである。
2)画像入力手段104
(c):プリント基板101上に実装された電子部品102を、照明装置103で照明しCCDカメラで撮像、イメージメモリ601に格納する。
3)エッジ検出手段105
(d):基準データ記憶手段110に記憶された対象となる電子部品の位置・検査領域を読み込む。
【0051】
(e):イメージメモリ601上の検査領域内をエッジ点を検出し、エッジ点データをワークメモリ603に記憶する。
4)第1のハフ変換手段106
(f):ワークメモリ603からエッジ点の座標を読み出し、ハフ変換を(数3)式で演算し、ヒストグラムメモリ604に記憶する。
【0052】
(g):ワークメモリ603内にエッジ点の有無を判定し、エッジ点がなくなるまで(f)の処理を繰り返す。
5)第1の角度検出手段107
(h):ヒストグラムメモリ604内の得票数が閾値a以上の得票数のみθ毎に累積し、θ累積得票数メモリ605に記憶する。
【0053】
(i):θ累積得票数メモリ605内の累積得票数から最大累積得票数Pmaxを(数5)で求め、最大値を電子部品の角度θp(角度θ1=θp、角度θ2=θ1+90)として求める。
6)第1の線分検出手段108
(j):角度検出手段107で求めた電子部品の角度θ1およびθ2から、角度θ1±b、角度θ2±bの範囲のみρ方向に得票数を個別に累積し、ρ累積得票数メモリ606に記憶する。
【0054】
(k):ρ累積得票数メモリ606内の累積得票数から最大累積得票数の極大点を求め、求められた複数の極大点の距離が予め設定された電子部品の長辺サイズLwまたは短辺サイズLsの外側の2組の極大点から、長辺の線分ρm1’、ρm2’と短辺の線分ρn1’、ρn2’を検出する。
7)第2のハフ変換手段111
(l):第1の線分検出手段108で求めた長辺の線分ρm1’、ρm2’と短辺の線分ρn1’、ρn2’で囲まれた範囲からはずれたエッジ点をワークメモリ603からエッジ点の座標を読み出し、ハフ変換を(数3)式で演算し、ヒストグラムメモリ604から読み出し得票数から減算して記憶する。
【0055】
(m):ワークメモリ603内にエッジ点の有無を判定し、エッジ点がなくなるまで(l)の処理を繰り返す。
8)第2の角度検出手段112
(n):ヒストグラムメモリ604内の得票数が閾値a以上の得票数のみθ毎に累積し、θ累積得票数メモリ605に記憶する。
【0056】
(o):θ累積得票数メモリ605内の累積得票数から最大累積得票数 Pmaxを(数5)で求め、極大点の角度θp(角度θ1=θp、角度θ2=θ1+90)を求める。
9)第2の線分検出手段113
(p):角度検出手段107で求めた角度θ1およびθ2から、角度θ1±b、角度θ2±bの範囲のみρ方向に得票数を個別に累積し、ρ累積得票数メモリ606に記憶する。
【0057】
(q):ρ累積得票数メモリ606内の累積得票数から最大累積得票数の極大点を求め、求められた複数の極大点の距離が予め設定された電子部品の長辺サイズLwまたは短辺サイズLsに一致する2組の極大点から、長辺の線分ρm1、ρm2と短辺の線分ρn1、ρn2を検出する。
10)部品位置判定手段109
(r):第2の線分検出手段113で検出された線分ρm1、ρm2、ρn1、ρn2および角度θpから(数7)により電子部品の位置(xi,yi、θp)を求める。
【0058】
(s):基準データ記憶手段110からの電子部品の基準位置(xr,yr、θr)と比較し許容範囲内であるかを判定し、結果を結果格納メモリ607に記憶する。
8)終了
(t):基準データ記憶手段110に登録された対象部品の有無の判定を行い、有の場合は(d)の処理へ、無の場合は(u)の処理に進む。
【0059】
(u):終了
また、第2のハフ変換手段111において、第1の線分検出手段108で求めた長辺の線分ρm1’、ρm2’と短辺の線分ρn1’、ρn2’で囲まれた範囲からはずれたエッジ点をワークメモリ603からエッジ点の座標を読み出し、ハフ変換を行いヒストグラムメモリ604から読み出し得票数から減算して記憶すると説明したが、第1の線分検出手段108で求めた長辺の線分ρm1’、ρm2’と短辺の線分ρn1’、ρn2’で囲まれた範囲を新たにハフ変換処理を行っても同様の結果が得られるは言うまでもない。
【0060】
次に、本発明の第4の実施例の処理例について、図11(a)(b)を用いて説明する。図11(a)は、エッジ検出手段105で得られたエッジ点(ただし、説明を容易とするために垂直方向のエッジ点のみを示すものとする。)と第1の線分検出手段で得られた線分ρm1’、ρm2’、ρn1’、ρn2’を示す。このとき得られた線分は、配線パターン121により電子部品のサイズより外側の線分が選択されることから線分ρm1’が検出される。図11(b)は第2の線分検出で得られた線分ρm1、ρm2、ρn1、ρn2を示すが、正確に電子部品120の外形を検出していることが判る。つまり、図11(a)と図11(b)の配線パターン上と電子部品上のエッジ点数の差からも明らかのように、一回のハフ変換処理では配線パターン121等により誤検出されることもあり、電子部品の位置検出精度低下させる原因にもなっており、ハフ変換処理を2回に分けて処理することにより電子部品の検出位置精度を向上させることが出来る。
【0061】
なお、本実施例の構成に実施例2のエッジ検出手段又は実施例3のエッジ検出手段及びハフ変換手段を用いても良いことはいうまでもない。
【0062】
(実施例5)
以下、図を参照しながら本発明の第5の実施例について説明する。
本発明の第5の実施例は、プリント基板上に実装される電子部品のサイズは様々であり、大きなサイズの電子部品はエッジ点数が多く処理時間がかかるが、小さい部品はエッジ点数が少なく検出精度が確保できないと言う課題があり、本発明では電子部品のサイズが見かけ上一定となるように画像データを拡大縮小することにより処理時間と検出精度の課題を解決するものであり、図14にブロック構成図を示し説明する。
【0063】
図14に示す構成は、本発明の第1の実施例の構成のCCDカメラ104とエッジ検出手段105の間に拡大縮小手段114を挿入したものなので拡大縮小手段114のみ説明するものとする。
【0064】
拡大縮小手段114は、予め設定された電子部品のサイズ長辺Lwと短辺Lsにより予め設定された正規化サイズkm、knに拡大縮小するものであり、その拡大縮小率はkm/Lw、kn/Lsで与えられる。拡大縮小処理は、画像処理手法としてはよく知られた方式であり、一番簡単な方法としては拡大縮小を2べき乗で2倍、4倍あるいは1/2倍、1/4倍等の一番近い拡大縮小率を選択する方法である。
【0065】
また、もっと高精度に拡大縮小を行う方法として、アフィン変換を用いた拡大縮小方式があり、(数8)で演算することができる。
【0066】
【数8】
Figure 0003711599
以上、実施例1の構成で説明したが、実施例4の構成に本実施例の拡大縮小手段を用いても良い。
【0067】
【発明の効果】
以上述べてきたように本発明の効果は、第1にプリント基板上に実装された電子部品を撮像し、その濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジを検出する。得られたエッジ点座標からハフ(Hough)変換処理により展開したρθ平面で、θ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータの最大値である電子部品の角度θpを求め、角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出する。抽出された角度および平行な線分から、xy平面上に逆変換し電子部品の位置と角度を演算し、予め設定した基準データ記憶手段からの基準位置と比較し許容範囲内であるかを判定することで、高密度に実装された電子部品でも高精度に検出することができ、さらに電子部品の一部が汚れや酸化により濃淡レベルが低下しても角度の検出範囲が広く高精度に位置を検出する実装部品検査装置を実現することができる。
【0068】
第2に、エッジ検出手段において、濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジを検出する際に、立ち上がりエッジから立ち下がりエッジまでの距離を予め設定された電子部品のサイズLw、Lsに近いエッジ対のみ検出することで部品周辺のエッジ検出を抑制し、高精度に部品位置を検出することができる実装部品検査装置を実現することが可能となった。
【0069】
第3に、エッジ検出手段において、濃淡画像から予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のエッジ点を検出する際に、立ち上がりエッジから立ち下がりエッジまでの距離を予め設定された電子部品のサイズLw、Lsに近いエッジ対のみ検出し、さらにエッジ対間の濃度値の平均値から電極部を検出し、エッジ点座標をハフ(Hough)変換処理する際に、電極部に重み付けをして得票しρθ平面に展開することにより部品周辺および文字付き部品内部のエッジ点検出を抑制し高精度に位置を検出することができる実装部品検査装置を実現できる。
【0070】
第4に、第1のハフ変換手段からのρθ平面において、前記角度検出手段からの電子部品の角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsより外側の2つのピークより電子部品の短辺および長辺の平行な線分を検出しその線分を囲む領域からはずれたエッジ点座標のみハフ(Hough)変換処理を行い、前記第1のハフ変換手段で求めたρθ平面から減算する。減算したρθ平面からθ方向に得票数が任意に設定した閾値a以上の得票数を投影し、θ側に投影したデータの最大値である電子部品の角度θpを求め、角度θp±bおよび角度(θp+90゜)±bの範囲内でそれぞれρ側に得票数を投影し、それぞれの投影データで予め設定された電子部品のサイズLw、Lsに一致する2つのピークより電子部品の短辺および長辺の平行な線分を検出することにより、部品周辺の影響を受けずに高精度に位置の検出が可能な実装部品検査装置を実現できる。
【0071】
第5に、エッジ検出手段において、前記画像入力手段からの濃淡画像から電子部品のエッジ点を検出する際に、予め設定した電子部品のサイズLw、Lsから任意の検査領域を設定し、電子部品のサイズによらず処理する画像サイズが一定となるように拡大縮小した後に、電子部品のエッジ点を検出することにより、小さい部品は拡大処理により見かけ上エッジ点数が増え位置精度が向上し、大きな部品は縮小処理によりエッジ点数を削減し処理速度を向上する実装部品検査装置を実現できる。
【図面の簡単な説明】
【図1】本発明の第1の実施例における実装部品検査装置のブロック結線図
【図2】同実施例におけるエッジ検出手段のマスク構成を示す図
【図3】同実施例におけるハフ変換手段の原理を示す図
【図4】同実施例における角度検出手段、線分検出手段の累積得票数を示す図
【図5】同実施例における部品位置判定手段の位置座標を示す図
【図6】(a) 同実施例におけるCPUシステム構成図
(b) 同実施例における別のCPUシステム構成図
(c) 同実施例におけるエッジ検出手段のブロック結線図
【図7】同実施例における処理のフローチャート
【図8】(a)本発明の第2の実施例におけるエッジ検出手段の処理を示す図
(b)同実施例におけるエッジ検出手段の処理のフローチャート
【図9】(a)本発明の第3の実施例におけるエッジ検出手段のエッジ検出データを示す図
(b)同実施例における処理のフローチャート
【図10】本発明の第4の実施例におけるブロック結線図
【図11】同実施例における検出された線分とエッジ点を示す図
【図12】同実施例における処理のフローチャート
【図13】同実施例における処理のフローチャート
【図14】本発明の第5の実施例におけるブロック結線図
【符号の説明】
101 プリント基板
102 電子部品
103 照明装置
104 画像入力手段
105 エッジ検出手段
106 ハフ変換手段
107 角度検出手段
108 線分検出手段
109 部品位置判定手段
110 基準データ記憶手段
111 第2のハフ変換手段
112 第2の角度検出種手段
113 第2の線分検出手段
114 拡大縮小手段
301 エッジ点
302 線分
601 イメージメモリ
602 CPU
603 ワークメモリ
604 ヒストグラムメモリ
605 θ累積得票数メモリ
606 ρ累積得票数メモリ
610 画像入力端子
611 1Hシフトレジスタ
612 走査窓
613 積和演算ユニット
614 Sx出力
615 Sy出力
616 2値化閾値
607 結果格納メモリ
800 原点座標
801 検査領域
802 電子部品
803 電極部
804 水平方向走査ライン
806、808 輝度プロファイル
807 垂直方向走査ライン
809 配線パターン
810 エッジ候補点
811 立ち上がりエッジ
812 立ち下がりエッジ
813 エッジ点[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a mounting component inspection apparatus for inspecting a defective mounting state of an electronic component mounted on a printed circuit board.
[0002]
[Prior art]
Conventionally, inspection of good / defective parts such as misalignment and missing parts of components mounted on a printed circuit board has relied on human visual inspection. However, as products become smaller and lighter, components on a printed circuit board have been further miniaturized and high-density packaging has progressed. Under such circumstances, it has been almost difficult for a human to keep inspecting a very fine component mounting state for a long time while maintaining high inspection accuracy. Therefore, recently, an apparatus for inspecting a component misalignment or the like by image processing has been proposed while automation of inspection is strongly desired.
For example, “Editing of the Visual Inspection Automation Technology Review Committee:“ Examples of Visual Inspection Automation by Image Processing ”, New Technology Communications Inc. (published on April 10, 1991, 1st edition)” Many examples of automation are introduced. In the substrate mounting component inspection apparatus, the chip component is alternately illuminated from two oblique directions, the difference between the two images taken is taken to create a shadow image, the shadow image is projected in the X and Y directions, and the cumulative number of pixels From this, the center position of the part is obtained.
[0003]
[Problems to be solved by the invention]
As described above, the method of illuminating the chip component alternately from two oblique directions and taking the difference between the two images taken to create a shadow image and inspecting the chip component is relatively large and thick and the mounting density is low Is effective. However, electronic parts including chip parts are smaller and thinner as in recent years, and high-density mounting has progressed due to further miniaturization, and the thinning of parts makes it difficult to cast shadows and the distance between parts is narrow. It has become difficult to detect shadows.
[0004]
In view of the above problems, the present invention provides a mounting component inspection apparatus that detects the position and inclination of electronic components mounted with high density with a simple configuration with high accuracy.
[0005]
[Means for Solving the Problems]
In order to solve the above problems, the technical solution means of the present invention includes, firstly, an image input means for picking up an electronic component mounted on a printed circuit board, and an electronic component set in advance from a grayscale image from the image input means. An arbitrary inspection region is set from the sizes Lw and Ls of the image, and an edge detection means for detecting an edge point of the electronic component, and an edge point coordinate from the edge detection means are represented by ρ = xi · cos θ + yj · sin θ (where 0 ≦ θ A threshold value in which the number of votes is arbitrarily set in the θ direction by a Hough transforming means that develops on a ρθ plane by a Hough transform process for calculating <π) and a ρθ plane (histogram memory) developed by the Hough transforming means The number of votes equal to or greater than a is projected, and the angle of the electronic component, which is the maximum value, is calculated by calculating Pmax = Pθ + P (θ + 90 °) (where θ is 0 to 90 °) from the data projected on the θ side. On the ρθ plane from the angle detecting means for obtaining the degree θp and the Hough transforming means, the number of votes obtained on the ρ side within the range of the angle θp ± b and the angle (θp + 90 °) ± b of the electronic component from the angle detecting means Line segment detecting means for detecting parallel line segments of the short side and the long side of the electronic component from two peaks corresponding to the sizes Lw and Ls of the electronic component set in advance by the respective projection data; The angle and parallel line segments extracted on the ρθ plane by the line segment detection means are inversely transformed on the xy plane to calculate the position and angle of the electronic component, and compared with the reference position from the preset reference data storage means. Component position determining means for determining whether the allowable range is satisfied is provided.
[0006]
Second, in the edge detection means, an arbitrary inspection region is set from the electronic component sizes Lw and Ls set in advance from the grayscale image, and when detecting the edge point of the electronic component, the rising edge to the falling edge are detected. Only the edge pair close to the size Lw, Ls of the electronic component set in advance as the distance of the edge pair is detected. Thirdly, in the image input means for imaging the electronic component mounted on the printed circuit board and the edge detection means, an arbitrary inspection region is set from the electronic component sizes Lw and Ls set in advance from the grayscale image, and the electronic component When detecting the edge point, only the edge pair close to the preset size Lw, Ls of the electronic component is detected as the distance from the rising edge to the falling edge, and the electrode is calculated from the average value of the density values between the edge pairs. An edge detecting means for detecting a portion and edge point coordinates from the edge detecting means are calculated by ρ = xi · cos θ + yj · sin θ (where 0 ≦ θ <π) and Hough conversion processing is performed on the electrode portion Hough transform means for obtaining weighted votes and expanding them on the ρθ plane, and the number of votes equal to or greater than a threshold a arbitrarily set in the θ direction on the ρθ plane developed by the Hough transform means Angle detecting means for calculating the angle θp of the electronic component which is the maximum value by calculating Pmax = Pθ + P (θ + 90 °) (where θ is 0 to 90 °) from the data projected and projected on the θ side; On the ρθ plane from the Hough transforming means, the number of votes obtained is projected on the ρ side within the range of the angle θp ± b and angle (θp + 90 °) ± b of the electronic component from the angle detecting means, Line segment detection means for detecting a parallel line segment of the short side and the long side of the electronic component from two peaks corresponding to the set sizes Lw and Ls of the electronic component, and extraction on the ρθ plane by the line segment detection means A component that reversely transforms on the xy plane by calculating the position and angle of the electronic component from the set angle and the parallel line segment, and compares it with a reference position from a preset reference data storage means to determine whether it is within an allowable range Position It is provided with a means.
[0007]
Fourth, an image input unit for imaging an electronic component mounted on a printed circuit board, and an arbitrary inspection region is set from electronic component sizes Lw and Ls set in advance from the grayscale image from the image input unit. An edge detection means for detecting an edge point of a component, and a Hough transformation process for calculating an edge point coordinate from the edge detection means by ρ = xi · cos θ + yj · sin θ (where 0 ≦ θ <π). Data obtained by projecting the number of votes equal to or greater than the threshold value a arbitrarily set in the θ direction on the first Hough transforming means and the ρθ plane developed by the first Hough transforming means, and projecting to the θ side And Pmax = Pθ + P (θ + 90 °) (where θ is 0 to 90 °), the first angle detecting means for obtaining the electronic component angle θp, which is the maximum value, and the first Hough transforming means Or In the ρθ plane, the number of votes is projected on the ρ side within the range of the angle θp ± b and the angle (θp + 90 °) ± b of the electronic component from the angle detection means, and the electronic data preset by each projection data Obtained by a first line segment detecting means for detecting a temporary line segment in which the short side and the long side of the electronic component are parallel from two peaks outside the component sizes Lw and Ls, and the first line segment detecting means. Hough transform processing for computing only ρ = xi · cos θ + yj · sin θ (where 0 ≦ θ <π) only edge feature point coordinates deviated from the region surrounding the parallel line segment of the short side and long side of the electronic component The number of votes is arbitrarily set in the θ direction on the second Hough transforming unit that subtracts from the ρθ plane obtained by the first Hough transforming unit and the ρθ plane developed by the second Hough transforming unit. Project the number of votes over threshold a second angle detection means for obtaining an angle θp of the electronic component which is the maximum value by calculating Pmax = Pθ + P (θ + 90 °) (where θ is 0 to 90 °) from the data projected on the θ side; In the ρθ plane from the second Hough transform unit, the number of votes is projected on the ρ side within the range of the angle θp ± b and the angle (θp + 90 °) ± b of the electronic component from the second angle detection unit, Second line segment detection means for detecting parallel line segments of the short side and the long side of the electronic component from two peaks corresponding to the sizes Lw and Ls of the electronic component set in advance in each projection data; From the angle and the parallel line segment extracted on the ρθ plane by the line segment detection means of 2, the position and angle of the electronic component are inversely transformed on the xy plane and the reference position from the preset reference data storage means is calculated. Compared and within tolerance It is provided with a a determining part position determining means.
[0008]
Fifth, prior to the edge detection means, an arbitrary inspection region is set from the preset electronic component sizes Lw and Ls for the grayscale image from the image input means, and processing is performed regardless of the electronic component size. An enlargement / reduction means is provided so that the image size is constant, and after the enlargement / reduction, the edge point of the electronic component is detected.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
According to the present invention, first, an electronic component mounted on a printed circuit board is imaged, an arbitrary inspection area is set from the size Lw and Ls of the electronic component set in advance from the grayscale image, and an edge of the electronic component is detected. To do. The obtained edge point coordinates are projected on the ρθ plane developed by the Hough transformation process, and the number of votes equal to or greater than the threshold value a arbitrarily set in the θ direction is projected, and the maximum value of the data projected on the θ side is projected. An angle θp of an electronic component is obtained, and the number of votes is projected on the ρ side within the range of the angle θp ± b and the angle (θp + 90 °) ± b, and the size Lw of the electronic component set in advance by each projection data, A parallel line segment of the short side and the long side of the electronic component is detected from the two peaks that coincide with Ls. From the extracted angle and the parallel line segment, inverse transformation is performed on the xy plane, the position and angle of the electronic component are calculated, and compared with a reference position from a preset reference data storage means to determine whether it is within an allowable range. This makes it possible to detect electronic components mounted at high density with high accuracy, and even if some of the electronic components are stained or oxidized, the angle detection range is wide and the position can be detected with high accuracy. it can.
[0010]
Second, in the edge detection means, an arbitrary inspection area is set from the electronic component sizes Lw and Ls set in advance from the grayscale image, and when detecting the edge of the electronic component, the edge from the rising edge to the falling edge is detected. By detecting only the edge pair whose distance between the pair is close to the preset sizes Lw and Ls of the electronic component, detection of peripheral edges other than the electronic component can be suppressed, and the position can be detected with high accuracy.
[0011]
Third, in the edge detection means, an arbitrary inspection area is set based on the electronic component sizes Lw and Ls set in advance from the grayscale image, and when detecting the edge point of the electronic component, the rising edge to the falling edge are detected. Only edge pairs close to the electronic component sizes Lw and Ls set in advance are detected as the distance between the edge pairs, and the electrode portion is detected from the average value of the density values between the edge pairs. When performing Hough conversion processing from edge point coordinates, weights are obtained by weighting the electrode parts, and the result is developed on the ρθ plane to suppress erroneous detection of line segments due to edge points around parts and inside parts with letters. The position can be detected with high accuracy.
[0012]
Fourth, in the ρθ plane from the first Hough transforming unit, the number of votes obtained on the ρ side within the range of the angle θp ± b and the angle (θp + 90 °) ± b of the electronic component from the first angle detecting unit, respectively. Is detected from the regions surrounding the line segment by detecting parallel line segments of the short side and the long side of the electronic component from the two peaks outside the size Lw and Ls of the electronic component preset by each projection data. Only the outlying edge point coordinates are subjected to Hough conversion processing and subtracted from the ρθ plane obtained by the first Hough conversion means. From the subtracted ρθ plane, the number of votes obtained in the θ direction is projected in the θ direction to obtain the angle θp of the electronic component that is the maximum value of the data projected on the θ side, and the angle θp ± b and the angle Within the range of (θp + 90 °) ± b, the number of votes obtained is projected on the ρ side, and the short side and the long side of the electronic component from the two peaks corresponding to the sizes Lw and Ls of the electronic component set in advance by the respective projection data By detecting parallel line segments, the position can be detected with high accuracy without being affected by the periphery of the component.
[0013]
Fifth, when the edge detection means detects the edge point of the electronic component from the grayscale image from the image input means, an arbitrary inspection region is set from the preset sizes Lw and Ls of the electronic component, and the electronic component By detecting the edge point of an electronic component after scaling it so that the image size to be processed is constant regardless of the size of the image, the small component apparently increases the number of edge points by the enlargement process, and the position accuracy is improved. The parts can be reduced in the number of edge points by the reduction process to improve the processing speed.
[0014]
【Example】
(Example 1)
Hereinafter, a first embodiment of the present invention will be described with reference to FIG.
[0015]
FIG. 1 is a block diagram showing a first embodiment of a mounting component inspection apparatus according to the present invention. In FIG. 1, 101 is a printed circuit board, 102 is an electronic component, 103 is an illumination device, 104 is an image input unit such as a CCD camera, and 105 is an edge detection unit that detects an edge point of the electronic component from a grayscale image from the image input unit. , 106 is a Hough transforming means that develops on the ρθ plane by Hough transform processing of the edge point coordinates, 107 is a ρθ plane (histogram memory), and the number of votes that is equal to or larger than the threshold value a arbitrarily set in the θ direction , And angle detection means 108 for obtaining the angle θp of the electronic component which is the maximum value of the data projected on the θ side, 108 is the number of votes obtained on the ρ side within the range of angle θp ± b and angle (θp + 90 °) ± b, respectively. , And the parallel segments of the short side and long side of the electronic component are detected from the two peaks corresponding to the preset sizes Lw and Ls of the electronic component. The line segment detecting means 109, which converts the extracted angle and parallel line segment back onto the xy plane, calculates the position and angle of the electronic component, and compares it with the reference position from the preset reference data storage means 110. It is a part position determination means for determining whether the tolerance is within the allowable range.
[0016]
The operation will be described below with reference to FIG.
The image input means 104 illuminates the electronic component 102 mounted on the printed circuit board 101 with the illumination device 103 and images it with a CCD camera or the like. The edge detection unit 105 detects the edge point of the electronic component 102 from the grayscale image from the image input unit 104, and many methods have been proposed as an edge detection method. For example, “Tsuchiya and Fukada:” Image Processing is described in “Chapter 3 Basic Algorithm of Image Processing”, pp 50-86, Corona (1990) ”. In this embodiment, it is assumed that an edge is obtained for each direction by using a well-known Sobel operator and using a direction mask shown in FIGS. When each element of the direction mask of FIGS. 2A and 2B is expressed as shown in FIG. 2C, the x direction is obtained from (Equation 1) and the y direction is obtained from (Equation 2).
[0017]
[Expression 1]
Figure 0003711599
[0018]
[Expression 2]
Figure 0003711599
The Hough transforming unit 106 calculates the coordinates of the edge points from the edge detecting unit 105 by (Equation 3) and develops them on the ρθ plane (histogram memory) by Hough transform processing.
[0019]
[Equation 3]
Figure 0003711599
As for the Hough transform processing, “U.S. Patents: 3,069,654 (1962)” and “Takashi Matsuyama, Yamato Usui:“ Hough transform and pattern matching ”, Information Processing Society of Japan, Vol. 30, Since it is described in detail in No. 9, pp1035-1046 (1989), the outline will be explained here.
[0020]
The principle of the Hough transform will be described with reference to FIGS. FIG. 4A shows the edge points on the xy plane, and FIG. 4B shows the ρθ plane after the Hough transform. A straight line passing through the edge point 301 (xi, yi) in FIG. 5A can be expressed as yi = axi + b. The coordinates of the edge point are expressed by (Equation 3) as the vertical θ and the signed distance ρ from the origin, and as shown in the parameter space of FIG. 0 And θ 0 Becomes a line segment 302. Also, the transformation to the xy coordinate system can be inversely transformed by (Expression 4).
[0021]
[Expression 4]
Figure 0003711599
Next, the angle detection unit 107 will be described with reference to FIGS. FIG. 4A shows the ρθ plane (histogram memory) converted by the Hough transform unit 106. FIG. 4B shows an accumulation of only the number of votes whose number of votes P is equal to or greater than the threshold a on the ρθ plane of FIG. 4A. In FIG. 4B, the maximum cumulative vote number Pmax is obtained by (Equation 5), and the angle of the electronic component at that time is detected as θp. In FIG. 4B, angles θ1 and θ2 (θ1 + 90 °) indicated by dotted lines are obtained as the maximum cumulative number of votes obtained. Further, the maximum cumulative vote number Pmax may be obtained by (Equation 6).
[0022]
[Equation 5]
Figure 0003711599
[0023]
[Formula 6]
Figure 0003711599
Next, the line segment detection means 108 will be described with reference to FIG. The line segment detection means 108 is based on the angle θp (angle θ1 or angle θ2) detected by the angle detection means 107 and is in the range of angle θ1 ± b (0 <b <45) in the ρθ plane of FIG. Only the number of votes is accumulated in the ρ direction, and the maximum point of the maximum accumulated number of votes is obtained. Further, the electronic component sizes Lw and Ls set in advance are read from the reference data storage unit 110, and the two local maximums are such that the distances between the obtained local maximum points coincide with the long side size Lw or the short side size Ls. Detect points. FIG. 4C shows ρ (θ1) direction accumulated votes and ρm1 and ρm2 representing the obtained long-side line segments by dotted lines. Similarly, the number of votes is accumulated in the ρ direction only in the range of the angle θ2 ± b, and the maximum point of the maximum accumulated number of votes is obtained. Furthermore, two local maximum points are detected in which the distances of the determined local maximum points coincide with the long side size Lw or the short side size Ls of the electronic component set in advance. In FIG. 4D, ρn1 and ρn2 representing the number of accumulated votes in the ρ (θ2) direction and the obtained short side line segment are indicated by dotted lines. As shown in FIG. 4C and FIG. 4D, it is possible to detect the parallel lines of the short side and the long side of the electronic component. In this case, θ2 represents θp.
[0024]
Next, the component position determination means 109 will be described with reference to FIG. FIG. 5 shows a state in which the electronic component is on the xy plane. The component position determination unit 109 obtains the position (xi, yi, θp) of the electronic component from the line segments ρm1, ρm2, ρn1, and ρn2 of the electronic component detected by the line segment detection unit 108 and the angle θp (Equation 7). Compared with the reference position (xr, yr, θr) of the electronic component from the reference data storage means 110, it is determined whether it is within the allowable range.
[0025]
[Expression 7]
Figure 0003711599
The operation of the first embodiment of the present invention has been described with reference to FIG. 1. Specifically, as shown in FIG. 6A, the image data picked up by the image input means 104 is temporarily stored in the image memory 601. However, it is also possible to perform all processing from the edge detection means 105 by the CPU system. In FIG. 6A, 601 is an image memory for temporarily storing image data captured by the image input means 104, 602 is a CPU (central processing unit) that performs arithmetic processing, and 603 stores intermediate results of the arithmetic processing. 604 is a histogram memory for storing the number of votes obtained in the Hough transform process, 605 is a θ cumulative number of votes memory for storing the cumulative number of votes in the θ direction, and 606 is a ρ cumulative number of votes for storing the cumulative number of votes in the ρ direction. A number memory 607 is a result storage memory for storing the component position detection result and the determination result.
[0026]
Next, each component will be described using the processing flow of FIG.
1) Start
(A): Start
(B): The reference data storage means 110 is previously positioned for each component prior to inspection.
(Xr, yr, θr), inspection area (xs, ys, xe. Ye), allowable range, inspection parameter, and the like are registered and read out as necessary for each process.
2) Image input means 104
(C): The electronic component 102 mounted on the printed circuit board 101 is illuminated by the illumination device 103, captured by the CCD camera, and stored in the image memory 601.
3) Edge detection means 105
(D): The position / inspection area of the target part stored in the reference data storage unit 110 is read.
[0027]
(E): An edge point is detected in the inspection area on the image memory 601 and the edge point data is stored in the work memory 603.
4) Hough conversion means 106
(F): The coordinates of the edge point are read from the work memory 603, the Hough transform is calculated by the equation (3), and stored in the histogram memory 604.
[0028]
(G): The presence or absence of an edge point is determined in the work memory 603, and the process of (f) is repeated until there is no edge point.
5) Angle detection means 107
(H): Only the number of votes in which the number of votes in the histogram memory 604 is equal to or greater than the threshold a is accumulated for each θ and stored in the θ accumulated number of votes memory 605.
[0029]
(I): The maximum cumulative vote number Pmax is obtained from (Formula 5) from the cumulative vote number in the θ cumulative vote number memory 605, and the electronic part having the maximum value is obtained. Goods Obtained as an angle θp (angle θ1 = θp, angle θ2 = θ1 + 90).
6) Line segment detection means 108
(J): From the angles θ1 and θ2 of the electronic components obtained by the angle detection means 107, the number of votes is accumulated individually in the ρ direction only in the range of the angle θ1 ± b and the angle θ2 ± b, and is stored in the ρcumulative vote count memory 606. Remember.
[0030]
(K): The maximum point of the maximum cumulative vote number is obtained from the cumulative vote number in the ρ cumulative vote number memory 606, and the long side size Lw or the short side of the electronic component in which the distances of the obtained plural maximum points are set in advance Long side line segments ρm1 and ρm2 and short side line segments ρn1 and ρn2 are detected from two sets of local maximum points that match the size Ls.
7) Part position determining means 109
(L): The position of the electronic component according to (Equation 7) from the line segments ρm1, ρm2, ρn1, ρn2 and the angle θp of the electronic component detected by the line segment detecting means 108
(Xi, yi, θp) is obtained.
[0031]
(M): Compared with the reference position (xr, yr, θr) of the electronic component from the reference data storage means 110, it is determined whether it is within the allowable range, and the result is stored in the result storage memory 607.
8) Finish
(N): The presence / absence of the target part registered in the reference data storage unit 110 is determined. If yes, the process proceeds to (d), and if not, the process proceeds to (o).
[0032]
(O): End
Further, as shown in FIG. 6B, the edge detecting means 105 and the Hough transforming means 106 are configured with hardware because they require processing time, and the complicated angle detecting means 107, line segment detecting means 108, and component position determination are performed. The means 109 may be processed by software using a CPU system.
Therefore, the hardware implementation of the edge detection unit 105 and the Hough conversion unit 106 which are different between FIG. 6A and FIG. 6B will be described.
First, the edge detection unit 105 will be described. As described above, the edge detection means 105 detects each direction and will be described with reference to a block diagram in FIG. In FIG. 6C, 610 is an image input terminal, 611 is a shift register for one line, 612 is a 3 × 3 scanning window, 613 is a product-sum operation unit, and 614 and 615 are edge outputs. The grayscale image from the image input means 104 is input from the image input terminal 610, and the scanning window is scanned by the 1H shift register 611 and the 3 × 3 scanning window 612 for two lines, and the 9-pixel data is sent to the product-sum operation unit 613. Then, Sx and Sy are calculated by (Equation 1) and (Equation 2), compared with the binarized threshold signal 616, and an edge point Sx614 and an edge point Sy615 are output.
[0033]
Next, the Hough conversion unit 106 will be described. As a method of realizing the Hough conversion means 106 by hardware, there is a method of realizing the cos θ portion and the sin θ portion of the equation (3) by using a ROM table. “Hanahara et al .:“ Real-time Hough conversion processor ”, Showa The description will be omitted because it is described in the 1960 National Conference on Information and Systems, IEICE, 92 (1985).
[0034]
(Example 2)
Hereinafter, a second embodiment of the present invention will be described with reference to FIGS.
In the second embodiment of the present invention, in the edge detection means 105 in the first embodiment of the present invention, detection of edge points around the electronic component is suppressed, and the component position detection accuracy by the Hough transform means is improved. is there. The Hough transform process has very good properties in line segment detection, but is also a factor that has been impeded from practical use because it is vulnerable to ambient noise. Therefore, it is very important to suppress detection of edge points around the electronic component and perform high-quality edge detection, which will be described below with reference to FIG.
[0035]
8A, reference numeral 800 denotes an origin coordinate in the inspection area, 801 denotes an inspection area, 802 denotes a part, 803 denotes an electrode portion of the part, 809 denotes a wiring pattern around the part, and 804 scans the inspection area horizontally. A horizontal scanning line 807 at this time indicates one vertical scanning line when the inspection area is vertically scanned. Reference numerals 806 and 808 denote luminance profiles when scanned horizontally and vertically.
[0036]
The edge detection means 105 in the second embodiment of the present invention first scans the inspection region 801 in the horizontal direction sequentially from the origin coordinates 800 as indicated by a horizontal scanning line 804 to obtain a luminance profile 806. A rising edge 812 and a falling edge 811 are detected from the luminance profile 806 for each horizontal scanning line and set as edge point candidates. Edge point candidates are detected for each horizontal scanning line, the distance of the falling edge point candidate is obtained with respect to the rising edge point candidate, and an edge pair close to the preset electronic component sizes Lw and Ls is selected as the edge point Therefore, in the case of the luminance profile 806, three types kw1, kw2, and kw3 are detected as candidates, and kw1 closest to the electronic component size Lw is selected. This process is performed for each horizontal scanning line.
[0037]
Similarly, in the vertical direction, the luminance profile 808 is obtained by sequentially scanning in the vertical direction from the origin coordinate 800 as in the vertical scanning line 807. A rising edge 812 and a falling edge 811 are detected from the luminance profile 808 for each vertical scanning line, and set as edge point candidates. Edge point candidates are detected for each vertical scanning line, the distance of the falling edge point candidate is obtained with respect to the rising edge point candidate, and an edge pair close to the preset electronic component sizes Lw and Ls is selected as the edge point Therefore, in the case of the brightness profile 808, three types ks1, ks2, and ks3 are detected as candidates, and ks2 closest to the size Ls of the electronic component is selected.
Further, here, the distance between the falling edge point candidates is obtained with respect to the rising edge point candidates in both the horizontal direction and the vertical direction, and an edge pair close to the preset electronic component sizes Lw and Ls is selected as the edge point. However, when the position where the electronic component is mounted is known in advance, it is also possible to select only edge pairs close to the size Lw (or Ls) in that direction.
[0038]
The processing flow of the second embodiment of the present invention is the same as that of FIG. 7, but only the edge detection means 105 different from that of FIG. 7 is shown in FIG. 8 (b).
[0039]
The above processing is performed for each horizontal direction and vertical direction, edge points 813 are detected as shown in FIG. 8A, and edge point candidates detected in the wiring pattern 809 inside or around the electronic component are deleted. It is possible to detect only extremely high-quality edge points only on the outer periphery of the electronic component. As a result, the subsequent component position detection by the Hough transform can be detected with high accuracy and stability, and the reliability can be improved.
[0040]
(Example 3)
The third embodiment of the present invention will be described below with reference to the drawings.
The third embodiment of the present invention is particularly effective for a part having a black body part color of an electronic part. Since the body part color is black and there is no luminance difference from the surroundings, edge detection cannot be performed. In some cases, only the edge points are detected, and even when the cumulative number of votes is obtained in the Hough transform, the maximum point is difficult to detect and the correct line segment may not be detected. In order to improve this, the detection accuracy is improved by facilitating the maximum point in the cumulative number of votes by assigning a flag to the edge point of the electrode part at the time of Hough transform and weighting it.
[0041]
The third embodiment of the present invention differs from the first embodiment in the operation of the edge detecting means 105 and the Hough transforming means 106. In the edge detecting means 105, the edge detection is performed by setting electronic component sizes Lw and Ls set in advance. An arbitrary inspection area is set, edge candidate points of electronic parts are detected, and the distance between the edge pair from the rising edge to the falling edge is detected only for edge pairs close to the preset electronic component sizes Lw and Ls. Further, the electrode part is detected from the average value of the density values between the edge pairs. In the Hough transforming unit 106, when the Hough transform processing is performed from the edge point coordinates from the edge detecting unit 105 by the formula (3), the electrode portion is weighted to obtain a vote and developed on the ρθ plane. .
[0042]
With respect to the third embodiment of the present invention, the edge detecting means 105 and the Hough transforming means 106 will be described with reference to FIGS. 8 (a), 9 (a) and 9 (b).
As shown in FIG. 8A, the edge detection unit 105 first scans the inspection region 801 in the horizontal direction sequentially from the origin coordinates 800 as indicated by a horizontal scanning line 804 to obtain a luminance profile 806. A rising edge 812 and a falling edge 811 are detected from the luminance profile 806 for each horizontal scanning line and set as edge point candidates. Edge point candidates are detected for each horizontal scanning line, the distance of the falling edge point candidate is obtained with respect to the rising edge point candidate, and an edge pair close to the preset electronic component sizes Lw and Ls is selected as the edge point Therefore, in the case of the luminance profile 806, three types kw1, kw2, and kw3 are detected as candidates, and kw1 closest to the electronic component size Lw is selected. This process is performed for each horizontal scanning line.
[0043]
Similarly, in the vertical direction, the luminance profile 808 is obtained by sequentially scanning in the vertical direction from the origin coordinate 800 as in the vertical scanning line 807. A rising edge 812 and a falling edge 811 are detected from the luminance profile 808 for each vertical scanning line, and set as edge point candidates. Edge point candidates are detected for each vertical scanning line, the distance of the falling edge point candidate is obtained with respect to the rising edge point candidate, and an edge pair close to the preset electronic component sizes Lw and Ls is selected as the edge point Therefore, in the case of the brightness profile 808, three types ks1, ks2, and ks3 are detected as candidates, and ks2 closest to the size Ls of the electronic component is selected. Further, the average luminance between the selected edge pairs is obtained, and the coordinates and average luminance values of the rising edge point and the falling edge point are stored in the work memory 603 in a table format as shown in FIG. If the average luminance value is greater than or equal to the preset luminance value Brs, the electrode flag is regarded as “1” and the electrode flag is set to “1”. However, FIG. 9B shows only a part in the vertical direction for convenience of explanation, but in reality, similar edge information is detected in the horizontal direction and the vertical direction.
[0044]
The above processing is performed for each horizontal direction and vertical direction, and edge point detection as shown in FIG. 9A is performed.
The Hough transforming unit 106 reads the coordinates of the edge point and the electrode flag from the work memory 603, calculates the Hough transform processing by the equation (3), and if the electrode flag is “1”, obtains two points, and the electrode flag When “0” is “0”, one point is obtained and stored in the histogram memory 604.
[0045]
Further, the processing flow of the third embodiment of the present invention is the same as that of FIG. 7, but only the edge detection means 105 and the Hough conversion means 106 which are different are shown in FIG. 9B as the processing flows (e), (f) and ( g).
In the third embodiment of the present invention, the average luminance was detected only on the short side (vertical direction in FIG. 8A) side of the electronic component, but this may be performed on both the short side and the long side. The reason why only the sides are detected is that the number of edge points on the short side is particularly small in the black electronic component of the body part.
[0046]
Further, when the electrode part is determined from the average brightness on the long side, it can easily be determined as the electrode part from the average brightness value between kw2 and kw3 in the brightness profile 806 shown in FIG. .
[0047]
(Example 4)
The fourth embodiment of the present invention will be described below with reference to the drawings.
The fourth embodiment of the present invention aims to prevent a line segment from being erroneously recognized due to a wiring pattern, silk printing, and symbols described in the electronic component body portion around the electronic component. This will be described below with reference to FIG.
[0048]
FIG. 10 is a block diagram showing an embodiment of the mounted component inspection apparatus according to the fourth embodiment of the present invention. In FIG. 10, 101 is a printed circuit board, 102 is an electronic component, 103 is an illumination device, 104 is an image input unit such as a CCD camera, and 105 is an edge detection unit that detects an edge point of the electronic component from a grayscale image from the image input unit. , 106 is a first Hough transform unit that develops on the ρθ plane by a Hough transform process for calculating ρ from the edge point coordinates by (Equation 3), 107 is a ρθ plane (histogram memory), and votes in the θ direction First angle detection is performed by projecting the number of votes that is equal to or greater than the threshold value a arbitrarily set, calculating Pmax from the data projected on the θ side by (Equation 5), and obtaining the electronic component angle θp, which is the maximum value. Means 108 projects the number of votes on the ρ side within the range of the angle θp ± b and angle (θp + 90 °) ± b of the electronic component, and the size of the electronic component preset by each projection data w, first line segment detecting means for detecting parallel lines of the short side and long side of the electronic component from two peaks outside Ls, 111 is a line segment obtained by the first line segment detecting means 108 A second Hough transform means for performing a Hough transform process for calculating ρ from the edge point coordinates other than the region surrounded by (Equation 3) and subtracting from the ρθ plane, 112 is a ρθ plane (histogram memory) Then, the number of votes equal to or greater than the threshold value a arbitrarily set in the θ direction is projected, Pmax is calculated from the data projected on the θ side by (Equation 5), and the angle θp of the electronic component which is the maximum value is calculated. The second angle detection means 108 to be obtained projects the number of votes on the ρ side within the range of the angle θp ± b and the angle (θp + 90 °) ± b of the electronic component, and the electronic component preset by each projection data Two pins that match the sizes Lw and Ls of The second line segment detecting means 109 for detecting parallel lines of the short side and the long side of the electronic component from the line 109 is reverse-transformed on the xy plane from the extracted angle and the parallel line segment, and the position of the electronic component This is a component position determination means for calculating an angle and comparing with a reference position from a reference data storage means 110 set in advance to determine whether it is within an allowable range.
[0049]
The components of the fourth embodiment of the present invention have been described above with reference to FIG. 10. Specifically, as in the first embodiment of the present invention, as shown in FIG. It is also possible to temporarily store the image data picked up in the image memory 601 and perform processing from the edge detection means 105 by the CPU system. In FIG. 6A, 601 is an image memory for temporarily storing image data captured by the image input means 104, 602 is a CPU (central processing unit) that performs arithmetic processing, and 603 stores intermediate results of the arithmetic processing. 604 is a histogram memory for storing the number of votes obtained in the Hough transform process, 605 is a θ cumulative number of votes memory for storing the cumulative number of votes in the θ direction, and 606 is a ρ cumulative number of votes for storing the cumulative number of votes in the ρ direction. A number memory 607 is a result storage memory for storing the component position detection result and the determination result.
[0050]
Next, the processing flow is shown in FIGS. 12 and 13, and each component will be described.
1) Start
(A): Start
(B): The reference data storage means 110 registers a position (xr, yr, θr), an inspection area (xs, ys, xe. Ye), an allowable range, an inspection parameter, and the like for each part in advance before the inspection. Data is read as necessary for each process.
2) Image input means 104
(C): The electronic component 102 mounted on the printed circuit board 101 is illuminated by the illumination device 103, captured by the CCD camera, and stored in the image memory 601.
3) Edge detection means 105
(D): The position / inspection area of the target electronic component stored in the reference data storage unit 110 is read.
[0051]
(E): An edge point is detected in the inspection area on the image memory 601 and the edge point data is stored in the work memory 603.
4) First Hough transforming means 106
(F): The coordinates of the edge point are read from the work memory 603, the Hough transform is calculated by the equation (3), and stored in the histogram memory 604.
[0052]
(G): The presence or absence of an edge point is determined in the work memory 603, and the process of (f) is repeated until there is no edge point.
5) First angle detection means 107
(H): Only the number of votes in which the number of votes in the histogram memory 604 is equal to or greater than the threshold a is accumulated for each θ and stored in the θ accumulated number of votes memory 605.
[0053]
(I): The maximum cumulative number of votes Pmax is obtained from (Formula 5) from the cumulative number of votes in the θ cumulative number of votes memory 605, and the maximum value is obtained as an angle θp of electronic parts (angle θ1 = θp, angle θ2 = θ1 + 90). .
6) First line segment detection means 108
(J): From the angles θ1 and θ2 of the electronic components obtained by the angle detection means 107, the number of votes is accumulated individually in the ρ direction only in the range of the angle θ1 ± b and the angle θ2 ± b, and is stored in the ρcumulative vote count memory 606. Remember.
[0054]
(K): The maximum point of the maximum cumulative number of votes is obtained from the cumulative number of votes in the ρ cumulative number of votes memory 606, and the long side size Lw or the short side of the electronic component in which the distances of the obtained plurality of maximum points are preset. Long-side line segments ρm1 ′ and ρm2 ′ and short-side line segments ρn1 ′ and ρn2 ′ are detected from two sets of local maximum points outside the size Ls.
7) Second Hough transforming means 111
(L): An edge point deviated from the range surrounded by the long-side line segments ρm1 ′ and ρm2 ′ and the short-side line segments ρn1 ′ and ρn2 ′ obtained by the first line-segment detecting means 108 is the work memory 603. The coordinates of the edge point are read out, Hough transform is calculated by equation (3), read from the histogram memory 604, subtracted from the number of votes obtained, and stored.
[0055]
(M): The presence / absence of an edge point is determined in the work memory 603, and the process of (l) is repeated until there is no edge point.
8) Second angle detection means 112
(N): Only the number of votes in which the number of votes in the histogram memory 604 is equal to or greater than the threshold a is accumulated for each θ and stored in the θ accumulated number of votes memory 605.
[0056]
(O): The maximum cumulative number of votes Pmax is obtained from (Number 5) from the cumulative number of votes in the θ cumulative number of votes memory 605, and the angle θp of the maximum point (angle θ1 = θp, angle θ2 = θ1 + 90) is obtained.
9) Second line segment detection means 113
(P): From the angles θ1 and θ2 obtained by the angle detection means 107, the number of votes is accumulated individually in the ρ direction only in the range of the angle θ1 ± b and the angle θ2 ± b, and stored in the ρcumulative vote number memory 606.
[0057]
(Q): The maximum point of the maximum cumulative number of votes is obtained from the cumulative number of votes in the ρ cumulative number of votes memory 606, and the long side size Lw or the short side of the electronic component in which the distances of the obtained maximum points are preset. Long side line segments ρm1 and ρm2 and short side line segments ρn1 and ρn2 are detected from two sets of local maximum points that match the size Ls.
10) Part position determining means 109
(R): The position (xi, yi, θp) of the electronic component is obtained from (Equation 7) from the line segments ρm1, ρm2, ρn1, ρn2 and the angle θp detected by the second line segment detector 113.
[0058]
(S): Compared with the reference position (xr, yr, θr) of the electronic component from the reference data storage means 110, it is determined whether it is within the allowable range, and the result is stored in the result storage memory 607.
8) Finish
(T): The presence / absence of the target part registered in the reference data storage unit 110 is determined. If yes, the process proceeds to (d), and if not, the process proceeds to (u).
[0059]
(U): End
Further, in the second Hough transform unit 111, the long side line segments ρm1 ′ and ρm2 ′ obtained by the first line segment detection unit 108 deviate from the range surrounded by the short side line segments ρn1 ′ and ρn2 ′. The coordinate of the edge point is read from the work memory 603, the Hough transform is performed, the histogram memory 604 is read and subtracted from the number of votes, and the long edge obtained by the first line segment detection unit 108 is stored. It goes without saying that the same result can be obtained even if the Hough transform process is newly performed on the range surrounded by the line segments ρm1 ′ and ρm2 ′ and the short line segments ρn1 ′ and ρn2 ′.
[0060]
Next, a processing example of the fourth embodiment of the present invention will be described with reference to FIGS. FIG. 11A shows the edge points obtained by the edge detection means 105 (note that only the edge points in the vertical direction are shown for ease of explanation) and the first line segment detection means. The obtained line segments ρm1 ′, ρm2 ′, ρn1 ′, ρn2 ′ are shown. As the line segment obtained at this time, a line segment ρm1 ′ is detected because a line segment outside the size of the electronic component is selected by the wiring pattern 121. FIG. 11B shows line segments ρm1, ρm2, ρn1, and ρn2 obtained by the second line segment detection. It can be seen that the outer shape of the electronic component 120 is accurately detected. In other words, as is apparent from the difference in the number of edge points on the wiring pattern and the electronic component in FIGS. 11A and 11B, erroneous detection is performed by the wiring pattern 121 or the like in one Hough conversion process. This also causes a decrease in the position detection accuracy of the electronic component, and the detection position accuracy of the electronic component can be improved by performing the Hough transform process in two steps.
[0061]
Needless to say, the edge detection unit of the second embodiment or the edge detection unit and the Hough transform unit of the third embodiment may be used in the configuration of the present embodiment.
[0062]
(Example 5)
The fifth embodiment of the present invention will be described below with reference to the drawings.
In the fifth embodiment of the present invention, the size of electronic components mounted on a printed circuit board varies, and a large-sized electronic component has a large number of edge points and takes a long processing time, but a small component has a small number of edge points. There is a problem that the accuracy cannot be secured, and the present invention solves the problem of processing time and detection accuracy by scaling the image data so that the size of the electronic component is apparently constant. A block configuration diagram is shown and described.
[0063]
The configuration shown in FIG. 14 is the one in which the enlargement / reduction unit 114 is inserted between the CCD camera 104 and the edge detection unit 105 in the configuration of the first embodiment of the present invention, so only the enlargement / reduction unit 114 will be described.
[0064]
The enlargement / reduction means 114 enlarges / reduces to a normalization size km, kn set in advance by the size long side Lw and short side Ls of the electronic component set in advance, and the enlargement / reduction rate is km / Lw, kn. / Ls. The enlargement / reduction processing is a well-known method as an image processing method. As the simplest method, enlargement / reduction is a power of 2 times, 4 times, 1/2 times, 1/4 times, etc. This is a method of selecting a close enlargement / reduction ratio.
[0065]
Further, as a method of performing enlargement / reduction with higher accuracy, there is an enlargement / reduction method using affine transformation, which can be calculated by (Equation 8).
[0066]
[Equation 8]
Figure 0003711599
As described above, the configuration of the first embodiment has been described. However, the enlargement / reduction unit of the present embodiment may be used for the configuration of the fourth embodiment.
[0067]
【The invention's effect】
As described above, the effect of the present invention is as follows. First, an image of an electronic component mounted on a printed circuit board is imaged, and an arbitrary inspection region is set from the size Lw and Ls of the electronic component set in advance from the grayscale image. Detect edges of electronic components. From the obtained edge point coordinates, on the ρθ plane developed by the Hough transform process, the number of votes obtained by projecting the number of votes equal to or greater than the threshold a arbitrarily set in the θ direction is projected, and the maximum value of the data projected on the θ side An angle θp of an electronic component is obtained, and the number of votes is projected on the ρ side within the range of the angle θp ± b and the angle (θp + 90 °) ± b, and the size Lw of the electronic component set in advance by each projection data, A parallel line segment of the short side and the long side of the electronic component is detected from the two peaks that coincide with Ls. From the extracted angle and the parallel line segment, inverse transformation is performed on the xy plane, the position and angle of the electronic component are calculated, and compared with a reference position from a preset reference data storage means to determine whether it is within an allowable range. As a result, even electronic components mounted at high density can be detected with high accuracy, and even if some of the electronic components are stained or oxidized and the gray level is lowered, the angle detection range is wide and the position can be accurately detected. It is possible to realize a mounted component inspection apparatus for detection.
[0068]
Second, in the edge detection means, an arbitrary inspection area is set from the electronic component sizes Lw and Ls set in advance from the grayscale image, and when detecting the edge of the electronic component, the distance from the rising edge to the falling edge By detecting only edge pairs close to the preset sizes Lw and Ls of the electronic component, it is possible to suppress the edge detection around the component and realize a mounting component inspection apparatus capable of detecting the component position with high accuracy. It has become possible.
[0069]
Third, in the edge detection means, an arbitrary inspection area is set based on the electronic component sizes Lw and Ls set in advance from the grayscale image, and when detecting the edge point of the electronic component, the rising edge to the falling edge are detected. When detecting only edge pairs whose distances are close to the electronic component sizes Lw and Ls set in advance, detecting an electrode part from the average value of density values between the edge pairs, and performing Hough conversion processing on the edge point coordinates In addition, it is possible to realize a mounted component inspection apparatus that can detect the position with high accuracy by suppressing the edge point detection in the periphery of the component and inside the component with letters by weighting the electrode portion and obtaining a vote on the ρθ plane.
[0070]
Fourth, on the ρθ plane from the first Hough transform means, the number of votes is projected on the ρ side within the range of the angle θp ± b and the angle (θp + 90 °) ± b of the electronic component from the angle detection means. , An edge deviated from the region surrounding the line segment by detecting parallel line segments of the short side and the long side of the electronic component from two peaks outside the sizes Lw and Ls of the electronic component set in advance by the respective projection data Only the point coordinates are subjected to Hough conversion processing, and are subtracted from the ρθ plane obtained by the first Hough conversion means. From the subtracted ρθ plane, the number of votes obtained in the θ direction is projected in the θ direction to obtain the angle θp of the electronic component that is the maximum value of the data projected on the θ side, and the angle θp ± b and the angle Within the range of (θp + 90 °) ± b, the number of votes obtained is projected on the ρ side, and the short side and the long side of the electronic component from the two peaks corresponding to the sizes Lw and Ls of the electronic component set in advance by the respective projection data By detecting line segments with parallel sides, it is possible to realize a mounted component inspection apparatus that can detect the position with high accuracy without being affected by the periphery of the component.
[0071]
Fifth, when the edge detection means detects the edge point of the electronic component from the grayscale image from the image input means, an arbitrary inspection region is set from the preset sizes Lw and Ls of the electronic component, and the electronic component By detecting the edge point of an electronic component after scaling it so that the image size to be processed is constant regardless of the size of the image, the small component apparently increases the number of edge points by the enlargement process, and the position accuracy is improved. It is possible to realize a mounted component inspection apparatus that reduces the number of edge points by reducing processing and improves processing speed.
[Brief description of the drawings]
FIG. 1 is a block connection diagram of a mounting component inspection apparatus according to a first embodiment of the present invention.
FIG. 2 is a diagram showing a mask configuration of edge detection means in the same embodiment;
FIG. 3 is a diagram showing the principle of the Hough conversion means in the same embodiment
FIG. 4 is a diagram showing the cumulative number of votes obtained by the angle detection means and the line segment detection means in the same embodiment.
FIG. 5 is a diagram showing position coordinates of a part position determination unit in the same embodiment;
FIG. 6A is a CPU system configuration diagram in the embodiment.
(B) Another CPU system configuration diagram in the embodiment
(C) Block connection diagram of edge detection means in the embodiment
FIG. 7 is a flowchart of processing in the embodiment.
FIG. 8A is a diagram showing processing of edge detection means in the second exemplary embodiment of the present invention.
(B) Flow chart of processing of edge detection means in the embodiment
FIG. 9A is a diagram showing edge detection data of edge detection means in the third exemplary embodiment of the present invention.
(B) Flow chart of processing in the embodiment
FIG. 10 is a block connection diagram according to a fourth embodiment of the present invention.
FIG. 11 is a diagram showing detected line segments and edge points in the same embodiment;
FIG. 12 is a flowchart of processing in the embodiment.
FIG. 13 is a flowchart of processing in the embodiment.
FIG. 14 is a block connection diagram according to a fifth embodiment of the present invention.
[Explanation of symbols]
101 Printed circuit board
102 Electronic parts
103 Illumination device
104 Image input means
105 Edge detection means
106 Hough conversion means
107 Angle detection means
108 Line segment detection means
109 Component position determination means
110 Reference data storage means
111 Second Hough transforming means
112 Second angle detection seed means
113 Second line segment detection means
114 Enlarging / reducing means
301 Edge point
302 line segment
601 Image memory
602 CPU
603 Work memory
604 Histogram memory
605 θ cumulative number of votes memory
606 ρ Cumulative vote count memory
610 Image input terminal
611 1H shift register
612 Scanning window
613 Multiply and accumulate unit
614 Sx output
615 Sy output
616 Binarization threshold
607 result storage memory
800 origin coordinates
801 Inspection area
802 Electronic components
803 Electrode part
804 Horizontal scan line
806, 808 brightness profile
807 vertical scan line
809 wiring pattern
810 Edge candidate point
811 Rising edge
812 Falling edge
813 Edge point

Claims (6)

プリント基板上に実装された電子部品を撮像する画像入力手段と、予め決められた電子部品の短辺及び長辺の長さから検査領域を設定し、前記画像入力手段の出力である濃淡画像から電子部品のエッジ点を検出するエッジ検出手段と、前記エッジ検出手段からのエッジ点座標をハフ(Hough)変換処理によりρθ平面に展開するハフ変換手段と、前記ハフ変換手段で展開したρθ平面で、θ方向の得票数を用いて電子部品の角度θpを求める角度検出手段と、前記角度検出手段で検出された角度θp(角度θ1又は角度θ2:|θ1―θ2|=90度)を基に、角度θ1±b、角度θ2±b(0<b<45)の範囲のみρ方向に得票数をそれぞれ累積し、最大累積得票数の極大点として線分を表すρm1、ρm2及び線分を表すρn1、ρn2を求める矩形線分検出手段と、電子部品の位置及び角度の基準値を記憶する基準データ記憶手段と、前記角度検出手段および前記矩形線分検出手段においてρθ平面上で抽出された角度θpおよび前記電子部品の外形を構成する4本の線分を表すρm1、ρm2、ρn1、ρn2から、xy平面上に逆変換して電子部品の位置と角度を演算し、その演算結果と前記基準データ記憶手段からの基準位置とを比較して予め設定した許容範囲内であるか否かを判定する部品位置判定手段とを具備する実装部品検査装置。From the image input means for imaging the electronic component mounted on the printed circuit board, the inspection region is set from the short side and the long side length of the predetermined electronic component, and from the grayscale image that is the output of the image input means An edge detection means for detecting an edge point of an electronic component, a Hough conversion means for developing edge point coordinates from the edge detection means on a ρθ plane by a Hough conversion process, and a ρθ plane developed by the Hough conversion means. , Based on the angle detection means for obtaining the angle θp of the electronic component using the number of votes in the θ direction and the angle θp (angle θ1 or angle θ2: | θ1−θ2 | = 90 degrees) detected by the angle detection means. The number of votes is accumulated in the ρ direction only in the range of angle θ1 ± b and angle θ2 ± b (0 <b <45), and ρm1, ρm2 and line segments representing line segments are represented as maximum points of the maximum accumulated number of votes. Find ρn1 and ρn2 Rectangular line segment detection means, reference data storage means for storing reference values of the position and angle of the electronic component, the angle θp extracted on the ρθ plane in the angle detection means and the rectangular line segment detection means , and the electronic component From ρm1, ρm2, ρn1, and ρn2 representing the four line segments constituting the outer shape of the electronic component, the position and angle of the electronic component are calculated by performing inverse transformation on the xy plane, and the calculation result and the reference data storage means A mounting component inspection apparatus comprising: a component position determination unit that compares the reference position with each other and determines whether or not a predetermined allowable range is satisfied. プリント基板上に実装された電子部品を撮像する画像入力手段と、予め決められた電子部品の短辺及び長辺の長さから検査領域を設定し、前記画像入力手段の出力である濃淡画像から電子部品のエッジ点を検出するエッジ検出手段と、前記エッジ検出手段からのエッジ点座標をハフ(Hough)変換処理によりρθ平面に展開する第1のハフ変換手段と、前記第1のハフ変換手段で展開したρθ平面で、θ方向の得票数を用いて電子部品の仮の角度θnを求める第1の角度検出手段と、前記角度θn及びρ方向の得票数並びに予め決められた電子部品の短辺及び長辺の長さを用いて電子部品の短辺および長辺に平行な仮の線分を検出する第1の線分検出手段と、前記第1の線分検出手段で求められた線分で囲まれる領域からはずれたエッジ点座標に対してハフ(Hough)変換処理を行い、前記第1のハフ変換手段で求めたρθ平面から減算する第2のハフ変換手段と、前記第2のハフ変換手段で展開したρθ平面で、θ方向の得票数を用いて電子部品の角度θpを求める第2の角度検出手段と、前記角度θp及びρ方向の得票数並びに予め決められた電子部品の短辺及び長辺の長さを用いて電子部品の短辺および長辺に平行な線分を検出する第2の線分検出手段と、電子部品の位置及び角度の基準値を記憶する基準データ記憶手段と、前記第1の線分検出手段でρθ平面上で抽出された角度θpおよび平行な線分から、xy平面上に逆変換して電子部品の位置と角度を演算し、その演算結果と前記基準データ記憶手段からの基準位置とを比較して予め設定した許容範囲内であるか否かを判定する部品位置判定手段とを具備する実装部品検査装置。  From the image input means for imaging the electronic component mounted on the printed circuit board, the inspection region is set from the short side and the long side length of the predetermined electronic component, and from the grayscale image that is the output of the image input means Edge detection means for detecting an edge point of an electronic component, first Hough conversion means for developing edge point coordinates from the edge detection means on a ρθ plane by Hough conversion processing, and the first Hough conversion means The first angle detection means for obtaining the temporary angle θn of the electronic component by using the number of votes obtained in the θ direction on the ρθ plane developed in step 1, the number of votes obtained in the angle θn and the ρ direction, and a predetermined electronic component short First line segment detecting means for detecting a temporary line segment parallel to the short side and long side of the electronic component using the length of the side and the long side, and the line obtained by the first line segment detecting means Edge point coordinates deviated from the area surrounded by minutes A Hough transform process is performed on the second Hough transform means for subtracting from the ρθ plane obtained by the first Hough transform means, and the ρθ plane developed by the second Hough transform means, θ Using the second angle detection means for obtaining the angle θp of the electronic component using the number of votes in the direction, the number of votes in the angle θp and the ρ direction, and the lengths of the short side and the long side of the electronic component determined in advance. Second line segment detecting means for detecting a short side of the electronic component and a line segment parallel to the long side, reference data storage means for storing a reference value of the position and angle of the electronic component, and the first line segment detection The angle θp extracted on the ρθ plane by the means and the parallel line segment are inversely transformed on the xy plane to calculate the position and angle of the electronic component, and the calculation result and the reference position from the reference data storage means are obtained. Compare to determine whether it is within the preset tolerance A mounting component inspection apparatus comprising: a component position determination unit that performs エッジ検出手段が、予め設定した電子部品の長辺Lw及び短辺Lsから濃淡画像の検査領域を設定し、前記検査領域内を走査して得られた立ち上がりエッジから立ち下がりエッジまでのエッジ対の内、その距離が前記Lw又はLsに近いエッジ対のみを検出することを特徴とする請求項1又は2記載の実装部品検査装置。  The edge detecting means sets an inspection area of a grayscale image from the long side Lw and the short side Ls of the electronic component set in advance, and scans the inside of the inspection area to obtain an edge pair from the rising edge to the falling edge. 3. The mounting component inspection apparatus according to claim 1, wherein only an edge pair whose distance is close to the Lw or Ls is detected. エッジ検出手段が、予め設定した電子部品の長辺Lw及び短辺Lsから濃淡画像の検査領域を設定し、前記検査領域内を走査して得られた立ち上がりエッジから立ち下がりエッジまでのエッジ対の内、その距離が前記Lw又はLsに近いエッジ対のみを検出し、さらにエッジ対間の濃度値の平均値から電極部を検出するものであり、ハフ変換手段が、前記エッジ検出手段からのエッジ点座標をハフ(Hough)変換処理によりρθ平面に展開するとともに、前記電極部に重み付けをして得票してハフ(Hough)変換処理によりρθ平面に展開することを特徴とする請求項1記載の実装部品検査装置。  The edge detecting means sets an inspection area of a grayscale image from the long side Lw and the short side Ls of the electronic component set in advance, and scans the inside of the inspection area to obtain an edge pair from the rising edge to the falling edge. Among them, only the edge pair whose distance is close to the Lw or Ls is detected, and further the electrode part is detected from the average value of the density values between the edge pairs, and the Hough transforming means detects the edge from the edge detecting means. 2. The point coordinates are developed on a ρθ plane by a Hough transformation process, and the electrode portions are weighted to obtain votes and developed on the ρθ plane by a Hough transformation process. Mounting component inspection equipment. エッジ検出手段が、予め設定した電子部品の長辺Lw及び短辺Lsから濃淡画像の検査領域を設定し、前記検査領域内を走査して得られた立ち上がりエッジから立ち下がりエッジまでのエッジ対の内、その距離が前記Lw又はLsに近いエッジ対のみを検出し、さらにエッジ対間の濃度値の平均値から電極部を検出するものであり、第1及び第2のハフ変換手段が、前記エッジ検出手段からのエッジ点座標をハフ(Hough)変換処理によりρθ平面に展開するとともに、前記電極部に重み付けをして得票してハフ(Hough)変換処理によりρθ平面に展開することを特徴とする請求項2記載の実装部品検査装置。  The edge detecting means sets an inspection area of a grayscale image from the long side Lw and the short side Ls of the electronic component set in advance, and scans the inside of the inspection area to obtain an edge pair from the rising edge to the falling edge. Among them, only the edge pair whose distance is close to the Lw or Ls is detected, and further the electrode part is detected from the average value of the density values between the edge pairs, and the first and second Hough transforming means, The edge point coordinates from the edge detection means are developed on the ρθ plane by a Hough transformation process, and the electrode portions are weighted to obtain votes and developed on the ρθ plane by a Hough transformation process. The mounting component inspection apparatus according to claim 2. 電子部品のサイズによらず処理する画像サイズが一定となる如く、画像入力手段からの濃淡画像を拡大あるいは縮小する拡大縮小手段を設け、エッジ検出手段は前記拡大縮小手段の出力から電子部品のエッジ点を検出することを特徴とする請求項1ないし請求項5のいずれかに記載の実装部品検査装置。  Enlarging / reducing means for enlarging or reducing the grayscale image from the image input means is provided so that the image size to be processed is constant regardless of the size of the electronic component, and the edge detecting means detects the edge of the electronic component from the output of the enlarging / reducing means. 6. The mounted component inspection apparatus according to claim 1, wherein a point is detected.
JP28476595A 1995-11-01 1995-11-01 Mounting component inspection equipment Expired - Fee Related JP3711599B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28476595A JP3711599B2 (en) 1995-11-01 1995-11-01 Mounting component inspection equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28476595A JP3711599B2 (en) 1995-11-01 1995-11-01 Mounting component inspection equipment

Publications (2)

Publication Number Publication Date
JPH09128547A JPH09128547A (en) 1997-05-16
JP3711599B2 true JP3711599B2 (en) 2005-11-02

Family

ID=17682727

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28476595A Expired - Fee Related JP3711599B2 (en) 1995-11-01 1995-11-01 Mounting component inspection equipment

Country Status (1)

Country Link
JP (1) JP3711599B2 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4515208B2 (en) * 2003-09-25 2010-07-28 富士フイルム株式会社 Image processing method, apparatus, and program
US7720302B2 (en) 2003-09-25 2010-05-18 Fujifilm Corporation Method, apparatus and program for image processing
JP4657787B2 (en) * 2004-04-19 2011-03-23 富士フイルム株式会社 Image processing method, apparatus, and program
JP4600019B2 (en) * 2004-12-07 2010-12-15 カシオ計算機株式会社 Imaging apparatus, image processing method, and program
JP2006200900A (en) * 2005-01-18 2006-08-03 Juki Corp Technique and device for recognizing object
JP2007140729A (en) * 2005-11-16 2007-06-07 Ishikawajima Harima Heavy Ind Co Ltd Method and device detecting position and attitude of article
JP4704310B2 (en) * 2006-10-11 2011-06-15 シャープ株式会社 Image processing method, image processing apparatus, image processing program, and recording medium for recording image processing program
JP2008151606A (en) * 2006-12-15 2008-07-03 Juki Corp Image processing method and image processing apparatus
JP5856401B2 (en) * 2011-07-28 2016-02-09 株式会社メガチップス Straight line detection apparatus and straight line detection method
JP5911122B2 (en) * 2011-07-14 2016-04-27 株式会社メガチップス Straight line detection apparatus and straight line detection method
US9195902B2 (en) 2011-07-14 2015-11-24 Megachips Corporation Straight line detection apparatus and straight line detection method
KR101714981B1 (en) * 2016-08-03 2017-03-09 연세대학교 산학협력단 Apparatus and method for inspecting template by using simplified hough transform
EP4036853A4 (en) * 2019-09-25 2022-10-05 Fuji Corporation Information processing device, mounting device, and information processing method

Also Published As

Publication number Publication date
JPH09128547A (en) 1997-05-16

Similar Documents

Publication Publication Date Title
JP3711599B2 (en) Mounting component inspection equipment
JP4154374B2 (en) Pattern matching device and scanning electron microscope using the same
JPH11110561A (en) Image information processor
JPH0528273A (en) Method and device for processing picture
KR20210109485A (en) Board measurement system and method thereof
JPH05209844A (en) Inspecting apparatus of wiring pattern
JP2014164528A (en) Character recognition device, character recognition method, and program
JP3164003B2 (en) Mounted parts inspection device
JPH07147309A (en) Detector for pattern defect
JPH1021412A (en) Edge detection method of parts picture, and parts form recognition device
JP3303246B2 (en) Image processing device
JP2000194861A (en) Method and device for recognizing image
JP4380864B2 (en) Component detection method and apparatus
JPH07168941A (en) Picture processor
CN112257705B (en) Method for identifying text content of picture
JP3328667B2 (en) Position measurement method and apparatus by image processing
JPH1091788A (en) Device for positioning pattern and method therefor
JP2879357B2 (en) Shape judgment method
JP4365619B2 (en) Edge detection device, component recognition device, edge detection method, and component recognition method
JP3330769B2 (en) Pattern recognition device
JP2959017B2 (en) Circular image discrimination method
JPH05165970A (en) Image processor
JPH07146249A (en) Defect detector
JP2514727B2 (en) Defect inspection method by visual inspection
JP2963773B2 (en) Pattern matching device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050510

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050614

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050622

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050808

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

Free format text: PAYMENT UNTIL: 20080826

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090826

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090826

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100826

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees