Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0789376B2 - Digital contour coding method - Google Patents
[go: Go Back, main page]

JPH0789376B2 - Digital contour coding method - Google Patents

Digital contour coding method

Info

Publication number
JPH0789376B2
JPH0789376B2 JP61147569A JP14756986A JPH0789376B2 JP H0789376 B2 JPH0789376 B2 JP H0789376B2 JP 61147569 A JP61147569 A JP 61147569A JP 14756986 A JP14756986 A JP 14756986A JP H0789376 B2 JPH0789376 B2 JP H0789376B2
Authority
JP
Japan
Prior art keywords
contour line
point
extraction
digital
pixel
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 - Lifetime
Application number
JP61147569A
Other languages
Japanese (ja)
Other versions
JPS633387A (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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP61147569A priority Critical patent/JPH0789376B2/en
Publication of JPS633387A publication Critical patent/JPS633387A/en
Publication of JPH0789376B2 publication Critical patent/JPH0789376B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 <産業上の利用分野> 本発明は、例えばファクシミリ等の入力装置から読み込
まれたディジタル図形の画像データにおけるディジタル
輪郭線の符号化方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION <Industrial field of application> The present invention relates to a method for encoding a digital contour line in image data of a digital figure read from an input device such as a facsimile.

<従来の技術> ファクシミリ等から読み込まれたディジタル図形におけ
る、黒画素領域の最外郭の部分である輪郭線を抽出する
ことは、そのディジタル図形の特徴を記述するためにき
わめて重要な2次元情報となる。このとき、大量のディ
ジタル輪郭線データを限られた記憶装置上に蓄積する、
あるいは伝送するためには、ディジタル輪郭線データに
符号化を施してデータ量を圧縮する必要がある。
<Prior Art> Extracting a contour line, which is the outermost portion of a black pixel area in a digital figure read from a facsimile or the like, is extremely important as two-dimensional information for describing the characteristics of the digital figure. Become. At this time, a large amount of digital contour line data is stored in a limited storage device,
Alternatively, for transmission, it is necessary to encode the digital contour line data and compress the data amount.

このようなディジタル輪郭線の符号化法として第8図
(a),(b)に表わす、Freemanのチェイン符号化法
が従来より知られている。
As a coding method for such a digital contour line, the Freeman chain coding method shown in FIGS. 8A and 8B is conventionally known.

この方法は、ディジタル輪郭線の1画素を中心として、
第8図(a)に示す矢印0〜7の8方向に画素を追跡
し、符号化を行なうものである。このチェイン符号は、
ディジタル輪郭線を構成する画素1個に対し、8個の記
号で表わされるので、1リンク(連結した2個の画素の
組)当たりの符号化ビット数は3ビットとなる。
This method is centered on one pixel of the digital contour line,
Pixels are tracked in the eight directions of arrows 0 to 7 shown in FIG. This chain code is
Since one pixel forming the digital contour is represented by eight symbols, the number of coding bits per link (a set of two connected pixels) is 3 bits.

例えば、第8図(b)に示すようなディジタル輪郭線の
符号化は、始点座標psより“007010776545654544233221
2"と表わされる。
For example, encoding of a digital contour line as shown in FIG. 8 (b) is performed by using the start point coordinate p s as “007010776545654544233221”.
Expressed as 2 ".

しかしながら、このようなチェイン符号化法では、例え
ば細かな曲折の少ない輪郭線を記述する場合等、ディジ
タル輪郭線を忠実に記述する必要のない場合に、ディジ
タル輪郭線を1画素ずつ符号化(3ビット)していくた
め無駄があり、符号化効率を1リンク当たり3ビット以
下に向上させることはできない。
However, in such a chain coding method, when it is not necessary to faithfully describe a digital contour line, for example, when describing a contour line with few small bends, the digital contour line is coded pixel by pixel (3 However, the coding efficiency cannot be improved to 3 bits or less per link.

<発明が解決しようとする問題点> 本発明が解決しようとする問題点は、ディジタル輪郭線
を忠実に記述する必要がない場合に、符号化効率を向上
させることであり、本発明の目的は、チェイン符号化法
より有効なディジタル輪郭線の符号化方法を実現するこ
とを目的とする。
<Problems to be Solved by the Invention> A problem to be solved by the present invention is to improve coding efficiency when it is not necessary to faithfully describe a digital contour line. The purpose of the present invention is to realize a more effective digital contour coding method than the chain coding method.

<問題を解決するための手段> 上記した問題を解決する本発明の概要は、次の通りであ
る。
<Means for Solving Problems> The outline of the present invention for solving the above problems is as follows.

ディジタル図形の画像データが格納された画像メモリ部
と、このディジタル図形の輪郭線抽出・符号化アルゴリ
ズムとこの符号化の結果を格納する主メモリ部と、レジ
スタ群を有し輪郭線抽出・符号化アルゴリズム及び数値
演算を実行するプロセッサ部とを具備し、輪郭線を忠実
に記述する必要のない場合のディジタル輪郭線の符号化
方法であって、 (イ)ディジタル図形の1点を始点として主メモリ部に
格納し1画素単位に順次追跡を行う工程と、 (ロ)追跡点の内より予め設定された画素抽出間隔に基
づいて抽出点を決定する工程と、 (ハ)前記画素抽出間隔をn(≧2)とするとき2k-1
n<2kを満足する正整数kを求めてこれよりセグメント
長d=k+1を前記主メモリ部に設定する工程と、 (ニ)現在の抽出点と1つ前の抽出点との差分ベクトル
を求めてそのX,Y成分を、前記画素抽出間隔nの値で決
定されるセグメント長dに対応するビット数で1つのセ
グメントとして主メモリ部内に格納する工程と、 (ホ)工程(ニ)を追跡点が始点に戻るまで繰り返す工
程と、 (ヘ)始点の座標、セグメントの数、セグメント長及び
各セグメントの差分ベクトルのX,Y成分からなる符号化
列のデータ・フォーマットをディジタル輪郭線の符号化
情報とする工程と を有することを特徴とするディジタル輪郭線の符号化方
法である。
An image memory unit in which image data of a digital figure is stored, a contour line extraction / encoding algorithm for this digital figure and a main memory unit for storing the result of this encoding, and a contour group extraction / encoding A method for encoding a digital contour line, which comprises an algorithm and a processor for executing a numerical operation, and which does not need to faithfully describe the contour line, including: (a) a main memory starting from one point of a digital figure. And (b) determining an extraction point based on a preset pixel extraction interval from the tracking points, and (c) setting the pixel extraction interval to n. When (≧ 2), 2 k-1
a step of obtaining a positive integer k satisfying n <2 k and setting a segment length d = k + 1 in the main memory section from this, (d) a difference vector between the current extraction point and the previous extraction point The step of obtaining and storing the X and Y components in the main memory unit as one segment with the number of bits corresponding to the segment length d determined by the value of the pixel extraction interval n, and (e) step (d) Repeat the process until the trace point returns to the starting point, and (f) set the data format of the coded sequence consisting of the coordinates of the starting point, the number of segments, the segment length and the X and Y components of the difference vector of each segment to the digital contour code. And a step of converting the information into encoded information.

<作用> 本発明のディジタル輪郭線の符号化方法は、1画素単位
に順次追跡を行ない、予め設定された画素抽出間隔に基
づいて抽出点を決定し、現在の抽出点と1つ前の抽出点
との差分ベクトルを求めてそのX,Y成分をディジタル輪
郭線の符号化情報とする。
<Operation> According to the digital contour line encoding method of the present invention, tracing is sequentially performed on a pixel-by-pixel basis, the extraction point is determined based on a preset pixel extraction interval, and the current extraction point and the previous extraction point are extracted. The difference vector with respect to the point is obtained, and its X and Y components are used as the coded information of the digital contour line.

<実施例> 本発明の方法を実現するのに好適な装置の例を第1図に
構成ブロック図として示す。
<Example> An example of an apparatus suitable for implementing the method of the present invention is shown in FIG. 1 as a structural block diagram.

この図において、1はファクシミリ等の入力装置から読
み込まれたディジタル画像の図形データを格納する画像
メモリ部、2はディジタル輪郭線の抽出・符号化アルゴ
リズム及びその符号化結果等を格納する主メモリ部、3
は数値演算及びディジタル輪郭線の抽出・符号化アルゴ
リズムを実行するプロセッサ31とその結果を一時格納す
るレジスタ群32よりなるプロセッサ部であり、画像メモ
リ部1、主メモリ部2、プロセッサ部3はシステム・バ
スSBに相互に接続され、プロセッサ部3は画像メモリ部
1、主メモリ部2にアクセス可能である。
In the figure, 1 is an image memory unit for storing graphic data of a digital image read from an input device such as a facsimile, and 2 is a main memory unit for storing a digital contour line extraction / encoding algorithm and its encoding result. Three
Is a processor unit composed of a processor 3 1 for executing a numerical operation and a digital contour line extraction / encoding algorithm and a register group 3 2 for temporarily storing the result. The image memory unit 1, the main memory unit 2 and the processor unit 3 Are mutually connected to the system bus SB, and the processor unit 3 can access the image memory unit 1 and the main memory unit 2.

本発明が取り扱う対象は第4図に示すような画像メモリ
部1におけるディジタル画像のディジタル輪郭線であ
り、画面の左から右へX成分(0≦X≦M)、画面の上
から下へY成分(0≦Y≦N)を有し、各画素は座標
(X,Y)で参照できるものである。但し、X,Y,M,Nは非負
の整数である。
The object handled by the present invention is a digital contour line of a digital image in the image memory unit 1 as shown in FIG. 4, the X component (0 ≦ X ≦ M) from left to right of the screen, and Y from top to bottom of the screen. Each pixel has a component (0 ≦ Y ≦ N) and can be referred to by coordinates (X, Y). However, X, Y, M, N are non-negative integers.

次に、第5図(a),(b)を用いて本発明の符号化方
法の原理を説明する。
Next, the principle of the encoding method of the present invention will be described with reference to FIGS. 5 (a) and 5 (b).

従来の符号化法は第8図(a),(b)に示したよう
に、ディジタル輪郭線を1画素単位に追跡し、抽出して
符号化していたが、本発明の方法は第5図(a),
(b)に示すように、画素の追跡は1画素単位に行なう
が、抽出は予め設定された画素抽出間隔に基づいて行な
い(Ps,P1n,P2n,…Pl-1n)、現在の抽出点Pjnと1つ前
の抽出点Pj-1nとの差分ベクトルaj(a1,a2,…,al)を求
め、このX,Y成分(ΔXj,ΔYj)(1≦j≦l,P0n=Ps
を符号化情報として用いる。
As shown in FIGS. 8 (a) and 8 (b), the conventional encoding method traces the digital contour line on a pixel-by-pixel basis and extracts and encodes it. However, the method of the present invention is shown in FIG. (A),
As shown in (b), pixels are tracked in pixel units, but extraction is performed based on a preset pixel extraction interval (P s , P 1n , P 2n , ... P l-1n ). Of the difference vector a j (a 1 , a 2 , ..., a l ) between the extraction point P jn of P jn and the previous extraction point P j-1n, and this X, Y component (ΔX j , ΔY j ) ( 1 ≦ j ≦ l, P 0n = P s )
Is used as encoded information.

以下に、本発明のディジタル輪郭線の符号化方法の工程
手順(アルゴリズム)を第2図のフローチャートを用い
て詳しく説明する。
The procedure (algorithm) of the digital contour coding method of the present invention will be described in detail below with reference to the flowchart of FIG.

(1)はじめに、画像メモリ部1上をスキャンして、最
上行かつ最左側の黒画素の点をディジタル図形の輪郭線
上の1点として抽出し、始点Psとする。
(1) First, the image memory unit 1 is scanned to extract the black pixel point on the uppermost line and the leftmost side as one point on the contour line of the digital figure, and set it as the starting point P s .

(2)始点Psの座標値(Xs,Ys)をレジスタRXs,RYsにそ
れぞれ格納するとともに、主メモリ部2に格納する。
(2) The coordinate values (X s , Y s ) of the starting point P s are stored in the registers RX s and RY s , respectively, and are also stored in the main memory unit 2.

(3)ディジタル輪郭線の画素抽出間隔をn(≧2)と
するとき、2K-1≦n<2kを満足する正整数kを求め、セ
グメント長d=k+1として主メモリ部2に格納する。
(3) When the pixel sampling interval of a digital contour and n (≧ 2), stores the positive integer k that satisfies the 2 K-1 ≦ n <2 k determined, as the segment length d = k + 1 in the main memory section 2 To do.

(4)レジスタRXs,RYsの内容をレジスタRXa,RYaにそれ
ぞれセットする。
(4) The contents of the registers RX s and RY s are set in the registers RX a and RY a , respectively.

(5)レジスタiに初期値0をセットする。(5) The initial value 0 is set in the register i.

(6)セグメント数をカウントするレジスタlに初期値
0をセットする。
(6) The initial value 0 is set in the register 1 for counting the number of segments.

(7)レジスタCNTRに初期値n−1をセットする。nの
値は追跡点(画素)抽出間隔である。
(7) Set the initial value n-1 in the register CNTR. The value of n is the tracking point (pixel) extraction interval.

(8)点Pi(Xi,Yi)を輪郭線上の現在の追跡点とする
とき、次の追跡点Pi+1を求め、その座標値(Xi+1,
Yi+1)をレジスタRX,RYにそれぞれ格納する。この輪郭
線の抽出法は、従来の例に挙げた3×3のマスクを用い
る方法、2×2のマスクを用いる方法等があるが、ここ
では8連結の形で輪郭線を抽出するものとする。
(8) When the point P i (X i , Y i ) is the current tracking point on the contour line, the next tracking point P i + 1 is obtained and its coordinate value (X i + 1 ,
Y i + 1 ) is stored in registers RX and RY, respectively. This contour line extraction method includes a method using a 3 × 3 mask mentioned in the conventional example, a method using a 2 × 2 mask, and the like. Here, it is assumed that the contour line is extracted in the form of 8 connections. To do.

(9)レジスタiの内容に1を加算する。(9) Add 1 to the content of register i.

(10)レジスタRX,RYの内容からレジスタRXs,RYsの内容
を減算することにより、追跡点Pi+1と始点Psとの距離D
X,DYをそれぞれ求める。
(10) By subtracting the contents of registers RX s and RY s from the contents of registers RX and RY, the distance D between tracking point P i + 1 and start point P s
Calculate X and DY respectively.

(11)DX,DYの値をチェックし、DX=DY=0の場合
{Y}は(17)ステップに進み、DX=DY=0でない場合
{N}は(12)ステップに進む。
(11) Check the values of DX and DY. If DX = DY = 0, {Y} proceeds to step (17), and if DX = DY = 0, {N} proceeds to step (12).

(12)レジスタCNTRの内容から1を減算する。(12) Subtract 1 from the contents of register CNTR.

(13)レジスタCNTRの内容をチェックし、CNTR=0でな
い場合{N}は(8)ステップからの操作を繰り返し、
CNTR=0の場合{Y}は(14)ステップを実行する。
(13) Check the contents of register CNTR. If CNTR = 0, {N} repeats the operation from step (8),
When CNTR = 0, {Y} executes step (14).

(14)現在の抽出点Pi+1の座標値が格納されているレジ
スタRX,RYの内容から、前回の抽出点の座標値が格納さ
れているレジスタRXa,RYaの内容を減算し、現在の抽出
点と1つ前の抽出点との差分ベクトルai(ΔX,ΔY)を
求め、主メモリ部2に格納する。ここで、求めた差分ベ
クトルaiの成分ΔX,ΔYは各々(3ステップで求めたセ
グメント長dに対応するビット数で、主メモリ部2上に
て1つのセグメントとして格納する。
(14) Subtract the contents of registers RX a and RY a that store the coordinate values of the previous extraction point from the contents of registers RX and RY that store the coordinate values of the current extraction point P i + 1. , The difference vector a i (ΔX, ΔY) between the current extraction point and the previous extraction point is obtained and stored in the main memory unit 2. Here, the calculated components ΔX and ΔY of the difference vector a i are respectively stored in the main memory unit 2 as one segment with the number of bits corresponding to the segment length d calculated in three steps.

(15)現在の抽出点の座標値Pi+1が格納されているレジ
スタRX,RYの内容をレジスタRXa,RYaにそれぞれセットす
る。
(15) The contents of the registers RX and RY in which the coordinate values P i + 1 of the current extraction point are stored are set in the registers RX a and RY a , respectively.

(16)レジスタlの内容に1を加算し、ステップ(7)
からの操作を繰り返す。
(16) Add 1 to the contents of register l, and step (7)
Repeat the operation from.

一方、(11)において、DX=DY=0の場合{Y}は、デ
ィジタル輪郭線が閉じたことを意味し、(17)ステップ
を実行する。
On the other hand, in (11), if DX = DY = 0, {Y} means that the digital contour line is closed, and step (17) is executed.

(17)始点座標値Psが格納されているレジスタRXs,RYs
の内容から、最終抽出点の座標値が格納されているレジ
スタRXa,RYaの内容をそれぞれ減算することにより、最
後の抽出点との差分ベクトルのX,Y成分をそれぞれ求
め、主メモリ部1に格納する。但し、このとき、RX=RX
s,RY=RYsである。
(17) registers the start point coordinate value P s is stored RX s, RY s
The contents of registers RX a and RY a , which store the coordinate values of the final extraction point, are subtracted from the contents of to obtain the X and Y components of the difference vector from the last extraction point, and the main memory section Store in 1. However, at this time, RX = RX
s , RY = RY s .

(18)レジスタlの内容を1加算する。(18) Add 1 to the contents of register l.

(19)レジスタlの内容をセグメント数として主メモリ
部2に格納する。
(19) The content of the register 1 is stored in the main memory unit 2 as the number of segments.

(20)操作終了(END)。(20) Operation end (END).

以上の手順に従って本発明の方法は実行される。The method of the present invention is executed according to the above procedure.

このようにして、本発明の方法によって得られた符号化
列のデータ・フォーマットは第3図に示すようになる。
In this way, the data format of the coded sequence obtained by the method of the present invention is as shown in FIG.

符号化列は、ディジタル輪郭線の始点座標値Ps(Xs,
Ys),セグメント数l,セグメント長d(=k+1)及び
第1から第lまでの差分ベクトル(ΔXj,ΔYj)(j=
1,2,…,l)の値により構成される。また、差分ベクトル
(ΔXj,ΔYj)は、2の補数形式で表現される。
The coded sequence has the starting point coordinate value P s (X s , X s ,
Y s ), the number of segments l, the segment length d (= k + 1), and the difference vectors (ΔX j , ΔY j ) from the 1st to the 1st (j =
1,2, ..., l). Further, the difference vector (ΔX j , ΔY j ) is expressed in the two's complement format.

ここで、 始点座標値Psを表わす符号化ビット数をCs、 セグメント数lを表わす符号化ビット数をCl、 セグメント長dを表わす符号化ビット数をCd、 各セグメントの差分ベクトル(ΔXj,ΔYj)を表わす符
号化ビット数をCΔ とすると、本発明の方法によるl個のセグメントからな
るディジタル輪郭線の符号化ビット数Cは、 C=CS+Cl+Cd+CΔ・l で表わされる。
Here, the coded bit number representing the starting point coordinate value P s is C s , the coded bit number representing the segment number l is Cl, the coded bit number representing the segment length d is Cd, and the difference vector (ΔX j , ΔY j ), where C Δ is the number of coding bits representing the digital contour line consisting of 1 segment according to the method of the present invention, C = C S + C l + C d + C Δ · l It is represented by.

また、CΔ=2dであるから、 C=CS+Cl+Cd+2d・l となる。一般に、 CS+Cl+Cd≪2d・l であるから、 C≒2d・l となる。Also, since C Δ = 2d, C = C S + C l + C d + 2d · l. Generally, since C S + C l + C d << 2d · l, C≈2d · l.

一方、ディジタル輪郭線の総構成画素数をL、Lを表わ
す符号化ビット数をCLとすると、従来のチェイン符号化
法の符号化ビット数Cfは、 Cf=CS+CL+3L で表わされ、一般に、 CS+CL≪3L であるから、 Cf≒3L となる。
On the other hand, if the total number of pixels constituting the digital contour line is L and the number of coded bits representing L is C L , the number of coded bits C f of the conventional chain coding method is C f = C S + C L + 3L It is expressed, and in general, C S + C L << 3L, so C f ≈3L.

ここに、 l≒L/n(2k-1≦n<2k,d=k+1) であるから、チェイン符号化法と、本発明の方法による
符号化ビット数の比C/Cfは、 C/Cf≒2d・l/3L =2d/3n =2(k+1)/3n となる。
Here, since 1≈L / n (2 k−1 ≦ n <2 k , d = k + 1), the chain coding method and the coding bit ratio C / C f according to the method of the present invention are C / C f ≈2d · l / 3L = 2d / 3n = 2 (k + 1) / 3n.

例えば、n=3の場合、d=3であるから、 C/Cf=2/3 となり、チェイン符号化法と本発明の方法による符号化
法とを比較すると、符号化ビット数を2/3程度に圧縮す
ることができる。
For example, when n = 3, since d = 3, C / C f = 2/3, and when the chain coding method and the coding method according to the present invention are compared, the number of coding bits is 2 /. It can be compressed to about 3.

即ち、1リンク当たりの符号化ビット数を従来必要であ
った3ビットから2ビット程度に圧縮することができ
る。
That is, the number of coded bits per link can be compressed from the conventionally required 3 bits to about 2 bits.

第6図(a),(b)に本発明の方法を実際に用いて差
分ベクトルを求めた抽出例を表わす。
6 (a) and 6 (b) show an example of extraction in which the difference vector is obtained by actually using the method of the present invention.

第6図(a)はディジタル輪郭線に対して、始点P
s(Xs,Ys)より抽出間隔n=3とし、抽出点P13,P23,
…,P113を求め、更にこれらの抽出点の差分ベクトルa1,
a2,…,a12を求めた例である。
Fig. 6 (a) shows the starting point P for the digital contour line.
The extraction interval n = 3 from s (X s , Y s ) and the extraction points P 13 , P 23 ,
…, P 113 is obtained, and the difference vector a 1 ,
This is an example in which a 2 , ..., A 12 are obtained.

第6図(a)で求めた各差分ベクトルの成分の値は、主
メモリ部2内に第6図(b)示すデータ・フォーマット
で格納される。
The values of the components of each difference vector obtained in FIG. 6 (a) are stored in the main memory unit 2 in the data format shown in FIG. 6 (b).

即ち、始点座標値Ps(Xs,Ys)、セグメント数l=12、
セグメント長d=3、差分ベクトルaj(j=1,2,…,1
2)のX,Y成分の値より構成される。但し、差分ベクトル
の各成分の値は2の補数形式で表わされる。
That is, the starting point coordinate value P s (X s , Y s ), the number of segments l = 12,
Segment length d = 3, difference vector a j (j = 1,2, ..., 1
It is composed of the values of the X and Y components of 2). However, the value of each component of the difference vector is represented in 2's complement format.

次に、この符号化情報に従って、復号を行なった結果を
第7図に示す。
Next, FIG. 7 shows the result of decoding according to this coding information.

復号は、始点座標Ps(Xs,Ys)を出発点としてセグメン
ト長dより差分ベクトルajのX,Y成分をセグメント数l
だけ、順次切り出して、その都度差分ベクトルより近似
ベクトルを計算してこの近似ベクトルに対応する線図形
を輪郭線として再現すれば良い。
Decoding is performed by using the starting point coordinates P s (X s , Y s ) as a starting point and calculating the X and Y components of the difference vector a j from the segment length d by the number of segments l.
However, it is only necessary to sequentially cut out, calculate the approximate vector from the difference vector each time, and reproduce the line figure corresponding to this approximate vector as the contour line.

第7図において、それぞれのブロックは輪郭線として再
現したものであり、点線で示すブロックは原図形の画素
を表わし、斜線を施したブロックは原図形からずれた画
素を表わしている。
In FIG. 7, each block is reproduced as a contour line, a block indicated by a dotted line represents a pixel of the original figure, and a shaded block represents a pixel displaced from the original figure.

以上のように、本発明の方法によれば、ディジタル輪郭
線を忠実に記述する必要がない場合に、符号化ビット数
を削減することができる。
As described above, according to the method of the present invention, the number of coding bits can be reduced when it is not necessary to faithfully describe a digital contour line.

<発明の効果> 本発明のディジタル輪郭線の符号化方法は、1画素単位
に順次追跡を行ない、予め設定された画素抽出間隔に基
づいて抽出点を決定し、現在の抽出点と1つ前の抽出点
との差分ベクトルを求めてそのX,Y成分をディジタル輪
郭線の符号化情報とするので、ディジタル輪郭線を忠実
に記述する必要がない場合に符号化効率を向上させるこ
とができる。
<Effects of the Invention> According to the digital contour line encoding method of the present invention, tracking is sequentially performed pixel by pixel, the extraction point is determined based on a preset pixel extraction interval, and the current extraction point and the previous extraction point are determined. Since the X and Y components of the difference vector with respect to the extraction point are obtained and used as the coding information of the digital contour line, the coding efficiency can be improved when it is not necessary to faithfully describe the digital contour line.

本発明によれば、画素抽出間隔nより2k-1≦n<2kとな
る整数kを求めてセグメント長d=k+1を決定して、
差分ベクトルのX,Y成分をそれぞれこのビット長さdで
格納するため、値dで決まる符号化列のデータ・フォー
マットの長さは画素抽出間隔nに対応した符号化情報と
することができ、従来のチェイン符号化方法よりも符号
化効率の高い符号化方法を実現できる。
According to the present invention, the segment length d = k + 1 is determined by obtaining the integer k that satisfies 2 k −1 ≦ n <2 k from the pixel extraction interval n.
Since each of the X and Y components of the difference vector is stored with the bit length d, the length of the data format of the encoded string determined by the value d can be the encoded information corresponding to the pixel extraction interval n, A coding method having higher coding efficiency than the conventional chain coding method can be realized.

更に、画素抽出間隔nを大きくすればもとのディジタル
輪郭線を粗く近似でき、画素抽出間隔nを小さくすれば
もとのディジタル輪郭線を細かく近似することができ
る。このように、ディジタル輪郭線の複雑さ、または所
望の近似度に応じた差分ベクトルによる符号化方法を実
現できる。
Further, if the pixel extraction interval n is increased, the original digital contour line can be roughly approximated, and if the pixel extraction interval n is decreased, the original digital contour line can be finely approximated. In this way, it is possible to realize the encoding method using the difference vector according to the complexity of the digital contour line or the desired degree of approximation.

例えば、画素を追跡する際の画素抽出間隔を3とすれ
ば、1リンク(連結した2つの画素の組)当たりのビッ
ト数を3ビットから2ビット程度に圧縮できる。
For example, if the pixel extraction interval when tracking pixels is 3, the number of bits per link (set of two connected pixels) can be compressed from 3 bits to about 2 bits.

また、復号は、始点座標、セグメント数、セグメント
長、差分ベクトルの情報より近似ベクトルに対応する線
図形を再現することにより、簡単に行なうことができ
る。
The decoding can be easily performed by reproducing the line figure corresponding to the approximate vector from the information of the starting point coordinates, the number of segments, the segment length, and the difference vector.

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

第1図は本発明のディジタル輪郭線の符号化方法を実施
するための装置の構成ブロック図、第2図は本発明のデ
ィジタル輪郭線の符号化方法の工程手順(アルゴリズ
ム)を表わすフローチャート、第3図は本発明の方法に
よって得られたデータのフォーマットを表わす図、第4
図は本発明の方法が対象とする図形を表わす図、第5図
(a),(b)は本発明の方法の原理を説明するための
図、第6図(a),(b)は本発明の方法を実際の図形
に適用した際の図、第7図は本発明の方法によって得ら
れたデータにより復号を行なった結果を表わす図、第8
図(a),(b)は従来のチェイン符号化法を説明する
ための図である。 1……画像メモリ部、2……主メモリ部、3……プロセ
ッサ部、31……プロセッサ、32……レジスタ群。
FIG. 1 is a block diagram showing the configuration of an apparatus for carrying out the method for coding a digital contour line according to the present invention, and FIG. 2 is a flow chart showing a process procedure (algorithm) of the method for coding a digital contour line according to the present invention. FIG. 3 is a diagram showing the format of data obtained by the method of the present invention, FIG.
The figure shows a figure which is a target of the method of the present invention, FIGS. 5 (a) and 5 (b) are diagrams for explaining the principle of the method of the present invention, and FIGS. 6 (a) and 6 (b) are FIG. 7 is a diagram when the method of the present invention is applied to an actual figure, FIG. 7 is a diagram showing a result of decoding using data obtained by the method of the present invention, and FIG.
(A), (b) is a figure for demonstrating the conventional chain encoding method. 1 ... Image memory unit, 2 ... Main memory unit, 3 ... Processor unit, 3 1 ... Processor, 3 2 ... Register group.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06F 15/66 410 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI technical display location G06F 15/66 410

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】ディジタル図形の画像データが格納された
画像メモリ部と、このディジタル図形の輪郭線抽出・符
号化アルゴリズムとこの符号化の結果を格納する主メモ
リ部と、レジスタ群を有し前記輪郭線抽出・符号化アル
ゴリズム及び数値演算を実行するプロセッサ部とを具備
し、前記輪郭線を忠実に記述する必要のない場合のディ
ジタル輪郭線の符号化方法であって、 (イ)前記ディジタル図形の1点を始点として前記主メ
モリ部に格納し1画素単位に順次追跡を行う工程と、 (ロ)追跡点の内より予め設定された画素抽出間隔に基
づいて抽出点を決定する工程と、 (ハ)前記画素抽出間隔をn(≧2)とするとき2k-1
n<2kを満足する正整数kを求めてこれよりセグメント
長d=k+1を前記主メモリ部に設定する工程と、 (ニ)現在の抽出点と1つ前の抽出点との差分ベクトル
を求めてそのX,Y成分を、前記画素抽出間隔nの値で決
定される前記セグメント長dに対応するビット数で1つ
のセグメントとして前記主メモリ部内に格納する工程
と、 (ホ)前記工程(ニ)を追跡点が前記始点に戻るまで繰
り返す工程と、 (ヘ)前記始点の座標、前記セグメントの数、前記セグ
メント長及び各セグメントの差分ベクトルのX,Y成分か
らなる符号化列のデータ・フォーマットをディジタル輪
郭線の符号化情報とする工程と を有することを特徴とするディジタル輪郭線の符号化方
法。
1. An image memory unit in which image data of a digital figure is stored, a contour line extraction / encoding algorithm for the digital figure, a main memory unit for storing a result of the encoding, and a register group. A method of encoding a digital contour line, comprising: a contour line extraction / encoding algorithm and a processor unit that executes a numerical operation, wherein the contour line does not have to be described faithfully. Storing one point as a starting point in the main memory unit and sequentially performing tracking on a pixel-by-pixel basis; and (b) determining an extraction point from the tracking points based on a preset pixel extraction interval, (C) When the pixel extraction interval is n (≧ 2), 2 k−1
a step of obtaining a positive integer k satisfying n <2 k and setting a segment length d = k + 1 in the main memory section from this, (d) a difference vector between the current extraction point and the previous extraction point And storing the obtained X and Y components in the main memory unit as one segment with the number of bits corresponding to the segment length d determined by the value of the pixel extraction interval n, and (e) the step (e). D) repeating the trace point until the trace point returns to the starting point, and (f) the data of the encoded sequence consisting of the coordinates of the starting point, the number of the segments, the segment length, and the X and Y components of the difference vector of each segment. And a step of using a format as coding information of a digital contour line.
JP61147569A 1986-06-24 1986-06-24 Digital contour coding method Expired - Lifetime JPH0789376B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61147569A JPH0789376B2 (en) 1986-06-24 1986-06-24 Digital contour coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61147569A JPH0789376B2 (en) 1986-06-24 1986-06-24 Digital contour coding method

Publications (2)

Publication Number Publication Date
JPS633387A JPS633387A (en) 1988-01-08
JPH0789376B2 true JPH0789376B2 (en) 1995-09-27

Family

ID=15433316

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61147569A Expired - Lifetime JPH0789376B2 (en) 1986-06-24 1986-06-24 Digital contour coding method

Country Status (1)

Country Link
JP (1) JPH0789376B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002236926A (en) * 2001-02-08 2002-08-23 Sony Corp Coordinate sequence feature calculation method, video special effect device control method, and video special effect device control system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5843789B2 (en) * 1980-02-29 1983-09-29 日本電信電話株式会社 Handwritten signal encoding processing method
JPS60134393A (en) * 1983-12-22 1985-07-17 Matsushita Electric Ind Co Ltd Line figure recognition device
JPS613287A (en) * 1984-06-18 1986-01-09 Nippon Telegr & Teleph Corp <Ntt> Graphic form input system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002236926A (en) * 2001-02-08 2002-08-23 Sony Corp Coordinate sequence feature calculation method, video special effect device control method, and video special effect device control system

Also Published As

Publication number Publication date
JPS633387A (en) 1988-01-08

Similar Documents

Publication Publication Date Title
JP2968582B2 (en) Method and apparatus for processing digital data
JP3031613B2 (en) Color / shade image input / output device and input / output method
JPH1056643A (en) Encoding and decoding apparatus for moving images recording arbitrary objects
JPH1079942A (en) Contour encoding method and its device
US6526095B1 (en) Inter-frame predicted image synthesizing method
CN108933941A (en) Image encoding method and device and picture decoding method and device
JP2961374B2 (en) Method and apparatus for reproducing digitally received video images
CN112118449B (en) Method and device for compressing and decompressing image
EA006638B1 (en) Method for compressing and decompressing video image data
JPH0789376B2 (en) Digital contour coding method
Acar et al. Image coding using a weak membrane model of images
JP4143880B2 (en) Image encoding apparatus and method, image decoding apparatus and method, and recording medium
JPH0537916A (en) Image transmission equipment
JPH0570873B2 (en)
JP2967047B2 (en) Pattern recognition method
JP3111958B2 (en) Encoding apparatus and encoding method using pattern encoding
JP3209396B2 (en) Image data compression method and apparatus
JPH07123276A (en) Digital compression encoding method of image signal
JPS62145969A (en) Compressing and restoration method for multilevel image information
KR0181053B1 (en) Affine Converter for 3D Color Graphics Parallel Processing
JP3084187B2 (en) Binary image encoding device and binary image decoding device
JP3852237B2 (en) Image processing device
Yajima et al. Data compression of the kanji character patterns digitized on the hexagonal mesh
JP3835411B2 (en) Image compression apparatus, image compression method, and image compression program
JP2872241B2 (en) Image coding method