JPH0793560A - Graphic contour line recognition method - Google Patents
Graphic contour line recognition methodInfo
- Publication number
- JPH0793560A JPH0793560A JP5241366A JP24136693A JPH0793560A JP H0793560 A JPH0793560 A JP H0793560A JP 5241366 A JP5241366 A JP 5241366A JP 24136693 A JP24136693 A JP 24136693A JP H0793560 A JPH0793560 A JP H0793560A
- Authority
- JP
- Japan
- Prior art keywords
- line
- contour line
- contour
- arc
- end point
- 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 method for recognizing a contour line of a figure in a CAD system or the like, and more particularly to a contour line of a figure represented by vector data consisting of straight lines, circles and arcs. The present invention relates to a method of recognizing a figure contour line.
【0002】[0002]
【従来の技術】図形の輪郭線を認識する方法として、例
えば特開平3−20789号公報あるいは特開平5−1
08824号公報に示されるような輪郭線図形認識方法
がある。2. Description of the Related Art As a method of recognizing the contour line of a figure, for example, Japanese Patent Laid-Open No. 20789/1993 or Japanese Patent Laid-Open No. 5-1 / 1993.
There is a contour figure recognition method as disclosed in Japanese Patent No. 08824.
【0003】このうち、特開平3−20789号公報に
開示されている方法は、CADシステムとは異なる文字
生成システムに関する方法であるが、骨格ベクター文字
情報から要素ごとの輪郭線を多角形で近似した場合の頂
点座標を計算し、異なる要素の輪郭線との交点座標を算
出し、その算出した交点座標と抽出された要素ごとの輪
郭線の頂点座標から、文字全体の輪郭線を構成する座標
列を算出することにより、輪郭ベクター文字情報を生成
するための必要な情報を生成するものである。Among them, the method disclosed in Japanese Patent Laid-Open No. 3-20789 is a method relating to a character generation system different from the CAD system, but the contour line of each element is approximated by a polygon from the skeleton vector character information. In this case, the coordinates of the vertex are calculated, the coordinates of the intersection with the contour of the different element are calculated, and the coordinates of the contour of the entire character are calculated from the calculated coordinates of the intersection and the vertex of the contour of each element extracted. By calculating the columns, the necessary information for generating the contour vector character information is generated.
【0004】一方、特開平5−108824号公報に開
示されている方法は、多角形の頂点のうちの最下点を輪
郭抽出開始点とし、この開始点を始点とするX軸方向の
探索ベクターを左回りに回転させ、最初に重なる直線を
第一の輪郭直線とし、次に第1の輪郭直線の終点を原点
とし始点を終点とする探索ベクターを左回りに回転さ
せ、最初に重なる直線を次の輪郭直線とすることを順次
繰り返していくことによって多角形の輪郭線を抽出する
方法である。On the other hand, in the method disclosed in Japanese Patent Laid-Open No. 5-108824, the lowest point among the vertices of a polygon is used as the contour extraction start point, and the search point in the X-axis direction with this start point as the start point. Is rotated counterclockwise, the first overlapping straight line is the first contour straight line, and then the search vector having the end point of the first contour straight line as the origin and the starting point as the end point is rotated counterclockwise, and the first overlapping straight line is obtained. This is a method for extracting a polygonal contour line by sequentially repeating the process of forming the next contour line.
【0005】[0005]
【発明が解決しようとする課題】ところで、CADシス
テム等においては、直線と円あるいは円弧の組合せから
図形を取り扱う場合があり、このような図形に対しても
輪郭線を抽出しなければならない。By the way, in a CAD system or the like, a graphic is sometimes handled from a combination of a straight line and a circle or a circular arc, and a contour line must be extracted for such a graphic.
【0006】しかし、特開平5−108824号公報に
開示されている方法においては、対象が円や円弧を含ま
ない多角形であり、円や円弧を含む図形については輪郭
線を抽出できないという問題がある。However, the method disclosed in Japanese Unexamined Patent Publication No. 5-108824 has a problem that the object is a polygon that does not include a circle or an arc, and a contour line cannot be extracted from a figure including a circle or an arc. is there.
【0007】一方、上記特開平3−20789号公報に
開示されている方法においては、スプラインや円等の場
合にも、多角形近似しないで輪郭線情報が求められるこ
とが述べられているが、その具体的方法までは述べられ
ていない。On the other hand, in the method disclosed in the above-mentioned Japanese Patent Laid-Open No. 3-20789, it is stated that contour information is obtained without approximating polygons even in the case of splines and circles. The specific method is not described.
【0008】本発明の目的は、直線と円または円弧とか
らなるベクターデータで表現されている図形の輪郭線を
簡単に認識できる図形輪郭線認識方法を提供することに
ある。An object of the present invention is to provide a graphic contour line recognizing method capable of easily recognizing a contour line of a graphic represented by vector data consisting of straight lines and circles or arcs.
【0009】[0009]
【課題を解決するための手段】前記の目的を達成するた
めに本発明は、基本的には、ベクターデータである直
線、円弧、円の組み合わせで描かれた図形に対して、そ
の図形の輪郭線上にある直線、円弧あるいは円のいずれ
かの要素から、端点座標が一致する輪郭線候補要素を探
し、その要素の中から輪郭線となる要素を判別する処理
を順次繰り返し、図形輪郭を一定方向に辿る図形輪郭線
認識方法において、前記輪郭線候補要素が複数存在する
際に、既に決定済みの輪郭線要素と、その要素と一致す
る端点を持つ複数の輪郭線候補要素とのなす角度をそれ
ぞれ求め、その角度の小さい方を輪郭線要素として選択
し、かつ前記角度を求める際、その角度を求める要素が
直線同士の場合は2直線の両端点の座標から角度を求
め、円弧同士あるいは円弧と直線間の場合は2要素の交
点となる端点より円弧が膨らんでいる方向へ接線を引き
出し、円弧の代わりに接線の端点座標を利用して2要素
のなす角度を求めることを特徴とする。In order to achieve the above-mentioned object, the present invention basically relates to a graphic drawn by a combination of straight lines, arcs and circles, which is vector data, and an outline of the graphic. From the straight line, arc, or circle elements on the line, search for a contour line candidate element with the same end point coordinates, and repeat the processing to determine the contour line element from that element, and repeat the figure contour in a fixed direction. In the method for recognizing a graphic contour line according to step 1, when there are a plurality of contour line candidate elements, the angle formed between the contour line element already determined and the plurality of contour line candidate elements having end points matching the respective elements is determined. When the element having the smaller angle is selected as the contour line element and the angle is obtained, if the elements for which the angle is obtained are straight lines, the angle is obtained from the coordinates of the end points of the two straight lines, and the arcs In the case of an arc and a straight line, a tangent line is drawn from the end point which is the intersection point of the two elements in the direction in which the arc expands, and the angle formed by the two elements is obtained using the end point coordinates of the tangent line instead of the arc. .
【0010】また、前記接線を引き出した際に、その接
線と一致する直線がある場合は、円弧の弦を接線の代わ
りとすることを特徴とする。Further, when the tangent line is drawn out and there is a straight line that coincides with the tangent line, an arc chord is used instead of the tangent line.
【0011】[0011]
【作用】上記手段によれば、輪郭線候補要素が複数存在
する場合、既に決定済みの輪郭線要素と、その要素と一
致する端点を持つ複数の輪郭線候補要素とのなす角度を
それぞれ求め、その角度の小さい方を輪郭線要素として
選択する。そして、前記角度を求める際、その角度を求
める要素が直線同士の場合は2直線の両端点の座標から
角度を求め、円弧同士あるいは円弧と直線間の場合は2
要素の交点となる端点より円弧が膨らんでいる方向へ接
線を引き出し、円弧の代わりに接線の端点座標を利用し
て2要素のなす角度を求める。According to the above means, when there are a plurality of contour line candidate elements, the angles formed by the contour line element that has already been determined and the plurality of contour line candidate elements having end points that match the element are obtained, The one with the smaller angle is selected as the contour line element. Then, when the angle is obtained, the angle is obtained from the coordinates of the two end points of the straight line if the element for obtaining the angle is a straight line, and if the arc is between arcs or between arcs and a straight line,
A tangent line is drawn from the end point which is the intersection point of the elements in the direction in which the arc expands, and the angle formed by the two elements is obtained using the end point coordinates of the tangent line instead of the arc.
【0012】従って、直線と円または円弧とからなるベ
クターデータで表現されている図形の輪郭を簡単に認識
することが可能となる。Therefore, it is possible to easily recognize the contour of the figure represented by the vector data consisting of the straight line and the circle or the circular arc.
【0013】[0013]
【実施例】以下、図示する実施例に基づき本発明を詳細
に説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to illustrated embodiments.
【0014】図1は本発明の図形輪郭線認識方法の手順
の一実施例を示すフローチャート、図2〜図4は説明図
である。なお、図1で示される手順は図示しないCAD
等のコンピュータによって実行されるものである。FIG. 1 is a flow chart showing an embodiment of the procedure of the graphic contour recognizing method of the present invention, and FIGS. 2 to 4 are explanatory views. The procedure shown in FIG. 1 is not shown in CAD.
Etc. are executed by a computer.
【0015】以下、これらの図を用いて輪郭線認識方法
の概念を説明する。The concept of the contour line recognition method will be described below with reference to these figures.
【0016】まず、図形輪郭線上にある1つの要素、例
えば図2の直線ABを選択し、この直線ABを図形の輪
郭線を辿るための輪郭線先頭要素とする(ステップ1
0)。First, one element on the contour line of the figure, for example, the straight line AB in FIG. 2 is selected, and this straight line AB is set as the contour head element for tracing the contour line of the figure (step 1).
0).
【0017】次に、輪郭線先頭要素の両端点A,Bの
内、図形を反時計回り方向で辿ることができる端点を端
点j、そうではない他方の端点を端点iとする。図2に
おいては、Aが端点i、Bが端点jとなる(ステップ1
1)。Next, of the two end points A and B of the first element of the contour line, the end point that can trace the figure in the counterclockwise direction is the end point j, and the other end point is the end point i. In FIG. 2, A is the end point i and B is the end point j (step 1
1).
【0018】次に、端点jと一致する点を持つ輪郭線候
補要素を図形中に探す(ステップ12)。Next, a contour line candidate element having a point that coincides with the end point j is searched for in the figure (step 12).
【0019】ここで、輪郭線候補要素の数により以下の
ように処理が分かれる(ステップ13)。Here, the processing is divided as follows depending on the number of contour line candidate elements (step 13).
【0020】輪郭線候補要素数が0個の場合は、エラ
ーとする(ステップ17)。If the number of contour line candidate elements is 0, it is judged as an error (step 17).
【0021】1個の場合は、その要素を輪郭線とする
(ステップ14)。In the case of one, the element is set as the contour line (step 14).
【0022】2個以上の場合は、既に輪郭線と決定さ
れた要素を基線として、基線と各輪郭線候補要素との反
時計回り方向のなす角度を求めて、その角度の1番小さ
い輪郭線候補要素を輪郭線と決定する(ステップ1
8)。In the case of two or more elements, the angle which the counterclockwise direction makes between the base line and each contour line candidate element is calculated with the element already determined as the contour line as the base line, and the contour line with the smallest angle is obtained. Candidate elements are determined as contour lines (step 1
8).
【0023】図2の場合は、輪郭線候補要素は直線BC
と直線BDである。この場合、基線ABに対し反時計回
り方向のなす角∠ABCと∠ABDとを求め、角度の小
さい∠ABCつまり直線BCを輪郭線とする。なお、輪
郭線を決定した時、端点iと端点jも変更する。例えば
図2において、直線BCが輪郭線と決定された場合に
は、端点iがAからBに、端点jがBからCに変更され
る(ステップ15)。In the case of FIG. 2, the contour line candidate element is the straight line BC.
And a straight line BD. In this case, angles ∠ABC and ∠ABD formed in the counterclockwise direction with respect to the base line AB are obtained, and ∠ABC having a small angle, that is, the straight line BC is set as the contour line. When the contour line is determined, the end points i and j are also changed. For example, in FIG. 2, when the straight line BC is determined as the contour line, the end point i is changed from A to B and the end point j is changed from B to C (step 15).
【0024】また、図3に示すように、輪郭線候補要素
が円弧BCである場合は、図4に示すように、円弧BC
の端点j(B)における接線を引き、円弧BCの膨らん
でいる方向の接線上のBとは異なる任意の点をFとした
直線BFを作成し、基線ABと直線BFとの反時計回り
方向のなす角度を、基線ABと円弧BCとのなす角度と
見なし、他の輪郭線候補要素の角度との大小を比較す
る。When the contour line candidate element is the arc BC as shown in FIG. 3, the arc BC is given as shown in FIG.
Draw a tangent line at the end point j (B) of the arc BC, and create a straight line BF with F as an arbitrary point different from B on the tangent line of the bulging direction of the arc BC, and turn the base line AB and the straight line BF in the counterclockwise direction. The angle formed by is regarded as the angle formed by the base line AB and the arc BC, and the magnitudes of the angles are compared with the angles of other contour line candidate elements.
【0025】この場合は、∠ABFと∠ABCとを求
め、最小の角度となる∠ABFすなわち円弧BCを輪郭
線とする。In this case, ∠ABF and ∠ABC are obtained, and ∠ABF that is the minimum angle, that is, arc BC is used as the contour line.
【0026】輪郭線となった要素の両端点の内、すで
に輪郭線として決定済みの要素とつながっている端点を
端点i、もう一方の端点を端点jとする(ステップ1
5)。Of the two end points of the element that has become the contour line, the end point that is already connected to the element that has already been determined as the contour line is the end point i, and the other end point is the end point j (step 1).
5).
【0027】以後、全ての輪郭線要素を同様の手順で
辿って順次輪郭線を決定し、決定した要素が先頭要素に
一致したとき処理を終了する。After that, all the contour line elements are traced in the same procedure to sequentially determine the contour line, and when the determined element matches the head element, the process is terminated.
【0028】図5および図6は、さらに複雑な図形の輪
郭線を認識する際の過程を示す説明図であり、図7は図
形を構成している全要素についてのベクターデータテー
ブルTBである。FIGS. 5 and 6 are explanatory views showing the process of recognizing the contour line of a more complicated figure, and FIG. 7 is a vector data table TB for all the elements constituting the figure.
【0029】ベクターデータテーブルTBは、輪郭線と
なる図形要素の属性71、端点aの座標72、端点bの
座標73、中心点の座標74、半径75、円弧の向き7
6の項目からなり、輪郭線となるそれぞれの要素のデー
タが登録されている。The vector data table TB includes the attributes 71 of the graphic element to be the outline, the coordinates 72 of the end point a, the coordinates 73 of the end point b, the coordinates 74 of the center point, the radius 75, and the direction 7 of the arc.
It consists of 6 items, and the data of each element forming the contour line is registered.
【0030】なお、円弧については、端点bから反時計
回りの方向に円弧が延びるようにデータが登録されてい
る以下、図5に示された図形の輪郭線を認識する場合を
説明する。Regarding the circular arc, data is registered so that the circular arc extends in the counterclockwise direction from the end point b. Hereinafter, the case of recognizing the contour line of the figure shown in FIG. 5 will be described.
【0031】まず、直線ABを輪郭線を認識するための
輪郭線先頭要素とし、反時計回りに図形を辿るが、この
際に、Aを端点i、Bを端点jとする。First, the straight line AB is used as a contour line head element for recognizing the contour line, and the figure is traced counterclockwise. At this time, A is an end point i and B is an end point j.
【0032】次に、直線ABの端点j(B)と一致する
点をもつ要素をベクターデータテーブルTBから探す。
すると、直線BCしか存在しないので、この直線BCを
輪郭線として決定する。この時、直線BCにおいて、輪
郭線として認識済みの直線ABとつながっているBを端
点i、Cを端点jとする。Next, the vector data table TB is searched for an element having a point that coincides with the end point j (B) of the straight line AB.
Then, since only the straight line BC exists, this straight line BC is determined as the contour line. At this time, in the straight line BC, B connected to the straight line AB recognized as a contour line is defined as an end point i, and C is defined as an end point j.
【0033】次に、端点j(C)と一致する点をもつ要
素をベクターデータテーブルTBから探す。すると、円
弧CD、直線CD、直線CIの3つの候補要素が存在す
る。そこで、いずれが輪郭線となるべきかを判別するた
め、直線BCを基線として、端点j(C)より円弧CD
が膨らんでいる方向への接線CJとの反時計回りの方向
でのなす角∠BCJ、∠BCD、∠BCIとを求めて比
較し、最小の角度となる∠BCJつまり円弧CDを輪郭
線として決定する。この時、直線BCとつながっている
Cを新たな端点i、Dを新たな端点jとする。Next, the vector data table TB is searched for an element having a point that coincides with the end point j (C). Then, there are three candidate elements of the arc CD, the straight line CD, and the straight line CI. Therefore, in order to determine which should become the contour line, the straight line BC is used as the base line and the arc CD from the end point j (C) is used.
The angle ∠BCJ, ∠BCD, ∠BCI formed in the counterclockwise direction with the tangent line CJ to the direction in which swells is obtained and compared, and ∠BCJ that is the minimum angle, that is, arc CD is determined as the contour line. To do. At this time, C connected to the straight line BC is set as a new end point i, and D is set as a new end point j.
【0034】次に、端点j(D)と一致する点をもつ要
素をベクターデータテーブルTBから探す。すると、直
線DE、直線DCの2つの要素が存在するので、端点j
(D)より円弧CDが膨らんでいる方向への接線DKを
基線として反時計回りの方向で∠KDEと∠KDCとを
求め比較し、最小の角度となる∠KDEつまり直線DE
を輪郭線として決定する。この時、直線DEにおいて、
円弧CDとつながっているDを新たな端点i、Eを新た
な端点jとする。Next, the vector data table TB is searched for an element having a point that coincides with the end point j (D). Then, since there are two elements of the straight line DE and the straight line DC, the end point j
From (D), ∠KDE and ∠KDC are found in the counterclockwise direction with the tangent line DK to the direction in which the arc CD swells as a base line, and compared, and the minimum angle ∠KDE, that is, the straight line DE
Is determined as the contour line. At this time, on the straight line DE,
Let D, which is connected to the arc CD, be a new end point i, and E be a new end point j.
【0035】次に、端点j(E)と一致する点をもつ要
素をベクターデータテーブルTBから探す。すると、円
弧EF(反時計回り)、直線EF、円弧EF(時計回
り)の3つの要素が存在する。Next, the vector data table TB is searched for an element having a point that coincides with the end point j (E). Then, there are three elements of arc EF (counterclockwise), straight line EF, and arc EF (clockwise).
【0036】そこで、端点j(E)よりそれぞれ円弧が
膨らんでいる方向へ接線EM、接線ELを引き、直線D
Eを基線として反時計回りの方向で∠DEM、∠DE
F、∠DELを求め比較し、最小の角度となる∠DEM
つまり円弧EF(反時計回り)を輪郭線として決定す
る。Therefore, a tangent line EM and a tangent line EL are drawn from the end point j (E) in the directions in which the arcs swell, and a straight line D is drawn.
∠DEM, ∠DE in the counterclockwise direction with E as the baseline
F and ∠DEL are calculated and compared, and the minimum angle is ∠DEL
That is, the arc EF (counterclockwise) is determined as the contour line.
【0037】この時、円弧EF(反時計回り)におい
て、直線DEとつながっているEを新たな端点i、Fを
新たな端点jとする。At this time, in the arc EF (counterclockwise), E connected to the straight line DE is set as a new end point i, and F is set as a new end point j.
【0038】次に、端点j(F)と一致する点をもつ要
素をベクターデータテーブルTBから探す。すると、直
線FG、円弧FE(FからEの方向へ反時計回り)、直
線FEの3つの要素が存在する。Next, the vector data table TB is searched for an element having a point that coincides with the end point j (F). Then, there are three elements of the straight line FG, the circular arc FE (counterclockwise in the direction from F to E), and the straight line FE.
【0039】そこで、端点j(F)よりそれぞれ円弧が
膨らんでいる方向へ接線FO、接線FNを引き、接線F
Oを基線として反時計回りの方向で∠OFG、∠OF
N、∠OFEを求め比較し、最小の角度となる∠OFG
つまり直線FGを輪郭線として決定する。Therefore, a tangent line FO and a tangent line FN are drawn from the end point j (F) in the directions in which the arcs swell, and the tangent line F is obtained.
∠OFG, ∠OF in the counterclockwise direction with O as the baseline
N and ∠ OFE are calculated and compared, and ∠OFG that has the smallest angle
That is, the straight line FG is determined as the contour line.
【0040】以後、同様な処理を繰り返し輪郭線の認識
を行い、直線GH、直線HI、直線IAを輪郭線とす
る。最終的には、図5中の太線で示した部分が輪郭線と
して認識される。Thereafter, similar processing is repeated to recognize the contour line, and the straight line GH, the straight line HI, and the straight line IA are set as the contour lines. Finally, the portion shown by the thick line in FIG. 5 is recognized as the contour line.
【0041】次に、図6に示された図形の輪郭線を認識
する場合を説明する。Next, the case of recognizing the outline of the figure shown in FIG. 6 will be described.
【0042】まず、図5の場合と同様に、直線ABを輪
郭線を認識するための輪郭線先頭要素とし、反時計回り
に図形を辿る。First, as in the case of FIG. 5, the straight line AB is set as the first element of the contour line for recognizing the contour line, and the figure is traced counterclockwise.
【0043】直線DEを輪郭線と認識するところまで
は、図5の場合と同様である。The process up to the point where the straight line DE is recognized as the contour line is the same as in the case of FIG.
【0044】この時、直線DEにおいて、円弧CDとつ
ながっているDが端点i、Eが端点jとなっている。At this time, in the straight line DE, D connected to the circular arc CD is the end point i and E is the end point j.
【0045】次に、端点j(E)と一致する点をもつ要
素をベクターデータテーブルTBから探す。すると、円
弧EF2、円弧EF1、直線EF1の3つの要素が存在す
る。Next, the vector data table TB is searched for an element having a point that coincides with the end point j (E). Then, there are three elements of the arc EF 2 , the arc EF 1 , and the straight line EF 1 .
【0046】そこで、端点j(E)よりそれぞれ円弧が
膨らんでいる方向へ接線EM、接線ELを引き、直線D
Eを基線として反時計回りの方向で∠DEM、∠DE
L、∠DEF1を求め比較し、最小の角度となる∠DE
Mつまり円弧EF2を輪郭線として決定する。この時、
円弧EF2において、直線DEとつながっているEを新
たな端点i、F2を新たな端点jとする。Therefore, a tangent line EM and a tangent line EL are drawn from the end point j (E) in the directions in which the arcs swell, and a straight line D is drawn.
∠DEM, ∠DE in the counterclockwise direction with E as the baseline
L and ∠DEF 1 are calculated and compared, and the minimum angle is ∠DE
M, that is, the arc EF 2 is determined as the contour line. At this time,
In the arc EF 2 , E connected to the straight line DE is a new end point i, and F 2 is a new end point j.
【0047】次に、端点j(F2)と一致する点をもつ
要素をベクターデータテーブルTBから探巣。すると、
直線F2G、直線F2F1の2つの要素が存在する。Next, an element having a point that coincides with the end point j (F 2 ) is searched from the vector data table TB. Then,
There are two elements, a straight line F 2 G and a straight line F 2 F 1 .
【0048】そこで、端点j(F2)より円弧が膨らん
でいる方向へ接線F2Nを引き、接線F2Nを基線として
反時計回りの方向で∠NF2G、∠NF2F1を求め比較
し、最小の角度となる∠NF2Gつまり直線F2Gを輪郭
線として決定する。Therefore, a tangent line F 2 N is drawn from the end point j (F 2 ) in the direction in which the arc bulges, and ∠NF 2 G and ∠NF 2 F 1 are set in the counterclockwise direction with the tangent line F 2 N as the base line. The obtained angles are compared and the ∠NF 2 G that is the minimum angle, that is, the straight line F 2 G is determined as the contour line.
【0049】以後、同様な処理を繰り返し輪郭線の認識
を行い、直線GH、直線HI、直線IAを輪郭線とす
る。Thereafter, similar processing is repeated to recognize the contour line, and the straight line GH, the straight line HI, and the straight line IA are set as the contour lines.
【0050】最終的には図6中の太線で示した部分が輪
郭線として認識される。Finally, the portion indicated by the thick line in FIG. 6 is recognized as the contour line.
【0051】ところで、円弧の接線を引いた時、例えば
図8に示すような図形においては、円弧DEの端点Dの
接線DHと、直線DGとが一致するので単なる角度比較
によっては輪郭線を決定できなくなる。By the way, when the tangent line of the arc is drawn, for example, in the figure as shown in FIG. 8, the tangent line DH of the end point D of the arc DE and the straight line DG coincide with each other, and therefore the contour line is determined by merely comparing the angles. become unable.
【0052】このような図形の場合は、円弧DEの弦D
Eを接線DHの代わりに用い、基線CDとなす角度∠C
DE、∠CDGを求め比較し、最小の角度となる∠CD
Eつまり円弧DEを輪郭線として決定する。In the case of such a figure, the chord D of the arc DE
Use E instead of tangent line DH and make an angle ∠C with baseline CD
DE and ∠CDG are calculated and compared, and the minimum angle is ∠CD
E, that is, the arc DE is determined as the contour line.
【0053】最終的には図9に太線で示した部分が輪郭
線として認識される。Finally, the portion shown by the thick line in FIG. 9 is recognized as the contour line.
【0054】[0054]
【発明の効果】以上説明したように本発明によれば、輪
郭線候補要素が複数存在する場合、既に決定済みの輪郭
線要素と、その要素と一致する端点を持つ複数の輪郭線
候補要素とのなす角度をそれぞれ求め、その角度の小さ
い方を輪郭線要素として選択し、かつ前記角度を求める
際、その角度を求める要素が直線同士の場合は2直線の
両端点の座標から角度を求め、円弧同士あるいは円弧と
直線間の場合は2要素の交点となる端点より円弧が膨ら
んでいる方向へ接線を引き出し、円弧の代わりに接線の
端点座標を利用して2要素のなす角度を求めるようにし
たので、直線と円または円弧とからなるベクターデータ
で表現されている図形の輪郭を簡単に認識することが可
能となる。As described above, according to the present invention, when there are a plurality of contour line candidate elements, a contour line element that has already been determined and a plurality of contour line candidate elements having end points that match the element are detected. Angle is determined, the smaller one is selected as a contour line element, and when the angle is determined, if the elements for which the angle is determined are straight lines, the angle is determined from the coordinates of the end points of the two straight lines, In the case of arcs or between arcs and straight lines, draw a tangent in the direction in which the arc expands from the end point that is the intersection of the two elements, and use the end point coordinates of the tangent instead of the arc to find the angle between the two elements. Therefore, it is possible to easily recognize the contour of the figure represented by the vector data composed of the straight line and the circle or the circular arc.
【図1】本発明の輪郭線認識方法の手順の一実施例を示
すフローチャートである。FIG. 1 is a flowchart showing an embodiment of a procedure of a contour line recognition method of the present invention.
【図2】図形の辿り方と端点i、jの位置を示す説明図
である。FIG. 2 is an explanatory diagram showing how to trace a figure and the positions of end points i and j.
【図3】直線と円弧とからなる図形を示す図である。FIG. 3 is a diagram showing a figure composed of straight lines and circular arcs.
【図4】直線と円弧とからなる図形の場合の輪郭線とな
る要素の判別方法を示す説明図である。FIG. 4 is an explanatory diagram showing a method of discriminating an element that is a contour line in the case of a figure composed of a straight line and a circular arc.
【図5】円弧の両端が一致する場合の輪郭線となる要素
の判別方法を示す説明図である。FIG. 5 is an explanatory diagram showing a method of discriminating an element that becomes a contour line when both ends of an arc match.
【図6】円弧の一端が一致しており、かつ一方の円弧が
他方の円弧に含まれる場合の輪郭線となる要素の判別方
法を示す説明図である。FIG. 6 is an explanatory diagram showing a method of discriminating an element that is a contour line when one end of an arc matches and one arc is included in the other arc.
【図7】ベクターデータテーブルの構成図である。FIG. 7 is a configuration diagram of a vector data table.
【図8】円弧の接線と一致する直線が存在する場合の輪
郭線となる要素の判別方法を示す説明図である。FIG. 8 is an explanatory diagram showing a method of discriminating an element serving as a contour line when a straight line that matches a tangent line of an arc exists.
【図9】図8における図形の輪郭線示す説明図である。9 is an explanatory diagram showing contour lines of the figure in FIG. 8;
【符号の説明】 TB…ベクターデータテーブル、71…属性、72…端
点aの座標、73…端点bの座標、74…中心点の座
標、75…半径、76…円弧の向き。[Description of Codes] TB ... Vector data table, 71 ... Attribute, 72 ... Coordinates of end point a, 73 ... Coordinates of end point b, 74 ... Coordinates of center point, 75 ... Radius, 76 ... Direction of arc.
Claims (2)
組み合わせで描かれた図形に対して、その図形の輪郭線
上にある直線、円弧あるいは円のいずれかの要素から端
点座標が一致する輪郭線候補要素を探し、その要素の中
から輪郭線となる要素を判別する処理を順次繰り返し、
図形輪郭を一定方向に辿る図形輪郭線認識方法におい
て、 前記輪郭線候補要素が複数存在する際に、既に決定済み
の輪郭線要素と、その要素と一致する端点を持つ複数の
輪郭線候補要素とのなす角度をそれぞれ求め、その角度
の小さい方を輪郭線要素として選択し、かつ前記角度を
求める際、その角度を求める要素が直線同士の場合は2
直線の両端点の座標から角度を求め、円弧同士あるいは
円弧と直線間の場合は2要素の交点となる端点より円弧
が膨らんでいる方向へ接線を引き出し、円弧の代わりに
接線の端点座標を利用して2要素のなす角度を求めるこ
とを特徴とする図形輪郭線認識方法。1. A contour line whose endpoint coordinates match from a straight line, arc or circle element on a contour line of a figure drawn by a combination of straight lines, arcs and circles which is vector data. The process of searching for candidate elements and discriminating the element that becomes the contour line from the elements is sequentially repeated.
In a figure contour line recognition method for tracing a figure contour in a certain direction, when there are a plurality of contour line candidate elements, a contour line element that has already been determined, and a plurality of contour line candidate elements having endpoints that match the element are provided. When each of the angles formed by the two is calculated, the smaller one is selected as the contour line element, and when the angle is calculated, if the elements for which the angle is calculated are straight lines, 2
The angle is calculated from the coordinates of both ends of the straight line, and when the arcs are between the arcs or between the arcs and the straight line, the tangent line is drawn from the end point that is the intersection of the two elements in the direction in which the arc expands, and the end point coordinates of the tangent line are used instead of the arc. A method for recognizing a graphic contour line, characterized in that an angle formed by two elements is obtained.
一致する直線がある場合は、円弧の弦を接線の代わりと
することを特徴とする請求項1記載の図形輪郭線認識方
法。2. The method for recognizing a graphic contour line according to claim 1, wherein when the tangent line is drawn out and there is a straight line that matches the tangent line, a chord of an arc is used instead of the tangent line.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5241366A JPH0793560A (en) | 1993-09-28 | 1993-09-28 | Graphic contour line recognition method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5241366A JPH0793560A (en) | 1993-09-28 | 1993-09-28 | Graphic contour line recognition method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0793560A true JPH0793560A (en) | 1995-04-07 |
Family
ID=17073227
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP5241366A Pending JPH0793560A (en) | 1993-09-28 | 1993-09-28 | Graphic contour line recognition method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0793560A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7535460B2 (en) | 2004-06-03 | 2009-05-19 | Nintendo Co., Ltd. | Method and apparatus for identifying a graphic shape |
US7771279B2 (en) | 2004-02-23 | 2010-08-10 | Nintendo Co. Ltd. | Game program and game machine for game character and target image processing |
US8558792B2 (en) | 2005-04-07 | 2013-10-15 | Nintendo Co., Ltd. | Storage medium storing game program and game apparatus therefor |
-
1993
- 1993-09-28 JP JP5241366A patent/JPH0793560A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7771279B2 (en) | 2004-02-23 | 2010-08-10 | Nintendo Co. Ltd. | Game program and game machine for game character and target image processing |
US7535460B2 (en) | 2004-06-03 | 2009-05-19 | Nintendo Co., Ltd. | Method and apparatus for identifying a graphic shape |
US8558792B2 (en) | 2005-04-07 | 2013-10-15 | Nintendo Co., Ltd. | Storage medium storing game program and game apparatus therefor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3155577B2 (en) | Character recognition method and device | |
JP4274941B2 (en) | Method and apparatus for decoding handwritten characters | |
JPH07105316A (en) | Handwritten-symbol recognition apparatus | |
JPH0139154B2 (en) | ||
JP2011100465A (en) | Method, apparatus, computer program, computer system and computer-readable storage for representing object in image | |
JPH08161421A (en) | Device and method for extracting character string area | |
JPH02266485A (en) | Information recognizing device | |
JPH10149432A (en) | Three-dimensional form retrieval device | |
US5615283A (en) | Pattern recognition device | |
JPH0793560A (en) | Graphic contour line recognition method | |
CN111753719A (en) | Fingerprint identification method and device | |
JP2006227824A (en) | Drawing recognition method and device | |
JPH06111073A (en) | Handwritten information recognizing device | |
JPH0520794B2 (en) | ||
US5790700A (en) | Method for automatically recognizing line symmetry of a figure | |
JPH081660B2 (en) | Online handwritten figure recognition device | |
JPS63241679A (en) | Pattern recognizing system | |
JPH0962788A (en) | On-line handwritten character recognition method | |
JPH10143610A (en) | Character recognizing device | |
JP2006344034A (en) | Computer aided design program and system therefor | |
JPH0563836B2 (en) | ||
JPS60112187A (en) | Recognition system of online hand written character | |
KR19990056025A (en) | How to Recognize Korean Handwritten Characters Online | |
JPS62107378A (en) | Drawing data managing system | |
JPH0721321A (en) | On-line character recognizing device |