JPS6155789A - Outline extracting device - Google Patents

Outline extracting device

Info

Publication number
JPS6155789A
JPS6155789A JP59177678A JP17767884A JPS6155789A JP S6155789 A JPS6155789 A JP S6155789A JP 59177678 A JP59177678 A JP 59177678A JP 17767884 A JP17767884 A JP 17767884A JP S6155789 A JPS6155789 A JP S6155789A
Authority
JP
Japan
Prior art keywords
data
point
contour
point data
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
JP59177678A
Other languages
Japanese (ja)
Other versions
JPH0447867B2 (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 JP59177678A priority Critical patent/JPS6155789A/en
Publication of JPS6155789A publication Critical patent/JPS6155789A/en
Publication of JPH0447867B2 publication Critical patent/JPH0447867B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To drastically shorten a processing time required for extracting an outline data by having a connected relation information of the outline point in a link information memory and managing an intermediate data point sequence by the link information memory. CONSTITUTION:When an outline point data is read successively from an outline point data memory 3, a compression circuit 11 collects a horizontally continuing data. When this compressed first outline point data is fed to a processing judge circuit 12, in a y coordinate register of a point sequence register 14 y3 is set. Then, when this outline point data is fed to a link point judge circuit 13, since x coordinate value of the point sequence register 14 is a space data, it is judged that there is no connecting data point sequence, and this data is fed to a starting point detection circuit 16. In the starting point detection circuit 16, the outline point data is stored as the starting point of a pair of point sequences T1, T2 and a pair of x2, x3 are set as point sequence end point data in a pair of storing divisions. When a next outline point data is fed to the processing judge circuit 12, y coordinate is renewed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、例えば視覚認識システム等においてテレビカ
メラで捉えた物体の形状を把握するために、その物体の
輪郭を構成する二値画像に対して画面走査順に得られる
輪郭点データ群から、物体の輪郭に沿う輪郭線データを
抽出する輪郭線抽出装置に関するものである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention uses a binary image that constitutes the outline of an object in order to grasp the shape of the object captured by a television camera in, for example, a visual recognition system. The present invention relates to a contour line extraction device that extracts contour line data along the contour of an object from a group of contour point data obtained in the order of screen scanning.

〔従来の技術〕[Conventional technology]

一般に視覚認識システム等においては、物体の輪郭を構
成する二値画像から、物体の形状を抽出したり、例えば
物体の重心位置や物体の輪郭の周囲長等の各種パラメー
タを求めるにあたり、計算のやり易さ等の観点からして
、物体の輪郭に沿って配列される輪郭線データを抽出す
ることが必要となる。即ち、例えばテレビカメラから得
られた濃淡画像における濃淡の境界から輪郭点データを
生成し、その輪郭点データに基づいて閉ループを形成す
る輪郭線データを抽出することが必要となる。
Generally, in visual recognition systems, etc., calculations are required to extract the shape of an object from a binary image that makes up the object's outline, or to determine various parameters such as the position of the center of gravity of the object or the circumference of the object's outline. From the viewpoint of ease, etc., it is necessary to extract contour data arranged along the contour of the object. That is, it is necessary to generate contour point data from the boundaries of shading in a gradation image obtained from a television camera, for example, and to extract contour line data forming a closed loop based on the contour point data.

第5図および第6図は従来方式による輪郭線抽出を説明
するための図である。
FIGS. 5 and 6 are diagrams for explaining contour line extraction by the conventional method.

従来におけるこの種の輪郭線抽出方式としては、例えば
第5図に示すように、物体の輪郭を構成する二値画像C
Dが表示される画面l上に、x−y座標系を予め設定し
、上記画面1を走査2することにより、上記二値画像C
Dの輪郭点データ群(xIn )’+) (Xz yz
)= (Xn、 Yn )を画面走査順に得て、これら
を輪郭点データメモリ3に格納し、しかる後上記輪郭点
データ群に輪郭線抽出処理を施し、上記輪郭点データ群
を物体の輪郭の例えば反時計回り方向(図中mで示す)
に沿う輪郭線データ(Xa+、  )’at)  (X
az、  )’Az) −(Xan+  1口)として
抽出し、輪郭線データメモリ4に格納するようにしたも
のがある。この方式において、上記輪郭線抽出処理とし
ては、例えば第6図に示すように、輪郭点データ中に始
点P (x =、y、)を定め、この始点に連結可能な
8つの囲繞位置AないしGについて上記輪郭点データメ
モリ3を検索して、始点Pの次に連結される次輪郭点を
抽出した後、当該抽出された輪郭点の次に連結される次
輪郭点を上述したのと同様にして抽出し、以後この手順
を繰り返すことにより、抽出した輪郭点を輪郭線データ
として輪郭線データメモリ4に順次格納するようにして
いる。
As a conventional contour extraction method of this type, for example, as shown in FIG. 5, a binary image C forming the contour of an object is
By setting an x-y coordinate system in advance on the screen l on which D is displayed, and scanning the screen 1 2, the binary image C
Contour point data group of D (xIn )'+) (Xz yz
) = (Xn, Yn) are obtained in the order of screen scanning, these are stored in the contour point data memory 3, and then the contour point data group is subjected to contour extraction processing, and the contour point data group is extracted from the contour of the object. For example, counterclockwise direction (indicated by m in the diagram)
Contour data along (Xa+, )'at) (X
az, )'Az) - (Xan+ 1 mouth) and stored in the contour data memory 4. In this method, as shown in FIG. 6, for example, as shown in FIG. 6, the contour line extraction process involves determining a starting point P (x = y,) in the contour point data, and selecting eight surrounding positions A to A that can be connected to this starting point. After searching the contour point data memory 3 for G and extracting the next contour point connected after the starting point P, the next contour point connected next to the extracted contour point is determined in the same way as described above. By repeating this procedure thereafter, the extracted contour points are sequentially stored in the contour data memory 4 as contour data.

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

しかしながら、このような従来の輪郭線抽出方式にあっ
ては、ある1つの輪郭点の次に連結される次輪郭点を抽
出するために、1つの輪郭点を囲繞する8個所すべての
データ値について輪郭点データメモリ3を検索しなけれ
ばならないことから、最終的な輪郭線データを得るまで
において必要な輪郭点データメモリ3の検索回数が膨大
なものとなってしまい、その分、輪郭線抽出のための処
理時間が大幅にかかるという問題があった。
However, in such a conventional contour line extraction method, in order to extract the next contour point connected to one contour point, data values at all eight points 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 was a problem in that it took a considerable amount of processing time.

この問題を解決するために、本願発明者は、先に特願昭
58−225622号に示されるような輪郭線抽出装置
を提案している。この提案の発明によれば、輪郭点デー
タ群を格納するメモリを1回走査して、中間的なデータ
点列を点列バッファに格納し、各データ点列を結合させ
ることによって、輪郭線データを抽出するようにしてい
る。1回だけの走査で順次輪郭点データを処理していく
ことができるので、輪郭線データ抽出を極めて高速に行
うことができるようになっている。
In order to solve this problem, the inventor of the present application previously proposed a contour extraction device as shown in Japanese Patent Application No. 58-225622. According to this proposed invention, by scanning the memory storing the contour point data group once, storing the intermediate data point sequence in the point sequence buffer, and combining each data point sequence, the contour line data is I am trying to extract. Since contour point data can be sequentially processed in just one scan, contour data can be extracted at extremely high speed.

上記提案の発明において、上記点列バッファが不要とな
れば、メモリ領域を節減できるので、より望ましい。
In the proposed invention, it is more desirable if the point sequence buffer is not required, since the memory area can be saved.

本発明は上記問題点の解決を図り、処理時間の高速化を
可能とすると共に、上記提案の発明をさらに改良発展さ
せ、比較的大きなメモリ領域を必要とする点列バッファ
を設けずに、同様な輪!IS線データの抽出を可能とす
る輪郭線抽出装置を提供することを目的としている。
The present invention aims to solve the above-mentioned problems and makes it possible to speed up the processing time, and further improves and develops the above-mentioned proposed invention. A ring! It is an object of the present invention to provide a contour line extraction device that enables extraction of IS line data.

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

そのため本発明は、先に提案した発明において、最初に
読み出した輪郭点データを、一対のデータ点列の双方の
始点とし、データ点列を一旦点列バッファに格納するこ
とはしないで、代わりに輪郭点の連結関係の情報を連結
情報メモリに持つようにし、中間的なデータ点列を連結
情報メモリによって管理するようにしている。即ち、本
発明の輪郭線抽出装置は、物体の輪郭を構成する閉ルー
プ二値画像に対・して画面走査順に得られる輪郭点デー
タ群を物体の輪郭に沿う輪郭線データとして抽出する輪
郭線抽出装置であって、上記輪郭点データ群を格納する
輪郭点データメモリと、処理される各データ点列の端点
に対応する各点列端点データを記憶する点列端点記憶手
段と、上記各輪郭点データ毎にその連結する輪郭点デー
タを指すポインタ情報を記憶する連結情報メモリと、上
記輪郭点データメモリから読み出した輪郭点データが上
記点列端点記憶手段に記憶されている点列端点データー
と隣接するか否かを判定する手段を存するデータ抽出処
理手段と、該データ抽出処理手段により上記輪郭点デー
タが上記点列端点データに連結しないと判定されたとき
に当該輪郭点データを新しいデータ点列の始点として検
出しこれを上記点列端点記憶手段に格納する始点検出手
段と、上記データ抽出処理手段により上記輪郭点データ
が先に検出された点列端点データに連結すると判定され
たときに当該輪郭点データを延長点として検出しこれを
上記点列端点記憶手段に格納すると共にその連結する輪
郭点データを指すポインタ情報を上記連結情報メモリに
格納する延長点検出手段と、上記連結情報メモリに格納
された情報に基づき各点列データの端点を比較して各端
点相互の連結関係を判定し連結され得る各点列同士を結
合して閉ループ状の輪郭線データを抽出する閉ループ二
値画像と、該閉ループ二値画像からの輪郭線データが格
納される輪郭線データメモリとを備えたことを特徴とし
ている。以下、図面を参照しつつ、実施例に従って説明
する。
Therefore, in the previously proposed invention, the present invention uses the first read contour point data as the starting point of both of a pair of data point sequences, and instead of storing the data point sequence in the point sequence buffer, Information on the connection relationship between contour points is stored in the connection information memory, and intermediate data point sequences are managed by the connection information memory. That is, the contour extraction device of the present invention extracts a group of contour point data obtained in the order of screen scanning from a closed-loop binary image forming the contour of an object as contour data along the contour of the object. An apparatus comprising: a contour point data memory for storing the contour point data group; a point sequence end point storage means for storing point sequence end point data corresponding to the end points of each data point sequence to be processed; and each of the contour points. a connection information memory that stores pointer information pointing to the connected contour point data for each data; and a connection information memory that stores pointer information pointing to the connected contour point data, and the contour point data read from the contour point data memory is adjacent to the point sequence end point data stored in the point sequence end point storage means. a data extraction processing means having a means for determining whether or not to connect the contour point data to a new data point sequence when the data extraction processing means determines that the contour point data is not connected to the point sequence end point data; starting point detection means for detecting the starting point of the contour point and storing it in the point sequence end point storage means; extension point detection means for detecting contour point data as extension points and storing them in the point sequence end point storage means, and storing pointer information pointing to the connected contour point data in the connection information memory; A closed-loop binary image that compares the end points of each point sequence data based on stored information, determines the connection relationship between each end point, and extracts closed-loop contour data by combining each point sequence that can be connected. , and a contour data memory in which contour data from the closed-loop binary image is stored. Hereinafter, embodiments will be described with reference to the drawings.

〔実施例〕〔Example〕

第1図は本発明の一実施例構成、第2図は第1図図示実
施例の具体的な処理態様を説明するための図、第3図は
第1図図示実施例による処理概要を説明するためのフロ
ーチャート、第4図は始点と連結点との関係を説明する
ための図を示す。
FIG. 1 shows the configuration of an embodiment of the present invention, FIG. 2 is a diagram for explaining a specific processing aspect of the embodiment shown in FIG. 1, and FIG. 3 explains an outline of the processing according to the embodiment shown in FIG. FIG. 4 is a flowchart for explaining the relationship between the starting point and the connecting point.

第1図において、輪郭点データメモリ3は、例えば第2
図(a)に示すような物体の輪郭を構成する閉ループ輪
郭二値画像に対して、画面走査順に得られる輪郭点デー
タ群を格納するメモリである。第2図(a)のような二
値画像の場合、輪郭点データメモリ3には、第2図(b
)図示のような情報が設定される。輪郭線データメモリ
4は、輪郭線の抽出結果が格納されるメモリであって、
第2図(a)のような二値画像の場合、第2図(g)に
示すように、輪郭点データ群を物体の輪郭に沿う輪郭線
データとして最終的に記憶保持するものである。
In FIG. 1, the contour point data memory 3 includes, for example, a second
This is a memory that stores a group of contour point data obtained in the order of screen scanning for a closed-loop contour binary image forming the contour of an object as shown in Figure (a). In the case of a binary image as shown in FIG. 2(a), the contour point data memory 3 contains information as shown in FIG.
) Information as shown is set. The contour data memory 4 is a memory in which contour extraction results are stored,
In the case of a binary image as shown in FIG. 2(a), a group of contour point data is ultimately stored and retained as contour line data along the contour of the object, as shown in FIG. 2(g).

データ抽出処理部10は、輪郭点データメモリ3から順
次読み出した輪郭点データを処理するものであって、圧
縮回路11と処理判定回路12と連結点判定回路13と
からなる。圧縮回路11は、本発明では必須ではないが
、中間処理対象となる輪郭点データ数を削減して、処理
の一層の高速化とメモリの節減を可能とするために、輪
郭点データメモリ3から輪郭点データを読み出す際、例
えば、水平方向に連続した点を、新たに1つ輪郭点デー
タとしてまとめる処理を実行するものである。
The data extraction processing section 10 processes the contour point data sequentially read out from the contour point data memory 3, and includes a compression circuit 11, a processing determination circuit 12, and a connection point determination circuit 13. Although the compression circuit 11 is not essential in the present invention, in order to reduce the number of contour point data to be subjected to intermediate processing and to further speed up the processing and save memory, the compression circuit 11 extracts data from the contour point data memory 3. When reading the contour point data, for example, a process is performed in which points consecutive in the horizontal direction are grouped together as a new piece of contour point data.

即ち、圧縮回路11は、y座標が等しくx座標が1増加
するデータを、第2図(c)に図示するようにまとめる
。第2図(b)に示した輪郭点データメモリ3の内容に
対して、圧縮回路11の出力は、第2図(d)図示のよ
うになる。その結果は、必要に応じて輪郭点データメモ
リ3または連結情報メモリ15に書き出される。
That is, the compression circuit 11 compiles data whose y-coordinates are equal and whose x-coordinates are increased by 1, as shown in FIG. 2(c). With respect to the contents of the contour point data memory 3 shown in FIG. 2(b), the output of the compression circuit 11 is as shown in FIG. 2(d). The results are written to the contour point data memory 3 or the connection information memory 15 as required.

処理判定回路12は、輪郭点データメモリ3の走査が終
了するまで、輪郭点データのy座標値が、先に読み出さ
れた輪郭点データのものに比べて変化したか否か、即ち
ラスク走査が一段下がるか否かを判定するものであり、
ラスク走査が一段下がる場合には、後述する点列レジス
タ14内のy座標値を更新する。また、ラスク走査が終
了するとラスク走査終了信号Sを出力する。
Until the scanning of the contour point data memory 3 is completed, the processing determination circuit 12 determines whether the y-coordinate value of the contour point data has changed compared to that of the previously read contour point data, that is, the rask scan. This is to determine whether or not the value goes down one step.
When the rask scan is lowered by one step, the y-coordinate value in the point sequence register 14, which will be described later, is updated. Furthermore, when the rask scan is completed, a rask scan end signal S is output.

