JP2645373B2 - How to vectorize shapes - Google Patents

How to vectorize shapes

Info

Publication number
JP2645373B2
JP2645373B2 JP62226181A JP22618187A JP2645373B2 JP 2645373 B2 JP2645373 B2 JP 2645373B2 JP 62226181 A JP62226181 A JP 62226181A JP 22618187 A JP22618187 A JP 22618187A JP 2645373 B2 JP2645373 B2 JP 2645373B2
Authority
JP
Japan
Prior art keywords
pixel
chain code
chain
pixels
boundary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP62226181A
Other languages
Japanese (ja)
Other versions
JPS6468889A (en
Inventor
良平 熊谷
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.)
Consejo Superior de Investigaciones Cientificas CSIC
Yozan Inc
Original Assignee
Consejo Superior de Investigaciones Cientificas CSIC
Yozan Inc
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 Consejo Superior de Investigaciones Cientificas CSIC, Yozan Inc filed Critical Consejo Superior de Investigaciones Cientificas CSIC
Priority to JP62226181A priority Critical patent/JP2645373B2/en
Publication of JPS6468889A publication Critical patent/JPS6468889A/en
Application granted granted Critical
Publication of JP2645373B2 publication Critical patent/JP2645373B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 この発明は図形のベクトル化方法に係り、特に画素の
輪郭のベクトル化に有効なベクトル化方法に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vectorization method for a graphic, and more particularly to a vectorization method effective for vectorizing a contour of a pixel.

〔発明の背景とその問題点〕[Background of the invention and its problems]

図形を記録するときデータの形式として、ドットデー
タとベクトルデータが考えられるが、一般にベクトルデ
ータ、特に輪郭のベクトルデータはラスタデータに比較
して容量が少なく、また図形の品質を保ちながら図形を
拡大縮小あるいは変形して表示することが容易であり、
有効なデータである。従来このベクトルデータは一般に
図形の境界画素の1部を一連のデータとして並べたもの
として与えられ、どの境界画素を選択するかによって再
現される図形の品質が左右された。特に漢字などの文字
をベクトル化図形として記録、再現する場合再現された
図形(文字)の品質は商品価値に大きな影響を与える。
また発明者の知る限り従来はベクトル化に際して境界画
素の角度演算を行っていたようであり、直角部の検出自
体に多大の処理時間を要していた模様である。すなわち
従来は、高品質の図形を再現可能なベクトルデータを、
実用的処理時間で生成することは不可能であった。
When recording a figure, dot data and vector data can be considered as data formats.Generally, vector data, especially contour vector data, has a smaller capacity than raster data and enlarges a figure while maintaining the quality of the figure. It is easy to display in reduced or deformed form,
It is valid data. Conventionally, this vector data is generally given as a part of the boundary pixels of the figure arranged as a series of data, and the quality of the reproduced figure depends on which boundary pixel is selected. In particular, when a character such as a kanji is recorded and reproduced as a vectorized graphic, the quality of the reproduced graphic (character) greatly affects the commercial value.
In addition, as far as the inventor knows, it seems that in the past, the angle calculation of the boundary pixel was performed at the time of vectorization, and it seems that the detection of the right-angled portion itself required a great deal of processing time. That is, conventionally, vector data that can reproduce high-quality figures
It was not possible to produce in a practical processing time.

〔発明の目的〕 この発明はこのような従来の問題点を解消すべく創案
されたもので、高品質の図形を再現し得るベクトルデー
タを実用的処理時間で生成し得る図形のベクトル化方法
を提供することを目的とする。
[Purpose of the Invention] The present invention was devised in order to solve such a conventional problem, and a vectorization method of a graphic which can generate vector data capable of reproducing a high quality graphic in a practical processing time. The purpose is to provide.

〔発明の概要〕[Summary of the Invention]

この発明に係る図形のベクトル化方法は、フリーマン
のチェーンコードまたはこれと等価な符合が図形の輪郭
の特徴、特に折曲状態を反映していることに着目し、図
形の境界画素を辿る順序で、このような符号の一連の符
号列を生成し、この符号列の各部における連続状態に基
づいて境界画素またはその近傍の画素からベクトルポイ
ントを選択するものである。
The vectorization method for a graphic according to the present invention focuses on the fact that the Freeman chain code or a code equivalent thereto reflects the features of the outline of the graphic, especially the bent state, and in the order of tracing the boundary pixels of the graphic. , A series of code strings of such codes are generated, and a vector point is selected from a boundary pixel or a pixel in the vicinity thereof based on a continuous state in each part of the code string.

なお第1図に示すように、フリーマンのチェーンコー
ドは、対象画素の右側を「0」とし、反時計方向に45度
ずつ順次1〜7の番号を与えたもので、図形の境界画素
を一方向に順次辿るとき、各境界画素に対し次の境界画
素の方向がチェーンコードとして与えられる。但し、チ
ェーンコードと等価な符合により同様の処理を行うこと
も勿論可能である。
As shown in FIG. 1, the Freeman chain code is such that the right side of the target pixel is set to “0” and the numbers 1 to 7 are sequentially provided in 45-degree increments in a counterclockwise direction. When sequentially following the direction, the direction of the next boundary pixel is given to each boundary pixel as a chain code. However, it is of course possible to perform the same processing using a code equivalent to the chain code.

〔発明の実施例〕(Example of the invention)

次にこの発明に係る図形のベクトル化方法の一実施例
を図面に基づいて説明する。
Next, an embodiment of a method for vectorizing a figure according to the present invention will be described with reference to the drawings.

第2図において、画像中に図形Fが存在し、これを通
常の左から右、上から下の走査により見るとき、最初に
左上の画素aが発見される。通常はこの画素aを起点に
して反時計回りに境界画素を辿り、チェーンコード列を
生成する。チェーンコードは対象画素(aに注目してい
るとき、そのがaが対象画素となる。)の次に存在する
画素がどの方向に存在するかを示す符号であり、第2図
では、境界画素を辿るときに生じるチェーンコードをそ
の境界画素上に表示している。第2図の画素aからチェ
ーンコードを生成する作業を始めたときに最後の画素と
なるaの右隣の画素bには、aの方向を指し示すチェー
ンコードを与えておく。(なお外側境界画素では最後の
画素にはチェーンコードが不要のことが多い。) また第3図において、1画素幅の直線lが突出してい
るような場合、この直線lを構成する画素a,b,cについ
ては、1回端点に向かって辿った後逆方向に辿ることに
なり、1つの境界画素に2つのチェーンコードが対応す
ることになる。従って、境界画素とチェーンコードは必
ずしも1対1ではない。
In FIG. 2, there is a figure F in the image, and when this is viewed by ordinary left-to-right and top-to-bottom scanning, the upper left pixel a is found first. Normally, a chain code string is generated by following the boundary pixel counterclockwise starting from the pixel a. The chain code is a code indicating in which direction a pixel existing next to the target pixel (when attention is paid to a, that a is the target pixel), and in FIG. Is displayed on the boundary pixel. When the operation of generating a chain code from the pixel a in FIG. 2 is started, a chain code indicating the direction of a is given to the pixel b on the right side of the last pixel a. (Note that a chain code is often unnecessary for the last pixel in the outer boundary pixels.) In FIG. 3, when a straight line 1 having a width of one pixel protrudes, the pixels a, With respect to b and c, after tracing once toward the end point, tracing in the opposite direction, two chain codes correspond to one boundary pixel. Therefore, the boundary pixel and the chain code are not always one-to-one.

第2図から明らかなように、この図形のチェーンコー
ドは「66000766002222244444」で与えられ、例えば「6
6」の連続で下向きの直線を「00」の連続で水平右向き
の直線を、「22」の連続で上向きの直線を、また「44」
の連続で水平左向の直線を表現している。
As is apparent from FIG. 2, the chain code of this figure is given by “66000766002222244444”, for example, “6
A straight line pointing downward in a series of 6's, a straight line pointing right horizontally in a series of '00', a straight line pointing up in a series of '22', and
And a straight line pointing left horizontally.

第2図の図形をベクトル化する際、理想的には画素a
→画素aの下方の直角の角の画素c1→その右方の凹の直
角の隅の画素c2→その下方の直角の角の画素c3→その右
方の直角の角の画素c4→その上方の直角の角の画素c5
順次ベクトルポイントとすればよいことが明らかであ
る。そして、これらのベクトルポイントのうち角(凸)
の画素c1,c3,c4,c5,aは連続したチェーンコード「6
6」,「66」,「00」,「22」,「44」が「2」だけ増
加した(6→0も8を法とすれば増加とみることができ
る。)位置に存在する。このようにチェーンコードは図
形の輪郭の折曲状況を反映していることが分る。同様に
第4図に示す斜めの直線が形成する凸の直角の角の画素
bは、それ以前の境界画素のチェーンコードを「2」だ
け増加したチェーンコードを有する。なお第2図の凹の
角部c2は前述のようにベクトルポイントとして抽出すべ
きであるが、境界画素ではないためチェーンコードは付
されていない。ここに凹の直角の処理の困難さがある
が、これについては後述する。なお第2図から明らかな
ように同一チェーンコードの連続は直線を意味する。
When vectorizing the figure of FIG. 2, ideally the pixel a
→ Pixel c 1 at the lower right corner of pixel a → Pixel c 2 at the right concave corner at the right concave → Pixel c 3 at the lower right corner → Pixel c 4 at the right right corner thereof → pixel c 5 of square corners of the upper be sequentially may be the vector point is clear. And the corner (convex) of these vector points
Of pixels c 1 , c 3 , c 4 , c 5 , and a are consecutive chain codes “6
"6", "66", "00", "22", and "44" are present at positions where they are increased by "2" (6 → 0 can also be regarded as increased by modulo 8). Thus, it can be seen that the chain code reflects the state of bending of the outline of the figure. Similarly, the convex right-angled pixel b formed by the diagonal straight line shown in FIG. 4 has a chain code obtained by increasing the chain code of the previous boundary pixel by “2”. Although the concave corner c2 in FIG. 2 should be extracted as a vector point as described above, it is not a boundary pixel, and thus no chain code is attached. Here, there is a difficulty in processing a concave right angle, which will be described later. As is apparent from FIG. 2, the continuation of the same chain code means a straight line.

チェーンコードは図形の外周を左回りに採るものが一
般的であるが、右回りにとることもできる。ただし、穴
の内周については外周とは逆向きにチェーンコードを採
る必要がある。ここではまず外周を左回りに採ったチェ
ーンコードを例にとって説明を進める。
The chain code generally takes the outer periphery of the figure counterclockwise, but can also take the clockwise. However, it is necessary to take a chain cord in the inner circumference of the hole in a direction opposite to the outer circumference. Here, the description will proceed with an example of a chain cord with the outer circumference taken counterclockwise.

ある画素にチェーンコードkが与えられていたとき、
その次の画素が採り得るチェーンコードk′は、次の画
素が境界画素である以上、kが偶数の場合k−2,k−3
の値はとることがなく、kが奇数の場合k−3の値はと
り得ない(但し、kは「8」を法とする)。例えば第1
図においてk=4の場合、k′は「1」、「2」とはな
り得ない。またk=5の場合、k′は「2」とはなり得
ない。このように1つの境界画素のチェーンコードのみ
で次の境界画素の方向の範囲が特定される。そしてk′
=k+2のときには「k′」の画素は凸の直角の角にな
る。これを直角として表示するか否かはベクトルデータ
の用途によるが、直角として表示する場合には「k′」
の画素をベクトルポイントとして採用する(第5図の画
素a,b,cおよび画素d,e,f)。なおここでは凹の直角につ
いて何らの処理も行っていない。また直角の両辺が一定
以上の長さになった場合(例えば3画素以上)にのみ直
角として表示するようにしてもよい(第6図の画素a1a2
a3bc1c2c3)。この場合には第5図で示した図形のabc,d
efの組合せはいずれも直角として表示しないので、例え
ば画素a,c,d,fをベクトルポイントとはせずに、角の画
素b,eのみを採用し、全体を比較的滑かな折線として表
示する(第6図破線l)。
When a chain code k is given to a pixel,
The chain code k ′ that can be taken by the next pixel is k−2, k−3 when k is an even number since the next pixel is a boundary pixel.
Cannot be taken, and if k is an odd number, the value of k-3 cannot be taken (however, k is modulo "8"). For example, the first
In the figure, when k = 4, k ′ cannot be “1” or “2”. When k = 5, k 'cannot be "2". As described above, the range in the direction of the next boundary pixel is specified only by the chain code of one boundary pixel. And k '
When = k + 2, the pixel of "k '" is a convex right-angled corner. Whether or not this is displayed as a right angle depends on the application of the vector data.
Are adopted as vector points (pixels a, b, c and pixels d, e, f in FIG. 5). In this case, no processing is performed for the concave right angle. Alternatively, only when both sides of the right angle have a certain length or more (for example, three or more pixels), the image may be displayed as a right angle (pixels a 1 a 2 in FIG. 6).
a 3 bc 1 c 2 c 3 ). In this case, abc, d of the figure shown in FIG.
Since all combinations of ef are not displayed as right angles, for example, pixels a, c, d, f are not set as vector points, only pixels b, e at corners are used, and the whole is displayed as a relatively smooth broken line (Broken line 1 in FIG. 6).

次に前述の凹の直角部の処理について説明すると、凹
の直角部のパターンは縦横の直線よりなる第7図
(a),第8図(a),第9図(a),第10図(a)し
か存在しない。
Next, the processing of the above-described concave right-angled portion will be described. The pattern of the concave right-angled portion is composed of vertical and horizontal straight lines. FIGS. 7 (a), 8 (a), 9 (a), 10 Only (a) exists.

第7図(a)は左下に開く、凹の直角部を示すもので
あり、チェーンコードは水平部分において「…007」と
進んで隅の画素aに到り、その後垂直部分に移って「66
…」と進んでいる。この図の直角を規定する画素は水平
部分の最後の2つの画素b,cと垂直部分の最初の画素d
である。これらのチェーンコードは「076」であり、チ
ェーンコード列中にこの組合せが生じたときは直ちに左
下に開く凹の直角部であることが判明する。ここでチェ
ーンコードに変更を加え、隅の画素aが含まれるように
する、第7図(b)はチェーンコードに変更を加えた結
果を示すものであり、水平部分の最後の画素cを「7」
から「6」に変更し、さらに隅の画素aにチェーンコー
ド「6」を与えている。これはチェーンコードの組「07
6」を「0066」に変更する操作に対応する。
FIG. 7 (a) shows a concave right-angled portion which opens to the lower left, and the chain code advances to "... 007" in the horizontal portion to reach the pixel a at the corner, and then moves to the vertical portion to "66".
… ” The pixels defining the right angle in this figure are the last two pixels b and c of the horizontal part and the first pixel d of the vertical part
It is. These chain codes are “076”, and when this combination occurs in the chain code row, it is immediately found that the chain codes are concave right-angled portions that open to the lower left. Here, a change is made to the chain code so that the pixel a at the corner is included. FIG. 7 (b) shows the result of the change to the chain code. 7 "
To “6”, and a chain code “6” is given to the pixel a at the corner. This is the chain code set "07
This corresponds to an operation of changing “6” to “0066”.

これらのチェーンコードの変更により、水平部分の最
後の画素cが隅の画素aを指すことになり、隅の画素a
が垂直部分の最初の画素dを指すことになる。
Due to these changes in the chain code, the last pixel c of the horizontal portion points to the corner pixel a, and the corner pixel a
Indicates the first pixel d of the vertical portion.

第8図(a)は右下に開く、凹の直角部を示すもので
あり、チェーンコードは垂直部分において「…221」と
進んで隅の画素aに到り、その後水平部分に移って「00
…」と進んでいる。この図の直角を規定する画素は垂直
部分の最後の2つの画素b,cと水平部分の最初の画素d
である。これらのチェーンコードは「210」であり、チ
ェーンコード列中にこの組合せが生じたときは直ちに右
下に開く凹の直角部であることが判明する。ここでチェ
ーンコードに変更を加え、隅の画素aが含まれるように
する、第8図(b)はチェーンコードに変更を加えた結
果を示すものであり、水平部分の最後の画素cを「1」
から「2」に変更し、さらに隅の画素aにチェーンコー
ド「0」を与えている。これはチェーンコードの組「21
0」を「2200」に変更する操作に対応する。
FIG. 8 (a) shows a concave right-angled portion which opens to the lower right, and the chain code advances to "... 221" in the vertical portion to reach the pixel a at the corner, and then moves to the horizontal portion to " 00
… ” The pixels defining the right angle in this figure are the last two pixels b and c of the vertical part and the first pixel d of the horizontal part
It is. These chain codes are "210", and when this combination occurs in the chain code string, it immediately turns out that they are concave right-angle portions that open to the lower right. Here, a change is made to the chain code so that the pixel a at the corner is included. FIG. 8 (b) shows the result of the change to the chain code. 1 "
To “2”, and a chain code “0” is given to the pixel a at the corner. This is the chain code set "21
This corresponds to an operation of changing “0” to “2200”.

これらのチェーンコードの変更により、垂直部分の最
後の画素cが隅の画素aを指すことになり、隅の画素a
が水平部分の最初の画素dを指すことになる。
Due to these chain code changes, the last pixel c of the vertical portion points to the corner pixel a, and the corner pixel a
Indicates the first pixel d in the horizontal part.

第9図(a)は左上に開く、凹の直角部を示すもので
あり、チェーンコードは垂直部分において「…665」と
進んで隅の画素aに到り、その後水平部分に移って「44
…」と進んでいる。この図の直角を規定する画素は垂直
部分の最後の2つの画素b,cと水平部分の最初の画素d
である。これらのチェーンコードは「654」であり、チ
ェーンコード列中にこの組合せが生じたときは直ちに左
上に開く凹の直角部であることが判明する。ここでチェ
ーンコードに変更を加え、隅の画素aが含まれるように
する、第9図(b)はチェーンコードに変更を加えた結
果を示すものであり、垂直部分の最後の画素cを「5」
から「6」に変更し、さらに隅の画素aにチェーンコー
ド「4」を与えている。これはチェーンコードの組「65
4」を「6644」に変更する操作に対応する。
FIG. 9 (a) shows a concave right-angled portion which opens to the upper left, and the chain code advances to "..665" in the vertical portion to reach the pixel a at the corner, and then moves to the horizontal portion to "44".
… ” The pixels defining the right angle in this figure are the last two pixels b and c of the vertical part and the first pixel d of the horizontal part
It is. These chain cords are "654", and when this combination occurs in the chain of cords, it immediately turns out that they are concave right angles that open to the upper left. Here, a change is made to the chain code so that the pixel a at the corner is included. FIG. 9 (b) shows the result of the change to the chain code. 5 "
To “6”, and a chain code “4” is given to the pixel a at the corner. This is the chain code set "65
Corresponds to the operation of changing "4" to "6644".

これらのチェーンコードの変更により、垂直部分の最
後の画素cが隅の画素aを指すことになり、隅の画素a
が垂直部分の最初の画素dを指すことになる。
Due to these chain code changes, the last pixel c of the vertical portion points to the corner pixel a, and the corner pixel a
Indicates the first pixel d of the vertical portion.

第10図(a)は右上に開く、凹の直角部を示すもので
あり、チェーンコードは垂直部分において「…443」と
進んで隅の画素aに到り、その後水平部分に移って「22
…」と進んでいる。この図の直角を規定する画素は垂直
部分の最後の2つの画素b,cと水平部分の最初の画素d
である。これらのチェーンコードは「432」であり、チ
ェーンコード列中にこの組合せが生じたときは直ちに右
上に開く凹の直角部であることが判明する。ここでチェ
ーンコードに変更を加え、隅の画素aが含まれるように
する、第10図(b)はチェーンコードに変更を加えた結
果を示すものであり、垂直部分の最後の画素cを「3」
から「4」に変更し、さらに隅の画素aにチェーンコー
ド「2」を与えている。これはチェーンコードの組「43
2」を「4422」に変更する操作に対応する。
FIG. 10 (a) shows a concave right-angled portion that opens to the upper right, and the chain code advances to “... 443” at the vertical portion to reach the pixel a at the corner, and then moves to the horizontal portion to “22”.
… ” The pixels defining the right angle in this figure are the last two pixels b and c of the vertical part and the first pixel d of the horizontal part
It is. These chain cords are "432", and when this combination occurs in the chain of cords, it is immediately determined that they are concave right-angle portions that open to the upper right. Here, a change is made to the chain code so that the pixel a at the corner is included. FIG. 10 (b) shows the result of the change to the chain code. 3 "
To “4”, and the chain code “2” is given to the pixel a at the corner. This is the chain code set "43
Corresponds to the operation of changing "2" to "4422".

