JPH11110560A - Image inspection method and image inspection device - Google Patents

Image inspection method and image inspection device

Info

Publication number
JPH11110560A
JPH11110560A JP9271459A JP27145997A JPH11110560A JP H11110560 A JPH11110560 A JP H11110560A JP 9271459 A JP9271459 A JP 9271459A JP 27145997 A JP27145997 A JP 27145997A JP H11110560 A JPH11110560 A JP H11110560A
Authority
JP
Japan
Prior art keywords
image
image inspection
feature vector
data
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP9271459A
Other languages
Japanese (ja)
Other versions
JP3587029B2 (en
Inventor
Masahiko Uno
真彦 宇野
Hideaki Murakami
秀明 村上
Naomichi Yamada
尚道 山田
Tatsunori Hibara
辰則 火原
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP27145997A priority Critical patent/JP3587029B2/en
Publication of JPH11110560A publication Critical patent/JPH11110560A/en
Application granted granted Critical
Publication of JP3587029B2 publication Critical patent/JP3587029B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To precisely inspect the scratch or the like of a surface by data compressing primary and secondary image feature amounts, calculating the degenerate feature vector of a small data amount, comparing the degenerate feature vector with data based on a nondefective product learned beforehand, obtaining an output vector and discriminating the normal/defective state of an object. SOLUTION: An image-pickup means 1 picks up the image of an inspection object 16 lighted by an illumination means 15 and obtains a gradation image, and the partial area of an image is selected from the gradation image by a partial area selection means 4. From the selected image partial area, gradation is compressed and partial image data are prepared in a partial image preparation means 5. Then, to the partial image data, the secondary feature amount is calculated in a secondary feature amount calculation means 6, and the primary feature amount is calculated in a primary feature amount calculation means 7. The secondary feature amount and the primary feature amount are data-compressed, the degenerate feature vector of the small data amount is calculated in a preparation means 8, the vector is compared with the nondefective product data of a learning means 12 and the normal/defective condition of the object is decided.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像を用いて、例
えば生産、加工ラインに流れる部品や製品の表面の傷、
汚れなどの検査を行う画像検査方法および画像検査装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to the use of images,
The present invention relates to an image inspection method and an image inspection apparatus for inspecting for contamination and the like.

【0002】[0002]

【従来の技術】従来の画像検査方法あるいは画像検査装
置では、例えば部品や製品の画像を2値化し、その2値
化画像の面積などを用いて検査するものや、特開平7−
332951号公報に見られるように、画像をいくつか
のブロックに分割し、ブロック内の最大輝度や最小輝度
を用いて検査するものがある。
2. Description of the Related Art In a conventional image inspection method or image inspection apparatus, for example, an image of a part or product is binarized and inspected using the area of the binarized image.
As disclosed in Japanese Patent No. 332951, an image is divided into several blocks, and inspection is performed using the maximum luminance and the minimum luminance in the blocks.

【0003】[0003]

【発明が解決しようとする課題】しかし上述した画像検
査方法では、対象物の表面にある程度規則性のある模様
などが存在した場合には、2値化する際にその模様まで
2値化されて、本来の欠陥である傷や汚れと区別がつか
なくなってしまう欠点があった。また最大輝度や最小輝
度を用いる方法においても、模様自体がその画像の最大
輝度、最小輝度を含んでいる場合には、やはり模様と本
来の欠陥の区別を行うことができない。
However, in the above-described image inspection method, when a pattern having a certain degree of regularity exists on the surface of the object, the pattern is binarized when binarizing. However, there is a disadvantage that it cannot be distinguished from scratches and stains, which are the original defects. Also, in the method using the maximum luminance and the minimum luminance, if the pattern itself includes the maximum luminance and the minimum luminance of the image, the pattern cannot be distinguished from the original defect.

【0004】本発明は、上記の問題点を解決し表面に模
様等があっても傷や汚れを正確に認識し検査する方法お
よび装置を提供を提供することにある。
An object of the present invention is to provide a method and an apparatus for solving the above problems and accurately recognizing and inspecting flaws and stains even if there are patterns or the like on the surface.

【0005】[0005]

【課題を解決するための手段】本発明の第1の構成によ
る画像検査方法は、対象物の映像信号から得られた濃淡
画像の部分領域を選択し、前記選択された部分領域に対
して輝度階調を圧縮した部分画像データを作成し、前記
部分画像データに対して2次画像特徴量および1次画像
特徴量を計算し、前記2次画像特徴量および1次画像特
徴量をデータ圧縮してデータ量の少ない縮退特徴ベクト
ルを計算し、前記縮退特徴ベクトルを、あらかじめ学習
させておいた良品にもとずくデータまたはあらかじめ学
習させておいた不良品にもとずくデータと比較して出力
ベクトルを計算し、前記出力ベクトルを用いて対象物の
良不良を判定するものである。
According to a first aspect of the present invention, there is provided an image inspection method for selecting a partial area of a grayscale image obtained from a video signal of an object, and applying a luminance to the selected partial area. It creates partial image data in which the gradation is compressed, calculates a secondary image feature amount and a primary image feature amount for the partial image data, and compresses the secondary image feature amount and the primary image feature amount. The reduced feature vector having a small amount of data is calculated, and the reduced feature vector is compared with the data based on the pre-trained good product or the data based on the pre-trained defective product, and the output vector is calculated. Is calculated, and the quality of the object is determined using the output vector.

【0006】本発明の第2の構成による画像検査方法
は、前記階調を圧縮した部分画像の作成において、前記
濃淡画像の全体領域または前記部分領域の最大輝度と最
小輝度の値に応じて圧縮後の階調数を変化させて部分画
像データを作成するっものである。
According to a second aspect of the present invention, there is provided an image inspection method according to the first aspect of the present invention, wherein in forming the partial image in which the gradation is compressed, the partial image is compressed in accordance with the maximum luminance and the minimum luminance of the entire area or the partial area of the gray image. The partial image data is created by changing the number of gradations later.

【0007】本発明の第3の構成による画像検査方法
は、前記2次特徴量として同時生起行列を用いたもので
ある。
An image inspection method according to a third configuration of the present invention uses a co-occurrence matrix as the secondary feature quantity.

【0008】本発明の第4の構成による画像検査方法
は、前記2次特徴量として0度方向、45度方向、90
度方向、135度方向の計4方向の向きに関する複数の
同時生起行列を用いたものである。
In the image inspection method according to the fourth configuration of the present invention, the secondary feature amount may be set to a 0-degree direction, a 45-degree direction, and a 90-degree direction.
A plurality of co-occurrence matrices relating to a total of four directions, ie, the degree direction and the 135 degree direction, are used.

【0009】本発明の第5の構成による画像検査方法
は、前記2次特徴量として同時生起確率行列を用いたも
のである。
The image inspection method according to the fifth aspect of the present invention uses a simultaneous occurrence probability matrix as the secondary feature quantity.

【0010】本発明の第6の構成による画像検査方法
は、前記2次特徴量として0度方向、45度方向、90
度方向、135度方向の計4方向の向きに関する複数の
同時生起確率行列を用いたものである。
In the image inspection method according to the sixth aspect of the present invention, the secondary feature amount may be set to 0 degree direction, 45 degree direction, 90 degree direction,
A plurality of co-occurrence probability matrices relating to a total of four directions, ie, the degree direction and the 135 degree direction, are used.

【0011】本発明の第7の構成による画像検査方法
は、前記1次特徴量として輝度ヒストグラムを用いたも
のである。
An image inspection method according to a seventh configuration of the present invention uses a luminance histogram as the primary feature.

【0012】本発明の第8の構成による画像検査方法
は、前記縮退特徴ベクトルの計算において、1つあるい
は複数の同時生起行列に対して、行列の主対角線方向に
要素の和(投影)をとり、その各々の要素の和の値を縮
退特徴ベクトルの要素の一部とするものである。
In the image inspection method according to an eighth aspect of the present invention, in the calculation of the degenerate feature vector, a sum (projection) of elements in one or a plurality of co-occurrence matrices in a main diagonal direction of the matrix is calculated. , The value of the sum of the respective elements as a part of the elements of the degenerated feature vector.

【0013】本発明の第9の構成による画像検査方法
は、前記縮退特徴ベクトルの計算において、1つあるい
は複数の同時生起確率行列に対して、行列の主対角線方
向に要素の和(投影)をとり、その各々の要素の和の値
を縮退特徴ベクトルの要素の一部とするものである。
In the image inspection method according to a ninth aspect of the present invention, in the calculation of the degenerate feature vector, a sum (projection) of elements in one or a plurality of simultaneous occurrence probability matrices in a main diagonal direction of the matrix is provided. The value of the sum of each element is taken as a part of the element of the degenerate feature vector.

【0014】本発明の第10の構成による画像検査方法
は、前記縮退特徴ベクトルの計算において、輝度ヒスト
グラムの値を縮退特徴ベクトルの要素の一部とするもの
である。
In the image inspection method according to a tenth aspect of the present invention, in the calculation of the reduced feature vector, the value of the luminance histogram is used as a part of the reduced feature vector element.

【0015】本発明の第11の構成による画像検査方法
は、前記縮退特徴ベクトルの計算において、1つあるい
は複数の同時生起行列に対して、行列の主対角線方向に
要素の和(投影)をとり、その各々の要素の和の値と同
時生起行列の主対角要素の各値と輝度ヒストグラムの値
を組み合わせて縮退特徴ベクトルとするものである。
In an image inspection method according to an eleventh aspect of the present invention, in the calculation of the degenerate feature vector, a sum (projection) of elements in one or more simultaneously occurring matrices in a main diagonal direction of the matrix is calculated. , The sum of the respective elements, the value of the main diagonal element of the co-occurrence matrix, and the value of the luminance histogram are combined to form a reduced feature vector.

【0016】本発明の第12の構成による画像検査方法
は、前記縮退特徴ベクトルの計算において、1つあるい
は複数の同時生起確率行列に対して、行列の主対角線方
向に要素の和(投影)をとり、その各々の要素の和の値
と同時生起確率行列の主対角要素の各値と輝度ヒストグ
ラムの値を組み合わせて縮退特徴ベクトルとするもので
ある。
In the image inspection method according to a twelfth aspect of the present invention, in the calculation of the degenerate feature vector, the sum (projection) of elements in one or more simultaneous occurrence probability matrices in the main diagonal direction of the matrix is calculated. Then, the value of the sum of the respective elements, each value of the main diagonal element of the co-occurrence probability matrix, and the value of the luminance histogram are combined to form a reduced feature vector.

【0017】本発明の第13の構成による画像検査方法
は、前記縮退特徴ベクトルの計算において、2次特徴量
として複数の同時生起行列または複数の同時生起確率行
列を用いた場合に、各々の行列の2次モーメントを計算
し、この大きさによってそれぞれの行列から得られる特
徴量の順番の並べ替えを行って縮退特徴ベクトルを構成
するものである。
In the image inspection method according to a thirteenth aspect of the present invention, in the calculation of the degenerate feature vector, when a plurality of simultaneous occurrence matrices or a plurality of simultaneous occurrence probability matrices are used as secondary feature amounts, each matrix Is calculated, and the order of the feature amounts obtained from the respective matrices is rearranged according to the magnitude of the second moment to form a degenerate feature vector.

【0018】本発明の第14の構成による画像検査方法
は、前記縮退特徴ベクトルから出力ベクトルを計算する
方法において、ニューラルネットワークを用いたもので
ある。
An image inspection method according to a fourteenth aspect of the present invention uses a neural network in the method for calculating an output vector from the degenerated feature vector.

【0019】本発明の第15の構成による画像検査方法
は、あらかじめ良品または不良品の縮退特徴量データを
学習させておく方法において、ニューラルネットワーク
を用いたものである。
An image inspection method according to a fifteenth configuration of the present invention uses a neural network in a method of learning in advance the degenerate feature data of a good or defective product.

【0020】本発明の第16の構成による画像検査方法
は、前記ニューラルネットワークを用いた学習方法にお
いて、LVQ学習則またはLVQ2学習則を用いたもの
である。
An image inspection method according to a sixteenth aspect of the present invention is a learning method using the neural network, wherein an LVQ learning rule or an LVQ2 learning rule is used.

【0021】本発明の第17の構成による画像検査方法
は、前記良否判定の出力において、良品/不良品判定を
行うだけでなく、前記出力ベクトルの最小データと2番
目に小さいデータとの比較により良品/不良品/判定保
留の出力を行うものである。
In the image inspection method according to the seventeenth aspect of the present invention, in the output of the pass / fail judgment, not only the pass / fail judgment is made, but also the minimum data of the output vector is compared with the second smallest data. This outputs a non-defective / defective / judgment suspension.

【0022】本発明の第18の構成による画像検査装置
は、対象物の映像信号から濃淡画像を得る撮像手段と、
前記撮像手段によって得られた濃淡画像の部分領域を選
択する部分領域選択手段と、前記選択された部分領域に
対して輝度階調を圧縮した部分画像データを作成する部
分画像データ作成手段と、前記部分画像データに対して
2次画像特徴量を計算する2次特徴量計算手段と、前記
部分画像に対して1次画像特徴量を計算する1次特徴量
計算手段と、前記2次画像特徴量および1次画像特徴量
をデータ圧縮してデータ量の少ない縮退特徴ベクトルを
計算する縮退特徴ベクトル計算手段と、前記縮退特徴ベ
クトルを用いて良品の縮退特徴ベクトルまたは不良品の
縮退特徴ベクトルを学習する学習手段と、前記縮退特徴
ベクトルを、前記学習手段によってあらかじめ学習させ
ておいた良品にもとずくデータまたはあらかじめ学習さ
せておいた不良品にもとずくデータと比較してデータ間
の近似度の指標である出力ベクトルを計算する出力ベク
トル計算手段と、前記出力ベクトルを用いて対象物の良
不良を判定する判定手段を備えたものである。
An image inspection apparatus according to an eighteenth aspect of the present invention comprises:
A partial region selecting unit that selects a partial region of the grayscale image obtained by the imaging unit; a partial image data creating unit that creates partial image data obtained by compressing a luminance gradation for the selected partial region; A secondary feature amount calculating unit for calculating a secondary image feature amount for the partial image data; a primary feature amount calculating unit for calculating a primary image feature amount for the partial image; and the secondary image feature amount And a degenerate feature vector calculating means for compressing the primary image feature amount to calculate a degenerate feature vector with a small data amount, and learning a non-defective degenerate feature vector or a defective degenerate feature vector using the degenerate feature vector. Learning means and data based on non-defective products previously learned by the learning means, or defective products previously learned by the learning means. Output vector calculation means for calculating an output vector which is an index of the degree of approximation between data by comparing with the original data; and judgment means for judging good or bad of the object using the output vector. .

【0023】本発明の第19の構成による画像検査装置
は、前記部分画像データ作成手段において、前記濃淡画
像の全体領域または前記部分領域の最大輝度と最小輝度
の値に応じて圧縮後の階調数を変化させて部分画像を作
成するものである。
In the image inspection apparatus according to a nineteenth aspect of the present invention, in the partial image data creating means, the gradation after compression according to the maximum luminance and the minimum luminance of the entire area of the grayscale image or the partial area. A partial image is created by changing the number.

【0024】本発明の第20の構成による画像検査装置
は、前記2次特徴量計測手段において計測する2次特徴
量を、同時生起行列とするものである。
An image inspection apparatus according to a twentieth aspect of the present invention is such that the secondary feature quantity measured by the secondary feature quantity measuring means is a co-occurrence matrix.

【0025】本発明の第21の構成による画像検査装置
は、前記2次特徴量計測手段において計測する2次特徴
量を、0度方向、45度方向、90度方向、135度方
向の計4方向の向きに関する複数の同時生起行列とする
ものである。
An image inspection apparatus according to a twenty-first aspect of the present invention is characterized in that the secondary feature quantity measured by the secondary feature quantity measuring means is converted into a total of four directions of 0, 45, 90, and 135 degrees. It is a plurality of simultaneous occurrence matrices related to the direction of the direction.

【0026】本発明の第22の構成による画像検査装置
は、前記2次特徴量計測手段において計測する2次特徴
量を、同時生起確率行列とするものである。
An image inspection apparatus according to a twenty-second aspect of the present invention uses a secondary feature quantity measured by the secondary feature quantity measuring means as a simultaneous occurrence probability matrix.

【0027】本発明の第23の構成による画像検査装置
は、前記2次特徴量計測手段において計測する2次特徴
量を、0度方向、45度方向、90度方向、135度方
向の計4方向の向きに関する複数の同時生起確率行列と
するものである。
In the image inspection apparatus according to the twenty-third configuration of the present invention, the secondary feature quantity measured by the secondary feature quantity measuring means is converted into a total of four directions of 0, 45, 90 and 135 degrees. This is a plurality of simultaneous occurrence probability matrices related to the direction of the direction.

【0028】本発明の第24の構成による画像検査装置
は、前記1次特徴量計測手段において計測する1次特徴
量を、輝度ヒストグラムとするものである。
An image inspection apparatus according to a twenty-fourth aspect of the present invention is such that the primary feature quantity measured by the primary feature quantity measuring means is a luminance histogram.

【0029】本発明の第25の構成による画像検査装置
は、前記縮退特徴ベクトル計算手段において、1つある
いは複数の同時生起行列に対して、行列の主対角線方向
に要素の和(投影)をとり、その各々の要素の和の値を
縮退特徴ベクトルの要素の一部とするものである。
In the image inspection apparatus according to a twenty-fifth aspect of the present invention, the degenerate feature vector calculating means calculates a sum (projection) of elements in one or a plurality of simultaneously occurring matrices in a main diagonal direction of the matrices. , The value of the sum of the respective elements as a part of the elements of the degenerated feature vector.

【0030】本発明の第26の構成による画像検査装置
は、前記縮退特徴ベクトル計算手段において、1つある
いは複数の同時生起確率行列に対して、行列の主対角線
方向に要素の和(投影)をとり、その各々の要素の和の
値を縮退特徴ベクトルの要素の一部とするものである。
In the image inspection apparatus according to the twenty-sixth aspect of the present invention, in the degenerate feature vector calculating means, for one or a plurality of simultaneous occurrence probability matrices, the sum (projection) of elements in the main diagonal direction of the matrix is calculated. The value of the sum of each element is taken as a part of the element of the degenerate feature vector.

【0031】本発明の第27の構成による画像検査装置
は、前記縮退特徴ベクトル計算手段において、輝度ヒス
トグラムの値を縮退特徴ベクトルの要素の一部とするも
のである。
In the image inspection apparatus according to the twenty-seventh aspect of the present invention, the degenerate feature vector calculating means uses the value of the luminance histogram as a part of the degenerate feature vector element.

【0032】本発明の第28の構成による画像検査装置
は、前記縮退特徴ベクトル計算手段において、1つある
いは複数の同時生起行列に対して、行列の主対角線方向
に要素の和(投影)をとり、その各々の要素の和の値と
同時生起行列の主対角要素の各値と輝度ヒストグラムの
値を組み合わせて縮退特徴ベクトルとするものである。
In the image inspection apparatus according to a twenty-eighth configuration of the present invention, the degenerate feature vector calculating means calculates a sum (projection) of elements in one or more simultaneously occurring matrices in the main diagonal direction of the matrices. , The sum of the respective elements, the value of the main diagonal element of the co-occurrence matrix, and the value of the luminance histogram are combined to form a reduced feature vector.

【0033】本発明の第29の構成による画像検査装置
は、前記縮退特徴ベクトルの計算手段において、1つあ
るいは複数の同時生起確率行列に対して、行列の主対角
線方向に要素の和(投影)をとり、その各々の要素の和
の値と同時生起確率行列の主対角要素の各値と輝度ヒス
トグラムの値を組み合わせて縮退特徴ベクトルとするも
のである。
An image inspection apparatus according to a twenty-ninth aspect of the present invention is the image inspection apparatus according to the twenty-ninth aspect, wherein the calculating means of the degenerate feature vector sums (projects) one or more simultaneous occurrence probability matrices in the main diagonal direction of the matrix. Then, the value of the sum of the respective elements, each value of the main diagonal element of the co-occurrence probability matrix, and the value of the luminance histogram are combined to form a reduced feature vector.

【0034】本発明の第30の構成による画像検査装置
は、前記縮退特徴ベクトル計算手段において、2次特徴
量として複数の同時生起行列または複数の同時生起確率
行列を用いた場合に、各々の行列の2次モーメントを計
算し、この大きさによってそれぞれの行列から得られる
特徴量の順番の並べ替えを行って縮退特徴ベクトルを構
成するものである。
An image inspection apparatus according to a thirtieth aspect of the present invention is the image inspection apparatus according to the thirtieth aspect, wherein the degenerate feature vector calculating means uses a plurality of simultaneous occurrence matrices or a plurality of simultaneous occurrence probability matrices as the secondary feature amounts. Is calculated, and the order of the feature amounts obtained from the respective matrices is rearranged according to the magnitude of the second moment to form a degenerate feature vector.

【0035】本発明の第31の構成による画像検査装置
は、前記出力ベクトル手段において、ニューラルネット
ワークを用いたものである。
In the image inspection apparatus according to the thirty-first aspect of the present invention, the output vector means uses a neural network.

【0036】本発明の第32の構成による画像検査装置
は、前記学習手段において、ニューラルネットワークを
用いたものである。
An image inspection apparatus according to a thirty-second aspect of the present invention uses the neural network in the learning means.

【0037】本発明の第33の構成による画像検査装置
は、前記学習手段において、LVQ学習則またはLVQ
2学習則を用いたものである。
In the image inspection apparatus according to the thirty-third configuration of the present invention, the learning means may include an LVQ learning rule or an LVQ
The two learning rules are used.

【0038】本発明の第34の構成による画像検査装置
は、前記判定手段において、良品/不良品判定を行うだ
けでなく、前記出力ベクトルの最小データと2番目に小
さいデータとの比較により、良品/不良品/判定保留の
出力を行うものである。
An image inspection apparatus according to a thirty-fourth aspect of the present invention is characterized in that the determination means not only performs a good / defective determination, but also compares the minimum data of the output vector with the second smallest data. / Defective product / judgment pending output.

【0039】[0039]

【発明の実施の形態】以下、本発明の画像検査方法を使
用する画像検査装置の実施の形態について説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of an image inspection apparatus using the image inspection method of the present invention will be described below.

【0040】実施の形態1.図1は本発明の画像検査方
法を用いた画像検査装置の1実施例の構成図である。ま
た図2は本発明の画像検査方法を示すフローチャートで
ある。以下、図1、図2を用いて説明する。ステップ1
の画像入力工程は次の様に実現される。撮像手段1は例
えば画像入力装置であるカメラ2とカメラより得られた
濃淡画像を保持するメモリ3より構成され、照明手段1
5に照らされた検査対象物16を撮像し濃淡画像を得
る。
Embodiment 1 FIG. 1 is a configuration diagram of an embodiment of an image inspection apparatus using the image inspection method of the present invention. FIG. 2 is a flowchart showing the image inspection method of the present invention. Hereinafter, description will be made with reference to FIGS. Step 1
The image input step is realized as follows. The imaging means 1 is composed of, for example, a camera 2 as an image input device and a memory 3 for holding a grayscale image obtained from the camera.
The inspection object 16 illuminated by 5 is imaged to obtain a grayscale image.

【0041】ステップ4の部分領域選択工程では、部分
領域選択手段4によって、前記撮像された対象物の濃淡
画像から画像の部分領域が選択される。この時選択する
画像の部分領域の数は1つでも複数でも良い。
In the partial area selecting step of step 4, the partial area selecting means 4 selects a partial area of the image from the captured grayscale image of the object. At this time, the number of partial areas of the image to be selected may be one or plural.

【0042】ステップ5の部分画像作成工程では、部分
画像作成手段5が選択された画像部分領域から階調を圧
縮し部分画像データを作成する。この際、圧縮される階
調数は固定階調とは限らず、濃淡画像全体または部分領
域画像の最大輝度、最小輝度によって階調数を変化させ
る。例えば、部分領域画像の輝度最大値をBmax、輝度Bm
inの場合、階調数Nを式(1)で算出する。
In the partial image creating step of step 5, the partial image creating means 5 creates partial image data by compressing the gradation from the selected image partial area. At this time, the number of gradations to be compressed is not limited to a fixed gradation, and the number of gradations is changed according to the maximum luminance and the minimum luminance of the entire grayscale image or the partial area image. For example, the maximum luminance value of the partial area image is Bmax, the luminance Bm
In the case of in, the number of gradations N is calculated by equation (1).

【0043】 N=[(1−(Bmin+1)/Bmax)×M+1]...(1)N = [(1− (Bmin + 1) / Bmax) × M + 1]. . . (1)

【0044】ここでMは最大階調数である。[]はガウス
の記号を示し、ガウスの記号では[X]はXを越えない最大
の整数を示す。これで得られた階調数N に対し、輝度B
の階調数変化後の輝度、すなわち部分画像の輝度f(B)を
例えば式(2)で算出する。 f(B)=[(B-Bmin)×N/(Bmax-Bmin+1)](Bmin≠Bmaxのと
き) f(B)=0(Bmin=Bmaxのとき)...(2)
Here, M is the maximum number of gradations. [] Indicates a Gaussian symbol, and [X] indicates the largest integer not exceeding X in the Gaussian symbol. For the number of tones N obtained in this way, the brightness B
, Ie, the luminance f (B) of the partial image, is calculated by, for example, equation (2). f (B) = [(B-Bmin) × N / (Bmax-Bmin + 1)] (when Bmin ≠ Bmax) f (B) = 0 (when Bmin = Bmax). . . (2)

【0045】この様に最大輝度、最小輝度によって階調
数を変化させることによって、最大輝度と最小輝度が比
較的近い値を持つ場合にも無理に階調数を大きくするこ
とによるノイズの増大を避けることができる。
As described above, by changing the number of gradations according to the maximum luminance and the minimum luminance, even when the maximum luminance and the minimum luminance have relatively close values, it is possible to reduce the increase in noise caused by forcibly increasing the number of gradations. Can be avoided.

【0046】ステップ6の2次特徴量計算工程では、階
調圧縮された部分画像に対して、2次特徴量計算手段6
が2次特徴量を計算する。2次特徴量とは画像の2点の
輝度の組の統計から得られる特徴量である。例えば2次
特徴量の1つである同時生起行列の計算の場合は次の様
になる。
In the secondary feature value calculating step of step 6, the secondary feature value calculating means 6 is applied to the gradation-compressed partial image.
Calculates the secondary feature quantity. The secondary feature amount is a feature amount obtained from statistics of a set of luminance at two points of an image. For example, in the case of calculating a co-occurrence matrix which is one of the secondary feature amounts, the following is performed.

【0047】まず同時生起行列のパラメータ(r、θ)
を設定する。図5に示すように、rは同時生起行列の計
算に用いる画像中の2点の距離を表し、θは2点が構成
する角度(度数)を表す。同時生起行列は画像中で距離
r、角度θ、θ+180゜の位置にある2点の輝度の組
をカウントすることで求められる。ここで、同時生起行
列のサイズはM×Mとする。M は前述した最大階調数であ
る。図4に同時生起行列の計算例を示す。図4(a)は
階調が0〜3に圧縮された後のサイズ5×5の部分画像
データの例を示し、(b)に(r、θ)=(1、0)の
パラメータによって計算されたサイズ4×4の同時生起
行列を示す。この様にして求められた同時生起行列は対
称行列になる。本実施例1では2次特徴量計算手段6は
この対称行列である同時生起行列を計算する。
First, the parameters (r, θ) of the co-occurrence matrix
Set. As shown in FIG. 5, r represents the distance between two points in the image used for calculating the co-occurrence matrix, and θ represents the angle (frequency) formed by the two points. The co-occurrence matrix is obtained by counting the set of luminances at two points located at a distance r, an angle θ, and θ + 180 ° in the image. Here, the size of the co-occurrence matrix is M × M. M is the maximum number of gradations described above. FIG. 4 shows a calculation example of the co-occurrence matrix. FIG. 4A shows an example of partial image data having a size of 5 × 5 after the gradation is compressed to 0 to 3, and FIG. 4B shows a calculation using the parameters of (r, θ) = (1, 0). 4 shows a generated co-occurrence matrix of size 4 × 4. The co-occurrence matrix obtained in this way is a symmetric matrix. In the first embodiment, the secondary feature quantity calculation means 6 calculates the co-occurrence matrix which is the symmetric matrix.

【0048】なお同時生起行列の定義によっては距離
r、角度θ、θ+180゜の位置にある2点の輝度の組
をカウントすることではなく、距離r、角度θの位置に
ある2点の輝度の組みをカウントするものもある。この
場合の同時生起行列は対称行列にならないが、別の実施
例として、この対称行列でない同時生起行列を計算して
用いてもかまわない。
Note that, depending on the definition of the co-occurrence matrix, instead of counting the set of the luminances of the two points at the position of the distance r, the angle θ and θ + 180 °, the luminance of the two points at the position of the distance r and the angle θ is not counted. Some count pairs. In this case, the co-occurrence matrix does not become a symmetric matrix. However, as another embodiment, a co-occurrence matrix that is not a symmetric matrix may be calculated and used.

【0049】ステップ7の1次特徴量計算工程では、階
調圧縮された部分画像に対して、1次特徴量計算手段7
が1次特徴量を計算する。1次特徴量とは画像の1点の
統計から得られる特徴量である。例えば輝度の度数分布
を表す輝度ヒストグラムなどは1次特徴量である。本実
施例1では1次特徴量として輝度ヒストグラムを計算す
る。
In the primary feature amount calculating step of step 7, the primary feature amount calculating means 7 is applied to the gradation-compressed partial image.
Calculates the primary feature quantity. The primary feature amount is a feature amount obtained from statistics of one point of an image. For example, a luminance histogram or the like representing a frequency distribution of luminance is a primary feature amount. In the first embodiment, a luminance histogram is calculated as a primary feature amount.

【0050】ステップ8の縮退特徴ベクトル計算工程で
は、計算された2次特徴量である同時生起行列と1次特
徴量である輝度ヒストグラムを用いて縮退特徴ベクトル
作成手段8が、さらに情報を圧縮した縮退ベクトルを次
の様にして作成する。
In the degenerate feature vector calculation step of step 8, the degenerate feature vector creating means 8 further compresses the information using the calculated co-occurrence matrix as the secondary feature and the luminance histogram as the primary feature. A degenerate vector is created as follows.

【0051】まず同時生起行列を用いて主対角線方向に
要素の和を取りデータの縮退を行う。この様子を図6に
示す。行列のサイズは同時生起行列は対称行列であるた
め要素の和は上3角行列に対してだけ計算しても良い。
また、要素の和をとるときは必ずしも全行列要素につい
て計算する必要はなく、行列の主対角線から右上に数え
て最大階調数M以内の適当な斜線列について計算しても
よい。これは通常の画像の場合、行列の右上、左下付近
の要素の値が比較的小さい場合が多く、特徴としての効
果が少ないためである。特に周期的な模様に関する情報
は主対角線要素に集中している。前記の対称行列でない
同時生起行列を用いた場合は、下3角行列に対しても主
対角線上の要素の和をとることは言うまでもない。
First, using the co-occurrence matrix, the elements are summed in the main diagonal direction to reduce the data. This is shown in FIG. Regarding the size of the matrix, since the co-occurrence matrix is a symmetric matrix, the sum of the elements may be calculated only for the upper triangular matrix.
In addition, when the sum of the elements is calculated, it is not always necessary to calculate for all the matrix elements, and the calculation may be performed for an appropriate diagonal line within the maximum number of gradations M counted from the main diagonal of the matrix to the upper right. This is because, in the case of a normal image, the values of the elements near the upper right and lower left of the matrix are often relatively small, and the effect as a feature is small. In particular, information on periodic patterns is concentrated on the main diagonal elements. When a co-occurrence matrix that is not a symmetric matrix is used, it goes without saying that the sum of elements on the main diagonal is also calculated for the lower triangular matrix.

【0052】図6の様に要素の対角線方向の和をデータ
としてとることは、2組の画素の明るさの差が等しいも
の同志で度数分布を計算していることにほかならない。
これはr=1の特別な場合は、微分画像のエッジの強度
ヒストグラムと一致する。このようにして情報量の多い
同時生起行列から有効なデータを抽出してデータを圧縮
することにより処理の大幅な高速化が実現できる。図4
(c)は、同時生起行列(b)を全要素の和で割り、規
格化したものである。
As shown in FIG. 6, taking the sum of the elements in the diagonal direction as data is nothing more than calculating the frequency distribution between two sets of pixels having the same difference in brightness.
This is consistent with the edge intensity histogram of the differential image in the special case of r = 1. In this way, by extracting effective data from the co-occurrence matrix having a large amount of information and compressing the data, it is possible to realize a significant increase in processing speed. FIG.
(C) is obtained by dividing the co-occurrence matrix (b) by the sum of all elements and normalizing the result.

【0053】さらに、上記の手順で得られた主対角線方
向のデータ4つ (16,12,0,0)と図4(b)の同時生起行
列の主対角線上の各要素値,(2,0,6,8)、および図4
(a)から得られる輝度ヒストグラムを輝度の低い方か
ら順番に並べたもの(2,4,10,9)を組み合わせたベクトル
(16,12,0,0,2,0,6,8,2,4,10,9)を作成する。
Further, four data (16, 12, 0, 0) in the main diagonal direction obtained by the above procedure and each element value on the main diagonal of the co-occurrence matrix shown in FIG. 0,6,8), and FIG.
Vector combining (2,4,10,9) brightness histograms obtained from (a) arranged in order from the lowest brightness
(16,12,0,0,2,0,6,8,2,4,10,9)

【0054】上で同時生起行列の主対角線上の各要素値
を加える理由は、通常の画像では主対角線付近の要素の
値が一般的に大きく、画像を特定する重要な特徴とみな
せることと、主対角線方向に和をとったデータで消失し
てしまった個々の要素の情報を補う効果があるためであ
る。
The reason for adding each element value on the main diagonal of the co-occurrence matrix is that the value of the element near the main diagonal is generally large in a normal image and can be regarded as an important feature for specifying the image. This is because there is an effect of compensating for information of individual elements that have been lost by data summed in the main diagonal direction.

【0055】最後に、得られたベクトルに対して最大要
素の値で割ることでベクトルを規格化し、縮退特徴ベク
トルを作成する。最後の規格化は出力ベクトル作成手段
がニューラルネットワークを用いて構成されていた場合
に必要となるものであり、ニューラルネットワークを用
いないときは必ずしも必要ではない。
Finally, the vector is normalized by dividing the obtained vector by the value of the maximum element, and a reduced feature vector is created. The last normalization is necessary when the output vector generating means is configured using a neural network, and is not always necessary when the neural network is not used.

【0056】ステップ9の出力ベクトル作成工程では、
ベクトル計算手段10と学習データベース11より成る
出力ベクトル作成手段9が、前記の縮退特徴ベクトルを
用いて以下の手順で出力ベクトルを作成する。
In the output vector creating step of step 9,
An output vector creating means 9 comprising a vector calculating means 10 and a learning database 11 creates an output vector by using the above-described degenerate feature vector in the following procedure.

