JPH0789054B2 - Product defect inspection method and equipment - Google Patents

Product defect inspection method and equipment

Info

Publication number
JPH0789054B2
JPH0789054B2 JP5065934A JP6593493A JPH0789054B2 JP H0789054 B2 JPH0789054 B2 JP H0789054B2 JP 5065934 A JP5065934 A JP 5065934A JP 6593493 A JP6593493 A JP 6593493A JP H0789054 B2 JPH0789054 B2 JP H0789054B2
Authority
JP
Japan
Prior art keywords
pixel
defect
pixels
processing
gradation value
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
JP5065934A
Other languages
Japanese (ja)
Other versions
JPH06258057A (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.)
Toyo Glass Co Ltd
Original Assignee
Toyo Glass Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyo Glass Co Ltd filed Critical Toyo Glass Co Ltd
Priority to JP5065934A priority Critical patent/JPH0789054B2/en
Publication of JPH06258057A publication Critical patent/JPH06258057A/en
Publication of JPH0789054B2 publication Critical patent/JPH0789054B2/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 method and apparatus for inspecting a product for defects using image processing technology.

【0002】[0002]

【従来の技術】日本工業出版株式会社発行『画像ラボ』
1990年11月号第56〜63頁には、検査対象の製
品をCCDカメラで撮影して1画面につき例えば水平方
向512画素、垂直方向448画素の分解能で1画素当
たり例えば256階調の濃淡値として画像メモリに記憶
した後、その記憶画像を濃淡の膨張と収縮という濃淡モ
フォロジー手法で画像処理することによって製品の良否
検査を行う方法が開示されている。
[Prior Art] Published by Nippon Kogyo Publishing Co., Ltd. "Image Lab"
In the November 1990 issue, pp. 56-63, the product to be inspected is photographed by a CCD camera, and the grayscale value of, for example, 256 gradations per pixel with a resolution of, for example, 512 pixels in the horizontal direction and 448 pixels in the vertical direction. As a method, the quality of a product is inspected by storing the image in an image memory and then image-processing the stored image by a density morphology method of expansion and contraction of density.

【0003】この方法のアルゴリズムを要約すると、次
の(1)から(5)の手順で構成される。 (1)画像メモリに記憶された1画面の原画像データに
ついて、縦横所定画素数の判定画素領域ごとにその中の
最大の階調値(最も明るい階調値)を求め、当該判定画
素領域中の各画素の階調値をその求めた最大階調値に置
換することを、判定画素領域を順次移行させながら全画
素について行う膨張処理。この処理により、周囲より明
るい画素が膨張する一方、暗い画素が収縮する。 (2)その影収縮処理後の画像データについて、上記判
定画素領域中で最も小さい階調値を求め、当該判定画素
領域中の各画素の階調値をその求めた最小階調値に置換
することを、判定画素領域を順次移行させながら全画素
について行う収縮処理。この処理では、上記(1)の処
理とは逆に、周囲より暗い画素が膨張する一方、明るい
画素が収縮する。 (3)上記(2)処理後の画像データと画像メモリに記
憶された原画像データとの階調差を各画素ごとに算出す
る差分処理。 (4)その差分処理後の各画素データを2値化して各画
素ごとに欠点の有無を判定する2値化処理。 (5)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする欠陥
判定処理。
The algorithm of this method is summarized as follows (1) to (5). (1) For the original image data of one screen stored in the image memory, the maximum gradation value (the brightest gradation value) of the predetermined number of pixels in the vertical and horizontal directions is determined, The expansion process of replacing the gradation value of each pixel with the obtained maximum gradation value for all pixels while sequentially shifting the determination pixel area. By this process, pixels that are brighter than the surroundings expand, while pixels that are darker expand. (2) Regarding the image data after the shadow contraction processing, the smallest gradation value in the judgment pixel area is calculated, and the gradation value of each pixel in the judgment pixel area is replaced with the calculated minimum gradation value. This is a contraction process that is performed for all pixels while sequentially shifting the determination pixel area. In this process, contrary to the above process (1), pixels darker than the surroundings expand while bright pixels contract. (3) Difference processing for calculating the gradation difference between the image data after the above (2) processing and the original image data stored in the image memory for each pixel. (4) Binarization processing in which each pixel data after the difference processing is binarized to determine the presence or absence of a defect for each pixel. (5) Defect determination processing in which the number of pixels that have been regarded as defects in the binarization processing is counted, and when the number of pixels is equal to or greater than a certain value, it is determined that there is a defect.

【0004】[0004]

【発明が解決しようとする課題】しかし、この方法は、
そもそも明るい画像内部に存在する小さい暗い欠点部
分、及び逆に暗い画像内部に存在する小さい明るい欠点
部分を、原画像パターンを崩さずに除去することを意図
して提案されたものであるため、製品に例えば大きな凹
凸模様が形成されているような場合、その模様の凹部中
又は凸部中に存在する比較的小さい暗い又は明るい欠点
(例えば、光に対する屈折性又は遮光性をもった異物)
については検出できるものの、大きな欠点については凹
凸模様との識別が困難であるため検出不可能である。
However, this method is
Since it was proposed with the intention of removing the small dark defect portion existing inside the bright image and the small bright defect portion existing inside the dark image in the first place without destroying the original image pattern, the product For example, when a large concave-convex pattern is formed, a relatively small dark or bright defect existing in the concave or convex portion of the pattern (for example, a foreign substance having a refractive or light-shielding property against light)
Can be detected, but a large defect cannot be detected because it is difficult to distinguish from a concavo-convex pattern.

【0005】本発明の第1の目的は、例えば大きな凹凸
模様が形成されているような製品において、その凹部中
又は凸部中に存在する大きな欠点であっても簡単な画像
処理手法で高速にしかも的確かつ容易に検出できるよう
にすることにある。本発明の第2の目的は、凹部中又は
凸部中に存在する比較的小さい欠点も検出できるように
することにある。
A first object of the present invention is, for example, in a product having a large concave-convex pattern formed, even if there is a large defect existing in the concave portion or the convex portion of the product, it can be quickly processed by a simple image processing method. Moreover, it is to enable accurate and easy detection. A second object of the present invention is to be able to detect even relatively small defects present in recesses or protrusions.

【0006】[0006]

【課題を解決するための手段】上記第1の目的を達成す
るため、本発明による欠陥検査方法は、投光器からの光
を製品に照射してその透過光又は反射光をイメージセン
サで受光し、該イメージセンサからの各画素の階調値を
画像メモリに記憶した後、次の手順で画像解析処理を行
う。 (1)画像メモリに記憶された1画面の原画像データに
ついて、縦横(垂直方向及び水平方向)所定画素数の大
判定画素領域Mごとにその中の最大の階調値を求め、当
該大判定画素領域M中の各画素の階調値をその求めた最
大階調値に置換することを、大判定画素領域Mを順次移
行させながら全画素について行う影収縮処理。 (2)その影収縮処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する差分処理。 (3)その差分処理後の画素データについて、前記大判
定画素領域Mの画素数より少ない縦横所定画素数の小判
定画素領域Nごとにその中の各画素の階調値を平均化
調値に置換することを、小判定画素領域Nを順次移行さ
せながら全画素について行うスムージング処理。 (4)そのスムージング処理後の各画素データを2値化
して各画素ごとに欠点の有無を判定する2値化処理。 (5)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする欠陥
判定処理。
In order to achieve the above first object, the defect inspection method according to the present invention irradiates a product with light from a light projector and receives transmitted light or reflected light with an image sensor, After storing the gradation value of each pixel from the image sensor in the image memory, the image analysis process is performed in the following procedure. (1) For the original image data of one screen stored in the image memory, the maximum gradation value in each of the large determination pixel regions M having a predetermined number of vertical and horizontal (vertical and horizontal directions) pixels is calculated, and the large determination is made. A shadow contraction process that replaces the gradation value of each pixel in the pixel area M with the obtained maximum gradation value for all pixels while sequentially shifting the large determination pixel area M. (2) Difference processing for calculating the gradation difference between the image data after the shadow contraction processing and the original image data stored in the image memory for each pixel. (3) For the pixel data after the difference processing, the gradation value of each pixel in each small judgment pixel area N having a predetermined number of vertical and horizontal pixels smaller than the number of pixels in the large judgment pixel area M is averaged gradation value. The smoothing process for replacing all the pixels by sequentially shifting the small determination pixel region N. (4) Binarization processing in which each pixel data after the smoothing processing is binarized to determine the presence or absence of a defect for each pixel. (5) Defect determination processing in which the number of pixels that have been regarded as defects in the binarization processing is counted, and when the number of pixels is equal to or greater than a certain value, it is determined that there is a defect.

【0007】また、第2の目的を達成するため、次の手
順で画像解析処理を行う。 (1)画像メモリに記憶された1画面の原画像データに
ついて、縦横所定画素数の大判定画素領域Mごとにその
中の最大の階調値を求め、当該大判定画素領域M中の各
画素の階調値をその求めた最大階調値に置換すること
を、大判定画素領域Mを順次移行させながら全画素につ
いて行う影収縮処理。 (2)その影収縮処理後の画像データについて、大判定
画素領域M中で最も小さい階調値を求め、当該大判定画
素領域M中の各画素の階調値をその求めた最小階調値に
置換することを、大判定画素領域Mを順次移行させなが
ら全画素について行う影膨張処理。 (3)その影膨張処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する第1の差分処理と、 (4)その差分処理後の各画素データを2値化して各画
素ごとに欠点の有無を判定する第1の2値化処理。 (5)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする第1
の欠陥判定処理。 (6)前記影収縮処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する第2の差分処理。 (7)その差分処理後の画素データについて、前記大判
定画素領域Mの画素数より少ない縦横所定画素数の小判
定画素領域Nごとにその中の中間の階調値を求め、当該
小判定画素領域N中の各画素の階調値をその求めた中間
階調値に置換することを、小判定画素領域Nを順次移行
させながら全画素について行うスムージング処理。 (8)そのスムージング処理後の各画素データを2値化
して各画素ごとに欠点の有無を判定する第2の2値化処
理。 (9)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする第2
の欠陥判定処理。
Further, in order to achieve the second object, the image analysis processing is performed in the following procedure. (1) For the original image data of one screen stored in the image memory, the maximum gradation value is determined for each large determination pixel area M having a predetermined number of vertical and horizontal pixels, and each pixel in the large determination pixel area M is determined. The shadow contraction processing is performed for all the pixels while sequentially shifting the large determination pixel region M to replace the gradation value of 1 with the calculated maximum gradation value. (2) For the image data after the shadow contraction processing, the smallest gradation value in the large determination pixel area M is calculated, and the gradation value of each pixel in the large determination pixel area M is calculated as the minimum gradation value. The shadow dilation processing is performed for all pixels while sequentially shifting the large determination pixel area M. (3) First difference processing for calculating a gradation difference between the image data after the shadow expansion processing and the original image data stored in the image memory for each pixel, (4) Each after the difference processing A first binarization process for binarizing pixel data and determining the presence or absence of a defect for each pixel. (5) Counting the number of defective pixels in the binarization process, and determining that there is a defect when the number of pixels is a certain value or more.
Defect determination processing. (6) A second difference process for calculating, for each pixel, a gradation difference between the image data after the shadow contraction process and the original image data stored in the image memory. (7) For the pixel data after the difference processing, an intermediate gradation value is obtained for each of the small determination pixel areas N having a predetermined number of vertical and horizontal pixels smaller than the number of pixels of the large determination pixel area M, and the small determination pixel A smoothing process for replacing the gradation value of each pixel in the area N with the obtained intermediate gradation value for all pixels while sequentially moving the small determination pixel area N. (8) A second binarization process in which each pixel data after the smoothing process is binarized to determine the presence or absence of a defect for each pixel. (9) Counting the number of pixels that are regarded as defects in the binarization process, and determining that there is a defect when the number of pixels is a certain value or more.
Defect determination processing.

【0008】前記第1及び第2の2値化処理は、1画面
中の一定の検査範囲についてのみ実施すれば良い。
The first and second binarization processes may be carried out only for a fixed inspection range within one screen.

【0009】本発明による欠陥検査装置は、投光器から
の光を製品に照射してその透過光又は反射光をイメージ
センサで受光し、該イメージセンサからの各画素の階調
値を画像メモリに記憶した後、コンピュータを利用した
次の手段によって画像解析処理を行う。 (1)画像メモリに記憶された1画面の原画像データに
ついて、縦横所定画素数の大判定画素領域Mごとにその
中の最大の階調値を求め、当該大判定画素領域M中の各
画素の階調値をその求めた最大階調値に置換すること
を、大判定画素領域Mを順次移行させながら全画素につ
いて行う影収縮処理手段。 (2)その影収縮処理後の画像データについて、大判定
画素領域M中で最も小さい階調値を求め、当該大判定画
素領域M中の各画素の階調値をその求めた最大階調値に
置換することを、大判定画素領域Mを順次移行させなが
ら全画素について行う影膨張処理手段。 (3)その影膨張処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する第1の差分処理手段。 (4)その差分処理後の各画素データを2値化して各画
素ごとに欠点の有無を判定する第1の2値化処理手段。 (5)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする第1
の欠陥判定処理手段。 (6)前記影収縮処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する第2の差分処理手段。 (7)その差分処理後の画素データについて、前記大判
定画素領域Mの画素数より少ない縦横所定画素数の小判
定画素領域Nごとにその中の各画素の階調値を平均化
調値に置換することを、小判定画素領域Nを順次移行さ
せながら全画素について行うスムージング処理手段。 (8)そのスムージング処理後の各画素データを2値化
して各画素ごとに欠点の有無を判定する第2の2値化処
理手段。 (9)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする第2
の欠陥判定処理手段。 (10)前記第1及び第2の欠陥判定処理手段の一方で
も欠陥有りと判定したとき製品を排除するための信号を
出力する排除信号出力手段。
In the defect inspection apparatus according to the present invention, the product is irradiated with the light from the projector, the transmitted light or the reflected light is received by the image sensor, and the gradation value of each pixel from the image sensor is stored in the image memory. After that, image analysis processing is performed by the following means using a computer. (1) For the original image data of one screen stored in the image memory, the maximum gradation value is determined for each large determination pixel area M having a predetermined number of vertical and horizontal pixels, and each pixel in the large determination pixel area M is determined. A shadow contraction processing unit that replaces the gradation value of the above with the obtained maximum gradation value for all pixels while sequentially shifting the large determination pixel region M. (2) For the image data after the shadow contraction processing, the smallest gradation value in the large determination pixel area M is calculated, and the gradation value of each pixel in the large determination pixel area M is calculated as the maximum gradation value. A shadow expansion processing unit that performs the replacement for all the pixels while sequentially shifting the large determination pixel region M. (3) First difference processing means for calculating, for each pixel, a gradation difference between the image data after the shadow expansion processing and the original image data stored in the image memory. (4) First binarization processing means for binarizing each pixel data after the difference processing and determining the presence or absence of a defect for each pixel. (5) Counting the number of defective pixels in the binarization process, and determining that there is a defect when the number of pixels is a certain value or more.
Defect determination processing means. (6) Second difference processing means for calculating, for each pixel, a gradation difference between the image data after the shadow contraction processing and the original image data stored in the image memory. (7) For the pixel data after the difference processing, the gradation value of each pixel in each of the small judgment pixel areas N having a predetermined number of vertical and horizontal pixels smaller than the number of pixels in the large judgment pixel area M is averaged gradation value. Smoothing processing means for performing replacement of all the pixels while sequentially shifting the small determination pixel region N. (8) Second binarization processing means for binarizing each pixel data after the smoothing processing and determining the presence or absence of a defect for each pixel. (9) Counting the number of pixels that are regarded as defects in the binarization process, and determining that there is a defect when the number of pixels is a certain value or more.
Defect determination processing means. (10) Exclusion signal output means for outputting a signal for excluding a product when one of the first and second defect determination processing means determines that there is a defect.

【0010】[0010]

【作用】今、影による階調値の大小を濃淡として説明す
ると、原画像データを影収縮処理した後、影膨張処理
し、その影膨張処理画像データを原画像データと差分処
理すると、模様による淡い影、及び濃淡が濃くしかも大
きい欠点による影は消失するが、濃い小さい欠点による
影、及び比較的淡いが模様による影よりは濃い小さい欠
点による影は残り、その後の2値化処理によって欠点と
して検出される。
Now, when the gradation value due to the shadow is described as the shade of light and shade, the original image data is subjected to the shadow contraction process, then the shadow expansion process is performed, and the shadow expansion process image data is subjected to the difference process with the original image data. The light shadow and the shadow due to the large and large defects disappear, but the shadow due to the small dark defect and the shadow due to the relatively light and small defect smaller than the pattern-like shadow remain, and as a defect due to the subsequent binarization processing. To be detected.

【0011】原画像データを影収縮処理した後、その影
収縮処理画像データを原画像データと差分処理すると、
模様による淡い影は中央部が消失して周辺部が残り、こ
れをスムージング処理すると更に薄くなるため、その後
の2値化処理により欠点として誤検出されることはな
い。これに対して、濃淡が濃くしかも大きい欠点による
影は、差分処理により同様に中央部が消失して周辺部が
残り、これをスムージング処理するとやや薄くなるもの
の、まだ十分な濃さをもっているので、2値化処理によ
り欠点として検出される。また、濃くしかも小さい欠点
による影は、差分処理でもほぼそのまま残り、2値化処
理により欠点として検出される。
After the original image data is subjected to the shadow contraction processing, the shadow contraction processed image data is subjected to the difference processing from the original image data.
The light shadow due to the pattern disappears in the central part and remains in the peripheral part, and is further thinned by smoothing it, so that it will not be erroneously detected as a defect by the subsequent binarization process. On the other hand, the shadow due to the dark and large shade is likewise the central part disappears and the peripheral part remains due to the difference processing, and although it is slightly lightened by smoothing this, it still has sufficient darkness. It is detected as a defect by the binarization process. Further, the shadow due to the dark and small defect remains almost as it is in the difference processing and is detected as a defect by the binarization processing.

【0012】[0012]

【実施例】以下、本発明の実施例について詳述する。図
1は、透明ガラス容器1の底部の欠陥の有無を検査する
ために適用された本発明による欠陥検査装置の概要を示
す。この装置では、不透明なテーブル2の所定位置に検
査孔3が設けられ、この検査孔3内に、透明ガラス基板
4、その上に透光孔5を有する位置決めプレート6が重
ねて設置されており、検査対象の透明ガラス容器1はこ
の位置決めプレート6上に立てた状態で置かれる。この
ように透明ガラス容器1が検査位置にセットされたこと
は、図示しないセンサによって検知される。その透明ガ
ラス容器1に真上から拡散光を照射するため、光拡散板
7a を有する投光器7がスタンド8に下向きに支持され
ている。一方、検査孔3の下側にL形の鏡筒9が設置さ
れ、該鏡筒9内の直角に曲がった角部に反射鏡10、先
端部位に二次元イメージセンサ11を備えたCCDカメ
ラ12が配置されている。
EXAMPLES Examples of the present invention will be described in detail below. FIG. 1 shows an outline of a defect inspection apparatus according to the present invention applied for inspecting the bottom of a transparent glass container 1 for defects. In this device, an inspection hole 3 is provided at a predetermined position of an opaque table 2, and a transparent glass substrate 4 and a positioning plate 6 having a light transmitting hole 5 thereon are stacked in the inspection hole 3. The transparent glass container 1 to be inspected is placed on the positioning plate 6 in an upright state. The setting of the transparent glass container 1 at the inspection position in this way is detected by a sensor (not shown). In order to irradiate the transparent glass container 1 with diffused light from directly above, a projector 7 having a light diffusing plate 7a is supported downward on a stand 8. On the other hand, an L-shaped lens barrel 9 is installed below the inspection hole 3, and a CCD camera 12 having a reflecting mirror 10 at a corner bent at a right angle in the lens barrel 9 and a two-dimensional image sensor 11 at a tip portion thereof. Are arranged.

