JP4185186B2 - Imaging device - Google Patents

Imaging device Download PDF

Info

Publication number
JP4185186B2
JP4185186B2 JP18756998A JP18756998A JP4185186B2 JP 4185186 B2 JP4185186 B2 JP 4185186B2 JP 18756998 A JP18756998 A JP 18756998A JP 18756998 A JP18756998 A JP 18756998A JP 4185186 B2 JP4185186 B2 JP 4185186B2
Authority
JP
Japan
Prior art keywords
image
imaging
image processing
point
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP18756998A
Other languages
Japanese (ja)
Other versions
JP2000018919A (en
Inventor
東輔 河田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Corp
Original Assignee
Fuji Machine Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Machine Manufacturing Co Ltd filed Critical Fuji Machine Manufacturing Co Ltd
Priority to JP18756998A priority Critical patent/JP4185186B2/en
Publication of JP2000018919A publication Critical patent/JP2000018919A/en
Application granted granted Critical
Publication of JP4185186B2 publication Critical patent/JP4185186B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は対象物を撮像し、画像データで表される画像を得る撮像装置に関するものである。
【0002】
【従来の技術】
本出願人は、この種の撮像装置,光学式測定装置および光学式検査装置を開発し、特許出願した。まだ公開されていない特願平10−9085号および特願平10−162459号がそれである。特願平10−9085号に記載の撮像装置は、▲1▼一平面をなす反射面と、▲2▼その反射面と光軸が直交する状態で配置され、反射面からの平行光を焦点に集光する第一レンズ系と、▲3▼それら反射面と第一レンズ系との間の位置に撮像対象物を支持する撮像対象物支持装置と、▲4▼前記第一レンズ系に対して前記反射面とは反対側の位置に設けられ、第一レンズ系の光軸に対して傾斜し、光の一部を透過させ、残りを反射する反射面を有するビームスプリッタと、▲5▼そのビームスプリッタの反射面に対して前記第一レンズ系の焦点とは面対称の位置に設けられたオリフィスと、▲6▼そのオリフィスに対して前記ビームスプリッタとは反対側に設けられた光源と、▲7▼前記第一レンズ系の焦点に焦点を有し、第一レンズ系により集光されるとともに前記ビームスプリッタを通過した光を平行光線に変換する第二レンズ系と、▲8▼その第二レンズ系により平行光線に変換された光により形成される像を撮像する撮像素子とを含むように構成される。
【0003】
光源とオリフィスとにより構成される点光源から放射状に投光される光は、ビームスプリッタの反射面で反射されて第一レンズ系に向かうが、点光源はビームスプリッタの反射面に対して、第一レンズ系の焦点と面対称の位置にあるため、第一レンズ系にとっては自身の焦点から放射状に投光された光と同じことになり、第一レンズ系によって平行光に変換され、撮像対象物支持装置に支持された物体(物体自体が撮像対象物である場合と、物体表面の一部が撮像対象物である場合とがある。以下、撮像対象物支持装置に支持された物体を特に必要がない限り単に物体と称することとする)および反射面に当てられる。反射面による反射光と物体表面による反射光とがビームスプリッタに入射し、一部はそれの反射面により点光源の方へ戻されるが、残りはビームスプリッタを通過して第二レンズ系に至り、反射面による反射光と、物体表面による反射光のうち第一レンズ系の光軸に平行なもの(反射面に直角なもの)は、平行光に変換され、撮像センサに入射する。光源およびオリフィスにより構成される点光源を、実際に第一レンズ系の焦点に設置しようとすれば、上記反射面や物体表面からの反射光が、オリフィスおよび光源により遮られて撮像センサに入射せず、物体およびその周辺の画像が得られないことになるが、本態様におけるようにビームスプリッタを使用すれば、この問題を解消することができるのである。
【0004】
なお、第一,第二レンズ系はそれぞれ1枚のレンズにより構成されても複数枚のレンズにより構成されてもよい。また、例えば、第二レンズ系と撮像センサとの間に反射面を設け、第二レンズ系により平行光に変換された光が反射面で反射されて撮像センサに入射させられるようにしたり、第一レンズ系の焦点と第二レンズ系との間に反射面を設け、第一レンズ系からの光がその反射面で反射された後に、第二レンズ系により平行光に変換されるようにしたりすることができる。第一レンズ系についても同様のことが可能である。このように、反射面により光の向きを任意に変えることができ、この場合にはレンズ系の光軸も光と共に屈曲すると考えることとする。本態様の光学式測定装置においては、反射面,撮像対象物支持装置,第一レンズ系,第二レンズ系および撮像センサが、一直線上に配置されることは不可欠ではないのである。
【0005】
上記のように、反射面およびその手前に置いた物体に、反射面と直交する平行光を当て、反射面において反射され、物体の周囲を通過した平行光により形成される像を撮像すれば、物体の正確な投影像を得ることができ、その投影像を処理すれば、透視図法ないし投影図法上の正確な寸法を得ることができる。
平行光は物体と反射面との両方に当てられるため、反射面で反射された光のみならず、物体の表面で反射された光も撮像面に到達し、物体の表面像を形成するが、物体の表面がたとえ研削面であっても、微細な凹凸が存在するため、反射面に直角な平行光の一部が反射面に直角な方向に反射されるに過ぎない。それに対し、反射面を鏡面とすれば、反射面に直角な平行光の殆ど全部が反射面に直角な方向に反射される。したがって、物体の表面の像に比較して反射面の像を圧倒的に明るくすることは容易であり、容易に物体の輪郭線を特定することができる。反射面により反射されて物体の周囲を通過した平行光により形成される物体のシルエット像が得られるのであり、そのシルエット像を処理することにより、物体の外のり寸法(貫通した開口があればその開口の内のり寸法も)を求めることができるのである。
ただし、物体の表面からの反射光の、反射面に直角な方向の成分が多い場合には、物体の表面も撮像されるため、物体表面に記載された文字,記号等のキャラクタ、表面に形成された凹部や傷の正確な投影像も取得することができ、必要があればこれらの寸法や位置も正確に測定することができる。
そして、物体および反射面に平行光を当てる光学系も、物体および反射面からの平行反射光により形成される像を撮像面に結像させる光学系も物体と同じ側に設けることができるため、撮像装置全体をコンパクトに構成することが可能になる。
【0006】
また、特願平10−9085号に記載の光学式測定装置は、上記撮像装置と、それにより撮像された画像に基づいて前記対象物の前記反射面に平行な方向の位置,反射面に直角な軸線まわりの回転角度、および反射面に平行な方向の寸法の少なくとも1つを演算する画像処理装置とを含むように構成される。
この光学式測定装置は、測定対象物すなわち撮像対象物に接触することなく、位置,回転角度,寸法を測定することができるため、ゴム等軟らかい材料から成る測定対象物を支障なく測定できる。さらに、画像処理装置を、撮像により取得された画像内における測定対象物(撮像対象物)の像の位置や回転角度(基準回転位置からの回転角度)のいかんを問わず寸法を求め得るものとすれば、測定対象物(物体)を平らな支持面に単純に載置すればよく、測定対象物の測定装置へのセットを容易に行うことができ、測定の能率を向上させることができる。
本光学式測定装置における画像処理装置の一例は、捜索テンプレートおよび測定テンプレートを使用するものである。すなわち、画像処理装置が、マスタ捜索テンプレートデータ記憶手段,マスタ測定テンプレートデータ記憶手段,捜索テンプレート自動設定手段,捜索物判定手段,測定テンプレート自動設定手段およびエッジ点座標演算手段を含むように構成されるのである。マスタ捜索テンプレートは、一定の距離を隔てた2個の点を一対とするポイントペアを複数組有するものであり、マスタ捜索テンプレートデータ記憶手段はそのマスタ捜索テンプレートのデータを記憶するものである。マスタ測定テンプレートは、測定シークラインを複数本有するものであり、マスタ測定テンプレートデータ記憶手段はそのマスタ測定テンプレートのデータを記憶するものである。捜索テンプレート自動設定手段は、マスタ捜索テンプレートデータ記憶手段に記憶されたマスタ捜索テンプレートのデータを、種々の位置および回転角度に移動させて複数の捜索テンプレートを自動で設定するものである。捜索物判定手段は、捜索テンプレート自動設定手段により設定された複数の捜索テンプレートを順次、画像データ記憶手段の画像データの表す画像が存在する画面に重ねた場合に、捜索テンプレートの複数組のポイントペアを構成する各対の点の光学的特性値の相違状態が設定状態以上である場合には、その対の2点が、画像の光学的特性が急変する部分であるエッジの両側に分かれて位置する適合状態にあるとし、複数のポイントペアのうち設定量以上のものが適合状態にあれば、撮像対象物は捜索テンプレートに適合する捜索対象物であると判定するものである。測定テンプレート自動設定手段は、撮像対象物が捜索テンプレートに適合する捜索対象物であると判定された際の捜索テンプレートのデータと、マスタ測定テンプレートデータ記憶手段に記憶されたマスタ測定テンプレートデータとに基づいて、測定テンプレートを自動で設定するものである。エッジ点座標演算手段は、測定テンプレート自動設定手段により設定された測定テンプレートを画像データ記憶手段の画像データの表す画像が存在する画面に重ね、複数本の測定シークラインの各々の上における測定対象物(撮像対象物,捜索対象物)のエッジ点の座標を演算するものである。エッジ点は、エッジと測定シークラインとの交点である。エッジは、画像データにより表される画像内において光学的測定が急変する部分であり、測定対象物の輪郭線に対応する。エッジは多くの場合閉曲線となるが、閉曲線とはならない場合もある。測定対象物が大きくて撮像装置の視野内におさまらない場合、測定対象物が物体の一部である場合等がその例である。
【0007】
光学式検査装置は、特願平10−162459号に記載されている。この光学式検査装置の画像処理装置は、撮像装置により撮像された画像のデータである画像データを記憶する画像データ記憶手段に加えて、ネガティブシークライン設定手段および判定手段を含むように構成される。ネガティブシークラインはエッジと交差しないことが予定されたシークラインであり、ネガティブシークライン設定手段はそのネガティブシークラインを設定するものである。そして、判定手段は、設定されたネガティブシークラインがエッジと交差する場合には撮像対象物に欠陥があると判定するものである。前記光学式測定装置における測定テンプレートのシークラインはエッジと交差することが予定されており、その意味でポジティブシークラインと称すべきものであるが、エッジと交差しないことが予定されたネガティブシークラインを利用すれば、撮像対象物支持装置に支持された物体の表面の傷、外側面の切欠,ばり等の欠陥を容易に検出することができる。例えば、四角形の部品の水平な表面に傷があるか否かを検査する場合には、その表面の輪郭線の内側に多数のネガティブシークラインを設定し、それらネガティブシークラインのいずれかがエッジと交差するか否かを調べるのである。明るい像となる表面に暗い像となる傷や汚れが存在すれば、それら傷や汚れの輪郭線がエッジとなる。ネガティブシークラインは、上記のように、表面の輪郭線の内側に設定されるものであるから、通常はエッジと交差しないのであるが、表面に傷や汚れが存在し、ネガティブシークラインがそれら傷や汚れと交差すれば、ネガティブシークラインはエッジと交差することになる。したがって、ネガティブシークライン上にエッジ点、すなわち輝度の変化が大きい点が存在するか否かを調べれば、検査対象表面に傷や汚れが存在するか否かを調べることができるのである。また、上記四角形の部品の物体の外側面に切欠があるか否かは、その物体の輪郭線の直ぐ内側に、その輪郭線に沿ってネガティブシークラインを設定すれば、検出することができる。同様に、物体の輪郭線の直ぐ外側にネガティブシークラインを設定すればばりを検出することができる。本光学式検査装置においては、傷,汚れ,切欠,ばり等の欠陥を撮像対象物と考えることも、欠陥を有する物体を撮像対象物と考えることもできる。
【0008】
【発明が解決しようとする課題,課題解決手段,作用および効果】
本発明は、上記先に開発された撮像装を改良すること、特に撮像装置によって取得される画像の精度を向上させることを課題としてなされたものである。本発明によって、下記各態様の撮像装置,光学式測定装置,光学式検査装置が得られる。各態様は請求項と同様に、項に区分し、各項に番号を付し、必要に応じて他の項の番号を引用する形式で記載する。これは、各項に記載の特徴の組合わせの可能性の理解を容易にするためであり、本明細書に記載の技術的特徴およびそれらの組合わせが以下のものに限定されると解釈されるべきではない。
(1)凹面鏡と、
その凹面鏡の光軸上にその光軸に対して傾斜して配設されたビームスプリッタ(ハーフミラーを含む)と、
前記凹面鏡側から見てビームスプリッタの透過方向と反射方向とのいずれか一方に配設され、撮像対象物をほぼ前記凹面鏡の焦点の位置に支持する撮像対象物支持装置と、
前記透過方向と反射方向との他方における前記凹面鏡の焦点に対して前記ビームスプリッタとは反対側に設けられ、その焦点を通過して放射状に広がる光を実質的な平行光に変換するレンズ系と、
そのレンズ系により変換された平行光によって形成される画像を撮像する撮像素子と、
その撮像素子に入射する光を、前記凹面鏡にその凹面鏡の光軸に実質的に平行に入射する光に制限する制限手段と
を含むことを特徴とする撮像装置(請求項1)。
撮像対象物は、撮像対象物支持装置に支持される物体自体である場合と、その物体の一部である場合とがある。後者の場合には、撮像対象物支持装置は、物体を支持することにより結果的に撮像対象物を支持することになるのである。撮像対象物支持装置に支持された物体は、前面側から照明されても、背面側から照明されてもよい。
前面側から照明される場合には、物体の前面により反射された光が、ビームスプリッタを透過し、あるいはビームスプリッタにより反射されて凹面鏡に入射する。凹面鏡は、それの光軸に平行な方向から入射した光を焦点に集光させる性質を有しているため、物体の前面によりあらゆる方向に放射状に反射された光のうち、凹面鏡の光軸に平行な成分光のみが焦点に集光させられる。したがって、その焦点の位置に、下記 (2)項に記載のように、ピンホールを有するオリフィスを配設し、焦点に集光させられた成分光のみの通過が許容されるようにすれば、凹面鏡にそれの光軸に平行に入射した成分光のみがレンズ系に入射することとなる。オリフィスが制限手段を構成することになるのであり、このオリフィスを通過して放射状に広がる光がレンズ系により平行光に変換され、撮像素子に入射して画像を形成する。ただし、ピンホールはできる限り小さく形成されるものの、大きさが0というわけにはゆかず、焦点近傍に集光させられる成分光、すなわち凹面鏡の光軸に対して僅かに傾いた方向に反射された成分光もピンホールを通過して撮像素子に入射する。その結果、撮像素子の撮像面には、凹面鏡の光軸に実質的に平行な成分光により像が結ばれることとなり、この像が撮像装置により撮像される。したがって、撮像素子はレンズ系の焦点の位置に配設されることが望ましい。
撮像対象物支持装置により支持された物体が背面側から照明される場合にも、凹面鏡の焦点の位置にピンホールを有するオリフィスを配設しておけば、物体の周囲を通過して凹面鏡に入射する光のうち、凹面鏡の光軸に平行に入射する成分光(撮像対象物支持装置の中心線に平行な成分光)により、撮像素子の撮像面に画像が形成され、物体のシルエット像が取得される。この場合、物体の周囲を通過する光が、撮像対象物支持装置の中心線に平行な成分光の他に、中心線に対して傾いた方向の成分光を含んでいても、その傾いた方向の成分光が撮像素子の撮像面に入射することはオリフィスにより阻止される。したがって、 (5)項に記載の明背景形成装置や (6)項に記載の均一照明装置を使用して撮像対象物のシルエット像を取得しても、そのシルエット像は凹面鏡にそれの光軸に実質的に平行な方向から入射した成分光のみによって形成されることとなる。
それに対し、物体の周囲を通過する光自体が、撮像対象物支持装置の中心線に平行な成分光のみから成るようにすれば、凹面鏡に入射するのはそれの光軸に平行な成分光のみとなるため、凹面鏡の焦点の位置にオリフィスを設けることは必ずしも必要ではなくなる。物体の周囲を通過する光が、撮像対象物支持装置の中心線に平行な成分光のみから成るようにする手段が、制限手段を構成することになるのである。物体を、撮像対象物支持装置の中心線に平行な成分光のみから成る光で照明するためには、例えば、 (7)項や (8)項に記載の平行光発生装置を使用すればよい。
なお、平行光発生装置を使用する場合でも、オリフィスを設けることは有効である。平行光発生装置を使用して、物体の周囲を通過する光が撮像対象物支持装置の中心線に平行な成分光のみから成るようにしても、光の回折によって、凹面鏡にそれの光軸に対して傾斜した方向から入射する成分光が生じ、その成分光が撮像素子の撮像面に入射することを避け得ないからである。制限手段は、撮像素子に入射する光を、結果的に凹面鏡にそれの光軸に実質的に平行に入射する光に制限することができるものであればよいのであるが、光の回折を考慮すれば、できる限り撮像素子に近い位置に設けられることが望ましいことになる。平行光発生装置とオリフィスとは、共に制限手段として機能するものであり、両方を設ければ特に正確な画像が得られる。
以上説明したように、本項に記載の態様の撮像装置においては、凹面鏡の光軸に実質的に平行な成分光によって画像が形成されるため、得られる撮像対象物の像は実質的に透視図法ないし投影図法上の正確な像となる。
先に開発した特願平10−9085号に記載の撮像装置においては、撮像対象物支持装置に支持された物体の周囲を反射面に向かって通過し、反射面により反射されて再び物体の周囲を逆向きに通過した、反射面に実質的に直角な方向の成分光により撮像素子の撮像面に画像が形成されるため、物体のシルエット像の外側輪郭線は正規の輪郭線より大きめに、内側輪郭線(物体に形成された貫通孔の輪郭線)は小さめに撮像されることを避け得ない。そして、これが撮像対象物の像の精度を低下させ、光学式測定装置の測定精度の低下、あるいは光学式検査装置の信頼性の低下の原因となっていたが、本態様の撮像装置においては、撮像対象物支持装置に支持された物体のシルエット像を形成する成分光が物体の周囲を1回通過するのみであるため、撮像対象物の像の精度を向上させることが容易である。
また、本態様の撮像装置は安価に製造し得る利点を有している。特願平10−9085号に記載の撮像装置においては、撮像対象物の情報を含む反射面に直角な成分光を1点に集光させるために、レンズ系が使用されていたため、撮像対象物が大きい場合には、大径のレンズ系が必要となっていたのに対し、レンズ系の代わりに凹面鏡が使用されているからである。平行な成分光を一点に集光させ、それを再び平行な成分光として撮像素子に精度のよい画像を撮像させるためには、レンズ系の収差を小さくすることが必要であり、大径のレンズ系であって収差の小さいものを製作するためには複数のレンズを組み合わせることが必要である上、それでも収差を小さくすることが困難であるのに対し、凹面鏡は1個の無収差のものを容易に製作し得るのである。
(2)前記制限手段が、前記凹面鏡の焦点の位置に位置するピンホールを有するオリフィスを含む (1)に記載の撮像装置(請求項2)
(3)前記オリフィス,レンズ系および撮像素子が前記ビームスプリッタの反射方向に設けられた (1)項または (2)項に記載の撮像装置。
(4)前記撮像対象物支持装置が前記ビームスプリッタの反射方向に設けられた (1)項または (2)項に記載の撮像装置。
(5)さらに、前記撮像対象物支持装置に対して前記ビームスプリッタとは反対側に設けられ、前記撮像対象物の明るくかつ実質的に均一な背景を形成する明背景形成装置を含む (1)ないし (4)項のいずれか1つに記載の撮像装置(請求項3)。
明背景形成装置からは放射状に光が放射されるが、その放射状の光のうち、前述のように凹面鏡の光軸に実質的に平行な成分光によって、撮像対象物のシルエット像が撮像素子の撮像面上に形成される。
(6)前記明背景形成装置が、前記撮像対象物支持装置に向かって実質的に均一な照明光を放射する照明装置である (5)項に記載の撮像装置。
明背景形成装置は、乱反射面によっても構成することができるが、照明装置自体により明背景形成装置を構成する方がエネルギ効率がよい。
(7)さらに、前記撮像対象物支持装置を間にして前記ビームスプリッタとは反対側に設けられ、撮像対象物支持装置を透過し、撮像対象物の周辺を通過してビームスプリッタに入光する平行光を投光する平行光発生装置を含 (1) 項に記載の撮像装置(請求項4)。
平行光発生装置により発生させられた平行光により撮像対象物を背面側から照明する場合には、凹面鏡の光軸に実質的に平行ではない無用の成分光が撮像対象物の周辺に殆ど存在しないようにすることができるため、品質の高い画像を容易に得ることができる。例えば、撮像対象物が球体である場合、明背景形成装置からあらゆる方向に放射される光によって背面側から照明されれば、その照明光の一部は、球体の前側の半球面(明背景形成装置とは反対側の半球面)の一部にも当たり、そこで反射されて凹面鏡に向かう。この光の中には凹面鏡の光軸に平行な成分光も含まれており、これはピンホールを通過して撮像素子に入射するため、球体のシルエット像が理論上のシルエット像より小さくなってしまうことになる。それに対して、球体が平行光発生装置により発生させられた平行光によって背面側から照明される場合は、その球体の前側の半球面に平行光が当たることはない。したがって、球体の正確なシルエット像が得られるのである。撮像対象物が例えば直方体形のものであっても、直方体の角部に丸みが付けられていれば、その丸み部に関して同様の事態が発生する。
また、明背景形成装置から放射される光は、ごく一部(凹面鏡の光軸に実質的に平行な成分光)のみが画像の取得に有効に利用される。それに対して、平行光発生装置により撮像対象物を背面側から照明すれば、照明光の全部がシルエット像形成に有効に利用されるため、効率よく画像を形成することができる。
(8)前記平行光発生装置が、
前記撮像対象物支持装置を間にして第1ビームスプリッタとしての前記ビームスプリッタとは反対側に設けられた第2ビームスプリッタと、
前記撮像対象物支持装置から見て前記第2ビームスプリッタの反射方向に、第1凹面鏡としての前記凹面鏡とは別に設けられた第2凹面鏡と、
その第2凹面鏡から見て前記第2ビームスプリッタの透過方向における第2凹面鏡の焦点位置に設けられ、第2ビームスプリッタに向かって放射状に広がる照明光を放射する点光源と
を含む (7)項に記載の撮像装置(請求項5)。
本態様によれば、平行光を容易に発生させることができる。
(9)前記点光源が、
前記第2凹面鏡の焦点位置に設けられたピンホールを備えた、第1オリフィスとしての前記オリフィスとは別の第2オリフィスと、
その第2オリフィスに対して前記第2ビームスプリッタとは反対側に設けられ、オリフィスに向かってほぼ平行な照明光を投光する平行光源と、
その平行光源からの光を前記第2オリフィスのピンホールを経て前記第2ビームスプリッタに向かって放射状に広がる照明光に変換する、前記第1レンズ系とは別の第2レンズ系と
を含む (8)項に記載の撮像装置(請求項6)。
(10)前記第1凹面鏡,第1ビームスプリッタ,第1オリフィス,第1レンズ系と、前記第2凹面鏡,第2ビームスプリッタ,第2オリフィス,第2レンズ系とがそれぞれ、前記撮像対象物支持装置による前記撮像物支持位置に対して面対称に配置された (9)項に記載の撮像装置。
本態様によれば、撮像装置と平行光発生装置とを対称の構成とすることができ、装置全体をコンパクトに構成することができるとともに、部品の共用により製造コストを低減させることができる。
(11)さらに、前記ビームスプリッタの前記凹面鏡の光軸に対する傾斜角度を調節する傾斜角度調節装置を含む (1)ないし(10)項のいずれか1つに記載の撮像装置。
傾斜角度調節装置を設ければ、撮像装置の製造誤差をビームスプリッタの傾斜角度の調節により打ち消し、あるいは軽減することができ、安価な撮像装置により精度の高い画像を得ることができる。
(12)前記傾斜角度調節装置が、
前記ビームスプリッタを、当該撮像装置の本体である装置本体に、前記凹面鏡の光軸に対して直角な回動軸線の回りに回動可能に取り付ける取付軸と、
前記ビームスプリッタに、前記取付軸の軸線と直交する方向に長く形成された長穴と、
前記装置本体に被支持軸部が、前記取付軸の軸線と平行な回転軸線のまわりに回転可能に保持され、その被支持軸部に対して偏心した偏心軸部において前記長穴に嵌入させられており、回転操作されることにより前記ビームスプリッタを前記取付軸の軸線のまわりに回動させる偏心操作部材と
を含む(11)項に記載の撮像装置。
本態様によれば、傾斜角度調節装置を安価に構成することができる。
(13)さらに、前記オリフィス,レンズ系および撮像素子の、それらの光軸に平行な方向の位置を調節する位置調節装置を含む (1)ないし(12)項のいずれか1つに記載の撮像装置。
位置調節装置を設ければ、撮像装置の製造誤差をオリフィス,レンズ系および撮像素子の軸方向の位置の調節により打ち消し、あるいは軽減することができ、安価な撮像装置により精度の高い画像を得ることができる。
(14)前記位置調節装置が、
前記オリフィス,レンズ系および撮像素子を保持する撮像素子等保持部材と、
当該撮像装置の本体である装置本体に、前記凹面鏡の光軸に平行に設けられて前記撮像素子等保持部材を案内するガイドと、
前記装置本体と前記撮像素子等保持部材との両方と相対回転可能に係合し、それら装置本体および撮像素子等保持部材との係合の少なくとも一方は雄ねじと雌ねじとによる螺合であって、回転操作されることにより撮像素子等保持部材を前記ガイドに沿って移動させる調節ねじ部材と
を含む(13)項に記載の撮像装置。
本態様によれば、位置調節装置を安価に構成することができる。
(15) (1)ないし(14)項のいずれか1つに記載の撮像装置と、
その撮像装置により撮像された画像を表す画像データを処理することにより前記撮像対象物の位置,回転角度,寸法の少なくとも1つを取得する画像処理装置と
を含む光学式測定装置。
本態様によれば、撮像対象物の位置,回転角度,寸法等を精度よく測定し得る光学式測定装置が得られる。
(16)前記画像処理装置が、
前記撮像素子により撮像された画像のデータを記憶する画像データ記憶手段と、
2個の点を直線状に結んで成るシークラインを複数本有する測定テンプレートのデータを記憶する測定テンプレートデータ記憶手段と、
その測定テンプレートデータ記憶手段の測定テンプレートを前記画像データ記憶手段の画像データの表す画像が存在する画面に重ね、前記複数本のシークラインの各々の上において光学的特性の急変する点であるエッジ点の座標を演算するエッジ点座標演算手段と
を含む(15)項に記載の光学式測定装置。
上記「光学的特性値」とは、例えば、輝度,色相等である。また、「エッジ点」とはシークラインとエッジとの交点のことである。エッジは、画像の光学的特性が急変する部分であり、撮像対象物が撮像対象物支持装置に支持されている物体全体である場合にはその物体の輪郭線に対応し、撮像対象物が撮像対象物支持装置に支持されている物体の表面のキャラクタ,凹部,傷等である場合にはそれらキャラクタ等輪郭線に対応する。
本態様の光学式測定装置において、撮像素子により撮像が行われるときは通常、撮像面が多数の画素に分解され、1画素のそれぞれについて画像データが作成されて画像データ記憶手段に記憶される。「画像データの表す画像」とは、画像データに基づいて得られる画像であり、画素を単位とし、光学的特性値が画素毎に得られる画像でもよく、あるいは画素を単位とせず、光学的特性値が任意の点において得られる画像でもよい。
前者の一例は、多数の光電変換素子を備え、各光電変換素子の受光状態に応じた電気信号を発生させる撮像素子により得られた各光電変換素子毎の電気信号の集合として観念される画像であり、画像は光電変換素子が配列された撮像面上に物理的に形成された画像であるということができる。その意味でこの画像を物理画像と称し、物理画像が存在する画面(撮像面と一致している)を物理画面と称することとする。物理画像のデータは、各光電変換素子毎の電気信号のデータを各光電変換素子の位置と関連付けて記憶手段に記憶させることにより保存され、再現され得る。
また、物理画像を表す画像データは実際に存在しており、その意味で物理画像は、後述の仮想画像との対比において実在画像と称することもでき、実在画像が存する画面は実在画面と称することができる。
実在画像を表す画像データは、各光電変換素子毎の電気信号の大きさ自体を表すアナログデータあるいはデジタルデータでもよく、例えば256段階の離散値で表される多段階のデジタルデータ(階調データと称する)でもよく、光電変換素子毎の電気信号がしきい値を超えるか否かにより2値化された2値化データでもよい。
画素を単位とせず、光学的特性値が任意の点において得られる画像の一例は、上記物理画面の各光電変換素子の電気信号のデータが各光電変換素子の中央の点の光学的特性値を表すと見なし、それら多数の点の光学的特性値を満たす曲面を想定した場合に、その曲面を規定する連続的な光学的特性値の集合として観念される画像である。この画像の画像データは例えば上記曲面を表す式のデータとして保存することも可能であり、この画像データも実在画像の一種であることになる。
それに対して、上記曲面のデータを予め求めておく代わりに、画面上の任意の点が指定された場合に、その点のみの光学的特性値を各点が指定される毎に演算によって求めることも可能である。この場合には画像は実際には存在せず、存在すると仮想されているに過ぎないため、仮想画像と称し、仮想画像が存在する画面を仮想画面と称することとする。
「測定テンプレートを画面に重ね、」とは、例えば、物理画面上において測定テンプレートデータにより指定される画素に対応する画像データを画像データ記憶手段から読み出すことであり、あるいは仮想画面上にシークラインにより指定される点の画像データ(光学的特性値)を物理画面の画像データに基づいて演算することである。
撮像対象物が撮像対象物支持装置に支持された物体全体である場合は、その物体の輪郭線の内側がエッジ内、その物体の周辺がエッジ外あるいは背景となり、撮像対象物が物体表面に形成されたキャラクタ,凹部,傷等である場合には、それらを囲む物体表面がエッジ外あるいは背景となる。いずれにしても、撮像対象物に対応する画像データと背景に対応する画像データとの間には相違がある。逆に言えば、背景との間に相違がある場合でなければ、画像処理により撮像対象物に関する情報を取得することができない。
撮像対象物とその周辺とでは上記のように光学的特性値に差があるため、エッジ点において光学的特性値が急変する。したがって、物理画面上で画素毎に得られる光学的特性値の変化を求めることにより、また、仮想画面上で光学的特性値の変化勾配を求めることによりエッジ点を決定することができる。
物理画面上においてはエッジ点が画素単位で求められるが、仮想画面上においてはシークライン上の任意の点においてエッジ点が求められ、画像処理の分解能を必要に応じて高くすることができる。
本態様によれば、撮像対象物のエッジ点を得ることができる。それにより、例えば、撮像対象物の形状が予め判っている場合には、比較的少ないシークラインの設定で撮像対象物の寸法,位置,回転角度等を算出することができる。また、撮像対象物の形状が予め判っていなくても、シークラインの数を多くし、多数のエッジ点が得られるようにすれば、エッジ点の集合から形状を求め、寸法,位置,回転角度等を求めることが可能になる。
撮像対象物支持装置が、撮像対象物を正確な位置および回転角度で位置決めする位置決め装置を備えるものであり、撮像対象物の寸法もほぼ一定である場合には、測定テンプレートは一義的に決まる。しかし、撮像対象物支持装置が位置決め装置を備えないものである場合には、撮像対象物の位置および回転角度が一義的に決まらない。その場合には光学式測定装置を、測定テンプレートに加えて、次項に記載の捜索テンプレートを使用するものとすることが必要となる。
(17)前記画像処理装置が、
一定の距離を隔てた2個の点を一対とするポイントペアを複数組有する捜索テンプレートのデータを記憶する捜索テンプレートデータ記憶手段と、
その捜索テンプレートデータ記憶手段の捜索テンプレートを前記画像データ記憶手段の画像データの表す画像が存在する画面に重ねた場合に、前記複数組のポイントペアを構成する各対の点の光学的特性値の相違状態が設定状態以上である場合には、それら各対の点が、前記画像の光学的特性が急変する部分であるエッジの両側に位置する適合状態にあるとし、前記複数のポイントペアのうち設定量以上のものが適合状態にあれば、撮像対象物は捜索テンプレートに適合する捜索対象物であると判定する判定手段と、
を含む(15)項または(16)項に記載の光学式測定装置。
本態様の光学式測定装置の画像処理装置における「画像データの表す画像が存在する画面」も、前項に記載の光学式測定装置の画像処理装置におけると同様に、物理画面ないし実在画面であっても、仮想画面であってもよい。
エッジは多くの場合閉曲線となり、各ポイントペアの2点の一方はエッジ内に位置し、他方はエッジ外に位置することとなる。そのため、厳密さを要しない場合には、「エッジ内,エッジ外」の表現を用いることとするが、エッジが閉曲線とならない場合もあるため、厳密さを要する場合には、「各ポイントペアの2点がエッジの両側に位置する」との表現を用いることとする。
捜索テンプレートデータは、ポイントペアを構成する2個の点の画面上における位置を規定するデータであり、「捜索テンプレートを画像データの表す画像が存在する画面に重ねる」とは、画面が物理画面の場合、捜索テンプレートデータにより指定された各位置にある画素の画像データを画像データ記憶手段から読み出して光学的特性値を得ることである。また、画面が仮想画面である場合は、捜索テンプレートを仮想画面上に置いたと想定し、捜索テンプレートデータにより指定される仮想画面上の各点の光学的特性値を物理画像のデータから演算で求めることである。この場合の物理画像データは、各光電変換素子毎の電気信号の大きさ自体を表すアナログデータあるいはデジタルデータか、階調データであることが必要であり、2値化データでは意味がない。
前述のように、エッジにおいて光学的特性が急変するため、ポイントペアの一方の点が撮像対象物のエッジ内に位置し、他方の点がエッジ外(背景内)にあれば、換言すれば、ポイントペアの一方の点に対応する画像データが撮像対象物を表すデータであり、他方の点に対応するデータが背景を表すデータであれば、ポイントペアを構成する2個の点の光学的特性値の相違状態が設定状態以上になるはずであり、相違状態が設定状態以上ではないポイントペアの組の数(または率)が予め定められた設定数(または設定率)以下である場合には、その撮像対象物が捜索対象物であると判定することができる。また、そのようなポイントペアの組を探すことにより、画面上において撮像対象物の像を探すことができる。
「光学的特性値が設定状態以上」とは、輝度や色相等の差が設定値以上であることや、輝度や色相等の比率が設定値以上であること等である。
捜索テンプレートを物理画面に重ねて光学的特性値を求める場合、画像データはアナログデータや階調データ(以下、階調データ等と称する)でもよく、2値化データでもよい。階調データ等であれば、ポイントペアの2個の点の一方の値と他方の点の値との差が設定値以上であること、あるいは両値の比率が設定比率以上であることが光学特性値の相違状態が設定状態以上であることになる。2値化データであれば、ポイントペアの2個の点の一方の値が0であり、他方の値が1であれば光学的特性値の相違状態が設定状態以上であることになる。
撮像対象物(捜索対象物)の位置がほぼ一定である場合には、捜索テンプレートは一定の位置で画面に重ね合わされればよいが、撮像対象物の位置と回転角度との少なくとも一方が不定である場合には、判定手段は、捜索テンプレートの位置と回転角度との少なくとも一方を、判定結果が肯定になるか、予め定められた変更限度に達するまで変更しつつ判定を繰り返すものとされる。捜索テンプレートが変更される場合、位置や回転角度の異なる複数の捜索テンプレートが予め準備されても、標準位置および標準回転角度の標準捜索テンプレートのみが準備され、一般的な位置や回転角度の捜索テンプレートは必要に応じて座標変換により作成されてもよい。「変更限度」とは、例えば、画像処理対象部を捜す捜索領域が設定されている場合に、それ以上捜索テンプレートの位置を変更すれば捜索テンプレートが捜索領域からはみ出してしまう位置に達したことや、捜索テンプレートの位置が予め定められている回数変更されたこと等である。
本態様の光学式測定装置の好適な利用分野の一つは、立体形状の測定対象物の寸法検査である。寸法検査においては、測定対象物としての撮像対象物の寸法がほぼ一定であるため、捜索テンプレートの使用に適しているのである。撮像対象物支持装置を測定対象物を一定の位置に位置決めして支持するものとすれば、測定対象物の像に捜索テンプレートを重ね合わせることが容易となって、特に能率よく検査を実行することができる。
本態様の光学式測定装置の別の好適な利用分野は、電気回路組立ラインである。例えば、電気部品装着装置においては、プリント基板等の装着対象材に装着される電気部品やプリント基板に設けられた基準マーク等が撮像対象物とされ、スクリーン印刷機においては、スクリーンに設けられた基準マークや印刷用透孔等が撮像対象物とされる。また、撮像対象物は、物体全体の輪郭に限らず、部分が撮像対象物にされることもある。例えば、角形のチップではチップそのものが撮像対象物であるが、リードや半田バンプ等を有する電気部品においては、それらリードや半田バンプ等を有する本体が撮像対象物とされる他、1本のリードや1個の半田バンプが撮像対象物とされることもある。本体の輪郭の外側に位置するリード等は勿論、内側に位置するリード,半田バンプ等、他の部材の輪郭の内側に位置する物が撮像対象物とされることもあるのである。後者の場合、捜索テンプレートは、物体全体の輪郭の内側に位置する物の輪郭を捜索対象として作成されるとともに、物理画面上あるいは仮想画面上において、物体全体の輪郭の像の内側であって、内側に位置する物の物理画像あるいは仮想画像の形成が予定される位置に重ねられ、撮像対象物が捜索される。
以上の説明から明らかなように、本態様によれば、画像データおよび捜索テンプレートを用いて捜索対象物の有無や撮像対象物が捜索対象部であるか否かを知ることができる。ポイントペアを構成する2個の点の光学的特性値の算出および比較をポイントペアの数だけ行うことにより判定することができ、処理を容易にかつ迅速に行うことができる。また、捜索テンプレートと測定テンプレートとの両方が使用される場合には、撮像対象物が複数の捜索テンプレートの一つにより捜索対象物であると判定されれば、その捜索テンプレートのデータとマスタ測定テンプレートのデータとにより、捜索対象物であるとされた撮像対象物を測定対象物として測定するための測定テンプレートを設定することができ、測定対象物(撮像対象物)を正確に位置決めする必要のない光学式測定装置が得られる。
(18)前記画像処理装置がさらに、前記捜索テンプレートを、前記捜索対象物を規定する捜索対象物規定データに基づいて自動的に設定する捜索テンプレート自動設定手段を含む(17)項に記載の光学式測定装置。
捜索対象物の位置および回転角度がほぼ一定である場合には、捜索対象物規定データに基づいて捜索テンプレートが1個設定されるようにすればよい。しかし、捜索対象物の位置,回転角度の少なくとも一方が一定ではない場合には、その一定ではないものが基準の状態にある場合についてマスタ捜索テンプレートが設定され、そのマスタ捜索テンプレートに上記位置および回転角度のうち一定ではないものに対応する変更が施されて、少なくとも1つの捜索テンプレートが設定されるようにすることが必要となる。
本態様においては、捜索テンプレートが自動で設定されるため、作業者が設定する必要がなく、使用が容易でかつ高能率の光学式測定装置が得られる。
(19)前記画像処理装置がさらに、前記捜索テンプレートに基づいて前記測定テンプレートを自動で設定する測定テンプレート自動設定手段を含む(17)項または(18)項に記載の光学式測定装置。
捜索対象物の位置および回転角度がほぼ一定である場合には、捜索テンプレートが一義的に決まるため、測定テンプレートも一義的に決まる。しかし、捜索対象物の位置,回転角度の少なくとも一方が一定でない場合には、捜索テンプレートが複数設定され、それらのいずれかによって撮像対象物が捜索対象物であると判定される。したがって、測定テンプレートは、撮像対象物が捜索対象物であると判定された捜索テンプレートに基づいて自動設定されることになる。
有効な測定テンプレートを簡単に得ることができ、測定対象物(撮像対象物,捜索対象物)の位置,回転角度,寸法等の測定を迅速に行うことが可能となる。
(20)前記画像処理装置がさらに、一つの測定テンプレートを用いた測定対象物の位置,回転角度および寸法の少なくとも1つの測定結果に基づいて、再測定のための新たな測定テンプレートである再測定テンプレートを自動で設定する再測定テンプレート自動設定手段を含む(19)項に記載の光学式測定装置。
一つの測定テンプレートを用いた測定対象物の位置,回転角度および寸法の少なくとも1つの測定結果に基づいて再測定テンプレートが設定されるようにすれば、再測定テンプレートを上記一つの測定テンプレートより測定対象物とのずれの小さいものとすることができ、ずれの小さい測定テンプレートにより測定を行う方が高い精度を得ることができる。
(21)前記撮像素子が、多数の光電変換素子を備え、各光電変換素子の受光状態に応じた電気信号を発生させるものであり、前記画像データ記憶手段がそれら各光電変換素子の電気信号のデータを、各光電変換素子の位置と関連付けて記憶するものであり、かつ、前記画像処理装置がさらに、画像データ記憶手段の画像データにより形成される物理画面に対応して想定される仮想画面上の任意の点を指定する点指定手段と、その点指定手段による点指定毎に前記物理画面上の光学的特性値のデータに基づいて指定された点の光学的特性値を演算する仮想点データ演算手段とを含む(16)ないし(20)項のいずれか1つに記載の光学式測定装置。
(16)ないし(20)項のいずれかに係る画像処理装置において撮像装置により撮像が行われるときは通常、撮像面が多数の画素に分解され、画素のそれぞれについて画像データが作成されて画像データ記憶手段に記憶される。画像データにより表される画像は、画素を単位とし、光学的特性値が画素毎に得られる画像でもよく、あるいは画素を単位とせず、光学的特性値が任意の点において得られる画像でもよい。この任意の点の画像データを予め求めておく代わりに、画面上の任意の点が指定された場合に、その点のみの光学的特性値を各点が指定される毎に演算によって求めることも可能である。本態様の画像処理装置はこの仮想画像,仮想画面を利用する態様であり、記憶容量の比較的小さい画像データ記憶手段を使用しながら、迅速にかつ高精度で測定対象物の測定や検査対象物の欠陥検査を行うことができる。
(22)前記エッジ点座標演算手段が、
前記シークライン上に設定された複数の分割点の光学的特性値を取得する分割点特性値取得手段と、
その分割点特性値取得手段により取得された分割点の光学的特性値に基づいてシークライン上における光学的特性値の最も急激な変化点をエッジ点として捜索するエッジ点捜索手段と
を含む(16)ないし(21)項に記載の光学式測定装置。
(23)前記複数の分割点のピッチが前記光電変換素子のピッチより小さい(22)項に記載の光学式測定装置。
(24) (1)ないし(14)項のいずれか1つに記載の撮像装置と、
その撮像装置により撮像された画像を表す画像データを処理することにより前記撮像対象物の欠陥を検出する画像処理装置と
を含む光学式検査装置。
本態様によれば、撮像対象物の欠陥を高い信頼性を以て検査し得る光学式検査装置が得られる。
(25)前記画像処理装置が、
前記撮像装置により撮像された画像のデータである画像データを記憶する画像データ記憶手段と、
その画像データ記憶手段に記憶された画像データにより表される画像の光学的特性が急変する部分であるエッジと交差しないことが予定されたネガティブシークラインを設定するネガティブシークライン設定手段と、
その設定されたネガティブシークラインがエッジと交差する場合には前記撮像対象物に欠陥があると判定する判定手段と
を含む(24)項に記載の光学式検査装置。
本態様の光学式検査装置によれば、撮像対象物支持装置に支持された物体の表面に存在する傷や汚れ、物体の外側面に存在する切欠,ばり等の欠陥を、ネガティブシークラインを利用して迅速に検出することができる。ネガティブシークラインは、エッジと交差しないことが予定されているシークラインである。そのネガティブシークラインがエッジと交差すれば、物体の表面あるいは外周の予定されていない部分にエッジが存在するということであり、欠陥が存在すると推定することができるのである。なお、欠陥の検査は、撮像対象物支持装置に支持された物体全体についてのみならず、物体の一部についても行うことができる。物体自体が検査対象物とされる場合も、物体の一部が検査対象物とされる場合もあるのである。
(26)前記画像処理装置がさらに、前記撮像対象物の位置,回転角度,寸法の少なくとも1つを測定する測定手段を含み、前記ネガティブシークライン設定手段が測定手段により測定された前記位置,回転角度,寸法の少なくとも1つに基づいて前記ネガティブシークラインを設定する(25)項に記載の光学式検査装置。
ネガティブシークラインは前述のように、エッジと交差しないことが予定されたシークラインであるから、傷や汚れ等の欠陥検査に使用される場合には、検査対象物の位置,回転角度,寸法等が既知であることが必要である。検査対象物が正確な寸法を有し、かつ正確な位置および回転角度に位置決めされる場合には、測定手段を省略することが可能であるが、検査対象物の寸法が不正確であったり、検査対象物が正確な位置や回転角度に位置決めされない場合には、ネガティブシークラインの設定に先立って検査対象物(対象物が検査対象物であるか否かが未定である状態では撮像対象物)の位置,回転角度,寸法のうち、不正確であるものが測定されることが必要となる。換言すれば、測定手段を含む画像処理装置によれば、位置,回転角度,寸法等が一定しない検査対象物の欠陥も支障なく検査できるのである。
(27)前記画像処理装置がさらに、前記画像データ記憶手段に記憶された画像データにより表される画像の光学的特性が急変する部分であるエッジと交差することが予定されたポジティブシークラインを設定するポジティブシークライン設定手段を含む(25)項または(26)項に記載の光学式検査装置。
ネガティブシークラインとポジティブシークラインとを併用すれば、一方のみを使用する場合に比較して、対象物の検査の信頼性と能率との少なくとも1つを向上させることができる。
(28) (1)ないし(14)項のいずれか1つに記載の撮像装置と、
その撮像装置により撮像された画像を表す画像データを処理することにより前記撮像対象物の位置および回転角度を取得し、かつ、その取得した位置および回転角度のデータと予め付与された欠陥検出用データとに基づいて撮像対象物の欠陥を検出する画像処理装置と
を含む光学式検査装置。
前記(15)項に記載の測定の特徴と、(24)項に記載の検査の特徴とを合わせて有する光学式検査装置であり、測定に関しては前記(16)ないし(23)項の特徴を採用することができ、検査に関しては前記(25)ないし(27)項に記載の特徴を採用することができる。画像処理装置に、上記欠陥検出手段に加えて、画像データの処理により撮像対象物の寸法を取得し、その取得した寸法を基準寸法とを比較して寸法検査を行う寸法検査手段を設けることも可能である。
なお付言すれば、(15)項に記載の測定に関する特徴、(24)項に記載の検査に関する特徴、および本項の特徴は、前記 (1)項に記載の撮像装置に関する特徴とは独立に採用することができる。
【0009】
【発明の実施の形態】
以下、本発明を立体形状の対象物(撮像の際は撮像対象物、測定の際は測定対象物、検査の際は検査対象物となる。以下、それぞれの場合に適した呼称を使用する)の撮像、位置,回転角度および寸法の測定、寸法検査および欠陥検査を行う装置に適用した場合の一実施形態を図面に基づいて説明する。本装置は、本発明の一実施形態である撮像装置を含む。本光学式検査装置は、図1〜8に示す撮像装置10と、図12に示す画像処理装置12,モニタテレビ14および入力装置16とを含んでいる。入力装置16は、キーボード18,マウス20,フットスイッチ22等を含んでいる。画像処理装置12は、入力装置16から入力される情報,指令等に応じて作動し、撮像装置10により撮像された画像のデータを処理して検査対象物の寸法を測定し、その測定寸法を基準寸法と比較して合否の判定を行う。また、検査対象物表面に傷や汚れ等の欠陥があるか否か、外周部に欠け等の欠陥があるか否かの検査も行う。撮像された画像,測定された寸法,判定結果および欠陥の有無等は表示装置としてのモニタテレビ14に表示される。さらに、モニタテレビ14の表示内容を記録媒体としての記録用紙に印刷する印刷装置を画像処理装置12に接続することも可能である。
【0010】
画像処理装置12の作動に必要な情報の入力はキーボード18およびマウス20を使用して行われるが、作動開始指令等の単純な指令はキーボード18,マウス20およびフットスイッチ22のいずれからも入力可能であり、特に多数の検査対象物の検査を連続的に行う場合には、フットスイッチ22により作動開始指令を入力すれば、両手を検査対象物の交換等別の作業に使用することができ、便利である。さらに、検査の結果、検査対象物が不合格であった場合には、画像処置装置に内蔵のブザーが作動するようになっており、オペレータはモニタテレビ14を常時注視している必要がなく、本光学式検査装置はこの点でも使い勝手のよいものとなっている。
【0011】
次に、撮像装置10について説明する。撮像装置10は図8に概念的に示す構成を有し、具体的には図1〜7に示す構造を有している。図1〜3において、符号30は装置本体を示す。装置本体30は複数の部材が組み立てられて成り、全体として矩形の箱状をなしている。装置本体30の第1の部材は垂直に立ち上がった支持壁32であり、その支持壁32の垂直な一側面に支持壁34が固定されている。それら両支持壁32,34の下端にベースプレート36が固定されるとともに、支持壁32の中央部にフレーム38が固定されている。支持壁32,34の上端にカバー部材40が固定されるとともに、支持壁32と平行なカバー部材42が固定され、1つの側面のみが開放された箱状の構造物が構成されている。なお、図1においては、カバー部材42が除かれ、位置のみが二点鎖線で示されている。また、支持壁32は、図2から明らかなように、それ自体が浅い箱状の部材であり、内部には図示を省略する補強のリブが複数形成されている。図2においては、カバー部材40とビームスプリッタ72とが省略されている。
【0012】
この装置本体30内に、撮像部50と平行光発生部52とが構成されている。撮像部50は、フレーム38と2枚のガラス板54,56とを有する撮像対象物支持装置58を備えている。フレーム38に、それを上下方向に貫通する貫通孔60が形成され、その貫通孔60(図2参照)の上方と下方の開口部に2枚のガラス板54,56が配設されているのである。フレーム38にはそれを、支持壁32およびカバー部材42に直角な方向に貫通する貫通孔62も形成されており、支持壁32およびカバー部材42にもその貫通孔62に対応する開口64,66が形成されている。平行光発生部52は、後述の構成により、フレーム38の貫通孔60を下から上へ向かう平行光(図8参照)を発生させる。したがって、カバー部材42の開口66から物体を挿入して下側のガラス板54上に載せれば、その物体は背面側(下面側)から平行光により照明されることとなる。本撮像装置10においては物体のシルエット像が撮像されるのであり、物体全体が撮像対象物であることになる。なお、支持壁32の開口64は、撮像対象物が長い場合でも、それのフレーム38への挿入を許容するために形成されているものである。
【0013】
撮像部50は、上記撮像対象物支持装置58の他に、凹面鏡70,ビームスプリッタ72,オリフィス74,レンズ系76およびCCDカメラ78(図2参照)を備えている。凹面鏡70は放物面鏡であり、光軸に平行に入射する光を焦点に向かって反射する。凹面鏡70は支持壁34に固定されており、それの焦点の位置にオリフィス74のピンホール80(図8参照)が位置させられている。これら凹面鏡70とオリフィス74との間の位置にビームスプリッタ72が配設されている。ビームスプリッタ72は、前記フレーム38の貫通孔60の中心線と、凹面鏡70の光軸との交点の位置に、それら中心線および光軸に対して45度傾斜した姿勢で支持壁32に支持されている。ビームスプリッタ72は入射した光の一部は透過させ、残りの部分は反射するものであり、図8に示すように、平行光発生部52において発生させられ、フレーム38の貫通孔60を通過した平行光のうちの、ビームスプリッタ72によって反射されたものが凹面鏡70に入射する。この光は、実質的に凹面鏡70の光軸に平行な方向から凹面鏡70に入射するため、凹面鏡70の焦点に集光される。
【0014】
この集光した光は、オリフィス74のピンホール80を通過し、放射状に広がった後、レンズ系76により平行光に変換される。レンズ系76の焦点が凹面鏡70の焦点と一致させられているからである。オリフィス74は、凹面鏡70に入射する光(すなわち撮像対象物の周囲を通過した光)のうち、凹面鏡70の光軸に平行なもののみを通過させ、他の方向の光は通過させない機能を果たすものであり、その機能はピンホール80の直径が小さいほど鋭くなる。ピンホール80が面積のない理論的な点であれば、厳密に平行光のみのがピンホール80を通過することとなるが、現実には微小な面積を有するものとせざるを得ず、光軸に対して微小角度傾斜した方向の光もピンホール80を通過し、それら実質的に凹面鏡70の光軸に平行な光により、CCDカメラ78の撮像素子としてのCCD82(図2,図8参照)の撮像面に画像が形成される。したがって、鮮明な画像を得るためには、レンズ系76の、ピンホール80の位置にある焦点とは反対側の焦点の位置にCCD82を配置することが必要である。CCD82は、多数の光電変換素子(電荷結合素子)が格子状に形成されたものであり、各光電変換素子に入射した光の強さに応じた電気信号を、各光電変換素子の位置に対応させて取り出し可能なものである。
【0015】
上記オリフィス74およびレンズ系76は、共通の筒体内に組み込まれて一体的な光学系を構成している。本実施例装置においては、図5,6,7に示すように、長,中,短と長さが3段階に異なる筒体90,92,94内に組み込まれて、視野が小,中,大と3段階に異なる3種類の光学系96,98,100が準備されており、目的に合わせて選択的に装置本体30に取り付けられる。その意味において、以下、光学系96,98,100を交換レンズと称することとする。これら交換レンズ96,98,100は、ブラケット102を介して装置本体30に取り付けられ、その後端にCCDカメラ78が螺合により着脱可能に取り付けられる。
【0016】
凹面鏡70への平行光の入射方向は正確に凹面鏡70の光軸に平行であることが必要であり、また、オリフィス74のピンホール80は正確に凹面鏡70の焦点の位置にあることが必要であるため、ビームスプリッタ72の傾斜角度を調節する傾斜角度調節装置108と、交換レンズ96等の軸方向位置を調節する位置調節装置110とが設けられている。
【0017】
傾斜角度調節装置108は、図4に示すように、取付軸112,偏心操作部材114および長穴116を含んでいる。取付軸112は前記支持壁32に直角に固定され、ビームスプリッタ72を、前記フレーム38の貫通孔60の中心線と凹面鏡70の光軸との両方に直角な回動軸線のまわりに回動可能に支持している。偏心操作部材114は、支持壁32に取付軸112の軸線に平行な軸線のまわりに回転可能に保持された被支持軸部118とそれに対して偏心した偏心カム部120とを備え、偏心カム部120がビームスプリッタ72に形成された長穴116に嵌入させられている。長穴116は、ビームスプリッタ72の回動軸線と直交する方向に長く形成されており、偏心カム120は、その長穴116にその長穴116の幅方向には実質的に相対移動不能に嵌入させられているため、偏心操作部材114が回転操作されるにつれてビームスプリッタ72が取付軸112の軸線である回動軸線のまわりに回動し、凹面鏡70の光軸に対する傾斜角度が調節される。角度調節後、ビームスプリッタ72はボルト122により支持壁32に固定される。
【0018】
位置調節装置110は、図2に最も明瞭に示されているように、前記ブラケット102の他、キー126,キー溝128,調節ねじ部材130,調節ねじ部材保持部材132等を含んでいる。キー126は装置本体30に凹面鏡70の光軸に平行に固定されてガイドを形成しており、このキー126にブラケット102のキー溝128が嵌合されている。また、ブラケット102は複数本のボルト134により装置本体30に固定されるが、それらボルト134は緩められた状態で、ブラケット102の装置本体30に対する相対移動を許容しつつ装置本体30からの過大な浮き上がりを防止する。以上によって、ブラケット102の移動が凹面鏡70の光軸に平行な方向に規制されている。調節ねじ部材130は、装置本体30に固定されてその一部をなす調節ねじ部材保持部材132に回転可能かつ軸方向に移動不能に保持されるとともに、雄ねじ部138においてブラケット102の雌ねじ部140に螺合されている。したがって、調節ねじ部材130が回転操作されるにつれて、ブラケット102がキー126に沿って移動し、その結果、ブラケット102に保持されている交換レンズ96等およびCCDカメラ78の軸方向の位置が調節される。オリフィス74のピンホール80が丁度凹面鏡70の焦点の位置に位置する状態となったとき、ボルト134が締めつけられて、交換レンズ96等の位置が固定される。なお、調節ねじ部材は、ねじの向きあるいはピッチが違う2つの雄ねじ部を有し、それぞれの雄ねじ部においてブラケット102および装置本体30と螺合するものとすることも可能である。
【0019】
次に、平行光発生部52について説明する。平行光発生部52は、レンズ系76およびCCDカメラ78の代わりに、光源装置146が設けられている以外は、上記撮像部50と面対称に構成されている。凹面鏡148,ビームスプリッタ150およびオリフィス152が、それぞれ撮像部50の前記凹面鏡70,ビームスプリッタ72およびオリフィス74と、撮像対象物支持装置58の上下方向の中央を通る水平面を対称面とする面対称の位置に配設されているのである。さらに、平行光発生部52にも前記傾斜角度調節装置108および位置調節装置110と同じ構成の傾斜角度調節装置158および位置調節装置160が設けられている。
【0020】
上記光源装置146は、光源としてのハロゲンランプ170、それの光を導くグラスファイバ172、およびグラスファイバ172の先端からほぼ平行に放射される光をオリフィス152のピンホール174に集光させるレンズ系としてのボールレンズ176を含んでいる。ボールレンズ176により集光させられた光はピンホール174を通過して放射状に広がる。光源装置146が点光源として機能するのである。ピンホール174から放射された光の一部はビームスプリッタ150により反射されるが、残りはビームスプリッタ150を透過して凹面鏡148に入射する。ピンホール174は凹面鏡148の焦点に位置させられているため、ピンホール174から放射された光は凹面鏡148により、凹面鏡148の光軸に平行な平行光に変換される。この平行光がビームスプリッタ150により前記撮像対象物支持装置58に向かって反射される。
【0021】
本撮像装置は以上のように構成されているため、平行光発生部52において発生させられた平行光が、撮像対象物支持装置58を下から上へ貫通穴60の中心線に平行に通過する。したがって、撮像対象物支持装置58のガラス板54上に撮像対象物180(図8参照)を載せておけば、平行光の一部は撮像対象物180に遮られ、残りは撮像対象物180の周囲を通過する。この通過した光によって、前述のようにCCDカメラ78のCCD82に画像が形成されるのであるが、この画像は暗い撮像対象物180の像と明るい背景の像とから成る。撮像対象物180のシルエット像が得られるのであり、背景の明るい像は撮像対象物180の周囲を通過した平行光により形成されるため、撮像対象物180のシルエット像は透視図法ないし投影図法で描かれた図面の図形と正確に同じ寸法となる。図66に示すように、通常の光学系182を通してCCD184により撮像対象物180を撮像した場合には、撮像対象物180の光学系182から遠い部分の画像が、近い部分の画像に比較して小さく撮像されてしまう。もし、光学系182から遠い部分が二点鎖線で示すように、光学系182からの距離が他の部分と同じ位置にあれば、もっと大きな画像として取得されるのに対し、小さく撮像されてしまうのである。この問題は、撮像対象物180の光学系182に対向する面が光学系182の光軸に直角な一平面でない限り発生し、また、一平面であっても、その一平面の位置が一定しない限り発生し、三次元形状の検査対象物の寸法測定を不可能にする。それに対し、本撮像装置10によればこの問題が解消され、三次元形状の撮像対象物180であっても透視図法ないし投影図法で描かれた図面と同じ画像が取得されるため、この画像に基づいて寸法を求めれば、透視図法ないし投影図法上の寸法を取得することができる。
【0022】
以上説明した撮像装置10に代えて図9に示す撮像装置190を使用することも可能である。この撮像装置190は、撮像装置10における平行光発生部52を明背景形成装置の一種である均一照明装置192に変えたものである。均一照明装置192は、例えば、多数の発光ダイオードを格子上に配列した光源を乳白色の拡散板によって覆ったものとすることができる。多数の発光ダイオードから放射された光が拡散板内で拡散させられ、拡散板の表面からあらゆる方向に均一に放射される。したがって、撮像対象物180の周囲を通過する光は種々の方向の成分光を含むことになるが、前述のように、ピンホール80を有するオリフィス74は、凹面鏡70へそれの光軸に平行な方向から入射した成分光を選択的に通過させる機能を有しているため、撮像素子としてのCCD82には、撮像対象物180の、透視図法ないし投影図法で描かれた図面の図形と正確に同じ寸法となる。
【0023】
図10に示す撮像装置200を使用することも可能である。この撮像装置200は上記撮像装置190における撮像対象物180(すなわち撮像対象物支持装置)とオリフィス74,レンズ系76およびCCDカメラ78との位置を入れ換えたものである。撮像装置190においては、撮像対象物支持装置が凹面鏡70の側から見てビームスプリッタ72の反射方向に配設され、オリフィス74等が透過方向に配設されていたが、図10の撮像装置200においては、撮像対象物支持装置がビームスプリッタ72の透過方向に配設され、オリフィス74等が反射方向に配設されているのである。この構成の撮像装置200によっても透視図法ないし投影図法上の画像を得ることができる。
【0024】
図11に示す撮像装置204を使用することも可能である。この撮像装置204は、プリント配線板に電気回路を装着してプリント回路板を組み立てる電気部品装着システムにおいて、電気部品保持部材としての吸着ノズル206に保持された撮像対象物としての電気部品208の位置および回転角度を測定するために構成されたものである。吸着ノズル206は紫外線放射器210からの紫外線を受けて可視光線を放射する蛍光板212(可視光線を乱反射する乱反射板を使用することも可能である)を備えている。本撮像装置204は、蛍光板212(あるいは乱反射板)を明背景形成装置として使用し、撮像対象物(電気部品208)の正確なシルエット像を取得するものなのである。
【0025】
以上図面に基づいて説明した撮像装置はすべて撮像対象物のシルエット像を取得するものであったが、平行光発生部52,均一照明装置192,蛍光板212等に代えて、撮像対象物を前面側から照明装置により照明して正面像を取得することも可能である。その一例は、図11の撮像装置204において、紫外線放射器210を可視光線を放射するリングライトに変更したものである。紫外線放射器210とリングライトとの両方を設けておき、選択的に使用することにより、撮像対象物としての電気部品208のシルエット像も正面像も取得できるようにすることも可能である。撮像対象物の正面像を取得すれば、それの表面上に存在する凹部,突部、表面上に印刷されたキャラクタ、表面上に生じた傷,汚れ等の欠陥の像を得ることができる。
【0026】
次に、画像処理装置12について説明する。画像処理装置12は、上記のようにしてCCDカメラ78により取得された画像のデータを処理し、撮像対象物180の外側や内側の輪郭線に基づいて、撮像対象物180の寸法,位置,基準回転位置からの回転角度等を求める。また、撮像対象物180の表面に存在するキャラクタ,図形,凹部,傷,汚れ等の輪郭線に基づいて、キャラクタ,図形,凹部等を識別し、傷,汚れ等欠陥を検出する。この画像処理は複雑であるので、後にまとめて詳述することとし、ここでは省略する。
画像処理装置12は、さらに、上記のように求めた寸法,位置,回転角度等のデータを基準データと比較して合否の判定を行い、その判定結果を、求めた寸法,位置,回転角度等の値と共にモニタテレビ14に表示させる。また、撮像対象物180の表面に存在するキャラクタ,図形,凹部等の識別結果や、傷,汚れ等欠陥の検出結果もモニタテレビ14に表示させる。
【0027】
この画像処理装置12は、本来、電気部品供給装置から供給される電気部品を、吸着ヘッド等の部品保持ヘッドにより保持し、搬送して、プリント基板等の回路基材に装着する電気部品装着装置用の画像処理装置として開発されたものである。電気部品装着装置においては、部品保持ヘッドによる電気部品の保持位置や保持方位(基準回転位置からの回転角度で表され、以下、回転角度と称する)を検出し、あるいは基材支持装置により支持された回路基材の位置や回転角度を検出し、それらの誤差を修正した上で、電気部品を回路基材に装着することが行われており、そのために、電気部品や回路基材の基準マークを撮像する撮像装置が必要であり、これら撮像装置の画像処理装置として開発されたものなのである。しかし、一般的な工業製品の位置,回転角度,寸法の測定や検査、欠陥の有無の検査にも使用が可能である。
【0028】
画像処理装置12はコンピュータを主体とするものであり、図13に示すように、CPU254,DRAM(ダイナミックラム)256,SRAM(スタティックラム)258,PROM(プログラマブルロム)260,漢字ROM262,フレームグラバメモリ264,および4面分のオーバレイ表示メモリ266を有し、これらは基板267上の図示しない内部バスによって互に接続されている。
【0029】
上記内部バスにはまた、2チャンネルのシリアルインタフェース270が接続され、入力装置16が接続されている。入力装置16は、テンキー,アルファベットキー等を有する前記キーボード18を主体とし、光学式検査装置全体の運転に必要な情報,指令と共に、画像処理対象物(物体の全体でも一部でもよい)の種類,個数等,画像処理に必要な情報を入力する装置である。バスにはまた、イーサネットインタフェース274およびメモリカードインタフェース276が接続されている。
【0030】
イーサネットインタフェース274は電気部品装着装置等の、画像処理装置以外の部分を制御するコンピュータとの間で通信を行うためのインタフェースである。画像処理装置12には、オプションの制御機器を接続可能であり、イーサネットインタフェース274はP1コネクタ268を介してデータ交換を行うのである。また、電気部品装着装置の各種駆動装置を制御する制御装置も、コンピュータを主体として画像処理装置12とは別に設けられ、図示しない外部バスを介してP1コネクタ268に接続される。この別の制御装置は本発明とは関連が薄いため図示および説明は省略する。
メモリカードは、画像処理を行うために予め作成されたプログラムが記憶されたものであり、画像処理装置12にセットされれば、CPU254がPROM260を使用してメモリカード内のプログラムやプログラムの実行に必要なデータをメモリカードインタフェース276を介して読み出し、DRAM256に記憶させる。
【0031】
バスには更に、CCDカメラインタフェース280が接続され、これに前記光学式検査装置のCCDカメラ78(または電気部品装着装置のCCDカメラ78)が接続される。CCDカメラ78により得られた画像のデータである画像データは、CCDカメラインタフェース280を介してフレームグラバメモリ264に格納される。前述のように、フレームグラバメモリ264は4つ設けられており、例えば、連続して撮像される4個の撮像対象物180の画像データが各フレームグラバメモリ264に順次格納される。
【0032】
バスには更に、テレビインタフェース286が接続され、モニタテレビ14が接続されている。モニタテレビ14はカラー表示およびモノクロ表示の両方が可能である。前述のように、撮像対象物180の撮像により得られた4つのモノクロ画像の画像データが、フレームグラバメモリ264に並列的に格納されるようになっており、一方オーバレイ表示メモリ266は、画像を16色のカラーで表示するカラー画像データを記憶し得るメモリを4面分備えている。モニタテレビ14には、上記4つのモノクロ画像のいずれか1つに、上記4面分のカラー画像のうちモノクロ画像に対応するものが重ねて表示され、画像処理の経過や結果が表示される。
この同じモニタテレビ14に、入力装置16を用いて入力されたデータもカラーで表示される。この表示時に漢字ROM262が使用される。
【0033】
以下、CCDカメラ78の撮像により得られた画像データの処理について説明する。
画像処理のためのプログラムやデータは前述のようにメモリカードに記憶されており、メモリカードがセットされれば読み出されてDRAM256に記憶される。メモリカードから読み出される画像処理プログラムを図14ないし図16にそれぞれ示す。これらのプログラムの実行により、画像処理対象物(撮像対象物)の寸法,位置,回転角度等の測定、寸法の検査ならびに欠陥の有無の検査が行われる。
【0034】
図14に示すプログラムは事前処理プログラムである。事前処理プログラムは、一検査プログラムの立ち上げ時、すなわち事前処理プログラムのDRAM256への格納後に実行される。まず、一検査プログラムの実行に必要なすべての画像処理対象物のうちの1つについて、パターンマッチングを行うか否かが判定され、行うのであればマスタ捜索テンプレートに基づいて捜索テンプレートが生成されてDRAM256に記憶される。同様の処理がすべての画像処理対象物について順次行われる。
【0035】
上記マスタ捜索テンプレートは2個の点を一対とするポイントペアを複数組有し、それらポイントペアを規定する座標面(マスタ捜索テンプレート座標面と称する)が画像処理装置12の基準座標面と一致しているものである。すなわち、マスタ捜索テンプレート座標面の原点および座標軸の方向が、CCDカメラ78の視野の中心に原点が設定された基準座標面の原点および座標軸の方向と一致しているのである。マスタ捜索テンプレートは、画像処理対象物の形状,寸法に基づいて予め作成されてメモリカードに記憶されており、事前処理プログラムと共にDRAM256に読み込まれる。
【0036】
図17に、画像処理対象物が正方形の部分である場合のマスタ捜索テンプレートの設定データの一例を示し、そのデータによって設定されるマスタ捜索テンプレート300を図18に示す。図17のデータ中、第7,8,10,11行のデータおよび第5行のhs(ハーフスパン)=5.5がマスタ捜索テンプレートの設定データである。Pairとは、ポイントペアを構成する2個の点の延長線上において、画像処理対象物の中心線に対して対称に別のポイントペアを設定することを意味する。例えば、図18に示す(7),(8),(10),(11) の各ポイントペア302に対して(7) ´,(8)´,(10) ´,(11) ´の各ポイントペア302が設定されるのである。これらポイントペア302に付された括弧付の数字は、図17における行番号と一致している。また、304は画像処理対象物である。
【0037】
マスタ捜索テンプレートは、寸法,位置,回転角度のいずれにも誤差のないマスタ画像処理対象物について、各組のポイントペアを構成する2個の点の一方が画像処理対象物の内側に、他方が外側に位置し、かつ、それらポイントペアの2個の点の中点がマスタ画像処理対象物のエッジ(輪郭線)上に位置するように作成される。それを図に示せば、図18に示すようになるのである。
なお、一般的には、ポイントペアの2個の点の中点がマスタ画像処理対象物のエッジ上に位置することは不可欠ではなく、2個の点がそれぞれ画像処理対象物のエッジより内側と外側とに指定されればよい。
また、図18に示す例の場合、ポイントペア302の2個の点のうちの一方の点が別のポイントペア302の一方の点と共通にされているが、これも不可欠なことではない。
さらに、図18においては、いずれの点がポイントペア302を構成するかを判り易く示すために、ポイントペア302を構成する2個の点が直線でつながれているが、この直線は説明の都合上の線であって実際に直線のデータが設定されるわけではない。
【0038】
図21に、画像処理対象物が、一部が切り欠かれた図22の円板306である場合のマスタ捜索テンプレートのデータを示す。このマスタ捜索テンプレート308においては、円周部分に設けられた(15)〜(17)のポイントペア310は(15)´〜(17)´のポイントペア310とペアにされているが、その他のポイントペア310は他のポイントペアとペアにされてはいない。
【0039】
光学式検査装置においては、画像処理対象物が、例えば撮像対象物180の像の全体とされ、検査されるべき複数種類の撮像対象物180についてのマスタ捜索テンプレートデータが予め作成されてメモリカードに記憶されており、画像処理実行時にはDRAM256に格納される。そのため、捜索テンプレートの生成時には、捜索テンプレートを生成すべき撮像対象物180の種類に応じてマスタ捜索テンプレートデータがDRAM256から読み出される。マスタ捜索テンプレートは前述のように回転角度が0度の捜索テンプレートであり、マスタ捜索テンプレートが設定角度範囲内において図20に二点鎖線で示すように設定ピッチで回転させられることにより、複数種類の捜索テンプレートが生成され、そのデータがDRAM256に格納される。
【0040】
この捜索テンプレートの生成角度範囲および設定ピッチをそれぞれ指定するデータは、図17に示すように、マスタ捜索テンプレートのデータと共に記憶されている。第15行のpitchA=4.5 が設定ピッチのデータであり、第16行のstartA=-45および第17行のendA=45 が捜索テンプレートの生成角度範囲を規定するデータである。捜索テンプレートを生成する角度範囲およびピッチは撮像対象物180に応じて設定される。例えば、撮像対象物180が撮像対象物支持装置58のガラス板54上に載置される際の回転角度が大きくずれることが予想される場合には、生成角度範囲が広くされるのである。因みに、図14に示す事前処理プログラムの例では、生成角度範囲が−45度から+45度とされ、設定ピッチが5度とされている。
【0041】
1つの撮像対象物180についての捜索テンプレートの生成が終了すれば、プログラムの実行は最初に戻り、次の撮像対象物180についてパターンマッチングを行うか否かの判定および行うのであれば捜索テンプレートの生成が行われる。パターンマッチングを行わない場合にはプログラムの実行は始めに戻り、次の撮像対象物180についてパターンマッチングを行うか否かの判定が行われる。全部の撮像対象物180についてパターンマッチングを行うか否かの判定,パターンマッチングを行う撮像対象物180についての捜索テンプレートの生成が行われたならば図14のプログラムの実行は終了する。
【0042】
次に、図15に示す実行処理プログラムを説明する。このプログラムは、CCDカメラ78により撮像対象物180が撮像され、画像データがフレームグラバメモリ264に格納された後に実行される。まず、撮像対象物180が四角形物等、パターンマッチングのみで処理可能であれば、図16に示すパターンマッチングプログラムに従って画像処理が行われる。
【0043】
次に、画像処理対象物が、QFP(クウォード フラットパッケージ),PLCC(プラスティック リーデッド チップ キャリア),SOP(スモール
アウト ライン パッケージ)等多数のリードを備えて形状が複雑な電気部品、BGA(ボール グリッド アレイ)の半田バンプ等画像処理対象物の数が多いもの、太陽電池のグリッドパターンのように画像処理対象物の形状が複雑なもの、形状が単純な円や四角形ではない機械部品、画像処理のためにパターンマッチングを組み合わせたパターンマッチングマネージャを作動させる必要があるものであるか否かが判定される。パターンマッチングの組合わせについては後述する。
【0044】
パターンマッチングマネージャ作動の必要がなければ、仮想画面上での画像処理を行うべきか否かが判定され、判定の結果がNOであれば物理画面上での画像処理を行うべきか否かが判定される。物理画面は、光学的特性値が画素毎に求められて画像データが実在する画像の画面であり、仮想画面は、画素に拘束されない任意の点の光学的特性値が必要に応じて演算によって求められる画面である。上記パターンマッチングおよびパターンマッチングマネージャはいずれも、後に説明するように、仮想画面上で行われる処理であるが、本実施形態においては、これらの他に、パターンマッチングによらないで仮想画面上と物理画面上とでそれぞれ画像処理を行い得るようにされている。上記「仮想画面上での画像処理を行うべきか否か」および「物理画面上での画像処理を行うべきか否か」の判定は、パターンマッチングまたはパターンマッチングマネージャの画像処理を行うことが指令されているか否かの判定なのである
【0045】
図16に示すパターンマッチングプログラムを説明する。
まず、サーチウインドウが設定され、画像処理対象物を捜索する捜索領域が設定される。サーチウインドウの設定は、CCDカメラ78の撮像面の一部あるいは全部を座標値によって指定することにより行われる。画像処理対象物が何であるかは、作業手順中のデータにより判っており、撮像面に形成される画像処理対象物の像の位置はおおよそ判るため、サーチウインドウは位置に多少のずれがあっても画像処理対象物を包含するに適した十分な大きさに設定される。このようにすれば捜索領域が狭くて済み、短時間で捜索することができる。
【0046】
フルセットのパターンマッチング処理は、捜索対象部を捜索する捜索ステップ,捜索対象部のおおよそのエッジ点を捜索する再捜索ステップ,捜索対象部のエッジ点を演算する測定ステップ,測定ステップを繰り返し行う再測定ステップおよび検査ステップの5つのステップを含む。通常は5つのステップ全部の終了によりパターンマッチングが終了する。1つでも異常のステップがあれば、次のステップは実行されず、直ちにパターンマッチングが終了させられる。
【0047】
まず、捜索ステップを説明する。
捜索ステップにおいては、DRAM256から捜索テンプレートが1つずつ順次読み出され、図24に示すように画像処理対象物の像320と背景(画像処理対象物以外の部分の意であって、画像処理対象物が部品表面の凹部等である場合には部品表面の像が背景となる)とを含む画像が存在する画面321に重ねられ、捜索テンプレート322の複数のポイントペア324を構成する2個の点(以下、ポイントペア構成点と称する)の光学的特性値(本実施形態では輝度)が演算される。図17に示す例では、回転角度が−45度の捜索テンプレートから順に読み出される。
【0048】
ポイントペア構成点は仮想画面上の点であり、ポイントペア構成点の輝度は物理画面上の複数の画素の画像データとしての輝度から補間演算により求められる。捜索テンプレートのデータにより指定された仮想画面上の点の光学的特性値が物理画面の画像データに基づいて求められるのであり、これを視覚的に表したのが図24であって、請求項10にいう「捜索テンプレートを画像データの表す画像が存在する画面に重ねる」とはこのことを意味する。図24の画面321は仮想画面であり、この画面321内の画像対象物の像320はこの位置に存在すると仮想されているのみで、実際にこの像320を表す画像データは存在しない。他の図に関しても同様である。
【0049】
ポイントペア構成点の輝度の補間演算は、例えばX,Y座標面上における4×4個の制御点の画像データによって規定される双3次スプライン曲面等の曲面を使用して行うことも可能であるが、本実施形態においては、ポイントペア構成点に隣接する4個の画素の画像データに基づいて、最も単純な線形補間により行われる。図25において(u0 ,v0 )はポイントペア構成点、f(u0 ,v0 )はポイントペア構成点の輝度、(u´,v´),(u´+1,v´),(u´,v´+1),(u´+1,v´+1)はそれぞれ線形補間に使用される4個の画素の中心位置、f(u´,v´),f(u´+1,v´),f(u´,v´+1),f(u´+1,v´+1)は4個の画素の各輝度であり、ポイントペア構成点の輝度は(1)式によって演算される。
f=(u0 ,v0 )=f(u´,v´)(1−α)(1−β)+f(u´+1,v´)α(1−β)+f(u´,v´+1)(1−β)β+f(u´+1,v´+1)αβ・・・・・・・(1)
【0050】
上記演算は図26に示す物理画面/仮想画面変換ドライバ380によって行われる。図に示すように、物理画面/仮想画面変換ドライバ380は、一般的な画像処理アプリケーションソフトウエア382とは別に構成されており、画像処理アプリケーションソフトウエア382において、物理画面384上の画像データに基づいて仮想画面386上の画像データを演算する必要が生じる度に、物理画面/仮想画面変換ドライバ380が呼び出されて、仮想画面386上の画像データの演算が行われるのである。
【0051】
各対のポイントペア324の2個の構成点について輝度が演算される毎に、それら2個のポイントペア構成点の輝度が比較される。CCDカメラ78によるシルエット像の撮像時には、画像処理対象物(撮像対象物180)に対応する部分と背景に対応する部分とでは固体撮像素子の電荷量に差が生ずる。画像処理対象物の像が暗く、背景が明るくなるのである。そのため、2個のポイントペア構成点の一方が画像処理対象物のエッジ内に位置し、他方の点がエッジ外に位置するのであれば、2個のポイントペア構成点の輝度に予め設定された設定値以上(設定値が正の場合)または設定値以下(設定値が負の場合)の差が生ずる。
【0052】
上記輝度差の設定値はマスタ捜索テンプレートデータと共に記憶されている。例えば、図17においては第5行に記述されているように設定値diffが20に設定されている。この場合には、2個のポイントペア構成点のうち、画像処理対象物のエッジ内のポイントペア構成点の輝度がエッジ外のポイントペア構成点の輝度より20階調以上小さければ、設定値以上の差があると判定される。
逆に、設定値diffが−20に設定されていれば、画像処理対象物のエッジ外のポイントペア構成点の輝度がエッジ内のポイントペア構成点の輝度より20階調以上小さければ、設定値以上の差があると判定される。
いずれの場合もそれら2個のポイントペア構成点は画像処理対象物のエッジを跨いでおり、適合状態にあることになる。この場合に、「2個のポイントペア構成点が設定輝度差条件を満たす」と表現することとする。
【0053】
(1) 画像処理対象物が捜索対象部ではなく、2個のポイントペア構成点がエッジを跨いでいない、(2) 供給ミスにより撮像対象物180が検査対象物支持板72上に載置されていない、あるいは(3) 固体撮像素子にごみ等が付着して画像データが得られない等の理由により、2個のポイントペア構成点が設定輝度差条件を満たさず、適合状態にあるとは言えないことがある。この状態をポイントペアのフェールと称する。捜索テンプレートに適合する捜索対象部が存在しないと判定するためのフェール数は予め設定されている。例えば、図17においては、第3行に示すようにフェール数は0に設定されており、全部のポイントペアについて2個のポイントペア構成点が設定輝度差条件を満たさなければ、捜索テンプレートに適合する捜索対象部が存在するとは判定されないようになっている。
【0054】
フェール数が1以上に設定されているとすれば、複数組のポイントペアのうち設定輝度差条件を満たさないポイントペアが設定フェール数を越える数あれば、捜索テンプレートに適合する捜索対象部は存在しないと判定される。−45度の回転角度において捜索対象部が存在すると判定されれば、捜索ステップは終了し、再捜索ステップが実行されるが、存在しないと判定されれば、回転角度が異なる捜索テンプレートが読み出されて捜索対象部が捜索される。
【0055】
捜索対象部が存在すると判定されるまで、複数種類の捜索テンプレートが順次読み出され、捜索対象部が捜索される。全種類の捜索テンプレートを用いて捜索しても、捜索テンプレートに適合する捜索対象部が存在するとの判定が得られなければ、次に捜索テンプレートの位置をずらして捜索が行われる。X軸方向とY軸方向とにそれぞれ一定ピッチずつずらされ、各位置においてそれぞれ回転角度の異なる複数種類の捜索テンプレートを用いて捜索対象部が捜索されるのである。
【0056】
この移動ピッチは予め設定され、マスタ捜索テンプレートを規定するデータと共にメモリカードに記憶されている。図17において第13行および14行に示されているpitchX=2.2, pitchY=2.2が移動ピッチである。まず、Y軸方向に設定ピッチ移動させられる。具体的には、複数種類の捜索テンプレートの各ポイントペアの座標がY軸方向を正方向へ設定ピッチ分ずれるように座標変換が行われるのである。この捜索テンプレートを用いて捜索対象部の捜索が行われる。この位置において回転角度の異なる全種類の捜索テンプレートを用いても捜索対象部が存在するとの判定が得られなければ、次に捜索テンプレートがX軸方向を正方向へ設定ピッチ分ずらされる。さらにここでも捜索対象部が存在するとの判定が得られなければ、次に捜索テンプレートはY軸方向を負方向へ設定ピッチ分ずらされる。ここでも捜索対象部が存在するとの判定が得られなければ、次に捜索テンプレートは更にY軸方向を負方向へ設定ピッチ分ずらされ、さらにここでも捜索対象部が存在するとの判定が得られなければ、次に捜索テンプレートはX軸方向を負方向へ設定ピッチ分ずらされる。捜索テンプレートはサーチウインドウ内を角形の螺旋形を描くように移動させられるのである。
【0057】
捜索テンプレートを移動させても捜索対象部が存在するとの判定を得ることができず、座標変換を行ったとき、サーチウインドウからはみ出すポイントペアが生ずるに至れば、捜索テンプレートの移動は不可能であって捜索テンプレートに適合する捜索対象部は存在しないと判定され、捜索ステップは異常終了される。前記モニタテレビ14に異常発生が表示されるとともに、異常の発生が記憶される。画像処理対象物が検査対象物180である場合には、画像処理結果が異常であると判定された検査対象物180の検査対象物支持板72への載置位置がオペレータによりチェックされ、載置位置が大きく外れておれば、位置の修正が行われ、大きく外れていなければ、検査対象物180は予定されたものではないと判断されて、排除される。
【0058】
図24に示す画像処理対象物の像320のように全部のポイントペア324の2個のポイントペア構成点が像320のエッジの内側と外側とにあり、設定輝度差条件が満たされれば、そのときの捜索テンプレートの位置および回転角度がDRAM256に記憶され、再捜索ステップが実行される。再捜索ステップにおいては、図27に示すように再捜索テンプレート328を用いて画像処理対象物の像320のエッジ点が、再捜索テンプレート328の座標面である再捜索テンプレート座標面(捜索テンプレート座標面と同じである)上において捜索される。再捜索テンプレート328は、複数本のシークライン330を含む。シークライン330は、捜索ステップにおいて画像処理対象物の像320を見つけた捜索テンプレートに基づいて設定される。ポイントペアの2個のポイントペア構成点がシークライン330の両端をそれぞれ規定する点とされるのである。
【0059】
設定された複数本のシークライン330のそれぞれについて画像処理対象物の像320のエッジ点が捜索される。この意味において、再捜索テンプレート328は測定テンプレートと考えることもできる。この捜索は、図28に示すように、予め定められたピッチ(例えば0.05mm)でシークライン330を分割し、複数の分割点P1〜P15の各々についてそれぞれ輝度を演算することにより行われる。このピッチは、CCDカメラ78の固体撮像素子332の対角線より短い長さに設定されている。そのため、1個の固体撮像素子332の中に分割点が3個ないし4個含まれることとなる。分割点も仮想画面上の点であり、捜索ステップにおけると同様に線形補間が行われ、分割点P1〜P15の輝度が演算される。
【0060】
線形補間によって演算された15個の分割点P1〜P15の各輝度の一例を図29に示す。なお、輝度値は正の値で表され、輝度値取得対象物が明るいほど値は大きくなる。本実施形態の撮像装置10は、画像処理対象物としての検査対象物180に背面側から平行光を照射し、検査対象物180の周囲を通過した平行光に基づいて像を取得するようにされており、以下の説明は画像処理対象物が暗くて輝度値が小さく、背景は明るくて輝度値が大きいものとして行う。
線形補間によって演算された輝度値からは、図32のグラフに示すように、どこで輝度が最も大きく変化するかが判らない。そのため、差分フィルタを用いて輝度値の微分値を求める。図30に示す差分フィルタを用いて微分値を求めた結果を図33のグラフに示す。この差分フィルタは、シークラインを規定する一方の点から他方の点に向かって、隣接する2個の点のうち上流側に位置する点の輝度を負の値とし、下流側に位置する点を正の値とし、それら2個の値の和を求めるフィルタである。この微分値は分割点の値ではなく、図33のグラフにおいては、輝度微分値の得られる位置が隣接2分割点の中央位置である「.5」で示されている。このグラフから明らかなように、輝度変化の大小は判るが、どこが最大であるかは判らない。
なお、演算方向に応じて、すなわち画像処理対象物の内側にある分割点から画像処理対象物の外側(背景内)にある分割点に向かって演算を行うか、逆に行うかにより、輝度微分値の符号が逆になる。前者の場合は輝度微分値が正の値になり、輝度微分値が最大の位置が輝度の変化勾配の絶対値が最大の位置である(変化勾配の絶対値が最大の位置の輝度微分値を極大値と称する)。後者の場合は輝度微分値が負の値になり、輝度微分値が最小の位置が輝度の変化勾配の絶対値が最大の位置である(変化勾配の絶対値が最大の位置の輝度微分値を極小値と称する)。図33および次に説明する図34のグラフに示す輝度微分値は、前者の演算により得られた値である。
【0061】
それに対し、図31に示す差分フィルタを用いて微分を行えば、図34のグラフに示すように、f8.5の位置に輝度微分値の極大値177が得られ、この位置が輝度の変化勾配の絶対値が最大の位置であることが判る。図31に示す差分フィルタは、シークライン上に設定された分割点のうちの1つに対して、その分割点を含んで演算方向において上流側の4個の分割点をいずれも負の値とし、下流側において連続する4個の分割点の輝度値をいずれも正の値とし、それらの和を求めるフィルタである。
【0062】
固体撮像素子のエッジ点に対応する部分に汚れ等が付着して電荷量に変化が生ずれば、エッジ点ではない位置において輝度微分値の極大値あるいは極小値が得られることがあるが、そのような位置における輝度の変化勾配の絶対値は小さい。それに対しエッジ点近傍においては、画像処理対象物と背景との明るさに顕著な差があって輝度の変化勾配の絶対値が大きい。そのため、設定値を設け、変化勾配の絶対値が最も大きい位置の輝度微分値が、エッジ点近傍について得られた値であるか否かを判定し、前者の場合を排除する。この設定値は、輝度微分値が正の値で得られる場合には正の値で設定され、輝度微分値の極大値が設定値以上であるか否かが判定され、極大値が設定値以上であれば、その極大値はエッジ点近傍の位置に得られた値であって、エッジ点の演算に用いることができると判定され、エッジ点の演算が行われる。また、輝度微分値が負の値で得られる場合には、設定値は負の値で設定され、輝度微分値の極小値が設定値以下であるか否かが判定され、極小値が設定値以下であれば、その極小値をエッジ点の演算に用いることができると判定される。換言すれば、輝度微分値の極大値が設定値より小さく、あるいは極小値が設定値より大きくてエッジ点が演算されないことが再捜索ステップにおけるシークラインのフェールである。
【0063】
図17に示す例においては、図32および図33に示す例と同様に、画像処理対象物の内側にある分割点から外側にある分割点に向かって輝度微分値の演算を行うように決められており、輝度値の変化勾配の絶対値が最も大きい位置において輝度微分値は最大になり、その極大値がエッジ点近傍において得られた値であるか否かを判定する設定値は、正の値、すなわち第5行に示すようにll=200とされている。本例では画像処理対象物の方が背景より暗いため、輝度微分値が正の値で求められるとともに、その値が200以上でなければ、エッジ点の位置の演算が行われないようにされている。
【0064】
また、図17に示すように、どのような差分フィルタを用いて演算を行うかも予め決められている。この差分フィルタ係数Nは(2)式に従って演算される。
N=gUnit/分割点間ピッチ・・・・・・・(2)
ただし、gUnit は固体撮像素子の対角線の長さである。
【0065】
差分フィルタを用いて微分が行われ、輝度微分値の極大値(または極小値)が得られれば、輝度の変化勾配の絶対値が最大の位置、すなわちエッジ点が下記の式に従って求められる。なお、(3)式および(4)式は、N=4の場合を例に取った式であり、fmax ,f(max-4) 〜f(max-1) ,f(max+1) 〜f(max+4) はそれぞれ、輝度微分値(fmax は極大(小)値)である。「f」は、図34に示すように、数字が付されてシークライン上の輝度微分値の取得位置を表すが、(3),(4)式においては、fに付された数字により指定される位置の輝度微分値を表す。fmax は輝度微分値が極大(小)の位置(図33に示す例ではf8.5 )の輝度微分値であり、f(max-1) ,f(max-2) ,f(max-3) ,f(max-4) はそれぞれ、演算方向においてfmax より上流側の4個所(図33に示す例ではf7.5 ,f6.5 ,f5.5 ,f4.5 )の各輝度微分値であり、f(max+1) ,f(max+2) ,f(max+3) ,f(max+4はそれぞれ、演算方向においてfmax より下流側の4個所(図33に示す例ではf9.5 ,f10.5,f11.5,f12.5) の各輝度微分値である。
dl=fmax ×4 −(f(max-1) +f(max-2) +f(max-3) +f(max-4) )・・・・・・・(3)
dr =fmax ×4 −(f(max+1) +f(max+2) +f(max+3) +f(max+4) )・・・・・(4)
edgePitch =(dl×N)/(dl+dr)−N/2・・・・・・(5)
エッジ点=(輝度微分値極大(小)値点ピッチ数+edgePitch)×分割点ピッチ・・・・・(6)
(3)式および(4)式はN=4の場合の式であるが、一般的には、dlを求める場合、極大(小)値点の輝度微分値にNを掛けた値から、演算方向において極大(小)値点より上流側のN個の点の各輝度微分値の和が引かれ、drを求める場合、極大(小)値点の輝度微分値にNを掛けた値から、極大(小)値点より下流側のN個の点の各輝度微分値の和が引かれる。なお、図29に示す演算結果を図31に示す差分フィルタを用いて微分を行った場合にエッジ点を求めるとき、(6)式の輝度微分値極大(小)値点ピッチ数は、8.5である。
【0066】
エッジ点の演算時には、まず、線形補間により分割点の輝度が演算され、差分フィルタ係数Nに従って微分が行われた後、(3)〜(6)式に従って演算が行われて輝度の最大変化位置、すなわちエッジ点が求められる。図28に示すシークライン330の場合、(6)式の演算結果は0.403mmになり、シークライン330の分割点P1から0.403mmの位置にエッジ点があることが判る。
【0067】
このようにして複数本のシークライン330の各々についてエッジ点が演算される。シークライン330のフェール数(ポイントペア302のフェール数が設定数以下である場合には捜索テンプレートに適合する捜索対象部が存在すると判定されるようにされている場合には、ポイントペア302のフェール数とシークライン330のフェール数との和)が設定数以下であれば正常であると判定されて測定ステップが実行され、設定数を越えるフェールがあれば異常終了される。異常発生時の処理は捜索ステップと同じである。図17においては第3行に示すようにfail Countが0に設定されており、フェールが1つでもあれば再捜索ステップは異常終了させられる。
【0068】
フェール数が設定数以下であり、再捜索ステップが正常に終了すれば、次に測定ステップが実行される。再捜索テンプレートは、捜索ステップにおいて捜索対象部ありと判定した捜索テンプレートに基づいて設定されており、シークライン330上においてエッジ点を見つけることはできるが、エッジ点とシークライン330の中点(図27に×印を付して示し、以下、アイデアルポイントと称する)との間にはずれがあるのが普通である。前記ポイントペアを構成する2個の点は、捜索対象部に寸法,位置,回転角度のずれがなければそれら2個の点の中点が捜索対象部のエッジ上に位置するように設定されており、アイデアルポイントとエッジ点とが一致するはずであるが、実際には画像処理対象物にはずれがあり、アイデアルポイントと演算により得られたエッジ点とにはずれが生ずるのである。
【0069】
そのため、再捜索ステップが異常なく実行されれば、次に測定ステップが実行され、エッジ点の位置が演算される。測定ステップにおいては、まず、図35に示すような測定テンプレート336が自動設定される。測定テンプレート336は、複数のシークライン338を有しており、予め設定されたマスタ測定テンプレートのデータと、上記再捜索ステップにおける再捜索テンプレート座標面の基準座標面に対する相対位置のデータと、再捜索テンプレート座標面上におけるエッジ点の演算結果とに基づいて設定される。
【0070】
マスタ測定テンプレートデータは、前記図17に例示するように、マスタ捜索テンプレートデータ等と共に記憶されている。図17の第20行〜33行のデータが測定ステップ実行のためのデータであり、第21行のhs=3.5,第23行〜27行および第29行〜33行のデータがマスタ測定テンプレートデータである。このデータにより得られるマスタ測定テンプレート340を図19に示す。342はシークラインである。マスタ測定テンプレート340は同じ電気部品用のマスタ捜索テンプレートより多くのシークラインを有している。
なお、画像処理対象物が一部が切り欠かれた円板306の場合には、図23に示すように複数のシークライン346を有するマスタ測定テンプレート344が設定される。
【0071】
測定テンプレートのシークラインの一部あるいは全部がペアにされている。シークラインの延長線上に、画像処理対象物の中心線に対して対称に別のシークラインが設定されているのである。これらペアにされたシークラインをペアシークラインと称する。
測定テンプレートは、マスタ測定テンプレートデータの座標変換によって設定される。再捜索テンプレートの座標面(この再捜索テンプレートの座標面は、捜索ステップにおいて画像処理対象物が捜索テンプレートに適合する捜索対象部であると判定された際の捜索テンプレートの捜索テンプレート座標面と共通である)の基準座標面に対する相対位置および相対回転角度と、再捜索テンプレート座標面に対する画像処理対象物の相対位置および相対回転角度(これらは再捜索ステップにおいて演算されたエッジ点の座標値に基づいて演算されるが、この演算については後に説明する)とに対応する座標変換を、マスタ測定テンプレートデータ(基準座標面と一致するマスタ測定テンプレート座標面において設定されている)に施して設定されるのである。
【0072】
測定テンプレートの自動設定が終了したならば、その測定テンプレートの各シークライン上のエッジ点の演算が、再捜索ステップにおけるそれと同様に行われる。シークライン上に一定ピッチで分割点が設定され、分割点毎に線形補間によって輝度が演算されるとともに、差分フィルタが用いられて輝度微分値が演算されるとともにエッジ点が演算されるのである。測定ステップにおいても、許容されるフェールの数が設定されている。ここにおけるフェールは、再捜索ステップにおけると同様に、シークラインについてエッジ点が演算されないことを意味する。フェール数が設定数以下であれば正常とされ、次に再測定ステップが実行される。また、フェール数が設定数を越える数あれば測定ステップは異常終了させられる。異常発生時の処理は捜索ステップにおけると同じである。
【0073】
再測定ステップにおいては再測定テンプレートが設定され、エッジ点が演算される。再測定テンプレートは、測定テンプレートおよび測定ステップにおいて演算されたエッジ点に基づいて自動設定される。測定ステップにおいて得られたエッジ点に基づき、アイデアルポイントがエッジ点上に位置すると予想される位置へ測定テンプレートが座標変換により回転移動させられるのである。再測定ステップにおけるエッジ点の演算も再捜索ステップにおけると同様に行われる。
【0074】
再測定ステップにおける異常の判定は、測定ステップについて設定された許容フェール数が用いられ、エッジ点の得られないシークラインが設定数より多くあれば異常であって画像処理が終了される。異常発生時の処理は捜索ステップにおけると同じである。設定数以下であれば正常終了され、次にオブジェクトベクトル、すなわち画像処理対象物の寸法,位置,回転角度が演算される。再測定ステップの実行回数が多いほどアイデアルポイントとエッジ点とのずれが少なくなり、エッジ点の検出精度が向上する。再測定ステップの設定回数は予め設定されて記憶されている。
なお、2回目以降の再測定ステップの実行に用いられる再測定テンプレートは、その直前の再測定ステップ実行時における再測定テンプレートとその再測定ステップにおけるエッジ点の演算結果とから自動設定される。
【0075】
再測定ステップが正常に終了すれば、測定された画像処理対象物の寸法と基準寸法との差が演算され、その演算結果が許容誤差範囲と比較されて、許容誤差範囲内であれば合格、許容誤差範囲外であれば不合格と判定される。基準寸法および許容誤差範囲は、各画像処理対象物に対して予め定められ、メモリカードに格納されている。したがって、メモリカードが画像処理装置12に読み込まれれば、DRAM256に記憶され、寸法検査においてはこれら基準寸法および許容誤差範囲が使用される。
【0076】
上記寸法検査が正常に終了すれば、続いて欠陥の有無の検査である検査ステップが実行される。図17の最下部に例示するように、前記マスタ捜索テンプレートデータおよびマスタ測定テンプレートデータと共にマスタ検査テンプレートデータがDRAM256に記憶されている。このマスタ検査テンプレートデータにより表されるマスタ検査テンプレートは図57に示すものであり、このマスタ検査テンプレートデータと、再測定ステップの実行により測定された画像処理対象物の位置および回転角度のデータとに基づいて検査テンプレートデータが作成され、検査ステップが実行されるのである。なお、図57に示すマスタ検査テンプレートは、正方形の画像処理対象物304の右辺に切欠とばりとの欠陥が存在するか否かを検査するための2本のネガティブシークライン350,352と多数本のポジティブシークライン354とを含むものである。ポジティブシークライン354は本来右向きの矢印で表されるべきものであるが、図示の都合で単純な線分で表されている。検査ステップの詳細については後に説明する。
【0077】
モニタテレビ14には、画像処理の経過が表示される。例えば、捜索ステップの実行時には、フレームグラバメモリ264に格納されている画像データ(例えば、4つの検査対象物304を撮像した4セットの画像データの1セット)に基づいて画像処理対象物(検査対象物304)の像と背景とを含む画像がモノクロ表示され、その上に捜索テンプレートの角度が設定ピッチずつ変えられるとともに角形の螺旋状に位置が変えられる様子がカラー表示され、作業者に処理の進行状況が示される。
【0078】
モニタテレビ14は、自動選択表示モードと手動選択表示モードとの2つのモードで表示が可能なものとされており、自動選択表示モードに設定されている場合には、画像処理経過の表示と、入力装置16からの入力に関連した入力関連データとの両方が、入力関連データを優先させつつ表示される。したがって、自動選択表示モードに設定されている状態で、入力装置16によりデータが入力されれば、上記画像処理経過の表示から自動的に入力関連データの表示に切り換えられる。
手動表示選択モードにおいては、画像処理経過の表示と入力関連データの表示とのうち、オペレータの手動操作によって選択された方のみの表示が行われる。
【0079】
次に、画像処理対象物のオブジェクトベクトルの演算について説明する。以下に説明する演算を行うためのオブジェクトベクトル演算プログラムはメモリカードに記憶されており、メモリカードの画像処理装置12へのセット時にDRAM256に移される。
寸法,位置,回転角度は指定がある場合に演算される。例えば、図17の例においては、第5行および第21行のvf=PAのPが位置(Position) ,Aが角度(Angle) を表し、位置および回転角度を演算することが指定されている。
【0080】
寸法演算は例えば次の場合に必要になる。▲1▼画像処理対象物の寸法が必要な場合、▲2▼画像処理対象物を、捜索対象部に似ているが捜索対象部ではないものと識別したい場合、▲3▼エッジ測定にフェールがあり、かつ、位置測定精度を確保したい場合等である。▲2▼は、例えば、形状が同じで寸法が少し異なる電気部品を区別することが必要な場合である。▲3▼の場合に寸法演算が必要になるのは、フェールがある場合には、後述のようにフェールを考慮して画像処理対象物の位置を求めるために寸法が必要であるからである。
本実施形態においても、上記▲1▼〜▲3▼のいずれにも該当しない場合には寸法演算は行われないが、寸法演算の必要がある場合には、位置および回転角度の演算に先立って行われる。
【0081】
以下、画像処理対象物が四角形の検査対象物304であり、寸法,位置,角度の演算が指定されており、かつ、フェールがある場合を例に取って説明する。
まず、寸法演算を説明する。寸法演算は、寸法演算に使う旨の指示があるペアシークラインを用いて行われる。換言すれば、いずれのシークラインにも寸法演算に使う旨の指示がない場合,指示があってもシークラインがペアシークラインでない場合には寸法演算が行われないのである。1つのテンプレート内にシークラインについて寸法演算を行う旨の指定が1つもないときにはフラグが0にセットされ、1つでも指定があればフラグが1にセットされることにより、寸法演算を行うか否かが判定される。このようにすれば、寸法演算が不要である場合に、複数本のシークラインの一つ一つについて寸法演算に使うことが指示されているか否かを判定することなく寸法演算不要を知ることができ、処理時間が短くて済む。
【0082】
寸法演算の最初はサイズファクタの演算である。サイズファクタは、画像処理対象物の寸法の、測定テンプレート座標面(測定テンプレートの設定座標面)のX軸方向とY軸方向とのそれぞれにおける過大率である。X軸方向の寸法過大率は、図36に四角形物358を示すように、X軸方向に平行に設定された複数組のペアシークラインの各組のシークラインのエッジ点間の距離(測定スパンと称する)をペアシークラインのアイデアルポイント(図中×印が付された点)間の距離(本来のスパンと称する)で除した値を平均することにより求められる。また、Y軸方向の寸法過大率は、Y軸方向に設定された複数組のペアシークラインの各組のペアシークラインの測定スパンを本来のスパンで除した値を平均することにより求められる。なお、図36に破線で示すのは、フェールが生じたシークラインであり、フェールの生じたシークラインを含むペアシークラインについては、寸法過大率は演算されない。これらX軸方向の寸法過大率およびY軸方向の寸法過大率をそれぞれ、四角形物358のX軸方向,Y軸方向の各本来のスパンに掛けることにより寸法が演算される。
【0083】
複数本のシークラインのいずれか1つにでもフェールがあれば、フェールのないシークラインの全部についてアイデアルポイントをサイズファクタで補正した点であるサイズポイントが演算される。図37に例を示すように、Y軸方向にほぼ平行なシークラインについては、アイデアルポイントのY座標値にY軸方向の寸法過大率を掛けることによりサイズポイントのY座標値が演算され、図示は省略するが、X軸方向に平行なシークラインについては、アイデアルポイントのX座標値にX軸方向の寸法過大率を掛けることにより演算される。
【0084】
また、前述のように、サイズファクタの演算はX軸およびY軸に平行なシークラインであってペアにされているもののみを使用して行われるが、この得られたサイズファクタを用いたサイズポイントの演算等は、X軸ともY軸とも平行ではないシークラインについても行われる。傾斜したシークラインについてのサイズポイントの演算および以下の演算は、後述の円形の画像処理対象物(検査対象物)におけるサイズポイントの演算等と実質的に同じである。
【0085】
次いで、エッジ点とサイズポイントとの差Diffが演算される。サイズポイントは、寸法誤差を有する画像処理対象物に対して、その寸法誤差を承認した上で改めて測定テンプレートを設定し直したと考えた場合のアイデアルポイントに相当する。したがって、上記エッジ点とサイズポイントとの差Diffはエッジ点の位置ずれ量そのものを表していることになる。差Diffの演算は、エッジ点の座標値からサイズポイントの座標値を引くことにより行われるため、差Diffが正の値である場合にはエッジ点が測定テンプレート座標面上において正側へずれていることになるのである。
【0086】
このようにフェールがある場合にサイズポイントを演算するのは、画像処理対象物の位置の演算に対するフェールの影響を小さくし、演算誤差を小さくするためである。例えば、画像処理対象物の寸法が本来の寸法より大きいが位置ずれはない場合に、演算誤差ペアシークラインを構成する一方のシークラインにフェールがあり、他方のシークラインにフェールがないとすれば、サイズポイントを演算せず、アイデアルポイントのままで演算を行った場合には、フェールのない側においてエッジ点とアイデアルポイントとの差の和がフェールのある側より大きくなり、実際には位置ずれはないにもかかわらず画像処理対象物がフェールのないシークライン側にずれているとの演算結果が出されてしまうため、これを回避するためにサイズポイントの演算を行うのである。
【0087】
次に位置および回転角度の演算を説明する。光学式検査装置においては検査対象物304の外のり寸法あるいは内のり寸法のみが取得されればよい場合が多いが、画像処理対象物が、検査対象物304の表面に記載されたキャラクタや、検査対象物304の表面に発生している傷等である場合や、電気部品装着装置において吸着ヘッドに保持された電気部品208である場合には、それらの位置や回転角度の測定が必要となることがしばしばある。回転角度の演算は、0度,90度,180度,270度のシークラインであって、かつ、回転角度の演算に使用することが指示されているシークラインに基づいてのみ行われる。また、0度と180度、90度と270度との各処理は一括して行われる。
【0088】
位置および回転角度は、回転中心RCについて演算される。回転中心RCとはコンピュータの演算上の中心であり、オペレータが画像処理対象物の中心として指定する指定中心DCとは異なる場合もあり、一致する場合もある。指定中心DCは、検査対象物180の平面形状に中心点がある場合にはその中心点とされるのが普通であるが、中心点がない場合には勿論、中心点がある場合でも他の点が指定中心DCとされても差し支えない。画像処理対象物が電気部品208である場合には、その電気部品208を回路基材に装着するプログラムの作成に当たり、画像処理対象物の基準とされる点が指定中心DCとされる。また、前記マスタ捜索テンプレート座標面,マスタ測定テンプレート座標面等の原点が指定中心DCに置かれ、さらに、後述するように、指定中心DCについて電気部品208の水平面内における位置修正量が演算される。
【0089】
まず、図38に示す直線Lを例に取り、位置および回転角度の演算を説明する。直線Lには本来は4本のシークラインが設定されていたが1本がフェールしたか、あるいは当初から3本のシークラインが設定されていたかにより、3本のシークラインSL1 ,SL2 ,SL3 について上記差Diffが演算されたとすれば、回転中心RCは左側の2本のシークラインSL1 ,SL2 寄りに設定される。回転中心RCは、一方の側の複数本のシークラインと回転中心RCとの各距離の和(シークラインが1本の場合、そのシークラインと回転中心RCとの距離)の絶対値と、他方の側の複数本のシークラインと回転中心との距離の和(シークラインが1本の場合、そのシークラインと回転中心RCとの距離)の絶対値とが等しくなる位置に設定される。換言すれば、回転中心RCの一方の側を正,他方の側を負とすれば、全部のシークラインまでの距離の和が0になる位置に回転中心RCが設定されるのである。回転角度(ラジアン)は、(7)式によって演算される。
回転角度=(AO・A′+BO・B′+CO・C′)/(AO2 +BO2 +CO2 )・・・・・・・・・(7)
ただし、
AO:回転中心RCとシークラインSL1 との距離
BO:回転中心RCとシークラインSL2 との距離
CO:回転中心RCとシークラインSL3 との距離
A′:シークラインA上における差Diff
B′:シークラインB上における差Diff
C′:シークラインC上における差Diff
また、回転中心RCの位置は、(8)式によって演算される。
(A´+B´+C´)/3・・・・(8)
【0090】
差Diffと、エッジ点の回転中心からの距離を用いて複数のシークラインの各々について角度を演算し、それらを平均することによっても角度を得ることができるが、その場合、例えば、凹凸があって1個所でも角度が大きく外れればその誤差が最終的な角度の値に大きな影響を与える。それに対し、上記(7)式に従って角度を演算すれば、特定のエッジ点の誤差の影響を小さくすることができ、回転角度の演算精度を向上させることができる。
【0091】
複数本のシークラインのいずれかにフェールがあり、エッジ点が得られない場合には、図39に示すように、指定中心DCと回転中心RCとにずれが生ずる。SL2 がフェールのあったシークラインである。一般に、指定中心DCは画像処理対象物の中心に設定され、シークラインはその指定中心DCに対して対称に設定されるため、シークラインにフェールが生じ、それに対応した回転中心RCの設定が行われれば、指定中心DCと回転中心RCとにずれが生じるのである。
回転中心RCは前述のように、回転中心RCの一方の側を正とし、他方の側を負とすることにより、複数のシークラインの各エッジ点と回転中心RCとの距離の和が0になるように設定されることから(9)式が成立し、この(9)式とから(10)式が得られ、回転中心RCと指定中心DCとのずれvが演算される。
0 +t1 +t3 =0・・・・・・(9)
(s0 −v)+{s0 +(s1 −s0 )−v}+{s0 +(s3 −s0 )−v}=0・・・・・・・(10)
ただし、
0 :回転中心RCとシークラインSL0 との距離
1 :回転中心RCとシークラインSL1 との距離
3 :回転中心RCとシークラインSL3 との距離
0 :指定中心DCとシークラインSL0 との距離
1 :指定中心DCとシークラインSL1 との距離
3 :指定中心DCとシークラインSL3 との距離
【0092】
図40に示すように、シークラインが矩形の画像処理対象物の互に平行な2本の辺について設定されている場合、(11)式が成立し、回転中心RCと指定中心DCとのずれ量vは(12)式に基づいて演算される。
0 +t1 +t2 +t3 +t4 +t5 =0・・・・・・(11)
0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}+{s0 +(s5 −s0 )}−6v=0・・・・・・(12)
【0093】
図41に示す画像処理対象物の場合、(13)式が成立し、回転中心RCと指定中心DCとのずれvは(14)式に基づいて演算される。
0 +t1 +t2 +t3 +t4 =0・・・・・・(13)
0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}−5v=0・・・・・・(14)
【0094】
図42に示すように、シークラインが互に直角な2方向に設定されている場合にはX軸方向およびY軸方向に関してそれぞれ(15)式および(16)式が成立し、回転中心RCと指定中心DCとのX軸方向,Y軸方向の各位置ずれvx ,vy は、それぞれ(17)式および(18)式に基づいて演算される。
0 +t1 +t2 +t3 +t4 +t5 =0・・・・・・(15)
6 +t7 +t8 +t9 +t10+t11=0・・・・・・(16)
0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}+{s0 +(s5 −s0 )}−6vx =0・・・・・・(17)
6 +{s6 +(s7 −s6 )}+{s6 +(s8 −s6 )}+{s6 +(s9 −s6 )}+{s6 +(s10−s6 )}+{s6 +(s11−s6 )}−6vy =0・・・・・・(18)
【0095】
X軸方向について(17)式に基づいて回転中心RCX の指定中心DCに対するX軸方向の位置ずれvx を演算し、それに基づいて回転中心RCX が求められる。Y軸方向について(18)式に基づいて回転中心RCY の指定中心DCに対するY軸方向の位置ずれvy を演算し、それに基づいて回転中心RCy が求められる。回転中心RCX を通り、シークライン設定座標のY軸に平行な直線と、回転中心RCY を通り、X軸に平行な直線との交点が図42に示す画像処理対象物の回転中心RCである。
【0096】
シークラインが互に直角な2方向に設定されている画像処理対象物の別の例を図43に示す。この画像処理対象物については(19)式および(20)式が成立し、回転中心RCと指定中心DCとのX軸方向,Y軸方向の各ずれvx ,vy は、それぞれ(21)式および(22)式に基づいて演算される。ただし、図43に示す画像処理対象物は、回転中心RCと指定中心DCとにずれがなく、vx =vy =0であって、シークラインと回転中心RCおよび指定中心DCとの距離は同じであるとして図示されており、したがって、(19)式および(20)式と、(21)式および(22)式とにおいて同じ符号が使用されている。
0 +s1 +s2 +s3 =0・・・・・・(19)
4 +s5 +s6 +s7 =0・・・・・・(20)
0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}−4vx =0・・・・・・(21)
4 +{s4 +(s5 −s4 )}+{s4 +(s6 −s4 )}+{s4 +(s7 −s4 )}−4vy =0・・・・・・(22)
【0097】
回転角度を演算するために、図44に示す角度ファクタが予め設定されている。角度ファクタは、シークラインの位置および極性によって決定される。図44に示す角度ファクタをXY座標上で示せば図45に示すようになる。
【0098】
図46に回転中心RCおよび角度ファクタを用いて画像処理対象物の位置および回転角度を演算する例を示す。回転角度は(23)式,(24)式に従って演算される。(23)式におけるd00 ないしd41 の正負の符号は角度ファクタによって決められている。(23)式で演算される回転角度は、画像処理対象物の測定テンプレート座標面に対する回転角度である。
また、回転中心RCのX軸方向の位置ずれΔx,Y軸方向の位置ずれΔyはそれぞれ(25)式,(26)式により演算される。これら位置ずれΔx,Δyは、回転中心RCの実際の位置の本来あるべき位置からのずれ量である。
回転角度=(−d00 −d11 +d22 +d30 −d41 )/ta ・・・・・(23)
a =t0 2+t1 2+t2 2+v0 2+v1 2・・・・(24)
Δx=(d3 +d4 )/2・・・・・・・・・(25)
Δy=(d0 +d1 +d2 )/3・・・・・・(26)
ただし、d0 ,d1 ,d2 ,d3 ,d4 はそれぞれ、5本のシークラインにおけるエッジ点のサイズポイントからのずれ量である。
【0099】
画像処理対象物が矩形であり、図47に示すように矩形の像258のX軸,Y軸にそれぞれ平行な2辺に各々シークラインが設定されている場合の回転角度および回転中心RCの位置ずれΔx,Δyの演算を(27)式〜(29)式に示す。
回転角度=(−d00 +d11 +d22 −d33 +d40 −d51 −d62 +d73 )/(t0 2+t1 2+t2 2+t3 2+v0 2+v1 2+v2 2+v3 2)・・・・・(27)
Δx=(d4 +d5 +d6 +d7 )/4・・・・・・(28)
Δy=(d0 +d1 +d2 +d3 )/4・・・・・・(29)
0 〜d3 は回転中心RCからの距離がt0 〜t3 のシークライン上におけるエッジ点とサイズポイントとのずれ量であり、d4 〜d7 は回転中心RCからの距離がv0 〜v3 のシークライン上におけるエッジ点とサイズポイントとのずれ量である。
【0100】
上記各式が回転角度および位置ずれΔx,Δyの演算式として妥当なものであることを数学的に証明する代わりに、具体的に数値を代入して妥当性を示す。
図48に示す形状の画像処理対象物が、回転中心RCのまわりに−0.1(ラジアン)回転するとともに、回転中心RCがY軸方向に5mm、X軸方向に0mmずれた場合を想定する。この場合に、t0 =30mm,t1 =20mm,t2 =50mm,v0 =30mm,v1 =30mmとすれば、sin θ=θと見なしてよい程に回転角度が小さい限り、d0 =+8mm,d1 =+7mm,d2 =0mm,d3 =−3mm,d4 =+3mmとなるはずである。また、ta =t0 2+t1 2+t2 2+v0 2+v1 2を演算すれば5600(mm2 )が得られる。
これらの値を(30), (31) ,(32)式に代入すれば、下記の通り、回転角度および回転中心RCの位置ずれΔx,Δyがそれぞれ、−0.1ラジアン,5mmおよび0mmと求まり、式の妥当性が確かめられる。
回転角度={−(8×30}−(7×20)+(0×50)+(−3×30)−(+3×30)}/5600=−0.1・・・・(30)
Δx=(−3+3)/2=0・・・・・・・(31)
Δy=(8+7+0)/3=5・・・・・・(32)
【0101】
以上のようにして演算されるのは回転中心RCの回転角度および位置ずれであるが、画像処理対象物が電気部品208である場合には、その電気部品208の回路基材への装着作業の実行上必要なのは指定中心DCの回転角度および位置ずれであるため、回転中心RCの回転角度および位置ずれから指定中心DCのそれらを演算することが必要である。ただし、回転角度は回転中心RCについても指定中心DCについても同じであるため演算の必要はなく、位置ずれのみについて演算を行えばよい。
画像処理対象物に回転角度誤差がなく、単純にX軸方向とY軸方向とに位置ずれΔx1 ,Δy1 を生じたのみであれば、回転中心RCの位置ずれも指定中心DCの位置ずれも共にΔx1 ,Δy1 となる。しかし、画像処理対象物に回転角度誤差Δθが生じた場合には、図49に示すように回転中心RCからX軸方向およびY軸方向にそれぞれvx ,vy だけ離れた位置にある指定中心DCの位置ずれは、(Δx1 −Δθ×vy ),(Δy1 +Δθ×vx )となる。
【0102】
ここで演算された回転角度Δθおよび位置ずれ(Δx1 −Δθ×vy ),(Δy1 +Δθ×vx )は画像処理対象物の指定中心DCの測定テンプレート座標面に対する回転角度および位置ずれであるが、測定テンプレート座標面自体が図50に示すように基準座標面に対して回転角度θおよび位置ずれΔx2 ,Δy2 を有しているのが普通である。
そして、基準座標は一般にCCDカメラ78の光軸、すなわち視野の中心に原点を有する座標面として設定され、また、部品姿勢検出位置においては吸着ノズル206の軸線がCCDカメラ78の光軸と一致するように位置決めされる。この場合には、上記測定テンプレート座標面の基準座標面に対する回転角度θおよび位置ずれΔx2 ,Δy2 は、測定テンプレート座標面の吸着ノズル206の軸線に対する回転角度および位置ずれであることになる。
したがって、画像処理対象物としての電気部品の指定中心DCの吸着ノズル206の軸線に対する回転角度および位置ずれはそれぞれ、θ+Δθ,Δx2 +(Δx1 −Δθ×vy )cos θ,Δy2 +(Δy1 +Δθ×vx )sin θとなる。
【0103】
フェールがある場合には回転中心の座標,回転中心から各シークラインまでの距離,回転中心と指定中心との位置ずれ等の値が前述のように演算されるが、フェールがない場合はこれらの値は各画像処理対象物とテンプレートとの組合わせに対してそれぞれ一定の値に決まるため、これらの値がデフォルト値としてメモリカードに格納されており、このデフォルト値を用いて上記各演算が行われる。なお、寸法の演算が指定されておらず、すべてのシークラインがペアにされており、かつ、フェールもない場合には、サイズポイントの演算が省略されて、サイズポイントに代えてエッジ点とアイデアルポイントとの差が演算され、その演算結果に基づいて位置および回転角度が演算されるようにしてもよい。この場合には、サイズに誤差があっても、ペアシークラインを構成する2本のシークライン同士で寸法誤差の影響を打ち消し合い、位置の演算結果に影響を及ぼさないからである。
さらに、フェールがある場合でも、位置ずれの演算が指定されていない場合はサイズポイントが不要であり、演算を省略してもよい。
【0104】
次に、画像処理対象物がプリント基板の基準マーク等のように円形や円形の一部が切り欠かれた形状のものである場合について説明する。基準マークはプリント基板に付され、基準マークの撮像に基づいてプリント基板の位置誤差および回転角度誤差が算出される。したがって、基準マークの回転角度を演算する必要はない。
また、円形や円形の一部が切り欠かれた画像処理対象物の位置ずれの演算も矩形の画像処理対象物の位置ずれの演算と共通する部分が多いが、位置ずれの演算に特殊性がある。以下、この点について説明する。
【0105】
まず、図51〜図53に基づいて円形の像360のシークラインにフェールがある場合を説明する。ここでは、図51に示すように、破線で示す0度のシークラインがフェールのシークラインであり、また、円形の像360が、本来の寸法(図中二点鎖線で示す大きさ)より大きいものとする。
円形の像360についても始めに寸法演算が行われる。寸法演算においては、矩形の像358の場合と同様にサイズファクタが演算される。シークラインが図51に示すように45度間隔で放射状に8本設定されているとすれば、X軸方向,Y軸方向の各サイズファクタsizeFX,sizeFYはそれぞれ、sizeXM=sizeYM=0,baseXM=baseYM=0の初期設定を行った上で、(33)式〜(35)式によって演算される。
for(i=0; i<n;i++){sizeXM+=(測定スパン〔i〕/本来のスパン〔i〕)*|cos 角度〔i〕|;baseXM+=|cos 角度〔i〕|;sizeYM+=(測定スパン〔i〕/本来のスパン〔i〕)*|sin 角度〔i〕|;baseYM+=|sin 角度〔i〕|}; ・・・(33)
sizeFX=(sizeXM)/baseXM ; ・・・・・(34)
sizeFY=(sizeYM)/baseYM ; ・・・・・(35)
ただし、(33)式はC言語で記述されており、for(i=0; i<n;i++)は、i番目のシークラインについての{ }内の演算を、iを0からn−1まで1ずつ変化させつつ行った結果の総和を意味する。また、nはペアシークライン数であり、図51の例では4であるため、(33)式の演算に当たってiは0から3まで順次変えられることとなるが、このiがフェールのシークラインを含むペアシークラインを指定する値になった場合には、演算が行われることなく次のペアシークラインを指定する値に変えられるようになっている。したがって、図51の例では0度のシークラインを含むペアシークライン以外の3対のペアシークラインについて(33)式の演算が行われることとなる。
【0106】
円の場合、シークラインが放射状に設定されるため、X軸およびY軸に対して傾斜したシークラインが存在し、これらシークラインはX軸方向とY軸方向との両方について寸法過大率の成分を有する。そのため、(33)〜(35)式においては、各シークライン上における寸法過大率のX軸方向の成分とY軸方向の成分とが求められ、それぞれ成分比率に応じてサイズファクタの決定に寄与させられるようになっている。
この演算によって得られるsizeFXおよびsizeFYは、それぞれX軸方向とY軸方向との寸法過大率である。寸法誤差がX軸方向とY軸方向とで異なる比率で生ずる場合に対処するために、両方向で別個にサイズファクタが演算されるようになっているのである。
【0107】
次に、サイズポイントが演算される。まず、図53に示すようにアイデアルポイントとサイズポイントとの差であるpairDiffが(36)〜(43)式((36),(37)式はC言語で記述されている)によって演算され、 得られたpairDiffとアイデアルポイントとからサイズポイントが算出され、更にエッジポイントを用いてサイズポイントとエッジポイントとのずれDiffが演算されるのである。
ΔLx =pairRadius*cos θ*(sizeFX −1); ・・(36)
ΔLy =pairRadius*sin θ*(sizeFY −1); ・・(37)
ΔLx ≧0かつΔLy ≧0の場合
pairDiff=√{(ΔLx 2 +(ΔLy 2 }; ・・(38)
ΔLx <0かつΔLy <0の場合
pairDiff=−√{(ΔLx 2 +(ΔLy 2 }; ・・(39)
ΔLx <0かつΔLy ≧0であって|ΔLx |≧|ΔLy |の場合
pairDiff=−√{(ΔLx 2 −(ΔLy 2 }; ・・(40)
ΔLx <0かつΔLy ≧0であって|ΔLx |<|ΔLy |の場合
pairDiff=√{−(ΔLx 2 +(ΔLy 2 }; ・・(41)
ΔLx ≧0かつΔLy <0であって|ΔLx |≧|ΔLy |の場合
pairDiff=√{(ΔLx 2 −(ΔLy 2 }; ・・(42)
ΔLx ≧0かつΔLy <0であって|ΔLx |<|ΔLy |の場合
pairDiff=−√{−(ΔLx 2 +(ΔLy 2 }; ・・(43)
【0108】
前述のように、円形の像360は回転角度を演算する必要がなく、位置のみが演算される。位置を演算するにあたり、まず、位置ファクタ(posFactor) が(44)式に従って演算される。
posFactorM〔i〕=1/Σcos2(角度R〔i〕−角度〔n〕)・・・(44)
ただし、iはシークラインを指定する値であり、0から7まである。また、nの値もシークラインの本数である1から8まで1ずつ増加させられる。Σcos2(角度R〔i〕−角度〔n〕)の演算は、i番目のシークラインの角度R〔i〕とフェールのないシークラインすべての角度R〔n〕との差の余弦の2乗の和を求める演算である。この演算においても、iがフェールのシークラインを指定する値になった場合には、演算が行われることなく次のシークラインを指定する値に変えられるようになっているため、図51の例では0度のシークラインについての演算は行われず、45度〜315度の各シークラインについて位置ファクタの演算が行われる。
【0109】
次に位置ファクタを用いて円形の像360の位置が(45)式(C言語で記述されている)に従って演算される。
for(x=0,y=0,i=0;i<n;i++){x=x+cos (i) *posFactorM[i]*ss[i];y=y+sin(i)*posFactorM[i]*ss[i]; }・・・・(45)
ss[i]は、先に演算された各シークラインについてのサイズポイントとエッジポイントとのずれ量Diffであり、フェールのないシークラインの全部について、それぞれそのシークラインのずれ量ss[i]に位置ファクタposFactorM[i]が掛けられるとともにX軸,Y軸に平行な成分が演算されてX座標,Y座標毎にそれぞれ加算され、中心位置(x,y)が求められる。この中心位置の座標は、円形の像360の中心の、測定テンプレート座標面の原点からのX軸方向およびY軸方向における位置ずれを示す。前述のように、シークラインにフェールがあれば画像処理対象物の回転中心RCが、フェールがない場合の位置(正規の回転中心の位置と称すべきもの)からずれるのであるが、(44) 式により位置ファクタが演算され、その位置ファクタを用いて(45)式により位置ずれが演算されることにより、シークラインにフェールがある場合でも、フェールがない場合と同様に、円形の像360の正規の回転中心に相当する中心の位置ずれが演算されるのである。したがって、得られた位置ずれに測定テンプレート座標面の基準座標面に対する位置ずれを加えた値が円形の像360の基準座標面上における位置ずれを表すことになる。
【0110】
画像処理対象物が円形であってフェールがない場合には、位置ファクタ等にデフォルト値を用いて演算が行われる。この点は、画像処理対象物が矩形の像358である前述の場合と同様である。
画像処理対象物が図38の線分や、図47の矩形等である場合の前記説明においては、位置ファクタなる用語を使用しなかったが、実際の実施形態においては、これらの場合にも(44)式を用いて位置ファクタの演算が行われるのであって、前記 (8)式における1/3や、(28),(29)式における1/4等が位置ファクタに相当する。このことは(44)式に実際の値を代入してみれば容易に確かめ得る。(44)式は図形のいかんを問わず一般的に使用し得るものなのである。図38,図47等の説明において(44)式を使用しなかったのは、直観的に理解できるようにするためであり、これら簡単な例について直観的に演算した結果と、同じ例について(44)式を用いて演算した結果とを比較することにより(44)式の妥当性を確かめるためである。上記1/3,1/4等の値はシークラインにフェールが発生すれば勿論変わる。
また、例えば矩形の角部が斜めに45度で切り欠かれた八角形について上記円形の画像対象物についての演算がそのまま適用できることは勿論、一般的に傾斜した辺を有する画像処理対象物についても寸法や位置の演算を同様に行い得る。
【0111】
以上、画像処理対象物がリードを有しない角チップのように矩形である場合と基準マークのように円形である場合とについて説明したが、回路基材にに装着される電気部品には、クウォードフラットパッケージ型の電気部品のように複数のリード線を有するものがある。このような電気部品が画像処理対象物である場合には、パターンマッチングプロセスの組合わせであるパターンマッチングマネージャにより画像処理が行われる。パターンマッチングマネージャはパターンマッチングプロセスを複数回組み合わせることにより画像処理を行うものである。
【0112】
例えば、図54に示すQFP(クウォード フラットパッケージ型電気部品)の像370の場合は、QFP全体の輪郭に基づいてではなく、リードの像に基づいて画像処理が行われる。これは、QFPではリードの位置のデータに基づいて装着を行えばリードと基板のパターンとの誤差を最も小さくできるからであり、各リードを画像処理対象物とするパターンマッチングの組合わせによって、QFPの寸法,位置,回転角度等が演算されるのである。
【0113】
画像処理時には、まず、リードの像372の1つが捜索される。そのために、リードの像372を1つ包含するのに適した大きさのサーチウインドウ376が設定され、その中で予め設定された複数組のポイントペアを含む捜索テンプレートを用いてリードの像372が捜索される。
【0114】
捜索ステップ,再捜索ステップ,測定ステップおよび再測定ステップのフルセットのパターンマッチングが行われてリードの像372の位置および回転角度が測定される。リードの像372の位置および回転角度が判れば、次に捜索ステップおよび再捜索ステップを含むサブセットのパターンマッチングにより1辺全部のリードの像372が捜索される。続いて隣接するリードの像372の位置および回転角度が測定されるが、リードのピッチは予め判っており、次のリードの像372についての捜索ステップにおいて捜索テンプレート座標面の位置,回転角度は、その直前に再捜索ステップによって求められたリードの像372の位置および回転角度と、リード間のピッチとに基づいて相当正確に予測されるため、フルセットのパターンマッチングを行わなくても十分に精度良く次のリードの像372を捜索し得る。
【0115】
1辺全部のリードの像372についてパターンマッチングが行われ、全部のリードの像372の位置が演算されたならば、これらリードの像372の中心のX座標値,Y座標値が加算されるとともにリード本数で除され、1辺の中心座標が演算される。同様にして3辺のリードの像372がサブセットのパターンマッチングで捜索される。辺同士の位置関係は予め判っており、先に行われたパターンマッチングの再捜索テンプレート座標面の位置,回転角度に基づいて捜索テンプレートの位置,回転角度が設定される。4辺全部について各中心座標が演算されたならば、互に平行な2つの辺の各中心を結ぶ2本の直線a,bの交点が演算され、電気部品の中心座標とされる。QFPの像370の回転角度は、(46)式で求められる。
(直線aの傾き−90度+直線bの傾き)/2・・・・(46)
【0116】
このようにパターンマッチングまたはパターンマッチングマネージャによれば、殆どの形状の検査対象物や回路基材に装着すべき電気部品の像認識を行うことができる。マスタ捜索テンプレート,マスタ測定テンプレートの作成は必要であるが、それらテンプレートを使用した画像処理プログラムは共用でき、検査対象物や電気部品の種類毎に画像処理プログラムを作成することに比較すれば、プログラム作成に要する時間が短くて済むのである。
【0117】
なお、画像処理時間は、サーチウインドウの中心からの画像処理対象物の中心のオフセット量が大きいほど長くなる。そのため、画像処理対象物が捜索された捜索テンプレート座標面の位置に基づいて、サーチウインドウの中心の位置を修正することが望ましい。例えば、QFPの像370の場合、複数個のQFPについての画像処理後、リードの像372の中心のサーチウインドウ376の中心からの平均的なはずれを求め、その平均的なはずれを0にするようにサーチウインドウの中心位置を修正するのである。
【0118】
本実施形態においては、順次撮像される複数の電気部品208の画像について、パターンマッチングあるいはパターンマッチングマネージャと、オブジェクトベクトルの演算とが行われ、電気部品の識別,位置誤差および回転角度誤差の演算が行われる。図55のタイムチャートに示すように、電気部品208の装着サイクルタイムTrのうち、電気部品208が撮像位置において停止している間にCCDカメラ78による撮像が行われる。撮像後、画像データはCCDカメラ78からフレームグラバメモリ264へ転送され、画像処理されるのであるが、画像データの転送と画像処理とは並行して行われる。
【0119】
フレームグラバメモリ264は、4個分の電気部品208の画像データを並列的に記憶し得るようにされており、そのため、処理時間が装着サイクルタイムより長い電気部品208についても画像処理を行うことができる。画像処理は、画像処理結果が使用されるまでに終了すればよく、1個の電気部品208の撮像から画像処理結果の使用までの間に他の電気部品208が複数個装着されるのであれば、1装着サイクルタイムTrの間に画像処理を終了させることは不可欠ではなく、複数装着サイクルタイムの間に、そのサイクル数と同じ数の画像処理対象物の画像処理が行われればよい。本実施形態においては、1個の電気部品208の撮像から装着までの間に他の3個の電気部品208の装着が行われ、合計4個の電気部品208の間では画像処理時間を融通し合うことが可能である。
【0120】
電気部品には、例えば、角チップのように形状が単純でリードを有せず、所要画像処理時間が短いものもあれば、QFPのように多数のリードを有し、所要画像処理時間が長い電気部品もあり、所要画像処理時間が短い電気部品について余った時間を所要画像処理時間が長い電気部品の処理に使うことができるのである。
全ての電気部品の画像処理が1装着サイクルタイム内に終了しなければならないとすれば、装着サイクルタイムは画像処理が予定されている複数種類の電気部品のうちで最も長時間を要するものに合わせて決定される必要があり、装着能率が低く抑えられてしまう。それに対して、本電気部品装着装置においては、4個の画像データが並列的にフレームグラバメモリ264に記憶され、4装着サイクルタイムの間にそれら画像データの処理が行われるため、4個の電気部品の各画像処理時間の合計が、画像処理が行われる電気部品の数倍の装着サイクルタイム以内であればよい。換言すれば、それら複数の電気部品の画像処理時間の平均が、1装着サイクルタイム以内であればよいのであり、装着サイクルタイムを短縮することができる。
【0121】
その一例を図56に示す。図から明らかなように、1個の電気部品にそれぞれ要する画像処理時間Te1〜Te7には長短差があるが、4個ずつの画像処理時間の合計Tt1〜Tt4はそれぞれ、装着サイクルタイムTrの4倍より短い時間であり、その分だけ装着サイクルタイムTrを短くすることができるのである。
【0122】
順次検査すべき検査対象物180が、複数種類混合して流れてくる場合にも同様の効果が得られる。順次検査される検査対象物180の検査に要する時間が互いに異なる場合に、フレームグラバメモリ264の数と同数の、順次検査される検査対象物180の各々の検査に要する時間の平均値に近いサイクルタイムで検査を実行することができるのである。
【0123】
さらに、順次検査される検査対象物180の種類が1種類で、検査に要する時間が同じであっても、検査対象物180の撮像時間間隔がまちまちの場合には、複数のフレームグラバメモリ264の効果が得られる。連続した複数個の検査対象物180の間で画像処理時間を融通し合うことができるからである。
【0124】
最後に検査ステップの詳細について説明する。例えば、図58に示す形状の部品の互いに隣接する3辺に欠陥の一種である切欠411が存在するか否かを検査する必要がある場合には、問題の部品の画像(以下、単に部品という)410の3辺の小距離内側の位置に、各辺に平行なネガティブシークライン412,413,414が設定される。基準位置,基準回転角度の部品410に基づいて予め設定され、DRAM256に記憶されているマスタ検査テンプレートが読み出され、そのマスタ検査テンプレートが、検査に先立って測定された部品410の実際の位置,回転角度に応じて座標変換されることにより、ネガティブシークライン412,413,414を含む実際の検査テンプレート415が設定されるのである。設定された検査テンプレート415のデータもDRAM256に記憶され、DRAM256は検査テンプレートデータ記憶手段として機能する。
【0125】
図58の例では部品410のシルエット画像が取得され、切欠411は明るい像として形成されるとする。ネガティブシークライン412,413,414は部品410の暗い像の内側に設定され、本来はエッジと交差しないものであるが、切欠411が存在すれば、部品410と切欠411との境界がエッジとなる。したがって、ネガティブシークライン412,413に関して行われる「エッジと交差しないか」の判定の結果はYESとなるが、ネガティブシークライン414に関して行われる判定の結果はNOとなる。検査テンプレート415に属するすべてのネガティブシークラインのうち一つについてでも判定結果がNOになれば、その部品410は切欠411の欠陥を有するものとして不合格であることがモニタテレビ14に表示される。
【0126】
上記ネガティブシークライン412,413,414の、部品410の各辺からの距離を変更することによって、検出可能な切欠の大きさを変更し得る。切欠が存在しても、小さいものであれば部品が合格品とされる場合には、その小さい切欠を横切らない位置にネガティブシークライン412,413,414を設定すればよいのである。また、各辺に対して、それらからの距離が異なる複数本ずつのネガティブシークラインを設定しておけば、辺からの距離が大きいネガティブシークラインほど大きい切欠しか検出しないため、大きさの範囲毎にそれぞれいくつの切欠が存在するかも調べることができる。
【0127】
上記部品410に、図59に示すように欠陥の一種であるばり416が存在するか否かの検査をする必要がある場合には、3辺の小距離外側の位置において各辺に平行に延びる3本のネガティブシークライン417,418,420を含む検査テンプレート422が設定される。DRAM256に記憶されているマスタ検査テンプレートの座標変換によって実際の検査テンプレート422が設定されるのである。そして、図示の場合には、ネガティブシークライン420に関しての「エッジと交差しないか」の判定の結果がNOになることにより、部品410はばり416の欠陥を有することにより不合格の判定がなされ、その判定結果がモニタテレビ14に表示される。
【0128】
上記部品410の像の中に図60に示す傷426があるか否かを検査する必要がある場合には、部品410の輪郭線の内側に多数本のネガティブシークライン428〜438等を含む検査テンプレート439が設定される。この際、部品410の輪郭線の内側に穴440,442等が存在すれば、ネガティブシークラインは符号436,438で示されるもののように、穴440,442等を避けて設定される。ネガティブシークラインが穴440,442等の縁と交差すれば、「エッジと交差しないか」の判定の結果がNOとなり、誤った検査結果が出されてしまうからである。図示の例では、部品410の表面の像に比較して傷426の像が暗いものとすれば、本来エッジと交差しないはずのネガティブシークライン432,434がエッジと交差することとなり、その事実に基づいて部品410には傷426が存在し、不合格であるとの判定がなされることとなる。
【0129】
図58のネガティブシークライン412,413,414と図59のネガティブシークライン417,418,420との両方を含む検査テンプレートが設定されるようにすることも可能であり、その場合には、切欠411とばり416との両方の欠陥を一挙に検査することができる。さらに、図60のネガティブシークライン428〜438等も共に設定されるようにすれば、切欠411,ばり416および傷426の検査を一挙に行うことができる。
【0130】
本光学式検査装置によれば、部品全体の検査のみならず、部品の一部の検査も行うことができる。その一例を図61に示す。図示の部品は太陽電池450であり、検査対象物はそれのグリッドパターン452である。グリッドパターン452は、互いに平行に延びる多数のグリッド454,456,458等を含んでおり、これらグリッドに不連続部460が存在すれば使用不能であるため、検査を行う必要がある。また、グリッド間に汚れ462が存在すれば、機能不良の可能性があるため、その検査も必要になる。そこで、各グリッド454等の輪郭線の内側に不連続部検出用のネガティブシークライン466,468,470等が、また、グリッド間には汚れ検出用のネガティブシークライン472,474等が設定される。これらシークライン466等はいずれもグリッド454等の長手方向に平行に延びる状態で形成され、検査テンプレート478を構成する。
【0131】
この検査テンプレート478のネガティブシークラインのうち、ネガティブシークライン468のように不連続部460を通過するものがあれば、そのネガティブシークライン468はエッジと交差することとなり、その太陽電池450のグリッドパターン452には欠陥の一種である不連続部460が存在するとして、不合格の判定がなされる。また、ネガティブシークライン474のように、汚れ462を通過するものがあれば、そのネガティブシークライン474がエッジと交差することとなり、その太陽電池450には欠陥の一種である汚れが存在するとして、不合格の判定がなされる。そのために、不連続部検出用のネガティブシークライン466等と、汚れ検出用のネガティブシークライン472等とは、検査テンプレート内において区別されている。
【0132】
以上説明した検査テンプレートにおいては、ネガティブシークラインの1本でもエッジと交差すれば、その検査対象物は不合格とされていたが、小さい傷や汚れ等、検査対象物の性能に影響がないものが存在するのみである場合には、合格であると判定されるようにすることも可能である。例えば、ネガティブシークラインのうち、連続して何本のものに関しての判定結果がNOになったかに基づいて欠陥の大きさを知ることができ、欠陥の大きさが設定寸法以上である場合に不合格の判定が行われるようにし、あるいは、判定結果がNOになるネガティブシークラインの本数が設定本数以上である場合に不合格の判定が行われるようにするのである。モニタテレビ14には、合否の判定結果のみならず、欠陥の種類,大きさ,数等も共に表示されるようにすることが望ましい。
【0133】
以上の説明においては、ポジティブシークラインが位置,回転角度,寸法等の測定および検査に使用され、ネガティブシークラインが欠陥検査に使用されていたが、これらは別の目的にも使用可能である。その一例を図62に示す。本例はポジティブシークラインが欠陥検査に使用される場合の一例である。前記太陽電池450のグリッド454等に不連続部460が存在するか否かを検査するために、グリッド454等の長手方向と交差(図示の例では直交)するポジティブシークライン480が多数設定されている。ポジティブシークライン480は、不連続部460の寸法より小さいピッチで多数設定され、共同して検査テンプレート482を構成している。ポジティブシークライン480は通常はエッジと交差するが、不連続部460においてはエッジと交差しないため、「エッジと交差するか」の判定の結果がNOとなり、太陽電池450は不合格品であると判定される。
【0134】
ネガティブシークラインが対象物の捜索に使用される場合の一例を図63に示す。本例は、部品490の暗い表面に四角形状の明るいパッド492が多数形成されている場合に、右上角のパッド492が捜索される例である。そのために、パッド492の輪郭線と交差する多数のポジティブシークライン494と複数本(図示の例では4本)のネガティブシークライン496とを含む検査テンプレート498が設定される。そして、すべてのポジティブシークライン494について「エッジと交差するか」の判定が、また、すべてのネガティブシークライン496について「エッジと交差しないか」の判定が行われ、すべての判定結果がYESとなれば、ポジティブシークライン494が設定されている位置にあるパッド492が右上角のパッドであると判定される。例えば、右上角のパッド492の左側に位置するパッド492に対して同じ検査テンプレート498が設定されたとすれば、上下方向に延びるネガティブシークライン496が右上角のパッド492と交差し、また、下側に位置するパッド492に対して同じ検査テンプレート498が設定されたとすれば、横方向に延びるネガティブシークライン496が右上角のパッド492と交差する。そのため、いずれも場合にも「エッジと交差しないか」の判定の結果がNOとなるネガティブシークライン496が存在し、現に検査テンプレート498が設定されているパッド492が右上角のパッドではないことが判り、前記条件が満たされるのは図示の場合のみであるからである。
【0135】
以上の例ではシークラインはすべて、両端が有限の直線、すなわち線分で設定されていたが、これは不可欠ではない。例えば、図64に示すように、画像処理対象物504が円形のものである場合には、その画像処理対象物504と同心の円をネガティブシークライン506,508として設定することが好都合である場合があるのである。ネガティブシークライン506は切欠検出用、ネガティブシークライン508はばり検出用である。また、画像処理対象物504の輪郭線の内側に同心の円を多数設定して、それらを傷,汚れ等内部領域欠陥の有無を検査するための検査シークライン(ネガティブシークライン)とすることも可能である。
【0136】
図65に示す例においては、画像処理対象物512が扇形であるため、円弧のネガティブシークライン514,516と、線分のネガティブシークライン518,520を含む検査テンプレート522が設定されている。この検査テンプレート522は切欠検出用であり、この他に、ばり検出用,内部領域欠陥検出用等を同様の形態で設定することができる。
【0137】
以上のようにして、欠陥の有無が検出された後、その検出結果に基づいて画像処理対象物が合格品であるか不合格品であるかの判定が行われる。最も単純な判定は、1個でも欠陥が存在すれば不合格とする判定であるが、予め定められた基準以上の大きさ,数等欠陥検査基準を超える欠陥が存在する場合に不合格とされるようにすることも可能である。この欠陥検査基準も画像処理対象物毎に予め作成されてメモリカードに格納されており、画像処理装置12のDRAM256に読み込まれて使用される。
【0138】
以上説明したように、画像処理装置12においては、CCDカメラ78により撮像された検査対象物180,電気部品208,基準マーク等の画像のデータは、パターンマッチングやパターンマッチングマネージャによって処理されるのであるが、パターンマッチング,パターンマッチングマネージャは、捜索テンプレート,再捜索テンプレート,測定テンプレート,再測定テンプレートおよび検査テンプレートを用いて画像処理対象物を捜索し、エッジ点を演算するようにされており、テンプレートが設定された部分のみが捜索され、測定され、検査される。画像処理の必要な部分のみが処理され、画像処理の必要がない部分は画像データが得られても処理されないのである。そのため、短時間で画像処理を行うことができ、かつ、画像処理対象物に直接接触していない限り大抵の画像ノイズ(白点,黒点,しみ等)の影響を受けることなく画像処理を行うことができる。
【0139】
さらに、捜索ステップにおいては2個のポイントペア構成点の輝度差等光学的特性値の差の状態によって適合状態にあるか否かが判定され、再捜索ステップ,測定ステップ,再測定ステップ,検査ステップにおいては、シークライン上における輝度等光学的特性値の変化勾配によってエッジ点が決定されるようになっている。そのため、QFPのように画像処理対象物が比較的大きく、照明にむらが生じ易い場合でも、照明に殆ど差がない部分同士の間で光学的特性値の比較が行われることとなり、照明の偏りの影響を受けることなく、正確に画像処理を行うことができる。
【0140】
また、CCDカメラの固体撮像素子の大きさが変わっても、プログラムを実質的に変更することなく、容易に対応することができる。さらに、画像処理対象物の位置,回転角度,寸法等の測定および検査と同様の手法で欠陥検査を行うものであるため、寸法等の検査に付随して短時間で欠陥検査を行うことができる。
【0141】
先には画像処理対象物の指定中心DCにマスタ測定テンプレート座標面の原点が置かれる場合について説明したが、マスタ測定テンプレート座標面の原点が指定中心DC以外の位置に置かれてもよい。この場合、回転中心RCと指定中心DCとの間の位置ずれ(または回転角度)に、指定中心DCとマスタ測定テンプレート座標面との間の位置ずれ(または回転角度)を加え、その値にさらにマスタ測定テンプレート座標面の基準座標面に対する位置ずれ(または回転角度)を加えることにより、指定中心DCの基準座標上における位置ずれ(または回転角度)が得られる。
【0142】
本実施形態においては、画像処理装置12が、被検査物の形状,寸法がほぼ決まっていることを利用し、捜索テンプレート,再捜索テンプレート328,測定テンプレート336,再測定テンプレート,検査テンプレート415等を使用する特殊な処理により寸法検査および欠陥検査を行うものであるため、ごく短時間で処理を完了することができる。また、被検査物(被測定物でもある)支持装置が透明平板であり、かつ、被検査物の位置や回転角度に合わせて捜索テンプレート300等が自動設定されるものであるため、被検査物は被検査物支持板72上に単純に載置すればよい。測定対象物180の位置や回転角度を正確に決めなくても、画像処理装置12により寸法の取得や欠陥の検出が行われるのであり、検査対象物の撮像装置10へのセットが容易である。また、画像処理装置12に対する処理開始指令をフットスイッチで行うことが可能であるため、両手を他の目的に使用することができ、使い勝手がよい利点がある。さらに、被測定物を固定する必要がなく、かつ、非接触で寸法測定が可能であるため、ゴム,軟質合成樹脂等から成る製品の寸法測定,寸法検査を容易に行い得る。そのため、例えば、射出成形やプレス成形により製造される多量の製品の全数寸法検査すら可能である。また、貫通穴内径,穴間ピッチ,突起間ピッチ,円筒外径,フランジ間距離,軸長等予め定められた部位の寸法検査のみならず、加工もれや欠損等の検査も行い得る。
【0143】
以上の説明から明らかなように、本実施形態においては、平行光発生部52が平行光発生装置を構成している。また、画像処理装置12のフレームグラバメモリ264が画像データ記憶手段を構成し、DRAM156が捜索テンプレートデータ記憶手段,測定テンプレートデータ記憶手段、検査テンプレートデータ記憶手段を構成している。画像処理装置12の、パターンマッチングプログラムの捜索ステップ単独または捜索ステップと再捜索ステップとの両方を実行する部分が捜索物判定手段を構成している。画像処理装置12の、パターンマッチングプログラムの捜索ステップ,再捜索ステップ,測定ステップ,再測定ステップを実行する部分が位置等測定手段を構成しており、そのうち、再捜索ステップ,測定ステップ,再測定ステップ等においてエッジ点の座標を演算する部分がエッジ点座標演算手段を構成している。画像処理装置12のパターンマッチングプログラムのうち、捜索ステップ,再捜索ステップ,測定ステップ,再捜索ステップにおいて輝度を演算すべき点を指定する部分が点指定手段を構成し、指定された点の輝度値の演算を行う部分が仮想点データ演算手段を構成している。
【0144】
さらに、画像処理装置12の、測定された画像処理対象物の寸法を基準寸法と比較して合否を判定する部分が寸法検査手段を構成している。画像処理装置12の、ネガティブシークラインを含む検査テンプレートを設定する部分や、ネガティブシークラインを含む捜索テンプレートを設定する部分がネガティブシークライン設定手段を構成し、ポジティブシークラインを含む検査テンプレートや捜索テンプレートを設定する部分がポジティブシークライン設定手段を構成しており、それらネガティブシークライン設定手段またはポジティブシークライン設定手段が単独で、あるいは共同でシークライン設定手段を構成すると考えることができる。また、画像処理装置12の、ネガティブシークラインがエッジと交差するか否かを判定する部分が判定手段を構成し、その判定結果に基づいて画像処理対象物の合否を判定する部分が上記判定手段と共同して合否判定手段を構成している。そして、上記シークライン設定手段と判定手段とが欠陥判定手段を構成している。
【0145】
なお、上記実施形態において、再捜索ステップは1回行われていたが、2回以上行われるようにしてもよい。1回目の再捜索ステップにおいてフェールが設定数以下であり、画像処理対象物のエッジ点が得られた後、更に再捜索テンプレートを設定して再捜索ステップを行うのであり、再捜索テンプレートは、前回の再捜索ステップにおいて用いられた再捜索テンプレートとエッジ点の演算結果とに基づいて、画像処理対象物とのずれがより少なくなる位置,角度で設定される。再捜索ステップが1回のみ行われるようにするより、複数回行われるようにする方が、次の測定ステップでフェールが発生する確率が低下することが経験上判っている。この理由は定かではないが、捜索ステップにおいて画像処理対象物と捜索テンプレートとのずれが大きく、辛うじて捜索対象部が存在すると判定された場合には、再捜索テンプレートと画像処理対象物とのずれがかなり大きくなる可能性があり、この場合には次の測定ステップにおいて測定テンプレートと画像処理対象物とのずれも大きくなってフェールが発生することがあるのに対し、再捜索ステップが2回以上行われれば、その確率が低下するためではないかと推測されている。
【0146】
また、画像処理対象物の形状,おおよその位置,回転角度が予め判っていれば、捜索テンプレートによる捜索を行わなくてもシークラインをエッジ点の演算可能な位置に設定することができ、始めから測定テンプレートを用いてエッジ点を求めることができる。
上記実施形態においては、再捜索テンプレートを用いて再捜索ステップを行った後、測定ステップが行われるようになっていたが、画像処理対象物の寸法誤差や形状欠陥が小さい場合には、捜索ステップの直後に測定ステップを実行させることも可能である。この場合、前記再捜索テンプレートを測定テンプレートとして使用することも可能であるが、シークライン数がさらに多いテンプレートを使用することが望ましい。
【0147】
さらに、上記実施形態においてパターンマッチングにおける異常の判定は、プログラム中に設定された許容フェール数を越えるフェールがあるか否かにより行われていたが、例えば、フェールが一つでもあれば異常と判定し、フェールのない画像処理対象物についてのみオブジェクトベクトルの演算を行うプログラムと、少なくとも1つのフェールを許容し、フェールがあってもオブジェクトベクトルの演算を行うプログラムとを作成し、オペレータが選択し得るようにしてもよい。フェールを許容しないプログラムは画像処理に要する時間が短くて済むため、状況によってはこのプログラムを選択し、検査対象物180の検査能率を高め、あるいは電気部品208を1個装着するのに要する時間を短縮することができる。
【0148】
上記実施形態においては、画像内のエッジ、すなわち光学的特性が急変する部分を捜すために、まず捜索テンプレートの各ポイントペアを構成する2点の光学的特性値が設定値以上異なる部分が捜され、次に測定テンプレートのシークライン(測定シークライン)上における光学的特性値の微分値が最大の部分が捜されてエッジ点とされるようになっていたが、測定テンプレートのシークライン上における光学的特性の微分値が設定値以上である部分が捜され、その部分がエッジであるとされるようにすることも可能である。その場合、1本のシークライン上に微分値が設定値以上である点が連続して現れる場合には、それらの中で最大のものがエッジ点とされるようにすればよい。
【0149】
その他、特許請求の範囲を逸脱することなく、当業者の知識に基づいて種々の変形,改良を施した態様で本発明を実施することができる。
【図面の簡単な説明】
【図1】 本発明の一実施形態である撮像装置を含む光学式検査装置を示す正面図(カバー部材を除去した状態)である。
【図2】上記撮像装置の平面図(カバー部材およびビームスプリッタを除去した状態)である。
【図3】上記撮像装置の右側面図である。
【図4】上記撮像装置におけるビームスプリッタの周辺を示す側面図(一部断面)である。
【図5】上記撮像装置の交換レンズの正面断面図である。
【図6】上記撮像装置の別の交換レンズの正面断面図である。
【図7】上記撮像装置のさらに別の交換レンズの正面断面図である。
【図8】上記撮像装置を概念的に示す図である。
【図9】本発明の別の実施形態である撮像装置の概念図である。
【図10】本発明のさらに別の実施形態である撮像装置の概念図である。
【図11】本発明のさらに別の実施形態である撮像装置の概念図である。
【図12】記光学式検査装置の撮像装置以外の構成要素を示す正面図である。
【図13】上記光学式検査装置の画像処理装置のブロック図である。
【図14】上記画像処理装置のDRAMに記憶された事前処理プログラムを示す図である。
【図15】上記画像処理装置のDRAMに記憶された実行処理プログラムを示す図である。
【図16】上記画像処理装置のDRAMに記憶されたパターンマッチングプログラムを示す図である。
【図17】上記パターンマッチングプログラムを正方形の像について実行するための設定データを示す図である。
【図18】図17に示す設定データに基づいて設定されるマスタ捜索テンプレートを画像処理対象物と共に示す図である。
【図19】図17に示す設定データに基づいて設定されるマスタ測定テンプレートを画像処理対象物と共に示す図である。
【図20】上記マスタ捜索テンプレートに基づく捜索テンプレートの生成を説明する図である。
【図21】前記パターンマッチングプログラムを一部が切り欠かれた円板について実行するための設定データを示す図である。
【図22】図21に示す設定データに基づいて設定されるマスタ捜索テンプレートを円板と共に示す図である。
【図23】図21に示す設定データに基づいて設定されるマスタ測定テンプレートを円板と共に示す図である。
【図24】前記パターンマッチングプログラムの捜索ステップにおいて捜索テンプレートが仮想画面に重ねられた状態を示す図である。
【図25】仮想画面上において指定された点の輝度を演算するための線形補間を説明する図である。
【図26】前記画像処理装置において物理画面上の画像データから仮想画面上の画像データを演算する物理画面/仮想画面変換ドライバを概念的に示す図である。
【図27】前記パターンマッチングプログラムの再捜索ステップの再捜索テンプレートが仮想画面に重ねられた状態を示す図である。
【図28】上記再捜索テンプレートのシークライン上に設定された分割点と撮像面を構成する固体撮像素子との関係を示す図である。
【図29】図28に示す分割点について演算された輝度を表す図表である。
【図30】上記分割点について演算された輝度を微分するための差分フィルタを示す図である。
【図31】上記分割点について演算された輝度を微分するための別の差分フィルタを示す図である。
【図32】図29に示す演算結果をグラフにして示す図である。
【図33】図30に示す差分フィルタを用いて行った微分の結果を表すグラフである。
【図34】図31に示す差分フィルタを用いて行った微分の結果を表すグラフである。
【図35】前記パターンマッチングプログラムの測定ステップにおいて測定テンプレートが仮想画面に重ねられた状態を示す図である。
【図36】パターンマッチングの実行後に行われる画像処理対象物の寸法計算を矩形の像を例に取って説明する図である。
【図37】上記寸法計算においてサイズポイントとエッジポイントとの差の演算を説明する図である。
【図38】画像処理対象物の回転中心および回転角度の演算を直線を例に取って説明する図である。
【図39】シークラインにフェールがある場合における画像処理対象物の回転中心の指定中心に対するずれの演算を説明する図である。
【図40】シークラインにフェールがある場合における画像処理対象物の回転中心の指定中心に対するずれの演算の別の例を説明する図である。
【図41】シークラインにフェールがある場合における画像処理対象物の回転中心の指定中心に対するずれの演算の更に別の例を説明する図である。
【図42】シークラインが互に直交する2方向に設定された場合における画像処理対象物の回転中心および回転中心の指定中心に対するずれの演算を説明する図である。
【図43】シークラインが互に直交する2方向に設定された場合における画像処理対象物の回転中心および回転中心の指定中心に対するずれの演算の別の例を説明する図である。
【図44】画像処理対象物の角度の演算に用いられる角度ファクタを示す図表である。
【図45】上記角度ファクタを座標面上において示す図である。
【図46】画像処理対象物の回転中心および回転角度の演算を説明する図である。
【図47】画像処理対象物の回転中心および回転角度の演算の別の例を説明する図である。
【図48】画像処理対象物の回転中心および回転角度の演算の更に別の例を説明する図である。
【図49】画像処理対象物の指定中心と回転中心とにずれがあり、画像処理対象物に位置および角度のずれがある場合における指定中心の位置の演算を説明する図である。
【図50】画像処理対象物の基準座標に対する位置ずれ量および角度ずれ量の演算を説明する図である。
【図51】画像処理対象物の一種である円形の像にシークラインが設定された状態を示す図である。
【図52】上記円形の像の寸法計算を説明する図である。
【図53】上記寸法計算におけるサイズポイントの演算およびエッジポイントとの差の演算を説明する図である。
【図54】QFPについて行われるパターンマッチングを説明する図である。
【図55】電気部品装着装置における装着サイクルタイムとCCDカメラの露光時間および画像転送時間との関係を示すタイムチャートである。
【図56】上記電気部品装着装置における画像処理サイクルを説明するタイムチャートである。
【図57】図17に示す設定データに基づいて設定されるマスタ検査テンプレートを画像処理対象物と共に示す図である。
【図58】検査テンプレートによる切欠の検査の一例を示す図である。
【図59】検査テンプレートによるばりの検査の一例を示す図である。
【図60】検査テンプレートによる傷の検査の一例を示す図である。
【図61】検査テンプレートによる不連続部および汚れの検査の一例を示す図である。
【図62】別の検査テンプレートによる不連続部の検査の一例を示す図である。
【図63】ネガティブシークラインとポジティブシークラインとを含む捜索テンプレートによる捜索の一例を示す図である。
【図64】別の検査テンプレートを示す図である。
【図65】さらに別の検査テンプレートを示す図である。
【図66】従来の撮像装置による撮像を概念的に示す図である。
【符号の説明】
10:撮像装置 12:画像処理装置 14:モニタテレビ 16:入力装置 18:キーボード 20:マウス 22:フットスイッチ 30:装置本体 50:撮像部 52:平行光発生部 58:撮像対象物支持装置 70:凹面鏡 72:ビームスプリッタ 74:オリフィス 76:レンズ系 78:CCDカメラ 80:ピンホール 82:CCD
108:傾斜角度調節装置 110:位置調節装置 146:光源装置
148:凹面鏡 150:ビームスプリッタ 152:オリフィス 154:レンズ系 180:撮像対象物 192:均一照明装置 200,204:撮像装置 212:蛍光板 256:DRAM 264:フレームグラバメモリ 300,308:マスタ捜索テンプレート 302,310,324:ポイントペア 328:再捜索テンプレート 330,346:シークライン 336:測定テンプレート 338,342:シークライン 340,344:マスタ測定テンプレート 350,352,354:ネガティブシークライン 411:切欠 412,413,414:ネガティブシークライン 415,422,439,478,482:検査テンプレート 480:ポジティブシークライン
[0001]
BACKGROUND OF THE INVENTION
  The present invention captures an object and obtains an image represented by image data.RelatedTo do.
[0002]
[Prior art]
The present applicant has developed an image pickup apparatus, an optical measurement apparatus, and an optical inspection apparatus of this type and applied for a patent. Japanese Patent Application No. 10-9085 and Japanese Patent Application No. 10-162459 which have not been disclosed yet. The imaging device described in Japanese Patent Application No. 10-9085 has (1) a reflecting surface that forms a plane, and (2) the reflecting surface and the optical axis are orthogonal to each other, and focuses parallel light from the reflecting surface. A first lens system for condensing the light beam, (3) an imaging object support device for supporting the imaging object at a position between the reflecting surface and the first lens system, and (4) the first lens system. A beam splitter provided at a position opposite to the reflection surface, having a reflection surface that is inclined with respect to the optical axis of the first lens system, transmits a part of the light, and reflects the rest; and (5) An orifice provided at a position symmetrical to the focal point of the first lens system with respect to the reflecting surface of the beam splitter; and (6) a light source provided on the opposite side of the beam splitter from the orifice. , (7) The first lens system has a focal point and the first lens system And a second lens system that converts the light that has passed through the beam splitter into parallel rays, and (8) imaging that captures an image formed by the light converted into parallel rays by the second lens system. And an element.
[0003]
Light projected radially from a point light source composed of a light source and an orifice is reflected by the reflecting surface of the beam splitter and travels toward the first lens system. Since it is in a plane-symmetrical position with the focal point of one lens system, it is the same as the light projected radially from its own focal point for the first lens system, and is converted into parallel light by the first lens system, and the object to be imaged An object supported by an object support device (in some cases, the object itself is an imaging target, and in some cases, a part of the object surface is an imaging target. (If not necessary, it will simply be referred to as an object) and applied to the reflective surface. Reflected light from the reflecting surface and reflected light from the object surface enter the beam splitter, and part of the light is returned to the point light source by the reflecting surface, but the rest passes through the beam splitter and reaches the second lens system. Of the light reflected by the reflecting surface and the light reflected by the object surface, light parallel to the optical axis of the first lens system (perpendicular to the reflecting surface) is converted into parallel light and enters the image sensor. If a point light source composed of a light source and an orifice is actually installed at the focal point of the first lens system, the reflected light from the reflecting surface or object surface is blocked by the orifice and the light source and enters the image sensor. However, an image of the object and its surroundings cannot be obtained, but this problem can be solved by using a beam splitter as in this embodiment.
[0004]
Each of the first and second lens systems may be composed of one lens or a plurality of lenses. Further, for example, a reflection surface is provided between the second lens system and the imaging sensor so that light converted into parallel light by the second lens system is reflected by the reflection surface and incident on the imaging sensor. A reflective surface is provided between the focal point of one lens system and the second lens system so that light from the first lens system is reflected by the reflective surface and then converted into parallel light by the second lens system. can do. The same can be done for the first lens system. Thus, the direction of light can be arbitrarily changed by the reflecting surface, and in this case, the optical axis of the lens system is assumed to be bent together with the light. In the optical measurement device of this aspect, it is not essential that the reflecting surface, the imaging object support device, the first lens system, the second lens system, and the imaging sensor are arranged on a straight line.
[0005]
As described above, if parallel light orthogonal to the reflective surface is applied to the reflective surface and the object placed in front of the reflective surface, and an image formed by the parallel light reflected by the reflective surface and passing around the object is captured, An accurate projection image of the object can be obtained, and by processing the projection image, an accurate dimension in perspective projection or projection projection can be obtained.
Since the parallel light is applied to both the object and the reflecting surface, not only the light reflected by the reflecting surface but also the light reflected by the surface of the object reaches the imaging surface, and forms a surface image of the object. Even if the surface of the object is a ground surface, since there are fine irregularities, a part of the parallel light perpendicular to the reflecting surface is only reflected in the direction perpendicular to the reflecting surface. On the other hand, if the reflecting surface is a mirror surface, almost all of the parallel light perpendicular to the reflecting surface is reflected in the direction perpendicular to the reflecting surface. Therefore, it is easy to make the image of the reflecting surface overwhelmingly brighter than the image of the surface of the object, and the contour line of the object can be easily specified. The silhouette image of the object formed by the parallel light reflected by the reflecting surface and passed around the object is obtained. By processing the silhouette image, the outer dimension of the object (if there is a through opening, its The inner dimension of the opening) can also be obtained.
However, if the reflected light from the surface of the object has many components in the direction perpendicular to the reflecting surface, the surface of the object is also imaged. Accurate projection images of the recessed portions and scratches made can be obtained, and if necessary, their dimensions and positions can be measured accurately.
And since the optical system that shines parallel light on the object and the reflecting surface and the optical system that forms an image formed by the parallel reflected light from the object and the reflecting surface on the imaging surface can be provided on the same side as the object, The entire imaging device can be configured compactly.
[0006]
In addition, the optical measuring device described in Japanese Patent Application No. 10-9085 is based on the imaging device and the image captured by the imaging device, and the position of the object in a direction parallel to the reflecting surface is perpendicular to the reflecting surface. And an image processing device that calculates at least one of a rotation angle about a specific axis and a dimension in a direction parallel to the reflecting surface.
Since this optical measuring device can measure the position, the rotation angle, and the dimensions without contacting the measurement object, that is, the imaging object, it can measure the measurement object made of a soft material such as rubber without any trouble. Further, the image processing apparatus can obtain the dimensions regardless of the position of the measurement object (imaging object) in the image acquired by imaging and the rotation angle (rotation angle from the reference rotation position). In this case, the measurement object (object) may be simply placed on a flat support surface, and the measurement object can be easily set on the measurement apparatus, and the measurement efficiency can be improved.
An example of the image processing apparatus in the present optical measurement apparatus uses a search template and a measurement template. That is, the image processing apparatus is configured to include master search template data storage means, master measurement template data storage means, search template automatic setting means, search object determination means, measurement template automatic setting means, and edge point coordinate calculation means. It is. The master search template has a plurality of point pairs each having a pair of two points separated by a certain distance, and the master search template data storage means stores data of the master search template. The master measurement template has a plurality of measurement seek lines, and the master measurement template data storage means stores data of the master measurement template. The search template automatic setting means automatically sets a plurality of search templates by moving the master search template data stored in the master search template data storage means to various positions and rotation angles. The search object determining means, when a plurality of search templates set by the search template automatic setting means are sequentially superimposed on a screen on which an image represented by the image data of the image data storage means exists, a plurality of point pairs of search templates. If the difference state of the optical characteristic values of each pair of points constituting the image is equal to or greater than the set state, the two points of the pair are located separately on both sides of the edge, which is a portion where the optical characteristics of the image change suddenly. If there are more than a set amount of point pairs in the matching state, the imaging object is determined to be a searching object that matches the search template. The measurement template automatic setting means is based on search template data when the imaging object is determined to be a search object that matches the search template, and master measurement template data stored in the master measurement template data storage means. The measurement template is automatically set. The edge point coordinate calculation means superimposes the measurement template set by the measurement template automatic setting means on the screen on which the image represented by the image data of the image data storage means exists, and the measurement object on each of the plurality of measurement seek lines The coordinates of the edge point of (imaging object, search object) are calculated. The edge point is the intersection of the edge and the measurement seek line. The edge is a portion where the optical measurement suddenly changes in the image represented by the image data, and corresponds to the contour line of the measurement object. Edges are often closed curves, but may not be closed curves. Examples are when the measurement object is large and does not fit within the field of view of the imaging device, or when the measurement object is part of an object.
[0007]
An optical inspection apparatus is described in Japanese Patent Application No. 10-162459. The image processing apparatus of the optical inspection apparatus is configured to include a negative seek line setting unit and a determination unit in addition to an image data storage unit that stores image data that is data of an image captured by the imaging device. . The negative seek line is a seek line scheduled not to intersect the edge, and the negative seek line setting means sets the negative seek line. The determining means determines that the imaging target is defective when the set negative seek line intersects the edge. The seek line of the measurement template in the optical measuring apparatus is scheduled to intersect with the edge, and in this sense, it should be referred to as a positive seek line. If used, it is possible to easily detect defects such as scratches on the surface of the object supported by the imaging object support device, cutouts on the outer surface, and flash. For example, when inspecting whether or not a horizontal surface of a rectangular part has a flaw, a large number of negative seek lines are set inside the outline of the surface, and one of these negative seek lines is defined as an edge. Check if they intersect. If there are scratches and stains that become dark images on the surface that becomes a bright image, the outlines of these scratches and stains become edges. As described above, the negative seek line is set inside the contour line of the surface, so it usually does not intersect with the edge, but there are scratches and dirt on the surface, and the negative seek line is damaged. If it intersects with dirt, the negative seek line will intersect with the edge. Therefore, it is possible to examine whether or not there are any scratches or dirt on the surface to be inspected by examining whether or not there is an edge point on the negative seek line, that is, a point having a large change in luminance. In addition, whether or not there is a notch on the outer surface of the object of the quadrangular part can be detected by setting a negative seek line along the contour line just inside the contour line of the object. Similarly, a flash can be detected by setting a negative seek line just outside the contour line of the object. In this optical inspection apparatus, defects such as scratches, dirt, cutouts, and flashes can be considered as imaging objects, and objects having defects can be considered as imaging objects.
[0008]
[Problems to be Solved by the Invention, Problem Solving Means, Functions and Effects]
  The present invention is the above-developed imagingDress upTo improve, especially the accuracy of images acquired by the imaging device.AndIt was made as an issue. According to the present invention, an imaging device, an optical measurement device, and an optical inspection device of the following aspects can be obtained. As with the claims, each aspect is divided into sections, each section is numbered, and is described in a form that cites the numbers of other sections as necessary. This is for the purpose of facilitating understanding of the possibility of the combination of features described in each section, and the technical features described in this specification and the combinations thereof are interpreted as being limited to the following. Should not.
(1) a concave mirror;
  A beam splitter (including a half mirror) disposed on the optical axis of the concave mirror and inclined with respect to the optical axis;
  An imaging object support device that is disposed in either the transmission direction or the reflection direction of the beam splitter as viewed from the concave mirror side, and that supports the imaging object at a substantially focal position of the concave mirror;
  A lens system that is provided on the opposite side of the beam splitter with respect to the focal point of the concave mirror in the other of the transmission direction and the reflection direction, and that converts light radially passing through the focal point into substantially parallel light; ,
  An image sensor that captures an image formed by the parallel light converted by the lens system;
  Limiting means for limiting light incident on the imaging device to light incident on the concave mirror substantially parallel to the optical axis of the concave mirror;
An imaging device comprising: (Claim 1).
  The imaging target object may be an object itself supported by the imaging target object support device, or may be a part of the object. In the latter case, the imaging object support device supports the imaging object as a result by supporting the object. The object supported by the imaging object support device may be illuminated from the front side or from the back side.
  When illuminated from the front side, the light reflected by the front side of the object passes through the beam splitter or is reflected by the beam splitter and enters the concave mirror. The concave mirror has the property of focusing light incident from a direction parallel to the optical axis of the concave mirror to the focal point. Therefore, out of the light radially reflected by the front surface of the object in all directions, the concave mirror has an optical axis. Only parallel component light is collected at the focal point. Therefore, if an orifice having a pinhole is arranged at the focal point as described in the following (2), and only the component light condensed at the focal point is allowed to pass, Only the component light incident on the concave mirror in parallel with the optical axis thereof enters the lens system. The orifice constitutes the restricting means, and the light that passes through the orifice and spreads radially is converted into parallel light by the lens system and is incident on the image sensor to form an image. However, although the pinhole is formed as small as possible, the size is not necessarily zero, and it is reflected in the component light that is condensed near the focal point, that is, in a direction slightly inclined with respect to the optical axis of the concave mirror. The component light also passes through the pinhole and enters the image sensor. As a result, an image is formed on the imaging surface of the imaging element by component light substantially parallel to the optical axis of the concave mirror, and this image is captured by the imaging device. Therefore, it is desirable that the image sensor is disposed at the focal position of the lens system.
  Even when an object supported by the imaging object support device is illuminated from the back side, if an orifice with a pinhole is placed at the focal point of the concave mirror, it will pass through the object and enter the concave mirror. Component light that enters parallel to the optical axis of the concave mirror (component light parallel to the center line of the imaging object support device) forms an image on the imaging surface of the image sensor, and acquires a silhouette image of the object Is done. In this case, even if the light passing around the object includes component light in a direction inclined with respect to the center line in addition to the component light parallel to the center line of the imaging object support device, the inclined direction is also included. Is prevented by the orifice from entering the imaging surface of the imaging device. Therefore, even if the silhouette image of the object to be imaged is acquired using the light background forming device described in (5) or the uniform illumination device described in (6), the silhouette image is transferred to the concave mirror and its optical axis. It is formed only by component light incident from a direction substantially parallel to.
  On the other hand, if the light passing through the object itself is made up of only component light parallel to the center line of the imaging object support device, only the component light parallel to the optical axis is incident on the concave mirror. Therefore, it is not always necessary to provide an orifice at the position of the focal point of the concave mirror. The means for allowing the light passing around the object to consist only of component light parallel to the center line of the imaging object support device constitutes the limiting means. In order to illuminate an object with light consisting only of component light parallel to the center line of the imaging object support device, for example, the parallel light generator described in (7) or (8) may be used. .
  Even when the parallel light generator is used, it is effective to provide an orifice. Even if the light passing through the object consists only of component light parallel to the center line of the imaging object support device using the parallel light generator, the diffraction of the light causes the concave mirror to move to its optical axis. This is because component light incident from a tilted direction is generated, and it is inevitable that the component light is incident on the imaging surface of the image sensor. The limiting means may be any means as long as it can limit the light incident on the image pickup device to light incident on the concave mirror substantially in parallel with the optical axis thereof. In this case, it is desirable to be provided as close to the image sensor as possible. Both the parallel light generator and the orifice function as limiting means, and a particularly accurate image can be obtained if both are provided.
  As described above, in the imaging device according to the aspect described in this section, an image is formed by component light that is substantially parallel to the optical axis of the concave mirror. Proper image on projection or projection.
  In the imaging device disclosed in Japanese Patent Application No. 10-9085 developed earlier, the object passes through the periphery of the object supported by the imaging object support device toward the reflection surface, and is reflected by the reflection surface again. Since the image is formed on the imaging surface of the imaging device by component light in a direction substantially perpendicular to the reflecting surface that has passed through the opposite direction, the outer contour line of the silhouette image of the object is larger than the normal contour line, It is inevitable that the inner contour line (the contour line of the through-hole formed in the object) is imaged smaller. And this reduced the accuracy of the image of the object to be imaged and caused a decrease in the measurement accuracy of the optical measurement device or the reliability of the optical inspection device, but in the imaging device of this aspect, Since the component light that forms the silhouette image of the object supported by the imaging object support device passes only once around the object, it is easy to improve the accuracy of the image of the imaging object.
  Moreover, the imaging device of this aspect has the advantage that it can be manufactured at low cost. In the imaging device described in Japanese Patent Application No. 10-9085, a lens system is used to collect component light perpendicular to the reflecting surface including information on the imaging object at one point. This is because a large-diameter lens system is required when the lens is large, whereas a concave mirror is used instead of the lens system. In order to condense parallel component light at one point and use it as parallel component light again to cause the image sensor to pick up an accurate image, it is necessary to reduce the aberration of the lens system. In order to produce a system with small aberrations, it is necessary to combine a plurality of lenses, and yet it is difficult to reduce aberrations, whereas a concave mirror has one non-aberration It can be easily manufactured.
(2) The imaging device according to (1), wherein the limiting unit includes an orifice having a pinhole located at a focal position of the concave mirror.(Claim 2).
(3) The imaging device according to (1) or (2), wherein the orifice, the lens system, and the imaging device are provided in a reflection direction of the beam splitter.
(4) The imaging device according to (1) or (2), wherein the imaging object support device is provided in a reflection direction of the beam splitter.
(5) Further, a bright background forming device provided on the opposite side of the beam splitter with respect to the imaging object support device and forming a bright and substantially uniform background of the imaging object (1) The imaging device according to any one of Items (4) to (Claim 3).
  Light is emitted radially from the bright background forming apparatus, and the silhouette image of the imaging object is formed by the component light substantially parallel to the optical axis of the concave mirror as described above. It is formed on the imaging surface.
(6) The imaging apparatus according to (5), wherein the light background forming apparatus is an illumination apparatus that emits substantially uniform illumination light toward the imaging object support apparatus.
  The bright background forming apparatus can also be configured with a diffusely reflecting surface, but it is more energy efficient to configure the bright background forming apparatus with the illumination device itself.
(7) Further, provided on the opposite side of the beam splitter with the imaging object support device in between, passes through the imaging object support device, passes through the periphery of the imaging object, and enters the beam splitter. Includes a parallel light generator that projects parallel light.Mu (1) In termsThe imaging device according to claim 4.
  When the imaging object is illuminated from the back side by the parallel light generated by the parallel light generator, there is almost no useless component light that is not substantially parallel to the optical axis of the concave mirror around the imaging object. Therefore, a high quality image can be easily obtained. For example, when the object to be imaged is a sphere, if it is illuminated from the back side by light radiated in all directions from the light background forming apparatus, a part of the illumination light is a hemispherical surface (light background forming) It hits a part of the hemisphere on the opposite side of the device, where it is reflected and heads towards the concave mirror. This light also contains component light parallel to the optical axis of the concave mirror, which passes through the pinhole and enters the image sensor, making the sphere silhouette image smaller than the theoretical silhouette image. It will end up. On the other hand, when the sphere is illuminated from the back side by the parallel light generated by the parallel light generator, the parallel light does not hit the front hemisphere of the sphere. Therefore, an accurate silhouette image of the sphere can be obtained. Even if the object to be imaged is a rectangular parallelepiped, for example, if the corner of the rectangular parallelepiped is rounded, the same situation occurs with respect to the rounded portion.
  Further, only a small part of the light emitted from the light background forming apparatus (component light substantially parallel to the optical axis of the concave mirror) is effectively used for acquiring an image. On the other hand, if the object to be imaged is illuminated from the back side by the parallel light generator, all of the illumination light is effectively used for silhouette image formation, so that an image can be efficiently formed.
(8) The parallel light generator is
  A second beam splitter provided on the opposite side of the beam splitter as the first beam splitter with the imaging object support device in between,
  A second concave mirror provided separately from the concave mirror as the first concave mirror in the reflection direction of the second beam splitter as viewed from the imaging object support device;
  A point light source that is provided at the focal position of the second concave mirror in the transmission direction of the second beam splitter as viewed from the second concave mirror and emits illumination light that radiates toward the second beam splitter;
The imaging device according to item (7) (claim 5).
  According to this aspect, parallel light can be easily generated.
(9) The point light source is
  A second orifice different from the orifice as the first orifice, comprising a pinhole provided at the focal position of the second concave mirror;
  A parallel light source that is provided on the opposite side of the second orifice from the second beam splitter and that projects substantially parallel illumination light toward the orifice;
  A second lens system different from the first lens system that converts light from the parallel light source into illumination light that spreads radially toward the second beam splitter through the pinhole of the second orifice;
The imaging device according to item (8) (claim 6).
(10) The first concave mirror, the first beam splitter, the first orifice, and the first lens system, and the second concave mirror, the second beam splitter, the second orifice, and the second lens system each support the imaging object. The imaging device according to (9), wherein the imaging device is arranged in plane symmetry with respect to the object support position by the device.Place.
  According to this aspect, the imaging device and the parallel light generator can be configured symmetrically, the entire device can be configured compactly, and the manufacturing cost can be reduced by sharing parts.
(11) The imaging apparatus according to any one of (1) to (10), further including an inclination angle adjusting device that adjusts an inclination angle of the beam splitter with respect to the optical axis of the concave mirror.
  If the tilt angle adjusting device is provided, the manufacturing error of the imaging device can be canceled or reduced by adjusting the tilt angle of the beam splitter, and a highly accurate image can be obtained by an inexpensive imaging device.
(12) The tilt angle adjusting device is
  An attachment shaft for attaching the beam splitter to an apparatus main body, which is a main body of the imaging apparatus, so as to be rotatable around a rotation axis perpendicular to the optical axis of the concave mirror;
  An elongated hole formed in the beam splitter in a direction perpendicular to the axis of the mounting shaft;
  A supported shaft portion is held in the apparatus main body so as to be rotatable around a rotation axis parallel to the axis of the mounting shaft, and is inserted into the elongated hole at an eccentric shaft portion that is eccentric to the supported shaft portion. An eccentric operation member for rotating the beam splitter around an axis of the mounting shaft by being rotated.
The imaging device according to item (11), including:
  According to this aspect, the tilt angle adjusting device can be configured at low cost.
(13) The image pickup device according to any one of (1) to (12), further including a position adjusting device that adjusts positions of the orifice, the lens system, and the image pickup device in a direction parallel to an optical axis thereof. apparatus.
  If a position adjustment device is provided, the manufacturing error of the image pickup device can be canceled or reduced by adjusting the axial position of the orifice, lens system, and image pickup device, and a highly accurate image can be obtained with an inexpensive image pickup device. Can do.
(14) The position adjusting device includes:
  A holding member such as an image pickup device for holding the orifice, the lens system and the image pickup device;
  A guide that is provided in parallel to the optical axis of the concave mirror and guides the holding member such as the imaging element on the apparatus body that is the body of the imaging apparatus;
  The device main body and the imaging element etc. holding member are engaged with each other so as to be relatively rotatable, and at least one of the engagement between the apparatus main body and the image pickup element etc. holding member is a screw engagement with a male screw and a female screw, An adjusting screw member that moves the holding member such as the image sensor along the guide by being rotated;
The imaging device according to item (13), including:
  According to this aspect, the position adjusting device can be configured at low cost.
(15) The imaging device according to any one of (1) to (14),
  An image processing device that acquires at least one of a position, a rotation angle, and a dimension of the imaging object by processing image data representing an image captured by the imaging device;
Optical measuring instrument includingPlace.
  According to this aspect, it is possible to obtain an optical measurement device that can accurately measure the position, rotation angle, size, and the like of the imaging object.
(16) The image processing apparatus includes:
  Image data storage means for storing data of an image captured by the image sensor;
  Measurement template data storage means for storing measurement template data having a plurality of seek lines formed by connecting two points in a straight line;
  An edge point that is a point at which the optical characteristics suddenly change on each of the plurality of seek lines by superimposing the measurement template of the measurement template data storage unit on a screen on which an image represented by the image data of the image data storage unit exists. Edge point coordinate calculation means for calculating the coordinates of
Including the optical measuring device according to item (15)Place.
  The “optical characteristic value” is, for example, luminance, hue, and the like. An “edge point” is an intersection of a seek line and an edge. The edge is a portion where the optical characteristics of the image change suddenly. When the imaging target is the entire object supported by the imaging target support device, the edge corresponds to the contour line of the object, and the imaging target captures the image. In the case of a character, recess, scratch, etc. on the surface of the object supported by the object support device, it corresponds to the contour line of the character.
  In the optical measurement device of this aspect, when an image is picked up by an image pickup device, the image pickup surface is usually decomposed into a large number of pixels, and image data is created for each pixel and stored in the image data storage means. An “image represented by image data” is an image obtained on the basis of image data, and may be an image in which a pixel is used as a unit and an optical characteristic value is obtained for each pixel. It may be an image whose value is obtained at an arbitrary point.
  An example of the former is an image that is considered as a set of electrical signals for each photoelectric conversion element obtained by an imaging element that includes a large number of photoelectric conversion elements and generates an electrical signal corresponding to the light receiving state of each photoelectric conversion element. In other words, it can be said that the image is an image physically formed on the imaging surface on which the photoelectric conversion elements are arranged. In this sense, this image is referred to as a physical image, and a screen on which the physical image exists (which matches the imaging surface) is referred to as a physical screen. The physical image data can be stored and reproduced by storing the electrical signal data for each photoelectric conversion element in the storage means in association with the position of each photoelectric conversion element.
  In addition, image data representing a physical image actually exists. In this sense, a physical image can be referred to as a real image in comparison with a virtual image described later, and a screen on which a real image exists is referred to as a real screen. Can do.
  The image data representing the actual image may be analog data or digital data representing the magnitude of the electrical signal for each photoelectric conversion element. For example, multi-stage digital data represented by 256 discrete values (grayscale data and Or binarized data binarized depending on whether or not the electrical signal for each photoelectric conversion element exceeds a threshold value.
  An example of an image in which an optical characteristic value is obtained at an arbitrary point without using a pixel as a unit is that the electrical signal data of each photoelectric conversion element on the physical screen is the optical characteristic value at the center point of each photoelectric conversion element. It is an image that is considered as a set of continuous optical characteristic values that define the curved surface when it is assumed that the curved surface satisfies the optical characteristic values of these many points. The image data of this image can be stored as, for example, data of an expression representing the curved surface, and this image data is also a kind of real image.
  On the other hand, when an arbitrary point on the screen is designated instead of obtaining the curved surface data in advance, the optical characteristic value of only that point is obtained by calculation every time each point is designated. Is also possible. In this case, the image does not actually exist, and if it exists, it is only virtualized. Therefore, it is referred to as a virtual image, and a screen on which the virtual image exists is referred to as a virtual screen.
  “Superimpose the measurement template on the screen” means, for example, reading image data corresponding to the pixel specified by the measurement template data on the physical screen from the image data storage means, or by using a seek line on the virtual screen. The image data (optical characteristic value) of the designated point is calculated based on the image data of the physical screen.
  When the imaging object is the entire object supported by the imaging object support device, the inside of the contour of the object is inside the edge, the periphery of the object is outside the edge or the background, and the imaging object is formed on the object surface In the case of a character, a concave portion, a scratch, etc., the object surface surrounding them is the outside of the edge or the background. In any case, there is a difference between the image data corresponding to the imaging object and the image data corresponding to the background. In other words, unless there is a difference from the background, it is not possible to acquire information regarding the imaging target by image processing.
  Since there is a difference in the optical characteristic value between the imaging object and its surroundings as described above, the optical characteristic value changes suddenly at the edge point. Therefore, the edge point can be determined by obtaining the change in the optical characteristic value obtained for each pixel on the physical screen and by obtaining the change gradient of the optical characteristic value on the virtual screen.
  On the physical screen, edge points are obtained in units of pixels, but on the virtual screen, edge points are obtained at arbitrary points on the seek line, and the resolution of image processing can be increased as necessary.
  According to this aspect, the edge point of the imaging object can be obtained. Thereby, for example, when the shape of the imaging target is known in advance, the size, position, rotation angle, etc. of the imaging target can be calculated with relatively few seek lines. If the number of seek lines is increased and a large number of edge points can be obtained even if the shape of the object to be imaged is not known in advance, the shape is obtained from the set of edge points, and the dimensions, positions, and rotation angles are obtained. Etc. can be obtained.
  When the imaging object support device includes a positioning device that positions the imaging object at an accurate position and rotation angle, and the dimensions of the imaging object are substantially constant, the measurement template is uniquely determined. However, when the imaging object support device does not include a positioning device, the position and rotation angle of the imaging object are not uniquely determined. In that case, it is necessary to use the search template described in the next section as an optical measurement device in addition to the measurement template.
(17) The image processing apparatus includes:
  Search template data storage means for storing data of a search template having a plurality of point pairs each having a pair of two points separated by a certain distance;
  When the search template of the search template data storage means is overlaid on the screen on which the image represented by the image data of the image data storage means exists, the optical characteristic values of the pairs of points constituting the plurality of point pairs If the difference state is greater than or equal to the set state, each pair of points is in a matching state located on both sides of the edge, which is a portion where the optical characteristics of the image change suddenly, and the plurality of point pairs A determination unit that determines that the imaging target is a search target that matches the search template if a set amount or more is in the matching state;
Including the optical measurement device according to (15) or (16).Place.
  The “screen on which the image represented by the image data is present” in the image processing apparatus of the optical measurement apparatus according to this aspect is also a physical screen or a real screen, as in the image processing apparatus of the optical measurement apparatus described in the previous section. Or a virtual screen.
  The edge is often a closed curve, and one of the two points of each point pair is located within the edge and the other is located outside the edge. For this reason, if strictness is not required, the expression “inside edge, outside edge” is used. However, the edge may not be a closed curve. The expression “Two points are located on both sides of the edge” will be used.
  Search template data is data that defines the position of the two points that make up a point pair on the screen. “To superimpose the search template on the screen on which the image represented by the image data exists” means that the screen is a physical screen. In this case, the image data of the pixel at each position specified by the search template data is read from the image data storage means to obtain the optical characteristic value. If the screen is a virtual screen, it is assumed that the search template is placed on the virtual screen, and the optical characteristic value of each point on the virtual screen specified by the search template data is calculated from the physical image data. That is. The physical image data in this case needs to be analog data or digital data representing the magnitude of the electric signal itself for each photoelectric conversion element, or gradation data, and binary data has no meaning.
  As described above, since the optical characteristics change abruptly at the edge, if one point of the point pair is located within the edge of the object to be imaged and the other point is outside the edge (in the background), in other words, If the image data corresponding to one point of the point pair is data representing the object to be imaged and the data corresponding to the other point is data representing the background, the optical characteristics of the two points constituting the point pair If the value difference state should be greater than or equal to the set state, and the number (or rate) of pairs of point pairs whose difference state is not greater than or equal to the set state is less than or equal to a predetermined set number (or set rate) It can be determined that the imaging object is a search object. Further, by searching for such a set of point pairs, it is possible to search for an image of the imaging target on the screen.
  “The optical characteristic value is greater than or equal to the set state” means that the difference in brightness, hue, or the like is greater than or equal to the set value, or the ratio of brightness, hue, or the like is greater than the set value.
  When an optical characteristic value is obtained by superimposing a search template on a physical screen, the image data may be analog data or gradation data (hereinafter referred to as gradation data) or binarized data. In the case of gradation data or the like, it is optical that the difference between the value of one of the two points of the point pair and the value of the other point is greater than or equal to the set value, or the ratio between the two values is greater than or equal to the set ratio. The difference state of the characteristic value is not less than the set state. In the case of binarized data, if one value of two points of the point pair is 0 and the other value is 1, the difference state of the optical characteristic value is equal to or greater than the set state.
  When the position of the imaging object (search object) is substantially constant, the search template may be superimposed on the screen at a certain position, but at least one of the position of the imaging object and the rotation angle is indefinite. In some cases, the determination unit repeats the determination while changing at least one of the position and the rotation angle of the search template until the determination result becomes affirmative or a predetermined change limit is reached. When a search template is changed, even if multiple search templates with different positions and rotation angles are prepared in advance, only the standard search templates with standard positions and standard rotation angles are prepared, and search templates with general positions and rotation angles are prepared. May be created by coordinate transformation as necessary. The “change limit” means that, for example, when a search area for searching the image processing target part is set, if the position of the search template is changed further, the search template has reached a position where the search template protrudes from the search area. The position of the search template has been changed a predetermined number of times.
  One of the preferred fields of use of the optical measuring device of this aspect is dimensional inspection of a three-dimensional measuring object. In the dimension inspection, since the dimension of the imaging object as the measurement object is substantially constant, it is suitable for use of the search template. If the object to be imaged is supported by positioning the object to be measured at a fixed position, it is easy to superimpose the search template on the image of the object to be measured, and the inspection is performed particularly efficiently. Can do.
  Another preferred field of application of the optical measuring device of this aspect is an electric circuit assembly line. For example, in an electrical component mounting apparatus, an electrical component to be mounted on a mounting target material such as a printed circuit board or a reference mark provided on the printed circuit board is an imaging target, and in a screen printing machine, the screen is provided on a screen. A reference mark, a printing through-hole, or the like is an imaging object. In addition, the imaging target is not limited to the outline of the entire object, and a portion may be an imaging target. For example, in the case of a square chip, the chip itself is the imaging object, but in an electrical component having leads, solder bumps, etc., the main body having the leads, solder bumps, etc. is used as the imaging object, and one lead. In some cases, one solder bump is used as an object to be imaged. Of course, an object located inside the contour of another member, such as a lead located inside the outline of the main body, a lead located inside, a solder bump, or the like, may be taken as an object to be imaged. In the latter case, the search template is created with the outline of the object located inside the outline of the entire object as a search target, and inside the outline image of the entire object on the physical screen or the virtual screen, The object to be imaged is searched by overlapping the physical image or the virtual image of the object positioned on the inside at a position where the formation is planned.
  As is clear from the above description, according to this aspect, it is possible to know the presence or absence of a search target and whether or not the imaging target is a search target using the image data and the search template. Determination can be made by calculating and comparing the optical characteristic values of two points constituting the point pair by the number of point pairs, and the processing can be easily and quickly performed. Further, when both the search template and the measurement template are used, if it is determined that the imaging target is the search target by one of the plurality of search templates, the data of the search template and the master measurement template With this data, it is possible to set a measurement template for measuring an imaging object that is regarded as a search object as a measurement object, and it is not necessary to accurately position the measurement object (imaging object) An optical measuring device is obtained.
(18) The optical processing apparatus according to (17), wherein the image processing apparatus further includes a search template automatic setting unit that automatically sets the search template based on search target defining data that defines the search target. Type measuring device.
  If the position and rotation angle of the search object are substantially constant, one search template may be set based on the search object defining data. However, when at least one of the position and the rotation angle of the search object is not constant, a master search template is set for the case where the non-constant thing is in a reference state, and the position and rotation are set in the master search template. It is necessary to make changes corresponding to non-constant angles to set at least one search template.
  In this aspect, since the search template is automatically set, there is no need for the operator to set, and an optical measuring device that is easy to use and highly efficient can be obtained.
(19) The optical measurement apparatus according to (17) or (18), wherein the image processing apparatus further includes a measurement template automatic setting unit that automatically sets the measurement template based on the search template.
  When the position and rotation angle of the search object are substantially constant, the search template is uniquely determined, and therefore the measurement template is also uniquely determined. However, when at least one of the position and the rotation angle of the search object is not constant, a plurality of search templates are set, and it is determined by any of them that the imaging object is the search object. Therefore, the measurement template is automatically set based on the search template determined that the imaging target is the search target.
  An effective measurement template can be obtained easily, and the measurement of the position, rotation angle, dimension, etc. of the measurement object (imaging object, search object) can be performed quickly.
(20) The image processing apparatus is further a remeasurement that is a new measurement template for remeasurement based on at least one measurement result of the position, rotation angle, and size of the measurement object using one measurement template. The optical measurement apparatus according to item (19), including automatic remeasurement template setting means for automatically setting a template.
  If the remeasurement template is set based on at least one measurement result of the position, rotation angle, and dimension of the measurement object using one measurement template, the remeasurement template is measured from the one measurement template. The deviation from the object can be small, and higher accuracy can be obtained by performing measurement using a measurement template having a small deviation.
(21) The image pickup device includes a large number of photoelectric conversion elements, and generates an electric signal corresponding to a light receiving state of each photoelectric conversion element, and the image data storage means stores the electric signal of each photoelectric conversion element. The data is stored in association with the position of each photoelectric conversion element, and the image processing apparatus further includes a virtual screen assumed corresponding to the physical screen formed by the image data of the image data storage means. Virtual point data for calculating an optical characteristic value of a specified point based on optical characteristic value data on the physical screen for each point specification by the point specifying means The optical measurement apparatus according to any one of items (16) to (20), including calculation means.
  When an image is picked up by an image pickup device in the image processing device according to any one of (16) to (20), the image pickup surface is usually decomposed into a large number of pixels, and image data is created for each of the pixels to obtain image data Stored in the storage means. The image represented by the image data may be an image in which an optical characteristic value is obtained for each pixel in units of pixels, or an image in which an optical characteristic value is obtained at an arbitrary point without using pixels as a unit. Instead of obtaining the image data of this arbitrary point in advance, when an arbitrary point on the screen is designated, the optical characteristic value of only that point may be obtained by calculation every time each point is designated. Is possible. The image processing apparatus according to this aspect uses the virtual image and the virtual screen, and can measure the measurement object quickly and with high accuracy while using the image data storage means having a relatively small storage capacity. Defect inspection can be performed.
(22) The edge point coordinate calculation means includes:
  Division point characteristic value acquisition means for acquiring optical characteristic values of a plurality of division points set on the seek line;
  An edge point search means for searching for the sharpest change point of the optical characteristic value on the seek line as an edge point based on the optical characteristic value of the division point acquired by the division point characteristic value acquisition means;
The optical measuring device according to any one of (16) to (21).
(23) The optical measurement device according to item (22), wherein a pitch of the plurality of division points is smaller than a pitch of the photoelectric conversion element.
(24) The imaging device according to any one of (1) to (14),
  An image processing apparatus for detecting a defect of the imaging object by processing image data representing an image captured by the imaging apparatus;
Optical inspection equipment includingPlace.
  According to this aspect, it is possible to obtain an optical inspection apparatus that can inspect defects of an imaging object with high reliability.
(25) The image processing apparatus includes:
  Image data storage means for storing image data which is data of an image captured by the imaging device;
  Negative seek line setting means for setting a negative seek line that is scheduled not to intersect with an edge that is a portion where the optical characteristics of the image represented by the image data stored in the image data storage means change suddenly;
  Determining means for determining that the imaging object is defective when the set negative seek line intersects with an edge;
Including the optical inspection device according to item (24)Place.
  According to the optical inspection apparatus of this aspect, the negative seek line is used for defects such as scratches and dirt existing on the surface of the object supported by the imaging object support apparatus and notches and flashes existing on the outer surface of the object. And can be detected quickly. A negative seek line is a seek line that is scheduled not to intersect the edge. If the negative seek line intersects with the edge, it means that the edge exists on an unscheduled portion of the surface or outer periphery of the object, and it can be estimated that a defect exists. Note that the defect inspection can be performed not only on the entire object supported by the imaging object support device but also on a part of the object. In some cases, the object itself is an inspection object, and a part of the object is an inspection object.
(26) The image processing apparatus further includes a measurement unit that measures at least one of a position, a rotation angle, and a dimension of the imaging object, and the negative seek line setting unit measures the position and rotation measured by the measurement unit. The optical inspection apparatus according to item (25), wherein the negative seek line is set based on at least one of an angle and a dimension.
  As described above, since the negative seek line is a seek line that is not expected to intersect the edge, when used for defect inspection such as scratches and dirt, the position, rotation angle, dimensions, etc. of the inspection object Must be known. When the inspection object has an accurate dimension and is positioned at an accurate position and rotation angle, it is possible to omit the measuring means, but the inspection object dimension is inaccurate, If the inspection object is not positioned at an accurate position or rotation angle, the inspection object (imaging object if it is undecided whether the object is an inspection object) prior to setting the negative seek line It is necessary to measure the inaccuracy of the position, the rotation angle, and the dimension. In other words, according to the image processing apparatus including the measuring means, it is possible to inspect defects on the inspection object whose position, rotation angle, dimensions, etc. are not constant.
(27) The image processing apparatus further sets a positive seek line scheduled to intersect with an edge that is a portion where the optical characteristics of the image represented by the image data stored in the image data storage means change suddenly. The optical inspection apparatus according to item (25) or (26), including positive seek line setting means.
  If the negative seek line and the positive seek line are used in combination, at least one of the reliability and efficiency of the inspection of the object can be improved as compared with the case where only one is used.
(28) The imaging device according to any one of (1) to (14),
  By processing image data representing an image captured by the imaging device, the position and rotation angle of the imaging object are acquired, and the acquired position and rotation angle data and defect detection data given in advance are acquired. An image processing device for detecting a defect of an imaging object based on
Optical inspection equipment includingPlace.
  An optical inspection apparatus having both the measurement characteristics described in the above (15) and the inspection characteristics described in the (24) section, and the measurements described in the above (16) to (23) characteristics. The features described in the items (25) to (27) can be adopted for the inspection. In addition to the defect detection means, the image processing apparatus may be provided with a dimension inspection means for acquiring a dimension of the object to be imaged by processing image data and comparing the acquired dimension with a reference dimension to perform a dimension inspection. Is possible.
  In addition, the features relating to the measurement described in paragraph (15), the features relating to the inspection described in paragraph (24), and the features in this section are independent of the features relating to the imaging device described in paragraph (1) above. Can be adopted.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
  Hereinafter, the present invention is a three-dimensional object (an object to be imaged at the time of imaging, an object to be measured at the time of measurement, and an object to be inspected at the time of inspection. Hereinafter, names suitable for each case will be used) One embodiment when applied to an apparatus for performing imaging, position, rotation angle and dimension measurement, dimension inspection and defect inspection will be described with reference to the drawings. This apparatus is an imaging apparatus according to an embodiment of the present invention.including.The optical inspection apparatus includes an imaging device 10 shown in FIGS. 1 to 8, an image processing device 12, a monitor television 14, and an input device 16 shown in FIG. 12. The input device 16 includes a keyboard 18, a mouse 20, a foot switch 22, and the like. The image processing device 12 operates in accordance with information, commands, and the like input from the input device 16, processes the data of the image captured by the imaging device 10, measures the size of the inspection object, and determines the measured size. Pass / fail is determined by comparison with the reference dimension. Further, it is also inspected whether or not there is a defect such as a scratch or a stain on the surface of the inspection object, and whether or not there is a defect such as a chip in the outer peripheral portion. The captured image, measured dimensions, determination result, presence / absence of a defect, and the like are displayed on a monitor television 14 as a display device. Furthermore, it is possible to connect a printing apparatus that prints the display content of the monitor television 14 on a recording sheet as a recording medium to the image processing apparatus 12.
[0010]
Information necessary for the operation of the image processing device 12 is input using the keyboard 18 and the mouse 20, but simple commands such as an operation start command can be input from any of the keyboard 18, the mouse 20, and the foot switch 22. Especially when inspecting a large number of inspection objects continuously, if an operation start command is input by the foot switch 22, both hands can be used for other work such as replacement of the inspection object, Convenient. Furthermore, if the inspection object is rejected as a result of the inspection, the buzzer built in the image processing apparatus is activated, and the operator does not need to always watch the monitor TV 14, This optical inspection apparatus is also easy to use in this respect.
[0011]
Next, the imaging device 10 will be described. The imaging device 10 has a configuration conceptually shown in FIG. 8, and specifically has a structure shown in FIGS. 1-3, the code | symbol 30 shows an apparatus main body. The apparatus main body 30 is formed by assembling a plurality of members, and has a rectangular box shape as a whole. The first member of the apparatus main body 30 is a support wall 32 rising vertically, and a support wall 34 is fixed to one vertical side surface of the support wall 32. A base plate 36 is fixed to the lower ends of the support walls 32 and 34, and a frame 38 is fixed to the center of the support wall 32. A cover member 40 is fixed to the upper ends of the support walls 32 and 34, and a cover member 42 parallel to the support wall 32 is fixed to form a box-like structure in which only one side surface is opened. In FIG. 1, the cover member 42 is removed, and only the position is indicated by a two-dot chain line. As is clear from FIG. 2, the support wall 32 is a shallow box-like member, and a plurality of reinforcing ribs (not shown) are formed inside. In FIG. 2, the cover member 40 and the beam splitter 72 are omitted.
[0012]
In the apparatus main body 30, an imaging unit 50 and a parallel light generation unit 52 are configured. The imaging unit 50 includes an imaging object support device 58 having a frame 38 and two glass plates 54 and 56. A through hole 60 is formed in the frame 38 so as to penetrate the frame 38 in the vertical direction, and the two glass plates 54 and 56 are disposed above and below the through hole 60 (see FIG. 2). is there. The frame 38 is also formed with a through hole 62 that passes through the frame 38 in a direction perpendicular to the support wall 32 and the cover member 42, and the support wall 32 and the cover member 42 have openings 64 and 66 corresponding to the through hole 62. Is formed. The parallel light generator 52 generates parallel light (see FIG. 8) that goes from the bottom to the top through the through hole 60 of the frame 38 with the configuration described later. Therefore, when an object is inserted from the opening 66 of the cover member 42 and placed on the lower glass plate 54, the object is illuminated with parallel light from the back side (lower surface side). In the imaging apparatus 10, a silhouette image of an object is captured, and the entire object is an imaging target. Note that the opening 64 of the support wall 32 is formed to allow insertion into the frame 38 even when the object to be imaged is long.
[0013]
In addition to the imaging object support device 58, the imaging unit 50 includes a concave mirror 70, a beam splitter 72, an orifice 74, a lens system 76, and a CCD camera 78 (see FIG. 2). The concave mirror 70 is a parabolic mirror and reflects light incident parallel to the optical axis toward the focal point. The concave mirror 70 is fixed to the support wall 34, and the pinhole 80 (see FIG. 8) of the orifice 74 is located at the focal point thereof. A beam splitter 72 is disposed at a position between the concave mirror 70 and the orifice 74. The beam splitter 72 is supported by the support wall 32 at a position where the center line of the through hole 60 of the frame 38 intersects with the optical axis of the concave mirror 70 and is inclined 45 degrees with respect to the center line and the optical axis. ing. The beam splitter 72 transmits part of the incident light and reflects the remaining part. As shown in FIG. 8, the beam splitter 72 is generated in the parallel light generator 52 and passes through the through hole 60 of the frame 38. Of the parallel light, the light reflected by the beam splitter 72 is incident on the concave mirror 70. Since this light enters the concave mirror 70 from a direction substantially parallel to the optical axis of the concave mirror 70, it is collected at the focal point of the concave mirror 70.
[0014]
The condensed light passes through the pinhole 80 of the orifice 74, spreads radially, and then converted into parallel light by the lens system 76. This is because the focal point of the lens system 76 is matched with the focal point of the concave mirror 70. The orifice 74 functions to pass only light that is parallel to the optical axis of the concave mirror 70 out of light incident on the concave mirror 70 (that is, light that has passed around the object to be imaged) and does not pass light in other directions. The function becomes sharper as the diameter of the pinhole 80 is smaller. If the pinhole 80 is a theoretical point having no area, only parallel light will pass through the pinhole 80, but in reality it must have a very small area, and the optical axis. The light in the direction tilted by a minute angle also passes through the pinhole 80 and is substantially parallel to the optical axis of the concave mirror 70, so that the CCD 82 as an image sensor of the CCD camera 78 (see FIGS. 2 and 8). An image is formed on the imaging surface. Therefore, in order to obtain a clear image, it is necessary to dispose the CCD 82 at the focal point position on the opposite side of the focal point at the pin hole 80 position of the lens system 76. The CCD 82 has a large number of photoelectric conversion elements (charge-coupled elements) formed in a lattice shape, and an electric signal corresponding to the intensity of light incident on each photoelectric conversion element corresponds to the position of each photoelectric conversion element. It can be taken out.
[0015]
The orifice 74 and the lens system 76 are incorporated in a common cylinder to form an integrated optical system. As shown in FIGS. 5, 6, and 7, the apparatus according to the present embodiment is incorporated in cylindrical bodies 90, 92, and 94 having different lengths, middle, short, and lengths in three stages, so Three types of optical systems 96, 98, and 100 that are different in three stages are prepared, and are selectively attached to the apparatus main body 30 according to the purpose. In that sense, the optical systems 96, 98, and 100 are hereinafter referred to as interchangeable lenses. These interchangeable lenses 96, 98, and 100 are attached to the apparatus main body 30 via the bracket 102, and a CCD camera 78 is detachably attached to the rear end thereof by screwing.
[0016]
The incident direction of the parallel light to the concave mirror 70 needs to be exactly parallel to the optical axis of the concave mirror 70, and the pinhole 80 of the orifice 74 needs to be exactly at the focal point of the concave mirror 70. Therefore, an inclination angle adjusting device 108 for adjusting the inclination angle of the beam splitter 72 and a position adjusting device 110 for adjusting the axial position of the interchangeable lens 96 and the like are provided.
[0017]
As shown in FIG. 4, the tilt angle adjusting device 108 includes a mounting shaft 112, an eccentric operation member 114, and a long hole 116. The mounting shaft 112 is fixed to the support wall 32 at a right angle, and the beam splitter 72 can be rotated around a rotation axis perpendicular to both the center line of the through hole 60 of the frame 38 and the optical axis of the concave mirror 70. I support it. The eccentric operation member 114 includes a supported shaft portion 118 that is rotatably supported around an axis parallel to the axis of the mounting shaft 112 on the support wall 32 and an eccentric cam portion 120 that is eccentric with respect to the supported shaft portion 118. 120 is fitted in a long hole 116 formed in the beam splitter 72. The elongated hole 116 is formed long in a direction perpendicular to the rotation axis of the beam splitter 72, and the eccentric cam 120 is fitted into the elongated hole 116 so as not to be relatively movable in the width direction of the elongated hole 116. Therefore, as the eccentric operation member 114 is rotated, the beam splitter 72 rotates around the rotation axis that is the axis of the mounting shaft 112, and the inclination angle of the concave mirror 70 with respect to the optical axis is adjusted. After the angle adjustment, the beam splitter 72 is fixed to the support wall 32 with a bolt 122.
[0018]
The position adjusting device 110 includes a key 126, a key groove 128, an adjusting screw member 130, an adjusting screw member holding member 132, etc. in addition to the bracket 102, as shown most clearly in FIG. The key 126 is fixed to the apparatus main body 30 in parallel with the optical axis of the concave mirror 70 to form a guide, and the key groove 128 of the bracket 102 is fitted to the key 126. In addition, the bracket 102 is fixed to the apparatus main body 30 by a plurality of bolts 134, but the bolts 134 are loosened and allow the bracket 102 to move relative to the apparatus main body 30 while allowing excessive movement from the apparatus main body 30. Prevent lifting. As described above, the movement of the bracket 102 is restricted in a direction parallel to the optical axis of the concave mirror 70. The adjustment screw member 130 is held by an adjustment screw member holding member 132 that is fixed to the apparatus main body 30 and forms a part thereof, and is rotatably held in the axial direction, and at the male screw portion 138, the female screw portion 140 of the bracket 102. It is screwed. Therefore, as the adjusting screw member 130 is rotated, the bracket 102 moves along the key 126, and as a result, the positions in the axial direction of the interchangeable lens 96 and the like held by the bracket 102 and the CCD camera 78 are adjusted. The When the pinhole 80 of the orifice 74 is positioned at the position of the focal point of the concave mirror 70, the bolt 134 is tightened to fix the position of the interchangeable lens 96 and the like. The adjustment screw member may have two male screw portions having different screw directions or pitches, and the male screw portions may be screwed to the bracket 102 and the apparatus main body 30.
[0019]
Next, the parallel light generator 52 will be described. The parallel light generator 52 is configured to be plane-symmetric with the imaging unit 50 except that a light source device 146 is provided instead of the lens system 76 and the CCD camera 78. The concave mirror 148, the beam splitter 150, and the orifice 152 are plane-symmetric with the concave mirror 70, the beam splitter 72, and the orifice 74 of the imaging unit 50 and the horizontal plane passing through the center in the vertical direction of the imaging object support device 58 as symmetry planes. It is arranged at a position. Further, the parallel light generator 52 is also provided with an inclination angle adjusting device 158 and a position adjusting device 160 having the same configuration as the inclination angle adjusting device 108 and the position adjusting device 110.
[0020]
The light source device 146 is a halogen lamp 170 as a light source, a glass fiber 172 that guides the light, and a lens system that condenses light emitted from the tip of the glass fiber 172 almost in parallel to the pinhole 174 of the orifice 152. The ball lens 176 is included. The light condensed by the ball lens 176 passes through the pinhole 174 and spreads radially. The light source device 146 functions as a point light source. A part of the light emitted from the pinhole 174 is reflected by the beam splitter 150, but the rest passes through the beam splitter 150 and enters the concave mirror 148. Since the pinhole 174 is positioned at the focal point of the concave mirror 148, the light emitted from the pinhole 174 is converted into parallel light parallel to the optical axis of the concave mirror 148 by the concave mirror 148. The parallel light is reflected by the beam splitter 150 toward the imaging object support device 58.
[0021]
Since the present imaging device is configured as described above, the parallel light generated in the parallel light generating unit 52 passes through the imaging object support device 58 from below to above in parallel to the center line of the through hole 60. . Therefore, if the imaging object 180 (see FIG. 8) is placed on the glass plate 54 of the imaging object support device 58, a part of the parallel light is blocked by the imaging object 180 and the rest of the imaging object 180 is. Pass around. As described above, an image is formed on the CCD 82 of the CCD camera 78 by the passed light. This image is composed of an image of a dark imaging object 180 and an image of a bright background. A silhouette image of the imaging object 180 is obtained, and a bright image of the background is formed by parallel light that has passed around the imaging object 180. Therefore, the silhouette image of the imaging object 180 is drawn by perspective or projection. The dimensions are exactly the same as the figure in the drawing. As shown in FIG. 66, when the imaging object 180 is imaged by the CCD 184 through the normal optical system 182, the image of the part far from the optical system 182 of the imaging object 180 is smaller than the image of the near part. It will be imaged. If the distance from the optical system 182 is at the same position as the other parts, as indicated by the two-dot chain line, the part far from the optical system 182 is acquired as a larger image, but is captured small. It is. This problem occurs as long as the surface of the imaging object 180 that faces the optical system 182 is not a plane that is perpendicular to the optical axis of the optical system 182, and even if it is a plane, the position of the plane is not constant. As long as it occurs, it makes it impossible to measure the dimensions of a three-dimensional inspection object. On the other hand, according to the imaging apparatus 10, this problem is solved, and the same image as the drawing drawn by the perspective projection method or the projection projection method is acquired even for the three-dimensional imaging object 180. If the dimension is obtained based on this, the dimension on the perspective projection method or the projection projection method can be acquired.
[0022]
It is also possible to use the imaging device 190 shown in FIG. 9 instead of the imaging device 10 described above. This imaging device 190 is obtained by replacing the parallel light generating unit 52 in the imaging device 10 with a uniform illumination device 192 which is a kind of bright background forming device. The uniform illumination device 192 may be, for example, a light source in which a large number of light emitting diodes are arranged on a grid and covered with a milky white diffusion plate. Light emitted from a number of light emitting diodes is diffused in the diffusion plate and is uniformly emitted in all directions from the surface of the diffusion plate. Therefore, the light passing through the periphery of the imaging object 180 includes component light in various directions. As described above, the orifice 74 having the pinhole 80 is parallel to the optical axis of the concave mirror 70. Since it has a function of selectively passing component light incident from the direction, the CCD 82 as the imaging device has exactly the same figure as that of the drawing of the imaging object 180 drawn in perspective or projection. It becomes a dimension.
[0023]
It is also possible to use the imaging device 200 shown in FIG. The imaging apparatus 200 is obtained by replacing the positions of the imaging object 180 (that is, the imaging object support apparatus), the orifice 74, the lens system 76, and the CCD camera 78 in the imaging apparatus 190. In the imaging device 190, the imaging object support device is disposed in the reflection direction of the beam splitter 72 as viewed from the concave mirror 70 side, and the orifice 74 and the like are disposed in the transmission direction. However, the imaging device 200 in FIG. In FIG. 3, the imaging object support device is disposed in the transmission direction of the beam splitter 72, and the orifice 74 and the like are disposed in the reflection direction. An image on the perspective projection method or the projection method can also be obtained by the imaging apparatus 200 having this configuration.
[0024]
It is also possible to use the imaging device 204 shown in FIG. The imaging device 204 is a position of an electrical component 208 as an imaging object held by a suction nozzle 206 as an electrical component holding member in an electrical component mounting system that assembles a printed circuit board by mounting an electrical circuit on a printed wiring board. And for measuring the rotation angle. The suction nozzle 206 includes a fluorescent plate 212 that receives ultraviolet rays from the ultraviolet radiator 210 and emits visible rays (a diffuse reflection plate that irregularly reflects visible rays can also be used). The imaging device 204 uses a fluorescent screen 212 (or diffuse reflection plate) as a bright background forming device, and acquires an accurate silhouette image of the imaging target (electrical component 208).
[0025]
All of the imaging devices described above with reference to the drawings acquire a silhouette image of an imaging object. However, instead of the parallel light generator 52, the uniform illumination device 192, the fluorescent plate 212, etc., the imaging object is placed on the front side. It is also possible to obtain a front image by illuminating with a lighting device. As an example, in the imaging device 204 of FIG. 11, the ultraviolet radiator 210 is changed to a ring light that emits visible light. By providing both the ultraviolet radiator 210 and the ring light and selectively using them, it is possible to obtain both a silhouette image and a front image of the electrical component 208 as an imaging object. If a front image of the object to be imaged is acquired, it is possible to obtain an image of a defect such as a recess, a protrusion, a character printed on the surface, a scratch or a stain generated on the surface, and the like.
[0026]
Next, the image processing device 12 will be described. The image processing device 12 processes the image data acquired by the CCD camera 78 as described above, and based on the outer and inner contour lines of the imaging target 180, the size, position, and reference of the imaging target 180 Find the rotation angle from the rotation position. Further, based on the contour lines of characters, figures, recesses, scratches, dirt, etc. existing on the surface of the imaging object 180, the characters, figures, recesses, etc. are identified, and defects such as scratches, dirt, etc. are detected. Since this image processing is complicated, it will be described in detail later and is omitted here.
Further, the image processing device 12 compares the data such as the dimension, position, and rotation angle obtained as described above with the reference data to determine acceptance / rejection, and the determination result is obtained as the obtained dimension, position, rotation angle, and the like. Is displayed on the monitor television 14 together with the value of. In addition, the monitor television 14 also displays identification results of characters, figures, recesses, and the like existing on the surface of the imaging object 180 and detection results of defects such as scratches and dirt.
[0027]
The image processing apparatus 12 originally has an electrical component mounting device that holds and transports an electrical component supplied from an electrical component supply device by a component holding head such as a suction head to a circuit substrate such as a printed circuit board. It was developed as an image processing apparatus for use. In the electrical component mounting apparatus, the position and orientation of the electrical component held by the component holding head (represented by the rotation angle from the reference rotation position, hereinafter referred to as the rotation angle) is detected or supported by the substrate support device. After detecting the position and rotation angle of the circuit substrate and correcting those errors, electrical components are mounted on the circuit substrate. An image pickup apparatus for picking up images of the image pickup apparatus is necessary and has been developed as an image processing apparatus for these image pickup apparatuses. However, it can also be used to measure and inspect the position, rotation angle and dimensions of general industrial products, and to inspect for the presence or absence of defects.
[0028]
The image processing apparatus 12 is mainly a computer. As shown in FIG. 13, a CPU 254, DRAM (dynamic ram) 256, SRAM (static ram) 258, PROM (programmable rom) 260, kanji ROM 262, frame grabber memory. 264, and an overlay display memory 266 for four surfaces, which are connected to each other by an internal bus (not shown) on the substrate 267.
[0029]
A two-channel serial interface 270 is connected to the internal bus, and the input device 16 is connected. The input device 16 is mainly composed of the keyboard 18 having numeric keys, alphabet keys, and the like, and includes information and commands necessary for the operation of the entire optical inspection device, and types of image processing objects (which may be all or part of the object). This is a device for inputting information necessary for image processing, such as the number of images. An Ethernet interface 274 and a memory card interface 276 are also connected to the bus.
[0030]
The Ethernet interface 274 is an interface for performing communication with a computer that controls a part other than the image processing apparatus, such as an electrical component mounting apparatus. An optional control device can be connected to the image processing apparatus 12, and the Ethernet interface 274 exchanges data via the P1 connector 268. In addition, a control device that controls various drive devices of the electrical component mounting device is also provided separately from the image processing device 12 with a computer as a main body, and is connected to the P1 connector 268 via an external bus (not shown). Since this other control device is not related to the present invention, its illustration and description are omitted.
The memory card stores a program created in advance for performing image processing. When the memory card is set in the image processing apparatus 12, the CPU 254 uses the PROM 260 to execute the program and the program in the memory card. Necessary data is read out via the memory card interface 276 and stored in the DRAM 256.
[0031]
Further, a CCD camera interface 280 is connected to the bus, and a CCD camera 78 of the optical inspection apparatus (or a CCD camera 78 of the electric component mounting apparatus) is connected to the bus. Image data that is image data obtained by the CCD camera 78 is stored in the frame grabber memory 264 via the CCD camera interface 280. As described above, four frame grabber memories 264 are provided, and for example, image data of four imaging objects 180 that are continuously imaged are sequentially stored in each frame grabber memory 264.
[0032]
A TV interface 286 is further connected to the bus, and a monitor TV 14 is connected. The monitor television 14 can perform both color display and monochrome display. As described above, the image data of four monochrome images obtained by imaging the imaging object 180 are stored in parallel in the frame grabber memory 264, while the overlay display memory 266 stores the images. Four memories are provided that can store color image data to be displayed in 16 colors. On the monitor television 14, the color image corresponding to the monochrome image among the four color images is superimposed on any one of the four monochrome images, and the progress and result of the image processing are displayed.
Data input using the input device 16 on the same monitor television 14 is also displayed in color. The Kanji ROM 262 is used during this display.
[0033]
Hereinafter, processing of image data obtained by imaging with the CCD camera 78 will be described.
The program and data for image processing are stored in the memory card as described above, and are read and stored in the DRAM 256 when the memory card is set. Image processing programs read from the memory card are shown in FIGS. By executing these programs, measurement of the size, position, rotation angle, etc. of the image processing object (imaging object), inspection of the dimensions, and inspection for the presence or absence of defects are performed.
[0034]
The program shown in FIG. 14 is a preprocessing program. The preprocessing program is executed when one inspection program is started up, that is, after the preprocessing program is stored in the DRAM 256. First, it is determined whether or not to perform pattern matching for one of all image processing objects necessary for execution of one inspection program. If so, a search template is generated based on the master search template. It is stored in the DRAM 256. Similar processing is sequentially performed for all the image processing objects.
[0035]
The master search template has a plurality of point pairs each having two points as a pair, and a coordinate plane (referred to as a master search template coordinate plane) that defines the point pairs coincides with a reference coordinate plane of the image processing device 12. It is what. That is, the origin and coordinate axis directions of the master search template coordinate plane coincide with the origin and coordinate axis directions of the reference coordinate plane in which the origin is set at the center of the field of view of the CCD camera 78. The master search template is created in advance based on the shape and dimensions of the image processing object and stored in the memory card, and is read into the DRAM 256 together with the preprocessing program.
[0036]
FIG. 17 shows an example of setting data of the master search template when the image processing object is a square portion, and FIG. 18 shows a master search template 300 set by the data. In the data of FIG. 17, the data of the seventh, eighth, tenth and eleventh lines and hs (half span) = 5.5 of the fifth line are the setting data of the master search template. Pair means that another point pair is set symmetrically with respect to the center line of the image processing object on the extension line of two points constituting the point pair. For example, for each point pair 302 of (7), (8), (10), (11) shown in FIG. 18, each of (7) ′, (8) ′, (10) ′, (11) ′ A point pair 302 is set. The numbers in parentheses attached to these point pairs 302 coincide with the line numbers in FIG. Reference numeral 304 denotes an image processing object.
[0037]
In the master search template, for a master image processing object having no error in any of dimensions, position, and rotation angle, one of two points constituting each pair of point pairs is inside the image processing object, and the other is It is created such that it is located outside and the midpoint of the two points of the point pair is located on the edge (contour line) of the master image processing object. If it is shown in the figure, it will be as shown in FIG.
In general, it is not indispensable that the midpoint of the two points of the point pair is positioned on the edge of the master image processing object, and the two points are respectively located inside the edge of the image processing object. It suffices to be designated as outside.
In the example shown in FIG. 18, one of the two points of the point pair 302 is shared with one point of another point pair 302, but this is not essential.
Further, in FIG. 18, two points constituting the point pair 302 are connected by a straight line in order to easily show which point constitutes the point pair 302. However, the straight line data is not actually set.
[0038]
FIG. 21 shows the data of the master search template when the image processing object is the disk 306 of FIG. 22 with a part cut away. In this master search template 308, the point pairs 310 of (15) to (17) provided in the circumferential portion are paired with the point pairs 310 of (15) ′ to (17) ′. Point pair 310 is not paired with another point pair.
[0039]
In the optical inspection apparatus, the image processing object is, for example, the entire image of the imaging object 180, and master search template data for a plurality of types of imaging objects 180 to be inspected is created in advance in a memory card. It is stored in the DRAM 256 when image processing is executed. Therefore, when the search template is generated, master search template data is read from the DRAM 256 according to the type of the imaging object 180 for which the search template is to be generated. As described above, the master search template is a search template with a rotation angle of 0 degree, and the master search template is rotated at a set pitch as shown by a two-dot chain line in FIG. A search template is generated and the data is stored in DRAM 256.
[0040]
Data for designating the generation angle range and set pitch of the search template is stored together with the data of the master search template, as shown in FIG. The pitchA = 4.5 in the 15th line is the set pitch data, and startA = −45 in the 16th line and endA = 45 in the 17th line are data defining the generation angle range of the search template. The angle range and pitch for generating the search template are set according to the imaging object 180. For example, the generation angle range is widened when the rotation angle when the imaging object 180 is placed on the glass plate 54 of the imaging object support device 58 is expected to deviate greatly. Incidentally, in the example of the pre-processing program shown in FIG. 14, the generation angle range is set to −45 degrees to +45 degrees, and the set pitch is set to 5 degrees.
[0041]
When the generation of the search template for one imaging object 180 is completed, the execution of the program returns to the beginning, and the determination of whether or not pattern matching is performed for the next imaging object 180 and the generation of the search template if performed. Is done. When the pattern matching is not performed, the execution of the program returns to the beginning, and it is determined whether or not the next imaging target 180 is subjected to pattern matching. If it is determined whether or not pattern matching is to be performed for all of the imaging objects 180 and generation of a search template for the imaging object 180 for which pattern matching is to be performed, the execution of the program in FIG. 14 ends.
[0042]
Next, the execution processing program shown in FIG. 15 will be described. This program is executed after the imaging object 180 is imaged by the CCD camera 78 and the image data is stored in the frame grabber memory 264. First, if the imaging object 180 can be processed only by pattern matching, such as a rectangular object, image processing is performed according to the pattern matching program shown in FIG.
[0043]
Next, the image processing target is QFP (quad flat package), PLCC (plastic leaded chip carrier), SOP (small).
Outline package), etc. Electrical components that have a large number of leads and complex shapes, BGA (ball grid array) solder bumps, etc. that have a large number of image processing objects, such as solar cell grid patterns It is determined whether or not a complicated part, a machine part having a simple shape that is not a circle or a rectangle, or a pattern matching manager that combines pattern matching for image processing needs to be operated. The combination of pattern matching will be described later.
[0044]
If the pattern matching manager does not need to be operated, it is determined whether image processing on the virtual screen should be performed. If the determination result is NO, it is determined whether image processing on the physical screen should be performed. Is done. The physical screen is an image screen in which the optical characteristic value is obtained for each pixel and the image data actually exists, and the virtual screen is obtained by calculating the optical characteristic value of an arbitrary point not restricted by the pixel as necessary. It is a screen that can be displayed. As will be described later, both the pattern matching and the pattern matching manager are processes performed on the virtual screen. However, in the present embodiment, in addition to these, physical processing on the virtual screen is performed independently of pattern matching. Image processing can be performed on the screen. The determination of whether or not to perform image processing on the virtual screen and whether or not to perform image processing on the physical screen is a command to perform pattern matching or pattern matching manager image processing. It is a judgment of whether or not
[0045]
The pattern matching program shown in FIG. 16 will be described.
First, a search window is set, and a search area for searching for an image processing target is set. The search window is set by designating part or all of the imaging surface of the CCD camera 78 by coordinate values. What the image processing object is is known from the data in the work procedure, and the position of the image of the image processing object formed on the imaging surface is roughly known, so the search window has a slight shift in position. Is set to a sufficient size suitable for including the image processing object. In this way, the search area can be narrow and the search can be performed in a short time.
[0046]
The full pattern matching process consists of a search step for searching the search target part, a re-search step for searching for an approximate edge point of the search target part, a measurement step for calculating the edge point of the search target part, and a measurement step that repeats the measurement step. It includes five steps: measurement step and inspection step. Normally, pattern matching ends when all five steps are completed. If there is even one abnormal step, the next step is not executed and the pattern matching is immediately terminated.
[0047]
First, the search step will be described.
In the search step, search templates are sequentially read out from the DRAM 256 one by one, and as shown in FIG. 24, the image 320 of the image processing object and the background (meaning parts other than the image processing object, If the object is a concave portion on the surface of the part, the image of the surface of the part becomes the background), and the two points constituting the plurality of point pairs 324 of the search template 322 An optical characteristic value (in this embodiment, luminance) of the point pair (hereinafter referred to as a point pair constituent point) is calculated. In the example shown in FIG. 17, the search is sequentially performed from the search template whose rotation angle is −45 degrees.
[0048]
The point pair composing point is a point on the virtual screen, and the luminance of the point pair composing point is obtained by interpolation calculation from the luminance as image data of a plurality of pixels on the physical screen. The optical characteristic value of the point on the virtual screen specified by the data of the search template is obtained based on the image data of the physical screen, and this is visually represented in FIG. This means “superimpose the search template on the screen on which the image represented by the image data is present”. The screen 321 in FIG. 24 is a virtual screen, and the image 320 of the image object in the screen 321 is only virtual if it exists at this position, and there is actually no image data representing this image 320. The same applies to other figures.
[0049]
Interpolation calculation of the luminance of the point pair constituent points can be performed using a curved surface such as a bicubic spline curved surface defined by image data of 4 × 4 control points on the X, Y coordinate plane, for example. However, in the present embodiment, it is performed by the simplest linear interpolation based on the image data of four pixels adjacent to the point pair constituent points. In FIG.0 , V0 ) Is the point pair constituent point, f (u0 , V0 ) Is the luminance of the point pair constituent points, and (u ′, v ′), (u ′ + 1, v ′), (u ′, v ′ + 1), and (u ′ + 1, v ′ + 1) are used for linear interpolation, respectively. The center positions of the four pixels to be processed are f (u ′, v ′), f (u ′ + 1, v ′), f (u ′, v ′ + 1), and f (u ′ + 1, v ′ + 1). It is each brightness | luminance of four pixels, and the brightness | luminance of a point pair constituent point is calculated by (1) Formula.
f = (u0 , V0 ) = F (u ′, v ′) (1-α) (1-β) + f (u ′ + 1, v ′) α (1-β) + f (u ′, v ′ + 1) (1-β) β + f (U ′ + 1, v ′ + 1) αβ (1)
[0050]
The above calculation is performed by a physical screen / virtual screen conversion driver 380 shown in FIG. As shown in the figure, the physical screen / virtual screen conversion driver 380 is configured separately from general image processing application software 382, and is based on image data on the physical screen 384 in the image processing application software 382. Every time image data on the virtual screen 386 needs to be calculated, the physical screen / virtual screen conversion driver 380 is called to calculate the image data on the virtual screen 386.
[0051]
Each time the brightness is calculated for the two constituent points of each pair of point pairs 324, the brightness of the two point pair constituent points is compared. When a silhouette image is captured by the CCD camera 78, a charge amount of the solid-state imaging device is different between a portion corresponding to the image processing target (imaging target 180) and a portion corresponding to the background. The image of the image processing object is dark and the background is bright. Therefore, if one of the two point pair constituent points is located within the edge of the image processing object and the other point is located outside the edge, the brightness of the two point pair constituent points is preset. There is a difference greater than the set value (when the set value is positive) or less than the set value (when the set value is negative).
[0052]
The set value of the brightness difference is stored together with the master search template data. For example, in FIG. 17, the setting value diff is set to 20 as described in the fifth line. In this case, out of the two point pair constituent points, if the brightness of the point pair constituent point within the edge of the image processing object is 20 gradations or more lower than the brightness of the point pair constituent point outside the edge, the set value or higher It is determined that there is a difference.
On the other hand, if the set value diff is set to −20, if the brightness of the point pair constituent point outside the edge of the image processing target is 20 gradations or more lower than the brightness of the point pair constituent point inside the edge, the set value It is determined that there is a difference as described above.
In either case, these two point pair constituent points straddle the edge of the image processing object, and are in an adapted state. In this case, it is expressed as “two point pair constituent points satisfy the set luminance difference condition”.
[0053]
(1) The image processing target is not the search target part, and the two point pair constituent points do not straddle the edge. (2) The imaging target 180 is placed on the inspection target support plate 72 due to a supply error. Or (3) two point pair composing points do not satisfy the set brightness difference condition and are in conformity due to reasons such as image data cannot be obtained due to dust attached to the solid-state image sensor. There are things I can't say. This state is called a point pair failure. The number of failures for determining that there is no search target part that matches the search template is preset. For example, in FIG. 17, the number of failures is set to 0 as shown in the third row, and if the two point pair constituent points do not satisfy the set luminance difference condition for all the point pairs, the search template is matched. It is determined that there is a search target part to be present.
[0054]
If the number of failures is set to 1 or more, if there are more than a set number of point pairs that do not satisfy the set brightness difference condition among multiple point pairs, there is a search target part that matches the search template. It is determined not to. If it is determined that the search target part exists at the rotation angle of −45 degrees, the search step is ended and the re-search step is executed. If it is determined that the search target part does not exist, search templates having different rotation angles are read out. Then, the search target part is searched.
[0055]
Until it is determined that the search target portion exists, a plurality of types of search templates are sequentially read and the search target portion is searched. Even if searching using all types of search templates, if it is not determined that there is a search target part that matches the search template, the search template is shifted and then searched. The search target portion is searched using a plurality of types of search templates that are shifted by a certain pitch in the X-axis direction and the Y-axis direction and have different rotation angles at each position.
[0056]
This movement pitch is preset and stored in the memory card together with data defining the master search template. In FIG. 17, pitchX = 2.2 and pitchY = 2.2 shown in the 13th and 14th lines are the movement pitches. First, the set pitch is moved in the Y-axis direction. Specifically, coordinate conversion is performed so that the coordinates of each point pair of a plurality of types of search templates are shifted from the Y-axis direction by a set pitch in the positive direction. The search target part is searched using this search template. If it is not determined that the search target portion exists even if all types of search templates having different rotation angles are used at this position, the search template is then shifted in the positive direction by the set pitch in the X-axis direction. Furthermore, if it is not determined that the search target portion exists, the search template is shifted from the Y axis direction to the negative direction by the set pitch. If the determination that the search target part exists is not obtained here, the search template is further shifted in the negative direction by the set pitch in the Y-axis direction, and further the determination that the search target part exists also cannot be obtained here. For example, the search template is then shifted in the negative direction by the set pitch in the X-axis direction. The search template is moved in the search window so as to draw a square spiral.
[0057]
Even if the search template is moved, it cannot be determined that the search target part exists, and if a point pair that protrudes from the search window occurs when coordinate conversion is performed, the search template cannot be moved. Thus, it is determined that there is no search target part that matches the search template, and the search step is terminated abnormally. The occurrence of abnormality is displayed on the monitor television 14 and the occurrence of abnormality is stored. When the image processing object is the inspection object 180, the placement position of the inspection object 180, which has been determined to be abnormal in the image processing result, on the inspection object support plate 72 is checked by the operator. If the position is greatly deviated, the position is corrected. If the position is not deviated greatly, it is determined that the inspection object 180 is not intended and is eliminated.
[0058]
If the two point pair composing points of all the point pairs 324 are inside and outside the edge of the image 320 as in the image 320 of the image processing target object shown in FIG. The position and rotation angle of the current search template are stored in the DRAM 256, and the re-search step is executed. In the re-search step, as shown in FIG. 27, the re-search template coordinate plane (search template coordinate plane) in which the edge point of the image 320 of the image processing object is the coordinate plane of the re-search template 328 using the re-search template 328. Is searched). The re-search template 328 includes a plurality of seek lines 330. The seek line 330 is set based on the search template that found the image 320 of the image processing object in the search step. The two point pair composing points of the point pair are points that define both ends of the seek line 330, respectively.
[0059]
The edge point of the image 320 of the image processing object is searched for each of the set plurality of seek lines 330. In this sense, the re-search template 328 can be considered as a measurement template. As shown in FIG. 28, this search is performed by dividing the seek line 330 at a predetermined pitch (for example, 0.05 mm) and calculating the luminance for each of the plurality of division points P1 to P15. This pitch is set to a length shorter than the diagonal line of the solid-state imaging device 332 of the CCD camera 78. Therefore, three to four division points are included in one solid-state imaging device 332. The division points are also points on the virtual screen, and linear interpolation is performed in the same manner as in the search step, and the luminance of the division points P1 to P15 is calculated.
[0060]
An example of each brightness | luminance of 15 division | segmentation points P1-P15 calculated by linear interpolation is shown in FIG. Note that the luminance value is represented by a positive value, and the value increases as the luminance value acquisition object becomes brighter. The imaging apparatus 10 of the present embodiment irradiates the inspection object 180 as an image processing object with parallel light from the back side, and acquires an image based on the parallel light that has passed around the inspection object 180. In the following description, the image processing object is dark and has a small luminance value, and the background is bright and has a large luminance value.
From the luminance value calculated by the linear interpolation, it cannot be determined where the luminance changes the most as shown in the graph of FIG. Therefore, the differential value of the luminance value is obtained using a difference filter. The result of obtaining the differential value using the difference filter shown in FIG. 30 is shown in the graph of FIG. This difference filter has a negative value for the luminance of a point located upstream of two adjacent points from one point that defines a seek line toward the other point, and points that are located downstream. This is a filter that takes a positive value and calculates the sum of these two values. This differential value is not the value of the dividing point, and in the graph of FIG. 33, the position where the luminance differential value is obtained is indicated by “0.5” which is the center position of the adjacent two dividing points. As is clear from this graph, the magnitude of the luminance change is known, but it is not known where it is the maximum.
Depending on the calculation direction, that is, whether the calculation is performed from the dividing point inside the image processing object to the dividing point outside the image processing object (in the background) or vice versa, The sign of the value is reversed. In the former case, the luminance differential value becomes a positive value, and the position where the luminance differential value is the maximum is the position where the absolute value of the change gradient of the luminance is the maximum (the luminance differential value of the position where the absolute value of the change gradient is the maximum). Called maximum). In the latter case, the luminance differential value is a negative value, and the position where the luminance differential value is the minimum is the position where the absolute value of the luminance change gradient is the maximum (the luminance differential value at the position where the absolute value of the change gradient is the maximum). Called the local minimum). The luminance differential values shown in the graph of FIG. 33 and FIG. 34 described next are values obtained by the former calculation.
[0061]
On the other hand, if differentiation is performed using the differential filter shown in FIG. 31, the maximum value 177 of the luminance differential value is obtained at the position of f8.5 as shown in the graph of FIG. It can be seen that the absolute value of is the maximum position. The difference filter shown in FIG. 31 has a negative value for each of the four dividing points including the dividing point and upstream in the calculation direction with respect to one of the dividing points set on the seek line. In this filter, the luminance values of four consecutive dividing points on the downstream side are all positive values and the sum thereof is obtained.
[0062]
If dirt or the like adheres to the part corresponding to the edge point of the solid-state image sensor and the charge amount changes, the maximum or minimum value of the luminance differential value may be obtained at a position other than the edge point. The absolute value of the luminance change gradient at such a position is small. On the other hand, in the vicinity of the edge point, there is a significant difference between the brightness of the image processing object and the background, and the absolute value of the luminance change gradient is large. Therefore, a set value is provided, and it is determined whether or not the luminance differential value at the position where the absolute value of the change gradient is the maximum is a value obtained in the vicinity of the edge point, and the former case is excluded. This set value is set to a positive value when the luminance differential value is obtained as a positive value, it is determined whether or not the maximum value of the luminance differential value is greater than or equal to the set value, and the maximum value is greater than or equal to the set value. If so, the maximum value is a value obtained in the vicinity of the edge point, and it is determined that it can be used for the calculation of the edge point, and the calculation of the edge point is performed. In addition, when the luminance differential value is obtained as a negative value, the set value is set as a negative value, and it is determined whether or not the minimum value of the luminance differential value is less than or equal to the set value. If it is below, it is determined that the minimum value can be used for the calculation of the edge point. In other words, the failure of the seek line in the re-search step is that the edge point is not calculated because the maximum value of the luminance differential value is smaller than the set value or the minimum value is larger than the set value.
[0063]
In the example shown in FIG. 17, similarly to the examples shown in FIGS. 32 and 33, the luminance differential value is determined to be calculated from the dividing point inside the image processing object toward the dividing point outside. The brightness differential value becomes the maximum at the position where the absolute value of the change gradient of the brightness value is the largest, and the setting value for determining whether or not the maximum value is a value obtained in the vicinity of the edge point is a positive value. The value, that is, ll = 200 as shown in the fifth row. In this example, since the image processing object is darker than the background, the luminance differential value is obtained as a positive value, and if the value is not 200 or more, the calculation of the position of the edge point is not performed. Yes.
[0064]
Further, as shown in FIG. 17, it is also determined in advance what kind of difference filter is used for the calculation. This differential filter coefficient N is calculated according to the equation (2).
N = gUnit / pitch between division points (2)
Where gUnit is the diagonal length of the solid-state image sensor.
[0065]
If differentiation is performed using a differential filter and the maximum value (or minimum value) of the luminance differential value is obtained, the position where the absolute value of the change gradient of the luminance is the maximum, that is, the edge point is obtained according to the following equation. Equations (3) and (4) are equations taking N = 4 as an example, and fmax, F(max-4)~ F(max-1), F(max + 1)~ F(max + 4)Is the luminance differential value (fmaxIs the maximum (small) value. As shown in FIG. 34, “f” indicates a position where the luminance differential value is obtained on the seek line by adding a number. In the expressions (3) and (4), “f” is designated by the number added to f. Represents the luminance differential value of the position to be performed. fmaxIs the luminance differential value at the position where the luminance differential value is maximum (small) (f8.5 in the example shown in FIG. 33), and f(max-1), F(max-2), F(max-3), F(max-4)Are respectively f in the calculation directionmaxThe luminance differential values at four locations on the upstream side (f7.5, f6.5, f5.5, f4.5 in the example shown in FIG. 33), and f(max + 1), F(max + 2), F(max + 3), F(max + 4Are respectively f in the calculation directionmaxThe luminance differential values at four locations on the downstream side (in the example shown in FIG. 33, f9.5, f10.5, f11.5, and f12.5).
dl = fmax× 4-(f(max-1)+ F(max-2)+ F(max-3)+ F(max-4)(3)
dr = fmax× 4-(f(max + 1)+ F(max + 2)+ F(max + 3)+ F(max + 4)(4)
edgePitch = (dl × N) / (dl + dr) −N / 2 (5)
Edge point = (Luminance differential value maximum (small) value point pitch + edgePitch) x division point pitch (6)
Equations (3) and (4) are equations in the case of N = 4. In general, when dl is obtained, it is calculated from a value obtained by multiplying the luminance differential value of the maximum (small) value point by N. When the sum of the luminance differential values of N points upstream of the local maximum (small) value point in the direction is subtracted and dr is obtained, the luminance differential value of the local maximum (small) value point is multiplied by N, The sum of the luminance differential values of N points downstream of the maximum (small) value point is subtracted. Note that when the edge point is obtained when the calculation result shown in FIG. 29 is differentiated using the difference filter shown in FIG. 31, the brightness differential value maximum (small) value point pitch number in the equation (6) is 8. 5.
[0066]
At the time of calculating the edge point, first, the luminance of the dividing point is calculated by linear interpolation, and after differentiation is performed according to the difference filter coefficient N, the calculation is performed according to equations (3) to (6) to obtain the maximum luminance change position. That is, an edge point is obtained. In the case of the seek line 330 shown in FIG. 28, the calculation result of Equation (6) is 0.403 mm, and it can be seen that there is an edge point at a position 0.403 mm from the division point P1 of the seek line 330.
[0067]
In this way, an edge point is calculated for each of the plurality of seek lines 330. The number of failures of the seek line 330 (if the number of failures of the point pair 302 is equal to or less than the set number, if it is determined that there is a search target part that matches the search template, the failure of the point pair 302 If the sum of the number and the number of failures of the seek line 330) is equal to or less than the set number, it is determined that the operation is normal and the measurement step is executed. The processing when an abnormality occurs is the same as the search step. In FIG. 17, the fail count is set to 0 as shown in the third line, and if there is even one failure, the re-search step is terminated abnormally.
[0068]
If the number of failures is less than or equal to the set number and the re-search step ends normally, the measurement step is executed next. The re-search template is set based on the search template determined to be the search target portion in the search step, and the edge point can be found on the seek line 330, but the midpoint between the edge point and the seek line 330 (see FIG. In general, there is a difference between the mark 27 and the mark 27, which will be referred to as an ideal point hereinafter. The two points constituting the point pair are set so that the midpoint of these two points is located on the edge of the search target part if there is no shift in size, position and rotation angle in the search target part. Although the ideal point and the edge point should match, there is actually a shift in the image processing object, and a shift occurs between the ideal point and the edge point obtained by the calculation.
[0069]
Therefore, if the re-search step is executed without abnormality, the measurement step is executed next, and the position of the edge point is calculated. In the measurement step, first, a measurement template 336 as shown in FIG. 35 is automatically set. The measurement template 336 includes a plurality of seek lines 338. The master measurement template data set in advance, the relative position data of the re-search template coordinate plane with respect to the reference coordinate plane in the re-search step, and the re-search It is set based on the calculation result of the edge point on the template coordinate plane.
[0070]
The master measurement template data is stored together with the master search template data and the like as illustrated in FIG. The data in the 20th to 33rd lines in FIG. 17 is the data for executing the measurement step, and the data in the 21st line hs = 3.5, the 23rd to 27th lines, and the 29th to 33rd lines are the master measurements. Template data. A master measurement template 340 obtained from this data is shown in FIG. Reference numeral 342 denotes a seek line. The master measurement template 340 has more seek lines than the master search template for the same electrical component.
When the image processing target is a disc 306 with a part cut away, a master measurement template 344 having a plurality of seek lines 346 is set as shown in FIG.
[0071]
Part or all of the measurement template seek line is paired. On the extension line of the seek line, another seek line is set symmetrically with respect to the center line of the image processing object. These paired seek lines are referred to as pair seek lines.
The measurement template is set by coordinate conversion of master measurement template data. Coordinate plane of the search template (The coordinate plane of this search template is the same as the search template coordinate plane of the search template when the image processing object is determined to be a search target part that matches the search template in the search step. The relative position and relative rotation angle with respect to the reference coordinate plane, and the relative position and relative rotation angle of the image processing object with respect to the re-search template coordinate plane (these are based on the coordinate values of the edge points calculated in the re-search step). Since this calculation is performed, coordinate conversion corresponding to this calculation is applied to the master measurement template data (set in the master measurement template coordinate plane that matches the reference coordinate plane). is there.
[0072]
When the automatic setting of the measurement template is completed, the calculation of the edge point on each seek line of the measurement template is performed in the same manner as that in the re-search step. A dividing point is set on the seek line at a constant pitch, and the luminance is calculated by linear interpolation for each dividing point, and a differential filter is used to calculate a luminance differential value and an edge point is calculated. Also in the measurement step, the number of allowable failures is set. The fail here means that the edge point is not calculated for the seek line as in the re-search step. If the number of failures is less than or equal to the set number, it is determined to be normal, and then a re-measurement step is executed. If the number of failures exceeds the set number, the measurement step is terminated abnormally. The processing when an abnormality occurs is the same as in the search step.
[0073]
In the remeasurement step, a remeasurement template is set and an edge point is calculated. The remeasurement template is automatically set based on the measurement template and the edge point calculated in the measurement step. Based on the edge point obtained in the measurement step, the measurement template is rotated by coordinate transformation to a position where the ideal point is expected to be located on the edge point. The calculation of edge points in the re-measurement step is performed in the same manner as in the re-search step.
[0074]
The determination of abnormality in the re-measurement step uses the allowable number of failures set for the measurement step, and if there are more seek lines from which edge points cannot be obtained than the set number, it is abnormal and the image processing is terminated. The processing when an abnormality occurs is the same as in the search step. If the number is less than the set number, the process ends normally, and then the object vector, that is, the size, position, and rotation angle of the image processing object are calculated. The greater the number of executions of the re-measurement step, the smaller the deviation between the ideal point and the edge point, and the edge point detection accuracy is improved. The set number of remeasurement steps is preset and stored.
Note that the remeasurement template used for execution of the second and subsequent remeasurement steps is automatically set from the remeasurement template at the time of execution of the immediately previous remeasurement step and the calculation result of the edge point in the remeasurement step.
[0075]
If the re-measurement step is completed normally, the difference between the measured dimension of the image processing object and the reference dimension is calculated, and the calculation result is compared with the allowable error range. If it is outside the allowable error range, it is determined as rejected. The reference dimension and the allowable error range are determined in advance for each image processing object and stored in the memory card. Therefore, when the memory card is read into the image processing apparatus 12, it is stored in the DRAM 256, and these reference dimensions and allowable error ranges are used in the dimension inspection.
[0076]
If the dimensional inspection is completed normally, an inspection step, which is an inspection for the presence or absence of defects, is subsequently performed. As illustrated at the bottom of FIG. 17, master inspection template data is stored in the DRAM 256 together with the master search template data and the master measurement template data. The master inspection template represented by the master inspection template data is shown in FIG. 57. The master inspection template data and the data of the position and rotation angle of the image processing object measured by executing the re-measurement step. Inspection template data is created based on this, and the inspection step is executed. The master inspection template shown in FIG. 57 includes two negative seek lines 350 and 352 for inspecting whether or not there is a defect such as a notch and a flash on the right side of the square image processing object 304. And the positive seek line 354. The positive seek line 354 should be originally represented by a right-pointing arrow, but is represented by a simple line segment for convenience of illustration. Details of the inspection step will be described later.
[0077]
The monitor TV 14 displays the progress of image processing. For example, at the time of executing the search step, the image processing object (inspection object) is based on the image data stored in the frame grabber memory 264 (for example, one set of four sets of image data obtained by imaging the four inspection objects 304). The image including the image of the object 304) and the background is displayed in monochrome, and the state in which the angle of the search template is changed by a set pitch and the position is changed to a rectangular spiral is displayed in color on the image. Progress is indicated.
[0078]
The monitor TV 14 can be displayed in two modes, an automatic selection display mode and a manual selection display mode. When the monitor television 14 is set to the automatic selection display mode, the display of the image processing progress, Both the input related data related to the input from the input device 16 are displayed while giving priority to the input related data. Accordingly, when data is input by the input device 16 in the state of being set to the automatic selection display mode, the display of the image processing progress is automatically switched to the display of input related data.
In the manual display selection mode, only the display selected by the operator's manual operation among the display of the image processing progress and the display of the input related data is performed.
[0079]
Next, the calculation of the object vector of the image processing target will be described. An object vector calculation program for performing the calculation described below is stored in the memory card, and is transferred to the DRAM 256 when the memory card is set in the image processing apparatus 12.
Dimensions, positions, and rotation angles are calculated when specified. For example, in the example of FIG. 17, P of vf = PA in the 5th and 21st rows represents the position (Position), A represents the angle (Angle), and it is specified to calculate the position and the rotation angle. .
[0080]
The dimension calculation is necessary in the following cases, for example. (1) When the dimensions of the image processing object are required, (2) When it is desired to identify the image processing object as being similar to the search object but not the search object, (3) Fail in edge measurement. This is the case when it is desired to ensure position measurement accuracy. (2) is, for example, a case where it is necessary to distinguish electrical components having the same shape and slightly different dimensions. The reason why the size calculation is necessary in the case of (3) is that if there is a failure, the size is required to determine the position of the image processing object in consideration of the failure as will be described later.
Also in the present embodiment, the dimension calculation is not performed if none of the above (1) to (3) applies, but if the dimension calculation is necessary, prior to the calculation of the position and the rotation angle. Done.
[0081]
Hereinafter, an example in which the image processing object is a rectangular inspection object 304, calculation of dimensions, position, and angle is specified and there is a failure will be described as an example.
First, the dimension calculation will be described. The dimension calculation is performed using a pair seek line with an instruction to use for dimension calculation. In other words, if there is no instruction to use any of the seek lines for the dimension calculation, the dimension calculation is not performed if the seek line is not a pair seek line even if there is an instruction. Whether or not to perform dimension calculation by setting a flag to 0 when there is no designation to perform dimension calculation for a seek line in one template, and setting a flag to 1 if there is even one specification. Is determined. In this way, when the dimension calculation is unnecessary, it is possible to know that the dimension calculation is not necessary without determining whether or not each of the seek lines is instructed to be used for the dimension calculation. And processing time is short.
[0082]
The first dimension calculation is a size factor calculation. The size factor is an excess rate of the dimension of the image processing object in each of the X-axis direction and the Y-axis direction of the measurement template coordinate plane (measurement template setting coordinate plane). As shown by a square object 358 in FIG. 36, the dimensional excess ratio in the X-axis direction is the distance (measurement span) between the edge points of the respective seek lines of a plurality of pairs of seek lines set parallel to the X-axis direction. Is divided by the distance (referred to as the original span) between the ideal points (points marked with x in the figure) of the pair seek line. Further, the dimensional excess ratio in the Y-axis direction can be obtained by averaging the values obtained by dividing the measurement span of each pair seek line of the plurality of pair seek lines set in the Y-axis direction by the original span. A broken line in FIG. 36 indicates a seek line in which a failure has occurred, and the size excess rate is not calculated for a pair seek line including a seek line in which a failure has occurred. The dimensions are calculated by multiplying the dimensional excess ratio in the X-axis direction and the dimensional excess ratio in the Y-axis direction by the original spans of the rectangular object 358 in the X-axis direction and the Y-axis direction, respectively.
[0083]
If there is a failure in any one of the plurality of seek lines, a size point, which is a point obtained by correcting the ideal points with the size factor for all the seek lines having no failure, is calculated. As shown in FIG. 37, for a seek line substantially parallel to the Y-axis direction, the Y-coordinate value of the size point is calculated by multiplying the Y-coordinate value of the ideal point by the dimensional excess rate in the Y-axis direction. Is omitted, the seek line parallel to the X-axis direction is calculated by multiplying the X coordinate value of the ideal point by the dimensional excess rate in the X-axis direction.
[0084]
In addition, as described above, the size factor is calculated using only a pair of seek lines parallel to the X axis and the Y axis, and the size using the obtained size factor is used. The point calculation and the like are also performed for a seek line that is not parallel to the X axis and the Y axis. The calculation of the size point for the inclined seek line and the following calculation are substantially the same as the calculation of the size point in a circular image processing object (inspection object) described later.
[0085]
Next, the difference Diff between the edge point and the size point is calculated. The size point corresponds to an ideal point when it is considered that a measurement template is set again after approving the dimensional error for an image processing object having a dimensional error. Therefore, the difference Diff between the edge point and the size point represents the positional deviation amount of the edge point itself. The difference Diff is calculated by subtracting the size point coordinate value from the edge point coordinate value. If the difference Diff is a positive value, the edge point is shifted to the positive side on the measurement template coordinate plane. It will be.
[0086]
The reason for calculating the size point when there is a failure in this way is to reduce the influence of the failure on the calculation of the position of the image processing object and to reduce the calculation error. For example, if the size of the image processing object is larger than the original size but there is no misalignment, there is a failure in one seek line constituting the calculation error pair seek line and there is no failure in the other seek line. If the size point is not calculated and the calculation is performed with the ideal point, the sum of the difference between the edge point and the ideal point becomes larger on the non-failing side than on the failing side. In spite of this, a calculation result indicating that the image processing object is shifted to the seek line with no failure is output, and the size point is calculated to avoid this.
[0087]
Next, the calculation of the position and the rotation angle will be described. In an optical inspection apparatus, it is often necessary to acquire only the outer dimension or the inner dimension of the inspection object 304, but the image processing object is a character described on the surface of the inspection object 304 or the inspection object. In the case of a scratch or the like occurring on the surface of the object 304, or in the case of the electric component 208 held by the suction head in the electric component mounting apparatus, it is necessary to measure the position and rotation angle thereof. Often there is. The calculation of the rotation angle is performed only based on the seek line of 0 degree, 90 degrees, 180 degrees, and 270 degrees and instructed to be used for the calculation of the rotation angle. In addition, each process of 0 degrees and 180 degrees, 90 degrees and 270 degrees is performed in a lump.
[0088]
The position and the rotation angle are calculated with respect to the rotation center RC. The rotation center RC is the calculation center of the computer, and may be different from or coincide with the designated center DC designated by the operator as the center of the image processing object. The designated center DC is usually the center point when the planar shape of the inspection object 180 has a center point. The point may be the designated center DC. When the image processing object is the electric component 208, the point used as the reference of the image processing object is set as the designated center DC in creating the program for mounting the electric component 208 on the circuit substrate. In addition, the origins of the master search template coordinate plane, the master measurement template coordinate plane, and the like are placed at the designated center DC, and the position correction amount in the horizontal plane of the electrical component 208 is calculated with respect to the designated center DC as will be described later. .
[0089]
First, taking the straight line L shown in FIG. 38 as an example, the calculation of the position and the rotation angle will be described. Originally four seek lines were set for the straight line L, but three seek lines SL were set depending on whether one failed or three seek lines were set from the beginning.1 , SL2 , SLThree If the above-mentioned difference Diff is calculated, the rotation center RC is the two left seek lines SL.1 , SL2 Set close. The rotation center RC is the absolute value of the sum of the distances between the plurality of seek lines on one side and the rotation center RC (the distance between the seek line and the rotation center RC when there is one seek line), and the other The absolute value of the sum of the distances between the plurality of seek lines and the rotation center (the distance between the seek line and the rotation center RC when there is one seek line) is set to a position where they are equal. In other words, if one side of the rotation center RC is positive and the other side is negative, the rotation center RC is set at a position where the sum of distances to all seek lines becomes zero. The rotation angle (radian) is calculated by equation (7).
Rotation angle = (AO · A ′ + BO · B ′ + CO · C ′) / (AO2 + BO2 + CO2 (7)
However,
AO: Center of rotation RC and seek line SL1 Distance to
BO: Center of rotation RC and seek line SL2 Distance to
CO: Center of rotation RC and seek line SLThree Distance to
A ′: difference Diff on seek line A
B ′: Difference Diff on seek line B
C ′: Diff on the seek line C
Further, the position of the rotation center RC is calculated by the equation (8).
(A '+ B' + C ') / 3 (8)
[0090]
The angle can also be obtained by calculating the angle for each of a plurality of seek lines using the difference Diff and the distance from the center of rotation of the edge point, and averaging them. If the angle deviates greatly even at one location, the error greatly affects the final angle value. On the other hand, if the angle is calculated according to the above equation (7), the influence of the error at a specific edge point can be reduced, and the calculation accuracy of the rotation angle can be improved.
[0091]
If there is a failure in any of a plurality of seek lines and an edge point cannot be obtained, as shown in FIG. 39, a shift occurs between the designated center DC and the rotation center RC. SL2 Is a seek line that has failed. Generally, since the designated center DC is set at the center of the image processing object and the seek line is set symmetrically with respect to the designated center DC, a failure occurs in the seek line, and the rotation center RC corresponding to the failure is set. In other words, there is a difference between the designated center DC and the rotation center RC.
As described above, the rotation center RC is positive on one side of the rotation center RC and negative on the other side, so that the sum of the distances between the edge points of the plurality of seek lines and the rotation center RC becomes zero. Therefore, equation (9) is established, and equation (10) is obtained from this equation (9), and the deviation v between the rotation center RC and the designated center DC is calculated.
t0 + T1 + TThree = 0 (9)
(S0 −v) + {s0 + (S1 -S0 ) -V} + {s0 + (SThree -S0 ) -V} = 0 (10)
However,
t0 : Rotation center RC and seek line SL0 Distance to
t1 : Rotation center RC and seek line SL1 Distance to
tThree : Rotation center RC and seek line SLThree Distance to
s0 : Designated center DC and seek line SL0 Distance to
s1 : Designated center DC and seek line SL1 Distance to
sThree : Designated center DC and seek line SLThree Distance to
[0092]
As shown in FIG. 40, when the seek line is set for two sides parallel to each other of the rectangular image processing object, the expression (11) is established, and the deviation between the rotation center RC and the designated center DC is established. The quantity v is calculated based on equation (12).
t0 + T1 + T2 + TThree + TFour + TFive = 0 (11)
s0 + {S0 + (S1 -S0 )} + {S0 + (S2 -S0 )} + {S0 + (SThree -S0 )} + {S0 + (SFour -S0 )} + {S0 + (SFive -S0 )}-6v = 0 (12)
[0093]
In the case of the image processing object shown in FIG. 41, Expression (13) is established, and the deviation v between the rotation center RC and the designated center DC is calculated based on Expression (14).
t0 + T1 + T2 + TThree + TFour = 0 (13)
s0 + {S0 + (S1 -S0 )} + {S0 + (S2 -S0 )} + {S0 + (SThree -S0 )} + {S0 + (SFour -S0 )}-5v = 0 (14)
[0094]
As shown in FIG. 42, when the seek lines are set in two directions perpendicular to each other, equations (15) and (16) are established for the X-axis direction and the Y-axis direction, respectively, Each displacement in the X-axis direction and Y-axis direction from the specified center DCx, VyAre calculated based on the equations (17) and (18), respectively.
t0 + T1 + T2 + TThree + TFour + TFive = 0 (15)
t6 + T7 + T8 + T9 + TTen+ T11= 0 (16)
s0 + {S0 + (S1 -S0 )} + {S0 + (S2 -S0 )} + {S0 + (SThree -S0 )} + {S0 + (SFour -S0 )} + {S0 + (SFive -S0 )}-6vx= 0 (17)
s6 + {S6 + (S7 -S6 )} + {S6 + (S8 -S6 )} + {S6 + (S9 -S6 )} + {S6 + (STen-S6 )} + {S6 + (S11-S6 )}-6vy= 0 (18)
[0095]
Center of rotation RC based on equation (17) for X-axis directionXDisplacement in the X-axis direction with respect to the specified center DCx, And based on that, the center of rotation RCXIs required. Center of rotation RC based on equation (18) for Y-axis directionYDisplacement in the Y-axis direction with respect to the specified center DC ofy, And based on that, the center of rotation RCyIs required. Center of rotation RCXThrough the straight line parallel to the Y axis of the seek line setting coordinates and the rotation center RCY, And the intersection with the straight line parallel to the X axis is the rotation center RC of the image processing object shown in FIG.
[0096]
FIG. 43 shows another example of an image processing object in which seek lines are set in two directions perpendicular to each other. With respect to this image processing object, Equations (19) and (20) are established, and each displacement v in the X-axis direction and Y-axis direction between the rotation center RC and the designated center DC is v.x, VyAre calculated based on the equations (21) and (22), respectively. However, the image processing object shown in FIG. 43 has no deviation between the rotation center RC and the designated center DC, and vx= Vy= 0, and the distance between the seek line, the rotation center RC, and the designated center DC is illustrated as being the same. Therefore, the equations (19) and (20) and the equations (21) and (22) are illustrated. The same symbols are used in the equations.
s0 + S1 + S2 + SThree = 0 (19)
sFour + SFive + S6 + S7 = 0 (20)
s0 + {S0 + (S1 -S0 )} + {S0 + (S2 -S0 )} + {S0 + (SThree -S0 )}-4vx= 0 (21)
sFour + {SFour + (SFive -SFour )} + {SFour + (S6 -SFour )} + {SFour + (S7 -SFour )}-4vy= 0 (22)
[0097]
In order to calculate the rotation angle, the angle factor shown in FIG. 44 is preset. The angle factor is determined by the position and polarity of the seek line. If the angle factor shown in FIG. 44 is shown on the XY coordinates, it will be as shown in FIG.
[0098]
FIG. 46 shows an example of calculating the position and rotation angle of the image processing object using the rotation center RC and the angle factor. The rotation angle is calculated according to equations (23) and (24). D in equation (23)0 t0 Or dFour v1 The sign of is determined by the angle factor. The rotation angle calculated by the equation (23) is the rotation angle of the image processing object with respect to the measurement template coordinate plane.
Further, the positional deviation Δx in the X-axis direction and the positional deviation Δy in the Y-axis direction of the rotation center RC are calculated by equations (25) and (26), respectively. These positional deviations Δx and Δy are deviations from the actual position of the rotational center RC.
Rotation angle = (− d0 t0 -D1 t1 + D2 t2 + DThree v0 -DFour v1 ) / Ta·····(twenty three)
ta= T0 2+ T1 2+ T2 2+ V0 2+ V1 2····(twenty four)
Δx = (dThree + DFour ) / 2 ... (25)
Δy = (d0 + D1 + D2 ) / 3 (26)
Where d0 , D1 , D2 , DThree , DFour Are the deviations of the edge points from the size points in the five seek lines.
[0099]
The rotation angle and the position of the rotation center RC when the image processing object is a rectangle and seek lines are respectively set on two sides parallel to the X axis and the Y axis of the rectangular image 258 as shown in FIG. Calculations of the deviations Δx and Δy are shown in equations (27) to (29).
Rotation angle = (− d0 t0 + D1 t1 + D2 t2 -DThree tThree + DFour v0 -DFive v1 -D6 v2 + D7 vThree ) / (T0 2+ T1 2+ T2 2+ TThree 2+ V0 2+ V1 2+ V2 2+ VThree 2(27)
Δx = (dFour + DFive + D6 + D7 / 4 (28)
Δy = (d0 + D1 + D2 + DThree / 4 (29)
d0 ~ DThree Is the distance from the center of rotation RC is t0 ~ TThree Is the amount of deviation between the edge point and the size point on the seek line, dFour ~ D7 Is the distance from the center of rotation RC is v0 ~ VThree This is the amount of deviation between the edge point and the size point on the seek line.
[0100]
Instead of mathematically proving that the above equations are valid as the calculation formulas for the rotation angle and the positional deviations Δx and Δy, the numerical values are specifically substituted to show the validity.
Assume that the image processing object having the shape shown in FIG. 48 rotates by −0.1 (radian) around the rotation center RC, and the rotation center RC is shifted by 5 mm in the Y-axis direction and 0 mm in the X-axis direction. . In this case, t0 = 30 mm, t1 = 20mm, T2 = 50mm, V0 = 30mm, V1 = 30mmAs long as the rotation angle is small enough to be regarded as sin θ = θ, d0 = + 8mm, d1 = + 7mm, d2 = 0 mm, dThree = -3mm, dFour = + 3mm. Ta= T0 2+ T1 2+ T2 2+ V0 2+ V1 2Is 5600 (mm2 ) Is obtained.
Substituting these values into the equations (30), (31) and (32), the rotational angles and the positional deviations Δx and Δy of the rotational center RC are −0.1 radians, 5 mm and 0 mm, respectively, as follows: The validity of the formula is confirmed.
Rotation angle = {− (8 × 30} − (7 × 20) + (0 × 50) + (− 3 × 30) − (+ 3 × 30)} / 5600 = −0.1 (30)
Δx = (− 3 + 3) / 2 = 0 (31)
Δy = (8 + 7 + 0) / 3 = 5 (32)
[0101]
Although the rotation angle and the positional deviation of the rotation center RC are calculated as described above, when the image processing target is the electrical component 208, the mounting work of the electrical component 208 on the circuit substrate is performed. Since what is necessary in practice is the rotation angle and position shift of the designated center DC, it is necessary to calculate those of the designated center DC from the rotation angle and position deviation of the rotation center RC. However, since the rotation angle is the same for the rotation center RC and the designated center DC, there is no need for calculation, and only the positional deviation may be calculated.
There is no rotation angle error in the image processing object, and the positional deviation Δx is simply between the X-axis direction and the Y-axis direction.1 , Δy1 If both are only generated, the positional deviation of the rotation center RC and the positional deviation of the designated center DC are both Δx.1 , Δy1 It becomes. However, when a rotation angle error Δθ occurs in the image processing object, as shown in FIG. 49, each of v in the X-axis direction and the Y-axis direction from the rotation center RC.x, VyThe positional deviation of the designated center DC at a position separated by1 −Δθ × vy), (Δy1 + Δθ × vx)
[0102]
The calculated rotation angle Δθ and positional deviation (Δx1 −Δθ × vy), (Δy1 + Δθ × vx) Is the rotation angle and positional deviation of the designated center DC of the image processing object with respect to the measurement template coordinate plane, but the measurement template coordinate plane itself has a rotation angle θ and a positional deviation Δx with respect to the reference coordinate plane as shown in FIG.2 , Δy2 It is normal to have.
The reference coordinates are generally set as the optical axis of the CCD camera 78, that is, the coordinate plane having the origin at the center of the field of view, and the axis of the suction nozzle 206 coincides with the optical axis of the CCD camera 78 at the component posture detection position. Are positioned as follows. In this case, the rotation angle θ and the positional deviation Δx with respect to the reference coordinate plane of the measurement template coordinate plane2 , Δy2 Is the rotation angle and positional deviation of the measurement template coordinate plane with respect to the axis of the suction nozzle 206.
Therefore, the rotation angle and the positional deviation of the designated center DC of the electrical component as the image processing object with respect to the axis of the suction nozzle 206 are θ + Δθ and Δx, respectively.2 + (Δx1 −Δθ × vy) Cos θ, Δy2 + (Δy1 + Δθ × vx) Sin θ.
[0103]
If there is a failure, the coordinates of the center of rotation, the distance from the center of rotation to each seek line, the displacement between the center of rotation and the specified center, etc. are calculated as described above. If there is no failure, these values are calculated. Since the values are determined to be constant values for each combination of the image processing object and the template, these values are stored as default values in the memory card, and the above calculations are performed using these default values. Is called. If the dimension calculation is not specified, all seek lines are paired, and there is no failure, the size point calculation is omitted and the edge point and the ideal are replaced with the size point. The difference from the point may be calculated, and the position and rotation angle may be calculated based on the calculation result. In this case, even if there is an error in size, the influence of the dimensional error is canceled between the two seek lines constituting the pair seek line, and the calculation result of the position is not affected.
Furthermore, even when there is a failure, if the calculation of misregistration is not specified, the size point is unnecessary and the calculation may be omitted.
[0104]
Next, a case where the image processing object has a circular shape or a shape in which a part of the circular shape is cut out, such as a reference mark of a printed board, will be described. The reference mark is attached to the printed board, and the position error and the rotation angle error of the printed board are calculated based on the image of the reference mark. Therefore, it is not necessary to calculate the rotation angle of the reference mark.
In addition, the calculation of the positional deviation of the image processing object in which a circle or a part of the circle is cut out has many parts in common with the calculation of the positional deviation of the rectangular image processing object. is there. Hereinafter, this point will be described.
[0105]
First, the case where there is a failure in the seek line of the circular image 360 will be described with reference to FIGS. Here, as shown in FIG. 51, the 0-degree seek line indicated by the broken line is the fail seek line, and the circular image 360 is larger than the original size (the size indicated by the two-dot chain line in the figure). Shall.
For the circular image 360, the dimension calculation is first performed. In the dimension calculation, the size factor is calculated as in the case of the rectangular image 358. If eight seek lines are set radially at 45 degree intervals as shown in FIG. 51, the size factors sizeFX and sizeFY in the X-axis direction and Y-axis direction are respectively sizeXM = sizeYM = 0 and baseXM = After initial setting of baseYM = 0, the calculation is performed by the equations (33) to (35).
for (i = 0; i <n; i ++) {sizeXM + = (measurement span [i] / original span [i]) * | cos angle [i] |; baseXM + = | cos angle [i] |; sizeYM + = (measurement span [i] / original span [i]) * | sin angle [i] |; baseYM + = | sin angle [i] |}; (33)
sizeFX = (sizeXM) / baseXM; (34)
sizeFY = (sizeYM) / baseYM; (35)
However, the expression (33) is written in C language, and for (i = 0; i <n; i ++) calculates the operation in {} for the i-th seek line, i from 0 to n It means the total sum of the results obtained while changing 1 by 1. In addition, n is the number of pair seek lines, and is 4 in the example of FIG. 51. Therefore, in the calculation of equation (33), i is sequentially changed from 0 to 3, but this i is the fail seek line. When a value that specifies a pair seek line to be included is reached, the value can be changed to a value that specifies the next pair seek line without performing an operation. Therefore, in the example of FIG. 51, the calculation of Expression (33) is performed for three pairs of pair seek lines other than the pair seek line including the 0-degree seek line.
[0106]
In the case of a circle, since the seek lines are set radially, there are seek lines that are inclined with respect to the X-axis and the Y-axis, and these seek lines are components of an oversize ratio in both the X-axis direction and the Y-axis direction. Have Therefore, in equations (33) to (35), the X-axis direction component and the Y-axis direction component of the dimension excess rate on each seek line are obtained, and each contributes to the determination of the size factor according to the component ratio. It is supposed to be made.
SizeFX and sizeFY obtained by this calculation are dimensional excess ratios in the X-axis direction and the Y-axis direction, respectively. In order to deal with the case where dimensional errors occur at different ratios in the X-axis direction and the Y-axis direction, the size factor is calculated separately in both directions.
[0107]
Next, the size point is calculated. First, as shown in FIG. 53, pairDiff, which is the difference between the ideal point and the size point, is calculated by the expressions (36) to (43) (expressions (36) and (37) are described in C language), A size point is calculated from the obtained pairDiff and the ideal point, and a shift Diff between the size point and the edge point is calculated using the edge point.
ΔLx= PairRadius * cos θ * (sizeFX -1); ・ ・ (36)
ΔLy= PairRadius * sin θ * (sizeFY -1); ・ ・ (37)
ΔLx≧ 0 and ΔLyWhen ≧ 0
pairDiff = √ {(ΔLx)2 + (ΔLy)2 }; ・ ・ (38)
ΔLx<0 and ΔLy<0
pairDiff = -√ {(ΔLx)2 + (ΔLy)2 }; ・ ・ (39)
ΔLx<0 and ΔLy≧ 0 and | ΔLx| ≧ | ΔLyIn case of |
pairDiff = -√ {(ΔLx)2 − (ΔLy)2 }; ・ ・ (40)
ΔLx<0 and ΔLy≧ 0 and | ΔLx| <| ΔLyIn case of |
pairDiff = √ {-(ΔLx)2 + (ΔLy)2 }; ・ ・ (41)
ΔLx≧ 0 and ΔLy<0 and | ΔLx| ≧ | ΔLyIn case of |
pairDiff = √ {(ΔLx)2 − (ΔLy)2 }; ・ ・ (42)
ΔLx≧ 0 and ΔLy<0 and | ΔLx| <| ΔLyIn case of |
pairDiff = -√ {-(ΔLx)2 + (ΔLy)2 }; ・ ・ (43)
[0108]
As described above, the circular image 360 does not need to calculate the rotation angle, and only the position is calculated. In calculating the position, first, the position factor (posFactor) is calculated according to the equation (44).
posFactorM [i] = 1 / Σcos2(Angle R [i] −angle [n]) (44)
However, i is a value for specifying a seek line, and is 0 to 7. Also, the value of n is increased by 1 from 1 to 8, which is the number of seek lines. Σcos2The calculation of (angle R [i] −angle [n]) is the sum of the squares of the cosine of the difference between the angle R [i] of the i-th seek line and the angles R [n] of all unsuccessful seek lines. Is an operation for obtaining. Also in this calculation, when i becomes a value specifying the seek line of the failure, the calculation can be changed to a value specifying the next seek line without performing the calculation. Then, the calculation for the 0-degree seek line is not performed, and the position factor is calculated for each seek line of 45 to 315 degrees.
[0109]
Next, the position of the circular image 360 is calculated according to the expression (45) (described in C language) using the position factor.
for (x = 0, y = 0, i = 0; i <n; i ++) {x = x + cos (i) * posFactorM [i] * ss [i]; y = y + sin (i) * posFactorM [i ] * Ss [i];} (45)
ss [i] is the previously calculated shift amount Diff between the size point and the edge point for each seek line, and the seek line shift amount ss [i] is set for all the seek lines having no failure. A position factor posFactorM [i] is multiplied and a component parallel to the X and Y axes is calculated and added for each of the X and Y coordinates to obtain a center position (x, y). The coordinates of the center position indicate a positional deviation of the center of the circular image 360 in the X-axis direction and the Y-axis direction from the origin of the measurement template coordinate plane. As described above, if there is a failure in the seek line, the rotation center RC of the image processing object is deviated from the position where there is no failure (which should be called the position of the normal rotation center). The position factor is calculated using the position factor, and the position deviation is calculated using the position factor according to the equation (45), so that even when there is a failure in the seek line, the normality of the circular image 360 is the same as when there is no failure. The center misalignment corresponding to the center of rotation is calculated. Therefore, a value obtained by adding the positional deviation of the measurement template coordinate plane to the reference coordinate plane to the obtained positional deviation represents the positional deviation of the circular image 360 on the reference coordinate plane.
[0110]
When the image processing object is circular and there is no failure, the calculation is performed using the default value for the position factor and the like. This is the same as in the above-described case where the image processing object is a rectangular image 358.
In the above description in the case where the image processing object is the line segment of FIG. 38, the rectangle of FIG. 47, or the like, the term “position factor” is not used. The position factor is calculated using the equation (44), and 1/3 in the equation (8), 1/4 in the equations (28) and (29), and the like correspond to the position factor. This can be easily confirmed by substituting an actual value into the equation (44). Equation (44) can be used generally regardless of the shape. The reason why the equation (44) is not used in the description of FIG. 38, FIG. 47, etc. is to make it easy to understand intuitively, and for the same example as the result of intuitive calculation of these simple examples ( This is because the validity of the equation (44) is confirmed by comparing the calculation result using the equation (44). Of course, the values of 1/3, 1/4, and the like change if a failure occurs in the seek line.
In addition, for example, the calculation for the circular image object can be applied as it is to an octagon in which a corner of the rectangle is obliquely cut at 45 degrees, as well as an image processing object having generally inclined sides. Dimension and position calculations can be performed similarly.
[0111]
As described above, the case where the image processing object is a rectangle such as a square chip without a lead and the case where the image processing object is a circle such as a reference mark have been described. Some have a plurality of lead wires, such as a ward flat package type electrical component. When such an electrical component is an image processing object, image processing is performed by a pattern matching manager that is a combination of pattern matching processes. The pattern matching manager performs image processing by combining a pattern matching process a plurality of times.
[0112]
For example, in the case of an image 370 of a QFP (quad flat package electrical component) shown in FIG. 54, image processing is performed based on the lead image, not based on the outline of the entire QFP. This is because in QFP, if mounting is performed based on lead position data, the error between the lead and the pattern of the substrate can be minimized, and by combining pattern matching with each lead as an image processing target, QFP The dimensions, position, rotation angle, etc. are calculated.
[0113]
During image processing, first, one of the lead images 372 is searched. For this purpose, a search window 376 having a size suitable for including one lead image 372 is set, and the lead image 372 is generated using a search template including a plurality of preset point pairs. Searched.
[0114]
A full set of pattern matching of the search step, re-search step, measurement step and re-measurement step is performed to measure the position and rotation angle of the lead image 372. If the position and rotation angle of the lead image 372 are known, then the lead image 372 on all sides is searched by subset pattern matching including a search step and a re-search step. Subsequently, the position and rotation angle of the adjacent lead image 372 are measured, but the lead pitch is known in advance, and the position and rotation angle of the search template coordinate plane in the search step for the next lead image 372 are: Precisely based on the position and rotation angle of the lead image 372 obtained by the re-search step immediately before that and the pitch between the leads, it is sufficiently accurate without performing a full set of pattern matching. The next lead image 372 can be searched well.
[0115]
When pattern matching is performed on the lead images 372 on all one side and the positions of all the lead images 372 are calculated, the X coordinate value and the Y coordinate value of the center of these lead images 372 are added. Divide by the number of leads to calculate the center coordinates of one side. Similarly, a three-side lead image 372 is searched by subset pattern matching. The positional relationship between the sides is known in advance, and the position and rotation angle of the search template are set based on the position and rotation angle of the re-search template coordinate plane of pattern matching performed previously. When the center coordinates are calculated for all four sides, the intersection of the two straight lines a and b connecting the centers of the two sides parallel to each other is calculated and set as the center coordinates of the electrical component. The rotation angle of the QFP image 370 is obtained by the equation (46).
(Slope of straight line a-90 degrees + slope of straight line b) / 2 (46)
[0116]
As described above, according to the pattern matching or the pattern matching manager, it is possible to perform image recognition of the inspection object of almost any shape and the electric component to be mounted on the circuit substrate. Although it is necessary to create a master search template and a master measurement template, image processing programs using these templates can be shared. Compared to creating an image processing program for each type of inspection object or electrical component, the program It takes less time to create.
[0117]
Note that the image processing time becomes longer as the offset amount of the center of the image processing object from the center of the search window is larger. Therefore, it is desirable to correct the position of the center of the search window based on the position of the search template coordinate plane where the image processing object is searched. For example, in the case of the QFP image 370, after image processing for a plurality of QFPs, an average deviation from the center of the search window 376 at the center of the lead image 372 is obtained, and the average deviation is set to zero. The center position of the search window is corrected.
[0118]
In the present embodiment, pattern matching or a pattern matching manager and an object vector calculation are performed on images of a plurality of electric components 208 that are sequentially captured, and electric component identification, position error, and rotation angle error calculation are performed. Done. As shown in the time chart of FIG. 55, during the mounting cycle time Tr of the electrical component 208, imaging by the CCD camera 78 is performed while the electrical component 208 is stopped at the imaging position. After the imaging, the image data is transferred from the CCD camera 78 to the frame grabber memory 264 and subjected to image processing. However, the transfer of the image data and the image processing are performed in parallel.
[0119]
The frame grabber memory 264 can store the image data of the four electrical components 208 in parallel. Therefore, the image processing can be performed for the electrical components 208 whose processing time is longer than the mounting cycle time. it can. The image processing only needs to be completed before the image processing result is used, as long as a plurality of other electrical components 208 are mounted between the imaging of one electrical component 208 and the use of the image processing result. It is not indispensable to end image processing during one mounting cycle time Tr, and it is only necessary to perform image processing of the same number of image processing objects as the number of cycles during a plurality of mounting cycle times. In the present embodiment, the other three electrical components 208 are mounted between the imaging and mounting of one electrical component 208, and image processing time is interchanged among a total of four electrical components 208. It is possible to fit.
[0120]
For example, some electrical components have a simple shape such as a square chip and do not have leads, and the required image processing time is short, while others have a large number of leads such as QFP, and the required image processing time is long. There are also electrical components, and the time remaining for electrical components with a short required image processing time can be used for processing electrical components with a long required image processing time.
If the image processing of all electrical components must be completed within one mounting cycle time, the mounting cycle time matches the one that takes the longest of the multiple types of electrical components that are scheduled for image processing. It is necessary to be determined, and the mounting efficiency is kept low. On the other hand, in the electrical component mounting apparatus, four image data are stored in the frame grabber memory 264 in parallel, and the image data is processed during the four mounting cycle times. The total of the image processing times of the components may be within a mounting cycle time several times that of the electrical component on which the image processing is performed. In other words, the average of the image processing times of the plurality of electrical components only needs to be within one mounting cycle time, and the mounting cycle time can be shortened.
[0121]
An example is shown in FIG. As is apparent from the figure, the image processing time T required for each electric component is as follows.e1~ Te7There is a difference in length, but the total image processing time for each four Tt1~ Tt4Are shorter than four times the mounting cycle time Tr, and the mounting cycle time Tr can be shortened accordingly.
[0122]
The same effect can be obtained when a plurality of types of inspection objects 180 to be inspected sequentially flow. When the time required for the inspection of the inspection objects 180 sequentially inspected is different from each other, the same number of cycles as the number of the frame grabber memories 264 is close to the average value of the time required for each inspection object 180 to be sequentially inspected. Inspections can be performed in time.
[0123]
Furthermore, even if the inspection object 180 to be sequentially inspected is one type and the time required for the inspection is the same, if the imaging time intervals of the inspection object 180 are different, the plurality of frame grabber memories 264 are stored. An effect is obtained. This is because the image processing time can be interchanged between a plurality of consecutive inspection objects 180.
[0124]
Finally, details of the inspection step will be described. For example, when it is necessary to inspect whether or not a cutout 411 that is a type of defect exists on three adjacent sides of a part having the shape shown in FIG. 58, an image of the part in question (hereinafter simply referred to as a part). ) Negative seek lines 412, 413, and 414 parallel to the respective sides are set at positions inside the short distance of three sides of 410. A master inspection template that is preset based on the reference position and reference rotation angle component 410 and stored in the DRAM 256 is read out, and the master inspection template is the actual position of the component 410 measured prior to the inspection, The actual inspection template 415 including the negative seek lines 412, 413, 414 is set by performing coordinate conversion according to the rotation angle. The data of the set inspection template 415 is also stored in the DRAM 256, and the DRAM 256 functions as an inspection template data storage unit.
[0125]
In the example of FIG. 58, a silhouette image of the part 410 is acquired, and the notch 411 is formed as a bright image. The negative seek lines 412, 413, and 414 are set inside the dark image of the part 410 and originally do not intersect with the edge, but if the notch 411 exists, the boundary between the part 410 and the notch 411 becomes an edge. . Accordingly, the result of the determination of “does not cross the edge” performed on the negative seek lines 412 and 413 is YES, but the result of the determination performed on the negative seek line 414 is NO. If the determination result is NO even for one of all the negative seek lines belonging to the inspection template 415, it is displayed on the monitor television 14 that the part 410 is rejected as having a notch 411 defect.
[0126]
By changing the distances of the negative seek lines 412, 413, and 414 from the sides of the part 410, the size of the detectable notch can be changed. Even if a notch exists, if the part is a small product if it is small, the negative seek lines 412, 413, and 414 may be set at positions that do not cross the small notch. Also, if multiple negative seek lines with different distances from each side are set for each side, the negative seek line with a larger distance from the side detects only a larger notch. You can also check how many notches exist in each.
[0127]
When it is necessary to inspect whether or not the part 410 has a flash 416, which is a type of defect, as shown in FIG. 59, the part 410 extends in parallel to each side at a position outside a small distance of three sides. An inspection template 422 including three negative seek lines 417, 418, 420 is set. The actual inspection template 422 is set by the coordinate conversion of the master inspection template stored in the DRAM 256. In the case shown in the figure, the result of the determination of “does not intersect with the edge” regarding the negative seek line 420 is NO, so that the part 410 has a defect of the flash 416, and therefore, a failure is determined. The determination result is displayed on the monitor television 14.
[0128]
When it is necessary to inspect whether or not the image of the part 410 has the scratch 426 shown in FIG. 60, an inspection including a number of negative seek lines 428 to 438 and the like inside the outline of the part 410. A template 439 is set. At this time, if holes 440, 442, etc. exist inside the contour line of the part 410, the negative seek line is set avoiding the holes 440, 442, etc., as indicated by reference numerals 436, 438. This is because if the negative seek line intersects with the edges of the holes 440, 442, etc., the determination result “whether it does not intersect with the edge” is NO and an erroneous inspection result is output. In the example shown in the figure, if the image of the scratch 426 is darker than the image of the surface of the part 410, the negative seek lines 432 and 434 that should not intersect the edge originally intersect with the edge. Based on this, it is determined that the part 410 has a flaw 426 and is rejected.
[0129]
An inspection template including both the negative seek lines 412, 413, and 414 in FIG. 58 and the negative seek lines 417, 418, and 420 in FIG. 59 can be set. In this case, the notch 411 is set. Both defects with the flash 416 can be inspected at once. Furthermore, if the negative seek lines 428 to 438 in FIG. 60 are also set, the inspection of the notch 411, the flash 416, and the scratch 426 can be performed at once.
[0130]
According to the present optical inspection apparatus, not only the entire part but also a part of the part can be inspected. An example is shown in FIG. The illustrated component is a solar cell 450, and the object to be inspected is its grid pattern 452. The grid pattern 452 includes a large number of grids 454, 456, 458 and the like that extend in parallel to each other. If a discontinuous portion 460 is present in these grids, the grid pattern 452 cannot be used, and thus inspection is required. In addition, if dirt 462 exists between the grids, there is a possibility of a malfunction, so that inspection is also necessary. Therefore, negative seek lines 466, 468, 470, etc. for detecting discontinuous portions are set inside the outline of each grid 454, etc., and negative seek lines 472, 474, etc. for detecting dirt are set between the grids. . These seek lines 466 and the like are all formed in a state extending in parallel with the longitudinal direction of the grid 454 and the like, and constitute an inspection template 478.
[0131]
If there is a negative seek line of the inspection template 478 that passes through the discontinuous portion 460 like the negative seek line 468, the negative seek line 468 intersects the edge, and the grid pattern of the solar cell 450 In 452, it is determined that there is a discontinuous portion 460, which is a type of defect, and a failure is determined. Further, if there is something that passes through the dirt 462, such as the negative seek line 474, the negative seek line 474 intersects the edge, and the solar cell 450 is assumed to have dirt that is a type of defect. Judgment of failure is made. For this reason, the negative seek line 466 for detecting discontinuous portions and the negative seek line 472 for detecting dirt are distinguished in the inspection template.
[0132]
In the inspection template described above, if even one of the negative seek lines intersects the edge, the inspection object is rejected, but there is no influence on the performance of the inspection object such as small scratches or dirt. If only exists, it can be determined to be acceptable. For example, it is possible to know the size of the defect based on the determination result regarding the number of negative seek lines continuously, and when the size of the defect is equal to or larger than the set size, it is not possible. The determination of acceptance is made, or the judgment of failure is made when the number of negative seek lines whose determination result is NO is greater than or equal to the set number. It is desirable to display not only the pass / fail judgment result but also the type, size, number, etc. of defects on the monitor television 14.
[0133]
In the above description, the positive seek line is used for measuring and inspecting the position, rotation angle, dimensions, etc., and the negative seek line is used for defect inspection, but these can also be used for other purposes. An example is shown in FIG. This example is an example in which a positive seek line is used for defect inspection. In order to inspect whether or not the discontinuous portion 460 is present in the grid 454 of the solar cell 450, a number of positive seek lines 480 intersecting with the longitudinal direction of the grid 454 etc. (orthogonal in the illustrated example) are set. Yes. A large number of positive seek lines 480 are set at a pitch smaller than the size of the discontinuous portion 460, and together constitute an inspection template 482. Although the positive seek line 480 normally intersects with the edge but does not intersect with the edge at the discontinuous portion 460, the determination result of “whether to intersect with the edge” is NO, and the solar cell 450 is rejected. Determined.
[0134]
FIG. 63 shows an example of the case where the negative seek line is used for searching for an object. In this example, when a large number of square-shaped bright pads 492 are formed on the dark surface of the component 490, the upper right corner pad 492 is searched. For this purpose, an inspection template 498 including a large number of positive seek lines 494 intersecting with the contour line of the pad 492 and a plurality of (four in the illustrated example) negative seek lines 496 is set. Then, all positive seek lines 494 are judged to “cross the edge”, and all negative seek lines 496 are judged to “do not cross the edge”, so that all judgment results are YES. For example, the pad 492 at the position where the positive seek line 494 is set is determined to be the upper right corner pad. For example, if the same test template 498 is set for the pad 492 located on the left side of the pad 492 in the upper right corner, the negative seek line 496 extending in the vertical direction intersects with the pad 492 in the upper right corner, and the lower side If the same inspection template 498 is set for the pad 492 positioned at, the negative seek line 496 extending in the horizontal direction intersects the pad 492 at the upper right corner. Therefore, in all cases, there is a negative seek line 496 in which the determination result of “does not intersect with the edge” is NO, and the pad 492 on which the inspection template 498 is actually set is not the pad in the upper right corner. Obviously, the above condition is satisfied only in the illustrated case.
[0135]
In the above example, all seek lines are set as finite straight lines, that is, line segments at both ends, but this is not essential. For example, as shown in FIG. 64, when the image processing object 504 is circular, it is convenient to set circles concentric with the image processing object 504 as the negative seek lines 506 and 508. There is. The negative seek line 506 is for notch detection, and the negative seek line 508 is for flash detection. Also, a large number of concentric circles may be set inside the contour line of the image processing object 504, and these may be used as inspection seek lines (negative seek lines) for inspecting the presence or absence of internal region defects such as scratches and dirt. Is possible.
[0136]
In the example shown in FIG. 65, since the image processing object 512 has a fan shape, an inspection template 522 including circular negative seek lines 514 and 516 and line segment negative seek lines 518 and 520 is set. This inspection template 522 is used for detecting notches, and in addition, it is possible to set flash detection, internal region defect detection, and the like in the same manner.
[0137]
As described above, after the presence / absence of a defect is detected, it is determined whether the image processing object is a pass product or a reject product based on the detection result. The simplest judgment is that if even one defect exists, it will be rejected, but it will be rejected if there are defects exceeding the predetermined standard, such as size and number of defects. It is also possible to do so. This defect inspection standard is also created in advance for each image processing object and stored in a memory card, and is read into the DRAM 256 of the image processing apparatus 12 and used.
[0138]
As described above, in the image processing device 12, image data such as the inspection object 180, the electrical component 208, and the reference mark captured by the CCD camera 78 is processed by the pattern matching or pattern matching manager. However, the pattern matching and pattern matching manager searches the image processing object using the search template, the re-search template, the measurement template, the re-measurement template, and the inspection template, and calculates the edge point. Only set parts are searched, measured and inspected. Only the portion that requires image processing is processed, and the portion that does not need image processing is not processed even if image data is obtained. Therefore, image processing can be performed in a short time, and image processing can be performed without being affected by most image noise (white spots, black spots, stains, etc.) unless the image processing object is directly touched. Can do.
[0139]
Further, in the search step, it is determined whether or not it is in conformity according to the difference in optical characteristic values such as the luminance difference between the two point pair constituent points, and the re-search step, measurement step, re-measurement step, and inspection step The edge point is determined by the change gradient of the optical characteristic value such as luminance on the seek line. For this reason, even if the image processing object is relatively large like QFP and uneven illumination tends to occur, the optical characteristic values are compared between portions where there is almost no difference in illumination. The image processing can be performed accurately without being affected by the above.
[0140]
In addition, even if the size of the solid-state image sensor of the CCD camera changes, it can be easily handled without substantially changing the program. Further, since the defect inspection is performed by the same method as the measurement and inspection of the position, rotation angle, dimension, etc. of the image processing object, the defect inspection can be performed in a short time accompanying the inspection of the dimension, etc. .
[0141]
The case where the origin of the master measurement template coordinate plane is placed at the designated center DC of the image processing object has been described above, but the origin of the master measurement template coordinate plane may be placed at a position other than the designated center DC. In this case, the positional deviation (or rotation angle) between the designated center DC and the master measurement template coordinate plane is added to the positional deviation (or rotational angle) between the rotational center RC and the designated center DC, and the value is further added. By adding a positional deviation (or rotation angle) of the master measurement template coordinate plane with respect to the reference coordinate plane, a positional deviation (or rotation angle) on the reference coordinates of the designated center DC is obtained.
[0142]
In the present embodiment, the image processing apparatus 12 uses the fact that the shape and dimensions of the object to be inspected are substantially determined, and uses the search template, the re-search template 328, the measurement template 336, the re-measurement template, the inspection template 415, and the like. Since the dimensional inspection and defect inspection are performed by the special processing used, the processing can be completed in a very short time. Further, the inspection object (which is also the object to be measured) is a transparent flat plate, and the search template 300 is automatically set according to the position and rotation angle of the object to be inspected. Is simply placed on the inspection object support plate 72. Even if the position and the rotation angle of the measurement object 180 are not accurately determined, the image processing device 12 can acquire dimensions and detect defects, and can easily set the inspection object on the imaging device 10. In addition, since it is possible to issue a process start command to the image processing apparatus 12 with a foot switch, both hands can be used for other purposes, and there is an advantage in convenience. Further, since it is not necessary to fix the object to be measured and dimension measurement is possible without contact, dimension measurement and dimension inspection of a product made of rubber, soft synthetic resin, etc. can be easily performed. Therefore, for example, it is possible to inspect all the dimensions of a large number of products manufactured by injection molding or press molding. Further, not only dimensional inspection of predetermined parts such as through-hole inner diameter, pitch between holes, pitch between protrusions, cylindrical outer diameter, distance between flanges, shaft length, etc., but also inspection such as machining leakage and chipping can be performed.
[0143]
As is clear from the above description, in this embodiment, the parallel light generator 52 constitutes a parallel light generator. The frame grabber memory 264 of the image processing apparatus 12 constitutes image data storage means, and the DRAM 156 constitutes search template data storage means, measurement template data storage means, and inspection template data storage means. A part of the image processing apparatus 12 that executes the search step alone of the pattern matching program or both the search step and the re-search step constitutes the search object determination means. The part of the image processing device 12 that executes the search step, re-search step, measurement step, and re-measurement step of the pattern matching program constitutes the position measurement means, among which the re-search step, measurement step, and re-measurement step The part for calculating the coordinates of the edge point in the above constitutes the edge point coordinate calculating means. Of the pattern matching program of the image processing apparatus 12, a portion that designates a point at which the luminance is to be calculated in the search step, the re-search step, the measurement step, and the re-search step constitutes a point designation means, and the luminance value of the designated point The part that performs the calculation constitutes virtual point data calculation means.
[0144]
Further, the portion of the image processing apparatus 12 that determines the pass / fail by comparing the measured dimension of the image processing object with the reference dimension constitutes a dimension inspection means. The part of the image processing apparatus 12 for setting an inspection template including a negative seek line and the part for setting a search template including a negative seek line constitute negative seek line setting means, and an inspection template and a search template including a positive seek line. It can be considered that the portion for setting the above constitutes the positive seek line setting means, and the negative seek line setting means or the positive seek line setting means alone or jointly constitutes the seek line setting means. In addition, the part of the image processing apparatus 12 that determines whether or not the negative seek line intersects the edge constitutes a determination unit, and the part that determines the pass / fail of the image processing object based on the determination result is the above-described determination unit. And pass / fail judgment means. The seek line setting means and the determination means constitute defect determination means.
[0145]
In the above embodiment, the re-search step is performed once, but may be performed twice or more. In the first re-search step, the number of failures is less than the set number, and after the edge point of the image processing object is obtained, a re-search template is set and the re-search step is performed. On the basis of the re-search template used in the re-search step and the calculation result of the edge point, the position and angle at which the deviation from the image processing object is reduced are set. Experience has shown that the probability of a failure occurring at the next measurement step is lower when the re-search step is performed multiple times than when it is performed only once. The reason for this is not clear, but in the search step, if there is a large gap between the image processing object and the search template, and it is barely determined that the search target part exists, the difference between the re-search template and the image processing object is In this case, the difference between the measurement template and the image processing object may increase in the next measurement step, and a failure may occur, while the re-search step is performed twice or more. If this is the case, it is speculated that the probability may decrease.
[0146]
In addition, if the shape, approximate position, and rotation angle of the image processing object are known in advance, the seek line can be set to a position where the edge point can be calculated without searching using the search template. An edge point can be obtained using a measurement template.
In the above embodiment, after performing the re-search step using the re-search template, the measurement step is performed. However, when the dimensional error or the shape defect of the image processing object is small, the search step It is also possible to execute the measurement step immediately after. In this case, it is possible to use the re-search template as a measurement template, but it is desirable to use a template having a larger number of seek lines.
[0147]
Further, in the above embodiment, the determination of abnormality in pattern matching is performed based on whether or not there is a failure exceeding the allowable number of failures set in the program. For example, if there is even one failure, it is determined as abnormal. In addition, an operator can create a program that calculates an object vector only for an image processing target that has no failure, and a program that allows at least one failure and performs an object vector calculation even when there is a failure. You may do it. Since a program that does not allow failure requires less time for image processing, depending on the situation, this program may be selected to increase the inspection efficiency of the inspection object 180 or to reduce the time required to mount one electrical component 208. It can be shortened.
[0148]
In the above embodiment, in order to search for an edge in the image, that is, a portion where the optical characteristics change suddenly, first, a portion where the optical characteristic values of the two points constituting each point pair of the search template differ by a set value or more is searched. Next, the portion where the differential value of the optical characteristic value on the measurement template seek line (measurement seek line) is the largest is searched for as an edge point. It is also possible to search for a portion where the differential value of the target characteristic is equal to or greater than the set value and to determine that the portion is an edge. In that case, when points having a differential value equal to or larger than the set value appear continuously on one seek line, the largest one of them may be set as the edge point.
[0149]
In addition, the present invention can be implemented in various modifications and improvements based on the knowledge of those skilled in the art without departing from the scope of the claims.
[Brief description of the drawings]
FIG. 1 is an embodiment of the present invention.Optical inspection device including imaging deviceIt is a front view (state which removed the cover member).
FIG. 2 is a plan view of the imaging apparatus (with a cover member and a beam splitter removed).
FIG. 3 is a right side view of the imaging apparatus.
FIG. 4 is a side view (partial cross section) showing the periphery of a beam splitter in the imaging apparatus.
FIG. 5 is a front sectional view of the interchangeable lens of the imaging apparatus.
FIG. 6 is a front sectional view of another interchangeable lens of the imaging apparatus.
FIG. 7 is a front sectional view of still another interchangeable lens of the imaging apparatus.
FIG. 8 is a diagram conceptually illustrating the imaging apparatus.
FIG. 9 is a conceptual diagram of an imaging apparatus which is another embodiment of the present invention.
FIG. 10 is a conceptual diagram of an imaging apparatus which is still another embodiment of the present invention.
FIG. 11 is a conceptual diagram of an imaging apparatus which is still another embodiment of the present invention.
FIG.in frontIt is a front view which shows components other than the imaging device of an optical type | mold inspection apparatus.
FIG. 13 is a block diagram of an image processing apparatus of the optical inspection apparatus.
FIG. 14 is a diagram illustrating a preprocessing program stored in a DRAM of the image processing apparatus.
FIG. 15 is a diagram showing an execution processing program stored in a DRAM of the image processing apparatus.
FIG. 16 is a diagram showing a pattern matching program stored in a DRAM of the image processing apparatus.
FIG. 17 is a diagram showing setting data for executing the pattern matching program on a square image.
18 is a diagram showing a master search template set based on setting data shown in FIG. 17 together with an image processing object.
FIG. 19 is a diagram showing a master measurement template set based on the setting data shown in FIG. 17 together with an image processing object.
FIG. 20 is a diagram for explaining search template generation based on the master search template.
FIG. 21 is a diagram showing setting data for executing the pattern matching program for a disc with a part cut away;
FIG. 22 is a diagram showing a master search template set based on the setting data shown in FIG. 21 together with a disc.
23 is a diagram showing a master measurement template set based on the setting data shown in FIG. 21 together with a disc.
FIG. 24 is a diagram illustrating a state in which a search template is superimposed on a virtual screen in the search step of the pattern matching program.
FIG. 25 is a diagram illustrating linear interpolation for calculating the luminance of a specified point on a virtual screen.
FIG. 26 is a diagram conceptually illustrating a physical screen / virtual screen conversion driver that calculates image data on a virtual screen from image data on a physical screen in the image processing apparatus.
FIG. 27 is a diagram illustrating a state where a re-search template in a re-search step of the pattern matching program is overlaid on a virtual screen.
FIG. 28 is a diagram illustrating a relationship between division points set on a seek line of the re-search template and a solid-state image sensor that forms an imaging surface.
29 is a chart showing the luminance calculated for the dividing points shown in FIG. 28. FIG.
FIG. 30 is a diagram illustrating a difference filter for differentiating the luminance calculated with respect to the division point.
FIG. 31 is a diagram showing another difference filter for differentiating the luminance calculated for the dividing point.
32 is a diagram showing the calculation results shown in FIG. 29 in a graph.
33 is a graph showing the results of differentiation performed using the differential filter shown in FIG. 30. FIG.
34 is a graph showing the results of differentiation performed using the differential filter shown in FIG. 31. FIG.
FIG. 35 is a diagram showing a state in which a measurement template is superimposed on a virtual screen in the measurement step of the pattern matching program.
FIG. 36 is a diagram for explaining the size calculation of an image processing object performed after execution of pattern matching, taking a rectangular image as an example.
FIG. 37 is a diagram for explaining calculation of a difference between a size point and an edge point in the dimension calculation.
FIG. 38 is a diagram for explaining the calculation of the rotation center and the rotation angle of the image processing object, taking a straight line as an example.
FIG. 39 is a diagram for explaining the calculation of the deviation of the rotation center of the image processing target object from the designated center when there is a failure in the seek line.
FIG. 40 is a diagram for explaining another example of the calculation of the deviation of the rotation center of the image processing target object from the designated center when there is a failure in the seek line.
[Fig. 41] Fig. 41 is a diagram for explaining still another example of the calculation of the deviation of the rotation center of the image processing target object from the designated center when there is a failure in the seek line.
FIG. 42 is a diagram for explaining the calculation of the rotation center of the image processing object and the shift of the rotation center with respect to the designated center when the seek line is set in two directions orthogonal to each other.
[Fig. 43] Fig. 43 is a diagram for explaining another example of the calculation of the deviation of the rotation center of the image processing object and the designated center of the rotation center when the seek line is set in two directions orthogonal to each other.
FIG. 44 is a chart showing angle factors used for calculating an angle of an image processing object.
FIG. 45 is a diagram showing the angle factor on a coordinate plane.
FIG. 46 is a diagram for explaining the calculation of the rotation center and rotation angle of the image processing object.
FIG. 47 is a diagram illustrating another example of calculation of the rotation center and rotation angle of an image processing object.
FIG. 48 is a diagram illustrating still another example of the calculation of the rotation center and rotation angle of the image processing object.
FIG. 49 is a diagram for explaining calculation of the position of the designated center when there is a deviation between the designated center and the rotation center of the image processing object and the image processing object has a position and angle deviation.
FIG. 50 is a diagram for explaining the calculation of the positional deviation amount and the angular deviation amount with respect to the reference coordinates of the image processing object.
FIG. 51 is a diagram illustrating a state in which a seek line is set in a circular image that is a kind of image processing object.
FIG. 52 is a diagram for explaining the dimension calculation of the circular image.
FIG. 53 is a diagram for explaining the calculation of the size point and the difference from the edge point in the dimension calculation.
FIG. 54 is a diagram illustrating pattern matching performed for QFP.
FIG. 55 is a time chart showing the relationship between the mounting cycle time, the exposure time of the CCD camera, and the image transfer time in the electrical component mounting apparatus.
FIG. 56 is a time chart illustrating an image processing cycle in the electrical component mounting apparatus.
57 is a view showing a master inspection template set based on the setting data shown in FIG. 17 together with an image processing object.
FIG. 58 is a diagram showing an example of notch inspection using an inspection template.
FIG. 59 is a diagram showing an example of a flash inspection using an inspection template.
FIG. 60 is a diagram showing an example of a wound inspection using an inspection template.
FIG. 61 is a diagram illustrating an example of discontinuity and dirt inspection using an inspection template.
FIG. 62 is a diagram illustrating an example of discontinuous portion inspection using another inspection template;
FIG. 63 is a diagram illustrating an example of a search using a search template including a negative seek line and a positive seek line.
FIG. 64 is a diagram showing another inspection template.
FIG. 65 is a diagram showing still another inspection template.
Fig. 66 is a diagram conceptually illustrating imaging by a conventional imaging device.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10: Imaging device 12: Image processing device 14: Monitor television 16: Input device 18: Keyboard 20: Mouse 22: Foot switch 30: Apparatus main body 50: Imaging part 52: Parallel light generation part 58: Imaging target object support apparatus 70: Concave mirror 72: Beam splitter 74: Orifice 76: Lens system 78: CCD camera 80: Pinhole 82: CCD
108: Inclination angle adjustment device 110: Position adjustment device 146: Light source device
148: Concave mirror 150: Beam splitter 152: Orifice 154: Lens system 180: Object to be imaged 192: Uniform illumination device 200, 204: Imaging device 212: Fluorescent screen 256: DRAM 264: Frame grabber memory 300, 308: Master search template 302, 310, 324: Point pair 328: Re-search template 330, 346: Seek line 336: Measurement template 338, 342: Seek line 340, 344: Master measurement template 350, 352, 354: Negative seek line 411: Notch 412, 413 414: Negative seek line 415, 422, 439, 478, 482: Inspection template 480: Positive seek line

Claims (6)

凹面鏡と、
その凹面鏡の光軸上にその光軸に対して傾斜して配設されたビームスプリッタと、
前記凹面鏡側から見てビームスプリッタの透過方向と反射方向とのいずれか一方に配設され、撮像対象物をほぼ前記凹面鏡の焦点の位置に支持する撮像対象物支持装置と、
前記透過方向と反射方向との他方における前記凹面鏡の焦点に対して前記ビームスプリッタとは反対側に設けられ、その焦点を通過して放射状に広がる光を実質的な平行光に変換するレンズ系と、
そのレンズ系により変換された平行光によって形成される画像を撮像する撮像素子と、
その撮像素子に入射する光を、前記凹面鏡にその凹面鏡の光軸に実質的に平行に入射する光に制限する制限手段と
を含むことを特徴とする撮像装置。
A concave mirror,
A beam splitter disposed on the optical axis of the concave mirror and inclined with respect to the optical axis;
An imaging object support device that is disposed in either the transmission direction or the reflection direction of the beam splitter as viewed from the concave mirror side, and that supports the imaging object at a substantially focal position of the concave mirror;
A lens system that is provided on the opposite side of the beam splitter with respect to the focal point of the concave mirror in the other of the transmission direction and the reflection direction, and that converts light radially passing through the focal point into substantially parallel light; ,
An image sensor that captures an image formed by the parallel light converted by the lens system;
An imaging apparatus comprising: limiting means for limiting light incident on the imaging element to light incident on the concave mirror substantially parallel to the optical axis of the concave mirror.
前記制限手段が、前記凹面鏡の焦点の位置に位置するピンホールを有するオリフィスを含むことを特徴とする請求項1に記載の撮像装置。  The imaging apparatus according to claim 1, wherein the limiting unit includes an orifice having a pinhole located at a focal position of the concave mirror. さらに、前記撮像対象物支持装置に対して前記ビームスプリッタとは反対側に設けられ、前記撮像対象物の明るくかつ実質的に均一な背景を形成する明背景形成装置を含むことを特徴とする請求項1または2に記載の撮像装置。  And a light background forming device that is provided on the opposite side of the beam splitter with respect to the imaging object support device and forms a bright and substantially uniform background of the imaging object. Item 3. The imaging device according to Item 1 or 2. さらに、前記撮像対象物支持装置を間にして前記ビームスプリッタとは反対側に設けられ、撮像対象物支持装置を透過し、撮像対象物の周辺を通過してビームスプリッタに入光する平行光を投光する平行光発生装置を含むことを特徴とする請求項1に記載の撮像装置。Furthermore, parallel light that is provided on the opposite side of the beam splitter with the imaging object support device interposed therebetween, passes through the imaging object support device, passes through the periphery of the imaging object, and enters the beam splitter. the imaging apparatus according to claim 1, wherein the early days including a collimated light generating device for emitting light. 前記平行光発生装置が、
前記撮像対象物支持装置を間にして第1ビームスプリッタとしての前記ビームスプリッタとは反対側に設けられた第2ビームスプリッタと、
前記撮像対象物支持装置から見て前記第2ビームスプリッタの反射方向に、第1凹面鏡としての前記凹面鏡とは別に設けられた第2凹面鏡と、
その第2凹面鏡から見て前記第2ビームスプリッタの透過方向における第2凹面鏡の焦点位置に設けられ、第2ビームスプリッタに向かって放射状に広がる照明光を放射する点光源と
を含むことを特徴とする請求項4に記載の撮像装置。
The parallel light generator is
A second beam splitter provided on the opposite side of the beam splitter as the first beam splitter with the imaging object support device in between,
A second concave mirror provided separately from the concave mirror as the first concave mirror in the reflection direction of the second beam splitter as viewed from the imaging object support device;
A point light source that is provided at a focal position of the second concave mirror in the transmission direction of the second beam splitter as viewed from the second concave mirror and emits illumination light that radiates toward the second beam splitter. The imaging device according to claim 4.
前記点光源が、
前記第2凹面鏡の焦点位置に設けられたピンホールを備えた、第1オリフィスとしての前記オリフィスとは別の第2オリフィスと、
その第2オリフィスに対して前記第2ビームスプリッタとは反対側に設けられ、オリフィスに向かってほぼ平行な照明光を投光する平行光源と、
その平行光源からの光を前記第2オリフィスのピンホールを経て前記第2ビームスプリッタに向かって放射状に広がる照明光に変換する、前記第1レンズ系とは別の第2レンズ系と
を含むことを特徴とする請求項5に記載の撮像装置。
The point light source is
A second orifice different from the orifice as the first orifice, comprising a pinhole provided at the focal position of the second concave mirror;
A parallel light source that is provided on the opposite side of the second orifice from the second beam splitter and that projects substantially parallel illumination light toward the orifice;
A second lens system different from the first lens system, which converts the light from the parallel light source into illumination light that spreads radially toward the second beam splitter through the pinhole of the second orifice. The imaging apparatus according to claim 5.
JP18756998A 1998-07-02 1998-07-02 Imaging device Expired - Lifetime JP4185186B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18756998A JP4185186B2 (en) 1998-07-02 1998-07-02 Imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18756998A JP4185186B2 (en) 1998-07-02 1998-07-02 Imaging device

Publications (2)

Publication Number Publication Date
JP2000018919A JP2000018919A (en) 2000-01-21
JP4185186B2 true JP4185186B2 (en) 2008-11-26

Family

ID=16208400

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18756998A Expired - Lifetime JP4185186B2 (en) 1998-07-02 1998-07-02 Imaging device

Country Status (1)

Country Link
JP (1) JP4185186B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4839560B2 (en) * 2001-09-27 2011-12-21 日本電気株式会社 IC appearance inspection method
SE0401802D0 (en) * 2004-07-08 2004-07-08 Anoto Ab Mounting of imaging arrangements in optical systems
JP5085953B2 (en) * 2006-02-24 2012-11-28 株式会社日立ハイテクノロジーズ Surface inspection device
US8577119B2 (en) 2006-02-24 2013-11-05 Hitachi High-Technologies Corporation Wafer surface observing method and apparatus
JP5891773B2 (en) * 2011-01-06 2016-03-23 岩崎電気株式会社 Irradiation device
JP6241061B2 (en) * 2013-04-24 2017-12-06 株式会社ブイ・テクノロジー Shape measuring device
CN113793293B (en) * 2020-05-25 2024-01-26 中移(苏州)软件技术有限公司 Contour detection method, apparatus, system and computer readable storage medium

Also Published As

Publication number Publication date
JP2000018919A (en) 2000-01-21

Similar Documents

Publication Publication Date Title
US8976250B2 (en) Lens inspection system
US8243285B2 (en) Inspection system and method
US7221443B2 (en) Appearance inspection apparatus and method of image capturing using the same
JPH11351827A (en) Image processor
US7034272B1 (en) Method and apparatus for evaluating integrated circuit packages having three dimensional features
JP5559840B2 (en) Method for determining the tilt of an image sensor
JP6507653B2 (en) Inspection apparatus and control method of inspection apparatus
US8872912B2 (en) High speed distributed optical sensor inspection system
SG173068A1 (en) Methods for examining a bonding structure of a substrate and bonding structure inspection devices
KR20000075763A (en) Inspection method
JP4236749B2 (en) Image processing method and apparatus
WO2020065850A1 (en) Three-dimensional measuring device
US6518997B1 (en) Grid array inspection system and method
JP4185186B2 (en) Imaging device
JP3759983B2 (en) Image processing device
US9626752B2 (en) Method and apparatus for IC 3D lead inspection having color shadowing
JP2011158363A (en) Soldering inspection device for pga mounting substrate
JP2000009655A (en) Visual inspection device
US7309161B1 (en) Method for determination of magnification in a line scan camera
US20030025906A1 (en) Optical inspection of solder joints
CN109219730B (en) System and method for pin angle inspection using multi-view stereo vision
JP3823488B2 (en) IC lead float inspection device and inspection method
JPH08204096A (en) Method of lead visual inspection of semiconductor device and inspector
CN110907469A (en) Circuit board welding detection device using machine vision
US5940681A (en) Method and apparatus for automatically checking position data of J-leads

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050531

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071009

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080415

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080616

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080905

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130912

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term