JPS60117381A - Method and device for extracting contour - Google Patents

Method and device for extracting contour

Info

Publication number
JPS60117381A
JPS60117381A JP58225622A JP22562283A JPS60117381A JP S60117381 A JPS60117381 A JP S60117381A JP 58225622 A JP58225622 A JP 58225622A JP 22562283 A JP22562283 A JP 22562283A JP S60117381 A JPS60117381 A JP S60117381A
Authority
JP
Japan
Prior art keywords
point
data
contour
sequence
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP58225622A
Other languages
Japanese (ja)
Other versions
JPH0146912B2 (en
Inventor
Tatsuya Ono
達也 小野
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 JP58225622A priority Critical patent/JPS60117381A/en
Publication of JPS60117381A publication Critical patent/JPS60117381A/en
Publication of JPH0146912B2 publication Critical patent/JPH0146912B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To shorten the time required for extracting contour lines, by extracting contour data in such a way that intermediate data point strings are stored by scanning a memory which stores contour point data one time and a point string buffer is operated by one time so as to connect the intermediate data point strings with each other. CONSTITUTION:Contour point data on a picture are stored in a contour point data memory 3 in the order of raster scan and, when the first contour point data are read out from the memory 3, the Y-coordinate value of a register 11 of terminal point of point string is set at a process decision circuit 12 in the first place. Then the contour point data are sent to a starting point detecting circuit 14 where the starting point of one side data point string is detected and sent to a point string buffer 10. A raster scan terminating signal S is given from the circuit 12 to a closed loop forming circuit 16 and the circuit 16 decides that the terminal point of the data point string is in a connected relation and reads out data of each data point string by scanning the data point strings in forward and backward directions. The read out data are extracted as contour data obtained when the outline of an object is traced in counterclockwise direction. The data are stored in a contour data memory 4.

Description

【発明の詳細な説明】 (1)発明の技術分野 この発明は、物体の輪郭を構成する二値画像に対して画
面走査順に得られる輪郭点データ群を、物体の輪郭に沿
う輪郭線データとして抽出する輪郭線抽出方法及びその
装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (1) Technical Field of the Invention The present invention uses a group of contour point data obtained in the screen scanning order for a binary image constituting the contour of an object as contour line data along the contour of the object. The present invention relates to a method and apparatus for extracting contour lines.

(2)技術の背景 一般に、物体の輪郭を構成する二値画像から物体の形状
を抽出したり、各種パラメータ、例えば物体の重心位置
、物体の輪郭の周長等をめるには、計算のやり易さ等の
観点からして物体の輪郭に沿って配列される輪郭線デー
タを抽出することが必要になる。
(2) Background of the technology In general, in order to extract the shape of an object from a binary image that forms the outline of the object, or to determine various parameters such as the position of the center of gravity of the object and the circumference of the outline of the object, calculations are required. From the viewpoint of ease of use, it is necessary to extract contour data arranged along the contour of the object.

(3)従来技術とその問題点 従来におけるこの種の輪郭線抽出方法としては、例えば
第1図に示すように、物体の輪郭を構成する二値画像G
が表示される場面1上にX−Y座標系を予め設定し、上
記画面1を走査2することにより上記二値画像Gの輪郭
点データ群(Xl、Yl)(X2.Y2)・・・(Xn
、Yn)を画面走査順に得て、これらを輪郭点データメ
モリ3に格納し、しかる後上記輪郭点データ群に輪郭線
抽出処理を施し、上記輪郭点データ群を物体の輪郭の例
えば反詩計回り方向 (図中mで示す)に沿う輪郭線デ
ータ(xAl、YAl)(x 、y )・・・(xAn
、YAn)として抽出し、輪郭A2 A2 線データメモリ4に格納するようにしたものがある。こ
の方法において、上記輪郭線抽出処理としては、例えば
第2図に示すように、輪郭点データ中に始点P(Xi、
Yi)を定め、この始点に連結可能な8つの囲繞位置A
乃至Gについて上記輪郭点データメモリ3を検索して、
始点Pの次に連結される次輪郭点を抽出した後、当該抽
出された輪郭点の次に連結される次輪郭点を上述したの
と同様にして抽出し、以後この手順を繰返すことにより
、抽出した輪郭点を輪郭線データとして輪郭線データメ
モリに順次格納するようにしたものである。
(3) Prior art and its problems As a conventional method for extracting contours of this type, for example, as shown in FIG.
By setting an X-Y coordinate system in advance on a scene 1 where is displayed, and scanning the screen 1 2, a group of contour point data (Xl, Yl) (X2.Y2) . . . of the binary image G is obtained. (Xn
. Contour data (xAl, YAl) (x, y)...(xAn
, YAn) and stored in the line data memory 4. In this method, the contour line extraction process includes a starting point P(Xi,
Yi) and eight surrounding positions A that can be connected to this starting point.
Search the contour point data memory 3 for G to G,
After extracting the next contour point connected next to the starting point P, the next contour point connected next to the extracted contour point is extracted in the same manner as described above, and by repeating this procedure thereafter, The extracted contour points are sequentially stored in a contour data memory as contour data.

然しながら、このような従来の輪郭線抽出方法にあって
は、ある一つの輪郭点の次に連結される次輪郭点を抽出
するために、一つの輪郭点を囲繞する8ケ所すべてのデ
ータ値について輪郭点データメモリ3を検索しなければ
ならないことから、最終的な輪郭線データを得るまでに
おいて必要な輪郭点データメモリ3の検索回数が膨大な
ものとなってしまい、その分、輪郭線抽出のための処理
時間が大幅にかかるという問題がある。
However, in such conventional contour line extraction methods, in order to extract the next contour point connected to a certain contour point, data values at all eight locations surrounding one contour point are extracted. Since the contour point data memory 3 has to be searched, the number of times the contour point data memory 3 is searched is required to obtain the final contour data, and the number of times the contour point data memory 3 is searched becomes enormous. There is a problem in that it takes a considerable amount of processing time.

(4)発明の目的 この発明は以上の観点に立って為されたものであって、
その目的とするところは、輪郭線抽出に伴う処理時間の
短縮化を企図した輪郭線抽出方法及びその装置を提供す
ることにある。
(4) Purpose of the invention This invention has been made from the above viewpoints,
The object of the present invention is to provide a contour line extraction method and an apparatus thereof, which are intended to shorten the processing time associated with contour line extraction.

(5)発明の構成 そして、この発明に係る輪郭線抽出方法の基本的構成は
、物体の輪郭を構成する閉ループ二値画像に対して画面
走査順に得られる輪郭点データ群を、物体の輪郭に沿う
輪郭点データとして抽出するに際し、上記輪郭点データ
群を輪郭点データメモリに予め格納し、この輪郭点デー
タメモリから最初に読み出される輪郭点データを一対の
データ点列にデータ点列の他方の始点とすると共に、一
対のデータ点列の始点が抽出された段階において上記い
ずれかのデータ点列の端点に連結される輪郭点データを
該当するデータ点列の延長点として検出する一方、上記
輪郭点データメモリから順次読出される任意の輪郭点デ
ータが先に読出された輪郭点データによるデータ点列の
端点に連゛結しないときには上記輪郭点データを新たな
一対のデータ点列における一方の始点として、この新た
なデータ点列における他方の始点及びその延長点を前記
したのと同様に順次検出することにより、輪郭点データ
メモリから順次読出された輪郭点データ群を複数のデー
タ点列として点列バッファに一旦格納した後、各データ
点列の端点データを比較して各端点相互の連結関係を判
定し、連結され得るデータ点列同士を結合させて輪郭線
データメモリに格納するようにしたことを特徴する輪郭
線抽出方法にある。
(5) Structure of the Invention The basic structure of the contour line extraction method according to the present invention is to extract a group of contour point data obtained in the order of screen scanning from a closed-loop binary image that constitutes the contour of an object. When extracting contour point data along the contour point data, the above contour point data group is stored in advance in a contour point data memory, and the contour point data read first from the contour point data memory is divided into a pair of data point strings from the other of the data point strings. At the stage when the start point of a pair of data point sequences is extracted, the contour point data connected to the end point of one of the data point sequences is detected as an extension point of the corresponding data point sequence. When arbitrary contour point data sequentially read from the point data memory is not connected to the end point of the data point sequence based on the previously read contour point data, the contour point data is used as one starting point of a new pair of data point sequences. By sequentially detecting the other starting point and its extension point in this new data point sequence in the same way as described above, the contour point data group read out sequentially from the contour point data memory is converted into a plurality of data point sequences. Once stored in the column buffer, the endpoint data of each data point sequence is compared to determine the connection relationship between each endpoint, and the data point sequences that can be connected are combined and stored in the contour data memory. The outline extraction method is characterized by the following.

そしてまた、上記方法を実施するための装置の基本的構
成は、物体の輪郭を構成する閉ループ二値画像に対して
画面走査順に得られる輪郭点データ群を、物体の輪郭に
沿う輪郭線データとして抽出する輪郭線抽出装置であっ
て、上記輪郭点データ群を格納する輪郭点データメモリ
と、この輪郭点データメモリから順次読出される輪郭点
データを順次所定のデータ点列として格納する点列バッ
ファと、この点列バッファ内の各データ点列の端点に対
応する各点列端点データを順次格納する点列端点レジス
タと、上記輪郭点データメモリから順次読出される輪郭
点データが上記点列レジスタ内の点列端点データと隣接
するか否かを判定する判定手段と、この判定手段により
上記輪郭点データが点列端点データに連結しないと判定
されたときに、上記点列バッファに一対のデータ点列を
格納するスペースを設定すると共に、一対のデータ点列
における一方の始点として上記輪郭点データを検出し、
これを点列バッファ及び点列端点バッファに送る始点検
出手段と、上記判定手段により上記輪郭点データが所定
の点列端点データに連結すると判定されたときに点列バ
ッファに格納すべき上記一対のデータ点列における他方
の始点若しくは該当するデータ点列の延長点として上記
輪郭点データを検出し、これを点列バッファ及び点列端
点レジスタに送る延長点検出手段と、すべての輪郭点デ
ータが点列バッファ内に格納されたときに点列バッファ
内の各データ点列の端点を比較して各端点相互の連結関
係を判定し、連結され得る各点列同士を結合して閉ルー
プ状の輪郭線データを抽出する閉ループ形成手段と、こ
の閉ループ形成手段からの輪郭線データを格納する輪郭
線データメモリとを備えたものである。
The basic configuration of the device for carrying out the above method is to convert a group of contour point data obtained in the screen scanning order to a closed-loop binary image forming the contour of an object into contour data along the contour of the object. A contour line extraction device for extracting a contour line, which includes a contour point data memory that stores the contour point data group, and a point sequence buffer that sequentially stores contour point data sequentially read out from the contour point data memory as a predetermined data point sequence. , a point sequence end point register that sequentially stores each point sequence end point data corresponding to the end point of each data point sequence in this point sequence buffer, and a point sequence register that stores contour point data sequentially read from the contour point data memory. determining means for determining whether or not the contour point data is adjacent to the point sequence end point data in the point sequence buffer; and when the determining means determines that the contour point data is not connected to the point sequence end point data, Setting a space for storing a point sequence, and detecting the contour point data as one starting point in a pair of data point sequences,
a start point detection means for sending the contour point data to a point sequence buffer and a point sequence end point buffer; and a pair of start point detection means to be stored in the point sequence buffer when it is determined by the determination means that the contour point data is connected to predetermined point sequence end point data. Extended point detection means detects the contour point data as the other starting point in the data point sequence or an extension point of the corresponding data point sequence and sends it to the point sequence buffer and point sequence end point register; When stored in the column buffer, the end points of each data point sequence in the point sequence buffer are compared to determine the connection relationship between each end point, and each point sequence that can be connected is connected to create a closed loop contour line. The apparatus includes a closed loop forming means for extracting data, and a contour data memory for storing contour data from the closed loop forming means.

(6)発明の実施例 以下、添付図面に示す実施例に基づいてこの発明に係る
輪郭線抽出方法及びその装置を詳細に説明する。
(6) Embodiments of the Invention Hereinafter, a contour line extraction method and apparatus according to the present invention will be explained in detail based on embodiments shown in the accompanying drawings.

第3図はこの発明に係る輪郭線抽出装置の一実施例を示
すブロック図である。
FIG. 3 is a block diagram showing an embodiment of the contour extraction device according to the present invention.

同図において、3は、例えば第5図(a)に示すように
、物体の輪郭を構成する閉ループ二値画像に対して画面
走査順に得られる輪郭点データ群を (第5図(b)参
照)を格納する輪郭点データメモリ:4は、例えば第5
図(’+1)の輪郭点データ群を物体の輪郭に沿う輪郭
線データ (第5図(f)参照)として格納する輪郭線
データメモリ、10は、例えば第5図(1+)及び(d
)に示すように、上記輪郭点データメモリ3から順次読
出される輪郭線データ群を二つのデータ点列TI、T2
として格納する点列バッファ、11は、例えば第5図(
d)及び(e)に示すように、上記点列バッファ10内
の各データ点列Tl、T2の端点に対応する各点列端点
データを順次格納する点列端点レジスタであり、この点
列端点データは、二つのX座標値(X、1.X、2)と
一つのX座標値とからなっている。
In the same figure, 3 indicates a group of contour point data obtained in the screen scanning order for a closed-loop binary image that constitutes the outline of an object, as shown in FIG. 5(a), for example (see FIG. 5(b)). ) is the contour point data memory 4, for example, the fifth
A contour data memory 10 stores the contour point data group of FIG. 5 ('+1) as contour data along the outline of the object (see FIG.
), the contour line data group sequentially read out from the contour point data memory 3 is divided into two data point sequences TI and T2.
For example, the point sequence buffer 11 stored as
As shown in d) and (e), it is a point sequence end point register that sequentially stores each point sequence end point data corresponding to the end points of each data point sequence Tl, T2 in the point sequence buffer 10, and this point sequence end point The data consists of two X coordinate values (X, 1.X, 2) and one X coordinate value.

また、この実施例において、12は、輪郭点データメモ
リ3の走査が終了するまで輪郭点データのX座標値が先
に読出された輪郭点データのものに比べて変化したか否
か、即ちラスク走査が一段下がるか否かを判定する処理
判定回路であり、これは、ラスク走査が一1 股下がる場合には上記点列端点レジスタll内のX座標
値を更新するようになっており、ラスク走査が終了する
と、ラスク走査終了信号Sを出力するようになっている
In this embodiment, 12 also determines whether the X coordinate value of the contour point data has changed compared to that of the previously read contour point data until the scanning of the contour point data memory 3 is completed. This is a process determination circuit that determines whether or not the scan goes down by one step. This is designed to update the X coordinate value in the point sequence end point register ll when the rask scan goes down by one step. When scanning is completed, a rask scanning completion signal S is output.

また、13は点列端点レジスタ11のX座標値を参照し
て、輪郭点データメモリ3から読出された輪郭点データ
が点列バッファlo内のとに働く始点検出回路であり、
これは、上記点列バッファlO内に新たに一対のデータ
点列を格納するスペースを設定すると共に、上記輪郭デ
ータを一対のデータ点列の一方の始点として検出し、こ
れを点列バッファ1oに送ると共に、新たな初期点列端
点データとして点列端点レジスタ11に送るようになっ
ている。一方、15は上記連結点判定回路13により上
記輪郭点データが点列バッファ10内のデータ点列2 に連結すると判定されたときに働く延長点検出回路であ
り、これは、点列バッファ10内の上記一対のデータ点
列の他方の始点が空データである場合には上記輪郭点デ
ータを上記一対のデータ点列の他方の始点として検出す
ると共に、上記一対のデータ点列の始点が設定されてい
る場合には上記輪郭点データを該当するデータ点列の延
長点として検出し、これを点列バッファ10に送ると共
に、更新する点列端点データとして点列端点レジスタ1
1に送るようになっている。
Reference numeral 13 denotes a start point detection circuit which refers to the X coordinate value of the point sequence end point register 11 and applies the contour point data read from the contour point data memory 3 to the point sequence buffer lo.
This sets up a space to newly store a pair of data point sequences in the point sequence buffer 1O, detects the contour data as the starting point of one of the pair of data point sequences, and stores it in the point sequence buffer 1O. At the same time, it is also sent to the point sequence end point register 11 as new initial point sequence end point data. On the other hand, 15 is an extension point detection circuit that operates when the connection point determination circuit 13 determines that the contour point data is connected to the data point sequence 2 in the point sequence buffer 10; If the other start point of the pair of data point strings is empty data, the contour point data is detected as the other start point of the pair of data point strings, and the start point of the pair of data point strings is set. If so, the contour point data is detected as an extension point of the corresponding data point sequence, and is sent to the point sequence buffer 10, and is also sent to the point sequence end point register 1 as the point sequence end point data to be updated.
1.

更に、符号16は処理判定回路12からのラスク走査終
了信号Sによって作動する閉ループ形成回路であり、こ
れは、点列バッファ10内の各データ点列の端点を比較
して各端点相互の連結関係を判定し、連結され得る各点
列同士を結合して点列バッファ10内の各点列を閉ルー
プ状に読出すものである。
Further, reference numeral 16 is a closed loop forming circuit that is activated by the rask scan end signal S from the processing determination circuit 12, and this circuit compares the end points of each data point sequence in the point sequence buffer 10 and determines the connection relationship between each end point. is determined, each point string that can be connected is connected, and each point string in the point string buffer 10 is read out in a closed loop.

次に、この実施例に係る輪郭点抽出装置の作用誉第3乃
至第5図を用いて説明する。
Next, the operation of the contour point extracting device according to this embodiment will be explained using FIGS. 3 to 5.

今、物体の輪郭を構成する閉ループ形成回路が第5図(
a)で示すようなものであるとすると、輪郭点データメ
モリ3には、第5図(b)で示すように、画面上のラス
ク走査順に輪郭点データ(X2.Y3) ・(X2.Y
l) カ格納すレる。この輪郭点データメモリ3から最
初の輪郭点デー□り(X2.Y3)が読出されると、先
ず、処理判定回路12において、点列端点レジスタ!1
の空データであるX座標値がY3に設定され、次いで、
上記輪郭点データ(X2tY2)が連結点判定回路13
に送られると、上記点列端点レジスタ13のX座標値が
空データであることから、上記輪郭点データ(X2.Y
3)が連結するデータ点列はないと判定され、上記輪郭
点データ(X2.Y3)は始点検出回路14に送られる
。すると、この始点検出回路14は、第5図(d)に示
すように1点列バッファlo内に一対のデータ点列TI
、T2を格納するスペースを設定し、上記輪郭点データ
(X2.Y3)を一方のデータ点列T1の始点として検
出し、これを点列バッファlOに送ると共に、上記輪郭
点データ(X2.Y3)のX座標値を初期点列端点デー
タとして点列端点レジスタ11の一対の格納部(xTl
 ”T2)に送る。この段階において、点列バッファ1
0のデータ点列T1は上記輪郭データ(X2.Y3)を
始点として格納すると共に、データ点列T2の始点は空
データであり、点列端点レジスタ11の内容は、第5図
(e)(1)に示すようになっている。
Now, the closed loop forming circuit that constitutes the outline of the object is shown in Figure 5 (
Assuming that the data is as shown in a), the contour point data memory 3 stores contour point data (X2.Y3) and (X2.Y3) in the rask scanning order on the screen, as shown in FIG.
l) Store the power. When the first contour point data (X2.Y3) is read out from the contour point data memory 3, first, in the processing determination circuit 12, the point sequence end point register! 1
The empty data X coordinate value of is set to Y3, and then
The above contour point data (X2tY2) is the connection point determination circuit 13
Since the X coordinate value of the point sequence end point register 13 is empty data, the contour point data (X2.Y
3) is determined that there is no connected data point sequence, and the contour point data (X2.Y3) is sent to the starting point detection circuit 14. Then, this starting point detection circuit 14 detects a pair of data point strings TI in the one point string buffer lo as shown in FIG. 5(d).
. ) in a pair of storage units (xTl
"T2). At this stage, point sequence buffer 1
The data point sequence T1 of 0 is stored with the contour data (X2.Y3) as the starting point, and the starting point of the data point sequence T2 is empty data, and the contents of the point sequence end point register 11 are as shown in FIG. 1).

次に、第5図(b)に示すように、輪郭点データメモリ
3から次の輪郭点データ(x3゜Y3)が読出されると
、処理判定回路12において該輪郭点データ(X3.Y
3)のX座標値が点列端点レジスタ11のX座標値と比
較されるが、両者が等しいことから点列端点レジスタ1
1は更新されない。そして、上記輪郭点データ(X3.
Y3)が連結点判定回路13に送られると、この輪郭点
データ(X3.Y3)のX座標値が点列端点レジスタ1
1の一対のX座標と比較され、連結点判定回路13は、
この輪郭点データ(x3゜5 Y3)が点列端点(X、1.X、2) = (X2.X
2) c7)イずれかにも連結することを判定し、上記
輪郭点データ(X3.Y3)、は延長点検出回路15に
送られる。すると、この延長点検出回路15は、上記輪
郭点データ(X3.Y3)を他方のデータ点列T2の始
点して検出し、これを点列バッファ10に送ると共に、
上記輪郭点データ(X3.Y3)のX座標値を点列端点
データとして点列端点レジスタ11の一方の格納部x7
2に格納する。この段階において、点列バッファ10の
各データ点列TI、T2は夫々の輪郭点データを始点と
して格納しており、点列端点レジスタ11の内容は第5
図(2)に示すようになっている。
Next, as shown in FIG. 5(b), when the next contour point data (X3.Y3) is read out from the contour point data memory 3, the processing determination circuit 12 reads out the next contour point data (X3.Y3).
The X coordinate value of 3) is compared with the X coordinate value of the point sequence end point register 11, but since both are equal, the X coordinate value of the point sequence end point register 1 is compared.
1 is not updated. Then, the above contour point data (X3.
Y3) is sent to the connection point determination circuit 13, the X coordinate value of this contour point data (X3.Y3) is stored in the point sequence end point register 1.
1, and the connection point determination circuit 13
This contour point data (x3゜5 Y3) is the point sequence end point (X, 1.X, 2) = (X2.X
2) c7) It is determined that the contour point data (X3.Y3) is connected to either one of the points A and A, and the contour point data (X3.Y3) is sent to the extension point detection circuit 15. Then, this extension point detection circuit 15 detects the contour point data (X3.Y3) as the starting point of the other data point sequence T2, sends it to the point sequence buffer 10, and
One storage section x7 of the point sequence end point register 11 uses the X coordinate value of the contour point data (X3.Y3) as point sequence end point data.
Store in 2. At this stage, each data point string TI, T2 in the point string buffer 10 is stored with the respective contour point data as the starting point, and the contents of the point string end point register 11 are stored as the fifth data point string.
It is as shown in Figure (2).

更に、輪郭点データメモリ3から次の輪郭点データ(X
l 、Y2)が読出されると、処理判定回路12は、上
記輪郭点データ(Xi、Y2)のX座標値が点列端点レ
ジスタ11のX座標値と異なることから、点列端点レジ
スタ11のX座標値をY2に更新する。そして、上記輪
郭データ(Xl、Y2)が連結点判定回路13に送られ
ると、6 該連結点判定回路13は上記輪郭点データ(xl。
Furthermore, the next contour point data (X
1, Y2), the processing determination circuit 12 determines that the X coordinate value of the contour point data (Xi, Y2) is different from the X coordinate value of the point sequence end point register 11. Update the X coordinate value to Y2. Then, when the contour data (Xl, Y2) is sent to the connection point determination circuit 13, the connection point determination circuit 13 transmits the contour point data (xl.

Y2)が点列端点データX、1=X2に連結することを
判定し、上記輪郭点データ (Xi、Y2)を延長検出
回路15に送る。すると、この延長検出回路15は、上
記輪郭点データ(X3.Y3)を一方のデータ点列T1
の延長点として検出し、これを点列バッファ10に送る
と共に、上記輪郭点データ(Xi、Y2)のX座標値を
点列端点データとして点列端点レジスタ11の一方の格
納部xTlに格納する。以後、上述したのと同様に処理
され、輪郭点データ(X3.Y2)は、上記データ点列
T2 に連結され、この段階で点列端点レジスタ11の
内容は第5図(e) (3)に示すようになっている。
It is determined that the contour point data (Xi, Y2) is connected to the point sequence end point data X, 1=X2, and the contour point data (Xi, Y2) is sent to the extension detection circuit 15. Then, the extension detection circuit 15 converts the contour point data (X3.Y3) into one data point sequence T1.
It is detected as an extension point of the point sequence and sent to the point sequence buffer 10, and at the same time, the X coordinate value of the contour point data (Xi, Y2) is stored in one storage section xTl of the point sequence end point register 11 as point sequence end point data. . Thereafter, processing is performed in the same manner as described above, and the contour point data (X3.Y2) is connected to the data point sequence T2, and at this stage the contents of the point sequence end point register 11 are as shown in FIG. 5(e) (3) It is shown in the figure below.

そして、輪郭点データ(Xi、Yl)が輪郭データメモ
リ3から読出されると、点列端点レジスタ11のX座標
値が再び更新されると共に、上記輪郭点データ(xl。
Then, when the contour point data (Xi, Yl) is read from the contour data memory 3, the X coordinate value of the point sequence end point register 11 is updated again, and the contour point data (Xi, Yl) is read out from the contour data memory 3.

Yl)はデータ点列T1に連結され、更に、最後に読出
される輪郭点データ(X2.Yl)も上記データ点列〒
1に連結される。この段階において、輪郭点データメモ
リ3の走査が終了し、点列バッファ10には第5図(C
)及び第5図(d)に示すような配列をもって各輪郭点
データが格納される。尚、点列端点レジスタ11の内容
は第5図(e)(4)で示すようになってい、゛る。
Yl) is connected to the data point sequence T1, and furthermore, the contour point data (X2.Yl) read out last is also connected to the data point sequence T1.
1. At this stage, the scanning of the contour point data memory 3 is completed, and the point sequence buffer 10 is stored in the point sequence buffer 10 as shown in FIG.
) and each contour point data is stored in an array as shown in FIG. 5(d). The contents of the point sequence end point register 11 are as shown in FIG. 5(e) (4).

□ 、この場合において、処理判定回路12からラスク
走査終了信号Sが閉ループ形成回路16に与えられ、こ
の閉ループ形成回路16は、データ点列TI、T2 (
7)端点(X2.Yl)(X3.Y2)が連結関係にあ
ると判定し、データ点列T1を順方向にデータ点列T2
を逆方向に走査して各データ点列のデータを読出す、こ
の読出データは、第5図(a)に示す物体の輪郭を反時
計回り方向に沿う輪郭線データとして抽出されている。
□ In this case, the processing determination circuit 12 gives the rask scanning end signal S to the closed loop forming circuit 16, and the closed loop forming circuit 16 generates the data point sequence TI, T2 (
7) It is determined that the end points (X2.Yl) (X3.Y2) are connected, and the data point sequence T1 is forwardly moved to the data point sequence T2.
is scanned in the opposite direction to read data of each data point sequence. This read data is extracted as contour line data along the contour of the object shown in FIG. 5(a) in a counterclockwise direction.

そして、この輪郭線データは、第5図mで示すように輪
郭線データメモリ(4)に格納される。
This contour data is then stored in the contour data memory (4) as shown in FIG. 5m.

尚、上記実施例にあっては、データ点列が二つになる場
合について説明しているが、物体の輪郭が複雑なものに
ついてもこの発明を適用すれば、処理が途中の輪郭点デ
ータについて始点検出経路14が働くことになるので、
その分、データ点列の数が増加するだけで各データ点列
を適宜結合させることによって輪郭線データを抽出でき
る。また、上記実施例に係る装置の具体的構成について
は適宜設計変更して差支えない。
In the above embodiment, the case where there are two data point sequences is explained, but if the present invention is applied to objects with complex contours, the contour point data that is still being processed can be Since the starting point detection path 14 will work,
The number of data point sequences increases accordingly, and contour line data can be extracted by appropriately combining each data point sequence. Further, the specific configuration of the device according to the above embodiment may be modified as appropriate.

(7)発明の詳細 な説明したきたように、この発明に係る輪郭線抽出方法
及びその装置によれば、輪郭点データ群を格納するメモ
リを一回走査して、中間的なデータ点列を点列バッファ
に格納し、各データ点列を結合させるように上記点列バ
ッファを一回だけ操作することにより、輪郭線データを
抽出することができる。
(7) Detailed Description of the Invention As described above, according to the contour line extraction method and its device according to the present invention, a memory storing a group of contour point data is scanned once to extract an intermediate data point sequence. Contour line data can be extracted by storing the data in a point sequence buffer and operating the point sequence buffer only once to combine each data point sequence.

このため、輪郭線データ抽出に伴う処理時間を高速に行
なうことが可能になる。
Therefore, it is possible to speed up the processing time associated with contour data extraction.

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

9 第1図は従来における輪郭線抽出方法の一例を示す説明
図、第2図は輪郭線抽出処理に当って用いられる原理説
明図、第3図はこの発明に係る輪郭線抽出装置の一実施
例を示すブロック図、第4図は第3図に示す輪郭線抽出
装置の基本作動を示すフローチャート、第5図は第3図
に示す輪郭点抽出装置の具体的作動状態を示し、第5図
(a)は物体の輪郭を構成する二値画像の一例を、第5
図(b)は輪郭点データメモリの内容を、第5図(c)
は点列バッファへのデータの格納順序を、第5図(d)
は点列バッファの3・・・輪郭点データメモリ 4・・・輪郭線データメモリ 10・・・点列バッファ 11・・・点列端点レジスタ 12・・・処理判定回路 13・・・連結点判定回路(判定手段)0 14・・・始点検出回路 (手段) 15・・・延長点検出回路 18・・・閉ループ形成回路 特許出願人 富士通株式会社 慄Gω 印 [L) (4−)(51)
9. FIG. 1 is an explanatory diagram showing an example of a conventional contour extraction method, FIG. 2 is an explanatory diagram of the principle used in the contour extraction process, and FIG. 3 is an implementation of the contour extraction device according to the present invention. A block diagram showing an example, FIG. 4 is a flowchart showing the basic operation of the contour line extraction device shown in FIG. 3, FIG. 5 shows a specific operating state of the contour point extraction device shown in FIG. (a) shows an example of a binary image constituting the outline of an object.
Figure (b) shows the contents of the contour point data memory, and Figure 5 (c) shows the contents of the contour point data memory.
The order in which data is stored in the point sequence buffer is shown in Figure 5(d).
is the point sequence buffer 3...contour point data memory 4...contour data memory 10...point sequence buffer 11...point sequence end point register 12...processing judgment circuit 13...connection point judgment Circuit (judgment means) 0 14...Start point detection circuit (means) 15...Extension point detection circuit 18...Closed loop formation circuit Patent applicant Fujitsu Limited Gω Seal [L] (4-) (51)

Claims (1)

【特許請求の範囲】 1)物体の輪郭を構成する閉ループニ値画像に対して画
面走査順に得られる輪郭点データ群を、物体の輪郭に沿
う輪郭点データとして抽出するに際し、上記輪郭点デー
タ群を輪郭点データメモリに予め格納し、この輪郭点デ
ータメモリから最初に読み出される輪郭点デ一点データ
を上記一対のデータ点列の他方の始点とすると共に、一
対のデータ点列の始点が抽出された段階において上記い
ずれかのデータ点列の端点に連結される輪郭点データを
該当するデータ点列の延長点として検出する一方、上記
輪郭点データメモリから順次読出される任意の輪郭点デ
ータが先に読出された輪郭点データによるデータ点列の
端点に連結しないときには上記輪郭点データを新たな一
対のデータ点列における一方の始点として、この新たな
データ点列における他方の始点及びその延長点を前記し
たのと同様に順次検出することにより、輪郭点データメ
モリから順次読出された輪郭点データ群を複数のデータ
点列として点列バッファに一旦格納した後、各、 デー
タ点列の端点データを比較して各端点相互の連結関係を
判定し、連結され得るデータ点列同士を結合させて輪郭
線データメモリに格納するようにしたことを特徴する輪
郭線抽出方法。 2)物体の輪郭を構成する閉ループニ値画像に対して画
面走査順に得られる輪郭点データ群を、物体の輪郭に沿
う輪郭線データとして抽出する輪郭線抽出装置であって
、上記輪郭点データ群を格納する輪郭点データメモリと
、この輪郭点データメモリから順次読出される輪郭点デ
ータを順次所定のデータ点列として格納する点列バッフ
ァと〕この点列バッファ内の各データ点列の端点に対応
する各点列端点データを順次格納する点列端点レジスタ
と、上記輪郭点データメモリから順次読出される輪郭点
データが上記点列レジスタ内の点列端点データと隣接す
るか否かを判定する判定手段と、この判定手段により」
二記輪郭点データが点列端点データに連結しないと判定
されたときに、上記点列バッファに−・対のデータ点列
を格納するスペースを設定すると共に、一対のデータ点
列における一方の始点として上記輪郭点データを検出し
、これを点列バッファ及び点列端点バッファに送る始点
検出手段と、上記判定手段により上記輪郭点データが所
定の点列端点データに連結すると判定されたときに点列
バッファに格納すべき上記一対のデータ点列における他
方の始点若しくは該当するデータ点列の延長点として上
記輪郭点データを検出し、これを点列バッファ及び点列
端点レジスタに送る延長点検出手段と、すべての輪郭点
データが点列バッファ内に格納されたときに点列バッフ
ァ内の各データ点列の端点を比較して各端点相互の連結
関係を判定し、連結され得る各点列同士を結合して閉ル
ープ状の輪郭線データを抽出する閉ループ形成手段と、
この閉ループ形成手段からの輪郭線データを格納する輪
郭線データメモリとを備えた輪郭線抽出装置。
[Claims] 1) When extracting a group of contour point data obtained in the screen scanning order for a closed-loop binary image constituting the contour of an object as contour point data along the contour of the object, the above-mentioned group of contour point data is stored in the contour point data memory in advance, and the contour point data read out first from the contour point data memory is set as the other starting point of the pair of data point sequences, and the starting point of the pair of data point sequences is extracted. At this stage, the contour point data connected to the end point of any of the data point sequences is detected as an extension point of the corresponding data point sequence, while any contour point data sequentially read from the contour point data memory is detected first. When not connected to the end point of the data point string based on the contour point data read out, the contour point data is used as one starting point of a new pair of data point strings, and the other starting point and its extension point in this new data point string are By performing sequential detection in the same way as described above, the contour point data group sequentially read out from the contour point data memory is stored in the point sequence buffer as a plurality of data point sequences, and then the end point data of each data point sequence is A contour line extraction method characterized in that a connection relationship between each end point is determined by comparison, and data point sequences that can be connected are combined and stored in a contour data memory. 2) A contour line extraction device that extracts a group of contour point data obtained in screen scanning order for a closed-loop binary image constituting the contour of an object as contour line data that follows the contour of the object, the contour point data group being a point sequence buffer that sequentially stores the contour point data sequentially read out from the contour point data memory as a predetermined data point sequence; A point string end point register that sequentially stores each corresponding point string end point data and a determination as to whether contour point data sequentially read from the contour point data memory are adjacent to point string end point data in the point string register. By means of judgment and this means of judgment.”
When it is determined that the contour point data described above is not connected to the point sequence end point data, a space is set in the point sequence buffer to store the pair of data point sequences, and one starting point in the pair of data point sequences is set. starting point detection means for detecting the contour point data and sending it to a point sequence buffer and a point sequence end point buffer; Extended point detection means for detecting the contour point data as the other starting point in the pair of data point sequences to be stored in the sequence buffer or as an extension point of the corresponding data point sequence, and sending this to the point sequence buffer and point sequence end point register. Then, when all the contour point data is stored in the point sequence buffer, the end points of each data point sequence in the point sequence buffer are compared to determine the connection relationship between each end point, and each point sequence that can be connected is determined. closed loop forming means for extracting closed loop contour data by combining the
A contour extraction device comprising a contour data memory for storing contour data from the closed loop forming means.
JP58225622A 1983-11-30 1983-11-30 Method and device for extracting contour Granted JPS60117381A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58225622A JPS60117381A (en) 1983-11-30 1983-11-30 Method and device for extracting contour

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58225622A JPS60117381A (en) 1983-11-30 1983-11-30 Method and device for extracting contour

Publications (2)

Publication Number Publication Date
JPS60117381A true JPS60117381A (en) 1985-06-24
JPH0146912B2 JPH0146912B2 (en) 1989-10-11

Family

ID=16832194

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58225622A Granted JPS60117381A (en) 1983-11-30 1983-11-30 Method and device for extracting contour

Country Status (1)

Country Link
JP (1) JPS60117381A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5222158A (en) * 1988-06-06 1993-06-22 Hitachi Software Engineering Co., Ltd. Pattern recognition apparatus
EP0558049A2 (en) * 1992-02-27 1993-09-01 Dainippon Screen Mfg. Co., Ltd. Method and apparatus for extracting a contour of an image

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5222158A (en) * 1988-06-06 1993-06-22 Hitachi Software Engineering Co., Ltd. Pattern recognition apparatus
EP0558049A2 (en) * 1992-02-27 1993-09-01 Dainippon Screen Mfg. Co., Ltd. Method and apparatus for extracting a contour of an image
EP0558049A3 (en) * 1992-02-27 1994-01-19 Dainippon Screen Mfg
US5379350A (en) * 1992-02-27 1995-01-03 Dainippon Screen Mfg. Co., Ltd. Method and apparatus for extracting a contour of an image

Also Published As

Publication number Publication date
JPH0146912B2 (en) 1989-10-11

Similar Documents

Publication Publication Date Title
JP2918383B2 (en) Image contour extraction method and apparatus
US5563995A (en) Method and system for directly drawing a convex polygon having a given number of vertices with high speed
JP2005084798A5 (en)
JPS60117381A (en) Method and device for extracting contour
JPH1049688A (en) Method for partial erasing method and partial detection method for picture data
JPS6341107B2 (en)
JPH04255080A (en) Image input device
US5307454A (en) Apparatus for extracting local image from original image
JPH0447867B2 (en)
JPH0311485A (en) Image scanner
JPH06119448A (en) Image processing method
JPH01134684A (en) System for tracing picture element string
JPS62274467A (en) Intellectual conversation processing method
JP2904994B2 (en) Coordinate connection display method
JP2922014B2 (en) Original image pattern data playback device
JP2969930B2 (en) Line memory of image processing device
JPS59140586A (en) Picture processing device
JP2641432B2 (en) Interface device
JPS63254578A (en) Pattern recognition device
JPS61195477A (en) Method for processing free curve line picture data of picture reader
JPS60114926A (en) Converter of two-dimension coordinate data
JPH0540851A (en) Method and device for character recognition
JPH053627B2 (en)
JPS62263588A (en) Picture processor
JPH0150952B2 (en)