JPH03271875A - Processing method for converting graphic to coordinates - Google Patents

Processing method for converting graphic to coordinates

Info

Publication number
JPH03271875A
JPH03271875A JP2071258A JP7125890A JPH03271875A JP H03271875 A JPH03271875 A JP H03271875A JP 2071258 A JP2071258 A JP 2071258A JP 7125890 A JP7125890 A JP 7125890A JP H03271875 A JPH03271875 A JP H03271875A
Authority
JP
Japan
Prior art keywords
input
coordinates
vector
candidate point
coordinate
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
JP2071258A
Other languages
Japanese (ja)
Inventor
Masayoshi Sakamoto
正義 坂本
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2071258A priority Critical patent/JPH03271875A/en
Publication of JPH03271875A publication Critical patent/JPH03271875A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To improve the reproducibility by extracting coordinates so that length of segments approximating a curve are automatically changed in accordance with the curvature of this curve with respect to an arbitrary curve graphic. CONSTITUTION:An input coordinate string according with the input graphic from a coordinate value input part 1 is processed in a processing part 2 to extract coordinate values indicating the input graphic, and they are stored in a storage part 3. Input coordinates of the input coordinate string are taken in to calculate the vector distance from preceding candidate point coordinates to input coordinates, and the vector dis tance is compared with the extracted distance, and input coordinates are extracted as a candidate point when the vector distance exceeds the extracted distance. The change vector between the vector of the candidate point and that of the preceding candidate point is calculated and is added to an integrated change vector, and the integrated change vector is updated, and the integrated change vector value is com pared with a selected value; and when the integrated change vector value exceeds the selected value, input coordinates of the candidate point are selected as coordinates to be stored, and the integrated change vector is set to 0. Thus, the reproducibility is improved.

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術 発明が解決しようとする課題 課題を解決するための手段(第1図) 作用 実施例 (1)一実施例の説明(第2図〜第5図)Φ)他の実施
例の説明 発明の効果 〔概要〕 フリーハンドで描かれる図形を、その図形を近似できる
ような複数の座標値に変換する図形の座標化処理方法C
二関し。
[Detailed description of the invention] [Table of contents] Overview Industrial field of application Conventional technology Problems to be solved by the invention Means for solving the problems (Fig. 1) Working example (1) Description of one example ( Figures 2 to 5) Φ) Description of other embodiments Effects of the invention [Summary] Figure coordinate processing method for converting a figure drawn freehand into a plurality of coordinate values that can approximate the figure C
Second Seki.

入力に手間がかからず、座標データを少なくでき2曲線
の再現性が良く、簡易(ニス形を再現できることを目的
とし。
It is designed to be easy to input, requires less coordinate data, has good reproducibility of two curves, and is simple (to be able to reproduce varnished shapes).

座標値入力部からの入力図形に沿った入力座標列を該処
理部で処理し、#入力図形を示す座標値を抽出し、記憶
部に格納する座標処理装置において、入力座標列の入力
座標を取り込む第1のステップと、前の候補点座標から
該入力座標へのベクトル距離を計算する第2のステップ
と、該ベクトル距離を抽出距離と比較し、該ベクトル距
離が抽出距離を越えた場合、入力座標を候補点として抽
出し、それ以外の場合は第1のステップに戻る第3のス
テップと、該候補点のベクトルと前の候補点のベクトル
との変化ベクトルを計算し、積算変化ベクトルC二加算
し、積算変化ベクトルを更新する第4のステップと、該
積算変化ベクトル値と選択値とを比較し、該積算変化ベ
クトル値が選択値以下なら、第1のステップに戻り、該
積算変化ベクトル値が選択値を越えていれば、#候補点
の入力座標を格納座標して選択し、該積算変化ベクトル
を零にして、第1のステップに戻る第5のステップとを
有する。
A coordinate processing device processes an input coordinate string along an input figure from a coordinate value input unit in the processing unit, extracts coordinate values indicating the input figure, and stores them in a storage unit. a first step of capturing, a second step of calculating a vector distance from the previous candidate point coordinates to the input coordinates, comparing the vector distance with an extraction distance, and if the vector distance exceeds the extraction distance; A third step that extracts the input coordinates as a candidate point, otherwise returns to the first step, and calculates a change vector between the vector of the candidate point and the vector of the previous candidate point, and calculates the cumulative change vector C. A fourth step of adding two and updating the cumulative change vector, and comparing the cumulative change vector value with the selected value, and if the cumulative change vector value is less than or equal to the selected value, returns to the first step and returns to the cumulative change vector value. If the vector value exceeds the selection value, # the input coordinates of the candidate point are selected as storage coordinates, the cumulative change vector is set to zero, and the fifth step returns to the first step.

〔産業上の利用分野〕[Industrial application field]

本発明は 7 リ−/・ンドで描かれる図形を、その図
形を近似できるような複数の座標値に変換する図形の座
標化処理方法に関する。
The present invention relates to a figure coordinate processing method for converting a figure drawn in 7 lines into a plurality of coordinate values that can approximate the figure.

近年ノパーソナルコンピュータやワードプロセッサ等(
ユよる情報処理装置の普及に伴い、これら装置による文
書処理が一般に広まっているが9文書のみでなく9図形
や画像を扱う技術が要求される。
In recent years, personal computers, word processors, etc.
With the spread of information processing devices, document processing using these devices has become widespread, but techniques for handling not only documents but also graphics and images are required.

る。Ru.

このため9図形、特に線画については、線分。For this reason, 9 figures, especially line drawings, are called line segments.

長方形1円などの基本となる図形については、端点や中
心位置、半径等を指定するだけで1図形を座標化し9表
現できるようC二しているが、任意の曲線図形ζ二つい
ては、このような座標化ができず。
For a basic figure such as a rectangle, a circle, C2 is used so that one figure can be expressed in 9 coordinates simply by specifying the end points, center position, radius, etc., but for arbitrary curved figures ζ2, It is not possible to convert it into coordinates.

%にフリーハンドで描かれる図形の座標化処理が求めら
れる。
% requires coordinate processing of figures drawn freehand.

〔従来の技術〕[Conventional technology]

このような任意の曲線図形の座標化方法として。 As a method to coordinate such arbitrary curved shapes.

次のようなものがあった。There was something like this:

■前述の基本図形を利用し、入力図形に従って基本図形
の組合せC二分解し、基本図形を選択し。
■Using the basic figures mentioned above, divide the basic figures into two combinations C according to the input figure, and select the basic figures.

分解点の座標を指定して、基本図形の組合せで座標化す
る。
Specify the coordinates of the decomposition point and convert it into coordinates using a combination of basic shapes.

■利用者が座標入力装置で入力図形に沿って描画して得
た入力座標全てを記録し、入力された図形を再現する際
に、その図形を記録した座標の点の集合で再現する。
■The user records all input coordinates obtained by drawing along the input figure with a coordinate input device, and when reproducing the input figure, the figure is reproduced as a set of points of the recorded coordinates.

■前述の入力座標を機械的に等間隔で間引いて取り出し
た座標値のみ記録し、再現時にそれらの点を線分で補間
する。
■ Mechanically thin out the input coordinates mentioned above at equal intervals, record only the extracted coordinate values, and interpolate those points with line segments when reproducing.

■利用者が曲線図形上を通る適当4二指定したいくつか
の座標のみを取り込み9表示の際(−それらの座標を通
る曲線をスプライン関数などの数学的関数を用いて再現
する。
(2) When displaying only some coordinates specified by the user that pass through the curved figure (-) reproduce the curve passing through those coordinates using a mathematical function such as a spline function.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、係る従来技術には9次のような問題点が
あった。
However, this conventional technique has the following problems.

■従来の■の方法では、任意の曲線図形を入力するため
、その図形が表現できるような複数の基本線分(ユ置き
換えて入力する必要があり、入力の手間がかかる。
■In the conventional method (■), since an arbitrary curved figure is input, it is necessary to input a plurality of basic line segments (Y) that can express the figure, which takes time and effort.

■従来の■の方法では、入力の手間はかからないものの
、記録座標データが多量になる。
■The conventional method (■) requires no input effort, but requires a large amount of recorded coordinate data.

■従来の■の方法では1間引く間隔を小さく取るとデー
タ量が増え、逆(−犬きくとると、急激に曲がる曲線は
正しく表現できない。
■In the conventional method (■), the amount of data increases when the interval of one thinning is made small, and vice versa, sharply curved curves cannot be expressed correctly.

■従来の■の方法では、座標データは少なくなるものの
スプライン関数等の複雑な関数処理が必要となる。
(2) The conventional method (2) requires complex function processing such as a spline function, although the amount of coordinate data is reduced.

従って9本発明は、入力に手間がかからず、しかも座標
データも少なくでき9曲線の再現性が良く、簡易(ニス
形を再現できる図形の座標化処理方法を提供することを
目的とする。
Therefore, it is an object of the present invention to provide a graphic coordinate processing method that does not require time and effort for inputting, can reduce the amount of coordinate data, has good reproducibility of curves, and can reproduce simple (varnished) shapes.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理図である。 FIG. 1 is a diagram showing the principle of the present invention.

本発明は、第1図(A)に示すように、座標値入力部1
からの入力図形に沿った入力座標列を該処理部2で処理
し、該入力図形を示す座標値を抽出し。
As shown in FIG. 1(A), the present invention provides a coordinate value input section 1.
The processing unit 2 processes the input coordinate string along the input figure from , and extracts coordinate values indicating the input figure.

記憶部3に格納する座標処理装置において、81図(B
) に示すように、入力座標列の入力座標を取り込む第
1のステップと、前の候補点座標から該入力座標へのベ
クトル距離を計算する第2のステップと、該ベクトル距
離を抽出距離と比較し、#ベクトル距離が抽出距離を越
えた場合、入力座標を候補点として抽出し、それ以外の
場合は第1のステップに戻る第3のステップと、核候補
点のベクトルと前の候補点のベクトルの変化ベクトルを
計算し、積算変化ベクトルに加算し、積算変化ベクトル
を更新する第4のステップと、該積算変化ベクトル値と
選択値とを比較し、該積算変化ベクトル値が選択値以下
なら、第1のステップ(−戻り。
In the coordinate processing device stored in the storage unit 3, FIG. 81 (B
), a first step of taking the input coordinates of the input coordinate string, a second step of calculating the vector distance from the previous candidate point coordinates to the input coordinates, and comparing the vector distance with the extracted distance. # If the vector distance exceeds the extraction distance, the input coordinates are extracted as candidate points, otherwise the third step returns to the first step, and the vector of the kernel candidate point and the previous candidate point are extracted. A fourth step of calculating a change vector of the vector, adding it to the cumulative change vector, and updating the cumulative change vector, and comparing the cumulative change vector value with the selected value, and if the cumulative change vector value is less than or equal to the selected value. , first step (-return.

該積算変化ベクトル値が選択値を越えていれば。If the integrated change vector value exceeds the selected value.

該候補点の入力座標を格納座標して選択し、該積算変化
ベクトルな零C二して、第1のステップに戻る第5のス
テップとを有するものである。
A fifth step includes selecting the input coordinates of the candidate point as storage coordinates, setting the cumulative change vector to zero, and returning to the first step.

〔作用〕[Effect]

本発明は、入力座標列から第、第2.第3のステップで
等間隔で入力点を間引いて、候補点を抽出する。
In the present invention, the first, second, . In the third step, input points are thinned out at equal intervals to extract candidate points.

次C二、第4.第5のステップにより、前の選択点から
の候補点までの曲線の曲率な求め9曲率の犬のものは選
択点として格納し9曲率の小さいものは選択点としない
Next C2, 4th. In the fifth step, the curvature of the curve from the previous selected point to the candidate point is determined. Those with 9 curvatures are stored as selected points, and those with small 9 curvatures are not selected as selected points.

即ち、前の候補点のベクトルとその候補点のベクトルと
の変化ベクトルは9曲線の曲率の大きさを示す。
That is, the change vector between the vector of the previous candidate point and the vector of that candidate point indicates the magnitude of the curvature of the nine curves.

従って、前の選択点からの変化ベクトルを積算すれば、
前の選択点から候補点までの曲線の曲率が得られる。
Therefore, if we integrate the change vectors from the previous selected point, we get
The curvature of the curve from the previous selected point to the candidate point is obtained.

この大小を判定することによって1曲率の大の場合は選
択点として格納する。
By determining this magnitude, if the curvature is large by one, it is stored as a selected point.

このようにすることによって、いったん等間隔で間引い
て得た候補点に対し9曲率の大の時は。
By doing this, when the candidate points obtained by thinning out at equal intervals have a large 9 curvature.

選択点として採用することC;より9曲率が犬の時は細
かに1曲率が小の時は大まかに座標化できる。
Adopting it as a selection point C: When the 9th curvature is a dog, the coordinates can be finely determined, and when the 1st curvature is small, the coordinates can be roughly expressed.

即ち、任意の曲線図形に対して、その曲線を近似する線
分の長さを曲線の曲率に応じて自動変化するよう座標抽
出するものである。
That is, for any curved figure, the coordinates are extracted so that the length of a line segment that approximates the curve is automatically changed according to the curvature of the curve.

このため、入力は入力図形に沿った座標列を入力すれば
よく、入力の手間はかからず、座標データも少なくでき
、しかも曲率の大の所は細かに座標データをと、るので
曲線の再現性もよい。
For this reason, all you have to do is input a coordinate string along the input figure, which saves time and reduces the amount of coordinate data.Furthermore, the coordinate data is finely recorded for areas with large curvature, so curves can be Good reproducibility.

又、W別の関数を用いないため、簡易(ユ実現でき、そ
の処理も全ての入力座標に対し曲率判定しないため、容
易でしかも高速に座標化及び再現処理できる。
In addition, since no separate function is used for W, it can be realized easily, and since the curvature is not determined for all input coordinates, coordinate conversion and reproduction processing can be performed easily and at high speed.

〔実施例〕〔Example〕

(a)  一実施例の説明 第2図は本発明の一実施例のためのブロック図である。 (a) Description of one embodiment FIG. 2 is a block diagram for one embodiment of the invention.

図中、第1図で示したものと同一のものは、同一の記号
で示してあり、1aはデジタイザ(座標入力部)1の操
作子であり、デジタイザ1面上を利用者が操作するもの
、1bはボタンであり、操作子1aに設けられ、描画の
開始、終了を指示するものであり、操作子laの位置に
応じた座標をデジタイザ1が出力する。
In the figure, the same parts as shown in Figure 1 are indicated by the same symbols, and 1a is the operator of the digitizer (coordinate input section) 1, which is operated by the user on the digitizer 1 surface. , 1b are buttons provided on the operator 1a to instruct the start and end of drawing, and the digitizer 1 outputs coordinates corresponding to the position of the operator la.

4はメモリであり、CPUで構成される処理部(以下C
PUという)1の処理に必要なデータを格納しておくも
のであり2選択点座標Pa、候補点座標Pc 、ベクト
ルDI、D2.ベクトル間の積算変化ベクトルDD及び
抽出距離C1,選択値C2を格納するもの、5はデイス
プレィであり。
4 is a memory, and a processing unit (hereinafter referred to as C
(referred to as PU) stores the data necessary for processing 1. 2 selection point coordinates Pa, candidate point coordinates Pc, vector DI, D2. 5 is a display that stores the cumulative change vector DD between vectors, the extraction distance C1, and the selection value C2.

デジタイザ1の描画出力及びCPU1の処理結果をモニ
ター出力表示するもの、6はバスであり。
A bus 6 displays the drawing output of the digitizer 1 and the processing results of the CPU 1 on a monitor.

CPU2とメモリ4.デイスプレィ5.デジタイザl及
び記憶部(フロッピーディスク装置)3を接続し、デー
タのやりとりを行なうものである。
CPU2 and memory4. Display 5. A digitizer 1 and a storage section (floppy disk device) 3 are connected to exchange data.

この実施例では、デジタイザ1より図形を描画すること
により出力される入力座標をCPU2が座標化処理する
とともに、デイスプレィ5に表示し2選択点座標を70
ツピーデイスク装置3に格納するようにしている。
In this embodiment, the CPU 2 converts input coordinates output by drawing a figure from the digitizer 1 into coordinates, displays them on the display 5, and displays the coordinates of 2 selected points at 70.
The information is stored in the Tuppy disk device 3.

第3図は本発明の一実施例処理フロー図、第4図及び第
5図は本発明の一実施例動作説明図である0 この例では、第4図囚のように開始点POから終了点P
9までの点線で示す曲線をデジタイザ1より描画入力す
るものとする。
FIG. 3 is a processing flow diagram of an embodiment of the present invention, and FIGS. 4 and 5 are operation explanatory diagrams of an embodiment of the present invention. In this example, as shown in FIG. Point P
It is assumed that curves shown by dotted lines up to 9 are drawn and input from the digitizer 1.

■ CPU2は、描画処理の開始に当って、メモリ4の
ベクトルDI、D2をr’Oj、積算変化ベクトルDD
を「0」にリセットしておく。
■ At the start of the drawing process, the CPU 2 sets the vectors DI and D2 in the memory 4 to r'Oj and the cumulative change vector DD.
Reset to "0".

次に、CPU2はデジタイザ1の出力を監視し。Next, the CPU 2 monitors the output of the digitizer 1.

デジタイザ1のボタン1bが押されたかを検出する0 利用者は、描画開始に当って、操作子1aのボタン1b
を押下し、描画開始を指示し、デジタイザ1は操作子1
aの位置を検出し、その座標を一定周期で出力する。
Detecting whether button 1b of digitizer 1 has been pressed 0 When starting drawing, the user presses button 1b of operator 1a.
Press to instruct to start drawing, and digitizer 1
The position of a is detected and its coordinates are output at regular intervals.

CPU2は、ボタン1bが押下されたことを検出すると
、利用者の描画開始と判断し、デジタイザ1の検出入力
座標を読み込み、メモリ4の候補点座標Pbに格納する
とともに、これを開始点として採用し、記録部3へ記録
する。
When the CPU 2 detects that the button 1b has been pressed, it determines that the user has started drawing, reads the detected input coordinates of the digitizer 1, stores them in the candidate point coordinates Pb of the memory 4, and uses these as the starting point. and records it in the recording section 3.

そして、CPU2は、メモリ4の候補点座標Pbを選択
点座標Paに移す。
Then, the CPU 2 moves the candidate point coordinates Pb in the memory 4 to the selected point coordinates Pa.

■ CP U 2は、デジタイザ1の入力座標を取り込
み、メモリ4の入力座標Pcに格納する。
(2) The CPU 2 takes in the input coordinates of the digitizer 1 and stores them in the input coordinates Pc of the memory 4.

次に、CPU2は2操作子1aのボタン1bが押下され
、描画終了を指示したか判定する。
Next, the CPU 2 determines whether the button 1b of the two-manipulator 1a has been pressed to instruct the end of drawing.

描画終了と判定すると、ステップ■に進む。When it is determined that the drawing is completed, the process proceeds to step (3).

一方、ボタン1bが押下されてないと判定し。On the other hand, it is determined that the button 1b is not pressed.

描画終了でないと判定し、CPU2は、メモリ4の候補
点Pトと入力座標Pcとのベクトルを計算し、メモリ4
のベクトルD2として格納する。
Determining that drawing has not ended, the CPU 2 calculates a vector between the candidate point P in the memory 4 and the input coordinate Pc, and stores the vector in the memory 4.
is stored as a vector D2.

■ 次に、CPU2は、ベクトルD2の距離/D2/を
計算する。
(2) Next, the CPU 2 calculates the distance /D2/ of the vector D2.

距離/D2/は2次式で求められる。The distance /D2/ is determined by a quadratic equation.

/D2/=V/(pcx−Pbx)2+(Pcy−Pb
y)”  ’−”””’(1)CP tJ 2は、第4
図CB)に示すように、このベクトル距離、/D2/と
メモリ4の抽出距離C1とを比較する。
/D2/=V/(pcx-Pbx)2+(Pcy-Pb
y)"'-"""'(1) CP tJ 2 is the fourth
As shown in Figure CB), this vector distance /D2/ is compared with the extracted distance C1 of the memory 4.

この抽出距離C1は7曲線を等間隔の候補点で分割t7
.その間の入力点(座標)を間引くためである。。
This extraction distance C1 divides 7 curves into equally spaced candidate points t7
.. This is to thin out the input points (coordinates) between them. .

従って、CPU2は、 /D2/> C1でないなら。Therefore, if CPU2 is not /D2/>C1.

この入力点を間引くため2ステツプ■へ戻る。Return to step 2 to thin out these input points.

−J、CPU2は、2、/D2/> CIなら、この入
力点を候補点として採用し51次の曲率判定(選択点抽
出)ステップに入る。
-J, if 2, /D2/> CI, the CPU 2 adopts this input point as a candidate point and enters the 51st-order curvature determination (selected point extraction) step.

■ CP LJ 2は、メモリ4の前の候補点のベクト
ルDJとその候補点のベクトルD2の差(D2−Dl)
を求める。
■ CP LJ 2 is the difference between the vector DJ of the previous candidate point in the memory 4 and the vector D2 of that candidate point (D2 - Dl)
seek.

第4図(qに示すように、ベクトルD2とDlの差は2
両ベクトル間の変化を示す変化ベクトルであり2曲率に
対応する。
Figure 4 (as shown in q, the difference between vectors D2 and Dl is 2
This is a change vector indicating a change between both vectors, and corresponds to two curvatures.

そし−[、CPU2は、メモリ4の積算変化ベクトルD
Dにこの変化ベクトル(D2−DI)を加算し、積算変
化ベクトルDDを更新する。
Then, the CPU 2 calculates the integrated change vector D in the memory 4.
This change vector (D2-DI) is added to D to update the integrated change vector DD.

この積算変化ベクトルDDは2後述するよう(−2前の
候補点が選択点として選択されると、「0」にリセット
され、前の候補点が選択点として選択さねないと、リセ
・、トされ、ない。
As will be described later, this cumulative change vector DD is reset to "0" when the previous candidate point is selected as the selection point (-2), and if the previous candidate point is not selected as the selection point, it will be reset to 0. There is no error.

このことは、積算変化ベクトルDDは2選択点の次の候
補点における変化ベクトルからの積算値である。
This means that the integrated change vector DD is an integrated value from the change vector at the next candidate point after the two selected points.

例えば、第4図叫に示すJうに 候補点P、が選択点と
して選択された味1合、候補点P2においては積算変化
ベクトル[)■)はベクトルPQ −PiとP2− P
lとの差9即ち選択点P1のベクトルと候mAPzOベ
クトルどのh C(>みとなる。
For example, at the candidate point P, shown in Figure 4, is selected as the selection point, and at the candidate point P2, the integrated change vector [)■) is the vector PQ - Pi and P2 - P.
The difference between 9 and l, that is, the vector of selection point P1 and the candidate mAPzO vector, hC(>m).

−・方、候補点P2が選択点と15、て選択されなかっ
た場合には、候補APat二おける変化ベクトルは候補
点P3のベクトル(P2−P3)と候補点P2のベクト
ル(Pl−P2 )との差であり、積算変化ベクトルD
Dは2選択点P1のベクトルと候補点P2のベクトルの
差(変化ベクトル)に、候補点P3の変化ベクトルを加
えたものとなる。
- On the other hand, if candidate point P2 is not selected as the selection point, the change vector at candidate point P2 is the vector of candidate point P3 (P2-P3) and the vector of candidate point P2 (Pl-P2). and the cumulative change vector D
D is the difference (change vector) between the vector of the two selection points P1 and the vector of the candidate point P2, plus the change vector of the candidate point P3.

従って、積算変化ベクトルDDは、前の選択点P1のベ
クトルを基準とした変化ベクトルの積算である。
Therefore, the cumulative change vector DD is the cumulative change vector based on the vector of the previous selection point P1.

このようにしたのは、候補点P2が選択されない場合に
は選択点P1に戻って曲率を判断しなければならないか
らである。
This is done because if candidate point P2 is not selected, it is necessary to return to selected point P1 and judge the curvature.

■ 次に、CPU2は、積算変化ベクトルDDの絶対値
(距離)を計算し、メモリ4の選択値C2と比較する。
(2) Next, the CPU 2 calculates the absolute value (distance) of the integrated change vector DD and compares it with the selected value C2 of the memory 4.

積算変化ベクトルDDの絶対値が大きいことは。The absolute value of the cumulative change vector DD is large.

曲率が犬であることを示し、小さければ9曲率も小さい
ことを示す。
It shows that the curvature is a dog, and if it is small, it shows that the 9 curvature is also small.

CPU2は、 /DD/> C2でないと判断すると。When CPU2 determines that /DD/>C2 is not the case.

曲率が小さいため、この候補点は選択点として選択しな
くて良いと判断し、ステップ■へ進む。
Since the curvature is small, it is determined that this candidate point does not need to be selected as a selection point, and the process proceeds to step (2).

■ 一方、CPU2は、 /DD/> C2と判断する
と2曲率が大きいため、この候補点Pcを選択点として
採用し、記録部3に記録する。
(2) On the other hand, if the CPU 2 determines that /DD/>C2, the 2 curvature is large, so this candidate point Pc is adopted as the selected point and recorded in the recording unit 3.

これとともに、第4図(5)のように入力座標Pcの軌
跡を表示するデイスプレィ5上に線分Pa −Pcを引
き、第4図(5)のように表示する。
At the same time, a line segment Pa-Pc is drawn on the display 5, which displays the locus of the input coordinate Pc, as shown in FIG. 4(5), and is displayed as shown in FIG. 4(5).

そして、CPU2は、この入力座標Pcをメモリ4の選
択点座標Paに移し、メモリ4の積算変化ベクトルDD
を「0」にリセットし、ステップ■へ進む。
Then, the CPU 2 transfers this input coordinate Pc to the selected point coordinate Pa in the memory 4, and sets the cumulative change vector DD in the memory 4.
Reset to "0" and proceed to step ■.

■ 次に、CPU2は、候補点とした入力座標Pcをメ
モリ4の候補点座標Pbに格納し、その候補点のベクト
ルD2を前の候補点のベクトルD 11−移し、ステッ
プ■へ戻る。
(2) Next, the CPU 2 stores the input coordinates Pc as the candidate point in the candidate point coordinates Pb of the memory 4, transfers the vector D2 of the candidate point to the vector D11- of the previous candidate point, and returns to step (2).

■ 一方、ステップ■で描画終了と判定すると。■ On the other hand, if it is determined that drawing is finished in step ■.

CPU2は、その入力座標Pcを終了点として無条件に
採用し、記録部3へ記録し、デイスプレィ5上に線分P
a −Pcを引く。
The CPU 2 unconditionally adopts the input coordinate Pc as the end point, records it in the recording section 3, and displays the line segment P on the display 5.
a - Subtract Pc.

そして描画終了となる。Then the drawing ends.

このようにして2図形に沿う入力座標列から等間隔に候
補点を抽出し、前の選択点との曲率を求め2曲率が犬な
ら候補点を選択点として選択する。
In this way, candidate points are extracted at equal intervals from the input coordinate string along the two figures, and the curvature with respect to the previous selected point is determined, and if the two curvatures are dog, the candidate points are selected as the selected points.

これを第4区内の例で第5図を用いて説明すると、開始
点POの入力により、メモリ4の各データはSlで示す
如くになる。
This will be explained using FIG. 5 using an example of the fourth section. By inputting the starting point PO, each data in the memory 4 becomes as shown by Sl.

次に座標が入力され、ステップ■、■の判定で。Next, the coordinates are input, and the judgment is made in steps ■ and ■.

候補点P1が抽出されると、各データは第5図の82の
如く変化する。
When candidate point P1 is extracted, each data changes as shown at 82 in FIG.

ここで、ステップ■〜■で候補点P1が選択点と判定さ
れると、即ち/Po−+Px / > CI 、各デー
タは第5図の83の如く変化し、積算変化ベクトルDD
は「0」になる。
Here, when the candidate point P1 is determined to be the selected point in steps ■ to ■, that is, /Po−+Px / > CI, each data changes as shown in 83 in FIG. 5, and the cumulative change vector DD
becomes "0".

次に、座標が入力され、ステップ■、■の判定で、候補
点P2が抽出され、ステップ4で変化ベクトルが計算さ
れると、各データは第5図の84となり、積算変化ベク
トルDDはPl −P2− Pg→P1である。
Next, the coordinates are input, and the candidate point P2 is extracted by the judgments in steps ■ and ■. When the change vector is calculated in step 4, each data becomes 84 in FIG. 5, and the cumulative change vector DD is Pl. -P2- Pg→P1.

この積算変化ベクトルDDが、ステップ■により、C2
未満と判定されると2曲率が小のため。
This integrated change vector DD is changed to C2 by step
If it is determined to be less than 2, the curvature is small.

候補点P2は選択点として選択されず、ステップ■によ
り、第5図の85のデータとなる。
Candidate point P2 is not selected as a selection point, and becomes data 85 in FIG. 5 in step (3).

更に、座標が入力され、候補点P3が抽出され。Furthermore, coordinates are input and candidate point P3 is extracted.

変化ベクトルが計算され、積算変化ベクトルDDが求め
られると、第5図の86のデータとなる。
When the change vector is calculated and the cumulative change vector DD is determined, the data 86 in FIG. 5 is obtained.

以下同様にしてメモリ4の各データが更新される0 これによって、第4区内のように候補点P1〜P8の内
2曲率の犬のPI、 Pal Pal P6. P7t
 paが選択点として選ばれtP2.P4は曲率の小の
ため除かれる。
Thereafter, each data in the memory 4 is updated in the same manner.0 As a result, the PI of the dog with two curvatures among the candidate points P1 to P8 as in the fourth section, Pal Pal P6. P7t
pa is selected as the selection point and tP2. P4 is excluded because of its small curvature.

従って2曲率の小の部分では大まかに、犬の部分では細
かに選択点が得られる。
Therefore, selection points can be roughly obtained in the small portion of two curvatures, and finely in the dog portion.

(b)  他の実施例の説明 本発明は、上述の実施例の他に2次のような変形が可能
である。
(b) Description of other embodiments In addition to the above-described embodiments, the present invention can be modified in the following two ways.

■ 座標入力部1をデジタイザで説明し7たが、マウス
やライトペン等であってもよく、更に例えば薔かれた図
形を読み取り、線分の座標値を検出するものであっても
よい。
(2) Although the coordinate input unit 1 has been described as a digitizer, it may be a mouse, a light pen, or the like, or it may be a device that reads a rose figure and detects the coordinate values of a line segment.

この時、読み取り入力をメモリに蓄積後、  CPUが
座標検出してもよい。
At this time, the CPU may detect the coordinates after storing the read input in the memory.

■ 選択値C2は2曲線の曲率の度合を決める定数で、
小さくする程、座標値採用の割合が増え。
■ The selected value C2 is a constant that determines the degree of curvature of the two curves,
The smaller it is, the more the proportion of coordinate values adopted increases.

よりゆるやかな曲線を再現できる選択点を生成できる。It is possible to generate selection points that can reproduce gentler curves.

■ 又2図形の再現は2選択点を直線で結ぶ直線近似曲
線となる。
■ Also, the reproduction of two figures becomes a straight line approximation curve connecting the two selected points with a straight line.

以上本発明を実施例により説明したが2本発明は本発明
の主旨に従い種々の変形が可能であり。
Although the present invention has been described above using examples, the present invention can be modified in various ways according to the gist of the present invention.

本発明からこれらを排除するものではない。These are not excluded from the present invention.

〔発明の効果〕〔Effect of the invention〕

以上説明した様に2本発明によれば2次の効果を奏する
As explained above, according to the present invention, the following effects can be achieved.

■ 利用者は2曲線を描画するだけで、自動的に折れ線
近似用座標データを作成するので、入力に手間がかから
ない。
■ The user only needs to draw two curves and the coordinate data for polygonal line approximation is automatically created, so there is no need for input.

■ 曲率に応じて自動的に選択点数が変化するので、座
標データの数が少なく且つ曲線の再現性がよい。
(2) Since the number of selected points changes automatically according to the curvature, the number of coordinate data is small and the reproducibility of the curve is good.

■ 再現に特別の関数を用いないで済むので、再現の処
理が容易で且つ高速である。
■ Since no special function is required for reproduction, reproduction processing is easy and fast.

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

第1図は本発明の原理図。 第2図は本発明の一実施例のためのブロック図。 第3図は本発明の一実施例処理フロー図。 第4図及び第5図は本発明の一実施例動作説明図である
。 図中、l・・・座標値入力部。 2・・・処理部。 3・・・記録部。
FIG. 1 is a diagram showing the principle of the present invention. FIG. 2 is a block diagram for one embodiment of the present invention. FIG. 3 is a processing flow diagram of an embodiment of the present invention. FIGS. 4 and 5 are explanatory diagrams of the operation of one embodiment of the present invention. In the figure, l: coordinate value input section. 2...processing section. 3... Recording department.

Claims (1)

【特許請求の範囲】 座標値入力部(1)からの入力図形に沿つた入力座標列
を該処理部(2)で処理し、該入力図形を示す座標値を
抽出し、記憶部(3)に格納する座標処理装置において
、 入力座標列の入力座標を取り込む第1のステップと、 前の候補点座標から該入力座標へのベクトル距離を計算
する第2のステップと、 該ベクトル距離を抽出距離と比較し、該ベクトル距離が
抽出距離を越えた場合、入力座標を候補点として抽出し
、それ以外の場合は第1のステップに戻る第3のステッ
プと、 該候補点のベクトルと前の候補点のベクトルとの変化ベ
クトルを計算し、積算変化ベクトルに加算し、積算変化
ベクトルを更新する第4のステップと、 該積算変化ベクトル値と選択値とを比較し、該積算変化
ベクトル値が選択値以下なら、第1のステップに戻り、
該積算変化ベクトル値が選択値を越えていれば、該候補
点の入力座標を格納座標して選択し、該積算変化ベクト
ルを零にして、第1のステップに戻る第5のステップと
を有することを、 特徴とする図形の座標化処理方法。
[Claims] The input coordinate string along the input figure from the coordinate value input unit (1) is processed by the processing unit (2), coordinate values indicating the input figure are extracted, and the coordinate values are stored in the storage unit (3). A coordinate processing device that stores input coordinates in a coordinate processing device, comprising: a first step of importing input coordinates of an input coordinate string; a second step of calculating a vector distance from the previous candidate point coordinates to the input coordinates; and a second step of calculating the vector distance from the previous candidate point coordinates to the input coordinates. , and if the vector distance exceeds the extraction distance, a third step extracts the input coordinates as a candidate point, otherwise returns to the first step, a vector of the candidate point and the previous candidate. A fourth step of calculating a change vector with respect to the point vector, adding it to the cumulative change vector, and updating the cumulative change vector, and comparing the cumulative change vector value with the selected value, and determining that the cumulative change vector value is selected. If it is less than the value, return to the first step,
If the cumulative change vector value exceeds the selected value, a fifth step includes selecting the input coordinates of the candidate point as storage coordinates, setting the cumulative change vector to zero, and returning to the first step. A figure coordinate processing method characterized by the following.
JP2071258A 1990-03-20 1990-03-20 Processing method for converting graphic to coordinates Pending JPH03271875A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2071258A JPH03271875A (en) 1990-03-20 1990-03-20 Processing method for converting graphic to coordinates

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2071258A JPH03271875A (en) 1990-03-20 1990-03-20 Processing method for converting graphic to coordinates

Publications (1)

Publication Number Publication Date
JPH03271875A true JPH03271875A (en) 1991-12-03

Family

ID=13455516

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2071258A Pending JPH03271875A (en) 1990-03-20 1990-03-20 Processing method for converting graphic to coordinates

Country Status (1)

Country Link
JP (1) JPH03271875A (en)

Similar Documents

Publication Publication Date Title
JP5139716B2 (en) Image search apparatus and image search method
US6035075A (en) Image deforming method and apparatus
JP2010079545A (en) Image processing apparatus, image processing method and program
JPH09282080A (en) Information input method/device
CN111401234B (en) Three-dimensional character model construction method and device and storage medium
JP2010102502A (en) Image processing device, image processing method, and program
JPH03271875A (en) Processing method for converting graphic to coordinates
US6546155B1 (en) System and method for rotation invariant representation of texture in images
Yousefi et al. 3D hand gesture analysis through a real-time gesture search engine
JP2000215315A (en) Graphic classifying method, graphic retrieving method, graphic classification and retrieval system, and recording medium
JP2735197B2 (en) Graphic input device
JP5051174B2 (en) Form dictionary generation device, form identification device, form dictionary generation method, and program
US5471536A (en) Figure digitizing system
JP2949206B2 (en) How to record free-form figures
TWI571753B (en) Electronic calculating apparatus for generating an interaction index map of an image, method thereof and computer program product thereof
JPH11187231A (en) Image retrieving device and image retrieval method
JPH07141508A (en) Shape description device
JPH1125266A (en) Method for converting picture and device therefor
JP2578965B2 (en) Graphic processing unit
JPH10285389A (en) Image-processing method, image-processing unit and recording medium
JP2854588B2 (en) Raster vector conversion method and line figure input device
CN114241378A (en) Method and device for generating transition video, electronic equipment and storage medium
JPH02110796A (en) Handwritten character recognition dictionary creating system
JP2968028B2 (en) Figure input processing method
JPS60245023A (en) Tablet device