連結点判定回路13は、点列レジスタ14に格納された
X座標値を参照して、輪郭点データメモリ3から読み出
された輪郭点データが、先に処理されたデータのどれか
の点列に連結するかまたは連結しないかを判定する回路
である。
The connected point determination circuit 13 refers to the X coordinate value stored in the point sequence register 14 and determines whether the contour point data read from the contour point data memory 3 corresponds to any point sequence in the previously processed data. This is a circuit that determines whether to connect or not to connect.

点列レジスタ14は、点列端点データを記憶するレジ、
スタであって、既に検出されたデータ点列の一対の端点
のX座標値〔Xアl+  Xtz)とX座標値とを記憶
するものである。本実施例では、説明を簡単化するため
に、1組の点列端点データを扱う場合について説明する
が、実際には点列端点データの数に応じて各々座標情報
を記憶するようになっている。連結情報メモリ15は、
例えば第2図(d)に示したような輪郭点データに対し
て、第2図(e)図示の如(、隣接する各輪郭点相互の
順方向ポインタおよび逆方向ポインタ情報を保持するワ
ークメモリである。これらのポインタ情報は、各輪郭点
データに対応して持つようにされ、従って、発生する点
列の数に関係しないので、連結情報メモリ15としては
、比較的小さなメモリ容量を持つものでよい。
The point sequence register 14 is a register for storing point sequence end point data;
The X-coordinate value [Xal+Xtz) and the X-coordinate value of a pair of end points of a data point sequence that has already been detected are stored. In this embodiment, in order to simplify the explanation, a case will be explained in which one set of point sequence end point data is handled, but in reality, coordinate information is stored for each point sequence end point data according to the number of point sequence end point data. There is. The connection information memory 15 is
For example, for contour point data as shown in FIG. 2(d), as shown in FIG. Since these pointer information are held corresponding to each contour point data and are not related to the number of point sequences generated, the connected information memory 15 has a relatively small memory capacity. That's fine.

始点検出回路16は、連結点判定回路13により、処理
対象となっている輪郭点データが、点列レジスタ14お
よび連結情報メモリ15に記憶されているデータ点列に
連結しないと判定されたときに起動される回路であって
、このとき当該輪郭点データの左端のX座標および右端
のX座標(これらのX座標は同じ値をとることもある)
の組を、一対の点列の端点として、点列レジスタ14に
送り、新たな点列端点データとして設定するものである
The starting point detection circuit 16 detects when the connection point determination circuit 13 determines that the contour point data to be processed is not connected to the data point sequence stored in the point sequence register 14 and the connection information memory 15. A circuit that is activated, and at this time, the X coordinate of the left end and the X coordinate of the right end of the contour point data (these X coordinates may take the same value)
This set is sent to the point sequence register 14 as the end points of a pair of point sequences, and set as new point sequence end point data.

一方、点列延長回路エフは、連結点判定回路13により
、処理対象となっている輪郭点データが、点列レジスタ
エ4および連結情報メモリ15に記憶されているデータ
点列に連結すると判定されたときに働く回路であり、こ
れは、点列レジスタ14に記憶されている端点データに
基づいて、連結対象となったデータ点列の端点と当該輪
郭点データとの間に相互に関連づけるポインタ情報を、
連結情報メモリ15に設定する。そして、現在処理対象
となっている輪郭点データが、新たな端点となるので、
そのX座標値でもって、もとの端点についての点列レジ
スタ14の内容を更新する。これによって、データ点列
が延長されることになる。
On the other hand, in the point sequence extension circuit F, the connected point determination circuit 13 determines that the contour point data to be processed is connected to the data point sequence stored in the point sequence register 4 and the connected information memory 15. Based on the end point data stored in the point string register 14, this circuit generates pointer information that correlates the end points of the data point string to be connected with the contour point data. ,
The information is set in the connection information memory 15. Then, the contour point data currently being processed becomes the new end point, so
The contents of the point sequence register 14 for the original end point are updated with the X coordinate value. This results in an extended data point sequence.

閉ループ形成回路18は、処理判定回路12からのダス
タ走査終了信号Sによって作動する回路であり、これは
、連結情報メモリ15に設定されたデータ点列に関する
ポインタ情報に基づき、各データ点列の端点を比較して
各端点相互の連結関係を判定し、連結され得る各点列同
士を結合して、輪郭点データを閉ループ状に読み出すも
のである。
The closed loop forming circuit 18 is a circuit that is activated by the duster scan end signal S from the processing determination circuit 12, and it determines the end point of each data point sequence based on pointer information regarding the data point sequence set in the connection information memory 15. The connection relationship between the end points is determined by comparing them, and each point sequence that can be connected is connected, and contour point data is read out in a closed loop.

順方向ポインタまたは逆方向ポインタに従って、例えば
反時計回りに抽出された輪郭点データは、閉ループを形
成する輪郭線データとして、順次輪郭線データメモリ4
に格納される。
Contour point data extracted, for example, counterclockwise according to the forward pointer or backward pointer is sequentially stored in the contour data memory 4 as contour data forming a closed loop.
is stored in

次に本実施例に係る輪郭線抽出装置の作用動作を第1図
ないし第4図に従って説明する。
Next, the operation of the contour line extraction device according to this embodiment will be explained with reference to FIGS. 1 to 4.

今、物体の輪郭線を構成する閉ループ形成回路が、第2
図(a)図示のようなものであるとすると、輪郭点デー
タメモリ3には、第2図(b)に示すように、画面上の
ラスク走査順に輪郭点データ(XZ、>13)・・・(
Xz、7+)が格納される。
Now, the closed loop forming circuit that constitutes the outline of the object is in the second
Assuming that it is as shown in Figure 2(a), the contour point data memory 3 stores contour point data (XZ, >13) in the order of rask scanning on the screen, as shown in Figure 2(b).・(
Xz, 7+) is stored.

この輪郭点データメモリ3から、順次輪郭点データ(x
2.)’:+)・・・が、データ抽出処理部10によっ
て読み出されると、圧縮回路11は水平方向に連続した
データ、即ちX座標が等しく、X座標が1増加するデー
タをまとめる。その結果、読み出しが終了した時点では
、輪郭点データメモリ3の内容は、第2図(d)図示の
如くになる。即ち、各データにつき、その左端のX座標
、右端のX座標およびX座標を持つ。
From this contour point data memory 3, contour point data (x
2. )':+)... is read by the data extraction processing unit 10, the compression circuit 11 groups together horizontally continuous data, that is, data whose X coordinates are equal and whose X coordinates are incremented by 1. As a result, when the reading is completed, the contents of the contour point data memory 3 become as shown in FIG. 2(d). That is, each piece of data has an X coordinate of its left end, an X coordinate of its right end, and an X coordinate.

この圧縮された最初の輪郭点データ(XZ、X31yz
)が、処理判定回路12に供給されると、処理判定回路
12において、点列レジスタ14のX座標レジスタ中に
y3が設定される。次いで、この輪郭点データ(xl+
 x:l+ ys )が、連結点判定回路13に送られ
ると、上記点列レジスタ14のX座標値が空きデータで
あることから、当該輪郭点データ(XZI X3. y
s )が連結するデータ点列はないと判定され、このデ
ータは、始点検出回路16に送られる。始点検出回路1
6では、輪郭点データ(XZ、X313’3ンを、第4
図図示のような一対の点列Tl、T2の始点として記憶
する。そして、第2図(4)中に(i)として示すよう
に、点列レジスタ14の一対の格納部(X Tl+  
X TZ)に、点列端点データとしてxz、x3の対を
設定する。
This compressed first contour point data (XZ, X31yz
) is supplied to the processing judgment circuit 12, in the processing judgment circuit 12, y3 is set in the X coordinate register of the point sequence register 14. Next, this contour point data (xl+
x:l+ys) is sent to the connected point determination circuit 13, since the X coordinate value of the point sequence register 14 is empty data, the contour point data (XZI
It is determined that there is no data point sequence that s ) is connected, and this data is sent to the start point detection circuit 16 . Starting point detection circuit 1
6, the contour point data (XZ,
It is stored as the starting point of a pair of point sequences Tl and T2 as shown in the figure. Then, as shown as (i) in FIG. 2(4), a pair of storage sections (X Tl+
X TZ), the pair xz, x3 is set as point sequence end point data.

次の輪郭点データ(X+、 xI+Vz )が、処理判
定回路12に送られると、処理判定回路12において、
まずy座標値が変化していることが検出され、点列レジ
スタ14中のy座標レジスタがyzに更新される。そし
て、そのデータは連結点判定回路13に送られ、連結点
判定回路13において、点列レジスタ14が参照されて
、この輪郭点データ(X+、 xl+ )’z )が、
先に設定された格納部(xT I +  xT Z )
の端点データのいずれかに隣接するか否かが判定される
。そして、X、はXT1部の内容x2に隣接することか
ら、点列延長回路17が起動される。
When the next contour point data (X+, xI+Vz) is sent to the processing judgment circuit 12, the processing judgment circuit 12
First, it is detected that the y-coordinate value has changed, and the y-coordinate register in the point sequence register 14 is updated to yz. The data is then sent to the connected point determination circuit 13, which refers to the point sequence register 14 and converts this contour point data (X+, xl+)'z) into
Previously set storage (xT I + xT Z)
It is determined whether or not it is adjacent to any of the end point data. Since X is adjacent to the content x2 of the XT1 section, the point sequence extension circuit 17 is activated.

点列延長回路17は、輪郭点データ(xI+ xI+y
z)に対し、第2図(e)図示の如く、連結情報メモリ
15中の輪郭点データ(XI X3.3’ 3 )に対
応するアルレスに、輪郭点データ(xl+ xl1yz
)への順方向ポインタ■を設定すると共に、連結情報メ
モリ15中の輪郭点データ(xl+ xl+y2)に対
応するアドレスに、輪郭点データ(Xz+X3.)’z
)への逆方向ポインタ■を設定する。
The point sequence extension circuit 17 converts contour point data (xI+xI+y
z), as shown in FIG. 2(e), the contour point data (xl+xl1yz) is added to the contour point data (XI
) is set, and the contour point data (Xz+X3.)'z is set at the address corresponding to the contour point data (xl+xl+y2) in the connection information memory 15.
) Set the backward pointer ■ to ).

また、点列レジスタ14のX71部をxlに更新する。Also, the X71 portion of the point sequence register 14 is updated to xl.

同様に、次の輪郭点データ(X3. X3.yz )が
処理判定回路12に送られると、処理判定回路12でy
座標値のチェックがなされるが、点列レジスタ14中の
y座標値は変化しないので、そのまま連結点判定回路1
3にデータが引き渡される。
Similarly, when the next contour point data (X3.
The coordinate values are checked, but since the y coordinate value in the point sequence register 14 does not change, the connected point determination circuit 1
The data is transferred to step 3.

連結点判定回路13では、輪郭点データ(x、、、xi
、yz)が、点列レジスタ14に記憶されたもう一方の
点列T2に連結することが認知され、点列延長回路17
が起動される。
In the connection point determination circuit 13, contour point data (x, , xi
, yz) is recognized to be connected to the other point sequence T2 stored in the point sequence register 14, and the point sequence extension circuit 17
is started.

点列延長回路17は、輪郭点データ(XIX3゜yz)
に対し、第2図(e)図示の如く、連結情報メモリ15
中の輪郭点データ(Xz、 Xz、 ys )に対応す
るアドレスに、輪郭点データ(X:++Xz。
The point sequence extension circuit 17 uses contour point data (XIX3°yz)
On the other hand, as shown in FIG. 2(e), the connection information memory 15
Contour point data (X:++Xz) is placed at the address corresponding to the contour point data (Xz, Xz, ys) inside.

yz)への順方向ポインタ■を設定すると共に、連結情
報メモリ15中の輪郭点データ(X 3+ x3+7g
)に対応するアドレスに、輪郭点データ(Xz、Xs、
)’iへの逆方向ポインタ■を設定する。
yz), and the contour point data (X 3+ x3+7g) in the connection information memory 15.
), the contour point data (Xz, Xs,
) 'Set backward pointer ■ to i.

また、点列レジスタ14のXi□部をx3に更新する。Also, the Xi□ portion of the point sequence register 14 is updated to x3.

さらに、次の輪郭点データ(X l+ x2+ )’ 
Z )が処理判定回路12に送られると、処理判定回路
12でy座標値のチェックがなされ、点列レジスタ14
中のy座標値が変化しているので、点列レジスタ14に
yIが設定される。そして、連結点判定回路13にデー
タが引き渡され、連結点判定回路13では、輪郭点デー
タ(X+、 xZ+ )’z )が、点列レジスタ14
に記憶された点列T1または点列T2のいずれかに連結
するか否かが判定される。
Furthermore, the next contour point data (X l+ x2+ )'
Z) is sent to the processing judgment circuit 12, the processing judgment circuit 12 checks the y coordinate value, and the point sequence register 14
Since the y coordinate value inside has changed, yI is set in the point sequence register 14. The data is then delivered to the connected point determination circuit 13, where the contour point data (X+, xZ+)'z) is stored in the point sequence register 14.
It is determined whether to connect to either point sequence T1 or point sequence T2 stored in .

この場合、まず点列Tlに連結することが認知され、点
列延長回路17が起動される。
In this case, first, the connection to the dot sequence Tl is recognized, and the dot sequence extension circuit 17 is activated.

点列延長回路17は、輪郭点データ(xl + xZ+
yz)に対し、第2図(e)図示の如く、連結情報メモ
リ15中の輪郭点データ(X+、 XI+ yz )に
対応するアドレスに、輪郭点データ(X I + X 
2+yz)への順方向ポインタ■を設定すると共に、連
結情報メモリ15中の輪郭点データ(X l+ xI+
y2)に対応するアドレスに、輪郭点データ(X+、X
+、7iへの逆方向ポインタ■を設定する。
The point sequence extension circuit 17 converts contour point data (xl + xZ+
yz), as shown in FIG. 2(e), the contour point data (X I + X
2+yz), and the contour point data (X l+ xI+
Contour point data (X+,
+, set backward pointer ■ to 7i.

また、点列レジスタ14のX71部をx2に更新する。Also, the X71 portion of the point sequence register 14 is updated to x2.

これによって、点列レジスタ14は第2図(f)の(i
ii )のようになる。また、連結情報メモリ15は、
第2図(e)図示のような情報を持つ。
As a result, the point sequence register 14 is set to (i) in FIG. 2(f).
ii) In addition, the connection information memory 15 is
It has information as shown in FIG. 2(e).

次の段階で、処理判定回路12によって、データの終了
が検出され、処理判定回路12からラスク走査終了信号
Sが出力されて、閉ループ形成回路18に与えられる。
At the next stage, the end of the data is detected by the processing determining circuit 12, and a rask scanning end signal S is outputted from the processing determining circuit 12 and provided to the closed loop forming circuit 18.

閉ループ形成回路18は、連結情報メモリ15中の順方
向ポインタまたは逆方向ポインタをたどり、端点となっ
ている第0番目の(X3. x、、、 Yz )と第0
番目の(X+、Xz、yl)とが連結関係にあることを
検出する。そして、第2図(e)図示の圧縮後の輪郭点
データ列と連結情報メモリ15の内容を参照し、輪郭点
データ中の左端のX座標と右端のX座標とか異なるもの
については、水平方向への復元を行いつつ、データ点列
T1に相当する部分を順方向に、データ点列T2に相当
する部分を逆方向にたどって、その結果を輪郭線データ
として輪郭線データメモリ4に書き込んでいく。輪郭線
データメキリ4には、第2図(g)図示の如く、物体の
輪郭を反時計回り方向に沿って抽出した輪郭線データが
格納されることとなる。
The closed loop forming circuit 18 traces the forward pointer or the backward pointer in the connection information memory 15, and finds the 0th point (X3.
It is detected that the number (X+, Xz, yl) is in a connected relationship. Then, referring to the compressed contour point data string shown in FIG. While performing the restoration, trace the portion corresponding to the data point sequence T1 in the forward direction and the portion corresponding to the data point sequence T2 in the reverse direction, and write the results to the contour data memory 4 as contour line data. go. As shown in FIG. 2(g), the contour data memory 4 stores contour data obtained by extracting the contour of an object along the counterclockwise direction.

第3図は、上記処理の概要をフローチャートの形で示し
たものであり、閉ループ形成により処理を終了する。上
記各回路または処理部についての個々の実施形態として
、例えばマイクロプログラミングその他の手段を採用す
ることができ、上記説明により、当業者であればインプ
リメントできることは明らかであり、具体的構成につい
ての設計変更は適宜可能である。
FIG. 3 shows an overview of the above processing in the form of a flowchart, and the processing ends by forming a closed loop. For example, microprogramming or other means can be adopted as individual embodiments of each of the above circuits or processing units, and from the above explanation, it is clear that those skilled in the art can implement it, and design changes regarding the specific configuration can be implemented. is possible as appropriate.

なお、上記実施例においては、物体の輪郭が1つ、即ち
閉ループが1つの場合について説明したが、物体の輪郭
が複雑な場合あるいは物体が複数ある場合にフ11でも
、この発明を適用すれば、処理途中の輪郭点データにつ
いて始点検出回路16が働くことになるので、その分、
データ点列の数が増加するだけで、各データ点列を適宜
結合させることにより、同様に輪郭線データを抽出する
ことができる。
In the above embodiment, the case where the object has one contour, that is, there is one closed loop, has been described, but the present invention can be applied to cases where the object has a complex contour or where there are multiple objects. , since the start point detection circuit 16 will work on the contour point data that is being processed,
Just by increasing the number of data point sequences, contour line data can be similarly extracted by appropriately combining each data point sequence.

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

以上説明した如く、本発明によれば、輪郭点データ群を
格納するメモリを実質的に1回走査するだけで、輪郭線
データを抽出することが可能になり、輪郭線データ抽出
に必要な処理時間を大幅に短縮することができる。また
、途中の中間的なデータ点列に関する情報を、ポインタ
情報によって管理するので、処理が容易になり、必要と
するメモリ量も少なくてよいという効果がある。なお、
水平に連続した輪郭点データをまとめて圧縮することが
可能であり、この圧縮を採用すれば、さらにメモリ量を
節減可能とすることができる。
As explained above, according to the present invention, it is possible to extract contour line data by scanning the memory storing a group of contour point data substantially once, and the processing necessary for extracting contour line data is The time can be significantly reduced. Furthermore, since information regarding intermediate data point sequences in the middle is managed by pointer information, processing becomes easier and the amount of memory required can be reduced. In addition,
It is possible to collectively compress horizontally continuous contour point data, and by employing this compression, it is possible to further reduce the amount of memory.

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

第1図は本発明の一実施例構成、第2図は第1゜図図示
実施例の具体的な処理態様を説明するための図、第3図
は第1図図示実施例による処理概要を説明するためのフ
ローチャート、第4図は始点と連結点との関係を説明す
るための図、第5図および第6図は従来方式による輪郭
線抽出を説明するための図を示す。 図中、3は輪郭点データメモリ、4は輪郭線データメモ
リ、工0はデータ抽出処理部、11は圧縮回路、12は
処理判定回路、13は連結点判定回路、14は点列レジ
スタ、15は連結情報メモリ、16は始点検出回路、1
7は点列延長回路、18ば閉ループ形成回路、Tl、T
2はデータ点列を表す。
FIG. 1 shows the configuration of an embodiment of the present invention, FIG. 2 is a diagram for explaining a specific processing mode of the embodiment shown in FIG. 1, and FIG. FIG. 4 is a flowchart for explaining the process, FIG. 4 is a diagram for explaining the relationship between starting points and connection points, and FIGS. 5 and 6 are diagrams for explaining contour line extraction by the conventional method. In the figure, 3 is a contour point data memory, 4 is a contour data memory, 0 is a data extraction processing section, 11 is a compression circuit, 12 is a processing judgment circuit, 13 is a connection point judgment circuit, 14 is a point sequence register, 15 1 is a connection information memory, 16 is a starting point detection circuit, 1
7 is a point sequence extension circuit, 18 is a closed loop forming circuit, Tl, T
2 represents a data point sequence.

Claims (2)

【特許請求の範囲】[Claims] (1)物体の輪郭を構成する閉ループ二値画像に対して
画面走査順に得られる輪郭点データ群を物体の輪郭に沿
う輪郭線データとして抽出する輪郭線抽出装置であって
、上記輪郭点データ群を格納する輪郭点データメモリと
、処理される各データ点列の端点に対応する各点列端点
データを記憶する点列端点記憶手段と、上記各輪郭点デ
ータ毎にその連結する輪郭点データを指すポインタ情報
を記憶する連結情報メモリと、上記輪郭点データメモリ
から読み出した輪郭点データが上記点列端点記憶手段に
記憶されている点列端点データと隣接するか否かを判定
する手段を有するデータ抽出処理手段と、該データ抽出
処理手段により上記輪郭点データが上記点列端点データ
に連結しないと判定されたときに当該輪郭点データを新
しいデータ点列の始点として検出しこれを上記点列端点
記憶手段に格納する始点検出手段と、上記データ抽出処
理手段により上記輪郭点データが先に検出された点列端
点データに連結すると判定されたときに当該輪郭点デー
タを延長点として検出しこれを上記点列端点記憶手段に
格納すると共にその連結する輪郭点データを指すポイン
タ情報を上記連結情報メモリに格納する延長点検出手段
と、上記連結情報メモリに格納された情報に基づき各点
列データの端点を比較して各端点相互の連結関係を判定
し連結され得る各点列同士を結合して閉ループ状の輪郭
線データを抽出する閉ループ形成手段と、該閉ループ形
成手段からの輪郭線データが格納される輪郭線データメ
モリとを備えたことを特徴とする輪郭線抽出装置。
(1) A contour line extraction device that extracts a group of contour point data obtained in the order of screen scanning from a closed-loop binary image constituting the contour of an object as contour line data along the contour of the object, the contour point data group a contour point data memory for storing, a point sequence end point storage means for storing each point sequence end point data corresponding to the end point of each data point sequence to be processed, and a point sequence end point storage means for storing the connected contour point data for each of the above contour point data. It has a connection information memory for storing pointing pointer information, and means for determining whether the contour point data read from the contour point data memory is adjacent to the point sequence end point data stored in the point sequence end point storage means. a data extraction processing means; when the data extraction processing means determines that the contour point data is not connected to the point sequence end point data, detects the contour point data as a starting point of a new data point sequence; A start point detection means stored in the end point storage means and the data extraction processing means detect the contour point data as an extension point when it is determined that the contour point data is connected to the previously detected point sequence end point data. is stored in the point sequence end point storage means, and pointer information pointing to the connected contour point data is stored in the connection information memory; a closed loop forming means for extracting closed loop contour data by comparing the end points of the end points to determine the connection relationship between the end points and combining each point sequence that can be connected; and a closed loop forming means for extracting closed loop contour data by comparing the end points of 1. A contour extraction device comprising: a contour data memory for storing contour data.
(2)上記データ抽出処理手段は、上記輪郭点データメ
モリ内の走査方向に連続した輪郭点データをまとめて1
つの輪郭点データとして出力するデータ圧縮手段を有す
ることを特徴とする特許請求の範囲第(1)項記載の輪
郭線抽出装置。
(2) The data extraction processing means collects continuous contour point data in the scanning direction in the contour point data memory into one
2. The contour line extraction device according to claim 1, further comprising data compression means for outputting data as one contour point data.
JP59177678A 1984-08-27 1984-08-27 Outline extracting device Granted JPS6155789A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59177678A JPS6155789A (en) 1984-08-27 1984-08-27 Outline extracting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59177678A JPS6155789A (en) 1984-08-27 1984-08-27 Outline extracting device

Publications (2)

Publication Number Publication Date
JPS6155789A true JPS6155789A (en) 1986-03-20
JPH0447867B2 JPH0447867B2 (en) 1992-08-05

Family

ID=16035189

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59177678A Granted JPS6155789A (en) 1984-08-27 1984-08-27 Outline extracting device

Country Status (1)

Country Link
JP (1) JPS6155789A (en)

Also Published As

Publication number Publication date
JPH0447867B2 (en) 1992-08-05

Similar Documents

Publication Publication Date Title
JPH04115144A (en) Image processor and automatic optical inspection apparatus using same
US5563995A (en) Method and system for directly drawing a convex polygon having a given number of vertices with high speed
JPS6155789A (en) Outline extracting device
JP2878194B2 (en) Partial erasure and partial detection method of image data
US5307454A (en) Apparatus for extracting local image from original image
JPS60117381A (en) Method and device for extracting contour
JP2995984B2 (en) 3D waveform display device
US5471536A (en) Figure digitizing system
JPS59140586A (en) Picture processing device
JP2904994B2 (en) Coordinate connection display method
JP2641249B2 (en) Symbol figure arrangement method
JP2827670B2 (en) 2D polygon closed area figure synthesis method
JP2922014B2 (en) Original image pattern data playback device
JPS6336483A (en) Method for generating contour image
JPH08180087A (en) Distortion correcting method for graphic
JP2838556B2 (en) Image processing device
JP2563163B2 (en) Figure instruction method
JP2650443B2 (en) Line figure vectorization method
JPH03291770A (en) Picture contour detecting method
JPS63163579A (en) Graphic boundary vector generating circuit
JPS63195696A (en) Fast lithography
JPH07234946A (en) Method and device for plotting polygon
JPH02224080A (en) Retrieving method for internal point in closed area
JPS6359684A (en) Display system for convex polygon and straight line
JPH02311905A (en) Nc data display method