JPH0420225B2 - - Google Patents

Info

Publication number
JPH0420225B2
JPH0420225B2 JP8239483A JP8239483A JPH0420225B2 JP H0420225 B2 JPH0420225 B2 JP H0420225B2 JP 8239483 A JP8239483 A JP 8239483A JP 8239483 A JP8239483 A JP 8239483A JP H0420225 B2 JPH0420225 B2 JP H0420225B2
Authority
JP
Japan
Prior art keywords
pattern
brightness
patterns
average value
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP8239483A
Other languages
Japanese (ja)
Other versions
JPS59206992A (en
Inventor
Juji Watanabe
Toshiaki Kondo
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.)
Komatsu Ltd
Original Assignee
Komatsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Komatsu Ltd filed Critical Komatsu Ltd
Priority to JP8239483A priority Critical patent/JPS59206992A/en
Priority to DE8484103973T priority patent/DE3481144D1/en
Priority to US06/598,379 priority patent/US4747148A/en
Priority to EP84103973A priority patent/EP0124789B1/en
Publication of JPS59206992A publication Critical patent/JPS59206992A/en
Publication of JPH0420225B2 publication Critical patent/JPH0420225B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 本発明は、一画面分の画像データから検出対象
物体の明暗パターンを認識するようにしたパター
ン認識方法に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a pattern recognition method for recognizing a brightness pattern of a detection target object from one screen of image data.

従来、検出対象物体をITVカメラで撮影し、
その入力画面をスキヤンし、該スキヤン方向に連
続する所定数の画像データからなる明暗パターン
と、予め準備した前記検出対象物体の明暗度を示
す標準パターンとの比較に基づいて検出対象物体
にかかわる明暗パターンを認識する方法がある。
Conventionally, the object to be detected is photographed using an ITV camera.
The input screen is scanned, and the brightness and darkness of the object to be detected is determined based on a comparison between a brightness pattern consisting of a predetermined number of continuous image data in the scan direction and a standard pattern prepared in advance that indicates the brightness of the object to be detected. There are ways to recognize patterns.

しかし、このパターン認識方法は、入力を多階
調で行なつているにもかかわらず、実際の画像処
理の際には2値化で行なつているので、電気部品
の組立工程のように光学的環境が良く、良質な2
値化画像を得ることが比較的容易な場合には実用
可能であるが、検出用の特別な光源を持たず、太
陽光の影響を受けるような環境においては、検出
対象物体の明暗パターンが変動するため適正なパ
ターン認識ができず、また背景やノイズ等の影響
を受けて誤つた認識を行なうという問題点があつ
た。
However, although this pattern recognition method performs input in multiple gradations, the actual image processing is performed by binary conversion, so it is difficult to use optical Good environment and high quality 2
It is practical when it is relatively easy to obtain a valued image, but in environments where there is no special light source for detection and is affected by sunlight, the brightness pattern of the object to be detected may fluctuate. Therefore, there were problems in that proper pattern recognition was not possible and incorrect recognition was performed due to the influence of the background, noise, etc.

本発明は上記実情に鑑みてなされたもので、光
学的悪環境下であつても、あるいは照射光源が変
動する場合でも検出対象物体にかかわる明暗パタ
ーンを認識することができるパターン認識方法を
提供することを目的とする。
The present invention has been made in view of the above circumstances, and provides a pattern recognition method that can recognize the brightness and darkness pattern of a detection target object even under a bad optical environment or when the irradiation light source changes. The purpose is to

この発明の第1発明によれば、検出対象物体の
形状にかかわる所定数の明暗度を示す画像データ
からなる標準パターンBを予め準備し、前記検出
対象物体が存在する所定の視野の画像データ中か
ら所定数の画像データからなる明暗パターンAを
抽出し、前記標準パターンBと明暗パターンAと
の相関関係を求めることにより明暗パターンAが
前記検出対象物体の形状にかかわる明暗パターン
か否かを認識するものであつて、前記相関関係を
求めるに際し、前記明暗パターンAおよび標準パ
ターンBからそれぞれ各パターンの平均値を減算
してなる平均値回りに変換したパターンA′およ
びB′を求め、またパターンA′およびB′から正規
化したパターンA″およびB″を求め、前記パター
ンA″とB″との内積、および前記パターンA′と
B″との内積を評価値として求め、上記2つの評
価値に基づいて前記明暗パターンが検出対象物体
の明暗パターンであるか否かを認識している。
According to the first aspect of the present invention, a standard pattern B consisting of image data showing a predetermined number of intensities related to the shape of the detection target object is prepared in advance, and image data of a predetermined field of view in which the detection target object exists is set in advance. By extracting a brightness pattern A consisting of a predetermined number of image data from and determining the correlation between the standard pattern B and the brightness pattern A, it is recognized whether the brightness pattern A is a brightness pattern related to the shape of the object to be detected. When determining the correlation, patterns A' and B' are obtained by subtracting the average value of each pattern from the light/dark pattern A and the standard pattern B, respectively, and transformed around the average value, and Find the normalized patterns A″ and B″ from A′ and B′, and calculate the inner product of the patterns A″ and B″ and the pattern A′ and B″.
The inner product with B'' is obtained as an evaluation value, and based on the two evaluation values, it is recognized whether the brightness pattern is that of the object to be detected.

また、この発明の第2発明では、前記パターン
A″とB′との内積および前記パターンA′とB′との
内積を評価値として上記の認識を行つている。
Further, in the second aspect of the present invention, the pattern
The above recognition is performed using the inner product of A'' and B' and the inner product of the patterns A' and B' as evaluation values.

以下、本発明を添付図面を参照して詳細に説明
する。
Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

まず、本発明によるパターン認識を原理的に説
明する。今、検出対象物体として、第1図に示す
ような丸棒1を考える。この丸棒1を撮影した際
の各丸棒1の横断方向における明暗度Cbiからな
る標準パターン(第2図)を予め準備する。な
お、明暗度Cbiは16階調で表示される。
First, pattern recognition according to the present invention will be explained in principle. Now, consider a round bar 1 as shown in FIG. 1 as an object to be detected. A standard pattern (FIG. 2) consisting of the brightness Cb i in the transverse direction of each round bar 1 when photographing this round bar 1 is prepared in advance. Note that the brightness Cb i is displayed in 16 gradations.

一方、第1図に示す矢印A方向に連続する画素
の明暗度Caiを検出すると、例えば第3図に示す
ようになる。ここで、丸棒1の直径が10画素分の
幅に相当しているため(第2図参照)、上記矢印
A方向に連続する画素から10画素を取り出し、こ
の取り出した明暗度Caiからなる明暗パターンが、
前記標準パターンに近似しているか否かで丸棒1
の有無を判断する。
On the other hand, when the brightness Ca i of pixels continuous in the direction of arrow A shown in FIG. 1 is detected, the result is as shown in FIG. 3, for example. Here, since the diameter of the round bar 1 corresponds to the width of 10 pixels (see Figure 2), 10 pixels are extracted from the pixels continuous in the direction of arrow A above, and the brightness Ca i The light and dark pattern
Round bar 1 depending on whether it approximates the standard pattern or not.
Determine whether or not there is.

一般に、n個の数値によつて表現されるパター
ンは、n次元空間における1つの点に相当すると
考えられるから、2つのパターン(上記明暗パタ
ーンと標準パターン)が似ているか否かは、その
空間内での2点の距離によつて表現できる。しか
し、丸棒1に対する照射光源の変動によつて、第
3図に示す明暗度は、全体的に上下に平行移動し
たり、縦軸方向に拡大あるいは縮小したりするこ
とが考えられる。このことを考慮して、照度の変
化に対して鈍感になるように、明暗パターンA
(Ca1、Ca2、…、Cao)からその平均値回りに
変換したパターンA′(Ca′1、Ca′2、…、Ca′o)を
求める。なお、およびCa′iはそれぞれ第(1)式お
よび第(2)式で表わされる。
Generally, a pattern expressed by n numbers is considered to correspond to one point in an n-dimensional space, so whether or not two patterns (the brightness pattern and the standard pattern described above) are similar depends on the space. It can be expressed by the distance between two points within. However, due to fluctuations in the light source that irradiates the round bar 1, the brightness shown in FIG. 3 may move vertically in parallel as a whole, or expand or contract in the vertical axis direction. Taking this into consideration, the bright and dark pattern A is designed to be insensitive to changes in illuminance.
From (Ca 1 , Ca 2 , ..., Ca o ), a pattern A'(Ca' 1 , Ca' 2 , ..., Ca' o ) converted around the average value is obtained. Incidentally, and Ca′ i are expressed by equations (1) and (2), respectively.

oi=1 Cai/n ……(1) Ca′i=Cai− ……(2) 更に、パターンA′を正規化したパターン
A″(Ca″1、Ca″2、…、Ca″o)を次式、 により求める。同様に、標準パターンB(Cb1
Cb2、…、Cbo)からその平均値回りに変換した
パターンB′(Cb′1、Cb′2、…、Cb′o)およびこれ
を正規化したパターンB″(Cb″1、Cb″2、…、
Cb″o)を求める。
= oi=1 Ca i /n ……(1) Ca′ i =Ca i −……(2) Furthermore, a pattern obtained by normalizing pattern A′
A″ (Ca″ 1 , Ca″ 2 , …, Ca″ o ) is expressed as: Find it by Similarly, standard pattern B (Cb 1 ,
Pattern B′ (Cb′ 1 , Cb′ 2 , ..., Cb′ o ) converted from Cb 2 ,…, Cb o ) around its average value and pattern B″ (Cb″ 1 , Cb″ 2 ,...
Find Cb″ o ).

第4図は上記パターンA″およびB″をn次元空
間内に図示したものである。なお、球面は単位球
を表わす。この2つのパターンの類似性は、
A″とB″の距離lで表わされる。今、第4図に示
すようにB″をA″に投影した長さをφとすると、
距離lは、次式、 l=√2(1−) ……(4) で表わされる。一方、φは、次式、 で与えられる。上記第(4)式からも明らかなよう
に、lとφとは一定の関係があるため、φもまた
同様に2つのパターンの類似性に関係する値であ
る。ここで、2つのパターンが完全に一致する
と、φは1.0、全く異なる場合は0、同じ形で正
負が逆転していると−1.0の値をとる。これは、
時系列解析に用いる相互相関係数Rfg(τ)、 と同じ意味を持つ値である。以下、このφをパタ
ーン類似度という。このパターン類似度をもつて
前記標準パターンと明暗パターンとの類似性を判
断する。
FIG. 4 illustrates the patterns A'' and B'' in an n-dimensional space. Note that the spherical surface represents a unit sphere. The similarity between these two patterns is
It is expressed as the distance l between A″ and B″. Now, as shown in Figure 4, if the length of B'' projected onto A'' is φ, then
The distance l is expressed by the following formula, l=√2(1-)...(4). On the other hand, φ is the following formula, is given by As is clear from the above equation (4), since l and φ have a certain relationship, φ is also a value related to the similarity of the two patterns. Here, if the two patterns perfectly match, φ takes a value of 1.0, if they are completely different, it takes a value of 0, and if the two patterns have the same shape but the positive and negative are reversed, it takes a value of -1.0. this is,
Cross-correlation coefficient R fg (τ) used for time series analysis, This value has the same meaning as . Hereinafter, this φ will be referred to as pattern similarity. Based on this pattern similarity, the similarity between the standard pattern and the bright/dark pattern is determined.

前述したパターン類似度φは、明暗パターンの
分布形状の類似度を評価する評価値であり、この
評価値を用いれば画像全体の絶対明度が上昇、下
降した場合でも対象パターンの検出が可能にな
る。以下、その理由について説明する。
The above-mentioned pattern similarity φ is an evaluation value that evaluates the similarity of the distribution shapes of bright and dark patterns. Using this evaluation value, it is possible to detect the target pattern even when the absolute brightness of the entire image increases or decreases. . The reason for this will be explained below.

第5図a〜eは撮影された明暗パターンを例示
し、第6図a〜eはこれらの明暗パターンを平均
値回りに変換したパターンを、また第7図a〜e
は第6図の各パターンを正規化したパターンを、
さらに第8図は標準モデルのパターン(標準パタ
ーン)をそれぞれ例示している。
Figures 5 a to e illustrate photographed brightness patterns, Figures 6 a to e illustrate patterns obtained by converting these brightness patterns around the average value, and Figures 7 a to e
is the normalized pattern of each pattern in Figure 6,
Further, FIG. 8 shows examples of standard model patterns (standard patterns).

第5図a,bに示した明暗パターンのコントラ
ストに比して同図c,dおよびeに示した明暗パ
ターンのそれは低い。しかし、各明暗パターンの
分布形状が類似しているため、第7図に示したよ
うに、それらのパターンを正規化したパターンは
ほぼ等しくなる。
Compared to the contrast of the bright and dark patterns shown in FIGS. 5a and 5b, the contrast of the bright and dark patterns shown in FIGS. 5c, d, and e is low. However, since the distribution shapes of the respective bright and dark patterns are similar, the normalized patterns of these patterns are almost equal, as shown in FIG.

上記パターン類似度φは、標準パターンと上記
正規化パターンとの内積であることから、第5図
c,dおよびeに示すようなコントラストの低い
明暗パターンであつても、明暗パターンa,bの
パターン類似度φと同様に高い値を示す(第9図
の表参照) それゆえ、パターン類似度φという評価値を用
いれば、下記したような外乱によつて明暗パター
ンのコントラストが低下した場合でも、検出対称
物体を認識することができる。
Since the above-mentioned pattern similarity φ is the inner product of the standard pattern and the above-mentioned normalized pattern, even if the light-dark patterns have low contrast as shown in Figure 5 c, d and e, the light-dark patterns a and b It shows a high value similar to the pattern similarity φ (see the table in Figure 9). Therefore, if the evaluation value of the pattern similarity φ is used, even if the contrast of the bright and dark patterns decreases due to the disturbances described below, , the detected object can be recognized.

a 検出対象の周囲空間に粉塵等が存在する。a Dust, etc. is present in the space surrounding the detection target.

b 検出対象の配置部分に強い光が入射する。b Strong light enters the area where the detection target is placed.

c 検出対象の表面に錆、よごれ等が一様に付着
している。
c Rust, dirt, etc. are uniformly adhered to the surface of the detection target.

d 検出対象の背景の変化。d Changes in the background of the detection target.

ところで、撮影された明暗パターンのコントラ
ストが一定以上低い場合には、その明暗パターン
が検出対象物体に基づくものではなくて、たとえ
ば不良品、異物、ノイズ等に基づくものであるこ
とが多い。
By the way, when the contrast of the photographed light-dark pattern is lower than a certain level, the light-dark pattern is often not based on the object to be detected, but is based on, for example, a defective product, a foreign object, noise, or the like.

しかしながら、パターン類似度φという評価値
のみでは、上記コントラストを評価できないの
で、たとえば第5図c〜eに示した明暗パターン
が上記不良品、異物、ノイズ等に基づくものであ
つても、これらの明暗パターンと同図a,bに示
した明暗パターンとを識別することができない。
However, since the contrast cannot be evaluated using only the evaluation value of pattern similarity φ, even if the light and dark patterns shown in Figure 5 c to e are based on the defective products, foreign matter, noise, etc., these It is not possible to distinguish between the bright and dark pattern and the bright and dark patterns shown in a and b of the same figure.

そこで、この実施例では、上記パターン類似度
φという評価値に加えて、上記コントラストを評
価できるパターン強度という評価値を用いるよう
にしている。
Therefore, in this embodiment, in addition to the evaluation value of pattern similarity φ, an evaluation value of pattern strength that can evaluate the contrast is used.

今、パターン強度をφとすると、ψは次式、 で表わされる。パターン強度ψは前記第(6)式およ
び第(9)式からも明らかなように、パターン類似度
φに、 √oi=1 (Ca′i2 を乗算したものであり、明暗パターンそのものの
絶対的な大きさ、つまり該パターンのコントラス
トを表す。
Now, if the pattern strength is φ, ψ is the following formula, It is expressed as As is clear from Equations (6) and (9) above, the pattern strength ψ is the product of the pattern similarity φ by √ oi=1 (Ca′ i ) 2 , and the bright and dark patterns It represents the absolute size of the pattern, that is, the contrast of the pattern.

第5図に示した各明暗パターンのパターン強度
ψの大きさは、第9図の表に示したようになるの
で、たとえば第5図bの明暗パターンのパターン
強度と同図cの明暗パターンのパターン強度の間
の値T1をパターン強度ψの閾値として設定して
おけば、この閾値に基づいて同図a,bに示した
明暗パターンと同図c〜eに示した明暗パターン
とを識別することができる。
The magnitude of the pattern strength ψ of each light-dark pattern shown in FIG. 5 is as shown in the table of FIG. 9, so for example, the pattern strength of the light-dark pattern in FIG. If the value T 1 between the pattern intensities is set as the threshold for the pattern intensity ψ, the light and dark patterns shown in a and b in the same figure and the light and dark patterns shown in c to e in the same figure can be distinguished based on this threshold. can do.

このように、パターン強度ψは明暗パターンの
コントラストを評価することができるので、パタ
ーンの分布形状を評価する前記パターン類似度φ
とこのパターン強度ψの双方を評価値として用い
ることにより、たとえば第5図a,bに示した明
暗パターン検出対象物体の明暗パターンであるこ
とを認識することができる。
In this way, the pattern strength ψ can evaluate the contrast of bright and dark patterns, so the pattern similarity φ can be used to evaluate the pattern distribution shape.
By using both the pattern strength ψ and the pattern strength ψ as evaluation values, it is possible to recognize the brightness pattern of the object to be detected, for example, as shown in FIGS. 5a and 5b.

なお、なお後述するように、パターン類似度φ
にも閾値が設定される。そして、パターン類似度
φおよびパターン強度ψの閾値は、明暗パターン
の大きさ、周囲環境等を考慮して適宜設定され
る。
Furthermore, as described later, the pattern similarity φ
A threshold is also set for The thresholds for the pattern similarity φ and the pattern strength φ are appropriately set in consideration of the size of the bright and dark pattern, the surrounding environment, and the like.

第9図に示すT2は、パターン強度ψについて
の閾値の他の設定例を示す。この閾値T2は、第
5図dの明暗パターンのパターン強度と同図eの
明暗パターンのパターン強度の間の値に設定され
ているので、この閾値T2を用いた場合には、同
図a〜dに示した明暗パターンと、同図eに示し
た明暗パターンとを識別することができる。
T 2 shown in FIG. 9 shows another example of setting the threshold value for the pattern strength ψ. This threshold T 2 is set to a value between the pattern intensity of the light and dark pattern in Figure 5 d and the pattern intensity of the light and dark pattern in Figure 5 e, so when this threshold T 2 is used, It is possible to distinguish between the bright and dark patterns shown in a to d and the bright and dark pattern shown in e of the figure.

本発明は上述したパターン類似度φとパターン
強度ψとの2つの評価値をもつて標準パターンと
明暗パターンとの類似性を判断するようにしてい
る。
In the present invention, the similarity between a standard pattern and a bright/dark pattern is determined using two evaluation values, the above-mentioned pattern similarity φ and pattern strength φ.

第10図は本発明によるパターン認識方法を実
施する装置の一実施例を示すブロツクである。同
図において、ITVカメラ10は丸棒1を撮映し、
その明暗信号をA/D変換器11で16階調の明暗
度を示す画像データに変換したのち、画像データ
を順次シフトレジスタ12に加える。シフトレジ
スタ12は、丸棒1の横断方向の画素数と同等の
段数からなり、各段に蓄えた画像データを明暗パ
ターンAとして減算器13および平均値演算回路
14に加える。なお、後述する処理は、シフトレ
ジスタ12に新たな画像データが加わり、明暗パ
ターンAが一画素分シフトされた明暗パターンに
なるまでの間に実行される。
FIG. 10 is a block diagram showing an embodiment of an apparatus for carrying out the pattern recognition method according to the present invention. In the figure, the ITV camera 10 photographs the round bar 1,
After the brightness signal is converted into image data showing 16 levels of brightness by an A/D converter 11, the image data is sequentially added to a shift register 12. The shift register 12 has the same number of stages as the number of pixels in the transverse direction of the round bar 1, and applies the image data stored in each stage to the subtracter 13 and the average value calculation circuit 14 as a brightness pattern A. Note that the processing described below is executed until new image data is added to the shift register 12 and the brightness/darkness pattern A becomes a brightness/darkness pattern shifted by one pixel.

平均値演算回路14は前述した第(1)式により明
暗パターンAの平均値を求め、これを減算器
13に加える。減算器13は前記第(2)式に示す減
算を行ない、明暗パターンAをその平均値回
りに変換し、その変換したパターンA′を正規化
回路15および演算回路17に出力する。
The average value calculation circuit 14 calculates the average value of the bright and dark pattern A using the above-mentioned equation (1), and adds this to the subtracter 13. The subtracter 13 performs the subtraction shown in equation (2) above, transforms the brightness pattern A around its average value, and outputs the transformed pattern A' to the normalization circuit 15 and the arithmetic circuit 17.

正規化回路15は前記第(3)式に示すように平均
値回りに変換したパターンA′を、 √oi=1 (Ca′i2 で除算することにより正規化し、この正規化した
パターンA″を演算回路16に出力する。
The normalization circuit 15 normalizes the pattern A′ transformed around the average value as shown in the above equation (3) by dividing it by √ oi=1 (Ca′ i ) 2 , and this normalized Pattern A'' is output to the arithmetic circuit 16.

一方、標準パターン設定器18には、第2図に
示すような丸棒1の横断方向の明暗度Cbiからな
る標準パターンBが設定されており、この標準パ
ターンBは減算器19および平均値演算回路20
に加えられる。
On the other hand, the standard pattern setter 18 is set with a standard pattern B consisting of the brightness Cb i in the transverse direction of the round bar 1 as shown in FIG. Arithmetic circuit 20
added to.

減算器19は前記減算器13と同様に、標準パ
ターンBを平均値演算回路20によつて算出され
た平均値回りに変換し、その変換したパター
ンB′を正規化回路21に加える。正規化回路2
1も前記正規化回路15と同様に、平均値回りに
変換したパターンB′を正規化し、この正規化し
たパターンB″を演算回路16および17に加え
る。
Similar to the subtracter 13, the subtracter 19 converts the standard pattern B around the average value calculated by the average value calculation circuit 20, and applies the converted pattern B' to the normalization circuit 21. Normalization circuit 2
Similarly to the normalization circuit 15, the normalization circuit 1 normalizes the pattern B' transformed around the average value, and applies this normalized pattern B'' to the calculation circuits 16 and 17.

演算回路16は正規化された2つのパターン
A″とB″との内積をとり、この内積値をパターン
類似度φとして判定回路22に出力する。判定回
路22は予めパターン類似度を判定するための閾
値が適宜設定されており、入力するパターン類似
度φがその閾値を越えるとパターンが類似すこと
を示す信号(ハイレベル信号)を出力する。な
お、パターン類似度φは、前述したようにパター
ンが全く同一の場合には1.0となるため、前記閾
値は1.0よりも若干小さい値とする。
The arithmetic circuit 16 has two normalized patterns.
The inner product of A″ and B″ is taken, and this inner product value is output to the determination circuit 22 as pattern similarity φ. The determination circuit 22 has a threshold value appropriately set in advance for determining pattern similarity, and when the input pattern similarity φ exceeds the threshold, it outputs a signal (high level signal) indicating that the patterns are similar. Note that the pattern similarity φ is 1.0 when the patterns are exactly the same as described above, so the threshold value is set to a value slightly smaller than 1.0.

また、演算回路17は正規化されたパターン
B″と平均値回りに変換されたパターンA′との内
積をとり、この内積値をパターン強度ψとして判
定回路23に出力する。判定回路23は予めパタ
ーン類似度を判定するための領域が適宜設定され
ており、入力するパターン強度ψがその領域内の
とき、適正なパターン強度であることを示す信号
(ハイレベル信号)を出力する。なお、前記領域
は、明暗パターンと標準パターンとのパターン強
度が全く同一の場合、すなわち、前記第(8)式にお
いて、 ψ=(A′・B″)=(B′・B″) =√oi=1 (Cb′i2 ……(10) となるパターン強度ψを基準にして適宜その上限
値および下限値定決定することにより設定され
る。また、前記領域のかわりに、前記下限値を閾
値としてもよい。なぜならば、ノイズ等によつて
明暗パターンが凸状になつてパターン類似度φが
その閾値を越える場合、そのときのパターン強度
ψは前記下限値よりも小さくなる場合がほとんど
だからである。
Further, the arithmetic circuit 17 calculates the normalized pattern.
The inner product of B'' and the pattern A' converted around the average value is taken, and this inner product value is output as the pattern strength ψ to the judgment circuit 23.The judgment circuit 23 has an area for judging pattern similarity in advance, is set, and when the input pattern strength ψ is within that region, a signal (high level signal) indicating that the pattern strength is appropriate is output.The region is defined by the patterns of the bright and dark pattern and the standard pattern. When the intensities are exactly the same, that is, in equation (8) above, ψ=(A′・B″)=(B′・B″) =√ oi=1 (Cb′ i ) 2 ……( 10) It is set by appropriately determining the upper limit value and lower limit value based on the pattern strength ψ that becomes .Furthermore, the lower limit value may be used as the threshold value instead of the above region.This is because noise etc. Therefore, when the bright and dark pattern becomes convex and the pattern similarity φ exceeds the threshold value, the pattern strength φ at that time is almost always smaller than the lower limit value.

アンド回路24は判定回路22および23の出
力信号がともにハイレベル信号のときのみハイレ
ベル信号を出力する。アンド回路24からハイレ
ベル信号が出力されると、標準パターンと明暗パ
ターンとが類似し、丸棒1が存在すると判断さ
れ、そのときの明暗パターンから丸棒の位置デー
タが抽出される。このようにして抽出された丸棒
1の位置データは、例えばハンドリングロボツト
に加えられ、ハンドリングロボツトはこの位置デ
ータに基づいて丸棒1を的確に把持することがで
きる。
AND circuit 24 outputs a high level signal only when the output signals of determination circuits 22 and 23 are both high level signals. When a high level signal is output from the AND circuit 24, it is determined that the standard pattern and the bright/dark pattern are similar and that the round bar 1 exists, and the position data of the round bar is extracted from the bright/dark pattern at that time. The position data of the round bar 1 extracted in this way is added to, for example, a handling robot, and the handling robot can accurately grip the round bar 1 based on this position data.

なお、本実施例では、パターン類似度φを第(6)
式より求めたが、第(6)式の分母における値 √oi=1 (Cb′i2 ……(11) は標準パターンにかかわる値で一定のため、これ
を1とした場合、すなわち(A″・B′)によつて
求めた値もパターン類似度に対応するもので、こ
れをパターン類似度としてもよい。この場合、2
つのパターンが完全に一致するとパターン類似度
は第(11)式に示す値となるため、これを考慮し
て閾値を設定する必要がある。同様に、パターン
強度ψを第(9)式より求めたが、第(9)式の分母は標
準パターンにかかわる値で一定のため、第(9)式の
分子のみ、すなわち(A′・B′)によつて求めた
値もパターン強度に対応するので、これをパター
ン強度としてもよい。また、平均値演算回路20
で求めた標準パターンBの平均値を基準にし
て適当な領域を設け、平均値演算回路14で求め
た明暗パターンAの平均値がその領域にある
か否かの判断を、前記2つの評価値(パターン類
似度φ、パターン強度ψ)による判断に付加する
ようにしてもよい。
Note that in this example, the pattern similarity φ is set to the (6th)th
It was obtained from the formula, but the value in the denominator of formula (6) √ oi=1 (Cb′ i ) 2 ...(11) is a constant value related to the standard pattern, so if this is set as 1, In other words, the value obtained by (A″・B′) also corresponds to the pattern similarity, and this may be used as the pattern similarity.In this case, 2
If the two patterns perfectly match, the pattern similarity will be the value shown in equation (11), so it is necessary to take this into consideration when setting the threshold. Similarly, the pattern strength ψ was obtained from equation (9), but since the denominator of equation (9) is a constant value related to the standard pattern, only the numerator of equation (9), that is, (A′・B ') also corresponds to the pattern strength, so this may be used as the pattern strength. In addition, the average value calculation circuit 20
An appropriate area is established based on the average value of the standard pattern B obtained in the above two evaluation values. It may be added to the judgment based on (pattern similarity φ, pattern strength ψ).

以上説明したように本発明によれば、パターン
類似度とパターン強度の2つの評価値によつてパ
ターンの類否を判定しているため、光学的環境が
悪く、かつ検出対象物体への照射光源が変動する
場合でも、検出対象物体の形状にかかわる明暗パ
ターンを的確に認識することができる。
As explained above, according to the present invention, the similarity of patterns is determined based on the two evaluation values of pattern similarity and pattern intensity. Even if the detection object changes, the brightness pattern related to the shape of the object to be detected can be accurately recognized.

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

第1図は丸棒の平面図、第2図は丸棒の横断方
向の明暗度からなる標準パターンの一例を示すグ
ラフ、第3図は第1図の丸棒を矢印A方向にスキ
ヤンしたときの明暗度の一例を示すグラフ、第4
図はn次空間における2つのパターンの相対関係
を示す図、第5図a〜eはそれぞれ明暗パターン
を例示したグラフ、第6図a〜eはそれぞれ第5
図a〜eの各明暗パターンを平均値回りに変換し
たパターンを示すグラフ、第7図a〜eはそれぞ
れ第6図a〜eの各パターンを正規化したパター
ンを示すグラフ、第8図は標準モデルについての
パターンを示すグラフ、第9図は各明暗パターン
に対するパターン類似度φおよびパターン強度ψ
の大きさを示した表、第10図は本発明によるパ
ターン認識方法を実施するための装置の一実施例
を示すブロツク図である。 1……丸棒、10……ITVカメラ、11……
A/D変換器、12……シフトレジスタ、13,
19……減算器、14,20……平均値演算回
路、15,21……正規化回路、16,17……
演算回路、18……標準パターン設定器、22,
23……判定回路。
Figure 1 is a plan view of the round bar, Figure 2 is a graph showing an example of a standard pattern consisting of brightness in the transverse direction of the round bar, and Figure 3 is when the round bar in Figure 1 is scanned in the direction of arrow A. Graph showing an example of the brightness of
The figure shows the relative relationship between two patterns in n-dimensional space, Figures 5 a to e are graphs illustrating light and dark patterns, respectively, and Figures 6 a to e are graphs illustrating the 5
Graphs showing the patterns obtained by converting the light and dark patterns in Figures a to e around the average value, Figures 7 a to e are graphs showing the normalized patterns of the patterns in Figures 6 a to e, respectively, and Figure 8 A graph showing patterns for the standard model, Figure 9 shows pattern similarity φ and pattern strength ψ for each bright and dark pattern.
FIG. 10 is a block diagram showing an embodiment of an apparatus for carrying out the pattern recognition method according to the present invention. 1...Round bar, 10...ITV camera, 11...
A/D converter, 12...shift register, 13,
19...Subtractor, 14,20...Average value calculation circuit, 15,21...Normalization circuit, 16,17...
Arithmetic circuit, 18...Standard pattern setter, 22,
23...Judgment circuit.

Claims (1)

【特許請求の範囲】 1 検出対象物体が存在する所定の視野の画像デ
ータ中からn個の画像データからなる明暗パター
ンA(Ca1、Ca2、…、Cao)を抽出し、 前記明暗パターンAから平均値aを次式、 aoi=1 Cai/n により求め、 前記明暗パターンAを前記平均値a回りに変
換したパターンA′(Ca1′、Ca2、′…、Cao)を次
式、 Cai′=Caia により求め、 更に、前記パターンA′を正規化したパターン
A″(Ca1″、Ca2″、…、Cao″)を次式、 により求め、 一方、前記検出対象物体の形状にかかわるn個
の明暗度を示す画像データからなる標準パターン
B(Cb1、Cb2、…、Cbo)を予め準備し、 この標準パターンBからその平均値回りに変換
したパターンB′を求め、 更に、前記パターンB′を正規化したパターン
B″を求め、 前記パターンA″とB″との内積、および前記パ
ターンA′とB″との内積を求め、 上記2つの内積値に基づいて前記明暗パターン
Aが前記検出対象物体の形状にかかわる明暗パタ
ーンか否かを認識することを特徴とするパターン
認識方法。 2 検出対象物体が存在する所定の視野の画像デ
ータ中からn個の画像データからなる明暗パター
ンA(Ca1、Ca2、…、Cao)を抽出し、 前記明暗パターンAから平均値aを次式、 aoi=1 Cai/n により求め、 前記明暗パターンAを前記平均値Ca回りに変
換したパターンA′(Ca1′、Ca2、′…、Cao)を次
式、 Cai′=Caia により求め、 更に、前記パターンA′を正規化したパターン
A″(Ca1″、Ca2″、…、Cao″)を次式、 により求め、 一方、前記検出対象物体の形状にかかわるn個
の明暗度を示す画像データからなる標準パターン
B(Cb1、Cb2、…、Cbo)を予め準備し、 この標準パターンBからその平均値回りに変換
したパターンB′を求め、 前記パターンA″とB′との内積、および前記パ
ターンA′とB′との内積を求め、 上記2つの内積値に基づいて前記明暗パターン
Aが前記検出対象物体の形状にかかわる明暗パタ
ーンか否かを認識することを特徴とするパターン
認識方法。
[Claims] 1. Extracting a brightness pattern A (C a1 , C a2 , ..., C ao ) consisting of n pieces of image data from image data of a predetermined field of view in which an object to be detected is present; The average value a is obtained from A using the following formula, a = oi=1 C ai /n, and the brightness pattern A is converted around the average value a to form a pattern A' (C a1 ', C a2 , '..., C ao ) is calculated using the following formula, C ai ′=C aia , and further, a pattern that normalizes the pattern A′ is
A″(C a1 ″, C a2 ″,…, C ao ″) is expressed as On the other hand, a standard pattern B (C b1 , C b2 , ..., C bo ) consisting of image data showing n brightness levels related to the shape of the object to be detected is prepared in advance, and from this standard pattern B, the Find the pattern B′ transformed around the average value, and further normalize the pattern B′.
B'' is calculated, the inner product of the patterns A'' and B'' and the inner product of the patterns A' and B'' is calculated, and based on the two inner product values, the brightness pattern A is determined to be the shape of the object to be detected. A pattern recognition method characterized by recognizing whether or not there are related light and dark patterns. 2 Extract a brightness pattern A (C a1 , C a2 , ..., C ao ) consisting of n pieces of image data from the image data of a predetermined field of view in which the object to be detected exists, and calculate the average value a from the brightness pattern A. The pattern A (C a1 ′, C a2 , ′..., C ao ) obtained by converting the brightness pattern A around the average value C a is obtained by the following formula, a = o 〓 i =1 C ai /n. A pattern obtained by the formula, C ai ′=C aia , and further normalized from the above pattern A′
A″(C a1 ″, C a2 ″,…, C ao ″) is expressed as On the other hand, a standard pattern B (C b1 , C b2 , ..., C bo ) consisting of image data showing n brightness levels related to the shape of the object to be detected is prepared in advance, and from this standard pattern B, the Find a pattern B' converted around the average value, find the inner product of the pattern A'' and B', and the inner product of the patterns A' and B', and calculate the brightness pattern A based on the two inner product values. A pattern recognition method characterized by recognizing whether or not the brightness pattern is related to the shape of the object to be detected.
JP8239483A 1983-04-11 1983-05-11 Pattern recognizing method Granted JPS59206992A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP8239483A JPS59206992A (en) 1983-05-11 1983-05-11 Pattern recognizing method
DE8484103973T DE3481144D1 (en) 1983-04-11 1984-04-09 METHOD FOR IDENTIFYING OBJECTS.
US06/598,379 US4747148A (en) 1983-04-11 1984-04-09 Method of identifying objects
EP84103973A EP0124789B1 (en) 1983-04-11 1984-04-09 Method of identifying objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8239483A JPS59206992A (en) 1983-05-11 1983-05-11 Pattern recognizing method

Publications (2)

Publication Number Publication Date
JPS59206992A JPS59206992A (en) 1984-11-22
JPH0420225B2 true JPH0420225B2 (en) 1992-04-02

Family

ID=13773367

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8239483A Granted JPS59206992A (en) 1983-04-11 1983-05-11 Pattern recognizing method

Country Status (1)

Country Link
JP (1) JPS59206992A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63276676A (en) * 1986-09-26 1988-11-14 Olympus Optical Co Ltd Detecting system for interpicture corresponding area
JP2573434B2 (en) * 1991-05-31 1997-01-22 松下電工株式会社 Specific color extraction method
JPH0589245A (en) * 1991-09-25 1993-04-09 Nippon Telegr & Teleph Corp <Ntt> Object detection processing method

Also Published As

Publication number Publication date
JPS59206992A (en) 1984-11-22

Similar Documents

Publication Publication Date Title
CN101770582B (en) Image matching system and method
EP0124789B1 (en) Method of identifying objects
KR100532635B1 (en) Image processing method for appearance inspection
JPH01196501A (en) Object recognizing apparatus for robot
JPH0420225B2 (en)
CN109448012A (en) A kind of method for detecting image edge and device
KR102272745B1 (en) Inspection System and Method for Compact Camera Module Cover
JPH02242382A (en) Defect checking method
US5881167A (en) Method for position recognition
JPH0217832B2 (en)
JP4865204B2 (en) Image processing method, image processing apparatus, and semiconductor inspection apparatus
JP6332704B2 (en) Object detection device
JP2912070B2 (en) Object position recognition method
JP2638121B2 (en) Surface defect inspection equipment
JPH067171B2 (en) Moving object detection method
JPH05210737A (en) Method for recognizing pattern
JPH0645845Y2 (en) Automatic surface smoothness inspection device
JP2738252B2 (en) Edge detection device of strip material by image
JPH08285755A (en) Push-in hardness meter
JPH0797410B2 (en) Image processing method
JPH0760459B2 (en) Corner detector
CN108171242A (en) A kind of efficient baffle ring detecting system
JPH05113315A (en) Detecting method for center position of circular image data
JPH07159141A (en) Inspection of surface of workpiece
JPS62148838A (en) Defect recognizing method