これらのチェーンコードの変更により、垂直部分の最
後の画素cが隅の画素aを指すことになり、隅の画素a
が垂直部分の最初の画素dを指すことになる。
Due to these chain code changes, the last pixel c of the vertical portion points to the corner pixel a, and the corner pixel a
Indicates the first pixel d of the vertical portion.

以上は図形の外側の境界画素の処理であったが、次に
内側の境界画素すなわち穴の処理について説明する。第
12図(a)は内側の境界画素にチェーンコードを付した
状態を示し、そのチェーンコードは「000766654443222
1」となっている。ここでチェーンコード列の最後がチ
ェーンコード列の先頭に続いていると考えると、凹の直
角部のチェーンコード列は、外側境界画素の場合と同様
に、「076」,「654」,「432」,「210」となる。これ
に外側境界画素と同様の処理を施せば、チェーンコード
はそれぞれ「0066」,「6644」,「4422」,「2200」と
なり(第8図)、隅の画素a1,a2,a3,a4にチェーンコー
ドが与えられるとともに、その1つ前の画素c1,c2,c3,c
4のチェーンコードが「7」→「0」,「5」→
「6」,「3」→「4」,「1」→「2」と変更され
る。これにより穴に対しても鮮明に直角部を表現し得
る。
The above is the processing of the boundary pixel on the outside of the figure. Next, the processing of the boundary pixel on the inside, that is, the hole will be described. No.
FIG. 12 (a) shows a state in which a chain code is attached to the inner boundary pixel, and the chain code is “000766654443222”.
1 ". Here, assuming that the end of the chain code string continues to the beginning of the chain code string, the chain code string at the concave right-angled portion has “076”, “654”, and “432” as in the case of the outer boundary pixel. ”And“ 210 ”. If the same processing is performed on the outer boundary pixels, the chain codes become “0066”, “6644”, “4422”, and “2200” (FIG. 8), and the pixels a 1 , a 2 , and a 3 at the corners are obtained. , with chains code is given to a 4, immediately preceding pixel c 1, c 2, c 3 , c
Chain code of 4 is "7" → "0", "5" →
“6”, “3” → “4”, “1” → “2” are changed. As a result, a right-angled portion can be clearly expressed even for a hole.

以上の処理においては、直角部の判断に「3画素」の
画素値を用いたが、比較的細かい直角部の連続、例えば
第18図に示すような2画素単位の階段状の境界をむしろ
直角の連続として表現せず、直線lとして表現した方が
好ましいときもある。この場合には前述の判断対象とな
る3画素に対し、その前または後の少なくとも一方に一
定以上の長さの直線が連続していたときにのみ前述の判
断を行うこととしてもよい。一例を上げると、「076」
の判断にかえて、「00766」のように直角部の1辺が
3画素以上のときにのみ直角部と判断し、「000666」に
変換する。
In the above processing, the pixel value of "3 pixels" was used for the determination of the right-angled portion. However, a series of relatively fine right-angled portions, for example, a stepwise boundary in units of two pixels as shown in FIG. In some cases, it is preferable not to express as a continuation but express as a straight line l. In this case, the above-described determination may be performed only when a straight line having a predetermined length or more is continuous before or after at least one of the three pixels to be determined. For example, "076"
Is determined as a right angle portion only when one side of the right angle portion is 3 pixels or more, such as “0 076 6”, and converted to “000666”.

以上に外側境界画素に反時計回りのチェーンコード
を、内側境界画素に反対の時計回りのチェーンコードを
付した実施例を示したが、逆に、外側境界画素に時計回
りのチェーンコードを付すことも可能であり、この場合
には内側境界画素には反時計回りのチェーンコードを付
すことになる。
The embodiment in which the counterclockwise chain code is added to the outer boundary pixel and the counterclockwise chain code is added to the inner boundary pixel, but conversely, the clockwise chain code is added to the outer boundary pixel. In this case, a counterclockwise chain code is attached to the inner boundary pixel.

第13図(a)は前記第5図と同様の図形に時計回りの
チェーンコードを付したものであり、直角を規定するチ
ェーンコードの組は「234」である。これを第13図
(b)のように、「2244」と変化させることにより、鮮
明な直角部が与えられる。
FIG. 13 (a) shows the same figure as FIG. 5 but with a clockwise chain code attached, and the set of chain codes defining the right angle is "234". By changing this to “2244” as shown in FIG. 13 (b), a sharp right angle portion is provided.

第14図(a)は前記第6図と同様の図形に時計回りの
チェーンコードを付したものであり、直角を規定するチ
ェーンコードの組は「456」である。これを第14図
(b)のように、「4466」と変化させることにより、鮮
明な直角部が与えられる。
FIG. 14 (a) shows the same figure as FIG. 6 with a clockwise chain code attached, and the set of chain codes defining the right angle is "456". By changing this to "4466" as shown in FIG. 14 (b), a sharp right angle portion is provided.

第15図(a)は前記第9図と同様の図形に時計回りの
チェーンコードを付したものであり、直角を規定するチ
ェーンコードの組は「012」である。これを第15図
(b)のように、「0022」と変化させることにより、鮮
明な直角部が与えられる。
FIG. 15 (a) shows the same figure as FIG. 9 but with a clockwise chain code added, and the set of chain codes defining the right angle is "012". By changing this to “0022” as shown in FIG. 15 (b), a sharp right angle portion is provided.

第16図(a)は前記第8図と同様の図形に時計回りの
チェーンコードを付したものであり、直角を規定するチ
ェーンコードの組は「670」である。これを第16図
(b)のように、「6600」と変化させることにより、鮮
明な直角部が与えられる。
FIG. 16 (a) shows the same figure as FIG. 8 but with a clockwise chain code attached, and the set of chain codes defining the right angle is "670". By changing this to “6600” as shown in FIG. 16 (b), a sharp right angle portion is provided.

第17図はこの実施例における穴の処理を示すものであ
り、内側境界画素には外側境界画素と反対方向、すなわ
ち反時計まわりにチェーンコードが付されている。第17
図(a)に示すように、このチェーンコードは「566670
0012223444」となる。第一実施例と同様にチェーンコー
ド列の最後がチェーンコード列の先頭に続いていると考
えると、外側境界画素について第13図〜第17図に示した
と同様に、凹の直角部のチェーンコードは「234」,「4
56」,「012」,「670」となり、これを「2244」,「44
66」,「0022」,「6600」と変更することにより第一実
施例と同様に直角部の鮮明な表現が行なわれる。
FIG. 17 shows the processing of holes in this embodiment. A chain code is attached to the inner boundary pixel in the opposite direction to the outer boundary pixel, that is, counterclockwise. 17th
As shown in Fig. (A), this chain code is "566670
0012223444 ". Assuming that the end of the chain code string continues to the beginning of the chain code string as in the first embodiment, the outer boundary pixels are similar to those shown in FIGS. Is "234", "4
56 ”,“ 012 ”, and“ 670 ”, which are“ 2244 ”and“ 44 ”.
By changing them to "66", "0022", and "6600", a clear expression of a right angle portion is performed in the same manner as in the first embodiment.

この実施例においても、前記実施例と同様、直角の一
辺の長さが一定以上のときにのみ直角部として処理し、
逆に一定値以下のときに直角部としての処理を行わない
ようにし得ることはいうまでもない。
In this embodiment, as in the previous embodiment, the right angle is processed as a right angle only when the length of one side of the right angle is equal to or more than a certain value,
Conversely, it is needless to say that the processing as the right angle portion may not be performed when the value is equal to or less than the predetermined value.

ここでチェーンコード列の生成方法の一例を示す。チ
ェーンコード列の生成に際してはまずその最初の境界画
素を発見しなければならないが、走査方向を限定すれば
周囲の画素の状況により外側、内側の最初の境界画素を
識別し得る。
Here, an example of a method of generating a chain code string will be described. When generating a chain code string, the first boundary pixel must first be found, but if the scanning direction is limited, the outer and inner first boundary pixels can be identified depending on the situation of surrounding pixels.

走査方向を左から右、上から下の通常の走査方向とし
たとき、第19図に示すように、上方および左方に画素が
存在しない境界画素aを外側の最初の境界画素として採
用でき、第20図に示すように、左下に画素が存在しかつ
下方に画素が存在しない境界画素aを最初の境界画素と
して採用し得る。
When the scanning direction is a normal scanning direction from left to right and from top to bottom, as shown in FIG. 19, a boundary pixel a having no pixels on the upper and left sides can be adopted as an outer first boundary pixel, As shown in FIG. 20, a boundary pixel a having a pixel at the lower left and having no pixel at the bottom can be adopted as the first boundary pixel.

最初の境界画素が発見されれば、前述のように、次の
境界画素が採り得るチェーンコードの値は一定範囲に限
定されるので、その範囲を反時計回りまたは時計回りに
順次境界画素を捜索する。ここに、外側境界画素に反時
計回りのチェーンコードを与えるときには、捜索方向も
反時計回りとなり、時計回りのチェーンコードならば捜
索方向も時計回りとなる。そして、内側境界画素のチェ
ーンコードの生成は外側境界画素と同じアルゴリズムで
処理し得る。すなわち1つ前の境界画素のチェーンコー
ドがkであるとき、kが偶数ならば、k−1の方向から
順次反時計回りに次の境界画素を捜し、最初に境界画素
が発見された方向をその境界画素のチェーンコードとす
れば、外側境界画素が反時計回りのチェーンコードが生
成される。そしてkが奇数のときはk−2の方向から順
次反時計回りに次の境界画素を捜すことになる。このア
ルゴリズムでは全画面を1回走査するだけで全てのチェ
ーンコードが生成でき高能率であり、また境界画素が外
側か内側かを識別し得るので、ベクトル化されたデータ
から図形を再現し、その図形を塗りつぶす際の有力な情
報を得ることができる。次に、より一般的なチェーンコ
ード列からベクトルポイントを選択する場合について説
明する。
If the first boundary pixel is found, as described above, the value of the chain code that can be taken by the next boundary pixel is limited to a certain range, so that the boundary pixel is searched in the counterclockwise or clockwise order. I do. Here, when a counterclockwise chain code is given to the outer boundary pixel, the search direction is also counterclockwise, and if the clock code is a clockwise chain code, the search direction is also clockwise. The generation of the chain code of the inner boundary pixel can be processed by the same algorithm as the outer boundary pixel. That is, if the chain code of the immediately preceding boundary pixel is k, and if k is an even number, the next boundary pixel is searched counterclockwise sequentially from the direction of k−1, and the direction in which the boundary pixel is first found is determined. If a chain code of the boundary pixel is used, a chain code in which the outer boundary pixel is counterclockwise is generated. When k is an odd number, the next boundary pixel is sequentially searched counterclockwise from the direction of k-2. In this algorithm, all chain codes can be generated by scanning the entire screen only once, and the efficiency is high.In addition, since it is possible to identify whether the boundary pixel is outside or inside, a figure is reproduced from the vectorized data, It is possible to obtain powerful information when painting a figure. Next, a case where a vector point is selected from a more general chain code string will be described.

第21図に示すように次々に異なるチェーンコードが与
えられた場合、図形的には複雑な凹凸が発生する。そし
てこれを表現するには全ての境界画素をベクトルポイン
トとして採用すべきである。しかし、同様に次々とチェ
ーンコードが変化するときでも、第22図に示すように
「5」,「4」とチェーンコードが「1」だけ減少して
いる場合(画素a,b)には、すなわちチェーンコードが
k,k−1と変化したときには、k−1の画素を採用しな
い方がよいこともある。すなわち、k,k−1,…のチェー
ンコード列は1画素偏位してから2画素以上の直線が続
く図形を意味し、k−1の画素の次の画素c(チェーン
コード「6」)を採用した方が、微妙な凹部を消去し、
かつベクトルポイントを最小限に抑えつつベクトル化を
行うことができる。この方式を採用する場合、あるチェ
ーンコードkの次にチェーンコードk′が、 k′≠kかつk′≠k−1 であるときに、k′の画素をベクトルポイントとして採
用する。このアルゴリズムは前述の凸の直角の角をベク
トルポイントとするアルゴリズムを包含する適用範囲の
広いものである。
When different chain codes are given one after another as shown in FIG. 21, complicated irregularities are generated graphically. To express this, all boundary pixels should be adopted as vector points. However, similarly, even when the chain code changes one after another, as shown in FIG. 22, when the chain code decreases by “1” to “5” and “4” (pixels a and b), That is, the chain code
When it changes to k, k-1, it may be better not to use the pixel of k-1. That is, the chain code sequence of k, k−1,... Means a figure in which a straight line of two or more pixels is displaced by one pixel, and the pixel c next to the pixel of k−1 (chain code “6”) If you adopt, erase the subtle recesses,
Vectorization can be performed while minimizing vector points. When this method is adopted, when a chain code k 'is k' ≠ k and k '≠ k-1 next to a certain chain code k, the pixel of k' is adopted as a vector point. This algorithm has a wide range of applications including the above-described algorithm in which a right angle of a convex is set as a vector point.

またk′=k−1でありかつその後にk−1が続く場
合(第23図),k−1の連続の後の最初の他のチェーンコ
ードの画素b(5,4,4,4,4,と変化した画素)をベクト
ルポイントとする。すなわち、 k,k−1,k−1,…,k−1,k′ のチェーンコード列において、 k′≠k−1 のときk′の画素をベクトルポイントとして採用する。
If k ′ = k−1 and k−1 follows (FIG. 23), the pixel b (5, 4, 4, 4, 4, Pixels changed to 4, 6 ) are defined as vector points. That is, in the chain code sequence of k, k−1, k−1,..., K−1, k ′, when k ′ ≠ k−1, the pixel of k ′ is adopted as a vector point.

ここに一定のチェーンコードの連続は図形的には直線
を意味するが、直線に関してはその両端の画素をベクト
ルポイントとして採用すれば正確に図形を再現し得るこ
とは明らかである。第24図はチェーンコード「…5,5,5,
5」の直線の後にチェーンコード「6,6…」の直線が続く
境界画素群を示しており、チェーンコード「5」の直線
の始点は画素aであり、終点はチェーンコードが「6」
に変化した画素bである。ここに画素aについてはそれ
以前の画素の状況により、ベクトルポイントとして採用
すべきでない場合も有り得るが、画素bについては、チ
ェーンコード「5」の直線の終点でありかつチェーンコ
ード「6」の直線の始点であるため、採用すべきことは
明らかである。すなわち、連続したチェーンコードの後
に再び連続したチェーンコードが続くとき、チェーンコ
ードが変化した画素bはベクトルポイントとして採用す
べきである。第25図はチェーンコード「5」の直線の後
に1画素の凹部が存在する場合であるが、同様にチェー
ンコードが変化した画素aが凹部の底部となり、ベクト
ルポイントとして採用し得る。
Here, the continuation of a constant chain code graphically means a straight line, but it is clear that a graphic can be accurately reproduced by adopting pixels at both ends of the straight line as vector points. Fig. 24 shows the chain code "… 5,5,5,
A boundary pixel group in which a straight line of a chain code “6, 6...” Follows a straight line of a “5”, and the start point of the straight line of the chain code “5” is a pixel a, and the end point is a chain code of “6”
The pixel b has changed to. Here, the pixel a may not be adopted as a vector point depending on the situation of the previous pixel, but the pixel b is the end point of the straight line of the chain code “5” and the straight line of the chain code “6”. It is obvious that it should be adopted because it is the starting point. That is, when a continuous chain code is again followed by a continuous chain code, the pixel b in which the chain code has changed should be adopted as a vector point. FIG. 25 shows a case where a one-pixel concave portion exists after the straight line of the chain code "5". Similarly, the pixel a in which the chain code has changed becomes the bottom of the concave portion and can be adopted as a vector point.

ただし、第26図に示すように、チェーンコード「5」
の直線の後に、「4」が1つだけ存在するとき、すなわ
ち、 k,k,k,…,k−1,k′ のチェーンコード列において、 k′≠k−1 のとき、第22図、第23図で説明したのと同様k−1の画
素aはベクトルポイントとして採用せず、k′の画素b
をベクトルポイントとして採用し得る。
However, as shown in FIG. 26, the chain code "5"
When only one “4” exists after the straight line of, that is, when k ′ ≠ k−1 in the chain code sequence of k, k, k,..., K−1, k ′, FIG. 23, the pixel a of k-1 is not adopted as a vector point and the pixel b of k '
Can be adopted as a vector point.

一方第27図に示すように、チェーンコード「5」の直
線の後に、さらに「4」の直線が続くとき、すなわち、 k,k,k,…,k,k−1,k−1,…,k−1 のチェーンコード列においては、第24図で説明したのと
同様、最初のk−1の画素bをベクトルポイントとして
採用し得る。以上をまとめると、次のとおりとなる。
On the other hand, as shown in FIG. 27, when the straight line of “4” continues after the straight line of the chain code “5”, that is, k, k, k,..., K, k−1 , k−1,. , k−1, the first k−1 pixel b can be used as a vector point, as described with reference to FIG. The above is summarized as follows.

i)k1,k2,k3の相異なるチェーンコードよりなるチェー
ンコード列において、 k2≠k1−1 ならばk2 をベクトルポイントとして採用し得る。また k2=k−1 ならばk3 をベクトルポイントとして採用し得る。
i) In a chain code string composed of different chain codes of k 1 , k 2 and k 3 , k 2 can be adopted as a vector point if k 2 ≠ k 1 -1. If k 2 = k−1, k 3 can be adopted as a vector point.

ii)k1,k1,k1,…,k1,k2,k3(k1≠k2かつk2≠k3かつk3
k1)のチェーンコード列において、 k2≠k1−1 ならばk2をベクトルポイントとして採用し得る。また k2=k1−1 ならばk3をベクトルポイントとして採用し得る。
ii) k 1 , k 1 , k 1 ,…, k 1 , k 2 , k 3 (k 1 ≠ k 2 and k 2 ≠ k 3 and k 3
In the chain code train of k 1), it may be adopted k 2 ≠ k 1 -1 if k 2 as a vector point. If k 2 = k 1 −1, k 3 can be adopted as the vector point.

iii)k1,k2 ,k2,k2,…,k3(k1≠k2かつk2≠k3かつk3
k1)のチェーンコード列において、 k2≠k1−1 ならば最初のk2をベクトルポイントとして採用し得る。
また k2=k1−1 ならばk3をベクトルポイントとして採用し得る。
iii) k 1 , k 2 , k 2 , k 2 ,…, k 3 (k 1 ≠ k 2 and k 2 ≠ k 3 and k 3
In the chain code sequence of k 1 ), if k 2 ≠ k 1 −1, the first k 2 can be adopted as a vector point.
If k 2 = k 1 −1, k 3 can be adopted as the vector point.

iv)k1,k1,k1,…,k1,k2 ,k2,k2,k3(k1≠k2かつk2≠k3
つk3≠k1)のチェーンコード列においては最初のk2をベ
クトルポイントとして採用し得る。
iv) A chain code sequence of k 1 , k 1 , k 1 ,..., k 1 , k 2 , k 2 , k 2 , k 3 (k 1 ≠ k 2 and k 2 ≠ k 3 and k 3 ≠ k 1 ) In, the first k 2 may be adopted as the vector point.

このようなアルゴリズムの他に、iii),iv)に対する
例外として、以下のアルゴリズムを採用するとよりベク
トルポイントを減少しつつ、正確な図形の再現を行い得
る。
In addition to such algorithms, as exceptions to iii) and iv), if the following algorithm is adopted, accurate graphic reproduction can be performed while reducing the number of vector points.

v)第28図は「445」のチェーンコード列が繰返し生じ
る図形を示している。このように、kと(k+1)また
は(k−1)との組合せのチェーンド列が繰返し生じる
場合、一定周期の階段状の図形を意味し、大局的に見れ
ばこれらは同図に示す直線lで表現できる。従って階段
の最初と最後の段の先端の画素a,bのみをベクトルポイ
ントとすれば最小限のデータ量で図形を正確に表現し得
る。
v) FIG. 28 shows a figure in which a chain code string of “445” is repeatedly generated. As described above, when a chained combination of k and (k + 1) or (k-1) repeatedly occurs, it means a step-like figure having a fixed period, and these are straight lines shown in FIG. It can be expressed by l. Therefore, if only the pixels a and b at the top of the first and last steps of the stairs are used as vector points, a figure can be accurately represented with a minimum amount of data.

第30図は第28図の図形の逆の傾きをもった図形であ
り、「443」のチェーンコード列が繰返し生じ、第31図
は第29図の逆の傾をもった図形であり、「001」のチェ
ーンコード列が繰返し生じている。これらについても同
様に1直線lで表現でき、最初と最後の段の先端の画素
をベクトルポイントとして採用し得る。
FIG. 30 is a figure having the reverse inclination of the figure of FIG. 28, a chain code string of “443” is repeatedly generated, and FIG. 31 is a figure having the opposite inclination of FIG. A chain code string of “001” is repeatedly generated. These can be similarly expressed by one straight line l, and the leading pixels of the first and last stages can be adopted as vector points.

以上は緩やかな勾配の階段状図形に関するものであっ
たが、急な勾配の階段状図形は第32図〜第35図のように
なる。
The above description relates to a step-shaped figure having a gentle slope, but a step-shaped figure having a steep slope is as shown in FIGS.

第32図は「665」のチェーンコード列が繰返し生じる
階段状図形であり、第33図は「667」のチェーンコード
列が繰返し生じる階段状図形であり、第34図は「223」
のチェーンコード列が繰返し生じる階段状図形であり、
第35図は「221」のチェーンコード列が繰返し生じる階
段状図形である。これらの図形においては、図形の境界
が上向き(右斜め上向き、または左斜め上向き)のとき
には各段の上端の画素をベクトルポイントとすべきであ
り、下向き(右斜め下向き、または左斜め下向き)のと
きは各段の下端の画素をベクトルポイントとすべきであ
る。
FIG. 32 is a stepped figure in which a chain code string of “665” is repeatedly generated, FIG. 33 is a stepped figure in which a chain code string of “667” is repeatedly generated, and FIG. 34 is “223”.
Is a step-like figure in which the chain code sequence of
FIG. 35 is a step-like figure in which a chain code string of “221” is repeatedly generated. In these figures, when the boundary of the figure is upward (diagonally right upward or diagonally left upward), the pixel at the upper end of each stage should be set as a vector point. At that time, the pixel at the lower end of each stage should be the vector point.

以上を総括すると以下のとおりとなる。 The above is summarized as follows.

k,…,k,k−1 のチェーンコード列の組が繰返し生じるとき、最初と最
後のチェーンコード列の組における最初の「k」の画素
(アンダーラインを付して示す。)をベクトルポイント
として採用すべきであり、 k,…,k,k+1 のチェーンコード列の組が繰返し生じるとき、最初と最
後のチェーンコード列の組における「k+1]の画素
(アンダーラインを付して示す。)をベクトルポイント
として採用すべきである。
When a set of k,..., k, k−1 chain code strings repeatedly occurs, the first “k” pixel (indicated by underlining) in the first and last chain code string sets is represented by a vector point. When a set of k,..., K, k + 1 chain code strings occurs repeatedly, the pixel of “k + 1” in the first and last chain code string sets is shown (underlined). Should be taken as the vector point.

これら一般化されたアルゴリズムは穴の内周の処理に
も同様に適用でき、また逆回りの穴の内周の処理にも同
様に適用でき、また逆回りのチェーンコードを用いる場
合については、チェーンコードの増減判断を逆転させれ
ば同様に処理可能であり、チェーンコードと等価な符合
を用いた場合にも処理自体も等価なものとなることはい
うまでもない。
These generalized algorithms can be applied to the inner circumference of a hole in the same way, and can be applied to the inner circumference of a counterclockwise hole as well. The same processing can be performed by reversing the code increase / decrease determination, and it goes without saying that the processing itself is also equivalent when a code equivalent to the chain code is used.

以上のようにチェーンコードまたはこれと等価な符合
から図形の輪郭の折曲状態を判定してベクトルポイント
を抽出すれば、複雑な角度演算など要することなくベク
トルデータを生成でき、しかも用途に応じて適宜高品質
の図形を再現し得る。
As described above, if the bent state of the outline of the figure is determined from the chain code or a code equivalent thereto and the vector points are extracted, vector data can be generated without the need for complicated angle calculations and the like. High quality figures can be reproduced as appropriate.

〔発明の効果〕〔The invention's effect〕

前述のとおり、この発明に係る図形のベクトル化方法
は、フリーマンのチェーンコードまたはこれと等価な符
号が図形の輪郭の折曲状態を反映していることに着目
し、このような符号のみから直接折曲状態を判定し、こ
の判定に基づいて境界画素またはその近傍の画素からベ
クトルポイントを選択するので、高品質の図形を再現し
得るベクトルデータを実相的処理時間で生成し得るとい
う優れた効果を有する。
As described above, the graphic vectorization method according to the present invention focuses on the fact that Freeman's chain code or a code equivalent thereto reflects the bent state of the outline of the graphic, and directly uses only such a code. Since the bent state is determined and a vector point is selected from the boundary pixel or a pixel in the vicinity thereof based on the determination, an excellent effect that vector data capable of reproducing a high-quality figure can be generated in a substantial processing time. Having.

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

