JPH11134507A - Segment extracting process method - Google Patents

Segment extracting process method

Info

Publication number
JPH11134507A
JPH11134507A JP29398497A JP29398497A JPH11134507A JP H11134507 A JPH11134507 A JP H11134507A JP 29398497 A JP29398497 A JP 29398497A JP 29398497 A JP29398497 A JP 29398497A JP H11134507 A JPH11134507 A JP H11134507A
Authority
JP
Japan
Prior art keywords
continuous
center line
point
pixel
white
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP29398497A
Other languages
Japanese (ja)
Inventor
Yasuhiro Aoki
康浩 青木
Akio Shio
昭夫 塩
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP29398497A priority Critical patent/JPH11134507A/en
Publication of JPH11134507A publication Critical patent/JPH11134507A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable use for the vectorization of various drawing data by finding an upward continuous area paired with a downward continuous area and forming a center line halfway between the both, and finding a leftward continuous area paired with a rightward continuous area and forming a center line halfway between the both. SOLUTION: The outline pixels of a segment are traced in an outline tracing process 1 to acquire a coordinate sequence and it is checked whether or not pixels adjoining each outline pixel in the four upward and downward, and right and left directions are white or black to obtain information. A segment is extracted in an outline segment extracting process 2 from the outline. In a center line extracting process 3, paired segments are detected from segments of the outline area and a center line is found at the intermediate position between both the segments. In a feature point detecting process 4, an intersection and a branch point are found from the center line information. Namely, the upward continuous area paired with the downward continuous area is found to form the center line halfway between the both, and the leftward continuous area paired with the rightward continuous area is found to form the center line halfway between the both.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ラスタデータか
ら、線分の交差点、分岐点、端点、屈折点等を検出し、
線分をベクトルデータに自動変換する方法であって、図
面を電子化するための自動入力用ツールや、画像から線
分特徴抽出後のベクトル化処理手法などとして利用する
線分抽出処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention detects an intersection, a branch point, an end point, a refraction point, etc. of a line segment from raster data.
The present invention relates to a method for automatically converting a line segment into vector data, which relates to an automatic input tool for digitizing a drawing and a line segment extraction processing method used as a vectorization processing method after extracting a line segment feature from an image.

【0002】[0002]

【従来の技術】従来、ラスタデータに対して、線分の交
差点、分岐点などを表すパタンを順次比較し検出する手
法などがあるが、雑音や歪みなどの大きいデータの場
合、交差点付近などの局所的な部分の比較では正確な検
出が困難であった。
2. Description of the Related Art Conventionally, there is a method of sequentially comparing patterns representing intersections and branch points of line segments with raster data and detecting the data. Accurate detection was difficult with local comparisons.

【0003】[0003]

【発明が解決しようとする課題】上述で述べたように、
局所的なパタン比較では歪みや雑音に大きく影響を受
け、信頼性に欠ける。また、パタン比較をラスタデータ
全面に対して順次行っているので処理量が非常に大き
い。
SUMMARY OF THE INVENTION As mentioned above,
Local pattern comparison is greatly affected by distortion and noise, and lacks reliability. Further, since the pattern comparison is sequentially performed on the entire raster data, the processing amount is very large.

【0004】本発明は、上記問題を解決することによ
り、高速かつ信頼性の高い手法を提供し、各種図面デー
タのベクトル化や画像からの直線検出処理後のベクトル
化などに利用可能にすることを目的としている。
An object of the present invention is to provide a high-speed and high-reliability method by solving the above-mentioned problems, and to be able to use the method for vectorization of various drawing data and vectorization after a line detection process from an image. It is an object.

【0005】[0005]

【課題を解決するための手段】線分を表す画素を追跡す
る際、軌跡を表す座標列とともに、各追跡画素の隣接画
素の情報を記録する。この隣接画素情報に基づいて、各
交差点や分岐点、端点で区切られた線分を求め、該線分
情報から各交差点や分岐点等を求める。この手法では、
ラスタデータ上の処理を線分の輪郭追跡のみとして計算
量を抑えることができた。また、交差点等の探索は、線
分の位置、傾き情報などを用いることでより安定な検出
を可能にした。
When a pixel representing a line segment is tracked, information on a pixel adjacent to each tracking pixel is recorded together with a coordinate sequence representing a trajectory. Based on the adjacent pixel information, a line segment divided by each intersection, branch point, or end point is obtained, and each intersection, branch point, or the like is obtained from the line segment information. In this technique,
The processing amount on the raster data can be reduced by only tracking the outline of the line segment. In addition, in the search for an intersection or the like, more stable detection is enabled by using the position of the line segment, inclination information, and the like.

【0006】[0006]

【発明の実施の形態】本発明は、線分を表すラスタデー
タから線分をベクトルデータとして自動認識する手法と
して利用可能である。以下は建築用平面図から線分を自
動認識する処理に適用した実施例である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention can be used as a method for automatically recognizing a line segment as vector data from raster data representing the line segment. The following is an embodiment applied to a process of automatically recognizing a line segment from a building plan.

【0007】図1は本発明の処理手順を示す。図中の符
号1は輪郭追跡処理、2は輪郭線分抽出処理、3は中心
線抽出処理、4は特徴点検出処理を表している。輪郭追
跡処理1では、線分の輪郭画素を追跡し、その座標列を
獲得するとともに、各輪郭画素に隣接する上下左右4方
向の画素に関し、白画素であるか黒画素であるかをチェ
ックし、その情報を獲得している。輪郭線分抽出処理2
では、該輪郭追跡処理1で得られた情報を基に、輪郭線
の中から線分を抽出している。
FIG. 1 shows a processing procedure of the present invention. In the drawing, reference numeral 1 denotes contour tracking processing, 2 denotes contour line extraction processing, 3 denotes center line extraction processing, and 4 denotes feature point detection processing. In the contour tracking process 1, the contour pixels of the line segment are tracked, the coordinate sequence is obtained, and the pixels adjacent to each contour pixel in the four directions (up, down, left, right) are checked whether they are white pixels or black pixels. , Have gained that information. Contour line extraction processing 2
In, a line segment is extracted from the outline based on the information obtained in the outline tracking processing 1.

【0008】中心線抽出処理3では、該輪郭線分抽出処
理2で求めた輪郭領域の線分から対になる線分を検出
し、両線分に挟まれた中間位置に中心線を求めている。
特徴点検出処理4では、該中心線抽出処理3で求めた中
心線情報から、交差点、分岐点などの特徴点を求めてい
る。
In the center line extraction process 3, a pair of line segments is detected from the line segment of the contour area obtained in the contour line segment extraction process 2, and a center line is obtained at an intermediate position between the two line segments. .
In the feature point detection processing 4, feature points such as intersections and branch points are obtained from the center line information obtained in the center line extraction processing 3.

【0009】輪郭追跡処理1について説明する。輪郭追
跡処理は、例えば図2に示すように、線を表す黒画素に
沿って白画素上を順に追跡する処理である。本例では画
素の追跡は8近傍(次点は隣接する8画素から選ばれ
る)で行っている。
The contour tracing process 1 will be described. The contour tracking process is a process of sequentially tracking white pixels along black pixels representing a line, for example, as shown in FIG. In this example, tracking of pixels is performed in the vicinity of eight pixels (the next point is selected from eight adjacent pixels).

【0010】以下に具体例を説明する。イメージ上の線
分をベクタライズするために、イメージの輪郭点情報を
取得する。輪郭点のトレースは、白画素トレース(黒領
域との境界線の外側の白画素)とする。
A specific example will be described below. In order to vectorize a line segment on an image, contour point information of the image is obtained. The trace of the contour point is a white pixel trace (white pixels outside the boundary line with the black region).

【0011】図3は外輪郭トレースの開始点と内輪郭ト
レースの開始点とを説明する図である。図において「未
トレース白点」とある点がトレースの開始点となる点で
ある。即ち、外輪郭トレースの開始点の場合において
は、白である未トレース点が見出された際に、「当該点
の上が白点でありかつ斜め右上が白点でありかつ右が黒
点であったとした場合に」当該白である未トレース点を
外輪郭トレース開始点とする。同様に、内輪郭トレース
の開始点の場合においては、白である未トレース点が見
出された際に、「当該点の上が黒でありかつ斜め左上が
白でありかつ左が白である場合に」当該白である未トレ
ース点を内輪郭トレース開始点とする。
FIG. 3 is a diagram for explaining the start point of the outer contour trace and the start point of the inner contour trace. In the figure, a point "untraced white point" is a point to be a trace start point. That is, in the case of the start point of the outer contour trace, when an untraced point that is white is found, it is determined that “a white point is on the point, a white point is on the diagonally upper right, and a black point is on the right. If so, the white untraced point is set as the outer contour trace start point. Similarly, in the case of the start point of the inner contour trace, when an untraced point that is white is found, “the upper part of the point is black, the upper left diagonal is white, and the left part is white. In this case, the white untraced point is set as the inner contour trace start point.

【0012】図4(a)と図4(b)とは現在の着目点
からみて次のどの位置の白点にトレースを移行するか
(次トレース点の決定)を説明する図である。図4
(a)は、図4(b)に示す「次トレース点の決定条
件」についての図の読み方を説明している。図中の「記
号の意味」は、黒四角は黒点、白四角は白点、数字つき
白丸は前トレース点、白丸は現在の着目点、菱形は白で
も黒でもよい点を図で示している。また「トレース方向
の一覧」は、現在の着目点(白丸)からみての方向を図
で示したものであり、例えば左上方向の点を「1」とし
て示している。そして「図の説明」は、着目点(白丸)
が置かれている状況の下で「次点決定条件」で表される
如きパターンが存在している場合に「次トレース点」で
表される位置「7」を次トレース点として決定し、トレ
ースをその点に移行することを表している。
FIGS. 4 (a) and 4 (b) are diagrams for explaining to which next white point the trace is shifted from the current point of interest (determination of the next trace point). FIG.
(A) explains how to read the figure for the "determination condition of the next trace point" shown in FIG. 4 (b). In the figure, the meaning of the symbol indicates a black square as a black point, a white square as a white point, a white circle with a number as a previous trace point, a white circle as a current point of interest, and a diamond as a point that may be white or black. . Further, the “list of trace directions” is a diagram showing the direction as viewed from the current point of interest (white circle). For example, a point in the upper left direction is shown as “1”. And "explanation of figure" is a point of interest (open circle)
When a pattern such as “next-point determination condition” exists under the situation where is placed, the position “7” represented by “next-trace point” is determined as the next trace point, and the trace is performed. To the point.

【0013】図4(b)においては、前トレース点の位
置にもとづいて4つの場合分けが与えられており、夫々
の場合毎に6個のパターンが示されている。例えば、前
トレース点が「1」か「2」かの位置であったとして現
在の着目点(白丸)が置かれている状況が「上が黒で、
右上が白で、右が白で、右下と下と左下とが任意である
場合」には、図4(a)に示す「7」の位置に存在する
白点にトレースを移行するようにする。次トレース点
は、着目点(白丸)の周囲に存在する黒点に対して「右
回り」にみて決定されていると考えてもよい。
In FIG. 4B, four cases are given based on the position of the previous trace point, and six patterns are shown in each case. For example, assuming that the previous trace point is the position of “1” or “2”, the situation where the current point of interest (white circle) is placed is “black on top,
When the upper right is white, the right is white, and the lower right, lower, and lower left are arbitrary, the trace is shifted to the white point existing at the position “7” shown in FIG. I do. The next trace point may be considered to be determined “clockwise” with respect to the black point existing around the point of interest (white circle).

【0014】イメージの左上からラスタ走査を行い、図
3に示す開始点の条件を満たす点をトレース開始点とす
る。次トレースの決定は、着目点に対して図4に示す条
件でおこなう。上記の条件に基づいて輪郭追跡し、その
際に、各追跡画素に隣接する画素情報も記録する。図5
(a)は線分を表す黒画素に対して、それに隣接する白
画素(A,B,C,D,E... )を図4の条件の下で追
跡したことを表す図である。図5(a)は図示の白画素
αから白画素βをへて白画素Aに至ったものとしてい
る。言うまでもなく開始点に戻ったらトレースは終りと
なる。図5(b)には、軌跡を表す画素A,B,C,
D,Eの夫々に対して上下左右の4方向に隣接する画素
を表しているが、本処理ではこのように軌跡の各画素に
隣接する4方向の画素について、白/黒のどちらの画素
であるのかを記録する。その結果を図5(c)に示すよ
うに、軌跡順に画素の座標と、その隣接画素情報として
隣接画素テーブルの形で格納するのである。
A raster scan is performed from the upper left of the image, and a point that satisfies the conditions of the start point shown in FIG. 3 is set as a trace start point. The determination of the next trace is performed for the point of interest under the conditions shown in FIG. Contour tracking is performed based on the above conditions, and at this time, pixel information adjacent to each tracking pixel is also recorded. FIG.
FIG. 5A is a diagram showing that a black pixel representing a line segment is tracked by white pixels (A, B, C, D, E...) Adjacent thereto under the conditions of FIG. In FIG. 5A, it is assumed that the white pixel A extends from the illustrated white pixel α to the white pixel β. Needless to say, the trace ends when returning to the starting point. FIG. 5B shows pixels A, B, C,
Pixels adjacent to each of D and E in the four directions of up, down, left, and right are shown. In this processing, pixels in the four directions adjacent to each pixel of the trajectory are determined by either white or black pixels. Record if there is any. As shown in FIG. 5C, the result is stored in the form of an adjacent pixel table as the coordinates of the pixels in the order of the trajectory and the adjacent pixel information.

【0015】輪郭線分抽出処理について説明する。輪郭
追跡処理で求めた4方向の隣接画素情報に対して以下の
処理をする。ある方向、例えば上方向の画素情報に着目
する(図6)。該画素情報を軌跡順にチェックし、黒画
素が連続している領域を抽出する。具体的にはm画素の
抜けは許し、n画素以上黒画素が連続している領域を検
出している。本処理例ではm=1、n=5として連続領
域を求めた。
The outline segment extraction processing will be described. The following processing is performed on the adjacent pixel information in the four directions obtained by the contour tracking processing. Attention is paid to pixel information in a certain direction, for example, in the upward direction (FIG. 6). The pixel information is checked in the order of the locus, and an area where black pixels are continuous is extracted. Specifically, omission of m pixels is allowed, and a region where black pixels are continuous at n pixels or more is detected. In this processing example, a continuous area is obtained with m = 1 and n = 5.

