Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPS603677B2 - Stroke end point extraction method - Google Patents
[go: Go Back, main page]

JPS603677B2 - Stroke end point extraction method - Google Patents

Stroke end point extraction method

Info

Publication number
JPS603677B2
JPS603677B2 JP54030826A JP3082679A JPS603677B2 JP S603677 B2 JPS603677 B2 JP S603677B2 JP 54030826 A JP54030826 A JP 54030826A JP 3082679 A JP3082679 A JP 3082679A JP S603677 B2 JPS603677 B2 JP S603677B2
Authority
JP
Japan
Prior art keywords
point
end point
stroke
change
white
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP54030826A
Other languages
Japanese (ja)
Other versions
JPS55123778A (en
Inventor
篤 霜山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP54030826A priority Critical patent/JPS603677B2/en
Publication of JPS55123778A publication Critical patent/JPS55123778A/en
Publication of JPS603677B2 publication Critical patent/JPS603677B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Character Discrimination (AREA)

Description

【発明の詳細な説明】 本発明は、文字や数字などの図形を構成するストローク
の端点抽出装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an apparatus for extracting end points of strokes that constitute figures such as letters and numbers.

ストロークの端点は、交差点やループなどと同様に、文
字の重要な特徴をなすものである。従釆のストローク端
点抽出方式においては、図形を例えば3×3のマスクを
用い細線化処理を行い、細線化処理した図形を基にして
ストロークの端点を抽出していた。上記の如き従来のス
トローク端点抽出方式は、細線化処理を行うのに非常に
多くの処理ステップを必要とすること及び大きなテーブ
ル類を必要とすること等の欠点を有している。本発明は
、上記の欠点を除去するものであって、テーブル類を必
要とすることなく且つ短かし、処理ステップでストロー
クの端点を抽出できるようになったストローク端点抽出
方式を提供することを目的としている。そしてそのため
、本発明のストローク端点抽出方式は、所定方向の走査
線で以て文字を囲む文字枠全域を走査し、かくして得ら
れた走査情報によってストロークの端点を検出するスト
ローク端点検出方式において、1行の走査が行われる度
にその走査情報に基づいて白から黒への最初の変化点及
び黒から白への最後の変化点を検出する変化点検出手段
、並びに隣接する走査行における2つの変化点の距離が
所定値を超えているか否かを調べることによって複数の
変化点で構成される点系列における不連続部分を検出す
る不連続部分検出手段を備え、2個の不連続部分で区画
されるセグメントが、所定値より短いか否か及び両側の
セグメントより突出しているか否かを調べ、所定値より
短く且つ突出しているセグメントを代表する座標をスト
ローク端点の座標とすることを特徴とするものである。
以下、本発明を図面を参照しつつ説明する。第1図は本
発明で用いられるストローク端点抽出原理を説明するた
めの図、第2図は画像信号、その立上りおよび立下り並
びにスキャン・ゲート信号を示す図、第3図は本発明の
1実施例のブロック図、第4図はスタートポイント、エ
ンドポイントおよび連続カウンタの内容の記憶形式を示
す図である。
Stroke endpoints, like intersections and loops, are important features of characters. In the conventional stroke end point extraction method, a figure is thinned using, for example, a 3×3 mask, and stroke end points are extracted based on the thinned figure. The conventional stroke end point extraction method described above has drawbacks such as requiring a very large number of processing steps and large tables to perform the thinning process. The present invention aims to eliminate the above-mentioned drawbacks, and provides a stroke end point extraction method that does not require tables, is short, and can extract the end points of a stroke in a processing step. The purpose is Therefore, the stroke end point extraction method of the present invention scans the entire character frame surrounding the character with scanning lines in a predetermined direction, and detects the end points of the stroke using the scanning information obtained in this way. Change point detection means for detecting the first change point from white to black and the last change point from black to white based on the scanning information each time a line is scanned, and two changes in adjacent scan lines. A discontinuous part detection means for detecting a discontinuous part in a point series composed of a plurality of changing points by checking whether the distance between the points exceeds a predetermined value, The stroke end point is characterized by checking whether the segment is shorter than a predetermined value and protruding from the segments on both sides, and setting the coordinates representing the segment that is shorter and protruding than the predetermined value as the coordinates of the stroke end point. It is.
Hereinafter, the present invention will be explained with reference to the drawings. FIG. 1 is a diagram for explaining the stroke end point extraction principle used in the present invention, FIG. 2 is a diagram showing an image signal, its rising and falling edges, and a scan gate signal, and FIG. 3 is a diagram showing one implementation of the present invention. An example block diagram, FIG. 4, is a diagram showing the storage format of the start point, end point, and contents of the continuous counter.

第1図において、S,ないしミは上側輪郭線を構成する
セグメントのスタートポイント、E,ないしE5は上側
輪郭線を構成するセグメントのエンドポイント、S′,
ないしS′3は下側輪郭線を構成するセグメントのスタ
ートポイント、E′,ないしE′5は下側輪郭線を構成
するセグメントのエンドポイント、0はフラグをそれぞ
れ示している。
In FIG. 1, S to Mi are the start points of the segments forming the upper contour line, E to E5 are the end points of the segments forming the upper contour line, S',
S to S'3 are the start points of the segments forming the lower contour, E' to E'5 are the end points of the segments forming the lower contour, and 0 is a flag.

第1図および第2図を参照して本発明で用いられるスト
ローク端点抽出の原理を説明する。
The principle of stroke end point extraction used in the present invention will be explained with reference to FIGS. 1 and 2.

なお、第2図において、スキャン・ゲートが「1」であ
る期間は、文字枠の高さに対応するものである。また、
論理「1」の画像信号は黒に対応し、論理「0」の画像
信号は白に対応している。第2図イは走査行Xs,に対
するものであり、第2図口は走査行Xs2に対するもの
である。走査線がXs,行に来ると、点S,で画像信号
は「0」から「1」へ立上り、点S′,で「1」から「
0」へ立下る。この場合、点S,は最初の白から黒への
変化点となり、点S′,は最後の黒から白への変化点と
なる。Xs.−1行においては黒が存在しないので、点
S,およびS′,はスタートポイントとなる。スタート
ポイントS,の座標は(Xs,、Ys,)で表わされ、
スタートポイントS′,の座標は(Xs,、Ys′,)
で表わされる。走査線が(Xs,十1)行に来ると、同
様に白から黒への最初の変化点および黒から白への最後
の変化点が検出される。上記2個の変化点のY座標をY
s,十1およびYs′,十1であると仮定する。Xs,
行における白から黒への最初の変化点のY座標Ys,と
Ys,十1の差を求め、この差が所定値、例えば3以下
であれば、Xs,において変化点の点系列は連続である
と定義する。愚から白への最後の変化点で構成された点
系列についても同様な定義が適用される。走査線がXs
〆守に来ると、第2図口に示す如き画像信号、立上りお
よび立下りが得られる。
In FIG. 2, the period when the scan gate is "1" corresponds to the height of the character frame. Also,
An image signal of logic "1" corresponds to black, and an image signal of logic "0" corresponds to white. Figure 2A is for scanning line Xs, and Figure 2A is for scanning line Xs2. When the scanning line comes to row Xs, the image signal rises from "0" to "1" at point S, and from "1" to "1" at point S'.
0". In this case, point S, is the first point of change from white to black, and point S', is the last point of change from black to white. Xs. Since there is no black in the -1 line, points S and S' become starting points. The coordinates of the starting point S, are expressed as (Xs,, Ys,),
The coordinates of the starting point S', are (Xs,, Ys',)
It is expressed as When the scan line reaches the (Xs, 11) row, the first transition point from white to black and the last transition point from black to white are similarly detected. The Y coordinate of the above two change points is Y
Assume that s, 11 and Ys', 11. Xs,
Find the difference between the Y coordinates Ys, and Ys,11 of the first change point from white to black in the row, and if this difference is less than a predetermined value, for example 3, the point series of the change points at Xs is continuous. Define that there is. A similar definition applies to the series of points consisting of the final change from stupid to white. The scanning line is Xs
When the time limit is reached, an image signal with rising and falling edges as shown at the beginning of Figure 2 is obtained.

Xs2行における白から黒への最初の変化点のY座標を
Ys2とし、愚から白への変化点をYs′2とする。X
s2−1行における白から黒への最初の変化点のY座標
をYe,とし、Ys,とYe,の差を求める。この差が
所定値、例えば“3”より大きいとすると、白から黒へ
の最初の変化点で構成される点系列は、Xs2で不連続
となる。点S2はスタートポイントとなり、′点 E,
はエンドポイントとなる。白から黒への最初の変化点で
構成される点系列においては、スタートポイントからエ
ンドポイントに向う方向が走査線方向と逆の場合、エン
ドポイントにフラグ「0」付され、スタートポイントか
らエンドポイントに向う方向が走査線方向に等しい場合
にはスタートポイントにフラグ「0」が付される。黒か
ら白へ最後の変化点で構成される点系列においては、フ
ラグ「○」の付け方は上記の逆となる。かくして、文字
枠全域をY方向の走査線で走査すると、スタートポイン
トとエンドポイントで定義されるところの複数のセグメ
ントで構成される上側輪郭線および下側輪郭線が得られ
る。ところで、筆記用具で文字を記入する場合、文字の
ストロークの幅は筆記用具で定まる。
Let Ys2 be the Y coordinate of the first point of change from white to black in the Xs2 row, and Ys'2 be the point of change from white to white. X
Let Ye be the Y coordinate of the first point of change from white to black in line s2-1, and find the difference between Ys and Ye. If this difference is greater than a predetermined value, for example "3", the point series consisting of the first change point from white to black becomes discontinuous at Xs2. Point S2 becomes the starting point, and point E,
is the end point. In a point series consisting of the first change point from white to black, if the direction from the start point to the end point is opposite to the scanning line direction, the flag "0" is attached to the end point, and the direction from the start point to the end point is If the direction toward is equal to the scanning line direction, a flag "0" is attached to the start point. In the point series consisting of the last point of change from black to white, the flag "○" is attached in the opposite way to the above. Thus, when the entire character frame is scanned with a scanning line in the Y direction, an upper contour line and a lower contour line are obtained which are composed of a plurality of segments defined by the start point and the end point. By the way, when writing characters with a writing instrument, the width of the stroke of the character is determined by the writing instrument.

したがって、文字のストロークの端点を求めるためには
、輪郭線を構成する複数のセグメントの内、‘ィー セ
グメントの長さが所定長以下であること、‘ロー セグ
メントのスタートポイントおよびエンドにフラグが付さ
れていないこと、の2条件を満足するセグメントを見付
け出せば良い。
Therefore, in order to find the end point of a character's stroke, it is necessary to make sure that the length of the 'E' segment is less than or equal to a predetermined length among the multiple segments that make up the outline, and that the start and end points of the 'Low' segment are flagged. All you have to do is find a segment that satisfies the following two conditions: no tags are attached.

上記の所定長は例えば9メッシュ幅とされる。セグメン
トS383およびS′2E′2が9メッシュより短かし
、とすると、これらの中点がそれぞれストロークの端点
とされる。第3図は本発明の1実施例を示すものである
The above predetermined length is, for example, 9 mesh width. Assuming that the segments S383 and S'2E'2 are shorter than 9 meshes, their midpoints are respectively the end points of the stroke. FIG. 3 shows one embodiment of the present invention.

同図において、1はスキャン・カウンタ、2は立上り検
出回路、3は立下り検出回路、4と5はしジスタ、6一
1と6一2はスキヤン・レジスタ、7−1と7−2もス
キヤン・レジスタ、8と9は演算回路、10と11は連
続カウンタをそれぞれ示している。スキャン・カウンタ
は現走査行位置を示すものと考えて良い。立上り検出回
路2は、画像信号の「0」から「1」への立上りを検出
し、その立上り位置をレジスタ4に送るものである。こ
の立上り位置は、第1図における白から黒への最初の変
化点のY座標に対応するものである。レジスタ4に立上
り位置が格納されると、サンプル禁止信号が出力され、
それ以後における画像信号の立上り検出回路2への入力
は禁止される。レジスタ4の立上り位置およびスキャン
・カウンタ1の走査行位置はしジスタ6−2に格納され
る。立下り検出回路3は、画像信号の「1」から「0」
への立下りを検出し、その立下り位置をレジスタ5に格
納するものである。レジスタ5の立下り位置はしジスタ
7−2に書込まれる。一行の走査を行う間に複数の立下
りが存在しても、レジスタ7一2の内容は次々と書換え
られるので、最後の立上り位置が有効なものとして保存
される。なお、レジスタ6−1にはスキャン・ゲートの
「1」から「0」への立下りでレジスタ6一2の内容が
移送される。レジスタ7−1も同様である。演算回路8
はしジスタ6−1の立上り位置およびレジスタ6−2の
立上り位置の差を求めるものである。この差が所定値、
例えば“3”以下であると、論理「1」を出力し、これ
により連続カウンタ10の内容が十1される。レジスタ
6一1の立上り位置としジスタ6一2の立上り位置の差
が所定値より大きいときには、レジスタ6一1の内容に
よってエンドポイントの座標が定められ、レジスタ6−
2の内容によってスタートポイントの座標が定められ、
そして、上記の差の符号に応じてフラグが付けられる。
また、このとき連続カゥンタ10の内容が読出され、議
出し後、連続カウンター0はクリアされる。スタートポ
イント・エンドポイントおよび連続カウンタ10の内容
は、それぞれ第4図イ,口,ハで示す形式で図示しない
スタート・エンド特徴対メモリに書込まれる。なお、セ
グメント番号は、白から黒への最初の変化点で構成され
る点系列における不連続の回数をカウントすることによ
って、求めることが出来る。演算回路9および連続カウ
ンタ11は、演算回路8および連続カウンタ10と同様
に動作する。たゞし、演算回路9は、スキャン・ゲート
が「1」から「0」へ立下つた後に演算を開始する。そ
して、黒から白への最後の変化点で構成される点系列に
おけるスタートポイント・エンドポイントおよび連続カ
ウンタ11の内容は「第4図に示す如き形式で上記のス
タート・エンド特徴対メモリに書込まれる。ストローク
の端点は、上記のスタ−ト・エンド特徴対メモリを調べ
ることによって求めることが出来る。以上の説明から明
らかなように、本発明によれば、ストロークの総点を、
短かし、処理ステップで且つ少ないハードウェアで抽出
することが出来る。
In the figure, 1 is a scan counter, 2 is a rising detection circuit, 3 is a falling detection circuit, 4 and 5 are registers, 6-1 and 6-2 are scan registers, and 7-1 and 7-2 are also A scan register, 8 and 9 are arithmetic circuits, and 10 and 11 are continuous counters, respectively. The scan counter can be thought of as indicating the current scan line position. The rising edge detection circuit 2 detects the rising edge of the image signal from "0" to "1" and sends the rising position to the register 4. This rising position corresponds to the Y coordinate of the first change point from white to black in FIG. When the rising position is stored in register 4, a sample prohibition signal is output,
After that, input of the image signal to the rising edge detection circuit 2 is prohibited. The rising position of register 4 and the scanning line position of scan counter 1 are stored in register 6-2. The falling detection circuit 3 detects the image signal from “1” to “0”.
This detects the falling edge of the signal and stores the falling position in the register 5. The falling position of register 5 is written to register 7-2. Even if there are multiple falling edges while scanning one line, the contents of the registers 7-2 are rewritten one after another, so that the last rising position is saved as valid. Note that the contents of the register 6-2 are transferred to the register 6-1 when the scan gate falls from "1" to "0". The same applies to register 7-1. Arithmetic circuit 8
The difference between the rising position of the register 6-1 and the rising position of the register 6-2 is determined. This difference is the predetermined value,
For example, if the value is "3" or less, a logic "1" is output, and the contents of the continuous counter 10 are thereby incremented by 11. When the difference between the rising position of register 6-1 and the rising position of register 6-2 is larger than a predetermined value, the coordinates of the end point are determined by the contents of register 6-1, and the coordinates of the end point are determined by the contents of register 6-1.
The coordinates of the start point are determined by the contents of 2.
A flag is then attached depending on the sign of the difference.
Also, at this time, the contents of the continuous counter 10 are read out, and after the discussion, the continuous counter 0 is cleared. The contents of the start point/end point and the continuous counter 10 are written to a start/end feature pair memory (not shown) in the formats shown in FIG. 4, respectively. Note that the segment number can be obtained by counting the number of discontinuities in the point series consisting of the first change point from white to black. Arithmetic circuit 9 and continuous counter 11 operate similarly to arithmetic circuit 8 and continuous counter 10. However, the calculation circuit 9 starts calculation after the scan gate falls from "1" to "0". Then, the start point, end point, and contents of the continuous counter 11 in the point series consisting of the last change point from black to white are written into the above start-end feature pair memory in the format shown in FIG. The end points of a stroke can be found by examining the start/end feature pair memory described above.As is clear from the above description, according to the present invention, the total points of a stroke are
It can be extracted with shorter processing steps and less hardware.

なお、上記の実施例は上向きストローク端点および下向
きストローク総点を抽出する例であるが、水平方向の走
査線で図形を走査することにより、左向きストローク端
点および右向きストローク総点を同様に抽出することが
出釆る。
Although the above embodiment is an example of extracting the upward stroke end points and the total downward stroke points, it is also possible to similarly extract the leftward stroke end points and the total rightward stroke points by scanning the figure with a horizontal scanning line. will appear.

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

第1図は本発明で用いられるストローク端点抽出原理を
説明するための図、第2図ま画像信号、その立上りおよ
び立下り並びにスキャン・ゲート信号を示す図、第3図
は本発明の1実施例のブロック図、第4図はスタートポ
イント・エンドポイントおよび連続カウンタの内容の記
憶形式を示す図である。 1・・・・・・スキャン・カウンタ、2・・・・・・立
上り検出回路、3・・・・・・立下り検出回路、4と5
・・・・・・レジスタ、6一1と6−2,7一1と7一
2……スキヤン・レジスタ、8と9・・…・演算回路、
10と11・…・・連続カウンタ。 矛1図 寸2凶 (イ) 了Z凶 く〇) 了3凶 オ4脚
Fig. 1 is a diagram for explaining the stroke end point extraction principle used in the present invention, Fig. 2 is a diagram showing an image signal, its rise and fall, and a scan gate signal, and Fig. 3 is a diagram showing one implementation of the present invention. An example block diagram, FIG. 4, is a diagram showing the storage format of the start point, end point, and contents of the continuous counter. 1...Scan counter, 2...Rise detection circuit, 3...Fall detection circuit, 4 and 5
...Registers, 6-1 and 6-2, 7-1 and 7-2...Scan register, 8 and 9...Arithmetic circuit,
10 and 11... Continuous counter. spear 1 zusun 2 kyou (a) ryo z koku 〇) ryo 3 kyou 4 legs

Claims (1)

【特許請求の範囲】[Claims] 1 所定方向の走査線で以て文字を囲む文字枠全域を走
査し、かくして得られた走査情報によってストロークの
端点を検出するストローク端点検出方式において、1行
の走査が行われる度にその走査情報に基づいて白から黒
への最初の変化点及び黒から白への最後の変化点を検出
する変化点検出手段、並びに隣接する走査行における2
つの変化点の距離が所定値を超えているか否かを調べる
ことによって複数の変化点で構成される点系列における
不連続部分を検出する不連続部分検出手段を備え、2個
の不連続部分で区画されるセグメントが、所定値より短
いか否か及び両側のセグメントより突出しているか否か
を調べ、所定値より短く且つ突出しているセグメントを
代表する座標をストローク端点の座標とすることを特徴
とするストローク端点抽出方式。
1 In a stroke end point detection method in which the entire character frame surrounding a character is scanned with a scanning line in a predetermined direction and the end point of a stroke is detected based on the scanning information thus obtained, the scanning information is collected every time one line is scanned. change point detection means for detecting the first change point from white to black and the last change point from black to white based on the two
The discontinuous part detection means detects a discontinuous part in a point series made up of a plurality of change points by checking whether the distance between two change points exceeds a predetermined value, It is characterized by checking whether the divided segment is shorter than a predetermined value and protruding from the segments on both sides, and setting the coordinates representing the segment that is shorter and protruding than the predetermined value as the coordinates of the stroke end point. Stroke end point extraction method.
JP54030826A 1979-03-16 1979-03-16 Stroke end point extraction method Expired JPS603677B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP54030826A JPS603677B2 (en) 1979-03-16 1979-03-16 Stroke end point extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP54030826A JPS603677B2 (en) 1979-03-16 1979-03-16 Stroke end point extraction method

Publications (2)

Publication Number Publication Date
JPS55123778A JPS55123778A (en) 1980-09-24
JPS603677B2 true JPS603677B2 (en) 1985-01-30

Family

ID=12314498

Family Applications (1)

Application Number Title Priority Date Filing Date
JP54030826A Expired JPS603677B2 (en) 1979-03-16 1979-03-16 Stroke end point extraction method

Country Status (1)

Country Link
JP (1) JPS603677B2 (en)

Also Published As

Publication number Publication date
JPS55123778A (en) 1980-09-24

Similar Documents

Publication Publication Date Title
JP2001060247A (en) Image processing apparatus and image processing method
JPH03290774A (en) Sentence area extracting device for document picture
JPS63261486A (en) Writing style identifying device
JPH0721310A (en) Document recognition device
JPH0256708B2 (en)
JP3420864B2 (en) Frame extraction device and rectangle extraction device
CN115063823B (en) Image processing method, apparatus, computer device, storage medium, and program product
JPH06208625A (en) Image processing method and apparatus
JPS603677B2 (en) Stroke end point extraction method
JP3476595B2 (en) Image area division method and image binarization method
JPH06187489A (en) Character recognizing device
JPS63304387A (en) Document reader
JP3095470B2 (en) Character recognition device
JP4242962B2 (en) Character extractor
JP2890307B2 (en) Table space separation device
JPH04311283A (en) Line direction discriminating device
JP7370574B2 (en) Frame extraction method and program
JP3406942B2 (en) Image processing apparatus and method
JPH0628520A (en) Character recognition device
JP3100825B2 (en) Line recognition method
JPH07160810A (en) Character recognition device
JP2715930B2 (en) Line detection method
JPS61165184A (en) Automatic detecting system of reference point
JP2507949B2 (en) Character / graphic area determination device
JPH04260980A (en) Device for recognizing graphic