JP2667834B2 - Figure editing apparatus and method - Google Patents

Figure editing apparatus and method

Info

Publication number
JP2667834B2
JP2667834B2 JP62228713A JP22871387A JP2667834B2 JP 2667834 B2 JP2667834 B2 JP 2667834B2 JP 62228713 A JP62228713 A JP 62228713A JP 22871387 A JP22871387 A JP 22871387A JP 2667834 B2 JP2667834 B2 JP 2667834B2
Authority
JP
Japan
Prior art keywords
point
interest
stdata
pos
contour
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
JP62228713A
Other languages
Japanese (ja)
Other versions
JPS6471769A (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 JP62228713A priority Critical patent/JP2667834B2/en
Priority to US07/242,138 priority patent/US5073957A/en
Priority to DE3844832A priority patent/DE3844832C2/en
Priority to DE3830990A priority patent/DE3830990A1/en
Priority to DE3844735A priority patent/DE3844735C2/en
Publication of JPS6471769A publication Critical patent/JPS6471769A/en
Application granted granted Critical
Publication of JP2667834B2 publication Critical patent/JP2667834B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Dot-Matrix Printers And Others (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

【発明の詳細な説明】 「産業上の利用分野」 本発明は、注目点の編集を行う図形編集装置及び方法
に関する。 「従来の技術」 近年電算写植はもとより、より高密度化されたLSIを
用いたワークステーション、高解像度ビットマップ画像
データを出力可能なレーザービームプリンタ等の普及に
より、電子的な文書、図形の編集システムが開発されて
いる。このようなシステムにおいては予め用意しなけれ
ばならない文字図形パターンの多種多様さが要求され
る。つまり、多くの文字種、多くの書体、多くの出力サ
イズ等が要求され、これらを安価に実現するための方策
として、ビットパターンのラン・レングス圧縮、文字図
形のベクトルコーディング等が既に提案、実施されてい
る。ここで、圧縮方法はどうであれビットパターンで用
意する場合、上記の要求を広く満たすことは現実として
「不可能」であり、これをより幅広く満たすため近年で
はベクトルコーディングが一般化されつつある。ただ
し、ベクトルコーディングは出力に際する再生の美し
さ、十分なデータの圧縮度を得るためにはコーディング
に際し、非常に手間と審美的(単に数字的でない)精度
が要求される。上記要求とそれに必要な労力は相反する
ものであり、上記要求を重視した場合は大サイズ原図形
を例えば紙やフィルム等に書き下ろし、タブレット・デ
ジタイザで代表点を座標化する方法が一般的である。ま
た、コーディングに際する労力削減を重視した場合、基
となるアナログ図形を例えば走査型ラインセンサ等でア
ナログ・デジタル変換した後、輪郭線抽出をし、しかる
後に輪郭線上の特徴点をある解析アルゴリズムを用いて
選び出すという方法が提案されている。(特開昭58−81
383) しかしながら、タブレット・デジタイザ等で逐一画像
を入力する場合の労力は膨大であり、かつ精度は原図形
の質、オペレータに大きく依存し、不安定である。 また、後例のようなアナログ・デジタル変換後に自動
解析する方法にも以下のような重大な欠点がある。 1.自動解析の方法が完全でない場合、再生の美しさや十
分なデータの圧縮度を得ることが出来ない。 2.アナログ・デジタル変換に使用するセンサーの2値化
閾値(白/黒境界)により、輪郭太さに最低2ドット
(太さをもつ輪郭の双方端で1ドットずつ)の誤差が生
じる。 3.項目1、2をより完全にしようとする場合、元となる
アナログ図形そのものを整備しなければならない。つま
り、現実として十分に大きな図形であり、輪郭境界やエ
ッジが十分にシャープでなければならず、前例として述
べたタブレットデジタイザによる入力の労力と同等、ま
たはそれ以上の手間になる可能性がある。 4.項目3の手間を省き、誤差をノイズとして削除しよう
とすると、本来の形を部分的に、または大きく失う可能
性がある。例えば、漢字「毛」の横線に見られる微妙に
傾きを持った線が、単純な横線と認識されたり、非常に
小さな曲率のカーブが直線エッジと誤認されるといった
恐れがある。 結局、上記のような問題点等の現実的妥協点として、
自動解析後(これで本来の作業の70%程度が満たされ
る)、改めて全く別のベクトル図形編集ツールを用いて
仕上げることになる。 以上のようにコーディングすべき文字図形の知的(自
動解析不可能)な部分は再編集するという2度手間とな
る欠点があった。 「目的」 以上の点に鑑み、本発明は、注目点を基準の座標値に
揃えることができる図形編集装置及び方法を提供するこ
とを目的とする。 「実施例」 以下、図面を用いて本発明に係る図形編集装置を詳細
に説明する。 第1−1図は本発明を適用した図形編集装置のブロッ
ク図である。尚、本発明における図形は文字、その他の
画像を含むものである。また、本発明の機能は実施例の
ように複数の機器から成るシステムにおいて達成されて
も良いし、単体の機器において達成されても良いことは
言うまでもない。 1は本装置の制御部であり、マイクロ・コンピュータ
2、RAM(Random Access Memory)、ROM等で構成される
内部メモリ6、ハード・ディスク、フロッピー・ディス
ク、あるいはカートリッジ・ディスク3、4、5等で構
成される外部記憶装置を備えている。 7は画像入力装置で、原稿台に載置された画像をCCD
等の撮像素子によって電気信号化(A/D変換)する原稿
リーダである。 8は画像出力部で、レーザビームプリンタ等の電気信
号化された情報に基き記録材上に像記録する高速プリン
タ9である。 10は本装置の制御情報等を表示するCRT装置であっ
て、本願発明の画像処理表示部である。 11はキーボードであって、これを操作することにより
本装置の動作指令などの行なう。また、12はCRT10上で
画像情報を加工指示するためのポインティング・デバイ
スで、CRT10上のカーソルをX、Y方向任意に移動して
コマンドメニュー上のコマンドイメージ等を選択してそ
の指示をしたり、CRT10上に表示された図形の任意の点
を座標情報として入力することができる。 13はVRAMで表示部10に表示すべきデータをビットマッ
プ上に展開している。 6はプログラム・メモリ(PMEM)で、編集処理のため
のプログラムを適宜ハード・ディスク3から選択し実行
する。 本装置により入力、演算処理を施したデータはイメー
ジメモリIMEM14上に展開することができ、前述出力部8
より出力する。 15はBMU(ビット・マニュピュレーション・ユニッ
ト)で、VRAM13、PMEM6、IMEM14相互間のデータ転送をC
PUを介さずに行うDMA転送が可能で、転送に際しビット
単位の論理演算、展開図形の回転、変倍等の機能を有し
ている。 第1−2図は第1−1図で示すようなシステムを用い
て本装置を実現したときのシステムブロック図である。 G0、G1、及びG2はグラフィックメモリとして第1−1
図IMEM14に各々別々に割り当てられており、画像入力装
置7から入力されるアナログ画像データはA/D変換して
2値化された後、先ずG0に一時記憶される。C1、C2、C
3、C4、C5、C6、C7及びC8は本装置を作動させるシステ
ムソフトウェアで、第1−1図3の外部記憶装置よりプ
ログラムとしてPMEM6に読み出され、MPU2により制御・
実行される。M1及びM2は輪郭抽出部C1より解読された点
情報及び注目点抽出部C2より抽出される注目点情報を一
時記憶するためのメモリで、PMEM6に必要に応じて領域
確保される。V0、V1は表示用のビデオメモリで、VRAM13
に割り当てられ、CRT10に表示するに際し、表示選択部C
3より各々を表示するか否か切り換え可能なものであ
る。 第2図(a)は前述の如く画像入力装置7より入力さ
れグラフィックメモリG0に一時記憶されたビットマップ
2値画像を示す。 第2図及び第3図フローチャートは輪郭抽出部C1によ
り、輪郭部分のビットのみを抽出する手段を示す。本輪
郭抽出方法において、最も重要な要素として、抽出され
る輪郭点は入力されたビットマップ画像(a)の輪郭の
「内のり」を抽出することである。もし、輪郭の「外の
り」を抽出すると、元の図形の画像部と非画像部の比率
を変化させてしまうことになるからである。 ここに第2図(b)、(c)、(d)、及び(e)は
IMEM14上に(a)と同じサイズの領域を確保した別領域
G1、(f)は同様に確保した別領域G2である。また、第
3図各ステップにおける転写は第1−1図BMU15を機能
させて以下に述べるビット単位の論理演算とともに、メ
モリのブロック転送を行うものである。つまり、転送元
メモリをS、転送先メモリをD、[and]は論理積を、
[or]は論理和を、はSの否定を行う論理演算とする
と、 である。 上記のように輪郭抽出されたビットマップ(f)を
(g)で示すような輪郭追跡マスクを用いて輪郭追跡を
行ない、(h)のようなベクトル点座標情報を得ること
ができる。(g)におけるは輪郭追跡の中心点、〜
は輪郭追跡に際し次の輪郭点を決定するための優先度
順を表している。 第2図(a)〜(f)及び(h)は本処理部分の説明
を行う目的で、簡略化してあるが、実際にはビットマッ
プサイズはこれより大きく、また、入力されるアナログ
画像は元来シャープなものでない為、第2図(i)に示
す如く直線部も、微細なノイズを含めたベクトル点の集
合となる。 前述の輪郭抽出部C1により求められた輪郭点は点座標
の集合として点座標記憶部M1に格納される。 第4図(a)及び(b)は点座標記憶部M1において輪
郭を表現する点座標の集合を記憶するための輪郭情報及
び点情報の構造を示す図である。両者は各々配列として
記憶されている。 第4図(a)輪郭情報は以下の2種のメンバ、即ち、
spnoは点情報配列に於ける輪郭開始点を表す配列の番
号、effcntは文字図形パターンを構成している点座標配
列の要素数を表す。 第4図(b)点情報は以下の6種のメンバ、即ち、st
noは後述第8図における注目点の集合の説明で述べる注
目点配列の配列番号を示す値で、初期値として−1がセ
ットされる。pgnoはその点が何番めの輪郭に属するかを
示す値、即ち、輪郭情報配列の配列番号。flagは後述の
整形、単純化のための操作を反映するためのフラグ情報
で、初期値として0がセットされる。posはその点の座
標情報を(x、y)で表す値。prnoとnxnoは点情報のつ
ながりを表す情報で、各々直前の点情報を示す点情報配
列の配列番号、及び直後の点情報を示す点情報配列の配
列番号がセットされる。 説明を具体化する為、第4図(c)に示すような文字
図形パターン「旺」を記憶した場合の輪郭情報と点情報
の内容を第4図(d)及び(e)に示す。 第4図(d)は(c)に示す文字図形パターン「旺」
が4つの輪郭で構成されていることを表しており、例え
ば輪郭の1番目stpoly[0]の場合、spnoには輪郭開始
点を表す点情報配列における配列の番号0を、effcntに
は1つ目の輪郭を構成する点座標配列の要素数aがセッ
トされる。 第4図(e)は(c)に示す文字図形パターン「旺」
を構成する点情報配列の内容を表しており、例えばP
[0]の場合、stdata[0]のstnoには初期値の−1、
pgnoには何番めの輪郭に属するかを示す0、flagには初
期値の0、posには点座標(x,y)、prnoには直前の点情
報を示すa−1及びnxnoには直後の点情報を示す1がセ
ットされる。 第9図は本システムがもつ各機能の実行開始を指定す
る機能選択部C4と表示の切換を指定する表示選択部C3を
示す図で、ポインティング・デバイス12、またはキーボ
ード11の入力により、その機能を任意に選択することが
できる。 ファンクション1が入力されるとプログラム1が作動
し、そのコマンドを実行することができる。例えば、注
目点抽出部C2により、ファンクション1に追加選択、フ
ァンクション2に新規選択、各機能実行部C5により、フ
ァンクション3に区間削除、ファンクション6に整列、
表示選択部C3により、ファンクション9にオリジナル表
示、ファンクション10に編集中のベクタ表示が割り当て
られている。 ファンクション1、またはファンクション2が入力さ
れると、後述第6図において説明する注目点を抽出する
プログラムが作動し、他のコマンドが指定されるまで連
続して注目点を抽出することが出来る。ファンクション
3が入力されると、後述第11図において説明する区間削
除を行うことができる。ファンクション6が入力される
と、後述第14図及び第15図において説明する整列を行う
ことができる。ファンクション9が入力されると、後述
第5図において説明する輪郭を表現する点座標の集合を
表示することができる。ファンクション10が入力される
と後述第13図において説明する輪郭を表現する点座標の
集合と、これに関連づけられた注目点の集合を直線で表
示することができる。これらは各機能実行部C5、及び表
示部C7及びC8にて実行される。 前述第9図においてファンクション9が入力される
と、表示選択部C3において表示部1 C7のオリジナル表示
が選択される。 第5図は輪郭を表現する点座標の集合を表示する表示
部1 C7の作用を説明するフローチャートで、step1では
表示する輪郭の順を制御する制御変数poly_noに初期値
として0がセットされる。 step2では第4図(d)に示す輪郭情報の終了を判定
し、輪郭終了の際は表示を終了する。 step3、step4、及びstep5は各輪郭開始点に於ける初
期設定で、変数st_no及びcur_noには輪郭開始点の点情
報配列番号、pos_eには前記輪郭開始点の座標値がセッ
トされる。 step6、step7、及びstep8はstep9における直線表示関
数LINEの引数として直線表示開始点pos_e、直線表示終
了点pos_eをセットする。 ここに関数LINE(V0,pos_s,pos_e)におけるV0は表示
メモリとして第1−2図V0を指定し、pos_S及びpos_eは
ともに前述表示メモリV0上の座標値(x,y)を表すもの
である。 step10は現在表示中の輪郭の終了を判定する繰り返し
制御部である。終了の場合、step11において制御変数po
ly_noを1加算してstep2へ制御を移し、終了でない場
合、即ち、輪郭が継続している場合、step6へ制御を移
す。 前述第9図においてファンクション1、またはファン
クション2が入力されると、注目点抽出部C2が起動さ
れ、点座標の集合より1つ、または複数の注目点を注目
することができる。 第6図は点座標の集合より1つ、または複数の注目点
を抽出する注目点抽出部C2を説明するフローチャートで
ある。演算子[ ]はA[B]としたとき、配列Aにお
ける配列要素Bの内容を取り出し、演算子 . はA.B
としたとき、データAに属するメンバBの内容を取り出
す。 step1は初期設定である。即ち、ポインティング・デ
バイス12によって表示部のある1点として指定された座
標値をposにセットする。検索する輪郭の順を制御する
制御変数poly_noに0をセットする。抽出されるべき座
標点候補とposとの2点間の距離を表す変数minに十分に
大きい値として10000をセットする。また、本フローの
終了時にセットされる注目点配列番号を変数noに対し初
期値として−1をセットする。これはフローで該当する
注目点が得られなかった場合、そのままエラー値とする
ためである。 step2は第4図(d)に示す輪郭情報の終了を判定
し、輪郭終了の際は後述のstep13へ制御が移る。 step3は各輪郭開始点における初期設定で、点情報配
列の順を制御する制御変数st、及び変数snには輪郭開始
点の点情報配列番号がセットされる。 step4及びstep5はpos及び判定の対象となる現在座標s
tdata[st].posの(x,y)座標値各々が表示部の文字図
形パターンを構成する座標系の範囲内にあるか否か、各
成分毎の距離を比較する関数EXTENTを実行する。その結
果が偽(=0)ならば後述のstep10へ、結果が真(=
1)ならば次のステップへ制御が移る。 step6は候補となる点座標が既に削除されているか否
かの判定を行い、削除されている点ならば後述のstep10
に制御を移す。 step7は比較対象になっている点情報配列中の座標値s
tdata[st].posと前述ポインディング・デバイスによ
り指定された座標値posとの2点間の距離を計算し、そ
の結果を変数distにセットする。 step8は前述の変数minとstep7により得られた変数dis
tを比較する。dist<minが成り立つ場合、step9にて代
入計算min=dist及びno=stを実行する。即ち、変数no
にはその時点での抽出点候補の点情報配列番号がセット
される。step10は制御変数stに次の点情報配列番号stda
ta[st].nxnoを代入し、step11は現在検索中の輪郭の
終了を判定する繰り返し制御部である。終了の場合、st
ep12において制御変数poly_noを1加算し、step2へ制御
を移し、終了でない、即ち、輪郭が継続している場合、
step4へ制御を移す。 step13は以上の演算により、抽出点が得られたか否か
を判定する。つまり、step13においてnoの値が−1であ
れば、該当する抽出点は存在しないことが判定され、こ
の場合、step16にて警告音を出す等する。 step14は本処理において新たに注目点が抽出された場
合の後述第8図に示す処理である。 step15は注目点として抽出されたことを、後述第7図
に示す図のように、画面上に小円を表示する等する。 第8図は文字図形パターン「旺」を表現する点座標の
集合M1と、注目点として第6図で示された手段によって
stdata[n]、stdata[n+a]、stdata[n+b]、
stdata[n+c]、及びstdata[n+d]が抽出された
場合の、注目点の集合M2を関連させる構造を示す図であ
る。また、前述第6図の説明におけるstep15の1例を第
7図に示す。 注目点の集合は前述第4図(b)において説明される
点情報と同様な構造を持つ情報の配列として記憶される
が、注目点の集合の場合、メンバprnoには注目点として
点情報配列のどの要素が抽出されたのか関連させるため
の点情報配列番号がセットされる。また、その時点での
注目点配列要素数を表す変数cstcntがあり、初期値とし
て0がセットされる。 第6図に示す手段によって抽出された点の点情報配列
番号がn、その時点での変数cstcnt=jであった場合、
第8図に示す如く、点座標情報stdata[n]及び注目点
情報stackp[j]には、以下のように両者を関連させる
情報が各々セットされる。 即ち、注目点配列jにおける情報として、stackp
[j].flagに抽出された点のstdata[n].flag、stac
kp[j].posにstdata[n].pos、及びstackp[j].p
rnoに点情報配列番号nが記録される。また、点情報配
列nにおける情報としてstdata[n].stnoにはその時
点での注目点配列要素数cstcntの内容(=j)がセット
されると同時にstdata[n].flagには注目点として抽
出されたことを示すフラグビットOr_SELがセットされ
る。 以降、点stdata[n]に対し後述する整形、単純化の
為の操作が与えられた場合にはstakp[j]の内容が更
新される。さらに編集の終了など注目点配列の内容を点
情報配列に反映させる場合はstackp[cstcnt]の内容を
stdata[stackp[cstcnt].prno]にセットすれば良い
ことになる。 第10図は指定された操作を行う区間を注目点記憶部M2
より特定するための手段を説明するフローチャートであ
る。 step1は本機能の初期設定である。即ち、ポインティ
ング・デバイス12によって表示部のある1点として指定
された座標値をposにセットする。検索する注目点配列
の順を制御する制御変数st_noに0をセットする。区間
を特定されるべき座標候補点とposとの2点間の距離を
表す変数minに十分に大きな値として10000をセットす
る。また、本フローの終了時にセットされる注目点配列
番号を変数noに対し初期値として−1をセットする。こ
れはフローで該当する注目点が得られなかった場合、そ
のままエラー値とするためである。 step2は前述注目点配列要素数cstcntと比較すること
によって、現在検索中の注目点配列の終了を判定する。 step3は注目点配列要素中の点情報配列番号を変数o_n
oにセットする。 step4は候補となる点座標が、注目点として抽出され
ていたか否かを判定し、抽出されていなかったならば、
本機能として適当でないので終了する。 step5は候補となる点座標が既に削除されているか否
かの判定を行い、削除されているならば、後述のstep11
へ制御を移す。 step6、step7はpos及び判定の対象となる現在座標sta
ckp[st_no].posの(x,y)座標値各々が、表示部の文
字図形パターンを構成する座標系の範囲内にあるか否
か、各成分毎の距離を比較する関数EXTENTを実行する。
その結果が偽(=0)ならば、範囲外であり、後述のst
ep11へ制御を移し、結果が真(=1)ならば範囲内にあ
り、次のステップへ制御が移る。 step8は比較対象になっている注目点配列中の座標値s
tackp[st_no].posとposの2点間の距離を計算し、そ
の結果を変数distにセットする。 step9は前述の変数minとstep8により得られた変数dis
tを比較する。dist<minが成り立つ場合、step10におい
て代入計算min=dist、no=st_noを実行する。即ち、変
数noにはその時点での区間を特定するための注目点配列
番号がセットされる。 step11はstep2において注目点配列が終了であると判
断されるまで、制御変数st_noを1加算し、step2へ制御
を移す。 前述第9図においてファンクション3が入力される
と、各機能実行部C5が起動され、区間削除を行うことが
できる。 第11図は輪郭を表現する点座標の集合と、これに関連
づけられた注目点の集合に対し、指定された操作を反映
させる構造を示す図である。 以下、指定された操作が区間削除の場合の処理を第11
図にける図を用いて説明する。 stdata[n]から、stdata[n+m]までのデータの
うち、第6図に示す手段を用いて、例えば注目点stdata
[n+a]、stdata[n+b]、stdata[n+c]、及
びstdata[n+d]を抽出する。これらを抽出する順番
は任意で良いが、説明簡単のためこの4点を抽出する直
前の変数cstcnt=j、4点がn+a、n+b、n+c、
n+dの順に抽出された場合を仮定する。例えば、座標
点stdata[n+a]が抽出され、注目点情報stackp
[j]と関連づけられる方法は前述第8図において説明
したとおりである。本処理の直後、変数cstcntは1加算
され、同様に座標点stdata[n+b]、[n+c]、
[n+d]が抽出された後、変数cstcntには値j+4が
セットされることになる。 次に、ポインティング・デバイス12により、点n+
a、n+bで結ばれた直線上に近い任意の点が指定され
ると、第10図で示した手段を用いて点情報配列てのシー
ケンスにおいて直前の注目点、即ち、stdata[n+a]
と直後の注目点、即ち、stdata[n+b]が指定された
操作を行う区間として、注目点の集合より特定される。 区間が特定されると、stdata[n+a]からstdata
[n+b]までの点座標全てを結んでいた直線群が消去
され、新たにstdata[n+a].posとstdata[n+
b].posを結ぶ直線が表示される。点座標の集合stdata
と注目点の集合stackpに本操作を反映させる場合、以下
の2段階の処理を行う。まず第1段階として、stdata
[n+a]に対応する注目点配列のstackp[j].flag
に、区間削除開始フラグ(ST_SDEL)を、stdata[n+
b]に対応する注目点配列のstackp[j+1].flagに
区間削除終了フラグ(ST_EDEL)をセットする。次に、
ポインティング・デバイス12で新たに区間が指定される
か、ファンクションキーによって他のコマンドが選択さ
れると、第2段階として第12図に示すように、stackp
[j]・flagから区間削除開始フラグ(ST_SDEL)が消
去され、stackp[j+1].flagから区間削除終了フラ
グ(ST_EDEL)が消去される。また、stdata[n+a+
1]からstdata[n+b−1]までのflagに削除フラグ
(OR_DEL)がセットされる。このように2段階で行う理
由はオペレータが誤って、意図する以外の区間を指定し
た場合の回復のためであり、次の動作を起す前であれ
ば、可逆であることを目的としている。また、区間削除
コマンドは他のコマンドが新たに指定されるまで連続指
定が可能であり、ポインティング・デバイス12により他
の区間、例えばstdata[n+b]とstdata[n+c]の
間、stdata[n+c]とstdata[n+b]の間が指定さ
れると、以上の処理を繰り返し行うことが出来る。 前述第9図においてファンクション6が入力される
と、各機能実行部C5が起動され、指定された区間におい
て整列を行うことができる。 第14図及び第15図は特定された注目点の座標を、基準
となる座標値の座標成分と置き換え、かつ、前述区間内
にある点座標の集合を全て省略するための構造を示した
図である。 第14図に示す図で、例えば点A、B、C、‥‥、Lに
ついて、区間AB、CD、KLをある太さを持った水平線、区
間DE、FG、HI、JKをある太さを持った垂直線として編集
し、区間AB、CD、KLを人のy座標に整列させ、区間の中
の輪郭上の点を削除、区間DE、FG、HI、JKを任意のx座
標に整列させ、区間の中の輪郭上の点を削除する場合を
例として以下に示す。 stdata[n]から、stdata[n+m]までのデータの
うち、第6図に示す手段を用いて、例えばAの近辺の点
stdata[n+a]、Bの近辺の点stdata[n+b]、‥
‥、Lの近辺の点stdata[n+1]を抽出する。これを
抽出する順番は任意で良いが、説明簡単のためこの12点
を抽出する直前の変数cstcnt=j、12点がn+a、n+
b、‥‥、n+1の順に抽出された場合を仮定する。例
えば、座標点stdata[n+a]が抽出され、注目点情報
stackp[j]と関連づけられる方法は前述第8図におい
て説明したとおりである。本処理の直後、変数cstcntは
1加算され、同様に座標点stdata[n+b]、‥‥、st
data[n+1]が抽出された後、変数cstcntには値j+
12がセットされることになる。この状態でポインティン
グ・デバイス12、またはキーボード11によってファンク
ション6が入力され整列のコマンドが選択されると画面
上の矢印カーソルがクロスヘアカーソルになり、例え
ば、区間ABの直線上に近い任意の点が前述カーソルによ
って指定された場合、第10図で示した手段を用いて点情
報配列でのシーケンスにおいて直前の注目点、即ち、st
data[n+a]と直後の注目点、即ち、stdata[n+
b]が指定された操作を行う区間として、注目点の集合
より特定される。 ただし、この場合本機能では変更をすべき座標成分を
特定する手段を以下の方法で決定している。即ち、第16
図において図中のクロスヘアカーソルの位置が基準座標
として固定され、P1とP2の間が指定された操作を行う区
間として特定された場合、各々の(x、y)座標を用い
て、slp=(P1.pos.y−P2.pos.y)/(P1.pos.x−2P.po
s.x)、slp=slp*slpの計算式が実行される。slpの値
が、0.25以下ならばy座標の整列とみなし、それ以外は
x座標の整列とみなす。従って、P1とP2はP1′とP2′の
ようにX座標に整列される。ただし、斜線で示した部
分、即ち、slpの値が、0.25以上かつ4以下の場合につ
いてはx座標y座標のどちらに整列するべきか判断しか
ねるため、このコマンドは何もしない。 上記により、第14図においてstdata[n+a]とstda
ta[n+b]の間が特定されるとslp=(stdata[n+
a].pos.y−stdata[n+b].pos.y)/(stdata[n
+a].pos.x−stdata[n+b].pos.x)、slp=slp*
slpの計算式が実行され、slpの値は容易に0.25以下であ
ると判断出来るのでy座標に整列される。この整列の処
理は第11図及び第12図において説明する区間削除の機能
と点の移動という機能により構成されている。従って、
stdata[n+a+1]からstdata[n+b−1]までを
区間削除の機能を用いるため、stackp[j].flagに区
間削除開始フラグ(ST_SDEL)が、stackp[j+1].fl
agに区間削除終了フラグ(ST_EDEL)がセットされる。
さらに、変更すべき座標成分のstdata[n+a].pos.y
の値と基準となる座標成分のpos.yの値が違っているな
らば、注目点配列の内容が点情報配列に反映される際、
点が移動していることを表すためにstackp[j].flag
に点移動フラグ(ST_MOV)がセットされ基準となる座標
成分posの中味が変更すべきstackp[j].posにセット
される。この点移動の処理はstdata[n+b]について
も同様である。 本コマンドは別のファンクションが選択されるまで連
続指示が可能であるので注目点配列の内容が点情報配列
に反映されるのは次の区間が特定された場合と別のファ
ンクションキーが入力された場合である。この時の処理
は第11図及び第12図の説明で述べた区間削除の場合と同
様である。但し、点の移動についてはstackp[j].pos
の値がstdata[n+a].posにセットされ、stackp
[j].flagから点移動フラグ(ST_MOV)が消去され
る。反映された結果を第15図に示す。 また、クロスヘアカーソルで基準座標が固定されて
も、キーボード11の矢印キーにより上下左右に1ドット
ずつ移動させて微調整を行うことができる。この時、基
準座標からのカーソルの移動量が画面の所定の位置に表
示される。従って区間ABを整列した後、矢印キーによっ
て区間CDまで移動させると、結果的にstdata[n+
c].pos.y−stdata[n+b].pos.yとして、文字図形
パターンの直線の太さを求めることができる。この処理
により、他の直線について整列する場合においても容易
に直線の太さを均一にすることが可能となる。 以上区間ABを例にして述べたが、他の区間についても
同様である。 前述第9図においてファンクション10が入力される
と、表示選択部C3において表示部2 C8の編集中のベクタ
表示が選択される。 第13図は輪郭を表現する点座標の集合と、これに関連
づけられた注目点の集合を直線で表示する表示部の作用
を説明するフローチャートである。 step1は表示する輪郭の順を制御する制御変数poly_no
に初期値として0がセットされる。 step2は第4図(d)に示す輪郭情報の終了を判定
し、輪郭終了の際は表示を終了する。 step3、step4は各輪郭開始点における初期設定で、変
数st_noには輪郭開始点の点情報配列番号、pos_eには前
記輪郭開始点の座標値がセットされる。 step5、step6はstep7において直線を表示する点座標
が削除点か否か判定するため変数cur_noには点情報配列
番号として、stdata[st_no].nxno、変数p_noには注目
点配列番号として、stdata[cur_no].stnoがセットさ
れる。 step7において、その点座標が削除点として判断され
た、即ち、削除フラグ(OR_DELまたはST_DEL)がセット
されている場合はstep5へ制御を移す。削除点でないと
判断された場合はstep8において、step12における直線
表示関数LINEの引数として、直線表示開始点pos_sをセ
ットする。ここに関数LINE(V0,pos_s,pos_e)における
V0はグラフィックメモリ(例えば第1−1図VRAM13)の
アドレス等を含む出力先を特定する値、pos_s及びpos_e
は前述グラフィックメモリ上の座標値(x,y)を表すも
のである。 step9は直線表示終了点が、注目点として抽出されて
いるか否かを判定し、注目点の場合はstep11においてpo
s_eにstackp[p_no).posをセットし、注目点の場合はs
tep10においてpos_eにstdata[cur_no].posをセットす
る。 step12は前述までに得られたpos_s、pos_eを用いて直
線を表示する。 step13は現在表示中の輪郭の終了を判定する繰り返し
制御部である。終了の場合、step14において制御変数po
ly_noを1加算してstep2へ制御を移し、終了でない、即
ち、輪郭が継続している場合、step5へ制御を移す。 前述第9図においてファンクション9またはファンク
ション10が入力されると、表示選択部C3が起動され、フ
ァンクション9の場合、表示部1 C7によりオリジナル表
示を、ファンクション10の場合、表示部2 C8により編集
中のベクタを表示することができる。 表示部1 C7は点情報記憶部M1の情報を表示メモリ0 V0
に表示する。表示すためのフローチャートは前述第5図
において説明したとおりである。また、表示部2 C8は注
目点記憶部M2の情報を表示メモリ1 V1に表示する。表示
するためのフローチャートは前述第13図において説明し
たとおりである。 さらに、前述表示切換部C3によ、表示するVRAM13の切
換を行ない、オリジナルを表示するまたは表示しない、
編集中のベクタを表示するまたは表示しないを独立に選
択できる。 このコマンドにより、現在編集中のものとオリジナル
を容易に比較することができ、基の文字図形パターンに
より近い文字図形パターンへと編集が可能になる 「他の実施例」 第1−1図画像入力用リーダ7は元となるアナログ図
形をデジタル変換可能な機器であればその種類を問わな
い。また、本実施例では画像入力用リーダよりアナログ
・デジタル変換された図形より、輪郭上の点座標を抽出
するとなっているが、元々デジタルデータで作成された
ビットマップデータであっても構わない。つまり、例え
ばワークステーションや本装置を構成している機器が持
つデジタル図形編集機能を用いて作成された図形より再
び本件の編集に供するものであってもよい。 表示用メモリ13及び表示装置10はVRAMやビットマップ
ディスプレイに限らない。例えば、VRAMを持たず、コマ
ンド解釈型のラスタ走査、または蓄積型表示装置でもよ
い。ポインティング・デバイスはライトペン等であって
もよく、また、キーボード等を用いてこれに代用可能な
場合、特になくても構わない。BMU15も特別なハードウ
ェアを用意しなくてもソフトウェアで制御されるメモリ
転送手段があれば構わない。以上のように本実施例の機
器構成は本図形装置を高速化するための手段として用意
されたものが多く、これらをより安価な機器に置き換え
る、または省略することも可能である。 「効果」 以上詳述したように、本発明によれば、注目点を基準
の座標値に揃えることができる。
The present invention relates to a graphic editing apparatus and method for editing a point of interest.
About. "Conventional technology" In recent years, in addition to computer typesetting, higher density LSI
Workstation used, high resolution bitmap image
Widespread use of laser beam printers that can output data
More electronic document and figure editing systems have been developed
I have. In such a system, you must prepare
A wide variety of character and graphic patterns
You. That is, many character types, many typefaces, many output
Are required, and measures to realize these at low cost
Run-length compression of bit patterns, character diagrams
Shape vector coding has already been proposed and implemented.
You. Here, regardless of the compression method, the bit pattern is used.
In reality, meeting the above requirements broadly is
"Impossible" and in recent years to meet this more broadly
Is being generalized for vector coding. However
And vector coding makes the output look beautiful
Now, coding to get sufficient data compression
Very laborious and aesthetic (not just numerical) accuracy
Is required. The above requirements and the effort required for them conflict with each other.
Large size original figure
For example on a piece of paper or film, and then
A general method is to digitize a representative point with a digitizer. Ma
When emphasis is placed on reducing the coding effort,
The analog figure that becomes
After analog-to-digital conversion, extract contour lines
Later, feature points on the contour line are analyzed using an analysis algorithm.
A method of selecting is proposed. (JP-A-58-81
383) However, each image is obtained with a tablet digitizer, etc.
Input is enormous, and the accuracy is
Quality is highly dependent on the operator and unstable. Also, after analog / digital conversion as in the later example, automatic
The analysis method also has the following serious drawbacks. 1.If the method of automatic analysis is not perfect,
It is not possible to obtain sufficient data compression. 2. Binarization of sensor used for analog / digital conversion
At least 2 dots in outline thickness depending on threshold (white / black boundary)
(One dot at each end of the thick outline)
I will. 3. If you want to complete items 1 and 2 more completely,
The analog figure itself must be maintained. Toes
It is a sufficiently large figure in reality,
Edge must be sharp enough, and
Equivalent to the input effort of a solid tablet digitizer, or
May be more troublesome. 4. Eliminate the trouble of item 3 and remove errors as noise
Can lose the original shape partially or significantly
There is. For example, the subtle lines that appear on the horizontal line of the kanji "hair"
A line with a slope is recognized as a simple horizontal line,
A curve with a small curvature is mistaken for a straight edge.
There is fear. After all, as a practical compromise, such as the above problems,
After automatic analysis (this satisfies 70% of the original work)
Again) using a completely different vector graphics editing tool
It will be finished. As described above
The part that cannot be analyzed) has to be re-edited twice.
There were drawbacks. [Purpose] In view of the above points, the present invention sets the point of interest to the reference coordinate value.
PROBLEM TO BE SOLVED: To provide a graphic editing device and method capable of aligning
aimed to. "Embodiment" Hereinafter, a figure editing apparatus according to the present invention will be described in detail with reference to the drawings.
Will be described. FIG. 1-1 is a block diagram of a graphic editing apparatus to which the present invention is applied.
FIG. In the present invention, figures are characters, other
It includes an image. The function of the present invention is
As achieved in a system consisting of multiple devices
What can be achieved in a single device
Needless to say. Reference numeral 1 denotes a control unit of the apparatus, which is a microcomputer
2. Consists of RAM (Random Access Memory), ROM, etc.
Internal memory 6, hard disk, floppy disk
Or cartridge discs 3, 4, 5, etc.
External storage device to be configured. Reference numeral 7 denotes an image input device for CCD-reading an image placed on a platen.
Originals converted to electrical signals (A / D conversion) by an image sensor such as
Leader. Reference numeral 8 denotes an image output unit, which is used to transmit an electric
High-speed pudding that records an image on a recording material based on encoded information
It is 9. Reference numeral 10 denotes a CRT device for displaying control information of the device.
The image processing display unit of the present invention. 11 is a keyboard, which is operated by
Performs operation commands for this device. 12 is on CRT10
Pointing device for processing instructions of image information
Move the cursor on the CRT10 to X and Y directions.
Select a command image, etc. on the command menu and select
Instructions or any point on the graphic displayed on the CRT10
Can be input as coordinate information. Reference numeral 13 denotes a VRAM, which is a bit map of data to be displayed on the display unit 10.
It is being deployed on the web. 6 is a program memory (PMEM) for editing processing
Select the appropriate program from the hard disk 3 and execute it
I do. Data that has been input and processed by this device
It can be expanded on the J-memory IMEM14, and the output unit 8
Output more. 15 is BMU (Bit Manipulation Unit)
Data transfer between VRAM13, PMEM6 and IMEM14
It is possible to perform DMA transfer without going through the PU, and transfer bits
It has functions such as logical operation of unit, rotation of expanded figure, scaling, etc.
ing. 1-2 uses the system shown in FIG. 1-1.
3 is a system block diagram when the present device is realized. G0, G1, and G2 are the 1-1th as a graphic memory.
Fig. IMM14
The analog image data input from the device 7 is A / D converted
After the binarization, it is first temporarily stored in G0. C1, C2, C
3, C4, C5, C6, C7 and C8 are the system
From the external storage device shown in Fig.
Is read out to PMEM6 as a program and controlled by MPU2.
Be executed. M1 and M2 are points decoded by the contour extraction unit C1
Information and attention point information extracted from the attention point extraction unit C2
A memory for storing when necessary.
Secured. V0 and V1 are video memories for display, and VRAM13
To display on the CRT10
It is possible to switch whether to display each from 3
You. FIG. 2 (a) shows an image input from the image input device 7 as described above.
Bitmap temporarily stored in graphic memory G0
3 shows a binary image. FIG. 2 and FIG. 3 are flowcharts by the contour extracting unit C1.
Means for extracting only the bits of the contour portion. Main wheel
The most important factor in the Guo extraction method is
Contour points of the input bitmap image (a)
It is to extract "inside". If the contour "outside
Is extracted, the ratio of the image part and non-image part of the original figure
Because it will change. Here, FIGS. 2 (b), (c), (d) and (e)
Another area that secures the same size area as (a) on IMEM14
G1 and (f) are separate areas G2 similarly secured. Also,
Fig. 3 Transfer of each step functions BMU15 in Fig. 1-1
In addition to the bit-wise logical operation described below,
This is to perform memory block transfer. In other words, the transfer source
The memory is S, the destination memory is D, and [and] is the logical product,
[Or] is a logical sum, and is a logical operation that negates S
When, It is. The outline extracted bitmap (f) as described above
Contour tracking using a contour tracking mask as shown in (g)
To obtain vector point coordinate information as shown in (h)
Can be. (G) is the center point of contour tracking,
Is the priority for determining the next contour point in contour tracking
The order is shown. 2 (a) to 2 (f) and 2 (h) are explanations of this processing part.
For simplicity, the bitmap is actually
The size is larger than this, and
Since the image is not originally sharp, it is shown in Fig. 2 (i).
The linear part is also a collection of vector points including minute noise.
Be combined. The contour points obtained by the aforementioned contour extraction unit C1 are point coordinates
Are stored in the point coordinate storage unit M1. 4 (a) and 4 (b) show the ring in the point coordinate storage unit M1.
Contour information for storing a set of point coordinates
FIG. 4 is a diagram showing a structure of point information. Both are as arrays
It is remembered. FIG. 4 (a) outline information includes the following two types of members:
spno is the array number indicating the contour start point in the point information array.
No., effcnt is the point coordinate arrangement that constitutes the character graphic pattern.
Indicates the number of elements in the column. FIG. 4 (b) shows the following six types of members: st
no is described later in the description of the set of points of interest in FIG.
A value indicating the array element number of the eye point array.
Is set. pgno tells what number the contour belongs to
The indicated value, that is, the array element number of the contour information array. flag is described below
Flag information to reflect operations for formatting and simplification
Then, 0 is set as an initial value. pos is the position of the point
A value representing target information by (x, y). prno and nxno are point information
Point information distribution that indicates the last-minute point information.
The array number of the column and the arrangement of the point information array
The column number is set. Characters as shown in FIG.
Outline information and point information when the figure pattern "O" is stored
Are shown in FIGS. 4 (d) and (e). FIG. 4 (d) shows the character / graphic pattern "O" shown in (c).
Is composed of four contours.
In the case of the first stpoly [0] of the contour, the contour starts in spno
The array number 0 in the point information array representing the point is set to effcnt
Is set to the number a of elements in the point coordinate array that constitutes the first contour.
Is FIG. 4 (e) shows the character / graphic pattern “O” shown in FIG. 4 (c).
Represents the contents of the point information array constituting
In the case of [0], the stno of stdata [0] has an initial value of −1,
pgno indicates the number of the contour that belongs to 0, and flag indicates the
Period value 0, pos is point coordinates (x, y), and prno is the previous point information.
The information a-1 and nxno indicate the point information immediately after, and 1 indicates the information.
Is set. Figure 9 specifies the execution start of each function of this system.
Function selection section C4 and display selection section C3
In the illustration shown, the pointing device 12 or keyboard
The function can be arbitrarily selected by inputting the code 11.
it can. Program 1 operates when function 1 is input
Then you can execute the command. For example, note
Additional selection to function 1 and
Function 2 is newly selected, and each function execution unit C5
Delete section in function 3, align to function 6,
The display selection section C3 allows the function 9 to display the original table.
Shown, the vector display being edited is assigned to function 10.
Have been. Function 1 or Function 2 is input
Then, the point of interest described later in FIG. 6 is extracted.
The program runs and continues until another command is specified.
Subsequently, a point of interest can be extracted. function
3 is input, the section deletion described later with reference to FIG. 11 is performed.
Can be removed. Function 6 is input
And the alignment described later with reference to FIGS. 14 and 15 is performed.
be able to. When the function 9 is input, it will be described later.
A set of point coordinates expressing the contour described in FIG.
Can be displayed. Function 10 is input
And the point coordinates that express the contour described in FIG. 13 below.
The set and the set of points of interest associated with it are represented by a straight line.
Can be shown. These are each function execution unit C5 and table.
It is executed by the indicators C7 and C8. Function 9 is input in FIG. 9 described above.
And in display selection section C3, the original display of display section 1 C7
Is selected. Fig. 5 shows a display that shows a set of point coordinates representing the contour.
Part 1 C7 is a flow chart explaining the operation of C7.
Initial value for control variable poly_no that controls the order of contours to be displayed
Is set as 0. In step 2, the end of the contour information shown in FIG.
When the contour ends, the display ends. step3, step4, and step5 are the first at each contour start point
In the initial setting, the variables st_no and cur_no contain
The coordinate number of the contour start point is set in the report array number pos_e.
Is Step6, step7, and step8 are the line display functions in step9.
Line display start point pos_e, line display end as arguments of number LINE
Set the end point pos_e. Here, V0 in the function LINE (V0, pos_s, pos_e) is displayed
Figure 1-2 V0 is specified as the memory, and pos_S and pos_e are
Both represent coordinate values (x, y) on the display memory V0 described above.
It is. Step 10 is an iteration to determine the end of the currently displayed contour
It is a control unit. In the case of termination, in step 11, the control variable po
Add 1 to ly_no and transfer control to step2.
In other words, if the contour is continuing, control is transferred to step 6.
You. Function 1 or fan in FIG. 9
When the action 2 is input, the attention point extraction unit C2 is activated.
Focus on one or more points of interest from a set of point coordinates
can do. Figure 6 shows one or more points of interest from a set of point coordinates
Is a flowchart illustrating the attention point extracting unit C2 for extracting
is there. When the operator [] is A [B], the array A
, The contents of the array element B, and the operator. Is AB
And extract the contents of member B belonging to data A
You. step1 is the initial setting. That is, the pointing device
A seat designated by the vise 12 as a point with a display
Set the standard value to pos. Control the order of contours searched
Set 0 to the control variable poly_no. Zodiac to be extracted
Enough for the variable min that represents the distance between the two candidate points and pos
Set 10000 as a large value. Also, in this flow
The attention point array number set at the end is first set for the variable no.
Set -1 as the period value. This applies in the flow
If the point of interest is not obtained, the error value is used as it is.
That's why. Step 2 determines the end of the contour information shown in FIG.
However, when the contour ends, the control moves to step 13 described later. step3 is the initial setting at each contour start point,
Contour start for control variables st and sn controlling row order
The point information array number of the point is set. step4 and step5 are pos and the current coordinate s to be judged
Each (x, y) coordinate value of tdata [st] .pos is a character diagram on the display
Whether or not it is within the range of the coordinate system that constitutes the shape pattern,
Execute the function EXTENT that compares the distances of each component. The result
If the result is false (= 0), go to step 10 described below, and if the result is true (=
If 1), the control moves to the next step. Step 6 is whether or not the candidate point coordinates have already been deleted
Is determined, and if it has been deleted, step 10
Transfer control to. step7 is the coordinate value s in the point information array to be compared
According to tdata [st] .pos and the above-mentioned pointing device
Calculates the distance between the two points and the specified coordinate value pos.
Is set to the variable dist. step8 is the above variable min and the variable dis obtained by step7
Compare t. If dist <min holds, step 9
Perform the input calculations min = dist and no = st. That is, the variable no
Is set to the point information array number of the extraction point candidate at that time.
Is done. step10 is the next point information array number stda in the control variable st
ta [st] .nxno is substituted, and step11 is
It is a repetition control unit that determines the end. On termination, st
In ep12, add 1 to the control variable poly_no and control to step2
And if it is not the end, that is, if the contour continues,
Transfer control to step4. In step 13, whether or not the extraction point was obtained by the above operation
Is determined. That is, the value of no is -1 in step 13.
If it is determined that there is no corresponding extraction point,
In the case of, an alarm is sounded in step16. step14 is when a new point of interest is extracted in this process.
The processing is shown in FIG. Step 15 was extracted as a point of interest, as shown in FIG.
For example, a small circle is displayed on the screen as shown in FIG. FIG. 8 shows the point coordinates of the character graphic pattern “O”.
By the set M1 and the means shown in FIG.
stdata [n], stdata [n + a], stdata [n + b],
stdata [n + c] and stdata [n + d] are extracted
FIG. 9 is a diagram showing a structure for associating a set of attention points M2 in the case.
You. In addition, one example of step 15 in the explanation of FIG.
It shows in FIG. The set of points of interest is described in FIG. 4 (b).
Stored as an array of information with the same structure as point information
Is a set of points of interest, the member prno has
To associate which element of the point information array was extracted
Is set. Also, at that time
There is a variable cstcnt that represents the number of elements of the point-of-interest array.
0 is set. Point information array of points extracted by the means shown in FIG.
If the number is n and the variable cstcnt = j at that time,
As shown in FIG. 8, the point coordinate information stdata [n] and the point of interest
The information stackp [j] associates the two as follows
Information is set respectively. That is, as information in the attention point array j, stackp
Stdata [n] .flag, stac of the point extracted in [j] .flag
kp [j] .pos to stdata [n] .pos and stackp [j] .p
The point information array number n is recorded in rno. Also, point information distribution
Stdata [n] .stno as information in column n
Set the contents (= j) of the number cstcnt of the point of interest array elements at the point
At the same time as stdata [n] .flag
Flag bit Or_SEL is set to indicate
You. Hereafter, for the point stdata [n],
The operation of stakp [j] is updated
Be renewed. Furthermore, mark the contents of the point of interest array such as the end of editing
To reflect the information in the information array, use the contents of stackp [cstcnt].
Just set it to stdata [stackp [cstcnt] .prno]
Will be. FIG. 10 shows a section in which a designated operation is performed, a point of interest storage unit M2.
It is a flow chart explaining the means for specifying more.
You. step1 is the initial setting of this function. That is, pointy
Designated as one point with a display by the device 12
Set the specified coordinate value to pos. Attention point array to search
0 is set to the control variable st_no that controls the order of. section
The distance between the coordinate candidate point to be specified and pos
Set variable min to 10000 as a sufficiently large value
You. Attention point array set at the end of this flow
The number is set to −1 as an initial value for the variable no. This
This is because if the flow does not yield the relevant point of interest,
This is because the error value remains unchanged. Step2 is to compare with the above-mentioned attention point array element number cstcnt
Thus, the end of the attention point array currently being searched is determined. In step 3, the point information array number in the target point array element is set to the variable o_n
Set to o. In step 4, candidate point coordinates are extracted as points of interest.
It is determined whether or not it has been extracted, and if it has not been extracted,
Since this function is not appropriate, the process ends. Step 5 is whether or not the candidate point coordinates have already been deleted
And if it has been deleted, step 11 described later
Transfer control to step6 and step7 are pos and the current coordinate sta to be determined
Each (x, y) coordinate value of ckp [st_no] .pos is the text of the display.
Whether it is within the range of the coordinate system that composes the character figure pattern
Or, execute the function EXTENT for comparing the distance of each component.
If the result is false (= 0), it is out of range, and st
If control is transferred to ep11 and the result is true (= 1), it is within the range.
Control is transferred to the next step. step8 is the coordinate value s in the target point array to be compared
calculate the distance between the two points tackp [st_no] .pos and pos,
Is set to the variable dist. step9 is the variable min mentioned above and the variable dis obtained by step8
Compare t. If dist <min holds, step 10
And execute substitution calculation min = dist, no = st_no. That is,
An attention point array for specifying the section at that time in the number no
The number is set. In step 11, it is determined that the attention point array is finished in step 2.
Until interrupted, add 1 to control variable st_no and control to step2
Transfer. Function 3 is input in FIG. 9 described above.
Then, each function execution unit C5 is started and the section can be deleted.
it can. Figure 11 shows a set of point coordinates representing the contour and related
Reflects the specified operation on the set of attached points of interest
It is a figure showing the structure made to be. Hereinafter, the processing when the specified operation is section deletion is described as the eleventh processing.
It will be described with reference to the drawings. of data from stdata [n] to stdata [n + m]
Among them, using the means shown in FIG.
[N + a], stdata [n + b], stdata [n + c], and
And stdata [n + d] are extracted. Order to extract these
Is arbitrary, but for simplicity of explanation, these four points are directly extracted.
Previous variable cstcnt = j, 4 points are n + a, n + b, n + c,
It is assumed that the data is extracted in the order of n + d. For example, coordinates
The point stdata [n + a] is extracted, and the attention point information stackp
The method associated with [j] is explained in FIG.
As you did. Immediately after this processing, the variable cstcnt is incremented by 1.
Similarly, coordinate points stdata [n + b], [n + c],
After [n + d] is extracted, the value j + 4 is stored in the variable cstcnt.
Will be set. Next, by the pointing device 12, the point n +
An arbitrary point near the straight line connected by a, n + b is specified
Then, using the means shown in FIG.
The last point of interest in Kens, that is, stdata [n + a]
And the point of interest immediately after, that is, stdata [n + b] is specified
The section in which the operation is performed is specified from a set of attention points. When the section is specified, stdata [n + a]
Lines connecting all point coordinates up to [n + b] are deleted
And newly added stdata [n + a] .pos and stdata [n +
b] A straight line connecting .pos is displayed. Set of point coordinates stdata
When this operation is reflected in the set stackp of attention points and
Is performed in two stages. First, as the first stage, stdata
Stackp [j] .flag of the target point array corresponding to [n + a]
The section deletion start flag (ST_SDEL) to stdata [n +
b] in stackp [j + 1] .flag of the target point array
Set the section deletion end flag (ST_EDEL). next,
A new section is specified with the pointing device 12
Or another command is selected by the function key.
Then, as shown in Fig. 12, the stackp
[J] · Section deletion start flag (ST_SDEL) is deleted from flag
From the stackp [j + 1] .flag
(ST_EDEL) is deleted. Also, stdata [n + a +
1] to the flag from stdata [n + b-1] to the deletion flag
(OR_DEL) is set. This is a two-step process
The reason is that the operator mistakenly specifies a section other than
To recover in case of a
In other words, it is intended to be reversible. Also delete section
The command is continued until another command is specified.
Can be set by the pointing device 12.
, For example, between stdata [n + b] and stdata [n + c]
Is specified between stdata [n + c] and stdata [n + b].
Then, the above processing can be repeatedly performed. Function 6 is input in FIG. 9 described above.
Then, each function execution unit C5 is activated and the
Can be aligned. 14 and 15 show the coordinates of the specified point of interest as a reference.
And replace the coordinate component with
Showed a structure to omit all sets of point coordinates in
FIG. In the diagram shown in FIG. 14, for example, points A, B, C,.
The sections AB, CD, and KL are divided into horizontal lines and sections with a certain thickness.
Edit DE, FG, HI, and JK as vertical lines with a certain thickness
And align the sections AB, CD, and KL with the y-coordinate of the person,
The points on the outline of, delete the sections DE, FG, HI, JK
When aligning to a marker and deleting points on the contour in the section
An example is shown below. of data from stdata [n] to stdata [n + m]
Among them, using the means shown in FIG. 6, for example, a point near A
stdata [n + a], points near B, stdata [n + b], ...
The point stdata [n + 1] near L is extracted. this
The order of extraction is arbitrary, but these 12 points
Variable cstcnt = j immediately before extracting, 12 points are n + a, n +
It is assumed that they are extracted in the order of b, ..., N + 1. An example
For example, coordinate point stdata [n + a] is extracted, and attention point information
The method associated with stackp [j] is described in FIG.
As described above. Immediately after this processing, the variable cstcnt is
1 is added, and similarly, coordinate points stdata [n + b], ‥‥, st
After data [n + 1] is extracted, the variable cstcnt stores the value j +
12 will be set. Pointin in this state
Function device 12 or keyboard 11
Screen appears when option 6 is entered and an alignment command is selected
The upper arrow cursor becomes a crosshair cursor, for example
For example, an arbitrary point near the straight line in section AB
Is specified using the means shown in FIG.
The immediately preceding point of interest in the sequence in the report array, that is, st
The point of interest immediately after data [n + a], that is, stdata [n +
b] is a set of attention points as a section in which the designated operation is performed.
More specific. However, in this case, this function specifies the coordinate components to be changed.
The means for specifying is determined by the following method. That is, the sixteenth
In the figure, the position of the crosshair cursor in the figure is the reference coordinate
The area where the specified operation is performed between P1 and P2
If specified as between, use each (x, y) coordinate
And slp = (P1.pos.y−P2.pos.y) / (P1.pos.x−2P.po
sx), the calculation formula of slp = slp * slp is executed. slp value
Is less than or equal to 0.25, it is regarded as y-coordinate alignment.
It is regarded as the alignment of the x coordinate. Therefore, P1 and P2 are equal to P1 'and P2'.
As in the X coordinate. However, the parts shown with diagonal lines
Minute, that is, when the value of slp is 0.25 or more and 4 or less.
Only determine which of the x and y coordinates should be aligned
This command does nothing. From the above, stdata [n + a] and stda in FIG.
When the interval between ta [n + b] is specified, slp = (stdata [n +
a] .pos.y-stdata [n + b] .pos.y) / (stdata [n
+ A] .pos.x-stdata [n + b] .pos.x), slp = slp *
The slp formula is executed, and the value of slp is easily less than 0.25.
It can be determined that they are aligned, so they are aligned with the y coordinate. This alignment process
The function of section deletion is explained in FIGS. 11 and 12.
And a function of moving a point. Therefore,
From stdata [n + a + 1] to stdata [n + b-1]
To use the section deletion function, the section
Start deletion flag (ST_SDEL) is stackp [j + 1] .fl
The section deletion end flag (ST_EDEL) is set in ag.
Further, stdata [n + a] .pos.y of the coordinate component to be changed
Is different from the value of pos.y of the reference coordinate component.
Therefore, when the contents of the point of interest array are reflected in the point information array,
Stackp [j] .flag to indicate that the point is moving
Is set as a reference coordinate with the point move flag (ST_MOV) set
Set to stackp [j] .pos where the contents of component pos should be changed
Is done. This point movement processing is for stdata [n + b]
The same is true for This command continues until another function is selected.
Since the continuation instruction is possible, the content of the point of interest array is the point information array.
This is reflected in a different file than when the next section is specified.
This is the case where an action key is input. Processing at this time
Is the same as in the case of section deletion described in the description of FIGS. 11 and 12.
It is like. However, for the movement of the point, stackp [j] .pos
Is set to stdata [n + a] .pos and stackp
The point move flag (ST_MOV) is deleted from [j] .flag
You. The reflected results are shown in FIG. Also, the reference coordinates are fixed with the crosshair cursor.
Also, 1 dot up / down / left / right by the arrow keys on the keyboard 11.
Fine adjustments can be made by moving each. At this time,
The amount of movement of the cursor from the quasi-coordinate is displayed at a predetermined position on the screen.
Is shown. Therefore, after aligning section AB, use the arrow keys to
And move to section CD, stdata [n +
c] .pos.y-stdata [n + b] .pos.y
The thickness of the straight line of the pattern can be obtained. This process
Makes it easy to align other straight lines
It is possible to make the thickness of the straight line uniform. As mentioned above, the section AB is used as an example, but the other sections
The same is true. Function 10 is input in FIG. 9 described above.
And the vector being edited in the display unit 2 C8 in the display selection unit C3
The display is selected. Fig. 13 shows a set of point coordinates representing the contour and related
Function of the display unit that displays a set of attached points of interest in a straight line
It is a flowchart explaining. step1 is a control variable poly_no that controls the order of the contours to be displayed
Is set to 0 as an initial value. Step 2 determines the end of the contour information shown in FIG.
When the contour ends, the display ends. Step3 and step4 are the initial settings at the start point of each contour.
The number st_no is the point information array number of the contour start point, and pos_e is the previous
The coordinate value of the contour start point is set. step5 and step6 are point coordinates that display a straight line in step7
Point information array in the variable cur_no to determine whether is a deletion point
Note the numbers stdata [st_no] .nxno and variable p_no
Stdata [cur_no] .stno is set as the point array number.
It is. In step 7, the point coordinates are determined as the deleted point.
That is, the deletion flag (OR_DEL or ST_DEL) is set
If so, control is transferred to step5. Must be a deletion point
If judged, in step8, the straight line in step12
Set the straight line display start point pos_s as an argument of the display function LINE.
Cut. Where the function LINE (V0, pos_s, pos_e)
V0 is a graphic memory (for example, VRAM13 in Figure 1-1)
Pos_s and pos_e that specify the output destination including address etc.
Represents the coordinate value (x, y) on the graphic memory
It is. In step 9, the line display end point is extracted as the point of interest.
It is determined whether or not it is
Set stackp [p_no) .pos to s_e, and s for the point of interest
Set tdata [cur_no] .pos to pos_e in tep10
You. Step 12 is performed directly using pos_s and pos_e obtained above.
Show lines. Step 13 is a repetition to determine the end of the currently displayed contour
It is a control unit. When finished, control variable po in step 14
Add 1 to ly_no and transfer control to step2.
That is, when the contour is continued, the control is shifted to step5. In FIG. 9, function 9 or funk
When the option 10 is input, the display selection section C3 is activated, and the
In case of function 9, the original table is displayed on the display 1 C7
Is displayed on the display unit 2 C8 for function 10.
The vector inside can be displayed. The display unit 1 C7 displays the information of the point information storage unit M1 in the display memory 0 V0
To be displayed. The flowchart for showing the table is shown in FIG.
Is as described above. Note that the display section 2 C8
The information of the eye point storage unit M2 is displayed on the display memory 1 V1. display
The flowchart for this is described in FIG.
It is as expected. Further, the display switching unit C3 switches the VRAM 13 to be displayed.
Exchange, show or hide the original,
Independently select whether or not to display the vector being edited.
You can choose. This command allows you to edit the current
Can be easily compared, and
"Other embodiment" capable of editing into a closer character / graphic pattern Fig. 1-1 Image input reader 7 is an original analog diagram
Any device can be used as long as it can convert the shape to digital.
No. In addition, in this embodiment, an analog is used rather than an image input reader.
・ Extract point coordinates on contours from digitally converted figures
But originally created with digital data
It may be bitmap data. That is, like
For example, if you have a workstation or other equipment that
Recreates a figure created using the digital figure editing function.
And may be used for editing this matter. The display memory 13 and the display device 10 are VRAM and bitmap.
Not limited to displays. For example, without VRAM,
Command-based raster scanning or a storage-type display device.
No. The pointing device is a light pen,
It is also possible to substitute this using a keyboard etc.
In this case, there is no particular need. BMU15 is also a special hardware
Memory controlled by software without the need for hardware
Any transfer means will do. As described above, the machine of this embodiment
The device configuration is provided as a means to speed up this graphic device
Were replaced by cheaper equipment
It is also possible to omit or omit. "Effects" As described in detail above, according to the present invention,
Can be aligned with the coordinate values of.