【0016】その結果、図6のA’〜B’までの☆マー
クの軌跡と、C’〜D’までの☆マークの軌跡が連続領
域として抽出された。この抜けを許す画素数mと、連続
画素数nに関しては、線分の歪みの程度や、線分の傾き
の最小単位が何度の図面であるのかなどの条件により、
変化させて対応する。その数値の決定方法は、サンプル
図面に対して最も適当な結果を出す値を人が判断しチュ
ーニングする方法や、線分の歪みをどの程度まで許す図
面であるのかなどの条件により、自動的に決定する方法
など、図面や適応例に応じて対応する。
As a result, the trajectory of the mark A from A 'to B' in FIG. 6 and the trajectory of the mark from C 'to D' are extracted as continuous areas. Regarding the number of pixels m and the number of continuous pixels n that allow this omission, depending on the degree of distortion of the line segment and how many drawings are the minimum units of the line segment inclination,
Change and respond. The method of determining the numerical value is automatically determined according to conditions such as how a person judges and tunes a value that gives the most appropriate result for the sample drawing and how much the line segment can be distorted. It corresponds to the drawing and the adaptation example, such as the method of determining.

【0017】図6では上方向に黒がある所を探がす処理
を行った例を示しているが、同様に、下方向に黒がある
所、左方向に黒がある所、右方向に黒がある所の如く、
上下左右の各方向毎に処理を行った後、抽出された各領
域を重ねる。この時、他の方向の連続領域と重ならない
部分と、上と右、上と左、下と右、下と左の各方向画素
の重なる部分とをそれぞれ分離する。この結果、上、
下、左、右、上と右、上と左、下と右、下と左の8種類
の連続領域が求められる。図7の実施例では、上、下、
左、右、上&右(上方向連続領域かつ右方向連続領
域)、下&左の6種類の連続領域に分離されている。図
7においては、上&左、下&右は出現していない。
FIG. 6 shows an example in which a process for searching for a place where black exists in the upper direction is performed. Similarly, a place where black exists in the downward direction, a place where black exists in the left direction, and a right direction Like where there is black,
After processing is performed for each of the upper, lower, left, and right directions, the extracted regions are overlapped. At this time, a portion that does not overlap with the continuous region in the other direction is separated from a portion that overlaps pixels in the upper and right, upper and left, lower and right, and lower and left directions. As a result,
Eight types of continuous areas, lower, left, right, upper and right, upper and left, lower and right, and lower and left, are obtained. In the embodiment of FIG.
It is divided into six types of continuous areas: left, right, upper & right (upward continuous area and rightward continuous area), and lower & left. In FIG. 7, upper & left and lower & right do not appear.

【0018】中心線抽出処理について説明する。本処理
は図8に示すように、上記で求めた連続領域の中から対
になるもの同士を、例えば下方向連続領域と上方向連続
領域との対となっている所を見つけ、その連続領域で挟
まれた中間位置に線分候補となる中心線を求める。また
この際、線分の太さ情報も獲得する。対になる連続領域
とは線分を構成する向かい合う輪郭線のことである。こ
の対になる連続領域は、上方向の連続領域に対しては、
必ず下方向の中に存在すると考える。同様に左には右、
上と右には下と左、上と左には下と右という組み合わせ
で探索する。このように探索領域を制限することで、計
算量が減るとともに、図9で示すような分岐点や交差点
付近の中心線位置のずれる可能性の大きい部分を除外で
きる。図9においては、従来の手法によって中心線を求
めて当該中心線の交差点を求めた場合に図示「従来手
法」で示すように中心線の交差点の位置が本来の位置p
よりもずれることがあったが、「本手法」で示すように
位置ずれが生じ難いことを表している。
The center line extraction processing will be described. As shown in FIG. 8, the present process finds a pair of continuous regions obtained as described above, for example, a pair of a downward continuous region and an upward continuous region, A center line serving as a line segment candidate is obtained at an intermediate position between the two. At this time, line segment thickness information is also acquired. The paired continuous areas are opposing contour lines forming a line segment. This pair of continuous regions is
I think it always exists in the downward direction. Similarly, right on the left,
Search by the combination of bottom and left on top and right, and bottom and right on top and left. By limiting the search area in this way, the amount of calculation is reduced, and a portion where the center line position near the branch point or the intersection as shown in FIG. 9 is likely to be shifted can be excluded. In FIG. 9, when the center line is obtained by the conventional method and the intersection of the center line is obtained, the position of the intersection of the center line is changed to the original position p as shown by the “conventional method”.
However, as shown in “this method”, it indicates that the displacement is unlikely to occur.