【0057】学習データベース11にはデータとして例
えば、あらかじめ複数の良品から生成された良品を代表
する複数の縮退特徴ベクトルと複数の不良品から生成さ
れた不良品を代表する複数の縮退特徴ベクトルが格納さ
れている。
The learning database 11 stores, as data, for example, a plurality of degenerate feature vectors representing non-defective products generated from a plurality of non-defective products in advance and a plurality of degenerated feature vectors representing defective products generated from a plurality of defective products. Have been.

【0058】ベクトル計算手段10は、縮退特徴ベクト
ル作成手段の出力する縮退特徴ベクトルを入力ベクトル
として、学習データベース11の中に格納されている各
ベクトルとの近似性の指標である「距離」を計算する。ベ
クトル間の距離としては、例えばベクトルのユークリッ
ド距離や、ユークリッド距離に特別の重み付けがされた
マハラノビス距離などがあり、それらのどれを用いても
良い。また、この距離は、数学上の特定の定義に従う距
離でなくとも良く、例えばベクトルの角度でも良い。
The vector calculating means 10 calculates the “distance” which is an index of the closeness to each vector stored in the learning database 11, using the reduced feature vector output from the reduced feature vector creating means as an input vector. I do. Examples of the distance between vectors include a Euclidean distance of a vector and a Mahalanobis distance in which a special weight is applied to the Euclidean distance, and any of these may be used. The distance does not have to be a distance according to a specific mathematical definition, and may be, for example, an angle of a vector.

【0059】出力ベクトルとしては、学習データベース
中の複数の良品データから得られた距離を集めたベクト
ルと、学習データベース中の複数の不良品データから得
られた距離を集めたベクトルを分けて出力し、各々に良
品、不良品を示すタグ用のデータを添付する。分離せず
に1つのベクトルを出力しても良いが、その際はベクト
ルの各要素すなわち学習データベース中の各ベクトルに
対する「距離」が、良品との距離なのか不良品との距離な
のかを示すタグデータも出力する。
As an output vector, a vector obtained by collecting distances obtained from a plurality of non-defective data in the learning database and a vector obtained by collecting distances obtained from a plurality of defective data in the learning database are output separately. And tag data indicating good and defective products are attached to each. A single vector may be output without separation, but in this case, the "distance" for each element of the vector, that is, each vector in the learning database indicates whether the distance is between a good product or a defective product. Also outputs tag data.

【0060】ステップ13の判定工程では、判定手段1
3が出力ベクトル作成手段9の出力する出力ベクトルを
用いて判定結果を出力する。判定方法は例えば、まず出
力ベクトルの要素のうちで値が最も小さいもの(ベクト
ル間距離の近いもの)を選択する。次にそのタグデータ
を参照することでその要素が良品データに属するか不良
品データに属するかを判別し、最小要素が良品データに
属すれば良品、不良品データに属すれば不良品の出力を
行う。すなわち、学習データベースに貯えられているベ
クトルの中で一番近いベクトルが、良品に属するか不良
品であるかによって良品/不良品の出力を行う。
In the determination step of step 13, the determination means 1
Reference numeral 3 outputs a determination result using the output vector output from the output vector generation means 9. As a determination method, for example, among the elements of the output vector, the one with the smallest value (the one with the shortest inter-vector distance) is selected. Next, by referring to the tag data, it is determined whether the element belongs to non-defective data or defective data. If the minimum element belongs to non-defective data, a non-defective product is output. I do. That is, non-defective / defective products are output depending on whether the closest vector among the vectors stored in the learning database belongs to a non-defective product or is a defective product.

【0061】以上の実施の形態において、図1では学習
手段12が記載されているが、既に学習済みの学習デー
タベース11が存在しており、かつ検査実行にのみ本発
明による画像検査装置を使用する場合においては、必ず
しも学習手段12は必要でなく、切り離して使用しても
よい。
In the above embodiment, although the learning means 12 is shown in FIG. 1, the learning database 11 which has already been learned already exists, and the image inspection apparatus according to the present invention is used only for the execution of the inspection. In such a case, the learning means 12 is not always necessary and may be used separately.

【0062】実施の形態2.本実施の形態によれば、検
査対照に規則的な模様がある場合においても、検査対象
の傷や汚れを模様と分離して検出することができる。こ
こでは図1、図3を用いて、新規に学習データを登録、
学習して画像検査装置を実施する形態の1例について説
明する。図3は本発明の画像検査方法においてデータの
学習時の動作を示すフローチャートである。
Embodiment 2 According to the present embodiment, even when the inspection control has a regular pattern, it is possible to detect a flaw or stain on the inspection target separately from the pattern. Here, the learning data is newly registered using FIGS. 1 and 3,
An example of an embodiment in which the image inspection device is learned and implemented will be described. FIG. 3 is a flowchart showing an operation at the time of data learning in the image inspection method of the present invention.

【0063】ステップ1〜8までの工程すなわち、良品
サンプル、不良品サンプルともに撮像手段1で撮像し、
部分領域選択手段4、部分画像データ作成手段5を経て
部分画像を作成し、2次特徴量計算手段6および1次特
徴量計算手段7、縮退特徴ベクトル作成手段8を用いて
縮退特徴ベクトルを作成するまでは、前記実行例1で示
した検査実行例と同様である。
Steps 1 to 8, that is, both the non-defective sample and the defective sample are imaged by the imaging means 1.
A partial image is created through the partial area selecting unit 4 and the partial image data creating unit 5, and a reduced feature vector is created by using the secondary feature amount calculating unit 6, the primary feature amount calculating unit 7, and the reduced feature vector creating unit 8. Until this is done, the inspection is the same as the inspection execution example shown in the execution example 1.

【0064】良品サンプル、不良品サンプルの学習時に
は学習手段12が起動する。学習手段12はステップ1
2−1の縮退特徴ベクトル、教師信号記憶工程として、
各サンプル毎に前記縮退特徴ベクトルと教師信号17を
記憶しておく。教師信号17には各サンプルが良品また
は不良品であることを示すタグ信号を付属させる。
At the time of learning a good product sample and a defective product sample, the learning means 12 is activated. The learning means 12 performs step 1
As the 2-1 degenerate feature vector and teacher signal storage step,
The degenerate feature vector and the teacher signal 17 are stored for each sample. A tag signal indicating that each sample is a good or bad product is attached to the teacher signal 17.

【0065】学習がまだ行われていない学習データベー
ス11には例えば乱数で初期化された初期データベクト
ルが存在している。ステップ9の出力ベクトル計算工程
において、ベクトル計算手段10はこの学習データベー
ス11を用いて出力ベクトルを計算する。ただしこの
際、初期データは良品を代表するデータでもなく、不良
品を代表するデータでもないので、距離を集めたベクト
ルに例えば判定保留のタグデータをつけて出力する。実
際にはこのタグデータは用いられず、代わりにサンプル
と同時に学習手段12に入力される教師信号17がタグ
データとして用いられる。
In the learning database 11 in which learning has not been performed, there is an initial data vector initialized by, for example, random numbers. In the output vector calculation step of step 9, the vector calculation means 10 calculates the output vector using the learning database 11. However, at this time, since the initial data is neither data representing a non-defective product nor data representing a defective product, the distance-collected vector is output with, for example, tag data for which determination is suspended. In practice, this tag data is not used. Instead, a teacher signal 17 input to the learning means 12 at the same time as the sample is used as the tag data.

【0066】ステップ12−2の学習データベース更新
工程において、学習手段12はベクトル計算手段10の
出力する出力ベクトルと教師信号15から、学習データ
ベース11内で、入力した縮退特徴ベクトルに最も「近
い」データベクトルを選択し、それに良品/不良品タグ
が付いていなければタグを付ける。その後、例えば以下
のニューラルネットの学習則によって学習データベース
11内部のデータベクトルを更新していく。
In the learning database updating step of step 12-2, the learning means 12 extracts the data “closest” to the input degenerated feature vector in the learning database 11 from the output vector output from the vector calculation means 10 and the teacher signal 15. Select the vector and tag it if it doesn't have a good / bad tag. Thereafter, the data vectors inside the learning database 11 are updated according to, for example, the following neural network learning rules.

【0067】タグデータ(すなわち教師信号17)とし
てCiがついた縮退特徴ベクトルX,が入力されたとする。
It is assumed that a degenerate feature vector X with Ci is input as tag data (that is, the teacher signal 17).

【0068】Xに最も「近い」学習データベース11内部
のデータベクトルがRi(タグデータCiに属する)のと
き、 Ri(new)=Ri(old)+α(X−Ri(old))...(3)
When the data vector in the learning database 11 “closest” to X is Ri (belonging to the tag data Ci), Ri (new) = Ri (old) + α (X−Ri (old)). . . (3)

【0069】Xに最も「近い」学習データベース11内部
のデータベクトルがRj(タグデータCj≠Ciに属する)の
とき、 Rj(new)=Rj(old)−α(X−Rj(old))...(4) とする(0<α<2)。
When the data vector in the learning database 11 “closest” to X is Rj (belongs to tag data Cj ≠ Ci), Rj (new) = Rj (old) −α (X−Rj (old)). . . (4) Let (0 <α <2).

【0070】上記の学習則は、コホーネン(T.Kohonen)
:ザ,セルフオーガナイジングマップ(The Self-Organi
zing Map (Proceedings of the IEEE Vol.78,No.9,Sep,
1990))などの文献にあるLVQ学習則である。
The above learning rule is described in T. Kohonen.
: The Self-Organi Map
zing Map (Proceedings of the IEEE Vol.78, No.9, Sep,
1990)).

【0071】また、各データ間の分離を良くするために
LVQ2学習則では、さらにX,に最も「近い」学習データ
ベース11内部のデータベクトルがRjかつ、X,に2番目
に近いデータベクトルがRiの場合には、 Rj(new)=Rj(old)−α(X−Rj(old))...(5) Ri(new)=Ri(old)+α(X−Ri(old))...(6) とする工夫がなされている。
In order to improve the separation between the data, the LVQ2 learning rule further requires that the data vector in the learning database 11 “closest” to X, be Rj and the data vector second closest to X, be Ri. In the case of, Rj (new) = Rj (old) −α (X−Rj (old)). . . (5) Ri (new) = Ri (old) + α (X−Ri (old)). . . (6) The following is devised.

【0072】上記のコホーネンによるLVQ、LVQ2
学習則は、学習が収束するまでの時間が短い、計算コス
トが小さく高速である、認識精度が良いといった特徴が
あり、本発明においてもこれらの学習則を利用した場
合、検査速度、検査精度の向上といった効果が生じる。
LVQ, LVQ2 by Kohonen described above
The learning rules are characterized by a short time until the learning converges, a small calculation cost, high speed, and good recognition accuracy. In the present invention, when these learning rules are used, the inspection speed and the inspection accuracy are reduced. The effect of improvement is produced.

【0073】前記のデータ更新は、ベクトル計算手段1
0が出力する出力ベクトルの要素のうちで値が最も小さ
いものに関するタグデータが教師信号17と一致するま
で、以下に説明するように、同じデータ群を用いて反復
的に行われる。すなわち学習手段12に記憶されたサン
プルの縮退特徴データが正しく分類されるようになるま
で学習が行われる。
The data update is performed by the vector calculation means 1
Until the tag data regarding the element having the smallest value among the elements of the output vector output by 0 coincides with the teacher signal 17, the processing is repeatedly performed using the same data group as described below. That is, learning is performed until the degenerate feature data of the sample stored in the learning unit 12 is correctly classified.

【0074】反復終了の判定は、ステップ12−3の学
習収束判定工程として、学習手段12によって行われ
る。学習の終了条件には、前記出力ベクトルの要素のう
ちで値が最も小さいものの値が、あらかじめ指定した値
以下にならないと学習が終了しないという条件を付して
も良い。
The determination of the end of the repetition is performed by the learning means 12 as a learning convergence determination step of step 12-3. The condition for terminating the learning may include a condition that the learning is not terminated unless the value of the element having the smallest value among the elements of the output vector becomes less than or equal to a value specified in advance.

【0075】学習が収束しない場合は、ステップ12−
1の縮退特徴ベクトル、教師信号出力工程に戻り、すで
に記憶してある縮退特徴ベクトルと教師データを再度出
力し、ステップ12−1、ステップ12−2、ステップ
12−3で構成される学習ループで反復的に学習が行わ
れる。図3の中では、この反復的な学習時の処理のフロ
ーを黒太線で示している。
If the learning does not converge, step 12-
1 and returns to the step of outputting the reduced feature vector and the teacher signal, and outputs the stored reduced feature vector and the teacher data again. In the learning loop composed of steps 12-1, 12-2, and 12-3, Learning is performed repeatedly. In FIG. 3, the flow of the process at the time of this repetitive learning is indicated by a thick black line.

【0076】以上の学習手段12の動作によって、与え
られた良品/不良品サンプルを用いて学習データベース
11を生成し、改善することができる。
By the operation of the learning means 12 described above, the learning database 11 can be generated and improved using the given good / defective samples.

【0077】本実施の形態では、学習において教師信号
17を使用したが、これだけでなく、検査実行中にステ
ップ13としての判定手段13が出力する判定結果をス
テップ12−1としての学習手段12にフィードバック
して用い、検査実行と学習を同時に行うことも可能であ
る。これは、まず最初に学習データベース11を作成し
た後、徐々に学習データベースをチューニングしていく
際などに有効である。
In the present embodiment, the teacher signal 17 is used in the learning. In addition to this, the judgment result output by the judging means 13 as the step 13 during the test is sent to the learning means 12 as the step 12-1. It is also possible to perform inspection and learning at the same time by using feedback. This is effective when the learning database 11 is created first and then the learning database is tuned gradually.

【0078】なお、本実施の形態ではLVQ学習則また
はLVQ2学習則を用いたが、これに限定されるもので
はなく、バックプロパゲーションなどの他の学習則に従
うニューラルネットワークを用いても良い。この際、学
習データベース11はバックプロパゲーションで用いる
多層ネットワークの重みデータを管理するものとなり、
出力ベクトル作成手段9の出力する出力ベクトルは、多
層ネットワークの出力層が出力するベクトルとなる。
In the present embodiment, the LVQ learning rule or the LVQ2 learning rule is used. However, the present invention is not limited to this, and a neural network according to another learning rule such as back propagation may be used. At this time, the learning database 11 manages the weight data of the multilayer network used in the back propagation,
The output vector output by the output vector creating means 9 is a vector output by the output layer of the multilayer network.

【0079】また、学習手段は学習データベース更新に
おいて、学習データベース内にあるデータを更新するだ
けでなく、新たにデータを追加したり、削除したりして
も良い。なかなか学習が収束しない場合には、新たにデ
ータを追加することで収束が早まる場合がある。また不
要なデータを削除すると検査速度が向上する効果があ
る。
Further, in updating the learning database, the learning means may not only update the data in the learning database but also add or delete new data. If learning does not easily converge, convergence may be accelerated by adding new data. Also, deleting unnecessary data has the effect of improving the inspection speed.

【0080】本来、出力ベクトル作成手段9は、ニュー
ラルネットワークをかならずしも用いる必要はないが、
学習データベース11の作成にニューラルネットの学習
則を用いた場合、出力ベクトル作成手段を同種のニュー
ラルネットワークを用いて構成することは当然可能であ
り、新たに異なる出力ベクトル作成手段を構成すること
に比べれば構造が単純になるといった利点がある。
Originally, the output vector creating means 9 does not always need to use a neural network.
When the learning rule of the neural network is used to create the learning database 11, it is of course possible to configure the output vector creating means using the same kind of neural network. This has the advantage that the structure is simplified.

【0081】実施の形態3.本実施の形態では前述した
実施の形態の変形例について説明する。この変形例で
は、図1に示した2次特徴量計算手段6で計算する2次
特徴量として0度方向、45度方向、90度方向、13
5度方向の計4方向の向きに関する複数の同時生起行列
を用い、縮退特徴ベクトル生成手段8によって縮退特徴
ベクトルを構成する。
Embodiment 3 In the present embodiment, a modified example of the above-described embodiment will be described. In this modification, the secondary feature amounts calculated by the secondary feature amount calculating means 6 shown in FIG.
Using a plurality of co-occurrence matrices in a total of four directions of 5 degrees, the degenerated feature vector generating means 8 forms a degenerated feature vector.

【0082】これらの4つの方向を図5に示す。図5で
は135度方向に対して基準画素が対象となっていない
が、これは計算を簡便に行うための方法である。もちろ
ん基準画素に対して135度方向に組となる画素を選ん
でもよいが、基準画素が画像の左の縁の部分になった場
合、135度方向の画素がないために、この場合は計算
しないなどの処理を行う必要がある。
FIG. 5 shows these four directions. Although the reference pixel is not targeted in the 135-degree direction in FIG. 5, this is a method for simplifying the calculation. Of course, a pixel that forms a pair in the 135-degree direction with respect to the reference pixel may be selected. However, if the reference pixel is located at the left edge of the image, there is no pixel in the 135-degree direction, so calculation is not performed in this case. It is necessary to perform such processing.

【0083】上記の様に4つの方向を定め、2次特徴量
計算手段6は1つの部分画像に対して4つの同時生起行
列を計算する。次に縮退特徴ベクトル作成手段8は各同
時生起行列に対して、図6に示した様に主対角線方向に
要素の和をとり、データの圧縮を行う。各同時生起行列
から得られた圧縮後のデータは図7に示す様に、1つの
ベクトルにまとめられる。
As described above, the four directions are determined, and the secondary feature quantity calculating means 6 calculates four simultaneous occurrence matrices for one partial image. Next, as shown in FIG. 6, the degenerate feature vector creating means 8 calculates the sum of the elements in the main diagonal direction as shown in FIG. 6 and compresses the data. The compressed data obtained from each co-occurrence matrix is combined into one vector as shown in FIG.

【0084】さらに縮退特徴ベクトル作成手段8は、各
同時生起行列の主対角要素についても1つのベクトルと
してまとめる。最後に、上記対角線方向の要素和より得
られるベクトル、主対角要素として得られるベクトル、
1次特徴量である輝度ヒストグラムより得られるベクト
ルをまとめて1つのベクトルとして縮退特徴ベクトルを
生成する。この様子を図8に示す。
Further, the degenerate feature vector creating means 8 collects the main diagonal elements of each co-occurrence matrix as one vector. Finally, a vector obtained from the sum of the diagonal elements, a vector obtained as a main diagonal element,
Vectors obtained from the luminance histogram, which is the primary feature amount, are combined to generate a reduced feature vector as one vector. This is shown in FIG.

【0085】このようにして、異なる複数方向の同時生
起行列を用いることによって、さらに詳細な2次特徴量
を得ることができ、結果的に検査精度が向上する効果が
ある。
As described above, by using the simultaneous occurrence matrices in different directions, it is possible to obtain a more detailed secondary feature amount, and as a result, there is an effect that the inspection accuracy is improved.

【0086】さらに上述した複数の同時生起行列に対し
て、同時生起行列の全要素の2乗和で与えられる同時生
起行列の2次モーメントM2を各同時生起行列毎に計算
し、一番大きい(または小さい)2次モーメントを持つ
同時生起行列から得られる縮退データ(すなわち主対角
線上の要素和より得られるベクトルや主対角要素として
得られるベクトル)を先頭にする様にベクトルを並び変
えて、縮退特徴ベクトルを生成しても良い。この並び変
えは、例えば90度方向の同時生起行列の2次モーメン
トが最大であれば、並べるベクトルの順は、90度→1
35度→0度→45度とする。また、135度方向の同
時生起行列の2次モーメントが最大であれば、並べるベ
クトルの順は、135度→0度→45度→90度とす
る。並び替えの先頭は2次モーメントの最大値(または
最小値)を与える同時生起行列によって変わるが、並び
の順序はサイクリックに保存する。この様子を図9に示
す。
Further, for the above-mentioned plurality of co-occurrence matrices, the second moment M2 of the co-occurrence matrix given by the sum of squares of all elements of the co-occurrence matrix is calculated for each co-occurrence matrix, and is the largest ( The vectors are rearranged so that the degenerate data obtained from the co-occurrence matrix having the second moment (or the vector obtained from the sum of the elements on the main diagonal and the vector obtained as the main diagonal element) comes first. A degenerate feature vector may be generated. This rearrangement is performed, for example, if the second moment of the co-occurrence matrix in the 90-degree direction is the maximum, the order of the arranged vectors is 90 degrees → 1
35 degrees → 0 degrees → 45 degrees. If the second moment of the co-occurrence matrix in the 135-degree direction is the maximum, the order of the arranged vectors is 135 degrees → 0 degrees → 45 degrees → 90 degrees. The head of the rearrangement depends on the co-occurrence matrix that gives the maximum value (or the minimum value) of the second moment, but the order of the rearrangement is cyclically saved. This is shown in FIG.

【0087】同時生起行列の2次モーメントは、行列の
要素の値が集中する場合に大きな値となり、画像のテキ
スチャーの一様性を示すものである。このことから、上
で求めた方向が異なる複数の同時生起行列の2次モーメ
ントの並びによってその画像の角度をおおまかに推定す
ることができる。上記の様に主対角線上の要素和より得
られるベクトル、主対角要素として得られるベクトルを
2次モーメントの大きさを用いて並び変えることは画像
の角度を同一の方向に回転していることにほかならな
い。したがって、この様に縮退ベクトルを構成すると、
対象の画像が大きく回転していても誤認識なく検査する
ことができるという効果が生じる。
The second moment of the co-occurrence matrix becomes large when the values of the elements of the matrix are concentrated, indicating the uniformity of the texture of the image. From this, it is possible to roughly estimate the angle of the image based on the arrangement of the second moments of the plurality of simultaneous occurrence matrices having different directions obtained above. Rearranging the vector obtained from the sum of the elements on the main diagonal line and the vector obtained as the main diagonal element using the magnitude of the second moment as described above means that the angle of the image is rotated in the same direction. It is nothing less than. Therefore, when constructing the degenerate vector in this way,
There is an effect that inspection can be performed without erroneous recognition even if the target image is largely rotated.

【0088】もちろん上記の方法では、同時生起行列が
対称行列であることを利用して、行列の上3角行列の要
素の2乗和を計算して2次モーメントの値の代わりにし
てもよい。
Of course, in the above method, the fact that the co-occurrence matrix is a symmetric matrix may be used to calculate the sum of squares of the elements of the upper triangular matrix and substitute for the value of the second moment. .

【0089】実施の形態4.本実施の形態では前述した
実施の形態の変形例について説明する。この変形例で
は、図1に示した2次特徴量計算手段6で計算する2次
特徴量として同時生起行列ではなく同時生起確率行列を
用いる。
Embodiment 4 In the present embodiment, a modified example of the above-described embodiment will be described. In this modification, a co-occurrence probability matrix, not a co-occurrence matrix, is used as the secondary feature quantity calculated by the secondary feature quantity calculation means 6 shown in FIG.

【0090】同時生起確率行列とは、同時生起行列の各
要素を全要素の和で除して規格化した行列であり、図4
(c)に同時生起確率行列の例を示す。同時生起行列は
規格されていないために、その行列の値は部分画像デー
タ作成手段5が出力する部分画像データの大きさ(図4
(a)の行列のサイズ)に強く依存する。すなわち部分
画像が拡大/縮小された場合などでは、同時生起行列の
要素の値は拡大/縮小の割合に従って変化する。これは
同時生起行列が2点の輝度の組み合わせ数を単純にカウ
ントするという定義から明らかである。これに対して、
同時生起確率行列では行列の要素の和で正規化されてい
るため、部分画像の拡大/縮小に対して行列の値は不変
である。このことから同時生起確率行列は入力される画
像の大きさに対してロバストであり、安定した特徴量を
出力できるという効果がある。
The co-occurrence probability matrix is a matrix obtained by dividing each element of the co-occurrence matrix by the sum of all the elements, and is shown in FIG.
(C) shows an example of the simultaneous occurrence probability matrix. Since the co-occurrence matrix is not specified, the value of the matrix is the size of the partial image data output by the partial image data creating means 5 (FIG. 4).
(The size of the matrix in (a)). That is, when the partial image is enlarged / reduced, the value of the element of the co-occurrence matrix changes according to the ratio of the enlargement / reduction. This is clear from the definition that the co-occurrence matrix simply counts the number of combinations of luminances at two points. On the contrary,
Since the co-occurrence probability matrix is normalized by the sum of the elements of the matrix, the value of the matrix does not change with respect to the enlargement / reduction of the partial image. Therefore, the simultaneous occurrence probability matrix is robust with respect to the size of the input image, and has an effect that a stable feature amount can be output.

【0091】また検査実行時の部分画像の大きさを、学
習データ作成時の部分画像の大きさと異なる様にするこ
とが可能になる。このことによって、検査実行時まで部
分画像の大きさが決定できない場合への対処が可能にな
ることや、1度ある所定の大きさの部分画像を用いて作
成した学習データベースの適用範囲が広がり、その結果
学習データベースのサイズが小さくなること、学習デー
タベースのサイズが小さくなることで検査速度が向上す
るという利点が生じる。
Further, it is possible to make the size of the partial image at the time of performing the inspection different from the size of the partial image at the time of creating the learning data. This makes it possible to cope with the case where the size of the partial image cannot be determined until the inspection is performed, and expands the application range of the learning database created by using the partial image once having a predetermined size. As a result, there is an advantage that the size of the learning database is reduced, and the inspection speed is improved by reducing the size of the learning database.

【0092】他の実施の形態について同時生起行列の代
わりに同時生起確率行列を用いても大いに有効であり、
上述した効果が発揮される。
It is very effective to use a co-occurrence probability matrix instead of a co-occurrence matrix in other embodiments.
The effects described above are exhibited.

【0093】実施の形態5.本実施の形態では前述した
実施の形態の変形例について説明する。この変形例で
は、図1に示した判定手段13において、判定結果14
を単なる良否判定にとどまらず、良品/不良品/判定保
留品の3つの出力を行うようにした構成について述べ
る。
Embodiment 5 In the present embodiment, a modified example of the above-described embodiment will be described. In this modified example, the determination unit 13 shown in FIG.
Is not limited to a mere quality determination, and a configuration in which three outputs of a good product / defective product / determination pending product are performed will be described.

【0094】実施の形態1で説明した判定手段13は、
出力ベクトル作成手段9が出力する出力ベクトルの要素
のうち値の最も小さいものを選択し、そのタグデータが
良品をしめすものか不良品をしめすものかで判定結果1
4を出力していたが、出力ベクトルの要素の値のうち最
も小さいものの値が、あらかじめ指定した判定値A以下
にならなければ、タグデータが示す情報にかかわりな
く、判定保留品の出力を行うように判定手段13を構成
する。
The determining means 13 described in the first embodiment
The element having the smallest value is selected from the elements of the output vector output by the output vector creating means 9, and the judgment result 1 is determined based on whether the tag data indicates a good item or a defective item.
4 is output, but if the value of the smallest one of the elements of the output vector does not fall below the predetermined judgment value A, the judgment pending product is output irrespective of the information indicated by the tag data. The determination means 13 is configured as described above.

【0095】また、出力ベクトル作成手段9が出力する
出力ベクトルのうち、最も小さい値だけでなく、2番目
に小さい値を用いて判定を行ってもよい。例えば、最も
小さい値が前記のあらかじめ指定した判定値以下の値で
あっても、2番目に小さい値のタグデータの内容が最も
小さい値のタグデータの内容と異なり、かつ、最も小さ
い値と2番目に小さい値の差が、あらかじめ指定した別
の判定値B以下であれば判定の信頼性が低いものとして
判定不能とする。
In addition, the determination may be made using not only the smallest value but also the second smallest value among the output vectors output by the output vector creating means 9. For example, even if the smallest value is equal to or less than the predetermined value, the content of the tag data with the second smallest value is different from the content of the tag data with the smallest value, If the difference of the second smallest value is equal to or smaller than another judgment value B specified in advance, it is determined that the reliability of the judgment is low and the judgment is impossible.

【0096】以下の例を具体的に考える。 最も小さい値 =0.5 最も小さい値のタグデータ
=良品 2番目に小さい値=0.8 2番目に小さい値のタグデ
ータ=不良品 判定値A=0.6、判定値B=0.5
The following example is specifically considered. Smallest value = 0.5 Smallest value tag data = non-defective product Second lowest value = 0.8 Second lowest value tag data = defective product Judgment value A = 0.6, Judgment value B = 0.5

【0097】この場合、最も小さい値は0.5で判定値
以下であるが、最も小さい値のタグデータと2番目に小
さい値のタグデータはそれぞれ良品、不良品で異なり、
しかもその差は0.3で判定値B以下であるので判定保
留となる。以上の構成の1例をフローチャートにまとめ
たものを図10に示す。
In this case, the smallest value is 0.5, which is smaller than or equal to the judgment value. However, the tag data having the smallest value and the tag data having the second smallest value are different between non-defective products and defective products, respectively.
Moreover, the difference is 0.3, which is equal to or less than the determination value B, and the determination is suspended. FIG. 10 shows a flowchart summarizing one example of the above configuration.

【0098】以上の様に判定手段13によって良品、不
良品、判定保留の3出力が得られる様に構成すると、現
在の学習データベース11を用いて良否判定が行い難い
ものについて判定保留品として分類できる。この判定保
留品を次回の学習時にサンプルとして用いれば、初期の
学習データベースが不完全なものであっても、学習デー
タベースの精度を高めていくことができる。
As described above, if the determination means 13 is configured to obtain three outputs of non-defective products, defective products, and pending determination, those items for which it is difficult to perform the quality determination using the current learning database 11 can be classified as pending determination products. . If this judgment pending product is used as a sample in the next learning, the accuracy of the learning database can be improved even if the initial learning database is incomplete.

【0099】実施の形態6.本実施の形態では前述した
本発明における画像検査装置を鉄鋼材などの部品/製品
検査へ応用した形態について説明する.鉄鋼材の検査に
おいては、例えば、鋼材の傷やへこみ等の欠陥検査に本
発明の装置が用いられる。鋼材の表面などには鋼材独特
の模様があるため、通常の検査方法では検査できない。
この点で本発明における画像検査装置の適用は大いに有
効である。鉄鋼材への検査に応用した場合では図1にお
ける撮像手段1におけるカメラ2にはラインセンサや高
解像度カメラなどを用い、高速画像入力、広視野画像入
力を実現する。また上記のカメラの取り付けは、検査対
象である鋼材などの部品/製品16に対して所定の角度
をもって取り付けることもある。照明手段15は検査対
象16が鋼材など鏡面反射を行いやすいものであれば、
面光源照明など鏡面反射をおこしにくい照明を用いた
り、ライン照明を用いたりすることがある。ライン照明
の場合はライン照明を特定の角度で取り付けるととも
に、その正反射光を受光する様にカメラ2も位置調整を
行う。
Embodiment 6 FIG. In the present embodiment, an embodiment in which the above-described image inspection apparatus of the present invention is applied to inspection of parts / products such as steel materials will be described. In the inspection of steel materials, for example, the apparatus of the present invention is used for defect inspection such as scratches and dents of steel materials. Since the surface of the steel material has a pattern peculiar to the steel material, it cannot be inspected by a normal inspection method.
In this regard, the application of the image inspection apparatus of the present invention is very effective. In the case of application to inspection of steel materials, a high-speed image input and a wide-field image input are realized by using a line sensor, a high-resolution camera, or the like as the camera 2 in the imaging unit 1 in FIG. The camera may be attached at a predetermined angle to a part / product 16 such as a steel material to be inspected. The illuminating means 15 is provided if the inspection object 16 is a material such as a steel material that easily performs specular reflection.
In some cases, illumination that does not easily cause specular reflection, such as surface light source illumination, or line illumination is used. In the case of the line illumination, the line illumination is attached at a specific angle, and the position of the camera 2 is adjusted so as to receive the specularly reflected light.

【0100】実施の形態7.本実施の形態では、前述し
た本発明における画像検査装置を木材などの木目検査へ
応用した形態について説明する。通常、木材には年輪の
筋(すじ)があるが、なかでも節(ふし)があるか否か
により木材の価値が変化する。木目検査とは木材に年輪
の節があるかどうかを判別するものである。本発明にお
ける画像検査装置では、年輪の筋という対象物の模様に
に影響されず、節の有無を容易に検出できる。この例に
みられる様に、本発明の画像検査装置はいわゆる欠陥検
査だけでなく、あるパターンが対象物に存在しているか
どうか(節のある木材の認識)についての検査やパター
ンの同一性の検査(筋のみがある木材の認識)も可能で
ある。
Embodiment 7 FIG. In the present embodiment, an embodiment in which the above-described image inspection apparatus according to the present invention is applied to grain inspection of wood or the like will be described. Normally, wood has streaks of annual rings, but the value of the wood changes depending on whether or not there are knots. The wood grain inspection is to determine whether there is a knot of annual rings in the wood. With the image inspection device according to the present invention, the presence or absence of a node can be easily detected without being affected by the pattern of the target object such as a streak of annual rings. As seen in this example, the image inspection apparatus of the present invention performs not only a so-called defect inspection, but also an inspection as to whether or not a certain pattern exists in an object (recognition of knotted wood), and a pattern identity check. Inspection (recognition of wood with only streaks) is also possible.

【0101】[0101]

【発明の効果】本発明は、以上説明したように構成され
ているので、以下に記載するような効果を奏する。
Since the present invention is constructed as described above, it has the following effects.

【0102】本発明の第1の構成である画像検査方法に
よれば、対象物の映像信号から得られた濃淡画像の部分
領域を選択し、選択された部分領域に対して輝度階調を
圧縮した部分画像データを作成し、前記部分画像データ
に対して2次画像特徴量および1次画像特徴量を計算
し、2次画像特徴量および1次画像特徴量をデータ圧縮
してデータ量の少ない縮退特徴ベクトルを計算し、縮退
特徴ベクトルを、あらかじめ学習させておいた良品にも
とずくデータまたはあらかじめ学習させておいた不良品
にもとずくデータと比較してデータ間の近似度の指標で
ある出力ベクトルを計算し、出力ベクトルを用いて対象
物の良不良を判定するように構成したので、表面に模様
等のある対象物の傷や汚れ検査などが正確に検査でき
る。
According to the image inspection method of the first configuration of the present invention, a partial area of a grayscale image obtained from a video signal of an object is selected, and the luminance gradation is compressed for the selected partial area. The secondary image feature amount is created, the secondary image feature amount and the primary image feature amount are calculated for the partial image data, and the secondary image feature amount and the primary image feature amount are compressed to reduce the data amount. The degenerate feature vector is calculated, and the degenerate feature vector is compared with data based on a good product that has been previously learned or based on a defective product that has been previously learned. Since an output vector is calculated and the quality of the object is determined using the output vector, the inspection of the object having a pattern or the like on its surface can be inspected accurately for flaws and stains.

【0103】本発明の第2の構成である画像検査方法に
よれば、階調を圧縮した部分画像データの作成におい
て、濃淡画像の全体領域または前記部分領域の最大輝度
と最小輝度の値に応じて圧縮後の階調数を変化させて部
分画像データを作成するように構成したので、階調数を
固定的にとることによる部分画像のノイズ増大を防ぐこ
とができる。
According to the image inspection method of the second configuration of the present invention, in the generation of partial image data in which the gradation is compressed, according to the values of the maximum luminance and the minimum luminance of the entire area of the grayscale image or the partial area. Since the partial image data is created by changing the number of gradations after compression, it is possible to prevent an increase in noise of the partial image due to the fixed number of gradations.

【0104】本発明の第3の構成である画像検査方法に
よれば、2次特徴量として同時生起行列を用いるように
構成したので、画像の模様の構造を的確にとらえ、検査
精度を高めることができる。
According to the image inspection method of the third configuration of the present invention, since the co-occurrence matrix is used as the secondary feature amount, the structure of the image pattern can be accurately grasped and the inspection accuracy can be improved. Can be.

【0105】本発明の第4の構成である画像検査方法に
よれば、2次特徴量として0度方向、45度方向、90
度方向、135度方向の計4方向の向きに関する複数の
同時生起行列を用いるように構成したので、画像の模様
の構造の方向性を的確にとらえ、検査精度を高めること
ができる。
According to the image inspection method of the fourth configuration of the present invention, the secondary feature amount is 0 degree direction, 45 degree direction, 90 degree direction.
Since a plurality of co-occurrence matrices are used in a total of four directions, ie, the direction of 135 degrees and the direction of 135 degrees, the directionality of the structure of the image pattern can be accurately grasped, and the inspection accuracy can be improved.

【0106】本発明の第5の構成である画像検査方法に
よれば、2次特徴量として同時生起確率行列を用いるよ
うに構成したので、部分画像の大きさによらず、画像の
模様の構造を的確にとらえ、検査精度を高めることがで
きる。
According to the image inspection method of the fifth configuration of the present invention, since the simultaneous occurrence probability matrix is used as the secondary feature amount, the structure of the pattern of the image is independent of the size of the partial image. And the inspection accuracy can be improved.

【0107】本発明の第6の構成である画像検査方法に
よれば、2次特徴量として0度方向45度方向、90度
方向、135度方向の計4方向の向きに関する複数の同
時生起確率行列を用いるように構成したので、部分画像
の大きさによらず、画像の模様の構造の方向性を的確に
とらえ、検査精度を高めることができる。
According to the image inspection method of the sixth configuration of the present invention, a plurality of simultaneous occurrence probabilities relating to a total of four directions of the 45-degree direction, the 90-degree direction, and the 135-degree direction as the secondary feature amount. Since the configuration is such that the matrix is used, it is possible to accurately detect the directionality of the structure of the pattern of the image regardless of the size of the partial image and improve the inspection accuracy.

【0108】本発明の第7の構成である画像検査方法に
よれば、1次特徴量として輝度ヒストグラムを用いるよ
うに構成したので、2次特徴量を用いるだけでは欠落し
ている画像の大局的な特徴を補い、検査精度を高めるこ
とができる。
According to the image inspection method of the seventh configuration of the present invention, since the luminance histogram is used as the primary feature, the global feature of the missing image is obtained only by using the secondary feature. Characteristics can be supplemented and inspection accuracy can be improved.

【0109】本発明の第8の構成である画像検査方法に
よれば、縮退特徴ベクトルの計算において、1つあるい
は複数の同時生起行列に対して、行列の主対角線方向に
要素の和(投影)をとり、その各々の要素の和の値を縮
退特徴ベクトルの要素の一部とするように構成したの
で、情報量の多い同時生起行列から有効なデータを抽出
でき、検査速度の向上や検査精度を高めることができ
る。
According to the image inspection method of the eighth configuration of the present invention, in the calculation of the degenerate feature vector, the sum (projection) of the elements in the main diagonal direction of one or a plurality of simultaneously occurring matrices is calculated. And the value of the sum of each element is made to be a part of the element of the degenerate feature vector, so that effective data can be extracted from the co-occurrence matrix with a large amount of information, thereby improving the inspection speed and the inspection accuracy. Can be increased.

【0110】本発明の第9の構成である画像検査方法に
よれば、縮退特徴ベクトルの計算において、1つあるい
は複数の同時生起確率行列に対して、行列の主対角線方
向に要素の和(投影)をとり、その各々の要素の和の値
を縮退特徴ベクトルの要素の一部とするように構成した
ので、情報量の多い同時生起確率行列から有効なデータ
を抽出でき、検査速度の向上や検査精度を高めることが
できる。
According to the image inspection method of the ninth configuration of the present invention, in the calculation of the degenerate feature vector, the sum (projection) of one or more simultaneous occurrence probability matrices in the main diagonal direction of the matrix is calculated. ), And the value of the sum of each element is made to be a part of the element of the degenerate feature vector, so that effective data can be extracted from the co-occurrence probability matrix with a large amount of information, and the inspection speed can be improved. Inspection accuracy can be improved.

【0111】本発明の第10の構成である画像検査方法
によれば、縮退特徴ベクトルの計算において、輝度ヒス
トグラムの値を縮退特徴ベクトルの要素の一部とするよ
うに構成したので、2次特徴量を用いるだけでは欠落し
ている画像の大局的な特徴のうち重要な輝度ヒストグラ
ム情報を付加し、検査精度を高めることができる。
According to the image inspection method of the tenth configuration of the present invention, in the calculation of the degenerated feature vector, the value of the luminance histogram is configured to be a part of the elements of the degenerated feature vector. Only by using the amount, important luminance histogram information among the global features of the missing image can be added to improve the inspection accuracy.

【0112】本発明の第11の構成である画像検査方法
によれば、縮退特徴ベクトルの計算において、1つある
いは複数の同時生起行列に対して、行列の主対角線方向
に要素の和(投影)をとり、その各々の要素の和の値と
同時生起行列の主対角要素の各値と輝度ヒストグラムの
値を組み合わせて縮退特徴ベクトルとするように構成し
たので、2次特徴量の同時生起行列から有効なデータを
抽出して縮退したデータと1次特徴量の輝度ヒストグラ
ムを同時に利用でき、検査速度の向上や検査精度を高め
ることができる。
According to the image inspection method of the eleventh configuration of the present invention, in the calculation of the degenerate feature vector, the sum (projection) of the elements in the main diagonal direction of one or a plurality of simultaneously occurring matrices is calculated. And the value of the luminance histogram is combined with the value of the sum of each element, the value of the main diagonal element of the co-occurrence matrix, and the value of the luminance histogram. Effective data can be extracted from the data, and the degenerated data and the luminance histogram of the primary feature can be used at the same time, thereby improving the inspection speed and the inspection accuracy.

【0113】本発明の第12の構成である画像検査方法
によれば、縮退特徴ベクトルの計算において、1つある
いは複数の同時生起確率行列に対して、行列の主対角線
方向に要素の和(投影)をとり、その各々の要素の和の
値と同時生起確率行列の主対角要素の各値と輝度ヒスト
グラムの値を組み合わせて縮退特徴ベクトルとするよう
に構成したので、2次特徴量の同時生起確率行列から有
効なデータを抽出して縮退したデータと1次特徴量の輝
度ヒストグラムを同時に利用でき、検査速度の向上や検
査精度を高めることができる。
According to the image inspection method of the twelfth aspect of the present invention, in the calculation of the degenerate feature vector, the sum (projection) of one or more simultaneous occurrence probability matrices in the main diagonal direction of the matrix is calculated. ), And the values of the sum of the respective elements, the values of the main diagonal elements of the co-occurrence probability matrix, and the values of the luminance histogram are combined to form a reduced feature vector. Effective data can be extracted from the occurrence probability matrix, and the degenerated data and the luminance histogram of the primary feature can be used simultaneously, thereby improving the inspection speed and the inspection accuracy.

【0114】本発明の第13の構成である画像検査方法
によれば、縮退特徴ベクトルの計算において、2次特徴
量として複数の同時生起行列または複数の同時生起確率
行列を用いた場合に、各々の行列の2次モーメントを計
算し、この大きさによってそれぞれの行列から得られる
特徴量の順番の並べ替えを行って縮退特徴ベクトルを構
成するようにしたので、対象物の画像が回転していても
誤認識なく検査できる。
According to the image inspection method of the thirteenth configuration of the present invention, when a plurality of co-occurrence matrices or a plurality of co-occurrence probability matrices are used as secondary feature amounts in the calculation of the degenerate feature vector, The second moment of the matrix is calculated, and the order of the feature amounts obtained from the respective matrices is rearranged according to the magnitude to form the degenerate feature vector, so that the image of the object is rotated. Can be inspected without erroneous recognition.

【0115】本発明の第14の構成である画像検査方法
によれば、縮退特徴ベクトルから出力ベクトルを計算す
る方法において、ニューラルネットワークを用いるよう
に構成したので、ニューラルネットワークを用いて学習
したデータを簡便に使用することができ、検査方法の構
成が比較的単純になる。
According to the image inspection method of the fourteenth configuration of the present invention, in the method of calculating the output vector from the degenerate feature vector, the neural network is used, so that the data learned using the neural network can be used. It can be used simply and the configuration of the inspection method is relatively simple.

【0116】本発明の第15の構成である画像検査方法
によれば、あらかじめ良品または不良品の縮退特徴量デ
ータを学習させておく方法において、ニューラルネット
ワークを用いるように構成したので、良品または不良品
の学習が、画像の提示とその画像に対する判定(教師信
号を用いた良否)を入力するだけで実行でき、検査前の
学習が簡便になる。
According to the image inspection method of the fifteenth configuration of the present invention, the method for learning the degenerate feature data of the non-defective product or the defective product in advance uses a neural network. Non-defective learning can be performed only by presenting an image and inputting a judgment on the image (pass / fail using a teacher signal), and learning before inspection is simplified.

【0117】本発明の第16の構成である画像検査方法
によれば、ニューラルネットワークを用いた学習方法に
おいて、LVQ学習則またはLVQ2学習則を用いるよ
うに構成したので、学習および認識、検査が高速かつ高
精度にできる。
According to the image inspection method of the sixteenth configuration of the present invention, since the learning method using the neural network uses the LVQ learning rule or the LVQ2 learning rule, the learning, recognition and inspection can be performed at high speed. And high accuracy.

【0118】本発明の第17の構成である画像検査方法
によれば、良否判定の出力において、良品/不良品判定
を行うだけでなく、前記出力ベクトルの最小データと2
番目に小さいデータとの比較により良品/不良品/判定
保留の出力を行うように構成したので、現在の学習デー
タでは判定し難いものを分類できる。
According to the image inspection method of the seventeenth configuration of the present invention, in the output of the pass / fail judgment, not only the good / defective judgment is performed, but also the minimum data of the output vector and 2
Since it is configured to output the non-defective / defective / judgment suspension by comparing it with the second smallest data, it is possible to classify data that is difficult to judge with the current learning data.

【0119】本発明の第18の構成である画像検査装置
によれば、対象物の映像信号から濃淡画像を得る撮像手
段と、撮像手段によって得られた濃淡画像の部分領域を
選択する部分領域選択手段と、選択された部分領域に対
して輝度階調を圧縮した部分画像データを作成する部分
画像データ作成手段と、部分画像データに対して2次画
像特徴量を計算する2次特徴量計算手段と、部分画像デ
ータに対して1次画像特徴量を計算する1次特徴量計算
手段と、2次画像特徴量および1次画像特徴量をデータ
圧縮してデータ量の少ない縮退特徴ベクトルを計算する
縮退特徴ベクトル計算手段と、縮退特徴ベクトルを用い
て良品の縮退特徴ベクトルまたは不良品の縮退特徴ベク
トルを学習する学習手段と、縮退特徴ベクトルを、学習
手段によってあらかじめ学習させておいた良品にもとず
くデータまたはあらかじめ学習させておいた不良品にも
とずくデータと比較してデータ間の近似度の指標である
出力ベクトルを計算する出力ベクトル計算手段と、出力
ベクトルを用いて対象物の良不良を判定する判定手段を
備えるように構成したので、表面に模様等のある対象物
の傷や汚れ検査などが正確に検査できる。
According to the eighteenth configuration of the image inspection apparatus of the present invention, an imaging means for obtaining a grayscale image from a video signal of an object, and a partial area selection for selecting a partial area of the grayscale image obtained by the imaging means Means, partial image data creating means for creating partial image data in which luminance gradation is compressed for the selected partial area, and secondary feature quantity calculating means for calculating secondary image feature quantities for the partial image data A primary feature calculating unit for calculating a primary image feature for the partial image data; and a degenerate feature vector having a small data size by compressing the secondary image feature and the primary image feature. A degenerate feature vector calculating means, a learning means for learning a non-defective degenerate feature vector or a defective degenerate feature vector using the degenerate feature vector, and a degenerate feature vector by the learning means. Output vector calculation means for calculating an output vector which is an index of the degree of approximation between data by comparing the data based on good products which have been previously learned or the data based on defective products which have been previously learned; Since the apparatus is provided with the determination means for determining the quality of the object using the output vector, the inspection of the object having a pattern or the like on its surface can be inspected accurately.

【0120】本発明の第19の構成である画像検査装置
によれば、部分画像データ作成手段において、濃淡画像
の全体領域または部分領域の最大輝度と最小輝度の値に
応じて圧縮後の階調数を変化させて部分画像データを作
成するように構成したので、階調数を固定的にとること
による部分画像データのノイズ増大を防ぐことができ
る。
According to the image inspection apparatus of the nineteenth aspect of the present invention, the partial image data creating means uses the compressed gray scale according to the maximum luminance and the minimum luminance of the entire area or the partial area of the grayscale image. Since the partial image data is created by changing the number, it is possible to prevent an increase in noise of the partial image data due to the fixed number of gradations.

【0121】本発明の第20の構成である画像検査装置
によれば、2次特徴量計測手段において計測する2次特
徴量を、同時生起行列としたので、画像の模様の構造を
的確にとらえ、検査精度を高めることができる。
According to the image inspection apparatus of the twentieth aspect of the present invention, since the secondary feature quantity measured by the secondary feature quantity measuring means is a co-occurrence matrix, the structure of the image pattern can be accurately grasped. Inspection accuracy can be improved.

【0122】本発明の第21の構成である画像検査装置
によれば、2次特徴量計測手段において計測する計測す
る2次特徴量を、0度方向、135度方向の計4方向の
向きに関する複数の同時生起行列とするように構成した
ので、画像の模様の構造の方向性を的確にとらえ、検査
精度を高めることができる。
According to the image inspection apparatus of the twenty-first configuration of the present invention, the secondary feature amounts to be measured by the secondary feature amount measuring means are related to the directions of the 0 degree direction and the 135 degree direction in a total of four directions. Since a plurality of co-occurrence matrices are configured, the directionality of the structure of the image pattern can be accurately grasped, and the inspection accuracy can be improved.

【0123】本発明の第22の構成である画像検査装置
によれば、2次特徴量計測手段において計測する2次特
徴量を、同時生起確率行列としたので、部分画像の大き
さによらず、画像の模様の構造を的確にとらえ、検査精
度を高めることができる。
According to the image inspection apparatus of the twenty-second configuration of the present invention, since the secondary feature quantity measured by the secondary feature quantity measuring means is a simultaneous occurrence probability matrix, it does not depend on the size of the partial image. In addition, the structure of the image pattern can be accurately grasped, and the inspection accuracy can be improved.

【0124】本発明の第23の構成である画像検査装置
によれば、2次特徴量計測手段において計測する2次特
徴量を、0度方向、45度方向、90度方向、135度
方向の計4方向の向きに関する複数の同時生起確率行列
としたので、部分画像の大きさによらず、画像の模様の
構造の方向性を的確にとらえ、検査精度を高めることが
できる。
According to the image inspection apparatus of the twenty-third configuration of the present invention, the secondary feature quantity measured by the secondary feature quantity measuring means can be measured in the 0 degree direction, the 45 degree direction, the 90 degree direction, and the 135 degree direction. Since a plurality of simultaneous occurrence probability matrices for a total of four directions are used, the directionality of the structure of the pattern of the image can be accurately grasped regardless of the size of the partial image, and the inspection accuracy can be improved.

【0125】本発明の第24の構成である画像検査装置
によれば、1次特徴量計測手段において計測する1次特
徴量を、輝度ヒストグラムとするように構成したので、
2次特徴量を用いるだけでは欠落している画像の大局的
な特徴を補い、検査精度を高めることができる。
According to the image inspection apparatus of the twenty-fourth configuration of the present invention, the primary feature quantity measured by the primary feature quantity measuring means is configured to be a luminance histogram.
By using only the secondary feature amount, the global feature of the missing image can be compensated and the inspection accuracy can be improved.

【0126】本発明の第25の構成である画像検査装置
によれば、縮退特徴ベクトル計算手段において、1つあ
るいは複数の同時生起行列に対してて、行列の主対角線
方向に要素の和(投影)をとり、その各々の要素の和の
値を縮退特徴ベクトルの要素の一部とするように構成し
たので、情報量の多い同時生起行列から有効なデータを
抽出でき、検査速度の向上や検査精度を高めることがで
きる。
According to the image inspection apparatus of the twenty-fifth configuration of the present invention, the degenerate feature vector calculating means calculates the sum (projection) of one or a plurality of co-occurring matrices in the main diagonal direction of the matrices. ), And the value of the sum of each element is made to be a part of the element of the degenerate feature vector, so that effective data can be extracted from the co-occurrence matrix having a large amount of information, thereby improving the inspection speed and inspection. Accuracy can be increased.

【0127】本発明の第26の構成である画像検査装置
によれば、縮退特徴ベクトル計算手段において、1つあ
るいは複数の同時生起確率行列に対して、行列の主対角
線方向に要素の和(投影)をとり、その各々の要素の和
の値を縮退特徴ベクトルの要素の一部とするように構成
したので、情報量の多い同時生起確率行列から有効なデ
ータを抽出でき、検査速度の向上や検査精度を高めるこ
とができる。
According to the image inspection apparatus of the twenty-sixth aspect of the present invention, the degenerate feature vector calculation means calculates the sum (projection) of one or more simultaneous occurrence probability matrices in the main diagonal direction of the matrix. ), And the value of the sum of each element is made to be a part of the element of the degenerate feature vector, so that effective data can be extracted from the co-occurrence probability matrix with a large amount of information, and the inspection speed can be improved. Inspection accuracy can be improved.

【0128】本発明の第27の構成である画像検査装置
によれば、縮退特徴ベクトル計算手段において、輝度ヒ
ストグラムの値を縮退特徴ベクトルの要素の一部とする
ように構成したので、2次特徴量を用いるだけでは欠落
している画像の大局的な特徴のうち重要な輝度ヒストグ
ラム情報を付加し、検査精度を高めることができる。
According to the image inspection apparatus of the twenty-seventh configuration of the present invention, the reduced feature vector calculation means is configured so that the value of the luminance histogram is a part of the reduced feature vector elements. Only by using the amount, important luminance histogram information among the global features of the missing image can be added to improve the inspection accuracy.

【0129】本発明の第28の構成である画像検査装置
によれば、縮退特徴ベクトル計算手段において、1つあ
るいは複数の同時生起行列に対して、行列の主対角線方
向に要素の和(投影)をとり、その各々の要素の和の値
と同時生起行列の主対角要素の各値と輝度ヒストグラム
の値を組み合わせて縮退特徴ベクトルとするように構成
したので、2次特徴量の同時生起行列から有効なデータ
を抽出して縮退したデータと1次特徴量の輝度ヒストグ
ラムを同時に利用でき、検査速度の向上や検査精度を高
めることができる。
According to the image inspection apparatus having the twenty-eighth configuration of the present invention, the degenerate feature vector calculation means calculates the sum (projection) of the elements in the main diagonal direction of one or a plurality of simultaneously occurring matrices. And the value of the luminance histogram is combined with the value of the sum of each element, the value of the main diagonal element of the co-occurrence matrix, and the value of the luminance histogram. Effective data can be extracted from the data, and the degenerated data and the luminance histogram of the primary feature can be used at the same time, thereby improving the inspection speed and the inspection accuracy.

【0130】本発明の第29の構成である画像検査装置
によれば、縮退特徴ベクトルの計算手段において、1つ
あるいは複数の同時生起確率行列に対して、行列の主対
角線方向に要素の和(投影)をとり、その各々の要素の
和の値と同時生起確率行列の主対角要素の各値と輝度ヒ
ストグラムの値を組み合わせて縮退特徴ベクトルとする
ように構成したので、2次特徴量の同時生起確率行列か
ら有効なデータを抽出して縮退したデータと1次特徴量
の輝度ヒストグラムを同時に利用でき、検査速度の向上
や検査精度を高めることができる
According to the image inspection apparatus having the twenty-ninth configuration of the present invention, the degenerate feature vector calculating means calculates the sum of the elements (one or more simultaneous occurrence probability matrices) in the main diagonal direction of the matrix. Projection), and the degenerate feature vector is configured by combining the value of the sum of each element, the value of the main diagonal element of the co-occurrence probability matrix, and the value of the luminance histogram. Effective data is extracted from the co-occurrence probability matrix, and the degenerated data and the luminance histogram of the primary feature amount can be used at the same time, thereby improving the inspection speed and the inspection accuracy.

【0131】本発明の第30の構成である画像検査装置
によれば、縮退特徴ベクトル計算手段において、2次特
徴量として複数の同時生起行列または複数の同時生起確
率行列を用いた場合に、各々の行列の2次モーメントを
計算し、この大きさによってそれぞれの行列から得られ
る特徴量の順番の並べ替えを行って縮退特徴ベクトルを
構成するように構成したので、対象物の画像が回転して
いても誤認識なく検査できる。
According to the image inspection apparatus having the thirtieth configuration of the present invention, when a plurality of co-occurrence matrices or a plurality of co-occurrence probability matrices are used as the secondary feature in the degenerate feature vector calculating means, The second moment of the matrix is calculated, and the order of the feature amounts obtained from the respective matrices is rearranged according to the magnitude to form the degenerate feature vector. Therefore, the image of the object is rotated. It can be inspected without misrecognition.

【0132】本発明の第31の構成である画像検査装置
によれば、出力ベクトル手段において、ニューラルネッ
トワークを用いるように構成したので、ニューラルネッ
トワークを用いて学習したデータを簡便に使用すること
ができ、検査方法の構成が比較的単純になる。
According to the image inspection apparatus of the thirty-first configuration of the present invention, the output vector means is configured to use the neural network, so that the data learned using the neural network can be used easily. In addition, the configuration of the inspection method becomes relatively simple.

【0133】本発明の第32の構成である画像検査装置
によれば、学習手段において、ニューラルネットワーク
を用いるように構成したので、良品または不良品の学習
が、画像の提示とその画像に対する判定(教師信号を用
いた良否)を入力するだけで実行でき、検査前の学習が
簡便になる。
According to the image inspection apparatus of the thirty-second aspect of the present invention, since the learning means is configured to use the neural network, the learning of the non-defective product or the defective product is based on the presentation of the image and the judgment on the image ( It can be executed only by inputting the pass / fail using the teacher signal, and the learning before the inspection is simplified.

【0134】本発明の第33の構成である画像検査装置
によれば、学習手段において、LVQ学習則またはLV
Q2学習則を用いるように構成したので、学習および認
識、検査が高速かつ高精度にできる。
According to the image inspection apparatus of the thirty-third configuration of the present invention, the learning means uses the LVQ learning rule or the LV
Since the Q2 learning rule is used, learning, recognition, and inspection can be performed at high speed and with high accuracy.

【0135】本発明の第34の構成である画像検査装置
によれば、判定手段において、良品/不良品判定を行う
だけでなく、前記出力ベクトルの最小データと2番目に
小さいデータとの比較により良品/不良品/判定保留の
出力を行うように構成したので、現在の学習データでは
判定し難いものを分類できる。
According to the image inspection apparatus of the thirty-fourth configuration of the present invention, the judgment means not only performs the good / defective judgment, but also compares the minimum data of the output vector with the second smallest data. Since it is configured to output the non-defective / defective / judgment suspension, it is possible to classify items that are difficult to judge with the current learning data.

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

【図1】 本発明の画像検査方法を使用する画像検査装
置の構成の1例を示すブロック図である。
FIG. 1 is a block diagram showing an example of a configuration of an image inspection apparatus using an image inspection method of the present invention.

【図2】 本発明の画像検査方法の実行時の動作の1例
を示すフローチャートである。
FIG. 2 is a flowchart showing an example of an operation at the time of executing the image inspection method of the present invention.

【図3】 本発明の画像検査方法の学習時の動作の1例
を示すフローチャートである。
FIG. 3 is a flowchart showing an example of an operation at the time of learning of the image inspection method of the present invention.

【図4】 本発明の同時生起行列、同時生起確率行列の
計算例を示す図である。
FIG. 4 is a diagram illustrating a calculation example of a co-occurrence matrix and a co-occurrence probability matrix according to the present invention.

【図5】 本発明において複数の同時生起行列または同
時生起確率行列を計算する方向の1例を示す図である。
FIG. 5 is a diagram showing an example of a direction in which a plurality of simultaneous occurrence matrices or simultaneous occurrence probability matrices are calculated in the present invention.

【図6】 本発明において縮退特徴ベクトルの要素の1
部を計算する方法の1例を示す図である。
FIG. 6 shows an example of an element of a degenerate feature vector according to the present invention.
It is a figure showing an example of the method of calculating a part.

【図7】 本発明において複数の同時生起行列または同
時生起確率行列を用いて、縮退特徴ベクトルの要素の1
部を計算する方法の1例を示す図である。
FIG. 7 is a diagram illustrating one example of an element of a degenerated feature vector using a plurality of co-occurrence matrices or co-occurrence probability matrices in the present invention.
It is a figure showing an example of the method of calculating a part.

【図8】 本発明において複数の同時生起行列または同
時生起確率行列を用いて、縮退特徴ベクトルを計算する
方法の1例を示す図である。
FIG. 8 is a diagram showing an example of a method for calculating a degenerate feature vector using a plurality of simultaneous occurrence matrices or simultaneous occurrence probability matrices in the present invention.

【図9】 本発明において複数の同時生起行列または同
時生起確率行列を用いて、要素の並べ替えによって、縮
退特徴ベクトルを計算する方法の1例を示す図である。
FIG. 9 is a diagram illustrating an example of a method of calculating a degenerate feature vector by rearranging elements using a plurality of simultaneous occurrence matrices or simultaneous occurrence probability matrices according to the present invention.

【図10】本発明における判定方法の1例を示すフロー
チャートである。
FIG. 10 is a flowchart illustrating an example of a determination method according to the present invention.

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

1 撮像手段、4 部分領域選択手段、5 部分画像デ
ータ作成手段、6 2次特徴量計算手段、7 1次特徴
量計算手段、8 縮退特徴ベクトル作成手段、9出力ベ
クトル作成手段、12 学習手段、13 判定手段、1
4 判定結果。
Reference Signs List 1 imaging means, 4 partial area selecting means, 5 partial image data creating means, 6 secondary feature amount calculating means, 7 primary feature amount calculating means, 8 reduced feature vector creating means, 9 output vector creating means, 12 learning means, 13 determination means, 1
4 Judgment result.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 火原 辰則 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 ────────────────────────────────────────────────── ─── Continuing on the front page (72) Inventor Tatsunori Hihara 2-3-2 Marunouchi, Chiyoda-ku, Tokyo Mitsubishi Electric Corporation

Claims (34)

【特許請求の範囲】[Claims] 【請求項1】 対象物の映像信号から得られた濃淡画像
の部分領域を選択し、前記選択された部分領域に対して
輝度階調を圧縮した部分画像データを作成し、前記部分
画像データに対して2次画像特徴量および1次画像特徴
量を計算し、前記2次画像特徴量および1次画像特徴量
をデータ圧縮してデータ量の少ない縮退特徴ベクトルを
計算し、,前記縮退特徴ベクトルを、予め学習させてお
いた良品にもとずくデータまたはあらかじめ学習させて
おいた不良品にもとずくデータと比較してデータ間の近
似度の指標である出力ベクトルを計算し、前記出力ベク
トルを用いて対象物の良不良を判定することを特徴とす
る画像検査方法。
1. A partial area of a grayscale image obtained from a video signal of an object is selected, and partial image data is created by compressing a luminance gradation of the selected partial area. On the other hand, a secondary image feature amount and a primary image feature amount are calculated, and the secondary image feature amount and the primary image feature amount are subjected to data compression to calculate a reduced feature vector having a small data amount. Is compared with the data based on good products previously learned or the data based on defective products previously learned to calculate an output vector which is an index of the degree of similarity between the data, and the output vector An image inspection method characterized in that the quality of a target object is determined using the method.
【請求項2】 前記輝度階調を圧縮した部分画像データ
の作成において、前記濃淡画像の全体領域または部分領
域の最大輝度と最小輝度の値に応じて圧縮後の階調数を
変化させて部分画像データを作成する請求項1記載の画
像検査方法。
2. A method for creating partial image data in which the luminance gradation is compressed, by changing the number of gradations after compression according to the maximum luminance and the minimum luminance of the entire area or the partial area of the grayscale image. 2. The image inspection method according to claim 1, wherein image data is created.
【請求項3】 前記2次特徴量として同時生起行列を用
いた請求項1記載の画像検査方法。
3. The image inspection method according to claim 1, wherein a co-occurrence matrix is used as the secondary feature amount.
【請求項4】 前記2次特徴量として0度方向、45度
方向、90度方向、135度方向の計4方向の向きに関
する複数の同時生起行列を用いた請求項3記載の画像検
査方法。
4. The image inspection method according to claim 3, wherein a plurality of co-occurrence matrices in a total of four directions including a 0-degree direction, a 45-degree direction, a 90-degree direction, and a 135-degree direction are used as the secondary feature amounts.
【請求項5】 前記2次特徴量として同時生起確率行列
を用いた請求項1記載の画像検査方法。
5. The image inspection method according to claim 1, wherein a co-occurrence probability matrix is used as the secondary feature amount.
【請求項6】 前記2次特徴量として0度方向、45度
方向、90度方向、135度方向の計4方向の向きに関
する複数の同時生起確率行列を用いた請求項5記載の画
像検査方法。
6. The image inspection method according to claim 5, wherein a plurality of simultaneous occurrence probability matrices relating to a total of four directions of a 0-degree direction, a 45-degree direction, a 90-degree direction, and a 135-degree direction are used as the secondary feature amounts. .
【請求項7】 前記1次特徴量として輝度ヒストグラム
を用いた請求項1記載の画像検査方法。
7. The image inspection method according to claim 1, wherein a luminance histogram is used as the primary feature amount.
【請求項8】 前記縮退特徴ベクトルの計算において、
1つあるいは複数の同時生起行列に対して、行列の主対
角線方向に要素の和(投影)をとり、その各々の要素の
和の値を縮退特徴ベクトルの要素の一部とする請求項3
記載の画像検査方法。
8. The calculation of the degenerate feature vector,
4. A sum (projection) of elements in the main diagonal direction of one or a plurality of co-occurrence matrices, and a value of the sum of each element is set as a part of an element of a degenerated feature vector.
Image inspection method as described.
【請求項9】 前記縮退特徴ベクトルの計算において、
1つあるいは複数の同時生起確率行列に対して、行列の
主対角線方向に要素の和(投影)をとり、その各々の要
素の和の値を縮退特徴ベクトルの要素の一部とする請求
項5記載の画像検査方法。
9. The calculation of the degenerate feature vector,
6. A sum (projection) of elements in one or a plurality of simultaneous occurrence probability matrices in a main diagonal direction of the matrix, and a value of the sum of each element is set as a part of an element of a degenerate feature vector. Image inspection method as described.
【請求項10】 前記縮退特徴ベクトルの計算におい
て、輝度ヒストグラムの値を縮退特徴ベクトルの要素の
一部とする請求項7記載の画像検査方法。
10. The image inspection method according to claim 7, wherein in the calculation of the reduced feature vector, the value of the luminance histogram is set as a part of the reduced feature vector element.
【請求項11】 前記縮退特徴ベクトルの計算におい
て、1つあるいは複数の同時生起行列に対して、行列の
主対角線方向に要素の和(投影)をとり、その各々の要
素の和の値と同時生起行列の主対角要素の各値と輝度ヒ
ストグラムの値を組み合わせて縮退特徴ベクトルとした
請求項3記載の画像検査方法。
11. In the calculation of the degenerate feature vector, for one or a plurality of co-occurring matrices, a sum (projection) of elements in the main diagonal direction of the matrix is calculated, and the sum of the sum of the respective elements is calculated. 4. The image inspection method according to claim 3, wherein each value of the main diagonal element of the occurrence matrix and the value of the luminance histogram are combined to form a reduced feature vector.
【請求項12】 前記縮退特徴ベクトルの計算におい
て、1つあるいは複数の同時生起確率行列に対して、行
列の主対角線方向に要素の和(投影)をとり、その各々
の要素の和の値と同時生起確率行列の主対角要素の各値
と輝度ヒストグラムの値を組み合わせて縮退特徴ベクト
ルとした請求項5記載の画像検査方法。
12. In the calculation of the degenerate feature vector, for one or a plurality of simultaneous occurrence probability matrices, a sum (projection) of elements is taken in a main diagonal direction of the matrix, and a value of the sum of each element is calculated. 6. The image inspection method according to claim 5, wherein each value of the main diagonal element of the co-occurrence probability matrix and the value of the luminance histogram are combined to form a reduced feature vector.
【請求項13】 前記縮退特徴ベクトルの計算におい
て、2次特徴量として複数の同時生起行列または複数の
同時生起確率行列を用いた場合に、各々の行列の2次モ
ーメントを計算し、この大きさによってそれぞれの行列
から得られる特徴量の順番の並べ替えを行って縮退特徴
ベクトルを構成することとした請求項3または請求項5
記載の画像検査方法。
13. In the calculation of the degenerate feature vector, when a plurality of co-occurrence matrices or a plurality of co-occurrence probability matrices are used as secondary feature amounts, a second moment of each matrix is calculated. 6. A reduced feature vector is constructed by rearranging the order of feature amounts obtained from respective matrices by using
Image inspection method as described.
【請求項14】 前記縮退特徴ベクトルから出力ベクト
ルを計算する方法において、ニューラルネットワークを
用いたことを特徴とする請求項1記載の画像検査方法。
14. The image inspection method according to claim 1, wherein a neural network is used in the method for calculating an output vector from the degenerated feature vector.
【請求項15】 あらかじめ良品または不良品の縮退特
徴ベクトルを学習させておく方法において、ニューラル
ネットワークを用いたことを特徴とする請求項1記載の
画像検査方法。
15. The image inspection method according to claim 1, wherein a neural network is used in the method of learning the degenerate feature vector of a good or bad product in advance.
【請求項16】 前記ニューラルネットワークを用いた
学習方法において、LVQ学習則またはLVQ2学習則
を用いたことを特徴とする請求項15記載の画像検査方
法。
16. The image inspection method according to claim 15, wherein in the learning method using the neural network, an LVQ learning rule or an LVQ2 learning rule is used.
【請求項17】 前記良否判定の出力において、良品/
不良品判定を行うだけでなく、前記出力ベクトルの最小
データと2番目に小さいデータとの比較により、良品/
不良品/判定保留の出力を行うことを特徴とする請求項
1記載の画像検査方法。
17. A non-defective / non-defective product in the output of the pass / fail judgment.
In addition to performing defective product determination, a comparison between the minimum data of the output vector and the second smallest data allows a good /
2. The image inspection method according to claim 1, wherein the output of defective / judgment is output.
【請求項18】 対象物の映像信号から濃淡画像を得る
撮像手段と、前記撮像手段によって得られた濃淡画像の
部分領域を選択する部分領域選択手段と、前記選択され
た部分領域に対して輝度階調を圧縮した部分画像データ
を作成する部分画像データ作成手段と、前記部分画像デ
ータに対して2次画像特徴量を計算する2次特徴量計算
手段と、前記部分画像データに対して1次画像特徴量を
計算する1次特徴量計算手段と、前記2次画像特徴量お
よび1次画像特徴量をデータ圧縮してデータ量の少ない
縮退特徴ベクトルを計算する縮退特徴ベクトル作成手段
と、前記縮退特徴ベクトルを用いて良品の縮退特徴ベク
トルまたは不良品の縮退特徴ベクトルを学習する学習手
段と、前記縮退特徴ベクトルを、前記学習手段によって
あらかじめ学習させておいた良品にもとずくデータまた
はあらかじめ学習させておいた不良品にもとずくデータ
と比較してデータ間の近似値の指標である出力ベクトル
を計算する出力ベクトル作成手段と、前記出力ベクトル
を用いて対象物の良不良を判定する判定手段を備えたこ
とを特徴とする画像検査装置。
18. An imaging unit for obtaining a grayscale image from a video signal of an object, a partial region selecting unit for selecting a partial region of the grayscale image obtained by the imaging unit, and a luminance for the selected partial region. Partial image data creating means for creating partial image data with compressed gradation; secondary feature quantity calculating means for calculating a secondary image feature quantity for the partial image data; A primary feature quantity calculating means for calculating an image feature quantity, a reduced feature vector creating means for compressing the secondary image feature quantity and the primary image feature quantity to calculate a reduced feature vector having a small data amount; Learning means for learning a degenerate feature vector of a good product or a degenerate feature vector of a defective product using a feature vector; and Output vector generating means for calculating an output vector which is an index of an approximate value between data by comparing the data based on the good product or the data based on the defective product which has been learned in advance, and the output vector An image inspection apparatus, comprising: a determination unit configured to determine whether a target object is good or bad by using the method.
【請求項19】 前記部分画像データ作成手段におい
て、前記濃淡画像の全体領域または部分領域の最大輝度
と最小輝度の値に応じて圧縮後の階調数を変化させて部
分画像データを作成する請求項18記載の画像検査装
置。
19. The partial image data creating unit creates partial image data by changing the number of gradations after compression according to the maximum luminance and the minimum luminance of the entire area or the partial area of the grayscale image. Item 19. The image inspection device according to Item 18.
【請求項20】 前記2次特徴量計算手段において計算
する2次特徴量を、同時生起行列とした請求項18記載
の画像検査装置。
20. The image inspection apparatus according to claim 18, wherein the secondary feature amount calculated by the secondary feature amount calculation means is a co-occurrence matrix.
【請求項21】 前記2次特徴量計算手段において計算
する2次特徴量を、0度方向、45度方向、90度方
向、135度方向の計4方向の向きに関する複数の同時
生起行列とした請求項20記載の画像検査装置。
21. A secondary feature amount calculated by the secondary feature amount calculation means is a plurality of simultaneous occurrence matrices in a total of four directions of 0 degree direction, 45 degree direction, 90 degree direction, and 135 degree direction. The image inspection apparatus according to claim 20.
【請求項22】 前記2次特徴量計算手段において計算
する2次特徴量を、同時生起確率行列とした請求項18
記載の画像検査装置。
22. The secondary feature quantity calculated by the secondary feature quantity calculation means is a simultaneous occurrence probability matrix.
The image inspection apparatus according to the above.
【請求項23】 前記2次特徴量計算手段において計算
する2次特徴量を、0度方向、45度方向、90度方
向、135度方向の計4方向の向きに関する複数の同時
生起確率行列とした請求項22記載の画像検査装置。
23. A secondary feature quantity calculated by the secondary feature quantity calculation means is defined as a plurality of simultaneous occurrence probability matrices for a total of four directions of 0, 45, 90, and 135 degrees. 23. The image inspection apparatus according to claim 22, wherein:
【請求項24】 前記1次特徴量計算手段において計算
する1次特徴量を、輝度ヒストグラムとした請求項18
記載の画像検査装置。
24. The primary feature value calculated by the primary feature value calculation means is a luminance histogram.
The image inspection apparatus according to the above.
【請求項25】 前記縮退特徴ベクトル作成手段におい
て、1つあるいは複数の同時生起行列に対して、行列の
主対角線方向に要素の和(投影)をとり、その各々の要
素の和の値を縮退特徴ベクトルの要素の一部とした請求
項20記載の画像検査装置。
25. The degenerate feature vector generating means calculates a sum (projection) of elements in the main diagonal direction of one or a plurality of co-occurrence matrices, and degenerates the sum value of each element. 21. The image inspection apparatus according to claim 20, wherein the image inspection apparatus is a part of a feature vector element.
【請求項26】 前記縮退特徴ベクトル作成手段におい
て、1つあるいは複数の同時生起確率行列に対して、行
列の主対角線方向に要素の和(投影)をとり、その各々
の要素の和の値を縮退特徴ベクトルの要素の一部とした
請求項22記載の画像検査装置。
26. The degenerate feature vector generating means calculates a sum (projection) of elements in one or more simultaneous occurrence probability matrices in a main diagonal direction of the matrix, and calculates a sum value of each of the elements. 23. The image inspection apparatus according to claim 22, wherein the image inspection apparatus includes a part of the elements of the degenerate feature vector.
【請求項27】 前記縮退特徴ベクトル作成手段におい
て、輝度ヒストグラムの値を縮退特徴ベクトルの要素の
一部とした請求項24記載の画像検査装置。
27. The image inspection apparatus according to claim 24, wherein in said reduced feature vector creating means, a value of a luminance histogram is set as a part of a reduced feature vector element.
【請求項28】 前記縮退特徴ベクトル作成手段におい
て、1つあるいは複数の同時生起行列に対して、行列の
主対角線方向に要素の和(投影)をとり、その各々の要
素の和の値と同時生起行列の主対角要素の各値と輝度ヒ
ストグラムの値を組み合わせて縮退特徴ベクトルとした
請求項20記載の画像検査装置。
28. The degenerate feature vector generating means calculates a sum (projection) of elements in the main diagonal direction of one or a plurality of co-occurrence matrices, and simultaneously calculates the sum of the sum of the respective elements. 21. The image inspection apparatus according to claim 20, wherein each value of the main diagonal element of the occurrence matrix and the value of the luminance histogram are combined to form a reduced feature vector.
【請求項29】 前記縮退特徴ベクトルの作成手段にお
いて、1つあるいは複数の同時生起確率行列に対して、
行列の主対角線方向に要素の和(投影)をとり、その各
々の要素の和の値と同時生起確率行列の主対角要素の各
値と輝度ヒストグラムの値を組み合わせて縮退特徴ベク
トルとした請求項22記載の画像検査装置。
29. The degenerate feature vector creating means, for one or a plurality of simultaneous occurrence probability matrices,
The sum (projection) of the elements in the main diagonal direction of the matrix is taken, and the sum value of each element is combined with each value of the main diagonal element of the co-occurrence probability matrix and the value of the luminance histogram to form a degenerate feature vector. Item 23. The image inspection apparatus according to Item 22,
【請求項30】 前記縮退特徴ベクトル作成手段におい
て、2次特徴量として複数の同時生起行列または複数の
同時生起確率行列を用いた場合に、各々の行列の2次モ
ーメントを計算し、この大きさによってそれぞれの行列
から得られる特徴量の順番の並べ替えを行って縮退特徴
ベクトルを構成することとした請求項20または請求項
22記載の画像検査装置。
30. When the plurality of co-occurrence matrices or the plurality of co-occurrence probability matrices are used as the secondary feature amount in the degenerate feature vector creating means, the second moment of each matrix is calculated. 23. The image inspection apparatus according to claim 20, wherein a reduced feature vector is configured by rearranging the order of feature amounts obtained from the respective matrices.
【請求項31】 前記出力ベクトル作成手段において、
ニューラルネットワークを用いたことを特徴とする請求
項18記載の画像検査装置。
31. The output vector creating means,
19. The image inspection apparatus according to claim 18, wherein a neural network is used.
【請求項32】 前記学習手段において、ニューラルネ
ットワークを用いたことを特徴とする請求項18記載の
画像検査装置。
32. An image inspection apparatus according to claim 18, wherein said learning means uses a neural network.
【請求項33】 前記学習手段において、LVQ学習則
またはLVQ2学習則を用いたことを特徴とする請求項
32記載の画像検査装置。
33. The image inspection apparatus according to claim 32, wherein the learning means uses an LVQ learning rule or an LVQ2 learning rule.
【請求項34】 前記判定手段において、良品/不良品
判定を行うだけでなく、前記出力ベクトルの最小データ
と2番目に小さいデータとの比較により良品/不良品/
判定保留の出力を行うことを特徴とする請求項18記載
の画像検査装置。
34. The determination means performs not only a good / defective determination, but also a good / defective / defective product by comparing the minimum data of the output vector with the second smallest data.
19. The image inspection apparatus according to claim 18, wherein output of determination suspension is performed.
JP27145997A 1997-10-03 1997-10-03 Image inspection method and image inspection device Expired - Fee Related JP3587029B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27145997A JP3587029B2 (en) 1997-10-03 1997-10-03 Image inspection method and image inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27145997A JP3587029B2 (en) 1997-10-03 1997-10-03 Image inspection method and image inspection device

Publications (2)

Publication Number Publication Date
JPH11110560A true JPH11110560A (en) 1999-04-23
JP3587029B2 JP3587029B2 (en) 2004-11-10

Family

ID=17500336

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27145997A Expired - Fee Related JP3587029B2 (en) 1997-10-03 1997-10-03 Image inspection method and image inspection device

Country Status (1)

Country Link
JP (1) JP3587029B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006004163A (en) * 2004-06-17 2006-01-05 Toshiba Corp Texture identification device and texture identification method
WO2010029932A1 (en) * 2008-09-09 2010-03-18 株式会社メガトレード Visual examination apparatus
JP2019020138A (en) * 2017-07-11 2019-02-07 株式会社Rist Inspection device, inspection method, and inspection program
WO2019176614A1 (en) * 2018-03-16 2019-09-19 日本電産株式会社 Image processing device, image processing method, and computer program
KR102062271B1 (en) * 2018-06-28 2020-01-03 만도헬라일렉트로닉스(주) Apparatus for estimating tire status and control method thereof
JP2020109579A (en) * 2019-01-07 2020-07-16 株式会社デンソーテン Adhering matter detection device and adhering matter detection method
CN111915548A (en) * 2019-05-08 2020-11-10 杭州海康威视数字技术股份有限公司 Image texture evaluation method and device
KR20220005052A (en) * 2019-05-02 2022-01-12 오카도 이노베이션 리미티드 Apparatus and method for imaging containers
WO2022070227A1 (en) * 2020-09-29 2022-04-07 日本電気株式会社 Facility diagnosis system, facility diagnosis method, and recording medium having facility diagnosis program stored thereon

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006004163A (en) * 2004-06-17 2006-01-05 Toshiba Corp Texture identification device and texture identification method
WO2010029932A1 (en) * 2008-09-09 2010-03-18 株式会社メガトレード Visual examination apparatus
JP2019020138A (en) * 2017-07-11 2019-02-07 株式会社Rist Inspection device, inspection method, and inspection program
WO2019176614A1 (en) * 2018-03-16 2019-09-19 日本電産株式会社 Image processing device, image processing method, and computer program
KR102062271B1 (en) * 2018-06-28 2020-01-03 만도헬라일렉트로닉스(주) Apparatus for estimating tire status and control method thereof
JP2020109579A (en) * 2019-01-07 2020-07-16 株式会社デンソーテン Adhering matter detection device and adhering matter detection method
KR20220005052A (en) * 2019-05-02 2022-01-12 오카도 이노베이션 리미티드 Apparatus and method for imaging containers
JP2022531420A (en) * 2019-05-02 2022-07-06 オカド・イノベーション・リミテッド Equipment and methods for imaging containers
CN111915548A (en) * 2019-05-08 2020-11-10 杭州海康威视数字技术股份有限公司 Image texture evaluation method and device
CN111915548B (en) * 2019-05-08 2023-09-01 杭州海康威视数字技术股份有限公司 Image texture evaluation method and device
WO2022070227A1 (en) * 2020-09-29 2022-04-07 日本電気株式会社 Facility diagnosis system, facility diagnosis method, and recording medium having facility diagnosis program stored thereon

Also Published As

Publication number Publication date
JP3587029B2 (en) 2004-11-10

Similar Documents

Publication Publication Date Title
JP7004145B2 (en) Defect inspection equipment, defect inspection methods, and their programs
TWI750553B (en) Method of defect detection on a specimen and system thereof
JP6869490B2 (en) Defect inspection equipment, defect inspection methods, and their programs
CN111402226A (en) Surface defect detection method based on cascade convolution neural network
CN114494259B (en) Cloth defect detection method based on artificial intelligence
JP2003109006A (en) Method for automatic detection of red-eye defect in photographic image data
KR100598381B1 (en) in-line typed apparatus for auto wafer-defect classification and control method thereof
JP2003109008A (en) Method for automatic detection of red-eye defect in photographic image data
CN113538424B (en) Wood board joint classification data identification method based on artificial intelligence
JP3587029B2 (en) Image inspection method and image inspection device
JP2001188906A (en) Method and device for automatic image calssification
KR101929669B1 (en) The method and apparatus for analyzing an image using an entropy
CN116542984A (en) Hardware defect detection method, device, computer equipment and storage medium
Riyadi et al. Shape characteristics analysis for papaya size classification
CN113554645A (en) Industrial anomaly detection method and device based on WGAN
CN115908344A (en) Micro LED chip defect detection method based on MLCT-YOLO
JP2981434B2 (en) Pattern defect detection method and apparatus
CN113763384B (en) Defect detection method and defect detection device in industrial quality inspection
JP7123306B2 (en) Image processing device and image processing method
CN115861259A (en) Lead frame surface defect detection method and device based on template matching
JPH08327559A (en) Device and method for inspecting pattern
CN115082449A (en) Electronic component defect detection method
CN115546141A (en) Small sample Mini LED defect detection method and system based on multi-dimensional measurement
Niskanen et al. Experiments with SOM based inspection of wood
JP7475901B2 (en) Method and system for detecting defects on a test piece

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040625

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040715

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040802

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

Free format text: PAYMENT UNTIL: 20070820

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20080820

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080820

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090820

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090820

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100820

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees