JP2801194B2 - Linear component extraction method - Google Patents

Linear component extraction method

Info

Publication number
JP2801194B2
JP2801194B2 JP25506587A JP25506587A JP2801194B2 JP 2801194 B2 JP2801194 B2 JP 2801194B2 JP 25506587 A JP25506587 A JP 25506587A JP 25506587 A JP25506587 A JP 25506587A JP 2801194 B2 JP2801194 B2 JP 2801194B2
Authority
JP
Japan
Prior art keywords
range
input
point
coordinate
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP25506587A
Other languages
Japanese (ja)
Other versions
JPH0196770A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP25506587A priority Critical patent/JP2801194B2/en
Publication of JPH0196770A publication Critical patent/JPH0196770A/en
Application granted granted Critical
Publication of JP2801194B2 publication Critical patent/JP2801194B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は手書き文字や図形などを時系列の座標データ
の標本点系列として入力するシステムにおいて、これら
の点列で表現されている図形から直線を構成する点列を
抽出する直線成分抽出方法に関する。 [従来の技術] 従来、タブレツトなどの座標入力装置から位置座標を
一定の割合でとりこみ、手書きの文字や図形の標本点系
列を表示したり、相手側の表示装置に表示するように伝
送したり、文字認識や図形認識したりするシステムで
は、座標入力装置から得られた標本点系列を、連続する
同一座標点の除去を行う過程でほとんどそのままの形で
保持し利用するように構成されている。 [発明が解決しようとしている問題点] しかしながら、上記のように、筆跡の標本点系列をそ
のまま保存すると、そのために非常に大きな記憶容量を
必要とする上に、処理時間の増大を招く。そのために筆
跡の認識を行なうシステムなどでは、たとえば、ペンが
タブレツトについてから離れるまでをひと区切りとし
て、入力し、この区間の標本点系列から特徴点を抽出
し、これで代表させ以後の処理を行なったりしている。
しかし、特徴点を抽出するまでは標本点系列をすべて保
存しておかねばならず、一筆書きのように、長い筆跡を
ゆっくり書かれた場合にも対応するためには、やはり大
きな記憶容量を必要とする。これは手書き文字認識の場
合はともかくとしても図形入力の場合で、この入力図形
の形で編集を可能とするときに特に問題となる。 [問題点を解決するための手段及び作用] 本発明は、上記問題点を解決するために、入力された
座標データから直線成分を抽出する直線成分抽出方法で
あって、前記座標データから始点を決定し、前記座標デ
ータから直線成分を抽出するための直線化範囲を決定
し、前記始点に続いて入力された座標データが前記直線
化範囲内であるか否かを検出し、前記検出の結果、入力
された座標データが直線化範囲内であると判断された場
合、次に入力された座標データが直線化範囲内であるか
否かを判断するための直線化範囲を再決定し、前記検出
の結果、入力された座標データが直線化範囲外であると
判断された場合、該座標データの前の座標データと始点
データとを直線成分として抽出し、該抽出された直線成
分を記憶することを特徴とする直線成分抽出方法を提供
する。 [実施例] 第1図は本発明の実施例を示す。100は入力端子でこ
こにタブレツト等の座標入力装置からの座標値が逐次入
力される。101,102は遅延手段で、入力端子に入力され
る座標値の入力タイミングに同期して、遅延手段の入力
状態を保持し、次のタイミングになるまで出力をこの状
態に保つものである。103は条件付の遅延手段であっ
て、E−入力の値が真を示す信号であるときに、上記の
入力タイミングになったときのみ、その時点での入力状
態を保持しなおすものである。以上における座標データ
Piは2次元座標(xi,yi)で表わされる。x座標y座標
をそれぞれ16ビツトの2進数で表わすとすると、各遅延
手段は32個のD型フリツプフロツプで実現できる。以後
簡単なため座標データを単にPiとする。104はベクトル
化手段であり、たとえば始点から終点への変位ベクトル
を出力するもので、この場合、to−入力のx座標y座標
からfrom入力のx座標y座標をそれぞれ引いた結果をx
成分、y成分としてまとめてdelta−出力から出力する
ものである。105は範囲逸脱判定手段であり、zone−入
力から入力される“向き”の角度範囲に、from−入力の
点からto−入力の点への向きが入っていたら、out−端
子から偽りを表わす信号を、入っていなかったら真を表
わす信号を出力するものである。これの実現の詳細は後
述する。106は直線化範囲算出手段であり、from−入力
の点からto−入力の点を結んだ線分を直線近似の代表線
とし、続く入力点が同一直線成分となる位置であるかど
うか判定するための、向きの範囲をzone−入力の旧向き
範囲を基に算出し、新しい向き範囲をNzone−出力から
出力するものである。これの実現の詳細は後述する。10
7はスイツチで、S−入力に真を表わす信号を与えると
O−入力の向き範囲をz−出力に出力し、偽りを表わす
信号を与えると、I−入力の向き範囲をZ−出力に出力
するものであり、標準倫理ICのデータセレクタ等を用い
て実現できる。108はFIFOである。これは、E−入力の
値が真を示すときに、入力タイミングになったとき、in
−入力の値をすでに保持している値の列の最後尾に追加
するもので、ここからデータを取り出す場合は、列の先
頭の値から順次出力するものである。これはたとえばMM
I社(モノリシツクメモリーズinc)のC57401を用いるこ
とで実現できる。(このICには、E−入力に相当するも
のがないが、入力タイミングをとるクロツク信号とE入
力との論理積等によって、SHIFTIN信号を作り出すこと
によって実現できる。) 第2図および第3図を用いて本発明の動作を説明す
る。入力クロツクCLK1の立ち上がりの時点をデータ確定
と扱う。すなわち、入力端子100に入力される座標デー
タは、入力クロツクCLK1の立ち上がりに同期して、次の
データへの変化が始まる。本説明では、第2図に示した
ように、座標データがP1,P2,P3,P4,P5,P6のようにサン
プリングされて入力された場合の動作をとり上げ、すで
に遅延手段101には座標P2がラツチされ、遅延手段102に
は前方向の範囲を表わす信号(図中○で表わしている)
がラツチされ、遅延手段103には座標P1がラツチされて
いるものとする。向き範囲の記録方法は、どんな手段を
用いてもかまわないが、たとえば第4図のように右の向
きを0゜とし、反時計回りで1周360゜と数え、範囲の
最初の向きθと範囲を表わす角Siとのペアによって示
せばよい。以後簡単のため向きθと角δのペアを向
き範囲αとする。尚、360゜すべての向きを範囲とす
る場合○で表わすことにする。 直線化範囲算出手段106は、遅延手段103から座標P1
始点として入力し、遅延手段101から座標P2を終点とし
て入力し、このベクトル▲▼の向きθ′と長
さγ′を求める。直線化の閾値を、長さdとすると、
片側変位角ε′を ε′=sin-1 d/γ′ で算出する。そして反時計回で向きθ′−ε′から
向きθ′+ε′を直線化できる向き範囲候補とす
る。そして、遅延手段102から得られる直前の向き範囲
との共通範囲を直線化できる向き範囲としてNzone−出
力から出力する。この場合、遅延手段102から全範囲を
表わす○が入力されるため、向き範囲αは反時計回で
向きθ′−ε′から向きθ′+ε′の範囲とな
る。 範囲逸脱判定手段105は、今算出された向き範囲α
をzone−入力から入力し、遅延手段103から得られる座
標P1を始点、入力端子100から得られる座標P3を終点と
して入力し、このベクトル▲▼の向きが、向き
範囲αに入っているので、偽りを表わす信号fをout
−出力から出力する。 ベクトル化手段104は遅延手段101,103からそれぞれ終
点,始点の座標P2,P1を入力し、ベクトル▲▼
をdelta−出力から出力する。 スイツチ手段107は、S−入力から信号fを入力する
ので、I−入力すなわち直線化範囲算出手段106の出力
の向き範囲αをZ−出力から出力する。 以上の状態でシステムは、次の入力クロツクCLK1の立
ち上がりまで安定する。では、入力クロツクCLK1が立ち
上がり、入力座標がP3からP4に変化する時点になったと
きの動作を説明する。 範囲逸脱判定手段105の出力が信号fなので、遅延手
段103の状態は、次の入力クロツクCLK1の立ち上がりで
は変化しないし、FIFO108に、ベクタ▲▼は追
加されない。遅延手段101は直前の入力である座標P3
出力し、遅延手段102は向き範囲αを出力する。この
状態が入力クロツクCLK1の次の立ち上がりまで持続す
る。直線化範囲算出手段106は、座標P1,P3を入力しベク
トル▲▼をもとに、向きθ′、片側変位角
ε′を求めた上、向きθ′−ε′から向きθ′
+ε′までの範囲と、向き範囲αとの共通範囲、す
なわち第2図における向き範囲αを出力する。範囲逸
脱判定手段105は、この向き範囲αから座標P4がそれ
ているかどうかを判定する。この場合、from−入力、to
−入力からそれぞれ座標P1,P4を入力し、ベクトル▲
の向きが向き範囲α外であるので、信号tを
out−出力から出力する。この信号tを受けてスイツチ1
07はO−入力からのデータをZ−出力から出力する。す
なわち直線化範囲αを無視し、全範囲を表わす向き範
囲○を出力する。これは向きを0゜とし角を360゜と指
定すればよい。また、ベクトル化手段104は▲▼
を出力するようになる。 さらに、入力クロツクCLK1の次の立ち上がりで、入力
座標がP4からP5に変化する時点について説明する。範囲
逸脱判定手段105の出力が信号tなので、遅延手段102,1
03およびFIFO108の状態がここで変化する。すなわち遅
延手段103の出力は直前の入力の座標P3になり、遅延手
段102の出力は向き範囲○になり、FIFO108にはベクトル
▲▼が追加される。そして遅延手段101は座標P
4を出力するようになり、この状態が入力クロツクCLK1
の次の立ち上がりまで持続する。これは、P1P2P3の点列
を直線成分として抽出し、ベクトル▲▼で直線
近似し、さらに座標P3を始点として直線成分抽出する事
前準備ができあがったことになる。同様の動作をP6から
さらに引続いて入力される座標に関し続けることによ
り、点列が直線とみとめられる部分がベクトル化され連
結された直線の形でFIFO108に蓄積されていく。たとえ
ば座標P6が確定し、入力クロツクCLK1が立ち上がった時
点で、入力点列P1P2P3P4P5P6に対し、直線P1P3,直線P3P
5の2つの直線がまとめられ出力され、座標P5を始点と
してさらに直線化を判定していることになる。 直線化範囲算出手段106および範囲逸脱判定手段105
は、ハードウエアロジツクで構成してもかまわないが、
1チツプマイクロコンピユータ等を用いて組込プログラ
ムの形でそれぞれ簡単に実現できる。第6図,第5図に
それぞれ、直線化範囲算出手段106、および範囲逸脱判
定手段105を実現するプログラムのフローチヤートの一
実施例を示す。 直線化範囲算出手段106の実現方法を説明する。ステ
ツプS601でfrom−入力、to−入力、zone−入力からそれ
ぞれ座標(xf,yf)(xt,yt)および向き範囲として、開
始向きθ、角δを入力する。つづいてステツプS602で長
さγ′を で算出する。向きθ′はxの変位、yの変位をそれぞれ
(xt−xf),(yt−yf)とし、これによる正接(tan)
の逆関数、tan-1((xt−xf),(yt−yf))によって
算出する。続いてステツプS603では片側変位角ε′をsi
n-1(d/γ′)で算出する。ここでdは直線成分を抽出
する場合の近似直線からの1成分の限界距離であり、閾
値として利用するものである。続いてステツプS604で入
力始点から入力終点に続く1点を結んだ直線を近似直線
とするときに、入力終点がこの直線からd未満の距離に
なるための条件である、この近似直線の向き範囲を開始
向きをθ′−ε′,内角を2ε′で算出する。そして、
入力された向き範囲(θ,δ)この共通範囲を算出し、
これをαとおく。算出の一例は以下の通り。開始角θ′
をθ′−ε′−θを正規化(0゜以上360゜未満に)
したものとし、終了角θ′をθ′+ε′−θを正規化
したものとする。そしてθ′≦δのときθをθ′
そうでないときθを0、θ′≦δのときθをθ′
そうでないときθをδにする。すると共通範囲α
は、向きがθ+θ、内角がθ′−θ′で算出でき
る。そして続いてステツプS605ではこの共通の向き範囲
αを出力する。そして、ステツプS601に戻って以上の処
理を繰返す。 範囲逸脱判定手段105の実現方法を第5図のフローチ
ヤートに従って説明する。ステツプS501に続いてステツ
プS502を実行するが、これらのステツプは前述のステツ
プS601とステツプS602と同じである。ただしステツプS5
02では長さγ′を計算しなくてもよい。そしてステツプ
S503でθ′がθからθ+δの向きからそれている場合ス
テツプS504に進み、この向きの範囲に入っている場合ス
テツプS505に進む。そしてステツプS504では信号tを出
力し、ステツプS505では信号fを出力しステツプS501に
戻って以上の処理を繰返す。 以上のように、直線化範囲を算出し、この範囲に続く
点を終点とする直線が入るかどうかを判定することによ
り、逐次直線成分の確認を行ないながら、条件に合わな
くなった時点で直線近似データを逐次出力することが可
能となる。 なお、第6図,第5図において単に処理をループさせ
る例で説明したが、入力タイミングに同期して、入力デ
ータが安定する時間待機した上で、それぞれステツプS6
01からS605,ステツプS501からS504,S505まで1回動作す
るようにプログラムしてもよい。 また、厳密さをゆるめることを許せば、近似直線に対
する向き範囲を計算するところで、片側変位角ε′をsi
n-1(d/γ′)としたが、単にC・d/γ′とし、最大値
を90゜におさえるようにしてもいい。Cは、この特性に
合わせた定数で、たとえば360/3.14等のラジアン・度変
換係数を用いる。 また、本実施例では向きの範囲は0゜から360゜の単
位で取扱ったが、これを0から2πのラジアン単位にし
てもかまわないし、0から1の範囲にしてもかまわない
し、n分割し、1からnまでの整数子の量子化した方向
で近似して取扱ってもかまわない。この場合、これらの
単位に応じて範囲逸脱判定手段105、直線化範囲算出手
段106の向き範囲の計算方法を変えればよい。 [他の実施例] 第7図は本発明の他の実施例を示すフローチヤートで
ある。前述実施例では、各手段が平行して動作する例を
あげたが当実施例ではマイクロプロセツサや、点軌跡を
扱うコンピユータシステムのCPU自体のプログラムによ
って、シーケンシヤルな手続によって実現する方法につ
いて述べる。 第7図のプログラムは、入力点列に同期して実行す
る。すなわち、座標入力装置等から1点座標が確定する
ごとに、ステツプS711からS719を実行する。プログラム
の説明にも前述実施例の説明と同様に、第2図のように
座標P1,P2,P3,P4,P5,P6が入力されるものとして説明す
る。そして図中701は始点、702は終点、703は範囲をそ
れぞれ静的に記憶する記憶域であり、具体的には、メモ
リやレジスタ等を利用するものである。そして、始点記
憶701には座標P1、終点記憶702には座標P2、範囲記憶70
3には向き範囲αが記憶されているものとし、ここに
おいて座標P3が入力確定しステツプS711より実行が開始
した場合を想定する。ステツプS711で座標P3をサンプル
点として記憶する。そしてステツプS712で始点記憶701
中の始点P1からサンプル点P2への向きが範囲記憶703中
の向き範囲αに入っているかどうか判定する。第2図
ではサンプル点P2への始点P1よりのベクトルはα内で
あるのでステツプS716に進み、返却値をnilとして記憶
する。ここでnilは直線化できなかったことを示す値で
あり、たとえば長さOのベクトル値で代用すればよい。
そしてステツプS717に進み、ここで、終点記憶702の値
をサンプル点P3で書き換える。そしてステツプS718で始
点記憶701の値から、終点記憶702の値へのベクトルとか
ら次の点の直線化判定のための向き範囲を算出し、その
結果と範囲記憶703の値との共通部分を算出し、この共
通の向き範囲を新しい範囲記憶703の値とする。この場
合向き範囲αに書き換えられる。そしてステツプS719
で上述のようにnilにされた返却値を返して、本処理を
終了する。 次の座標P4が確認したところで、本プログラムが呼び
出される。ステツプS711でサンプル点をP4として記憶す
る。ステツプS712では、ベクトル▲▼は範囲記
憶703の値の向き範囲αに入っていないので、今度は
ステツプS713に進む。ここで返却値を始点記憶701に入
っている点から終点記憶702に入っている点へのベクト
ル▲▼と記憶し、ステツプS714に進む。そして
範囲記憶703の向き範囲を全範囲を表わすように書き替
える。向き範囲を最初の向きθと向き範囲の内角δで表
わす場合は、内角δを360゜にするのみでよい。そして
ステツプS715で終点記憶702の値の座標P3を、始点記憶7
01に書き込む。そして、ステツプS717で終点記憶702の
値として現サンプル点の座標P4を書き込み、ステツプS7
18でベクトル▲▼から次の点の直線化判定のた
めの向き範囲を算出し、その結果である向き範囲α
と、範囲記憶703の値、すなわち全範囲との共通部分
を新しい範囲記憶703の値にする。すなわち向き範囲α
にする。そしてステツプS719に進み、ここで返却値と
したベクトル▲▼を返す。 続いて座標P5の入力時の実行時には、ベクトル▲
が向き範囲α内であるので、終点記憶702が座
標P5、範囲記憶703が向き範囲αに更新され、nilが返
却される。そして座標P6の入力時の実行時には、ベクト
ル▲▼が向き範囲α外であるので、始点記憶
701が座標P5、終点記憶702が座標P6に更新され、範囲記
憶703も更新されたのち、ベクトルP3 が返される。 以上のようにして、座標列P1,P2,P3,P4,P5,P6が逐次
入力されると、ベクトル▲▼3,▲▼がそ
れぞれこの順で返されさらに直線成分の抽出が座標P5
始点として始まっている状態になる。 以上説明したように、標本点系列の部分列に続く一点
を追加しても直線成分である条件を満足する位置範囲を
あらかじめ算出する直線化範囲算出手段を設けることに
より、範囲外になる標本点を入力した時点で、近似直線
を表わす情報を抽出することが可能となった。これによ
り以下の効果がある。 ◎すべての標本点系列を入力し終るまで直線近似結果が
得られないという欠点を解決する。 ◎直線近似できなくなった時点ですぐに直線情報を受け
られる。すなわち、応答が速くなる。 ◎直線近似の軌跡データを扱えるようになり情報量が小
さくなるので、メモリの節約になる上、処理時間も短く
できる。 ◎点列の座標をデジタル値で扱うときの、量子誤差によ
る階段状の軌跡パターンを直線ベクトル化することで、
不要な折れまがり情報を除去できる。 ◎シンプルな軌跡データ(直線近似)が得られるので、
この特徴点(折れまがり点etc)を抽出するのが簡単に
なり、認識処理がしやすくなる。 ◎入力標本点をすべて記憶しておく必要がないので、一
時記憶はほとんど必要なくなる。 ◎パイプライン的に処理が行えるので、入力装置側で本
方式を利用することができるようになり、システム本体
のCPUと処理分散が応答速度の低下をほとんどおこさな
いで可能になる。(全体の処理能力が向上する) ◎ε′=sin-1d/γ′の場合、直線成分のどの点も近似
直線からd以内の距離であるという理想的な近似ができ
る。 ◎ε′=Cd/γ′で最大値を90゜におさえた場合、計算
が単純で、安価な回路、安価なマイクロプロセツサによ
る実現が可能になる。 [発明の効果] 以上説明したように、本発明によれば、入力された座
標点から直線成分を抽出する際に、直線成分を抽出する
ための直線化範囲を逐次決定するので、より高精度な直
線成分を抽出することができる。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a system for inputting handwritten characters and figures as a sample point series of time-series coordinate data. And a method for extracting a straight line component for extracting a sequence of points constituting. [Prior Art] Conventionally, position coordinates are taken in at a fixed rate from a coordinate input device such as a tablet, and a sample point sequence of handwritten characters or figures is displayed or transmitted to be displayed on a display device of the other party. In a system for character recognition or figure recognition, a series of sample points obtained from a coordinate input device is configured to be retained and used almost as it is in a process of removing consecutive identical coordinate points. . [Problems to be Solved by the Invention] However, as described above, when the sample point sequence of handwriting is stored as it is, an extremely large storage capacity is required and the processing time is increased. For this reason, in a system for recognizing handwriting, for example, a pen is input as a break until the pen separates from the tablet, and feature points are extracted from a series of sample points in this section, and are representatively represented for subsequent processing. Or
However, the entire sample point sequence must be saved before extracting the feature points, and a large storage capacity is still necessary to cope with long handwriting, such as a single stroke. And This is a case of inputting a figure anyway in the case of handwritten character recognition, and is particularly problematic when editing is possible in the form of the input figure. [Means and Actions for Solving the Problems] In order to solve the above problems, the present invention provides a straight-line component extraction method for extracting a straight-line component from input coordinate data. Determine, determine a linearization range for extracting a linear component from the coordinate data, detect whether the coordinate data input following the start point is within the linearization range, and determine the result of the detection. If it is determined that the input coordinate data is within the linearization range, then re-determine a linearization range to determine whether the next input coordinate data is within the linearization range, As a result of the detection, when it is determined that the input coordinate data is out of the linearization range, the coordinate data before the coordinate data and the start point data are extracted as a linear component, and the extracted linear component is stored. A straight line characterized by A method for extracting components is provided. Embodiment FIG. 1 shows an embodiment of the present invention. An input terminal 100 is used to sequentially input coordinate values from a coordinate input device such as a tablet. Reference numerals 101 and 102 denote delay means for holding the input state of the delay means in synchronization with the input timing of the coordinate value input to the input terminal, and for keeping the output in this state until the next timing. Numeral 103 denotes a conditional delay means for re-holding the input state at that time only when the above-mentioned input timing is reached when the value of the E- input is a signal indicating true. Coordinate data above
P i is represented by two-dimensional coordinates (x i , y i ). Assuming that the x-coordinate and the y-coordinate are each represented by a 16-bit binary number, each delay means can be realized by 32 D-type flip-flops. Simply referred to as P i coordinate data for later easy. Numeral 104 denotes vectorization means for outputting, for example, a displacement vector from the start point to the end point. In this case, the result obtained by subtracting the x coordinate y coordinate of the from input from the x coordinate y coordinate of the to input is x
The component and the y component are collectively output from the delta-output. Numeral 105 denotes a range departure judging means. If the direction from the from-input point to the to-input point falls within the angle range of the "direction" input from the zone-input, the false is indicated from the out-terminal. It outputs a signal that indicates true if not included. Details of the realization of this will be described later. Reference numeral 106 denotes a linearization range calculation unit that determines a line segment connecting the from-input point to the to-input point as a representative line of the linear approximation, and determines whether or not the subsequent input point is located at the same linear component. For this purpose, the direction range is calculated based on the old direction range of the zone-input, and the new direction range is output from the Nzone-output. Details of the realization of this will be described later. Ten
A switch 7 outputs a direction range of the O-input to the z-output when a signal representing true is given to the S-input, and outputs a direction range of the I-input to the Z-output when a signal representing falseness is given to the S-input. And can be realized by using a data selector of a standard ethics IC or the like. 108 is a FIFO. This means that when the value of the E-input indicates true,
-The value of the input is added to the end of the already held value column, and when data is extracted therefrom, the values are sequentially output from the first value of the column. This is for example MM
It can be realized by using C57401 of Company I (Monolithic Memories Inc.). (There is no equivalent to the E-input in this IC, but it can be realized by generating a SHIFTIN signal by a logical product of a clock signal for taking input timing and the E input, etc.) FIGS. 2 and 3 The operation of the present invention will be described with reference to FIG. Dealing with the time of the rising edge of the input clock CLK 1 and data determination. That is, coordinate data inputted to the input terminal 100 in synchronization with the rising edge of the input clock CLK 1, the change to the next data begins. In this description, as shown in Figure 2, taken up the operation when the coordinate data is input is sampled as P 1, P 2, P 3 , P 4, P 5, P 6, already delayed the means 101 are the coordinates P 2 is latched, the delay means 102 signals representative of the range of forward (representing in figure ○)
There is latched, the delay means 103 shall coordinate P 1 is latched. Although any method may be used to record the direction range, for example, as shown in FIG. 4, the right direction is set to 0 °, the counterclockwise direction is counted as 360 °, and the first direction θ i of the range is counted. And the angle S i representing the range. Hereinafter, for simplicity, a pair of the direction θ i and the angle δ i is defined as a direction range α i . In addition, when all directions are defined as 360 °, they are represented by ○. Straightening range calculation unit 106 inputs from the delay unit 103 coordinates P 1 as the starting point, enter coordinates P 2 as the end point from the delay unit 101, the vector ▲ ▼ 2 orientation theta '2 and length gamma' 2 Ask for. Assuming that the linearization threshold is length d,
The one-sided displacement angle ε ′ 2 is calculated by ε ′ 2 = sin −1 d / γ ′ 2 . Then, the direction θ ′ 2 + ε ′ 2 is set as a direction range candidate that can be linearized from the direction θ ′ 2 −ε ′ 2 in the counterclockwise direction. Then, a common range with the immediately preceding direction range obtained from the delay unit 102 is output from the Nzone-output as a direction range that can be linearized. In this case, since the ○ represents the entire range from the delay means 102 is inputted, the orientation range alpha 1 is in the range from the direction θ '2 -ε' 2 orientation θ '2 + ε' 2 counterclockwise times. The range deviation determination means 105 calculates the direction range α 1 just calculated.
Is input from the zone− input, and the coordinate P 1 obtained from the delay means 103 is input as a start point, and the coordinate P 3 obtained from the input terminal 100 is input as an end point. The direction of the vector ▲ ▼ 3 enters the direction range α 1 Out signal f
-Output from output. The vectorization means 104 inputs the coordinates P 2 and P 1 of the end point and the start point from the delay means 101 and 103, respectively, and outputs the vector ▲ ▼ 2
Is output from the delta-output. Switch means 107, since the input signal f from the S-, and outputs I- input or the orientation range alpha 1 output linearization range calculation means 106 Z- from the output. System or more states is stabilized until the rising of the next input clock CLK 1. So the input clock CLK 1 rising, the input coordinates describing the operation when it is the time point of changing from P 3 to P 4. Since the output signal f of the range deviation determining means 105, the state of the delay means 103, do not change the rising of the next input clock CLK 1, a FIFO 108, vector ▲ ▼ 2 is not added. Delay means 101 outputs the coordinates P 3 is before the input, the delay means 102 outputs the orientation range alpha 1. This condition persists until the next rising edge of the input clock CLK 1. The linearization range calculating means 106 inputs the coordinates P 1 and P 3 , obtains the direction θ ′ 3 and the one-side displacement angle ε ′ 3 based on the vector ▲ ▼ 3 , and obtains the direction θ ′ 3 −ε ′ 3. From the direction θ ' 3
And range up to + epsilon '3, and outputs the orientation range alpha 2 in the common range, i.e. second view of the orientation range alpha 1. Range deviation determining means 105 determines whether the coordinates P 4 from the direction range alpha 2 has it. In this case, from-input, to
-Input the coordinates P 1 and P 4 from the input, and
▼ Since 4 orientation is in the range alpha 2 outer directions, the signal t
out-output from output. In response to this signal t, switch 1
07 outputs the data from the O-input from the Z-output. That ignores the linearized range alpha 2, and outputs the ○ orientation range representing the entire range. This can be done by specifying the direction as 0 ° and the angle as 360 °. Also, the vectorization means 104
3 will be output. Furthermore, at the next rising edge of the input clock CLK 1, the input coordinate is explained when the change from P 4 to P 5. Since the output of the range deviation determining means 105 is the signal t, the delay means 102, 1
03 and the state of FIFO 108 change here. That is, the output of the delay means 103 becomes the coordinate P 3 of the immediately preceding input, the output of the delay means 102 becomes the direction range ○, and the vector ▼▼ 3 is added to the FIFO 108. And the delay means 101 has the coordinates P
4 is output, and this state indicates that the input clock CLK 1
Lasts until the next rise. This means that the preparation for extracting the point sequence of P 1 P 2 P 3 as a straight line component, performing linear approximation with the vector ▲ ▼ 3 , and extracting the straight line component starting from the coordinate P 3 is completed. By continuing concerns a similar operation to the coordinates inputted have further subsequent from P 6, part sequence of points is observed with linear is accumulated in FIFO108 in the form of a straight line connected vectorized. For example to confirm the coordinates P 6 is, when the input clock CLK 1 rises, the input point sequence P 1 P 2 P 3 P 4 P 5 P 6, linear P 1 P 3, linearly P 3 P
5 two lines are summarized output, will have been determined further linearize the coordinates P 5 as the starting point. Linearization range calculation means 106 and range deviation determination means 105
May be configured with hardware logic,
Each of them can be easily realized in the form of an embedded program using a one-chip microcomputer or the like. 6 and 5 show an embodiment of a flowchart of a program for realizing the linearized range calculating means 106 and the range deviation determining means 105, respectively. An implementation method of the linearization range calculation means 106 will be described. In step S601 from- input, to- input, Zone- each coordinate from the input (x f, y f) ( x t, y t) as and orientation range, starting orientation theta, inputs the angular [delta]. Then, in step S602, the length γ ' Is calculated by In the direction θ ′, the displacement of x and the displacement of y are (x t −x f ) and (y t −y f ), respectively.
Tan −1 ((x t −x f ), (y t −y f )). Subsequently, in step S603, the one-sided displacement angle ε ′ is
Calculated as n -1 (d / γ '). Here, d is a limit distance of one component from an approximate straight line when a straight line component is extracted, and is used as a threshold. Subsequently, in step S604, when a straight line connecting one point following the input start point to the input end point is set as an approximate straight line, the direction range of the approximate straight line is a condition for the input end point to be a distance less than d from this straight line. Is calculated with θ′−ε ′ as the start direction and 2ε ′ as the interior angle. And
Input direction range (θ, δ) Calculate this common range,
Let this be α. An example of the calculation is as follows. Start angle θ '
f is normalized to θ'-ε'-θ (from 0 ° to less than 360 °)
It is assumed that the end angle θ ′ t is obtained by normalizing θ ′ + ε′−θ. The theta 'the theta f when f δ θ' f
Otherwise, θ f is set to 0, and θ t is set to θ ′ when θ ′ t ≦ δ.
To δ the θ t when it is not t likely. Then the common range α
Can be calculated by setting the orientation to θ + θ f and the inner angle to θ ′ t −θ ′ f . Subsequently, in step S605, the common orientation range α is output. Then, the process returns to step S601 to repeat the above processing. A method of implementing the range deviation determination means 105 will be described with reference to the flowchart of FIG. After step S501, step S502 is executed, and these steps are the same as the above-described steps S601 and S602. However, step S5
In 02, the length γ 'need not be calculated. And step
If θ ′ deviates from θ in the direction of θ + δ in S503, the process proceeds to step S504, and if θ ′ falls within the range of this direction, the process proceeds to step S505. Then, the signal t is output in step S504, the signal f is output in step S505, and the process returns to step S501 to repeat the above processing. As described above, the linearization range is calculated, and it is determined whether or not a straight line ending at the point following the range is determined. Data can be output sequentially. 6 and 5, the processing is simply described as a loop. However, in synchronization with the input timing, after waiting for a time for the input data to stabilize, step S6 is performed.
The program may be programmed to operate once from step 01 to step S605 and steps S501 to S504 and S505. If the strictness is allowed to be relaxed, the one-sided displacement angle ε 'should be
Although n −1 (d / γ ′) is used, it may be simply set to C · d / γ ′ and the maximum value may be suppressed to 90 °. C is a constant corresponding to this characteristic, and uses a radian-degree conversion coefficient such as 360 / 3.14. Further, in this embodiment, the direction range is handled in units of 0 ° to 360 °, but this may be set in a radian unit of 0 to 2π, or in a range of 0 to 1 or divided into n. Approximately in the quantized direction of integers from 1 to n, it may be handled. In this case, the calculation method of the direction range by the range deviation determination means 105 and the linearization range calculation means 106 may be changed according to these units. [Other Embodiments] FIG. 7 is a flowchart showing another embodiment of the present invention. In the above-described embodiment, an example in which the respective units operate in parallel has been described. In this embodiment, a method of realizing a sequential procedure using a program of a microprocessor or a CPU of a computer system that handles a point locus will be described. The program in FIG. 7 is executed in synchronization with the input point sequence. That is, every time one point coordinates are determined from the coordinate input device or the like, steps S711 to S719 are executed. Similar to the foregoing description embodiments in the description of the program, a description will be given assuming that the coordinates P 1 as in the Figure 2, P 2, P 3, P 4, P 5, P 6 are input. In the figure, reference numeral 701 denotes a start point, 702 denotes an end point, and 703 denotes a storage area for statically storing a range. Specifically, a memory area, a register, and the like are used. The start point memory 701 has the coordinates P 1 , the end point memory 702 has the coordinates P 2 , the range memory 70
The 3 shall orientation range alpha 1 is stored in the coordinate P 3 now assume that input confirmation run from step S711 starts. Storing the coordinates P 3 as a sample point in step S711. Then, in step S712, the starting point memory 701
It determines whether the direction from the start point P 1 in the sample point P 2 is in the orientation range alpha 1 in range storage 703. In the FIG. 2 because the vector than the start point P 1 to a sample point P 2 is within alpha 1 proceeds to step S716, and stores the return value as nil. Here, nil is a value indicating that linearization could not be performed, and for example, a vector value of length O may be substituted.
The process advances to step S717, where, rewrites the value of the end point storage 702 at the sample point P 3. Then, in step S718, the direction range for determining the linearization of the next point is calculated from the value of the start point memory 701 and the vector to the value of the end point memory 702, and the intersection of the result and the value of the range memory 703 is calculated. Then, this common orientation range is set as the value of the new range storage 703. It is rewritten in this case facing range alpha 2. And step S719
Then, the return value set to nil as described above is returned, and this processing ends. When the next coordinate P 4 is confirmed, this program is called. Storing sample points as P 4 at step S711. In step S712, since the vector ▲ ▼ 4 is not in the orientation range alpha 2 value in the range storage 703, now it proceeds to step S713. Here, the return value is stored as a vector ▲ ▼ 3 from the point stored in the start point memory 701 to the point stored in the end point memory 702, and the flow advances to step S714. Then, the direction range of the range memory 703 is rewritten so as to represent the entire range. When the orientation range is represented by the initial orientation θ and the interior angle δ of the orientation range, the interior angle δ only needs to be 360 °. Then, in step S715, the coordinates P 3 of the value of the end point memory 702 are stored in the start point memory 7.
Write to 01. The write the coordinates P 4 of the current sample point as the value of the end point storage 702 in step S717, step S7
In 18, the direction range for linearization determination of the next point is calculated from the vector ▲ ▼ 4 , and the resulting direction range α
3 and the value of the range storage 703, that is, the common part with the entire range is set as a new value of the range storage 703. That is, the orientation range α
Make 3 Then, the process proceeds to a step S719, where the vector ▲ ▼ 3 is returned as a return value. Then at the time of execution at the time of input of coordinates P 5 is, vector ▲
▼ Because 5 is within the range alpha 3 orientation, the end point storage 702 is updated to the coordinate P 5, range alpha 4 range storage 703 orientation, nil is returned. And when running on input coordinates P 6 are vector ▲ ▼ because 6 is in the range alpha 4 outer directions, the starting point storage
701 coordinates P 5, the end point storage 702 is updated to the coordinate P 6, after the range storage 703 also been updated, the returned vector P 3 5. As described above, when the coordinate strings P 1 , P 2 , P 3 , P 4 , P 5 , and P 6 are sequentially input, the vectors ▲ ▼ 3 , ▲ ▼ 5 are returned in this order, respectively, and the linear component in a state where the extraction has begun the coordinates P 5 as a starting point. As described above, even if one point subsequent to the subsequence of the sample point series is added, the linearization range calculation means for calculating the position range satisfying the condition of the linear component in advance is provided. At the time when is input, it is possible to extract information representing an approximate straight line. This has the following effects. To solve the drawback that a linear approximation result cannot be obtained until all sample point sequences have been input. ◎ You can receive straight line information immediately when you can no longer approximate the straight line. That is, the response becomes faster. ◎ Since it becomes possible to handle the locus data of the linear approximation and the amount of information is reduced, the memory can be saved and the processing time can be shortened. ◎ By converting the stepwise trajectory pattern due to quantum error into a linear vector when treating the coordinates of the point sequence with digital values,
Unnecessary folding information can be removed. ◎ Since simple trajectory data (linear approximation) can be obtained,
It is easy to extract this feature point (folding point etc.), and the recognition process becomes easy. Since there is no need to store all input sample points, temporary storage is almost unnecessary. ◎ Since the processing can be performed in a pipeline, the present method can be used on the input device side, and the CPU and the processing of the system main unit can be distributed with almost no reduction in response speed. (The overall processing capacity is improved.) Ε In the case of ε ′ = sin −1 d / γ ′, an ideal approximation that every point of the linear component is within a distance d from the approximate line can be obtained. When the maximum value is kept at 90 ° by ε ′ = Cd / γ ′, the calculation is simple, and it can be realized by an inexpensive circuit and an inexpensive microprocessor. [Effects of the Invention] As described above, according to the present invention, when a linear component is extracted from an input coordinate point, a linearization range for extracting the linear component is sequentially determined, so that higher accuracy is achieved. A simple linear component can be extracted.

【図面の簡単な説明】 第1図は本発明を実施した直線成分抽出方法のブロツク
図。 第2図は入力座標点系列の説明図。 第3図は本発明のタイミングチヤート。 第4図は向きの範囲の表現の説明図。 第5図は範囲逸脱判定手段のプログラム実施例を示す
図。 第6図は直線化範囲算出手段のプログラム実施例を示す
図。 第7図は本発明の他の実施例で、すべてプログラムで実
現した場合のプログラム実施例を示す図。 101,102,103は遅延手段、104はベクトル化手段、105は
範囲逸脱判定手段、106は直線化範囲算出手段、107はス
イツチ、P1,P2,P3,P4,P5,P6は入力座標、α123,
αは直線化範囲、701は始点記憶、702は終点記憶、70
3は範囲記憶。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of a straight-line component extraction method embodying the present invention. FIG. 2 is an explanatory diagram of an input coordinate point sequence. FIG. 3 is a timing chart of the present invention. FIG. 4 is an explanatory diagram of an expression of a direction range. FIG. 5 is a diagram showing a program embodiment of a range deviation determining means. FIG. 6 is a diagram showing a program embodiment of a linearization range calculating means. FIG. 7 is a diagram showing another embodiment of the present invention, which is a program embodiment in the case where all the components are realized by a program. 101, 102 and 103 delay means, 104 vectorization means, range deviation determining means 105, the linearization range calculation means 106, 107 switch, P 1, P 2, P 3, P 4, P 5, P 6 is input coordinates , Α 1 , α 2 , α 3 ,
alpha 4 is linearized range, 701 starting storage, 702 endpoint storage, 70
3 is range memory.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06T 5/00──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int. Cl. 6 , DB name) G06T 5/00

Claims (1)

(57)【特許請求の範囲】 1.入力された座標データから直線成分を抽出する直線
成分抽出方法であって、 前記座標データから始点を決定し、 前記座標データから直線成分を抽出するための直線化範
囲を決定し、 前記始点に続いて入力された座標データが前記直線化範
囲内であるか否かを検出し、 前記検出の結果、入力された座標データが直線化範囲内
であると判断された場合、次に入力された座標データが
直線化範囲内であるか否かを判断するための直線化範囲
を再決定し、 前記検出の結果、入力された座標データが直線化範囲外
であると判断された場合、 該座標データの前の座標データと始点データとを直線成
分として抽出し、該抽出された直線成分を記憶すること
を特徴とする直線成分抽出方法。
(57) [Claims] A linear component extraction method for extracting a linear component from input coordinate data, comprising: determining a starting point from the coordinate data; determining a linearization range for extracting a linear component from the coordinate data; Detecting whether or not the input coordinate data is within the linearization range, and determining that the input coordinate data is within the linearization range as a result of the detection, The linearization range for determining whether the data is within the linearization range is re-determined. If the result of the detection is that the input coordinate data is determined to be outside the linearization range, the coordinate data And extracting the coordinate data and the starting point data before the step (c) as a straight line component, and storing the extracted straight line component.
JP25506587A 1987-10-09 1987-10-09 Linear component extraction method Expired - Fee Related JP2801194B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25506587A JP2801194B2 (en) 1987-10-09 1987-10-09 Linear component extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25506587A JP2801194B2 (en) 1987-10-09 1987-10-09 Linear component extraction method

Publications (2)

Publication Number Publication Date
JPH0196770A JPH0196770A (en) 1989-04-14
JP2801194B2 true JP2801194B2 (en) 1998-09-21

Family

ID=17273656

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25506587A Expired - Fee Related JP2801194B2 (en) 1987-10-09 1987-10-09 Linear component extraction method

Country Status (1)

Country Link
JP (1) JP2801194B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02310783A (en) * 1989-05-26 1990-12-26 Hitachi Ltd Curve interpolating system
JP2006139366A (en) * 2004-11-10 2006-06-01 Namco Ltd Program, information storage medium, and approximate line decision processing unit
WO2015141260A1 (en) 2014-03-17 2015-09-24 株式会社河合楽器製作所 Handwritten music notation recognition device and program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57106977A (en) * 1980-12-24 1982-07-03 Ricoh Co Ltd Line-picture information conversion system
JPS57212585A (en) * 1981-06-25 1982-12-27 Fujitsu Ltd Shape discriminating device

Also Published As

Publication number Publication date
JPH0196770A (en) 1989-04-14

Similar Documents

Publication Publication Date Title
US4153897A (en) Method and device for detecting the similarity between standard and unknown patterns
CN113119116B (en) Mechanical arm motion planning method and device, readable storage medium and mechanical arm
WO2022016927A1 (en) Image processing method and apparatus, terminal device, and storage medium
JP2801194B2 (en) Linear component extraction method
US5819219A (en) Digital signal processor arrangement and method for comparing feature vectors
US3280314A (en) Digital circuitry for determining a binary square root
CN110827334B (en) Deformation field determining method, determining device, terminal device and readable storage medium
CN115982310A (en) Link table generation method with verification function and electronic equipment
US10908902B2 (en) Distance based branch prediction and detection of potential call and potential return instructions
CN110941730B (en) Retrieval method and device based on human face feature data migration
US10782968B2 (en) Rapid substring detection within a data element string
US20200192969A9 (en) Systems and methods for encoding, decoding, and matching signals using ssm models
US20230361778A1 (en) Devices, systems, and methods for digital filtering
CN111326216B (en) Rapid partitioning method for big data gene sequencing file
US2965298A (en) Signal comparison system
US20220067494A1 (en) Accelerating device, data storing device, data processing system and operating method of accelerating device
RU2580803C1 (en) Device for information search
RU2030785C1 (en) Computing device
KR101730711B1 (en) Method and apparatus for restoring drawing order of stroke
JP4187612B2 (en) A computer that performs dynamic programming method calculations at high speed
CN116030203A (en) Robot, method and device for creating map points and readable storage medium
JPS62160592A (en) Picture normalizing device
JPS62154078A (en) Extraction system for feature point in recognition of online hand-written character
JPH1097620A (en) Method for approximating circle or circular arc
Min et al. A comparative study of pattern matching algorithms on sequences

Legal Events

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