【0019】具体的に対となる連続領域の探索例を以下
に示す。上方向の連続領域について、その始終点リスト
を構築する。次に下方向の連続領域の始終点から下方向
の連続領域の傾きを求め、当該下方向の連続領域の始終
点それぞれから当該傾きに対して垂直方向に探索してゆ
き上方向の連続領域があるかどうかを調べる。上記の垂
直方向に探索してゆく範囲は、初めて白画素が現れるま
で、もしくは図面中の最大線分幅を基に求めた一定値以
内までとする。
A specific example of searching for a pair of continuous areas will be described below. Construct a list of start and end points for the continuous area in the upward direction. Next, the slope of the downward continuous area is calculated from the start and end points of the downward continuous area, and the respective upward and downward continuous areas are searched from each of the start and end points of the downward continuous area in a direction perpendicular to the slope. Check if there is. The range to be searched in the vertical direction is set until a white pixel appears for the first time or within a certain value obtained based on the maximum line segment width in the drawing.

【0020】上方向の連続領域が存在した場合、当該上
方向の連続領域の始終点リストの対応する位置に下方向
の連続領域の始終点情報をあわせて登録する。また探索
開始点から探索終了位置までの距離を線分の太さ情報と
して確保しておく。上下両方向の始終点を登録したリス
トの中から例えば右方向に探してゆき、図8に示すよう
に、上方向の連続領域の始点の次に下方向の連続領域の
始点が存在するような場合には、重なる部分を見つけ
て、その中間位置に中心線を生成する。同様の処理を対
応する連続領域毎に行う。
When an upward continuous area exists, the start and end point information of the downward continuous area is registered together with the corresponding position in the start and end point list of the upward continuous area. Also, the distance from the search start point to the search end position is secured as line segment thickness information. In the case where the start and end points in both the upper and lower directions are searched in the registered list in the right direction, for example, as shown in FIG. 8, the start point of the upward continuous area is followed by the start point of the downward continuous area In, find the overlapping portion and generate a center line at the intermediate position. Similar processing is performed for each corresponding continuous area.

【0021】特徴点検出処理について説明する。本処理
では、交差点、分岐点などの特徴点を求めるために、ま
ず、先に生成した中心線を、同一特徴点を形成するもの
毎に分類している。その後で特徴点位置を確定する。具
体的な処理を、図10に示す特徴点に関して説明する。
The feature point detection processing will be described. In this process, in order to obtain a feature point such as an intersection or a branch point, first, the center line generated earlier is classified for each forming the same feature point. After that, the position of the feature point is determined. Specific processing will be described with respect to the characteristic points shown in FIG.

【0022】中心線1の生成には軌跡Bを利用してい
る。そこで、端点1を生成した軌跡B上の画素から、中
心線1の輪郭ではない方向に軌跡上を「他の中心線の輪
郭となる画素」まで探索する。本例では中心線2の輪郭
となる画素が見つかるので、この時点で中心線1の端点
1と中心線2の端点2とが同一特徴点で接続することが
わかる。同様に中心線2を生成したもう一方の軌跡Cか
ら、中心線2が中心線3と接続することがわかる。この
処理を繰り返し、中心線1〜4により1つの特徴点が形
成されることがわかる。上記処理を全ての中心線の端点
に対して行い、全ての特徴点の接続関係を求める。
The trajectory B is used to generate the center line 1. Therefore, from the pixel on the trajectory B that generated the end point 1, the trajectory is searched in a direction other than the contour of the center line 1 up to the "pixels that are contours of other center lines". In this example, since a pixel which is the outline of the center line 2 is found, it is understood at this point that the end point 1 of the center line 1 and the end point 2 of the center line 2 are connected by the same feature point. Similarly, it can be seen from the other trajectory C that generated the center line 2 that the center line 2 is connected to the center line 3. By repeating this process, it can be seen that one feature point is formed by the center lines 1 to 4. The above processing is performed for all the center line end points, and the connection relation of all the feature points is obtained.

【0023】特徴点の位置の確定方法は、端点を延長
し、最もお互いが接近する位置としたり、長い中心線の
位置から優先的に確定させる方法、水平垂直方向の線分
を優先的に考えて位置を確定する方法等、様々な方法が
考えられる。
The method of determining the position of a feature point is to extend the end points so that they are closest to each other, to determine the position preferentially from the position of the long center line, or to preferentially consider horizontal and vertical line segments. Various methods are conceivable, such as a method of determining the position by using the method.

【0024】以下に、水平垂直方向の線分位置を優先的
に利用する例を記す。中心線のなす角度が一定許容値内
で水平/垂直であるものを選出する。その中で、同一特
徴点をもつ線分を連続する線分として判定する。連続す
る線分を判定した後、それが水平線の場合はy座標を、
垂直線の場合はx座標の平均値を新しい座標として、該
線分の座標値を修正する。この時、座標を修正する対象
となる線分は、単一線分のみで、接続する線分が2本以
上ある場合(二重線等)は、連続する線分の終了とし、
座標修正の対象から除外する。この座標値修正処理を図
11に示す。図11の中央の図において点線で囲った単
一線について座標修正が行われ、図11の下方の図のよ
うにy座標が修正された図となる。
An example of preferentially using the position of a line segment in the horizontal and vertical directions will be described below. The one whose center line is horizontal / vertical within a certain allowable value is selected. Among them, line segments having the same feature point are determined as continuous line segments. After determining a continuous line segment, if it is a horizontal line, the y coordinate is
In the case of a vertical line, the coordinate value of the line segment is corrected using the average value of the x coordinate as a new coordinate. At this time, the line segment whose coordinates are to be corrected is only a single line segment, and when there are two or more connected line segments (double line or the like), the end of a continuous line segment is determined.
Exclude from the target of coordinate correction. This coordinate value correction processing is shown in FIG. The coordinate correction is performed on the single line surrounded by the dotted line in the center diagram of FIG. 11, and the y coordinate is corrected as shown in the lower diagram of FIG.

【0025】次に、水平垂直線の座標修正が終了した線
分に対して、特徴点での接続処理を行う(図12)。線
分を強制的に延長して接続させる。水平と垂直線分が存
在する特徴点では、それぞれの線分を延長した座標での
交差点位置とし、水平線分のみを延長した場合または垂
直線分のみを延長した場合は、中点の平均座標とする。
同一グループ内に、水平垂直線分と斜線とが混在する場
合(図13)には、斜線の端点は水平垂直線分の交差点
座標とする。この時、水平垂直線分に2本以上の平行な
線が存在する場合には交差点座標が複数となるため、斜
線の端点座標は、水平垂直線分端点の平均座標とする。
また、同一グループ内に水平線または垂直線が1本だけ
存在する場合には、端点が決定されていないので斜線の
座標はその線分との交差点とする。この時当該水平線ま
たは垂直線の端点も交差点座標へ変更する。特徴点が、
斜線のみで構成されている場合(図14)には、それぞ
れ、2本づつ組み合わせた場合の交差点座標を候補とし
て登録する。この時、線分の開き角が180度に近い場
合は例外として、その中点座標とする。最終的に、候補
として登録された座標の平均値を取り新たな座標とす
る。
Next, a connection process at a characteristic point is performed on the line segment for which the coordinate correction of the horizontal and vertical lines has been completed (FIG. 12). The line segment is forcibly extended and connected. For feature points that have horizontal and vertical segments, the intersection point is set to the coordinates where the respective segments are extended.If only the horizontal segment is extended or only the vertical segment is extended, the average coordinates of the midpoint I do.
If horizontal and vertical line segments and oblique lines are mixed in the same group (FIG. 13), the end points of the oblique lines are the intersection coordinates of the horizontal and vertical lines. At this time, if there are two or more parallel lines in the horizontal and vertical line segments, there are a plurality of intersection coordinates, so the end point coordinates of the oblique lines are the average coordinates of the horizontal and vertical line end points.
If only one horizontal line or one vertical line exists in the same group, the end point has not been determined, and the coordinates of the oblique line are the intersections with the line segment. At this time, the end point of the horizontal line or the vertical line is also changed to the intersection coordinates. The feature points are
In the case of only the diagonal lines (FIG. 14), the intersection coordinates obtained by combining two lines each are registered as candidates. At this time, if the opening angle of the line segment is close to 180 degrees, the coordinates of the middle point are used as an exception. Finally, the average value of the coordinates registered as candidates is taken as new coordinates.

【0026】なお、本発明は上述の線分抽出処理方法を
実行するプログラムが記憶媒体上に格納されている当該
記憶媒体を含むものである。
The present invention also includes a storage medium in which a program for executing the above-described line segment extraction processing method is stored on the storage medium.

【0027】[0027]

【発明の効果】以上説明した如く、本発明によれば、図
形の輪郭を内・外から追跡してゆき、着目する白画素か
らみて上または下または右または左に存在する黒画素が
連続している連続領域を調べ、対となって存在する2つ
の連続領域の中間に中心線を生成させるようにしている
ことから、局所的な歪みや雑音の影響を受けることが少
なく、かつ交差点や分岐点などの特徴点を安定して決定
することができる。
As described above, according to the present invention, the outline of a figure is tracked from inside and outside, and black pixels existing above, below, right or left as viewed from the white pixel of interest continue. Since a continuous region is examined and a center line is generated in the middle of two continuous regions that exist as a pair, it is less affected by local distortion and noise, and at intersections and branches. Feature points such as points can be determined stably.

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

【図1】本発明の処理フローを示す図である。FIG. 1 is a diagram showing a processing flow of the present invention.

【図2】輪郭追跡を示す図である。FIG. 2 is a diagram illustrating contour tracking.

