[go: up one dir, main page]

JPH0981687A - Stroke pattern matching device - Google Patents

Stroke pattern matching device

Info

Publication number
JPH0981687A
JPH0981687A JP7231042A JP23104295A JPH0981687A JP H0981687 A JPH0981687 A JP H0981687A JP 7231042 A JP7231042 A JP 7231042A JP 23104295 A JP23104295 A JP 23104295A JP H0981687 A JPH0981687 A JP H0981687A
Authority
JP
Japan
Prior art keywords
matching
line segment
feature point
unit
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP7231042A
Other languages
Japanese (ja)
Other versions
JP2940445B2 (en
Inventor
Takatsugu Yamada
敬嗣 山田
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP7231042A priority Critical patent/JP2940445B2/en
Publication of JPH0981687A publication Critical patent/JPH0981687A/en
Application granted granted Critical
Publication of JP2940445B2 publication Critical patent/JP2940445B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To discriminate different line segments for which positions are largely shifted for unconnected line segments and to highly accurately match stroke patterns for which relative positional relation is not changed. SOLUTION: This stroke pattern matching device provided with a means 101 for inputting the stroke patterns as pictures and the means 102 for analyzing a structure from the stroke pattern obtained from the means 101 and detecting a feature point for realizing the matching of the stroke patterns by using features obtained from the means 102 is provided with the means 103 for describing the features of the feature point obtained in the means 102 and the features between the feature points, the means 104 for describing the features of the line segments divided by the feature point obtained in the means 102 and the features between the line segments, the means 105 for executing the matching of the stroke patterns by using the features described in the means 103, the means 106 for executing the matching of the stroke patterns by using the features described in the means 104 and the means 107 for generating a final matching result by using the output of both means 105 and means 106.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、線図形どうしを整
合する線図形整合装置おいて、特にオンライン入力され
た座標の時系列データである線図形や、画像データとし
て入力された線図形を対象として、手書き文字や手書き
図面中のシンボルなどの手書き線図形と別の線図形と整
合を行う線図形整合装置に関る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a line figure aligning apparatus for aligning line figures with each other, particularly for line figures which are time-series data of coordinates input online and line figures input as image data. The present invention relates to a line graphic matching device for matching a handwritten line graphic such as a handwritten character or a symbol in a handwritten drawing with another line graphic.

【0002】[0002]

【従来の技術】従来この種の手書きの線図形整合は、手
書きの文字を認識するために用いられている。例えば、
「特願平1−245507に線図形特徴抽出及び認識方
法、平成1年9月21日」(特開平3−108079号
公報)に線図形整合のための方法が記述されている。こ
の例を図2に従って説明する。画像入力部101から入
力された画像は、骨格線抽出部201において骨格線に
変換され、幅1画素の線図形に変換される。当該骨格線
から、線図形構造解析部202において、特徴点として
分岐点や交点が検出され、当該骨格線は、特徴点におい
て分断された線分に、分割する。さらに、これらの線分
は、方向と、特徴点を挟んで隣接する線分との接続関係
によって記述される。整合部203では、線分方向と接
続関係を特徴量として、モデルの特徴量と整合を実行す
る。
2. Description of the Related Art Conventionally, this type of handwritten line drawing matching is used for recognizing handwritten characters. For example,
A method for line figure matching is described in "Japanese Patent Application No. 1-245507, Method for Extracting and Recognizing Line Figure, September 21, 1991" (JP-A-3-108079). This example will be described with reference to FIG. The image input from the image input unit 101 is converted into a skeleton line in the skeleton line extraction unit 201 and converted into a line figure having a width of 1 pixel. From the skeleton line, the line-graphic structure analysis unit 202 detects a branch point or an intersection point as a feature point, and the skeleton line is divided into line segments divided at the feature point. Furthermore, these line segments are described by the connection relationship between the direction and the line segments that are adjacent to each other with the feature point in between. The matching unit 203 executes matching with the model feature amount using the line segment direction and the connection relationship as the feature amount.

【0003】[0003]

【発明が解決しようとする課題】この従来の線図形整合
装置では、分割された線分の関係として、隣接する線分
間の関係のみが用いられていたために、接続しない線分
の位置が大きくずれている異なる線分の区別がつかな
い。例えば、「や」の第2画目の短い線分が第1画目と
離れて記入された場合と、「か」の第3画目の線分との
区別がつかないという問題点があった。
In this conventional line figure matching apparatus, since only the relationship between the adjacent line segments is used as the relationship between the divided line segments, the positions of the line segments that are not connected are largely displaced. The different line segments are indistinguishable. For example, there is a problem that it cannot be distinguished from the case where the short line segment of the second stroke of "ya" is written apart from the first stroke and the line segment of the third stroke of "ka". It was

【0004】[0004]

【課題を解決するための手段】本発明の目的は、直接接
続しない線分間の関係を用いてストロークパターンの整
合を実行し、精度の高いストロークパターンの整合装置
を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a highly accurate stroke pattern matching apparatus that executes stroke pattern matching using the relationship between line segments that are not directly connected.

【0005】このために、本発明のストロークパターン
整合装置では、ストロークパターンを画像として入力す
る画像入力手段と、前記画像入力手段から得られたスト
ロークパターンから構造を解析して特徴点を検出する特
徴点検出手段と、前記特徴点検出手段から得られた特徴
を用いてストロークパターンの整合を実現するストロー
クパターン整合装置において、前記特徴点検出手段で得
られた特徴点の特徴と特徴点間の特徴を記述する特徴点
記述手段と、前記特徴点検出手段で得られた特徴点で区
切られた線分の特徴と線分間の特徴を記述する線分記述
手段と、前記特徴点記述手段で記述された特徴を用いて
ストロークパターンの整合を実行する特徴点整合手段
と、前記線分記述手段で記述された特徴を用いてストロ
ークパターンの整合を実行する線分整合手段と、前記特
徴点整合手段と前記線分整合手段の出力信号を用いて、
整合結果を判定する整合制御手段とから構成されること
により上記目的を達成している。
For this reason, the stroke pattern matching device of the present invention is characterized in that the image input means for inputting the stroke pattern as an image and the feature point is detected by analyzing the structure from the stroke pattern obtained from the image input means. In a stroke pattern matching device that realizes stroke pattern matching using the point detection means and the characteristics obtained from the characteristic point detection means, the characteristics of the characteristic points obtained by the characteristic point detection means and the characteristics between the characteristic points Is described by the feature point description means, the line segment description means describing the feature of the line segment delimited by the feature points obtained by the feature point detection means and the feature of the line segment, and the feature point description means. Feature point matching means for performing stroke pattern matching using the feature and stroke pattern matching using the feature described by the line segment description means A line segment matching means for executing, using the output signal of said line segment matching means and the feature point matching means,
The above object is achieved by being configured with a matching control means for judging a matching result.

【0006】また、前記特徴点整合手段が、複数の特徴
点の関係を用いて整合結果を修正する関係スコア加算手
段を備えることと、前記線分整合手段が、複数の線分の
関係を用いて整合結果を修正する関係スコア加算手段を
備えることと、前記特徴点整合手段が、前記線分整合手
段の整合結果を用いて整合結果を修正する線分スコア加
算手段を備えることと、前記線分整合手段が、前記特徴
点整合手段の整合結果を用いて整合結果を修正する特徴
点スコア加算手段を備えることによっても、上記目的を
達成している。
Further, the feature point matching means includes a relation score adding means for correcting a matching result by using a relationship between a plurality of feature points, and the line segment matching means uses a relationship between a plurality of line segments. And a line segment score adding means for correcting the matching result by using the matching result of the line segment matching means; The above-described object is also achieved by the minute matching means including the feature point score adding means for correcting the matching result using the matching result of the feature point matching means.

【0007】また、前記整合制御手段が、整合結果の得
点の大小関係を用いて、得点の修正を実施する手段と、
前記特徴点整合手段と前記線分整合手段をくり返し実行
して、整合結果を求める手段を備えることによっても、
上記目的を達成している。
The matching control means corrects the score by using the magnitude relationship of the score of the matching result,
By repeatedly executing the feature point matching means and the line segment matching means to obtain a matching result,
The above objective has been achieved.

【0008】また、前記整合制御手段の整合結果に応じ
て、元のストロークパターンを変形する画像変形手段を
備え、当該画像変形手段と、前記特徴点検出手段、前記
特徴点記述手段、前記線分記述手段、前記特徴点整合手
段、前記線分整合手段、前記整合制御手段をくり返し、
駆動できることによっても、上記目的を達成している。
Further, there is provided image deforming means for deforming the original stroke pattern according to the matching result of the matching control means, and the image deforming means, the characteristic point detecting means, the characteristic point describing means, and the line segment. The description means, the feature point matching means, the line segment matching means, and the matching control means are repeated.
The above object is also achieved by being able to drive.

【0009】また、本発明では、前記画像入力手段は、
ストロークパターンを座標点列であるオンラインデータ
として入力し、前記画像入力手段から得られたオンライ
ンストロークパターンから構造を解析して特徴点を検出
する特徴点検出手段を備えることによって、オンライン
データとしてのストロークパターンに対しても、上記の
目的を達成している。
Further, in the present invention, the image input means is
By inputting a stroke pattern as online data that is a sequence of coordinate points, and including feature point detecting means for detecting a feature point by analyzing the structure from the online stroke pattern obtained from the image input means, the stroke as online data is obtained. For the pattern, the above-mentioned purpose is achieved.

【0010】[0010]

【発明の実施の形態】次に、本発明について図1と図6
から図9までの図面を参照して説明する。図1は、本発
明の一実施例を示すブロック図である。本発明の第1の
実施例は、画像入力部101と、特徴点抽出部102
と、特徴点記述部103と、線分記述部104と、特徴
点整合部105と、線分整合部106と、整合制御部1
07と、出力端子108からなる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to FIGS.
9 to 9 will be described. FIG. 1 is a block diagram showing an embodiment of the present invention. The first embodiment of the present invention has an image input unit 101 and a feature point extraction unit 102.
A feature point description unit 103, a line segment description unit 104, a feature point matching unit 105, a line segment matching unit 106, and a matching control unit 1
07 and an output terminal 108.

【0011】スキャナなどの画像入力部101から入力
された線図形画像は雑音除去や2値化処理などの前処理
を施した後に、2値の線図形画像として得られ、特徴点
検出部102へ転送される。
A line graphic image input from an image input unit 101 such as a scanner is subjected to preprocessing such as noise removal and binarization processing, and then obtained as a binary line graphic image. Transferred.

【0012】特徴点検出部102の本実施例では、まず
線図形画像を細線化する。細線化の方法は、どのような
ものでもよいが、例えば「吹抜敬彦:FAX,OAのた
めの画像の信号処理、pp.40−43」に記述されて
いる方法が公知である。この場合に細線化は、8連結の
ルールで実施されているものとして説明する。8連結と
は、上下左右の画素以外にも、斜め方向の隣り合う画素
も連結しているものとすることである。8連結で細線化
された画像の各画素の連結数を調べる。ある黒画素の連
結数を調べる場合には、当該画素の周辺の8画素の黒画
素数を調べ連結数とする。ここで、連結数とは当該画素
に連結する線分の数を表わすものとする。連結数が1の
場合には、当該画素を端点とする。連結数が2の場合に
は、当該画素は線分上の点であるとし、特徴点とはしな
い。連結数が3以上の場合には、その点で3本以上の線
分が交差していることを表わす。連結数3以上の点も特
徴点とする。カタカナ「キ」の特徴点を検出した例を図
6に示す。点601、点602、点604、点605、
点607、点608は端点である。点603と点606
は交点である。同時に、特徴点で区切られた部分を線分
とする。図7にカタカナ「キ」から検出した線分の例を
示す。線分701、線分702、線分703、線分70
4、線分705、線分706、線分707の7つの線分
が検出されたものである。これらの検出された特徴点の
集合と線分の集合は特徴点記述部103と線分記述部1
04に転送される。
In this embodiment of the feature point detection unit 102, the line graphic image is thinned first. Although any thinning method may be used, a method described in, for example, "Fukinori Takahiko: Signal processing of images for FAX, OA, pp. 40-43" is known. In this case, the thinning will be described as being performed according to the rule of eight connections. The 8-connection means that adjacent pixels in the diagonal direction are also connected in addition to the pixels on the upper, lower, left and right sides. The number of connections of each pixel of the image thinned by 8 connections is examined. When the number of connected black pixels is checked, the number of black pixels of eight pixels around the pixel is checked and set as the connected number. Here, the connection number represents the number of line segments connected to the pixel. When the number of connections is 1, the pixel is set as an end point. When the number of connections is 2, the pixel is a point on the line segment and is not a feature point. When the number of connections is three or more, it means that three or more line segments intersect at that point. Points with 3 or more connections are also feature points. FIG. 6 shows an example in which the feature points of katakana “ki” are detected. Points 601, 602, 604, 605,
Points 607 and 608 are end points. Points 603 and 606
Is the intersection. At the same time, a line segment is defined by the feature points. FIG. 7 shows an example of a line segment detected from the katakana “ki”. Line segment 701, line segment 702, line segment 703, line segment 70
Four line segments 705, 706, and 707 are detected. The set of detected feature points and the set of line segments are the feature point description unit 103 and the line segment description unit 1.
04.

【0013】特徴点記述部103では、検出された特徴
点、各々の特徴量と、特徴点どうしの関係の特徴量を求
める。本実施例では、特徴点の特徴量として、特徴点の
タイプと座標とした。ここで特徴点のタイプとは、本実
施例では端点と屈曲点と交差点のいづれかである。接続
する線分の本数、接続する線分番号、線分を挟んで接続
する特徴点の番号、接続はしていないが、近接している
特徴点の番号とその特徴点までの距離とした。例えば、
図6の点603の場合には、特徴点タイプは交点で、座
標は(40,30)である。ただし、画像のサイズは横
100画素、縦100画素としている。接続する線分数
は4本で、接続する線分の番号は図7の線分で、線分7
01、線分702、線分703、線分704である。ま
た、線分を挟んで接続している特徴点は、図6で点60
1、点602、点604、点606である。また、図6
の点603の例では、近接する点としては、点605と
点607がある。また点603からそれらの点までの距
離は、35画素と45画素である。本実施例では、近接
の条件としては、特徴点間の距離が50画素以下のもの
とした。図8の特徴点801の例では、近接点として
は、端点802も含まれ、その点までの距離は5画素で
ある。
The feature point description unit 103 obtains the detected feature points, the respective feature amounts, and the feature amount of the relationship between the feature points. In this embodiment, the type and coordinates of the characteristic point are used as the characteristic amount of the characteristic point. Here, the type of feature point is any one of an end point, a bending point, and an intersection point in this embodiment. The number of line segments to be connected, the line segment number to be connected, the number of feature points connected with the line segment sandwiched between them, and the number of feature points that are not connected but are adjacent to each other and the distance to the feature point are used. For example,
In the case of the point 603 in FIG. 6, the feature point type is the intersection and the coordinates are (40, 30). However, the size of the image is 100 pixels horizontally and 100 pixels vertically. The number of line segments to connect is 4, and the number of line segments to connect is the line segment in FIG.
01, a line segment 702, a line segment 703, and a line segment 704. In addition, the characteristic points connected by sandwiching the line segment are points 60 in FIG.
1, point 602, point 604, and point 606. FIG.
In the example of the point 603, the points 605 and 607 are adjacent points. The distances from the point 603 to those points are 35 pixels and 45 pixels. In this embodiment, the distance between feature points is set to 50 pixels or less as the condition of proximity. In the example of the characteristic point 801 in FIG. 8, the end point 802 is also included as the near point, and the distance to that point is 5 pixels.

【0014】線分記述部104では、入力された特徴点
のリストと線分のリストから、線分自身との特徴量と、
線分間の関係を求める。線分自身の特徴としては、線分
の長さ、線分方向、線分の累積曲率、および線分のタイ
プとした。本実施例では、線分は8隣接ルールでの細線
になっているので、線分中の黒画素数を計数することに
より線分の長さを得ることができる。線分の方向は、線
分の両端点間の方向で表わす。線分の両端点間のベクト
ルを(X1,Y1)と(X2,Y2)とした場合に、両
端点間の方向は下の式(1)に従った計算により求めら
れる。
In the line segment description unit 104, the feature amount of the line segment itself is calculated from the input feature point list and the line segment list,
Find the relationship between line segments. The characteristics of the line segment itself are the length of the line segment, the direction of the line segment, the cumulative curvature of the line segment, and the type of line segment. In this embodiment, since the line segment is a thin line according to the 8-adjacent rule, the length of the line segment can be obtained by counting the number of black pixels in the line segment. The direction of the line segment is represented by the direction between the end points of the line segment. When the vectors between the end points of the line segment are (X1, Y1) and (X2, Y2), the direction between the end points can be calculated by the equation (1) below.

【0015】 D=ArcCos((X1*X2+Y1*Y2)/ (Norm(X1、Y1)*Norm(X2,Y2)) (1) ここで、ArcCos(x)は、Cos関数の逆関数を
表わす。単位は、ラジアンである。また、Norm
(x,y)は、ベクトル(x,y)のノルムを表わす。
D = ArcCos ((X1 * X2 + Y1 * Y2) / (Norm (X1, Y1) * Norm (X2, Y2)) (1) Here, ArcCos (x) represents an inverse function of the Cos function. The unit is radian and Norm
(X, y) represents the norm of the vector (x, y).

【0016】また、本実施例では線分は8隣接ルールで
細線化されているので、線分中の各画素の方向は右方向
を0度として、半時計回りに角度をとると、0、π/
4、π/2、3π/4、π、5π/4、3π/2、7π
/4の8方向である。線分の1方の端点からスタートし
て、隣り合う画素の方向を調べる。便宜的に隣接する2
画素間の方向を、処理開始特徴点に近い方の画素の方向
とする。さらに、隣接画素の方向の差を求める。処理開
始特徴点から離れた方の画素の方向から、処理開始特徴
点に近い方の画素の方向を引いて、画素間の方向変化
量、つまり曲率とする。ただし、曲率の値が、−πより
小さい場合には、その値に2πを加えた値を曲率とす
る。また、曲率がπより大き場合には、2πをその値か
ら引いた値を曲率とする。その曲率は、スタート画素か
ら離れた方の画素の曲率とする。以上のようにして、各
画素の曲率を求める。ただし、線分の両端点では曲率は
求まらず、曲率を0とする。求められた線分上の全ての
点の曲率の総和を求めて累積曲率とする。この累積曲率
の絶対値が曲率Tよりも小さい場合には、この線分のタ
イプを直線分とする。また、累積曲率がしきい値T以上
の場合には、正曲線分とする。また、累積曲率が−T以
下の場合には、負曲線分とする。さらに、線分長が2以
上で線分の始点と終点が一致する場合、この線分をルー
プとする。また、両端の距離がSで、線分の長さをLと
した場合に、S/Lがしきい値U以下で、かつ累積曲率
がしきい値V以上の場合には、この線分を疑似ループと
する。本実施例では、しきい値Tをπ/8とし、しきい
値Uの値を1/3とし、しきい値Vをπとしたが、これ
らの値は本質的な問題ではなく、どのような値でもよ
い。疑似ループが検出された場合には、疑似ループを構
成する線分の真ん中の点で、疑似ループを2つに分断し
て、2つの線分として、真ん中の点を屈曲点として、特
徴点、線分を追加して記述し、特徴点記述部103と線
分記述部104を修正する。
Further, in this embodiment, since the line segment is thinned by the rule of 8 adjacency, the direction of each pixel in the line segment is 0 degree to the right and 0 degrees when the angle is set counterclockwise. π /
4, π / 2, 3π / 4, π, 5π / 4, 3π / 2, 7π
There are eight directions of / 4. Starting from one end of the line segment, the direction of adjacent pixels is examined. 2 adjacent for convenience
The direction between pixels is the direction of the pixel closer to the processing start feature point. Further, the difference in the direction of adjacent pixels is obtained. The direction of the pixel closer to the processing start feature point is subtracted from the direction of the pixel farther from the processing start feature point to obtain the direction change amount between pixels, that is, the curvature. However, when the value of the curvature is smaller than −π, the value obtained by adding 2π to the value is the curvature. When the curvature is larger than π, the value obtained by subtracting 2π from the value is the curvature. The curvature is the curvature of the pixel farther from the start pixel. The curvature of each pixel is obtained as described above. However, the curvature is not found at both end points of the line segment, and the curvature is set to 0. The sum of the curvatures of all the points on the obtained line segment is calculated to obtain the cumulative curvature. When the absolute value of the cumulative curvature is smaller than the curvature T, the type of this line segment is a straight line segment. If the cumulative curvature is greater than or equal to the threshold value T, it is a positive curve. In addition, when the cumulative curvature is −T or less, it is a negative curve. Further, when the line segment length is 2 or more and the start point and the end point of the line segment match, this line segment is set as a loop. If the distance between both ends is S and the length of the line segment is L, then if S / L is less than or equal to the threshold value U and the cumulative curvature is greater than or equal to the threshold value V, this line segment is It is a pseudo loop. In this embodiment, the threshold value T is π / 8, the value of the threshold value U is ⅓, and the threshold value V is π, but these values are not essential problems. Can be any value. When a pseudo loop is detected, the pseudo loop is divided into two at the center point of the line segments that form the pseudo loop, and the two points are divided into two line segments. A line segment is added and described, and the feature point description unit 103 and the line segment description unit 104 are corrected.

【0017】続いて、線分記述部104では、線分どう
しの関係を記述する。本実施例では、線分どうしの関係
として、2線分間に挟まれる線分数を用いた。本実施例
での間に挟まる線分数を求める方法としては、2線分の
中点どうしを線分で結び、その中点間の線分が通過する
他の線分の数を求める。まず、パターンの最大サイズの
画素数の画像領域を確保し、その各画素の値を0にす
る。全ての線分を当該画像中に描く。この場合に、各線
分の画素毎に値を代入する。その場合の値は線分の番号
とする。2線分の関係を求めるためには、1つの線分の
中点から別の線分の中点に向けて線分を引き、該画像中
の線分上の画素値を調べる。これにより、当該2線分の
中点間の線分上の各画素が他の線分上にあるかどうかを
チェックする。もし、他の線分を通過する場合には、そ
の線分の番号を記憶する。2線分の中点間を線分で結び
おわった後に、通過した線分の番号を調べ、通過した線
分が無い場合には、当該2線分は対向しているものとす
る。1種類の線分番号が得られた場合には、当該2線分
間には1本の線分が存在しているものとみなし、その線
分番号を記憶する。本実施例では、2線分間の間に存在
する線分数が、0と1の場合のみを記憶するが、2本以
上の線分が線分間に存在する場合にも、容易に拡張でき
る。図9は、線分どうしの関係のうち、線分間に他の線
分が存在しない場合の例を示したものである。矢印は、
関係のある線分をつないで示している。例えば、線分9
01と線分902は、線分間関係903でリンクされて
記憶される。
Then, the line segment description section 104 describes the relationship between the line segments. In this embodiment, the number of line segments sandwiched between two line segments is used as the relationship between the line segments. As a method of obtaining the number of line segments sandwiched between the present embodiment, the midpoints of two line segments are connected by a line segment, and the number of other line segments through which the line segment between the midpoints passes is obtained. First, an image area having the maximum number of pixels of the pattern is secured, and the value of each pixel is set to zero. Draw all line segments in the image. In this case, a value is substituted for each pixel of each line segment. The value in that case shall be the line segment number. In order to obtain the relationship between two line segments, a line segment is drawn from the midpoint of one line segment to the midpoint of another line segment, and the pixel value on the line segment in the image is examined. Thereby, it is checked whether or not each pixel on the line segment between the midpoints of the two line segments is on another line segment. If the line segment passes through another line segment, the line segment number is stored. After connecting the midpoints of the two line segments with a line segment, the number of the line segment that has passed is checked, and if there is no line segment that has passed, the two line segments are considered to face each other. When one type of line segment number is obtained, it is considered that one line segment exists in the two line segments, and the line segment number is stored. In this embodiment, only the case where the number of line segments existing between two line segments is 0 and 1 is stored, but it can be easily expanded even when two or more line segments exist in the line segment. FIG. 9 shows an example of the relationship between the line segments when there is no other line segment in the line segment. Arrow
It is shown by connecting related line segments. For example, line segment 9
01 and the line segment 902 are linked and stored in the line segment relationship 903.

【0018】また、本実施例では、2線分間に存在する
線分数を調べるために2線分間の中点間の線分上の画素
値を調べたが、他の実施例では2線分の端点の組み合わ
せにより、4本の線分を引き、その線分上の画素値を調
べて、線分間に存在する他の線分数を求めて得ることが
できる。同様に本実施例の2線分の中点間と、別の実施
例の2線分の端点間の5本の線分上の画素値を調べて、
線分間に存在する他の線分の数を得ることもできる。
Further, in the present embodiment, the pixel value on the line segment between the midpoints of the two line segments was examined in order to check the number of line segments existing in the two line segments. It can be obtained by drawing four line segments by the combination of the end points, checking the pixel values on the line segments, and obtaining the number of other line segments existing in the line segments. Similarly, the pixel values on the five line segments between the midpoints of the two line segments of this embodiment and between the end points of the two line segments of another embodiment are checked,
It is also possible to obtain the number of other line segments existing in the line segment.

【0019】特徴点整合部105と線分整合部106の
動作の説明を図10から図13を用いて行う。特徴点整
合部105では、複数のカテゴリの特徴点辞書データ
が、図12の辞書データ記憶部1204に記憶されてい
るものとする。特定のカテゴリの特定のパターンの特徴
点辞書データを選択して、特徴点記述部103中のデー
タとの整合を実行する。辞書データ記憶部1204中に
記憶されている特徴点辞書データは、特徴点記述部10
3で生成された特徴点のデータと同様に、辞書データの
ための特徴点のタイプと座標とした。さらに、特徴点整
合部105の辞書データ記憶部1204中では、それぞ
れの特徴点の重要度を表わす荷重値が合わせて記憶され
ているものとする。特徴点整合部105では、特徴点記
述部103で記述する特徴の種類を変更する場合には、
同じ特徴を用いるように変更する必要がある。
The operation of the feature point matching unit 105 and the line segment matching unit 106 will be described with reference to FIGS. 10 to 13. It is assumed that the feature point matching unit 105 stores the feature point dictionary data of a plurality of categories in the dictionary data storage unit 1204 of FIG. The feature point dictionary data of a particular pattern in a particular category is selected, and matching with the data in the feature point description unit 103 is executed. The feature point dictionary data stored in the dictionary data storage unit 1204 is the feature point description unit 10
Similar to the feature point data generated in 3, the feature point type and coordinates for the dictionary data are used. Furthermore, it is assumed that the dictionary data storage unit 1204 of the feature point matching unit 105 also stores the weight value representing the importance of each feature point. In the feature point matching unit 105, when changing the type of the feature described in the feature point description unit 103,
Must be modified to use the same features.

【0020】特徴点整合部105と同様に、線分整合部
106では、複数のカテゴリの線分辞書データが図13
の辞書データ記憶部1304に記憶されているものとす
る。特定のカテゴリの特定のパターンの線分辞書データ
を選択して、線分記述部104中のデータとの整合を実
行する。辞書データ記憶部1304中に記憶されている
線分辞書データは、線分記述部104で生成された線分
のデータと同様に、線分の長さ、線分方向、線分の累積
曲率、および線分のタイプが記憶されている。さらに、
辞書データ記憶部1304中では、それぞれのそれぞれ
の線分の重要度を表わす荷重値が合わせて記憶されてい
るものとする。線分整合部106では、線分記述部10
4で記述する特徴の種類を変更する場合には、同じ特徴
を用いるように変更する必要がある。
Similar to the feature point matching unit 105, the line segment matching unit 106 stores the line segment dictionary data of a plurality of categories as shown in FIG.
It is assumed that the dictionary data is stored in the dictionary data storage unit 1304. The line segment dictionary data of a specific pattern in a specific category is selected to execute matching with the data in the line segment description unit 104. The line segment dictionary data stored in the dictionary data storage unit 1304 is similar to the line segment data generated by the line segment description unit 104, and the length of the line segment, the direction of the line segment, the cumulative curvature of the line segment, And the line segment type are stored. further,
It is assumed that the dictionary data storage unit 1304 also stores a weight value indicating the importance of each line segment. In the line segment matching unit 106, the line segment description unit 10
When changing the type of the feature described in 4, it is necessary to change to use the same feature.

【0021】特徴点整合部105中の単純整合部120
1では、入力パターンの全ての特徴点と、選択された辞
書パターン中の全ての特徴点との整合スコアを計算す
る。入力パターンの特徴点をIxとし、選択された辞書
パターン中の特徴点をDjyとする。xは、入力パター
ン中での特徴点の通し番号とする。また、jは、辞書中
のパターンの番号を表わす。また、yは第j番目の辞書
パターン中での、特徴点の通し番号とする。本実施例で
は、特徴点の特徴として、特徴点のタイプと座標として
おり、第x番目の特徴点のデータをPx、Ux、Vxと
した。同様に辞書パターン中の特徴点のデータをPj
y、Ujy、Vjyとした。特徴点整合部105では、
入力パターンの全ての特徴点と辞書パターン中の全ての
特徴点との整合度Sx,jyを式(2)の計算に従って求
める。得られたスコアは、図12中の特徴点スコア記憶
部1205に記憶する。
The simple matching unit 120 in the feature point matching unit 105.
In 1, the matching score of all the feature points of the input pattern and all the feature points in the selected dictionary pattern is calculated. The characteristic point of the input pattern is Ix, and the characteristic point in the selected dictionary pattern is Djy. x is a serial number of feature points in the input pattern. Further, j represents the number of the pattern in the dictionary. Further, y is a serial number of feature points in the jth dictionary pattern. In this embodiment, the characteristic of the characteristic point is the type and coordinates of the characteristic point, and the data of the x-th characteristic point is Px, Ux, and Vx. Similarly, the data of the feature points in the dictionary pattern is Pj.
It was set to y, Ujy, and Vjy. In the feature point matching unit 105,
The matching degrees Sx, jy between all the feature points of the input pattern and all the feature points of the dictionary pattern are obtained according to the calculation of the equation (2). The obtained score is stored in the feature point score storage unit 1205 in FIG.

【0022】 S(Ix、Djy)=Wpjy*Sp(Px、Pjy)+Wujy*Su(U x、Ujy)+Wvjy*Sv(Vx、Vjy) (2) ここで、Wpjy、Wujy、Wvjyは、特徴点のデ
ータの重要度を表わす荷重値とし、辞書データ記憶部1
204に記憶されているものとする。本実施例では、こ
れらの荷重値は、一定の1としたが、これは本質的な問
題ではなく、どのような値でもよく、また、辞書パター
ン中のデータ毎に変更してもよい。また、Sp(Px、
Pjy)、Su(Ux、Ujy)、Sv(Vx、Vj
y)は、入力パターン中のデータと辞書パターン中のデ
ータの距離を与える関数である。Spは、特徴点のタイ
プ間のずれをスコアとして表現するためのもので、全て
のタイプと全てのタイプの間に、スコアを定めて表とし
て、辞書データ記憶部1204に記憶しているものとす
る。本実施例では、Sp(Px、Pjy)のPxとPj
yが同一のタイプである場合には、100を返し、異な
るタイプである場合には50を返すように表を設定し
た。この表の生成方法は、本発明の本質的な問題ではな
く、どのような表を生成してもよい。Su(Ux、Uj
y)も同様に、組み合わせにより、表からスコアを求め
ることができる。また、別の実施例としては、Su(A
BS(Ux−Ujy))として、UxとUjyの差の絶
対値の関数としてSuを定義してもよい。この場合に、
最大値を100とする実施例では、Su=100−10
0*ABS(Ux−Ujy)/Iとすることができる
が、この関数の定義は最大を100、最低を0にするも
のならば、どのようなものでもよい。ただし、本実施例
でのIは入力パターンの最大横サイズを表わす。Sv
(Vx、Vjy)の実施例は、Su(Ux、Ujy)の
実施例と同じ構成で実現する。
S (Ix, Djy) = Wpjy * Sp (Px, Pjy) + Wujy * Su (Ux, Ujy) + Wvjy * Sv (Vx, Vjy) (2) Here, Wpjy, Wujy, and Wvjy are characteristic points. Dictionary data storage unit 1 as a weight value indicating the importance of the data
It is assumed that it is stored in 204. In the present embodiment, these load values are set to a constant value of 1. However, this is not an essential problem, any value may be used, and it may be changed for each data in the dictionary pattern. In addition, Sp (Px,
Pjy), Su (Ux, Ujy), Sv (Vx, Vj
y) is a function that gives the distance between the data in the input pattern and the data in the dictionary pattern. Sp is for expressing a shift between types of feature points as a score, and stores scores in all the types and all types as a table and stores them in the dictionary data storage unit 1204. To do. In the present embodiment, Px and Pj of Sp (Px, Pjy)
The tables were set to return 100 if y were of the same type and 50 if they were of different types. This table generation method is not an essential problem of the present invention, and any table may be generated. Su (Ux, Uj
Similarly, for y), the score can be obtained from the table by the combination. In another example, Su (A
Su may be defined as BS (Ux−Ujy)) as a function of the absolute value of the difference between Ux and Ujy. In this case,
In the embodiment in which the maximum value is 100, Su = 100-10
It can be 0 * ABS (Ux-Ujy) / I, but the definition of this function may be any as long as the maximum is 100 and the minimum is 0. However, I in this embodiment represents the maximum horizontal size of the input pattern. Sv
The example of (Vx, Vjy) is realized with the same configuration as the example of Su (Ux, Ujy).

【0023】続いて、特徴点どうしの関係を用いて特徴
点整合部105中の関係スコア加算部1202におい
て、スコアの修正を実施する。本実施例では、接続して
いる特徴点と近接している特徴点は、図10のように表
にして表現している。図10では、接続している特徴点
ペアは、−1で表現しており、近接している特徴点ペア
は、その特徴点間の距離を示している。特徴点ペアで、
要素が0であるものは、図10では数字を記入していな
いが、接続しておらず、しかも近接もしていないことを
表わす。整合制御部107は、特徴点間の整合処理が終
了した段階で、特徴点整合部105中の関係スコア加算
部1202に信号を送り、特徴点間の関係を用いたスコ
アの修正を実施する。スコアの修正は、辞書パターンの
特徴点の番号の順に実施するものとする。この順序はど
のようなものでもよいし、並列に実施してもよい。第j
番目の辞書パターン中の特徴点Djyについて、接続す
る特徴点の集合をG1jyとし、その要素数である、特
徴点Djyに接続する特徴点の数をn1jyとする。同
様に、特徴点Djyについて、近接する特徴点の集合を
G2jyとし、その要素数である、特徴点Djyに近接
する特徴点の数をn2jyとする。これらの集合の要素
は図10に例を示した特徴点関係を示す表から得る。ま
た、同様に入力パターンの特徴点間の関係も既に求めら
れて表として表現されているものとし、その入力パター
ン中の第x番目の特徴点Ixについて、接続する特徴点
の集合をG3xとし、その要素数である、特徴点Ixに
接続する特徴点の数をn3xとする。同様に、特徴点I
xについて、近接する特徴点の集合をG4xとし、その
要素数である、特徴点Ixに近接する特徴点の数をn4
xとする。その時のスコアの修正値S′(Ix、Dj
y)は下記の式(3)、式(4)、式(5)を用いて求
める。修正に用いたS(Ii、Dd)は、特徴点スコア
記憶部1205から読みだす。
Subsequently, the relationship score adding unit 1202 in the feature point matching unit 105 corrects the score using the relationship between the feature points. In this embodiment, the feature points that are close to the connected feature points are represented in a table as shown in FIG. In FIG. 10, connected feature point pairs are represented by −1, and adjacent feature point pairs indicate the distance between the feature points. With feature point pairs,
When the element is 0, the numeral is not entered in FIG. 10, but the element is not connected and is not in proximity. When the matching process between the feature points is completed, the matching control unit 107 sends a signal to the relationship score adding unit 1202 in the feature point matching unit 105 to correct the score using the relationship between the feature points. The correction of the score shall be performed in the order of the numbers of the feature points of the dictionary pattern. This order may be arbitrary or may be carried out in parallel. J th
For the feature point Djy in the th dictionary pattern, a set of feature points to be connected is G1jy, and the number of feature points, which is the number of elements, is n1jy. Similarly, for the feature point Djy, a set of adjacent feature points is G2jy, and the number of feature points, which is the number of elements of the feature point Djy, is n2jy. The elements of these sets are obtained from the table showing the feature point relationships illustrated in FIG. Similarly, it is assumed that the relationship between the feature points of the input pattern has already been obtained and expressed as a table, and for the x-th feature point Ix in the input pattern, the set of feature points to be connected is G3x, The number of feature points connected to the feature point Ix, which is the number of elements, is n3x. Similarly, the feature point I
For x, the set of adjacent feature points is G4x, and the number of feature points, which is the number of elements, is n4.
Let x. The corrected value S '(Ix, Dj of the score at that time)
y) is calculated using the following equations (3), (4), and (5). The S (Ii, Dd) used for the correction is read from the feature point score storage unit 1205.

【0024】 S1(Ix、Djy)=SUM(DdはG1jyに含まれる、 MAX(S(Ii、Dd)、IiはG3xに含まれる))/nijy (3) ただし、ここでSUM(A,B)は、Aを満たす条件の
下でのBの総和を表わし、MAX(B,A)は、Aを満
たす条件の下でのBの最大値を表わすものとする。
S1 (Ix, Djy) = SUM (Dd is included in G1jy, MAX (S (Ii, Dd), Ii is included in G3x)) / nijy (3) where SUM (A, B ) Represents the total sum of B under the condition of satisfying A, and MAX (B, A) represents the maximum value of B under the condition of satisfying A.

【0025】 S2(Ix、Djy)=SUM(DdはG2jyに含まれる、 MAX(S(Ii、Dd)、IiはG4xに含まれる))/n2jy (4) ただし、ここでSUM(A,B)は、Aを満たす条件の
下でのBの総和を表わし、MAX(B,A)は、Aを満
たす条件の下でのBの最大値を表わすものとする。
S2 (Ix, Djy) = SUM (Dd is included in G2jy, MAX (S (Ii, Dd), Ii is included in G4x)) / n2jy (4) Here, SUM (A, B) ) Represents the total sum of B under the condition of satisfying A, and MAX (B, A) represents the maximum value of B under the condition of satisfying A.

【0026】 S′(Ix、Djy)=W1*S1(Ix、Djy)+W2*S2(Ix、D jy) (5) ただし、ここでW1、W2は、加算の時の荷重値を表わ
し、本実施例では、W1を0.3とし、W2を0.2と
したが、これは本質的な問題ではなく、どのような値で
もよい。
S ′ (Ix, Djy) = W1 * S1 (Ix, Djy) + W2 * S2 (Ix, Djy) (5) Here, W1 and W2 represent load values at the time of addition, and In the embodiment, W1 is set to 0.3 and W2 is set to 0.2, but this is not an essential problem and any value may be used.

【0027】上記の式(3)、式(4)、式(5)を用
いて全てのS′(Ix、Djy)を求めて得た後に、さ
らに、下の式(6)に従った計算により、スコアS(I
x、Djy)の修正を実施する。
After obtaining and obtaining all S '(Ix, Djy) using the above equations (3), (4) and (5), further calculation according to the following equation (6) Gives the score S (I
x, Djy) is corrected.

【0028】 S(Ix、Djy)=W3*S(Ix、Djy)+S′(Ix、Djy) (6) ただし、ここでW3は0.5としたが、どのような値で
もよい。
S (Ix, Djy) = W3 * S (Ix, Djy) + S '(Ix, Djy) (6) However, although W3 is 0.5 here, any value may be used.

【0029】次に、線分整合部106の動作の説明をお
こなう。線分整合部106では、入力パターンの全ての
線分と、選択された辞書パターン中の全ての線分との整
合スコアを計算する。入力パターンの線分をExとし、
選択された辞書パターン中の線分をFjyとする。x
は、入力パターン中での線分の通し番号とする。また、
jは、辞書中のパターンの番号を表わす。また、yは第
j番目の辞書パターン中での、線分の通し番号とする。
本実施例では、線分の特徴として、線分の長さ、線分方
向、線分の累積曲率、および線分のタイプとしており、
第x番目の線分のデータLx、Ox、Cx、Txとし
た。同様に辞書パターン中の線分のデータをLjy、O
jy、Cjy、Tjyとした。線分整合部106中の単
純整合部1301では、入力パターンの全ての線分と辞
書パターン中の全ての線分との整合Rx,jyを式
(7)の計算に従って求める。その結果のスコアを線分
スコア記憶部1305に記憶する。
Next, the operation of the line segment matching section 106 will be described. The line segment matching unit 106 calculates matching scores for all line segments of the input pattern and all line segments in the selected dictionary pattern. Let Ex be the line segment of the input pattern,
The line segment in the selected dictionary pattern is set as Fjy. x
Is the serial number of the line segment in the input pattern. Also,
j represents the pattern number in the dictionary. In addition, y is the serial number of the line segment in the jth dictionary pattern.
In the present embodiment, the characteristics of the line segment are the length of the line segment, the line segment direction, the cumulative curvature of the line segment, and the line segment type,
The data Lx, Ox, Cx, Tx for the x-th line segment were used. Similarly, the data of the line segment in the dictionary pattern can be converted into Lfy, O
It was set to zy, Czy, and Tzy. The simple matching unit 1301 in the line segment matching unit 106 finds the matching Rx, jy between all the line segments of the input pattern and all the line segments of the dictionary pattern according to the calculation of Expression (7). The resulting score is stored in the line segment score storage unit 1305.

【0030】 R(Ix、Djy)=WLjy*RL(Lx、Ljy)+Wojy*RO(O x、Ojy)+Wcjy*Rc(Cx、Cjy)+WTjy*RT(Tx、Tj y) (7) ここで、WLjy、WOjy、WCjy、WTjyは、
線分のデータの重要度を表わす荷重値とし、線分整合部
106に記憶されているものとする。本実施例では、こ
れらの荷重値値は、一定の1としたが、これは本質的な
問題ではなく、どのような値でもよく、また、辞書パタ
ーン中のデータ毎に変更してもよい。RL(Lx、Lj
y)、RO(Ox、Ojy)、RC(Cx、Cjy)、
RT(Tx、Tjy)は、入力パターン中のデータと辞
書パターン中のデータの距離を与える関数である。RT
は、線分のタイプ間のずれをスコアとして表現するため
のもので、全てのタイプと全てのタイプの間に、スコア
を定めて表として、辞書データ記憶部1304に記憶し
ているものとする。本実施例では、RT(Tx、Tj
y)のTxとTjyが同一のタイプである場合には、1
00を返し、異なるタイプである場合には50を返すよ
うに表を設定した。この表の生成方法は、本発明の本質
的な問題ではなく、どのような表を生成してもよい。
R (Ix, Djy) = WLjy * RL (Lx, Ljy) + Woj * RO (Ox, Ojy) + Wcjy * Rc (Cx, Cjy) + WTjy * RT (Tx, Tjy) (7) where WLjy, WOjy, WCjy, WTjy are
It is assumed that the weight value represents the importance of the data of the line segment and is stored in the line segment matching unit 106. In the present embodiment, these load value values are set to a constant value of 1, but this is not an essential problem and may be any value, or may be changed for each data in the dictionary pattern. RL (Lx, Lj
y), RO (Ox, Ojy), RC (Cx, Cjy),
RT (Tx, Tjy) is a function that gives the distance between the data in the input pattern and the data in the dictionary pattern. RT
Is for expressing the deviation between the types of line segments as a score, and it is assumed that scores are defined between all types and all types and stored as a table in the dictionary data storage unit 1304. . In this embodiment, RT (Tx, Tj
1 if Tx and Tjy in y) are the same type
The table was set to return 00 and 50 for different types. This table generation method is not an essential problem of the present invention, and any table may be generated.

【0031】線分整合部106のRL(Lx、Lj
y)、RO(Ox、Ojy)、RC(Cx、Cjy)も
同様に、それぞれの引き数の組み合わせにより、表から
スコアを求めることができる。また、別の実施例として
は、RL(ABS(Lx−Ljy))として、LxとL
jyの差の絶対値の関数としてRLを定義してもよい。
この場合に、最大値を100とする実施例では、RL=
100−100*ABS(Lx−Ljy)/Lxとする
ことができるが、この関数の定義は最大を100で、最
低を0にするものならば、どのようなものでもよい。た
だし、本実施例ではRLが、0より小さくなる場合に
は、RLを0とした。同様に、RO(Ox、Ojy)の
別の実施例として、RO(Ox、Ojy)=100−2
00*ABS(Ox−Ojy−nπ)/πとすることも
できる。ただし、nはOx−Ojy−nπを−π/2か
らπ/2にする適当な自然数とする。また、同様にRC
(Cx、Cjy)の別の実施例としては、RC(Cx、
Cjy)=100−100*ABS(ABS(Cx)−
ABS(Cjy))/ABS(Cx)とすることもでき
る。
RL (Lx, Lj of the line segment matching unit 106
Similarly, for y), RO (Ox, Ojy), and RC (Cx, Cjy), the score can be obtained from the table by combining the respective arguments. In another embodiment, RL (ABS (Lx-Ljy)) is used as Lx and L.
RL may be defined as a function of the absolute value of the j y difference.
In this case, in the embodiment in which the maximum value is 100, RL =
It can be 100-100 * ABS (Lx-Ljy) / Lx, but the definition of this function can be any as long as it has a maximum of 100 and a minimum of 0. However, in this example, when RL was smaller than 0, RL was set to 0. Similarly, as another example of RO (Ox, Ojy), RO (Ox, Ojy) = 100-2.
It can also be set to 00 * ABS (Ox-Ozy-nπ) / π. However, n is an appropriate natural number that changes Ox-Ozy-nπ from -π / 2 to π / 2. Similarly, RC
Another example of (Cx, Cjy) is RC (Cx,
Cjy) = 100-100 * ABS (ABS (Cx)-
It may also be ABS (Cjy)) / ABS (Cx).

【0032】続いて整合制御部107では、単純整合部
1301の処理の終了を確認して、線分間の関係の整合
を実施するための信号を関係スコア加算部1302に転
送する。関係スコア加算部1302では、当該信号を受
信して、線分間の関係を用いた整合スコアの計算を実施
する。本実施例では、線分間の関係を記述するために、
図11のような表を用いた。入力パターンの線分関係の
表は、線分記述部104で既に求められているものとす
る。また、辞書パターンの線分関係の表は予め求められ
て、辞書データ記憶部1304に記憶されているものと
する。第j番目の辞書パターン中の線分Fjyについ
て、対向する線分、つまり間に存在する線分数が0であ
る線分の集合をG5jyとし、その要素数をn5jyと
する。これらの集合の要素は図11に例を示した線分ど
うしの関係を示す表から得る。また、同様に入力パター
ンの線分間の関係も既に求められて表として表現されて
いるものとし、その第x番目の入力パターン中の線分E
xについて、対向する線分、つまり間に存在する線分数
が0である線分の集合をG6xとし、その要素数をn6
xとする。同様に、線分Exについて、間に存在する線
分数が1である線分の集合をG7xとし、その要素数を
n7xとする。その時のスコアの修正値R′(Ex、F
jy)は下記の式(8)、式(9)、式(10)を用い
て求める。修正に用いたR(Ei、Fd)は線分スコア
記憶部1305から読みだすものとする。
Then, the matching control unit 107 confirms the end of the processing of the simple matching unit 1301 and transfers a signal for carrying out the matching of the relationship between the line segments to the relationship score adding unit 1302. The relation score adding unit 1302 receives the signal and calculates the matching score using the relation between the line segments. In this embodiment, in order to describe the relationship between line segments,
A table as shown in FIG. 11 was used. It is assumed that the line segment relation table of the input pattern has already been obtained by the line segment description unit 104. Further, it is assumed that the table of the relationship between the line segments of the dictionary pattern is obtained in advance and stored in the dictionary data storage unit 1304. Regarding the line segment Fjy in the j-th dictionary pattern, a set of opposing line segments, that is, a line segment in which the number of line segments existing between them is 0 is set as G5jy, and the number of elements thereof is set as n5jy. The elements of these sets are obtained from the table showing the relationship between the line segments illustrated in FIG. Similarly, it is assumed that the relationship between the line segments of the input pattern has already been obtained and expressed as a table, and the line segment E in the x-th input pattern is
For x, a set of facing line segments, that is, a line segment in which the number of line segments existing between them is 0 is defined as G6x, and the number of elements thereof is n6.
Let x. Similarly, regarding the line segment Ex, a set of line segments having the number of line segments existing between them is 1 is G7x, and the number of elements thereof is n7x. Corrected value of the score at that time R '(Ex, F
jy) is obtained using the following equations (8), (9) and (10). The R (Ei, Fd) used for the correction is read from the line segment score storage unit 1305.

【0033】 R1(Ex、Fjy)=SUM(FdはG5jyに含まれる、 MAX(R(Ei、Fd)、EiはG6xに含まれる))/n5jy (8) ただし、ここでSUM(A,B)は、Aを満たす条件の
下でのBの総和を表わし、MAX(B,A)は、Aを満
たす条件の下でのBの最大値を表わすものとする。
R1 (Ex, Fjy) = SUM (Fd is included in G5jy, MAX (R (Ei, Fd), Ei is included in G6x)) / n5jy (8) where SUM (A, B ) Represents the total sum of B under the condition of satisfying A, and MAX (B, A) represents the maximum value of B under the condition of satisfying A.

【0034】 R2(Ex、Fjy)=SUM(FdはG5jyに含まれる、 MAX(R(Ei、Fd)、EiはG7xに含まれる))/n5jy (9) ただし、ここでSUM(A,B)は、Aを満たす条件の
下でのBの総和を表わし、MAX(B,A)は、Aを満
たす条件の下でのBの最大値を表わすものとする。
R2 (Ex, Fjy) = SUM (Fd is included in G5jy, MAX (R (Ei, Fd), Ei is included in G7x)) / n5jy (9) where SUM (A, B ) Represents the total sum of B under the condition of satisfying A, and MAX (B, A) represents the maximum value of B under the condition of satisfying A.

【0035】 R′(Ex、Fjy)=W4*R1(Ex、Fjy)+W5*R2(Ex、 Fjy) (10) ただし、ここでW4、W5は、加算の時の荷重値を表わ
し、本実施例では、W4を0.5とし、W5を0.3と
したが、これは本質的な問題ではなく、どのような値で
もよい。
R '(Ex, Fjy) = W4 * R1 (Ex, Fjy) + W5 * R2 (Ex, Fjy) (10) Here, W4 and W5 represent load values at the time of addition, and the present embodiment In the example, W4 is set to 0.5 and W5 is set to 0.3, but this is not an essential problem and any value may be used.

【0036】上記の式(8)、式(9)、式(10)を
用いて全てのR′(Ex、Fjy)を求めて得た後に、
下の式(11)に従った計算により、スコアR(Ex、
Fjy)の修正を実施する。
After obtaining and obtaining all R '(Ex, Fjy) using the above equations (8), (9) and (10),
By the calculation according to the following equation (11), the score R (Ex,
Fjy) is modified.

【0037】 R(Ex、Fjy)=W6*R(Ex、Fjy)+R′(Ex、Fjy) (11) ここで、W6は0.5としたが、どのような値でもよ
い。
R (Ex, Fjy) = W6 * R (Ex, Fjy) + R '(Ex, Fjy) (11) Here, W6 is set to 0.5, but may be any value.

【0038】修正した線分スコアR(Ex、Fjy)
は、線分スコア記憶部1305に記憶する。関係スコア
加算部1302の処理を全ての線分の組み合わせについ
て終了した段階で、整合制御部107は、線分スコア加
算部1203に信号を送り、線分スコア加算部1203
は、線分整合部106中の線分スコア記憶部1305か
ら線分スコアを読みだして、特徴点スコア記憶部120
5に記憶された特徴点スコアの修正を実施する。
Corrected line segment score R (Ex, Fjy)
Is stored in the line segment score storage unit 1305. When the processing of the relation score adding unit 1302 is completed for all combinations of line segments, the matching control unit 107 sends a signal to the line segment score adding unit 1203, and the line segment score adding unit 1203.
Reads out the line segment score from the line segment score storage unit 1305 in the line segment matching unit 106, and outputs the feature point score storage unit 120.
The feature point score stored in 5 is corrected.

【0039】辞書データ記憶部1204に記憶された第
j番目の辞書パターン中の特徴点Djyについて、接続
する特徴点の集合をG1jyとし、その要素数である、
特徴点Djyに接続する特徴点の数をn1jyとする。
これらの集合の要素は図10に例を示した特徴点関係を
示す表から得る。さらに、特徴点Djyに接続する線分
を図10の実施例に示した表中の特徴点に接続する線分
リストから得て、F(Djy、Dd)とする。ただし、
Ddは、G1jyの要素であり、F(Djy、Dd)
は、DjyとDdを端点とする線分の番号を表わす。ま
た、同様に入力パターンの特徴点間の関係も既に求めら
れて表として表現されているものとし、その第x番目の
入力パターン中の特徴点Ixについて、接続する特徴点
の集合をG3xとし、その要素数である特徴点Ixに接
続する特徴点の数をn3xとする。その時に特徴点Ix
に接続する線分を図10の実施例に示した表中の特徴点
に接続する線分リストから得て、E(Ix、Ii)とす
る。ただし、Iiは、G3xの要素であり、E(Ix、
Ii)は、IxとIiを端点とする線分の番号を表わ
す。
Regarding the feature point Djy in the jth dictionary pattern stored in the dictionary data storage unit 1204, a set of feature points to be connected is G1jy, which is the number of elements.
The number of feature points connected to the feature point Djy is n1jy.
The elements of these sets are obtained from the table showing the feature point relationships illustrated in FIG. Further, the line segment connected to the feature point Djy is obtained from the line segment list connected to the feature point in the table shown in the embodiment of FIG. 10 and is set to F (Djy, Dd). However,
Dd is an element of G1jy, and F (Djy, Dd)
Represents the number of a line segment whose endpoints are Djy and Dd. Similarly, it is assumed that the relationship between the feature points of the input pattern has already been obtained and expressed as a table, and for the feature point Ix in the x-th input pattern, a set of feature points to be connected is G3x, The number of feature points connected to the feature point Ix, which is the number of elements, is n3x. At that time, the feature point Ix
The line segment connected to is obtained from the line segment list connected to the feature points in the table shown in the embodiment of FIG. 10 and is designated as E (Ix, Ii). However, Ii is an element of G3x, and E (Ix,
Ii) represents the number of a line segment whose endpoints are Ix and Ii.

【0040】線分スコア加算部1203において特徴点
スコア記憶部1205中のスコアS(Ix、Djy)の
修正は下記の式(12)、式(13)に従った計算によ
り実行する。
Correction of the score S (Ix, Djy) in the feature point score storage unit 1205 in the line segment score addition unit 1203 is executed by calculation according to the following formulas (12) and (13).

【0041】 S4(Ix、Djy)=SUM(DdはG1jyに含まれる、 MAX(R(E(Ix、Ii)、F(Djy、Dd))、 IiはG3xに含まれる))/nijy (12) ただし、ここでSUM(A,B)は、Aを満たす条件の
下でのBの総和を表わし、MAX(B,A)は、Aを満
たす条件の下でのBの最大値を表わすものとする。 S(Ix、Djy)=W7*S(Ix、Djy)+W8*S4(Ix、Djy) (13) ただし、ここでW7とW8はそれぞれ0.5としたが、
どのような値でもよい。
S4 (Ix, Djy) = SUM (Dd is included in G1jy, MAX (R (E (Ix, Ii), F (Djy, Dd)), Ii is included in G3x)) / nijy (12 ) Where SUM (A, B) represents the total sum of B under the condition of satisfying A, and MAX (B, A) represents the maximum value of B under the condition of satisfying A. And S (Ix, Djy) = W7 * S (Ix, Djy) + W8 * S4 (Ix, Djy) (13) Here, W7 and W8 are 0.5 respectively,
Any value will do.

【0042】線分スコア加算部1203は、特徴点スコ
ア記憶部1205に記憶したすべての(Ix、Djy)
の組みについて、上記式(13)に基づいた値の修正処
理を実施した後に、整合制御部107は、線分整合部1
06中の特徴点スコア加算部1303に信号を送り、線
分スコアの修正処理を実施する。
The line segment score addition unit 1203 stores all (Ix, Djy) stored in the feature point score storage unit 1205.
After performing the correction processing of the value based on the above equation (13), the matching control unit 107 sets the line segment matching unit 1
A signal is sent to the feature point score addition unit 1303 in 06 to execute the correction processing of the line segment score.

【0043】線分スコア記憶部1305に記憶された第
j番目の辞書パターン中の線分Fjyについて、当該線
分の両端点の特徴点番号をG1jyとG2jyとする。
これらの集合の要素は図11に例を示した表から、線分
の端点番号を得て求める。また、同様に入力パターンの
線分間の関係も既に求められて表として表現されている
ものとし、その第x番目の入力パターン中の線分Exに
ついて、当該線分の両端点の特徴点番号をI1xとI2
xとする。その時に線分スコア記憶部1305に記憶さ
れたスコアR(Ex、Fjy)の修正は下記の式(1
4)、式(15)に従った計算により実行する。
For the line segment Fjy in the jth dictionary pattern stored in the line segment score storage unit 1305, the characteristic point numbers of the end points of the line segment are G1jy and G2jy.
The elements of these sets are obtained by obtaining the end point numbers of the line segment from the table shown in FIG. Similarly, it is assumed that the relationship between the line segments of the input pattern has already been obtained and expressed as a table, and for the line segment Ex in the x-th input pattern, the feature point numbers of the end points of the line segment are set. I1x and I2
Let x. At that time, the correction of the score R (Ex, Fjy) stored in the line segment score storage unit 1305 is performed by the following equation (1)
4), the calculation is performed according to the equation (15).

【0044】 R4(Ex、Fjy)= (S(I1x、D1jy)+S(I2x、D2jy ))/2 (14) R5(Ex、Fjy)= (S(I1x、D2jy)+S(I2x、D1jy ))/2 (15) R6(Ex、Fjy)= MAX2(R4(Ex、Fjy)、R5(Ex、F jy)) (16) ただし、ここでMAX2(A,B)は、AとBのうちの
大きい方の値を表わすものとする。
R4 (Ex, Fjy) = (S (I1x, D1jy) + S (I2x, D2jy)) / 2 (14) R5 (Ex, Fjy) = (S (I1x, D2jy) + S (I2x, D1jy)) / 2 (15) R6 (Ex, Fjy) = MAX2 (R4 (Ex, Fjy), R5 (Ex, Fjy)) (16) where MAX2 (A, B) is one of A and B. The larger value shall be represented.

【0045】 R(Ex、Fjy)=W9*R(Ex、Fjy)+W10*R6(Ex、Fj y) (17) ただし、ここでW9とW10はそれぞれ0.5とした
が、どのような値でもよい。
R (Ex, Fjy) = W9 * R (Ex, Fjy) + W10 * R6 (Ex, Fj y) (17) Here, W9 and W10 are 0.5 respectively, but what value But it's okay.

【0046】線分スコア記憶部1305に記憶された全
てのEx、Fjyの組みについて、上記の処理を終了
し、得られたスコアを線分スコア記憶部1305に格納
した後に、整合制御部107は、特徴点スコア記憶部1
205から特徴点スコアS(Ix、Djy)を読みだ
す。
After the above processing is completed for all combinations of Ex and Fjy stored in the line segment score storage unit 1305 and the obtained scores are stored in the line segment score storage unit 1305, the matching control unit 107 , Feature point score storage unit 1
The feature point score S (Ix, Djy) is read from 205.

【0047】まず、S(Ix、Djy)の中での最大値
を求める。その時のIx、Djyを用いて、S(Ix、
Dd)の値を0に置換する。ここで、DdはDjy以外
の辞書パターンの特徴点番号を指す。また、S(Ii、
Djy)の値を0に置換する。ここで、IiはIx以外
の全ての入力パターンの特徴点番号を指す。この修正の
後にS(Ix、Djy)の中での最大値を求め、S(I
x、Dd)とS(Ii、Djy)の修正を実行する。こ
の処理を入力パターンの特徴点数と辞書パターンの特徴
点数のうちの少ない数の回数だけくり返し実行し、S
(Ix、Djy)の修正を実施する。この修正処理の終
了後に、S(Ix、Djy)に含まれる要素値の総和を
求め、Sとする。
First, the maximum value in S (Ix, Djy) is obtained. Using Ix and Djy at that time, S (Ix,
Replace the value of Dd) with 0. Here, Dd indicates a feature point number of a dictionary pattern other than Djy. In addition, S (Ii,
Replace the value of Djy) with 0. Here, Ii indicates the feature point numbers of all input patterns other than Ix. After this correction, the maximum value in S (Ix, Djy) is calculated and S (I
x, Dd) and S (Ii, Djy) are modified. This process is repeatedly executed a small number of times out of the number of feature points of the input pattern and the number of feature points of the dictionary pattern, and S
Correct (Ix, Djy). After the completion of this correction process, the sum of the element values included in S (Ix, Djy) is obtained and is set to S.

【0048】続いて、整合制御部107は線分スコアR
(Ex、Fjy)を線分整合部106中の線分スコア記
憶部1305から読みだす。まず、整合制御部107
は、R(Ex、Fjy)の最大値を求める。その時のE
x、Fjyを用いて、R(Ex、Fd)の値を0に置換
する。ここで、FdはFjy以外の辞書パターンの線分
番号を指す。また、R(Ei、Fjy)の値を0に置換
する。ここで、EiはEx以外の全ての入力パターンの
線分番号を指す。この修正の後にR(Ex、Fjy)の
中での最大値を求め、R(Ex、Fd)とR(Ei、F
jy)の修正を実行する。この処理を入力パターンの線
分数と辞書パターンの線分数のうちの少ない数の回数だ
けくり返し実行し、R(Ex、Fjy)の修正を実施す
る。この修正処理の終了後に、R(Ex、Fjy)に含
まれる要素値の総和を求め、Rとする。最終的に整合制
御部107は、S+Rを計算して求め、入力パターンと
第j番目の辞書データとの整合スコアとする。整合制御
部107は、全ての辞書データと入力パターンとの整合
を実行し、最大のスコアを得た辞書データのカテゴリ名
を端子108から出力する。本実施例では、SとRの両
方の値を用いて最終的な整合結果としたが、Sのみを用
いて、その最大値を与える辞書データのカテゴリ名を端
子108から出力してもよい。また、Rのみを用いて、
その最大値を与える辞書データのカテゴリ名を端子10
8から出力してもよい。
Subsequently, the matching control unit 107 determines the line segment score R
(Ex, Fjy) is read from the line segment score storage unit 1305 in the line segment matching unit 106. First, the matching control unit 107
Calculates the maximum value of R (Ex, Fjy). E at that time
The value of R (Ex, Fd) is replaced with 0 using x and Fjy. Here, Fd indicates a line segment number of a dictionary pattern other than Fjy. Further, the value of R (Ei, Fjy) is replaced with 0. Here, Ei indicates the line segment numbers of all input patterns other than Ex. After this correction, the maximum value among R (Ex, Fjy) is calculated, and R (Ex, Fd) and R (Ei, F
jy) correction. This process is repeatedly executed a small number of times of the number of line segments of the input pattern and the number of line segments of the dictionary pattern to correct R (Ex, Fjy). After the completion of this correction process, the total sum of the element values included in R (Ex, Fjy) is calculated and set as R. Finally, the matching control unit 107 calculates and obtains S + R to obtain the matching score between the input pattern and the j-th dictionary data. The matching control unit 107 executes matching of all the dictionary data with the input pattern, and outputs the category name of the dictionary data having the maximum score from the terminal 108. In the present embodiment, the final matching result is obtained by using both the values of S and R, but the category name of the dictionary data giving the maximum value may be output from the terminal 108 by using only S. Also, using only R,
The terminal name is the dictionary data category name that gives the maximum value.
You may output from 8.

【0049】次に図1と図14と図15を用いて本発明
の別の実施例の説明をする。
Next, another embodiment of the present invention will be described with reference to FIGS. 1, 14, and 15.

【0050】スキャナなどの画像入力部101から入力
された線図形画像は雑音除去や2値化処理などの前処理
を施した後に、2値の線図形画像として得られ、特徴点
検出部102へ転送される。
The line graphic image input from the image input unit 101 such as a scanner is obtained as a binary line graphic image after preprocessing such as noise removal and binarization processing, and is sent to the feature point detection unit 102. Transferred.

【0051】特徴点検出部102では、線図形の特徴点
を検出する。その詳細な説明は、第1の実施例の説明と
同一であるので、省略する。
The feature point detection unit 102 detects the feature points of the line figure. The detailed description thereof is the same as the description of the first embodiment, and will be omitted.

【0052】特徴点検出部102で検出された特徴点の
集合と線分の集合は特徴点記述部103と線分記述部1
04に転送される。特徴点記述部103では、検出され
た特徴点、各々の特徴量と、特徴点どうしの関係の特徴
量を求める。線分記述部104では、入力された特徴点
のリストと線分のリストから、線分自身との特徴量と、
線分間の関係を求める。当該特徴点記述部103と線分
記述部104の詳細な説明も、第1の発明の実施例の説
明と同一であるので、ここでは省略する。
The set of feature points and the set of line segments detected by the feature point detection unit 102 are the feature point description unit 103 and the line segment description unit 1.
04. The feature point description unit 103 obtains the detected feature points, the respective feature amounts, and the feature amount of the relationship between the feature points. In the line segment description unit 104, the feature amount of the line segment itself is calculated from the input feature point list and the line segment list,
Find the relationship between line segments. The detailed description of the feature point description unit 103 and the line segment description unit 104 is also the same as the description of the first embodiment of the first invention, and therefore will be omitted here.

【0053】次に、特徴点整合部105と線分整合部1
06と整合制御部107の実施例の説明を図14と図1
5を用いて行う。特徴点整合部105では、複数のカテ
ゴリの特徴点辞書データが、図14の辞書データ記憶部
1204に記憶されているものとする。特定のカテゴリ
の特定のパターンの特徴点辞書データを選択して、特徴
点記述部103中のデータとの整合を実行する。辞書デ
ータ記憶部1204中に記憶されている特徴点辞書デー
タは、特徴点記述部103で生成された特徴点のデータ
と同様に、辞書データのための特徴点のタイプと座標と
した。さらに、特徴点整合部105の辞書データ記憶部
1204中では、それぞれの特徴点の重要度を表わす荷
重値が合わせて記憶されているものとする。特徴点整合
部105では、特徴点記述部103で記述する特徴の種
類を変更する場合には、同じ特徴を用いるように変更す
る必要がある。
Next, the feature point matching unit 105 and the line segment matching unit 1
06 and the embodiment of the matching control unit 107 will be described with reference to FIGS.
5 is performed. It is assumed that the feature point matching unit 105 stores the feature point dictionary data of a plurality of categories in the dictionary data storage unit 1204 of FIG. The feature point dictionary data of a particular pattern in a particular category is selected, and matching with the data in the feature point description unit 103 is executed. The feature point dictionary data stored in the dictionary data storage unit 1204 is the same as the feature point data generated by the feature point description unit 103, and is the feature point type and coordinates for the dictionary data. Furthermore, it is assumed that the dictionary data storage unit 1204 of the feature point matching unit 105 also stores the weight value representing the importance of each feature point. In the feature point matching unit 105, when changing the type of feature described in the feature point description unit 103, it is necessary to change so that the same feature is used.

【0054】特徴点整合部105と同様に、線分整合部
106では、複数のカテゴリの線分辞書データが図15
の辞書データ記憶部1304に記憶されているものとす
る。特定のカテゴリの特定のパターンの線分辞書データ
を選択して、線分記述部104中のデータとの整合を実
行する。辞書データ記憶部1304中に記憶されている
線分辞書データは、線分記述部104で生成された線分
のデータと同様に、線分の長さ、線分方向、線分の累積
曲率、および線分のタイプが記憶されている。さらに、
辞書データ記憶部1304中では、それぞれのそれぞれ
の線分の重要度を表わす荷重値が合わせて記憶されてい
るものとする。線分整合部106では、線分記述部10
4で記述する特徴の種類を変更する場合には、辞書デー
タも同じ特徴を用いるように変更する必要がある。
Similar to the feature point matching unit 105, the line segment matching unit 106 stores the line segment dictionary data of a plurality of categories as shown in FIG.
It is assumed that the dictionary data is stored in the dictionary data storage unit 1304. The line segment dictionary data of a specific pattern in a specific category is selected to execute matching with the data in the line segment description unit 104. The line segment dictionary data stored in the dictionary data storage unit 1304 is similar to the line segment data generated by the line segment description unit 104, and the length of the line segment, the direction of the line segment, the cumulative curvature of the line segment, And the line segment type are stored. further,
It is assumed that the dictionary data storage unit 1304 also stores a weight value indicating the importance of each line segment. In the line segment matching unit 106, the line segment description unit 10
When the type of the feature described in 4 is changed, it is necessary to change the dictionary data so that the same feature is used.

【0055】特徴点整合部105中の単純整合部120
1では、入力パターンの全ての特徴点と、選択された辞
書パターン中の全ての特徴点との整合スコアを計算す
る。詳細な説明は、図12の単純整合部1201のもの
と同一であるので、ここでは省略する。生成された整合
スコアは、特徴点スコア記憶部1205に記憶される。
全ての特徴点の組み合わせに対して整合スコアを求めた
後に、整合制御部108は信号を関係スコア加算部12
02に送信し、起動する。特徴点整合部105中の関係
スコア加算部1202では、特徴点どうしの関係を用い
て特徴点スコアの修正を実施する。実施例は、図12の
関係スコア加算部1202のものと同一であるので、こ
こでは省略する。
Simple matching section 120 in feature point matching section 105
In 1, the matching score of all the feature points of the input pattern and all the feature points in the selected dictionary pattern is calculated. The detailed description is the same as that of the simple matching unit 1201 in FIG. 12, and thus will be omitted here. The generated matching score is stored in the feature point score storage unit 1205.
After obtaining the matching score for all combinations of feature points, the matching control unit 108 outputs the signal to the relation score adding unit 12
02 to activate. The relationship score adding unit 1202 in the feature point matching unit 105 corrects the feature point score using the relationship between the feature points. The embodiment is the same as that of the relationship score adding unit 1202 of FIG. 12, and thus will be omitted here.

【0056】関係スコア加算部1202の処理が終了し
た後に、整合制御部108は、線分整合部106中の単
純整合部1301を起動する。特徴点整合部105と同
様に、線分整合部106では、複数のカテゴリの線分辞
書データが図15の辞書データ記憶部1304に記憶さ
れているものとする。特定のカテゴリの特定のパターン
の線分辞書データを選択して、線分記述部104中のデ
ータとの整合を実行する。単純整合部1301の実施例
の説明は、図13の実施例の説明と同様であるので、こ
こでは省略する。全ての線分の組み合わせについて、整
合スコアを求めて、線分スコア記憶部1305に格納し
た後に、整合制御部108は信号を関係スコア加算部1
302に送信し、起動する。線分整合部106中の関係
スコア加算部1302では、線分どうしの関係を用いて
線分スコアの修正を実施する。実施例は、図13の関係
スコア加算部1302のものと同一であるので、ここで
は省略する。修正した線分スコアを、線分スコア記憶部
1305に記憶する。
After the processing of the relation score adding unit 1202 is completed, the matching control unit 108 activates the simple matching unit 1301 in the line segment matching unit 106. Similar to the feature point matching unit 105, the line segment matching unit 106 is assumed to store the line segment dictionary data of a plurality of categories in the dictionary data storage unit 1304 of FIG. The line segment dictionary data of a specific pattern in a specific category is selected to execute matching with the data in the line segment description unit 104. The description of the embodiment of the simple matching unit 1301 is the same as that of the embodiment of FIG. After obtaining matching scores for all combinations of line segments and storing them in the line segment score storage unit 1305, the matching control unit 108 outputs signals to the relationship score addition unit 1
It transmits to 302 and starts. The relationship score adding unit 1302 in the line segment matching unit 106 corrects the line segment score using the relationship between the line segments. The embodiment is the same as that of the relation score adding unit 1302 in FIG. 13, and therefore will be omitted here. The corrected line segment score is stored in the line segment score storage unit 1305.

【0057】関係スコア加算部1302の処理を全ての
線分の組み合わせについて終了した段階で、整合制御部
107は、線分スコア加算部1203に信号を送り、線
分スコア加算部1203は、線分整合部106中の線分
スコア記憶部1305から線分スコアを読みだして、特
徴点スコア記憶部1205に記憶された特徴点スコアの
修正を実施する。この実施例は図12の線分スコア加算
部1203の実施例と同一であるので、説明を省略す
る。線分スコア加算部1203は、特徴点スコア記憶部
1205に記憶したすべての特徴点の組みについて、ス
コアの修正処理を実施した後に、整合制御部107は、
線分整合部106中の特徴点スコア加算部1303に信
号を送り、線分スコアの修正処理を実施する。当該特徴
点スコア加算部1303の実施例は、図13の特徴点ス
コア加算部1303の実施例と同一であるであるので、
ここでは説明を省略する。
When the processing of the relation score adding unit 1302 is completed for all combinations of line segments, the matching control unit 107 sends a signal to the line segment score adding unit 1203, and the line segment score adding unit 1203 The line segment score is read from the line segment score storage unit 1305 in the matching unit 106, and the feature point score stored in the feature point score storage unit 1205 is corrected. Since this embodiment is the same as the embodiment of the line segment score adding unit 1203 in FIG. 12, description thereof will be omitted. The line segment score addition unit 1203 performs the score correction processing on all the feature point combinations stored in the feature point score storage unit 1205, and then the matching control unit 107
A signal is sent to the feature point score addition unit 1303 in the line segment matching unit 106 to perform the line segment score correction processing. Since the embodiment of the feature point score adder 1303 is the same as the embodiment of the feature point score adder 1303 of FIG. 13,
Here, the description is omitted.

【0058】特徴点スコア加算部1303の処理が終了
した段階で、整合制御部107はスコア変更部1406
に信号を送り、起動する。スコア変更部1406は、特
徴点スコア記憶部1205から特徴点スコアS(Ix、
Djy)を順次読みだす。
When the processing of the feature point score adding unit 1303 is completed, the matching control unit 107 causes the score changing unit 1406.
To send a signal to start. The score changing unit 1406 uses the feature point score storage unit 1205 to extract the feature point score S (Ix,
Dji) is read sequentially.

【0059】S(Ix、Djy)を対象とする時に、S
(Ix、Dd)との値の比較を式(18)に従って行
う。ここで、DdはDjy以外の辞書パターンの特徴点
番号を指す。S(Ii、Djy)との値の比較を式(1
9)に従って行う。ここで、IiはIx以外の全ての入
力パターンの特徴点番号を指す。
When S (Ix, Djy) is targeted, S
The value comparison with (Ix, Dd) is performed according to equation (18). Here, Dd indicates a feature point number of a dictionary pattern other than Djy. The value of S (Ii, Djy) is compared with the expression (1
Follow 9). Here, Ii indicates the feature point numbers of all input patterns other than Ix.

【0060】 S(Ix、Djy)−S(Ix、Dd)>K、 (18) DdはDjy以外の全ての辞書パターンの特徴点番号 S(Ix、Djy)−S(Ii、Djy)>K、 (19) IiはIx以外の全ての入力パターンの特徴点番号 ここで、本実施例では、Kの値を20としたが、この値
はどのようなものでもよい。上記の式(18)と式(1
9)を満たすS(Ix、Djy)の場合には、S(I
x、Djy)にK′を加えて値を修正する。本実施例で
は、K′の値を20としたが、この値はどのようなもの
でもよい。また本実施例では、修正後のS(Ix、Dj
y)が100を越える場合には、S(Ix、Djy)の
値を100とした。次に、S(Ix、Dd)とS(I
i、Djy)の修正を実行する。本実施例では、修正に
はS(Ix、Dd)の値から、K″を引く。また、S
(Ii、Djy)の値から、K″を引く。本実施例で
は、K″の値を30としたが、この値はどのようなもの
でもよい。また本実施例では、修正後のS(Ix、D
d)またはS(Ii、Djy)の値が0より小さくなる
場合には、その値を0とした。この処理を式(18)と
式(19)を満たす全てのS(Ix、Djy)に対して
くり返し実行する。当該スコア変更部1406の処理の
終了後に、整合制御部107は、信号をスコア変更部1
506に送信し、起動する。
S (Ix, Djy) -S (Ix, Dd)> K, (18) Dd is a feature point number of all dictionary patterns other than Djy S (Ix, Djy) -S (Ii, Djy)> K (19) Ii is a feature point number of all input patterns other than Ix Here, in the present embodiment, the value of K is set to 20, but this value may be any value. The above equation (18) and equation (1
If S (Ix, Djy) that satisfies 9), then S (I
Correct the value by adding K'to (x, Djy). In the present embodiment, the value of K'is set to 20, but this value may be any value. Further, in this embodiment, the corrected S (Ix, Dj
When y) exceeds 100, the value of S (Ix, Djy) is set to 100. Next, S (Ix, Dd) and S (I
i, Djy) correction. In the present embodiment, K ″ is subtracted from the value of S (Ix, Dd) for correction.
K ″ is subtracted from the value of (Ii, Djy). In the present embodiment, the value of K ″ is set to 30, but this value may be any value. In this embodiment, the corrected S (Ix, D
When the value of d) or S (Ii, Djy) is smaller than 0, the value is set to 0. This process is repeatedly executed for all S (Ix, Djy) that satisfy equations (18) and (19). After the processing of the score changing unit 1406 is completed, the matching control unit 107 outputs the signal to the score changing unit 1406.
Send to 506 and start.

【0061】スコア変更部1506は、線分スコア記憶
部1305から線分スコアR(Ex、Fjy)を順次読
みだす。R(Ex、Fd)とR(Ei、Fjy)R(E
x、Fjy)を対象とする時に、R(Ex、Fd)との
値の比較を式(20)に従って行う。ここで、FdはF
jy以外の辞書パターンの線分番号を指す。R(Ei、
Fjy)との値の比較を式(21)に従って行う。ここ
で、EiはEx以外の全ての入力パターンの線分番号を
指す。
The score changing unit 1506 sequentially reads the line segment scores R (Ex, Fjy) from the line segment score storage unit 1305. R (Ex, Fd) and R (Ei, Fjy) R (E
When x, Fjy) is a target, the value is compared with R (Ex, Fd) according to equation (20). Where Fd is F
It refers to the line segment number of a dictionary pattern other than jy. R (Ei,
Fji) is compared with the value according to equation (21). Here, Ei indicates the line segment numbers of all input patterns other than Ex.

【0062】 R(Ex、Fjy)−R(Ex、Fd)>K、 (20) FdはFjy以外の全ての辞書パターンの線分番号 R(Ex、Fjy)−R(Ei、Fjy)>K、 (21) EiはEx以外の全ての入力パターンの線分番号 ここで、本実施例では、Kの値を20としたが、この値
はどのようなものでもよい。上記の式(20)と式(2
1)を満たすR(Ex、Fjy)の場合には、R(E
x、Fjy)にK′を加えて値を修正する。本実施例で
は、K′の値を20としたが、この値はどのようなもの
でもよい。また本実施例では、修正後のR(Ex、Fj
y)が100を越える場合には、R(Ex、Fjy)の
値を100とした。次に、R(Ex、Fd)とR(E
i、Fjy)の修正を実行する。本実施例では、修正に
はR(Ex、Fd)の値から、K″を引く。また、R
(Ei、Fjy)の値から、K″を引く。本実施例で
は、K″の値を30としたが、この値はどのようなもの
でもよい。また本実施例では、修正後のR(Ex、F
d)またはR(Ei、Fjy)の値が0より小さくなる
場合には、その値を0とした。この処理を式(20)と
式(21)を満たす全てのR(Ex、Fjy)に対して
くり返し実行する。
R (Ex, Fjy) -R (Ex, Fd)> K, (20) Fd is the line segment number of all dictionary patterns other than Fjy R (Ex, Fjy) -R (Ei, Fjy)> K (21) Ei is the line segment number of all input patterns other than Ex Here, in the present embodiment, the value of K is set to 20, but this value may be any value. The above equation (20) and equation (2
In the case of R (Ex, Fjy) satisfying 1), R (E
x, Fjy) is added to K'to correct the value. In the present embodiment, the value of K'is set to 20, but this value may be any value. In the present embodiment, the corrected R (Ex, Fj
When y) exceeds 100, the value of R (Ex, Fjy) is set to 100. Next, R (Ex, Fd) and R (E
i, Fjy) correction. In the present embodiment, K ″ is subtracted from the value of R (Ex, Fd) for correction.
K ″ is subtracted from the value of (Ei, Fjy). In the present embodiment, the value of K ″ is 30, but this value may be any value. Further, in this embodiment, the corrected R (Ex, F
When the value of d) or R (Ei, Fjy) is smaller than 0, the value is set to 0. This process is repeatedly executed for all R (Ex, Fjy) satisfying the expressions (20) and (21).

【0063】当該スコア変更部1506の処理の終了後
に、整合制御部107は、特徴点整合部105中の関係
スコア加算部1202と線分整合部106中の関係スコ
ア加算部1302を作動させる。整合制御部107は、
続いて、特徴点整合部105中の線分スコア加算部12
03と線分整合部106中の特徴点スコア加算部130
3を作動させる。さらに整合制御部107は、特徴点整
合部105中のスコア変更部1406と線分整合部10
6中のスコア変更部1506を作動させる。この1連の
動作を一定回数繰り返す。本実施例では、くり返し回数
を3回としたが、どのような回数でもよい。また、くり
返し回数が3回に満たなくても、入力パターンの特徴点
と辞書パターンの特徴点が1対1に対応することが検出
された場合、または入力パターンの線分と辞書パターン
の線分が1対1に対応することが検出された場合には、
くり返しを中断し、最終的なスコア計算処理を実行す
る。
After the processing of the score changing unit 1506 is finished, the matching control unit 107 operates the relation score adding unit 1202 in the feature point matching unit 105 and the relation score adding unit 1302 in the line segment matching unit 106. The matching control unit 107
Then, the line segment score addition unit 12 in the feature point matching unit 105.
03 and the feature point score adding unit 130 in the line segment matching unit 106.
Activate 3. Further, the matching control unit 107 includes the score changing unit 1406 and the line segment matching unit 10 in the feature point matching unit 105.
The score changing unit 1506 in 6 is operated. This series of operations is repeated a fixed number of times. In the present embodiment, the number of repetitions is three, but any number may be used. Even when the number of repetitions is less than 3, when it is detected that the feature points of the input pattern and the feature points of the dictionary pattern have a one-to-one correspondence, or the line segment of the input pattern and the line segment of the dictionary pattern If is detected to have a one-to-one correspondence,
The repetition is interrupted and the final score calculation process is executed.

【0064】整合制御部107は、特徴点スコア記憶部
1205から特徴点スコアS(Ix、Djy)を読みだ
す。まず、S(Ix、Djy)の中での最大値を求め
る。その時のIx、Djyを用いて、S(Ix、Dd)
の値を0に置換する。ここで、DdはDjy以外の辞書
パターンの特徴点番号を指す。また、S(Ii、Dj
y)の値を0に置換する。ここで、IiはIx以外の全
ての入力パターンの特徴点番号を指す。この修正の後に
S(Ix、Djy)の中での最大値を求め、S(Ix、
Dd)とS(Ii、Djy)の修正を実行する。この処
理を入力パターンの特徴点数と辞書パターンの特徴点数
のうちの少ない数の回数だけくり返し実行し、S(I
x、Djy)の修正を実施する。この修正処理の終了後
に、S(Ix、Djy)に含まれる要素値の総和を求
め、Sとする。
The matching control unit 107 reads the feature point score S (Ix, Djy) from the feature point score storage unit 1205. First, the maximum value in S (Ix, Djy) is obtained. Using Ix and Djy at that time, S (Ix, Dd)
Replace the value of with 0. Here, Dd indicates a feature point number of a dictionary pattern other than Djy. In addition, S (Ii, Dj
Replace the value in y) with 0. Here, Ii indicates the feature point numbers of all input patterns other than Ix. After this correction, the maximum value in S (Ix, Djy) is calculated, and S (Ix, Djy)
Modify Dd) and S (Ii, Djy). This processing is repeatedly executed a small number of times of the number of characteristic points of the input pattern and the number of characteristic points of the dictionary pattern, and S (I
x, Djy) is corrected. After the completion of this correction process, the sum of the element values included in S (Ix, Djy) is obtained and is set to S.

【0065】続いて、整合制御部107は線分スコアR
(Ex、Fjy)を線分整合部106中の線分スコア記
憶部1305から読みだす。まず、整合制御部107
は、R(Ex、Fjy)の最大値を求める。その時のE
x、Fjyを用いて、R(Ex、Fd)の値を0に置換
する。ここで、FdはFjy以外の辞書パターンの線分
番号を指す。また、R(Ei、Fjy)の値を0に置換
する。ここで、EiはEx以外の全ての入力パターンの
線分番号を指す。この修正の後にR(Ex、Fjy)の
中での最大値を求め、R(Ex、Fd)とR(Ei、F
jy)の修正を実行する。この処理を入力パターンの線
分数と辞書パターンの線分数のうちの少ない数の回数だ
けくり返し実行し、R(Ex、Fjy)の修正を実施す
る。この修正処理の終了後に、R(Ex、Fjy)に含
まれる要素値の総和を求め、Rとする。最終的に整合制
御部107は、S+Rを計算して求め、入力パターンと
第j番目の辞書データとの整合スコアとする。整合制御
部107は、全ての辞書データと入力パターンとの整合
を実行し、最大のスコアを得た辞書データのカテゴリ名
を端子108から出力する。本実施例では、SとRの両
方の値を用いて最終的な整合結果としたが、Sのみを用
いて、その最大値を与える辞書データのカテゴリ名を端
子108から出力してもよい。また、Rのみを用いて、
その最大値を与える辞書データのカテゴリ名を端子10
8から出力してもよい。
Then, the matching control unit 107 determines the line segment score R
(Ex, Fjy) is read from the line segment score storage unit 1305 in the line segment matching unit 106. First, the matching control unit 107
Calculates the maximum value of R (Ex, Fjy). E at that time
The value of R (Ex, Fd) is replaced with 0 using x and Fjy. Here, Fd indicates a line segment number of a dictionary pattern other than Fjy. Further, the value of R (Ei, Fjy) is replaced with 0. Here, Ei indicates the line segment numbers of all input patterns other than Ex. After this correction, the maximum value among R (Ex, Fjy) is calculated, and R (Ex, Fd) and R (Ei, F
jy) correction. This process is repeatedly executed a small number of times of the number of line segments of the input pattern and the number of line segments of the dictionary pattern to correct R (Ex, Fjy). After the completion of this correction process, the total sum of the element values included in R (Ex, Fjy) is calculated and set as R. Finally, the matching control unit 107 calculates and obtains S + R to obtain the matching score between the input pattern and the j-th dictionary data. The matching control unit 107 executes matching of all the dictionary data with the input pattern, and outputs the category name of the dictionary data having the maximum score from the terminal 108. In the present embodiment, the final matching result is obtained by using both the values of S and R, but the category name of the dictionary data giving the maximum value may be output from the terminal 108 by using only S. Also, using only R,
The terminal name is the dictionary data category name that gives the maximum value.
You may output from 8.

【0066】次に図3を用いて本発明の別の実施例を説
明する。図3の実施例では、図1の実施例とオンライン
入力部301と特徴検出部302のみが異なり、特徴点
記述部103、線分記述部104、特徴点整合部10
5、線分整合部106、整合制御部107の動作は、図
1の実施例と同一であるので、説明は省略する。
Next, another embodiment of the present invention will be described with reference to FIG. The embodiment of FIG. 3 is different from the embodiment of FIG. 1 only in the online input unit 301 and the feature detection unit 302, and the feature point description unit 103, the line segment description unit 104, and the feature point matching unit 10 are different.
The operations of the line matching unit 106, the line segment matching unit 106, and the matching control unit 107 are the same as those in the embodiment of FIG.

【0067】オンラインデータ入力部301では、タブ
レットなどの時系列で指定した座標データの系列が入力
できる入力デバイスによってサンプリングされたストロ
ークパターンを特徴点検出部302へ転送する。特徴点
検出部302の実施例は、ストロークパターンから、端
点、交点、屈曲点などの特徴点を検出できるものならば
どのようなものでもよいが、本実施例では、まず、スト
ロークパターンを一定画素毎に区切って、線分データの
集合とする。本実施例では、3画素単位に区切って線分
データとしたが、これは本質的な問題ではなく、何画素
毎でもよい。ストロークの端にある点は端点であり、求
めることができる。交点を求めるためには、全ての線分
の組み合わせで交わるか、交わらないかの判定をしても
よいが、本実施例では、予め全ての画素値が0であるよ
うな画像パターンを用意し、線分集合に順番に1から番
号をつける。第1番目の線分から順に、線分の1つの端
点から他の端点に向けて、画像パターン中に線分を描
く。その際の通過する画素の値を、その線分の番号とす
る。ただし、線分を描く時に、対象画素の値が既に0で
ない場合には、当該線分は、その画素の値を番号とする
線分と交わることが検出される。検出された点を交点と
して、その座標を記憶する。また特徴点として屈曲点を
採用する場合には、特徴点で区切られたストロークパタ
ーンの第1番目の線分から最終線分まで、順に方向変化
を累積して、一定しきい値を越える場合に、そのストロ
ークパターンを2分して、分割点を屈曲点とする。方向
変化累積値として、初期的にD=0とする。第1番目の
線分と第2番目の線分の方向変化は、それぞれの線分の
方向を示すベクトル(Di1,Dj1)と(Di2,D
j2)を用いて、式(22)に従った計算により方向変
化を求め累積する。
The online data input unit 301 transfers a stroke pattern sampled by an input device such as a tablet that can input a series of coordinate data designated in time series to the feature point detection unit 302. The feature point detection unit 302 may be of any type as long as it can detect feature points such as end points, intersections, and bending points from the stroke pattern. Divide each into a set of line segment data. In this embodiment, the line segment data is divided into units of 3 pixels, but this is not an essential problem and any number of pixels may be used. The points at the ends of the stroke are the endpoints and can be determined. In order to obtain the intersections, it may be determined whether or not they intersect in all combinations of line segments, but in the present embodiment, an image pattern in which all pixel values are 0 is prepared in advance. , Line segment sets are numbered from 1 in order. Line segments are drawn in the image pattern from one end point of the line segment to the other end point in order from the first line segment. The value of the passing pixel at that time is taken as the line segment number. However, when drawing the line segment, if the value of the target pixel is not already 0, it is detected that the line segment intersects with the line segment whose number is the value of the pixel. The detected point is set as an intersection, and its coordinates are stored. When a bending point is adopted as the feature point, the direction changes are sequentially accumulated from the first line segment to the last line segment of the stroke pattern delimited by the feature point, and when a certain threshold is exceeded, The stroke pattern is divided into two, and the division points are set as bending points. As a cumulative value of direction change, D = 0 is initially set. The changes in the directions of the first line segment and the second line segment are expressed by vectors (Di1, Dj1) and (Di2, D) indicating the directions of the respective line segments.
j2) is used to calculate the direction change by the calculation according to the equation (22), and the change is accumulated.

【0068】 D=D+ArcCOS(Dik*Di(k+1)+Djk*D(k+1)2/ Norm(Dik,Djk)/Norm(Di(k+1),Dj(k+1))) (22) ここで、ArcCOSは、COS関数の逆関数を与える
もので、単位はラジアンとする。また、Norm(x,
y)は、ベクトル(x,y)のノルムを与える関数とす
る。
D = D + ArcCOS (Dik * Di (k + 1) + Djk * D (k + 1) 2 / Norm (Dik, Djk) / Norm (Di (k + 1), Dj (k + 1) )) (22) Here, ArcCOS gives an inverse function of the COS function, and its unit is radian. Also, Norm (x,
y) is a function that gives the norm of the vector (x, y).

【0069】kを1から順に1づつ増加してDの値を計
算していき、特徴点で区切られたストローク中の最終線
分を処理終えた時にDの絶対値がしきい値を越えたとき
には、当該ストロークは屈曲点を含むものとして、選択
を行う。屈曲点の選択方法は、当該ストロークの始点と
終点を結んだ基準線を求めて、ストロークに含まれる線
分の始点または終点から当該基準線までの距離を求め、
最大距離を与える点を、屈曲点として選択し、当該スト
ロークを分割する。全てのストロークを分割していき、
全てのストロークの方向変化累積値の絶対値がしきい値
以下になった時に、屈曲点選択を終了する。このように
して得られた特徴点と、ストロークパターンを特徴点記
述部103と線分記述部104に転送して、以降の処理
を継続する。
The value of D is calculated by sequentially increasing k by 1 from 1 and the absolute value of D exceeds the threshold value when the final line segment in the stroke delimited by the feature points is processed. Sometimes, the stroke is selected as including the bending point. The method of selecting the bending point is to obtain a reference line connecting the start point and the end point of the stroke, and obtain the distance from the start point or the end point of the line segment included in the stroke to the reference line,
The point that gives the maximum distance is selected as the inflection point and the stroke is divided. Divide all strokes,
When the absolute value of the cumulative value of change in direction of all strokes becomes less than or equal to the threshold value, the bending point selection is ended. The feature points and the stroke pattern thus obtained are transferred to the feature point description unit 103 and the line segment description unit 104, and the subsequent processing is continued.

【0070】特徴点記述部103、線分記述部104、
特徴点整合部105、線分整合部106、整合制御部1
07の動作は、図1の実施例と同一であるので、説明は
省略する。
The feature point description section 103, the line segment description section 104,
Feature point matching unit 105, line segment matching unit 106, matching control unit 1
Since the operation of 07 is the same as that of the embodiment of FIG. 1, the description will be omitted.

【0071】次に図4を用いて、本発明の別の実施例を
説明する。
Next, another embodiment of the present invention will be described with reference to FIG.

【0072】スキャナなどの画像入力部401から入力
された線図形画像は雑音除去や2値化処理などの前処理
を施した後に、2値の線図形画像として得られ、記憶す
るとともに、特徴点検出部102へ転送される。
The line graphic image input from the image input unit 401 such as a scanner is subjected to preprocessing such as noise removal and binarization processing, and is obtained as a binary line graphic image. It is transferred to the output unit 102.

【0073】特徴点検出部102では、線図形の特徴点
を検出する。その詳細な説明は、第1の実施例の説明と
同一であるので、省略する。
The characteristic point detecting section 102 detects the characteristic points of the line figure. The detailed description thereof is the same as the description of the first embodiment, and will be omitted.

【0074】特徴点検出部102で検出された特徴点の
集合と線分の集合は特徴点記述部103と線分記述部1
04に転送される。特徴点記述部103では、検出され
た特徴点、各々の特徴量と、特徴点どうしの関係の特徴
量を求める。線分記述部104では、入力された特徴点
のリストと線分のリストから、線分自身との特徴量と、
線分間の関係を求める。当該特徴点記述部103と線分
記述部104の詳細な説明も、第1の発明の実施例の説
明と同一であるので、ここでは省略する。
The set of feature points and the set of line segments detected by the feature point detection unit 102 are the feature point description unit 103 and the line segment description unit 1.
04. The feature point description unit 103 obtains the detected feature points, the respective feature amounts, and the feature amount of the relationship between the feature points. In the line segment description unit 104, the feature amount of the line segment itself is calculated from the input feature point list and the line segment list,
Find the relationship between line segments. The detailed description of the feature point description unit 103 and the line segment description unit 104 is also the same as the description of the first embodiment of the first invention, and therefore will be omitted here.

【0075】特徴点整合部105と線分整合部106と
整合制御部407の動作は、第1の実施例の説明で用い
た図12と図13の実施例と同一である。特徴点整合部
105は、単純整合部1201、関係スコア加算部12
02、線分スコア加算部1203、辞書データ記憶部1
204、特徴点スコア記憶部1205から構成される。
また、線分整合部106は、単純整合部1301、関係
スコア加算部1302、特徴点スコア加算部1303、
辞書データ記憶部1304、線分スコア記憶部1305
から構成される。これらの構成要素の動作の説明は、図
1、図12、図13を用いた実施例の説明と同一である
ので、省略する。特徴点整合部105と線分整合部10
6と整合制御部407の動作により、特徴点スコア記憶
部1205には入力パターンと辞書パターンの特徴点ど
うしの整合のスコアが生成記憶され、線分スコア記憶部
1305には、入力パターンと辞書パターンの線分どう
しの整合のスコアが生成記憶される。
The operations of the feature point matching unit 105, the line segment matching unit 106, and the matching control unit 407 are the same as those of the embodiments of FIGS. 12 and 13 used in the description of the first embodiment. The feature point matching unit 105 includes a simple matching unit 1201 and a relationship score adding unit 12
02, line segment score addition unit 1203, dictionary data storage unit 1
204 and a feature point score storage unit 1205.
Further, the line segment matching unit 106 includes a simple matching unit 1301, a relationship score adding unit 1302, a feature point score adding unit 1303,
Dictionary data storage unit 1304, line segment score storage unit 1305
Consists of The description of the operation of these components is the same as the description of the embodiment using FIG. 1, FIG. 12, and FIG. Feature point matching unit 105 and line segment matching unit 10
6 and the matching control unit 407 generate and store the matching score between the feature points of the input pattern and the dictionary pattern in the feature point score storage unit 1205, and the line segment score storage unit 1305 stores the input pattern and the dictionary pattern. A score of matching between the line segments is generated and stored.

【0076】特徴点整合部105と線分整合部106の
処理が終了した段階で、整合制御部407は特徴点スコ
ア記憶部1205から特徴点スコアS(Ix、Djy)
を順次読みだす。整合制御部407は、S(Ix、Dj
y)を対象とする時に、S(Ix、Dd)との値の比較
を式(18)に従って行う。ここで、DdはDjy以外
の辞書パターンの特徴点番号を指す。S(Ii、Dj
y)との値の比較を式(19)に従って行う。ここで、
IiはIx以外の全ての入力パターンの特徴点番号を指
す。ここで、本実施例では、Kの値を20としたが、こ
の値はどのようなものでもよい。式(18)と式(1
9)を満たすS(Ix、Djy)を検出した場合には、
S(Ix、Djy)と(Ix、Djy)を画像変形部4
09に転送して、記憶する。当該処理を全ての(Ix、
Djy)に対してくり返し実行する。
When the processing of the feature point matching unit 105 and the line segment matching unit 106 is completed, the matching control unit 407 stores the feature point score S (Ix, Djy) in the feature point score storage unit 1205.
Sequentially read. The matching control unit 407 uses S (Ix, Dj
When targeting y), the value of S (Ix, Dd) is compared according to equation (18). Here, Dd indicates a feature point number of a dictionary pattern other than Djy. S (Ii, Dj
The value is compared with y) according to equation (19). here,
Ii indicates the feature point numbers of all input patterns other than Ix. Here, in the present embodiment, the value of K is set to 20, but this value may be any value. Equation (18) and Equation (1
When S (Ix, Djy) satisfying 9) is detected,
The image transforming unit 4 stores S (Ix, Djy) and (Ix, Djy).
09 to be stored. This process is performed for all (Ix,
Djy) is repeatedly executed.

【0077】整合制御部407は、特徴点スコア記憶部
1205から特徴点スコアS(Ix、Djy)を読みだ
す。まず、S(Ix、Djy)の中での最大値を求め
る。その時のIx、Djyを用いて、S(Ix、Dd)
の値を0に置換する。ここで、DdはDjy以外の辞書
パターンの特徴点番号を指す。また、S(Ii、Dj
y)の値を0に置換する。ここで、IiはIx以外の全
ての入力パターンの特徴点番号を指す。この修正の後に
S(Ix、Djy)の中での最大値を求め、S(Ix、
Dd)とS(Ii、Djy)の修正を実行する。この処
理を入力パターンの特徴点数と辞書パターンの特徴点数
のうちの少ない数の回数だけくり返し実行し、S(I
x、Djy)の修正を実施する。この修正処理の終了後
に、S(Ix、Djy)に含まれる要素値の総和を求
め、Sとする。
The matching control unit 407 reads the feature point score S (Ix, Djy) from the feature point score storage unit 1205. First, the maximum value in S (Ix, Djy) is obtained. Using Ix and Djy at that time, S (Ix, Dd)
Replace the value of with 0. Here, Dd indicates a feature point number of a dictionary pattern other than Djy. In addition, S (Ii, Dj
Replace the value in y) with 0. Here, Ii indicates the feature point numbers of all input patterns other than Ix. After this correction, the maximum value in S (Ix, Djy) is calculated, and S (Ix, Djy)
Modify Dd) and S (Ii, Djy). This processing is repeatedly executed a small number of times of the number of characteristic points of the input pattern and the number of characteristic points of the dictionary pattern, and S (I
x, Djy) is corrected. After the completion of this correction process, the sum of the element values included in S (Ix, Djy) is obtained and is set to S.

【0078】続いて、整合制御部407は再度線分スコ
アR(Ex、Fjy)を線分整合部106中の線分スコ
ア記憶部1305から読みだす。まず、整合制御部40
7は、R(Ex、Fjy)の最大値を求める。その時の
Ex、Fjyを用いて、R(Ex、Fd)の値を0に置
換する。ここで、FdはFjy以外の辞書パターンの線
分番号を指す。また、R(Ei、Fjy)の値を0に置
換する。ここで、EiはEx以外の全ての入力パターン
の線分番号を指す。この修正の後にR(Ex、Fjy)
の中での最大値を求め、R(Ex、Fd)とR(Ei、
Fjy)の修正を実行する。この処理を入力パターンの
線分数と辞書パターンの線分数のうちの少ない数の回数
だけくり返し実行し、R(Ex、Fjy)の修正を実施
する。この修正処理の終了後に、R(Ex、Fjy)に
含まれる要素値の総和を求め、Rとする。最終的に整合
制御部407は、S+Rを計算して求め、入力パターン
と第j番目の辞書データとの整合スコアSjとする。本
実施例では、SとRの両方の値を用いて整合結果とした
が、Sのみを用いてSjとしてもよい。また、Rのみを
用いてSjとしてもよい。
Subsequently, the matching control unit 407 again reads the line segment score R (Ex, Fjy) from the line segment score storage unit 1305 in the line segment matching unit 106. First, the matching control unit 40
7 obtains the maximum value of R (Ex, Fjy). The value of R (Ex, Fd) is replaced with 0 using Ex and Fjy at that time. Here, Fd indicates a line segment number of a dictionary pattern other than Fjy. Further, the value of R (Ei, Fjy) is replaced with 0. Here, Ei indicates the line segment numbers of all input patterns other than Ex. After this correction, R (Ex, Fjy)
The maximum value of R (Ex, Fd) and R (Ei,
Fjy) correction. This process is repeatedly executed a small number of times of the number of line segments of the input pattern and the number of line segments of the dictionary pattern to correct R (Ex, Fjy). After the completion of this correction process, the total sum of the element values included in R (Ex, Fjy) is calculated and set as R. Finally, the matching control unit 407 calculates and obtains S + R to obtain the matching score Sj between the input pattern and the j-th dictionary data. In this embodiment, the matching result is obtained by using both the values of S and R, but only S may be used as Sj. Alternatively, only R may be used as Sj.

【0079】当該処理の終了後に、整合制御部407
は、信号を画像変形部409に送信し、起動する。
After the processing is completed, the matching control unit 407
Sends a signal to the image transforming unit 409 to activate.

【0080】画像変形部409では、整合制御部407
から受信した(Ix、Djy)をもとに画像変形を実行
する。画像変形処理は、「Beier,T and Neely,S,"Featu
re Based Image Metamorphosis",Proc. of SIGGRAPH92,
1992 」に示されるように数多くの公知の画像変形手段
があるが、本実施例では、次に述べる画像変形手段を用
いる。
In the image transformation section 409, the matching control section 407
The image transformation is executed based on (Ix, Djy) received from. Image transformation processing is "Beier, T and Neely, S," Featu
re Based Image Metamorphosis ", Proc. of SIGGRAPH92,
1992 ", there are many publicly known image transforming means, but in this embodiment, the image transforming means described below is used.

【0081】画像変形部409は、整合制御部106か
ら受け取った複数のスコアS(Ix、Djy)の中から
最大値を選び、Mとする。また、S(Ix、Djy)を
大きい順に並べる。最大値から順にS(Ix、Djy)
の(Ix、Djy)を用いて画像の変形を処理を行う。
各(Ix、Djy)を用いた画像の変形処理は、同一で
あるので1つの組み(Ix、Djy)に対して変形処理
を実行する場合について説明する。S(Ix、Djy)
の大きい順に、同じ処理を(Ix、Djy)の値を変え
てくり返し実行する。
The image transforming unit 409 selects the maximum value from the plurality of scores S (Ix, Djy) received from the matching control unit 106 and sets it as M. In addition, S (Ix, Djy) are arranged in descending order. S (Ix, Djy) in order from the maximum value
The image transformation is performed using (Ix, Djy).
Since the image deformation processing using each (Ix, Djy) is the same, the case where the deformation processing is executed for one set (Ix, Djy) will be described. S (Ix, Djy)
The same process is repeated by changing the value of (Ix, Djy) in descending order of.

【0082】本実施例で、入力パターンと辞書パターン
とともに画像のサイズを縦J画素、横I画素とし、Jと
Iともに100としたが、どのような値でもよい。画像
の左上の座標を(0、0)とし、右下の座標を(I,
J)とする。
In this embodiment, the size of the image along with the input pattern and the dictionary pattern is J pixels in the vertical direction and I pixels in the horizontal direction, and both J and I are set to 100, but any value may be used. The upper left coordinate of the image is (0, 0), and the lower right coordinate is (I,
J).

【0083】画像変形部409は、(Ix、Djy)に
対して特徴点記述部103から入力パターン中での特徴
点Ixの座標(X11、Y11)を読みだす。また、特
徴点整合部105から辞書パターン中での特徴点Djy
の座標(X21、Y21)を読みだす。
The image transformation section 409 reads the coordinates (X11, Y11) of the feature point Ix in the input pattern from the feature point description section 103 for (Ix, Djy). In addition, the feature point matching unit 105 outputs the feature point Djy in the dictionary pattern.
Read out the coordinates (X21, Y21).

【0084】入力パターンの座標(X11、Y11)を
(X21、Y21)に向けて移動させ、それに合わせて
入力パターンの他の座標の点を移動させる。移動先の座
標(X′、Y′)の画素値を移動元の座標(X、Y)の
画素値から求める。移動先の全ての点の画素値を下の式
(23)、式(24)、式(25)に従って計算して求
める。
The coordinates (X11, Y11) of the input pattern are moved toward (X21, Y21), and the points of the other coordinates of the input pattern are moved accordingly. The pixel value of the coordinate (X ', Y') of the moving destination is obtained from the pixel value of the coordinate (X, Y) of the moving source. Pixel values at all the destination points are calculated and obtained according to the following equations (23), (24), and (25).

【0085】 U=(X21−X11)*Z*S(Ix、Djy)/M V=(Y21−Y11)*Z*S(Ix、Djy)/M (23) ただし、本実施例ではZを0.3としたが、どのような
値でもよい。
U = (X21−X11) * Z * S (Ix, Djy) / M V = (Y21−Y11) * Z * S (Ix, Djy) / M (23) However, in this embodiment, Z is Although it is set to 0.3, any value may be used.

【0086】 X=X′X11/(X11+U) X′<X11の時 X=(X′(I−X11)−UI)/(I−X11−U) 上以外 (24) もし、I−X11−Uが0より小さくなる場合には、一
時的にZの値を修正し、I−X11−Uが0より大きく
なるように設定する。
X = X'X11 / (X11 + U) When X '<X11 X = (X' (I-X11) -UI) / (I-X11-U) Other than above (24) If I-X11- When U is smaller than 0, the value of Z is temporarily corrected and I-X11-U is set to be larger than 0.

【0087】 Y=Y′Y11/(Y11+V) Y′<Y11の時 Y=(Y′(I−Y11)−VI)/(I−Y11−V) 上以外 (25) もし、I−Y11−Vが0より小さくなる場合には、一
時的にZの値を修正し、I−Y11−Vが0より大きく
なるように設定する。
Y = Y'Y11 / (Y11 + V) When Y '<Y11 Y = (Y' (I-Y11) -VI) / (I-Y11-V) Other than above (25) If I-Y11- When V is smaller than 0, the value of Z is temporarily corrected and I-Y11-V is set to be larger than 0.

【0088】式(24)、式(25)に従った計算によ
り求めたX,Yは小数点数であり、これを四捨五入によ
り整数化して座標とし、その座標の画素値を取り出し、
X′,Y′の座標の画素値とする。X′を0からIま
で、Y′を0からJまで変えて全ての画素値を求めて変
形画像とする。
X and Y obtained by the calculation according to the equations (24) and (25) are decimal numbers, which are rounded to integers to obtain coordinates, and the pixel value of the coordinates is taken out.
Pixel values at the coordinates of X'and Y '. X'is changed from 0 to I and Y'is changed from 0 to J to obtain all pixel values to obtain a deformed image.

【0089】この変形画像を元に次のS(Ix、Dj
y)を取り出して、上記の式(23)、式(24)式
(25)に従った画像の変形処理をおこなう。
Based on this deformed image, the following S (Ix, Dj
y) is taken out and the image transformation process is performed according to the above equations (23), (24) and (25).

【0090】画像変形部409に保持される全てのS
(Ix、Djy)に対して、画像の変形処理を実行した
後に、得られた変形画像を画像入力部501に転送し、
特徴点検出部202、特徴点記述部103、線分記述部
104、特徴点整合部105、線分整合部106を駆動
する。生成されたスコアを元に、式(18)、式(1
9)に従って十分大きなスコアを持つ特徴点を検出し、
画像変形部409に転送して、再び画像の変形処理を実
行する。この1連の動作を一定回数繰り返す。本実施例
では、くり返し回数を3回としたが、どのような回数で
もよい。また、くり返し回数が3回に満たなくても、整
合制御部407で求めた最終的な整合スコアSjが一定
しきい値より大きくなることが検出された場合には、く
り返しを中断し、その際の最後に得られたれた整合スコ
アSjを第j番目の辞書データとの整合スコアとする。
All S stored in the image transformation unit 409
After performing the image transformation process on (Ix, Djy), the obtained transformed image is transferred to the image input unit 501,
The feature point detection unit 202, the feature point description unit 103, the line segment description unit 104, the feature point matching unit 105, and the line segment matching unit 106 are driven. Based on the generated score, formula (18), formula (1
Detecting feature points with sufficiently large scores according to 9),
The image is transferred to the image transforming unit 409, and the image transforming process is executed again. This series of operations is repeated a fixed number of times. In the present embodiment, the number of repetitions is three, but any number may be used. Further, even if the number of times of repetition is less than 3, if it is detected that the final matching score Sj obtained by the matching control unit 407 becomes larger than a certain threshold value, the repeating is interrupted, and at that time, The matching score Sj obtained at the end of is the matching score with the j-th dictionary data.

【0091】整合制御部407は、全ての辞書データと
入力パターンとの整合を上記の整合の実施例に従って実
行し、最大のスコアを得た辞書データのカテゴリ名を端
子108から出力する。
The matching control unit 407 executes matching of all the dictionary data with the input pattern according to the above-described matching embodiment, and outputs the category name of the dictionary data having the maximum score from the terminal 108.

【0092】以上の実施例の画像入力部101と特徴点
検出部102を、図3の実施例と同様に、オンラインデ
ータ入力部501と特徴点検出部301に変更して、図
4の実施例と同様の動作を、オンラインデータの形式で
入力されたパターンの整合を実現するための実施例を図
5に示す。本実施例は、オンラインデータ入力部50
1、特徴点検出部302、特徴点記述部103、線分記
述部104、特徴点整合部105、線分整合部106、
画像変形部509、整合制御部407から構成される。
The image input unit 101 and the feature point detection unit 102 of the above embodiment are changed to the online data input unit 501 and the feature point detection unit 301 as in the embodiment of FIG. FIG. 5 shows an embodiment for realizing the matching of the pattern input in the online data format, which is the same operation as the above. In this embodiment, the online data input unit 50 is used.
1, feature point detection unit 302, feature point description unit 103, line segment description unit 104, feature point matching unit 105, line segment matching unit 106,
The image transformation unit 509 and the matching control unit 407 are included.

【0093】オンラインデータ入力部501では、タブ
レットなどの時系列で指定した座標データの系列が入力
できる入力デバイスによってサンプリングされたストロ
ークパターンを特徴点検出部302へ転送する。特徴点
検出部302の実施例は図3の実施例の特徴点検出部3
02の動作と同じであるので、ここでは説明を省略す
る。
The online data input unit 501 transfers a stroke pattern sampled by an input device such as a tablet which can input a series of coordinate data designated in time series to the feature point detection unit 302. The embodiment of the feature point detection unit 302 is the feature point detection unit 3 of the embodiment of FIG.
Since the operation is the same as that of No. 02, description thereof will be omitted here.

【0094】特徴点記述部103、線分記述部104、
特徴点整合部105、線分整合部106の動作は、図1
の実施例と同一であるので、説明は省略する。
The characteristic point description section 103, the line segment description section 104,
The operation of the feature point matching unit 105 and the line segment matching unit 106 is as shown in FIG.
The description is omitted because it is the same as the embodiment described above.

【0095】特徴点整合部105と線分整合部106の
処理が終了した段階で、整合制御部407は特徴点スコ
ア記憶部1205から特徴点スコアS(Ix、Djy)
を順次読みだす。整合制御部407は、S(Ix、Dj
y)を対象とする時に、S(Ix、Dd)との値の比較
を式(18)に従って行う。ここで、DdはDjy以外
の辞書パターンの特徴点番号を指す。S(Ii、Dj
y)との値の比較を式(19)に従って行う。ここで、
IiはIx以外の全ての入力パターンの特徴点番号を指
す。ここで、本実施例では、Kの値を20としたが、こ
の値はどのようなものでもよい。式(18)と式(1
9)を満たすS(Ix、Djy)を検出した場合には、
S(Ix、Djy)と(Ix、Djy)を画像変形部5
09に転送して、記憶する。当該処理を全ての(Ix、
Djy)に対してくり返し実行する。
When the processing of the feature point matching unit 105 and the line segment matching unit 106 is completed, the matching control unit 407 stores the feature point score S (Ix, Djy) in the feature point score storage unit 1205.
Sequentially read. The matching control unit 407 uses S (Ix, Dj
When targeting y), the value of S (Ix, Dd) is compared according to equation (18). Here, Dd indicates a feature point number of a dictionary pattern other than Djy. S (Ii, Dj
The value is compared with y) according to equation (19). here,
Ii indicates the feature point numbers of all input patterns other than Ix. Here, in the present embodiment, the value of K is set to 20, but this value may be any value. Equation (18) and Equation (1
When S (Ix, Djy) satisfying 9) is detected,
The image transformation unit 5 sets S (Ix, Djy) and (Ix, Djy).
09 to be stored. This process is performed for all (Ix,
Djy) is repeatedly executed.

【0096】続いて、整合制御部407は、再び特徴点
スコア記憶部1205から特徴点スコアS(Ix、Dj
y)を読みだす。まず、S(Ix、Djy)の中での最
大値を求める。その時のIx、Djyを用いて、S(I
x、Dd)の値を0に置換する。ここで、DdはDjy
以外の辞書パターンの特徴点番号を指す。また、S(I
i、Djy)の値を0に置換する。ここで、IiはIx
以外の全ての入力パターンの特徴点番号を指す。この修
正の後にS(Ix、Djy)の中での最大値を求め、S
(Ix、Dd)とS(Ii、Djy)の修正を実行す
る。この処理を入力パターンの特徴点数と辞書パターン
の特徴点数のうちの少ない数の回数だけくり返し実行
し、S(Ix、Djy)の修正を実施する。この修正処
理の終了後に、S(Ix、Djy)に含まれる要素値の
総和を求め、Sとする。
Subsequently, the matching control unit 407 again retrieves the feature point score S (Ix, Dj from the feature point score storage unit 1205.
y) is read out. First, the maximum value in S (Ix, Djy) is obtained. Using Ix and Djy at that time, S (I
Replace the value of x, Dd) with 0. Where Dd is Djy
A feature point number of a dictionary pattern other than. In addition, S (I
Replace the value of i, Djy) with 0. Where Ii is Ix
Other than the above, it indicates the feature point numbers of all input patterns. After this correction, the maximum value in S (Ix, Djy) is calculated, and S
Modify (Ix, Dd) and S (Ii, Djy). This processing is repeatedly executed a small number of times of the number of characteristic points of the input pattern and the number of characteristic points of the dictionary pattern, and S (Ix, Djy) is corrected. After the completion of this correction process, the sum of the element values included in S (Ix, Djy) is obtained and is set to S.

【0097】続いて、整合制御部407は再度線分スコ
アR(Ex、Fjy)を線分整合部106中の線分スコ
ア記憶部1305から読みだす。まず、整合制御部40
7は、R(Ex、Fjy)の最大値を求める。その時の
Ex、Fjyを用いて、R(Ex、Fd)の値を0に置
換する。ここで、FdはFjy以外の辞書パターンの線
分番号を指す。また、R(Ei、Fjy)の値を0に置
換する。ここで、EiはEx以外の全ての入力パターン
の線分番号を指す。この修正の後にR(Ex、Fjy)
の中での最大値を求め、R(Ex、Fd)とR(Ei、
Fjy)の修正を実行する。この処理を入力パターンの
線分数と辞書パターンの線分数のうちの少ない数の回数
だけくり返し実行し、R(Ex、Fjy)の修正を実施
する。この修正処理の終了後に、R(Ex、Fjy)に
含まれる要素値の総和を求め、Rとする。最終的に整合
制御部407は、S+Rを計算して求め、入力パターン
と第j番目の辞書データとの整合スコアSjとする。本
実施例では、SとRの両方の値を用いて整合結果とした
が、Sのみを用いてSjとしてもよい。また、Rのみを
用いてSjとしてもよい。
Subsequently, the matching control unit 407 again reads the line segment score R (Ex, Fjy) from the line segment score storage unit 1305 in the line segment matching unit 106. First, the matching control unit 40
7 obtains the maximum value of R (Ex, Fjy). The value of R (Ex, Fd) is replaced with 0 using Ex and Fjy at that time. Here, Fd indicates a line segment number of a dictionary pattern other than Fjy. Further, the value of R (Ei, Fjy) is replaced with 0. Here, Ei indicates the line segment numbers of all input patterns other than Ex. After this correction, R (Ex, Fjy)
The maximum value of R (Ex, Fd) and R (Ei,
Fjy) correction. This process is repeatedly executed a small number of times of the number of line segments of the input pattern and the number of line segments of the dictionary pattern to correct R (Ex, Fjy). After the completion of this correction process, the total sum of the element values included in R (Ex, Fjy) is calculated and set as R. Finally, the matching control unit 407 calculates and obtains S + R to obtain the matching score Sj between the input pattern and the j-th dictionary data. In this embodiment, the matching result is obtained by using both the values of S and R, but only S may be used as Sj. Alternatively, only R may be used as Sj.

【0098】当該処理の終了後に、整合制御部407
は、信号を画像変形部509に送信し、起動する。
After the end of the processing, the matching control unit 407
Sends a signal to the image transformation unit 509 and activates it.

【0099】画像変形部509は、図4の画像変形部4
09と同様の動作のものを実施例として利用できるが、
ここでは、別の実施例について説明する。画像変形部5
09は、整合制御部106から受け取った複数のスコア
S(Ix、Djy)の中から最大値を選び、Mとする。
また、S(Ix、Djy)を大きい順に並べる。最大値
から順にS(Ix、Djy)の(Ix、Djy)を用い
て画像の変形を処理を行う。まず、各(Ix、Djy)
が対応する入力パターン上の点との対応付けを行う。各
(Ix、Djy)を用いた画像の変形処理は、同一であ
るので1つの組み(Ix、Djy)に対して変形処理を
実行する場合について説明する。S(Ix、Djy)の
大きい順に、同じ処理を(Ix、Djy)の値を変えて
くり返し実行する。
The image transformation unit 509 is the image transformation unit 4 of FIG.
Although the same operation as that of 09 can be used as an example,
Here, another embodiment will be described. Image transformation unit 5
09 selects the maximum value from the plurality of scores S (Ix, Djy) received from the matching control unit 106 and sets it as M.
In addition, S (Ix, Djy) are arranged in descending order. The image transformation is performed using (Ix, Djy) of S (Ix, Djy) in order from the maximum value. First, each (Ix, Djy)
Is associated with a point on the corresponding input pattern. Since the image deformation processing using each (Ix, Djy) is the same, the case where the deformation processing is executed for one set (Ix, Djy) will be described. The same processing is repeatedly executed in the descending order of S (Ix, Djy) by changing the value of (Ix, Djy).

【0100】本実施例で、入力パターンと辞書パターン
とともに画像のサイズを縦J画素、横I画素とし、Jと
Iともに100としたが、どのような値でもよい。画像
の左上の座標を(0、0)とし、右下の座標を(I,
J)とする。
In the present embodiment, the size of the image along with the input pattern and the dictionary pattern is J pixels in the vertical direction and I pixels in the horizontal direction, and both J and I are set to 100, but any value may be used. The upper left coordinate of the image is (0, 0), and the lower right coordinate is (I,
J).

【0101】画像変形部509は、(Ix、Djy)に
対応する入力パターン中での特徴点Ixの座標(X1
1、Y11)をオンラインデータ入力部501から読み
だす。また、特徴点整合部105から辞書パターン中で
の特徴点Djyの座標(X21、Y21)を読みだす。
The image transforming unit 509 uses the coordinates (X1) of the feature point Ix in the input pattern corresponding to (Ix, Djy).
1, Y11) is read from the online data input unit 501. Further, the coordinates (X21, Y21) of the feature point Djy in the dictionary pattern are read from the feature point matching unit 105.

【0102】入力パターンの座標(X11、Y11)を
(X21、Y21)に向けて移動させ、それに合わせて
入力パターンの当該特徴点に連結する線分上の点を移動
させる。移動先の座標(X′、Y′)を移動元の座標
(X、Y)から求める。移動させる点は、特徴点(X1
1、Y11)に連結するストローク上の点を順次オンラ
インデータ入力部501から読みだして移動処理をおこ
なう。当該ストロークにそって、特徴点(X11、Y1
1)から移動対象の点までの距離をQとして、移動先の
座標は式(23)、式(26)に従って計算して求め
る。ただし、(X11、Y11)から距離Qがしきい値
H以下の点だけを移動対象とする。本実施例では、Hを
40画素としたが、この値はどのようなものでもよい。
The coordinates (X11, Y11) of the input pattern are moved toward (X21, Y21), and the point on the line segment connected to the feature point of the input pattern is moved accordingly. The coordinates (X ', Y') of the destination are calculated from the coordinates (X, Y) of the source. The point to move is the feature point (X1
1, Y11) and the points on the stroke which are connected to each other are sequentially read from the online data input unit 501 and the movement processing is performed. Along the stroke, feature points (X11, Y1
The coordinate of the movement destination is calculated and calculated according to the equations (23) and (26), where Q is the distance from 1) to the point to be moved. However, only the point where the distance Q is equal to or less than the threshold value H from (X11, Y11) is set as the movement target. In this embodiment, H is set to 40 pixels, but this value may be any value.

【0103】 X′= X+U*Q/H Y′= Y+V*Q/H (23) 生成されたパターンは、再びオンラインデータ入力部5
01に記憶される。
X ′ = X + U * Q / H Y ′ = Y + V * Q / H (23) The generated pattern is again used by the online data input unit 5
Stored in 01.

【0104】この変形画像を元に次のS(Ix、Dj
y)を取り出して、上記の式(23)、式(26)に従
った画像の変形処理をおこなう。
Based on this deformed image, the next S (Ix, Dj
y) is taken out, and the image transformation process is performed according to the above equations (23) and (26).

【0105】画像変形部509に保持される全てのS
(Ix、Djy)に対して、画像の変形処理を実行した
後に、得られた変形画像をオンラインデータ入力部50
1に転送し、特徴点検出部302、特徴点記述部10
3、線分記述部104、特徴点整合部105、線分整合
部106を駆動する。生成されたスコアを元に、式(1
8)、式(19)に従って十分大きなスコアを持つ特徴
点を検出し、画像変形部509に転送して、再び画像の
変形処理を実行する。この1連の動作を一定回数繰り返
す。本実施例では、くり返し回数を3回としたが、どの
ような回数でもよい。また、くり返し回数が3回に満た
なくても、整合制御部407で求めた最終的な整合スコ
アSjが一定しきい値より大きくなることが検出された
場合には、くり返しを中断し、その際の最後に得られた
れた整合スコアSjを第j番目の辞書データとの整合ス
コアとする。
All S stored in the image transformation unit 509
After performing the image transformation process on (Ix, Djy), the obtained transformed image is input to the online data input unit 50.
1, and the feature point detection unit 302 and the feature point description unit 10
3, the line segment description unit 104, the feature point matching unit 105, and the line segment matching unit 106 are driven. Based on the generated score, the formula (1
8), a feature point having a sufficiently large score is detected according to equation (19), transferred to the image transformation unit 509, and the image transformation process is executed again. This series of operations is repeated a fixed number of times. In the present embodiment, the number of repetitions is three, but any number may be used. Further, even if the number of times of repetition is less than 3, if it is detected that the final matching score Sj obtained by the matching control unit 407 becomes larger than a certain threshold value, the repeating is interrupted, and at that time, The matching score Sj obtained at the end of is the matching score with the j-th dictionary data.

【0106】整合制御部407は、全ての辞書データと
入力パターンとの整合を上記の整合の実施例に従って実
行し、最大のスコアを得た辞書データのカテゴリ名を端
子108から出力する。
The matching control unit 407 executes matching of all the dictionary data with the input pattern according to the above-described matching embodiment, and outputs the category name of the dictionary data having the maximum score from the terminal 108.

【0107】[0107]

【発明の効果】以上説明したように、本発明のストロー
クパターン整合装置は、特徴点検出手段で得られた特徴
点の特徴と特徴点間の特徴を記述する特徴点記述手段
と、特徴点検出手段で得られた特徴点で区切られた線分
の特徴と線分間の特徴を記述する線分記述手段と、特徴
点記述手段で記述された特徴を用いてストロークパター
ンの整合を実行する特徴点整合手段と、線分記述手段で
記述された特徴を用いてストロークパターンの整合を実
行する線分整合手段と、特徴点整合手段と前記線分整合
手段の出力信号を用いて、整合結果を判定する整合制御
手段とから構成することにより、接続しない線分の関係
も整合に加味し、精度よくストロークパターンの整合を
実現できる。
As described above, the stroke pattern matching device of the present invention is characterized by a feature point description means for describing the features of the feature points obtained by the feature point detection means and the features between the feature points, and the feature point detection. A line segment describing means for describing the feature of a line segment delimited by the feature points obtained by the means and the feature of the line segment, and a feature point for performing stroke pattern matching using the feature described by the feature point describing means Matching means, line segment matching means for performing stroke pattern matching using the features described by the line segment describing means, and feature point matching means and output signals of the line segment matching means are used to determine the matching result. And the matching control means for adjusting the stroke pattern, the relationship between the line segments that are not connected can be added to the matching.

【0108】また、特徴点整合手段が、複数の特徴点の
関係を用いて整合結果を修正する関係スコア加算手段を
備えることと、線分整合手段が、複数の線分の関係を用
いて整合結果を修正する関係スコア加算手段を備えるこ
とと、特徴点整合手段が、線分整合手段の整合結果を用
いて整合結果を修正する線分スコア加算手段を備えるこ
とと、線分整合手段が、特徴点整合手段の整合結果を用
いて整合結果を修正する特徴点スコア加算手段を備える
ことによって、より精度よく接続しない線分を含むスト
ロークパターンの整合を実現できる。
Further, the feature point matching means is provided with a relation score adding means for correcting the matching result by using the relation of a plurality of feature points, and the line segment matching means is matched by using the relation of a plurality of line segments. The relationship score adding means for correcting the result; the feature point matching means, the line segment score adding means for correcting the matching result using the matching result of the line segment matching means; and the line segment matching means, By providing the feature point score adding means that corrects the matching result using the matching result of the feature point matching means, it is possible to realize the matching of the stroke patterns including the line segments that are not connected with high accuracy.

【0109】また、整合制御手段が、整合結果の得点の
大小関係を用いて、得点の修正を実施する手段と、特徴
点整合手段と線分整合手段をくり返し実行して、整合結
果を求める手段を備えることによって、より変形したス
トロークパターンに対しても、より精度よくストローク
パターンの整合を実現できる。
Further, the matching control means uses the magnitude relation of the score of the matching result to correct the score and the feature point matching means and the line segment matching means repeatedly to obtain the matching result. By providing the stroke pattern, it is possible to more accurately match the stroke pattern even with a deformed stroke pattern.

【0110】また、整合制御手段の整合結果に応じて、
元のストロークパターンを変形する画像変形手段を備
え、画像変形手段と、特徴点検出手段、特徴点記述手
段、線分記述手段、特徴点整合手段、線分整合手段、整
合制御手段をくり返し、駆動できることによっても、よ
り変形したストロークパターンに対しても、より精度よ
くストロークパターンの整合を実現できる。
Further, according to the matching result of the matching control means,
An image transforming unit that transforms the original stroke pattern is provided, and the image transforming unit, the feature point detecting unit, the feature point describing unit, the line segment describing unit, the feature point matching unit, the line segment matching unit, and the matching control unit are repeatedly driven. As a result, the stroke patterns can be more accurately aligned with each other even for the more deformed stroke patterns.

【0111】また、本発明では、画像入力手段におい
て、ストロークパターンを座標点列であるオンラインデ
ータとして入力する画像入力手段と、画像入力手段から
得られたオンラインストロークパターンから構造を解析
して特徴点を検出する特徴点検出手段を備えることによ
って、オンラインデータとしてのストロークパターンに
対しても、精度よく接続しない線分を含むストロークパ
ターンの整合を実現できる。
Further, according to the present invention, the image input means inputs the stroke pattern as online data which is a sequence of coordinate points, and the structure is analyzed from the online stroke pattern obtained from the image input means. By including the feature point detecting means for detecting, it is possible to realize the matching of stroke patterns including line segments that are not accurately connected, even for stroke patterns as online data.

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

【図1】本発明のストロークパターン整合装置の実施例
の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an embodiment of a stroke pattern matching device of the present invention.

【図2】従来のストロークパターン整合装置の構成を示
すブロック図である。
FIG. 2 is a block diagram showing a configuration of a conventional stroke pattern matching device.

【図3】本発明のストロークパターン整合装置の実施例
の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of an embodiment of a stroke pattern matching device of the present invention.

【図4】本発明のストロークパターン整合装置の実施例
の構成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of an embodiment of a stroke pattern matching device of the present invention.

【図5】本発明のストロークパターン整合装置の実施例
の構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of an embodiment of a stroke pattern matching device of the present invention.

【図6】ストロークパターンの特徴点の例を示す図であ
る。
FIG. 6 is a diagram showing an example of feature points of a stroke pattern.

【図7】ストロークパターンの線分の例を示す図であ
る。
FIG. 7 is a diagram showing an example of a line segment of a stroke pattern.

【図8】ストロークパターンの近接特徴点の例を示す図
である。
FIG. 8 is a diagram showing an example of proximity feature points of a stroke pattern.

【図9】ストロークパターンの線分間の関係の例を示す
図である。
FIG. 9 is a diagram showing an example of a relationship between stroke segments of a stroke pattern.

【図10】ストロークパターンの特徴点間の関係の特徴
を含む表の例を示す図である。
FIG. 10 is a diagram showing an example of a table including characteristics of a relationship between characteristic points of a stroke pattern.

【図11】ストロークパターンの線分間の関係の特徴を
含む表の例を示す図である。
FIG. 11 is a diagram showing an example of a table including characteristics of relationships between stroke patterns of line segments.

【図12】特徴点整合部の構成例を示すブロック図であ
る。
FIG. 12 is a block diagram showing a configuration example of a feature point matching unit.

【図13】線分整合部の構成例を示すブロック図であ
る。
FIG. 13 is a block diagram showing a configuration example of a line segment matching unit.

【図14】特徴点整合部の別の構成例を示すブロック図
である。
FIG. 14 is a block diagram showing another configuration example of a feature point matching unit.

【図15】線分整合部の別の構成例を示すブロック図で
ある。
FIG. 15 is a block diagram showing another configuration example of the line segment matching unit.

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

101、401 画像入力部 102、302 特徴点検出部 103 特徴点記述部 104 線分記述部 105 特徴点整合部 106 線分整合部 107、407、507 整合制御部 108 出力端子 201 骨格線抽出部 202 線図形構造解析部 203 整合部 301、501 オンラインデータ入力部 409、509 画像変形部 601、602、603、604、605、606、6
07、608 特徴点 701、702、703、704、705、706、7
07 線分 801、802 特徴点 803 特徴点間関係 901、902 線分 903 線分間関係 1201、1301 単純整合部 1202、1302 関係スコア加算部 1203 線分スコア加算部 1204、1304 辞書データ記憶部 1205 特徴点スコア記憶部 1303 特徴点スコア加算部 1305 線分スコア記憶部 1406、1506 スコア変更部
101, 401 Image input unit 102, 302 Feature point detection unit 103 Feature point description unit 104 Line segment description unit 105 Feature point matching unit 106 Line segment matching unit 107, 407, 507 Matching control unit 108 Output terminal 201 Skeleton line extracting unit 202 Line figure structure analysis unit 203 Matching unit 301, 501 Online data input unit 409, 509 Image transformation unit 601, 602, 603, 604, 605, 606, 6
07, 608 Feature points 701, 702, 703, 704, 705, 706, 7
07 Line segment 801, 802 Feature point 803 Relationship between feature points 901, 902 Line segment 903 Line segment relationship 1201, 1301 Simple matching section 1202, 1302 Relation score adding section 1203 Line segment score adding section 1204, 1304 Dictionary data storage section 1205 Feature Point score storage unit 1303 Characteristic point score addition unit 1305 Line segment score storage unit 1406, 1506 Score change unit

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】ストロークパターンを画像として入力する
画像入力手段と、前記画像入力手段から得られたストロ
ークパターンから構造を解析して特徴点を検出する特徴
点検出手段と、前記特徴点検出手段から得られた特徴を
用いてストロークパターンの整合を実現するストローク
パターン整合装置において、 前記特徴点検出手段で得られた特徴点の特徴と特徴点間
の特徴を記述する特徴点記述手段と、前記特徴点検出手
段で得られた特徴点で区切られた線分の特徴と線分間の
特徴を記述する線分記述手段と、前記特徴点記述手段で
記述された特徴を用いてストロークパターンの整合を実
行する特徴点整合手段と、前記線分記述手段で記述され
た特徴を用いてストロークパターンの整合を実行する線
分整合手段と、前記特徴点整合手段と前記線分整合手段
の出力信号を用いて、整合結果を判定する整合制御手段
とから構成されることを特徴とするストロークパターン
整合装置。
1. An image inputting means for inputting a stroke pattern as an image, a characteristic point detecting means for detecting a characteristic point by analyzing a structure from the stroke pattern obtained from the image inputting means, and the characteristic point detecting means. In a stroke pattern matching device that realizes stroke pattern matching using the obtained features, a feature point description unit that describes the features of the feature points obtained by the feature point detection unit and the features between the feature points, and the feature Stroke pattern matching is performed using the line segment description means for describing the features of the line segment delimited by the feature points obtained by the point detection means and the feature of the line segment, and the feature described by the feature point description means. Feature point matching means, line segment matching means for performing stroke pattern matching using the features described by the line segment describing means, the feature point matching means, and the line A stroke pattern matching device comprising: a matching control means for judging a matching result by using an output signal of the minute matching means.
【請求項2】前記特徴点整合手段が、複数の特徴点の関
係を用いて整合結果を修正する関係スコア加算手段を備
えることを特徴とする、請求項1記載のストロークパタ
ーン整合装置。
2. The stroke pattern matching device according to claim 1, wherein the feature point matching means comprises a relationship score adding means for correcting the matching result by using the relationship between a plurality of feature points.
【請求項3】前記線分整合手段が、複数の線分の関係を
用いて整合結果を修正する関係スコア加算手段を備える
ことを特徴とする、請求項1記載のストロークパターン
整合装置。
3. The stroke pattern matching device according to claim 1, wherein said line segment matching means comprises a relationship score adding means for correcting the matching result by using the relationship between a plurality of line segments.
【請求項4】前記特徴点整合手段が、前記線分整合手段
の整合結果を用いて整合結果を修正する線分スコア加算
手段を備えることを特徴とする、請求項1記載のストロ
ークパターン整合装置。
4. The stroke pattern matching device according to claim 1, wherein said feature point matching means comprises line segment score adding means for correcting the matching result by using the matching result of said line segment matching means. .
【請求項5】前記線分整合手段が、前記特徴点整合手段
の整合結果を用いて整合結果を修正する特徴点スコア加
算手段を備えることを特徴とする、請求項1記載のスト
ロークパターン整合装置。
5. The stroke pattern matching device according to claim 1, wherein said line segment matching means comprises feature point score adding means for correcting the matching result by using the matching result of said feature point matching means. .
【請求項6】前記整合制御手段が、整合結果の得点の大
小関係を用いて、得点の修正を実施する手段と、前記特
徴点整合手段と前記線分整合手段をくり返し実行して、
整合結果を求める手段を備えることを特徴とする請求項
1記載のストロークパターン整合装置。
6. The matching control means repeatedly executes the means for correcting the score, the feature point matching means and the line segment matching means by using the magnitude relation of the score of the matching result,
The stroke pattern matching device according to claim 1, further comprising means for obtaining a matching result.
【請求項7】前記整合制御手段の整合結果に応じて、元
のストロークパターンを変形する画像変形手段を備え、
当該画像変形手段と、前記特徴点検出手段、前記特徴点
記述手段、前記線分記述手段、前記特徴点整合手段、前
記線分整合手段、前記整合制御手段をくり返し、駆動で
きることを特徴とする請求項1記載のストロークパター
ン整合装置。
7. An image transforming unit for transforming an original stroke pattern according to a matching result of the matching control unit,
The image transformation means, the feature point detection means, the feature point description means, the line segment description means, the feature point matching means, the line segment matching means, and the matching control means can be repeatedly driven. Item 1. The stroke pattern matching device according to item 1.
【請求項8】前記画像入力手段は、ストロークパターン
を座標点列であるオンラインデータとして入力し、前記
画像入力手段から得られたオンラインストロークパター
ンから構造を解析して特徴点を検出する特徴点検出手段
を備えることを特徴とする請求項1記載ストロークパタ
ーン整合装置。
8. The feature point detection, wherein the image input means inputs a stroke pattern as online data which is a sequence of coordinate points and analyzes the structure from the online stroke pattern obtained from the image input means to detect a feature point. The stroke pattern matching device according to claim 1, further comprising means.
JP7231042A 1995-09-08 1995-09-08 Stroke pattern matching device Expired - Fee Related JP2940445B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7231042A JP2940445B2 (en) 1995-09-08 1995-09-08 Stroke pattern matching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7231042A JP2940445B2 (en) 1995-09-08 1995-09-08 Stroke pattern matching device

Publications (2)

Publication Number Publication Date
JPH0981687A true JPH0981687A (en) 1997-03-28
JP2940445B2 JP2940445B2 (en) 1999-08-25

Family

ID=16917373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7231042A Expired - Fee Related JP2940445B2 (en) 1995-09-08 1995-09-08 Stroke pattern matching device

Country Status (1)

Country Link
JP (1) JP2940445B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012027778A (en) * 2010-07-26 2012-02-09 Casio Comput Co Ltd Character recognition device and program
US8538156B2 (en) 2010-07-26 2013-09-17 Casio Computer Co., Ltd. Character recognition device and recording medium
JP2014127187A (en) * 2012-12-27 2014-07-07 Toshiba Corp Feature calculation device, method, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012027778A (en) * 2010-07-26 2012-02-09 Casio Comput Co Ltd Character recognition device and program
US8538156B2 (en) 2010-07-26 2013-09-17 Casio Computer Co., Ltd. Character recognition device and recording medium
US8571321B2 (en) 2010-07-26 2013-10-29 Casio Computer Co., Ltd. Character recognition device and recording medium
JP2014127187A (en) * 2012-12-27 2014-07-07 Toshiba Corp Feature calculation device, method, and program

Also Published As

Publication number Publication date
JP2940445B2 (en) 1999-08-25

Similar Documents

Publication Publication Date Title
CN101770582B (en) Image matching system and method
CN108520247B (en) Method, device, terminal and readable medium for identifying object nodes in images
CN111488937B (en) Image matching method based on multi-scale neighbor deep neural network
US20220188975A1 (en) Image conversion device, image conversion model learning device, method, and program
US20250022301A1 (en) Joint text spotting and layout analysis
CN115187995B (en) Document correction method, device, electronic equipment and storage medium
CN119559178A (en) Lightweight PCB defect detection method, device and storage medium based on improved YOLOv8n
Satybaldina et al. Deep learning based static hand gesture recognition
JP2016045884A (en) Pattern recognition apparatus and pattern recognition method
JP2940445B2 (en) Stroke pattern matching device
CN112464753A (en) Method and device for detecting key points in image and terminal equipment
CN118196396A (en) Underwater target detection method based on deep learning
Luo et al. End-to-end feature pyramid network for real-time multi-person pose estimation
Jiang et al. High precision deep learning-based tabular position detection
CN114549862A (en) Human body point cloud framework extraction method based on multitask learning
CN119600104B (en) Industrial robot visual positioning method and system based on machine learning
CN117975460A (en) Answer correction method, device, electronic equipment and storage medium
JP2885476B2 (en) Image processing method and apparatus
CN117830603A (en) Image alignment calibration method, device, electronic device and storage medium
Cuia et al. Research on Facial Landmark Detection Algorithm Based on Improved Attention Mechanism
CN114612480A (en) Method, device, equipment, medium and product for detecting the bending state of anti-vibration hammer
JP2024028183A (en) Motion recognition device, method and electronic equipment
Mu et al. Human Pose Estimation Based on Ehanced Lightweight High-Resolution Network
CN117933284A (en) Card information identification method, device, equipment and readable storage medium
Robal et al. Databases and Information Systems

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080618

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090618

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20100618

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100618

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20110618

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20110618

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20120618

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20120618

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20130618

Year of fee payment: 14

LAPS Cancellation because of no payment of annual fees