【0013】投光器7からの拡散光は、透明ガラス容器
1の内側からその底部1a の内面へ入光して外面へと透
過し、更に透光孔5から透明ガラス基板4をそのまま透
過して検査孔3の下方へと通り抜け、反射鏡10を直角
に反射してCCDカメラ12へ入光し、二次元イメージ
センサ11によって1フレーム当たり水平方向(横)に
X個(例えば750個)、垂直方向(縦)にY個(例え
ば500個)の画素に分解して撮像される。そして、そ
の画像データは、コンピュータによる画像解析処理装置
13内の画像メモリに各画素当たり例えば256階調値
にして記憶され、後述のように実時間で画像解析処理さ
れる。なお、本例では、透明ガラス容器1の製品として
の品質保証上問題となる主として0.5mm以上の欠陥
を検出することを意図していることから、光学系は1m
m当たり7画素の像倍率に設計されているものとする。
The diffused light from the projector 7 enters from the inside of the transparent glass container 1 to the inner surface of the bottom 1a thereof and is transmitted to the outer surface thereof, and further is transmitted through the transparent glass substrate 4 as it is from the light transmitting hole 5 for inspection. The light passes through below the hole 3, reflects at a right angle on the reflecting mirror 10 and enters the CCD camera 12, and the two-dimensional image sensor 11 makes X (for example, 750) in the horizontal direction (horizontal direction) per frame in the vertical direction. The image is decomposed (vertically) into Y (for example, 500) pixels. Then, the image data is stored in the image memory in the image analysis processing device 13 by the computer with, for example, 256 gradation values for each pixel, and is subjected to image analysis processing in real time as described later. In this example, since it is intended to mainly detect defects of 0.5 mm or more, which are problems in quality assurance as a product of the transparent glass container 1, the optical system has a length of 1 m.
The image magnification is assumed to be 7 pixels per m.

【0014】次に、本実施例において検査対象とする透
明ガラス容器1の一例について説明すると、図2にその
半断面、図3に底面を示す。このガラス容器1は、その
底部1a の外面に大きな凸部14を放射状に一体に設
け、凸部14と凸部14との間をV字形に深く窪んだ狭
い間隙凹部(ないし溝)15として、全体から見て花弁
形の大きな凹凸模様を形成している。各凸部14は、底
部外面中央の円形の中央凹部16から幅員を両側に徐々
に広くしかも高さも徐々に高くしながらいずれの部分も
半円形に盛り上がるように突出している。
Next, an example of the transparent glass container 1 to be inspected in this embodiment will be described. FIG. 2 shows a half section thereof, and FIG. 3 shows a bottom surface thereof. This glass container 1 has a large convex portion 14 radially integrally formed on the outer surface of the bottom portion 1a, and a narrow gap concave portion (or groove) 15 deeply depressed in a V shape between the convex portions 14 is formed. Large petal-shaped uneven patterns are formed when viewed from the whole. Each of the convex portions 14 projects from the circular central concave portion 16 at the center of the outer surface of the bottom so that each portion rises in a semicircular shape while gradually widening the width to both sides and gradually increasing the height.

【0015】透明ガラス容器1の底部1a には、このよ
うな大きな凹凸模様が形成されているため、投光器7か
らの光が底部1a を透過する際に特に凹凸の境目におい
て大きく屈折し、その凹凸模様がCCDカメラ12にそ
のまま影として撮像される。また、凸部14又は凹部1
5・16に屈折性又は反射性の欠陥、例えば、いわゆる
落粉やローディングマークや泡や水玉などの透明異物、
又は錆付や汚れやノロなどの不透明異物等があると、こ
れらの欠点も影として撮影されるため、画像解析処理装
置13による画像解析において凹凸模様による影である
か、欠点による影であるかの判別が困難となる。
Since the bottom portion 1a of the transparent glass container 1 is formed with such a large uneven pattern, when the light from the projector 7 is transmitted through the bottom portion 1a, it is largely refracted at the boundary of the unevenness, and the unevenness is caused. The pattern is directly captured by the CCD camera 12 as a shadow. In addition, the convex portion 14 or the concave portion 1
Refractive or reflective defects in 5 and 16, such as so-called falling powder, loading marks, transparent foreign substances such as bubbles and polka dots,
Alternatively, if there is rust, dirt, or an opaque foreign substance such as a slag, these defects are also photographed as shadows. Therefore, in the image analysis by the image analysis processing device 13, it is a shadow due to the uneven pattern or a shadow due to the defects. Is difficult to determine.

【0016】そこで、本発明者は、透明ガラス容器1の
底部1a の凹凸模様による影がCCDカメラ12の画像
中に現れないようにできないものか、またそれを完全に
消去できないとしても濃度を薄くできないものかと、試
験・研究を重ねた結果、次のようにすると極力現れない
ようにできることを見出した。
Therefore, the inventor of the present invention cannot prevent the shadow due to the uneven pattern of the bottom portion 1a of the transparent glass container 1 from appearing in the image of the CCD camera 12, or reduce the density even if it cannot be completely erased. As a result of repeated testing and research, I found that it is possible to prevent it from appearing as much as possible by the following.

【0017】 投光器7からの光は、透明ガラス容器
1の底部1a の外側からその外面へ入光させて内面へと
透過させるよりも、図1に示したように透明ガラス容器
1の内側から底部1a の内面へ入光させて外面へと透過
させた方が良い。これは、凹凸模様は底部1a の外面に
形成され、内面には凹凸がないため、内面を入光面とし
た方が凹凸模様による影が薄くなるからである。
Light from the projector 7 is transmitted from the inside of the transparent glass container 1 to the bottom thereof as shown in FIG. It is better to let light enter the inner surface of 1a and transmit it to the outer surface. This is because the concavo-convex pattern is formed on the outer surface of the bottom portion 1a and there is no concavity and convexity on the inner surface. Therefore, the shadow of the concavo-convex pattern becomes lighter when the inner surface is the light incident surface.

【0018】 凹凸模様による影の程度は、図4に示
すように主に凹部15・16から凸部14にかけての立
ち上がり角度θに依存する。図5はこの立ち上がり角度
θと光の相対透過率との関係を、屈折・反射に関するス
ネル・フレネルの計算式に基づきシュミレーションして
求めたグラフである。但し、投光器7と透明ガラス容器
1との位置関係は図1のとおりである。このグラフから
分かるように、立ち上がり角度θが60度付近を越えた
ところから相対透過率が急激に低下する。従って、立ち
上がり角度θを65度以下、好ましくは60度以下とす
れば、凹凸模様による影が出ないか、出たとしても薄い
ものにすることができる。
The degree of the shadow due to the uneven pattern mainly depends on the rising angle θ from the concave portions 15 and 16 to the convex portion 14 as shown in FIG. FIG. 5 is a graph obtained by simulating the relationship between the rising angle θ and the relative transmittance of light based on a Snell-Fresnel calculation formula regarding refraction / reflection. However, the positional relationship between the projector 7 and the transparent glass container 1 is as shown in FIG. As can be seen from this graph, the relative transmittance sharply decreases when the rising angle θ exceeds about 60 degrees. Therefore, when the rising angle θ is set to 65 degrees or less, preferably 60 degrees or less, a shadow due to the uneven pattern does not appear or even if it appears, it can be made thin.

【0019】そこで、透明ガラス容器1の底部1a の凹
凸模様は、間隙凹部15から凸部14への立ち上がり角
度も、また中央凹部16から凸部14への立ち上がり角
度も60度以下になるように製造時に成形されている。
Therefore, the concavo-convex pattern on the bottom 1a of the transparent glass container 1 should be such that the rising angle from the gap concave portion 15 to the convex portion 14 and the rising angle from the central concave portion 16 to the convex portion 14 are not more than 60 degrees. It is molded at the time of manufacture.

【0020】ところで、必ずこのような立ち上がり角度
になるように凸部14を成形することは、凹部の広さが
広い場合には比較的容易であるが、この透明ガラス容器
1の間隙凹部15のように狭い場合には難しく、金型に
よるガラス素材の引きつけや放熱条件の悪さなどの問題
から、本来ならば図6に示すような形状の間隙凹部15
となるべきところ、その一部に図7に示すように小さな
盛り上がり15a ができてしまい、これが撮像画像中に
明らかな影となって現れる。
By the way, it is relatively easy to mold the convex portion 14 so as to have such a rising angle, when the width of the concave portion is wide, but the gap concave portion 15 of the transparent glass container 1 is formed. In the case of such a narrow space, it is difficult, and due to problems such as the attraction of the glass material by the mold and poor heat dissipation conditions, the gap recess 15 originally shaped as shown in FIG.
However, a small bulge 15a is formed in a part thereof as shown in FIG. 7, and this appears as a clear shadow in the captured image.

【0021】そこで、本発明者は、この点についても試
験・研究を重ねた結果、金型の形状を工夫することによ
り上記の問題を解決できた。すなわち、図8に示すよう
に金型17において、間隙凹部15を成形する凸部18
の先端を円くした場合、小さな盛り上がり15a ができ
ることがあったが、図9に示すように凸部18の先端を
尖鋭にするとそれが無くなり、図6に示した目的形状ど
おりに成形できた。
Therefore, as a result of repeated testing and research on this point, the present inventor was able to solve the above problem by devising the shape of the mold. That is, as shown in FIG. 8, in the mold 17, the convex portion 18 for forming the gap concave portion 15 is formed.
When the tip of the ridge was rounded, a small bulge 15a was sometimes formed, but when the tip of the convex portion 18 was sharpened as shown in FIG. 9, it disappeared, and the target shape shown in FIG. 6 could be formed.

【0022】このように検査対象である透明ガラス容器
1そのものについても、その凹凸模様が影としてCCD
カメラ12に撮像されにくいように成形しておくと、画
像解析処理装置13での凹凸模様と欠点との識別が非常
に容易になり、欠点検出精度が向上する。
As described above, also in the transparent glass container 1 itself to be inspected, the uneven pattern is a shadow and the CCD
If the image analysis processing device 13 is formed so as not to be easily imaged by the camera 12, the unevenness pattern and the defect can be very easily identified in the image analysis processing device 13, and the defect detection accuracy is improved.

【0023】次に、画像解析処理装置13による画像解
析及び欠陥検査処理について説明する。図10はその処
理の概要を示す。画像解析処理装置13のコンピュータ
は、透明ガラス容器1が検査位置にセットされたことを
センサからの信号により確認すると(ステップS1)、
CCDカメラ12の撮影画像を取り込んで画像メモリに
記憶し(ステップS2)、該画像メモリに記憶されてい
る1フレームの画像データ(以下、これを原画像とい
う)について第1の画像解析処理(以下、これをT1処
理という)を行う(ステップS3)。このT1処理で
は、後述するように小さい欠点を検出し、各画素につい
てそれは欠点の画素か否か2値化する。そして、その欠
点とした画素数をカウントして所定個数以上か否か判断
し(ステップS4)、所定以上の場合には欠陥有りと判
定する(ステップS5)。
Next, the image analysis and defect inspection processing by the image analysis processing device 13 will be described. FIG. 10 shows an outline of the processing. When the computer of the image analysis processing device 13 confirms from the signal from the sensor that the transparent glass container 1 is set at the inspection position (step S1),
The captured image of the CCD camera 12 is captured and stored in the image memory (step S2), and the first image analysis process (hereinafter referred to as "original image") of one frame of image data stored in the image memory is performed. , Which is referred to as T1 processing) (step S3). In this T1 process, a small defect is detected as described later, and each pixel is binarized as to whether or not it is a defective pixel. Then, the number of pixels as the defect is counted and it is determined whether or not the number is equal to or more than a predetermined number (step S4). When the number is equal to or more than the predetermined number, it is determined that there is a defect (step S5).

【0024】次いで、原画像について第2の画像解析処
理(以下、これをT2処理という)を行う(ステップS
6)。このT2処理では、後述するように大きい欠点を
検出し、各画素についてそれは欠点の画素か否か2値化
する。そして、その欠点とした画素数をカウントして所
定個数以上か否か判断し(ステップS7)、所定以上の
場合には欠陥有りと判定する(ステップS8)。このス
テップS8及び上記ステップS5のいずれか一方でも、
欠陥有りの場合には当該透明ガラス容器1を排除するた
め排除信号を出力する(ステップS9)。
Next, a second image analysis process (hereinafter referred to as T2 process) is performed on the original image (step S).
6). In this T2 processing, a large defect is detected as described later, and each pixel is binarized as to whether or not it is a defective pixel. Then, the number of pixels as the defect is counted and it is determined whether or not the number is equal to or more than a predetermined number (step S7). When the number is equal to or more than the predetermined number, it is determined that there is a defect (step S8). In either of step S8 and step S5,
If there is a defect, an exclusion signal is output to exclude the transparent glass container 1 (step S9).

【0025】図11は第1の画像解析処理(T1処理)
のアルゴリズムの具体例を示すフローチャートである。
1フレームの原画像のなかのある一つの画素を注目画素
とすると、これを中心としてその左右上下の各方向にそ
れぞれ例えば3画素ずつ含めた画素領域、従って縦横7
×7=49画素の大判定画素領域を仮想し、このなかで
最大の階調値を求めた後(ステップS11)、当該大判
定画素領域内の各画素の階調値をその求めた最大階調値
に置換する(ステップS12)。すなわち、1フレーム
の画面をX・Y軸の座標と見ると、例えば注目画素の座
標が(4,4)である場合、(1 ,1)〜(7,7)の
座標の49個の画素が当該判定対象となり、そのなかの
例えば(3,3)の座標の画素が最大階調値「160」
とすると、(1 ,1)〜(7,7)の座標領域の49個
の画素の階調値を全て「160」とする。
FIG. 11 shows the first image analysis process (T1 process).
3 is a flowchart showing a specific example of the algorithm of FIG.
When one pixel in the original image of one frame is set as a pixel of interest, a pixel region including, for example, three pixels in each of the left, right, up, and down directions with respect to the pixel of interest, that is, the vertical and horizontal 7
After imagining the large determination pixel area of × 7 = 49 pixels and obtaining the maximum gradation value in this (step S11), the gradation value of each pixel in the large determination pixel area is determined to be the maximum rank. The value is replaced with the key value (step S12). That is, when viewing the screen of one frame as the coordinates of the X and Y axes, for example, when the coordinates of the pixel of interest are (4, 4), 49 pixels of the coordinates of (1, 1) to (7, 7) Is the determination target, and the pixel at the coordinates (3, 3), for example, is the maximum gradation value “160”.
Then, the gradation values of 49 pixels in the coordinate area of (1, 1) to (7, 7) are all set to "160".

【0026】そして、このようなステップS11及びス
テップS12の操作を、注目画素を順次一つずつずらし
ながら1フレームの全画素について実施する(ステップ
S13)。このような操作によって原画像中の暗い部分
が収縮する一方、明るい部分が膨張していく。つまり、
欠点による影が収縮する。なお、1フレームの画面の周
縁部の画素については、判定対象領域が7×7=49画
素に満たないので、49未満の適当な画素数をもって判
定対象領域とするが、1フレームの画面の画素数は上記
のように750×500と多く、その周縁部は、実際に
は後記の如く欠点検出の検査対象範囲外とするので、周
縁部での処理が欠点検出に悪影響を及ぼすことはない。
Then, the operations of steps S11 and S12 are performed for all the pixels of one frame while sequentially shifting the target pixel one by one (step S13). By such an operation, the dark part in the original image contracts, while the bright part expands. That is,
Shadows shrink due to defects. Regarding the pixels in the peripheral portion of the screen of one frame, the determination target area is less than 7 × 7 = 49 pixels, so an appropriate number of pixels less than 49 is set as the determination target area. The number is as large as 750 × 500 as described above, and the peripheral portion is actually outside the inspection target range for defect detection as described later, so that the processing at the peripheral portion does not adversely affect the defect detection.

【0027】次に、上記のように最大階調値に置換した
後の画像について、上記操作とは逆に、縦横7×7=4
9画素の大判定画素領域なかで最小の階調値を求めた後
(ステップS14)、当該大判定画素領域内の各画素の
階調値をその求めた最小階調値に置換する(ステップS
15)。そして、このようなステップS14及びステッ
プS15の操作を、注目画素を順次一つずつずらしなが
ら1フレームの全画素について実施する(ステップS1
6)。このような操作によって、上記とは逆に暗い部分
が膨張する一方、明るい部分が収縮する。つまり、欠点
による影が膨張する。
Next, with respect to the image after the replacement with the maximum gradation value as described above, in the opposite manner to the above operation, 7 × 7 = 4 in height and width.
After the minimum gradation value is calculated in the large determination pixel area of 9 pixels (step S14), the gradation value of each pixel in the large determination pixel area is replaced with the calculated minimum gradation value (step S14).
15). Then, the operations of steps S14 and S15 are performed for all the pixels in one frame while sequentially shifting the target pixel one by one (step S1).
6). By such an operation, contrary to the above, the dark part expands, while the bright part contracts. That is, the shadow due to the defect expands.

【0028】次いで、上記のような最小階調値置換後の
画像と原画像との階調値を各画素ごとに計算する(ステ
ップS17)。この差分処理により原画像中の小さい暗
い部分が残り、大きい暗い部分が消失する。つまり、小
さい影となって現れる小さい欠点は残るが、大きい影と
なって現れる大きい欠点は消失する。この後、その差分
処理後の画像について特定の検査範囲内のみ画素ごとに
2値化処理し、つまり所定の閾値を基準とした階調値の
大小を各画素ごとに比較し、その大小に従い欠点となる
画素であるか否か判定する(ステップS18)。そし
て、欠点とした画素数をカウントする(ステップS1
9)。
Next, the tone values of the image after the minimum tone value replacement as described above and the original image are calculated for each pixel (step S17). By this difference processing, a small dark portion remains in the original image, and a large dark portion disappears. In other words, small defects that appear as small shadows remain, but large defects that appear as large shadows disappear. After that, the image after the difference processing is binarized for each pixel only within a specific inspection range, that is, the gradation value based on a predetermined threshold is compared for each pixel, and a defect is generated according to the size. It is determined whether or not the pixel is a pixel (step S18). Then, the number of defective pixels is counted (step S1).
9).