【図3】トレース開始点の設定を示す図である。FIG. 3 is a diagram showing setting of a trace start point.

【図4】次トレース点の決定を示す図である。FIG. 4 is a diagram illustrating determination of a next trace point.

【図5】輪郭追跡時の隣接画素データ収集を示す図であ
る。
FIG. 5 is a diagram illustrating collection of adjacent pixel data during contour tracking.

【図6】上方向の画素を示す図である。FIG. 6 is a diagram showing pixels in an upward direction.

【図7】方向別の連続領域を示す図である。FIG. 7 is a diagram showing a continuous area for each direction.

【図8】対になる連続領域と中心線を示す図である。FIG. 8 is a diagram showing a pair of continuous regions and a center line.

【図9】従来手法との中心線比較を示す図である。FIG. 9 is a diagram showing a center line comparison with a conventional method.

【図10】軌跡と中心線を示す図である。FIG. 10 is a diagram showing a locus and a center line.

【図11】水平垂直線分の座標修正を示す図である。FIG. 11 is a diagram showing correction of coordinates of horizontal and vertical line segments.

【図12】水平垂直線分の接続を示す図である。FIG. 12 is a diagram showing connections of horizontal and vertical line segments.

【図13】水平垂直線分を含む斜線の接続を示す図であ
る。
FIG. 13 is a diagram showing connection of oblique lines including horizontal and vertical line segments.

【図14】斜線のみの接続を示す図である。FIG. 14 is a diagram showing connection of only diagonal lines.

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

1:輪郭追跡処理 2:輪郭線分抽出処理 3:中心線抽出処理 4:特徴点検出処理 1: Contour tracking processing 2: Contour line extraction processing 3: Center line extraction processing 4: Feature point detection processing

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 図形の輪郭を利用して当該図形を構成す
る線分を抽出する線分抽出処理方法において、 与えられた図形の黒画素に接する白画素を追跡して、当
該個々の白画素について当該白画素の周辺のどの画素が
白画素でありかつどの画素が黒画素であるかを隣接画素
テーブルとして格納し、 当該隣接画素テーブルの内容にもとづいて、上方向に存
在している黒画素が連続している白画素群からなる上方
向の連続領域と、下方向に存在している黒画素が連続し
ている白画素群からなる下方向の連続領域と、左方向に
存在している黒画素が連続している白画素群からなる左
方向の連続領域と、右方向に存在している黒画素が連続
している白画素群からなる右方向の連続領域とを抽出す
るようにし、 下方向の連続領域と対になる上方向の連続領域を見出し
て両者の中間に中心線を形成させ、かつ右方向の連続領
域と対になる左方向の連続領域を見出して両者の中間に
中心線を形成させるようにしたことを特徴とする線分抽
出処理方法。
1. A line segment extraction processing method for extracting a line segment constituting a figure using a contour of the figure, wherein a white pixel in contact with a black pixel of a given figure is tracked, and the individual white pixel is traced. Is stored as an adjacent pixel table about which pixels around the white pixel are white pixels and which pixels are black pixels, and based on the contents of the adjacent pixel table, the black pixels existing in the upward direction Are present in the left direction and an upward continuous region consisting of a white pixel group in which a continuous To extract a leftward continuous region consisting of a white pixel group in which black pixels are continuous and a rightward continuous region consisting of a white pixel group in which black pixels present in the right direction are continuous, Upward continuation region that is paired with downward continuation region A line characterized by finding a region and forming a center line in the middle between the two, and finding a left continuous region paired with the right continuous region and forming a center line in the middle between the two. Minute extraction processing method.
【請求項2】 上記形成された夫々の中心線に関する情
報にもとづいて、交差点および分岐点を含む特徴点を検
出するために、 当該形成された夫々の中心線の始点座標および/または
終点座標にもとづいて、同一の特徴点を形成するであろ
う中心線群を個々の特徴点毎にグループにまとめ、 次いでグループにまとめられた中心線群を連結して、当
該連結部分に夫々の特徴点が存在するものと決定するよ
うにしたことを特徴とする請求項1記載の線分抽出処理
方法。
2. In order to detect a feature point including an intersection and a branch point on the basis of information on each of the formed center lines, the starting point coordinates and / or the end point coordinates of each of the formed center lines are determined. Based on this, the center lines that would form the same feature point are grouped for each individual feature point, and then the grouped center lines are connected, and each feature point is connected to the connected portion. 2. The line segment extraction processing method according to claim 1, wherein it is determined that the line segment exists.
【請求項3】 上記中心線群を連結して特徴点を決定す
るに当たって、当該中心線群のうちの予め定めたパター
ンの中心線に優先順位を与え、当該優先順位を与えられ
た中心線上の点あるいは当該中心線の延長上の点を上記
特徴点の存在位置を決定するに当たって、他中心線にく
らべて優先して、当該特徴点の存在位置として仮決定す
るようにしたことを特徴とする請求項2記載の線分抽出
処理方法。
3. In connecting the center line groups to determine a feature point, a priority is given to the center line of a predetermined pattern in the center line group, and the center line on the given center line is given the priority order. In determining the location of the feature point, a point or a point on the extension of the center line is determined temporarily as the location of the feature point in preference to other center lines. The line segment extraction processing method according to claim 2.
【請求項4】 上記優先順位を与えられた中心線が、水
平垂直方向の交差線分であることを特徴とする請求項3
記載の線分抽出処理方法。
4. The system according to claim 3, wherein the center line given the priority is an intersecting line segment in the horizontal and vertical directions.
The described line segment extraction processing method.
【請求項5】 図形の輪郭を利用して当該図形を構成す
る線分を抽出する線分抽出処理方法を格納した記憶媒体
において、 与えられた図形の黒画素に接する白画素を追跡して、当
該個々の白画素について当該白画素の周辺のどの画素が
白画素でありかつどの画素が黒画素であるかを隣接画素
テーブルとして格納し、 当該隣接画素テーブルの内容にもとづいて、上方向に存
在している黒画素が連続している白画素群からなる上方
向の連続領域と、下方向に存在している黒画素が連続し
ている白画素群からなる下方向の連続領域と、左方向に
存在している黒画素が連続している白画素群からなる左
方向の連続領域と、右方向に存在している黒画素が連続
している白画素群からなる右方向の連続領域とを抽出す
るようにし、 下方向の連続領域と対になる上方向の連続領域を見出し
て両者の中間に中心線を形成させ、かつ右方向の連続領
域と対になる左方向の連続領域を見出して両者の中間に
中心線を形成させるようにした線分抽出処理方法が格納
されていることを特徴とする記憶媒体。
5. A storage medium storing a line segment extraction processing method for extracting a line segment constituting a figure using a contour of the figure, wherein a white pixel in contact with a black pixel of a given figure is tracked, For each individual white pixel, which pixel around the white pixel is a white pixel and which pixel is a black pixel is stored as an adjacent pixel table, and exists in an upward direction based on the contents of the adjacent pixel table. An upward continuous area consisting of a group of white pixels having continuous black pixels, a downward continuous area consisting of a group of white pixels having continuous black pixels present in a downward direction, and a leftward direction A continuous region in the left direction consisting of a group of white pixels in which black pixels existing in the right direction is continuous, and a continuous region in the right direction consisting of a white pixel group in which black pixels existing in the right direction are continuous. So that it can be extracted A line that finds an upper continuous region and forms a center line in the middle between the two, and finds a left continuous region paired with the right continuous region and forms a center line in the middle between the two. A storage medium storing a minute extraction processing method.
JP29398497A 1997-10-27 1997-10-27 Segment extracting process method Pending JPH11134507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29398497A JPH11134507A (en) 1997-10-27 1997-10-27 Segment extracting process method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29398497A JPH11134507A (en) 1997-10-27 1997-10-27 Segment extracting process method

Publications (1)

Publication Number Publication Date
JPH11134507A true JPH11134507A (en) 1999-05-21

Family

ID=17801752

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29398497A Pending JPH11134507A (en) 1997-10-27 1997-10-27 Segment extracting process method

Country Status (1)

Country Link
JP (1) JPH11134507A (en)

Similar Documents

Publication Publication Date Title
JP2951814B2 (en) Image extraction method
US5497429A (en) Apparatus for automatic fingerprint classification
EP0534446B1 (en) System with approximation means for recognizing graphical elements in a drawing
WO1993007580A1 (en) Method of determining direction in local region of profile segment and method of determining lines and angles
JP4030829B2 (en) Striped pattern image matching apparatus and striped pattern image matching method
JP2000339462A (en) Defect inspection method and defect inspection device
JPH0981740A (en) Diagram input device
JPH11134507A (en) Segment extracting process method
JP3460356B2 (en) Method and apparatus for detecting circle or ellipse
JP2002373334A (en) Device and method for extracting fingerprint characteristic and fingerprint extraction program
JPH01271883A (en) Detecting system for center of fingerprint
CN105513044B (en) A kind of digital direct straight line segments recognition method based on statistical measures linear feature
JP2551021B2 (en) How to determine the center position of the fingerprint image
JP3031594B2 (en) Pattern recognition device
JP2865529B2 (en) Fingerprint collation device
JPH07141465A (en) Method for detecting inclination of document image
JPH07168940A (en) Position detecting method
JPH07118016B2 (en) Figure recognition device
JPS6379183A (en) Graphic recognizing device
JPH11250256A (en) Graphic recognizing/processing method, and record medium recorded with the program
JP2865530B2 (en) Fingerprint collation device
JPH0545136A (en) Visual system
JPH0226261B2 (en)
JPH10312460A (en) Image processing method and high precision image processor
JPH0785262B2 (en) Drawing input device