JP2646475B2 - Character data input / output device and input / output method - Google Patents
Character data input / output device and input / output methodInfo
- Publication number
- JP2646475B2 JP2646475B2 JP4259137A JP25913792A JP2646475B2 JP 2646475 B2 JP2646475 B2 JP 2646475B2 JP 4259137 A JP4259137 A JP 4259137A JP 25913792 A JP25913792 A JP 25913792A JP 2646475 B2 JP2646475 B2 JP 2646475B2
- Authority
- JP
- Japan
- Prior art keywords
- point
- junction
- data
- contour
- points
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Image Processing (AREA)
- Controls And Circuits For Display Device (AREA)
Description
【0001】[0001]
【産業上の利用分野】この発明は文字フォント(活字体
や毛筆体など)を画像読み取り装置によって二値デ−タ
として得て、文字の特徴を失うことなくノイズを除去し
つつ圧縮して記憶させ、圧縮したデ−タから文字を再生
するものである。とくに文字フォントを字母から自動的
にデジタルデ−タ化し、これを任意の大きさ任意の位置
に再生することに利用され、印刷機器やワ−プロ等に簡
単に使用できるものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention obtains character fonts (typefaces, brushstrokes, etc.) as binary data by an image reading device, compresses them while eliminating noise without losing the characteristics of the characters, and stores them. The character is reproduced from the compressed data. In particular, a character font is automatically converted to digital data from a character matrix, and is used to reproduce the digital data at an arbitrary size and at an arbitrary position, and can be easily used in a printing device, a word processor, and the like.
【0002】文字フォントは形状の規定された文字の集
まりであるが、自在に縮小拡大して利用しようとすると
文字の二次元的な形状そのものではなく抽象的なデ−タ
として記憶させる必要がある。漢字を含む文字の数が多
いので一文字毎のデ−タの数が多いと入力に時間が掛か
るし記憶装置の容量も大きいものが要求される。また出
力にも時間が掛かるし経済的でない。できるだけ一文字
あたりのデ−タ数は少ないほうが良い。[0002] A character font is a group of characters having a prescribed shape. If the character font is to be freely reduced and enlarged, it must be stored not as the two-dimensional shape itself but as abstract data. . Since the number of characters including kanji is large, if the number of data for each character is large, it takes a long time to input and a large storage device is required. In addition, the output takes time and is not economical. It is better that the number of data per character is as small as possible.
【0003】従来文字毎のデ−タを記憶装置に記憶させ
る方法として二つの方法があった。 文字デ−タを二値デ−タの列と見做してコ−ド化する
方法。これは文字を白黒の二値画像にし、微分などによ
って輪郭線を抽出し、輪郭線の連続する方向を求めてチ
ェ−ン符号化し始点と符号列を記憶するものである。Conventionally, there are two methods for storing data for each character in a storage device. A method of encoding character data as a sequence of binary data. In this method, a character is converted into a black-and-white binary image, an outline is extracted by differentiation or the like, a continuous direction of the outline is obtained and chain-coded, and a starting point and a code string are stored.
【0004】文字フォントの輪郭線を抽出しこれを直
線や円弧によって近似し始点の座標と直線、円弧などの
関数を記憶する方法。これはデ−タを圧縮できるので入
力、出力に便利な方法である。A method of extracting the outline of a character font, approximating the outline with a straight line or an arc, and storing the coordinates of the starting point and functions such as a straight line and an arc. This is a convenient method for input and output because data can be compressed.
【0005】本発明は後者のカテゴリ−に属する方法で
ある。文字フォントの輪郭線を抽出した後、チェ−ン符
号化すると、画像の最小単位である画素によって輪郭点
列座標を記憶するため拡大した場合の再生文字の品質が
劣る。記憶させたデ−タに一定の乗数を掛けて拡大文字
の座標を決定するから、輪郭点列が滑らかでなくギザギ
ザになる。従ってチェ−ン符号化法では任意の倍率の良
好な拡大文字を再生することができない。輪郭線は直
線、円弧などの組み合わせと考えられるが、その他の形
状の一部である場合もある。これはなんらかの関数で表
すことができよう。デ−タの取り扱いの容易さを考える
とデ−タの数は少ない程便利である。文字フォントを正
確に表現するためには輪郭線を正確に近似できるデ−タ
を求めなければならない。であるからデ−タの数をでき
るだけ少なくしてできるだけ正確に輪郭線を近似する方
法が希求されている。The present invention is a method belonging to the latter category. If the outline of the character font is extracted and then chain-encoded, the quality of the reproduced character is inferior when enlarged since the outline point sequence coordinates are stored by the pixel which is the minimum unit of the image. Since the coordinates of the enlarged character are determined by multiplying the stored data by a certain multiplier, the outline point sequence is not smooth but jagged. Therefore, it is not possible to reproduce a magnified character with a desired magnification by the chain coding method. The contour is considered to be a combination of a straight line, an arc and the like, but may be a part of another shape. This could be represented by some function. Considering the ease of data handling, the smaller the number of data, the more convenient. In order to accurately represent a character font, data that can accurately approximate a contour line must be obtained. Therefore, there is a need for a method of approximating a contour line as accurately as possible by minimizing the number of data.
【0006】[0006]
【従来の技術】文字フォントの輪郭線は直線、円弧、そ
の他の滑らかな曲線の集まりであると考えるとこれらの
曲率の変化する点を先ず検出するということが必要であ
る。曲率の変わる点を接合点という。隣接する接合点の
間では直線、円弧、または簡単な関数で輪郭線を近似す
ることができる。するとできるだけ正確に接合点を求め
るということが重要である。接合点が決まれば、隣接す
る二つの接合点間を表す直線、円弧、曲線などの区分片
を求める。この区分片を区分関数で表す。このようにす
れば、接合点と、これを始点とする区分関数の組み合わ
せによって全輪郭線を表現できる。接合点の精度と、区
分関数の精度により近似の精度が決まる。2. Description of the Related Art Considering that the outline of a character font is a collection of straight lines, circular arcs, and other smooth curves, it is necessary to first detect those points where the curvature changes. The point at which the curvature changes is called the junction. Contour lines can be approximated by straight lines, arcs, or simple functions between adjacent junctions. Then, it is important to determine the joining point as accurately as possible. When the joining point is determined, a segment, such as a straight line, an arc, or a curve, representing between two adjacent joining points is obtained. This piece is represented by a piece function. In this way, the entire contour can be represented by a combination of the junction point and the piecewise function starting from the junction point. The approximation accuracy is determined by the accuracy of the junction and the accuracy of the piecewise function.
【0007】文字フォントは二次元的な情報である。こ
れについての従来技術は乏しい。一次元情報についての
データの圧縮法としては、特願昭63−211948号
がある。これはひと続きの曲線を二次曲線で近似し、近
似式から各点の曲率を求めて微分不連続な点を求める。
微分不連続点が接合点に該当するということができる。
次いで隣接する微分不連続点の間のデータを二次関数で
近似してデータ圧縮する。この二次関数は簡単なパラメ
ータによって指定することができる。すると微分不連続
点と二次関数列のパラメータを指定することにより、一
次元データを近似できる。[0007] A character font is two-dimensional information. The prior art on this is poor. Japanese Patent Application No. 63-21948 discloses a data compression method for one-dimensional information. In this method, a continuous curve is approximated by a quadratic curve, and the curvature of each point is obtained from the approximate expression to obtain a differential discontinuous point.
It can be said that the differential discontinuity point corresponds to the junction.
Next, data between adjacent differential discontinuous points is approximated by a quadratic function and data is compressed. This quadratic function can be specified by simple parameters. Then, the one-dimensional data can be approximated by specifying the parameters of the differential discontinuous point and the quadratic function sequence.
【0008】[0008]
【発明が解決しようとする課題】従来文字フォントを少
ないデ−タで記憶し任意の大きさの文字を再生できるよ
うな技術は存在しなかった。前述の方法は独立変数が時
間で従属変数が変位である場合などに使うのでデ−タが
一次元の情報なのである。例えば音のような一変数を扱
う場合である。Conventionally, there has not been a technique capable of storing a character font with a small amount of data and reproducing a character of an arbitrary size. Since the above method is used when the independent variable is time and the dependent variable is displacement, the data is one-dimensional information. For example, when dealing with one variable such as sound.
【0009】これを文字フォントのように二次元の情報
のデ−タ圧縮に使うことができない。文字フォントは横
軸をx、縦軸をyとしてyをxの関数として表すことが
できるから、2次元に拡張してこの方法を使うことがで
きるように見える。しかしそうではない。文字フォント
の輪郭線は閉じられた二次元の情報であるので、独立変
数をxとすると、yがこれの多価関数になり、この方法
を使うことが簡単にはできない。This cannot be used for data compression of two-dimensional information like a character font. Since the character font can represent x as a function of x with the horizontal axis as x and the vertical axis as y, it seems that this method can be extended to two dimensions. But it is not. Since the outline of the character font is closed two-dimensional information, if the independent variable is x, y becomes a multivalent function of it, and it is not easy to use this method.
【0010】また先述の方法が対象にしていたものは二
次元情報でないので輪郭線や接合点というような明確な
意味を持っていなかった。変数の変化はランダムで、微
分不連続点の意味がまだ明確でなく、これの決定につい
て誤りがあるかどうかということについては考慮されて
いない。ところが文字のような場合は直線成分が多く含
まれるし、円弧部分も多い。変数がランダムに変化する
という訳ではない。[0010] Further, since the object of the above-mentioned method is not two-dimensional information, it has no clear meaning such as a contour line or a joint point. The change in the variables is random, the meaning of the differential discontinuity is not yet clear, and it is not considered whether there is an error in determining this. However, in the case of a character, many straight line components are included, and many arc portions are included. It does not mean that the variables change randomly.
【0011】また先述の方法を二次元情報に適用するた
めにある独立変数を考えて、輪郭線のx、y座標を独立
変数に対する従属変数とすることが考えられよう。しか
しこの場合、なにが曲率を表すのかということが明確で
ない。接合点というものが二次元情報を取り扱う時に初
めて現れるがこれは単に微分不連続点として求められも
のではない。ノイズの影響を考慮しなければならない。
ノイズによって見掛け上接合点として現れる場合もあ
る。これを除去し正しい接合点を求める必要がある。Considering an independent variable in order to apply the above-described method to two-dimensional information, it is conceivable that the x and y coordinates of the contour are set as dependent variables to the independent variable. However, in this case, it is not clear what represents the curvature. A junction point appears for the first time when dealing with two-dimensional information, but it is not simply obtained as a differential discontinuity point. The effects of noise must be considered.
It may appear as a junction due to noise. It is necessary to remove this and find the correct junction.
【0012】本発明は、文字フォントを読み取り自動的
にデ−タ圧縮して記憶し任意の大きさの文字として任意
の場所に再生できるようにする文字フォントデ−タ入力
出力装置を提供する。その目標は次のように纏められ
る。The present invention provides a character font data input / output device which reads a character font, automatically compresses and stores the data, and reproduces the character as an arbitrary size character at an arbitrary place. The goals can be summarized as follows.
【0013】(1)フォントの作成労力を省くこと。 (2)高品質の文字の取り扱いが可能なこと。 (3)フォントのデ−タ量が少ないこと。(1) Efforts to create fonts are omitted. (2) Capable of handling high quality characters. (3) The amount of font data is small.
【0014】[0014]
【課題を解決するための手段】本発明の文字データ入力
出力装置は、光学的に文字フォントデータを読み取り、
縦横に有限個並ぶ画素に対応させて記憶する文字読み取
り装置と、縦横に並ぶ画素に対応付けて読み取られた文
字の輪郭線を抽出する輸郭線抽出機構と、抽出された輪
郭線の2次元座標(X,Y)を連続する群毎に記憶する
輪郭点列記憶機構と、前記の群毎の輪郭点列のX、Y座
標をtを独立変数、xとyを従属変数とする2次の区分
的多項式で近似し、近似精度が所定範囲になるまで2次
の区分的多項式の次元数を増やしながら最小二乗近似を
繰り返し輪郭点列の群毎の近似多項式を求めるデータ近
似機構Aと、前記の近似結果からx、y空間での群毎の
輪郭点列の各点における曲率を求める曲率演算機構と、
群毎の曲率のデータから真円を抽出する真円抽出機構
と、真円を除いた輪郭点列の曲率のデータから無限大で
あるかある一定値より大きい値の曲率を持つ点を仮接合
点として抽出する仮接合点位置抽出機構と、前記仮接合
点の1つ(第1仮接合点)の輪郭点列上の前後所定個の
点の1つを第1接合点候補とし、前記第1仮接合点から
所定半径内で同一輪郭点列上にある他の仮接合点の1つ
(近傍接合点)の輪郭点列上の前後所定個の点の1つを
第2接合点候補とし、同一輪郭点列上で点列走査方向に
第1固定点と前記第1仮接合点と前記近傍接合点と第2
固定点がこの順で一列状に並ぶように前記近傍接合点と
第1固定点と第2固定点を選択する手段と、前記第1接
合点候補と前記第2接合点候補のすべての組合せについ
て、前記第1固定点と前記第1接合点候補と前記第2接
合点候補と前記第2固定点の4点を最も滑らかに結ぶ線
の滑らかさに基づき前記第1接合点候補の適合度を求め
る手段と、最も適合度の高い前記第1接合点候補を選択
して前記第1仮接合点に代わる最適接合点とする手段と
を有する最適接合点抽出機構と、連続する二以上の直線
又は連続する二以上の円弧の始点である最適接合点の中
からそれがなくても近似精度が保たれるような不要な最
適接合点を見いだしこれを除去し直線又は円弧を統合す
る不要接合点除去機構と、除去されずに残った最適接合
点を最終接合点として記憶する最終接合点記億装置と、
同一群の点列内の隣接する最終接合点の間を直線、円弧
の順で近似しこれで所定の近似精度が得られないときは
tを独立変数、x、yを従属変数とした2次の区分的多
項式で近似し近似精度が所定の値に収まるまで2次の区
分的多項式の次元数を増加させながら最小二乗近似を繰
り返して隣接する最終接合点の間を、直線、円弧、区分
的多項式で近似するデータ近似機構Bと、真円データと
点列の群毎に前記の最終接合点の座標と隣接する最終接
合点の間を近似する関数のパラメータとを記憶する圧縮
データ記憶機構と、記憶された圧縮データを入力し真円
データと点列の群毎の最終接合点の座標と隣接する最終
接合点の間を近似する関数のパラメータを得て輪郭線を
再生する輪郭再生機構と、再生された輪郭線の内部の画
素と、外部の画素に異なる値を対応させる文字再生機構
と、再生された文字フォントを文字として出力する再生
データ出力機構を含むことを特徴とする。The character data input / output device of the present invention optically reads character font data,
A character reading device that stores data corresponding to a finite number of pixels arranged vertically and horizontally, a contour extraction mechanism that extracts a contour of a character read in association with pixels arranged vertically and horizontally, and a two-dimensional extracted contour. A contour point sequence storage mechanism for storing coordinates (X, Y) for each continuous group, and a secondary function in which the X and Y coordinates of the contour point sequence for each group are t as an independent variable and x and y as dependent variables. A data approximation mechanism A for approximating by a piecewise polynomial of, repeating a least square approximation while increasing the number of dimensions of a quadratic piecewise polynomial until the approximation accuracy falls within a predetermined range, and obtaining an approximate polynomial for each group of contour point sequences; A curvature calculation mechanism for calculating a curvature at each point of the contour point sequence for each group in the x, y space from the approximation result;
A perfect circle extraction mechanism that extracts a perfect circle from the curvature data for each group, and temporarily joins points with a curvature that is infinite or greater than a certain value from the curvature data of the contour point sequence excluding the perfect circle A temporary joining point position extracting mechanism for extracting as a point, one of a predetermined number of preceding and succeeding points on an outline point sequence of one of the temporary joining points (first temporary joining point) as a first joining point candidate, One of a predetermined number of preceding and succeeding points on one of the other temporary joining points (neighboring joining points) on the same contour point sequence within a predetermined radius from one temporary joining point is set as a second joining point candidate. The first fixed point, the first temporary joint point, the neighboring joint point, and the second
Means for selecting the neighboring joint points, the first fixed points, and the second fixed points so that the fixed points are arranged in a line in this order; and all combinations of the first joint point candidates and the second joint point candidates. The degree of conformity of the first joint point candidate is determined based on the smoothness of a line connecting the four points of the first fixed point, the first joint point candidate, the second joint point candidate, and the second fixed point most smoothly. A means for determining, an optimal joint extracting mechanism having means for selecting the first joint candidate with the highest degree of fitness and selecting the optimal joint instead of the first temporary joint, and two or more continuous straight lines or Unnecessary joints are removed from the optimal joints, which are the starting points of two or more continuous arcs, that can maintain the approximation accuracy even if they are not found, and are removed to integrate straight lines or arcs. The mechanism and the optimal joint that has not been removed A final junction SL billion device that stores Te,
When a predetermined approximation accuracy cannot be obtained by approximating a straight line and an arc between adjacent final joining points in the same group of point sequences in the order of t, an independent variable and x and y as dependent variables are used. Approximate with the piecewise polynomial of the above, repeat the least squares approximation while increasing the number of dimensions of the quadratic piecewise polynomial until the approximation accuracy falls within a predetermined value, and make a straight line, circular arc, piecewise A data approximation mechanism B for approximating by a polynomial, a compressed data storage mechanism for storing the coordinates of the final joint point and a parameter of a function for approximating between adjacent final joint points for each group of the perfect circle data and the point sequence; A contour reproducing mechanism for inputting the stored compressed data and obtaining a parameter of a function approximating between the coordinates of the perfect junction data and the coordinates of the final joining point for each group of point sequences and an adjacent final joining point to reproduce the contour line; , The pixel inside the reproduced contour line and the pixel outside And character reproduction mechanism to associate a different value, characterized in that it comprises a reproduced data output mechanism for outputting the reproduced character font as a character.
【0015】[0015]
【作用】図1に全体の構成を一覧表にして示す。ここに
全ての機構を予め記す。 A.画像記憶装置1 B.輪郭点列抽出装置 C.輪郭点列記憶装置 D.デ−タ近似機構A E.曲率演算機構 E′.近似曲率記憶装置 F.真円抽出機構 G.真円記憶装置 H.接合点位置抽出機構 I.接合点位置記憶装置 J.最適接合点抽出機構 K.最適接合点記憶装置 L.接合点除去機構 M.最終接合点記憶装置 N.デ−タ近似機構B O.圧縮デ−タ出力機構 P.圧縮デ−タ記憶装置 R.輪郭再生機構 S.文字再生機構 T.再生デ−タ出力機構 U.画像記憶装置2FIG. 1 is a table showing the entire configuration. Here, all the mechanisms are described in advance. A. Image storage device 1 B. Contour point sequence extraction device C. Outline point sequence storage device D. Data approximation mechanism AE Curvature calculation mechanism E '. Approximate curvature storage device F. Perfect circle extraction mechanism G. Perfect circular storage device H. Junction point position extraction mechanism I. Junction point position storage device Optimal junction extraction mechanism K. Optimal junction storage device L. Junction point removal mechanism Final junction storage device Data approximation mechanism B.O. Compressed data output mechanism Compressed data storage device Contour reproduction mechanism Character playback mechanism Reproduction data output mechanism U. Image storage device 2
【0016】例えば図30に示す「ぱ」という文字につ
いて手順を簡単に説明する。図30はもう一度説明され
る。まず紙に書いてある「ぱ」をイメ−ジスキャナで読
み取る。これが文字の光学的な読み取り、入力である。
輪郭線の集合である輪郭点列抽出をすると白抜きの文字
になる。この例で輪郭点列の群としては5つある。左の
縦線が一つ、中央の「よ」に似た部分が二つ、右肩の丸
が内外に二つの輪郭点列を持つ。媒介変数表示を用い
て、X、Y座標をtの関数とする。それぞれの輪郭点列
群において全体に渡って区分的多項式で近似する。区分
的多項式で連続関数になるから各輪郭点列において2階
微分し曲率を求める。曲率が一定である輪郭点列は真円
である。これは真円として分離される。この例では右肩
の○が除かれる。残りはこの例で3つの輪郭点列群にな
る。曲率の大きいところが接合点である。4段目で輪郭
点列の交点、曲点などに×の印が付いている。これが接
合点である。輪郭点列は後に追加されることもある。For example, the procedure for the character "@" shown in FIG. 30 will be briefly described. FIG. 30 is described again. First, "ぱ" written on paper is read by an image scanner. This is the optical reading and input of characters.
When a contour point sequence, which is a set of contour lines, is extracted, white characters are obtained. In this example, there are five groups of contour point sequences. One vertical line on the left, two parts resembling “yo” in the center, and a circle on the right shoulder have two outline points inside and outside. Using the parametric representation, the X and Y coordinates are functions of t. Each contour point sequence group is approximated by a piecewise polynomial throughout. Since a piecewise polynomial becomes a continuous function, the curvature is obtained by performing second order differentiation on each contour point sequence. A contour point sequence having a constant curvature is a perfect circle. This is separated as a perfect circle. In this example, the circle on the right shoulder is removed. The rest is a group of three contour points in this example. The place where the curvature is large is the junction. In the fourth row, crosses and curved points of the outline point sequence are marked with a cross. This is the junction. The outline point sequence may be added later.
【0017】接合点によって輪郭点列を分割するのであ
る。接合点は曲率が大きいとして求めた一次的な接合点
(仮接合点という)を用いても良い。文字フォントの場
合は始めからきれいに描かれた文字を対象にするからノ
イズが入り難いために曲率だけからでも接合点を正確に
求めることができる。こうすると計算が極めて単純化さ
れる。The outline point sequence is divided by the joining points. As the joining point, a primary joining point determined as having a large curvature (referred to as a temporary joining point) may be used. In the case of a character font, since a character which is clearly drawn from the beginning is targeted, it is difficult for noise to enter the character font. Therefore, the joining point can be accurately obtained only from the curvature. This greatly simplifies the calculation.
【0018】接合点についてはさらに彫琢を重ねること
がある。この場合は近傍の接合点との整合性を考えて接
合点を修正する。これは仮接合点と接合点候補として後
に説明する。また接合点の位置を修正した後、不要な接
合点を除去するということも有効である。さらに新たに
接合点を追加するということもある。このようにすると
光学的読み取りなどにおいて発生したノイズなどを有効
に除去できる。[0018] At the joining point, there is a case where the sculpture is further repeated. In this case, the joining point is corrected in consideration of the consistency with the nearby joining point. This will be described later as a temporary joining point and a joining point candidate. It is also effective to remove unnecessary joint points after correcting the positions of the joint points. In some cases, a new junction is added. In this way, noise or the like generated in optical reading or the like can be effectively removed.
【0019】接合点が確定すると、接合点の間を直線、
円弧、自由曲線によって近似する。近似は直線、円弧、
自由曲線の順で行う。文字フォントであるから、直線の
部分が多い。特に漢字の場合は直線の部分の比率が極め
て高い。直線についで多いのは円弧である。漢字の場
合、直線、円弧、自由曲線の順に多いと考えられる。し
かし近似の順が直線、円弧、自由曲線である理由は頻出
度がこの順であるからではない。When the joining points are determined, a straight line is drawn between the joining points.
Approximate by arc and free curve. The approximations are straight lines, arcs,
Perform in the order of free curves. Because it is a character font, there are many straight lines. Particularly in the case of kanji, the ratio of the straight line portion is extremely high. Arcs are most common after straight lines. In the case of kanji, it is considered that there are many in the order of straight line, arc, and free curve. However, the reason why the order of approximation is a straight line, a circular arc, and a free curve is not because the frequency of occurrence is in this order.
【0020】そうではなくて、記録されたデ−タの品質
を上げるためにこの順で近似をする。もしも始めから自
由曲線として近似すると、直線や円弧もそれなりに2次
曲線で近似してしまう。2次曲線の集合は直線や円弧を
正確に表現できない。ノイズがある場合は直線、円弧が
さらに変形するように近似される。直線、円弧部分が確
かに存在する筈でこれらを確実に抽出するために、直
線、円弧、自由曲線の順で近似するのである。直線の場
合は近似に要する時間は短い。デ−タ量も少ない。円弧
の近似も簡単である。中心の座標、半径、中心角を与え
れば良い。Instead, approximations are made in this order to improve the quality of the recorded data. If it is approximated as a free curve from the beginning, straight lines and arcs will be approximated by quadratic curves. A set of quadratic curves cannot accurately represent a straight line or an arc. When there is noise, it is approximated that the straight line and the arc are further deformed. Straight lines and circular arcs should exist, and in order to reliably extract them, approximation is performed in the order of straight line, circular arc, and free curve. In the case of a straight line, the time required for approximation is short. The amount of data is also small. The approximation of the arc is also easy. The coordinates, radius, and center angle of the center may be given.
【0021】直線でも円弧でも近似できない場合は、自
由曲線近似する。この場合は接合点間をn個の細区間に
分割し区分的多項式で近似する。細区分の数を増やすと
近似を高めることができるので所望の精度の近似をする
ことができる。When approximation cannot be made with a straight line or a circular arc, a free curve is approximated. In this case, the space between the joining points is divided into n subsections and approximated by a piecewise polynomial. If the number of subdivisions is increased, the approximation can be increased, so that an approximation with desired accuracy can be made.
【0022】こうして接合点と、直線、円弧、自由曲線
のパラメ−タが得られるので、これを文字フォントのデ
−タとして記憶する。画数や複雑さによるが1文字当た
り大体300〜500byte程度のデ−タで済む。白
黒画像のままであると画面を構成する全画素の数だけの
デ−タがある。たとえば縦横256画素とすると、8k
byteもあるが、本発明では大幅にデ−タを圧縮でき
る。このデ−タは逆に読み出して接合点を基準として直
線、円弧、自由曲線を再生することができる。計算によ
って任意の大きさ、任意の位置に再生することができ
る。In this way, the parameters of the joining point, the straight line, the arc, and the free curve are obtained, and these are stored as character font data. Although it depends on the number of strokes and the complexity, data of about 300 to 500 bytes per character is sufficient. If the image is still a black and white image, there is data for all pixels constituting the screen. For example, assuming 256 pixels vertically and horizontally, 8k
Although there are bytes, the present invention can greatly compress data. Conversely, the data can be read out to reproduce straight lines, arcs, and free curves with reference to the junction. It can be reproduced to any size and any position by calculation.
【0023】[0023]
[A.画像記憶装置1]これは紙などに書かれた文字フ
ォントを光学的手段によって読み取り、画素毎に分解さ
れた情報として記憶するものである。文字は着色されて
いても良いが必要なのは白黒の2値画像である。例えば
着色部は黒となり、文字を構成しない部分を白として2
値画像にし、これを画素ごとに記憶させる。[A. Image storage device 1] This is a device which reads a character font written on paper or the like by optical means and stores it as information decomposed for each pixel. The characters may be colored but what is needed is a black and white binary image. For example, the colored portion is black, and the portion that does not form a character is white,
A value image is stored for each pixel.
【0024】例えばイメ−ジスキャナを用いて256×
256ドットの精度で入力される。ドットの数はもちろ
ん任意であり、ドット数の多いほうが文字フォントとし
て記憶されるものは高品質になるはずであるが、ドット
が多いと計算時間、記憶容量が大きくなるので、適当な
ドット数の画像読み取り装置を用いれば良い。ドット
(画素)毎にこれが白画素か黒画素かが区別されて一時
的に記憶されるのである。以後一つの画素を点と言うこ
とがある。また連続する一続きの黒画素列を点列とい
う。点を示すために画面上での画素の横方向の番号x
と、縦方向の番号yとをからなる座標(x,y)を用い
る。座標変数には様々なサフィックスを付けて区別す
る。For example, 256 × using an image scanner
It is input with an accuracy of 256 dots. Of course, the number of dots is arbitrary, and the higher the number of dots, the higher the quality of the character font stored should be.However, if the number of dots is large, the calculation time and storage capacity will be large. An image reading device may be used. For each dot (pixel), whether it is a white pixel or a black pixel is distinguished and temporarily stored. Hereinafter, one pixel may be referred to as a dot. A continuous black pixel row is referred to as a dot row. Horizontal number x of a pixel on the screen to indicate a point
And a coordinate (x, y) consisting of a vertical number y. Coordinate variables are distinguished by adding various suffixes.
【0025】[B.輪郭点列抽出装置]輪郭点列抽出装
置は読み取った文字の輪郭線を求める操作を行うもので
ある。大まかな流れを先に述べる。 画像デ−タを左上から右下に走査し、まだ見付けられ
ていない輪郭点を見付ける(図4に示す)。 輪郭線を一周するまで次の輪郭点を探索する。輪郭点
は2でマ−クされる。 画像デ−タの右下のデ−タまで調べる。[B. Contour Point String Extraction Apparatus] The contour point string extraction apparatus performs an operation for obtaining a contour line of a read character. The general flow is described first. The image data is scanned from upper left to lower right to find a contour point that has not been found yet (as shown in FIG. 4). The next contour point is searched until it goes around the contour line. The contour points are marked at 2. Check up to the lower right data of the image data.
【0026】この操作を行うにあたってまず定義から説
明する。画像は画素の集まりで表される。画素は画面内
での座標で指示される。画素の座標は行(横方向)方向
の座標をxとし、列(縦)方向の座標をyとする。左上
の座標はx=0、y=0である。横にX、縦にYの画素
があるとすると、xは0〜X−1、yは0〜Y−1の値
を取る。座標系は図2のように右下向きのものである。
画像自体は文字を入力したものであるので、白と黒の2
値しかない。画素ごとに白黒の指定をする。In performing this operation, the definition will be described first. An image is represented by a collection of pixels. Pixels are indicated by coordinates on the screen. The coordinates of the pixel are x in the row (horizontal) direction and y in the column (vertical) direction. The coordinates at the upper left are x = 0 and y = 0. Assuming that there are pixels of X horizontally and Y vertically, x takes a value of 0 to X-1, and y takes a value of 0 to Y-1. The coordinate system is directed downward and to the right as shown in FIG.
Since the image itself is a character input, two black and white
There is only value. Specify black and white for each pixel.
【0027】○二値画像入力 特性関数gxyをつぎのように定義する。 (i)O≦x<X−1、O≦y<Y−1における座標(x,y)に点(黒画素) が存在する場合 gxy=1 (1) (ii)その他の場合(その点に黒画素が存在しない) gxy=0 (2) これは画像を2値で表現したもので、白の部分は0、黒
の部分は1とする。O Binary image input A characteristic function gxy is defined as follows. (I) When a point (black pixel) exists at the coordinates (x, y) at O ≦ x <X−1 and O ≦ y <Y−1 g xy = 1 (1) (ii) In other cases (the G xy = 0 (2) This is a binary representation of the image, where white is 0 and black is 1.
【0028】○輪郭点列の表現 輪郭点列というは黒画素の固まりの外周に存する黒画素
の左右上下斜めに連続した点の列である。外部だけでな
く内部にも輪郭点列がある。閉じられた一つの点列を輪
郭点列という。輪郭点列の総数をUとする。U個の輪郭
点列には0からU−1の番号が付けられる。u番目の輪
郭点列の輪郭点の総数をN(u)で表す。ひとつの輪郭
点列において連続する点に番号kを付す。kは0〜N
(u)−1の整数である。Expression of a contour point sequence A contour point sequence is a sequence of black pixels on the outer periphery of a cluster of black pixels that are connected to the left, right, up, down, and diagonally. There is a contour point sequence not only on the outside but also on the inside. One closed point sequence is called a contour point sequence. Let U be the total number of contour point sequences. The U contour point sequences are numbered from 0 to U-1. The total number of contour points in the u-th contour point sequence is represented by N (u). A number k is assigned to consecutive points in one outline point sequence. k is 0 to N
(U) is an integer of -1.
【0029】u番目の輪郭点列のk番目の輪郭点の座標
を(xk u ,yk u )によって表現する。全輪郭点は {(xk u ,yk u )}k=0 N u -1 u=0 U-1 (3) によって表現される。k=0 N u -1 というのは点列番号k
が0からN(u)−1までの値を取りうるということで
ある。N(u)−1は括弧を含みこれは1/4角にでき
ないから変数のサフィックスとなるときは、括弧を除去
しN u −1と書いている。N u −1=N(u)
−1である。サフィックスであるので上下に書くべきで
あるがこれができないので左下と右上に分けて付す。
u=0 U-1は輪郭点列群の番号uが0〜U−1の値を取ると
いうことである。また輪郭点列の番号uは変数の右肩に
括弧を付けて示すべきであるが括弧が1/4角にできな
いから括弧を省く。実際には図面に示すように括弧が付
いているのである。変数のu乗ではない。これは媒介変
数t、独立変数x、yなどに共通である。uは群番号で
あり変数の右肩にその儘書くが本当が括弧が付いている
のである。[0029] expressed by the u th k-th coordinate of the contour points of the contour point sequence (x k u, y k u ). All contour points are represented by {(x k u, y k u)} k = 0 N u -1 u = 0 U-1 (3). k = 0 N u -1 because the point sequence number k
Can take on values from 0 to N (u) -1. N (u) -1 includes parentheses, which cannot be made into a quarter-square, so when it becomes a variable suffix, the parentheses are removed and written as Nu-1. N u -1 = N (u)
It is -1. Since it is a suffix, it should be written on the top and bottom, but since this is not possible, it is divided into lower left and upper right.
u = 0 U-1 means that the number u of the contour point sequence group takes a value of 0 to U-1 . The number u of the contour point sequence should be indicated by adding parentheses to the right shoulder of the variable. However, since the parentheses cannot be formed into a quarter square, the parentheses are omitted. In fact, parentheses are attached as shown in the drawing. It is not a variable raised to the power of u. This is common to the parameter t and the independent variables x and y. u is a group number and is written as it is on the right shoulder of the variable, but the parenthesis is actually attached.
【0030】○チェ−ンコ−ド ある画素を中心として、廻りの8点の画素に右回りの番
号0〜7を付けて示す。これは輪郭点における点列の連
続を示すために使う。また連続の状態を調べるためにも
用いる。cをチェ−ンコ−ドとして次の関数α(c)と
β(c)とを定義する。関数α(c)は、(Circle code) Around a certain pixel, the surrounding eight pixels are indicated by clockwise numbers 0-7. This is used to indicate the continuation of the point sequence at the contour points. It is also used to check the continuous state. The following functions α (c) and β (c) are defined using c as a chain code. The function α (c) is
【0031】 c=3,4,5のとき、α(c)=−1 (4) c=2,6 のとき α(c)=0 (5) c=0,1,7のとき α(c)=1 (6)When c = 3, 4, 5, α (c) = − 1 (4) When c = 2,6 α (c) = 0 (5) When c = 0,1,7, α ( c) = 1 (6)
【0032】とし、関数β(c)は、And the function β (c) is
【0033】 c=5,6,7のとき β(c)=−1 (7) c=0,4 のとき β(c)=0 (8) c=1,2,3のとき β(c)=1 (9)When c = 5,6,7 β (c) = − 1 (7) When c = 0,4 β (c) = 0 (8) When c = 1,2,3 β (c) ) = 1 (9)
【0034】である。これらの定義に基づいて輪郭線の
抽出を行う。先述のように図4に示すごとく全体の画像
を左上から右方向に走査して黒画素を見いだす。輪郭線
は二値画像のgxy=1となる部分の外周の画素である
が、これを1周しながら点列の座標を記憶していく。1
周する方向はその領域の外側を回る時は時計廻りに廻
り、内側を回るときは反時計廻りに回ることとする。図
5に輪郭点を回る順序を示す。勿論反対にしても良いの
であるがここではそのように決める。Is as follows. An outline is extracted based on these definitions. As described above, as shown in FIG. 4, the entire image is scanned from upper left to right to find black pixels. The outline is a pixel on the outer periphery of the portion of the binary image where g xy = 1, and the coordinates of the point sequence are stored while making a round around this. 1
The direction of rotation is clockwise when turning outside the area, and counterclockwise when turning inside. FIG. 5 shows the order of turning the contour points. Of course, it is possible to do the opposite, but here we will decide.
【0035】さて、ある輪郭点列のある輪郭点が分かっ
たとする。此の次の輪郭点を求めるにはこの輪郭点を中
心として、前回の輪郭点から時計廻りに8個の近傍画素
を探索する。図6に一例を示す。☆印を付したものが最
新の輪郭点であるとする。時計廻りに次の輪郭点を探索
するが、番号1、2、3、4、5までは全て白画素gxy
=0であるので該当しない。6番めの画素が黒画素であ
り、gxy=1であるから輪郭点である。こうして次の輪
郭点が求まったので、6番目の画素を中心に据えてその
次の輪郭点を求める。Now, it is assumed that a certain contour point in a certain contour point sequence is found. To find the next contour point, eight neighboring pixels are searched clockwise from the previous contour point around this contour point. FIG. 6 shows an example. Assume that the one marked with ☆ is the latest contour point. The next contour point is searched clockwise, but all the pixels up to the numbers 1, 2, 3, 4, and 5 are white pixels g xy
Not applicable because = 0. The sixth pixel is a black pixel, and since g xy = 1, it is a contour point. Since the next contour point has been obtained in this way, the next contour point is obtained centering on the sixth pixel.
【0036】以下同様の手順によって輪郭点を次々に求
めることができる。近傍8画素から次の輪郭点を求める
ので連続して輪郭点列が得られる。輪郭点はgxyの値を
2とする。これによって内部の黒画素gxy=1と区別で
きる。またgxy=1の画素が画面上で局在している筈で
あるから輪郭点を逐次求めてゆくと最初の輪郭点に戻
る。つまり輪郭点列は環状になっている。このような輪
郭点列は全部でU個あるとしている。輪郭点列の番号は
uで示すが、ある輪郭点列uでの点の番号はkである。Thereafter, contour points can be obtained one after another by the same procedure. Since the next contour point is obtained from eight neighboring pixels, a sequence of contour points is continuously obtained. For the contour point, the value of gxy is set to 2. Thereby, it can be distinguished from the internal black pixel g xy = 1. In addition, since the pixel of g xy = 1 must be localized on the screen, the contour point is sequentially obtained, and returns to the first contour point. That is, the contour point sequence is annular. It is assumed that there are a total of U such contour point sequences. The number of the contour point sequence is indicated by u, but the point number in a certain contour point sequence u is k.
【0037】一つの輪郭点列が確定すると、図4の走査
を再開し、次の輪郭点を捜す。これが分かると同様の手
順によって輪郭点の座標を確定してゆく。複数の輪郭点
列があるときは当然左上からこれらの処理を行うことに
なり順に0、1、・・(U−1)の輪郭点列番号を付
す。内部に穴のあるような場合も図5に示すように何回
目かの走査で何れかの点が検出される。図6に示すよう
な隣接点の探索を行うが、穴の場合は図5のように輪郭
点を反時計廻りに見い出してゆくことになる。こうして
外部の輪郭点列も内部の輪郭点列も探索されて点列の座
標が記憶される。これらのgxyの値は2になっている。When one outline point sequence is determined, the scanning shown in FIG. 4 is restarted, and the next outline point is searched for. When this is understood, the coordinates of the contour point are determined in the same procedure. When there are a plurality of contour point sequences, these processes are performed from the upper left, and contour point sequence numbers of 0, 1,... (U-1) are assigned in order. Even when there is a hole inside, any point is detected in several scans as shown in FIG. A search for an adjacent point as shown in FIG. 6 is performed. In the case of a hole, a contour point is found counterclockwise as shown in FIG. In this manner, both the outer contour point sequence and the inner contour point sequence are searched, and the coordinates of the point sequence are stored. The value of these g xy is 2.
【0038】輪郭点列の探索は勿論gxy=1の画素につ
いて行われるのであるから、このようにすると外周と内
周の幅が1画素分しかない場合は少し問題が起きる。図
7にこれを示す。(a)は1画素分の幅しかない環状の
パタ−ンである。gxy=1の画素が正方形状に分布す
る。幅が2以上あれば前述の手順で外部輪郭点列、内部
輪郭点列が問題なく求まる。しかし幅が1画素である
と、まず外周の輪郭点列を決めた後gxy=1の画素が輪
郭点であるのでgxy=2となる。輪郭点の探索がgxy=
1の画素についてなされるのでgxy=2ではもはや輪郭
点列とはならない。内周の輪郭点列が認識されず、穴が
無視される。これではいけないので、その対策として、
次の輪郭点が現在のものより下にあるときはマ−ク(g
xy→2)を行わないこととする。この点はgxy=1のま
ま残る。図7の(b)で右中段の値が1であるのはこれ
を示す。値が1であるので内輪郭点の出発点として発見
される。この点から出発して内輪郭点列を抽出すること
ができる。結局内部の穴が無視されることなく内外の輪
郭点列を抽出することが出来る。図7(c)はこれを示
す。Since the search for the contour point sequence is performed for the pixel of g xy = 1, a problem arises a little if the width between the outer circumference and the inner circumference is only one pixel. FIG. 7 shows this. (A) is an annular pattern having a width of only one pixel. Pixels of g xy = 1 are distributed in a square shape. If the width is 2 or more, the outer contour point sequence and the inner contour point sequence can be obtained without any problem by the above-described procedure. However, if the width is one pixel, g xy = 2 since the pixel of g xy = 1 is a contour point after the outline point sequence is first determined. The search for contour points is g xy =
Since the processing is performed for one pixel, a contour point sequence is no longer obtained when g xy = 2. The inner contour line is not recognized and the holes are ignored. Since this is not a good idea,
If the next contour point is below the current one, the mark (g
xy → 2) is not performed. This point remains g xy = 1. This is indicated by the fact that the value in the middle right is 1 in FIG. 7B. Since the value is 1, it is found as the starting point of the inner contour point. Starting from this point, an inner contour point sequence can be extracted. After all, the inner and outer contour point sequences can be extracted without ignoring the inner hole. FIG. 7C shows this.
【0039】輪郭点列が確定すれば、輪郭点列で囲まれ
る内部の黒画素はこれの領域を規定するためには最早必
要でなくなる。そこで内部の黒画素は記憶する必要がな
い。これによって記憶すべきデ−タの量を先ず減らすこ
とができる。Once the outline point sequence is determined, the inner black pixels surrounded by the outline point sequence are no longer required to define the area. Therefore, there is no need to store the internal black pixels. This can first reduce the amount of data to be stored.
【0040】[C.輪郭点列記憶装置]輪郭点列記憶装
置は前段で求めた輪郭点列を記憶する装置である。(x
k u ,yk u )k=0 N u -1 u=0 U-1 という形でこれを記憶
する。先述のように、Uが全点列の数であり、uが点列
に付けた番号である。点列uにおける点の数はN(u)
であり、kがこれに付けた点番号である。このような事
をk=0 N u -1 u=0 U-1 によって表現する。(xk u ,yk
u )はu番目の点列のk番目の点のx、y座標である。
繰り返すが、N(u)−1をサフィックスとしては、N
u −1と書いている。[C. Contour Point Sequence Storage Device] The contour point sequence storage device is a device for storing the contour point sequence obtained in the preceding stage. (X
k u, and stores this in the form of y k u) k = 0 N u -1 u = 0 U-1. As described above, U is the number of all point sequences, and u is the number assigned to the point sequence. The number of points in the point sequence u is N (u)
And k is the point number assigned to this. Such things expressed by k = 0 N u -1 u = 0 U-1. (X k u, y k
u ) is the x, y coordinates of the kth point in the uth point sequence.
Again, if N (u) -1 is the suffix,
u -1 is written.
【0041】[D.デ−タ近似機構A]デ−タ近似機構
は二つある。これは最初のものであるが、区別するため
にAと付記する。これは仮に輪郭点列の曲率の大きいと
ころを求め接合点を求めるために必要とされる。曲率を
求めるには、離散的な点の内、幾つかをデ−タとして採
用しこれから求めることもできる。本発明はこのような
離散的曲率を採用しても実行できる。しかしここではデ
−タを連続関数で近似してからこれを2階微分して曲率
を求めるようにする。このための近似がここでのデ−タ
近似である。[D. Data approximation mechanism A] There are two data approximation mechanisms. This is the first one, but is appended with A to distinguish it. This is necessary for temporarily finding a place where the curvature of the outline point sequence is large and for finding a joint point. In order to determine the curvature, some of the discrete points can be adopted as data and can be determined from this. The present invention can be practiced even with such discrete curvatures. However, here, the data is approximated by a continuous function, and then the second order is differentiated to obtain the curvature. The approximation for this is the data approximation here.
【0042】曲率を求めるのであるから、xを独立変
数、yを従属変数としてyのxによる2階微分を求める
というのが通常の方法であろう。しかしそうするとx、
yについて取り扱いが非対称になって好ましくない。本
発明ではそのような方法を採用しない。Since the curvature is obtained, the usual method would be to obtain the second derivative of y with x using x as an independent variable and y as a dependent variable. But then x,
As for y, handling becomes asymmetric, which is not preferable. The present invention does not employ such a method.
【0043】ここでは独立変数をtとし、従属変数を
x、yとし前記の連続群ごとの輪郭点列のx、y座標を
tを独立変数、xとyを従属変数とする2次の区分的多
項式で近似し、近似精度が所定範囲になるまで最小二乗
法近似を繰り返し輪郭点列の群ごとの近似多項式を求め
るものである。これは最終的なデータを得ようとするも
のではなく、接合点を求めるものである。In this case, the independent variable is t, the dependent variables are x and y, and the x and y coordinates of the contour point sequence for each of the continuous groups are t = independent variables and x and y are dependent variables. The approximation is performed using a statistical polynomial, and the least squares approximation is repeated until the approximation accuracy falls within a predetermined range to obtain an approximate polynomial for each group of contour point sequences. This is not for obtaining final data but for obtaining a junction point.
【0044】先述のように群uの点列kの座標を
(xk u,yk u)とかく。これは前記の輪郭点列記憶機構
から得られる。図9にここでの操作を示す。まず輪郭点
列記憶装置から輪郭点列の(xk u,yk u)を全て読み込
む。これを媒介変数へ分解する。つまり各点について、
2つの(xk u,yk u)に共通の媒介変数tを対応させ
る。これにも添え字を付けてtk uとする。二次元情報で
あったがこれを一次元問題にするために媒介変数を用い
るのである。図9の2段目はこれを示す。[0044] (x k u, y k u ) the coordinates of the points column k of the group u as previously described meantime. This is obtained from the outline point sequence storage mechanism described above. FIG. 9 shows the operation here. Read first from the contour point sequence storage of the contour point sequence (x k u, y k u ) all. This is decomposed into parameters. In other words, for each point,
Two (x k u, y k u ) is the corresponding common parameter t on. This also with a subscript and t k u. Although it is two-dimensional information, it uses parametric variables to make this a one-dimensional problem. The second row in FIG. 9 illustrates this.
【0045】媒介変数を用いることにより、(tk u ,
xk u )と(tk u ,yk u )の二つの座標の組み合わ
せが各輪郭点列の各点に対応する。以後は2変数につい
て同じ事をするので一つについて説明する。群uでの輪
郭点列(tk u ,xk u )を近似するtの関数Sx
(t)を、2次のフル−エンシ−関数系{ψm }を底と
する一次結合として与える。Sx (t)によって群uで
のtの関数としてのxを近似するのである。同様にSy
(t)によって群uでのyを近似する。近似関数として
適切であるかどうかの評価は最小二乗法で誤差が所定の
範囲内であるかどうかということで確かめる。[0045] By using the parametric, (t k u,
x k u) and (t k u, a combination of the two coordinate y k u) corresponding to each point of each contour point sequence. Hereinafter, the same operation is performed for two variables, and only one of them will be described. Contour point sequence in the group u (t k u, x k u) approximates the t function S x
(T) is given as a linear combination based on a second-order full-energy function system { m }. S x (t) approximates x as a function of t in group u. Similarly, S y
(T) approximates y in group u. The evaluation as to whether it is appropriate as an approximation function is made by checking whether the error is within a predetermined range by the least square method.
【0046】注意すべきことは、Sx (t)、Sy
(t)によって輪郭点列群uの全体の閉曲線を一挙に近
似するということである。接合点を途中にもつのではな
く全体を一つの関数Sx (t)で近似する。このように
するのは未だ接合点が決まっていないからである。先に
述べたように曲率をもとめるにはこのように近似による
ことなくもっと簡便な方法がある。それは輪郭点列のデ
−タを直接に用いて離散的曲率を求める方法である。本
発明を行うにはこのような離散曲率によっても良い。し
かしここではそれについては説明せず、近似関数Sx
(t)、Sy (t)の生成について説明する。It should be noted that S x (t), S y
By (t), the entire closed curve of the outline point sequence group u is approximated at once. The whole is approximated by one function S x (t) instead of connecting the joining points in the middle. This is because the junction has not been determined yet. As described above, there is a simpler method for determining the curvature without such approximation. This is a method of obtaining a discrete curvature by directly using data of a contour point sequence. In order to carry out the present invention, such a discrete curvature may be used. However, it is not described here, and the approximation function S x
The generation of (t) and S y (t) will be described.
【0047】Sx (t)は非周期m次のフル−エンシ−
関数ψk を基底として展開する。 Sx (t)=Σk=-m M+m Ck xψk (t) (10)S x (t) is an aperiodic m-th order full-energy
Expand using the function 展開k as a basis. S x (t) = Σ k = -m M + m C k x ψ k (t) (10)
【0048】フル−エンシ−関数というのは本発明者が
命名した関数名である。次数mは多項式の次数に対応す
る。Mは次元数である。一般にm次のフル−エンシ−関
数は、定義域を[0,T]とし、パラメ−タをkとし、
このパラメ−タをサフィックスとして付けて表す。Ck x
は線形一次結合の係数である。ψk 自体がkの近傍で値
を持つ多項式である。The full-function function is a function name named by the present inventor. The degree m corresponds to the degree of the polynomial. M is the number of dimensions. In general, the m-th order full-energy function has a domain of [0, T], a parameter of k,
This parameter is represented with a suffix. C k x
Is the coefficient of linear linear combination. ψ k itself is a polynomial having a value near k.
【0049】 ψk (t)=3(T/M)-mΣq=0 m+1(−1)q {t−(k+q)(T/M)} m + /{q!(m+1−q)!} (11)Ψk (T) = 3 (T / M)-mΣq = 0 m + 1(-1)q {T- (k + q) (T / M)} m + / {Q! (M + 1-q)! } (11)
【0050】但し、k=−m,−m+1,・・・,0,
1,2,・・・,m+MWhere k = −m, −m + 1,..., 0,
1,2, ..., m + M
【0051】ここでm乗の下に付したプラスは、括弧内
が負のときは0で、正の時にはm乗であるということ
で、次のような定義である。The plus added below the m-th power means that the value in the parenthesis is 0 when the value in the parenthesis is negative, and that the value is m-th when the value is positive, and is defined as follows.
【0052】 (t−a)m +=(t−a)m t>a、 (12) 0 t≦a (13)(T−a) m + = (t−a) m t> a, (12) 0 t ≦ a (13)
【0053】基底関数ψk は区分番号k〜k+m+1ま
で有限の値を持ちその両側は0になる山形の関数であ
る。これは{t−(k+q)(T/M)}m +のような0
から立ち上がるm次関数を一つずつ座標をよこにずらせ
て(qを一つずつ増やす)これを重ね合わせる形になっ
ている。t>(k+m+1)(T/M)の時に恒等的に
0でなければならない。この条件によって重ね合わせの
係数が(−1)q /{q!(m+1−q)!}というふ
うに決まる。領域の大きさTは輪郭点列群の点の数N
(u)に等しくするのが簡単であるが、比例するものと
して定義しても良い。このようにフル−エンシ−関数を
用いて、輪郭点列を近似するが、T/Mの間隔を持つ分
割点が多数あるので接合点がなくても近似することがで
きる。近似の度合いを高めるにはフル−エンシ−関数の
次数mを高めればよい。しかし次数が高いと計算の回数
が増えるので処理時間が掛かる。The basis function ψ k is a chevron-shaped function having finite values from section numbers k to k + m + 1 and having zero on both sides. This is 0 such as {t- (k + q) (T / M)} m +
The coordinates of the m-th order function rising from are shifted one by one (q is increased one by one), and these are superimposed. Must be equal to 0 when t> (k + m + 1) (T / M). Under this condition, the superimposition coefficient is (−1) q / {q! (M + 1-q)! It is determined as}. The size T of the area is the number N of points in the outline point sequence group.
Although it is easy to make it equal to (u), it may be defined as being proportional. As described above, the contour point sequence is approximated by using the full-energy function. However, since there are many division points having a T / M interval, the contour point sequence can be approximated without a joint point. To increase the degree of approximation, the order m of the full-energy function may be increased. However, when the degree is high, the number of calculations increases, so that processing time is required.
【0054】発明者の主張は、多くの自然界の物理量の
変動を表す関数が、1次、2次のフル−エンシ−関数の
線形結合として表されるということである。フル−エン
シ−関数は完備直交規格化関数ではない。もしもmとし
て∞までの関数を採用し、これの一次結合とすれば任意
の関数が表現しうる。これは疑いがない。しかし本発明
者のいうのはそうではなく、僅かな次元数のフル−エン
シ−関数によって自然界の物理量の変動を書き下せると
いうことなのである。ここではm=2のみを採用する。
これによって文字などの輪郭線は過不足なく表現でき
る。勿論本発明はm=3以上のフル−エンシ−関数を用
いて構成できる。The inventor's claim is that many functions representing variations in physical quantities in the natural world are expressed as linear combinations of first-order and second-order full-energy functions. The full-ency function is not a complete orthogonal normalization function. If a function up to ∞ is adopted as m and this is a linear combination, any function can be expressed. This is no doubt. However, the present inventor does not say so, but it is possible to write down the variation of the physical quantity in the natural world with a full-energy function having a small number of dimensions. Here, only m = 2 is adopted.
Thus, outlines of characters and the like can be expressed without excess and deficiency. Of course, the present invention can be configured using a full-energy function of m = 3 or more.
【0055】もっとも相応しい関数系を採用してこれの
一次結合によって物理量の変動を書き表すとすればもっ
とも数少ない関数で最適の近似を得ることができる。関
数系が良くないと多くの関数を底として一次結合の式を
展開しなければならない。これでは良い近似を得ること
ができないし、最終的なデ−タの数も多くなって記憶装
置の負担も大きい。またこれを読み出して利用するのも
容易でない。最適関数系を選ぶべきである。m=2が最
適と本発明者は思う。If the most appropriate function system is adopted and the variation of the physical quantity is expressed by the linear combination, an optimal approximation can be obtained with the fewest functions. If the function system is not good, you have to expand the expression of linear combinations based on many functions. In this case, a good approximation cannot be obtained, and the number of final data increases, resulting in a heavy load on the storage device. Also, it is not easy to read and use this. You should choose the optimal function system. The present inventor thinks that m = 2 is optimal.
【0056】本発明者はここではm=2のフル−エンシ
−関数を用いる。図40(a)に2次のフル−エンシ−
関数の概略を示す。これは3つの区間にわたる2次曲線
である。両端での立ち上がり立ち下がりは2次関数であ
る。中央の点で最大であるがこの近傍でも2次関数であ
る。0次のフル−エンシ−関数は図40(b)に示すよ
うに1区間のみで一定値をとる箱型の関数である。1次
フル−エンシ−関数は(c)に示すよう2区間にまたが
る三角形状の関数である。3次のフル−エンシ−関数は
4つの区間におよぶ関数である。一般にm次フル−エン
シ−関数は、(m+1)区間に渡って存在し中央部で極
大を持つ滑らかな(m≧2)関数である。両端ではm乗
で立ち上がり立ち下がる。中央部での関数形はやはりm
乗である。基底ψk のパラメ−タkが一つふえるともと
のものを右へ一つ平行移動したことになる。ある区間で
なんらかの変動をm次区分的多項式で近似すると、その
区間で値を持つ関数の基底が(m+1)個あるというこ
とである。m=3以上のものを採用することができるが
ここではm=2とする。つまり3つの区間に渡って値が
あり、極大と端点で2次関数的である。上の式はm=2
のとき、The inventor uses a full-energy function of m = 2 here. FIG. 40 (a) shows the secondary full-energy
Here is an outline of the function. This is a quadratic curve over three sections. The rise and fall at both ends is a quadratic function. It is the maximum at the center point, but also a quadratic function in the vicinity. The zero-order full-energy function is a box-shaped function that takes a constant value only in one section as shown in FIG. The primary full-energy function is a triangular function extending over two sections as shown in FIG. The third-order full-energy function is a function over four intervals. Generally, the m-th order full-energy function is a smooth (m ≧ 2) function that exists over the (m + 1) section and has a maximum at the center. Both ends rise and fall to the m-th power. The function form at the center is m
It is a power. This means that the parameter k of the base ψ k has increased by one and the original one has been translated by one to the right. When some variation is approximated by an m-th order piecewise polynomial in a certain section, there are (m + 1) function bases having values in the section. Although m = 3 or more can be adopted, m = 2 here. That is, there is a value over three sections, and it is quadratic at the local maximum and the end point. The above equation is m = 2
When,
【0057】 Sx (t)=Σk=-2 M+2 Ck xψk (t) (14)[0057] S x (t) = Σ k = -2 M + 2 C k x ψ k (t) (14)
【0058】 ψk (t)=3(T/M)-2Σq=0 3(−1)q {t−(k+q)(T/M)}2 + /{q!(3−q)!} (15)Ψ k (t) = 3 (T / M) −2 Σ q = 0 3 (−1) q {t− (k + q) (T / M)} 2 + / {q! (3-q)! } (15)
【0059】となる。基底関数は{t−(k+q)(T
/M)}2 +で示される横方向へT/Mずつずらせた4つ
の0から立ち上がる2次関数の重ね合わせである。細区
分の数がkからk+3まで値のある関数である。k+3
以上で恒等的に0であるために重ね合わせの係数が(−
1)q/{q!(3−q)!}となる。基底関数の数は
M+5個である。Mは全区間の分割数でありこれを近似
の次元数と呼ぶ。これとフルーエンシー関数の次数mと
を混同してはいけない。図41によって説明する。
(a)にデータ点を示す。データの変域が0〜Tであ
る。(b)は基底関数が3つであり、次元数Mが1の場
合を示す。この場合基底関数が少なすぎるので係数の数
も少なく良い近似を与えない。しかし次元数Mを増やし
てゆくと、(c)に示すようにどんな複雑な変化でもそ
れなりに近似できる。近似の程度はこれがどれほどもと
の輪郭点列(xk u,yk u)に近いかということで判断で
きる。最小二乗法によりこれを評価するが、これはIs as follows. The basis function is Δt− (k + q) (T
/ M)} is a superposition of the quadratic function rising from four 0-shifted laterally by T / M is the two +. The number of subdivisions is a function with values from k to k + 3. k + 3
As described above, since the constant is 0, the superimposition coefficient becomes (−
1) q / {q! (3-q)! It becomes}. The number of basis functions is M + 5. M is the number of divisions of all sections, and this is called an approximate dimension number. This should not be confused with the order m of the fluency function. This will be described with reference to FIG.
(A) shows the data points. The domain of the data is 0 to T. (B) shows a case where there are three basis functions and the number of dimensions M is one. In this case, since the number of basis functions is too small, the number of coefficients is too small to give a good approximation. However, as the number of dimensions M is increased, any complicated change can be approximated as shown in FIG. The degree of approximation can be judged by this how the original contour point sequence (x k u, y k u ) that is closer to. This is evaluated by the least squares method, which is
【0060】 Q=Σ{Sx (tk u )−xk u }2 +{Sy (tk u )−yk u }2 (16) [0060] Q = Σ {S x (t k u) -x k u} 2 + {S y (t k u) -y k u} 2 (16)
【0061】を最小にするということである。積算の範
囲は輪郭点列群uの点全部である。ここでは曲率を求め
るだけであるから精度はそれ程高くなくても良い。後に
説明する第2回目のデ−タ近似Bでも同様の近似をす
る。その場合精度はより高いものとする。この部分のフ
ロ−チャ−トを図10に示す。係数Ch をきめるのであ
るが、これの階数がMである。あるMを規定すると、
(10)から係数Ch xは一義的に決まる。しかしこの係
数が最小二乗法による制限を満たすとは限らない。この
場合は次元数Mを一つ増加させる。そして所望の近似範
囲まで達するとこれで次元数Mでの係数Ch を確定す
る。Is to be minimized. The range of integration is all points of the outline point sequence group u. Here, since the curvature is merely obtained, the accuracy need not be so high. A similar approximation is made in a second data approximation B described later. In that case, the accuracy is assumed to be higher. FIG. 10 is a flowchart of this part. Although determine the coefficient C h, this rank is M. If we define a certain M,
Coefficient C h x (10) is uniquely determined. However, this coefficient does not always satisfy the restriction by the least squares method. In this case, the number of dimensions M is increased by one. And this in determining the coefficient C h of the dimension number M reaches to the desired approximation range.
【0062】(10)において左辺のSx (t)が、t
=tk であるときに、Sx (t)=xk u となるべきで
ある。そこで(10)にこれを代入して、In (10), S x (t) on the left side is t
= When it is t k, should be the S x (t) = x k u. So, substituting this for (10),
【0063】 xk u = Σh=-2 M+2 Ch xψh (tk u ) (17)[0063] x k u = Σ h = -2 M + 2 C h x ψ h (t k u) (17)
【0064】これにψw (tk u )を掛けて、点列kに
ついて加算する。[0064] over this to the ψ w (t k u), adding the point sequence k.
【0065】 Σk=0 N-1ψw (tk u )xk u =Σk=0 N-1Σh=-2 M+2 Ch xψh (tk u )ψw ( tk u )=Σh=-2 M+2 Σk=0 N-1ψh (tk u )ψw (tk u )Ch x (18)[0065] Σ k = 0 N-1 ψ w (t k u) x k u = Σ k = 0 N-1 Σ h = -2 M + 2 C h x ψ h (t k u) ψ w (t k u) = Σ h = -2 M + 2 Σ k = 0 N-1 ψ h (t k u) ψ w (t k u) C h x (18)
【0066】ここで2番目の式から3番目の式への変化
は積算の順序を置き換えたものである。有限数列である
ので積算順は自由に変更できる。Here, the change from the second expression to the third expression replaces the order of integration. Since it is a finite sequence, the order of integration can be freely changed.
【0067】この式の左辺Σk=0 N-1ψw (tk u )xk
u はサフィックスがwである(w=−2,−1,0,・
・,M+2)M+5元の列ベクトルであると考えること
ができる。右辺の前項はフル−エンシ−関数の積の和Σ
k=0 N-1ψh (tk u )ψw (tk u )であるM+5列、
M+5行の正方行列と考えることができる。また右辺の
後項Ch xはM+5列の列ベクトルである。→を文字の上
に付すことができないので、以下ベクトルを表す→は文
字の後に付けることにする。ベクトルbx →、cx →を[0067] The left-hand side of this equation Σ k = 0 N-1 ψ w (t k u) x k
u has a suffix w (w = −2, −1, 0,.
.., M + 2) It can be considered to be a column vector of M + 5 elements. The preceding term on the right side is the sum of the products of the full-ency functions.
k = 0 N-1 ψ h (t k u) ψ w (t k u) in which M + 5 column,
It can be considered as a square matrix of M + 5 rows. The right term Ch x on the right side is a column vector of M + 5 columns. Since → cannot be attached to a character, a symbol representing a vector below will be attached after the character. Vectors b x →, c x →
【0068】 ベクトルcx →= T{C-2 x 、C-1 x 、・・・・Cm+2 x} (19)The vector c x → = T {C −2 x , C −1 x ,..., C m + 2 x } (19)
【0069】 ベクトルbx →= T{Σk=0 N-1ψ-2(tk u )xk u ,Σk=0 N-1ψ-1(tk u ) xk u ・・・,Σk=0 N-1ψM+2 (tk u )xk u } (20)[0069] vector b x → = T {Σ k = 0 N-1 ψ -2 (t k u) x k u, Σ k = 0 N-1 ψ -1 (t k u) x k u ··· , Σ k = 0 N-1 ψ M + 2 (t k u) x k u} (20)
【0070】によって定義する。Tは転置行列であるこ
とを示す。行列GをIs defined by T indicates a transposed matrix. Matrix G
【0071】 G={Ghw}={Σk=0 N-1ψh (tk u )ψw (tk u )} (21)[0071] G = {G hw} = { Σ k = 0 N-1 ψ h (t k u) ψ w (t k u)} (21)
【0072】によって定義する。この間には、Is defined by During this time,
【0073】 bx →=Gcx → (22)B x → = Gc x → (22)
【0074】という式が成立する。これは、ベクトルb
x→を求める式であるが、The following equation holds. This is the vector b
x →
【0075】 cx →=G-1bx → (23)C x → = G −1 b x → (23)
【0076】としてある次元数Mについての係数Ch を
求めることができる。G-1は行列Gの逆行列である。こ
れはxについての計算である。yについても同様に、[0076] coefficient for dimensionality M that is a C h can be obtained. G -1 is the inverse of matrix G. This is a calculation for x. Similarly for y,
【0077】 Sy (t)=Σh=-2 M+2 Ch yψh (t) (24)S y (t) = Σ h = −2 M + 2 C h y ψ h (t) (24)
【0078】 yk u = Σh=-2 M+2 Ch yψh (tk u ) (25)[0078] y k u = Σ h = -2 M + 2 C h y ψ h (t k u) (25)
【0079】 Σk=0 N-1ψw (tk u )yk u =Σk=0 N-1Σh=-2 M+2 Ch yψh (tk u )ψw ( tk u )=Σh=-2 M+2 Σk=0 N-1ψh (tk u )ψw (tk u )Ch y (26)[0079] Σ k = 0 N-1 ψ w (t k u) y k u = Σ k = 0 N-1 Σ h = -2 M + 2 C h y ψ h (t k u) ψ w (t k u) = Σ h = -2 M + 2 Σ k = 0 N-1 ψ h (t k u) ψ w (t k u) C h y (26)
【0080】が成立ち、ベクトルby→、cy→をIs established, and the vectors b y → and c y → are
【0081】 ベクトルcy→=T{C-2 y,C-1 y,・・・,CM+2 y} (26’)The vector c y → = T {C −2 y , C −1 y ,..., C M + 2 y } (26 ′)
【0082】 ベクトルby→=T{Σk=0 N-1ψ-2(tk u)yk u,Σk=0 N-1ψ-1(tk u)yk u, ・・・,Σk=0 N-1ψM+2(tk u)yk u} (27)[0082] vector b y → = T {Σ k = 0 N-1 ψ -2 (t k u) y k u, Σ k = 0 N-1 ψ -1 (t k u) y k u, ·· ·, Σ k = 0 N- 1 ψ M + 2 (t k u) y k u} (27)
【0083】によって定義する。(23)と同様にy成
分についても、Defined by Similarly to (23), for the y component,
【0084】 cy →=G-1by → (28)[0084] c y → = G -1 b y → (28)
【0085】としてある次元数Mについての係数Ch yを
求めることができる。G-1は行列Gの逆行列でxの計算
に用いたものと同一である。図10はこのような事を述
べている。最初は群番号u=0について行う。また近似
の次数Mは1から始める。こうして輪郭点列u=0につ
いて(xk u ,yk u )を近似するSx (t)、Sy
(t)の係数Ch x、Ch yが求まる。これと、(xk u ,
yk u )点との差の二乗の和Qを計算する。The coefficient Ch y for a certain number of dimensions M can be obtained. G -1 is the inverse of the matrix G and is the same as that used in the calculation of x. FIG. 10 describes such a thing. First, the operation is performed for the group number u = 0. The order M of the approximation starts from 1. Thus the contour point sequence u = 0 (x k u, y k u) approximating the S x (t), S y
Coefficient C h x of (t), C h y is obtained. And this, (x k u,
to calculate the sum Q of the squares of the difference between the y k u) point.
【0086】 Q=Σk=0 N-1{Sx (tk u )−xk u }2 +{Sy (tk u )−yk u }2 (29)[0086] Q = Σ k = 0 N- 1 {S x (t k u) -x k u} 2 + {S y (t k u) -y k u} 2 (29)
【0087】これと予め定めた閾値εとを比較する。こ
れは十分に小さい確定した正定数である。ここでは1画
素分の距離にとっている。もしもQ>εであれば近似が
不十分であるということである。そこでこの場合、次元
数Mを1から2に増やす。するとChの数が一つ増え
る。This is compared with a predetermined threshold value ε. This is a sufficiently small determined positive constant. Here, the distance for one pixel is set. If Q> ε, the approximation is insufficient. Therefore, in this case, the number of dimensions M is increased from 1 to 2. Then the number of C h increases one.
【0088】この状態で同じ事を繰り返す。これでもQ
>εであれば、さらにMをひとつ増やす。以下同様に繰
り返して近似を上げてゆき、Q<εとなるようにする。
ここでMと{Ch x}、{Ch y}とを確定する。近似関数
Sx (t)、Sy (t)が求まる。輪郭点列群u=0に
ついて計算できると次はu=1の群について行う。以下
同様に、あるuの値に対して係数を決定すると、次のu
+1の輪郭点列について同様の計算を行う。そしてu=
U−1群まで繰り返して行う。図42によりもう一度こ
の過程を説明する。画面上に「和」という文字が入力さ
れたとする。輪郭点列抽出をすると3つの輪郭点列群が
得られる。左の輪郭点列がu=0、右の「ロ」の部分は
外輪郭点列u=1と内輪郭点列u=2を持つ。画面の左
上の点(0,0)から右方向へ1行ずつ画素の値をスキ
ャンして行く。最初に輪郭線にぶつかった点を(t0
0 ,x0 0 )、(t0 0 ,y0 0 )とし輪郭点列の座標
をtをパラメ−タとして求めてゆく。tの関数として輪
郭点列座標x(t)、y(t)が得られる。2次のフル
−エンシ−関数を用いて近似するとして、まずM=1か
ら出発する。これは全区間[0,1]をひとつの区間と
して扱う。3つの基底関数ψ-2、ψ-1、ψ0 がこの区間
で値を持つ。これの係数3つの値を適当に選ぶ。すると
中段に示す近次曲線がえられる。拡大してみると原デ−
タとの誤差が大きいということが分かる。誤差の2乗の
和によって誤差を評価し近似が不十分な時は、Mを一つ
増やす。次の段ではM=2の例が示される。基底関数が
4つに増える。最下段はM=10の場合を示す。基底関
数の数は12個である。Mが大きくなるにつれて複雑な
曲線を精密に近似できる。ここで説明したのは曲率を求
めるための近似であるが、後程述べるデ−タ圧縮時の近
似ではこのような操作を各区分について行う。以上がデ
−タ近似機構Aである。The same is repeated in this state. Even this is Q
If> ε, M is further increased by one. Thereafter, the approximation is repeated in the same manner, so that Q <ε.
Here, M and { Ch x }, { Ch y } are determined. Approximate functions S x (t) and S y (t) are obtained. When the calculation can be performed for the contour point sequence group u = 0, the following is performed for the group of u = 1. Similarly, when a coefficient is determined for a certain value of u, the next u
The same calculation is performed for the +1 outline point sequence. And u =
Repeat until the U-1 group. This process will be described once again with reference to FIG. It is assumed that the character "Japanese" is input on the screen. When the contour point sequence is extracted, three contour point sequence groups are obtained. The left outline point sequence has u = 0, and the right “b” portion has an outer outline point sequence u = 1 and an inner outline point sequence u = 2. From the upper left point (0,0) on the screen, the pixel values are scanned one row at a time in the right direction. The point that first hits the contour line is (t 0
0 , x 0 0 ) and (t 0 0 , y 0 0 ), and the coordinates of the outline point sequence are obtained using t as a parameter. The outline point sequence coordinates x (t) and y (t) are obtained as a function of t. Assuming that the approximation is performed by using a second-order full-energy function, first, M = 1. This treats all sections [0, 1] as one section. Three basis functions ψ -2 , ψ -1 and ψ 0 have values in this section. The three values of the coefficient are appropriately selected. Then, the near-end curve shown in the middle is obtained. If you expand it,
It can be seen that the error from the data is large. The error is evaluated by the sum of the squares of the error. If the approximation is insufficient, M is increased by one. In the next stage, an example of M = 2 is shown. The number of basis functions increases to four. The bottom row shows the case where M = 10. The number of basis functions is twelve. As M increases, a complicated curve can be approximated more precisely. Although the approximation described above is for obtaining the curvature, such an operation is performed for each section in the approximation at the time of data compression described later. The above is the data approximation mechanism A.
【0089】[E.曲率演算機構]全ての輪郭点列群に
対して近似関数が求まったのでこれを2階微分すること
により各輪郭点列群、各点での曲率を求める。図11が
曲率演算のフロ−チャ−トを示す。輪郭点列群uのk番
目の点(xk u ,yk u )での曲率K(tk u )は、[E. Curvature operation mechanism] Since the approximate function has been obtained for all the contour point sequence groups, this is second-order differentiated to obtain the curvature at each contour point sequence group and each point. FIG. 11 shows a flowchart of the curvature calculation. K-th point of the contour point sequence group u (x k u, y k u) curvature at K (t k u) is
【0090】 K(tk u )={Sx ′(tk u )Sy ′′(tk u )−Sx ′′(tk u )S y ′(tk u )}/{Sx ′(tk u )2 +Sy ′(tk u )2 }3/2 (30)K (tk u ) = {Sx '(Tk u ) Sy '' (Tk u ) -Sx '' (Tk u ) S y '(Tk u )} / {Sx '(Tk u )Two + Sy '(Tk u )Two }3/2 (30)
【0091】によって計算することができる。最初u=
0の輪郭点列群のk=0の点からこの計算を始める。こ
の計算は点毎に行う。つまりk番目の点について計算で
きると次にはk+1番目の点について同様の計算をす
る。ひとつの輪郭点列群での計算が終わると次の輪郭点
列に移る。そして全ての輪郭点列の全ての点について曲
率を求める。Can be calculated by First u =
This calculation is started from the point k = 0 in the group of contour points 0. This calculation is performed for each point. That is, if the calculation can be performed for the k-th point, then the same calculation is performed for the (k + 1) -th point. When the calculation is completed for one outline point sequence group, the process moves to the next outline point sequence. Then, the curvatures are obtained for all the points in all the outline point sequences.
【0092】[E′.近似曲率記憶装置]前段で求めた
曲率K(tk u )を点(輪郭点列群u、点番号k)毎に
記憶する装置である。[E '. Approximate curvature memory] curvature K obtained in the previous stage of (t k u) point (edge point sequence group u, the point number k) is a device for storing for each.
【0093】[F.真円抽出機構]これは近似曲率に基
づいてある輪郭点列が真円であるかそうでないかを判別
し真円を抽出するものである。文字には真円である部分
がかなりある。このような文字フォントの性質を利用す
るものである。これを抽出すると次の利点がある。ひと
つは本来真円であるものがノイズのために少し歪んでい
ても真円としてデ−タ化するのでノイズが落ちてしまい
形状をより正確に決定できる。また円は半径と中心の座
標だけで指定できるのでデ−タ圧縮の点で極めて有効で
ある。[F. Perfect circle extraction mechanism] This is to determine whether a certain contour point sequence is a perfect circle or not based on the approximate curvature and extract a perfect circle. There are quite a few circles in the letters. The characteristics of such a character font are used. Extracting this has the following advantages. In the first case, even if a circle that is originally a circle is slightly distorted due to noise, the data is converted into a true circle, so that the noise drops and the shape can be determined more accurately. Since a circle can be specified only by the coordinates of the radius and the center, it is extremely effective in data compression.
【0094】真円というのはその輪郭点列での各点での
曲率が全て等しいというものである。そのような性質を
使って真円を抽出できる。図12にフロ−チャ−トを説
明する。先ず曲率K(tk u )に関するデ−タを読み込
む。そして各輪郭点列群uが円をなすか否かを調べる。
輪郭点列群uについての平均曲率K u を求める。これ
は単に曲率を平均するものである。群番号uは括弧を付
け(u)とすべきであるがこれはサフィックスに入れる
ことができないから単に、uとしている。図面では括弧
が付いている。A perfect circle means that the curvatures at each point in the outline point sequence are all equal. A perfect circle can be extracted using such a property. FIG. 12 is a flowchart. First de about the curvature K (t k u) - read the data. Then, it is checked whether or not each contour point sequence group u forms a circle.
An average curvature Ku for the contour point sequence group u is determined. It simply averages the curvature. The group number u should be parenthesized (u), but since it cannot be included in the suffix, it is simply u. Parentheses are attached in the drawings.
【0095】 K u ={Σk=0 N-1K(tk u )}/N (31)[0095] K u = {Σ k = 0 N-1 K (t k u)} / N (31)
【0096】これが平均曲率である。曲率の上限ε1 を
決めておき、平均曲率がこれ以上であればこの輪郭点列
群uは真円でないとする。This is the average curvature. Previously determined upper limit epsilon 1 of curvature, the contour point row group u When the average curvature more is not a perfect circle.
【0097】 |K u |>ε1 (32)| K u |> ε 1 (32)
【0098】曲率が極めて大きい点を含む場合である。
円ではなく微分できない点析曲点などに対応する。この
場合群uは真円でないという表示Circle(u)=0をす
る。これに反して平均曲率がε1 より小さければ、群u
は真円である可能性がある。そこでk=0の点から点近
傍での曲率K(tk u )と、平均曲率K u の差の絶対
値を求めこれが一定の閾値ε2 より小さいかどうかを調
べる。This is a case where a point having an extremely large curvature is included.
It corresponds not to a circle but to a dot that cannot be differentiated. In this case, Circle (u) = 0 indicating that the group u is not a perfect circle. If less than 1 mean curvature ε On the contrary, the group u
May be a perfect circle. Therefore the curvature K at the point near the point of k = 0 (t k u) , the absolute value of the difference between the mean curvature K u investigate whether this is a certain threshold epsilon 2 smaller.
【0099】 |K u −K(tk u )|<ε2 (33)| K u −K (t k u ) | <ε 2 (33)
【0100】もしそうであればこれは円の一部である可
能性がある。それで次の点k=1の曲率についても同様
に平均曲率との差の絶対値をもとめε2 と比較する。こ
のように群uの全ての点について順次比較を行う。この
不等式が成り立つ限りこれらの点は円弧の上にある。あ
る点で曲率と平均曲率の差がε2 より大きいとこれはも
はや円弧の上にない。この点を含む輪郭点列群はもはや
真円を形成しない。この群が真円でないという表示Circ
le(u)=0を付ける。If so, this could be part of a circle. Therefore, the absolute value of the difference from the average curvature is similarly obtained for the curvature at the next point k = 1 and compared with ε 2 . In this way, the comparison is sequentially performed for all points of the group u. As long as this inequality holds, these points are on the arc. No difference curvature and mean curvature at a point is greater than epsilon 2 which on longer arc. The outline point sequence group including this point no longer forms a perfect circle. Circ indicating that this group is not a perfect circle
le (u) = 0.
【0101】もしも、群での全ての点について曲率と平
均曲率の差がε2 より小さいと、この輪郭点列は真円で
ある。そこで真円である表示Circle(u)=1を付け
る。このような真円の抽出を全ての輪郭点列群について
0〜U−1まで行う。最後にこれを纏めて群u=0から
群についてCircle(u)=0であるかどうかを調べる。
全ての輪郭点列群uについてCircle(u)=0であれ
ば、この文字フォントにおいて真円はひとつもないとい
うことである。Circle(u)=1のものがあれば、この
群は真円であり、この中心座標(X,Y)と半径rとを
求め、真円記憶装置Gにこれを入力して記憶させる。[0102] If the difference between curvature and average curvature epsilon 2 smaller than for all points in the group, the contour point sequence is a perfect circle. Therefore, the display Circle (u) = 1, which is a perfect circle, is given. The extraction of such a perfect circle is performed for all contour point sequence groups from 0 to U-1. Finally, it is checked whether Circle (u) = 0 for the group from the group u = 0.
If Circle (u) = 0 for all contour point sequence groups u, there is no perfect circle in this character font. If there is a circle (u) = 1, this group is a perfect circle, the center coordinates (X, Y) and the radius r are obtained, and these are input and stored in the perfect circle storage device G.
【0102】[G.真円記憶装置]前段階において求め
た真円の中心座標と半径rを記憶するものである。これ
により群uのデ−タが3つの値で記述できる。文字フォ
ントを対象とするので全ての輪郭点列は閉曲線である。
一重の真円の場合これは内部全体が黒画素で塗り潰され
た円であるので、孤立した円点である。2重の真円の場
合は、2重円の間が黒画素で塗り潰された丸(ぱぴぷぺ
ぽ)などに対応する。[G. Perfect circle storage device] Stores the center coordinates and radius r of the perfect circle obtained in the previous stage. Thus, the data of the group u can be described by three values. Since the character font is targeted, all contour point sequences are closed curves.
In the case of a single perfect circle, this is an isolated circle point because the entire inside is a circle filled with black pixels. In the case of a double perfect circle, the circle between the double circles corresponds to a circle (ぱ ぴ ぷ ぺ ぽ) filled with black pixels.
【0103】[H.接合点位置抽出機構]接合点という
のは直線と直線の継ぎ目、曲線と曲線の継ぎ目、直線と
曲線の継ぎ目などである。異なる勾配の線が接触するの
でこれを接合点というのである。文字フォントを関数近
似する時接合点は極めて重要な役割を果たす。それ故接
合点の役割、接合点の意義、接合点の抽出などに関して
明確な観念を持つことが必要である。本発明は接合点の
正確適切な決定を通じて文字フォントを高品質に維持し
ながら、デ−タ量を最小にすることができるのである。[H. Joining Point Position Extraction Mechanism] The joining points include a joint between a straight line and a straight line, a joint between a curve and a curve, a joint between a straight line and a curve, and the like. Since the lines with different gradients come into contact, this is called a junction. The junction plays a very important role when approximating a character font by function. Therefore, it is necessary to have a clear idea about the role of the junction, the significance of the junction, and the extraction of the junction. The present invention minimizes the amount of data while maintaining high quality character fonts through accurate and proper determination of junctions.
【0104】図13は接合点抽出手続の概略を示す。文
字を入力してこれを画像とし、2値画像にして外周をな
す輪郭点列を抽出する。これによって得た各輪郭点列群
に対して接合点を抽出する。まず明白な接合点を抽出す
る。これは曲率が大きい点として決定できる。これは仮
の接合点であって最適のものでない。又これだけでは全
ての接合点を見いだせない。逆に接合点として不要なも
のも含まれる。FIG. 13 shows an outline of the junction extraction procedure. A character is input, the image is converted into an image, and a binary image is extracted to extract a contour point sequence forming an outer periphery. A joint point is extracted for each group of contour points obtained as described above. First, obvious joint points are extracted. This can be determined as a point having a large curvature. This is a temporary junction and not optimal. Also, this alone does not find all the junctions. Conversely, those unnecessary as junctions are also included.
【0105】従って接合点の指定に関して修正が必要で
ある。その後直角部分の接合点の抽出を行う。これは後
に述べるが文字の二つの直線が交差する時に交差点での
接続を滑らかにするためである。直線の接合点というの
は始点と終点であり、細線であって曲率が大という条件
では現れない接合点を追加するものである。文字の場合
これは殆ど必要ない。Therefore, it is necessary to correct the designation of the joining point. After that, a junction at the right angle portion is extracted. This is to smooth the connection at the intersection when two straight lines of the character intersect, as will be described later. The joining points of the straight lines are the starting point and the ending point, and add joining points that are thin lines and do not appear under the condition that the curvature is large. This is rarely needed for letters.
【0106】反対に不必要な接合点があるのでこれらを
除去する必要がある。一つは直線の中にある接合点であ
る。接合点が直線の半ばにあり直線からの距離が小さい
ときこれを除いても直線を維持できることがある。これ
はノイズによって生じた接合点であるから除去する。も
う一つは円弧の接合点である。本来ひとつの円弧である
べきものが接合点が多くて二つの円弧に分離して現れる
ことがある。これも中間の接合点を除去して円弧を合体
して一つの円弧にする。On the contrary, since there are unnecessary junction points, it is necessary to remove them. One is a junction in a straight line. When the joining point is in the middle of the straight line and the distance from the straight line is small, the straight line may be maintained even if this is removed. Since this is a junction point caused by noise, it is removed. The other is the junction of the arcs. What is supposed to be a single arc may appear as two arcs separated by two junctions due to the large number of joints. This also removes intermediate junctions and combines the arcs into a single arc.
【0107】そして接合点が確定すると各区間を区分的
多項式によって近似する。この区分的多項式の近似は先
にデ−タ近似機構Aで述べたものと同じであるが前回の
ものは近似区間が全輪郭点列群に渡っていた。今度はそ
うでなく接合点ごとに区分的多項式近似を行う。When the joining point is determined, each section is approximated by a piecewise polynomial. The approximation of this piecewise polynomial is the same as that described above for the data approximation mechanism A, but in the previous one the approximation interval spanned the entire contour point sequence group. This time, instead, a piecewise polynomial approximation is performed for each junction.
【0108】まず仮接合点の抽出について説明する。接
合点において勾配が変化するために曲率も大きい。接合
点は次に関数近似する時において関数の定義域を決定す
るものである。接合点と接合点の間は直線であるか、滑
らかに勾配の変化する曲線である。接合点の間の近似関
数は簡単な形で表現できる。従って接合点の座標と接合
点の間の近似関数を求めればこの文字フォントについて
全てのデ−タが求まったということになる。First, the extraction of the temporary junction will be described. The curvature is large because the gradient changes at the junction. The junction determines the domain of the function when the function is approximated next. A straight line or a curve whose gradient changes smoothly between the joining points. The approximation function between the junctions can be expressed in a simple form. Therefore, if the approximate function between the coordinates of the joint point and the joint point is obtained, all the data for this character font has been obtained.
【0109】しかし接合点の選択が適切でなく、接合点
同士が離れすぎると、隣接接合点の間を簡単な形の近似
関数で表すことができないために、却ってデ−タ数が増
えてしまう。反対に接合点が多過ぎると、接合点の座標
に関するデ−タが増えるので十分にデ−タ圧縮をするこ
とができない。かように接合点の選択は重要である。図
14のフロ−チャ−トによって接合点位置抽出の手法を
説明する。先に全輪郭点列について近似曲率が求められ
ているので、これを利用する。However, if the joining points are not properly selected and the joining points are too far apart, the number of data increases because the adjacent joining points cannot be represented by a simple approximation function. . On the other hand, if there are too many joints, the data relating to the coordinates of the joints increases, so that the data cannot be sufficiently compressed. Thus, the choice of junction is important. The method of extracting the joint position will be described with reference to the flowchart of FIG. Since the approximate curvature has already been obtained for all contour point sequences, this is used.
【0110】近似曲率記憶装置E′から曲率を読み込
む。{K(tk u )}である。これらのデ−タから群u
の全ての点k=0〜N−1について曲率がある値δより
大きいか否かを順次調べる。The curvature is read from the approximate curvature storage device E '. Is {K (t k u)} . From these data, the group u
It is sequentially checked whether or not the curvature is larger than a certain value δ for all the points k = 0 to N−1.
【0111】 |K(tk u )|>δ (34)[0111] | K (t k u) | > δ (34)
【0112】接合点というのは勾配において変化が急の
所とすると曲率がある程度大きい点であるので、このよ
うな手法によって求めることができるのである。δの値
は目的により適宜決定できる。The junction point is a point where the curvature is large to some extent when the gradient changes suddenly, and can be obtained by such a method. The value of δ can be appropriately determined depending on the purpose.
【0113】しかも真円をなす輪郭点列は既に除かれて
いるので円弧の一部で曲率が大きいという点(これは接
合点でありえない)はこの演算では出てこない。そこで
曲率がδを越える点を、仮接合点とする。そしてこの座
標(xk u ,yk u )を接合点位置記憶装置Iに記憶さ
せる。仮接合点の番号をiとする。そこでi番目の仮接
合点はdi (xi u ,yi u )と書くことができる。輪
郭点列での番号kが接合点番号iに置換されている。こ
のような比較と接合点の抽出を各点kについて行う。群
uについてこのようなことをした後、u+1について同
様のことをする。こうして各群での全ての仮接合点の座
標を得る。Further, since the contour point sequence forming a perfect circle has already been removed, a point that the curvature is large in a part of the arc (this cannot be a junction point) cannot be obtained by this calculation. Therefore, a point where the curvature exceeds δ is defined as a temporary joining point. Then the coordinate (x k u, y k u ) is stored in the junction position the storage device I a. Let the number of the temporary joining point be i. Thus, the i-th temporary junction can be written as d i (x i u , y i u ). The number k in the outline point sequence is replaced with the junction point number i. Such comparison and extraction of the junction are performed for each point k. After doing this for the group u, we do the same for u + 1. Thus, the coordinates of all the temporary joining points in each group are obtained.
【0114】直感的に接合点を説明する。図15はひら
がなの「あ」とカタカナの「ポ」での原文字である。こ
れを画像処理装置に入力して輪郭点列抽出をし、接合点
を抽出したものを図16に示す。×の印を付したところ
が接合点である。これを誤りなく抽出するためにこれ以
後幾つかの計算を行う。The joining point will be described intuitively. FIG. 15 shows the original characters of hiragana "a" and katakana "po". This is input to the image processing apparatus to extract a sequence of contour points, and to extract junction points, as shown in FIG. The places marked with “x” are the joining points. In order to extract this without error, several calculations are performed thereafter.
【0115】[I.接合点位置記憶装置]これは前述の
操作で求めた仮接合点の番号と座標{di (xi u ,y
i u )}を記憶するものである。仮接合点と言ったほう
が正確である。接合点に関しては前記の曲率が大きい事
で選んだ仮接合点と、これから述べる接合点候補と最適
接合点の3種類がある。これを混同してはいけない。[I. Joining point position storage device] This is the number of the temporary joining point and the coordinates {d i (x i u , y
i u )}. It is more accurate to say a temporary junction. There are three types of joining points: a temporary joining point selected because of the large curvature, a joining point candidate and an optimum joining point to be described below. Don't confuse this.
【0116】[J.最適接合点抽出機構]これまでに求
めたものは、曲率の大きさだけで判定した仮接合点であ
る。これらは実際の接合点でないことがある。文字フォ
ントを光学的に読み取った画像にはレンズやガラスにお
ける光の反射や散乱、外乱光などのためノイズがあるの
で、実際に2直線、2曲線の接合点の曲率が小さくなる
ことがある。ために前段の処理で接合点として残らない
ことがある。反対にノイズのために直線、曲線の中間点
であるにも拘らず曲率が大きくなり接合点と見えること
がある。[J. Optimal Joint Point Extraction Mechanism] What has been obtained so far is a temporary joint point determined only by the magnitude of the curvature. These may not be actual junctions. Since an image obtained by optically reading a character font has noise due to reflection and scattering of light from a lens or glass, disturbance light, and the like, the curvature of the junction between two straight lines and two curves may actually be small. Therefore, it may not be left as a joining point in the preceding process. Conversely, due to noise, the curvature may be large despite the midpoint between the straight line and the curve, and it may be seen as a joint.
【0117】それで最適の接合点を見い出す必要があ
る。最適接合点は先述の手法で求めた接合点候補の近く
にあるはずである。最適接合点というのは前述のよう
に、直線と直線の交点や折曲点などであるから文字に固
有のものである。これがノイズのために曲率の大小だけ
では正確に見付けることができない。Therefore, it is necessary to find an optimum junction. The optimal junction should be near the junction candidate determined by the method described above. As described above, the optimum joining point is a point unique to a character because it is an intersection or a bending point between straight lines. Because of this noise, it cannot be found accurately only by the magnitude of the curvature.
【0118】図17に最適接合点の抽出機構のフロ−チ
ャ−トを示す。接合点位置記憶装置Iから仮接合点di
(xi u ,yi u )i=0 I-1を読み込む。ここでuは輪郭
点列の群番号、iはこの群での仮接合点の番号、Iはこ
の群での仮接合点の数である。仮接合点と呼ぶのはこれ
が最終的な接合点でないからである。本発明の顕著な特
徴はここにもあり、接合点の位置について彫琢を重ねる
ということが本発明において重要である。FIG. 17 shows a flowchart of the mechanism for extracting the optimum junction. Temporary junction d i from the joining point position storage device I
(X i u, y i u ) read i = 0 I-1. Here, u is the group number of the outline point sequence, i is the number of the temporary junction in this group, and I is the number of temporary junctions in this group. It is called a temporary junction because it is not the final junction. The remarkable feature of the present invention is also here, and it is important in the present invention to repeat the sculpture for the position of the joint.
【0119】仮接合点の近傍に幾つかの接合点候補とい
うものを考える。これをλo i とし、座標を付けてλo
i (xio,yio)と書く。 iは仮接合点の番号で括
弧に入れてサフィックスに上げるべきであるが括弧が1
/4角にならないから省略している。図面では(i)と
いうサフィックスが正しく書かれている。群uという表
示は省略してある。勿論群uのi番目の仮接合点の近傍
にある接合点候補である。この接合点候補の数をOとす
る。これはどの仮接合点についても同一の数である。図
18はこれを示している。Consider several junction candidates near the temporary junction. Let this be λ o i , add coordinates and λ o
Write i ( xio , yio ). i is the number of the temporary junction and should be put in parentheses and raised to the suffix.
It is omitted because it does not become a quarter angle. In the drawing, the suffix (i) is correctly written. The display of the group u is omitted. Of course, it is a junction candidate near the i-th temporary junction in the group u. The number of the joining point candidates is set to O. This is the same number for every temporary junction. FIG. 18 illustrates this.
【0120】中央のxi が曲率によって選ばれた仮接合
点であり、これの前後α個が接合点候補である。ただし
ここで、xi と書いているのはdi (xi u ,yi u )
のことであり、x座標とy座標の両方を意味する。di
とかけば良いのであるがここでは位置座標であることを
はっきりと示すために単にxi と書いている。次に出る
近傍接合点の表記も同様である。The center x i is a temporary junction selected by curvature, and α before and after this are junction candidates. Here, x i is written as d i (x i u , y i u )
Which means both the x coordinate and the y coordinate. d i
However, here, it is simply written as x i to clearly show that it is a position coordinate. The same applies to the notation of the next neighboring junction.
【0121】接合点候補はo=0,1,・・O−1まで
ある。これはdi+α又はdi-αによって求める。これ
は、仮接合点の前後α個の輪郭点列を接合点候補とする
ということである。仮接合点もこれにあたるのでO=2
α+1である。この内にひとつの最適接合点が存在す
る。αの大きさは仮接合点と最適接合点のずれの大きさ
の評価から決まるがこのずれが大きな場合はαを大きく
する必要がある。しかしこれを大きくするとあとの計算
の数が増える。両者を勘案し適当な数を決定すべきであ
る。There are splice point candidates up to o = 0, 1,... O-1. This is determined by di + α or di - α. This means that a sequence of α contour points before and after the temporary joining point is set as a joining point candidate. O = 2
α + 1. One of these is the optimal junction. The magnitude of α is determined from the evaluation of the magnitude of the deviation between the temporary joining point and the optimal joining point. If this deviation is large, it is necessary to increase α. However, increasing this will increase the number of subsequent calculations. An appropriate number should be determined in consideration of both.
【0122】次にこれから近傍接合点{dj (xj u ,
yj u )}を抽出する。近傍接合点は仮接合点xi を中
心として半径ρの円内にある仮接合点であって、連続す
る輪郭点列によって繋がっているもの及びこの仮接合点
を含む輪郭点列によって囲まれる輪郭点列内にあるもの
である。例えば、「は」という文字の場合、右下の○の
内側の輪郭点列も外側の仮接合点の近傍接合点になる。
近傍接合点に付ける番号をjとする。先程の考察の対象
となる仮接合点xi がiを番号としておりこれらで区別
している。半径ρ内にあるというのは、Next, the near junction {d j (x j u ,
y j u )}. Near junction a temporary junction within a circle of radius ρ around the temporary bonding points x i, contour surrounded ones are connected by a continuous contour point sequence and by the contour point sequence containing the temporary junction It is in the sequence of points. For example, in the case of the character "ha", the outline point sequence inside the circle at the lower right is also a joint point near the outer temporary joint point.
The number assigned to the nearby junction is j. The temporary junctions x i to be considered in the previous discussion have i as numbers and are distinguished by these numbers. Being within the radius ρ means that
【0123】 {(xi −xj )2 +(yi −yj )2 }1/2 <ρ (35){(X i −x j ) 2 + (y i −y j ) 2 } 1/2 <ρ (35)
【0124】とう条件で表すことができる。輪郭点列に
よって繋がっていると言う条件がなぜ必要かというと、
この最適接合点の抽出というものが、線と線の交差にお
いて交差を挟んだ接合点同士が滑らかに繋がるようにす
るためであるからである。輪郭点列によって繋がってい
ない接合点同士の相対的な関係はどうでも良い。また輪
郭点列によって(黒画素の連結)繋がるという条件はx
j がxi と同一の輪郭点列群にあるかどうかということ
で簡単に調べることができる。It can be represented by the following conditions. The reason why the condition of being connected by the contour point sequence is necessary is that
This is because the extraction of the optimum joint point is to smoothly connect the joint points sandwiching the intersection at the intersection of the lines. The relative relationship between the joining points that are not connected by the contour point sequence does not matter. In addition, the condition of connection (connection of black pixels) by the outline point sequence is x
Whether or not j is in the same outline point sequence group as x i can be easily checked.
【0125】近傍接合点は、正確にはxj(xj u,y
j u)と書くべきであるが、、冗漫であるので以後簡単
にxjと書くことにする。これはx座標だけでなくy座
標も含んでいる[0125] near the junction is precisely x j (x j u, y
It should be written as j u ), but since it is tedious, it will be simply written as x j hereinafter. This includes the y coordinate as well as the x coordinate
【0126】近傍接合点の数をJとする。Jは0のこと
もあるし、1以上のこともある。J=0というのは近傍
接合点がないということである。Jが1以上であるとい
うのは幾つかの近傍接合点があるということである。ふ
たつの場合について処理が異なる。J≧1の場合と、J
<1(つまりJ=0)の場合に分けて説明する。Let J be the number of nearby junctions. J can be 0 or 1 or more. J = 0 means that there is no nearby junction. J being greater than or equal to 1 means that there are several nearby junctions. The processing is different for the two cases. J ≧ 1 and J
<1 (that is, J = 0) will be described separately.
【0127】J≧1の場合、さらに二つの場合を区別す
る。輪郭点列の追跡は外部に輪郭点列があると時計廻
り、内部にある場合は反時計廻りである。それ故、考察
の対象になっている仮接合点xi より、先に近傍接合点
xj がある場合と、xi よりも前に近傍接合点xj があ
る場合がある。両者を区別しなければならない。When J ≧ 1, two more cases are distinguished. The tracking of the contour point sequence is clockwise when there is an external contour point sequence, and counterclockwise when it is inside. Therefore, from the temporary bonding points x i that are the subject of discussion, and when there is near the junction x j above, there may be near the junction x j before x i. We have to distinguish between them.
【0128】曲率で選んだ仮接合点xiより前にある近
傍接合点xjは入力近傍という。これを図19に示す。
仮接合点xiより後にある近傍接合点xjは出力近傍とい
う。つまり仮接合点xiから、輪郭点列の走査の向きに
発したベクトルの出て行く先にある近傍接合点が出力近
傍である。逆に近傍接合点から走査の向きに発したベク
トルが入って来る仮接合点が入力近傍である。出力近傍
と入力近傍の判定については後に説明する。[0128] near the junction x j, which is before the temporary joining point x i selected in curvature of input vicinity. This is shown in FIG.
Near junction x j which is after the temporary bonding points x i is that the output near. That from the temporary junction x i, it is the vicinity of the output near the junction in the destination out of the vector emitted in the direction of scanning of the contour point sequence. Conversely, the temporary connection point into which the vector generated in the scanning direction from the nearby connection point is the input vicinity. The determination of the vicinity of the output and the vicinity of the input will be described later.
【0129】 [CASE 1(J≧1で入力近傍の場合)] まず図19によって、入力近傍の近傍接合点について考
える。これはいくつもの考え方がありうる。ここでは、
4つの仮接合点の近傍を考える。そしてこの4点を繋ぐ
曲線が最も滑らかであるという条件によって、仮接合点
の近くの接合点候補λ0 (i)(xi0,yi0)の内最適のも
のを決める。[CASE 1 (in the case of J ≧ 1 and near the input)] First, referring to FIG. 19, a near junction point near the input will be considered. This can be a number of ideas. here,
Consider the vicinity of four temporary junctions. Then, on the condition that the curve connecting these four points is the smoothest, the optimum one of the candidate λ 0 (i) (x i0 , y i0 ) near the temporary connection point is determined.
【0130】図19において、最も始めに曲率によって
選んだ仮接合点がxi(Cの近く)である。近傍接合点
がxj(Bの近く)である。入力近傍の場合は、仮接合
点の次の仮接合点xi+1(Dの近く)と、仮接合点xjの
一つ前の仮接合点xj-1(Aの近く)を考える。この4
点を通る曲線が最も滑らかになるようにこれらの点を通
るようにする。これら4つの仮接合点の内両側のA、D
は固定し、中間のB、Cのみを動かして適合係数を求め
る。B、Cの点は2α+1個の接合点候補を持つ。そこ
で、(2α+1)2個の組み合せの区分的多項式近似を
する。この内、最も滑らかに4点を繋ぐ近似が最も高い
適合係数を与える。In FIG. 19, the tentative junction selected first by curvature is x i (near C). The neighboring junction is x j (near B). For input vicinity is considered as the next temporary joining points x i + 1 of the provisional junction (near D), the previous temporary joining point x j-1 of the temporary junction x j a (near A) . This 4
Try to pass these points so that the curve passing through the points is the smoothest. A, D on both sides of these four temporary junctions
Is fixed, and only the middle B and C are moved to obtain the adaptation coefficient. Points B and C have 2α + 1 junction point candidates. Therefore, a piecewise polynomial approximation of (2α + 1) 2 combinations is performed. Among them, the approximation connecting the four points most smoothly gives the highest matching coefficient.
【0131】滑らかという条件をどう表現するか?いく
つもあるが、ここでは曲線の変曲点が最も少ないという
条件によって評価することにする。逐次近似を上げてゆ
くが、近似の回数をtで表す。How to express the condition of smoothness? There are a number of them, but here we will evaluate under the condition that the curve has the fewest inflection points. The successive approximation is increased, and the number of approximations is represented by t.
【0132】曲線の端点Aは、xj-1 のどれかの接合点
候補λl j-1 (xj-1l,yj-1l)である。ただしここ
で接合点候補の添え字はl′であるが「′」を1/4画
にできないのでここではlと書いている。実際にはl′
である。[0132] end point A of the curve, x j-1 of any of the junction point candidate λ l j-1 (x j -1l, y j-1l) is. Here, the suffix of the joining point candidate is l ', but since "'" cannot be reduced to 1/4 picture, it is written as l here. Actually l '
It is.
【0133】中間点Bは近傍接合点xj の何れかの接合
点候補λl j (xjl,yjl)である。接合点候補の番
号をlによって表している。lがパラメ−タになりlを
変えて同じ計算を何回もする。The intermediate point B is a candidate λ l j (x jl , y jl ) of one of the neighboring junctions x j . The number of the joining point candidate is represented by l. 1 becomes a parameter and the same calculation is repeated many times while changing l.
【0134】中間点Cは元の仮接合点xi の何れかの接
合点候補λo i (xio,yio)である。接合点候補の
番号はoによって表している。oがパラメ−タになりこ
れを変えて同じ計算を何回も繰り返す。The intermediate point C is one of the candidate junction points λ o i (x io , y io ) of the original temporary connection point x i . The number of the joining point candidate is represented by o. The parameter o is changed and the same calculation is repeated many times.
【0135】曲線の他の端点Dは、xi+1 の何れかの接
合点候補λo i+1 (xio,yio)である。ただしここ
でも接合点候補の添え字はo′であるが「′」1/4画
にできないので単にoと書いている。実際は図19のよ
うにo′である。[0135] Other end points D curves, one of the junction point candidates x i + 1 λ o i + 1 (x io, y io) is. In this case, however, the suffix of the joining point candidate is o ', but it is simply written as o because it cannot be made into "'" 1/4 image. Actually, it is o 'as shown in FIG.
【0136】計算の順序であるが、両端のA、D点は固
定点(t回目の近似において)であり、中間点Bの接合
点候補λl (j)(xjl,yjl)、中間点Cの接合点候補λ
o (i)(xio,yio)についてはパラメータl、oを一つ
ずつ変えて計算を繰り返す。この計算で接合点としての
適合性を確率関数として計算する。確率関数は曲線の滑
らかさによる係数rij(ol)を持つ。この係数は適合
係数ということができる。iとjは仮接合点xiと近傍
接合点xjの符号である。In the calculation order, the points A and D at both ends are fixed points (in the t-th approximation), and the candidate λ l (j) (x jl , y jl ) Candidate λ for joining point C
For o (i) (x io , y io ), the calculation is repeated by changing the parameters l and o one by one. In this calculation, the suitability as the junction is calculated as a probability function. The probability function has a coefficient r ij (ol) based on the smoothness of the curve. This coefficient can be referred to as a matching coefficient. i and j are the signs of the temporary junction xi and the neighboring junction xj .
【0137】oとlはこれらの仮接合点の属する接合点
候補の番号である。この係数がパラメータo、l毎に決
まる値であるのでこれだけの添え字を必要とする。これ
は曲線ABCDが十分に滑らかであるとき1となり、滑
らかでないときは1より小さくなる。だから曲線の適合
性を決めるパラメータとなり得る。O and l are the numbers of the joining point candidates to which these temporary joining points belong. Since this coefficient is a value determined for each of the parameters o and l, such subscripts are required. This is 1 when the curve ABCD is sufficiently smooth and less than 1 when it is not smooth. Therefore, it can be a parameter that determines the suitability of the curve.
【0138】図20は近傍接合点が存在する場合(J≧
1)の適合係数rij(ol)の決定法を示すフロ−チャ
−トである。パラメ−タの範囲を先ず指定している。i
が0からI−1というのは、曲率によって求めた仮接合
点xi についてこのような計算を0からI−1まで繰り
返すということである。FIG. 20 shows a case where a neighboring junction exists (J ≧
This is a flowchart showing the method of determining the adaptation coefficient r ij (ol) in 1). First, a parameter range is specified. i
There because I-1 0, such calculate the temporary joining points x i obtained by the curvature is that repeated from 0 to I-1.
【0139】oが0から2αまでというのは、対象とす
る仮接合点xi において2α+1個の接合点候補がある
ので、これについて一つずつすべて計算するということ
である。jが0からJ−1までというのは、近傍接合点
xj が複数ある場合はこの計算をあるだけ繰り返すとい
うことである。J>1であるからこのようなことが必要
である。The fact that o is from 0 to 2α means that there are 2α + 1 joint point candidates at the target temporary joint point x i , and all of them are calculated one by one. The fact that j ranges from 0 to J-1 means that if there are a plurality of neighboring junction points x j, this calculation is repeated as much as possible. This is necessary because J> 1.
【0140】lが0から2αまでというのは、近傍接合
点xj において2α+1個の接合点候補があるので、こ
れらについて一つずつ全て計算するということである。
i、o、j、lのパラメ−タについてこのような計算を
するが、ここでは順序不同に書いており、初めのものほ
ど大きいル−プを構成するということはない。しかし以
後の説明によりこれらパラメ−タの変化は一義的に与え
られる。The fact that l is from 0 to 2α means that since there are 2α + 1 joint point candidates at the neighboring joint point x j , these are all calculated one by one.
Such calculations are performed for the parameters i, o, j, and l, but are written out of order here, and do not constitute a larger loop than the first one. However, in the following description, these parameter changes are uniquely given.
【0141】始めにデ−タ近似したのと同様の手法によ
り、点A、B、C、Dをフル−エンシ−関数によって近
似する。つまり区分的多項式によって近似するのであ
る。近似関数の次数は2次で良い。先述の式で、m=2
とする。The points A, B, C and D are approximated by a full-energy function in the same manner as the data approximation at first. That is, it is approximated by a piecewise polynomial. The order of the approximation function may be second order. In the above expression, m = 2
And
【0142】 Sx (t)=Σk=-2 M+2 Ck xψk (t) (36)S x (t) = Σ k = −2 M + 2 C k x ψ k (t) (36)
【0143】 Sy(t)=Σk=-2 M+2Ck xψk(t) (37)S y (t) = Σ k = −2 M + 2 C k x ψ k (t) (37)
【0144】 ψk (t)=3(T/M)-2Σq=0 3(−1)q {t−(k+q)(T/M)}2 + /{q!(3−q)!} (38)Ψ k (t) = 3 (T / M) −2 Σ q = 0 3 (−1) q {t− (k + q) (T / M)} 2 + / {q! (3-q)! } (38)
【0145】 k=−2,−1,0,1,2,・・・,M+2 (39)K = −2, −1, 0, 1, 2,..., M + 2 (39)
【0146】ここでパラメ−タtは連続量を表すtであ
る。先程述べた近似の段階を示すtとは異なる。文字の
数が足らないので別異の事を同じtで表現している。最
初のデ−タ近似の時は、全輪郭点列について範囲Tを定
めて、全輪郭点列について一つの近似をしていた。であ
るから全ての輪郭点列の座標デ−タが参照されなければ
ならなかった。Here, the parameter t is t representing a continuous amount. This is different from t which indicates the approximation stage described above. Since there are not enough characters, different things are expressed with the same t. At the time of the first data approximation, the range T was determined for all the contour point sequences, and one approximation was performed for all the contour point sequences. Therefore, the coordinate data of all the contour points must be referred to.
【0147】しかしここではそうでなく、4点A、B、
C、Dを繋げば良いのである。4点の座標のみが必要
で、4点の間の数多くの輪郭点列の座標はもはや不要で
ある。4点を繋げば良いのであるから、AD間を区分多
項式によって近似する。区間Tは曲線ADに対応してい
る。図10に示すような計算をするのであるが、点の数
が著しく少ないのでこの近似は簡単である。最小二乗法
で係数を確定する点も同じである。このような近似によ
り4点を通る近似曲線ABCDを作る。However, this is not the case here, and four points A, B,
What is necessary is to connect C and D. Only the coordinates of four points are needed, and the coordinates of many contour point sequences between the four points are no longer needed. Since it suffices to connect four points, AD is approximated by a piecewise polynomial. Section T corresponds to curve AD. The calculation shown in FIG. 10 is performed, but since the number of points is extremely small, this approximation is simple. The same is true for determining coefficients by the least squares method. An approximation curve ABCD passing through four points is created by such approximation.
【0148】曲線ABCDの各輪郭点に於ける曲率を計
算する。これは近似関数Sx (t)、Sy (t)がある
ので、The curvature at each contour point of the curve ABCD is calculated. Since there are approximation functions S x (t) and S y (t),
【0149】 K(tw u )={Sx ′(tw u )Sy ′′(tw u )−Sx ′′(tw u )S y ′(tw u )}/{Sx ′(tw u )2 +Sy ′(tw u )2 }3/2 (40) ただし、w=A、B、C、Dである。K (tw u ) = {Sx '(Tw u ) Sy '' (Tw u ) -Sx '' (Tw u ) S y '(Tw u )} / {Sx '(Tw u )Two + Sy '(Tw u )Two }3/2 (40) Here, w = A, B, C, and D.
【0150】これも曲線ADの全てに渡って曲率を求め
るのでなく、4点だけ計算すればよいので簡単である。
曲率の反転回数により変曲点の数nc を求める。変曲点
の数は当然3以下である。図21は曲線の概略形と変曲
点の数nc の例を示す図である。変曲点を×印によって
表す。(a)は変曲点の数が3つの場合である。蛇行が
甚だしい。(b)は変曲点の数が2つの場合である。
(c)は変曲点数が1の場合である。(d)は変曲点数
が0の場合である。これが最も滑らかに4点を繋いでい
る。これを採用するのが望ましい。この場合にrij(o
l)が1になるように決める。例えば変曲点数nc を用
いて、This is also simple, since it is sufficient to calculate only four points instead of calculating the curvature over the entire curve AD.
Determine the number n c of the inflection point by the number of inversions of curvature. The number of inflection points is naturally three or less. Figure 21 is a diagram showing an example of a number n c of schematic type and inflection point of the curve. The inflection point is represented by a cross. (A) is a case where the number of inflection points is three. Meandering is severe. (B) is a case where the number of inflection points is two.
(C) is a case where the number of inflection points is one. (D) is a case where the number of inflection points is zero. This connects the four points most smoothly. It is desirable to employ this. In this case, r ij (o
Determine l) to be 1. For example, by using a number of inflection points n c,
【0151】 rij(ol)=min{1/c2 (nc −c1 ),1} (41) (c1 、c2 は定数)R ij (ol) = min {1 / c 2 (nc− c 1 ), 1} (41) (c 1 and c 2 are constants)
【0152】というふうに決める。この例では変曲点の
数が3のときrij(ol)=1/3となっている。これ
はc1 =−1、c2 =3/4としたものである。こうす
るとnc =2で、4/9、nc =1で2/3、nc =0
で1となる。勿論これらの定数は適宜決定すれば良い。
1とmin演算するのは、変曲点数が少ないときに大き
くなり過ぎるのでこれを防ぐためであるが、rij(o
l)の上限が1でなければならないということはない。
単にrij(ol)=1/c2 (nc −c1 )としても良
い。The decision is made as follows. In this example, when the number of inflection points is 3, r ij (ol) = 1/3. This is one where c 1 = −1 and c 2 = 3/4. In this case, 4/9 when n c = 2, 2/3 when n c = 1, and n c = 0.
And becomes 1. Of course, these constants may be determined as appropriate.
1 and to min operations, but to prevent this because too large when a small number of inflection points, r ij (o
There is no requirement that the upper limit of l) be one.
It is also possible to simply set r ij (ol) = 1 / c 2 (n c −c 1 ).
【0153】このような計算を何回か重ねる。近似計算
の回数をtで表現する。これは確率を求める計算であ
る。近似計算については後に述べる。ここでは適合係数
rij(ol)の決定についてだけ説明した。The above calculation is repeated several times. The number of approximation calculations is represented by t. This is a calculation for probability. The approximate calculation will be described later. Here, only the determination of the adaptation coefficient r ij (ol) has been described.
【0154】[CASE 2(J<1の場合:近傍接合
点がない)]図22はJ<1つまり近傍接合点が存在し
ない場合の処理のフロ−チャ−トを示す。図23はこの
場合の接合点の位置の例を示している。これは仮接合点
xiの前の仮接合点xi-1 と、後の仮接合点xi+1 と3
点の接続を問題にする。図22のフロ−チャ−トも、パ
ラメ−タメ−タの範囲について初めに定義している。[CASE 2 (when J <1: there is no neighboring junction)] FIG. 22 is a flowchart showing the processing when J <1 or when there is no neighboring junction. FIG. 23 shows an example of the position of the joining point in this case. This provisional junction x i-1 of the previous temporary joining point x i, temporary bonding points after x i + 1 and 3
The connection of points matters. In the flowchart of FIG. 22, the range of the parameter is first defined.
【0155】iは0〜I−1であるがこれは仮接合点の
番号である。すべての仮接合点について演算を行うとい
うことである。oは仮接合点xiの接合点候補λ
o (i)(xio,yio)の番号である。lはxiより前の仮
接合点xi-1の接合点候補λl (j)(xjl,yjl)の番号
である。すべての接合点候補について計算する。jはi
−1〜i−1、つまりj=i−1のみである。I is 0 to I-1, which is the number of the temporary junction. That is, the calculation is performed for all the temporary joining points. o is a joint point candidate λ of the temporary joint point x i
o (i) is the number of ( xio , yio ). 1 is the number of the candidate λ l (j) (x jl , y jl ) of the connection point candidate of the temporary connection point x i-1 before x i . Calculate for all junction candidates. j is i
−1 to i−1, that is, only j = i−1.
【0156】それぞれの仮接合点xi-1、xi、xi+1の
接合点候補を、A、B、Cとする。点Aはλl (i-1)(x
i-1l,yi-1l)でlがパラメータである。点Bはλo (i)
(xio,yio)でパラメータはoである。点Cはxi+1
の接合点候補λh (i+1)(xi+1h,yi+1h)で、maxh
(Pi+1h t-1)を示す。maxhはパラメータhのなかで
の最大を示す。Let A, B, and C be the candidate junctions of the respective temporary junctions x i−1 , x i , and x i + 1 . Point A is λ l (i-1) (x
i-1l , yi-1l ), where l is a parameter. Point B is λ o (i)
In ( xio , yio ), the parameter is o. Point C is x i + 1
In the junction point candidate lambda h of (i + 1) (x i + 1h, y i + 1h), max h
(P i + 1h t-1 ). max h indicates the maximum among the parameters h.
【0157】これらの3点をフルーエンシー関数で補間
する。これは図10に示すような方法で行うが、3点し
かなく、極めて簡単である。ただしこれも近似を上げて
行くようにし、近似の回数をtで表す。そして最小二乗
法による誤差がεmaxになるまで近似する。このときの
近似の次元数をMとする。rij(ol)はmin{1/
(c3M+c4ε)、1}で決める。εは最終誤差、Mは
最終次元である。These three points are interpolated by a fluency function. This is performed by a method as shown in FIG. 10, but there are only three points, which is extremely simple. However, this also increases the approximation, and the number of approximations is represented by t. And error to approximate until the ε max by the least squares method. The number of dimensions of the approximation at this time is M. r ij (ol) is min {1 /
(C 3 M + c 4 ε), determined by 1 °. ε is the final error and M is the final dimension.
【0158】つまりできるだけ低い次元数で、誤差少な
く近似できる点を求めるということである。このような
点はそれぞれが属する仮接合点の接合点候補の内、最も
滑らかな曲線を与えることができる。tは近似の回数で
あり、0からこれを上げてゆく。先に説明したJ≧1の
時と同じように、tは0〜4とし4回で近似を打ち切
る。That is, a point which can be approximated with as few dimensions as possible and with a small error is obtained. Such a point can provide the smoothest curve among the joining point candidates of the temporary joining points to which each point belongs. t is the number of approximations, and is increased from 0. As in the case of J ≧ 1 described above, t is set to 0 to 4, and approximation is stopped four times.
【0159】[CASE 3(J≧1で出力近傍の場
合)] 図19で示したのは、J≧1で仮接合点xiに対する近
傍接合点xjが入力近傍である時である。J≧1であっ
て、近傍接合点xjが出力近傍である場合も同様な計算
をするのであるが、この場合4点の取り方が少し違う。[0159] [(For output near at J ≧ 1) CASE 3] that shown in FIG. 19 is when near the junction x j is the input vicinity for temporary joining points x i in J ≧ 1. The same calculation is performed when J ≧ 1 and the neighboring junction point x j is near the output, but in this case, the way of obtaining the four points is slightly different.
【0160】図24に出力近傍の場合の近傍接合点xj
に対する4点の取り方を示す。近傍接合点xjが、xiを
中心とする半径ρのなかにある。しかもこれは走査の方
向に関し元の仮接合点xiよりも先にある。4点は、対
象となる仮接合点xiの前の仮接合点xi-1と、近傍接合
点xjの次の仮接合点xj+1である。これらの近くにある
2α個の接合点候補から4点を取る。FIG. 24 shows the vicinity junction point x j near the output.
The following shows how to score 4 points. Near junction x j is in among the radius ρ centered at x i. Moreover, this is ahead of the original temporary junction point x i in the scanning direction. The four points are a temporary junction point x i-1 before the target temporary junction point x i and a temporary junction point x j + 1 next to the neighboring junction point x j . Four points are taken out of 2α joining point candidates near these.
【0161】Aはxj+1の接合点候補λ
l (j+1)(xj+1l,yj+1l)の一つである。ただしここで
lは「’」が付いているが、これは1/4角にできない
ので「’」を省いている。これは前回の確率計算で最大
値を与えたものとして決っており、固定値である。A is a junction point candidate λ of x j + 1
l (j + 1) (x j + 1l , y j + 1l ). However, here, l has "'", but since it cannot be made into a 1/4 square, "'" is omitted. This is determined as the maximum value given in the previous probability calculation, and is a fixed value.
【0162】Bは近傍接合点xjの接合点候補λ
l (j)(xjl,yjl)の一つである。Cは対象としている
仮接合点xiの接合点候補λo (i)(xio,yio)の一つ
である。B is a candidate λ of the junction of the neighboring junction x j
l (j) (x jl , y jl ). C is one of the junction point candidate lambda o of the temporary junction x i as an object (i) (x io, y io).
【0163】Dはxi-1 の接合点候補λo i-1 (x
i-1o,yi-1o)の一つである。これも前回の確率計算で
最大値を与えるもので固定値である。図示したように実
際にはo′であるが、′が1/4角にならないのでここ
では′を省いている。以上のように4点が定まる。これ
より後の計算はさきに説明したCASE 1の場合と同
じである。D is a candidate for a joining point of x i-1 λ o i-1 (x
i-1o , yi-1o ). This also gives the maximum value in the previous probability calculation and is a fixed value. Although it is actually o 'as shown in the figure,' is omitted here because 'does not become a quarter-angle. As described above, four points are determined. The calculation after this is the same as in the case 1 described above.
【0164】 [出力近傍と入力近傍の決め方] 仮接合点は曲率が大きい輪郭点であり、主に2本の線が
直角に近い角度で交わる交差点が典型的なものである。
交差点を正確に決めるには、交差点を通る2本の輪郭線
を正確に求めて、その交点を求めなければならない。1
本の輪郭線は交差点と1つの近傍接合点を通り、もう1
本の輪郭線は交差点と他の近傍接合点を通る。[Method of Determining Near Output and Near Input] The temporary joining point is a contour point having a large curvature, and is typically an intersection where two lines intersect at an angle close to a right angle.
In order to accurately determine an intersection, two outlines passing through the intersection must be accurately determined, and the intersection must be determined. 1
The outline of the book passes through the intersection and one nearby junction, and another
The book outline passes through the intersection and other nearby junctions.
【0165】接合点はこのように2つの近傍接合点を持
つので、交差点を求める対象となる仮接合点di(xi,
yi)の近傍接合点dj(xj,yj)として、出力近傍と
入力近傍とを区別しなければならない。接合点と入力近
傍を通る最も滑らかな線と、接合点と出力近傍を通る最
も滑らかな線を求めて、それらの線の交点から正しい交
差点を再生するのである。Since the junction has two neighboring junctions in this way, the temporary junction d i (x i ,
near junction d j (x j of y i), as y j), it must be distinguished with respect to the output near the input vicinity. The smoothest line passing through the junction and the vicinity of the input and the smoothest line passing through the junction and the vicinity of the output are obtained, and the correct intersection is reproduced from the intersection of these lines.
【0166】仮接合点di(xi,yi)とその前の仮接
合点di-1(xi-1,yi-1)の2点を通り、輪郭点列の
走査の方向に沿うベクトル(di-1→di)が近傍接合点
dj(xj,yj)に向かうとき、この近傍接合点dj(x
j,yj)を出力近傍という。反対に、近傍接合点d
j(xj,yj)とその前の仮接合点dj-1(xj-1,
yj-1)の2点を通り、輪郭点列の走査の方向に沿うベ
クトル(dj-1→dj)が仮接合点di(xi,yi)に向
かうとき、これを入力近傍という。図25は入力、出力
近傍接合点の決定のためのフローチャートである。始め
に全ての接合点候補λo (i)(xio,yio)を入力する。[0166] temporary bonding point d i (x i, y i ) through the two points and the previous temporary joining point d i-1 (x i- 1, y i-1), the direction of scanning of the contour point sequence When the vector (d i−1 → d i ) along the line goes to the neighboring junction d j (x j , y j ), the neighboring junction d j (x
j , y j ) are called output neighborhoods. Conversely, the nearby junction d
j (x j , y j ) and the temporary joint point d j-1 (x j-1 ,
through the two points y j-1), when the vector along the direction of scanning of the contour point sequence (d j-1 → d j ) is directed to the temporary junction d i (x i, y i ), inputs the It is called the neighborhood. FIG. 25 is a flowchart for determining an input / output proximity junction. First, all the joining point candidates λ o (i) (x io , y io ) are inputted.
【0167】iは計算対象たる仮接合点di(xi,
yi)の番号であり,これは一つの輪郭点列群uについ
てI個ある(0〜I−1)。これについてi=0から始
める。jは近傍接合点の番号であるが、はじめから近傍
であるかどうか分かっている訳ではない。始めは全ての
仮接合点dj(xj,yj)をとる。oはその仮接合点の
近くの2α個内に含まれる接合点候補の番号である。図
中ではoに上線を付けているが、明細書では上線を付け
られないので省く。仮接合点di(xi,yi)のiだけ
固定し近傍接合点を決める。[0167] i temporary joining point serving as a calculation target d i (x i,
y i ), which are I (0 to I−1) for one outline point sequence group u. We start with i = 0 for this. j is the number of the neighboring junction, but it is not known from the beginning whether or not it is nearby. At first, all the temporary joining points dj ( xj , yj ) are taken. “o” is the number of the junction candidate included in 2α pieces near the temporary junction. Although o is overlined in the figure, it is omitted in the specification because it cannot be overlined. Only the i of the temporary junction point d i (x i , y i ) is fixed, and a nearby junction point is determined.
【0168】dj(xj u,yj u)はj番目の仮接合点の
座標であるが、簡単のために単にdjと書いている。こ
れがλo (i)(xio,yio)(簡単のためλo (i)と書く)
を中心とする半径ρ内に存在するかどうかを調べる。こ
れは(35)に示した条件であるが再び記述すると、[0168] d j (x j u, y j u) is the coordinates of the j-th temporary joint point, I wrote simply d j for simplicity. This is λ o (i) (x io , y io ) (written as λ o (i) for simplicity)
To determine if it is within a radius ρ centered at. This is the condition shown in (35).
【0169】 {(xio−xj)2+(yio−yj)2}1/2<ρ (42){(X io −x j ) 2 + (y io −y j ) 2 } 1/2 <ρ (42)
【0170】となる。(35)は仮接合点の座標
(xi,yi)をそのまま用いているが、ここではdiの
接合点候補の座標を用いている。もしもdjが半径ρ内
にあるとこれは近傍接合点である可能性がある。次にd
jと、λo (i)が同一の輪郭点列にあるかどうかを調べ
る。異なる輪郭点列にあればこれらは近傍接合点でな
い。Is obtained. (35) the coordinates (x i, y i) of the temporary bonding points are used as the uses a coordinate bonding point candidates d i here. If d j is within radius ρ, this may be a near junction. Then d
It is checked whether j and λ o (i) are in the same outline point sequence. If they are in different outline point sequences, they are not neighboring junction points.
【0171】もしも同一の輪郭点列にあると、djはλo
(i)が属する仮接合点xiの近傍接合点である。対象とし
ている仮接合点diにおいて、ある一定数β前の点の座
標は(接合点候補とは限らない)di-βで表すことがで
きる。ベクトル(di-β→di)は仮接合点における走
査の方向に沿う方向を持つ。一方近傍接合点djにおい
てこれより一定数βだけ後の点の座標はdj+βと書くこ
とができる。ベクトル(dj→dj+β)は近傍接合点の
直後における走査の方向に沿う方向を持つ。If they are in the same outline point sequence, d j is λ o
(i) is near the junction of the temporary junction x i belongs. In the temporary junction d i of interest, coordinates of a point before the predetermined number beta that can be expressed by (not necessarily junction candidates) d i-beta. The vector (d i−β → d i ) has a direction along the scanning direction at the temporary joining point. Whereas coordinates of the point after only a certain number beta than this near the junction d j can be written as d j + beta. The vector (d j → d j + β ) has a direction along the scanning direction immediately after the neighboring junction.
【0172】仮接合点diから近傍接合点djに向かうベ
クトル(di→dj)が、輪郭点列の走査の方向に沿って
仮接合点diに向かうベクトル(di-β→di)とほぼ順
平行であり、輪郭点列の走査の方向に沿って近傍接合点
から出るベクトル(dj→dj+β)とほぼ順平行である
とき、近傍接合点djは仮接合点diの出力近傍である。
すなわち、[0172] temporary bonding point d i toward the vicinity of the junction point d j from the vector (d i → d j) is the contour point sequence along the direction of scanning toward the temporary joining point d i vector (d i-beta → d i ) is substantially parallel to the vector (d j → d j + β ) emerging from the neighboring junction along the scanning direction of the outline point sequence, the neighboring junction dj is provisional. in the vicinity the output of junction d i.
That is,
【0173】 (di-β→di)//(di→dj)//(dj→dj+β) (43)(D i−β → d i ) // (d i → d j ) // (d j → d j + β ) (43)
【0174】という条件をほぼ満たすということであ
り、ベクトルの内積と外積の式で表すと、That is, the above condition is almost satisfied, and the expression of the inner product and the outer product of the vectors is as follows.
【0175】 │(di-β→di)×(di→dj)│<ε │(di→dj)×(dj→dj+β)│<ε (44)| (D i−β → d i ) × (d i → d j ) | <ε | (d i → d j ) × (d j → d j + β ) | <ε (44)
【0176】 (di-β→di)・(di→dj)>0 (di→dj)・(dj→dj+β)>0 (45)(D i−β → d i ) · (d i → d j )> 0 (d i → d j ) · (d j → d j + β )> 0 (45)
【0177】がすべて成り立つということである。ただ
しεは適当な小さい値である。つまり、ベクトル(d
i-β→di)、(di→dj)、(dj→dj+β)がすべて
ほぼ同一方向を向いているとき、4点di-β、di、
dj、dj+βはほぼ一直線に並んでいることになる。こ
の場合はdjは出力近傍である。そこでこれをdj output
(i)として登録する。That is, all the conditions hold. However, ε is an appropriate small value. That is, the vector (d
When i-β → d i ), (d i → d j ), and (d j → d j + β ) all face in substantially the same direction, four points d i−β , d i ,
d j and d j + β are almost aligned. In this case, dj is near the output. So this is dj output
Register as (i).
【0178】他方近傍接合点djにおいてこれより一定
数βだけ前の点の座標はdj-βと書くことができる。ベ
クトル(dj-β→dj)は近傍接合点の直前における走
査の方向に沿う方向を持つ。仮接合点diにおいてこれ
より一定数βだけ後の点の座標はdi+βと書くことがで
きる。ベクトル(di→di+β)は仮接合点の直後にお
ける走査の方向に沿う方向を持つ。近傍接合点djから
仮接合点diに向かうベクトル(dj→di)が、輪郭点
列の走査の方向に沿って仮接合点diから出るベクトル
(di→di+β)とほぼ順平行であり、輪郭点列の走査
の方向に沿って近傍接合点djに向かうベクトル(d
j-β→dj)とほぼ順平行であるとき、近傍接合点djは
仮接合点diの入力近傍である。すなわち、[0178] coordinates of a point earlier by a predetermined number beta than this in other near the junction d j can be written as d j-beta. The vector (d j−β → d j ) has a direction along the scanning direction immediately before the neighboring junction. Coordinate of a point after only a certain number beta than this in the temporary junction d i can be written as d i + beta. The vector (d i → d i + β ) has a direction along the scanning direction immediately after the temporary joining point. A vector (d j → d i ) from the neighboring junction d j to the temporary junction d i is a vector (d i → d i + β ) emerging from the temporary junction d i along the scanning direction of the outline point sequence. When a substantially forward parallel, toward the vicinity of the junction point d j along the direction of scanning of the contour point sequence vectors (d
j−β → d j ), the near junction d j is near the input of the temporary junction d i . That is,
【0179】 (dj-β→dj)//(dj→di)//(di→di+β) (46)(D j−β → d j ) // (d j → d i ) // (d i → d i + β ) (46)
【0180】という条件をほぼ満たすということであ
り、ベクトルの内積と外積の式で表すと、That is, the condition is almost satisfied, and the expression of the inner product and the outer product of the vectors is as follows.
【0181】 │(dj-β→dj)×(dj→di)│<ε │(dj→di)×(di→di+β)│<ε (47)| (D j−β → d j ) × (d j → d i ) | <ε | (d j → d i ) × (d i → d i + β ) | <ε (47)
【0182】 (dj-β→dj)・(dj→di)>0 (dj→di)・(di→di+β)>0 (48)(D j −β → d j ) · (d j → d i )> 0 (d j → d i ) · (d i → d i + β )> 0 (48)
【0183】がすべて成り立つということである。ただ
しεは適当な小さい値である。つまり、ベクトル(d
j-β→dj)、(dj→di)、(di→di+β)がすべてほぼ
同一方向を向いているとき、4点dj-β、dj、di、d
i+βはほぼ一直線に並んでいることになる。この場合は
djは入力近傍である。そこでこれをdj input(i)と
して登録する。That is, all the conditions hold. However, ε is an appropriate small value. That is, the vector (d
When j-β → d j ), (d j → d i ), and (d i → d i + β ) are almost in the same direction, four points d j−β , d j , d i , d
i + β is almost aligned. In this case, dj is near the input. Therefore, this is registered as d j input (i).
【0184】[確率の計算]最適接合点を求めるには接
合点候補についてつぎのような計算をして最適のものを
選ぶ。図26はこの計算を示すフロ−チャ−トである。
入力するものは、[Calculation of Probability] In order to obtain the optimum junction, the following calculation is performed for the junction candidates to select the optimum one. FIG. 26 is a flowchart showing this calculation.
What to enter
【0185】 λo i (xio,yio)、dj input(i) 、dj output(i) (49)Λ o i (x io , y io ), dj input (i), dj output (i) (49)
【0186】である。λo (i) (xio,yio)は曲率に
よって選ばれた仮接合点xi の近くの接合点候補であ
る。oは接合点候補につけた番号である。iはxi に関
するものと言う意味である。dj input(i) は仮接合点x
i の近傍接合点の内、入力近傍接合点の位置座標であ
る。dj output(i)はxi の近傍接合点の内、出力近傍接
合点の位置座標である。Is as follows. λ o (i) (x io , y io) is close to the junction point candidates temporary joining points x i selected by the curvature. o is the number assigned to the junction candidate. i means that it relates to x i . d j input (i) is the temporary junction x
This is the position coordinates of the input neighborhood junction among the neighborhood junctions of i . d j output (i) among the neighboring junction of x i, the position coordinates of the output near the junction.
【0187】これだけのものを始めに入力する。確率計
算の次数をtで示す。これは最小二乗法で誤差がある程
度小さくなった時に中止するというのではなく、始めか
ら回数を決めておく。例えば4回とする(t=0〜
4)。勿論目的によって5回以上にしても良い。[0187] This is input first. The order of the probability calculation is denoted by t. This is not stopped when the error becomes small to some extent by the least square method, but the number of times is determined from the beginning. For example, four times (t = 0 to
4). Of course, five or more times may be used depending on the purpose.
【0188】確率変数Pi t (o)を定義する。これは
仮接合点xi の近くにある2α+1の(xi 自身を含
む)接合点候補の内oのt回目の確率である。t乗では
なくt回目であるから括弧をつけるべきであるが括弧を
サフィックスにいれることができないから単にtと書い
ている。どういう確率かというと、最適接合点としての
確率である。2α+1個の接合点候補の内これの最も高
いものを選ぶ。確率計算の回数tを増やす毎に接合点と
してより適するものの確率変数が高まってゆく。そのよ
うに確率変数を決める。もちろん幾つもの定義が可能で
ある。ここでは、次のように決める。A random variable P i t (o) is defined. This is the t-th probability of an inner o of 2α + 1 of the (x i including itself) junction point candidate in the vicinity of the temporary joining point x i. Parentheses should be added because it is the t-th time, not the t-th power, but since the parentheses cannot be included in the suffix, it is simply written as t. What is the probability is the probability as the optimal junction. The highest one of the 2α + 1 junction points is selected. Every time the number of times t of the probability calculation is increased, the probability variable more suitable as a junction increases. Determine the random variables in that way. Of course, many definitions are possible. Here, it is determined as follows.
【0189】相補確率変数Qi t (o)を考える。これ
も接合点候補oのt回目の確率を与えている。これは入
力近傍からの寄与qi input(o) と、出力近傍からの寄与
qi output(o)の和である。これも回数tが入るが、ここ
では略す。Consider the complementary random variable Q i t (o). This also gives the t-th probability of the joint point candidate o. This is the sum of the contribution q i input (o) from the input neighborhood and the contribution q i output (o) from the output neighborhood. This also includes the number of times t, but is omitted here.
【0190】 Qi t (o)=qi input(o) +qi output(o) (50)Q i t (o) = q i input (o) + q i output (o) (50)
【0191】qi input(o) とqi output(o)は次のように
定義する。Q i input (o) and q i output (o) are defined as follows.
【0192】 qi input(o)=max{rij(ol)×Pj t-1(l)} (51) (λl j∈{dj input(i)の接合点候補}) (52)Q i input (o) = max {r ij (ol) × P j t −1 (l)} (51) (junction point candidate of λ l j ∈ {d j input (i)}) (52) )
【0193】但しmaxの計算は接合点候補λi jがdj
input(i)の接合点候補に属しているという条件で最
大の値をとるということである。ここではlが変化する
パラメータである。適合係数rij(ol)は先に与えら
れている。同様に、[0193] However the calculation is the junction of max candidate λ i j is d j
The maximum value is obtained under the condition that the input (i) belongs to the junction candidate. Here, l is a changing parameter. The fit coefficient r ij (ol) has been given earlier. Similarly,
【0194】 qi output(o)=max{rij(ol)×Pj t-1(l)} (53) (λl j∈{dj output(i)の接合点候補}) (54)Q i output (o) = max {r ij (ol) × P j t -1 (l)} (53) (junction point candidate λ l j ∈ {d j output (i)}) (54) )
【0195】maxは、接合点候補λl jが、dj output
(i)の接合点候補に属しているという条件で最大の値
を取るということである。t+1回目の確率変数は、t
回目の確率変数、相補確率変数などを用いて次のように
定義される。Max indicates that the junction candidate λ l j is equal to d j output
(I) takes the maximum value under the condition that it belongs to the junction candidate. The t + 1 random variable is t
It is defined as follows using a random variable of the second time, a complementary random variable, and the like.
【0196】 Pi t+1(o)=Pi t(o)Qi t+1(o)/{ΣPi t(o)Qi t+1(o)} (Σはλo iについて行う) (55)[0196] For P i t + 1 (o) = P i t (o) Q i t + 1 (o) / {ΣP i t (o) Q i t + 1 (o)} (Σ is λ o i Do) (55)
【0197】このような計算をt=0〜4まで行う。但
しこれは始め(t=0)の確率変数が分からないと計算
できない。初期確率Pi (0)(o)はどのように与えても
よいのであるが、ここではxi に近いほど大きい値を与
える。最適接合点は仮接合点xi の近くにあると考えら
れ、xi の初期確率を高くすると確率変数の収束が早く
なると考えられるからである。Such calculation is performed from t = 0 to 4. However, this cannot be calculated unless the initial (t = 0) random variable is known. The initial probability P i (0) (o) may be given in any way, but here, a larger value is given closer to x i . This is because the optimal joint point is considered to be near the temporary joint point x i , and the convergence of the random variable is considered to be faster if the initial probability of x i is increased.
【0198】図28に初期値の設定を説明する。接合点
候補λo i はoが0から2α+1個ある。o=αはx
i 自身である。初期値Pi ′(o)はo=αの時に最大
値Kを取る。o=α−1、α+1は(K−2)とする。
以下αから遠ざかるに従って2ずつ減少して行くものと
する。o=0、2αでは初期値は1である。初期確率P
i (0)(o)は、初期値を用いて、FIG. 28 illustrates the setting of the initial value. The joint point candidates λ o i have 0 to 2α + 1 o. o = α is x
i own. The initial value P i ′ (o) takes the maximum value K when o = α. o = α-1, α + 1 is (K−2).
Hereinafter, it is assumed that the distance decreases by 2 as the distance from α increases. At o = 0 and 2α, the initial value is 1. Initial probability P
i (0) (o) is the initial value,
【0199】 Pi 0 (o)=Pi ′(o)/ΣPi ′(o) (56)P i 0 (o) = P i ′ (o) / ΣP i ′ (o) (56)
【0200】である。Σの積算はoについて行う。こう
して初期確率が与えられたので、適合係数rij(ko)
と組み合わせて、t=1でのqi input(o) とq
i output(o)を計算することができる。これの和として相
補確率変数Qi t (o)を計算し、さらに、t+1回目
の確率変数Pi t (o)を計算できる。これはt=4に
なるまで繰り返し行う。t=4で最高の確率変数を持つ
接合点候補が最適接合点である。ここでの出力はPi 4
(o)i=0 I-1 o=0 O-1である。これを図29に示す。Is as follows. The integration of Σ is performed for o. Given the initial probabilities in this way, the fit coefficient r ij (ko)
And q i input (o) at t = 1 and q
i output (o) can be calculated. The complementary random variable Q i t (o) is calculated as the sum of the above, and the (t + 1) -th random variable P i t (o) can be calculated. This is repeated until t = 4. The junction candidate having the highest random variable at t = 4 is the optimum junction. The output here is Pi 4
(O) i = 0 I-1 o = 0 O-1 . This is shown in FIG.
【0201】このようにして曲率から求めた仮接合点の
近くにある接合点候補から最適の接合点を求めることが
できる。始めに仮接合点を求めているのにさらにこの近
くの輪郭点列にまで範囲を広げて接合点候補としここか
ら最適の接合点を求めるのは本発明の著しい特徴の一つ
である。これは曲率が極大の点が必ずしも接合点として
最適でないという本発明者の発見に基づくものである。In this manner, the optimum joining point can be obtained from the joining point candidates near the temporary joining point obtained from the curvature. It is one of the remarkable features of the present invention that, although a temporary joint point is obtained first, the range is further extended to a contour point sequence near this to be used as a joint point candidate and an optimum joint point is obtained therefrom. This is based on the inventor's discovery that a point having a maximum curvature is not always optimal as a joining point.
【0202】[適合係数の他の定義] 最適接合点の条
件は前述の方法では4つの点を結ぶ曲線の変曲点が最も
少ないということであった。つまり最も滑らかに接続す
るということである。これは変曲点の数を数える他に、
曲線の曲率を直接に対象とする方法も可能である。図2
7はこのような他の条件による接合点候補の適合係数の
求め方を示すフロ−チャ−トである。[Other Definitions of Fitting Coefficient] The condition of the optimum joining point was that in the method described above, the inflection point of the curve connecting the four points was the least. In other words, the smoothest connection is made. This besides counting the number of inflection points,
It is also possible to directly target the curvature of the curve. FIG.
Numeral 7 is a flowchart showing how to find a matching coefficient of a joint point candidate under such other conditions.
【0203】始めのJ>1は近傍接合点が存在するとい
う条件である。この場合、入力近傍と出力近傍を考え、
4点A、B、C、Dを通る曲線を考えるが(図19、図
24)このとき変曲点ではなくて、曲率を求める。K
input というのは入力近傍における4点を結ぶ曲線の最
大曲率である。これが小さくなる曲線が望ましい。K
outputは出力近傍における4点を結ぶ曲線の最大曲率で
ある。これも小さい方が良い。そこで両者の和を取って
これの最小を与える点を求めることとする。そこで適合
係数をThe first condition J> 1 is a condition that a nearby junction exists. In this case, considering the input neighborhood and output neighborhood,
Consider a curve passing through four points A, B, C, and D (FIGS. 19 and 24). At this time, a curvature is obtained instead of an inflection point. K
The input is the maximum curvature of a curve connecting four points near the input. A curve where this becomes smaller is desirable. K
output is the maximum curvature of the curve connecting the four points near the output. This is also better if it is smaller. Therefore, the sum of the two is taken to find the point that gives the minimum. Therefore, the adaptation coefficient
【0204】 rij(ol)=min{γ(Kinput +Koutput)-1,1} (57)R ij (ol) = min {γ (K input + K output ) −1 , 1} (57)
【0205】として定義する。γは定数である。これは
最適である時に曲率の和がほぼγになるように決める。Is defined as γ is a constant. This is determined so that the sum of the curvatures becomes approximately γ at the optimal time.
【0206】図29は確率変数の計算を繰り返してt=
4になった時に繰り返しを停止してこれで得た確率変数
Pi 4 (o)が最大になる接合点候補の番号oを求めこ
れを、前記の仮接合点xi が属する接合点候補の内の最
適接合点λo i とするのである。これを最適接合点記憶
装置Kに入力する。このような操作を輪郭点列群の全て
の仮接合点について行い、それぞれのカテゴリ−の接合
点候補を決定する。FIG. 29 shows that the calculation of the random variable is repeated and t =
4 to a random variable P i 4 obtained in this stop repeatedly when it becomes this calculated number o junctions candidates (o) is maximized, the junction point candidate tentative junction x i of the belongs Is the optimum junction point λ o i . This is input to the optimum junction storage device K. Such an operation is performed for all the temporary joining points of the outline point sequence group, and joining point candidates of each category are determined.
【0207】[最適接合点記憶装置] 前記の操作によって求めた最適接合点を全て格納する装
置である。図29の最下段に示すように、最適接合点を
(xi u,yi u)として格納する。uは輪郭点列の番号で
ある。iは群uの中で接合点に付けた番号である。先程
は仮接合点にxiという番号(y座標も代表させてい
る)を付けており、番号iが同一であるが、これは差し
支えないことである。仮接合点一つに最適接合点一つが
対応するし、最適接合点は先程求めた仮接合点と同一か
または極近くにあるからである。[Optimal junction storage device] This is an apparatus for storing all the optimal junctions obtained by the above operation. As shown at the bottom of FIG. 29, the optimum joining point is stored as (x i u , y i u ). u is the number of the contour point sequence. i is the number assigned to the junction in group u. In the above, the temporary joining point is given the number x i (which also represents the y coordinate), and the number i is the same, but this is not a problem. This is because one optimal joining point corresponds to one temporary joining point, and the optimal joining point is the same as or very close to the temporary joining point obtained earlier.
【0208】ここまでの操作を順に説明したが、筋道を
分かりやすくするために、ここで「ぱ」という文字を例
にしてこれまでの操作を簡単に振り返る。図30におい
て黒字で「ぱ」という文字がある。これをイメージスキ
ャナで読み込んで画像とする。画像処理して輪郭点列抽
出を行う。これは白抜きの文字で表される。右肩の丸は
真円抽出によって取り出され真円記憶機構によって記憶
される。The operations up to this point have been described in order, but in order to make it easy to understand the course, the operations up to this point will be briefly reviewed using the character “ぱ” as an example. In FIG. 30, there is a black character "@". This is read by an image scanner to form an image. Image processing is performed to extract a contour point sequence. This is represented by white letters. The circle on the right shoulder is extracted by the perfect circle extraction and stored by the perfect circle storage mechanism.
【0209】残りは「は」になる。輪郭点列としては独
立の3つの群がある。これらの全長に渡って区分的多項
式近似をする。そして曲率を計算して仮接合点を求め
る。これが3段目に書いてある。仮接合点は線分の継ぎ
目に現れる。4段目に×の印で仮接合点を示す。曲率で
選ぶので「は」の右下部分は仮接合点として現れないこ
とがある。この場合はこの点が接合点となるように追加
する。次に接合点候補を求める。さらに「は」の下の交
差点の部分において近傍接合点を抽出する。以上の説明
でここまで明らかになっている。The rest is "ha". There are three independent groups of contour points. Piecewise polynomial approximation is performed over these entire lengths. Then, the curvature is calculated to determine a temporary joining point. This is written in the third row. Temporary junctions appear at seams of line segments. In the fourth row, the temporary joining points are indicated by crosses. Since it is selected by curvature, the lower right part of "ha" may not appear as a temporary junction. In this case, it is added so that this point becomes a joining point. Next, joint point candidates are obtained. Further, near junctions are extracted at intersections below “ha”. The above description has made it clear so far.
【0210】[L.接合点除去機構]ここではこれまで
に抽出された接合点の内不要である接合点を除去する。
図31はこれを表すフロ−チャ−トである。最適接合点
記憶装置から最終接合点を読み込む。{λo i }=
{(xi u ,yi u )}i=0 I-1である。uは群番号、i
は群での接合点の番号である。この後直線近似における
冗長な接合点除去を行う。[L. Junction point removal mechanism] Here, unnecessary junction points are removed from the junction points extracted so far.
FIG. 31 is a flowchart showing this. The final junction is read from the optimal junction storage. {Λ o i } =
{(X i u , y i u )} i = 0 I−1 . u is the group number, i
Is the number of the junction in the group. Thereafter, redundant junction removal in the linear approximation is performed.
【0211】さらに円弧近似における冗長な接合点を除
去する。最終接合点は輪郭点列ごとに、座標(xi ′ u
,yi ′ u )と、番号i′によって記憶装置に記憶
される。Further, redundant junction points in the arc approximation are removed. The final joining point is defined by coordinates (x i ′ u
, Y i ′ u ) and the number i ′.
【0212】これまでに求めた接合点は、輪郭線を区分
的多項式で近似し、曲率を求め、仮接合点を求め接合点
候補から最終接合点を求めたものである。従って不要な
接合点は殆どない筈であるがそれでも画像ノイズの影響
などで、不要な接合点が存在する可能性がある。それは
直線の接合点と、円弧の接合点である。The joint points determined so far are obtained by approximating the contour with a piecewise polynomial, determining the curvature, determining the temporary joint points, and determining the final joint points from the candidate joint points. Therefore, there should be almost no unnecessary junctions, but there is still a possibility that there are unnecessary junctions due to the influence of image noise. It is the junction of a straight line and the junction of an arc.
【0213】[直線の接合点の除去] 図32の輪郭点
列の例は線分の中に接合点がある場合を示す。これの座
標を(Xi4 B 、Yi4 B )によって表現する。この接
合点を順次評価し、直線の接合点が2点以上連続した区
間が存在する時、これの内3つの連続する点列をとり、
i4 =ns、ns+1、ns+2とする。両側の(Xns
B 、Yns B )と(Xns+2 B 、Yns+2 B )を直線
で結ぶ。中間の接合点(Xns+1 B 、Yns+1 B )から
この直線に下した垂線の長さをLns+1とする。これが予
定めた定数K7 より小さいとき[Removal of Joint Point of Straight Line] The example of the outline point sequence in FIG. 32 shows a case where there is a joint point in a line segment. These coordinates are represented by (X i4 B , Y i4 B ). The joint points are sequentially evaluated, and when there is a section in which two or more straight line joint points are continuous, a sequence of three consecutive points is taken out of these.
Let i 4 = ns, ns + 1, ns + 2. (X ns on both sides
B , Y ns B ) and (X ns + 2 B , Y ns + 2 B ) are connected by a straight line. Let L ns + 1 be the length of a perpendicular line drawn from the intermediate junction (X ns + 1 B , Y ns + 1 B ) to this straight line. When this is smaller than the constant K 7 that defines pre
【0214】 Lns+1<K7 (58)L ns + 1 <K 7 (58)
【0215】この接合点は除去する。図33はこのよう
な接合点を除去し両側の接合点を結び付けた状態を示
す。反対に、垂線の足Lns+1が定数K7 以上である時This junction is removed. FIG. 33 shows a state where such joints are removed and the joints on both sides are connected. Conversely, when the perpendicular leg L ns + 1 is greater than the constant K 7
【0216】 Lns+1≧K7 (59)L ns + 1 ≧ K 7 (59)
【0217】この接合点は維持される。このような評価
を全ての接合点に対して行う。This junction is maintained. Such an evaluation is performed for all joint points.
【0218】[円弧の接合点の除去] 前段階迄に抽出
された円弧の接合点の中に、複数個の接合点が連続して
いる事がある。この場合に於いて、中間の接合点を除去
してもデ−タの品質が保たれる場合、その接合点を除去
する事とする。除去の可能性の判定は次のように行う。
図34に示すように、円弧の接合点を(Xi4 B 、
Yi4 B)で表す。i4 が連続番号である。[Removal of Arc Joints] A plurality of joints may be continuous among the arc joints extracted up to the previous stage. In this case, if the data quality is maintained even if the intermediate junction is removed, the junction is removed. The possibility of removal is determined as follows.
As shown in FIG. 34, the joining points of the arcs are represented by (X i4 B ,
Y i4 B ). i 4 is a sequential number.
【0219】図34のように3つの接合点(Xns B 、Y
ns B )、(Xns+1 B 、Yns+1 B )、(Xns+2 B 、Yns+2
B )が連続して存在するとする。この時(Xns B 、Yns
B )から開始する円弧(メ)と(Xns+1 B 、Yns+1 B )
から開始する円弧(ミ)とに着目する。図35に示すよ
うに、両円弧の半径をrns、rns+1とする。中心座標を
それぞれ(xns、yns)、(xns+1、yns+1)とする。
円弧メ、ミは次の条件を満足する時単一の円弧と見なさ
れる。As shown in FIG. 34, three junctions (X ns B , Y
ns B), (X ns + 1 B, Y ns + 1 B), (X ns + 2 B, Y ns + 2
Suppose that B ) exists continuously. At this time (X ns B , Y ns
The arc (me) starting from B ) and (X ns + 1 B , Y ns + 1 B )
Attention is focused on an arc (mi) starting from. As shown in FIG. 35, let the radii of both arcs be r ns and r ns + 1 . The center coordinates are (x ns , y ns ) and (x ns + 1 , y ns + 1 ), respectively.
An arc is considered a single arc when the following conditions are met:
【0220】 |rns+1 − rns | < K8 (60)| R ns + 1 −r ns | <K 8 (60)
【0221】 {(xns+1−xns)2 +(yns+1−yns)2 }1/2 <K9 (61){(X ns + 1 −x ns ) 2 + (y ns + 1 −y ns ) 2 } 1/2 <K 9 (61)
【0222】つまり中心座標がほぼ同一点で半径がほぼ
同じであれば、2つの円弧メ、ミは同じ円弧の一部分と
見做すのである。この場合中間の接合点(Xns+1 B 、Y
ns+1 B )は不必要であるものとして除去される。そうで
ない場合この接合点は維持される。That is, if the center coordinates are substantially the same and the radii are substantially the same, the two arcs M and M are regarded as a part of the same arc. In this case, the intermediate junction (X ns + 1 B , Y
ns + 1 B ) are removed as unnecessary. Otherwise, this junction is maintained.
【0223】このような判定と除去、維持の作業が順次
すべての円弧の接合点に対して行われる。半径差、中心
差の閾値は適当に決めるべきであるが、例えばK8 =
1、K9 =2と定めると好都合である。The above-described judgment, removal, and maintenance operations are sequentially performed on all arc junctions. The threshold values of the radius difference and the center difference should be appropriately determined. For example, K 8 =
It is convenient to set 1, K 9 = 2.
【0224】以上の操作によって直線と円弧に於いて、
不要な接合点が除かれる。これはデ−タを圧縮するとい
う上で有効である。それだけでなく、直線や円弧である
べきものをあるべき姿に修正するのであるからデ−タの
品質を高めるという積極的な意義がある。こうして選ば
れた接合点は最終接合点ということにする。With the above operation, in the straight line and the circular arc,
Unnecessary joints are eliminated. This is effective in compressing data. In addition, since it is necessary to correct what should be a straight line or a circular arc into a desired shape, it has a positive significance of improving the quality of data. The junction selected in this way is referred to as a final junction.
【0225】[M.最終接合点記憶装置]不要な接合点
を除去して得た、最終接合点は最終接合点記憶装置に記
憶される。これは図31の最終段に示すとおり、座標
(xi u ,yi u )i=0 I-1である。ただし図面では、最
適接合点と区別するために′が付いている。′は1/4
角にできないので明細書では′を省いている。実際は′
が付いているのである。[M. Final Junction Storage] The final junction obtained by removing unnecessary junctions is stored in the final junction storage. This is as shown in the last stage of FIG. 31, the coordinates (x i u, y i u ) is a i = 0 I-1. However, in the drawings, 'is added to distinguish it from the optimum junction. 'Is 1/4
'Is omitted in the specification because it cannot be cornered. Actually '
It is with.
【0226】[N.デ−タ近似機構B]これまでに得た
輪郭点列、最終接合点、真円などのデ−タからデ−タを
近似する機構である。本発明の中心的な部分である。そ
れぞれの記憶装置から入力されるものは、図36に示す
ように、[N. Data approximation mechanism B] This is a mechanism for approximating data from data such as a contour point sequence, a final joint point, and a perfect circle obtained so far. It is a central part of the present invention. The input from each storage device is as shown in FIG.
【0227】 輪郭点列記憶装置・・・・輪郭点列{(xk u,yk u)}k=0 N(u)-1 u=0 U-1 最終接合点記憶装置・・・最終接合点(xi u,yi u)i=0 I-1 真円記憶装置・・・・・・円Circle(u)[0227] contour point string storage .... contour point sequence {(x k u, y k u)} k = 0 N (u) -1 u = 0 U-1 final junction memory ... Last Junction point (x i u , y i u ) i = 0 I-1 perfect circle storage device ... circle Circle (u)
【0228】である。輪郭点列のサフィックスのuは輪
郭点列群の番号である。kはその輪郭点列群uでの輪郭
点列番号である。N(u)(N u となっている)は
群uでの輪郭点列の数である。iは群uでの最終接合点
である。単にiと書いているが、図36に示すように実
はi′である。′は1/4角にできないのでここでは′
を省いている。最終接合点が得られているが、隣接する
二つの接合点の間(接合点間)を直線、円弧、自由曲線
近似する。近似において媒介変数tを用いてx成分をs
x (t)により、y成分をsy (t)によって表現す
る。Is as follows. The suffix u of the outline point sequence is the number of the outline point sequence group. k is a contour point sequence number in the contour point sequence group u. N (u) (represented by N u) is the number of contour point sequences in the group u. i is the final junction in group u. Although it is simply written as i, it is actually i 'as shown in FIG. 'Cannot be a quarter-angle, so here
Is omitted. Although the final joint point is obtained, a straight line, a circular arc, and a free curve approximation are made between two adjacent joint points (between the joint points). Using the parameter t in the approximation, convert the x component to s
With x (t), the y component is represented by sy (t).
【0229】これは最初に輪郭点列の全体を媒介変数t
で表現したのと同じ手法である。しかし今度は領域が接
合点の間になっているから、tの範囲やtとsx
(t)、s x (t)の対応は前回のものとは異なってい
る。またある接合点から始まる区間が直線の区間である
か、円弧の区間であるか、あるいは自由曲線の区間であ
るかということは、曲率を各点において求めるときに分
かっている。First, the entire contour point sequence is set to the parameter t.
This is the same method as expressed in. But this time the area
Because it is between the confluence points, the range of t and t and sx
(T), s x The response of (t) is different from the previous one
You. The section starting from a certain junction is a straight section
Or a section of an arc or a section of a free curve.
Is determined when the curvature is calculated at each point.
I'm sorry.
【0230】これを記録している場合は、始めから直
線、円弧、自由曲線の何れであるかを区別できる。つま
りその区間の全点における曲率が0であればこれは直線
である。またその区間での曲率が一定値であればこれは
円弧である。さらに曲率が変動すればこれは自由曲線で
ある。このように区間を区別できると近似計算のパラメ
−タを決定するのは簡単である。When this is recorded, it can be distinguished from the beginning whether it is a straight line, an arc or a free curve. That is, if the curvatures at all points in the section are 0, this is a straight line. If the curvature in that section is a constant value, this is an arc. If the curvature further changes, this is a free curve. If the sections can be distinguished in this way, it is easy to determine the parameters for the approximate calculation.
【0231】しかし反対に曲率計算の結果を記憶させて
いなくても、この段階で直線、円弧、自由曲線の別を調
べることができる。区別をしてから近似をしても良い。
本発明はいずれの場合にも適用できる。先ず前者の場合
について述べる。However, on the contrary, even if the result of the curvature calculation is not stored, it is possible to check whether a straight line, a circular arc, or a free curve is present at this stage. The approximation may be made after the distinction.
The present invention can be applied to both cases. First, the former case will be described.
【0232】[直線区間の近似] 直線の接合点から始
まる区間の近似について説明する。接合点の抽出段階に
おいて直線と判断されている。この時、x方向の近似曲
線sx(t)は始点x1 と終点xn3とを結ぶ一次関数に
なる。y方向の近似曲線sy (t)は、始点y1 と終点
yn3とを結ぶ一次関数になる。この場合媒介変数に対し
てx、yともに一次関数になる。[Approximation of Straight Line Section] The approximation of the section starting from the joining point of the straight lines will be described. It is determined to be a straight line in the extraction stage of the joint point. At this time, the approximate curve s x (t) in the x direction becomes a linear function connecting the start point x 1 and the end point x n3 . The approximate curve s y (t) in the y direction is a linear function connecting the start point y 1 and the end point y n3 . In this case, both x and y are linear functions with respect to the parameters.
【0233】媒介変数tとsx (t)、sy (t)の比
例定数がパラメ−タになる。しかしこの比例定数は記憶
する必要がない。直線区間であると始点(x1 ,y1 )
と終点(xn3,yn3)が分かればこの間に直線を引けば
良いからである。また終点の(xn3,yn3)は次の区間
の始点として与えられるので、ここでは記憶する必要が
ない。The proportional constant between the parameter t and s x (t), s y (t) becomes a parameter. However, this proportionality constant does not need to be stored. Start point (x 1 , y 1 ) if it is a straight section
If the end point ( xn3 , yn3 ) is known, a straight line may be drawn between them. The end point (x n3 , y n3 ) is given as the start point of the next section, and need not be stored here.
【0234】[円弧区間の近似] 円弧の接合点から始
まる区間の近似について説明する。この区間は接合点抽
出の段階において円弧と判断されている。円弧を表す近
似曲線sx (t)、sy (t)は、次の三角関数の線形
結合で表される。観測区間をt∈[0,T]とすると、
sx (t)、sy (t)は、[Approximation of Arc Section] The approximation of the section starting from the junction of the arcs will be described. This section is determined to be a circular arc at the point of joint point extraction. The approximate curves s x (t) and s y (t) representing the arc are expressed by the following linear combination of trigonometric functions. If the observation interval is t 区間 [0, T],
s x (t) and s y (t) are
【0235】 sx (t)=Axcos(2πt/(T/narc ))+Bx sin (2πT/(T/n arc ))+Cx (62)Sx (T) = Axcos (2πt / (T / narc )) + Bx sin (2πT / (T / n arc )) + Cx (62)
【0236】 sy (t)=Aycos(2πt/(T/narc ))+By sin (2πT/(T/n arc ))+Cy (63)Sy (T) = Aycos (2πt / (T / narc )) + By sin (2πT / (T / n arc )) + Cy (63)
【0237】によって表現される。narc は円弧の全円
に対する比である。つまり円弧の中心角を360度で割
った値である。例えば4分円の場合は、narc は1/4
である。であるから2πnarc がこの円弧の中心角であ
る。変数2πt/(T/narc)は円弧の始点からパラ
メ−タtに対応する点までの中心角である。(Cx 、C
y )は円弧の中心の座標である。この時、Is represented by n arc is the ratio of the arc to the total circle. That is, it is a value obtained by dividing the central angle of the arc by 360 degrees. For example, in the case of a quadrant , n arc is 1/4
It is. Therefore, 2πn arc is the central angle of this arc. The variable 2πt / (T / n arc ) is the central angle from the starting point of the arc to the point corresponding to the parameter t. (C x , C
y ) is the coordinates of the center of the arc. At this time,
【0238】 Ax 2+Bx 2=Ay 2+By 2 (64)A x 2 + B x 2 = A y 2 + B y 2 (64)
【0239】 By /Ay =Bx /Ax (65)[0239] B y / A y = B x / A x (65)
【0240】が成立すれば近似関数は円弧となる。この
場合、円弧を規定するパラメ−タは関数のそれぞれの係
数Ax 、Bx 、Cx 、Ay 、By 、Cy 、narc であ
る。もしも始めからこの区間が円弧であることが分かっ
ていれば、始点、終点の座標と、曲率と中間の一点の座
標とからこのようなパラメ−タを一義的に決定できる。If the above holds, the approximation function becomes an arc. In this case, parameter defines an arc - data each coefficient A x of the function, B x, is C x, A y, B y , C y, n arc. If it is known from the beginning that this section is a circular arc, such parameters can be uniquely determined from the coordinates of the start and end points, the curvature and the coordinates of one point in the middle.
【0241】[自由曲線の近似] 直線の接合点でも、
円弧の接合点でもない接合点から始まる区間を自由曲線
近似する。媒介変数tで表現するが、輪郭点列は(xi3
u ,yi3 u )で表され、これにtを対応させて、
(ti3 u ,xi3 u )、(ti3 u ,yi3 u )とい
う媒介変数表示とする。これまで輪郭点列のサフィック
スはkであったが、ここで区間の区分の番号としてkを
用いるからkの代わりに、i3を輪郭点列の番号とする
のである。そして輪郭点列の総数をn3とする。[Approximation of Free Curve] Even at the junction of straight lines,
A section starting from a junction that is not a junction of arcs is approximated by a free curve. Although represented by the parameter t, the outline point sequence is (x i3
u , y i3 u ), and corresponding to t,
(T i3 u , x i3 u ) and (t i3 u , y i3 u ) are used as parameters. Until now, the suffix of the contour point sequence was k. However, since k is used as the section number of the section, i3 is used as the contour point sequence number instead of k. Then, the total number of contour point sequences is set to n3.
【0242】そして、二次のフルーエンシー関数ψkを
底としてsx(t)、sy(t)を展開する。フルーエン
シー関数については図40に示した通りである。これは
3つの細区分にのみ値を持つ関数である。区間を[0,
T]として、二次フルーエンシー関数ψkは、M次元の
関数系Then, s x (t) and s y (t) are developed using the second-order fluency function ψ k as the base. The fluency function is as shown in FIG. This is a function that has values only in three subdivisions. The interval is [0,
T], the quadratic fluency function ψ k is an M-dimensional functional system
【0243】 ψk(t)=3(T/M)-2Σq=0 3(−1)q(t−ξk+q)2 + /{(q!(3−q)!)} (66) (k=−2,−1,0,1,2,・・・,M+2){ K (t) = 3 (T / M) −2 } q = 0 3 (−1) q (t−ξ k + q ) 2 + / {(q! (3-q)!)} (66) (k = −2, −1, 0, 1, 2,..., M + 2)
【0244】である。これを底としてsx(ti3)、sy
(ti3)は、係数ck x、ck yを用いて、Is as follows. Using this as the base, s x (t i3 ), s y
(T i3 ) is calculated using the coefficients c k x and c k y .
【0245】 sx(ti3)=Σk=-2 M+2ck xψk(ti3) (67)S x (t i3 ) = Σ k = −2 M + 2 c k x ψ k (t i3 ) (67)
【0246】 sy(ti3)=Σk=-2 M+2ck yψk(ti3) (68)S y (t i3 ) = Σ k = −2 M + 2 c k y ψ k (t i3 ) (68)
【0247】と表現される。ここで、Are expressed as follows. here,
【0248】 t>ξk+qの時 (t−ξk+q)2 +=(t−ξk+q)2 (69)When t> ξ k + q (t−ξ k + q ) 2 + = (t−ξ k + q ) 2 (69)
【0249】 t≦ξk+qの時 (t−ξk+q)2 +=0 (70)When t ≦ ξ k + q (t−ξ k + q ) 2 + = 0 (70)
【0250】と定義されている。ξk+qは、区間TをM
等分したときの細区分である。Is defined. ξ k + q is defined as
It is a subdivision when divided equally.
【0251】 ξk+q=(k+q)T/M (71)Ξ k + q = (k + q) T / M (71)
【0252】係数ck x、ck yは、各輪郭点列の値(xi3
u,yi3 u)と、sx(ti3)、sy(ti3)の値が近似す
るように決定する。最小二乗法で係数の値を決める。2
乗誤差QはThe coefficients c k x and c k y are calculated as the values (x i3
u , y i3 u ) and the values of s x (t i3 ) and s y (t i3 ) are determined to be similar. Determine the value of the coefficient by the least squares method. 2
The squared error Q is
【0253】 Q=Σi3=1 n3|xi3 u−sx(ti3)|2 +Σi3=1 n3|yi3 u−sy(ti3)|2 (72)Q = Σ i3 = 1 n3 | x i3 u −s x (t i3 ) | 2 + Σ i3 = 1 n3 | y i3 u −s y (t i3 ) | 2 (72)
【0254】によって定義される。これを最小にするた
めに、Is defined by To minimize this,
【0255】 Σk=-2 M+2ck x{Σi3=1 n3ψk(ti3)ψw3(ti3)} =Σi3=1 n3xi3ψw3(ti3) (73)Σ k = −2 M + 2 ck x {Σ i3 = 1 n3 ψ k (t i3 ) ψ w3 (t i3 )} = Σ i3 = 1 n3 x i3 ψ w3 (t i3 ) (73)
【0256】 Σk=-2 M+2ck y{Σi3=1 n3ψk(ti3)ψw3(ti3)} =Σi3=1 n3yi3ψw3(ti3) (74) (m=−2,−1,0,1,・・・,M+2) (75)[0256] Σ k = -2 M + 2 c k y {Σ i3 = 1 n3 ψ k (t i3) ψ w3 (t i3)} = Σ i3 = 1 n3 y i3 ψ w3 (t i3) (74) (M = −2, −1, 0, 1,..., M + 2) (75)
【0257】によって決定される。これを解いて、係数
ck x、ck yを求めることができる。この係数が適当であ
るかどうかを評価するために、次のように各点での誤差
の最大値εを求める。Is determined by By solving this, the coefficients c k x and c k y can be obtained. In order to evaluate whether this coefficient is appropriate, the maximum value ε of the error at each point is determined as follows.
【0258】 ε=maxi3=0 n3{(xi3 u−sx(ti3))2 +(yi3 u−sy(ti3))2}1/2 (76)Ε = max i3 = 0 n3 {(x i3 u− s x (t i3 )) 2 + (y i3 u− s y (t i3 )) 2 } 1/2 (76)
【0259】ただし、max演算では、i3の範囲は0
からn3−1までである。この範囲での最大を求めると
いうことである。εが一定数より小さくなるとこれで近
似ができたということにする。例えばε<0.9となる
かどうかということで判定する。もしも一定数よりεが
大きいと、次元数Mをひとつ増やして同様の計算を行
う。次元数が高くなると区分の数が増えるので、近似の
精度が向上する。同様の誤差の計算をすると、何時かε
<0.9となる。この時近似計算が完了したことにな
る。However, in the max operation, the range of i3 is 0
To n3-1. This means finding the maximum in this range. When ε becomes smaller than a certain number, it is determined that the approximation has been completed. For example, it is determined whether ε <0.9. If ε is larger than a certain number, the same calculation is performed by increasing the number of dimensions M by one. As the number of dimensions increases, the number of sections increases, and the accuracy of approximation improves. When calculating the same error, sometime ε
<0.9. At this time, the approximation calculation is completed.
【0260】[O.圧縮デ−タ出力機構]文字フォント
の輪郭線がこれまでの手順によって、直線(線分)、真
円、円弧、自由曲線に分離された。これらは始点、終点
を持ち、傾き、中心、半径などのパラメ−タを持ってい
る。それぞれの種類によって格納すべきデ−タも異なっ
ている。[O. Compressed data output mechanism] The outline of a character font is separated into straight lines (line segments), perfect circles, arcs, and free curves by the above procedure. These have a starting point and an ending point, and have parameters such as inclination, center, and radius. The data to be stored differs depending on the type.
【0261】直線データの場合は、直線である事を示す
フラグ、直線の始点座標をデータとして格納する。終点
座標は次の区間の始点として与えられるのでここでは格
納する必要がない。直線の傾きは直線を定義するパラメ
ータであるが始点と、次の接合点の座標を結ぶことによ
り直線ができるので傾きも不要である。これも格納しな
い。In the case of straight line data, a flag indicating a straight line and the coordinates of the start point of the straight line are stored as data. Since the end point coordinates are given as the start point of the next section, there is no need to store them here. Although the slope of the straight line is a parameter that defines the straight line, a straight line can be formed by connecting the coordinates of the start point and the coordinates of the next junction, so that the slope is unnecessary. This is not stored either.
【0262】真円データの場合は、真円記憶装置Gから
直接にデータを得る事ができる。これは1回目のデータ
近似機構Aによって既に選び出されている。真円の場
合、真円を示すフラグ、円の中心座標、円の半径をデー
タとして格納する。In the case of the perfect circle data, the data can be obtained directly from the perfect circle storage device G. This has already been selected by the first data approximation mechanism A. In the case of a perfect circle, a flag indicating the perfect circle, the center coordinates of the circle, and the radius of the circle are stored as data.
【0263】円弧データとして、円弧である事を示すフ
ラグ、円弧の始点座標、円弧分割長(円弧長/周長)、
輪郭点数、関数の係数を格納する。自由曲線のデータと
しては、関数の次元数、輪郭点数、輪郭点列の変動の中
点及び関数の係数を格納する。As the arc data, a flag indicating an arc, the coordinates of the starting point of the arc, the arc division length (arc length / perimeter),
Stores the number of contour points and function coefficients. As the data of the free curve, the number of dimensions of the function, the number of contour points, the midpoint of the variation of the contour point sequence, and the coefficient of the function are stored.
【0264】[P.圧縮デ−タ記憶装置]圧縮デ−タ出
力機構から出力された、直線、真円、円弧、自由曲線な
どのデ−タを記憶する。これは記憶した後適当な時期に
出力する。ここまではデ−タを圧縮生成し記憶する装置
である。これ以後が蓄積されたデ−タから文字を再生す
る装置を説明する。圧縮デ−タ記憶装置Pに格納される
デ−タ構造を表1に示す。[P. Compressed data storage device] Stores data such as straight lines, perfect circles, circular arcs, and free curves output from the compressed data output mechanism. This is output at an appropriate time after being stored. Up to this point, the data is compressed and generated and stored. Hereinafter, an apparatus for reproducing characters from the stored data will be described. Table 1 shows the data structure stored in the compressed data storage device P.
【0265】[0265]
【表1】 [Table 1]
【0266】以下に説明する輪郭再生機構R、文字再生
機構S、再生デ−タ出力機構Tは文字フォントを任意の
大きさに再生するための再生デ−タ生成装置を構成す
る。The outline reproduction mechanism R, character reproduction mechanism S, and reproduction data output mechanism T described below constitute a reproduction data generation device for reproducing a character font to an arbitrary size.
【0267】[R.輪郭再生機構]これは記憶されてい
る圧縮デ−タから文字フォントの骨格となるべき輪郭線
を再生する機構である。輪郭線は直線、真円、円弧、自
由曲線の場合がある。[R. Contour Reproducing Mechanism] This is a mechanism for reproducing a contour to be a skeleton of a character font from stored compressed data. The contour may be a straight line, a perfect circle, an arc, or a free curve.
【0268】[直線の再生] 直線の再生は、始点の座
標から、次の区間の接合点の座標までを直線で結ぶこと
によって行われる。直線の傾きに関するデ−タは不要で
ある。 [真円の再生] 真円の再生は、中心の座標と半径のデ
−タから、中心座標を中心として与えられた半径の円を
描く事によって行われる。 [円弧の再生] 円弧の再生は格納されている各デ−タ
(Ax ,Bx ,...)を次の式に代入する事によって
行われる。[Reproduction of Straight Line] Reproduction of a straight line is performed by connecting a straight line from the coordinates of the starting point to the coordinates of the joining point in the next section. No data regarding the inclination of the straight line is required. [Reproduction of Perfect Circle] Reproduction of a perfect circle is performed by drawing a circle having a given radius around the center coordinates from data of the coordinates and the radius of the center. [Reproduction of circular arc] Reproduction of circular arc is performed by substituting each stored data (A x , B x ,...) Into the following equation.
【0269】 Sx(t) = Axcos{2πt/(T/narc)} +Bxsin{2πt/(T/narc)} +Cx (7 7)S x (t) = A x cos {2πt / (T / n arc )} + B x sin {2πt / (T / n arc )} + C x (77)
【0270】 Sy(t) = Aycos{2πt/(T/narc)} +Bysin{2πt/(T/narc)} +Cy (7 8)S y (t) = A y cos {2πt / (T / n arc )} + B y sin {2πt / (T / n arc )} + C y (78)
【0271】パラメ−タtを[0〜T]の区間で変動さ
せる事により、Sx (t)、Sy (t)からx、y座標
を得る。The x and y coordinates are obtained from S x (t) and S y (t) by varying the parameter t in the interval [0 to T].
【0272】[自由曲線の再生] 各標本点tiに於ける近似関数の基底ψkの値は、標本点
tiが区間[(L+2)(T/M,L(L+3)(T/
M)]内にある時(1≦L≦M)、p=L+3−ti×
M/Tを用いて、[Reproduction of Free Curve] The value of the basis ψ k of the approximation function at each sample point t i is such that the sample point t i is in the interval [(L + 2) (T / M, L (L + 3) (T /
M)] when in (1 ≦ L ≦ M), p = L + 3-t i ×
Using M / T,
【0273】 ψk(ti)=0.5p2 k=L (79) ψk(ti)=p(1−p)+0.5 k=L+1 (80) ψk(ti)=0.5(p−1)2 k=L+2 (81) ψk(ti)=0 k≦L−1,L+3≦k (82) によって表される。ただしLは次元数M以下の自然数で
ある。同一の性質の数であるからM’と書くべきである
が、’が1/4角にならないので、Lで表現している。Ψ k (t i ) = 0.5 p 2 k = L (79) ψ k (t i ) = p (1−p) +0.5 k = L + 1 (80) ψ k (t i ) = 0 0.5 (p−1) 2 k = L + 2 (81) ψ k (t i ) = 0 k ≦ L−1, L + 3 ≦ k (82) Here, L is a natural number of dimensions M or less. It should be written as M 'because they have the same property, but since' does not become a quarter angle, it is represented by L.
【0274】このような基底ψkを用いて各標本点に於
ける近似関数値S(ti)はUsing such a base ψ k , the approximate function value S (t i ) at each sample point is
【0275】 S(ti)=Σk=L L+2Ckψk(ti) (83)[0275] S (t i) = Σ k = L L + 2 C k ψ k (t i) (83)
【0276】によって求められる。Is determined by
【0277】[S.文字再生機構]輪郭線が得られたの
で輪郭線で囲まれた部分を黒画素として、白黒の2値画
像にして文字形状に再生する。あるいは反対に輪郭線で
囲まれた部分を白画素とし、残りを黒画素とすることも
できる。さらに輪郭線で囲まれた部分をある色彩とし、
他の部分を他の色彩とすることもできる。要するに輪郭
線の内外が区別できるようにすれば良い。[S. Character reproducing mechanism] Since the outline is obtained, a portion surrounded by the outline is set as a black pixel, and a black and white binary image is reproduced in a character shape. Or, conversely, the portion surrounded by the outline can be white pixels, and the rest can be black pixels. In addition, the part surrounded by the outline is a certain color,
Other parts can be of other colors. In short, it suffices that the inside and outside of the contour can be distinguished.
【0278】[T.再生デ−タ出力機構]関数の係数か
ら画像を再生するために、例えば再生画像の大きさを1
mm角からA3版大まで指定できるレイアウトエデイタ
を用いる。再生画像は300DPIの精度を持つレ−ザ
プリンタ或は600DPIの精度を持つレ−ザプリンタ
を用いて印字される。さらに、3000DPIの電植機
(印刷機器)、または400DPIのポストスクリプト
対応プリンタ、レ−ザカッタ等によって出力することが
できる。[T. Reproduction data output mechanism] In order to reproduce an image from the coefficient of the function, for example, the size of the reproduced image is set to 1
Use a layout editor that can specify from mm square to A3 size large. The reproduced image is printed by using a laser printer having an accuracy of 300 DPI or a laser printer having an accuracy of 600 DPI. Further, it can be output by a 3000 DPI electroplanter (printing device), a 400 DPI postscript compatible printer, a laser cutter, or the like.
【0279】文字フォントは関数の係数の形で記憶され
ていて、任意の倍率に拡大縮小することができる。また
座標もその中心を任意に指定する事ができる。このた
め、任意のデザイン文字を任意の位置に任意の大きさで
植字する事ができる。The character font is stored in the form of a coefficient of a function, and can be scaled to an arbitrary magnification. Also, the center can be arbitrarily specified for the coordinates. For this reason, an arbitrary design character can be type-set at an arbitrary position in an arbitrary size.
【0280】上記の機構は、C言語を用いたプログラム
によって、浮動小数点演算用の数値演算プロセッサを搭
載したPC−9801DAに実装する事ができる。The above mechanism can be implemented by a program using the C language in a PC-9801DA equipped with a numerical processor for floating-point arithmetic.
【0281】本発明の効果を確かめるために、明朝体
「明」「体」ゴシック体の「語」及びJIS第1水準の
文字について本発明によりデ−タ圧縮した。その結果を
表2に示す。またこれら、「明」、「体」、「語」の3
文字について図37〜図39に原画像と、本発明による
再生画像(300DPIのレ−ザプリンタによる)を示
す。ほぼ忠実に再生できているということが分かる。In order to confirm the effects of the present invention, data was compressed according to the present invention with respect to "Mincho""Min" and "Body" Gothic "words" and JIS first-level characters. Table 2 shows the results. In addition, three of these “akira”, “body”, and “word”
37 to 39 show the original image and the reproduced image according to the present invention (by a 300 DPI laser printer) for characters. It can be seen that the reproduction was almost faithful.
【0282】[0282]
【表2】 [Table 2]
【0283】表2はそれぞれの文字を本発明の方法によ
りデ−タ圧縮した後のデ−タ量(Byte)と圧縮率
(%)、圧縮時間(秒)を示している。ここで圧縮率と
いうのは、原画像のデ−タ量(約8kbyte)によっ
て本発明方法に従って圧縮されたフォントのデ−タ量
(byte)を割って100を掛け%として表したもの
である。原画像が約8kbyteのデ−タ量を持つが、
本発明方法で圧縮すると、300〜500byteのデ
−タ量に減少する。Table 2 shows the data amount (byte), compression ratio (%), and compression time (second) after each character is subjected to data compression by the method of the present invention. Here, the compression ratio is obtained by dividing the data amount (byte) of the font compressed according to the method of the present invention by the data amount (about 8 kbytes) of the original image and multiplying by 100 and expressing it as%. Although the original image has a data amount of about 8 kbytes,
When compressed by the method of the present invention, the data amount is reduced to 300 to 500 bytes.
【0284】圧縮率が2〜6%程度であって、極めて少
量のデ−タに還元できる。また1文字当たりの圧縮時間
は数秒程度であって、極めて短時間である。ここでいう
圧縮時間はCPU時間であり、一語に収められるデ−タ
の分割合成処理時間、グラフィック時間も含まれてい
る。The compression ratio is about 2 to 6%, and can be reduced to an extremely small amount of data. The compression time per character is about several seconds, which is extremely short. Here, the compression time is a CPU time, and also includes a time required for processing for dividing and combining data contained in one word and a graphic time.
【0285】このように処理時間が短く、デ−タ量が少
なくなるのは、活字体の文字は多く直線部分よりなり、
明白な接合点として第1段階で抽出されるため、第2段
階で反復近似して求められる接合点の数が少ないためで
ある。The reason why the processing time is short and the amount of data is small is that many characters in the typeface are composed of straight portions,
This is because the number of joint points obtained by iterative approximation in the second step is small because the joint points are extracted as obvious joint points in the first stage.
【0286】[U.画像記憶装置2]再生された文字フ
ォントをそのまま記憶するものである。プリンタによっ
て打ち出された文字をそのまま記憶する全ての機構装置
を意味する。ビデオカメラなどを用いることもできる。
プリントされた紙面もこれに含まれる。画像記憶装置は
別段無くても差し支えない。[U. Image storage device 2] Stores the reproduced character font as it is. It means any mechanical device that stores characters printed by the printer as it is. A video camera or the like can also be used.
This includes the printed page. The image storage device may be omitted.
【0287】[0287]
【発明の効果】本発明は、基本となる文字フォントを読
み取り、少ないデ−タにして記憶し蓄積することを可能
とする。また1文字当たりの処理時間が短い。ために数
千字からなる漢字の新規な文字フォントを創案した時で
もこれを短時間にデ−タとして蓄積できる。単に蓄積し
ただけでなく、再生するのも簡単である。蓄積デ−タを
用いて、任意の大きさの文字を再生できる。According to the present invention, it is possible to read a basic character font and store and store it with a small amount of data. Also, the processing time per character is short. Therefore, even when a new character font of thousands of kanji is created, it can be stored as data in a short time. It's not just stored, it's easy to play. Using the stored data, characters of any size can be reproduced.
【0288】従来は文字の拡大、縮小が容易でなく、光
学的手段によって拡大、縮小する他に手段がなかった。
光学的に画像を拡大縮小移動などを行うとノイズが入っ
て品質が低下する。また自由度も低く時間も掛かる。Conventionally, enlargement and reduction of characters have not been easy, and there has been no means other than enlargement or reduction by optical means.
If the image is optically enlarged or reduced, noise is introduced and the quality is reduced. Also, the degree of freedom is low and it takes time.
【0289】本発明は、接合点と区分的多項式の係数と
してデ−タを蓄積するので、文字スケ−ルの拡大縮小な
どは計算によって行うことができる。従って文字の拡大
縮小移動などが迅速で自由に行える。これらの操作によ
って文字の品質が劣化するということもない。本発明は
さらに接合点の除去を通じて文字フォントの品質を向上
させることができる。According to the present invention, since data is accumulated as joint points and coefficients of a piecewise polynomial, enlargement and reduction of the character scale can be performed by calculation. Therefore, enlargement / reduction movement of characters can be performed quickly and freely. These operations do not degrade character quality. The present invention can further improve the quality of character fonts through the removal of junctions.
【図1】本発明の文字フォントデ−タ入力出力装置の全
体の機構を示す全体構成図。FIG. 1 is an overall configuration diagram showing an overall mechanism of a character font data input / output device of the present invention.
【図2】文字を読み取った画像において画素に対して定
義するX、Y座標系を示す図。FIG. 2 is a diagram showing an X, Y coordinate system defined for pixels in an image obtained by reading characters.
【図3】ひとつの画素の周りのチェ−ンコ−ドを示す
図。FIG. 3 is a diagram showing a chain code around one pixel.
【図4】画像デ−タにおいて輪郭点を探索するための走
査の方向を示す図。FIG. 4 is a diagram showing a scanning direction for searching for a contour point in image data.
【図5】一つの輪郭点が分かった時に次の輪郭点を見付
けるための探索方向を示す図。FIG. 5 is a diagram showing a search direction for finding a next contour point when one contour point is found.
【図6】黒画素と白画素が存在する時ある輪郭点とその
次の輪郭点を示す図。FIG. 6 is a diagram showing a contour point when a black pixel and a white pixel exist and a contour point next thereto.
【図7】ロの字型の画像デ−タにおいて外側の輪郭線と
内側の輪郭線を抽出し画素に値2を対応させている状態
を示す図。FIG. 7 is a diagram showing a state in which an outer contour line and an inner contour line are extracted from square-shaped image data and a pixel is assigned a value of 2;
【図8】輪郭点列抽出装置の構成を示すフロ−チャ−
ト。FIG. 8 is a flowchart showing the configuration of a contour point sequence extraction device.
G.
【図9】輪郭点列を近似し曲率を求めるためのデ−タ近
似機構のフロ−チャ−ト。FIG. 9 is a flowchart of a data approximation mechanism for approximating a contour point sequence and obtaining a curvature.
【図10】デ−タ近似機構の一部であって輪郭点列の全
体を区分的多項式で近似する際の係数を決定する過程を
示すフロ−チャ−ト。FIG. 10 is a flow chart showing a process of determining a coefficient which is a part of the data approximation mechanism and approximates the entire contour point sequence by a piecewise polynomial.
【図11】前段で近似された輪郭点列の各点における曲
率計算のためのフロ−チャ−ト。FIG. 11 is a flowchart for calculating a curvature at each point of a contour point sequence approximated in the preceding stage.
【図12】区分的多項式で近似されたデ−タに基づいて
真円を抽出するための機構を示すフロ−チャ−ト。FIG. 12 is a flowchart showing a mechanism for extracting a perfect circle based on data approximated by a piecewise polynomial.
【図13】接合点抽出手法の概略を示す流れ図。FIG. 13 is a flowchart showing an outline of a joining point extraction technique.
【図14】先に計算された曲率から接合点の位置を抽出
するための機構を示すフロ−チャ−ト。FIG. 14 is a flowchart showing a mechanism for extracting a position of a joining point from a curvature calculated previously.
【図15】文字フォントを作るための原文字の一例
「あ」、「ポ」を示す図。FIG. 15 is a diagram showing an example of original characters “A” and “Po” for creating a character font.
【図16】「あ」と「ポ」の輪郭点列を求めさらに接合
点を抽出した例を示す図。FIG. 16 is a diagram showing an example in which a sequence of outline points of “A” and “Po” is obtained, and a joint point is further extracted.
【図17】最適接合点抽出機構の概略のフロ−チャ−
ト。FIG. 17 is a schematic flowchart of an optimum joint extracting mechanism;
G.
【図18】曲率によって選ばれた仮接合点とこの近傍の
接合点候補の番号を示す図。FIG. 18 is a diagram showing temporary junction points selected based on curvature and numbers of candidate junction points in the vicinity thereof.
【図19】曲率によって選ばれた仮接合点に出力近傍の
近傍接合点がある場合の各点に付す番号を示す図。FIG. 19 is a diagram showing numbers assigned to respective points in the case where a temporary junction selected by curvature has a nearby junction near the output.
【図20】近傍接合点がある場合において適合係数を決
定するためのフロ−チャ−ト。FIG. 20 is a flowchart for determining an adaptation coefficient when there are neighboring junctions.
【図21】曲率によって選ばれた仮接合点の近くの接合
点候補C、出力近傍の接合点候補B、仮接合点の次の接
合点Dと、出力近傍の接合点の直前の接合点Aを結ぶ近
似曲線の例と変曲点の数を示す図。FIG. 21 shows a junction candidate C near the temporary junction selected by the curvature, a junction B near the output, a junction D next to the temporary junction, and a junction A immediately before the junction near the output. The figure which shows the example of the approximate curve which connects and the number of inflection points.
【図22】曲率によって選ばれた仮接合点に近傍接合点
が存在しない場合の適合係数を求めるためのフロ−チャ
−ト。FIG. 22 is a flowchart for calculating an adaptation coefficient when there is no neighboring joint at a temporary joint selected by curvature.
【図23】仮接合点に近傍接合点が存在しない場合にお
いて、この仮接合点の接合点候補Bと、前後の仮接合点
の接合点候補A、Cとこれらを結ぶ曲線と、これらの点
に付する番号を明らかにするための図。FIG. 23 is a diagram showing a connection point candidate B of the temporary connection point, connection point candidates A and C of the temporary connection points before and after the temporary connection point, and a curve connecting these points when there is no nearby connection point at the temporary connection point; The figure for clarifying the number attached to.
【図24】曲率によって選ばれた仮接合点の近くの接合
点候補C、入力近傍の近傍接合点の近くの接合点候補
B、その仮接合点の直前の仮接合点の接合点候補Dの定
義と符号を説明するための図。FIG. 24 shows a candidate joint C near a temporary joint selected by curvature, a candidate B near a nearby joint near input, and a candidate D of a temporary joint immediately before the temporary joint. The figure for demonstrating a definition and a code | symbol.
【図25】ひとつの仮接合点の入力近傍、出力近傍であ
る近傍接合点の決定のためのフロ−チャ−ト。FIG. 25 is a flowchart for determining a neighboring junction which is an input neighborhood and an output neighborhood of one temporary junction.
【図26】接合点候補の内どれが最適の接合点であるか
を表す確率変数の定義と繰り返し演算を示すフロ−チャ
−ト。FIG. 26 is a flowchart showing the definition of a random variable indicating which of the junction candidates is the optimum junction and the repetitive operation.
【図27】他の適合係数の与え方を示すフロ−チャ−
ト。FIG. 27 is a flow chart showing how to give another adaptation coefficient.
G.
【図28】仮接合点を中心とする2α+1個の接合点候
補に与える初期確率を示す図。FIG. 28 is a diagram showing an initial probability given to 2α + 1 joint point candidates with a temporary joint point as a center.
【図29】全ての仮接合点に関して確率変数の計算を行
い、最大確率を与える接合点候補を最適接合点とし最適
接合点記憶装置に記憶することを示す図。FIG. 29 is a diagram showing that a random variable is calculated for all temporary junctions, and a junction candidate that gives the maximum probability is stored as an optimum junction in the optimum junction storage device.
【図30】「ぱ」を例にしてこれまでの手順を簡単に振
返って示す図。FIG. 30 is a diagram briefly showing the procedure up to this point by taking “ぱ” as an example.
【図31】最適接合点から不要な接合点を除去し、最終
接合点を求める操作を説明するフロ−チャ−ト。FIG. 31 is a flowchart for explaining an operation of removing an unnecessary joint point from an optimum joint point and obtaining a final joint point.
【図32】複数個の直線の接合点が連続して存在してい
る時において除去すべきか否かを判断すべき対象である
中間の接合点と両端の接合点の符号を示す図。FIG. 32 is a diagram showing signs of intermediate junctions and junctions at both ends which are objects to be determined whether or not to be removed when a plurality of straight junctions are continuously present.
【図33】図35の配置において両端の接合点を結ぶ直
線へ中間の接合点から下した垂線の足の長さがある閾値
よりも小さい時に中間の接合点を除去することを示す
図。FIG. 33 is a view showing removal of the intermediate junction when the length of a perpendicular foot descending from the intermediate junction to the straight line connecting the junctions at both ends in the arrangement of FIG. 35 is smaller than a certain threshold;
【図34】複数個の円弧の接合点が連続して存在してい
る時において除去すべきか否かを判断すべき中間の接合
点と、両端の接合点の符号を示す図。FIG. 34 is a view showing intermediate joint points to be determined whether or not to be removed when a plurality of arc joint points are continuously present, and the signs of the joint points at both ends.
【図35】図37において第1の接合点から始まる円弧
の半径、中心、第2の接合点から始まる円弧の半径、中
心を示す図。FIG. 35 is a diagram showing the radius and center of an arc starting from a first junction, and the radius and center of an arc starting from a second junction in FIG. 37;
【図36】輪郭点列、最終接合点、真円などのデ−タか
らデ−タを近似し近似関数によって輪郭点列を表す操作
を説明するための図。FIG. 36 is a view for explaining an operation of approximating data from data such as a contour point sequence, a final joint point, and a perfect circle, and expressing the contour point sequence by an approximation function.
【図37】体という文字の原画像とこれを本発明の方法
によってデ−タ圧縮しさらに再生した画像の図。FIG. 37 is a diagram of an original image of the character “body” and an image obtained by compressing and reproducing the original image by the method of the present invention.
【図38】語という文字の原画像とこれを本発明の方法
によってデ−タ圧縮しさらに再生した画像の図。FIG. 38 is a view showing an original image of a word character and an image obtained by data compression and reproduction of the original image by the method of the present invention.
【図39】明という文字の原画像とこれを本発明の方法
によってデ−タ圧縮しさらに再生した画像の図。FIG. 39 is a view of an original image of the word “bright” and an image obtained by data compression and reproduction of the original image by the method of the present invention.
【図40】2次のフル−エンシ−関数と0次、1次、3
次のフル−エンシ−関数の概略図。FIG. 40 shows a quadratic full-energy function and 0th, 1st and 3rd order
Schematic diagram of the next full-energy function.
【図41】2次のフル−エンシ−関数を採用した場合に
基底関数の数が少ない時十分にデ−タを近似できないと
しても、次元数を上げると近似を上げることができる事
を示す概略図。FIG. 41 is a schematic diagram showing that approximation can be increased by increasing the number of dimensions even when data is not sufficiently approximated when the number of basis functions is small when a quadratic full-energy function is employed. FIG.
【図42】「和」という文字を例にとり、輪郭点列の全
体を区分的多項式近似する手続を示す図。FIG. 42 is a diagram showing a procedure for approximating the whole contour point sequence piecewise by a piecewise polynomial using the character “sum” as an example.
───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭60−49483(JP,A) 特開 昭57−159363(JP,A) 特開 昭62−274372(JP,A) 特開 昭61−221979(JP,A) 電子情報通信学会論文誌D VOL. J70−D NO.6 P.1164−1172 (昭和62年6月) 電子情報通信学会論文誌D−II V OL.J73−D−II NO.9 P. 1448−1457(平成2年9月) ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-60-49483 (JP, A) JP-A-57-159363 (JP, A) JP-A-62-274372 (JP, A) JP-A-61-274 221979 (JP, A) IEICE Transactions D VOL. J70-D NO. 6P. 1164-1172 (June 1987) IEICE Transactions D-II VOL. J73-D-II NO. 9 P. 1448-1457 (September 1990)
Claims (7)
み取り、縦横に有限個並ぶ画素に対応させて記憶する文
字読み取り装置と、 (b)縦横に並ぶ画素に対応付けて読み取られた文字の
輪郭線を抽出する輸郭線抽出機構と、 (c)抽出された輪郭線の2次元座標(X,Y)を連続
する群毎に記憶する輪郭点列記憶機構と、 (d)前記の群毎の輪郭点列のX、Y座標をtを独立変
数、xとyを従属変数とする2次の区分的多項式で近似
し、近似精度が所定範囲になるまで2次の区分的多項式
の次元数を増やしながら最小二乗近似を繰り返し輪郭点
列の群毎の近似多項式を求めるデータ近似機構Aと、 (e)前記の近似結果からx、y空間での群毎の輪郭点
列の各点における曲率を求める曲率演算機構と、 (f)群毎の曲率のデータから真円を抽出する真円抽出
機構と、 (g)真円を除いた輪郭点列の曲率のデータから無限大
であるかある一定値より大きい値の曲率を持つ点を仮接
合点として抽出する仮接合点位置抽出機構と、 (h)前記仮接合点の1つ(第1仮接合点)の輪郭点列
上の前後所定個の点の1つを第1接合点候補とし、前記
第1仮接合点から所定半径内で同一輪郭点列上にある他
の仮接合点の1つ(近傍接合点)の輪郭点列上の前後所
定個の点の1つを第2接合点候補とし、同一輪郭点列上
で点列走査方向に第1固定点と前記第1仮接合点と前記
近傍接合点と第2固定点がこの順で一列状に並ぶように
前記近傍接合点と第1固定点と第2固定点を選択する手
段と、前記第1接合点候補と前記第2接合点候補のすべ
ての組合せについて、前記第1固定点と前記第1接合点
候補と前記第2接合点候補と前記第2固定点の4点を最
も滑らかに結ぶ線の滑らかさに基づき前記第1接合点候
補の適合度を求める手段と、最も適合度の高い前記第1
接合点候補を選択して前記第1仮接合点に代わる最適接
合点とする手段とを有する最適接合点抽出機構と、 (i)連続する二以上の直線又は連続する二以上の円弧
の始点である最適接合点の中からそれがなくても近似精
度が保たれるような不要な最適接合点を見いだしこれを
除去し直線又は円弧を統合する不要接合点除去機構と、 (j)除去されずに残った最適接合点を最終接合点とし
て記憶する最終接合点記億装置と、 (k)同一群の点列内の隣接する最終接合点の間を直
線、円弧の順で近似しこれで所定の近似精度が得られな
いときはtを独立変数、x、yを従属変数とした2次の
区分的多項式で近似し近似精度が所定の値に収まるまで
2次の区分的多項式の次元数を増加させながら最小二乗
近似を繰り返して隣接する最終接合点の間を、直線、円
弧、区分的多項式で近似するデータ近似機構Bと、 (l)真円データと点列の群毎に前記の最終接合点の座
標と隣接する最終接合点の間を近似する関数のパラメー
タとを記憶する圧縮データ記憶機構と、 (m)記憶された圧縮データを入力し真円データと点列
の群毎の最終接合点の座標と隣接する最終接合点の間を
近似する関数のパラメータを得て輪郭線を再生する輪郭
再生機構と、 (n)再生された輪郭線の内部の画素と、外部の画素に
異なる値を対応させる文字再生機構と、 (o)再生された文字フォントを文字として出力する再
生データ出力機構を含むことを特徴とする文字データ入
力出力装置。1. A character reading device that optically reads character font data and stores the character font data in correspondence with a finite number of pixels arranged vertically and horizontally, and (b) a character reading device that associates characters read in association with pixels arranged vertically and horizontally. A contour line extraction mechanism for extracting a contour line; (c) a contour point sequence storage mechanism for storing two-dimensional coordinates (X, Y) of the extracted contour line for each continuous group; X contour point sequence for each independent variable Y coordinates t, approximated by a quadratic piecewise polynomial that the dependent variable x and y, dimensions quadratic piecewise polynomial until the approximation accuracy is within a predetermined range A data approximation mechanism A that repeats least-squares approximation while increasing the number to obtain an approximate polynomial for each group of contour point sequences; and (e) contour points for each group in x, y space from the approximation result.
A curvature calculation mechanism for finding a curvature at each point in the sequence ; (f) a perfect circle extraction mechanism for extracting a perfect circle from the curvature data for each group; and (g) a curvature data of a contour point sequence excluding the perfect circle. A temporary junction position extraction mechanism for extracting a point having a curvature of infinity or a value larger than a certain value as a temporary junction, and (h ) a contour of one of the temporary junctions (first temporary junction). Dot sequence
One of the predetermined number of points before and after the above is regarded as a first joining point candidate,
Others on the same contour point sequence within a predetermined radius from the first temporary joint point
Before and after on the outline point sequence of one of the temporary joint points (neighboring joint points)
One of the fixed points is regarded as a second joint point candidate, and on the same contour point sequence.
And the first fixed point, the first temporary joining point, and the
So that the neighboring junction and the second fixed point are arranged in a line in this order.
A method for selecting the near junction, the first fixed point, and the second fixed point
A step, and all of the first junction candidate and the second junction candidate
For all combinations, the first fixed point and the first joint point
The four points of the candidate, the second joint point candidate, and the second fixed point are
The first joint point based on the smoothness of the line connecting
Means for determining the degree of complementarity of the complement;
Optimum connection alternative to the first temporary connection point by selecting a connection point candidate
Maintained and optimal junction extraction mechanism having a means to consent, is (i) approximation accuracy without it from the optimum junction is two or more arc start point to the straight line or a continuous two or more consecutive An unnecessary joint removal mechanism that finds unnecessary unnecessary joints and removes them and integrates a straight line or a circular arc; and (j) a final joint notation that stores the optimal joints left unremoved as final joints. billion devices and, (k) a straight line between the adjacent final junction point in point sequence of the same group, independent variable t when is approximated by an arc of the order which at a predetermined approximation accuracy is not obtained, x, y between the final junction point approximating approximation accuracy in quadratic piecewise polynomial that is a dependent variable are adjacent repeat the least square approximation with increasing number of dimensions of the second-order piecewise polynomial to within a predetermined value Data approximator for approximating by linear, arc, piecewise polynomial And B, the compressed data storage mechanism for storing the parameters of the function that approximates between the final junction adjacent to (l) the final junction point coordinates for each group of circularity data and point sequence, (m) a contour reproducing mechanism for reproducing the contour to obtain the parameters of the function that approximates between the final junction point and the adjacent final junction point coordinates for each group of inputs the stored compressed data has been perfect circle data and a sequence of points, (N) a character reproducing mechanism for associating pixels inside the reproduced contour line with different values for external pixels; and (o) a reproduction data output mechanism for outputting the reproduced character font as characters. Character data input and output device.
み取り、縦横に有限個並ぶ画素に対応させて記憶する文
字読み取り装置と、 (b)縦横に並ぶ画素に対応付けて読み取られた文字の
輪郭線を抽出する輸郭線抽出機構と、 (c)抽出された輪郭線の2次元座標(X,Y)を連続
する群毎に記憶する輪郭点列記憶機構と、 (d)前記の群毎の輪郭点列のX、Y座標をtを独立変
数、xとyを従属変数とする2次の区分的多項式で近似
し、近似精度が所定範囲になるまで2次の区分的多項式
の次元数を増やしながら最小二乗近似を繰り返し輪郭点
列の群毎の近似多項式を求めるデータ近似機構Aと、 (e)前記の近似結果からx、y空間での群毎の点列の
各点における曲率を求める曲率演算機構と、 (f)群毎の曲率のデータから真円を抽出する真円抽出
機構と、 (g)真円を除く輪郭点列の曲率のデータから無限大で
あるかある一定値より大きい値の曲率を持つ点を仮接合
点として抽出する仮接合点位置抽出機構と、 (h)前記仮接合点の1つ(第1仮接合点)の輪郭点列
上の前後所定個の点の1つを第1接合点候補とし、前記
第1仮接合点から所定半径内で同一輪郭点列上にある他
の仮接合点の1つ(近傍接合点)の輪郭点列上の前後所
定個の点の1つを第2接合点候補とし、同一輪郭点列上
で点列走査方向に第1固定点と前記第1仮接合点と前記
近傍接合点と第2固定点がこの順で一列状に並ぶように
前記近傍接合点と第1固定点と第2固定点を選択する手
段と、前記第1接合点候補と前記第2接合点候補のすべ
ての組合せについて、前記第1固定点と前記第1接合点
候補と前記第2接合点候補と前記第2固定点の4点を最
も滑らかに結ぶ線の滑らかさに基づき前記第1接合点候
補の適合度を求める手段と、最も適合度の高い前記第1
接合点候補を選択して前記第1仮接合点に代わる最適接
合点とする手段とを有する最適接合点抽出機構と、 (k)同一群の点列内の隣接する最適接合点の間を直
線、円弧の順で近似しこれで所定の近似精度が得られな
いときはtを独立変数、x、yを従属変数とした2次の
区分的多項式で近似し近似精度が所定の値に収まるまで
2次の区分的多項式の次元数を増加させながら最小二乗
近似を繰り返して隣接する最適接合点の間を、直線、円
弧、区分的多項式で近似するデータ近似機構Bと、 (l)真円データと点列の群毎に前記の最適接合点の座
標と隣接する最適接合点の間を近似する関数のパラメー
タとを記憶する圧縮データ記憶機構と、 (m)記憶された圧縮データを入力し真円データと点列
の群毎の最適接合点の座標と隣接する最適接合点の間を
近似する関数のパラメータを得て輪郭線を再生する輸郭
再生機構と、 (n)再生された輪郭線の内部の画素と、外部の画素に
異なる値を対応させる文字再生機構と、 (o)再生された文字フォントを文字として出力する再
生データ出力機構を含むことを特徴とする文字データ入
力出力装置。(A) a character reading device that optically reads character font data and stores the character font data in correspondence with a finite number of pixels arranged vertically and horizontally; and (b) a character reading device that associates characters read in association with the pixels arranged vertically and horizontally. A contour line extraction mechanism for extracting a contour line; (c) a contour point sequence storage mechanism for storing two-dimensional coordinates (X, Y) of the extracted contour line for each continuous group; X contour point sequence for each independent variable Y coordinates t, approximated by a quadratic piecewise polynomial that the dependent variable x and y, dimensions quadratic piecewise polynomial until the approximation accuracy is within a predetermined range A data approximation mechanism A that repeats least squares approximation while increasing the number to obtain an approximate polynomial for each group of contour point sequences; and (e) the curvature at each point of the point sequence for each group in x, y space from the above approximation results. And (f) extracting a perfect circle from the curvature data for each group. To a perfect circle extraction mechanism, (g) temporary joining point position extraction for extracting a point having a curvature of constant value greater than the value in either infinity from the data of the curvature of the contour point sequence except true circle as a temporary junction (H ) a contour point sequence of one of the temporary joint points (first temporary joint point)
One of the predetermined number of points before and after the above is regarded as a first joining point candidate,
Others on the same contour point sequence within a predetermined radius from the first temporary joint point
Before and after on the outline point sequence of one of the temporary joint points (neighboring joint points)
One of the fixed points is regarded as a second joint point candidate, and on the same contour point sequence.
And the first fixed point, the first temporary joining point, and the
So that the neighboring junction and the second fixed point are arranged in a line in this order.
A method for selecting the near junction, the first fixed point, and the second fixed point
A step, and all of the first junction candidate and the second junction candidate
For all combinations, the first fixed point and the first joint point
The four points of the candidate, the second joint point candidate, and the second fixed point are
The first joint point based on the smoothness of the line connecting
Means for determining the degree of complementarity of the complement;
Optimum connection alternative to the first temporary connection point by selecting a connection point candidate
The optimum junction extraction mechanism having a means for the consent, not a straight line between the optimum junction, is approximated by an arc of the order which at a predetermined approximation accuracy obtained adjacent in (k) point sequence of the same group At this time, least square approximation is performed while increasing the number of dimensions of the second-order piecewise polynomial until the approximation accuracy falls within a predetermined value by approximating the quadratic piecewise polynomial with t as an independent variable and x and y as dependent variables. between the optimum junction to repeatedly adjacent straight, adjacent arc, a data approximation mechanism B approximated by piecewise polynomial, and (l) said optimum bonding point coordinates for each group of circularity data and point sequence a compressed data storage mechanism for storing the parameters of the function that approximates between the optimum junction, adjacent (m) and the stored optimal junction of the coordinates of each group enter the compressed data perfect circle data and point sequence to obtain the parameters of the function that approximates between the optimum junction contour lines (N) a character reproducing mechanism for associating pixels inside the reproduced outline with different values for external pixels; and (o) reproducing a reproduced character font as a character. A character data input / output device comprising a data output mechanism.
み取り、縦横に有限個並ぶ画素に対応させて記憶する文
字読み取り装置と、 (b)縦横に並ぶ画素に対応付けて読み取られた文字の
輪郭線を抽出する輸郭線抽出機構と、 (c)抽出された輪郭線の2次元座標(X,Y)を連続
する群毎に記憶する輪郭点列記憶機構と、 (d)前記の群毎の輪郭点列のX、Y座標をtを独立変
数、xとyを従属変数とする2次の区分的多項式で近似
し、近似精度が所定範囲になるまで2次の区分的多項式
の次元数を増やしながら最小二乗近似を繰り返し輪郭点
列の群毎の近似多項式を求めるデータ近似機構Aと、 (e)前記の近似結果からx、y空間での群毎の点列の
各点における曲率を求める曲率演算機構と、 (f)群毎の曲率のデータから真円を抽出する真円抽出
機構と、 (g)真円を除く輪郭点列の曲率のデータから無限大で
あるかある一定値より大きい値の曲率を持つ点を接合点
として抽出する接合点位置抽出機構と、 (k)同一群の点列内の隣接する接合点の間を直線、円
弧の順で近似しこれで所定の近似精度が得られないとき
はtを独立変数、x、yを従属変数とした2次の区分的
多項式で近似し近似精度が所定の値に収まるまで2次の
区分的多項式の次元数を増加させながら最小二乗近似を
繰り返して隣接する接合点の間を、直線、円弧、区分的
多項式で近似するデータ近似機構Bと、 (l)真円データと点列の群毎に前記の接合点の座標と
隣接する接合点の間を近似する関数のパラメータとを記
憶する圧縮データ記憶機構と、 (m)記憶された圧縮データを入力し真円データと点列
の群毎の接合点の座標と隣接する接合点の間を近似する
関数のパラメータを得て輪郭線を再生する輪郭再生機構
と、 (n)再生された輪郭線の内部の画素と、外部の画素に
異なる値を対応させる文字再生機構と、 (o)再生された文字フォントを文字として出力する再
生データ出力機構を含むことを特徴とする文字データ入
力出力装置。(A) a character reading device that optically reads character font data and stores the character font data in correspondence with a finite number of pixels arranged vertically and horizontally, and (b) a character reading device that associates characters read in association with the pixels arranged vertically and horizontally. A contour line extraction mechanism for extracting a contour line; (c) a contour point sequence storage mechanism for storing two-dimensional coordinates (X, Y) of the extracted contour line for each continuous group; X contour point sequence for each independent variable Y coordinates t, approximated by a quadratic piecewise polynomial that the dependent variable x and y, dimensions quadratic piecewise polynomial until the approximation accuracy is within a predetermined range A data approximation mechanism A that repeats least squares approximation while increasing the number to obtain an approximate polynomial for each group of contour point sequences; and (e) the curvature at each point of the point sequence for each group in x, y space from the above approximation results. And (f) extracting a perfect circle from the curvature data for each group. A perfect circle extraction mechanism, and (g) the junction position extraction mechanism for extracting the junction point having a curvature of constant value greater than the value from the data of the curvature of the contour point sequence is either infinity except circularity , (k) a straight line between adjacent bonding points in the point sequence of the same group, independent variables <br/> is t when the approximated by an arc of the order which at a predetermined approximation accuracy is not obtained, x, y junctions approximating approximation accuracy in quadratic piecewise polynomial that is a dependent variable are adjacent repeat the least square approximation with increasing number of dimensions of the secondary <br/> piecewise polynomial to within a predetermined value function that approximates between, lines, arcs, and the data approximation mechanism B approximated by piecewise polynomial, between the junction and the adjacent (l) of the junction points for each group of circularity data and dot sequence coordinates And (m) inputting the stored compressed data and storing the compressed data. A contour reproducing mechanism for reproducing the contour to obtain the parameters of the function that approximates between junction adjacent to the circle data and the point junction of the coordinate of each group of columns, the internal (n) reproduced contour A character data input / output device comprising: a pixel and a character reproduction mechanism for making different values correspond to external pixels; and (o) a reproduction data output mechanism for outputting a reproduced character font as a character.
み取り、縦横に有限個並ぶ画素に対応させて記憶する文
字読み取り装置と、 (b)縦横に並ぶ画素に対応付けて読み取られた文字の
輪郭線を抽出する輪郭線抽出機構と、 (c)抽出された輪郭線の2次元座標(X,Y)を連続
する群毎に記憶する輸郭線点列記憶機構と、 (e)X、Y空間での群毎の点列の各点における離散的
曲率を求める曲率演算機構と、 (f)群毎の曲率のデータから真円を抽出する真円抽出
機構と、 (g)真円を除く輪郭点列の曲率のデータから無限大で
あるかある一定値より大きい値の曲率を持つ点を仮接合
点として抽出する仮接合点位置抽出機構と、 (h)前記仮接合点の1つ(第1仮接合点)の輪郭点列
上の前後所定個の点の1つを第1接合点候補とし、前記
第1仮接合点から所定半径内で同一輪郭点列上にある他
の仮接合点の1つ(近傍接合点)の輪郭点列上の前後所
定個の点の1つを第2接合点候補とし、同一輪郭点列上
で点列走査方向に第1固定点と前記第1仮接合点と前記
近傍接合点と第2固定点がこの順で一列状に並ぶように
前記近傍接合点と第1固定点と第2固定点を選択する手
段と、前記第1接合点候補と前記第2接合点候補のすべ
ての組合せについて、前記第1固定点と前記第1接合点
候補と前記第2接合点候補と前記第2固定点の4点を最
も滑らかに結ぶ線の滑らかさに基づき前記第1接合点候
補の適合度を求める手段と、最も適合度の高い前記第1
接合点候補を選択して前記第1仮接合点に代わる最適接
合点とする手段とを有する最適接合点抽出機構と、 (i)連続する二以上の直線又は連続する二以上の円弧
の始点である最適接合点の中からそれがなくても近似精
度が保たれるような不要な最適接合点を見いだしこれを
除去し直線又は円弧を統合する不要接合点除去機構と、 (j)除去されずに残った最適接合点を最終接合点とし
て記憶する最終接合点記憶装置と、 (k)同一群の点列内の隣接する最終接合点の間を直
線、円弧の順で近似しこれで所定の近似精度が得られな
いときはtを独立変数、x、yを従属変数とした2次の
区分的多項式で近似し近似精度が所定の値に収まるまで
2次の区分的多項式の次元数を増加させながら最小二乗
近似を繰り返して隣接する最終接合点の間を、直線、円
弧、区分的多項式で近似するデータ近似機構Bと、 (l)真円データと点列の群毎に前記の最終接合点の座
標と隣接する最終接合点の間を近似する関数のパラメー
タとを記憶する圧縮データ記憶機構と、 (m)記憶された圧縮データを入力し真円データと点列
の群毎の最終接合点の座標と隣接する最終接合点の間を
近似する関数のパラメータを得て輪郭線を再生する輪郭
再生機構と、 (n)再生された輪郭線の内部の画素と、外部の画素に
異なる値を対応させる文字再生機構と、 (o)再生された文字フォントを文字として出力する再
生データ出力機構を含むことを特徴とする文字データ入
力出力装置。4. A character reading device that optically reads character font data and stores the character font data in correspondence with a finite number of pixels arranged vertically and horizontally, and (b) a character reading device that reads characters associated with the pixels arranged vertically and horizontally. a contour line extraction mechanism for extracting a contour line, and輸郭line series of points storage mechanism for storing for each group successive (c) 2-dimensional coordinates of the extracted contour lines (X, Y), (e ) X, A curvature calculating mechanism for obtaining a discrete curvature at each point of a point sequence for each group in the Y space; (f) a perfect circle extracting mechanism for extracting a perfect circle from the curvature data for each group; and (g) a perfect circle. A temporary junction position extraction mechanism for extracting a point having a curvature of infinity or a value larger than a certain value as a temporary junction from the data of the curvature of the contour point sequence to be removed , and (h) one of the temporary junctions (First temporary joining point) outline point sequence
One of the predetermined number of points before and after the above is regarded as a first joining point candidate,
Others on the same contour point sequence within a predetermined radius from the first temporary joint point
Before and after on the outline point sequence of one of the temporary joint points (neighboring joint points)
One of the fixed points is regarded as a second joint point candidate, and on the same contour point sequence.
And the first fixed point, the first temporary joining point, and the
So that the neighboring junction and the second fixed point are arranged in a line in this order.
A method for selecting the near junction, the first fixed point, and the second fixed point
A step, and all of the first junction candidate and the second junction candidate
For all combinations, the first fixed point and the first joint point
The four points of the candidate, the second joint point candidate, and the second fixed point are
The first joint point based on the smoothness of the line connecting
Means for determining the degree of complementarity of the complement;
Optimum connection alternative to the first temporary connection point by selecting a connection point candidate
Maintained and optimal junction extraction mechanism having a means to consent, is (i) approximation accuracy without it from the optimum junction is two or more arc start point to the straight line or a continuous two or more consecutive An unnecessary joint removal mechanism that finds unnecessary joints that are unnecessary and removes them and integrates a straight line or an arc; and (j) a final joint storage that stores the remaining optimal joints that have not been removed as final joints. a device, the independent variable, x, y and t is the time is not obtained straight line approximated by an arc of the order which at a predetermined approximation accuracy between adjacent final junction point in the point sequence of (k) the same group between the final junction point dependent variable and the second-order approximated by piecewise polynomial approximation accuracy is adjacent repeated a least squares approximation with increasing number of dimensions of the second-order piecewise polynomial to within a predetermined value, A data approximator that approximates straight lines, circular arcs, and piecewise polynomials And B, the compressed data storage mechanism for storing the parameters of the function that approximates between the final junction adjacent to (l) the final junction point coordinates for each group of circularity data and point sequence, (m) a contour reproducing mechanism for reproducing the contour to obtain the parameters of the function that approximates between the final junction point and the adjacent final junction point coordinates for each group of inputs the stored compressed data has been perfect circle data and a sequence of points, (N) a character reproducing mechanism for associating pixels inside the reproduced contour line with different values for external pixels; and (o) a reproduction data output mechanism for outputting the reproduced character font as characters. Character data input and output device.
み取り、縦横に有限個並ぶ画素に対応させてデータを記
憶し、 (b)縦横に並ぶ画素に対応付けて読み取られた文字の
輪郭線を抽出し、 (c)抽出された輪郭線の2次元座標(X,Y)を連続
する群毎に記憶し、 (d)前記の群毎の輪郭点列のX、Y座標をtを独立変
数、xとyを従属変数とする2次の区分的多項式で近似
し、近似精度が所定範囲になるまで区分的多項式の次元
数を増やしながら最小二乗近似を繰り返し輪郭点列の群
毎の近似多項式を求め、 (e)前記の近似結果からx、y空間での群毎の点列の
各点における曲率を求め、 (f)群毎の曲率のデータから真円を抽出し、 (g)真円を除く輪郭点列の曲率のデータから無限大で
あるかある一定値より大きい値の曲率を持つ点を接合点
として抽出し、 (k)同一群の点列内の隣接する接合点の間を直線、円
弧の順で近似しこれで所定の近似精度が得られないとき
はtを独立変数、x、yを従属変数とした2次の区分的
多項式で近似し近似精度が所定の値に収まるまで2次の
区分的多項式の次元数を増加させながら最小二乗近似を
繰り返して隣接する接合点の間を、直線、円弧、区分的
多項式で近似し、 (l)真円データと点列の群毎に前記の接合点の座標と
隣接する接合点の間を近似する関数のパラメータとを記
憶することによって文字フォントデータを入力し、 (m)他方文字を出力するときは、記憶された真円デー
タと点列の群毎の接合点の座標と隣接接合点を近似する
関数のパラメータを出力し、これから文字フォントの輪
郭線を再生し、 (n)再生された輪郭線の内部の画素と、外部の画素に
異なる値を対応させることにより文字を再生し、 (o)再生された文字フォントを文字として出力するこ
とを特徴とする文字データ入力出力方法。5. A character font data is optically read, and data is stored in correspondence with a finite number of pixels arranged vertically and horizontally. (B) An outline of a character read in association with pixels arranged vertically and horizontally. (C) storing the two-dimensional coordinates (X, Y) of the extracted contour line for each continuous group; and (d) setting the X and Y coordinates of the contour point sequence for each group to t independently. Approximate by a quadratic piecewise polynomial with variables x and y as dependent variables, and repeat least-squares approximation while increasing the number of dimensions of the piecewise polynomial until approximation accuracy is within a predetermined range. A polynomial is obtained; (e) a curvature at each point of a point sequence for each group in the x, y space is obtained from the approximation result; (f) a perfect circle is extracted from the curvature data for each group; (g) From the curvature data of the contour point sequence excluding the perfect circle, calculate the curvature that is infinite or larger than a certain value. The point having extracted as junction, (k) in the point sequence identical grouping straight line between adjacent junction points, independent variable t when is approximated by an arc of the order which at a predetermined approximation accuracy is not obtained , x, junctions approximation accuracy is approximated by a quadratic piecewise polynomial that is a dependent variable y are adjacent repeat the least square approximation with increasing number of dimensions of the second-order piecewise polynomial to within a predetermined value between, lines, arcs, and approximated by a piecewise polynomial, stores the parameters of the function that approximates between junction adjacent to (l) the junction points of the coordinates for each group of circularity data and point sequence (M) When outputting the other character, output the stored perfect circle data, the coordinates of the junction point for each group of point sequences, and the parameters of a function that approximates the adjacent junction point. Then, the outline of the character font is reproduced, and (n) reproduction A character data input / output method characterized in that a character is reproduced by associating a different value with a pixel inside the reproduced contour line and an external pixel, and (o) outputting the reproduced character font as a character.
み取り、縦横に有限個並ぶ画素に対応させてデータを記
憶し、 (b)縦横に並ぶ画素に対応付けて読み取られた文字の
輪郭線を抽出し、 (c)抽出された輪郭線の2次元座標(X,Y)を連続
する群毎に記憶し、 (d)前記の群毎の輪郭点列のX、Y座標をtを独立変
数、xとyを従属変数とする2次の区分的多項式で近似
し、近似精度が所定範囲になるまで区分的多項式の次元
数を増やしながら最小二乗近似を繰り返し輪郭点列の群
毎の近似多項式を求め、 (e)前記の近似結果からx、y空間での群毎の点列の
各点における曲率を求め、 (f)群毎の曲率のデータから真円を抽出し、 (g)真円を除く輪郭点列の曲率のデータから無限大で
あるかある一定値より大きい値の曲率を持つ点を仮接合
点として抽出し、 (h)前記仮接合点の1つ(第1仮接合点)の輪郭点列
上の前後所定個の点の1つを第1接合点候補とし、前記
第1仮接合点から所定半径内で同一輪郭点列上にある他
の仮接合点の1つ(近傍接合点)の輪郭点列上の前後所
定個の点の1つを第2接合点候補とし、同一輪郭点列上
で点列走査方向に第1固定点と前記第1仮接合点と前記
近傍接合点と第2固定点がこの順で一列状に並ぶように
前記近傍接合点と第1固定点と第2固定点を選択し、前
記第1接合点候補と前記第2接合点 候補のすべての組合
せについて、前記第1固定点と前記第1接合点候補と前
記第2接合点候補と前記第2固定点の4点を最も滑らか
に結ぶ線の滑らかさに基づき前記第1接合点候補の適合
度を求め、最も適合度の高い前記第1接合点候補を選択
して前記第1仮接合点に代わる最適接合点とし、 (i)連続する二以上の直線又は連続する二以上の円弧
の始点である最適接合点の中からそれがなくても近似精
度が保たれるような不要な最適接合点を見いだしこれを
除去し直線又は円弧を統合し、 (j)除去されずに残った最適接合点を最終接合点とし
て記憶し、 (k)同一群の点列内の隣接する最終接合点の間を直
線、円弧の順で近似しこれで所定の近似精度が得られな
いときはtを独立変数、x、yを従属変数とした2次の
区分的多項式で近似し近似精度が所定の値に収まるまで
2次の区分的多項式の次元数を増加させながら最小二乗
近似を繰り返して隣接する最終接合点の間を、直線、円
弧、区分的多項式で近似し、 (l)真円データと点列の群毎に前記の最終接合点の座
標と隣接する最終接合点の間を近似する関数のパラメー
タとを記憶することによって文字フォントデータを入力
し、 (m)他方文字を出力するときは、記憶された真円デー
タと点列の群毎の最終接合点の座標と隣接する最終接合
点の間を近似する関数のパラメータを出力し、これから
文字フォントの輪郭線を再生し、 (n)再生された輪郭線の内部の画素と外部の画素に異
なる値を対応させることにより文字を再生し、 (o)再生された文字フォントを文字として出力するこ
とを特徴とする文字データ入力出力方法。6. A character font data is optically read, data is stored in correspondence with a finite number of pixels arranged vertically and horizontally, and a contour line of a character read in association with the pixels arranged vertically and horizontally. (C) storing the two-dimensional coordinates (X, Y) of the extracted contour line for each continuous group; and (d) setting the X and Y coordinates of the contour point sequence for each group to t independently. Approximate by a quadratic piecewise polynomial with variables x and y as dependent variables, and repeat least-squares approximation while increasing the number of dimensions of the piecewise polynomial until approximation accuracy is within a predetermined range. A polynomial is obtained; (e) a curvature at each point of a point sequence for each group in the x, y space is obtained from the approximation result; (f) a perfect circle is extracted from the curvature data for each group; (g) From the curvature data of the contour point sequence excluding the perfect circle, calculate the curvature that is infinite or larger than a certain value. (H ) a contour point sequence of one of the temporary connection points (first temporary connection point)
One of the predetermined number of points before and after the above is regarded as a first joining point candidate,
Others on the same contour point sequence within a predetermined radius from the first temporary joint point
Before and after on the outline point sequence of one of the temporary joint points (neighboring joint points)
One of the fixed points is regarded as a second joint point candidate, and on the same contour point sequence.
And the first fixed point, the first temporary joining point, and the
So that the neighboring junction and the second fixed point are arranged in a line in this order.
Select the neighboring junction, the first fixed point, and the second fixed point, and
All combinations of the first junction candidate and the second junction candidate
The first fixed point, the first junction candidate,
The four points of the second joint point candidate and the second fixed point are the most smooth.
Of the first candidate junction based on the smoothness of the line connecting
Of the first junction point with the highest degree of fitness
(I) Approximation accuracy is maintained even if there is no optimum joining point, which is the starting point of two or more continuous straight lines or two or more continuous arcs, instead of the first temporary joining point. Unnecessary optimal joints such as sagging are found and removed, and a straight line or an arc is integrated. (J) The optimal joints remaining without being removed are stored as final joints. (K) Point sequence of the same group between adjacent final junction point of the inner straight line approximated by an arc of the order independent variable t when not obtained predetermined approximation accuracy in this, x, in second-order piecewise polynomial as the dependent variable y between the final junction approximation to the approximation accuracy is adjacent repeated a least squares approximation with increasing number of dimensions of the second-order piecewise polynomial to within a predetermined value, approximate straight lines, arcs, piecewise polynomial, (L) The coordinates of the above-mentioned final junction point and the neighborhood for each group of perfect circle data and point sequence Enter the character font data by storing the parameters of the function that approximates between the final junction point that, (m) when outputting the other characters, final for each group of the stored circularity data and point sequence outputting the parameters of the function that approximates between the final junction point and the adjacent junction points coordinates, from which reproduces the outline of the character font, different inside the pixels and external pixels (n) reproduced contour A character data input / output method, wherein a character is reproduced by associating values, and (o) the reproduced character font is output as a character.
み取り、縦横に有限個並ぶ画素に対応させてデータを記
憶し、 (b)縦横に並ぶ画素に対応付けて読み取られた文字の
輪郭線を抽出し、 (c)抽出された輪郭線の2次元座標(X,Y)を連続
する群毎に記憶し、 (e)X、Y空間での群毎の点列の各点における離散的
曲率を求め、 (f)群毎の曲率のデータから真円を抽出し、 (g)真円を除く輪郭点列の曲率のデータから無限大で
あるかある一定値より大きい値の曲率を持つ点を仮接合
点として抽出し、 (h)前記仮接合点の1つ(第1仮接合点)の輪郭点列
上の前後所定個の点の1つを第1接合点候補とし、前記
第1仮接合点から所定半径内で同一輪郭点列上にある他
の仮接合点の1つ(近傍接合点)の輪郭点列上の前後所
定個の点の1つを第2接合点候補とし、同一輪郭点列上
で点列走査方向に第1固定点と前記第1仮接合点と前記
近傍接合点と第2固定点がこの順で一列状に並ぶように
前記近傍接合点と第1固定点と第2固定点を選択し、前
記第1接合点候補と前記第2接合点候補のすべての組合
せについて、前記第1固定点と前記第1接合点候補と前
記第2接合点候補と前記第2固定点の4点を最も滑らか
に結ぶ線の滑らかさに基づき前記第1接合点候補の適合
度を求め、最も適合度の高い前記第1接合点候補を選択
して前記第1仮接合点に代わる最適接合点とし、 (i)連続する二以上の直線又は連続する二以上の円弧
の始点である最適接合点の中からそれがなくても近似精
度が保たれるような不要な最適接合点を見いだしこれを
除去し直線又は円弧を統合し、 (j)除去されずに残った最適接合点を最終接合点とし
て記憶し、 (k)同一群の点列内の隣接する最終接合点の間を直
線、円弧の順で近似しこれで所定の近似精度が得られな
いときはtを独立変数、x、yを従属変数とした2次の
区分的多項式で近似し近似精度が所定の値に収まるまで
2次の区分的多項式の次元数を増加させながら最小二乗
近似を繰り返して隣接する最終接合点の間を、直線、円
弧、区分的多項式で近似し、 (l)真円データと点列の群毎に前記の最終接合点の座
標と隣接する最終接合点の間を近似する関数のパラメー
タとを記憶することによって文字フォントデータを入力
し、 (m)他方文字を出力するときは、記憶された真円デー
タと点列の群毎の最終接合点の座標と隣接する最終接合
点の間を近似する関数のパラメータを出力し、これから
文字フォントの輪郭線を再生し、 (n)再生された輪郭線の内部の画素と、外部の画素に
異なる値を対応させることにより文字を再生し、 (o)再生された文字フォントを文字として出力するこ
とを特徴とする文字データ入力出力方法。7. A character font data is optically read, and data is stored in correspondence with a finite number of pixels arranged vertically and horizontally. (B) A contour line of a character read in association with pixels arranged vertically and horizontally. (C) storing the two-dimensional coordinates (X, Y) of the extracted contour line for each continuous group; and (e) discrete values at each point of a point sequence for each group in the X, Y space. The curvature is obtained. (F) A perfect circle is extracted from the curvature data of each group. (G) The curvature data of the contour point sequence excluding the perfect circle has a curvature that is infinite or larger than a certain value. (H ) a contour point sequence of one of the temporary connection points (first temporary connection point)
One of the predetermined number of points before and after the above is regarded as a first joining point candidate,
Others on the same contour point sequence within a predetermined radius from the first temporary joint point
Before and after on the outline point sequence of one of the temporary joint points (neighboring joint points)
One of the fixed points is regarded as a second joint point candidate, and on the same contour point sequence.
And the first fixed point, the first temporary joining point, and the
So that the neighboring junction and the second fixed point are arranged in a line in this order.
Select the neighboring junction, the first fixed point, and the second fixed point, and
All combinations of the first junction candidate and the second junction candidate
The first fixed point, the first junction candidate,
The four points of the second joint point candidate and the second fixed point are the most smooth.
Of the first candidate junction based on the smoothness of the line connecting
Of the first junction point with the highest degree of fitness
(I) Approximation accuracy is maintained even if there is no optimum joining point, which is the starting point of two or more continuous straight lines or two or more continuous arcs, instead of the first temporary joining point. Unnecessary optimal joints such as sagging are found and removed, and a straight line or an arc is integrated. (J) The optimal joints remaining without being removed are stored as final joints. (K) Point sequence of the same group between adjacent final junction point of the inner straight line approximated by an arc of the order independent variable t when not obtained predetermined approximation accuracy in this, x, in second-order piecewise polynomial as the dependent variable y between the final junction approximation to the approximation accuracy is adjacent repeated a least squares approximation with increasing number of dimensions of the second-order piecewise polynomial to within a predetermined value, approximate straight lines, arcs, piecewise polynomial, (L) The coordinates of the above-mentioned final junction point and the neighborhood for each group of perfect circle data and point sequence Enter the character font data by storing the parameters of the function that approximates between the final junction point that, (m) when outputting the other characters, final for each group of the stored circularity data and point sequence outputting the parameters of the function that approximates between the final junction point and the adjacent junction points coordinates, from which reproduces the outline of the character font, the inner pixels of (n) reproduced contours, the outside of the pixel A character data input / output method characterized by reproducing characters by associating different values, and (o) outputting the reproduced character font as characters.
Priority Applications (7)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4259137A JP2646475B2 (en) | 1992-09-01 | 1992-09-01 | Character data input / output device and input / output method |
CA002105125A CA2105125C (en) | 1992-09-01 | 1993-08-30 | Apparatus and method for inputting, compressing and outputting characters, illustrations, drawings and logomarks |
CN93117077A CN1033110C (en) | 1992-09-01 | 1993-08-30 | Input and output device of characters, logomarks, illustrations and input and output method of same |
AU46008/93A AU656090B2 (en) | 1992-09-01 | 1993-08-31 | Apparatus and method for inputting, compressing and outputting characters, illustrations, drawings and logomarks |
EP19930306856 EP0586219A3 (en) | 1992-09-01 | 1993-08-31 | Apparatus and method for image compression |
KR1019930017344A KR0129505B1 (en) | 1992-09-01 | 1993-09-01 | Character data, logo / artwork data input output device and input output method |
US08/114,364 US5572605A (en) | 1992-09-01 | 1993-09-01 | Apparatus and method for inputting, compressing and outputting characters, illustrations, drawings and logomarks |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4259137A JP2646475B2 (en) | 1992-09-01 | 1992-09-01 | Character data input / output device and input / output method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0683952A JPH0683952A (en) | 1994-03-25 |
JP2646475B2 true JP2646475B2 (en) | 1997-08-27 |
Family
ID=17329844
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP4259137A Expired - Fee Related JP2646475B2 (en) | 1992-09-01 | 1992-09-01 | Character data input / output device and input / output method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2646475B2 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3031613B2 (en) * | 1996-11-12 | 2000-04-10 | 株式会社つくばソフト研究所 | Color / shade image input / output device and input / output method |
KR100239308B1 (en) * | 1997-02-18 | 2000-01-15 | 전주범 | Adaptive Contour Coding Method and Apparatus |
JP2942222B2 (en) * | 1997-08-11 | 1999-08-30 | 株式会社つくばソフト研究所 | Communication device for color images and grayscale images |
JP2001051670A (en) * | 1999-05-28 | 2001-02-23 | Fluency Kenkyusho:Kk | Device and method for creating character data, and storage medium |
JP2001051671A (en) * | 1999-05-28 | 2001-02-23 | Fluency Kenkyusho:Kk | Character graphics generating device for signboard |
JP4500307B2 (en) * | 2004-03-03 | 2010-07-14 | 独立行政法人科学技術振興機構 | Signal processing method and apparatus |
CN111325789B (en) * | 2020-02-01 | 2024-01-09 | 暨南大学 | Curvature discontinuous point detection method based on discrete direction change sequence |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS57159363A (en) * | 1981-03-26 | 1982-10-01 | Fujitsu Ltd | Graphic information inputting system |
JPS6049483A (en) * | 1983-08-29 | 1985-03-18 | Matsushita Electric Ind Co Ltd | Approximate coding device for handwritten linear graphic |
-
1992
- 1992-09-01 JP JP4259137A patent/JP2646475B2/en not_active Expired - Fee Related
Non-Patent Citations (2)
Title |
---|
電子情報通信学会論文誌D VOL.J70−D NO.6 P.1164−1172(昭和62年6月) |
電子情報通信学会論文誌D−II VOL.J73−D−II NO.9 P.1448−1457(平成2年9月) |
Also Published As
Publication number | Publication date |
---|---|
JPH0683952A (en) | 1994-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR0129505B1 (en) | Character data, logo / artwork data input output device and input output method | |
US6016361A (en) | Method and apparatus for compressing binary data using pattern matching encoding | |
JP4071328B2 (en) | Document image processing apparatus and method | |
JPH09237338A (en) | Method and device for quickly smoothing contour | |
US6661417B1 (en) | System and method for converting an outline font into a glyph-based font | |
CN110163208B (en) | A method and system for scene text detection based on deep learning | |
CN112784531A (en) | Chinese font and word stock generation method based on deep learning and part splicing | |
JP2646475B2 (en) | Character data input / output device and input / output method | |
JPH0256708B2 (en) | ||
US5917501A (en) | Method of cutting outline fonts into strokes and parts | |
JP2646476B2 (en) | Logo / Illustration data input / output device and input / output method | |
US20210034854A1 (en) | Musical notation system | |
JPH08194716A (en) | Picture processing method and its device | |
JP2005317042A (en) | Image processing device | |
JP3305395B2 (en) | Figure division device | |
JP2005302056A (en) | Pattern extraction device | |
JP2882327B2 (en) | Line figure matching device | |
JP7365845B2 (en) | Learning devices, learning methods, and programs | |
JP3454626B2 (en) | Major classification method | |
JP3647075B2 (en) | Image search method and apparatus | |
Tavakoli | A new approach to pattern recognition | |
JPH0535872A (en) | Contour tracing system for binary image | |
JP2559359B2 (en) | Image structure storage method and image registration apparatus | |
JP3486246B2 (en) | Character recognition device | |
JPS62236077A (en) | Graphic input device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090509 Year of fee payment: 12 |
|
LAPS | Cancellation because of no payment of annual fees |