【0029】次に、図12は第2の画像解析処理(T2
処理)のアルゴリズムの具体例を示すフローチャートで
ある。このT2処理におけるステップS21からステッ
プS23までは、上述したT1処理のステップS11か
らステップS13までと同じ操作で、最大階調値に置換
することにより欠点による影を収縮させる。次のステッ
プS24で、最大階調値置換後の画像と原画像との階調
値を画素ごとに求めた後、その差分後の画像について次
のようなスムージング処理を行う。
Next, FIG. 12 shows a second image analysis process (T2
It is a flowchart which shows the specific example of the algorithm of (processing). The steps S21 to S23 in the T2 process are the same as the steps S11 to S13 in the T1 process described above, and the shadow due to the defect is contracted by substituting the maximum gradation value. In the next step S24, the tone values of the image after the maximum tone value replacement and the original image are obtained for each pixel, and then the following smoothing processing is performed on the image after the difference.

【0030】すなわち、差分後の画像について、ある一
つの画素を注目画素とすると、これを中心としてその左
右上下の各方向にそれぞれ例えば1画素ずつ含めた画素
領域、従って縦横3×3=9画素の小判定画素領域を仮
想し、このなかで中間の階調値を求めた後(ステップS
25)、当該小判定画素領域内の各画素の階調値をその
求めた中間階調値に置換する(ステップS26)。例え
ば注目画素の座標が(4,4)である場合、(3,3)
〜(5,5)の座標の9個の画素が当該判定対象とな
り、そのなかの例えば(3,3)の座標の画素が中間階
調値「25」とすると、(3,3)〜(5,5)の座標
領域の9個の画素の階調値を全て「25」とする。
That is, in the image after the difference, when a certain pixel is set as a pixel of interest, a pixel region including, for example, one pixel in each of the left, right, up, and down directions with respect to this pixel, that is, 3 × 3 = 9 pixels in length and width After virtualizing the small determination pixel area of, and obtaining an intermediate gradation value in this (step S
25), the gradation value of each pixel in the small determination pixel area is replaced with the obtained intermediate gradation value (step S26). For example, if the coordinates of the pixel of interest are (4,4), (3,3)
9 pixels of coordinates (5, 5) are subject to the determination, and if, for example, a pixel of coordinates (3, 3) has an intermediate gradation value of “25”, (3, 3) to ( The gradation values of nine pixels in the coordinate areas 5 and 5 are all set to "25".

【0031】そして、このようなステップS25及びス
テップS26の操作を、注目画素を順次一つずつずらし
ながら1フレームの全画素について実施する(ステップ
S27)。このような操作によって原画像中の濃い暗い
部分だけ残り、その他は消失する。つまり、濃い大きい
欠点と濃い小さい欠点は残るが、淡い大きい欠点と淡い
小さい欠点は明るい部分に同化されてしまう。この後、
その中間階調値置換後の画像について特定の検査範囲内
のみ画素ごとに2値化処理し、つまり所定の閾値を基準
とした階調値の大小を各画素ごとに比較し、その大小に
従い欠点となる画素であるか否か判定してから(ステッ
プS28)、欠点とした画素数をカウントする(ステッ
プS29)。
Then, the operations of steps S25 and S26 are carried out for all the pixels in one frame while sequentially shifting the target pixel one by one (step S27). By such an operation, only the dark dark part in the original image remains and the other parts disappear. That is, the dark large defect and the dark small defect remain, but the light large defect and the light small defect are assimilated into the bright portion. After this,
The image after the replacement of the intermediate gradation value is binarized for each pixel only within a specific inspection range, that is, the gradation value based on a predetermined threshold value is compared for each pixel, and a defect occurs according to the size. After determining whether or not the pixel is a pixel (step S28), the number of defective pixels is counted (step S29).

【0032】次に、上述したT1処理及びT2処理のア
ルゴリズムを実例に基づいて分かり易く図解し、解説す
る。
Next, the algorithms of the above-mentioned T1 processing and T2 processing will be illustrated and explained in an easy-to-understand manner based on an actual example.

【0033】今、透明ガラス容器1の底部の凹凸模様の
凹凸の境目(立ち上がり)を図13(A)に示すような
直線とし、これによる原画像中の影(以下、模様影とい
う)が、同図(B)に示すように太さ1mm程度の淡い
直線として現れるものとすると、T1処理におけるステ
ップS11からステップS13までの操作によって(T
2処理におけるステップS21からステップS23まで
の操作も同様)、模様影は同図(C)に示すように大き
さが収縮するとともに、少し薄くなる。
Now, the boundary (rise) of the unevenness of the uneven pattern on the bottom of the transparent glass container 1 is made into a straight line as shown in FIG. 13A, and the shadow in the original image (hereinafter referred to as the pattern shadow) is Assuming that the line appears as a light straight line having a thickness of about 1 mm as shown in FIG. 7B, the operation from step S11 to step S13 in the T1 process (T
The same applies to the operations from step S21 to step S23 in the two processes), and the pattern shadow shrinks in size as shown in FIG.

【0034】T1処理における次のステップS14から
ステップ16までの操作を行うと、模様影は、同図
(D)に示すように大きさが同図(A)と同一で濃淡の
度合いも同図(C)とほぼ同じになる。これをステップ
S17で原画像と差分処理すると、同図(E)に示すよ
うに模様影は消失する。従って、模様影はステップS1
7でこのように消失してしまっているため、次のステッ
プS18で2値化すれば、当然のことながら欠点として
判定されないことになる。
When the operation from the next step S14 to step 16 in the T1 process is performed, the size of the pattern shadow is the same as in FIG. It is almost the same as (C). When this is subjected to the difference processing with the original image in step S17, the pattern shadow disappears as shown in FIG. Therefore, the pattern shadow is determined in step S1.
Since it has disappeared in this way in step 7, if it is binarized in the next step S18, it is naturally not judged as a defect.

【0035】また、同図(C)のようになった模様影を
T2処理におけるステップS24で原画像と差分処理す
ると、同図(A)のように現れた模様影の中央部分が同
図(F)のように消失し、周辺部が残る。次にこれにス
テップS25からステップS27の操作を行うと、残っ
た模様影の周辺部は同図(G)に示すように薄くなる。
この後、T2処理ではステップS28で閾値を基準に2
値化するので、薄くなった模様影の周辺部は消失し、欠
点として判定されない。
Further, when the pattern shadow as shown in FIG. 7C is subjected to the difference processing with the original image in step S24 in the T2 processing, the central portion of the pattern shadow appearing as shown in FIG. It disappears like F) and the peripheral part remains. Next, when the operations of step S25 to step S27 are performed, the peripheral portion of the remaining pattern shadow becomes thin as shown in FIG.
Thereafter, in the T2 process, 2 is set based on the threshold value in step S28.
Since the value is digitized, the peripheral portion of the thinned pattern shadow disappears and is not judged as a defect.

【0036】一方、透明ガラス容器1に図14(A)に
示すような欠点があり、その欠点の縁の一部が同図
(B)に示すように1mm以下の小さいしかも十分に濃
い影(以下、濃い小欠点影という)となって現れるもの
とすると、T1処理におけるステップS11からステッ
プS13までの操作によって(T2処理におけるステッ
プS21からステップS23までの操作も同様)、濃い
小欠点影は消失し、画像全体としてはやや明化する。
On the other hand, the transparent glass container 1 has a defect as shown in FIG. 14 (A), and a part of the edge of the defect is a small and sufficiently dark shadow (1 mm or less) as shown in FIG. 14 (B). Hereinafter, the small small defect shadow will appear as a dark small defect shadow, and the dark small defect shadow disappears by the operation from step S11 to step S13 in the T1 process (the same as the operation from step S21 to step S23 in the T2 process). However, the whole image is slightly brightened.

【0037】T1処理における次のステップS14から
ステップ16までの操作を行うと、濃い小欠点影は消失
したままで、画像全体としてはやや暗くなる。これをス
テップS17で原画像と差分処理すると、同図(E)に
示すように濃い小欠点影が再び現れるため、ステップS
18において欠点として検出される。
When the operations from step S14 to step 16 in the T1 process are performed, the dark small defect shadows disappear and the entire image becomes slightly dark. When this is subjected to the difference processing with the original image in step S17, a dark small defect shadow appears again as shown in FIG.
It is detected as a defect at 18.

【0038】また、同図(C)のようになった模様影を
T2処理におけるステップS24で原画像と差分処理す
ると、同図(F)に示すように濃い小欠点影が再び現
れ、これにステップS25からステップS27の操作を
行うと、同図(G)に示すようにやや薄くなるものの依
然として濃い小欠点影として残る。従って、これをステ
ップS28で2値化すれば、欠点として検出される。
When the pattern shadow as shown in FIG. 6C is subjected to the difference processing with the original image in step S24 in the T2 processing, a dark small defect shadow appears again as shown in FIG. When the operations from step S25 to step S27 are performed, as shown in FIG. 7G, although it is slightly thin, it remains as a dark small defect shadow. Therefore, if this is binarized in step S28, it is detected as a defect.

【0039】一方、図15(A)に示すような欠点の縁
の一部が、同図(B)に示すように1mmを越える太さ
のしかも十分に濃い影(以下、濃い大欠点影という)と
なって現れるものとすると、T1処理におけるステップ
S11からステップS13までの操作によって(T2処
理におけるステップS21からステップS23までの操
作も同様)、濃い大欠点影は同図(C)に示すように濃
さはそのままで収縮する。
On the other hand, as shown in FIG. 15B, a part of the edge of the defect as shown in FIG. 15A has a sufficiently thick shadow with a thickness exceeding 1 mm (hereinafter referred to as a large dark defect shadow). ) Appears by the operation from step S11 to step S13 in the T1 process (the same as the operation from step S21 to step S23 in the T2 process), the dark large defect shadow is as shown in FIG. Shrinks with the same thickness.

【0040】T1処理における次のステップS14から
ステップ16までの操作を行うと、濃い大欠点影は、同
図(D)に示すように大きさが同図(A)と同一で濃淡
の度合いも同図(C)とほぼ同じになる。これをステッ
プS17で原画像と差分処理すると、同図(E)に示す
ように濃い大欠点影は消失する。従って、濃い大欠点影
はステップS17でこのように消失してしまっているた
め、次のステップS18で2値化しても検出は不可能で
ある。
When the operations from the next step S14 to step 16 in the T1 process are carried out, the dark large defect shadow has the same size as that in FIG. It is almost the same as in FIG. When this is subjected to the difference processing with the original image in step S17, the dark large defect shadow disappears as shown in FIG. Therefore, since the dark large defect shadow has disappeared in this way in step S17, it cannot be detected even if it is binarized in the next step S18.

【0041】ところが、同図(C)のようになった濃い
大欠点影をT2処理におけるステップS24で原画像と
差分処理すると、同図(A)のように現れた濃い大欠点
影の中央部分が同図(F)のように消失し、周辺部が残
る。次にこれにステップS25からステップS27の操
作を行うと、残った濃い大欠点影の周辺部は同図(G)
に示すようにやや薄くなるものの、依然として濃い欠点
影として残る。従って、これをステップS28で閾値を
基準に2値化すれば、欠点として検出することができ
る。
However, when the dark large defect shadow as shown in FIG. 7C is subjected to the difference processing with the original image in step S24 in the T2 process, the central portion of the dark large defect shadow appearing as shown in FIG. Disappears as shown in FIG. 6F, and the peripheral portion remains. Next, when the operations from step S25 to step S27 are performed, the peripheral portion of the remaining dark large defect shadow is shown in FIG.
Although it becomes a little thin as shown in, it still remains as a dark defect shadow. Therefore, if this is binarized based on the threshold value in step S28, it can be detected as a defect.