第1図はフリーマンのチェーンコードを示す概念図、第
2図は具体的図形に反時計方向のチェーンコードを付し
た状態を示す概念図、第3図は1画素に2つのチェーン
コードが対応する例を示す概念図、第4図は凸部を示す
概念図、第5図は凹の直角部の処理態様を示す概念図、
第6図は凸の直角部の処理態様を示す概念図、第7図〜
第18図はさらに詳細に直角部の処理を示すものであり、
第7図(a)、第8図(a)、第9図(a)、第10図
(a)は第一実施例における凹の直角部にチェーンコー
ドを付した状態を示す概念図、第7図(b),第8図
(b),第9図(b),第10図(b)は同実施例により
処理されたチェーンコードを示す概念図、第11図は傾斜
した直角部を示す概念図、第12図(a)は同実施例によ
り内側境界画素にチェーンコードを付した状態を示す概
念図、第12図(b)は同実施例により処理された内側境
界画素のチェーンコードを示す概念図、第13図〜第16図
は第二実施例による第7図〜第10図と同様の図形の処理
を示す概念図、第17図は同実施例による内側境界画素の
処理例を示す概念図、第18図は細かい階段状の境界を示
す概念図、第19図は外側境界画素のチェーンコード生成
方法を示す概念図、第20図は内側境界画素のチェーンコ
ード生成方法を示す概念図、第21図〜第28図はより一般
化された処理方法を示すものであり、第21図は次々に異
なるチェーンコードが存在する図形を示す概念図、第22
図はあるチェーンコードの後にそれより「1」小さいチ
ェーンコードが続く図形を示す概念図、第23図は始端に
1画素以下の偏位のある直線部を示す概念図、第24図は
2つの直線より構成される角部を示す概念図、第25図は
1画素の凹部を示す概念図、第26図は終端に1画素以下
の偏位のある直線部を示す概念図、第27図は2つの直線
より構成される隅部を示す概念図、第28図〜第35図は一
定周期の階段状部を示す概念図である。 a,b,b1,b2,b3,c,c1,c2,c3,c4,c5,d,e,a1,a2,a3,a4……
境界画素 F……図形 l,l′……直線。
FIG. 1 is a conceptual diagram showing a Freeman chain code, FIG. 2 is a conceptual diagram showing a state where a counterclockwise chain code is added to a specific figure, and FIG. 3 is a diagram in which two chain codes correspond to one pixel. FIG. 4 is a conceptual diagram showing an example, FIG. 4 is a conceptual diagram showing a convex portion, FIG.
FIG. 6 is a conceptual diagram showing a processing mode of a convex right angle portion, and FIGS.
FIG. 18 shows the processing of the right-angled part in more detail,
FIGS. 7 (a), 8 (a), 9 (a) and 10 (a) are conceptual diagrams showing a state in which a chain cord is attached to a concave right-angled portion in the first embodiment. FIGS. 7 (b), 8 (b), 9 (b), and 10 (b) are conceptual diagrams showing a chain cord processed according to the embodiment, and FIG. 11 shows an inclined right angle portion. FIG. 12 (a) is a conceptual diagram showing a state where a chain code is added to an inner boundary pixel according to the embodiment, and FIG. 12 (b) is a chain code of an inner boundary pixel processed according to the embodiment. FIG. 13 to FIG. 16 are conceptual diagrams showing the same graphic processing as in FIG. 7 to FIG. 10 according to the second embodiment, and FIG. 17 is an example of processing of inner boundary pixels according to the same embodiment. FIG. 18 is a conceptual diagram showing a fine stepwise boundary, FIG. 19 is a conceptual diagram showing a method of generating a chain code of outer boundary pixels, and FIG. 20 is an inner diagram. 21 to 28 show a more generalized processing method, and FIG. 21 is a conceptual diagram showing a graphic in which different chain codes exist one after another. , 22nd
FIG. 23 is a conceptual diagram showing a figure in which a certain chain code is followed by a chain code smaller by “1”, FIG. 23 is a conceptual diagram showing a straight portion having a deviation of 1 pixel or less at the start end, and FIG. FIG. 25 is a conceptual diagram showing a corner portion composed of a straight line, FIG. 25 is a conceptual diagram showing a concave portion of one pixel, FIG. 26 is a conceptual diagram showing a linear portion having a deviation of one pixel or less at the end, and FIG. FIG. 28 to FIG. 35 are conceptual diagrams showing a step portion having a constant period. a, b, b 1 , b 2 , b 3 , c, c 1 , c 2 , c 3 , c 4 , c 5 , d, e, a 1 , a 2 , a 3 , a 4 ……
Boundary pixel F ... Figure l, l '... Line.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】図形の境界画素を辿る順序で、境界画素の
チェーンコードを生成し、チェーンコードに、k、(k
−1)、(k−2)(k=0〜7。kは8を法とす
る。)の3符号の連続が存在したときには、このチェー
ンコードをk、k、(k−2)、(k−2)に改め、最
初の(k−2)をベクトルポイントとする図形のベクト
ル化方法。
1. A chain code of boundary pixels is generated in the order of tracing the boundary pixels of a figure, and k, (k
-1), (k-2) (k = 0 to 7; k is modulo 8), and if there is a continuation of three codes, this chain code is represented by k, k, (k-2), ( k-2), and a vectorization method of a figure using the first (k-2) as a vector point.
JP62226181A 1987-09-09 1987-09-09 How to vectorize shapes Expired - Fee Related JP2645373B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62226181A JP2645373B2 (en) 1987-09-09 1987-09-09 How to vectorize shapes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62226181A JP2645373B2 (en) 1987-09-09 1987-09-09 How to vectorize shapes

Publications (2)

Publication Number Publication Date
JPS6468889A JPS6468889A (en) 1989-03-14
JP2645373B2 true JP2645373B2 (en) 1997-08-25

Family

ID=16841155

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62226181A Expired - Fee Related JP2645373B2 (en) 1987-09-09 1987-09-09 How to vectorize shapes

Country Status (1)

Country Link
JP (1) JP2645373B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5666440A (en) * 1991-07-31 1997-09-09 Victor Company Of Japan, Ltd. Method and apparatus for extracting outline data from bi-level image data
JP5708305B2 (en) 2011-06-30 2015-04-30 富士通株式会社 Image recognition apparatus, image recognition method, and computer program for image recognition

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5927374A (en) * 1982-08-06 1984-02-13 Matsushita Electric Ind Co Ltd Boundary line tracking circuit
JPS61153785A (en) * 1984-12-26 1986-07-12 Ricoh Co Ltd Vertex detecting method
JPS62131382A (en) * 1985-12-04 1987-06-13 Dainippon Printing Co Ltd Vector conversion system for binary picture

Also Published As

Publication number Publication date
JPS6468889A (en) 1989-03-14

Similar Documents

Publication Publication Date Title
US5007098A (en) Vectorizing method
US7397972B2 (en) Image transform method for obtaining expanded image data, image processing apparatus and image display device therefor
JP4741977B2 (en) Handwritten character processing apparatus and handwritten character processing method
US8290308B2 (en) Program, apparatus and method for determining interpolation method
JPH0196771A (en) Recognizing system for circular arc part
JPS61100868A (en) Image expansion
US8164578B2 (en) Linear shape processing device, linear shape processing method, information recording medium, and program
JP2004166246A (en) Method and device for image forming
US4972330A (en) Clipping process and processor
JP3057935B2 (en) Character output device
JP2645373B2 (en) How to vectorize shapes
JP2645375B2 (en) How to vectorize shapes
JP5490360B2 (en) Method and recording medium for generating bolded anti-aliasing bitmap
US8861894B2 (en) Methods and apparatus for edge-aware pixel data generation
US20040174361A1 (en) Geometric and brightness modeling of images
JP2967107B2 (en) Image processing method
JP3034140B2 (en) Character generation method and device
JP2910344B2 (en) Image processing method
JPH1127540A (en) Image coding/decoding method and its system
JPS5914758B2 (en) character generator
KR900005901B1 (en) Data processes method for character picture
JPH0696199A (en) Device and method for input/output of logo illustration data
JPH11175662A (en) Method and device for recognizing pattern and recording medium recording program for allowing computer to execute the pattern recognizing method
JPH06101033B2 (en) Figure vectorization method
JPH0325827B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees