JPH05290158A - Skeleton line vectorization processing method for image data - Google Patents

Skeleton line vectorization processing method for image data

Info

Publication number
JPH05290158A
JPH05290158A JP4087388A JP8738892A JPH05290158A JP H05290158 A JPH05290158 A JP H05290158A JP 4087388 A JP4087388 A JP 4087388A JP 8738892 A JP8738892 A JP 8738892A JP H05290158 A JPH05290158 A JP H05290158A
Authority
JP
Japan
Prior art keywords
point
line
points
interruption
core
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.)
Granted
Application number
JP4087388A
Other languages
Japanese (ja)
Other versions
JP2800544B2 (en
Inventor
Masasato Takai
正郷 高井
Hitoshi Kogori
仁 古郡
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP4087388A priority Critical patent/JP2800544B2/en
Publication of JPH05290158A publication Critical patent/JPH05290158A/en
Application granted granted Critical
Publication of JP2800544B2 publication Critical patent/JP2800544B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To provide the method deciding parallelism without using any subjective parameter, in consideration of the difficulty in setting an intersection permissible range as a criterion for deciding whether or not skeleton line vectors are parallel in skeleton line vector connection processing. CONSTITUTION:A point M to be processed as an object of reference line setting and a comparison point N are selected. Data on outline data AA', BB', CC', and DD' used to generate interruption points M and N are obtained. Mid-points S and T of the segments AD and BC are set and the length of the segment ST is found. The lengths of the segments AB and CD are found and compared with each other. The lengths of the shorter segments AB and ST are compared. When ST >= AB, it is decided that the cores M and N are parallel. The segment MN is regarded as the reference line of the point M to be processed. The intersection of the reference lines MN and KL which are thus obtained is regarded as a connection point.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、画像ベクトル化処理
による画像処理方法に係わり、特に芯線ベクトルの中断
点接続技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method based on image vectorization processing, and more particularly to a technique for connecting core line vector break points.

【0002】[0002]

【従来の技術】近年、CAD(コンピュータエイディド
デザイン)の普及に伴って、図面入力装置のニーズが高
まっている。この図面入力装置は、図面や文書などの画
像をイメージスキャナ等で読み取ってCAD等で取り扱
うに適した画像データを得るためのものであり、CAD
等で取り扱うにあたっての簡便性を確保しつつデータ圧
縮を行う点が重要となる。これらの点を満足する画像処
理技術として画像ベクタライズ処理が挙げられる。この
画像ベクタライズ処理では、イメージスキャナ等から読
み込まれた2値化画像データを処理対象とし、画像の輪
郭を抽出して輪郭ベクトルを生成すると共に、その輪郭
ベクトルを用いて芯線ベクトルを生成する。得られたベ
クトルデータは、画像を構成する基本要素(文字・線分
等)を分離してコード化する認識処理等に利用される。
2. Description of the Related Art In recent years, with the spread of CAD (Computer Aided Design), the need for drawing input devices has increased. The drawing input device is used to read an image such as a drawing or a document with an image scanner or the like to obtain image data suitable for handling by CAD or the like.
It is important to perform data compression while ensuring the ease of handling in such cases. An image processing technique that satisfies these points is image vectorization processing. In this image vectorizing process, the binarized image data read from an image scanner or the like is processed, the contour of the image is extracted to generate a contour vector, and the contour vector is used to generate a core line vector. The obtained vector data is used for a recognition process or the like in which basic elements (characters, line segments, etc.) that form an image are separated and coded.

【0003】ここで画像の芯線ベクタライズ処理(芯線
ベクトルの生成処理)について説明する。図14は、芯
線ベクタライズ処理手順の概要を示す。また図15は、
処理の対象となる画像の例を示し、(a)は読み取った
画像(原図)、(b)は芯線ベクトル生成時の画像、
(c)は芯線ベクトル接続後の画像を示す。この処理で
は、まず輪郭ベクトルデータを高速に検索できるように
線情報を構造化したうえで(S1)、芯線ベクトルの生
成処理を行う(S2)。すなわち、2本のペアになる輪
郭ベクトル1を探し出して輪郭ベクトル1のペアの中心
線に相当する芯線ベクトル2を生成する。この処理を輪
郭に沿って連続的に行い、輪郭ベクトルのペアが途切れ
るとその点を中断点3として記憶したうえで、新たに輪
郭ベクトルのペアの探索を開始する。芯線ベクトル2の
生成が終了すると、中断点3の情報を扱い易いように構
造化したうえで(S3)、接続点4を設定して所定の中
断点を接続する(S4)。さらに中断点接続処理の結果
に従って芯線のセクションを改編し、接続された複数の
芯線のセクションを1つに統合する(S5)。
Here, the skeleton vectorization process of the image (skeleton vector generation process) will be described. FIG. 14 shows an outline of the procedure for the core vectorization process. In addition, FIG.
An example of an image to be processed is shown, (a) is a read image (original figure), (b) is an image at the time of core line vector generation,
(C) shows an image after connecting the core vector. In this process, first, the line information is structured so that the contour vector data can be searched at high speed (S1), and then the core line vector generation process is performed (S2). That is, the contour vector 1 forming two pairs is searched for, and the core line vector 2 corresponding to the center line of the pair of contour vectors 1 is generated. This process is continuously performed along the contour, and when the contour vector pair is interrupted, the point is stored as the interruption point 3 and the search for a new contour vector pair is started. When the generation of the skeleton vector 2 is completed, the information of the break point 3 is structured so as to be easily handled (S3), and the connection point 4 is set to connect the predetermined break point (S4). Further, the section of the core wire is reorganized according to the result of the interruption point connection processing, and the plurality of connected core wire sections are integrated into one (S5).

【0004】上記の芯線ベクトルの生成では、中断点接
続の処理精度が処理結果の画像の品質に大きく係わる。
従来の中断点接続処理の1例として特開平3−7478
1号公報記載の技術を挙げると、接続すべき中断点を抽
出するあたって、中断点や輪郭ベクトルの端点を所定の
基準でつなげて、分岐点部分あるいは交差点部分の大枠
に相当するループを作成し、単一のループに属する中断
点を1つに統合することとし、精度の高い中断点接続処
理を可能としている。
In the above-described core line vector generation, the processing accuracy of the break point connection has a great influence on the quality of the image of the processing result.
As an example of conventional break point connection processing, Japanese Patent Laid-Open No. 3-7478
The technology described in Japanese Patent Publication No. 1 is cited. When extracting the break points to be connected, the break points and the end points of the contour vector are connected by a predetermined reference to create a loop corresponding to the outline of a branch point or an intersection. However, the breakpoints belonging to a single loop are integrated into one, which enables highly accurate breakpoint connection processing.

【0005】この後、中断点を接続する接続点の位置を
設定するが、この設定にあたっては、分岐点や交差点に
は直線が含まれていることが多いため、平行な芯線を認
識してそれらの芯線が直線的に接続されるように取り扱
うことが要点となる。上記の従来の技術では、図16に
示すように、接続の対象となる芯線ベクトルをLL′,
MM′,NN′、各芯線の中断点をそれぞれL,M,N
とすると、直線LL′,MM′,NN′の交点A,B,
Cをとり、それぞれの交差角に基づいて各芯線が平行か
否かの判断を行っていた。すなわち、交差角のいずれ
か、たとえば直線MM′,NN′の交差角が180°±
α(αは設定角度)の範囲内である場合、それらの芯線
MM′,NN′は平行であるものと判断し、直線MNと
直線LL′との交点を求めて接続点Rとする(パターン
1)。もし、いずれの交差角も180°±αの範囲から
外れている場合は、三角形ABCの重心を求めて接続点
Rとするものであった(パターン2)。
After that, the position of the connection point connecting the interruption points is set. In this setting, since the branch points and the intersections often include straight lines, the parallel core lines are recognized and they are connected to each other. It is important to handle so that the core wires of are connected linearly. In the above conventional technique, as shown in FIG. 16, the core line vector to be connected is LL ′,
MM ', NN', the interruption points of each core wire are L, M, N respectively.
Then, the intersections A, B, of the straight lines LL ', MM', NN '
Taking C, it was determined whether or not each core wire was parallel based on each intersection angle. That is, one of the intersection angles, for example, the intersection angle of the straight lines MM ′ and NN ′ is 180 ° ±
If α (α is a set angle) is within the range, it is determined that the core lines MM ′ and NN ′ are parallel to each other, and the intersection point between the straight line MN and the straight line LL ′ is obtained and set as the connection point R (pattern. 1). If any of the intersection angles is out of the range of 180 ° ± α, the center of gravity of the triangle ABC is obtained and used as the connection point R (pattern 2).

【0006】[0006]

【発明が解決しようとする課題】上記の従来の技術で
は、パターン1,2のいずれに該当するかで接続点の位
置がかなり異なってしまうため、処理精度を高めるうえ
で、パターン決定のパラメータである角度αの適切な設
定が重要となる。しかしながら角度αは主観的に決定さ
れる値であるので、たとえば試行錯誤的にαを最適化し
ていくといった手法をとらざるを得ず、角度αの最適な
設定には困難が伴う。この点が画像ベクトル化処理の精
度を阻害し、オペレータの負担を増大させる要因の1つ
になっていた。
In the above-mentioned conventional technique, the position of the connection point is considerably different depending on which one of the patterns 1 and 2 is applicable. Therefore, in order to improve the processing accuracy, a parameter for pattern determination is used. Proper setting of a certain angle α is important. However, since the angle α is a value that is subjectively determined, there is no choice but to take a method of optimizing α by trial and error, and it is difficult to optimally set the angle α. This is one of the factors that hinder the accuracy of the image vectorization process and increase the burden on the operator.

【0007】この発明は、このような事情に鑑み、芯線
の接続点の位置を決定する方法において、主観的なパラ
メータを使用せずに適切な位置が得られる方法を提供す
ることを目的とする。
In view of such circumstances, it is an object of the present invention to provide a method for determining the position of a connecting point of a core wire that can obtain an appropriate position without using subjective parameters. ..

【0008】[0008]

【課題を解決するための手段および作用】この発明は、
輪郭ベクトル対を追跡して輪郭ベクトル対の中心に芯線
ベクトルを連続的に設定すると共に、輪郭ベクトル対の
不連続部では芯線ベクトルの端点を中断点とし、この
後、芯線ベクトルの中断点のうちから1つに接続すべき
中断点群を抽出し、該中断点群ごとに芯線ベクトルの接
続点を求めて芯線を統合する方法であって、懸案中断点
群中から芯線同士が平行である一対の中断点を抽出して
当該中断点同士を連結してなる基準線を求め、この基準
線を用いて接続点の位置を設定する方法において、芯線
同士が平行である一対の中断点を抽出するにあたって、
次の手順を採用する。
Means and Actions for Solving the Problems
The contour vector pair is traced and the core line vector is continuously set at the center of the contour vector pair, and at the discontinuity portion of the contour vector pair, the end point of the core line vector is set as an interruption point. A method of extracting a group of discontinuity points to be connected to one of the discontinuity point groups, obtaining connection points of core line vectors for each of the discontinuity point groups, and integrating the core lines. In the method of extracting the interruption points of, the reference line connecting the interruption points and setting the position of the connection point using the reference line, a pair of interruption points in which the core lines are parallel to each other are extracted. At the beginning,
Take the following steps:

【0009】すなわち、まず2つの懸案中断点の生成時
に用いられた2つの輪郭ベクトル対の4端点の位置デー
タを所定のファイルから取り込む。この4端点を頂点と
する四辺形を想定し、この四辺形の辺のうちの中断点を
有する2辺を側辺、他の2辺を上下辺とすると、両側辺
の長さおよび上下辺の中点同士を連結してなる補助線の
長さを求める。この後、この補助線の長さを両側辺のう
ちの短い方の長さと比較し、補助線の方が長いあるいは
両者の長さが等しい場合に中断点の芯線同士が平行であ
ると判定する。
That is, first, the position data of the four end points of the two contour vector pairs used when the two suspension points are generated are loaded from a predetermined file. Assuming a quadrilateral with these four endpoints as vertices, and letting two sides having an interruption point among the sides of this quadrilateral be side sides and the other two sides being upper and lower sides, the length of both side sides and the upper and lower sides are defined. Find the length of the auxiliary line that connects the midpoints. After that, the length of this auxiliary line is compared with the shorter one of both sides, and when the auxiliary line is longer or the lengths of both sides are equal, it is determined that the core lines at the interruption point are parallel to each other. ..

【0010】この判定基準の根拠を説明すると、各中断
点に対応する芯線が大きな交差角をもって交差する位置
関係にある場合、上記の四辺形は両側辺を脚とする台形
に近い形状をとるため、両側辺よりも補助線が短くな
る。逆に芯線が小さな交差角をもって交差する、すなわ
ち平行に近い場合、上記の四辺形は両側辺を底とする台
形あるいは長方形に近い形状をとるため、両側辺のうち
の短い方と比較して補助線が長くなる。このことから補
助線と側辺の大小関係が平行判定の基準となることが判
る。
Explaining the basis of this criterion, when the core lines corresponding to the respective interruption points are in a positional relationship where they intersect at a large intersection angle, the above quadrangle takes a shape close to a trapezoid with both sides as legs. , The auxiliary line is shorter than both sides. On the other hand, if the cores intersect with a small crossing angle, that is, if they are close to parallel, the above quadrilateral takes a trapezoidal shape with bases on both sides or a shape close to a rectangle. The line gets longer. From this, it is understood that the size relationship between the auxiliary line and the side is the reference for parallel determination.

【0011】この芯線化処理方法は、次のような装置に
用いれば好適である。すなわち、懸案中断点群中の各中
断点に対応して基準線を設定する基準線設定手段と、懸
案中断点群に設定された基準線の本数および位置関係に
基づいて芯線ベクトルの接続点を設定する接続点設定手
段とを備えた画像処理装置である。
This method of treating the core wire is suitable for use in the following apparatus. That is, the reference line setting means for setting the reference line corresponding to each interruption point in the pending point group, and the connection point of the core line vector based on the number and the positional relationship of the reference lines set in the pending point group. The image processing apparatus includes a connection point setting unit for setting.

【0012】ここで基準線設定手段は、次の手段を有す
る。
Here, the reference line setting means has the following means.

【0013】(1)懸案中断点について芯線同士が平行
となる中断点が中断点群中に存在するか否かを判定し、
この判定結果に基づいて基準線生成手段を選択する基準
線生成処理選択手段。この基準線生成処理選択手段は、
次の手段を有する。a)判定の対象となる2つの中断点
に対応する輪郭ベクトル対の端点の位置データを取り込
むデータ取り込み手段。b)上記の四辺形の両側辺の長
さおよび上下辺の中点同士を連結してなる補助線の長さ
を算出する算出手段。c)補助線の長さを両側辺の長さ
と比較し、比較結果に基づいて中断点の芯線同士が平行
であるか否かを判定する判定手段。
(1) Concerning a pending break point It is judged whether or not there is a break point in which core lines are parallel to each other in the break point group,
Reference line generation processing selection means for selecting the reference line generation means based on this determination result. This reference line generation processing selection means is
It has the following means. a) Data fetching means for fetching the position data of the end points of the contour vector pair corresponding to the two interruption points to be judged. b) Calculation means for calculating the length of both sides of the quadrangle and the length of an auxiliary line formed by connecting the midpoints of the upper and lower sides. c) A determining means that compares the length of the auxiliary line with the lengths of both sides and determines whether or not the core lines at the interruption points are parallel to each other based on the comparison result.

【0014】(2)芯線同士が平行となる中断点がある
場合に選択され、当該中断点および懸案中断点の連結線
を基準線とする第1の基準線生成手段。
(2) A first reference line generating means which is selected when there is an interruption point where the core lines are parallel to each other and which uses the connection line of the interruption point and the suspension point as a reference line.

【0015】(3)芯線同士が平行となる中断点がない
場合に選択され、懸案中断点の芯線の延長線に相当する
直線を基準線とする第2の補助線生成手段。
(3) Second auxiliary line generating means which is selected when there is no break point at which the core lines are parallel to each other and which uses a straight line corresponding to an extension line of the core line of the pending break point as a reference line.

【0016】(4)懸案中断点群中のすべての中断点に
基準線が設定された後に動作し、複数の基準線の端点と
なっている中断点を基準線限定候補点として探索する探
索手段。
(4) Searching means which operates after the reference lines are set at all the interruption points in the pending interruption point group and searches for the interruption points which are the end points of the plurality of reference lines as the reference line limitation candidate points. ..

【0017】(5)基準線限定候補点が複数存在する場
合に動作して、各基準線限定候補点に係る基準線をそれ
ぞれ1本に限定するものであって、複数の基準線のうち
から芯線との交差角が最も小さい基準線を残すべき基準
線として選択する基準線限定手段。
(5) The operation is performed when there are a plurality of reference line limitation candidate points, and the number of reference lines relating to each reference line limitation candidate point is limited to one, respectively. Reference line limiting means for selecting a reference line having the smallest intersection angle with the core line as a reference line to be left.

【0018】一方、接続点設定手段は、次の手段を有す
る。
On the other hand, the connection point setting means has the following means.

【0019】(1)基準線の本数に基づいて接続点生成
手段を選択する接続点生成処理選択手段。
(1) Connection point generation processing selection means for selecting connection point generation means based on the number of reference lines.

【0020】(2)基準線が1本の場合に選択され、基
準線の中点を接続点とする第1の接続点生成手段。
(2) A first connection point generating means which is selected when the number of reference lines is one and uses the midpoint of the reference line as the connection point.

【0021】(3)基準線が2本の場合に選択され、基
準線の交点を接続点とする第2の接続点生成手段。
(3) A second connection point generating means which is selected when the number of reference lines is two and which has connection points at the intersections of the reference lines.

【0022】(4)基準線が3本以上の場合に選択さ
れ、3本の基準線を選択してそれらの交点を頂点とする
三角形の内部の点を接続点とする第3の接続点生成手
段。
(4) A third connection point is selected when three or more reference lines are selected, and three reference lines are selected and the points inside the triangle having their intersections as vertices are the connection points. means.

【0023】[0023]

【実施例】以下、この発明の実施例を説明する。Embodiments of the present invention will be described below.

【0024】この発明の一実施例に係る画像処理装置の
システム構成の要部を図2に示す。4はポインティング
デバイス5その他からの入力を取り込む入力インタフェ
ース、6はCRT(カソードレイチューブ)装置、7は
表示制御を行う表示インタフェース、8は外部記憶装
置、9は外部記憶インタフェース、10は外部システム
との間で画像データ等の伝送を行う通信制御インタフェ
ース、11はCPU(中央処理装置)である。12はメ
インメモリであり、この実施例に係る芯線ベクタライズ
処理その他のプログラム等を格納している。前述のよう
に芯線ベクトライズ処理では、不連続箇所(中断点)を
含む芯線ベクトルを生成し、この後、中断点接続処理を
行って芯線ベクトルの不連続部分を接続する。この中断
点接続処理では、まず前段の処理で得られた複数の中断
点を1つに接続すべきもの同士でグループ化し、各グル
ープに関するデータを使用して接続点の位置を計算す
る。この実施例では、まず他の芯線との位置関係を考慮
して芯線を延長したものに相当する基準線を中断点ごと
に設定し、この後、この基準線を用いて接続点の位置を
計算することとしている。
FIG. 2 shows a main part of the system configuration of the image processing apparatus according to the embodiment of the present invention. Reference numeral 4 is an input interface for receiving inputs from the pointing device 5 and the like, 6 is a CRT (cathode ray tube) device, 7 is a display interface for display control, 8 is an external storage device, 9 is an external storage interface, and 10 is an external system. Reference numeral 11 denotes a CPU (central processing unit), which is a communication control interface for transmitting image data and the like. Reference numeral 12 is a main memory, which stores the core vectorization processing and other programs according to this embodiment. As described above, in the skeleton vectorizing process, a skeleton vector including a discontinuity (interruption point) is generated, and after that, a discontinuation point connection process is performed to connect discontinuities in the skeleton vector. In this break point connection processing, first, the plurality of break points obtained in the preceding process are grouped into those that should be connected into one, and the position of the connection point is calculated using the data regarding each group. In this embodiment, first, a reference line corresponding to an extension of the core wire is set for each interruption point in consideration of the positional relationship with other core wires, and then the position of the connection point is calculated using this reference line. I am going to do it.

【0025】基準線設定処理手順の概略を図1に示す。
また基準線設定の例を図3〜5に示す。図3の例を用い
て説明すると、まずCPUは、対象とする中断点グルー
プの中から基準線設定の対象として中断点(以下処理対
象点という)を1つ選択すると共に、他の中断点(以下
比較点という)を1つ選択する(S1)。処理対象点と
して中断点Mを、比較点として中断点Nを選択したとす
ると、次に中断点M,Nの生成に用いられた輪郭ベクト
ルAA′,BB′,CC′,DD′のデータを取得する
(S2)。なお、各中断点に関するデータとして、中断
点生成の際に使用した輪郭ベクトルのデータがあらかじ
め用意されている。そして取得した輪郭ベクトルのデー
タを用いて芯線M,Nが平行か否かの判定を行う(S
3)。
The outline of the reference line setting processing procedure is shown in FIG.
An example of setting the reference line is shown in FIGS. Explaining using the example of FIG. 3, first, the CPU selects one interruption point (hereinafter referred to as a processing target point) as a reference line setting target from the target interruption point group, and at the same time, determines another interruption point ( One of the comparison points will be selected (S1). Assuming that the interruption point M is selected as the processing target point and the interruption point N is selected as the comparison point, the data of the contour vectors AA ′, BB ′, CC ′, DD ′ used for generating the interruption points M, N are obtained next. Obtain (S2). As the data on each break point, the data of the contour vector used when the break point is generated is prepared in advance. Then, it is determined whether or not the core lines M and N are parallel using the acquired contour vector data (S
3).

【0026】この判定では、まず線分AD,BCの中点
S,Tをとり、線分STの長さを求める。次に線分A
B,CDの長さをそれぞれ求めてその長さを比較する。
そして短い方(ここでは線分AB)と線分STの長さを
比較する。この結果、ST≧ABであれば芯線M,Nは
平行であると判定し、ST<ABであれば芯線M,Nは
平行でないと判定する。
In this determination, first, the midpoints S and T of the line segments AD and BC are taken and the length of the line segment ST is obtained. Next, line segment A
The lengths of B and CD are obtained and the lengths are compared.
Then, the length of the shorter one (here, the line segment AB) and the length of the line segment ST are compared. As a result, if ST ≧ AB, it is determined that the cores M and N are parallel, and if ST <AB, it is determined that the cores M and N are not parallel.

【0027】芯線M,Nが平行である場合(S4:Ye
s)、線分MNをとって処理対象点Mの基準線として設
定する(S5)。もしも芯線M,Nが平行でない場合は
(S4:No)、他の中断点を探して比較点として選択
し(S6,7)、再び平行判定を行って処理対象Mにつ
いて基準線を設定する。
When the cores M and N are parallel (S4: Ye
s), the line segment MN is taken and set as the reference line of the processing target point M (S5). If the core lines M and N are not parallel (S4: No), another interruption point is searched for and selected as a comparison point (S6, 7), and parallel determination is performed again to set a reference line for the processing target M.

【0028】ここで図4に示すようにどの比較点を選択
しても芯線が平行となる組み合わせがない場合(S6:
No)、次の手順で基準線を設定する(S8)。処理対
象点がMであるとすると、まず中断点Nを比較点として
選択する。そして処理対象点Mに対応する輪郭ベクトル
端点A,Bにおける輪郭ベクトルの芯線ベクトルがある
側の角度(ここでは∠A′AD(優角),∠B′BC
(劣角))を求める。次に∠A′AD,∠B′BCの大
きさを比較して小さい方の角度(∠B′BC)を選択す
る。そして輪郭ベクトルAA′に対して∠B′BCと同
じ角度をなす直線AA″をとり、直線AA′,BCの交
点Pを求めて線分MPを処理対象点Mの基準線として設
定する。同様にして処理対象点Nについても基準線NQ
を設定する。
Here, as shown in FIG. 4, when no comparison point is selected, there is no combination in which the core lines are parallel (S6:
No), the reference line is set by the following procedure (S8). Assuming that the processing target point is M, the interruption point N is first selected as a comparison point. Then, the angles on the side where the core vector of the contour vector at the contour vector end points A and B corresponding to the processing target point M is present (here, ∠A′AD (superior angle), ∠B′BC.
(Inferior angle)). Next, the sizes of ∠A′AD and ∠B′BC are compared and the smaller angle (∠B′BC) is selected. Then, a straight line AA ″ that makes the same angle as ∠B′BC with respect to the contour vector AA ′ is taken, the intersection point P of the straight lines AA ′ and BC is obtained, and the line segment MP is set as the reference line of the processing target point M. Also for the processing target point N, the reference line NQ
To set.

【0029】このようにして各中断点について基準線を
順次設定していき(S9,10)、すべての中断点につ
いて基準線が設定し終わると(S10:No)、必要に
より基準線整理を行ったうえで接続点計算に進む。すな
わち、まず複数の基準線の端点である中断点を検出し、
そのような中断点がない場合あるいは1つだけある場合
は(S11:No)、基準線整理を行わずに基準線設定
処理を終了する。もし、上記の条件を満たす中断点が複
数ある場合は(S11:Yes)、基準線整理を行う
(S12)。図5に示す例では、上記の条件を満たす中
断点としてL,Mがある。中断点Lについて説明する
と、中断点Lを端点とする基準線は線分LM,LNであ
る。そこで輪郭ベクトルCC′(あるいはDD′)に対
する線分LM,LNの交差角を求めてその大きさを比較
する。そして交差角の小さい(ほぼ0°)の線分LMを
基準線として残し、基準線LNを削除する。同様に中断
点Mについても基準線KMを削除する。この結果、基準
線は線分JP,LMの2本に整理される。
In this way, the reference line is sequentially set for each interruption point (S9, 10), and when the reference lines have been set for all the interruption points (S10: No), the reference line is arranged if necessary. Then proceed to the connection point calculation. That is, first, the break point which is the end point of the plurality of reference lines is detected,
If there is no such interruption point or if there is only one (S11: No), the reference line setting process is terminated without performing the reference line arrangement. If there are a plurality of break points satisfying the above condition (S11: Yes), the reference line is arranged (S12). In the example shown in FIG. 5, L and M are break points that satisfy the above conditions. Explaining the interruption point L, the reference lines having the interruption point L as an end point are line segments LM and LN. Therefore, the crossing angles of the line segments LM and LN with respect to the contour vector CC '(or DD') are obtained and their sizes are compared. Then, the line segment LM having a small intersection angle (approximately 0 °) is left as the reference line, and the reference line LN is deleted. Similarly, for the interruption point M, the reference line KM is deleted. As a result, the reference line is organized into two line segments JP and LM.

【0030】この後、上記のようにして得られた基準線
を用いて接続点計算を行う。接続点計算手順の概略を図
6に示す。また接続点計算の例を図7〜13に示す。こ
の処理ではCPUは、まず基準線の本数を確認し(S
1)、その本数に応じて所定の計算方式を選択する。す
なわち、基準線が1本の場合、図7に示すように、基準
線MNの中点を求めて接続点Rとする(S2)。基準線
が2本の場合、図8〜12の各例のように、2本の基準
線の交点を求めて接続点Rとする(S3)。基準線が3
本の場合、図13に示すように、基準線KN,JM,L
Oが互いに交わる点U,V,Wを求め、これらの点U,
V,Wを頂点とする三角形の重心を求めて接続点Rとす
る(S4)。なお、3本の基準線が一点で交わる場合、
その交点を接続点Rとする。基準線が4本以上の場合、
基準線から3本を選択したうえで(S5)、基準線が3
本の場合と同様に交差部分の三角形の重心を接続点とす
る。3本の基準線を選択するにあたっては、まず基準線
同士の交差角を求め、交差角が90°に最も近い基準線
の対を求める。そしてこの対から一方の基準線を選択
し、選択した基準線との交差角が45°に最も近い基準
線を求める。これにより交差部分の三角形が直角二等辺
三角形に最も近い3本の基準線の組み合わせが得られ
る。このようにして得られた3本の基準線を用いて接続
点を求める。
After that, the connection point is calculated using the reference line obtained as described above. The outline of the connection point calculation procedure is shown in FIG. Further, examples of connection point calculation are shown in FIGS. In this process, the CPU first confirms the number of reference lines (S
1) Select a predetermined calculation method according to the number. That is, when the number of reference lines is one, as shown in FIG. 7, the midpoint of the reference line MN is obtained and set as the connection point R (S2). When the number of reference lines is two, the intersection of the two reference lines is obtained and set as the connection point R as in each example of FIGS. 8 to 12 (S3). Baseline is 3
In the case of a book, as shown in FIG. 13, reference lines KN, JM, L
The points U, V, W at which O intersects with each other are obtained.
The center of gravity of a triangle having V and W as vertices is calculated and set as the connection point R (S4). In addition, when three reference lines intersect at one point,
The intersection is defined as the connection point R. If there are 4 or more reference lines,
After selecting 3 lines from the reference line (S5), the reference line is 3
As in the case of the book, the center of gravity of the triangle at the intersection is used as the connection point. In selecting the three reference lines, the intersection angle between the reference lines is first obtained, and the pair of reference lines having the closest intersection angle of 90 ° is obtained. Then, one reference line is selected from this pair, and the reference line whose intersection angle with the selected reference line is closest to 45 ° is obtained. This gives a combination of the three reference lines whose intersection triangle is closest to the isosceles right triangle. A connection point is obtained using the three reference lines thus obtained.

【0031】[0031]

【発明の効果】以上説明したようにこの発明によれば、
芯線ベクトルを接続する際、芯線同士が平行か否かを判
定するにあたって、2つの懸案中断点の生成時に用いら
れた2つの輪郭ベクトル対の4端点を頂点とする四辺形
を想定し、この四辺形における補助線と所定の辺の大小
関係を判定基準とする。したがって芯線ベクトルの交差
角などを考慮せずに芯線の平行判定が可能となるため、
交差角の許容範囲等の設定が不要となる。それゆえ交差
角の許容範囲の設定に伴う処理精度の低下やオペレータ
の負担増を解消できる。
As described above, according to the present invention,
When connecting skeleton vectors, in deciding whether or not skeletons are parallel to each other, a quadrangle having four endpoints of two contour vector pairs used at the time of generating two suspension points as vertices is assumed, The size of the auxiliary line in the shape and the size of the predetermined side is used as the criterion. Therefore, since it is possible to determine the parallelism of the core lines without considering the intersection angle of the core line vectors,
It is not necessary to set the allowable range of the intersection angle. Therefore, it is possible to eliminate a decrease in processing accuracy and an increase in operator's burden due to the setting of the allowable range of the intersection angle.

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

【図1】この発明の一実施例に係る基準線設定手順の概
略を示すフローチャート。
FIG. 1 is a flowchart showing an outline of a reference line setting procedure according to an embodiment of the present invention.

【図2】図1の実施例に係る画像処理装置のシステム構
成の要部を示すブロック図。
FIG. 2 is a block diagram showing a main part of a system configuration of the image processing apparatus according to the embodiment of FIG.

【図3】基準線設定例を示す説明図。FIG. 3 is an explanatory diagram showing a reference line setting example.

【図4】基準線設定例を示す説明図。FIG. 4 is an explanatory diagram showing a reference line setting example.

【図5】基準線設定例を示す説明図。FIG. 5 is an explanatory diagram showing a reference line setting example.

【図6】接続点計算手順の概略を示すフローチャート。FIG. 6 is a flowchart showing an outline of a connection point calculation procedure.

【図7】接続点設定例を示す説明図。FIG. 7 is an explanatory diagram showing a connection point setting example.

【図8】接続点設定例を示す説明図。FIG. 8 is an explanatory diagram showing a connection point setting example.

【図9】接続点設定例を示す説明図。FIG. 9 is an explanatory diagram showing a connection point setting example.

【図10】接続点設定例を示す説明図。FIG. 10 is an explanatory diagram showing a connection point setting example.

【図11】接続点設定例を示す説明図。FIG. 11 is an explanatory diagram showing a connection point setting example.

【図12】接続点設定例を示す説明図。FIG. 12 is an explanatory diagram showing a connection point setting example.

【図13】接続点設定例を示す説明図。FIG. 13 is an explanatory diagram showing a connection point setting example.

【図14】芯線ベクタライズ処理手順の概略を示すフロ
ーチャート。
FIG. 14 is a flowchart showing an outline of a skeleton vectorizing process procedure.

【図15】画像の例を示す説明図。FIG. 15 is an explanatory diagram showing an example of an image.

【図16】従来の接続点設定例を示す説明図。FIG. 16 is an explanatory diagram showing a conventional connection point setting example.

【符号の説明】[Explanation of symbols]

1…輪郭ベクトル 2…芯線ベクトル 3…中断点 5…ポインティングデバイス 6…CRT 8…外部記憶装置 10…通信制御インタフェース 11…CPU 12…メインメモリ 1 ... Contour vector 2 ... Core vector 3 ... Interruption point 5 ... Pointing device 6 ... CRT 8 ... External storage device 10 ... Communication control interface 11 ... CPU 12 ... Main memory

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 輪郭ベクトル対を追跡して輪郭ベクトル
対の中心に芯線ベクトルを連続的に設定すると共に、輪
郭ベクトル対の不連続部では芯線ベクトルの端点を中断
点とし、この後、芯線ベクトルの中断点のうちから1つ
に接続すべき中断点群を抽出し、該中断点群ごとに芯線
ベクトルの接続点を求めて芯線を統合する方法であっ
て、懸案中断点群中から芯線同士が平行である一対の中
断点を抽出して当該中断点同士を連結してなる基準線を
求め、この基準線を用いて接続点の位置を設定する方法
において、 芯線同士が平行である一対の中断点を抽出するにあたっ
て、2つの懸案中断点の生成時に用いられた2つの輪郭
ベクトル対の4端点の位置データを用意し、この4端点
を頂点とする四辺形の辺のうちの前記中断点を有する2
辺を側辺、他の2辺を上下辺とすると両側辺の長さおよ
び上下辺の中点同士を連結してなる補助線の長さを求
め、この補助線の長さを両側辺のうちの短い方の長さと
比較し、補助線の方が長いあるいは両者の長さが等しい
場合に中断点の芯線同士が平行であると判定することを
特徴とする画像データの芯線化処理方法。
1. A contour vector pair is traced to continuously set a core line vector at the center of the contour vector pair, and at the discontinuity portion of the contour vector pair, an end point of the core line vector is set as an interruption point. A method of extracting a group of interruption points to be connected to one of the interruption points, obtaining connection points of the core line vector for each of the interruption points, and integrating the core lines. In the method of extracting a pair of break points that are parallel to each other and obtaining a reference line formed by connecting the break points, and setting the position of the connection point using this reference line. In extracting a break point, position data of four endpoints of two contour vector pairs used when generating two pending break points is prepared, and the break point of the sides of the quadrangle having the four endpoints as vertices. Having 2
If the side is the side and the other two sides are the upper and lower sides, the length of both sides and the length of the auxiliary line formed by connecting the midpoints of the upper and lower sides are calculated. Of the auxiliary line is longer or the lengths of the two are equal to each other, it is determined that the core lines at the interruption point are parallel to each other.
JP4087388A 1992-04-09 1992-04-09 Image data centering processing method Expired - Fee Related JP2800544B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4087388A JP2800544B2 (en) 1992-04-09 1992-04-09 Image data centering processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4087388A JP2800544B2 (en) 1992-04-09 1992-04-09 Image data centering processing method

Publications (2)

Publication Number Publication Date
JPH05290158A true JPH05290158A (en) 1993-11-05
JP2800544B2 JP2800544B2 (en) 1998-09-21

Family

ID=13913511

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4087388A Expired - Fee Related JP2800544B2 (en) 1992-04-09 1992-04-09 Image data centering processing method

Country Status (1)

Country Link
JP (1) JP2800544B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210044A (en) * 2010-03-30 2011-10-20 Dainippon Screen Mfg Co Ltd Line drawing processor, line drawing processing method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210044A (en) * 2010-03-30 2011-10-20 Dainippon Screen Mfg Co Ltd Line drawing processor, line drawing processing method, and program

Also Published As

Publication number Publication date
JP2800544B2 (en) 1998-09-21

Similar Documents

Publication Publication Date Title
US6317864B1 (en) System and method for graphic layout modification
US5309521A (en) Method and apparatus for generating a character curve by dividing and developing a bezier curve
US5179645A (en) Method of recognizing overlapped graphics in each degree of overlapping thereof
JPH03152670A (en) Graphic processor
JPH0962850A (en) Axial symmetry graphic shaping device and method for generating axial symmetry graphic for entirety of arbitrary number of symmetry axes
US20040032976A1 (en) Method and apparatus for matching streaked pattern image
JP2800544B2 (en) Image data centering processing method
JPH0721224A (en) Graphic correction method
JPH0512442A (en) Line image tracking method
JP2536398B2 (en) How to fix printed wiring pattern corner
JPH01126717A (en) Linear graphic input device
JPH10269267A (en) Method for extracting mask layout parameter
JP2734107B2 (en) Image data centering processing method
JPH06119448A (en) Image processing method
US5416894A (en) Method for determining a candidate of a branched direction of a linear image
JP4004217B2 (en) Image processing device
JP2789604B2 (en) Multi-area input device
JPH1091781A (en) Core line processing method for picture data in drawing inputting device
JPH0830782A (en) Coring processing method for image data
JPH02146681A (en) Contour line extracting system
JP2988024B2 (en) Line image collation device
JPH10222661A (en) Drawing recognizing device
JP2867650B2 (en) Symbol candidate area detection method
JPH06139360A (en) Line types recognizing method and device
JPH1173515A (en) Drawing input device and picture structure analysis method used in the same

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980609

LAPS Cancellation because of no payment of annual fees