【0042】次に、透明ガラス容器1に図16(A)に
示すような欠点があり、その欠点の縁の一部が同図
(B)に示すように模様影よりは濃いが比較的淡いしか
も1mm以下の小さい影(以下、淡い小欠点影という)
となって現れるものとすると、T1処理におけるステッ
プS11からステップS13までの操作によって(T2
処理におけるステップS21からステップS23までの
操作も同様)、淡い小欠点影は消失し、画像全体として
はやや明化する。
Next, the transparent glass container 1 has a defect as shown in FIG. 16 (A), and a part of the edge of the defect is darker than the pattern shadow but relatively light as shown in FIG. 16 (B). Moreover, a small shadow of 1 mm or less (hereinafter referred to as a light small defect shadow)
, The operation of steps S11 to S13 in the T1 process (T2
The same applies to the operations from step S21 to step S23 in the processing), the light small defect shadow disappears, and the entire image becomes slightly brighter.

【0043】T1処理における次のステップS14から
ステップ16までの操作を行うと、淡い小欠点影は消失
したままで、画像全体としてはやや暗くなる。これをス
テップS17で原画像と差分処理すると、同図(E)に
示すように淡い小欠点影が模様影よりもやや濃くなって
現れるため、ステップS18において欠点として検出す
ることができる。
When the operations from step S14 to step 16 in the T1 process are performed, the light small defect shadow remains disappeared, and the entire image becomes slightly dark. When this is subjected to the difference processing with the original image in step S17, a light small defect shadow appears slightly darker than the pattern shadow as shown in FIG. 8E, and therefore it can be detected as a defect in step S18.

【0044】また、同図(C)のようになった模様影を
T2処理におけるステップS24で原画像と差分処理す
ると、同図(F)に示すように淡い小欠点影が再び現
れ、これにステップS25からステップS27の操作を
行うと、同図(G)に示すようにやや薄くなった淡い小
欠点影として残る。これをステップS28で2値化する
と、模様影との階調差があるときは検出可能であるが、
その差がほとんどないと欠点として検出できない。
When the pattern shadow as shown in FIG. 6C is subjected to the difference processing with the original image at step S24 in the T2 processing, a light small defect shadow appears again as shown in FIG. When the operations from step S25 to step S27 are performed, as shown in (G) of the same figure, a slight thin defect shadow remains. If this is binarized in step S28, it is possible to detect when there is a gradation difference from the pattern shadow,
If there is almost no difference, it cannot be detected as a defect.

【0045】以上、T1処理及びT2処理による大小の
欠点検出の可・不可を整理すると、次のようになる。 (1)1mm以下の濃い影の欠点の検出は、T1処理及
びT2処理のいずれでも可。 (2)1mm以下の淡い影の欠点の検出は、T1処理で
は可、T2処理では不可(可能な場合もある)。 (3)1mmを越える濃い欠点の検出は、T1処理では
不可であるが、T2処理では可。 (4)1mmを越える淡い欠点の検出は、T1処理及び
T2処理のいずれでも不可であるが、このような欠点が
生ずる確率は透明ガラス容器の製造法から考えてごく少
ないため、本実施例では検出対象外としている。
As described above, whether the defect detection of large and small by the T1 process and the T2 process can be arranged is as follows. (1) Detection of defects with dark shadows of 1 mm or less is possible with either T1 processing or T2 processing. (2) The detection of a defect of a light shadow of 1 mm or less is possible in the T1 process and not possible (sometimes possible) in the T2 process. (3) Detection of dark defects exceeding 1 mm is not possible with T1 processing, but is possible with T2 processing. (4) The detection of faint defects exceeding 1 mm is impossible with either T1 treatment or T2 treatment, but the probability of such defects occurring is very small considering the manufacturing method of the transparent glass container. Not detected.

【0046】図17から図20は、模様影、濃い小欠点
影、濃い大欠点影、淡い小欠点影のそれぞれの場合の上
記した処理を、画像の濃淡の階調値及び差分処理による
階調差を記号化して図解例示したものである。
FIGS. 17 to 20 show the above-described processing in the case of each of the pattern shadow, the dark small defect shadow, the dark large defect shadow, and the light small defect shadow, the gradation value of the gradation of the image and the gradation by the difference processing. The difference is symbolized and illustrated.

【0047】図17の模様影の場合、T1処理ではステ
ップS17による差分処理後の階調差が全て10階調未
満であるため、ステップS18の2値化処理での閾値を
例えば余裕をもって20とすれば、模様影が欠点として
誤検出されることはない。また、T2処理におけるステ
ップS25からステップS27までのスムージング操作
後では、最大20階調差に近い場合があるので、CCD
カメラ12の画素の違いによる感度のバラツキ等を考慮
し、ステップS28での2値化処理の閾値を30程度と
すれば、模様影が欠点として誤検出されることはない。
In the case of the pattern shadow of FIG. 17, since the gradation differences after the difference processing in step S17 are all less than 10 gradations in the T1 processing, the threshold value in the binarization processing in step S18 is set to 20 with a margin, for example. Then, the pattern shadow will not be erroneously detected as a defect. In addition, after the smoothing operation from step S25 to step S27 in the T2 process, the maximum gradation difference may be close to 20.
If the threshold value of the binarization process in step S28 is set to about 30 in consideration of variations in sensitivity due to differences in the pixels of the camera 12, the pattern shadow will not be erroneously detected as a defect.

【0048】図18の濃い小欠点影の場合、T1処理で
はステップS17による差分処理後の欠点部分の階調差
が30〜80であるので、ステップS18の2値化処理
での閾値を上記のように20とすれば、十分に欠点とし
て検出することができる。また、T2処理におけるステ
ップS25からステップS27までのスムージング操作
後では、欠点部分の階調差が40〜60であるので、ス
テップS28での2値化処理の閾値を上記のように30
程度とすれば、十分に欠点として検出することができ
る。
In the case of the dark small defect shadow of FIG. 18, since the gradation difference of the defect portion after the difference processing in step S17 is 30 to 80 in the T1 processing, the threshold value in the binarization processing in step S18 is set to the above value. If the number is 20, the defect can be sufficiently detected. Further, after the smoothing operation from step S25 to step S27 in the T2 process, since the gradation difference of the defect portion is 40 to 60, the threshold value of the binarization process at step S28 is set to 30 as described above.
If it is a degree, it can be sufficiently detected as a defect.

【0049】図19の濃い大欠点影の場合、T1処理で
はステップS17による差分処理後の欠点部分の階調差
が10未満であるので、ステップS18の2値化処理で
の閾値を上記のように20とすると、欠点として検出は
不可能である。これに対して、T2処理におけるステッ
プS25からステップS27までのスムージング操作後
では、欠点部分の階調差が40〜70であるので、ステ
ップS28での2値化処理の閾値を上記のように30程
度とすれば、十分に欠点として検出することができる。
In the case of the dark large defect shadow shown in FIG. 19, since the gradation difference of the defect portion after the difference processing in step S17 is less than 10 in the T1 processing, the threshold value in the binarization processing in step S18 is set as described above. If it is set to 20, the disadvantage is that detection is impossible. On the other hand, after the smoothing operation from step S25 to step S27 in the T2 process, since the gradation difference of the defect portion is 40 to 70, the threshold value of the binarization process at step S28 is set to 30 as described above. If it is a degree, it can be sufficiently detected as a defect.

【0050】図20の淡い小欠点影の場合、T1処理で
はステップS17による差分処理後の欠点部分の階調差
が15〜25であるので、ステップS18の2値化処理
での閾値を上記のように20とすれば、欠点として検出
することができる。しかし、T2処理におけるステップ
S25からステップS27までのスムージング操作後で
は、欠点部分の階調差が15〜25であるので、ステッ
プS28での2値化処理の閾値が30程度であると、欠
点としての検出は不可能である。
In the case of the light small defect shadow of FIG. 20, since the gradation difference of the defect portion after the difference processing in step S17 is 15 to 25 in the T1 processing, the threshold value in the binarization processing in step S18 is set to the above value. If the number is 20, the defect can be detected. However, after the smoothing operation from step S25 to step S27 in the T2 process, the gradation difference of the defect portion is 15 to 25, so that the threshold value of the binarization process at step S28 is about 30 Is impossible to detect.

【0051】以上のように本実施例では、透明ガラス容
器1の凹凸模様そのもの、つまりその凹部から凸部への
立ち上がり角度を、CCDカメラ12の撮影画像におい
て影が出にくいようにした上で、その影が出たとしても
散乱しないように、投光器7からの光を、透明ガラス容
器1の内側から底部1a の内面へ入光させて外面へと透
過させ、そしてT1処理で主に小さい欠点を、またT2
処理で主に大きい欠点を検出するもので、透明ガラス容
器1の底部に大きな凹凸模様が形成されていても、大小
の欠点を精度良く検出することができるものである。
As described above, in the present embodiment, the concavo-convex pattern itself of the transparent glass container 1, that is, the rising angle from the concave portion to the convex portion is set so that the image captured by the CCD camera 12 is less likely to have a shadow. In order not to scatter even if the shadow appears, the light from the projector 7 is made to enter from the inside of the transparent glass container 1 to the inner surface of the bottom portion 1a and transmitted to the outer surface. , T2 again
The processing mainly detects large defects, and even if a large uneven pattern is formed on the bottom of the transparent glass container 1, large and small defects can be detected with high accuracy.

【0052】なお、叙述の実施例では、透明ガラス容器
1を検査対象としてその底部1a に投光器7からの光を
透過させ、その透過光による像をCCDカメラ12で撮
像して欠陥の有無を検査したが、底部以外の部分の欠陥
についても同様にして検査することができる。また、透
過光によらず反射光によって撮像して検査することも可
能で、その場合には、透明製品に限らず不透明のしかも
凹凸模様のある製品であっても、上述したT1処理及び
T2処理によって大小の欠陥の有無を検査できる。
In the described embodiment, the transparent glass container 1 is used as an inspection object, the light from the projector 7 is transmitted to the bottom portion 1a of the transparent glass container 1, and an image of the transmitted light is taken by the CCD camera 12 to inspect for defects. However, it is possible to inspect for defects other than the bottom portion in the same manner. It is also possible to take an image by inspecting by reflected light instead of transmitted light. In that case, not only a transparent product but also an opaque product having an uneven pattern is subjected to the above-mentioned T1 process and T2 process. The presence or absence of large and small defects can be inspected by.

【0053】[0053]

【発明の効果】本発明の各請求項ごとの効果を挙げると
次のとおりである。 (請求項1)例えば大きな凹凸模様が形成されているよ
うな製品において、その凹部中又は凸部中に存在する大
きな欠点であっても簡単な画像処理手法で高速にしかも
的確かつ容易に検出できる。
The effects of each claim of the present invention are as follows. (Claim 1) For example, in a product having a large concavo-convex pattern, even a large defect existing in the concave portion or the convex portion can be detected quickly, accurately and easily by a simple image processing method. .

【0054】(請求項2及び請求項4)大きい欠点ばか
りでなく、小さい欠点も同様に検出できる。
(Claims 2 and 4) Not only large defects but also small defects can be detected similarly.

【0055】(請求項3)2値化処理を1画面中の一定
の検査範囲についてのみ実施するので、その前段の操作
である影収縮処理、影膨張処理及び差分処理における無
効部分(画面の周辺部)を排除し、欠点検出を支障なく
行える。
(Claim 3) Since the binarization process is performed only for a certain inspection range in one screen, the invalid part (periphery of the screen) in the shadow contraction process, shadow expansion process and difference process which are the preceding operations. Part) can be eliminated and defect detection can be performed without any trouble.

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

【図1】本発明の欠陥検査装置の一例の概要構成図であ
る。
FIG. 1 is a schematic configuration diagram of an example of a defect inspection apparatus of the present invention.

【図2】検査対象の一例である透明ガラス容器の左半部
は断面、右半部は外表面を表す図である。
FIG. 2 is a diagram showing a cross section in the left half of a transparent glass container which is an example of an inspection target, and a diagram showing the outer surface in the right half.

【図3】同透明ガラス容器の底面図である。FIG. 3 is a bottom view of the transparent glass container.

【図4】同透明ガラス容器の凹凸模様の凹部から凸部の
立ち上がり角度を説明する図である。
FIG. 4 is a diagram illustrating a rising angle from a concave portion to a convex portion in the concavo-convex pattern of the transparent glass container.

【図5】上記立ち上がり角度と相対透過率の関係を示す
グラフである。
FIG. 5 is a graph showing the relationship between the rising angle and the relative transmittance.

【図6】上記凹部の正常形状を示す拡大断面図である。FIG. 6 is an enlarged cross-sectional view showing a normal shape of the recess.

【図7】上記凹部の一部に盛り上がりができた異常形状
を示す拡大断面図である。
FIG. 7 is an enlarged cross-sectional view showing an abnormal shape in which a part of the recess is raised.

【図8】上記凹凸模様を成形する従来の金型の一部の拡
大断面図である。
FIG. 8 is an enlarged cross-sectional view of a part of a conventional mold for molding the uneven pattern.

【図9】改良された金型の一部の拡大断面図である。FIG. 9 is an enlarged cross-sectional view of a portion of the improved mold.

【図10】画像解析処理装置による画像解析及び欠陥検
査処理の概要を示すフローチャートである。
FIG. 10 is a flowchart showing an outline of image analysis and defect inspection processing by the image analysis processing apparatus.

【図11】同上における第1の画像解析処理のアルゴリ
ズムの具体例を示すフローチャートである。
FIG. 11 is a flowchart showing a specific example of an algorithm of a first image analysis process in the above.

【図12】第2の画像解析処理のアルゴリズムの具体例
を示すフローチャートである。
FIG. 12 is a flowchart showing a specific example of an algorithm of second image analysis processing.

【図13】上記第1及び第2の画像解析処理による模様
影の変成過程を図解した模式図である。
FIG. 13 is a schematic diagram illustrating a transformation process of a pattern shadow by the first and second image analysis processes.

【図14】同じく濃い小欠点影の変成過程を図解した模
式図である。
FIG. 14 is a schematic diagram illustrating the transformation process of a dark small defect shadow.

【図15】同じく濃い大欠点影の変成過程を図解した模
式図である。
FIG. 15 is a schematic diagram illustrating a metamorphosing process of a dark large defect shadow.

【図16】同じく淡い小欠点影の変成過程を図解した模
式図である。
FIG. 16 is a schematic diagram illustrating a metamorphosis process of a light small defect shadow.

【図17】画像の濃淡の階調値及び差分処理による階調
差を記号化して模様影の階調変化過程を図解例示した解
説図である。
FIG. 17 is an explanatory diagram illustrating the gradation change process of the pattern shadow by symbolizing the gradation value of the light and shade of the image and the gradation difference by the difference processing.

【図18】同様に濃い小欠点影の階調変化過程を図解例
示した解説図である。
FIG. 18 is an explanatory diagram illustrating a gradation change process of a dark small defect shadow similarly.

【図19】同様に濃い大欠点影の階調変化過程を図解例
示した解説図である。
FIG. 19 is an explanatory diagram illustrating a gradation change process of a dark large defect shadow similarly.

【図20】同様に淡い小欠点影の階調変化過程を図解例
示した解説図である。
FIG. 20 is an explanatory diagram illustrating a gradation change process of a light small defect shadow similarly.

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

