JPH11211420A - Optical dimension measurement and device therefor - Google Patents

Optical dimension measurement and device therefor

Info

Publication number
JPH11211420A
JPH11211420A JP10009085A JP908598A JPH11211420A JP H11211420 A JPH11211420 A JP H11211420A JP 10009085 A JP10009085 A JP 10009085A JP 908598 A JP908598 A JP 908598A JP H11211420 A JPH11211420 A JP H11211420A
Authority
JP
Japan
Prior art keywords
image
point
image processing
search
optical
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.)
Pending
Application number
JP10009085A
Other languages
Japanese (ja)
Inventor
Tosuke Kawada
東輔 河田
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 JP10009085A priority Critical patent/JPH11211420A/en
Publication of JPH11211420A publication Critical patent/JPH11211420A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a small-sized and highly precise optical dimension measuring device. SOLUTION: A spot light source is formed of a light source 98 and an orifice 94. The light radially projected from the spot light source is guided to an objective lens 108 by a beam splitter 90. The focuses O of the spot light source and the objective lens 108 are arranged so as to be face-symmetric to the reflecting surface 112 of the beam splitter 90, and the light from the spot light source is converted into parallel light by the objective lens 108. The parallel reflected light of the parallel light reflected by the surface of a matter to be inspected 122 and the reflecting surface 80 of a mirror 68 is converged to the focus O by the objective lens 108, further converted into parallel light by an imaging lens 82, and incident on a CCD 80 to pick up the image. The resulting image is processed by an image processing device to provide a precise dimension on projection drawing method of the matter to be inspected 122 having a three- dimensional form. Since the projected image of the matter 122 is provided by the reflected parallel light, the whole device can be miniaturized, compared with the cases where a lighting system for projecting a parallel light is arranged on the reflecting surface 70 side.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、被測定物を光学的
に撮像し、取得した画像の処理により被測定物の寸法を
測定する光学式寸法測定方法と、その測定方法の実施に
好適な装置とに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an optical dimension measuring method for optically imaging an object to be measured and measuring the dimensions of the object by processing the acquired image, and a method suitable for carrying out the measuring method. It relates to a device.

【0002】[0002]

【従来の技術】立体物の大きさは透視図法ないし投影図
法上の寸法で定義されるのが普通であるため、この寸法
を測定することの必要性が高いが、通常の撮像により取
得した画像の処理により立体物である被測定物の正確な
寸法を取得することは困難である。CCD等の撮像セン
サを使用して立体物である被測定物を撮像すると、被測
定物各部の光軸方向の位置によって各部の像の大きさが
変わってしまうためである。被測定物に背後から平行光
を当て、被測定物の周囲を通過した平行光が形成する像
を、テレセントリック光学系により縮小させて、被測定
物の縮小像を形成する平行光を得、その平行光を撮像セ
ンサの撮像面に当てて、縮小像を撮像し、その縮小画像
を処理して上記平行光と直交する方向の寸法を取得すれ
ば、上記問題は解消できるのであるが、この方式の光学
式寸法測定装置は大形になることを避け得ない。被測定
物の背後から平行光を当てる光学系と、被測定物の周囲
を通過した平行光が形成する像を縮小して撮像センサに
入射させるテレセントリック光学系とが直列に並ぶこと
になるからである。
2. Description of the Related Art Since the size of a three-dimensional object is generally defined by dimensions in perspective projection or projection, it is highly necessary to measure these dimensions. It is difficult to obtain accurate dimensions of the object to be measured as a three-dimensional object by the above processing. This is because, when an object to be measured, which is a three-dimensional object, is imaged using an image sensor such as a CCD, the size of the image of each part changes depending on the position of each part of the object in the optical axis direction. The object to be measured is irradiated with parallel light from behind, and the image formed by the parallel light passing around the object to be measured is reduced by a telecentric optical system to obtain parallel light that forms a reduced image of the object to be measured. The above problem can be solved by irradiating the parallel light on the imaging surface of the image sensor, capturing a reduced image, and processing the reduced image to obtain a dimension in a direction orthogonal to the parallel light. It is inevitable that the optical size measuring device of this type will become large. Because an optical system that irradiates parallel light from behind the object to be measured and a telecentric optical system that reduces the image formed by the parallel light passing around the object and enters the image sensor will be arranged in series. is there.

【0003】[0003]

