JPS61128389A - Linear approximating and encoding device of linear graphic - Google Patents

Linear approximating and encoding device of linear graphic

Info

Publication number
JPS61128389A
JPS61128389A JP59250821A JP25082184A JPS61128389A JP S61128389 A JPS61128389 A JP S61128389A JP 59250821 A JP59250821 A JP 59250821A JP 25082184 A JP25082184 A JP 25082184A JP S61128389 A JPS61128389 A JP S61128389A
Authority
JP
Japan
Prior art keywords
points
point
coordinate
relative coordinates
linear
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
JP59250821A
Other languages
Japanese (ja)
Inventor
Motohiro Matsuzaka
松坂 基弘
Naoko Takahata
高畑 尚子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP59250821A priority Critical patent/JPS61128389A/en
Publication of JPS61128389A publication Critical patent/JPS61128389A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To attain real time processing for the linear approximation and encoding of a linear graphic by rotating the relative coordinates between the older two points and between newer two points out of three points in a time series coordinate point string of the linear graphic, and if necessary, executing interpolation processing or the like and reading out the opening angles of three points while referring a table. CONSTITUTION:Three points in the time series coordinate point string of the linear raphic through a data input part 2 are selected by a three-point selecting part 3 through a pen or the like, the relative coordinates between older two points and between newer two points are determined and the relative coordinates are rotated so that the opening angle between the relative coordinates is turned in a prescribed direction by a relative coordinate conversion part 4. When the relative coordinates are threshold or more, the relative coordinates are interpolated by a virtual coordinate interporation part 5 so that the length of an arm formed by the relative coordinates is an upper limit value or less. The table of an angle calculation part 6 is refereed by the interpolated relation coordinates to determine the opening angle between the relative coordinates. The start and end points of linear approximation are encoded by a final sampling point output part 7. Thus, the linear approximation and encoding can be processed with real time even if a microprocessor having no floating point calculating circuit is used.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、線図形の直線近似・符号化装置に関するもの
である。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a linear approximation/encoding device for line figures.

従来の技術 従来より、線図形の近似・符号化方式と・して、入力線
図形を直線のみで近似・符号化するものと、直線と円弧
を用いるものとがある(例えば、特開昭58−1897
87号公報)。いずれの方式においても、線図形を複数
の直線や円弧に分割する前処理として、第12図に示す
ように入力データ点列の各点に対して、開き角39ある
いは開き角39の補角40(点列の角度変化)を算出す
る場合が多い。そして、これらの角度変化を元に線図形
に含まれる屈曲点あるいは変曲点を抽出し、直線あるい
は直線と円弧を用いて近似・符号化を行っている。
Conventional technology Conventionally, there are methods for approximating and encoding input line figures, such as those that approximate and encode input line figures only with straight lines, and those that use straight lines and circular arcs (for example, Japanese Patent Laid-Open No. 58 -1897
Publication No. 87). In either method, as a preprocess to divide a line figure into a plurality of straight lines or circular arcs, the opening angle 39 or the supplementary angle 40 of the opening angle 39 is (change in angle of point sequence) is often calculated. Then, based on these angular changes, bending points or inflection points included in the line figure are extracted, and approximated and encoded using straight lines or straight lines and circular arcs.

発明が解決しようとする問題点 このような従来の近似・′符号化方式では、入力される
データ点列の角度算出演算を三角関数等を用いて、始終
点を除く全ての点に対して行うために莫大な処理時間を
要する。特に、上記演算を浮動小数点演算回路を持たな
いようなマイクロプロセッサ−で行おうとする場合、実
時間処理が困難であった。
Problems to be Solved by the Invention In such conventional approximation/coding methods, angle calculation operations for input data point sequences are performed for all points except the start and end points using trigonometric functions, etc. This requires a huge amount of processing time. In particular, when attempting to perform the above operations using a microprocessor that does not have a floating point arithmetic circuit, real-time processing is difficult.

本発明は、浮動小数点演算回路を持たないようなマイク
ロプロセッサ−においても、実時間処理が可能な線図形
の直線近似・符号化装置を提供することを目的としてい
る。
SUMMARY OF THE INVENTION An object of the present invention is to provide a linear approximation/encoding device for line figures that can perform real-time processing even in a microprocessor that does not have a floating-point arithmetic circuit.

問題点を解決するための手段 線図形の時系列的な座標点列から3点を選択し、その3
点のうち古い方の2点間及び新しい方の2点間の各相対
座標値を座標変換し、座標変換された相対座標値の!あ
るいはy成分の絶対値が閾、値を越える際に低空の点を
補間することにより新たな3点の低空座標を得、前記3
点のうち古い方の2点問および新しい方の2点間の相対
座標値と開き角の関係を予め格納されているテーブルと
比較し、前記3点の開き角の補角を求め順次累計し、累
計値の絶対値が閾値を越える点を出力するとともに前記
累計値を再設定して、点列を符号化してそれから線図形
の直線近似を可能にする。
Means to solve the problem Select three points from the time-series coordinate point sequence of the line figure, and
The relative coordinate values between the two older points and the newer two points are converted, and the converted relative coordinate values are converted into ! Alternatively, when the absolute value of the y component exceeds the threshold value, new low-altitude coordinates of three points are obtained by interpolating the low-altitude points, and
Compare the relationship between the relative coordinate values and opening angle between the older two points and the newer two points with a pre-stored table, find the supplementary angle of the opening angle of the three points, and sequentially accumulate them. , outputs points where the absolute value of the cumulative value exceeds a threshold value, resets the cumulative value, encodes a sequence of points, and then enables linear approximation of the line figure.

作  用 この技術的手段による作用は次のようになる。For production The effect of this technical means is as follows.

すなわち、入力データ3点より定まる開き角あるいは開
き角の補角を上記3点の組み合せ全てについてテーブル
に予め格納しておき、オンライン処理中は上記3点間の
相対座標のみから上記テーブルを参照するだけで、浮動
小数点演算を介さずに上記角度を求めるものである。さ
らに、入力データの各点の上記角度に対して簡単な演算
を施すだけで、実時間で入力データの直線近似・符号化
が行える。
In other words, the opening angle or supplementary angle of the opening angle determined by the three input data points is stored in a table in advance for all combinations of the three points, and during online processing, the table is referenced only from the relative coordinates between the three points. This method calculates the above angle without using floating point calculations. Furthermore, by simply performing simple calculations on the above-mentioned angles at each point of the input data, linear approximation and encoding of the input data can be performed in real time.

実施例 以下、本発明の一実施例を図面を用いて説明する。Example An embodiment of the present invention will be described below with reference to the drawings.

第1図に本発明の線図形の直線近似・符号化装置の一実
施例を示す。第1図において、10は線図形入力装置で
あり、入力面上に描かれた線図形の座標値データを標本
化出力する。本実施例では線図形入力装置として電子黒
板を用いた。1は本発明の線図形の直線近似・符号化装
置であり、符号化データはファイル11に格納され、表
示装置12に近似結果が表示される。
FIG. 1 shows an embodiment of a linear approximation/encoding device for line figures according to the present invention. In FIG. 1, 10 is a line figure input device, which samples and outputs coordinate value data of a line figure drawn on an input surface. In this embodiment, an electronic blackboard was used as the line graphic input device. Reference numeral 1 denotes a linear approximation/encoding device for line figures according to the present invention, encoded data is stored in a file 11, and approximation results are displayed on a display device 12.

上記のように構成された一実施例の装置において、以下
その動作を各処理部毎に説明する。
In the apparatus of the embodiment configured as described above, the operation thereof will be explained for each processing section below.

■ データ入力部2 データ入力部2は、本実施例の電子黒板から出力される
時系列的な標本化点列のうち、書き込みモード時にペン
で描かれたデータのみを選択的に以下の処理部に出力す
る。なお、これらのデータには座標値1色及び線図形の
始終点を示すペンアップ・ダウン情報が含まれる。
■ Data input unit 2 The data input unit 2 selectively processes only the data drawn with a pen in the writing mode out of the time-series sampling point sequence output from the electronic blackboard of this embodiment. Output to. Note that these data include coordinate values of one color and pen up/down information indicating the start and end points of a line figure.

■ 3点選出部3 本処理部では入力データ列の、各点の開き角の補角を求
める(角度算出部6)際の腕の長さの下限を規定するも
のである。以下に着目点の前後2点の選出方法について
示す。
(3) Three-point selection section 3 This processing section defines the lower limit of the arm length when calculating the supplementary angle of the opening angle of each point of the input data string (angle calculation section 6). The method for selecting two points before and after the point of interest is shown below.

第2図に、前記データ入力部より時、々刻々出。In FIG. 2, the data is output from the data input section moment by moment.

力される入力データ列の一例を示す。例えば入力データ
列13中の着目点14 (P、3)の開き角の補角は、
PI3を中心にして伸ばす腕の長さにより異なる。すな
わち、第3図(a)に示すようへ腕長さの下限を規定せ
ず単に時系列的に連続する3点P1゜、P、3及びP、
4を選出すると、微視的処理のために量子化誤差の影響
を強く受け、開き角の補角18は妥当なものとはならな
い。
An example of an input data string is shown below. For example, the supplementary angle of the opening angle of the focused point 14 (P, 3) in the input data string 13 is:
It varies depending on the length of the arm extended around PI3. That is, as shown in FIG. 3(a), three points P1°, P, 3 and P, which are simply consecutive in time without specifying the lower limit of the arm length, are
If 4 is selected, the supplementary angle 18 of the opening angle will not be appropriate because it will be strongly influenced by quantization errors due to microscopic processing.

また、逆に腕長さの下限を大きく設定しすぎても不都合
が生じる。例えば第2図に示す一点鎖線枠17の外側か
らP2”25を選出し腕の端点とすると、処理が巨視的
すぎるために第3図(diに示すように、3点P2.P
13.P26間で線図形の幾何学的な形状が変化する場
合に開き角の補角19は正しく得られない。
On the other hand, if the lower limit of the arm length is set too large, problems may occur. For example, if P2''25 is selected from outside the dashed-dotted line frame 17 shown in FIG.
13. If the geometric shape of the line figure changes between P26, the supplementary angle 19 of the opening angle cannot be obtained correctly.

これらに対して、腕の両端点を82図に示す実線枠16
あるいは点線枠16の外部から選出すれば、第3図(b
l 、 (clに示すように妥当な開き角の補角20.
21が得られる。
For these, the solid line frame 16 shown in Fig. 82 indicates both end points of the arm.
Alternatively, if the selection is made from outside the dotted line frame 16,
l, (supplementary angle 20. of the reasonable opening angle as shown in cl).
21 is obtained.

以上のように、角度算出時の腕長さに関する規定は通常
、入力装置の分解能及び入力される線図形の幾何学的な
複雑さ等を考慮して定めなければならない。本実施例で
は、入力装置である電子黒板の分解能が1.8mm/本
であり、入力される線図形が幾何学的に複雑な形状を有
する文字であることが多いことを考慮して、第2図に示
す実線枠16の外側であシ、かつ着目点14に時間的に
最も近い2点を前後から選出している。すなわち、着目
点14 (P13)に対しては、Pl。、p13.p1
6の3点が出方される〇なお、始終点及び始終点の8近
傍成分に対しては、前後いずれかに8近傍成分外点が存
在しないために、その旨の情報だけを出力する。
As described above, the regulation regarding the arm length when calculating the angle must normally be determined in consideration of the resolution of the input device, the geometric complexity of the input line figure, etc. In this example, the resolution of the electronic blackboard that is the input device is 1.8 mm/line, and the input line figures are often characters with geometrically complex shapes. Two points outside the solid line frame 16 shown in FIG. 2 and temporally closest to the point of interest 14 are selected from before and after. That is, for point of interest 14 (P13), Pl. , p13. p1
Three points of 6 are output. Note that for the 8-neighbor components of the start and end points and the start and end points, since there are no points outside the 8-neighbor components either before or after, only information to that effect is output.

■ 相対座標変換部4 本処理部では、前記3点選出部より出力される3点のう
ち時系列的に古い方の2点間の相対座標が、定められた
条件を満たさない場合忙、相対座標の変換を行う。
■ Relative coordinate conversion unit 4 In this processing unit, if the relative coordinates between the two oldest points in time series among the three points output from the three point selection unit do not satisfy the predetermined conditions, Perform coordinate transformation.

前記3点選出部より出力される3点Ptn−4゜Ptユ
、ζ1の座標を、それぞれ(xt。1.y、ニオ。
The coordinates of the three points Ptn-4°Ptyu and ζ1 outputted from the three-point selection section are respectively (xt.1.y, nio.

(Xtn* 71.)e ”tn+1 ””、)とする
と、”n−1”’n”及び”n’ ”nc間の相対座標
(ho、Δy0>及び(ΔXH,Δ7N)は (ΔXo lΔ7o)=(”tn”t、、+7t、−7
t、−1)(Δ”NlΔyN’=”tn+1  ”H9
y”n+、”n’となる。本処理部では、相対座標(Δ
−1Δy))力ζΔx0)oかっ 々。≧0 なる条件を満たさない場合に、以下のような処理を行い
、変換された相対座標イJ< 、 J以)及び(h舟、
47食)を得る。
(Xtn* 71.)e "tn+1 "",), the relative coordinates between "n-1"'n" and "n'"nc (ho, Δy0> and (ΔXH, Δ7N) are (ΔXo lΔ7o) =("tn"t,,+7t,-7
t, -1) (Δ"NlΔyN'="tn+1"H9
y"n+,"n'. In this processing section, relative coordinates (Δ
-1Δy)) force ζΔx0)o kaka. ≧0 If the condition is not satisfied, the following processing is performed to convert the converted relative coordinates iJ<, J and above, and (hship,
47 meals).

1)Δ!0<Oかつ Δy0≦0 の場合Δに=−Δ−
、Δ%=−Δy0 へJ=−!N  ’  煽、 = −fyNif)ho
≧Q  かつ  々。く0 の場合hシ=−dyo、 
   Δ輻=Δx0Δ輸=−VH、々Q = &N 1fi)  ”o≦0  かツly。>OO場合lx≦
=−ち 、   Δ%=−45 dx′N=−yN    Δy、6 = −4xN以上
の3つの場合の交換の様子を第4図に示す。第4図(a
t 、 (bl 、 telは、それぞれ上記+)、 
n)。
1)Δ! If 0<O and Δy0≦0, Δ=−Δ−
, Δ%=−Δy0 to J=−! N' instigation, = -fyNif)ho
≧Q and more. If 0 then h = -dyo,
Δradig = Δx0 Δtransport = -VH, Q = &N 1fi) "o≦0,> OO if lx≦
Figure 4 shows the exchange in three cases where Δy, 6 = -4xN or more. Figure 4 (a
t, (bl, tel are above + respectively),
n).

111)の−例であり、上記処理により第4図(d)の
ように変換される。込ずれの場合も、座標軸を原点中心
に回転しただけであるから、開き角の補角22は変化し
なり0 以上のように、本処理部より出力される3点P1.. 
+ Ptn’ Pt)+1は・Δ!0> Oかつ  d
y0≧0 を満たす。
111), which is converted as shown in FIG. 4(d) by the above processing. Even in the case of misalignment, the coordinate axes are simply rotated around the origin, so the supplementary angle 22 of the opening angle does not change and is 0.As described above, the three points P1. ..
+ Ptn' Pt)+1 is ・Δ! 0> O and d
y0≧0 is satisfied.

■ 低空座標補間部6 本処理部では入力データ列の各点の開き角の補角を求め
る際の腕長さの上限を規定するものであり、本処理部で
出力される3点のなす角度が角度算出部6により算出さ
れる。
■ Low altitude coordinate interpolation unit 6 This processing unit defines the upper limit of the arm length when calculating the supplementary angle of the opening angle of each point of the input data string, and the angle formed by the three points output by this processing unit is calculated by the angle calculating section 6.

腕長さの上限を以下のように規定する。すなわち前記相
対座標変換部4より出方される3点”n−1’ ”n’
 Ptn+1に対して・Δx0≦N、Δy0≦N、 l
Δ〜1≦N、1ON+≦Nを満たすものとする。但し、
Nは正定数である。
The upper limit of arm length is defined as follows. That is, the three points "n-1" and "n" output from the relative coordinate conversion section 4
For Ptn+1, Δx0≦N, Δy0≦N, l
It is assumed that Δ~1≦N and 1ON+≦N are satisfied. however,
N is a positive constant.

しかし、黒板上に高速で線図形を描い是場合には、各入
力データ間隔が大きくなり、上記条件を溝たさな騒場合
が生じる。このような場合には3点間に低空の2点を補
間するととKより、上記条件を満たすようなデータ列を
生成する。
However, when a line figure is drawn on a blackboard at high speed, the interval between each input data becomes large, and the above conditions may not be met. In such a case, if two points in the sky are interpolated between the three points, a data string that satisfies the above conditions will be generated from K.

第6図に一例として、上記条件を満たさないような点列
Pt!m−1’ ”n’ Ptn+1 ”tn+2を示
す。
As an example, FIG. 6 shows a point sequence Pt that does not satisfy the above conditions! m-1'"n' Ptn+1 "tn+2 is shown.

なお、この例ではN==aとする。図に示すように、3
点〜−1tPt、lζ+1に着目する場合は、ζヤ、が
上記上限枠23外に存在し、逆にへ。
Note that in this example, N==a. As shown in the figure, 3
When paying attention to the point ~-1tPt, lζ+1, ζya exists outside the upper limit frame 23, and vice versa.

ζ+1.ζ+2に着目する場合は、ζが上限枠24外に
存在することになる。このような場合は上記条件を満足
させるために、PtnとPtn、を結ぶ直線が通過する
それぞれの上限枠23 、24の最外要素に、低空の2
点Qt、、 O,、、を補間し、新たな点列”n−t 
’ ”n’ Qtn’ Qtne1’ Ptn、’ ”
m2を生成する。このような補間を行うことにより、3
点Pt、、、P、、I Qt、及びQtn−1−1’ 
”n+1 ’ ”n+2は上記上限枠の条件を満たし、
またPt−びPtytの開き角の補角は、それぞれpt
、、、、、 p、。、Qt、。
ζ+1. When focusing on ζ+2, ζ exists outside the upper limit frame 24. In such a case, in order to satisfy the above condition, a low-altitude 2
Interpolate the points Qt,, O,, and create a new point sequence “n−t
'``n'Qtn'Qtne1'Ptn,'''
Generate m2. By performing such interpolation, 3
Points Pt, , P, , I Qt, and Qtn-1-1'
``n+1'' ``n+2 satisfies the above upper limit condition,
Also, the supplementary angles of the opening angles of Pt- and Ptyt are respectively pt
,,,,,p,. ,Qt,.

及びQtne ’ Ptn、’ Ptn+2の点列によ
り近似的に与えられる。なお、Qtn及び”n+1は共
に、2点P、n及びPtn+1を結ぶ直線上に補間した
ものであるから、3点P、、、 Qt、I Qt、1及
びQ、、、 Qt、、。
and Qtne ' Ptn, ' Ptn+2 is approximately given by the point sequence. Note that both Qtn and "n+1" are interpolated on the straight line connecting the two points P, n, and Ptn+1, so the three points P,..., Qt, I Qt,1 and Q,..., Qt, .

P  より定まるQtn及びQtn+1の開き角の補’
n+1 角は零とすれば良い。
Complement of the opening angle of Qtn and Qtn+1 determined by P'
The n+1 angle can be set to zero.

本処理部では、低空点の補間位置を高速に求めるために
第6図に示す補間テーブル26を用いている。相対座標
が上限枠26を越える場合、相対座標値より定まる補間
テーブル内の要素を参照すれば補間位置がわかる。すな
わち、補間テーブル内の領域a−kに属する各要素には
、それぞれの補間位置A−にのアドレスが格納されてい
る。従って、第6図の例ではPtn及びζ1の相対位置
関係が第6図に示すように領域りに該当するため、この
場合の低空点Qtnの補間位置Hが容易に求まる。また
、低空点Qtu−1−1の補間位置は第6図に示すよう
に、低空点Qtnの位置を1000回転させたものであ
り、容易に求まる。なお、補間テーブル26は第6図に
示すように、Ptnに対して四分の一方向に対してのみ
設けておけば、回転処理により参照することができる。
This processing section uses an interpolation table 26 shown in FIG. 6 in order to quickly find the interpolated position of a low sky point. If the relative coordinates exceed the upper limit frame 26, the interpolated position can be determined by referring to the elements in the interpolation table determined by the relative coordinate values. That is, each element belonging to area ak in the interpolation table stores the address of the respective interpolation position A-. Therefore, in the example of FIG. 6, since the relative positional relationship between Ptn and ζ1 corresponds to the area shown in FIG. 6, the interpolated position H of the low air point Qtn in this case can be easily determined. Further, the interpolated position of the low-air point Qtu-1-1 is obtained by rotating the position of the low-air point Qtn by 1000 revolutions, as shown in FIG. 6, and is easily determined. Note that, as shown in FIG. 6, if the interpolation table 26 is provided only in one quarter direction with respect to Ptn, it can be referenced during rotation processing.

また、2点間の相対座標が補間テーブルのサイズをも越
えるような高速描画時のデータに対しては、補間テーブ
ル内に納まるまで相対座標の2等分割を繰り返す。この
ような処理を行っても、開き角の補角に対する近似誤差
の影響は非常に小さいものである。
Furthermore, for data during high-speed drawing in which the relative coordinates between two points exceed the size of the interpolation table, the relative coordinates are divided into two equal parts repeatedly until they fit within the interpolation table. Even if such processing is performed, the influence of approximation errors on the supplementary angle of the opening angle is very small.

なお、上限枠及び補間テーブルのサイズは、入力装置の
分解能及び座標値標本化周波数を考慮して定めなければ
ならない。本実施例では、電子黒板の分解能1.8mm
/本及び座標値標本化周波数60Hz を考慮し、上記
条件中のNを6、すなわち上限枠を13X13とし、補
間テーブルサイズを4ffiX45としている。
Note that the size of the upper limit frame and the interpolation table must be determined in consideration of the resolution of the input device and the coordinate value sampling frequency. In this example, the resolution of the electronic blackboard is 1.8 mm.
/ book and the coordinate value sampling frequency of 60 Hz, N in the above conditions is set to 6, that is, the upper limit frame is set to 13×13, and the interpolation table size is set to 4ffi×45.

■ 角度算出部6 前記3点選出部3.相対座標変換部4及び低空座標補間
部6における各処理により、本処理部に入力される3点
”n−1”’n、I”七〇−1)、P’n”’n’へ)
及びζ4’1 ”tn+’1 ’ ”n+1 ’間の相
対座標(Δx0.Δ”)=”tn−Itn−1’ 71
.−7t、−1)(Δ”N”N)= ”tn+1−”n
・ytllに+1−ytn)は、次の条件を満たす。
■ Angle calculation unit 6 The three-point selection unit 3. Through each process in the relative coordinate conversion section 4 and the low-altitude coordinate interpolation section 6, three points "n-1"'n, I"70-1), P'n"'n') are input to this processing section.
and ζ4'1 "tn+'1" Relative coordinate between "n+1"(Δx0.Δ") = "tn-Itn-1' 71
.. -7t, -1) (Δ"N"N) = "tn+1-"n
・ytll+1−ytn) satisfies the following conditions.

1)1Δ!01>1又は1Δyol>11h製1〉1又
は1々實1〉1 11)  Δχ。〉0 かつ Δy0≧0111)  
Δx0≦N かつ Δy0≦N1&NI≦Nかつ 1々
N1≦N N:正定数本処理部では、上記条件を満たす
3点Ptニー1゜ペナルティ−テーブルを参照すること
により求める。本処理部では、開き角の補角を直線上か
らのズレという意味で、直線性に対するペナルティ−と
呼び、ペナルティ−テーブルには、相対座標が上記条件
を満たす全ての3点の組み合せにおける各ペナルティ−
値が予め格納されている。ペナルティ−テーブルは、(
Δ−1#。)よ。
1) 1Δ! 01>1 or 1Δyol>11h made 1>1 or 1 fact1>1 11) Δχ. 〉0 and Δy0≧0111)
Δx0≦N and Δy0≦N1&NI≦N and 1N1≦N N: Positive constant This processing section obtains by referring to a three-point Pt knee 1° penalty table that satisfies the above conditions. In this processing unit, the supplementary angle of the opening angle is called a penalty for linearity in the sense of deviation from the straight line, and the penalty table contains each penalty for all three-point combinations whose relative coordinates satisfy the above conditions. −
The value is pre-stored. The penalty table is (
Δ-1#. )Yo.

り定まる部分ペナルティ−テーブルと呼ぶ小部分より構
成されている。
It consists of a small part called a partial penalty table.

以下に第7図に示す3点Ptn−/I’ Ptn’ ”
n+1間の各相対座標(Δ”0 * ’70)+ (Δ
N、Δ7N)より、3点から定まるペナルティ−27を
求める手順を示す。なお、各相対座標は上記条件を満た
すものとする。但し、N=6とする。
The three points Ptn-/I'Ptn' shown in Figure 7 below are
Each relative coordinate between n+1 (Δ”0 * '70) + (Δ
The procedure for finding the penalty -27 determined from three points is shown below. It is assumed that each relative coordinate satisfies the above conditions. However, N=6.

第8図にペナルティ−テーブル28を示す。FIG. 8 shows the penalty table 28.

テーブル内の各格子は、ζ1を第8図に示す位置に想定
した場合に、相対座標(Δx0.Δy0)より定まる各
部分ペナルティ−テーブルを表わす。
Each grid in the table represents each partial penalty table determined by the relative coordinates (Δx0.Δy0) when ζ1 is assumed to be at the position shown in FIG.

従って、この例では(ΔI0.Δy0) = (4、2
)であるから、参照すべき部分ペナルティ−テーブル2
9が求まる。第9図に部分ペナルティ−゛テーフル29
を示す。部分ペナルティ−テーブル29の各要素には、
2点ζイ、 P、、を結ぶ直線からのズレ、即ちペナル
ティ−が格納されており、各ペナルティ−値は図に示す
ように、点Ptnを中心として時計まわシに正、反時計
まわシに負の符号を有する。従って、部分ペナルティ−
テーブル29において、点Pt、1がいずれの要素に該
当するかによりペナルティ−が求まる。この例では(Δ
”Hj’7N ) = (5、1)であるから、第9図
に示すように、どの3点に対するペナルティ−は−16
であることがわかる。
Therefore, in this example (ΔI0.Δy0) = (4, 2
), therefore, the partial penalty to be referred to is table 2.
Find 9. Partial penalty in Figure 9 - Table 29
shows. Each element of the partial penalty table 29 includes:
The deviation from the straight line connecting two points ζA and P, that is, the penalty, is stored, and each penalty value is calculated by rotating clockwise and counterclockwise around point Ptn, as shown in the figure. has a negative sign. Therefore, the partial penalty −
In table 29, the penalty is determined depending on which element the point Pt,1 corresponds to. In this example (Δ
Since ``Hj'7N) = (5, 1), the penalty for which three points is -16, as shown in Figure 9.
It can be seen that it is.

以上のよう(、本処理部では入力される3点の相対座標
よりペナルティ−テーブルを参照して、開き角の補角、
部ちペナルティ−を高速に求めている。
As described above (this processing section refers to the penalty table from the relative coordinates of the three input points, and calculates the supplementary angle of the opening angle,
The part penalty is calculated quickly.

なお、第8図、第9図に示す下限枠15は、前記3点選
出部3により規定されるものであシ、前記低空座標補間
部6により規定される上限枠は、本処理部のペナルティ
−テーブルのサイズに反映されている。
Note that the lower limit frame 15 shown in FIGS. 8 and 9 is defined by the three-point selection section 3, and the upper limit frame defined by the low-altitude coordinate interpolation section 6 is based on the penalty of this processing section. - reflected in table size.

■ 最終標本化点出力部T 本処理部では、前記角度算出部6で算出された各点のペ
ナルティ−値にょシ、最終標本化点を決定し、始終点と
共に出方する。
(2) Final sampling point output unit T This processing unit determines the final sampling point based on the penalty value of each point calculated by the angle calculation unit 6, and outputs it together with the starting and ending points.

第10図に、入力データP、〜P2゜から最終標本化点
を決定する過程を示す。但し、始点30及び終点34は
必らず標本化するものとする。
FIG. 10 shows the process of determining the final sampling point from the input data P, ~P2°. However, the starting point 30 and the ending point 34 are always sampled.

まず、点p2. p3. p4・・・・・・のペナルテ
ィ−値を順次累計してゆき、累計値が正負両側の閾値3
6及び36を越える点を最終標本化点として出方する。
First, point p2. p3. The penalty values of p4... are accumulated in sequence, and the accumulated value reaches threshold 3 on both positive and negative sides.
Points exceeding 6 and 36 are taken as final sampling points.

この例では点P6において累計値が正の閾値36を越え
るために、点P6を最終標本化点とし、累計値をリセッ
トする。この処理を順次繰シ返し、さらに、最終標本化
点32 、33を得る。
In this example, since the cumulative value exceeds the positive threshold 36 at point P6, point P6 is set as the final sampling point and the cumulative value is reset. This process is sequentially repeated to obtain final sampling points 32 and 33.

なお、本処理部では上記累計値の閾値、以外に、各点の
ペナルティ−それぞれに対しても閾値を設定している。
Note that in addition to the threshold for the cumulative total value, this processing section also sets a threshold for each penalty at each point.

これは第11図に示すように、例えば前照P6 までの
累計値が正側の閾値36の直前までに達しているような
場合に、次の点P6が比較的大きな負のペナルティ−を
有していると、累計値が負側の閾値を越えないことがあ
るためである。これにょシ、点P6 を最終標本化点に
含めることができる。
As shown in FIG. 11, this means that, for example, in a case where the cumulative value up to forelight P6 has reached just before the positive threshold 36, the next point P6 has a relatively large negative penalty. This is because if this is done, the cumulative value may not exceed the negative threshold. In this case, point P6 can be included in the final sampling points.

以上のように本処理部ではJ入力データから始終点を含
む最終標本化率を出方する。
As described above, this processing section derives the final sampling rate including the start and end points from the J input data.

なお、本処理部では、上記累計値の閾値を変更すること
により、ユーザーが望む任意の近似度で処理が行える。
In addition, in this processing section, by changing the threshold value of the above-mentioned cumulative value, processing can be performed with any degree of approximation desired by the user.

■ 符号化データ格納部8 本処理部では、前記最終標本化点出力部7より出力され
るデータの座標値を、色情報、始終点情報等と共に、−
筆単位に第1図に示すファイル11に格納する。
■ Encoded data storage unit 8 This processing unit stores the coordinate values of the data output from the final sampling point output unit 7 together with color information, start and end point information, etc.
Each stroke is stored in the file 11 shown in FIG.

■ 近似結果出力部9 本処理部では、前記符号化データより、入力データの近
似結果を指定された色で表示装置i、12上に表示する
(2) Approximation result output unit 9 This processing unit displays the approximation result of the input data on the display device i, 12 in a specified color based on the encoded data.

発明の効果 以上述べてきたように、本発明によれば、浮動小数点演
算回路を持たないようなマイクログロセッテーにおいて
も、実時間で線図形の直線゛、近偏符号化を行うことが
でき、従って安価なシステム構成とすることができるの
で、実用的にきわめて有用である。
Effects of the Invention As described above, according to the present invention, linear and near-biased encoding of line figures can be performed in real time even in microglossets that do not have floating-point arithmetic circuits. Therefore, it is possible to have an inexpensive system configuration, which is extremely useful in practice.

ま九、使用者が望む任意の近似度で近似・符号化が行え
るので、近似結果の品質向上あるいは高いデータ圧縮率
を実現することができる。
Furthermore, since approximation and encoding can be performed with any degree of approximation desired by the user, it is possible to improve the quality of the approximation results or achieve a high data compression rate.

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

第1図は本発明の一実施例における線図形の直線近似・
符号化装置のブロック構成図、第2図は入力データ点列
から3点を選出する手段を示す図、fas図は選出され
た3点より定まる開き角の補角を示す図、第4図は相対
座標の変換に関する動作説明図、第6図は仮空座標を補
間する際の動作説明図、第6図は仮空座標を補間する位
置を予め格納している補間テーブルを示す図、第7図は
選出された3点間の相対座標を示す図、第8図は開き角
の補角、即ちペナルティ−を予め格納しているペナルテ
ィ−テーブルを示す図、第9図は部分ペナルティーテー
ブルを参照して、3点より定まるペナルティ−を求める
際の動作説明図、第10及び11図は入力データ点列か
ら最終標本化点を決定する際の動作説明図、第12図は
入力データ点列の角度を定義する図である。 1・・・・・・直線近似・符号化装置、2・・・・・・
データ入力部、3・・・・・・3点選出部、4・・・・
・・相対座標変換部、6・・・・・・低空座標補間部、
6・・・・・・角度算出部、γ・・・・・・最終標本化
点出力部、8・・・・・・符号化データ格納部、9・・
・・・・近似結果出力部、10・・・・・・線図形入力
装置。 代理人の氏名 弁理士 中 尾 敏 男 ほか1名菓°
 1 図 第2図 第3図 (α)     絡l ′第 4 図 第5図 第6図 第7図 第8図 第9図 第10図 第110 37七罰、
Figure 1 shows the linear approximation of a line figure in one embodiment of the present invention.
A block configuration diagram of the encoding device. FIG. 2 is a diagram showing the means for selecting three points from the input data point sequence. The FAS diagram is a diagram showing the supplementary angle of the opening angle determined by the three selected points. FIG. Figure 6 is an explanatory diagram of operations related to conversion of relative coordinates. Figure 6 is an explanatory diagram of operations when interpolating virtual empty coordinates. Figure 6 is a diagram showing an interpolation table in which positions for interpolating virtual empty coordinates are stored in advance. Figure 7 The figure shows the relative coordinates between the three selected points, Figure 8 shows the penalty table that stores the supplementary angle of the opening angle, that is, the penalty, and Figure 9 shows the partial penalty table. Figures 10 and 11 are diagrams explaining the operation when determining the final sampling point from the input data point sequence. Figure 12 is the diagram explaining the operation when determining the penalty determined from the three points. It is a figure which defines an angle. 1... Linear approximation/encoding device, 2...
Data input section, 3...3 point selection section, 4...
...Relative coordinate conversion section, 6...Low coordinate interpolation section,
6...Angle calculation unit, γ...Final sampling point output unit, 8...Encoded data storage unit, 9...
. . . Approximation result output section, 10 . . . Line figure input device. Name of agent: Patent attorney Toshio Nakao and one other name
1 Figure 2 Figure 3 (α) Connection l ' Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 110 37 Seventh punishment,

Claims (1)

【特許請求の範囲】[Claims] 線図形の時系列的な座標点列を得るデータ入力部と、前
記座標点列から3点を選出する3点選出部と、前記3点
のうち時系列的に古い方の2点間及び新しい方の2点間
の各相対座標値を回転処理により座標変換する相対座標
変換部と、前記相対座標変換部から出力される相対座標
値のxあるいはy成分の絶対値が、閾値を越える際に仮
空の点を補間することにより新たな3点を出力する仮空
座標補間部と、前記仮空座標補間部より出力される前記
3点のうち、時系列的に古い方の2点間、及び新しい方
の2点間の各相対座標値より、予め値が格納されている
テーブルを参照することによって、前記3点間の開き角
の補角を求める角度算出部と、前記角度算出部より出力
される前記開き角の補角を順次累計し累計値の絶対値が
閾値を越える点を出力すると共に、前記累計値を再設定
する最終標本化点出力部と、前記入力座標点列中の始終
点及び前記最終標本化点出力部より出力される全ての点
列の符号化データをファイルに格納する符号化データ格
納部と、前記符号化データより線図形の近似結果を表示
装置上に表示する近似結果出力部とを具備する線図形の
直線近似符号化装置。
a data input unit that obtains a chronological coordinate point sequence of a line figure; a 3-point selection unit that selects three points from the coordinate point sequence; and a data input unit that selects three points from the coordinate point sequence; a relative coordinate conversion section that performs coordinate conversion of each relative coordinate value between two points on the other hand by rotation processing; a virtual space coordinate interpolation unit that outputs three new points by interpolating virtual space points, and a chronologically older two points outputted from the virtual space coordinate interpolation unit; an angle calculation unit that calculates a supplementary angle of the opening angle between the three points by referring to a table in which values are stored in advance from each relative coordinate value between the two points and the newer one; a final sampling point output unit that sequentially accumulates the supplementary angles of the output opening angle and outputs points where the absolute value of the accumulated value exceeds a threshold value, and resets the accumulated value; an encoded data storage unit that stores encoded data of all point sequences outputted from the start and end points and the final sampling point output unit in a file; and displays a result of approximating a line figure from the encoded data on a display device. A linear approximation encoding device for a line figure, comprising an approximation result output unit.
JP59250821A 1984-11-28 1984-11-28 Linear approximating and encoding device of linear graphic Pending JPS61128389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59250821A JPS61128389A (en) 1984-11-28 1984-11-28 Linear approximating and encoding device of linear graphic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59250821A JPS61128389A (en) 1984-11-28 1984-11-28 Linear approximating and encoding device of linear graphic

Publications (1)

Publication Number Publication Date
JPS61128389A true JPS61128389A (en) 1986-06-16

Family

ID=17213533

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59250821A Pending JPS61128389A (en) 1984-11-28 1984-11-28 Linear approximating and encoding device of linear graphic

Country Status (1)

Country Link
JP (1) JPS61128389A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63147275A (en) * 1986-12-11 1988-06-20 Furuno Electric Co Ltd Method for extracting graphic data
JPH02310783A (en) * 1989-05-26 1990-12-26 Hitachi Ltd Curve interpolating system
JPH04191985A (en) * 1990-11-26 1992-07-10 Tsubakimoto Chain Co Image processing method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63147275A (en) * 1986-12-11 1988-06-20 Furuno Electric Co Ltd Method for extracting graphic data
JPH02310783A (en) * 1989-05-26 1990-12-26 Hitachi Ltd Curve interpolating system
JPH04191985A (en) * 1990-11-26 1992-07-10 Tsubakimoto Chain Co Image processing method

Similar Documents

Publication Publication Date Title
EP0199587A2 (en) Image processing system
US4381547A (en) Picture deforming process
JPH02260079A (en) Moving information extractor
JPS61128389A (en) Linear approximating and encoding device of linear graphic
Iwanowski et al. The morphological-affine object deformation
EP0395944A1 (en) Method and system for determining segment types in figure represented by straight short vectors
JPS5833588B2 (en) Video processing device
JPH01134672A (en) Divided image processing system
US5301264A (en) Figure encoder
JP2507812B2 (en) Square root calculation method
JPH0679334B2 (en) Data compression method
JP3215179B2 (en) Hinting outline fonts
JPS6122343B2 (en)
JPS61184052A (en) Picture data compressing method
JP3057959B2 (en) Data converter
JPS6177088A (en) Image data processor
JP3246361B2 (en) Display device
JPS6038288Y2 (en) Electron beam exposure equipment
JPH02259884A (en) Image processing system
JPS61236592A (en) Graphic display unit
JPS61231683A (en) Graph input device
JP2636014B2 (en) Figure connection control method
JPH05290137A (en) Digitizing method with shaping function using figure frame
JPH027114B2 (en)
JPS6316944B2 (en)