JP3427248B2 - Foreign object detection method - Google Patents

Foreign object detection method

Info

Publication number
JP3427248B2
JP3427248B2 JP26068897A JP26068897A JP3427248B2 JP 3427248 B2 JP3427248 B2 JP 3427248B2 JP 26068897 A JP26068897 A JP 26068897A JP 26068897 A JP26068897 A JP 26068897A JP 3427248 B2 JP3427248 B2 JP 3427248B2
Authority
JP
Japan
Prior art keywords
inspected
image
foreign matter
inspection
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.)
Expired - Fee Related
Application number
JP26068897A
Other languages
Japanese (ja)
Other versions
JPH11101750A (en
Inventor
靖之 岸
武史 池村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic 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

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 detecting 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 A conventional object detecting method is disclosed in Japanese Patent Laid-Open No. 2-10.
There is a method described in Japanese Patent No. 204. In this method, as shown in FIG. 14, the two illumination devices 2 and 2 installed with the inspection object 1 sandwiched therebetween emit light to generate shadows A and B on the inspection object 1 and the image pickup camera 3 and the image are generated. 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 brightness histograms when the two illumination devices 2 and 2 illuminate.

【0003】[0003]

【発明が解決しようとする課題】上記の物体検出方法で
は、被検査物1を載置する平板部6に凹凸形状が存在す
る場合、被検査物1が存在しないにも関わらず、凹凸形
状による濃淡が発生し、この濃淡を被検査物1として誤
検出してしまうという恐れがある。つまりこのような従
来の物体検出方法を用いて異物検出を行う場合には、正
常面に正常な形状として存在する凹凸形状と異物による
凹凸形状を識別することができず、全て異物と誤検出す
る恐れがあり、異物検出方法としては採用することがで
きない。
In the above object detecting method, when the flat plate portion 6 on which the inspection object 1 is placed has an uneven shape, the uneven shape is generated even though the inspection object 1 does not exist. There is a risk that light and shade will occur and this light and shade will be 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 distinguish between the irregular shape existing as a normal shape on the normal surface and the irregular shape caused by the foreign matter, and all are erroneously detected as foreign matter. Therefore, it cannot be used as a foreign matter detection method.

【0004】本発明は上記の点に鑑みて為されたもの
で、請求項1の発明の目的とするところは正常面に正常
な形状として存在する凹凸形状を異物と誤って検出する
ことが無く、高精度に異物のみを検出することができる
異物検出方法を提供することにある。請求項2の発明の
目的とするところは、請求項1の発明の目的に加え、被
検査物の厚みが一定でない場合や異物混入等の原因で積
載高さが変化する場合にも計算式により適切なオフセッ
トする距離を算出することができる異物検出方法を提供
することにある。
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 matter. An object of the present invention is to provide a foreign matter detection method capable of detecting only a foreign matter with high accuracy. The object of the invention of claim 2 is that, in addition to the object of the invention of claim 1 , the product may be accumulated when the thickness of the object to be inspected is not constant or when foreign matter is mixed.
Even when the mounting height changes, an appropriate offset can be calculated using the formula.
An object of the present invention is to provide a foreign matter detection method capable of calculating the distance to be moved.

【0005】[0005]

【0006】[0006]

【0007】[0007]

【0008】[0008]

【0009】[0009]

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

【0010】請求項2の発明では、請求項1の発明にお
いて、1乃至複数の被検査物が積載され、撮像カメラと
正対する被検査物に対する検査を行う際に、積載高が夫
々の被検査物により異なる場合、被検査物上面と撮像カ
メラとの間の距離を求めるための撮像後、撮像した画像
より得た濃淡画像から被検査物の外形エッジから延びる
影の長さを求め、該影の長さとと斜光照明の角度から被
検査物の高さを算出した後、該高さと、前記距離と、フ
ォーカスレンズの焦点距離及び有効径とを関数として被
検査物の上面に対して上方側へオフセットする距離を決
することを特徴とする。
According to a second aspect of the invention, in the first aspect of the invention, one or a plurality of objects to be inspected are stacked, and an image pickup camera and
When inspecting the object to be inspected, the loading height is
If different for each inspection object, the top surface of the inspection object and the imaging
Image taken after imaging to determine the distance to the camera
Extends from the outer edge of the inspected object from the obtained grayscale image
Find the length of the shadow, and calculate the shadow length and the angle of oblique lighting.
After calculating the height of the inspection object, the height, the distance, and the
The focal length and effective diameter of the focus lens are covered as a function.
Determine the distance to offset the upper side of the inspection object
Characterized in that it constant.

【0011】[0011]

【0012】[0012]

【0013】[0013]

【0014】[0014]

【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の制御の下で位置移動ができるようにな
っている。
BEST MODE FOR CARRYING OUT THE INVENTION The method of the present invention will be described below with reference to embodiments. (Embodiment 1) FIG. 1 shows a schematic configuration diagram of an inspection apparatus using this embodiment. For example, an inspection object (not shown) having an inspection object 1 having an uneven shape such as a groove pattern on the upper surface like a roof tile is shown. No)
The image pickup camera 7 is composed of a CCD camera and is mounted on the upper surface of the object to be inspected 1 so as to be inspected for foreign matter. A strobe light source 8 arranged above and performing oblique illumination on the upper surface of the inspection object 1, a timing circuit 9 for driving the strobe light source 8, and an image recognition unit 10 for processing an image obtained by the image pickup camera 7. , The lens unit 7 of the imaging camera 7
It includes a focus mechanism provided in a, a lens control circuit 11 that controls an electric drive unit of the zoom mechanism, and a control unit 12 that integrally controls the image recognition unit 10, the lens control circuit 11, and the timing circuit 9. The image pickup camera 7 is provided with a drive unit (not shown) that is movable in the X and Y directions, and the position can be moved under the control of the control unit 12.

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

【0017】ここで上記オフセット量(a)で定める位
置にフォーカスを合わせているため正常な凹凸形状であ
る溝模様はフォーカスがぼけているため、ぼけて撮像さ
れた状態となり、逆に異物Xが存在する場合には異物X
に焦点があって鮮明に撮像されることになる。この画像
信号は画像認識部10に取り込まれる。画像認識部10
は取り込んだ画像を濃淡画像に変換し、更にこの濃淡画
像に所定の異物検出用の検査領域(ウィンドウ)を設定
し、この検査領域内を走査して微分値を求め、求めた微
分値と予め定めたしきい値とを比較し、微分値がしきい
値を越えた部位を異物として検出する。
Here, since the focus is on 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 out of focus, and conversely the foreign matter X is Foreign object X if present
The focus is on and the image is clearly captured. This image signal is taken into the image recognition unit 10. Image recognition unit 10
Converts the captured image into a grayscale image, sets a predetermined inspection area (window) for foreign matter detection in this grayscale image, scans the inside of the inspection area to obtain a differential value, and obtains the obtained differential value in advance. A predetermined threshold value is compared, and a portion 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, while the inspection object 1 is loaded on the inspection table, the foreign matter of the inspection object 1 facing the imaging camera 7 is detected. However, when the inspection object 1 has a constant thickness (T1), The following control is performed.

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

【0020】図2の例はカメラ位置が一定で被検査物1
の厚みが常に一定の場合であるが、カメラ位置が固定さ
れ且つ厚みT1が一定でない場合には、被検査物1と撮
像カメラ7まで距離が変わるので、図2で示すように
一定距離だけフォーカスを上方移動させるだけではオフ
セット量aが一定とならない。
In the example of FIG . 2, the object to be inspected 1 has a fixed camera position .
Is always constant, but when the camera position is fixed and the thickness T1 is not constant, the distance L between the inspection object 1 and the imaging camera 7 changes, so as shown in FIG. The offset amount a is not constant only by moving the focus upward.

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

【0022】[0022]

【0023】ここで被検査物1の厚みT1を求める方法
としては、異物検査を行うための撮像の前に、図4
(a)に示すようにストロボ光源8で斜光照明し、その
照明によりできる被検査物1の影の長さsを撮像して得
られた濃淡画像より求め、この長さとストロボ光源8の
傾き角度θよりT1=s・tanθの式で求める。この
求めた厚みT1と固定された撮像カメラ位置とに基づい
て撮像カメラ1から被検査物1までの距離Lが求まり、
この距離Lから予め定めたオフセット量a分だけ上方へ
フォーカスを移動させるのである。
Here, a method for obtaining the thickness T1 of the inspection object 1
As an example, as shown in FIG.
As shown in (a), the strobe light source 8 obliquely illuminates, and the length s of the shadow of the inspection object 1 obtained by the illumination is obtained from a grayscale image obtained, and this length and the tilt angle of the strobe light source 8 are obtained. From T, it is calculated by the equation T1 = s · tan θ. this
Based on the obtained thickness T1 and the fixed position of the imaging camera
And the distance L from the image pickup camera 1 to the inspection object 1 is obtained,
The focus is moved upward from this distance 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, it is possible to secure a constant offset amount a even with the thin inspection object 1 shown in FIG. 3 (b) as compared with the inspection object 1 in FIG. 3 (a). According to the method shown in FIG. 3, even when the thickness T1 of the inspection object 1 changes as shown in FIG. for,
It is possible to capture an image that is out of focus with the normal uneven shape (groove pattern). By the way, the thickness (height) T1 of the object to be detected 1 and the object to be inspected 1 and the image pickup camera 7 are also measured by the above-described method not only when the thickness of the object to be inspected 1 changes but also when the stacking height is not constant due to foreign matter. Is calculated, and the distance L between the imaging camera 7 and the inspection 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 as described above , and only the obtained offset amount a is obtained. The focus may be moved upward.

【0025】上述のような方法によれば、被検査物1の
高さが一定でない場合や、異物混入等の原因で積載高さ
が変化する場合にも計算式により適切なオフセット量a
を求めることができる。一方、被検査物1の異物Xの厚
みが限定されている場合、異物検出後、異物Xの大きさ
や外形、高さ等の形状と素材や種類等の状態を識別する
ために、被検査物1上に異物Xを検出した後、図5に示
すように撮像カメラ7のオフセット量aに対応させてフ
ォーカスを設定していた状態から、異物Xの上面にフォ
ーカスを設定する。この場合フォーカス設定距離Laを
オフセット量a、異物Xの厚み、被検査物1までの距離
Lから求める。
According to the above method, even when the height of the object 1 to be inspected is not constant or when the stacking height changes due to the inclusion of foreign matter, the appropriate offset amount a
Can be asked. On the other hand, when the thickness of the foreign matter X of the inspected object 1 is limited, in order to identify the shape such as the size, outer shape, and height of the foreign matter X and the state of the material, the type, etc. after the foreign matter is detected, After the foreign substance X is detected on the surface 1, the focus is set on the upper surface of the foreign substance 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 focusing on the foreign matter X and picking up an image, the size and shape of the foreign matter X can be recognized and the surface condition of the foreign matter X can be grasped, and analysis of the cause of the foreign matter X can be performed. If the foreign matter X is magnified and imaged, it is possible to accurately identify the shape of the foreign matter X, the shape such as the outer shape, the height, and the state of the material type. Therefore, based on the detection information of the post-foreign matter detection image recognition unit 10, the imaging camera 7 is moved from the position (center of the imaging screen) of FIG. 6A to the position of FIG. 6B under the control of the control unit 12. The foreign matter X is moved to above the foreign matter X and the zoom mechanism of the lens portion 7a is operated to move the foreign matter X.
It is better to take an enlarged image of.

【0027】さて上記の異物Xの検出のために撮像カメ
ラ7で撮像した画像に異物検査領域(ウインドウ)を設
定するのであるが、積載された被検査物1を順次検査す
る場合、積載位置によって撮像カメラ7と被検査物1と
の距離が変化し、同一画角で被検査物1を撮像した場
合、撮像カメラ7で撮像した画像の大きさが被検査物1
の位置により変化することになる。
The foreign substance inspection area (window) is set in the image picked up by the image pickup camera 7 in order to detect the foreign substance X described above. However, in the case of sequentially inspecting the loaded inspected 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 the inspection object 1
It 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, a region is set in advance, and by this region setting, a foreign substance inspection region for the object 1 to be inspected which is actually the inspection object is secured.
Even if the size of the image of the object to be inspected 1 changes depending on the loading position, the foreign matter inspection area can always cover the entire object to be inspected 1. That is, as shown in FIG. 7, in 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 by the differential processing to calculate the X and Y coordinates for determining the inspection area. Here, the inspection area is divided into four areas so that the largest image is divided into four.
Areas W 1 to W 4 are set, and (X1 , Y1 , X2 , Y2 ) Of the coordinates of X1
, Y1 The inspection areas W 1 and W 2 are determined by
Two , Y2 The inspection areas W 3 and W 4 are set by.

【0029】この設定後、実際の検査に際しては被検査
物1の撮像して得られた画像を画像認識部10で濃淡画
像に変換し、該濃淡画像を微分処理することにより当該
被検査物1の外形エッジの座標(X1 ,Y1 ,X2
,Y2 )を算出し、この算出された座標に基づいて
上記設定された検査領域W1 〜W4 を外形エッジに外の
2辺を沿わせる形で当該被検査物1の画像内に設定す
る。
After this setting, in the actual inspection, the image obtained by picking up the inspected object 1 is converted into a grayscale image by the image recognition section 10, and the grayscale image is differentiated to differentiate the grayscale image. Coordinates of the outer edge of (X1 , Y1 , X2
, Y2 ) Is calculated, and the inspection areas W 1 to W 4 set as described above are set in the image of the object 1 to be inspected in such a manner that the outer two sides are arranged along the outer edge based on the calculated coordinates.

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

【0031】この場合撮像された画像の大きさで検査領
域W1 〜W4 が図8(a)又は(b)に示すように重複
することになり、重複部分の大きさは変化するが、異物
検出のための検査領域は被検査物1の画像の大きさが図
8(b)のように小さくなっても被検査物1の上面全体
をカバーすることができることになる。ところで被検査
物1を積載するため、その積載がずれることがある。そ
こで積載ずれを検出するために本実施形態では、一つ前
の被検査物1の画像に対して設定したエッジ検出位置を
基準にして今回の被検査物1のエッジ検出領域を設定し
て、エッジ検出ができるか否かを判定して積載ずれを検
出するようになっている。
In this case, the inspection areas W 1 to W 4 are overlapped as shown in FIG. 8A or 8B depending on the size of the picked-up image, and the size of the overlapped portion changes, The inspection area for detecting a 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 becomes small as shown in FIG. 8B. By the way, since the inspection object 1 is loaded, the loading may deviate. Therefore, in order to detect the stacking deviation, in the present embodiment, the edge detection area of the inspected object 1 at this time is set based on the edge detection position set for the image of the immediately preceding inspected object 1, The stack deviation is detected by determining whether the edge can be detected.

【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. 9, an image of the inspection object 1 is picked up.
And the outer shape of the image of another object under inspection 1
The edge detection position is shown as reference coordinates, for example, in FIG.
X1 Edge inspection area with a width of ± M pixels based on
Set Wa to the current image as shown in Fig. 10 (b).
Set. Differentiate the grayscale image in the edge inspection area Wa.
It is determined whether or not the outer shape edge can be detected. Figure 1
0 (b) this time X2 The outer edge coordinates are
Since it exists in the inspection area Wa, the
It is not impossible to get out, and the edge inspection area W of the next inspection object 1
X2 as the reference coordinate for setting a Register
After the end of the object detection process, the inspection of all inspected objects 1 is completed.
If not completed, the above processing is performed again. Also above
When the external edge cannot be detected in the edge inspection area Wa
If it is determined that the stacking deviation amount of the inspection object 1 is M pixels or more,
It

【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を登録する。
In the case of FIGS. 9 and 10, the edge detection area Wa is set with reference to the edge detection coordinates of the immediately preceding inspection object 1 as the reference. When the area Wa is fixed and the object to be inspected 1 is imaged as shown in FIG. 12A, the edge detection area Wa is set to perform edge detection. When the edge detection is successful, the next object to be inspected is detected. The position coordinates Xn, Yn of the outer edge are registered to detect the foreign matter of the object 1, and if the edge cannot be detected, the position coordinates Xn-1 of the outer edge registered at the time of the inspection of the previous object 1 to be inspected, Based on Yn-1
As shown in FIG. 12B, the foreign matter detection is performed using the inspection area for foreign matter detection, and the position coordinate Xn− of the outer edge is detected for the next foreign matter detection of the inspection object 1.
Register 1, Yn-1.

【0034】このような方法を用いれば、検査画像にお
いて被検査物1の位置決定のためのエッジ検出がエッジ
検出領域Waに異物Xが存在する等の理由からできない
場合でも、前の被検査物1の画像のエッジ検出位置のデ
ータを用いて異物検査用の検査領域を設定することによ
り、異物検出を行うことができる。ところで上記の方法
では2回目以降の外形エッジ検出位置や位置座標を用い
るが、1回目についてはエッジ検出領域を絶対位置で設
定して処理を行う。
By using such a method, even when 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, the previous inspection object is detected. The foreign substance can be detected by setting the inspection area for the foreign substance inspection using the edge detection position data of the image No. 1. 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 edge detection area is set at the absolute position and the processing is performed.

【0035】(参考例) 上記の実施形態1の場合では、被検査物1の表面に水、
油による光沢面が存在する場合、異物Xが存在する面と
の間で識別ができず、異物のみを検出することができな
い場合がある。そこで図13に示すように被検査物1の
上面に正対する連続発光する光源(勿論ストロボ光源で
も良い)13を設置し、次の方法により異物Xのみを抽
出するようにした。
( Reference Example ) In the case of the above-described first embodiment, the surface of the inspection object 1 is covered with water,
When there is a glossy surface due to oil, it may not be possible to distinguish it from the surface on which the foreign matter X is present, and it may not be possible to detect only the foreign matter. Wherein the light source (or of course strobe light source) which directly faces continuous emission to the upper surface of the specimen 1 as shown in FIG. 13 13 set up, and to extract only the foreign substance X in the following manner.

【0036】次に本参考例について説明する。先ず本
考例では異物検出のための撮像を行う前に、制御部12
の制御の下でタイミング回路9を通じて撮像カメラ7の
レンズ部7aを制御してフォーカスを被検査物1の表面
に合わせ且つストロボ光源8により斜光照明した状態で
被検査物1上面を撮像カメラ7により撮像し、画像認識
部10では撮像した画像から濃淡画像を得て該濃淡画像
を演算処理することにより被検査物1の上面と撮像カメ
ラ7迄の距離Lを求める。この後距離Laから予め定め
たオフセット量aだけフォーカスを上方へ移動させる。
Next, this reference example will be described. First, ginseng
In the consideration example , the control unit 12 is set before the image capturing for detecting the foreign matter is performed.
Under the control of the above, the lens portion 7a of the image pickup camera 7 is controlled through the timing circuit 9 so that the focus is adjusted to the surface of the object to be inspected 1 and the upper surface of the object to be inspected 1 is taken up by the image pickup camera 7 while being obliquely illuminated by the strobe light source 8. An image is picked up, and the image recognition unit 10 obtains a grayscale image from the picked-up image and arithmetically processes the grayscale image to obtain a distance L between the upper surface of the inspection object 1 and the image pickup camera 7. Thereafter, the focus is moved upward from the distance La by a predetermined offset amount a.

