JPH0370629B2 - - Google Patents

Info

Publication number
JPH0370629B2
JPH0370629B2 JP58183075A JP18307583A JPH0370629B2 JP H0370629 B2 JPH0370629 B2 JP H0370629B2 JP 58183075 A JP58183075 A JP 58183075A JP 18307583 A JP18307583 A JP 18307583A JP H0370629 B2 JPH0370629 B2 JP H0370629B2
Authority
JP
Japan
Prior art keywords
contour
data
point
section
block
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
JP58183075A
Other languages
Japanese (ja)
Other versions
JPS6075979A (en
Inventor
Hiroyuki Shibata
Masatake Takashima
Shinichiro Fukuda
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 JP58183075A priority Critical patent/JPS6075979A/en
Priority to GB08406187A priority patent/GB2147474B/en
Priority to KR1019840001604A priority patent/KR890003317B1/en
Publication of JPS6075979A publication Critical patent/JPS6075979A/en
Priority to US07/057,390 priority patent/US4771474A/en
Priority to HK852/88A priority patent/HK85288A/en
Publication of JPH0370629B2 publication Critical patent/JPH0370629B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/20Contour coding, e.g. using detection of edges
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features

Description

【発明の詳細な説明】[Detailed description of the invention]

〔発明の技術分野〕 本発明は、文字・画像(以下、文字という)デ
ータの圧縮方式に係わり、特に、文字の輪郭を関
数曲線または直線の集合で近似し、その輪郭特定
情報を記憶することによつてデータ量の圧縮を行
ない、該圧縮されたデータを解読して文字像を再
生するようにした文字画像データの処理方法に関
するものである。 〔発明の背景技術〕 文字をドツト分解して求めた2値データが、極
めて冗長性の高いデータであることは周知であ
る。そこで、従来この冗長性を軽減するために
種々のデータ圧縮方式が提案されてきた。 文字の形状を輪郭で把握し、その輪郭特定情報
を記憶することによつてデータ量の圧縮を計るよ
うにした所謂輪郭法と呼ばれるデータ圧縮方式も
その1つである。 この輪郭法によるデータ圧縮方式としては、第
1図の如き直線(ベクトル)近似法や、第2図の
如きn次曲線近似法が既に提案されている。 第1図に例示した直線近似法は、特開昭54−
149522号公報、特開昭55−79154号公報等に開示
された手法であり、その概要は、点線で示した任
意文字の輪郭1を直線で示した2次元ベクトル2
の集合で近似し、各ベクトルの特定情報(始点位
置、長さ及び傾き、あるいは、水平・垂直方向成
分)を記憶データとすることによつてデータ圧縮
を可能とするものである。 又、第2図に例示したn次曲線近似法は、本件
出願人が特願昭55−116160号(特開昭57−39963
号)として既に出願した手法であり、その概要
は、任意文字の輪郭上に適宜設定した点P群の座
標を記憶することによつてデータ量の圧縮を計る
と共に、任意連続する(n+1)個の点を結ぶn
次曲線要素3の集合で、所望輪郭を近似しようと
するものである。 これら輪郭法によるデータ圧縮方式は、その圧
縮データを解読して文字像を再生する際、補間処
理ないしベクトルの倍率変換処理を実施すること
によつて、種々倍率の文字像再生に対処し得ると
いう特徴を有している。 〔背景技術の問題点〕 しかし、その反面これら従来方式は、例えば、
第1図における各ベクトルの端点P、あるいは、
第2図における各n次曲線3の接続点Pcを中心
とする左右の各線分の傾き角δが、いずれの場合
も不連続となつていることからも明らかなよう
に、輪郭の滑らかさ(輪郭の傾きの連続性)につ
いて、最適の結果が保証されないという本質的な
欠陥を有していた。 これに対して、一般的に文字の輪郭形状は、単
に輪郭自体が連続しているのみならず、更に、文
字画線の交叉部や「ハネ」の先端などの特異な点
を除いて見た場合、その1次導関数(輪郭の傾
き)が連続的に変化する特徴を有している。 従つて、従来輪郭法によるデータ圧縮方式で
は、文字輪郭に忠実な圧縮データが得がたいばか
りでなく、該データに基づいて再生された文字像
の不自然さ(傾きの不連続性)を正確に取り除く
ことができないという問題を有していた。 このような問題を解決するため、本件出願人は
特願昭57−16884号(特開昭58−134745号)の方
式を既に出願した。 しかし、ここで開示したデータ圧縮方式は、 輪郭全体を一度に近似しようとしたために、
直線部と曲線部が連続するような輪郭部では、
その接続点で輪郭より外れた凹凸が発生しやす
い。また、これらを回避しようとすれば、更に
多くの標本点を設定し、多くの多項式に分割し
て近似を行なわなければならず、そのために圧
縮データ量が増大してしまうという問題点が明
らかとなつた。 更に、圧縮記憶データを求めるために複雑な
演算を要するため、記憶データの作成に時間が
かかるという問題点も残つていた。 〔発明の目的〕 本発明の目的は、改良された輪郭法データ圧縮
方式を提供することであり、更に本発明の他の目
的は、圧縮データを演算して求めるに際し、演算
時間を短縮したにもかかわらず、文字輪郭に忠実
な圧縮データが得られる文字画像データの処理方
法を提供することであり、更に本発明の他の目的
は、文字輪郭の滑らかさを忠実に記憶するにもか
かわらず、充分に高いデータ圧縮率が得られる文
字画像データの処理方法を提供することであり、
更に本発明の他の目的は、本発明によつて圧縮さ
れたデータを解読して文字像を再生するに際し、
滑らかな輪郭を持つ種々倍率の文字像を忠実に再
生できるようにした文字画像データの処理方法を
提供することである。 〔発明の概要〕 本発明の方法が関係するデータ処理の概要を第
3図に示すフローチヤートに従つて説明する。 入力した文字像は〔x,y〕マトリクス状にド
ツト分解され(30)、該ドツト分解された文字像
の輪郭を抽出する(31)。抽出された輪郭は、輪
郭との偏位量が許容誤差以下となるようなベクト
ルで直線近似する(32)。直線近似された輪郭は、
ベクトルの長さに基づいて直線部と曲線部とに識
別され(33)、一方では、隣接するベクトルの交
叉角を求めながら、輪郭の分割点を求める(34)。
そして、直線部に対しては、該区間の輪郭形状を
n次多項式(n=1)で表わし、曲線部に対して
は、該区間の輪郭形状をn次多項式(n=2、
3)で曲線近似する。前記曲線近似するために、
輪郭を形成する各輪郭点における傾きを求め
(35)、曲線近似する区間の両端座標とその傾きに
よりn次多項式を求める。そして、該区間を延長
しながら、該区間を近似するn次多項式と輪郭と
の偏位量が許容誤差以下に収まる範囲内で最長と
なる区間(サンプル区間)を求め、該区間の両端
点をサンプル点として決定していく(36)。この
ようにして、順次サンプル区間を求め、各サンプ
ル区間を近似するn次多項式が求まると、各n次
多項式の1次導関数を求め、各輪郭点の傾きを再
度算出する(37)。そして、新たに求めた各輪郭
点の傾きと座標値に基づいて前記同様にサンプル
点を決定し、より輪郭に忠実なn次多項式を算出
する(38)。このようにして求めた前記n次多項
式における係数及び次数等をコード化し(39)、
更に後の文字輪郭の復元を効率良く行なうため、
1ブロツクのx方向に対する始点・終点間距離の
長いもの順に、各ブロツクデータを記憶するよう
にした(40)。そして記憶された文字輪郭の圧縮
データは、複数のデコーダにて分散して解読し
(41)、前記解読結果に基づいて所望の文字輪郭を
復元するようにした(42)。 〔発明の実施例〕 次に各部のデータ処理について詳細に説明す
る。 〔画像入力(30)〕 スキヤナ装置等のラスタ走査によつて文字・画
像を〔x,y〕マトリクス状にドツト分解し、こ
れによつて求められたビツトパターンデータが処
理対象となるオリジナル文字データとして供給さ
れる。 〔輪郭抽出(31)〕 分解ドツトに対応する2値データが、xまたは
y方向において、「0」から「1」または「1」
から「0」に変化するドツト位置(輪郭点)を求
めることにより輪郭が得られる。そして、求めた
輪郭に対しxを変数とする1価関数のブロツクに
分割して複数ブロツクの集合とする。 第4図は、〔x,y〕マトリクス状にドツト分
解された文字データに対し輪郭を抽出すると共
に、該輪郭を1価関数のブロツク(「〇」から
「〇」の区間)に分割したものである。 〔直線近似(32)〕 輪郭上の任意1ブロツクにおいて、輪郭との偏
位量が所定の許容誤差以下に収まる範囲で出来る
だけ長く設定していくようにした多数のベクトル
により直線近似を行なう。 第5図は、任意の1ブロツク〔P1,Po〕にお
いて、点線で示した文字輪郭50を2次元ベクト
ル51の集合で直線近似を行なつたものである。
各ベクトル51の接続点P1,P2,…,Po-1,Po
は、標本点として、後述する標本点座標記憶部6
0に記憶する。 〔文字輪郭の直線部と曲線部の識別(33)〕 前述した如く、一般的に文字の輪郭形状は、直
線的な部分と曲線的な部分とを持ち合わせてお
り、従来では、輪郭全体を一度に近似しようとし
ていたために、直線部と曲線部が連続するような
輪郭においては、その接続点近傍において多くの
標本点を設定し、多くの近似式に分割して行なわ
なければならず、データ量が増大してしまい、圧
縮率が低下するという欠点が生じていた。 そこで本発明は、上述した直線近似により求め
たベクトルの長さに基づいて、輪郭形状が直線部
か曲線部かを識別するようにし、直線部と曲線部
とを夫々別々に処理することで上記欠点を解消す
るようにした。 第6図は、文字輪郭の直線部と曲線部の識別方
法を実現した構成の一実施例を示すブロツク図で
ある。図において、60は前記直線近似(32)に
よつて得られた標本点をブロツク単位に記憶する
標本点座標記憶部、61は識別ベクトル長Lを設
定する直線部識別ベクトル長設定部、62は曲線
分割点識別角度θを設定する曲線分割点識別角度
設定部、63はi+1番目の標本点Pl+1の座標
(xl+1,yl+1)を保持するための次標本点座標レジ
スタ、64はi番目の標本点Plの座標(xl+yl
を保持するための現標本点座標レジスタ、65は
i−1番目の標本点Pl-1の座標(xl-1,yl-1)を
保持するための前標本点座標レジスタ、66は前
記次標本点座標レジスタ63と現標本点座標レジ
スタ64の各座標より標本区間〔xl,xl+1〕のベ
クトル長llを算出するベクトル長算出部、67は
前記次標本点座標レジスタ63、現標本点座標レ
ジスタ64及び前標本点座標レジスタ65の各々
座標より、標本点Plでのベクトル間角度θlを算出
するベクトル間角度算出部、68は直線部識別ベ
クトル長設定部61で設定した識別ベクトル長L
と前記ベクトル長算出部66で算出したベクトル
長llとを比較するベクトル長比較部、69は前記
曲線分割点識別角度設定部62で設定した曲線分
割点識別角度θと前記ベクトル間角度算出部67
で算出したベクトル間角度θlとを比較する角度比
較部、70,71は前記ベクトル長比較部68の
比較結果に基づき、直線部または曲線部の区間を
夫々記憶する直線部記憶部、曲線部記憶部、72
は前記角度比較部69において、θ>θlのときi
番目の標本点Plを曲線分割点として記憶する曲線
分割点座標記憶部である。 次に動作について説明する。先ず、直線部識別
ベクトル長設定部61において識別ベクトル長L
を、曲線分割点識別角度設定部62において曲線
分割点識別角度θを夫々設定する。次に、標本点
座標記憶部60より、任意1ブロツクの始点座標
を次標本点座標レジスタ63に送る。この時点で
は現標点レジスタ64には何も記憶されていない
ので後述するベクトル長算出部66においてベク
トル長を求めることはできない。次に、次標本点
座標レジスタ63に記憶された標本点座標は現標
本点座標レジスタ64に記憶され、次標本点座標
レジスタ63には新たに次標本点座標が記憶され
る。以後は、現標本点座標レジスタ64の標本点
座標を前標本点座標レジスタ65に、次標本点座
標レジスタ63の標本点座標を現標本点座標レジ
スタ64にそれぞれシフトして記憶し、次標本点
座標レジスタ63には標本点座標記憶部60より
次標本点座標が記憶される。 ベクトル長算出部66は、前記次標本点座標レ
ジスタ63のi+1番目の標本点Pl+1の座標
(xl+1,yl+1)と現標本点座標レジスタ64のi番
目の標本点Plの座標(xl,yl)より、ベクトル長ll
=√(ll+12+(ll+12を算出する。算
出し
たベクトル長llはベクトル長比較部68にて、前
記直線部識別ベクトル長設定部61で予め設定し
た識別長Lと比較する。ここで、ll>Lのときは、
〔xl,xl+1〕の区間を直線部と判断し、該区間の始
点座標及び終点座標を直線部記憶部70に記憶す
る。また、ll≦Lのときは、〔xl、xl+1〕の区間を
曲線部と判断し、一旦、該区間を記憶し次の区間
の識別を行なう。ここで次の区間が直線部分であ
れば、前記記憶した〔xl,xl+1〕の区間を曲線部
としてその始点座標及び終点座標を曲線部記憶部
71に記憶する。一方、次の区間も曲線部であれ
ば更に次の区間の識別を行なつていき、識別する
区間が曲線部から直線部に変つたとき、それまで
曲線部の連続した区間を連続した1つの曲線部と
して、その始点座標と終点座標を曲線部記憶部7
1に記憶する。 〔輪郭の分割(34)〕 一方、ベクトル間角度算出部67では、次標本
点座標レジスタ63、現標本点座標レジスタ6
4、前標本点座標レジスタ65より、それぞれ標
本点Pl-1,Pl,Pl+1の座標(xl-1,yl-1)、(xl
yl)、(xl+1,yl+1)を読み出し、第5図に示すベ
クトル間角度θl(θlは鋭角)を算出する。算出した
ベクトル間角度θlは角度比較部69にて、前記曲
線分割点識別角度設定部62で予め設定した曲線
分割点識別角度θ比較する。ここで、θ>θlのと
き、標本点Plを新たに曲線分割点として、曲線分
割点座標記憶部72にその座標を記憶する。 通常、この曲線分割点の近傍に多くの標本点が
存在し、求める近似曲線の処理に時間がかかつて
いたが、前記求めたこの曲線分割点で輪郭を分割
することにより、曲線分割点の前後で夫々別個に
曲線近似するので処理時間も速く、しかも容易に
近似曲線を求めることができる。 第7図は、第4図に図示した文字輪郭データに
対して、上記した〔直線近似(32)〕〜〔輪郭の
分割(34)〕のデータ処理を施した例を示す。 図において、〇は1ブロツクの始点及び終点、
△は直線近似により得られた標本点、●は曲線分
割点である。また、※は直線部、無印は曲線部を
示す。 〔各輪郭点の傾き算出(35)〕 上記求めた曲線部の輪郭形状をn次多項式(但
し、n=1、2,3)を用いて近似するに際し、
該n次多項式は、2点の座標値及び傾きが決定す
れば一意的に決定される。そこでこの場合は、先
ず輪郭上の各輪郭点における傾きを求める必要が
ある。 本発明では、各輪郭点における傾きは、その輪
郭点の前後の輪郭点を所定数だけ抽出し、傾きを
算出する輪郭点と抽出した各輪郭点とを結んだ線
分の傾きをそれぞれ求め、所望の輪郭点における
傾きを算出するようにした。 本発明による各輪郭点における傾きの算出方法
を第8図に従つて説明する。 先ず、第8図aのように輪郭上の任意1ブロツ
ク〔P1,Po〕の始点P1(輪郭点Q1)における傾き
t1を求めるには、始点P1の後に存在する輪郭点を
任意数だけ抽出し、始点P1と各輪郭点とを結ぶ
線分の傾きを算出し、各傾きより始点P1におけ
る傾きt1を後述する式より算出する。 例えば、輪郭点を2点抽出して傾きを求める場
合は、まず、線分1 2の傾きm1、線分1 3の傾
きm2を求める。 線分の傾きm1は、2点の座標(x1,y1)、(x2
y2)から m1=y2−y1/x2−x1 で求めることができる。尚、m2の場合も同様に
して求める。 夫々線分の傾きm1,m2が求まると、輪郭点Q1
における傾きt1は、 t1=tan(tan-1m1+tan-1m2/2) により求まる。尚、終点においても同様にして求
めることができる。 次に、第8図bのように次輪郭点Q2における
傾きt2を求める場合は、 輪郭点Q2の前後に存在する輪郭点を所定数だ
け抽出し、輪郭点Q2より各輪郭点とを結んだ線
分の傾きをそれぞれ求め、輪郭点Q2における傾
きt2を求める。 例えば、輪郭点を前記2点抽出して傾きを求め
る場合、輪郭点Q2においては前1点しか抽出で
きないので、この場合前後1点を抽出することに
より、傾きt2を次式より求める。 t2=tan(tan-1m1+tan-1m2/2) このように指定した数の輪郭点が存在しない場
合は、指定範囲内で最大数の輪郭点を抽出して傾
きを求めるようにする。 次に、第8図cのように輪郭点Q3における傾
きt3を求める場合、輪郭点Q3においては、前記所
定数の輪郭点が前後に存在する。よつて輪郭点
Q3と各輪郭点とを結ぶ各線分の傾きm1、m2
m3、m4を夫々求め、輪郭点Q3における傾きt3を、 t3=tan(tan-1m1+tan-1m2+tan-1m3
tan-1m4/4) より求める。そして、順次輪郭点をすすめなが
ら、同様にして各輪郭点における傾きを算出して
いく。 〔サンプル点の決定(38)〕 以上のように各輪郭点における傾きが求まる
と、次に輪郭上の2点の輪郭点により決定する近
似曲線を求め、該近似曲線と輪郭との偏位量を各
輪郭点について逐次求める。 そして、今、問題とする近似曲線区間における
各偏位量が許容誤差以下の場合には、輪郭点を更
に1つ前進させて再び同様の処理を繰り返し、該
偏位量が許容誤差の範囲内で最長となる区間(こ
れを以下、サンプル区間という)を決定しなが
ら、輪郭をサンプル区間毎に分割していく。そし
て、このサンプル区間によつて決定するn次多項
式で輪郭が近似される。 以下、n次多項式の近似曲線の算出と偏位量の
算出方法について、第9図を用いて説明する。 まず、直線部記憶部70及び曲線部記憶部71
に記憶した座標値により、近似する区間が直線部
か曲線部であるかを判別する。そして、該区間が
直線部であれば、区間の始点座標と該区間を示す
直線式(1次式)を算出し、後述するコード化を
行なう。 次に、該区間が曲線部である場合について説明
する。 第9図aにおいて、Sl(Q1)は着目している第
i番目のサンプル区間の始点であり、該始点Sl
(Q1)とサンプル候補点Sl+1(Qn)の2点間をサ
ンプル候補区間として順次近似曲線を求ていく。
Bは輪郭点Qj、Cは曲線近似する区間を結んだ
直線92と直交し、且つ、点B(Qj)を通る直線
BQ93と近似曲線91との交点、は輪郭点
Qjにおける輪郭90と近似曲線91とのx方向
における偏位量、は輪郭90と近似曲線91
との偏位量、は輪郭90と近似曲線91との
y方向における偏位量である。また、区間〔Q1
Q2〕におけるn次多項式は一意に直線と決定す
るので、次区間〔Q1,Q3〕よりn次多項式の近
似曲線を求める。 以下、3次曲線の場合を例に説明する。既に算
出した始点Sj(Q1)及びサンプル候補点Qoの傾き
tl,toと座標値(xl,yt)、(xo,yo)を下記3次式
に代入することにより、該区間の近似曲線f(x)
が求まる。 f(x)=yl+bl(x−xl) +cl(x−xl2 +dl(x−xl3 bl=tl cl=3(yo−yi)/xo−xi−2ti−to/xo−xi dl=ti+to−2(yo−yi)/xo−xi/(xo−xi2 以上のように近似曲線f(x)を決定する各係
数が求まると、該近似曲線f(x)と輪郭との偏
位量ε求める。 偏位置εは該区間に存在する各輪郭点Qj(但
し、2≦j≦n−1)において夫々求める。 図において、輪郭90と近似曲線91の偏位量
ε(=)を求めるに際し、本発明では偏位量ε
を疑似的に算出するようにし、高速に処理できる
ようにした。 第9図bは、aにおける輪郭90と近似曲線9
1との誤差部分を拡大したものである。図におい
て、線分は直線92に平行であると仮定し、
線分の傾きmを直線92の傾きとする。そし
て、輪郭点B(Qj)において、近似曲線91との
x方向及びy方向に対する隔り量εx,εyを求める
ことにより、 所望の偏位量εは、
[Technical Field of the Invention] The present invention relates to a compression method for character/image (hereinafter referred to as character) data, and in particular, a method for approximating the outline of a character with a function curve or a set of straight lines and storing information specifying the outline. The present invention relates to a method for processing character image data, in which the amount of data is compressed by a method, and the compressed data is decoded to reproduce a character image. [Background of the Invention] It is well known that binary data obtained by dividing characters into dots has extremely high redundancy. Therefore, various data compression methods have been proposed to reduce this redundancy. One such data compression method is the so-called contour method, which compresses the amount of data by determining the shape of a character by its outline and storing information specifying the outline. As data compression methods using the contour method, a straight line (vector) approximation method as shown in FIG. 1 and an n-th order curve approximation method as shown in FIG. 2 have already been proposed. The straight line approximation method illustrated in Figure 1 is
This is a method disclosed in Japanese Patent Publication No. 149522, Japanese Patent Application Laid-open No. 1979-79154, etc., and its outline is that the contour 1 of an arbitrary character indicated by a dotted line is expressed as a two-dimensional vector 2 indicated by a straight line.
It is possible to compress data by approximating a set of vectors and storing specific information (starting point position, length and slope, or horizontal and vertical components) of each vector as stored data. Furthermore, the n-th curve approximation method illustrated in FIG.
This is a method that has already been applied for as a patent application (No.), and its outline is to compress the amount of data by storing the coordinates of a group of points P appropriately set on the outline of an arbitrary character, and to store arbitrary consecutive (n+1) points. Connect the points of n
This is a set of curved elements 3 that attempt to approximate a desired contour. These contour method-based data compression methods are said to be able to cope with character image reproduction at various magnifications by performing interpolation processing or vector magnification conversion processing when decoding the compressed data and reproducing character images. It has characteristics. [Problems with background technology] However, on the other hand, these conventional methods, for example,
The end point P of each vector in FIG. 1, or
The smoothness of the contour ( This method has an essential flaw in that it does not guarantee optimal results regarding the continuity of the slope of the contour. On the other hand, in general, the outline shape of a character is not only continuous, but also the shape of the outline itself is not only continuous, but also unique points such as the intersection of the character strokes and the tips of the "springs" are excluded. In this case, the first derivative (the slope of the contour) has a characteristic that it changes continuously. Therefore, with the conventional data compression method using the contour method, it is not only difficult to obtain compressed data that is faithful to the character contour, but also it is difficult to accurately remove unnaturalness (discontinuity in slope) of the character image reproduced based on the data. The problem was that I couldn't do it. In order to solve these problems, the applicant has already applied for the method of Japanese Patent Application No. 16884-1984 (Japanese Patent Application No. 134745-1982). However, the data compression method disclosed here attempts to approximate the entire contour at once;
In contour areas where straight lines and curved lines are continuous,
At the connection point, unevenness that deviates from the contour is likely to occur. In addition, if we try to avoid these problems, we will have to set more sample points and perform approximation by dividing into many polynomials, which obviously leads to an increase in the amount of compressed data. Summer. Furthermore, since complex calculations are required to obtain the compressed storage data, there remains the problem that it takes time to create the storage data. [Object of the Invention] An object of the invention is to provide an improved contour method data compression method, and another object of the invention is to reduce the calculation time when calculating compressed data. Nevertheless, it is an object of the present invention to provide a method for processing character image data that can obtain compressed data that is faithful to character contours. The object of the present invention is to provide a method for processing character image data that can obtain a sufficiently high data compression rate.
Furthermore, another object of the present invention is to decode compressed data according to the present invention to reproduce a character image.
To provide a method for processing character image data that can faithfully reproduce character images of various magnifications having smooth contours. [Summary of the Invention] An overview of data processing related to the method of the present invention will be explained according to the flowchart shown in FIG. The input character image is dot-decomposed into a [x,y] matrix (30), and the outline of the dot-decomposed character image is extracted (31). The extracted contour is linearly approximated by a vector whose deviation from the contour is less than the allowable error (32). The contour approximated by a straight line is
The vectors are distinguished into straight and curved parts based on their lengths (33), and on the other hand, dividing points of the contour are determined by determining the intersection angles of adjacent vectors (34).
Then, for a straight section, the contour shape of the section is expressed by an n-degree polynomial (n=1), and for a curved section, the contour shape of the section is expressed by an n-degree polynomial (n=2,
3) Approximate the curve. To approximate the curve,
The slope at each contour point forming the contour is determined (35), and an n-th degree polynomial is determined from the coordinates of both ends of the section to be approximated by the curve and its slope. Then, while extending the interval, find the longest interval (sample interval) within the range where the deviation between the n-th degree polynomial that approximates the interval and the contour is within the allowable error, and find both end points of the interval. This will be determined as a sample point (36). In this way, sample intervals are sequentially determined, and when an n-degree polynomial that approximates each sample interval is determined, the first derivative of each n-degree polynomial is determined, and the slope of each contour point is calculated again (37). Then, sample points are determined in the same manner as described above based on the newly obtained slope and coordinate values of each contour point, and an n-th degree polynomial that is more faithful to the contour is calculated (38). Coding the coefficients, degrees, etc. of the n-dimensional polynomial thus obtained (39),
Furthermore, in order to efficiently restore the character outline later,
Each block data is stored in the order of the distance between the starting point and the ending point in the x direction of one block (40). The stored compressed character contour data is then distributed and decoded by a plurality of decoders (41), and a desired character contour is restored based on the decoding results (42). [Embodiments of the Invention] Next, data processing in each part will be explained in detail. [Image input (30)] Characters/images are separated into dots in a [x, y] matrix by raster scanning using a scanner device, etc., and the bit pattern data obtained thereby is the original character data to be processed. Supplied as. [Contour extraction (31)] The binary data corresponding to the decomposed dot changes from "0" to "1" or "1" in the x or y direction.
The contour can be obtained by finding the dot position (contour point) that changes from "0" to "0". Then, the obtained contour is divided into blocks of a monovalent function with x as a variable to form a set of multiple blocks. Figure 4 shows a contour extracted from character data dot-decomposed into an [x, y] matrix, and the contour is divided into monovalent function blocks (intervals from "〇" to "〇"). It is. [Line approximation (32)] Linear approximation is performed for any one block on the contour using a large number of vectors set as long as possible within a range where the amount of deviation from the contour is within a predetermined tolerance. FIG. 5 shows a linear approximation of a character outline 50 shown by a dotted line using a set of two-dimensional vectors 51 in an arbitrary block [P 1 , P o ].
Connection points of each vector 51 P 1 , P 2 , ..., P o-1 , P o
are stored as sample points in the sample point coordinate storage unit 6, which will be described later.
Store as 0. [Identification of straight and curved parts of a character outline (33)] As mentioned above, the outline shape of a character generally has a straight part and a curved part, and in the past, the entire outline was identified at once. Therefore, for contours where straight and curved parts are continuous, many sample points must be set near the connection points, and the process must be divided into many approximation formulas. This has resulted in a disadvantage that the amount increases and the compression ratio decreases. Therefore, the present invention identifies whether the contour shape is a straight part or a curved part based on the length of the vector obtained by the linear approximation described above, and processes the straight part and the curved part separately. I tried to eliminate the shortcomings. FIG. 6 is a block diagram showing an embodiment of a configuration that realizes a method for identifying straight and curved portions of a character outline. In the figure, 60 is a sample point coordinate storage unit that stores the sample points obtained by the linear approximation (32) in units of blocks, 61 is a straight line section identification vector length setting unit that sets the identification vector length L, and 62 is a A curve dividing point identification angle setting unit sets the curve dividing point identification angle θ, and 63 is the next sample point coordinate for holding the coordinates (x l+1 , y l+1 ) of the i+1th sample point P l+ 1 Register 64 is the coordinates of the i-th sample point P l (x l + y l )
, 65 is a previous sample point coordinate register for holding the coordinates (x l-1 , y l-1 ) of the i-1th sample point P l-1 , and 66 is a previous sample point coordinate register for holding the coordinates (x l-1 , y l-1 ) of the i-1th sample point P l-1 . A vector length calculation unit that calculates the vector length l l of the sample interval [x l , x l+1 ] from each coordinate of the next sample point coordinate register 63 and the current sample point coordinate register 64; 67 is the next sample point coordinate register 63, a vector-to-vector angle calculation unit that calculates the vector-to-vector angle θ l at the sample point P l from the coordinates of the current sample point coordinate register 64 and the previous sample point coordinate register 65; 68, a straight-line portion identification vector length setting unit 61; Discrimination vector length L set by
and the vector length l calculated by the vector length calculation unit 66 , and 69 is a curve division point identification angle θ set by the curve division point identification angle setting unit 62 and the vector-to-vector angle calculation unit. 67
Angle comparison sections 70 and 71 compare the vector-to-vector angle θ l calculated in , and 70 and 71 are linear section storage sections and curved section sections that respectively store the sections of the straight section or the curved section based on the comparison result of the vector length comparison section 68. Memory section, 72
is calculated in the angle comparing section 69 when θ>θ l
This is a curve division point coordinate storage unit that stores the th sample point P l as a curve division point. Next, the operation will be explained. First, the straight line section identification vector length setting section 61 sets the identification vector length L.
The curve dividing point identifying angle θ is set in the curve dividing point identifying angle setting unit 62, respectively. Next, the starting point coordinates of any one block are sent from the sample point coordinate storage section 60 to the next sample point coordinate register 63. At this point, nothing is stored in the current reference point register 64, so the vector length cannot be determined by the vector length calculation unit 66, which will be described later. Next, the sample point coordinates stored in the next sample point coordinate register 63 are stored in the current sample point coordinate register 64, and the next sample point coordinates are newly stored in the next sample point coordinate register 63. Thereafter, 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. The coordinate register 63 stores the next sample point coordinate from the sample point coordinate storage section 60. The vector length calculation unit 66 calculates the coordinates (x l+1 , y l+1 ) of the i+1st sample point P l+ 1 in the next sample point coordinate register 63 and the i-th sample point in the current sample point coordinate register 64. From the coordinates (x l , y l ) of P l , the vector length l l
Calculate =√( ll+1 ) 2 + ( ll+1 ) 2 . The calculated vector length l l is compared in a vector length comparison section 68 with the discrimination length L preset by the straight line section discrimination vector length setting section 61. Here, when l l > L,
The section [x l , x l+1 ] is determined to be a straight section, and the starting point coordinates and end point coordinates of the section are stored in the straight section storage section 70 . When l l ≦L, the section [x l , x l+1 ] is determined to be a curved section, the section is temporarily stored, and the next section is identified. Here, if the next section is a straight line section, the stored section [x l , x l+1 ] is treated as a curve section, and its starting point coordinates and end point coordinates are stored in the curve section storage section 71 . On the other hand, if the next section is also a curved section, the next section is further identified, and when the section to be identified changes from a curved section to a straight section, the continuous section of the curved section up to that point is divided into one continuous section. As a curved part, its starting point coordinates and ending point coordinates are stored in the curved part storage unit 7.
Store in 1. [Divide contour (34)] On the other hand, in the inter-vector angle calculation unit 67, the next sample point coordinate register 63 and the current sample point coordinate register 6
4. From the previous sample point coordinate register 65, the coordinates (x l-1 , y l -1 ) , (x l ,
y l ), (x l+1 , y l+1 ) are read out, and the intervector angle θ ll is an acute angle) shown in FIG. 5 is calculated. The calculated inter-vector angle θ l is compared in an angle comparison section 69 with a curve division point identification angle θ set in advance by the curve division point identification angle setting section 62 . Here, when θ>θ l , the sample point P l is newly set as a curve dividing point, and its coordinates are stored in the curve dividing point coordinate storage section 72. Normally, there are many sample points near this curve dividing point, and it takes time to process the obtained approximate curve, but by dividing the contour at the curve dividing point obtained above, it is possible to Since each curve is approximated separately, the processing time is quick and the approximated curve can be easily obtained. FIG. 7 shows an example in which the above-described data processing of [linear approximation (32)] to [contour division (34)] is performed on the character contour data shown in FIG. 4. In the figure, 〇 is the starting point and ending point of one block,
△ is a sample point obtained by linear approximation, and ● is a curve dividing point. Also, * indicates a straight part, and no mark indicates a curved part. [Calculating the slope of each contour point (35)] When approximating the contour shape of the curved portion obtained above using an n-dimensional polynomial (where n = 1, 2, 3),
The n-th degree polynomial is uniquely determined once the coordinate values and inclinations of the two points are determined. Therefore, in this case, it is first necessary to find the slope at each contour point on the contour. In the present invention, the slope at each contour point is determined by extracting a predetermined number of contour points before and after the contour point, and determining the slope of a line segment connecting the contour point whose slope is to be calculated and each extracted contour point. The slope at a desired contour point is calculated. A method of calculating the slope at each contour point according to the present invention will be explained with reference to FIG. First, as shown in Figure 8a, the slope at the starting point P 1 (contour point Q 1 ) of any one block [P 1 , P o ] on the contour
To find t 1 , extract an arbitrary number of contour points that exist after the starting point P 1 , calculate the slope of the line segment connecting the starting point P 1 and each contour point, and calculate the slope t at the starting point P 1 from each slope. 1 is calculated using the formula described below. For example, if two contour points are extracted and the slope is determined, first the slope m 1 of the line segment 1 2 and the slope m 2 of the line segment 1 3 are calculated. The slope m 1 of a line segment is the coordinates of two points (x 1 , y 1 ), (x 2 ,
m 1 = y 2 −y 1 /x 2 −x 1 from y 2 ). In addition, in the case of m2 , it is found in the same way. When the slopes m 1 and m 2 of the line segments are determined, the contour point Q 1
The slope t 1 at is determined by t 1 =tan (tan -1 m 1 +tan -1 m 2 /2). Note that the end point can also be determined in the same manner. Next, when calculating the slope t 2 at the next contour point Q 2 as shown in Fig. 8b, extract a predetermined number of contour points before and after the contour point Q 2 , and calculate Find the slope of each line segment connecting the lines, and find the slope t2 at the contour point Q2 . For example, when determining the slope by extracting the two contour points, only the front one point can be extracted at the contour point Q2 , so in this case, by extracting the two points before and after the contour point Q2, the slope t2 is calculated from the following equation. t 2 = tan (tan -1 m 1 + tan -1 m 2 /2) If the specified number of contour points does not exist, the maximum number of contour points within the specified range will be extracted to calculate the slope. Make it. Next, when calculating the slope t3 at the contour point Q3 as shown in FIG. 8c, the predetermined number of contour points exist before and after the contour point Q3 . contour point
The slope of each line segment connecting Q 3 and each contour point is m 1 , m 2 ,
Find m 3 and m 4 respectively, and calculate the slope t 3 at contour point Q 3 as t 3 = tan (tan -1 m 1 + tan -1 m 2 + tan -1 m 3 +
tan -1 m 4 /4). Then, the slope at each contour point is calculated in the same manner as the contour points are successively selected. [Determination of sample points (38)] Once the slope at each contour point is determined as described above, the approximate curve determined by the two contour points on the contour is determined, and the amount of deviation between the approximate curve and the contour is determined. is calculated for each contour point one by one. If each deviation in the approximation curve section in question is less than the allowable error, the contour point is advanced one more time and the same process is repeated again, so that the deviation is within the allowable error. The contour is divided into sample sections while determining the longest section (hereinafter referred to as a sample section). Then, the contour is approximated by an n-dimensional polynomial determined by this sample interval. Hereinafter, the calculation method of the approximate curve of the n-th degree polynomial and the calculation method of the amount of deviation will be explained using FIG. 9. First, the straight part storage section 70 and the curved part storage section 71
Based on the coordinate values stored in , it is determined whether the approximated section is a straight section or a curved section. If the section is a straight section, the starting point coordinates of the section and a linear equation (linear equation) indicating the section are calculated and encoded as described later. Next, a case where the section is a curved section will be explained. In FIG. 9a, S l (Q 1 ) is the starting point of the i-th sample section of interest, and the starting point S l
(Q 1 ) and sample candidate point S l+1 (Qn) are set as a sample candidate section, and approximate curves are sequentially determined.
B is the contour point Q j , C is a straight line that is perpendicular to the straight line 92 connecting the sections to which the curve is approximated and passes through point B (Q j )
The intersection of BQ93 and approximate curve 91 is the contour point
The amount of deviation in the x direction between the contour 90 and the approximate curve 91 at Q j is the amount of deviation between the contour 90 and the approximate curve 91
is the amount of deviation between the contour 90 and the approximate curve 91 in the y direction. Also, the interval [Q 1 ,
Since the n-th polynomial in Q 2 ] is uniquely determined to be a straight line, an approximate curve of the n-th polynomial is found from the next interval [Q 1 , Q 3 ]. Hereinafter, the case of a cubic curve will be explained as an example. The slope of the already calculated starting point S j (Q 1 ) and sample candidate point Q o
By substituting t l , t o and the coordinate values (x l , y t ), (x o , y o ) into the cubic equation below, the approximate curve f(x) of the section is obtained.
is found. f(x)=y l +b l (x-x l ) +c l (x-x l ) 2 +d l (x-x l ) 3 b l =t l c l =3(y o -y i )/ x o −x i −2t i −t o /x o −x i d l =t i +t o −2(y o −y i )/x o −x i /(x o −x i ) 2 or more Once each coefficient that determines the approximate curve f(x) is determined, the amount of deviation ε between the approximate curve f(x) and the contour is determined. The offset position ε is obtained at each contour point Q j (where 2≦j≦n−1) existing in the section. In the figure, when determining the deviation amount ε (=) between the contour 90 and the approximate curve 91, in the present invention, the deviation amount ε
is calculated in a pseudo manner, allowing for faster processing. FIG. 9b shows the contour 90 and the approximate curve 9 at a.
This is an enlarged version of the difference from 1. In the figure, it is assumed that the line segment is parallel to the straight line 92,
Let the slope m of the line segment be the slope of the straight line 92. Then, by determining the distances ε x and ε y from the approximate curve 91 in the x and y directions at the contour point B (Q j ), the desired deviation amount ε is obtained as follows:

【式】(|m|>1のとき)[Formula] (When |m|>1)

〔各輪郭点の傾き再算出(37)〕[Recalculating the slope of each contour point (37)]

上記の如く、輪郭が複数のサンプル区間におい
てそれぞれ3次式の近似曲線で近似されると、該
サンプル区間の始点座標と該サンプル区間を近似
する近似曲線の次数及び係数を、輪郭データとし
て記憶することにより圧縮されたコードを得るこ
とができる。しかし、前記〔各輪郭点の傾き算出
(35)〕で求めた各輪郭点の傾きは、その前後所定
数の輪郭点との傾きの平均値としたものであり、
実際の傾きとは大きく異なる場合がある。そこ
で、本発明では、更に輪郭を忠実に近似するた
め、各サンプル区間における近似曲線f(x)の
一次導関数f′(x)を求め、該サンプル区間の各
輪郭点においての傾きを再度算出するようにし
た。 〔サンプル点の再決定(38)〕 上記〔各輪郭点の傾き再算出(37)〕によるデ
ータ処理によつて求めた各輪郭点における傾きと
座標値により、前記〔サンプル点の決定(36)〕
と同様にして、再度サンプル点を決定しながらサ
ンプル区間を求める。このようにして求めたサン
プル点は、そのサンプル区間において、より輪郭
に忠実な近似曲線f(x)で近似される。 〔コード化(39)〕 以上のようにして、求めた直線部及び曲線部に
おける夫々各サンプル区間の始点座標、近似曲線
f(x)の係数及び次数等をコード化し、更に各
ブロツク単位に編成したブロツクデータの集合と
して記憶することにより、任意文字輪郭に忠実な
圧縮データを得ることができる。 第10図は、以上の如き本発明の実施に当つて
適用される、任意1つのブロツクデータの好まし
いデータ記憶フオーマツトの一例を示す図であ
る。 図のフオーマツトにおいて、ブロツクヘツダー
は、1ブロツクの終了座標及び1ブロツク中に存
在するサンプル区間数を記憶し、セグメントヘツ
ダーは、1サンプル区間の始点のX,Y座標及び
近似曲線f(x)の次数を記憶し、セグメント情
報は、前記次数により求まる近似曲線f(x)の
各係数を記憶したものである。 そして、セグメントヘツダーとセグメント情報
によつて1つのサンプル区間データが編成されて
おり、更に、前記サンプル区間数に応じたサンプ
ル区間データが順次配列され、全体で1つのブロ
ツクデータを構成している。 〔圧縮データの記憶(40)〕 上記フオーマツトによりコード化された各ブロ
ツクデータは、後述する文字輪郭の復元の際に効
率良く復元を行なうため、ブロツクを単位とし
て、各ブロツクにおける解読処理時間の長い順に
記憶する。 例えば第11図aは、文字「あ」に対して各ブ
ロツク(説明上、各ブロツクに1〜20の番号を付
した)毎に圧縮データを求めた場合を示す。そし
て、解読に要する時間の長いもの(例えば、x方
向に対して各ブロツクの始点と終点の距離の長い
もの)から順に記憶するのである。第11図aに
おいて、1ブロツクの解読に要する時間が1番長
いのは、ブロツク12であり、以下ブロツク1
0、ブロツク16と続き、ブロツク3が一番短く
なつている。従つて、最終的に求められる文字輪
郭圧縮データは、第11図bに示すようなブロツ
クデータの集合として記憶されることになる。 〔分散デコード(41)〕 これまで述べてきたことは、文字輪郭のデータ
圧縮に関するものである。次に、以上述べて来た
データ処理方法によつて圧縮した輪郭データを基
に、元の輪郭を復元する方法について説明する。 この場合、輪郭の復元を高速に行なうために、
1ブロツク毎の前記ブロツクデータを複数のデコ
ーダに順次転送して処理を行ない、処理の済んだ
デコーダより次のブロツクデータを処理していく
ようにした。そこで、前述した1ブロツクの解読
に要する時間が問題となる。つまり、1ブロツク
の解読に要する時間が長ければ、輪郭を復元する
際の処理時間も通常長くなる。よつて、処理時間
の長いブロツクデータが後の方にくると、そのデ
コーダだけが処理を続け、他デコーダは全て処理
を終了してしまうという状態が起こり、デコーダ
の使用効率が低下する。 そこで本発明は、前述した如く、圧縮データを
1ブロツクの解読に要する時間の長いものより順
に記憶し、複数のデコーダで処理することでデコ
ーダを効率良く使用でき、輪郭を高速に復元でき
るようにした。 以下、第12図及び第13図を参照して説明す
る。 第12図は、本発明における輪郭復元を、最適
に行なうための一実施例を示すブロツク図であ
る。図において、120は各ブロツクデータを1
ブロツクの解読に要する時間の長い順に記憶した
圧縮データ記憶部、121はつの1ブロツクデー
タを後述するデコーダを選択して転送するセレク
タ1、122は別途入力した所望倍率を記憶する
倍率記憶部、123は前記ブロツクデータを倍率
相当の輪郭に復元するn個のデコーダより成るデ
コーダ群、124は前記デコーダ群123の内、
処理の終了したデコーダを選択し、解読して求め
た輪郭画素データを後述する1文字記憶部に転送
するセレクタ2、125は前記セレクタ2、12
4より送られた輪郭データを記憶する1文字記憶
部、126は前記1文字記憶部125に記憶完了
した1文字分の輪郭画素データに基づき、文字を
印字または表示等を行なう出力装置である。 次に、動作について説明する。 圧縮データ記憶部120より1ブロツクの解読
に要する時間の長い順(例えば第11図におい
て、ブロツク12、ブロツク10、ブロツク16
…の順)にセレクタ1、121に転送する。セレ
クタ1、121は前記転送されたブロツクデータ
を、デコーダ群122のデコーダ1より順にデコ
ーダを選択して転送を行なう。ブロツクデータの
転送が終了したデコーダは前記ブロツクデータと
倍率記憶部122に別途記憶した所望倍率データ
に基づいて、輪郭の復元処理を開始する。セレク
タ2、124は復元処理の完了したデコーダを順
次選択し、復元した輪郭画素データを1文字記憶
部125に転送していく。1ブロツク分の復元処
理の完了したデコーダは、セレクタ1、121に
対してブロツクデータの転送を要求し、次の1ブ
ロツク分のブロツクデータが転送される。 第13図は第12図に示した各デコーダ群12
3の処理状態の例を示すタイミングチヤートであ
る。 図において、T1はセレクタ1、121から各
デコーダへブロツクデータを転送する時間、T2
は各デコーダが解読した輪郭画素データをセレク
タ2、124を介して1文字記憶部125へ転送
する時間であり、T3は各デコーダにおけるブロ
ツクデータの解読処理時間である。また、T4
1文字分の処理時間を示す。 デコーダ1〜nへnブロツク分のブロツクデー
タが転送され処理が開始すると、次にn+1番目
のブロツクデータは、処理時間の最も短かつたデ
コーダ(この場合、デコーダ3)へ転送され、引
続き処理を行なつていく。 しかも、転送する各ブロツクデータは、前述の
通りその処理時間が次第に短くなつていく順番に
配列されているので、第13図に図示の如く各デ
コーダは、ほぼ同時に1文字分の処理を終了す
る。従つて各デコーダはほぼ均等に稼動し、無駄
な遊び時間を生じることなく可及的速やかに文字
データの解読が終了する。 〔輪郭の復元(42)〕 上述の如く、各デコーダより復元された1ブロ
ツクの輪郭画素データは、1文字記憶部125に
逐次記憶していき1文字分の輪郭画素データが完
成する。そして、1文字記憶部125に記憶され
た1文字分の輪郭画素データを、例えばレーザビ
ームプリンタ、CRT写真植字機或いは表示装置
等といつた出力装置126に供給することによ
り、前記従来技術と同様にして所望の文字が復元
される。 〔発明の効果〕 以上説明して来た本発明になる文字画像データ
の処理方法を、800×800ドツトから成る明朝体平
仮名文字「あ」に適用して検査した結果、所望文
字画像に対する許容誤差を1ドツトとして場合、
1.21%のデータ圧縮率を得ることができた。 また、上記説明では「あ」を例として説明して
きたが、それ以外にも漢字や文字以外の各種マー
ク、記号、線画などの画像についても同様に扱え
ることは明確である。 以上本発明により、充分に高い圧縮率で文字輪
郭の滑らかさを忠実に記憶するデータが高速に得
られ、更に復元に際しては、高品質の文字像を所
望の倍率で高速に再生することができる文字画像
データの処理方法を提供することができる。
As described above, when a contour is approximated by a cubic approximate curve in each of a plurality of sample sections, the coordinates of the starting point of the sample section and the order and coefficients of the approximate curve that approximates the sample section are stored as contour data. A compressed code can be obtained by doing this. However, the slope of each contour point obtained in the above [calculation of slope of each contour point (35)] is the average value of the slopes of a predetermined number of contour points before and after it,
The actual slope may differ greatly. Therefore, in the present invention, in order to approximate the contour more faithfully, the first derivative f'(x) of the approximate curve f(x) in each sample section is obtained, and the slope at each contour point in the sample section is calculated again. I decided to do so. [Re-determination of sample points (38)] Based on the inclination and coordinate values of each contour point obtained through data processing in the above-mentioned [Recalculation of slope of each contour point (37)], the above-mentioned [Determination of sample points (36)] ]
In the same manner as above, determine the sample interval while determining the sample points again. The sample points obtained in this manner are approximated by an approximate curve f(x) that is more faithful to the contour in the sample section. [Coding (39)] In the above manner, the starting point coordinates of each sample section in the straight and curved sections obtained, the coefficients and orders of the approximate curve f(x), etc. are encoded, and further organized into blocks. By storing the data as a set of block data, it is possible to obtain compressed data that is faithful to the outline of an arbitrary character. FIG. 10 is a diagram showing an example of a preferable data storage format for any one block data applied in implementing the present invention as described above. In the format shown in the figure, the block header stores the end coordinates of one block and the number of sample sections existing in one block, and the segment header stores the X, Y coordinates of the starting point of one sample section and the approximate curve f(x). The degree is stored, and the segment information stores each coefficient of the approximate curve f(x) determined by the degree. One sample section data is organized by the segment header and segment information, and further, sample section data according to the number of sample sections are arranged in sequence, and the whole constitutes one block data. . [Storage of compressed data (40)] Each block of data encoded in the above format is stored in units of blocks, which require a long decoding process time, in order to efficiently restore the character contours described later. Memorize in order. For example, FIG. 11a shows the 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, the blocks that take the longest time to decode (for example, the blocks that have the longest distance between the start and end points of each block in the x direction) are stored in order. In Figure 11a, the time required to decode one block is the longest for block 12, and the following block 1
0, block 16, and so on, with block 3 being the shortest. Therefore, the character outline compressed data finally obtained will be stored as a set of block data as shown in FIG. 11b. [Distributed Decoding (41)] What has been described so far relates to data compression of character contours. Next, a method for restoring the original contour based on the contour data compressed by the data processing method described above will be explained. In this case, in order to restore the contour quickly,
The block data for each block is sequentially transferred to a plurality of decoders for processing, and the next block data is processed from the decoder that has been processed. Therefore, the time required to decode one block as described above becomes a problem. In other words, the longer the time required to decode one block, the longer the processing time required to restore the contour. Therefore, when block data that takes a long time to process comes later, only that decoder continues processing while all other decoders finish processing, resulting in a decrease in decoder usage efficiency. Therefore, as mentioned above, the present invention stores the compressed data in the order of the time required to decode one block, and processes it with multiple decoders, so that the decoders can be used efficiently and the contour can be restored at high speed. did. This will be explained below with reference to FIGS. 12 and 13. FIG. 12 is a block diagram showing an embodiment for optimally performing contour restoration according to the present invention. In the figure, 120 indicates each block data as 1
A compressed data storage section 121 stores blocks in order of the time required for decoding the blocks, selector 1 selects and transfers one block of data to a decoder to be described later, 122 a magnification storage section 123 stores a desired magnification input separately. 124 is a decoder group consisting of n decoders that restores the block data to a contour corresponding to a magnification, and 124 is a decoder group of the decoder group 123,
The selector 2, 125 selects the decoder that has completed the processing and transfers the contour pixel data obtained by decoding to the single character storage section described later.
The single-character storage section 126 that stores the contour data sent from the single-character storage section 125 is an output device that prints or displays characters based on the contour pixel data for one character that has been stored in the single-character storage section 125. Next, the operation will be explained. From the compressed data storage unit 120, the blocks are stored in the order of the time required to decode one block (for example, in FIG. 11, block 12, block 10, block 16
...) to selectors 1 and 121. Selectors 1 and 121 select decoders in order from decoder 1 of decoder group 122 to transfer the transferred block data. After the transfer of the block data is completed, the decoder starts contour restoration processing based on the block data and desired magnification data separately stored in the magnification storage section 122. The selectors 2 and 124 sequentially select the decoders that have completed the restoration process, and transfer the restored contour pixel data to the one-character storage unit 125. The decoder that has completed the restoration process for one block requests the selector 1, 121 to transfer the block data, and the next block data is transferred. FIG. 13 shows each decoder group 12 shown in FIG.
3 is a timing chart showing an example of processing state No. 3; In the figure, T 1 is the time to transfer block data from selector 1, 121 to each decoder, and T 2
is the time required to transfer the contour pixel data decoded by each decoder to the one-character storage unit 125 via the selectors 2 and 124, and T3 is the decoding processing time of block data in each decoder. Further, T4 indicates the processing time for one character. When n blocks of block data are transferred to decoders 1 to n and processing starts, the next (n+1)th block data is transferred to the decoder with the shortest processing time (in this case, decoder 3) and continues processing. I'll keep going. Moreover, since each block of data to be transferred is arranged in the order of decreasing processing time as described above, each decoder finishes processing for one character almost simultaneously, as shown in Figure 13. . Therefore, each decoder operates almost equally, and the decoding of character data is completed as quickly as possible without wasting idle time. [Contour Restoration (42)] As described above, one block of contour pixel data restored by each decoder is sequentially stored in the one character storage section 125, and one character's worth of contour pixel data is completed. Then, by supplying the outline pixel data for one character stored in the one-character storage unit 125 to an output device 126 such as a laser beam printer, CRT phototypesetting machine, display device, etc. The desired character is restored. [Effects of the Invention] As a result of applying the character image data processing method of the present invention described above to the Mincho hiragana character "a" consisting of 800 x 800 dots and testing, it was found that the desired character image was acceptable. If the error is 1 dot,
We were able to obtain a data compression rate of 1.21%. Further, in the above explanation, "a" has been explained as an example, but it is clear that images of various marks, symbols, line drawings, etc. other than kanji and letters can also be handled in the same way. As described above, according to the present invention, data that faithfully stores the smoothness of character contours can be obtained at high speed with a sufficiently high compression ratio, and furthermore, when restoring, high-quality character images can be reproduced at high speed at a desired magnification. A method for processing character image data can be provided.

【図面の簡単な説明】[Brief explanation 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次多項式の近似曲線、1
20…圧縮データ記憶部、121…セレクタ1、
122…倍率記憶部、123…デコーダ群、12
4…セレクタ2、125…1文字記憶部、126
…出力装置。
1 and 2 are diagrams explaining conventional contour method data compression, FIG. 3 is a flowchart showing an overview of data processing related to the method of the present invention, and FIG. A diagram showing an example of dividing the value function into blocks, Figure 5 is a diagram explaining linear approximation,
FIG. 6 is a block diagram showing an embodiment of the method for identifying straight and curved portions of the present invention, FIG. 7 is a diagram showing identification results by the identification method of the present invention, and FIG. 8 is a block diagram of each contour point according to the present invention. 9 is a diagram illustrating a method for determining a sample point according to the present invention. FIG. 10 is a diagram illustrating an example of a storage format of block data. FIG. 12 is a block diagram illustrating an embodiment of a configuration in which block data is restored according to the present invention.
FIG. 13 is a timing chart showing the operation of FIG. 12. 1, 50, 90... Character outline, 2, 51... Two-dimensional vector, 3... m-dimensional curve element, 60... Sample point coordinate storage section, 61... Straight line section identification vector length setting section,
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 section, 67... Vector angle calculation section, 68... Vector length comparison section, 69... Angle comparison section, 70... Straight line section storage section, 71... Curved section storage section, 72... Curve division point coordinate storage unit, 91... Approximate curve of n-th degree polynomial, 1
20...Compressed data storage unit, 121...Selector 1,
122... Magnification storage unit, 123... Decoder group, 12
4...Selector 2, 125...1 character storage section, 126
...Output device.

Claims (1)

【特許請求の範囲】 1 x,y座標上に展開した文字画像輪郭を特定
するための符号化データを記憶すると共に、該符
号化データを解読してもとの文字画像を再生する
ようにした文字画像データの処理方法において、 前記輪郭を、xを変数とする1価関数のブロツ
クに分割したのち、各ブロツクを特定する符号化
された複数のブロツクデータを求め、更に該各ブ
ロツクデータを解読に要する時間の長い順に、各
ブロツク単位で続み出し可能に記憶すると共に、
各ブロツク単位で続み出した前記ブロツクデータ
を、適宜複数個のデコーダに順次ブロツク単位で
分配して解読するようにした文字画像データの処
理方法。
[Claims] 1. Encoded data for specifying the outline of a character image expanded on x, y coordinates is stored, and the encoded data is decoded to reproduce the original character image. In a method for processing character image data, the contour is divided into blocks of a monovalent function with x as a variable, a plurality of encoded block data specifying each block are obtained, and each block data is decoded. Each block is stored in order of the length of time required for each block to be retrieved, and
A method for processing character image data in which the block data successively generated in each block is distributed to a plurality of decoders in sequence and decoded as appropriate.
JP58183075A 1983-10-03 1983-10-03 Processing method of character picture data Granted JPS6075979A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP58183075A JPS6075979A (en) 1983-10-03 1983-10-03 Processing method of character picture data
GB08406187A GB2147474B (en) 1983-10-03 1984-03-09 Method of processing character or pictorial image data
KR1019840001604A KR890003317B1 (en) 1983-10-03 1984-03-28 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
JP58183075A JPS6075979A (en) 1983-10-03 1983-10-03 Processing method of character picture data

Publications (2)

Publication Number Publication Date
JPS6075979A JPS6075979A (en) 1985-04-30
JPH0370629B2 true JPH0370629B2 (en) 1991-11-08

Family

ID=16129312

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58183075A Granted JPS6075979A (en) 1983-10-03 1983-10-03 Processing method of character picture data

Country Status (2)

Country Link
JP (1) JPS6075979A (en)
KR (1) KR890003317B1 (en)

Also Published As

Publication number Publication date
KR890003317B1 (en) 1989-09-16
JPS6075979A (en) 1985-04-30
KR850003012A (en) 1985-05-28

Similar Documents

Publication Publication Date Title
GB2147474A (en) Method of processing character or pictorial image data
JP3031613B2 (en) Color / shade image input / output device and input / output method
JP2974061B2 (en) Pattern extraction device
CA2116143A1 (en) Method and apparatus for saving printer memory
KR890003318B1 (en) Apparatus for processing character or pictorial image data
US5644654A (en) Image processing apparatus capable of efficient coding of complex shape information
JPS6233948B2 (en)
KR890003320B1 (en) Apparatus for processing character or pictorial image data
JPH0370629B2 (en)
JPH0125072B2 (en)
JPH0818790A (en) Compression system for half tone image
JPS63249194A (en) Image data compression system
KR890003316B1 (en) Apparatus for processing character or pictorial image data
JPH07193809A (en) Coding and decoding method for picture data
KR890003319B1 (en) Apparatus for processing character or pictorial image data
JP3111958B2 (en) Encoding apparatus and encoding method using pattern encoding
JPH1013842A (en) Markov model image coder
JPH08194816A (en) Segment approximation method and its system
KR900005901B1 (en) Data processes method for character picture
JP2513654B2 (en) Image coding device
JPH0664605B2 (en) Image processing device
JP3344177B2 (en) Fractal image compression device
JPH069063B2 (en) Image processing device
KR900003876B1 (en) Method for compressing character or pictorial image data
JPH0640658B2 (en) Reproduction method of character image data