JP5167731B2 - Inspection apparatus and method - Google Patents
Inspection apparatus and method Download PDFInfo
- Publication number
- JP5167731B2 JP5167731B2 JP2007230881A JP2007230881A JP5167731B2 JP 5167731 B2 JP5167731 B2 JP 5167731B2 JP 2007230881 A JP2007230881 A JP 2007230881A JP 2007230881 A JP2007230881 A JP 2007230881A JP 5167731 B2 JP5167731 B2 JP 5167731B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- candidate cluster
- defect candidate
- image data
- defect
- 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
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Description
この発明は,検査対象物から得られた検査画像に対して画像処理を行い,検査対象物の良否を判定する検査装置に関する。 The present invention relates to an inspection apparatus that performs image processing on an inspection image obtained from an inspection object and determines the quality of the inspection object.
検査対象物の良否を判定する検査装置として,目視ではなく,検査対象物の表面をカメラを用いて読取ることによって得られた被検査画像データと,あらかじめ用意される基準画像データとを比較するものがある。 As an inspection device that determines the quality of an inspection object, the inspection image data obtained by reading the surface of the inspection object using a camera instead of visual observation is compared with reference image data prepared in advance. There is.
特許文献1には,印刷物から得られた被検査画像と基準画像の各画素ごとに輝度差を算出し,これを適当な閾値を用いて2値化することによって基本画像と被検査画像との間の異なる部分(欠陥部位)を抽出することが記載されている。抽出された欠陥部位が一定面積以上を占めているかどうかが判断され,欠陥部位が一定面積以上を占めている場合に,その被検査画像に対応する印刷物は不良品であると判定される。
しかしながら,欠陥部位の面積のみで一律に印刷物が良品であるか不良品であるかを判定すると,不良品と判定する必要のないものについて不良品と判定されること,または不良品と判定すべきものを良品と判定してしまうことがある。 However, when it is determined whether the printed matter is a non-defective product or a defective product uniformly only by the area of the defective part, it is determined that a product that does not need to be determined as a defective product is determined as a defective product, or a defective product. May be judged as non-defective.
たとえば,印刷物上に線状の汚れが存在するとする。線状の汚れは,印刷物を視認する看者の注目が集まりやすく,たとえ印刷物に占めている割合が小さくても,その存在は印刷の品質上好ましくない。 For example, it is assumed that linear stains exist on the printed material. The linear stains tend to attract attention of the viewer who visually recognizes the printed matter. Even if the proportion of the linear stain is small, its presence is not preferable in terms of printing quality.
これに対し,印刷物上に存在する汚れが点状であれば,点状の汚れについては線状の汚れほど問題とされない。 On the other hand, if the stain existing on the printed material is a dot, the dot stain is not a problem as much as a linear stain.
検査レベルを厳しくする(良品および不良品の判定に用いられる上述の一定面積を小さくする)ことによって,点状の汚れおよび線状の汚れのいずれについても,厳しく検査することができるが,上述のように,汚れの形状が点状であり不良品と判定する必要のない程度の大きさであったとしても不良品と判定されてしまう。逆に検査レベルを緩やかにすると,線状の汚れが含まれている印刷物を良品と判定するおそれがある。 By tightening the inspection level (decreasing the above-mentioned fixed area used for the determination of non-defective products and defective products), it is possible to strictly inspect both dotted and linear stains. Thus, even if the shape of the dirt is point-like and the size is such that it does not need to be determined as a defective product, it is determined as a defective product. On the other hand, if the inspection level is moderated, there is a possibility that a printed matter containing linear stains is determined as a good product.
この発明は,汚れ等の形状に応じて検査レベルを異ならせることを目的とする。 It is an object of the present invention to vary the inspection level according to the shape of dirt or the like.
この発明による検査装置(欠陥検出装置と言ってもよい)は,基準画像を表す基準画像データを記憶する第1のメモリ,検査対象物を読取ることによって得られる被検査画像を表す被検査画像データを記憶する第2のメモリ,上記第1のメモリに記憶された基準画像データと第2のメモリに記憶された被検査画像データとを画素ごとに比較して差を求め,求めた差を2値化処理することにより2値画像データを生成する2値画像データ生成手段,上記2値画像データ生成手段によって生成された2値画像データをラベリングして,欠陥候補クラスタ画像を検出する欠陥候補クラスタ画像検出手段,上記欠陥候補クラスタ画像検出手段によって検出された欠陥候補クラスタ画像の形状傾向を判断する形状傾向判断手段,および上記形状傾向判断手段によって判断された上記欠陥候補クラスタ画像の形状傾向に応じたしきい値を用いて,上記欠陥候補クラスタ画像を欠陥画像として取り扱うべきかどうかを判定する判定手段を備えたものである。基準画像データを記憶する第1のメモリと被検査画像データを記憶する第2のメモリは同じものであっても異なるものであってもよい。同じメモリを用いる場合には,メモリの異なる領域がそれぞれ第1のメモリおよび第2のメモリとして用いられる。 An inspection apparatus (also referred to as a defect detection apparatus) according to the present invention includes a first memory for storing reference image data representing a reference image, and inspected image data representing an inspected image obtained by reading an inspection object. The reference image data stored in the first memory and the inspected image data stored in the second memory are compared for each pixel to obtain a difference, and the obtained difference is 2 Binary image data generating means for generating binary image data by binarization processing, defect candidate cluster for detecting a defect candidate cluster image by labeling the binary image data generated by the binary image data generating means Image detecting means, shape tendency determining means for determining a shape tendency of the defect candidate cluster image detected by the defect candidate cluster image detecting means, and shape tendency determination Using a threshold value corresponding to the shape tendency of the defect candidate cluster image is determined by the stage, in which with a judging means for judging whether to deal with the defect candidate cluster image as a defect image. The first memory that stores the reference image data and the second memory that stores the image data to be inspected may be the same or different. When the same memory is used, different areas of the memory are used as the first memory and the second memory, respectively.
この発明による検査方法(欠陥検出方法)は,検査対象物を読取ることによって得られる被検査画像を表す被検査画像データをメモリに記憶し,上記メモリに記憶された被検査画像データとあらかじめ登録された基準画像を表す基準画像データとを画素ごとに比較して差を求め,求めた差を2値化処理することにより2値画像データを生成し,生成した2値画像データをラベリングして欠陥候補クラスタ画像を検出し,上記欠陥候補クラスタ画像の形状傾向を判断し,上記欠陥候補クラスタ画像の形状傾向に応じたしきい値を用いて,上記欠陥候補クラスタ画像を欠陥画像として取り扱うべきかどうかを判定するものである。 The inspection method (defect detection method) according to the present invention stores inspected image data representing an inspected image obtained by reading an inspection object in a memory, and is registered in advance with the inspected image data stored in the memory. Compare the reference image data representing the reference image for each pixel to obtain a difference, binarize the obtained difference to generate binary image data, and label the generated binary image data to create a defect. Whether to detect the candidate cluster image, determine the shape tendency of the defect candidate cluster image, and use the threshold value according to the shape tendency of the defect candidate cluster image to treat the defect candidate cluster image as a defect image Is determined.
この発明によると,2値化処理およびラベリング処理によって得られる欠陥候補クラスタ画像の形状傾向が判断され,形状傾向に応じたしきい値が用いられて欠陥候補クラスタ画像に対する検査が行われる。欠陥候補クラスタ画像の形状傾向に応じてしきい値を異ならせることができる。したがって,欠陥候補クラスタ画像の形状傾向に応じた検査レベル(判定の厳しさ,緩やかさ)によって,欠陥候補クラスタ画像ごとの検査を実行することができる。 According to the present invention, the shape tendency of the defect candidate cluster image obtained by the binarization process and the labeling process is judged, and the defect candidate cluster image is inspected using the threshold value corresponding to the shape tendency. The threshold value can be made different according to the shape tendency of the defect candidate cluster image. Therefore, it is possible to execute inspection for each defect candidate cluster image at an inspection level (strictness of judgment and gentleness) according to the shape tendency of the defect candidate cluster image.
欠陥候補クラスタ画像の形状傾向の判断では,たとえば,欠陥候補クラスタ画像が,存在がほとんど許容されない形状傾向を持つものであるか否か,または多少の存在は許容される形状傾向を持つものであるか否かが判断(区別)される。一実施態様では,欠陥候補クラスタ画像が線状の形状であるか,または線状の形状でないかが区別される。欠陥候補クラスタ画像が点状の形状であるか,または点状の形状でないかを区別してもよい。線状の形状を持つ汚れ等は,たとえ小さいものであっても印刷の品質上その存在は許容できないので,欠陥候補クラスタ画像が線状の形状を持つと判断された場合には,比較的厳しい検査レベル(しきい値)によってその欠陥候補クラスタ画像が検査される。他方,欠陥候補クラスタ画像が点状の形状であることが判断された場合には,比較的緩い検査レベル(しきい値)によって欠陥候補クラスタ画像を検査すればよい。このように,印刷の品質の観点から,欠陥候補クラスタ画像の形状傾向は判断または区別することができる。 In determining the shape tendency of the defect candidate cluster image, for example, whether the defect candidate cluster image has a shape tendency in which the existence of the defect candidate cluster image is almost unacceptable or has a shape tendency in which some existence is allowed. It is judged (differentiated). In one embodiment, it is distinguished whether the defect candidate cluster image is a linear shape or not a linear shape. It may be distinguished whether the defect candidate cluster image has a point-like shape or not a point-like shape. Even if it is small, the presence of stains having a linear shape is unacceptable in terms of print quality, so if it is determined that the defect candidate cluster image has a linear shape, it is relatively severe. The defect candidate cluster image is inspected according to the inspection level (threshold value). On the other hand, if it is determined that the defect candidate cluster image has a dot-like shape, the defect candidate cluster image may be inspected with a relatively loose inspection level (threshold value). In this way, the shape tendency of the defect candidate cluster image can be judged or distinguished from the viewpoint of printing quality.
一実施態様では,少なくとも1つの欠陥画像の存在が判定された場合には,上記検査対象物に欠陥があると判定される。検査対象物に欠陥がある判定されると,たとえば,その検査対象物は製造ライン,検査ライン等から取り除かれる。 In one embodiment, when the presence of at least one defect image is determined, it is determined that the inspection object has a defect. When it is determined that the inspection object is defective, for example, the inspection object is removed from the production line, the inspection line, and the like.
好ましくは,上記形状傾向判断手段は,上記欠陥候補クラスタ画像に外接する所定形状,たとえば矩形,円形,ひし形等の形状の領域を設定する外接領域設定手段を備え,上記外接領域設定手段によって設定された外接領域の大きさと,上記外接領域の内部に存在する上記欠陥候補クラスタ画像の大きさとの比率に基づいて,欠陥候補クラスタ画像の形状傾向を判断する。たとえば,欠陥候補クラスタ画像が点状の形状であれば外接領域に対する欠陥候補クラスタ画像の大きさの比率は大きくなり,欠陥候補クラスタ画像が線状の形状であれば外接領域に対する欠陥候補クラスタ画像の大きさの比率は小さくなるので,この比率に基づいて欠陥候補クラスタ画像の形状傾向(点状であるか,線状であるか等)を判断(区別)することができる。 Preferably, the shape tendency determining means includes circumscribed area setting means for setting a predetermined shape circumscribed on the defect candidate cluster image, for example, an area having a shape such as a rectangle, a circle, and a rhombus, and is set by the circumscribed area setting means. The shape tendency of the defect candidate cluster image is determined based on the ratio between the size of the circumscribed area and the size of the defect candidate cluster image existing inside the circumscribed area. For example, if the defect candidate cluster image is a dot shape, the ratio of the size of the defect candidate cluster image to the circumscribing region is large, and if the defect candidate cluster image is a linear shape, the defect candidate cluster image is a linear shape. Since the size ratio is small, the shape tendency (whether it is point-like or linear) of the defect candidate cluster image can be determined (differentiated) based on this ratio.
さらに好ましくは,ラベリング処理された2値画像を所定形状の探索領域によって走査する(たとえば,ラスタ走査する)ことにより,上記探索領域内に複数の欠陥候補クラスタ画像が入るかどうかを判断する探索手段,および上記探索領域に入った複数の欠陥候補クラスタ画像を統合する統合手段が備えられる。たとえば,線状の汚れ等の画像を構成する複数の画素が2値化処理において分断されると,そのそれぞれが独立した欠陥候補クラスタ画像として認識されてしまい,線状の欠陥候補クラスタ画像として認識されるべき欠陥候補クラスタ画像が点状の欠陥候補クラスタ画像として認識されてしまうおそれがある。分断された複数の欠陥候補クラスタ画像が統合手段によって統合されるので,線状の形状傾向を持つと判断されるべき欠陥候補クラスタ画像が,点状の形状傾向を持つと判断されてしまうのを防止することができる。 More preferably, a search means for determining whether or not a plurality of defect candidate cluster images are included in the search area by scanning the labeled binary image with a search area having a predetermined shape (for example, raster scanning). And integration means for integrating a plurality of defect candidate cluster images that have entered the search area. For example, when a plurality of pixels constituting an image such as a linear stain are divided in the binarization process, each pixel is recognized as an independent defect candidate cluster image, and is recognized as a linear defect candidate cluster image. There is a possibility that a defect candidate cluster image to be recognized is recognized as a point-like defect candidate cluster image. Since the plurality of divided defect candidate cluster images are integrated by the integration means, the defect candidate cluster image that should be determined to have a linear shape tendency is determined to have a point-like shape tendency. Can be prevented.
図1は,検査システムの一部を概略的に示すものである。 FIG. 1 schematically shows a part of an inspection system.
検査システムは,検査対象物,たとえば印刷物をカメラによって読取り,得られた印刷物の画像データに基づいて印刷物を検査するシステムである。検査は,画像処理,すなわち,検査対象の印刷物から得られた画像データとあらかじめ取得された基準画像データとを比較し,その結果が所定の条件を満たすかどうかを判定すること等により行われる。検査システムでは,印刷物における印刷上の欠陥,たとえば,汚れ,抜けなど,の存在の有無が判定される。 The inspection system is a system in which an inspection object, for example, a printed material is read by a camera, and the printed material is inspected based on image data of the obtained printed material. The inspection is performed by image processing, that is, by comparing image data obtained from a printed material to be inspected with reference image data acquired in advance and determining whether the result satisfies a predetermined condition. In the inspection system, it is determined whether or not there is a printing defect in the printed matter, such as dirt or missing.
検査システムにおいて,印刷物Sは搬送装置(図示略)によって搬送路上を搬送される。搬送路の上方にはカメラ2および線状照明光源3が固定的に設けられている。カメラ2はCCDラインセンサを含み,CCDラインセンサが搬送路の搬送方向に直交する方向を走査方向とするように固定されている。搬送路上を搬送される印刷物Sの絵柄等が,所定位置においてカメラ2によって読取られる。線状照明光源3は搬送路の幅方向(搬送方向に直交する方向)にのび,搬送路上のカメラ2による読取り位置をその全体にわたって照明する。
In the inspection system, the printed matter S is transported on the transport path by a transport device (not shown). A
カメラ2によって得られた画像データは検査装置1に入力する。図2は検査装置1の電気的構成を示すブロック図である。
Image data obtained by the
検査装置1は,カメラ2からの画像データ(以下,被検査画像データという)を用いて被検査画像(印刷物)の良否を判定する良否判定装置4,被検査画像データと比較される基準画像データを記憶した記憶装置5,基準画像データおよび被検査画像データ等が一時的に記憶されるメモリ6,しきい値の設定等に用いられる入力装置7,および良否判定結果等を表示する表示装置8を備えている。良否判定装置4は汎用性のあるコンピュータ装置であってもよい。この場合には,コンピュータ装置を良否判定装置4として動作させるためのプログラムおよびデータが記憶装置5に記憶される。記憶装置5から読み出されたプログラムおよびデータが実行されることによって,コンピュータ装置が良否判定装置4として機能(動作)する。
The
図3および図4は,良否判定装置4において行われる良否判定処理の処理手順を示すフローチャートである。
FIG. 3 and FIG. 4 are flowcharts showing the processing procedure of the pass / fail determination process performed in the pass /
記憶装置5に記憶されている基準画像を表すカラーの基準画像データがメモリ6に読込まれる。カメラ2によって読取られた被検査画像i(i=1,2,・・・)を表すカラーの被検査画像データが良否判定装置4に与えられてメモリ6に記憶される。基準画像データおよび被検査画像データが用いられて,以下に説明する検査(良否判定処理)が行われる。
Color reference image data representing a reference image stored in the storage device 5 is read into the
基準画像と被検査画像iの差の算出処理が行われる(ステップ11)。この処理では,基準画像と被検査画像iが,画素ごとに,かつR成分,G成分およびB成分のそれぞれごとに比較されて差が算出され,その後RGB成分ごとの差を表すデータが合成される。照明のむらを無くすために,さらにMAXフィルタを用いてMAX処理を行ってもよい。 A calculation process of the difference between the reference image and the image to be inspected i is performed (step 11). In this process, the reference image and the image to be inspected i are compared for each pixel and for each of the R component, the G component, and the B component to calculate a difference, and then data representing the difference for each RGB component is synthesized. The In order to eliminate uneven illumination, MAX processing may be performed using a MAX filter.
画素ごとの差を表すデータに対して,所定のしきい値を用いて2値化処理(しきい値処理)が行われる(ステップ12)。2値化処理に用いるしきい値は固定値であってもよいし,特開平8−323963号公報に記載されているように,被検査画像に応じて変動する値であってもよい。また,2値化処理に用いられるしきい値は検査(検出)すべき欠陥の種類(汚れ,欠けなど)に応じて異ならせてもよい。2値化処理によって,たとえば基準画像と被検査画像との間にしきい値以上の明るさの差が存在する画素(以下,差分画素という)を「1」,基準画像と被検査画像との間にしきい値以上の明るさの差がない画素を「0」とする2値画像データが得られる。 Binarization processing (threshold processing) is performed on the data representing the difference for each pixel using a predetermined threshold (step 12). The threshold value used for the binarization process may be a fixed value, or may be a value that varies depending on the image to be inspected, as described in JP-A-8-323963. Further, the threshold value used for the binarization process may be varied according to the type of defect (dirt, chipped, etc.) to be inspected (detected). By binarization processing, for example, a pixel having a brightness difference equal to or greater than a threshold value between the reference image and the image to be inspected (hereinafter referred to as a difference pixel) is “1”, and between the reference image and the image to be inspected. Binary image data in which the pixels having no brightness difference equal to or greater than the threshold value “0” are obtained.
2値画像データによって表される2値画像に含まれる差分画素の数と,あらかじめ記憶装置5に記憶されている欠陥候補判定画素数とが比較される(ステップ13)。差分画素数が欠陥候補判定画素数よりも多い場合,すなわち,被検査画像iに存在する差分画素数が所定値よりも多い場合に,被検査画像iは欠陥候補画像であると判定されて,次の処理に進む。他方,差分画素数が欠陥候補判定画素数以下であれば,被検査画像iに欠陥(汚れ等)はないと判定されて次の被検査画像i+1についての処理に進む(ステップ13でNO,ステップ14)。差分画素数と比較される欠陥判定画素数も,検査すべき欠陥の種類(汚れ,欠けなど)に応じて異ならせることができる。
The number of difference pixels included in the binary image represented by the binary image data is compared with the number of defect candidate determination pixels stored in advance in the storage device 5 (step 13). When the difference pixel number is larger than the defect candidate determination pixel number, that is, when the difference pixel number existing in the inspected image i is larger than a predetermined value, the inspected image i is determined to be a defect candidate image, Proceed to the next process. On the other hand, if the difference pixel number is less than or equal to the defect candidate determination pixel number, it is determined that there is no defect (dirt or the like) in the inspected image i, and the process proceeds to the next inspected image i + 1 (NO in
被検査画像iが欠陥候補画像であるかどうかは,上述のように,被検査画像iから得られる2値画像に含まれる差分画素の数に応じて判定される(ステップ13)。しかしながら,差分画素の数が少なくても画像全体(印刷物全体)としては良品と判定するのは好ましくない場合もある。差分画素の数が多くても,画像全体(印刷物全体)としては不良品と判定する必要のないものも存在する。 Whether the inspected image i is a defect candidate image is determined according to the number of difference pixels included in the binary image obtained from the inspected image i as described above (step 13). However, even if the number of difference pixels is small, it may not be preferable to determine that the entire image (the entire printed matter) is a non-defective product. Even if the number of difference pixels is large, there is a whole image (entire printed matter) that does not need to be determined as a defective product.
印刷物上に線状の汚れが存在し,このため被検査画像に含まれる差分画素のかたまり(集合)が線状の形状を持つものであるとする。線状の汚れは,印刷物を視認する看者の注目が集まりやすく,たとえ印刷物に占めている割合が小さくても,その存在は印刷の品質上,好ましくない。 It is assumed that linear stains are present on the printed matter, and therefore a group (set) of difference pixels included in the inspected image has a linear shape. The linear stains tend to attract attention of the viewer who visually recognizes the printed matter. Even if the proportion of the linear stain is small, its presence is not preferable in terms of printing quality.
これに対し,印刷物上にインクたれ,インク飛び等によって生じた点状の汚れが存在し,このため被検査画像に含まれる差分画素のかたまりが点状の形状を持つものであるとする。点状の汚れについては上述の線状の汚れほどは問題とされない。 On the other hand, it is assumed that there are dot-like stains caused by ink spills, ink jumps, etc. on the printed matter, and therefore, a group of difference pixels included in the image to be inspected has a dot-like shape. The dot-like stain is not as problematic as the linear stain described above.
検査装置1は,以下に説明するように,欠陥候補画像に対して,そこに含まれる差分画素の集合(クラスタ,かたまり)の形状を判断(区別)して,その形状に応じたしきい値に基づいて差分画素の集合を対象にした良否判定を行うことによって,欠陥候補画像に欠陥が含まれるかどうか(印刷物を良品とするか,不良品とするか)をさらに判定する。
As will be described below, the
欠陥候補画像と判定された被検査画像iから得られた2値画像データに対して,判定精度を高めるために,孤立差分画素(8方向または4方向に隣接する画素に差分画素が存在しない差分画素)の除去が行われる(ステップ15)。孤立差分画素が見つかった場合,孤立差分画素(たとえば,2値画像上の黒画素)を,差分がない画素(2値画像上の白画素)に変更する画像処理が行われる。 In order to improve the determination accuracy for the binary image data obtained from the inspected image i determined to be a defect candidate image, an isolated difference pixel (a difference in which a difference pixel does not exist in pixels adjacent to the eight or four directions) Pixels are removed (step 15). When an isolated difference pixel is found, image processing is performed to change the isolated difference pixel (for example, a black pixel on the binary image) to a pixel having no difference (a white pixel on the binary image).
次にラベリング処理が行われる(ステップ14)。図5に示すように,8方向(4方向でもよい)に隣接している複数の差分画素に同じラベル(符号,番号等)が属性として付与され,同じラベルが付与された差分画素の集合がグループ化またはクラスタリングされる。同じラベルが付与された差分画素の集合を,以下,欠陥候補クラスタ画像という。 Next, a labeling process is performed (step 14). As shown in FIG. 5, the same label (symbol, number, etc.) is assigned as an attribute to a plurality of difference pixels adjacent in 8 directions (or 4 directions), and a set of difference pixels assigned the same label Grouped or clustered. A set of difference pixels assigned the same label is hereinafter referred to as a defect candidate cluster image.
欠陥候補クラスタ画像のそれぞれについて,外接矩形が設定される(ステップ17)。 A circumscribed rectangle is set for each defect candidate cluster image (step 17).
図6(A),(B)は欠陥候補クラスタ画像に設定される外接矩形の例を示している。外接矩形は,欠陥候補クラスタ画像を構成する差分画素の中で,最小のX座標をもつ画素のX座標をXmin ,最大のX座標をもつ画素のX座標をXmax ,最小のY座標をもつ画素のY座標をYmin および最大のY座標をもつ画素のY座標をYmax としたときに,座標(Xmin ,Ymax ),座標(Xmax ,Ymin )で表される2点を対角にもつ矩形である。 6A and 6B show examples of circumscribed rectangles set in the defect candidate cluster image. The circumscribed rectangle is a pixel having the minimum X coordinate, Xmin, the X coordinate of the pixel having the maximum X coordinate, and the maximum Y coordinate of the difference pixels constituting the defect candidate cluster image. When the Y coordinate of Ymin is Ymin and the Y coordinate of the pixel having the largest Y coordinate is Ymax, the rectangle is diagonal with two points represented by coordinates (Xmin, Ymax) and coordinates (Xmax, Ymin) .
図6(A)を参照して,欠陥候補クラスタ画像NG1の形状が点状の形状であれば,外接矩形R1を占める欠陥候補クラスタ画像NG1の割合は大きい。他方,図6(B)を参照して,欠陥候補クラスタ画像NG2の形状が線状の形状であれば,外接矩形R2を占める欠陥候補クラスタ画像NG2の割合は小さい。後述するように,外接矩形を占める欠陥候補クラスタ画像の割合に応じて,欠陥候補クラスタ画像の形状が,点状の形状であるか,または線状の形状であるか(点状の形状でないか)が判別される。 Referring to FIG. 6A, if the defect candidate cluster image NG1 has a dot shape, the ratio of the defect candidate cluster image NG1 occupying the circumscribed rectangle R1 is large. On the other hand, referring to FIG. 6B, if the defect candidate cluster image NG2 has a linear shape, the ratio of the defect candidate cluster image NG2 occupying the circumscribed rectangle R2 is small. As will be described later, depending on the proportion of defect candidate cluster images occupying the circumscribed rectangle, whether the shape of the defect candidate cluster image is a dot shape or a linear shape (whether it is not a dot shape) ) Is determined.
外接矩形に対する欠陥候補クラスタ画像の割合(以下,面積比率という)が算出される(ステップ18)。面積比率は次式によって算出される。 The ratio of defect candidate cluster images to the circumscribed rectangle (hereinafter referred to as area ratio) is calculated (step 18). The area ratio is calculated by the following formula.
面積比率=欠陥候補クラスタ画像の面積/(外接矩形の幅Wまたは高さHのうちいずれか長い方の長さ)2 Area ratio = area of defect candidate cluster image / (length of circumscribed rectangle width W or height H, whichever is longer) 2
ここで,欠陥候補クラスタ画像の面積は,欠陥候補クラスタ画像を構成する差分画素の数に基づいて算出される。 Here, the area of the defect candidate cluster image is calculated based on the number of difference pixels constituting the defect candidate cluster image.
上記の算出式において,欠陥候補クラスタ画像の面積を除算する値に外接矩形の面積を用いていないのは,図7の上段に示すように,欠陥候補クラスタ画像NG3の形状が線状であるにもかかわらず,それが直線状であって,かつ横軸(X軸)または縦軸(Y軸)に平行であったとすると,欠陥候補クラスタ画像NG3の面積が外接矩形の面積とほぼ一致してしまい,面積比率が大きくなってしまうからである。上述の算出式を用いることによって,図7の下段に示すように,欠陥候補クラスタ画像NG3の形状が直線状であり,かつ横軸(X軸)または縦軸(Y軸)に平行であったとしても,外接矩形R3が大きくなるので,面積比率を小さい値とすることができる。 In the above calculation formula, the circumscribed rectangular area is not used as the value for dividing the area of the defect candidate cluster image because the shape of the defect candidate cluster image NG3 is linear as shown in the upper part of FIG. Nevertheless, if it is linear and parallel to the horizontal axis (X axis) or the vertical axis (Y axis), the area of the defect candidate cluster image NG3 substantially matches the area of the circumscribed rectangle. This is because the area ratio becomes large. By using the above calculation formula, as shown in the lower part of FIG. 7, the shape of the defect candidate cluster image NG3 is linear and parallel to the horizontal axis (X axis) or the vertical axis (Y axis). However, since the circumscribed rectangle R3 becomes large, the area ratio can be set to a small value.
2値画像中に複数の欠陥候補クラスタ画像が含まれている場合には,複数の欠陥候補クラスタ画像のそれぞれについて,上述の面積比率が算出される。 When a plurality of defect candidate cluster images are included in the binary image, the above-described area ratio is calculated for each of the plurality of defect candidate cluster images.
次に,周辺サーチ処理が行われる(ステップ19)。 Next, a peripheral search process is performed (step 19).
上述した2値化処理において細長い線状の汚れ等が複数に***し,この結果,ラベリング処理によって***した欠陥候補クラスタ画像のそれぞれに異なるラベルが付与されることがある。この場合,線状と判断されるべき欠陥候補クラスタ画像が,点状と判断されてしまう可能性が生じる。周辺サーチ処理はこれを避けるための処理である。 In the binarization process described above, slender, linear stains and the like are split into a plurality of parts, and as a result, different labels may be assigned to the defect candidate cluster images split by the labeling process. In this case, there is a possibility that a defect candidate cluster image that should be determined to be linear is determined to be point-like. The peripheral search process is a process for avoiding this.
図8(A)を参照して,周辺サーチ処理では,所定の大きさの矩形のサーチ・エリアSAによってラベリング処理後の2値画像データが走査される。サーチ・エリアSAに,複数の,たとえば2つの欠陥候補クラスタ画像が入った場合(すなわち,2つの欠陥候補クラスタ画像が所定距離よりも近い位置に存在する場合),その2つの欠陥候補クラスタ画像のそれぞれについて算出された面積比率は破棄される。2つの欠陥候補クラスタ画像が一つに統合されて,統合後の欠陥候補クラスタ画像に対して再度面積比率が算出される。図8(A),(B)に示す例の場合,番号2で示す欠陥候補クラスタ画像(以下,欠陥候補クラスタ画像2という)と,番号3で示す欠陥候補クラスタ画像(以下,欠陥候補クラスタ画像3という)のそれぞれについて算出された面積比率が破棄され,欠陥候補クラスタ画像2および欠陥候補クラスタ画像3が一つの欠陥候補クラスタ画像4に統合されて,この欠陥候補クラスタ画像4について面積比率が算出されることになる。これにより,線状と判断されるべき欠陥候補クラスタ画像が,点状と判断される可能性を低くすることができる。
Referring to FIG. 8A, in the peripheral search process, binary image data after the labeling process is scanned by a rectangular search area SA having a predetermined size. When a plurality of, for example, two defect candidate cluster images are included in the search area SA (that is, when two defect candidate cluster images exist at a position closer than a predetermined distance), the two defect candidate cluster images The area ratio calculated for each is discarded. The two defect candidate cluster images are integrated into one, and the area ratio is calculated again for the integrated defect candidate cluster image. In the example shown in FIGS. 8A and 8B, the defect candidate cluster image indicated by number 2 (hereinafter referred to as defect candidate cluster image 2) and the defect candidate cluster image indicated by number 3 (hereinafter referred to as defect candidate cluster image). 3) are discarded, the defect
もちろん,周辺サーチ処理(ステップ19)を先に行い,その後に面積比率の算出(ステップ18)を行ってもよいのは言うまでもない。 Of course, it goes without saying that the peripheral search process (step 19) may be performed first, and then the area ratio may be calculated (step 18).
欠陥候補クラスタ画像j(j=1,2,・・・)およびその面積比率がメモリに読込まれる(ステップ20)。欠陥候補クラスタ画像jの面積比率が比較的大きい,たとえば,0.785 以上の場合(ステップ21でYES ),その面積比率をもつ欠陥候補クラスタ画像jは点状の形状を持つと判断される。これに対し,面積比率が0.785 より小さいときは(ステップ21でNO),その面積比率をもつ欠陥候補クラスタ画像jは線状の形状を持つ(点状の形状を持たない)と判断される。欠陥候補クラスタ画像jが点状の形状を持つかまたは線状の形状を持つかの判断に用いられる面積比率の比較値(上述の0.785 )は,入力装置7を用いて調整することができ,0.785 以外の数値とすることができるのは言うまでもない。 The defect candidate cluster image j (j = 1, 2,...) And its area ratio are read into the memory (step 20). If the area ratio of the defect candidate cluster image j is relatively large, for example, 0.785 or more (YES in step 21), it is determined that the defect candidate cluster image j having the area ratio has a dot shape. On the other hand, when the area ratio is smaller than 0.785 (NO in step 21), it is determined that the defect candidate cluster image j having the area ratio has a linear shape (no dot shape). The comparison value of the area ratio (0.785 described above) used for determining whether the defect candidate cluster image j has a dot shape or a line shape can be adjusted using the input device 7. Needless to say, the value can be other than 0.785.
点状の形状を持つ欠陥候補クラスタ画像j,および線状の形状を持つ欠陥候補クラスタ画像jのそれぞれについて,異なるしきい値(欠陥判定画素数)が用いられて,欠陥候補クラスタ画像jに対する欠陥判定が行われる(ステップ22,23)。上述したように,汚れ等の形状が点状である場合には,線状である場合ほどは問題とされないので,点状の形状を持つ欠陥候補クラスタ画像jに対しては欠陥判定画素数として比較的大きい数が用いられる(すなわち,比較的緩い検査レベルが設定される)。点状の形状を持つ欠陥候補クラスタ画像jを構成する差分画素数と,点状用の欠陥判定画素数とが比較され,差分画素数が点状用の欠陥判定画素数よりも多い場合に,その欠陥候補クラスタ画像jは点状の欠陥画像である(印刷物に点状欠陥が存在する)と判定される(ステップ22でYES ,ステップ24)。
For each of the defect candidate cluster image j having a dot shape and the defect candidate cluster image j having a linear shape, a different threshold value (number of defect determination pixels) is used, and the defect for the defect candidate cluster image j A determination is made (
これに対し,線状の汚れ等は,上述したように,印刷物を視認する看者の注目が集まりやすく,たとえ線状の汚れが印刷物を占めている割合が小さくても,その存在は印刷の品質上好ましくない。このため線状の形状を持つ欠陥候補クラスタ画像jに対しては,欠陥判定画素数として小さい値が用いられる(すなわち,比較的厳しい検査レベルが設定される)。線状の形状を持つ欠陥候補クラスタ画像jを構成する差分画素の数と,線状用の欠陥判定画素数とが比較され,差分画素数が線状用の欠陥判定画素数よりも多い場合に,その欠陥候補クラスタ画像jは線状の欠陥画像である(印刷物に線状欠陥が存在する)と判定される(ステップ23でYES ,ステップ25)。
On the other hand, as described above, linear stains tend to attract attention from viewers who see the printed matter. Even if the proportion of linear stains is small, the presence of printed stains is It is not preferable in terms of quality. For this reason, for the defect candidate cluster image j having a linear shape, a small value is used as the number of defect determination pixels (that is, a relatively strict inspection level is set). When the number of difference pixels constituting the defect candidate cluster image j having a linear shape is compared with the number of line defect determination pixels, and the number of difference pixels is larger than the number of line defect determination pixels. The defect candidate cluster image j is determined to be a linear defect image (a linear defect exists in the printed matter) (YES in
欠陥候補クラスタ画像jの画素数と比較される点状用の欠陥判定画素数および線状用の欠陥判定画素数(ステップ22,23)も,検出すべき欠陥の種類(汚れ,欠けなど)に応じて異ならせることができる。
The number of defect determination pixels for dots and the number of defect determination pixels for lines (
欠陥候補クラスタ画像jが点状の欠陥画像であること,または欠陥候補クラスタ画像jが線状の欠陥画像であることが判定された場合には,その欠陥候補クラスタ画像jを含む被検査画像iに欠陥が存在すると判定され,被検査画像iに対応する印刷物は不良品として扱われることになる。被検査画像iに対する処理が終了し,被検査画像iに対応する印刷物は検査ラインから除去される。次の被検査画像i+1に対する処理に進む(ステップ28でNO,ステップ29)。
When it is determined that the defect candidate cluster image j is a point-like defect image or the defect candidate cluster image j is a linear defect image, the inspected image i including the defect candidate cluster image j Therefore, the printed matter corresponding to the inspected image i is treated as a defective product. The processing for the inspected image i is completed, and the printed matter corresponding to the inspected image i is removed from the inspection line. The process proceeds to the next inspected image i + 1 (NO in
欠陥候補クラスタ画像jが点状の欠陥画像でも,線状の欠陥画像でもないと判定されると(ステップ22でNO,ステップ23でNO),被検査画像iに含まれる他の欠陥候補クラスタ画像j+1に対する処理に進む(ステップ26でNO,ステップ27)。
If it is determined that the defect candidate cluster image j is neither a point defect image nor a line defect image (NO in
被検査画像iに含まれるすべての欠陥候補クラスタ画像jが,点状の欠陥画像でも線状の欠陥画像でもないと判定されると(ステップ26でYES ),被検査画像iに対応する印刷物は良品として扱われることになる。次の被検査画像i+1についての処理に進む(ステップ28でNO,ステップ29)。すべて被検査画像iについての処理が終了すると(ステップ28でYES ),良否判定処理が終了する。
If it is determined that all defect candidate cluster images j included in the inspected image i are neither point-like defect images nor linear defect images (YES in step 26), the printed matter corresponding to the inspected image i is It will be treated as a good product. The process proceeds to the next inspected image i + 1 (NO in
上述した実施例では,欠陥候補クラスタ画像jに規定される外接領域の形状として矩形を例にしている(図6(A),(B),図7参照)。円形,ひし形等の他の形状を,外接領域の形状に採用してもよい。たとえば,外接領域の形状に円形を用いる場合には,欠陥候補クラスタ画像jの重心位置を算出し,算出された重心位置を中心としかつ重心位置から最も遠い差分画素までの距離を半径とする外接円が用いられる。差分面積比率は,欠陥候補クラスタ画像の面積を外接円の面積で除算することによって算出される。 In the embodiment described above, a rectangle is taken as an example of the shape of the circumscribed area defined in the defect candidate cluster image j (see FIGS. 6A, 6B, and 7). Other shapes such as a circle and a rhombus may be adopted as the shape of the circumscribed region. For example, when a circle is used for the shape of the circumscribed area, the centroid position of the defect candidate cluster image j is calculated, and the circumscribed area having the calculated centroid position as the center and the distance to the difference pixel farthest from the centroid position as the radius. A circle is used. The difference area ratio is calculated by dividing the area of the defect candidate cluster image by the area of the circumscribed circle.
1 検査装置
2 カメラ
4 良否判定装置
5 記憶装置
6 メモリ
1
Claims (5)
検査対象物を読取ることによって得られる被検査画像を表す被検査画像データを記憶する第2のメモリ,
上記第1のメモリに記憶された基準画像データと第2のメモリに記憶された被検査画像データとを画素ごとに比較して差を求め,求めた差を2値化処理することにより2値画像データを生成する2値画像データ生成手段,
上記2値画像データ生成手段によって生成された2値画像データをラベリングして,欠陥候補クラスタ画像を検出する欠陥候補クラスタ画像検出手段,
上記欠陥候補クラスタ画像検出手段によって検出された欠陥候補クラスタ画像が,あらかじめ定められる複数の形状傾向のうちのいずれの形状傾向を持つかを判断する形状傾向判断手段,および
上記形状傾向判断手段によって判断された上記欠陥候補クラスタ画像の形状傾向に応じて,形状傾向ごとに定められる,値の異なる同種のしきい値を用いて,上記欠陥候補クラスタ画像を欠陥画像として取り扱うべきかどうかを判定する判定手段,
を備えた検査装置。 A first memory for storing reference image data representing the reference image;
A second memory for storing inspected image data representing an inspected image obtained by reading an inspection object;
The reference image data stored in the first memory and the image data to be inspected stored in the second memory are compared for each pixel to obtain a difference, and binarization processing is performed by binarizing the obtained difference. Binary image data generation means for generating image data;
Defect candidate cluster image detection means for detecting defect candidate cluster images by labeling the binary image data generated by the binary image data generation means;
A shape tendency determining means for determining which of the plurality of predetermined shape trends the defect candidate cluster image detected by the defect candidate cluster image detecting means has, and a determination by the shape tendency determining means Judgment to determine whether or not the defect candidate cluster image should be handled as a defect image by using the same kind of threshold value, which is determined for each shape tendency, according to the shape tendency of the defect candidate cluster image. means,
Inspection device with
請求項1に記載の検査装置。 The determination means determines that the inspection object is defective if there is at least one defect image;
The inspection apparatus according to claim 1.
上記探索領域に入った複数の欠陥候補クラスタ画像を統合する統合手段を備えた,
請求項1に記載の検査装置。 Search means for determining whether or not a plurality of defect candidate cluster images are included in the search area by scanning the binary image subjected to the labeling process with a search area having a predetermined shape, and a plurality of defects in the search area With integration means to integrate candidate cluster images,
The inspection apparatus according to claim 1.
上記メモリに記憶された被検査画像データとあらかじめ登録された基準画像を表す基準画像データとを画素ごとに比較して差を求め,求めた差を2値化処理することにより2値画像データを生成し,
生成した2値画像データをラベリングして欠陥候補クラスタ画像を検出し,
上記欠陥候補クラスタ画像が,あらかじめ定められる複数の形状傾向のうちのいずれの形状傾向を持つかを判断し,
上記欠陥候補クラスタ画像の形状傾向に応じて,形状傾向ごとに定められる,値の異なる同種のしきい値を用いて,上記欠陥候補クラスタ画像を欠陥画像として取り扱うべきかどうかを判定する,
検査方法。
Storing inspected image data representing an inspected image obtained by reading the inspection object in a memory;
The inspection image data stored in the memory and reference image data representing a reference image registered in advance are compared for each pixel to obtain a difference, and the obtained difference is binarized to obtain binary image data. Generate
Detect the defect candidate cluster image by labeling the generated binary image data,
It is determined which of the plurality of predetermined shape trends the defect candidate cluster image has ,
In accordance with the shape tendency of the defect candidate cluster image, it is determined whether the defect candidate cluster image should be handled as a defect image by using the same type of threshold value, which is determined for each shape tendency and has different values .
Inspection method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007230881A JP5167731B2 (en) | 2007-09-06 | 2007-09-06 | Inspection apparatus and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007230881A JP5167731B2 (en) | 2007-09-06 | 2007-09-06 | Inspection apparatus and method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009063388A JP2009063388A (en) | 2009-03-26 |
JP5167731B2 true JP5167731B2 (en) | 2013-03-21 |
Family
ID=40558091
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007230881A Expired - Fee Related JP5167731B2 (en) | 2007-09-06 | 2007-09-06 | Inspection apparatus and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5167731B2 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8358830B2 (en) * | 2010-03-26 | 2013-01-22 | The Boeing Company | Method for detecting optical defects in transparencies |
JP5614243B2 (en) * | 2010-10-29 | 2014-10-29 | 信越半導体株式会社 | Evaluation method of silicon epitaxial wafer |
JP5545240B2 (en) * | 2011-02-22 | 2014-07-09 | 株式会社デンソー | Temporary assembly wire residual detection device and temporary assembly wire residual detection method |
JP6299203B2 (en) * | 2013-12-17 | 2018-03-28 | 株式会社リコー | Print inspection apparatus, print inspection method, and print inspection program |
TWI808595B (en) * | 2022-01-03 | 2023-07-11 | 友達光電股份有限公司 | Method for analyzing defect |
CN117723564B (en) * | 2024-02-18 | 2024-04-26 | 青岛华康塑料包装有限公司 | Packaging bag printing quality detection method and system based on image transmission |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0682724B2 (en) * | 1986-02-28 | 1994-10-19 | 株式会社東芝 | Wafer defect inspection system |
JPH07121582B2 (en) * | 1991-09-11 | 1995-12-25 | 大蔵省印刷局長 | Defect detection method and defect detection circuit in printed matter inspection apparatus |
JPH0976470A (en) * | 1995-09-20 | 1997-03-25 | Dainippon Printing Co Ltd | Printed matter inspecting device |
JP4318776B2 (en) * | 1998-10-26 | 2009-08-26 | 大日本印刷株式会社 | Nonuniformity inspection method and apparatus |
JP2001209793A (en) * | 2000-01-25 | 2001-08-03 | Matsushita Electric Ind Co Ltd | Method for classifying and detecting pattern defect |
JP3917431B2 (en) * | 2002-01-25 | 2007-05-23 | ペンタックス株式会社 | Optical member inspection method |
JP4396160B2 (en) * | 2003-07-31 | 2010-01-13 | 住友化学株式会社 | Foreign film inspection method for transparent film |
JP2006275802A (en) * | 2005-03-29 | 2006-10-12 | Nippon Steel Corp | Method and device for inspecting defect |
-
2007
- 2007-09-06 JP JP2007230881A patent/JP5167731B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009063388A (en) | 2009-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5167731B2 (en) | Inspection apparatus and method | |
JP4517826B2 (en) | Liquid level detection method | |
CN104331695A (en) | Robust round identifier shape quality detection method | |
JP2012026908A (en) | Defect inspection method and defect inspection device | |
JPH07159337A (en) | Fault inspection method for semiconductor element | |
JP4743231B2 (en) | Appearance inspection method and appearance inspection apparatus | |
JP2007024669A (en) | Inspection device and inspection method | |
JP5033076B2 (en) | Appearance inspection method and apparatus | |
JP4743230B2 (en) | Appearance inspection method and appearance inspection apparatus | |
JP2007017214A (en) | Inspection device and inspection method | |
JP4821647B2 (en) | Electronic component terminal position detection method | |
JP4403036B2 (en) | Soot detection method and apparatus | |
JP5033077B2 (en) | Method and apparatus for inspecting appearance of molded product | |
JPH03175343A (en) | Method for extracting flaw by inspection appearance | |
JP4420796B2 (en) | Container appearance inspection method | |
JP2008145192A (en) | Inspection device and method, and inspection information registering method | |
JP2006035505A (en) | Method and device for inspecting printed matter | |
JP2009074828A (en) | Flaw detection method and flaw detector | |
JP6260175B2 (en) | Sign panel inspection system, sign panel inspection method | |
JP2002267619A (en) | Defect inspection method and device therefor | |
JP6296585B1 (en) | Print lift detection apparatus, lift detection method, inspection apparatus, and inspection method | |
JP2019060836A (en) | Float detector and float detection method of print, inspection device, and inspection method | |
JP2010121958A (en) | Flaw detecting method and flaw detector | |
JP7300155B2 (en) | Teaching device in solid preparation appearance inspection, and teaching method in solid preparation appearance inspection | |
JP2006189294A (en) | Inspection method and device of irregular defect |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100426 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120206 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120228 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120426 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20121127 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121210 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5167731 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |