JPH05165456A - Outline extracting method - Google Patents

Outline extracting method

Info

Publication number
JPH05165456A
JPH05165456A JP3351367A JP35136791A JPH05165456A JP H05165456 A JPH05165456 A JP H05165456A JP 3351367 A JP3351367 A JP 3351367A JP 35136791 A JP35136791 A JP 35136791A JP H05165456 A JPH05165456 A JP H05165456A
Authority
JP
Japan
Prior art keywords
dot
data
contour
character
value code
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
Application number
JP3351367A
Other languages
Japanese (ja)
Inventor
Masaaki Maekawa
政明 前川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP3351367A priority Critical patent/JPH05165456A/en
Publication of JPH05165456A publication Critical patent/JPH05165456A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To obtain outline character data by a relatively simple method by noticing the states of four nearby dots around a coordinate point on the boundary part of dots and determining the value of this coordinate point as a dot value code. CONSTITUTION:In the processing which reads the value of the form of a dot pattern discriminated for character pattern data 11 as a dot value code, coordinate points of boundary parts of respective dots are scanned and are successively converted to dot value codes to obtain dot value code data 2 for character pattern data 11. Thereafter, read dot value code data 12 is used to move the coordinate point of the noticed boundary part based on the outline tracing direction preliminarily determined in an encoded table by the outline tracing direction and the tracing operation preliminarily determined in this table, thereby extracting outline data of the pertinent character pattern. Thus, the direction of the next coordinate point for outline extraction is relatively easily obtained by one scanning, and even data of one-dot line width is extracted as the outline.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、輪郭抽出方法に関し、
特に、ドット形式で表現された文字フォントパターンか
ら、アウトライン形式で表現された文字フォントを生成
する際に、好適な輪郭データを抽出する輪郭抽出方法に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a contour extraction method,
In particular, the present invention relates to a contour extraction method for extracting suitable contour data when a character font represented in an outline format is generated from a character font pattern represented in a dot format.

【0002】[0002]

【従来の技術】従来、ドット形式で表現された文字デー
タをベクトル形式の文字データに変換する技術として、
例えば、特開昭63−231392号公報に記載されて
いるような「文字データ形式変換方法」が知られてい
る。この文字データ形式変換方法は、まず、文字パター
ンの各ドット毎に、そのドットに着眼し、その8隣接方
向のドットの連続性をチェックし、当該ドットに水平,
垂直,右斜め,左斜めの方向フラグを持たせて、この方
向フラグによりベクトル形式の文字データに変換する技
術である。
2. Description of the Related Art Conventionally, as a technique for converting character data represented in dot format into character data in vector format,
For example, a "character data format conversion method" as described in JP-A-63-231392 is known. This character data format conversion method first focuses on each dot of a character pattern, checks the continuity of the dots in the eight adjacent directions, and horizontally
This is a technique in which vertical, right-oblique, and left-oblique direction flags are provided and converted into vector format character data by the direction flags.

【0003】また、輪郭抽出の方法として、特開昭63
−188277号公報に記載されているような「輪郭抽
出方式」が知られている。この輪郭抽出方式は、ベクト
ルフォント生成用の輪郭抽出方法であり、ベクトルフォ
ント生成用の対象ドットイメージに対して、X軸方向お
よびY軸方向の2方向のエッジ(白から黒へ、あるいは
黒から白への変化位置)の部分を判断し、それを合成す
ることにより輪郭を構成する方法である。この方法で
は、輪郭を抽出するために、X軸,Y軸方向に2回の走
査と合成処理が必要となる。
Further, as a method of contour extraction, Japanese Patent Laid-Open No. Sho 63-63
The "contour extraction method" as described in Japanese Patent No. 188277 is known. This contour extraction method is a contour extraction method for generating a vector font, and is an edge in two directions in the X-axis direction and the Y-axis direction (from white to black or from black to the target dot image for vector font generation). In this method, the contour is formed by determining the portion (change position to white) and synthesizing it. This method requires scanning twice in the X-axis and Y-axis directions and combining processing in order to extract the contour.

【0004】[0004]

【発明が解決しようとする課題】ところで、特開昭63
−231392号公報に記載されているような文字デー
タ形式変換方法では、ドットそのものに着眼しているの
で、ベクトル形式の文字データとしてストローク文字フ
ォントは得られるが、太文字のドット形式文字パターン
では輪郭線データを得ることはできず、アウトライン文
字フォントを得ることはできない。また、この方法で
は、ドット形式文字パターンの各ドットに対して水平方
向,垂直方向,右斜め方向,左斜め方向の4方向の走査
処理と、データ変換処理が必要となり、処理が複雑とな
っている。
By the way, Japanese Patent Laid-Open No. Sho 63-63
In the character data format conversion method as described in Japanese Patent No. 231392, since the dot itself is focused on, the stroke character font can be obtained as the vector format character data, but the bold character dot format character pattern provides the outline. It is not possible to get line data and not outline character fonts. Further, this method requires scanning processing in four directions of horizontal direction, vertical direction, diagonal right direction, diagonal left direction and data conversion processing for each dot of the dot format character pattern, which complicates the processing. There is.

【0005】特開昭63−188277号公報に記載の
輪郭抽出方式では、太文字のドット形式文字パターンに
対して、輪郭線データを得ることができ、アウトライン
形式の文字フォントを得ることはできるが、輪郭線の追
跡の方向性を得ることはできず、塗りつぶし処理などが
複雑となるという問題がある。また、ドット形式文字パ
ターンの各ドットに対してX軸方向およびY軸方向での
2回の走査処理と、合成処理が必要となり、処理が複雑
となる。
According to the contour extraction method described in Japanese Patent Laid-Open No. 63-188277, contour line data can be obtained for a bold character dot format character pattern, and an outline format character font can be obtained. However, there is a problem in that the directionality of contour line tracking cannot be obtained, and the filling process becomes complicated. Further, each dot of the dot format character pattern needs to be scanned twice in the X-axis direction and the Y-axis direction and combined, which complicates the process.

【0006】これらは、いずれもドットそのものに着眼
しているので、1ドット幅のラインでは、その輪郭を判
断することができず、1ドット幅のラインが多く存在す
る低ドットで表現された文字に適応した場合、輪郭がう
まく得られないという問題がある。
Since all of these are focused on the dots themselves, the contour cannot be judged from the line of 1-dot width, and the characters represented by low dots in which many lines of 1-dot width exist. However, there is a problem that the contour cannot be obtained well when it is applied to.

【0007】本発明は、これらの問題点に鑑みてなされ
たものであり、本発明の目的は、対象ドット文字のドッ
トそのものではなく、ドットの境界部分に着眼し、その
境界点の4近傍のドットパターンを判別し、比較的簡単
な方法でアウトライン文字データを得ることにある。ま
た、本発明の他の目的は、1ドット幅のラインでも輪郭
を抽出することができ、基となるドットデータについて
は、1度の走査で輪郭線を抽出することができる輪郭抽
出方法を提供することにある。
The present invention has been made in view of these problems, and an object of the present invention is to focus not on the dots themselves of the target dot character but on the boundary part of the dots, and the four neighborhoods of the boundary point. It is to determine the dot pattern and obtain the outline character data by a relatively simple method. Another object of the present invention is to provide a contour extracting method capable of extracting a contour even with a line having a width of 1 dot, and extracting the contour line of the original dot data by one scanning. To do.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するた
め、本発明の輪郭抽出方法は、ドット形式の文字パター
ンデータから当該文字の輪郭データを抽出する輪郭抽出
方法であって、前記文字パターンデータ(11;図1)
の各ドットについて、各ドット境界の座標点の周囲ドッ
トパターンをドット値コード(12;図1)として読み
取り、読み取ったドット値コードの値に応じて予じめ定
められた輪郭追跡方向に基づいて追跡し、当該文字パタ
ーンの輪郭データ(13;図1)を抽出することを特徴
とする。
In order to achieve the above object, a contour extraction method of the present invention is a contour extraction method for extracting contour data of a character from dot-shaped character pattern data. (11; Figure 1)
For each dot of, the dot pattern around the coordinate point of each dot boundary is read as a dot value code (12; FIG. 1), and based on the contour tracing direction predetermined according to the value of the read dot value code. It is characterized by tracing and extracting contour data (13; FIG. 1) of the character pattern.

【0009】[0009]

【作用】本発明の輪郭抽出方法においては、ドット形式
の文字パターンデータから当該文字の輪郭データを抽出
する場合、ドット形式の文字パターンデータの各ドット
について、各ドット境界の座標点の周囲ドットパター
ン、例えば、周囲4近傍のドットパターンを判別して、
予じめ定められたドット値コードとして読み取り、読み
取ったドット値コードの値に応じて、予じめ定められた
輪郭追跡方向に基づいて追跡し、当該文字パターンの輪
郭データを抽出する。
In the contour extracting method of the present invention, when the contour data of the character is extracted from the dot-shaped character pattern data, for each dot of the dot-shaped character pattern data, the dot pattern around the coordinate point of each dot boundary is used. , For example, by distinguishing the dot patterns in the vicinity of 4
It is read as a predetermined dot value code, and the contour data of the character pattern is extracted by tracing based on the contour tracing direction that is preset according to the value of the read dot value code.

【0010】例えば、ドット形式の文字パターンデータ
よりアウトライン形式の文字データ生成のため、輪郭デ
ータを抽出する場合、対象とする文字パターンデータの
ドットデータの境界部分に着目し、その着目の境界部の
座標点を中心とした周囲ドットパターン、例えば、周囲
4近傍のドットパターンを判別する。判別したドットパ
ターンの形状の値はコードとして読み取り、ドット値コ
ードとする。各ドットの境界部の座標点を走査して順次
にドット値コードを読み取る。その後、読み取ったドッ
ト値コードに応じて、予じめ定められた輪郭追跡方向に
より、その輪郭追跡向に基づいて、着目の境界部の座標
点を移動して、当該文字パターンの輪郭データを抽出す
る。これにより、1度の走査により輪郭抽出のための次
の座標点の方向が比較的簡単に求められ、1ドットライ
ン幅のものでも輪郭として抽出することができる。
For example, when the contour data is extracted for generating the character data in the outline format from the character pattern data in the dot format, attention is paid to the boundary portion of the dot data of the target character pattern data, and the boundary portion A peripheral dot pattern centered on the coordinate point, for example, a dot pattern near the periphery 4 is determined. The value of the determined dot pattern shape is read as a code and used as a dot value code. The dot value code is sequentially read by scanning the coordinate points at the boundary of each dot. Then, based on the contour tracing direction determined in advance in accordance with the read dot value code, based on the contour tracing direction, the coordinate point of the boundary portion of interest is moved to extract the contour data of the character pattern. To do. As a result, the direction of the next coordinate point for contour extraction can be relatively easily obtained by scanning once, and even a dot having a one-dot line width can be extracted as a contour.

【0011】[0011]

【実施例】以下、本発明の一実施例を図面により具体的
に説明する。図1は本発明の一実施例にかかる輪郭抽出
方法の手順の流れを説明する図であり、図2および図3
は周囲4近傍ドットパターンのコード化テーブルの一例
を示す図である。図1,図2および図3を参照して、本
実施例にかかる輪郭抽出方法の手順の概略を説明する。
ここでは、ドット形式の文字フォントのパターンデータ
からよりアウトライン形式の文字フォントデータを生成
する場合を例として説明すると、図1に示すように、ま
ず、輪郭データを抽出するための対象とする文字パター
ンデータ11のドットデータの各ドットの境界部分に着
目し、その着目の境界部の座標点を中心として、周囲4
近傍のドットパターンを判別する。例えば、文字パター
ンデータ11において、座標点A(0,0)の周囲4近
傍のドットパターンは、外周を白ドットとして周囲4近
傍の4ドットが全て白ドットであるドットパターンとな
る。このドットパターンを図2に示すようなコード化テ
ーブル20Aを参照し、この座標点Aのドットパターン
の形状の値はコードとして読み取り、ドット値コードと
する。この場合、座標点Aのドット値コードは、コード
化テーブル20の1番目のドットパターンの判定によ
り、この座標点Aに対してはコード値“0”が登録され
る。また、文字パターンデータ11において、座標点B
(2,3)の周囲4近傍のドットパターンは、座標点B
を中心とした周囲4ドットは、右下のみが黒ドットのド
ットパターンとなるので、同様にして、コード化テーブ
ル20を参照し、この座標点Bのドットパターンの形状
の値はコードとして読み取り、ドット値コードとする。
この場合の座標点Aのドット値コードは、図3に示すよ
うなコード化テーブル20Bのドットパターンと判定さ
れ、この座標点Bに対してはコード値“8”が登録され
る。以下、同様に、ドットパターンの判定,ドット値コ
ードの読み取りを、文字パターンデータ11の各座標点
について順次に行い、文字パターンデータ11に対する
ドット値コードデータ12を得る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be specifically described below with reference to the drawings. FIG. 1 is a diagram for explaining the procedure flow of a contour extracting method according to an embodiment of the present invention, and FIG. 2 and FIG.
FIG. 6 is a diagram showing an example of a coding table of a dot pattern in the vicinity of four surroundings. The outline of the procedure of the contour extracting method according to the present embodiment will be described with reference to FIGS. 1, 2, and 3.
Here, a case where outline character font data is generated from dot character font pattern data will be described as an example. First, as shown in FIG. 1, a target character pattern for extracting contour data. Focusing on the boundary part of each dot of the dot data of the data 11, the periphery 4 is centered on the coordinate point of the target boundary part.
Determine the dot patterns in the vicinity. For example, in the character pattern data 11, the dot pattern near the periphery 4 of the coordinate point A (0, 0) is a dot pattern in which the outer periphery is a white dot and all the four dots near the periphery 4 are white dots. This dot pattern is referred to a coding table 20A as shown in FIG. 2, and the value of the shape of the dot pattern at this coordinate point A is read as a code and used as a dot value code. In this case, as the dot value code of the coordinate point A, the code value “0” is registered for this coordinate point A by the determination of the first dot pattern of the coding table 20. Further, in the character pattern data 11, the coordinate point B
The dot pattern in the vicinity of 4 around (2, 3) is the coordinate point B.
Since the surrounding 4 dots centered on is a dot pattern in which only the lower right corner is a black dot, the coding table 20 is referenced in the same manner, and the value of the shape of the dot pattern at the coordinate point B is read as a code. Use dot value code.
The dot value code of the coordinate point A in this case is determined to be the dot pattern of the coding table 20B as shown in FIG. 3, and the code value "8" is registered for this coordinate point B. Thereafter, similarly, the dot pattern determination and the dot value code reading are sequentially performed for each coordinate point of the character pattern data 11 to obtain the dot value code data 12 for the character pattern data 11.

【0012】このように、文字パターンデータ11に対
して、判別したドットパターンの形状の値をドット値コ
ードとして読み取る処理を、各ドットの境界部の座標点
を走査し、順次にドット値コードに変換し、文字パター
ンデータ11に対するドット値コードデータ12を得
る。その後、読み取ったドット値コードデータ12を用
いて、コード化テーブル20(20A,20B)におい
て予じめ定められた輪郭追跡方向および追跡動作によ
り、その輪郭追跡向に基づいて、着目の境界部の座標点
を移動し、当該文字パターンの輪郭データを抽出する。
これにより、1度の走査により輪郭抽出のための次の座
標点の方向が比較的簡単に求められ、1ドットライン幅
のものでも輪郭として抽出することができる。
As described above, the process of reading the determined value of the shape of the dot pattern as the dot value code from the character pattern data 11 is performed by scanning the coordinate points at the boundary of each dot and sequentially generating the dot value code. By converting, the dot value code data 12 for the character pattern data 11 is obtained. After that, by using the read dot value code data 12, the contour tracking direction and the tracking operation predetermined in the coding table 20 (20A, 20B) are performed, and based on the contour tracking direction, The coordinate point is moved to extract the contour data of the character pattern.
As a result, the direction of the next coordinate point for contour extraction can be relatively easily obtained by scanning once, and even a dot having a one-dot line width can be extracted as a contour.

【0013】ここで、上述のような一連の処理におい
て、輪郭抽出処理の前処理で用いられるコード化テーブ
ルについて説明しておく。コード化テーブル20(20
A,20B)は、図2および図3に示すように、ドット
形式の文字パターンデータの各ドットの境界部に着目し
て、その周囲4近傍のドットパターンを分類し、それぞ
れドット値コードと対応づけたデータテーブルとなって
いる。このコード化テーブル20には、周囲4近傍ドッ
トパターン21に対して、ドット値コード22を対応づ
け、更に、各々のドット値コード22と対応づけて輪郭
追跡を行う場合の追跡方向,追跡動作23が対応づけて
格納されている。
Here, the coding table used in the pre-processing of the contour extraction processing in the above series of processing will be described. Encoding table 20 (20
As shown in FIGS. 2 and 3, (A, 20B) focuses on the boundary portion of each dot of the dot-type character pattern data, classifies the dot patterns in the vicinity of the four, and corresponds to the dot value codes. It is an attached data table. In this encoding table 20, a dot value code 22 is associated with a dot pattern 21 in the vicinity of four surroundings, and a tracking direction and a tracking operation 23 in the case of performing contour tracking in association with each dot value code 22. Are stored in association with each other.

【0014】次に、本実施例にかかる輪郭抽出方法を一
態様で実施する装置構成について説明する。図4は、本
実施例にかかる輪郭抽出方法を一態様で実施するデータ
処理システムの全体の構成を示す機能ブロック図であ
る。図4において、41は入力部、42はデータ処理を
行うプロセッサ(以下CPUと略称する)、43は記憶
装置、44は文字データ保持部、45は出力部、46は
輪郭抽出部である。20はコード化テーブルである。こ
こでのデータ処理システムは、入力部41,CPU4
2,記憶装置43,文字データ保持部44,出力部4
5,および輪郭抽出部46が共通のデータバスにより相
互接続されて構成されている。また、輪郭抽出部46に
はコード化テーブル20が付加されている。
Next, an apparatus configuration for carrying out the contour extracting method according to the present embodiment in one aspect will be described. FIG. 4 is a functional block diagram showing the overall configuration of a data processing system that implements the contour extracting method according to this embodiment in one form. In FIG. 4, 41 is an input unit, 42 is a processor (hereinafter abbreviated as CPU) that performs data processing, 43 is a storage device, 44 is a character data holding unit, 45 is an output unit, and 46 is a contour extraction unit. 20 is a coded table. The data processing system here includes an input unit 41 and a CPU 4.
2, storage device 43, character data holding unit 44, output unit 4
5, and the contour extraction unit 46 are interconnected by a common data bus. A coded table 20 is added to the contour extraction unit 46.

【0015】コード化テーブル20は、前述したように
ドット形式の文字パターンデータからドット値コードを
読み取るため、周囲4近傍ドットパターンの各種類別に
対応してドット値コードが格納され、また、更に輪郭追
跡を行う場合の追跡方向,追跡動作が対応づけて格納さ
れているデータテーブルである。このコード化テーブル
20は、後述するように、輪郭抽出部46がドット形式
の文字パターンデータからアウトライン文字フォントを
生成する際に利用される。
As described above, the encoding table 20 reads the dot value code from the character pattern data in the dot format. Therefore, the dot value code is stored corresponding to each type of the dot pattern in the neighborhood of 4 and the outline. It is a data table in which a tracking direction and a tracking operation in the case of tracking are stored in association with each other. The encoding table 20 is used when the contour extraction unit 46 generates an outline character font from dot-shaped character pattern data, as described later.

【0016】入力部41は、キーボードやマウス等の入
力装置であり、ここデータ処理システムの操作を行うた
めの入力処理を行う。入力処理では、例えば、ドキュメ
ントエディタ(Document Editor)等のアプリケーシ
ョンからの文字生成要求の処理を受け付けたりする。C
PU42はシステム全体の制御,データ処理などを行う
処理本体部のプロセッサである。記憶装置43は処理プ
ログラムを記憶しているプログラムメモリ,データ処理
を行うためのワークメモリなどであり、ROMあるいは
RAM等の半導体メモリで構成される。また、記憶装置
43は、ページングによる仮想記憶方式などが用いられ
る場合には、キャシュメモリ等の1次記憶およびハード
ディスク装置等の2次記憶で構成される。文字データ保
持部44は、輪郭抽出処理を行う際のドット形式で表現
された文字データを記憶する。出力部45はディスプレ
イやプリンタなどであり、ここでは文字フォントデータ
をディスプレイやプレンタに出力するための画像メモリ
を含めている。また、輪郭抽出部46は、コード化テー
ブル20を参照して、ドット形式の文字パターンデータ
からアウトライン文字フォントを生成する処理を行う場
合の文字フォントの輪郭データを抽出する。
The input unit 41 is an input device such as a keyboard and a mouse, and performs input processing for operating the data processing system. In the input processing, for example, the processing of a character generation request from an application such as a document editor (Document Editor) is accepted. C
The PU 42 is a processor of a processing main body that controls the entire system and performs data processing. The storage device 43 is a program memory that stores a processing program, a work memory for performing data processing, and the like, and is configured by a semiconductor memory such as a ROM or a RAM. Further, the storage device 43 is configured by a primary storage such as a cache memory and a secondary storage such as a hard disk device when a virtual storage system such as paging is used. The character data storage unit 44 stores the character data expressed in dot format when performing the contour extraction processing. The output unit 45 is a display, a printer, or the like, and includes an image memory for outputting the character font data to the display or the printer here. Further, the contour extraction unit 46 refers to the coding table 20 and extracts the contour data of the character font in the case of performing the process of generating the outline character font from the dot-shaped character pattern data.

【0017】図5は、ドット形式で表現された文字フォ
ントデータからドット境界部を着目したドット値コード
を求める際の座標位置を説明する図であり、また、図6
は、輪郭抽出部の輪郭抽出処理の一例を説明するフロー
チャートである。
FIG. 5 is a diagram for explaining the coordinate position when the dot value code focusing on the dot boundary portion is obtained from the character font data expressed in the dot format, and FIG.
3 is a flowchart illustrating an example of contour extraction processing of a contour extraction unit.

【0018】図6のフローチャートを参照して、データ
処理システム(図4)における輪郭抽出処理を説明す
る。ここで輪郭抽出を行う処理対象の文字フォントデー
タは、図5に示すようなm×nドットで1文字が表され
るドット形式で表現された文字フォントデータ50であ
る。この文字フォントデータ50においては、文字の幅
方向をX軸とし、高さ方向をY軸とすると、各ドットの
境界の格子の交差点の座標は(Xi,Yj)により表現
できる。ここでi=0〜m,j=0〜nである。
The contour extraction processing in the data processing system (FIG. 4) will be described with reference to the flowchart of FIG. Here, the character font data to be processed for contour extraction is the character font data 50 expressed in a dot format in which one character is represented by m × n dots as shown in FIG. In the character font data 50, assuming that the width direction of the character is the X axis and the height direction is the Y axis, the coordinates of the intersection of the grid of the boundary of each dot can be expressed by (Xi, Yj). Here, i = 0 to m and j = 0 to n.

【0019】処理が開始されると、記憶装置43に記憶
されているドット形式で表現された文字フォントデータ
を入力部41からの指示に従い、文字データ保持部44
に読み込み、この読み込まれた文字フォントのドットデ
ータをもとに、輪郭抽出部46がドット形式で表現され
た文字フォントデータの輪郭抽出の処理を行う。輪郭抽
出処理では、まず、ステップ60において、変数i,変
数jの初期化を行う。次に、ステップ61において、座
標点(Xi,Yj)について、周囲4近傍ドットパター
ンを調ベ、例えば、図2および図3に示すようなコード
化テーブルを参照して、ドット値コードを求める。次
に、ステップ62において、変数iをインクリメント
し、次のステップ63において、i>mであるか否かを
判定し、変数iの値がX軸方向の走査最終値mに達して
いるか否かを判定する。i>mでない場合には、ステッ
プ61に戻り、ステップ61からの処理を繰り返す。ま
た、ステップ63の判定において、i>mである場合に
は、ステップ64に進み、X軸方向の変数iをリセット
し、Y軸方向の変数jをインクリメントする。そして、
次のステップ65においてY軸方向の変数jについて、
j>nであるか否かを判定する。変数jの値がY軸方向
の走査最終値nに達しておらず、j>nでない場合に
は、ステップ61に戻り、ステップ61からの処理を繰
り返す。また、ステップ65の判定において、j>nで
あると判定された場合には、X軸方向およびY軸方向の
2方向の全ての走査が終了し、ドット境界の各座標点に
ついてドット値コードが求められたので、次のステップ
66からの輪郭追跡処理を行う。
When the processing is started, the character font data represented in the dot format stored in the storage device 43 is followed by the character data holding unit 44 according to the instruction from the input unit 41.
The contour extraction unit 46 performs contour extraction processing of the character font data represented in dot format based on the read dot data of the character font. In the contour extraction processing, first, at step 60, the variables i and j are initialized. Next, in step 61, for the coordinate point (Xi, Yj), the dot pattern of the four neighboring pixels is adjusted, for example, by referring to the coding table as shown in FIGS. 2 and 3, to obtain the dot value code. Next, in step 62, the variable i is incremented, and in the next step 63, it is determined whether or not i> m, and whether or not the value of the variable i has reached the scanning final value m in the X-axis direction. To judge. If i> m is not satisfied, the process returns to step 61 and the processing from step 61 is repeated. If i> m in the determination of step 63, the process proceeds to step 64, the variable i in the X-axis direction is reset, and the variable j in the Y-axis direction is incremented. And
In the next step 65, for the variable j in the Y-axis direction,
It is determined whether j> n. If the value of the variable j has not reached the final scanning value n in the Y-axis direction and j> n is not satisfied, the process returns to step 61 and the processing from step 61 is repeated. Further, when it is determined in step 65 that j> n, all the scanning in the two directions of the X-axis direction and the Y-axis direction are completed, and the dot value code is set for each coordinate point on the dot boundary. Since it is found, the contour tracing process from the next step 66 is performed.

【0020】ステップ66からの輪郭追跡処理では、ま
ず、追跡始点を求めるために、ステップ66において、
ドット値コードの値が8,1,3または7である座標点
を求め、その座標点を追跡始点とし、次のステップ67
において、ドット値コードの追跡方向,追跡動作に従
い、輪郭の追跡を行う。そして、追跡の終了した座標点
のドット値コードを0とする。次に、ステップ68にお
いて、輪郭追跡の座標点が、追跡始点に戻ったか否かを
判定する。追跡始点に戻っていない場合には、ステップ
67に戻り、追跡している輪郭の次の座標点に移って、
ステップ67の追跡処理でドット値コードの追跡方向,
追跡動作に従い、輪郭の追跡を行う。そして、追跡の終
了した座標点のドット値コードを0とする。
In the contour tracing processing from step 66, first, in order to obtain the tracing starting point, in step 66,
A coordinate point having a dot value code value of 8, 1, 3, or 7 is obtained, and the coordinate point is set as a tracking start point.
In, the contour is traced according to the tracing direction and the tracing operation of the dot value code. Then, the dot value code of the coordinate point for which tracking has been completed is set to 0. Next, in step 68, it is determined whether or not the coordinate point for contour tracing has returned to the tracing starting point. If it has not returned to the tracking start point, the process returns to step 67 to move to the coordinate point next to the contour being tracked,
In the tracking process of step 67, the tracking direction of the dot value code,
The contour is tracked according to the tracking operation. Then, the dot value code of the coordinate point for which tracking has been completed is set to 0.

【0021】一方、ステップ68の判定処理において、
輪郭追跡の座標点が追跡始点に戻っていることを判定で
きると、1つの輪郭の追跡は終了したので、次に、未処
理となっている追跡すべき輪郭があるか否かの判定を行
うために、次のステップ69に進み、全てのドット値コ
ードの値は0であるか否かを判定する。全てのドット値
コードの値は0でない場合には、未だ処理済となってい
ない追跡すべき輪郭が存在するので、ステップ66に戻
り、ステップ66からの輪郭追跡処理を行う。また、ス
テップ69の判定処理において、全てのドット値コード
の値は0であると判定できると、未処理の追跡すべき輪
郭が存在しないので、ここでの一連の輪郭追跡処理を終
了する。
On the other hand, in the judgment processing of step 68,
If it can be determined that the coordinate points of contour tracing have returned to the tracing start point, the tracing of one contour is completed, and it is next determined whether or not there is an unprocessed contour to be traced. Therefore, the process proceeds to the next step 69, and it is determined whether or not the values of all the dot value codes are 0. If the values of all the dot value codes are not 0, there is a contour to be traced that has not been processed, so the process returns to step 66 and the contour tracing process from step 66 is performed. If it is determined in step 69 that the values of all dot value codes are 0, there is no unprocessed contour to be tracked, and the series of contour tracking processing is ended.

【0022】このような一連の輪郭の追跡処理による追
跡結果を、ベクトル形式データに変換することにより、
ドット形式の文字フォントデータからアウトライン文字
フォントデータが抽出できる。ここでは、各々のドット
境界部の座標点に対して、その周囲4近傍のドットパタ
ーンによりドット値コードを判別し、このドット値コー
ドにより、追跡方向および追跡動作を行うので、1ドッ
トライン幅のものからも輪郭が抽出できることになる。
また、包含関係のある輪郭の場合でも、図7に示すよう
に、同様な輪郭追跡処理を行うことにより、輪郭抽出を
行うことができる。
By converting the tracking result by such a series of contour tracking processing into vector format data,
Outline character font data can be extracted from dot format character font data. Here, for each dot boundary coordinate point, the dot value code is discriminated by the dot pattern in the vicinity of the four surroundings, and the tracking direction and the tracking operation are performed by this dot value code. The contour can be extracted from the object.
Even in the case of contours having an inclusion relationship, contour extraction can be performed by performing similar contour tracking processing as shown in FIG.

【0023】図7は、本実施例の輪郭抽出方法により包
含関係にある輪郭を抽出する場合の処理の流れを説明す
る図である。図7において、輪郭データを抽出する対象
のドット形式パターンデータ71は「回」形のドット形
式の文字フォントデータであり、このドット形式パター
ンデータ71に対して、各々のドット境界の座標点にお
いて、その周囲4近傍のドットパターンを判別してドッ
ト値コードを読み取る処理を行う。これにより、中間結
果としてドット値コードデータ群72が得られる。この
ドット値コードデータ群72から、各座標点の対応のド
ット値コードにより、追跡方向および追跡動作を行う
と、最も外側が時計回りであり、次が反時計回り、その
内側が時計回り、最も内側が反時計回りである4重の
「ロ」形の輪郭データ(73A,73B,73C,73
D)が抽出できることになる。この輪郭データにより、
アウトライン文字フォントを生成する。
FIG. 7 is a diagram for explaining the flow of processing in the case of extracting contours having an inclusion relationship by the contour extraction method of this embodiment. In FIG. 7, the dot format pattern data 71 from which the contour data is to be extracted is character font data of the “turn” type dot format, and with respect to this dot format pattern data 71, at the coordinate points of each dot boundary, A process of reading the dot value code by discriminating the dot pattern in the vicinity of the four areas is performed. As a result, the dot value code data group 72 is obtained as an intermediate result. From this dot value code data group 72, when the tracking direction and the tracking operation are performed by the dot value code corresponding to each coordinate point, the outermost is clockwise, the next is counterclockwise, the inner is clockwise and the most. Quadruple "b" -shaped contour data (73A, 73B, 73C, 73) whose inner side is counterclockwise
D) can be extracted. With this contour data,
Generates an outline character font.

【0024】以上に説明したように、本実施例にかかる
輪郭抽出方法によれば、ドット形式により表現された文
字パターンデータについて、輪郭を抽出する場合、各ド
ット境界部の座標点を着目し、その着目している座標点
を中心とする周囲4近傍のドットの状態のパターンによ
り、すなわち、白ドットおよび黒ドットの組合せのドッ
トパターンにより、コード化テーブル(図2および図
3)を用いて分類されたドット値コードを読み取り、そ
のドット値コードをその座標点の値とする。ここでの、
ドット境界の格子部分の外側のドットの値は“0
(白)”であるとし、例えば、左上の座標点A(図1)
の座標は(0,0)であり、座標点Aのドット値コード
は、その右下のドットの値が“0(白)”であり、格子
の外側は“0”であるので、図2のコード化テーブル2
0Aよりドット値コードは“0”である。また、座標点
Bの座標は(2,3)であり、座標点Bのドット値コー
ドは、その右下のドットの値が“1(黒)”であり、そ
れ以外は“0(白)”であるので、図3のコード化テー
ブル20Bによりドット値コードは“8”となる。
As described above, according to the contour extracting method according to the present embodiment, when the contour is extracted from the character pattern data expressed in the dot format, the coordinate points of the respective dot boundaries are focused, Classification is performed using a coding table (FIGS. 2 and 3) according to a pattern of dots in the vicinity of four points around the coordinate point of interest, that is, a dot pattern of a combination of white dots and black dots. The read dot value code is read, and the dot value code is set as the value of the coordinate point. Where
The value of the dot outside the grid part of the dot boundary is "0"
(White) ”, for example, the upper left coordinate point A (FIG. 1)
2 has the coordinates (0,0), the dot value code of the coordinate point A has a dot value "0 (white)" at the lower right, and "0" outside the grid. Encoding table 2
The dot value code is "0" from 0A. Further, the coordinate of the coordinate point B is (2, 3), and the dot value code of the coordinate point B has a dot value at the lower right of the dot value is “1 (black)”, and otherwise is “0 (white)” Since it is "," the dot value code is "8" according to the encoding table 20B of FIG.

【0025】このように、ドット境界部の格子による各
々の座標点(Xi,Yj)(i=0〜m,j=0〜n)
について、周囲4近傍ドットパターンにより、ドット値
コードを求め、得られたドット値コードデータ群により
輪郭を抽出する処理を行う。輪郭抽出を行う動作につい
ては、ドット値コードが登録されているコード化テーブ
ル20において、各ドット値コードに対応して、その追
跡方向および追跡動作が属性情報として付加されて格納
されており、この追跡方向および追跡動作の属性情報に
より、輪郭抽出処理を行う。
As described above, each coordinate point (Xi, Yj) (i = 0 to m, j = 0 to n) by the grid of the dot boundary portion
For, the dot value code is obtained from the dot pattern in the neighborhood of four surroundings, and the contour is extracted from the obtained dot value code data group. Regarding the operation of extracting the contour, the tracking direction and the tracking operation are added and stored as attribute information corresponding to each dot value code in the encoding table 20 in which the dot value codes are registered. The contour extraction processing is performed based on the tracking direction and the attribute information of the tracking motion.

【0026】ここで輪郭抽出処理の別の例として、包含
関係にある輪郭の抽出処理例を図7を参照して説明する
と、輪郭抽出の処理では、まず、追跡始点を定める。こ
のため、追跡始点としてドット値コードの値が“8”,
“1”,“3”または“7”である座標点を探索する。
ドット値コードデータ群72の各ドット値コードの値を
左上から見ていき、最初に現われたドット値コードが値
“8”である座標点を始点として、ここから追跡を始め
る。図3のコード化テーブル20Bにより、ドット値コ
ードの値“8”の追跡動作は「+X(右向き)」の方向
の追跡であり、この方向の追跡を行うことになる。+X
した次の座標点のドット値コードの値は“C”であり、
同じく追跡動作は「+X(右向き)」の方向の追跡であ
る。ここでは、+X方向の追跡を行うことになる。同様
にして順次に続けて、+X方向の追跡を行い、ドット値
コードの値“4”の座標点に達した点で、次の追跡動作
を「+Y(下向き)」の方向に変えて追跡を行う。これ
を各ドット値コードに対して順次に行うことにより(追
跡始点から順次に追跡することにより)、追跡は最終的
には、元の追跡始点まで戻ってくる。この結果、第1番
目に抽出できる輪郭データとして、最外側の「ロ」形の
輪郭データ73Aが抽出できることになる。
Here, as another example of the contour extracting process, an example of the process of extracting a contour having an inclusion relationship will be described with reference to FIG. 7. In the contour extracting process, first, a tracking start point is determined. Therefore, the value of the dot value code is "8" as the tracking start point,
Search for coordinate points that are "1", "3", or "7".
The value of each dot value code of the dot value code data group 72 is viewed from the upper left, and the tracing is started from here, starting from the coordinate point where the first appearing dot value code is the value "8". According to the encoding table 20B of FIG. 3, the tracking operation of the dot value code value "8" is the tracking in the direction of "+ X (to the right)", and the tracking is performed in this direction. + X
The value of the dot value code at the next coordinate point is "C",
Similarly, the tracking operation is tracking in the direction of "+ X (to the right)". Here, tracking in the + X direction is performed. Similarly, in succession, tracking in the + X direction is performed, and at the point where the coordinate point of the dot value code "4" is reached, the next tracking operation is changed to the "+ Y (downward)" direction for tracking. To do. By sequentially performing this for each dot value code (by sequentially tracing from the tracing start point), the tracing finally returns to the original tracing starting point. As a result, the outermost "b" -shaped contour data 73A can be extracted as the first contour data that can be extracted.

【0027】なお、ここで、追跡を終了した座標点のド
ット値コードは“0”に置き換えるので、次の輪郭デー
タを抽出する場合には、輪郭データ73Aに対するドッ
ト値コードは“0”となっており、次の輪郭データ73
Bを抽出する場合に影響を与えない。同様に処理を順次
に繰り返すことにより、最も外側の輪郭データ73Aが
得られた後、次に、その内側の反時計回りの輪郭データ
73Bが得られ、次に、その内側の時計回りの輪郭デー
タ73Cが得られ、最後に、最も内側の反時計回りの輪
郭データ73Dが得られる。
Here, since the dot value code of the coordinate point for which tracking has been completed is replaced with "0", the dot value code for the contour data 73A is "0" when the next contour data is extracted. And the next contour data 73
It does not affect the extraction of B. By repeating the same process in sequence, the outermost contour data 73A is obtained, then the inner counterclockwise contour data 73B is obtained, and then the inner clockwise contour data 73B is obtained. 73C is obtained, and finally, the innermost counterclockwise contour data 73D is obtained.

【0028】このように、1ドットライン幅のものから
も輪郭が抽出でき、包含関係のある輪郭の場合でも、順
次に容易に輪郭データが抽出できることになる。このよ
うにして得られた包含関係にある輪郭データは最も外側
から交互の向きの違う輪郭データなっているため、この
輪郭データを用いて塗りつぶしを行い、ビットマップ表
現された文字を得る時にも「Non-Zero Winding, even-o
dd」という塗りつぶし手法によらず、ビットマップ表現
される文字フォントが得られる。
In this way, the contour can be extracted from the one-dot line width, and even in the case of the contour having the inclusion relation, the contour data can be easily extracted sequentially. Since the contour data in the inclusion relationship obtained in this way is contour data in which the directions are alternately different from the outermost side, even when performing painting using this contour data to obtain a bit-mapped character, Non-Zero Winding, even-o
A character font represented by a bitmap can be obtained regardless of the filling method "dd".

【0029】[0029]

【発明の効果】以上、説明したように、本発明の輪郭抽
出方法によれば、ドットそのものではなく、ドットの境
界部の座標点の周囲4近傍のドットの状態に着目し、そ
の座標点の値をドット値コードとして決定することによ
り、1度の走査によりその輪郭の次の点の方向が比較的
簡単に求められる。また、1ドットライン幅のものでも
輪郭として抽出することができる。このため、低ドット
で表現された文字パターンからでもアウトライン文字が
生成でき、更に、2つ以上の輪郭が包含関係にある時
は、最も外側から交互の向きの違う輪郭として得られ
る。
As described above, according to the contour extracting method of the present invention, not the dots themselves but the states of the dots in the vicinity 4 of the coordinate points at the boundary of the dots are focused, and By determining the value as the dot value code, the direction of the next point of the contour can be relatively easily obtained by one scanning. Further, even a one-dot line width can be extracted as a contour. Therefore, an outline character can be generated even from a character pattern represented by low dots, and when two or more contours have an inclusive relationship, they can be obtained as contours whose directions alternate from the outermost side.

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

【図1】 図1は本発明の一実施例にかかる輪郭抽出方
法の手順の流れを説明する図、
FIG. 1 is a diagram illustrating a procedure flow of a contour extracting method according to an embodiment of the present invention,

【図2】 図2は周囲4近傍ドットパターンのコード化
テーブルの一例を示す第1の図、
FIG. 2 is a first diagram showing an example of a coding table of a dot pattern in the vicinity of four surrounding dots;

【図3】 図3は周囲4近傍ドットパターンのコード化
テーブルの一例を示す第1の図に続く第2の図、
FIG. 3 is a second diagram following the first diagram showing an example of a coding table of dot patterns in the vicinity of four surrounding dots;

【図4】 図4は本実施例にかかる輪郭抽出方法を一態
様で実施するデータ処理システムの全体の構成を示す機
能ブロック図、
FIG. 4 is a functional block diagram showing the overall configuration of a data processing system that implements the contour extracting method according to the present embodiment in one form;

【図5】 図5はドット形式で表現された文字フォント
データからドット境界部を着目したドット値コードを求
める際の座標位置を説明する図、
FIG. 5 is a diagram illustrating a coordinate position when a dot value code focusing on a dot boundary portion is obtained from character font data expressed in a dot format,

【図6】 図6は輪郭抽出部の輪郭抽出処理の一例を説
明するフローチャート、
FIG. 6 is a flowchart illustrating an example of contour extraction processing of a contour extraction unit,

【図7】 図7は本実施例の輪郭抽出方法により包含関
係にある輪郭を抽出する場合の処理の流れを説明する図
である。
FIG. 7 is a diagram for explaining the flow of processing when a contour having an inclusion relation is extracted by the contour extraction method of the present embodiment.

【符号の説明】[Explanation of symbols]

20…コード化テーブル、41…入力部、42…プロセ
ッサ(CPU)、43…記憶装置、44…文字データ保
持部、45…出力部、46…輪郭抽出部。
20 ... Encoding table, 41 ... Input unit, 42 ... Processor (CPU), 43 ... Storage device, 44 ... Character data holding unit, 45 ... Output unit, 46 ... Contour extraction unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 ドット形式の文字パターンデータから当
該文字の輪郭データを抽出する輪郭抽出方法であって、 前記文字パターンデータの各ドットについて、各ドット
境界の座標点の周囲ドットパターンをドット値コードと
して読み取り、 読み取ったドット値コードの値に応じて、予じめ定めら
れた輪郭追跡方向に基づいて追跡し、当該文字パターン
の輪郭データを抽出することを特徴とする輪郭抽出方
法。
1. A contour extraction method for extracting contour data of a character from dot-shaped character pattern data, wherein for each dot of the character pattern data, a dot value code around a dot point around a coordinate point of each dot boundary is used. The contour extraction method is characterized in that the contour data of the character pattern is extracted by performing the tracing based on a predetermined contour tracing direction according to the value of the read dot value code.
JP3351367A 1991-12-13 1991-12-13 Outline extracting method Pending JPH05165456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3351367A JPH05165456A (en) 1991-12-13 1991-12-13 Outline extracting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3351367A JPH05165456A (en) 1991-12-13 1991-12-13 Outline extracting method

Publications (1)

Publication Number Publication Date
JPH05165456A true JPH05165456A (en) 1993-07-02

Family

ID=18416818

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3351367A Pending JPH05165456A (en) 1991-12-13 1991-12-13 Outline extracting method

Country Status (1)

Country Link
JP (1) JPH05165456A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100324879B1 (en) * 1999-02-01 2002-02-28 마찌다 가쯔히꼬 Character display apparatus, character display method, and recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100324879B1 (en) * 1999-02-01 2002-02-28 마찌다 가쯔히꼬 Character display apparatus, character display method, and recording medium

Similar Documents

Publication Publication Date Title
JPH0772861B2 (en) Program creation device
JPS63280388A (en) Algorism for filling image contour
Hobby Polygonal approximations that minimize the number of inflections
US5563964A (en) Method and apparatus for processing a plurality of designated areas of an image
US5398293A (en) System for editing image data
JP2006011967A (en) Character recognition device and character recognition program
JPH05165456A (en) Outline extracting method
JP3149221B2 (en) Image processing device
JP4812893B2 (en) Image data compression method and decompression method
JP2005182660A (en) Recognition method of character/figure
JP2789622B2 (en) Character / graphic area determination device
US5666440A (en) Method and apparatus for extracting outline data from bi-level image data
JPH0850650A (en) Graphic copying out fair device
JP3162451B2 (en) Preprocessing method for character recognition
JP3294249B2 (en) Image processing device
JP2755299B2 (en) Image processing method
JP3122664B2 (en) Drawing equipment
JP2001331766A (en) Preparing method of pattern recognition dictionary, computer-readable recording medium, pattern recognition dictionary preparing device and character recognition device
JPH07262385A (en) Outline data generator
JPH0276084A (en) Fast character and pattern separating device
JPH0266681A (en) Drawing processor
JPH0148587B2 (en)
JP2804299B2 (en) Cutout mask making system
JPS63188279A (en) Contour extracting system
JPH09167228A (en) Method and device for transformation, method and device for reshaping picture using them and system using them