1 透明ガラス容器 7 投光器 11 イメージセンサ 12 CCDカメラ 13 画像解析処理装置 1 transparent glass container 7 light projector 11 image sensor 12 CCD camera 13 image analysis processing device

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】投光器からの光を、大きな凹凸模様等が形
成されている製品に照射してその透過光又は反射光をイ
メージセンサで受光し、該イメージセンサからの各画素
の階調値を画像メモリに記憶して画像解析処理すること
により、大きな凹凸模様等の中に存在する欠陥の有無を
検査する方法であって、 (1)前記画像メモリに記憶された1画面の原画像デー
タについて、縦横所定画素数の大判定画素領域Mごとに
その中の最大の階調値を求め、当該大判定画素領域M中
の各画素の階調値をその求めた最大階調値に置換するこ
とを、大判定画素領域Mを順次移行させながら全画素に
ついて行う影収縮処理と、 (2)その影収縮処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する差分処理と、 (3)その差分処理後の画素データについて、前記大判
定画素領域Mの画素数より少ない縦横所定画素数の小判
定画素領域Nごとにその中の中間の階調値を求め、当該
小判定画素領域N中の各画素の階調値をその求めた中間
階調値に置換することを、小判定画素領域Nを順次移行
させながら全画素について行うスムージング処理と、 (4)そのスムージング処理後の各画素データを2値化
して各画素ごとに欠点の有無を判定する2値化処理と、 (5)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする欠陥
判定処理と、 からなることを特徴とする製品の欠陥検査方法。
1. A large uneven pattern or the like forms the light from the projector.
Irradiating a formed product and receiving its transmitted light or reflected light by an image sensor, and storing the gradation value of each pixel from the image sensor in an image memory for image analysis processing. good is, the presence or absence of a defect present in the large concave and convex pattern or the like
A method of inspecting, (1) above for the original image data of one screen stored in the image memory, obtains a maximum gradation value therein for each large determination pixel region M of the vertical and horizontal predetermined number of pixels, the large A shadow contraction process that replaces the gradation value of each pixel in the judgment pixel area M with the obtained maximum gradation value for all pixels while sequentially shifting the large judgment pixel area M, and (2) the shadow A difference process for calculating a tone difference between each pixel for the image data after the contraction process and the original image data stored in the image memory; (3) for the pixel data after the difference process, the large determination pixel region For each small judgment pixel area N having a predetermined number of vertical and horizontal pixels smaller than the number of M pixels, an intermediate gradation value is obtained, and the gradation value of each pixel in the small judgment pixel area N is obtained. Substituting the value sequentially shifts the small determination pixel area N Smoothing processing performed on all pixels while (4) binarizing processing for binarizing each pixel data after the smoothing processing to determine the presence or absence of a defect for each pixel, and (5) binarizing processing 2. A defect inspection method for a product, comprising: a defect determination process of counting the number of pixels determined to be defects and determining that there is a defect when the number of pixels is a certain value or more.
【請求項2】投光器からの光を、大きな凹凸模様等が形
成されている製品に照射してその透過光又は反射光をイ
メージセンサで受光し、該イメージセンサからの各画素
の階調値を画像メモリに記憶して画像解析処理すること
により、大きな凹凸模様等の中に存在する欠陥の有無を
検査する方法であって、 (1)前記画像メモリに記憶された1画面の原画像デー
タについて、縦横所定画素数の大判定画素領域Mごとに
その中の最大の階調値を求め、当該大判定画素領域M中
の各画素の階調値をその求めた最大階調値に置換するこ
とを、大判定画素領域Mを順次移行させながら全画素に
ついて行う影収縮処理と、 (2)その影収縮処理後の画像データについて、大判定
画素領域M中で最も小さい階調値を求め、当該大判定画
素領域M中の各画素の階調値をその求めた最大階調値に
置換することを、大判定画素領域Mを順次移行させなが
ら全画素について行う影膨張処理と、 (3)その影膨張処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する第1の差分処理と、 (4)その差分処理後の各画素データを2値化して各画
素ごとに欠点の有無を判定する第1の2値化処理と、 (5)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする第1
の欠陥判定処理と、 (6)前記影収縮処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する第2の差分処理と、 (7)その差分処理後の画素データについて、前記大判
定画素領域Mの画素数より少ない縦横所定画素数の小判
定画素領域Nごとにその中の中間の階調値を求め、当該
小判定画素領域N中の各画素の階調値をその求めた中間
階調値に置換することを、小判定画素領域Nを順次移行
させながら全画素について行うスムージング処理と、 (8)そのスムージング処理後の各画素データを2値化
して各画素ごとに欠点の有無を判定する第2の2値化処
理と、 (9)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする第2
の欠陥判定処理と、 からなることを特徴とする製品の欠陥検査方法。
2. The light from the projector is shaped into a large uneven pattern.
Irradiating a formed product and receiving its transmitted light or reflected light by an image sensor, and storing the gradation value of each pixel from the image sensor in an image memory for image analysis processing. good is, the presence or absence of a defect present in the large concave and convex pattern or the like
A method of inspecting, (1) above for the original image data of one screen stored in the image memory, obtains a maximum gradation value therein for each large determination pixel region M of the vertical and horizontal predetermined number of pixels, the large A shadow contraction process that replaces the gradation value of each pixel in the judgment pixel area M with the obtained maximum gradation value for all pixels while sequentially shifting the large judgment pixel area M, and (2) the shadow Regarding the image data after the contraction processing, the smallest gradation value in the large determination pixel area M is obtained, and the gradation value of each pixel in the large determination pixel area M is replaced with the obtained maximum gradation value. , A shadow expansion process performed on all pixels while sequentially moving the large determination pixel region M, and (3) a gradation difference between the image data after the shadow expansion process and the original image data stored in the image memory for each pixel. The first difference processing which is calculated for each (4) A first binarization process for binarizing each pixel data after the difference process to determine the presence / absence of a defect for each pixel, and (5) counting the number of pixels that are defective in the binarization process, If the number of pixels exceeds a certain value, it is determined that there is a defect.
Defect determination processing of (6), second difference processing of calculating a gradation difference between the image data after the shadow contraction processing and the original image data stored in the image memory for each pixel, (7) For the pixel data after the difference processing, an intermediate gradation value is obtained for each of the small determination pixel areas N having a predetermined number of vertical and horizontal pixels smaller than the number of pixels of the large determination pixel area M, and in the small determination pixel area N. The smoothing process of replacing the gradation value of each pixel with the obtained intermediate gradation value for all pixels while sequentially moving the small determination pixel region N, and (8) each pixel data after the smoothing process Second binarization processing for binarizing each pixel to determine the presence / absence of a defect for each pixel, and (9) counting the number of pixels identified as defects in the binarization processing, and the number of pixels is a certain value or more. If there is a second defect
A defect inspection method for a product, comprising:
【請求項3】前記第1及び第2の2値化処理を、1画面
中の一定の検査範囲についてのみ実施することを特徴と
する請求項2に記載の製品の欠陥検査方法。
3. The defect inspection method for a product according to claim 2, wherein the first and second binarization processing is performed only for a certain inspection range in one screen.
【請求項4】投光器からの光を、大きな凹凸模様等が形
成されている製品に照射してその透過光又は反射光をイ
メージセンサで受光し、該イメージセンサからの各画素
の階調値を画像メモリに記憶して画像解析処理すること
により、大きな凹凸模様等の中に存在する欠陥の有無を
検査する製品の欠陥検査装置であって、次の手段を備え
たことを特徴とする。 (1)前記画像メモリに記憶された1画面の原画像デー
タについて、縦横所定画素数の大判定画素領域Mごとに
その中の最大の階調値を求め、当該大判定画素領域M中
の各画素の階調値をその求めた最大階調値に置換するこ
とを、大判定画素領域Mを順次移行させながら全画素に
ついて行う影収縮処理手段。 (2)その影収縮処理後の画像データについて、大判定
画素領域M中で最も小さい階調値を求め、当該大判定画
素領域M中の各画素の階調値をその求めた最小階調値に
置換することを、大判定画素領域Mを順次移行させなが
ら全画素について行う影膨張処理手段。 (3)その影膨張処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する第1の差分処理手段。 (4)その差分処理後の各画素データを2値化して各画
素ごとに欠点の有無を判定する第1の2値化処理手段。 (5)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする第1
の欠陥判定処理手段。 (6)前記影収縮処理後の画像データと前記画像メモリ
に記憶された原画像データとの階調差を各画素ごとに算
出する第2の差分処理手段。 (7)その差分処理後の画素データについて、前記大判
定画素領域Mの画素数より少ない縦横所定画素数の小判
定画素領域Nごとにその中の中間の階調値を求め、当該
小判定画素領域N中の各画素の階調値をその求めた中間
階調値に置換することを、小判定画素領域Nを順次移行
させながら全画素について行うスムージング処理手段。 (8)そのスムージング処理後の各画素データを2値化
して各画素ごとに欠点の有無を判定する第2の2値化処
理手段。 (9)その2値化処理で欠点とされた画素数をカウント
し、その画素数が一定値以上のとき欠陥有りとする第2
の欠陥判定処理手段。 (10)前記第1及び第2の欠陥判定処理手段の一方で
も欠陥有りと判定したとき製品を排除するための信号を
出力する排除信号出力手段。
4. The light from the projector is shaped into a large uneven pattern.
Irradiating a formed product and receiving its transmitted light or reflected light by an image sensor, and storing the gradation value of each pixel from the image sensor in an image memory for image analysis processing. good is, the presence or absence of a defect present in the large concave and convex pattern or the like
A defect inspection apparatus for a product to be inspected , characterized by comprising the following means. (1) For the original image data of one screen stored in the image memory, the maximum gradation value is determined for each large determination pixel area M having a predetermined number of vertical and horizontal pixels, and each of the large determination pixel areas M is determined. A shadow contraction processing unit that replaces the gradation value of a pixel with the obtained maximum gradation value for all pixels while sequentially shifting the large determination pixel region M. (2) For the image data after the shadow contraction processing, the smallest gradation value in the large determination pixel area M is calculated, and the gradation value of each pixel in the large determination pixel area M is calculated as the minimum gradation value. A shadow expansion processing unit that performs the replacement for all the pixels while sequentially shifting the large determination pixel region M. (3) First difference processing means for calculating, for each pixel, a gradation difference between the image data after the shadow expansion processing and the original image data stored in the image memory. (4) First binarization processing means for binarizing each pixel data after the difference processing and determining the presence or absence of a defect for each pixel. (5) Counting the number of defective pixels in the binarization process, and determining that there is a defect when the number of pixels is a certain value or more.
Defect determination processing means. (6) Second difference processing means for calculating, for each pixel, a gradation difference between the image data after the shadow contraction processing and the original image data stored in the image memory. (7) For the pixel data after the difference processing, an intermediate gradation value is obtained for each of the small determination pixel areas N having a predetermined number of vertical and horizontal pixels smaller than the number of pixels of the large determination pixel area M, and the small determination pixel Smoothing processing means for replacing the gradation value of each pixel in the area N with the obtained intermediate gradation value for all the pixels while sequentially shifting the small determination pixel area N. (8) Second binarization processing means for binarizing each pixel data after the smoothing processing and determining the presence or absence of a defect for each pixel. (9) Counting the number of pixels that are regarded as defects in the binarization process, and determining that there is a defect when the number of pixels is a certain value or more.
Defect determination processing means. (10) Exclusion signal output means for outputting a signal for excluding a product when one of the first and second defect determination processing means determines that there is a defect.
JP5065934A 1993-03-03 1993-03-03 Product defect inspection method and equipment Expired - Fee Related JPH0789054B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5065934A JPH0789054B2 (en) 1993-03-03 1993-03-03 Product defect inspection method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5065934A JPH0789054B2 (en) 1993-03-03 1993-03-03 Product defect inspection method and equipment

Publications (2)

Publication Number Publication Date
JPH06258057A JPH06258057A (en) 1994-09-16
JPH0789054B2 true JPH0789054B2 (en) 1995-09-27

Family

ID=13301291

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5065934A Expired - Fee Related JPH0789054B2 (en) 1993-03-03 1993-03-03 Product defect inspection method and equipment

Country Status (1)

Country Link
JP (1) JPH0789054B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2505243B2 (en) * 1988-03-10 1996-06-05 株式会社日立製作所 Electronic ignition timing controller
JP6502027B2 (en) * 2014-06-18 2019-04-17 大塚製薬株式会社 Appearance inspection apparatus, appearance inspection method and manufacturing apparatus for PTP sheet

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS617406A (en) * 1984-06-21 1986-01-14 Mitsubishi Electric Corp Defect detecting method of body shape
JPH04259081A (en) * 1991-02-14 1992-09-14 Matsushita Electric Ind Co Ltd Wire rod recognizing method and its device

Also Published As

Publication number Publication date
JPH06258057A (en) 1994-09-16

Similar Documents

Publication Publication Date Title
US6735745B2 (en) Method and system for detecting defects
JP4246438B2 (en) Lens inspection
US20080285840A1 (en) Defect inspection apparatus performing defect inspection by image analysis
US5444237A (en) Apparatus for inspecting a bottom border portion of transparent glass vessel for a foreign article
JP2005321237A (en) Pattern inspection method and pattern inspection device
JPH06100555B2 (en) Defect inspection method and device for transparent object
JP2001523815A (en) Automatic lens inspection system
CN110800294A (en) Method, equipment and system for detecting camera module and machine-readable storage medium
EP1006350A1 (en) Method for detecting defects in bottles
JP2006208196A (en) Coating inspection device and method
JPH08210991A (en) Circular-knurle-region inspecting device of container bottompart
CN111579564B (en) Transparent flat plate defect and diopter change detection system and method
JPH0711490B2 (en) Defect detection method and device for transparent object
JP2003149032A (en) Level measuring device
TW202129269A (en) Laser based inclusion detection system and methods
JP2012083351A (en) Defect inspection device and method of the same
JP2012237585A (en) Defect inspection method
JPH0789054B2 (en) Product defect inspection method and equipment
WO2022138643A1 (en) Air bubble identification device, air bubble identification method, and foreign matter detection system
CN115330794A (en) LED backlight foreign matter defect detection method based on computer vision
JPH0816653B2 (en) Defect inspection method and device for transparent container
JPH0448251A (en) Bottle inspecting device
JPH04216445A (en) Device for inspecting bottle
JPH0862155A (en) Object 0bserving apparatus
JP5011348B2 (en) Pattern inspection method and apparatus

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees