JPH0420502B2 - - Google Patents

Info

Publication number
JPH0420502B2
JPH0420502B2 JP60046341A JP4634185A JPH0420502B2 JP H0420502 B2 JPH0420502 B2 JP H0420502B2 JP 60046341 A JP60046341 A JP 60046341A JP 4634185 A JP4634185 A JP 4634185A JP H0420502 B2 JPH0420502 B2 JP H0420502B2
Authority
JP
Japan
Prior art keywords
image
area
partial
mask
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP60046341A
Other languages
Japanese (ja)
Other versions
JPS61206388A (en
Inventor
Mutsuo Sano
Shinichi Meguro
Akira Ishii
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP60046341A priority Critical patent/JPS61206388A/en
Publication of JPS61206388A publication Critical patent/JPS61206388A/en
Publication of JPH0420502B2 publication Critical patent/JPH0420502B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 発明の目的 (産業上の利用分野) 本発明は、工業製品の自動組立てや製品検査作
業において、部品の位置決め、欠陥検出等の画像
認識を行うための画像パターンマツチング方法に
関するものである。
[Detailed Description of the Invention] Purpose of the Invention (Field of Industrial Application) The present invention relates to image pattern matching for performing image recognition for positioning parts, detecting defects, etc. in automatic assembly of industrial products and product inspection work. It is about the method.

(従来の技術) 従来の代表的な画像パターンマツチング方法は
次のようであつた。
(Prior Art) A typical conventional image pattern matching method was as follows.

第1図は入力画像例を示す図であり、第2図は
連結成分のラベル付け処理によりラベル付けされ
た結果を示す図である。
FIG. 1 is a diagram showing an example of an input image, and FIG. 2 is a diagram showing the result of labeling by connected component labeling processing.

まず、第1図のような入力画像に対し、連結成
分のラベル付け処理を適用し、第2図のようなラ
ベル付けされた領域を抽出する。
First, connected component labeling processing is applied to an input image as shown in FIG. 1, and labeled regions as shown in FIG. 2 are extracted.

さらに、このラベル領域に対し、面積や周囲長
等の複数の幾何学的特徴の算出を行い、予め標準
とする物体の画像から抽出された同じ特徴との差
を求める。そして各特徴の差の和が最小となるラ
ベル領域を認識物体の存在領域(物体領域)と判
断する手法であつた。(例えば、久良、“市販のロ
ボツト用視覚装置の現状”、日本ロボツト学会誌
1巻4号PP.309−311,1983) (発明が解決しようとする問題点) 然し乍ら、テレビカメラ等の光学的撮像手段に
よつて得られる入力画像では、照明などの撮影条
件によつてノイズの混入や画像の変形を受けるこ
とが多く、ラベル付けされた物体領域は第2図の
ように変形を受けるので、標準パターンと比較を
とる面積や周囲長等の画像特徴値に影響が生じ、
正しい判別は困難となつてしまうことが多い。
Furthermore, a plurality of geometric features such as area and perimeter are calculated for this label region, and differences from the same features extracted in advance from an image of a standard object are determined. This method determines the label region where the sum of the differences between the features is the minimum as the region where the recognized object exists (object region). (For example, Kura, “Current status of commercially available visual devices for robots”, Journal of the Robotics Society of Japan, Vol. 1, No. 4, pp. 309-311, 1983) (Problems to be solved by the invention) However, optical The input image obtained by the imaging means is often subject to noise contamination or image deformation depending on the shooting conditions such as illumination, and the labeled object area is deformed as shown in Figure 2. The image feature values such as area and perimeter that are compared with the standard pattern are affected.
Correct discrimination is often difficult.

また、第3図は2つの対象物体例を示す図。 Moreover, FIG. 3 is a diagram showing two examples of target objects.

第4図は物体同志に重なりがある場合の入力画
像例を示す図である。
FIG. 4 is a diagram showing an example of an input image when objects overlap.

第3図に示すような両物体A,Bが、第4図の
ように重なりがある入力画像の場合、2つの物体
の存在領域が同じラベルとなり、他の異なる物体
の存在領域と誤認識され除外されてしまう。更
に、連結成分のラベル付け処理には計算の時間的
コストがかかる等の問題があつた。
In the case of an input image in which both objects A and B shown in Fig. 3 overlap as shown in Fig. 4, the existing regions of the two objects will have the same label and will be mistakenly recognized as the existing regions of different objects. You will be excluded. Furthermore, the labeling process for connected components has problems such as high computational time costs.

発明の構成 (問題点を解決するための手段) 本発明は、これらの欠点を解決するために、物
体判別の前処理として連結成分のラベル付け処理
により物体領域の抽出を行うのではなく、認識す
べき物体を表す予め定めたマスク画像から複数の
画像特徴の上限値と下限値を求め、この上・下限
値より定められる特徴の定義範囲の間にある画像
特徴を生じる画像の数を、判別すべき物体画像領
域について計数し、その計数値からマスク画像と
物体領域との一致度を算出し、この一致を用いて
マツチングを行うものである。
Structure of the Invention (Means for Solving the Problems) In order to solve these drawbacks, the present invention does not extract object regions by labeling connected components as preprocessing for object discrimination, but performs recognition. Obtain the upper and lower limits of multiple image features from a predetermined mask image representing the target object, and determine the number of images that produce image features that fall within the feature definition range determined by the upper and lower limits. The object image area to be detected is counted, the degree of matching between the mask image and the object area is calculated from the counted value, and matching is performed using this matching.

(作用) このようにすれば、入力画像にノイズや変形が
含まれる場合や、物体の間に重なりがある場合で
も、安定に、かつ簡単なアルゴリズムにより物体
の判別や位置決めを行うことを可能とするもので
ある。
(Function) In this way, even if the input image contains noise or deformation, or if objects overlap, it is possible to stably identify and position objects using a simple algorithm. It is something to do.

(実施例) 第5図は本発明を実施するための装置の構成を
示す一実施例のブロツク図であり、1はテレビカ
メラ、2はAD変換部、3は入力画像記憶部、4
は特徴抽出部、5は画像特徴記憶部、6は標準特
徴パターン記憶部、7はマツチング処理部、8は
出力端子である。更にマツチング処理部7は7−
1の特徴判定部、7−2の判定値記憶部、7−3
の判定値評価部より構成される。
(Embodiment) FIG. 5 is a block diagram of an embodiment showing the configuration of an apparatus for carrying out the present invention, in which 1 is a television camera, 2 is an AD conversion section, 3 is an input image storage section, and 4 is a block diagram of an embodiment of the present invention.
5 is a feature extraction section, 5 is an image feature storage section, 6 is a standard feature pattern storage section, 7 is a matching processing section, and 8 is an output terminal. Furthermore, the matching processing section 7-
1 feature determination unit, 7-2 determination value storage unit, 7-3
It consists of a judgment value evaluation section.

テレビカメラ1は物体像(実際の物体でなく写
真や図面を撮像手段としても良い)を撮影し、そ
の明るさや色に応じた値を持つ電気信号をラスタ
走査信号として出力する。AD変換部2はラスタ
走査信号をデイジタル信号に変換し、入力画像記
憶部3に画像データを書込む。
The television camera 1 takes an image of an object (a photograph or a drawing may be used instead of the actual object) and outputs an electric signal having a value corresponding to the brightness and color of the object as a raster scanning signal. The AD conversion section 2 converts the raster scanning signal into a digital signal and writes the image data into the input image storage section 3.

なお、ここではテレビカメラにより画像を生成
しているが、VTR装置、フアクシミリ等の他の
画像生成手段による画像データについても本発明
は適用可能である。
Although the image is generated by a television camera here, the present invention is also applicable to image data generated by other image generation means such as a VTR device and a facsimile.

以下、第1図に示すような画像が入力画像記憶
部3に記憶されている場合について説明する。
A case where an image as shown in FIG. 1 is stored in the input image storage section 3 will be described below.

標準特徴パターン記憶部6では、物体の判別の
基準となる標準特徴パターンが次のように設定さ
れる。
In the standard feature pattern storage section 6, standard feature patterns that serve as standards for object discrimination are set as follows.

第6図はマスク画像例を示す図である。 FIG. 6 is a diagram showing an example of a mask image.

すなわち、第6図に示すように物体を囲む矩形
領域M(領域サイズLx×Ly)で指定されるマス
ク画像から複数の画像特徴f1(x,y),…,fo
(x,y)が算出される。
That is, as shown in FIG. 6, a plurality of image features f 1 (x, y), ..., fo are extracted from a mask image specified by a rectangular area M (area size Lx×Ly) surrounding the object.
(x, y) is calculated.

例えば、次に示すような公知の画像特徴、すな
わち、明るさのレベル値をある値で正規化した明
るさ特徴、赤(R)、緑(G)、青(B)の3原色
信号成分のレベル値、色成分比、エツジ抽出処理
により得られる正規化されたエツジ強度特徴等、
の種々の画像特徴が算出される。
For example, the following known image features, namely, the brightness feature in which the brightness level value is normalized by a certain value, and the three primary color signal components of red (R), green (G), and blue (B) are used. Level values, color component ratios, normalized edge intensity features obtained by edge extraction processing, etc.
Various image features of the image are calculated.

ここで、明るさ特徴及びエツジ強度特徴に対し
矩形領域M内での上限値・下限値を設定する。
Here, upper and lower limit values within the rectangular area M are set for the brightness feature and the edge strength feature.

第7図はエツジ画像から得られたエツジ強度特
徴に対し上限値・下限値を設定した例を示す図で
ある。
FIG. 7 is a diagram showing an example in which upper and lower limit values are set for edge intensity features obtained from edge images.

一般的には矩形領域M内での各画素特徴に対す
る上限値の系列(u1,…,uo)と下限値の系列
(l1,…,lo)及び領域M内での各画素特徴の上限
値と下限値の範囲内にある画素数の代表値の系列
(s1,…,so)及び領域サイズLx,Lyが標準特徴
パターン記憶部に格納される。
Generally, a series of upper limit values (u 1 ,..., u o ) and a series of lower limit values (l 1 ,..., lo ) for each pixel feature within a rectangular area M, and each pixel feature within the area M. A series of representative values of the number of pixels (s 1 , . . . , s o ) and area sizes Lx, Ly within the range of the upper and lower limits of are stored in the standard feature pattern storage unit.

ここで、代表値の系列(s1,…,so)の各値
は、領域サイズに不変な値に設定するため、各要
素を領域サイズの面積Lx×Lyで割つた値と置換
えても良い。
Here, each value of the series of representative values (s 1 ,..., s o ) is set to a value that does not change with the area size, so even if each element is replaced with the value divided by the area Lx × Ly of the area size, good.

この標準特徴パターンを用いて、以下、物体の
判別や位置決めを行う。
Using this standard feature pattern, object discrimination and positioning are performed below.

特徴抽出部4は、マスク画像について求めた画
像特徴と同じ画像特徴f1(x,y),…,fo(x,
y)を入力画像から算出し、画像特徴記憶部5に
出力する。
The feature extraction unit 4 extracts the same image features f 1 (x, y),..., fo (x,
y) is calculated from the input image and output to the image feature storage section 5.

次にマツチング処理部7について説明する。 Next, the matching processing section 7 will be explained.

第8図は入力画像のマスク画像の標準特徴パタ
ーンの矩形領域Rによる走査を示す図である。
FIG. 8 is a diagram showing scanning of a standard feature pattern of a mask image of an input image using a rectangular area R.

特徴判定部7−1では、まず、標準特徴パター
ン記憶部6に格納されているマスク画像特徴の上
限値の系列(u1,…,uo)、下限値の系列(l1
…,lo)及び画素数の代表値の系列(s1,…,so
及び領域サイズLx,Lyを読出し、第8図に示す
ように、入力画像中にマスク画像と同じサイズの
矩形領域Rを設定し、画像特徴f1(x,y),…,
fo(x,y)が l1≦f1(x,y)≦u1,…, lo≦fo(x,y)≦uo ……(1) を満足する領域R内の画素数の計数を行う。
The feature determination unit 7-1 first uses a series of upper limit values (u 1 ,..., u o ) and a series of lower limit values (l 1 , u o ) of mask image features stored in the standard feature pattern storage unit 6 .
…, l o ) and a series of representative values of the number of pixels (s 1 , …, s o )
and area sizes Lx, Ly, and set a rectangular area R with the same size as the mask image in the input image as shown in FIG. 8, and image features f 1 (x, y),...,
Pixels in region R where f o (x, y) satisfies l 1 ≦ f 1 (x, y) ≦ u 1 , ..., l o ≦ f o (x, y) ≦ u o ... (1) Count numbers.

各画像特徴に対して計数された値の系列を
(N1,…,No)とする。
Let the series of values counted for each image feature be (N 1 , ..., No ).

ここで、各画像特徴fk(x,y)(k=1,…,
n)に関して矩形領域Rとマスク画像との一致度
を算出する。この一致度は例えば次のような一致
度関数h(Nk)(k=1,…,n)を用いて表す
ことができる。
Here, each image feature fk (x, y) (k=1,...,
Regarding n), the degree of coincidence between the rectangular region R and the mask image is calculated. This degree of coincidence can be expressed using, for example, the following degree of coincidence function h(Nk) (k=1, . . . , n).

h(Nk)=1−α|Nk−Sk| ……(2) または=1−α(Nk−Sk)2 ここで、h(Nk)は0と1の間の値をとり、Nk
がSkに等しいときが最大の一致度1をとるもの
とする。
h(Nk) = 1-α | Nk-Sk | ...(2) or = 1-α(Nk-Sk) 2Here , h(Nk) takes a value between 0 and 1, and Nk
It is assumed that the maximum matching degree is 1 when is equal to Sk.

一方、NkがSkから離れるに従つてh(Nk)は
減少する。但し、αの値は適当に設定されるとす
る。
On the other hand, h(Nk) decreases as Nk moves away from Sk. However, it is assumed that the value of α is set appropriately.

また、系列(s1,…,so)をマスク画像領域サ
イズに不変な値として標準特徴パターン記憶部6
から読出した場合には、Nk(k=1,…,n)を
矩形領域面積Lx×Lyで割つた値とすることによ
りh(Nk)の算出が可能である。
In addition, the standard feature pattern storage unit 6 stores the series (s 1 ,..., s o ) as a value that does not change to the mask image area size.
When reading from , h(Nk) can be calculated by dividing Nk (k=1, . . . , n) by the rectangular area area Lx×Ly.

次に、この各画像特徴に対する一致度を用い
て、全ての画像特徴f1(x,y),…,fo(x,y)
を適用したときの矩形領域Rとマスク画像との一
致度を算出する。
Next, using the matching degree for each image feature, all image features f 1 (x, y),..., f o (x, y)
The degree of coincidence between the rectangular region R and the mask image when applying is calculated.

この一致度を、例えば、各画素特徴fk(x,y)
に対する一致度関数h(Nk)及び、各画素特徴に
対する重み付け計数wkを用いて荷重線形和〓〓
wkh(Nk)と設定することが可能である。
This degree of matching can be expressed as, for example, each pixel feature fk (x, y)
Weighted linear sum 〓〓 using matching function h(Nk) for
It is possible to set w k h (Nk).

ここで、矩形領域Rの位置を1画素あるいは数
画素間隔で左上から右下へ順次ずらして、入力画
像を物体領域が存在する可能性のある範囲に渡つ
て走査し、1回ずらせる毎に上記マツチング処理
を繰り返す。
Here, the position of the rectangular region R is sequentially shifted from the upper left to the lower right at intervals of one pixel or several pixels, and the input image is scanned over the range where the object region may exist. Repeat the above matching process.

そして、1回の移動毎に算出された一致度及び
矩形領域Rの位置の代表点座標(Px,Py)を判
定値記憶部7−2に格納する。しかし、ここで全
ての一致度を格納することは莫大なメモリを必要
とするので、通常は一致度の閾値を設定し、閾値
以下なら格納は行わないものとする。
Then, the degree of coincidence calculated for each movement and the representative point coordinates (Px, Py) of the position of the rectangular region R are stored in the determination value storage section 7-2. However, storing all the degrees of coincidence here requires a huge amount of memory, so a threshold value of the degree of coincidence is usually set, and if it is less than the threshold, no storage is performed.

次に、判定値評価部7−3において、判定値記
憶部に格納された計数値の最大値を与える矩形領
域Rの位置の代表点(Px0,Py0)を検出し、出
力端子8に検出された領域の代表点(Px0,Py0
及び領域サイズLx,Lyを出力する。
Next, the judgment value evaluation unit 7-3 detects the representative point (Px 0 , Py 0 ) at the position of the rectangular area R that gives the maximum value of the count value stored in the judgment value storage unit, and outputs it to the output terminal 8. Representative point of detected area (Px 0 , Py 0 )
and output the area sizes Lx and Ly.

ここで、最大の一致度を与える領域が判別すべ
き物体の存在領域と判断することが可能である。
Here, it is possible to determine that the area that gives the highest degree of matching is the area where the object to be determined exists.

第9図は本発明の処理の流れを示す図であり、
上記マツチング処理の流れ図を示している。
FIG. 9 is a diagram showing the processing flow of the present invention,
A flowchart of the above matching process is shown.

次に、マスク画像を分割して部分マスク画像
(マスク画像の小領域)を定め、この部分マスク
画像を用いて、より詳細なマツチング処理をする
手法について説明する。
Next, a method of dividing the mask image to define partial mask images (small areas of the mask image) and performing more detailed matching processing using the partial mask images will be described.

この場合は部分マスク画像に分割しない場合と
対比し、標準特徴パターン記憶部6及びマツチン
グ処理部7の処理内容が異なる。
In this case, the processing contents of the standard feature pattern storage section 6 and the matching processing section 7 are different from the case where the image is not divided into partial mask images.

第10図は部分マスク画像に分割されたマスク
画像を示す図である。
FIG. 10 is a diagram showing a mask image divided into partial mask images.

ここでは、簡単のため、第10図に示すよう
に、マスク画像領域M(領域サイズLx,Ly)に
対して2×2の分割を行い、領域サイズLx/2
×Ly/2であるM11,M21,M12,M22の4領域
に対応する部分マスク画像を設定した場合につい
て説明する。一般にはm×nの分割が行われる。
Here, for simplicity, as shown in FIG. 10, the mask image region M (region size Lx, Ly) is divided into 2×2, and the region size
A case will be described in which partial mask images corresponding to four areas M 11 , M 21 , M 12 , and M 22 of ×Ly/2 are set. Generally, m×n division is performed.

標準特徴パターン記憶部6には、各部分マスク
画像領域Mij(i,j=1,2)内での画像特徴f1
(x,y),…,fo(x,y)の上限値の系列(u1
…,uo)と下限値の系列(l1,…,lo)及び領域
Mij内での各画像特徴の上限値と下限値の範囲内
にある画素数の代表値の系列(s1,…,so)、及
び領域サイズLx,Ly、部分領域サイズLx/2,
Ly/2が格納される。
The standard feature pattern storage unit 6 stores image features f 1 in each partial mask image region Mij (i, j=1, 2).
(x, y), ..., f o (x, y) upper limit value series (u 1 ,
…, u o ), lower limit series (l 1 , …, lo ) and area
A series of representative values of the number of pixels within the range of the upper and lower limits of each image feature in Mij (s 1 ,..., s o ), region sizes Lx, Ly, partial region sizes Lx/2,
Ly/2 is stored.

一方、画像特徴記憶部5には、特徴抽出部4に
より入力画像から算出された画像特徴f1(x,
y),…,fo(x,y)が格納される。
On the other hand, the image feature storage unit 5 stores the image feature f 1 (x,
y),..., f o (x, y) are stored.

第11図は入力画像の部分矩形領域による走査
を示す図である。
FIG. 11 is a diagram showing scanning of a partial rectangular area of an input image.

ここで、マツチング処理部7における特徴判定
部7−1では、第11図のように、画像特徴f1
(x,y),…,fo(x,y)のサイズLx×Lyの矩
形領域R内の部分マスク画像領域Mij(i=1,
2)のサイズに等しい各部分領域Rij(i=,2)
において、 l1≦f1(x,y)≦u1,…, lo≦fo(x,y)≦uo (3) を満足する画素数の計数を行う。
Here, the feature determining unit 7-1 in the matching processing unit 7 determines the image feature f 1 as shown in FIG.
(x, y),..., f o (x, y) within a rectangular area R of size Lx×Ly (i=1,
2) Each partial region Rij (i=,2) equal to the size of
, the number of pixels satisfying l 1 ≦f 1 (x, y) ≦u 1 , . . . , l ofo (x, y) ≦u o (3) is counted.

ここで、各画像特徴に対して計数された値の系
列を(N1,……,No)とする。
Here, the series of values counted for each image feature is assumed to be (N 1 , . . . , No ).

この計数値の系列を用いて矩形領域Rとマスク
画像領域Mとの一致度を算出する。この一致度
は、例えば次のように設定することができる。
Using this series of count values, the degree of coincidence between the rectangular area R and the mask image area M is calculated. This degree of matching can be set, for example, as follows.

まず、各画像特徴fk(x,y)(i=,…,n)
に関して各部分領域Rijと部分マスク画像領域
Mijとの一致度を算出する。この一致度は、例え
ば(2)式において、Nk,SkをそれぞれNk,Skと
置き換えて算出することにより設定が可能であ
る。
First, each image feature f k (x, y) (i=,...,n)
For each partial region Rij and partial mask image region
Calculate the degree of match with Mij. This degree of coincidence can be set by calculating, for example, replacing Nk and Sk with Nk and Sk in equation (2), respectively.

次に、この一致度を用いて全ての画像特徴f1
(x,y),……,fo(x,y)を適用したときの
各部分領域Rijと部分マスク画像領域Mijとの一
致度を算出する。
Next, using this degree of matching, all image features f 1
The degree of coincidence between each partial region Rij and the partial mask image region Mij when (x, y), ..., fo (x, y) is applied is calculated.

この一致度は、例えば各画像特徴に対する荷重
線形和〓〓wkh(Nk)(但し、wkは重み付け計
数)と設定することができる。
This degree of matching can be set, for example, as the weighted linear sum of each image feature 〓〓w k h (Nk) (where w k is a weighted coefficient).

最終的に矩形領域Rとマスク画像領域Mとの一
致度は、例えば次のように設定する。
Finally, the degree of coincidence between the rectangular area R and the mask image area M is set, for example, as follows.

すなわち、部分領域Rijと部分マスク領域Mij
との一致度H(Nk)及び各部分マスク画像領域
Mijに対する重み付け係数wijを用いて、荷重線形
和〓〓wijH(Nk)と設定することが可能である。
That is, the partial region Rij and the partial mask region Mij
Matching degree H (Nk) and each partial mask image area
Using the weighting coefficient w ij for Mij, it is possible to set the weighted linear sum 〓〓〓w ij H(Nk).

以上、領域Rの位置を1画素あるいは数画素間
隔で左上から右下まで移動させる毎に、領域Rと
マスク画像領域Mとの一致度を算出することによ
り、部分マスク画像に分割しない場合と同様なマ
ツチング処理が可能である。
As described above, by calculating the degree of coincidence between region R and mask image region M each time the position of region R is moved from the upper left to the lower right at intervals of one pixel or several pixels, it is the same as when not dividing into partial mask images. matching processing is possible.

上記実施例では、画素単位に一致度を計数する
手法について説明したが、入力画像サイズが大き
くなると、マツチングをとるための繰返し演算数
が大きく増えることが予想される。
In the above embodiment, a method of counting the degree of matching on a pixel-by-pixel basis has been described, but as the input image size increases, it is expected that the number of repeated operations for performing matching will increase significantly.

これは、以下のように画像を小領域に分割し
て、明るさの平均値、或る閾値以上のエツジ強度
を有する小領域中の画素数(エツジ密度)等、そ
の小領域を代表する画像特徴を算出し、画像特徴
の定義域を満たす小領域を計数することにより、
繰返し演算量を軽減することができる。
This is done by dividing an image into small areas as shown below, and calculating the average value of brightness, the number of pixels in the small area (edge density) that has an edge intensity above a certain threshold, etc. By calculating the features and counting the small areas that satisfy the domain of the image features,
The amount of repetitive calculations can be reduced.

第12図は小領域に分割されたマスク画像例を
示す図である。
FIG. 12 is a diagram showing an example of a mask image divided into small regions.

例えば、第12図に示すように、マスク画像
(マスク画像領域サイズLx×Ly)を4×4の分
割により16個の小領域を定めた場合について説明
する。
For example, as shown in FIG. 12, a case where a mask image (mask image area size Lx×Ly) is divided into 4×4 to define 16 small areas will be described.

この小領域から算出される画像特徴の一例とし
ては、明るさの平均値、或る閾値以上のエツジ強
度を有する小領域中の画素数(エツジ強度)等が
挙げられる。
Examples of image features calculated from this small region include the average value of brightness, the number of pixels in the small region (edge strength) having an edge strength equal to or higher than a certain threshold value, and the like.

予め、マスク画像領域Mの小領域毎に算出され
た各画像特徴に対する上限値・下限値の系列及
び、領域M内での各画像特徴の上限値と下限値の
範囲内にある小領域の代表値の系列、及びマスク
画像領域サイズLx,Lyを算出しておく。
A series of upper and lower limit values for each image feature calculated in advance for each small region of the mask image region M, and a representative of small regions within the range of the upper and lower limits of each image feature within the region M. The value series and mask image area sizes Lx and Ly are calculated in advance.

第13図は小領域に分割された入力画像上での
矩形領域による走査を示す図である。
FIG. 13 is a diagram showing scanning of a rectangular area on an input image divided into small areas.

第13図に示すように、入力画像をマスク画像
で設定した小領域と同じサイズで分割し、マスク
画像と同一種類の複数の画像特徴を小領域単位に
算出する。
As shown in FIG. 13, the input image is divided into parts having the same size as the small regions set in the mask image, and a plurality of image features of the same type as the mask image are calculated for each small region.

さらに入力画像中のマスク画像と同じサイズの
矩形領域Rを設定し、矩形領域R中で、マスク画
像の対応する特徴値の上限値と下限値の間にある
小領域の数を計数し、この計数値を用いて小領域
に画面分割しない場合と同様に、マスク画像と矩
形領域Rの一致度を算出する。
Furthermore, a rectangular region R of the same size as the mask image in the input image is set, and the number of small regions between the upper and lower limits of the corresponding feature value of the mask image is counted in the rectangular region R. Similar to the case where the screen is not divided into small areas using the count value, the degree of coincidence between the mask image and the rectangular area R is calculated.

さらに矩形領域Rを入力画像中で左上から右下
まで1小領域または数小領域間隔で順次ずらし、
矩形領域R毎に一致度を算出し、判定すべき物体
の存在領域を決定する。
Furthermore, the rectangular area R is sequentially shifted from the upper left to the lower right in the input image at intervals of one small area or several small areas,
The degree of coincidence is calculated for each rectangular region R, and the region where the object to be determined exists is determined.

ここで、マスク画像に対応する特徴値の上限値
と下限値の間にある小領域数を算出するための演
算量は画素数を算出するための演算量と比較し
て、{1/(Lx/4)}×{1/(Ly/4)}とな
り、Lx,Lyが大きければ大きい程、演算量が軽
減される。さらに、矩形領域Rを入力画像中で走
査するための演算量も軽減され、マツチングをと
るための繰返し演算量は全体として大きく軽減さ
れる。
Here, the amount of calculation to calculate the number of small areas between the upper and lower limits of the feature value corresponding to the mask image is compared to the amount of calculation to calculate the number of pixels, and is calculated by {1/(Lx /4)}×{1/(Ly/4)}, and the larger Lx and Ly are, the more the amount of calculation is reduced. Furthermore, the amount of calculation required to scan the rectangular region R in the input image is also reduced, and the amount of repeated calculations required for matching is greatly reduced as a whole.

第14図は表面に複雑な模様を伴う対象物体例
を示す図である。
FIG. 14 is a diagram showing an example of a target object with a complicated pattern on its surface.

これは、物体の明るさが個々により異なり、さ
らに物体表面に存在する模様の複雑さも個々によ
り異なる対象物体について考える。
This considers objects whose brightness differs from one object to another, and furthermore, the complexity of the pattern on the object surface also differs from one object to another.

この対象に従来の連結成分のラベル付け処理を
適用した場合、物体と背景を区別し2値化するた
めの閾値の設定が困難となり、また、模様の複雑
さに応じてラベル付け処理が困難になる等の問題
があつた。
When conventional connected component labeling processing is applied to this object, it becomes difficult to set a threshold to distinguish between the object and the background and binarize it, and the labeling processing becomes difficult depending on the complexity of the pattern. There were some problems.

本発明によれば、例えば明るさ特徴及びエツジ
強度特徴の上限値・下限値の設定を行い、物体領
域内で或る明るさのレベルである画素数及び或る
エツジ強度の範囲にある画素数を求めるだけで判
別や位置決めが行える。
According to the present invention, for example, the upper and lower limits of the brightness feature and the edge intensity feature are set, and the number of pixels at a certain brightness level and the number of pixels within a certain edge intensity range are determined in the object region. Discrimination and positioning can be performed simply by determining the .

このように画像特徴の上限値・下限値の系列と
いう非常に簡単な標準特徴パターンの設定によ
り、物体の判別や位置決めが行え、さらに、別の
画像特徴を付け加えたいときは、既に設定された
画像特徴の上限値・下限値の系列に新しい画像特
徴の上限値・下限値を加えるだけで良いという画
像パターンマツチング法であり、複雑な対象に対
しても容易に判別能力を向上させることができ、
また、ハードウエア化が容易で安価に構成するこ
とが可能である。
In this way, by setting a very simple standard feature pattern consisting of a series of upper and lower limit values for image features, objects can be identified and positioned.Furthermore, when you want to add another image feature, you can use the image that has already been set. This is an image pattern matching method that only requires adding the upper and lower limit values of new image features to the series of upper and lower limit values of the features, and can easily improve the discrimination ability even for complex objects. ,
Further, it is easy to implement the hardware and can be constructed at low cost.

第15図は物体同志に重なりがある場合の入力
画像例を示す図である。
FIG. 15 is a diagram showing an example of an input image when objects overlap.

第15図に示すように物体同志に重なりがあつ
ても、矩形領域Rについて一致度を計数すること
により、多少一致度は低下するが判別可能であ
る。
Even if objects overlap, as shown in FIG. 15, by counting the degree of coincidence for the rectangular region R, it is possible to distinguish, although the degree of coincidence is somewhat reduced.

次にマスク画像を部分マスク画像に分割をした
場合のマツチング手法の効果について説明する。
Next, the effect of the matching method when the mask image is divided into partial mask images will be explained.

第16図は物体領域内で明るさのレベルが異な
る対象物体例を示す図である。
FIG. 16 is a diagram showing an example of a target object having different brightness levels within the object region.

第17図はマスク画像を部分マスク画像に分割
した例を示す図である。
FIG. 17 is a diagram showing an example in which a mask image is divided into partial mask images.

第16図に示すように、同一物体領域内で明る
さのレベルが領域によつて異なる(明るさ特徴
I1,I2,I3)場合を考える。
As shown in Figure 16, the brightness level differs depending on the area within the same object area (brightness characteristics
Consider the cases I 1 , I 2 , I 3 ).

この場合はマスク画像全体領域の明るさの範囲
の設定だけでは無理で、第17図のように2×2
の4つの部分マスク画像(M11,M21,M12
M22)に分割を行うことによつて判別が可能とな
る。
In this case, it is impossible to simply set the brightness range of the entire mask image area;
Four partial mask images (M 11 , M 21 , M 12 ,
Discrimination is possible by dividing into M 22 ).

即ち、部分マスク画像M11,M21,M12,M22
に対して標準特徴パターンとしてそれぞれ明るさ
特徴の上限値の系列(uI1,uI2,uI3,uI3)と、下
限値の系列(lI1,lI2,lI3,lI3)を設定し、本手法
を適用することにより判別可能となる。
That is, partial mask images M 11 , M 21 , M 12 , M 22
A series of upper limit values (u I1 , u I2 , u I3 , u I3 ) and a series of lower limit values (l I1 , l I2 , l I3 , l I3 ) of the brightness feature are set as standard feature patterns for each. However, it becomes possible to distinguish by applying this method.

第18図は穴のある対象物体のマスク画像例を
示す図である。
FIG. 18 is a diagram showing an example of a mask image of a target object with a hole.

第18図のよう第16図の物体の左上隅に穴が
合いている物体が判別する場合、本発明によれ
ば、まず最初の段階で明るさ特徴により明るさI1
レベルの領域M11を検出し、次の段階で検出した
領域M11に対し、エツジ強度特徴を用いて、或る
エツジ強度特徴の範囲内にある画素数を計数する
ことにより穴の有無を検出するという、段階的な
マツチング処理を行うことも可能であり、マツチ
ング処理の効率化が図れる。
According to the present invention, when an object whose hole matches the upper left corner of the object shown in FIG. 16 is identified as shown in FIG .
The presence or absence of a hole is detected by detecting the level area M 11 and using the edge intensity feature for the detected area M 11 in the next step and counting the number of pixels within the range of a certain edge intensity feature. It is also possible to perform a stepwise matching process, which improves the efficiency of the matching process.

次に、本発明による画像パターンマツチング手
法は、撮像条件の変動により受けるノイズや画像
の変形に対しても安定なマツチング処理が期待で
きる。
Next, the image pattern matching method according to the present invention can be expected to perform stable matching processing even against noise and image deformation caused by fluctuations in imaging conditions.

例えば、物体の周囲の長さにより対象を判別す
る場合を考える。
For example, consider a case where an object is determined based on the circumference of the object.

従来、物体の周囲長を求める手法としては、入
力画像に対し、エツジ抽出処理をして得られる物
体のエツジを追跡することにより求める手法や、
連結成分のラベル付け処理をして得られる閉領域
の境界を追跡することにより求める手法がある。
しかしながら、このようにエツジまたは境界を追
跡する手法では入力画像にノイズや変形を受けた
場合、周囲長はノイズや変形の量に応じて変動す
る。
Conventionally, methods for determining the perimeter of an object include methods that perform edge extraction processing on an input image and track the edges of the object,
There is a method of finding the boundaries of closed regions obtained by labeling connected components.
However, in this method of tracking edges or boundaries, if the input image is subjected to noise or deformation, the perimeter changes depending on the amount of noise or deformation.

第19−1図、第19−2図はノイズや変形を
含む入力画像例を示す図であり、第20−1図、
第20−2図はエツジまたは境界の追跡により得
られた物体の境界を示す図である。
19-1 and 19-2 are diagrams showing examples of input images including noise and deformation, and FIG. 20-1,
FIG. 20-2 is a diagram showing the boundaries of an object obtained by tracking edges or boundaries.

第19−1図及び第19−2図に示されるよう
な上中央に若干の凹みの有る物体と無い物体を判
別する場合には、第20−1図及び第20−2図
に示されるように周囲長による差が殆どなくな
り、両物体の区別がつかなくなる可能性がある。
When distinguishing between objects with and without a slight depression in the upper center as shown in Figs. 19-1 and 19-2, as shown in Figs. 20-1 and 20-2, There is almost no difference in circumference between the two objects, and the two objects may become indistinguishable.

本発明による画像パターンマツチング手法で
は、エツジ強度が或る範囲内にある画素数でマツ
チングの度合を評価するので、ノイズや変形が含
まれていてもマツチする画素数全体の割合からす
れば限られている。従つて、エツジや境界を追跡
し周囲長を出す手法と較べてノイズ変形による影
響は少ないと言える。
In the image pattern matching method according to the present invention, the degree of matching is evaluated based on the number of pixels whose edge strength is within a certain range, so even if noise and deformation are included, the proportion of the total number of matched pixels is limited. It is being Therefore, it can be said that the influence of noise deformation is less compared to the method of tracking edges and boundaries and calculating the perimeter.

発明の効果 以上説明したように、本発明は、物体判別の前
処理として連結成分のラベル付け処理により物体
領域の抽出を行うのではなく、認識すべき物体を
表す予め定めたマスク画像から複数の画像特徴の
上限値と下限値を求め、この上・下限値より定め
られる特徴の定義範囲の間にある画像特徴を生じ
る画像の数を、判別すべき物体画像領域について
計数し、その計数値からマスク画像と物体領域と
の一致度を算出し、この一致を用いてマツチング
を行うものであるから、入力画像にノイズや変形
が含まれる場合や、物体の間に重なりがある場合
でも、安定に、かつ簡単なアルゴリズムにより物
体の判別や位置決めを行うことが可能となるとい
う利点がある。
Effects of the Invention As explained above, the present invention does not extract an object region by labeling processing of connected components as preprocessing for object discrimination, but extracts a plurality of object regions from a predetermined mask image representing the object to be recognized. Obtain the upper and lower limit values of the image features, count the number of images that produce image features that are within the feature definition range determined by the upper and lower limit values for the object image area to be discriminated, and calculate the number of images using the counted values. This method calculates the degree of coincidence between the mask image and the object region, and performs matching using this coincidence, so it is stable even when the input image contains noise or deformation, or when there is overlap between objects. , and has the advantage that objects can be identified and positioned using a simple algorithm.

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

第1図は入力画像例を示す図、第2図は連結成
分のラベル付け処理によりラベル付けされた結果
を示す図、第3図は2つの対象物体例を示す図、
第4図は物体同志に重なりがある場合の入力画像
例を示す図、第5図は本発明を実施するための装
置の構成を示す一実施例のブロツク図、第6図は
マスク画像例を示す図、第7図はエツジ画像から
得られたエツジ強度特徴に対し上限値・下限値を
設定した例を示す図、第8図は入力画像のマスク
画像の標準特徴パターンの矩形領域Rによる走査
を示す図、第9図は本発明の処理の流れを示す
図、第10図は部分マスク画像に分割されたマス
ク画像を示す図、第11図は入力画像の部分矩形
領域による走査を示す図、第12図は小領域に分
割されたマスク画像例を示す図、第13図は小領
域に分割された入力画像上での矩形領域による走
査を示す図、第14図は表面に複雑な模様を伴う
対象物体例を示す図、第15図は物体同志に重な
りがある場合の入力画像例を示す図、第16図は
物体領域内で明るさのレベルが異なる対象物体例
を示す図。第17図はマスク画像を部分マスク画
像に分割した例を示す図、第18図は穴のある対
象物体のマスク画像例を示す図、第19−1図、
第19−2図はノイズや変形を含む入力画像例を
示す図、第20−1図、第20−2図はエツジま
たは境界の追跡により得られた物体の境界を示す
図である。 1……テレビカメラ、2……AD変換部、3…
…入力画像記憶部、4……特徴抽出部、5……画
像特徴記憶部、6……標準特徴パターン記憶部、
7……マツチング処理部、7−1……特徴判定
部、7−2……判定値記憶部、7−3……判定値
評価部、8……出力端子。
FIG. 1 is a diagram showing an example of an input image, FIG. 2 is a diagram showing a result of labeling by connected component labeling processing, and FIG. 3 is a diagram showing an example of two target objects.
Fig. 4 is a diagram showing an example of an input image when objects overlap, Fig. 5 is a block diagram of an embodiment showing the configuration of an apparatus for implementing the present invention, and Fig. 6 is an example of a mask image. Figure 7 is a diagram showing an example of setting upper and lower limit values for the edge intensity feature obtained from an edge image, and Figure 8 is a scan of a standard feature pattern of a mask image of an input image using a rectangular area R. 9 is a diagram showing the processing flow of the present invention, FIG. 10 is a diagram showing a mask image divided into partial mask images, and FIG. 11 is a diagram showing scanning of an input image by a partial rectangular area. , FIG. 12 is a diagram showing an example of a mask image divided into small regions, FIG. 13 is a diagram showing scanning of a rectangular region on an input image divided into small regions, and FIG. 14 is a diagram showing an example of a mask image divided into small regions. FIG. 15 is a diagram showing an example of an input image when objects overlap, and FIG. 16 is a diagram showing an example of a target object with different brightness levels within the object area. Fig. 17 is a diagram showing an example of dividing a mask image into partial mask images, Fig. 18 is a diagram showing an example of a mask image of a target object with a hole, Fig. 19-1,
FIG. 19-2 is a diagram showing an example of an input image including noise and deformation, and FIGS. 20-1 and 20-2 are diagrams showing boundaries of objects obtained by tracking edges or boundaries. 1...TV camera, 2...AD conversion unit, 3...
...Input image storage unit, 4...Feature extraction unit, 5...Image feature storage unit, 6...Standard feature pattern storage unit,
7...Matching processing unit, 7-1...Characteristic determination unit, 7-2...Judgement value storage unit, 7-3...Judgement value evaluation unit, 8...Output terminal.

Claims (1)

【特許請求の範囲】 1 判別すべき物体を囲む矩形領域の画像をマス
ク画像とし、そのマスク画像の画素または小領域
を部分マスク画像とし、前記各部分マスク画像に
ついて、複数種の画像特徴値を求めるとともに、
各画像特徴種別毎に、予め画像特徴値の上限値と
下限値を設定し、かつ前記マスク画像に含まれる
前記画像特徴値の範囲に含まれる部分マスク画像
数Sを設定し、 一方、判別すべき入力画像について、前記マス
ク画像と同じサイズの領域を矩形領域とし、前記
部分マスク画像と同じサイズの領域を矩形部分領
域とし、前記部分マスク画像の場合と同様に画像
特徴種別毎に、該矩形部分領域の画像特徴値を算
出し、該画像特徴値が前記上限値と前記下限値の
範囲にあり、かつ該矩形領域内にある部分マスク
画像数Nを求め、該部分マスク画像数Nと前記部
分マスク画像数Sとの差が等しいとき1の値をと
る一致度関数を用いて該矩形領域の一致度の値を
得、前記複数種の画像特徴について該一致度の荷
重線形和を求め、前記矩形領域を前記入力画像内
で順次走査して該荷重線形和が最も大きい走査位
置における矩形領域内の画像を判別すべき物体の
存在領域として決定することを特徴とする画像パ
ターンマツチング方法。
[Scope of Claims] 1. An image of a rectangular area surrounding an object to be discriminated is used as a mask image, pixels or small areas of the mask image are used as a partial mask image, and a plurality of types of image feature values are set for each partial mask image. Along with asking,
For each image feature type, an upper limit value and a lower limit value of the image feature value are set in advance, and the number S of partial mask images included in the range of the image feature value included in the mask image is set; Regarding the input image, the area with the same size as the mask image is a rectangular area, the area with the same size as the partial mask image is a rectangular partial area, and as in the case of the partial mask image, for each image feature type, the rectangle is The image feature value of the partial area is calculated, the image feature value is within the range between the upper limit value and the lower limit value, and the number N of partial mask images within the rectangular area is calculated, and the number N of partial mask images and the number N of partial mask images are calculated. Obtaining a value of the degree of coincidence of the rectangular area using a degree of coincidence function that takes a value of 1 when the difference with the number of partial mask images S is equal, and determining a weighted linear sum of the degree of coincidence for the plurality of types of image features; An image pattern matching method characterized in that the rectangular area is sequentially scanned within the input image, and the image within the rectangular area at the scanning position where the weighted linear sum is the largest is determined as the area where the object to be determined exists.
JP60046341A 1985-03-11 1985-03-11 Picture pattern matching method Granted JPS61206388A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60046341A JPS61206388A (en) 1985-03-11 1985-03-11 Picture pattern matching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60046341A JPS61206388A (en) 1985-03-11 1985-03-11 Picture pattern matching method

Publications (2)

Publication Number Publication Date
JPS61206388A JPS61206388A (en) 1986-09-12
JPH0420502B2 true JPH0420502B2 (en) 1992-04-03

Family

ID=12744434

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60046341A Granted JPS61206388A (en) 1985-03-11 1985-03-11 Picture pattern matching method

Country Status (1)

Country Link
JP (1) JPS61206388A (en)

Also Published As

Publication number Publication date
JPS61206388A (en) 1986-09-12

Similar Documents

Publication Publication Date Title
JP3740065B2 (en) Object extraction device and method based on region feature value matching of region-divided video
Agrawal et al. Censure: Center surround extremas for realtime feature detection and matching
EP2138978B1 (en) System and method for finding stable keypoints in a picture image using localized scale space properties
Ajmal et al. A comparison of RGB and HSV colour spaces for visual attention models
Chen et al. A novel color edge detection algorithm in RGB color space
US20010026633A1 (en) Method for detecting a face in a digital image
JPH09510809A (en) Method and apparatus for determining a fine azimuth of a barcode symbol in a two-dimensional CDD image
US20070121094A1 (en) Detecting objects of interest in digital images
JP2009544090A (en) Image processing for change detection
EP1700269A2 (en) Detection of sky in digital color images
US20060210164A1 (en) Image processing device
CN109903265B (en) Method and system for setting detection threshold value of image change area and electronic device thereof
JP3490482B2 (en) Edge and contour extraction device
US6999604B1 (en) Apparatus and method for detecting a moving object in a sequence of color frame images
JP4242796B2 (en) Image recognition method and image recognition apparatus
US20070126876A1 (en) Locating digital image planar surfaces
US5825916A (en) Illuminant color detection
CN103262524A (en) Auto-focus image system
JPH0420502B2 (en)
Lindahl Study of local binary patterns
JPH06113139A (en) Picture binarization device
CN113569859A (en) Image processing method and device, electronic equipment and storage medium
Hu et al. Application of computational verb image processing to 1-D barcode localization
Vu et al. Main subject detection via adaptive feature selection
JPS61289478A (en) Matching method for pictorial pattern

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term