JPH0613212B2 - Character image data processing method - Google Patents

Character image data processing method

Info

Publication number
JPH0613212B2
JPH0613212B2 JP58183071A JP18307183A JPH0613212B2 JP H0613212 B2 JPH0613212 B2 JP H0613212B2 JP 58183071 A JP58183071 A JP 58183071A JP 18307183 A JP18307183 A JP 18307183A JP H0613212 B2 JPH0613212 B2 JP H0613212B2
Authority
JP
Japan
Prior art keywords
contour
point
section
sample
curve
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 - Lifetime
Application number
JP58183071A
Other languages
Japanese (ja)
Other versions
JPS6075975A (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.)
Shaken Co Ltd
Original Assignee
Shaken 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 Shaken Co Ltd filed Critical Shaken Co Ltd
Priority to JP58183071A priority Critical patent/JPH0613212B2/en
Priority to GB08406187A priority patent/GB2147474B/en
Priority to KR1019840001671A priority patent/KR890003318B1/en
Publication of JPS6075975A publication Critical patent/JPS6075975A/en
Priority to US07/057,390 priority patent/US4771474A/en
Priority to HK852/88A priority patent/HK85288A/en
Publication of JPH0613212B2 publication Critical patent/JPH0613212B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled

Description

【発明の詳細な説明】 [発明の技術分野] 本発明は、文字画像(以下、文字という)データの処理
方法に係わり、特に、x,y座標上に展開した文字の輪
郭を、xを変数とする複数の1価関数のブロック
[P,Pn]に分割し、各ブロックの形状を特定する
データを作成し、このブロックデータの集合を1文字の
圧縮データとして記憶することによって、データの圧縮
を行なようにした文字画像データの処理方法に関するも
のである。
Description: TECHNICAL FIELD OF THE INVENTION The present invention relates to a method for processing character image (hereinafter referred to as “character”) data, and in particular, the contour of a character developed on x, y coordinates is represented by a variable x. Is divided into a plurality of blocks [P 1 , Pn] of a single-valued function, data for specifying the shape of each block is created, and a set of this block data is stored as compressed data of one character. The present invention relates to a method of processing character image data which is compressed.

[発明の背景技術] 文字をドット分解して求めた2値データが、極めて冗長
性の高いデータであることは周知である。そこで、従来
この冗長性を軽減するために種々のデータ圧縮方式が提
案されてきた。
[Background of the Invention] It is well known that binary data obtained by dot decomposition of characters is data with extremely high redundancy. Therefore, various data compression methods have been conventionally proposed in order to reduce the redundancy.

文字の形状を輪郭で把握し、その輪郭を特定するデータ
を記憶することによってデータ量の圧縮を図るようにし
た所謂輪郭法と呼ばれるデータ圧縮方式もその1つであ
る。
One of them is a data compression method, which is a so-called contour method, in which the shape of a character is grasped by a contour and data for specifying the contour is stored so as to compress the data amount.

この輪郭法によるデータ圧縮方式としては、第1図の如
き直線(ベクトル)近似法や、第2図の如きn次曲線近
似法が既に提案されている。
As a data compression method by the contour method, a straight line (vector) approximation method as shown in FIG. 1 and an nth-order curve approximation method as shown in FIG. 2 have already been proposed.

第1図に例示した直線近似法は、特開昭54−1495
22号公報、特開昭55−79154号公報等に開示さ
れた方法であり、その概要は、点線で示した任意文字の
輪郭1を実線で示したベクトル2の集合で近似し、各ベ
クトルを特定する情報(始点位置、長さ及び傾き、ある
いは水平・垂直方向成分)を符号化データとすることに
よってデータ圧縮を可能とするものである。
The linear approximation method illustrated in FIG. 1 is disclosed in JP-A-54-1495.
22 and JP-A-55-79154, the outline of which is to approximate the outline 1 of an arbitrary character shown by a dotted line with a set of vectors 2 shown by a solid line, and calculate each vector. Data can be compressed by specifying the specified information (starting point position, length and inclination, or horizontal / vertical direction components) as encoded data.

又、第2図に例示したn次曲線近似法は、本件出願人が
特願昭55−116160号(特公昭62−33948
号)として既に出願した方法であり、その概要は任意文
字の輪郭上に適宜設定した点P群の座標を記憶すること
によってデータ量の圧縮を図ると共に、任意連続する
(n+1)個の点を結ぶn次曲線3(図はn=2)の集
合で、所望輪郭を近似しようとするものである。
Further, the n-th order curve approximation method illustrated in FIG. 2 is disclosed in Japanese Patent Application No. 55-116160 (Japanese Patent Publication No. 62-33948).
No.), the outline of which is to compress the amount of data by storing the coordinates of a group of points P set appropriately on the contour of an arbitrary character, and to calculate an arbitrary continuous (n + 1) points. It is a set of n-th order curves 3 (n = 2 in the figure) that are connected to each other to approximate a desired contour.

これら輪郭法によるデータ圧縮方式は、その圧縮データ
を解読して文字像を再生する際、補間処理や間引き処
理、ないしベクトルの倍率変換処理を実施することによ
って、種々倍率の文字像の再生に対処し得るという特徴
を有している。
These contour-based data compression methods deal with reproduction of character images of various magnifications by performing interpolation processing, thinning-out processing, or vector magnification conversion processing when decoding the compressed data and reproducing the character image. It has the feature that it can.

[背景技術の問題点] しかし、その反面これら従来方式は、例えば、第1図に
おける各ベクトルの端点P、あるいは、第2図における
各n次曲線3の接続点Pcを中心とする左右の各接線の
傾き角δが、いずれの場合も不連続となってしまうこと
からも明らかなように、輪郭の滑らかさ(輪郭の傾きの
連続性)について、最適の結果が保証されないという本
質的な欠陥を有していた。
[Problems of background art] However, on the other hand, in these conventional methods, for example, the end point P of each vector in FIG. 1 or the left and right centering on the connection point Pc of each n-th degree curve 3 in FIG. As is clear from the fact that the tangent inclination angle δ becomes discontinuous in any case, an essential defect that the optimum result is not guaranteed for the smoothness of the contour (continuity of the contour inclination). Had.

これに対して、一般的に文字の輪郭形状は直線的な部分
と曲線的な部分を有しており、さらに単に輪郭部自体が
連続しているのみならず、文字画線の交叉部や「ハネ」
の先端などの特異な点を除いて見た場合、その1次導関
数(輪郭の傾き)が連続的に変化する特徴を有してい
る。
On the other hand, in general, the contour shape of a character has a linear portion and a curved portion, and not only the contour portion itself is continuous, but also the intersection portion of character drawing lines and ""
The first derivative (contour slope) has a characteristic that it continuously changes, except for singular points such as the tip of.

従って、従来輪郭法によるデータ圧縮方式では、文字輪
郭を忠実に特定した圧縮データが得にくいばかりでな
く、該データに基づいて再生された文字像の不自然さ
(傾きの不連続性)を取り除くことができないという問
題を有していた。
Therefore, in the conventional data compression method based on the contour method, not only is it difficult to obtain compressed data that faithfully specifies the character contour, but also unnaturalness (discontinuity of inclination) of the character image reproduced based on the data is removed. I had the problem that I could not.

このような問題を解決するため、本件出願人は特願昭5
7−16884号(特開昭58−134745号)の方
式を既に出願した。
In order to solve such a problem, the applicant of the present invention has filed Japanese Patent Application No.
We have already applied for the system of 7-16884 (Japanese Patent Laid-Open No. 58-134745).

しかし、ここで開示したデータ圧縮方式は、 任意1ブロック中の全てのサンプル区間を一度に近似
しようとしたために、曲線部と曲線部が接続するような
部分では、その接続点近傍で輪郭より外れた凹凸が発生
しやすい。また、本来直線として再現されるべき部分
も、その前後の標本(サンプル)区間の近似曲線の影響
を受けて近似されるので直線の再現性が劣ってしまう。
However, since the data compression method disclosed herein attempts to approximate all the sample sections in one arbitrary block at a time, in the portion where the curve portions are connected to each other, there is a deviation from the contour in the vicinity of the connection point. Roughness is likely to occur. In addition, since the portion that should be reproduced as a straight line is approximated by the influence of the approximate curve of the sample section before and after that, the reproducibility of the straight line is deteriorated.

更に、各サンプル区間を一度に近似しようとしたため
に、標本(サンプル)点が新設されると、これに影響し
て他の標本(サンプル)区間の近似曲線も変化してしま
うということも明らかとなった。そして標本(サンプ
ル)点が新設されるたびに、任意1ブロック上の全ての
標本(サンプル)区間について夫々近似曲線を求め直さ
なければならず、しかも符号化に複雑な演算を要するた
め、求めるデータの作成に時間がかかるという問題点も
残っていた。
Furthermore, it is also clear that when a sample (sample) point is newly established because each sample section is tried to be approximated at once, the approximation curve of the other sample (sample) section also changes due to this. became. Then, each time a sample (sample) point is newly established, it is necessary to re-calculate the approximate curves for all sample (sample) sections on any one block, and moreover, complicated calculation is required for encoding, so that the data to be calculated is required. There was also the problem that it took time to create.

[発明の目的] 本発明は、以上のような従来技術の問題点に鑑みて成し
たものであり、所望輪郭とのズレが少なくしかも輪郭を
滑らかに再現でき、尚かつ圧縮率の高いデータを高速に
算出できるようにしたものである。
[Object of the Invention] The present invention has been made in view of the above-mentioned problems of the prior art. Data having a small deviation from a desired contour and capable of smoothly reproducing the contour and having a high compression rate can be obtained. It is designed to be able to calculate at high speed.

そしてこのような目的を達成するため本発明は、x,y
座標上に展開した文字画像輪郭を、xを変数とする1価
関数のブロック[P,Pn](P,Pnは任意1ブ
ロックの始点と終点)に分割し、各ブロック毎の輪郭形
状を特定するブロックデータを作成し、このブロックデ
ータの集合を1文字画像の圧縮データとして記憶するよ
うにした文字画像データの処理方法において、前記分割
した輪郭のブロックを構成しているm個の輪郭点Q
(j=1〜m)上のいずれかを始点と終点とする輪郭
区間を、該輪郭区間内の各輪郭点との偏位量が所定の許
容値以下で、かつその長さliを最大とするベクトルに
置き換える過程と、前記ベクトルの長さliと予め設定
した長さLとを比較する過程と、前記ベクトルと該ベク
トルに隣接するベクトルとの交叉角θiと予め設定した
角度θとを比較する過程と、前記比較結果がi>Lの
とき、前記輪郭区間を直線部と識別し、該輪郭区間の始
点,終点の座標に基づき該輪郭区間を直線近似するn次
多項式f(x)(n=1)を求める過程と、前記比較結
果がli≦Lのとき、前記輪郭区間を曲線部と識別し、
さらにθ≦θのとき次のベクトルについて繰り返し前
記比較を行ない、li>Lとなったとき、またはθi<
θとなったとき、それまでの輪郭区間を1つの連続した
曲線部と識別する過程と、前記曲線部の輪郭区間にサン
プル区間を設定する過程と、該設定したサンプル区間の
始点終点の座標とその傾きに基づいて、前記サンプル区
間を曲線近似するn次多項式f(x)(n=2,3)を
求める過程と、前記任意1ブロック中に存在する直線部
の始点座標と、曲線部に設定した各サンプル区間の始点
座標、及び直線部と曲線部の各サンプル区間を近似する
n次多項式の係数と次数を、各ブロック毎に求めて1文
字画像の圧縮データとして記憶するようにしたことを特
徴とする。
In order to achieve such an object, the present invention provides x, y
The character image contour developed on the coordinates is divided into blocks [P 1 , Pn] (P 1 , Pn are start and end points of arbitrary 1 block) of a monovalent function having x as a variable, and the contour shape of each block In the method of processing character image data in which block data for specifying a block data is created and the set of block data is stored as compressed data of one character image, m contours forming blocks of the divided contours. Point Q
For a contour section whose start point and end point are any one of j (j = 1 to m), the deviation amount from each contour point in the contour section is equal to or less than a predetermined allowable value, and the length li is maximum. To replace the vector with a vector L i, a process of comparing the length l i of the vector with a preset length L, and a crossing angle θ i between the vector and a vector adjacent to the vector and a preset angle θ. In the process of comparing and when the comparison result is i> L, the contour section is identified as a straight line portion, and an n-th order polynomial f (x) that linearly approximates the contour section based on the coordinates of the start point and the end point of the contour section In the process of obtaining (n = 1), and when the comparison result is li ≦ L, the contour section is identified as a curved line portion,
Further, when θ ≦ θ i, the above-mentioned comparison is repeated for the next vector, and when l i > L, or θ i <
When θ is reached, a process of identifying the contour section up to that point as one continuous curve section, a step of setting a sample section in the contour section of the curved section, and coordinates of the start point and end point of the set sample section Based on the inclination, a process of obtaining an n-th order polynomial f (x) (n = 2, 3) that approximates the sample section with a curve, starting point coordinates of a straight line portion existing in the arbitrary 1 block, and a curve portion The starting point coordinates of each set sample section, and the coefficient and order of an n-degree polynomial approximating each sample section of the straight line portion and the curved line portion are obtained for each block and stored as compressed data of one character image. Is characterized by.

[発明の概要] 本発明によるデータ処理の概要を第3図に示すフローチ
ャートに従って説明する。
[Outline of the Invention] An outline of data processing according to the present invention will be described with reference to the flowchart shown in FIG.

入力した文字画像はx,yマトリクス状にドット分解さ
れ(30)、該ドット分解された文字像の輪郭を抽出する(3
1)。抽出された輪郭は輪郭との偏位量が許容誤差以下と
なるようなベクトルで直線近似する(32)。直線近似され
た輪郭は、ベクトルの長さに基づいて直線部と見倣され
る輪郭と曲線部の一部と見倣される輪郭とに識別される
(33)。更に、隣接するベクトルの交叉角に基づき輪郭を
分割する点を求める(34)。そして直線部に対しては該区
間を直線標本区間とし、n次多項式(n=1)で表わ
す。曲線部に対しては該区間内に任意複数個の標本区間
を設定し、その区間内の輪郭形状をn次多項式(n=
2,3)で曲線近似するための準備として、先ず、輪郭
を形成する各輪郭点における傾きを求める(35)。標本区
間を近似するn次多項式は、標本区間の始点及び終点に
該当する輪郭点の座標とそこにおける先に求めた傾きよ
り求める。そして該区間を延長しながら、該区間を近似
するn次多項式と輪郭との偏位量が許容誤差以下に収ま
る範囲内で最長となる標本区間を求め、該区間の始点終
点を標本点として決定していく(36)。
The input character image is dot-decomposed in an x, y matrix (30), and the contour of the dot-decomposed character image is extracted (3).
1). The extracted contour is linearly approximated by a vector such that the deviation amount from the contour is less than the allowable error (32). The contour that is approximated to a straight line is distinguished into a contour that is imitated as a straight line portion and a contour that is imitated as a part of a curved portion based on the length of the vector.
(33). Further, points for dividing the contour are obtained based on the intersection angle of the adjacent vectors (34). For the straight line portion, the section is defined as a straight line sample section and is represented by an n-th degree polynomial (n = 1). For the curved part, an arbitrary plurality of sample sections are set in the section, and the contour shape in the section is defined by an nth degree polynomial (n =
As a preparation for curve approximation in (2, 3), first, the slope at each contour point forming the contour is obtained (35). The n-th degree polynomial approximating the sample section is obtained from the coordinates of the contour points corresponding to the start point and the end point of the sample section and the previously obtained inclinations there. Then, while extending the section, a sample section having the longest deviation amount between an n-th degree polynomial approximating the section and the contour within a permissible error is obtained, and the start point and the end point of the section are determined as sample points. Do (36).

このようにして順次標本区間を求め、各標本区間を近似
するn次多項式が求まると、次に各n次多項式の1次導
関数を求め、各輪郭点の傾きを再度算出する(37)。そし
て新たに求めた各輪郭点の傾きと座標値に基づいて前記
同様に標本点を決定し、より輪郭に忠実なn次多項式を
算出する(38)。次にこのようにして求めた前記n次多項
式における係数及び次数等をコード化する(39)。更に、
1ブロックのx方向に対する始点・終点間距離の長いも
の順に、各ブロックデータを記憶する(40)ようにすれ
ば、後の文字輪郭の復元を効率良く行なうことができ
る。そして記憶された文字輪郭の圧縮データは、複数の
デコーダで分散解読(41)するなどし、その解読結果に基
づいて所望の文字像を復元する(42)。
In this way, the sample sections are sequentially obtained, and when the n-th degree polynomial that approximates each sample section is obtained, then the first derivative of each n-th order polynomial is obtained, and the slope of each contour point is calculated again (37). Then, sample points are determined in the same manner as described above on the basis of the newly obtained inclination and coordinate value of each contour point, and an n-th degree polynomial more faithful to the contour is calculated (38). Next, the coefficient, the degree, etc. in the n-th degree polynomial thus obtained are coded (39). Furthermore,
If each block data is stored (40) in the order in which the distance between the start point and the end point of one block is long in the x direction, the subsequent character contour can be efficiently restored. Then, the stored compressed data of the character contour is subjected to distributed decoding (41) by a plurality of decoders, and a desired character image is restored (42) based on the decoding result.

[発明の実施例] 次に第3図で説明した各部のデータ処理について詳細に
説明する。
[Embodiment of the Invention] Next, the data processing of each unit described in FIG. 3 will be described in detail.

[画像入力(30)] スキャナ装置等のラスタ走査によって文字画像をx,y
マトリクス状にドット分解し、これによって求められた
ビットパターンデータが処理対象となる文字データとし
て供給される。
[Image input (30)] x, y character image by raster scanning of a scanner device or the like.
The dot pattern is decomposed into a matrix, and the bit pattern data obtained by this is supplied as the character data to be processed.

[輪郭抽出(31)] 分解した文字データに対応する2値データが、xまたは
y方向において、「0」から「1」、または「1」から
「0」に変化するドット位置(輪郭点Q)を求めること
により輪郭が得られる。そして、求めた輪郭に対しxを
変数とする1価関数のブロックに分割して複数ブロック
の集合とする。
[Contour extraction (31)] The dot position at which binary data corresponding to the decomposed character data changes from "0" to "1" or from "1" to "0" in the x or y direction (contour point Q ), The contour is obtained. Then, the obtained contour is divided into blocks of a monovalent function having x as a variable to form a set of a plurality of blocks.

第4図は、このようにして求めたブロックの集合として
1文字を表現したときの説明図で、「○」が各ブロック
の始点と終点である。
FIG. 4 is an explanatory diagram when one character is expressed as a set of blocks thus obtained, and “◯” is the start point and end point of each block.

[直線近似(32)] 輪郭上の任意1ブロックにおいて、輪郭との偏位量が所
定の許容誤差以下に収まる範囲で、その長さliが最大
となるよう設定した多数のベクトルにより直線近似を行
なう。
[Linear approximation (32)] In any one block on the contour, linear approximation is performed by a large number of vectors set so that the length li thereof becomes maximum within a range in which the deviation amount from the contour falls within a predetermined allowable error. To do.

第5図は、任意の1ブロック[P,Pn](P,P
nは任意1ブロックの始点と終点)において、点線で示
した文字輪郭50をベクトル51の集合で直線近似を行
なったものである。各ベクトル51の接続点P
,…,Pn-1,Pnは、標本(サンプル)点とし
て、後述する標本点座標記憶部60に記憶する。
FIG. 5 shows an arbitrary block [P 1 , Pn] (P 1 , Pn
n is the straight line approximation of the character outline 50 shown by the dotted line with a set of vectors 51 at the start and end points of an arbitrary block. Connection point P 1 of each vector 51,
P 2 , ..., P n−1 , Pn are stored in the sample point coordinate storage unit 60, which will be described later, as sample (sample) points.

[輪郭の直線部と曲線部の識別(33)] 先に述べたように、一般的に文字の輪郭形状は、直線的
な部分と曲線的な部分とを持ち合わせており、前述した
従来方法の1つでは、1ブロック中のサンプル区間を一
度に一括して近似しようとしていたために、曲線部と曲
線部が接続するようにな部分におていは、その接続点近
傍において多くの標本点を設定し多くの近似式に分割し
て表現しなければならず、この部分におけるデータ量が
増大してしまい、圧縮率が低下していた。
[Identification of Linear and Curved Part of Contour (33)] As described above, the contour shape of a character generally has a linear part and a curvilinear part. In one case, since it was attempted to approximate the sample intervals in one block at a time, many sample points near the connection point are set in the part where the curve part and the curve part are connected. Since it has to be set and divided into many approximate expressions to be expressed, the amount of data in this portion increases, and the compression rate decreases.

これに対処するため、[輪郭の直線部と曲線部の識別(3
3)]では、上述した直線近似により求めたベクトルの長
さliに基づいて、輪郭形状が直線部か曲線部かをまず
識別し、識別した直線部と曲線部とを夫々別々に処理す
ることで直線と曲線の輪郭形状をもつ文字でも忠実に再
現できるようにした。
To deal with this, [Identify straight and curved parts of the contour (3
[3]], first identify whether the contour shape is a straight line portion or a curved line portion based on the vector length li obtained by the above-described straight line approximation, and process the identified straight line portion and curved line portion separately. Now, it is possible to faithfully reproduce even characters with straight and curved contours.

第6図は、文字輪郭の直線部と曲線部の識別方法を実現
する構成の一実施例を示すブロック図である。図におい
て、60は前記直線近似(32)によって得られた標本点
(接続点)Pをブロック単位に記憶する標本点座標記憶
部、61は識別するベクトル長Lを予め設定する直線部
識別ベクトル長設定部、62は曲線を分割する点を識別
する角度θを設定する曲線分割点識別角度設定部、63
はi+1番目の標本点Pi+1の座標、即ち、点Pi+1に対
応する輪郭点Qj+sの座標(xj+s,yj+s)を保持する
ための次標本点座標レジスタ、64はi番目の標本点P
iに対応する輪郭点Qjの座標(x,y)を保持す
るための現標本点座標レジスタ、65はi−1番目の標
本点Pi-1に対応する輪郭点Qj-uの座標(xj-u
j-u)を保持するための前標本点座標レジスタ、66
は前記次標本点座標レジスタ63と現標本点座標レジス
タ64の各座票より標本区間[xj,xj+s]のベクト
ルの長さliを算出するベクトル長算出部、67は前記
次標本点座標レジスタ63、現標本点座標レジスタ64
及び前標本点座標レジスタ65の各々座標より、標本点
Piでのベクトル間角度θiを算出するベクトル間角度
算出部、68は直線部識別ベクトル長設定部61で設定
したベクトル長Lを前記ベクトル長算出部66で算出し
たベクトル長liとを比較するベクトル長比較部、69
は前記曲線分割点識別角度設定部62で設定した角度θ
と前記ベクトル間角度算出部67で算出したベクトル間
角度θiとを比較する角度比較部、70,71は前記ベ
クトル長比較部68の比較結果に基づき、直線部または
曲線部の区間を夫々記憶する直線部記憶部と曲線部記憶
部、72は前記角度比較部69において、θ>θiのと
きi番目の標本点Piを曲線分割点として記憶する曲線
分割点座標記憶部である。
FIG. 6 is a block diagram showing an embodiment of a configuration for realizing a method of identifying a straight line portion and a curved portion of a character contour. In the figure, 60 is a sample point coordinate storage unit that stores the sample points (connection points) P obtained by the straight line approximation (32) in block units, and 61 is the straight line identification vector length that presets the vector length L to be identified. A setting unit 62 is a curve division point identification angle setting unit 63 that sets an angle θ for identifying a point that divides the curve.
Is the coordinate of the i + 1-th sample point P i + 1 , that is, the next sample point for holding the coordinates (x j + s , y j + s ) of the contour point Q j + s corresponding to the point P i + 1. Coordinate register, 64 is i-th sample point P
The current sample point coordinate register for holding the coordinates (x j , y j ) of the contour point Qj corresponding to i, and 65 is the coordinate of the contour point Q ju corresponding to the i− 1th sample point P i−1 ( x ju ,
y ju ), the pre-sample point coordinate register, 66
Is a vector length calculation unit for calculating the vector length li of the sample section [xj, x j + s ] from each seat of the next sample point coordinate register 63 and the current sample point coordinate register 64, and 67 is the next sample point Coordinate register 63, current sample point coordinate register 64
And a vector-to-vector angle calculation unit that calculates the vector-to-vector angle θi at the sample point Pi from the coordinates of the previous sample point coordinate register 65, and 68 is the vector length L set by the straight line identification vector length setting unit 61. A vector length comparison unit for comparing the vector length li calculated by the calculation unit 66, 69
Is the angle θ set by the curve division point identification angle setting unit 62.
And an inter-vector angle θi calculated by the inter-vector angle calculation unit 67, the angle comparison units 70 and 71 store the straight line section or the curved line section based on the comparison result of the vector length comparison unit 68. A straight line storage unit and a curved line storage unit, and 72 is a curve division point coordinate storage unit that stores the i-th sample point Pi as a curve division point when θ> θi in the angle comparison unit 69.

次に動作について説明する。先ず、直線部識別ベクトル
長設定部61に識別ベクトル長Lを、曲線分割点識別角
度設定部62に角度θを夫々設定する。次に、標本点座
標記憶部60より、任意1ブロック[P,Pn]の始
点Pの座標を次標本点座標レジスタ63に送る。この
時点では現標本点座標レジスタ64には何も記憶されて
いないので後述するベクトル長算出部66においてベク
トル長を求めることはできない。次に、次標本点座標レ
ジスタ63に記憶された標本点座標は現標本点座標レジ
スタ64に転送され、次標本点座標レジスタ63には新
たに次標本点Pの座標が記憶される。以後は、現標本
点座標レジスタ64の標本点座標を前標本点座標レジス
タ65に、次標本点座標レジスタ63の標本点座標を現
標本点座標レジスタ64にそれぞれシフトして記憶し、
次標本点座標レジスタ63には標本点座標記憶部60よ
り次標本点座標が記憶される。
Next, the operation will be described. First, the straight line identification vector length setting unit 61 sets the identification vector length L, and the curve division point identification angle setting unit 62 sets the angle θ. Next, the coordinates of the starting point P 1 of any one block [P 1 , Pn] are sent from the sample point coordinate storage unit 60 to the next sample point coordinate register 63. At this time, since nothing is stored in the current sample point coordinate register 64, the vector length cannot be obtained by the vector length calculation unit 66 described later. Next, the sample point coordinates stored in the next sample point coordinate register 63 are transferred to the current sample point coordinate register 64, and the coordinates of the next sample point P 2 are newly stored in the next sample point coordinate register 63. After that, the sample point coordinates of the current sample point coordinate register 64 are shifted and stored in the previous sample point coordinate register 65, and the sample point coordinates of the next sample point coordinate register 63 are shifted and stored in the current sample point coordinate register 64, respectively.
The next sample point coordinate register 63 stores the next sample point coordinates from the sample point coordinate storage unit 60.

ベクトル長算出部66は、前記次標本点座標レジスタ6
3のi+1番目の標本点Pi+1の座標(xj+s,yj+s
と現標本点座標レジスタ64のi番目の標本点Piの座
標(x,y)より、 を算出する。算出したベクトル長liはベクトル長比較
部68にて、前記直線部識別ベクトル長設定部61で予
め設定した識別長Lと比較する。ここで、li>Lのと
きは、前記ベクトルで近似した[Pi,Pi+1]の区間
を直線部と判断し、該区間の始点座標及び終点座票を1
つの直線部に関する情報として直線部記憶部70に記憶
する。
The vector length calculation unit 66 uses the next sample point coordinate register 6
The coordinates (x j + s , y j + s ) of the i + 1-th sample point P i + 1 of 3
From the coordinates (x j , y j ) of the i-th sample point Pi of the current sample point coordinate register 64, To calculate. The vector length comparison unit 68 compares the calculated vector length li with the identification length L preset by the straight line identification vector length setting unit 61. Here, when li> L, the section of [Pi, P i + 1 ] approximated by the vector is determined to be a straight line portion, and the start point coordinates and end point seats of the section are set to 1
The information about one straight line portion is stored in the straight line portion storage unit 70.

また、li≦Lのときは、[Pi,Pi+1]の区間を曲
線部と判断し、一旦、該区間の始点と終点の座標を曲線
部に関する情報として記憶部71に記憶し、次の区間
[Pi+1,Pi+2]の識別を同様にして順次行なってい
く。
When li ≦ L, the section [Pi, P i + 1 ] is determined to be the curve portion, and the coordinates of the start point and the end point of the section are temporarily stored in the storage unit 71 as information about the curve portion, The sections [P i + 1 , P i + 2 ] are sequentially identified in the same manner.

このようにして1つの任意ブロック[P,Pn]を構
成する直線部と曲線部のデータを各記憶部70、71に
記憶し、以後同様な処理の繰り返しを実施し、以下文字
を構成する全部のブロックについて識別していく。
In this way, the data of the straight line portion and the curved line portion that form one arbitrary block [P 1 , Pn] are stored in the respective storage units 70 and 71, and thereafter, similar processing is repeated to form the following characters. Identify all blocks.

[輪郭(曲線部)の分割(34)] 一方、ベクトル間角度算出部67では、次標本点座標レ
ジスタ63,現標本点座標レジスタ64,前標本点座標
レジスタ65より、それぞれ標本点Pi-1,Pi,Pi+1
の座標(xj-u,yj-u),(x,y),(xj+s
j+s)を読み出し、第5図に示すベクトル間角度(ベ
クトルと該ベクトルに互いに隣接するベクトルとの交叉
角)θiを算出する。算出したベクトル間角度θiは角
度比較部69にて、前記曲線分割点識別角度設定部62
で予め設定した角度θと比較する。ここで、θ>θiの
とき曲線分割信号が発生され、標本点Piを新たな曲線
分割点として、曲線分割点座標記憶部72にその座標を
記憶する。
[Division of contour (curved portion) (34)] On the other hand, in the inter-vector angle calculation unit 67, the sample points P i- are respectively obtained from the next sample point coordinate register 63, the current sample point coordinate register 64, and the previous sample point coordinate register 65. 1 , Pi, P i + 1
Coordinates (x ju , y ju ), (x j , y j ), (x j + s ,
y j + s ) is read out, and the inter-vector angle (crossing angle between the vector and vectors adjacent to the vector) θi shown in FIG. 5 is calculated. The calculated inter-vector angle θi is calculated by the angle comparison unit 69 in the curve division point identification angle setting unit 62.
Compare with the preset angle θ. Here, when θ> θi, a curve division signal is generated, and the coordinates are stored in the curve division point coordinate storage unit 72 with the sample point Pi as a new curve division point.

通常、この曲線分割点の近傍には、前述した文字画像の
交叉部のように多くの標本点が存在し、求める近似曲線
の処理に時間がかかっていたが、前記のように求めたこ
の曲線分割点で輪郭を分割することにより、曲線分割点
の前後で夫々別個に曲線近似するので処理時間も速く、
しかも容易に近似曲線を求めることができる。
Normally, there are many sample points near the curve dividing point, such as the intersection of the character image described above, and it took time to process the approximated curve to be obtained. By dividing the contour at the dividing points, the curve is individually approximated before and after the curve dividing point, so the processing time is fast,
Moreover, the approximate curve can be easily obtained.

第7図は、第4図に図示した文字輪郭に対して、上記し
た[直線近似(32)]〜[輪郭の分割(34)]の処理をした
例で、直線部と曲線部の識別結果を示している。
FIG. 7 is an example in which the above-described [straight line approximation (32)] to [contour division (34)] processing is performed on the character contour shown in FIG. Is shown.

図において、○は1ブロックの始点及び終点、△は直線
近似により得られた標本点、●は曲線分割点である。ま
た、※は直線部、無印は曲線部を示す。
In the figure, ◯ is the start and end points of one block, Δ is the sample point obtained by linear approximation, and ● is the curve dividing point. Also, * indicates a straight line portion, and no mark indicates a curved line portion.

[各輪郭点の傾き算出(35)] 上記求めた曲線部の輪郭形状を適宜1ないし複数個に分
け、これらを夫々n次多項式(但し、n=2,3)を用
いて近似するが、個々のn次多項式は、2点の座標値及
び傾きが決定すれば一意的に決定される。そこで先ず輪
郭上の各輪郭点における傾きを求める。
[Calculation of Inclination of Each Contour Point (35)] The contour shape of the above-obtained curve portion is appropriately divided into one or a plurality, and these are approximated using n-th degree polynomials (where n = 2 and 3), respectively. Each n-th degree polynomial is uniquely determined if the coordinate value and the slope of two points are determined. Therefore, first, the inclination at each contour point on the contour is obtained.

各輪郭点における傾きは、その輪郭点の前後の輪郭点を
所定数だけ抽出し、その傾きを算出する輪郭点と抽出し
た各輪郭点とを結んだ線分の傾きをそれぞれ求めればよ
い。
As for the inclination at each contour point, a predetermined number of contour points before and after the contour point may be extracted, and the inclination of a line segment connecting the contour point for calculating the inclination and each extracted contour point may be obtained.

次にその算出方法を第8図の曲線部の例に従って説明す
る。先ず、第8図(a)のように輪郭上の任意1ブロッ
ク[P,Pn]の始点P(輪郭点Q)における傾
きtを求めるには、始点Pの後に存在する輪郭点を
任意数だけ抽出し、始点Pと抽出した輪郭点とを結ぶ
線分の傾きを算出し、これら各線分の傾きから始点P
の傾きtを後述する式より算出する。
Next, the calculation method will be described according to the example of the curved portion in FIG. First, in order to obtain the slope t 1 at the starting point P 1 (contour point Q 1 ) of an arbitrary block [P 1 , Pn] on the contour as shown in FIG. 8A, the contour existing after the starting point P 1 is determined. An arbitrary number of points are extracted, the inclination of the line segment connecting the starting point P 1 and the extracted contour point is calculated, and the starting point P 1 is calculated from the inclination of each of these line segments.
The slope t 1 of is calculated by the formula described later.

例えば、傾きを求めようとしている輪郭点Qの後側の
輪郭点を2点抽出して傾きを求める場合は、まず、線分
の傾きm,線分Qの傾きmを求め
る。
For example, when two gradient points on the rear side of the contour point Q 1 whose gradient is to be calculated are extracted and the gradient is calculated, first, the gradient m 1 of the line segment Q 1 Q 2 and the line segment Q 1 Q 3 are calculated. Find the slope m 2 .

線分の傾きmは、2点の座標(x,y),
(x,y)から、 で求めることができる。尚、mの場合も同様にして求
める。
The slope m 1 of the line segment is the coordinates (x 1 , y 1 ) of two points,
From (x 2 , y 2 ), Can be found at. In addition, in the case of m 2, the same is obtained.

夫々線分の傾きm,mが求まると、輪郭点Qにお
ける傾きtは、 により求まる。尚、終点Pn(Qn)においてもこの始
点P(Q)と同様にして求めることができる。
When each line of slope m 1, m 2 is obtained, the slope t 1 at the contour point Q 1 is, Determined by. It should be noted that the end point Pn (Qn) can be obtained in the same manner as the start point P 1 (Q 1 ).

次に、第8図(b)により2番目の輪郭点Qにおける
傾きtを求める場合について説明する。この場合、輪
郭点Qの前側にはQの1点しかないので前後1点を
抽出し、輪郭点Qより各輪郭点とを結んだ線分の傾き
をそれぞれ求め、輪郭点Qにおける傾きtとする。
この傾きtは次式より求める。
Next, the case of obtaining the slope t 2 at the second contour point Q 2 will be described with reference to FIG. In this case, since there is only one point of Q 1 on the front side of the contour point Q 2 , one point before and after is extracted, the inclinations of the line segments connecting each contour point from the contour point Q 2 are obtained, and the contour point Q 2 The slope is t 2 .
This slope t 2 is calculated by the following equation.

このように指定した所望数の輪郭点が前後に存在しない
場合は、指定範囲内で最大数の輪郭点を抽出して傾きを
求める。
If the desired number of contour points designated in this way does not exist before and after, the maximum number of contour points within the designated range is extracted to obtain the slope.

次に、第8図(c)により輪郭点Qにおける傾きt
を求める場合について説明する。この輪郭点Qは、前
後に所定数の輪郭点が存在する。よって輪郭点Qと他
の輪郭点とを結ぶ各線分の傾きm,m,m,m
を夫々求め、輪郭点Qにおける傾きtを、 より求める。以後、同様にして各輪郭点における傾きを
算出していく。
Then, the slope t 3 at the contour point Q 3 by FIG. 8 (c)
A case will be described below. The contour point Q 3 are, there is a predetermined number of contour points before and after. Therefore, the inclinations m 1 , m 2 , m 3 , m 4 of each line segment connecting the contour point Q 3 and another contour point
Respectively, and the gradient t 3 at the contour point Q 3 is Ask more. Thereafter, the inclination at each contour point is calculated in the same manner.

[サンプル点の決定(36)] 以上のようにして曲線部を構成する各輪郭点における傾
きが求まると、次に曲線部に該当する輪郭上に適宜1な
いし複数個のサンプル区間を設定するため、後述する手
順によって輪郭上に2つの輪郭点を求め、次にこれら両
輪郭点間を近似する近似曲線を求め、該近似曲線と輪郭
との偏位量εを各輪郭点について逐次求める。
[Determination of sample point (36)] When the slope at each contour point forming the curved line portion is obtained as described above, one or more sample sections are set appropriately on the contour corresponding to the curved line portion. Then, two contour points are found on the contour by the procedure described later, then an approximate curve that approximates the two contour points is found, and the deviation amount ε between the approximate curve and the contour is sequentially found for each contour point.

こうして求められた各偏位量εが許容誤差Δ以下の場
合、輪郭点を更に1つ前進させ、この拡大された両輪郭
点間について再度偏位量εを求め直して上記同様の処理
を繰り返し、該偏位量εが1つでも許容誤差Δを出ない
範囲内で最長となる区間(これを以下、サンプル区間と
いう)を求めながら、輪郭をサンプル区間毎に分割して
いく。こうして得られたサンプル区間によって決定する
n次多項式が輪郭を表現するのに必要な近似曲線の1つ
として決定される。
When each deviation amount ε thus obtained is less than or equal to the allowable error Δ, the contour point is moved forward by one step, the deviation amount ε is calculated again between the enlarged contour points, and the same processing as above is repeated. The contour is divided for each sample section while obtaining the longest section (hereinafter referred to as a sample section) within a range in which even one deviation amount ε does not cause the allowable error Δ. The n-th degree polynomial determined by the sample section thus obtained is determined as one of the approximate curves necessary for expressing the contour.

以下、第9図を用いて、n次多項式の近似曲線の算出方
法について説明し、次いで偏位量の算出について説明す
る。
Hereinafter, the calculation method of the approximated curve of the nth degree polynomial will be described with reference to FIG. 9, and then the calculation of the deviation amount will be described.

まず、直線部記憶部70及び曲線部記憶部71に記憶し
た座標値により、近似する区間が直線部か曲線部である
かを判別する。そして、該区間が直線部であれば、区間
の始点座標と該区間を示すn次多項式(n=1)を算出
し、後述するコード化を行なう。
First, based on the coordinate values stored in the straight line storage unit 70 and the curved line storage unit 71, it is determined whether the approximated section is a straight line portion or a curved line portion. Then, if the section is a straight line portion, the starting point coordinates of the section and the n-th degree polynomial (n = 1) indicating the section are calculated, and the coding described later is performed.

次に、該区間が曲線部である場合について説明する。Next, a case where the section is a curved portion will be described.

第9図(a)において、Qは着目している第j番目の
サンプル点であり、Qj+rは任意のサンプル候補点であ
る。そして両点を始点終点とする区間をサンプル候補区
間[Qj,Qj+r]という。
In FIG. 9A, Q j is the j-th sample point of interest and Q j + r is an arbitrary sample candidate point. A section having both points as a start point and an end point is called a sample candidate section [Qj, Qj + r ].

尚、前記サンプル点Qjは、初期条件として前記曲線部
の始点に設定し、サンプル点候補Qj+rは、サンプル点
Qjよりr個の輪郭点だけ隔たった位置に設定される。
The sample point Qj is set as the starting point of the curved portion as an initial condition, and the sample point candidate Q j + r is set at a position separated from the sample point Qj by r contour points.

そこで先ずこれらサンプル点Qj及びサンプル点候補Q
j+rの座標(x,y)、(xj+r,yj+r)、及びそ
の傾きt,tj+rに基づいて、両点を通過するn次多
項式f(x)の係数と次数を求めて近似曲線を得る。更
に前記サンプル候補区間[Qj,Qj+r]に存在する全
ての輪郭点と前記n次多項式で求めた近似曲線との各偏
位量εが所定の許容誤差Δ以下であるか否かを比較し、
その結果が全ての場合においてε≦Δであれば、前記求
めた近似曲線を許容し得るものと判断する。
Therefore, first, these sample points Qj and sample point candidates Q
Based on the coordinates (x j , y j ) and (x j + r , y j + r ) of j + r , and their inclinations t j and t j + r , an nth-order polynomial f (x ) And the order to obtain an approximate curve. Further, it is determined whether or not each deviation amount ε between all contour points existing in the sample candidate section [Qj, Q j + r ] and the approximate curve obtained by the n-th degree polynomial is less than or equal to a predetermined allowable error Δ. Compare
If ε ≦ Δ in all cases, it is judged that the obtained approximated curve is acceptable.

ところで、1つの近似曲線によって表現しえる区間が長
い程、換言すれば与えられた任意の輪郭を表現するのに
必要な近似曲線の数が少ない程、データ量が少なくな
り、効率よく圧縮することができる。
By the way, the longer the section that can be represented by one approximate curve, in other words, the smaller the number of approximate curves required to represent a given arbitrary contour, the smaller the amount of data and the more efficient compression. You can

そこで最初に設定した任意輪郭点Qj+rをサンプル点候
補とすることで定まるサンプル候補区間[Qj,
j+r]について、上記のようにして求めた近似曲線
と、該サンプル候補区間[Qj,Qj+r]の各輪郭点と
の偏位量εを算出し、許容誤差Δと比較した結果が全て
ε≦Δであれば、現在のサンプル点候補Qj+rを1つ伸
ばして隣の輪郭点Qj+r+1を新たなサンプル点候補とし
て前記比較を行なう。
Therefore, a sample candidate section [Qj, which is determined by using the initially set arbitrary contour point Q j + r as a sample point candidate
Q j + r ], the deviation amount ε between the approximate curve obtained as described above and each contour point of the sample candidate section [Q j , Q j + r ] is calculated and compared with the allowable error Δ. If all the results are ε ≦ Δ, the current sample point candidate Q j + r is extended by one and the adjacent contour point Q j + r + 1 is used as a new sample point candidate for the comparison.

以後比較結果が全てε≦Δである限りサンプル点候補を
順次更新して前記比較を繰り返し、輪郭点Qj+r+pを新
たなサンプル点候補とした時に、いずれか1つの偏位量
εが、ε>Δとなったとき、その直前の輪郭点Q
j+r+p-1を第2のサンプル点としてサンプル区間[Q
j,Qj+r+p-1]を設定する。このサンプル区間[Q
j,Qj+r+p-1]における近似曲線が、与えられた任意
の輪郭を表現するのに必要な近似曲線の1つとして決定
される。
After that, as long as all the comparison results are ε ≦ Δ, the sample point candidates are sequentially updated and the comparison is repeated. When the contour point Q j + r + p is set as a new sample point candidate, any one of the deviation amounts ε When ε> Δ, the contour point Q immediately before that
With j + r + p-1 as the second sampling point, the sampling interval [Q
j, Q j + r + p-1 ]. This sample section [Q
j, Q j + r + p−1 ], is determined as one of the approximation curves required to represent a given arbitrary contour.

一方、最初に設定したサンプル候補区間[Qj,
j+r]による近似曲線と、該サンプル候補区間[Q
j,Qj+r]の各輪郭点との偏位量εを算出し、結果が
1つでもε>Δであれば、そのサンプル候補区間を1つ
縮小して輪郭点Qj+r-1を新たなサンプル点候補として
前記比較を行なう。以後比較結果が全てε≦Δとなるま
でサンプル候補区間を順次縮小して前記比較を繰り返
し、輪郭点Qj+r-pで全てε≦Δとなったとき、該サン
プル点候補Qj+r-pを第2のサンプル点としてサンプル
区間[Qj,Qj+r-p]を設定する。このサンプル区間
[Qj,Qj+r-p]における近似曲線が、与えられた任
意の輪郭を表現するのに必要な近似曲線の1つとして決
定される。
On the other hand, the first set sample candidate section [Qj,
Q j + r ], and the sample candidate section [Q
j, Q j + r ], the displacement amount ε of each contour point is calculated. If even one result is ε> Δ, the sample candidate section is reduced by one and the contour point Q j + r- The above comparison is performed with 1 as a new sample point candidate. After that, the sample candidate sections are successively reduced until the comparison results are all ε ≦ Δ, and the above comparison is repeated. When all ε ≦ Δ at the contour points Q j + rp , the sample point candidates Q j + rp are A sample section [Qj, Qj + rp ] is set as the second sample point. The approximated curve in this sample section [Qj, Qj + rp ] is determined as one of the approximated curves necessary for expressing a given arbitrary contour.

このような処理によって、前記偏位量εが許容誤差Δの
範囲内で、最長となるサンプル区間を決定しながら、輪
郭をサンプル区間で分割していく。そしてこのサンプル
区間において決定するn次多項式で輪郭が近似される。
By such processing, the contour is divided into sample sections while determining the sample section where the displacement amount ε is the longest within the range of the allowable error Δ. Then, the contour is approximated by the nth degree polynomial determined in this sample section.

尚、他の実施例として、サンプル候補区間[Qj,Q
j+r-p]が許容誤差を越えたとき、その時点におけるサ
ンプル候補点をQj+r+pを暫定的に記憶しておき、更に
数点先までのサンプル候補区間について前記偏位量εの
評価を行なう。そして所定の数点先に到っても許容誤差
を越えるようなとき、前記Qj+r+p-1をサンプル点とし
てサンプル区間を決定するようにしてもよい。
As another embodiment, the sample candidate section [Qj, Q
[j + rp ] exceeds the allowable error, Q j + r + p is tentatively stored as the sample candidate point at that time, and the deviation amount ε of the deviation amount ε is further stored for sample candidate sections up to several points ahead. Make an evaluation. If the allowable error is exceeded even if a predetermined number of points are reached, the sample section may be determined using the Q j + r + p−1 as the sample point.

勿論この場合、数点先のサンプル候補区間において許容
誤差の条件が充足した時は、該候補区間が新たなサンプ
ル区間に更新され、更にそこからサンプル点を前進させ
ながら前述の評価処理を繰り返して実行する。このよう
な先読みを実施することにより、サンプル区間を更に長
くすることができ、データ圧縮率が向上する。
Of course, in this case, when the condition of the allowable error is satisfied in the sample candidate section several points ahead, the candidate section is updated to a new sample section, and the evaluation process is repeated while advancing the sample point from there. Run. By performing such prefetching, the sample section can be further lengthened and the data compression rate is improved.

次に、偏位量の算出方法について説明する。Next, a method of calculating the deviation amount will be described.

第9図(a)において、90は輪郭、Bは輪郭90上の
輪郭点、91はn次多項式f(x)の近似曲線、92は
サンプル候補区間[Qj,Qj+r]の始点Qjと終点Q
j+rの2点間を結んだ直線、93は点Bから直線92へ
下した垂線、Cは近似曲線91と垂線93との交点、B
Aは点Bにおける輪郭90と近似曲線91とのx方向に
おける偏位量εx、BCは輪郭90と近似曲線91との
偏位量ε、BDは輪郭90と近似曲線91とのy方向に
おける偏位量εyである。
In FIG. 9 (a), 90 is a contour, B is a contour point on the contour 90, 91 is an approximate curve of the n-th degree polynomial f (x), and 92 is a starting point Qj of the sample candidate section [Qj, Q j + r ]. And the end point Q
A straight line connecting two points of j + r , 93 is a perpendicular line from the point B to the straight line 92, C is an intersection of the approximated curve 91 and the perpendicular line 93, B
A is the deviation amount εx between the contour 90 and the approximate curve 91 at the point B in the x direction, BC is the deviation amount ε between the contour 90 and the approximate curve 91, and BD is the deviation between the contour 90 and the approximate curve 91 in the y direction. The amount is εy.

以下、3次曲線の場合を例に説明する。既に算出した始
点Qj及びサンプル候補点Qj+rの傾きt,tj+rと座
標値(x,y),(xj+r,yj+r)を下記3次式に
代入する。
Hereinafter, a case of a cubic curve will be described as an example. The gradients t j , t j + r and the coordinate values (x j , y j ), (x j + r , y j + r ) of the already calculated starting point Qj and sample candidate point Q j + r are converted into the following cubic expression. substitute.

f(x)=y+b(x−x) +c(x−x +d(x−x=t 以上のように近似曲線f(x)を決定する各係数が求ま
ると、該近似曲線f(x)と各輪郭点との偏位量εを夫
々求める。
f (x) = y j + b j (x−x j ) + c j (x−x j ) 2 + d j (x−x j ) 3 b j = t j When each coefficient for determining the approximate curve f (x) is obtained as described above, the deviation amount ε between the approximate curve f (x) and each contour point is obtained.

図において、輪郭90と近似曲線91の偏位量ε(=B
C)を求めるに際し、本発明では偏位量εを近似計算す
ることによって、高速処理を可能としている。
In the figure, the deviation amount ε (= B of the contour 90 and the approximate curve 91)
In obtaining C), the present invention enables high-speed processing by approximating the deviation amount ε.

即ち、変位量εはBC間の距離であり、輪郭点と近似曲
線との隔り量である。通常、点と曲線との距離を測る場
合、曲線の接線に直交する方向に測定する。そして曲線
上の複数の点においてその法線方向に前記点が存在する
場合には、その中で最も短かい距離を点と曲線との距離
とするのが一般的である。
That is, the displacement amount ε is the distance between BCs, and is the amount of separation between the contour point and the approximate curve. Usually, when measuring the distance between a point and a curve, it is measured in the direction orthogonal to the tangent to the curve. When a plurality of points on a curve exist in the normal direction, the shortest distance among them is generally the distance between the point and the curve.

本願のようにn次曲線と輪郭点との距離εを測定する場
合にも同じように、まずn次曲線の接線と直交する法線
の式と、輪郭点を通る直線の式とを連立させた方程式を
解くことによって、n次曲線上の測定点を求め、次いで
その点と対象となっている輪郭点との距離を計算しなけ
ればならない。以上の計算を実施するには膨大な演算量
を必要とする。
Similarly when measuring the distance ε between the nth-order curve and the contour point as in the present application, first, the equation of the normal line orthogonal to the tangent line of the nth-order curve and the equation of the straight line passing through the contour point are made simultaneous. The measured point on the nth degree curve must be determined by solving the above equation and then the distance between that point and the contour point of interest must be calculated. A huge amount of calculation is required to carry out the above calculation.

そこで本発明では以下に述べるような近似計算によって
偏位量εを求めるようにした。
Therefore, in the present invention, the deviation amount ε is obtained by the following approximate calculation.

第9図(b)は、(a)における輪郭90と近似曲線9
1との変位量εを拡大したものである。図において、線
分CAは直線92に平行であると仮定し、線分CAの傾
きmを直線92の傾きとする。そして、輪郭点Bと、近
似曲線91とのx方向及びy方向に対する隔り量εx,
εyを求めることにより、所望の偏位量εは、 で近似的に求めることができる。
FIG. 9B shows the contour 90 and the approximate curve 9 in FIG.
The displacement amount ε with 1 is enlarged. In the figure, it is assumed that the line segment CA is parallel to the straight line 92, and the slope m of the line segment CA is the slope of the straight line 92. Then, the amount of separation εx between the contour point B and the approximated curve 91 in the x direction and the y direction,
By obtaining εy, the desired deviation amount ε is Can be approximately calculated with.

このようにして求めに近似的偏位量εと許容誤差Δとを
比較し、その結果によってサンプル点候補を選択し、サ
ンプル区間を決定して曲線部を複数に分割していく。
In this way, the approximate deviation amount ε and the allowable error Δ are compared for the determination, the sample point candidate is selected based on the result, the sample section is determined, and the curve portion is divided into a plurality of parts.

[各輪郭点の傾き再算出(37)] 上記の如く、輪郭が複数のサンプル区間においてそれぞ
れ3次式の近似曲線で近似されると、該サンプル区間の
始点座標と該サンプル区間を近似する近似曲線の次数及
び係数を、輪郭データとして記憶することにより圧縮さ
れたコードを得ることができる。
[Recalculation of Inclination of Each Contour Point (37)] As described above, when the contour is approximated by a cubic approximation curve in each of a plurality of sample sections, the starting point coordinates of the sample section and the approximation that approximates the sample section are approximated. A compressed code can be obtained by storing the degree and coefficient of the curve as contour data.

しかし、前記[各輪郭点の傾き算出(35)]で求めた各輪
郭点の傾きは、その前後所定数の輪郭点との傾きの平均
値としたものであるため、輪郭点の並び方が大きく変動
したり或いは輪郭点のデータがもともと離散的なデジタ
ルデータである等の理由によって、実際の傾きとは異な
る場合がある。
However, since the inclination of each contour point obtained in [Calculation of inclination of each contour point (35)] is the average value of the inclination with a predetermined number of contour points before and after that, the arrangement of the contour points is large. The inclination may differ from the actual inclination due to the fact that it changes or the data of the contour point is originally discrete digital data.

そこで、輪郭の傾きの連続性を更に忠実に近似するた
め、下記のようにして傾きを再度算出する。即ち、各サ
ンプル区間におけるn次多項式f(x)の一次導関数
f′(x)より求まる傾きを該サンプル区間の各輪郭点
における傾きとする。
Therefore, in order to more closely approximate the continuity of the inclination of the contour, the inclination is calculated again as follows. That is, the slope obtained from the first derivative f ′ (x) of the n-th order polynomial f (x) in each sample section is set as the slope at each contour point of the sample section.

[サンプル点の再決定(38)] 上記[各輪郭点の傾き再算出(37)]によって各輪郭点に
おける傾きを再度算出した場合は、求めた各輪郭点にお
ける傾きを用いて、前記[サンプル点の決定(36)]と同
様の処理を行ない、再度サンプル点を決定しながらサン
プル区間を求め直す。このようにして再度求めたサンプ
ル区間は、より輪郭に忠実なn次多項式f(x)で近似
される。
[Re-determination of sample points (38)] When the gradient at each contour point is recalculated by the above [Recalculation of gradient of each contour point (37)], the obtained gradient at each contour point is used to The same processing as [Determination of Point (36)] is performed, and the sample section is determined again while determining the sample point again. The sample section obtained again in this way is approximated by an n-th order polynomial f (x) that is more faithful to the contour.

[コード化(39)] 直線記憶部70に記憶した1つの直線部の始点終点の座
標を1つのサンプル区間とみなして、この両座標に基づ
いて該区間を直線近似するn次多項式f(x)(n=
1)の係数を算出し、コード化する。これを1つの符号
化データとする。
[Coding (39)] The coordinates of the start point and the end point of one straight line portion stored in the straight line storage unit 70 are regarded as one sample section, and an nth-order polynomial f (x) that linearly approximates the section based on these two coordinates. ) (N =
The coefficient of 1) is calculated and coded. This is one encoded data.

一方、曲線部の場合は夫々各サンプル区間の始点座標、
n次多項式f(x)の係数、及び次数等をコード化し、
さらに輪郭を各ブロック単位に編成したブロックデータ
の集合として記憶することにより、輪郭に忠実な圧縮デ
ータを得ることができる。
On the other hand, in the case of a curved part, the starting point coordinates of each sample section,
Coding the coefficient of the polynomial f (x) of degree n, the degree, etc.,
Further, by storing the contour as a set of block data organized in block units, compressed data faithful to the contour can be obtained.

第10図は、任意1つのブロックデータの好ましいデー
タ記憶フォーマットの一例を示す図である。図のフォー
マットにおいて、ブロックヘッダーは、1ブロックの始
点終点座標、及び1ブロック中に存在する直線部と曲線
部のサンプル区間の数を記憶し、セグメントヘッダーは
1サンプル区間の始点X,Y座標及びn次多項式f
(x)の次数を記憶し、セグメント情報は前記次数によ
り求まるn次多項式f(x)の各係数を記憶したもので
ある。
FIG. 10 is a diagram showing an example of a preferable data storage format of arbitrary one block data. In the format shown in the figure, the block header stores the start point / end point coordinates of one block and the number of sample sections of the straight line portion and the curved line portion existing in one block, and the segment header stores the start point X, Y coordinates of one sample section and nth degree polynomial f
The order of (x) is stored, and the segment information stores each coefficient of the n-th order polynomial f (x) obtained by the order.

そして、セグメントヘッダーとセグメント情報によって
1つのサンプル区間符号化データが編成されており、更
に、前記サンプル区間数に応じたサンプル区間符号化デ
ータが順次配列され、全体で1文字のブロックデータを
構成している。
Then, one sample section coded data is organized by the segment header and the segment information, and further, the sample section coded data corresponding to the number of the sample sections is sequentially arranged, and one block character data is formed as a whole. ing.

[圧縮データの記憶(40)] 上記フォーマットによりコード化された各ブロックデー
タを、例えばブロックを単位として、各ブロックにおけ
る解読処理時間の長い順に記憶することにより、文字輪
郭の復元の際に効率良く復元を行なうことが可能であ
る。
[Memory of compressed data (40)] By storing each block data coded in the above format in order of long decoding processing time in each block, for example, in units of blocks, it is possible to efficiently restore the character contour. It is possible to restore.

例えば第11図(a)は、文字「あ」に対して各ブロッ
ク(説明上、各ブロックに1〜20の番号を付した)毎に
圧縮データを求めた場合を示す。そして、解読に要する
時間の長いもの(例えば、x方向に対して各ブロックの
始点と終点の距離の長いもの)から順に記憶する。第1
1図(a)において、1ブロックの解読に要する時間が
1番長いのはブロック12であり、以下ブロック10,
ブロック16と続き、ブロック3が一番短くなってい
る。従って、この例により最終的に求められる1文字分
の輪郭圧縮データは、第11図(b)に示すようなブロ
ックデータの集合として記憶されることになる。
For example, FIG. 11A shows a case where compressed data is obtained for each block (for the sake of explanation, each block is numbered 1 to 20) for the character "A". Then, it is stored in order from the one having the longest decoding time (for example, the one having a long distance between the start point and the end point of each block in the x direction). First
In FIG. 1A, it is the block 12 that takes the longest time to decode one block.
Following block 16, block 3 is the shortest. Therefore, the contour compressed data for one character finally obtained by this example is stored as a set of block data as shown in FIG. 11 (b).

[分散デコード(41)] 次に元の輪郭を復元する方法について説明する。この場
合、輪郭の復元を高速に行なうためには、1ブロック毎
の前記ブロックデータを複数のデコーダに順次転送して
処理を行ない、処理の済んだデコーダより次のブロック
データを処理していくようにする。
[Distributed Decoding (41)] Next, a method of restoring the original contour will be described. In this case, in order to restore the contours at high speed, the block data for each block is sequentially transferred to a plurality of decoders for processing, and the next block data is processed by the processed decoder. To

そこで第11図(b)のように圧縮データを1ブロック
の解読に要する時間の長いものより順に記憶し、複数の
デコーダで処理することでデコーダを効率良く使用でき
る。
Therefore, as shown in FIG. 11 (b), compressed data is stored in order from the one having the longest time for decoding one block, and processed by a plurality of decoders, whereby the decoder can be used efficiently.

以下、第12図及び第13図を参照して説明する。第1
2図は、輪郭復元を最適に行なうための一実施例を示す
ブロック図である。図において、120は各ブロックデ
ータを1ブロックの解読に要する時間の長い順に記憶し
た圧縮データ記憶部、121はつの1ブロックデータを
後述するデコーダを選択して転送するセレクタ1、12
2は別途入力した所望倍率を記憶する倍率記憶部、12
3は前記ブロックデータを倍率相当の輪郭に復元するn
個のデコーダより成るデコーダ群、124は前記デコー
ダ群123の内、処理の終了したデコーダを選択し、解
読して求めた輪郭画素データを後述する1文字記憶部に
転送するセレクタ2、125は前記セレクタ2(12
4)より送られた輪郭データを記憶する1文字記憶部、
126は前記1文字記憶部125に記憶完了した1文字
分の輪郭画素データに基づき、文字を印字または表示等
を行なう出力装置である。
Hereinafter, description will be given with reference to FIGS. 12 and 13. First
FIG. 2 is a block diagram showing an embodiment for optimum contour restoration. In the figure, reference numeral 120 is a compressed data storage unit that stores each block data in order from the longest time required for decoding one block, and reference numeral 121 is a selector 1 or 12 that transfers one block data by selecting a decoder described later.
2 is a magnification storage unit that stores a separately input desired magnification, 12
3 is n for restoring the block data to the contour corresponding to the magnification.
A decoder group consisting of a plurality of decoders, 124 is a decoder group 123 which selects a decoder which has been processed and transfers the decoded contour pixel data to a one-character storage unit described later. Selector 2 (12
4) a one-character storage unit for storing the contour data sent from
An output device 126 prints or displays a character based on the outline pixel data for one character which has been stored in the one-character storage unit 125.

次に、動作について説明する。圧縮データ記憶部120
より1ブロックの解読に要する時間の長い順(例えば第
11図において、ブロック12,ブロック10,ブロッ
ク16…の順)にセレクタ1(121)に転送する。セ
レクタ1(121)は前記転送されたブロックデータ
を、デコーダ群122のデコーダ1より順にデコーダを
選択して転送を行なう。ブロックデータの転送が終了し
たデコーダは前記ブロックデータと倍率記憶部122に
別途記憶した所望倍率データに基づいて、輪郭の復元処
理を開始する。セレクタ2(124)は復元処理の完了
したデコーダを順次選択し、復元した輪郭画素データを
1文字記憶部125に転送していく。1ブロック分の復
元処理の完了したデコーダは、セレクタ1(121)に
対してブロックデータの転送を要求し、次の1ブロック
分のブロックデータが転送される。
Next, the operation will be described. Compressed data storage unit 120
The data is transferred to the selector 1 (121) in the order of longer time required for decoding one block (for example, the order of block 12, block 10, block 16 ... In FIG. 11). The selector 1 (121) transfers the transferred block data by selecting decoders in order from the decoder 1 of the decoder group 122. The decoder, which has completed the transfer of the block data, starts the contour restoration processing based on the block data and the desired magnification data separately stored in the magnification storage unit 122. The selector 2 (124) sequentially selects the decoders for which the restoration processing has been completed, and transfers the restored contour pixel data to the one-character storage unit 125. The decoder that has completed the restoration processing for one block requests the selector 1 (121) to transfer the block data, and the block data for the next one block is transferred.

第13図は第12図に示した各デコーダ群123の処理
状態の例を示すタイミングチャートである。
FIG. 13 is a timing chart showing an example of the processing state of each decoder group 123 shown in FIG.

図において、Tはセレクタ1(121)から各デコー
ダへブロックデータを転送する時間、Tは各デコーダ
が解読した輪郭画素データをセレクタ2(124)を介
して1文字記憶部125へ転送する時間であり、T
各デコーダにおけるブロックデータの解読処理時間であ
る。また、Tは1文字分の処理時間を示す。
In the figure, T 1 is a time for transferring block data from the selector 1 (121) to each decoder, and T 2 is for transferring contour pixel data decoded by each decoder to the one-character storage unit 125 via the selector 2 (124). Time, and T 3 is a block data decoding processing time in each decoder. Further, T 4 indicates the processing time for one character.

デコーダ1〜nへnブロック分のブロックデータが転送
され処理が開始すると、次にn+1番目のブロックデー
タは、処理時間の最も短かったデコーダ(この場合デコ
ーダ3)へ転送され、引続き処理を行なっていく。
When n blocks of block data are transferred to the decoders 1 to n and the processing is started, the (n + 1) th block data is transferred to the decoder (decoder 3 in this case) having the shortest processing time, and the subsequent processing is performed. Go.

しかも転送する各ブロックデータは、前述の通りその処
理時間が次第に短くなっていく順番に配列されているの
で、第13図に図示の如く各デコーダは、ほぼ同様に1
文字分の解読を終了する。従って各デコーダはほぼ均等
に稼動し、無駄な遊び時間を生じることなく速やかに文
字データの解読が終了する。
Moreover, since each block data to be transferred is arranged in the order in which the processing time is gradually shortened as described above, the respective decoders are arranged in the same manner as shown in FIG.
Finish decoding the characters. Therefore, the decoders operate almost equally, and the decoding of the character data is completed promptly without wasting idle time.

[輪郭の復元(42)] 上述の如く、各デコーダより復元された1ブロックの輪
郭データは、1文字記憶部125に逐次記憶していき1
文字分の輪郭データが完成する。そして、1文字記憶部
125に記憶された1文字分の輪郭データを、例えばレ
ーザビームプリンタ、CRT写真植字機或いは表示装置
等といった出力装置126に供給して所望の文字が復元
される。
[Contour Restoration (42)] As described above, one block of contour data restored by each decoder is sequentially stored in the one-character storage unit 125.
The contour data for the character is completed. Then, the outline data for one character stored in the one-character storage unit 125 is supplied to an output device 126 such as a laser beam printer, a CRT phototypesetting machine or a display device, and a desired character is restored.

[発明の効果] 以上述べてきたように本発明は、輪郭を直線部と曲線部
とに識別し、直線部は直線で表わすと共に曲線部は適宜
複数の曲線近似で表わすようにしたので、直線近似か曲
線近似の一方だけによる場合に比べ少ないデータ量で文
字画像を忠実に品質よく再現することができる。更に曲
線部について最適に曲線近似できるサンプル区間で順次
区分していくようになっており、これら曲線部上に適宜
定められる各サンプル区間を曲線近似するn次多項式
は、各サンプル区間の始点、終点の傾きを考慮し、該サ
ンプル区間毎に演算するので、曲線部の接続を滑らかに
再現することができる。さらに直線として再現される部
分は、その前後の近似曲線の影響を受けないので、直線
の再現性を維持することができる。また本発明は輪郭を
n次多項式で近似しているため、文字を大きく拡大して
再生したとき、本来曲線である所が折れ線状に再生され
てしまうという従来ベクトル方式の欠点も当然解消する
ことができる。
EFFECTS OF THE INVENTION As described above, the present invention distinguishes the contour into a straight line portion and a curved line portion, and the straight line portion is represented by a straight line and the curved line portion is appropriately represented by a plurality of curve approximations. It is possible to faithfully reproduce a character image with high quality with a smaller amount of data as compared with the case of using only one of approximation and curve approximation. Further, the curve part is sequentially divided into sample sections that can be optimally approximated by a curve. An n-th degree polynomial that approximates each sample section that is appropriately determined on these curve sections is a start point and an end point of each sample section. Since the calculation is performed for each sample section in consideration of the slope of, the connection of the curved portion can be smoothly reproduced. Further, since the portion reproduced as a straight line is not affected by the approximate curves before and after it, the reproducibility of the straight line can be maintained. Further, according to the present invention, since the contour is approximated by an n-th degree polynomial, when the character is greatly enlarged and reproduced, the disadvantage of the conventional vector method that the originally curved portion is reproduced in a polygonal line is naturally solved. You can

以上に述べてきたように本発明は、所望輪郭とのズレが
少なくしかも輪郭を滑らかに再現でき、尚かつ圧縮率の
高いデータを高速に得ることができるという大なる効果
を有するものである。
As described above, the present invention has a great effect that there is little deviation from the desired contour, the contour can be smoothly reproduced, and data with a high compression rate can be obtained at high speed.

以上説明してきた本発明になる文字画像データの処理方
法を、800×800ドットから成る明朝体平仮名文字
「あ」に適用して検証した結果、所望文字画像に対する
許容誤差を1ドットとした場合、1.21%にまでデー
タ量を圧縮することができた。
As a result of applying the character image data processing method according to the present invention described above to the Mincho type Hiragana character “a” consisting of 800 × 800 dots and verifying that the allowable error for a desired character image is 1 dot , The data amount could be compressed to 1.21%.

また、上記説明では文字「あ」を例として説明してきた
が、それ以外にも漢字や文字以外の各種マーク,記号,
線画などの画像についても同様に扱えることは明らかで
ある。
Further, in the above description, the character "a" has been described as an example, but other than that, various kanji and various marks, symbols,
It is obvious that images such as line drawings can be handled in the same way.

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

第1図,第2図は従来の輪郭法データ圧縮を説明する
図、第3図は本発明の概要を示すフローチャート、第4
図は輪郭をxを変数とする1価関数のブロックに分割し
た一例を示す図、第5図は直線近似を説明する図、第6
図は直線部と曲線部の識別方法の一実施例を示すブロッ
ク図、第7図は直線部と曲線部の識別結果を示す図、第
8図は各輪郭点における傾きの算出方法を説明する図、
第9図はサンプル点の決定方法を説明する図、第10図
は任意ブロックデータの記憶フォーマットの一例を示す
図、第11図はブロックデータの記憶例を説明する図、
第12図はブロックデータを復元する実施例を示すブロ
ック図、第13図は第12図の動作を示すタイミングチ
ャートである。 1,50,90…文字の輪郭 2,51…2次元ベクトル 3…m次曲線要素 60…標本点座標記憶部 61…直線部識別ベクトル長設定部 62…曲線分割点識別角度設定部 63…次標本点座標レジスタ 64…現標本点座標レジスタ 65…前標本点座標レジスタ 66…ベクトル長算出部 67…ベクトル間角度算出部 68…ベクトル長比較部 69…角度比較部 70…直線部記憶部 71…曲線部記憶部 72…曲線分割点座標記憶部 91…n次多項式の近似曲線 120…圧縮データ記憶部 121…セレクタ1、122…倍率記憶部 123…デコーダ群、124…セレクタ2 125…1文字記憶部、126…出力装置
1 and 2 are diagrams for explaining conventional contour method data compression, FIG. 3 is a flow chart showing an outline of the present invention, and FIG.
FIG. 6 is a diagram showing an example in which the contour is divided into blocks of a monovalent function with x as a variable, FIG. 5 is a diagram illustrating linear approximation, and FIG.
FIG. 7 is a block diagram showing an embodiment of a method of discriminating between a straight line portion and a curved portion, FIG. 7 is a diagram showing a discrimination result of a straight line portion and a curved portion, and FIG. Figure,
FIG. 9 is a diagram illustrating a method of determining sample points, FIG. 10 is a diagram illustrating an example of a storage format of arbitrary block data, FIG. 11 is a diagram illustrating an example of storage of block data,
FIG. 12 is a block diagram showing an embodiment for restoring block data, and FIG. 13 is a timing chart showing the operation of FIG. 1, 50, 90 ... Character outline 2, 51 ... Two-dimensional vector 3 ... m-order curve element 60 ... Sampling point coordinate storage unit 61 ... Straight line identification vector length setting unit 62 ... Curve division point identification angle setting unit 63 ... Next Sample point coordinate register 64 ... Current sample point coordinate register 65 ... Previous sample point coordinate register 66 ... Vector length calculation unit 67 ... Inter-vector angle calculation unit 68 ... Vector length comparison unit 69 ... Angle comparison unit 70 ... Straight line storage unit 71 ... Curve section storage section 72 ... Curve division point coordinate storage section 91 ... n-degree polynomial approximation curve 120 ... Compressed data storage section 121 ... Selector 1, 122 ... Magnification storage section 123 ... Decoder group, 124 ... Selector 2 125 ... 1 character storage Part, 126 ... Output device

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭54−149522(JP,A) 特開 昭58−134745(JP,A) 「bit」Vol.13,No.10(1981 年9月号−通巻169号)(昭56−9−1) 共立出版 P.1218−1225 電子通信学会論文誌 Vol.J62− D,No.10(昭54−10−25)P.665− 672 ─────────────────────────────────────────────────── --- Continuation of the front page (56) References JP-A-54-149522 (JP, A) JP-A-58-134745 (JP, A) "bit" Vol. 13, No. 10 (September 1981-Volume 169) (Sho 56-9-1) Kyoritsu Publishing P.P. 1218-1225 IEICE Transactions Vol. J62-D, No. 10 (Sho 54-10-25) P. 665-672

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】x,y座標上に展開した文字画像輪郭を、
xを変数とする1価関数のブロック[P,Pn](P
,Pnは任意1ブロックの始点と終点)に分割し、各
ブロック毎の輪郭形状を特定するブロックデータを作成
し、このブロックデータの集合を1文字画像の圧縮デー
タとして記憶するようにした文字画像データの処理方法
において、 前記分割した輪郭のブロックを構成しているm個の輪郭
点Q(j=1〜m)上のいずれかを始点と終点とする
輪郭区間を、該輪郭区間内の各輪郭点との偏位量が所定
の許容値以下で、かつその長さliを最大とするベクト
ルに置き換える過程と、 前記ベクトルの長さliと予め設定した長さLとを比較
する過程と、 前記ベクトルと該ベクトルに隣接するベクトルとの交叉
角θiと予め設定した角度θとを比較する過程と、 前記比較結果がli>Lのとき、前記輪郭区間を直線部
と識別し、該輪郭区間の始点,終点の座標に基づき該輪
郭区間を直線近似するn次多項式f(x)(n=1)を
求める過程と、 前記比較結果がli≦Lのとき、前記輪郭区間を曲線部
と識別し、さらにθ≦θのとき次のベクトルについて
繰り返し前記比較を行ない、li>Lとなったとき、ま
たはθi<θとなったとき、それまでの輪郭区間を1つ
の連続した曲線部と識別する過程と、 前記曲線部の輪郭区間にサンプル区間を設定する過程
と、 該設定したサンプル区間の始点,終点の座標とその傾き
に基づいて、前記サンプル区間を曲線近似するn次多項
式f(x)(n=2,3)を求める過程と、 前記任意1ブロック中に存在する直線部の始点座標と、
曲線部に設定した各サンプル区間の始点座標、及び直線
部と曲線部の各サンプル区間を近似するn次多項式の係
数と次数を、各ブロック毎に求めて1文字画像の圧縮デ
ータとして記憶するようにした文字画像データの処理方
法。
1. A character image contour expanded on x and y coordinates,
A block of monovalent functions with x as a variable [P 1 , Pn] (P
1 and Pn are divided into arbitrary block start and end points), block data specifying the contour shape of each block is created, and a set of this block data is stored as compressed data of one character image. In the image data processing method, a contour section whose start point and end point are any of m contour points Q j (j = 1 to m) forming the divided contour block A step of replacing the vector with a deviation amount with respect to each contour point equal to or smaller than a predetermined allowable value and a length l i of which is the maximum, and a step of comparing the vector length l i with a preset length l And a step of comparing an intersection angle θi between the vector and a vector adjacent to the vector with a preset angle θ, and when the comparison result is li> L, the contour section is identified as a straight line portion, and Of the contour section A process of obtaining an n-th degree polynomial f (x) (n = 1) that linearly approximates the contour section based on the coordinates of the points and the end points; and when the comparison result is li ≦ L, the contour section is identified as a curved portion. Further, when θ ≦ θ i, the above-mentioned comparison is repeated for the next vector, and when li> L or θ i <θ, the contour section up to that point is identified as one continuous curved line portion. A step, a step of setting a sample section in the contour section of the curved section, and an n-th degree polynomial f (x) for curve-approximation of the sample section based on the coordinates of the start point and the end point of the set sample section and their inclinations. A process of obtaining (n = 2, 3), starting point coordinates of a straight line portion existing in the arbitrary 1 block,
The starting point coordinates of each sample section set in the curved line section, and the coefficient and order of the nth degree polynomial approximating each sample section of the straight line section and the curved line section are calculated for each block and stored as compressed data of one character image. Method of processing character image data that has been set.
【請求項2】前記サンプル区間の始点終点の座標とその
傾きに基づいて、前記サンプル区間を曲線近似するn次
多項式f(x)(n=2,3)を求める前記過程が、 該サンプル区間の始点Q及び終点Qrと、それぞれそ
の前後所定数の輪郭点とを結ぶ線分の傾きの平均値t
及びtを求めて、それを始点Q及び終点Qrにおけ
る曲線の傾きとして定め、 前記定めた始点Q及び終点Qrにおける傾きt及び
と、始点Qの座標(x,y)及び終点Qrの
座標(x,y)に基づいて下記式(1)のn次多項式
f(x)(但し、n=2,3)を求め、 f(x)=y+b(x−x) +c(x−x +d(x−x……(1) 但し、 b=t 次いで、このn次多項式f(x)の一次導関数f′(x)に基
づいて前記曲線近似区間の各輪郭点における輪郭の傾き
を求め直し、 この一次導関数f′(x)に基づいて求めた各輪郭点にお
ける輪郭の傾きと各輪郭点の座標値から、前記式(1)と
同様に別途n次多項式f(x)(但し、n=2,3)を
求め直し、該求め直したn次多項式f(x)を所望のn
次多項式f(x)とする過程である、前記特許請求の範
囲第(1)項記載の文字画像データの処理方法。
2. The step of obtaining an n-th degree polynomial f (x) (n = 2, 3) that approximates the curve of the sample section based on the coordinates of the start point and the end point of the sample section and the inclination thereof, Mean value t 1 of the slopes of the line segments connecting the start point Q 1 and the end point Qr of
And seeking t r, defines it as the slope of the curve at the start point Q 1 and the end point Qr, an inclination t 1 and t r in the determined start point Q 1 and the end point Qr, the coordinate origin Q 1 (x 1, y 1 ) and the coordinates (x r , y r ) of the end point Qr, the n-th degree polynomial f (x) (where n = 2, 3) of the following formula (1) is obtained, and f (x) = y 1 + b 1 (x-x 1 ) + c 1 (x-x 1 ) 2 + d 1 (x-x 1 ) 3 (1) where b 1 = t 1 Then, the slope of the contour at each contour point of the curve approximation section is recalculated based on the first derivative f ′ (x) of the n-th degree polynomial f (x), and based on the first derivative f ′ (x) Similar to the equation (1), an n-th order polynomial f (x) (where n = 2, 3) is recalculated from the calculated inclination of each contour point and the coordinate value of each contour point, and the recalculation is performed. The desired n-th order polynomial f (x)
The method of processing character image data according to claim (1), which is a process of making a polynomial of degree f (x).
【請求項3】前記曲線部の輪郭区間にサンプル区間を設
定する過程が、 輪郭点Qを第1のサンプル点とし、任意の輪郭点Q
j+rをサンプル点候補とするサンプル候補区間[Qj,
j+r]を設定し、この両サンプル点の座標(x,y
)、(xj+r,yj+r)とその傾きt,tj+rに基づ
いてサンプル候補区間を曲線近似するn次多項式f
(x)(n=2,3)を求める過程と、 前記n次多項式f(x)で近似した曲線と、サンプル候
補区間内の各輪郭点との偏位量εを (但し、mはサンプル候補区間の始点,終点を結んだ直
線の傾き、εx,εyはサンプル候補区間に存在する各
輪郭点と近似曲線との夫々x方向、y方向の偏位量)に
よって求める過程と、 前記偏位量εと予め設定した許容誤差Δとを比較する過
程と、 前記サンプル候補区間の全ての輪郭点における前記比較
結果がε≦Δのとき、サンプル点候補に隣接する輪郭点
j+r+1を新たなサンプル点候補とし、更新されたサン
プル候補区間[Qj,Qj+r+1]について前記同様の比
較を行なってサンプル点候補を順延し、輪郭点Qj+r+p
でε>Δとなったとき、その直前の輪郭点Qj+r+p-1
新たなサンプル区間[Qj,Qj+r+p-1]を設定するよ
うにしたことを特徴とする前記特許請求の範囲第(1)項
記載の文字画像データの処理方法。
3. The process of setting a sample section in the contour section of the curved line section, wherein the contour point Q j is the first sample point, and an arbitrary contour point Q is set.
A sample candidate section [Qj, where j + r is a sample point candidate]
Q j + r ], and the coordinates (x j , y) of both sample points are set.
j ), (x j + r , y j + r ) and their slopes t j , t j + r , an n-th degree polynomial f for curve-approximating the sample candidate section.
(X) (n = 2, 3), the deviation amount ε between the curve approximated by the n-th degree polynomial f (x) and each contour point in the sample candidate section (However, m is the inclination of a straight line connecting the start point and the end point of the sample candidate section, and εx and εy are displacement amounts in the x direction and the y direction of each contour point existing in the sample candidate section and the approximate curve) A step, a step of comparing the deviation amount ε with a preset allowable error Δ, and the comparison result ε ≦ Δ at all contour points of the sample candidate section, the contour points adjacent to the sample point candidate Using Q j + r + 1 as a new sample point candidate, the updated sample candidate section [Q j , Q j + r + 1 ] is compared in the same manner as described above to postpone the sample point candidate, and the contour point Q j + r + p
When ε> Δ at, the new sample section [Qj, Q j + r + p-1 ] is set at the contour point Q j + r + p-1 immediately before that. The character image data processing method according to claim (1).
JP58183071A 1983-10-03 1983-10-03 Character image data processing method Expired - Lifetime JPH0613212B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP58183071A JPH0613212B2 (en) 1983-10-03 1983-10-03 Character image data processing method
GB08406187A GB2147474B (en) 1983-10-03 1984-03-09 Method of processing character or pictorial image data
KR1019840001671A KR890003318B1 (en) 1983-10-03 1984-03-30 Apparatus for processing character or pictorial image data
US07/057,390 US4771474A (en) 1983-10-03 1987-06-02 Apparatus for processing character or pictorial image data
HK852/88A HK85288A (en) 1983-10-03 1988-10-20 Method of processing character or pictorial image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58183071A JPH0613212B2 (en) 1983-10-03 1983-10-03 Character image data processing method

Publications (2)

Publication Number Publication Date
JPS6075975A JPS6075975A (en) 1985-04-30
JPH0613212B2 true JPH0613212B2 (en) 1994-02-23

Family

ID=16129237

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58183071A Expired - Lifetime JPH0613212B2 (en) 1983-10-03 1983-10-03 Character image data processing method

Country Status (2)

Country Link
JP (1) JPH0613212B2 (en)
KR (1) KR890003318B1 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0831959B2 (en) * 1985-12-18 1996-03-27 富士通株式会社 Image converter
JPS62274472A (en) * 1986-05-23 1987-11-28 Fujitsu Ltd Compression system for pattern data
JPS62296280A (en) * 1986-06-16 1987-12-23 Fujitsu Ltd Restoration and generation system for compressed data
ES2007960A6 (en) * 1988-07-12 1989-07-01 Ona Electro Erosion Two dimensional generating system for the geometry of a model using artificial vision
CA2105125C (en) * 1992-09-01 2000-04-18 Kazuo Toraichi Apparatus and method for inputting, compressing and outputting characters, illustrations, drawings and logomarks
US5623555A (en) * 1994-04-18 1997-04-22 Lucent Technologies Inc. Method and apparatus for handwriting decompression using estimated timing information
KR0181075B1 (en) * 1996-05-08 1999-04-01 배순훈 Adapted borderline coding method
JP2009175834A (en) * 2008-01-22 2009-08-06 Dainippon Printing Co Ltd Terminal and its program
JP2009175836A (en) * 2008-01-22 2009-08-06 Dainippon Printing Co Ltd Information processing device
JP5029963B2 (en) * 2008-01-30 2012-09-19 大日本印刷株式会社 Information processing device
JP5029962B2 (en) * 2008-01-30 2012-09-19 大日本印刷株式会社 Terminal device and program thereof
US8098247B2 (en) 2009-09-24 2012-01-17 Crucs Holdings, Llc Systems and methods for geometric data compression and encryption
CN110007854A (en) * 2019-02-21 2019-07-12 湖南大唐先一科技有限公司 One kind being based on time series data compression method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4199815A (en) * 1978-05-12 1980-04-22 Electra Corporation Typesetter character generating apparatus
JPS58134745A (en) * 1982-02-04 1983-08-11 Photo Composing Mach Mfg Co Ltd Compression system of letter and image data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
「bit」Vol.13,No.10(1981年9月号−通巻169号)(昭56−9−1)共立出版P.1218−1225
電子通信学会論文誌Vol.J62−D,No.10(昭54−10−25)P.665−672

Also Published As

Publication number Publication date
KR890003318B1 (en) 1989-09-16
KR850003013A (en) 1985-05-28
JPS6075975A (en) 1985-04-30

Similar Documents

Publication Publication Date Title
US4771474A (en) Apparatus for processing character or pictorial image data
US5483351A (en) Dilation of images without resolution conversion to compensate for printer characteristics
US4298945A (en) Character generating method and apparatus
JPH0613212B2 (en) Character image data processing method
CA2116143A1 (en) Method and apparatus for saving printer memory
JP2974061B2 (en) Pattern extraction device
KR100209455B1 (en) Character generating method and apparatus thereof
WO1983002179A1 (en) Method and apparatus for representation of a two dimensional figure
GB2089179A (en) Typesetter for the automatic generation of characters
JPH08275180A (en) Contour encoding device
US6052489A (en) Image output apparatus and method
JPS6233948B2 (en)
KR890003320B1 (en) Apparatus for processing character or pictorial image data
JPH0125072B2 (en)
KR890003317B1 (en) Apparatus for processing character or pictorial image data
JPH081553B2 (en) Image data compression method
KR890003316B1 (en) Apparatus for processing character or pictorial image data
KR890003319B1 (en) Apparatus for processing character or pictorial image data
JP3774494B2 (en) Data storage device
JPS58134746A (en) Compression system of letter and image data
JP3034140B2 (en) Character generation method and device
JPH07334648A (en) Method and device for processing image
JPH07121734A (en) Character image editing device
KR900003876B1 (en) Method for compressing character or pictorial image data
JP3034141B2 (en) Character generation method and device