JPH11101750A - Detection of foreign matter - Google Patents

Detection of foreign matter

Info

Publication number
JPH11101750A
JPH11101750A JP26068897A JP26068897A JPH11101750A JP H11101750 A JPH11101750 A JP H11101750A JP 26068897 A JP26068897 A JP 26068897A JP 26068897 A JP26068897 A JP 26068897A JP H11101750 A JPH11101750 A JP H11101750A
Authority
JP
Japan
Prior art keywords
foreign matter
inspection
inspection object
image
imaging camera
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.)
Granted
Application number
JP26068897A
Other languages
Japanese (ja)
Other versions
JP3427248B2 (en
Inventor
Yasuyuki Kishi
靖之 岸
Takeshi Ikemura
武史 池村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP26068897A priority Critical patent/JP3427248B2/en
Publication of JPH11101750A publication Critical patent/JPH11101750A/en
Application granted granted Critical
Publication of JP3427248B2 publication Critical patent/JP3427248B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a foreign matter detecting method not detecting an uneven shape present on a normal surface as a normal shape as foreign matter by mistake and capable of detecting only foreign matter with high accuracy. SOLUTION: Offset quantity for aligning the focus of the lens part 7a of an imaging camera 7 is set at the point above the upper surface of an article 1 to be inspected and a control part 12 controls the lens part 7a through a control circuit 11 so as to align the focus with the position determined based on the offset quantity. A timing circuit 9 is controlled to allow a stroboscopic light source 8 to emit light to perform oblique illumination and the image of the whole upper surface of the article 1 to be inspected is imaged under this oblique illumination by the imaging camera 7. An image conforming part 10 converts the taken-in image to a variable density image and scans the interior of the inspection region for inspecting foreign matter set to the variable density image to calculate a differential value which is, in turn, compared with a threshold value to detect a region where the differential value exceeds the threshold value as foreign matter.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、異物検出方法に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a foreign matter detection method.

【0002】[0002]

【従来の技術】従来物体検出方法には、特開平2−10
204号公報に記載されている方法がある。この方法
は、図14に示すように被検査物1を挟んで設置した二
つの照明装置2,2を片方づつ発光させて被検査物1に
影A,Bを生じさせ、撮像カメラ3と画像認識装置4と
により影A,Bの輝度ヒストグラムを得るようになって
いいる。そして二つの照明装置2,2で照射したときの
輝度ヒストグラムの比較を行うことにより、正確に被検
査物1の有無の検出するのである。
2. Description of the Related Art Conventional object detection methods are disclosed in
No. 204 is disclosed. In this method, as shown in FIG. 14, two illuminating devices 2 and 2 placed across the inspection object 1 emit light one by one to produce shadows A and B on the inspection object 1, and the imaging camera 3 and the image A luminance histogram of shadows A and B is obtained by the recognition device 4. Then, the presence or absence of the inspection object 1 is accurately detected by comparing the luminance histograms when the two illumination devices 2 and 2 irradiate.

【0003】[0003]

【発明が解決しようとする課題】上記の物体検出方法で
は、被検査物1を載置する平板部6に凹凸形状が存在す
る場合、被検査物1が存在しないにも関わらず、凹凸形
状による濃淡が発生し、この濃淡を被検査物1として誤
検出してしまうという恐れがある。つまりこのような従
来の物体検出方法を用いて異物検出を行う場合には、正
常面に正常な形状として存在する凹凸形状と異物による
凹凸形状を識別することができず、全て異物と誤検出す
る恐れがあり、異物検出方法としては採用することがで
きない。
In the object detection method described above, when the flat portion 6 on which the inspection object 1 is placed has an uneven shape, the unevenness is detected even though the inspection object 1 does not exist. There is a possibility that shading occurs and this shading is erroneously detected as the inspection object 1. In other words, when foreign matter detection is performed using such a conventional object detection method, it is not possible to discriminate the irregular shape existing as a normal shape on the normal surface from the irregular shape due to the foreign matter, and all of them are erroneously detected as foreign matter. There is a possibility that it cannot be adopted as a foreign matter detection method.

【0004】本発明は上記の点に鑑みて為されたもの
で、請求項1の発明の目的とするところは正常面に正常
な形状として存在する凹凸形状を異物と誤って検出する
ことが無く、高精度に異物のみを検出することができる
異物検出方法を提供することにある。請求項2の発明の
目的とするところは、請求項1の発明の目的に加え、被
検査物の厚みが変化しても常に同じ条件で被検査物を撮
像できる異物検出方法を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above points, and an object of the present invention is to prevent an irregular shape existing as a normal shape on a normal surface from being erroneously detected as a foreign substance. Another object of the present invention is to provide a foreign matter detection method capable of detecting only a foreign matter with high accuracy. A second object of the present invention is to provide, in addition to the object of the first invention, a foreign matter detection method capable of always imaging an object under the same conditions even when the thickness of the object changes. is there.

【0005】請求項3の発明の目的とするところは、請
求項1、2の発明の目的に加え、被検査物の表面に光沢
面が存在しても異物と識別することができる異物検出方
法を提供することにある。請求項4の発明の目的とする
ところは、請求項1、2の発明の目的に加え、異物の大
きさや形状の認識及び異物の表面状態が把握できる異物
検出方法を提供することにある。
A third object of the present invention is to provide, in addition to the objects of the first and second aspects, a foreign matter detection method capable of distinguishing foreign matter even if a glossy surface exists on the surface of the inspection object. Is to provide. A fourth object of the present invention is to provide a foreign object detection method capable of recognizing the size and shape of a foreign object and grasping the surface state of the foreign object, in addition to the objects of the first and second embodiments.

【0006】請求項5の発明の目的とするところは、請
求項1、2の発明の目的に加え、高精度に異物の形状と
素材や種類等の状態を識別できる異物検出方法を提供す
ることにある。請求項6の発明の目的とするところは、
請求項1、2の発明の目的に加え、積載される被検査物
の厚みのみで適切なオフセットする距離を求めることが
できる異物検出方法を提供することにある。
A fifth object of the present invention is to provide, in addition to the objects of the first and second aspects of the present invention, a foreign object detecting method capable of distinguishing the state of the shape and material and type of the foreign object with high accuracy. It is in. The object of the invention of claim 6 is that
In addition to the objects of the first and second aspects of the present invention, it is another object of the present invention to provide a foreign matter detection method capable of determining an appropriate offset distance only by the thickness of a loaded inspection object.

【0007】請求項7の発明の目的とするところは、請
求項2の発明の目的に加え、被検査物の厚さや一定でな
い場合や異物混入等の原因で積載高さが変化する場合に
も計算式により適切なオフセットする距離を算出するこ
とができる異物検出方法を提供することにある。請求項
8の発明の目的とするところは、請求項1、2の発明の
目的に加え、積載によって被検査物の大きさが変化する
場合も、常に検査領域が被検査物の全体をカバーできる
異物検出方法を提供することにある。
[0007] The object of the invention of claim 7 is, in addition to the object of the invention of claim 2, in the case where the thickness of the inspection object is not constant, or when the loading height is changed due to foreign matter mixing or the like. An object of the present invention is to provide a foreign matter detection method capable of calculating an appropriate offset distance by a calculation formula. The object of the invention of claim 8 is that, in addition to the objects of the inventions of claims 1 and 2, even when the size of the inspection object changes due to loading, the inspection area can always cover the entire inspection object. An object of the present invention is to provide a foreign matter detection method.

【0008】請求項9の発明の目的とするところは、請
求項8の発明の目的に加え、一つ前の被検査物の画像か
ら積載ずれを検出することができる異物検出方法を提供
することにある。請求項10の発明の目的とするところ
は、請求項8の発明の目的に加え、異物検出するための
画像において、被検出物の位置決定のためのエッジ検出
が、エッジ検出領域を設定する位置に異物が存在してで
きない場合でも、一つ前の被検査物の位置を基に異物検
出を行える異物検出方法を提供することにある。
The object of the ninth aspect of the present invention is to provide, in addition to the object of the eighth aspect, a foreign matter detection method capable of detecting a stacking deviation from an image of a preceding inspection object. It is in. According to a tenth aspect of the present invention, in addition to the object of the eighth aspect, in the image for foreign matter detection, the edge detection for determining the position of the detection target is performed by setting the edge detection area. An object of the present invention is to provide a foreign matter detection method capable of detecting a foreign matter based on the position of the immediately preceding inspection object even when foreign matter cannot be present due to the presence of the foreign matter.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に請求項1の発明では、被検査物の上面に正対するよう
にフォーカスレンズ付撮像カメラを配置するとともに、
上面に凹凸形状を有する被検査物に対して光源を斜め上
方に設置し、被検査物の上面に対して上方側へ一定距離
オフセットした点に撮像カメラのフォーカスを合わせる
とともに光源により被検査物に対して斜光照明を行って
撮像カメラで被検査物の上面を撮像し、該撮像された画
像より濃淡画像を得て該濃淡画像の微分値を求め、求め
た微分値と予め設定されたしきい値とを比較することに
より上記凹凸形状ではない異物を検出することを特徴と
する。
In order to achieve the above object, according to the first aspect of the present invention, an imaging camera with a focus lens is arranged so as to face the upper surface of an object to be inspected.
A light source is installed diagonally above the object to be inspected which has an uneven shape on the upper surface, and the imaging camera is focused on a point offset by a certain distance upward with respect to the upper surface of the object to be inspected. On the other hand, oblique illumination is performed to image the upper surface of the object to be inspected with an imaging camera, a grayscale image is obtained from the captured image, a differential value of the grayscale image is obtained, and the obtained differential value and a preset threshold are obtained. It is characterized in that a foreign substance which is not the above-mentioned uneven shape is detected by comparing the value with a value.

【0010】請求項2の発明では、請求項1の発明にお
いて、フォーカスを被検査物の上面に合わせ且つ光源に
より斜光照明した状態で被検査物上面を撮像カメラによ
り撮像し、該撮像された画像から濃淡画像を得て該濃淡
画像を演算処理することにより被検査物の上面と撮像カ
メラ迄の距離を求め、該距離に基づいて被検査物の上面
に対して上方側へオフセットする距離を決定することを
特徴とする。
According to a second aspect of the present invention, in the first aspect of the present invention, the upper surface of the inspection object is imaged by an imaging camera in a state where the focus is set on the upper surface of the inspection object and oblique illumination is performed by a light source. The distance between the upper surface of the object to be inspected and the imaging camera is obtained by obtaining the grayscale image from and calculating the grayscale image, and the distance to be offset upward with respect to the upper surface of the object is determined based on the distance. It is characterized by doing.

【0011】請求項3の発明では、請求項1又は2の発
明において、被検査物の上面に正対するように別の光源
を配置し、異物検出のために被検査物に対して斜光照明
を行って撮像カメラで被検査物の上面を撮像する前又は
後において、上記別の光源による照明下で被検査物の上
面を撮像して被検査物の濃淡画像を得、該濃淡画像の微
分値を、上記斜光照明下で撮像して得られた濃淡画像の
微分値から減算して該減算結果より被検査物の上面の異
物面と光沢面とを選択することを特徴とする。
According to a third aspect of the present invention, in the first or second aspect of the present invention, another light source is disposed so as to face the upper surface of the inspection object, and oblique illumination is applied to the inspection object to detect a foreign substance. Before or after performing the imaging of the upper surface of the inspection object with the imaging camera, the upper surface of the inspection object is imaged under illumination by the another light source to obtain a gray image of the inspection object, and the differential value of the gray image is obtained. Is subtracted from the differential value of the grayscale image obtained by imaging under the oblique illumination, and the foreign matter surface and the glossy surface on the upper surface of the inspection object are selected from the subtraction result.

【0012】請求項4の発明では、請求項1又は2の発
明において、被検査物表面の異物の厚みが限定される場
合に、異物検出後に、異物の上面に撮像カメラのフォー
カスを合わせて再度撮像することを特徴とする。請求項
5の発明では、請求項1又は2の発明において、フォー
カスレンズにズーム機能を持たせたものを用い、異物検
出後に撮像カメラを異物の上方に位置するように移動さ
せ、濃淡画像の処理により異物の大きさを算出して、該
異物の大きさに応じた画角になるようにフォーカスレン
ズのズーム機能を動作させるとともに異物にフォーカス
を合わせた後に異物を撮像することを特徴とする。
According to a fourth aspect of the present invention, in the first or second aspect of the invention, when the thickness of the foreign matter on the surface of the inspection object is limited, after detecting the foreign matter, the imaging camera is focused on the upper surface of the foreign matter and again. It is characterized by imaging. According to a fifth aspect of the present invention, in the invention of the first or second aspect, a focus lens having a zoom function is used, and after detecting the foreign matter, the imaging camera is moved so as to be positioned above the foreign matter, thereby processing the grayscale image. By calculating the size of the foreign matter, the zoom function of the focus lens is operated so as to obtain an angle of view corresponding to the size of the foreign matter, and the foreign matter is imaged after focusing on the foreign matter.

【0013】請求項6の発明では、請求項1の発明にお
いて、1乃至複数の被検査物が積載され、撮像カメラと
正対する被検査物に対する検査を行う際に、被検査物が
一定の厚みを有するものである場合、被検査物の厚みの
関数に基づいてオフセットする距離を求めることを特徴
とする。請求項7の発明では、請求項2の発明におい
て、1乃至複数の被検査物が積載され、撮像カメラと正
対する被検査物に対する検査を行う際に、積載高が夫々
の被検査物により異なる場合、被検査物上面と撮像カメ
ラとの間の距離を求めるための撮像後、撮像した画像よ
り得た濃淡画像から被検査物の外形エッジから延びる影
の長さを求め、該影の長さとと斜光照明の角度から被検
査物の高さを算出した後、該高さと、前記距離と、フォ
ーカスレンズの焦点距離及び有効径とを関数として被検
査物の上面に対して上方側へオフセットする距離を決定
することを特徴とする。
According to a sixth aspect of the present invention, in the first aspect of the invention, when one or a plurality of inspection objects are stacked and the inspection of the inspection object facing the imaging camera is performed, the inspection object has a constant thickness. In this case, the offset distance is obtained based on a function of the thickness of the inspection object. According to a seventh aspect of the present invention, in the second aspect of the present invention, when one or a plurality of inspection objects are stacked and the inspection of the inspection object facing the imaging camera is performed, the loading height differs depending on each inspection object. In the case, after imaging for obtaining a distance between the upper surface of the inspection object and the imaging camera, a length of a shadow extending from an outer edge of the inspection object is obtained from a grayscale image obtained from the captured image, and the length of the shadow is determined. After calculating the height of the object from the angle of oblique illumination, the height, the distance, the focal length and the effective diameter of the focus lens are offset upward with respect to the upper surface of the object as a function. It is characterized in that the distance is determined.

【0014】請求項9の発明では、請求項8の発明にお
いて、今回の被検査物の位置を確認するために設定され
るエッジ検査領域を、前回の検査において撮像された被
検査物の外形エッジ検出位置を基準にして、設定するこ
とを特徴とする。請求項10の発明では、請求項8の発
明において、今回検査される被検査物の位置認識用のエ
ッジ検出ができなかった場合に、前回の検査において撮
像された被検査物の外形エッジ検出位置を基準にして、
異物を検出するための検査領域を設定することを特徴と
する。
According to a ninth aspect of the present invention, in the invention of the eighth aspect, the edge inspection area set for confirming the current position of the inspection object is replaced with an outer edge of the inspection object imaged in the previous inspection. It is characterized by setting based on the detection position. According to a tenth aspect of the present invention, in the invention of the eighth aspect, when the edge for position recognition of the inspection object to be inspected this time cannot be detected, the outer edge detection position of the inspection object captured in the previous inspection. Based on
It is characterized in that an inspection area for detecting a foreign substance is set.

【0015】[0015]

【発明の実施の形態】以下、本発明方法を実施形態によ
り説明する。 (実施形態1)図1は本実施形態を用いた検査装置の概
略構成図を示しており、例えば瓦のように上面に溝模様
等の凹凸形状を有する被検査物1を検査台(図示せず)
上に積載して異物検査を行うようにしたもので、被検査
物1の上面に正対するように配置したCCDカメラから
なる撮像カメラ7と、被検査物1の上面に対して所定角
度で斜め上方に配置し被検査物1の上面を斜光照明を行
うストロボ光源8と、ストロボ光源8を駆動するタイミ
ング回路9と、撮像カメラ7で撮像して得られた画像を
処理する画像認識部10と、撮像カメラ7のレンズ部7
aに備わったフォーカス機構と、ズーム機構の電動駆動
部を制御するレンズ制御回路11と、これら画像認識部
10、レンズ制御回路11、タイミング回路9を統括制
御する制御部12とから成る。撮像カメラ7はX,Y方
向に移動自在とする駆動部(図示せず)が設けられてお
り、制御部12の制御の下で位置移動ができるようにな
っている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The method of the present invention will be described below with reference to embodiments. (Embodiment 1) FIG. 1 is a schematic configuration diagram of an inspection apparatus using the present embodiment. For example, an inspection object 1 having a concave and convex shape such as a groove pattern on an upper surface such as a tile is mounted on an inspection table (not shown). Z)
The inspection camera 7 includes a CCD camera arranged to face the upper surface of the inspection object 1 and is inclined at a predetermined angle with respect to the upper surface of the inspection object 1. A strobe light source 8 that is disposed above and illuminates the upper surface of the inspection object 1 with oblique light, a timing circuit 9 that drives the strobe light source 8, and an image recognition unit 10 that processes an image captured by the imaging camera 7. , Lens unit 7 of imaging camera 7
The camera includes a focus mechanism provided in a, a lens control circuit 11 for controlling an electric drive unit of the zoom mechanism, and a control unit 12 for integrally controlling the image recognition unit 10, the lens control circuit 11, and the timing circuit 9. The imaging camera 7 is provided with a drive unit (not shown) that is movable in the X and Y directions, and can move in position under the control of the control unit 12.

【0016】而して、本実施形態では、凹凸形状の影響
を除去するため、被検査物1の上面より上方の点に撮像
カメラ7のレンズ部7aのフォーカスを合わせるための
オフセット量(a)を設定し、このオフセット量(a)
で定める位置にフォーカスが合うように制御部12はレ
ンズ制御回路11を通じてレンズ部7aを制御する。次
いで、タイミング回路9を制御してストロボ光源8によ
り斜光照明を行い、この斜光照明下で撮像カメラ7によ
り被検査物1の上面全体の画像を撮像する。
In this embodiment, the offset amount (a) for adjusting the focus of the lens unit 7a of the imaging camera 7 to a point above the upper surface of the inspection object 1 in order to remove the influence of the uneven shape. And the offset amount (a)
The control unit 12 controls the lens unit 7a through the lens control circuit 11 so that the focus is set at the position determined by. Next, the timing circuit 9 is controlled to perform oblique illumination by the strobe light source 8, and an image of the entire upper surface of the inspection object 1 is captured by the imaging camera 7 under the oblique illumination.

【0017】ここで上記オフセット量(a)で定める位
置にフォーカスを合わせているため正常な凹凸形状であ
る溝模様はフォーカスがぼけているため、ぼけて撮像さ
れた状態となり、逆に異物Xが存在する場合には異物X
に焦点があって鮮明に撮像されることになる。この画像
信号は画像認識部10に取り込まれる。画像認識部10
は取り込んだ画像を濃淡画像に変換し、更にこの濃淡画
像に所定の異物検出用の検査領域(ウィンドウ)を設定
し、この検査領域内を走査して微分値を求め、求めた微
分値と予め定めたしきい値とを比較し、微分値がしきい
値を越えた部位を異物として検出する。
Here, since the focus is adjusted to the position determined by the offset amount (a), the groove pattern which is a normal uneven shape is out of focus, so that the image is blurred and the foreign matter X is conversely imaged. Foreign matter X if present
Will be clearly focused. This image signal is taken into the image recognition unit 10. Image recognition unit 10
Converts the captured image into a gray-scale image, sets a predetermined inspection area (window) for detecting foreign matter in the gray-scale image, scans the inspection area to obtain a differential value, and compares the differential value with the obtained differential value in advance. By comparing the threshold value with a predetermined threshold value, a part whose differential value exceeds the threshold value is detected as a foreign substance.

【0018】このように本実施形態によれば、被検査物
1の上面に正常な溝模様のような凹凸形状があっても、
異物Xのみを高精度に検出することができるのである。
次に本実施形態において上記オフセット量aを設定する
ための例を次に説明する。まず被検査物1は検査台に積
載され状態で、撮像カメラ7に正対する被検査物1の異
物の検出が行われるのであるが、被検査物1の厚みが一
定(T1)の場合には、次のような制御が為される。
As described above, according to the present embodiment, even if the upper surface of the inspection object 1 has an irregular shape such as a normal groove pattern,
Only the foreign matter X can be detected with high accuracy.
Next, an example for setting the offset amount a in the present embodiment will be described below. First, the inspection object 1 is loaded on the inspection table, and detection of foreign matter of the inspection object 1 facing the imaging camera 7 is performed. When the thickness of the inspection object 1 is constant (T1), The following control is performed.

【0019】レンズ制御回路11を通じて撮像カメラ7
のレンズ部7aを制御し、図2に示すように被検査物1
の上面にフォーカスを合わせ、この合った時点からf
(T1)の関数で算出されるオフセット量aだけフォー
カスを上方へずらし、上記の異物検出のための撮像を行
う。積層が繰り返されて撮像カメラ7と被検査物1まで
の距離Lが変更される場合もa=f(T1)によってオ
フセット量が決定される。
The imaging camera 7 through the lens control circuit 11
Of the inspection object 1 as shown in FIG.
Focus on the upper surface of
The focus is shifted upward by the offset amount a calculated by the function of (T1), and the above-described imaging for detecting a foreign substance is performed. When the distance L between the imaging camera 7 and the inspection object 1 is changed by repeating the lamination, the offset amount is determined by a = f (T1).

【0020】ここで更にオフセット量aを求める式を詳
細に示すと a={〔Lf(nA+1)〕/(nfa+L)}−T1…(1) で示される。(L:距離 T1:被検査物1の厚み
f:焦点距離 A:レンズの有効径) 図2の例はカメラ位置が一定で被検査物1の厚みが常に
一定の場合であるが、カメラ位置が固定され且つ厚みT
1が一定でない場合には、被検査物1と撮像カメラ7ま
で距離が変わるので、図2で示すように一定距離だけフ
ォーカスを上方移動させるだけではオフセット量aが一
定とならない。
Here, the equation for determining the offset amount a is shown in detail as follows: a = {[Lf (nA + 1)] / (nfa + L)} − T1 (1) (L: distance T1: thickness of inspection object 1)
f: focal length A: effective diameter of the lens) The example of FIG. 2 is a case where the camera position is constant and the thickness of the inspection object 1 is always constant, but the camera position is fixed and the thickness T
If 1 is not constant, the distance between the inspection object 1 and the imaging camera 7 changes. Therefore, as shown in FIG. 2, simply moving the focus upward by a certain distance does not make the offset amount a constant.

【0021】そこで図3に示すように異物検出のための
撮像を行う前に、制御部12の制御の下でレンズ制御回
路11を通じて撮像カメラ7のレンズ部7aを制御して
図3(a)に示すようにフォーカスを被検査物1の表面
に合わせ且つストロボ光源8により斜光照明した状態で
被検査物1上面を撮像カメラ7により撮像し、画像認識
部10では撮像した画像から濃淡画像を得て該濃淡画像
を演算処理することにより被検査物1の上面と撮像カメ
ラ7迄の距離Lを求める。この後距離Lから予め定めた
オフセット量aだけフォーカスを上方へ移動させるので
ある。
Therefore, as shown in FIG. 3, before imaging for detecting foreign matter, the lens unit 7a of the imaging camera 7 is controlled through the lens control circuit 11 under the control of the control unit 12 to obtain the image shown in FIG. As shown in (2), the upper surface of the object 1 is imaged by the imaging camera 7 while the focus is set on the surface of the object 1 and obliquely illuminated by the strobe light source 8, and the image recognition unit 10 obtains a grayscale image from the imaged image. Then, a distance L between the upper surface of the inspection object 1 and the imaging camera 7 is obtained by arithmetically processing the grayscale image. Thereafter, the focus is moved upward by a predetermined offset amount a from the distance L.

【0022】この場合の原理を詳説する。まず上記の式
(1)からオフセット量aを0として(被検査物1にフ
ォーカスが合っている状態を示す)、距離Lを求める式
に整理すると次のようになる。 L=(nfA・T1)/〔f(nA+1)−T1〕…(2) ここでT1は次の方法により求める。
The principle in this case will be described in detail. First, from the above equation (1), the offset amount a is set to 0 (indicating a state where the inspection object 1 is in focus), and the equation for calculating the distance L is as follows. L = (nfA.T1) / [f (nA + 1) -T1] (2) Here, T1 is obtained by the following method.

【0023】まず異物検査を行うための撮像の前に、図
4(a)に示すようにストロボ光源8で斜光照明し、そ
の照明によりできる被検査物1の影の長さsを撮像して
得られた濃淡画像より求め、この長さとストロボ光源8
の傾き角度θよりT1=s・tanθの式で求める。こ
の求められたT1を式(2)に代入すればLが求まり、
このLから予め定めたオフセット量a分だけ上方へフォ
ーカスを移動させるのである。
First, before imaging for performing a foreign substance inspection, oblique illumination is performed by a strobe light source 8 as shown in FIG. 4A, and the length s of the shadow of the inspection object 1 formed by the illumination is imaged. The length and strobe light source 8
Is obtained from the inclination angle θ of the following equation: T1 = s · tan θ. By substituting the obtained T1 into equation (2), L is obtained,
The focus is moved upward from this L by a predetermined offset amount a.

【0024】この結果図3(a)の被検査物1に比べて
厚みが図3(b)に示す薄い被検査物1であっても一定
のオフセット量aを確保することができるのである。図
3で示すような方法によれば、被検査物1の厚みT1が
図4(b)に示すように変化しても、常に一定のオフセ
ット量aを設定することができて、異物検出のために、
正常な凹凸形状(溝模様)にフォーカスが合わない画像
を取り込むことができることになる。 ところで被検査
物1の厚み変化だけでなく異物混入等により積載高さが
一定でない場合にも、上述の方法で被検出物1の厚さ
(高さ)T1及び被検査物1と撮像カメラ7までの距離
Lを算出し、撮像カメラ7と被検査物1までの距離L、
厚さT1、レンズ部7aの焦点距離f及び有効径Aを関
数f(T1,L,f,A)として上述の式によりオフセ
ット量aを求め、この求めたオフセット量aだけ上方へ
フォーカスを移動させるようにしても良い。
As a result, a constant offset amount a can be ensured even for the test object 1 shown in FIG. 3B whose thickness is smaller than that of the test object 1 of FIG. 3A. According to the method shown in FIG. 3, even if the thickness T1 of the inspection object 1 changes as shown in FIG. for,
It is possible to capture an image out of focus in a normal uneven shape (groove pattern). By the way, even when the loading height is not constant due to not only a change in the thickness of the inspection object 1 but also foreign matter contamination, the thickness (height) T1 of the inspection object 1 and the inspection object 1 and the imaging camera 7 are determined by the above-described method. Is calculated, and the distance L between the imaging camera 7 and the object 1 is calculated.
Using the thickness T1, the focal length f of the lens portion 7a, and the effective diameter A as a function f (T1, L, f, A), the offset amount a is obtained by the above equation, and the focus is moved upward by the obtained offset amount a. You may make it do.

【0025】上述のような方法によれば、被検査物1の
高さが一定でない場合や、異物混入等の原因で積載高さ
が変化する場合にも計算式により適切なオフセット量a
を求めることができる。一方、被検査物1の異物Xの厚
みが限定されている場合、異物検出後、異物Xの大きさ
や外形、高さ等の形状と素材や種類等の状態を識別する
ために、被検査物1上に異物Xを検出した後、図5に示
すように撮像カメラ7のオフセット量aに対応させてフ
ォーカスを設定していた状態から、異物Xの上面にフォ
ーカスを設定する。この場合フォーカス設定距離Laを
オフセット量a、異物Xの厚み、被検査物1までの距離
Lから求める。
According to the above-described method, even when the height of the inspection object 1 is not constant, or when the loading height changes due to a foreign substance or the like, an appropriate offset amount a can be obtained by the calculation formula.
Can be requested. On the other hand, when the thickness of the foreign matter X of the inspection object 1 is limited, after detecting the foreign object, the inspection object is used to identify the shape such as the size, outer shape, and height of the foreign object X and the state of the material and the type. After detecting the foreign matter X on the surface 1, the focus is set on the upper surface of the foreign matter X from the state where the focus is set corresponding to the offset amount a of the imaging camera 7 as shown in FIG. In this case, the focus setting distance La is obtained from the offset amount a, the thickness of the foreign matter X, and the distance L to the inspection object 1.

【0026】而して異物Xにフォーカスを合わせて撮像
することにより、異物Xの大きさや形状の認識及び異物
の表面状態が把握でき、異物Xの混入原因の追求等の分
析が可能となる。尚異物Xを拡大して撮像すれば、高精
度に異物Xの大きさや外形、高さ等の形状と素材の種類
等の状態を識別することが可能となる。そこで異物検出
後画像認識部10の検出情報に基づいて、制御部12の
制御の下で撮像カメラ7を図6(a)の位置(撮像画面
の中心)から図6(b)に示すように異物Xの上方へ移
動させ、レンズ部7aのズーム機構を動作させて異物X
を拡大撮像すると良い。
By imaging the foreign matter X in focus, the size and shape of the foreign matter X can be recognized, the surface state of the foreign matter X can be grasped, and the analysis of the cause of the foreign matter X can be performed. Note that if the foreign substance X is magnified and imaged, it is possible to identify the shape of the foreign substance X, such as the size, outer shape, and height, and the state of the type of the material with high accuracy. Then, based on the detection information of the image recognition unit 10 after foreign matter detection, the imaging camera 7 is moved from the position of FIG. 6A (the center of the imaging screen) under the control of the control unit 12 as shown in FIG. The foreign matter X is moved upward, and the zoom mechanism of the lens unit 7a is operated to move the foreign matter X.
Should be magnified.

【0027】さて上記の異物Xの検出のために撮像カメ
ラ7で撮像した画像に異物検査領域(ウインドウ)を設
定するのであるが、積載された被検査物1を順次検査す
る場合、積載位置によって撮像カメラ7と被検査物1と
の距離が変化し、同一画角で被検査物1を撮像した場
合、撮像カメラ7で撮像した画像の大きさが被検査物1
の位置により変化することになる。
A foreign substance inspection area (window) is set in an image captured by the imaging camera 7 for detecting the foreign substance X. When sequentially inspecting the loaded inspection objects 1, depending on the loading position. When the distance between the imaging camera 7 and the inspection object 1 changes and the inspection object 1 is imaged at the same angle of view, the size of the image captured by the imaging camera 7 is
Will change depending on the position of.

【0028】そこで予め領域設定を行い、この領域設定
によって、実際に検査対象となっている被検査物1に対
する異物検査領域を確保するようにした方法を用いて、
被検査物1を撮像した画像の大きさが積載位置によって
変化しても常に異物検査領域が被検査物1の全体をカバ
ーできるようにするようにしている。即ち、図7に示す
ように領域設定に当たっては、撮像カメラ7に対して最
もき近接する積載位置の被検査物1の画像を取り込み、
この画像から得た濃度画像の外形エッジを微分処理から
検出して検査領域を決定するためのX,Y座標を算出す
る。ここで検査領域は最大の画像を4等分するように4
つの領域W1 〜W4 が設定されるもので、外形エッジの
(X1 ,Y1 ,X2 ,Y2 )の座標の内、X1
,Y1 により検査領域W1 ,W2 を決定し、X
,Y2 により検査領域W3 ,W4 を設定する。
Therefore, an area setting is performed in advance, and a foreign substance inspection area for the inspection object 1 to be actually inspected is secured by using the area setting.
Even if the size of the image of the inspection object 1 changes depending on the loading position, the foreign object inspection area can always cover the entire inspection object 1. That is, as shown in FIG. 7, when setting the area, the image of the inspection object 1 at the loading position closest to the imaging camera 7 is captured.
The outer edge of the density image obtained from this image is detected from the differentiation processing, and the X and Y coordinates for determining the inspection area are calculated. Here, the inspection area is divided into four so that the maximum image is divided into four equal parts.
One area W 1 to W-4 as it is set, the outer edge (X1 , Y1 , X2 , Y2 ), X1
, Y1 The inspection areas W 1 and W 2 are determined by
2 , Y2 To set inspection areas W 3 and W 4 .

【0029】この設定後、実際の検査に際しては被検査
物1の撮像して得られた画像を画像認識部10で濃淡画
像に変換し、該濃淡画像を微分処理することにより当該
被検査物1の外形エッジの座標(X1 ,Y1 ,X2
,Y2 )を算出し、この算出された座標に基づいて
上記設定された検査領域W1 〜W4 を外形エッジに外の
2辺を沿わせる形で当該被検査物1の画像内に設定す
る。
After this setting, at the time of actual inspection, the image obtained by imaging the inspected object 1 is converted into a grayscale image by the image recognition unit 10, and the grayscale image is differentiated to obtain the image of the inspected object 1. (X1 , Y1 , X2
, Y2 ) Is calculated and set in the object to be inspected 1 in the image in the form that along the two sides of the outside contour edges examination region W 1 to W-4, which is the set on the basis of the calculated coordinate.

【0030】ここで外形エッジの座標算出方法について
詳説すると、まず図8(a)に示すように取り込んだ画
像において、例えば左上の座標を(0,0)、右下の座
標を(255,232)と設定している場合、外形エッ
ジの座標はこの範囲で求めることができる。そして外形
エッジの座標を認識するための検査領域は、絶対位置指
定でX座標検出用とY座標検出用のエッジ検出用領域を
設けることにより、(X1,X2)と(X2,Y2)を
検出し、この検出した座標から、右下の座標点Aと左上
の座標点Bを決定でき、この決定により図示するように
被検査物1の検査領域W1 〜W4 を上述のように設定す
ることができるのである。
Here, the method of calculating the coordinates of the outer edge will be described in detail. First, for example, in the captured image as shown in FIG. 8A, the upper left coordinate is (0, 0), and the lower right coordinate is (255, 232). ), The coordinates of the outer edge can be obtained in this range. The inspection area for recognizing the coordinates of the outer edge is detected as (X1, X2) and (X2, Y2) by providing an edge detection area for X coordinate detection and Y coordinate detection by specifying an absolute position. Then, from the detected coordinates, the lower right coordinate point A and the upper left coordinate point B can be determined, and by this determination, the inspection areas W 1 to W 4 of the inspection object 1 are set as described above as illustrated. You can do it.

【0031】この場合撮像された画像の大きさで検査領
域W1 〜W4 が図8(a)又は(b)に示すように重複
することになり、重複部分の大きさは変化するが、異物
検出のための検査領域は被検査物1の画像の大きさが図
8(b)のように小さくなっても被検査物1の上面全体
をカバーすることができることになる。ところで被検査
物1を積載するため、その積載がずれることがある。そ
こで積載ずれを検出するために本実施形態では、一つ前
の被検査物1の画像に対して設定したエッジ検出位置を
基準にして今回の被検査物1のエッジ検出領域を設定し
て、エッジ検出ができるか否かを判定して積載ずれを検
出するようになっている。
In this case, the inspection areas W 1 to W 4 overlap as shown in FIG. 8A or 8B depending on the size of the captured image, and the size of the overlapping portion changes. The inspection area for detecting the foreign substance can cover the entire upper surface of the inspection object 1 even if the size of the image of the inspection object 1 is reduced as shown in FIG. Incidentally, since the inspection object 1 is loaded, the loading may be shifted. Therefore, in order to detect a stacking deviation, in the present embodiment, an edge detection area of the current inspection object 1 is set based on an edge detection position set for an image of the inspection object 1 immediately before. It is determined whether or not the edge can be detected to detect a stacking deviation.

【0032】つまり図9に示すように被検査物1の撮像
を行い、一つ前に撮像した別の被検査物1の画像の外形
エッジ検出位置を基準座標、例えば図10(a)に示す
X1 を基準にして±M画素分の幅を持つエッジ検査領域
Waを現在の画像に対して図10(b)に示すように設
定する。このエッジ検査領域Wa内の濃淡画像を微分処
理して外形エッジを検出できるか否かを判定する。図1
0(b)では今回X2 として外形エッジの座標がエッ
ジ検査領域Wa内に存在するため、積載ずれによって検
出不可とは成らず、次の被検査物1のエッジ検査領域W
aを設定するのめの基準座標としてX2 を登録し、異
物検出処理の終了後、全ての被検査物1の検査終了が終
了していなければ、再び上述の処理を行う。また上記の
エッジ検査領域Wa内で外形エッジ検出ができない場
合、被検査物1の積載ずれ量がM画素以上あると判断す
る。
That is, as shown in FIG.
Is performed, and the outer shape of the image of another inspection object 1 taken immediately before
The edge detection position is indicated by reference coordinates, for example, as shown in FIG.
X1 Inspection area with a width of ± M pixels with reference to
Wa is set for the current image as shown in FIG.
Set. The grayscale image in the edge inspection area Wa is differentiated.
It is determined whether or not the contour edge can be detected. FIG.
In 0 (b), this time X2 The coordinates of the outer edge are
Because it is within the inspection area Wa, the
It is not determined that the inspection is impossible and the next edge inspection area W of the inspection object 1 is not detected.
X2 is used as a reference coordinate for setting a. Register the different
After the object detection processing is completed, the inspection of all the inspection objects 1 is completed.
If not, the above processing is performed again. Also above
When the outer edge cannot be detected in the edge inspection area Wa
In this case, it is determined that the displacement amount of the inspection object 1 is M pixels or more.
You.

【0033】上記図9、図10の場合には、エッジ検出
領域Waを一つ前の被検査物1のエッジ検出の座標を基
準としてエッジ検出領域Waを設定するようにしている
が、エッジ検出領域Waを固定とし、図12(a)に示
すように被検査物1の撮像後、エッジ検出領域Waを設
定してエッジ検出を行い、このエッジ検出で検出ができ
た場合、次の被検査物1の異物検出のために外形エッジ
の位置座標Xn,Ynを登録し、もしエッジ検出が出来
なかった場合には前の被検査物1の検査時に登録した外
形エッジの位置座標Xn−1、Yn−1を基準にして、
図12(b)に示すように異物検出のための検査領域を
用いて異物検出を行うようにするとともに、次の被検査
物1の異物検出のために外形エッジの位置座標Xn−
1,Yn−1を登録する。
9 and 10, the edge detection area Wa is set based on the coordinates of the edge detection of the immediately preceding inspection object 1 in the edge detection area Wa. As shown in FIG. 12A, the area Wa is fixed, an edge detection area Wa is set and an edge detection is performed after the imaging of the object 1 to be inspected, and if the edge detection is successful, the next inspection is performed. The position coordinates Xn and Yn of the outer edge are registered for foreign object detection of the object 1. If the edge cannot be detected, the position coordinates Xn-1 of the outer edge registered at the time of the previous inspection of the inspected object 1 are registered. Based on Yn-1,
As shown in FIG. 12B, foreign matter detection is performed using the inspection area for foreign matter detection, and the position coordinates Xn−
1, Yn-1 are registered.

【0034】このような方法を用いれば、検査画像にお
いて被検査物1の位置決定のためのエッジ検出がエッジ
検出領域Waに異物Xが存在する等の理由からできない
場合でも、前の被検査物1の画像のエッジ検出位置のデ
ータを用いて異物検査用の検査領域を設定することによ
り、異物検出を行うことができる。ところで上記の方法
では2回目以降の外形エッジ検出位置や位置座標を用い
るが、1回目についてはエッジ検出領域を絶対位置で設
定して処理を行う。
By using such a method, even if the edge detection for determining the position of the inspection object 1 in the inspection image cannot be performed due to the presence of the foreign matter X in the edge detection area Wa, etc. By setting an inspection area for foreign substance inspection using the data of the edge detection position of one image, foreign substance detection can be performed. By the way, in the above method, the outer edge detection position and the position coordinates after the second time are used, but for the first time, the processing is performed by setting the edge detection area by the absolute position.

【0035】(実施形態2)上記の実施形態1の場合で
は、被検査物1の表面に水、油による光沢面が存在する
場合、異物Xが存在する面との間で識別ができず、異物
のみを検出することができない場合がある。そこで本実
施形態では図13に示すように被検査物1の上面に正対
する連続発光する光源(勿論ストロボ光源でも良い)1
3を設置し、次の方法により異物Xのみを抽出するよう
にした。
(Embodiment 2) In the case of Embodiment 1 described above, if the surface of the inspection object 1 has a glossy surface made of water or oil, it cannot be distinguished from the surface on which the foreign matter X exists. In some cases, only foreign matter cannot be detected. Therefore, in the present embodiment, as shown in FIG. 13, a light source (of course, a strobe light source) 1 that emits light continuously and directly facing the upper surface of the inspection object 1.
3 was installed, and only the foreign matter X was extracted by the following method.

【0036】次に本実施形態について説明する。先ず本
実施形態では異物検出のための撮像を行う前に、制御部
12の制御の下でタイミング回路9を通じて撮像カメラ
7のレンズ部7aを制御してフォーカスを被検査物1の
表面に合わせ且つストロボ光源8により斜光照明した状
態で被検査物1上面を撮像カメラ7により撮像し、画像
認識部10では撮像した画像から濃淡画像を得て該濃淡
画像を演算処理することにより被検査物1の上面と撮像
カメラ7迄の距離Lを求める。この後距離Laから予め
定めたオフセット量aだけフォーカスを上方へ移動させ
る。
Next, this embodiment will be described. First, in this embodiment, the lens unit 7a of the imaging camera 7 is controlled through the timing circuit 9 under the control of the control unit 12 so as to focus on the surface of the inspection object 1 before performing imaging for detecting foreign matter. The upper surface of the inspected object 1 is imaged by the imaging camera 7 in a state where the object 1 is obliquely illuminated by the strobe light source 8, and the image recognizing unit 10 obtains a grayscale image from the captured image, and performs arithmetic processing on the grayscale image to thereby obtain an The distance L between the upper surface and the imaging camera 7 is obtained. Thereafter, the focus is moved upward by a predetermined offset amount a from the distance La.

【0037】この後、タイミング回路9を制御してスト
ロボ光源8により斜光照明を行い、この斜光照明下で撮
像カメラ7により被検査物1の上面全体の画像を撮像す
る。この場合被検査物1の上面に異物Xが存在する場合
の面の明度は暗くなる。また光沢面Yが図13に示すよ
うに存在する場合も明度は暗くなる。従ってこの画像を
用いて異物検出を行う場合、光沢面Yとの識別ができな
い。
Thereafter, the timing circuit 9 is controlled to perform oblique illumination by the strobe light source 8, and an image of the entire upper surface of the inspection object 1 is captured by the imaging camera 7 under the oblique illumination. In this case, the brightness of the surface when the foreign matter X exists on the upper surface of the inspection object 1 becomes dark. Also, when the glossy surface Y exists as shown in FIG. 13, the brightness becomes dark. Therefore, when foreign matter detection is performed using this image, it cannot be distinguished from the glossy surface Y.

【0038】そこでストロボ光源8の照明を止め、光源
13による照明を行って、撮像カメラ7のよる撮像を行
う。この場合異物Xが存在する面の明度は変化がなく、
光沢面Yの明度が明るくなる。従って先に斜光照明下で
撮像して得られた画像データと、今回の正対する照明下
で撮像して得られた画像データとから異物Xの存在する
面と、光沢面Yとが識別され、その結果濃淡画像の微分
値としきい値との比較の際に、光沢面Yを異物Xと誤検
出することなく、高精度に異物Xを検出することができ
る。
Then, the illumination of the strobe light source 8 is stopped, the illumination of the light source 13 is performed, and an image is taken by the imaging camera 7. In this case, the brightness of the surface where the foreign matter X exists does not change,
The brightness of the glossy surface Y becomes bright. Therefore, the surface on which the foreign matter X is present and the glossy surface Y are identified from the image data obtained by capturing the image under the oblique illumination first and the image data obtained by capturing the image under the illumination facing the current time, As a result, it is possible to detect the foreign matter X with high accuracy without erroneously detecting the glossy surface Y as the foreign matter X when comparing the differential value of the grayscale image with the threshold value.

【0039】尚本実施形態においても、上記実施形態1
で用いたオフセット量aの決定方法や、異物拡大認識方
法、検出領域設定方法、エッジ検出領域設定方法等を用
いることができるのは言うまでもない。
In this embodiment, the first embodiment is also used.
It is needless to say that the method of determining the offset amount a, the method of recognizing foreign matter, the method of setting the detection area, the method of setting the edge detection area, and the like can be used.

【0040】[0040]

【発明の効果】請求項1の発明は、被検査物の上面に正
対するようにフォーカスレンズ付撮像カメラを配置する
とともに、上面に凹凸形状を有する被検査物に対して光
源を斜め上方に設置し、被検査物の上面に対して上方側
へ一定距離オフセットした点に撮像カメラのフォーカス
を合わせるとともに光源により被検査物に対して斜光照
明を行って撮像カメラで被検査物の上面を撮像し、該撮
像された画像より濃淡画像を得て該濃淡画像の微分値を
求め、求めた微分値と予め設定されたしきい値とを比較
することにより上記凹凸形状ではない異物を検出するの
で、被検査物の正常な面に模様等の凹凸形状が存在して
も、異物として誤検出することがなく、高精度に異物の
みの検出ができるという効果がある。
According to the first aspect of the present invention, an imaging camera with a focus lens is arranged so as to directly face an upper surface of an object to be inspected, and a light source is installed obliquely upward with respect to the object having an uneven shape on the upper surface. The imaging camera is focused on a point offset by a certain distance upward with respect to the upper surface of the inspection object, and the light source illuminates the inspection object with oblique light to image the upper surface of the inspection object with the imaging camera. Since a grayscale image is obtained from the captured image, a differential value of the grayscale image is obtained, and the obtained differential value is compared with a preset threshold to detect a foreign substance that is not the above-mentioned uneven shape. Even if there are irregularities such as patterns on the normal surface of the object to be inspected, there is an effect that only foreign matter can be detected with high accuracy without being erroneously detected as foreign matter.

【0041】請求項2の発明は、請求項1の発明におい
て、フォーカスを被検査物の上面に合わせ且つ光源によ
り斜光照明した状態で被検査物上面を撮像カメラにより
撮像し、該撮像された画像から濃淡画像を得て該濃淡画
像を演算処理することにより被検査物の上面と撮像カメ
ラ迄の距離を求め、該距離に基づいて被検査物の上面に
対して上方側へオフセットする距離を決定するので、被
検査物の厚みが変化しても、オフセットする距離を一定
とすることができ、常に同じ条件で被検査物を撮像する
ことができるという効果がある。
According to a second aspect of the present invention, in accordance with the first aspect of the present invention, the upper surface of the inspection object is imaged by an imaging camera in a state where the focus is set on the upper surface of the inspection object and oblique illumination is performed by a light source. The distance between the upper surface of the object to be inspected and the imaging camera is obtained by obtaining the grayscale image from and calculating the grayscale image, and the distance to be offset upward with respect to the upper surface of the object to be inspected is determined based on the distance. Therefore, even if the thickness of the object to be inspected changes, the offset distance can be kept constant, and the object to be inspected can always be imaged under the same conditions.

【0042】請求項3の発明は、請求項1又は2の発明
において、被検査物の上面に正対するように別の光源を
配置し、異物検出のために被検査物に対して斜光照明を
行って撮像カメラで被検査物の上面を撮像する前又は後
において、上記別の光源による照明下で被検査物の上面
を撮像して被検査物の濃淡画像を得、該濃淡画像の微分
値を、上記斜光照明下で撮像して得られた濃淡画像の微
分値から減算して該減算結果より被検査物の上面の異物
面と光沢面とを選択するので、被検査物の表面に水、油
等の付着による光沢面が存在しても異物と識別すること
ができ、異物検出の精度を向上させることができるとい
う効果がある。
According to a third aspect of the present invention, in the first or second aspect of the present invention, another light source is disposed so as to face the upper surface of the inspection object, and oblique illumination is applied to the inspection object to detect a foreign substance. Before or after performing the imaging of the upper surface of the inspection object with the imaging camera, the upper surface of the inspection object is imaged under illumination by the another light source to obtain a gray image of the inspection object, and the differential value of the gray image is obtained. Is subtracted from the differential value of the grayscale image obtained by imaging under the oblique illumination, and the foreign matter surface and the glossy surface on the upper surface of the inspection object are selected based on the subtraction result. Even if there is a glossy surface due to the adhesion of oil or the like, there is an effect that foreign matter can be identified and the accuracy of foreign matter detection can be improved.

【0043】請求項4の発明は、請求項1又は2の発明
において、被検査物表面の異物の厚みが限定される場合
に、異物検出後に、異物の上面に撮像カメラのフォーカ
スを合わせて再度撮像するので、異物の大きさや形状の
認識及び異物の表面状態が把握でき、異物の混入原因の
追求等の分析が可能となるという効果がある。請求項5
の発明は、請求項1又は2の発明において、フォーカス
レンズにズーム機能を持たせたものを用い、異物検出後
に撮像カメラを異物の上方に位置するように移動させ、
濃淡画像の処理により異物の大きさを算出して、該異物
の大きさに応じた画角になるようにフォーカスレンズの
ズーム機能を動作させるとともに異物にフォーカスを合
わせた後に異物を撮像するので、高精度に異物の大きさ
や外形、高さ等の形状と素材や種類等の状態を識別でき
るという効果がある。
According to a fourth aspect of the present invention, in the first or second aspect of the invention, when the thickness of the foreign matter on the surface of the inspection object is limited, after detecting the foreign matter, the imaging camera is focused on the upper surface of the foreign matter and again. Since the image is taken, the size and shape of the foreign matter can be recognized, the surface state of the foreign matter can be grasped, and the effect of pursuing the cause of the foreign matter can be analyzed. Claim 5
The invention according to claim 1 or 2, wherein the focus lens having a zoom function is used, and after detecting the foreign matter, the imaging camera is moved so as to be positioned above the foreign matter,
Since the size of the foreign matter is calculated by processing the grayscale image, the zoom function of the focus lens is operated so as to have an angle of view corresponding to the size of the foreign matter, and the foreign matter is imaged after focusing on the foreign matter. There is an effect that the shape such as the size, outer shape, and height of the foreign matter and the state such as the material and the type can be identified with high accuracy.

【0044】請求項6の発明は、請求項1の発明におい
て、1乃至複数の被検査物が積載され、撮像カメラと正
対する被検査物に対する検査を行う際に、被検査物が一
定の厚みを有するものである場合、被検査物の厚みの関
数に基づいてオフセットする距離を求めるので、積載さ
れる被検査物の厚みのみで適切なオフセットする距離を
求めることができ、そのため常に一定の条件でオフセッ
トする距離を決定できるという効果がある。
According to a sixth aspect of the present invention, in the first aspect of the present invention, when one or more inspection objects are stacked and the inspection of the inspection object facing the imaging camera is performed, the inspection object has a constant thickness. In the case of having an object, since the offset distance is obtained based on the function of the thickness of the inspection object, an appropriate offset distance can be obtained only by the thickness of the inspection object to be loaded. Has the effect that the offset distance can be determined.

【0045】請求項7の発明は、請求項2の発明におい
て、1乃至複数の被検査物が積載され、撮像カメラと正
対する被検査物に対する検査を行う際に、積載高が夫々
の被検査物により異なる場合、被検査物上面と撮像カメ
ラとの間の距離を求めるための撮像後、撮像した画像よ
り得た濃淡画像から被検査物の外形エッジから延びる影
の長さを求め、該影の長さとと斜光照明の角度から被検
査物の高さを算出した後、該高さと、前記距離と、フォ
ーカスレンズの焦点距離及び有効径とを関数として被検
査物の上面に対して上方側へオフセットする距離を決定
するので、被検査物の厚さが一定でない場合や異物混入
等の原因で積載高さが変化する場合にも計算式により適
切なオフセットする距離を算出することができるという
効果がある。
According to a seventh aspect of the present invention, in the second aspect of the present invention, when one or a plurality of inspected objects are stacked and the inspection of the inspected object facing the imaging camera is performed, the height of each of the inspected objects is changed. If it differs depending on the object, after imaging for obtaining the distance between the upper surface of the inspection object and the imaging camera, the length of the shadow extending from the outer edge of the inspection object is obtained from the grayscale image obtained from the captured image, and the shadow is obtained. After calculating the height of the test object from the length and the angle of the oblique illumination, the height, the distance, the focal length and the effective diameter of the focus lens as a function of the upper side with respect to the upper surface of the test object. Since the offset distance is determined, it is possible to calculate an appropriate offset distance by using a calculation formula even when the thickness of the inspection object is not constant or when the load height changes due to the inclusion of foreign matter. effective.

【0046】請求項8の発明は、請求項1又は2の発明
において、1乃至複数の被検査物が積載され、撮像カメ
ラと正対する被検査物に対する検査を行う際に、今回検
査される被検査物の画像に対して設定される検査領域を
被検査物の位置が変化しても被検査物の上面全体を含む
ように設定するので、積載によって被検査物の大きさが
変化する場合も、常に検査領域が被検査物の全体をカバ
ーできるという効果がある。
According to an eighth aspect of the present invention, in the first or second aspect of the present invention, when one or more inspection objects are stacked and the inspection of the inspection object facing the imaging camera is performed, the inspection object to be inspected this time is performed. Since the inspection area set for the image of the inspection object is set so as to include the entire upper surface of the inspection object even if the position of the inspection object changes, the size of the inspection object may change due to loading. This has the effect that the inspection area can always cover the entire inspection object.

【0047】請求項9の発明は、請求項8の発明におい
て、今回の被検査物の位置を確認するために設定される
エッジ検査領域を、前回の検査において撮像された被検
査物の外形エッジ検出位置を基準にして、設定するの
で、一つ前の被検査物の画像から積載ずれを検出するこ
とができるという効果がある。請求項10の発明は、請
求項8の発明において、今回検査される被検査物の位置
認識用のエッジ検出ができなかった場合に、前回の検査
において撮像された被検査物の外形エッジ検出位置を基
準にして、異物を検出するための検査領域を設定するの
で、異物検出するための画像において、被検出物の位置
決定のためのエッジ検出が、エッジ検出領域を設定する
位置に異物が存在してできない場合でも、一つ前の被検
査物の位置を基に異物検出を行える効果がある。
According to a ninth aspect of the present invention, in the invention of the eighth aspect, the edge inspection area set for confirming the current position of the inspection object is replaced with the outer edge of the inspection object imaged in the previous inspection. Since the setting is made with reference to the detection position, there is an effect that the stacking deviation can be detected from the image of the immediately preceding inspection object. According to a tenth aspect of the present invention, in the invention of the eighth aspect, when an edge for position recognition of the inspection object to be inspected this time cannot be detected, an outer edge detection position of the inspection object captured in the previous inspection. The inspection area for detecting foreign matter is set based on the reference, so that in the image for foreign matter detection, the edge detection for determining the position of the object to be detected is performed at the position where the edge detection area is set. Even if it is not possible, foreign matter can be detected based on the position of the previous inspection object.

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

【図1】本発明の実施形態1を用いた装置の概略構成図
である。
FIG. 1 is a schematic configuration diagram of an apparatus using a first embodiment of the present invention.

【図2】同上のオフセット量決定方法の説明図である。FIG. 2 is an explanatory diagram of an offset amount determining method according to the first embodiment;

【図3】同上のフォーカス距離設定方法の説明図であ
る。
FIG. 3 is an explanatory diagram of a focus distance setting method according to the first embodiment;

【図4】同上の別のオフセット量決定方法の説明図であ
る。
FIG. 4 is an explanatory diagram of another offset amount determination method according to the first embodiment;

【図5】同上の異物認識のためのフォーカス制御の説明
図である。
FIG. 5 is an explanatory diagram of focus control for foreign matter recognition according to the first embodiment;

【図6】同上の異物拡大認識方法の説明図である。FIG. 6 is an explanatory diagram of a foreign matter enlargement recognition method according to the embodiment.

【図7】同上の検査領域設定方法のフローチャートであ
る。
FIG. 7 is a flowchart of an inspection area setting method according to the embodiment.

【図8】同上の検査領域設定方法の説明図である。FIG. 8 is an explanatory diagram of an inspection area setting method according to the embodiment.

【図9】同上のエッジ検査領域設定方法のフローチャー
トである。
FIG. 9 is a flowchart of an edge inspection area setting method of the above.

【図10】同上のエッジ検査領域設定方法の説明図であ
る。
FIG. 10 is an explanatory diagram of an edge inspection area setting method according to the embodiment.

【図11】同上の異物検査領域設定方法のフローチャー
トである。
FIG. 11 is a flowchart of a foreign matter inspection area setting method according to the first embodiment;

【図12】同上の異物検査領域設定方法の説明図であ
る。
FIG. 12 is an explanatory diagram of a foreign matter inspection area setting method according to the embodiment.

【図13】本発明の実施形態2を用いた装置の概略構成
図である。
FIG. 13 is a schematic configuration diagram of an apparatus using Embodiment 2 of the present invention.

【図14】従来例方法を用いた装置の概略構成図であ
る。
FIG. 14 is a schematic configuration diagram of an apparatus using a conventional method.

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

1 被検査物 7 撮像カメラ 7a レンズ部 8 ストロボ光源 9 タイミング回路 10 画像認識部 11 レンズ制御回路 12 制御部 X 異物 DESCRIPTION OF SYMBOLS 1 Inspection object 7 Imaging camera 7a Lens part 8 Strobe light source 9 Timing circuit 10 Image recognition part 11 Lens control circuit 12 Control part X Foreign matter

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】被検査物の上面に正対するようにフォーカ
スレンズ付撮像カメラを配置するとともに、上面に凹凸
形状を有する被検査物に対して光源を斜め上方に設置
し、被検査物の上面に対して上方側へ一定距離オフセッ
トした点に撮像カメラのフォーカスを合わせるとともに
光源により被検査物に対して斜光照明を行って撮像カメ
ラで被検査物の上面を撮像し、該撮像された画像より濃
淡画像を得て該濃淡画像の微分値を求め、求めた微分値
と予め設定されたしきい値とを比較することにより上記
凹凸形状ではない異物を検出することを特徴とする異物
検出方法。
An imaging camera with a focus lens is arranged so as to face the upper surface of an object to be inspected, and a light source is installed obliquely upward with respect to the object having an uneven shape on the upper surface. The focus of the imaging camera is adjusted to a point offset by a certain distance upward with respect to and the oblique illumination is performed on the inspection object by the light source, and the imaging camera captures the upper surface of the inspection object. A foreign matter detection method comprising: obtaining a shaded image, determining a differential value of the shaded image, and comparing the determined differential value with a preset threshold to detect a foreign matter having no irregularities.
【請求項2】フォーカスを被検査物の上面に合わせ且つ
光源により斜光照明した状態で被検査物上面を撮像カメ
ラにより撮像し、該撮像された画像から濃淡画像を得て
該濃淡画像を演算処理することにより被検査物の上面と
撮像カメラ迄の距離を求め、該距離に基づいて被検査物
の上面に対して上方側へオフセットする距離を決定する
ことを特徴とする請求項1記載の異物検出方法。
2. An image pickup camera captures an image of an upper surface of an inspection object under a condition in which the upper surface of the inspection object is focused and is obliquely illuminated by a light source, obtains a gray image from the captured image, and processes the gray image. 2. The foreign matter according to claim 1, wherein a distance between the upper surface of the object to be inspected and the imaging camera is obtained, and a distance to be offset upward with respect to the upper surface of the object to be inspected is determined based on the distance. Detection method.
【請求項3】被検査物の上面に正対するように別の光源
を配置し、異物検出のために被検査物に対して斜光照明
を行って撮像カメラで被検査物の上面を撮像する前又は
後において、上記別の光源による照明下で被検査物の上
面を撮像して被検査物の濃淡画像を得、該濃淡画像の微
分値を、上記斜光照明下で撮像して得られた濃淡画像の
微分値から減算して該減算結果より被検査物の上面の異
物面と光沢面とを選択することを特徴とする請求項1又
は2記載の異物検出方法。
3. A method in which another light source is disposed so as to face the upper surface of the inspection object, oblique illumination is performed on the inspection object for foreign substance detection, and the upper surface of the inspection object is imaged by an imaging camera. Or later, the upper surface of the inspection object is imaged under illumination by the different light source to obtain a gray image of the inspection object, and the differential value of the gray image is obtained by imaging under the oblique illumination. 3. The foreign matter detection method according to claim 1, wherein the foreign matter surface and the glossy surface on the upper surface of the inspection object are selected from the result of subtraction from the differential value of the image.
【請求項4】被検査物表面の異物の厚みが限定される場
合に、異物検出後に、異物の上面に撮像カメラのフォー
カスを合わせて再度撮像することを特徴とする請求項1
又は2記載の異物検出方法。
4. The method according to claim 1, wherein when the thickness of the foreign matter on the surface of the inspection object is limited, after detecting the foreign matter, the upper surface of the foreign matter is focused on by the imaging camera and the image is taken again.
Or the foreign matter detection method according to 2.
【請求項5】フォーカスレンズにズーム機能を持たせた
ものを用い、異物検出後に撮像カメラを異物の上方に位
置するように移動させ、濃淡画像の処理により異物の大
きさを算出して、該異物の大きさに応じた画角になるよ
うにフォーカスレンズのズーム機能を動作させるととも
に異物にフォーカスを合わせた後に異物を撮像すること
を特徴とする請求項1又は2記載の異物検出方法。
5. Using a focusing lens having a zoom function, moving the imaging camera so as to be positioned above the foreign matter after detecting the foreign matter, calculating the size of the foreign matter by processing a grayscale image, and 3. The foreign matter detection method according to claim 1, wherein the zoom function of the focus lens is operated so as to have an angle of view corresponding to the size of the foreign matter, and the foreign matter is imaged after focusing on the foreign matter.
【請求項6】1乃至複数の被検査物が積載され、撮像カ
メラと正対する被検査物に対する検査を行う際に、被検
査物が一定の厚みを有するものである場合、被検査物の
厚みの関数に基づいてオフセットする距離を求めること
を特徴とする請求項1記載の異物検出方法。
6. When the inspection object has a constant thickness when one or more inspection objects are loaded and the inspection object facing the imaging camera is inspected, the thickness of the inspection object is determined. 2. The foreign matter detection method according to claim 1, wherein the offset distance is obtained based on the function of:
【請求項7】1乃至複数の被検査物が積載され、撮像カ
メラと正対する被検査物に対する検査を行う際に、積載
高が夫々の被検査物により異なる場合、被検査物上面と
撮像カメラとの間の距離を求めるための撮像後、撮像し
た画像より得た濃淡画像から被検査物の外形エッジから
延びる影の長さを求め、該影の長さとと斜光照明の角度
から被検査物の高さを算出した後、該高さと、前記距離
と、フォーカスレンズの焦点距離及び有効径とを関数と
して被検査物の上面に対して上方側へオフセットする距
離を決定することを特徴とする請求項2記載の異物検出
方法。
7. An inspection apparatus according to claim 1, wherein when one or a plurality of inspection objects are loaded and an inspection of the inspection object facing the imaging camera is performed, if the loading height is different for each inspection object, the upper surface of the inspection object and the imaging camera After the imaging for obtaining the distance between the object, the length of the shadow extending from the outer edge of the inspection object is obtained from the grayscale image obtained from the captured image, and the inspection object is obtained from the length of the shadow and the angle of the oblique illumination. After calculating the height, the distance to be offset upward with respect to the upper surface of the inspection object is determined as a function of the height, the distance, the focal length of the focus lens, and the effective diameter. The method for detecting foreign matter according to claim 2.
【請求項8】1乃至複数の被検査物が積載され、撮像カ
メラと正対する被検査物に対する検査を行う際に、今回
検査される被検査物の画像に対して設定される検査領域
を被検査物の位置が変化しても被検査物の上面全体を含
むように設定することを特徴とする請求項1又は2記載
の異物検出方法。
8. When one or more inspection objects are loaded and an inspection is performed on the inspection object facing the imaging camera, an inspection area set for an image of the inspection object to be inspected this time is covered. 3. The foreign matter detection method according to claim 1, wherein the setting is performed so as to include the entire upper surface of the inspection object even when the position of the inspection object changes.
【請求項9】今回の被検査物の位置を確認するために設
定されるエッジ検査領域を、前回の検査において撮像さ
れた被検査物の外形エッジ検出位置を基準にして、設定
することを特徴とする請求項8記載の異物検出方法。
9. An edge inspection area set for confirming the current position of the object to be inspected is set with reference to an outer edge detection position of the object to be inspected imaged in the previous inspection. The foreign matter detection method according to claim 8, wherein
【請求項10】今回検査される被検査物の位置認識用の
エッジ検出ができなかった場合に、前回の検査において
撮像された被検査物の外形エッジ検出位置を基準にし
て、異物を検出するための検査領域を設定することを特
徴とする請求項8記載の異物検出方法。
10. A foreign object is detected on the basis of a contour edge detection position of an object imaged in a previous inspection, when an edge for position recognition of the object inspected this time cannot be detected. 9. The foreign matter detection method according to claim 8, wherein an inspection area for setting is set.
JP26068897A 1997-09-25 1997-09-25 Foreign object detection method Expired - Fee Related JP3427248B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26068897A JP3427248B2 (en) 1997-09-25 1997-09-25 Foreign object detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26068897A JP3427248B2 (en) 1997-09-25 1997-09-25 Foreign object detection method

Publications (2)

Publication Number Publication Date
JPH11101750A true JPH11101750A (en) 1999-04-13
JP3427248B2 JP3427248B2 (en) 2003-07-14

Family

ID=17351402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26068897A Expired - Fee Related JP3427248B2 (en) 1997-09-25 1997-09-25 Foreign object detection method

Country Status (1)

Country Link
JP (1) JP3427248B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008026255A (en) * 2006-07-25 2008-02-07 Kobe Steel Ltd Flaw inspection system, and flaw inspection method
JP2013040895A (en) * 2011-08-19 2013-02-28 Dainippon Printing Co Ltd Bar code visual inspection system, and bar code visual inspection method
KR101642047B1 (en) * 2015-04-02 2016-07-22 무진기공주식회사 Apparatus and method for measuring plastic strain of mold products
JP2017069579A (en) * 2016-12-27 2017-04-06 株式会社東京精密 Edge detector
JP2017098567A (en) * 2016-12-27 2017-06-01 株式会社東京精密 Edge detection apparatus
CN110987970A (en) * 2019-10-26 2020-04-10 惠州高视科技有限公司 Object surface defect detection system and detection method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008026255A (en) * 2006-07-25 2008-02-07 Kobe Steel Ltd Flaw inspection system, and flaw inspection method
JP2013040895A (en) * 2011-08-19 2013-02-28 Dainippon Printing Co Ltd Bar code visual inspection system, and bar code visual inspection method
KR101642047B1 (en) * 2015-04-02 2016-07-22 무진기공주식회사 Apparatus and method for measuring plastic strain of mold products
JP2017069579A (en) * 2016-12-27 2017-04-06 株式会社東京精密 Edge detector
JP2017098567A (en) * 2016-12-27 2017-06-01 株式会社東京精密 Edge detection apparatus
CN110987970A (en) * 2019-10-26 2020-04-10 惠州高视科技有限公司 Object surface defect detection system and detection method

Also Published As

Publication number Publication date
JP3427248B2 (en) 2003-07-14

Similar Documents

Publication Publication Date Title
JP3051279B2 (en) Bump appearance inspection method and bump appearance inspection device
JP6264132B2 (en) Inspection device and inspection method for painted surface of vehicle body
JP2006220613A (en) Device for detecting welded position
JPH1163959A (en) Surface-inspecting device
JP3690157B2 (en) Surface defect inspection equipment
KR20160108644A (en) Device for detecting defect of device
JPH08145906A (en) Method and equipment for inspection of defect of surface to be inspected
JP2007017283A (en) Method and apparatus for visual inspection
JPH11101750A (en) Detection of foreign matter
JP2002107126A (en) Apparatus and method for inspecting substrate
JPH10221035A (en) Apparatus for inspecting packaged component
Nakagawa et al. Three-Dimensional Vision Systems Using the Structured-Light Method for Inspecting Solder Joints and Assembly Robots
JPH1010053A (en) Inspection device for surface defect
JP2002195958A (en) Surface inspecting method
JP2004191070A (en) Coated surface inspection apparatus
JP2000275033A (en) Surface defect inspection device
JP2000082143A (en) Surface defect inspection device
JP3454162B2 (en) Inspection system for flat plate with holes
JPH08219740A (en) Method and equipment for inspecting semiconductor device
JP2596158B2 (en) Component recognition device
JP2012078143A (en) Foreign matter inspection device and alignment adjustment method
JPH067171B2 (en) Moving object detection method
JPH0933227A (en) Discrimination method for three-dimensional shape
JPH08159712A (en) Pattern recognition method
JP3160838B2 (en) Surface defect inspection equipment

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030401

LAPS Cancellation because of no payment of annual fees