Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0464114B2 - - Google Patents
[go: Go Back, main page]

JPH0464114B2 - - Google Patents

Info

Publication number
JPH0464114B2
JPH0464114B2 JP61093042A JP9304286A JPH0464114B2 JP H0464114 B2 JPH0464114 B2 JP H0464114B2 JP 61093042 A JP61093042 A JP 61093042A JP 9304286 A JP9304286 A JP 9304286A JP H0464114 B2 JPH0464114 B2 JP H0464114B2
Authority
JP
Japan
Prior art keywords
line segment
line
open
loop
arc
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.)
Expired
Application number
JP61093042A
Other languages
Japanese (ja)
Other versions
JPS62248080A (en
Inventor
Hiroaki Harada
Masashige Yamamoto
Yasukazu Ito
Nobuyuki Sato
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP61093042A priority Critical patent/JPS62248080A/en
Publication of JPS62248080A publication Critical patent/JPS62248080A/en
Publication of JPH0464114B2 publication Critical patent/JPH0464114B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔概要〕 画像処理、特に図形の認識処理の分野におい
て、最も重要な考えられる図形の閉ループ情報を
高速に得るために、画像に公知技術の細線化と折
線化を施すことによつて図形情報をテーブル化
し、そのテーブル上の探索操作によつてループの
検出を実現する。
[Detailed Description of the Invention] [Summary] In the field of image processing, especially figure recognition processing, in order to quickly obtain closed-loop information about figures, which is considered to be the most important, images are subjected to thinning and broken lines using known techniques. By doing so, graphic information is converted into a table, and loop detection is realized by searching the table.

〔産業上の利用分野〕[Industrial application field]

本発明は、図形データから閉ループを持つ図形
を抽出する閉図形識別装置に関する。こゝで閉図
形(閉ループを持つ図形)とは第3図aのフロー
チヤートの質問ボツクス、同図bの論理ゲートシ
ンボルなどをいう。
The present invention relates to a closed figure identification device that extracts a figure having a closed loop from figure data. Here, the closed figure (figure with a closed loop) refers to the question box in the flowchart shown in Figure 3a, the logic gate symbol in Figure 3b, and the like.

〔従来の技術〕[Conventional technology]

設計図面や地図などの自動入力では、図形の認
識が必要である。図形には、フローチヤートのボ
ツクス、回路図のゲート記号、英数字などのよう
に、閉ループの有無が重要で、これが他の図形か
らの切り離しや図形種類の決定に有力な情報を提
供することが多い。従つて図形が閉ループを持つ
か否か、持つとすればどのような閉ループなの
か、を示す情報が迅速に得られるなら、図形切出
し処理や識別処理を効率よく行なうことができ
る。
Automatic input of design drawings, maps, etc. requires recognition of shapes. It is important for shapes to have closed loops, such as boxes in flowcharts, gate symbols in circuit diagrams, alphanumeric characters, etc., and this can provide useful information for separating shapes from other shapes and determining the type of shape. many. Therefore, if information indicating whether a figure has a closed loop or not, and if so, what kind of closed loop it has, can be quickly obtained, the figure cutout process and identification process can be performed efficiently.

従来の閉ループ情報の抽出技法は、対象データ
によつて次の2方式に大別できる。
Conventional closed-loop information extraction techniques can be roughly divided into the following two methods depending on the target data.

2値画像から直接閉ループ情報を抽出する方
式 (a) ラスターデータから抽出する方式;第4図
aに示すように2値画像をラスタースキヤン
し、得られたラスターデータ即ち白画素から
黒画素へ変化するP1、黒画素から白画素へ
変化する点P2をデータ化したものを用いて
図形の外と内を区別し、閉じた白地の部分
(走査順にみて最初はP1,P2、その後P1
P2,P1,P2、最後にP1,P2となるが、中間
のP2からP1になる迄の部分)を閉ループと
する方式。
A method for directly extracting closed-loop information from a binary image (a) A method for extracting from raster data; as shown in Figure 4a, a binary image is raster scanned, and the obtained raster data, that is, changes from white pixels to black pixels. The outside and inside of the figure are distinguished by using the converted data of P 1 and point P 2 that change from black pixel to white pixel . P1 ,
P 2 , P 1 , P 2 , and finally P 1 and P 2 , but the part from P 2 in the middle to P 1 ) is a closed loop.