【0037】この後、タイミング回路9を制御してスト
ロボ光源8により斜光照明を行い、この斜光照明下で撮
像カメラ7により被検査物1の上面全体の画像を撮像す
る。この場合被検査物1の上面に異物Xが存在する場合
の面の明度は暗くなる。また光沢面Yが図13に示すよ
うに存在する場合も明度は暗くなる。従ってこの画像を
用いて異物検出を行う場合、光沢面Yとの識別ができな
い。
After that, the timing circuit 9 is controlled to perform oblique light illumination by the strobe light source 8, and the image pickup camera 7 captures an image of the entire upper surface of the inspection object 1 under the oblique light 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. Further, when the glossy surface Y exists as shown in FIG. 13, the lightness also becomes dark. Therefore, when foreign matter is detected 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 the image pickup by the image pickup camera 7 is performed. In this case, the brightness of the surface on which the foreign matter X is present does not change,
The brightness of the glossy surface Y becomes brighter. Therefore, the surface on which the foreign matter X is present and the glossy surface Y are identified from the image data obtained by previously capturing the image under the oblique illumination and the image data obtained by capturing the image under the facing illumination this time. As a result, when comparing the differential value of the grayscale image and the threshold value, the foreign material X can be detected with high accuracy without erroneously detecting the glossy surface Y as the foreign material X.

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

【0040】[0040]

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

【0041】[0041]

【0042】[0042]

【0043】[0043]

【0044】[0044]

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

【0046】[0046]

【0047】[0047]

【図面の簡単な説明】[Brief description of 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 determination method of the above.

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

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

【図5】同上の異物認識のためのフォーカス制御の説明
図である。
FIG. 5 is an explanatory diagram of focus control for recognizing a foreign matter in the above.

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

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

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

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

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

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

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

【図13】参考例を用いた装置の概略構成図である。FIG. 13 is a schematic configuration diagram of an apparatus using a reference example .

【図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 異物 1 Inspected 7 Imaging camera 7a lens part 8 Strobe light source 9 Timing circuit 10 Image recognition unit 11 Lens control circuit 12 Control unit X foreign body

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平8−240535(JP,A) 特開 平3−261807(JP,A) 特開 平6−62407(JP,A) 特開 平2−10204(JP,A) (58)調査した分野(Int.Cl.7,DB名) G01N 21/84 - 21/94 G01B 11/30 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) Reference JP-A-8-240535 (JP, A) JP-A-3-261807 (JP, A) JP-A-6-62407 (JP, A) JP-A-2- 10204 (JP, A) (58) Fields surveyed (Int.Cl. 7 , DB name) G01N 21/84-21/94 G01B 11/30

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】被検査物の上面に正対するようにフォーカ
スレンズ付撮像カメラを配置するとともに、上面に凹凸
形状を有する被検査物に対して光源を斜め上方に設置
し、被検査物の上面に対して上方側へ一定距離オフセッ
トした点に撮像カメラのフォーカスを合わせるとともに
光源により被検査物に対して斜光照明を行って撮像カメ
ラで被検査物の上面を撮像し、該撮像された画像より濃
淡画像を得て該濃淡画像の微分値を求め、求めた微分値
と予め設定されたしきい値とを比較することにより上記
凹凸形状ではない異物を検出することを特徴とする異物
検出方法。
1. An upper surface of an object to be inspected, wherein an imaging camera with a focus lens is arranged so as to face the upper surface of the object to be inspected, and a light source is installed obliquely above the object to be inspected having an uneven shape. The image pickup camera is focused on a point offset by a certain distance to the upper side, and the light source illuminates the object to be inspected obliquely, and the image pickup camera images the upper surface of the object to be inspected. A foreign matter detecting method, characterized in that a grayscale image is obtained, a differential value of the grayscale image is obtained, and the obtained differential value is compared with a preset threshold value to detect the foreign matter having no uneven shape.
【請求項2】1乃至複数の被検査物が積載され、撮像カ
メラと正対する被検査物に対する検査を行う際に、積載
高が夫々の被検査物により異なる場合、被検査物上面と
撮像カメラとの間の距離を求めるための撮像後、撮像し
た画像より得た濃淡画像から被検査物の外形エッジから
延びる影の長さを求め、該影の長さとと斜光照明の角度
から被検査物の高さを算出した後、該高さと、前記距離
と、フォーカスレンズの焦点距離及び有効径とを関数と
して被検査物の上面に対して上方側へオフセットする距
離を決定することを特徴とする請求項1記載の異物検出
2. One or a plurality of objects to be inspected are loaded and an imaging camera is mounted.
Loading when inspecting the object to be inspected facing the camera
If the height is different for each inspected object,
After imaging to find the distance to the imaging camera,
From the grayscale image obtained from the image
Find the length of the shadow that extends and the angle of the oblique illumination with the length of the shadow
After calculating the height of the inspected object from the
And the focal length and effective diameter of the focus lens as a function
The distance to offset the upper surface of the object to be inspected.
Foreign matter detection <br/> how according to claim 1, wherein the determining the release.
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 JPH11101750A (en) 1999-04-13
JP3427248B2 true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4755040B2 (en) * 2006-07-25 2011-08-24 株式会社神戸製鋼所 Scratch inspection device, scratch inspection method
JP5966277B2 (en) * 2011-08-19 2016-08-10 大日本印刷株式会社 Barcode appearance inspection system, barcode appearance inspection method, image processing apparatus
KR101642047B1 (en) * 2015-04-02 2016-07-22 무진기공주식회사 Apparatus and method for measuring plastic strain of mold products
JP6229789B2 (en) * 2016-12-27 2017-11-15 株式会社東京精密 Edge detection device
JP6283971B2 (en) * 2016-12-27 2018-02-28 株式会社東京精密 Edge detection device
CN110987970A (en) * 2019-10-26 2020-04-10 惠州高视科技有限公司 Object surface defect detection system and detection method

Also Published As

Publication number Publication date
JPH11101750A (en) 1999-04-13

Similar Documents

Publication Publication Date Title
JP3312849B2 (en) Defect detection method for object surface
KR20160108644A (en) Device for detecting defect of device
JP2000193601A (en) Surface defect inspecting device
JP3427248B2 (en) Foreign object detection method
JPH08145906A (en) Method and equipment for inspection of defect of surface to be inspected
JP2002107126A (en) Apparatus and method for inspecting substrate
JP2007017283A (en) Method and apparatus for visual inspection
JP2001056297A (en) Surface inspection method and device therefor
JP2001021332A (en) Surface inspecting device and its method
JP2003156451A (en) Defect detecting device
JP4062100B2 (en) Shape measuring device
JP2004191070A (en) Coated surface inspection apparatus
JPH1010053A (en) Inspection device for surface defect
JPH1114323A (en) Pattern inspection method and pattern inspection device
JP3454162B2 (en) Inspection system for flat plate with holes
JP3203607B2 (en) Screen defect detection device
JPH0815177A (en) Method and apparatus for imaging surface defect
JPH08219740A (en) Method and equipment for inspecting semiconductor device
JP2596158B2 (en) Component recognition device
JPH08159712A (en) Pattern recognition method
JP3160838B2 (en) Surface defect inspection equipment
JP2012078143A (en) Foreign matter inspection device and alignment adjustment method
JP3402994B2 (en) Solder paste quality judgment method
JPH0781962B2 (en) Foreign object detection method
JPH0982739A (en) Inspecting device of bonding wire

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