【発明の詳細な説明】
〔産業上の利用分野〕
本発明は光学的に画像等を検出し、非接触にて欠陥検
査等を行う外観検査方式に係り、特に立体形状を検出す
るに最適な、例えばプリント基板の半田付をチェックし
たりするのに好適な照明および検出方法に関する。
〔従来の技術〕
従来のパターン欠陥検査装置は特開昭55−157078号公
報に見られるように、被検査面上の形状的特徴を何らか
の方法をもって検出し、その特徴部分の一致度を演算処
理を行い欠陥を検出していた。
〔発明が解決しようとする問題点〕
このような方式では非特定形状の欠陥の検出が困難で
あり、また照明により発生する影の部分が形状の一部と
して認識される等、立体形状の認識が困難であった。
本発明の目的は立体かつ非特定形状の欠陥を高精度に
検出する方法を提供することにある。
〔問題点を解決するための手段〕
本発明による欠陥の検査方法は、被検査面上に互いに
補色の関係にあるスポット(部分平行特性)光を被検査
面に対し斜方向で、かつ被検査面に対して互いに異なる
垂直面方向より、被照明面上で互いに重なるように(同
一面に集光するよう)に照明する。
〔作用〕
従って、その被照明面内に含有されている波長成分を
検出し、その成分の部分的な欠損の割合を演算処理する
ことにより、被検査面の表面上の突出や欠損等の欠陥や
異物を検出することができる。
〔実施例〕
以下本発明の詳細を図面に参照して説明する。
第1図は本発明を応用した、欠陥自動検査装置の全体
構成図を示す。
ここでは被検査面8は全波長成分を反射する表面で
も、特定の波長成分を選択反射もしくは選択吸収特性を
有する表面でもよいが、この面が不規則な分布で選択反
射もしくは選択吸収特性を有する表面の場合のみ、撮像
(検像)装置1もしくは撮像(検像)レンズ5などに何
らかの処理(フィルタ、幾値調整等)を施し、撮像画像
内での背景部が一定の一様な特性を有するものとする。
本明細書においては被検査面8は全波長を反射する表面
と仮定し以下説明する。
被検査面8はXYテーブル等により駆動され(撮像系が
移動しても可)、その表面を光源3より輻射された光を
選択光透過(吸収も可)フィルタ4を通し特定の波長成
分のみを有する光を光源集光レンズ6により集光し特定
の検査範囲のみを照明する。この時、この照明系の照明
光軸は被検査面8に対し斜方向より照明されるように配
し、かつ被検査面8に対し垂直方向で上記照明光軸を含
む面と異なる面(撮像光軸に対し180゜反転面は同一面
でも可)に、選択透過フィルタ4により選択された波長
と互いに補色関係(この場合完全に波長間を埋める必要
はなく、また部分的に重なり合っていてもさしつかえな
い)にある光を、被照明面で互いに重なり合うよう、複
数の照明装置を配し照明する。
本明細書中では、光源3、選択光透過フィルタ4およ
び光源集光レンズ6をまとめて補色照明装置と呼ぶこと
とする。
以上の補色照明装置にて照明された被検査面8を焦点
調整用ヘリコイド2により焦点調整された撮像(検像)
レンズ5に撮像(検像)装置1上に結像し被検査面8の
反射光成分を検出して検出欠陥7を検知することにより
被検査面を検査するものである。
第2図に、本発明に用いる照明装置の一例を示す。こ
の例では波長成分により赤色光(約6000Å以上成分、以
下R光と記す)、緑色光(500〜6000Å成分、以下G光
と記す)、青色光(約5000Å以下成分、以下B光と記
す)の3成分をフィルタにより分離する方式を用いる
が、この照明装置は各照明光が補色光の関係にあればい
かように分割してもさしつかえなく、検出機器との対応
により、XYZ色光(CIE−国際照明委員会)、Lab表色系
(エルスター、エースター、ビースタ表色系)、立体
色、マンセル色相等の色系において補色分割した光線を
用いてもさしつかえない。ここで、R補色照明装置11を
用いてR補色光12を、G補色照明装置13にてG補色光4
を、B補色照明装置15にてB補色光16を、それぞれ異な
る3方向より被照明点17で互いに重なるように照明を行
うと、被照明点17よりの反射光にはR光,G光,B光の全成
分が均等に含まれることになる。この様子を示したのが
第4図であり、この部分を検出し明るさLに特定の閾値
を持たせるとこの場合“1"“1"“1"と検出されることに
なる(閾値を越えた場合“1",越えない場合“0"と判
定)。この場合“1"“1"“1"が標準(欠陥なし)と規定
しているが、異なる組合せを用いてもさしつかえない。
第1図および第2図のような装置を用い、被検査面を
操作し、欠陥等の異物が被検査面上に検出した場合の原
理を第3図に示す。本装置では、補色光線21は斜方向よ
り照射され、検出欠陥22が存在すると、この検出欠陥22
の影の部分は照明未達部分23が出来、この部分は被補色
照明光の波長成分は存在しない。
この影の部分は、従来の形状認識アルゴリズムの場合
雑音と認識され、かつこの影の部分を形状認識しても、
非特定形状欠陥物質の場合には影も非特定形状を有し特
定パターン認識できない。また、単色光のみで影を作り
その濃淡を二値化処理して影の有無を検出しようとする
時、方向によっては影が存在せず欠陥を見逃す可能性が
ある。
本発明は、互いに異なる方向より補色光を照射し複数
の影ができ、この影の部分の波長成分が他の方向と補色
の関係にあるため、他方向の照射により打ち消されない
特徴があり(単色光を複数方向より照射すると互いに影
を打ち消し合う)この影の部分に特定の波長成分が存在
しないことを利用する。
被検査面上に欠陥が存在しない場合、前記のように第
4図に示すよう“1"“1"“1"と検出される。被検査面に
欠陥が存在した場合は、B光による影の部分は、第5図
の様にB光部分の波長成分に欠損を生じ、この部分の明
るさLが検出器の閾値に達せず、“0"“1"“1"のように
検出され、検出情報に差異を生じる。同様にG光による
検出情報は第6図に示す様“1"“0"“1"と、R光による
検出情報は第7図に示す“1"1"“0"となる。なお補色分
割は前記のようにこの限りではなく、背面が特定波長の
選択吸収または選択反射特性を有する場合、この波長成
分を避けた照明および検出機器を用いる方法を採用すれ
ばよい。
第8図は、以上の考え方に基づいて設計された補色検
出機器の一例を示す。被検出面31の像は、撮像レンズ32
により撮像素子33に結像される。この撮像素子は、単独
のフォトセンサ,ラインセンサ,二次元イメージセンサ
等、その認識内容の用途により使いわければ良いが、採
用した補色成分のみを透過するフィルタをその前面に取
り付けて、採用した数の信号数を検出する必要がある。
この条件を満足すれば、3式の撮像装置を用いても、単
管カメラのような単一撮像装置を用いてもさしつかえな
い。本例では、RGBのフィルタを有するイメージセンサ
を用いる場合が最も効率よく補色光像を得ることができ
る。撮像素子より検出されたR光、G光,B光の画像信号
は、それぞれR検出回路34、G検出回路35、B検出回路
36により二値化処理される。この二値化閾値はそれぞれ
R閾値設定回路37,G閾値設定回路38,B閾値設定回路39に
より設定される。各信号は比較判定回路40により比較処
理され、記憶メモリ内に記録される。本例では“1"“1"
“1"の時のみパス(以下Pと記す)、他の場合はフェイ
ル(以下Fと記す)と判定するが、このP又はFの判定
パターンは比較モード設定回路41により設定できる。画
像メモリの情報は演算モード設定回路44の指示にしたが
って演算処理回路43により演算処理され判定回路45によ
り欠陥の有無の判定を行なう。
第9図に本補色検出機の記憶メモリ内の検出データの
内容を示す。本検出機は撮像素子より得られたアナログ
量を二値化処理し、その3種の二値化信号(R,G,B判定
信号)を比較機で特定パターン判定を行なう。この判定
値自体が既に欠陥を検出していることになるが、実際は
表面の荒れ等により雑音が発生する。第9図においてP
は補色判定の欠陥特定波長の欠けが存在しなかったこと
を示し、Fは判定の結果特定波長の欠けが存在したこと
を示す。この時、雑音検出部と欠陥検出部51および53と
欠陥検出部52とに分離を行なう。この分離はF成分のXY
座標の連結度を調べ前後左右連結手の長さより欠陥か雑
音かの判定を行なう。
第9図の場合、雑音検出51はFの周囲が全てPである
ので本装置の演算部での連結成分は0となる。雑音検出
部53についてはFの連結成分が51となる。本装置はこの
部分をFの座標より検出する。まず雑音検出部53のFの
座標を見ると(X,Y)の値は(9,8)(9,9)となり、こ
の時X座標が一致し、これはFの座標が連結成分を1つ
もっていることを意味する。同様にY座標の値が一致す
れば同様に連結成分“1"とカウントする。つまり本装置
の演算処理回路では、Fの座標を全て取り込み(Xn,
Yo),(Xm,Yp)の2つの座標間でXn=XmかつYo−Yp=|
1|またはYo=YpかつXn−Xm=|1|かいずれかの場合連結
部“1"と判定することになる。
〔(Xn=Xm)∩(Yo−Yp=|1|)〕∩〔(Yo=Yp)∩(X
n−Xm=|1|)〕=n(1) ・・・式1
したがって、欠陥検出部52を演算処理すると、まず座
標成分は(5,4)(6,4)(3,5)(4,5)(5,5)(6,5)
(3,6)(4,6)(3,7)(4,7)(4,8)(5,8)となり、
式1に代入すると7+7=14=n(1)となる。この連
結成分に閾値を設けることにより、本装置は欠陥判定を
行なう。
以上第1図ないし第9図を用いて本発明の一例を示し
たが、本発明の1つの主旨は補色光の照明を与え、その
成分の欠損を検出することにあり、検出された信号の処
理方法は特に規定しない。場合によっては信号検出を行
なわず、顕微鏡のような目視装置に用いてもよく、その
一例を第10図に示す。
第10図は通常の光学顕微鏡の暗視野照明装置であり、
鏡筒61に側面により照明光62を送り込む。R系照明光路
63はR系反射鏡68により対物レンズの側面を通りR系選
択吸収フィルタ66を通し対物反射鏡71により対物面70に
斜めより照射する。他一方、B系照明光路はB系反射鏡
69により反射され、B系選択吸収フィルタ65を通しR系
同様に照射する。以上により検像を行なえば目視では色
度および色彩差として検出される。
〔発明の効果〕
本発明の実施例によれば、立体形状でその形状の不特
定なものを補色成分による斜向光を多方向より与えるこ
とにより安定かつ確実に検出でき、又、認識のアルゴリ
ズムも形状判定に比べ容易に実現できるため、廉価でか
つ高信頼性の外観検査装置ができる。DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a visual inspection system for optically detecting an image or the like and performing a non-contact defect inspection or the like, and is particularly suitable for detecting a three-dimensional shape. For example, the present invention relates to an illumination and detection method suitable for checking soldering of a printed circuit board. [Prior Art] A conventional pattern defect inspection apparatus detects a geometric feature on a surface to be inspected by some method as described in Japanese Patent Application Laid-Open No. 55-157078 and calculates the degree of coincidence of the characteristic portion. And detected defects. [Problems to be Solved by the Invention] In such a method, it is difficult to detect a defect of a non-specific shape, and a three-dimensional shape is recognized, for example, a shadow portion generated by illumination is recognized as a part of the shape. Was difficult. An object of the present invention is to provide a method for detecting a defect having a three-dimensional and non-specific shape with high accuracy. [Means for Solving the Problems] In the defect inspection method according to the present invention, spot (partially parallel characteristic) lights having a complementary color relationship on a surface to be inspected are obliquely directed to the surface to be inspected. Illumination is performed so as to overlap each other on the illuminated surface (to converge light on the same surface) from different vertical plane directions with respect to the surface. [Operation] Accordingly, by detecting the wavelength component contained in the illuminated surface and calculating the ratio of the partial deficiency of the component, defects such as protrusions and defects on the surface of the inspected surface are detected. And foreign substances can be detected. [Embodiment] Details of the present invention will be described below with reference to the drawings. FIG. 1 shows an overall configuration diagram of an automatic defect inspection apparatus to which the present invention is applied. Here, the surface 8 to be inspected may be a surface that reflects all wavelength components or a surface that selectively reflects or absorbs specific wavelength components, but this surface has selective reflection or selective absorption characteristics with an irregular distribution. Only in the case of the front surface, some processing (filter, adjustment of values, etc.) is performed on the imaging (analysis) device 1 or the imaging (analysis) lens 5 and the like, so that the background portion in the captured image has uniform uniform characteristics. Shall have.
In the present specification, it is assumed that the surface 8 to be inspected is a surface that reflects all wavelengths, and the following description will be given. The surface 8 to be inspected is driven by an XY table or the like (the imaging system may be moved), and light radiated from the light source 3 is passed through the selective light transmission (or absorption) filter 4 so that only a specific wavelength component is passed. Is condensed by the light source condenser lens 6 to illuminate only a specific inspection range. At this time, the illumination optical axis of the illumination system is arranged so as to be illuminated obliquely to the surface 8 to be inspected, and is different from the surface including the illumination optical axis in a direction perpendicular to the surface 8 to be inspected (imaging). The wavelength selected by the selective transmission filter 4 is complementary to the wavelength selected by the selective transmission filter 4 at 180 ° inversion with respect to the optical axis (in this case, there is no need to completely fill in the wavelengths, and even if they partially overlap). A plurality of illuminating devices are arranged and illuminated so as to overlap the light on the surface to be illuminated. In this specification, the light source 3, the selective light transmission filter 4, and the light source condenser lens 6 are collectively referred to as a complementary color illumination device. Imaging (inspection) of the surface 8 to be inspected illuminated by the complementary color illumination device described above, the focus of which is adjusted by the helicoid 2 for focus adjustment.
The surface to be inspected is inspected by forming an image on the imaging (inspection) device 1 on the lens 5, detecting the reflected light component of the surface 8 to be inspected, and detecting the detection defect 7. FIG. 2 shows an example of a lighting device used in the present invention. In this example, red light (a component of about 6000 ° or more, hereinafter referred to as R light), green light (500-6000 ° component, hereinafter referred to as G light), and blue light (about 5,000 ° or less component, hereinafter referred to as B light) according to wavelength components. The illumination device uses a method in which the three components are separated by a filter. However, this illumination device can divide the illumination light in any way as long as the illumination light is in a complementary color relationship, and the XYZ color light (CIE- The International Commission on Illumination), Lab color systems (Elster, Aster, Biesta color systems), solid colors, Munsell hues, and other color systems can be used even if they use complementary light. Here, the R complementary color light 12 is converted to the G complementary light 4 by the G complementary color
When the B-complementary illumination device 15 illuminates the B-complementary light 16 so that the B-complementary light 16 overlaps the illuminated point 17 from three different directions, the reflected light from the illuminated point 17 includes R light, G light, All the components of the B light are evenly included. FIG. 4 shows this state. When this portion is detected and the brightness L has a specific threshold value, in this case, "1", "1", and "1" are detected (the threshold value is It is determined to be "1" if exceeded and "0" otherwise. In this case, “1”, “1”, and “1” define the standard (no defect), but different combinations may be used. FIG. 3 shows the principle in the case where a surface to be inspected is operated using the apparatus as shown in FIGS. 1 and 2 and a foreign substance such as a defect is detected on the surface to be inspected. In this apparatus, the complementary color light beam 21 is emitted from an oblique direction, and if a detection defect 22 exists, the detection defect 22
In the shaded portion, an unilluminated portion 23 is formed, and in this portion, the wavelength component of the illumination light to be complemented does not exist. This shadow portion is recognized as noise in the case of the conventional shape recognition algorithm, and even if the shadow portion is shape-recognized,
In the case of a non-specific shape defect material, the shadow has a non-specific shape and cannot recognize a specific pattern. Further, when a shadow is formed only by monochromatic light and the shading is binarized to detect the presence or absence of the shadow, there is a possibility that the defect does not exist because the shadow does not exist depending on the direction. The present invention has a feature that a plurality of shadows are formed by irradiating complementary colors from different directions, and the wavelength components of the shadow portions have a complementary color relationship with other directions, and therefore are not canceled out by irradiation in other directions ( When monochromatic light is emitted from a plurality of directions, the shadows cancel each other out.) The fact that a specific wavelength component does not exist in the shadow portion is used. If no defect exists on the surface to be inspected, "1", "1", and "1" are detected as shown in FIG. 4 as described above. When there is a defect on the surface to be inspected, the shadow portion due to the B light has a defect in the wavelength component of the B light portion as shown in FIG. 5, and the brightness L of this portion does not reach the threshold value of the detector. , “0”, “1”, and “1”, causing a difference in detection information. Similarly, the detection information based on the G light is "1", "0", "1" as shown in Fig. 6, and the detection information based on the R light is "1", "1", "0" shown in Fig. 7. Complementary color division Is not limited to this as described above, and when the back surface has selective absorption or selective reflection characteristics of a specific wavelength, a method using an illumination and detection device that avoids this wavelength component may be adopted. 1 shows an example of a complementary color detection device designed based on the concept of the above.
Thus, an image is formed on the image sensor 33. This imaging device may be used depending on the purpose of its recognition contents, such as a single photo sensor, a line sensor, a two-dimensional image sensor, etc., but a filter that transmits only the used complementary color component is mounted on the front surface thereof and is used. It is necessary to detect the number of signals.
If this condition is satisfied, it does not matter whether three types of imaging devices are used or a single imaging device such as a single tube camera is used. In this example, a complementary light image can be obtained most efficiently when an image sensor having an RGB filter is used. Image signals of R light, G light, and B light detected by the image sensor are output to an R detection circuit 34, a G detection circuit 35, and a B detection circuit, respectively.
The binarization processing is performed by 36. The binarization threshold is set by an R threshold setting circuit 37, a G threshold setting circuit 38, and a B threshold setting circuit 39, respectively. Each signal is subjected to comparison processing by the comparison determination circuit 40, and is recorded in the storage memory. In this example, "1""1"
A pass (hereinafter referred to as P) is determined only when the value is "1", and a fail (hereinafter referred to as "F") is determined in other cases. The P or F determination pattern can be set by the comparison mode setting circuit 41. The information in the image memory is arithmetically processed by the arithmetic processing circuit 43 in accordance with the instruction of the arithmetic mode setting circuit 44, and the determination circuit 45 determines whether or not there is a defect. FIG. 9 shows the contents of the detection data in the storage memory of the complementary color detector. The detector performs binarization processing on the analog amount obtained from the image sensor, and performs a specific pattern determination using the three types of binary signals (R, G, B determination signals) with a comparator. Although this determination value itself has already detected a defect, noise is actually generated due to surface roughness or the like. In FIG. 9, P
Indicates that there was no lack of the specific wavelength for the defect in the complementary color determination, and F indicates that there was a lack of the specific wavelength as a result of the determination. At this time, separation into the noise detection unit, the defect detection units 51 and 53, and the defect detection unit 52 is performed. This separation is the XY of the F component
The connectivity of the coordinates is checked to determine whether it is a defect or noise based on the length of the front, rear, left and right hands. In the case of FIG. 9, since the noise detection 51 is all P around F, the connected component in the arithmetic unit of the present apparatus is 0. In the noise detection unit 53, the connected component of F is 51. This device detects this portion from the coordinates of F. First, looking at the coordinates of F of the noise detection unit 53, the value of (X, Y) is (9, 8) (9, 9), and at this time, the X coordinates match. It means you have. Similarly, if the values of the Y coordinates match, the connected component is counted as "1". In other words, the arithmetic processing circuit of the present apparatus takes in all the coordinates of F (X n ,
Y o), (X m, and X n = X m between two coordinates Y p) Y o -Y p = |
1 | or Y o = Y p and X n -X m = | 1 | or will determine either case coupling part "1" and. [(X n = X m ) ∩ (Y o −Y p = | 1 |)] ∩ [[(Y o = Y p ) ∩ (X
n− X m = | 1 |)] = n (1) Equation 1 Therefore, when the arithmetic processing is performed on the defect detection unit 52, first, the coordinate components are (5,4) (6,4) (3,5) (4,5) (5,5) (6,5)
(3,6) (4,6) (3,7) (4,7) (4,8) (5,8)
Substituting into equation 1, 7 + 7 = 14 = n (1). By providing a threshold value to this connected component, the present apparatus performs a defect determination. Although an example of the present invention has been described with reference to FIGS. 1 to 9, one of the gist of the present invention is to provide illumination of a complementary color light and to detect the loss of the component, and The processing method is not specified. In some cases, signal detection may not be performed and the device may be used for a visual observation device such as a microscope, an example of which is shown in FIG. FIG. 10 is a dark-field illumination device of a normal optical microscope,
The illumination light 62 is sent into the lens barrel 61 by the side surface. R system illumination light path
Reference numeral 63 passes through the side surface of the objective lens by the R-system reflecting mirror 68, passes through the R-system selective absorption filter 66, and irradiates the object surface 70 obliquely by the objective reflecting mirror 71. On the other hand, the B-system illumination optical path is a B-system reflector.
The light is reflected by 69, passes through the B-system selective absorption filter 65, and irradiates similarly to the R-system. When the image is inspected as described above, it is visually detected as chromaticity and color difference. [Effects of the Invention] According to the embodiment of the present invention, a three-dimensional shape whose shape is unspecified can be detected stably and reliably by giving oblique light from complementary directions in multiple directions, and a recognition algorithm. Can be easily realized as compared with the shape determination, so that an inexpensive and highly reliable appearance inspection apparatus can be obtained.
【図面の簡単な説明】
第1図は本発明を応用した欠陥自動検査装置の全体構成
図、第2図は本発明による照明構成図、第3図は欠陥検
出の原理図、第4図、第5図、第6図および第7図は補
色光検出波長成分図を示し、第4図は全波長成分図、第
5図はB光欠損波長成分図、第6図はG光欠損波長成分
図、第7図はR光欠損波長成分図、第8図は本発明の補
色検出処理構成図、第9図は補色検出処理を行なう記憶
メモリ内の検出データの内容を示す図、第10図は本発明
の光学顕微鏡への応用例を示す。
1……撮像装置、2……焦点調整用ヘリコイド、3……
光源、4……フィルター、5……撮像レンズ、6……集
光レンズ、7……欠陥、8……被検査面。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is an overall configuration diagram of an automatic defect inspection apparatus to which the present invention is applied, FIG. 2 is an illumination configuration diagram according to the present invention, FIG. 3 is a principle diagram of defect detection, FIG. FIGS. 5, 6, and 7 show complementary color light detection wavelength component diagrams, FIG. 4 is a full wavelength component diagram, FIG. 5 is a B light loss wavelength component diagram, and FIG. 6 is a G light loss wavelength component. FIG. 7, FIG. 7 is a diagram of R light deficient wavelength components, FIG. 8 is a diagram showing the configuration of a complementary color detection process of the present invention, FIG. 9 is a diagram showing the contents of detection data in a storage memory for performing a complementary color detection process. Shows an application example of the present invention to an optical microscope. 1 ... imaging device, 2 ... helicoid for focus adjustment, 3 ...
Light source 4, filter 5, imaging lens 6, condenser lens 7, defect 8, surface to be inspected.