[go: up one dir, main page]

JPH0535862A - Automatic shaping system for outline vector - Google Patents

Automatic shaping system for outline vector

Info

Publication number
JPH0535862A
JPH0535862A JP3214715A JP21471591A JPH0535862A JP H0535862 A JPH0535862 A JP H0535862A JP 3214715 A JP3214715 A JP 3214715A JP 21471591 A JP21471591 A JP 21471591A JP H0535862 A JPH0535862 A JP H0535862A
Authority
JP
Japan
Prior art keywords
boundary
tracking code
point
corner
tracking
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
JP3214715A
Other languages
Japanese (ja)
Inventor
Yoshiko Hozumi
芳子 穂積
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan 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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP3214715A priority Critical patent/JPH0535862A/en
Publication of JPH0535862A publication Critical patent/JPH0535862A/en
Priority to US08/589,072 priority patent/US5666440A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Digital Computer Display Output (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To obtain the automatic shaping system for the outline vector which generates a character pattern of high quality. CONSTITUTION:A point as a corner is judged from tracking code arrays in four directions at the boundary point of a contour boundary picture element and regarded preferentially as an inflection point to generate a vector. Namely, the boundary point is tracked clockwise in a rightward tracking direction 0, an upward tracking direction 1, a leftward direction 2, and a downward direction 3 to obtain '110100' as the tracking code array at the boundary point of the boundary picture elements where one picture element is absent at the corner part. Tracking code arrays are applied to a prepared table in order and when a coincidence is obtained, -1 is added to the (x) and (y) values of the boundary point corresponding to a 4th tracking code '1' to move the boundary point to the corner part. Then the boundary point is tracked including the boundary point according to the tracking codes to obtain '111000'. Then this corrected corner point is the boundary point of the picture element at the corner part, so this boundary point is set preferentially as the inflection point of the vector.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ドットパターンとして
構成された文字パターンのアウトライン(輪郭)を整形
するためのベクトル化を自動的に行うアウトラインベク
トルの自動整形方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an outline vector automatic shaping method for automatically vectorizing an outline (contour) of a character pattern formed as a dot pattern.

【0002】[0002]

【従来の技術】従来より、スキャナ等により読取った文
字をアウトラインデータに変換して使用したり、ROM
等の記憶装置に格納されたドットパターンとして構成さ
れる文字パターンを拡大・縮小して使用する際に、文字
パターンの輪郭を整形して綺麗で字崩れのない文字とす
るためにベクトル化処理を行っている。
2. Description of the Related Art Conventionally, a character read by a scanner or the like is converted into outline data for use, or a ROM is used.
When enlarging / reducing a character pattern that is configured as a dot pattern stored in a storage device such as a storage device, vectorization processing is performed to shape the contour of the character pattern and make it a clean and unbroken character. Is going.

【0003】このアウトラインベクトルの自動整形方式
は、従来から種々のものが考えられており、例えば、特
開昭64-68889号には、境界画素の中心を追跡するチェー
ンコード符号列から図形の輪郭の折れ曲り状態を判定し
て直角部を検出し、近傍の画素をベクトルポイントとし
て選択する方式が開示されている。また、特開平1-9279
5 号には、輪郭ベクトルの水平/垂直成分間の輪郭線に
対してその角度を求めて、あるしきい値の条件下で交点
を生成することにより、直角部分の雑音を除去する方式
が開示されている。
Various outline vector automatic shaping methods have been considered in the past. For example, in Japanese Patent Laid-Open No. 64-68889, a chain code code string for tracking the center of a boundary pixel is used to outline a figure. There is disclosed a method in which the right-angled portion is detected by determining the bending state of and the neighboring pixels are selected as vector points. In addition, JP-A 1-9279
No. 5 discloses a method for eliminating noise in a right-angled portion by obtaining an angle of a contour line between horizontal / vertical components of a contour vector and generating an intersection under a certain threshold condition. Has been done.

【0004】[0004]

【発明が解決しようとする課題】従来のアウトラインベ
クトルの自動整形方式において、角度を求めて交点を生
成する場合には、角度を求める処理に時間が掛かるの
で、品質を維持しながらより高速の処理を行う方式が望
まれていた。そして、境界画素の中心を追跡するチェー
ンコード符号列を用いた場合では、一画素幅の直線が突
出しているときには、一つの境界画素の中心を二度対応
させることになるので、文字を拡大した際にもこの直線
は一画素幅のままとなってしまうという問題点があっ
た。また、特に、スキャナ等で画像を入力する場合で
は、角の部分の画素が欠落することが多く生じている
が、角となる部分の境界に画素がない場合には、境界画
素の近房の画素をベクトルポイントとしているので、ベ
クトル化した際に歪みを生じてしまうという欠点があっ
た。
In the conventional outline vector automatic shaping method, when an angle is obtained and an intersection is generated, it takes a long time to obtain the angle. The method of doing was desired. In the case of using the chain code code string for tracking the center of the boundary pixel, when the straight line of one pixel width is projected, the center of one boundary pixel is made to correspond twice, so the character is enlarged. In this case, there is a problem in that this straight line remains the width of one pixel. In particular, when an image is input with a scanner or the like, pixels at the corners are often missing, but if there are no pixels at the boundaries of the corners, the pixels near the boundary pixels Since pixels are vector points, there is a drawback that distortion occurs when vectorized.

【0005】そこで、本発明は、短い処理時間で従来よ
り高品質な文字パーターンを生成することのできるアウ
トラインベクトルの自動整形方式を提供することを目的
とする。
Therefore, an object of the present invention is to provide an automatic outline vector shaping method capable of generating a character pattern of higher quality than before with a short processing time.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
の手段として、2値画像の輪郭となる境界画素のいくつ
かを抽出してベクトル化を行うアウトラインベクトルの
自動整形方式において、前記境界画素の境界点の4方向
追跡コード列を求め、この追跡コード列から角となる点
を判断してこの位置に前記境界点を移動し、この移動し
た前記境界点を優先的に折れ曲り点として前記ベクトル
化を行うことを特徴とするアウトラインベクトルの自動
整形方式を提供しようとするものである。
As means for achieving the above object, in an outline vector automatic shaping system for extracting some of boundary pixels which are contours of a binary image and vectorizing them, the boundary pixels are The four-direction tracking code string of the boundary point is determined, a corner point is determined from the tracking code string, the boundary point is moved to this position, and the moved boundary point is preferentially defined as a bending point. The present invention is intended to provide an outline vector automatic shaping method characterized by performing vectorization.

【0007】[0007]

【作用】本発明は、角となる部分の画素が欠落すること
が多いことに着目し、この欠落した画素を補正するため
に、境界画素の境界点を追跡し、この境界点の並び方か
ら角となる点を判断して、さらに、この部分において水
平/垂直線が交わる位置に点を移動して、この移動した
点を優先的に折曲り部分の輪郭点としてベクトルを生成
することにより、角となる部分の歪みを最小限にするこ
とができる。
In the present invention, attention is paid to the fact that pixels at the corners are often missing, and in order to correct the missing pixels, the boundary points of the boundary pixels are traced and the corners are arranged according to the arrangement of the boundary points. Then, by moving the point to the position where the horizontal / vertical lines intersect in this part, and generating the vector by preferentially using this moved point as the contour point of the bent part, It is possible to minimize the distortion of the portion that becomes.

【0008】[0008]

【実施例】本発明のアウトラインベクトルの自動整形方
式の一実施例を図面と共に説明する。本実施例では、入
力された画像中に黒画素からなる図形(文字パターン)
が存在するときに、例えば、この画像を左から右、上か
ら下へ走査するなどして、最初に発見される左上の黒画
素を起点として境界画素となる黒画素の周囲の境界点を
右回りに追跡して得られた追跡コード列から、文字パタ
ーンのアウトラインベクトルを生成する際に、角の部分
の画素が欠けている場合にその欠けた画素を補正するこ
とを考える。なお、本実施例では、図1に示すような、
この境界画素となる黒画素の境界点を追跡する方向が、
右方向である場合を「0」、上方向である場合を
「1」、左方向である場合を「2」、下方向である場合
を「3」として、基本となる追跡コードを定義し、この
追跡コード(矢印)の元の部分をとなる境界点をこの追
跡コードに対応する境界点とする。そして、入力された
画像中に図2に示すような図形がある場合に、この図形
の左上の黒画素aの境界点を起点として境界画素の周囲
の境界点を図1に示す追跡コードに従って右回りに追跡
すると、「000033333221112211」と
いう追跡コード列が得られる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the automatic outline vector shaping method of the present invention will be described with reference to the drawings. In this embodiment, a figure (character pattern) consisting of black pixels in the input image
, The image is scanned from left to right and from top to bottom, and the boundary point around the black pixel, which is the boundary pixel starting from the upper left black pixel found first, becomes the right pixel. When generating an outline vector of a character pattern from a tracking code string obtained by tracking around, if a pixel at a corner is missing, it is considered to correct the missing pixel. In this embodiment, as shown in FIG.
The direction of tracking the boundary point of the black pixel that becomes this boundary pixel is
Define the basic tracking code as "0" for rightward direction, "1" for upward direction, "2" for leftward direction, "3" for downward direction, The boundary point which is the original part of this tracking code (arrow) is defined as the boundary point corresponding to this tracking code. Then, when the input image includes a figure as shown in FIG. 2, the boundary point around the boundary pixel is set to the right according to the tracking code shown in FIG. When traced around, a trace code string "000033333221112211" is obtained.

【0009】そして、この追跡コード列において追跡コ
ードの値が同一である部分は直線を示しているので、追
跡コードの値が変化する部分を使用してベクトル化すれ
ば良いが、特に、図中、画素bのような角の部分の画素
が欠けている場合には、その両隣の画素c,dの追跡コ
ードの値が変化するので、ベクトルを生成時にベクトル
量が多くなったり、文字が歪む原因となってしまう。そ
こで、その欠けた画素を補正するようにしてからベクト
ル化を行うようにする。なお、走査方向(起点)が変わ
っても、右回りに追跡する限り、以下に説明する補正パ
ターンは同一である。
Since the portion where the value of the tracking code is the same in this tracing code string shows a straight line, vectorization may be performed using the portion where the value of the tracking code changes. , If the pixel at the corner such as the pixel b is missing, the values of the tracking codes of the pixels c and d on both sides of the pixel are changed, so that the vector amount is increased or the character is distorted when the vector is generated. It becomes a cause. Therefore, the missing pixel is corrected and then vectorized. Even if the scanning direction (starting point) is changed, the correction pattern described below is the same as long as the tracking is performed in the clockwise direction.

【0010】まず、角1画素がない場合に付近の水平/
垂直2画素づつの境界画素から、この画素を補正する場
合について説明する。角1画素がない場合は、図3
(A)〜(D)に示す4つの場合が考えられる。そし
て、このときの水平/垂直2画素づつの境界画素の境界
点を図1に示す追跡コードに従って右回りに追跡する
と、それぞれ図4(A)〜(D)のようになる。図3
(A)では、左上の角の部分の画素が欠落している場合
を示している。このときの境界画素の境界点の追跡コー
ド列は、図4(A)に示すように、「110100」と
なる。そして、このような追跡コード列となった場合
に、4番目の追跡コード「1」に対応する境界点を
(x,y)=(−1,−1)移動して、再度、追跡コー
ドに従って境界点を追跡すると、「111000」とな
る。このことをもう少し詳しく説明すると、図5に示す
ような点の移動を行うためのテーブルを用意し、このテ
ーブルに追跡コード列を順次当てはめて行き、この追跡
コード列が「110100」と一致したときに、4番目
の追跡コード「1」に対応する境界点のx値とy値とに
それぞれ−1を加算することにより、この境界点が角の
部分に画素が移動するような位置に移動する。そして、
この移動した境界点を含んでもう一度境界点を追跡コー
ドに従って追跡すると、「111000」となる。な
お、x,yは、画像の左上の画素の境界点を(0,0)
として、右方向にx軸、下方向にy軸をとったときの値
である。そして、この移動して補正された境界点は角の
部分の画素に対する境界点となるので、図6(A)に示
すようにこの境界点をベクトルの折れ曲り点Pとなるよ
う優先して設定することにより、左上の角の部分を誤差
なくベクトル化することができる。
First, if there is no one pixel at the corner,
A case will be described where the boundary pixels of two vertical pixels are used to correct this pixel. If there is no 1 pixel per corner,
Four cases shown in (A) to (D) can be considered. Then, when the boundary points of the boundary pixels of horizontal / vertical two pixels at this time are traced clockwise according to the tracking code shown in FIG. 1, they become as shown in FIGS. 4 (A) to 4 (D), respectively. Figure 3
(A) shows a case where the pixel in the upper left corner is missing. The tracking code string at the boundary point of the boundary pixels at this time is “110100” as shown in FIG. Then, when such a tracking code string is obtained, the boundary point corresponding to the fourth tracking code “1” is moved by (x, y) = (− 1, −1), and again according to the tracking code. If the boundary point is traced, it becomes “111000”. Explaining this in a little more detail, a table for moving points as shown in FIG. 5 is prepared, and tracking code strings are sequentially applied to this table. When this tracking code string matches “110100”, Then, by adding -1 to each of the x value and the y value of the boundary point corresponding to the fourth tracking code "1", the boundary point is moved to a position where the pixel moves to a corner portion. .. And
When the boundary point is traced again according to the tracking code including the moved boundary point, it becomes “111000”. Note that x and y are the boundary points of the upper left pixel of the image (0,0)
Is the value when the x axis is in the right direction and the y axis is in the down direction. Then, since the moved and corrected boundary point becomes a boundary point for the pixel in the corner portion, as shown in FIG. 6A, this boundary point is preferentially set so as to become a vector bending point P. By doing so, the upper left corner can be vectorized without error.

【0011】図3(B)は右上の角の部分の画素が欠落
している場合を示しており、図3(C),(D)はそれ
ぞれ左下,右下の角の部分の画素が欠落している場合を
示している。そして、このときの境界画素の境界点の追
跡コード列は、それぞれ図4(B)〜(D)に示す「0
03033」,「221211」,「332322」と
なる。そして、これらの場合も上記した左上の角の部分
の画素が欠落している場合と同様に、追跡コード列が図
4(B)〜(D)に示す追跡コード列と一致した際にこ
れらの追跡コード列の4番目の追跡コード「0」,
「2」,「3」に対応する境界点をそれぞれ(x,y)
=(+1,−1),(−1,+1),(+1,+1)移
動させるテーブルを用意して、追跡コード列を順次当て
はめて行き、図4(B)〜(D)と同じ追跡コード列と
なったときに、境界点を角の部分に移動し、その後再
度、追跡コードに従って境界点を追跡することにより、
移動して補正された角の部分の画素に対応する境界点を
含んだ追跡コード列(「000333」,「22211
1」,「333222」)を得ることができる。そし
て、この補正された角の部分の境界点をそれぞれ図6
(B)〜(D)に示すようにベクトルの折れ曲り点Pと
なるよう優先して設定することにより、角の部分を誤差
なくベクトル化することができる。なお、この実施例で
は、追跡コード列が各テーブルに用意した追跡コード列
のパターンに当てはめて行き、一致したときに境界点
(画素)を移動して、再度追跡コードを生成している
が、ある方向の追跡コードをi、この追跡コードiと9
0゜異なる追跡コードをjとすると、角1画素がないこ
の場合の追跡コード列は、「iijijj」となるの
で、この追跡コード列を「iiijjj」と直接変換す
るようにしても良い。
FIG. 3B shows the case where the pixel in the upper right corner is missing, and FIGS. 3C and 3D show the pixel in the lower left corner and the lower right corner, respectively. The case is shown. Then, the tracking code strings at the boundary points of the boundary pixels at this time are "0" shown in FIGS. 4B to 4D, respectively.
03033 ”,“ 221212 ”, and“ 332322 ”. In these cases as well, as in the case where the pixel in the upper left corner is missing, when the tracking code string matches the tracking code string shown in FIGS. The fourth tracking code “0” in the tracking code string,
The boundary points corresponding to "2" and "3" are respectively (x, y)
= (+ 1, -1), (-1, +1), (+1, +1) A table for moving is prepared, the tracking code sequence is sequentially applied, and the same tracking code as in FIGS. When it becomes a line, by moving the boundary point to the corner part and then again tracking the boundary point according to the tracking code,
A tracking code string (“000333”, “22211”) that includes boundary points corresponding to the pixels of the corners that have been moved and corrected.
1 ”,“ 333222 ”) can be obtained. Then, the boundary points of the corrected corners are respectively shown in FIG.
By preferentially setting the bending point P of the vector as shown in (B) to (D), the corner portion can be vectorized without error. In this embodiment, the tracking code string is applied to the pattern of the tracking code string prepared in each table, and when they match, the boundary point (pixel) is moved to generate the tracking code again. I is a tracking code in a certain direction, and this tracking code i and 9
If a tracking code different by 0 ° is j, the tracking code string in this case where there is no one pixel in one corner is “iijijj”, so this tracking code string may be directly converted to “iiiijj”.

【0012】次に、角1画素がない場合に付近の水平/
垂直3画素づつの境界画素から、この画素を補正する場
合について説明する。角1画素がない場合は、上述した
図3(A)〜(D)に示す場合と同様、図7(A)〜
(D)に示す4つの場合が考えられる。そして、このと
きの水平/垂直3画素づつの境界画素の境界点を図1に
示す追跡コードに従って右回りに追跡すると、それぞれ
図8(A)〜(D)のようになる。図7(A)では、左
上の角の部分の画素が欠落している場合を示している。
このときの境界画素の境界点の追跡コード列は、図8
(A)に示すように、「11101000」となる。こ
のような追跡コード列となった場合に、5番目の追跡コ
ード「1」に対応する境界点を(x,y)=(−1,−
1)移動するようなテーブルを用いて、角の部分に境界
点が移動するようにし、再度、追跡コードに従って境界
点を追跡すると、「11110000」となる。そし
て、この補正された境界点は角の部分の画素の境界点と
なるので、この境界点をベクトルの折れ曲り点となるよ
う優先して設定することにより、角の部分を誤差なくベ
クトル化することができる。
Next, if there is no pixel at one corner,
A case will be described in which this pixel is corrected from the boundary pixels of three vertical pixels. When there is no one corner pixel, as in the case shown in FIGS. 3A to 3D described above, FIGS.
Four cases shown in (D) can be considered. Then, when the boundary points of the boundary pixels for each of the horizontal / vertical three pixels at this time are traced clockwise according to the tracking code shown in FIG. 1, the results are as shown in FIGS. FIG. 7A shows a case where the pixel in the upper left corner is missing.
The tracking code string at the boundary point of the boundary pixels at this time is shown in FIG.
As shown in (A), it is “11101000”. In the case of such a tracking code string, the boundary point corresponding to the fifth tracking code “1” is (x, y) = (− 1, −)
1) When a boundary point is moved to a corner portion using a moving table and the boundary point is traced again according to the tracking code, the result is “1110000”. Since the corrected boundary point becomes the boundary point of the pixel in the corner portion, the corner portion is vectorized without error by preferentially setting the boundary point so as to be the bending point of the vector. be able to.

【0013】また、図7(B)〜(D)に示す右上、左
下、右下のそれぞれの角の部分の画素が欠落している場
合にも、同様に、境界画素の境界点の追跡コード列は、
それぞれ図8(B)〜(D)に示す「0003033
3」,「22212111」,「33323222」と
なる。そして、これらの場合も上記した場合と同様に、
テーブルに追跡コード列を順次当てはめて行き、図8
(B)〜(D)に示す追跡コード列と一致したときに、
追跡コード列の5番目の追跡コード「0」,「2」,
「3」に対応する境界点をそれぞれ(x,y)=(+
1,−1),(−1,+1),(+1,+1)移動させ
て角の部分となる境界点にし、再度、追跡コードに従っ
て境界点を追跡することにより、移動して補正された角
の部分の画素に対応する境界点を含んだ追跡コード列
(「00003333」,「22221111」,「3
3332222」)を得ることができる。そして、この
補正された角の部分の境界点をそれぞれベクトルの折れ
曲り点となるよう優先して設定することにより、角の部
分を誤差なくベクトル化することができる。なお、この
実施例でも、ある方向の追跡コードをi、この追跡コー
ドiと90゜異なる追跡コードをjとすると、角1画素
がないこの場合の追跡コード列は、「iiijijj
j」となるので、この追跡コード列を「iiiijjj
j」と変換するようにしても良い。
Also, when the pixels at the upper right corner, the lower left corner, and the lower right corner shown in FIGS. 7B to 7D are missing, the tracking code of the boundary point of the boundary pixel is similarly obtained. The columns are
“0003033” shown in FIGS. 8B to 8D, respectively.
3 ”,“ 22212111 ”, and“ 33323222 ”. And in these cases, as in the case above,
Apply the tracking code sequence to the table in sequence, and
When the tracking code strings shown in (B) to (D) are matched,
The fifth tracking code “0”, “2” in the tracking code string,
The boundary points corresponding to “3” are (x, y) = (+
1, −1), (−1, +1), (+1, +1) to make a boundary point that becomes a corner part, and again by tracking the boundary point according to the tracking code, the moved and corrected corner A tracking code string (“00003333”, “22222111”, “3
3332222 ") can be obtained. Then, by preferentially setting the corrected boundary points of the corner portions so as to be the bending points of the vector, the corner portions can be vectorized without error. Also in this embodiment, if the tracking code in a certain direction is i and the tracking code different from this tracking code i by 90 is j, the tracking code string in this case where there is no one pixel in one corner is "iiiijijj".
j ”, this trace code string is changed to“ iiiiiijjj
It may be converted into “j”.

【0014】上記した2つの実施例は、共に角1画素が
ない場合を示しているが、水平/垂直2画素づつの境界
画素から補正する場合は、少ない情報で補正をすること
ができるので、画素数の少ない文字や漢字などの角が多
く、複雑な文字、あるいはゴチック体の文字などに適し
ており、3画素づつの境界画素から補正する場合は、曲
線の多いひらがなや、画素数の多い文字、明朝体などに
適している。したがって、2画素で補正するか3画素で
補正するかを、文字の大きさや種類、字体の種類などに
よって使い分けることにより、より正確な補正をするこ
とができる。
Both of the above-described two embodiments show the case where there is no one pixel at one corner, but when the correction is made from the boundary pixels of every two horizontal / vertical pixels, the correction can be made with a small amount of information. Suitable for complex characters or Gothic characters with many corners such as characters and Chinese characters with few pixels. When correcting from boundary pixels of 3 pixels, hiragana with many curves and many pixels Suitable for letters and Mincho typeface. Therefore, more accurate correction can be performed by properly selecting whether to perform correction with 2 pixels or with 3 pixels depending on the size and type of character, the type of font, and the like.

【0015】第3の実施例として、角2画素がない場合
に、付近の水平/垂直3画素づつの境界画素から、この
画素を補正する場合について説明する。角2画素がない
場合は、図9(A)〜(H)に示す8つの場合が考えら
れる。そして、このときの境界画素の境界点を図1に示
す追跡コードに従って右回りに追跡すると、それぞれ図
10(A)〜(H)のようになる。図9(A)は、左上
の角の部分の画素が欠落している場合を示している。こ
のときの境界画素の境界点の追跡コード列は、図10
(A)に示すように、「111001000」となる。
このような追跡コード列となった場合に、5,6番目の
追跡コード「01」に対応する境界点を共に(x,y)
=(−1,−1)移動するようなテーブルを用いて、欠
落している角の部分とその隣に境界点が移動するように
し、再度、追跡コードに従って境界点を追跡すると、
「111100000」となる。そして、この移動して
補正された境界点は角の部分とその隣の画素の境界点と
なるので、この角の部分となる境界点(5番目の追跡コ
ード「0」に対応する境界点)をベクトルの折れ曲り点
となるよう優先して設定することにより、左上の角2画
素がない場合にも角の部分を誤差なくベクトル化するこ
とができる。
As a third embodiment, a case will be described in which, when there are no two corner pixels, this pixel is corrected from neighboring horizontal and vertical three boundary pixels. When there are no two corner pixels, eight cases shown in FIGS. 9A to 9H can be considered. Then, when the boundary points of the boundary pixels at this time are tracked in the clockwise direction according to the tracking code shown in FIG. 1, the results are as shown in FIGS. FIG. 9A shows the case where the pixel in the upper left corner is missing. The tracking code string at the boundary point of the boundary pixels at this time is shown in FIG.
As shown in (A), it is “111001000”.
In the case of such a tracking code string, the boundary points corresponding to the fifth and sixth tracking codes “01” are both (x, y).
= (-1, -1) Use a table that moves so that the boundary point moves to the missing corner part and its neighbor, and again when tracking the boundary point according to the tracking code,
It becomes "111100000". Since this moved and corrected boundary point becomes a corner point and a boundary point between pixels adjacent to it, the boundary point becomes the corner point (the boundary point corresponding to the fifth tracking code “0”). By preferentially setting B to be the bending point of the vector, the corner portion can be vectorized without error even when there are no two pixels in the upper left corner.

【0016】また、図9(B)〜(H)は、それぞれ角
2画素が欠落している場合の他の例を示しており、それ
らの境界画素の境界点の追跡コード列は、それぞれ図1
0(B)〜(H)に示すようになる。そして、この場合
も上記した場合と同様に、テーブルに追跡コード列を順
次当てはめて行き、図10(B)〜(H)と同じ追跡コ
ード列となったときに、5,6番目の追跡コードに対応
する境界点を移動させるテーブルを用意して、追跡コー
ド列を順次当てはめて行き、図10(B)〜(H)と同
じ追跡コード列となったときに、角とその隣の部分とな
る境界点を補正し、再度、追跡コードに従って境界点を
追跡することにより、補正された角の部分の境界点を含
んだ追跡コード列を得ることができる。そして、この補
正された角の部分の境界点をそれぞれベクトルの折れ曲
り点となるよう優先して設定することにより、角の部分
を誤差なくベクトル化することができる。なお、角2画
素が欠落している場合は、上記した8通りが考えられる
が、図9(A)及び(E)は共に左上の角の部分の画素
が欠落している場合を示しており、5,6番目の追跡コ
ードに対応する境界点を共に(x,y)=(−1,−
1)移動すれば良く、同図(B)及び(F)は共に右
上、同図(C)及び(G)は共に左下、同図(D)及び
(H)は共に右下、の角の部分の画素が欠落している場
合であるので、それぞれ5,6番目の追跡コードに対応
する境界点を共に(x,y)=(+1,−1),(−
1,+1),(+1,+1)移動すれば良いので、実質
4種類の移動で済む。
Further, FIGS. 9B to 9H show other examples in which two corner pixels are missing, and the tracking code strings at the boundary points of these boundary pixels are respectively shown in FIGS. 1
0 (B) to (H). Also in this case, as in the case described above, the tracking code strings are sequentially applied to the table, and when the same tracking code string as shown in FIGS. 10B to 10H is obtained, the fifth and sixth tracking codes are obtained. A table for moving the boundary points corresponding to is prepared, the tracking code strings are sequentially applied, and when the same tracking code string as shown in FIGS. By compensating for the boundary point and then again tracking the boundary point according to the tracking code, it is possible to obtain a tracking code string including the corrected boundary point of the corner portion. Then, by preferentially setting the corrected boundary points of the corner portions so as to be the bending points of the vector, the corner portions can be vectorized without error. Note that when the two corner pixels are missing, the above-described eight ways are possible, but FIGS. 9A and 9E both show the case where the pixel in the upper left corner is missing. , The boundary points corresponding to the 5th and 6th tracking codes are (x, y) = (− 1, −)
1) It suffices to move the corners in the upper right corners of FIGS. 7B and 7F, the lower left corner of FIGS. 9C and 9G, and the lower right corner of FIGS. This is the case where the partial pixels are missing, so that the boundary points respectively corresponding to the fifth and sixth tracking codes are (x, y) = (+ 1, −1), (−
Since it is sufficient to move (1, +1), (+1, +1), substantially four types of movement are sufficient.

【0017】また、ある方向の追跡コードをi、この追
跡コードiと90゜異なる追跡コードをjとすると、角
2画素がないこの場合の追跡コード列は、「iiijj
ijjj」または「iiijiijjj」となるので、
これらの追跡コード列をそれぞれ「iiiiijjj
j」,「iiiijjjjj」と変換して、最初に出て
くる追跡コード「j」(5または6番目の追跡コード)
を優先してベクトルの折れ曲り点としても良い。
If a tracking code in a certain direction is i and a tracking code different from the tracking code i by 90 degrees is j, the tracking code string in this case having no two corner pixels is "iiiijj".
ijjj ”or“ iiijiijjj ”,
These tracking code strings are respectively referred to as “iiiiiijjj”.
j "," iiiijjjjj "and converted to the first tracking code" j "(5th or 6th tracking code)
May be prioritized as the bending point of the vector.

【0018】最後に、角3画素がない場合にこの画素を
補正する場合について説明する。ここでは、便宜上、水
平/垂直それぞれ1画素と角の部分1画素が欠落してい
る場合のみ考える。この角3画素がない場合は、図11
(A)〜(D)に示す4つの場合が考えられる。そし
て、このときの境界画素の境界点を図1に示す追跡コー
ドに従って右回りに追跡すると、図12(A)〜(D)
のようになる。図11(A)は、左上の角の部分の画素
が欠落している場合を示している。このときの境界画素
の境界点の追跡コード列は、図12(A)に示すよう
に、「1110101000」となる。このような追跡
コード列となった場合に、5〜7番目の追跡コード「1
01」に対応する境界点を共に(x,y)=(−1,−
1)移動するようなテーブルを用いて、欠落している角
の部分とその両隣に境界点が移動するようにし、再度、
追跡コードに従って境界点を追跡すると、「11111
00000」となる。そして、この移動して補正された
境界点は角の部分とその両隣の画素の境界点となるの
で、この角の部分となる境界点(6番目の追跡コード
「0」に対応する境界点)をベクトルの折れ曲り点とな
るよう優先して設定することにより、左上の角3画素が
ない場合にも角の部分を誤差なくベクトル化することが
できる。
Finally, description will be given of a case where the pixel is corrected when there are not three corner pixels. Here, for the sake of convenience, consideration will be given only to the case where one horizontal / vertical pixel and one corner pixel are missing. If there are not three corner pixels,
Four cases shown in (A) to (D) can be considered. Then, when the boundary points of the boundary pixels at this time are traced clockwise according to the tracking code shown in FIG. 1, FIGS.
become that way. FIG. 11A shows the case where the pixel in the upper left corner is missing. The tracking code string at the boundary point of the boundary pixels at this time is “1110101000”, as shown in FIG. When such a tracking code string is obtained, the fifth to seventh tracking codes “1
The boundary points corresponding to “01” are both (x, y) = (− 1, −
1) Use a moving table so that the boundary points move to the missing corner and both sides of it, and again
When the boundary points are tracked according to the tracking code, “11111
It becomes "00000". Since the moved and corrected boundary point becomes the corner point and the boundary points of the pixels on both sides thereof, the boundary point (the boundary point corresponding to the sixth tracking code “0”) becomes the corner section. By preferentially setting B to be the bending point of the vector, the corner portion can be vectorized without error even when there are not three pixels in the upper left corner.

【0019】また、図11(B)〜(D)は、それぞれ
右上、左下、右下の角3画素が欠落している場合の例を
示しており、それらの境界点の追跡コード列は、それぞ
れ図12(B)〜(D)に示すようになる。そして、こ
の場合も上記したのと同様に、テーブルに追跡コード列
を順次当てはめて行き、図12(B)〜(D)と同じ追
跡コード列となったときに、5〜7番目の追跡コードに
対応する境界点を移動させるテーブルを用意して、追跡
コード列を順次当てはめて行き、図12(B)〜(D)
と同じ追跡コード列となったときに、角とその両隣の部
分となる境界点を補正し、再度、追跡コードに従って境
界点を追跡することにより、補正された角の部分の境界
点を含んだ追跡コード列を得ることができる。そして、
この補正された角の部分の境界点をそれぞれベクトルの
折れ曲り点となるよう優先して設定することにより、角
の部分を誤差なくベクトル化することができる。なお、
ある方向の追跡コードをi、この追跡コードiと90゜
異なる追跡コードをjとすると、角3画素がないこの場
合の追跡コード列は、「iiijijijjj」となる
ので、これらの追跡コード列をそれぞれ「iiiiij
jjjj」と変換して、6番目の追跡コード「j」に対
応する境界点を優先してベクトルの折れ曲り点としても
良い。以上説明した各実施例は、いずれも右回り(時計
回り)に追跡する例を示したが、左回り(反時計回り)
でも同様にして実施することができる。
Further, FIGS. 11B to 11D show examples in which the upper right corner, the lower left corner, and the lower right corner 3 pixels are missing, respectively, and the tracking code strings at these boundary points are: 12B to 12D, respectively. Then, in this case as well, in the same manner as described above, the tracking code strings are sequentially applied to the table, and when the same tracking code string as in FIGS. 12B to 12D is obtained, the fifth to seventh tracking codes are obtained. A table for moving the boundary points corresponding to is prepared, the tracking code strings are sequentially applied, and the table shown in FIGS.
When the same tracking code string is obtained, the corners and the boundary points that are on both sides of the corner are corrected, and the boundary points are traced again according to the tracking code, so that the corrected boundary points of the corners are included. The tracking code string can be obtained. And
By preferentially setting the corrected boundary points of the corner portions so as to be the bending points of the vector, the corner portions can be vectorized without error. In addition,
If the tracking code in a certain direction is i and the tracking code different from this tracking code i by 90 degrees is j, the tracking code string in this case where there are no three pixels in the corner is "iiiijijijjj". "Iiiiiij
Alternatively, the vector may be converted into “jjjj”, and the boundary point corresponding to the sixth tracking code “j” may be prioritized as the bending point of the vector. In each of the above-described embodiments, an example in which tracking is performed clockwise (clockwise) is shown, but counterclockwise (counterclockwise).
However, it can be carried out in the same manner.

【0020】[0020]

【発明の効果】本発明のアウトラインベクトルの自動整
形方式は、角度を求める必要がないので、高速にベクト
ル生成処理を行うことができる。そして、境界画素の境
界点を追跡しているので、一画素幅の直線が突出してい
るときでも追跡コードが同じところを戻ることがなく、
文字を拡大したときに、この直線が一画素幅のままとな
らずに線幅も拡大することができる。また、境界画素の
中心を追跡するのに比べて、アウトラインの誤差が少な
いという効果がある。そして、角となる部分を検出して
補正してからベクトル化しているので、特に、スキャナ
等で画像を入力して角の部分の画素が欠落しても高品質
の画像を得ることができるという効果がある。
According to the outline vector automatic shaping method of the present invention, since it is not necessary to obtain an angle, vector generation processing can be performed at high speed. Since the boundary points of the boundary pixels are tracked, the tracking code does not return to the same place even when a straight line having a width of one pixel projects.
When the character is enlarged, the line width can be enlarged without the straight line remaining one pixel width. Further, compared to tracking the center of the boundary pixel, there is an effect that the error of the outline is small. Since the corners are detected and corrected before being vectorized, it is possible to obtain a high-quality image even if the image is input with a scanner or the like and the pixels at the corners are missing. effective.

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

【図1】本発明のアウトラインベクトルの自動整形方式
に使用する追跡コードの一実施例を示す概念図である。
FIG. 1 is a conceptual diagram showing an embodiment of a tracking code used in an outline vector automatic shaping method of the present invention.

【図2】図形に追跡コード列を付した状態例を示す概念
図である。
FIG. 2 is a conceptual diagram showing an example of a state in which a trace code string is attached to a figure.

【図3】(A)〜(D)は角1画素がない場合を示す概
念図である。
FIGS. 3A to 3D are conceptual diagrams showing a case where there is no one pixel in one corner.

【図4】(A)〜(D)はそれぞれ図3(A)〜(D)
の追跡コード列を示す概念図である。
4 (A) to (D) are shown in FIG. 3 (A) to (D), respectively.
It is a conceptual diagram which shows the tracking code sequence of.

【図5】図3(A)の角1画素がない場合の境界点の移
動を行うためのテーブルを示す図である。
FIG. 5 is a diagram showing a table for moving a boundary point when there is no one pixel in a corner of FIG.

【図6】(A)〜(D)はそれぞれ図3(A)〜(D)
の追跡コード列における優先点を示す概念図である。
6 (A) to (D) are shown in FIG. 3 (A) to (D), respectively.
It is a conceptual diagram which shows the priority point in the tracking code sequence of.

【図7】(A)〜(D)は角1画素がない場合を示す概
念図である。
7A to 7D are conceptual diagrams showing a case where there is no one pixel in one corner.

【図8】(A)〜(D)はそれぞれ図7(A)〜(D)
の追跡コード列を示す概念図である。
8A to 8D are respectively FIGS. 7A to 7D.
It is a conceptual diagram which shows the tracking code sequence of.

【図9】(A)〜(H)は角2画素がない場合を示す概
念図である。
9A to 9H are conceptual diagrams showing a case where there are no two corner pixels.

【図10】(A)〜(H)はそれぞれ図9(A)〜
(H)の追跡コード列を示す概念図である。
10A to 10H are respectively shown in FIGS.
It is a conceptual diagram which shows the tracking code sequence of (H).

【図11】(A)〜(D)は角3画素がない場合を示す
概念図である。
11A to 11D are conceptual diagrams showing a case where there are not three corner pixels.

【図12】(A)〜(D)はそれぞれ図11(A)〜
(D)の追跡コード列を示す概念図である。
12A to 12D are respectively FIGS.
It is a conceptual diagram which shows the tracking code sequence of (D).

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

a〜d 画素 P 折れ曲り点 a to d pixel P bending point

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.5 識別記号 庁内整理番号 FI 技術表示箇所 G09G 5/24 9061−5G ─────────────────────────────────────────────────── ─── Continuation of front page (51) Int.Cl. 5 Identification code Office reference number FI technical display location G09G 5/24 9061-5G

Claims (1)

【特許請求の範囲】 【請求項1】2値画像の輪郭となる境界画素のいくつか
を抽出してベクトル化を行うアウトラインベクトルの自
動整形方式において、 前記境界画素の境界点の4方向追跡コード列を求め、こ
の追跡コード列から角となる点を判断してこの位置に前
記境界点を移動し、この移動した前記境界点を優先的に
折れ曲り点として前記ベクトル化を行うことを特徴とす
るアウトラインベクトルの自動整形方式。
Claim: What is claimed is: 1. An outline vector automatic shaping method for extracting some of boundary pixels which are contours of a binary image and vectorizing the outline pixels. A four-direction tracking code for boundary points of the boundary pixels. A line is obtained, a corner point is determined from this tracking code sequence, the boundary point is moved to this position, and the vectorization is performed with the moved boundary point as a bending point preferentially. Automatic outline vector shaping method.
JP3214715A 1991-07-31 1991-07-31 Automatic shaping system for outline vector Pending JPH0535862A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP3214715A JPH0535862A (en) 1991-07-31 1991-07-31 Automatic shaping system for outline vector
US08/589,072 US5666440A (en) 1991-07-31 1996-01-23 Method and apparatus for extracting outline data from bi-level image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3214715A JPH0535862A (en) 1991-07-31 1991-07-31 Automatic shaping system for outline vector

Publications (1)

Publication Number Publication Date
JPH0535862A true JPH0535862A (en) 1993-02-12

Family

ID=16660424

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3214715A Pending JPH0535862A (en) 1991-07-31 1991-07-31 Automatic shaping system for outline vector

Country Status (1)

Country Link
JP (1) JPH0535862A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240037550A1 (en) * 2022-07-29 2024-02-01 Ncr Corporation Information encoding and transmission techniques

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240037550A1 (en) * 2022-07-29 2024-02-01 Ncr Corporation Information encoding and transmission techniques

Similar Documents

Publication Publication Date Title
TWI244047B (en) Image processing device, image processing method, and record medium on which the same is recorded
US5526476A (en) Method and apparatus for generating character patterns expressed by coordinates of a coordinate system
JPH09237338A (en) Method and device for quickly smoothing contour
US20130020386A1 (en) Information input output method using dot pattern
US5572605A (en) Apparatus and method for inputting, compressing and outputting characters, illustrations, drawings and logomarks
JP3189276B2 (en) Data converter
JP3057935B2 (en) Character output device
JP2964841B2 (en) Data converter
US6813367B1 (en) Method and apparatus for site selection for data embedding
JP3936436B2 (en) Table recognition method
JP4436202B2 (en) Image quality improvement using partial template matching
JP2876942B2 (en) Data converter
JPH0535862A (en) Automatic shaping system for outline vector
JP2871601B2 (en) Character string detecting apparatus and method
JP3698867B2 (en) Circular pattern determination method, apparatus and recording medium
JPH0535872A (en) Contour tracing system for binary image
JPH03177982A (en) Image processing method
JP3582734B2 (en) Table vectorizer
US5666440A (en) Method and apparatus for extracting outline data from bi-level image data
JP2769673B2 (en) Vignette image converter
JP3082228B2 (en) Data converter
JP2003317107A (en) Ruled line extraction method and apparatus
JPH09120430A (en) Image processing device
JP3294249B2 (en) Image processing device
JP2861127B2 (en) Data converter