JPH0394385A - Drawing reader - Google Patents

Drawing reader

Info

Publication number
JPH0394385A
JPH0394385A JP1233675A JP23367589A JPH0394385A JP H0394385 A JPH0394385 A JP H0394385A JP 1233675 A JP1233675 A JP 1233675A JP 23367589 A JP23367589 A JP 23367589A JP H0394385 A JPH0394385 A JP H0394385A
Authority
JP
Japan
Prior art keywords
image
straight line
data
storage means
storing
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
JP1233675A
Other languages
Japanese (ja)
Inventor
Naoya Tanaka
直哉 田中
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP1233675A priority Critical patent/JPH0394385A/en
Publication of JPH0394385A publication Critical patent/JPH0394385A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To easily extract a straight line intersecting with many lines or a circular graphic intersecting with many lines by accurately vectorizing a linear component or a circular graphic component. CONSTITUTION:The drawing reader is constituted of an image input means 1, a binary image storing means 2, a character separating means 3, a thinning processing means 4, a thinned image storing means 5, a feature point extracting means 6, a feature point storing means 7, a straight line extracting means 8, a vector data storing means 9, a circular graphic extracting means 10, and a vectorizing processing means 11. Thereby, highly accurate vectorized data are obtained from a linear component and a circular graphic component. Consequently, the drawing reader with a high recognition ratio for a machine design drawing in which many linear and circular graphic components are written can be obtained.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は手書き作成した機械図面等の図面をスキャナで
読取りCADデータに変換する図面読取り装置に関する
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a drawing reading device that reads drawings such as handwritten mechanical drawings using a scanner and converts them into CAD data.

〔従来の技術〕[Conventional technology]

従来の図面読取り装置について図を参照しながら説明す
る。
A conventional drawing reading device will be explained with reference to the drawings.

第8図は従来の図面読取り装置の構成図である。同図に
おいて従来の図面読取り装置は、スキャナから入力され
た2値画像データを記憶する2値画像記憶手段2と、2
値画像データを細線化処理する細線化処理千段4と、前
記2値画像データから文字成分を検出して分離する文字
分離手段3と、細線化処理手段により細線化された画像
データをベクトルデータ化するベクトル化処理手段9と
、上記のベクトルデータを記憶するベクトルデータ記憶
手段11とを備える。ここで、ベクトルとは細線化画像
を近似する短い線分のことを表わし、ベクトル化処理と
は細線化画像をベクトルの集合で近似表現する処理のこ
とを表わす。
FIG. 8 is a block diagram of a conventional drawing reading device. In the figure, the conventional drawing reading device includes binary image storage means 2 for storing binary image data input from a scanner;
A line thinning process 4 for thinning the value image data, a character separation means 3 for detecting and separating character components from the binary image data, and converting the image data thinned by the line thinning process means into vector data. The vectorization processing means 9 includes vectorization processing means 9 for converting vector data into vector data, and vector data storage means 11 for storing the above-mentioned vector data. Here, a vector refers to a short line segment that approximates a thinned image, and vectorization processing refers to processing that approximates a thinned image by a set of vectors.

次に従来の図面読取り装置による画像のベクトルデータ
化の手順を説明する。スキャナから入力した2値画像デ
ータを細線化処理千段4において細線化処理し、線幅が
1画素の細線化画像データを得る。なお、細線化処理は
従来からHilditchの方法や,Deutchの方
法や,横井の方法や,田村の方法などが知られており、
いずれかの方法が用いられる。次に、文字分離手段3に
おいて細線化画像データの連続成分の大きさがそれぞれ
測定され、もし、この測定値が予め設定しておいた文字
と判断するための基準値,を満たしていれば、その連続
成分を文字とみなして2値画像から分離する。次に、ベ
クトル化処理手段1.1によって細線化画像データにお
いて黒点で表わされている画像を1画素づつ追跡してゆ
き、追跡した軌跡を逐次短い線分で近似してゆく処理を
行い、ベクトル画像を得る。
Next, a procedure for converting an image into vector data using a conventional drawing reading device will be explained. The binary image data inputted from the scanner is thinned in a 1,000-stage thinning process 4 to obtain thinned image data with a line width of 1 pixel. Note that the Hilditch method, Deutch method, Yokoi method, Tamura method, etc. have been known for the thinning process.
Either method is used. Next, the character separation means 3 measures the size of each continuous component of the thinned image data, and if this measured value satisfies a preset standard value for determining that it is a character, The continuous components are regarded as characters and separated from the binary image. Next, the vectorization processing means 1.1 traces the image represented by the black dot in the thin line image data pixel by pixel, and processes the traced trajectory by successively approximating it with shorter line segments. Get a vector image.

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

しかしながら、上述した従来の図面読取り装置は細線化
により歪みが発生することが多いので、精度の良いベク
トルデータを得ることは難しい。
However, in the conventional drawing reading device described above, distortion often occurs due to line thinning, so it is difficult to obtain highly accurate vector data.

特に多数の線と交わるような1本の直線や、多数の線と
交わる円図形を抽出することが難しい。
In particular, it is difficult to extract a single straight line that intersects with many lines, or a circular figure that intersects with many lines.

本発明の目的はこのような問題点を解決し、精度良く直
線成分や円図形成分をベクトル化することの出来る図面
読取り装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to solve these problems and provide a drawing reading device that can vectorize linear components and circular diagram components with high accuracy.

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

本発明の図形読取り装置は、図面を読取って2値の濃度
レlベルを持つ2値画像を作成する画像入力手段と、前
記2値画像を記憶する2値画像記憶手段と、前記2値画
像記憶手段の画像から文字成分を検出して分離する文字
分離手段と、前記文字成分を分離した2値画像を細線化
処理して細線化画像を作成する細線化処理手段と、前記
細線化画像を記憶する細線化画像記憶手段と、前記細線
化画像を入力して端点と分岐点と交点とから戒る特徴点
を検出する特徴点抽出手段と、前記特徴点の座標等の特
徴点データを記憶する特徴点データ記憶手段と、前記特
徴点データを利用して画像領域を制限するHOUGH変
換を用いることにより前記細線化画像記憶手段の細線化
画像から予め設定してあるしきい値を越える長さの直線
成分を抽出しベクトルデータに変換して出力する直線抽
出手段と、前記直線抽出手段の出力を記憶するベクトル
データ記憶手段と、前記ベクトルデータ記憶手段のデー
タを利用して前記細線化画像がら円図形成分の中心点を
検出し前記中心点の位置データをもとに円図形成分を抽
出して前記ベクトルデータ記憶手段に出力する円図形抽
出手段と、前記直線抽出手段と前記円図形抽出手段とで
抽出出来ながった図形成分を抽出しベクトル化して前記
ベクトルデータ記憶手段に出力するベクトル化処理手段
とを備える。
The figure reading device of the present invention includes: an image input means for reading a drawing and creating a binary image having a binary density level; a binary image storage means for storing the binary image; and a binary image storage means for storing the binary image. a character separating means for detecting and separating character components from an image in a storage means; a thinning processing means for creating a thinned image by thinning the binary image from which the character components have been separated; and a thinning processing means for creating a thinned image. a thin line image storage means for storing, a feature point extracting means for inputting the thin line image and detecting feature points from end points, branch points, and intersections; and storing feature point data such as coordinates of the feature points. A length exceeding a preset threshold value is obtained from the thinned image in the thinned image storage means by using a feature point data storage means to store the feature point data, and a HOUGH transformation that limits an image area using the feature point data. a straight line extracting means for extracting a straight line component, converting it into vector data and outputting it; a vector data storage means for storing the output of the straight line extracting means; circular figure extracting means for detecting the center point of a circular figure component, extracting the circle figure forming component based on position data of the center point, and outputting the extracted circle figure component to the vector data storage means; the straight line extracting means; and the circular figure extracting means. and vectorization processing means for extracting the graphic components that could not be extracted in the above steps, vectorizing them, and outputting the vectorized vectors to the vector data storage means.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明による図面読取り装置の一実施例を示す
構或図である。本装置の読取り対象図面は機械設計図面
である。さらに本図面中に使用される文字は英数文字に
限定されているものとする。
FIG. 1 is a structural diagram showing an embodiment of a drawing reading device according to the present invention. The drawings to be read by this device are mechanical design drawings. Furthermore, characters used in this drawing are limited to alphanumeric characters.

画像入力手段1は図面をスキャナで読取り、濃度レベル
が0と1の2値の画像データを出力する。
The image input means 1 reads a drawing with a scanner and outputs binary image data with density levels of 0 and 1.

2値画像記憶手段2は画像入力手段1がら出ヵされる画
像データを記憶する。
Binary image storage means 2 stores image data output from image input means 1.

文字分離手段3は2値画像記憶手段2に記憶された2値
画像(画像データ〉を読みだし、連続成分毎に連続或分
を囲む最小の矩形の長さを計測して、その長さが文字と
判定されるしきい値を満たしているかどうかを判定する
。そして連続或分が文字であるのか,それとも線図形で
あるのかを判定し、文字を画像データから削除する。こ
こでは文字の認識については省略する。
The character separation means 3 reads out the binary image (image data) stored in the binary image storage means 2, measures the length of the minimum rectangle surrounding the continuous component for each continuous component, and determines the length of the rectangle. Determine whether the threshold value for determining it as a character is met.Then, determine whether the continuous segment is a character or a line figure, and delete the character from the image data.Here, character recognition is performed. will be omitted.

細線化処理手段4は2値画像を細線化して細線化画像記
憶手段5に出力する処理であるが、内容は従来技術に準
じている。
The thinning processing means 4 thins a binary image and outputs the thinned image to the thinned image storage means 5, and its contents are based on the conventional technology.

特徴点抽出千段6は細線化画像を入力し、細線化画像中
の連続成分毎に図形を表わす画素値1の画素を追跡して
行く。このとき、1画素毎に追跡画素の周辺の8画素の
画素値のパターンを調べ、端点く図形の端になっている
画素〉と分岐点く図形中で3方に枝分かれしている画素
〉と交差点く図形中で4方に枝分かれしている画素)と
を検出する。これらの点を総称して特徴点と呼ぶことと
する。特徴点の座標位置と種別とどちらの方向に連続し
ているかという情報を第2図に示すような表形式で特徴
点記憶手段7に記憶する。なお、ここで、方向は第3図
に示すように着目画素を中心とした7方向の方向を定め
ている。
The feature point extraction stage 6 inputs the thin line image and tracks pixels with a pixel value of 1 representing a figure for each continuous component in the thin line image. At this time, the pattern of pixel values of 8 pixels around the tracking pixel is examined for each pixel, and the pixel at the end of the figure that is the end point and the pixel that is branching in three directions in the figure that is the branch point are determined. Pixels branching in four directions in a figure at an intersection are detected. These points are collectively referred to as feature points. The coordinate positions and types of the feature points and information on which direction they are continuous are stored in the feature point storage means 7 in a table format as shown in FIG. Note that, as shown in FIG. 3, the directions here are defined as seven directions centered on the pixel of interest.

すべての特徴点を検出した後、直線抽出手段8が画像中
の直線成分を抽出する。直線抽出手段8は特徴点記憶千
段7のデータを利用して前記細線化画像記憶手段5の画
像から高速に精度良い直線抽出を行う。この処理の流れ
を第4図に示す。
After all feature points have been detected, the straight line extraction means 8 extracts straight line components from the image. The straight line extracting means 8 extracts straight lines from the image in the thinned image storing means 5 at high speed and with high precision using the data in the 1,000-stage feature point memory 7. The flow of this process is shown in FIG.

第4図において、まず、特徴点データを特徴点記憶手段
7から読みだし、特徴点間がなるべく離れていて連続方
向が近い2つの特徴点の組を検索ずるくステップ21.
22>。この2つの特徴点の間には直線が存在する可能
性がある。この直線を特徴点データにより領域制限した
HOUGH変換によって抽出する。
In FIG. 4, first, the feature point data is read from the feature point storage means 7, and a set of two feature points whose feature points are as far apart as possible and whose consecutive directions are close are searched for in step 21.
22>. There is a possibility that a straight line exists between these two feature points. This straight line is extracted by HOUGH transformation in which the area is limited by the feature point data.

次に部分領域を設定する(ステップ23)が、この設定
法を第5図を用いて説明する。今、2つの特徴点AとB
が特徴点記憶手段7のデータから検索されたとする。点
Aと点Bを囲み点Aと点Bを結ぶ直線の傾きに合わせた
長方形領域をH O UGH変換領域とする。直線AB
に直交する方向の辺の長さについては、細線化歪によっ
て分岐点Bにずれが生じている可能性があることを考慮
して、適度な長さを設定している。
Next, a partial area is set (step 23), and this setting method will be explained using FIG. Now, two feature points A and B
It is assumed that the following is retrieved from the data in the feature point storage means 7. A rectangular area surrounding points A and B and matching the slope of the straight line connecting points A and B is defined as a H O UGH conversion area. straight line AB
The length of the side in the direction perpendicular to is set to an appropriate length in consideration of the possibility that the branch point B is shifted due to thinning distortion.

次にHOUGH変換を行う(ステップ24)。Next, HOUGH conversion is performed (step 24).

HoucR変換においては、x−y座標で表わされる2
次元空間上の直線mは、直線mに直交し原点を通る直線
がX軸となす角をθ,また直線mと原点との距離をρで
表わすと、(1)式で表わされるが、 p=x−cos  θ + y−sin  θ    
 ・・・・・・く1〉直線上の点を(1〉式によってρ
とθで表わされるパラメータ空間へ変換すると、゛1本
の軌跡で表わされる。
In the HoucR transformation, 2 expressed in x-y coordinates
A straight line m in dimensional space is expressed by equation (1), where θ is the angle that a straight line that is perpendicular to the straight line and passes through the origin makes with the X axis, and ρ is the distance between the straight line m and the origin, and p =x-cos θ + y-sin θ
・・・・・・K1〉 Points on the straight line are expressed as ρ by formula (1〉)
When converted to the parameter space represented by and θ, it is represented by a single locus.

上記のHOUGH変換の性質からx−y空間上で1本の
直線上に存在する点のρ−θ空間上の軌跡はすべて1点
で交差するためこの交点を逆変換すれば直線が抽出出来
る(ステップ25)。
From the properties of the HOUGH transformation described above, the trajectories in the ρ-θ space of points existing on a straight line in the x-y space all intersect at one point, so a straight line can be extracted by inversely transforming this intersection ( Step 25).

ところでHOUGH変換による直線抽出は計算量が膨大
になるので、これを領域制限〈上記のステップ23〉に
より解決している。
By the way, since straight line extraction using HOUGH transformation requires a huge amount of calculation, this problem is solved by region restriction (step 23 above).

次に、特徴点の座標位置からベクトルの始点と終点とを
求め、この値をベクトルデータとして出力する〈ステッ
プ26〉。
Next, the starting point and ending point of the vector are determined from the coordinate position of the feature point, and these values are output as vector data (step 26).

円図形抽出手段10は機械設計図では円図形の中心位置
に中心線の交点がくるように記述するという製図規則を
利用している(第6図)。従って、この製図規則に従っ
ていない図面では適用出来ない。
The circle figure extracting means 10 utilizes a drafting rule that a machine design drawing is described so that the intersection of center lines is located at the center position of a circle figure (FIG. 6). Therefore, it cannot be applied to drawings that do not follow this drafting rule.

次に、円図形抽出処理の流れを説明する。まず、ベクト
ルデータ記憶千段9を調べ、直交する2直線の交点座標
を求める。次に中心位置からの距離をパラメータとして
ヒストグラムをとり(第7図)、そのピーク値を検出す
る。ピーク値が中心位置からの距離に比例するように設
定したしきい値を越えていれば円図形が存在すると判定
する。これで得られた中心位置と半径距離とからベクト
ルデータを生成し、ベク1〜ルデータ記憶手段9に出力
する。
Next, the flow of circular figure extraction processing will be explained. First, the vector data storage stage 9 is examined to find the coordinates of the intersection of two orthogonal lines. Next, a histogram is taken using the distance from the center position as a parameter (FIG. 7), and its peak value is detected. If the peak value exceeds a threshold value set in proportion to the distance from the center position, it is determined that a circular figure exists. Vector data is generated from the center position and radial distance obtained in this manner, and is output to the vector 1 to data storage means 9.

ベクトル化処理手段11は直線抽出手段8と円図形抽出
手段10で検出出来なかった図形成分について従来方法
に準ずる形でベクトル化処理を行い、ベクトルデータ記
憶手段9に出力する。
The vectorization processing means 11 performs vectorization processing on the figure components that could not be detected by the straight line extraction means 8 and the circular figure extraction means 10 in a manner similar to the conventional method, and outputs the result to the vector data storage means 9.

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

以上詳細に述べたように本発明によれば、従来の欠点を
改善した直線成分と円図形成分の精度の良いベクトル化
データを得ることができ、直線成分と円図形或分が多く
記述される機械設計図について認識率の高い図面読取り
装置を提供できる効果がある。
As described in detail above, according to the present invention, it is possible to obtain highly accurate vectorized data of straight line components and circular figure components, which improves the conventional drawbacks, and many straight line components and circle figure parts are described. This has the effect of providing a drawing reading device with a high recognition rate for mechanical design drawings.

装置の例を示す構戒図である。It is a composition diagram showing an example of the device.

1・・・画像入力手段、2・・・2値画像記憶手段、3
・・・文字分離手段、4・・・細線化処理手段、5・・
・細線化画像記憶手段、6・・・特徴点抽出手段、7・
・・特徴点記憶手段、8・・・直線抽出手段、9・・・
ベクトルデータ記憶手段、10・・・円図形抽出手段、
11・・・ベクトル化処理手段。
1... Image input means, 2... Binary image storage means, 3
... Character separation means, 4... Thinning processing means, 5...
・Thinning image storage means, 6...Feature point extraction means, 7.
...Feature point storage means, 8...Line extraction means, 9...
Vector data storage means, 10... circular figure extraction means,
11... Vectorization processing means.

Claims (1)

【特許請求の範囲】[Claims]  図面を読取って2値の濃度レベルを持つ2値画像を作
成する画像入力手段と、前記2値画像を記憶する2値画
像記憶手段と、前記2値画像記憶手段の画像から文字成
分を検出して分離する文字分離手段と、前記文字成分を
分離した2値画像を細線化処理して細線化画像を作成す
る細線化処理手段と、前記細線化画像を記憶する細線化
画像記憶手段と、前記細線化画像を入力して端点と分岐
点と交点とから成る特徴点を検出する特徴点抽出手段と
、前記特徴点の座標等の特徴点データを記憶する特徴点
データ記憶手段と、前記特徴点データを利用して画像領
域を制限するHOUGH変換を用いることにより前記細
線化画像記憶手段の細線化画像から予め設定してあるし
きい値を越える長さの直線成分を抽出しベクトルデータ
に変換して出力する直線抽出手段と、前記直線抽出手段
の出力を記憶するベクトルデータ記憶手段と、前記ベク
トルデータ記憶手段のデータを利用して前記細線化画像
から円図形成分の中心点を検出し前記中心点の位置デー
タをもとに円図形成分を抽出して前記ベクトルデータ記
憶手段に出力する円図形抽出手段と、前記直線抽出手段
と前記円図形抽出手段とで抽出出来なかった図形成分を
抽出しベクトル化して前記ベクトルデータ記憶手段に出
力するベクトル化処理手段とを備えることを特徴とする
図面読取り装置。
image input means for reading a drawing and creating a binary image having a binary density level; binary image storage means for storing the binary image; and detecting character components from the image in the binary image storage means. a thinning processing means for creating a thinned image by thinning the binary image from which the character components have been separated; a thinning image storage means for storing the thinned image; a feature point extraction means for inputting a thin line image and detecting feature points consisting of end points, branch points, and intersections; a feature point data storage means for storing feature point data such as coordinates of the feature points; and a feature point data storage means for storing feature point data such as coordinates of the feature points. By using HOUGH transformation that limits the image area using data, straight line components with a length exceeding a preset threshold are extracted from the thinned image in the thinned image storage means and converted into vector data. a straight line extracting means for outputting the straight line extracting means; a vector data storing means for storing the output of the straight line extracting means; and a center point of the circle diagram component is detected from the thinned image using the data of the vector data storing means. circular figure extracting means for extracting circular figure components based on point position data and outputting them to the vector data storage means; and extracting figure components that could not be extracted by the straight line extracting means and the circular figure extracting means. A drawing reading device comprising vectorization processing means for vectorizing and outputting the vectorized data to the vector data storage means.
JP1233675A 1989-09-07 1989-09-07 Drawing reader Pending JPH0394385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1233675A JPH0394385A (en) 1989-09-07 1989-09-07 Drawing reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1233675A JPH0394385A (en) 1989-09-07 1989-09-07 Drawing reader

Publications (1)

Publication Number Publication Date
JPH0394385A true JPH0394385A (en) 1991-04-19

Family

ID=16958774

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1233675A Pending JPH0394385A (en) 1989-09-07 1989-09-07 Drawing reader

Country Status (1)

Country Link
JP (1) JPH0394385A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5595507B2 (en) * 2010-09-13 2014-09-24 三菱電機株式会社 Air conditioning control device, air conditioning control method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5595507B2 (en) * 2010-09-13 2014-09-24 三菱電機株式会社 Air conditioning control device, air conditioning control method, and program

Similar Documents

Publication Publication Date Title
US5515455A (en) System for recognizing handwritten words of cursive script
US5313528A (en) Method for extracting features from on-line handwritten characters
GB2366108A (en) Vectorization of raster images
JPH0394385A (en) Drawing reader
JP4648084B2 (en) Symbol recognition method and apparatus
JPS622382A (en) Feature extracting devie for pattern
Ishii et al. An automatic recognition system for piping and instrument diagrams
JP3329528B2 (en) Document reader
JPS613287A (en) Graphic form input system
JP2656802B2 (en) Drawing input device
JP2576491B2 (en) Feature extraction method
JPH0658689B2 (en) Line figure separation device
JP2785438B2 (en) Character recognition method
JPH0420228B2 (en)
Sarfraz Outline representation of fonts using genetic approach
JPH02288978A (en) Drawing processing method
JPS59200381A (en) Graphic input device
JPS63213087A (en) Arc extracting system
Parker et al. Recognizing symbols by drawing them
JPH04579A (en) Method for extracting feature point of graphic
JPS6174075A (en) Segment pattern preparing system
JPH05740B2 (en)
JPH0757047A (en) Character segmentation system
JPH0217586A (en) Inclination extracting device
JPH0266681A (en) Drawing processor