JPH0146912B2 - - Google Patents

Info

Publication number
JPH0146912B2
JPH0146912B2 JP58225622A JP22562283A JPH0146912B2 JP H0146912 B2 JPH0146912 B2 JP H0146912B2 JP 58225622 A JP58225622 A JP 58225622A JP 22562283 A JP22562283 A JP 22562283A JP H0146912 B2 JPH0146912 B2 JP H0146912B2
Authority
JP
Japan
Prior art keywords
point
data
contour
sequence
point sequence
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
JP58225622A
Other languages
Japanese (ja)
Other versions
JPS60117381A (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)

Description

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

(2) 技術の背景 一般に、物体の輪郭を構成する二値画像から物
体の形状を抽出したり、各種パラメータ、例えば
物体の重心位置、物体の輪郭の周長等を求めるに
は、計算のやり易さ等の観点からして物体の輪郭
に沿つて配列される輪郭線データを抽出すること
が必要になる。
(2) Background of the technology Generally, 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の輪郭点データ群(X1、
Y1)(X2、Y2)…(Xn、Yn)を画面走査順に
得て、これらを輪郭点データメモリ3に格納し、
しかる後上記輪郭点データ群に輪郭線抽出処理を
施し、上記輪郭点データ群を物体の輪郭の例えば
反時計回り方向(図中mで示す)に沿う輪郭線デ
ータ(XA1、YA1)(XA2、YA2)…(XAo、YAo
として抽出し、輪郭線データメモリ4に格納する
ようにしたものがある。この方法において、上記
輪郭線抽出処理としては、例えば第2図に示すよ
うに、輪郭点データ中に始点P(Xi、Yi)を定
め、この始点に連結可能な8つの囲繞位置A乃至
Gについて上記輪郭点データメモリ3を検索し
て、始点Pの次に連結される次輪郭点を抽出した
後、当該抽出された輪郭点の次に連結される次輪
郭点を上述したのと同様にして抽出し、以後この
手順を繰返すことにより、抽出した輪郭点を輪郭
線データとして輪郭線データメモリに順次格納す
るようにしたものである。
(3) Prior art and its problems As a conventional contour extraction method of this type, for example, as shown in FIG. 1, an X- Y
By setting a coordinate system in advance and scanning 2 the screen 1, a group of contour point data (X1,
Y1) (X2, Y2)...(Xn, Yn) are obtained in the screen scanning order, and these are stored in the contour point data memory 3,
Thereafter, the contour point data group is subjected to contour line extraction processing, and the contour point data group is converted into contour line data (X A1 , Y A1 ) ( X A2 , Y A2 )…(X Ao , Y Ao )
There is a method in which the contour line data is extracted and stored in the contour line data memory 4. In this method, as shown in FIG. 2, for example, as shown in FIG. 2, in this method, a starting point P (Xi, Yi) is determined in the contour point data, and eight surrounding positions A to G that can be connected to this starting point are After searching the contour point data memory 3 and extracting the next contour point connected next to the starting point P, the next contour point connected next to the extracted contour point is determined in the same manner as described above. By extracting the contour points and repeating this procedure thereafter, the extracted contour points are sequentially stored in the 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 must be searched,
There is a problem in that the number of times the contour point data memory 3 is searched is required to obtain the final contour data, and the processing time for contour extraction takes a considerable amount of time.

(4) 発明の目的 この発明は以上の観点に立つて為されたもので
あつて、その目的とするところは、輪郭線抽出に
伴う処理時間の短縮化を企図した輪郭線抽出方法
及びその装置を提供することにある。
(4) Purpose of the Invention The present invention has been made based on the above-mentioned viewpoints, and its purpose 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. Our goal is to provide the following.

(5) 発明の構成 そして、この発明に係る輪郭線抽出方法の基本
的構成は、物体の輪郭を構成する閉ループ二値画
像に対して画面走査順に得られる輪郭点データ群
を、物体の輪郭に沿う輪郭点データとして抽出す
るに際し、上記輪郭点データ群を輪郭点データメ
モリに予め格納し、この輪郭点データメモリから
最初に読み出される輪郭点データを一対のデータ
点列における一方の始点とし、この始点データに
連結可能な2点のうちより上かつ右の輪郭点デー
タを上記一対のデータ点列の他方の始点とすると
共に、一対のデータ点列の始点が抽出された段階
において上記いずれかのデータ点列の端点に連結
される輪郭点データを該当するデータ点列の延長
点として検出する一方、上記輪郭点データメモリ
から順次読出される任意の輪郭点データが先に読
出された輪郭点データによるデータ点列の端点に
連結しないときには上記輪郭点データを新たな一
対のデータ点列における一方の始点として、この
新たなデータ点列における他方の始点及びその延
長点を前記したのと同様に順次検出することによ
り、輪郭点データメモリから順次読出された輪郭
点データ群を複数のデータ点列として点列バツフ
アに一旦格納した後、各データ点列の端点データ
を比較して各端点相互の連結関係を判定し、連結
され得るデータ点列同士を結合させて輪郭線デー
タメモリに格納するようにしたことを特徴する輪
郭線抽出方法にある。
(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 screen scanning order from a closed-loop binary image that constitutes the contour of an object into the contour of the object. When extracting contour point data along the contour, the 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 used as the starting point of one of a pair of data point sequences. Out of the two points that can be connected to the starting point data, the upper and right contour point data is set as the other starting point of the pair of data point sequences, and at the stage when the starting point of the pair of data point sequences is extracted, either of the above While the contour point data connected to the end points of the data point sequence is detected as an extension point of the corresponding data point sequence, any contour point data sequentially read from the contour point data memory is the contour point data read out first. When not connected to the end points of a data point sequence, the above contour point data is used as one starting point of a new pair of data point sequences, and the other starting point and its extension point in this new data point sequence are sequentially processed in the same manner as described above. By detecting the contour point data, the contour point data group sequentially read out from the contour point data memory is stored in a point sequence buffer as multiple data point sequences, and then the end point data of each data point sequence is compared to connect each end point with each other. A contour line extraction method is characterized in that a relationship is determined, data point sequences that can be connected are combined and stored in a contour data memory.

そしてまた、上記方法を実施するための装置の
基本的構成は、物体の輪郭を構成する閉ループ二
値画像に対して画面走査順に得られる輪郭点デー
タ群を、物体の輪郭に沿う輪郭線データとして抽
出する輪郭線抽出装置であつて、上記輪郭点デー
タ群を格納する輪郭点データメモリと、この輪郭
点データメモリから順次読出される輪郭点データ
を順次所定のデータ点列として格納する点列バツ
フアと、この点列バツフア内の各データ点列の端
点に対応する各点列端点データを順次格納する点
列端点レジスタと、上記輪郭点データメモリから
順次読出される輪郭点データが上記点列レジスタ
内の点列端点データと隣接するか否かを判定する
判定手段と、この判定手段により上記輪郭点デー
タが点列端点データに連結しないと判定されたと
きに、上記点列バツフアに一対のデータ点列を格
納するスペースを設定すると共に、一対のデータ
点列における一方の始点として上記輪郭点データ
を検出し、これを点列バツフア及び点列端点バツ
フアに送る始点検出手段と、上記判定手段により
上記輪郭点データが所定の点列端点データに連結
すると判定されたときに点列バツフアに格納すべ
き上記一対のデータ点列における他方の始点若し
くは該当するデータ点列の延長点として上記輪郭
点データを検出し、これを点列バツフア及び点列
端点レジスタに送る延長点検出手段と、すべての
輪郭点データが点列バツフア内に格納されたとき
に点列バツフア内の各データ点列の端点を比較し
て各端点相互の連結関係を判定し、連結され得る
各点列同士を結合して閉ループ状の輪郭線データ
を抽出する閉ループ形成手段と、この閉ループ形
成手段からの輪郭線データを格納する輪郭線デー
タメモリとを備えたものである。
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. and a point string end point register that sequentially stores each point string end point data corresponding to the end point of each data point string in this point string buffer, and a point string end point register that sequentially stores contour point data sequentially read from the contour point data memory. a determination 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 determination means determines that the contour point data is not connected to the point sequence end point data, A start point detection means that sets a space for storing a point sequence, detects the contour point data as one starting point in a pair of data point sequences, and sends it to a point sequence buffer and a point sequence end point buffer, and the determination means. When it is determined that the contour point data is connected to the predetermined point sequence end point data, the contour point data is used as the other starting point in the pair of data point sequences or an extension point of the corresponding data point sequence to be stored in the point sequence buffer. Extended point detection means detects and sends this to a point sequence buffer and a point sequence end point register, and when all contour point data is stored in the point sequence buffer, the end point of each data point sequence in the point sequence buffer is detected. Closed loop forming means for comparing and determining the connection relationship between end points and extracting closed loop contour data by combining each point sequence that can be connected, and storing the contour data from this closed loop forming means. It is equipped with a contour line data memory.

(6) 発明の実施例 以下、添付図面に示す実施例に基づいてこの発
明に係る輪郭線抽出方法及びその装置を詳細に説
明する。
(6) Embodiments of the Invention Hereinafter, a contour line extraction method and an apparatus thereof 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図bの輪郭点データ群を物体の
輪郭に沿う輪郭線データ(第5図f参照)として
格納する輪郭線データメモリ、10は、例えば第
5図b及びdに示すように、上記輪郭点データメ
モリ3から順次読出される輪郭線データ群を二つ
のデータ点列T1、T2として格納する点列バツフ
ア、11は、例えば第5図d及びeに示すよう
に、上記点列バツフア10内の各データ点列T1、
T2の端点に対応する各点列端点データを順次格
納する点列端点レジスタであり、この点列端点デ
ータは、二つのX座標(XT1、XT2)と一つのY
座標値とからなつている。
In the same figure, 3 stores 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 (see FIG. 5 b), as shown in FIG. 5 a, for example. contour point data memory,
Reference numeral 4 denotes a contour data memory for storing, for example, the contour point data group shown in FIG. 5b as contour line data along the outline of the object (see FIG. 5f), and 10 denotes a memory as shown in FIGS. 5b and 5d, for example. In addition, a point sequence buffer 11 stores the contour line data group sequentially read out from the contour point data memory 3 as two data point sequences T1 and T2, as shown in FIG. 5d and e, for example. Each data point sequence T1 in the column buffer 10,
This is a point sequence end point register that sequentially stores each point sequence end point data corresponding to the end point of T2, and this point sequence end point data consists of two X coordinates (X T1 , X T2 ) and one Y coordinate.
It consists of coordinate values.

また、この実施例において、12は、輪郭点デ
ータメモリ3の走査が終了するまで輪郭点データ
のY座標値が先に読出された輪郭点データのもの
に比べて変化したか否か、即ちラスタ走査が一段
下がるか否かを判定する処理判定回路であり、こ
れは、ラスタ走査が一段下がる場合には上記点列
端点レジスタ11内のY座標値を更新するように
なつており、ラスタ走査が終了すると、ラスタ走
査終了信号Sを出力するようになつている。
In this embodiment, 12 also determines whether or not the Y 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 one step.This is a processing determination circuit that updates the Y coordinate value in the point sequence end point register 11 when the raster scan goes down one step. Upon completion, a raster scanning end signal S is output.

また、13は点列端点レジスタ11のX座標値
を参照して、輪郭点データメモリ3から読出され
た輪郭点データが点列バツフア10内のどのデー
タ点列に連結するか否かを判定する連結点判定回
路である。第6図に、最初の始点に隣接する場所
に輪郭点の存在する仕方の組合せを示す。図にお
いて、ハツチング部分が、一対の点列のうち、他
方の始点となる点である。また4,5,6におい
ては2番目の輪郭点が他方の始点となる。14は
連結点判定回路13により上記輪郭点データが点
列バツフア10内のデータ点列に連結しないと判
定されたときに働く始点検出回路であり、これ
は、上記点列バツフア10内に新たに一対のデー
タ点列を格納するスペースを設定すると共に、上
記輪郭データを一対のデータ点列の一方の始点と
して検出し、これを点列バツフア10に送ると共
に、新たな初期点列端点データとして点列端点レ
ジスタ11に送るようになつている。一方、15
は上記連結点判定回路13により上記輪郭点デー
タが点列バツフア10内のデータ点列に連結する
と判定されたときに働く延長点検出回路であり、
これは、点列バツフア10内の上記一対のデータ
点列の他方の始点が空データである場合には上記
輪郭点データを上記一対のデータ点列の他方の始
点として検出すると共に、上記一対のデータ点列
の始点が設定されている場合には上記輪郭点デー
タを該当するデータ点列の延長点として検出し、
これを点列バツフア10に送ると共に、更新する
点列端点データとして点列端点レジスタ11に送
るようになつている。
Further, 13 refers to the X coordinate value of the point sequence end point register 11 to determine which data point sequence in the point sequence buffer 10 the contour point data read from the contour point data memory 3 is connected to. This is a connection point determination circuit. FIG. 6 shows combinations of contour points located adjacent to the initial starting point. In the figure, the hatched part is the starting point of the other of the pair of point sequences. In addition, in cases 4, 5, and 6, the second contour point becomes the other starting point. Reference numeral 14 denotes a start point detection circuit that operates when the connection point determination circuit 13 determines that the contour point data is not connected to the data point sequence in the point sequence buffer 10; A space for storing a pair of data point sequences is set, the contour data is detected as the starting point of one of the pair of data point sequences, and this is sent to the point sequence buffer 10, and a point is set as new initial point sequence end point data. The data is sent to the column end point register 11. 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 in the point sequence buffer 10;
This means that if the other starting point of the pair of data point sequences in the point sequence buffer 10 is empty data, the contour point data is detected as the other starting point of the pair of data point sequences; If the starting point of the data point sequence is set, the above contour point data is detected as an extension point of the corresponding data point sequence,
This is sent to the point string buffer 10 and also to the point string end point register 11 as point string end point data to be updated.

更に、符号16は処理判定回路12からのラス
タ走査終了信号Sによつて作動する閉ループ形成
回路であり、これは、点列バツフア10内の各デ
ータ点列の端点を比較して各端点相互の連結関係
を判定し、連結され得る各点列同士を結合して点
列バツフア10内の各点列を閉ループ状に読出す
ものである。
Further, reference numeral 16 is a closed loop forming circuit that is activated by the raster 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 relationship between each end point. The connection relationship 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、Y1)が格納される。この輪郭点デ
ータメモリ3から最初の輪郭点データ(X2、
Y3)が読出されると、先ず、処理判定回路12
において、点列端点レジスタ11の空データであ
るY座標値がY3に設定され、次いで、上記輪郭
点データ(X2、Y2)が連結点判定回路13に送
られると、上記点列端点レジスタ13のX座標値
が空データであることから、上記輪郭点データ
(X2、Y3)が連結するデータ点列はないと判定
され、上記輪郭点データ(X2、Y3)は始点検出
回路14に送られる。すると、この始点検出回路
14は、第5図dに示すように、点列バツフア1
0内に一対のデータ点列T1、T2を格納するスペ
ースを設定し、上記輪郭点データ(X2、Y3)を
一方のデータ点列T1の始点として検出し、これ
を点列バツフア10に送ると共に、上記輪郭点デ
ータ(X2、Y3)のY座標値を初期点列端点デー
タとして点列端点レジスタ11の一対の格納部
(XT1、XT2)に送る。この段階において、点列バ
ツフア10のデータ点列T1は上記輪郭データ
(X2、Y3)を始点として格納すると共に、デー
タ点列T2の始点は空データであり、点列端点レ
ジスタ11の内容は、第5図e,1に示すように
なつている。
Now, assuming that the closed-loop binary image that constitutes the outline of the object is as shown in FIG. 5a, the contour point data memory 3 stores the following information as shown in FIG.
Contour point data (X2,
Y3)...(X2, Y1) is stored. The first contour point data (X2,
Y3) is read out, first, the processing determination circuit 12
In , the Y coordinate value, which is empty data, of the point sequence end point register 11 is set to Y3, and then, when the contour point data (X2, Y2) is sent to the connected point determination circuit 13, the point sequence end point register 13 is set. Since the X coordinate value is empty data, it is determined that there is no data point sequence to which the contour point data (X2, Y3) are connected, and the contour point data (X2, Y3) is sent to the starting point detection circuit 14. Then, this starting point detection circuit 14 detects the point sequence buffer 1 as shown in FIG.
0, set a space to store a pair of data point sequences T1 and T2, detect the above contour point data (X2, Y3) as the starting point of one data point sequence T1, and send it to the point sequence buffer 10. , the Y coordinate values of the contour point data (X2, Y3) are sent to a pair of storage units (X T1 , X T2 ) of the point sequence end point register 11 as initial point sequence end point data. At this stage, the data point sequence T1 of the point sequence buffer 10 is stored with the above contour data (X2, Y3) as the starting point, 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 follows. It is arranged as shown in Fig. 5e, 1.

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

更に、輪郭点データメモリ3から次の輪郭点デ
ータ(X1、Y2)が読出されると、処理判定回路
12は、上記輪郭点データ(X1、Y2)のY座標
値が点列端点レジスタ11のY座標値と異なるこ
とから、点列端点レジスタ11のY座標値をY2
に更新する。そして、上記輪郭データ(X1、
Y2)が連結点判定回路13に送られると、該連
結点判定回路13は上記輪郭点データ(X1、
Y2)が点列端点データXT1=X2に連結すること
を判定し、上記輪郭点データ(X1、Y2)を延長
検出回路15に送る。すると、この延長検出回路
15は、上記輪郭点データ(X3、Y3)を一方の
データ点列T1の延長点として検出し、これを点
列バツフア10に送ると共に、上記輪郭点データ
(X1、Y2)のY座標値を点列端点データとして
点列端点レジスタ11の一方の格納部XT1に格納
する。以後、上述したのと同様に処理され、輪郭
点データ(X3、Y2)は、上記データ点列T2に連
結され、この段階で点列端点レジスタ11の内容
は第5図e,3に示すようになつている。そし
て、輪郭点データ(X1、Y1)が輪郭データメモ
リ3から読出されると、点列端点レジスタ11の
Y座標値が再び更新されると共に、上記輪郭点デ
ータ(X1、Y1)はデータ点列T1に連結され、更
に、最後に読出される輪郭点データ(X2、Y1)
も上記データ点列T1に連結される。この段階に
おいて、輪郭点データメモリ3の走査が終了し、
点列バツフア10には第5図c及び第5図dに示
すような配列をもつて各輪郭点データが格納され
る。尚、点列端点レジスタ11の内容吏は第5図
e,4で示すようになつている。
Furthermore, when the next contour point data (X1, Y2) is read out from the contour point data memory 3, the processing determination circuit 12 determines that the Y coordinate value of the contour point data (X1, Y2) is stored in the point sequence end point register 11. Since it is different from the Y coordinate value, set the Y coordinate value of the point sequence end point register 11 to Y2.
Update to. Then, the above contour data (X1,
Y2) is sent to the connection point determination circuit 13, the connection point determination circuit 13 receives the contour point data (X1,
It is determined that the contour point data (X1, Y2) is connected to the point sequence end point data X T1 =X2, and the contour point data (X1, Y2) is sent to the extension detection circuit 15. Then, this extension detection circuit 15 detects the contour point data (X3, Y3) as an extension point of one data point sequence T1, sends it to the point sequence buffer 10, and also detects the contour point data (X1, Y2) as an extension point of one data point sequence T1. ) is stored in one storage section X T1 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 Figure 5 e, 3. It's getting old. Then, when the contour point data (X1, Y1) is read from the contour data memory 3, the Y coordinate value of the point sequence end point register 11 is updated again, and the contour point data (X1, Y1) is read out from the data point sequence. Contour point data (X2, Y1) connected to T1 and finally read out
is also connected to the data point sequence T1. At this stage, scanning of the contour point data memory 3 is completed,
Each contour point data is stored in the point sequence buffer 10 in an arrangement as shown in FIGS. 5c and 5d. The contents of the point sequence end point register 11 are as shown in FIG. 5, e and 4.

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

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

尚、上記実施例にあつては、データ点列が二つ
になる場合について説明しているが、物体の輪郭
が複雑なものについてもこの発明を適用すれば、
処理が途中の輪郭点データについて始点検出回路
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 outlines,
Since the start point detection circuit 14 operates on the contour point data that is being processed, 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) Effects of the Invention As explained above, according to the contour line extraction method and device according to the present invention, the memory storing the contour point data group is scanned once to generate 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 so as 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]

第1図は従来における輪郭線抽出方法の一例を
示す説明図、第2図は輪郭線抽出処理に当つて用
いられる原理説明図、第3図はこの発明に係る輪
郭線抽出装置の一実施例を示すブロツク図、第4
図は第3図に示す輪郭線抽出装置の基本作動を示
すフローチヤート、第5図は第3図に示す輪郭点
抽出装置の具体的作動状態を示し、第5図aは物
体の輪郭を構成する二値画像の一例を、第5図b
は輪郭点データメモリの内容を、第5図cは点列
バツフアへのデータの格納順序を、第5図dは点
列バツフアの内容を、第5図eは点列端点レジス
タの内容を、第5図fは輪郭線データメモリの内
容を夫々示す説明図、第6図は最初の始点に隣接
する場所に輪郭点の存在する仕方の組合せを示す
図である。 3……輪郭点データメモリ、4……輪郭線デー
タメモリ、10……点列バツフア、11……点列
端点レジスタ、12……処理判定回路、13……
連結点判定回路(判定手段)、14……始点検出
回路(手段)、15……延長点検出回路、16…
…閉ループ形成回路。
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 embodiment of the contour extraction device according to the present invention. Block diagram showing 4th
The figure is a flowchart showing the basic operation of the contour line extracting device shown in FIG. 3, FIG. 5 shows the specific operating state of the contour point extracting device shown in FIG. 3, and FIG. An example of a binary image is shown in Figure 5b.
shows the contents of the contour point data memory, FIG. 5c shows the order of storing data in the point sequence buffer, FIG. 5d shows the contents of the point sequence buffer, and FIG. FIG. 5f is an explanatory diagram showing the contents of the contour data memory, respectively, and FIG. 6 is a diagram showing combinations of ways in which contour points are present at locations adjacent to the initial starting point. 3... Contour point data memory, 4... Outline data memory, 10... Point sequence buffer, 11... Point sequence end point register, 12... Processing determination circuit, 13...
connection point determination circuit (determination means), 14...start point detection circuit (means), 15...extension point detection circuit, 16...
...Closed loop forming circuit.

Claims (1)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2591984B2 (en) * 1988-06-06 1997-03-19 日立ソフトウェアエンジニアリング株式会社 Pattern recognition device
JP2918383B2 (en) * 1992-02-27 1999-07-12 大日本スクリーン製造株式会社 Image contour extraction method and apparatus

Also Published As

Publication number Publication date
JPS60117381A (en) 1985-06-24

Similar Documents

Publication Publication Date Title
JP2918383B2 (en) Image contour extraction method and apparatus
EP0173098A2 (en) Pattern outline tracking method and apparatus
US5563995A (en) Method and system for directly drawing a convex polygon having a given number of vertices with high speed
JPH0146912B2 (en)
EP0278528B1 (en) Area searching system
JPH1049688A (en) Method for partial erasing method and partial detection method for picture data
US5307454A (en) Apparatus for extracting local image from original image
KR960003871B1 (en) Labelling method & the apparatus thereof
JPH0447867B2 (en)
JPS6019549B2 (en) Shape matching device
JPH01243188A (en) Contour detector
JPH0510709B2 (en)
JP2838556B2 (en) Image processing device
JPH05143733A (en) Contour extracting device
JP2922014B2 (en) Original image pattern data playback device
JPS61131084A (en) Picture processor
JP3100304B2 (en) Dot pattern generation device and dot pattern generation method
JP3037504B2 (en) Image processing method and apparatus
JP2910295B2 (en) Contour information extraction device
JPH0348981A (en) Closed area discriminating system
JPH11272860A (en) Special line display method of drawings automatic input device
JPH11345333A (en) Labeling processing system and method therefor
JPS59128662A (en) Raster vector converter
JPS63184887A (en) Processing system for determining line to be deleted
JPH0273478A (en) Retrieving method for plural 2-dimensional patterns