JPH0430634B2 - - Google Patents

Info

Publication number
JPH0430634B2
JPH0430634B2 JP58156045A JP15604583A JPH0430634B2 JP H0430634 B2 JPH0430634 B2 JP H0430634B2 JP 58156045 A JP58156045 A JP 58156045A JP 15604583 A JP15604583 A JP 15604583A JP H0430634 B2 JPH0430634 B2 JP H0430634B2
Authority
JP
Japan
Prior art keywords
bit
loglbl
symbol
code
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP58156045A
Other languages
Japanese (ja)
Other versions
JPS6048580A (en
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 filed Critical
Priority to JP58156045A priority Critical patent/JPS6048580A/en
Publication of JPS6048580A publication Critical patent/JPS6048580A/en
Publication of JPH0430634B2 publication Critical patent/JPH0430634B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

(A) 発明の技術分野 本発明は、論理回路図処理装置、特に格子軸に
沿う形で描かれた線図形と文字を含む画図形とが
混在する手書き図面を読取つて、論理記号,線
分,および画図形部分を認識し抽出する論理回路
図処理装置において、格子点近傍の画像データを
集約的格子点ラベル・コードにまとめるよう構成
し、該集約的格子点ラベル・コードを基にして上
記認識処理を行つてゆくようにした論理回路図処
理装置に関するものである。 (B) 技術の背景と問題点 従来から手書きされた論理回路図をデータ処理
装置に入力することが行われており、例えばデイ
ジタイザなどを使用して、オペレータが文字や線
図形をいちいち抽出しつつ入力するようにされて
いた。この場合、例えば直線を入力することを考
えると、各線毎に、オペレータは、線の1つの端
部座標と他の端部座標とを指示すると共に、直線
である旨の情報を入力する必要がある。このた
め、比較的簡単な回路図の場合には余り問題にな
らないが、IC回路のような非常に複雑な回路図
を入力する場合にはデータの入力がきわめて煩雑
であり、オペレータはかなりの忍耐を必要とし、
しかも入力誤りを生じ易い。 (C) 発明の目的と構成 本発明は、上記の点に鑑み、論理回路図の入力
処理をいわば自動化する処理装置を提供すること
を目的としており、文字などの画図形や格子軸に
沿つて描かれた線図形について、格子点近傍の画
像データを集約的格子点ラベル・コードに集約す
る方式を採用して上記処理を行う処理装置を提供
することを目的としている。そしてそのため、本
発明の論理回路図処理装置は、予め定められた格
子軸に沿つて描かれたシンボルとシンボル間結線
を線図形と文字を含む画図形とが存在する手書き
図面を読み取つて得られた画像データから、線図
形および画図形部分を認識し抽出する論理回路図
処理装置において、 格子点近傍に画像データの存在の可能性を示す
格子点ラベルコードを生成する格子点ラベルコー
ド生成手段107,109と、 上記格子点ラベルコードにもとづいて上記画像
データの上記格子点に対する位置ずれを検証する
位置ずれ検証手段103と、 上記画像データの局部的形状を判別して線図形
または画図形の存在の可能性を識別する局部形状
抽出手段119と、 上記格子点で画像データが交差する場合にその
交差部分での結合子の存在の可能性を判別するラ
イン結合子抽出手段(と、 上記格子点近傍に円形状の画像データの存在の
可能性を判別する円形状抽出手段()と、 少なくとも上記格子点ラベルコード生成手段か
ら得られた格子点ラベルコードと、 上記位置ずれ検証手段から得られた位置ずれ情
報と、 上記局部形状抽出手段から得られた局部形状ラ
ベル情報と、 上記ライン結合子抽出手段から得られたライン
結合子情報と、 円形状抽出手段から得られた円形状情報とにも
とづいて上記格子点近傍の画像データ情報を集約
した集約的格子点ラベルコードを決定する集約的
格子点ラベルコード生成手段121と、 上記集約的格子点ラベルコードをもとに単一お
よび複合シンボルを認識するシンボル認識手段1
28,129,130,131,132,13
3,134,135,136,137)と、 上記集約的格子点ラベルコードと上記シンボル
認識手段とにより得られたシンボル情報よりシン
ボル記結線を抽出する線分抽出手段142,14
4,145,146,148と、 上記集約的格子点ラベルコードと上記画像デー
タとより文字例の抽出および文字の分離を行う文
字領域抽出手段147とを備えてなる ことを特徴としている。なお、上記において例
えば格子点ラベルコード生成手段に対して符号1
07,109を付したのは、図面を参照して説明
する以降の説明中の第4図や第99図A,Bなど
との対応を判り易く例示するためであり、例えば
当該格子点ラベルコード生成手段が図中の符号1
07,109として示す構成単位以外のものと無
関係であることを示すものではない。他の符号に
ついても同様である。 以下図面を参照しつつ説明する。 (D) 発明の実施例 本発明においては、第1図に示すように格子軸
(X軸およびY軸)に沿う形で描かれた図面、即
ち例えば方眼紙上に手書きされた線図形や文字を
含む画図形の混在する図面を、フアクシミリ入力
装置の如き光学的読取装置にて読取り、該読取つ
た画像データを格子点(格子軸交点)上のデータ
として集約し、その上で論理記号、線分、および
文字の部分に分離し認識処理するようにして、上
記データ処理装置に入力せしめるようにしようと
している。更に言えば、第2図に示す格子点G5
の周囲に例えば第3図図示の線図形Vが存在して
いるとした場合に、後述するように、格子点G5
を中心とした第2図図示矢印の範囲内で、線分の
存在の有無、および存在する場合には線分情報と
しての確からしさ、線分が格子点G5の上下左右
のいずれの方向に存在するか、当該線分の存在す
る位置までのずれなどを、当該格子点G5の情報
として抽出し集約し格納しておく。そして、該各
集約格子点ラベルコードを基に、文字や論理記号
などを認識し、データ処理装置に入力せしめるよ
うにしている。 第4図は本発明による論理回路図処理装置の一
実施例全体構成を示している。図中の符号1は処
理対象図面であり、2は本発明による論理回路図
処理装置によつて抽出された処理結果情報を表わ
している。以下、第4図図示の各構成部,…
にしたがう形で具体的に説明してゆくが、各構成
処理部,…は概略次の如きものと考えてよ
い。 図面と諸情報の入力処理部。 図面1をフアクシミリやドラム・スキヤナなど
の入力装置により読取り、該読取つた画像データ
に対してノイズ除去・平滑化などのいわゆる前処
理をほどこして画像メモリに格納する。そして、
デイスプレイ、キーボード、ライト・ペンなどを
使用して会話的に、入力図面の大きさや向き、格
子数などの諸情報を入力する。また入力図面の傾
き補正や認識領域の設定などのために、図面の4
隅に書込まれた基準点(第1図図示の「+」マー
ク)の座標位置を入力する。 ラベルコード生成処理部。 入力された図面の向き、基準点間の格子数、お
よび基準点の位置などの情報から、各格子点の画
像データ・アドレスを算出して、画像データ傾き
補正を行い、各格子点近傍の画像データがもつ形
状特徴を第5図に示す格子点ラベル・コード
LOGLBLとして表現する。なお当該処理部
において最初に得られた格子点ラベル・コードを
初期格子点ラベル・コードLBLと呼ぶ。そして
該ラベル・コードLBLを基にして後述する如き
第1検証処理部、第2検証処理部、局部形状抽出
処理部などによる処理を経て、集約的格子点ラベ
ル・コードを生成する。なお、ここで上記格子点
ラベル・コードLBL又はLOGLBLの各ビツトに
ついて簡単にまとめておく。 #28ないし#31ビツト 該ビツトは方向コードであつて、後述す
る如く、格子点G5からみて線分が延びて
いる方向を表現するものであつて、下方向
(D)、左方向(L)、上方向(U)、右方向
(R)に対応して、線分が延びている方向
に論理「1」を立てる。 #24ないし#27ビツト 該ビツトは“あいまい”方向コードであ
つて、線分が存在するとすれば、当該線分
が複雑な形状を持つているか否かを表わ
す。換言すれば文字の一部らしいか否かを
論理「1」をもつて表現する。例えば#24
ビツトFDが論理「1」であることは、格
子の下方に延びている線分(D=1)が文
字の一部らしいことを表示している。 #19ないし#22ビツト 該ビツトはずれ方向コードであつて、存
在している線分が、格子点からどの方向に
ずれているかを表示する。 #12ないし#15ビツト 該ビツトはギヤツプ方向コードであつ
て、格子の上下左右のいずれかの方向に延
びている線分に切れ目が存在するかを表示
している。 #16ビツト 該ビツトは“あいまい”フラグであつ
て、#24ないし#27ビツトのいずれか1つ
が論理「1」のときに論理「1」とされ
る。 #23ビツト 該ビツトは“ずれ”フラグであつて、
#19ないし#22のいずれか1つが論理
「1」のときに論理「1」とされる。 #11ビツト 該ビツトはギヤツプ・フラグであつて、
#12ないし#15ビツトのいずれか1つが論
理「1」のときに論理「1」とされる。 #18ビツト 該ビツトはライン結合子表示フラグであ
つて、論理回路図中の結線ラインが電気的
に接続されていることを意味すべく、結線
ラインの交差点などに付けた黒丸(ライン
結合子表示フラグと呼ぶ)が当該格子点に
存在するか否かを表わすものであり、存在
する場合に論理「1」とされる。 #9ビツト 該ビツトは三角形状表示フラグであつ
て、三角形のパターンが当該格子点に対応
して存在する場合に論理「1」とされる。 #10ビツト 該ビツトは大円形状表示フラグであつ
て、円形の大きい形状のパターンが当該格
子点に対応て存在する場合に論理「1」と
される。 #17ビツト 該ビツトは小円形状表示フラグであつ
て、円形の小さい形状のパターンが当該格
子点に対応して存在する場合に論理「1」
とされる。 #8ビツト 該ビツトはシンボル領域フラグであつ
て、当該格子点に対応して論理記号(シン
ボル)が記述されていることを表わしてい
る。 #0ビツト ビツトはスタート点フラグであつて、当
該格子点が論理記号(シンボル)のスター
ト点(端子位置)であることを表わしてい
る。 #1ビツト 該ビツトは逆ロジツク・シンボル表示フ
ラグであつて、#0ビツトが示すスタート
点に否定論理を与える小円形状パターン
(逆ロジツク・シンボル)が付いているこ
とを表わしている。 #2ない#5ビツト 該ビツトはスタート点方向コードであ
り、#0ビツトが示すスタート点に接続さ
れる結線ラインが上下左右のいずれの方向
に延びているかを表わしている。 円・三角抽出処理部。 第5図図示の格子点ラベル・コード中の#9ビ
ツト、#10ビツト、#17ビツトに表示する如き形
状の各パターンが存在するか否かを抽出する。 ラベルコード・ノイズ処理部。 生成された初期格子点ラベル・コードの#11な
いし#31ビツトの情報に対応して、各当該情報に
存在するノイズを除去する。 外向き腕の除去ユニツト。 図面1の枠の外に向つて出ている腕に応する方
向コードを論理「0」にする。 対の処理ユニツト。 互に隣接している格子点相互間で、いずれか一
方の格子点において他方に向う腕が存在する当該
他方の格子点において、対となるべき腕が存在し
ない場合に、上記腕に対応する方向コードを論理
「0」にする。 線切れ補正ユニツト。 本来1本の線として存在しているべき線分につ
いて1格子間隔以内の線切れを接続された形に修
正する。 ずれ補正1ユニツト 本来のあるべき形からみて余分なずれ方向コー
ド(#19ないし#22ビツト)とずれフラグ(#23
ビツト)とを論理「0」にする。 あいまい補正1ユニツト 1つの格子点に注目して、4つの方向の隣接格
子点の格子点ラベル・コードにもとづいて、あい
まい方向コード(#24ないし#27ビツト)などを
補正する。 シンボル分類処理部。 格子点ラベル・コード内の4方向コードをもと
に、図面1内の論理記号(シンボル)の位置とそ
の形状(種類)とを抽出する。但し、当該処理に
おいてはいわば大分類程度の分類を行うものと考
えてよい。 複合ゲート・シンボルの認識処理部。 本発明の論理回路図処理装置は、第6図に示す
ように複数個の論理記号(シンボル)の集合を或
る意味をもつているいわば複合ゲート・シンボル
C−Gとしてこれを認識するようにしている。当
認識処理部においては、各シンボルの種類と位置
関係から、複合ゲート・シンボルを認識する。そ
して認識された複合ゲート・シンボルに対し、そ
のスタート点位置の格子点ラベル・コードにスタ
ート点フラグ(#0ビツト)とスタート点コード
(#2ないし#5ビツト)と逆ロジツクシンボル
表示フラグ(#1ビツト)とを設定する。 シンボル領域の設定処理部。 本発明の論理回路図処理装置が読取るべき論理
記号の中には、第7図図示矢印a,bの如く、読
取り状態によつては、1つのシンボルを異なるシ
ンボルとして重複して抽出されることが生じるお
それがある。このように重複して抽出されたシン
ボルの検出を正しく行わせるためあるいは後続処
理を正しく行わせるために、格子点がシンボルの
一部として情報が確定していることを明示するた
めのフラグを設定せしめる。即ち第5図図示のシ
ンボル領域フラグ(#8ビツト)を論理「1」に
する。 線分確定処理部。 シンボル領域が確定された後に、シンボル間を
結ぶ結線ラインを確定せしめる。 ギヤツプ・あいまいの腕の処理部。 結線ラインが確定された後に、ギヤツプ方向コ
ード(#12ないし#15ビツト)とあいまい方向コ
ード(#24ないし#27ビツト)とをもつ格子点に
対し、その方向の4方向コードを論理「0」と
し、その上で、上記処理ユニツトの処理と同
様の処理を行う。 単一ゲート・シンボルの認識処理部。 上述の処理部におけるシンボル分類において
は、シンボルのもつ大まかな形状特徴によつて抽
出を行つたが、本処理部においては第8図A内
の2つのシンボルや第8図B内の2つのシンボル
に示す如くシンボル・グレープとしては同じグル
ープに属しているシンボル相互間を、例えば図示
の如く逆ロジツク・シンボルCが付いているか否
かなどによつて区別するようにして、単一ゲー
ト・シンボルの決定を行う。そして、認識された
単一ゲート・シンボルに対して、そのスタート点
位置の格子点ラベル・コードにスタート点フラグ
(#0ビツト)とスタート点コード(#2ないし
#5ビツト)と逆ロジツクシンボル表示フラグ
(#1ビツト)とを設定する。 スタート点の設定処理部。 第9図A内の2つのシンボル、第9図B内の2
つのシンボル、第9図C内の3つのシンボルなど
については、夫々のシンボルの形状が同じで結線
ラインが書かれる方向や位置が様々となつてい
る。これらの各シンボルを区別して識別するため
には、シンボルのスタート点候補の状態を調べ、
これらのシンボルのスタート点を決定し格子点ラ
ベルコードにスタート点情報を設定する。 逆ロジツク・シンボルの処理部。 第10図A図示の如き逆ロジツク・シンボルが
付いているシンボルを処理する場合、第10図B
に典型的な形として3通りの例を示す如く、逆ロ
ジツク・シンボル近傍の各格子点ラベル・コード
内の4方向コード(#28ないし#31ビツト)は、
様々な現われ方となる。このような状態が存在す
ると、後の追跡処理などにおいて悪影響が生じる
ことから、第10図C図示の如く、一旦余分な4
方向コードを落としておくようにする。本処理部
はこのような処理を行う。 スタート点近傍の線切れ補正処理部。 シンボルのスタート点位置の近傍では、いわゆ
る線切れ(ギヤツプ)が発生し易い。本処理部
では、この補正処理を行う。 線分抽出の前処理部。 シンボル間を結ぶ結線ラインを最終的に抽出す
るに先立つて、前処理を行う。 ギヤツプ・あいまい腕の処理ユニツト この時点でギヤツプ方向コード(#12ないし
#15ビツト)とあいまい方向コード(#24ないし
#27ビツト)とが設定されている格子点に対し
て、該当する方向の4方向コード(#28ないし
#31ビツト)を落とす。その上で、上記処理ユニ
ツトと同様な対の処理を行う。 ライン結合子の処理ユニツト 結線ラインの分岐点に該当するライン結合子に
対して、所定の処理(後述)を行う。 複合ゲート・シンボル内の線分消し処理ユ
ニツト 複合ゲート・シンボル内の結線ラインは予め判
つているパターンであり、この結線ラインを認識
する必要がない。本ユニツトはこの線分消し
を行う。 結線ライン抽出処理部。 結線ラインを個々のベクトルとして抽出するた
めに、 スタート点――スタート点 分 岐 点――分岐点 屈 曲 点――屈曲点 スタート点――分岐点 分 岐 点――屈曲点 屈 曲 点――スタート点 間の4方向コードを追跡する。そして結線ライン
を抽出する。追跡が終了しないラインについて
は、当該ラインが文字の一部である可能性があ
り、格子点ラベル・コードのあいまいフラグ
(#16ビツト)を論理「1」にしておく。 文字領域の抽出処理部。 図面1内からシンボルと結線ラインとを抽出し
終わると、残りは文字などの画図形である。本処
理部においては、格子点ラベル・コードのあい
まいフラグ(#16ビツト)をもとにして文字領域
(画図形領域)の抽出を行う。 文字の分離・認識処理部。 処理部によつて抽出された例えば文字例の各
文字を1文字毎に分離し、文字認識処理技術を用
いて文字認識を行う。 結果の出力処理部。 上述の如く抽出された各シンボル情報、結線ラ
イン情報、文字情報を、フロツピイ・デイスクな
どの外部記憶媒体に出力したり、または回線を介
して他のデータ処理装置に伝送したりする。 上記において、第4図に示す論理回路図処理装
置の各構成処理部,……が行う処理について
概説したが、以下更に具体的に各処理部における
重要な処理について説明してゆく。 〔〕 図面と諸情報の入力処理部 本処理部においては、後続する傾きや歪の補
正などのために、第1図図示の基準点(4隅の
「+」マーク)の座標を正しく指示してやること
が必要となる。即ち、本処理部によつて入力さ
れた結果(画像メモリ上の内容)をテレビ・モニ
タ上に表示せしめ、当該表示画面における上記基
準点がどの座標位置に表示されているかを指示
し、後続する補正時に、本来あるべき座標位置と
上記入力された結果の座標位置とにもとづいて補
正を行うようにする。 入力図形は画像メモリ上に例えば2048×3072ド
ツト程度の大きさをもつものとして格納される。
このために、入力図形全体をそのまま一度にテレ
ビ・モニタ上に表示することはできず、縮小して
表示される。この結果、基準点を縮小表示画面上
で指示しても必らずしも十分な精度が得られな
い。この点を克服するため、第11図図示のフロ
ーチヤートに示す如き手順によつて基準点を高精
度で指示するようにされる。即ち、 (1) 最初に、入力図形のビデオ・データを拡大率
1/8に縮小して、入力図形の前半(2048×1536
ドツト)分を表示する。 (2) 次いで、基準点の1つが存在する領域をライ
ト・ペンによつて指示した上で、その領域を拡
大率1にして表示する。 (3) 次いで当該基準点が存在する領域をライト・
ペンによつて指示した上で、その領域を拡大率
8にして表示する。 (4) この状態において、当該1つの基準点をライ
ト・ペンによつて指示する。正しく指示できな
かつた場合には、正しく指示できるまで修正
し、正しく指示できたとき、当該指示点を基準
点の1つとして送出する(第1の基準点として
画像メモリ上に書込まれる)。 (5) 次いで再び拡大率1/8のもとで入力図形の前
半(2048×1536ドツト)分が表示され、上記操
作(2)ないし(4)と同様な操作によつて、第2の基
準点が画像メモリ上に書込まれる。 (6) 次には、拡大率1/8のもとで入力図形の後半
(2048×1536ドツト)分が表示され、上記操作
(2)ないし(4)と同様の操作によつて、第3の基準
点が画像メモリ上に書込まれる。 (7) その後再び拡大率1/8のもとで入力図形の後
半(2048×1536ドツト)分が表示され、上記操
作(2)ないし(4)と同様の操作によつて、第4の基
準点が画像メモリ上に書込まれ、エンドとな
る。 〔〕 ラベルコード生成処理部における画
像データの傾き補正。 ラベルコード生成処理部においては、上述
の如く入力された基準点の座標にもとづいて、当
基準点が本来の位置に対してどのようにずれてい
るかを検出し、画像データの傾きや歪を補正する
必要がある。以下この処理について述べる。 一般に第12図A図示の如く基準点の座標が
(0,0)、(XW,0)、(0,YW)、(XW,YW
で与えられている入力図面1を画像メモリに格納
した場合、第12図B図示の如く回転歪を受けた
状態をもつて格納されることが生じる。このため
に上述の如く、画像メモリ上に格納されている入
力図面1−1に対して、ライト・ペンによつて基
準点を指示すると、この指示された基準点が第1
2図Bにおいて例えば座標(0,0)、(Xa,
Ya)、(Xb,Yb)、(Xc,Yc)として与えられ
る。 第12図図示の入力図面1と格納された入力図
面1−1との間には、図示原点(0,0)におい
て一致しているとすると、入力図面1上の点
(x,y)を回転歪を受けた図面1−1上の点
(x′−y′)と対比せしめると、 x′=xcosθ+ysinθ y′=ycosθ−Xsinθ ――(1) なる関係がある。しがつて、入力図面1上の点
(x,y)が画像メモリ上において点(x′,y′)
に位置するものとして補正を行えば足りる。 しかし、上記補正を図形上の各画素について行
うことはきわめて処理量が大となる。このために
本発明の場合、次のような補正にとどめて許容範
囲内で最小限度の補正をもつて済ますようにす
る。即ち、入力図面1上をm×n画素よりなる区
分領域3によつて区分し、各区分領域例えば領域
3−1の左上隅の点(x0,y0)について画像メモ
リ上でどの座標位置に存在するかを決定する。即
ち、図示(x0,y0)と(x0′,y0′)との対応を第
(1)式にもとづいて決定する。そして、当該m×n
画素で与えられる区分領域3−1があたかも第1
2図B図示点線で示すm×n画素で与えられる区
分領域3′−1であるものとみてゆくようにする。
換言すると、図面1について、区分領域3−1の
左上隅点(x0,y0)が座標(x0′,y0′)に対応す
るものであることが見出された場合、区分領域3
−1内の各画素を読取るものとして処理するに当
つて、図面1−1上の座標点(x0′,y0′)から水
平方向にm画素分と垂直方向にn画素分とを抽出
したm×n画素区分領域3′−1を読取つて処理す
るようにする。 このように各区分領域に区分する方式を採用す
ることによつて、補正処理量は1/m・nとなる
ことが容易に理解されよう。ただし、このような
簡略方式を採用することによつて、区分領域3′−
1内の各画素にどの程度の誤差が含まれるかを評
価しておく必要がある。区分領域3′−1の大きさ
を10×10画素に選んだとき、入力図面1上の真の
画素位置に対して最大2画素分の誤差を許容する
とすると、計算上回転角θが約11゜以下であれば
よい。また最大1画素分の誤差を許容するものと
すると、回転角が5゜以下であればよい。逆に言え
ば、実際に20゜程度の回転が生じている場合には、
最大2画素分の誤差が許容されるものとすれば、
区分領域3′−1の大きさを5×5画素に選べばよ
いことを意味する。 上記第12図A,Bを参照して説明した簡略方
式による誤差補正を行うに当つても、上記回転角
θを測定することが煩雑であり、測定誤差が導入
され易い。このために次のような処理がとられ
る。 第13図AおよびBは、入力図面1の例えば4
つの基準点(0,0)、(Xw,0)、(0,YW)、
(XW,YW)が与えられているとし、任意の点
(X,Y)が回転歪を受けた図形1−1上で点
(X′−Y′)となることを示している。そして、上
記第(1)式から X′=Xcosθ+Ysinθ Y′=Ycosθ−Xsinθ の関係にある。ここで図示の如く、XW、YW
XL、YL、△X、△Y、X″、Y″を考慮すると、 又は したがつて、 また X″=XXL/XW(∵X/XW=X″/XL) Y″=YYL/YW(∵Y/YW=Y″/YL) 故に で表わされる。 ここで、入力図面1上の上記基準点(0,0)、
(XW,0)、(0,YW)、(XW,YW)が予め判つ
ている。そして、図形1−1を例えばテレビ・モ
ニタ上に表示した上で、上記基準点に対応する点
の座標をライトペンなどで入力して(0,0)、
(Xa,Ya)、(Xb,Yb)、(Xc,Yc)として指示
すれば、 XL=Xc−Xb △X=Xb YL=Yc−Ya △Y=Ya として既知の値として与えられる。 〔〕 ラベルコード生成処理部における初
期格子点ラベル・コード生成。 上述の如くして画像メモリ上に読取られた画像
データの傾きなどが補正されると、本発明におい
ては、第2図、第3図に関連して上述した如く、
格子点G5の近傍の画像データを、格子点ラベ
ル・コードの形で表現せしめるようにする。 初期格子点ラベル・コードは、格子点近傍の図
形構造を大まかに把握するものであつて、以下に
その生成方式について説明する。 まず手書き図面を読取つて得られた画像データ
を、第3図に示す如く、格子軸X1ないしX3およ
び格子軸Y1ないしY3で区画し、これを第14図
に示す如く、格子点C5を中心に、格子軸nに相
当するn×1画素の大きさの窓部W1-xおよび1
×n画素の大きさの窓部W1-Yで、それぞれX方
向およびY方向に走査するそしてこの窓内に黒点
が1画素でも存在するとき、これを各窓部の黒点
検出出力「1」としてこれを保持部R1-Xおよび
R1-Yにそれぞれ保持させる。その結果、例えば
第14図に示す画像データを窓部W1-X,W1-Y
走査したとき、保持部R1-X,R1-Yにそれぞれ斜
線部で示した如き状態で、上記窓部W1-X,W1-Y
からの黒点情報としての出力「1」が、各格子軸
上の投影結果として保持されることになる。 次に、第15図Aに示すように保持部R1-X
対して右方向領域R0,R1を定義してこれらの領
域内における「1」(黒点情報を示す)の総和を
求め、それが一定の閾値以上であれば、格子点
G5の右方向に線分が存在する可能性があるとい
う情報「R=1」を決定し、閾値以下ならば可能
性がないという情報「R=0」を決定する。同様
にして左方向領域L0,L1を定義して各領域にお
ける「1」の総和を求め、これが閾値以上であれ
ば左方向に線分が存在する可能性があるという情
報「L=1」を決定し、閾値以下ならば「L=
0」を決定する。勿論、第15図Bに示す如く、
保持部R1-Yに対しても、上下に上方向領域U0
U1及び下方向領域D0,D1を定め領域U0,U1内お
よびD0,D1内の「1」の総和が閾値以上か以下
かに応じて上方向情報「U=1又は0」および下
方向情報「D=1又は0」を決定する。このよう
にして、初期格子点ラベルコード(LBL)D,
L,U,Rが求められ、例えば第14図の画像デ
ータに対しては、第16図Aに示す如く、上下に
線分が存在する可能性があり、左右には可能性が
ないという、第16図Bに示す如き、格子点G5
に対する初期格子点ラベルコード「LBL=1010」
が決定される。 このようにして第17図A示す如き画像データ
に対しては、第17図Bに示す如く、上・下・
左・右に線分の存在する可能性があることを示す
形で第17図Cに示す初期格子点ラベルコード
「LBL=1111」が求められ、第18図Aに示す画
像データに対しては、第18図Bに示す左・右・
上方向に線分の存在する可能性のあることを示す
形で第18図C示す「LBL=0111」が求められ、
第19図Aに示す画像データに対しては、同様に
「LBL=0111」が求められる。 〔〕 ラベルコード生成処理文における第
1検証処理部の処理。 第1検証処理は、上記初期格子点ラベルコード
LBLを基にして、実際にその格子点近傍を、初
期格子点ラベルコードLBLに対応した方向に線
分が存在するか否かを検証するものである。 まず、第20図に示す如く、WV0,WV2,WH0
〜WH2の各第1検証窓部を設ける。これらの第1
検証窓部はLBLを基にして定められるものであ
つて、「R=1,L=1」のときは1×n画素の、
第1検証窓部WV0を使用し、「R=0,L=1」
のときは1×(n/2+1)画素の第1検証窓部WV1 を使用し、「R=1,L=0」のときは1×(n/2 +1)画素の第1検証窓部WV2を使用する。そし
て「U=1,D=1」ときはn×1画素の第1検
証窓部WHpを使用し、「U=0,D=1」のとき
は(n/2+1)×1画素の第1検証窓部WH1を使用 し、「U=1,D=0」のときは(n/2+1)×1 画素の第1検証窓部WH2を使用する。そして第2
1図A,Bに示すように、これらの第1検証窓部
を水平格子軸(又は垂直格子軸)を始点として、
上下方向(又は左右方向)にスライドさせて黒点
情報を累積してゆき、最初に第1検証窓部を全部
黒点情報である「1」が埋める位置を検出する。
このスライド操作のスライド幅は上下左右方向と
も格子間距離の半分、すなわち、第21図A,B
のnの範囲内である。 このスライド操作によつて格子点近傍を初期格
子点ラベルコードに応じた方向の線分が存在する
か否か、また存在するとすれば、その線分は格子
軸からどの程度ずれているかということを検出す
ることができる。そしてこれらのずれ情報を第1
検証ずれ情報SX1,SY1として抽出する。ここで
次の如くSX1,SY1の符号を表示する。 SX1:左右方向のずれ+右方向;−左方向 SY1:上下方向のずれ+下方向;−上方向 ただしn画素のスライド幅の範囲内で窓部内を
黒点がすべて埋れる状態が存在しなかつた場合に
は、SX1,SY1として「999」という値を設定す
る。そして初期格子点ラベルコードLBLとして
水平あるいは垂直方向の線分が検出されなつた場
合は、その方向にはスライド操作を行わなかつた
ということを示すためにSX1,SY1として
「1000」という値を設定する。 第22図ないし第25図は各種図形に対して第
1検証処理を行つてそのずれを検証した状態を示
すものである。 第22図では「LBL=1010」に応じて、第2
0図の第1検証窓部WH0を格子軸から4画素右に
スライドしたとき第1検証窓部WH0を黒点にて埋
めることができるので「SX1=+4」となる。し
かし「LBL=1010」であることから上下方向の
スライド操作を行う必要はないのでこれを示すた
め「SY1=1000」とする。また第23図では、
「LBL=1111」であつて、このとき第1検証窓部
WH0とWV0をスライドさせる必要なくその格子軸
でこれらの第1検証窓部WH0とWV0が黒点で埋め
ることになるので「SX1=0=0.SY1=0」であ
る。そして第24図では、「LBL=0111」であ
り、このとき第1検証窓部WH2は左方に1画素ス
ライドさせたとき第1検証窓部WH2は全部黒点と
なり、第1検証窓部WV0を3画素下方にスライド
させたときこれを全部黒点とすることができるの
で、「SX1=−1,SY1=+3」となる。しかし
ながら第25図の図形では、「LBL=0111」であ
り、第1検証窓部WH2を左方に1画素スライドさ
せたとき第1検証窓部WH2はすべて黒点とするこ
とができるが、第1検証窓部WV0を使用して第2
1図Aに示す幅nでスライドしてもこの第1検証
窓部WV0を黒点で埋めることはできず、それ故
「SX1=−1,SY1=999」となる。 上記の如く求められた第1検証ずれ情報SX1,
SY1を基にして、格子点近傍の図形構造を捉えて
いる矩形領域を動かして、当該矩形領域内の線分
を格子軸上に位置するように正規化したあとで、
再び上記初期格子点ラベルコード(LBL)を抽
出した方法と同様な方法により格子点ラベルコー
ドを求め、これを第1検証ラベルコード(LB1)
とする。 この場合X方向への正規化合物として次のよう
にする。 「SX1=1000」,「SX1=999」、「SX1=0)の
場合は矩形領域は動かさない。そしてSX1>0」
のときは矩形領域を右方向へ|SX1|だけ動か
し、「SX1<0」のときは矩形領域を左方向へ|
SX1|だけ動かす。 同様に、Y方向への正規化処理として次のよう
にする。 「SY1=1000」,「SY1=999」、「SY1=0」の
場合は矩形領域は動かさない。そして「SY1>
0」のときは矩形領域を下方向へ|SY1|だけ動
かし、「SY1<0」のときは矩形領域を上方向に
|SY1|だけ動かす。 例えば、第26図Aに示す如き画像データの場
合には、「SX1=4」のための矩形領域を右方向
に(相対的には画像データを左方向に)4画素だ
け移動するが、このとき「SY1=1000」のため上
下方向には矩形領域は動かさない。この結果、第
26図Bに示す如き状態の図形が得られ、これを
第14図に示した如き窓部W1-X,W1-Yで走査し
て、保持部R1-XおよびR1-Yには第26図Bの斜
線部分に示す如き黒点情報が得られる。そしてこ
れにもとづき、第15図に関連して説明したと同
様の処理を行つて、第1検証ラベルコードLB1
(LB1=DURL)を得ることができ、かくして第
26図Bの図形では第1検証ラベルコード「LB1
=1010」を得る。 そして、第27図Aに示す画像データの場合に
は、「SX1=0,SY1=0」のために、左右上下
方向の移動は行わず、この結果第1検証ラベルコ
ード「LB1=1111」となり、初期格子点ラベルコ
ードと同一となる。 また第28図Aに示す画像データの場合には、
「SX1=−1,SY1=3」のために、矩形領域を
左方向に1画素、下方向に3画素だけ移動(相対
的には画像データを右方向に1画素、上方向に3
画素移動)して、上記の如き処理を行い、その結
果初期格子点ラベルコードLBLと同一な、第1
検証ラベルコード「LB1=0111」を得る。 さらに、第29図Aに示す画像データの場合に
は、「SX1=−1,SY1=999」のために矩形領域
を左方向に1画素だけ移動して第1検証ラベルコ
ード「LB1=0111」を得る。 〔〕 ラベルコード生成処理部における第
2検証処理部の処理。 第2検証処理は、上記第1検証ラベルコード
LB1を基にして、実際にその格子点近傍を、第1
検証ラベルコードLB1に対応した方向に線分が存
在するか否かを検知し、第2検証ラベルコード
LB2を求めるための処理であり、第1検証ラベル
コードLB1に応じて、第30図に示す如く、第2
検証窓部BWV0〜BWV2,BWH0〜BWH2を設け、
上記第1検証処理と同様の方法で検証を行うもの
である。そして、これらの各第2検証窓部の大き
さは第3図に示す如く、格子点G5の両側の格子
軸間の幅をWDとするとき、次のように定められ
る。 これらの第2検証窓部の使用態様は次のように
して決定される。すなわち、「R=1,L=1」
のときは1×WD画素の第2検証窓部BWVpを使
用し、「R=0,L=1」のときは1×(WD/2+ 1)画素の第2検証窓部BWV1を使用し、「R=
1,L=0」のときは1×(WD/2+1)画素の第 2検証窓部BWV2を使用する。そして「U=1,
D=1」のときは、WD×1画素の第2検証窓部
BWH0を使用し、「U=0,D=1」のときは
(WD/2+1)×1画素の第2検証窓部BWH1を使用 し、「U=1,D=0」のときは(WD/2+1)× 1画素の第2検証窓部BWH2を使用する。 そしてこれらの各第2検証窓部を水平格子軸
(又は垂直格子軸)を始点として上下方向(又は
左右方向)にスライドさせて黒点情報を累積して
ゆき、最初に第2検証窓部を全部黒点情報である
「1」が埋める位置を検出する。このスライド操
作のスライド幅は、上下左右とも、第1検証窓部
のときと同様に、第21図A,Bのnの範囲内で
ある。そしてこの結果得られたずれ情報を第2検
証ずれ情報SX2,SY2として上記SX1,SY1と同
様にして決定するものである。 例えば、第30図の図形に対しては、「LB1=
1010」に応じて第2検証窓部BWH0を使用し、こ
れを格子軸から1画素石にスライドしたとき、こ
の第2検証窓部BWH0を黒点にて埋めることがで
きるので「SX2=1」となる。しかし「LB1=
1010」より上下方向のスライド操作を行う必要は
ないので、これを示すため「SY2=1000」とす
る。 また第31図では「LB1=1111」により第2検
証窓部BWH0とBWV0を使用する。このとき第2
検証窓部BWH0は格子軸上で黒点で埋めるためス
ライドさせる必要がなく「SX2=0」であるが、
第2検証窓部BWV0は下方に1画素スライドさせ
たとき全部黒点となるので「SY2=1」となる。 そして第32図では、「LB1=0111」により第
2検証窓部BWH2とBWV0を使用する。このとき
第2検証窓部BWH2およびBWV0は格子軸上に位
置させたときいずれも全部黒点となるので「SX2
=0、SY2=0」である。 しかしながら第33図では「LB1=0111」によ
り、第2検証窓部BWH2およびBWV0を使用する
ものであるが、これらの第2検証窓部BWH2およ
びBWV0を第21図A,Bに示す幅n内にスライ
ドしても全部黒点とすることができないので、
「SX2=999,SY2=999」となる。 上記の如くして求められた第2検証ずれ情報
SX2,SY2を基にして、格子点近傍の図形構造を
捉える矩形領域を更に動かしてその線分を格子軸
上により正確に位置するよう正規化したあとで、
再び上記初期格子点ラベルコードLBLおよび第
1検証ラベルコードLB1を抽出したと同様の方法
で、第2検証ラベルコードLB2を求める。 すなわち、第34図Aでは「SX2=1,SY2=
1000」であるので、これにもとづき矩形領域を右
方向に1画素移動する。このとき「SY2=1000」
のため、上下方向には矩形領域は動かさない。こ
の結果、第34図Bの如き図形が得られ、これに
もとづき上記初期格子点ラベルコードLBLおよ
び第1検証ラベルコードLB1を抽出したときと同
様の方法で第2検証ラベルコード「LB2=1010」
を求めることができる。 また第35図Aの図形では「SX2=0,SY2=
1」であり、矩形領域を下方向に1画素移動す
る。この結果第35図Bの如き図形が得られ、こ
れにもとづき、第2検証ラベルコード「LB2=
1111」を求めることができる。 そして第36図Aの図形では「SX2=0,SY2
=0」であり、このまま第36図Bのように、第
2検証ラベルコード「LB2=0111」を求めること
ができる。 さらに、第37図Aの図形では「SX2=999,
SY2=999」であり、このまま、第37図Bのよ
うに、第2検証ラベルコード「LB2=0111」を求
めることができる。 〔〕 ラベルコード生成処理部における局
部形状抽出処理部の処理。 上記により求められたLBL、SX1、SY1、
LB1、SX2、SY2、LB2等は次の事項を表現して
いる。 格子点近傍に線分が存在するかどうか。 格子点近傍に線分が存在する場合にはその線
分は4方向(上下左右)のどの方向のものか。 格子点近傍に線分が存在するときにその線分
が格子軸からどの程度ずれているのか。 この局部形状抽出処理は、これらの図形表現に
加えて更に細かい局所的な形状特徴を捉えるため
に設けられたものであり、第38図に示す第1抽
出窓部SW′を用いて、格子点近傍に存在する線分
が線図形の線分であるかそれとも文字のストロー
クの一部であるか、その可能性を表現するもので
ある。 そしてこの局部形状抽出処理は、上記第2検証
処理部までの処理により正規化された図形に対し
て実行するものである。 この場合、第1抽出窓部SW′の各辺の矩形領域
内に、第38図Bおよび第39図A等に示した4
つの領域R′3,U′3,L′3,D′3を定義し、各領域
R′3〜D′3に対して次の処理を行なう。 (1) 第39図Aに示す如く、各領域R′3,U′3
L′3,D′3を細分化して1×n画素あるいはn×
1画素の領域の集合として捉える。この場合、
領域R′3は細分領域R′31,R′32,R′33,に分割さ
れ、領域U′3は細分領域U′31,U′32,U′33に分
割され、領域L′3は細分領域L′31,L′32,L′33
分割され、領域D′3は細分領域D′31,D′32,D′33
に分割されている。 (2) 各細分領域において(i)黒点の凝まりの個数
(ラインセグメントの個数)LSEG,(ii)黒点の
数(線幅に相当する)が閾値LTH以下である黒
点の凝まりの個数(線幅とみなし得る黒点の凝
まりの個数)ARiを夫々カウントする。なおこ
こで閾値LTHは筆記用具や入力装置の解像度等
から決まる線幅の閾値である。 (3) 細分領域毎に上記黒点の凝まりの個数
LSEG、黒点の凝まりの長さが閾値LTH以下の
個数ARiの数を基にして、あいまいさのフラグ
FAおよび連続腕CAMを示す次の2ビツト情報
を生成する。 LSEG=1,ARi=1 →FA=0.CAM=1 LSEG=0 →FA=0,CAM=0 その他 →FA=1,CAM=1 (4) 領域R′3、U′3、L′3、D′3の各領域毎に上記(3)
により得られた情報の論理和をとり、これを4
つの領域R′3、U′3、L′3、D′3毎に2ビツトの情
報とする。 (5) 領域R′3、U′3、L′3D′3の4つの領域から得ら
れる2ビツトずつの情報の合計8ビツトの情報
により、第39図Bに示す第1抽出ラベルコー
ドLB′3を生成する。ここで第39図Bの最後
の4ビツトD′、L′、U′、R′は、これらが「1」
のときには、その方向に線分が走つていること
を示しており、またF′R〜F′Dは、例えばF′R
「1」のときには右方向に走つている線分があ
いまいであること、すなわち、線図形の一部の
線分であつてノイズが垂つているか、文字の一
部であるということを表わしている。F′U
「1」のときには、上方向に走つている線分が
あいまいであること、つまり上記F′Rについて
説明したようなことが上方向に存在することを
表し、F′Lが「1」のときには、左方向に走つ
ている線分があいまいであり、F′Dが「1」の
ときには下方向に走つている線分があいまいで
あつて、それぞれ上記F′Rについて説明したよ
うなことがこれらにも存在することを表わして
いる。そしてF′Fが「1」のときは上記F′Rない
しF′Dのいずれかが「1」であることを示して
いる。 したがつて、第40図の図形を第1抽出窓部
SW′を使用して、上記(1)〜(5)の処理理にもとづき
第1抽出ラベルコードLB′3を作成する場合、
「LB′3=000001010」を得る。この場合は、第4
0図の図形ではあいまいさはなく、線分が上下に
走つていることを示している。 そして第41図の図形について第1抽出ラベル
コードLB′3を作成すれば「LB′3=000001111」を
得る。この場合は、あいまいさがなく、線分が上
下左右に走つていることを示している。 また第42図の図形について第1抽出ラベルコ
ードLB′3を作成すれば「LB′3=000000111」を得
るが、これはあいまいさがなく、線が上方向と左
右に走つていることを示している。 しかし、第43図の図形について第1抽出ラベ
ルコードLB′3を作成すれば、「LB′3‐100111111」
を得る。これは線分がこの第1抽出窓部SW′に対
しては上下左右に存在するものの、そのうち上方
向と右方向のものにあいまいさが存在することを
示している。 一般には上記第1抽出窓部SW′を使用して局部
形状抽出処理を行えば足りるが、例えば第44図
Aに示す如く線分に非所望な切れ目Gが存在する
と、第1抽出ラベルコードLB′3においては第3
9図B図示のビツトU′が論理「0」を示すこと
になる。この点を改良すべく、第44図に示す形
の第2抽出窓部SW″を用いるようにされる。該
第2抽出窓部SW″は、第38図Bに示す第1抽
出窓部SW′を包含しており、上述の領域R′3
U′3、L′3、D′3の他に、第44図Bに示す如く、
領域R″3、U″3、L″3、D″3をもつている。そして、
上述の第1抽出ラベル・コードLB′3を抽出した
と同様に、上記領域R′3、U′3、L″3、D″3を用いて
第2抽出ラベル・コードLB″3を抽出する。 第45図A,Bは、第44図Aに示す画像デー
タ(図示斜線部)に対して領域R′3、U′3、L′3
D′3を用いて第1抽出ラベル・コードLB′3を抽出
した状態を示している。また第45図C,Dは、
同じく第44図Aに示す画像データに対して領域
R″3、U″3、L′3、D″3を用いて第2抽出ラベル・
コードLB″3を抽出した状態を示している。 上記第1抽出ラベル・コードLB′3と第2抽出
ラベル・コードLB″3とが抽出された時点で、こ
れらの両コードを用いて、局部形状抽出ラベル・
コードLB3を決定する。各コードを
(A) Technical Field of the Invention The present invention relates to a logic circuit diagram processing device, in particular, which reads handwritten drawings in which line figures drawn along lattice axes and graphic figures including characters are mixed, and extracts logic symbols and line segments. , and a logic circuit diagram processing device that recognizes and extracts graphic parts, is configured to summarize image data near grid points into an intensive grid point label code, and performs the above processing based on the intensive grid point label code. The present invention relates to a logic circuit diagram processing device that performs recognition processing. (B) Technical Background and Problems Conventionally, hand-drawn logic circuit diagrams have been input into data processing devices. It was supposed to be entered. In this case, for example, considering inputting a straight line, for each line, the operator needs to indicate the coordinates of one end of the line and the coordinates of the other end, and also input information indicating that it is a straight line. be. For this reason, this is not a problem when inputting relatively simple circuit diagrams, but when inputting extremely complex circuit diagrams such as IC circuits, data input becomes extremely complicated and requires considerable patience on the part of the operator. requires,
Furthermore, input errors are likely to occur. (C) Object and Structure of the Invention In view of the above points, the present invention aims to provide a processing device that automates the input processing of logic circuit diagrams, and it It is an object of the present invention to provide a processing device that performs the above processing by employing a method of consolidating image data in the vicinity of lattice points into an intensive lattice point label code for a drawn line figure. Therefore, the logic circuit diagram processing device of the present invention obtains symbols drawn along predetermined grid axes and connections between symbols by reading a handwritten drawing in which line figures and graphic figures including characters exist. In a logic circuit diagram processing device that recognizes and extracts line figures and drawing figure parts from image data obtained by processing a grid point, a lattice point label code generating means 107 generates a lattice point label code indicating the possibility of the existence of image data near a lattice point. , 109; a positional deviation verification means 103 for verifying the positional deviation of the image data with respect to the grid points based on the grid point label code; local shape extraction means 119 for identifying the possibility of the existence of a connector at the intersection when the image data intersects at the grid point; circular shape extraction means () for determining the possibility of the existence of circular image data in the vicinity; at least the grid point label code obtained from the grid point label code generation means; and the grid point label code obtained from the positional deviation verification means. Based on positional deviation information, local shape label information obtained from the local shape extraction means, line connector information obtained from the line connector extraction means, and circular shape information obtained from the circular shape extraction means. an intensive lattice point label code generating means 121 for determining an intensive lattice point label code that aggregates image data information in the vicinity of the lattice points; and recognition of single and compound symbols based on the intensive lattice point label code. Symbol recognition means 1
28, 129, 130, 131, 132, 13
3, 134, 135, 136, 137), and line segment extraction means 142, 14 for extracting symbol connection lines from the symbol information obtained by the intensive grid point label code and the symbol recognition means.
4, 145, 146, 148, and character area extracting means 147 for extracting character examples and separating characters from the intensive grid point label code and the image data. In addition, in the above, for example, code 1 is used for the lattice point label code generation means.
The reason why 07 and 109 are added is to clearly illustrate the correspondence with FIG. 4 and FIGS. 99A and B in the explanation that follows with reference to the drawings. The generation means is number 1 in the figure.
This does not indicate that it is unrelated to constituent units other than those shown as 07,109. The same applies to other codes. This will be explained below with reference to the drawings. (D) Embodiments of the Invention In the present invention, drawings drawn along the grid axes (X-axis and Y-axis) as shown in FIG. A drawing containing a mixture of drawings and figures is read with an optical reading device such as a facsimile input device, the read image data is aggregated as data on grid points (lattice axis intersection points), and then logical symbols and line segments are , and character parts, which are then processed for recognition, and then input to the data processing apparatus. Furthermore, the grid point G 5 shown in Figure 2
If, for example, a line figure V shown in FIG. 3 exists around the grid point G5 , as will be described later,
Within the range of the arrow shown in Figure 2 centered on Whether the line segment exists, the deviation of the line segment to the existing position, etc. are extracted, aggregated, and stored as information on the grid point G5 . Then, characters, logical symbols, etc. are recognized based on each aggregated lattice point label code, and inputted into the data processing device. FIG. 4 shows the overall configuration of an embodiment of a logic circuit diagram processing apparatus according to the present invention. Reference numeral 1 in the figure represents a drawing to be processed, and 2 represents processing result information extracted by the logic circuit diagram processing apparatus according to the present invention. Below, each component shown in Figure 4,...
Although a detailed explanation will be given according to the following, each component processing section, etc. can be roughly considered as follows. Input processing unit for drawings and various information. Drawing 1 is read by an input device such as a facsimile or a drum scanner, and the read image data is subjected to so-called preprocessing such as noise removal and smoothing, and then stored in an image memory. and,
Enter various information such as the size and orientation of the input drawing, the number of grids, etc. interactively using a display, keyboard, light pen, etc. In addition, in order to correct the input drawing's inclination and set the recognition area,
Input the coordinate position of the reference point (the "+" mark shown in FIG. 1) written in the corner. Label code generation processing section. The image data address of each grid point is calculated from information such as the orientation of the input drawing, the number of grids between reference points, and the position of the reference points, image data tilt is corrected, and images near each grid point are calculated. The lattice point labels and codes shown in Figure 5 show the shape features of the data.
Express as LOGLBL. Note that the lattice point label code first obtained in the processing section is called an initial lattice point label code LBL. Based on the label code LBL, an intensive lattice point label code is generated through processing by a first verification processing section, a second verification processing section, a local shape extraction processing section, etc., which will be described later. Here, each bit of the lattice point label code LBL or LOGLBL will be briefly summarized. #28 to #31 bit This bit is a direction code, and as described later, it expresses the direction in which the line segment extends when viewed from grid point G5 .
(D), leftward direction (L), upward direction (U), and rightward direction (R), a logic "1" is set in the direction in which the line segment extends. Bits #24 to #27 These bits are "fuzzy" direction codes that indicate whether the line segment, if any, has a complex shape. In other words, whether or not it seems to be part of a character is expressed using logic "1". For example #24
Bit F D being logic "1" indicates that the line segment (D=1) extending below the grid is likely to be part of a character. #19 to #22 bits These bits are deviation direction codes and indicate in which direction the existing line segment is deviation from the grid point. #12 to #15 bits These bits are gap direction codes, and indicate whether a break exists in a line segment extending in any direction, up, down, left, or right of the grid. #16 bit This bit is an "ambiguous" flag and is set to logic "1" when any one of bits #24 to #27 is logic "1". #23 bit This bit is a “deviation” flag,
When any one of #19 to #22 is logic "1", it is set to logic "1". #11 bit This bit is a gap flag,
When any one of bits #12 to #15 is logic "1", it is set to logic "1". #18 bit This bit is a line connector display flag, which means that the connection lines in the logic circuit diagram are electrically connected. This indicates whether or not a flag (referred to as a flag) exists at the grid point, and if it exists, it is set to logic "1". #9 bit This bit is a triangular display flag, and is set to logic "1" when a triangular pattern exists corresponding to the grid point. #10 bit This bit is a large circular shape display flag, and is set to logic "1" when a large circular pattern exists corresponding to the grid point. #17 bit This bit is a small circular shape display flag, and is set to logic "1" when a small circular shape pattern exists corresponding to the grid point.
It is said that #8 bit This bit is a symbol area flag and indicates that a logical symbol is written corresponding to the grid point. #0 bit The bit is a start point flag and indicates that the grid point is the start point (terminal position) of a logic symbol. #1 bit This bit is a reverse logic symbol display flag, and indicates that a small circular pattern (reverse logic symbol) that provides negative logic is attached to the start point indicated by the #0 bit. #2 and #5 bit This bit is a start point direction code, and indicates in which direction, up, down, left, or right, the connection line connected to the start point indicated by the #0 bit extends. Circle/triangle extraction processing section. It is extracted whether each pattern having the shape as shown in bit #9, bit #10, and bit #17 in the lattice point label code shown in FIG. 5 exists. Label code/noise processing section. Corresponding to the information of #11 to #31 bits of the generated initial grid point label code, noise existing in each piece of information is removed. Outward arm removal unit. The direction code corresponding to the arm protruding outside the frame of Drawing 1 is set to logic "0". Pair processing unit. Between mutually adjacent grid points, if there is an arm pointing toward the other at one of the grid points, and if there is no arm to be paired at the other grid point, the direction corresponding to the arm. Set the code to logic “0”. Line breakage correction unit. To correct line segments that should originally exist as one line into a connected form for line breaks within one grid interval. Misalignment correction 1 unit Extra misalignment direction code (#19 to #22 bit) and misalignment flag (#23)
bit) is set to logic "0". Ambiguity correction 1 unit Focusing on one grid point, ambiguous direction codes (#24 to #27 bits), etc. are corrected based on the grid point label codes of adjacent grid points in four directions. Symbol classification processing section. Based on the four-way code in the grid point label code, the position and shape (type) of the logical symbol in drawing 1 are extracted. However, in this process, it may be considered that classification is performed at the level of major classification. Complex gate symbol recognition processing unit. As shown in FIG. 6, the logic circuit diagram processing device of the present invention recognizes a set of a plurality of logic symbols as a so-called composite gate symbol C-G having a certain meaning. ing. This recognition processing unit recognizes composite gate symbols based on the type and positional relationship of each symbol. Then, for the recognized composite gate symbol, the lattice point label code at the start point position includes the start point flag (#0 bit), the start point code (#2 to #5 bit), and the inverse logic symbol display flag ( #1 bit). Symbol area setting processing section. Among the logic symbols to be read by the logic circuit diagram processing device of the present invention, one symbol may be extracted redundantly as different symbols depending on the reading state, as shown by arrows a and b shown in FIG. may occur. In order to correctly detect symbols that have been extracted repeatedly in this way, or to ensure that subsequent processing is performed correctly, a flag is set to clearly indicate that the information on the grid points is determined as part of the symbol. urge That is, the symbol area flag (#8 bit) shown in FIG. 5 is set to logic "1". Line segment confirmation processing section. After the symbol areas are determined, connection lines connecting the symbols are determined. Gap/vague arm processing part. After the connection line is established, the four-way code in that direction is set to logic "0" for the grid point that has the gap direction code (#12 to #15 bits) and the ambiguous direction code (#24 to #27 bits). Then, the same processing as that of the processing unit described above is performed. Single gate symbol recognition processor. In the symbol classification in the processing unit described above, extraction was performed based on the rough shape characteristics of the symbols, but in this processing unit, the two symbols in Figure 8A and the two symbols in Figure 8B As shown in the figure, symbols belonging to the same group are distinguished from each other by, for example, whether or not an inverse logic symbol C is attached as shown in the figure. make a decision Then, for the recognized single gate symbol, the start point flag (#0 bit), the start point code (#2 to #5 bit), and the inverse logic symbol are added to the grid point label code at the start point position. Set the display flag (#1 bit). Start point setting processing section. 2 symbols in Figure 9A, 2 in Figure 9B
Regarding the three symbols in FIG. 9C, etc., the shapes of the symbols are the same, but the directions and positions in which the connecting lines are drawn vary. To distinguish and identify each of these symbols, we examine the state of the symbol's starting point candidates,
The starting points of these symbols are determined and the starting point information is set in the grid point label code. Reverse logic symbol processing section. When processing symbols with inverse logic symbols as shown in Figure 10A, Figure 10B
As shown in three typical examples, the four-way code (#28 to #31 bits) in each lattice point label code near the inverse logic symbol is
It appears in various ways. If such a situation exists, it will have an adverse effect on later tracking processing, so as shown in Figure 10C, the extra 4
Make sure to drop the direction code. This processing section performs such processing. Line breakage correction processing unit near the start point. A so-called line break (gap) is likely to occur near the starting point position of a symbol. This processing section performs this correction processing. Preprocessing part for line segment extraction. Before finally extracting the connecting lines connecting symbols, preprocessing is performed. Gap/ambiguous arm processing unit At this point, the gap direction code (#12 to #15 bits) and the ambiguous direction code (#24 to #27 bits) are set at the lattice point, and the 4 in the corresponding direction is Drop the direction code (#28 to #31 bit). Then, a pair of processes similar to those of the above processing unit is performed. Line connector processing unit Performs predetermined processing (described later) on line connectors corresponding to branch points of connection lines. Line segment erasure processing unit in composite gate symbol The connection line in the composite gate symbol is a predetermined pattern, and there is no need to recognize this connection line. This unit erases this line segment. Connection line extraction processing section. In order to extract connection lines as individual vectors, start point - start point Branch point - branch point Bend point - bend point Start point - branch point Branch point - bend point Bend point - Track the 4-way code between starting points. Then, connect lines are extracted. For lines for which tracing is not completed, there is a possibility that the line is part of a character, and the ambiguity flag (#16 bit) of the grid point label code is set to logic "1". Character area extraction processing section. Once the symbols and connection lines have been extracted from the drawing 1, what remains are graphics such as characters. This processing section extracts a character area (image/figure area) based on the ambiguity flag (#16 bit) of the grid point label code. Character separation/recognition processing unit. For example, each character of the character example extracted by the processing unit is separated character by character, and character recognition is performed using character recognition processing technology. Result output processing section. The symbol information, connection line information, and character information extracted as described above are output to an external storage medium such as a floppy disk, or transmitted to another data processing device via a line. In the above, the processing carried out by each component processing section of the logic circuit diagram processing apparatus shown in FIG. [] Input processing unit for drawings and various information This processing unit correctly indicates the coordinates of the reference points (“+” marks at the four corners) shown in Figure 1 for subsequent correction of inclination and distortion. This is necessary. That is, the results inputted by this processing unit (contents on the image memory) are displayed on the television monitor, the coordinate position of the reference point on the display screen is indicated, and the subsequent processing is performed. At the time of correction, the correction is performed based on the coordinate position that should originally exist and the coordinate position of the input result. The input figure is stored on the image memory as having a size of, for example, 2048×3072 dots.
For this reason, the entire input graphic cannot be displayed as is on the television monitor at once, but is displayed in a reduced form. As a result, even if the reference point is indicated on the reduced display screen, sufficient accuracy cannot necessarily be obtained. In order to overcome this problem, the reference point is indicated with high precision by the procedure shown in the flowchart shown in FIG. That is, (1) First, the video data of the input figure is reduced to a magnification rate of 1/8, and the first half of the input figure (2048×1536
(dot) minutes. (2) Next, use the light pen to indicate the area where one of the reference points exists, and then display the area at a magnification of 1. (3) Next, write the area where the reference point exists.
After specifying with a pen, the area is displayed at a magnification of 8. (4) In this state, indicate the one reference point with a light pen. If the instruction cannot be made correctly, corrections are made until the instruction is made correctly, and when the instruction is made correctly, the instruction point is sent out as one of the reference points (written on the image memory as the first reference point). (5) Next, the first half of the input figure (2048 x 1536 dots) is displayed again at a magnification rate of 1/8, and the second standard is A point is written onto the image memory. (6) Next, the second half of the input shape (2048 x 1536 dots) will be displayed at a magnification rate of 1/8, and the above operation will be performed.
The third reference point is written on the image memory by operations similar to (2) to (4). (7) After that, the second half of the input figure (2048 x 1536 dots) is displayed again at a magnification rate of 1/8, and the fourth standard is A point is written on the image memory and becomes the end. [] Tilt correction of image data in the label code generation processing section. In the label code generation processing unit, based on the coordinates of the reference point input as described above, it detects how the reference point deviates from its original position and corrects the tilt and distortion of the image data. There is a need to. This process will be described below. Generally, the coordinates of the reference point are (0, 0), (X W , 0), (0, Y W ), (X W , Y W ) as shown in Figure 12A.
When the input drawing 1 given by is stored in an image memory, it may be stored in a rotationally distorted state as shown in FIG. 12B. For this purpose, as described above, when a reference point is indicated with a light pen on the input drawing 1-1 stored on the image memory, this indicated reference point becomes the first reference point.
In Figure 2B, for example, the coordinates (0, 0), (Xa,
Ya), (Xb, Yb), (Xc, Yc). Assuming that the input drawing 1 shown in FIG. 12 and the stored input drawing 1-1 match at the illustration origin (0, 0), the point (x, y) on the input drawing 1 is When compared with the point (x'-y') on Drawing 1-1 which has undergone rotational distortion, there is the following relationship: x'=xcosθ+ysinθ y'=ycosθ−Xsinθ --(1). Therefore, the point (x, y) on the input drawing 1 becomes the point (x', y') on the image memory.
It is sufficient to perform the correction assuming that the position is located at . However, performing the above correction for each pixel on the figure requires an extremely large amount of processing. For this reason, in the case of the present invention, the following correction is limited to the minimum amount of correction within the permissible range. That is, the input drawing 1 is divided into divided areas 3 each consisting of m×n pixels, and the coordinate position on the image memory of each divided area, for example, the upper left corner point (x 0 , y 0 ) of area 3-1, is determined. Determine whether it exists. In other words, the correspondence between (x 0 , y 0 ) and (x 0 ′, y 0 ′) shown in the diagram is
Determine based on formula (1). Then, the m×n
It is as if the divided area 3-1 given by pixels is the first
It will be assumed that the divided area 3'-1 is given by m×n pixels as indicated by the dotted line in FIG. 2B.
In other words, regarding drawing 1, if it is found that the upper left corner point (x 0 , y 0 ) of segmented area 3-1 corresponds to the coordinates (x 0 ', y 0 '), then the segmented area 3
In processing each pixel in -1 as being read, extract m pixels in the horizontal direction and n pixels in the vertical direction from the coordinate point (x 0 ′, y 0 ′) on Drawing 1-1. The m×n pixel segmented area 3'-1 thus obtained is read and processed. It will be easily understood that by adopting this method of dividing into each divided area, the amount of correction processing becomes 1/m·n. However, by adopting such a simplified method, the segmented area 3′−
It is necessary to evaluate how much error is included in each pixel within 1. When the size of segmented area 3'-1 is selected to be 10 x 10 pixels, and if an error of up to 2 pixels is allowed with respect to the true pixel position on input drawing 1, the calculated rotation angle θ is approximately 11 It is sufficient if it is less than ゜. Further, assuming that an error of at most one pixel is allowed, it is sufficient that the rotation angle is 5 degrees or less. Conversely, if there is actually a rotation of about 20 degrees,
Assuming that an error of up to 2 pixels is allowed,
This means that the size of the segmented area 3'-1 should be selected to be 5×5 pixels. Even when performing error correction using the simplified method described with reference to FIGS. 12A and 12B, it is complicated to measure the rotation angle θ, and measurement errors are likely to be introduced. For this purpose, the following process is taken. 13A and B are for example 4 of input drawing 1.
three reference points (0,0), (X w ,0), (0,Y W ),
It is assumed that (X W , Y W ) are given, and an arbitrary point (X, Y) becomes a point (X'-Y') on the rotationally distorted figure 1-1. From the above equation (1), there is a relationship of X'=Xcosθ+Ysinθ Y'=Ycosθ−Xsinθ. Here, as shown, X W , Y W ,
Considering X L , Y L , △X, △Y, X″, Y″, or Therefore, Also, X″=XX L /X W (∵X/X W =X″/X L ) Y″=YY L /Y W (∵Y/Y W =Y″/Y L ) Therefore It is expressed as Here, the above reference point (0,0) on input drawing 1,
(X W , 0), (0, Y W ), and (X W , Y W ) are known in advance. Then, display the figure 1-1 on, for example, a television monitor, and input the coordinates of the point corresponding to the reference point using a light pen or the like (0, 0).
If it is specified as (Xa, Ya), (Xb, Yb), (Xc, Yc), it is given as a known value as XL = Xc - Xb △X = Xb Y L = Yc - Ya △Y = Ya. [] Initial grid point label/code generation in the label code generation processing unit. When the inclination of the image data read onto the image memory is corrected as described above, in the present invention, as described above in connection with FIGS. 2 and 3,
Image data in the vicinity of grid point G5 is expressed in the form of a grid point label code. The initial lattice point label code roughly grasps the graphical structure in the vicinity of the lattice point, and its generation method will be explained below. First, the image data obtained by reading a handwritten drawing is divided into grid axes X 1 to X 3 and grid axes Y 1 to Y 3 as shown in FIG. Window portions W 1-x and 1 of n×1 pixel size corresponding to grid axis n are centered on C 5 .
A window W 1-Y with a size of ×n pixels is scanned in the X direction and Y direction, respectively. When even one black spot exists within this window, this is determined as the black spot detection output of each window "1". Hold this as part R 1-X and
Let R 1-Y hold each. As a result, for example, when the image data shown in FIG. 14 is scanned by the windows W 1-X and W 1-Y , the holding parts R 1-X and R 1-Y are in a state as shown by hatched areas, respectively. Above window W 1-X , W 1-Y
The output ``1'' as black point information from ``1'' will be retained as the projection result on each lattice axis. Next, as shown in FIG. 15A, rightward regions R 0 and R 1 are defined for the holding portion R 1-X, and the sum of "1" (indicating black point information) in these regions is determined. , if it is above a certain threshold, the grid point
The information "R=1" indicating that there is a possibility that a line segment exists in the right direction of G5 is determined, and the information "R=0" indicating that there is no possibility if it is less than a threshold value is determined. In the same way, left direction regions L 0 and L 1 are defined and the sum of "1" in each region is calculated, and if this is more than the threshold value, there is information "L = 1" indicating that there is a possibility that a line segment exists in the left direction. ” is determined, and if it is less than the threshold, “L=
0" is determined. Of course, as shown in Figure 15B,
Also for the holding part R 1-Y , there are upper and lower regions U 0 ,
U 1 and the downward regions D 0 , D 1 are defined , and the upward direction information U=1 or 0'' and downward direction information ``D=1 or 0'' are determined. In this way, the initial grid point label code (LBL) D,
L, U, and R are calculated, and for example, for the image data in Figure 14, there is a possibility that line segments exist above and below, as shown in Figure 16A, but there is no possibility on the left and right. As shown in FIG. 16B, the grid point G 5
Initial grid point label code for "LBL=1010"
is determined. In this way, for the image data as shown in FIG. 17A, the upper, lower, and
The initial grid point label code "LBL=1111" shown in Figure 17C is obtained to indicate that there is a possibility that line segments exist on the left and right sides, and for the image data shown in Figure 18A, , the left, right, and
"LBL=0111" shown in Fig. 18C is obtained to indicate that there is a possibility that a line segment exists in the upward direction.
Similarly, "LBL=0111" is obtained for the image data shown in FIG. 19A. [] Processing of the first verification processing unit in the label code generation processing statement. The first verification process is based on the above initial grid point label code.
Based on the LBL, it is verified whether a line segment actually exists in the vicinity of the grid point in the direction corresponding to the initial grid point label code LBL. First, as shown in Fig. 20, W V0 , W V2 , W H0
~W H2 each first verification window section is provided. The first of these
The verification window is determined based on LBL, and when "R=1, L=1", the verification window is 1×n pixels.
Using the first verification window W V0 , "R=0, L=1"
When "R=1, L=0", the first verification window section WV1 of 1×(n/2+1) pixels is used, and when "R=1, L=0", the first verification window section of 1×(n/2+1) pixels is used. Use W V2 . When "U=1, D=1", the first verification window section W Hp of n×1 pixels is used, and when "U=0, D=1", the first verification window section W Hp of (n/2+1)×1 pixels is used. One verification window W H1 is used, and when "U=1, D=0", a first verification window W H2 of (n/2+1)×1 pixels is used. and the second
As shown in Figure 1A and B, these first verification windows are set at the horizontal grid axis (or vertical grid axis) as the starting point,
The black point information is accumulated by sliding in the vertical direction (or horizontal direction), and the position where the first verification window is completely filled with "1" which is the black point information is first detected.
The slide width of this slide operation is half the distance between the grids in both the vertical and horizontal directions, that is, Fig. 21A and B
is within the range of n. This slide operation allows you to determine whether there is a line segment in the vicinity of the grid point in the direction according to the initial grid point label code, and if so, how far that line segment deviates from the grid axis. can be detected. Then, use these deviation information as the first
Extracted as verification deviation information SX1 and SY1. Here, the codes of SX1 and SY1 are displayed as follows. SX1: Horizontal shift + right direction; - left direction SY1: Vertical shift + downward direction; - upward direction However, there was no condition in which the black dot completely filled the window within the slide width of n pixels. In this case, set the value "999" for SX1 and SY1. If no line segment in the horizontal or vertical direction is detected as the initial grid point label code LBL, set the value "1000" for SX1 and SY1 to indicate that no slide operation was performed in that direction. do. FIGS. 22 to 25 show the state in which the first verification process is performed on various figures to verify their deviations. In Figure 22, the second
When the first verification window W H0 in Figure 0 is slid four pixels to the right from the grid axis, the first verification window W H0 can be filled with black dots, so "SX1 = +4". However, since "LBL=1010" there is no need to perform a sliding operation in the vertical direction, so "SY1=1000" is used to indicate this. Also, in Figure 23,
"LBL=1111", and at this time the first verification window
Since the first verification window portions W H0 and W V0 are filled with black dots on the lattice axes without the need to slide W H0 and W V0 , "SX1=0=0.SY1=0". In FIG. 24, "LBL=0111", and in this case, when the first verification window W H2 is slid one pixel to the left, the first verification window W H2 becomes a black dot, and the first verification window W H2 becomes a black dot. When W V0 is slid 3 pixels downward, all of these can be made into black points, so "SX1=-1, SY1=+3". However, in the figure of FIG. 25, "LBL=0111", and when the first verification window W H2 is slid one pixel to the left, all of the first verification window W H2 can be made into black points. The second verification window uses the first verification window W V0 .
Even if it slides by the width n shown in FIG. 1A, this first verification window WV0 cannot be filled with black dots, and therefore "SX1=-1, SY1=999". The first verification deviation information SX1 obtained as above,
Based on SY1, move the rectangular area that captures the graphic structure near the lattice points, normalize the line segments within the rectangular area so that they are located on the lattice axes, and then
A lattice point label code is obtained again using the same method as the method used to extract the initial lattice point label code (LBL) above, and this is used as the first verification label code (LB1).
shall be. In this case, the normal compound in the X direction is as follows. In the case of "SX1=1000", "SX1=999", "SX1=0), the rectangular area does not move. And SX1>0"
When , the rectangular area is moved to the right by |SX1|, and when "SX1<0", the rectangular area is moved to the left |
Move only SX1|. Similarly, normalization processing in the Y direction is performed as follows. In the case of "SY1=1000", "SY1=999", and "SY1=0", the rectangular area does not move. And “SY1>
0", the rectangular area is moved downward by |SY1|, and when "SY1<0", the rectangular area is moved upward by |SY1|. For example, in the case of image data as shown in FIG. 26A, the rectangular area for "SX1=4" is moved by 4 pixels to the right (relatively, to the left of the image data). Since "SY1=1000", the rectangular area does not move in the vertical direction. As a result, a figure as shown in FIG. 26B is obtained, which is scanned by the windows W 1-X and W 1 -Y as shown in FIG. 1-Y , black point information as shown in the shaded area in FIG. 26B is obtained. Based on this, the same process as explained in connection with FIG. 15 is performed to obtain the first verification label code LB1.
(LB1=DURL), and thus, in the figure of FIG. 26B, the first verification label code "LB1
=1010'' is obtained. In the case of the image data shown in FIG. 27A, since "SX1=0, SY1=0", no movement is performed in the horizontal and vertical directions, and as a result, the first verification label code is "LB1=1111". , is the same as the initial grid point label code. Furthermore, in the case of the image data shown in FIG. 28A,
Because "SX1=-1, SY1=3", move the rectangular area by 1 pixel to the left and 3 pixels to the bottom (relatively, move the image data by 1 pixel to the right and 3 pixels to the top)
pixel movement) and performs the above processing, resulting in the first grid point label code LBL being the same as the initial grid point label code LBL.
Obtain verification label code "LB1=0111". Furthermore, in the case of the image data shown in FIG. 29A, since "SX1=-1, SY1=999", the rectangular area is moved by one pixel to the left and the first verification label code "LB1=0111" is added. get. [] Processing of the second verification processing section in the label code generation processing section. The second verification process includes the above first verification label code.
Based on LB1, the vicinity of the grid point is actually
Detects whether a line segment exists in the direction corresponding to verification label code LB1, and generates a second verification label code.
This is a process to obtain LB2, and according to the first verification label code LB1, as shown in Fig. 30, the second
Verification windows BW V0 ~ BW V2 , BW H0 ~ BW H2 are provided,
Verification is performed using the same method as the first verification process described above. As shown in FIG. 3, the size of each of these second verification windows is determined as follows, where WD is the width between the lattice axes on both sides of the lattice point G5 . The manner in which these second verification windows are used is determined as follows. In other words, "R=1, L=1"
When , the second verification window BW Vp of 1×WD pixel is used, and when “R=0, L=1”, the second verification window BW V1 of 1×(WD/2+1) pixel is used. "R=
1, L=0'', the second verification window BW V2 of 1×(WD/2+1) pixels is used. And “U=1,
When D=1, the second verification window of WD×1 pixel
When “U=0, D=1”, use the second verification window BW H1 of (WD/2+1)×1 pixel, and when “U=1, D=0”, use BW H0. A second verification window BW H2 of (WD/2+1)×1 pixel is used. Then, each of these second verification windows is slid vertically (or horizontally) from the horizontal grid axis (or vertical grid axis) to accumulate black point information, and first, all of the second verification windows are The position to be filled with "1" which is black point information is detected. The sliding width of this sliding operation is within the range of n in FIGS. 21A and 21B, both vertically and horizontally, as in the case of the first verification window. Then, the deviation information obtained as a result is determined as second verification deviation information SX2, SY2 in the same manner as SX1, SY1 described above. For example, for the figure in Figure 30, "LB1=
When using the second verification window BW H0 according to "1010" and sliding it one pixel from the grid axis, this second verification window BW H0 can be filled with black dots, so "SX2 = 1 ”. However, “LB1=
Since there is no need to perform a sliding operation in the vertical direction from "1010", "SY2=1000" is used to indicate this. Furthermore, in FIG. 31, the second verification window portions BW H0 and BW V0 are used due to "LB1=1111". At this time, the second
The verification window BW H0 is filled with black dots on the lattice axis, so there is no need to slide it and "SX2 = 0".
When the second verification window BW V0 is slid downward by one pixel, it becomes a black dot, so "SY2=1". In FIG. 32, the second verification window portions BW H2 and BW V0 are used with "LB1=0111". At this time, when the second verification window parts BW H2 and BW V0 are located on the grid axis, they all become black dots, so "SX2
= 0, SY2 = 0''. However, in Fig. 33, the second verification window parts BW H2 and BW V0 are used due to "LB1 = 0111", but these second verification window parts BW H2 and BW V0 are changed to A and B in Fig. 21. Even if you slide within the indicated width n, it will not be possible to make all black points, so
"SX2=999, SY2=999". Second verification deviation information obtained as above
Based on SX2 and SY2, after further moving the rectangular area that captures the graphical structure near the lattice points and normalizing the line segments to more accurately position them on the lattice axes,
Again, the second verification label code LB2 is obtained in the same manner as the initial lattice point label code LBL and the first verification label code LB1 were extracted. That is, in FIG. 34A, "SX2=1, SY2=
1000'', so based on this, the rectangular area is moved one pixel to the right. At this time "SY2=1000"
Therefore, the rectangular area does not move in the vertical direction. As a result, a figure as shown in FIG. 34B is obtained, and based on this, the second verification label code "LB2=1010" is extracted in the same manner as when the above-mentioned initial lattice point label code LBL and first verification label code LB1 are extracted.
can be found. Also, in the figure of Figure 35A, “SX2=0, SY2=
1'' and moves the rectangular area downward by one pixel. As a result, a figure as shown in FIG. 35B is obtained, and based on this, the second verification label code "LB2=
1111". In the figure of Figure 36A, “SX2=0, SY2
= 0'', and the second verification label code ``LB2 = 0111'' can be obtained as shown in FIG. 36B. Furthermore, in the figure of FIG. 37A, “SX2=999,
SY2=999'', and the second verification label code ``LB2=0111'' can be obtained as shown in FIG. 37B. [] Processing of the local shape extraction processing section in the label code generation processing section. LBL, SX1, SY1, determined above
LB1, SX2, SY2, LB2, etc. represent the following items. Whether a line segment exists near the grid point. If a line segment exists near a lattice point, which of the four directions (up, down, left, and right) does the line segment belong to? When a line segment exists near a lattice point, how far does the line segment deviate from the lattice axis? This local shape extraction process is provided to capture even more detailed local shape features in addition to these graphic representations, and uses the first extraction window SW′ shown in FIG. 38 to extract grid points. It expresses the possibility of whether a line segment existing in the vicinity is a line segment of a line figure or a part of a character stroke. This local shape extraction processing is performed on the figure normalized by the processing up to the second verification processing section. In this case, within the rectangular area on each side of the first extraction window SW', the four
Define three regions R′ 3 , U′ 3 , L′ 3 , D′ 3 and
The following processing is performed on R′ 3 to D′ 3 . (1) As shown in FIG. 39A, each region R' 3 , U' 3 ,
Subdivide L′ 3 and D′ 3 to 1×n pixels or n×
It is regarded as a set of regions of one pixel. in this case,
Region R' 3 is divided into sub-regions R' 31 , R' 32 , R' 33 , region U' 3 is divided into sub-regions U' 31 , U' 32 , U' 33 , and region L' 3 is divided into sub-regions R' 31 , R' 32 , R' 33 , It is divided into subdivision areas L′ 31 , L′ 32 , L′ 33 , and area D′ 3 is divided into subdivision areas D′ 31 , D′ 32 , D′ 33
It is divided into (2) In each subdivision area, (i) the number of black dot clusters (the number of line segments) LSEG, (ii) the number of black dot clusters where the number of black dots (corresponding to the line width) is less than or equal to the threshold L TH (The number of black dot clusters that can be considered as line width) ARi is counted. Note that the threshold value L TH here is a threshold value of the line width determined from the resolution of the writing instrument, the input device, and the like. (3) Number of clusters of black dots in each subdivision area
LSEG, the ambiguity flag is set based on the number ARi of sunspot condensation lengths below the threshold L TH .
Generate the following 2-bit information indicating FA and continuous arm CAM. LSEG=1, ARi=1 →FA=0.CAM=1 LSEG=0 →FA=0, CAM=0 Others →FA=1, CAM=1 (4) Area R' 3 , U' 3 , L' 3 , the above (3) for each region of D′ 3
Take the logical sum of the information obtained from , and divide this into 4
Two bits of information are provided for each region R' 3 , U' 3 , L' 3 , and D' 3 . ( 5 ) The first extracted label code LB shown in FIG. ′3. Here, the last 4 bits D', L', U', and R' in FIG. 39B are "1".
When , it indicates that a line segment runs in that direction, and F' R ~ F' D indicates that, for example, when F' R is "1", a line segment running in the right direction is ambiguous. In other words, it indicates that the noise is hanging from a part of a line segment of a line figure, or that it is part of a character. When F′ U is “1”, it means that the line segment running upward is ambiguous, that is, the same thing as explained above for F′ R exists in the upward direction, and F′ L is “ 1”, the line segment running to the left is ambiguous, and when F′ D is “1”, the line segment running downward is ambiguous, as explained above for F′ R. This means that these things also exist. When F' F is "1", it indicates that one of the above F' R to F' D is "1". Therefore, the figure in Fig. 40 is used as the first extraction window.
When using SW′ to create the first extracted label code LB′3 based on the processing principles of (1) to (5) above,
Obtain “LB′3=000001010”. In this case, the fourth
There is no ambiguity in the figure in Figure 0, which shows that line segments run up and down. Then, if the first extracted label code LB'3 is created for the figure shown in FIG. 41, "LB'3=000001111" is obtained. In this case, there is no ambiguity, indicating that the line segments run vertically and horizontally. Also, if we create the first extracted label code LB'3 for the figure in Figure 42, we get "LB'3 = 000000111", which indicates that there is no ambiguity and that the line runs upward and left and right. ing. However, if you create the first extracted label code LB'3 for the figure in Figure 43, it will be "LB'3-100111111".
get. This indicates that although line segments exist above, below, to the left, and to the right with respect to the first extraction window SW', there is ambiguity in those in the upper and right directions. Generally, it is sufficient to perform the local shape extraction process using the first extraction window SW', but if an undesired break G exists in the line segment as shown in FIG. 44A, for example, the first extraction label code LB In '3, the third
Bit U' shown in FIG. 9B indicates logic "0". In order to improve this point, a second extraction window SW'' shown in FIG. 44 is used.The second extraction window SW'' is similar to the first extraction window SW shown in FIG. 38B. ′ and includes the above-mentioned region R′ 3 ,
In addition to U′ 3 , L′ 3 , D′ 3 , as shown in FIG. 44B,
It has areas R″ 3 , U″ 3 , L″ 3 , and D″ 3 . and,
In the same way that the first extracted label code LB′ 3 was extracted above, the second extracted label code LB″ 3 is extracted using the above regions R′ 3 , U3 , L″ 3 , and D″ 3 45A and B show areas R' 3 , U' 3 , L' 3 ,
It shows a state in which the first extracted label code LB'3 is extracted using D' 3 . In addition, Fig. 45C and D are
Similarly, for the image data shown in FIG. 44A,
Second extraction label using R″ 3 , U″ 3 , L′ 3 , D″ 3
This shows the state in which the code LB″ 3 has been extracted. When the first extracted label code LB′3 and the second extracted label code LB″3 have been extracted, using these two codes, the local Shape extraction label/
Determine code LB3. each code

【表】 のように表示するとき、局部形状抽出ラベル・コ
ードLB3は次の論理によつて決定される。 即ち、最初にLB′3をまずLB3に代入する。 そして次に、 〓 | | 〓 | | | 〓R″=1&R=0→R=1、FR=1、FF=1、GR=1
、GF=1 | 〓R″=1&R=0→R=1、FR=1、FF=1、GR=1
、GF=1 U″=1&U=0→U=1、FU=1、FF=1、GU=1、G
F=1 | 〓R″=1&R=0→R=1、FR=1、FF=1、GR=1
、GF=1 U″=1&U=0→U=1、FU=1、FF=1、GU=1、G
F=1 L″=1&L=0→L=1、FL=1、FF=1、GL=1、G
F=1 | 〓R″=1&R=0→R=1、FR=1、FF=1、GR=1
、GF=1 U″=1&U=0→U=1、FU=1、FF=1、GU=1、G
F=1 L″=1&L=0→L=1、FL=1、FF=1、GL=1、G
F=1 D″=1&D=0→D=1、FD=1、FF=1、GD=1、G
F=1 の処理を実行し、代入して得られたLB3を補正
するとともに、第5図図示のギヤツプ・フラグ
GFおよびギヤツプ方向コードGD・GL・GU・GR
情報を生成する。 上記処理によつて第44図Aに示した程度の線
パターンの切れは充分吸収し得る。第46図は、
第45図B図示のコードLB′3と第45図D図示
のコードLB″3とにもとづいて得られた局部形状
抽出ラベル・コードLB3と、上記ギヤツプ関係の
ビツトGF、GD、GL、GU、GRとを示している。 なお、ギヤツプ方向の抽出処理は、上述の第2
検証処理によつて入力画像を格子軸上に正規化し
た後、第2検証ラベルコードを抽出するために投
影処理を実行するが、ギヤツプ方向の抽出はこの
投影結果を基にして各方向における投影結果が連
続しているか否かの判定によつて行う。第47
図、第48図に処理例を示す。 〔〕 ラベル生成処理部における集約的格
子点ラベル・コード(LOGLBL)の決定処理。 上記〔〕ないし〔〕によつて、初期格子点
ラベルコードLBL;第1検証ずれ情報SX1、SY、
第1検証ラベルコードLB1:第2検証ずれ情報
SX2、SY2、第2検証ラベルコードLB2、および
局部形状抽出ラベルコードLB3を抽出することが
できる。そしてこれらの抽出情報をまとめて第5
図に示す如き形で32ビツトの集約的格子点ラベル
コードLOGLBLを下記の如く決定する。 (1) 初期格子点ラベルコードLBLがすべて0の
ときは、格子点ラベルコードLOGLBLは32ビ
ツト全部を「0」にするが、LBLがすべて
「0」でないときで局部形状抽出ラベルコード
LB3がすべて「0」の場合には、LOGLBLを
#16ビツト目のあいまいフラグのみ「1」にし
て残りの31ビツトを「0」とする。 (2) 第1検証ずれ情報SX1、SY1および第2検証
ずれ情報SX2、SY2がいずれも「999」でない
場合には次式によりSX、SYを求める。 SX=SX1+SX2 SY=SY1+SY2 ただし、「SX1=1000」又は「SX2=1000」
のとき「SX=0」とし、「SY=100」又は
「SY2=1000」のとき「SY=0」とする。 (3) この結果を用いて、まず、LOGLBLをクリ
アして、LBL、LB1、LB2およびLB3の下位4
ビツトの論理積をとり、LOGLBLの下位ビツ
ト、すなわち、第5図の#28ないし#31ビツト
に設定する。 (4) 次に上記SX、SYの絶対値|SX|、|SY|
に対して、ずれの閾値ATHを設定し、次の処理
を行なう。この閾値ATHは、例えば窓部の最大
移動距離であるnの半分即ちn/2に定める。 (4-1) |SX|>ATHの場合、 第5図に示すLOGLBLの#23ビツトであ
るずれフラグを「1」にする。 そして「SX>0」のとき、右方向にずれ
ているので、LOGLBLの#22ビツトを「1」
とし、 「SX<0」のとき、左方向にずれている
のでLOGLBLの#20ビツトを「1」とする。 また、あまり大きく矩形領域を動かしすぎ
ることにより生ずる弊害を防止するために上
記ATHよりやゝ小さい閾値O THを設定し、次の
処理を行う。 |SX|>O THの場合、 「SX>0」ならば、 LBLのRビツトが「1」ならば、格子軸
の右側にあつたものをシフトしすぎたことを
示すものであり、最初の状態に信頼を置き
LOGLBLの#31ビツトを「1」とする。 「SX<0」ならば、 LBLのLビツトが「1」ならば、同様に
してLOGLBLの#29ビツトを「1」にする。 (4-2) |SY|>TTHの場合、 上記(4−1)と同様に、LOGLBLの
#23ビツトであるずれフラグを「1」にす
る。 そして「SY>0」のとき、下方向にずれ
ているので、LOGLBLの#19ビツトを「1」
とし、「SY<0」のとき上方向にずれている
ので#21ビツトを「1」にする。 また|SY|>O THの場合 「SY>0」ならば、 LBLのUのビツトが「1」ならば、
LOGLBLの#30ビツトを「1」にする。 「SY<0」ならば、 LBLのDビツトが「1」ならば、
LOGLBLの#28ビツトを「1」にする。 (5) それから、あいまい方向の処理を行なう。 (5-1) LOGLBLの#31ビツトが「1」でかつ
LB3のFRのビツトが「1」ならば、
LOGLBLの#27ビツトおよび#16ビツトの
各ビツトを「1」にする。 (5-2) LOGLBLの#30ビツトが「1」でかつ
LB3のFUのビツトが「1」ならば、
LOGLBLの#26ビツトおよび#16ビツトの
各ビツトを「1」にする。 (5-3) LOGLBLの#29ビツトが「1」でかつ
LB3のFLのビツトが「1」ならば、
LOGLBLの#25ビツトおよび#16ビツトの
各ビツトを「1」にする。 (5-4) LOGLBLの#28ビツトが「1」でかつ
LB3のFDのビツトが「1」ならば、
LOGLBLの#24ビツトおよび#16ビツトの
各ビツトを「1」にする。 (6) 第1検証ずれ情報SX1、SY1および第2検証
ずれ情報SX2、SY2がいずれも「999」の場合
では、次の如き処理を行う。 (6-1) LOGLBLをクリアーし、LBL、LB1、
LB2、LB3の下位4ビツトの論理積をとり、
LOGLBLの下位4ビツトすなわち#28ない
し#31ビツトを上記論理積に設定する。 (6-2) LOGLBLの#16ビツトを「1」にし、
線分としてはあいまいであつて文字の可能性
のあることを示す。 (7) 第1検証ずれ情報SX1と第2検証ずれ情報
SX2がともに「999」であつてしかも第1検証
ずれ情報「SY1=1000」の場合には、上記(6)と
同様な処理を行なう。 (8) 第1検証ずれ情報SX1が「1000」であつてし
かも第1検証ずれ情報SY1および第2検証ずれ
情報SY2が「999」の場合には、上記(6)と同様
な処理を行なう。 (9) 第1検証ずれ情報SX1が「999」であつてし
かも第1検証ずれ情報SY1と第2検証ずれ情報
SX2、SY2がいずれも検証できたことを示す、
「999」より小さい場合には、 SX=SX2 SY=SY1+SY2 として上記(3)ないし(5)の処理を行なう。 (10) 第1検証ずれ情報SX1、SY1および第2検証
ずれ情報SX2、SY2が「SX1<999」で「SY1
=999」で「SX2<999」でしかも「SY2<999」
の場合には、 SX=SX1+SX2 SY=SY2 として、上記(3)ないし(5)処理を行なう。 (11) 上記(1)ないし(10)以外の場合、下記の如き処理
を行う。 SX1999→SX1=0 SX2999→SX2=0 SY1999→SY1=0 SY2999→SY2=0 SX=SX1+SX2 SY=SY1+SY2 としかつ、LOGLBLの#16ビツトを「1」とし、
上記(4),(5)の処理を行う。 上記(1)ないし(11)の如き処理により生成される集
約的格子点ラベルコードLOGLBLの表現するこ
とを要約すれば次のようになる。 (a) 格子点近傍に線分が存在するか否か。これは
LOGLBLの#28ないし#31ビツトの4方向コ
ードによりわかる。 (b) 格子点近傍に線分が存在するとすれば、その
線分は左右上下の4方向のうちのどの方向の線
分であるか否か、あるいはその線分は線図形の
一部か文字の一部であるかの可能性を表わす。
これはLOGLBLの#16ビツトと#24ないし
#27ビツト即ちあいまいフラグとあいまい方向
コードによりわかる。 (c) 格子点近傍に線分が存在すれば、その線分は
格子軸からどの方向にずれているか。これはず
れフラグとずれ方向コードを示すLOGLBLの
#19ないし#23ビツトによりわかる。 そして上記のようにして決定された集約的格子
点ラベルコードLOGLBLを、第49図ないし第
52図について示す。 第49図Aに示す図形の場合には、そのLBL、
LB1〜LB3、SX1、SY1、SX2、SY2はその(A)〜
(G)に示す通りであり、これらにもとづき、同図D
に示す如きLOGLBLが得られる。 第50図Aの図形も、同様にして第50図Dに
示すLOGLBLが得られ、第51図、第52図つ
いてもこれまた同様である。 こようにして本発明によれば、入力画像情報を
格子点近傍の図形表現よつて格子点上のコード情
報である格子点ラベルコードに圧縮することがで
きる。 〔〕 ラベルコード生成処理部におけるラ
イン結合子についての認識処理。 該ラベルコード生成処理部においては、第
5図図示コードLOGLBLにおける#18ビツト
(ライン結合子表示フラグ)を立てるか否かをチ
エツクする。該ライン結合子とは、上述した如
く、論理回路図上の結線ライン交差点が電気的に
接続されているか否かを示す微小な黒丸であると
考えてよい。該黒丸の存否を検出するに当つて
は、言うまでもなく結線ラインの存在を正しく見
出した上で、上記交差点に対応する位置において
画像データのパターンを調べるようにされる。以
下、その処理態様を述べる。 画像メモリに記憶されている画像データの部分
画像が、格子座標を基準にして切り出される。 即ち、第53図Aに示す如く、垂直格子軸X0
水平格子軸Y0による格子座標(X0、Y0)を基準
にした部分画像が切出される。こ状態で、部分画
像に対し、第53図B,Cに示すように、水平方
向(左右)の2種類の水平ウインドウHW1、
HW2(その各々のサイズを1×m画素とする)及
び垂直方向VW1、VW2(上下)の2種類の垂直
ウインドウ(その各々のサイズをm×1画素とす
る)を設定し、第53図に示される如く予め設定
されているスライド範囲WHで水平ウインドウを
上から下へ、又スライド範囲WVで垂直ウインド
ウを左から右へスライドさせる。 これらウインドウのスライド過程において単位
距離、例えば1画素移動毎にウインドウ内にある
「1」(黒点)の総数を求め、その総数が予め設定
されている閾値を超えているか否かを調べる。そ
して超えているならばその位置をライン部分とみ
なしながら、その検出をスライド範囲終端まで継
続して上下左右の各方向におけるラインの有無と
その位置を検出する。 このようにして検出されるラインはウインドウ
のスライド範囲の中間部分に存在するライン、つ
まり、ラインでない部分によつて挾まれているラ
インである。第54図に上方向ウインドウVW1
によるラインの検出例を示す。尚、DTLは検出
されたライン位置を示す。 上述の如く、閾値を設定することにより、切れ
が生じているラインも検出し得ると共に、歪んで
いるラインもその位置を比較的正確に検出し得
る。なお、上記閾値はmより若干小さな値に設定
され,る。 このようにして検出されたラインの有無及びそ
の位置を基にして、ライン位置の補正処理を行
う。該補正処理は第1表に示す如き論理にしたが
つて行われる。
When displaying as shown in [Table], the local shape extraction label code LB3 is determined by the following logic. That is, first, LB'3 is assigned to LB3. And then, 〓 | | 〓 | | | 〓R″=1&R=0→R=1, F R =1, F F =1, G R =1
, G F =1 | 〓R″=1&R=0→R=1, F R =1, F F =1, G R =1
, G F =1 U''=1&U=0→U=1, F U =1, F F =1, G U =1, G
F = 1 | 〓R″=1&R=0→R=1, F R =1, F F =1, G R =1
, G F =1 U''=1&U=0→U=1, F U =1, F F =1, G U =1, G
F = 1 L'' = 1 & L = 0 → L = 1, F L = 1, F F = 1, G L = 1, G
F = 1 | 〓R″=1&R=0→R=1, F R =1, F F =1, G R =1
, G F =1 U''=1&U=0→U=1, F U =1, F F =1, G U =1, G
F = 1 L'' = 1 & L = 0 → L = 1, F L = 1, F F = 1, G L = 1, G
F = 1 D″ = 1 & D = 0 → D = 1, F D = 1, F F = 1, G D = 1, G
Execute the process of F = 1, correct the LB3 obtained by substitution, and set the gap flag shown in Figure 5.
Generate information on G F and gap direction codes G D , G L , G U , and G R. By the above processing, the breakage of the line pattern as shown in FIG. 44A can be sufficiently absorbed. Figure 46 shows
The local shape extraction label code LB3 obtained based on the code LB'3 shown in FIG. 45B and the code LB''3 shown in FIG. 45D, and the gap-related bits G F , G D , G L , G U , and G R. Note that the extraction process in the gap direction is the same as the second one described above.
After normalizing the input image on the lattice axes through verification processing, projection processing is performed to extract the second verification label code. Extraction of the gap direction is based on the projection results in each direction. This is done by determining whether or not the results are consecutive. 47th
An example of processing is shown in FIG. [] Determination processing of the collective grid point label code (LOGLBL) in the label generation processing section. According to [] or [] above, initial grid point label code LBL; first verification deviation information SX1, SY,
1st verification label code LB1: 2nd verification deviation information
SX2, SY2, second verification label code LB2, and local shape extraction label code LB3 can be extracted. Then, all these extracted information are summarized in the fifth
A 32-bit aggregate grid point label code LOGLBL in the form shown in the figure is determined as follows. (1) When the initial lattice point label code LBL is all 0, the lattice point label code LOGLBL sets all 32 bits to "0", but when LBL is not all "0", the local shape extraction label code
If LB3 is all "0", only the #16th bit of the ambiguous flag in LOGLBL is set to "1", and the remaining 31 bits are set to "0". (2) If the first verification deviation information SX1, SY1 and the second verification deviation information SX2, SY2 are not "999", calculate SX, SY by the following formula. SX=SX1+SX2 SY=SY1+SY2 However, "SX1=1000" or "SX2=1000"
When "SX=0" is set, and when "SY=100" or "SY2=1000", "SY=0" is set. (3) Using this result, first clear LOGLBL, and then clear the lower 4 of LBL, LB1, LB2, and LB3.
The bits are ANDed and set in the lower bits of LOGLBL, ie, bits #28 to #31 in FIG. (4) Next, the absolute values of SX and SY above |SX|, |SY|
A deviation threshold value A TH is set for , and the following processing is performed. This threshold value A TH is set, for example, to half of n, which is the maximum movement distance of the window portion, or n/2. (4-1) If |SX|>A TH , set the shift flag, #23 bit of LOGLBL shown in Figure 5, to "1". When "SX>0", the shift is to the right, so set bit #22 of LOGLBL to "1".
When "SX<0", the #20 bit of LOGLBL is set to "1" because it is shifted to the left. In addition, in order to prevent problems caused by moving the rectangular area too much, a threshold O TH that is slightly smaller than the above A TH is set, and the following processing is performed. |SX|> O In the case of TH , if "SX>0", if the R bit of LBL is "1", it means that the right side of the lattice axis has been shifted too much, and the first trust in the situation
Set #31 bit of LOGLBL to "1". If "SX<0", and the L bit of LBL is "1", the #29 bit of LOGLBL is similarly set to "1". (4-2) If |SY|> TTH , similarly to (4-1) above, set the shift flag, which is bit #23 of LOGLBL, to "1". When "SY>0", the shift is downward, so set bit #19 of LOGLBL to "1".
When "SY<0", there is an upward shift, so the #21 bit is set to "1". Also, if |SY|> O TH , if "SY>0", if bit U of LBL is "1", then
Set #30 bit of LOGLBL to “1”. If “SY<0”, if the D bit of LBL is “1”, then
Set bit #28 of LOGLBL to “1”. (5) Then, process the ambiguous direction. (5-1) #31 bit of LOGLBL is “1” and
If the bit of FR of LB3 is “1”, then
Set each bit of #27 and #16 of LOGLBL to "1". (5-2) #30 bit of LOGLBL is “1” and
If the F U bit of LB3 is “1”, then
Set each bit of #26 and #16 of LOGLBL to "1". (5-3) #29 bit of LOGLBL is “1” and
If the F L bit of LB3 is “1”, then
Set each bit of #25 and #16 of LOGLBL to "1". (5-4) #28 bit of LOGLBL is “1” and
If the bit of F D of LB3 is “1”, then
Set each bit of #24 and #16 of LOGLBL to "1". (6) If the first verification deviation information SX1, SY1 and the second verification deviation information SX2, SY2 are both "999", the following processing is performed. (6-1) Clear LOGLBL, LBL, LB1,
Take the AND of the lower 4 bits of LB2 and LB3,
The lower 4 bits of LOGLBL, ie, bits #28 to #31, are set to the above logical product. (6-2) Set #16 bit of LOGLBL to “1”,
Indicates that the line segment is ambiguous and may be a character. (7) First verification deviation information SX1 and second verification deviation information
If both SX2 are "999" and the first verification deviation information is "SY1=1000", the same process as in (6) above is performed. (8) If the first verification deviation information SX1 is "1000" and the first verification deviation information SY1 and the second verification deviation information SY2 are "999", the same process as in (6) above is performed. (9) The first verification deviation information SX1 is “999” and the first verification deviation information SY1 and the second verification deviation information
This shows that both SX2 and SY2 were verified.
If it is smaller than "999", SX=SX2 SY=SY1+SY2 and processes (3) to (5) above are performed. (10) The first verification deviation information SX1, SY1 and the second verification deviation information SX2, SY2 are “SX1<999” and “SY1
=999” and “SX2<999” and “SY2<999”
In this case, SX = SX1 + SX2 SY = SY2 and process (3) to (5) above. (11) In cases other than (1) to (10) above, perform the following processing. SX1999→SX1=0 SX2999→SX2=0 SY1999→SY1=0 SY2999→SY2=0 SX=SX1+SX2 SY=SY1+SY2 and set bit #16 of LOGLBL to "1".
Perform the processing in (4) and (5) above. The expression of the aggregated grid point label code LOGLBL generated by the processes (1) to (11) above can be summarized as follows. (a) Is there a line segment near the grid point? this is
This can be determined by the 4-way code of #28 to #31 bits of LOGLBL. (b) If a line segment exists near a grid point, which direction of the four directions (left, right, top, and bottom) does the line segment belong to? Or is it a part of a line figure or a character? represents the possibility that it is part of the
This can be recognized by the #16 bit and #24 to #27 bits of LOGLBL, that is, the ambiguous flag and the ambiguous direction code. (c) If a line segment exists near a lattice point, in what direction is the line segment offset from the lattice axis? This can be determined by the #19 to #23 bits of LOGLBL indicating the shift flag and shift direction code. The aggregate grid point label code LOGLBL determined as described above is shown in FIGS. 49 to 52. In the case of the figure shown in Figure 49A, its LBL,
LB1~LB3, SX1, SY1, SX2, SY2 are (A)~
As shown in (G), based on these,
LOGLBL as shown in is obtained. For the figure in FIG. 50A, the LOGLBL shown in FIG. 50D is obtained in the same way, and the same is true for FIGS. 51 and 52. In this manner, according to the present invention, input image information can be compressed into grid point label codes, which are code information on grid points, by means of graphic representations near grid points. [] Recognition processing for line connectors in the label code generation processing section. The label code generation processing section checks whether or not the #18 bit (line connector display flag) in the illustrated code LOGLBL in FIG. 5 is set. As described above, the line connector may be considered to be a minute black circle indicating whether or not the connection line intersections on the logic circuit diagram are electrically connected. In detecting the presence or absence of the black circle, it goes without saying that the existence of the connecting line is correctly discovered, and then the pattern of the image data is examined at the position corresponding to the intersection. The processing mode will be described below. A partial image of the image data stored in the image memory is cut out based on the grid coordinates. That is, as shown in FIG. 53A, the vertical lattice axis X 0 ,
A partial image is cut out based on the grid coordinates (X 0 , Y 0 ) of the horizontal grid axis Y 0 . In this state, as shown in FIG. 53B and C, two types of horizontal windows HW1,
Two types of vertical windows are set: HW2 (each size is 1 x m pixels) and vertical direction VW1 and VW2 (top and bottom) (each size is m x 1 pixel), and as shown in Fig. 53. As shown, the horizontal window is slid from top to bottom in the preset slide range WH, and the vertical window is slid from left to right in the slide range WV. In the process of sliding these windows, the total number of "1"s (black dots) within the window is determined for each unit distance, for example, one pixel movement, and it is checked whether the total number exceeds a preset threshold. If it is exceeded, that position is regarded as a line part, and the detection is continued until the end of the slide range to detect the presence or absence of a line in each of the up, down, left and right directions, and its position. The line detected in this way is a line that exists in the middle of the sliding range of the window, that is, a line that is sandwiched between non-line parts. Figure 54 shows the upper window VW1
An example of line detection is shown below. Note that DTL indicates the detected line position. As described above, by setting the threshold value, it is possible to detect lines that are broken, and also to relatively accurately detect the position of distorted lines. Note that the threshold value is set to a value slightly smaller than m. Based on the presence or absence of a line detected in this manner and its position, line position correction processing is performed. The correction process is performed according to the logic shown in Table 1.

【表】 即ち、ケースの如く上方向(又は左方向)に
向うラインが存在せずかつ下方向(又は右方向)
に向うラインが存在しない場合には、上下方向
(又は左右方向)のラインは存在しないとする。
またケースの如く上方向(又は左方向)に向う
ラインが存在せずかつ下方向(又は右方向)に向
うラインが存在している場合には、下方向(又は
右方向)のラインが存在する位置と同じ位置で上
方向(又は左方向)のラインが存在しているもの
と仮定する。更にケースの場合には、検出され
たそのままの位置に上下方向(又は左右方向)の
ラインが存在しているとする。このような補正を
行う理由は、T字型の交差の場合や、入力画品質
が悪い場合などにおいては、4方向全部のライン
が検出されないこととなり、この点を仮補正して
おくためである。 この補正処理で第1表のケースの時は、上下
方向又は左右方向のラインは存在しないので、後
述する所の交差点近傍領域の切り出しとマツチン
グ演算と判定とを行うまでもなく、ライン結合子
が存在しないことが判定可能である。そのため後
述の各処理は省略される。 そして、上記表のケース、、の時は上下
左右の各方向のラインが実在又は仮定されるの
で、この補正処理の出力値を基にライン結合子の
形状特徴となる交差点近傍領域を部分画像から切
り出す。切り出し領域は、第55図に示す如く、
補正処理の出力値を基準にして設定される4方向
のラインによつて挾まれ、大きさがn×nの4つ
の矩形領域C1〜C4である。この切り出し処理は
交差点近傍領域に関して4n2のビツトパターンを
切り出すことによつて行われる。 尚、第55図中LUは上方向ライン、LLは左方
向ライン、LDは下方向ライン、LRは右方向ライ
ンである。 こうして切り出された領域ビツトパターンにつ
いては例えば辞書メモリから読み出される辞書ビ
ツトパターンと、次のようなマツチング演算が行
われる。 T=kj=1 4o 2 i=1 (Ci+Dij) 但し、上式で、Ciは切り出された領域ビツトパ
ターンのi番目のビツト、Dijはj番目の辞書ビ
ツトパターンのi番目のビツト、kは辞書メモリ
へ登録されているパターンの数、4n2は上述した
各パターンのサイズを表わす。 そして、上述のマツチング演算結果Tが閾値以
下であるならば、その交差点にはライン結合子が
存在しないと判定され、閾値以上ならばその交差
点にライン結合子が存在すると判定される。 〔〕 円・三角抽出処理部における小円形
状パターン抽出の処理。 論理回路図における小円形状パターンは第56
図A,Bの如き反転を意味するもの、及び第56
図Cの如き結合を意味するもの等がある。第56
図Aの場合は円パターン図形Mがなければアンド
ゲート、あればナンドゲートであるから、図形M
はそれが円であること、および結合している周囲
図形Nを調べることが重要である。円図形Mの周
囲図形N即ち第56図Aで言えばアンドシンボル
は別途他の手段で認識されることから、図形Mが
円なのか、その近傍にはどのような線分があるか
を認識し、該円パターン図形Mの意味を知ろうと
している。 図面上に書かれる小円形状パターンの記述位置
は他の線図形に比べて位置ずれがはげしい。これ
に対処するためどの場所に描かれていてもその存
在が認識されるように位置ずれに対して柔軟に対
応する必要がある。以下論理回路図によく現われ
る2mmφの円形パターンを例にとつて述べる。1
mmφあたり8本の解像度とした場合視野として25
×25画素の矩形領域を用いると2mmφの円形パタ
ーンに対して片方4画素の余裕があるからこれに
よつて0.5mmまでの位置ずれは視野の矩形領域に
入つてくることになる。第57図にこの視野の矩
形領域4と円形パターン5との相対関係を示す。
第57図は円形パターン5が領域4の中心に入つ
ている場合を示す。 つぎにこの領域4において円形パターン5が存
在するか否かを特徴抽出するがこの円形パターン
の特徴抽出態様については公知のことであり、説
明を省略する。 第58図は、画像データに対する上記領域4に
よる走査態様と円形パターン5の存在位置候補点
5′とを示している。第58図においてG5は各格
子点を示し、この格子点は2mmの距離間隔をもつ
て存在し、これらの格子点に沿つて25×25画素の
矩形領域4が走査される。1つの領域4の内部で
の円形パターン5の位置ずれの許容は0.5mmであ
るから領域4の走査は1mmピツチで行われる。こ
うすることにより円形パターン5がどの位置に描
かれていても抽出が可能となる。また円形パター
ン5の存在位置の候補点5′としては円形パター
ンが抽出された位置によつて第58図の6a,6
b,6c,6dの如く決定してその格子点位置で
ある集約的格子点ラベルコードLOGLBLの#17
ビツトを「1」に設定する。 2mmφの円形パターンはその性質上他のシンボ
ルに付帯して意味をもつ。したがつて円形パター
ンの存在位置の決定は他のシンボルの認識結果か
ら円形パターンのあるべき位置を推定し、その位
置が候補点であれば円形パターンとして決定され
る。 〔〕 外向き腕の除去ユニツトの処理。 上述の如くして抽出された集約的格子点ラベ
ル・コードLOGLBLにおいては、一般に、非所
望なノイズが含まれている。当該処理において
は、例えば第59図に示す如く、論理回路図1の
枠の外側に向つて腕7(上述のLU、LL、LD、
LRなどの線分)が存在している場合には、この
腕7は非所望なノイズであるとみなして抹消す
る。そして、その腕に関連して存在しているかも
知れないあいまい方向コードやギヤツプ方向コー
ドを抹消する。 このための処理は、各格子点についての集約的
格子点ラベル・コードLOGLBLと、当該格子点
の座標とを対比して、当該格子点が、 (1) j=NY(下辺)ならば、 #28ビツト(D)、#24ビツト(FD、#12ビツト
(GD)を「0」にする。 (2) j=1(左辺)ならば、 #29ビツト(L)、#25ビツト(FL)、#13ビ
ツト(GL)を「0」にする。 (3) j=1(上辺)ならば、 #30ビツト(U)、#26ビツト(FU、#14ビツ
ト(GU)を「0」にする。 (4) j=NX(右辺)ならば、 #31ビツト(R)、#27ビツト(FR、#15ビツ
ト(GR)を「0」にする。 但しNX、NYは第1図の夫々X軸、Y軸方向
の格子軸の数である。 〔XI〕 対の処理ユニツトの処理。 当該処理においては、例えば第60図A、B、
C、Dの如く、2つの対峙する格子点について腕
7の存在を調べ、対になつていない腕7を除去す
る。該処理に当つては、次の如く、対になつてい
ない腕を除去した上で、所定の補足的な処理を行
う。即ち、 (1) 対をなさない腕の除去 a LOGLBL(j,j)とLOGLBL(i+1,
j)について注目するとき ●LOGLBL(i,j)の#31ビツト(R)が
「1」で且つLOGLBL(i+1,j)の#29
ビツト(L)が「0」ならば―→LOGLBL
(i,j)の#31ビツト(R)、#27ビツト
(FR)、#15ビツト(GR)を「0」にする。 ●LOGLBL(i,j)の#31ビツト(R)が
「0」で且つLOGLBL(i+1,j)の#29
ビツト(L)が「1」ならば―→LOGLBL
(i+1,j)の#29ビツト(L)、#25ビツ
ト(FL、#13ビツト(GL)を「0」にする。 b LOGLBL(i,j)とLOGLBL(i,j+
1)について注目するとき ●LOGLBL(i,j)の#28ビツト(D)が
「1」で且つLOGLBL(i,J+1)の#30
ビツト(U)が「0」ならば―→LOGLBL
(i,j)の#28ビツト(D)、#24ビツト
(FD)、#12ビツト(GD)を「0」にする。 ●LOGLBL(i,j)の#28ビツト(D)が
「0」で且つLOGLBL(i,j+1)の#30
ビツト(U)が「1」ならば―→LOGLBL
(i,j+1)の#30ビツト(U)、#26ビツ
ト(FU、#14ビツト(GU)を「0」にする。 (2) 腕の除去後、個々のLOGLBL(i,j)につ
いて、 a LOGLBL(i,j)の#28ないし#31ビツト
(D、L、U、R)のすべてが「0」ならば、
―→LOGLBL(i,j)の#11ないし#15ビツ
ト(GF、GD、GL、GU、GR)、#19ないし#27
ビツト(ZD、ZL、ZU、ZR、ZF、FD、FL、FU
FRを「0」にする。 b LOGLBL(i,j)の#12ないし#15ビツト
(GD、GL、GUGR)のすべてが「0」ならば、
―→LOGLBL(i,j)の#11ビツト(GF)を
「0」にする。 なお該処理(2)は、腕を除去したことに対応して、
あいまいコードなどを抹消する処理に対応してい
る。 〔XII〕 線切れ補正ユニツトの処理。 当該処理においては、例えば第61図A,Bの
如く、4つの対応する格子点について腕7の存在
を調べ、本来あるべき腕が欠落したものとして附
加し、線切れを補正する。なお第61図におい
て、8は腕7が存在してもしなくてもよいドン
ト・ケア腕を表わし、9は当該処理によつて附加
した腕を表わしている。即ち (1) LOGLBL(i−1,j)とLOGLBL(i,
j)とLOGLBL(i+1,j)とLOGLBL(i
+2,j)に注目きたとき; LOGLBL(i−1,j)のR LOGLBL(i,j)のL LOGLBL(i+1,j)のR LOGLBL(i+2,j)のLがすべて「1」で且つ LOGLBL(i,j)のR,U,D LOGLBL(i,j)のR,U,D LOGLBL(i+1,j)のL、U、Dがすべて「0」なら
ば LOGLBL(i,j)の「R=1、FR=1、FF
1、GR=1、GF=1」 LOGLBL(i+1,j)の「L=1、FL=1、FF
=1、GL=1、GF=1」 とする。 即ち、腕9をつける。 (2) LOGLBL(i,j−1)とLOGLBL(i,
j)とLOGLBL(i,j+1)とLOGLBL
(i,j+2) に注目したとき; LOGLBL(i,j−1)のD LOGLBL(i,j)のU LOGLBL(i,j+1)のD LOGLBL(i,j+2)のUがすべて「1」で且つ LOGLBL(i,j)のR、L、D LOGLBL(i,j+1)のR、L、U がすべて「0」ならば LOGLBL(i,j)の「D=1、FD=1、FF
1、GD=1、GF=1」 LOGLBL(i,j+1)の「U=1、FU=1、FF
=1、GU=1、GF=1」 とする。 即ち腕9をつける。 〔〕 ずれ補正ユニツトの処理。 当該処理においては、一般にある格子点(i,
j)に対応して線分にずれが生じていれば、当該
ずれている方向の格子点(io,jo)においても、
対応してずれが現われる可能性がある点に着目
し、上記ずれている方向の格子点ラベル・コード
LOGLBLにおいてずれがなければ、当該ある格
子点(i,j)に存在しているずれフラグなどを
落とすようにする。その処理は次の如きものであ
る。 (1) ずれフラグZF(#23ビツト)が「1」である
LOGLBL(i,j)を検出する。 (2) 当該LOGLBL(i,j)が検出されると、当
該LOGLBL(i,j)のずれ方向コードを調べ
る。そして、 a #22ビツト「ZR=1」ならばLOGLBL(i
+1,j) b #21ビツト「Zu=1」ならばLOGLBL
(i,j−1) c #20ビツト「ZL=1」ならばLOGLBL(i
−1,j) d #19ビツト「ZD=1」ならばLOGLBL
(i,J+1) に注目する。 (3) 当該注目対象のLOGLBL(io,jo)がすべ
て、次の条件の e #28ないし#31ビツトがすべて「0」, f 28ないし#31ビツトのいずれかが「1」で
且つあいまいフラグFF(#16ビツト)が
「0」で且つずれフラグZF(#23ビツト)が
「0」、 のいずれかを満足しているケースを探す。 (4) そして当該ケースが満足されていると、上記
LOGLBL(i,j)についての#19ビツトない
し#23ビツトを「0」にする。即ちずれ方向コ
ードとずれフラグとを落とす。 〔〕 あいまい補正ユニツトの処理。 当該処理においては、或るコードLOGLBL
(i,j)に関連して、4つの方向の隣接格子点
のコードLOGLBL(i+1,j)、LOGLBL(i,
j−1)、LOGLBL(i−1,j)、LOGLBL
(i,j+1)を調べ、あいまい情報を補正する。
即ち、 (1) あいまいフラグFF(#16ビツト)が「1」で
あるLOGLBL(i,j)を検出する。 (2) 初期設定;CNT=0、(ARM(io)=0、io
=1,4) (3) LOGLBL(i,j)の4方向コード(D・
L・U・R)に対応した方向のLOGLBL(io,
jo) 即ちa 「R=1」ならばLOGLBL(i+1,
j) b 「U=1」ならばLOGLBL(i,j−
1) c 「L=1」ならばLOGLBL(i−1,
j) d 「D=1」ならばLOGLBL(i,j+
1) を調べる。 調べる対象となる格子点の数をCFLGとする。 例えば、 「R=1、U=1、L=1、D=1」→
(CFLG=4」 「R=1、U=0、L=0、D=0」→
「CFLG=1」 (4) 対象となる格子点ラベルの対応する方向の
腕; e LOGLBL(i+1,j)についてはL
(#29ビツト)をARM(1)とし、 f LOGLBL(i,j−1)についてはD
(#28ビツト)をARM(2)とし、 g LOGLBL(i−1,j)についてはR
(#31ビツト)をARM(3)とし、 h LOGLBL(i,j+1)についてはU
(#30ビツト)をARM(4)とし、 これらARM(1)ないしARM(4)が論理「1」で
且つ、ずれフラグ#23ビツト「ZF=0」、且つあ
いまいフラグ#16ビツト「FF=0」であるなら
ば、上記CNTを「プラス1」し、ARM(io)を
「1」にする。 (5) 判定; i CFLG≦1のとき、処理なし。 j CFLG=CNT(但し、CFLG≧2)のとき、 LOGLBL(i,j)の #16ビツト(FF)、#24ないし#27ビツト
(FD、FL、FU、FR) #11ビツト(GF)、#12ないし#15ビツト
(GD、GL、GU、GR) を「0」にする。 k CFLG≠CNT、かつ (i) LOBLBL(i−1,j)とLOGLBL(i
+1,j)が、上記(4)の条件を満たすと
き、LOGLBL(i、j)の #16ビツト(FF、#24ないし#27ビツト
(FD、FL、FU、FR) #15ビツト(GR、#13ビツト(GL) を「0」にする。 また、 ARM(2)=1ならば#14ビツト(GU) ARM(4)=1ならば#12ビツト(GD
「0」にする。 さらに、 12ないし15ビツト(GD、GL、GU、GR)が
すべて「0」ならば、#11ビツト(GF) を「0」にする。 (ii) LOGLBL(i,j−1)および
LOGLBL(i,j+1)が、上記(4)の条件
を満たすとき、#16ビツト(FF)、#24な
いし#27ビツト(FD、FL、FU、FR) #14ビツト(GU、#12ビツト(GD) を「0」にする。 また、 ARM(1)=1ならば#15ビツト(GR) ARM(3)=1ならば#13ビツト(GL) を「0」にする。 さらに、 #12ないし15ビツト(GD・GL・GU・GR
がすべて「0」ならば#11ビツト(GF
を「0」にする。 〔〕 シンボル分類処理部の処理。 以上のようにして生成された格子点ラベルコー
ドLOGLBL中の4方向コード(D,L,U,R)
を基にしてシンボルグループ抽出処理を行う。 論理回路図の認識においては、第62図Aない
しCに示すような類似したシンボルの識別を行う
必要がある。これらのシンボル間の差異は僅かな
がら現われるが、本発明において対象とする入力
図面においては文字の混在する手書き図面である
ため、手書きによる変動や文字の影響を考慮する
と、現処理時点において、これらの僅かな差異に
より個々のシンボルを決定してしまうのは危険で
ある。 そのために、当該処理では、直接個々のシンボ
ルの抽出は行わずに大分類と小分類という2段階
の処理に対応する大分類の抽出を行つている。予
め抽出すべきシンボルについて第62図Aないし
Cに示すような類似したシンボル同士をグループ
化しておき、このシンボルグループ毎に抽出を行
うものである。小分類に対応する処理については
単一ゲート・シンボルの認識処理部で詳細に説
明する。 第63図(A)ないし(E)は、第62図A図示のシン
ボルグループを手書きした時の各格子点において
の4方向コード(DLUR)の現われ方を図形で
表現したものであり、例えば“|・−”は「1011」
を、“・”は「0000」を意味している。またMX
およびMYはシンボルの形状が影響を及ぼすと考
えられる領域の大きさを示している。第63図A
ないしEの如く幾つかの異なるパターンが存在す
るのは、シンボルに曲線が含まれているためであ
つて、手書き等による僅かの変動により曲線部分
の周囲の格子点での4方向コードの現われ方が異
なるためである。これは第62図Bに示すような
斜線を含むシンボルについても同様である。この
ような変形パターンに対処するには、基本的に
は、これらの変形パターンのすべてを辞書パター
ンとして例えば辞書メモリに格納すればよいが、
それでは辞書パターンの数が厖大になつてしま
う。 そのため、本発明では以下に示す手法による辞
書パターンを用いる。先ず、第63図AないしE
のそれぞれの変形パターン中のある1つの座標
(I,B)に注目してみると、これらのパターン
の全部について、格子点の左方向には線分が存在
し、上方向には線分が存在していない。そして格
子点の下方向と右方向には、1つのパターンにつ
いて少なくともどちらかの方向に線分が存在して
いる。また、同図のそれぞれの変形パターンの座
標(,B)に注目してみると、下方向と左方向
には線分は全く存在しておらず、上方向と右方向
には線分が存在していたり存在していなかつたり
している。 故に、本発明ではこれらの条件を利用して、第
62図Aのシンボルグループの抽出に対しては、
第64図に図形化したような辞書パターンを用い
る。図中、小円は格子点を表わしており、各格子
点においての上下左右の各方向に対して、太線は
パターンが存在すべきことを表わし、線なしはパ
ターンが存在すべきはないことを表わし、2重線
はパターンの存在の不問(ドントケア)を表わ
し、細線は必らず2方向以上に指定されこの内の
少なくとも1方向にパターンが存在していればよ
いことを表わしている。また、MXおよびMYは
辞書パターンの大きさを示している。このような
形式の辞書パターンを用いることにより、第63
図AないしEに示す数種の変形パターンに対して
も、第64図に示す辞書パターンの1種類のみで
第62図Aのシンボルグループが抽出可能とな
る。第64図に図示の辞書パターンの座標(・
C)および(・C)の右方向が2重線となつて
いるのは、シンボルの出力端子に書かれる逆ロジ
ツクシンボル(小円形状パターン)の悪影響を吸
収するためである。 第65図Aは、第5図の如き集約的格子点ラベ
ルコードLOGLBLから辞書パターンとのマツチ
ングの対象となる4方向コード部分を抜出したも
ので〔DLUR〕に〔T1T2T3T4〕が相当してい
る。また第65図Bには、本発明に用いる辞書パ
ターンの1格子点当たりのコード形式を示す。こ
の辞書コードDCの9ビツト区分の内#0ないし
#3ビツトはパターンコード(Pk)であつて、
シンボルを手書きした時に手書き変動による影響
を考慮した上で、格子点から4方向〔DLUR〕
に線分が存在する場合があるか否かを
〔P1P2P3P4〕で表わし、#4ないし#7ビツトは
モードコード(Mk)であつて、上記4方向コー
ドと上記パターンコードとのマツチングにおける
モードを規定するもので、〔M1M2M3M4〕が
〔P1P2P3P4〕に対応する。このモードコードは、 (1) 「Mk=0」のときPkとTkが一致しているか
否か (2) 「Mk=1」且つ「Pk=0」のときTk
「0」でも「1」でもよい(ドントケア) (3) 「Mk=1」且つ「Pk=1」のとき必らず2
方向以上に指定されるが、少なくともその内の
1方向が「Tk=1」であるか否か の意味を持つ。また、その格子点自身がマツチン
グの対象となるか否かを表わすシンボル領域フラ
グ(S)を#9ビツト目に設けている。 第66図には、例として、第64図の図形化さ
れた辞書パターンに対応する辞書コードを示す。
この図形化された辞書パターンと辞書コードとの
間の変換は第2表により容易となろう。
[Table] In other words, there is no upward (or leftward) line as in the case, and there is no downward (or rightward) line.
If there is no line heading toward , it is assumed that there is no line in the vertical direction (or horizontal direction).
Also, in cases where there is no upward (or leftward) line and there is a downward (or rightward) line, there is a downward (or rightward) line. Assume that there is an upward (or leftward) line at the same position. Furthermore, in the case, it is assumed that a vertical (or horizontal) line exists at the detected position. The reason for performing this kind of correction is to temporarily correct for lines in all four directions not being detected in cases such as T-shaped intersections or poor input image quality. . In this correction process, in the case shown in Table 1, there are no lines in the vertical or horizontal direction, so there is no need to cut out the area near the intersection, perform matching calculations, and make judgments, which will be described later. It can be determined that it does not exist. Therefore, each process described later is omitted. In the case shown in the table above, lines exist or are assumed in the up, down, left, and right directions, so based on the output value of this correction process, the area near the intersection, which is the shape feature of the line connector, is extracted from the partial image. break the ice. The cutout area is as shown in FIG.
There are four rectangular areas C1 to C4 of size n×n, which are sandwiched by lines in four directions that are set based on the output value of the correction process. This cutting process is performed by cutting out a 4n2 bit pattern for the area near the intersection. In FIG. 55, LU is an upward line, LL is a leftward line, LD is a downward line, and LR is a rightward line. The area bit pattern thus cut out is subjected to the following matching operation with, for example, a dictionary bit pattern read from the dictionary memory. T= kj=1 4o 2 i=1 (Ci+Dij) However, in the above formula, Ci is the i-th bit of the extracted area bit pattern, Dij is the i-th bit of the j-th dictionary bit pattern, and k represents the number of patterns registered in the dictionary memory, and 4n 2 represents the size of each pattern described above. If the above-described matching calculation result T is less than or equal to the threshold value, it is determined that no line connector exists at that intersection, and if it is greater than or equal to the threshold value, it is determined that a line connector exists at that intersection. [] Processing for extracting small circular patterns in the circle/triangle extraction processing section. The small circular pattern in the logic circuit diagram is the 56th
Those that mean reversal as in Figures A and B, and the 56th
There are some words that mean a combination as shown in Figure C. 56th
In the case of diagram A, if there is no circular pattern figure M, it is an AND gate, and if there is, it is a NAND gate, so the figure M
It is important to check that it is a circle and the surrounding figure N to which it connects. In the case of the surrounding figure N of the circular figure M, that is, the AND symbol in FIG. He is trying to understand the meaning of the circular pattern figure M. The position of the small circular pattern drawn on the drawing is more misaligned than other line figures. To deal with this, it is necessary to flexibly respond to positional shifts so that the presence of the object is recognized no matter where it is drawn. A circular pattern of 2 mmφ that often appears in logic circuit diagrams will be described below as an example. 1
When the resolution is 8 lines per mmφ, the field of view is 25
If a rectangular area of ×25 pixels is used, there is a margin of 4 pixels on each side for a circular pattern of 2 mmφ, so that a positional deviation of up to 0.5 mm will fall within the rectangular area of the visual field. FIG. 57 shows the relative relationship between the rectangular area 4 and the circular pattern 5 in this visual field.
FIG. 57 shows a case where the circular pattern 5 is located in the center of the area 4. Next, features are extracted to determine whether or not a circular pattern 5 exists in this area 4, but the manner of extracting features of this circular pattern is well known and will not be described here. FIG. 58 shows the manner in which the image data is scanned by the area 4 and the candidate points 5' of the circular pattern 5. In FIG. 58, G5 indicates each grid point, and the grid points exist with a distance interval of 2 mm, and a rectangular area 4 of 25×25 pixels is scanned along these grid points. Since the allowable displacement of the circular pattern 5 within one region 4 is 0.5 mm, the region 4 is scanned at a pitch of 1 mm. By doing so, extraction is possible no matter where the circular pattern 5 is drawn. Further, as candidate points 5' for the existing position of the circular pattern 5, points 6a and 6 in FIG.
#17 of the aggregate grid point label code LOGLBL which is determined as b, 6c, 6d and its grid point position
Set the bit to "1". Due to its nature, the 2mmφ circular pattern has meaning attached to other symbols. Therefore, the position of the circular pattern is determined by estimating the position where the circular pattern should be based on the recognition results of other symbols, and if that position is a candidate point, it is determined as a circular pattern. [] Processing of the outward facing arm removal unit. The aggregated grid point label code LOGLBL extracted as described above generally contains undesired noise. In this process, for example, as shown in FIG. 59, the arms 7 (the above-mentioned LU, LL, LD,
If a line segment such as LR exists, this arm 7 is considered to be undesired noise and is deleted. Then, any ambiguous direction code or gap direction code that may exist related to that arm is deleted. The process for this is to compare the aggregate grid point label code LOGLBL for each grid point with the coordinates of the grid point, and if the grid point is (1) j=NY (lower side), # Set the 28 bit (D), #24 bit (F D ) , and #12 bit (G D ) to "0." (2) If j = 1 (left side), set the #29 bit (L), #25 bit ( F L ), #13 bit (G L ) are set to 0. (3) If j = 1 (upper side), #30 bit (U), #26 bit (F U ) , #14 bit (G U ) is set to "0". (4) If j = NX (right side), set #31 bit (R), #27 bit (F R ), #15 bit (GR) to "0". However, NX, NY is the number of lattice axes in the X-axis and Y-axis directions, respectively, in Figure 1. [XI] Processing of a pair of processing units. In this process, for example,
As shown in C and D, the existence of arms 7 is checked for two opposing grid points, and unpaired arms 7 are removed. In this processing, after removing unpaired arms, predetermined supplementary processing is performed as follows. That is, (1) Removal of unpaired arms a LOGLBL(j, j) and LOGLBL(i+1,
When paying attention to j) #31 bit (R) of LOGLBL (i, j) is “1” and #29 of LOGLBL (i+1, j)
If bit (L) is “0” -→LOGLBL
Set #31 bit (R), #27 bit (F R ), and #15 bit (G R ) of (i, j) to "0". ●#31 bit (R) of LOGLBL (i, j) is “0” and #29 of LOGLBL (i+1, j)
If the bit (L) is "1" - → LOGLBL
Set #29 bit (L), #25 bit (F L ), and #13 bit (G L ) of (i+1, j) to "0." b LOGLBL (i, j) and LOGLBL (i, j+
When paying attention to 1) #28 bit (D) of LOGLBL (i, j) is “1” and #30 of LOGLBL (i, J+1)
If bit (U) is “0” - → LOGLBL
Set #28 bit (D), #24 bit (F D ), and #12 bit (G D ) of (i, j) to "0". ●#28 bit (D) of LOGLBL (i, j) is “0” and #30 of LOGLBL (i, j+1)
If bit (U) is “1” -→LOGLBL
Set #30 bit (U), #26 bit (F U ), and #14 bit (G U ) of (i, j+1) to “0”. (2) After removing the arm, each LOGLBL (i, j) For, if all #28 to #31 bits (D, L, U, R) of a LOGLBL (i, j) are “0”, then
-→ #11 to #15 bits of LOGLBL (i, j) (G F , G D , G L , G U , G R ), #19 to #27
Bits (Z D , Z L , Z U , Z R , Z F , F D , F L , F U ,
Set F R to "0". b If #12 to #15 bits (G D , G L , G U G R ) of LOGLBL (i, j) are all “0”, then
-→ Set #11 bit (G F ) of LOGLBL (i, j) to “0”. Note that processing (2) corresponds to the removal of the arm,
It supports the process of erasing ambiguous codes. [XII] Line breakage correction unit processing. In this process, for example, as shown in FIGS. 61A and 61B, the existence of the arm 7 is checked for four corresponding grid points, and the arm that should be there is added as a missing arm to correct line breakage. In FIG. 61, 8 represents a don't care arm in which arm 7 may or may not exist, and 9 represents an arm added through the process. That is, (1) LOGLBL(i-1,j) and LOGLBL(i,
j) and LOGLBL(i+1,j) and LOGLBL(i
+2, j); R of LOGLBL (i-1, j) L of LOGLBL (i, j) R of LOGLBL (i+1, j) L of LOGLBL (i+2, j) are all “1” and R, U, D of LOGLBL (i, j) R, U, D of LOGLBL (i, j) If L, U, D of LOGLBL (i+1, j) are all “0”, then LOGLBL (i, j) “R=1, F R =1, F F =
1, G R = 1, G F = 1” LOGLBL (i+1, j) “L = 1, F L = 1, F F
= 1, G L = 1, G F = 1''. That is, arm 9 is attached. (2) LOGLBL(i, j−1) and LOGLBL(i,
j) and LOGLBL (i, j+1) and LOGLBL
When paying attention to (i, j+2); D of LOGLBL (i, j-1) U of LOGLBL (i, j) D of LOGLBL (i, j+1) All U of LOGLBL (i, j+2) are “1”. And if R, L, and D of LOGLBL (i, j) are all "0", then "D = 1, F D = 1, F of LOGLBL (i, j)" F =
1, G D = 1, G F = 1” LOGLBL (i, j+1) “U = 1, F U = 1, F F
= 1, G U = 1, G F = 1. That is, attach arm 9. [] Processing of misalignment correction unit. In this process, generally a certain grid point (i,
If there is a shift in the line segment corresponding to j), even at the grid point (io, jo) in the direction of the shift,
Focusing on the points where a corresponding shift may appear, the grid point label/code in the direction of the shift is determined.
If there is no deviation in LOGLBL, the deviation flag existing at the certain grid point (i, j) is dropped. The process is as follows. (1) The deviation flag Z F (#23 bit) is “1”
Detect LOGLBL(i,j). (2) When the LOGLBL(i,j) is detected, check the deviation direction code of the LOGLBL(i,j). Then, if a #22 bit “Z R = 1”, LOGLBL(i
+1, j) b If #21 bit “Z u = 1” then LOGLBL
(i, j−1) c If #20 bit “Z L = 1”, LOGLBL(i
-1, j) d #19 bit “Z D = 1” then LOGLBL
Pay attention to (i, J+1). (3) All LOGLBL (io, jo) of the target of interest have the following conditions: e all #28 to #31 bits are "0", f any of the 28 to #31 bits is "1", and the ambiguity flag is set. Find a case where F F (#16 bit) is "0" and deviation flag Z F (#23 bit) is "0". (4) And if the case is satisfied, the above
Set #19 bit to #23 bit of LOGLBL (i, j) to "0". That is, the deviation direction code and deviation flag are dropped. [] Processing of ambiguity correction unit. In this process, a certain code LOGLBL
(i, j), the codes LOGLBL(i+1,j), LOGLBL(i,
j-1), LOGLBL (i-1, j), LOGLBL
Examine (i, j+1) and correct ambiguous information.
That is, (1) LOGLBL(i,j) whose fuzzy flag F F (#16 bit) is "1" is detected. (2) Initial settings; CNT=0, (ARM(io)=0, io
= 1, 4) (3) 4-way code of LOGLBL (i, j) (D・
LOGLBL(io,
jo) That is, a If "R=1", LOGLBL(i+1,
j) b If “U=1” then LOGLBL(i,j−
1) c If "L=1", LOGLBL(i-1,
j) d If “D=1”, LOGLBL(i, j+
1) Check. Let CFLG be the number of grid points to be examined. For example, "R=1, U=1, L=1, D=1" →
(CFLG=4” “R=1, U=0, L=0, D=0” →
"CFLG=1" (4) Arm in the corresponding direction of the target grid point label; e For LOGLBL (i+1, j), L
(#29 bit) is ARM(1), and f LOGLBL(i, j-1) is D
(#28 bit) is ARM(2), and gLOGLBL(i-1,j) is R
(#31 bit) is ARM(3), h LOGLBL (i, j+1) is U
(#30 bit) is ARM(4), and these ARM(1) to ARM(4) are logic "1", shift flag #23 bit "Z F = 0", and ambiguity flag #16 bit "F If F = 0, then add 1 to the above CNT and set ARM(io) to 1. (5) Judgment; i When CFLG≦1, no processing. j When CFLG=CNT (CFLG≧2), #16 bit (F F ), #24 to #27 bit (F D , F L , F U , F R ) #11 of LOGLBL (i, j) Set the bit ( GF ) and #12 to #15 bits ( GD , GL , GU , GR ) to "0". k CFLG≠CNT, and (i) LOBLBL(i-1,j) and LOGLBL(i
+1, j) satisfies the condition (4) above, the #16 bit (F F , #24 to #27 bit (F D , F L , F U , F R ) of LOGLBL (i, j) # Set the 15 bit (G R and #13 bit (G L ) to 0. Also, if ARM(2) = 1, set the #14 bit (G U ), and if ARM(4) = 1, set the #12 bit (G Set D to "0".Furthermore, if all 12 to 15 bits (G D , GL , G U , G R ) are "0", set #11 bit ( GF ) to "0". ( ii) LOGLBL(i,j-1) and
When LOGLBL (i, j+1) satisfies the condition (4) above, #16 bit (F F ), #24 to #27 bit (F D , F L , F U , F R ) #14 bit (G Set U , #12 bit (G D ) to "0". Also, if ARM(1) = 1, set #15 bit (G R ), and if ARM(3) = 1, set #13 bit (G L ) to "0". In addition, #12 to 15 bits (G D , G L , G U , G R )
If all are “0”, #11 bit (G F )
Set to "0". [] Processing of the symbol classification processing unit. 4-way code (D, L, U, R) in the grid point label code LOGLBL generated as above
Perform symbol group extraction processing based on . In recognizing a logic circuit diagram, it is necessary to identify similar symbols as shown in FIGS. 62A to 62C. Although there are slight differences between these symbols, the input drawing that is the target of this invention is a handwritten drawing with a mixture of characters, so if we take into account the variations due to handwriting and the influence of characters, these differences at the time of current processing. It is dangerous to determine individual symbols based on slight differences. Therefore, in this process, individual symbols are not directly extracted, but a major classification corresponding to a two-step process of major classification and minor classification is extracted. Regarding the symbols to be extracted, similar symbols as shown in FIGS. 62A to 62C are grouped in advance, and extraction is performed for each symbol group. The processing corresponding to the small classification will be explained in detail in the single gate symbol recognition processing section. Figures 63 (A) to (E) are graphic representations of how the four-way code (DLUR) appears at each grid point when the symbol group shown in Figure 62A is drawn by hand. For example, " |・−” is “1011”
, "・" means "0000". Also MX
and MY indicate the size of the area considered to be influenced by the shape of the symbol. Figure 63A
The reason why there are several different patterns such as E to E is because the symbol contains a curved line, and the way the four-way code appears at the grid points around the curved line is due to slight variations due to handwriting etc. This is because they are different. This also applies to symbols including diagonal lines as shown in FIG. 62B. In order to deal with such deformed patterns, basically all of these deformed patterns can be stored as dictionary patterns in, for example, a dictionary memory.
In this case, the number of dictionary patterns becomes enormous. Therefore, in the present invention, a dictionary pattern based on the method described below is used. First, Figure 63 A to E
If we focus on one coordinate (I, B) in each deformed pattern, we can see that for all of these patterns, there is a line segment to the left of the grid point, and a line segment to the top. Doesn't exist. Line segments exist in at least one direction below and to the right of the lattice points for one pattern. Also, if we pay attention to the coordinates (,B) of each deformation pattern in the same figure, we can see that there are no line segments at all in the downward and left directions, but there are line segments in the upward and right directions. Sometimes it exists and sometimes it doesn't exist. Therefore, in the present invention, by utilizing these conditions, for extraction of the symbol group in FIG. 62A,
A dictionary pattern as shown in FIG. 64 is used. In the figure, small circles represent grid points, and thick lines indicate that a pattern should exist in the up, down, left, and right directions at each grid point, and no lines indicate that no pattern should exist. A double line indicates that the existence of a pattern is not a concern (don't care), and a thin line indicates that two or more directions are necessarily specified, and it is sufficient that the pattern exists in at least one of these directions. Furthermore, MX and MY indicate the size of the dictionary pattern. By using a dictionary pattern of this type, the 63rd
Even for several types of modified patterns shown in FIGS. A to E, the symbol group shown in FIG. 62A can be extracted using only one type of dictionary pattern shown in FIG. 64. The coordinates of the dictionary pattern shown in FIG.
The reason why the right side of C) and (.C) is a double line is to absorb the negative influence of the reverse logic symbol (small circular pattern) written to the symbol output terminal. FIG. 65A shows the four-way code part that is the target of matching with the dictionary pattern extracted from the intensive grid point label code LOGLBL as shown in FIG . ] is equivalent. Further, FIG. 65B shows the code format per lattice point of the dictionary pattern used in the present invention. Bits #0 to #3 of the 9-bit division of this dictionary code DC are pattern codes (P k ),
After considering the influence of handwriting variations when handwriting a symbol, draw it in four directions from the grid point [DLUR]
The presence or absence of a line segment is expressed as [P 1 P 2 P 3 P 4 ], and #4 to #7 bits are mode codes (M k ), and the above four-way code and the above pattern This defines the mode for matching with the code, and [M 1 M 2 M 3 M 4 ] corresponds to [P 1 P 2 P 3 P 4 ]. This mode code determines whether (1) when "M k = 0", P k and T k match or not (2) when " M k = 1" and "P k = 0", T k is " It can be 0 or 1 (don't care) (3) When ``M k = 1'' and ``P k = 1'', it is always 2.
Although more than one direction is specified, it has the meaning of whether or not at least one of the directions is "T k =1". Further, a symbol area flag (S) indicating whether or not the lattice point itself becomes a matching target is provided at the #9th bit. FIG. 66 shows, as an example, a dictionary code corresponding to the graphic dictionary pattern of FIG. 64.
Conversion between this graphical dictionary pattern and dictionary code will be facilitated by Table 2.

【表】 上記手法による辞書パターンを、抽出すべき全
シンボルグループについて作成して、辞書パター
ンの大きい順に辞書メモリに格納しておく。そし
て入力画像データから得られる各格子点の4方向
コードとのマツチングを行つてシンボルを入力図
面中から抽出する。即ち、第67図において辞書
メモリ内に格納されている各シンボルグループの
辞書パターンと、この辞書パターンの格子数に等
しい格子分の4方向コードを順次読出し、これら
の辞書パターンを構成する辞書ユード群DCCと
4方向コード群TCC間で格子点対応にマツチン
グを行つていく。このマツチングを行うマツチン
グ演算は次式に従つて行う。即ち今、或るシンボ
ルグループの全体的な評価値をEgとすると、 EgMXx=1 MYy=1 Wxy ――(5) ここで、1格子点当りの評価値Wxyは Wxy=S×〔4k=1 {Mk ∧(PkTk)}+F――(6) ただし F=(P1∧M1∨P2∧M2∨P3∧M3∨P4∧M4)∧/P1
∧M1∧T1∨P2∧M2∧T2∨P3∧M3∧T3∨P4∧M4∧T4――(7
) この1格子点当りの評価値Wxyは「0」から
「4」までの値をとる。つまり辞書コードと4方
向コードとが完全にマツチするならば最小値
「0」となり、全然マツチしないならば最大値
「4」となる。そして、全体的な評価値Egは辞書
パターン領域(MX,MYで表わされる)内の全
格子点の評価値の和で表わされる。この全体的な
評価値Eが「0」となれば、辞書パターン内のす
べての格子点において辞書コードと4方向コード
とが完全にマツチしたこととなり、4方向コード
群TCCが辞書コード群DCCのシンボルグループ
に属するシンボルであると判定される。 しかし、第68図Bの座標(,A)の左方向
や第68図Bの座標(,A)の上方向に見られ
るように、直線部分の手書き等による変形を許容
するために、辞書パターンの大きさ(MX,
MY)や手書き等による変形の生じる度合に応じ
て各辞書パターン毎に最適な閾値Tgを全体的な
評価値Egに対して設定して Eg≦Tg ――(8) の関係が成立すればシンボルと判定する。 このようにして、入力図面の或る格子点におい
て辞書メモリ内の全辞書パターンとマツチングを
行い、シンボルと判定されたものの中から実際の
シンボルを1つ決定する。これは式(8)を満足する
Egの内最小のものを採用する。また最小のEg
複数個ある場合は辞書パターンの大きいものを採
用する。 以上のシンボル抽出結果として、辞書パターン
の座標(,A)の対応する入力図面の座標と、
予め定められたシンボルグループの名前と、辞書
パターンと完全にマツチしたか否か、つまり
「Eg=0」となつたか否かの情報をシンボル認識
テーブルに格納する。 以上のマツチング処理を入力図面の格子点位置
を1格子ずつずらしながら行う。 〔〕 複合ゲート・シンボルの認識処理部
における複数ゲート・シンボル抽出処理。 上述の如く、本発明の処理対象となる論理回路
図においては、第62図に示す如きシンボルと共
に第6図に示す如き複合ゲート・シンボルC−G
が存在している。これらのシンボルを正しく処理
するために、次の如きテーブルが用意される。即
ち第62図に示す如き単一ゲート・シンボルを抽
出したことに対応して、第69図A図示の如き単
一ゲート・シンボル認識テーブルSPTABLEを
用意するようにする。該テーブルSPTABLEは、
次の如き欄をもつている。即ち、 (1) i,j……単一ゲートシンボルについての代
表的な格子点の座標値を記入する。第69図B
に図示する如き格子点の座標値(i,j)が記
入される。 (2) NO.……抽出された単一ゲート・シンボルの
名前が番号によつて与えられる。例えばオア回
路に対しては番号「27」が与えられ、ナンド回
路に対しては番号「7」が与えられ、…るなど
される。 (3) SDRCT……抽出された単一ゲートシンボル
の出力方向を与える。例えば第69図Bに図示
するシンボルに対して夫々図示の如き数値
「0」ないし「3」を与える。 (4) SNO.……最終的に1つの複合ゲート・シン
ボルとして抽出されるようになつたとすると
き、当該複合ゲート・シンボルを構成している
所の単一ゲート・シンボルとしてのあるべき番
号が与えられる。例えば上記NO.としてはアン
ド回路として抽出されたが、1つの複合ゲー
ト・シンボルを構成する単一ゲート・シンボル
としては本来オア回路であつたとした場合に
は、SNO.をオア回路に対応する番号にし、こ
れをデータ処理装置に入力せしめるようにす
る。しかし、該SNO.は複合ゲート・シンボル
が抽出されたことによつて与えられるものであ
り、最初は値「0」とされている。 (5) CNO.……当該単一ゲート・シンボルが複合
ゲート・シンボルの核(後述するが第70図A
図示のナンド回路K1の如きもの)として選ば
れたときに与えられるもので、当該複合ゲー
ト・シンボルの名前が番号の形で与えられる。
最初は値「0」とされている。 (6) STFLG……1つの複合ゲート・シンボルを
抽出する際に処理対象とされるときに論理
「1」が立てられるものであり、最初は値「0」
とされている。 なお、単一ゲート・シンボル認識テーブル
SPTABLEの役割については第71図を参照し
て後述される。該テーブルSPTABLEが上述の
如く用意されると共に、第70図に示す如き複合
ゲート・シンボル辞書メモリMPDICが用意され
る。第70図Aの内容は、第70図Bに示す1つ
の複合ゲート・シンボルC−Gに対応する辞書メ
モリの内容を示している。そして、次の如き欄を
そなえている。 (7) i,j……核となる単一ゲート・シンボル
(第70図B図示K1)の座標値を(0,0)
としたとき、当該複合ゲート・シンボルを構成
する単一ゲート・シンボルK1,K2,K3…
…の座標値が相対値として与えられる。例えば
単一ゲート・シンボルK2については(−7,
−11)で与えられる。 (8) SDRCT……各単一ゲート・シンボルK1,
K2,…についての第69図Aの場合と同様な
情報が与えられる。 (9) NO.……当該複合ゲート・シンボルを構成す
る各単一ゲート・シンボルK1,K2,…につ
いての名前が番号によつて与えられる。第69
図Aの場合と同じ (10) SNO.……当該複合ゲート・シンボルを構成
する各単一ゲート・シンボルK1,K2,…に
ついての本来あるべき番号が与えられる。この
役割については第74図,第75図を参照して
後述する。 (11) SCNT……当該複合ゲート・シンボルを構成
する単一ゲート・シンボルK1,K2…の個数
が与えられる (12) CNO.……当該複合ゲート・シンボルの名前
が番号によつて与えられる。第70図B図示の
複合ゲートシンボルについては「CNO.=121」
とされている。 上述の如く、単一ゲート・シンボル認識テーブ
ルSPTABLEと複合ゲート・シンボル辞書メモ
リMPDICとが用意されている状態で、1つの複
合ゲート・シンボルが抽出される態様を第71図
を参照しつつ説明する。 今第71図A図示の如き単一ゲート・シンボル
認識テーブルSPTABLEが存在しており、かつ
1つの複合ゲート・シンボルに対応する辞書メモ
リMPDICの内容が第71図B図示の如きもので
あつたとする。なお単一ゲートシンボル認識テー
ブルSPTABLE内には、抽出された各単一ゲー
ト・シンボルが例えば座標値の順に格納されてい
るものとする。また複合ゲート・シンボル辞書メ
モリMPDIC内には、個々の複合ゲート・シンボ
ルに対応するひとかたまりの情報(第71図B図
示の如き)が、核となる単位ゲート・シンボルの
番号の大きい順にソートされ且つ同じ番号ならば
上述のCNO.の大きい順にソートされて並んでい
る。更に単一ゲート・シンボル認識テーブル
SPTABLEの先頭を指示するポイントをSPNT
とし、複合ゲート・シンボル辞書メモリ中の先頭
のひとかたまりの情報を指示するポイントを
FPNTとする。 処理は次のように行われる。即ち、 (13) テーブルSPTABLEの先頭に記述されてい
る単一ゲート・シンボル(当該パターンは当然
に未処理であるとする)についてのNO.と
SDRCTとを抽出し、辞書メモリMPDICの先
頭のひとかたまりの情報(第71B図示の如き
ひとかたまり)内の先頭の単一ゲート・シンボ
ル(核となつている)についてのNO.と
SDRCTとを比較する。 (14) 不一致であれば、辞書メモリMPDICの次
のひとかたまりの情報(FPNT+1の位置の
情報)について同様に比較する。以下同様であ
る。 (15) 辞書メモリMPDICをすべて検索したが不
一致であれば、テーブルSPTABLE内の次の
単一ゲートシンボル(SPNT+1の位置の単一
ゲート・シンボル)について同様に比較してゆ
く。 (16) 仮に第71図A図示の#12の単一ゲート・
シンボルのNO.とSDRCTとが、第71図B図
示の先頭の単一ゲート・シンボルのNOS.と
SDRCTとに一致したとする。この場合、#12
の単一ゲート・シンボルの座標(i12,j12)か
らみて所定の座標範囲内に位置する単一ゲー
ト・シンボルを調べて、STFLGを論理「1」
にする。範囲外のものに対して、STFLGを論
理「0」にする。 (17) そしてこの「STFLG=1」の個数CNTと
第71図B図示のSCNTとを照合してみる。こ
のとき「CNT<SCNT」ならば、上記#12の
単一ゲート・シンボルは第71図B図示に対応
する複合ゲート・シンボルの核ではないとし
て、検索を次に進める。 (18) 「CNT≧SCNT」 であつた場合には、第71図Eに示すバツフア
BUFをクリヤし、第71図C図示の辞書用バ
ツフアMPDIC・BUFの#1行の座標欄に i=i12,j=j12 をセツトし、#2行の座標欄に i=i12−7,j=j12−2 をセツトし、#3行の座標欄に i=i12−14,j=j12−4 をセツトする。また第71図Eに示すバツフア
BUFに、テーブルSPTABLE中の「#12」で
あることを対応づけて格納する。 (19) 次いで辞書用バツフアMPDIC・BUFの
#2行に示す座標値(i12−7,j12−2)に対
応する位置に所望の単一ゲート・シンボルが存
在するか否かを調べる。テーブルSPTABLE
上でSTFLGが論理「1」となつているものの
内から、例えば#10のものの如く該当するもの
が見出されると、第71図D図示の如く辞書用
バツフアMPDIC・BUF内で、座標値(i12
7,j12−2)が(i10,j10)に書替えられ、第
71図E図示のバツフアBUF内に「#10」で
あることが書込まれる。この場合、座標値
(i12−7)とi10とや、座標値(j12−2)とj10
が完全に一致していなくても少々のずれを許容
すべく例えば差が絶対値で「2」以下であれ
ば、該当したものとされる。したがつて複数個
該当するものがあるとされることもある。 (20) 同様にテーブルSPTABLE内の#14の単一
ゲート・シンボルが抽出され、第71図E図示
のバツフアBUF内に「#14」が書込まれたと
する。 (21) この状態で、バツフアBUFに書込まれた個
数と、上述のSCNTとが一致すれば、第71図
B図示の情報に対応する1つの複合ゲート・シ
ンボルが抽出されたものとし、第71図A図示
のテーブルとSPTABLE内に図示丸印で示し
た如くSNOやCNOが記述される。そして、次
の検索に進んでゆく。 この間の動作を更に詳しくその動作をフローチ
ヤートの形で示すと、第72図および第73図図
示の如くである。なお、第73図図示のフローチ
ヤートは、第72図図示の複合ゲート・シンボル
の核の候補抽出のブロツクについての一実施例処
理態様を示している。 上述の如く、複合ゲート・シンボルを抽出した
上で、データ処理装置に対して入力するようにさ
れる。即ち第71図の例で言えば、第71図D図
示のi,j,SDRCT,SNOの各欄と、SCNTと
CNOと、第71図E図示のバツフアBUFの内容
とがデータ処理装置に入力される情報として出力
される。 このことを利用して、単一ゲート・シンボル抽
出時における誤抽出を救済してデータ処理装置に
入力することが可能となる。即ち、複合ゲート・
シンボルを抽出するに当つて、上述の単一ゲー
ト・シンボル抽出の過程において、何等かの理由
により、第74図A図示の矢印Lに示す如く、本
来オア回路となるべき所が比較的高い頻度でアン
ド回路として抽出されることがあるとする。この
ような場合、上記矢印Lの所がアンド回路となる
ことがあり得ないものとすると、複合ゲート・シ
ンボル辞書メモリとして第74図B図示の如き辞
書を用意しておくようにする。そして、矢印Lの
所の単一ゲート・シンボルがアンド回路であるも
のを称して、総合パターンとしてCNO=102を与
えるようにする。このようにすると、第74図A
図示のパターンをもつてCNO=102の複合ゲー
ト・シンボルであると認識されることとなり、デ
ータ処理装置へ入力するに当つては、矢印Lの位
置の単一ゲート・シンボルをオア回路(SNO=
27)と修正して報告することができる。 第75図は、本来複合ゲート・シンボルである
べき第75図A図示の如く矢印Mの位置の単一ゲ
ート・シンボルが、多入力アンド回路として単一
ゲート・シンボルの如く抽出され易い場合に対処
する態様を示している。 〔〕 複合ゲート・シンボルの認識処理部
におけるスタート点設定処理。 当該処理に関連する複合ゲート・シンボルに限
らず一般にゲート・シンボルを抽出したとき、当
該ゲート・シンボルのスタート点(端子位置)を
正しく設定しておいて、後述する結線ラインの抽
出処理などに利用するようにされる。このため
に、スタート点設定の処理は次の如く行われる。 即ち、上述の如くして例えば1つの複合ゲー
ト・シンボルが抽出されたとき、マツチングのと
れた辞書メモリの内容から、当該シンボルにおい
てスタート点(結線ラインとの連接点)がどの位
置にあるかが座標(i,j)からの相対座標の形
で判明する。本発明においては、この点にもとづ
いて、上記スタート点が位置すべき絶対座標が算
出され、当該絶対座標に該当する格子点に対して
格子点ラベルコードLOGLBL上の#0ビツトに
論理「1」を立てると共に、当該スタート点から
いずれの方向に線分が延長しているかに対応して
#2ないし#5ビツトのいずれかに論理「1」を
立てる。また、その格子点に逆ロジツクシンボル
が付記されるベき場合には#1ビツトを論理
「1」とする。 〔〕 シンボル領域の設定処理部における
処理。 上述の如く単一ゲート・シンボルの各グループ
あるいは複合ゲート・シンボルに属するシンボル
が大分類のレベルで抽出されとき、当該各シンボ
ルが占有する領域の境界にある格子点に対して、
シンボル領域フラグを立てる。即ち第5図図示の
コードにおける#8ビツト(シンボル領域フラグ
S)を論理「1」にする。該シンボル領域フラグ
Sを立てるに当つては、当該シンボルとマツチン
グのとれた辞書メモリの内容から、第66図図示
のシンボル領域フラグSが論理「1」である格子
点の相対座標をみることによつて絶対座標を算出
し、当該絶対座標をもつ格子点に対して格子点ラ
ベルコードLOGLBL上の#8ビツトを論理「1」
にすればよい。 このように、抽出されたシンボルに対応して格
子点ラベル・コードLOGLBL上の#8ビツトに
論理「1」を立てようとするとき、既に論理
「1」が立つていることがある。このような場合
には、第7図を参照して述べた如く、シンボルを
2重に抽出している恐れがあり、その旨を指示す
るフラグを第69図Aに図示の如きSPTABLE
のSTFLG欄に立てておくようにする。第76図
Bは、第76図A図示の論理回路図に対応して、
上述のシンボル領域フラグS(#8ビツト)を設
定した態様を太線で示したものである。 〔〕 線分確定処理部における線分確定処
理。 当該処理は、第4図に示す如く、ずれ補正ユ
ニツトによる処理とあいまい補正ユニツト
による処理とからなつている。 手書き図面の処理においては線分の位置ズレを
充分考慮する必要がある。本来単一の線分である
ものがこの位置ズレに起因して平行する二つの格
子軸上の格子点ラベルコードとして二重に抽出さ
れる場合が生じる。 ずれ補正ユニツトによる処理はこのよう
な線分の位置ズレの状態を格子点ラベルコードか
ら推定し設計者が意図したと思われる格子軸上に
のみ確実な格子点ラベルコードを生成するもので
ある。ここで確実な格子点ラベルコードというの
はギヤツプ方向コード(#12ないし#15ビツト)、
ズレ方向コード(#19ないし#22ビツト)および
あいまい方向コード(#24ないし#27ビツト)が
すべて「0」であるものをさし、あいまいな格子
点ラベルコードというのはギヤツプ方向コード、
ズレ方向コード、あいまい方向コードのいずれか
のビツトが「1」であるものをさす。 第77図は本処理例であるが、第77図Bに示
す如く相対する方向に“ズレ方向”を有する一対
の隣接格子点ラベル・コードを捉え、これを単一
線分がズレた結果とみて第77図C図示の如く補
正するようにする。即ち第77図B図示のコード
を4方向コードにもとづき逐次検索しながら確実
な格子点ラベルコードが付与された格子の存在す
る軸を検出する。最後にその軸を確実な格子点ラ
ベルコードへと高めるとともに、他方の格子点ラ
ベルコードを除去する。なお図において、7−1
は確実なラベル・コードに対応する腕、7−2は
ずれフラグをもつ腕、10はずれ方向、11は線
分を図式的に表わしている。 次にあいまい補正ユニツトによる処理は
格子点ラベルコードの持つあいまいさをより大域
的な視野から捉え、確実な格子点ラベルコードへ
と高めていくもので、手書図面特有の線切れ、あ
るいは線分に近接して描かれた文字の影響による
あいまいさなどを除去する。 線分として不完全な形態を有する格子点にはギ
ヤツプ方向コード又はあいまい方向コードが
「1」を持つあいまいな格子点ラベルコードが付
与されている。当然、文字の存在する格子点にも
同じくあいまいな格子点ラベルコードが付与され
るわけであるが、ここではこのコード情報の持つ
あいまいさが線分の局所的変動によるものか、そ
れとも文字そのものに起因するのかの解釈を与
え、その解釈にもとづく補正を行う。 第78図は本処理例であり、具体的には、最初
に、第78図B図示の如くあいまいな格子点ラベ
ルコードを検出し、その4方向コードに沿つた方
向に位置する隣接格子点ラベルコードを逐次検索
する。この検索の過程で第78図C図示の如くあ
いまいな格子点ラベルコードをはさむ形の確実な
格子点ラベルコードが出現すると、そのあいまい
さは線分の局所的な変動によるものであると解釈
し、確実な格子点ラベルコードへと変換する。な
お図において、白丸12は確実な格子点ラベル・
コード、黒丸13はあいまいな格子点ラベル・コ
ード、14はあいまいフラグをもつ腕、15は上
述のずれフラグをもつ腕7−2と上述のあいまい
フラグをもつ腕14とが重複した腕を表わしてい
る。また16は文字、17は線分を表わしてい
る。 〔〕 ギヤツプ・あいまい腕の処理部に
おける処理。 上記処理までにおいて結線ラインが実質上確定
してゆくことから、当該時点において、ギヤツプ
方向コードとあいまい方向コードとをもつ格子点
に対して、それらのコードをもつ方向の4方向コ
ード(D,L,U,R)を落とすようにする。 格子点ラベルコードLOGLBL(i,j)の#8
ビツト(S)が「0」のものに対して、以下の処
理を実行する。 (1) LOGLBL(i,j)の#11ビツト(GF)が
「1」であつて、 (1-1) LOGLBL(i,j)の#15ビツト
(GR)が「1」ならば、LOGLBL(i,j)
の#15ビツト(GR),#31ビツト(R)を
「0」にする。 (1-2) LOGLBL(i,j)の#14ビツト
(GU)が「1」ならば、LOGLBL(i,j)
の#14ビツト(GU),#30ビツト(U)を
「0」にする。 (1-3) LOGLBL(i,j)の#13ビツト
(GL)が「1」ならば、LOGLBL(i,j)
の#13ビツト(GL),#29ビツト(L)を「0」
にする。 (1-4) LOGLBL(i,j)の#12ビツト
(GD)が「1」ならば、LOGLBL(i,j)
の#12ビツト(GD),#28ビツト(D)を「0」
にする。 (1-5) そしてLOGLBL(i,j)の#11ビツ
ト(GF)を「0」にする。 (2) LOGLBL(i,j)の#16ビツト(FF)が
「1」であつて、 (2-1) LOGLBL(i,j)の#27ビツト
(FR)が「1」ならば、LOGLBL(i,j)
の#27ビツト(FR),#31ビツト(R)を
「0」にする。 (2-2) LOGLBL(i,j)の#26ビツト
(FU)が「1」ならば、LOGLBL(i,j)
の#26ビツト(FU),#30ビツト(U)を
「0」にする。 (2-3) LOGLBL(i,j)の#25ビツト
(FL)が「1」ならば、LOGLBL(i,j)
の#25ビツト(FL),#29ビツト()を
「0」にする。 (2-4) LOGLBL(i,j)の#24ビツト
(FD)が「1」ならば、LOGLBL(i,j)
の#24ビツト(FD),#28ビツト(D)を「0」
にする。 (3) 上記処理(1),(2)で処理されたものに対して、
上記対の処理ユニツトで行つた如き対の処
理を実行する。 〔XI〕 単一ゲート・シンボルの認識処理部
におけるシンボルの認識処理。 当該処理においては、上述のシンボル分類処理
部において大分類を行つた結果にもとづいて、
同じグループ内を更に小分類してゆくようにす
る。上述の如く抽出されたシンボルに対しては、
第69図Aに示す如きテーブルSPTABLEが得
られている。この状態の下で次の如く処理が行わ
れる。 (1) テーブルSPTABLEの検索。 例えば第79図A図示の如き単一ゲートシンボ
ル18につき、第69図A図示のテーブルを検索
し、格子点座標(i,j)、および分類番号NO,
方向SDRCTを取出す。ここでは「(iS,jS),NO
=13,SDRCT=0」が取出されたものとする。 (2) 候補シンボルテーブルの検索。 第79図Bに示すように、第69図A図示の
NO毎に該当する候補シンボル番号と候補個数情
報とを記述した候補シンボルテーブル19が設け
られ、たとえば図示の3入力2出力のスタート点
を持つ単一ゲートシンボル18の場合を分類番号
を「NO=13」とし、方向「SDRCT=0」とし
た場合候補シンボルテーブル19で3つの候補シ
ンボル番号「13」,「14」,「15」が取出される。 (3) シンボル認識辞書と変換。 第79図C,D,Eは同図Bから取出された候
補シンボル番号「13」,「14」,「15」に対応するシ
ンボル認識辞書20−1,20−2,20−3の
内容を示す。それぞれの左側のゲートの各スター
ト点位置に対応する(i,j)と格子点ラベルコ
ードの形状を示す。また欄外の*印はそのスター
ト点にその状態があつてはならないことを示す情
報である。下欄の左側は辞書の大きさを、右側は
逆ロジツクシンボル(2mmφ)の数を示したもの
である。 これらの認識辞書を方向SDRCTにより変換を
行う。 (4) シンボ認識辞書と格子点ラベルコードとのマ
ツチング。 第79図Fに示すようにシンボル認識辞書20
−1,20−2,20−3と格子点ラベルコード
の小円形表示フラグ(#17ビツト)および4方向
コード(#28ないし#31ビツト)とのマツチング
演算を行い、結果を同図Gの認識バツフア21に
格納する。該認識バツフア21のAの欄は4方向
コードの一致度数、Bの欄は逆ロジツク・シンボ
ルの一致度数、Cの欄は辞書に記述された逆ロジ
ツク・シンボルの存在位置からみた逆ロジツク・
シンボル存在位置の一致度数を示す。 (5) 判定。 (5-1) A+Bが最大値、すなわち、A+B
の値がシンボル認識辞書の大きさ(図示縦欄
の数)の2倍であれば、その候補シンボルが
最大マツチングであり認識結果の答となる。
同図Gの認識バツフアの候補シンボル番号の
1番目はこれに該当する。そして第69図A
図示のテーブルSPTABLE内のSNO欄にそ
のシンボル番号13を入れる。 (5-2) A+Bが最大値であるものがなけれ
ば、C欄が最大値のもの、すなわちシンボル
認識辞書に記述された逆ロジツク・シンボル
の個数と一致し且つA+Bがある閾値より大
きいもののうちで最大の度数をもつものを認
識結果の答とする。そしてテーブル
SPTABLE内のSNO欄にそのシンボル番号
を入れる。 (5-3) 上記(5−1),(5−2)のいずれ
にも該当するものがなければ、A+B+Cに
閾値を設け、その値以上のもののうちで最大
のものを認識結果の答とする。そして同様に
SNO欄にそのシンボル番号を入れる。 (5-4) 上記(5−1)ないし(5−3)に
該当するものがなければ、シンボルではない
と判定し、テーブルSPTABLEのSTFLG欄
に「1」を立てる。 以上のようにして、シンボルについて小分類を
与えることができる。 〔XII〕 スタート点の設定処理部の処理。 該処理は上記処理〔〕と実質的に全く同一
である。 〔〕 逆ロジツク・シンボルの処理部の
処理。 当該処理は、第10図に関連して述べた如く、
後述する処理に悪影響を与える可能性のある逆ロ
ジツク・シンボルを、いわば一時棚上げしてしま
うための処理である。この場合には、スタート点
に対応する格子点に対する処理であることから、
#0ビツト(ST)が「1」、且つ#1ビツト(S2
が「1」の格子点ラベルコードLOGLBL(i,
j)に対してのみ、以下の処理を実行する。 (1) LOGLBL(i,j)の#5ビツト(SR)が
「1」ならば、 a LOGLBL(i,j−1)の#31ビツト
(R),#16ビツト(FF) b LOGLBL(i+1,j−1)の#29ビツト
(L),#28ビツト(D)、#16ビツト(FF) c LOGLBL(i+1,j)の#30ビツト
(U),#28ビツト(D) d LOGLBL(i+1,j+1)の#30ビツト
(U),#29ビツト(L),#16ビツト(FF) e LOGLBL(i,j+1)の#31ビツト
(R),#16ビツト(FF) を「0」にする。 (2) LOGLBL(i,j)の#4ビツト(SU)が
「1」ならば、 a LOGLBL(i−1,j)の#30ビツト
(U),#16ビツト(FF) b LOGLBL(i−1,j−1)の#31ビツト
(R),#28ビツト(D),#16ビツト(FF) c LOGLBL(i,j−1)の#31ビツト
(R),#29ビツト(L) d LOGLBL(i+1,j−1)の#29ビツト
(L),#28ビツト(D),#16ビツト(FF) e LOGLBL(i+1,j)の#30ビツト
(U),#16ビツト(FF) を「0」にする。 (3) LOGLBL(i,j)の#3ビツト(SL)が
「1」ならば、 a LOGLBL(i,j−1)の#29ビツト(L),
#16ビツト(FF) b LOGLBL(i−1,j−1)の#31ビツト
(R),#28ビツト(D),#16ビツト(FF) c LOGLBL(i−1,j)の#30ビツト
(U),#28ビツト(D) d LOGLBL(i−1,j+1)の#31ビツト
(R),#30ビツト(U),#16ビツト(FF) e LOGLBL(i,j+1)の#29ビツト(L),
#16ビツト(FF) を「0」にする。 (4) LOGLBL(i,j)の#2ビツト(SD)が
「1」ならば、 a LOGLBL(i−1,j)の#28ビツト(D),
#16ビツト(FF) b LOGLBL(i−1,j+1)の#31ビツト
(R),#30ビツト(U),#16ビツト(FF) c LOGLBL(i,j+1)の#31ビツト
(R),#29ビツト(L) d LOGLBL(i+1,j+1)の#30ビツト
(U),#29ビツト(L),#16ビツト(FF) e LOGLBL(i+1,j)の#28ビツト(D),
#16ビツト(FF) を「0」にする。 〔〕 スタート点近傍の線切れ補正処理部
における処理。 上述の如く、シンボルのスタート点位置の近傍
では、上述の格子点ラベルコードLOGLBL上で
線切れが発生し易い。本処理はこの非所望な線切
れの存在を補正する。 第80図Aはスタート方向が左、従つて格子点
ラベルコードの#2ないし#5ビツトが「0100」
の場合である。図の5列は該スタート方向詳しく
は認識した論理シンボルのスタート点の格子点ラ
ベルコードの#2ないし#5ビツトを図解的に示
すものであり、4列はそれより1格子軸左側の
(格子間隔は本例では2mmとした場合に2mm左側
の)格子点ラベルコードの#28ないし#31ビツト
を図解的に示す。そして、ケース1は4方向コー
ドが「0100」の場合つまり線分は左から延びてき
て当該格子点で止つていることを示している。ケ
ース2は4方向コードが「0010」つまり線分が上
から下つてきて当該格子点で止まり、そしてケー
ス3は4方向コードが「1000」つまり線分が下か
ら上つて当該格子点で止つていることを示してい
る。しかしこの部分には第5列に示す如く論理シ
ンボルの端子があるので、このような跡切れ状態
は、不正確な作図による線切れであり、本来は右
へ1格子間隔だけ延びているべきものと判断し、
6列および7列に示すようにその線分を付加す
る。具体的にはスタート点の4方向コードのL
(#29ビツト)を「1」にし、その左隣りの格子
点の4方向コードのR(#31ビツト)を「1」に
する。 第80図Bはスタート方向が上の場合で、5行
はそれを図示し、4行はその上隣りの格子点の4
方向コードを図解的に示す。ケース1,2,3は
4方向コードが「0010」,「0100」,「0001」の場合
で、いずれも該格子点よりスタート点までの結線
が欠けていると判断し、6行、7行に示すように
上隣り格子点の4方向コードのD(#28ビツト)
を「1」にし、またスタート点の4方向コードの
U(#30ビツト)を「1」にする。第80図Cは
スタート方向が右の場合、同図Dはスタート方向
が下の場合で、いずれも上記に準じた図示の如き
補正を行う。この処理によつて、手書きのため生
じやすい論理シンボルの端子位置近傍の線切れを
補正し、断線を回避することができる。 〔〕 ギヤツプ・あいまい腕の処理ユニ
ツトの処理。 この処理は、当該時点で上記処理〔〕と同
じような処理を行うものである。即ち、 (1) 格子点ラベルコードLOGLBL(i,j)の
#8ビツト(S)が「1」のものに対して以下
の処理を実行する。 a LOGLBL(i,j)の#16ビツト(FF),
#11ビツト(GF)を「0」にする。 (2) 格子点ラベルコードLOGLBL(i,j)の
#8ビツト(S)が「0」のものに対して以下
の処理を実行する。 (2-1) LOGLBL(i,j)の#11ビツト
(GF)が「1」ならば a LOGLBL(i,j)の#15ビツト(GR
が「1」のときLOGLBL(i,j)の#15
ビツト(GR),#31ビツト(R)を「0」
にする。 b LOGLBL(i,j)の#14ビツト(GU
が「1」のときLOGLBL(i,j)の#14
ビツト(GU),#30ビツト(U)を「0」
にする。 c LOGLBL(i,j)の#13ビツト(GL
が「1」のときLOGLBL(i,j)の#13
ビツト(GL),#29ビツト(L)を「0」にす
る。 d LOGLBL(i,j)の#12ビツト(GD
が「1」のときLOGLBL(i,j)の#12
ビツト(GD),#28ビツト(D)を「0」にす
る。 e そしてLOGLBL(i,j)の#11ビツト
(GF)を「0」にする。 (2-2) LOGLBL(i,j)の#16ビツト
(FF)が「1」ならば a LOGLBL(i,j)の#24ないし#31ビ
ツト(FD,FL,FU,FR,D,L,U,R)
を「0」にする。 (3) そして、その結果に対して対の処理を行う。 〔〕 ライン結合子の処理ユニツトの
処理。 この時点で非所望な形でライン結合表示ビツト
(#18ビツト)が立つていれば、これを補正する。
即ち、 (1) シンボル領域「S=1」ならば;#18ビツト
を「0」にする。 (2) シンボル領域でない「S=0」ならば; (2-1) 4方向コード(D・L・U・R)を
調べ、1であるビツトの個数を数え、個数に
応じて以下の処理を行う。 a) 個数2ならば#18ビツトを「0」にす
る。 b) 個数=3ならば」#18ビツトを「1」にす
る。 c) 個数=4ならばそのまま(処理なし) 〔〕 複合ゲート・シンボル内の線分消し
処理ユニツトの処理。 複合ゲート・シbボルの領域内での結線ライン
は予め判つているパターンであり、抽出が不要な
ため、これを抹消する処理を行う。即ち、 (1) シンボル認識テーブルSPTABLEから複合
ゲートシンボルの構成要素であるシンボルを取
り出す。即ちSTFLG=0、且つCNO>100(複
合であることを示す)のシンボルの座標(i,
j)とシンボル番号SNOとを抽出する。 (2) シンボル番号SNOに応じて、その端子辞書
(スタート点辞書20)を取り出す。 (3) スタート点辞書20の内容と格子点ラベルコ
ードとを比較し、スタート点情報(#0ビツ
ト)が「1」でない端子位置および結線の方向
を検出する。即ち複合ゲート・シンボル領域内
の線分の端子位置と方向とを検出する。 (4) シンボル領域(#8ビツト=1)あるいは、
スタート点(#0ビツト=1)あるいは、端点
(追跡方向がない)まで、4方向コードを追跡
し、次の処理を実行する。 (4-1) 追跡により到達した格子点ラベル
LOGLBL(i,j)に対して、 a 左方向へ向う追跡を行つたとき、#29ビ
ツト(L)を「0」にする。 b 上方向へ向う追跡を行つたとき、#28ビ
ツト(D)を「0」にする。 c 右方向へ向う追跡を行つたとき、#31ビ
ツト(R)を「0」にする。 d 下方向へ向う追跡を行つたとき、#30ビ
ツト(U)を「0」にする。 e そして、その上で#16ビツト(あいまい
フラグ)を「0」にする。 〔〕 結線ライン抽出処理部における処
理。 当該処理においては、結線ラインについて (i) スタート点――スタート点間 (ii) 分 岐 点――分岐点間 (iii) 屈曲点――屈曲点間 (iv) スタート点――分岐点間 (v) 分岐点――屈曲点間 (vi) 屈 曲 点――スタート点間 をもつて、ベクトルとして抽出すべく追跡を行う
ものである。これは、上述の集約的格子点ラベ
ル・コードを4方向コードにもとづいて辿つてゆ
くことにより達成できるものであつて、処理の詳
細については説明を省略する。 〔〕 文字領域の抽出処理部における処
理。 図面からシンボルと結線ラインとを抽出する
と、残りは文字である。当該処理においては、格
子点ラベル・コードLOGLBLにおけるあいまい
フラグ#16ビツト(FF)が立つているものを抽
出し、文字領域を抽出してゆく。当該処理は、次
の如く行われる。即ち、 (1) 文字フラグのグルーピング (2) 文字列の抽出 (2-1) 画像データの切出し (2-2) 画像データの連結性抽出 (2-3) 図形パターンの除去および隣接領域
の切出しの各段階から構成される。 以下上記各処理の詳細を説明する。 (1) 文字フラグのグルーピング 例えば第81図Aに示した如く、格子点ラベル
コード中の当面不要なものを一時消去し文字列フ
ラグMFとして1ビツトをもうけ、格子点データ
として使用する。そして、処理に先立ち全格子点
ラベルコードの文字列フラグMFはクリアしてお
く。またあいまいフラグFFを文字フラグと呼び
かえる。 本処理では、格子点ラベルコードの文字フラグ
FFを検索し、一かたまり(文字列毎)の文字フ
ラグ22を抽出する。第81図Bに処理例を示
し、一かたまりの格子点データ23の#7ビツト
の文字列フラグMFを「1」とする。 (2) 文字列の抽出 (2-1) 画像データの切出し 文字フラグMFが「1」の格子点を中心とする
n×n(nは格子軸間の距離)画素で矩形領域に
切り出す。以下本処理を第82図および第83図
を参照しつつ説明する。 第82図A,Bは上述の処理により処理した例
を示している。すなわち、同図Aの文字24、線
分25を処理し、同図Bの黒丸印26は文字フラ
グFFが「1」の格子点を示し、白丸に対応した
腕は論理「1」をもつ4方向コード(DLUR)
を図式的に示している。文字フラグによるグルー
ピング処理は、第83図Aに示すように、○×の文
字列フラグ27により格子点近傍の画像データを
グループ別けする。従つて、○×印の格子点近傍の
画像データを矩形領域28により切出すと、第83
図B図示の画像データ29が抽出される。しか
し、このように単にグルーピングされた文字フラ
グで格子点近傍の画像データを切出すだけでは、
図示のように、文字の一部の欠除や、他の図形画
像の混入等により完全な文字列の抽出が難しい場
合が起る。 このために、以下の処理を導入する。 (2-2) 画像データの連結性抽出 文字列フラグMFが「1」の格子点近傍矩形領
域28で切出した画像データに対し、第84図に
示すように、その矩形領域内の画像データが矩形
領域の外線30に接するか否かを調べる。 (a) n×1(または1×n)の領域がすべて
「0」ならば「AM(k)=0」で示し非連
結である。 (b) n×1(または1×n)の領域に「1」
があれば「AM(k)=1」で示し隣接領域
への連結の可能性がある。ただし「k=
1,2,3,4」とする。 第85図はこの連結性抽出例を示したもので、
矩形領域28の画像データの4方向のうち、
「AM(3)=0」のみが非連結で、他の3方向の
「AM(1)=1」,「AM(4)=1」は文字データ31
により、「AM(2)=1」は隣接格子軸ライン32
により画像データが存在していることが示されて
いる。 (2-3) 図形パターンの除去および隣接領域
の切出し a 矩形領域内の図形パターン除去 画像データの連結性抽出処理の結果、「AM
(k)=1」ならば、第85図に示す画像データの
上方向の「AM(2)=1」に見られるように、隣接
格子軸のラインがずれた場合に、そのラインの一
部分が入つてきている可能性がある。そのため、
「AM(k)=1」ならば、第86図に示すように、
その方向に対応した隣接格子点ラベルコードを調
べ、次の処理を行う。すなわち、 (i) 文字フラグ(FF=1」ならば、「AM(k)=
0」とする。 (ii) 文字フラグ「FF=0」且つ 4方向コード(DLUR)の 何れかが「1」 ならば、線パターン除去処理を行う。 (iii) 上記以外ならばそのままとする。 矩形領域28内の線パターン除去処理は上記条
件(ii)を満たす各方向に対して実行するが、例とし
て「k=1」の場合を取りあげ第87図,第88
図により説明する。 切出した矩形領域28の外縁からm画素の領域
で、縦方向(「K=2,4」の時は横方向となる)
にすべて「0」となる列があるか否かを調べ、次
の処理を行う。 (iv) すべて「0」となる列があれば、その列より
外側方向にある黒点をクリアし、「AM(k)=
0」とする。 (v) すべて「0」となる列がなければ、そのまま
とする。 第87図は本処理の概略図、第88図は第85
図の矩形領域内の画像データに対し、本処理を適
用した結果を示す。本処理適用後、「AM(k)=
1」はその方向に文字データが連続していること
を表わしている。なお、第88図において右方向
に文字データが連続しているにも拘らず「AM(1)
=0」とするのは、右隣りの格子点ラベルコード
の文字フラグFFが「1」となつているからであ
り、この場合文字の連続性を明示しなくても後の
処理でその格子点近傍領域が切出される。 b 隣接矩形領域の切出し 前述の矩形領域に対し、「AM(k)=1」なら
ば、その方向の隣接格子点近傍の画像データをn
×n画素で切出し、以下の図形パターン除去処理
を実行する。 一例として「k=1」の場合を説明する。 切出した矩形領域33内の画像データに対し、
第89図に示すように左から右に第1列から第w
列まで各列(例えば「k=2」の場合は下から上
へ第n行から第(n−w+1)行まで各行とな
る)の黒点数BCNTを順次カウントし、 BCNT≧TH またはBCNT=0 ならば、その列を含めてその列から第w列までの
黒点をすべてクリアする。また、第(w+1)列
から第n列までは無条件にすべての黒画素をクリ
アする。なおTHは予め定められた閾値である。 第90図Aは第88図に示した矩形領域の下方
向(AM(4)=1」の隣接格子点近傍の切出した画
像データを示し、第90図Bはこの画像データに
上記a)に示す図形パターン除去処理を施した結
果を示す。 以上の処理をすべての文字列フラグMFが「1」
のものに対して適用することによつて、一文字列
の画像データを抽出することができる。第91図
A,Bは、不要な図形パターンを除去し、欠除し
た文字の一部パターンを補完することにより完全
な文字を抽出したものである。 〔〕 文字の分離・認識処理部における
文字分離処理。 上記処理〔〕において抽出された文字列
の文字は、本処理において1文字毎に分離され、
認識処理を容易に行わせ得るようにする。以下に
その処理を示す。 ここでは文字列として第92図に示す「V2B
のようにそのままでは分離困難な場合の処理手順
を示す。 第92図は文字列311〜313をその外接矩形
よりも各方向にそれぞれ1画素分大きい矩形枠3
4により切出した画像を示す。この画像に対して
同図に示す窓部35、すなわち文字列方向に垂直
で長さが矩形枠34の縦幅に等しく、1画素幅の
窓部を矩形枠内領域の1端より走査させ、最初に
窓部35内に黒点36が出現する位置を検出す
る。 第93図は第92図の文字列331〜333に対
し窓部35により黒点36を検出した位置を示
す。次に、この位置における窓部35の両端位置
“S”,“E”の白画素間の最短径路を見出すので
あるが、その探索領域を窓部35の位置から文字
列の走査方向即ち図示右方向に限定する。第93
図の“+”印で示す文字端位置37は探索領域の
限定を表わすラベルである。すなわち、“+”印
の右側の領域が探索領域である。最短径路の抽出
アルゴリズムとしては、従来各種のものが提案さ
れているが、ここではリー(Lee)のアルゴリズ
ムを用いて説明する。 前述の処理によつて決定された2点“S”,
“E”のうち、まずどちらか一方、たとえば“S”
を出発点として選ぶ。最初に、“S”に直接隣接
する(4方向連結)白点にラベル“1”を与え
る。次にラベル“1”の与えられた画素に隣接す
る白点にラベル“2”を与える。ラベル“2”に
隣接する白点にラベル“3”を与える。さらにラ
ベル“3”に隣接する白点にラベル“1”を与え
る。以下、これを繰返す。この処理は終点“E”
に到達するまでこの手順で続けられる。第94図
はこのラベル付与の手順の結果を示す。 次にこのラベルを終点”E”からラベル付与と
逆の手順で“3”→“2”→“1”→“3”と巡
回するラベルの順番に逆追跡し、始点“S”に到
達する径路を見出す。この径路が最短径路である
が、必ずしも一意的に定まるとは限らない。これ
を一意に定めるため、第95図に示すように、逆
追跡の方向に優先順位を設け、これに従つて追跡
を行う。 第96図に逆追跡によつて検出された最短径路
を示し、逆追跡の際に径路上の画素38にラベル
“+”を与えたものである。 以上の処理によつて、文字列中の1文字の存在
する領域が“+”で囲まれた領域として識別され
る。そこでこの領域内の黒点を切出すことによつ
て、1文字の画像が分離抽出される。 第97図は1文字を分離抽出した後の矩形枠3
4の領域内の文字列332,333の画像である。 以上の処理を、1文字分離抽出する毎に白点、
黒点以外のラベルが付与された画素を白点に変換
した後、矩形領域内の黒点が検出されなくなるま
で繰返すことにより、文字列の個々の文字が1文
字ずつ分離抽出できる。 すなわち、第98図に示すように、次の文字3
2に対し窓部を設定し、次の文字の探索領域の
限定を表わすラベル39を決定し、第93図〜第
97図の手順を繰返す。 〔XI〕 文字の分離・認識処理部における
文字認識処理。 上記処理〔〕において1文字毎に分離さ
れた文字に対して、認識処理が行われるが、当該
処理の態様は任意であり、かつ従来公知のことで
あるので、説明を省略する。 上述の如く処理が実行されるが、第99図は、
上記処理を実行する一実施例ハードウエア・ブロ
ツク図を示している。 図中の符号101は画像入力装置、102は画
像メモリ、103は検証回路、104は基準点検
出回路、105は格子点テーブル、106は格子
変換回路(水平)、107は格子点ラベルコード
生成回路(水平)、108は格子変換回路(垂
直)、109は格子点ラベルコード生成回路(垂
直)、110はアドレス制御部、111は制御部、
112は検証窓設定回路、113はLBLテーブ
ルであつてコードLBLをセツトするもの114
はLB1テーブル、115はLB2テーブル、11
6はSX1,SY1テーブル、117はSX2,SY
2テーブル、118はアドレス変換回路、119
はLB3生成回路でであつて局部形状ラベル情報
を生成するもの、120はLB3テーブルであつ
て局部形状ラベル情報がセツトされるもの、12
1は格子点ラベル・コード決定回路、122はラ
ベル・コード・テーブル、123は対処理回路、
124は線パターン切れ補正回路、126はずれ
補正回路、127はあいまい補正回路()、1
28はシンボル辞書、129はシンボ抽出回路、
130はシンボル認識テーブル、131は複合ゲ
ート・シンボル認識辞書、132は複合ゲート・
シンボル端子位置辞書、133は複合ゲート・シ
ンボル認識回路、134は単一・ゲートシンボル
候補辞書、135は単一ゲート・シンボル端子位
置辞書、136は単一ゲート・シンボル認識回
路、137はシンボル領域設定回路、138はず
れ補正回路()、139はあいまい補正回路
()、140はギヤツプ・あいまい処理回路、1
41はページ結合子認識処理回路、142は逆ロ
ジツク・シンボル処理回路、143は端子位置決
定回路、144は端子近傍線切れ補正回路、14
5は線分抽出回路、146は線分抽出前処理回
路、147は文字領域抽出回路、148はライン
結合子処理回路、149は認識結果出力装置を表
わしている。 (E) 発明の効果 以上説明した如く、本発明によれば、手書きさ
れた論理回路図をいわば自動的に読取つて、当該
論理回路図に関する情報をデータ処理装置に入力
せしめることが可能となる。
[Table] Dictionary patterns using the above method are created for all symbol groups to be extracted and stored in the dictionary memory in descending order of dictionary patterns. Then, symbols are extracted from the input drawing by matching with the four-way code of each grid point obtained from the input image data. That is, in FIG. 67, the dictionary pattern of each symbol group stored in the dictionary memory and the four-way code of grids equal to the number of grids of this dictionary pattern are sequentially read out, and the dictionary eudo groups constituting these dictionary patterns are read out. Matching is performed between the DCC and the four-way code group TCC in correspondence with grid points. The matching operation for performing this matching is performed according to the following equation. That is, if the overall evaluation value of a certain symbol group is E g , then E g = MXx=1 MYy=1 W xy --(5) Here, the evaluation value per lattice point W xy is W xy = S× [ 4k=1 {M k ∧ (P k T k )} + F――(6) where F=(P 1 ∧M 1 ∨P 2 ∧M 2 ∨P 3 ∧M 3 ∨P 4 ∧M 4 )∧/P 1
∧M 1 ∧T 1 ∨P 2 ∧M 2 ∧T 2 ∨P 3 ∧M 3 ∧T 3 ∨P 4 ∧M 4 ∧T 4 --(7
) This evaluation value W xy per grid point takes a value from "0" to "4". That is, if the dictionary code and the four-way code match perfectly, the minimum value is "0", and if they do not match at all, the maximum value is "4". The overall evaluation value E g is expressed as the sum of the evaluation values of all grid points within the dictionary pattern area (represented by MX and MY). If this overall evaluation value E becomes "0", it means that the dictionary code and the 4-way code perfectly match at all grid points in the dictionary pattern, and the 4-way code group TCC is equal to the dictionary code group DCC. It is determined that the symbol belongs to the symbol group. However, as seen to the left of the coordinates (,A) in Figure 68B and above the coordinates (,A) in Figure 68B, the dictionary pattern is size (MX,
The optimal threshold value T g is set for the overall evaluation value E g for each dictionary pattern according to the degree of deformation caused by handwriting, etc., and the relationship E g ≦T g --(8) is established. If it is true, it is determined to be a symbol. In this way, matching is performed with all dictionary patterns in the dictionary memory at a certain grid point of the input drawing, and one actual symbol is determined from among those determined to be symbols. This satisfies equation (8)
E Adopt the smallest of g . Also, if there are multiple minimum E gs , the one with the largest dictionary pattern is adopted. As the above symbol extraction results, the input drawing coordinates corresponding to the dictionary pattern coordinates (,A),
The name of a predetermined symbol group and information as to whether it completely matches the dictionary pattern, that is, whether "E g =0" is established, are stored in the symbol recognition table. The above matching process is performed while shifting the grid point positions of the input drawing one grid at a time. [] Multiple gate/symbol extraction processing in the complex gate/symbol recognition processing unit. As mentioned above, in the logic circuit diagram to be processed by the present invention, the symbols as shown in FIG. 62 and the composite gate symbol C-G as shown in FIG.
exists. In order to process these symbols correctly, the following table is prepared. That is, in response to the extraction of a single gate symbol as shown in FIG. 62, a single gate symbol recognition table SPTABLE as shown in FIG. 69A is prepared. The table SPTABLE is
It has the following columns. That is, (1) i, j... Enter the coordinate values of representative grid points for a single gate symbol. Figure 69B
The coordinate values (i, j) of the grid points as shown in the figure are entered. (2) NO. The name of the extracted single gate symbol is given by number. For example, the number "27" is given to the OR circuit, the number "7" is given to the NAND circuit, and so on. (3) SDRCT...Gives the output direction of the extracted single gate symbol. For example, the symbols shown in FIG. 69B are given numerical values "0" to "3" as shown. (4) SNO....If it is finally extracted as one composite gate symbol, the number that should be the single gate symbol that makes up the composite gate symbol is Given. For example, the above NO. was extracted as an AND circuit, but if the single gate symbol constituting one composite gate symbol was originally an OR circuit, then SNO. is the number corresponding to the OR circuit. and input it to the data processing device. However, the SNO. is given by extracting the composite gate symbol, and is initially set to the value "0". (5) CNO.....The single gate symbol is the core of the composite gate symbol (see Figure 70A, which will be described later).
The name of the composite gate symbol is given in the form of a number.
Initially, the value is set to "0". (6) STFLG...Logical "1" is set when one composite gate symbol is extracted and processed, and the value is "0" initially.
It is said that In addition, single gate symbol recognition table
The role of SPTABLE will be described later with reference to FIG. 71. The table SPTABLE is prepared as described above, and a composite gate/symbol dictionary memory MPDIC as shown in FIG. 70 is also prepared. The contents of FIG. 70A show the contents of the dictionary memory corresponding to one composite gate symbol CG shown in FIG. 70B. It also has the following columns: (7) i, j...The coordinate values of the core single gate symbol (K1 shown in Figure 70B) are (0,0)
Then, the single gate symbols K1, K2, K3, . . . constitute the composite gate symbol.
The coordinate values of ... are given as relative values. For example, for a single gate symbol K2 (-7,
−11). (8) SDRCT...each single gate symbol K1,
Information similar to that in FIG. 69A for K2, . . . is given. (9) NO. The name of each single gate symbol K1, K2,... making up the composite gate symbol is given by number. 69th
Same as in the case of Figure A (10) SNO. . . . The original number for each single gate symbol K1, K2, . . . composing the composite gate symbol is given. This role will be described later with reference to FIGS. 74 and 75. (11) SCNT: The number of single gate symbols K1, K2, etc. that make up the composite gate symbol is given. (12) CNO: The name of the composite gate symbol is given by number. For the composite gate symbol shown in Figure 70B, "CNO.=121"
It is said that The manner in which one composite gate symbol is extracted in a state where the single gate symbol recognition table SPTABLE and the composite gate symbol dictionary memory MPDIC are prepared as described above will be explained with reference to FIG. 71. . Assume that a single gate symbol recognition table SPTABLE as shown in FIG. 71A exists, and that the contents of the dictionary memory MPDIC corresponding to one composite gate symbol are as shown in FIG. 71B. . It is assumed that the extracted single gate symbols are stored in the single gate symbol recognition table SPTABLE, for example, in the order of their coordinate values. In addition, in the composite gate symbol dictionary memory MPDIC, a group of information corresponding to each composite gate symbol (as shown in FIG. 71B) is sorted in descending order of the number of the core unit gate symbol. If the numbers are the same, they are sorted in descending order of CNO. mentioned above. Plus single gate symbol recognition table
SPNT point indicating the beginning of SPTABLE
and the point that indicates the first piece of information in the composite gate/symbol dictionary memory is
Let it be FPNT. The processing is performed as follows. That is, (13) NO. and
SDRCT and NO. about the first single gate symbol (which is the core) in the first batch of information (as shown in Figure 71B) of the dictionary memory MPDIC.
Compare with SDRCT. (14) If there is a mismatch, the next batch of information (information at the position of FPNT+1) in the dictionary memory MPDIC is compared in the same way. The same applies below. (15) If all the dictionary memories MPDIC are searched and there is no match, the next single gate symbol in the table SPTABLE (the single gate symbol at the position of SPNT+1) is compared in the same way. (16) Suppose that the single gate #12 shown in Figure 71A
The NO. and SDRCT of the symbol are the same as the NOS. of the first single gate symbol shown in Figure 71B.
Suppose that it matches SDRCT. In this case #12
The single gate symbol located within a predetermined coordinate range from the coordinates (i 12 , j 12 ) of the single gate symbol in is examined and STFLG is set to logic “1”.
Make it. For anything out of range, set STFLG to logic '0'. (17) Then, compare this number CNT of "STFLG=1" with the SCNT shown in FIG. 71B. At this time, if "CNT<SCNT", it is determined that the single gate symbol #12 is not the nucleus of the composite gate symbol corresponding to the illustration in FIG. 71B, and the search proceeds to the next step. (18) If “CNT≧SCNT”, the buffer shown in Figure 71E
Clear the BUF, set i=i 12 and j=j 12 in the coordinate column of the #1 line of the dictionary buffer MPDIC/BUF shown in Figure 71C, and set i=i 12 - in the coordinate column of the #2 line. 7. Set j=j 12 -2, and set i=i 12 -14, j=j 12 -4 in the coordinate column of line #3. Also, the buffer shown in Figure 71E
Store in BUF in association with the fact that it is "#12" in table SPTABLE. (19) Next, it is checked whether a desired single gate symbol exists at the position corresponding to the coordinate value (i 12 -7, j 12 -2) shown in the #2 line of the dictionary buffer MPDIC.BUF. Table SPTABLE
If a corresponding item, such as #10, is found among the items whose STFLG is logical "1" above, the coordinate value (i 12
7, j 12 -2) is rewritten to (i 10 , j 10 ), and "#10" is written in the buffer BUF shown in FIG. 71E. In this case, even if the coordinate values (i 12 −7) and i 10 or the coordinate values (j 12 −2) and j 10 do not match completely, in order to allow for slight deviations, for example, the difference is expressed as an absolute value. If it is "2" or less, it is considered to be applicable. Therefore, there may be cases where more than one item is applicable. (20) Similarly, it is assumed that the single gate symbol #14 in the table SPTABLE is extracted and "#14" is written in the buffer BUF shown in FIG. 71E. (21) In this state, if the number written in the buffer BUF matches the above-mentioned SCNT, it is assumed that one composite gate symbol corresponding to the information shown in FIG. 71B has been extracted, and SNO and CNO are written in the table shown in Figure 71A and in SPTABLE as shown by the circles in the diagram. Then, proceed to the next search. The operation during this time is shown in more detail in the form of a flowchart as shown in FIGS. 72 and 73. The flowchart shown in FIG. 73 shows an embodiment of the process for extracting candidates for the core of the composite gate symbol shown in FIG. 72. As described above, the composite gate symbol is extracted and then input to the data processing device. In other words, in the example of Fig. 71, the i, j, SDRCT, and SNO columns shown in Fig. 71D, and the SCNT and
The CNO and the contents of the buffer BUF shown in FIG. 71E are output as information input to the data processing device. Utilizing this fact, it becomes possible to correct erroneous extraction during single gate symbol extraction and input it to the data processing device. That is, composite gate
When extracting symbols, in the single gate symbol extraction process described above, for some reason, as shown by arrow L in FIG. Suppose that it can be extracted as an AND circuit. In such a case, assuming that it is impossible for the part indicated by the arrow L to become an AND circuit, a dictionary as shown in FIG. 74B is prepared as a composite gate/symbol dictionary memory. Then, the single gate symbol at the arrow L is referred to as an AND circuit, and CNO=102 is given as the overall pattern. In this way, Figure 74A
With the pattern shown, it is recognized as a composite gate symbol with CNO=102, and when inputting it to the data processing device, the single gate symbol at the position of arrow L is connected to the OR circuit (SNO=102).
27) can be corrected and reported. FIG. 75 deals with the case where a single gate symbol at the position of arrow M, as shown in FIG. 75A, which should originally be a composite gate symbol, is likely to be extracted as a multi-input AND circuit like a single gate symbol. The figure shows how to do this. [] Starting point setting process in the complex gate/symbol recognition processing section. When extracting gate symbols in general, not just compound gate symbols related to the process, the start point (terminal position) of the gate symbol should be set correctly and used for the connection line extraction process described later. be made to do. For this purpose, the start point setting process is performed as follows. That is, when, for example, one compound gate symbol is extracted as described above, the position of the start point (connection point with the connection line) in the symbol can be determined from the matched contents of the dictionary memory. It is determined in the form of relative coordinates from the coordinates (i, j). In the present invention, based on this point, the absolute coordinates where the start point should be located are calculated, and the #0 bit on the grid point label code LOGLBL is set to logic "1" for the grid point corresponding to the absolute coordinates. At the same time, logic "1" is set in any of bits #2 to #5, corresponding to which direction the line segment extends from the starting point. Further, if an inverse logic symbol should be added to the lattice point, the #1 bit is set to logic "1". [] Processing in the symbol area setting processing section. As mentioned above, when symbols belonging to each group of single gate symbols or composite gate symbols are extracted at the major classification level, for the grid points at the boundaries of the area occupied by each symbol,
Set symbol area flag. That is, bit #8 (symbol area flag S) in the code shown in FIG. 5 is set to logic "1". In setting the symbol area flag S, the relative coordinates of the grid point where the symbol area flag S is logical "1" as shown in FIG. 66 are determined from the contents of the dictionary memory that are matched with the symbol. Therefore, calculate the absolute coordinates, and set bit #8 on the grid point label code LOGLBL to logic "1" for the grid point with the absolute coordinates.
Just do it. In this way, when attempting to set the #8 bit on the lattice point label code LOGLBL to logic "1" corresponding to the extracted symbol, logic "1" may already be set. In such a case, as described with reference to FIG. 7, there is a possibility that symbols are extracted twice, and a flag indicating this is set to SPTABLE as shown in FIG. 69A.
Set it in the STFLG field. FIG. 76B corresponds to the logic circuit diagram shown in FIG. 76A,
The bold line indicates how the symbol area flag S (#8 bit) is set. [] Line segment confirmation processing in the line segment confirmation processing section. As shown in FIG. 4, this processing consists of processing by a shift correction unit and processing by an ambiguity correction unit. When processing handwritten drawings, it is necessary to fully consider the positional deviation of line segments. Due to this positional shift, what is originally a single line segment may be extracted twice as a lattice point label code on two parallel lattice axes. The processing by the deviation correction unit estimates the state of the positional deviation of such line segments from the lattice point label code, and generates reliable lattice point label codes only on the lattice axes considered to be intended by the designer. Here, the reliable grid point label code is the gap direction code (#12 to #15 bit),
The gap direction code (bits #19 to #22) and ambiguous direction code (bits #24 to #27) are all 0, and the ambiguous grid point label code is the gap direction code,
Refers to a case where either bit of the misalignment direction code or the ambiguous direction code is "1". Fig. 77 is an example of this processing, in which a pair of adjacent grid point labels/codes with "shift directions" in opposite directions as shown in Fig. 77B is captured, and this is regarded as a result of a shift of a single line segment. The correction is made as shown in FIG. 77C. That is, the code shown in FIG. 77B is sequentially searched based on the four-way code to detect the axis on which the lattice to which the reliable lattice point label code is attached is present. Finally, raise that axis to a reliable grid point label code, and remove the other grid point label code. In the figure, 7-1
is an arm corresponding to a certain label code, 7-2 is an arm with a deviation flag, 10 is a deviation direction, and 11 is a line segment. Next, the processing by the ambiguity correction unit captures the ambiguity of the grid point label code from a broader perspective and improves it into a reliable grid point label code. Removes ambiguities caused by characters drawn close to. An ambiguous lattice point label code having a gap direction code or an ambiguous direction code of "1" is assigned to a lattice point having an incomplete form as a line segment. Naturally, the same ambiguous grid point label code is assigned to the grid point where the character is located, but here it is difficult to determine whether the ambiguity of this code information is due to local variations in the line segment or to the character itself. We provide an interpretation of the cause and make corrections based on that interpretation. FIG. 78 shows an example of this process. Specifically, first, an ambiguous grid point label code as shown in FIG. 78B is detected, and adjacent grid point labels located in the direction along the four-way code are Search code sequentially. In the process of this search, if a certain grid point label code appears between ambiguous grid point label codes as shown in Figure 78C, the ambiguity is interpreted to be due to local variations in line segments. , into a reliable grid point label code. In the figure, white circles 12 are reliable grid point labels.
The code, black circle 13 represents an ambiguous grid point label code, 14 represents an arm with an ambiguous flag, and 15 represents an arm in which arm 7-2 with the above-mentioned deviation flag and arm 14 with the above-mentioned ambiguity flag overlap. There is. Further, 16 represents a character, and 17 represents a line segment. [] Processing in the gap/ambiguous arm processing section. Since the connection line is substantially determined up to the above processing, at that point, the four-way code (D, L , U, R). #8 of grid point label code LOGLBL(i,j)
The following processing is performed for bits (S) of "0". (1) If #11 bit (G F ) of LOGLBL (i, j) is "1" and (1-1) #15 bit (G R ) of LOGLBL (i, j) is "1", then ,LOGLBL(i,j)
Set the #15 bit (G R ) and #31 bit (R) to "0". (1-2) If #14 bit (G U ) of LOGLBL (i, j) is “1”, then LOGLBL (i, j)
Set #14 bit (G U ) and #30 bit (U) to "0". (1-3) If #13 bit (G L ) of LOGLBL (i, j) is “1”, then LOGLBL (i, j)
Set #13 bit (G L ) and #29 bit (L) to “0”
Make it. (1-4) If #12 bit (G D ) of LOGLBL (i, j) is “1”, then LOGLBL (i, j)
Set #12 bit (G D ) and #28 bit (D) of
Make it. (1-5) Then, set #11 bit (G F ) of LOGLBL (i, j) to "0". (2) If #16 bit (F F ) of LOGLBL (i, j) is "1" and (2-1) #27 bit (F R ) of LOGLBL (i, j) is "1", then ,LOGLBL(i,j)
Set the #27 bit (F R ) and #31 bit (R) to "0". (2-2) If #26 bit (F U ) of LOGLBL (i, j) is “1”, then LOGLBL (i, j)
Set the #26 bit (F U ) and #30 bit (U) to "0". (2-3) If #25 bit (F L ) of LOGLBL (i, j) is “1”, then LOGLBL (i, j)
Set #25 bit (F L ) and #29 bit () to "0". (2-4) If #24 bit (F D ) of LOGLBL (i, j) is “1”, then LOGLBL (i, j)
Set #24 bit (F D ) and #28 bit (D) of
Make it. (3) For those processed in steps (1) and (2) above,
Paired processing is performed as performed by the paired processing units described above. [XI] Symbol recognition processing in the single gate symbol recognition processing unit. In this process, based on the results of the general classification performed by the symbol classification processing section mentioned above,
The same group can be further subdivided. For the symbols extracted as above,
A table SPTABLE as shown in FIG. 69A is obtained. Under this state, the following processing is performed. (1) Search table SPTABLE. For example, for a single gate symbol 18 as shown in FIG. 79A, search the table shown in FIG.
Take out the direction SDRCT. Here, “(i S , j S ), NO
=13, SDRCT=0" is extracted. (2) Search candidate symbol table. As shown in FIG. 79B, as shown in FIG. 69A,
A candidate symbol table 19 is provided that describes candidate symbol numbers and candidate number information corresponding to each NO. 13'' and the direction is ``SDRCT=0'', three candidate symbol numbers ` `13 '', `` 14 '', and `` 15 '' are extracted from the candidate symbol table 19. (3) Symbol recognition dictionary and conversion. FIG. 79 C, D, and E show the contents of symbol recognition dictionaries 20-1, 20-2, and 20-3 corresponding to candidate symbol numbers " 13 ,"" 14 ," and " 15 " extracted from FIG. show. The shape of the grid point label code (i, j) corresponding to each starting point position of each left gate is shown. Also, the * mark on the outside of the margin is information indicating that the state should not apply to the starting point. The left side of the bottom column shows the size of the dictionary, and the right side shows the number of inverse logic symbols (2 mmφ). These recognition dictionaries are converted using directional SDRCT. (4) Matching between symbol recognition dictionary and grid point label code. As shown in FIG. 79F, the symbol recognition dictionary 20
-1, 20-2, 20-3 and the small circular display flag (#17 bit) of the grid point label code and the 4-way code (#28 to #31 bit) are performed, and the results are shown in G of the same figure. It is stored in the recognition buffer 21. The column A of the recognition buffer 21 shows the degree of coincidence of four-way codes, the column B shows the degree of coincidence of reverse logic symbols, and the column C shows the degree of coincidence of reverse logic symbols described in the dictionary.
Indicates the degree of coincidence of symbol locations. (5) Judgment. (5-1) A+B is the maximum value, that is, A+B
If the value of is twice the size of the symbol recognition dictionary (the number of vertical columns shown), that candidate symbol is the maximum matching and becomes the answer of the recognition result.
This corresponds to the first candidate symbol number of the recognition buffer shown in FIG. and Figure 69A
Enter the symbol number 13 in the SNO column in the table SPTABLE shown. (5-2) If there is no item for which A+B is the maximum value, choose one whose C column has the maximum value, that is, one that matches the number of inverse logic symbols described in the symbol recognition dictionary and for which A+B is greater than a certain threshold. The one with the maximum frequency is taken as the answer of the recognition result. and the table
Enter the symbol number in the SNO field in SPTABLE. (5-3) If there is nothing that corresponds to either (5-1) or (5-2) above, set a threshold value for A+B+C and use the largest one that is greater than or equal to that value as the answer of the recognition result. do. and likewise
Enter the symbol number in the SNO field. (5-4) If there is no item that falls under (5-1) to (5-3) above, it is determined that it is not a symbol, and "1" is set in the STFLG column of the table SPTABLE. As described above, it is possible to give subclassifications to symbols. [XII] Processing of the start point setting processing section. This process is substantially the same as the above process [ ]. [] Processing of the reverse logic symbol processing section. The processing is as described in relation to FIG.
This is a process for temporarily shelving reverse logic symbols that may have an adverse effect on the process described later. In this case, since the processing is for the grid point corresponding to the start point,
#0 bit (S T ) is “1” and #1 bit (S 2 )
The grid point label code LOGLBL(i,
Execute the following processing only for j). (1) If #5 bit (S R ) of LOGLBL (i, j) is “1”, a #31 bit (R), #16 bit (F F ) of LOGLBL (i, j-1) b LOGLBL #29 bit of (i+1,j-1)
(L), #28 bit (D), #16 bit ( FF ) c #30 bit (U) of LOGLBL (i+1, j), #28 bit (D) d #30 bit of LOGLBL (i+1, j+1) (U), #29 bit (L), #16 bit (F F ) e Set #31 bit (R), #16 bit (F F ) of LOGLBL (i, j+1) to "0". (2) If #4 bit (S U ) of LOGLBL (i, j) is “1”, a #30 bit (U), #16 bit (F F ) of LOGLBL (i-1, j) b LOGLBL (i-1, j-1) #31 bit (R), #28 bit (D), #16 bit ( FF ) c LOGLBL (i, j-1) #31 bit (R), #29 Bit (L) d #29 bit of LOGLBL (i+1, j-1)
(L), #28 bit (D), #16 bit (F F ) e Set #30 bit (U), #16 bit (F F ) of LOGLBL (i+1, j) to "0". (3) If #3 bit (S L ) of LOGLBL (i, j) is “1”, a #29 bit (L) of LOGLBL (i, j−1),
#16 bit ( FF ) b #31 bit (R) of LOGLBL (i-1, j-1), #28 bit (D), #16 bit (F F ) c LOGLBL (i-1, j) #30 bit (U), #28 bit (D) d #31 bit (R) of LOGLBL (i-1, j+1), #30 bit (U), #16 bit ( FF ) e LOGLBL (i, j+1) ) #29 bit (L),
Set #16 bit (F F ) to “0”. (4) If #2 bit (S D ) of LOGLBL (i, j) is “1”, a #28 bit (D) of LOGLBL (i-1, j),
#16 bit (F F ) b #31 bit (R), #30 bit (U), #16 bit (F F ) of LOGLBL (i-1, j+1) c #31 bit (F F ) of LOGLBL (i, j+1) R), #29 bit (L) d #30 bit (U), #29 bit (L), #16 bit (FF) of LOGLBL (i+1, j+1) e #28 bit (F F ) of LOGLBL (i+1, j) D),
Set #16 bit (F F ) to “0”. [] Processing in the line breakage correction processing section near the start point. As described above, line breakage tends to occur on the lattice point label code LOGLBL in the vicinity of the starting point position of the symbol. This process corrects the existence of this undesired line break. In Fig. 80A, the starting direction is on the left, so bits #2 to #5 of the grid point label code are "0100".
This is the case. Column 5 in the figure schematically shows bits #2 to #5 of the grid point label code of the start point of the recognized logic symbol in detail, and column 4 shows the start direction (lattice point) one grid axis to the left. In this example, when the interval is 2 mm, bits #28 to #31 of the lattice point label code (2 mm to the left) are shown schematically. Case 1 indicates that the four-way code is "0100", that is, the line segment extends from the left and stops at the grid point. In case 2, the 4-way code is "0010", that is, the line segment descends from the top and stops at the relevant grid point, and in case 3, the 4-way code is "1000", that is, the line segment goes up from the bottom and stops at the relevant grid point. It shows that it is on. However, since there is a logic symbol terminal in this part as shown in the 5th column, this broken trace is a line break caused by inaccurate drawing, and the line should originally have extended one grid interval to the right. I decided that
Add the line segments as shown in columns 6 and 7. Specifically, the L of the 4-way code at the starting point.
(#29 bit) is set to "1", and R (#31 bit) of the 4-way code of the grid point to the left of it is set to "1". Fig. 80B shows the case where the starting direction is upward, and the 5th row shows it, and the 4th row shows the 4th direction of the grid point next to the above.
Diagrammatically shows the direction code. Cases 1, 2, and 3 are cases where the 4-way code is "0010", "0100", and "0001", and in all cases it is determined that the connection from the grid point to the start point is missing, and the 6th and 7th rows are D (#28 bit) of the 4-way code of the upper adjacent grid point as shown in
is set to "1", and U (#30 bit) of the 4-way code at the start point is set to "1". 80C shows the case where the starting direction is to the right, and FIG. 80D shows the case when the starting direction is downward, and in both cases, the correction as shown in the figures is carried out in accordance with the above. Through this process, it is possible to correct line breaks near the terminal positions of logic symbols that tend to occur due to handwriting, and to avoid line breaks. [] Gap/ambiguous arm processing unit processing. This process is a process similar to the above process [ ] at that point in time. That is, (1) The following processing is executed for the grid point label code LOGLBL (i, j) whose #8 bit (S) is "1". a #16 bit (F F ) of LOGLBL (i, j),
Set #11 bit (G F ) to “0”. (2) Execute the following processing for grid point label code LOGLBL (i, j) whose #8 bit (S) is "0". (2-1) If #11 bit (G F ) of LOGLBL (i, j) is “1” then a #15 bit (G R ) of LOGLBL (i, j)
#15 of LOGLBL(i,j) when is "1"
Bit (G R ), #31 bit (R) is set to “0”
Make it. b #14 bit (G U ) of LOGLBL (i, j)
#14 of LOGLBL(i,j) when is "1"
Bit (G U ), #30 bit (U) is set to “0”
Make it. c #13 bit ( GL ) of LOGLBL(i,j)
#13 of LOGLBL(i,j) when is "1"
Set bit ( GL ) and #29 bit (L) to “0”. #12 bit (G D ) of d LOGLBL (i, j)
When is "1", #12 of LOGLBL(i,j)
Set bit (G D ) and #28 bit (D) to "0". e Then, set #11 bit (G F ) of LOGLBL (i, j) to "0". (2-2) If the #16 bit (F F ) of LOGLBL (i, j) is “1”, a The #24 to #31 bits (F D , F L , F U , F R , D, L, U, R)
Set to "0". (3) Then, perform pairwise processing on the results. [] Processing of the line connector processing unit. If the line combination display bit (#18 bit) is set in an undesired manner at this point, this is corrected.
That is, (1) If symbol area "S=1";#18 bit is set to "0". (2) If "S=0", which is not a symbol area; (2-1) Check the 4-way code (D, L, U, R), count the number of bits that are 1, and perform the following processing according to the number. I do. a) If the number is 2, set #18 bit to "0". b) If the number = 3, set bit #18 to 1. c) If the number = 4, leave as is (no processing) [] Processing of the line segment erasure processing unit in the composite gate symbol. Since the connection lines within the region of the composite gate symbol are a predetermined pattern and do not need to be extracted, processing is performed to erase them. That is, (1) Extract the symbols that are constituent elements of the composite gate symbol from the symbol recognition table SPTABLE. In other words, the coordinates (i,
j) and the symbol number SNO. (2) Take out the terminal dictionary (starting point dictionary 20) according to the symbol number SNO. (3) Compare the contents of the start point dictionary 20 and the grid point label code to detect terminal positions and connection directions where the start point information (#0 bit) is not "1". That is, the terminal position and direction of the line segment within the composite gate symbol area are detected. (4) Symbol area (#8 bit = 1) or
The four-way code is traced to the start point (#0 bit = 1) or end point (no trace direction), and the next process is executed. (4-1) Grid point labels reached by tracking
For LOGLBL (i, j), a When tracking is performed to the left, #29 bit (L) is set to "0". b When tracking upward, set #28 bit (D) to “0”. c When tracking to the right, set #31 bit (R) to "0". d When tracking downward, set #30 bit (U) to "0". e Then, set #16 bit (ambiguity flag) to "0". [] Processing in the connection line extraction processing section. In this process, for the connection line (i) between the start point and the start point (ii) between the branch point and the branch point (iii) between the bend point and the bend point (iv) between the start point and the branch point ( v) Between the branching point and the bending point (vi) Between the bending point and the starting point, and is tracked to extract it as a vector. This can be achieved by tracing the above-described intensive grid point label code based on a four-way code, and a detailed explanation of the process will be omitted. [] Processing in the character area extraction processing section. After the symbols and connection lines are extracted from the drawing, the rest are characters. In this process, the grid point label code LOGLBL with the fuzzy flag #16 bit (F F ) set is extracted, and the character area is extracted. The processing is performed as follows. That is, (1) Grouping of character flags (2) Extraction of character strings (2-1) Extraction of image data (2-2) Extraction of connectivity of image data (2-3) Removal of graphic patterns and extraction of adjacent areas It consists of each stage. The details of each of the above processes will be explained below. (1) Grouping of character flags For example, as shown in FIG. 81A, what is not needed for the time being in the grid point label code is temporarily deleted and one bit is created as a character string flag M F , which is used as grid point data. Prior to processing, the character string flag M F of all grid point label codes is cleared. Also, the fuzzy flag F F can be called a character flag. In this process, the character flag of the grid point label code
Search F F and extract a group of character flags 22 (for each character string). A processing example is shown in FIG. 81B, in which the character string flag M F of bit #7 of a block of lattice point data 23 is set to "1". (2) Extracting character strings (2-1) Cutting out image data Cut out a rectangular area with n×n (n is the distance between grid axes) pixels centered on the grid point where the character flag M F is "1". This process will be explained below with reference to FIGS. 82 and 83. FIGS. 82A and 82B show examples processed by the above-described processing. That is, character 24 and line segment 25 in figure A are processed, black circle mark 26 in figure B indicates a grid point where character flag F F is "1", and the arm corresponding to the white circle has logic "1". 4-way code (DLUR)
is shown diagrammatically. In the grouping process using character flags, as shown in FIG. 83A, image data in the vicinity of lattice points is divided into groups using ○× character string flags 27. Therefore, if the image data near the grid points marked with ○× are cut out by the rectangular area 28, the 83rd
Image data 29 shown in Figure B is extracted. However, simply extracting the image data near the grid points using the grouped character flags is not enough.
As shown in the figure, there are cases where it is difficult to extract a complete character string due to deletion of a part of the character or inclusion of other graphic images. For this purpose, the following process will be introduced. (2-2) Connectivity extraction of image data For the image data cut out in the rectangular area 28 near the grid point where the character string flag M F is "1", as shown in FIG. 84, the image data in the rectangular area is It is checked whether or not is in contact with the outer line 30 of the rectangular area. (a) If all n×1 (or 1×n) areas are “0”, it is indicated as “AM(k)=0” and is non-connected. (b) “1” in the n×1 (or 1×n) area
If there is, it is indicated as "AM(k)=1" and there is a possibility of connection to the adjacent area. However, “k=
1, 2, 3, 4”. Figure 85 shows an example of this connectivity extraction.
Among the four directions of the image data of the rectangular area 28,
Only "AM(3)=0" is unconcatenated, "AM(1)=1" and "AM(4)=1" in the other three directions are character data 31
Therefore, “AM(2)=1” means the adjacent lattice axis line 32
This indicates that image data exists. (2-3) Removal of graphic patterns and cutting out adjacent areas a. Removal of graphic patterns within rectangular areas As a result of the image data connectivity extraction process, “AM
(k) = 1'', as shown in ``AM(2) = 1'' in the upper direction of the image data shown in Figure 85, when the lines of adjacent lattice axes are shifted, part of that line It's possible that it's coming in. Therefore,
If “AM(k)=1”, as shown in Figure 86,
Check the adjacent grid point label code corresponding to that direction and perform the following processing. That is, (i) If character flag (F F = 1), then "AM(k) =
0". (ii) If the character flag "F F = 0" and any of the 4-way codes (DLUR) are "1", line pattern removal processing is performed. (iii) Otherwise, leave as is. The line pattern removal process within the rectangular area 28 is executed in each direction that satisfies the above condition (ii), and as an example, the case of "k=1" is taken as shown in FIGS. 87 and 88.
This will be explained using figures. An area of m pixels from the outer edge of the cut out rectangular area 28 in the vertical direction (when "K=2, 4", the horizontal direction)
Check whether there is a column that is all "0" and perform the following processing. (iv) If there is a column where all values are “0”, clear the black points outside that column and “AM(k)=
0". (v) If there is no column that is all “0”, leave it as is. Figure 87 is a schematic diagram of this process, Figure 88 is a diagram of the 85th
The results of applying this processing to image data within a rectangular area in the figure are shown. After applying this process, “AM(k)=
1'' indicates that character data is continuous in that direction. In addition, in Figure 88, even though the character data is continuous in the right direction, "AM(1)
= 0" because the character flag F F of the grid point label code on the right side is set to "1". A region near the point is cut out. b Cutting out adjacent rectangular area For the rectangular area mentioned above, if “AM(k)=1”, image data near the adjacent grid point in that direction is
×n pixels are extracted and the following figure pattern removal process is executed. As an example, the case of "k=1" will be explained. For the image data within the cut out rectangular area 33,
As shown in Figure 89, from left to right, the first column to the
Sequentially count the number of sunspots B CNT in each column (for example, in the case of "k=2", each row is from the nth row to the (n-w+1)th row from bottom to top), and calculate B CNT ≧TH or B If CNT = 0, all black points from that column to the w-th column including that column are cleared. Furthermore, all black pixels from the (w+1)th column to the nth column are unconditionally cleared. Note that TH is a predetermined threshold value. FIG. 90A shows the image data cut out near the adjacent grid points in the downward direction (AM(4)=1) of the rectangular area shown in FIG. 88, and FIG. 90B shows this image data according to the above a). The results of the graphic pattern removal process shown in FIG. All string flags M F are "1"
By applying this to a character string, image data of one character string can be extracted. In FIGS. 91A and 91B, complete characters are extracted by removing unnecessary graphic patterns and complementing the partial patterns of the deleted characters. [] Character separation processing in the character separation/recognition processing unit. The characters of the string extracted in the above process [] are separated character by character in this process,
To facilitate recognition processing. The process is shown below. Here, "V 2B " shown in Figure 92 is used as a character string.
The following is a processing procedure for cases where separation is difficult as is. Figure 92 depicts character strings 31 1 to 31 3 in a rectangular frame 3 that is one pixel larger in each direction than its circumscribed rectangle.
The image cut out by 4 is shown. Scanning this image with a window 35 shown in the figure, that is, a window perpendicular to the character string direction and having a length equal to the vertical width of the rectangular frame 34 and having a width of 1 pixel, from one end of the area within the rectangular frame, First, the position where the black dot 36 appears within the window 35 is detected. FIG. 93 shows the positions where black dots 36 are detected by the window 35 for the character strings 33 1 to 33 3 in FIG. 92. Next, the shortest path between the white pixels at both end positions "S" and "E" of the window 35 at this position is found, and the search area is moved from the position of the window 35 in the scanning direction of the character string, that is, to the right in the figure. limited to direction. 93rd
The character end position 37 indicated by the "+" mark in the figure is a label indicating the limitation of the search area. That is, the area to the right of the "+" mark is the search area. Although various algorithms have been proposed to extract the shortest path, here, Lee's algorithm will be used for explanation. Two points “S” determined by the above processing,
One of “E” first, for example “S”
Choose as a starting point. First, a label "1" is given to the white point directly adjacent to "S" (four-way connection). Next, a label "2" is given to the white point adjacent to the pixel given the label "1". Label "3" is given to the white point adjacent to label "2". Further, a label "1" is given to the white point adjacent to the label "3". Repeat this below. This process ends at “E”
This procedure continues until reaching . Figure 94 shows the results of this labeling procedure. Next, this label is traced in the reverse order of labeling from the end point "E" in the order of "3" → "2" → "1" → "3" in the reverse order of labeling, until it reaches the start point "S". Find a path. Although this route is the shortest route, it is not necessarily determined uniquely. In order to uniquely determine this, as shown in FIG. 95, priorities are set in the direction of reverse tracking, and tracking is performed in accordance with these priorities. FIG. 96 shows the shortest path detected by back tracking, and the label "+" is given to the pixels 38 on the path during back tracking. Through the above processing, an area where one character in a character string exists is identified as an area surrounded by "+". Therefore, by cutting out the black dots within this area, the image of one character is separated and extracted. Figure 97 shows the rectangular frame 3 after separating and extracting one character.
This is an image of the character strings 33 2 and 33 3 in the area No. 4. Through the above process, each time a character is extracted, a white point,
After converting pixels with labels other than black dots to white dots, the process is repeated until no black dots are detected within the rectangular area, whereby each character of the character string can be separated and extracted one by one. That is, as shown in Figure 98, the next character 3
3. A window is set for 2 , a label 39 representing the limit of the search area for the next character is determined, and the steps in FIGS. 93 to 97 are repeated. [XI] Character recognition processing in the character separation/recognition processing unit. In the above process [ ], a recognition process is performed on each character separated, but the mode of this process is arbitrary and is conventionally known, so a description thereof will be omitted. Although the processing is executed as described above, FIG.
1 shows a hardware block diagram of an embodiment for carrying out the above process. In the figure, 101 is an image input device, 102 is an image memory, 103 is a verification circuit, 104 is a reference point detection circuit, 105 is a grid point table, 106 is a grid conversion circuit (horizontal), and 107 is a grid point label code generation circuit. (horizontal), 108 is a grid conversion circuit (vertical), 109 is a grid point label code generation circuit (vertical), 110 is an address control section, 111 is a control section,
112 is a verification window setting circuit; 113 is an LBL table that sets the code LBL; 114;
is the LB1 table, 115 is the LB2 table, 11
6 is SX1, SY1 table, 117 is SX2, SY
2 tables, 118 is an address conversion circuit, 119
120 is an LB3 generation circuit that generates local shape label information; 120 is an LB3 table in which the local shape label information is set;
1 is a grid point label/code determination circuit, 122 is a label/code table, 123 is a pair processing circuit,
124 is a line pattern breakage correction circuit, 126 is a deviation correction circuit, 127 is an ambiguity correction circuit (), 1
28 is a symbol dictionary, 129 is a symbol extraction circuit,
130 is a symbol recognition table, 131 is a composite gate/symbol recognition dictionary, and 132 is a composite gate/symbol recognition dictionary.
Symbol terminal position dictionary, 133 is a composite gate/symbol recognition circuit, 134 is a single/gate symbol candidate dictionary, 135 is a single gate/symbol terminal position dictionary, 136 is a single gate/symbol recognition circuit, 137 is a symbol area setting circuit, 138 is a deviation correction circuit (), 139 is an ambiguity correction circuit (), 140 is a gap/ambiguity processing circuit, 1
41 is a page connector recognition processing circuit, 142 is an inverse logic/symbol processing circuit, 143 is a terminal position determination circuit, 144 is a terminal vicinity line breakage correction circuit, 14
Reference numeral 5 represents a line segment extraction circuit, 146 a line segment extraction preprocessing circuit, 147 a character area extraction circuit, 148 a line connector processing circuit, and 149 a recognition result output device. (E) Effects of the Invention As explained above, according to the present invention, it is possible to automatically read a handwritten logic circuit diagram and input information regarding the logic circuit diagram into a data processing device.

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

第1図は本発明によつて処理される論理回路図
の一例、第2図は格子点ラベル・コードを得る処
理範囲を説明する図、第3図は格子点ラベル・コ
ードを得る処理の一実施例態様を説明する図、第
4図は本発明装置の一実施例全体構成図、第5図
は本発明において用いられる格子点ラベル・コー
ドの一実施例フオーマツト、第6図ないし第10
図は夫々本発明による処理態様を説明する図、第
11図は第4図図示の処理部における図面入力
処理の一実施例態様、第12図及び第13図は第
4図図示の処理部における歪補正処理の一実
施例態様説明図、第14図ないし第52図は第4
図図示の処理部における集約的格子点ラベ
ル・コードを得る処理態様を説明する図、第53
図ないし第55図はライン結合子を抽出する処理
態様を説明する図、第56図ないし第58図は逆
ロジツク・シンボルを抽出する処理態様を説明す
る図、第59図は第4図図示の処理ユニツト
の処理を説明する図、第60図は第4図図示の処
理ユニツトの処理を説明する図、第61図は
第4図図示の処理ユニツトの処理を説明する
図、第62図ないし第68図は第4図図示の処理
部の処理を説明する図、第69図ないし第76
図は第4図図示の処理部の処理を説明する図、
第77図及び第78図は第4図図示の処理部の
処理を説明する図、第79図は第4図図示の処理
部の処理を説明する図、第80図は第4図図示
の処理部の処理を説明する図、第81図ないし
第91図は第4図図示の処理部の処理を説明す
る図、第92図ないし第98図は第4図図示の処
理部の処理を説明する図、第99図は第4図図
示の構成を実行する一実施例ハードウエア・ブロ
ツク図を示す。 図中、1は処理対象図面、2は処理結果情報、
LOGLBLは格子点ラベル・コード、G5は格子点
を表わす。
FIG. 1 is an example of a logic circuit diagram processed by the present invention, FIG. 2 is a diagram explaining the processing range for obtaining lattice point label codes, and FIG. 3 is an example of the processing for obtaining lattice point label codes. 4 is an overall configuration diagram of an embodiment of the apparatus of the present invention, FIG. 5 is a format of an embodiment of the grid point label code used in the present invention, and FIGS. 6 to 10 are diagrams for explaining embodiments.
11 is an example of the drawing input process in the processing section shown in FIG. 4, and FIGS. Figures 14 to 52 are explanatory diagrams of an embodiment of distortion correction processing.
A 53rd diagram illustrating a processing mode for obtaining an intensive grid point label code in the illustrated processing unit.
55 to 55 are diagrams for explaining the processing mode for extracting line connectors, FIGS. 56 to 58 are diagrams for explaining the processing mode for extracting inverse logic symbols, and FIG. FIG. 60 is a diagram explaining the processing of the processing unit shown in FIG. 4, FIG. 61 is a diagram explaining the processing of the processing unit shown in FIG. 4, and FIGS. 68 is a diagram explaining the processing of the processing section shown in FIG. 4, and FIGS. 69 to 76
The figure is a diagram explaining the processing of the processing section shown in FIG.
77 and 78 are diagrams for explaining the processing of the processing section shown in FIG. 4, FIG. 79 is a diagram for explaining the processing of the processing section shown in FIG. 4, and FIG. 80 is a diagram for explaining the processing of the processing section shown in FIG. 4. Figures 81 to 91 are diagrams explaining the processing of the processing unit shown in Figure 4, and Figures 92 to 98 are diagrams explaining the processing of the processing unit shown in Figure 4. 99 shows a hardware block diagram of one embodiment for implementing the configuration shown in FIG. 4. In the figure, 1 is the drawing to be processed, 2 is the processing result information,
LOGLBL is the grid point label code, and G5 represents the grid point.

Claims (1)

【特許請求の範囲】 1 予め定められた格子軸に沿つて描かれたシン
ボルとシンボル間結線を含む線図形と文字を含む
画図形とが存在する手書き図面を読み取つて得ら
れた画像データから、線図形および画図形部分を
認識し抽出する論理回路図処理装置において、 格子点近傍に画像データの存在の可能性を示す
格子点ラベルコードを生成する格子点ラベルコー
ド生成手段と、 上記格子点ラベルコードにもとづいて上記画像
データの上記格子点に対する位置ずれを検証する
位置ずれ検証手段と、 上記画像データの局部的形状を判別して線図形
または画図形の存在の可能性を識別する局部形状
抽出手段と、 上記格子点上で画像データが交差する場合にそ
の交差部分での結合子の存在の可能性を判別する
ライン結合子抽出手段と、 上記格子点近傍に円形状の画像データの存在の
可能性を判別する円形状抽出手段と、 少なくとも上記格子点ラベルコード生成手段か
ら得られた格子点ラベルコードと、 上記位置ずれ検証手段から得られた位置ずれ情
報と、 上記局部形状抽出手段から得られた局部形状ラ
ベル情報と、 上記ライン結合子抽出手段から得られたライン
結合子情報と、 円形状抽出手段から得られた円形状情報とにも
とづいて上記格子点近傍の画像データ情報を集約
した集約的格子点ラベルコードを決定する集約的
格子点ラベルコード生成部と、 上記集約的格子点ラベルコードをもとに単一お
よび複合シンボルを認識するシンボル認識手段
と、 上記集約的格子点ラベルコードと上記シンボル
認識手段とにより得られたシンボル情報よりシン
ボル間結線を抽出する線分抽出手段と、 上記集約的格子点ラベルコードと上記画像デー
タとより文字列の抽出および文字の分離を行う文
字領域抽出手段とを備えてなる ことを特徴とした論理回路図処理装置。
[Claims] 1. From image data obtained by reading a handwritten drawing in which there are symbols drawn along predetermined grid axes, line figures including connections between symbols, and drawing figures including characters, In a logic circuit diagram processing device that recognizes and extracts line figures and graphic figure parts, a lattice point label code generation means for generating a lattice point label code indicating the possibility of the existence of image data near a lattice point; a positional deviation verification means for verifying the positional deviation of the image data with respect to the grid points based on a code; and local shape extraction for determining the local shape of the image data and identifying the possibility of the existence of a line figure or a drawing figure. means for extracting a line connector for determining the possibility of the existence of a connector at the intersection when the image data intersects on the grid point; circular shape extraction means for determining the possibility; at least the lattice point label code obtained from the lattice point label code generation means; the positional deviation information obtained from the positional deviation verification means; and the positional deviation information obtained from the local shape extraction means. image data information in the vicinity of the lattice points was aggregated based on the local shape label information obtained from the above, the line connector information obtained from the line connector extraction means, and the circular shape information obtained from the circular shape extraction means. an intensive grid point label code generation unit that determines an intensive grid point label code; a symbol recognition unit that recognizes single and compound symbols based on the intensive grid point label code; and said intensive grid point label code. and a line segment extraction means for extracting connections between symbols from the symbol information obtained by the symbol recognition means; and a character region for extracting character strings and separating characters from the intensive grid point label code and the image data. 1. A logic circuit diagram processing device comprising: extraction means.
JP58156045A 1983-08-26 1983-08-26 Processor logical circuit diagram Granted JPS6048580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58156045A JPS6048580A (en) 1983-08-26 1983-08-26 Processor logical circuit diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58156045A JPS6048580A (en) 1983-08-26 1983-08-26 Processor logical circuit diagram

Publications (2)

Publication Number Publication Date
JPS6048580A JPS6048580A (en) 1985-03-16
JPH0430634B2 true JPH0430634B2 (en) 1992-05-22

Family

ID=15619110

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58156045A Granted JPS6048580A (en) 1983-08-26 1983-08-26 Processor logical circuit diagram

Country Status (1)

Country Link
JP (1) JPS6048580A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS583078A (en) * 1981-06-30 1983-01-08 Fujitsu Ltd Pattern information extracting system
JPS583077A (en) * 1981-06-30 1983-01-08 Fujitsu Ltd Character information extracting system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS583078A (en) * 1981-06-30 1983-01-08 Fujitsu Ltd Pattern information extracting system
JPS583077A (en) * 1981-06-30 1983-01-08 Fujitsu Ltd Character information extracting system

Also Published As

Publication number Publication date
JPS6048580A (en) 1985-03-16

Similar Documents

Publication Publication Date Title
US5416849A (en) Data processing system and method for field extraction of scanned images of document forms
US7106904B2 (en) Form identification method
EP0063454A2 (en) Method for recognizing machine encoded characters
EP1030263B1 (en) Method for interpreting hand drawn diagrammatic user interface commands
KR101235226B1 (en) Image processor and image processing method and recording medium
JP2011192274A (en) Method and apparatus for form template definition
JPH08305796A (en) Pattern extracting device, table preparing device for pattern recognition and pattern recognition device
CN111626145B (en) Simple and effective incomplete form identification and page-crossing splicing method
JP2012181653A (en) Scoring method, program of scoring method, and scoring system
JPH07105312A (en) Method and device for eliminating dirt from character image in optical character reader
JPH0430634B2 (en)
JP3798179B2 (en) Pattern extraction device and character segmentation device
JPH06231253A (en) Image correcting device and drawing inputting device
JP5619111B2 (en) Image determination apparatus and program
JP3370402B2 (en) Character recognition device
JP4117648B2 (en) Form, form processing method, form processing program, recording medium recording form processing program, and form processing apparatus
JPS6321949B2 (en)
JPS63308689A (en) Detecting and correcting system for inclination angle of character
JPH02138674A (en) Method and device processing document
JPH117493A (en) Character recognition processor
JPS592168A (en) Disconnection correction system
JP2006277509A (en) Dot texture superposition notation part shape restoration method and program therefor
JP2002366900A (en) Optical character reader
JPH0119189B2 (en)
EP0701226B1 (en) Method for segmenting handwritten lines of text in a scanned image