JP3557814B2 - Image inspection apparatus and method - Google Patents

Image inspection apparatus and method Download PDF

Info

Publication number
JP3557814B2
JP3557814B2 JP29120896A JP29120896A JP3557814B2 JP 3557814 B2 JP3557814 B2 JP 3557814B2 JP 29120896 A JP29120896 A JP 29120896A JP 29120896 A JP29120896 A JP 29120896A JP 3557814 B2 JP3557814 B2 JP 3557814B2
Authority
JP
Japan
Prior art keywords
image
inspection
value
small
area
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 - Lifetime
Application number
JP29120896A
Other languages
Japanese (ja)
Other versions
JPH10124678A (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.)
Omron Corp
Original Assignee
Omron Corp
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 Omron Corp filed Critical Omron Corp
Priority to JP29120896A priority Critical patent/JP3557814B2/en
Publication of JPH10124678A publication Critical patent/JPH10124678A/en
Application granted granted Critical
Publication of JP3557814B2 publication Critical patent/JP3557814B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【0001】
【発明の属する技術分野】
本発明は、ディジタル画像のパターンマッチング技術を用いて製品の検査、照合、仕分け等を行う画像検査装置および方法に関する。
【0002】
【従来の技術】
パターンマッチング技術が応用される分野の中に、対象物品の画像を認識し、基準となる既知画像とのマッチングを行って、その良否を判定する検査システムがある。このような検査システムでは、対象物品をコンベア等によって移送し、対象物品の表面に付された文字、記号または模様等のパターンを撮像装置を用いて撮像し、その撮像画像と予め登録した既知画像とのマッチング結果から対象物品の良否を判定するようにしている。
【0003】
【発明が解決しようとする課題】
しかし、対象物品が少量多品種に及ぶ場合は、良否の判定パラメータをマニュアルオペレーションによってその都度設定する作業が必要となり、多大の労力を要していた。
【0004】
そこで、予め複数の判定パラメータを登録しておいて適宜切り替える方法や、学習方式による実物ワークからマッチングに必要な判定パラメータを自動的に抽出して登録する方法などがある。
【0005】
しかし、前者の方法では、やはりマニュアルオペレーションによって切り替えるため労力を要し、かつオペレータの主観によって切り替えるため、オペレータによって判定基準が変動するという不都合がある。また、後者の方法では、数個の対象物品を検査した後でなければ判定パラメータを抽出できないため、少量多品種の対象物品には適さないといった不都合がある。判定パラメータが最適化されないと、良品を不良品と誤判定したり、不良品を良品と誤判定したりして十分なマッチング精度が得られないとった不都合がある。
【0006】
本発明は、このような従来の課題を解決するためになされたもので、最適な判定パラメータを自動的に調整して得ることができる画像検査装置および方法を提供することを目的とする。
【0007】
【課題を解決するための手段】
本発明の請求項1に記載の発明は、対象物品の画像を認識し、前記対象物品の画像が基準となるマスタ画像の所定の画像領域に対して所定の許容値内にあるか否かを判定する画像検査装置であって、前記許容値は、前記マスタ画像の前記画像領域を構成する複数の小領域毎に設定し、前記各小領域毎に求めた特徴量Aに対して前記画像領域を移動させた後に前記各小領域毎に求めた特徴量Bが、前記特徴量Aに対して所定値P1内のときはP1とし、前記特徴量Bが前記特徴量Aに対して前記所定値P1内でないときは、前記特徴量Bと特徴量Aとの差に対応するP2とすることを徴とする。
【0009】
本発明の請求項に記載の画像検査方法は、マスタ画像の中に検査対象となる画像領域を設定し、この画像領域を複数の小領域に分割し、各小領域毎に特徴量Aを抽出し、前記画像領域を移動させ移動後の各小領域毎に特徴量Bを抽出し、前記特徴量Bが前記特徴量Aに対して所定値P1内のときは当該小領域の許容値をP1とし、前記特徴量Bが前記特徴量Aに対して前記所定値P1内でないときは当該小領域の許容値を前記特徴量Bと前記特徴量Aとの差に対応するP2とし、各小領域毎に許容値を設定するマスタ登録処理と、対象物品の画像を検査画像として取り込み、この検査画像を前記マスタ画像と一致させ、前記検査画像の中に前記マスタ画像と同様に検査対象となる画像領域および複数の小領域を設定し、各小領域毎に特徴量Dを抽出し、各特徴量Dが対応する小領域の許容値P1またはP2内にあるか検査する検査処理とからなることを特徴とする。
【0010】
本発明によれば、マスタ画像と検査画像とのマッチングの際に予測される変動要素を考慮したシミュレーションを事前に自動的に実行し、すなわち検査対象となる画像領域を移動させて誤判定の要素の高い小領域に対しては自動的にその許容値を変更することにより、マッチングの際の誤判定率を低下させるようにしている。
【0011】
【発明の実施の形態】
図1は、本発明による画像検査装置の一実施の形態を示すブロック図である。同図において、ビデオカメラ1によって撮影された画像は、画像入力部2でディジタル画像データに変換され、画像メモリ3に記憶される。画像メモリ3に記憶された画像データは、画像出力部4により読み出され、アナログ画像信号に変換された後に、ビデオモニタ5などの表示装置に表示される。
【0012】
CPU(中央処理装置)6は、この装置全体を制御する制御手段として機能するもので、アドレスバスおよびデータバスを含むシステムバス7を介してCPU6で行うプログラムが記憶されたプログラムメモリ(ROM)8、外部から入力される各種データおよびCPU6での処理結果等が記憶されるワーキングメモリ(RAM)9、後述する許容値(判定パラメータ)を記憶する判定パラメータメモリ10、画像の中から検査対象とする画像領域を設定したり、この画像領域を複数の小領域(ブロック)に分割したり、各種のパラメータを設定したりする入力部11にそれぞれ接続されている。
【0013】
また、CPU6はシステムバス7を介して画像入力部2、画像メモリ3および画像出力部4に接続されている。さらに、画像メモリ3とシステムバス7との間には、特徴量抽出部12が接続されている。この特徴量抽出部12は分割した各ブロック毎の特徴量を抽出するためのもので、例えば標準偏差値σを用いる。標準偏差値σは、ある画像領域内の濃度ヒストグラムにおいて、濃度レベルi(i=0〜255)に対する画素数をPiとし、全画像数をNとすると、濃度平均値μは、
【0014】
となる。これから濃度分散値Vは、
【0015】
となる。この濃度分散値Vから標準偏差値σは、
【0016】
となる。
【0017】
(動作説明)
次に、本発明の動作について説明する。本発明は検査の基準となる物品の画像をマスタ画像として取り込み、このマスタ画像の特徴量を求めると共に、各小領域毎の判定パラメータを設定するマスタ登録処理と、検査対象となる対象物品の画像を検査画像として取り込み、マスタ画像の特徴量と検査画像の特徴量とを比較し、各小領域毎の判定パラメータから対象物品の良否を判定する検査処理とがある。
【0018】
なお、本実施の形態では、生産ロットの1番目の対象物品の画像をマスタ画像として取り込み、2番目以降の対象物品の画像を検査画像として取り込み、マスタ画像の特徴量と検査画像の特徴量とを比較して、生産ロットの2番目以降の対象物品の良否を判定するようにしている。
【0019】
(マスタ登録処理)
まず、図2に示すフローチャートおよび図3に示す画像パターン図を参照しながら、生産ロットの1番目の対象物品の画像を検査の基準となるマスタ画像として取り込み、このマスタ画像の特徴量を求めるマスタ登録処理の手順について説明する。
【0020】
初めに初期設定を行う(ステップS1,パターンPG1)。この初期設定は入力部11によって検査対象となる画像領域(以下、ウィンド、という)WDを設定し、さらにこのウィンドWD内を複数のブロック(複数m×n画素)BLに分割する。
【0021】
次いで、検査の基準となる生産ロットの1番目の対象物品をビデオカメラ1によって撮像し、画像メモリ3にマスタ画像として取り込む(ステップS2,パターンPG2)。このとき対象物品をビデオカメラ1によって同じ場所で連続して2度撮像する。これは量子化誤差等を考慮したもので、それぞれ第1のマスタ画像Ma,第2のマスタ画像Mbとして画像メモリ3の2つのメモリ部3a,3bにそれぞれ記憶する。
【0022】
次いで、マスタ画像Ma,Mbの各ウィンドWD内を各4分割し、各分割領域の中から位置ずれ修正用マークを抽出する。位置ずれ修正用マークはマスタ画像Maと後述する検査画像TGとの位置合わせを行う際の基準となる。
【0023】
位置ずれ修正用マークの抽出方法は、4分割した各領域において特徴量が最も大きいものを代表値とし、この4つの代表値の中から予め定めた優先順位にしたがって2つの代表値を選択し、その2つを位置ずれ修正用マークUa,Ubと決め、位置データをRAM9に格納する(ステップS3,パターンPG3)。
【0024】
例えば、パターンPG3に示すように、ウィンドWD内を4つの領域WD1〜WD4に分割し、特徴量が最も大きい位置のマークをエッジ情報有りとして相互の距離ができるだけ離れた2つのマークを選択する。優先順位は、例えばWD1−WD3、WD2−WD4、WD1−WD2、WD2−WD3、WD3−WD4、WD4−WD1である。この実施の形態では、画像左上の領域WD1内の黒星と画像右下の領域WD3の白星とを位置ずれ修正マークUa,Ubとして選択している。
【0025】
次いで、マスタ画像Ma内に設定したウィンドWDの全てのブロックBL毎に特徴量Aとしての標準偏差値(以下、偏差値、という)σaを抽出する(ステップS4)。次いで、抽出した偏差値σaに応じた判定パラメータP1を設定し、判定パラメータメモリ10に格納する(ステップS5,パターンPG4)。各判定パラメータP1は生産ロットに関係なく偏差値σaの値に応じて予め設定された所定値である。この結果、判定パラメータメモリ10には各ブロックの偏差値σaに応じた値の判定パラメータP1が記憶される。
【0026】
次いで、ウィンドWDを画像上で左上に数画素移動させ(ステップS6,パターンPG5)、移動後のウィンドの各ブロックの特徴量Bを偏差値σbとして抽出し(ステップS7)、移動前の対応するブロックの偏差値σaと比較する(ステップS8)。
【0027】
すなわち、偏差値σbが偏差値σaに対し判定パラメータP1内にあるかを各ブロック毎に次式で比較し、
σa−P1<σb<σa+P1 ・・・・(4)
(4)の条件を満たすブロックの判定パラメータP1の値はそのままとし(ステップS9)、式(4)の条件を満たさないブロックの判定パラメータP1の値は変更する(ステップS10)。このときの新たな判定パラメータP2の値は、特徴量A(偏差値σa)と特徴量B(偏差値σb)との差、すなわち、
P2=|σb−σa|+β ・・・・(5)
となる。βは判定の厳しさを調整するパラメータである。この処理を全ブロックについて行う(ステップS11)。
【0028】
次いで、ウィンドWDを他の方向に数画素移動させ、最終的に上下左右4方向でそれぞれステップS7〜S11の処理を行い(ステップS12)、各ブロック毎の判定パラメータP1またはP2を決定する。
【0029】
図4に、ウィンドWDを上下左右に移動させて得た4つの仮想検査画像Ia〜Idを示す。実線で示す画像領域が移動前のウィンドWDであり、破線で示す画像領域が仮想検査画像Ia〜Idである。
【0030】
この例では、ウィンドWDの開始位置座標を(x,y)とすると、図(a)は開始位置座標(x−α,y−α)の仮想検査画像Ia、図(b)は開始位置座標(x+α,y−α)の仮想検査画像Ib、図(c)は開始位置座標(x−α,y+α)の仮想検査画像Ic、図(d)は開始位置座標(x+α,y+α)の仮想検査画像Idを表している。
【0031】
この結果、多くのブロックで式(4)の条件が成立しない場合は、初期設定の変更すなわちルックアップテーブルの変更が必要であると判断し(ステップS13)、予め設定した判定パラメータP1の値の関係を示すルックアップテーブルを入力部11で変更し(ステップS14)、再びステップS6以降の処理を実行する。
【0032】
(検査処理)
次に、図5に示すフローチャートおよび図6に示す画像パターン図を参照しながら、生産ロットの2番目以降の対象物品の良否を判定する検査処理の手順について説明する。まず、検査の対象となる対象物品がコンベア上を移送されて検査エリアに到達すると、ビデオカメラ1によって撮像し、検査画像TGとして画像メモリ3のメモリ部3bに取り込む(ステップT1,パターンQG1)。
【0033】
次いで、この検査画像TGの中から位置ずれ修正マークVa,Vbを抽出する(ステップT2,パターンQG2)。この位置ずれ修正マークV,Vbは前述したマスタ画像Maの位置ずれ修正マークUa,Ubに対応するもので、前述したステップS3と同様の方法で抽出する。
【0034】
次いで、この位置ずれ修正マークVa,Vbが位置ずれ修正マークUa,Ubと合致するように、すなわち画像メモリ3のメモリ部3bに記憶されている検査画像TGがメモリ部3aに記憶されているマスタ画像Maと一致するように検査画像TGを移動させる位置合わせを行う(ステップT3)。これは、コンベア上を不整列で移送されてくる対象物品を、画像上で整列させるためである。
【0035】
次いで、検査画像TGの各ブロックBL毎に特徴量Dとしての偏差値σdを抽出する(ステップT4)。そして、検査画像TGの各ブロックの偏差値σdがマスタ画像Maの対応する各ブロックの偏差値σaに対して判定パラメータP1またはP2内にあるか検査する(ステップT5,パターンQ3)。判定パラメータP1は各ブロック別に設定されて判定パラメータメモリ10に記憶されているので、各ブロックの偏差値σdは次式を満たさなければならない。
【0036】
σa−P1<σd<σa+P1 ・・・・(6)
または、
σa−P2<σd<σa+P2 ・・・・(7)
この検査を検査画像TGの全ブロックに対して行い(ステップT6)、それが終了すると検査結果をビデオモニタ5に出力する(ステップT7)。ビデオモニタ5には、良品と判定した場合はその旨を表示し、不良品と判定した場合は式(6)の条件を満たさなかったブロックの数、その画像および位置などを表示する。この一連の検査処理を全ての対象物品について行い(ステップT8)、全物品の検査が終了すると、処理を終了する。
【0037】
なお、前述の実施の形態では、仮検査画像として4方向の画像を想定するようにしたが、これに限らず、さらに多方向(例えば、8方向)の画像を想定してシミュレーションするようにしてもよい。また、特徴量としては、標準偏差値に限らずブロック内の平均濃度(明度)、色差、正規化相関などがある。
【0038】
【発明の効果】
本発明によれば、マスタ画像と検査画像とのマッチングの際に予測される変動要素を考慮して仮検査画像を用いたシミュレーションを事前に自動的に実行し、誤判定の要素の高いブロック(小領域)に対しては自動的にその判定パラメータ(許容値)を変更するようにしたので、マニュアルオペレーションが不要となりマッチングの誤判定率が低下するという効果が得られる。
【図面の簡単な説明】
【図1】本発明の一実施の形態を示す画像検査装置のブロック図である。
【図2】本発明の動作手順(マスタ登録処理)を示すフローチャートである。
【図3】マスタ登録処理の画像パターンを示す図である。
【図4】(a)〜(d)はマスタ画像内のウィンドを上下左右に数画素ずつ移動させて得た4つの仮想検査画像を示す図である。
【図5】本発明の動作手順(検査処理)を示すフローチャートである。
【図6】検査処理の画像パターンを示す図である。
【符号の説明】
1 ビデオカメラ
2 画像入力部
3 画像メモリ
4 画像出力部
5 ビデオモニタ
6 CPU
7 システムバス
8 プログラムメモリ(ROM)
9 ワーキングメモリ(RAM)
10 判定パラメータメモリ
11 入力部
12 特徴量抽出部
WD ウィンド(画像領域)
BL ブロック(小領域)
Ma,Mb マスタ画像
Ua,Ub 位置ずれ修正マーク
Va,Vb 位置ずれ修正マーク
Ia〜Id 仮検査画像
TG 検査画像
A マスタ画像の特徴量
B 仮想検査画像の特徴量
D 検査画像の特徴量
σa マスタ画像の標準偏差値
σb 仮想検査画像の標準偏差値
σd 検査画像の標準偏差値
P1,P2 判定パラメータ(許容値)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image inspection apparatus and method for inspecting, collating, and sorting products using a digital image pattern matching technique.
[0002]
[Prior art]
In a field to which the pattern matching technology is applied, there is an inspection system that recognizes an image of a target article, performs matching with a reference known image, and determines the quality of the image. In such an inspection system, a target article is transported by a conveyor or the like, and a pattern such as a character, a symbol, or a pattern attached to the surface of the target article is captured using an imaging device, and the captured image and a known image registered in advance. The quality of the target article is determined based on the result of the matching.
[0003]
[Problems to be solved by the invention]
However, in the case where the number of target articles is small and large in number, it is necessary to manually set the pass / fail judgment parameters by manual operation, which requires a great deal of labor.
[0004]
Therefore, there are a method of registering a plurality of judgment parameters in advance and switching as appropriate, and a method of automatically extracting and registering judgment parameters necessary for matching from a real work by a learning method.
[0005]
However, in the former method, since the switching is performed manually, the labor is required, and the switching is performed subjectively by the operator. In addition, in the latter method, since the determination parameter can be extracted only after inspecting several target articles, there is an inconvenience that the method is not suitable for a target article of a small quantity and many kinds. If the determination parameters are not optimized, there is a disadvantage that a good product is erroneously determined as a defective product or a defective product is erroneously determined as a non-defective product, and sufficient matching accuracy cannot be obtained.
[0006]
The present invention has been made to solve such a conventional problem, and an object of the present invention is to provide an image inspection apparatus and a method capable of automatically adjusting and obtaining an optimum determination parameter.
[0007]
[Means for Solving the Problems]
The invention according to claim 1 of the present invention recognizes an image of a target article, and determines whether or not the image of the target article is within a predetermined allowable value with respect to a predetermined image area of a reference master image. determining an image inspection apparatus, the allowable value, the set for each of a plurality of small regions constituting the image area, said image area for the feature amount a calculated in each small region of the master image When the characteristic amount B obtained for each of the small areas after moving is within a predetermined value P1 with respect to the characteristic amount A, the characteristic amount B is set to P1. If not within P1 is that you and P2 corresponding to the difference between the feature amount B and the feature amount a and feature.
[0009]
In the image inspection method according to the second aspect of the present invention, an image area to be inspected is set in a master image, the image area is divided into a plurality of small areas, and a feature amount A is set for each small area. Then, the image area is moved, and a characteristic amount B is extracted for each small area after the movement. When the characteristic amount B is within a predetermined value P1 with respect to the characteristic amount A, an allowable value of the small area is changed. and P1, the when not within the predetermined value P1 is set to P2 corresponding the permissible value of the small region on a difference between the feature amount a and the feature amount B the feature amount B is relative to the feature amount a, the A master registration process of setting an allowable value for each small area, an image of a target article is captured as an inspection image, this inspection image is made to match the master image, and the inspection image is included in the inspection image in the same manner as the master image. Image area and a plurality of small areas Extracting D, and characterized by comprising a inspection process each feature amount D is examined whether or within the allowable value P1 or P2 of the corresponding small regions.
[0010]
According to the present invention, a simulation that takes into account variable elements predicted when matching a master image and an inspection image is automatically performed in advance, that is, an image area to be inspected is moved to make an erroneous determination The erroneous determination rate at the time of matching is reduced by automatically changing the allowable value for a small area having a high value.
[0011]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a block diagram showing an embodiment of an image inspection apparatus according to the present invention. In FIG. 1, an image captured by a video camera 1 is converted into digital image data by an image input unit 2 and stored in an image memory 3. The image data stored in the image memory 3 is read by the image output unit 4, converted into an analog image signal, and displayed on a display device such as a video monitor 5.
[0012]
A CPU (Central Processing Unit) 6 functions as a control unit for controlling the entire device, and a program memory (ROM) 8 in which a program executed by the CPU 6 is stored via a system bus 7 including an address bus and a data bus. , A working memory (RAM) 9 for storing various data input from the outside, processing results in the CPU 6, and the like, a judgment parameter memory 10 for storing allowable values (judgment parameters) described later, and an image to be inspected. It is connected to an input unit 11 for setting an image area, dividing the image area into a plurality of small areas (blocks), and setting various parameters.
[0013]
The CPU 6 is connected to the image input unit 2, the image memory 3, and the image output unit 4 via the system bus 7. Further, a feature amount extraction unit 12 is connected between the image memory 3 and the system bus 7. The feature amount extraction unit 12 is for extracting a feature amount for each divided block, and uses, for example, a standard deviation value σ. The standard deviation value σ is defined as follows: In a density histogram in a certain image area, when the number of pixels for a density level i (i = 0 to 255) is Pi and the number of all images is N, the density average value μ is
[0014]
It becomes. From this, the density dispersion value V is
[0015]
It becomes. The standard deviation value σ from the density variance value V is
[0016]
It becomes.
[0017]
(Operation explanation)
Next, the operation of the present invention will be described. The present invention captures an image of an article serving as a reference for inspection as a master image, determines a feature amount of the master image, sets a determination parameter for each small area, and performs image registration of an object to be inspected. As an inspection image, comparing the feature amount of the master image with the feature amount of the inspection image, and determining the acceptability of the target article from the determination parameter for each small area.
[0018]
In the present embodiment, the image of the first target article of the production lot is captured as a master image, the images of the second and subsequent target articles are captured as inspection images, and the feature amounts of the master image and the inspection image are compared. Are compared to determine the acceptability of the second and subsequent target articles of the production lot.
[0019]
(Master registration process)
First, referring to the flowchart shown in FIG. 2 and the image pattern diagram shown in FIG. 3, an image of the first target article of a production lot is taken in as a master image serving as a reference for inspection, and a master for obtaining a feature amount of this master image is obtained. The procedure of the registration process will be described.
[0020]
First, initial settings are made (step S1, pattern PG1). In this initial setting, an image area (hereinafter, referred to as a window) WD to be inspected is set by the input unit 11, and the inside of the window WD is further divided into a plurality of blocks (a plurality of m × n pixels) BL.
[0021]
Next, the first target article of the production lot serving as a reference for inspection is imaged by the video camera 1 and taken into the image memory 3 as a master image (step S2, pattern PG2). At this time, the video camera 1 continuously captures the target article twice in the same place. This takes into account quantization errors and the like, and is stored in the two memory units 3a and 3b of the image memory 3 as a first master image Ma and a second master image Mb, respectively.
[0022]
Next, each window WD of the master images Ma and Mb is divided into four parts, and a misregistration correction mark is extracted from each divided area. The misregistration correction mark serves as a reference when performing alignment between the master image Ma and an inspection image TG described later.
[0023]
In the method of extracting the misregistration correction mark, the one having the largest feature amount in each of the four divided areas is set as a representative value, and two representative values are selected from the four representative values according to a predetermined priority order. The two are determined as position shift correction marks Ua and Ub, and the position data is stored in the RAM 9 (step S3, pattern PG3).
[0024]
For example, as shown in a pattern PG3, the inside of the window WD is divided into four regions WD1 to WD4, and a mark at a position having the largest feature amount has edge information, and two marks which are as far apart from each other as possible are selected. The priorities are, for example, WD1-WD3, WD2-WD4, WD1-WD2, WD2-WD3, WD3-WD4, WD4-WD1. In this embodiment, a black star in the upper left area WD1 of the image and a white star in the lower right area WD3 are selected as the displacement correction marks Ua and Ub.
[0025]
Next, a standard deviation value (hereinafter, referred to as a deviation value) σa as the feature amount A is extracted for every block BL of the window WD set in the master image Ma (step S4). Next, a determination parameter P1 according to the extracted deviation value σa is set and stored in the determination parameter memory 10 (step S5, pattern PG4). Each determination parameter P1 is a predetermined value set in advance according to the value of the deviation value σa regardless of the production lot. As a result, the judgment parameter memory 10 stores a judgment parameter P1 having a value corresponding to the deviation value σa of each block.
[0026]
Next, the window WD is moved by several pixels to the upper left on the image (step S6, pattern PG5), and the feature amount B of each block of the moved window is extracted as the deviation value σb (step S7), and the corresponding value before the movement is obtained. A comparison is made with the block deviation value σa (step S8).
[0027]
That is, whether the deviation value σb is within the determination parameter P1 with respect to the deviation value σa is compared for each block by the following equation,
σa−P1 <σb <σa + P1 (4)
The value of the determination parameter P1 of the block that satisfies the condition of Expression (4) is left unchanged (Step S9), and the value of the determination parameter P1 of the block that does not satisfy the condition of Expression (4) is changed (Step S10). The value of the new determination parameter P2 at this time is the difference between the feature value A (deviation value σa) and the feature value B (deviation value σb),
P2 = | σb−σa | + β (5)
It becomes. β is a parameter for adjusting the severity of the determination. This process is performed for all blocks (step S11).
[0028]
Next, the window WD is moved by several pixels in the other direction, and the processing of steps S7 to S11 is finally performed in four directions (up, down, left, and right) (step S12), and the determination parameter P1 or P2 for each block is determined.
[0029]
FIG. 4 shows four virtual inspection images Ia to Id obtained by moving the window WD up, down, left, and right. The image area indicated by the solid line is the window WD before the movement, and the image area indicated by the broken line is the virtual inspection images Ia to Id.
[0030]
In this example, assuming that the start position coordinates of the window WD are (x, y), FIG. 12A shows the virtual inspection image Ia of the start position coordinates (x−α, y−α), and FIG. The virtual inspection image Ib at (x + α, y-α), FIG. (C) is the virtual inspection image Ic at the start position coordinates (x−α, y + α), and the diagram (d) is the virtual inspection image at the start position coordinates (x + α, y + α). The image Id is shown.
[0031]
As a result, if the condition of Expression (4) is not satisfied in many blocks, it is determined that the initial setting needs to be changed, that is, the look-up table needs to be changed (step S13), and the value of the preset determination parameter P1 is determined . The lookup table indicating the relationship is changed by the input unit 11 (step S14), and the processes after step S6 are executed again.
[0032]
(Inspection processing)
Next, the procedure of the inspection process for determining the acceptability of the second and subsequent target articles in the production lot will be described with reference to the flowchart shown in FIG. 5 and the image pattern diagram shown in FIG. First, when the target article to be inspected is transported on the conveyor and reaches the inspection area, it is imaged by the video camera 1 and taken into the memory unit 3b of the image memory 3 as the inspection image TG (step T1, pattern QG1).
[0033]
Next, misregistration correction marks Va and Vb are extracted from the inspection image TG (step T2, pattern QG2). These displacement correction marks V and Vb correspond to the displacement correction marks Ua and Ub of the master image Ma, and are extracted by the same method as in step S3 described above.
[0034]
Then, the inspection image TG stored in the memory unit 3b of the image memory 3 is stored in the memory unit 3a so that the position error correction marks Va and Vb match the position error correction marks Ua and Ub. Position adjustment for moving the inspection image TG so as to match the image Ma is performed (step T3). This is for aligning the target articles which are transported out of alignment on the conveyor on the image.
[0035]
Next, a deviation value σd as a feature value D is extracted for each block BL of the inspection image TG (step T4). Then, it is checked whether the deviation value σd of each block of the inspection image TG is within the determination parameter P1 or P2 with respect to the deviation value σa of each corresponding block of the master image Ma (step T5, pattern Q3). Since the determination parameter P1 is set for each block and stored in the determination parameter memory 10, the deviation value σd of each block must satisfy the following equation.
[0036]
σa−P1 <σd <σa + P1 (6)
Or
σa−P2 <σd <σa + P2 (7)
This inspection is performed on all blocks of the inspection image TG (step T6), and when the inspection is completed, the inspection result is output to the video monitor 5 (step T7). If it is determined that the block is non-defective, the video monitor 5 displays the fact. If it is determined that the block is defective, the number of blocks that did not satisfy the condition of Expression (6) , its image, its position, and the like are displayed. This series of inspection processing is performed for all target articles (step T8), and when inspection of all articles is completed, the processing is ended.
[0037]
In the above-described embodiment, an image in four directions is assumed as the tentative inspection image. However, the present invention is not limited to this, and a simulation is performed by assuming an image in more directions (for example, eight directions). Is also good. Further, the feature amount is not limited to the standard deviation value, but includes an average density (brightness) in the block, a color difference, a normalized correlation, and the like.
[0038]
【The invention's effect】
According to the present invention, a simulation using a temporary inspection image is automatically executed in advance in consideration of a variable element predicted at the time of matching between a master image and an inspection image, and a block having a high erroneous determination element ( Since the determination parameter (allowable value) is automatically changed for the (small area), a manual operation becomes unnecessary, and the effect of reducing the erroneous determination rate of matching is obtained.
[Brief description of the drawings]
FIG. 1 is a block diagram of an image inspection apparatus according to an embodiment of the present invention.
FIG. 2 is a flowchart showing an operation procedure (master registration processing) of the present invention.
FIG. 3 is a diagram illustrating an image pattern of a master registration process.
4A to 4D are diagrams showing four virtual inspection images obtained by moving a window in a master image up, down, left, and right by several pixels.
FIG. 5 is a flowchart showing an operation procedure (inspection processing) of the present invention.
FIG. 6 is a diagram showing an image pattern of an inspection process.
[Explanation of symbols]
Reference Signs List 1 video camera 2 image input unit 3 image memory 4 image output unit 5 video monitor 6 CPU
7 System bus 8 Program memory (ROM)
9 Working memory (RAM)
10 judgment parameter memory 11 input unit 12 feature amount extraction unit WD window (image area)
BL block (small area)
Ma, Mb Master images Ua, Ub Misalignment correction marks Va, Vb Misalignment correction marks Ia to Id Temporary inspection image TG Inspection image A Feature amount of master image B Feature amount of virtual inspection image D Feature amount of inspection image σa Master image Standard deviation value σb of the virtual inspection image Standard deviation value σd of the inspection image Standard deviation values P1 and P2 Judgment parameters (allowable value)

Claims (2)

対象物品の画像を認識し、前記対象物品の画像が基準となるマスタ画像の所定の画像領域に対して所定の許容値内にあるか否かを判定する画像検査装置であって、
前記許容値は、前記マスタ画像の前記画像領域を構成する複数の小領域毎に設定し、前記各小領域毎に求めた特徴量Aに対して前記画像領域を移動させた後に前記各小領域毎に求めた特徴量Bが、前記特徴量Aに対して所定値P1内のときはP1とし、前記特徴量Bが前記特徴量Aに対して前記所定値P1内でないときは、前記特徴量Bと特徴量Aとの差に対応するP2とすることを徴とする画像検査装置。
An image inspection apparatus that recognizes an image of a target article and determines whether the image of the target article is within a predetermined allowable value for a predetermined image area of a master image that is a reference,
The allowable value, the set for each of a plurality of small regions constituting the image area of the master image, the respective small regions wherein after moving the image area for the feature amount A calculated in each small region When the characteristic amount B obtained for each of the characteristic amounts A is within the predetermined value P1 with respect to the characteristic amount A, the characteristic amount is set to P1. When the characteristic amount B is not within the predetermined value P1 with respect to the characteristic amount A, the characteristic amount is set as P1. image inspection device according to feature that you and P2 corresponding to the difference between the B and the feature amount a.
マスタ画像の中に検査対象となる画像領域を設定し、この画像領域を複数の小領域に分割し、各小領域毎に特徴量Aを抽出し、前記画像領域を移動させ移動後の各小領域毎に特徴量Bを抽出し、前記特徴量Bが前記特徴量Aに対して所定値P1内のときは当該小領域の許容値をP1とし、前記特徴量Bが前記特徴量Aに対して前記所定値P1内でないときは当該小領域の許容値を前記特徴量Bと前記特徴量Aとの差に対応するP2として、各小領域毎に許容値を設定するマスタ登録処理と、
対象物品の画像を検査画像として取り込み、この検査画像を前記マスタ画像と一致させ、前記検査画像の中に前記マスタ画像と同様に検査対象となる画像領域および複数の小領域を設定し、各小領域毎に特徴量Dを抽出し、各特徴量Dが対応する小領域の許容値P1またはP2内にあるかを検査する検査処理と、
からなることを特徴とする像検査方法。
An image area to be inspected is set in the master image, the image area is divided into a plurality of small areas, a feature amount A is extracted for each small area, and the image area is moved to move each small area. A feature value B is extracted for each region. When the feature value B is within a predetermined value P1 with respect to the feature value A, the allowable value of the small area is set to P1. When the value is not within the predetermined value P1, a master registration process of setting an allowable value for each small region as P2 corresponding to the difference between the feature amount B and the feature amount A as an allowable value of the small region;
An image of a target article is captured as an inspection image, this inspection image is matched with the master image, and an image area to be inspected and a plurality of small areas are set in the inspection image in the same manner as the master image. An inspection process of extracting a characteristic amount D for each region and inspecting whether each characteristic amount D is within the allowable value P1 or P2 of the corresponding small region;
Tona images inspecting method comprising Rukoto.
JP29120896A 1996-10-15 1996-10-15 Image inspection apparatus and method Expired - Lifetime JP3557814B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29120896A JP3557814B2 (en) 1996-10-15 1996-10-15 Image inspection apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29120896A JP3557814B2 (en) 1996-10-15 1996-10-15 Image inspection apparatus and method

Publications (2)

Publication Number Publication Date
JPH10124678A JPH10124678A (en) 1998-05-15
JP3557814B2 true JP3557814B2 (en) 2004-08-25

Family

ID=17765869

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29120896A Expired - Lifetime JP3557814B2 (en) 1996-10-15 1996-10-15 Image inspection apparatus and method

Country Status (1)

Country Link
JP (1) JP3557814B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002140693A (en) 2000-10-31 2002-05-17 Keyence Corp Image processing parameter determination device, its method and recording medium with recorded image processing parameter determination program
JP2002140694A (en) 2000-10-31 2002-05-17 Keyence Corp Image processor, its method and recording medium with recorded image processing program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3063925B2 (en) * 1991-08-07 2000-07-12 新光電気工業株式会社 Image pattern matching device
JPH07332951A (en) * 1994-06-13 1995-12-22 Hiyuu Burein:Kk Apparatus and method for inspecting image
JP3299066B2 (en) * 1995-01-17 2002-07-08 大日本スクリーン製造株式会社 Pattern inspection apparatus and method

Also Published As

Publication number Publication date
JPH10124678A (en) 1998-05-15

Similar Documents

Publication Publication Date Title
US7409081B2 (en) Apparatus and computer-readable medium for assisting image classification
US5253306A (en) Method of matching patterns and apparatus therefor
CN110533660B (en) Method for detecting silk-screen defect of electronic product shell
JP2018004272A (en) Pattern inspection device and pattern inspection method
WO2021192376A1 (en) Visual inspection system and computer program
JP2004212311A (en) Method and apparatus for detecting unevenness defect
JP3557814B2 (en) Image inspection apparatus and method
JPH10269359A (en) Method and device for inspecting printed matter
JPH04346187A (en) Quality decision method for subject to be detected
CN115100166A (en) Welding spot defect detection method and device
WO2003010622A3 (en) Automatic separation of subject pixels using segmentation based on multiple planes of measurement data
KR101559941B1 (en) A system for detecting fault of print pattern
JPH09105723A (en) Inspection setting value input displaying method in defect inspection and device therefor
JP2000268177A (en) Print inspecting device
JPH0735699A (en) Method and apparatus for detecting surface defect
JP3447280B2 (en) Inspection method of printed matter and its inspection device
TWI768434B (en) Circuit board information display method and device
JPH09147056A (en) Method and device for checking appearance of mark
JPH06235699A (en) Inspection method for mounted component
TW202219493A (en) Detection method
JP2019067373A (en) Feature image generation device, inspection equipment, feature image generation method and feature image generation program
JP3395922B2 (en) Inspection method and inspection device
JPH0230065B2 (en)
WO2018146887A1 (en) External-appearance examination device
KR100351129B1 (en) System for Examination printing inferior using Circumference Mask

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20031212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040315

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: 20040427

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040510

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090528

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100528

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100528

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110528

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120528

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140528

Year of fee payment: 10

EXPY Cancellation because of completion of term