JPH0136151B2 - - Google Patents

Info

Publication number
JPH0136151B2
JPH0136151B2 JP58143288A JP14328883A JPH0136151B2 JP H0136151 B2 JPH0136151 B2 JP H0136151B2 JP 58143288 A JP58143288 A JP 58143288A JP 14328883 A JP14328883 A JP 14328883A JP H0136151 B2 JPH0136151 B2 JP H0136151B2
Authority
JP
Japan
Prior art keywords
equation
calculation
line
evaluation
features
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
JP58143288A
Other languages
Japanese (ja)
Other versions
JPS6033676A (en
Inventor
Hirozo Yamada
Kazuhiko Yamamoto
Ryuichi Oka
Noboru Funakubo
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP58143288A priority Critical patent/JPS6033676A/en
Publication of JPS6033676A publication Critical patent/JPS6033676A/en
Publication of JPH0136151B2 publication Critical patent/JPH0136151B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Character Discrimination (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、パターン認識、特に文字など2次
元図形の認識におけるパターン間の相違性の度合
を求めるパターンマツチング方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a pattern matching method for determining the degree of dissimilarity between patterns in pattern recognition, particularly in recognition of two-dimensional figures such as characters.

〔背景技術とその問題点〕[Background technology and its problems]

2次元図形、音声等のパターン認識において、
パターンから抽出された2つの特徴ベクトルの集
合、 A={A1、A2、……、AI} ……(1) B={B1、B2、……、BJ} ……(2) の類似性または相違性の度合(以下相違度と呼
ぶ)を評価することは、その中核的な問題であ
る。
In pattern recognition of two-dimensional figures, sounds, etc.
A set of two feature vectors extracted from the pattern, A = {A 1 , A 2 , ..., A I } ...(1) B = {B 1 , B 2 , ..., B J } ...( 2) Evaluating the degree of similarity or dissimilarity (hereinafter referred to as dissimilarity) is the core problem.

例えば、文字認識のためのパターン整合法にお
いては、標準パターン(マスク)の各点Zi=(xi
yi)の濃度値の集合A={p(Zi)}と、未知入力
パターンの濃度値の集合B={q(Zi)}との重ね
合わせの差 D1=(A,B)= 〓zi |p(Zi)−q(Zi)| ……(3) を相違度とすることにより、入力文字と各文字概
念間の近さの評価が行われる。なお、相関値Σp
(Zi)・q(Zi)を類似度に用いたり、この相関値
や第(3)式の値を、AとBの平均濃度で正規化する
場合もあるが、いずれも重ね合わせの量を求める
という意味で基本的な立場は同じである。このパ
ターン整合法は論理が単純であるため、印刷文字
認識の手法として広く用いられてきたが、本質的
に標本点の位置は固定であるとして重ね合せてい
るため、手書き文字のように標本点の位置が変動
する対象に対しては、その適用は困難である。こ
のため、このような対象に対しては、入力とマス
クとの間で特徴の塊の対応づけを行う、いわゆる
構造解析法の立場が必要となる。
For example, in the pattern matching method for character recognition, each point Z i = (x i ,
y i ) density value set A={p(Z i )} and the unknown input pattern density value set B={q(Z i )} D 1 = (A, B) = 〓 zi |p(Z i )−q(Z i )| (3) By using the following as the degree of dissimilarity, the closeness between the input character and each character concept is evaluated. In addition, the correlation value Σp
(Z i )・q(Z i ) may be used for the similarity, or this correlation value or the value of equation (3) may be normalized by the average concentration of A and B, but in both cases, the The basic position is the same in terms of determining quantity. Because this pattern matching method has simple logic, it has been widely used as a method for recognizing printed characters. However, since the position of the sample points is essentially fixed and superimposition is performed, the sample points are It is difficult to apply this method to objects whose positions change. For this reason, for such objects, a so-called structural analysis method is required, which associates clusters of features between the input and the mask.

この構造解析法の一つとして、特徴が時系列で
ある音声認識の分野においては、標本的(時間
軸)を逐次的に非線形に伸縮させて最適な対応づ
けを行うDP(動的計画法:R.Bellman“Dynamic
Programming”、Princeton University Press、
1957)の形式を用いるものが、マツチングの標準
的な手法として定着している。すなわち、音声の
ように特徴が系列化されている場合、第1図のよ
うに非線形に対応させるための第(1)式および第(2)
式のAの標本点iとBの標本点jの組合せを C(k)=(i(k)、j(k)) ……(4) 任意の標本点iとjの特徴間の距離を d(c)=d(i、j)=|Ai−Bj| ……(5) とし、標本点AとBの相違度を とそれぞれ定義する。第(6)式は、AとBの対応の
組合せを種々にとり、その中で和が最小なものを
全体の尺度とするものである。w(k)は、シス
テムを柔軟にするために導入された非負の重み係
数である。
In the field of speech recognition, where features are time-series, one method of structural analysis is DP (dynamic programming), which sequentially expands and contracts the sample (time axis) in a nonlinear manner to find the optimal correspondence. R.Bellman“Dynamic
Programming”, Princeton University Press,
1957) has been established as the standard matching method. In other words, when the features are arranged in series, such as in speech, Equations (1) and (2) are used to respond nonlinearly as shown in Figure 1.
The combination of sample point i of A and sample point j of B in the formula is C(k) = (i(k), j(k))...(4) The distance between the features of arbitrary sample points i and j is d(c)=d(i,j)=|A i −B j | ...(5), and the degree of difference between sample points A and B is are defined respectively. Equation (6) takes various combinations of correspondence between A and B, and uses the one with the smallest sum as the overall measure. w(k) is a non-negative weighting factor introduced to make the system flexible.

ここで、AとBの対応を1対2まで許し、歪C
=(i、j)を、A側のみからの関数(i,j
(i))にするという、いわゆる非対称
(Asymmetric)な立場をとり、i点の標本化間
隔(後述の輪郭線分の例では線分長)をliとする
と、w(k)=w(i)=liと書け、D2を求める問題
は、 g(i、j) =ming (i‐1、j‐1)+li・d1(i、j) g (i‐1、j‐2)+li・d2 (i、j‐1、j) g (i‐2,j‐1)+(li-1+li)・d3 (i‐1、i、j) ……(7) なる漸化式を、下記のj(i)に関する拘束条件
(1)、(2)、(3) (1) j(i)は、連続的な単調増加関数である (2) j(1)=1、j(I)J (3) j(i)の値はi付近にある のもとで、順次計算し、第i段での漸化的評価量
g(i、j)を求めるDPの問題に帰着する。最終
的な相違度D2は D2(A、B)=1/Σl1g(I,J) ……(8) で求められる。すなわち、第(7)式の逐次的な最適
化により、最終的には目的とする第(6)式の大局的
な最適解を第(8)式で求められる相違度D2として
高速に得ることができる。
Here, the correspondence between A and B is allowed to be 1:2, and the distortion C
= (i, j) as a function (i, j
(i)), which is the so-called asymmetric position, and if the sampling interval of point i (line segment length in the example of a contour segment described later) is l i , then w(k) = w( Write i) = l i , and the problem to find D 2 is g(i, j) = ming (i-1, j-1) + l i・d 1 (i, j) g (i-1, j- 2)+l i・d 2 (i, j‐1, j) g (i‐2, j‐1)+(l i‐1 +l i )・d 3 (i‐1, i, j) ……( 7) Set the recurrence formula to the following constraint condition regarding j(i).
(1), (2), (3) (1) j(i) is a continuous monotonically increasing function (2) j(1)=1, j(I)J (3) j(i) This results in a DP problem in which the value of is around i, and the recursive evaluation g(i, j) at the i-th stage is obtained by calculating sequentially. The final degree of dissimilarity D 2 is determined by D 2 (A, B)=1/Σl 1 g (I, J) (8). In other words, by sequentially optimizing equation (7), the desired global optimal solution of equation (6) can be quickly obtained as the degree of dissimilarity D 2 determined by equation (8). be able to.

なお、等間隔(li=1)の標本化で、特徴間の
距離を d1(i、j)=d(i、j) d2(i、j−1、j)=(d(i、j−1)+d
(i、j))/2 d3(i−1、i、j)=(d(i−1、j)+d
(i、j))/2 ……(9) としたものは H・Sakoe and S.Chiba“Dynamic
programming algorthm optimization for
spoken word recognition”IEEE Transactions
on Acoustics Speech and Signal Processing、
Vol.ASSP―26、NO.1、PP.43―49(1978)に示
されている。
Note that when sampling at equal intervals (l i = 1), the distance between features is expressed as d 1 (i, j) = d (i, j) d 2 (i, j-1, j) = (d (i , j-1)+d
(i, j))/2 d 3 (i-1, i, j) = (d(i-1, j) + d
(i, j))/2 ……(9) H. Sakoe and S. Chiba “Dynamic
programming algorithm optimization for
spoken word recognition”IEEE Transactions
on Acoustics Speech and Signal Processing,
Vol.ASSP-26, NO.1, PP.43-49 (1978).

また、文字認識の分野においても、特徴が時系
列であるオンライン形ではDPが利用されやすい。
しかし、オフライン形の文字認識では、特徴が2
次元的に分布するため、DPの適用は容易ではな
い。2次元図形の特徴の場合、2次元的な近さの
関係を保持することが重要であるが、この関係を
保持したまゝ1次元的に系列化するのが困難なた
めである。
Also, in the field of character recognition, DP is easily used in online formats where the features are in chronological order.
However, in offline character recognition, there are two characteristics.
Due to the dimensional distribution, the application of DP is not easy. In the case of features of two-dimensional figures, it is important to maintain a two-dimensional relationship of proximity, but it is difficult to serialize them one-dimensionally while maintaining this relationship.

この問題について具体的に説明する前に、この
発明の2次元図形のDPマツチングで用いる特徴
ベクトルと言葉・記法の定義について述べる。ま
ず、白黒の2値図形の境界の黒点を輪郭点、輪郭
点の一繋がりの閉ループを輪郭と呼ぶ。次に、第
2図aのように、白点を左に見て廻る方向に輪郭
を直線近似した時のその線素を輪郭線部または単
に線分(矢印及び符号1〜12で示す)、各線分
の最初(矢の印のない側)及び最後(印のある
側)の輪郭点を始点及び終点と呼ぶ。なお、ある
線分の終点と次の線分の始点は同一点とする。次
に、一周の輪郭に対する最初及び最後の線分を始
線及び終線と呼ぶ。始線の始点と終線の終点とは
一致する。
Before explaining this problem specifically, we will explain the definition of the feature vectors, words, and notations used in the DP matching of two-dimensional figures according to the present invention. First, black dots on the boundary of a black and white binary figure are called contour points, and a closed loop of continuous contour points is called a contour. Next, as shown in Fig. 2a, when the contour is approximated by a straight line in the direction of turning the white point to the left, the line element is the contour line part or simply a line segment (indicated by arrows and symbols 1 to 12). The first (on the side without the arrow mark) and last (on the side with the mark) outline points of each line segment are called the starting point and the ending point. Note that the end point of one line segment and the start point of the next line segment are the same point. Next, the first and last line segments for the contour of one circumference are called the starting line and the ending line. The starting point of the starting line and the ending point of the ending line match.

このように輪郭を線分近似すると、全ての線分
iは、iの始点を終点とする線分i′を持つが、こ
のi′をiの直前の線分と呼び i′=P(i) ……(10) で表わす。
When the contour is approximated by line segments in this way, every line segment i has a line segment i' whose end point is the start point of i, but this i' is called the line segment immediately before i, and i'=P(i ) ...(10)

また、第3図の線分iの特徴ベクトル定義図に
示されるように、線分iの属性としては、始点お
よび終点座標Zb i、Zo i、始点から終点への方向ai
長さliが掲げられ、それぞれ下記のように定義さ
れる。
Furthermore, as shown in the feature vector definition diagram of line segment i in FIG .
The lengths l i are listed, and each is defined as follows.

最後に、ある線分iに“先行可能”な線分の集
合Q(i)を次のように定義する。
Finally, a set Q(i) of line segments that can "precede" a certain line segment i is defined as follows.

Q(i)={i′|条件1かつ条件2かつ条件3を
満足する} ……(12) 条件(1):|Zb i−Zo i′|≦δ(例えば3) 条件(2):|Zb i−Zo i′|≦β(例えば32) または|ai〜ai′|>π/2 または(Zb i−Zo i′)・(Zo i−Zb i′)≧0 条件(3):|Zb i−Zo i′||Zb i−Zo p(1′)| かつ、|Zb i−Zo i′||Zb i−Zo i″|、i′=P(i″
) すなわち、条件(1)、(2)は第3図において斜線の
内部に終点がくる線分、あるいは、半径βの円内
に終点があり角度差がπ/2以上の線分を意味す
る。ただし、ベクトルに対する絶対値の定義第(11)
式から実際は円ではなく菱形(正方形を45゜回転
させたもの)である。条件(3)は、上記条件(1)、(2)
の線分のうち、前後でiとの距離が極小になるも
のだけを残すことを意味する。
Q(i)={i′|Satisfies condition 1, condition 2, and condition 3} ……(12) Condition (1): |Z b i −Z o i ′|≦δ (for example, 3) Condition (2 ): |Z b i −Z o i ′|≦β (for example, 32) or |a i ~a i ′|>π/2 or (Z b i −Z o i ′)・(Z o i −Z b i ′)≧0 Condition (3): |Z b i −Z o i ′ | | Z b i −Z o p (1′) | and |Z b i −Z o i ′ | | Z b i − Z o i ″|, i′=P(i″
) In other words, conditions (1) and (2) mean a line segment whose end point is inside the diagonal line in Figure 3, or a line segment whose end point is inside a circle with radius β and whose angular difference is π/2 or more. . However, the definition of absolute value for vectors (11)
From the formula, it is actually not a circle but a rhombus (a square rotated 45 degrees). Condition (3) is the same as conditions (1) and (2) above.
This means that among the line segments, only those whose distance from i before and after is minimal are left.

この集合は、線分i′の終点の次に線分iを接続
して対応させることを許容させるためのものであ
り、この発明のパターンマツチング方式において
重要な役割を果たすものである。
This set is for allowing line segment i to connect and correspond to the end point of line segment i', and plays an important role in the pattern matching method of the present invention.

以上の定義のもとで、マスク側の特徴A={Ai
と入力側の特徴B={Bj}のDPによる対応づけを
考えるが、最初に、マスク側の特徴{Ai}に系列
を与える。これには前述の輪郭線分の順序をその
まま利用する。
Under the above definition, mask side feature A = {A i }
Let us consider the correspondence of the input side feature B={B j } by DP. First, a sequence is given to the mask side feature {A i }. For this purpose, the order of the contour line segments described above is used as is.

次に、入力側も追跡の順という意味では系列化
されているが、マスク側との対応づけにこの系列
をそのまま用いることはできない。それは、第2
図bに示されるように、線に切れが生ずると、輪
郭の系列が変化してしまう(線分1〜14で示す)。
この現象は、特に手書漢字のように多数の“画”
から構成される文字の場合、ある画の開始点や終
了点との他の線との間で起き易い。例えば、手書
漢字の“田”の場合、標準的には線によつて区切
られる白地の数(ループ数)は4と考えられる
が、現在標準的な実験用データベースとして用い
られる電子技術総合研究手書教育漢字データベー
スETL8の解析によれば、ループ数は0〜4ま
でほゞ平均的に分布することが報告されている。
Next, although the input side is also organized in a series in terms of the order of tracking, this series cannot be used as is to correlate with the mask side. That is the second
As shown in FIG. b, when a break occurs in the line, the series of contours changes (indicated by line segments 1 to 14).
This phenomenon is especially true for handwritten kanji, which have many “strokes”.
In the case of characters consisting of , this tends to occur between the start or end point of a certain stroke and another line. For example, in the case of the handwritten kanji ``田'', the standard number of blank spaces separated by lines (the number of loops) is considered to be 4, but the number of blank spaces separated by lines (the number of loops) is considered to be 4. According to an analysis of the handwriting education kanji database ETL8, it has been reported that the number of loops is approximately evenly distributed from 0 to 4.

このことは、手書漢字のように複雑で変形の激
しい2次元図形の相違度の評価において、系列化
された特徴ベクトル間での対応づけという仮定が
成り立たないことを示している。
This indicates that the assumption of correspondence between serialized feature vectors does not hold in evaluating the degree of dissimilarity of two-dimensional figures that are complex and highly deformed, such as handwritten kanji.

〔発明の目的〕[Purpose of the invention]

この発明は、上記の問題を解決するためになさ
れたもので、系列化されていない特徴ベクトル集
合間の類似度を、DP手法を用いて高速に計算で
きるようにしたパターンマツチング方式を提供す
るものである。
This invention was made to solve the above problem, and provides a pattern matching method that can quickly calculate the similarity between unsequential feature vector sets using the DP method. It is something.

〔発明の概要〕[Summary of the invention]

この発明は、上記の目的を達成するため、下記
(1)、(2)、(3)の機能を有するパターンマツチング方
式である。
In order to achieve the above object, this invention has the following objectives:
This is a pattern matching method that has functions (1), (2), and (3).

(1) 入力側、マスク側双方共、白と黒の境界部の
直線近似(輪郭線分)を用いることにより、細
線化図形に比べ情報の歪みを少なくすると共
に、原図形に比べ対応候補点を減少させる。輪
郭線分の方向性を距離評価に用いることによ
り、評価関数の精度向上を図る。
(1) By using straight line approximation (contour segment) of the boundary between white and black on both the input side and the mask side, information distortion is reduced compared to thinned figures, and corresponding candidate points are reduced compared to the original figure. decrease. The accuracy of the evaluation function is improved by using the directionality of the contour line segment for distance evaluation.

(2) マスク側特徴は、(輪郭の順序性をそのまま
用いて)系列化されているのに対し、入力側特
徴は基本的には順序性がないものとして対応さ
せることにより、線の切断に対しても強いマツ
チングを行い、同時に、入力側の各輪郭線分に
“先行可能”な線分の集合を定義することによ
り、DPの持つ処理の高速性を生かし、不自然
な対応を防ぐ。
(2) The mask-side features are serialized (using the ordering of the contour as is), whereas the input-side features are basically treated as having no ordering, which makes it easier to cut lines. At the same time, by defining a set of line segments that can precede each contour line segment on the input side, we take advantage of the high-speed processing of DP and prevent unnatural correspondence.

(3) 単に輪郭線分間の距離だけでなく前後の輪郭
線分のつながり方も評価することにより、重ね
合せの量だけでなく、空間を非線形に歪ませた
時の歪み量も評価に入れる。
(3) By evaluating not only the distance between contour lines but also the way in which the front and rear contour lines are connected, not only the amount of overlap but also the amount of distortion when space is distorted nonlinearly is included in the evaluation.

〔発明の原理〕[Principle of the invention]

次に、この発明のパターンマツチング方式の原
理について説明する。
Next, the principle of the pattern matching method of the present invention will be explained.

まず、マスク側特徴の記法は、第(11)式の通りと
し、入力側特徴に対しては、始点座標ωb j、終点
座標ωe j、方向αj、長さλjなる記号を用いる。な
お、前述の説明では、マスク側に対して先行可能
な線分の集合を定義したが、実際のマツチングで
は、入力側のみにこの集合Qを定義する。
First, the notation for the mask side feature is as shown in Equation (11), and for the input side feature, the following symbols are used: start point coordinate ω b j , end point coordinate ω e j , direction α j , and length λ j . In the above description, a set of line segments that can precede the mask side is defined, but in actual matching, this set Q is defined only on the input side.

以上の準備のもとで、上記第(7)式に相当する漸
化式を、 g(i、j)=min{h1(i、j),h2(i、j),
h3(i、j)} ……(13) と表現する。第(13)式のh1,h2,h3は第4図の
マスク線分iと入力線分jとの対応図に示される
a,b,cの対応評価量であり、aは1対1(i
=i′対j=j′)、bは1対2(i=i′対j′=j−1

j),cは2対1(i′=i−1、i対j′=j)を、
また、Mはマスク、Nは入力を示す。
Based on the above preparation, the recurrence formula corresponding to the above equation (7) can be written as g(i, j)=min{h 1 (i, j), h 2 (i, j),
h 3 (i, j)} ...(13) Expressed as. h 1 , h 2 , and h 3 in equation (13) are the correspondence evaluation quantities of a, b, and c shown in the correspondence diagram between mask line segment i and input line segment j in FIG. 4, and a is 1 vs.1(i
= i' vs. j = j'), b is 1 vs. 2 (i = i' vs. j' = j-1

j), c is 2 to 1 (i'=i-1, i to j'=j),
Further, M indicates a mask, and N indicates an input.

こゝで、第(7)式のminの中の第1項と、第
(14)式のh1を求める式を比較してみると、相違
の第1点は、第(14)式でh1を求める場合、j″∈
Q(j′)に対してのmin(最小化)処理が行われて
いる。これに対し、第(7)式ではj″=j−1に対す
る計算項はただ1つである点である。これは、1
次元に系列化されている場合は、i−1の次に
i,j−1の次にjが生起することが保障されて
いるために、iにjが対応する時、i−1に対応
する相手をj−1だけにすればよいためである。
Now, if we compare the first term in min in Equation (7) and the equation for calculating h 1 in Equation (14), the first difference is that in Equation (14), When finding h 1 , j″∈
Min (minimization) processing is being performed on Q(j'). On the other hand, in equation (7), there is only one calculation term for j″=j−1.
In the case of dimensional series, it is guaranteed that i will occur after i-1 and j will occur after j-1, so when j corresponds to i, it will correspond to i-1. This is because it is only necessary to limit the opponent to j-1.

一方、系列化されていない場合、iにjが対応
する時、i−1に対応する相手としての全ての
j″を考慮しなければならないので、j″∈Q(j′)と
いう条件が必要となる。こゝで、Q(j′)は、前
述した先行可能な線分の集合である。Q(j′)と
して全ての線分の集合ではなくこのような部分集
合を用いることにより、計算が高速化されると共
に、不自然な対応が除去される。
On the other hand, if it is not serialized, when j corresponds to i, all the partners corresponding to i-1
Since j″ must be taken into consideration, the condition j″∈Q(j′) is required. Here, Q(j') is the aforementioned set of line segments that can precede. Using such a subset rather than the set of all line segments as Q(j') speeds up the computation and eliminates unnatural correspondences.

相違の第2点は、γの項が存在する点である、
第(7)式では対応づけられた特徴間の距離は評価さ
れているが、C=(i、j)の歪に関する評価は
行われていない。C=(i、j)を歪ませた結果、
完全に合致するにしても、歪の量が多ければ評価
は下がると考えるのが自然である。そこで、各時
点での評価において、マスク側のi′−1からi′へ
の遷移に対応する入力側のj″からj′への遷移の差
の関数γを定義し、この歪み量を特徴間の距離に
加算したものを総合評価値とする。
The second difference is that there is a term γ,
In Equation (7), the distance between the correlated features is evaluated, but the distortion of C=(i, j) is not evaluated. As a result of distorting C=(i,j),
It is natural to think that even if there is a perfect match, the evaluation will be lower if there is a large amount of distortion. Therefore, in the evaluation at each time point, we define a function γ of the difference between the transition from j″ to j′ on the input side, which corresponds to the transition from i′−1 to i′ on the mask side, and define this amount of distortion as a characteristic. The sum added to the distance between the two is the comprehensive evaluation value.

次に、上記特徴(輪郭部分)間の距離を下記の
ように定義する。
Next, the distance between the above features (outline portions) is defined as follows.

上記第(15)式中の、d1における記号〜は角度
差の演算で、結果は−πからπの間にあり、係数
2/πは、角度差がπ/2になつた時、単位長の
差と同じ評価量にするための係数である。また、
長さは、2倍までの差を評価0で許容する。d2
d3の場合、上記の距離を長さで比例配分してい
る。
In the above equation (15), the symbol ~ in d 1 is the calculation of the angular difference, the result is between -π and π, and the coefficient 2/π is the unit when the angular difference becomes π/2. This is a coefficient to make the evaluation amount the same as the difference in length. Also,
For length, a difference of up to 2 times is allowed with an evaluation of 0. d2 ,
In the case of d 3 , the above distance is distributed proportionally by length.

また、γの項については、対応をとる線分(A
側はi′、B側はj′)の始点と、その一つの前の線
分(A側はi′−1、B側はj″)の終点の間の位置
関係から歪み量を評価するものであり、 γ(i′−1、i′;j″、j′)=||ωb j′−ωe j
|−|Zb i
−Ze i-1|| ……(16) で定義される。
Also, regarding the term γ, the corresponding line segment (A
The amount of distortion is evaluated from the positional relationship between the starting point of side i' and j' for side B and the end point of the previous line segment (i'-1 for side A and j'' for side B). and γ(i′−1, i′; j″, j′)=|ω b j ′−ω e j
|−|Z b i
−Z e i-1 ||……(16) is defined as follows.

通常、マスク側線分は連続しているから |Zb i′−Ze i-1|=0 であるが、ある輪郭から次の輪郭に移る時は0で
ない。
Normally, the line segments on the mask side are continuous, so |Z b i ′−Z e i−1 |=0, but it is not 0 when moving from one contour to the next.

初期条件は、 h3(i、j)=∞ g(i′−1、j″)=0 γ(i′−1、i′、j″、j′)=0 i=1 i′=1 i′=1 ……(17) とする。 The initial conditions are h 3 (i, j) = ∞ g (i'-1, j'') = 0 γ (i'-1, i', j'', j') = 0 i = 1 i' = 1 Let i'=1...(17).

上記第(8)式に相当するマスク側Aと入力側Bの
全体としての最適対応による相違度は、 D3(A,B)=1/Σlimin j{g(I,j)} ……(18) で求められる。
The degree of difference based on the overall optimal correspondence between the mask side A and the input side B, which corresponds to the above equation (8), is D 3 (A, B)=1/Σl i min j{g(I, j)}... ...(18) is obtained.

このようにして第(18)式で示される相違度
D3の計算を行うと、系列の順序が変つてしまつ
た入力側に対してもマスク側との対応をとること
ができ、かつ、線の切れの量を考慮に入れた評価
量をDP手法を用いて高速に得ることが出来る。
In this way, the degree of dissimilarity expressed by equation (18)
When calculating D3 , it is possible to correspond to the mask side even for the input side where the order of the series has changed, and the evaluation amount that takes into account the amount of line breaks can be calculated using the DP method. can be obtained quickly using

〔発明の実施例〕[Embodiments of the invention]

第5図はこの発明の一実施例のマツチングの手
順を説明するためのブロツク図である。
FIG. 5 is a block diagram for explaining the matching procedure according to an embodiment of the present invention.

同図において、h1,h2,h3はそれぞれ第(14)
式の計算ブロツクである。計算ブロツクh1に入力
されるデータは、マスク記憶部Aの特徴ai,li,|
Zb i−Ze i-1|、入力バツフア部Bの特徴αj,λj,|
ωb j−ωe j″|、および第i−1段の漸化的評価量g
(i−1、j″),j″∈Q(j)である。g(i−1、
j″)は、一時記憶ブロツクg-1に貯えられている。
また、計算ブロツクh2に入力されるデータは、
ai,li,|Zb i−Ze i-1|,αp(j),λp(j),αj,λj
|ωb p(j)
ωe j″|,j″∈Q(P(j))およびブロツクg-1から
のg(i−1、j″)である。そして、計算ブロツ
クh3に入力されるデータは、マスク側のAの特徴
ai-1,li-1,ai,li,|Zb i-1−Ze i-2|と入力側Bの特
徴αj,λj,|ωb j−ωe j″|およびi―2段の漸化的

価量g(i−2、j″)、j″∈Q(j)であり、g(i
−2、j″)は、一時記憶ブロツクg-2に貯えられ
ている。
In the same figure, h 1 , h 2 , and h 3 are respectively (14th)
This is the calculation block for Eq. The data input to the calculation block h1 are the characteristics a i , l i , | of the mask storage unit A.
Z b i −Z e i-1 |, characteristics α j , λ j , | of input buffer section B
ω b j −ω e j ″|, and the recursive evaluation g of the i-1st stage
(i-1, j″), j″∈Q(j). g(i-1,
j″) is stored in temporary memory block g -1 .
Also, the data input to calculation block h2 is
a i , l i , |Z b i −Z e i-1 |, α p(j) , λ p(j) , α j , λ j ,
|ω b p(j)
ω e j ″|, j″∈Q(P(j)) and g(i−1, j″) from block g −1.Then , the data input to calculation block h3 is Characteristics of A
a i-1 , l i-1 , a i , l i , |Z b i-1 −Z e i-2 | and the characteristics of input side B α j , λ j , |ω b j −ω e j ″ | and i-2-stage recursive evaluation g(i-2, j″), j″∈Q(j), and g(i
-2, j'') is stored in temporary memory block g -2 .

計算ブロツクh1,h2,h3で計算された第(14)
式の値は、第(13)式の最小値計算ブロツク
min1に送られ、第i段における各jとの漸化的
評価量が計算され、一時記憶ブロツクg0に送られ
第i段の計算が完了する。
The (14th) calculated block h 1 , h 2 , h 3
The value of the formula is the minimum value calculation block of formula (13).
min 1 , the recursive evaluation amount with each j in the i-th stage is calculated, and is sent to the temporary storage block g 0 , completing the calculation of the i-th stage.

次に、第i+1段の計算の準備として、まず、
g-1の内容を全てg-2に送り、その後g0の内容を全
てg-1に送る。この段階で記憶ブロツクg-1にはg
(i,j)の値が、記憶ブロツクg-2にはg(i−
1,j)の値が入り、第i+1段の計算のための
準備を完了する。
Next, in preparation for the calculation of the i+1th stage, first,
Send all the contents of g -1 to g -2 , then send all the contents of g 0 to g -1 . At this stage, memory block g -1 has g
The value of (i,j) is stored in memory block g -2 as g(i-
1, j) is entered, completing the preparation for the calculation of the i+1th stage.

以上が、この発明の要部をなすDPによる反復
計算部分に関する動作であるが、処理の全てを説
明するには、第(17)式の初期値設定と、第
(18)式の相違度に関して補足する必要がある。
そこで、第1段から順に説明する。なお、〜
は各処理を示している。そして、〜は繰返し
である。
The above is the operation related to the iterative calculation part by DP which forms the main part of this invention, but in order to explain the entire process, it is necessary to explain the initial value setting of equation (17) and the degree of difference in equation (18). It is necessary to supplement.
Therefore, the explanation will be given in order starting from the first stage. In addition,~
indicates each process. And ~ is a repetition.

まず、処理に先立つて、初期値設定ブロツク
INITにより、g-1の全ての値に零が設定される
。これは第(17)式の第2式に相当する。そし
て最初のマスク線分i=1に対する計算では、ブ
ロツクh1,h2に対し、γの値として零が供給さ
れ、h3からは∞が出力される。すなわちブロツ
クh1からは h1(i、j)=l1・d1(1、j) を出力し、ブロツクh2からは h2(i、j)=l1・d2(1、P(j)、j)が出力
され、その最小値がブロツクmin1で計算され
る。なお、処理の時、ブロツクh3から∞が出
力されるのは、h3の値がmin1の出力として選ば
れないようにするためである。次に、処理で計
算された各jに対する第1段での漸化的評価量g
(1,j)は全てブロツクg0に送られ記憶され、
第1段の計算が完了し、g-1がg-2に送られ、g0
がg-1に送られる。
First, before processing, the initial value setting block is
INIT sets all values of g -1 to zero. This corresponds to the second equation of equation (17). In the calculation for the first mask line segment i=1, zero is supplied as the value of γ to blocks h 1 and h 2 , and ∞ is output from h 3 . That is, block h 1 outputs h 1 (i, j) = l 1 · d 1 (1, j), and block h 2 outputs h 2 (i, j) = l 1 · d 2 (1, P (j), j) are output and their minimum value is calculated in block min 1 . Note that during processing, ∞ is output from block h3 in order to prevent the value of h3 from being selected as the min 1 output. Next, the recursive evaluation amount g in the first stage for each j calculated in the process
All (1, j) are sent to block g 0 and stored,
The first stage calculation is completed, g -1 is sent to g -2 , and g 0
is sent to g -1 .

2番目のマスク線分i=2に対する第2段の計
算においては、ブロツクh1およびブロツクh2では
上記の通常の反復計算時の値が計算される。これ
に対し、ブロツクh3では、まず、第1段に先立つ
てブロツクg-1に設定された値がブロツクg-2に移
されてきているためブロツクg-2の値は全て零で
ある(第(17)式の中段の式)。また第(17)
式の第3式より、γの値も全て零として計算す
る。そして、h1,h2,h3の結果がブロツクmin1
送られ、各jに対する第2段目の漸化的評価量
g(2、j)が計算され、ブロツクg0に貯えられ
、第2段の処理を完了し、g-1からg-2,g0
らg-1へのデータの移動を経て第3段の準備を
完了する。
In the second stage calculation for the second mask line segment i=2, the values obtained during the above-mentioned normal iterative calculation are calculated in blocks h1 and h2 . On the other hand, in block h3 , the values set in block g -1 prior to the first stage have been transferred to block g -2, so all values in block g -2 are zero ( (middle equation of equation (17)). Also No. (17)
From the third equation, the values of γ are also calculated assuming that they are all zero. Then, the results of h 1 , h 2 , and h 3 are sent to block min 1 , and the second stage recursive evaluation amount g (2, j) for each j is calculated and stored in block g 0 . The second stage processing is completed, and the preparation for the third stage is completed after the data is moved from g -1 to g -2 and from g 0 to g -1 .

第3段以降の反復処理は上記した通りである。
最後に、第I段でのg(I、j)j=1〜Jが,
,のjに関する繰返しで計算され、ブロツク
min2に送られ第(18)式のjに関する最小値が
求められ、Σliで除されて最適対応による全体
の相違度D3(A、B)が求められる。
The iterative processing from the third stage onwards is as described above.
Finally, g(I, j)j=1~J in stage I is
, is calculated by iterating over j, and the block
min 2 to find the minimum value for j in equation (18), which is divided by Σl i to find the overall degree of dissimilarity D 3 (A, B) based on the optimal correspondence.

なお、上記はこの発明の一実施例であつて、以
下の(1)〜(5)に述べるような変更、およびそれらの
複合的変更は容易に可能である。
It should be noted that the above is one embodiment of the present invention, and changes such as those described in (1) to (5) below and combination thereof are easily possible.

(1) 第(14)式では、全ての線分で前との接続が
切断可能として、minの範囲をj″∈Q(j′)とし
ているが、切断される可能性のない点では、
j″=P(j′)として計算すれば、第(14)式の最
小化を行う必要がなくなり、計算が高速化され
る。具体的には、第2図aをマスクと考えた
時、切断の可能性のあるi′=2、4、9では、
j″∈Q(j′)を用いるが、その他の線分ではj″=
P(j′)を用いることを意味する。
(1) In equation (14), the range of min is set to j″∈Q(j′) assuming that all line segments can be disconnected from the previous line, but at points where there is no possibility of disconnection,
Calculating with j″=P(j′) eliminates the need to minimize Equation (14) and speeds up the calculation.Specifically, when Figure 2 a is considered as a mask, For i′=2, 4, and 9, where there is a possibility of disconnection,
j″∈Q(j′) is used, but for other line segments j″=
This means using P(j').

(2) 第(14)式、第(15)式において、各線分の
長さliを可変長にしたため、liの重みが計算式の
中で用いられているが、固定長にするか、また
は線分近似しないで、各輪郭点をそのまゝ用い
るかすれば、長さを考慮する必要がなくなる。
(2) In equations (14) and (15), the length l i of each line segment is made variable, so the weight of l i is used in the calculation formula, but should it be fixed length? , or by using each contour point as is without performing line segment approximation, there is no need to consider the length.

すなわち、第(15)式のd1,d2,d3は第
(9)式で書換えられ、dは、 d(i,j)=2/π|αj〜ai| と書け、計算が単純化できる。
That is, d 1 , d 2 , d 3 in equation (15) can be rewritten as equation (9), and d can be written as d (i, j) = 2/π | α j ~ a i | can be simplified.

(3) 第(13)式、第(14)式を変形すると、 g(i、j) =ming′(i、j)+lid1(i、j) g′(i、P(j))+lid2(i、j′、j) g′ (j‐1、j)+(li′+li)d3(i′、i、j) g′(i′、j′)=min j″∈Q(j′){g(i′−1、j″)+γ(i′−
1、i′;j″j′)} となる。すなわち、第i段と第i−1段の間で、
途中結果としてg′(i′,j′)を計算することにより
γの計算とdの計算が分離できる。
(3) Transforming equations (13) and (14), g(i, j) = ming′(i, j)+l i d 1 (i, j) g′(i, P(j) )+l i d 2 (i, j′, j) g′ (j‐1, j)+(l i ′+l i )d 3 (i′, i, j) g′(i′, j′)= min j″∈Q(j′) {g(i′−1, j″)+γ(i′−
1, i′; j″j′)}.In other words, between the i-th stage and the i-1th stage,
By calculating g'(i', j') as an intermediate result, the calculation of γ and the calculation of d can be separated.

(4) 特徴として、輪郭ではなく、例えば中心線を
用いる。また、第(15)式の特徴間の評価d
を、角度差以外の例えば、位置情報、線と線の
関係などの高次特徴などを加えて行う。
(4) Use, for example, a center line instead of an outline as a feature. Also, the evaluation d between the features in equation (15)
This is performed by adding higher-order features other than the angular difference, such as position information and line-to-line relationships.

(5) 上記実施例で説明したDPによる処理は、線
分と線分の対応付けのためだけに用い、パター
ン間の識別は別の評価関数で行う。また、輪郭
全体でなく、その一部分毎にDPによる処理を
適用する。
(5) The DP processing described in the above embodiment is used only for associating line segments, and discrimination between patterns is performed using another evaluation function. In addition, DP processing is applied not to the entire contour but to each part of the contour.

〔発明の効果〕〔Effect of the invention〕

以上詳細に説明したように、この発明によれ
ば、系列化されていない特徴ベクトル間に対し、
線の切れなど位相的変形を許容し、大局的最適評
価を行う相違度を、DPの手法を用いて高速に求
めることができる。さらに、特徴間の距離だけで
なく、空間の歪も評価量に加えるとともに、“先
行可能”な線分の集合を定義することにより、不
自然な対応を排除しつゝ処理の高速化をはかるこ
とができる。また、この発明は、単に文字認識の
輪郭特徴ペクトル間の相違度として用いられるに
止まらず、広くパターン認識に適用できる優れた
ものである。
As explained in detail above, according to the present invention, between feature vectors that are not serialized,
Dissimilarity, which allows topological deformations such as line breaks and performs global optimal evaluation, can be quickly determined using the DP method. Furthermore, by adding not only the distance between features but also spatial distortion to the evaluation quantity and defining a set of line segments that can be "preceded," we aim to speed up processing while eliminating unnatural correspondences. be able to. Further, the present invention is not only used as a degree of dissimilarity between contour feature vectors for character recognition, but is also excellent and can be widely applied to pattern recognition.

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

第1図は音声のように系列化された特徴ベクト
ル間のDPマツチングの原理説明図、第2図a,
bはこの発明で用いられる輪郭線分特徴と線の切
れにより線分の系列が変化することを説明するた
めの図、第3図は輪郭線分の特徴とその輪郭線分
に“先行可能”な輪郭線分の説明図、第4図a,
b,cはこの発明のDPマツチングの各段におけ
る動作を説明するための図、第5図はこの発明の
一施例のマツチングの手順を説明するためのブロ
ツク図である。 図中、Mはマスク、Nは入力、h1,h2,h3は計
算ブロツク、g0,g-1,g-2は漸化的評価量の一時
記憶ブロツク、INITは初期値設定ブロツク、
min1,min2は最小値計算ブロツクである。
Figure 1 is a diagram explaining the principle of DP matching between feature vectors that are sequenced like speech, Figure 2 a,
b is a diagram for explaining the outline line segment features used in this invention and how the series of line segments changes due to line breaks, and Figure 3 is a diagram showing the outline segment features and the "possible precedence" of the outline segment. An explanatory diagram of the contour line segment, Fig. 4a,
b and c are diagrams for explaining the operation at each stage of the DP matching of the present invention, and FIG. 5 is a block diagram for explaining the matching procedure of one embodiment of the present invention. In the figure, M is a mask, N is an input, h 1 , h 2 , h 3 are calculation blocks, g 0 , g -1 , g -2 are temporary storage blocks for recursive evaluation quantities, and INIT is an initial value setting block. ,
min 1 and min 2 are minimum value calculation blocks.

Claims (1)

【特許請求の範囲】[Claims] 1 標準パターンの特徴の集合A={A1、A2、…
…Ai、……、AI}を記憶するマスク記憶部と、
未知入力パターンの特徴の集合B={B1、B2、…
…Bj、……、BJ}を保持する入力バツフア部と
を持ち、前記A側のi′=iの1点、もしくはi′=
i−1およびiの2点と、前記B側のj′=jの1
点、もしくはjの前の点j′およびjの2点の特徴
間の距離の評価量dを演算する手段と;前記i′と
j′が対応するとき、前記i′−1に対応すべきj″とし
てあらかじめ前記Bのうちの一部を各j′に対して
定義する手段と;前記i′−1からi′への遷移と、
同じくj″からj′への遷移との差に関する評価量r
を演算する手段とを備え;第i(i=1、2、…
…、I)段における動的計画法による漸化的評価
量の演算の際に;前記d、このdの計算における
前記i′およびj′と前記定義する手段により前記j′に
対してあらかじめ定められたj″により定まる前記
r、および前記dおよびrの計算における(i′−
i、j″)に関する漸化的評価量g(i′−1、j″)、
を加算し;前記i′、j′、j″の前記手段および定義の
範囲における前記加算値の最小値を前記iにおけ
る最適対応の漸化的評価量g(i、j)とするこ
とを特徴とするパターンマツチング方法。
1 Set of standard pattern features A = {A 1 , A 2 ,...
...A i , ..., A I };
Set of features of unknown input pattern B = {B 1 , B 2 ,...
...B j , ..., B J }, and one point of i'=i on the A side, or i'=
Two points i-1 and i and 1 of j'=j on the B side
a point, or a point j' before j, and means for calculating an evaluation quantity d of the distance between two features of j;
means for previously defining a part of the B for each j' as j'' that corresponds to the i'-1 when j'corresponds; and a transition from the i'-1 to i'; and,
Similarly, the evaluation amount r regarding the difference between the transition from j″ to j′
i-th (i=1, 2,...
..., during the calculation of the recursive evaluation quantity by dynamic programming in stage I); the above d, the above i' and j' in the calculation of this d, and the above j' are predetermined by the means defined above. In the calculation of d and r, (i'-
i, j″);
and the minimum value of the added values within the range of the means and definitions of i', j', j'' is set as the recursive evaluation g(i, j) of the optimal correspondence for i. A pattern matching method.
JP58143288A 1983-08-05 1983-08-05 Pattern matching system Granted JPS6033676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58143288A JPS6033676A (en) 1983-08-05 1983-08-05 Pattern matching system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58143288A JPS6033676A (en) 1983-08-05 1983-08-05 Pattern matching system

Publications (2)

Publication Number Publication Date
JPS6033676A JPS6033676A (en) 1985-02-21
JPH0136151B2 true JPH0136151B2 (en) 1989-07-28

Family

ID=15335238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58143288A Granted JPS6033676A (en) 1983-08-05 1983-08-05 Pattern matching system

Country Status (1)

Country Link
JP (1) JPS6033676A (en)

Also Published As

Publication number Publication date
JPS6033676A (en) 1985-02-21

Similar Documents

Publication Publication Date Title
CN110781924B (en) Side-scan sonar image feature extraction method based on full convolution neural network
JP2795058B2 (en) Time series signal processing device
JP3088171B2 (en) Self-organizing pattern classification system and classification method
CN109118473B (en) Corner detection method, storage medium and image processing system based on neural network
US20020065959A1 (en) Information search method and apparatus using Inverse Hidden Markov Model
CN110070565B (en) Ship track prediction method based on image superposition
CN112801029B (en) Multi-task learning method based on attention mechanism
CN107784288A (en) A kind of iteration positioning formula method for detecting human face based on deep neural network
KR19990010210A (en) Mass Pattern Matching Device and Method
CN110414516B (en) Single Chinese character recognition method based on deep learning
CN116071331A (en) A method for detecting workpiece surface defects based on improved SSD algorithm
Shah et al. Learning to recognize code-switched speech without forgetting monolingual speech recognition
JPH04232579A (en) Method for comparing shape of image based on vicinity data
JP3054682B2 (en) Image processing method
CN118537900A (en) Face recognition method and device, electronic equipment and storage medium
JPH0136151B2 (en)
US20250005356A1 (en) Object operating method and apparatus, computer device, and computer storage medium
JPH0457183A (en) Musical score recognition system
CN114529582B (en) Target tracking method, system, terminal and medium based on probability label
CN114972733B (en) A method for identifying ship skeleton points
CN113592970B (en) Method and device for generating hair styling, electronic equipment and storage medium
CN120163877B (en) Visual repositioning method and electronic equipment
KR102893142B1 (en) Method for generating new image based on text and image, electronic device, and image generating system
CN120564207B (en) Qin simple text recognition method
CN119007196B (en) Chromosome identification method and system