(b) 輪郭追跡処理によつて抽出する方式;第4
図bに示すように、2値画像の輪郭を全て求
め、内部にある輪郭線を閉ループとする方
式。
(b) Method of extraction by contour tracking processing; 4th
As shown in Figure b, this method calculates all the contours of a binary image and uses the internal contours as a closed loop.

折線データから閉ループ情報を抽出する方式
2値画像を細線化技術によつて細め、第4図c
に示すように折線データの形に変換してメモリ
に格納し、その折線データを順次探索するする
ことにより閉ループを求める。探索は折線の座
標を頼りに行なう方式が多い。
Method for extracting closed-loop information from broken line data The binary image is thinned using line thinning technology, as shown in Figure 4c.
As shown in the figure, the closed loop is obtained by converting the data into broken line data and storing it in memory, and sequentially searching the broken line data. Most searches rely on the coordinates of polygonal lines.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかしながら(1)前記の方式では、抽出した閉
ループの情報(輪郭点の系列)と、切り出すべき
図形との明確な対応付けができない。即ち図形が
線幅を持つ場合は、輪郭点と図形の中心線とが一
致しないため、閉ループを持つ図形を他の図形か
ら適確に切り分けることができない。第5図aで
いえば、肉太線図形の原画から閉ループ情報を抽
出するのであるが、該原画の内側閉ループは明瞭
に取出せるものの、外側閉ループは上下の線部分
をどこまで含めるべきかはつきりせず、適当な所
で打切ることになるので、あいまいさが残る。
However, (1) with the above method, it is not possible to clearly associate the extracted closed-loop information (sequence of contour points) with the figure to be cut out. That is, when a figure has a line width, the contour points and the center line of the figure do not match, so a figure with a closed loop cannot be accurately separated from other figures. In Figure 5a, closed-loop information is extracted from the original image of a thick line figure. Although the inner closed loop of the original image can be clearly extracted, it is not clear how much of the upper and lower line parts should be included in the outer closed loop. Instead, it ends at an appropriate point, so ambiguity remains.

また(2)前記の方式では、折線データは計算機
の主記憶に1次元に並べられ、第5図bに示すよ
うに例えば線分からスタートして,,と
進み、次はブランチしているので,あるいは
へ進みというように、座標値をキーに折線を辿
り、一巡できれば閉ループでありとするので、行
つて戻る部分が発生し、また折線テーブルに記憶
している順番と探索順が一致していないので探索
に時間がかゝる。
In addition, (2) in the above method, the line data is arranged one-dimensionally in the main memory of the computer, and as shown in Figure 5b, for example, it starts from a line, progresses, and then branches. Or go to, the polygon line is followed using the coordinate value as a key, and if it can complete one cycle, it is considered a closed loop, so there is a part where it goes back and forth, and the order stored in the polygon table does not match the search order. So it takes time to explore.

また(3)前記,の方式とも、図形の内部と外
部の判定が煩雑である。例えば第5図cに示すよ
うに閉図形内にまた閉図形があるようなものでは
複数の外ループ及び複数の内ループがあるが、こ
れら内、外ループの判定が厄介である。
In addition, in both the methods (3) and (3) above, determining the inside and outside of a figure is complicated. For example, in a case where there is a closed figure within another closed figure, as shown in FIG.

更に(4)前記,の方式とも閉ループと無関係
な図形部分も探索しなくてはならない。例えば第
5図dに示すように閉ループは局部的で、残りの
大部分は開放ブランチであるような場合、これら
の開放ブランチも全て探索するので無駄が多い。
Furthermore, in the method (4) above, it is also necessary to search for parts of the figure that are unrelated to the closed loop. For example, as shown in FIG. 5d, if the closed loop is local and most of the remaining branches are open branches, all of these open branches are also searched, which is wasteful.

〔問題点を解決するための手段〕[Means for solving problems]

本発明では前記問題点(1)を解決するために折線
データを処理対象にし、また前記問題点(2)を解決
するために探索に適した分岐点テーブル、アーク
テーブルを用い、また問題点(3)を解決するために
折線の角度差の和を計算し、更に問題点(4)を解決
するために不要箇所を予め削除する前処理を行な
う。
In the present invention, in order to solve the above-mentioned problem (1), line data is processed, and in order to solve the above-mentioned problem (2), a branch point table and an arc table suitable for search are used. In order to solve problem (3), the sum of the angle differences between the broken lines is calculated, and in order to solve problem (4), preprocessing is performed to delete unnecessary parts in advance.

即ち本発明は、細線化および折線化された図形
のデータより閉ループ情報を抽出する閉図形識別
装置において、該図形の各線分の両端の座標およ
び端点接続情報を記憶する折線データメモリM1
と、該図形の分岐点に接続する線分群を示す分岐
テーブルM3と、線分のオープン端点又は分岐点
から次のオープン端点又は分岐点を結ぶ線分群の
始、終端線分を記憶するアークテーブルM2と、
折線データメモリをアクセスしてオープン端点を
持つアークを削除するオープンアーク削除機構P
1と、非オープンアークの各線分を右廻り又は左
廻りに順次選択して隣り合う線分の角度差の和を
求める機構P2,P3と、非オープンアークの各
線分を辿つて一巡したとき当該各線分群を閉ルー
プとしてその辿つた方向を示すフラグと共にルー
プデータメモリへ格納するループデータ作成機構
P4とを備えることを特徴とするものである。
That is, the present invention provides a closed figure identification device that extracts closed loop information from the data of a figure that has been thinned and broken lines.
, a branch table M3 indicating a group of line segments connected to a branch point of the figure, and an arc table storing the start and end line segments of the line segment group connecting an open end point or branch point of a line segment to the next open end point or branch point. M2 and
Open arc deletion mechanism P that accesses the broken line data memory and deletes arcs with open end points
1, mechanisms P2 and P3 that sequentially select each line segment of a non-open arc clockwise or counterclockwise and calculate the sum of the angular differences of adjacent line segments; The present invention is characterized by comprising a loop data creation mechanism P4 that stores each group of line segments as a closed loop in a loop data memory together with a flag indicating the direction followed.

〔作用〕 この方式によれば、折線データを処理対象とし
ているので、閉ループ情報も折線データの組とし
て表現でき、図形とループ情報の不一致がない。
[Operation] According to this method, since the polygonal line data is processed, closed loop information can also be expressed as a set of polygonal line data, and there is no mismatch between the figure and the loop information.

また探索に適した予備テーブルを使用し、前処
理で不要箇所を削除するので高速処理が可能であ
り、更に、折線データを探索する際に折線間の各
度差を求めるので、その和により、無駄な計算を
することなく、外廻りループと内廻りループを識
別することができる。
In addition, by using a preliminary table suitable for searching and deleting unnecessary parts in preprocessing, high-speed processing is possible.Furthermore, when searching the polygonal line data, the degree difference between each polygonal line is calculated, so by the sum of the differences, Outer loops and inner loops can be identified without unnecessary calculations.

〔実施例〕〔Example〕

本発明の基本となるデータ構造を、第2図に示
す。図形に対して細線化、折線化した結果、第2
図aの線分1,2,……9が得られたとする。こ
れらの線分1,2,……のデータ,、……
は、同図bの如くメモリM1に順に格納してお
く。この格納順は必ずしもループ中の折線順では
ない。線分データのフオーマツトは第1図eに示
す如くで、線分の始終端座標X1,Y1,X2,
Y2及び端点の接続情報N1,N2からなる。端
点がオープンのときNは0、屈曲(次の線分1つ
ある)のとき1、分岐のとき2である。この細線
化、折線化した図形にはオープン端点(この先に
は線分がない端点)a,b、分岐点,がある
が、端点又は分岐点から次の端点又は分岐点を結
ぶ線分又は線分群をアークと呼び、その始、終端
アークを第2図cのアークテーブルM3に格納す
る。また分岐点については第2図dの分岐テーブ
ルM2を設ける。これは分岐点に始、終端を持つ
線分を示したものであり、順番は問わないがこゝ
では反時計廻りとする。従つて分岐点について
は−−(−−などでもよい)、分岐
点については−−(−−などでも
よい)となる。
FIG. 2 shows the data structure that is the basis of the present invention. As a result of thinning and breaking lines for the figure, the second
Suppose that line segments 1, 2, . . . 9 in figure a are obtained. Data of these line segments 1, 2,...
are sequentially stored in the memory M1 as shown in FIG. This storage order is not necessarily the order of broken lines in the loop. The format of the line segment data is as shown in Figure 1e, where the starting and ending coordinates of the line segment are X1, Y1, X2,
It consists of Y2 and end point connection information N1, N2. N is 0 when the end point is open, 1 when it is a bend (there is one next line segment), and 2 when it is a branch. This thinned or broken line figure has open endpoints (endpoints with no line segment beyond this) a and b, and branching points, but the line segment or line that connects one endpoint or branching point to the next endpoint or branching point A subgroup is called an arc, and its starting and ending arcs are stored in the arc table M3 in FIG. 2c. Further, for branch points, a branch table M2 shown in FIG. 2d is provided. This shows a line segment that starts and ends at a branch point, and although the order does not matter, here it is assumed to be counterclockwise. Therefore, for a branch point, it is --(--, etc.), and for a branch point, it is --(--, etc.).

オープン端点を持つ線分はループを構成するこ
とはないから、本発明ではかゝる線分は処理対象
から除く(不要部分の削除)。この線分除去を行
なうと次の線分がオープン端点を持つことになる
ことがあるが、この場合は該線分も処理対象から
除く。こうしてオープン線分を次々と除いて行く
と、若しループがあればその分岐点に達してオー
プン線分除去は止む。従つてこのオープン線分の
除去はオープンアークの除去になる。
Since line segments with open end points do not constitute a loop, such line segments are excluded from processing targets (deletion of unnecessary portions) in the present invention. If this line segment removal is performed, the next line segment may have an open end point, but in this case, this line segment is also removed from the processing target. When open line segments are removed one after another in this way, if there is a loop, the branch point is reached and the removal of open line segments stops. Removal of this open line segment therefore results in the removal of open arcs.

分岐点はオープンアーク間にもあるが、オープ
ンアークは除去するので最終的に残るのは閉図形
のみ、又は複数の閉図形とそれらを結ぶ線分のみ
である。第1図fに後者を示す。
Branch points also exist between open arcs, but since open arcs are removed, what remains in the end is only a closed figure, or only a plurality of closed figures and line segments connecting them. The latter is shown in Figure 1f.

第1図に閉図形識別を行なう装置の構成を示
す。M1は折線データメモリ、M2は分岐テーブ
ル、M3はアークテーブル、M4はループデータ
メモリである。P1〜P5は処理部で、P1が上
記のオープンアーク削除を行なう。このオープン
アーク削除機構P1はアークテーブルM3の各ア
ークにつき、その両端の線分の端点情報N1また
はN2をメモリM1より読出してチエツクし、0
であればオープンアークとして、該アークの各線
分に対し、折線データメモリM1中のその線分デ
ータに不使用フラグを立てる。第2図aの場合、
アーク1,3は線分1,6の一方の端点a,bが
オープンでN1又はN2が0であるからオープン
アークであり、従つてメモリM1中の線分1,6
のデータに不使用フラグが立てられる。アーク
2,4はその両端の線分2と5,7と9のN1,
N2はいずれも0でないので、非オープンアーク
である。アークテーブルM3にも、オープンアー
クには不使用のフラグを立てておく。
FIG. 1 shows the configuration of an apparatus for identifying closed figures. M1 is a line data memory, M2 is a branch table, M3 is an arc table, and M4 is a loop data memory. P1 to P5 are processing units, and P1 performs the above-mentioned open arc deletion. This open arc deletion mechanism P1 reads end point information N1 or N2 of the line segments at both ends of each arc in the arc table M3 from the memory M1, checks it, and
If so, an unused flag is set for each line segment of the arc in the line segment data memory M1 as an open arc. In the case of Figure 2 a,
Arcs 1 and 3 are open arcs because one end point a and b of line segments 1 and 6 are open and N1 or N2 is 0. Therefore, line segments 1 and 6 in memory M1 are open arcs.
The unused data is flagged as unused. Arcs 2 and 4 are N1 of line segments 2 and 5, 7 and 9 at both ends,
Since neither N2 is 0, it is a non-open arc. An unused flag is also set in the arc table M3 for open arcs.

オープンアークを除去すると第2図fの如き、
ひげなし図形になるが、こゝで各領域の周囲を廻
るループを考えるに、当該領域を左手伝いに廻る
(領域の輪郭線に左手を触れながら廻る)として
内側を廻るときは図示のように右廻り(時計方向
廻り)になり、外側を廻るときは左廻りになる。
各線分をベクトルとして扱い、その隣り合うベク
トルの角度差の和を求めると右廻りのとき2π、
左廻りのとき−2πになるので、これよりひ左廻
りか右廻りか、従つて内ループか外ループかを求
めることができる。ベクトル探索機構P2及び角
度差計算機構P3はこの処理を行なう。
If the open arc is removed, it will look like Figure 2 f.
It will be a figure without whiskers, but if we consider the loop that goes around each area, we can go around the area with the left hand (touching the outline of the area with our left hand) and go around the inside as shown in the figure. It rotates to the right (clockwise), and when it rotates around the outside, it rotates to the left.
Treating each line segment as a vector, and finding the sum of the angular differences between adjacent vectors, we get 2π for clockwise rotation.
When the rotation is counterclockwise, it becomes -2π, so from this we can determine whether the rotation is counterclockwise or clockwise, and therefore whether it is an inner loop or an outer loop. The vector search mechanism P2 and the angle difference calculation mechanism P3 perform this process.

即ちベクトル探索機構P2はアークテーブルM
3の非オープンアークを選び、その線分の番号
(ベクトル番号)をレジスタR1に格納する。そ
して角度差計算機構P3はレジスタR1に前回セ
ツトされた番号のベクトルと今回セツトされた番
号のベクトルの角度差を計算し、前回角度差との
和を記憶する。ベクトル探索機構P2はアークテ
ーブルM3および折線データメモリM1を参照し
ながら、ある非オープンアークの端の線分からそ
のアーク内線分の番号を逐次レジスタR1にセツ
トしたとすると、角度差計算機構P3はそのアー
クの曲り角(各線分の各度差の和)を算出し、記
憶する。アークの端で分岐点に達するが、次はど
の線分を選ぶべきかは分岐テーブルM2より知る
ことができる。
That is, the vector search mechanism P2 uses the arc table M
3 non-open arc is selected and the line segment number (vector number) is stored in register R1. Then, the angular difference calculating mechanism P3 calculates the angular difference between the vector of the number set last time and the vector of the number set this time in the register R1, and stores the sum of the previous angular difference. Assuming that the vector search mechanism P2 sequentially sets the number of the line segment within the arc from the line segment at the end of a certain non-open arc to the register R1 while referring to the arc table M3 and the broken line data memory M1, the angle difference calculation mechanism P3 The bending angle of the arc (the sum of the degree differences of each line segment) is calculated and stored. A branch point is reached at the end of the arc, but which line segment to select next can be determined from the branch table M2.

例えばアーク2を選び、線分2,3,……5の
番号のレジスタR1にセツトし、これらの角度差
の和を求めたとすると、線分5でアーク2は終る
が、このとき分岐テーブルM2をアクセスし、線
分5は分岐点Bに属し、これには線分6,7が続
くことを知る。そして前記の不使用フラグを分岐
テーブルにも付しておけば、次の処理対象は線分
7であると分り、アークテーブルM3を参照する
とこれはアーク4に属することが分る。従つて次
はアーク4を処理対象とすればよい。
For example, if we select arc 2, set it in register R1 with the numbers of line segments 2, 3, ... 5, and find the sum of these angle differences, arc 2 ends at line segment 5, but at this time branch table M2 , and know that line segment 5 belongs to branch point B, and that line segments 6 and 7 follow it. If the above-mentioned unused flag is also attached to the branch table, it can be determined that the next processing target is line segment 7, and by referring to arc table M3, it can be determined that this belongs to arc 4. Therefore, arc 4 should be the next target to be processed.

処理対象とした線分には方向フラグを付してお
く。線分選択方向が、線分(ベクトル)の起点
(From)から終点(To)の方向であれば正方向
+、その逆であれば負方向−とする。第2図gに
この一例を示す。探索方向には内廻り(右廻り)
と外廻り(左廻り)があるが、この例は内廻りで
あり、この場合分岐点では進行方向で最も右手寄
りのものを選ぶ。これは、分岐テーブルでは反時
計方向に線分を並べてあるから、単純に次の線分
を選ぶ、ということである。
A direction flag is attached to the line segment to be processed. If the line segment selection direction is from the starting point (From) to the ending point (To) of the line segment (vector), the positive direction is +, and if it is the opposite, it is the negative direction -. An example of this is shown in Figure 2g. The search direction is inward (clockwise)
There is an outer rotation (counterclockwise rotation), but this example is an inner rotation, and in this case, at the branch point, choose the one closest to the right in the direction of travel. This means that the line segments are arranged counterclockwise in the branch table, so simply select the next line segment.

ループが2つ、一部を共用して隣接している
と、その共用部は同じ内廻りでも探索方向は逆に
なり、方向フラグは+と−がつくことになる。ま
た共用しない部分も外廻り(左廻り)では探索方
向が逆になる。従つて1つの線分には正、負方向
フラグが付くことになり、そしてこれらが付いた
線分は探索済みである。ベクトル探索機構は線分
の方向フラグをチエツクし、正、負方向フラグが
付いておればもはやそのベクトル番号をレジスタ
R1にセツトすることはしない。折線データメモ
リM1中の全ての線分に正、逆方向フラグが付い
たとき、ループ探索終了である。
If two loops share a part and are adjacent to each other, the search direction will be reversed even though the shared part has the same inner circumference, and the direction flag will be marked + and -. Also, the search direction is reversed in the outer (counterclockwise) portion of the non-shared portion. Therefore, one line segment is attached with positive and negative direction flags, and the line segment with these flags has been searched. The vector search mechanism checks the direction flag of the line segment, and if the positive and negative direction flags are attached, the vector number is no longer set in register R1. When all line segments in the polyline data memory M1 are marked with forward and reverse direction flags, the loop search ends.

アークを選択して行つてもはやその探索方向で
は処理対象線分がなくなつたとき、または角度差
の総和が2π(又は−2π)になつたとき、あるいは
最初へ戻つたとき(最初のアークの始端線分の始
端とその後のアークの最後の線分の終端が同じ座
標値になつたとき)、ループは閉じたのであり、
このときループデータ作成機構P4は当該ループ
にIDを付し、内廻り、外廻りを示すフラグと共
に該ループの線分群をループテーブルM4に登録
する。これらの概要を処理順に示すと次の如くな
る。
When an arc is selected and there are no more line segments to be processed in that search direction, or when the sum of the angular differences becomes 2π (or -2π), or when returning to the beginning (from the first arc) The loop is closed when the starting point of the starting line segment and the ending point of the last line segment of the subsequent arc have the same coordinate values.
At this time, the loop data creation mechanism P4 assigns an ID to the loop, and registers the group of line segments of the loop in the loop table M4 together with flags indicating inner and outer loops. An overview of these processes in the order of processing is as follows.

ステツプ1:折線データの中でオープンアークに
含まれるアークは処理対象から除外する。これ
を繰り返してすべてのオープンアーク除外した
らステツプ2へ進む。
Step 1: Arcs included in open arcs in the line data are excluded from processing. Repeat this until all open arcs are removed, then proceed to step 2.

ステツプ2:任意のベクトルを1つ選ぶ。そのベ
クトルに正、逆方向フラグが共につけられてい
たら不採用とし、他のベクトルを選ぶ ステツプ3:ベクトルのフラグがついていない方
向に探索する。即ち正方向の場合はTo側端点、
逆方向の場合はFrom側端点に連結しているベ
クトルを探す。方向フラグをベクトルに与え
る。端点が分岐点の場合は、複数の分岐ベクト
ルの中から最も右手寄りのもの選ぶ(右廻りの
とき)。該当するベクトルが見つからないとき
はループが閉じたと判定してループテーブルに
登録し、ステツプ2へ戻る。他の場合はステツ
プ3を繰り返す。
Step 2: Select one arbitrary vector. If both the forward and reverse direction flags are attached to the vector, it is rejected and another vector is selected.Step 3: A search is performed in the direction where the vector is not flagged. In other words, in the case of the positive direction, the To side end point,
In the case of the opposite direction, search for a vector connected to the From side end point. Gives a direction flag to the vector. If the end point is a branch point, choose the one closest to the right from among multiple branch vectors (for clockwise rotation). If the corresponding vector is not found, it is determined that the loop is closed, it is registered in the loop table, and the process returns to step 2. Otherwise, repeat step 3.

コントロール機構P5は全体の機構の動きをモ
ニタし、調整する。碁盤の目のような線図形で
は、目を1つ廻るループ、2つ廻るループ、……
など多数のループが考えられるが、本発明では目
を1つのみ廻る小廻り(内廻り)ループと、全体
を外廻りするループのみを対象とする。従つて線
分に正、逆方向フラグが付けばその線分は探索終
了になる。
Control mechanism P5 monitors and adjusts the movement of the entire mechanism. In a line figure like a checkerboard, there are loops that go around one eye, loops that go around two eyes, etc.
Although a large number of loops are possible, the present invention deals with only a small (inner) loop in which only one eye revolves, and a loop in which the entire eye revolves outward. Therefore, if a forward or reverse direction flag is attached to a line segment, the search for that line segment ends.

右廻りのとき各線分の角度差の和は2πになる
が、これは第2図hに示すように各ベクトルV1
V2、……の角度差θ1,θ2、……の和Σθiは各ベク
トルがループ内の点Pに対する角α1,α2、……の
和Σαiに等しく、一巡すればΣαi=2πであること
による。左廻りなら逆方向であるからΣαi=−2π
である。
When turning clockwise, the sum of the angular differences of each line segment is 2π, which means that each vector V 1 ,
The sum Σθi of the angular differences θ 1 , θ 2 , ... of V 2 , ... is equal to the sum Σαi of the angles α 1 , α 2 , ... for each vector with respect to the point P in the loop, and after one round, Σαi = 2π By being. If it is counterclockwise, it is in the opposite direction, so Σαi = −2π
It is.

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

以上説明したように本発明によれば、折線デー
タを処理対象とするので閉ループ情報も折線デー
タの組として表現でき、図形とループ情報との不
一致がない。画像とループ輪郭の対応付けは不要
である。また検索に適した予備テーブルを使用す
るので高速処理ができる。また折線データを探索
する際に折線間の角度差を求め、簡単に外廻りル
ープ、内廻りループの区別をすることができる等
の利点が得られる。
As explained above, according to the present invention, since the polygonal line data is processed, closed loop information can also be expressed as a set of polygonal line data, and there is no mismatch between the figure and the loop information. There is no need to associate images with loop contours. Also, since a spare table suitable for searching is used, high-speed processing is possible. Further, when searching for broken line data, the angle difference between broken lines can be found, and advantages such as being able to easily distinguish between outer loops and inner loops can be obtained.

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

第1図は本発明の構成を示すブロツク図、第2
図は本発明の各部の説明図、第3図は閉図形の説
明図、第4図は従来方式の説明図、第5図は従来
方式の問題点の説明図である。 図面でM1は折線データメモリ、M2はアーク
テーブル、M3は分岐テーブル、P1はオープン
アーク削除機構、P2はベクトル探索機構、P
3,P4は角度差の和を求める機構である。
Figure 1 is a block diagram showing the configuration of the present invention, Figure 2 is a block diagram showing the configuration of the present invention.
3 is an explanatory diagram of each part of the present invention, FIG. 3 is an explanatory diagram of a closed figure, FIG. 4 is an explanatory diagram of a conventional system, and FIG. 5 is an explanatory diagram of problems of the conventional system. In the drawing, M1 is a broken line data memory, M2 is an arc table, M3 is a branch table, P1 is an open arc deletion mechanism, P2 is a vector search mechanism, and P
3, P4 is a mechanism for calculating the sum of angular differences.

Claims (1)

【特許請求の範囲】 1 細線化および折線化された図形のデータより
閉ループ情報を抽出する閉図形識別装置におい
て、 該図形の各線分の両端の座標および端点接続情
報を記憶する折線データメモリM1と、 該図形の分岐点に接続する線分群を示す分岐テ
ーブルM3と、 線分のオープン端点又は分岐点から次のオープ
ン端点又は分岐点を結ぶ線分群の始、終端線分を
記憶するアークテーブルM2と、 折線データメモリをアクセスしてオープン端点
を持つアークを削除するオープンアーク削除機構
P1と、 非オープンアークの各線分を右廻り又は左廻り
に順次選択して隣り合う線分の角度差の和を求め
る機構P2,P3と、 非オープンアークの各線分を辿つて一巡したと
き当該各線分群を閉ループとしてその辿つた方向
を示すフラグと共にループデータメモリへ格納す
るループデータ作成機構P4とを備えることを特
徴とする閉図形識別装置。
[Scope of Claims] 1. A closed figure identification device that extracts closed loop information from the data of figures that have been thinned and broken lines, comprising: a broken line data memory M1 that stores the coordinates of both ends of each line segment of the figure, and end point connection information; , a branching table M3 indicating a group of line segments connected to a branching point of the figure, and an arc table M2 storing the start and end line segments of the line segment group connecting an open endpoint or branching point of a line segment to the next open endpoint or branching point. , an open arc deletion mechanism P1 that accesses the broken line data memory and deletes arcs with open end points, and selects each line segment of non-open arcs clockwise or counterclockwise one after another and calculates the sum of the angular differences between adjacent line segments. and a loop data creation mechanism P4 that stores each line segment group in a loop data memory as a closed loop when each line segment of a non-open arc is traced and a flag indicating the direction of the line segment is traced. Features a closed figure identification device.
JP61093042A 1986-04-22 1986-04-22 Closed graphic identifier Granted JPS62248080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61093042A JPS62248080A (en) 1986-04-22 1986-04-22 Closed graphic identifier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61093042A JPS62248080A (en) 1986-04-22 1986-04-22 Closed graphic identifier

Publications (2)

Publication Number Publication Date
JPS62248080A JPS62248080A (en) 1987-10-29
JPH0464114B2 true JPH0464114B2 (en) 1992-10-13

Family

ID=14071446

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61093042A Granted JPS62248080A (en) 1986-04-22 1986-04-22 Closed graphic identifier

Country Status (1)

Country Link
JP (1) JPS62248080A (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01129368A (en) * 1987-11-16 1989-05-22 Canon Inc Picture recognition device
JPH02189688A (en) * 1989-01-18 1990-07-25 Mitsubishi Electric Corp Area detecting device
JPH0744585A (en) * 1993-07-27 1995-02-14 Nec Corp Design method of multilayer printed wiring board
JP2007128173A (en) * 2005-11-01 2007-05-24 Fuji Heavy Ind Ltd Area calculation method using CAD
JP5661393B2 (en) * 2010-09-17 2015-01-28 グローリー株式会社 Border recognition method and border recognition device

Also Published As

Publication number Publication date
JPS62248080A (en) 1987-10-29

Similar Documents

Publication Publication Date Title
Arcelli et al. A one-pass two-operation process to detect the skeletal pixels on the 4-distance transform
Boccignone et al. Recovering dynamic information from static handwriting
Arcelli et al. Computing Voronoi diagrams in digital pictures
Liu et al. Tfg-net: A text feature-guided network for small traffic sign detection
JPH0464114B2 (en)
CN112541492A (en) Image inclined text detection method based on deep learning
Huang et al. A survey on feature point extraction techniques
Ramel et al. A structural representation adapted to handwritten symbol recognition
JP2859453B2 (en) Image thinning method
JP2938887B2 (en) Outline figure matching method
JPH0139153B2 (en)
JPH064600A (en) Image search method and image search apparatus
JPH0415506B2 (en)
JPH06131446A (en) Method and device for fingerprint collation
JP2650443B2 (en) Line figure vectorization method
JP2522511B2 (en) Image contour tracking unit
JP2782977B2 (en) Line figure vectorization method and apparatus
Tian et al. A Research of Feature Matching Algorithm Based on Monocular Vision SLAM
CN120747221A (en) Gerber data-based piece identification system and method
JP3037504B2 (en) Image processing method and apparatus
JPH06103366A (en) Fingerprint collating method/device
CN121147556A (en) A vector-based image feature point matching method, program, device, and storage medium
JP2601531B2 (en) Computer mapping device
JPH0468477A (en) Broken line extracting method
Ambrosio et al. Extracting and matching perceptual groups for hierarchical stereo vision