【図面の簡単な説明】 第1−1図及び第1−2図は本発明の実施例に係る図形
編集装置のシステムブロック図、 第2図及び第3図は輪郭部分のビットのみを抽出するた
めの構造及びフローチャート、 第4図(a)〜(e)は輪郭を表現する点座標の集合を
記憶するための構造を示す図、 第5図は輪郭を表現する点座標の集合を表示するための
フローチャート、 第6図は点座標の集合より1つ、または複数の注目点を
抽出するためのフローチャート、 第7図は注目点を表示した場合の図、 第8図は輪郭を表現する点座標の集合と注目点の集合を
関連させるための構造を示す図、 第9図は整形、単純化のための操作を指定するための構
造を示す図、 第10図は指定された操作を行う区間を注目点の集合より
とくていするためのフローチャート、 第11図及び第12図は輪郭を表現する点座標の集合とこれ
に関連付られた注目点の集合に対し指定された操作を反
映させるための構造を示した図、 第13図は輪郭を表現する点座標の集合とこれに関連付ら
れた注目点の集合を直線で表示するためのフローチャー
ト、 第14図及び第15図は指定された区間において変更をすべ
き座標成分を特定するための構造を示した図、 第16図は前述特定された注目点の座標を前述基準となる
座標値の座標成分と置き換え、かつ、前述区間内にある
点座標の集合をすべて省略するための構造を示した図で
ある。 C1は輪郭抽出部、 M1は点座標記憶部、 M2は注目点記憶部、 C2は注目点抽出部、 13は表示メモリである。
BRIEF DESCRIPTION OF THE DRAWINGS FIGS. 1-1 and 1-2 are system block diagrams of a graphic editing apparatus according to an embodiment of the present invention, and FIGS. 2 and 3 extract only bits of a contour portion. FIGS. 4 (a) to 4 (e) are diagrams showing a structure for storing a set of point coordinates representing the contour, and FIG. 5 is a view showing a set of point coordinates representing the contour. FIG. 6 is a flowchart for extracting one or a plurality of points of interest from a set of point coordinates, FIG. 7 is a diagram when the point of interest is displayed, and FIG. 8 is a point representing a contour. FIG. 9 shows a structure for associating a set of coordinates with a set of points of interest, FIG. 9 shows a structure for specifying operations for shaping and simplification, and FIG. 10 performs specified operations. Flowchart for segmenting a section from a set of points of interest 11 and 12 are views showing a structure for reflecting a designated operation on a set of point coordinates representing an outline and a set of attention points associated therewith, and FIG. A flow chart for displaying a set of point coordinates to be expressed and a set of points of interest associated with this as straight lines, and FIGS. 14 and 15 are for identifying coordinate components to be changed in a designated section. FIG. 16 shows a structure for replacing the coordinates of the specified point of interest with the coordinate components of the coordinate values serving as the reference, and omitting all sets of point coordinates in the section. FIG. C1 is a contour extraction unit, M1 is a point coordinate storage unit, M2 is an attention point storage unit, C2 is an attention point extraction unit, and 13 is a display memory.

Claims (1)

(57)【特許請求の範囲】 1.複数の注目点を表示する表示手段と、 前記表示手段に表示されている複数の注目点の中から座
標値の置き換えを行う注目点を特定する特定手段と、 基準の座標値を指示する指示手段と、 前記特定手段により特定された注目点の座標値を前記指
示手段により指示された基準の座標値に置き換える置き
換え手段と、 前記置き換え手段により置き換えられた座標値の注目点
を前記表示手段に表示させる手段とを有することを特徴
とする図形編集装置。 2.複数の注目点を表示手段に表示させる工程と、 前記表示手段に表示されている複数の注目点の中から座
標値の置き換えを行う注目点を特定する特定工程と、 基準の座標値を指示する指示工程と、 前記特定工程により特定された注目点の座標値を前記指
示工程により指示された基準の座標値に置き換える置き
換え工程と、 前記置き換え工程により置き換えられた座標値の注目点
を前記表示手段に表示させる工程とを有することを特徴
とする図形編集方法。
(57) [Claims] Display means for displaying a plurality of points of interest; specifying means for specifying a point of interest whose coordinate value is to be replaced from among the plurality of points of interest displayed on the display means; and instructing means for indicating a reference coordinate value Replacing means for replacing the coordinate value of the point of interest specified by the specifying means with a reference coordinate value specified by the specifying means; displaying the target point of the coordinate value replaced by the replacing means on the display means A graphic editing device comprising: 2. A step of displaying a plurality of points of interest on a display means; a step of specifying a point of interest to be replaced with a coordinate value from among the plurality of points of interest displayed on the display means; and specifying a reference coordinate value. An instruction step; a replacement step of replacing the coordinate value of the point of interest specified by the specifying step with a reference coordinate value specified by the instruction step; and displaying the point of interest of the coordinate value replaced by the replacement step. A graphic editing method comprising the steps of:
JP62228713A 1987-09-13 1987-09-13 Figure editing apparatus and method Expired - Fee Related JP2667834B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP62228713A JP2667834B2 (en) 1987-09-13 1987-09-13 Figure editing apparatus and method
US07/242,138 US5073957A (en) 1987-09-13 1988-09-09 Graphic editing system
DE3844832A DE3844832C2 (en) 1987-09-13 1988-09-12 Character editing device
DE3830990A DE3830990A1 (en) 1987-09-13 1988-09-12 Character preparation system
DE3844735A DE3844735C2 (en) 1987-09-13 1988-09-12 Graphical symbol or character electronic processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62228713A JP2667834B2 (en) 1987-09-13 1987-09-13 Figure editing apparatus and method

Publications (2)

Publication Number Publication Date
JPS6471769A JPS6471769A (en) 1989-03-16
JP2667834B2 true JP2667834B2 (en) 1997-10-27

Family

ID=16880645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62228713A Expired - Fee Related JP2667834B2 (en) 1987-09-13 1987-09-13 Figure editing apparatus and method

Country Status (1)

Country Link
JP (1) JP2667834B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01166094A (en) * 1987-12-22 1989-06-29 Alps Electric Co Ltd Outline data storage system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61265970A (en) * 1985-05-20 1986-11-25 Toshiba Corp Digital image forming device
JPS62202286A (en) * 1986-03-03 1987-09-05 Hitachi Ltd Illustrating device for image processor

Also Published As

Publication number Publication date
JPS6471769A (en) 1989-03-16

Similar Documents

Publication Publication Date Title
US4745561A (en) Character font pattern editing system for modification of font patterns
KR920001696B1 (en) Data processing apparatus w/multi-window controller
EP0585944B1 (en) Method and apparatus for displaying characters
EP0332765B1 (en) Graphical input/output system and method
JPH0147824B2 (en)
JPH0221024B2 (en)
KR100219785B1 (en) Method and apparatus for handwritten character recognition
JP2667834B2 (en) Figure editing apparatus and method
JP2667833B2 (en) Figure editing apparatus and method
JP2000322417A (en) Device and method for filing image and storage medium
EP0385691A2 (en) Digital image editing system
US5073957A (en) Graphic editing system
JPH0747328B2 (en) Figure editing method
JPH0565906B2 (en)
JPH0373914B2 (en)
EP0750270B1 (en) An apparatus for recognising characters and a method therefor
JP2825273B2 (en) Drawing management method and apparatus
JP2022043435A (en) Document classification apparatus and program
JP2969707B2 (en) Image editing device
JPH06325203A (en) Character recognizing device and method for displaying recognized character and method for proofreading recognized character thereof
JP3233555B2 (en) Information processing apparatus and key definition changing method
JPH0757044A (en) Character recognition device
JPS59161768A (en) Extraction processing system of peak of closed area
JPH05290105A (en) Figure component control system
JPH0512358A (en) Drawing input device

Legal Events

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