JPH0358288A - Segment extracting device and graphic recognizing device - Google Patents

Segment extracting device and graphic recognizing device

Info

Publication number
JPH0358288A
JPH0358288A JP1195181A JP19518189A JPH0358288A JP H0358288 A JPH0358288 A JP H0358288A JP 1195181 A JP1195181 A JP 1195181A JP 19518189 A JP19518189 A JP 19518189A JP H0358288 A JPH0358288 A JP H0358288A
Authority
JP
Japan
Prior art keywords
black
run
pattern
segment
sub
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.)
Pending
Application number
JP1195181A
Other languages
Japanese (ja)
Inventor
Masahisa Yano
矢野 雅久
Takahiro Ogawa
小川 隆博
Kenichiro Uchimura
内村 憲一朗
Yoshiyuki Yamashita
山下 義征
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP1195181A priority Critical patent/JPH0358288A/en
Publication of JPH0358288A publication Critical patent/JPH0358288A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve the degree of extraction for the structure of characters and graphics by scanning a source pattern in a first scanning direction, extracting a sub pattern made into a code, executing scanning in the second scanning direction and detecting the head run, tail run and discontinuous run. CONSTITUTION:A threshold valuse set part 12, sub pattern extraction part 14 and segment extraction part 16 are provided. The source pattern is canned in the first scanning direction and a white code and a black code are attached. Then, the sub pattern made into the code is extracted. The sub pattern made into the code is canned in the second scanning direction and it is decided based on the coordinates of the black and white change points whether the second black run is linked or not. When the head run and tail run of the second black run to be linked are detected, the discontinuous run of the black pattern is detected based on the black code. Thus, the discontinuous run to change the geometrical feature of the black pattern can be detected and the segment expressing the geometrical feature can be extracted faithfully rather than conventional operation.

Description

【発明の詳細な説明】 (産業上の利用分野) この出願の第一発明は例えば文字図形の認識、検索等を
行なうための装置或はシステムにおいて、文字、図形の
セグメントを抽出するセグメシト抽出装置に闇する。
[Detailed Description of the Invention] (Industrial Application Field) The first invention of this application is a segment extraction device for extracting segments of characters and graphics, for example, in a device or system for recognizing and searching characters and graphics. to darken.

この出願の第二発明は文字図形から抽出したセグメント
を用いて文字図形を認識する図形認識装置に関する. (従来の技術) 従来より文字図形の認識、検索に文字図形から抽出した
セグメントが用いられている。このセグメントを抽出す
るための従来技術として、例えば文献工「昭和63年電
子情報通信学会春季全国大会 予稿集 D−399Jに
開示ざれているものがある.以下、この文献工の従来技
術につき説明する. この従来技術では、まず白黒2値の原パタンを走査して
(2X2)の窓の全ての画素が黒ビットとなる回数Aと
原パタンの前黒ビット数Qとを計数し、次式に従って原
パタンの平均線幅を得る。
The second invention of this application relates to a figure recognition device that recognizes character figures using segments extracted from character figures. (Prior Art) Segments extracted from text and graphics have conventionally been used to recognize and search text and graphics. As a conventional technique for extracting this segment, for example, there is a technique disclosed in the literature engineer, Proceedings of the Spring National Conference of the Institute of Electronics, Information and Communication Engineers, 1988, D-399J.Hereinafter, the conventional technique of this literature engineer will be explained. In this conventional technique, first, the original black and white binary pattern is scanned, the number of times A that all pixels in a (2×2) window become black bits, and the number of previous black bits Q of the original pattern are counted, and the number is calculated according to the following formula. Obtain the average line width of the original pattern.

W=Q/ (Q− A) そして、原パタン上の全ての線分を垂直方向(V)、木
平方向(口)、左斜め方向(L)及び右斜め方向(R)
の4方向の線分に分類しで抽出するためのIIll@1
thを設定する。
W=Q/ (Q- A) Then, all the line segments on the original pattern are moved in the vertical direction (V), the Kihira direction (opening), the left diagonal direction (L), and the right diagonal direction (R).
IIll@1 to classify and extract line segments in four directions.
Set th.

次いで目、V,L及び日の4つの方向をそれぞれ第一の
走査方向とし、原パタンを各第一の走査方向に走査して
、走査方向における長さが12th以上となる黒ランを
抽出し、各第一の走査方向別の線分のサブパタンを得る
Next, the four directions of the eye, V, L, and sun are each set as the first scanning direction, and the original pattern is scanned in each of the first scanning directions to extract a black run whose length in the scanning direction is 12th or more. , obtain line segment subpatterns for each first scanning direction.

次いでサブパタンを当該サブパタン抽出時の第一の走査
方向と直交する第二の走査方向に走査して、第一の走査
方向において連結する黒ランの塊を検出し、連結する黒
ランの塊の最初に現れた黒ランの中点座標及び最後に現
れた黒ランの中点座標を文字図形のセグメントとして抽
出する.(発明が解決しようとする課題) しかしなから上述した従来技術では、抽出したセグメン
トが入力図形の構造を充分に表現できない場合があった
。この点につき第10図及び第11図を参照し説明する
Next, the subpattern is scanned in a second scanning direction that is orthogonal to the first scanning direction when extracting the subpattern, and a cluster of connected black runs is detected in the first scanning direction, and the first of the cluster of connected black runs is detected. Extract the coordinates of the midpoint of the black run that appeared in and the coordinates of the midpoint of the last black run that appeared as segments of the character shape. (Problems to be Solved by the Invention) However, in the above-mentioned conventional technology, there are cases in which the extracted segments cannot sufficiently represent the structure of the input figure. This point will be explained with reference to FIGS. 10 and 11.

第10図及び第11図は原パタンの例を示す図であり、
第10図の図(A)に示す原パタン○P.は曲率の小さ
い曲線図形の原パタン、図(B)に示す原パタン○PI
lはサブパタン抽出時の走査方向に近い方向を持つ2つ
の直線か連結する図形の原パタン及び図(C)は同一方
向の2つの直線が小図形を介して連結する図形の原パタ
ンである. また第11図は原パタンかう抽出した水平サブパタン及
び水平セグメントを示す図であり、第11図の図(A)
の木平サブパタンHSP.及び水平セグメント日SG.
は原パタン○P1から抽出したサブパタン及びセグメン
ト、図(E3)の水平サブパタン日SPゎ及び水平セグ
メントHSGI,は原パタンOPbから抽出したサブパ
タン及びセグメント及び図(C)の水平サブパタンHS
P.及び水平セグメント目SG.は原パタン○Peから
抽出したサブパタン及びセグメントである。
FIGS. 10 and 11 are diagrams showing examples of original patterns,
The original pattern ○P shown in FIG. 10 (A). is the original pattern of a curved figure with small curvature, the original pattern shown in Figure (B) ○PI
l is the original pattern of a figure that connects two straight lines with a direction close to the scanning direction during subpattern extraction, and Figure (C) is the original pattern of a figure that connects two straight lines in the same direction via a small figure. Moreover, FIG. 11 is a diagram showing horizontal sub-patterns and horizontal segments extracted from the original pattern, and the diagram (A) in FIG.
Kihira subpattern HSP. and horizontal segment day SG.
are the subpatterns and segments extracted from the original pattern ○P1, the horizontal subpatterns SPゎ and horizontal segments HSGI in figure (E3), are the subpatterns and segments extracted from the original pattern OPb, and the horizontal subpatterns HS in figure (C)
P. and horizontal segment SG. are subpatterns and segments extracted from the original pattern ○Pe.

第10図及び第11図の(A)からも理解できるように
、従来技術では、曲率の小さい曲線図形から直線図形を
表す1個のセグメントしか抽出てきないことがあった。
As can be understood from FIGS. 10 and 11 (A), in the prior art, only one segment representing a straight line figure could be extracted from a curved figure with a small curvature.

また第10図及び第11図の(B)からも理解できるよ
うに、従来技術では、サブパタン抽出の走査方向に近い
方向を持つ2つの直線が連結する図形から1個の直線図
形を表す1個のセグメントしか抽出できないことがあっ
た。
In addition, as can be understood from FIGS. 10 and 11 (B), in the conventional technology, one line figure representing one straight line figure is extracted from a figure in which two straight lines having a direction close to the scanning direction of sub-pattern extraction are connected. Sometimes only segments could be extracted.

また第10図及び第11図の(C.)からも理解できる
ように、従来技術では、同一方向の2つの直線が小図形
を介して連結する図形から1個の直線図形を表す1個の
セグメントしか抽出できないことがあった。
Furthermore, as can be understood from (C.) in FIGS. 10 and 11, in the prior art, two straight lines in the same direction are connected to each other via a small figure to form one straight line figure. Sometimes only segments could be extracted.

上述のように従来技術では、入力図形を構成する線分相
互の位置関係や接続角度等によっては、入力図形の構造
或は幾伺学的特′!5Iを忠実に表すセグメントを抽出
することができないことかあつた。このようなセグメン
トを用いて、文字図形の認識、検索を行なうと、セグメ
ントから抽出される特徴が不安定となり、これかため文
字図形の識別か困難になり識別を精度良く行なえなくな
る。
As mentioned above, in the conventional technology, the structure or geometrical characteristics of the input figure may be affected depending on the mutual positional relationships and connection angles of the line segments that make up the input figure. In some cases, it was not possible to extract a segment that faithfully represented 5I. If such segments are used to recognize and search for characters and figures, the features extracted from the segments will become unstable, making it difficult to identify the characters and figures, making it impossible to accurately identify them.

また不安定な特徴を用いて精度良く識別を行なうために
識別のための処理方法が複雑となり、その結果、識別の
処理速度か低下するという問題点があった。
Furthermore, since accurate identification is performed using unstable features, the processing method for identification becomes complicated, resulting in a problem in that the processing speed of identification decreases.

さらに従来のセグメントを用いた文字図形の識別処理で
は、分類ざれていないセグメントを順次検索して文字図
形を構成するセグメントを検出するため、識別処理時間
か長くなるという問題点があった。
Furthermore, in the conventional character/figure identification processing using segments, unclassified segments are sequentially searched to detect segments constituting the character/figure, which poses a problem in that the identification process takes a long time.

第一発明の目的は、上述した従来の問題点を解決するた
め、文字図形の構造を従来よりもより忠夷に表すセグメ
ントを抽出できるセグメント抽出装置を提供することに
ある. また第二発明の目的は、上述した従来の問題点を解決す
るため、項目別に分類したセグメントを模索して文字図
形の識別を行なう図形認識装置を提供することにある。
A first object of the present invention is to provide a segment extraction device that can extract segments that represent the structure of character figures more faithfully than before, in order to solve the above-mentioned conventional problems. A second object of the present invention is to provide a figure recognition device that identifies characters and figures by searching for segments classified by item, in order to solve the above-mentioned conventional problems.

(課題を解決するための手段) この目的の達或を図るため、第一発明のセグメント抽出
装置は、白黒2値の原パタンから第一の走査方向別の複
数のサブパタンを抽出するための白黒閾値と、サブパタ
ンの第一の走査方向の第一の黒ランを当該第一の黒ラン
の連続長に応じで分類するための連続長閾値とを設定す
る閾値設定部と、原パタンを第一の走査方向に走査して
、白黒閾偵以上となる連続長を有する第一の黒ランをサ
ブパタンの黒ヒット部分として抽出し、サブパタンの白
ビット部分に対しては白コードを付しかつサブパタンの
黒ビット部分に対しては連続長の長ざに応じて分類され
た黒コードを連}!長閾値及び第一の黒ランの連続長の
比較結果に基づいて付すサブパタン抽出部と、各サブパ
タンを第一の走査方向と所定の角度を成す第二の走査方
向に走査し、走査線上で白ビットから黒ビットに変化し
たときの黒変化点及び黒ビットから白ビットに変化した
ときの白変化点の座標に基づいて第二の走査方向の第二
の黒ランが連結するか否かを判定し、連結する第二の黒
ランの先頭ラン及び最後尾ランを検出すると共に黒コー
ドに基づいて連結する第二の黒ランの不連続ランを検出
し、連結する第一の黒ランの先頭ラン及び最後尾ランの
位置と不連続ランの位置とに基づいてセグメントを抽出
するセグメント抽出部とを備えで成ることを特徴とする
(Means for Solving the Problems) In order to achieve this object, the segment extraction device of the first invention provides a black-and-white segment extraction device for extracting a plurality of sub-patterns according to a first scanning direction from a black-and-white binary original pattern. a threshold value setting unit that sets a threshold value and a continuous length threshold value for classifying a first black run in a first scanning direction of a sub-pattern according to a continuous length of the first black run; The first black run having a continuous length equal to or greater than the black-and-white threshold is extracted as the black hit part of the sub-pattern, and a white code is attached to the white bit part of the sub-pattern. For the black bit part, connect the black code classified according to the length of the continuous length}! A sub-pattern extractor extracts a sub-pattern based on the comparison result of the length threshold and the continuous length of the first black run, and scans each sub-pattern in a second scanning direction forming a predetermined angle with the first scanning direction, and extracts white on the scanning line. Determine whether or not the second black runs in the second scanning direction are connected based on the coordinates of the black change point when changing from a bit to a black bit and the coordinates of the white change point when changing from a black bit to a white bit. Then, the first run and the last run of the second black run to be connected are detected, and the discontinuous runs of the second black run to be connected are detected based on the black code, and the first run of the first black run to be connected is detected. and a segment extraction unit that extracts segments based on the position of the last run and the position of the discontinuous run.

また第二発明の図形認識装置は、白黒2値の原パタンか
ら第一の走査方向別の複数のサブパタンを抽出するため
の白黒閾値と、サブパタンの第一の走査方向の第一の黒
ランを当該第一の黒ランの連続長に応じて分類するため
の連続長閾値とを設定する閾値設定部と、原パタンを第
一の走査方向に走査して、白黒閾値以上となる連続長を
有する第一の黒ランをサブパタンの黒ビット部分として
抽出し、サブパタンの臼ビット部分に対しでは白コード
を付しかつサブパタンの黒ビット部分に対しては連続長
の長さに応じて分類された黒コードを連続長閾値及び第
一の黒ランの連続長の比較結果に基づいて付すサブパタ
ン抽出部と、各サブパタンを第一の走査方向と所定の角
度を威す第二の走査方向に走査し、走査線上で白ビット
から黒ビットに変化したときの黒変化点及び黒ビットが
ら白ビットに変化したときの白変化点の座標に基づいて
第二の走査方向の第二の黒ランが連結するか否かを判定
し、連結する第二の黒ランの先頭ラン及び最後尾ランを
検出すると共に黒コードに基づいて連結する第二の黒ラ
ンの不連続ランを検出し、連結する第二の黒ランの先頭
ラン及び最後尾ランの位置と不連続ランの位置とに基づ
いてセグメントを抽出するセグメント抽出部と、セグメ
ントを、第一の走査方向別に分類すると共に黒コードか
ら得られるセグメント種別情報に基づいて分類するセグ
メント分類部と、文字図形の定義に適う分類のセグメン
トのなかから文字図形を構戊するセグメントを検出する
認識部とを備えて成ることを特徴とする. (作用) このような構成の第一発明のセグメント抽出装買によれ
ば、原パタンそ第一の走査方向に走査して、白コード及
び黒コードを付してコード化したサブパタンを抽出する
。そしてコード化したサブパタンを第二の走査方向に走
査して、黒及び白変化点の座標に基づき第二の黒ランが
連結するが否かを判定し、連結する第二の黒ラン(以下
、この連結する第二の黒ランの一塊を黒パタンと称す)
の先頭ラン及び最後尾ランlF!.検出すると共に黒コ
ードに基づいて黒パタンの不連続ランを検出する。黒パ
タンは或る特定の文字図形を表すパタンである。
Further, the figure recognition device of the second invention includes a black-and-white threshold for extracting a plurality of sub-patterns for each first scanning direction from a black-and-white binary original pattern, and a first black run in the first scanning direction of the sub-patterns. a threshold setting unit that sets a continuous length threshold for classification according to the continuous length of the first black run; and a continuous length that is equal to or greater than the black and white threshold when the original pattern is scanned in the first scanning direction. The first black run is extracted as the black bit part of the sub-pattern, and the mortar bit part of the sub-pattern is assigned a white code, and the black bit part of the sub-pattern is classified according to the continuous length. a sub-pattern extraction unit that attaches a code based on a comparison result of a continuous length threshold value and a continuous length of the first black run; and a second scanning direction that scans each sub-pattern at a predetermined angle with respect to the first scanning direction; Whether the second black run in the second scanning direction is connected based on the coordinates of the black change point when a white bit changes to a black bit on the scanning line and the white change point when a black bit changes to a white bit on the scanning line. The first run and the last run of the second black run to be connected are detected, and the discontinuous runs of the second black run to be connected are detected based on the black code, and the second black run to be connected is detected. a segment extraction unit that extracts segments based on the positions of the first and last runs of a run and the positions of discontinuous runs; The present invention is characterized by comprising a segment classification unit that performs classification based on the definition of a character figure, and a recognition unit that detects segments that constitute a character figure from among segments that are classified according to the definition of a character figure. (Operation) According to the segment extraction device of the first invention having such a configuration, the original pattern is scanned in the first scanning direction to extract the sub-pattern coded by adding a white code and a black code. Then, the coded sub-pattern is scanned in the second scanning direction, and it is determined whether or not the second black runs are connected based on the coordinates of the black and white change points, and the second black runs (hereinafter referred to as This connected mass of second black runs is called a black pattern)
First run and last run IF! .. At the same time, a discontinuous run of the black pattern is detected based on the black code. The black pattern is a pattern representing a certain specific character figure.

コード化したサブパタンを走査し、黒パタンの黒コード
の変化を調べることによって、黒パタンの幾伺字的特徴
が変化する不通続ランを検出することができる。黒パタ
ンの先頭ラン及び最後尾ランの位置に加えこの不連続ラ
ンの位!%も用いて黒パタンのセグメントを抽出するこ
とによって、従来よりもより忠実に幾何学的特徴を表す
セグメントを抽出できる. また第二発明の図形認識装置によれば、セグメントを、
第一の走査方向別に分類すると共に黒コードから得られ
るセグメント種別情報に基づいて分類する。そして文字
図形の定義に適う分類のセグメントのなかから文字図形
を構成するセグメントを検出する.分類されたセグメン
トのなかがら文字図形を構戊するセグメントを検出する
ことによって、文字図形を構成するセグメントの検出速
度を向上できる。
By scanning the coded sub-pattern and examining changes in the black code of the black pattern, it is possible to detect discontinuous runs in which the glyph-like features of the black pattern change. In addition to the positions of the first and last runs of the black pattern, the positions of these discontinuous runs! By extracting black pattern segments using %, it is possible to extract segments that represent geometric features more faithfully than before. Further, according to the figure recognition device of the second invention, the segment is
Classification is performed according to the first scanning direction and also based on segment type information obtained from the black code. Then, the segments that make up the character figure are detected from among the segments that are classified according to the definition of the character figure. By detecting segments that make up a character figure from among the classified segments, the speed of detecting segments that make up a character figure can be improved.

(実施例) 以下、図面を参照し第一及び第二発明の実施例につき説
明する.尚、図面はこれら発明が理解できる程度に概略
的に示されているにすぎず、従って各構成或分の接続閏
係、入出力信号、寸法、形状及び配設位置を図示例に限
定するものではない。
(Examples) Examples of the first and second inventions will be described below with reference to the drawings. Note that the drawings are only shown schematically to the extent that these inventions can be understood, and therefore, the connection levers, input/output signals, dimensions, shapes, and arrangement positions of each component are limited to the illustrated examples. isn't it.

凰:91温辺j連虹倒 第1図は第一発明の実施例の構戊の説明に供する機能ブ
ロック図である。
Figure 1 is a functional block diagram for explaining the structure of an embodiment of the first invention.

この実施例のセグメント抽出装置10は、第1図にも示
すように、白黒2iaの原パタンがら第一の走査方向別
の複数のサブパタンを抽出するための白黒閾偵と、サブ
パタンの第一の走査方向の第一の黒ランを当該第一の黒
ランの連続長に応じて分類するための連続長閾値とを設
定する@値段定部12と、原パタンを第一の走査方向に
走査して、白黒閾値以上となる連続長を有する第一の黒
ランをサブパタンの黒ビット部分として抽出し、サブパ
タンの白ビット部分に対しては白コードを付しかつサブ
パタンの黒ビット部分に対しては連続長の長さに応じて
分類された黒コードを連続長閾値及び第一の黒ランの連
続長の比較結果に基づいて付すサブパタン抽出部14と
、各サブパタンを第一の走査方向と所定の角度を成す第
二の走査方向に走査し、走査線上で白ビットから黒ビッ
トに変化したときの黒変化点及び黒ビットがら白ビット
に変化したときの白変化点の座標に基づいて第二の走査
方向の第二の黒ランが連結するが否かを判定し、連結す
る第二の黒ラン(以下、黒パタンと称す)の先頭ラン及
び最後尾ランを検出すると共に黒コード{こ基づいて黒
パタンの不連続ランを検出し、黒パタンの先頭ラン及び
最後尾ランの位置と不連続ランの位置とに基づいてセグ
メントを抽出するセグメント抽出部16,とを備えて成
る.ざらにこの実施例のセグメント抽出装M10は白黒
2値の原パタンを格納するパタンメモリ18と、原パタ
ンに関する線幅を求める線幅計算部20と、各第一の走
査方向別にサンパタンを格納するサブパタンメモリ22
と、各第一の走査方向別にサブパタンから抽出したセグ
メントを格納するセグメントメモリ24とを備えて成る
. 尚、図中の26は認識部を示し、認識部26はセグメン
トメモリ24に格納されたセグメントのなかから所定の
文字図形を構成するセグメントを検出し、原パタン中に
存在する文字、図形を識別する. 以下、より詳細にこの実施例のセグメント抽出装置10
につき説明する。
As shown in FIG. 1, the segment extraction device 10 of this embodiment includes a black-and-white threshold detector for extracting a plurality of sub-patterns for each first scanning direction from a black-and-white 2ia original pattern, and a first sub-pattern. @price fixing unit 12 that sets a continuous length threshold for classifying first black runs in the scanning direction according to the continuous length of the first black runs; Then, the first black run having a continuous length equal to or greater than the black and white threshold is extracted as the black bit part of the sub-pattern, and a white code is attached to the white bit part of the sub-pattern, and a white code is attached to the black bit part of the sub-pattern. A sub-pattern extraction unit 14 attaches black codes classified according to the continuous length based on the continuous length threshold and the comparison result of the continuous length of the first black run; Scanning is performed in a second scanning direction that forms an angle, and the second scan is performed based on the coordinates of the black transition point when a white bit changes to a black bit on the scanning line, and the white transition point when a black bit changes to a white bit on the scanning line. It is determined whether or not the second black runs in the scanning direction are connected, and the first and last runs of the connected second black runs (hereinafter referred to as black patterns) are detected, and the black code {based on this A segment extraction unit 16 detects discontinuous runs of the black pattern and extracts segments based on the positions of the first and last runs of the black pattern and the positions of the discontinuous runs. Roughly speaking, the segment extraction device M10 of this embodiment includes a pattern memory 18 that stores a black and white binary original pattern, a line width calculation unit 20 that calculates the line width regarding the original pattern, and stores sample patterns for each first scanning direction. Sub pattern memory 22
and a segment memory 24 for storing segments extracted from subpatterns in each first scanning direction. In addition, 26 in the figure indicates a recognition unit, and the recognition unit 26 detects segments constituting a predetermined character figure from among the segments stored in the segment memory 24, and identifies characters and figures existing in the original pattern. do. The segment extraction device 10 of this embodiment will be explained in more detail below.
I will explain about it.

(パタンメモリ) この実施例では、例えば光電変換部からの白黒2値の電
気信号を原パタンとし、この原パタンをパタンメモリ1
8に格納する.光電変換部は線図形を記載した論理回路
図等の記録媒体を光学的に走査し、この媒体からの光情
報を光電変換して得た原パタンを出力する。
(Pattern Memory) In this embodiment, for example, a black and white binary electrical signal from a photoelectric conversion unit is used as an original pattern, and this original pattern is stored in a pattern memory 1.
Store in 8. The photoelectric conversion section optically scans a recording medium such as a logic circuit diagram in which line figures are written, and outputs an original pattern obtained by photoelectrically converting optical information from this medium.

パタンメモリ18上にはX−Y座標系を仮想的に設定し
、この座標系で表現される画素位置の原パタンをパタン
メモリ18から読出せるようにする。
An X-Y coordinate system is virtually set on the pattern memory 18 so that the original pattern of pixel positions expressed by this coordinate system can be read out from the pattern memory 18.

(線中計算部) 線中計)1部20は周知のフィルタ回路と同様にシフト
レジスタ構成となっており、画素単位に入力した原パタ
ンに関して例えば(2X2)の窓のすべての点が黒ビッ
トとなる点の個数Qと原パタン中の全黒ビット数Aとを
計数し、次に示す周知の近似式(1)に基づいて平均線
巾Wを計算する。
(Line calculation unit) The line calculation unit 1 20 has a shift register configuration similar to a well-known filter circuit, and for example, all points in a (2×2) window are black bits with respect to the original pattern input in pixel units. The number of points Q and the total number of black bits A in the original pattern are counted, and the average line width W is calculated based on the following well-known approximation formula (1).

W=Q/ (Q−A)  ・・・・・・(1)尚、この
実施例では原パタンに関する線幅を線中計算部20によ
って求めた平均線幅Wとするか、このほか線巾計算部2
0を省略し論理回路図等の情報媒体において予測される
所定値を原パタンに関する線幅として用いることもでき
る.また原パタンメモリを走査して線幅を計算するので
はなく、線幅計算部20に光電変換部からの原パタンを
画素単位に入力しこの先電変換部からの原パタンに基づ
いて線幅を計算するようにしてもよい.(閾値設定部) この実施例では、第一の走査方向を垂直方向(Y軸方向
)、水平方向(X軸方向)、右斜め方向(X軸と右斜め
45゜て交差する方向)及び左斜め45゜方向(X軸と
左斜め45°で交差する方向)の四方向とし、各第一の
走査方向別の垂直、水平、右斜め及び左斜めサブパタン
を抽出する.このため115@設定部12は垂直、水平
、右斜め及び左斜めサブパタン抽出のための白黒IS!
l値L VWz L h*z L rl#及びし.Wヲ
設定する.各白黒閾値は次式(2)に従って設定ざれる
. Lvw=Nv ’ W L,l−=Nh ・W しrw”Nr  ゜W し.w=N.−w ・・・・・・ (2) 但し、NV,Nh ,N,及びN1は任意好適に設定ざ
れる定数、Wは平均線幅である. 従来周知のように(例えば「論理回路図の線セグメント
抽出 昭和63年 信字情全大D−3994 )、定数
Nv,Nfi、N,及びN1を任意好適に設定すること
によって、原パタン中の全てのパタンをいすれかのサブ
パタンに分類して抽出できる。
W=Q/ (Q-A) (1) In this embodiment, the line width for the original pattern is the average line width W calculated by the line calculation unit 20, or the line width is Calculation part 2
It is also possible to omit 0 and use a predetermined value predicted in an information medium such as a logic circuit diagram as the line width for the original pattern. In addition, instead of calculating the line width by scanning the original pattern memory, the original pattern from the photoelectric conversion unit is input pixel by pixel to the line width calculation unit 20, and the line width is calculated based on the original pattern from the photoelectric conversion unit. You can also do the calculations. (Threshold value setting unit) In this embodiment, the first scanning direction is vertical (Y-axis direction), horizontal (X-axis direction), right diagonal direction (direction intersecting the X-axis at an angle of 45 degrees to the right), and left Vertical, horizontal, right diagonal, and left diagonal subpatterns are extracted for each of the first scanning directions in four diagonal 45° directions (directions intersecting the X axis at 45° diagonal to the left). For this reason, 115 @ setting unit 12 is a black and white IS for vertical, horizontal, right diagonal and left diagonal sub-pattern extraction!
l value L VWz L h*z L rl# and . Set W. Each black and white threshold is set according to the following equation (2). Lvw=Nv' W L,l-=Nh ・W shirw"Nr ゜W shi.w=N.-w ...... (2) However, NV, Nh, N, and N1 can be arbitrarily set. The constant to be set, W, is the average line width.As is well known in the art (for example, "Line Segment Extraction of Logic Circuit Diagrams, 1985, Shinjijo Zendai D-3994"), the constants Nv, Nfi, N, and N1 By setting arbitrarily and suitably, all patterns in the original pattern can be classified and extracted as any sub-pattern.

例えば、Nv,Nh ,N−及びN1のjaヲ全て同一
の値としてもよいし、それぞれ異なる値としてもよいし
、或はN,=Nh=N+及び右斜め及び左斜め方向のと
きN,=Nl =N2とするようにしてもよい. ざら{こ閾値設定部12は図示しない入力部例えばキー
ボードからの入力信号に基づいて連続長閾値を設定する
.連続長閾値も、白黒閾値と同様に、各サブパタン毎に
設定する.垂直、水平、右斜め及び左斜めサブパタンに
対しそれぞれ連続長閾値L vs、し.、L rs及び
L +s!設定する.?続長閾@Lv.、Lhs、Lr
,l及びし.Sはそれぞれ、識別対象となる文字図形の
定義に従って得られる文字図形の幾何学的特徴例えば文
字図形を構成する線分の太さや線分の相対的位置関係等
に基づいて任意好適に設定ざれるものであり、これら連
続長lII値の値をそれぞれ個別の異なる値としてもよ
いし同一の値としてもよい。連続長閾値Lv.、Lh−
,L■及びLisをそれぞれ任意好適に設定することに
よって、各サブバタシに関して、文字図形の幾何学的特
徴が変化する部分の第二の黒ランすなわち不連続ランを
検出することができる。
For example, Nv, Nh, N-, and N1 may all have the same value, or may each have different values, or when N,=Nh=N+ and in the diagonal right direction and diagonal left direction, N,= It is also possible to set Nl = N2. The threshold setting unit 12 sets a continuous length threshold based on an input signal from an input unit (not shown), such as a keyboard. The continuous length threshold is also set for each subpattern in the same way as the black and white threshold. Continuous length threshold L vs. for vertical, horizontal, right diagonal, and left diagonal sub-patterns, respectively. , L rs and L +s! Set. ? Duration threshold @Lv. , Lhs, Lr
, l and shi. S can be set arbitrarily and suitably based on the geometric characteristics of the character figure obtained according to the definition of the character figure to be identified, such as the thickness of the line segments and the relative positional relationship of the line segments that constitute the character figure. These consecutive length lII values may be different values or may be the same value. Continuous length threshold Lv. , Lh-
, L and Lis, it is possible to detect a second black run, that is, a discontinuous run, in a portion where the geometrical features of the character figure change, for each sub-battle.

(サブパタン抽出部) この実施例では第一の走査方向を、垂直、水平、右斜め
及び左斜めの4方向とするので、サブパタン抽出部14
ヲ、垂直サブパタン抽出部14a、水平サブパタン抽出
部14b、右斜めサブパタン抽出部14c及び左斜めサ
ブパタン抽出部+4dから構成する.各抽出部1 4a
, I 4bs I 4c及び+4dは原パタンを垂直
、水平、右斜め及び左斜め方向に走査してコード化され
た垂直、水平、右斜め及び左斜めサブパタンを抽出する
(Sub-pattern extraction unit) In this embodiment, the first scanning direction is four directions: vertical, horizontal, diagonal right, and diagonal left, so the sub-pattern extraction unit 14
It is composed of a vertical sub-pattern extraction section 14a, a horizontal sub-pattern extraction section 14b, a right diagonal sub-pattern extraction section 14c, and a left diagonal sub-pattern extraction section +4d. Each extraction part 1 4a
, I 4bs I 4c and +4d scan the original pattern in vertical, horizontal, right diagonal and left diagonal directions to extract coded vertical, horizontal, right diagonal and left diagonal sub-patterns.

垂直サブパタン抽出部14aは主走査方向を垂直方向と
して原パタンを走査し、当該第一の走査方向における走
査線上で連続して検出ざれる黒ビットの個数(連続長)
lを計数し、次式(2)を満足する個数gだけ連続して
検出された黒ビットの群(第一の黒ラン)を抽出する. β≧L vw       ・・・・・・(3)垂直サ
ブパタン抽出部14aは式(3)を満足する連続長lの
第一の黒ランを、垂直サブパタンの黒ビット部分とみな
し黒ビットとして垂直サブパタンメモリ22aに格納す
る。原パタンの白ビット及び式(3)を満足しない連続
長lの黒ビットを、垂直サブパタンの白ビット部分とみ
なし白ビットとして垂直サブパタンメモリ22aに格納
する. そして垂直サブパタン抽出部14aは垂直サブパタンの
白ビット部分に対しては白コード例えば00(00は二
進数)を及び黒ビット部分に対しでは連続長lの長さ(
こ応じて分類された黒コードを付す.連続長2及び連続
長閾値LV,を比較し、次式(4a)を満足する連続長
βの第一の黒ランに対しては黒コード01例えば(01
は二進数)を、及び次式(4b)を満足する連続長2の
第の黒ランに対しては黒コード例えば10(10は二進
数)を付す。
The vertical sub-pattern extraction unit 14a scans the original pattern with the main scanning direction as the vertical direction, and calculates the number of black bits (continuous length) that are continuously detected on the scanning line in the first scanning direction.
1, and extract a group of consecutively detected black bits (first black run) of the number g that satisfies the following equation (2). β≧L vw (3) The vertical sub-pattern extraction unit 14a regards the first black run of continuous length l that satisfies equation (3) as the black bit part of the vertical sub-pattern, and extracts the first black run as the black bit part of the vertical sub-pattern. The pattern is stored in the pattern memory 22a. The white bits of the original pattern and the black bits of continuous length l that do not satisfy equation (3) are regarded as the white bit portion of the vertical sub-pattern and are stored as white bits in the vertical sub-pattern memory 22a. Then, the vertical sub-pattern extraction unit 14a generates a white code, for example, 00 (00 is a binary number) for the white bit portion of the vertical sub-pattern, and a continuous length l for the black bit portion (
A black code is attached according to the classification. The continuous length 2 and the continuous length threshold LV are compared, and for the first black run of continuous length β that satisfies the following equation (4a), the black code 01 is set, for example, (01
is a binary number), and a black code, for example, 10 (10 is a binary number) is assigned to the second black run of continuous length 2 that satisfies the following equation (4b).

L vw≦l≦Lvs    −−−−−−(4a)L
 vs≦β      ・・・・・・(4b)尚、以下
の説明では黒コード、演算コード、最終演算コード等の
1コード”という語を付して示した数字は二進数を表し
、゜゜コード”という語を付していない数字は十進数を
表すものとする.垂直サブパタン抽出部14aと同様、
水平、右斜め及び左斜めサブパタン抽出部14b,14
c及び+4dもそれぞれ、垂直、左斜め及び右斜め方向
を主走査方向として原パタンを走査し、l≧Lhw,A
≧し、及びg≧Llwを満足する連続長lの第一の黒ラ
ンを、それぞれ水平、右斜め及び左斜めサブパタンの黒
ビット部分とみなし黒ビットとして木平、右斜め及グ左
斜めサブパタンメモリ22b,22c及び22dに格納
する。原パタンの白ビット及び式(3)を満足しない連
続長1の黒ビットを、垂直サブパタンの白ビット部分と
みなし白ビットとして水平、右斜め及び左斜めサブパタ
ンメモリ22b、22c及び22dに格納する。
L vw≦l≦Lvs --------(4a)L
vs≦β ...... (4b) In the following explanation, numbers shown with the word "1 code" such as black code, operation code, final operation code, etc. represent binary numbers, and are referred to as "゜゜code". Numbers without the word are assumed to represent decimal numbers. Similar to the vertical sub-pattern extraction section 14a,
Horizontal, right diagonal and left diagonal sub-pattern extraction parts 14b, 14
c and +4d also scan the original pattern with the vertical, left diagonal, and right diagonal directions as the main scanning directions, and l≧Lhw, A
The first black run of continuous length l that satisfies ≧ and g≧Llw is regarded as the black bit part of the horizontal, right diagonal, and left diagonal subpatterns, respectively, and is used as the black bit for the Kihira, right diagonal, and left diagonal subpatterns. The data is stored in memories 22b, 22c and 22d. The white bits of the original pattern and the black bits with a continuous length of 1 that do not satisfy equation (3) are regarded as the white bit portion of the vertical sub-pattern, and are stored as white bits in the horizontal, right diagonal, and left diagonal subpattern memories 22b, 22c, and 22d. .

そして水平、右斜め及び左斜めサブパタン抽出部14b
,14c及び+4dは水平、右斜め及び左斜めサフパタ
ンの白ビット部分に対しては白コード00及び黒ビット
部分に対しては連続長lの長さ1こ応しで分類された黒
コードを付す。このため各抽出部14b,14c及び+
4dはそれぞれ連続長lを連続長閾値L h** L 
r S及びし、,と比較し、次式(5a)を満足する連
続長lの第一の黒ランに対しでは黒コード01を、及び
次式(5b)を満足する連続長lの第一の黒ランに対し
ては黒コード10(10は二進数)を付す。この結果、
コード化された各サブパタンか得られる. Lhw≦℃≦Lhs L rw≦l≦L4 L sw≦1≦し,S ・・・・・・ (5a) しhs≦l L4≦l L.≦l ・・・・・・(5b) 第2図にコード化された垂直サブパタンの一例を示す。
And horizontal, right diagonal, and left diagonal sub-pattern extraction section 14b
, 14c and +4d are assigned a white code 00 for the white bit part of the horizontal, right diagonal and left diagonal sub patterns, and a black code classified by the length 1 of the continuous length l for the black bit part. . Therefore, each extraction section 14b, 14c and +
4d represents the continuous length l as the continuous length threshold L h** L
r S and , , for the first black run of continuous length l that satisfies the following formula (5a), the black code is 01, and for the first black run of continuous length l that satisfies the following formula (5b) A black code of 10 (10 is a binary number) is assigned to the black run. As a result,
Each encoded subpattern is obtained. Lhw≦℃≦Lhs L rw≦l≦L4 L sw≦1≦, S... (5a) hs≦l L4≦l L. ≦l (5b) FIG. 2 shows an example of a coded vertical sub-pattern.

第2図はL ,W= 3及びL,,=6として得られた
垂直サブパタシの例を示し、同図において、1メッシュ
は1画素分のサブパタンに相当し、白抜メッシュは原パ
タン及びサブパタンにおいで白ビットで表現される画素
、番号Oを付したメッシュは原パタンにおいでは黒ビッ
トで及びサブパタンにおいては白ビットで表現される画
素、さらに番号1及び2を付したメッシュは原パタン及
びサブパタンにおいで黒ビットで表現ざれる画素であり
、X軸及びY軸はサブパタンメモリ上に仮想的に設定し
たX軸及びY軸である.白抜メッシュ及び番号Oを付し
たメッシュの画素には白コード○O、番号1を付したメ
ッシュの画素には黒コード01、及び番号2を付したメ
ッシュの画素には黒コード10が付されている。
Figure 2 shows an example of vertical subpatterns obtained with L, W = 3 and L, , = 6. In the figure, one mesh corresponds to a subpattern for one pixel, and a white mesh corresponds to the original pattern and subpattern. Pixels represented by white bits in the odor, meshes with the number O are pixels represented by black bits in the original pattern and white bits in the subpattern, and meshes with numbers 1 and 2 are represented by the original pattern and subpattern. It is a pixel that cannot be expressed by a black bit in the odor, and the X-axis and Y-axis are the X-axis and Y-axis set virtually on the sub-pattern memory. The pixels of the white mesh and the mesh with the number O are given the white code ○O, the pixels of the mesh with the number 1 are given the black code 01, and the pixels of the mesh with the number 2 are given the black code 10. ing.

(サブパタン記憶部) この実施例のサブパタンメモリ22は、垂直、水平、右
斜め及び左斜めサブパタンを格納する垂直、水平、右斜
め及び左斜めサブパタンメモリ22a、22b、22c
及び22dから或り、各第一の走査方向別にコード化さ
れたサブパタンを格納する.各サブパタンメモリ22a
〜22d上にはパタンメモリ18と同様のX−Y座標系
を設定しており、パタンメモリ18上の画素位置と対応
する画素位置に各サブパタンを構成する黒ランを格納す
る.(セグメント抽出部) この実施例では、第一の走査方向と例えば直交する方向
を第二の走査方向としてサブパタンを走査し、サブパタ
ンかうセグメントを抽出する。このためセグメント抽出
部16は、水平方向を主走査方向として垂直サブパタン
を走査し垂直セグメントを抽出する垂直セグメント抽出
部16aと、垂直方向を主走査方向として水平サブパタ
ンを走査し水平セグメントを抽出する水平セグメント抽
出部+6bと、左斜め方向を主走査方向として右斜めサ
ブパタンを走査し右斜めセグメントを抽出する右斜めセ
グメント抽出部16cと、右斜め方向を主走査方向とし
て左斜めサブパタンを走査し左斜めセグメントを抽出す
る左斜めセグメント抽出部+6dとから成る。
(Sub-pattern storage unit) The sub-pattern memory 22 of this embodiment includes vertical, horizontal, right-diagonal, and left-diagonal sub-pattern memories 22a, 22b, and 22c that store vertical, horizontal, right-diagonal, and left-diagonal sub-patterns.
and 22d, and store sub-patterns coded for each first scanning direction. Each sub pattern memory 22a
An X-Y coordinate system similar to that of the pattern memory 18 is set on ~22d, and black runs constituting each sub-pattern are stored at pixel positions corresponding to pixel positions on the pattern memory 18. (Segment Extracting Unit) In this embodiment, a sub-pattern is scanned with the second scanning direction being, for example, a direction perpendicular to the first scanning direction, and segments corresponding to the sub-pattern are extracted. For this purpose, the segment extraction unit 16 includes a vertical segment extraction unit 16a that scans vertical sub-patterns with the horizontal direction as the main scanning direction and extracts vertical segments, and a vertical segment extraction unit 16a that scans the horizontal sub-patterns with the vertical direction as the main scanning direction and extracts horizontal segments. a segment extraction unit +6b; a right diagonal segment extraction unit 16c that scans a right diagonal sub-pattern with the left diagonal direction as the main scanning direction and extracts a right diagonal segment; and a left diagonal segment extractor +6d for extracting segments.

以下、垂直セグメント抽出部16aのセグメント抽出に
つき説明するが、他のセグメント抽出部16b,16c
及び+6dのセグメント抽出も垂直セグメント抽出部1
6aと同様にして行なわれるので、他のセグメント抽出
部16b,16c及び+6dのセグメント抽出について
は説明を省略する。
Hereinafter, segment extraction by the vertical segment extraction section 16a will be explained, but other segment extraction sections 16b and 16c
And +6d segment extraction is also performed by the vertical segment extraction unit 1.
Since the segment extraction is performed in the same manner as 6a, a description of the segment extraction by the other segment extraction units 16b, 16c and +6d will be omitted.

垂直セグメント抽出部16aは、主走査方向を水平方向
として垂直サブパタンを走査し当該主走査方向の走査線
上で白ビットから黒ビットに変化したときの黒ビットの
座標を黒変化点の座標及び走査線上で黒ビットから白ビ
ットに変化したときの黒ビットの座標を白変化点の座標
として検出する。そして走査線上で連続して検出される
黒ビットの塊(第二の黒ラン)を検出し、現走査行(現
行)で検出した第二の黒ランと現行の1ライン前の走査
行(前行)で検出した黒ランとの連結関係を、前行の黒
及び白変化点の座標と現行の黒及び白変化点の座標とに
基づいて判定する。この判定結果に基づいて走査行間で
連結する第二の黒ランを検出し、連結する第二の黒ラン
(黒パタン)のうち最初に検出された第二の黒ラン(先
頭ラン)及び最後に検出された第二の黒ラン(最後尾ラ
ン)の位at検出する。これら黒パタンの先頭ラン及び
最後尾ランの位置として、例えばこれら黒ランの中点座
標を用いる。
The vertical segment extraction unit 16a scans a vertical sub-pattern with the main scanning direction as the horizontal direction, and extracts the coordinates of a black bit when a white bit changes to a black bit on a scanning line in the main scanning direction and the coordinates of a black change point on the scanning line. The coordinates of the black bit when the black bit changes to the white bit are detected as the coordinates of the white change point. Then, a block of black bits (second black run) detected continuously on the scanning line is detected, and the second black run detected in the current scanning line (current) and the scanning line one line before the current one (previous The connection relationship with the black run detected in the row) is determined based on the coordinates of the black and white changing points in the previous row and the coordinates of the current black and white changing points. Based on this determination result, the second black run connected between the scanning lines is detected, and the first detected second black run (leading run) and the last detected second black run (first run) among the connected second black runs (black patterns) are detected. The position at of the detected second black run (last run) is detected. As the positions of the first run and the last run of these black patterns, for example, the coordinates of the midpoints of these black runs are used.

第二の黒ランの連結関係の判定は、次の関係式(6a)
、(6b)に基づいて行なう。
The connection relationship of the second black run is determined using the following relational expression (6a)
, (6b).

X8Vim−11≦XWVm  ・・・(6a)xwv
+m−u≧x8v,  ・ (6b)但し、XeV+m
−11及びXWVfm−11は前行Y0−1において検
出した黒変化点及び白変化点のX座標、X8Y、及びX
WVMは現行Y..lにおいて検出した黒?化点及び白
変化点の座標である。
X8Vim-11≦XWVm...(6a)xwv
+m−u≧x8v, ・ (6b) However, XeV+m
-11 and XWVfm-11 are the X coordinates of the black change point and white change point detected in the previous row Y0-1, X8Y, and
WVM is the current Y. .. Black detected in l? These are the coordinates of the color change point and the white color change point.

関係式(6a)及び(6b)!満足する前行の変化点(
 X[lV(II1−11 * Ym−+ )、( X
*V(M−.、Y,−,)と、現行の変化点(Xevm
 、Y, ’)、(Xwv−、Yあ)とは、垂直サブパ
タン中の同一黒パタンに関しで検出された変化点であり
、変化点( X [IV (m− 11 、Y II1
− 1 )及び( X mV (m− 11、Ym−1
)の間の前行の第二の黒ランと、変化点(X8v,..
、Y.,,)及び(Xwv− 、Y− )の間の現行の
第二の黒ランとは連結していることを表す。
Relational expressions (6a) and (6b)! The change point of the previous line that satisfies (
X[lV(II1-11*Ym-+), (X
*V(M-., Y,-,) and the current change point (Xevm
, Y, '), (Xwv-, Ya) are the change points detected for the same black pattern in the vertical sub-pattern, and the change points (X[IV (m-11, Y II1
-1) and (X mV (m-11, Ym-1
) and the change point (X8v,...) in the previous row.
, Y. , , ) and (Xwv-, Y-) indicate that they are connected.

一方、関係式(6a)及び(6b)を満足しない削行の
変化点( Xsvnn−++ % Y,I−+ )及び
( Xwv+m−■  Y,−.)と、現行の変化点(
Xa■、Y1)及び(×■,、Y,)とは、垂直サブパ
タン中の互いに連結しない黒パタンに関して検出された
変化点であり、従って( Xo1−+> 、Y m−1
 )及び( Xwv+s+−++YおーI)の間の前行
の第二の黒ランと、変化点(Xaym 、Y,,)、(
Xwv− .Y..l)の間の現行の第二の黒ランとは
連結していないことを表す。
On the other hand, the cutting change point (
Xa■, Y1) and (×■,, Y,) are the change points detected for the black patterns that are not connected to each other in the vertical sub-pattern, and therefore (Xo1-+>, Y m-1
) and (
Xwv-. Y. .. This indicates that it is not connected to the current second black run between 1) and 1).

また走査線が一個の黒パタンを横切る場合石考えると、
当該走査線上では白ビット、黒ラン及び白ビットを順次
に検出する。従って黒変化点及び白変化点l8.検出し
たことは黒パタンを検出したとみなせる。さらに走査線
上で白ヒット、黒ラン及び白ビットを順次に検出したと
き、当該黒ランが含む黒、白変化点が或る特定の黒パタ
ンの黒、白変化点てあることがわかり、従って走査線か
複数個の黒パタンを横切る場合でも各黒パタン別に各黒
パタンの黒、白変化点を検出できる.また1個の黒パタ
ンを線順次に走査する場合を考えると、前行で黒、白変
化点を検出しなかった黒パタンであって現行で黒、白変
化点を検出した黒パタンは、現行で新に出現した黒パタ
ンであり、この新な黒パタンの現行における黒、白変化
点間の黒ランが当該新な黒パタンの先頭ランとなる。ざ
らに前行で黒、白変化点を検出した黒パタンであって現
行で黒、白変化点ヲ検出しなかった黒パタンは、現行で
消滅した黒パタンであり、この消滅した黒パタンの前行
における黒、白変化点団の黒ランが当該消滅した黒パタ
ンの最後尾ランとなる。
Also, if the scanning line crosses one black pattern, considering the stone,
On the scanning line, a white bit, a black run, and a white bit are sequentially detected. Therefore, the black transition point and the white transition point l8. The detection can be regarded as the detection of a black pattern. Furthermore, when a white hit, a black run, and a white bit are sequentially detected on the scanning line, it is found that the black and white transition points included in the black run are the black and white transition points of a certain black pattern, and therefore the scanning Even when a line crosses multiple black patterns, the black and white transition points of each black pattern can be detected for each black pattern. Also, considering the case where one black pattern is scanned line-sequentially, a black pattern for which no black or white transition point was detected in the previous line, but for which a black or white transition point was detected in the current line, is scanned line-sequentially. This is a black pattern that newly appeared in , and the black run between the current black and white change points of this new black pattern becomes the first run of the new black pattern. A black pattern whose black and white changing points were detected in the previous line, but for which no black and white changing points were detected in the current line, is a black pattern that has disappeared in the current line, and the black pattern before this disappeared black pattern The black run of the black and white changing point group in the row becomes the last run of the disappeared black pattern.

ざらに垂直セグメント抽出部16aは水平方向の走査線
上で黒変化点を検出すると当該黒変化点から次に検出ざ
れる白変化点まで、黒ビットの黒コードに闇する論理和
演算を行なう.この論理和演算は各黒パタン別に行なわ
れる。
Roughly speaking, when the vertical segment extraction unit 16a detects a black change point on a horizontal scanning line, it performs a logical sum operation on the black code of black bits from the black change point to the next detected white change point. This OR operation is performed for each black pattern.

ここで黒変化点にM個の黒ビットが連なって検出された
のち白ビットが検出されたものとすると、この論理和演
算では、まず黒変化点の黒コードと黒変化点に連なる第
1番目の黒ビットの黒コードとにつき各ビット毎(各桁
毎)に第1回目の論理和演算壱行なう.論理和演算結果
も2進数で表わし、以下2進数で表した論理和演算結果
を演算コードと称す. 次いで第1回目の論理和演算の演算コードと黒変化点に
連なる第2番目の黒ビットの黒コードとにつき各桁毎に
論理和演算を行なう。例えば黒変化点、黒変化点に連な
る第1番目の黒ビット及び第2番目の黒ビットの黒コー
ドをそれぞれコード01、コード01及びコ〜ド10と
すれば第1回目の演算コードはコード01、第2回目の
演算コードはコード11となる. このように第m−1回目(2≦m≦M)の演算コードと
黒変化点に連なる第m番目の黒ビットとにつき各桁毎に
論理和演算を行なう. 第M番目の黒ビットに次いで白ビットを検出したら、第
M番目の黒ビットを白変化点として検出すると共に、第
M−1番目の演算コードを当該第M番目の黒ビットを含
む第二の黒ランの最終論理和演算結果として、すなわち
当該走査行における或る特定の黒パタンの最終論理和演
算結果として保存する。2進数で表した最終論理和演算
結果を最終演算コードと称す。
Assuming that a white bit is detected after M black bits are detected consecutively at the black transition point, in this logical OR operation, first the black code of the black transition point and the first black bit connected to the black transition point are detected. The first OR operation is performed for each bit (each digit) of the black code of the black bit. The logical sum operation result is also expressed in binary numbers, and the logical sum operation result expressed in binary numbers is hereinafter referred to as an operation code. Next, an OR operation is performed for each digit of the operation code of the first OR operation and the black code of the second black bit connected to the black change point. For example, if the black code of the black transition point, the first black bit, and the second black bit connected to the black transition point are code 01, code 01, and code 10, the first operation code is code 01. , the second operation code is code 11. In this way, a logical OR operation is performed for each digit of the (m-1)th (2≦m≦M) operation code and the mth black bit that is connected to the black change point. When a white bit is detected after the M-th black bit, the M-th black bit is detected as a white change point, and the M-1th operation code is converted to the second bit containing the M-th black bit. It is saved as the final OR operation result of the black run, that is, the final OR operation result of a certain black pattern in the scanning line. The final OR operation result expressed in binary numbers is called the final operation code.

このように走査線上で黒変化点を検出したら白変化点を
検出するまで論理和演算を繰り返し行なうことによって
、走査線上で検出ざれる第二の黒ラン毎の(各黒パタン
別の)最終演算コードそ得る。最終演算コードの第iビ
ット目(第1桁目)が1であれば当該第二の黒ランは第
i番目の連続長を有する第一の黒ランの黒ビットを含み
、また第iビット目がOであれば当該第二の黒ランは第
i番目の連続長を有する第一の黒ランの黒ビットを含ま
ない。
In this way, when a black transition point is detected on a scanning line, by repeating the logical sum operation until a white transition point is detected, the final calculation for each second black run detected on the scanning line (for each black pattern) is performed. Get the code. If the i-th bit (first digit) of the final operation code is 1, the second black run includes the black bit of the first black run having the i-th continuous length, and the i-th bit If is O, the second black run does not include the black bits of the first black run having the i-th continuous length.

そして垂直セグメント抽出部16aは、枝出した前行及
び現行の第二の黒ランのなかから式(6a)及び(6b
)を満足する第二の黒ランを検出した場合に、不連続ラ
ン検出処理を行なう。式(6a)及び(6b)t満足し
ない前行及び現行の第二の黒ランについては不連続ラン
検出処理を行なわない。
Then, the vertical segment extraction unit 16a extracts equations (6a) and (6b) from the branched previous line and the current second black run.
), a discontinuous run detection process is performed when a second black run that satisfies is detected. Discontinuous run detection processing is not performed for the previous row and the current second black run that do not satisfy equations (6a) and (6b) t.

不連続ラン検出処理では、前行及び現行の走査線上で検
出した各第二の黒ラン毎の最終演算コードに基づいて不
連続ランを扶出したか否かを判定する. この不連続ランの検出につき次表1vr参照し説明する
.表1において前行及び現行で検出した第二の黒ランの
最終演算コードを、前行の欄及び現行の欄に二進数でそ
れぞれ示した。
In the discontinuous run detection process, it is determined whether or not a discontinuous run has been detected based on the final operation code for each second black run detected on the previous and current scanning lines. The detection of this discontinuous run will be explained with reference to Table 1vr below. In Table 1, the final operation codes of the second black runs detected in the previous row and the current row are shown in binary numbers in the previous row column and the current column, respectively.

前行及び現行の第二の黒ランが式(6a)、(6b)i
満足して互いに連結する場合に、これら前行及び現行の
第二の黒ランの最終演算コードがコード01及び10,
或はコード01及び11、或はコード10及び01、或
はコード11及び01となるとき、これら前行及び現行
の第二の黒ランは連結するが不連続であると判定する。
The previous row and the current second black run are expressed by equations (6a) and (6b)i
If they are satisfactorily connected to each other, the final operation codes of these previous rows and the current second black run are codes 01 and 10,
Alternatively, when codes 01 and 11, codes 10 and 01, or codes 11 and 01 are obtained, it is determined that these previous rows and the current second black run are connected but discontinuous.

これら前行及び現行の不連続な第二の黒ランが前行及び
現行の不連続ランである。
These previous and current discontinuous second black runs are the previous and current discontinuous runs.

不連続ランの位置として例えば黒、白変化点の中点位置
ヲ用いる.セグメントの抽出には前行及び現行の不連続
ランの双方の位置又はいずれか一方の位置を用いる. 不連続ランを検出した場合、これら不連続ランを含む黒
パタンの幾伺学的特徴の変化例えば黒パタンか折れ曲が
る等の変化を生したものとみなす。
For example, the midpoint position of the black and white transition points is used as the position of the discontinuous run. To extract segments, use the positions of the previous line and/or the current discontinuous run. When a discontinuous run is detected, it is assumed that a change has occurred in the geometrical characteristics of the black pattern including these discontinuous runs, such as the black pattern being bent.

また前行及び現行の第二の黒ランが連結する場合に、こ
れら前行及び現行の第二の黒ランの最終演算コードがコ
ード01及び01、或はコード10及び10、或はコー
ド10及び11、或はコード11及び10,或はコード
11及び11となるとき、これら第二の黒ランは不連続
ではなく、従ってこれら第二の黒ランを含む黒パタンの
幾何学的特徴の変化はなかったものとみなす.上述した
ように最終演算コードの第i桁が1及びOのいずれの値
であるかによって、第i番目の連続長を有する第一の黒
ランの黒ビットを第二の黒ランが含むか否かを知ること
ができる。
Also, when the previous row and the current second black run are connected, the final operation codes of the previous row and the current second black run are codes 01 and 01, or codes 10 and 10, or codes 10 and 10. 11, or codes 11 and 10, or codes 11 and 11, these second black runs are not discontinuous, so the change in the geometric characteristics of the black pattern including these second black runs is Assume that it never happened. As mentioned above, depending on whether the i-th digit of the final operation code is 1 or O, it is determined whether the second black run includes the black bit of the first black run having the i-th continuous length. You can know what.

従って検出した第二の黒ランが含む黒ビットのなかで連
続長が最長となる第一の黒ランの黒ビット(以下、最長
ビットと称す)に着目し、現行で出現した最長ビットで
あって前行では存在しなかった最長ビット、及び前行で
は存在していた最長ヒットであって現行で消滅した最長
ビットを、最終演算コードに基づいて見付けることがで
きる。現行で出現した最長ビットであって前行では存在
しなかった最長ビット、或は前行で存在しでいた最長ビ
ットであって現行では消滅してしまった最長ビットを見
付けたときが、表1において前行及び現行の最終演算コ
ードが不連続となる組合せとなるときであり、このとき
多くの場合に幾伺学的特徴の変化が見られる. そして垂直セグメント抽出部16aは、検出した黒パタ
ンの先頭ラン及び最後尾ランの位置と不連続ランの位置
とに基づいてセグメントを抽出する。
Therefore, we focused on the black bit of the first black run (hereinafter referred to as the longest bit) that has the longest continuous length among the black bits included in the detected second black run. The longest bit that was not present in the previous row and the longest bit that was present in the previous row and is now gone can be found based on the final opcode. Table 1 is when you find the longest bit that appears in the current line but did not exist in the previous line, or the longest bit that existed in the previous line but has disappeared in the current line. This is when the previous line and the current final operation code are discontinuous combinations, and at this time, a change in geometrical characteristics is often observed. Then, the vertical segment extraction unit 16a extracts segments based on the positions of the detected first run and last run of the black pattern and the positions of discontinuous runs.

この実施例では、黒パタンの先頭ランを検出してから不
通続ランを検出することなく当該黒パタンの最後尾ラン
を検出する場合、黒パタンの先頭ラン及び最後尾ランの
位atそれぞれセグメントの始点及び終点の位置として
検出する。
In this embodiment, when detecting the first run of a black pattern and then detecting the last run of the black pattern without detecting a discontinuous run, the positions at of the first run and the last run of the black pattern are respectively divided into segments. Detected as the start and end points.

また黒パタンの先頭ランヲ検出してから当該黒パタンの
不連続ラン及び最後尾ランを検出する場合、不連続ラン
の位置に基づいて分割した黒パタン(以下、分割した黒
パタンを分割パタンと称す)の先頭ラン及び最後尾ラン
の位atそれぞれセグメントの始点及び終点として検出
する.垂直セグメント抽出部16aと同様にして、水平
、右斜め、左斜めセグメント抽出部16b, 16c,
+6dも、垂直セグメント抽出部16aと同様にして、
水平、右斜め、左斜めサブパタンを第二の走査方向に走
査し水平、右斜め及び左斜めセグメントを検出する. 次に第2図を参照し垂直セグメントの抽出V −例とし
て、セグメント抽出処理につき具体的な例壱挙げて説明
する.第2図において、黒パタン1は一点、二点及び三
点鎖線で囲んだ分割パタン]a、1b及び〕Cから成る
パタンであり小さな曲率を有する線図形を表す。また点
線で囲んで示す黒パタン2は黒パタン1と連結しないパ
タンであり直線状の形状を有する線図形を表す。
In addition, when detecting the discontinuous run and the last run of the black pattern after detecting the first run of the black pattern, the black pattern is divided based on the position of the discontinuous run (hereinafter, the divided black pattern is referred to as divided pattern). ) are detected as the start and end points of the segment, respectively. Similar to the vertical segment extraction section 16a, horizontal, right diagonal, and left diagonal segment extraction sections 16b, 16c,
Similarly to the vertical segment extraction section 16a, +6d is also
The horizontal, right diagonal, and left diagonal subpatterns are scanned in the second scanning direction to detect horizontal, right diagonal, and left diagonal segments. Next, with reference to FIG. 2, vertical segment extraction V--As an example, segment extraction processing will be explained using one specific example. In FIG. 2, black pattern 1 is a pattern consisting of one point, two points, and division patterns ]a, 1b, and ]C surrounded by three-dot chain lines, and represents a line figure having a small curvature. Further, a black pattern 2 surrounded by a dotted line is a pattern that is not connected to the black pattern 1, and represents a line figure having a linear shape.

垂直セグメント抽出部16aは、コード化した垂直サブ
パタンの抽出が終了すると、垂直サブパタンかう垂直セ
グメントを抽出するための処理を開始する。
When the vertical segment extracting unit 16a finishes extracting the coded vertical sub-pattern, it starts processing for extracting vertical segments of the vertical sub-pattern.

垂直セグメント抽出部16aは走査開始行から線順次に
垂直サブパタンを走査しでゆく。そしてこの走査におい
て、走査線上で黒変化点及び白変化点を順次に検出した
ときのこれら黒、白変化点を或る特定の黒パタンに開す
る1組の黒、白変化点とし、前行及び現行の黒、白変化
点が関係式(6a)及び(6b)を満足するか否かを各
組毎に判定し、連結する第二の黒ランを検出する。ざら
に連結する第二の黒ラン毎に前行及び現行の最終演算コ
ードを調べ黒パタンの不連続ランそ検出する. そして不連続ランを検出しなかった黒パタンの場合、当
該黒パタンの先頭ラン及び最後尾ランの位置をそれぞれ
セグメントの始点及び終点の位置として検出し、当該黒
パタンの幾何学的構造を1本のセグメントで表す.また
不連続ランを検出した黒パタンの場合、当該黒パタンを
不通続ランの位置に基づいて分割して得た分割パタンの
先頭ラン及び最後尾ランの位@そそれぞれセグメントの
始点及び終点の位置として検出し、当該黒パタンの幾何
学的構造を複数個のセグメントで表す.第2図に示すサ
ブパタンからの垂直セグメント抽出では、走査開始行か
ら走査行Y1の1ライン前の行までは黒、白変化点tS
出しないが、走査行Y1で1組の黒、白変化点を検出す
る.走査行Y1の黒、白変化点間の黒コードは全てコー
ド01であり、従ってこれら黒、白変化点間の黒ランの
最終演算コードはコード01となる.走査行Y,の1ラ
イン前の行までは変化点が検出ざれて8らず走査行Y,
ではじめて1相の黒、白変化点を検出したので、黒パタ
ン]が出現したことがわかる.走査行Y1の1組の黒、
白変化点を黒パタン1の変化点として保存する。また走
査行Y1の1組の黒、白変化点間の第二の黒ラン(分割
パタン1aの先頭ランに相当する)の位置を、黒パタン
1の垂直セグメント1の始点座標としてセグメントメモ
リ24に格納する.垂直セグメント抽出部16aはさら
に走査行Y以下の走査行の走査を行なう。
The vertical segment extraction unit 16a scans the vertical sub-patterns line-by-line from the scanning start line. In this scanning, when black and white changing points are sequentially detected on the scanning line, these black and white changing points are set as a set of black and white changing points that form a certain black pattern, and the previous line Then, it is determined for each set whether the current black and white change points satisfy relational expressions (6a) and (6b), and a connected second black run is detected. For each second black run that is roughly connected, the previous line and the current final operation code are checked to detect discontinuous runs in the black pattern. In the case of a black pattern for which no discontinuous runs have been detected, the positions of the first run and the last run of the black pattern are detected as the start and end points of the segment, respectively, and the geometric structure of the black pattern is divided into one line. Represented by segments. In addition, in the case of a black pattern in which a discontinuous run is detected, the position of the first run and the last run of the divided pattern obtained by dividing the black pattern based on the position of the discontinuous run @ the position of the start point and end point of the segment, respectively. The geometric structure of the black pattern is expressed as multiple segments. In the vertical segment extraction from the sub-pattern shown in FIG.
However, one set of black and white changing points is detected in scanning line Y1. The black codes between the black and white change points in scanning line Y1 are all code 01, and therefore the final operation code of the black run between these black and white change points is code 01. No change point was detected up to the line one line before scanning line Y, and no change point was detected, so scanning line Y,
Since we detected the point where one phase changes between black and white for the first time, we can see that a black pattern has appeared. one set of black in scanning row Y1;
The white change point is saved as the change point of black pattern 1. In addition, the position of the second black run (corresponding to the first run of the divided pattern 1a) between the pair of black and white change points in the scanning line Y1 is stored in the segment memory 24 as the starting point coordinates of the vertical segment 1 of the black pattern 1. Store. The vertical segment extraction unit 16a further scans the scanning lines below scanning line Y.

垂直セグメント抽出部16aは走査行Y2の走査で2組
の黒、白変化点を検出する. 走査行Y2では前行(走査行Y,)で検出した黒、白変
化点と現行(走査行Y2)で検出した黒、白変化点とに
おいて、閉係式(6a)及び(6t))t満足する変化
点の組と満足しない変化点の組とを検出する。
The vertical segment extraction unit 16a detects two sets of black and white change points by scanning the scanning line Y2. In scanning line Y2, the closing equations (6a) and (6t)) t are used for the black and white changing points detected in the previous line (scanning line Y,) and the black and white changing points detected in the current line (scanning line Y2). A set of satisfying change points and a set of unsatisfied change points are detected.

前行で検出せず現行で検出した変化点の絹を新に出現し
た黒パタン2の変化点の組として保存する。ざらにこの
現行で新に現れた1組の黒、白変化点の間の第二の黒ラ
ン(黒パタン2の先頭ランに相当する)の位!8、黒パ
タン2の垂直セグメント2の始点座標としてセグメント
メモリ24に格納する.以下、第二の黒ランの位置とし
て例えば黒、白変化点の中点座標を用いる。
The silk of the change point that was not detected in the previous row but was detected in the current row is saved as a set of change points of the newly appearing black pattern 2. Roughly the second black run (corresponding to the first run of black pattern 2) between the pair of black and white change points that newly appeared in this current situation! 8. Store in the segment memory 24 as the starting point coordinates of vertical segment 2 of black pattern 2. Hereinafter, for example, the midpoint coordinates of the black and white transition points will be used as the position of the second black run.

ざらに走査を進めると、垂直セグメント抽出部16aは
走査行Y3で黒パタン1を構成する第二の黒ランの黒、
白変化点の組を検出するが、現行(走査行Y3)の黒パ
タン1の第二の黒ランの最終演算コードがコード11と
なり前行(走査行Y3の1ライン前の走査行)の黒パタ
ン1の第二の黒ランの最終演算コードがコード01とな
ることから、現行及び前行の黒パタン1の第二の黒ラン
は連結するが不連続であることがわかる.前行及び現行
の黒パタン1の第二の黒ランを不連続ランとして検出す
る. そして垂直セグメント抽出部16aはこれら不連続ラン
に基づいて黒パタン1の隅接する前段及び後段の分割パ
タン(分割パタン1a及び1bに相当する)の最後尾ラ
ン及び先頭ランを設定し、これら最後尾ラン及び先頭ラ
ンの位Nを前段及び後段の分割パタンのセグメント(セ
グメント1及び3に相当する)の終点及び始点の位置と
して、セグメントメモリ24に格納する. 例えば、前行の不連続ランを前段の分割パタンのR後尾
ラン及び現行の不連続ランを後段の分割パタンの先頭ラ
ンとし、これら最後尾ラン及び先頭ランの位置として黒
、白変化点の中点座標を用いる。
As the scan proceeds roughly, the vertical segment extraction unit 16a extracts the black of the second black run constituting the black pattern 1 in the scanning line Y3.
A set of white change points is detected, but the final operation code of the second black run of black pattern 1 of the current (scanning line Y3) becomes code 11, and the black of the previous line (scanning line one line before scanning line Y3) becomes code 11. Since the final operation code of the second black run of pattern 1 is code 01, it can be seen that the second black runs of black pattern 1 in the current and previous rows are connected but discontinuous. The second black run in the previous row and the current black pattern 1 is detected as a discontinuous run. Based on these discontinuous runs, the vertical segment extraction unit 16a sets the last run and the first run of the preceding and subsequent division patterns (corresponding to division patterns 1a and 1b) that are adjacent to the corners of the black pattern 1, and The position N of the run and the first run is stored in the segment memory 24 as the positions of the end and start points of the segments (corresponding to segments 1 and 3) of the previous and subsequent division patterns. For example, the discontinuous run in the previous row is set as the R trailing run of the previous division pattern, and the current discontinuous run is set as the first run in the division pattern in the next stage, and the positions of these last runs and first runs are set between the black and white change points. Use point coordinates.

ざらに垂直サブパタンを走査すると、走査行Y3から走
査行Y4の1ライン前までの走査では不連続ランを検出
しないが、走査行Y,lの走査で、黒バタノ1の現行(
走査行Y4)の黒パタン1の最終演算コードかコード0
1となり前行(走査行Y4の1ライン前の走査行)の黒
パタン1の最終演算コードかコード11となることがら
、黒パタン1の不連続ランを検出する。
When the vertical sub-pattern is roughly scanned, discontinuous runs are not detected in the scan from scan line Y3 to one line before scan line Y4, but in the scan of scan lines Y and l, the current (Kurobatano 1) is detected.
Final operation code or code 0 for black pattern 1 in scanning line Y4)
1, and the final operation code of black pattern 1 in the previous row (scanning row one line before scanning row Y4) becomes code 11, so that a discontinuous run of black pattern 1 is detected.

上述と同様にして、検出した不連続ランに基づき黒パタ
ン1のFaWiする前段及び後段の分割パタン(分割パ
タン1b及び1cに相当する)の最後尾ラン及び先頭ラ
ンを設定し、これら最後尾ラン及び先頭ランの位置IF
r、前段及び後段の分割パタンのセグメント(セグメン
ト3及び4に相当する)の終点及び始点の位置としてセ
グメントメモリ24に格納する。
In the same manner as described above, the last run and first run of the previous and subsequent division patterns (corresponding to division patterns 1b and 1c) to be FaWied for black pattern 1 are set based on the detected discontinuous runs, and these last runs are set. and position IF of the first run
r, are stored in the segment memory 24 as the positions of the end and start points of the segments of the previous and subsequent division patterns (corresponding to segments 3 and 4).

ざらに垂直サブパタンの走査を行なうと、走査行Y,の
走査で、前行(走査行Y,の]ライン前の走査行)で黒
、白変化点を検出したが現行(走査行Ya)で黒、白変
化点を検出しなくなった黒パタンすなわち黒パタン21
8.検出する.どの黒パタンの黒、白変化点が現行で消
滅し或は新に出現したかは、例えば、各走査行毎の黒、
白変化点の組の数の変化を調べたり、或は現行で黒、白
変化点を検出した黒パタンと前行で黒、白変化点を、検
出した黒パタンとを照合することによって、知ることが
できる. 垂直セグメント抽出部16aは現行で黒、白変化点を検
出しなくなった黒パタンすなわち黒パタン2のセグメン
ト2の終点座標として、前行の黒パタン2の黒、白変化
点の中点座標をセグメントメモリ24に格納する. さらに走査行Y8廐走査すると、黒、白変化点を1相も
検出しなくなり、従って前行(走査行Yllの1ライン
前の走査行Y5)で黒、白変化点を検出した黒パタン(
すなわち黒パタン1の終点を検出したことがわかる。
When scanning the vertical sub-pattern roughly, a black and white change point was detected in the previous line (the line before scanning line Y), but it was detected in the current line (scanning line Ya). Black pattern in which black and white transition points are no longer detected, that is, black pattern 21
8. To detect. Which black and white changing points of the black pattern have disappeared or newly appeared can be determined by, for example, the black and white change points of each scanning line.
This can be determined by checking the change in the number of sets of white changing points, or by comparing the black pattern in which black and white changing points were detected in the current process with the black pattern in which black and white changing points were detected in the previous line. be able to. The vertical segment extracting unit 16a uses the midpoint coordinates of the black and white transition points of the previous black pattern 2 as the end point coordinates of segment 2 of the black pattern 2, that is, the black pattern 2 for which no black and white transition points are currently detected. Store in memory 24. Further, when the scan line Y8 is scanned forward, no phase change point between black and white is detected. Therefore, the black pattern (
In other words, it can be seen that the end point of black pattern 1 has been detected.

垂直セグメント抽出部16aは前行の黒バタシ]の黒、
変化点の中点座標を、黒パタン1のセグメント4の終点
座標としてセグメントメモリ24に格納する。このよう
に前行の黒パタンか1個の黒パタン1てあって現行で1
絹も黒、白変化点を検出しなくなった場合には、式(6
a)及び(6b)に基づく連結性の判定及び最終演算コ
ードに基づく不連続ランの検出を行なう必要はない。
The vertical segment extraction part 16a is the black of the previous row,
The midpoint coordinates of the change points are stored in the segment memory 24 as the end point coordinates of segment 4 of black pattern 1. In this way, if there is a black pattern in the previous row or one black pattern, it is currently 1.
If the black and white change points are no longer detected for silk, then the formula (6
There is no need to determine connectivity based on a) and (6b) and detect discontinuous runs based on the final opcode.

第3図(A)〜(D)はセグメントの他の例を示す図で
ある.セグメントは黒パタンの先頭ラン、最後尾ラン及
び不連続ランの位置に基づいて任意好適に設定すること
ができる. 例えば第3図(A)にも示すように、黒バノノシの始点
、終点及び不連続ランにおいて、これら各第二の黒ラン
を構成する黒ビットのうち、最長の連続長を有する第一
の黒ランを構成する黒ビット(以下、最長ビットと称す
)を検出し、検出した最長ビットの黒、白変化点の中点
座標を、セグメントの始点、終点座標とする。
FIGS. 3(A) to 3(D) are diagrams showing other examples of segments. Segments can be arbitrarily set based on the positions of the first run, last run, and discontinuous runs of the black pattern. For example, as shown in FIG. 3(A), at the start point, end point, and discontinuous run of a black band, the first black bit having the longest continuous length among the black bits constituting each of these second black runs The black bit (hereinafter referred to as the longest bit) constituting the run is detected, and the coordinates of the midpoint of the black/white transition point of the detected longest bit are set as the start and end point coordinates of the segment.

この場合、最長ビットが1個であれば当該1個の最長ビ
ットの座標を、また最長ビットが複数個であればこれら
複数個の黒ビットの中点の座標を、セグメントの始点或
は終点座標とする.また第3図(B)にも示すように、
黒パタンの先頭ラン、最後尾及び不連続ランにおいて、
これら各第二の黒ランを構成する黒ビットのうち、最長
の連続長以外の任意好適な長さの連続長を有する第一の
黒ランを構成する黒ビット例えばコードO]の黒ビット
を検出し、当該検出した黒ビットの中点座標を、セグメ
ントの始点或は終点座標としてもよい. また第3図(C)にも示すように、黒パタンの先頭ラン
、@後尾ラン及び不連続ランにおいで、これら各第二の
黒ランの白変化点の座標を、セグメントの始点、終点座
標としてもよい.また第3図(D)の場合には、セグメ
ント抽出部を、次1こ述べるようにセグメントを抽出す
るセグメント抽出部とする。すなわち不連続ランを検出
しなかった黒パタンに関しては、当該黒パタンの先頭ラ
ン及び最後尾ランの位atそれぞれセグメントの始点及
び終点の位置として検出し、当該黒パタンの幾何字的構
造を1本のセグメントで表す。かつ不連続ランヲ検出し
た黒パタンに関しては、当該黒パタンの先頭ラン及び最
後尾ランの位8%それぞれセグメントの始点及び終点の
位置として検出すると共に不通続ランの位置l当該セグ
メントの折れ点として検出し、当該黒パタンを折れ点を
有する1本のセグメントで表現する。
In this case, if there is one longest bit, the coordinates of the one longest bit, or if there are multiple longest bits, the coordinates of the midpoint of these black bits, the start point or end point coordinates of the segment. Suppose that Also, as shown in Figure 3 (B),
In the first run, last run, and discontinuous run of the black pattern,
Among the black bits constituting each of the second black runs, the black bits constituting the first black run having a continuous length of any suitable length other than the longest continuous length, for example, the black bit of code O] are detected. However, the coordinates of the midpoint of the detected black bit may be used as the start point or end point coordinates of the segment. In addition, as shown in FIG. 3(C), in the first run, the last run, and the discontinuous run of the black pattern, the coordinates of the white change point of each of these second black runs are calculated as the start point and end point coordinates of the segment. It is also possible to do this. In the case of FIG. 3(D), the segment extraction section is a segment extraction section that extracts segments as described below. In other words, for black patterns for which no discontinuous runs have been detected, the positions at of the first run and the last run of the black pattern are detected as the start and end points of the segment, respectively, and the geometric structure of the black pattern is divided into one line. Represented by segments. In addition, for a black pattern in which a discontinuous run is detected, the first run and last 8% of the black pattern are detected as the start and end points of the segment, respectively, and the position of the discontinuous run is detected as the breaking point of the segment. Then, the black pattern is expressed by one segment having a break point.

セグメントの始点及び終点の位11%黒バタシの先頭ラ
ン及び最後尾ランの位置例えばこれら先頭ラン及び最後
尾ランの黒、白変化点の中点座標とし、折れ点の位置を
不連続ランの位置例えば現行の不連続ランの黒、白変化
点の中点座標とする. 第3図(D)に示すセグメントの情報の形式を例えばセ
グメントの始点及び終点座標、折れ点数、折れ点座標と
すると文字図形の認識を行なう場合に、折れ点数のみヲ
参照するだけで折れ点或は屈曲点を含むセグメントであ
るか否かを判定できるウしかも、更に詳細に調べる必要
がある場合、折れ点座標を参照することもできるので第
3図(A)〜(C)の形式のセグメントに比べて少いデ
ータ量で同等の情報を持つことになる.また図には示し
ていないが、不連続ランを有する1個の黒パタンヲ複数
個のセグメントで表現するようにした場合に、これらセ
グメントの始点及び又は終点座標に対して当該1個の黒
パタンから抽出されたセグメントであることを表すフラ
グを付すようにしてもよいし、またセグメントの始点及
び又は終点座標に対して当該1個の黒パタンかうの抽出
順に付した抽出順序番号を付加するようにしてもよい。
The starting point and ending point of the segment are the positions of the first run and the last run of the 11% black pattern.For example, the middle point coordinates of the black and white transition points of these first and last runs are taken as the position of the break point, and the position of the break point is the position of the discontinuous run. For example, let it be the midpoint coordinates of the black and white transition points of the current discontinuous run. If the format of the segment information shown in FIG. 3(D) is, for example, the coordinates of the start and end points of the segment, the number of break points, and the coordinates of the break points, when recognizing a character figure, the break points or It is possible to determine whether or not a segment includes a bending point.Furthermore, if a more detailed investigation is required, the bending point coordinates can be referred to, so a segment in the form of Figure 3 (A) to (C) can be determined. It has the same information with a smaller amount of data than . Although not shown in the figure, when one black pattern with discontinuous runs is expressed by multiple segments, the starting point and/or ending point coordinates of these segments are A flag indicating that the segment is an extracted segment may be attached, and an extraction order number attached to the extraction order of the black pattern may be added to the start point and/or end point coordinates of the segment. You can.

このようなフラグや抽出順序番号を用いることによって
セグメント相互の連結性の判定が可能となり、このセグ
メント相互の連結性の判定を文字図形の認識に役立てる
ことができる. また上述した実施例では黒パタン1の各セグメントの始
点、終点をそれぞれ個別に決定するようにしたか、gA
捜する前段の及び後段のセグメントにおいて前行の不連
続ランの位置ヲ(又は現行の不連続ランの位1f%) 
、前段のセグメントの終点及び後段のセグメントの始点
に共通の座標として用いるようにしてもよい. 第4図及び第5図は形状の頼似した部分を有する2つの
図形から抽出したセグメントの抽出例を示す図である. 第4図及び第5図の(A)は形状の類似する2つの図形
の原パタン、第4図(B)、(C)、(D)及び(E)
はそれぞれ第4図(A)に示す原パタンかう実施例装置
により抽出した水平セグメントh、垂直セグメント,左
斜めセグメントg及び右斜めセグメントrを示し、第5
図(B)、(C)、(D)及び(E)はそれぞれ第5図
(A)に示す原パタンから実施例装置により抽出した水
平セグメントh、垂直セグメントV、左斜めセグメント
l及び右斜めセグメントr7a示す。尚、図中のハッチ
ング部分は黒ビット部分を示す。
By using such flags and extraction order numbers, it is possible to determine the connectivity between segments, and this determination of the connectivity between segments can be used to recognize characters and figures. Furthermore, in the above-described embodiment, the starting point and ending point of each segment of the black pattern 1 are individually determined, or gA
The position of the previous discontinuous run in the previous and subsequent segments to be searched (or the position 1f% of the current discontinuous run)
, may be used as common coordinates for the end point of the preceding segment and the starting point of the subsequent segment. Figures 4 and 5 are diagrams showing examples of segment extraction from two figures having similar parts. Figures 4 and 5 (A) are original patterns of two similar shapes; Figures 4 (B), (C), (D) and (E)
represent a horizontal segment h, a vertical segment, a left diagonal segment g, and a right diagonal segment r extracted by the original pattern shown in FIG. 4(A), respectively;
Figures (B), (C), (D), and (E) are a horizontal segment h, a vertical segment V, a left diagonal segment l, and a right diagonal segment extracted from the original pattern shown in Figure 5 (A) by the apparatus of the embodiment, respectively. Segment r7a is shown. Note that the hatched portions in the figure indicate black bit portions.

これら図からも理解できるように、曲率の小ざい曲線部
分からも直線部分と異なるセグメントを抽出できるので
、文字図形の認識の際、認識部26は抽出されたセグメ
ントから多〈の特徴を検出することができ、従って類似
した図形を誤らすに精度良く識別できる。
As can be understood from these figures, segments different from straight parts can be extracted even from curved parts with small curvatures, so when recognizing character shapes, the recognition unit 26 detects many features from the extracted segments. Therefore, similar figures can be identified with high accuracy.

第6図(A)〜(C)は実施例装置により抽出した他の
セグメントの例を示す図であり、同図(A)、(B)及
び(C)は第11図(A)、(B)及び(C)に対応す
る水平サブパタンかう抽出された水平セグメントを示す
。第6図(A)〜(C)において斜線のハッチング部は
黒コード01が付ざれる黒ビット部分及び格子のハッチ
ング部は黒コード10が付ざれる黒ビット部分を表し、
一点鎖線は抽出したセグメントを表す。
FIGS. 6(A) to 6(C) are diagrams showing examples of other segments extracted by the embodiment apparatus, and FIGS. The horizontal subpatterns corresponding to B) and (C) show the extracted horizontal segments. In FIGS. 6(A) to (C), the diagonally hatched portion represents the black bit portion to which black code 01 is attached, and the lattice hatched portion represents the black bit portion to which black code 10 is attached,
The dashed line represents the extracted segment.

第6図及び第11図からも理解できるように、曲率の小
さい曲線の場合、2つの直線が1800に近い交差角で
直結する図形の場合、ざらに同一万向に延在する2つの
直線間に小図形が存在する場合でも、従来に比して図形
の構造をより忠実に表すセグメントを抽出てきる。
As can be understood from Figures 6 and 11, in the case of a curve with a small curvature, in the case of a figure in which two straight lines are directly connected at an intersection angle close to 1800, two straight lines that extend in roughly the same direction Even if there are small figures in between, segments that more faithfully represent the structure of the figures can be extracted than before.

第;41社辺j璽赴例 第7図は第二発明の実施例の説明に供する図であり、第
二発明の実施例の全体的な構成を概略的に示す機能ブロ
ック図である.尚、上述した第一発明の実施例の構成戒
分と対応する構成戒分についでは同一の符号を付して示
す. 以下の説明では、主として上述した第一発明の実施例と
相違する点につき説明し、第一発明の実施例と同様の点
についでは詳細な説明を省略する。
Figure 7 is a diagram for explaining the embodiment of the second invention, and is a functional block diagram schematically showing the overall configuration of the embodiment of the second invention. In addition, the constituent precepts corresponding to the constituent precepts of the embodiment of the first invention described above are indicated by the same reference numerals. In the following description, points that are different from the embodiment of the first invention described above will be mainly explained, and detailed explanations of the same points as the embodiment of the first invention will be omitted.

第二発明の実施例の図形認識装置は、閾値設定部12と
、サブパタン抽出部14と、セグメント抽出部16と、
セグメントを、第一の走査方向別に分類すると共1こ黒
コードから得られるセグメント種別情報に基づいて分類
するセグメント分類部28と、文字図形の定義に適う分
類のセグメントのなかから文字図形を橋戒するセグメン
トを検出する認識部30とを備える. ざらにこの実施例の図形認識装置は、パタンメモリ18
と、線幅計算部20と、サブパタンメモリ22と、セグ
メントを分類別に格納するセグメントメモリ24とを備
えて成る. 以下より詳細にこの実施例につき説明する.(セグメン
ト抽出部) この実施例のセグメント抽出8B16は、黒パタンの先
頭ランを検出してから不連続ランを検出することなく当
該黒パタンの最後尾ランを検出する場合、黒パタシの先
頭ラン及び最後尾ランの位11%それぞれセグメントの
始点及び終点の位置として検出する。
The figure recognition device according to the embodiment of the second invention includes a threshold setting section 12, a sub-pattern extraction section 14, a segment extraction section 16,
A segment classification unit 28 that classifies segments according to the first scanning direction and based on segment type information obtained from the one-black code; and a recognition unit 30 that detects the segment. Roughly speaking, the figure recognition device of this embodiment has a pattern memory 18.
, a line width calculation section 20, a sub-pattern memory 22, and a segment memory 24 for storing segments by classification. This example will be explained in more detail below. (Segment Extraction Unit) The segment extraction 8B16 of this embodiment detects the first run of the black pattern and then detects the last run of the black pattern without detecting discontinuous runs. The 11% of the last run is detected as the start and end points of the segment, respectively.

また黒パタンの先頭ランを検出してから当該黒パタンの
不連続ラン及び最後尾ランを検出する場合、不連続ラン
の位冨に基づいて分害I1シた黒パタン(分割パタン)
の先頭ラン及び最後尾ランの位11ヲそれぞれセグメン
トの始点及び終点として検出する。
In addition, when detecting the first run of the black pattern and then detecting the discontinuous run and the last run of the black pattern, the black pattern (division pattern) is divided into I1 based on the depth of the discontinuous run.
The first and last runs of 11 are detected as the start and end points of the segment, respectively.

黒パタン或は分割パタンの先頭ラン及び最後尾ラン、ざ
らに黒パタンの不連続ラン(これら黒ランはすべて第二
の黒ランである)の位置として、第2図、第3図(A)
〜(C)を用いて説明した第二の黒ランの位置を用いる
. さらにこの実施例のセグメント抽出部16はセグメント
種別情報として、例えばセグメントの始点又は終点にお
ける最終演算結果の最終演算コードを出力する. ざらにこの実施例では、不連続ランを有する1個の黒パ
タンヲ扶出する場合に、当該黒パタンかう抽出ざれるセ
グメントの始点及び又は終点座標に対して当該黒パタン
かう抽出されたセグメントであることを表すフラグ(連
結フラグ)を付す。
The positions of the first run and last run of the black pattern or divided pattern, and the discontinuous runs of the roughly black pattern (all of these black runs are second black runs) are shown in Figures 2 and 3 (A).
~Use the position of the second black run explained using (C). Furthermore, the segment extraction unit 16 of this embodiment outputs, as segment type information, for example, the final operation code of the final operation result at the start point or end point of the segment. Roughly speaking, in this embodiment, when one black pattern having discontinuous runs is extracted, the black pattern is the extracted segment with respect to the start point and/or end point coordinates of the extracted segment. A flag (connection flag) indicating this is attached.

この実施例のセグメント抽出部16もまた各第一の走査
方向別のセグメントを抽出するための垂直、水平、右斜
め及び左斜めセグメント抽出部16a, +6b, 1
6c及び+6dから成り、各抽出部16a116b, 
16c及び+6dは図示しない垂直、水平、右斜め及び
左斜めセグメントレジスタを備える.次に第2図%9照
し垂直セグメントの抽出を−例として、セグメント抽出
処理につき具体的な例を挙げて説明する。垂直セグメン
ト抽出部16aと同様にして他のセグメント抽出部J6
b ,16c及び+6dのセグメント抽出も行なわれる
ので、これらセグメント抽出部16b ,!6c及び1
6dのセグメント抽出の説明を省略する. 垂直セグメント抽出部16aは、コード化した垂亘サブ
バタシの抽出が終了すると、垂直サブパタンかう垂直セ
グメントを抽出するための処理を開始する. 第2図に示すサブパタンかうの垂直セグメント抽出では
、走査開始行から走査行Y1の1ライン前の行までは黒
、白変化点を検出しないが、走査行Y,で1組の黒、白
変化点を検出する.走査行Y1の1ライン前の行までは
変化点が検出ざれておらず走査行Y,ではじめて1組の
黒、白変化点を検出したので、黒パタン1が出現したこ
とがわかる。走査行Y+の1組の黒、白変化点を黒パタ
ン1の変化点として保存する.また走査行Y,の1組の
黒、白変化点間の第二の黒うン(分割パタン1aの先頭
ランに相当する)の位置を、黒パタン1の垂直セグメン
ト1の始点座標として図示しない垂直セグメントレジス
タに格納し、さらにこの始点座標と共に現行Y,の最終
演算コード01(分割パタン1aの始点における最終演
算コードである)を垂直セグメント1のセグメント種別
情報として垂直セグメントレジスタに格納する。
The segment extraction unit 16 of this embodiment also includes vertical, horizontal, right diagonal, and left diagonal segment extraction units 16a, +6b, 1 for extracting segments for each first scanning direction.
6c and +6d, each extraction part 16a116b,
16c and +6d are provided with vertical, horizontal, right diagonal, and left diagonal segment registers (not shown). Next, a specific example of the segment extraction process will be described, taking the extraction of a vertical segment in reference to FIG. 2 as an example. Similarly to the vertical segment extraction section 16a, another segment extraction section J6
b, 16c, and +6d are also extracted, so these segment extraction units 16b, ! 6c and 1
The explanation of segment extraction in 6d will be omitted. When the vertical segment extraction unit 16a finishes extracting the coded vertical subpatterns, it starts processing for extracting vertical segments corresponding to the vertical subpatterns. In vertical segment extraction using the sub-pattern shown in Figure 2, no black and white change points are detected from the scan start line to the line one line before scan line Y1, but one set of black and white change points is detected in scan line Y. Detect points. It can be seen that black pattern 1 has appeared because no change point was detected up to the line one line before scan line Y1, and a pair of black and white change points was detected for the first time in scan line Y. Save a set of black and white changing points in scanning line Y+ as changing points of black pattern 1. Also, the position of the second black dot (corresponding to the first run of the divided pattern 1a) between a pair of black and white change points in the scanning line Y is not shown as the starting point coordinates of the vertical segment 1 of the black pattern 1. Further, the final operation code 01 of the current Y (which is the final operation code at the start point of the division pattern 1a) is stored in the vertical segment register as the segment type information of the vertical segment 1, together with the starting point coordinates.

垂直セグメント抽出部16aは走査行Y2の走査で2組
の黒、白変化点を検出する. 走査行Y2では前行(走査行Yl)で検出した黒、白変
化点と現行(走査行Y2)で検出した黒、白変化点とに
おいて、関係式(6a)及び(6b)%満足する変化点
の組と満足しない変化点の絹とを検出する。
The vertical segment extraction unit 16a detects two sets of black and white change points by scanning the scanning line Y2. In scanning line Y2, there is a change that satisfies relational expressions (6a) and (6b)% between the black and white changing points detected in the previous line (scanning line Yl) and the black and white changing points detected in the current line (scanning line Y2). Detect a set of points and a silk of unsatisfied change points.

前行で検出せず現行で検出した変化点の組を新に出現し
た黒パタン2の変化点の組として保存する。さらにこの
現行で新に現れた1組の黒、白変化点の間の第二の黒ラ
ン(黒パタン2の先頭ランに相当する)の位置ヲ、黒パ
タン2の垂直セグメント2の始点座標として図示しない
垂直セグメントメモリに格納し、ざらにこの始点座標と
共に現行Y2の最終演算コード10(黒パタン2の始点
における最終演算コードである)を垂直セグメント2の
セグメント種別情報として垂直セグメントレジスタに格
納する。
A set of changing points not detected in the previous line but detected in the current line is saved as a set of changing points of the newly appearing black pattern 2. Furthermore, the position of the second black run (corresponding to the first run of black pattern 2) between the pair of black and white change points that newly appeared in the current state is taken as the starting point coordinates of vertical segment 2 of black pattern 2. The final operation code 10 of the current Y2 (the final operation code at the start point of the black pattern 2) is stored in the vertical segment register as the segment type information of the vertical segment 2, along with the start point coordinates. .

ざらに走査r8進めると、垂直セグメント抽出部16a
は走査行Y3て現行(走査行Y3)及び前行(走査行Y
3の1ライン前の走査行)の第二の黒ランが不連続ラン
であることを検出する。
After roughly scanning r8, the vertical segment extractor 16a
is scan line Y3 and the current (scan line Y3) and previous line (scan line Y
It is detected that the second black run in the scanning line one line before 3) is a discontinuous run.

垂直セグメント抽出部16aは検出したら不連続ランに
基づいて黒パタン1の隅接する前段及び後段の分割パタ
ン(分割パタン1a及び1bに相当する)の最後尾ラン
及び先頭ランを設定し、これら最後尾ラン及び先頭ラン
の位置を前段及び後段の分割パタンのセグメント(セグ
メント1及び3に相当する)の終点及び始点の位置とす
る.そしてセグメント1の終点の位置と、当該セグメン
ト1に連結するセグメント(セグメント3)が存在する
ことを表す連結フラグと、先に垂直セグメントレジスタ
に格納ざれでいるセグメント1の始点及びセグメント種
別情報とをセグメント分類部28に対して出力する.こ
れと共にセグメント3の始点位置と当該セグメント3に
連結するセグメント(セグメント1)が存在することを
表す連結フラグとを垂直セグメントレジスタに格納する
. ざらに垂直サブパタンを走査すると、走査行Y3から走
査行Y4の1ライン前までの走査では不連続ランを検出
しないが、走査行Y4の走査で、黒パタン1の不連続ラ
ンを検出する。
Once detected, the vertical segment extracting unit 16a sets the last run and the first run of the preceding and subsequent division patterns (corresponding to division patterns 1a and 1b) that are adjacent to the corners of the black pattern 1 based on the discontinuous runs, and sets these last runs. Let the positions of the run and the first run be the end and start points of the segments (corresponding to segments 1 and 3) of the previous and subsequent division patterns. Then, the position of the end point of segment 1, the connection flag indicating that there is a segment (segment 3) connected to segment 1, and the start point and segment type information of segment 1 that have not been previously stored in the vertical segment register. It is output to the segment classification unit 28. At the same time, the starting point position of segment 3 and a connection flag indicating that there is a segment (segment 1) connected to segment 3 are stored in the vertical segment register. When the vertical sub-pattern is roughly scanned, a discontinuous run is not detected in the scan from scan line Y3 to one line before scan line Y4, but a discontinuous run of black pattern 1 is detected in the scan of scan line Y4.

上述と同様にして、検出した不連続ランに基づき黒パタ
ン1の陽接する前段及び後段の分割パタン(分割パタン
1b及び1cに相当する)の最後尾ラン及び先頭ランを
設定し、これら最後尾ラン及び先頭ランの位at、前段
及び後段の分割パタンのセグメント(セグメント3及び
4に相当する)の終点及び始点の位置とする。
In the same manner as described above, the last run and the first run of the front and rear division patterns (corresponding to division patterns 1b and 1c) that are in direct contact with black pattern 1 are set based on the detected discontinuous runs, and these last runs are set. and the position at of the first run, and the positions of the end and start points of the segments (corresponding to segments 3 and 4) of the previous and subsequent division patterns.

そしてセグメント3の終点の位置と、当該セグメント3
の終点に連結するセグメント(セグメント4に相当する
)が存在することを表す終点の連結フラグと、先に垂直
セグメントレジスタに格納されているセグメント3の始
点、セグメント種別情報及び始点の連結フラグとをセグ
メント分類部28に対して出力する.これと共にセグメ
ント4の始点位置と当該セグメント4の始点に連結する
セグメント(セグメント3)が存在することを表す連結
フラグとを垂直セグメントレジスタに格納する, ざらに垂直サブパタンの走査を行なうと、走査行Y5の
走査で、前行(走査行Y,の1ライン前の走査行)で黒
、白変化点を検出したが現行(走査行Y5)で黒、白変
化点を検出しなくなった黒パタンすなわち黒パタン2を
検出する.垂直セグメント抽出部t6aは前行の黒パタ
ン2の第二の黒ランの位置ヲ現行で黒パタン2のセグメ
ント2の終点座標とし、このセグメント2の終点座標と
、先に垂直セグメントレジスタに格納ざれているセグメ
ント2の始点座標とをセグメント分類部28に対して出
力する. さらに走査行Y6を走査すると、黒、白変化点181組
も検出しなくなり、従って前行(走査行Y6の1ライン
前の走査行Y5)で黒、白変化点を検出した黒パタン(
すなわち黒パタン1)の終点を検出したことがわかる。
and the position of the end point of segment 3 and the segment 3
The end point concatenation flag indicating that there is a segment (corresponding to segment 4) connected to the end point of , and the start point, segment type information, and start point concatenation flag of segment 3 previously stored in the vertical segment register. It is output to the segment classification unit 28. Along with this, the start point position of segment 4 and a link flag indicating that there is a segment (segment 3) connected to the start point of segment 4 are stored in the vertical segment register. In scanning Y5, black and white changing points were detected in the previous line (scanning line one line before scanning line Y), but black and white changing points were not detected in the current line (scanning line Y5), that is, a black pattern. Detect black pattern 2. The vertical segment extraction unit t6a sets the position of the second black run of black pattern 2 in the previous row as the current end point coordinates of segment 2 of black pattern 2, and stores the end point coordinates of segment 2 in the vertical segment register first. The coordinates of the starting point of segment 2 are output to the segment classification unit 28. When scanning line Y6 is further scanned, the 181 pairs of black and white change points are no longer detected. Therefore, the black pattern (
That is, it can be seen that the end point of black pattern 1) has been detected.

垂直セグメント抽出部16aは前行の黒パタン1の第二
の黒ランの位1!%、黒パタン1のセグメント4の終点
座標とし、このセグメント4の終点座標と、先(こ垂直
セグメントレジスタに格納ざれでいるセグメント4の始
点座標及び当該セグメント4の始点に連結するセグメン
ト(セグメント3)が存在することを表す連結フラグと
セグメント分類部28に対して出力する。このように前
行の黒パタンか1個の黒パタン1てあって現行で1絹も
黒、白変化点を検出しな〈なった場合1こは、式(6a
)及び(6b)に基づく連結性の判定を行なう必要はな
い。
The vertical segment extraction unit 16a extracts the second black run position 1 of the black pattern 1 in the previous row! %, the end point coordinates of segment 4 of black pattern 1, the end point coordinates of this segment 4, the start point coordinates of segment 4 stored in the vertical segment register, and the segment (segment 3) connected to the start point of segment 4. ) is output to the segment classification unit 28 as a connected flag indicating the existence of the black pattern. If it becomes 1, then the formula (6a
) and (6b) are not required.

(セグメント分類部) この実施例のセグメント分類部28はセグメント種別情
報として、例えばセグメントの始点又は終点における最
終演算結果の最終演算コードを用いる。
(Segment Classification Unit) The segment classification unit 28 of this embodiment uses, for example, the final operation code of the final operation result at the start point or end point of the segment as the segment type information.

このセグメント種別情報を用いた場合、セグメント情報
の各ビット(各桁)の数字が『○」及び「1」のいずれ
であるかを調べることによって、当該セグメント種別情
報を得たセグメントのパタンを構成する最長の連続長の
第一の黒ランを知ることかできる.例えば第2図におい
て分割パタン1bの走査行Y3又は走査行Y4の1ライ
ン前の走査行におけるセグメント種別情報はコード11
であり、従って分割パタン1bがコード10に対応する
長さの連続長を有する第一の黒ランを含むことがわかる
。従ってセグメント種別情報に基づき、当該セグメント
種別情報を得たセグメントのパタンを第一の走査方向に
おける長さに応じて分類できる。
When this segment type information is used, the pattern of the segment obtained from the segment type information is constructed by checking whether the number of each bit (each digit) of the segment information is "○" or "1". You can find out the first black run with the longest continuous length. For example, in FIG. 2, the segment type information in the scanning line one line before scanning line Y3 or scanning line Y4 of division pattern 1b is code 11.
Therefore, it can be seen that the division pattern 1b includes a first black run having a continuous length corresponding to the code 10. Therefore, based on the segment type information, the pattern of the segment from which the segment type information has been obtained can be classified according to the length in the first scanning direction.

この実施例では長いセグメント及び短いセグメントの2
種に分類でき、セグメント種別情報がコード10或はコ
ード11であれば当該セグメント種別情報のセグメント
は長いセグメント、セグメント種別情報がコード01で
あれば当該セグメント種別情報のセグメントは短いセグ
メントであるとみなす。
In this example, there are two long segments and one short segment.
If the segment type information is code 10 or code 11, the segment in the segment type information is considered to be a long segment, and if the segment type information is code 01, the segment in the segment type information is considered to be a short segment. .

さらにこの実施例のセグメント分類部28は、セグメン
ト種別情報かコード01てある場合に、当該セグメント
種別情報を得たセグメントの始点及び終点間の距MSを
求め、この距離に基づいて当該セグメントを分類する.
この分類のため任意好適な値に設定した分類閾@Tと距
MSとを比較する。
Furthermore, when the segment type information is code 01, the segment classification unit 28 of this embodiment calculates the distance MS between the starting point and the ending point of the segment for which the segment type information has been obtained, and classifies the segment based on this distance. do.
The classification threshold @T set to an arbitrary suitable value for this classification is compared with the distance MS.

閾植Tを任意好適に設定することによって、短いセグメ
ントが、例えば、第一の走査方向と所定の角度で交差す
る方向に延在する長い直線図形のパタンのセグメント又
はほぼ第一の走査方向に;8う方向にうねる曲線図形の
パタンのセグメント(以下、これらセグメントを長い図
形の短いセグメントと称す)7:あるのか、或はほぼ第
一の走査方向に沿う方向の始点及び終点間の距離が短い
直線図形のパタンのセグメント(以下、短い図形の短い
セグメントと称す)であるのかを判別することができる
。従って短いセグメントを、長い図形の短いセグメント
或は短い図形の短いセグメントに分類できる。
By setting the threshold T in any suitable manner, the short segments can be, for example, segments of a long linear pattern extending in a direction intersecting the first scanning direction at a predetermined angle, or approximately in the first scanning direction. ; 8 Segments of a pattern of curved figures that undulate in the direction (hereinafter, these segments are referred to as short segments of long figures); It can be determined whether the segment is a pattern segment of a short straight line figure (hereinafter referred to as a short segment of a short figure). Therefore, short segments can be classified into short segments of long figures or short segments of short figures.

第8図はセグメントの抽出例を示す図である。FIG. 8 is a diagram showing an example of segment extraction.

同図において目、1〜H15はセグメント種別情報かコ
ード01となる短い木平セグメント、目2I〜目27は
セグメント種別情報がコード10又はコード11となる
水平セグメント、臼,,はセグメント種別情報がコード
01となる水平セグメント、,1、12はセグメント種
別情報がコードO]となる垂直セグメント、V21〜V
24はセグメント種別情報がコード○]又はコード11
となる垂直セグメントを示す。
In the same figure, 1 to H15 are short wood flat segments with segment type information or code 01, 2I to 27 are horizontal segments whose segment type information is code 10 or 11, and 2I to 27 are horizontal segments whose segment type information is code 10 or 11. Horizontal segments with code 01, , 1 and 12 are vertical segments with segment type information code O], V21 to V
24, segment type information is code ○] or code 11
Indicates the vertical segment.

さらにセグメント分類部28は上述のように分類ざれる
セグメントをセグメントメモリ24へ格納する格納場所
を設定する。
Further, the segment classification unit 28 sets a storage location in the segment memory 24 for storing the segments classified as described above.

第9図はセグメントの格納場所の説明に供する図である
.同図においてH IA. H 2A, }−1 3A
及びVIA、V2Aは水平及び垂直セグメントをセグメ
ントメモリ24に格納するための格納エリアの先頭アト
レスを示し、目.はセグメント種別情報がコト01であ
って短い図形の短い木平セグメシトの格納エリアの先頭
アドレス、H2Aはセグメント種別情報かコード10又
は11てあって長い水平セグメントの格納エリアの先頭
アドレス、H3Aはセグメント種別情報がコード01で
あって長い図形の短い水平セグメントの格納エリアの先
頭アトレス、VIAはセグメント種別情報がコーF:0
1であって短い図形の短い垂直セグメントの格納エリア
の先頭アドレス、及びv2Aはセグメント種別情報かコ
ード10又は11であって長い垂直セグメントの格納エ
リアの先頭アドレスを示す。
Figure 9 is a diagram for explaining the storage location of segments. In the figure, HIA. H 2A, }-1 3A
and VIA, V2A indicate the start address of a storage area for storing horizontal and vertical segments in the segment memory 24; is the start address of the storage area for the short Kihira segment of a short figure whose segment type information is Koto 01, H2A is the start address of the storage area for the long horizontal segment whose segment type information is code 10 or 11, and H3A is the segment The type information is code 01 and the start address of the storage area for the short horizontal segment of a long figure is VIA, the segment type information is code F:0.
1 indicates the start address of the storage area for short vertical segments of short graphics, and v2A indicates the segment type information or code 10 or 11, indicating the start address of the storage area for long vertical segments.

セグメント分類部28は、各第一の走査方向別のセグメ
ント毎に予想ざれるセグメント抽出数(こ応じて、各第
一の走査方向別のセグメントの格納エリアの先頭アドレ
スを任意好適な間隔て設定する。予想されるセグメント
抽出数は例えば図示しない入力部を介してセグメント分
類部28に入力ざれるものであり、セグメント分類部2
8はこのセグメント抽出数に基づいて、抽出されるセグ
メントを格納するに足りる広さの格納エリアを各第一の
走査方向別のセグメント毎に設定する。図示はしていな
いが右斜め及び左斜めセグメントについても木平、垂亘
セグメントの場合と同様の先頭アドレスが設定ざれる。
The segment classification unit 28 determines the expected number of extracted segments for each segment in each first scanning direction (according to this, sets the start address of the storage area of each segment in each first scanning direction at arbitrary suitable intervals). The expected number of segments to be extracted is inputted to the segment classification unit 28 via an input unit (not shown), for example, and the segment classification unit 2
8 sets a storage area large enough to store the extracted segments for each segment in each first scanning direction based on the number of extracted segments. Although not shown, the same starting addresses as in the case of the wooden flat and vertical segments are set for the right diagonal and left diagonal segments as well.

セグメント分類部28はセグメント情報(始点及び終点
座標、連結フラグ)と、セグメント種別情報と、当該セ
グメント情報を得たセグメントが第の走査方向のいずれ
の方向のセグメントであるかの情報(セグメント方向)
とに基づいて、セグメントの格納場所を順次設定し設定
した格納場所にセグメントを格納する.この結果、セグ
メントは各第一の走査方向別に分類され、かつセグメン
ト種別情報に基づいて分類ざれて、セグメントメモリ2
4に格納ざれる. (認識部) この実施例の認識部30は識別対象となる文字図形の定
義を満足する位置関係にあるセグメントを、当該識別対
象のセグメントとして検出する.この検出のため、認識
部30は文字図形の定義に適う分類のセグメントのなか
から定義を満足する位圏闇係にあるセグメントを探しだ
す。
The segment classification unit 28 extracts segment information (start point and end point coordinates, connection flag), segment type information, and information on which direction in the first scanning direction the segment from which the segment information was obtained belongs (segment direction).
Based on this, the segment storage location is set in sequence and the segment is stored in the set storage location. As a result, the segments are classified according to each first scanning direction and based on the segment type information, and are stored in the segment memory 2.
It is stored in 4. (Recognition Unit) The recognition unit 30 of this embodiment detects a segment having a positional relationship that satisfies the definition of a character/figure to be identified as a segment to be identified. For this detection, the recognition unit 30 searches for a segment in a range that satisfies the definition from among the segments classified according to the definition of the character/figure.

第8図及び第9図を参照し、一例を挙げて説明する。例
えば、水平方向のコンデンサを表す図形は短い2本の垂
直線が所定の位置関係で対抗し、それぞれの垂直線の中
央部近傍に水平方向の長い線分か連結する図形であると
、定義ざれているものとする.この定義にはコンデンサ
を構成する線分の長さ、方向等その他の幾何学的特徴も
含まれている。
An example will be explained with reference to FIGS. 8 and 9. For example, a figure representing a horizontal capacitor can be defined as a figure in which two short vertical lines oppose each other in a predetermined positional relationship, and a long horizontal line connects near the center of each vertical line. It is assumed that This definition also includes other geometric characteristics such as the length and direction of the line segments that make up the capacitor.

このように定義されたコンデンサのセグメントを識別す
るため、認識部30は定義されたコンデンサを構成する
線分のひとってある短い垂直セグメントを検出するため
に先頭アドレス1Aの格納エリアを検索し、当該格納エ
リアのセグメントのなかから識別対象のコンデンサを構
戊する線分の条件を満足する垂直セグメントV.を検出
する.次に定義されたコンデンサを構成する別のセグメ
ントを検出するため、垂直セグメントvI1と定義され
た所定の位11W係にある短い垂直セグメントが?納ざ
れでいると推定ざれる先頭アドレスVIAの格納エリア
を検索し、当該格納エリアのセグメントのなかから垂直
セグメントVzと所定の位置関係にある垂直セグメント
V1■を検出する。以下、同様にして定義に該当する線
分のセグメントが格納されていると推定される格納エリ
アを検索し、当該格納エリアのセグメントのなかからコ
ンデンサの定義に適う条件のセグメントを検出する。こ
の結果、長い水平セグメントを格納する先頭アドレス2
Aの格納エリアから、垂直セグメントVと連結し定義に
適う条件の水平セグメントH25及び垂直セグメントV
I2と連結し定義に適う条件の木平セグメントH28を
検出し、よってセグメントメモリ24に格納されたセグ
メントのなかから水平方向のコンデンサのセグメントt
i別する。
In order to identify the segment of the capacitor defined in this way, the recognition unit 30 searches the storage area at the start address 1A to detect a short vertical segment that is one of the line segments that constitute the defined capacitor. A vertical segment V. that satisfies the condition of a line segment that constitutes a capacitor to be identified from among the segments of the storage area. Detect. Next, to find another segment that makes up the defined capacitor, what is the short vertical segment at a given position 11W defined as vertical segment vI1? The storage area of the head address VIA that is estimated to be stored is searched, and the vertical segment V1■ having a predetermined positional relationship with the vertical segment Vz is detected from among the segments in the storage area. Thereafter, a storage area that is presumed to store line segments that meet the definition is similarly searched, and segments with conditions that meet the definition of a capacitor are detected from among the segments in the storage area. As a result, the first address 2 that stores the long horizontal segment is
From the storage area of A, horizontal segment H25 and vertical segment V are connected to vertical segment V and meet the definition.
Detecting the wooden flat segment H28 connected to I2 and satisfying the definition, the horizontal capacitor segment t is selected from among the segments stored in the segment memory 24.
I separate.

上述した実施例では、或る特定の第一の走査方向のひと
つのサブパタンに対しひとつの連続長閾[?設定したが
、ひとつのサブパタンに対して任意好適な複数個の連続
長閾Wを設定するようにしでもよく、例えば垂直サプパ
タンに対してj個の連続長閾値しvsl  Lvs2、
・・・・・・ LV.,%、水平サブパタンに対して〕
個の連続長閾値L hsし、,2、・・・・・・ Lh
−it、右斜めサブバクン(こ対してj個の連続長閾値
しrsl 、Lr52 、・・・・・・L−−+t、左
斜めサブバタシに対してコ個の連続長閾値しis+ 、
L ls2 %・・・・・・ L1,,を設定するよう
にしてもよい。
In the embodiment described above, one continuous length threshold [? However, a plurality of arbitrarily suitable continuous length thresholds W may be set for one sub-pattern, for example, j continuous length thresholds for a vertical sub-pattern, vsl Lvs2,
・・・・・・ LV. ,%, for horizontal subpattern]
continuous length threshold Lhs, ,2,...Lh
-it, right diagonal subbakun (j consecutive length thresholds for this, rsl, Lr52,...L--+t, j consecutive length thresholds for left diagonal subbakkun, is+,
L ls2 %... L1,, may be set.

ひとつのサブパタンに対し複数の連続長閾値例えばしv
sl % Lvs2 、・・・・・・ しvsj %設
定した場合、L vw≦j2v<LVs+!満足する連
続長lvを分類された第1番目の長ざ、L vs+≦I
2Vくヒ、,2を満足する連続長lvを分類された第2
番目の長さ、・・・・・・ しvs(+−11 ≦u,
<L。jを満足する連続長℃Vを分類された第j番目の
長ざ、及びL vsJ≦A,を満足する連続長lVを分
類された第〕+1番目の長さと判定するようにすればよ
い. また文書、図面等のセグメント抽出対象毎に白黒閾値及
び連続長ramを決定するための閾値情報を格納するテ
ーブルを閾Ja設定部に設け、入力部からの選択信号に
基づいて情報テーブルから閾値情報を選択し、選択した
am情報に基づいて白黒閾値及び連続長ra@を設定す
るようにしてもよい.@値情報として例えば、白黒閾値
18設定するためのNv等の定数と連続長R値とを格納
しておけばよい. (発明の効果) このような構戊の第一発明のセグメント抽出装置によれ
ば、原パタンを第一の走査方向に走査して、白コード及
び黒コードを付してコード化したサブパタンを抽出する
.そしてコード化したサブパタシを第二の走査方向に走
査して、黒及び白変化点の座標に基づき第二の黒ランが
連結するか否かを判定し、連結する第二の黒ラン(以下
、この連結する第二の黒ランの一塊を黒パタンと称す)
の先頭ラン及び最後尾ランを検出すると共に黒コードに
基づいて黒パタンの不連続ランを検出する.黒パタンは
或る特定の文字図形を表すパタンである. コード化したサブパタンを走査し、黒パタンの黒コード
の変化を調べることによって、黒パタンの幾何字的vt
yiか変化する不連続ランを検出することかできる。黒
パタンの先頭ラン及び最後尾ランの位置に加えこの不連
続ランの位置%も用いて黒パタンのセグメントを抽出す
ることによって、従来よりもより忠実に幾何学的特y!
iヲ表すセグメシトを抽出てきる。
For example, if multiple continuous length thresholds are set for one subpattern,
sl % Lvs2 ,... When vsj % is set, L vw≦j2v<LVs+! The first length classified satisfying continuous length lv, L vs+≦I
The second classified continuous length lv that satisfies 2Vkuhi, 2
Length of the th,... vs (+-11 ≦u,
<L. The continuous length ℃V that satisfies j is determined to be the classified j-th length, and the continuous length lV that satisfies L vsJ≦A is determined to be the classified j-th +1-th length. In addition, the threshold Ja setting section is provided with a table that stores threshold information for determining the black-and-white threshold and continuous length ram for each segment extraction target such as a document, drawing, etc., and the threshold Ja setting section stores the threshold information from the information table based on the selection signal from the input section. may be selected, and the black-and-white threshold and continuous length ra@ may be set based on the selected am information. For example, a constant such as Nv for setting the black-and-white threshold 18 and a continuous length R value may be stored as @value information. (Effects of the Invention) According to the segment extracting device of the first invention having such a structure, an original pattern is scanned in the first scanning direction, and a sub-pattern coded with a white code and a black code is extracted. do. Then, the encoded sub-pattern is scanned in the second scanning direction, and it is determined whether or not the second black runs are connected based on the coordinates of the black and white change points, and the second black runs (hereinafter referred to as This connected mass of second black runs is called a black pattern)
The system detects the first run and last run of the black pattern, and also detects discontinuous runs of black patterns based on the black code. A black pattern is a pattern that represents a certain character figure. By scanning the coded sub-patterns and examining the changes in the black code of the black pattern, we can determine the geometrical vt of the black pattern.
It is also possible to detect discontinuous runs in which yi changes. By extracting segments of the black pattern using the positions of the first run and last run of the black pattern as well as the position percentage of these discontinuous runs, geometric characteristics can be extracted more faithfully than before!
Extract the segment representing i.

これがため、従来よりも、セグメントから抽出ざれる特
徴が安定となり文字図形の識別精度を向上できる.また
安定な特徴から文字図形の識別を行なうので識別処理の
速度を従来より速くすることができる. また第二発明の図形認識装置によれば、セグメントを、
第一の走査方向別に分類すると共に黒コードから得られ
るセグメント種別情報に基づいて分頬する.そして文字
図形の定義1こ適う分類のセグメントのなかから文字図
形を構成するセグメントを検出する.分類されたセグメ
ントのなかから文字図形を構戊するセグメントを検出す
ることによって、文字図形を構成するセグメントの検出
速度を向上できる。これがため、文字図形の識別処理の
高速化を図れる。
Therefore, the features extracted from segments are more stable than before, and the accuracy of character/figure identification can be improved. Furthermore, since characters and figures are identified based on stable features, the speed of identification processing can be made faster than before. Further, according to the figure recognition device of the second invention, the segment is
The first classification is based on the scanning direction, and the segments are divided based on the segment type information obtained from the black code. Then, the segments that make up the character figure are detected from among the segments that meet the definition 1 of the character figure. By detecting segments constituting a character figure from among the classified segments, the speed of detecting segments constituting a character figure can be improved. This makes it possible to speed up the character/figure identification process.

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

第1図は第一発明の実施例の説明図、 第2図はコード化したサブパタンの位置例を示す図、 第3図(A)〜(D)はセグメントの他の例を示す図、 第4図(A)〜(E)及び第5図(A)〜(E)は形状
が類似する図形においで実施例装置により抽出したセグ
メントの例を示す図、第6図(A)〜(C)は実施例装
置により抽出したセグメントの他の例を示す図、 第7図は第二発明の実施例の説明図、 第8図はセグメントの抽出例を示す図、第9図はセグメ
ントの格納場所の説明図、第10図(A)〜(C)は原
バタシの例を示す図、 第11図(A)〜(C)は従来の水平サブパタン及び水
平セグメントの例を示す図である.10・・・セグメン
ト抽出装置 12・・・閾値設定部、  14・・・サブパタン抽出
部16・・・セグメント抽出部 28・・・セグメント分類部 30・・・認識部。
FIG. 1 is an explanatory diagram of the embodiment of the first invention; FIG. 2 is a diagram showing an example of the position of a coded sub-pattern; FIGS. 3(A) to (D) are diagrams showing other examples of segments; 4(A)-(E) and FIG. 5(A)-(E) are diagrams showing examples of segments extracted by the embodiment apparatus in figures having similar shapes, and FIG. 6(A)-(C). ) is a diagram showing another example of segments extracted by the embodiment device, FIG. 7 is an explanatory diagram of the embodiment of the second invention, FIG. 8 is a diagram showing an example of segment extraction, and FIG. 9 is a diagram showing segment storage. 10(A) to 10(C) are diagrams showing examples of original patterns, and FIGS. 11(A) to 11(C) are diagrams showing examples of conventional horizontal sub-patterns and horizontal segments. DESCRIPTION OF SYMBOLS 10... Segment extraction device 12... Threshold value setting part, 14... Sub pattern extraction part 16... Segment extraction part 28... Segment classification part 30... Recognition part.

Claims (9)

【特許請求の範囲】[Claims] (1)白黒2値の原パタンから第一の走査方向別の複数
のサブパタンを抽出するための白黒閾値と、前記サブパ
タンの第一の走査方向の第一の黒ランを当該第一の黒ラ
ンの連続長に応じて分類するための連続長閾値とを設定
する閾値設定部と、前記原パタンを第一の走査方向に走
査して、前記白黒閾値以上となる連続長を有する第一の
黒ランをサブパタンの黒ビット部分として抽出し、サブ
パタンの白ビット部分に対しては白コードを付しかつ前
記サブパタンの黒ビット部分に対しては連続長の長さに
応じて分類された黒コードを前記連続長閾値及び前記第
一の黒ランの連続長の比較結果に基づいて付すサブパタ
ン抽出部と、各サブパタンを第一の走査方向と所定の角
度を成す第二の走査方向に走査し、走査線上で白ビット
から黒ビットに変化したときの黒変化点及び黒ビットか
ら白ビットに変化したときの白変化点の座標に基づいて
第二の走査方向の第二の黒ランが連結するか否かを判定
し、連結する第二の黒ランの先頭ラン及び最後尾ランを
検出すると共に前記黒コードに基づいて連結する第二の
黒ランの不連続ランを検出し、前記連結する第二の黒ラ
ンの先頭ラン及び最後尾ランの位置と不連続ランの位置
とに基づいてセグメントを抽出するセグメント抽出部と
を備えて成ることを特徴とするセグメント抽出装置。
(1) A black-and-white threshold for extracting a plurality of sub-patterns for each first scanning direction from a black-and-white binary original pattern, and a first black run in the first scanning direction of the sub-pattern as the first black run. a threshold setting unit that sets a continuous length threshold for classification according to the continuous length of the pattern; and a first black pattern that scans the original pattern in a first scanning direction and has a continuous length that is equal to or greater than the black and white threshold. The run is extracted as a black bit part of the sub-pattern, a white code is attached to the white bit part of the sub-pattern, and a black code classified according to the continuous length is attached to the black bit part of the sub-pattern. a sub-pattern extraction unit that attaches a sub-pattern based on a comparison result of the continuous length threshold value and the continuous length of the first black run, and scans each sub-pattern in a second scanning direction forming a predetermined angle with the first scanning direction; Whether or not the second black runs in the second scanning direction are connected based on the coordinates of the black change point when a white bit changes to a black bit on the line and the white change point when a black bit changes to a white bit on the line. The first run and the last run of the second black run to be connected are detected, and the discontinuous runs of the second black run to be connected are detected based on the black code, and the second black run to be connected is detected. 1. A segment extraction device comprising: a segment extraction unit that extracts segments based on the positions of the first and last runs of black runs and the positions of discontinuous runs.
(2)前記閾値設定部を、n個(但しnは自然数)の連
続長閾値を設定する閾値設定部とし、 前記サブパタン抽出部を、連続長閾値に基づいて分類さ
れた第i番目(但しiは1≦i≦n+1となる自然数)
の長さの第一の黒ランに対し2^i^−^1を2進数で
表現した黒コードを付すサブパタン抽出部とし、 前記セグメント抽出部を、第二の黒ランの黒変化点から
白変化点までの黒ビットに関して黒コードの各ビット毎
に論理和演算を行なって各第二の黒ラン毎の論理和演算
結果を得、前行及び現行の第二の黒ランの論理和演算結
果に基づいて不連続ランを検出するセグメント抽出部と
したことを特徴とする請求項1に記載のセグメント抽出
装置。
(2) The threshold setting unit is a threshold setting unit that sets n (where n is a natural number) continuous length thresholds, and the sub-pattern extraction unit is configured to set n consecutive length thresholds (n is a natural number); is a natural number such that 1≦i≦n+1)
A sub-pattern extracting section adds a black code expressed in binary as 2^i^-^1 to the first black run having a length of For the black bits up to the change point, perform a logical sum operation for each bit of the black code to obtain a logical sum calculation result for each second black run, and then obtain a logical sum calculation result for the previous row and the current second black run. 2. The segment extraction device according to claim 1, wherein the segment extraction unit detects a discontinuous run based on .
(3)前記セグメント抽出部を、 連結する第二の黒ランの不連続ランを検出しないときは
、当該連結する第二の黒ランの先頭ラン及び最後尾ラン
の位置をそれぞれセグメントの始点及び終点の位置とし
て検出し、 連結する第二の黒ランの不連続ランを検出したときは、
不連続ランの位置に基づいて分割した連結する第二の黒
ランの先頭ラン及び最後尾ランの位置をそれぞれセグメ
ントの始点及び終点の位置として検出するセグメント抽
出部としたことを特徴とする請求項1又は2に記載のセ
グメント抽出装置。
(3) When the segment extraction unit does not detect a discontinuous run of the connected second black runs, the positions of the first run and the last run of the connected second black runs are used as the start and end points of the segment, respectively. When a discontinuous run of the second connected black run is detected,
A claim characterized in that the segment extraction unit detects the positions of the first run and the last run of the connected second black runs divided based on the positions of the discontinuous runs as the positions of the start and end points of the segment, respectively. 3. The segment extraction device according to 1 or 2.
(4)前記セグメント抽出部を、 連結する第二の黒ランの不連続ランを検出しないときは
、当該連結する第二の黒ランの先頭ラン及び最後尾ラン
の位置をそれぞれセグメントの始点及び終点の位置とし
て検出し、 連結する第二の黒ランの不連続ランを検出したときは、
連結する第二の黒ランの先頭ラン及び最後尾ランの位置
をそれぞれセグメントの始点及び終点の位置として検出
すると共に前記不連続ランの位置をセグメントの折れ点
或は屈曲点の位置として検出するセグメント抽出部とし
たことを特徴とする請求項1又は2に記載のセグメント
抽出装置。
(4) When the segment extraction unit does not detect a discontinuous run of the connected second black runs, the positions of the first run and the last run of the connected second black runs are set as the start point and end point of the segment, respectively. When a discontinuous run of the second connected black run is detected,
A segment in which the positions of the first run and the last run of the second connected black runs are detected as the start and end points of the segment, respectively, and the position of the discontinuous run is detected as the break point or bending point of the segment. The segment extraction device according to claim 1 or 2, characterized in that the segment extraction device is an extraction section.
(5)白黒2値の原パタンから第一の走査方向別の複数
のサブパタンを抽出するための白黒閾値と、前記サブパ
タンの第一の走査方向の第一の黒ランを当該第一の黒ラ
ンの連続長に応じて分類するための連続長閾値とを設定
する閾値設定部と、前記原パタンを第一の走査方向に走
査して、前記白黒閾値以上となる連続長を有する第一の
黒ランをサブパタンの黒ビット部分として抽出し、サブ
パタンの白ビット部分に対しては白コードを付しかつ前
記サブパタンの黒ビット部分に対しては連続長の長さに
応じて分類された黒コードを前記連続長閾値及び前記第
一の黒ランの連続長の比較結果に基づいて付すサブパタ
ン抽出部と、各サブパタンを第一の走査方向と所定の角
度を成す第二の走査方向に走査し、走査線上で白ビット
から黒ビットに変化したときの黒変化点及び黒ビットか
ら白ビットに変化したときの白変化点の座標に基づいて
第二の走査方向の第二の黒ランが連結するか否かを判定
し、連結する第二の黒ランの先頭ラン及び最後尾ランを
検出すると共に前記黒コードに基づいて連結する第二の
黒ランの不連続ランを検出し、前記連結する第二の黒ラ
ンの先頭ラン及び最後尾ランの位置と不連続ランの位置
とに基づいてセグメントを抽出するセグメント抽出部と
、 前記セグメントを、前記第一の走査方向別に分類すると
共に前記黒コードから得られるセグメント種別情報に基
づいて分類するセグメント分類部文字図形の定義に適う
分類のセグメントのなかから文字図形を構成するセグメ
ントを検出する認識部とを備えて成ることを特徴とする
図形認識装置。
(5) A black-and-white threshold for extracting a plurality of sub-patterns in each first scanning direction from a black-and-white binary original pattern, and a first black run in the first scanning direction of the sub-pattern as the first black run. a threshold setting unit that sets a continuous length threshold for classification according to the continuous length of the pattern; and a first black pattern that scans the original pattern in a first scanning direction and has a continuous length that is equal to or greater than the black and white threshold. The run is extracted as a black bit part of the sub-pattern, a white code is attached to the white bit part of the sub-pattern, and a black code classified according to the continuous length is attached to the black bit part of the sub-pattern. a sub-pattern extraction unit that attaches a sub-pattern based on a comparison result of the continuous length threshold value and the continuous length of the first black run, and scans each sub-pattern in a second scanning direction forming a predetermined angle with the first scanning direction; Whether or not the second black runs in the second scanning direction are connected based on the coordinates of the black change point when a white bit changes to a black bit on the line and the white change point when a black bit changes to a white bit on the line. The first run and the last run of the second black run to be connected are detected, and the discontinuous runs of the second black run to be connected are detected based on the black code, and the second black run to be connected is detected. a segment extraction unit that extracts segments based on the positions of the first and last runs of black runs and the positions of discontinuous runs; A figure recognition device comprising: a segment classification unit that classifies based on segment type information; and a recognition unit that detects segments constituting a character figure from among segments classified according to a definition of the character figure.
(6)前記閾値設定部を、n個(但しnは自然数)の連
続長閾値を設定する閾値設定部とし、 前記サブパタン抽出部を、連続長閾値に基づいて分類さ
れた第i番目(但しiは1≦i≦n+1となる自然数)
の長さの第一の黒ランに対し2^i^−^1を2進数で
表現した黒コードを付すサブパタン抽出部とし、 前記セグメント抽出部を、第二の黒ランの黒変化点から
白変化点までの黒ビットに関して黒コードの各ビット毎
に論理和演算を行なって各第二の黒ラン毎の論理和演算
結果を得、前行及び現行の第二の黒ランの論理和演算結
果に基づいて不連続ランを検出するセグメント抽出部と
したことを特徴とする請求項5に記載の図形認識装置。
(6) The threshold setting unit is a threshold setting unit that sets n consecutive length thresholds (where n is a natural number), and the sub-pattern extraction unit is a is a natural number such that 1≦i≦n+1)
A sub-pattern extracting section adds a black code expressed in binary as 2^i^-^1 to the first black run having a length of For the black bits up to the change point, perform a logical sum operation for each bit of the black code to obtain a logical sum calculation result for each second black run, and then obtain a logical sum calculation result for the previous row and the current second black run. 6. The figure recognition device according to claim 5, wherein the segment extraction unit detects discontinuous runs based on .
(7)前記セグメント抽出部を、 連結する第二の黒ランの不連続ランを検出しないときは
、当該連結する第二の黒ランの先頭ラン及び最後尾ラン
の位置をそれぞれセグメントの始点及び終点の位置とし
て検出し、 連結する第二の黒ランの不連続ランを検出したときは、
不連続ランの位置に基づいて分割した連結する第二の黒
ランの先頭ラン及び最後尾ランの位置をそれぞれセグメ
ントの始点及び終点の位置として検出するセグメント抽
出部としたことを特徴とする請求項5又は6に記載の図
形認識装置。
(7) When the segment extraction unit does not detect a discontinuous run of the connected second black runs, the positions of the first run and the last run of the connected second black runs are set as the start point and end point of the segment, respectively. When a discontinuous run of the second connected black run is detected,
A claim characterized in that the segment extraction unit detects the positions of the first run and the last run of the connected second black runs divided based on the positions of the discontinuous runs as the positions of the start and end points of the segment, respectively. 6. The figure recognition device according to 5 or 6.
(8)前記セグメント分類部を、セグメント種別情報と
して前記論理和演算結果を用いるセグメント分類部とし
たことを特徴とする請求項6に記載の図形認識装置。
(8) The figure recognition device according to claim 6, wherein the segment classification unit is a segment classification unit that uses the logical sum operation result as segment type information.
(9)前記セグメント分類部を、セグメントの始点及び
終点間の距離に基づいてセグメントを分類するセグメン
ト分類部としたことを特徴とする請求項5〜8のいずれ
か一項に記載の図形認識装置。
(9) The figure recognition device according to any one of claims 5 to 8, wherein the segment classification unit is a segment classification unit that classifies segments based on a distance between a starting point and an ending point of the segment. .
JP1195181A 1989-07-27 1989-07-27 Segment extracting device and graphic recognizing device Pending JPH0358288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1195181A JPH0358288A (en) 1989-07-27 1989-07-27 Segment extracting device and graphic recognizing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1195181A JPH0358288A (en) 1989-07-27 1989-07-27 Segment extracting device and graphic recognizing device

Publications (1)

Publication Number Publication Date
JPH0358288A true JPH0358288A (en) 1991-03-13

Family

ID=16336800

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1195181A Pending JPH0358288A (en) 1989-07-27 1989-07-27 Segment extracting device and graphic recognizing device

Country Status (1)

Country Link
JP (1) JPH0358288A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6327384B1 (en) 1996-11-13 2001-12-04 Nec Corporation Character recognition apparatus and method for recognizing characters

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6327384B1 (en) 1996-11-13 2001-12-04 Nec Corporation Character recognition apparatus and method for recognizing characters

Similar Documents

Publication Publication Date Title
US4153897A (en) Method and device for detecting the similarity between standard and unknown patterns
EP0538038B1 (en) Character recognition method &amp; apparatus
Ma et al. Joint layout analysis, character detection and recognition for historical document digitization
JPH1196301A (en) Character recognizing device
US4105998A (en) Pattern recognition processing system
CN110147785B (en) Image recognition method, related device and equipment
CN110516655B (en) Chinese character image stroke processing method and system
CN112270704A (en) Star point mass center extraction method based on data linked list structure
JPH0358288A (en) Segment extracting device and graphic recognizing device
US20010016071A1 (en) Image recognition method, image recognition apparatus, and recording medium
WO1988002157A1 (en) Character and pattern recognition machine and method
KR100332752B1 (en) Method for recognizing character
CN116414289B (en) Gesture recognition system and method based on touch chip
KR100295245B1 (en) A parallel thinning method using weighted value
JPH04260980A (en) Device for recognizing graphic
CN113902704A (en) Chinese character framework inflection point detection method and system based on eight-neighborhood direction coding
JPS62120589A (en) Hand-written character recognizing device
JPH02284276A (en) Segment extracting device
JP2522511B2 (en) Image contour tracking unit
JPS62134767A (en) Automatic extracting device for symbol name and segment name
JPS589471B2 (en) link link
KR940001048B1 (en) On-line hand written character recognition method
JPS6321949B2 (en)
JPH0210990B2 (en)
JPH0636174B2 (en) Line extraction method for character strings