JPH06231240A - Method for approximating outline - Google Patents

Method for approximating outline

Info

Publication number
JPH06231240A
JPH06231240A JP5016064A JP1606493A JPH06231240A JP H06231240 A JPH06231240 A JP H06231240A JP 5016064 A JP5016064 A JP 5016064A JP 1606493 A JP1606493 A JP 1606493A JP H06231240 A JPH06231240 A JP H06231240A
Authority
JP
Japan
Prior art keywords
point
points
contour line
extraction
line
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
JP5016064A
Other languages
Japanese (ja)
Inventor
Yoji Kubo
洋二 久保
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP5016064A priority Critical patent/JPH06231240A/en
Publication of JPH06231240A publication Critical patent/JPH06231240A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To easily transform image data into vector data by finding out coincidence between a straight line connecting one of two extracted points on the outline of the image data to a newly extracted point and the outline. CONSTITUTION:A point E with a maximum interval (tm1) between a segment AB and the AB component of an outline CL is stored as an end point. Then an interval between the extracted points A, B is noticed and a new extracted point F (tm2) is added to the segment AE and the AE component of the outline CL. Similarly a new extracted point G (tm3) is added to a segment AF and the AF component of the outline CL. A new extracted point H (tm4) is also added to a segment EB. The coordinate data of the newly added extracted points G, F, H are written in an approximate data memory. Respective extracted points on the segments AG, GF, FE, EH, HB are arranged by distinguishing them as respective start and end points and stored.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、輪郭線近似方法に関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a contour line approximation method.

【0002】[0002]

【従来の技術】近年、ワードプロセッサなどの情報処理
装置において、例えば、ユーザが書面に記載した文字や
図形を、イメージスキャナなどの画像読取装置を用い
て、外字として情報処理装置内に取込むことができるよ
うになってきている。
2. Description of the Related Art In recent years, in an information processing device such as a word processor, for example, a character or figure written in a document by a user can be taken into the information processing device as an external character by using an image reading device such as an image scanner. It is becoming possible.

【0003】従来このような場合、データは、情報処理
装置においてドットの集まりとしてのイメージデータの
まま取扱われている。ところが、このようなイメージデ
ータをベクトルデータ化し、美しく表示又は印字したい
とする要請も強い。
Conventionally, in such a case, data is handled as image data as a set of dots in an information processing apparatus. However, there is also a strong demand for converting such image data into vector data for beautiful display or printing.

【0004】しかしながら、従来イメージデータを容易
にベクトルデータに変換できる手段は知られていなかっ
た。
However, there has been no known means for easily converting image data into vector data.

【0005】[0005]

【発明が解決しようとする課題】そこで本発明は、イメ
ージデータをベクトルデータに変換する際に、有用な輪
郭線近似方法を提供することを目的とする。
SUMMARY OF THE INVENTION It is therefore an object of the present invention to provide a useful contour line approximation method when converting image data into vector data.

【0006】[0006]

【課題を解決するための手段】本発明は、イメージデー
タの輪郭線上に、有限個の抽出点を定め、これらの抽出
点のうち、近接する2つの抽出点を選ぶ第1ステップ
と、この2つの抽出点を結ぶ線分と輪郭線との一致度を
求める第2ステップと、この一致度が所定値となるま
で、この輪郭線上において、2つの抽出点間に位置する
新たな点を抽出点に加え、加えられた抽出点とこの抽出
点に隣接する抽出点とについて、第2ステップの処理を
繰り返す第3ステップを有するものである。
According to the present invention, a finite number of extraction points are defined on the contour line of image data, and two adjacent extraction points are selected from these extraction points. The second step of obtaining the degree of coincidence between the line segment connecting the two extraction points and the contour line, and a new point located between the two extraction points on the contour line until the degree of coincidence reaches a predetermined value. In addition, it has a third step of repeating the process of the second step for the added extraction point and the extraction points adjacent to this extraction point.

【0007】[0007]

【作用】この構成によって本発明は上記した手段によ
り、イメージデータの輪郭線上における2つの抽出点を
結ぶ直線と輪郭線との一致度が求められ、その一致度が
所定値よりも小さい場合、2点間に新たな抽出点が求め
られる。その後、2つの抽出点の一方の点と新たな抽出
点とを結ぶ直線と、輪郭線との一致度が求められる。以
上の処理が繰り返されて、一致度が所定値に達した場
合、その時の2つの抽出点を結ぶ直線が輪郭線の近似ベ
クトルとなる。
With this configuration, according to the present invention, the degree of coincidence between the straight line connecting the two extraction points on the contour line of the image data and the contour line is obtained by the means described above, and if the degree of coincidence is smaller than the predetermined value, 2 A new extraction point is required between the points. After that, the degree of coincidence between the straight line connecting one of the two extraction points and the new extraction point and the contour line is obtained. When the above processing is repeated and the degree of coincidence reaches a predetermined value, the straight line connecting the two extraction points at that time becomes an approximate vector of the contour line.

