JPH0546761A - Method for recognizing kind of line for automatic drawing input device - Google Patents
Method for recognizing kind of line for automatic drawing input deviceInfo
- Publication number
- JPH0546761A JPH0546761A JP3208163A JP20816391A JPH0546761A JP H0546761 A JPH0546761 A JP H0546761A JP 3208163 A JP3208163 A JP 3208163A JP 20816391 A JP20816391 A JP 20816391A JP H0546761 A JPH0546761 A JP H0546761A
- Authority
- JP
- Japan
- Prior art keywords
- vector
- line
- point
- tracking
- segment
- 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
Links
Landscapes
- Image Analysis (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、CAD等に使用される
図面自動入力装置の線種認識方法に関し、特に、線分の
追跡及び線種判断の性能を向上させた線種認識方法に関
する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a line type recognition method for a drawing automatic input device used for CAD or the like, and more particularly to a line type recognition method with improved line segment tracking and line type determination performance.
【0002】[0002]
【従来の技術】図面自動入力装置では、イメージスキャ
ナから入力した2値画像を細線化又は芯線化し、それに
よってベクトルの集合を使用している。この手法による
とデータを圧縮でき、メモリ容量が小さくて済むうえ、
ソフトウェアにより高速に処理を行える利点がある。2. Description of the Related Art In a drawing automatic input device, a binary image input from an image scanner is thinned or cored to thereby use a set of vectors. According to this method, the data can be compressed, the memory capacity is small, and
There is an advantage that processing can be performed at high speed by software.
【0003】画像データの芯線化処理は、まずイメージ
スキャナ等により図6(a)に示すような原図の白と黒
の2値画像を読込み、この2値画像から白と黒の境界を
抽出して輪郭画素列を作成する。この輪郭画素列から、
更に、同図(b)に示す輪郭ベクトル61を生成し、そ
の輪郭ベクトルデータから一対になる2本のベクトルを
検索し、それらの中心線に相当する芯線ベクトル62を
生成する。芯線ベクトル62の生成は2本のベクトルの
ペア性が失われる位置で中断され、この点を中断点63
として記憶しておく。全ての輪郭ベクトル61が検索さ
れると、接続対象となる芯線ベクトル62の領域探索を
行い、所定の領域内に複数の中断点が存在する場合、各
中断点の位置から同図(c)に示すような接続点64を
算出し、その接続点64に基づいて各中断点63を統合
する。複数の中断点を接続処理した場合は、それぞれの
芯線のセクションを統合して1つの芯線セクションとす
る。このようにして芯線化されたデータが得られると、
図面自動入力装置は、それらに基づく破線や鎖線の認識
を行う。ここで、線種の認識は、前記ベクトルの集合か
ら、破鎖線候補となる可能性のあるベクトルをベクトル
の長さを調べることにより検出し、ベクトルの方向,ベ
クトル間の距離,角度の関係等により、線分の追跡を行
い、またその追跡結果で1本の線と見なされたベクトル
の集合を使用して、各ベクトルの長さの分布等により、
まず、破線と鎖線を区別し、次に1点鎖線及び2点鎖線
の線種を判別する。このような線種認識方法について
は、本出願人による特願平2−291379号明細書で
詳細に説明されている。In the image data skeletonization process, first, an image scanner or the like is used to read a binary image of white and black as shown in FIG. 6 (a), and a boundary between white and black is extracted from the binary image. To create a contour pixel row. From this contour pixel row,
Further, a contour vector 61 shown in FIG. 9B is generated, two vectors forming a pair are searched from the contour vector data, and a core vector 62 corresponding to the center line thereof is generated. The generation of the skeleton vector 62 is interrupted at the position where the pairing of the two vectors is lost.
Remember as. When all the contour vectors 61 have been searched, a region search for the core line vector 62 to be connected is performed. If there are a plurality of interruption points within a predetermined area, the position of each interruption point is changed to the position shown in FIG. The connection point 64 as shown is calculated, and each interruption point 63 is integrated based on the connection point 64. When a plurality of interruption points are connected, the respective core wire sections are integrated into one core wire section. When the cored data is obtained in this way,
The drawing automatic input device recognizes broken lines and chain lines based on them. Here, the line type is recognized by detecting a vector that may be a broken line candidate from the set of vectors by examining the length of the vector, the direction of the vector, the distance between the vectors, the relationship between angles, etc. , The line segment is traced, and the set of vectors regarded as one line in the traced result is used to calculate the length distribution of each vector.
First, the broken line and the chain line are distinguished, and then the line types of the one-dot chain line and the two-dot chain line are determined. Such a line type recognition method is described in detail in Japanese Patent Application No. 2-291379 by the present applicant.
【0004】[0004]
【発明が解決しようとする課題】しかしながら、上記従
来の部分追跡方法では、まず追跡基準となるベクトルを
取り出し、その基準ベクトルの端から任意の領域を設定
し、その領域内より連結候補となるベクトルを選出して
いる。その選出方法としては基準ベクトルと候補ベクト
ルとの「距離」,「角度」,「位置関係」及び各ベクト
ルの「方向」等に重点を置いている。従って、鎖線に出
現する如き短い線分の場合、線分の長さがある程度より
も短くなると、芯線の生成時に芯線ベクトルの方向が不
安定になる傾向がある。例えば、図7(a)に示すよう
に比較的長い線分で構成された一点鎖線では、同図
(b)に示す如く短いベクトル70と長いベクトル72
との成す角は小さく、それぞれベクトルの方向性が安定
しているが、同図(c)に示すように比較的短い線分7
4,76で構成された一点鎖線では、長い芯線ベクトル
75と短い芯線ベクトル76の方向が違い過ぎて連結候
補とならず、本来連結候補となるべきベクトルが線分の
一部と認識されないため、ベクトル73,74,75ま
で追跡した後、ベクトル76で線分追跡が中断されてし
まい、線分切り出しの効率が著しく低下し、線種の判断
にも大きく影響する。本発明はこのような課題に鑑みて
創案されたもので、線分の追跡を適確に継続でき、1本
の線としてベクトルのグループ化を効率良く行い、線分
の追跡とそれによる線種判断の性能を向上させる線種認
識方法を提供することを目的としている。However, in the above-mentioned conventional partial tracking method, first, a vector serving as a tracking reference is taken out, an arbitrary area is set from the end of the reference vector, and a vector serving as a link candidate from that area is set. Has been elected. As the selection method, emphasis is placed on “distance”, “angle”, “positional relationship” between the reference vector and the candidate vector, and “direction” of each vector. Therefore, in the case of a short line segment that appears in a chain line, if the length of the line segment is shorter than a certain length, the direction of the core line vector tends to be unstable when the core line is generated. For example, as shown in FIG. 7A, in the alternate long and short dash line composed of relatively long line segments, a short vector 70 and a long vector 72 are shown as shown in FIG. 7B.
Although the angle formed by and is small and the directionality of each vector is stable, as shown in FIG.
In the alternate long and short dash line composed of 4,76, the directions of the long skeleton vector 75 and the short skeleton vector 76 are too different from each other to be a connection candidate, and a vector that should originally be a connection candidate is not recognized as a part of a line segment. After tracing up to the vectors 73, 74, and 75, the line segment tracing is interrupted at the vector 76, the efficiency of segmenting the line segment is significantly reduced, and the determination of the line type is greatly affected. The present invention has been devised in view of such problems, and it is possible to accurately continue tracing line segments, efficiently perform vector grouping as one line, and perform line segment tracing and line types resulting therefrom. It is intended to provide a line type recognition method that improves the performance of judgment.
【0005】[0005]
【課題を解決するための手段】本発明における上記の課
題を解決するための手段は、ベクトルの集合からベクト
ルの「方向」及び「長さ」,ベクトル間の「距離」及び
「角度」の関係により線分の追跡を行い、その結果で1
本の線分と見なされたベクトルの集合より線種を判別す
る図面自動入力装置の線種認識方法において、認識の対
象となる芯線ベクトルの「長さ」情報にしきい値を設
け、しきい値よりも短いベクトルを"点”,しきい値より
も長いベクトルを“線”と分類し、それらの芯線ベクト
ルから線分を追跡する線種認識方法によるものとし、
“点”が連結候補に選出されたときは基準ベクトルの追
跡基準点と“点”との間に想定される部分を“点”の方
向ベクトルとして線分を追跡することを好適とするもの
である。[Means for Solving the Problems] Means for solving the above-mentioned problems in the present invention are as follows: a relation of "direction" and "length" of a vector from a set of vectors, "distance" and "angle" between the vectors. The line segment is traced by and the result is 1
In the line type recognition method of the drawing automatic input device that distinguishes the line type from the set of vectors regarded as the line segments of the book, a threshold is set in the "length" information of the core line vector to be recognized, and the threshold value is set. Vectors shorter than this are classified as "points", vectors longer than the threshold are classified as "lines", and a line type recognition method that traces line segments from those core line vectors is used.
When a "point" is selected as a connection candidate, it is preferable to trace the line segment by using the portion assumed between the reference point and the "point" as the direction vector of the "point". is there.
【0006】[0006]
【作用】本発明は、認識の対象となる芯線ベクトルの
「長さ」と「方向」の情報のうち「長さ」にしきい値を
設定し、しきい値よりも短いベクトルについては“点”
というフラグを立てて線分追跡を行うものである。線分
追跡に際しては、“点”と基準ベクトルの追跡基準点の
間に線分を想定し、この線分を“点”の方向ベクトルと
して線分を追跡する。According to the present invention, a threshold is set for "length" of the information of "length" and "direction" of a core vector to be recognized, and a "point" is set for a vector shorter than the threshold.
The line segment is traced by setting the flag. In tracing the line segment, a line segment is assumed between the "point" and the trace reference point of the reference vector, and the line segment is traced with this line segment as the direction vector of the "point".
【0007】[0007]
【実施例】以下、図面を参照して、本発明の一実施例を
詳細に説明する。図1は、本発明の一実施例の工程図で
ある。同図において、1はベクトルの分類工程、2は線
分の追跡工程、3は線種の判断工程である。ベクトルの
分類工程1は、本発明で特に付加された工程であり、そ
れに基づいて線分の追跡工程2が変更されている。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a process chart of an embodiment of the present invention. In the figure, 1 is a vector classification process, 2 is a line segment tracking process, and 3 is a line type determination process. The vector classifying step 1 is a step particularly added in the present invention, and the line segment tracking step 2 is modified based on it.
【0008】図2は、上記のベクトル分類工程1の一例
を示すフローチャートである。同図に示す如く、本工程
では、線分追跡の対象となる全てのベクトルを1つずつ
取り出してその長さを計算し、予め設定しておいたしき
い値と比較して、短いものは“点”ベクトルとし、長い
ものは“線”ベクトルとして「長さ」の情報を持たせ、
次の線分追跡工程2へ引継ぐ。図3は、その線分追跡工
程2の一例を示すフローチャートである。同図におい
て、フローが開始されると、前記工程1により分類され
たベクトルデータから、追跡の基準となる“線”ベクト
ルを取り出し、その探索領域内に存在するベクトルを探
索する。図4(a)に示すように、この基準ベクトルV
1の探索領域S1内に“線”のベクトルv1,v2が発見
された場合はそれらを候補ベクトルとし、候補ベクトル
v1には基準ベクトルV1との距離L1及び角度θ1を
情報として持たせ、候補ベクトルv2には距離L2及び
角度θ2を情報として持たせて選出する。“点”ベクト
ルが発見された場合には、図4(b)に示すように、当
該基準ベクトルV1の終端を追跡基準点Vp1とし、そ
の追跡基準点Vp1から候補となる“点”P1までの距
離L1を長さとし、基準ベクトルV1との角度θ1を持
つ線分を方向ベクトルとしてVp1−P1間に想定し、
以降の追跡を続行する。例えば、図7の従来例に「長
さ」や“点”の情報を持たせたとしても、それだけでは
短い線分で方向が大きく違っていた場合に連結候補とな
らず、追跡が途切れてしまうが、本実施例では、図5に
示す如く、芯線ベクトル73から追跡を開始して、点7
4〜ベクトル75〜点76〜ベクトル77と追跡を続
け、線種の認識を行うことができる。FIG. 2 is a flow chart showing an example of the above vector classification step 1. As shown in the figure, in this process, all the vectors to be traced by the line segment are taken out one by one, their lengths are calculated, and compared with a preset threshold value, the shorter one is As a "point" vector, a long one is given as a "line" vector with "length" information,
Take over to the next line segment tracking step 2. FIG. 3 is a flowchart showing an example of the line segment tracking step 2. In the figure, when the flow is started, a "line" vector serving as a reference for tracking is taken out from the vector data classified in the step 1, and a vector existing in the search area is searched. As shown in FIG. 4A, this reference vector V
If the "line" vectors v 1 and v 2 are found in the search area S1 of 1 , the candidate vectors are set as candidate vectors, and the candidate vector v 1 has the distance L1 from the reference vector V1 and the angle θ1 as information. The candidate vector v 2 is selected with the distance L2 and the angle θ2 as information. When the "point" vector is found, as shown in FIG. 4 (b), the end of the reference vector V1 as the track reference point Vp 1, a candidate from the tracking reference point Vp 1 "point" P1 the distance L1 to the length Satoshi, a line segment having an angle θ1 of the reference vector V1 assumed between Vp 1 -P1 as the direction vector,
Continue to follow on. For example, even if the information of "length" and "point" is added to the conventional example of FIG. 7, if it is only a short line segment and the direction is greatly different, it will not be a connection candidate and tracking will be interrupted. However, in the present embodiment, as shown in FIG.
The line type can be recognized by continuing the tracking with 4-vector 75-point 76-vector 77.
【0009】[0009]
【発明の効果】以上、説明したとおり、本発明によれ
ば、線分の追跡を適確に継続でき、1本の線としてベク
トルのグループ化を効率良く行い、線分の追跡とそれに
よる線種判断の性能を向上させる線種識別方法を提供す
ることができる。As described above, according to the present invention, it is possible to accurately continue tracing line segments, efficiently perform vector grouping as one line, and trace line segments and the resulting lines. A line type identification method that improves the performance of type determination can be provided.
【図1】本発明の一実施例の工程図。FIG. 1 is a process drawing of an embodiment of the present invention.
【図2】ベクトル分類のフローチャート。FIG. 2 is a flowchart of vector classification.
【図3】線分追跡のフローチャート。FIG. 3 is a flowchart for tracing a line segment.
【図4】線分追跡の説明図。FIG. 4 is an explanatory diagram of line segment tracking.
【図5】線分追跡の説明図。FIG. 5 is an explanatory diagram of line segment tracking.
【図6】線分追跡の説明図。FIG. 6 is an explanatory diagram of tracing a line segment.
【図7】従来例の説明図。FIG. 7 is an explanatory diagram of a conventional example.
1…ベクトルの分類工程、2…線分の追跡工程、3…線
種の判断工程、61,71…輪郭ベクトル、62,7
0,72,73,74,75,76…芯線ベクトル、6
3…中断点、64…接続点、V1…基準ベクトル、v1,
v2…候補ベクトル、点74,76…点ベクトル。1 ... Vector classification process, 2 ... Line segment tracking process, 3 ... Line type determination process, 61, 71 ... Contour vector, 62, 7
0, 72, 73, 74, 75, 76 ... Core line vector, 6
3 ... break point, 64 ... connection point, V 1 ... reference vectors, v 1,
v 2 ... Candidate vector, points 74, 76 ... Point vector.
Claims (2)
及び「長さ」,ベクトル間の「距離」及び「角度」の関
係により線分の追跡を行い、その結果で1本の線分と見
なされたベクトルの集合より線種を判別する図面自動入
力装置の線種認識方法において、認識の対象となる芯線
ベクトルの「長さ」情報にしきい値を設け、しきい値よ
りも短いベクトルを"点”,しきい値よりも長いベクトル
を“線”と分類し、それらの芯線ベクトルから線分を追
跡することを特徴とする図面自動入力装置の線種認識方
法。1. A "direction" of a vector from a set of vectors
And the line length is traced according to the relationship between the "length", the "distance" and the "angle" between the vectors, and the line type is discriminated from the set of vectors regarded as one line segment based on the result. In the line type recognition method of the device, a threshold is set for the "length" information of the core vector to be recognized, a vector shorter than the threshold is a "point", and a vector longer than the threshold is a "line". A line type recognition method for an automatic drawing input device, characterized in that the line segment is traced from those core line vectors.
て、“点”が連結候補に選出されたとき基準ベクトルの
中断点と“点”との間に想定される部分を“点”の方向
ベクトルとして線分を追跡することを特徴とする図面自
動入力装置の線種認識方法。2. The line type recognition method according to claim 1, wherein when a "point" is selected as a connection candidate, a portion assumed between the interruption point of the reference vector and the "point" is a "point". A line type recognition method for an automatic drawing input device, characterized by tracing a line segment as a direction vector.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3208163A JPH0546761A (en) | 1991-08-20 | 1991-08-20 | Method for recognizing kind of line for automatic drawing input device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3208163A JPH0546761A (en) | 1991-08-20 | 1991-08-20 | Method for recognizing kind of line for automatic drawing input device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0546761A true JPH0546761A (en) | 1993-02-26 |
Family
ID=16551701
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3208163A Pending JPH0546761A (en) | 1991-08-20 | 1991-08-20 | Method for recognizing kind of line for automatic drawing input device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0546761A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0781680A2 (en) | 1995-12-27 | 1997-07-02 | Denso Corporation | Power source control apparatus for hybrid vehicles |
-
1991
- 1991-08-20 JP JP3208163A patent/JPH0546761A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0781680A2 (en) | 1995-12-27 | 1997-07-02 | Denso Corporation | Power source control apparatus for hybrid vehicles |
US5789881A (en) * | 1995-12-27 | 1998-08-04 | Denso Corporation | Power source control apparatus for hybrid vehicles |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6128410A (en) | Pattern matching apparatus and method that considers distance and direction | |
RU2001107822A (en) | RECOGNITION OF SIGNS | |
US5065439A (en) | Pattern recognition apparatus | |
JPH0546761A (en) | Method for recognizing kind of line for automatic drawing input device | |
US5596657A (en) | Method of sorting out candidate characters in character recognition system | |
JPH04158482A (en) | Arrow head recognizing device | |
US5426712A (en) | Method and apparatus for describing a character image based on its contours, and for classifying the character image for character recognition based on a resulting contour-based description of the character image | |
JPH01119874A (en) | Drawing recognizing device | |
JPH0540827A (en) | Line type recognition method for automatic drawing input device | |
JP2778483B2 (en) | Design rule verification system | |
JPS63316171A (en) | System for extracting broken line and chain line | |
JPH07193716A (en) | Edge emphasizing device | |
JP2863530B2 (en) | Line image recognition device | |
JPH04260980A (en) | Device for recognizing graphic | |
JP2959054B2 (en) | Line type discrimination method in pattern recognition device | |
JP2894111B2 (en) | Comprehensive judgment method of recognition result in optical type character recognition device | |
JP3077929B2 (en) | Character extraction method | |
JPH05334432A (en) | Method for shaping thin line image | |
JPH02204881A (en) | Pattern-character separating method | |
JP2001092924A (en) | Method and device for recognizing pattern | |
JP2002334301A (en) | Method and program for extracting feature point of binary image | |
JPH07319942A (en) | Method for recognizing line kind in automatic drawing input device | |
JPH04142679A (en) | Dotted line extraction system | |
JPH07134015A (en) | Region dividing method | |
Cheng et al. | Removal of interferential curve from text image |