JP2849101B2 - Loop determination method for line figures in character recognition - Google Patents

Loop determination method for line figures in character recognition

Info

Publication number
JP2849101B2
JP2849101B2 JP63328403A JP32840388A JP2849101B2 JP 2849101 B2 JP2849101 B2 JP 2849101B2 JP 63328403 A JP63328403 A JP 63328403A JP 32840388 A JP32840388 A JP 32840388A JP 2849101 B2 JP2849101 B2 JP 2849101B2
Authority
JP
Japan
Prior art keywords
branch
loop
node
point
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP63328403A
Other languages
Japanese (ja)
Other versions
JPH02171979A (en
Inventor
泰生 藤田
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.)
Glory Ltd
Original Assignee
Glory Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Glory Ltd filed Critical Glory Ltd
Priority to JP63328403A priority Critical patent/JP2849101B2/en
Publication of JPH02171979A publication Critical patent/JPH02171979A/en
Application granted granted Critical
Publication of JP2849101B2 publication Critical patent/JP2849101B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 発明の目的; (産業上の利用分野) この発明は、手書き文字等の図形を細線化処理して得
られた図形パターンを認識するための線図形のループ決
定方法に関する。
The present invention relates to a method of determining a loop of a line figure for recognizing a figure pattern obtained by thinning a figure such as a handwritten character. .

(従来の技術) 閉図形の包含関係を判定するものとして特開昭62−16
0584号公報に示されるものがある。これは、同公報第6
図(a),(b)に示すような2つの閉図形A,Bがある
場合、この2つの閉図形の包含関係を判定するものであ
る。第6図(a)ではA,Bは互いに包含関係は無く、同
図(b)ではBがAに含まれる。
(Prior Art) Japanese Patent Application Laid-Open No. Sho 62-16 discloses a technique for determining the inclusion relation of a closed figure.
There is one disclosed in Japanese Patent No. 0584. This is the sixth publication of the publication.
When there are two closed figures A and B as shown in FIGS. 9A and 9B, the inclusion relation between these two closed figures is determined. In FIG. 6A, A and B do not have an inclusive relation to each other, and B is included in A in FIG.

(発明が解決しようとする課題) しかしながら、この公報で述べられている包含関係
は、一方の閉図形が他の閉図形を完全に包んでいるか
(共通線分がない)、又は全く別個のものであるかを判
断しているに過ぎない。したがって、この判定技術では
2つの閉図形の線分の一部が共通となっている場合、包
含関係を判定することはできない。なぜなら、この判定
技術では、2つの閉図形が交差又は接していないときに
一旦追跡し、その後に両図形を線分で仮想的に結んで追
跡を行なうので、初めから両図形が線分を共通に有して
いるときには、仮想線を結ぶ以前に曲線の追跡自体が定
まらないからである。
(Problems to be Solved by the Invention) However, the inclusion relation described in this publication is such that one closed figure completely encloses another closed figure (no common line segment) or is completely separate. It is just judging whether it is. Therefore, with this determination technique, it is not possible to determine the inclusion relationship when a part of the line segment of the two closed graphics is common. Because, in this determination technique, when two closed figures do not intersect or touch, they are once traced, and then the two figures are virtually connected by a line segment for tracking, so that both figures share the line segment from the beginning. This is because the tracking of the curve itself is not determined before connecting the virtual line.

よって、この発明の目的は、線分の一部を共通とする
2つの閉図形がある場合、その包含関係を判定すると共
に、包含関係があるときには包含関係を有しない2つの
閉図形に分離させるようにした線分図形のループ決定方
法を提供することにある。
Therefore, an object of the present invention is to determine the inclusion relationship between two closed figures sharing a part of a line segment and to separate the two into two closed figures having no inclusion relationship when there is an inclusion relation. It is an object of the present invention to provide a method for determining a loop of a line segment figure.

発明の構成; (課題を解決するための手段) この発明は文字認識におけるループ決定方法に関する
もので、この発明の上記目的は、文字等の図形を細線化
して認識する際、前記線図形を端点又は分岐点のノード
と前記ノードを結ぶ線分のブランチとで表現すると共
に、前記ブランチで構成された閉曲線をループとし、前
記ノード及び前記ブランチを追跡して追跡データを求
め、この追跡データにより2個のループが検出された場
合を第1ループ及び第2ループとし、これら第1ループ
及び第2ループを構成する全ブランチを、前記第1ルー
プ及び第2ループの2つに重複して用いられている第3
ブランチ群と、前記第1ループから前記第3ブランチ群
を消去した第1ブランチ群と、前記第2ループから前記
第3ブランチ群を消去した第2ブランチ群との3種類の
ブランチ群に分類し、前記3種類のブランチ群を共通点
をKとしてxy座標上に展開し、この展開された前記3種
類のブランチ群をxy方向に走査し、この走査において前
記ブランチ群のうちの2種類が判明した時点で前記走査
を中止し、前記ブランチ群の2種類を外側ブランチ群と
決定し、残る一群を共通ブランチ群とし、前記2種類の
外側ブランチ群と前記共通ブランチ群とで前記2個のル
ープを再構成することによって達成される。
SUMMARY OF THE INVENTION (Means for Solving the Problems) The present invention relates to a loop determining method in character recognition, and an object of the present invention is to provide a method for thinning a figure such as a character when recognizing the figure as an end point. Alternatively, a node at a branch point and a branch of a line segment connecting the node are expressed as a loop, and a closed curve formed by the branch is used as a loop, and the node and the branch are tracked to obtain tracking data. The number of detected loops is defined as a first loop and a second loop, and all the branches constituting the first loop and the second loop are used in duplicate with the two loops of the first loop and the second loop. Third
A first branch group obtained by deleting the third branch group from the first loop; and a second branch group obtained by deleting the third branch group from the second loop. The three types of branch groups are developed on xy coordinates with a common point as K, and the developed three types of branch groups are scanned in the xy direction. In this scan, two types of the branch groups are found. At this point, the scanning is stopped, the two types of branch groups are determined as outer branch groups, and the remaining group is defined as a common branch group. The two types of outer branch groups and the common branch group are used as the two loops. This is achieved by reconstructing

(作用) この発明の文字認識では、細線化された文字等の線図
形の追跡を次のように行なう。すなわち、開始点を走査
線の交叉点又は任意の1つのノードに決定して最初の追
跡を行ない、次のノードまでブランチを追跡した後に、
その到達したノードに未追跡のブランチが有るか否かを
登録した後、元の開始点に戻ってその開始点に未追跡の
ブランチがまだ有るか否かを判断し、未追跡のブランチ
が有る場合には所定の追跡探索順序に従った順番のブラ
ンチの次のノードまで追跡を行ない、そのノードに達す
るとここでの未追跡又は追跡済みのブランチの登録を行
なってから当該ブランチの最初のノードに戻り、この戻
ったノードにおける未追跡のブランチに対して同様の追
跡を前記所定の追跡探索順序に従った順番に順次行な
い、各ノードに達する毎に元のノードに戻って未追跡の
ブランチが有るか否かを判断する。未追跡のブランチが
無くなるまで上述の追跡動作を繰返し、未追跡のブラン
チが無くなった場合には、最初の追跡で到達したノード
に進んでその登録データを参照して、未追跡のブランチ
に対して上記所定の追跡探索順序の方向に従って次のノ
ードまで追跡を行なうような動作を繰返している。この
ような追跡を行なう結果、線図形に対する閉ループの構
成において、複数の閉ループが共通した線分を要素して
構成された場合にも、複数の閉ループが認識された時に
図形としての包含関係を持たせないように分離処理し、
ブランチ群の外側及び内側の位置関係を座標上に展開し
て調べてループを再構成しているので、より正確な文字
認識を実現することができる。
(Operation) In the character recognition of the present invention, tracking of a line graphic such as a thinned character is performed as follows. That is, the starting point is determined at the intersection of the scanning lines or any one node, the first tracking is performed, and after the branch is tracked to the next node,
After registering whether the reached node has an untracked branch or not, return to the original starting point and determine whether or not the starting point still has an untracked branch, and there is an untracked branch. In this case, the tracing is performed to the next node of the branch in the order according to the predetermined tracing search order, and when the node is reached, the untracked or tracked branch is registered here, and then the first node of the branch is performed. The same tracking is sequentially performed on the untracked branch at the returned node in the order according to the predetermined tracking search order, and each time the node is reached, the process returns to the original node and the untracked branch is returned. It is determined whether or not there is. Repeat the above tracking operation until there are no untracked branches, and when there are no untracked branches, go to the node reached in the first tracking and refer to the registered data, and The operation of performing tracking to the next node according to the direction of the predetermined tracking search order is repeated. As a result of performing such tracking, even in the case where a plurality of closed loops are configured with elements of a common line segment in a closed loop configuration for a line figure, when a plurality of closed loops are recognized, they have an inclusive relation as a figure. Separation processing so that it does not
Since the loop is reconstructed by expanding and examining the positional relationship between the outside and inside of the branch group on the coordinates, more accurate character recognition can be realized.

(実施例) 第1図は、この発明の前提となる細線化した図形の追
跡方法を説明するための図であり、この線図形はノード
N1〜N10と各ノードの間のブランチBR1〜BR10で構成され
た数字(2,3の続け書き)の例を示しており、追跡のた
めの走査はy方向且つx方向に移動する走査線SLによっ
て行なう例を示している。この場合の文字線図形ではノ
ードN1が最初に走査線SLと交叉するので、このノードN1
を開始点として最初にブランチBR1を追跡し、ノードN2
に達した時に一旦最初の開始点N1に戻り、この開始点N1
で未追跡のブランチが有るか否かを判断する。この場合
は未追跡のブランチが無いので、前追跡で得られている
ノードN2に進んで、このノードN2で未追跡のブランチが
有るか否かを判断するが、この例ではブランチBR2及びB
R3が未追跡であるので、第3図で示すような追跡探索順
序“1"→“8"の方向に従った数字の小さいブランチBR2
を先ず追跡する。この追跡探索順序の決定は第2図で示
すようなマスクパターンによって行ない、マスクの中央
を目的とするドットに合せ、対応した周辺の8画素の方
向コードによって追跡探索順序を決定するようにしてい
る。
(Embodiment) FIG. 1 is a diagram for explaining a method of tracking a thinned figure which is a premise of the present invention.
The figure shows an example of numbers (continuous writing of 2, 3) composed of branches BR1 to BR10 between N1 to N10 and each node, and the scanning for tracking is a scanning line SL that moves in the y direction and the x direction. An example is shown below. In the character line figure in this case, since the node N1 intersects the scanning line SL first, the node N1
Traces branch BR1 first, starting at node N2
, Once it returns to the first starting point N1, this starting point N1
To determine if there is an untracked branch. In this case, since there is no untracked branch, the process proceeds to the node N2 obtained in the previous tracking to determine whether or not there is an untracked branch at this node N2. In this example, the branches BR2 and B
Since R3 has not been tracked, the branch BR2 having a small number according to the tracking search order “1” → “8” as shown in FIG.
Is tracked first. The determination of the tracking search order is performed by a mask pattern as shown in FIG. 2, the center of the mask is adjusted to the target dot, and the tracking search order is determined by the direction codes of the corresponding eight peripheral pixels. .

ノードN3に達した時にノードN2まで戻り、このノード
N2でまだ未追跡のブランチが有るか否かを判断するが、
この例ではブランチBR3が未追跡であるので、このブラ
ンチBR3を追跡して遂にはノードN5に達する。このノー
ドN5に達した時に再びノードN2まで戻り、このノードN2
で未追跡のブランチが有るか否かを判断するが、この例
では未追跡のブランチは無いので最初にノードN3まで進
み、このノードN3から第3図の追跡探索順序に従った方
向の順番に未追跡のブランチ(この例ではBR4で示すル
ープ)を追跡し、ノードN3、つまりスタート点に達した
時にこのノードN3で未追跡のブランチが有るか否かを判
断する。この例ではブランチBR5が未追跡であるのでノ
ードN4まで追跡し、その後にノードN3に戻る。ノードN3
に戻ると、ノードN2に対する追跡で得られている次の到
達点であるノードN5に進み、このノードN5で未追跡のブ
ランチが有るか否かを判断する。この例では、追跡探索
順序に従ったブランチBR6の追跡を先ずノードN6まで行
ない、ノードN5に戻って次のブランチBR7の追跡をノー
ドN7まで行ない、ノードN5まで戻って次の未追跡のブラ
ンチBR8をノードN8まで追跡する。ノードN8まで追跡が
行なわれると再びノードN5まで戻り、このノードN5で未
追跡のブランチがまだ有るか否かを判断するが、この例
では全て追跡済みであるので、ノードN8まで進む。そし
て、このノードN8で未追跡のブランチを追跡探索順序に
従って決定してから追跡を行なうが、この例では先ずブ
ランチBRをノードN9まで追跡し、ノードN8に戻った後に
ブランチBR10の追跡をノードN10まで行なってから再び
ノードN8に戻る。ノードN8に戻ると、この時点では未追
跡のブランチは無く、しかも端点でない未追跡のノード
は無いので追跡が終了したことが判る。
When reaching node N3, return to node N2, this node
N2 determines if there are any untracked branches yet,
In this example, since the branch BR3 has not been tracked, the branch BR3 is tracked and finally reaches the node N5. When it reaches this node N5, it returns to node N2 again, and this node N2
It is determined whether or not there is an untracked branch. In this example, since there is no untracked branch, the process first proceeds to the node N3, and from this node N3 in the direction according to the tracking search order in FIG. The untracked branch (the loop indicated by BR4 in this example) is tracked, and it is determined whether or not there is an untracked branch at the node N3 when the node N3 reaches the start point. In this example, since the branch BR5 has not been tracked, the branch BR5 tracks the node N4, and then returns to the node N3. Node N3
Then, the process proceeds to the node N5, which is the next destination obtained by tracking the node N2, and it is determined whether or not there is an untracked branch at this node N5. In this example, the branch BR6 according to the tracking search order is first traced to the node N6, and the process returns to the node N5 to trace the next branch BR7 to the node N7. To node N8. When the tracing is performed to the node N8, the process returns to the node N5 again, and it is determined whether or not there is an untracked branch at the node N5. In this example, since all the tracing has been completed, the process proceeds to the node N8. Then, the node N8 determines the untracked branch in accordance with the tracking search order and then performs tracking. And then return to node N8 again. Returning to the node N8, at this point, there is no untracked branch, and there is no untracked node that is not an end point, so it is known that the tracking has been completed.

上述のような線図形の追跡において、1本のブランチ
を追跡してその終点ノードが分岐点であり、かつ上記終
点ノードが現ブランチの追跡以前に登録されていた場合
に、ループが発生したことになる。追跡データのツリー
構造に対して、たとえば第4図に示すようにノード及び
ブランチに数字名称を与える。すなわち、数字がノード
名であり、アンダーライン付き数字がブランチ名であ
る。第4図においてループが発生したのは、ノード1112
から出発してブランチ11122を追跡終了した時点であ
る。つまり、ノード1121とノード11122は同一点であっ
たことが分った時点である。よって、ノードAには2つ
の名称が与えられ、この名称から構成ブランチが判明す
る。すなわち、名称が同一部分から始点はノード11であ
り、名称が異なる部分より構成ブランチ名は となり、構成ブランチ数は“5"であることが分る。次
に、後処理としてノードAに対する名称は後から付せら
れた名称に変更しておく。これは、始点を更新すること
になり、ループを構成するブランチの数をできるだけ減
らすことができ、ループ自体を小さくできる。第5図は
その例を示しており、ノード121とノード1121が同じで
あると判明した時点で第1ループと判断される。始点は
1、構成ブランチは12121111121121である。ま
た、ノード1122とノード11211が同じであると判明した
時点で第2ループと判断される。始点は112、構成ブラ
ンチは1122112111211である。この第5図におい
て、第1ループの後処理を行なわなければ第5図のノー
ド[11211]は1211となる(図示せず)。その場合、こ
のノード1211とノード1122が同じであると判明した時点
で第2ループと判断されることになり、その始点は1、
構成ブランチは121211211(第5図では図示してい
ないが11211のブランチのこと),111121122とな
り、ループが大きくなってしまう。
In the above-described line figure tracing, when a single branch is traced and its end node is a branch point, and the end node is registered before tracing the current branch, a loop has occurred. become. For the tree structure of the tracking data, for example, numerical names are given to nodes and branches as shown in FIG. That is, the number is the node name, and the underlined number is the branch name. In FIG. 4, the loop occurred at node 1112.
At the time when the tracking of the branch 11122 is completed. In other words, this is the point in time when it is found that the nodes 1121 and 11122 are at the same point. Therefore, two names are given to the node A, and the constituent branch is identified from the names. That is, the starting point is the node 11 from the part having the same name, and the constituent branch name is It can be seen that the number of constituent branches is “5”. Next, as post-processing, the name for the node A is changed to a name given later. This means that the starting point is updated, the number of branches forming the loop can be reduced as much as possible, and the loop itself can be reduced. FIG. 5 shows an example of this. When it is determined that the nodes 121 and 1121 are the same, the first loop is determined. The starting point is 1, and the constituent branches are 12 , 121 , 11 , 112 , 1121 . When it is determined that the nodes 1122 and 11211 are the same, the second loop is determined. The starting point is 112, and the constituent branches are 1122 , 1121 , 11211 . In FIG. 5, if the post-processing of the first loop is not performed, the node [11211] in FIG. 5 becomes 1211 (not shown). In this case, when it is determined that the nodes 1211 and 1122 are the same, the second loop is determined, and the starting point is 1,
The constituent branches are 12 , 121 , 1211 (not shown in FIG. 5, but the 11211 branch), 11 , 112 , 1122 , and the loop becomes large.

次に、1本のブランチのみで構成されるループの場合
について説明する。第6図で示すように、第2ループが
1本のブランチで構成されている場合には後処理は施さ
ない。何故ならば、始点を更新する必要がないからであ
る。第7図の例においても同様に後処理の必要はない。
Next, a case of a loop composed of only one branch will be described. As shown in FIG. 6, when the second loop is composed of one branch, no post-processing is performed. This is because there is no need to update the starting point. In the example of FIG. 7, there is no need for post-processing.

1本のブランチで構成されたループか否かは、追跡し
たブランチの終点が一致したノードがブランチの始点で
あるか否かで判断できる。具体的手法として、ノードに
ついてこれが登録された場合の親ブランチがどれかを示
す情報を持たせ、ブランチについてはその始点のノード
がどれかを示す情報を持たせる。この情報を用いて、ル
ープが発生したノードから始点まで検索すれば構成ブラ
ンチを抽出することができる。
Whether or not the loop is composed of one branch can be determined based on whether or not the node whose end point of the tracked branch coincides is the start point of the branch. As a specific method, information indicating a parent branch when the node is registered is provided for a node, and information indicating a node at the start point is provided for a branch. By using this information to search from the node where the loop has occurred to the start point, the constituent branch can be extracted.

次に、ブランチが重複して使用されている複数のルー
プを包含関係が無いように分離する方法を説明する。
Next, a description will be given of a method of separating a plurality of loops in which branches are used redundantly so that there is no inclusive relation.

第8図(A)で示すような図形パターンの追跡図にお
いて、上述したような方法でループを作成すると、包含
関係が明確でない2個のループが作成されてしまう。こ
のとき、追跡順序のみで包含関係を表現することはでき
ない。ここで2個の接するループ、つまりブランチが重
複して使用されているループについて考えると、第8図
(B)の追跡図は第9図に示すように2個のノードA,B
と、3種類のブランチ群(ここでは仮に1群…1,4、2
群…3,9,11、3群…2,7に分類する)とで構成される。
なお、第8図(C)にブランチ名を下線付き数字で表わ
したものを示す。対応関係は11が1、12が2、13が3、
111が4、112が5、121が6、122が7、131が8、132
9、1321が10、1322が11となる。また、追跡データのツ
リー構造を第8図(D)に示す。このツリーから第1ル
ープ(ループ1)は1112111121、即ち、1,2,4,7
であり、第2ループ(ループ2)は1213122132
1322、即ち、2,3,7,9,11であることが分かる。そして、
包含関係を持たないためには、3種類のブランチ群の内
のどのブランチ群が2個のループの接触線(共通部分)
となるかを判定すればよい。
When a loop is created by the above-described method in the trace diagram of the graphic pattern as shown in FIG. 8A, two loops whose inclusion relation is not clear are created. At this time, the inclusion relation cannot be expressed only by the tracking order. Considering two adjacent loops, that is, a loop in which branches are used in duplicate, the tracking diagram in FIG. 8B shows two nodes A and B as shown in FIG.
And three types of branch groups (here, tentatively one group… 1,4,2
Groups: 3, 9, 11, 3 groups: 2, 7).
FIG. 8C shows the branch names represented by underlined numbers. The correspondence is 11 for 1, 12 for 2, 13 for 3,
111 is 4, 112 is 5, 121 is 6, 122 is 7, 131 is 8, 132 is 9, 1321 is 10, and 1322 is 11. FIG. 8D shows a tree structure of the tracking data. From this tree, the first loop (Loop 1) is 11 , 12 , 111 , 121 , ie, 1,2,4,7
And the second loop (Loop 2) is 12 , 13 , 122 , 132 ,
1322 , that is, 2,3,7,9,11. And
In order to have no inclusive relation, which of the three types of branch groups is the contact line of two loops (common part)
It is sufficient to determine whether

(i)ステップ1: 追跡結果から得られた2個のループに対して、その構
成ブランチからブランチを3種類のブランチ群に分類す
る。すなわち、第10図(A)で示すループ1の構成ブラ
ンチは“1,2,4,7"であり、同図(B)に示すループ2の
構成ブランチは“2,3,7,9,11"であり、2個のループ1
及び2の重複する複数(1個の場合もある)のブランチ
を第3ブランチ群とすると、第3ブランチ群=2,7とな
る。そしてループ1の構成ブランチからこの第3ブラン
チ群を除いたブランチ群を第1ブランチ群とし、また、
ループ2の構成ブランチからこの第3ブランチ群を除い
たブランチ群を第2ブランチ群とすると、第1ブランチ
群〜1,4、第2ブランチ群=3,9,11となり、3種類のブ
ランチ群に分類できる(第10図(C)参照)。
(I) Step 1: For two loops obtained from the tracking result, the branches from the constituent branches are classified into three types of branch groups. That is, the constituent branch of the loop 1 shown in FIG. 10 (A) is “1,2,4,7”, and the constituent branch of the loop 2 shown in FIG. 10 (B) is “2,3,7,9, 11 "and two loops 1
If a plurality of (and sometimes one) overlapping branches of the second and third branches are defined as a third branch group, the third branch group = 2,7. A branch group obtained by removing the third branch group from the constituent branches of the loop 1 is referred to as a first branch group.
Assuming that a branch group obtained by removing the third branch group from the constituent branches of the loop 2 is a second branch group, the first branch group to 1,4 and the second branch group = 3,9,11. (See FIG. 10 (C)).

(ii)ステップ2: 上記ステップ1で得られた3個のブランチ群を、第11
図に示すようにxy座標上に展開する。展開するときに各
ブランチ群の名称(この例では“1",“2",“3")を付
し、共通点を“K"とする。
(Ii) Step 2: The three branch groups obtained in the above step 1 are
Expand on the xy coordinates as shown in the figure. At the time of expansion, the name of each branch group (“1”, “2”, “3” in this example) is given, and the common point is “K”.

(iii)ステップ3−1: 展開した座標上を第12図に示す如くブランチ群1〜3
及び共通点Kに達するまで外側より走査する。この場
合、主走査をA方向、副走査をB方向とし、たとえば第
11図の(1)→(2)→(3)→(4)の順番に行な
う。なお、主走査及び副走査方向は逆でも良く、(1)
〜(4)の走査順は任意に変更可能である。上記走査の
ときに第1〜第3ブランチ群のうちの2種が判明した時
点で走査を中止し、この2組を外側ブランチ群と決定
し、残る1群を共通ブランチ群とする。た第12図の例で
は、第11図の(1)方向走査で上から8回目の走査、つ
まり副走査B方向が8回目で左から4つ目において2種
目の第1ブランチ群を見付けるので、この時点に第3及
び第1ブランチ群を外側と決定して走査を終了する。
(Iii) Step 3-1: On the developed coordinates, branch groups 1 to 3 as shown in FIG.
And scanning from the outside until the common point K is reached. In this case, the main scanning is in the direction A and the sub-scanning is in the direction B.
Perform in the order of (1) → (2) → (3) → (4) in FIG. Note that the main scanning and sub-scanning directions may be reversed, and (1)
The scanning order of (4) can be arbitrarily changed. Scanning is stopped when two of the first to third branch groups are found at the time of the scan, the two sets are determined as the outer branch groups, and the remaining group is set as the common branch group. In the example shown in FIG. 12, the eighth scan from the top in the direction (1) in FIG. 11, that is, the second scan in the sub-scanning B direction is the eighth scan and the second branch group is found in the fourth scan from the left. At this point, the third and first branch groups are determined to be outside, and scanning is terminated.

(iv)ステップ3−2 : 上記ステップ3−1で1個のブランチ群しか判明しな
い場合は、見付かった1群の線上を共通点Kから走査
し、外側領域を8近傍に含む点を捜す。そして、この点
より順次共通点Kまで8近傍で外側領域の決定を行な
い、共通点Kの終了後に共通点Kの8近傍無いにある他
の2ブランチ群の各端点について、8近傍の中に外側領
域があるかを確認する。この場合、必ずどちらかの点は
外側領域に接しており、外側領域に接する群を第2の外
側ブランチ群として終了する。すなわち、第13図(A)
で示すような図形パターンのブランチ群は同図(B)の
ようになり、上記ステップ3−1では1個のブランチ群
しか判明しないことになる。第13図(B)の追跡図の2
個の共通点Kの一方を第14図の如くKa,他方をKb(どち
らをKa,Kbとしても可)とし、Ka点の回りの第15図
(A)で示す8近傍を見て、外側領域の部分を含んでい
るか否かを判断する。ここでいう外側領域とは前述のス
テップ3−1で走査した外側の部分、すなわち第14図の
斜線部分である。この場合、外側領域はKa点の8近傍に
は無いので、ステップ3−1で見付けた一群の線上に沿
って外側領域を8近傍に含む点まで走査を続ける。つま
り、ステップ3−1では1つが見付かっているので、Ka
点の次には第15図(B)の如く右上の“1"の点の8近傍
を見るが、外側領域を含んでいないので、更に同図
(C)の如く右上の“1"の点の8近傍を見る。これによ
り斜線部の外側領域を発見するので、第15図(D)の如
く外側領域を8近傍領域において画素EN1まで拡張す
る。上記拡張操作を順次Ka点まで繰返すと、第15図
(E)から同図(F)の如くなり、Ka点の8近傍ではも
う各地用できる点はない。なお、第15図(E)のEN2及
びEN3点は拡張された画素を示している。そして、Ka
まで戻ると、Ka点の8近傍内にある他の2つの群の各端
点について、8近傍の中に外側領域が存在するか確認す
る。今の場合、第15図(G)の如く共通点K2に連なる
“2"の端点の8近傍には外側領域は、存在しないが、同
図(H)のように“3"の端点の近傍8近傍に外側領域が
あるので、外側領域と接する残りの1群は第2ブランチ
群と決定される。
(Iv) Step 3-2: If only one branch group is found in step 3-1 above, the line of the found group is scanned from the common point K, and a point including the outer region near 8 is searched. From this point, an outer area is sequentially determined in the vicinity of 8 to the common point K. After the completion of the common point K, each end point of the other two branch groups that are not in the vicinity of 8 in the common point K is included in the 8 neighborhoods. Check for outside areas. In this case, one of the points is always in contact with the outer region, and the group in contact with the outer region ends as the second outer branch group. That is, FIG. 13 (A)
The branch group of the graphic pattern as shown by (2) is as shown in FIG. 3 (B), and only one branch group is found in step 3-1. 13 of the tracking diagram in FIG. 13 (B)
Pieces of one of the 14 views of as K a common point K, K b and the other (the both variable as K a, K b) and then, eight neighbor shown in FIG. 15 around the K a point (A) , It is determined whether or not a portion of the outer region is included. The outer region here is the outer portion scanned in step 3-1 described above, that is, the hatched portion in FIG. In this case, the outer region so not to 8 near the K a point, continued scanning to a point where an outer area 8 near along the group of a line found at step 3-1. That is, because one step 3-1 are found, K a
Next to the point, as shown in FIG. 15 (B), the vicinity of point 8 of the upper right “1” is seen. However, since it does not include the outer region, the point of the upper right “1” is further shown in FIG. 15 (C). Look around 8 of. As a result, since the outer region of the hatched portion is found, the outer region is extended to the pixel EN1 in the eight neighboring regions as shown in FIG. 15 (D). When repeated until successively K a point above extended operation, made as a FIG. 15 (E) in FIG. (F), not that it can for other Regions in 8 near the K a point. Note that points EN2 and EN3 in FIG. 15E indicate expanded pixels. Then, returning to the K a point for each end point of the other two groups within 8 near the K a point, to check whether the outer region present in the 8-neighborhood. In this case, as shown in FIG. 15 (G), there is no outside area near 8 of the end point of “2” connected to the common point K 2 , but as shown in FIG. Since there is an outer region near the vicinity 8, the remaining one group in contact with the outer region is determined as the second branch group.

(V)ステップ4: 外側領域との境界である2つのブランチ群と残る内側
の1群とで、内側を共通ブランチ群となるように2個の
ループの再構成を行なう。第9図の図形パターンの場合
には第16図(A),(B)で示すような第1ループ及び
第2ループが再構成され、第13図(A)の図形ターンの
場合には第17図(A),(B)で示すような第1ループ
及び第2ループが再構成される。
(V) Step 4: Two loops are reconstructed so that the inside is a common branch group by the two branch groups that are boundaries with the outside region and the remaining inside group. In the case of the graphic pattern shown in FIG. 9, the first loop and the second loop shown in FIGS. 16A and 16B are reconstructed. In the case of the graphic turn shown in FIG. The first loop and the second loop as shown in FIGS. 17A and 17B are reconfigured.

以上のステップ1〜4で、共通するブランチ群を有す
る2個のループの包含関係をチェックし、領域的に独立
したループを再構成することができる。
In steps 1 to 4 described above, the inclusion relationship between two loops having a common branch group can be checked, and loops that are regionally independent can be reconstructed.

発明の効果; 以上のようにこの発明のループ決定方法によれば、閉
ループの構成において、複数の閉ループが共通した線分
を要素して構成された場合に、これら複数の閉ループが
図形としての包含関係を持たせないように分離して、外
側及び内側の関係を調べて再構成しているので、より正
確な文字認識を実現することができる。
Effects of the Invention As described above, according to the loop determination method of the present invention, when a plurality of closed loops are configured by common line segments in a closed loop configuration, these closed loops are included as graphics. Since the data is separated so as not to have a relationship and the outer and inner relationships are examined and reconstructed, more accurate character recognition can be realized.

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

第1図はこの発明の原理となる追跡原理を説明するため
の図、第2図は追跡に用いるマスクパターンの一例を示
す図、第3図は追跡探索順序の方向の例を説明するため
の図、第4図〜第7図は閉ループの作成を説明するため
の図、第8図は図形の追跡例を示す図、第9図〜第17図
(A),(B)はそれぞれその発明のループ再構成を説
明するための図である。 N1〜N10……ノード。BR1〜BR10……ブランチ、n1〜n4,N
10〜n13……ノード、br1〜br3,br10〜br12……ブラン
チ。
FIG. 1 is a diagram for explaining a tracking principle which is a principle of the present invention, FIG. 2 is a diagram showing an example of a mask pattern used for tracking, and FIG. 3 is a diagram for explaining an example of a direction of a tracking search order. FIGS. 4 to 7 are diagrams for explaining creation of a closed loop, FIG. 8 is a diagram showing an example of figure tracking, and FIGS. 9 to 17 (A) and (B) are the inventions, respectively. FIG. 4 is a diagram for explaining loop reconfiguration of FIG. N1 to N10 ... nodes. BR1 ~ BR10 ... branch, n1 ~ n4, N
10 to n13: Node, br1 to br3, br10 to br12 ... Branch.

フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06K 9/46 G06T 7/00Continuation of the front page (58) Field surveyed (Int.Cl. 6 , DB name) G06K 9/46 G06T 7/00

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】文字等の図形を細線化して認識する際、前
記線図形を端点又は分岐点のノードと前記ノードを結ぶ
線分のブランチとで表現すると共に、前記ブランチで構
成された閉曲線をループとし、前記ノード及び前記ブラ
ンチを追跡して追跡データを求め、この追跡データによ
り2個のループが検出された場合を第1ループ及び第2
ループとし、これら第1ループ及び第2ループを構成す
る全ブランチを、前記第1ループ及び第2ループの2つ
に重複して用いられている第3ブランチ群と、前記第1
ループから前記第3ブランチ群を消去した第1ブランチ
群と、前記第2ループから前記第3ブランチ群を消去し
た第2ブランチ群との3種類のブランチ群に分類し、前
記3種類のブランチ群を共通点をKとしてxy座標上に展
開し、この展開された前記3種類のブランチ群をxy方向
に走査し、この走査において前記ブランチ群のうちの2
種類が判明した時点で前記走査を中止し、前記ブランチ
群の2種類を外側ブランチ群と決定し、残る一群を共通
ブランチ群とし、前記2種類の外側ブランチ群と前記共
通ブランチ群とで前記2個のループを再構成するように
したことを特徴とする文字認識における線図形のループ
決定方法。
When a figure such as a character is thinned and recognized, the line figure is represented by a node at an end point or a branch point and a branch of a line connecting the node, and a closed curve formed by the branch is represented. A loop is determined by tracing the node and the branch to obtain tracking data. When two loops are detected based on the tracking data, a first loop and a second loop are determined.
A first branch and a second loop, wherein the first and second loops are all divided into a third branch group which is used by overlapping with the first and second loops;
A first branch group in which the third branch group is deleted from the loop; and a second branch group in which the third branch group is deleted from the second loop, the three types of branch groups. Are developed on the xy coordinate with the common point as K, and the developed three types of branch groups are scanned in the xy direction. In this scanning, two of the branch groups are scanned.
When the type is determined, the scanning is stopped, the two types of the branch groups are determined as the outer branch groups, and the remaining group is defined as the common branch group. A loop determining method for a line figure in character recognition, wherein loops are reconstructed.
【請求項2】前記xy方向の走査で前記ブランチ群の1個
しか判明しない場合には、判明した1つのブランチ群の
線上を前記K点から走査し、外側領域を8近傍に含む点
を探索し、この探索点より順次前記K点まで前記8近傍
で前記外側領域の決定を行ない、前記K点の終了後に前
記K点の8近傍内にある他の2群の各端点について前記
8近傍の中に前記外側領域が存在するかを確認し、前記
外側領域に接する群を第2の外側ブランチ群として終了
するようになっている請求項1に記載の文字認識におけ
る線図形のループ決定方法。
2. When only one of the branch groups is found in the scanning in the xy direction, the line of the found one branch group is scanned from the point K to search for a point including the outer region near eight. Then, the outer region is determined in the vicinity of the eight points from the search point to the point K in sequence, and after the completion of the point K, the other two groups within the vicinity of the point K are subjected to the determination of the vicinity of the eight points. 2. The method according to claim 1, wherein it is determined whether or not the outside area exists in the inside, and a group in contact with the outside area ends as a second outside branch group.
JP63328403A 1988-12-26 1988-12-26 Loop determination method for line figures in character recognition Expired - Fee Related JP2849101B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63328403A JP2849101B2 (en) 1988-12-26 1988-12-26 Loop determination method for line figures in character recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63328403A JP2849101B2 (en) 1988-12-26 1988-12-26 Loop determination method for line figures in character recognition

Publications (2)

Publication Number Publication Date
JPH02171979A JPH02171979A (en) 1990-07-03
JP2849101B2 true JP2849101B2 (en) 1999-01-20

Family

ID=18209868

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63328403A Expired - Fee Related JP2849101B2 (en) 1988-12-26 1988-12-26 Loop determination method for line figures in character recognition

Country Status (1)

Country Link
JP (1) JP2849101B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6642917B1 (en) 1999-11-22 2003-11-04 Namco, Ltd. Sign perception system, game system, and computer-readable recording medium having game program recorded thereon
US6798402B1 (en) 1999-11-24 2004-09-28 Namco, Ltd. Received-light pattern detection apparatus

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4551310B2 (en) * 2005-10-27 2010-09-29 株式会社バンダイナムコゲームス Program, information storage medium, and contour area recognition device
JP4882929B2 (en) * 2007-09-11 2012-02-22 富士ゼロックス株式会社 Image processing apparatus and image processing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6642917B1 (en) 1999-11-22 2003-11-04 Namco, Ltd. Sign perception system, game system, and computer-readable recording medium having game program recorded thereon
US6798402B1 (en) 1999-11-24 2004-09-28 Namco, Ltd. Received-light pattern detection apparatus

Also Published As

Publication number Publication date
JPH02171979A (en) 1990-07-03

Similar Documents

Publication Publication Date Title
Wenyin et al. From raster to vectors: extracting visual information from line drawings
Chakravarty A single-pass, chain generating algorithm for region boundaries
JP2849101B2 (en) Loop determination method for line figures in character recognition
Svensson et al. Simplifying curve skeletons in volume images
JPH02263277A (en) Method for vectorizing line picture
US7295688B2 (en) Method and apparatus for matching streaked pattern image
JP3564371B2 (en) Figure editing apparatus and method
JP2878194B2 (en) Partial erasure and partial detection method of image data
JP3224500B2 (en) Drawing recognition method
JPH10149206A (en) Device and method for controlling and distributing design manufacture information over entire sheet metal working facility
JP3098439B2 (en) Polygon outline extraction device
JP2798402B2 (en) Method of determining stroke branch point and figure tracking method in figure recognition
JP3109585B2 (en) Method and apparatus for generating three-dimensional object data, and recording medium storing program for generating three-dimensional object data
CN116342738B (en) Automatic extraction and graphic display manufacturing method of forbidden vector range based on GIS
JP3340816B2 (en) Image processing device, map data input device, geographic information system, image processing method
JPH0510709B2 (en)
JP2867650B2 (en) Symbol candidate area detection method
JP2722962B2 (en) Drawing recognition device
JPH057751B2 (en)
Shimada et al. Representation and interpretation of overlapped line segments for automatic recognition of LSI cell drawings
JP2988024B2 (en) Line image collation device
JPH07234937A (en) Method and system for drawing recognition
Svensson et al. A tool for decomposing 3D discrete objects
JP2804347B2 (en) Image thinning method
JPH02266478A (en) Method for recognizing drawing

Legal Events

Date Code Title Description
S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees