JPH04125590A - Character pattern information conversion method and device - Google Patents
Character pattern information conversion method and deviceInfo
- Publication number
- JPH04125590A JPH04125590A JP2244064A JP24406490A JPH04125590A JP H04125590 A JPH04125590 A JP H04125590A JP 2244064 A JP2244064 A JP 2244064A JP 24406490 A JP24406490 A JP 24406490A JP H04125590 A JPH04125590 A JP H04125590A
- Authority
- JP
- Japan
- Prior art keywords
- information
- character
- stroke
- curve
- contour
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 108
- 238000006243 chemical reaction Methods 0.000 title claims description 40
- 230000014509 gene expression Effects 0.000 claims description 7
- 239000013598 vector Substances 0.000 description 20
- 238000012545 processing Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000010365 information processing Effects 0.000 description 2
- 238000011960 computer-aided design Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000593 degrading effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 238000010561 standard procedure Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
Landscapes
- Document Processing Apparatus (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、計算機による文字パターン情報の生成に係り
、ストローク単位の輪郭情報から文字単位の輪郭情報に
変換する方法に関する。また、この変換方法を用いた文
字パターンの変換装置に関する。更に、上記の文字変換
方法を用いた文書出力装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to the generation of character pattern information by a computer, and relates to a method of converting contour information on a stroke-by-stroke basis into contour information on a character-by-character basis. The present invention also relates to a character pattern conversion device using this conversion method. Furthermore, the present invention relates to a document output device using the above character conversion method.
文字単位の輪郭情報を保持して文字パターンを出力する
方法はアウトライン文字方式あるいはベクトル文字方式
と呼ばれ、最近注目され標準化しつつある方法である。A method for outputting a character pattern while retaining outline information for each character is called an outline character method or a vector character method, and is a method that has recently attracted attention and is becoming standardized.
この方法によると、従来のドツトの行列として文字パタ
ーンを保持する方法に対して、サイズや傾きの変換が可
能なために、1種類のパターンのセットを用意すれば種
々のサイズの出力に用いられる効果がある。この輪郭曲
線の表現方法としては、直線といわゆるベジェ曲線の系
列による方法が標準的である。ベジェ曲線とは、従来、
車の形状などのコンピュータ支援設計技術であるCAD
の分野で曲面に対して用いられていた形状表現であるが
、文字パターンに対してはこれの曲線表現を用いる。こ
れは、3または4点の制御点によってベジェ曲線素を定
義するものであり、この3または4点のうち2点が、定
義される曲線素の両端点であるが、他の1または2点は
一般に曲線上にない点である。このベジェ曲線及びその
サイズと回転変換法については、例えば、「ページ記述
言語PO5TSCRIPTリファレンス・マニュアルJ
(Adobe 5ystea+s著、松村訳、アスキ
ー出版局、1988年、原著は1985年発行)に示さ
れている。また、文字パターンをアウトライン情報で表
現する、より古い例として、アイ・イー・イー・イー発
行の雑誌コンピュータの1984年5月号の第40頁か
ら48頁(COMPIJTER,May 1984.
pp、40−48. IEEE) にJ。With this method, compared to the conventional method of holding character patterns as a matrix of dots, it is possible to convert the size and slope, so if one set of patterns is prepared, it can be used for outputting various sizes. effective. The standard method for expressing this contour curve is a series of straight lines and so-called Bezier curves. Traditionally, a Bezier curve is
CAD is a computer-aided design technology for car shapes, etc.
This is a shape representation that was used for curved surfaces in the field of , but this curve representation is used for character patterns. This defines a Bezier curve element with 3 or 4 control points, and 2 of these 3 or 4 points are the end points of the defined curve element, but the other 1 or 2 points is generally a point that is not on the curve. For information on this Bezier curve, its size, and rotation conversion method, see, for example, "Page Description Language PO5TSCRIPT Reference Manual J
(written by Adobe 5ystea+s, translated by Matsumura, published by ASCII Publishing Bureau, 1988, originally published in 1985). An older example of expressing character patterns using outline information is COMPIJTER, May 1984.
pp, 40-48. IEEE) to J.
Flowersによって示されている。アウトライン文
字パターンは、1文字の文字パターンを1つの図形と考
えて、その輪郭線で表現するものであり。Illustrated by Flowers. An outline character pattern is one in which a character pattern of one character is considered to be one figure, and is expressed by its outline.
この輪郭には、外輪郭と内輪郭との2種類がある。There are two types of contours: outer contours and inner contours.
アウトライン文字方式による文字パターン表現を、ここ
では、単に、文字輪郭表現ということにスル。Character pattern expression using the outline character method is simply referred to as character outline expression here.
この文字輪郭表現を得る手段としては、予め紙上に描い
た文字パターンを読み取ってその文字輪郭を生成する方
法が有るが、この場合、太さなどの形状の変形が困難で
あるという問題を持つ。つまり、同一のサイズで太さの
異なる文字パターンを生成したり、サイズの拡大率より
も大きい太さ拡大率を実現したりすることは困難である
。One way to obtain this character outline representation is to read a character pattern drawn in advance on paper and generate the character outline, but in this case, there is a problem in that it is difficult to change the shape such as the thickness. In other words, it is difficult to generate character patterns of the same size but with different thicknesses, or to achieve a thickness expansion rate that is greater than the size expansion rate.
ところで、ストロークの骨格情報と形状データによって
任意の太さの文字パターンを生成する方式が特願昭62
−104246に示されており、その中に。By the way, a method for generating character patterns of arbitrary thickness using stroke skeleton information and shape data was proposed in a patent application published in 1983.
-104246 and therein.
骨格情報から文字パターンを生成する過程で、目的の太
さや端辺形状のストローク単位の輪郭情報が得られるこ
とが記されている。この方式を骨格ベクトル方式といい
、この方式で表現される文字表現を骨格ベクトル文字と
いう。この方法で直線とベジェ曲線との系列より成るス
トローク輪郭曲線が得られる。情報処理学会発行の論文
誌の平成元年第9号の1111頁から1118頁に、骨
格ベクトル文字情報から、太さなどを制御して生成した
直線形式のストローク輪郭表現から、直線形式の文字輪
郭表現を生成する方法が示されている。It is stated that in the process of generating a character pattern from skeleton information, contour information for each stroke of the desired thickness and edge shape can be obtained. This method is called the skeletal vector method, and the character expressions expressed using this method are called skeletal vector characters. In this way, a stroke contour curve consisting of a series of straight lines and Bezier curves is obtained. From pages 1111 to 1118 of issue 9, 1989, of the journal published by the Information Processing Society of Japan, a linear-format character outline is generated from a linear-format stroke outline representation generated by controlling the thickness etc. from skeleton vector character information. A method for generating representations is shown.
アウトライン文字パターンは太さの変形が困難であると
いう問題を持つ。これに応える方法として考えられた前
記従来技術は、直線のみから成るストローク輪郭情報か
ら文字輪郭情報に変換するものであり、これによって太
さ等の変形の実現は可能と成るが、輪郭曲線の品質が落
ちるという問題を持つ。Outline character patterns have a problem in that it is difficult to change the thickness. The above-mentioned conventional technology, which was conceived as a method to address this problem, converts stroke contour information consisting only of straight lines into character contour information.This makes it possible to realize changes in thickness, etc., but the quality of the contour curve I have a problem with it falling.
本発明の第1の目的は、上のように太さ等の形状の制御
の可能なストローク単位の輪郭情報を変換の元になるデ
ータとして採用して、所望の太さ等のストローク形状を
持った文字輪郭情報を得ることが可能であるような文字
パターン情報の変換方法を提供し、かつ、変換元と変換
先の輪郭情報を上記制御点による曲線で表現したものし
て、標準的で高品質の文字表現を与えられる上記変換方
法を実現することである。The first object of the present invention is to use contour information for each stroke, whose shape such as thickness can be controlled, as the source data for conversion, so as to create a stroke shape with a desired thickness, etc. Provides a method for converting character pattern information that makes it possible to obtain character contour information, and expresses the contour information of the conversion source and destination as a curved line using the control points described above. The object of the present invention is to realize the above conversion method which can give a quality character representation.
本発明の第2の目的は、さらに、変換元と変換先の輪郭
情報を直線とベジェ曲線とで表現したものして、標準的
で高品質の文字表現を与えられる上記変換方法を実現す
ることである。A second object of the present invention is to further realize the above conversion method which expresses the contour information of the conversion source and conversion destination using straight lines and Bezier curves, and provides standard and high-quality character expression. It is.
本発明の第3の目的は、ストローク単位の骨格情報から
目的の形状のストローク情報を生成した上で、それに対
応する文字輪郭情報を生成することにより、種々の形状
の文字輪郭情報が得られる上記変換方法を実現すること
である。A third object of the present invention is to generate stroke information of a desired shape from skeletal information for each stroke, and then generate character contour information corresponding to the stroke information, thereby obtaining character contour information of various shapes. The purpose is to realize a conversion method.
本発明の第4の目的は、変換元のストローク単位の輪郭
情報あるいは骨格情報を−揃いの文字セットについて保
持しそれらに上記の変換を施して一式の文字輪郭情報を
生成保存し得る文字パターン情報変換装置を提供するこ
とである。A fourth object of the present invention is to provide character pattern information that can store contour information or skeleton information for each stroke as a conversion source for a complete set of characters, perform the above conversion on them, and generate and save a set of character contour information. An object of the present invention is to provide a conversion device.
更に、本発明の第5の目的は、与えられた文字列の各文
字について上記の変換を適用し、変換結果として得られ
た文字輪郭情報を用いて目的の太さの文字パターン列を
プリンターあるいはディスプレイに出力できるような文
書出力装置を提供することである。Furthermore, a fifth object of the present invention is to apply the above conversion to each character of a given character string, and use the character outline information obtained as a result of the conversion to print a character pattern string of a desired thickness on a printer or An object of the present invention is to provide a document output device capable of outputting to a display.
〔課題を解決するための手段〕
上記第1の目的を達成するために、目的の太さその他の
形状を持った文字パターンを構成するストローク単位の
輪郭図形を表すストローク輪郭情報を保持し、異なるス
トローク輪郭の間の交点座標を計算し、それらの情報を
ベースに外輪郭線と内輪郭線情報を算出し、よって文字
単位の輪郭情報を与える文字輪郭情報を生成する。ここ
で、ストローク輪郭情報及び文字輪郭情報を、複数の制
御点で定義される部分的線素の系列として保持し、変換
過程で得られる外輪郭及び内輪郭を、やはり同形式の曲
線素の系列として定義するための制御点列を求めて表現
する。[Means for Solving the Problems] In order to achieve the first objective above, stroke contour information representing the contour figure of each stroke constituting a character pattern having a desired thickness and other shapes is retained, and Intersection coordinates between stroke contours are calculated, and outer contour line and inner contour line information are calculated based on the information, thereby generating character contour information that provides contour information for each character. Here, stroke contour information and character contour information are held as a series of partial line elements defined by multiple control points, and the outer contour and inner contour obtained in the conversion process are also a series of curve elements of the same format. Find and express the control point sequence to define .
上記第2の目的を達成するために、ストローク輪郭情報
及び文字輪郭情報を、線分とベジェ曲線との系列として
保持し、変換過程で得られる外輪郭及び内輪郭をこの線
分とベジェ曲線の系列である表現形式で表現する。In order to achieve the above second objective, stroke contour information and character contour information are held as a series of line segments and Bezier curves, and the outer contour and inner contour obtained in the conversion process are Expressed in an expression format that is a series.
上記第3の目的を達成するために、ストローク単位の骨
格情報と太さ等の形状データを含む骨格文字表現と、骨
格文字表現より該文字のストローク輪郭情報を生成する
。In order to achieve the third objective, a skeletal character representation including skeletal information for each stroke and shape data such as thickness, and stroke outline information of the character are generated from the skeletal character representation.
上記第4の目的を達成するために、目的の太さを持った
文字パターンを構成するストローク単位の輪郭図形を表
すストローク輪郭情報を複数文字のセットに関して保持
する手段を用いる。In order to achieve the fourth object, a means is used for holding stroke outline information for a set of a plurality of characters, which represents outline figures in units of strokes constituting a character pattern having a target thickness.
上記第5の目的を達成するために1文字輪郭情報によっ
て表現された文字パターンを印字、表示することの可能
なプリンター及びディスプレイ装置、及び、与えられた
文字コード列から各文字のストローク輪郭情報を取り出
して上記の変換を施す手段を用いる。In order to achieve the fifth objective, a printer and a display device capable of printing and displaying character patterns expressed by single character outline information, and stroke outline information of each character from a given character code string are provided. A means of extracting the data and performing the above transformation is used.
太さや端辺形状を調節したストローク輪郭情報は骨格ベ
クトル文字などより得られる。この各ストロークの輪郭
線の交点は、輪郭線が曲線で与えられている場合にも近
似的に求められる。文字輪郭情報のうち、外輪郭曲線は
、ストローク輪郭を生成するのに必要な点の内、最大ま
たは最小値を起点としてトレースし、分岐点があった場
合、ベクトルの外積をとって符号を判定してトレース方
向を決定することにより生成できる。一方、内輪郭情報
は、既に抽出された外輪郭線の一部を含まない閉図形を
認識し、その閉図形がストロークの内部に含まれている
か否かを判定し、含まれていない場合を内輪郭情報とす
ることにより生成可能である。この結果を変換先の文字
輪郭情報で表すには、曲線種別など該文字輪郭情報の形
式によって表現する手段を用いる。この際、変換元の当
該部公的線素を定義する制御点と、上記のストローク輪
郭線の関連する交点とから、変換先の部分的線素を定義
する制御点を求める。特に、ベジェ曲線で輪郭情報を表
現する場合には、上記変換過程で得られた内輪郭あるい
は外輪郭上の点と、元のストローク輪郭情報における曲
線情報とから、曲線情報と座標点列とからなる変換結果
の文字輪郭情報を表現する部分ヘジ二曲線生成を含む方
法を用いる。Stroke contour information with adjusted thickness and edge shape can be obtained from skeleton vector characters. The intersection points of the outlines of each stroke can be approximately found even when the outlines are given as curved lines. Of the character contour information, the outer contour curve is traced starting from the maximum or minimum value among the points necessary to generate the stroke contour, and if there is a branch point, the sign is determined by taking the cross product of the vectors. It can be generated by determining the trace direction. On the other hand, the inner contour information recognizes a closed figure that does not include a part of the already extracted outer contour line, determines whether the closed figure is included inside the stroke, and determines if it is not included. It can be generated by using inner contour information. In order to express this result in the character contour information to be converted, a means for expressing the character contour information in a format such as a curve type is used. At this time, control points that define the partial line element of the conversion destination are determined from the control points that define the relevant official line element of the conversion source and the related intersection points of the above-mentioned stroke outlines. In particular, when expressing contour information using Bezier curves, points on the inner contour or outer contour obtained in the above conversion process, curve information in the original stroke contour information, curve information and coordinate point sequence are A method including partial hesi-bicurve generation is used to express the character contour information of the conversion result.
ストローク輪郭情報の保持手段は一式の文字セットに対
する該情報の保持に用い、文字列の表示出力時に必要な
文字輪郭情報の変換作成時の元情報となる。ストローク
の骨格情報と形状データとそれに基づく文字輪郭情報の
生成手段は、直線とベジェ曲線とから成るストローク輪
郭情報を変換生成する手段を提供する。文字輪郭情報の
保持手段は変換結果の文字輪郭情報の一式を保持し、文
字列の表示出力時に必要な文字輪郭情報を提供する。The stroke outline information holding means is used to hold the information for a set of characters, and serves as source information for converting and creating character outline information necessary for displaying and outputting character strings. The stroke skeleton information, shape data, and character contour information generation means based thereon provide means for converting and generating stroke contour information consisting of straight lines and Bezier curves. The character contour information holding means holds a set of character contour information as a result of conversion, and provides the character contour information necessary when displaying and outputting a character string.
第1図は、本発明におけるストローク単位の輪郭データ
であるストローク輪郭情報から文字単位の輪郭データで
ある文字輪郭情報への変換までの概略の手順を示すフロ
ーチャートである。以下、本図をフローチャートの各処
理ステップに付した符号に従って説、明する。FIG. 1 is a flowchart showing a general procedure for converting stroke contour information, which is contour data on a stroke-by-stroke basis, to character contour information, which is contour data on a character-by-character basis, in the present invention. Hereinafter, this figure will be described and explained according to the symbols attached to each processing step in the flowchart.
処理11:指定された文字に対するストローク輪郭情報
を、それらを文字ごとに収容しているストローク輪郭辞
書から読み込む。1文字のストローク輪郭情報はその文
字を構成するストロークの個数分のストローク輪郭情報
を含む。単一のストロークのストローク輪郭情報はその
ストロークの輪郭部分曲線を表す輪郭部分情報の列であ
る。この輪郭部分情報は、輪郭曲線を生成するための制
御点の列と曲線の種別とから成る。Process 11: Read stroke outline information for a specified character from a stroke outline dictionary that stores the information for each character. Stroke outline information for one character includes stroke outline information for the number of strokes making up that character. The stroke outline information of a single stroke is a sequence of outline part information representing the outline part curve of that stroke. This contour portion information consists of a sequence of control points for generating a contour curve and the type of curve.
処理12:処理11で読み込んだ情報から、その文字を
構成するストロークの輪郭の交点を求め。Process 12: From the information read in process 11, find the intersection of the contours of the strokes that make up the character.
メモリ上に格納する。この時、交点を有する複数のスト
ローク群をグループとして記憶する。もちろん、文字に
よってグループの数は異なる。また、文字二″のように
交点がない場合は、各々のエレメントの頂点座標列をそ
のまま外輪郭線情報とし、以下の13から15の処理は
スキップする。Store in memory. At this time, a plurality of stroke groups having intersection points are stored as a group. Of course, the number of groups varies depending on the character. In addition, when there is no intersection like the character 2'', the vertex coordinate string of each element is used as the outer contour information, and the following processes 13 to 15 are skipped.
処理13:同一グループ内で、ストロークの輪郭部分情
報と既にもとめた交点座標とから、互いに接触または交
差する複数ストロークを併せた図形の外輪郭線を定義す
る外輪郭線情報を生成する。Process 13: Generate outer contour line information that defines the outer contour line of a figure that is a combination of a plurality of strokes that touch or intersect each other within the same group, from the stroke contour portion information and the already determined intersection point coordinates.
この外輪郭線情報の形式は、ストローク輪郭線情報の形
式と同じである。The format of this outer contour information is the same as the format of stroke contour information.
処理14:同一グループ内で、ストロークの輪郭部分情
報と既にもとめた交点座標とから、互いに接触または交
差する複数ストロークを併せた図形の内輪郭線を定義す
る内輪郭線情報を生成する。Process 14: Generate inner contour line information that defines the inner contour line of a figure that is a combination of a plurality of strokes that touch or intersect each other within the same group from the stroke contour information and the already determined intersection point coordinates.
この内輪郭線情報の形式は、ストローク輪郭線情報の形
式と同しである。The format of this inner contour information is the same as the format of stroke contour information.
処理15:処理13および14を上で求めた各グループ
について実行するための繰り返し判定処理である。Process 15: This is a repeat determination process for executing Processes 13 and 14 for each group determined above.
処理16:処理16は処理13および処理14から呼び
だされる処理であり、4点01,02゜03、および、
04を制御点とする後述のベジェ曲線の2点01と04
とを端点とする曲線セグメントにおける交点の分割比を
求め、これと同し比率で制御点間の分割を行ない、この
分割点を新たな制御点とする部分ベジェ曲線を求める。Process 16: Process 16 is a process called from Process 13 and Process 14, and has 4 points 01, 02°03, and
Two points 01 and 04 of the Bezier curve described below with 04 as the control point
The division ratio of the intersection point in the curve segment having the end points is determined, the control points are divided at the same ratio, and a partial Bezier curve is determined using this division point as a new control point.
部分ベジェ曲線というのは、これが元のベジェ曲線の一
部分となっているためである。It is called a partial Bezier curve because it is a part of the original Bezier curve.
以上の処理により、文字輪郭情報として必要な外輪郭線
情報と内輪郭線情報が生成できる。Through the above processing, outer outline information and inner outline information required as character outline information can be generated.
ここで第2図を用いて、パ日″という文字を例として、
上の変換過程を説明する。Here, using Figure 2 and taking the character ``Paday'' as an example,
The above conversion process will be explained.
第2図(A)は、″日″という文字を構成する2個の縦
線ストローク20と22.3個の横線ストローク21.
23.24を示す。この図において、符号25などの白
丸印はストロークの部分輪郭情報の端点となる制御点で
ある。FIG. 2(A) shows two vertical strokes 20 and 22.3 horizontal strokes 21. which make up the character "日".
23.24 is shown. In this figure, white circles such as 25 are control points that are end points of the partial contour information of the stroke.
第2図(B)は、(A)の各ストロークを組み合わせて
゛′日″という字を表現した図である。符号26などの
白丸印は、ストロークの部分輪郭線の端点が重なった点
を表し、符号27などの黒丸印は、この場合以外のスト
ロークの輪郭線同志の交点である。Figure 2 (B) is a diagram that represents the character ``日'' by combining the strokes in (A). White circles such as 26 represent points where the end points of the partial outlines of the strokes overlap. , 27, etc. are the intersections of stroke outlines other than in this case.
第2図(C)が、第1図の変換処理の結果として得られ
る文字輪郭情報で、これは外輪郭線情報28と内輪郭線
情報29で構成される。FIG. 2(C) shows character contour information obtained as a result of the conversion process shown in FIG. 1, which is composed of outer contour information 28 and inner contour information 29.
以上の処理により生成された文字輪郭情報から。From the character outline information generated by the above processing.
ドツトイメージに変換するには、外輪郭線情報の表す外
輪郭線で囲まれた内側をオンドツトで塗り潰し1次に、
−度塗りつぶされた領域の内、内輪郭線情報の表す内輪
郭線で囲まれた内側をオフドツトで塗りつぶし前の状態
に戻すことによる。これにより必要な部分のみを塗りつ
ぶしたドツト文字が完成する。なお、別の塗りつぶし方
法として、外輪郭線と内輪郭線を区別しないで、塗りつ
ぶす方法も可能であるが、外輪郭線と内輪郭線を区別し
た方が、高速に塗りつぶすことが可能である。To convert to a dot image, first fill in the inside surrounded by the outer contour line representing the outer contour line information with on dots,
- By returning the inner side of the filled area surrounded by the inner contour line representing the inner contour line information to the state before being filled with off-dots. This completes the dot character with only the necessary parts filled in. Note that as another filling method, it is possible to fill in without distinguishing between the outer contour line and the inner contour line, but it is possible to fill in the line more quickly by distinguishing between the outer contour line and the inner contour line.
次に第3図を用いて第1図の処理12に示した外輪郭線
情報を取得する方法について詳細に説明する。この図で
、白丸印と黒丸印の意味は前の通りである。点A、B、
E、Lで構成されるストローク(符号31)と点り、F
、N、Jで構成されるストローク(符号32)が重なり
あって複数の交点を有する場合である。なお、第3図で
は、説明を簡単にするために、2つのストロークが交点
を有する場合の例を示したが、2つ以上のストロークが
重なりあった場合も同様である。先ず、白丸印の点(頂
点と呼ぶ)および黒丸印の点く交点と呼ぶ)の中で、例
えば、最も右下に位置する点Aを起点として抽出する。Next, the method for acquiring the outer contour line information shown in process 12 of FIG. 1 will be explained in detail using FIG. 3. In this figure, the meanings of the white and black circles are as before. Points A, B,
Stroke (code 31) consisting of E and L, dot, F
, N, and J (symbol 32) overlap and have a plurality of intersection points. Note that, in order to simplify the explanation, FIG. 3 shows an example where two strokes have an intersection, but the same applies to a case where two or more strokes overlap. First, among the white circle points (referred to as vertices) and the black circle points (referred to as intersection points), for example, a point A located at the lower right corner is extracted as a starting point.
点Aより反時計方向に輪郭に沿ってトレースする。最初
の点Bは、交点ではないので部分ABが外輪郭線情報の
一部として確定する。点Bから接続されている点はCだ
けであるので線分BCも外輪郭線情報の一部として確定
する。次に点Cからは、3つの方向(点り。Trace along the contour counterclockwise from point A. Since the first point B is not an intersection point, the portion AB is determined as part of the outer contour information. Since the only point connected from point B is point C, line segment BC is also determined as part of the outer contour line information. Next, from point C, there are three directions (points).
E、Fの方向)に分岐しているので、どの方向に分岐す
るかを決定する必要がある。外輪郭線をトレースしてい
るのであるから、一番外側の点Fに分岐する必要がある
。この点Fの選択は、ベクトルの外積をとりその符号を
判定することにより可能である。つまり、破線の矢印で
示したベクトルBCとベクトルBD、ベクトルBCとベ
クトルBE、ベクトルBCとベクトルBFの各々の外積
をとると、その符号は、それぞれ、負、ゼロ、正となる
。第3図のように、外輪郭線を反時計方向にトレースす
る場合は、まず、符号が負のベクトルを捜し、それがな
ければ、ゼロ、正の順でベクトルを捜していく。第3図
では、ベクトルBFが選択され、点Cから点Fに進むこ
とになる。なお、ベクトルの外積をとった結果、同一符
号のベクトルが複数ある場合は、各ベクトルの単位ベク
トルの内積をとり、その値の一番大きなベクトルを選択
する。以上の操作を起点に戻るまで繰り返して行うこと
により、トレースした順序で頂点と交点座標列からなる
外輪郭線情報が得られる。E, F directions), it is necessary to decide which direction to branch. Since we are tracing the outer contour line, we need to branch to the outermost point F. This selection of point F is possible by taking the cross product of the vectors and determining its sign. That is, when the cross products of vectors BC and BD, vectors BC and BE, and vectors BC and BF shown by broken line arrows are taken, their signs are negative, zero, and positive, respectively. When tracing the outer contour line in a counterclockwise direction as shown in FIG. 3, first, a vector with a negative sign is searched for, and if there is no vector, the vectors are searched in the order of zero and then positive. In FIG. 3, vector BF is selected and will go from point C to point F. If the result of taking the outer product of the vectors is that there are multiple vectors with the same sign, take the inner product of the unit vectors of each vector, and select the vector with the largest value. By repeating the above operations until returning to the starting point, outer contour line information consisting of a vertex and intersection coordinate string can be obtained in the tracing order.
次に、第4図の例を用いて第1図の処理14で示した内
輪郭線情報の求め方を説明する。なお、第4図は、説明
を簡単にするために1つの内輪郭線を有する場合の例と
した。処理の概略は、すでに求めた外輪郭線の線分を含
まない最小の閉図形を全て求め、それらの閉図形が同一
グループのいずれのストロークの内側にもない場合、そ
の閉図形を構成する頂点および交点座標列を内輪郭線情
報とすることである。以下、これを詳細に説明する。Next, using the example of FIG. 4, the method of obtaining the inner contour line information shown in process 14 of FIG. 1 will be explained. Note that FIG. 4 shows an example in which there is one inner contour line to simplify the explanation. The outline of the process is to find all the smallest closed shapes that do not include the line segments of the outer contour that have already been found, and if those closed shapes are not inside any of the strokes in the same group, the vertices that make up the closed shape are and the intersection coordinate string as inner contour line information. This will be explained in detail below.
第4図において、外輪郭線情報の座標列として、第3図
に示した方法により、以下の点列が既に選択されている
。In FIG. 4, the following point sequence has already been selected as the coordinate sequence of the outer contour information using the method shown in FIG.
B3.B2.Y3.Y2.A3.A2.Al。B3. B2. Y3. Y2. A3. A2. Al.
A4.Xi、X4.Bl、B4.B3
これらの点列で構成される線分を含まない最小の閉図形
は以下の通りである。A4. Xi, X4. Bl, B4. B3 The minimum closed figure that does not include line segments and is made up of these point sequences is as follows.
閉図形H:X2.C2,C1,Xi、X2閉図形に:
X3.X4.C4,C3,X3閉図形L:X2.X3.
Y4.Yl、X2閉図形M:Yl、Y2.D2.Di、
Yl閉図形Q:Y4.D4.D3.Y3.Y4ストロー
クの頂点列は以下の通りである。Closed figure H:X2. C2, C1, Xi, X2 closed figure:
X3. X4. C4, C3, X3 closed figure L: X2. X3.
Y4. Yl, X2 closed figure M: Yl, Y2. D2. Di,
Yl closed figure Q: Y4. D4. D3. Y3. The vertex sequence of the Y4 stroke is as follows.
ストロークc :A1.A2.A3.A4ストロークd
: C1,C2,C3,C4ストロークe :Dl、
D2.D3.D4ストロークf:B1.B2.B3.B
4これらの閉図形のうち、閉図形Hは、ストロークc
(44)とストロークd(45)に、閉図形には、スト
ロークdとストロークf(47)に、閉図形Mは、スト
ロークCとストロークe(46)に、閉図形Qは、スト
ロークeとストロークfにそれぞれ含まれる。結果とし
て、閉図形りかどのストロークにも含まれないので、内
輪郭線を表わす閉図形となる。なお、内輪郭線を持たな
い文字もある。Stroke c: A1. A2. A3. A4 stroke d
: C1, C2, C3, C4 stroke e: Dl,
D2. D3. D4 stroke f: B1. B2. B3. B
4 Among these closed figures, the closed figure H has a stroke c
(44) and stroke d (45), the closed figure has stroke d and stroke f (47), the closed figure M has stroke C and stroke e (46), the closed figure Q has stroke e and stroke respectively included in f. As a result, since it is not included in the strokes of the closed figure's corners, it becomes a closed figure representing an inner contour line. Note that some characters do not have an inner outline.
以上の処理を行うことにより、ストローク輪郭情報から
文字輪郭情報として必要な情報である外輪郭線情報と内
輪郭線情報を取得てきたことになる。By performing the above processing, outer outline information and inner outline information, which are necessary information as character outline information, have been obtained from stroke outline information.
さて、上の説明では、処理の流れを理解するために、前
掲の情報処理学会論文誌掲載の論文に従いつつ、ストロ
ークの輪郭線が直線として表現された簡単な例をとりあ
げたが、実際には直線とベジェ曲線とを組み合わせた輪
郭線表現が標準化しつつある。そこでこの曲線表現につ
いても第1図の流れによって、上記の変換が可能であれ
ばその効果が大である。この曲線の場合も、同様な処理
で外輪郭線および内輪郭線情報を求めることを可能とす
る手段を以下に示す。Now, in the above explanation, in order to understand the flow of processing, we took a simple example in which the outline of a stroke is expressed as a straight line, following the paper published in the Information Processing Society of Japan's journal, but in reality, Contour representations that combine straight lines and Bezier curves are becoming standardized. Therefore, it would be very effective if the above-mentioned conversion could be performed in accordance with the flow shown in FIG. 1 for this curve representation as well. In the case of this curve as well, means for obtaining the outer contour line and inner contour line information by similar processing will be described below.
この変換法の説明の前に輪郭曲線情報の表現法を第8図
に示す。1文字のストローク輪郭情報と文字輪郭情報は
ともに文字を構成する図形の輪郭情報の系列として第8
図1)のように表現される。Before explaining this conversion method, a method of expressing contour curve information is shown in FIG. Stroke contour information of one character and character contour information are both part of the 8th series of contour information of figures that make up the character.
It is expressed as shown in Figure 1).
このうち、符号80は、当該文字を構成する図形の個数
を示し、符号81は、個々の図形の輪郭情報の列を示す
。各図形輪郭情報の形式は、第8図2)のように、内輪
郭線か外輪郭線かの区別を表す情報と、図形輪郭情報を
構成する部分輪郭情報の個数を表す情報と、その個数分
の部分輪郭情報列との系列である。内輪郭線か外輪郭線
かの区別を表す情報は、ストローク輪郭情報の場合には
、内輪郭■がセットされ、文字輪郭情報の場合には、そ
の図形輪郭情報によっていずれかの値がセットされる。Among these, reference numeral 80 indicates the number of figures constituting the character, and reference numeral 81 indicates a sequence of outline information of each figure. The format of each figure contour information is as shown in Fig. 8 2), information indicating whether it is an inner contour line or an outer contour line, information indicating the number of pieces of partial contour information constituting the figure contour information, and the number of pieces. This is a sequence with the partial contour information string for . In the case of stroke contour information, the information indicating the distinction between an inner contour line and an outer contour line is set to inner contour■, and in the case of character contour information, either value is set depending on the figure contour information. Ru.
つぎに1部分輪郭曲線情報の内容は、第8図3)に示す
ように、部分輪郭曲線の種別として直線かベジェ曲線か
の区別を表す情報と、部分輪郭線情報を制御点の個数を
表す情報と、その個数分の制御点座標との系列である。Next, the contents of the 1 partial contour curve information include information indicating whether the partial contour curve is a straight line or a Bezier curve as the type of the partial contour curve, and the partial contour information indicating the number of control points. This is a series of information and control point coordinates corresponding to the number of pieces of information.
この曲線の場合に、先の説明と共通の処理手順で外輪郭
線および内輪郭線情報を求める手段を以下に示す。これ
は、第1図の処理13と14について上で説明した例に
おける頂点の取扱いに、輪郭線を構成する曲線の種別(
この場合、直線とベジェ曲線)の取扱いを追加すること
による。その結果、文字輪郭線情報として前述の部分輪
郭線情報の列が得られ、この部分輪郭情報は制御点列と
曲線種別とで表される。In the case of this curve, the means for obtaining the outer contour line and inner contour line information using the same processing procedure as described above will be described below. This applies to the handling of vertices in the example described above for processes 13 and 14 in FIG.
In this case, by adding the treatment of straight lines and Bezier curves). As a result, the above-mentioned string of partial contour information is obtained as character contour information, and this partial contour information is represented by a control point string and a curve type.
ここで、山口富士夫著の「コンピュータディスプレイに
よる形状処理工学[II] (日F’J工業新聞社、
1982年)の第5章に明らかにされているベジェ曲線
の表現とその性質を示す。第6図1)で、Q、に始まり
Q、に至る曲線61は、Qo、Q、、Q2およびQ3の
4点を制御点とする3次式ベジェ曲線である。この曲線
は、両端制御点Q。およびQ、を通り、そこでの接線ベ
クトルを、それぞれQ10工およびQ10.とする3次
曲線であり、パラメタを1 (0≦t≦1)として、次
式で表される。Here, I would like to refer to "Shape processing engineering using computer displays [II]" by Fujio Yamaguchi (Nippon F'J Kogyo Shinbunsha,
We will show the representation of Bezier curves and their properties as revealed in Chapter 5 of 1982). In FIG. 6 (1), a curve 61 starting from Q and ending at Q is a cubic Bezier curve with four control points: Qo, Q, , Q2, and Q3. This curve has control points Q at both ends. and Q, and let the tangent vectors there be Q10 and Q10, respectively. It is a cubic curve where the parameter is 1 (0≦t≦1) and is expressed by the following equation.
P(t)=(1−t)’QO+3t(1−t)2Q、
+3(1−t)t2Q2+t’Q。P(t)=(1-t)'QO+3t(1-t)2Q,
+3(1-t)t2Q2+t'Q.
この曲線は、1=0のとき、点Q0を通り、t=1のと
き、点Q、を通る。This curve passes through point Q0 when 1=0, and passes through point Q when t=1.
次に、第7図1)で、Qoに始まりQ2に至る曲線71
は、Qo、Q工、Q2の3点を制御点とする2次式ベジ
ェ曲線である。この曲線は、両端制御点Q。およびQ2
を通り、そこでの接線ヘクトルを、それぞれQ。Q工お
よびQ工Q2とする2次曲線であり、パラメタをt (
○≦t≦1)として、次式で表される。Next, in FIG. 7 1), a curve 71 starting from Qo and ending at Q2.
is a quadratic Bezier curve whose control points are Qo, Q-factor, and Q2. This curve has control points Q at both ends. and Q2
, and the tangent hector there, respectively, is Q. It is a quadratic curve with Q-work and Q-work Q2, and the parameter is t (
○≦t≦1), it is expressed by the following formula.
P(t)=(1−t)2Q0+2t(1−t)Q□+t
2Q2この曲線は、1=0のとき、点Q0 を通り、し
=1のとき、点Q2 を通る。この2次式ベジェ曲線は
、第7図2)のようにして3次式ベジェ曲線Ri (i
=o、1,2.3)に変換できることが知られている。P(t)=(1-t)2Q0+2t(1-t)Q□+t
2Q2 This curve passes through point Q0 when 1=0, and passes through point Q2 when 1=1. This quadratic Bezier curve is converted to a cubic Bezier curve Ri (i
=o, 1, 2.3).
ここで、R1とR2は、それぞれ、QoQ、およびQ、
Q2を、2:1及び1:2に分割する点である。Here, R1 and R2 are QoQ and Q, respectively.
This is the point where Q2 is divided into 2:1 and 1:2.
次に、第6図2)は、3次式ベジェ曲線の両端制御点の
いずれか(ここでは、第1制御点)と、この3次式ベジ
ェ曲線上の任意の1点を両端制御点とする3次式ベジェ
曲線の求め方、つまり、中間の2つの制御点の求め方を
示す。これを繰り返すと、3次式ベジェ曲線上の任意の
2点を両端制御点とする3次式ベジェ曲線が求められる
ことが明らかである。第6図2)には、制御点Q0 よ
り制御点QJ に至る3次式ベジェ曲線61の第1制御
点Q。と、この3次式ベジェ曲線上の任意の1点Cを両
端制御点とする3次式ベジェ曲線の求め方、つまり5制
御点R8=Qo、R工、R2およびR,=Cの求め方を
説明する。これらのうち1両端の2点は、既に明らかで
あるから、求めるのは、中間の2点、つまり、R1とR
2とである。上記文献によると、曲線61において点C
に対応するしの値をtsとすると、点R工はQ、Q工を
1:しSに分割する点1として求められる。次に、Q、
Q、、Q10.を同様に分割する点を、SおよびTとし
、更に、線分STを同様に分割する点を特とする請求め
る点R2は線分R工Sを1 : tsに分割する点、で
ある。この点は、UCの延長と線分R1S とが交わ
る点でもある。また、点Cでの接線が線分R1Sと交わ
る点として点R2を求めることも可能である。以上、3
次式ベジェ曲線上の任意の1点Cを与えるパラメタts
から、もとの3次式ベジェ曲線の先頭制御点と点Cとを
両端制御点とし、もとの3次式ベジェ曲線と重なる新た
な3次式ベジェ曲線を求める公知の方法を説明した。こ
の方法で、先頭制御点の代わりに最終制御点を用いても
同様である。この方法を2回繰り返すことにより、3次
式ベジェ曲線上の任意の2点を両端制御点とし、もとの
曲線上を通る3次式ベジェ曲線が得られる。次に、Cを
与えるパラメタtsの求め方であるが、これは、
C=(1−t)’Q、 +3t(1−t)2Q工+3(
1−t)t2Q2+t’Q)で与えられる3次方程式を
満足するtを、0≦t≦1なる条件で解くことによって
得られる。Next, in Figure 6 2), one of the control points at both ends of the cubic Bezier curve (here, the first control point) and any one point on this cubic Bezier curve are defined as the control points at both ends. We will show how to find the cubic Bezier curve, that is, how to find the two intermediate control points. It is clear that by repeating this process, a cubic Bezier curve with two arbitrary points on the cubic Bezier curve as both end control points can be obtained. FIG. 6 2) shows the first control point Q of the cubic Bezier curve 61 that extends from the control point Q0 to the control point QJ. And, how to find a cubic Bezier curve with arbitrary point C on this cubic Bezier curve as both end control points, that is, how to find 5 control points R8=Qo, R, R2 and R,=C. Explain. Of these, the two points at both ends are already clear, so what we are looking for is the two points in the middle, that is, R1 and R
2. According to the above document, point C on curve 61
If the value of ts corresponding to is ts, then the point R can be found as the point 1 that divides Q and Q into 1:S. Next, Q,
Q,,Q10. Let S and T be the points that divide the line segment ST in the same way, and the claimable point R2, which is the point that divides the line segment ST in the same way, is the point that divides the line segment R in a ratio of 1:ts. This point is also the point where the extension of UC intersects with the line segment R1S. It is also possible to obtain point R2 as the point where the tangent at point C intersects with line segment R1S. That’s all, 3
Parameter ts that gives any one point C on the Bezier curve
From this, a known method has been described in which the leading control point and point C of the original cubic Bezier curve are taken as both end control points, and a new cubic Bezier curve that overlaps with the original cubic Bezier curve is obtained. In this method, the same effect can be obtained even if the last control point is used instead of the first control point. By repeating this method twice, arbitrary two points on the cubic Bezier curve are set as both end control points, and a cubic Bezier curve passing on the original curve is obtained. Next, how to find the parameter ts that gives C, this is as follows: C=(1-t)'Q, +3t(1-t)2Qtech+3(
It is obtained by solving t that satisfies the cubic equation given by 1-t)t2Q2+t'Q) under the condition of 0≦t≦1.
以上、第6図及び第7図を用いて、2次式ベジェ曲線を
3次式ベジェ曲線に変換する方法と、3次式ベジェ曲線
上の2点を与えて、もとの3次式ベジェ曲線を通り、こ
の2点を両端制御点とするベジェ曲線を求める方法を示
した。Above, using Figures 6 and 7, we have explained how to convert a quadratic Bezier curve to a cubic Bezier curve, and how to convert the original cubic Bezier curve by giving two points on the cubic Bezier curve. We have shown a method for finding a Bezier curve that passes through a curve and uses these two points as both end control points.
最近のアウトライン文字パターンの輪郭曲線は、2次ま
たは3次のベジェ曲線と直線との組み合わせで表現され
ることが多い。それ以外で用いられることのある線種と
して、円は3次式ベジェ曲線で高精度で近似でき、いわ
ゆる3次式スプライン曲線は、3次式ベジェ曲線に変換
できることが、止揚の文献に示されている。これにより
、以上の線種の組み合わせで表現される輪郭曲線は、直
線と3次式ベジェ曲線の組み合わせに変換できる。The outline curves of recent outline character patterns are often expressed by a combination of quadratic or cubic Bezier curves and straight lines. As for other line types that are sometimes used, it has been shown in the literature that a circle can be approximated with high accuracy by a cubic Bezier curve, and that a so-called cubic spline curve can be converted into a cubic Bezier curve. ing. Thereby, the contour curve expressed by the combination of the above line types can be converted into a combination of a straight line and a cubic Bezier curve.
ここで、以上の公知技術を念頭に、このような曲線輪郭
について、第1図の処理手順を説明する。Now, with the above-mentioned known techniques in mind, the processing procedure shown in FIG. 1 will be explained regarding such a curved contour.
前には、第1図の説明で用いた第3図と第4図のストロ
ーク輪郭は線分で表される部分輪郭情報の系列の場合の
例で示したが、これを線分または3次式ベジェ曲線で表
現される部分輪郭情報の系列で表されるものとする。こ
れらはいずれも第8図に従う情報で表される。これに対
して、第1図の処理手順はそのまま適用できる。第3図
と第4図に関する説明も曲線種別に依存しない。曲線種
別に依存する処理は次の2点である。Previously, the stroke contours in Figures 3 and 4 used in the explanation of Figure 1 were shown as an example of a series of partial contour information represented by line segments. It is assumed that the contour information is expressed by a series of partial contour information expressed by a Bezier curve. All of these are represented by information according to FIG. On the other hand, the processing procedure shown in FIG. 1 can be applied as is. The explanations regarding FIGS. 3 and 4 also do not depend on the type of curve. The following two processes depend on the type of curve.
その第1は、線分または3次式ベジェ曲線で表現される
2つのストロークの部分輪郭間の交点を求める処理であ
るが、これは、解くべき方程式の次数が異なるというこ
とにすぎない。The first is the process of finding the intersection between partial contours of two strokes expressed by line segments or cubic Bezier curves, but this simply means that the orders of the equations to be solved are different.
その第2は、上で求めた交点と、もとの部分輪郭曲線情
報とから、新たに、線分または3次式ベジェ曲線で表現
される外輪郭及び内輪郭の部分輪郭情報を生成する処理
である。これは、上述のベジェ曲線について知られた変
換法を適用する処理によって実現される。この処理は、
第1図における符号13の処理と符号14の処理とから
共通に利用される符号16の処理として示したが、これ
を実現する処理方法の例を、第9図によって示す。The second process is to generate new partial contour information for the outer and inner contours expressed by line segments or cubic Bezier curves from the intersection points found above and the original partial contour curve information. It is. This is achieved by applying the known transformation method for Bezier curves mentioned above. This process is
Although shown as the process 16 which is commonly used from the process 13 and the process 14 in FIG. 1, an example of a processing method for realizing this is shown in FIG.
第9図は部分ベジェ曲線生成法を与える処理を示し、第
1図の符号13の処理と符号上4の処理とから、当該ス
トローク輪郭の部分輪郭情報PartIと、その上の2
点P1とP2とをパラメタとして呼び呂される符号16
の処理を与えるサブプログラムの流れをより具体的に示
したものである。FIG. 9 shows a process for generating a partial Bezier curve. From the process 13 in FIG. 1 and the process 4 in FIG.
Code 16 that is called by using points P1 and P2 as parameters
This shows more specifically the flow of the subprogram that provides the processing.
ここで、部分輪郭情報PartIがベジェ曲線を表すと
き、そのベジェ曲線のパラメタtに関して、PlはP2
より小さいtに対応するものとする。Here, when the partial contour information PartI represents a Bezier curve, Pl is P2 with respect to the parameter t of the Bezier curve.
It corresponds to a smaller t.
符号90は二tらのパラメタを取り込む処理である。こ
のサブプログラムの機能は、PartIの与える曲線の
部分である点P1とP2との間の曲線情報を部分輪郭線
情報PartOとして生成することである。符号91は
PartIで与えられる曲線が線分かベジェ曲線かを判
定する処理、符号93はこれが線分のとき部分輪郭線情
報PartOを生成する処理であり、曲線種別は直線と
し、制御点数は2てあり、制御点座標は、単に01=P
1,02=P2とすればよい。これによりこの場合の処
理は終了する。一方、符号92は、符号91での判定が
ベジェ曲線であった場合の処理であり、部分輪郭線情報
PartOの曲線種別はベジェ曲線とし、制御点数は4
とする。制御点座標列01は、符号94以下の処理で求
める。まず符号94の処理では1点P1か点P2かが入
力部分輪郭線の制御点と一致する場合かどうかを判定す
る。上の仮定とベジェ曲線の中間の制御点が曲線上にな
いことから、この判定は、P1=11またはP2=I4
のいずれかが成立することの判定である。これが成立す
る場合、処理は符号99に進み、不成立の場合、符号9
5に進む。まず、符号9つの処理では2点PL、P2の
いずれかが両端制御点のいずれかと一致する場合であり
、○1=PL、04=P2として、符号910の処理に
おいて別のサブプログラムである部分ベジェ計算を、第
1パラメタを○i、第2パラメタをIiとして呼ぶ。Reference numeral 90 represents a process of taking in the two parameters. The function of this subprogram is to generate curve information between points P1 and P2, which is the part of the curve given by Part I, as partial contour information PartO. Reference numeral 91 is a process for determining whether the curve given in Part I is a line or a Bezier curve, and reference numeral 93 is a process for generating partial contour information PartO when this is a line, the curve type is a straight line, and the number of control points is 2. The control point coordinates are simply 01=P
1,02=P2. This ends the processing in this case. On the other hand, reference numeral 92 is a process when the determination at reference numeral 91 is a Bezier curve, the curve type of the partial contour information PartO is a Bezier curve, and the number of control points is 4.
shall be. The control point coordinate sequence 01 is obtained by the process 94 and subsequent steps. First, in the process 94, it is determined whether one point P1 or one point P2 coincides with a control point of the input partial contour. Based on the above assumption and the fact that the control point in the middle of the Bezier curve is not on the curve, this determination is P1=11 or P2=I4
This is a determination that either of the following holds true. If this holds true, the process proceeds to code 99; if not, code 9
Proceed to step 5. First, in the process with code 9, either the two points PL or P2 match either of the control points at both ends, and if ○1=PL and 04=P2, then in the process with code 910, the part that is another subprogram The Bezier calculation is called with the first parameter as ○i and the second parameter as Ii.
このサブプログラムは、先に第6図の2)を用いて説明
した方法そのものを実現するもので、3次式ベジェ曲線
上の1点を与えられてそれを両端制御点の1つとし、元
の3次式ベジェ曲線上を通る新たな3次式ベジェ曲線を
求める。具体的には、第2パラメタとして元のベジェ曲
線の制御点列を受は取り、第1パラメタとして結果とし
て返すベジェ曲線の制御点列を受は取る。但し、後者の
4つの制御点のうち、第1制御点と第4制御点とは入力
情報として設定されている。このうちいずれかが、元の
ベジェ曲線の両端制御点と一致するものであり、他方が
元の3次式ベジェ曲線上を通る点である。このサブプロ
グラムは第1パラメタの制御点列のうち、第2、第3の
制御点を求め、他の2点は入力のまま返す。これが求め
る部分ベジェ曲線であることは航述の説明で明らかであ
る。This subprogram implements the method explained above using 2) in Figure 6. It is given one point on the cubic Bezier curve, sets it as one of the control points at both ends, and Find a new cubic Bezier curve that passes on the cubic Bezier curve. Specifically, the control point sequence of the original Bezier curve is taken as the second parameter, and the control point sequence of the Bezier curve to be returned as a result is taken as the first parameter. However, among the latter four control points, the first control point and the fourth control point are set as input information. One of these coincides with both end control points of the original Bezier curve, and the other is a point passing on the original cubic Bezier curve. This subprogram determines the second and third control points from the control point sequence of the first parameter, and returns the other two points as input. It is clear from the navigational explanation that this is the desired partial Bezier curve.
さて、判定94が不成立のとき、処理は符号95に進む
が、これは、元の3次式ベジェ曲線上を通り両端制御点
のいずれとも一致しない2点が与えられた場合の処理で
ある。符号95の処理では、仮の制御点座標列Tiを用
い、その第1制御点T1を元のベジェ曲線の第1制御点
11とし、第4制御点T4を入力点P2として、部分ベ
ジェ計算サブプログラムを第1パラメタをTi、第2パ
ラメタをIiとして呼び出す。この結果、上で仮定した
PL、P2との順序関係により、元のベジェ曲線の第1
制御点■1を第1制御点T1とし、入力点P2を第4制
御点T4とし、入力点P1を通る元のベジェ曲線の部分
をなす新たなベジェ曲線の制御点列が、Tiに返される
。この段階で、2点PL、P2のうちP2がベジェ曲線
Tiの第4制御点と一致することになり、残る処理は、
符号99におけると同様である。但し、この場合、部分
ヘジエ計算の第2パラメタは仮の制御点列T1である。Now, when the determination 94 is not satisfied, the process proceeds to 95, but this is the process when two points are given that pass on the original cubic Bezier curve and do not coincide with either of the control points at both ends. In the process 95, a temporary control point coordinate sequence Ti is used, the first control point T1 is set as the first control point 11 of the original Bezier curve, the fourth control point T4 is set as the input point P2, and the partial Bezier calculation sub Call the program with Ti as the first parameter and Ii as the second parameter. As a result, due to the order relationship between PL and P2 assumed above, the first
Control point ■1 is the first control point T1, input point P2 is the fourth control point T4, and a new Bezier curve control point sequence that forms the part of the original Bezier curve that passes through the input point P1 is returned to Ti. . At this stage, P2 of the two points PL and P2 coincides with the fourth control point of the Bezier curve Ti, and the remaining processing is as follows.
This is the same as in reference numeral 99. However, in this case, the second parameter of the partial Hezier calculation is the temporary control point sequence T1.
つまり、符号97の処理で、01=PL、04=P2と
して、符号98の処理において部分ベジェ計算を、第1
パラメタを○i、第2パラメタをTiとして呼ぶ。符号
910の処理あるいは符号98の処理で制御点列Oiに
求める3次式ベジェ曲線の制御点列が完成する。部分輪
郭線情報PartOのその他の情報は、既に符号92の
処理で設定済みである。In other words, in the process 97, 01=PL and 04=P2, and in the process 98, the partial Bezier calculation is performed as the first
The parameter is called ○i, and the second parameter is called Ti. By the process 910 or 98, the control point sequence of the cubic Bezier curve obtained from the control point sequence Oi is completed. Other information of the partial contour information PartO has already been set in the process 92.
第1図の符号13と符号14の処理から第9図のサブプ
ログラムを呼ぶ際には、交点が求まった当該ストローク
に関して、部分輪郭曲線単位に部分輪郭曲線情報と、2
点の交点座標を先に述へた順でこのサブプログラムに渡
せば良い。部分輪郭曲線が3点以上の交点をもつ場合は
この呼び出しを繰り返す。1点しか交点をもたない場合
は、結果の部分曲線に含まれる両端制御点の一方を求め
、これをPL、P2のいずれかとしてサブプログラムを
呼ぶ。これにより、第8図の部分輪郭線情報84が求め
られる。求める文字輪郭情報のその他の情報は、第8図
の符号83の構成部分輪郭線情報数83、内外輪郭線の
区別82、および文字を構成する図形数80である。こ
のうち、82は、符号13と14の処理の各々で対応す
る値が設定される。80は、符号12で求めたグループ
の個数として設定される。83は、符号13および14
の処理内で設定される。When calling the subprogram in FIG. 9 from the processes 13 and 14 in FIG. 1, partial contour curve information and 2
All you have to do is pass the intersection coordinates of the points to this subprogram in the order described above. This call is repeated if the partial contour curve has three or more intersection points. If there is only one point of intersection, one of the control points at both ends included in the resulting partial curve is found, and the subprogram is called as either PL or P2. As a result, partial contour information 84 shown in FIG. 8 is obtained. Other information on the character contour information to be obtained is the number 83 of constituent part contour information indicated by reference numeral 83 in FIG. Among these, 82 is set to a corresponding value in each of the processes 13 and 14. 80 is set as the number of groups determined by reference numeral 12. 83 is the code 13 and 14
It is set within the process.
以上述へてきた変換方法を文書処理装置に適用した例を
第5図に示す。キーボード505から入力された文字列
は、L5よびバス500を介してCPU502に転送さ
れる。CPU502では、仮名漢字変換が必要な場合は
仮名漢字変換により該当する文字を変換し、CPU50
2から文字を識別するための文字コードとして、バス5
00を経由して、ストローク輪郭辞書503をアクセス
し、そこから当該文字の各ストロークの位置と形状を与
えるストローク輪郭情報を読みだす。この情報をL3,
500.L8を経由してストローク輪郭情報から文字輪
郭情報への変換部510に送られる。ここで、まず、エ
レメント輪郭情報取り出し部511に転送する。511
はLIOを介して、文字輪郭情報生成部513にストロ
ーク毎の輪郭線情報を転送する。513では、第1図の
処理を行ない、外輪郭線情報と内輪郭線情報を生成する
。この結果をLi2及びL6またはL7を介して文字輪
郭情報を出力できる表示装置またはプリンタに出力させ
る。あるいは、Li2及びL4を介して、この文字輪郭
情報を文字輪郭辞書504に格納する。また、塗りつぶ
し処理部514で公知の方法により輪郭線の内部を塗り
つぶしてドツトイメージに展開し、Li2.L6やL7
を介して表示装置506やプリンタ507に出力する。FIG. 5 shows an example in which the conversion method described above is applied to a document processing device. A character string input from the keyboard 505 is transferred to the CPU 502 via the L5 and the bus 500. If kana-kanji conversion is necessary, the CPU 502 converts the corresponding characters by kana-kanji conversion, and
As a character code for identifying characters from 2, bus 5
00, the stroke outline dictionary 503 is accessed, and stroke outline information giving the position and shape of each stroke of the character is read therefrom. This information is transferred to L3,
500. The information is sent to the converter 510 from stroke outline information to character outline information via L8. Here, first, it is transferred to the element contour information extraction unit 511. 511
transfers outline information for each stroke to the character outline information generation unit 513 via the LIO. At step 513, the process shown in FIG. 1 is performed to generate outer contour line information and inner contour line information. This result is output via Li2 and L6 or L7 to a display device or printer capable of outputting character contour information. Alternatively, this character contour information is stored in the character contour dictionary 504 via Li2 and L4. Furthermore, the filling processing unit 514 fills in the inside of the outline using a known method and develops it into a dot image, Li2. L6 or L7
The data is output to a display device 506 or a printer 507 via the .
更に、骨格情報辞書520は、文字の骨格情報と形状デ
ータを保持し、L20を経由して符号521の骨格情報
からストローク輪郭情報への変換部に入力され、ここで
公知の骨格情報からストローク輪郭情報への変換を行な
った結果の直線とベジェ曲線とで表現されたストローク
輪郭情報をL21を経由してストローク辞書503に収
容される。Furthermore, the skeleton information dictionary 520 holds character skeleton information and shape data, and is inputted via L20 to a converter from skeleton information to stroke contour information 521, where the stroke contour is converted from known skeleton information. Stroke contour information expressed by straight lines and Bezier curves resulting from the conversion into information is stored in the stroke dictionary 503 via L21.
この情報は、上記のように利用される。符号521の変
換部で得られたストローク輪郭情報は、L21を経由し
てストローク輪郭情報から文字輪郭情報への変換部51
0に送られることもてきるここで変換結果として得られ
る文字輪郭情報の利用法は上に述べたのと同様である。This information is used as described above. The stroke contour information obtained by the conversion unit 521 is sent to the conversion unit 51 from stroke contour information to character contour information via L21.
The character outline information obtained as a result of conversion is used in the same way as described above.
ストローク単位の文字輪郭情報として、直線と3次式ベ
ジェ曲線を用いた場合について、品質の劣化なく、最近
標準化しつつある直線と3次式ベジェ曲線による文字輪
郭情報に変換が可能になったことと、骨格文字方式を用
いてストローク単位の文字輪郭情報として、太さその他
の形状の変形パターンを生成することにより、高品質の
文字輪郭フォントが自動的に生成可能となり、これを直
接プリンタや表示装置に出力できる。また今後文字輪郭
フォントで必要とされる多様な変形フォントの生産効率
を格段に向上できる。It is now possible to convert straight lines and cubic Bezier curves into character contour information based on straight lines and cubic Bezier curves, which have recently been standardized, without degrading quality as character contour information for each stroke. By using the skeleton character method to generate deformed patterns of thickness and other shapes as character outline information for each stroke, it is possible to automatically generate high-quality character outline fonts, which can be directly printed on a printer or displayed. Can be output to a device. Furthermore, the production efficiency of the various deformed fonts that will be needed in the future as character outline fonts can be greatly improved.
第1図は、ストローク輪郭情報を文字輪郭情報に変換す
る処理手順を示すフロー、第2図(A)はストローク輪
郭パターンの例、(B)はこれらを組み合わせて文字パ
ターンを表現した例であり、(C)は、(B)で表現し
た文字を文字輪郭情報として表現した例、第3図は、外
輪郭線のトレース方法を示す図、第4図は、内輪郭線を
求めるため、ストロークの接続状態を表す図、第5図は
。
本発明を適用した場合の文書処理装置の構成例、第6図
は、3次式ベジェ曲線の性質を説明する図、第7図は、
2次式ベジェ曲線の性質を説明する図、第8図は、線分
と3次式ベジェ曲線の系列として表されるストローク輪
郭情報と文字輪郭情報の表現形式の例を示す図である。
第9図は、第1図の処理16を具体的に示したものであ
り、ストローク輪郭の部分輪郭情報を生成する部分ベジ
ェ曲線生成処理を実行するサブプログラムの処理手順を
第
図
第3図
第4図
第6図
α
第7図
1)1文字のストローク輪郭情報と文字輪郭情報の形式
2)各図形輪郭情報の形式
3)部分輪郭線情報の形式Figure 1 is a flowchart showing the processing procedure for converting stroke contour information to character contour information, Figure 2 (A) is an example of a stroke contour pattern, and (B) is an example of a combination of these to express a character pattern. , (C) is an example in which the character expressed in (B) is expressed as character outline information, Figure 3 is a diagram showing how to trace the outer outline, and Figure 4 is a diagram showing how to trace the outer outline. FIG. 5 is a diagram showing the connection state of . An example of the configuration of a document processing device to which the present invention is applied, FIG. 6 is a diagram illustrating the properties of a cubic Bezier curve, and FIG.
FIG. 8, which is a diagram explaining the properties of a quadratic Bezier curve, is a diagram showing an example of the expression format of stroke contour information and character contour information expressed as a series of line segments and cubic Bezier curves. FIG. 9 specifically shows the process 16 in FIG. 1, and the processing procedure of a subprogram that executes partial Bezier curve generation processing for generating partial contour information of a stroke contour is shown in FIG. Figure 4 Figure 6 α Figure 7 1) Format of stroke outline information and character outline information for one character 2) Format of each figure outline information 3) Format of partial outline information
Claims (1)
交点を求め、該複数のストロークの各々の輪郭の内、求
められたいずれかの交点を端点とし、該文字パターンと
して使用される部分を決定し、各ストロークについて決
定された部分でもってその輪郭を表す文字パターン情報
変換方法において、 a)各ストローク情報として、必ずしも曲線上にない複
数の制御点によってそれぞれ定義され、そのストローク
を構成する複数の部分曲線を表す部分輪郭曲線情報の系
列を与え、それを用いて異なるストロークの輪郭の交点
を求め、 b)各ストロークを構成する複数の部分曲線の内、他の
ストロークとの交点を含む一つの部分曲線に対して、そ
の交点から始まり、文字輪郭として使用される、その一
つの部分曲線の一部(修正部分曲線)を規定する制御点
を求め、この修正部分曲線をこれらの制御点に基づいて
表す輪郭情報を生成する ことを特徴とする文字パターン情報変換方法。 2、ストローク輪郭情報から文字輪郭情報への請求項1
の変換方法において、変換元及び変換先の輪郭情報が共
に線分あるいはいわゆるベジエ曲線から成る部分輪郭曲
線情報の系列として与えられ、このうち線分情報の表現
形式は両端の2点を制御点として持ち、ベジエ曲線の表
現形式は両端点と1または2の曲線外の点よりなる3又
は4点を制御点として持ち、この曲線の生成は、始端に
おいて値0、終端において値1をとり、0から1までの
変域を持つパラメータの、制御点を係数とする2次又は
3次の方程式により与えられるものとし、上記ステップ
b)において、与えられた交点に対応するパラメタ値を
求め、その変域全体に対する分割比で、隣り合う制御点
間の線分を分割して、その分割点を制御点とし元のベジ
エ曲線上を通る部分ベジエ曲線を表す文字輪郭情報を生
成することを特徴とする請求項1の文字パターン情報変
換方法。 3、文字を構成するストローク単位の骨格線と太さ等の
形状データとから種々の形状のストローク輪郭情報を請
求項1あるいは2の形状表現で生成し、生成したストロ
ーク輪郭情報より文字輪郭情報を生成する請求項1ある
いは2の文字パターン情報変換方法。 4、文字パターンを構成するストローク単位の輪郭図形
を表すストローク輪郭情報あるいは骨格文字情報を複数
文字について保持する保持手段と、指定された文字に対
応する該ストローク情報を該保持手段より取り出す手段
と、請求項1、2あるいは3の文字パターン情報変換方
法により、該文字の文字輪郭情報を生成する手段を持つ
ことを特徴とする文字パターン情報変換装置。 5、請求項1、2または3の文字パターン情報変換方法
において、文字輪郭情報によって表現された文字パター
ンを印字あるいは表示するプリンタあるいはディスプレ
イ装置と、文字のコード列の中の各文字に対して該当す
るストローク輪郭情報あるいは骨格文字情報を取り出す
手段と、該情報に請求項1、2あるいは3の変換を施し
て得た文字輪郭情報を用いて、該文字列を該印字あるい
は表示装置に表示出力する手段を持つことを特徴とする
文書出力装置。[Claims] 1. Find the intersection points of the contours of a plurality of strokes constituting a character pattern, use one of the found intersection points among the contours of each of the plurality of strokes as an end point, and use it as the character pattern. In the character pattern information conversion method, each stroke information is defined by a plurality of control points that are not necessarily on a curve, and each stroke is defined by a plurality of control points that are not necessarily on a curve. Provide a series of partial contour curve information representing a plurality of partial curves that constitute each stroke, and use that to find the intersection points of the contours of different strokes; For one partial curve that includes an intersection point, find control points that define a part of that one partial curve (modified partial curve) that starts from the intersection point and is used as a character outline, and then convert this modified partial curve to these points. A character pattern information conversion method characterized by generating contour information expressed based on control points. 2. Claim 1 from stroke contour information to character contour information
In the conversion method, both the source and destination contour information are given as a series of partial contour curve information consisting of line segments or so-called Bezier curves, and the line segment information is expressed using two points at both ends as control points. The expression format of a Bezier curve has 3 or 4 points as control points consisting of both end points and 1 or 2 points outside the curve, and the generation of this curve takes a value of 0 at the start end, a value of 1 at the end, and 0. It is assumed that the parameters having a range from The method is characterized in that a line segment between adjacent control points is divided at a division ratio for the entire area, and character contour information representing a partial Bezier curve passing on the original Bezier curve is generated using the dividing point as a control point. The character pattern information conversion method according to claim 1. 3. Generating stroke contour information of various shapes from the skeleton line of each stroke constituting a character and shape data such as thickness, etc. using the shape representation of claim 1 or 2, and character contour information from the generated stroke contour information. 3. The method of converting character pattern information according to claim 1 or 2, wherein the method generates character pattern information. 4. Holding means for holding stroke contour information or skeleton character information for a plurality of characters representing outline figures of stroke units constituting a character pattern, and means for extracting the stroke information corresponding to a specified character from the holding means; 4. A character pattern information converting device comprising means for generating character contour information of the character by the character pattern information converting method according to claim 1, 2 or 3. 5. In the character pattern information conversion method according to claim 1, 2 or 3, a printer or display device that prints or displays a character pattern expressed by character outline information, and a printer or display device that prints or displays a character pattern expressed by character outline information, and a means for extracting stroke contour information or skeleton character information, and character contour information obtained by converting the information according to claim 1, 2 or 3, to display and output the character string on the printing or display device. A document output device characterized by having means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2244064A JPH04125590A (en) | 1990-09-17 | 1990-09-17 | Character pattern information conversion method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2244064A JPH04125590A (en) | 1990-09-17 | 1990-09-17 | Character pattern information conversion method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH04125590A true JPH04125590A (en) | 1992-04-27 |
Family
ID=17113198
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2244064A Pending JPH04125590A (en) | 1990-09-17 | 1990-09-17 | Character pattern information conversion method and device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH04125590A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06166195A (en) * | 1992-06-11 | 1994-06-14 | Esselte Dymo Nv | Label printing device and method of printing |
-
1990
- 1990-09-17 JP JP2244064A patent/JPH04125590A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06166195A (en) * | 1992-06-11 | 1994-06-14 | Esselte Dymo Nv | Label printing device and method of printing |
US5967679A (en) * | 1992-06-11 | 1999-10-19 | Esselte N.V. | Label printing apparatus |
US6079889A (en) * | 1992-06-11 | 2000-06-27 | Esselte N.V. | Label printing apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS62123573A (en) | Computer graphic apparatus and operation thereof | |
JP6298422B2 (en) | Character string processing technology for graphic display of man-machine interface | |
Zongker et al. | Example-based hinting of true type fonts | |
JPH04125590A (en) | Character pattern information conversion method and device | |
JPH0812544B2 (en) | Character font generator | |
Mergler et al. | One approach to computer assisted letter design | |
JPH10143134A (en) | Method for forming and storing characters and apparatus therefor | |
JPH04242793A (en) | Character pattern information conversion method and device | |
JPH0320789A (en) | Vector character conversion method and document processing device | |
JP3284172B2 (en) | Character processor | |
Adams | A dialogue of forms: letter and digital font design | |
KR960013368B1 (en) | How to Form Outline Fonts | |
JPH04340590A (en) | Character font output device | |
JPS62157089A (en) | How to create vector characters | |
JP3008555B2 (en) | Vector font output device | |
JP3025141B2 (en) | Character modifier | |
JPH02176927A (en) | Processing system for character | |
JPH0764533A (en) | Character font generation processing system | |
JPS62212167A (en) | Synthesized character forming system | |
JP2861201B2 (en) | Data converter | |
JPH04340591A (en) | Vector font output device | |
JP3039214B2 (en) | Data converter | |
JP3084817B2 (en) | Character output device | |
JPH05173537A (en) | Character font generation method by neural network | |
JPH04340159A (en) | Character font output device |