【0008】[0008]

【実施例】次に、図面を参照しながら、本発明の実施例
を説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0009】図1は本発明の一実施例に係る輪郭線近似
方法を実施するための情報処理装置の機能ブロック図で
ある。図中、1はイメージスキャナなどの入力部、2は
入力部1からの入力データをイメージデータとして記憶
するイメージメモリ、3はイメージメモリ2内のイメー
ジデータから輪郭線を抽出し、その結果を輪郭線メモリ
4に書込んだり、線分と輪郭線との一致度を計算するな
どの機能を有する直線近似処理部、5は抽出点(後述す
る始点、終点、近似点など)の座標を記憶する近似デー
タメモリ、6は近似データメモリ5内の抽出点のデータ
を、CRTなどの出力部8へ表示できる形式へ、変換す
る表示データ変換処理部である。7は表示データ変換処
理部6によって変換されたデータを記憶する表示メモリ
である。
FIG. 1 is a functional block diagram of an information processing apparatus for carrying out a contour line approximating method according to an embodiment of the present invention. In the figure, 1 is an input unit such as an image scanner, 2 is an image memory for storing the input data from the input unit 1 as image data, 3 is a contour line extracted from the image data in the image memory 2, and the result is a contour. A straight line approximation processing unit 5 having a function of writing in the line memory 4 or calculating the degree of coincidence between a line segment and a contour line stores coordinates of extraction points (start point, end point, approximate point, etc., which will be described later). An approximate data memory 6 is a display data conversion processing unit that converts the data of the extraction points in the approximate data memory 5 into a format that can be displayed on the output unit 8 such as a CRT. A display memory 7 stores the data converted by the display data conversion processing unit 6.

【0010】次に、図2を参照しながら、本実施例の輪
郭線近似方法を実施する際の処理を概説する。まず、入
力部1において書面に記載した文字や図形など、任意の
読取対象を読取り、そのデータはイメージメモリ2内に
イメージデータとして記憶される(ステップ1)。次い
で、直線近似処理部3はイメージメモリ2内のイメージ
データに対し、輪郭追跡などの処理を施し(ステップ
2)、イメージデータの輪郭線を多数の輪郭点の集まり
としてあらわし、その輪郭点群を輪郭線メモリ4に書込
む。次いで、輪郭線メモリ4内のデータに対し、後に詳
述する直線近似処理を施し(ステップ3)、その結果、
始点、終点、近似点などの抽出点群が近似データメモリ
5内に書込まれる。そして、近似データメモリ5内の抽
出点群が、直線近似処理部3から表示データ変換処理部
6へ渡され、この表示データ変換処理部6はこの抽出点
群からなる近似結果を、出力部8に表示できる形式に変
換して、表示メモリ7へ書込み、この表示メモリ7内の
データが出力部8へ表示されるものである(ステップ
4)。なお、本実施例の輪郭線近似方法は、ユーザが外
字登録をする場合や、フォントの更新作業やその他の図
形データの取込みなどにも応用できる。
Next, referring to FIG. 2, the outline of the processing for carrying out the contour line approximating method of the present embodiment will be described. First, an arbitrary reading object such as a character or a figure written on a document is read in the input unit 1, and the data is stored as image data in the image memory 2 (step 1). Next, the linear approximation processing unit 3 performs processing such as contour tracing on the image data in the image memory 2 (step 2), represents the contour lines of the image data as a set of many contour points, and draws the contour point group. Write to the contour line memory 4. Then, the data in the contour line memory 4 is subjected to a linear approximation process which will be described in detail later (step 3), and as a result,
A group of extracted points such as a start point, an end point, and an approximation point is written in the approximation data memory 5. Then, the extraction point group in the approximate data memory 5 is passed from the linear approximation processing unit 3 to the display data conversion processing unit 6, and the display data conversion processing unit 6 outputs the approximation result composed of the extraction point group to the output unit 8 Is converted into a format that can be displayed on the display memory 7 and written in the display memory 7, and the data in the display memory 7 is displayed on the output unit 8 (step 4). The contour line approximating method according to the present embodiment can be applied to a case where a user registers an external character, a font updating operation, other graphic data acquisition, and the like.

【0011】さて次に、上記直線近似処理(図2のステ
ップ3)について、図3のフローチャートに沿い、図4
〜図6を参照しながら説明する。図4中、CLは輪郭線
であり、この輪郭線CLは多数の輪郭点群から構成され
ている。DT(斜線部)は輪郭線CLにより囲まれるイ
メージデータ部である。なお、図4〜図6において、説
明を分かりやすくするために、イメージデータ部DTを
含めて図示しているが、処理上イメージデータ部DTは
必須のものではなく、輪郭点群のみを抽出した上で処理
してもよい。
Next, regarding the above-mentioned straight line approximation processing (step 3 in FIG. 2), referring to the flowchart in FIG.
-It demonstrates, referring FIG. In FIG. 4, CL is a contour line, and this contour line CL is composed of a large number of contour point groups. DT (hatched portion) is an image data portion surrounded by the contour line CL. 4 to 6, the image data part DT is included for the sake of easy understanding of the description, but the image data part DT is not essential for processing, and only the contour point group is extracted. May be processed above.

【0012】さてまず、与えられた輪郭線CL上に、有
限個の抽出点A,B,C,Dを定め、これらの抽出点
A,B,C,Dのうち、近接する2つの抽出点A,Bを
選ぶ。具体的には、輪郭線CLを、この輪郭線CLに接
する最小の矩形枠FMで囲み(ステップa)、これらの
接点A,B,C,Dを抽出する(ステップb)。次い
で、図5に示すように、線分AB,線分BC,線分C
D,線分DAで直線近似し、各線分AB,BC,CD,
DAの始点と終点を、近似データメモリ5に保存する
(ステップc)。ここで、これらの線分AB,BC,C
D,DAも座標点の集合により構成されるものである。
First, a finite number of extraction points A, B, C, D are set on a given contour line CL, and two adjacent extraction points A, B, C, D are extracted. Select A and B. Specifically, the contour line CL is surrounded by the smallest rectangular frame FM that is in contact with the contour line CL (step a), and these contact points A, B, C, D are extracted (step b). Next, as shown in FIG. 5, line segment AB, line segment BC, line segment C
D, a line segment DA is linearly approximated, and each line segment AB, BC, CD,
The start and end points of DA are stored in the approximate data memory 5 (step c). Here, these line segments AB, BC, C
D and DA are also composed of a set of coordinate points.

【0013】そしてまず上記各線分のうち、線分ABに
注目し、線分AB上の座標点を求める(ステップd)。
次いで、輪郭線中のAB成分の輪郭点を求め、線分AB
の座標点数と輪郭線のAB成分の輪郭点との一致度(一
致点数の割合)を求める(ステップe)。そして、この
一致度を所定値と比較し(ステップf)、所定値に達し
ていればステップhへ、そうでなければステップgへ処
理が移る。この所定値は、ユーザが希望する近似の度合
に合わせて可変できるものであり、例えば60%などと
すればよい。
First, of the above line segments, attention is paid to the line segment AB, and the coordinate points on the line segment AB are obtained (step d).
Next, the contour points of the AB component in the contour line are obtained, and the line segment AB
The degree of coincidence (the ratio of the number of coincident points) between the number of coordinate points and the contour points of the AB component of the contour line is obtained (step e). Then, the degree of coincidence is compared with a predetermined value (step f), and if the predetermined value is reached, the process proceeds to step h, and if not, the process proceeds to step g. This predetermined value can be changed according to the degree of approximation desired by the user, and may be set to 60%, for example.

【0014】次に、図6を参照しながら、上記一致度が
所定値となるまで、輪郭線CL上の新たな点を繰り返し
抽出点として加える過程を説明する。
Next, with reference to FIG. 6, a process of repeatedly adding a new point on the contour line CL as an extraction point until the degree of coincidence reaches a predetermined value will be described.

【0015】先程、初期段階において、接点A、接点B
間に注目し、まず線分ABと輪郭線CLのAB成分につ
き、一致度を求めた。しかしながら、初期段階で定めた
線分ABにより輪郭線CLを十分近似できる場合は少な
く、通常AB成分上に新たな抽出点を設定し、この抽出
点を近似点に加えることが必要となる。図6に示すよう
に、本実施例では、この新たな接点を設定するにあた
り、線分ABと輪郭線CLのAB成分との間隔が最大
(tm1)となる点Eを終点として保存するようにして
いる(ステップg)。このようにすれば、新たな接点E
が設定される以前の近似線分ABよりも、新たな抽出点
Eを含む、線分AE、線分EBは、輪郭線CLのAB成
分に、さらに接近することになり、近似を進めることが
できる。
At the initial stage, the contact A and the contact B
Focusing on the gap, first, the degree of coincidence was obtained for the AB components of the line segment AB and the contour line CL. However, there are few cases where the contour line CL can be sufficiently approximated by the line segment AB determined at the initial stage, and it is usually necessary to set a new extraction point on the AB component and add this extraction point to the approximation point. As shown in FIG. 6, in the present embodiment, when setting this new contact point, the point E at which the distance between the line segment AB and the AB component of the contour line CL is maximum (tm1) is saved as the end point. (Step g). In this way, the new contact point E
The line segment AE and the line segment EB including the new extraction point E are closer to the AB component of the contour line CL than the approximate line segment AB before the setting of, and the approximation can be advanced. it can.

【0016】次いで、抽出点A、抽出点E間に注目し、
線分AEと輪郭線CLのAE成分につき、新たな抽出点
F(上記間隔tm2)を加える。同様に、線分AFと輪
郭線CLのAF成分につき、新たな抽出点G(上記間隔
tm3)を加える。また、線分EBにつき、新たな抽出
点H(上記間隔tm4)を加える。もちろん、新たに加
えられた抽出点G,F,E,Hの座標データは、近似デ
ータメモリ5に書込まれる。
Next, pay attention to between the extraction points A and E,
A new extraction point F (interval tm2) is added for the AE components of the line segment AE and the contour line CL. Similarly, a new extraction point G (interval tm3) is added for the AF components of the line segment AF and the contour line CL. Further, a new extraction point H (the above-mentioned interval tm4) is added to the line segment EB. Of course, the coordinate data of the newly added extraction points G, F, E, H are written in the approximate data memory 5.

【0017】ここで、線分AG,線分GF,線分FE,
線分EH,線分HBのそれぞれにつき、輪郭線CLの対
応する成分との一致度が、所定値に達したものとする
と、これらの線分AG,GF,FE,EH,HBのそれ
ぞれの抽出点が、始点、終点の区別を付けて整理された
上で保存される(ステップh,i)。このような処理
を、線分BC,CD,DAについても行い、直線近似処
理部3における輪郭線近似方法が完了する。
Here, line segment AG, line segment GF, line segment FE,
Assuming that the degree of coincidence between the line segment EH and the line segment HB and the corresponding component of the contour line CL has reached a predetermined value, each of these line segments AG, GF, FE, EH, and HB is extracted. The points are arranged and saved with distinction between the start point and the end point (steps h and i). Such processing is also performed for the line segments BC, CD, and DA, and the contour line approximation method in the linear approximation processing unit 3 is completed.

【0018】なお、本実施例では、輪郭線CLが与えら
れたとき、この輪郭線CLに接する矩形枠FM上の接点
A,B,C,Dを初期段階の抽出点としたが、例えば輪
郭線CLの中心から互いに所定角度をなす直線群を放射
状に延ばし、この直線群と輪郭線CLとの交点を初期の
抽出点とするなど、種々変形することができる。
In this embodiment, when the contour line CL is given, the contact points A, B, C and D on the rectangular frame FM which are in contact with the contour line CL are set as the extraction points in the initial stage. Various modifications can be made such that a group of straight lines forming a predetermined angle with each other from the center of the line CL is radially extended, and an intersection of the group of straight lines and the contour line CL is used as an initial extraction point.

【0019】[0019]

【発明の効果】本発明は、イメージデータの輪郭線上
に、有限個の抽出点を定め、これらの抽出点のうち、近
接する2つの抽出点を選ぶ第1ステップと、この2つの
抽出点を結ぶ線分と輪郭線との一致度を求める第2ステ
ップと、この一致度が所定値となるまで、この輪郭線上
において、2つの抽出点間に位置する新たな点を抽出点
に加え、加えられた抽出点とこの抽出点に隣接する抽出
点とについて、第2ステップの処理を繰り返す第3ステ
ップを有しているので、イメージデータの輪郭線を有限
個のベクトルで円滑に近似し、ベクトルデータに変換す
ることができる。
According to the present invention, a finite number of extraction points are defined on the contour line of image data, and a first step of selecting two adjacent extraction points among these extraction points and the two extraction points. The second step of obtaining the degree of coincidence between the connecting line segment and the contour line, and adding a new point located between the two extraction points on the contour line to the extraction point until the degree of coincidence reaches a predetermined value. The extraction point and the extraction points adjacent to this extraction point have the third step of repeating the process of the second step. Therefore, the contour line of the image data is smoothly approximated by a finite number of vectors to obtain the vector Can be converted to data.

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

【図1】本発明の一実施例に係る輪郭線近似方法を実施
するための情報処理装置の機能ブロック図
FIG. 1 is a functional block diagram of an information processing apparatus for implementing a contour line approximation method according to an embodiment of the present invention.

【図2】本発明の一実施例に係る輪郭線近似方法を採用
した画像読取方法のフローチャート
FIG. 2 is a flowchart of an image reading method that employs a contour line approximation method according to an embodiment of the present invention.

【図3】本発明の一実施例に係る輪郭線近似方法を示す
フローチャート
FIG. 3 is a flowchart showing a contour line approximation method according to an embodiment of the present invention.

【図4】本発明の一実施例に係る輪郭線近似方法の工程
説明図
FIG. 4 is a process explanatory diagram of a contour line approximating method according to an embodiment of the present invention.

【図5】本発明の一実施例に係る輪郭線近似方法の工程
説明図
FIG. 5 is a process explanatory diagram of a contour line approximating method according to an embodiment of the present invention.

【図6】本発明の一実施例に係る輪郭線近似方法の工程
説明図
FIG. 6 is a process explanatory diagram of a contour line approximating method according to an embodiment of the present invention.

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

1 入力部 2 イメージメモリ 3 直線近似処理部 4 輪郭線メモリ 5 近似データメモリ 6 表示データ変換処理部 7 表示メモリ 8 出力部 FM 矩形枠 1 Input Section 2 Image Memory 3 Linear Approximation Processing Section 4 Contour Line Memory 5 Approximation Data Memory 6 Display Data Conversion Processing Section 7 Display Memory 8 Output Section FM Rectangular Frame

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】イメージデータの輪郭線上に、有限個の抽
出点を定め、これらの抽出点のうち、近接する2つの抽
出点を選ぶ第1ステップと、 この2つの抽出点を結ぶ線分と輪郭線との一致度を求め
る第2ステップと、 この一致度が所定値となるまで、この輪郭線上におい
て、前記2つの抽出点間に位置する新たな点を抽出点に
加え、加えられた抽出点とこの抽出点に隣接する抽出点
とについて、第2ステップの処理を繰り返す第3ステッ
プとを有することを特徴とする輪郭線近似方法。
1. A first step of defining a finite number of extraction points on a contour line of image data and selecting two adjacent extraction points from these extraction points, and a line segment connecting the two extraction points. The second step of obtaining the degree of coincidence with the contour line, and adding a new point on the contour line between the two extraction points to the extraction point until the degree of coincidence reaches a predetermined value A contour line approximation method comprising: a point and a third step of repeating the processing of the second step for the extraction point adjacent to the extraction point.
JP5016064A 1993-02-03 1993-02-03 Method for approximating outline Pending JPH06231240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5016064A JPH06231240A (en) 1993-02-03 1993-02-03 Method for approximating outline

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5016064A JPH06231240A (en) 1993-02-03 1993-02-03 Method for approximating outline

Publications (1)

Publication Number Publication Date
JPH06231240A true JPH06231240A (en) 1994-08-19

Family

ID=11906152

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5016064A Pending JPH06231240A (en) 1993-02-03 1993-02-03 Method for approximating outline

Country Status (1)

Country Link
JP (1) JPH06231240A (en)

Similar Documents

Publication Publication Date Title
JPH02289067A (en) Character pattern signal generating device
JPH06231240A (en) Method for approximating outline
JP3079669B2 (en) Image processing device
JP3146771B2 (en) Font rasterizing apparatus and method
JP3314443B2 (en) Character output device
JP2806679B2 (en) Character generator
JPH06100906B2 (en) Character processing method
JP2507812B2 (en) Square root calculation method
JP3114289B2 (en) Character pattern generator
JP2795047B2 (en) Analysis input data creation processing device
JP2776347B2 (en) Drawing device for printer
JPH03287297A (en) Character generating circuit
JP3004993B2 (en) Image processing device
JPH08123956A (en) Image processing device
JPH0778269A (en) Three-dimensional plotting device
JPH10214077A (en) Method for generating synthetic plotting data and synthetic plotting device
JPWO2004057530A1 (en) Image conversion apparatus, image conversion method, and program
JPH0721182A (en) Character processor and its method
JPH05276439A (en) Contour line expanding system
JPH0585935B2 (en)
JPH04239979A (en) Picture processor
JPH0695642A (en) Device for generating character/sign pattern
JPH04310189A (en) Enlarged character display device
JPH05333847A (en) System for processing image data display
JPH05225325A (en) Pattern data generation device