【発明が解決しようとする課題,課題解決手段,作用お
よび効果】本発明はこの点に鑑み、光学式寸法測定装置
を小形化することを課題としてなされたものであり、本
発明によって、下記各態様の光学式寸法測定方法および
装置、ならびに光学式寸法測定装置におけるオリフィス
位置調節方法および反射面向き調節方法が得られる。各
態様は請求項と同様に、項に区分し、各項に番号を付
し、必要に応じて他の項の番号を引用する形式で記載す
る。各項に記載の特徴の組合わせの可能性を明示するた
めである。 (1)一平面をなす反射面の手前に被測定物を置き、そ
れら反射面と被測定物とに反射面と直交する向きの平行
光を当て、少なくとも、反射面により反射されて被測定
物の周囲を通過した平行光により形成される像を撮像
し、取得した画像に基づいて前記被測定物の、前記反射
面に平行な方向の寸法を求める光学式寸法測定方法(請
求項1)。このように、反射面およびその手前に置いた
被測定物に、反射面と直交する平行光を当て、反射面に
おいて反射され、被測定物の周囲を通過した平行光によ
り形成される像を撮像すれば、被測定物の正確な投影像
を得ることができ、その投影像を処理すれば、透視図法
ないし投影図法上の正確な寸法を得ることができる。平
行光は被測定物と反射面との両方に当てられるため、反
射面で反射された光のみならず、被測定物の表面で反射
された光も撮像面に到達し、被測定物の表面像を形成す
るが、被測定物の表面がたとえ研削面であっても、微細
な凹凸が存在するため、反射面に直角な平行光の一部が
反射面に直角な方向に反射されるに過ぎない。それに対
し、反射面を鏡面とすれば、反射面に直角な平行光の殆
ど全部が反射面に直角な方向に反射される。したがっ
て、被測定物の表面の像に比較して反射面の像を圧倒的
に明るくすることは容易であり、容易に被測定物の輪郭
線を特定することができる。反射面により反射されて被
測定物の周囲を通過した平行光により形成される被測定
物のシルエット像が得られるのであり、そのシルエット
像を処理することにより、被測定物の外のり寸法(貫通
した開口があればその開口の内のり寸法も)を求めるこ
とができるのである。ただし、被測定物の表面からの反
射光の、反射面に直角な方向の成分が多い場合には、被
測定物の表面も撮像されるため、被測定物表面に記載さ
れた文字,記号等のキャラクタ、表面に形成された凹部
や疵の正確な投影像も取得することができ、必要があれ
ばこれらの寸法や位置も正確に測定することができる。
そして、被測定物および反射面に平行光を当てる光学系
も、被測定物および反射面からの平行反射光により形成
される像を撮像面に結像させる光学系も被測定物と同じ
側に設けることができるため、光学式寸法測定装置全体
をコンパクトに構成することが可能になる。また、被測
定物に接触することなく、寸法を測定することができる
ため、ゴム等軟らかい材料から成る被測定物を支障なく
測定できる。さらに、画像処理装置を、撮像により取得
された画像内における被測定物の像の位置や方位(基準
回転位置からの回転角度)のいかんを問わず寸法を求め
得るものとすれば、被測定物を平らな支持面に単純に載
置すればよく、被測定物の寸法測定装置へのセットを容
易に行うことができ、寸法測定の能率を向上させること
ができる。 (2)前記平行光を、光源からオリフィスを経て放射状
に投光させた光をレンズ系により平行光に変換して得、
かつ、前記反射面に直角な方向における複数の位置にお
いて被測定物の測定を行いつつ前記オリフィスと前記レ
ンズ系との光軸方向における相対位置を調節し、それら
複数の位置における測定の結果が予め定められた条件
(平行光の平行度が設定平行度より良好である場合には
満たされ、設定平行度以下である場合には満たされない
条件)を満たしたとき、オリフィスとレンズ系との相対
位置調節を終了する相対位置調節工程を含む (1)項に記
載の光学式寸法測定方法(請求項2)。レンズ系を、例
えば凸レンズ1個で構成することができ、凸レンズは平
行光を焦点に集光し、あるいは焦点から放射状に投光さ
れる光を平行光に変換する機能を有するため、点光源を
凸レンズの焦点に設ければ平行光を得ることができる。
したがって、光源とオリフィスとの組合わせにより点光
源を構成し、その点光源をレンズ系の焦点の位置に配置
すれば、平行光を得ることができる。この場合、寸法測
定精度を向上させるためには平行光の平行度を向上させ
ることが必要であり、そのためには、オリフィスに形成
する透孔の直径をできる限り小さくすることの他に、オ
リフィスの位置、すなわち透孔の軸方向の位置を精度よ
くレンズ系の焦点の位置に合わせることとが有効であ
る。そして、平行光の平行度が低い場合には、例えば、
同じ寸法の被測定物を、反射面に直角な方向(レンズ系
の光軸に平行な方向)の位置を変えて測定すれば、得ら
れる測定値が変わるのに対し、平行光の平行度が高い場
合には、測定値が変わらない性質がある。したがって、
同じ寸法の被測定物を反射面に直角な方向における複数
の位置で測定しつつオリフィスとレンズ系との相対位置
を調節し、それら複数の位置における測定値が実質的に
同じになった場合に、オリフィスとレンズ系との相対位
置の調節を終了すれば、オリフィスの透孔がレンズ系の
焦点の位置に精度よく位置決めされることになる。この
場合には、前記「予め定められた条件」が、「同じ寸法
の被測定物の複数の位置における測定値が実質的に同じ
であること」であることになる。なお、反射面に直角な
方向における複数の位置において被測定物の測定を行う
ためには、同じ測定物を複数の位置に移動させて測定し
てもよく、同じ寸法の被測定物を複数個用意し、それら
を複数の位置にそれぞれ固定的に位置決めして測定して
もよい。後者の場合には、複数個の被測定物を同時に測
定することも可能である。また、相対位置調節工程実施
時における被測定物は、現実に寸法測定を行う必要のあ
る製品の一つでも、相対位置調節専用に製作された相対
位置調節用ゲージと称すべきものでもよい。 (3)前記被測定物の外のり寸法(または内のり寸法)
の測定を行いつつ前記反射面の向きを調節し、被測定物
の外のり寸法が極小値(または内のり寸法が極大値)と
なったとき、反射面の向きの調節を終了する反射面向き
調節工程を含む (1)項または (2)項に記載の光学式寸法
測定方法(請求項3)。平行光を平面の反射面に投射す
れば、反射光も平行光となる。そして、寸法測定精度を
向上させるためには、入射光と反射光との平行度を向上
させることが必要であり、そのためには、入射光と反射
面との直角度を向上させればよい。一方、入射光と反射
面との直角度が高くなるほど、被測定物の外のり寸法が
小さく測定され、貫通した開口の内のり寸法が大きく測
定される性質があるため、被測定物の寸法測定を行いつ
つ反射面の向きを調節し、被測定物の外のり寸法が極小
値(または内のり寸法が極大値)となったとき、反射面
の向きの調節を終了すれば、入射光と反射面との直角度
を最も高くすることができる。なお、反射面向き調節工
程実施時における被測定物は、現実に寸法測定を行う必
要のある製品の一つでも、反射面向き調節専用に製作さ
れた反射面向き調節用ゲージと称すべきものでもよい。 (4)一平面をなす反射面と、その反射面と光軸が直交
する状態で配置され、反射面からの平行光を焦点に集光
する第一レンズ系と、それら反射面と第一レンズ系との
間の位置に被測定物を支持する被測定物支持装置と、前
記第一レンズ系に対して前記反射面とは反対側の位置に
設けられ、第一レンズ系の光軸に対して傾斜し、光の一
部を透過させ、残りを反射する反射面を有するビームス
プリッタと、そのビームスプリッタの反射面に対して前
記第一レンズ系の焦点とは面対称の位置に設けられたオ
リフィスと、そのオリフィスに対して前記ビームスプリ
ッタとは反対側に設けられた光源と、前記第一レンズ系
の焦点に焦点を有し、第一レンズ系により集光されると
ともに前記ビームスプリッタを通過した光を平行光線に
変換する第二レンズ系と、その第二レンズ系により平行
光線に変換された光により形成される像を撮像する撮像
センサと、その撮像センサにより取得された画像に基づ
いて前記被測定物の前記反射面に平行な方向の寸法を演
算する画像処理装置とを含む光学式寸法測定装置(請求
項4)。光源とオリフィスとにより構成される点光源か
ら放射状に投光される光は、ビームスプリッタの反射面
で反射されて第一レンズ系に向かうが、点光源はビーム
スプリッタの反射面に対して、第一レンズ系の焦点と面
対称の位置にあるため、第一レンズ系にとっては自身の
焦点から放射状に投光された光と同じことになり、第一
レンズ系によって平行光に変換され、被測定物および反
射面に当てられる。反射面による反射光と被測定物表面
による反射光とがビームスプリッタに入射し、一部はそ
れの反射面により点光源の方へ戻されるが、残りはビー
ムスプリッタを通過して第二レンズ系に至り、反射面に
よる反射光と、被測定物表面による反射光のうち第一レ
ンズ系の光軸に平行なもの(反射面に直角なもの)は、
平行光に変換され、撮像センサに入射する。光源および
オリフィスにより構成される点光源を、実際に第一レン
ズ系の焦点に設置しようとすれば、上記反射面や被測定
物表面からの反射光が、オリフィスおよび光源により遮
られて撮像センサに入射せず、被測定物およびその周辺
の画像が得られないことになるが、本態様におけるよう
にビームスプリッタを使用すれば、この問題を解消する
ことができるのである。なお、第一,第二レンズ系はそ
れぞれ1枚のレンズにより構成されても複数枚のレンズ
により構成されてもよい。また、例えば、第二レンズ系
と撮像センサとの間に反射面を設け、第二レンズ系によ
り平行光に変換された光が反射面で反射されて撮像セン
サに入射させられるようにしたり、第一レンズ系の焦点
と第二レンズ系との間に反射面を設け、第一レンズ系か
らの光がその反射面で反射された後に、第二レンズ系に
より平行光に変換されるようにしたりすることができ
る。第一レンズ系についても同様のことが可能である。
このように、反射面により光の向きを任意に変えること
ができ、この場合にはレンズ系の光軸も光と共に屈曲す
ると考えることとする。本態様の光学式寸法測定装置に
おいては、反射面,被測定物支持装置,第一レンズ系,
第二レンズ系および撮像センサが、一直線上に配置され
ることは不可欠ではないのである。本態様の光学式寸法
測定装置によれば、前記 (1)項に記載の光学式測定方法
を実施することができる。 (5)前記オリフィスと第一レンズ系との光軸方向の相
対位置を調節する相対位置調節装置を含む (4)項に記載
の光学式寸法測定装置。相対位置調節装置は、手動の調
節ねじを含み、その調節ねじの手動操作によりオリフィ
スまたは第一レンズ系の位置を調節するものでもよく、
送りねじあるいはナットを回転させる電動モータ(回転
角度の制御可能なステップモータやサーボモータ)や、
積層圧電素子等のアクチュエータを含み、そのアクチュ
エータを電気制御装置が手動操作部材の操作に応じて作
動させ、オリフィスまたは第一レンズ系の位置を調節す
るものでもよい。 (6)前記相対位置調節装置が、電気信号に基づいて前
記オリフィス(または前記第一レンズ系)の光軸方向の
位置を調節する相対位置調節アクチュエータを含み、か
つ、当該光学式寸法測定装置が、前記撮像センサ,前記
画像処理装置および前記相対位置調節アクチュエータを
制御し、相対位置調節アクチュエータに前記オリフィス
(または前記第一レンズ系)の軸方向の位置を変更させ
つつ、撮像センサおよび画像処理装置に、前記反射面と
前記第一レンズ系との間の、前記反射面に直角な方向に
おいて互いに異なる複数の位置にある被測定物の撮像お
よび演算を行わせ、それら複数の位置の被測定物につい
ての画像処理装置による演算結果が予め定められた条件
を満たしたとき、相対位置調節アクチュエータにオリフ
ィスと第一レンズ系との光軸方向の相対位置の変更を終
了させる相対位置調節制御装置を含む (5)項に記載の光
学式寸法測定装置。相対位置調節アクチュエータは、例
えば積層圧電素子を駆動源とするものとすることができ
る。積層圧電素子は、印加電圧の変化に応じて積層方向
の寸法が変わるため、その寸法変化に応じてオリフィス
または第一レンズ系の位置が変わるようにすれば、電気
信号に基づいてオリフィスと第一レンズ系との相対位置
を調節することができるのである。相対位置調節制御装
置は、光学式寸法測定装置の作動中は常に自動的に作動
しているようにすることができ、そうすれば、オリフィ
スと第一レンズ系との相対位置が全くの自動で適切な位
置に保たれることとなり、オペレータはオリフィスと第
一レンズ系との相対位置の適否に関して何らの注意もす
る必要がなくなり、寸法測定装置の使い勝手が特に向上
する。しかし、オペレータが作動指令操作部材を操作す
るなどして、作動指令を入力した場合にのみ相対位置調
節制御装置が作動するようにすることも可能である。 (7)前記反射面の向きを調節する反射面向き調節装置
を含む (4)ないし (6)項のいずれか1つに記載の光学式
寸法測定装置。反射面向き調節装置は、手動の調節ねじ
を含み、その調節ねじの手動操作により反射面の向きを
調節するものでもよく、送りねじあるいはナットを回転
させる電動モータ(回転角度の制御可能なステップモー
タやサーボモータ)や、積層圧電素子等のアクチュエー
タを含み、そのアクチュエータを電気制御装置が手動操
作部材の操作に応じて作動させ、反射面の向きを調節す
るものでもよい。 (8)前記反射面向き調節装置が、電気信号に基づいて
前記反射面の向きを調節する反射面アクチュエータを含
み、かつ、当該光学式寸法測定装置が、前記撮像セン
サ,前記画像処理装置および前記反射面アクチュエータ
を制御し、前記反射面アクチュエータに前記反射面の向
きを変更させつつ、撮像センサおよび画像処理装置に撮
像および演算を繰り返させ、画像処理装置が演算する被
測定物の寸法が極小値になったとき、反射面アクチュエ
ータに反射面の向き変更を終了させる反射面向き調節装
置制御装置を含む (7)項に記載の光学式寸法測定装置。
反射面アクチュエータは、例えば、2個の積層圧電素子
を駆動源とするものとすることができる。反射面を有す
る反射鏡を、反射面に平行な三角形の3頂点の位置で支
持させ、1頂点の支持部材は位置固定のものとし、2頂
点の支持部材はそれぞれ積層圧電素子に支持された可動
支持部材とするのである。2個の積層圧電素子に対する
印加電圧を電圧制御装置により互いに独立に制御すれ
ば、2個の可動支持部材の1個の固定支持部材に対する
相対位置(反射面に直角な方向における)を任意に変え
ることができ、反射面の向きを電気信号に基づいて任意
に調節し得ることになる。反射面向き調節装置制御装置
は、光学式寸法測定装置の作動中は常に自動的に作動し
ているようにすることができ、そうすれば、オペレータ
は反射面の向きの適否に関して何らの注意もする必要が
なくなり、寸法測定装置の使い勝手が特に向上する。し
かし、オペレータが作動指令操作部材を操作するなどし
て、作動指令を入力した場合にのみ反射面向き調節装置
制御装置が作動するようにすることも可能である。 (9)前記画像処理装置が、前記撮像センサにより撮像
された画像のデータを記憶する画像データ記憶手段と、
一定の距離を隔てた2個の点を一対とするポイントペア
を複数組有する捜索テンプレートのデータを記憶する捜
索テンプレートデータ記憶手段と、その捜索テンプレー
トデータ記憶手段の捜索テンプレートを前記画像データ
記憶手段の画像データの表す画像が存在する画面に重ね
た場合に、前記複数組のポイントペアを構成する各対の
点の光学的特性値の相違状態が設定状態以上である場合
には、その対の点の一方が前記被測定物の画像処理対象
部のエッジ内に位置し、他方はエッジ外(背景内)に位
置する適合状態にあるとし、前記複数のポイントペアの
うち設定量以上のものが適合状態にあれば、画像処理対
象部は捜索テンプレートに適合する捜索対象部であると
判定する判定手段とを含む (4)ないし (8)項のいずれか
1つに記載の光学式寸法測定装置(請求項5)。上記エ
ッジは、画像処理対象部が被測定物全体である場合には
被測定物の輪郭線に対応し、画像処理対象部が被測定物
表面のキャラクタや凹部である場合にはそれらキャラク
タや凹部の輪郭線に対応する。本態様の光学式寸法測定
装置において、撮像センサにより撮像が行われるときは
通常、撮像面が多数の画素に分解され、1画素のそれぞ
れについて画像データが作成されて画像データ記憶手段
に記憶される。「画像データの表す画像」とは、画像デ
ータに基づいて得られる画像であり、画素を単位とし、
光学的特性値が画素毎に得られる画像でもよく、あるい
は画素を単位とせず、光学的特性値が任意の点において
得られる画像でもよい。前者の一例は、多数の撮像素子
を備え、各撮像素子の受光状態に応じた電気信号を発生
させる撮像センサにより得られた各撮像素子毎の電気信
号の集合として観念される画像であり、画像は撮像素子
が配列された撮像面上に物理的に形成された画像である
ということができる。その意味でこの画像を物理画像と
称し、物理画像が存在する画面(撮像面と一致してい
る)を物理画面と称することとする。物理画像のデータ
は、各撮像素子毎の電気信号のデータを各撮像素子の位
置と関連付けて記憶手段に記憶させることにより保存さ
れ、再現され得る。また、物理画像を表す画像データは
実際に存在しており、その意味で物理画像は、後述の仮
想画像との対比において実在画像と称することもでき、
実在画像が存する画面は実在画面と称することができ
る。実在画像を表す画像データは、各撮像素子毎の電気
信号の大きさ自体を表すアナログデータあるいはデジタ
ルデータでもよく、例えば256段階の離散値で表され
る多段階のデジタルデータ(階調データと称する)でも
よく、撮像素子毎の電気信号がしきい値を超えるか否か
により2値化された2値化データでもよい。画素を単位
とせず、光学的特性値が任意の点において得られる画像
の一例は、上記物理画面の各撮像素子の電気信号のデー
タが各撮像素子の中央の点の光学的特性値を表すと見な
し、それら多数の点の光学的特性値を満たす曲面を想定
した場合に、その曲面を規定する連続的な光学的特性値
の集合として観念される画像である。この画像の画像デ
ータは例えば上記曲面を表す式のデータとして保存する
ことも可能であり、この画像データも実在画像の一種で
あることになる。それに対して、上記曲面のデータを予
め求めておく代わりに、画面上の任意の点が指定された
場合に、その点のみの光学的特性値を各点が指定される
毎に演算によって求めることも可能である。この場合に
は画像は実際には存在せず、存在すると仮想されている
に過ぎないため、仮想画像と称し、仮想画像が存在する
画面を仮想画面と称することとする。捜索テンプレート
データは、ポイントペアを構成する2個の点の画面上に
おける位置を規定するデータであり、「捜索テンプレー
トを画像データの表す画像が存在する画面に重ねる」と
は、画面が物理画面の場合、捜索テンプレートデータに
より指定された各位置にある画素の画像データを画像デ
ータ記憶手段から読み出して光学的特性値を得ることで
ある。また、画面が仮想画面である場合は、捜索テンプ
レートを仮想画面上に置いたと想定し、捜索テンプレー
トデータにより指定される仮想画面上の各点の光学的特
性値を物理画像のデータから演算で求めることである。
この場合の物理画像データは、各撮像素子毎の電気信号
の大きさ自体を表すアナログデータあるいはデジタルデ
ータか、階調データであることが必要であり、2値化デ
ータでは意味がない。画像処理対象部が被測定物全体で
ある場合は、反射面が背景(エッジ外)に対応すること
になり、画像処理対象部が被測定物表面に形成されたキ
ャラクタや凹部である場合には、それらを囲む被測定物
表面が背景に対応することになる。いずれにしても、画
像処理対象部に対応する画像データと背景に対応する画
像データとの間には相違がある。逆に言えば、背景との
間に相違がある場合でなければ、画像処理により画像処
理対象部に関する情報を取得することができない。その
ため、ポイントペアの一方の点が画像処理対象部のエッ
ジ内に位置し、他方の点がエッジ外(背景内)にあれ
ば、換言すれば、ポイントペアの一方の点に対応する画
像データが画像処理対象部を表すデータであり、他方の
点に対応するデータが背景を表すデータであれば、ポイ
ントペアを構成する2個の点の光学的特性値の相違状態
が設定状態以上になるはずであり、相違状態が設定状態
以上ではないポイントペアの組の数(または率)が予め
定められた設定数(または設定率)以下である場合に
は、その画像処理対象部が捜索対象部であると判定する
ことができる。また、そのようなポイントペアの組を探
すことにより、画面上において画像処理対象部の像を探
すことができる。「光学的特性値」とは、例えば、輝
度,色相等であり、「設定状態以上」とは、輝度や色相
等の差が設定値以上であることや、輝度や色相等の比率
が設定値以上であること等である。捜索テンプレートを
物理画面に重ねて光学的特性値を求める場合、画像デー
タはアナログデータや階調データ(以下、階調データ等
と称する)でもよく、2値化データでもよい。階調デー
タ等であれば、ポイントペアの2個の点の一方の値と他
方の点の値との差が設定値以上であること、あるいは両
値の比率が設定比率以上であることが光学特性値の相違
状態が設定状態以上であることになる。2値化データで
あれば、ポイントペアの2個の点の一方の値が0であ
り、他方の値が1であれば光学的特性値の相違状態が設
定状態以上であることになる。画像処理対象部の位置が
ほぼ一定である場合には、捜索テンプレートは一定の位
置で画面に重ね合わされればよいが、画像処理対象部の
位置と回転角度との少なくとも一方が不定である場合に
は、判定手段は、捜索テンプレートの位置と回転角度と
の少なくとも一方を、判定結果が肯定になるか、予め定
められた変更限度に達するまで変更しつつ判定を繰り返
すものとされる。捜索テンプレートが変更される場合、
位置や回転角度の異なる複数の捜索テンプレートが予め
準備されても、標準位置および標準回転角度の標準捜索
テンプレートのみが準備され、一般的な位置や回転角度
の捜索テンプレートは必要に応じて座標変換により作成
されてもよい。「変更限度」とは、例えば、画像処理対
象部を捜す捜索領域が設定されている場合に、それ以上
捜索テンプレートの位置を変更すれば捜索テンプレート
が捜索領域からはみ出してしまう位置に達したことや、
捜索テンプレートの位置が予め定められている回数変更
されたこと等である。本態様の光学式寸法測定装置の好
適な利用分野の一つは、立体形状の被測定物の寸法検査
である。寸法検査においては、被測定物(画像処理対象
部)の寸法がほぼ一定であるため、捜索テンプレートの
使用に適しているのである。被測定物支持装置を被測定
物をほぼ一定の位置に位置決めして支持するものとすれ
ば、被測定物に捜索テンプレートを重ね合わせることが
容易となって、特に能率よく検査を実行することができ
る。本態様の光学式寸法測定装置の別の好適な利用分野
は、電気回路組立ラインである。例えば、電気部品装着
装置においては、プリント基板等の装着対象材に装着さ
れる電気部品やプリント基板に設けられた基準マーク等
が画像処理対象部とされ、スクリーン印刷機において
は、スクリーンに設けられた基準マークや印刷用透孔等
が画像処理対象部とされる。また、画像処理対象部は、
物全体の輪郭に限らず、部分が画像処理対象部にされる
こともある。例えば、角形のチップではチップそのもの
が画像処理対象部であるが、リードや半田バンプ等を有
する電気部品においては、それらリードや半田バンプ等
を有する本体が画像処理対象部とされる他、1本のリー
ドや1個の半田バンプが画像処理対象部とされることも
ある。本体の輪郭の外側に位置するリード等は勿論、内
側に位置するリード,半田バンプ等、他の部材の輪郭の
内側に位置する物が画像処理対象部とされることもある
のである。後者の場合、捜索テンプレートは、物全体の
輪郭の内側に位置する物の輪郭を捜索対象として作成さ
れるとともに、物理画面上あるいは仮想画面上におい
て、物全体の輪郭の像の内側であって、内側に位置する
物の物理画像あるいは仮想画像の形成が予定される位置
に重ねられ、画像処理対象部が捜索される。以上の説明
から明らかなように、本態様によれば、画像データおよ
び捜索テンプレートを用いて捜索対象物の有無や画像処
理対象部が捜索対象部であるか否かを知ることができ
る。ポイントペアを構成する2個の点の光学的特性値の
算出および比較をポイントペアの数だけ行うことにより
判定することができ、処理を容易にかつ迅速に行うこと
ができる画像処理装置を備えた光学式寸法測定装置が得
られる。 (10)前記画像処理装置が、前記撮像センサにより撮
像された画像のデータを記憶する画像データ記憶手段
と、2個の点を直線状に結んで成るシークラインを複数
本有する測定テンプレートのデータを記憶する測定テン
プレートデータ記憶手段と、その測定テンプレートデー
タ記憶手段の測定テンプレートを前記画像データ記憶手
段の画像データの表す画像が存在する画面に重ね、前記
複数本のシークラインの各々の上における前記被測定物
の画像処理対象部のエッジ点の座標を演算するエッジ点
座標演算手段とを含む (4)ないし (9)項のいずれか1つ
に記載の光学式寸法測定装置(請求項6)。本態様の光
学式寸法測定装置の画像処理装置における「画像データ
の表す画像が存在する画面」も、 (9)項に記載の光学式
寸法測定装置の画像処理装置におけると同様に、物理画
面ないし実在画面であっても、仮想画面であってもよ
い。「測定テンプレートを画面に重ね、」とは、例え
ば、物理画面上において測定テンプレートデータにより
指定される画素に対応する画像データを画像データ記憶
手段から読み出すことであり、あるいは仮想画面上にシ
ークラインにより指定される点の画像データ(光学的特
性値)を物理画面の画像データに基づいて演算すること
である。画像処理対象部と背景とでは光学的特性値に差
があるため、エッジ点位置において光学的特性値の変化
勾配が最大になる。したがって、物理画面上で画素毎に
得られる光学的特性値の変化を求めることにより、ま
た、仮想画面上で光学的特性値の変化勾配を求めること
によりエッジ点を決定することができる。物理画面上に
おいてはエッジ点が画素単位で求められるが、仮想画面
上においてはシークライン上の任意の点においてエッジ
点が求められ、画像処理の分解能を必要に応じて高くす
ることができる。なお、捜索テンプレートと測定テンプ
レートとの両方が採用される態様においては、判定手段
により捜索対象部であると判定された部分について、測
定テンプレートを用いてエッジ点の座標が演算される。
本態様によれば、画像処理対象部のエッジ点を得ること
ができる。それにより、例えば、画像処理対象部の形状
が予め判っている場合には、比較的少ないシークライン
の設定で画像処理対象部の寸法,位置,回転角度等を算
出することができる。また、画像処理対象部の形状が予
め判っていなくても、シークラインの数を多くし、多数
のエッジ点が得られるようにすれば、エッジ点の集合か
ら形状を求め、寸法,位置,回転角度等を求めることが
可能になる。 (11)前記画像処理装置がさらに、前記エッジ点座標
演算手段により演算された複数のエッジ点座標に基づい
て前記画像処理対象部が捜索対象部であることを確認す
る確認手段を含む (9)項または(10)項に記載の光学式寸
法測定装置。本態様においては、画像処理対象部が捜索
対象部であることが確認される。例えば、画像処理対象
部が複数種類あり、判定手段による判定のみでは画像処
理対象部が捜索対象部である可能性があることが判るの
みで、本当に捜索対象部であるか否かが判らない場合
に、確認手段によって、エッジ点座標演算手段によるエ
ッジ点の演算結果に基づいて画像処理対象部が本当に捜
索対象部であることが確認されるのである。本態様によ
れば、画像処理対象部が捜索対象部であるか否かを確認
することができ、捜索テンプレートのみによる判定に比
較して判定の信頼性が向上する効果が得られる。また、
判定後にさらに別の画像処理が行われる場合には、捜索
対象部ではないものについて無駄に処理が行われること
を回避し得る。 (12)前記確認手段が、前記シークライン上における
前記画像処理対象部のエッジ点とシークラインの中点と
のずれに基づいて前記確認を行う中点基準型確認手段を
含む(11)項に記載の光学式寸法測定装置。本態様におい
ては、シークライン上における画像処理対象部のエッジ
点とシークラインの中点とのずれに基づいて、画像処理
対象部が捜索対象部であることの確認が行われる。例え
ば、捜索対象部が長方形の部分である場合に、互に平行
な2辺についてそれぞれ同じ長さのシークラインを同数
設定し、これらシークラインの位置を、もし捜索対象部
と測定テンプレートとの間にずれがなければ全てのシー
クラインの中点と捜索対象部のエッジ点とが合致する位
置に決定しておけば、画像処理対象部が測定テンプレー
トに対してずれている場合でも、画像処理対象部のエッ
ジ点とシークラインの中点との方向性を考慮したずれの
総和が0であれば、その画像処理対象部は捜索対象部で
あると確認することができるのである。本態様によれ
ば、画像処理対象部が捜索対象部であるか否かの確認が
容易になる効果、あるいは判定の信頼性が向上する効果
が得られる。 (13)前記画像処理装置がさらに、前記エッジ点座標
演算手段により演算された複数のエッジ点座標に基づい
て画像処理対象部の寸法の他、位置と回転角度との少な
くとも1つを演算する対象部演算手段を含む(10)ないし
(12)項のいずれか1つに記載の光学式寸法測定装置。本
態様においては、画像処理対象部の寸法の他、位置と回
転角度との少なくとも1つがエッジ点座標に基づいて演
算される。位置と回転角度とのうち必要なものが演算さ
れるのである。エッジ点の座標の数が画像処理対象部の
形状を特定できるほど多数あれば、エッジ点の座標のみ
で画像処理対象部の寸法,位置および回転角度のいずれ
も演算することができる。エッジ点の座標の数が少ない
場合でも、例えば、画像処理対象部の種類を示すデータ
等の補助データの使用により、画像処理対象部の寸法等
を演算することができ、また、画像処理対象部の形状
が、例えば矩形,円というように、1種類に決まってい
る場合には補助データがなくても画像処理対象部の寸法
等を演算することができる。本態様によれば、画像処理
対象部の寸法の他、位置と回転角度の少なくとも1つが
判り、その結果、例えば、形状は同じであっても寸法が
異なる画像処理対象部の識別,画像処理対象部の位置決
めの合否判定や位置ずれ修正量の演算,回転角度決めの
合否判定や回転角度ずれ修正量の演算等を行うことがで
きる。 (14)前記対象部演算手段が、前記シークライン上に
おける前記画像処理対象部のエッジ点とシークラインの
中点との距離に基づいて画像処理対象部の前記寸法,位
置および回転角度の少なくとも1つを演算する中点基準
型対象部演算手段を含むことを特徴する(13)項に記載の
光学式寸法測定装置。このように、画像処理対象部の寸
法等を画像処理対象部のエッジ点とシークラインの中点
との距離に基づいて演算すれば、演算に用いられる値が
平均的に小さくて済み、誤差が小さくなって精度の良い
演算結果が得られる。 (15)前記画像処理装置がさらに、2個の点を直線的
に結んで成る複数本のシークラインを、前記画像処理対
象部を規定する画像処理対象部規定データに基づいて自
動的に設定するシークライン自動設定手段を含む(10)な
いし(14)項のいずれか1つに記載の光学式寸法測定装
置。本態様においては、シークライン自動設定手段によ
りシークラインが自動で設定される。その最も単純な一
例は、判定手段およびエッジ点座標演算手段を有する画
像処理装置において、画像処理対象部が捜索テンプレー
トに適合する捜索対象部であると判定された捜索テンプ
レートのポイントペアを構成する2個の点を結ぶ直線が
自動的にシークラインとされる場合である。この場合に
は、捜索テンプレートデータが画像処理対象部規定デー
タを兼ねることとなる。捜索テンプレートデータがなく
ても、画像処理対象部の形状,寸法を示すデータが供給
され、あるいは画像処理対象部が1種類に決まってお
り、かつ、位置や回転角度のずれも比較的小さい範囲に
限られていて、位置や回転角度のずれを測定する必要が
ある場合には、画像処理対象部の形状,寸法を規定する
データに基づいてシークラインを自動で設定させること
が可能である。この場合、画像処理対象部の形状,寸法
を規定するデータが画像処理対象物規定データであるこ
ととなる。さらに、エッジ点座標演算手段により演算さ
れたエッジ点の座標に基づいてシークラインを自動的に
設定し、これを第二の測定テンプレートとして更にエッ
ジ点を演算することも可能であり、この場合、先にエッ
ジ点座標演算手段により演算されたエッジ点の座標が画
像処理対象部規定データであることとなる。第二の測定
テンプレートのシークラインの本数を、第一の測定テン
プレートのシークラインの本数より多く設定すれば、エ
ッジ点の座標がより正確かつ多数になり、寸法,位置,
回転角度等が一層正確に測定される。このように、シー
クラインがシークライン自動設定手段により自動的に設
定されるようにすれば、光学式寸法測定装置のオペレー
タの所要作業量が少なくて済む効果得られる。 (16)前記シークライン自動設定手段によるシークラ
インの自動設定と、そのシークライン上における前記エ
ッジ点座標演算手段によるエッジ点座標の演算と、前記
対象部演算手段による演算とを複数回繰り返させる繰返
し手段を含む(15)項に記載の光学式寸法測定装置。本態
様においては、2回目以降のシークラインの自動設定時
には、直前に演算されたエッジ点の座標に基づいて、シ
ークライン上のエッジ点予定位置(例えば中点)が実際
のエッジ点位置と一致すると予想される位置にシークラ
インが自動で設定される。そのため、演算回数が多いほ
ど、シークライン上のエッジ点予定位置と画像処理対象
物の実際のエッジ点との誤差が小さくなり、エッジ点の
座標を精度良く得ることができる。 (17)前記撮像センサが、多数の撮像素子を備え、各
撮像素子の受光状態に応じた電気信号を発生させるもの
であり、前記画像データ記憶手段がそれら各撮像素子の
電気信号のデータを、各撮像素子の位置と関連付けて記
憶するものであり、かつ、前記画像処理装置がさらに、
画像データ記憶手段の画像データにより形成される物理
画面に対応して想定される仮想画面上の任意の点を指定
する点指定手段と、その点指定手段による点指定毎に前
記物理画面上の光学的特性値のデータに基づいて指定さ
れた点の光学的特性値を演算する仮想点データ演算手段
とを含む (9)ないし(16)項のいずれか1つに記載の光学
式寸法測定装置(請求項7)。本態様においては、仮想
画面上の任意の点の光学的特性値が、点指定手段によっ
て点が指定される毎に演算される。仮想画面は無数の点
の集合であるが、そのうち点指定手段により指定された
必要な点のみの光学的特性値が演算されるのである。こ
のように、必要な点についてのみ演算が行われるように
すれば、画像処理全体に要する時間が少なくて済む効果
が得られる。また、演算された光学的特性値を記憶する
光学的特性値記憶手段の記憶容量も小さくて済む。 (18)前記エッジ点座標演算手段が、前記シークライ
ン上に設定された複数の分割点の光学的特性値を取得す
る分割点特性値取得手段と、その分割点特性値取得手段
により取得された分割点の光学的特性値に基づいてシー
クライン上における光学的特性値の最も急激な変化点を
エッジ点として捜索するエッジ点捜索手段とを含む(10)
ないし(17)項のいずれか1つに記載の光学式寸法測定装
置(請求項8)。本態様においては、シークラインが重
ねられる画面が物理画面である場合、分割点の光学的特
性値は、分割点の位置に対応する画素の画像データを画
像データ記憶手段から読み出すことにより取得され、そ
れら光学的特性値に基づいてエッジ点が捜索される。エ
ッジ点は画素単位で捜索される。シークラインが重ねら
れる画面が仮想画面である場合、分割点は仮想画面上に
おいて物理画面の画素の大きさとは無関係に設定するこ
とができ、分割点の光学的特性値は物理画面上の光学的
特性値のデータ(画像データ)に基づいて演算される。
分割点は点指定手段により指定される指定点であっても
よく、指定点以外の点であってもよい。例えば、点指定
手段により指定された点毎に光学的特性値を演算すると
ともに、それら複数の光学的特性値からシークライン上
の光学的特性値の変化を表す式を求め、その式を規定す
る指定点とは別に分割点を設定して式から光学的特性値
を演算し、エッジ点を捜索してもよいのである。本態様
においては、エッジ点の捜索がシークライン上において
のみ行われ、しかも、限られた数の分割点における光学
的特性値に基づいてエッジ点が決定されるため、容易に
かつ迅速にエッジ点を決定することができる。 (19)前記複数の分割点のピッチが前記撮像素子のピ
ッチより小さい(18)項に記載の光学式寸法測定装置(請
求項9)。本態様においては、仮想画面上の分割点が撮
像素子のピッチより小さいピッチで設定され、光学的特
性値が物理画面上の光学的特性値のデータに基づいて演
算される。シークライン上において光学的特性値の変化
がより細かいピッチで捜索され、画像処理の分解能が高
くなる。撮像センサの撮像素子の大きさによって制限さ
れることなく、分解能の高い画像処理を行うことが可能
になるのであり、寸法測定精度を向上させることができ
る。 (20) (4)ないし(19)項のいずれか1つに記載の光学
式寸法測定装置において前記オリフィスと第一レンズ系
との光軸方向における相対位置を調節する方法であっ
て、前記反射面と前記第一レンズ系との間の、前記反射
面に直角な方向において互いに異なる複数の位置で被測
定物の測定を行いつつ前記オリフィス(または前記第一
レンズ系)の位置を調節し、それら複数の位置における
測定の結果が予め定められた条件を満たしたとき、オリ
フィスと第一レンズ系との相対位置調節を終了するオリ
フィス/第一レンズ系相対位置調節方法。 (21)前記複数の位置における測定が、同じ寸法の被
測定物の測定であり、前記予め定められた条件が、複数
の位置における測定の結果が実質的に同じになることで
ある(20)項に記載のオリフィス/第一レンズ系相対位置
調節方法。 (22)前記複数の位置における測定を同時に行う(21)
項に記載のオリフィス/第一レンズ系相対位置調節方
法。 (23)前記複数の位置における測定が、寸法が予め判
っている被測定物の測定であり、前記予め定められた条
件が、複数の位置における測定の誤差が実質的に同じに
なることである(20)項に記載のオリフィス/第一レンズ
系相対位置調節方法。前述のように、オリフィスと第一
レンズ系との光軸方向における相対位置が不適切であれ
ば、被測定物および反射面に当てられる平行光の平行度
が低下し、寸法誤差が発生する。寸法誤差は他の理由に
よっても発生するが、それら寸法誤差は測定位置を変更
しても変化しないものが多いのに対し、平行光の平行度
の悪さに起因する寸法誤差は測定位置の変化に従って変
化するため、複数の位置における測定の誤差が実質的に
同じになれば、平行光の平行度は良好になり、オリフィ
スと第一レンズ系との相対位置は適切になったと見なす
ことができる。なお、前述のように、平行光と反射面と
の直角度の悪さによっても寸法誤差が発生し、この寸法
誤差も測定位置の変化に従って変化するため、オリフィ
スと第一レンズ系との相対位置不適切と、反射面向き不
適切との両方が同時に発生している場合には、寸法誤差
の原因がいずれであるかを特定することができない。し
かし、先に (3)項に関して説明したように、反射面向き
不適切は別の方法で排除することができるため、先ずそ
れを排除した後、本態様の方法でオリフィスと第一レン
ズ系との相対位置の調節を行えば、オリフィスと第一レ
ンズ系との相対位置不適切と、反射面向き不適切との両
方を排除することができる。 (24) (4)ないし(19)項のいずれか1つに記載の光学
式寸法測定装置において前記反射面の向きを調節する方
法であって、前記被測定物支持装置に被測定物を支持さ
せ、その被測定物の外のり寸法(または内のり寸法)の
測定を行いつつ前記反射面の向きを調節し、被測定物の
外のり寸法が実質的に最も小さい値(または内のり寸法
が実質的に最も大きい値)として測定される状態になっ
たとき、反射面の向きの調節を終了する反射面向き調節
方法。上記のように、本反射面向き調節方法を(20)ない
し(23)項に記載のオリフィスと第一レンズ系との相対位
置調節方法と併せて採用することができる。 (25) (1)ないし (3)項のいずれか1つに記載の寸法
測定方法による寸法測定工程と、その寸法測定工程にお
いて取得された寸法に基づいて前記被測定物の合否を判
定する判定工程とを含む検査方法。 (26)前記判定工程の判定が、寸法測定工程において
取得された寸法と基準寸法との比較により行われる(25)
項に記載の検査方法。判定は、例えば、被測定物の真円
度,直角度,進直度等について行われてもよく、一定限
度以上の傷の有無や複数の被測定物間の寸法のばらつき
等について行われてもよいが、最も一般的な判定は本態
様の判定である。
Problems to be Solved by the Invention, Means for Solving Problems, Actions
In view of this point, the present invention provides an optical dimension measuring device
The purpose was to reduce the size of
According to the present invention, an optical dimension measuring method of each of the following embodiments and
Device and orifice in optical size measuring device
A position adjusting method and a reflecting surface direction adjusting method are obtained. each
As with the claims, the modes are divided into sections, and each section is numbered.
And, where necessary, quote the numbers in other sections.
You. To clearly indicate the possibility of combining the features described in each section
It is. (1) Place the DUT in front of the reflective surface that forms a plane,
Parallel to the reflective surface and the DUT in a direction perpendicular to the reflective surface
Illuminate, at least reflected by the reflective surface and measured
Captures an image formed by parallel light passing around the object
And the reflection of the object under measurement based on the acquired image.
Optical dimension measurement method for determining dimensions in the direction parallel to the surface
Claim 1). In this way, it was placed on the reflective surface and in front of it
The object to be measured is exposed to parallel light perpendicular to the reflecting surface,
And reflected by the parallel light passing around the DUT.
By capturing the image formed, an accurate projected image of the DUT can be obtained.
Can be obtained, and if the projection image is processed, the perspective projection
In addition, accurate dimensions can be obtained in the projection. flat
Since the light is applied to both the object to be measured and the reflecting surface,
Not only the light reflected from the launch surface, but also the surface of the DUT
The emitted light also reaches the imaging surface and forms a surface image of the DUT.
However, even if the surface of the workpiece is a ground
Due to the presence of irregularities, some parallel light perpendicular to the reflective surface
It is only reflected in a direction perpendicular to the reflecting surface. Against it
If the reflecting surface is a mirror surface, most of the parallel light perpendicular to the reflecting surface
All are reflected in a direction perpendicular to the reflecting surface. Accordingly
The image of the reflective surface is overwhelmingly compared to the image of the surface of the DUT.
It is easy to brighten and easily
Lines can be identified. Reflected by the reflective surface
Measured object formed by parallel light passing around the object
You get a silhouette image of the thing, and that silhouette
By processing the image, the outer dimensions (through
If there is an opening, the inner dimension of the opening)
You can do it. However, the reflection from the surface of the DUT
If there are many components of the emitted light in the direction perpendicular to the reflecting surface,
Since the surface of the measurement object is also imaged, it is described on the surface of the measurement object.
Characters, symbols, etc., recesses formed on the surface
And accurate projection images of flaws can be obtained
For example, these dimensions and positions can be measured accurately.
And an optical system that irradiates parallel light to the object to be measured and the reflection surface
Is also formed by parallel reflected light from the DUT and the reflective surface
The optical system that forms the image to be imaged on the imaging surface is the same as the DUT
Side, so that the entire optical dimension measuring device
Can be made compact. Also, the measured
Dimensions can be measured without touching the fixed object
Therefore, the object to be measured made of a soft material such as rubber can be
Can be measured. Furthermore, the image processing device is acquired by imaging
Position and orientation of the image of the DUT within the
Calculate the dimensions regardless of the rotation angle from the rotation position)
If you can, simply place the DUT on a flat support surface.
It is easy to set the object to be measured on the dimension measuring device.
Can be easily performed and improve the efficiency of dimension measurement
Can be. (2) The parallel light is radiated from the light source through an orifice.
Is converted into parallel light by a lens system,
And at a plurality of positions in a direction perpendicular to the reflection surface.
The orifice and the laser while measuring the object to be measured.
Adjust the relative position in the optical axis direction with the
Predetermined conditions for measurement results at multiple locations
(If the parallelism of the parallel light is better than the set parallelism,
Satisfied, not satisfied if less than the set parallelism
Condition), the relative distance between the orifice and the lens system
Includes relative position adjustment step to end position adjustment.
The optical dimension measuring method described above (Claim 2). Example of lens system
For example, a single convex lens can be used.
Focus the line light at the focal point, or project it radially from the focal point.
Point light source to convert the
If provided at the focal point of the convex lens, parallel light can be obtained.
Therefore, the combination of the light source and the orifice
Source and place the point light source at the focal point of the lens system
Then, parallel light can be obtained. In this case,
In order to improve the accuracy, the parallelism of the parallel light should be improved.
Need to be formed in the orifice.
In addition to making the diameter of the through hole as small as possible,
Accurately determine the position of the orifice, that is, the axial position of the through hole.
It is effective to focus on the focal point of the lens system.
You. Then, when the parallelism of the parallel light is low, for example,
Place the DUT with the same dimensions in the direction perpendicular to the reflecting surface (lens system
Is obtained by changing the position (in the direction parallel to the optical axis of
The measured value changes, but the parallelism of the parallel light is high.
In this case, there is a property that the measured value does not change. Therefore,
Multiple DUTs with the same dimensions in a direction perpendicular to the reflective surface
The relative position between the orifice and the lens system while measuring at the position
And the measurements at those multiple locations are substantially
If they are the same, the relative position between the orifice and the lens system
When the adjustment of the position is completed, the through hole of the orifice
It will be positioned precisely at the focal point. this
In this case, the “predetermined condition” is changed to “the same size”.
Measurements at multiple locations on the DUT are substantially the same
Being ". In addition, the right angle to the reflection surface
The DUT at multiple locations in the direction
To do this, move the same workpiece to multiple
You can prepare multiple DUTs with the same dimensions and
Is fixedly positioned at each of a plurality of positions and measured.
Is also good. In the latter case, multiple DUTs are measured simultaneously.
It is also possible to specify. In addition, a relative position adjustment process was performed.
At this time, the DUT needs to be actually measured.
Products that are specially manufactured for relative position adjustment.
It may be what should be called a position adjusting gauge. (3) Outer dimension (or inner dimension) of the object to be measured
The direction of the reflecting surface is adjusted while measuring the
The outer dimension of the minimum value (or the inner dimension is the maximum value)
When the reflection surface orientation ends, the adjustment of the reflection surface direction ends.
Optical dimensions according to paragraph (1) or (2) including the adjustment step
Measurement method (Claim 3). Project parallel light onto a flat reflective surface
Then, the reflected light also becomes parallel light. And the dimensional measurement accuracy
To improve the parallelism between incident light and reflected light
Need to be able to
What is necessary is just to improve the perpendicularity to the surface. Meanwhile, incident light and reflection
As the perpendicularity to the surface increases, the outer dimension of the DUT increases.
Measured small and large inside dimension of penetrating opening
Measurement of the DUT
Adjust the direction of the reflective surface to minimize the outside dimension of the DUT
Value (or the maximum inner dimension)
When the adjustment of the direction is completed, the perpendicularity between the incident light and the reflecting surface
Can be the highest. In addition, reflection surface direction adjustment
During the implementation of the measurement,
Even one of the important products is manufactured exclusively for adjusting the reflective surface orientation.
It may be what is called a reflected surface orientation adjustment gauge. (4) One plane of the reflective surface, and the reflective surface is orthogonal to the optical axis
And parallel light from the reflective surface is focused at the focal point
Between the first lens system, the reflecting surface and the first lens system
A device for supporting the object to be measured at a position between
At a position opposite to the reflecting surface with respect to the first lens system.
And is inclined with respect to the optical axis of the first lens system,
Beam that has a reflective surface that transmits
With respect to the splitter and the reflecting surface of its beam splitter.
An aperture provided at a position symmetrical with the focal point of the first lens system
The orifice and the beam split
A light source provided on the side opposite to the
Focus on the focal point of the first lens system
Both convert the light passing through the beam splitter into parallel light
Parallel with the second lens system to be converted and the second lens system
Imaging to capture an image formed by light converted into light rays
Based on the sensor and the image acquired by the imaging sensor
To measure the dimension of the DUT in a direction parallel to the reflection surface.
Optical dimension measurement device including an image processing device
Item 4). Point light source composed of light source and orifice
The light emitted radially from the beam splitter
Is reflected toward the first lens system.
Focus and plane of the first lens system with respect to the reflecting surface of the splitter
Because of the symmetrical position, the first lens system has its own
It is the same as light emitted radially from the focal point.
The light is converted into parallel light by the lens system,
Hit the launch surface. Light reflected by reflecting surface and surface of DUT
The light reflected by the light enters the beam splitter, and a part of it
The light is returned to the point light source by the reflecting surface, but the rest is
After passing through the splitter to the second lens system,
Of the light reflected by the object to be measured
Those parallel to the optical axis of the lens system (perpendicular to the reflecting surface)
The light is converted into parallel light and enters the image sensor. Light source and
The point light source constituted by the orifice is actually
If you try to set it at the focal point of the
Light reflected from the object surface is blocked by the orifice and light source.
Object and its surroundings without being incident on the image sensor
Will not be obtained, but as in this embodiment.
Using a beam splitter to solve this problem
You can do it. The first and second lens systems are
Multiple lenses even if each is composed of one lens
May be configured. Also, for example, the second lens system
A reflective surface is provided between the
The light converted to parallel light is reflected by the reflective surface and
To the lens and focus on the first lens system.
A reflective surface is provided between the first lens system and the second lens system.
After these lights are reflected by the reflecting surface,
Or convert it to more parallel light.
You. The same is possible for the first lens system.
In this way, the direction of light can be changed arbitrarily by the reflective surface
In this case, the optical axis of the lens system also bends with light.
I think that. In the optical dimension measuring device of this aspect
In the following, the reflecting surface, the device to be measured, the first lens system,
The second lens system and the image sensor are arranged on a straight line.
It is not essential. Optical dimensions of this embodiment
According to the measuring device, the optical measuring method according to the above (1)
Can be implemented. (5) Phase in the optical axis direction between the orifice and the first lens system
Includes a relative position adjustment device that adjusts the relative position.
Optical dimension measuring device. The relative position adjustment device is
Orifice, including the knob screw,
Or adjust the position of the first lens system,
Electric motor that rotates the feed screw or nut (rotation
A step motor or servo motor whose angle can be controlled),
Actuators including actuators such as multilayer piezoelectric elements
The electronic control unit operates the eta according to the operation of the manual operation member.
To adjust the position of the orifice or first lens system.
It may be something. (6) The relative position adjusting device is operated based on an electric signal.
Of the optical axis of the orifice (or the first lens system)
Including a relative position adjustment actuator for adjusting the position
First, the optical dimension measuring device is provided with the image sensor,
An image processing device and the relative position adjusting actuator;
Control the relative position adjustment actuator to the orifice
(Or the first lens system) in the axial direction.
While the imaging sensor and the image processing device
Between the first lens system and the direction perpendicular to the reflection surface
Of the DUT at a plurality of different positions
And calculation, and the DUT at
Condition that the calculation results of all the image processing devices are predetermined.
Is satisfied, the relative position adjustment actuator
Finish changing the relative position of the lens and the first lens system in the optical axis direction.
Including the relative position adjustment control device
Scientific dimension measuring device. Relative position adjustment actuator is an example
For example, a multilayer piezoelectric element can be used as a drive source.
You. In the case of a laminated piezoelectric element, the
Changes in the dimensions of the orifice
Or if the position of the first lens system is changed,
Relative position of orifice and first lens system based on signal
Can be adjusted. Relative position adjustment control device
Is automatically activated whenever the optical dimensioning device is activated
You can do that, and the orifice
Position between the lens and the first lens system is completely automatic and appropriate.
The orifice and the
Take any precautions regarding the appropriateness of the relative position with respect to one lens system.
And the usability of the dimension measurement device is particularly improved.
I do. However, the operator operates the operation command operating member.
Relative position adjustment only when an operation command is input
It is also possible for the knot control to be activated. (7) Reflection surface direction adjusting device for adjusting the direction of the reflection surface
Optical type according to any one of the above items (4) to (6)
Dimension measuring device. The reflective surface orientation adjustment device uses a manual adjustment screw.
And the direction of the reflective surface is adjusted by manual operation of the adjusting screw.
Rotate the feed screw or nut
Electric motor (step motor with controllable rotation angle)
Actuators such as motors and servomotors) and multilayer piezoelectric elements
The actuator is manually operated by the electronic control unit.
Operate according to the operation of the working member and adjust the direction of the reflective surface
It may be something. (8) The reflection surface orientation adjusting device is configured to perform
A reflecting surface actuator for adjusting the direction of the reflecting surface;
And the optical dimension measuring device
, The image processing apparatus and the reflective surface actuator
And the direction of the reflecting surface is controlled by the reflecting surface actuator.
Image sensor and image processing device while changing the
The image and the calculation are repeated, and the
When the dimension of the measured object reaches the minimum value,
Reflector orientation adjustment device that terminates the orientation change of the reflector
The optical dimension measuring device according to the above mode (7), including a position control device.
The reflection surface actuator is, for example, two laminated piezoelectric elements.
May be used as a drive source. Has a reflective surface
Mirror at three vertices of a triangle parallel to the reflecting surface.
And the support member at one vertex is fixed in position,
Point support members are movable supported by the laminated piezoelectric elements, respectively.
It is a supporting member. For two stacked piezoelectric elements
The applied voltages are controlled independently of each other by a voltage controller.
For example, two movable support members can be fixed to one fixed support member.
Arbitrarily change the relative position (in the direction perpendicular to the reflective surface)
The direction of the reflective surface can be set based on the electrical signal.
Can be adjusted. Reflection surface direction adjustment device control device
Operates automatically whenever the optical dimensioning device is in operation.
And the operator
Need to be careful about the correct orientation of the reflective surface
Therefore, the usability of the dimension measuring device is particularly improved. I
However, the operator operates the operation command operation member, etc.
Only when an operation command is input.
It is also possible for the control device to be activated. (9) The image processing device captures an image using the image sensor.
Image data storage means for storing data of the obtained image,
A point pair consisting of two points separated by a certain distance
That stores data of a search template having a plurality of sets
Search template data storage means and search template
The search template in the data storage means
Superimpose on the screen where the image represented by the image data in the storage means exists
In this case, each pair of the plurality of point pairs is
When the difference between the optical characteristic values of the points is equal to or greater than the set state
One of the paired points is an image processing target of the object to be measured.
Inside the edge of the part, and the other outside the edge (in the background)
And the plurality of point pairs
If more than the set amount is in the conforming state,
The elephant part is a search target part that matches the search template
Any of paragraphs (4) to (8), including determination means
An optical dimension measuring device according to claim 1 (claim 5). The above d
When the image processing target part is the whole DUT,
Corresponding to the contour of the DUT, the image processing target is
If it is a character or recess on the surface,
Corresponding to the contours of the holes and recesses. Optical dimension measurement of this embodiment
When imaging is performed by the imaging sensor in the device
Usually, the imaging surface is decomposed into many pixels,
Image data is created for the image data storage means
Is stored. "Image represented by image data"
Is an image obtained based on the data, in units of pixels,
An image in which optical characteristic values are obtained for each pixel may be used, or
Is not a unit of pixel, and the optical characteristic value is
The obtained image may be used. One example of the former is a large number of image sensors
And generates electrical signals according to the light receiving state of each image sensor
Electrical signal for each image sensor obtained by the imaging sensor
The image is an image considered as a set of signals, and the image is an image sensor
Is an image physically formed on the imaging surface where
It can be said. In this sense, this image is called a physical image
Screen on which the physical image exists (the
) Is referred to as a physical screen. Physical image data
Indicates the electrical signal data for each image sensor.
Stored in the storage means in association with the
And can be reproduced. The image data representing the physical image is
It actually exists, and in that sense, the physical image is
It can also be referred to as a real image in comparison with the imaginary image,
A screen with a real image can be called a real screen.
You. The image data representing the real image is the electrical data for each image sensor.
Analog data or digital data representing the magnitude of the signal itself
Data, for example, represented by 256 discrete values.
Multi-stage digital data (referred to as grayscale data)
Whether the electric signal of each image sensor exceeds the threshold
May be binarized data. Pixel
Image where the optical characteristic value is obtained at any point
One example is the data of the electrical signal of each image sensor on the physical screen.
Is assumed to represent the optical characteristic value of the central point of each image sensor.
And assuming a curved surface that satisfies the optical characteristic values of these many points
, The continuous optical characteristic value that defines the curved surface
Is an image considered as a set of. Image data of this image
Data is stored as, for example, data of an expression representing the above-mentioned curved surface
This image data is also a kind of real image
There will be. On the other hand, the data of the above
Instead of asking for it, an arbitrary point on the screen is specified.
When each point is specified the optical property value of that point only
It is also possible to calculate by calculation every time. In this case
Is an image that does not actually exist but is assumed to exist
Is called a virtual image, and a virtual image exists.
The screen is referred to as a virtual screen. Search template
Data is displayed on the screen of the two points that make up the point pair.
Data that defines the position in the search
Over the screen where the image represented by the image data exists. ''
If the screen is a physical screen, the search template data
The image data of the pixel at each position specified by
Data from the data storage means to obtain the optical characteristic values.
is there. If the screen is a virtual screen, the search template
Assuming that the rate is on the virtual screen,
Optical characteristics of each point on the virtual screen specified by the
That is, the gender value is calculated from the physical image data.
The physical image data in this case is an electric signal for each image sensor.
Analog or digital data representing the size of the
Data or gradation data.
There is no point in data. The image processing target is the entire DUT
In some cases, the reflective surface should correspond to the background (outside the edge)
And the image processing target is formed on the surface of the DUT.
If it is a character or a concave part, the DUT surrounding it
The surface will correspond to the background. In any case,
Image data corresponding to the image processing target part and image data corresponding to the background
There is a difference from the image data. Conversely speaking, with the background
If there is no difference between the two,
Unable to obtain information about the target part. That
Therefore, one point of the point pair is
Inside the edge and the other point is outside the edge (in the background)
In other words, in other words, the image corresponding to one point of the point pair
The image data is data representing an image processing target portion, and the other
If the data corresponding to the point is data representing the background,
State of the optical characteristic values of the two points that make up the pair
Should be equal to or greater than the setting status, and the difference status is the setting status.
If the number (or rate) of point pairs
If the number is less than the set number (or set rate)
Determines that the image processing target part is the search target part
be able to. Also, search for such a pair of point pairs.
The image of the image processing target on the screen.
Can be “Optical characteristic value” refers to, for example,
Degree, hue, etc., and “above the set state” means luminance or hue.
Is greater than or equal to the set value, or the ratio of luminance, hue, etc.
Is greater than or equal to the set value. Search template
When determining the optical characteristic value over the physical screen,
Data is analog data or gradation data (hereinafter referred to as gradation data, etc.)
) Or binarized data. Gradation day
Data, one value of the two points of the point pair and the other
The difference between the two points is greater than or equal to the set value, or
Difference in optical characteristic values when the value ratio is greater than or equal to the set ratio
The state is higher than the set state. With binary data
If the value of one of the two points of the point pair is 0,
If the other value is 1, the optical property value difference state is set.
It will be more than the fixed state. The position of the image processing target
If it is almost constant, the search template
Can be superimposed on the screen,
When at least one of the position and the rotation angle is indeterminate
Means for determining the position and rotation angle of the search template
Whether at least one of the judgment results is affirmative or not.
Repeat the judgment while changing until the specified change limit is reached
It is assumed that. If the search template changes,
Multiple search templates with different positions and rotation angles
Standard search of standard position and standard rotation angle even if prepared
Only template is prepared, general position and rotation angle
Search template is created by coordinate transformation as needed
May be done. "Change limit" means, for example,
If the search area to search for the elephant is set,
If you change the position of the search template, the search template
Has reached a position beyond the search area,
Change the position of the search template a predetermined number of times
It was done. Advantages of the optical dimension measuring device of this embodiment
One of the suitable applications is dimensional inspection of three-dimensional objects to be measured.
It is. In dimension inspection, the object to be measured (image processing target
Section) dimensions are almost constant, so the search template
It is suitable for use. Measures the DUT support device
It is assumed that an object is positioned and supported at a substantially constant position.
For example, the search template can be superimposed on the DUT.
It is easy to perform inspections especially efficiently
You. Another suitable field of use of the optical dimension measuring device of this embodiment
Is an electric circuit assembly line. For example, electrical component mounting
In the device, it is attached to the target material such as a printed circuit board.
Electrical components and fiducial marks provided on printed circuit boards
Is the target of image processing, and in the screen printing machine
Indicates fiducial marks provided on the screen, through-holes for printing, etc.
Is an image processing target portion. In addition, the image processing target portion is
Not only the outline of the whole object but also the part is set as the image processing target part
Sometimes. For example, for a square chip, the chip itself
Are image processing target parts, but have leads, solder bumps, etc.
Electrical components, such as leads and solder bumps
In addition to the main body having
And one solder bump may be targeted for image processing.
is there. Leads, etc. located outside the contour of the main body, as well as inside
Of other members such as leads and solder bumps
Objects located inside may be image processing targets
It is. In the latter case, the search template is
The contour of the object located inside the contour is created as the search target.
Along with the physical screen or virtual screen
Inside the image of the outline of the whole object
The position where the physical or virtual image of the object is to be formed
And the image processing target portion is searched. The above explanation
As is clear from this figure, according to this aspect, the image data and
The presence or absence of a search target and image processing
You can know whether the target part is the search target part
You. Of the optical characteristic values of the two points that make up the point pair
By calculating and comparing the number of point pairs,
Make decisions easily and quickly
Optical dimension measuring device equipped with an image processing device
Can be (10) The image processing device captures an image using the imaging sensor.
Image data storage means for storing data of an image formed
And two or more seek lines connecting two points in a straight line
Measurement template for storing the data of the measurement template
Plate data storage means and its measurement template data
The measurement template of the image data storage means
Superimpose on the screen where the image represented by the image data of the column exists, and
The object to be measured on each of a plurality of seek lines
Edge point for calculating the coordinates of the edge point of the image processing target part of
Any one of the above items (4) to (9) including the coordinate calculation means
An optical dimension measuring device according to claim 6 (claim 6). Light of this mode
"Image data" in the image processing device of the scientific dimension measuring device
Screen on which the image represented by
As in the image processing device of the dimension measurement device, the physical image
Screen, real screen, virtual screen
No. "Overlay the measurement template on the screen."
By using the measurement template data on the physical screen
Stores image data corresponding to specified pixels as image data
Means to read from the
Image data at points specified by the
Property value) based on the image data of the physical screen
It is. Differences in optical characteristic values between the image processing target and the background
Changes in the optical characteristic value at the edge point position
The gradient is at its maximum. Therefore, every pixel on the physical screen
By obtaining the change in the obtained optical characteristic value,
Also, to determine the change gradient of the optical characteristic value on a virtual screen
Can determine the edge point. On the physical screen
In this case, the edge point is determined in pixel units.
Above is an edge at any point on the seek line
Points are required, and the resolution of the image processing is increased as necessary.
Can be Note that the search template and measurement template
In an aspect in which both the rate and the rate are adopted, the determination means
The part determined to be a search target by
The coordinates of the edge point are calculated using the fixed template.
According to this aspect, obtaining the edge point of the image processing target portion
Can be. Thereby, for example, the shape of the image processing target part
If you know in advance, relatively few seek lines
Calculate the dimensions, position, rotation angle, etc. of the image processing target part by setting
Can be issued. In addition, the shape of the image processing target
Even if you do not know, increase the number of seek lines
Can be obtained, the set of edge points
Shape, size, position, rotation angle, etc.
Will be possible. (11) The image processing apparatus further includes the edge point coordinates
Based on a plurality of edge point coordinates calculated by the calculating means
To confirm that the image processing target part is the search target part.
Optical dimensions described in paragraph (9) or (10)
Method measuring device. In this aspect, the image processing target portion is searched.
It is confirmed that it is the target part. For example, image processing target
There are a plurality of types of image processing units.
The search target may be the search target.
Is not sure whether it is the search target part
In the meantime, the confirmation means and the edge point coordinate calculation means
The image processing target is truly searched based on the
It is confirmed that it is a search target part. According to this aspect
Check if the image processing target part is the search target part
Compared to the judgment using only the search template.
As a result, the effect of improving the reliability of the determination is obtained. Also,
If further image processing is performed after the judgment, search
Useless processing is performed for non-target parts
Can be avoided. (12) The confirmation means is provided on the seek line.
The edge point of the image processing target portion and the midpoint of the seek line
Midpoint reference type checking means for performing the checking based on the deviation of
The optical dimension measuring apparatus according to item (11), including: In this aspect
The edge of the image processing target on the seek line
Image processing based on the deviation between the point and the midpoint of the seek line
It is confirmed that the target part is the search target part. example
For example, if the search target is a rectangular part,
Same number of seek lines of the same length for each of the two sides
Set the position of these seek lines if the search target
If there is no deviation between the
Where the midpoint of the Klein matches the edge point of the search target
If the image processing target part is
The image processing target section,
Of the deviation in consideration of the direction between the
If the sum is 0, the image processing target part is the search target part.
It can be confirmed that there is. According to this aspect
If the image processing target is a search target,
The effect that becomes easy or the effect that the reliability of judgment improves
Is obtained. (13) The image processing apparatus further includes the edge point coordinates.
Based on a plurality of edge point coordinates calculated by the calculating means
In addition to the dimensions of the image processing target part,
(10) to include the target part calculation means for calculating at least one
(12) The optical dimension measuring device according to any one of the above (12). Book
In the aspect, in addition to the dimensions of the image processing target portion, the position and rotation
At least one of the roll angles is based on the edge point coordinates.
Is calculated. The required position and rotation angle are calculated.
It is done. The number of edge point coordinates is
If there are many enough to specify the shape, only the coordinates of the edge point
Of the size, position and rotation angle of the image processing target
Can also be calculated. Small number of edge point coordinates
Even in the case, for example, data indicating the type of the image processing target portion
Use of auxiliary data such as
Can be calculated, and the shape of the image processing target part can be calculated.
However, it is decided to be one type, for example, rectangle, circle, etc.
If there is no auxiliary data, the size of the image processing target part
Can be calculated. According to this aspect, the image processing
In addition to the dimensions of the target part, at least one of the position and the rotation angle
As a result, for example, even if the shape is the same, the dimensions are
Identification of different image processing target parts, positioning of image processing target parts
Of pass / fail judgment, calculation of displacement correction amount, and rotation angle determination
It is possible to perform pass / fail judgments and calculate the amount of rotation angle deviation correction.
Wear. (14) The target part calculation means is located on the seek line.
Between the edge point of the image processing target portion and the seek line
Based on the distance from the midpoint, the dimensions and position of the image processing target part
Midpoint reference for calculating at least one of the position and rotation angle
Item (13) is characterized in that it includes a pattern object part calculating means.
Optical dimension measuring device. Thus, the dimensions of the image processing target
Method, etc., the edge point of the image processing target part and the middle point of the seek
If the calculation is based on the distance between
Smaller on average, less error and better accuracy
An operation result is obtained. (15) The image processing apparatus further linearly converts two points.
Are connected to the image processing pair.
Based on the specified data of the image processing target
Includes automatic setting of seek line to set dynamically (10)
The optical dimension measuring device according to any one of paragraph (14).
Place. In this embodiment, the automatic seek line setting means
The seek line is automatically set. Its the simplest one
An example is an image having a determination unit and an edge point coordinate calculation unit.
In the image processing apparatus, the image processing target portion is a search template.
Search template determined to be a search target part that matches the
A straight line connecting the two points that make up the rate point pair
This is the case where the seek line is automatically set. In this case
Means that the search template data is
Will also serve as No search template data
Even though data indicating the shape and dimensions of the image processing target is supplied
Or one type of image processing target
And the deviation of the position and rotation angle is relatively small.
Limited and need to measure position and rotation angle deviation
In some cases, define the shape and dimensions of the image processing target
Automatically set seek line based on data
Is possible. In this case, the shape and size of the image processing target
That the data that defines
And Further, calculated by the edge point coordinate calculating means.
Automatically seek line based on the coordinates of the edge points
And use it as a second measurement template
It is also possible to calculate the edge point.
The coordinates of the edge point calculated by the
This is the image processing target section definition data. Second measurement
Determine the number of seek lines in the template
If you set more than the number of seek lines on the plate,
The coordinates of the edge points are more accurate and large,
The rotation angle and the like are more accurately measured. Thus, sea
Klein is automatically set by the seek line automatic setting means.
The optical dimension measurement system
The effect of requiring a small amount of work for the computer is obtained. (16) The seeker by the seek line automatic setting means
Automatic setting of the
Calculating edge point coordinates by edge point coordinate calculating means;
Repetition of repeating the calculation by the target part calculation means multiple times
(15) The optical dimension measuring device according to the above (15), comprising a measuring means. True nature
In the second and subsequent seek line automatic setting
Is calculated based on the coordinates of the edge point calculated immediately before.
The expected edge point position (eg, midpoint) on the
To the position expected to match the edge point position of
In is set automatically. As a result, the
The expected edge point position on the seek line and the image processing target
The error from the actual edge point of the object becomes smaller,
The coordinates can be obtained with high accuracy. (17) The image sensor includes a number of image sensors,
Generates electrical signals according to the light receiving state of the image sensor
Wherein the image data storage means is provided for each of the imaging devices.
The electrical signal data is recorded in association with the position of each image sensor.
And the image processing apparatus further comprises:
Physics formed by image data in the image data storage means
Specify an arbitrary point on the virtual screen that is assumed to correspond to the screen
Point designation means to perform
Specified based on the optical property value data on the physical screen
Virtual point data calculating means for calculating the optical characteristic value of the specified point
The optical device according to any one of (9) to (16), including:
Type dimension measuring device (Claim 7). In this embodiment, the virtual
The optical characteristic value of any point on the screen can be
It is calculated every time a point is specified. Virtual screens have countless points
Of which are specified by the point specification means
The optical characteristic values of only necessary points are calculated. This
So that only the necessary points are calculated
The effect of reducing the time required for the entire image processing
Is obtained. Also, the calculated optical characteristic value is stored.
The storage capacity of the optical characteristic value storage means can be small. (18) The edge point coordinate calculating means is configured to
Acquire the optical characteristic values of multiple division points set on the
Dividing point characteristic value acquiring means, and the dividing point characteristic value acquiring means
Based on the optical characteristic values of the division points obtained by
The sharpest change point of the optical characteristic value on the Klein
Edge point searching means for searching as an edge point (10)
Or the optical dimension measuring device according to any one of (17) to (17).
(Claim 8). In this embodiment, the seek line is heavy.
If the screen to be swept is a physical screen, the optical characteristics
The gender value represents the image data of the pixel corresponding to the position of the division point.
Obtained by reading from the image data storage means,
Edge points are searched based on these optical characteristic values. D
The edge point is searched in pixel units. Seek line overlapped
If the screen to be displayed is a virtual screen, the division point
Settings regardless of the pixel size of the physical screen.
The optical characteristic value of the division point is
It is calculated based on characteristic value data (image data).
Even if the division point is a designated point designated by the point designation means
Alternatively, points other than the designated point may be used. For example, point specification
When the optical characteristic value is calculated for each point specified by the means
Both are on the seek line from these multiple optical characteristic values.
Obtain an equation that represents the change in the optical characteristic value of
Set the division point separately from the specified point
May be calculated to find an edge point. This aspect
In the search of the edge point
And only a limited number of split points
Edge points are determined based on the characteristic values,
The edge point can be determined quickly. (19) The pitch of the plurality of division points is equal to the pitch of the image sensor.
Optical dimension measurement device (item (18)
Claim 9). In this embodiment, the division points on the virtual screen are captured.
The pitch is set smaller than the pitch of the image element,
Properties are based on the optical property data on the physical screen.
Is calculated. Change of optical characteristic value on seek line
Are searched at a finer pitch, and the resolution of image processing is higher.
It becomes. Limited by the size of the image sensor in the image sensor
High-resolution image processing
And the accuracy of dimension measurement can be improved.
You. (20) The optics according to any one of (4) to (19).
Orifice and first lens system
This method adjusts the relative position of the
The reflection between the reflection surface and the first lens system.
Measured at multiple different positions in a direction perpendicular to the plane
The orifice (or the first
Adjust the position of the lens system
When the measurement result satisfies the predetermined conditions,
An orientation that completes the relative position adjustment between the fiss and the first lens system
Fiss / first lens system relative position adjustment method. (21) The measurement at the plurality of positions is performed by measuring the same size
Measurement of a measured object, wherein the predetermined condition is a plurality
Measurement results at the location
Orifice / first lens system relative position according to item (20)
Adjustment method. (22) Simultaneous measurement at the plurality of positions (21)
Orifice / first lens system relative position adjustment method
Law. (23) When the measurements at the plurality of positions are
Measurement of the object to be measured
The measurement error at multiple locations is substantially the same
Orifice / first lens according to item (20)
System relative position adjustment method. As mentioned earlier, the orifice and the first
Improper relative position in the optical axis direction with the lens system
For example, the parallelism of the parallel light applied to the DUT and the reflective surface
And a dimensional error occurs. Dimensional errors are another reason
However, these dimensional errors change the measurement position.
Many things do not change even if the
The dimensional error due to poor quality changes with the measurement position.
Measurement errors at multiple locations
If they are the same, the parallelism of the parallel light will be good and the orifice
The relative position between the lens and the first lens system is considered to be appropriate.
be able to. As described above, the parallel light and the reflection surface
Dimensional errors also occur due to poor squareness of
Since the error also changes according to the change of the measurement position,
Improper relative position between the lens and the first lens system,
If both appropriate and simultaneous occur, dimensional error
It is not possible to identify which is the cause. I
However, as described in (3) above,
First of all, inappropriateness can be eliminated in other ways.
After the elimination, the orifice and the first
By adjusting the relative position with respect to the orifice, the orifice and
Both the position relative to the lens system and the orientation of the reflective surface
Can be eliminated. (24) The optics according to any one of (4) to (19).
How to adjust the direction of the reflective surface in a type dimension measuring device
A method for supporting an object to be measured by the device for supporting an object to be measured.
Of the outer (or inner) dimension of the DUT
Adjust the direction of the reflective surface while performing the measurement, the
The outer dimension is substantially the smallest value (or the inner dimension
Is substantially the largest value).
When you adjust the orientation of the reflective surface, the orientation of the reflective surface ends.
Method. As described above, there is no (20)
(23) relative position of the orifice and the first lens system
It can be adopted in conjunction with the position adjustment method. (25) Dimensions specified in any one of paragraphs (1) to (3)
Dimension measurement process by the measurement method and the dimension measurement process
The pass / fail of the DUT is determined based on the obtained dimensions.
And a determining step of determining. (26) The determination in the determining step is performed in the dimension measuring step.
Performed by comparing the acquired dimensions with the reference dimensions (25)
Inspection method described in section. Judgment is, for example, the perfect circle of the DUT
Degrees, squareness, straightness, etc.
Existence of scratches or more and dimensional variation among multiple DUTs
Etc., but the most common decision is
It is a judgment of

【0004】[0004]

【発明の実施の形態】以下、本発明を立体形状の被検査
物の寸法検査装置に適用した場合の一実施形態を図面に
基づいて説明する。本寸法検査装置は、図1〜3に示す
撮像装置10と、図4に示す画像処理装置12,モニタ
テレビ14および入力装置16とを含んでいる。入力装
置16は、キーボード18,マウス20,フットスイッ
チ22等を含んでいる。画像処理装置12は、入力装置
16から入力される情報,指令等に応じて作動し、撮像
装置10により撮像された画像を処理して被検査物の寸
法を測定し、その測定寸法を基準寸法と比較して合否の
判定を行う。撮像された画像,測定された寸法および判
定結果等は表示装置としてのモニタテレビ14に表示さ
れる。さらに、モニタテレビの表示内容を記録媒体とし
ての記録用紙に印刷する印刷装置を画像処理装置12に
接続することも可能である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which the present invention is applied to a dimension inspection apparatus for a three-dimensional inspection object will be described below with reference to the drawings. This dimensional inspection apparatus includes an imaging device 10 shown in FIGS. 1 to 3, an image processing device 12, a monitor television 14, and an input device 16 shown in FIG. 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 response to information, instructions, and the like input from the input device 16, processes an image captured by the imaging device 10, measures a dimension of the inspection object, and uses the measured dimension as a reference dimension. And a pass / fail decision is made. The captured image, the measured dimensions, the determination result, and the like are displayed on a monitor television 14 as a display device. Further, it is also possible to connect a printing device for printing the display contents of the monitor television on recording paper as a recording medium to the image processing device 12.

【0005】画像処理装置12の作動に必要な情報の入
力はキーボード18およびマウス20を使用して行われ
るが、作動開始指令等の単純な指令はキーボード18,
マウス20およびフットスイッチ22のいずれからも入
力可能であり、特に多数の被検査物の検査を連続的に行
う場合には、フットスイッチ22により作動開始指令を
入力すれば、両手を被検査物の交換等別の作業に使用す
ることができ、便利である。さらに、検査の結果、被検
査物が不合格であった場合には、画像処置装置に内蔵の
ブザーが作動するようになっており、オペレータはモニ
タテレビ14を常時注視している必要がなく、本寸法検
査装置はこの点でも使い勝手のよいものとなっている。
[0005] Input of information necessary for the operation of the image processing apparatus 12 is performed by using the keyboard 18 and the mouse 20.
The input can be made from either the mouse 20 or the foot switch 22. In particular, in the case of continuously inspecting a large number of inspected objects, if an operation start command is input by the foot switch 22, both hands can be used for inspecting the inspected object. It can be used for other work such as replacement, which is convenient. Further, as a result of the inspection, when the inspection object is rejected, a buzzer built in the image processing apparatus is activated, and the operator does not need to watch the monitor television 14 at all times, This dimension inspection apparatus is also convenient in this respect.

【0006】次に、撮像装置10について説明する。図
1〜3において、30は撮像装置本体であり、ベース3
2,コラム34およびヘッド36を備えている。コラム
34はベース32から上方に延び、上端部においてヘッ
ド36を支持し、中間部においてレンズブラケット38
を支持している。ヘッド36は、コラム34の上端から
水平に延び出たアーム40と、そのアーム40の上に固
定されたカメラブラケット42とを備えている。コラム
34の前面には案内部が設けられ、この案内部にレンズ
ブラケット38の被案内部が上下方向に案内されるよう
になっている。案内部は、横断面形状が矩形で、上下方
向に延びる案内溝46により構成され、その案内溝46
にレンズブラケット38の後面に被案内部として設けら
れた嵌合突部48が摺動可能に嵌合されているのであ
る。さらに、アーム40とレンズブラケット38とは調
節ねじ50により連結されている。調節ねじ50は、第
一ねじ部52,第二ねじ部54および操作部56を有
し、第一ねじ部52と第二ねじ部54とがそれぞれアー
ム40とレンズブラケット38とに形成されたねじ穴に
螺合されている。第一ねじ部52と第二ねじ部54とは
ねじの向きとピッチとの少なくとも一方を異にしてお
り、したがって、操作部56を指で回転させることによ
りレンズブラケット38を昇降させ、アーム40および
カメラブラケット42に対する相対的位置を調節するこ
とができる。この位置調節後、レンズブラケット38は
固定手段としてのボルト58によりコラム34に固定さ
れる。なお、レンズブラケット38に形成されたボルト
穴は、上下方向に長い長穴60とされており、ボルト5
8が僅かに緩められた状態では、レンズブラケット38
の上記昇降を許容する。
Next, the imaging device 10 will be described. 1 to 3, reference numeral 30 denotes an imaging device main body,
2, a column 34 and a head 36. The column 34 extends upward from the base 32 and supports the head 36 at an upper end portion, and a lens bracket 38 at an intermediate portion.
I support. The head 36 includes an arm 40 extending horizontally from the upper end of the column 34, and a camera bracket 42 fixed on the arm 40. A guide portion is provided on the front surface of the column 34, and the guided portion of the lens bracket 38 is vertically guided by the guide portion. The guide portion is formed of a guide groove 46 having a rectangular cross section and extending in the vertical direction.
A fitting projection 48 provided as a guided portion on the rear surface of the lens bracket 38 is slidably fitted. Further, the arm 40 and the lens bracket 38 are connected by an adjusting screw 50. The adjusting screw 50 has a first screw portion 52, a second screw portion 54, and an operation portion 56, and the first screw portion 52 and the second screw portion 54 are formed on the arm 40 and the lens bracket 38, respectively. It is screwed into the hole. The first screw portion 52 and the second screw portion 54 are different in at least one of the screw direction and the pitch. Therefore, by rotating the operation portion 56 with a finger, the lens bracket 38 is raised and lowered, and the arm 40 and the The position relative to the camera bracket 42 can be adjusted. After this position adjustment, the lens bracket 38 is fixed to the column 34 by bolts 58 as fixing means. The bolt hole formed in the lens bracket 38 is a long hole 60 that is long in the vertical direction.
8 is slightly loosened, the lens bracket 38
Is allowed to rise and fall.

【0007】ベース32上には、鏡支持板64が水平に
配設されている。鏡支持板64は、概して矩形板状の部
材であるが、その中央の点を中心とする一円周上に等角
度間隔で配設された3本の調節ねじ66を介してベース
32に支持されており、調節ねじ66の調節により、ベ
ース32に対する相対的な傾きを調節し得るようにされ
ている。鏡支持板64の上面には平板状の鏡68が固定
されており、その鏡68の反射面70上には、平板状の
ガラス板から成る被検査物支持板72が載置されてい
る。反射面70は入射する光を100近く反射する全反
射面であり、平面度の高いものとされている。
On the base 32, a mirror support plate 64 is horizontally disposed. The mirror support plate 64 is a generally rectangular plate-like member, and is supported on the base 32 via three adjustment screws 66 arranged at equal angular intervals on a circle around the center point. The inclination relative to the base 32 can be adjusted by adjusting the adjustment screw 66. A flat mirror 68 is fixed on the upper surface of the mirror support plate 64, and an inspection object support plate 72 made of a flat glass plate is mounted on the reflection surface 70 of the mirror 68. The reflection surface 70 is a total reflection surface that reflects nearly 100 incident light, and has high flatness.

【0008】前記カメラブラケット42にはCCDカメ
ラ76が保持されている。CCDカメラ76は、固体イ
メージセンサの一種であるCCD(電荷結合素子)80
と結象レンズ82(図5参照)とを備え、カメラブラケ
ット42に対して上下方向位置調節可能に取り付けられ
ている。操作部材84を回転させることによって、図示
しない昇降機構を介してCCDカメラ76を昇降させ得
るようにされているのである。CCD80は、一平面上
に多数の微小な撮像素子が配列されたものであり、各撮
像素子の受光状態に応じた電気信号を発生させる。
The camera bracket 42 holds a CCD camera 76. The CCD camera 76 is a CCD (Charge Coupled Device) 80 which is a kind of solid-state image sensor.
And an image forming lens 82 (see FIG. 5), and are attached to the camera bracket 42 so that the position in the vertical direction can be adjusted. By rotating the operation member 84, the CCD camera 76 can be moved up and down via a lifting mechanism (not shown). The CCD 80 has a large number of minute imaging elements arranged on one plane, and generates an electric signal according to a light receiving state of each imaging element.

【0009】前記アーム40内には、図2に示すよう
に、ビームスプリッタ90が配設されている。ビームス
プリッタ90は、上記CCDカメラ76の光軸に対して
45度傾斜した姿勢で配設されており、このビームスプ
リッタ90に、照明装置92が水平方向から対向させら
れている。照明装置92は、オリフィス94,光ファイ
バ96および光源としてのハロゲンランプ98を備え、
ハロゲンランプ98から放射された光が光ファイバ96
によりアーム40に固定されたオリフィス94に導かれ
るようになっている。オリフィス94は先端に微小な透
孔100を備え、この透孔100からビームスプリッタ
90に向かって光を放射状に投光する。なお、光ファイ
バ96により導かれた光を透孔100に集光するため
に、光ファイバ96と透孔100との間にレンズを設け
ることが望ましい。
A beam splitter 90 is provided in the arm 40 as shown in FIG. The beam splitter 90 is disposed at an angle of 45 degrees with respect to the optical axis of the CCD camera 76, and an illuminating device 92 faces the beam splitter 90 in the horizontal direction. The lighting device 92 includes an orifice 94, an optical fiber 96, and a halogen lamp 98 as a light source.
The light emitted from the halogen lamp 98 is
Thereby, it is guided to the orifice 94 fixed to the arm 40. The orifice 94 has a small through hole 100 at the tip, and emits light radially from the through hole 100 toward the beam splitter 90. Note that it is desirable to provide a lens between the optical fiber 96 and the through hole 100 in order to condense the light guided by the optical fiber 96 into the through hole 100.

【0010】前記レンズブラケット38は、下端に水平
の延び出たレンズ保持部102を備えている。レンズ保
持部102には、円形の開口104が形成されるととも
に、その開口の上端部にざぐり穴106が形成されてお
り、そのざぐり穴106に対物レンズ108が嵌合さ
れ、レンズカバー110により離脱を防止されている。
The lens bracket 38 has a horizontally extending lens holding portion 102 at the lower end. A circular opening 104 is formed in the lens holding portion 102, and a counterbore 106 is formed at the upper end of the opening. Has been prevented.

【0011】以上説明した、CCD80,結像レンズ8
2,ビームスプリッタ90,対物レンズ108および鏡
68は、図5に示すように、互いに同軸に配置されてい
る。また、対物レンズ108の焦点と結像レンズ82の
焦点とが一致し、かつ、それら一致した焦点Oと、前記
オリフィス94の透孔98とが、ビームスプリッタ90
の反射面112に対して面対称の相対位置となるよう
に、結像レンズ82,ビームスプリッタ90および対物
レンズ108の位置が決定されている。また、鏡68の
反射面70は対物レンズ108から焦点距離f1 だけ隔
たった位置に、対物レンズ108の光軸と直交する向き
で配設され、CCD80の撮像面は結像レンズ82から
焦点距離f2 だけ隔たった位置に、結像レンズ82の光
軸と直交する向きで配設されている。なお、上記焦点O
の位置に透孔116を有するオリフィス118が設けら
れ、反射面70等により反射された平行光が対物レンズ
108により集光された光のみが結像レンズ82に入射
するようにされているが、本撮像装置10の周囲が十分
に暗い場合には、オリフィス118を省略することも可
能である。
The above-described CCD 80 and imaging lens 8
2, the beam splitter 90, the objective lens 108 and the mirror 68 are arranged coaxially with each other, as shown in FIG. The focal point of the objective lens 108 and the focal point of the imaging lens 82 coincide with each other, and the coincident focal point O and the through-hole 98 of the orifice 94 form a beam splitter 90.
The positions of the imaging lens 82, the beam splitter 90, and the objective lens 108 are determined so as to be plane-symmetric relative positions with respect to the reflection surface 112. The reflecting surface 70 of the mirror 68 is disposed at a position separated from the objective lens 108 by a focal length f 1 in a direction orthogonal to the optical axis of the objective lens 108. It is arranged at a position separated by f 2 in a direction orthogonal to the optical axis of the imaging lens 82. Note that the focus O
An orifice 118 having a through-hole 116 is provided at the position of. The parallel light reflected by the reflection surface 70 and the like is such that only the light condensed by the objective lens 108 is incident on the imaging lens 82. When the periphery of the image pickup device 10 is sufficiently dark, the orifice 118 can be omitted.

【0012】以上のように構成された撮像装置10にお
いて、被検査物122の検査を行う場合には、被検査物
122を被検査物支持板72上に載置し、照明装置92
により照明する。点光源としての透孔100から放射状
に投光された光の一部はビームスプリッタ90を通過す
るが、残りは反射面112により反射され、対物レンズ
108に向かう。透孔100は反射面112に対して焦
点Oと面対称の位置にあるため、透孔100からの光は
あたかも焦点Oから出た光のように対物レンズ108に
入射し、対物レンズ108の光軸に平行な平行光に変換
されて被検査物122および反射面70に向かう。被検
査物122の表面に当たった光はこの表面により反射さ
れるが、その反射光のうち対物レンズ108の光軸に平
行な成分は対物レンズ108により焦点Oへ集光され
る。被検査物122の周囲を通過した光は反射面70に
より反射されるが、反射面70は対物レンズ108の光
軸に直角であるため、反射面70で反射された光は入射
時と同じ経路をたどって対物レンズ108の光軸に平行
に被検査物122の周囲を通過し、対物レンズ108に
より焦点Oに向かって集光される。この光の一部はビー
ムスプリッタ90の反射面112により照明装置92に
向かって戻されるが、残りはビームスプリッタ90およ
び焦点O(オリフィス118)を通過して結像レンズ8
2に入射し、結像レンズ82の光軸に平行な平行光に変
換される。この平行光はCCD80の撮像面に入射し、
撮像面に被検査物122の像と反射面の像とから成る画
像を形成する。
In the imaging device 10 configured as described above, when inspecting the inspection object 122, the inspection object 122 is placed on the inspection object support plate 72, and the illumination device 92 is mounted.
To illuminate. A part of the light radially projected from the through hole 100 as a point light source passes through the beam splitter 90, but the rest is reflected by the reflection surface 112 and goes to the objective lens 108. Since the through-hole 100 is located at a position symmetrical with respect to the focal point O with respect to the reflecting surface 112, the light from the through-hole 100 enters the objective lens 108 as if it came out of the focal point O, and the light from the objective lens 108 The light is converted into parallel light parallel to the axis and travels toward the inspection object 122 and the reflection surface 70. Light that has hit the surface of the inspection object 122 is reflected by this surface. Of the reflected light, a component parallel to the optical axis of the objective lens 108 is collected by the objective lens 108 to the focal point O. The light that has passed around the object to be inspected 122 is reflected by the reflection surface 70, but since the reflection surface 70 is perpendicular to the optical axis of the objective lens 108, the light reflected by the reflection surface 70 travels in the same path as that at the time of incidence. Then, the light passes through the periphery of the test object 122 in parallel with the optical axis of the objective lens 108, and is converged toward the focal point O by the objective lens 108. A part of this light is returned toward the illumination device 92 by the reflecting surface 112 of the beam splitter 90, but the rest passes through the beam splitter 90 and the focal point O (orifice 118) and forms the imaging lens 8.
2 and is converted into parallel light parallel to the optical axis of the imaging lens 82. This parallel light enters the imaging surface of the CCD 80,
An image including an image of the inspection object 122 and an image of the reflection surface is formed on the imaging surface.

【0013】この画像は、被検査物122の表面と反射
面70とからの対物レンズ108の光軸に平行な光によ
って形成されるため、透視図法ないし投影図法で描かれ
た図面と同じ画像になる。図58に示すように、通常の
光学系124を通して撮像センサ125により被検査物
122を撮像した場合には、被検査物122の光学系1
24から遠い部分の画像が、近い部分の画像に比較して
小さく撮像されてしまう。もし、対物レンズから遠い部
分が二点鎖線で示すように、光学系からの距離が他の部
分と同じ位置にあれば、もっと大きな画像として取得さ
れるのに対し、小さく撮像されてしまうのである。この
問題は、被検査物122の光学系124に対向する面が
光学系124の光軸に直角な一平面でない限り発生し、
また、一平面であっても、その一平面の位置が一定しな
い限り発生し、三次元形状の被検査物の寸法測定を不可
能にする。それに対し、本撮像装置10によればこの問
題が解消され、三次元形状の被検査物122であっても
透視図法ないし投影図法で描かれた図面と同じ画像が取
得されるため、この画像に基づいて寸法を求めれば、透
視図法ないし投影図法上の寸法を取得することができ
る。
Since this image is formed by light parallel to the optical axis of the objective lens 108 from the surface of the inspection object 122 and the reflection surface 70, the image becomes the same as the drawing drawn by the perspective projection method or the projection method. Become. As shown in FIG. 58, when the object 122 is imaged by the image sensor 125 through the normal optical system 124, the optical system 1 of the object 122
The image of the part far from 24 is captured smaller than the image of the near part. If the part far from the objective lens is at the same position as the other parts as shown by the two-dot chain line, if the distance from the optical system is the same as the other parts, a smaller image will be captured while a larger image will be obtained. . This problem occurs as long as the surface of the inspection object 122 facing the optical system 124 is not a plane perpendicular to the optical axis of the optical system 124,
In addition, even if it is one plane, it occurs unless the position of the one plane is constant, and it becomes impossible to measure the dimensions of the three-dimensionally-shaped 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 obtained even with the three-dimensional inspection object 122. If the dimensions are determined based on the dimensions, it is possible to obtain the dimensions in the perspective projection method or the projection projection method.

【0014】また、反射面70は100%に近い反射率
を有する全反射面であるのに対し、被検査物122の表
面は、切削面である場合は勿論、たとえ研削面であって
も微細な凹凸が存在するため、対物レンズ108の光軸
に平行に反射される成分は比較的少なく、被検査物12
2の表面像は反射面の像に比較して暗くなる。被検査物
122の表面が対物レンズ108の光軸に直角である場
合にそうなのであって、光軸に対して傾斜している場合
には光軸に平行な成分がさらに減少し、実質的にシルエ
ット像になる。そして、被検査物122の表面が対物レ
ンズ108の光軸に直角な場合でも、その表面の周縁に
は意図的に面取りが施され、あるいは丸みが付けられる
ことが多く、また、意図的に丸みが付けられない場合で
も自然に微小な丸みが付くことが多いため、被検査物1
22の輪郭線に沿って暗く、反射面70の領域とは格段
に明度の異なる画像が形成され、後に画像処理によって
きわめて容易に輪郭線を特定することができる。
The reflection surface 70 is a total reflection surface having a reflectance close to 100%, whereas the surface of the inspection object 122 is not only a cut surface but also a fine surface even if it is a ground surface. Since there are various irregularities, components reflected parallel to the optical axis of the objective lens 108 are relatively small, and the
The surface image of No. 2 is darker than the image of the reflection surface. This is the case when the surface of the inspection object 122 is perpendicular to the optical axis of the objective lens 108, and when the surface of the object 122 is inclined with respect to the optical axis, the component parallel to the optical axis is further reduced, and is substantially reduced. It becomes a silhouette image. Even when the surface of the inspection object 122 is perpendicular to the optical axis of the objective lens 108, the periphery of the surface is often intentionally chamfered or rounded, and intentionally rounded. Even if it cannot be attached, the object 1
An image that is dark along the contour line 22 and has a significantly different brightness from the area of the reflection surface 70 is formed, and the contour line can be very easily specified later by image processing.

【0015】以上は、被検査物122の外側の輪郭線に
ついて述べたが、被検査物が貫通した開口を有する場合
には、その開口の内側の輪郭線も同様の理由できわめて
容易に特定できる。さらに、被検査物122の表面が対
物レンズ108の光軸に直角である場合に、その表面に
文字,記号等のキャラクタや図形が記載され、凹部が形
成され、あるいは傷が存在すれば、それらは被検査物1
22の表面より暗い像を形成するため、これらの輪郭線
を特定することも可能である。
In the above description, the outline outside the inspection object 122 has been described. If the inspection object has an opening therethrough, the outline inside the opening can be specified very easily for the same reason. . Further, when the surface of the inspection object 122 is perpendicular to the optical axis of the objective lens 108, characters and symbols such as characters and symbols are written on the surface, and if a concave portion is formed or if there is a flaw, Is the inspected object 1
It is also possible to identify these contours in order to form an image darker than the surface of 22.

【0016】画像処理装置12は、上記のようにしてC
CDカメラ76により取得された画像のデータを処理
し、被検査物122自体の外側や内側の輪郭線、被検査
物122の表面に存在するキャラクタ,図形,凹部,傷
等の輪郭線に基づいて、それらの寸法,位置,基準回転
位置からの回転角度等を求める。この画像処理は複雑で
あるので、後にまとめて詳述することとし、ここでは省
略する。画像処理装置12は、さらに、求めた寸法,位
置,回転角度等のデータを基準データと比較して合否の
判定を行い、その判定結果を、求めた寸法,位置,回転
角度等の値と共にモニタテレビ14に表示させる。
The image processing device 12 operates as described above.
The data of the image acquired by the CD camera 76 is processed, and based on the contours outside and inside the object 122 itself, and the contours of characters, figures, recesses, scratches, etc. existing on the surface of the object 122. , Their dimensions, positions, rotation angles from the reference rotation position, and the like. Since this image processing is complicated, it will be collectively described later in detail and omitted here. The image processing device 12 further compares the obtained data such as the size, position, and rotation angle with the reference data to make a pass / fail decision, and monitors the determination result together with the obtained values of the size, position, and rotation angle. It is displayed on the television 14.

【0017】上記撮像装置10と画像処理装置12との
組合わせにより、1/100以下の測定誤差で被検査物
122の寸法を測定し得ることが実験により確認されて
いるが、測定精度を高めるためには、対物レンズ108
の焦点とオリフィス94の透孔100との光軸方向の相
対位置精度と、対物レンズ108の光軸と鏡68の反射
面70との直角度とを向上させることが必要である。
It has been confirmed by experiment that the dimensions of the object 122 can be measured with a measurement error of 1/100 or less by combining the imaging device 10 and the image processing device 12, but the measurement accuracy is improved. In order for the objective lens 108
It is necessary to improve the relative positional accuracy in the optical axis direction between the focal point and the through hole 100 of the orifice 94 and the perpendicularity between the optical axis of the objective lens 108 and the reflecting surface 70 of the mirror 68.

【0018】まず、対物レンズ108の焦点とオリフィ
ス94の透孔100との相対位置について説明する。図
6に、オリフィス94の透孔100が対物レンズ108
の焦点Oより対物レンズ108側にある場合における撮
像の模様を示す。ただし、理解を容易にするために、ビ
ームスプリッタ90を省略し、あたかも透孔100が対
物レンズ108の光軸上にあるかのように示す。また、
透孔100の位置のずれも著しく誇大に示す。本来は、
透孔100は焦点Oの位置にあり、図6に二点鎖線で示
す経路を経て撮像センサ80に入射し、L0 の大きさの
像を形成するはずであるが、透孔100が対物レンズ1
08に近すぎる場合には、矢印付きの細線で示す経路を
経て撮像センサ80に入射し、L1 の大きさの像を形成
する。正規の像より小さくなってしまうのである。
First, the relative position between the focal point of the objective lens 108 and the through hole 100 of the orifice 94 will be described. In FIG. 6, the through hole 100 of the orifice 94 is
10 shows an image pickup pattern when the object O is closer to the objective lens 108 than the focal point O of FIG. However, in order to facilitate understanding, the beam splitter 90 is omitted, and the beam splitter 90 is shown as if it were on the optical axis of the objective lens 108. Also,
The deviation of the position of the through hole 100 is also greatly exaggerated. initially,
The through hole 100 is located at the position of the focal point O, is incident on the image sensor 80 through a path shown by a two-dot chain line in FIG. 6, and should form an image of the size of L 0. 1
If too close to 08 is incident on the imaging sensor 80 via a path indicated by a thin line with an arrow, to form a magnitude image of the L 1. It becomes smaller than the regular image.

【0019】それに対し、図7に示すように、オリフィ
ス94の透孔100が対物レンズ108の焦点距離より
離れた位置にある場合には、透孔100からの光は、矢
印付きの細線で示す経路を経て撮像センサ80に入射
し、L1 の大きさの像を形成する。正規の像より大きく
なってしまうのである。オリフィス94と対物レンズ1
08との光軸方向の相対位置が適切でなければ、すなわ
ち、オリフィス94の透孔100が正確に対物レンズ1
08の焦点O上になければ、CCDカメラ76によって
取得される被検査物122の像が過大になったり、過小
になったりするのであり、そのような像を含む画像の処
理により求められる寸法に誤差を生じさせる。しかも、
この寸法誤差は、反射面70から被検査物122までの
距離が大きいほど大きくなる。この誤差を除去するため
には、対物レンズ108の焦点Oと透孔100との光軸
方向の相対位置を調節することが必要であり、この調節
はオリフィス94の光軸方向の位置を変更することによ
っても可能であるが、本実施形態においては、対物レン
ズ108のビームスプリッタ90に対する光軸方向の相
対位置、すなわち透孔100に対する光軸方向の相対位
置を変更することにより、調節が行われるようになって
いる。
On the other hand, as shown in FIG. 7, when the through hole 100 of the orifice 94 is located at a position apart from the focal length of the objective lens 108, light from the through hole 100 is indicated by a thin line with an arrow. incident on the image sensor 80 via the path, to form a magnitude image of the L 1. It becomes larger than the regular image. Orifice 94 and objective lens 1
08, the relative position in the optical axis direction is not appropriate, that is, the through hole 100 in the orifice 94 is
08, the image of the inspection object 122 acquired by the CCD camera 76 becomes too large or too small. Causes an error. Moreover,
This dimensional error increases as the distance from the reflection surface 70 to the inspection object 122 increases. In order to eliminate this error, it is necessary to adjust the relative position of the focus O of the objective lens 108 and the through hole 100 in the optical axis direction, and this adjustment changes the position of the orifice 94 in the optical axis direction. In this embodiment, the adjustment is performed by changing the relative position of the objective lens 108 in the optical axis direction with respect to the beam splitter 90, that is, the relative position in the optical axis direction with respect to the through hole 100. It has become.

【0020】具体的には、図8に示すように、被検査物
支持板72上に検査用ゲージ126を載置し、その検査
用ゲージ126の第一基準部127と第二基準部128
との寸法測定を行いつつ、調節ねじ50により対物レン
ズ108の高さを調節し、第一基準部127と第二基準
部128との寸法が実質的に同じ値として取得されたと
き、レンズブラケット38をコラム34に固定するので
ある。第一基準部127と第二基準部128とは、図9
に示すように、ガラス板に同じ大きさの基準マーク12
9を同じ中心間距離で2個ずつ形成したものであり、検
査用ゲージ126が被検査物支持板72上に載置された
とき、第一基準部127と第二基準部128との光軸方
向の位置が異なるように構成されている。前述のよう
に、被検査物122の寸法誤差は、反射面70からの被
検査物122までの距離が大きくなるほど大きくなるた
め、第一基準部127と第二基準部128との反射面7
0からの距離が異なっても、2個の基準マーク129の
中心間距離の寸法誤差が実質的に同じになる状態になれ
ば、対物レンズ108から検査用ゲージ126に向かう
光が対物レンズ108の光軸に平行になったと考えるこ
とができ、対物レンズ108の焦点Oと透孔100との
光軸方向の相対位置が適切になったと考えることができ
るのである。
Specifically, as shown in FIG. 8, an inspection gauge 126 is mounted on the inspection object support plate 72, and the first and second reference portions 127 and 128 of the inspection gauge 126 are provided.
When the height of the objective lens 108 is adjusted by the adjusting screw 50 while measuring the dimensions of the first reference portion 127 and the second reference portion 128 are obtained as substantially the same value, the lens bracket 38 is fixed to the column 34. The first reference unit 127 and the second reference unit 128
As shown in FIG.
9 are formed two at the same center-to-center distance. When the inspection gauge 126 is mounted on the inspection object support plate 72, the optical axis of the first reference portion 127 and the second reference portion 128 It is configured so that the positions in the directions are different. As described above, since the dimensional error of the inspection object 122 increases as the distance from the reflection surface 70 to the inspection object 122 increases, the dimensional error of the reflection surface 7 between the first reference portion 127 and the second reference portion 128 increases.
Even if the distance from 0 is different, if the dimensional error of the center-to-center distance of the two reference marks 129 becomes substantially the same, light traveling from the objective lens 108 to the inspection gauge 126 will This can be considered to be parallel to the optical axis, and it can be considered that the relative position of the focal point O of the objective lens 108 and the through hole 100 in the optical axis direction has become appropriate.

【0021】なお、上記検査用ゲージ126は、反射面
70により反射された光を基準マーク129が遮断する
ものとされており、基準マーク129は反射率の低い材
料で形成されているが、逆に第一基準部127と第二基
準部128との基準マーク129を反射率の高い材料で
形成し、第一基準部127と第二基準部128とを、高
さが互いに異なる支持段部を有する支持部材の各支持段
部上に載置して、較正治具とすることも可能である。こ
の場合、各支持段部の支持面はできる限り反射率の低い
ものとすることが望ましい。本態様においては、対物レ
ンズ108からの平行光は反射面70には到達せず、反
射率の高い基準マーク129からの反射光により基準マ
ーク129の寸法測定が行われることとなるが、平行光
の平行度が悪い場合には基準マーク129の測定寸法が
誤差を含み、その誤差が対物レンズ108と基準マーク
129との距離の大小によって変わるため、本態様によ
っても平行光の平行度の良否、すなわち対物レンズ10
8の焦点Oと透孔100との光軸方向の相対位置の適切
を検査することができるのである。
The inspection gauge 126 is designed so that the reference mark 129 blocks light reflected by the reflection surface 70. The reference mark 129 is formed of a material having a low reflectance. The reference marks 129 of the first reference portion 127 and the second reference portion 128 are formed of a material having a high reflectivity, and the first reference portion 127 and the second reference portion 128 are connected to support step portions having different heights. It can be placed on each supporting step of the supporting member to form a calibration jig. In this case, it is desirable that the support surface of each support step has as low a reflectance as possible. In this embodiment, the parallel light from the objective lens 108 does not reach the reflecting surface 70, and the dimension of the reference mark 129 is measured by the reflected light from the reference mark 129 having high reflectance. Is poor, the measurement dimension of the reference mark 129 includes an error, and the error varies depending on the distance between the objective lens 108 and the reference mark 129. That is, the objective lens 10
It is possible to inspect the relative position between the focal point O and the through hole 100 in the optical axis direction.

【0022】次に、対物レンズ108の光軸と鏡68の
反射面70と直角度について説明する。図10に示すよ
うに、対物レンズ108の光軸と反射面70とが直角で
ある場合には、対物レンズ108からの平行光が二点鎖
線で示す経路を経てL0 の大きさの像を形成するのに対
し、反射面70が傾いている場合には、矢印付きの細線
で示す経路を経て、L1 の大きさの像を形成する。つま
り、対物レンズ108の光軸と鏡68の反射面70との
直角度が悪いほど、被検査物122の外のり寸法が大き
な値で取得されてしまうのである。この誤差を除去する
ためには、鏡支持板64に螺合されている3本の調節ね
じ66の鏡支持板64からの突出量を変更することによ
り、鏡68の反射面70の向きを調節しつつ、被検査物
支持板72上の被検査物122の外のり寸法を測定し、
外のり寸法が極小値に達したとき、ロックナットにより
調節ねじ66を固定すれば、対物レンズ108の光軸と
鏡68の反射面70との直角度を高くすることができ
る。なお、図示の例では調節ねじ66は被検査物支持板
72に螺合され、下端がベース32に当接するようにさ
れているが、調節ねじを、前記調節ねじ50と同様のも
のとし、被検査物支持板72とベース32との両方に螺
合させることも可能である。
Next, the perpendicularity between the optical axis of the objective lens 108 and the reflecting surface 70 of the mirror 68 will be described. As shown in FIG. 10, when the optical axis of the objective lens 108 and the reflection surface 70 are perpendicular to each other, the parallel light from the objective lens 108 forms an image having a size of L 0 through a path indicated by a two-dot chain line. to form, when the reflection surface 70 is tilted, via the path indicated by the thin line with an arrow, to form a magnitude image of the L 1. In other words, the smaller the perpendicularity between the optical axis of the objective lens 108 and the reflecting surface 70 of the mirror 68, the larger the outside dimension of the inspection object 122 is obtained. In order to eliminate this error, the direction of the reflecting surface 70 of the mirror 68 is adjusted by changing the amount of projection of the three adjustment screws 66 screwed to the mirror support plate 64 from the mirror support plate 64. While measuring the outer dimension of the inspection object 122 on the inspection object support plate 72,
When the outer dimension reaches a minimum value, the perpendicularity between the optical axis of the objective lens 108 and the reflecting surface 70 of the mirror 68 can be increased by fixing the adjusting screw 66 with a lock nut. In the illustrated example, the adjusting screw 66 is screwed to the inspection object support plate 72, and the lower end is in contact with the base 32. However, the adjusting screw is similar to the adjusting screw 50, and It is also possible to screw the test object support plate 72 and the base 32 together.

【0023】寸法精度をさらに高めることが必要な場合
には、反射面70,結像レンズ82および対物レンズ1
08の局部的な歪みに基づいて発生する寸法測定誤差も
除去することが望ましい。例えば、図11に示すよう
に、ガラス板130に、縦横に等ピッチで同じ大きさの
基準マーク132を形成した較正用ゲージ134を、被
検査物支持板72上に載置し、互いに隣接する基準マー
ク132間の中心間距離の誤差を検出し、それら誤差を
反射面70,結像レンズ82および対物レンズ108の
局部的な歪みを表すデータとして画像処理装置12に記
憶させておき、被検査物122の寸法を求める際に、こ
の歪みデータに基づいて寸法の補正が行われるようにす
るのである。なお、図11に示す較正用ゲージ134に
おいては基準マーク132の数は少なく描かれている
が、実際には小さいピッチで多数の基準マーク132が
形成されることが望ましく、それら基準マーク132は
光を遮断するものでも、光を透過させるものでもよい。
他の部分と逆になっていればよいのである。
If it is necessary to further increase the dimensional accuracy, the reflecting surface 70, the imaging lens 82 and the objective lens 1
It is also desirable to eliminate dimensional measurement errors that occur based on the 08 local distortion. For example, as shown in FIG. 11, calibration gauges 134 having reference marks 132 of the same size formed at equal pitches in the vertical and horizontal directions are placed on the inspection object support plate 72 on the glass plate 130 and are adjacent to each other. An error in the center-to-center distance between the reference marks 132 is detected, and these errors are stored in the image processing device 12 as data representing local distortions of the reflection surface 70, the imaging lens 82, and the objective lens 108, and When obtaining the dimensions of the object 122, the dimensions are corrected based on the distortion data. Although a small number of reference marks 132 are drawn in the calibration gauge 134 shown in FIG. 11, it is desirable that a large number of reference marks 132 are actually formed at a small pitch. Or a device that transmits light.
It just needs to be the opposite of the other parts.

【0024】次に、画像処理装置12について説明す
る。この画像処理装置12は、本来、電気部品供給装置
から供給される電気部品を、吸着ヘッド等の部品保持ヘ
ッドにより保持し、搬送して、プリント基板等の回路基
材に装着する電気部品装着装置用の画像処理装置として
開発されたものである。電気部品装着装置においては、
部品保持ヘッドによる電気部品の保持位置や保持方位
(基準回転位置からの回転角度で表され、以下、回転角
度と称する)を検出し、あるいは基材支持装置により支
持された回路基材の位置や回転角度を検出し、それらの
誤差を修正した上で、電気部品を回路基材に装着するこ
とが行われており、そのために、電気部品や回路基材の
基準マークを撮像する撮像センサが必要であり、これら
撮像センサの画像処理装置として開発されたものなので
ある。したがって、前記CCDカメラ76の代わりに、
電気部品装着装置により従来から使用されている撮像装
置のCCDカメラを接続すれば、電気部品や回路基材の
基準マークの位置等を検出することができる。また、前
記寸法検査装置と同様の構成の撮像装置により、電気部
品,基準マーク等の撮像を行い、それらの位置等を検出
することができる。
Next, the image processing apparatus 12 will be described. This image processing device 12 is an electric component mounting device that originally holds an electric component supplied from an electric component supply device by a component holding head such as a suction head, conveys the electric component, and mounts the electric component on a circuit substrate such as a printed circuit board. It has been developed as an image processing device for use. In electrical component mounting equipment,
Detecting the holding position and holding direction (represented by a rotation angle from a reference rotation position, hereinafter referred to as a rotation angle) of the electric component by the component holding head, After detecting the rotation angle and correcting those errors, the electrical components are mounted on the circuit substrate.For this purpose, an image sensor that captures the reference marks on the electrical components and the circuit substrate is required. This has been developed as an image processing device for these imaging sensors. Therefore, instead of the CCD camera 76,
If a CCD camera of a conventionally used image pickup device is connected to the electric component mounting device, the position of the reference mark on the electric component or the circuit substrate can be detected. In addition, an imaging device having the same configuration as the dimension inspection device can capture an image of an electric component, a reference mark, and the like, and detect the position and the like thereof.

【0025】その一例を図12に示す。図12におい
て、前記鏡68に相当する鏡140が部品吸着ヘッド1
42に取り付けられており、吸着管144に保持された
電気部品146の像が、前記撮像装置10におけるのと
同じ原理で取得される。そのための光学系を構成する各
構成要素は撮像装置10におけるそれらと同じであるた
め、同一の符号を用いて対応関係を示し、詳細な説明は
省略する。なお、光学系の各構成要素を保持する部材の
構成は撮像装置10とは異なるが、これらの部材の構成
は重要ではないため、説明を省略する。
One example is shown in FIG. In FIG. 12, a mirror 140 corresponding to the mirror 68 is a component suction head 1.
The image of the electric component 146 attached to the suction tube 144 and held by the suction tube 144 is acquired by the same principle as that in the imaging device 10. The constituent elements of the optical system for this purpose are the same as those of the imaging device 10, and therefore, the same reference numerals are used to indicate the corresponding relationship, and detailed description will be omitted. Although the configuration of the members that hold the respective components of the optical system is different from that of the imaging device 10, the configurations of these members are not important, and thus description thereof is omitted.

【0026】以上のようにしてCCDカメラ76により
取得された被検査物122,電気部品,基準マーク等の
画像のデータが画像処理装置12により処理され、被検
査物122の寸法検査や、電気部品146の保持位置の
検出等が行われる。画像処理装置12はコンピュータを
主体とするものであり、図13に示すように、CPU1
54,DRAM(ダイナミックラム)156,SRAM
(スタティックラム)158,PROM(プログラマブ
ルロム)160,漢字ROM162,フレームグラバメ
モリ164,および4面分のオーバレイ表示メモリ16
6を有し、これらは基板167上の図示しない内部バス
によって互に接続されている。
As described above, image data such as the inspection object 122, electrical components, and reference marks acquired by the CCD camera 76 are processed by the image processing device 12, and the dimensional inspection of the inspection object 122 and the electrical components are performed. The detection of the holding position of 146 and the like are performed. The image processing apparatus 12 is mainly composed of a computer, and as shown in FIG.
54, DRAM (Dynamic RAM) 156, SRAM
(Static ram) 158, PROM (programmable ROM) 160, kanji ROM 162, frame grabber memory 164, and overlay display memory 16 for four surfaces
6, which are connected to each other by an internal bus (not shown) on the substrate 167.

【0027】上記内部バスにはまた、2チャンネルのシ
リアルインタフェース170が接続され、入力装置16
が接続されている。入力装置16は、テンキー,アルフ
ァベットキー等を有する前記キーボード18を主体と
し、寸法検査装置全体の運転に必要な情報,指令と共
に、画像処理対象部(被検査物122全体でも、その一
部でもよい)の種類,個数等,画像処理に必要な情報を
入力する装置である。バスにはまた、イーサネットイン
タフェース174およびメモリカードインタフェース1
76が接続されている。
A two-channel serial interface 170 is connected to the internal bus.
Is connected. The input device 16 is mainly composed of the keyboard 18 having numeric keys, alphabet keys, and the like. The input device 16 includes information and instructions necessary for operation of the entire dimensional inspection device, and an image processing target portion (the inspection object 122 as a whole or a part thereof). ) Is a device for inputting information necessary for image processing, such as the type and number of items. The bus also has an Ethernet interface 174 and a memory card interface 1
76 is connected.

【0028】イーサネットインタフェース174は電気
部品装着装置等の、画像処理装置以外の部分を制御する
コンピュータとの間で通信を行うためのインタフェース
である。画像処理装置12には、オプションの制御機器
を接続可能であり、イーサネットインタフェース174
はP1コネクタ168を介してデータ交換を行うのであ
る。また、電気部品装着装置の各種駆動装置を制御する
制御装置も、コンピュータを主体として画像処理装置1
2とは別に設けられ、図示しない外部バスを介してP1
コネクタ168に接続される。この別の制御装置は本発
明とは関連が薄いため図示および説明は省略する。メモ
リカードは、画像処理を行うために予め作成されたプロ
グラムが記憶されたものであり、画像処理装置12にセ
ットされれば、CPU154がPROM160を使用し
てメモリカード内のプログラムやプログラムの実行に必
要なデータをメモリカードインタフェース176を介し
て読み出し、DRAM156に記憶させる。
The Ethernet interface 174 is an interface for performing communication with a computer that controls parts other than the image processing apparatus, such as an electric component mounting apparatus. An optional control device can be connected to the image processing apparatus 12.
Performs data exchange via the P1 connector 168. Further, a control device for controlling various driving devices of the electric component mounting apparatus is also a computer-based image processing apparatus 1.
2 and P1 via an external bus (not shown).
Connected to connector 168. Since this other control device has little relation 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 154 uses the PROM 160 to execute programs and programs in the memory card. The necessary data is read out via the memory card interface 176 and stored in the DRAM 156.

【0029】バスには更に、CCDカメラインタフェー
ス180が接続され、これに前記寸法検査装置のCCD
カメラ76(または電気部品装着装置のCCDカメラ7
6)が接続される。CCDカメラ76により得られた画
像のデータである画像データは、CCDカメラインタフ
ェース180を介してフレームグラバメモリ164に格
納される。前述のように、フレームグラバメモリ164
は4つ設けられており、例えば、連続して撮像される4
個の被検査物122の画像データが各フレームグラバメ
モリ164に順次格納される。
Further, a CCD camera interface 180 is connected to the bus.
The camera 76 (or the CCD camera 7 of the electric component mounting device)
6) is connected. Image data, which is data of an image obtained by the CCD camera 76, is stored in the frame grabber memory 164 via the CCD camera interface 180. As described above, the frame grabber memory 164
Are provided, and for example, 4
The image data of the inspection object 122 is sequentially stored in each frame grabber memory 164.

【0030】バスには更に、テレビインタフェース18
6が接続され、モニタテレビ14が接続されている。モ
ニタテレビ14はカラー表示およびモノクロ表示の両方
が可能である。前述のように、被検査物122の撮像に
より得られた4つのモノクロ画像の画像データが、フレ
ームグラバメモリ164に並列的に格納されるようにな
っており、一方オーバレイ表示メモリ166は、画像を
16色のカラーで表示するカラー画像データを記憶し得
るメモリを4面分備えている。モニタテレビ14には、
上記4つのモノクロ画像のいずれか1つに、上記4面分
のカラー画像のうちモノクロ画像に対応するものが重ね
て表示され、画像処理の経過や結果が表示される。この
同じモニタテレビ14に、入力装置16を用いて入力さ
れたデータもカラーで表示される。この表示時に漢字R
OM162が使用される。
The bus further includes a television interface 18.
6 is connected, and the monitor television 14 is connected. The monitor television 14 is capable of both color display and monochrome display. As described above, image data of four monochrome images obtained by imaging the inspection object 122 is stored in parallel in the frame grabber memory 164, while the overlay display memory 166 stores the There are four memories each capable of storing color image data to be displayed in 16 colors. The monitor TV 14 has
A color image corresponding to the monochrome image of the four color images is superimposed on any one of the four monochrome images, and the progress and results of the image processing are displayed. Data input using the input device 16 is also displayed in color on the same monitor television 14. At the time of this display
OM162 is used.

【0031】以下、CCDカメラ76の撮像により得ら
れた画像データの処理について説明する。画像処理のた
めのプログラムやデータは前述のようにメモリカードに
記憶されており、メモリカードがセットされれば読み出
されてDRAM156に記憶される。メモリカードから
読み出される画像処理プログラムを図14ないし図16
にそれぞれ示す。
Hereinafter, the processing of image data obtained by the imaging by the CCD camera 76 will be described. The programs and data for image processing are stored in the memory card as described above, and are read out and stored in the DRAM 156 when the memory card is set. 14 to 16 show an image processing program read from the memory card.
Are shown below.

【0032】図14に示すプログラムは事前処理プログ
ラムである。事前処理プログラムは、一検査プログラム
の立ち上げ時、すなわち事前処理プログラムのDRAM
156への格納後に実行される。まず、一検査プログラ
ムの実行に必要なすべての画像処理対象部のうちの1つ
について、パターンマッチングを行うか否かが判定さ
れ、行うのであればマスタ捜索テンプレートに基づいて
捜索テンプレートが生成されてDRAM156に記憶さ
れる。同様の処理がすべての画像処理対象部について順
次行われる。
The program shown in FIG. 14 is a pre-processing program. The pre-processing program is used when starting one inspection program, that is, the DRAM of the pre-processing program.
Executed after storage in 156. First, it is determined whether or not to perform pattern matching on one of all the image processing target parts necessary for executing one inspection program. If so, a search template is generated based on the master search template. It is stored in the DRAM 156. Similar processing is sequentially performed for all the image processing target units.

【0033】上記マスタ捜索テンプレートは2個の点を
一対とするポイントペアを複数組有し、それらポイント
ペアを規定する座標面(マスタ捜索テンプレート座標面
と称する)が画像処理装置12の基準座標面と一致して
いるものである。すなわち、マスタ捜索テンプレート座
標面の原点および座標軸の方向が、CCDカメラ76の
視野の中心に原点が設定された基準座標面の原点および
座標軸の方向と一致しているのである。マスタ捜索テン
プレートは、画像処理対象部の形状,寸法に基づいて予
め作成されてメモリカードに記憶されており、事前処理
プログラムと共にDRAM156に読み込まれる。
The master search template has a plurality of point pairs each including two points, and a coordinate plane (referred to as a master search template coordinate plane) that defines the point pairs is a reference coordinate plane of the image processing apparatus 12. Is consistent with That is, the direction of the origin and coordinate axes of the master search template coordinate plane coincide with the origin and coordinate axes of the reference coordinate plane in which the origin is set at the center of the field of view of the CCD camera 76. The master search template is created in advance based on the shape and dimensions of the image processing target portion, stored in the memory card, and read into the DRAM 156 together with the pre-processing program.

【0034】図17に、画像処理対象部が正方形の部分
である場合のマスタ捜索テンプレートの設定データの一
例を示し、そのデータによって設定されるマスタ捜索テ
ンプレート200を図18に示す。図17のデータ中、
第7,8,10,11行のデータおよび第5行のhs
(ハーフスパン)=5.5がマスタ捜索テンプレートの
設定データである。Pairとは、ポイントペアを構成
する2個の点の延長線上において、画像処理対象部の中
心線に対して対称に別のポイントペアを設定することを
意味する。例えば、図18に示す(7),(8),(10),(11) の
各ポイントペア202に対して(7) ´,(8)´,(10) ´,
(11) ´の各ポイントペア202が設定されるのであ
る。これらポイントペア202に付された括弧付の数字
は、図17における行番号と一致している。また、20
4は画像処理対象部である。
FIG. 17 shows an example of the setting data of the master search template when the image processing target portion is a square portion, and FIG. 18 shows a master search template 200 set by the data. In the data of FIG.
Data on lines 7, 8, 10, 11 and hs on line 5
(Half span) = 5.5 is 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 target portion on an extension of two points forming the point pair. For example, for each point pair 202 of (7), (8), (10), and (11) shown in FIG. 18, (7) ', (8)', (10) ',
(11) Each point pair 202 is set. The numbers in parentheses given to these point pairs 202 correspond to the line numbers in FIG. Also, 20
Reference numeral 4 denotes an image processing target unit.

【0035】マスタ捜索テンプレートは、寸法,位置,
回転角度のいずれにも誤差のないマスタ画像処理対象部
について、各組のポイントペアを構成する2個の点の一
方が画像処理対象部の内側に、他方が外側に位置し、か
つ、それらポイントペアの2個の点の中点がマスタ画像
処理対象部のエッジ上に位置するように作成される。そ
れを図に示せば、図18に示すようになるのである。な
お、一般的には、ポイントペアの2個の点の中点がマス
タ画像処理対象部のエッジ上に位置することは不可欠で
はなく、2個の点がそれぞれ画像処理対象部のエッジよ
り内側と外側とに指定されればよい。また、図18に示
す例の場合、ポイントペア202の2個の点のうちの一
方の点が別のポイントペア202の一方の点と共通にさ
れているが、これも不可欠なことではない。さらに、図
18においては、いずれの点がポイントペア202を構
成するかを判り易く示すために、ポイントペア202を
構成する2個の点が直線でつながれているが、この直線
は説明の都合上の線であって実際に直線のデータが設定
されるわけではない。
The master search template has dimensions, positions,
For the master image processing target portion having no error in any of the rotation angles, one of the two points constituting each point pair is located inside the image processing target portion, the other is located outside the image processing target portion, and the points The pair is created such that the midpoint between the two points of the pair is located on the edge of the master image processing target portion. If this is shown in the figure, it will be as shown in FIG. In general, it is not essential that the midpoint of the two points of the point pair be located on the edge of the master image processing target portion, and the two points are respectively located inside the edge of the image processing target portion. What is necessary is just to specify outside. Also, in the case of the example shown in FIG. 18, one of the two points of the point pair 202 is shared with one of the points of another point pair 202, but this is not essential. Further, in FIG. 18, two points constituting the point pair 202 are connected by a straight line in order to easily show which point constitutes the point pair 202. However, this straight line is not shown for convenience of explanation. , And data of a straight line is not actually set.

【0036】図21に、画像処理対象部が、一部が切り
欠かれた図22の円板206である場合のマスタ捜索テ
ンプレートのデータを示す。このマスタ捜索テンプレー
ト208においては、円周部分に設けられた(15)〜(17)
のポイントペア210は(15)´〜(17)´のポイントペア
210とペアにされているが、その他のポイントペア2
10は他のポイントペアとペアにされてはいない。
FIG. 21 shows the data of the master search template when the image processing target part is the disk 206 of FIG. 22 which is partially cut away. In this master search template 208, (15) to (17)
Is paired with the point pair 210 of (15) ′ to (17) ′, but the other point pair 2
10 is not paired with another point pair.

【0037】寸法検査装置においては、画像処理対象部
が、例えば被検査物122の像の全体とされ、検査され
るべき複数種類の被検査物122についてのマスタ捜索
テンプレートデータが予め作成されてメモリカードに記
憶されており、画像処理実行時にはDRAM156に格
納される。そのため、捜索テンプレートの生成時には、
捜索テンプレートを生成すべき被検査物122の種類に
応じてマスタ捜索テンプレートデータがDRAM156
から読み出される。マスタ捜索テンプレートは前述のよ
うに回転角度が0度の捜索テンプレートであり、マスタ
捜索テンプレートが設定角度範囲内において図20に二
点鎖線で示すように設定ピッチで回転させられることに
より、複数種類の捜索テンプレートが生成され、そのデ
ータがDRAM156に格納される。
In the dimension inspection apparatus, the image processing target portion is, for example, an entire image of the inspection object 122, and master search template data for a plurality of types of inspection objects 122 to be inspected are prepared in advance and stored in a memory. It is stored in a card, and is stored in the DRAM 156 when the image processing is executed. Therefore, when generating a search template,
Master search template data is stored in the DRAM 156 according to the type of the inspection object 122 for which a search template is to be generated.
Is read from. As described above, the master search template is a search template having a rotation angle of 0 degrees. By rotating the master search template at a set pitch within a set angle range as shown by a two-dot chain line in FIG. A search template is generated, and the data is stored in DRAM 156.

【0038】この捜索テンプレートの生成角度範囲およ
び設定ピッチをそれぞれ指定するデータは、図17に示
すように、マスタ捜索テンプレートのデータと共に記憶
されている。第15行のpitchA=4.5 が設定ピッチのデ
ータであり、第16行のstartA=-45および第17行のen
dA=45 が捜索テンプレートの生成角度範囲を規定するデ
ータである。捜索テンプレートを生成する角度範囲およ
びピッチは被検査物122に応じて設定される。例え
ば、被検査物122が被検査物支持板72上に載置され
る際の回転角度が大きくずれることが予想される場合に
は、生成角度範囲が広くされるのである。因みに、図1
4に示す事前処理プログラムの例では、生成角度範囲が
−45度から+45度とされ、設定ピッチが5度とされ
ている。
As shown in FIG. 17, data for designating the generation angle range and the set pitch of the search template are stored together with the data of the master search template. PitchA = 4.5 on the 15th line is data of the set pitch, startA = -45 on the 16th line, and en on the 17th line.
dA = 45 is data that defines the search template generation angle range. An angle range and a pitch for generating the search template are set according to the inspection object 122. For example, when it is expected that the rotation angle when the inspection object 122 is placed on the inspection object support plate 72 is largely shifted, the generation angle range is widened. By the way, FIG.
In the example of the pre-processing program shown in FIG. 4, the generation angle range is from −45 degrees to +45 degrees, and the set pitch is 5 degrees.

【0039】1つの被検査物122についての捜索テン
プレートの生成が終了すれば、プログラムの実行は最初
に戻り、次の被検査物122についてパターンマッチン
グを行うか否かの判定および行うのであれば捜索テンプ
レートの生成が行われる。パターンマッチングを行わな
い場合にはプログラムの実行は始めに戻り、次の被検査
物122についてパターンマッチングを行うか否かの判
定が行われる。全部の被検査物122についてパターン
マッチングを行うか否かの判定,パターンマッチングを
行う被検査物122についての捜索テンプレートの生成
が行われたならば図14のプログラムの実行は終了す
る。
When the generation of the search template for one test object 122 is completed, the execution of the program returns to the beginning. A template is generated. When the pattern matching is not performed, the execution of the program returns to the beginning, and it is determined whether or not to perform the pattern matching on the next inspection object 122. If it is determined whether or not pattern matching is to be performed for all the test objects 122 and a search template has been generated for the test objects 122 to be subjected to pattern matching, the execution of the program in FIG. 14 ends.

【0040】次に、図15に示す実行処理プログラムを
説明する。このプログラムは、CCDカメラ76により
被検査物122が撮像され、画像データがフレームグラ
バメモリ164に格納された後に実行される。まず、被
検査物122が四角形物等、パターンマッチングのみで
処理可能であれば、図16に示すパターンマッチングプ
ログラムに従って画像処理が行われる。
Next, the execution processing program shown in FIG. 15 will be described. This program is executed after the inspection object 122 is imaged by the CCD camera 76 and the image data is stored in the frame grabber memory 164. First, if the inspection object 122 can be processed only by pattern matching, such as a square object, image processing is performed according to the pattern matching program shown in FIG.

【0041】次に、画像処理対象部がQFP(クウォー
ド フラットパッケージ),PLCC(プラスティック
リーデッド チップ キャリア),BGA(ボール
グリッド アレイ)等、リードや半田バンプを備えて形
状が複雑な電子部品等であって、画像処理のためにパタ
ーンマッチングを組み合わせたパターンマッチングマネ
ージャを作動させる必要があるか否かが判定される。パ
ターンマッチングの組合わせについては後述する。パタ
ーンマッチングマネージャ作動の必要がなければ、仮想
画面上での画像処理を行うべきか否かが判定され、判定
の結果がNOであれば物理画面上での画像処理を行うべ
きか否かが判定される。物理画面は、光学的特性値が画
素毎に求められて画像データが実在する画像の画面であ
り、仮想画面は、画素に拘束されない任意の点の光学的
特性値が必要に応じて演算によって求められる画面であ
る。上記パターンマッチングおよびパターンマッチング
マネージャはいずれも、後に説明するように、仮想画面
上で行われる処理であるが、本実施形態においては、こ
れらの他に、パターンマッチングによらないで仮想画面
上と物理画面上とでそれぞれ画像処理を行い得るように
されている。上記「仮想画面上での画像処理を行うべき
か否か」および「物理画面上での画像処理を行うべきか
否か」の判定は、後者2つの画像処理を行うことが指令
されているか否かの判定なのである
Next, the image processing target parts are QFP (quad flat package), PLCC (plastic lead chip carrier), and BGA (ball
It is determined whether or not an electronic component or the like having a lead or a solder bump and having a complicated shape, such as a grid array, needs to operate a pattern matching manager combining pattern matching for image processing. The combination of pattern matching will be described later. If the pattern matching manager does not need to be activated, it is determined whether or not to perform image processing on the virtual screen. If the determination result is NO, it is determined whether or not to perform image processing on the physical screen. Is done. The physical screen is a screen of an image in which optical characteristic values are obtained for each pixel and image data actually exists, and the virtual screen is an optical characteristic value of an arbitrary point which is not constrained by pixels and is obtained by calculation as needed. Screen. As 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, on the virtual screen and the physical Image processing can be performed on the screen and 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 based on whether the latter two image processings are instructed. It is a judgment of

【0042】図16に示すパターンマッチングプログラ
ムを説明する。まず、サーチウインドウが設定され、画
像処理対象部を捜索する捜索領域が設定される。サーチ
ウインドウの設定は、CCDカメラ76の撮像面の一部
あるいは全部を座標値によって指定することにより行わ
れる。画像処理対象部が何であるかは、作業手順中のデ
ータにより判っており、撮像面に形成される画像処理対
象部の像の位置はおおよそ判るため、サーチウインドウ
は位置に多少のずれがあっても画像処理対象部を包含す
るに適した十分な大きさに設定される。このようにすれ
ば捜索領域が狭くて済み、短時間で捜索することができ
る。
The pattern matching program shown in FIG. 16 will be described. First, a search window is set, and a search area for searching the image processing target portion is set. The setting of the search window is performed by designating a part or the whole of the imaging surface of the CCD camera 76 by the coordinate value. The image processing target portion is known from the data during the work procedure, and the position of the image of the image processing target portion formed on the imaging surface is roughly known. Is also set to a size sufficient to include the image processing target portion. In this way, the search area can be narrow, and the search can be performed in a short time.

【0043】フルセットのパターンマッチング処理は、
捜索対象部を捜索する捜索ステップ,捜索対象部のおお
よそのエッジ点を捜索する再捜索ステップ,捜索対象部
のエッジ点を演算する測定ステップ,および測定ステッ
プを繰り返し行う再測定ステップの4つのステップを含
む。通常は4つのステップ全部の終了によりパターンマ
ッチングが終了する。1つでも異常のステップがあれ
ば、次のステップは実行されず、直ちにパターンマッチ
ングが終了させられる。
The full set of pattern matching processing is as follows:
There are four steps: a search step for searching a search target portion, a re-search step for searching for an approximate edge point of the search target portion, a measurement step for calculating an edge point of the search target portion, and a re-measurement step for repeating the measurement step. Including. Normally, pattern matching ends when all four steps end. If there is at least one abnormal step, the next step is not executed, and the pattern matching is immediately terminated.

【0044】まず、捜索ステップを説明する。捜索ステ
ップにおいては、DRAM156から捜索テンプレート
が1つずつ順次読み出され、図24に示すように画像処
理対象部の像220と背景とを含む画像が存在する画面
221に重ねられ、捜索テンプレート222の複数のポ
イントペア224を構成する2個の点(以下、ポイント
ペア構成点と称する)の光学的特性値(本実施形態では
輝度)が演算される。図17に示す例では、回転角度が
−45度の捜索テンプレートから順に読み出される。
First, the search step will be described. In the search step, search templates are sequentially read one by one from the DRAM 156, and are superimposed on a screen 221 on which an image including the image 220 of the image processing target portion and the background is present as shown in FIG. Optical characteristic values (luminance in the present embodiment) of two points (hereinafter, referred to as point pair configuration points) constituting the plurality of point pairs 224 are calculated. In the example illustrated in FIG. 17, the search templates are sequentially read from the search template whose rotation angle is −45 degrees.

【0045】ポイントペア構成点は仮想画面上の点であ
り、ポイントペア構成点の輝度は物理画面上の複数の画
素の画像データとしての輝度から補間演算により求めら
れる。捜索テンプレートのデータにより指定された仮想
画面上の点の光学的特性値が物理画面の画像データに基
づいて求められるのであり、これを視覚的に表したのが
図24であって、請求項5にいう「捜索テンプレートを
画像データの表す画像が存在する画面に重ねる」とはこ
のことを意味する。図24の画面221は仮想画面であ
り、この画面221内の画像対象物の像220はこの位
置に存在すると仮想されているのみで、実際にこの像2
20を表す画像データは存在しない。後述の図19,図
20,図28に関しても同様である。
The point pair composing points are points on the virtual screen, and the luminance of the point pair composing points is obtained by interpolation from the luminance of a plurality of pixels on the physical screen as image data. The optical characteristic value of a 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 FIG. 24 visually shows this. This means that "the search template is superimposed on the screen on which the image represented by the image data exists". The screen 221 in FIG. 24 is a virtual screen, and the image 220 of the image object in the screen 221 is only imagined to be present at this position.
20 does not exist. The same applies to FIGS. 19, 20, and 28 described later.

【0046】ポイントペア構成点の輝度の補間演算は、
例えば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)
The interpolation of the brightness of the point pair point is
For example, it 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 and Y coordinate planes. The simplest linear interpolation is performed based on the image data of four pixels adjacent to the constituent point. In FIG. 25, (u 0 , v 0 ) is the point pair composing point, f (u 0 , v 0 ) is the luminance of the point pair composing point,
(U ', v'), (u '+ 1, v'), (u ', v' +
1) and (u '+ 1, v' + 1) are the center positions of four pixels used for linear interpolation, respectively, f (u ', v'), f
(U '+ 1, v'), f (u ', v' + 1), f (u '
(+1, v ′ + 1) is the luminance of each of the four pixels, and the luminance of the point pair composing point is calculated by equation (1). f = (u 0 , v 0 ) = f (u ′, v ′) (1−α) (1−β) + f (u ′ + 1, v ′) α (1−β) + f (u ′, v ′) +1) (1-β) β + f (u ′ + 1, v ′ + 1) αβ (1)

【0047】上記演算は図26に示す物理画面/仮想画
面変換ドライバ300によって行われる。図に示すよう
に、物理画面/仮想画面変換ドライバ300は、一般的
な画像処理アプリケーションソフトウエア302とは別
に構成されており、画像処理アプリケーションソフトウ
エア302において、物理画面304上の画像データに
基づいて仮想画面306上の画像データを演算する必要
が生じる度に、物理画面/仮想画面変換ドライバ300
が呼び出されて、仮想画面306上の画像データの演算
が行われるのである。
The above calculation is performed by the physical screen / virtual screen conversion driver 300 shown in FIG. As shown in the figure, the physical screen / virtual screen conversion driver 300 is configured separately from general image processing application software 302. Every time it is necessary to calculate image data on the virtual screen 306, the physical screen / virtual screen conversion driver 300
Is called, and the calculation of the image data on the virtual screen 306 is performed.

【0048】各対のポイントペア224の2個の構成点
について輝度が演算される毎に、それら2個のポイント
ペア構成点の輝度が比較される。CCDカメラ76によ
る撮像時には、画像処理対象部としての被検査物122
に入射した光は背景としての反射面70に入射した光よ
り少なく反射されるため、画像処理対象部(被検査物1
22)に対応する部分と背景(反射面70)に対応する
部分とでは固体撮像素子の電荷量に差が生ずる。画像処
理対象部の像が暗く、背景が明るくなるのである。その
ため、2個のポイントペア構成点の一方が画像処理対象
部のエッジ内に位置し、他方の点が背景内に位置するの
であれば、2個のポイントペア構成点の輝度に予め設定
された設定値以上(設定値が正の場合)または設定値以
下(設定値が負の場合)の差が生ずる。
Each time the luminance is calculated for the two constituent points of each pair of point pairs 224, the luminance of the two point pair constituent points is compared. At the time of imaging by the CCD camera 76, the inspection object 122 as an image processing target portion
Incident on the object to be image-processed (the object 1
There is a difference in the charge amount of the solid-state imaging device between the portion corresponding to 22) and the portion corresponding to the background (reflection surface 70). The image of the image processing target portion is dark and the background is light. Therefore, if one of the two point pair constituent points is located within the edge of the image processing target portion and the other point is located within the background, the brightness of the two point pair constituent points is set in advance. The difference is greater than or equal to the set value (when the set value is positive) or equal to or less than the set value (when the set value is negative).

【0049】上記輝度差の設定値はマスタ捜索テンプレ
ートデータと共に記憶されている。例えば、図17にお
いては第5行に記述されているように設定値diffが
20に設定されている。この場合には、2個のポイント
ペア構成点のうち、画像処理対象部のエッジ内のポイン
トペア構成点の輝度がエッジ外のポイントペア構成点の
輝度より20階調以上小さければ、設定値以上の差があ
ると判定される。逆に、設定値diffが−20に設定
されていれば、画像処理対象部のエッジ外のポイントペ
ア構成点の輝度がエッジ内のポイントペア構成点の輝度
より20階調以上小さければ、設定値以上の差があると
判定される。いずれの場合もそれら2個のポイントペア
構成点は画像処理対象部のエッジを跨いでおり、適合状
態にあることになる。この場合に、「2個のポイントペ
ア構成点が設定輝度差条件を満たす」と表現することと
する。
The set value of the luminance 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 row. In this case, if the luminance of the point pair composing point inside the edge of the image processing target portion among the two point pair composing points is smaller than the luminance of the point pair composing point outside the edge by 20 gradations or more, the setting value is exceeded. Are determined to be different. Conversely, if the set value diff is set to -20, the brightness of the point pair composing point outside the edge of the image processing target portion is smaller than the brightness of the point pair composing point inside the edge by 20 gradations or more. It is determined that there is the above difference. In any case, these two point pair constituent points straddle the edge of the image processing target portion, and are in a suitable state. In this case, the expression “two point pair constituent points satisfy the set luminance difference condition” will be used.

【0050】(1) 画像処理対象部が捜索対象部ではな
く、2個のポイントペア構成点がエッジを跨いでいな
い、(2) 供給ミスにより被検査物122が被検査物支持
板72上に載置されていない、あるいは(3) 固体撮像素
子にごみ等が付着して画像データが得られない等の理由
により、2個のポイントペア構成点が設定輝度差条件を
満たさず、適合状態にあるとは言えないことがある。こ
の状態をポイントペアのフェールと称する。捜索テンプ
レートに適合する捜索対象部が存在しないと判定するた
めのフェール数は予め設定されている。例えば、図17
においては、第3行に示すようにフェール数は0に設定
されており、全部のポイントペアについて2個のポイン
トペア構成点が設定輝度差条件を満たさなければ、捜索
テンプレートに適合する捜索対象部が存在するとは判定
されないようになっている。
(1) The image processing target portion is not the search target portion, and the two point pair constituent points do not straddle the edge. (2) The test object 122 is placed on the test object support plate 72 due to a supply error. The two point-pair configuration points do not satisfy the set luminance difference condition because they are not mounted or (3) image data cannot be obtained due to dust or the like adhering to the solid-state image sensor There are things you can't say. This state is called a point pair failure. The number of failures for determining that there is no search target portion that matches the search template is set in advance. For example, FIG.
In, as shown in the third row, the number of failures is set to 0, and for all the point pairs, if the two point pair constituent points do not satisfy the set luminance difference condition, the search target portion matching the search template Is not determined to exist.

【0051】フェール数が1以上に設定されているとす
れば、複数組のポイントペアのうち設定輝度差条件を満
たさないポイントペアが設定フェール数を越える数あれ
ば、捜索テンプレートに適合する捜索対象部は存在しな
いと判定される。0度の回転角度において捜索対象部が
存在すると判定されれば、捜索ステップは終了し、再捜
索ステップが実行されるが、存在しないと判定されれ
ば、回転角度が異なる捜索テンプレートが読み出されて
捜索対象部が捜索される。
If the number of failures is set to one or more, if the number of point pairs that do not satisfy the set brightness difference condition exceeds the set number of failures among a plurality of point pairs, the search target matching the search template It is determined that the part does not exist. If it is determined that the search target portion exists at the rotation angle of 0 degree, the search step ends and the re-search step is executed. If it is determined that the search target portion does not exist, search templates having different rotation angles are read. The search target part is searched.

【0052】捜索対象部が存在すると判定されるまで、
複数種類の捜索テンプレートが順次読み出され、捜索対
象部が捜索される。全種類の捜索テンプレートを用いて
捜索しても、捜索テンプレートに適合する捜索対象部が
存在するとの判定が得られなければ、次に捜索テンプレ
ートの位置をずらして捜索が行われる。X軸方向とY軸
方向とにそれぞれ一定ピッチずつずらされ、各位置にお
いてそれぞれ回転角度の異なる複数種類の捜索テンプレ
ートを用いて捜索対象部が捜索されるのである。
Until it is determined that the search target portion exists,
A plurality of types of search templates are sequentially read, and a search target portion is searched. Even if the search is performed using all types of search templates, if it is not determined that there is a search target portion that matches the search template, then the search is performed by shifting the position of the search template. The search target portion is shifted by a fixed pitch in the X-axis direction and the Y-axis direction by a fixed pitch, and a search target portion is searched at each position using a plurality of types of search templates having different rotation angles.

【0053】この移動ピッチは予め設定され、マスタ捜
索テンプレートを規定するデータと共にメモリカードに
記憶されている。図17において第13行および14行
に示されているpitchX=2.2, pitchY=2.2が移動ピッチで
ある。まず、Y軸方向に設定ピッチ移動させられる。具
体的には、複数種類の捜索テンプレートの各ポイントペ
アの座標がY軸方向を正方向へ設定ピッチ分ずれるよう
に座標変換が行われるのである。この捜索テンプレート
を用いて捜索対象部の捜索が行われる。この位置におい
て回転角度の異なる全種類の捜索テンプレートを用いて
も捜索対象部が存在するとの判定が得られなければ、次
に捜索テンプレートがX軸方向を正方向へ設定ピッチ分
ずらされる。さらにここでも捜索対象部が存在するとの
判定が得られなければ、次に捜索テンプレートはY軸方
向を負方向へ設定ピッチ分ずらされる。ここでも捜索対
象部が存在するとの判定が得られなければ、次に捜索テ
ンプレートは更にY軸方向を負方向へ設定ピッチ分ずら
され、さらにここでも捜索対象部が存在するとの判定が
得られなければ、次に捜索テンプレートはX軸方向を負
方向へ設定ピッチ分ずらされる。捜索テンプレートはサ
ーチウインドウ内を角形の螺旋形を描くように移動させ
られるのである。
The moving pitch is set in advance 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 rows are movement pitches. First, the set pitch is moved in the Y-axis direction. Specifically, coordinate conversion is performed such that the coordinates of each point pair of the plurality of types of search templates are shifted in the Y-axis direction in the positive direction by the set pitch. Using this search template, a search for the search target portion is performed. At this position, if it is not determined that the search target portion exists even if all types of search templates having different rotation angles are used, then the search template is shifted in the X-axis direction in the forward direction by the set pitch. Further, if it is not determined that the search target portion exists, the search template is then shifted in the Y-axis direction in the negative direction by the set pitch. If it is not determined here that the search target portion exists, the search template is further shifted in the Y-axis direction in the negative direction by the set pitch, and it must be determined that the search target portion also exists here. Then, the search template is shifted by the set pitch in the X-axis direction in the negative direction. The search template is moved in the search window so as to draw a square spiral.

【0054】捜索テンプレートを移動させても捜索対象
部が存在するとの判定を得ることができず、座標変換を
行ったとき、サーチウインドウからはみ出すポイントペ
アが生ずるに至れば、捜索テンプレートの移動は不可能
であって捜索テンプレートに適合する捜索対象部は存在
しないと判定され、捜索ステップは異常終了される。前
記モニタテレビ14に異常発生が表示されるとともに、
異常の発生が記憶される。画像処理対象部が被検査物1
22である場合には、画像処理結果が異常であると判定
された被検査物122の被検査物支持板72への載置位
置がオペレータによりチェックされ、載置位置が大きく
外れておれば、位置の修正が行われ、大きく外れていな
ければ、被検査物122は予定されたものではないと判
断されて、排除される。
Even if the search template is moved, it cannot be determined that the search target portion exists. If the coordinate conversion is performed and a point pair protrudes from the search window, the search template cannot be moved. It is determined that there is no search target portion that is possible and matches the search template, and the search step is abnormally terminated. An abnormality occurrence is displayed on the monitor TV 14, and
The occurrence of the abnormality is stored. Inspection object 1
In the case of 22, the operator checks the mounting position of the inspection object 122 determined to be abnormal in the image processing result on the inspection object support plate 72, and if the mounting position is greatly deviated, If the position is corrected and the position is not largely deviated, it is determined that the inspection object 122 is not the intended one and is removed.

【0055】図24に示す画像処理対象部の像220の
ように全部のポイントペア224の2個のポイントペア
構成点が像220のエッジの内側と外側とにあり、設定
輝度差条件が満たされれば、そのときの捜索テンプレー
トの位置および回転角度がDRAM156に記憶され、
再捜索ステップが実行される。再捜索ステップにおいて
は、図27に示すように再捜索テンプレート228を用
いて画像処理対象部の像220のエッジ点が、再捜索テ
ンプレート228の座標面である再捜索テンプレート座
標面(捜索テンプレート座標面と同じである)上におい
て捜索される。再捜索テンプレート228は、複数本の
シークライン230を含む。シークライン230は、捜
索ステップにおいて画像処理対象部の像220を見つけ
た捜索テンプレートに基づいて設定される。ポイントペ
アの2個のポイントペア構成点がシークライン230の
両端をそれぞれ規定する点とされるのである。
As shown in the image 220 of the image processing target portion shown in FIG. 24, two point pair constituting points of all the point pairs 224 are inside and outside the edge of the image 220, and the set luminance difference condition is satisfied. For example, the position and rotation angle of the search template at that time are stored in the DRAM 156,
A re-search step is performed. In the re-searching step, as shown in FIG. 27, using the re-search template 228, the edge point of the image 220 of the image processing target part is changed to the re-search template coordinate plane (search template coordinate plane) which is the coordinate plane of the re-search template 228. Is the same as above). The search template 228 includes a plurality of seek lines 230. The seek line 230 is set based on the search template that has found the image 220 of the image processing target portion in the search step. The two point-pair composing points of the point pair define the ends of the seek line 230, respectively.

【0056】設定された複数本のシークライン230の
それぞれについて画像処理対象部の像220のエッジ点
が捜索される。この捜索は、図28に示すように、予め
定められたピッチ(例えば0.05mm)でシークライン
230を分割し、複数の分割点P1〜P15の各々につ
いてそれぞれ輝度を演算することにより行われる。この
ピッチは、CCDカメラ76の固体撮像素子232の対
角線より短い長さに設定されている。そのため、1個の
固体撮像素子232の中に分割点が3個ないし4個含ま
れることとなる。分割点も仮想画面上の点であり、捜索
ステップにおけると同様に線形補間が行われ、分割点P
1〜P15の輝度が演算される。
An edge point of the image 220 of the image processing target portion is searched for each of the plurality of set seek lines 230. This search is performed by dividing the seek line 230 at a predetermined pitch (for example, 0.05 mm) as shown in FIG. 28 and calculating the luminance for each of the plurality of division points P1 to P15. This pitch is set to a length shorter than the diagonal line of the solid-state imaging device 232 of the CCD camera 76. Therefore, one or more solid-state imaging devices 232 include three or four division points. The division point is also a point on the virtual screen, and linear interpolation is performed as in the search step, and the division point P
The luminance of 1 to P15 is calculated.

【0057】線形補間によって演算された15個の分割
点P1〜P15の各輝度の一例を図29に示す。なお、
輝度値は正の値で表され、輝度値取得対象物が明るいほ
ど値は大きくなる。本実施形態の撮像装置10は、画像
処理対象部としての被検査物122と背景としての反射
面70とに平行光を照射し、それらの表面からの反射光
に基づいて像を取得するようにされており、以下の説明
は画像処理対象部が暗くて輝度値が小さく、背景は明る
くて輝度値が大きいものとして行う。線形補間によって
演算された輝度値からは、図32のグラフに示すよう
に、どこで輝度が最も大きく変化するかが判らない。そ
のため、差分フィルタを用いて輝度値の微分値を求め
る。図30に示す差分フィルタを用いて微分値を求めた
結果を図33のグラフに示す。この差分フィルタは、シ
ークラインを規定する一方の点から他方の点に向かっ
て、隣接する2個の点のうち上流側に位置する点の輝度
を負の値とし、下流側に位置する点を正の値とし、それ
ら2個の値の和を求めるフィルタである。この微分値は
分割点の値ではなく、図33のグラフにおいては、輝度
微分値の得られる位置が隣接2分割点の中央位置である
「.5」で示されている。このグラフから明らかなよう
に、輝度変化の大小は判るが、どこが最大であるかは判
らない。なお、演算方向に応じて、すなわち画像処理対
象部の内側にある分割点から画像処理対象部の外側(背
景内)にある分割点に向かって演算を行うか、逆に行う
かにより、輝度微分値の符号が逆になる。前者の場合は
輝度微分値が正の値になり、輝度微分値が最大の位置が
輝度の変化勾配の絶対値が最大の位置である(変化勾配
の絶対値が最大の位置の輝度微分値を極大値と称す
る)。後者の場合は輝度微分値が負の値になり、輝度微
分値が最小の位置が輝度の変化勾配の絶対値が最大の位
置である(変化勾配の絶対値が最大の位置の輝度微分値
を極小値と称する)。図33および次に説明する図34
のグラフに示す輝度微分値は、前者の演算により得られ
た値である。
FIG. 29 shows an example of the luminance of each of the fifteen division points P1 to P15 calculated by the linear interpolation. In addition,
The luminance value is represented by a positive value, and the value increases as the luminance value acquisition target is brighter. The imaging apparatus 10 of the present embodiment irradiates the inspection object 122 as an image processing target unit and the reflecting surface 70 as a background with parallel light, and acquires an image based on the reflected light from those surfaces. In the following description, it is assumed that the image processing target portion is dark and has a small luminance value, and the background is bright and the luminance value is large. From the luminance value calculated by linear interpolation, it is not known where the luminance changes the most, as shown in the graph of FIG. Therefore, a differential value of the luminance value is obtained using a difference filter. FIG. 33 is a graph showing the result of obtaining a differential value using the difference filter shown in FIG. This difference filter sets the brightness of a point located on the upstream side of two adjacent points from one point defining the seek line to the other point to a negative value, and sets the point located on the downstream side to a negative value. This is a filter that takes a positive value and calculates the sum of those two values. This differential value is not the value of the division point. In the graph of FIG. 33, the position at which the luminance differential value is obtained is indicated by ".5" which is the center position of the adjacent two division points. As is clear from this graph, although the magnitude of the luminance change is known, it is not known where the change is the maximum. It should be noted that depending on the calculation direction, that is, whether the calculation is performed from the division point inside the image processing target portion toward the division point outside the image processing target portion (inside the background) or vice versa, The sign of the value is reversed. In the former case, the luminance differential value is a positive value, and the position where the luminance differential value is the maximum 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) Maxima). 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). FIG. 33 and FIG. 34 described next.
Is a value obtained by the former calculation.

【0058】それに対し、図31に示す差分フィルタを
用いて微分を行えば、図34のグラフに示すように、f
8.5の位置に輝度微分値の極大値177が得られ、こ
の位置が輝度の変化勾配の絶対値が最大の位置であるこ
とが判る。図31に示す差分フィルタは、シークライン
上に設定された分割点のうちの1つに対して、その分割
点を含んで演算方向において上流側の4個の分割点をい
ずれも負の値とし、下流側において連続する4個の分割
点の輝度値をいずれも正の値とし、それらの和を求める
フィルタである。
On the other hand, if differentiation is performed using the difference filter shown in FIG. 31, as shown in the graph of FIG.
A maximum value 177 of the luminance differential value is obtained at the position of 8.5, and it is understood that this position is the position where the absolute value of the luminance change gradient is the maximum. The difference filter shown in FIG. 31 sets one of the four division points on the upstream side in the calculation direction including one of the division points set on the seek line to a negative value. , A filter for obtaining the sum of the luminance values of all four continuous division points on the downstream side as positive values.

【0059】固体撮像素子のエッジ点に対応する部分に
汚れ等が付着して電荷量に変化が生ずれば、エッジ点で
はない位置において輝度微分値の極大値あるいは極小値
が得られることがあるが、そのような位置における輝度
の変化勾配の絶対値は小さい。それに対しエッジ点近傍
においては、画像処理対象部と背景との明るさに顕著な
差があって輝度の変化勾配の絶対値が大きい。そのた
め、設定値を設け、変化勾配の絶対値が最も大きい位置
の輝度微分値が、エッジ点近傍について得られた値であ
るか否かを判定し、前者の場合を排除する。この設定値
は、輝度微分値が正の値で得られる場合には正の値で設
定され、輝度微分値の極大値が設定値以上であるか否か
が判定され、極大値が設定値以上であれば、その極大値
はエッジ点近傍の位置に得られた値であって、エッジ点
の演算に用いることができると判定され、エッジ点の演
算が行われる。また、輝度微分値が負の値で得られる場
合には、設定値は負の値で設定され、輝度微分値の極小
値が設定値以下であるか否かが判定され、極小値が設定
値以下であれば、その極小値をエッジ点の演算に用いる
ことができると判定される。換言すれば、輝度微分値の
極大値が設定値より小さく、あるいは極小値が設定値よ
り大きくてエッジ点が演算されないことが再捜索ステッ
プにおけるシークラインのフェールである。
If dirt or the like adheres to the portion corresponding to the edge point of the solid-state imaging device and the charge amount changes, a maximum value or a minimum value of the luminance differential value may be obtained at a position other than the edge point. However, the absolute value of the luminance change gradient at such a position is small. On the other hand, near the edge point, there is a remarkable difference in brightness between the image processing target portion 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 largest is a value obtained near the edge point, and the former case is excluded. This set value is set to a positive value when the luminance derivative value is obtained as a positive value, and it is determined whether or not the maximum value of the luminance derivative value is equal to or greater than the set value. If, the local maximum value is a value obtained at a position near the edge point and is determined to be usable for the calculation of the edge point, and the calculation of the edge point is performed. If the luminance derivative 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 derivative is equal to or less than 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 fact that the maximum value of the luminance differential value is smaller than the set value or the minimum value is larger than the set value and the edge point is not calculated is a seek line failure in the re-search step.

【0060】図17に示す例においては、図32および
図33に示す例と同様に、画像処理対象部の内側にある
分割点から外側にある分割点に向かって輝度微分値の演
算を行うように決められており、輝度値の変化勾配の絶
対値が最も大きい位置において輝度微分値は最大にな
り、その極大値がエッジ点近傍において得られた値であ
るか否かを判定する設定値は、正の値、すなわち第5行
に示すようにll=200とされている。本例では画像
処理対象部の方が背景より暗いため、輝度微分値が正の
値で求められるとともに、その値が200以上でなけれ
ば、エッジ点の位置の演算が行われないようにされてい
る。
In the example shown in FIG. 17, similarly to the examples shown in FIGS. 32 and 33, the calculation of the luminance differential value is performed from the division point inside the image processing target portion to the division point outside. Is set at the position where the absolute value of the change gradient of the luminance value is the largest, and the setting value for determining whether or not the maximum value is a value obtained near the edge point is , A positive value, ie, 11 = 200 as shown in the fifth row. In this example, since the image processing target part 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. I have.

【0061】また、図17に示すように、どのような差
分フィルタを用いて演算を行うかも予め決められてい
る。この差分フィルタ係数Nは(2)式に従って演算さ
れる。 N=gUnit/分割点間ピッチ・・・・・・・(2) ただし、gUnit は固体撮像素子の対角線の長さである。
Further, as shown in FIG. 17, it is predetermined in advance what kind of difference filter is to be used for the calculation. This difference filter coefficient N is calculated according to the equation (2). N = gUnit / pitch between division points (2) where gUnit is the length of a diagonal line of the solid-state imaging device.

【0062】差分フィルタを用いて微分が行われ、輝度
微分値の極大値(または極小値)が得られれば、輝度の
変化勾配の絶対値が最大の位置、すなわちエッジ点が下
記の式に従って求められる。なお、(3)式および
(4)式は、N=4の場合を例に取った式であり、f
max ,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) はそれぞれ、演算方向においてf
max より上流側の4個所(図33に示す例ではf7.5 ,
f6.5 ,f5.5 ,f4.5 )の各輝度微分値であり、f
(max+1) ,f(max+2),f(max+3) ,f(max+4はそれぞ
れ、演算方向においてfmax より下流側の4個所(図3
3に示す例では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) エッジ点=(輝度微分値極大(小)値点ピッチ数+edge
Pitch)×分割点ピッチ・・・・・(6)(3)式および
(4)式はN=4の場合の式であるが、一般的には、d
lを求める場合、極大(小)値点の輝度微分値にNを掛
けた値から、演算方向において極大(小)値点より上流
側のN個の点の各輝度微分値の和が引かれ、drを求め
る場合、極大(小)値点の輝度微分値にNを掛けた値か
ら、極大(小)値点より下流側のN個の点の各輝度微分
値の和が引かれる。なお、図29に示す演算結果を図3
1に示す差分フィルタを用いて微分を行った場合にエッ
ジ点を求めるとき、(6)式の輝度微分値極大(小)値
点ピッチ数は、8.5である。
When the differentiation is performed using the difference filter and the maximum value (or the minimum value) of the luminance differential value is obtained, the position where the absolute value of the luminance change gradient is the maximum, that is, the edge point is obtained according to the following equation. Can be Expressions (3) and (4) are expressions taking the case of N = 4 as an example, and f
max , f (max-4) to f (max-1) , f (max + 1) to f
(max + 4) is the luminance differential value (f max is local maximum (small))
Value). “F” is, as shown in FIG. 34, numbered to indicate the acquisition position of the luminance differential value on the seek line, and is designated by the number added to f in the equations (3) and (4). Represents the luminance differential value of the position to be set. f max is a position where the luminance differential value is maximum (small) (in the example shown in FIG. 33, f 8.
5) is the luminance differential value of f (max-1) , f (max-2) , f
(max-3) and f (max-4) are respectively f
The four locations upstream of max (f7.5 in the example shown in FIG. 33,
f6.5, f5.5, f4.5).
(max + 1) , f (max + 2) , f (max + 3) , f (max + 4) are respectively four locations downstream of f max in the calculation direction (FIG. 3
In the example shown in FIG. 3, the luminance differential values are 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 = (Pitch number of luminance differential value local maximum (small) value point + edge
Pitch) × division point pitch (6) Expressions (3) and (4) are expressions when N = 4, but in general, d
When determining l, the sum of the luminance differential values of N points upstream of the local maximum (small) value point in the calculation direction is subtracted from the value obtained by multiplying the luminance differential value of the local maximum (small) value point by N. , Dr, the sum of the luminance differential values of N points downstream from the local maximum (small) value point is subtracted from the value obtained by multiplying the luminance differential value of the local maximum (small) value point by N. Note that the calculation results shown in FIG.
When an edge point is obtained when differentiation is performed using the difference filter shown in FIG. 1, the maximum (small) luminance derivative value point pitch number of Expression (6) is 8.5.

【0063】エッジ点の演算時には、まず、線形補間に
より分割点の輝度が演算され、差分フィルタ係数Nに従
って微分が行われた後、(3)〜(6)式に従って演算
が行われて輝度の最大変化位置、すなわちエッジ点が求
められる。図28に示すシークライン230の場合、
(6)式の演算結果は0.403mmになり、シークライ
ン230の分割点P1から0.403mmの位置にエッジ
点があることが判る。
When calculating the edge point, first, the luminance of the division point is calculated by linear interpolation, the differentiation is performed according to the difference filter coefficient N, and then the calculation is performed according to the equations (3) to (6). The maximum change position, that is, the edge point is obtained. In the case of the seek line 230 shown in FIG.
The calculation result of the equation (6) is 0.403 mm, which indicates that there is an edge point at a position 0.403 mm from the division point P1 of the seek line 230.

【0064】このようにして複数本のシークライン23
0の各々についてエッジ点が演算される。シークライン
230のフェール数(ポイントペア202のフェール数
が設定数以下である場合には捜索テンプレートに適合す
る捜索対象部が存在すると判定されるようにされている
場合には、ポイントペア202のフェール数とシークラ
イン230のフェール数との和)が設定数以下であれば
正常であると判定されて測定ステップが実行され、設定
数を越えるフェールがあれば異常終了される。異常発生
時の処理は捜索ステップと同じである。図17において
は第3行に示すようにfail Countが0に設定されてお
り、フェールが1つでもあれば再捜索ステップは異常終
了させられる。
In this manner, a plurality of seek lines 23
An edge point is computed for each of the zeros. The number of failures of the seek line 230 (if the number of failures of the point pair 202 is less than or equal to the set number, if it is determined that there is a search target portion that matches the search template, the number of failures of the point pair 202 If the sum of the number and the number of failures of the seek line 230) is equal to or smaller 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 row, and if there is at least one failure, the re-search step is abnormally terminated.

【0065】フェール数が設定数以下であり、再捜索ス
テップが正常に終了すれば、次に測定ステップが実行さ
れる。再捜索テンプレートは、捜索ステップにおいて捜
索対象部ありと判定した捜索テンプレートに基づいて設
定されており、シークライン230上においてエッジ点
を見つけることはできるが、エッジ点とシークライン2
30の中点(図27に×印を付して示し、以下、アイデ
アルポイントと称する)との間にはずれがあるのが普通
である。前記ポイントペアを構成する2個の点は、捜索
対象部に寸法,位置,回転角度のずれがなければそれら
2個の点の中点が捜索対象部のエッジ上に位置するよう
に設定されており、アイデアルポイントとエッジ点とが
一致するはずであるが、実際には画像処理対象部にはず
れがあり、アイデアルポイントと演算により得られたエ
ッジ点とにはずれが生ずるのである。
If the number of failures is equal to or less than the set number and the re-search step is completed normally, the measurement step is executed next. The re-search template is set based on the search template determined to have the search target portion in the search step, and an edge point can be found on the seek line 230, but the edge point and the seek line 2
Usually, there is a deviation from the midpoint of 30 (shown with an X mark in FIG. 27 and hereinafter referred to as an ideal point). The two points forming the point pair are set such that the middle point of the two points is located on the edge of the search target portion if there is no deviation in the size, position, and rotation angle of the search target portion. Thus, the ideal point and the edge point should match, but in reality, there is a deviation in the image processing target portion, and a deviation occurs between the ideal point and the edge point obtained by the calculation.

【0066】そのため、再捜索ステップが異常なく実行
されれば、次に測定ステップが実行され、エッジ点の位
置が演算される。測定ステップにおいては、まず、図3
5に示すような測定テンプレート236が自動設定され
る。測定テンプレート236は、複数のシークライン2
38を有しており、予め設定されたマスタ測定テンプレ
ートのデータと、上記再捜索ステップにおける再捜索テ
ンプレート座標面の基準座標面に対する相対位置のデー
タと、再捜索テンプレート座標面上におけるエッジ点の
演算結果とに基づいて設定される。
Therefore, if the re-search step is executed without any abnormality, the measurement step is executed next, and the position of the edge point is calculated. In the measurement step, first, FIG.
The measurement template 236 shown in FIG. 5 is automatically set. The measurement template 236 includes a plurality of seek lines 2
38, data of a preset master measurement template, data of a relative position of the re-search template coordinate plane with respect to the reference coordinate plane in the re-search step, and calculation of an edge point on the re-search template coordinate plane. It is set based on the result.

【0067】マスタ測定テンプレートデータは、前記図
17に例示するように、マスタ捜索テンプレートデータ
等と共に記憶されている。図17の第20行〜33行の
データが測定ステップ実行のためのデータであり、第2
1行のhs=3.5,第23行〜27行および第29行
〜33行のデータがマスタ測定テンプレートデータであ
る。このデータにより得られるマスタ測定テンプレート
240を図19に示す。242はシークラインである。
マスタ測定テンプレート240は同じ電子部品用のマス
タ捜索テンプレートより多くのシークラインを有してい
る。なお、画像処理対象部が一部が切り欠かれた円板2
06の場合には、図23に示すように複数のシークライ
ン246を有するマスタ測定テンプレート244が設定
される。
As shown in FIG. 17, the master measurement template data is stored together with the master search template data and the like. The data in the 20th to 33rd lines in FIG.
The data of one line hs = 3.5, lines 23 to 27 and lines 29 to 33 are master measurement template data. FIG. 19 shows a master measurement template 240 obtained from this data. 242 is a seek line.
The master measurement template 240 has more seek lines than the master search template for the same electronic component. It should be noted that the image processing target portion is a partially cut-out disk 2.
In the case of 06, a master measurement template 244 having a plurality of seek lines 246 is set as shown in FIG.

【0068】測定テンプレートのシークラインの一部あ
るいは全部がペアにされている。シークラインの延長線
上に、画像処理対象部の中心線に対して対称に別のシー
クラインが設定されているのである。これらペアにされ
たシークラインをペアシークラインと称する。測定テン
プレートは、マスタ測定テンプレートデータの座標変換
によって設定される。再捜索テンプレートの座標面(こ
の再捜索テンプレートの座標面は、捜索ステップにおい
て画像処理対象部が捜索テンプレートに適合する捜索対
象部であると判定された際の捜索テンプレートの捜索テ
ンプレート座標面と共通である)の基準座標面に対する
相対位置および相対回転角度と、再捜索テンプレート座
標面に対する画像処理対象部の相対位置および相対回転
角度(これらは再捜索ステップにおいて演算されたエッ
ジ点の座標値に基づいて演算されるが、この演算につい
ては後に説明する)とに対応する座標変換を、マスタ測
定テンプレートデータ(基準座標面と一致するマスタ測
定テンプレート座標面において設定されている)に施し
て設定されるのである。
Some or all of the seek lines of the measurement template are paired. Another seek line is set on the extension line of the seek line symmetrically with respect to the center line of the image processing target portion. These paired seek lines are referred to as pair seek lines. The measurement template is set by coordinate conversion of the master measurement template data. The coordinate plane of the re-search template (the coordinate plane of the re-search template is the same as the coordinate plane of the search template of the search template when the image processing target section is determined to be the search target section conforming to the search template in the search step. ) 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 target unit 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). The calculation is performed, and this calculation will be described later.) This is set by performing a coordinate conversion corresponding to the master measurement template data (set on the master measurement template coordinate plane coincident with the reference coordinate plane). is there.

【0069】測定テンプレートの自動設定が終了したな
らば、その測定テンプレートの各シークライン上のエッ
ジ点の演算が、再捜索ステップにおけるそれと同様に行
われる。シークライン上に一定ピッチで分割点が設定さ
れ、分割点毎に線形補間によって輝度が演算されるとと
もに、差分フィルタが用いられて輝度微分値が演算され
るとともにエッジ点が演算されるのである。測定ステッ
プにおいても、許容されるフェールの数が設定されてい
る。ここにおけるフェールは、再捜索ステップにおける
と同様に、シークラインについてエッジ点が演算されな
いことを意味する。フェール数が設定数以下であれば正
常とされ、次に再測定ステップが実行される。また、フ
ェール数が設定数を越える数あれば測定ステップは異常
終了させられる。異常発生時の処理は捜索ステップにお
けると同じである。
When the automatic setting of the measurement template is completed, the calculation of the edge points on each seek line of the measurement template is performed in the same manner as in the re-search step. Division points are set at a constant pitch on the seek line, luminance is calculated by linear interpolation for each division point, a luminance differential value is calculated using a difference filter, and an edge point is calculated. Also in the measurement step, the number of allowable failures is set. A failure here means that no edge point is calculated for the seek line, as in the re-search step. If the number of failures is equal to or less than 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 abnormally terminated. The processing when an abnormality occurs is the same as in the search step.

【0070】再測定ステップにおいては再測定テンプレ
ートが設定され、エッジ点が演算される。再測定テンプ
レートは、測定テンプレートおよび測定ステップにおい
て演算されたエッジ点に基づいて自動設定される。測定
ステップにおいて得られたエッジ点に基づき、アイデア
ルポイントがエッジ点上に位置すると予想される位置へ
測定テンプレートが座標変換により回転移動させられる
のである。再測定ステップにおけるエッジ点の演算も再
捜索ステップにおけると同様に行われる。
In the re-measurement step, a re-measurement template is set, and an edge point is calculated. The re-measurement template is automatically set based on the measurement template and the edge points calculated in the measurement step. Based on the edge points 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 the edge point in the re-measurement step is performed in the same manner as in the re-search step.

【0071】再測定ステップにおける異常の判定は、測
定ステップについて設定された許容フェール数が用いら
れ、エッジ点の得られないシークラインが設定数より多
くあれば異常であって画像処理が終了される。異常発生
時の処理は捜索ステップにおけると同じである。設定数
以下であれば正常終了され、次にオブジェクトベクト
ル、すなわち画像処理対象部の寸法,位置,回転角度が
演算される。再測定ステップの実行回数が多いほどアイ
デアルポイントとエッジ点とのずれが少なくなり、エッ
ジ点の検出精度が向上する。再測定ステップの設定回数
は予め設定されて記憶されている。なお、2回目以降の
再測定ステップの実行に用いられる再測定テンプレート
は、その直前の再測定ステップ実行時における再測定テ
ンプレートとその再測定ステップにおけるエッジ点の演
算結果とから自動設定される。
The determination of abnormality in the re-measurement step uses the allowable number of failures set for the measurement step. If the number of seek lines for which no edge points are obtained is larger 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 equal to or smaller 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 target portion are calculated. The greater the number of times the re-measurement step is performed, the smaller the difference between the ideal point and the edge point, and the detection accuracy of the edge point is improved. The set number of remeasurement steps is set and stored in advance. The re-measurement template used for executing the second and subsequent re-measurement steps is automatically set based on the re-measurement template at the time of the immediately preceding re-measurement step and the calculation result of the edge point in the re-measurement step.

【0072】モニタテレビ14には、画像処理の経過が
表示される。例えば、捜索ステップの実行時には、フレ
ームグラバメモリ164に格納されている画像データ
(例えば、4つの被検査物122を撮像した4セットの
画像データの1セット)に基づいて画像処理対象部(被
検査物122)の像と背景とを含む画像がモノクロ表示
され、その上に捜索テンプレートの角度が設定ピッチず
つ変えられるとともに角形の螺旋状に位置が変えられる
様子がカラー表示され、作業者に処理の進行状況が示さ
れる。
The progress of the image processing is displayed on the monitor television 14. For example, at the time of executing the search step, the image processing target unit (the inspection target) is based on the image data stored in the frame grabber memory 164 (for example, one set of four sets of image data obtained by imaging the four inspection objects 122). An image including the image of the object 122) and the background is displayed in monochrome, on which the angle of the search template is changed by the set pitch and the position of the search template is changed in a spiral shape in color are displayed in color. Progress is shown.

【0073】モニタテレビ14は、自動選択表示モード
と手動選択表示モードとの2つのモードで表示が可能な
ものとされており、自動選択表示モードに設定されてい
る場合には、画像処理経過の表示と、入力装置16から
の入力に関連した入力関連データとの両方が、入力関連
データを優先させつつ表示される。したがって、自動選
択表示モードに設定されている状態で、入力装置16に
よりデータが入力されれば、上記画像処理経過の表示か
ら自動的に入力関連データの表示に切り換えられる。手
動表示選択モードにおいては、画像処理経過の表示と入
力関連データの表示とのうち、オペレータの手動操作に
よって選択された方のみの表示が行われる。
The monitor television 14 is capable of displaying images in two modes, an automatic selection display mode and a manual selection display mode. Both the display and the input-related data related to the input from the input device 16 are displayed while giving priority to the input-related data. Therefore, if data is input by the input device 16 in the automatic selection display mode, the display of the progress of the image processing is automatically switched to the display of the input-related data. In the manual display selection mode, of the display of the progress of the image processing and the display of the input related data, only the one selected by the manual operation of the operator is displayed.

【0074】次に、画像処理対象部のオブジェクトベク
トルの演算について説明する。以下に説明する演算を行
うためのオブジェクトベクトル演算プログラムはメモリ
カードに記憶されており、メモリカードの画像処理装置
12へのセット時にDRAM156に移される。寸法,
位置,回転角度は指定がある場合に演算される。例え
ば、図17の例においては、第5行および第21行のv
f=PAのPが位置(Position) ,Aが角度(Angle) を
表し、位置および回転角度を演算することが指定されて
いる。
Next, the calculation of the object vector of the image processing target portion 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 156 when the memory card is set in the image processing device 12. Size,
The position and rotation angle are calculated when specified. For example, in the example of FIG.
P of f = PA represents a position (Position), A represents an angle (Angle), and it is specified that a position and a rotation angle are calculated.

【0075】寸法演算は例えば次の場合に必要になる。
画像処理対象部の寸法が必要な場合、画像処理対象
部を、捜索対象部に似ているが捜索対象部ではないもの
と識別したい場合、エッジ測定にフェールがあり、か
つ、位置測定精度を確保したい場合等である。は、例
えば、形状が同じで寸法が少し異なる電子部品を区別す
ることが必要な場合である。の場合に寸法演算が必要
になるのは、フェールがある場合には、後述のようにフ
ェールを考慮して画像処理対象部の位置を求めるために
寸法が必要であるからである。本実施形態においても、
上記〜のいずれにも該当しない場合には寸法演算は
行われないが、寸法演算の必要がある場合には、位置お
よび回転角度の演算に先立って行われる。
The dimension calculation is required, for example, in the following case.
If the size of the image processing target is required, and if you want to identify the image processing target as similar to the search target but not the search target, there is a failure in the edge measurement and the position measurement accuracy is secured Such as when you want to. This is the case, for example, when it is necessary to distinguish electronic components having the same shape but slightly different dimensions. The reason why the dimension calculation is required in the case of (1) is that if there is a failure, the dimension is required to determine the position of the image processing target portion in consideration of the failure as described later. Also in this embodiment,
If none of the above-mentioned conditions applies, the dimension calculation is not performed, but if the dimension calculation is necessary, it is performed prior to the calculation of the position and the rotation angle.

【0076】以下、画像処理対象部が四角形の被検査物
122であり、寸法,位置,角度の演算が指定されてお
り、かつ、フェールがある場合を例に取って説明する。
まず、寸法演算を説明する。寸法演算は、寸法演算に使
う旨の指示があるペアシークラインを用いて行われる。
換言すれば、いずれのシークラインにも寸法演算に使う
旨の指示がない場合,指示があってもシークラインがペ
アシークラインでない場合には寸法演算が行われないの
である。1つのテンプレート内にシークラインについて
寸法演算を行う旨の指定が1つもないときにはフラグが
0にセットされ、1つでも指定があればフラグが1にセ
ットされることにより、寸法演算を行うか否かが判定さ
れる。このようにすれば、寸法演算が不要である場合
に、複数本のシークラインの一つ一つについて寸法演算
に使うことが指示されているか否かを判定することなく
寸法演算不要を知ることができ、処理時間が短くて済
む。
The following is an example of a case where the image processing target portion is the rectangular inspection object 122, the calculation of the size, position, and angle is specified, and there is a failure.
First, the dimension calculation will be described. The dimension calculation is performed using a pair seek line instructed to use for the dimension calculation.
In other words, if there is no instruction to use the dimension calculation for any of the seek lines, or if the seek line is not a paired seek line even if the instruction is given, the dimension calculation is not performed. The flag is set to 0 when there is no designation to perform the dimension calculation for the seek line in one template, and the flag is set to 1 when there is at least one designation, so that the dimension calculation is performed. Is determined. In this way, when the dimension calculation is unnecessary, it is possible to know that the dimension calculation is unnecessary without determining whether or not it is instructed to use each of the plurality of seek lines for the dimension calculation. Processing time is short.

【0077】寸法演算の最初はサイズファクタの演算で
ある。サイズファクタは、画像処理対象部の寸法の、測
定テンプレート座標面(測定テンプレートの設定座標
面)のX軸方向とY軸方向とのそれぞれにおける過大率
である。X軸方向の寸法過大率は、図36に四角形物2
50を示すように、X軸方向に平行に設定された複数組
のペアシークラインの各組のシークラインのエッジ点間
の距離(測定スパンと称する)をペアシークラインのア
イデアルポイント(図中×印が付された点)間の距離
(本来のスパンと称する)で除した値を平均することに
より求められる。また、Y軸方向の寸法過大率は、Y軸
方向に設定された複数組のペアシークラインの各組のペ
アシークラインの測定スパンを本来のスパンで除した値
を平均することにより求められる。なお、図36に破線
で示すのは、フェールが生じたシークラインであり、フ
ェールの生じたシークラインを含むペアシークラインに
ついては、寸法過大率は演算されない。これらX軸方向
の寸法過大率およびY軸方向の寸法過大率をそれぞれ、
四角形物250のX軸方向,Y軸方向の各本来のスパン
に掛けることにより寸法が演算される。
The first of the dimensional operations is the operation of the size factor. The size factor is an excessive rate of the dimension of the image processing target portion in each of the X-axis direction and the Y-axis direction of the measurement template coordinate plane (measurement template setting coordinate plane). The dimension excess ratio in the X-axis direction is shown in FIG.
As shown at 50, the distance (referred to as measurement span) between the edge points of each set of seek lines of a plurality of pairs of set seek lines set in parallel to the X-axis direction is the ideal point of the pair seek line (× in the figure). It is determined by averaging the values divided by the distance between the points (marked points) (called the original span). In addition, the dimensional excess rate in the Y-axis direction is obtained by averaging values obtained by dividing the measurement span of each of the plurality of pairs of seek lines set in the Y-axis direction by the original span. Note that the broken line in FIG. 36 indicates a seek line in which a failure has occurred. For a pair seek line including a seek line in which a failure has occurred, the oversize ratio is not calculated. The dimensional excess rate in the X-axis direction and the dimensional excess rate in the Y-axis direction
The dimension is calculated by multiplying each of the original spans of the rectangular object 250 in the X-axis direction and the Y-axis direction.

【0078】複数本のシークラインのいずれか1つにで
もフェールがあれば、フェールのないシークラインの全
部についてアイデアルポイントをサイズファクタで補正
した点であるサイズポイントが演算される。図37に例
を示すように、Y軸方向にほぼ平行なシークラインにつ
いては、アイデアルポイントのY座標値にY軸方向の寸
法過大率を掛けることによりサイズポイントのY座標値
が演算され、図示は省略するが、X軸方向に平行なシー
クラインについては、アイデアルポイントのX座標値に
X軸方向の寸法過大率を掛けることにより演算される。
If any one of the plurality of seek lines has a failure, a size point which is a point obtained by correcting an ideal point by a size factor is calculated for all of the seek lines having no failure. 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, a 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.

【0079】また、前述のように、サイズファクタの演
算はX軸およびY軸に平行なシークラインであってペア
にされているもののみを使用して行われるが、この得ら
れたサイズファクタを用いたサイズポイントの演算等
は、X軸ともY軸とも平行ではないシークラインについ
ても行われる。傾斜したシークラインについてのサイズ
ポイントの演算および以下の演算は、後述の円形の画像
処理対象部(被検査物)におけるサイズポイントの演算
等と実質的に同じである。
As described above, the calculation of the size factor is performed by using only the paired seek lines parallel to the X axis and the Y axis. The calculation of the used size point and the like are also performed for seek lines that are 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 target portion (inspection object) described later.

【0080】次いで、エッジ点とサイズポイントとの差
Diffが演算される。サイズポイントは、寸法誤差を有す
る画像処理対象部に対して、その寸法誤差を承認した上
で改めて測定テンプレートを設定し直したと考えた場合
のアイデアルポイントに相当する。したがって、上記エ
ッジ点とサイズポイントとの差Diffはエッジ点の位置ず
れ量そのものを表していることになる。差Diffの演算
は、エッジ点の座標値からサイズポイントの座標値を引
くことにより行われるため、差Diffが正の値である場合
にはエッジ点が測定テンプレート座標面上において正側
へずれていることになるのである。
Next, the difference between the edge point and the size point
Diff is calculated. The size point corresponds to an ideal point when it is considered that the measurement template is reset for the image processing target portion having the dimensional error after the dimensional error is approved. Therefore, the difference Diff between the edge point and the size point indicates the positional deviation amount of the edge point itself. Since the difference Diff is calculated by subtracting the coordinate value of the size point from the coordinate value of the edge point, when the difference Diff is a positive value, the edge point is shifted to the positive side on the measurement template coordinate plane. You will be.

【0081】このようにフェールがある場合にサイズポ
イントを演算するのは、画像処理対象部の位置の演算に
対するフェールの影響を小さくし、演算誤差を小さくす
るためである。例えば、画像処理対象部の寸法が本来の
寸法より大きいが位置ずれはない場合に、演算誤差ペア
シークラインを構成する一方のシークラインにフェール
があり、他方のシークラインにフェールがないとすれ
ば、サイズポイントを演算せず、アイデアルポイントの
ままで演算を行った場合には、フェールのない側におい
てエッジ点とアイデアルポイントとの差の和がフェール
のある側より大きくなり、実際には位置ずれはないにも
かかわらず画像処理対象部がフェールのないシークライ
ン側にずれているとの演算結果が出されてしまうため、
これを回避するためにサイズポイントの演算を行うので
ある。
The reason why the size point is calculated when there is a failure is to reduce the effect of the failure on the calculation of the position of the image processing target portion and reduce the calculation error. For example, if the size of the image processing target portion is larger than the original size but there is no displacement, if one of the seek lines constituting the calculation error pair seek line has a failure and the other seek line has no failure, If the calculation is performed with the ideal point without calculating the size point, the sum of the difference between the edge point and the ideal point is larger on the side without the failure than on the side with the failure, and the position is actually shifted. Calculation result that the image processing target part is shifted to the seek line side where there is no failure even though there is no
In order to avoid this, the calculation of the size point is performed.

【0082】次に位置および回転角度の演算を説明す
る。寸法検査装置においては被検査物122の外のり寸
法あるいは内のり寸法のみが取得されればよい場合が多
いが、画像処理対象部が、被検査物122の表面に記載
されたキャラクタや、被検査物122の表面に発生して
いる傷等である場合や、電気部品装着装置において吸着
ヘッドに保持された電気部品146である場合には、そ
れらの位置や回転角度の検出が必要となることがしばし
ばある。回転角度の演算は、0度,90度,180度,
270度のシークラインであって、かつ、回転角度の演
算に使用することが指示されているシークラインに基づ
いてのみ行われる。また、0度と180度,90度と2
70度との各処理は一括して行われる。
Next, the calculation of the position and the rotation angle will be described. In many cases, only the outer dimension or inner dimension of the inspection object 122 needs to be acquired by the dimension inspection apparatus. However, the image processing target portion may be a character described on the surface of the inspection object 122 or an inspection object. In the case of a scratch or the like occurring on the surface of the electronic component 122, or in the case of the electrical component 146 held by the suction head in the electrical component mounting apparatus, it is often necessary to detect the position and the rotation angle thereof. is there. The calculation of the rotation angle is 0, 90, 180,
This is performed only based on a 270-degree seek line that is instructed to be used for calculating the rotation angle. Also, 0 and 180 degrees, 90 and 2
Each process of 70 degrees is performed collectively.

【0083】位置および回転角度は、回転中心RCにつ
いて演算される。回転中心RCとはコンピュータの演算
上の中心であり、オペレータが画像処理対象部の中心と
して指定する指定中心DCとは異なる場合もあり、一致
する場合もある。指定中心DCは、被検査物122の平
面形状に中心点がある場合にはその中心点とされるのが
普通であるが、中心点がない場合には勿論、中心点があ
る場合でも他の点が指定中心DCとされても差し支えな
い。画像処理対象部が電気部品146である場合には、
その電気部品146を回路基材に装着するプログラムの
作成に当たり、画像処理対象部の基準とされる点が指定
中心DCとされる。また、前記マスタ捜索テンプレート
座標面,マスタ測定テンプレート座標面等の原点が指定
中心DCに置かれ、さらに、後述するように、指定中心
DCについて電気部品146の水平面内における位置修
正量が演算される。
The position and the rotation angle are calculated for the rotation center RC. The rotation center RC is a calculation center of the computer, and may be different from the specified center DC specified by the operator as the center of the image processing target portion, and may be the same. The designated center DC is usually set to the center point when the planar shape of the inspection object 122 has a center point. The point may be set as the designated center DC. When the image processing target portion is the electric component 146,
In creating a program for mounting the electric component 146 on a circuit substrate, a point used as a reference of the image processing target portion is set as a designated center DC. Also, the origins of the master search template coordinate plane, master measurement template coordinate plane, and the like are set at the designated center DC, and the position correction amount of the electric component 146 in the horizontal plane is calculated for the designated center DC as described later. .

【0084】まず、図38に示す直線Lを例に取り、位
置および回転角度の演算を説明する。直線Lには本来は
4本のシークラインが設定されていたが1本がフェール
したか、あるいは当初から3本のシークラインが設定さ
れていたかにより、3本のシークラインSL1 ,SL
2 ,SL3 について上記差Diffが演算されたとすれば、
回転中心RCは左側の2本のシークラインSL1 ,SL
2 寄りに設定される。回転中心RCは、一方の側の複数
本のシークラインと回転中心RCとの各距離の和(シー
クラインが1本の場合、そのシークラインと回転中心R
Cとの距離)の絶対値と、他方の側の複数本のシークラ
インと回転中心との距離の和(シークラインが1本の場
合、そのシークラインと回転中心RCとの距離)の絶対
値とが等しくなる位置に設定される。換言すれば、回転
中心RCの一方の側を正,他方の側を負とすれば、全部
のシークラインまでの距離の和が0になる位置に回転中
心RCが設定されるのである。回転角度(ラジアン)
は、(7)式によって演算される。 回転角度=(AO・A′+BO・B′+CO・C′)/(AO2 +BO2 +CO 2 )・・・・・・・・・(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)
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, the straight line L
Four seek lines were set, but one failed
Or three seek lines have been set from the beginning.
3 seek lines SL1 , SL
Two , SLThree If the above-mentioned difference Diff is calculated for
The center of rotation RC is the two seek lines SL on the left.1 , SL
Two Set closer. The number of rotation centers RC is plural on one side.
Sum of each distance between the book seek line and the rotation center RC (see
When there is only one kline, the seek line and the rotation center R
Distance to C) and the multiple
The sum of the distance between the in and the center of rotation (for a single seek line)
The distance between the seek line and the rotation center RC)
Set to a position where the value is equal. In other words, rotation
If one side of the center RC is positive and the other side is negative,
Rotating to a position where the sum of the distances to the seek line is zero
The heart RC is set. Rotation angle (radian)
Is calculated by equation (7). Rotation angle = (AO.A '+ BO.B' + CO.C ') / (AOTwo + BOTwo + CO Two ) ... (7) where AO: rotation center RC and seek line SL1 BO: Rotation center RC and seek line SLTwo CO: Rotation center RC and seek line SLThree A ': Difference Diff on seek line A Diff B': Difference Diff on seek line B C ': Difference Diff on seek line C The position of rotation center RC is calculated by equation (8).
It is. (A '+ B' + C ') / 3 (8)

【0085】差Diffと、エッジ点の回転中心からの距離
を用いて複数のシークラインの各々について角度を演算
し、それらを平均することによっても角度を得ることが
できるが、その場合、例えば、凹凸があって1個所でも
角度が大きく外れればその誤差が最終的な角度の値に大
きな影響を与える。それに対し、上記(7)式に従って
角度を演算すれば、特定のエッジ点の誤差の影響を小さ
くすることができ、回転角度の演算精度を向上させるこ
とができる。
Using the difference Diff and the distance from the center of rotation of the edge point to calculate the angle for each of a plurality of seek lines and averaging them, the angle can also be obtained. In this case, for example, If there is unevenness and the angle deviates greatly even in one place, the error has a great influence on the final angle value. On the other hand, if the angle is calculated according to the above equation (7), the influence of an error at a specific edge point can be reduced, and the calculation accuracy of the rotation angle can be improved.

【0086】複数本のシークラインのいずれかにフェー
ルがあり、エッジ点が得られない場合には、図39に示
すように、指定中心DCと回転中心RCとにずれが生ず
る。SL2 がフェールのあったシークラインである。一
般に、指定中心DCは画像処理対象部の中心に設定さ
れ、シークラインはその指定中心DCに対して対称に設
定されるため、シークラインにフェールが生じ、それに
対応した回転中心RCの設定が行われれば、指定中心D
Cと回転中心RCとにずれが生じるのである。回転中心
RCは前述のように、回転中心RCの一方の側を正と
し、他方の側を負とすることにより、複数のシークライ
ンの各エッジ点と回転中心RCとの距離の和が0になる
ように設定されることから(9)式が成立し、この
(9)式とから(10)式が得られ、回転中心RCと指定中
心DCとのずれvが演算される。 t0 +t1 +t3 =0・・・・・・(9) (s0 −v)+{s0 +(s1 −s0 )−v}+{s0 +(s3 −s0 )−v} =0・・・・・・・(10) ただし、 t0 :回転中心RCとシークラインSL0 との距離 t1 :回転中心RCとシークラインSL1 との距離 t3 :回転中心RCとシークラインSL3 との距離 s0 :指定中心DCとシークラインSL0 との距離 s1 :指定中心DCとシークラインSL1 との距離 s3 :指定中心DCとシークラインSL3 との距離
If there is a failure in any of the plurality of seek lines and an edge point cannot be obtained, a deviation occurs between the designated center DC and the rotation center RC as shown in FIG. SL 2 is a Sea Klein was the fail. Generally, the designated center DC is set at the center of the image processing target portion, and the seek line is set symmetrically with respect to the designated center DC. Therefore, a failure occurs in the seek line, and the corresponding rotation center RC is set. If specified, designated center D
A shift occurs between C and the rotation center RC. As described above, by setting one side of the rotation center RC to be positive and setting the other side to be negative, the sum of the distances between the edge points of the plurality of seek lines and the rotation center RC becomes zero. Thus, equation (9) is satisfied, and equation (10) is obtained from equation (9), and the shift v between the rotation center RC and the designated center DC is calculated. t 0 + t 1 + t 3 = 0 (9) (s 0 -v) + {s 0 + (s 1 -s 0 ) -v} + s 0 + (s 3 -s 0 ) −v} = 0 (10) where t 0 is the distance between the rotation center RC and the seek line SL 0 t 1 is the distance between the rotation center RC and the seek line SL 1 t 3 is the rotation center Distance between RC and seek line SL 3 s 0 : Distance between designated center DC and seek line SL 0 s 1 : Distance between designated center DC and seek line SL 1 s 3 : Distance between designated center DC and seek line SL 3 distance

【0087】図40に示すように、シークラインが矩形
の画像処理対象部の互に平行な2本の辺について設定さ
れている場合、(11)式が成立し、回転中心RCと指定
中心DCとのずれ量vは(12)式に基づいて演算され
る。 t0 +t1 +t2 +t3 +t4 +t5 =0・・・・・・(11) s0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}+{s0 +(s5 −s0 )}−6v=0 ・・・・・・(12)
As shown in FIG. 40, when a seek line is set for two mutually parallel sides of a rectangular image processing target portion, Expression (11) is established, and the rotation center RC and the designated center DC are set. Is calculated based on equation (12). t 0 + t 1 + t 2 + t 3 + t 4 + t 5 = 0 (11) s 0 + {s 0 + (s 1 -s 0 ) {+ {s 0 + (s 2 -s 0 ) } + {s 0 + (s 3 -s 0)} + {s 0 + (s 4 -s 0)} + {s 0 + (s 5 -s 0)} - 6v = 0 ······ (12)

【0088】図41に示す画像処理対象部の場合、(1
3)式が成立し、回転中心RCと指定中心DCとのずれ
vは(14)式に基づいて演算される。 t0 +t1 +t2 +t3 +t4 =0・・・・・・(13) s0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}−5v=0・・・・・・(14)
In the case of the image processing target portion shown in FIG.
Equation (3) holds, and the deviation v between the rotation center RC and the designated center DC is calculated based on Equation (14). t 0 + t 1 + t 2 + t 3 + t 4 = 0 (13) s 0 + {s 0 + (s 1 −s 0 )} + {s 0 + (s 2 −s 0 )} + {S 0 + (s 3 −s 0 )} + {s 0 + (s 4 −s 0 )} − 5v = 0 (14)

【0089】図42に示すように、シークラインが互に
直角な2方向に設定されている場合にはX軸方向および
Y軸方向に関してそれぞれ(15)式および(16)式が成
立し、回転中心RCと指定中心DCとのX軸方向,Y軸
方向の各位置ずれvx ,vyは、それぞれ(17)式およ
び(18)式に基づいて演算される。 t0 +t1 +t2 +t3 +t4 +t5 =0・・・・・・(15) t6 +t7 +t8 +t9 +t10+t11=0・・・・・・(16) s0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}+{s0 +(s4 −s0 )}+{s0 +(s5 −s0 )}−6vx = 0・・・・・・(17) s6 +{s6 +(s7 −s6 )}+{s6 +(s8 −s6 )}+{s6 +(s9 −s6 )}+{s6 +(s10−s6 )}+{s6 +(s11−s6 )}−6vy = 0・・・・・・(18)
As shown in FIG. 42, when the seek lines are set in two directions perpendicular to each other, equations (15) and (16) are established in the X-axis direction and the Y-axis direction, respectively, The respective positional deviations v x and v y between the center RC and the designated center DC in the X-axis direction and the Y-axis direction are calculated based on the equations (17) and (18), respectively. t 0 + t 1 + t 2 + t 3 + t 4 + t 5 = 0 (15) t 6 + t 7 + t 8 + t 9 + t 10 + t 11 = 0 (16) s 0 + { s 0 + (s 1 -s 0 )} + {s 0 + (s 2 -s 0)} + {s 0 + (s 3 -s 0)} + {s 0 + (s 4 -s 0)} + {S 0 + (s 5 −s 0 )} − 6v x = 0 (17) s 6 + {s 6 + (s 7 −s 6 )} + {s 6 + (s 8 -s 6)} + {s 6 + (s 9 -s 6)} + {s 6 + (s 10 -s 6)} + {s 6 + (s 11 -s 6)} - 6v y = 0 ·・ ・ ・ ・ ・ (18)

【0090】X軸方向について(17)式に基づいて回転
中心RCX の指定中心DCに対するX軸方向の位置ずれ
x を演算し、それに基づいて回転中心RCX が求めら
れる。Y軸方向について(18)式に基づいて回転中心R
Y の指定中心DCに対するY軸方向の位置ずれvy
演算し、それに基づいて回転中心RCy が求められる。
回転中心RCX を通り、シークライン設定座標のY軸に
平行な直線と、回転中心RCY を通り、X軸に平行な直
線との交点が図42に示す画像処理対象部の回転中心R
Cである。
In the X-axis direction, a displacement v x of the rotation center RC X in the X-axis direction with respect to the designated center DC is calculated based on the equation (17), and the rotation center RC X is obtained based on the calculated displacement. In the Y-axis direction, the rotation center R is calculated based on equation (18).
A displacement v y in the Y-axis direction with respect to the designated center DC of C Y is calculated, and a rotation center RC y is obtained based on the calculated displacement.
The intersection of a straight line passing through the rotation center RC X and parallel to the Y axis of the seek line setting coordinate and a straight line passing through the rotation center RC Y and parallel to the X axis is the rotation center R of the image processing target portion shown in FIG.
C.

【0091】シークラインが互に直角な2方向に設定さ
れている画像処理対象部の別の例を図43に示す。この
画像処理対象部については(19)式および(20)式が成
立し、回転中心RCと指定中心DCとのX軸方向,Y軸
方向の各ずれvx ,vy は、それぞれ(21)式および
(22)式に基づいて演算される。ただし、図43に示す
画像処理対象部は、回転中心RCと指定中心DCとにず
れがなく、vx =vy =0であって、シークラインと回
転中心RCおよび指定中心DCとの距離は同じであると
して図示されており、したがって、(19)式および(2
0)式と、(21)式および(22)式とにおいて同じ符号
が使用されている。 s0 +s1 +s2 +s3 =0・・・・・・(19) s4 +s5 +s6 +s7 =0・・・・・・(20) s0 +{s0 +(s1 −s0 )}+{s0 +(s2 −s0 )}+{s0 +(s3 −s0 )}−4vx =0・・・・・・(21) s4 +{s4 +(s5 −s4 )}+{s4 +(s6 −s4 )}+{s4 +(s7 −s4 )}−4vy =0・・・・・・(22)
FIG. 43 shows another example of the image processing target portion in which seek lines are set in two directions perpendicular to each other. Equations (19) and (20) hold for this image processing target, and the displacements v x and v y between the rotation center RC and the designated center DC in the X-axis direction and the Y-axis direction are respectively (21) It is calculated based on the equation and equation (22). However, in the image processing target portion shown in FIG. 43, there is no shift between the rotation center RC and the designated center DC, v x = v y = 0, and the distance between the seek line and the rotation center RC and the designated center DC is It is illustrated as being the same, and therefore equation (19) and (2
The same reference numerals are used in equation (0) and equations (21) and (22). s 0 + s 1 + s 2 + s 3 = 0 (19) s 4 + s 5 + s 6 + s 7 = 0 (20) s 0 + {s 0 + (s 1 -s 0 )} + {s 0 + (s 2 −s 0 )} + {s 0 + (s 3 −s 0 )} − 4v x = 0 (21) s 4 + {s 4 + (S 5 −s 4 )} + {s 4 + (s 6 −s 4 )} + {s 4 + (s 7 −s 4 )} − 4 v y = 0 (22)

【0092】次に回転角度を演算するために、図44に
示す角度ファクタが予め設定されている。角度ファクタ
は、シークラインの位置および極性によって決定され
る。図44に示す角度ファクタをXY座標上で示せば図
45に示すようになる。
Next, in order to calculate the rotation angle, an angle factor shown in FIG. 44 is set in advance. The angle factor is determined by the position and polarity of the seek line. FIG. 45 shows the angle factors shown in FIG. 44 on the XY coordinates.

【0093】図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) ta =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
本のシークラインにおけるエッジ点のサイズポイントか
らのずれ量である。
FIG. 46 shows an example of calculating the position and rotation angle of the image processing target portion using the rotation center RC and the angle factor. The rotation angle is calculated according to equations (23) and (24). The sign of the sign of d 0 t 0 to d 4 v 1 in the equation (23) is determined by the angle factor.
The rotation angle calculated by Expression (23) is the rotation angle of the image processing target portion with respect to the measurement template coordinate plane. Also,
The displacement Δx in the X-axis direction and the displacement Δ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 deviation amounts of the actual position of the rotation center RC from the original position. Rotation angle = (- d 0 t 0 -d 1 t 1 + d 2 t 2 + d 3 v 0 -d 4 v 1) / t a · ···· (23) t a = t 0 2 + t 1 2 + t 2 2 + v 0 2 + v 1 2 (24) Δx = (d 3 + d 4 ) / 2 (25) Δy = (d 0 + d 1 + d 2 ) / 3 (26) where d 0 , d 1 , d 2 , d 3 , and d 4 are each 5
This is the deviation amount of the edge point from the size point in the seek line of the book.

【0094】画像処理対象部が矩形であり、図47に示
すように矩形の像250のX軸,Y軸にそれぞれ平行な
2辺に各々シークラインが設定されている場合の回転角
度および回転中心RCの位置ずれΔx,Δyの演算を
(27)式〜(29)式に示す。 回転角度=(−d00 +d11 +d22 −d33 +d40 −d51 −d62 +d73 )/(t0 2+t1 2+t2 2+t3 2+v0 2+v1 2+v2 2+v3 2 )・・・・・(27) Δx=(d4 +d5 +d6 +d7 )/4・・・・・・(28) Δy=(d0 +d1 +d2 +d3 )/4・・・・・・(29) d0 〜d3 は回転中心RCからの距離がt0 〜t3 のシ
ークライン上におけるエッジ点とサイズポイントとのず
れ量であり、d4 〜d7 は回転中心RCからの距離がv
0 〜v3 のシークライン上におけるエッジ点とサイズポ
イントとのずれ量である。
The rotation angle and the rotation center when the image processing target portion is a rectangle and a seek line is set on each of two sides parallel to the X axis and the Y axis of the rectangular image 250 as shown in FIG. The calculation of the RC displacements Δx and Δy are shown in equations (27) to (29). Rotation angle = (− d 0 t 0 + d 1 t 1 + d 2 t 2 −d 3 t 3 + d 4 v 0 −d 5 v 1 −d 6 v 2 + d 7 v 3 ) / (t 0 2 + t 1 2 + t) 2 2 + t 3 2 + v 0 2 + v 1 2 + v 2 2 + v 3 2 ) (27) Δx = (d 4 + d 5 + d 6 + d 7 ) / 4 (28) Δy = (D 0 + d 1 + d 2 + d 3 ) / 4 (29) d 0 to d 3 are edge points and size points on the seek line whose distance from the rotation center RC is t 0 to t 3. And d 4 to d 7 are distances from the rotation center RC to v
A shift amount of the edge point and size point of 0 to v 3 on the search lines.

【0095】上記各式が回転角度および位置ずれΔx,
Δyの演算式として妥当なものであることを数学的に証
明する代わりに、具体的に数値を代入して妥当性を示
す。図48に示す形状の画像処理対象部が、回転中心R
Cのまわりに−0.1(ラジアン)回転するとともに、
回転中心RCがY軸方向に5mm、X軸方向に0mmずれた
場合を想定する。この場合に、t0 =30mm,t1 =2
mm,t2 =50mm,v0 =30mm,v1 =30mmとす
れば、sin θ=θと見なしてよい程に回転角度が小さい
限り、d0 =+8mm,d1 =+7mm,d2 =0mm,d3
=−3mm,d 4 =+3mmとなるはずである。また、ta
=t0 2+t1 2+t2 2+v0 2+v1 2を演算すれば5600
(mm2 )が得られる。これらの値を(30), (31) ,(32)式
に代入すれば、下記の通り、回転角度および回転中心R
Cの位置ずれΔ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)
The above equations are used to calculate the rotation angle and the displacement Δx,
Mathematically proves that it is a valid expression for Δy
Instead of clarifying, justify the specific values and justify them.
You. The image processing target portion having the shape shown in FIG.
While rotating -0.1 (radian) around C,
Rotation center RC is shifted 5mm in Y axis direction and 0mm in X axis direction
Assume the case. In this case, t0 = 30mm, t1 = 2
0mm, TTwo = 50mm, V0 = 30mm, V1 = 30mmToss
Then, the rotation angle is so small that it can be considered that sin θ = θ
As long as d0 = + 8mm, d1 = + 7mm, dTwo = 0mm, dThree 
= -3mm, d Four = + 3 mm. Also, ta
= T0 Two+ T1 Two+ TTwo Two+ V0 Two+ V1 TwoIs calculated to be 5600
(MmTwo ) Is obtained. These values are calculated by (30), (31) and (32)
Into the rotation angle and the rotation center R as follows:
The displacements Δx and Δy of C are -0.1 radia, respectively.
, 5mm and 0mm, and the validity of the formula was confirmed.
You. 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)

【0096】以上のようにして演算されるのは回転中心
RCの回転角度および位置ずれであるが、画像処理対象
部が電気部品146である場合には、その電気部品14
6の回路基材への装着作業の実行上必要なのは指定中心
DCの回転角度および位置ずれであるため、回転中心R
Cの回転角度および位置ずれから指定中心DCのそれら
を演算することが必要である。ただし、回転角度は回転
中心RCについても指定中心DCについても同じである
ため演算の必要はなく、位置ずれのみについて演算を行
えばよい。画像処理対象部に回転角度誤差がなく、単純
にX軸方向とY軸方向とに位置ずれΔx1 ,Δy1 を生
じたのみであれば、回転中心RCの位置ずれも指定中心
DCの位置ずれも共にΔx1 ,Δy1 となる。しかし、
画像処理対象部に回転角度誤差Δθが生じた場合には、
図49に示すように回転中心RCからX軸方向およびY
軸方向にそれぞれvx ,vy だけ離れた位置にある指定
中心DCの位置ずれは、(Δx1 −Δθ×vy ),(Δ
1 +Δθ×vx )となる。
Although the rotation angle and the displacement of the rotation center RC are calculated as described above, if the image processing target is the electric component 146, the electric component 14
Since the rotation of the designated center DC and the positional deviation are necessary to execute the mounting work on the circuit substrate of No. 6, the rotation center R
It is necessary to calculate those of the designated center DC from the rotation angle and the displacement of C. However, since the rotation angle is the same for the rotation center RC and the designated center DC, there is no need to perform the calculation, and the calculation may be performed only for the displacement. If there is no rotation angle error in the image processing target portion and only the displacements Δx 1 and Δy 1 are generated in the X-axis direction and the Y-axis direction, the displacement of the rotation center RC is also the displacement of the designated center DC. Are also Δx 1 and Δy 1 . But,
When a rotation angle error Δθ occurs in the image processing target portion,
As shown in FIG. 49, the X-axis direction and Y
The positional deviations of the designated center DC located at positions separated by v x and v y in the axial direction are (Δx 1 −Δθ × v y ) and (Δ
y 1 + Δθ × v x ).

【0097】ここで演算された回転角度Δθおよび位置
ずれ(Δx1 −Δθ×vy ),(Δy1 +Δθ×vx
は画像処理対象部の指定中心DCの測定テンプレート座
標面に対する回転角度および位置ずれであるが、測定テ
ンプレート座標面自体が図50に示すように基準座標面
に対して回転角度θおよび位置ずれΔx2 ,Δy2 を有
しているのが普通である。そして、基準座標は一般にC
CDカメラ76の光軸、すなわち視野の中心に原点を有
する座標面として設定され、また、部品姿勢検出位置に
おいては吸着管144の軸線がCCDカメラ76の光軸
と一致するように位置決めされる。この場合には、上記
測定テンプレート座標面の基準座標面に対する回転角度
θおよび位置ずれΔx2 ,Δy2 は、測定テンプレート
座標面の吸着管144の軸線に対する回転角度および位
置ずれであることになる。したがって、画像処理対象部
としての電気部品の指定中心DCの吸着管144の軸線
に対する回転角度および位置ずれはそれぞれ、θ+Δ
θ,Δx2 +(Δx 1 −Δθ×vy )cos θ,Δy2
(Δy1 +Δθ×vx )sin θとなる。
The rotation angle Δθ and the position calculated here
Deviation (Δx1 −Δθ × vy), (Δy1 + Δθ × vx)
Is the measurement template for the designated center DC of the image processing target
The rotation angle and displacement from the reference surface
The template coordinate plane itself is the reference coordinate plane as shown in FIG.
Rotation angle θ and displacement ΔxTwo , ΔyTwo With
It is common to do. And the reference coordinates are generally C
The origin is located at the optical axis of the CD camera 76, that is, the center of the visual field.
Is set as the coordinate plane for
In this case, the axis of the suction tube 144 is the optical axis of the CCD camera 76.
It is positioned so as to match. In this case,
Rotation angle of measurement template coordinate plane with respect to reference coordinate plane
θ and displacement ΔxTwo , ΔyTwo Is a measurement template
Rotation angle and position of the coordinate plane with respect to the axis of the suction tube 144
This is a misplacement. Therefore, the image processing target part
Axis of suction tube 144 of designated center DC of electric component as
Is the rotation angle and the positional deviation with respect to
θ, ΔxTwo + (Δx 1 −Δθ × vy) Cos θ, ΔyTwo +
(Δy1 + Δθ × vx) Sin θ.

【0098】フェールがある場合には回転中心の座標,
回転中心から各シークラインまでの距離,回転中心と指
定中心との位置ずれ等の値が前述のように演算される
が、フェールがない場合はこれらの値は各画像処理対象
部とテンプレートとの組合わせに対してそれぞれ一定の
値に決まるため、これらの値がデフォルト値としてメモ
リカードに格納されており、このデフォルト値を用いて
上記各演算が行われる。なお、寸法の演算が指定されて
おらず、すべてのシークラインがペアにされており、か
つ、フェールもない場合には、サイズポイントの演算が
省略されて、サイズポイントに代えてエッジ点とアイデ
アルポイントとの差が演算され、その演算結果に基づい
て位置および回転角度が演算されるようにしてもよい。
この場合には、サイズに誤差があっても、ペアシークラ
インを構成する2本のシークライン同士でサイズ誤差の
影響を打ち消し合い、位置の演算結果に影響を及ぼさな
いからである。さらに、フェールがある場合でも、位置
ずれの演算が指定されていない場合はサイズポイントが
不要であり、演算を省略してもよい。
If there is a failure, the coordinates of the rotation center,
The values such as the distance from the rotation center to each seek line and the displacement between the rotation center and the designated center are calculated as described above. Since fixed values are determined for each combination, these values are stored in the memory card as default values, and the above calculations are performed using the default values. If the dimension calculation is not specified, all seek lines are paired, and there is no failure, the calculation of the size point is omitted, and the edge point and the ideal point are replaced with the size point. The difference from the point may be calculated, and the position and the rotation angle may be calculated based on the calculation result.
In this case, even if there is an error in the size, the effect of the size error is canceled by the two seek lines constituting the pair seek line, and the position calculation result is not affected. Furthermore, even when there is a failure, if the calculation of the positional deviation is not specified, the size point is unnecessary, and the calculation may be omitted.

【0099】次に、画像処理対象部がプリント基板の基
準マーク等のように円形や円形の一部が切り欠かれた形
状のものである場合について説明する。基準マークはプ
リント基板に付され、基準マークの撮像に基づいてプリ
ント基板の位置誤差および回転角度誤差が算出される。
したがって、基準マークの回転角度を演算する必要はな
い。また、円形や円形の一部が切り欠かれた画像処理対
象部の位置ずれの演算も矩形の画像処理対象部の位置ず
れの演算と共通する部分が多いが、位置ずれの演算に特
殊性がある。以下、この点について説明する。
Next, a case where the image processing target portion has a circular shape or a shape in which a part of a circular shape is cut out, such as a reference mark on a printed circuit board, will be described. The reference mark is attached to the printed circuit board, and a position error and a rotation angle error of the printed circuit board are calculated based on the image of the reference mark.
Therefore, there is no need to calculate the rotation angle of the reference mark. In addition, the calculation of the positional shift of the image processing target portion in which a circle or a part of a circle is cut out has a lot in common with the calculation of the positional shift of the rectangular image processing target portion. is there. Hereinafter, this point will be described.

【0100】まず、図51〜図53に基づいて円形の像
260のシークラインにフェールがある場合を説明す
る。ここでは、図51に示すように、破線で示す0度の
シークラインがフェールのシークラインであり、また、
円形の像260が、本来の寸法(図中二点鎖線で示す大
きさ)より大きいものとする。円形の像260について
も始めに寸法演算が行われる。寸法演算においては、矩
形の像250の場合と同様にサイズファクタが演算され
る。シークラインが図51に示すように45度間隔で放
射状に8本設定されているとすれば、X軸方向,Y軸方
向の各サイズファクタsizeFX,sizeFYはそれぞれ、size
XM=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がフェールのシークラインを
含むペアシークラインを指定する値になった場合には、
演算が行われることなく次のペアシークラインを指定す
る値に変えられるようになっている。したがって、図5
1の例では0度のシークラインを含むペアシークライン
以外の3対のペアシークラインについて(33)式の演算
が行われることとなる。
First, the case where the seek line of the circular image 260 has a failure will be described with reference to FIGS. Here, as shown in FIG. 51, a seek line of 0 degree indicated by a broken line is a seek line of failure, and
It is assumed that the circular image 260 is larger than the original size (the size indicated by the two-dot chain line in the figure). The size calculation is also performed on the circular image 260 first. In the dimension calculation, a size factor is calculated in the same manner as in the case of the rectangular image 250. Assuming that eight seek lines are radially set at intervals of 45 degrees as shown in FIG. 51, the size factors sizeFX and sizeFY in the X-axis direction and the Y-axis direction are respectively size
After the initial settings of XM = sizeYM = 0 and baseXM = 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, expression (33) is described in C language and for (i =
0; i <n; i ++) means the sum of the results of performing the operation in {} on the i-th seek line while changing i from 0 to n-1 by one. Also, n is the number of pair seek lines, which is 4 in the example of FIG.
In the calculation of the equation (33), i is sequentially changed from 0 to 3. When i becomes a value designating a pair seek line including a fail seek line,
The value can be changed to a value specifying the next pair seek line without performing the operation. Therefore, FIG.
In the example of (1), the calculation of the expression (33) is performed for three pairs of pair seek lines other than the pair seek line including the 0 ° seek line.

【0101】円の場合、シークラインが放射状に設定さ
れるため、X軸およびY軸に対して傾斜したシークライ
ンが存在し、これらシークラインはX軸方向とY軸方向
との両方についてサイズ過大率の成分を有する。そのた
め、(33)〜(35)式においては、各シークライン上に
おけるサイズ過大率のX軸方向の成分とY軸方向の成分
とが求められ、それぞれ成分比率に応じてサイズファク
タの決定に寄与させられるようになっている。この演算
によって得られるsizeFXおよびsizeFYは、それぞれX軸
方向とY軸方向とのサイズ過大率である。サイズ誤差が
X軸方向とY軸方向とで異なる比率で生ずる場合に対処
するために、両方向で別個にサイズファクタが演算され
るようになっているのである。
In the case of a circle, since the seek lines are set radially, there are seek lines inclined with respect to the X axis and the Y axis, and these seek lines are excessively large in both the X axis direction and the Y axis direction. It has a rate component. Therefore, in the equations (33) to (35), the X-axis direction component and the Y-axis direction component of the oversize ratio on each seek line are obtained, and each contributes to the determination of the size factor according to the component ratio. It is made to be made. The sizeFX and sizeFY obtained by this calculation are the size excess rates in the X-axis direction and the Y-axis direction, respectively. In order to cope with the case where the size error occurs at a different ratio between the X-axis direction and the Y-axis direction, the size factors are separately calculated in both directions.

【0102】次に、サイズポイントが演算される。ま
ず、図53に示すようにアイデアルポイントとサイズポ
イントとの差であるpairDiffが(36)〜(43)式((36),(3
7)式は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)
Next, a size point is calculated. First, as shown in FIG. 53, the pairDiff, which is the difference between the ideal point and the size point, is calculated by the equations (36) to (43) ((36), (3
Equation 7) is described in C language), the size point is calculated from the obtained pairDiff and the ideal point, and the deviation Diff between the size point and the edge point is calculated using the edge point. It is. ΔL x = pairRadius * cos θ * (sizeFX -1); ·· (36) ΔL y = pairRadius * sin θ * (sizeFY -1); ·· (37) when the [Delta] L x ≧ 0 and ΔL y ≧ 0 pairDiff = {(ΔL x ) 2 + (ΔL y ) 2 };... (38) When ΔL x <0 and ΔL y <0, pairDiff = −√ {(ΔL x ) 2 + (ΔL y ) 2 }; (39) When ΔL x <0 and ΔL y ≧ 0 and | ΔL x | ≧ | ΔL y | pairDiff = −√ {(ΔL x ) 2 − (ΔL y ) 2 }; ) ΔL x <0 and ΔL y ≧ 0 and | ΔL x | <| ΔL y | pairDiff = iff− (ΔL x ) 2 + (ΔL y ) 2 };... (41) ΔL x ≧ 0 and ΔL y <0 and | ΔL x | ≧ | ΔL y | pairDiff = {(ΔL x ) 2 − (ΔL y ) 2 }; (42) ΔL x ≧ 0 and ΔL y < When 0 and | ΔL x | <| ΔL y |, pairDiff = −√ {− (ΔL x ) 2 + (ΔL y ) 2 };

【0103】前述のように、円形の像260は回転角度
を演算する必要がなく、位置のみが演算される。位置を
演算するにあたり、まず、位置ファクタ(posFactor) が
(44)式に従って演算される。 posFactorM〔i〕=1/Σcos2(角度R〔i〕−角度〔n〕)・・・(44) ただし、iはシークラインを指定する値であり、0から
7まである。また、nの値もシークラインの本数である
1から8まで1ずつ増加させられる。Σcos2(角度R
〔i〕−角度〔n〕)の演算は、i番目のシークライン
の角度R〔i〕とフェールのないシークラインすべての
角度R〔n〕との差の余弦の2乗の和を求める演算であ
る。この演算においても、iがフェールのシークライン
を指定する値になった場合には、演算が行われることな
く次のシークラインを指定する値に変えられるようにな
っているため、図51の例では0度のシークラインにつ
いての演算は行われず、45度〜315度の各シークラ
インについて位置ファクタの演算が行われる。
As described above, it is not necessary to calculate the rotation angle of the circular image 260, and only the position is calculated. In calculating the position, first, the position factor (posFactor) is calculated according to equation (44). posFactorM [i] = 1 / Σcos 2 (angle R [i] −angle [n]) (44) where i is a value specifying a seek line and is from 0 to 7. Also, the value of n is increased by one from 1 to 8, which is the number of seek lines. Σcos 2 (angle R
The calculation of [i] -angle [n]) calculates 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 the seek lines without fail. It is. Also in this calculation, if i becomes a value specifying the seek line of the fail, the value can be changed to a value specifying the next seek line without performing the calculation. In this case, the calculation is not performed for the 0 ° seek line, and the position factor calculation is performed for each of the 45 ° to 315 ° seek lines.

【0104】次に位置ファクタを用いて円形の像260
の位置が(45)式(C言語で記述されている)に従って
演算される。 for(x=0,y=0,i=0;i<n;i++){x=x+cos (i) *posFactorM [i]*ss[i];y=y+sin(i)*posFactorM[i]*ss[i]; }・・・・ (45) ss[i]は、先に演算された各シークラインについての
サイズポイントとエッジポイントとのずれ量Diffであ
り、フェールのないシークラインの全部について、それ
ぞれそのシークラインのずれ量ss[i]に位置ファクタ
posFactorM[i]が掛けられるとともにX軸,Y軸に平
行な成分が演算されてX座標,Y座標毎にそれぞれ加算
され、中心位置(x,y)が求められる。この中心位置
の座標は、円形の像260の中心の、測定テンプレート
座標面の原点からのX軸方向およびY軸方向における位
置ずれを示す。前述のように、シークラインにフェール
があれば画像処理対象部の回転中心RCが、フェールが
ない場合の位置(正規の回転中心の位置と称すべきも
の)からずれるのであるが、(44) 式により位置ファク
タが演算され、その位置ファクタを用いて(45)式により
位置ずれが演算されることにより、シークラインにフェ
ールがある場合でも、フェールがない場合と同様に、円
形の像260の正規の回転中心に相当する中心の位置ず
れが演算されるのである。したがって、得られた位置ず
れに測定テンプレート座標面の基準座標面に対する位置
ずれを加えた値が円形の像260の基準座標面上におけ
る位置ずれを表すことになる。
Next, a circular image 260 is obtained using the position factor.
Is calculated according to equation (45) (described in C language). for (x = 0, y = 0, i = 0; i <n; i ++) {x = x + cos (i) * posFactorM [i] * ss [i]; y = y + sin (i) * posFactorM [i ] * Ss [i];} ... (45) ss [i] is the shift amount Diff between the size point and the edge point for each seek line previously calculated, and For all of them, the position factor is added to the shift amount ss [i] of the seek line.
posFactorM [i] is multiplied, and a component parallel to the X-axis and the Y-axis is calculated and added for each of the X-coordinate and the Y-coordinate to obtain the center position (x, y). The coordinates of the center position indicate a position shift of the center of the circular image 260 from the origin of the measurement template coordinate plane in the X-axis direction and the Y-axis direction. As described above, if there is a failure in the seek line, the rotation center RC of the image processing target portion is shifted from the position where there is no failure (the position of the normal rotation center). The position factor is calculated by using the position factor, and the position shift is calculated by the equation (45) using the position factor. Thus, even when the seek line has a failure, the normalization of the circular image 260 is performed in the same manner as when there is no failure. Of the center corresponding to the center of rotation is calculated. Therefore, a value obtained by adding the positional deviation of the measurement template coordinate plane with respect to the reference coordinate plane to the obtained positional deviation represents the positional deviation of the circular image 260 on the reference coordinate plane.

【0105】画像処理対象部が円形であってフェールが
ない場合には、位置ファクタ等にデフォルト値を用いて
演算が行われる。この点は、画像処理対象部が矩形の像
250である前述の場合と同様である。画像処理対象部
が図38の線分や、図47の矩形等である場合の前記説
明においては、位置ファクタなる用語を使用しなかった
が、実際の実施形態においては、これらの場合にも(44)
式を用いて位置ファクタの演算が行われるのであって、
前記 (8)式における1/3や、(28),(29)式における1
/4等が位置ファクタに相当する。このことは(44)式
に実際の値を代入してみれば容易に確かめ得る。(44)式
は図形のいかんを問わず一般的に使用し得るものなので
ある。図38,図47等の説明において(44)式を使用
しなかったのは、直観的に理解できるようにするためで
あり、これら簡単な例について直観的に演算した結果
と、同じ例について(44)式を用いて演算した結果とを
比較することにより(44)式の妥当性を確かめるためで
ある。上記1/3,1/4等の値はシークラインにフェ
ールが発生すれば勿論変わる。また、例えば矩形の角部
が斜めに45度で切り欠かれた八角形について上記円形
の画像対象物についての演算がそのまま適用できること
は勿論、一般的に傾斜した辺を有する画像処理対象部に
ついても寸法や位置の演算を同様に行い得る。
When the image processing target portion is circular and there is no failure, calculation is performed using default values for the position factor and the like. This is the same as the above-described case where the image processing target portion is the rectangular image 250. Although the term “position factor” is not used in the above description in the case where the image processing target portion is the line segment in FIG. 38 or the rectangle in FIG. 47, in the actual embodiment, 44)
The calculation of the position factor is performed using the equation,
1/3 in equation (8) and 1 in equations (28) and (29)
/ 4 or the like corresponds to the position factor. This can be easily confirmed by substituting the actual value into the equation (44). Equation (44) can be used generally regardless of the shape of the figure. The reason why equation (44) is not used in the description of FIGS. 38 and 47 is to make it intuitively understandable. This is to confirm the validity of the expression (44) by comparing the result calculated using the expression (44). Of course, the values of 1/3, 1/4, etc. change if a failure occurs in the seek line. Further, for example, not only can the above-described calculation for the circular image object be applied to an octagon in which a rectangular corner is cut off at an angle of 45 degrees, but also for an image processing object portion having generally inclined sides. Calculations of dimensions and positions can be performed similarly.

【0106】以上、画像処理対象部がリードを有しない
角チップのように矩形である場合と基準マークのように
円形である場合とについて説明したが、回路基材にに装
着される電気部品には、クウォードフラットパッケージ
型の電気部品のように複数のリード線を有するものがあ
る。このような電気部品が画像処理対象部である場合に
は、パターンマッチングプロセスの組合わせであるパタ
ーンマッチングマネージャにより画像処理が行われる。
パターンマッチングマネージャはパターンマッチングプ
ロセスを複数回組み合わせることにより画像処理を行う
ものである。
The case where the image processing target portion is rectangular as a square chip having no lead and the case where the image processing target portion is circular as a reference mark have been described. Some have a plurality of lead wires, such as a quad flat package type electric component. When such an electric component is an image processing target portion, image processing is performed by a pattern matching manager which is a combination of pattern matching processes.
The pattern matching manager performs image processing by combining the pattern matching processes a plurality of times.

【0107】例えば、図54に示すQFP(クウォード
フラットパッケージ型電気部品)の像270の場合
は、QFP全体の輪郭に基づいてではなく、リードの像
に基づいて画像処理が行われる。これは、QFPではリ
ードの位置のデータに基づいて装着を行えばリードと基
板のパターンとの誤差を最も小さくできるからであり、
各リードを画像処理対象部とするパターンマッチングの
組合わせによって、QFPのサイズ,位置,回転角度等
が演算されるのである。
For example, in the case of an image 270 of a QFP (quad flat package type electric component) shown in FIG. 54, image processing is performed not based on the outline of the entire QFP but on the image of a lead. This is because in the QFP, the error between the lead and the pattern of the board can be minimized if the mounting is performed based on the data of the position of the lead.
The size, position, rotation angle, and the like of the QFP are calculated by a combination of pattern matching using each lead as an image processing target.

【0108】画像処理時には、まず、リードの像272
の1つが捜索される。そのために、リードの像272を
1つ包含するのに適した大きさのサーチウインドウ27
6が設定され、その中で予め設定された複数組のポイン
トペアを含む捜索テンプレートを用いてリードの像27
2が捜索される。
At the time of image processing, first, the lead image 272 is read.
Is searched. Therefore, a search window 27 sized appropriately to include one lead image 272
6, a lead image 27 is set by using a search template including a plurality of point pairs preset therein.
2 is searched.

【0109】捜索ステップ,再捜索ステップ,測定ステ
ップおよび再測定ステップのフルセットのパターンマッ
チングが行われてリードの像272の位置および回転角
度が測定される。リードの像272の位置および回転角
度が判れば、次に捜索ステップおよび再捜索ステップを
含むサブセットのパターンマッチングにより1辺全部の
リードの像272が捜索される。リードのピッチは予め
判っており、次のリードの像272についての捜索ステ
ップにおいて捜索テンプレート座標面の位置,回転角度
は、その直前に再捜索ステップによって求められたリー
ドの像272の位置および回転角度と、リード間のピッ
チとに基づいて相当正確に予測されるため、フルセット
のパターンマッチングを行わなくても十分に精度良く次
のリードの像272を捜索し得るのである。
A full set of pattern matching of the search step, the re-search step, the measurement step, and the re-measurement step is performed, and the position and the rotation angle of the lead image 272 are measured. When the position and the rotation angle of the lead image 272 are known, the lead image 272 of the entire side is searched by pattern matching of a subset including a search step and a re-search step. The pitch of the lead is known in advance, and the position and rotation angle of the search template coordinate plane in the search step for the next lead image 272 are the position and rotation angle of the lead image 272 obtained immediately before by the re-search step. And the pitch between the leads, it is possible to search for the next lead image 272 with sufficient accuracy without performing full set pattern matching.

【0110】1辺全部のリードの像272についてパタ
ーンマッチングが行われ、全部のリードの像272の位
置が演算されたならば、これらリードの像272の中心
のX座標値,Y座標値が加算されるとともにリード本数
で除され、1辺の中心座標が演算される。同様にして3
辺のリードの像272がサブセットのパターンマッチン
グで捜索される。辺同士の位置関係は予め判っており、
先に行われたパターンマッチングの再捜索テンプレート
座標面の位置,回転角度に基づいて捜索テンプレートの
位置,回転角度が設定される。4辺全部について各中心
座標が演算されたならば、互に平行な2つの辺の各中心
を結ぶ2本の直線a,bの交点が演算され、電気部品の
中心座標とされる。QFPの像270の回転角度は、(4
6)式で求められる。 (直線aの傾き−90度+直線bの傾き)/2・・・・(46)
When pattern matching is performed on the image 272 of all leads on one side and the positions of the images 272 of all leads are calculated, the X coordinate value and the Y coordinate value of the center of the image 272 of these leads are added. Then, the center coordinate of one side is calculated by dividing by the number of leads. Similarly, 3
The image 272 of the lead of the side is searched by the pattern matching of the subset. The positional relationship between the sides is known in advance,
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 the pattern matching performed earlier. If the respective center coordinates are calculated for all four sides, the intersection of two straight lines a and b connecting the centers of the two sides parallel to each other is calculated, and is set as the center coordinate of the electric component. The rotation angle of the QFP image 270 is (4
It is obtained by the formula 6). (Slope of straight line a−90 degrees + slope of straight line b) / 2 (46)

【0111】このようにパターンマッチングまたはパタ
ーンマッチングマネージャによれば、殆どの形状の被検
査物や回路基材に装着すべき電気部品の像認識を行うこ
とができる。マスタ捜索テンプレート,マスタ測定テン
プレートの作成は必要であるが、それらテンプレートを
使用した画像処理プログラムは共用でき、被検査物や電
気部品の種類毎に画像処理プログラムを作成することに
比較すれば、プログラム作成に要する時間が短くて済む
のである。
As described above, according to the pattern matching or the pattern matching manager, it is possible to perform the image recognition of the inspection object having almost any shape or 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, the image processing program using those templates can be shared. Compared to creating an image processing program for each type of inspection object and electric component, the program The time required for creation is short.

【0112】なお、画像処理時間は、サーチウインドウ
の中心からの画像処理対象部の中心のオフセット量が大
きいほど長くなる。そのため、画像処理対象部が捜索さ
れた捜索テンプレート座標面の位置に基づいて、サーチ
ウインドウの中心の位置を修正することが望ましい。例
えば、QFPの像270の場合、複数個のQFPについ
ての画像処理後、リードの像272の中心のサーチウイ
ンドウ276の中心からの平均的なはずれを求め、その
平均的なはずれを0にするようにサーチウインドウの中
心位置を修正するのである。
Note that the image processing time becomes longer as the offset amount of the center of the image processing target portion from the center of the search window becomes 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 target has been searched. For example, in the case of a QFP image 270, after image processing for a plurality of QFPs, an average deviation from the center of the search window 276 at the center of the lead image 272 is determined, and the average deviation is set to zero. Then, the center position of the search window is corrected.

【0113】本実施形態においては、順次撮像される複
数の電気部品146の画像について、パターンマッチン
グあるいはパターンマッチングマネージャと、オブジェ
クトベクトルの演算とが行われ、電気部品の識別,位置
誤差および回転角度誤差の演算が行われる。図55のタ
イムチャートに示すように、電気部品146の装着サイ
クルタイムTrのうち、電気部品146が撮像位置にお
いて停止している間にCCDカメラ76による撮像が行
われる。撮像後、画像データはCCDカメラ76からフ
レームグラバメモリ164へ転送され、画像処理される
のであるが、画像データの転送と画像処理とは並行して
行われる。
In the present embodiment, pattern matching or a pattern matching manager and an operation of an object vector are performed on images of a plurality of electric components 146 that are sequentially captured, and the identification, position error, and rotation angle error of the electric components are performed. Is performed. As shown in the time chart of FIG. 55, during the mounting cycle time Tr of the electric component 146, the imaging by the CCD camera 76 is performed while the electric component 146 is stopped at the imaging position. After the image pickup, the image data is transferred from the CCD camera 76 to the frame grabber memory 164, where the image processing is performed. The transfer of the image data and the image processing are performed in parallel.

【0114】フレームグラバメモリ164は、4個分の
電気部品146の画像データを並列的に記憶し得るよう
にされており、そのため、処理時間が装着サイクルタイ
ムより長い電気部品146についても画像処理を行うこ
とができる。画像処理は、画像処理結果が使用されるま
でに終了すればよく、1個の電気部品146の撮像から
画像処理結果の使用までの間に他の電気部品146が複
数個装着されるのであれば、1装着サイクルタイムTr
の間に画像処理を終了させることは不可欠ではなく、複
数装着サイクルタイムの間に、そのサイクル数と同じ数
の画像処理対象部の画像処理が行われればよい。本実施
形態においては、1個の電気部品146の撮像から装着
までの間に他の3個の電気部品146の装着が行われ、
合計4個の電気部品146の間では画像処理時間を融通
し合うことが可能である。
The frame grabber memory 164 is capable of storing image data of four electric components 146 in parallel. Therefore, the image processing is performed for the electric components 146 whose processing time is longer than the mounting cycle time. It can be carried out. The image processing may be completed before the image processing result is used, and if a plurality of other electric components 146 are mounted between the time when one electric component 146 is captured and the time when the image processing result is used. , 1 mounting cycle time Tr
It is not indispensable to end the image processing during this period, and the image processing of the same number of image processing units as the number of cycles may be performed during the multiple mounting cycle time. In the present embodiment, the mounting of the other three electrical components 146 is performed during the period from imaging to mounting of one electrical component 146,
The image processing time can be interchanged among the four electric components 146 in total.

【0115】電気部品には、例えば、角チップのように
形状が単純でリードを有せず、所要画像処理時間が短い
ものもあれば、QFPのように多数のリードを有し、所
要画像処理時間が長い電気部品もあり、所要画像処理時
間が短い電気部品について余った時間を所要画像処理時
間が長い電気部品の処理に使うことができるのである。
全ての電気部品の画像処理が1装着サイクルタイム内に
終了しなければならないとすれば、装着サイクルタイム
は画像処理が予定されている複数種類の電気部品のうち
で最も長時間を要するものに合わせて決定される必要が
あり、装着能率が低く抑えられてしまう。それに対し
て、本電気部品装着装置においては、4個の画像データ
が並列的にフレームグラバメモリ164に記憶され、4
装着サイクルタイムの間にそれら画像データの処理が行
われるため、4個の電気部品の各画像処理時間の合計
が、画像処理が行われる電気部品の数倍の装着サイクル
タイム以内であればよい。換言すれば、それら複数の電
気部品の画像処理時間の平均が、1装着サイクルタイム
以内であればよいのであり、装着サイクルタイムを短縮
することができる。
For example, some electrical components have a simple shape without a lead, such as a square chip, and have a short lead time. Other electrical components have a large number of leads, such as a QFP. Some electric components have a long time, and the surplus time of an electric component having a short required image processing time can be used for processing an electric component having a long required image processing time.
Assuming that the image processing of all electrical components must be completed within one mounting cycle time, the mounting cycle time should be set to the longest of the multiple types of electrical components scheduled for image processing. The mounting efficiency must be kept low. On the other hand, in this electric component mounting apparatus, four image data are stored in the frame grabber memory 164 in parallel,
Since the processing of the image data is performed during the mounting cycle time, the sum of the image processing times of the four electrical components may be within the mounting cycle time which is several times the electrical component for 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 reduced.

【0116】その一例を図56に示す。図から明らかな
ように、1個の電気部品にそれぞれ要する画像処理時間
e1〜Te7には長短差があるが、4個ずつの画像処理時
間の合計Tt1〜Tt4はそれぞれ、装着サイクルタイムT
rの4倍より短い時間であり、その分だけ装着サイクル
タイムTrを短くすることができるのである。
An example is shown in FIG. As apparent from the figure, although the one of the image processing time T e1 through T e7 required each electrical component has length difference, respectively total T t1 through T t4 of the image processing time of four by four, mounting cycle Time T
This is a time shorter than four times r, and the mounting cycle time Tr can be shortened accordingly.

【0117】順次検査すべき被検査物122が、複数種
類混合して流れてくる場合にも同様の効果が得られる。
順次検査される被検査物122の検査に要する時間が互
いに異なる場合に、フレームグラバメモリ164の数と
同数の、順次検査される被検査物122の各々の検査に
要する時間の平均値に近いサイクルタイムで検査を実行
することができるのである。
The same effect can be obtained even when a plurality of types of inspected objects 122 to be inspected sequentially flow.
When the times required for the inspection of the inspected objects 122 to be sequentially inspected are different from each other, the same number of cycles as the number of the frame grabber memories 164 are close to the average value of the time required for the inspection of the inspected objects 122 to be sequentially inspected. Inspection can be performed in time.

【0118】さらに、順次検査される被検査物122の
種類が1種類で、検査に要する時間が同じであっても、
被検査物122の撮像時間間隔がまちまちの場合には、
複数のフレームグラバメモリ164の効果が得られる。
連続した複数個の被検査物122の間で画像処理時間を
融通し合うことができるからである。
Further, even if the kind of the inspection object 122 to be sequentially inspected is one kind and the time required for the inspection is the same,
If the imaging time intervals of the inspection object 122 are different,
The effect of the plurality of frame grabber memories 164 can be obtained.
This is because the image processing time can be exchanged between a plurality of continuous inspection objects 122.

【0119】このように本画像処理装置12において
は、CCDカメラ76により撮像された被検査物12
2,電気部品146,基準マーク等の画像のデータは、
パターンマッチングやパターンマッチングマネージャに
よって処理されるのであるが、パターンマッチング,パ
ターンマッチングマネージャは、捜索テンプレート,再
捜索テンプレート,測定テンプレート,再測定テンプレ
ートを用いて画像処理対象部を捜索し、エッジ点を演算
するようにされており、テンプレートが設定された部分
のみが捜索され、測定される。画像処理の必要な部分の
みが処理され、画像処理の必要がない部分は画像データ
が得られても処理されないのである。そのため、短時間
で画像処理を行うことができ、かつ、画像処理対象部に
直接接触していない限り大抵の画像ノイズ(白点,黒
点,しみ等)の影響を受けることなく画像処理を行うこ
とができる。
As described above, in the present image processing apparatus 12, the inspection object 12 captured by the CCD camera 76 is used.
2, electrical parts 146, reference mark and other image data
It is processed by the pattern matching and the pattern matching manager. The pattern matching and the pattern matching manager search the image processing target portion using the search template, the re-search template, the measurement template, and the re-measurement template, and calculate the edge points. Only the part where the template is set is searched and measured. Only the part that requires image processing is processed, and the part that does not require image processing is not processed even if image data is obtained. Therefore, the image processing can be performed in a short time, and the image processing is performed without being affected by most image noises (white spots, black spots, stains, and the like) unless the image processing target is directly touched. Can be.

【0120】さらに、捜索ステップにおいては2個のポ
イントペア構成点の輝度差等光学的特性値の差の状態に
よって適合状態にあるか否かが判定され、再捜索ステッ
プ,測定ステップ,再測定ステップにおいては、シーク
ライン上における輝度等光学的特性値の変化勾配によっ
てエッジ点が決定されるようになっている。そのため、
QFPのように画像処理対象部が比較的大きく、照明に
むらが生じ易い場合でも、照明に殆ど差がない部分同士
の間で光学的特性値の比較が行われることとなり、照明
の偏りの影響を受けることなく、正確に画像処理を行う
ことができる。
Further, in the search step, it is determined whether or not the state is in conformity with the state of the difference in optical characteristic values such as the luminance difference between the two point pair constituent points. In, the edge point is determined by the change gradient of the optical characteristic value such as luminance on the seek line. for that reason,
Even in the case where the image processing target portion is relatively large and the illumination tends to be uneven, as in the case of QFP, the optical characteristic values are compared between portions having almost no difference in illumination. Image processing can be performed accurately without receiving the image processing.

【0121】また、CCDカメラの固体撮像素子の大き
さが変わっても、プログラムを実質的に変更することな
く、容易に対応することができる。
Further, even if the size of the solid-state image pickup device of the CCD camera changes, it is possible to easily cope with it without substantially changing the program.

【0122】画像処理対象部の指定中心DCにマスタ測
定テンプレート座標面の原点が置かれる場合について説
明したが、マスタ測定テンプレート座標面の原点が指定
中心DC以外の位置に置かれてもよい。この場合、回転
中心RCと指定中心DCとの間の位置ずれ(または回転
角度)に、指定中心DCとマスタ測定テンプレート座標
面との間の位置ずれ(または回転角度)を加え、その値
にさらにマスタ測定テンプレート座標面の基準座標面に
対する位置ずれ(または回転角度)を加えることによ
り、指定中心DCの基準座標上における位置ずれ(また
は回転角度)が得られる。
Although the case has been described where the origin of the master measurement template coordinate plane is located at the designated center DC of the image processing target portion, the origin of the master measurement template coordinate plane may be located at a position other than the designated center DC. In this case, the displacement (or rotation angle) between the designated center DC and the master measurement template coordinate plane is added to the displacement (or rotation angle) between the rotation center RC and the designated center DC, and the value is further added to the value. By adding the displacement (or rotation angle) of the master measurement template coordinate plane with respect to the reference coordinate plane, the displacement (or rotation angle) of the designated center DC on the reference coordinates can be obtained.

【0123】本実施形態においては、画像処理装置12
が、被検査物の形状,寸法がほぼ決まっていることを利
用し、捜索テンプレート200,再捜索テンプレート2
28,測定テンプレート236,再測定テンプレート等
を使用する特殊な処理により寸法を取得するものである
ため、ごく短時間で処理を完了することができる。ま
た、被検査物(被測定物でもある)支持装置が透明平板
であり、かつ、被検査物の位置や回転角度に合わせて捜
索テンプレート200等が自動設定されるものであるた
め、被検査物は被検査物支持板72上に単純に載置すれ
ばよい。被測定物122の位置や回転角度を正確に決め
なくても、画像処理装置12により寸法の取得が行われ
るのであり、被検査物の撮像装置10へのセットが容易
である。また、画像処理装置12に対する処理開始指令
をフットスイッチで行うことが可能であるため、両手を
他の目的に使用することができ、使い勝手がよい利点が
ある。さらに、被測定物を固定する必要がなく、かつ、
非接触で寸法測定が可能であるため、ゴム,軟質合成樹
脂等から成る製品の寸法測定,寸法検査を容易に行い得
る。そのため、例えば、射出成形やプレス成形により製
造される多量の製品の全数寸法検査すら可能である。ま
た、貫通穴内径,穴間ピッチ,突起間ピッチ,円筒外
径,フランジ間距離,軸長等予め定められた部位の寸法
検査のみならず、加工もれや欠損等の検査も行い得る。
In this embodiment, the image processing device 12
Uses the fact that the shape and dimensions of the object to be inspected are almost fixed, and uses the search template 200 and the re-search template 2
28, the measurement template 236, the dimension is obtained by a special process using the re-measurement template, etc., so that the process can be completed in a very short time. Further, since the device for supporting the object to be inspected (which is also the object to be measured) is a transparent flat plate and the search template 200 and the like are automatically set in accordance with the position and the rotation angle of the object to be inspected, May be simply placed on the inspection object support plate 72. Even if the position and the rotation angle of the object 122 are not accurately determined, the dimensions are obtained by the image processing device 12, and the object to be inspected can be easily set on the imaging device 10. Further, since the processing start command to the image processing apparatus 12 can be issued by the foot switch, both hands can be used for other purposes, and there is an advantage that the usability is good. Furthermore, there is no need to fix the DUT, and
Since dimension measurement is possible without contact, dimension measurement and dimension inspection of a product made of rubber, soft synthetic resin, or the like can be easily performed. For this reason, for example, it is possible to inspect all the dimensions of a large number of products manufactured by injection molding or press molding. In addition, not only dimensional inspection of predetermined portions such as the inner diameter of the through hole, the pitch between the holes, the pitch between the projections, the outer diameter of the cylinder, the distance between the flanges, and the axial length, but also the inspection of processing leakage and chipping can be performed.

【0124】以上の説明から明らかなように、本実施形
態においては、寸法検査装置のうち、撮像装置10と画
像処理装置12の寸法を取得する部分とが光学式寸法測
定装置を構成している。そして、CCD80が撮像セン
サを、対物レンズ108が第一レンズ系を、結像レンズ
82が第二レンズ系をそれぞれ構成し、被検査物支持板
が被検査物(ないし被測定物)支持装置を構成してい
る。また、フレームグラバメモリ164が画像データ記
憶手段を構成し、DRAM156が捜索テンプレートデ
ータ記憶手段,測定テンプレートデータ記憶手段を構成
し、画像処理装置12のパターンマッチングプログラム
の捜索ステップを実行する部分が判定手段を構成し、パ
ターンマッチングプログラムのうち再捜索ステップ,測
定ステップ,再測定ステップを実行する部分がエッジ点
座標演算手段を構成している。画像処理装置12のパタ
ーンマッチングプログラムのうち再捜索ステップを実行
する部分は確認手段の一種である中点基準型確認手段で
もある。また、画像処理装置12のオブジェクトベクト
ル演算プログラムを実行する部分が対象部演算手段の一
種である中点基準型対象部演算手段を構成している。画
像処理装置12のパターンマッチングプログラムのう
ち、マスタ捜索テンプレート,マスタ測定テンプレー
ト,捜索テンプレートあるいはエッジ点に基づいてシー
クラインを自動的に設定する部分がシークライン自動設
定手段を構成し、パターンマッチングプログラムのう
ち、再測定ステップを繰り返し行う部分が繰返し手段を
構成している。
As is clear from the above description, in the present embodiment, of the dimension inspection apparatus, the part for acquiring the dimensions of the image pickup apparatus 10 and the image processing apparatus 12 constitutes an optical dimension measurement apparatus. . The CCD 80 constitutes an image sensor, the objective lens 108 constitutes a first lens system, the imaging lens 82 constitutes a second lens system, and the object support plate serves as an object (or object) support device. Make up. Also, the frame grabber memory 164 constitutes image data storage means, the DRAM 156 constitutes search template data storage means and measurement template data storage means, and the part which executes the search step of the pattern matching program of the image processing device 12 is the determination means. And the part of the pattern matching program that executes the re-search step, the measurement step, and the re-measurement step constitutes edge point coordinate calculation means. The part of the pattern matching program of the image processing device 12 that executes the re-search step is also a midpoint reference type checking means, which is a kind of checking means. Further, the part of the image processing apparatus 12 that executes the object vector calculation program constitutes a midpoint reference type target calculation unit which is a kind of target calculation unit. In the pattern matching program of the image processing apparatus 12, a part for automatically setting a seek line based on a master search template, a master measurement template, a search template, or an edge point constitutes a seek line automatic setting means. Of these, the portion that repeats the re-measurement step constitutes the repetition means.

【0125】さらに、画像処理装置12のパターンマッ
チングプログラムのうち、捜索ステップ,再捜索ステッ
プ,測定ステップ,再捜索ステップにおいて輝度を演算
する点を指定する部分が点指定手段を構成し、指定され
た点の輝度値の演算を行う部分が仮想点データ演算手段
を構成し、シークライン上の分割点の輝度値の演算を行
う部分が分割点特性値取得手段を構成し、その演算結果
に基づいて輝度の変化勾配が最大の点をエッジ点として
捜索する部分がエッジ点捜索手段を構成している。ま
た、漢字ROM162,テレビインタフェース186お
よびCPU154が入力関連データ表示手段を構成し、
オーバレイ表示メモリ166,CPU154,テレビイ
ンタフェース186が画像処理データ表示手段を構成
し、CPU154の入力関連データを画像処理データに
優先してモニタテレビ14に優先して表示させる部分が
入力関連データ優先表示手段を構成している。
Further, in the pattern matching program of the image processing apparatus 12, a portion for designating a point for calculating a luminance in the search step, the re-search step, the measurement step, and the re-search step constitutes a point designating means. The part that performs the calculation of the luminance value of the point constitutes virtual point data computing means, and the part that performs the computation of the luminance value of the division point on the seek line constitutes the division point characteristic value acquisition means. A portion that searches for a point having a maximum luminance change gradient as an edge point constitutes an edge point searching means. The kanji ROM 162, the television interface 186, and the CPU 154 constitute an input-related data display means.
The overlay display memory 166, the CPU 154, and the television interface 186 constitute image processing data display means, and the portion for displaying the input related data of the CPU 154 prior to the image processing data on the monitor television 14 is the input related data priority display means. Is composed.

【0126】なお、上記実施形態においては、寸法誤差
がX軸方向とY軸方向とで異なる比率で生ずる場合に対
処するために、両方向で別個にサイズファクタが演算さ
れるようになっていたが、両方向のサイズファクタが同
じであるとの仮定の下に演算されるようにしてもよい。
例えば、図36の矩形の像250においては、フェール
の生じたシークラインを含むペアシークラインを除い
て、X軸方向に平行な方向のすべてのペアシークライン
についての測定スパンを本来のスパンで除した値と、Y
軸方向に平行な方向のすべてのペアシークラインについ
ての測定スパンを本来のスパンで除した値とが求めら
れ、それら値のすべての平均値がサイズファクタとされ
るようにするのである。こうして求められたサイズファ
クタはX軸方向に平行なシークライン上のサイズポイン
トの演算にも、Y軸方向に平行なシークライン上のサイ
ズポイントの演算にも共通に使用される。
In the above-described embodiment, in order to cope with the case where the dimensional error occurs at a different ratio between the X-axis direction and the Y-axis direction, the size factor is separately calculated in both directions. , May be calculated under the assumption that the size factors in both directions are the same.
For example, in the rectangular image 250 shown in FIG. 36, the measurement spans of all the pair seek lines in the direction parallel to the X-axis direction are divided by the original spans, except for the pair seek lines including the failed seek line. Value and Y
The value obtained by dividing the measurement span for all the pair seek lines in the direction parallel to the axial direction by the original span is obtained, and the average value of all the values is used as the size factor. The size factor obtained in this manner is commonly used for calculating a size point on a seek line parallel to the X-axis direction and for calculating a size point on a seek line parallel to the Y-axis direction.

【0127】また、図51の円形の円形の像260のサ
イズファクタについても同様であって、図51に示され
ているペアシークラインのうち、フェールが生じたシー
クラインを含まないペアシークラインのすべてに関し
て、測定スパンを本来のスパンで除した値が求められ、
それらの値の平均値であるサイズファクタがフェールが
生じたシークラインを除くすべてのシークラインについ
てのpairRadiusに掛けられてサイズポイントが演算さ
れ、それらサイズポイントと対応するエッジポイントと
のずれDiffが演算されるようにする。位置ファクタおよ
び位置ファクタの演算は前記実施形態と同じでよい。
The same applies to the size factor of the circular image 260 in FIG. 51. Of the pair seek lines shown in FIG. 51, the pair seek line not including the failed seek line is selected. For all, the value obtained by dividing the measurement span by the original span is obtained,
The size factor, which is the average value of those values, is multiplied by pairRadius for all seek lines except the failed seek line to calculate the size points, and the deviation Diff between those size points and the corresponding edge points is calculated. To be done. The calculation of the position factor and the position factor may be the same as in the above embodiment.

【0128】また、上記実施形態において、再捜索ステ
ップは1回行われていたが、2回以上行われるようにし
てもよい。1回目の再捜索ステップにおいてフェールが
設定数以下であり、画像処理対象部のエッジ点が得られ
た後、更に再捜索テンプレートを設定して再捜索ステッ
プを行うのであり、再捜索テンプレートは、前回の再捜
索ステップにおいて用いられた再捜索テンプレートとエ
ッジ点の演算結果とに基づいて、画像処理対象部とのず
れがより少なくなる位置,角度で設定される。再捜索ス
テップが1回のみ行われるようにするより、複数回行わ
れるようにする方が、次の測定ステップでフェールが発
生する確率が低下することが経験上判っている。この理
由は定かではないが、捜索ステップにおいて画像処理対
象部と捜索テンプレートとのずれが大きく、辛うじて捜
索対象部が存在すると判定された場合には、再捜索テン
プレートと画像処理対象部とのずれがかなり大きくなる
可能性があり、この場合には次の測定ステップにおいて
測定テンプレートと画像処理対象部とのずれも大きくな
ってフェールが発生することがあるのに対し、再捜索ス
テップが2回以上行われれば、その確率が低下するため
ではないかと推測されている。
Further, in the above embodiment, the re-search step is performed once, but may be performed two or more times. After the number of failures is equal to or less than the set number in the first re-search step, and after the edge point of the image processing target portion is obtained, the re-search template is set and the re-search step is performed. Based on the re-search template used in the re-search step and the calculation result of the edge point, the position and the angle are set so that the deviation from the image processing target portion is reduced. Experience has shown that making the re-searching step multiple times, rather than just once, reduces the probability of a failure occurring in the next measurement step. The reason for this is not clear, but in the search step, the difference between the image processing target portion and the search template is large, and if it is determined that the search target portion is barely present, the difference between the re-search template and the image processing target portion is small. In this case, the displacement between the measurement template and the image processing target part may increase in the next measurement step and a failure may occur. On the other hand, the re-search step is performed twice or more. If so, it is speculated that the probability may decrease.

【0129】また、画像処理対象部の形状,おおよその
位置,回転角度が予め判っていれば、捜索テンプレート
による捜索を行わなくてもシークラインをエッジ点の演
算可能な位置に設定することができ、始めから測定テン
プレートを用いてエッジ点を求めることができる。上記
実施形態においては、再捜索テンプレートを用いて再捜
索ステップを行った後、測定ステップが行われるように
なっていたが、画像処理対象部の寸法誤差や形状欠陥が
小さい場合には、捜索ステップの直後に測定ステップを
実行させることも可能である。この場合、前記再捜索テ
ンプレートを測定テンプレートとして使用することも可
能であるが、シークライン数がさらに多いテンプレート
を使用することが望ましい。
Also, if the shape, approximate position, and rotation angle of the image processing target portion are known in advance, the seek line can be set to a position where the edge point can be calculated without performing a search using a search template. The edge point can be obtained from the beginning by using the measurement template. In the above embodiment, after the re-searching step is performed using the re-searching template, the measuring step is performed. However, when the dimensional error or the shape defect of the image processing target portion is small, the searching step is performed. 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 preferable to use a template having a larger number of seek lines.

【0130】さらに、上記実施形態においてパターンマ
ッチングにおける異常の判定は、プログラム中に設定さ
れた許容フェール数を越えるフェールがあるか否かによ
り行われていたが、例えば、フェールが一つでもあれば
異常と判定し、フェールのない画像処理対象部について
のみオブジェクトベクトルの演算を行うプログラムと、
少なくとも1つのフェールを許容し、フェールがあって
もオブジェクトベクトルの演算を行うプログラムとを作
成し、オペレータが選択し得るようにしてもよい。フェ
ールを許容しないプログラムは画像処理に要する時間が
短くて済むため、状況によってはこのプログラムを選択
し、被検査物122の検査能率を高め、あるいは電気部
品146を1個装着するのに要する時間を短縮すること
ができる。
Further, in the above-described embodiment, the determination of an abnormality in the pattern matching is made based on whether or not there is a failure exceeding the allowable number of failures set in the program. A program that determines an abnormality and calculates an object vector only for an image processing target portion having no failure;
At least one failure may be allowed, and a program for calculating the object vector may be created even if a failure occurs, so that the operator can select the failure. A program that does not allow a failure requires only a short time for image processing. Therefore, depending on the situation, select this program to increase the inspection efficiency of the inspection object 122 or reduce the time required for mounting one electric component 146. Can be shortened.

【0131】また、上記実施形態においては、対物レン
ズ108の焦点Oとオリフィス94の透孔100との光
軸方向の相対位置を調節するために、調節ねじ50が使
用され、鏡68の反射面70の向きを調節するために調
節ねじ66が使用されていたが、これら調節ねじの代わ
りに図57に示す積層圧電素子280を使用することも
可能である。積層圧電素子280は、焼結したセラミッ
クスを切断,研磨した薄板282の間に内部電極28
4,285を交互に配設し、内部電極284を外部電極
286に、内部電極285を外部電極287にそれぞれ
接続してなるものである。外部電極286,287を駆
動回路288に接続し、その駆動回路288を撮像装置
10および画像処理装置12によって制御することによ
り、対物レンズ108の焦点Oとオリフィス94の透孔
100との光軸方向の相対位置や、鏡68の反射面70
の向きを調節するのである。積層圧電素子280はそれ
に印加する電圧を変化させることにより長さを変化させ
ることができ、撮像装置10により取得された画像を、
画像処理装置12が処理して前記検査治具126の基準
マーク129の中心間距離や被検査物122の測定寸法
を得、それら測定結果を参照しつつ駆動回路288を制
御し、対物レンズ108の焦点Oとオリフィス94の透
孔100との光軸方向の相対位置や、鏡68の反射面7
0の向きを自動で調節するようにすることができる。
In the above embodiment, the adjusting screw 50 is used to adjust the relative position in the optical axis direction between the focal point O of the objective lens 108 and the through hole 100 of the orifice 94, and the reflecting surface of the mirror 68 is used. Although the adjusting screws 66 have been used to adjust the orientation of 70, a laminated piezoelectric element 280 shown in FIG. 57 can be used instead of these adjusting screws. The laminated piezoelectric element 280 has an internal electrode 28 between thin plates 282 obtained by cutting and polishing sintered ceramics.
4, 285 are alternately arranged, and the internal electrode 284 is connected to the external electrode 286, and the internal electrode 285 is connected to the external electrode 287. The external electrodes 286 and 287 are connected to a drive circuit 288, and the drive circuit 288 is controlled by the imaging device 10 and the image processing device 12 so that the optical axis direction between the focal point O of the objective lens 108 and the through hole 100 of the orifice 94. Relative position and the reflection surface 70 of the mirror 68
Adjust the orientation of the The length of the laminated piezoelectric element 280 can be changed by changing the voltage applied thereto, and the image acquired by the imaging device 10 is
The image processing apparatus 12 performs processing to obtain the center-to-center distance of the reference mark 129 of the inspection jig 126 and the measured dimensions of the inspection object 122, and controls the drive circuit 288 while referring to the measurement results to control the objective lens 108. The relative position between the focal point O and the through hole 100 of the orifice 94 in the optical axis direction, and the reflection surface 7 of the mirror 68
The direction of 0 can be automatically adjusted.

【0132】また、被検査物(寸法を測定すべき物と考
えれば被測定物)を支持する支持装置は、前記実施形態
においては単純な透明平板とされており、鏡の表面が傷
つくのを防止する鏡保護板と考えることもできるもので
ある。したがって、鏡自体を支持装置として機能させる
ことも可能である。また、被測定物の輪郭線内において
被測定物を支持するもの、あるいは被測定物の寸法を測
定すべき部分の撮像を妨げない形状を有するものであれ
ば、支持装置を透明材料で製作することは不可欠ではな
い。支持装置を、被測定物を一定の位置または方位に位
置決めして支持するものとすることも可能であり、その
場合には画像処理に要する時間を短縮し得る利点があ
る。
In the above embodiment, the supporting device for supporting the object to be inspected (the object to be measured if it is considered to be measured) is a simple transparent flat plate, so that the surface of the mirror is not damaged. It can also be thought of as a mirror protection plate to prevent. Therefore, the mirror itself can function as a support device. In addition, if the object to be measured is supported within the contour of the object to be measured or has a shape that does not hinder the imaging of a portion where the size of the object to be measured is to be measured, the supporting device is made of a transparent material. It is not essential. The support device can also support the object to be measured at a fixed position or orientation, and in this case, there is an advantage that the time required for image processing can be reduced.

【0133】その他、特許請求の範囲を逸脱することな
く、当業者の知識に基づいて種々の変形,改良を施した
態様で本発明を実施することができる。
In addition, without departing from the scope of the claims, the present invention can be implemented in various modified and improved forms based on the knowledge of those skilled in the art.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施形態である寸法検査装置の撮像
装置を示す側面図(一部断面)である。
FIG. 1 is a side view (partial cross section) showing an imaging device of a dimension inspection device according to an embodiment of the present invention.

【図2】上記撮像装置の正面図(一部断面)である。FIG. 2 is a front view (partial cross section) of the imaging device.

【図3】上記撮像装置の要部の、CCDカメラおよびそ
れの昇降装置を除いた状態の平面図である。
FIG. 3 is a plan view of a main part of the image pickup apparatus, excluding a CCD camera and an elevating device thereof.

【図4】上記寸法検査装置の画像処理装置を含む制御装
置の正面図である。
FIG. 4 is a front view of a control device including an image processing device of the dimension inspection device.

【図5】前記撮像装置の光学系を概念的に示す図であ
る。
FIG. 5 is a diagram conceptually showing an optical system of the imaging device.

【図6】上記光学系における寸法誤差の発生を説明する
ための図である。
FIG. 6 is a diagram for explaining occurrence of a dimensional error in the optical system.

【図7】上記光学系における寸法誤差の発生を説明する
ための図である。
FIG. 7 is a diagram for explaining occurrence of a dimensional error in the optical system.

【図8】前記撮像装置において使用される検査用ゲージ
を示す正面断面図である。
FIG. 8 is a front sectional view showing an inspection gauge used in the imaging apparatus.

【図9】上記検査用ゲージの平面図である。FIG. 9 is a plan view of the inspection gauge.

【図10】前記光学系における寸法誤差の発生を説明す
るための概念図である。
FIG. 10 is a conceptual diagram for explaining occurrence of a dimensional error in the optical system.

【図11】前記撮像装置において使用される較正用ゲー
ジを示す平面図である。
FIG. 11 is a plan view showing a calibration gauge used in the imaging device.

【図12】前記画像処理装置と組み合わせて使用可能な
電気部品装着装置の電気部品撮像装置を概念的に示す図
である。
FIG. 12 is a diagram conceptually showing an electric component imaging device of an electric component mounting device that can be used in combination with the image processing device.

【図13】前記画像処理装置のブロック図である。FIG. 13 is a block diagram of the image processing apparatus.

【図14】上記画像処理装置のDRAMに記憶された事
前処理プログラムを示す図である。
FIG. 14 is a diagram showing a pre-processing program stored in a DRAM of the image processing apparatus.

【図15】上記画像処理装置のDRAMに記憶された実
行処理プログラムを示す図である。
FIG. 15 is a diagram showing an execution processing program stored in a DRAM of the image processing apparatus.

【図16】上記画像処理装置のDRAMに記憶されたパ
ターンマッチングプログラムを示す図である。
FIG. 16 is a diagram showing a pattern matching program stored in a DRAM of the image processing apparatus.

【図17】上記パターンマッチングプログラムを正方形
の像について実行するための設定データを示す図であ
る。
FIG. 17 is a diagram showing setting data for executing the pattern matching program for a square image.

【図18】図17に示す設定データに基づいて設定され
るマスタ捜索テンプレートを画像処理対象部と共に示す
図である。
18 is a diagram showing a master search template set based on the setting data shown in FIG. 17 together with an image processing target unit.

【図19】図17に示す設定データに基づいて設定され
るマスタ測定テンプレートを画像処理対象部と共に示す
図である。
19 is a diagram showing a master measurement template set based on the setting data shown in FIG. 17 together with an image processing target unit.

【図20】上記マスタ捜索テンプレートに基づく捜索テ
ンプレートの生成を説明する図である。
FIG. 20 is a diagram illustrating generation of a search template based on the master search template.

【図21】前記パターンマッチングプログラムを一部が
切り欠かれた円板について実行するための設定データを
示す図である。
FIG. 21 is a diagram showing setting data for executing the pattern matching program on a partially cut-out disk.

【図22】図21に示す設定データに基づいて設定され
るマスタ捜索テンプレートを円板と共に示す図である。
FIG. 22 is a diagram showing a master search template set based on the setting data shown in FIG. 21 together with a disk.

【図23】図21に示す設定データに基づいて設定され
るマスタ測定テンプレートを円板と共に示す図である。
23 is a diagram showing a master measurement template set based on the setting data shown in FIG. 21 together with a disk.

【図24】前記パターンマッチングプログラムの捜索ス
テップにおいて捜索テンプレートが仮想画面に重ねられ
た状態を示す図である。
FIG. 24 is a diagram showing a state in which a search template is superimposed on a virtual screen in a search step of the pattern matching program.

【図25】仮想画面上において指定された点の輝度を演
算するための線形補間を説明する図である。
FIG. 25 is a diagram illustrating linear interpolation for calculating the luminance of a designated point on a virtual screen.

【図26】前記画像処理装置において物理画面上の画像
データから仮想画面上の画像データを演算する物理画面
/仮想画面変換ドライバを概念的に示す図である。
FIG. 26 is a diagram conceptually showing 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.

【図27】前記パターンマッチングプログラムの再捜索
ステップの再捜索テンプレートが仮想画面に重ねられた
状態を示す図である。
FIG. 27 is a diagram showing a state in which a re-search template in a re-search step of the pattern matching program is overlaid on a virtual screen.

【図28】上記再捜索テンプレートのシークライン上に
設定された分割点と撮像面を構成する固体撮像素子との
関係を示す図である。
FIG. 28 is a diagram illustrating a relationship between a division point set on a seek line of the re-search template and a solid-state imaging device forming an imaging surface.

【図29】図28に示す分割点について演算された輝度
を表す図表である。
FIG. 29 is a table showing luminance calculated for the division points shown in FIG. 28;

【図30】上記分割点について演算された輝度を微分す
るための差分フィルタを示す図である。
FIG. 30 is a diagram showing a difference filter for differentiating the luminance calculated for the division point.

【図31】上記分割点について演算された輝度を微分す
るための別の差分フィルタを示す図である。
FIG. 31 is a diagram showing another difference filter for differentiating the luminance calculated for the division point.

【図32】図29に示す演算結果をグラフにして示す図
である。
FIG. 32 is a graph showing the calculation result shown in FIG. 29;

【図33】図30に示す差分フィルタを用いて行った微
分の結果を表すグラフである。
FIG. 33 is a graph showing the result of differentiation performed using the difference filter shown in FIG. 30.

【図34】図31に示す差分フィルタを用いて行った微
分の結果を表すグラフである。
FIG. 34 is a graph showing the result of differentiation performed using the difference filter shown in FIG. 31.

【図35】前記パターンマッチングプログラムの測定ス
テップにおいて測定テンプレートが仮想画面に重ねられ
た状態を示す図である。
FIG. 35 is a diagram showing a state in which a measurement template is overlaid on a virtual screen in a measurement step of the pattern matching program.

【図36】パターンマッチングの実行後に行われる画像
処理対象部の寸法計算を矩形の像を例に取って説明する
図である。
FIG. 36 is a diagram illustrating the calculation of the dimensions of the image processing target portion performed after the execution of the pattern matching, taking a rectangular image as an example.

【図37】上記寸法計算においてサイズポイントとエッ
ジポイントとの差の演算を説明する図である。
FIG. 37 is a diagram illustrating a calculation of a difference between a size point and an edge point in the dimension calculation.

【図38】画像処理対象部の回転中心および回転角度の
演算を直線を例に取って説明する図である。
FIG. 38 is a diagram illustrating the calculation of the rotation center and the rotation angle of the image processing target portion, taking a straight line as an example.

【図39】シークラインにフェールがある場合における
画像処理対象部の回転中心の指定中心に対するずれの演
算を説明する図である。
FIG. 39 is a diagram illustrating a calculation of a deviation of the rotation center of the image processing target portion from the designated center when a seek line has a failure.

【図40】シークラインにフェールがある場合における
画像処理対象部の回転中心の指定中心に対するずれの演
算の別の例を説明する図である。
FIG. 40 is a diagram illustrating another example of the calculation of the deviation of the rotation center of the image processing target portion from the designated center when the seek line has a failure.

【図41】シークラインにフェールがある場合における
画像処理対象部の回転中心の指定中心に対するずれの演
算の更に別の例を説明する図である。
FIG. 41 is a diagram illustrating still another example of the calculation of the deviation of the rotation center of the image processing target portion from the designated center when there is a failure in the seek line.

【図42】シークラインが互に直交する2方向に設定さ
れた場合における画像処理対象部の回転中心および回転
中心の指定中心に対するずれの演算を説明する図であ
る。
FIG. 42 is a diagram illustrating a rotation center of an image processing target unit and a calculation of a deviation of the rotation center from a designated center when a seek line is set in two directions orthogonal to each other.

【図43】シークラインが互に直交する2方向に設定さ
れた場合における画像処理対象部の回転中心および回転
中心の指定中心に対するずれの演算の別の例を説明する
図である。
FIG. 43 is a diagram illustrating another example of the calculation of the rotation center of the image processing target portion and the deviation of the rotation center from the designated center when the seek line is set in two directions orthogonal to each other.

【図44】画像処理対象部の角度の演算に用いられる角
度ファクタを示す図表である。
FIG. 44 is a chart showing angle factors used for calculating the angle of the image processing target portion.

【図45】上記角度ファクタを座標面上において示す図
である。
FIG. 45 is a diagram showing the angle factor on a coordinate plane.

【図46】画像処理対象部の回転中心および回転角度の
演算を説明する図である。
FIG. 46 is a diagram illustrating the calculation of the rotation center and the rotation angle of the image processing target unit.

【図47】画像処理対象部の回転中心および回転角度の
演算の別の例を説明する図である。
FIG. 47 is a diagram illustrating another example of calculation of the rotation center and the rotation angle of the image processing target unit.

【図48】画像処理対象部の回転中心および回転角度の
演算の更に別の例を説明する図である。
FIG. 48 is a diagram illustrating still another example of the calculation of the rotation center and the rotation angle of the image processing target unit.

【図49】画像処理対象部の指定中心と回転中心とにず
れがあり、画像処理対象部に位置および角度のずれがあ
る場合における指定中心の位置の演算を説明する図であ
る。
FIG. 49 is a diagram illustrating the calculation of the position of the designated center when the designated center and the rotation center of the image processing target part are shifted and the position and angle of the image processing target part are shifted.

【図50】画像処理対象部の基準座標に対する位置ずれ
量および角度ずれ量の演算を説明する図である。
FIG. 50 is a diagram for explaining calculation of a positional shift amount and an angular shift amount of the image processing target portion with respect to reference coordinates.

【図51】画像処理対象部の一種である円形の像にシー
クラインが設定された状態を示す図である。
FIG. 51 is a diagram illustrating a state in which a seek line is set in a circular image that is a type of an image processing target unit.

【図52】上記円形の像の寸法計算を説明する図であ
る。
FIG. 52 is a diagram illustrating the calculation of the size of the circular image.

【図53】上記寸法計算におけるサイズポイントの演算
およびエッジポイントとの差の演算を説明する図であ
る。
FIG. 53 is a diagram for explaining the calculation of the size point and the calculation of the difference from the edge point in the size calculation.

【図54】QFPについて行われるパターンマッチング
を説明する図である。
FIG. 54 is a diagram illustrating pattern matching performed on a QFP.

【図55】電気部品装着装置における装着サイクルタイ
ムとCCDカメラの露光時間および画像転送時間との関
係を示すタイムチャートである。
FIG. 55 is a time chart showing the relationship between the mounting cycle time in the electric component mounting apparatus and the exposure time and image transfer time of the CCD camera.

【図56】上記電気部品装着装置における画像処理サイ
クルを説明するタイムチャートである。
FIG. 56 is a time chart for explaining an image processing cycle in the electric component mounting apparatus.

【図57】前記撮像装置の調節装置の別の実施形態を概
念的に示す図である。
FIG. 57 is a view conceptually showing another embodiment of the adjusting device of the imaging device.

【図58】従来の光学系による撮像を概念的に示す図で
ある。
FIG. 58 is a diagram conceptually showing imaging by a conventional optical system.

【符号の説明】[Explanation of symbols]

10:撮像装置 12:画像処理装置 14:モニ
タテレビ 16:入力装置 18:キーボード
20:マウス 22:フットスイッチ 30:撮像
装置本体 38:レンズブラケット 42:カメラ
ブラケット 50:調節ねじ 64:鏡支持板
66:調節ねじ 68:鏡 70:反射面 7
2:被検査物支持板 76:CCDカメラ 80:
CCD 82:結像レンズ 90:ビームスプリッ
タ 92:照明装置 94:オリフィス 98:
ハロゲンランプ 100:透孔 156:DRAM
164:フレームグラバメモリ 250:矩形の
像 260:円形の像 270:QFPの像
10: Imaging device 12: Image processing device 14: Monitor television 16: Input device 18: Keyboard
20: Mouse 22: Foot switch 30: Imaging device body 38: Lens bracket 42: Camera bracket 50: Adjustment screw 64: Mirror support plate
66: adjusting screw 68: mirror 70: reflective surface 7
2: Inspection object support plate 76: CCD camera 80:
CCD 82: imaging lens 90: beam splitter 92: illumination device 94: orifice 98:
Halogen lamp 100: Through hole 156: DRAM
164: frame grabber memory 250: rectangular image 260: circular image 270: QFP image

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 一平面をなす反射面の手前に被測定物を
置き、それら反射面と被測定物とに反射面と直交する向
きの平行光を当て、少なくとも、反射面により反射され
て被測定物の周囲を通過した平行光により形成される像
を撮像し、取得した画像に基づいて前記被測定物の、前
記反射面に平行な方向の寸法を求める光学式寸法測定方
法。
An object to be measured is placed in front of a reflecting surface that forms a plane, and parallel light in a direction orthogonal to the reflecting surface is applied to the reflecting surface and the object to be measured. An optical dimension measurement method for capturing an image formed by parallel light passing around a measurement object and obtaining a dimension of the measurement object in a direction parallel to the reflection surface based on the acquired image.
【請求項2】 前記平行光を、光源からオリフィスを経
て放射状に投光された光をレンズ系により平行光に変換
して得、かつ、前記反射面に直角な方向における複数の
位置において被測定物の測定を行いつつ前記オリフィス
と前記レンズ系との光軸方向における相対位置を調節
し、それら複数の位置における測定の結果が予め定めら
れた条件を満たしたとき、オリフィスとレンズ系との相
対位置の調節を終了する相対位置調節工程を含む請求項
1に記載の光学式寸法測定方法。
2. The parallel light is obtained by converting light projected radially from a light source through an orifice into parallel light by a lens system, and is measured at a plurality of positions in a direction perpendicular to the reflecting surface. The relative position of the orifice and the lens system in the optical axis direction is adjusted while measuring an object, and when the measurement results at the plurality of positions satisfy a predetermined condition, the relative position of the orifice and the lens system is adjusted. The optical dimension measuring method according to claim 1, further comprising a relative position adjusting step of terminating the position adjustment.
【請求項3】 被測定物の外のり寸法(または内のり寸
法)の測定を行いつつ前記反射面の向きを調節し、被測
定物の外のり寸法が極小値(または内のり寸法が極大
値)となったとき、反射面の向きの調節を終了する反射
面向き調節工程を含む請求項1または2に記載の光学式
寸法測定方法。
3. The direction of the reflecting surface is adjusted while measuring the outer dimension (or inner dimension) of the object to be measured, so that the outer dimension of the object to be measured is minimized (or the inner dimension is maximized). The optical dimension measuring method according to claim 1 or 2, further comprising a reflecting surface direction adjusting step of terminating the adjusting of the direction of the reflecting surface when the angle becomes longer.
【請求項4】 一平面をなす反射面と、 その反射面と光軸が直交する状態で配置され、反射面か
らの平行光を焦点に集光する第一レンズ系と、 それら反射面と第一レンズ系との間の位置に被測定物を
支持する被測定物支持装置と、 前記第一レンズ系に対して前記反射面とは反対側の位置
に設けられ、第一レンズ系の光軸に対して傾斜し、光の
一部を透過させ、残りを反射する反射面を有するビーム
スプリッタと、 そのビームスプリッタの反射面に対して前記第一レンズ
系の焦点とは面対称の位置に設けられたオリフィスと、 そのオリフィスに対して前記ビームスプリッタとは反対
側に設けられた光源と、 前記第一レンズ系の焦点に焦点を有し、第一レンズ系に
より集光されるとともに前記ビームスプリッタを通過し
た光を平行光線に変換する第二レンズ系と、 その第二レンズ系により平行光線に変換された光により
形成される像を撮像する撮像センサと、 その撮像センサにより取得された画像に基づいて前記被
測定物の前記反射面に平行な方向の寸法を演算する画像
処理装置とを含む光学式寸法測定装置。
4. A reflecting surface which forms a plane, a first lens system which is disposed in such a manner that the reflecting surface and the optical axis are orthogonal to each other, and which focuses parallel light from the reflecting surface to a focal point; An object support device that supports the object to be measured at a position between the one lens system and an optical axis of the first lens system that is provided at a position opposite to the reflection surface with respect to the first lens system A beam splitter having a reflecting surface that is inclined with respect to, transmits part of light, and reflects the rest, and is provided at a plane-symmetric position with respect to the reflecting surface of the beam splitter and the focal point of the first lens system. An orifice, a light source provided on the opposite side to the beam splitter with respect to the orifice, and a focal point at the focal point of the first lens system. Convert the light passing through to parallel rays A second lens system, an image sensor for capturing an image formed by the light converted into parallel rays by the second lens system, and the reflection of the object to be measured based on an image obtained by the image sensor. An optical processing device for calculating a dimension in a direction parallel to the surface;
【請求項5】 前記画像処理装置が、 前記撮像センサにより撮像された画像のデータを記憶す
る画像データ記憶手段と、 一定の距離を隔てた2個の点を一対とするポイントペア
を複数組有する捜索テンプレートのデータを記憶する捜
索テンプレートデータ記憶手段と、 その捜索テンプレートデータ記憶手段の捜索テンプレー
トを前記画像データ記憶手段の画像データの表す画像が
存在する画面に重ねた場合に、前記複数組のポイントペ
アを構成する各対の点の光学的特性値の相違状態が設定
状態以上である場合には、その対の点の一方が前記被測
定物の画像処理対象部のエッジ内に位置し、他方は背景
内に位置する適合状態にあるとし、前記複数のポイント
ペアのうち設定量以上のものが適合状態にあれば、画像
処理対象部は捜索テンプレートに適合する捜索対象部で
あると判定する判定手段とを含む請求項4に記載の光学
式寸法測定装置。
5. An image processing apparatus comprising: an image data storage unit configured to store data of an image captured by the image sensor; and a plurality of pairs of point pairs including two points separated by a predetermined distance. A search template data storage unit for storing data of a search template; and a plurality of points when the search template of the search template data storage unit is superimposed on a screen on which an image represented by image data of the image data storage unit exists. When the difference state of the optical characteristic value of each pair of points forming the pair is equal to or greater than the set state, one of the points of the pair is located within the edge of the image processing target portion of the device under test, and the other. Is in the matching state located in the background, and if more than the set amount of the plurality of point pairs is in the matching state, the image processing target unit searches for the search template. The optical dimension measuring device according to claim 4, further comprising: a determination unit configured to determine that the search target portion matches the search target.
【請求項6】 前記画像処理装置が、 前記撮像センサにより撮像された画像のデータを記憶す
る画像データ記憶手段と、 2個の点を直線状に結んで成るシークラインを複数本有
する測定テンプレートのデータを記憶する測定テンプレ
ートデータ記憶手段と、 その測定テンプレートデータ記憶手段の測定テンプレー
トを前記画像データ記憶手段の画像データの表す画像が
存在する画面に重ね、前記複数本のシークラインの各々
の上における前記被測定物の画像処理対象部のエッジ点
の座標を演算するエッジ点座標演算手段とを含む請求項
4または5に記載の光学式寸法測定装置。
6. An image processing apparatus, comprising: an image data storage unit configured to store data of an image captured by the imaging sensor; and a measurement template including a plurality of seek lines connecting two points in a straight line. A measurement template data storage unit for storing data, a measurement template of the measurement template data storage unit is superimposed on a screen on which an image represented by the image data of the image data storage unit exists, and the measurement template data is stored on each of the plurality of seek lines. 6. The optical dimension measuring device according to claim 4, further comprising edge point coordinate calculating means for calculating coordinates of an edge point of the image processing target portion of the device under test.
【請求項7】 前記撮像センサが、多数の撮像素子を備
え、各撮像素子の受光状態に応じた電気信号を発生させ
るものであり、前記画像データ記憶手段がそれら各撮像
素子の電気信号のデータを、各撮像素子の位置と関連付
けて記憶するものであり、かつ、前記画像処理装置がさ
らに、画像データ記憶手段の画像データにより形成され
る物理画面に対応して想定される仮想画面上の任意の点
を指定する点指定手段と、その点指定手段による点指定
毎に前記物理画面上の光学的特性値のデータに基づいて
指定された点の光学的特性値を演算する仮想点データ演
算手段とを含む請求項4ないし6のいずれか1つに記載
の光学式寸法測定装置。
7. The image sensor includes a plurality of image sensors, and generates an electric signal according to a light receiving state of each image sensor. The image data storage unit stores data of the electric signal of each image sensor. Is stored in association with the position of each image sensor, and the image processing apparatus further includes an arbitrary virtual screen assumed corresponding to the physical screen formed by the image data in the image data storage unit. Point designating means for designating a point, and virtual point data computing means for computing the optical characteristic value of the designated point based on the data of the optical characteristic value on the physical screen for each point designation by the point designating means The optical dimension measuring device according to any one of claims 4 to 6, comprising:
【請求項8】 前記エッジ点座標演算手段が、 前記シークライン上に設定された複数の分割点の光学的
特性値を取得する分割点特性値取得手段と、 その分割点特性値取得手段により取得された分割点の光
学的特性値に基づいてシークライン上における光学的特
性値の最も急激な変化点をエッジ点として捜索するエッ
ジ点捜索手段とを含む請求項6または7に記載の光学式
寸法測定装置。
8. The dividing point characteristic value acquiring means for acquiring the optical characteristic values of the plurality of dividing points set on the seek line, wherein the edge point coordinate computing means acquires the optical characteristic values of the plurality of dividing points set on the seek line. 8. The optical dimension according to claim 6, further comprising: an edge point searching means for searching, as an edge point, a steepest change point of the optical characteristic value on the seek line based on the optical characteristic value of the divided point. measuring device.
【請求項9】 前記複数の分割点のピッチが前記撮像素
子のピッチより小さい請求項8に記載の光学式寸法測定
装置。
9. The optical dimension measuring apparatus according to claim 8, wherein a pitch of the plurality of division points is smaller than a pitch of the image sensor.
JP10009085A 1998-01-20 1998-01-20 Optical dimension measurement and device therefor Pending JPH11211420A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10009085A JPH11211420A (en) 1998-01-20 1998-01-20 Optical dimension measurement and device therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10009085A JPH11211420A (en) 1998-01-20 1998-01-20 Optical dimension measurement and device therefor

Publications (1)

Publication Number Publication Date
JPH11211420A true JPH11211420A (en) 1999-08-06

Family

ID=11710789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10009085A Pending JPH11211420A (en) 1998-01-20 1998-01-20 Optical dimension measurement and device therefor

Country Status (1)

Country Link
JP (1) JPH11211420A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007133715A (en) * 2005-11-11 2007-05-31 Optex Fa Co Ltd Method and apparatus for processing image
CN107274407A (en) * 2017-08-11 2017-10-20 长春理工大学 Steel ball accurate metering, Dimensions recognition device and method
CN108195317A (en) * 2017-12-15 2018-06-22 中国航空工业集团公司成都飞机设计研究所 A kind of detection method of aircraft intake and exhaust grid cell rib thickness and the depth of parallelism
CN109766622A (en) * 2019-01-03 2019-05-17 中国联合网络通信集团有限公司 Object method for sorting and device, storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007133715A (en) * 2005-11-11 2007-05-31 Optex Fa Co Ltd Method and apparatus for processing image
CN107274407A (en) * 2017-08-11 2017-10-20 长春理工大学 Steel ball accurate metering, Dimensions recognition device and method
CN107274407B (en) * 2017-08-11 2023-07-18 长春理工大学 Steel ball accurate counting and size identifying device and method
CN108195317A (en) * 2017-12-15 2018-06-22 中国航空工业集团公司成都飞机设计研究所 A kind of detection method of aircraft intake and exhaust grid cell rib thickness and the depth of parallelism
CN109766622A (en) * 2019-01-03 2019-05-17 中国联合网络通信集团有限公司 Object method for sorting and device, storage medium
CN109766622B (en) * 2019-01-03 2023-05-02 中国联合网络通信集团有限公司 Object sorting method and device and storage medium

Similar Documents

Publication Publication Date Title
JPH11351827A (en) Image processor
US5694214A (en) Surface inspection method and apparatus
JP2733202B2 (en) Automatic inspection method and inspection system for printed circuit boards
US5774224A (en) Linear-scanning, oblique-viewing optical apparatus
JP4791118B2 (en) Image measuring machine offset calculation method
JP3311135B2 (en) Inspection range recognition method
US10360684B2 (en) Method and apparatus for edge determination of a measurement object in optical metrology
US10540561B2 (en) Inspection method and inspection apparatus
CN110231352A (en) Image testing device, image checking method and image inspection program
JP3678916B2 (en) Non-contact 3D measurement method
JP2008196974A (en) Device and method for measuring height of projection object
JP7368141B2 (en) Wafer appearance inspection device and method
JP2000131037A (en) Apparatus for inspecting shape of body
JPH11211420A (en) Optical dimension measurement and device therefor
JPH11351840A (en) Noncontact type three-dimensional measuring method
JP3715377B2 (en) Object shape measuring device
JP2000018919A (en) Imaging device, optical measuring apparatus, and optical system inspecting apparatus
JP3501661B2 (en) Inspection method and inspection device for liquid crystal display panel
JP3823488B2 (en) IC lead float inspection device and inspection method
KR101005076B1 (en) Apparatus and method for detecting bump
CN114222913B (en) Wafer appearance inspection device and method
KR0159136B1 (en) Apparatus for measuring property of painted surface
JPH04351951A (en) Defect inspection device
CN112325784B (en) Warpage detection method
KR101005077B1 (en) Apparatus for detecting bump

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050114

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060915

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060926

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070206