JPS62286176A - Converting/processing method for drawing data - Google Patents

Converting/processing method for drawing data

Info

Publication number
JPS62286176A
JPS62286176A JP61129955A JP12995586A JPS62286176A JP S62286176 A JPS62286176 A JP S62286176A JP 61129955 A JP61129955 A JP 61129955A JP 12995586 A JP12995586 A JP 12995586A JP S62286176 A JPS62286176 A JP S62286176A
Authority
JP
Japan
Prior art keywords
data
loop
block
chain
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP61129955A
Other languages
Japanese (ja)
Inventor
Shota Kawaguri
河栗 正太
Senyo Masaki
正木 千陽
Masataka Kobayashi
正孝 小林
Akihiko Igawa
明彦 井川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kanebo Ltd
Original Assignee
Kanebo Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kanebo Ltd filed Critical Kanebo Ltd
Priority to JP61129955A priority Critical patent/JPS62286176A/en
Publication of JPS62286176A publication Critical patent/JPS62286176A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To rapidly process massive data by a software by extracting only picture elements at both sides of a line without performing a fine line processing and obtaining vector data linearly approximated with a constant allowance. CONSTITUTION:An algorithm for converting image data into chain data reads one block data from a binary data file RAM board 4 to the memory of a personal computer 1. The presence and the absence of connection loop data is decided between blocks, when there is the loop data, connection chain data is traced and the data is respectively outputted to a loop chain data file and a chain data file. When there is no loop data, the start point of new loop data is retrieved. When the start point is retrieved, the chain data is traced. When the loop is closed in the block or not or whether the loop reaches a block connection part or not is examined, when the loop is closed, the start chain data is retrieved. When the loop reaches the block connection part, connection data is formed to return to the retrieval of the start chain data again.

Description

【発明の詳細な説明】 3、発明の詳細な説明 (発明の技術分野) この発明は、地図1図面9文字等の種々の図面をイメー
ジスキャナで読取ってCAD用データとして処理する場
合の、イメージデータからチェーンデータへの変換処理
方法に関する。
Detailed Description of the Invention 3. Detailed Description of the Invention (Technical Field of the Invention) This invention provides an image analysis method for reading various drawings such as one map, nine characters, etc. with an image scanner and processing them as CAD data. Concerning a method for converting data into chain data.

(発明の技術的背景とその問題点) OA’llり CAD+の技術的進歩に伴ない、種々の
図面の自動読取が重要になって来ている。たとえば一般
的に設計業務を行なう場合、最初からまったく新しく製
図をするという場合は少なく、基本設計のレイアウトの
後、似たような出図を探してそれを一部変更したり、あ
るいはいくつかの基本設計図面から製図を始めるという
のが殆んどである。しかしながら、CADシステムで設
計、製図業務を行なおうとする場合、これらの既存図面
のデータ人力は膨大な費用がかり、CADを有効に生か
そうとする場合の大きな障害となっているのが現状であ
る。また、回路設計の様に設計者が最初からCADでデ
ータを人力するより、手書き図面を書いた方かかえって
作業効率が上る様な場合もある。この様な背景から、既
存図面の自動読み取りがCADシステムを真に有効に生
かす鍵となる。本発明は、この既存図面等の自動読み取
り数値データ化に関するもので、従来大別すると2つの
手法がある。その1つは人間がディジタイザ−で図面か
ら計測するもので、ハンドディジタイジングと呼ばれる
。この手法は人間が図形を目で確認しながら計測するの
で、計測時点で図形の属性を人力したり、途切れた線を
繋いだりすることがその場でできるという利点がある。
(Technical background of the invention and its problems) OA'lli With the technical progress of CAD+, automatic reading of various drawings has become important. For example, when doing design work, it is rare to create a completely new draft from the beginning, but after laying out the basic design, you may find a similar drawing and make some changes to it, or you may need to make some changes. In most cases, drafting begins with basic design drawings. However, when attempting to perform design and drafting work using a CAD system, the data and human resources required for these existing drawings incurs enormous costs, which is currently a major hindrance to making effective use of CAD. . Furthermore, in some cases, such as circuit design, it is more efficient to draw hand-drawn drawings rather than manually input data using CAD from the beginning. Against this background, automatic reading of existing drawings is the key to making the most of CAD systems. The present invention relates to automatically reading and converting existing drawings into numerical data, and there are two conventional methods. One method is to measure the drawings using a digitizer, which is called hand digitizing. This method has the advantage of being able to manually enter the attributes of a shape or connect broken lines on the spot at the time of measurement, since humans measure the shape while visually checking it.

しかし、その反面データの計測誤りや抜けが発生しやす
いため、データチェックという作業が必須となり、非常
にコスト高になるという欠点がある。もう1つは、イメ
ージスキャナでの自動読取りによるオートデジタイジン
グと呼ばれているものである。この手法は図面を画像デ
ータとして読取り、次にベクトルデータに変換するもの
であり、データの漏れや誤りかなく、計測コストも低い
。しかし、機械設計図面のように色々な記号や線種があ
り、また文字等による図形の分離がある図面では、ベク
トルへの変換が難しく実用には至っていない。
However, on the other hand, measurement errors and omissions in data are likely to occur, so data checking is required, resulting in extremely high costs. The other method is called auto-digitizing, which uses automatic reading with an image scanner. This method reads the drawing as image data and then converts it into vector data, so there is no data omission or error, and the measurement cost is low. However, in drawings such as mechanical design drawings, which have various symbols and line types, and in which figures are separated by characters, etc., it is difficult to convert them into vectors, and this has not been put to practical use.

一方、従来の図面読取システムではAlサイズの画像処
理が主であり、ハードウェアによるためにシステム価格
が高価であり、また、車なるベクトル化がほとんどで、
 CADの人力データとしては使うことは困難である。
On the other hand, conventional drawing reading systems mainly process images of Al size, the system price is expensive because it uses hardware, and most of them are vectorized.
It is difficult to use it as human data for CAD.

従って、このベクトルデータを人間が会話式編集によっ
てCADで使えるデータへ編集することが必要になるわ
けであるが、ベクトル化と会話式編集とが別システムと
なっており、両システムを合せると非常に高価となって
しまう。また、CADで使えるデータへの編集に多大な
労力を費やしてしまうという欠点がある。
Therefore, it is necessary for humans to edit this vector data into data that can be used in CAD using interactive editing, but vectorization and interactive editing are separate systems, and combining both systems is extremely difficult. It becomes expensive. Another drawback is that it requires a great deal of effort to edit data that can be used in CAD.

一方、画像からベクトル化への変喚処理テ使われている
細線化手法は、与えられた図形から線幅を細めて単位幅
の中心線を抽出する方法で、原図形の連結性を変えない
、すなわち図形が切れたり孔を生成したりしないで、連
続的に線図形化することが要求される。細線化の結果か
ら図形の結合関係の特徴が求められるので、細線化処理
は従来より、字や図面などの線状図形から線の構造を解
析するのに不可欠の処理となっている。
On the other hand, the thinning method used in the transformation process from image to vectorization is a method that extracts a center line of unit width by narrowing the line width from a given figure, without changing the connectivity of the original figure. In other words, it is required to continuously convert the figure into a line figure without cutting it or creating holes. Since the characteristics of the connection relationships between figures can be determined from the result of line thinning, line thinning has traditionally been an essential process for analyzing line structures from linear figures such as characters and drawings.

中心線の品質や連結性の使い分けに応じて、これまでに
多くのアルゴリズムが考案されているが、基本的には次
の形をとる。すなわち、画像中の境界点(4−近傍に1
つでも〇一画素をもつ1一画素)の中から、消去可能要
素でありかつ線の端点ではない画素(たとえば8−近傍
の1一画素の個数が2以下)をすへて消去する。このよ
うな処理を画像全体の画素に施す1回の操作とし、これ
を消去される画素がなくなるまで反復する。
Many algorithms have been devised so far, depending on the quality and connectivity of the center line, but basically they take the following form. In other words, the boundary points in the image (4 - 1 in the vicinity)
Among the 11 pixels that have 01 pixels at any time), all pixels that are erasable elements and are not end points of the line (for example, the number of 11 pixels in the 8-neighborhood is 2 or less) are erased. This process is performed on the pixels of the entire image in one operation, and is repeated until there are no pixels left to be erased.

細線化アルゴリズムにも逐次型と並列型とがある。それ
ぞれ工夫かなされており、総していえば距離変換や縮退
と同様、原理は並列型の方が考えやすいか、逐次型では
プログラミング技法を駆使してうまい条件を使うことが
できる。
There are also sequential and parallel types of thinning algorithms. Each method has been devised, but overall, just like distance conversion and degeneracy, the principle is easier to think about in the parallel type, and in the sequential type, you can make full use of programming techniques to use clever conditions.

特に細線化では、並列型のアルゴリズムを直接適用する
と、2!I位幅画素分の図形が一度に消滅してしまうと
いう問題がある。条件を複雑にして、2単位幅画素分の
場合はどちらか一方だけが消去されるようにするか、あ
るいは上下左右に〇一画素をもつ境界点のある一部分に
ついてだけ細線処理を施す(サブサイクル法といわれる
)等の対策により、2単位幅の部分の消失を防ぐことが
できる。逐次型アルゴリズムではこの消失を防ぐ条件設
定は容易であるが、反面どうしでも中心線の位置が走査
方向に依存しがちという欠点がある。
Particularly in line thinning, if a parallel algorithm is applied directly, 2! There is a problem in that a figure with a width of I pixels disappears at once. Either complicate the conditions so that only one side is erased in the case of 2 unit width pixels, or perform thin line processing only on a part of the boundary point that has 01 pixels on the top, bottom, left, and right (subcycle). Measures such as 2-unit width can be prevented from disappearing. In the sequential algorithm, it is easy to set conditions to prevent this disappearance, but on the other hand, it has the disadvantage that the position of the center line tends to depend on the scanning direction.

細線化アルゴリズムには、図形の木質的な構造を保存し
た線図形を抽出するという目的から、以下の諸性質をも
つことが望まれる。
The thinning algorithm is desired to have the following properties for the purpose of extracting a line figure that preserves the wooden structure of the figure.

■単位線幅となること。■Must be unit line width.

■線の位置は元の図形のほぼ中心にくること。■The position of the line should be approximately at the center of the original shape.

■図形の連結性が保存されたまま細線化されること。■Thin lines are created while preserving the connectivity of shapes.

■細線化過程で芯線が必要以上に縮まないこと。■The core wire should not shrink more than necessary during the thinning process.

■境界上の小さな凹凸によりひげを生じないこと。■Do not cause whiskers due to small irregularities on the boundary.

■原図形を回転して入力しても、芯線の形が大きく変化
しないこと。
■Even if the original figure is rotated and input, the shape of the core line should not change significantly.

■図形の交差部において芯線が歪まないこと。■The core lines should not be distorted at the intersections of shapes.

このような細線化処理には大型コンピュータでも、多大
な時間を要し、簡易な画像処理の手法強くが要請されて
いた。
Such line thinning processing requires a large amount of time even on large computers, and there has been a strong demand for a simple image processing method.

(発明の目的) この発明は上述のような事情よりなされたものであり、
この発明の目的は、既存の図面等からの画像の数値デー
タの取得を行なうハンドディジタイジングとオートディ
ジタイジング双方の長所、短所を考慮して、互いに補い
合いながら低コストでCAD用の数値データを取得でき
る図面自動読取システムにおいて、イメージデータをチ
ェーンデータに変換する方法を提供することにある。
(Object of the invention) This invention was made under the above circumstances,
The purpose of this invention is to acquire numerical data for CAD at low cost by taking into consideration the advantages and disadvantages of both hand digitizing and automatic digitizing, which acquire numerical data of images from existing drawings, etc., and complement each other. An object of the present invention is to provide a method for converting image data into chain data in an automatic drawing reading system that can be used.

(発明の概要) この発明は図面データの変換処理方法に関し、設計図面
等の画像をイメージスキャナで読取って得られるイメー
ジデータをチェーンデータに変換して後に直線近似1し
、この直線近似1されたデータを芯線化してから直線近
似2して芯縁結合することによって、CAD等に用いる
ことかできるベクトルデータを得る。図面データの変換
処理方法において、前記イメージデータをチェーンデー
タに変換する際、2値データファイルから1ブロックデ
ータ分だけ読込み、データ終了であるか否かを判断した
後、ブロック間で接合ループデータが有るか否かを判断
し、前記接合ループデータが有る場合には接続チェーン
データの追跡を行なってループデータファイル及びチェ
ーンデータファイルへ格納し、前記接合ループデータか
墳い場合又は前記追跡か終了した場合、現ブロック内で
の新たなループデータの開始点の検索をブロック終了ま
で行ない、ブロック終了となった場合には前記チェーン
データの追跡を行なうと共に、当該ブロック内でクロー
ズしたか否かのt’l断とブロック接続部へ達したか否
かの判断を行ない、接続データの作成をブロック終了ま
で繰り返すようになっているものである。
(Summary of the Invention) The present invention relates to a drawing data conversion processing method, in which image data obtained by reading an image of a design drawing etc. with an image scanner is converted into chain data, and then linear approximation 1 is performed. By converting the data into core lines, performing linear approximation 2, and combining the core edges, vector data that can be used for CAD, etc. is obtained. In the drawing data conversion processing method, when converting the image data to chain data, only one block of data is read from the binary data file, and after determining whether the data is complete, the spliced loop data is created between blocks. If the spliced loop data exists, it traces the connected chain data and stores it in a loop data file and a chain data file, and if the spliced loop data is not found or the tracing is completed. In this case, the search for the starting point of new loop data within the current block is performed until the end of the block, and when the block ends, the chain data is traced and whether or not it is closed within the block. It is designed to determine whether or not the block connection section has been reached, and to repeat the creation of connection data until the end of the block.

(発明の実施例) この発明は、ハントディジタシングによってアナログ図
面の設計図を数値化する場合、最大の問題は人間が1点
1点計測していたのでは、その計測時間が非常にかかる
という事と、人力忘れ或いは誤りを生じ易いという事及
びオートデジタイジングによる線図と文字記号の分離の
困難性を解決するということを目的としている。この発
明では上記部分をイメージスキャナによる画像データ計
測により高速に行なう事て、計測時間の効率化を計って
いる。しかし、この計測データは画像データであるので
、これをベクトルデータに変換する必要がある。一般的
な画像ベクトル変換は前述したような細線化と呼ばれる
処理で、これは線の両側の画素を削って行き、中心の画
素のみを残すようにする手法であるが、そのデータ量に
より非常に時間がかかるという欠点がある。本発明では
ベクトル変換処理に細線化処理を行なわずに、線の両側
の画素のみを抜き出して、これを一定の許容誤差で直線
化近似1したベクトルデータを得た後、その芯を計算し
て、これを芯線ベクトルとして得るという手法により、
高速なベクトル化を実現している。
(Embodiment of the Invention) This invention solves the problem that when digitalizing analog drawings by hunt digitizing, the biggest problem is that it takes a very long time to measure each point by a human. The purpose is to solve the problems of human forgetfulness or error, and the difficulty of separating line drawings and character symbols by automatic digitizing. In this invention, the above part is performed at high speed by measuring image data using an image scanner, thereby improving the efficiency of measurement time. However, since this measurement data is image data, it is necessary to convert it into vector data. General image vector conversion is a process called line thinning as mentioned above, which is a method of removing pixels on both sides of a line and leaving only the center pixel, but due to the amount of data involved, it is extremely difficult to do so. The disadvantage is that it takes time. In the present invention, without performing line thinning processing in vector conversion processing, only pixels on both sides of the line are extracted, and after linear approximation 1 is obtained from this with a certain tolerance, the center is calculated. , by obtaining this as a core vector,
Achieves high-speed vectorization.

先ず、この発明の説明に用いる言葉の定義を行なう。First, the terms used to explain this invention will be defined.

■イメージデータ・・・・・・画像データの事。一般に
は濃淡の画像データを指す。画像データは一点々々のド
ツトデータから成立つものである。本システムではこの
うち特に白か黒かの2値データを指している。
■Image data: Image data. Generally refers to shading image data. Image data is made up of dot data one by one. In this system, this specifically refers to binary data of black and white.

■チェーンデータ・・・・・・画像データで輪郭線部分
を記録するのに、メモリを節約して記録されたデータ。
■Chain data: Data that saves memory when recording outlines using image data.

一つの画像から次の画像が常に8方向のいずれがかを出
し、それをチェーン化して表わす。
From one image to the next, one of the eight directions is always displayed, and these are expressed as a chain.

■直線近似l・・・・・・チェーンデータをCharl
es M。
■Line approximation l...Chain data Char
esM.

Williamsの手法で直線近似したもの。Linear approximation using Williams' method.

■芯線化・・・・・・イメージデータからベクトルデー
タへ変換する手法の一つ。線の両サイドから中心線(芯
線)を算出する。
■ Core line conversion: A method of converting image data to vector data. Calculate the center line (core line) from both sides of the line.

■直線近似2・・・・・・芯線化した後に、直線部分と
曲線部分をより明確にする為に処理した直線近似手法。
■Line approximation 2: A straight line approximation method that is processed to make straight and curved parts more clear after converting them to core lines.

■接続ループデータ・・・・・・イメージデータからチ
ェーンデータを抽出する時に出来るデータで、ブロック
間にまたがるループはパーツループとして管理される。
■Connection loop data: Data created when chain data is extracted from image data, and loops spanning between blocks are managed as part loops.

■接続チェーンデータ・・・・・・ブロック間で分割さ
れたチェーンデータ。
■Connected chain data...Chain data divided between blocks.

■ループデータファイル・・・・・・直線近似工した後
に、分割されたループを一つのループに結合した時のル
ープ情報ファイル。
■Loop data file: Loop information file when divided loops are combined into one loop after linear approximation.

02重ベクトルデータ・・・・・・直線近似1した後の
輪郭線データ。
02 double vector data: Contour data after linear approximation 1.

[相]0ELT−ALO・・・・・・互いに交差するベ
クトルの角度で3°。
[Phase] 0ELT-ALO...The angle of vectors intersecting each other is 3 degrees.

■DELT−AL4・・・・・・互いに交差するベクト
ルの角度でlOo。
■DELT-AL4...The angle of vectors that intersect with each other is lOo.

@線関係マトリクス表1.2・・・・・・平行、直交等
の線関係と線距離から成るマトリクス表。
@Line relationship matrix table 1.2...A matrix table consisting of line relationships such as parallel and orthogonal lines and line distances.

0力レントノード点・・・・・・現在、処理の対象とし
ているベクトルの端点。
Zero force rent node point: End point of the vector currently being processed.

[相]サーチノード点・・・・・・カレントノード点を
中心としてサーチしてくるベクトルの端点。
[Phase] Search node point: End point of the vector searched centering on the current node point.

■2會MSI2E・・・・・・カレントノート点を中心
としてサーチする為のサーチの領域。
■2nd round MSI2E...Search area for searching centered on the current note point.

第1図はこの発明の対象となる図面読取システムの全体
構成を示しており、パーソナルコンピュータ1にはイン
タフェース2を介してアナログ図面等を読取るイメージ
スキャナ3が接続されていると共に、増設用のRAMボ
ート4.20MBの固定ディスク5及びタブレット6か
接続されている。イメージスキャナ3の画像読取りとR
AMポート4のメモリエリアとの対応関係は第2図に示
すようになっており、イメージスキャナ3の解読はEN
A信号を使用して現在データが伝送されて来ているかを
判断し、8ビツトパラレルデータをクロックのタイミン
グで1バイトずつのデータにカットして、メモリエリア
上に振分け2値データファイルに格納するようになって
いる。インタフェース2はRAMボード4にデータを格
納するための4M分のアドレスを順次計算し、高速に格
納するためのDMA転送の信号を発生する。
FIG. 1 shows the overall configuration of a drawing reading system to which the present invention is applied. An image scanner 3 for reading analog drawings, etc. is connected to a personal computer 1 via an interface 2, and an additional RAM is connected to the personal computer 1. Boat 4. A 20MB fixed disk 5 and a tablet 6 are connected. Image reading of image scanner 3 and R
The correspondence relationship with the memory area of AM port 4 is shown in Figure 2, and the decoding of image scanner 3 is EN.
It uses the A signal to determine whether data is currently being transmitted, cuts the 8-bit parallel data into 1-byte data at clock timing, distributes the data in the memory area, and stores it in a binary data file. It looks like this. The interface 2 sequentially calculates 4M addresses for storing data in the RAM board 4, and generates a DMA transfer signal for high-speed storage.

第3図は図面読取システムの全体の流れを示しており、
このシステムでは画像データの2値データのみを計測す
る。画像データをベクトルデータに変換する場合、一般
に問題になるのは、そのデータ量の膨大さから細線化に
時間がかかるということである。この発明では、この最
も時間かかかる!Il線化を行なわず、2(1M化され
たデータで各線の周辺部のみをチェーンデータ化をして
得ている。このチェーンデータはまだ1画素づつ繋がっ
ているのでデータ量が多く、取扱うには不便である。し
たがって、これを一定の許容誤差により直線近似1し、
2重ベクトルデータとして編集する。これによって、最
初の画像データ量より約1740のデータ量となる。こ
の様にして得られた2重ベクトルデータから、その互い
に隣接する両ベクトルの中心ベクトル、すなわち芯線ベ
クトルを算出すると共に、その線幅を算出する。この場
合、互いに隣接するベクトルの検索は高速に行なわなけ
ればならない。
Figure 3 shows the overall flow of the drawing reading system.
This system measures only binary data of image data. When converting image data into vector data, a general problem is that it takes time to thin lines due to the huge amount of data. This invention takes the most time! Instead of converting the Il line data to 2 (1M), only the peripheral area of each line is converted into chain data.This chain data is still connected pixel by pixel, so the amount of data is large, and it is difficult to handle it. is inconvenient.Therefore, we approximate this by a straight line1 with a certain tolerance,
Edit as double vector data. As a result, the data amount becomes approximately 1740 times larger than the initial image data amount. From the double vector data obtained in this manner, the center vectors of both adjacent vectors, that is, the core line vectors are calculated, and the line widths thereof are calculated. In this case, the search for mutually adjacent vectors must be performed quickly.

このシステムでは、これらベクトルの高速検索にBD)
−リーのデータ構造を用いてその高速性を実現している
。算出された芯線ベクトルは、それぞれの分岐部分まで
連続ベクトルとして構成されているが、原図の線のかす
れや線同士の結合、あるいは文字等による線の分断によ
り、必ずしも図形を構成する線分としては完全ではない
。これら線分の結合は、3つのステップを経て行なう。
This system uses BD) to quickly search these vectors.
- Its high speed is achieved by using Lee's data structure. The calculated core line vectors are constructed as continuous vectors up to each branching part, but due to blurring of the lines in the original drawing, combinations of lines, or divisions of lines by characters, etc., they do not necessarily constitute line segments that constitute a figure. incomplete. The joining of these line segments is performed through three steps.

1つは線分の直線近似である。この目的は、1つはデー
タ量を減らす為と、もう1つは分岐部分のベクトルの方
向を明確にする為である。次のステップでは、これら分
岐部分に注目してレンジサーチを用いながら、各レンジ
内での点をそれぞれ結合する。しかし、この段階ではま
だ、未結合の部分も多く残っているので、次に2重ベク
トル化の段階で求められた内ループの情報から、そのル
ープの周りを構成する芯線ベクトルをレンジサーチで検
索しつつ、その分断部分を2重ベクトルを考慮して補充
して結合する。この処理では閉図形として芯線ベクトル
を編集すると共に、いくつかの閉図形から構成される図
形では、その外周の閉図形のデータも同時に取出してい
る。以上の処理により、最初の画像データから最終的に
は、識別した閉図形データとラインデータとしての芯線
ベクトル及び2重ベクトルデータファイルが次の会話式
編集サブシステムへ伝送される。なお、BDトリーは第
4図(A) 、 (B) に示すように領域を左右、上
下の順番に区分けして2値データとしたものであり、領
域を表現するのに適している。詳しくは電子通信学会論
文誌’83/l。
One is linear approximation of a line segment. The purpose of this is, one, to reduce the amount of data, and the other, to clarify the direction of the vector at the branch part. In the next step, points within each range are combined using a range search focusing on these branching parts. However, at this stage, there are still many unconnected parts, so from the information about the inner loop obtained in the double vectorization stage, the core line vectors forming around that loop are searched by range search. At the same time, the divided portion is supplemented and combined considering the double vector. In this process, the core line vector is edited as a closed figure, and in the case of a figure composed of several closed figures, the data of the closed figure on the outer periphery is also extracted at the same time. Through the above processing, the identified closed figure data, skeleton vectors as line data, and double vector data files are finally transmitted from the first image data to the next interactive editing subsystem. It should be noted that the BD tree is binary data obtained by dividing the area into left, right, top and bottom, as shown in FIGS. 4(A) and 4(B), and is suitable for expressing the area. For details, see the Journal of the Institute of Electronics and Communication Engineers '83/l.

Vol、J66−D No、IO(7)第1193頁乃
至第1199頁に説明されている。
Vol. J66-D No. IO (7), pages 1193 to 1199.

次に、イメージスキャナ3てアナログ図面を読取って得
られるイメージデータを、チェーンデータに変換するこ
の発明の変換アルゴリズムを第5図に示して説明する。
Next, a conversion algorithm of the present invention for converting image data obtained by reading an analog drawing using the image scanner 3 into chain data will be described with reference to FIG.

2値データファイルからステップStで1ブロックデー
タ分だけメモリへ読込む。この時、ステップS2で2値
データファイルが終了かどうかが判断され、途中であれ
ば次のステップへ、終了であればプログラムの終了とな
る。次のステップS3ではブロック間で接合ループデー
タの有無が判断され、接続すべきループが存在している
場合、ステップSlOで接続チェーンデータが追跡され
、ループデータファイルとチェーンデータファイルへそ
れぞれデータを出力する。この処理は全ての接続ループ
データについて行なわれる。接続ループデータが無い場
合、或いは接続ループの処理が終了した場合、次のステ
ップS4へ進み、現ブロック内での新たなループデータ
の開始点の検索を行なう。検索中、ステップS5でブロ
ック終了か否かの判断がされ、ブロック終了であれば次
のブロックデータ読込みのためにステップS1へ戻る。
One block of data is read from the binary data file into the memory in step St. At this time, it is determined in step S2 whether the binary data file is finished, and if it is in the middle, the process goes to the next step, and if it is finished, the program ends. In the next step S3, the presence or absence of joint loop data is determined between blocks, and if there is a loop to be connected, the connected chain data is traced in step SlO, and the data is output to the loop data file and chain data file, respectively. do. This process is performed for all connection loop data. If there is no connection loop data, or if the connection loop processing has ended, the process advances to the next step S4, and a search is made for the starting point of new loop data within the current block. During the search, it is determined in step S5 whether the block has ended or not, and if the block has ended, the process returns to step S1 to read the next block data.

それ以外でループの開始点が検索された場合、ステップ
S6でチェーンデータの追跡が始まる。ここでは、ステ
ップS7でループか当該ブロック内でクローズしたか否
かの判断と、ステップS8でのブロック接続部へ;皇し
たか否かの!!11断h<太れ 又テψJブへ7でJし
一ブが閉じれば、ステップS4の開始チェーンデータの
検索ステップへ戻る。また、ステップS8でブロック接
続部へ達すれば、ステップS9で接続データを作成して
再びステップS4ヘリターンする。
If a loop start point is found in any other case, chain data tracking begins in step S6. Here, in step S7 it is determined whether or not the loop is closed within the block, and in step S8 it is determined whether the loop is closed or not! ! 11 cut h<thickness Return to step ψJ again at 7 and when the first block is closed, return to step S4, the step of searching for start chain data. If the block connection part is reached in step S8, connection data is created in step S9 and the process returns to step S4 again.

すなわち、イメージスキャナ3て第6図に示すようなA
3版の原図を計測する。この場合、A3版ては16トツ
ト/mmで計測するため、約4 M Bのデータ量とな
る。これはパソコンの記憶容量を大きくオーバーするた
め、パソコンでは処理できない。したがって、この発明
では第7図に示すようにデータをブロック化(#1.#
2)して処理する。処理は図形の輪郭線を抽出すること
を目的とし、外側の輪郭線lOは右回りに、内側の輪郭
線llは左回りとしてデータが検出されなければならな
い。このため、ブロック間の接合処理を次のようにして
いる。
That is, the image scanner 3 is A as shown in FIG.
Measure the original drawing for the 3rd edition. In this case, since the A3 size is measured at 16 tots/mm, the amount of data is about 4 MB. This greatly exceeds the computer's storage capacity, so it cannot be processed by the computer. Therefore, in this invention, data is divided into blocks (#1.#
2) and process. The purpose of the processing is to extract the outline of a figure, and data must be detected with the outer outline lO clockwise and the inner outline ll counterclockwise. For this reason, the joining process between blocks is performed as follows.

第8図 (A)に示すように、始点Stからパーツルー
プ1が右回りとして検出され、ブロック接合部B4まで
チェーンデータ化される。次に、始点Slから逆方向に
パーツループ番号999として左回りに81までチェー
ンデータ化される。更に内ループでは、始点S2からパ
ーツループlが左回りとしてB2までチェーンデータ化
されると共に、始点S2から逆方向に今度は右回りで、
パーツループ番号999としてB3までチェーンデータ
化される。このような処理を1ブロツク内のデータ全て
に対して行なう。この場合、1つのループで最初のパー
ツループの方向がそのループの真の方向となり、常に1
から始まる。2番目のブロックでは第8図(B)  に
示すように、最初にブロック接合部B1.B2から順次
処理される。
As shown in FIG. 8(A), the part loop 1 is detected as clockwise from the starting point St, and is converted into chain data up to the block joint B4. Next, chain data is converted counterclockwise from the starting point Sl to part loop number 999 in the opposite direction to 81. Furthermore, in the inner loop, part loop l is turned counterclockwise from the starting point S2 to chain data up to B2, and from the starting point S2, it is turned clockwise in the opposite direction.
Chain data is converted to B3 as part loop number 999. Such processing is performed on all data within one block. In this case, the direction of the first part loop in one loop becomes the true direction of that loop, and always 1
start from. In the second block, as shown in FIG. 8(B), first the block joint B1. It is processed sequentially starting from B2.

この場合、接合部Bでは、その前のブロックでのループ
番号、パーツループ番号が保存され受は継がれる為、 
500以上では減少、1以上では増加して番号がつけら
れる。
In this case, at joint B, the loop number and part loop number of the previous block are saved and the bridge is inherited, so
The number is decreased when it is 500 or more, and it is increased when it is 1 or more.

以上の処理によって、ループ番号、パーツループ番号、
チェーンデータが出力される。このデータはループ番号
、パーツループ番号の順でソートされ、1つのループデ
ータとして並び換えされる。チェーンデータの例を第9
図に示す。すなわち、従来のデータ処理ではデータ量が
膨大なため、ハードウェアによる処理を行なうために高
価となり、輪郭線データのみの取出しであり、データの
並びに規則性がない。これに対し、このシステムではデ
ータをブロック化して処理しているため、ソフトウェア
での処理が可能であり、ブロック化のサイズによっては
膨大なデータ量でも処理可能である。また、輪郭線デー
タのみではなく、外側は左回りのループデータ、内側は
右回りのループデータとして規則正しいデータが得られ
、全てのデータを閉ループとして取出しているため、図
形の最大領域を直ちに得ることができる。
Through the above processing, the loop number, part loop number,
Chain data is output. This data is sorted in the order of loop number and parts loop number, and rearranged as one loop data. Chain data example 9th
As shown in the figure. That is, in conventional data processing, since the amount of data is enormous, processing by hardware is expensive, and only contour data is extracted, with no regularity in the arrangement of the data. On the other hand, this system processes data in blocks, so it can be processed by software, and depending on the size of the blocks, even huge amounts of data can be processed. In addition, not only contour line data, but also regular data such as counterclockwise loop data on the outside and clockwise loop data on the inside is obtained, and since all data is extracted as a closed loop, the maximum area of the figure can be obtained immediately. Can be done.

上述の如くして得られたチェーンデータは、たとえば“
(:OMPIITERGRAP)目C5八ND IMA
GE PROCESSING”8のP286〜293で
示されるような手法で直線化される。こうして直線化さ
れたデータは、たとえば“電子通信学会論文誌”83/
10Vo1.J56−D No、10”のP1193〜
P1200に記載されているような手法で芯線化される
。芯、tJ化データは次に第10図で示すようなフロー
で編集される。ここではライン数(l 1ne−pai
nt)によって処理を分ける。すなわち、ライン数2木
の場合とそれ以上の場合である。また、この処理フロー
は再帰式になっており、ライン数が2本以上でも処理の
過程で2木になった場合も、その後同様な処理を行なう
The chain data obtained as described above is, for example, “
(:OMPIITERGRAP) 目C58ND IMA
GE PROCESSING” 8, pages 286 to 293. The data linearized in this way is
10Vo1. J56-D No. 10” P1193~
It is made into a core wire by the method described in P1200. The core and tJ data are then edited according to the flow shown in FIG. Here, the number of lines (l 1ne-pai
nt). That is, there is a case where the tree has two lines and a case where the number of lines is two or more. Further, this processing flow is recursive, and even if the number of lines is two or more and becomes two trees during the processing process, the same processing is performed thereafter.

芯線ベクトルファイルからステップS20で芯線ベクト
ルが読込まれ、メモリへ格納される。
Skeleton vectors are read from the skeleton vector file in step S20 and stored in memory.

次に、ステップ521で芯線ベクトルの端点から端点ま
での接続したベクトルを検索する。この時、ステップS
22で検索か全て終了していれば、ステップS27て直
線近似2した芯線ベクトルを再びファイルへ出力してプ
ロプラムを終了する。途中ならばステップS23へ移行
し、その連続ベクトルを構成する。構成点数でそれぞれ
分岐する2点である場合は、その後の処理は行なわず、
再びステップ521へ戻る。3点である場合はステップ
S24へ移行し、2つのベクトルの相互角度、ベクトル
長を計算し、ステップS25で未処理としてステップ5
21ヘジヤンプするか、直線近似2をするためにステッ
プ526へ移行し、その後にステップ521ヘジヤンプ
するか、或はステップS33の分岐点処理を行なった後
、ステップ52+へ戻るか否かを判断する。ざらに、4
点以上の場合には、ステップS30で1つ先のベクトル
との関係を先読みして直線近似2処理を行ない、ステッ
プ531て1つの連続ベクトル中の全てのベクトルが終
了するまで続ける。次にステップ532へ進み、直線近
似2した後の構成点数を判定し、もし3点に減少してい
たらステップS24ヘジヤンブし、もしそうでなかった
ならば再びステップ521ヘシヤンブする。
Next, in step 521, a connected vector from end point to end point of the core vector is searched. At this time, step S
If all the searches have been completed in step S22, the core line vector subjected to the linear approximation 2 is outputted again to the file, and the program ends. If it is in the middle, the process moves to step S23 and the continuous vector is constructed. If there are two points that diverge depending on the number of constituent points, no further processing is performed,
The process returns to step 521 again. If there are 3 points, the process moves to step S24, where the mutual angle of the two vectors and the vector length are calculated, and in step S25, the process returns to step 5 as unprocessed.
It is determined whether to jump 21 to 21, move to step 526 to perform linear approximation 2, and then jump to step 521, or return to step 52+ after performing the branch point processing in step S33. Roughly, 4
If the number of vectors is more than a point, in step S30, the relationship with the next vector is read in advance and linear approximation 2 processing is performed, and step 531 is continued until all vectors in one continuous vector are completed. Next, the process proceeds to step 532, where the number of constituent points after linear approximation 2 is determined, and if it has decreased to 3 points, the process proceeds to step S24, and if not, the process proceeds to step S21 again.

パラメータとしてはi+を図(A)及び(B) に示す
ように、処理点(xs、ys)を挟むdsl、ds2の
両ヘクトル長、又(xp、yp)と(xn、yn)へ(
xs、ys)から下した垂線長、又角度α、更には次の
ベクトルの角度βとの合計角度(α+β)、この5つの
パラメータによって処理している。また、ライン数が2
木の場合は、芯線ベクトル計算時に太い線のコーナ一部
において、第12図のように短線のヒゲベクトルが発生
することがよくある。本処理は主にこの様な場合の処理
を対象としている。さらに、ライン数が2本以上の場合
は、ベクトル群は直線部だけでなく曲線部も構成してい
る。直線から曲線へ変化する点を見つけ直線部はてきる
限り直線に、曲線部の線はそのままにしておく処理の必
要がある。その為、本処理では最初にαの角度がDEL
T−ALO以下のものは無条件に削除してしまい、もし
DELT−ALO<α<−DELT−Al1の間であっ
たら、ベクトル長1次角βとの合計角度等を考慮した処
理が行なわれる。それ以外は処理しない。更に円形の角
部が残っているものがある。この様な図形は木来第13
図の様になるべきものであるので、微小辺の両サイドの
直線の交点を求めて断点を発生する。
As shown in Figures (A) and (B), the parameter is i+, which is the hector length of dsl and ds2 that sandwich the processing point (xs, ys), and (xp, yp) and (xn, yn).
Processing is performed using these five parameters: the perpendicular length from xs, ys), the angle α, and the total angle (α+β) with the angle β of the next vector. Also, the number of lines is 2
In the case of trees, when calculating core line vectors, short line whisker vectors often occur at some corners of thick lines, as shown in FIG. This process is mainly intended for such cases. Furthermore, when the number of lines is two or more, the vector group constitutes not only a straight line part but also a curved part. It is necessary to find the point where the line changes from a straight line to a curved line and keep the straight line as straight as possible while leaving the curved line as it is. Therefore, in this process, first the angle of α is DEL
Anything below T-ALO is deleted unconditionally, and if DELT-ALO<α<-DELT-Al1, processing is performed that takes into consideration the total angle with the vector length and primary angle β. . Anything else will not be processed. There are also some that still have circular corners. This kind of shape is the 13th tree
Since it should be as shown in the figure, the intersection point of the straight lines on both sides of the small side is found to generate a breaking point.

上述のような直線近似2は、従来法に比べ次のような特
徴がある。すなわち、従来の直線近似は直線部と曲線部
の区別がないために近似が不十分となり、データ量も余
り削減されない。
Linear approximation 2 as described above has the following features compared to the conventional method. That is, in the conventional linear approximation, there is no distinction between a straight line portion and a curved portion, so the approximation is insufficient, and the amount of data is not reduced much.

また、交差部の曲げ部分の処理ができず、交差部で直交
する結合ができず、直線部と曲線部とを明確に区別する
ことができないのである。これに対し、この発明の直線
近似2方法によれば、直線部と曲線部とを分離して処理
するので直線部のデータ量を大幅に削減でき、交差部の
曲げ部分も処理しているので交差部も直交で結合でき、
直線部と曲線部とが明確になる利点がある。
Furthermore, it is not possible to process bent portions at intersections, orthogonal connections cannot be made at intersections, and straight portions and curved portions cannot be clearly distinguished. On the other hand, according to the second straight line approximation method of the present invention, the straight line portion and the curved portion are processed separately, so the amount of data for the straight line portion can be significantly reduced, and the curved portion at the intersection is also processed. Intersections can also be joined orthogonally,
This has the advantage that straight portions and curved portions are clearly defined.

直線近似された芯線は第14図で示すフローに従って芯
線結合される。
The linearly approximated core wires are combined according to the flow shown in FIG.

ステップ540の処理で芯線ベクトルデータからBDト
リーのデータ構造を構築し、更にステップ541でそれ
ぞれの芯線ベクトルから構成される連続ベクトルの両端
点で、BDトリーのデータ構造を構築する。ステップS
42でこの端点(ノード点)てレンジサーチを行なう。
In step 540, a BD tree data structure is constructed from the skeleton vector data, and in step 541, a BD tree data structure is constructed at both end points of continuous vectors composed of the respective skeleton vectors. Step S
At 42, a range search is performed using this end point (node point).

この時もしステップ543でノード点が全て終了してい
れば、ステップ548ヘジヤンプして芯線結合データフ
ァイルを作成しプログラムを終了する。もし未処理のノ
ード点があればステップS44でそのノード点を中心と
してレンジサーチし、他のノート点が有るか否かを判断
する。もしなければステップ550ヘジヤンプして、既
に処理済みのノート点でレンジサーチを実行し、ステッ
プ551で線関係マトリックス表1を作成する。そして
、ステップ552でこのマトリックス表1を基にカレン
トノート点とサーチノード点を結合する。一方、レンジ
内でノード点が有ればステップS45へ進み、線関係マ
トリックス表2を作成する。更に、このマトリックス表
2を基にステップ54Bで各ベクトル群をグループに分
類し、次にステップ547てグループ毎にノート点同志
を結合し、ステップ542へ再び戻って同様の処理を行
なう。
At this time, if all node points have been completed in step 543, the program jumps to step 548 to create a skeleton connection data file and terminate the program. If there is an unprocessed node point, a range search is performed centering on that node point in step S44, and it is determined whether there are other note points. If not, step 550 jumps to execute a range search using already processed note points, and step 551 creates line relationship matrix Table 1. Then, in step 552, the current note point and the search node point are combined based on this matrix table 1. On the other hand, if there is a node point within the range, the process advances to step S45 and a line relationship matrix table 2 is created. Furthermore, based on this matrix table 2, each vector group is classified into groups in step 54B, then in step 547 note points are connected for each group, and the process returns to step 542 to perform the same processing.

ところで、これまでの処理によって、得られた芯線化の
データは次の様な性質を持っている。
By the way, the core wire data obtained through the processing up to now has the following properties.

■分岐部分てベクトルか分離している。■The branch part is separated into vectors.

■短ベクトルが欠落している。■Short vectors are missing.

■文字、シンボル等の一部データが残存している。■Some data such as characters and symbols remain.

■文字、シンボル以外の小面積図形で、欠落しているも
のかある。
■There are some small-area figures other than letters and symbols that are missing.

■データは単なるベクトルの集合であり、図形としての
認識はされていない。
■Data is simply a collection of vectors and is not recognized as a figure.

本システムの目的は、単なるラスターベクトル変換では
なく、ベクトル化されたデータを意味ある図形として編
集して得る事にある。従って、分岐部分の結合の他、欠
落したベクトルを挿入しつつ閉図形、或いは線図形を得
る事は、重要な処理の一つである。本システムでは、こ
れら処理の為に二つのステップを行なっている。一つは
レンジ結合であり、もう一つはその次に述べるループ結
合である。以下、先ずレンジ結合について述べる。
The purpose of this system is not just raster-vector conversion, but to edit and obtain vectorized data as meaningful figures. Therefore, in addition to merging branch parts, obtaining a closed figure or line figure while inserting missing vectors is one of the important processes. This system performs two steps for these processes. One is range coupling, and the other is loop coupling, which will be described next. Below, range coupling will be described first.

分岐部分は幾つかの独立した図形のベクトルが集中して
いる部分であり、文字等の単ベクトルの残存やベクトル
の欠落等の様々な要素を含んでいる。これらは、単純な
アルゴリズムでの結合では却て誤結合を生じ、誤った図
形を構築してしまう。従って、結合は完全性を追求しつ
つ、未結合部分を減らさなければならない。
A branch part is a part where vectors of several independent figures are concentrated, and includes various elements such as remaining single vectors such as characters and missing vectors. When these are combined using a simple algorithm, erroneous connections occur and incorrect figures are constructed. Therefore, the uncombined parts must be reduced while pursuing completeness.

レンジ結合はあるレンジ内に入った分岐点(ノード)か
ら成る線分をグループ化して、そのグループ毎に各線の
平行性、直交性等の角度、及び距離のパラメータによっ
て、その結合のパターンを決定する。レンジの範囲はノ
ードの点を中心とした一辺2申MSTZEの正方形の領
域と、この点から前方の点、及びその点から左右離れた
点を中心とした同し正方形の最小最大から成る領域を、
第15図の如くレンジサーチの領域としている。このレ
ンジの中には複数のノードが含まれる事になるが、それ
らの成す直線の関係が平行か、直交か、或いは鋭角かは
第16図において、160 ”≦θ≦200°の場合は
逆平行、O≦θ≦20°の場合は同平行、340m≦θ
≦360°の場合は同平行、70°≦θ≦110°の場
合は直交、250°≦θ≦290°の場合は直交とし、
他の場合は全て鋭角として決定する。例えば第17図(
A)では各線の関係は線a〜dに対して、同線を0、逆
方向平行を1.同方向平行を2、直交を3、逆方向鋭角
を4、同方向鋭角を5としてマトリクス化すると同図(
C)のようになる。このマトリクス表に基づいてグルー
プ化が行なわれる。グループの条件としては以下の場合
である。
Range joins group line segments consisting of branch points (nodes) that fall within a certain range, and determine the join pattern for each group based on angles such as parallelism, orthogonality, and distance parameters of each line. do. The range is the area consisting of a square area with side 2 MSTZE centered on the node point, points in front of this point, and the minimum and maximum areas of the same square centered on points left and right away from that point. ,
As shown in FIG. 15, this is a range search area. This range will include multiple nodes, but the relationship between the straight lines formed by these nodes is parallel, orthogonal, or acute angle, as shown in Figure 16. If 160''≦θ≦200°, the opposite is true. Parallel, same parallel if O≦θ≦20°, 340m≦θ
If ≦360°, they are parallel; if 70°≦θ≦110°, they are perpendicular; if 250°≦θ≦290°, they are perpendicular;
In all other cases, the angle is determined as an acute angle. For example, Figure 17 (
In A), the relationship between each line is 0 for lines a to d, 1 for parallel lines in the opposite direction. If you create a matrix with 2 for parallel in the same direction, 3 for perpendicular, 4 for acute angle in the opposite direction, and 5 for acute angle in the same direction, the same figure (
C). Grouping is performed based on this matrix table. The group conditions are as follows.

■同方向の線が有った場合。■When there are lines in the same direction.

■同線が有った場合。■If there is a similar line.

■上記の何れにもあてはまらない場合はグループ数1と
なる。
■If none of the above applies, the number of groups will be 1.

この時、グループ数は、上記条件■、■のそれぞれが最
初に見つかった行での数に1を加えた数となる。こうし
て決定されたグループ数で、次にその親となるノートに
対して、どのノードが最も最短距離にあるかを、線間距
離に依って決定する。第17図(A)〜(C)の場合の
例では、(a、b) 、 (c、e、d)がそれぞれ独
立したグループとなる。グループ化されたノードは、そ
れぞれのパターンに応じて結合処理がされる。現在の処
理ではグループ内で2.3.4点までの結合か可能であ
る。
At this time, the number of groups is the number obtained by adding 1 to the number in the row where each of the above conditions (2) and (2) is first found. With the number of groups thus determined, which node is closest to the next parent note is determined based on the distance between the lines. In the example shown in FIGS. 17(A) to (C), (a, b) and (c, e, d) are independent groups. Grouped nodes are combined according to their respective patterns. With the current processing, it is possible to combine up to 2, 3, or 4 points within a group.

2点結合では、次の様にして処理している。The two-point connection is processed as follows.

■平行線の場合、各ノートの終点座標を結合する。■For parallel lines, combine the end point coordinates of each note.

■直交線の場合、その交点を算出して結合する。■For orthogonal lines, calculate their intersection points and combine them.

■鋭角線の場合、親ノートに結合する。■If it is an acute angle line, join it to the parent note.

3点結合では、次の様にして処理している。The three-point connection is processed as follows.

■平行線と直交線の場合、平行線の終p−に結んだ線と
直交線との交点を結合点とする。
■In the case of parallel lines and perpendicular lines, the point of intersection between the line connected to the terminal p- of the parallel line and the perpendicular line is the joining point.

■直交線と鋭角線の場合、直交線の交点を算出してこれ
を結合点とする。
■In the case of orthogonal lines and acute angle lines, calculate the intersection of the orthogonal lines and use this as the connection point.

■平行線と鋭角線の場合、■と同様にする。■For parallel lines and acute angle lines, do the same as ■.

■全て鋭角線だった場合、その中点を算出して結合点と
する。
■If all the lines are acute angles, calculate the midpoint between them and use it as the joining point.

4点結合では、次のようにして処理している。The four-point connection is processed as follows.

■平行線と直交線の場合、平行線に対し−で直交線の交
点をそれぞれ算出し、これらを結合点とすると共に、そ
の間に新たなベクトルを発生する。
(2) In the case of parallel lines and orthogonal lines, calculate the intersection points of the orthogonal lines with - with respect to the parallel lines, use these as connection points, and generate a new vector between them.

一端か結合されたノードは、その後レンジサーチの対象
からは外される。しかし、こうすると、ノートのサーチ
の順番とそのレンジの範囲により、未処理の部分が残っ
てしまう。従って、最初のレンジサーチて一つもサーチ
されなかった場合は、既存の結合点も対象としてサーチ
し直している。もしこの場合に第18図の例の様な場合
か有ったとしたら、線を分断して新たなベクトルを発生
している。
The nodes that are connected at one end are then excluded from range search targets. However, if you do this, some parts will remain unprocessed depending on the order of note searches and their ranges. Therefore, if the first range search does not find any results, the search is performed again, including existing connection points. If there were a case like the example in FIG. 18 in this case, the line would be divided and a new vector would be generated.

以上の処理に依ってノードの結合を行なっているが、以
下の場合は処理していない。
Although the nodes are connected through the above processing, the following cases are not processed.

■互いに同方向で平行な場合。■When they are parallel to each other in the same direction.

■線間距離か一定量より大きい場合。■When the distance between lines is greater than a certain amount.

■車ベクトルで、その長さが許容値より小さい場合。■If the length of the car vector is smaller than the allowable value.

また、本処理の限界はあくまでノートを中心として処理
しているので、ベクトルの欠落の処理はできない事にあ
る。この処理は、次のループ結合で行なわれる。
Furthermore, the limitation of this processing is that it is not possible to handle missing vectors since it is mainly processed on notes. This process is performed in the next loop connection.

ループ結合はレンジ結合では結合できなかった端点を、
内ループを持つ芯線ベクトルは全て閉図形を構成すると
いう規則をもとに処理する。第19図に示すようにまず
端点を検索し、Aという端点を見つける。そして、Aと
いう端点の周辺をレンジサーチし、内ループを構成する
ベクトルを発見すると、この端点は閉図形を構成するは
ずが、いまだ結合されていないと判断する。次にこの内
ループを中心として、内ループの周辺の芯線ベクトルを
全てレンジサーチする。そして、端点の数を教える。こ
の時に端点の数が偶数ならば、どの端点とどの端点が結
合されるかを端点間の距離によって判断して結合する。
Loop join connects endpoints that could not be joined using range join.
Processing is based on the rule that all core vectors with inner loops constitute a closed figure. As shown in FIG. 19, end points are first searched and end point A is found. Then, when a range search is performed around the endpoint A and a vector forming an inner loop is found, it is determined that this endpoint should form a closed figure, but has not yet been connected. Next, centering around this inner loop, a range search is performed for all core line vectors around the inner loop. Then tell them the number of endpoints. At this time, if the number of endpoints is an even number, which endpoint is to be connected is determined based on the distance between the endpoints, and the endpoints are connected.

また、もし端点数が奇数ならば、どの端点を持つベクト
ルが不要かを判断する。この判断は、この端点を中心と
してレンジサーチし、最初の内グループがサーチされる
かどうかで決定する。
Furthermore, if the number of end points is an odd number, it is determined which end points the vectors have are unnecessary. This determination is made by performing a range search around this end point and determining whether or not the first inner group is searched.

以上によって結合すると同時に、芯線ベクトルを右回り
に検出して閉図形データとしてデータ順序を整える。又
、この時、同ベクトルが2回作られたものと、1回のも
のと、を分類して、外周の閉図形も検出する。芯線結合
前はたとえば第20図(A)のようになっており、上述
の如くして芯線結合すると同図(B)のようになる。従
来の芯線結合では一定のレンジ内に入った端点を結合す
るため、複雑な図形になると誤結線をしていた。また、
レンジ結合のみのために未結合部分が残り、文字やシン
ボル等で分離した部分の処理ができなかった。これに対
し、この発明では各端点によって各線をグループ化して
いるので、複雑な図形でもより適格な結線を行ない得、
レンジ結合にループ結合を付加しているのでより多くの
線を結合でき、完成度が高くなった。また、文字やシン
ボルで分離した線も結合できる利点がある。
At the same time as the above is combined, the skeleton vectors are detected clockwise and the data order is adjusted as closed figure data. Also, at this time, closed figures on the outer periphery are also detected by classifying whether the same vector has been created twice or once. Before the core wires are joined, the result is as shown in FIG. 20 (A), for example, and after the core wires are joined as described above, the result is shown in FIG. 20 (B). Conventional core wire connections connect end points that fall within a certain range, resulting in incorrect connections when complex figures are involved. Also,
Because only range combinations were performed, uncombined parts remained, and parts separated by characters, symbols, etc. could not be processed. In contrast, in this invention, each line is grouped by each end point, so even complex figures can be connected more accurately.
Since loop connections are added to range connections, more lines can be connected, resulting in a higher degree of completion. Another advantage is that lines separated by characters or symbols can be combined.

(発明の効果) 以上のように本発明は、イメージスキャナで読取った膨
大なデータをベクトル化データに変換する過程において
、従来の細線化処理で行なっていた線の両側の画素を順
次削り取って行と、中心の画素のみを取出す手法を行な
わずに、線の両側の画素のみを凄出して、これを一定の
許容差で直線近似したベクトルデータを得るようにして
いるので、膨大なデータでもソフトウェアで迅速に処理
できる様になった。又、このデータを幾つかの区分にブ
ロック化して処理しているため、ブロック化のサイズに
より膨大なデータでも処理が可能となった。更に輪郭線
データのみてなく、外側は左周りのループデータとして
、内側は右周りのループデータとして規則だったデータ
を得ることが出来るので、後の芯線化結合処理において
、原図のかすれや線同士の結合あるいは文字等による線
の分断により不完全な入力図形であっても、こわらの線
分の結合において有効な判断材料を得ることが出来る。
(Effects of the Invention) As described above, in the process of converting a huge amount of data read by an image scanner into vectorized data, the present invention can perform thinning processing by sequentially removing pixels on both sides of a line, which was done in the conventional thinning process. Instead of extracting only the central pixel, we extract only the pixels on both sides of the line and obtain vector data by linearly approximating them with a certain tolerance, so even with a huge amount of data, the software is easy to use. Now it can be processed quickly. In addition, since this data is processed by dividing it into blocks, the size of the blocks makes it possible to process even huge amounts of data. Furthermore, rather than just looking at the contour line data, regular data can be obtained, with the outside as loop data around the left and the inside as loop data around the right. Even if the input figure is incomplete due to the combination of lines or the division of lines by characters or the like, it is possible to obtain effective information for determining the connection of stiff line segments.

更に又、全てのデータを閉ループとして取出しているた
め、図形の最大領域が直ちに得られる利点をも有し、こ
れら一定の大きさの文字データを分離することも可能に
なった。
Furthermore, since all data is extracted as a closed loop, the maximum area of the figure can be obtained immediately, and it is also possible to separate character data of a certain size.

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

第1図はこの発明を適用できる図面読取システムの全体
構成を示す接続図、第2図はイメージスキャナとRAM
との対応関係を示す図、第3図は図面読取システムのデ
ータ処理のフローを示す図、第4図(A)及び(B)は
B[]l−リーを説明するための図、第5図はこの発明
によるイメージデータのチェーンデータへの変換例を示
すフローチャート、第6図〜第9図はデータのブロック
化を説明するための図、第10図はチェーンデータから
芯線化データへの変換例を示すフローチャート、第11
図(八) 、 (B)〜第13図は芯線化を説明するた
めの図、第14図は芯線結合の処理例を示すフローチャ
ート、第15図〜第20図(A) 、 (B)は芯線結
合を説明するための図である。 1・・・パーソナルコンピュータ、2・・・インタフェ
ース、3・・・イメージスキャナ、4・・・IIAMボ
ード、5・・・固定ディスク、6・・・タブレット。 出願人代理人  安 形 雄 三 茶 l 図 準2 図 (A]                CB)甚 4
 図 茶6 因     卒7 図 蔓 5 図 f、4) (β) 甚 6 図 $IO図 (,41 (B) 茶 ll  目 萎f2  因 某158図       茶t6 図 6cde A、(Ah421/2          (cl(B
) $  77  図 某16図 第 13  図
Figure 1 is a connection diagram showing the overall configuration of a drawing reading system to which this invention can be applied, and Figure 2 is an image scanner and RAM.
3 is a diagram showing the data processing flow of the drawing reading system, FIGS. 4 (A) and (B) are diagrams for explaining B[]l-Lee, and The figure is a flowchart showing an example of conversion of image data into chain data according to the present invention, Figures 6 to 9 are diagrams for explaining data blocking, and Figure 10 is a flowchart showing an example of converting image data to chain data according to the present invention. Flowchart showing an example, No. 11
Figures (8) and (B) to Figure 13 are diagrams for explaining core wire formation, Figure 14 is a flowchart showing a processing example of core wire combination, and Figures 15 to 20 (A) and (B) are It is a figure for explaining core wire connection. DESCRIPTION OF SYMBOLS 1...Personal computer, 2...Interface, 3...Image scanner, 4...IIAM board, 5...Fixed disk, 6...Tablet. Applicant's agent Yoshikata Yu Sancha l Reference standard 2 Figure (A) CB) Jin 4
Fig. 6 Fig. 6 Fig. 7 Fig. vine 5 Fig. f, 4) (β) Jin 6 Fig. $IO Fig. (B
) $ 77 Figure 16 Figure 13

Claims (1)

【特許請求の範囲】[Claims] 画像をイメージスキャナで読取って得られるイメージデ
ータをチェーンデータに変換して後に直線近似1し、こ
の直線近似1されたデータを芯線化してから直線近似2
して芯線結合することによってベクトルデータを得るよ
うにした図面データの変換処理方法において、前記イメ
ージデータをチェーンデータに変換する際、2値データ
ファイルから1ブロックデータ分だけ読込み、データ終
了であるか否かを判断した後、ブロック間で接合ループ
データが有るか否かを判断し、前記接合ループデータが
有る場合には接続チェーンデータの追跡を行なってルー
プデータファイル及びチェーンデータファイルへ格納し
、前記接合ループデータが無い場合又は前記追跡が終了
した場合、現ブロック内での新たなループデータの開始
点の検索をブロック終了まで行ない、ブロック終了とな
った場合には前記チェーンデータの追跡を行なうと共に
、当該ブロック内でクローズしたか否かの判断とブロッ
ク接続部へ達したか否かの判断を行ない、接続データの
作成をブロック終了まで繰り返すようになっていること
を特徴とする図面データの変換処理方法。
The image data obtained by reading the image with an image scanner is converted into chain data and then subjected to linear approximation 1. This linear approximation 1 data is converted to a core line and then linear approximation 2 is applied.
In a drawing data conversion processing method in which vector data is obtained by connecting core lines, when converting the image data to chain data, only one block of data is read from the binary data file, and whether the data is complete or not. After determining whether or not there is, it is determined whether or not there is joint loop data between the blocks, and if there is the joint loop data, tracing the connection chain data and storing it in a loop data file and a chain data file, If the spliced loop data does not exist or if the tracking ends, a search for the starting point of new loop data within the current block is performed until the end of the block, and if the block ends, the chain data is traced. At the same time, it is determined whether the block is closed or not and whether the block connection part is reached or not, and the creation of connection data is repeated until the end of the block. Conversion processing method.
JP61129955A 1986-06-04 1986-06-04 Converting/processing method for drawing data Pending JPS62286176A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61129955A JPS62286176A (en) 1986-06-04 1986-06-04 Converting/processing method for drawing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61129955A JPS62286176A (en) 1986-06-04 1986-06-04 Converting/processing method for drawing data

Publications (1)

Publication Number Publication Date
JPS62286176A true JPS62286176A (en) 1987-12-12

Family

ID=15022565

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61129955A Pending JPS62286176A (en) 1986-06-04 1986-06-04 Converting/processing method for drawing data

Country Status (1)

Country Link
JP (1) JPS62286176A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57159363A (en) * 1981-03-26 1982-10-01 Fujitsu Ltd Graphic information inputting system
JPS59128662A (en) * 1983-01-12 1984-07-24 Nec Corp Raster vector converter
JPS6079479A (en) * 1983-10-07 1985-05-07 Nippon Telegr & Teleph Corp <Ntt> Linear graphic encoding method
JPS60215283A (en) * 1984-04-11 1985-10-28 Fujitsu Ltd Polygonal line approximating device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57159363A (en) * 1981-03-26 1982-10-01 Fujitsu Ltd Graphic information inputting system
JPS59128662A (en) * 1983-01-12 1984-07-24 Nec Corp Raster vector converter
JPS6079479A (en) * 1983-10-07 1985-05-07 Nippon Telegr & Teleph Corp <Ntt> Linear graphic encoding method
JPS60215283A (en) * 1984-04-11 1985-10-28 Fujitsu Ltd Polygonal line approximating device

Similar Documents

Publication Publication Date Title
Ekoule et al. A triangulation algorithm from arbitrary shaped multiple planar contours
Siddiqi et al. Geometric shock-capturing ENO schemes for subpixel interpolation, computation and curve evolution
Arcelli et al. A width-independent fast thinning algorithm
JP2608571B2 (en) Apparatus and method for vectorizing input scanned image data
JPH02263277A (en) Method for vectorizing line picture
Hwang et al. Matching of featured objects using relational tables from stereo images
US20020006224A1 (en) Computer automated process for vectorization of raster images
JP3564371B2 (en) Figure editing apparatus and method
JPS62286176A (en) Converting/processing method for drawing data
JPS62286177A (en) Converting/processing method for drawing data
JPH0646408B2 (en) Split image processing method
Samet et al. Quadtree structures for region processing
JPS62257573A (en) Automatic drawing reading system
JPH1049688A (en) Method for partial erasing method and partial detection method for picture data
JP2683026B2 (en) Line figure vectorization device
CN115860034B (en) Decoding method, decoding device, decoding chip and code scanning equipment
Pavlidis et al. Advanced Segmentation Techniques
JP2734107B2 (en) Image data centering processing method
JPH03271871A (en) Segment data processing system
So et al. Invariant line segmentation for object recognition
JP2000113192A (en) Analyzing method for three-dimensional shape data and recording medium
JP2800544B2 (en) Image data centering processing method
Nakajima et al. A graphical structure extracting method from an urban map using parallel vector tracers
JPS6277691A (en) Contour line extracting device
JP2867650B2 (en) Symbol candidate area detection method