JPH0447867B2 - - Google Patents
Info
- Publication number
- JPH0447867B2 JPH0447867B2 JP59177678A JP17767884A JPH0447867B2 JP H0447867 B2 JPH0447867 B2 JP H0447867B2 JP 59177678 A JP59177678 A JP 59177678A JP 17767884 A JP17767884 A JP 17767884A JP H0447867 B2 JPH0447867 B2 JP H0447867B2
- Authority
- JP
- Japan
- Prior art keywords
- point
- data
- 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.)
- Expired - Lifetime
Links
Landscapes
- Image Analysis (AREA)
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.
一般に視覚認識システム等においては、物体の
輪郭を構成する二値画像から、物体の形状を抽出
したり、例えば物体の重心位置や物体の輪郭の周
囲長等の各種パラメータを求めるにあたり、計算
のやり易さ等の観点からして、物体の輪郭に沿つ
て配列される輪郭線データを抽出することが必要
となる。即ち、例えばテレビカメラから得られた
濃淡画像における濃淡の境界から輪郭点データを
生成し、その輪郭点データに基づいて閉ループを
形成する輪郭線データを抽出することが必要とな
る。
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 of use, 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図に示すように、物体の輪郭を構
成する二値画像GDが表示される画面1上に、x
−y座標系を予め設定し、上記画面1を走査2す
ることにより、上記二値画像GDの輪郭点データ
群(x1,y1)(x2,y2)……(xo,yo)を画面走
査順に得て、これらを輪郭点データメモリ3に格
納し、しかる後上記輪郭点データ群に輪郭線抽出
処理を施し、上記輪郭点データ群を物体の輪郭の
例えば反時計回り方向(図中mで示す)に沿う輪
郭線データ(xA1,yA1)(xA2,yA2)……(xAo,
yAo)として抽出し、輪郭線データメモリ4に格
納するようにしたものがある。この方式におい
て、上記輪郭線抽出処理としては、例えば第6図
に示すように、輪郭点データ中に始点P(xi,yi)
を定め、この始点に連結可能な8つの囲繞位置A
ないしGについて上記輪郭点データメモリ3を検
索して、始点Pの次に連結される次輪郭点を抽出
した後、当該抽出された輪郭点の次に連結される
次輪郭点を上述したのと同様にして抽出し、以後
この手順を繰り返すことにより、抽出した輪郭点
を輪郭線データとして輪郭線データメモリ4に順
次格納するようしている。 As a conventional contour line extraction method of this type, for example, as shown in FIG.
- By setting the y coordinate system in advance and scanning 2 the screen 1, the outline point data group (x 1 , y 1 ) (x 2 , y 2 )...(x o , y o ) in the screen scanning order, store these in the contour point data memory 3, and then perform contour line extraction processing on the contour point data group, and extract the contour point data group from the contour of the object, for example in a counterclockwise direction. Contour data (x A1 , y A1 ) (x A2 , y A2 ) along (indicated by m in the figure)... (x Ao ,
yAo ) and stored in the contour data memory 4. In this method, as shown in FIG. 6 , for example, as shown in FIG .
and eight surrounding positions A that can be connected to this starting point.
After searching the contour point data memory 3 for G to 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 as described above. By similarly extracting and repeating this procedure thereafter, the extracted contour points are sequentially stored in the contour data memory 4 as contour data.
しかしながら、このような従来の輪郭線抽出方
式あつては、ある1つの輪郭点の次に連結される
次輪郭点を抽出するために、1つの輪郭点を囲繞
する8個所すべてのデータ値について輪郭点デー
タメモリ3を検索しなければならないことから、
最終的な輪郭線データを得るまでにおいて必要な
輪郭点データメモリ3の検索回数が膨大なものと
なつてしまい、その分、輪郭線抽出のための処理
時間が大幅にかかるという問題があつた。
However, in such a conventional contour line extraction method, in order to extract the next contour point connected to a certain contour point, the contour is calculated for all eight data values surrounding one contour point. Since 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 increases accordingly.
この問題を解決するために、本願発明者は、先
に特願昭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, a memory storing a group of contour point data is scanned once, an intermediate data point sequence is stored in a point sequence buffer, and each data point sequence is combined. I am trying to extract line data. Since contour point data can be sequentially processed in just one scan, contour data can be extracted at extremely high speed.
上記提案の発明において、上記点列バツフアが
不要となれば、メモリ領域を節減できるので、よ
り望ましい。 In the above-mentioned proposed invention, it is more desirable if the point sequence buffer is not required because the memory area can be saved.
本発明は上記問題点の解決を図り、処理時間の
高速化を可能とすると共に、上記提案の発明をさ
らに改良発展させ、比較的大きなメモリ領域を必
要とする点列バツフアを設けずに、同様な輪郭線
データの抽出を可能とする輪郭線抽出装置を提供
することを目的としている。 The present invention aims to solve the above problems, makes it possible to speed up the processing time, and further improves and develops the above proposed invention. It is an object of the present invention to provide a contour line extraction device that enables extraction of contour line data.
そのため本発明は、先に提案した発明におい
て、最初に読み出した輪郭点データを、一対のデ
ータ点列の双方の始点とし、データ点列を一旦点
列バツフアに格納することはしないで、代わりに
輪郭点の連結関係の情報を連結情報メモリに持つ
ようにし、中間的なデータ点列を連結情報メモリ
によつて管理するようにしている。即ち、本発明
の輪郭線抽出装置は、物体の輪郭を構成する閉ル
ープ二値画像に対して画面走査順に得られる輪郭
点データ群を物体の輪郭に沿う輪郭線データとし
て抽出する輪郭線抽出装置であつて、上記輪郭点
データ群を格納する輪郭点データメモリと、処理
される各データ点列の端点に対応する各点列端点
データを記憶する点列端点記憶手段と、上記各輪
郭点データ毎にその連結する輪郭点データを指す
ポインタ情報を記憶する連結情報メモリと、上記
輪郭点データメモリから読み出した輪郭点データ
が上記点列端点記憶手段に記憶されている点列端
点データと隣接するか否かを判定する手段を有す
るデータ抽出処理手段と、該データ抽出処理手段
により上記輪郭点データが上記点列端点データに
連結しないと判定されたときに当該輪郭点データ
を新しいデータ点列の始点として検出しこれを上
記点列端点記憶手段に格納する始点検出手段と、
上記データ抽出処理手段により上記輪郭点データ
が先に検出された点列端点データに連結すると判
定されたときに当該輪郭点データを延長点として
検出しこれを上記点列端点記憶手段に格納すると
共にその連結する輪郭点データを指すポインタ情
報を上記連結情報メモリに格納する延長点検出手
段と、上記連結情報メモリに格納された情報に基
づき各点列データの端点を比較して各端点相互の
連結関係を判定し連結され得る各点列同士を結合
して閉ループ状の輪郭線データを抽出する閉ルー
プ形成手段と、該閉ループ形成手段からの輪郭線
データが格納される輪郭線データメモリとを備え
たことを特徴としている。以下、図面を参照しつ
つ、実施例に従つて説明する。
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, does not temporarily store the data point sequence in the point sequence buffer, and instead 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 line extraction device of the present invention is a contour line extraction device that extracts a group of contour point data obtained in screen scanning order from a closed-loop binary image forming the contour of an object as contour line data along the contour of the object. a contour point data memory for storing the contour point data group; 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; a connected information memory that stores pointer information pointing to the connected contour point data, and 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. data extraction processing means having means for determining whether or not the contour point data is connected to the end point data of the 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 detecting means for detecting and storing this in the point sequence end point storage means;
When the data extraction processing means determines that the contour point data is connected to the previously detected point sequence end point data, the contour point data is detected as an extension point and stored in the point sequence end point storage means. extension point detection means for storing pointer information pointing to the connected contour point data in the connection information memory; and connection of each end point by comparing the end points of each point sequence data based on the information stored in the connection information memory. A closed-loop forming means for extracting closed-loop contour data by determining a relationship and combining point sequences that can be connected, and a contour data memory in which contour data from the closed-loop forming means is stored. It is characterized by Hereinafter, embodiments will be described with reference to the drawings.
第1図は本発明の一実施例構成、第2図は第1
図図示実施例の具体的な処理態様を説明するため
の図、第3図は第1図図示実施例による処理概要
を説明するためのフローチヤート、第4図は始点
と連結点との関係を説明するための図を示す。
Figure 1 shows the configuration of one embodiment of the present invention, and Figure 2 shows the configuration of the first embodiment.
Figure 3 is a flowchart for explaining the outline of the processing according to the illustrated embodiment in Figure 1. Figure 4 shows the relationship between the starting point and the connecting point. A diagram for explanation is shown.
第1図において、輪郭点データメモリ3は、例
えば第2図aに示すような物体の輪郭を構成する
閉ループ輪郭二値画像に対して、画面走査順に得
られる輪郭点データ群を格納するメモリである。
第2図aのような二値画像の場合、輪郭点データ
メモリ3には、第2図b図示のような情報が設定
される。輪郭線データメモリ4は、輪郭線の抽出
結果が格納されるメモリであつて、第2図aのよ
うな二値画像の場合、第2図gに示すように、輪
郭点データ群を物体の輪郭に沿う輪郭線データと
して最終的に記憶保持するものである。 In FIG. 1, a contour point data memory 3 is a memory that stores a group of contour point data obtained in the screen scanning order for a closed-loop contour binary image forming the contour of an object as shown in FIG. 2a, for example. be.
In the case of a binary image as shown in FIG. 2a, information as shown in FIG. 2b is set in the contour point data memory 3. The contour line data memory 4 is a memory in which the contour extraction results are stored, and in the case of a binary image as shown in FIG. 2a, a group of contour point data is stored as shown in FIG. This is ultimately stored and retained as contour line data that follows the contour.
データ抽出処理部10は、輪郭点データメモリ
3から順次読み出した輪郭点データを処理するも
のであつて、圧縮回路11と処理判定回路12と
連結点判定回路13とからなる。圧縮回路11
は、本発明では必須ではないが、中間処理対象と
なる輪郭点データ数を削減して、処理の一層の高
速化とメモリの節減を可能とするために、輪郭点
データメモリ3から輪郭点データを読み出す際、
例えば水平方向に連続した点を、新たに1つ輪郭
点データとしてまとめる処理を実行するものであ
る。即ち、圧縮回路11は、y座標が等しくx座
標が1増加するデータを、第2図cに図示するよ
うにまとめる。第2図bに示した輪郭点データメ
モリ3の内容に対して、圧縮回路11の出力は、
第2図d図示のようになる。その結果は、必要に
応じて輪郭点データメモリ3または連結情報メモ
リ15に書き出される。 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. Compression circuit 11
Although not essential in the present invention, in order to reduce the number of contour point data to be subjected to intermediate processing, further speeding up the processing and saving memory, contour point data is transferred from the contour point data memory 3. When reading out,
For example, a process is performed in which consecutive points in the horizontal direction are newly grouped into one piece of contour point data. 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. 2c. With respect to the contents of the contour point data memory 3 shown in FIG. 2b, the output of the compression circuit 11 is as follows.
The result will be as shown in FIG. 2d. 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, raster scanning. It is determined whether or not the raster scan is lowered by one level. If the raster scan is lowered by one level, the y-coordinate value in the point sequence register 14, which will be described later, is updated. Furthermore, when the raster scan is completed, a raster 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座標値〔xT1,xT2〕とy座標値
とを記憶するものである。本実施例では、説明を
簡単化するために、1組の点列端点データを扱う
場合について説明するが、実際には点列端点デー
タの数に応じて各々座標情報を記憶するようにな
つている。連結情報メモリ15は、例えば第2図
dに示したような輪郭点データに対して、第2図
e図示の如く、隣接する各輪郭点相互の順方向ポ
インタおよび逆方向ポインタ情報を保持するワー
クメモリである。これらのポインタ情報は、各輪
郭点データに対応して持つようにされ、従つて、
発生する点列の数に関係しないので、連結情報メ
モリ15としては、比較的小さなメモリ容量を持
つものでよい。 The point sequence register 14 is a register that stores point sequence end point data, and stores the x coordinate value [x T1 , x T2 ] and y coordinate value of a pair of end points of a data point sequence that has already been detected. be. 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 according to the number of point sequence end point data. There is. The connection information memory 15 is a workpiece that holds forward pointer and backward pointer information between adjacent contour points, as shown in FIG. 2e, for example, for the contour point data shown in FIG. 2d. It's memory. These pointer information are held corresponding to each contour point data, and therefore,
Since this is not related to the number of generated point sequences, the connected information memory 15 may have a relatively small memory capacity.
始点検出回路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. The circuit is activated, and at this time, the set of the left end x coordinate and right end x coordinate (these x coordinates may take the same value) of the contour point data is set as the end point of a pair of point sequences, Point sequence register 14
, and set it as new point sequence end point data.
一方、点列延長回路17は、連結点判定回路1
3により、処理対象となつている輪郭点データ
が、点列レジスタ14および連結情報メモリ15
に記憶されているデータ点列に連結すると判定さ
れたときに働く回路であり、これは、点列レジス
タ14に記憶されている端点データに基づいて、
連結対象となつたデータ点列の端点と当該輪郭点
データとの間に相互に関連づけるポインタ情報
を、連結情報メモリ15に設定する。そして、現
在処理対象となつている輪郭点データが、新たな
端点となるので、そのx座標値でもつて、もとの
端点についての点列レジスタ14の内容を更新す
る。これによつて、データ点列が延長されること
になる。 On the other hand, the point sequence extension circuit 17 is connected to the connection point determination circuit 1.
3, the contour point data to be processed is transferred to the point sequence register 14 and the connection information memory 15.
This circuit operates when it is determined that the data point sequence is connected to the data point sequence stored in the point sequence register 14.
Pointer information for mutually associating the end points of the data point sequence to be connected with the contour point data is set in the connection information memory 15. Then, since the contour point data currently being processed becomes a new endpoint, the contents of the point sequence register 14 for the original endpoint are updated with its x-coordinate value. This results in an extended data point sequence.
閉ループ形成回路18は、処理判定回路12か
らのラスタ走査終了信号Sによつて作動する回路
であり、これは、連結情報メモリ15に設定され
たデータ点列に関するポインタ情報に基づき、各
データ点列の端点を比較して各端点相互の連結関
係を判定し、連結され得る各点列同士を結合し
て、輪郭点データを閉ループ状に読み出すもので
ある。順方向ポインタまたは逆方向ポインタに従
つて、例えば反時計回りに抽出された輪郭点デー
タは、閉ループを形成する輪郭線データとして、
順次輪郭線データメモリ4に格納される。 The closed loop forming circuit 18 is a circuit that operates in response to the raster scanning end signal S from the processing determination circuit 12, and it operates based on the pointer information regarding the data point sequence set in the connection information memory 15. The endpoints are compared to determine the connection relationship between the endpoints, and each point sequence that can be connected is combined to read contour point data in a closed loop. Contour point data extracted counterclockwise according to the forward pointer or backward pointer, for example, is treated as contour data forming a closed loop.
The contour data are sequentially stored in the contour data memory 4.
次に本実施例に係る輪郭線抽出装置の作用動作
を第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に示すよう
に、画面上のラスタ走査順に輪郭点データ(x2,
y3)……(x2,y1)が格納される。 Now, suppose that the closed-loop binary image that constitutes the outline of the object is as shown in Figure 2a,
As shown in FIG. 2b, the contour point data memory 3 stores contour point data (x 2 ,
y 3 )...(x 2 , y 1 ) is stored.
この輪郭点データメモリ3から、順次輪郭点デ
ータ(x2,y3)……が、データ抽出処理部10に
よつて読み出されると、圧縮回路11は水平方向
に連続したデータ、即ちy座標が等しく、x座標
が1増加するデータをまとめる。その結果、読み
出しが終了した時点では、輪郭点データメモリ3
の内容は、第2図d図示の如くになる。即ち、各
データにつき、その左端のx座標、右端のx座標
およびy座標を持つ。 When the contour point data (x 2 , y 3 ) . Equally, data whose x coordinate increases by 1 are grouped together. As a result, when the reading is completed, the contour point data memory 3
The contents are as shown in FIG. 2d. That is, each piece of data has an x-coordinate of its left end, and an x-coordinate and a y-coordinate of its right end.
この圧縮された最初の輪郭点データ(x2,x3,
y3)が、処理判定回路12に供給されると、処理
判定回路12において、点列レジスタ14のy座
標レジスタ中にy3が設定される。次いで、この輪
郭点データ(x2,x3,y3)が、連結点判定回路1
3に送られると、上記点列レジスタ14のx座標
値が空きデータであることから、当該輪郭点デー
タ(x2,x3,y3)が連結するデータ点列はないと
判定され、このデータは、始点検出回路16に送
られる。始点検出回路16では、輪郭点データ
(x2,x3,y3)を、第4図図示のような一対の点
列T1,T2の始点として記憶する。そして、第
2図f中に(i)として示すように、点列レジス
タ14の一対の格納部(xT1,xT2)に、点列端点
データとしてX2,X3の対を設定する。 This compressed initial contour point data (x 2 , x 3 ,
When y 3 ) is supplied to the processing determination circuit 12 , y 3 is set in the y coordinate register of the point sequence register 14 in the processing determination circuit 12 . Next, this contour point data (x 2 , x 3 , y 3 ) is sent to the connection point determination circuit 1.
3, since the x coordinate value of the point sequence register 14 is empty data, it is determined that there is no data point sequence to which the contour point data (x 2 , x 3 , y 3 ) is connected, and this The data is sent to the starting point detection circuit 16. The starting point detection circuit 16 stores the contour point data (x 2 , x 3 , y 3 ) as the starting points of a pair of point sequences T1 and T2 as shown in FIG. Then, as shown as (i) in FIG. 2F, a pair of X 2 and X 3 is set as point sequence end point data in a pair of storage sections (x T1 , x T2 ) of the point sequence register 14.
次の輪郭点データ(x1,x1,y2)が、処理判定
回路12に送られると、処理判定回路12におい
て、まずy座標値が変化していることが検出さ
れ、点列レジスタ14中のy座標レジスタがy2に
更新される。そして、そのデータは連結点判定回
路13に送られ、連結点判定回路13において、
点列レジスタ14が参照されて、この輪郭点デー
タ(x1,x1,y2)が、先に設定された格納部
(xT1,xT2)の端点データのいずれかに隣接する
か否かが判定される。そして、x1はxT1部の内容
x2に隣接することから、点列延長回路17が起動
される。 When the next contour point data (x 1 , x 1 , y 2 ) is sent to the processing judgment circuit 12, the processing judgment circuit 12 first detects that the y-coordinate value has changed, and stores it in the point sequence register 14. The y coordinate register in is updated to y 2 . Then, the data is sent to the connection point determination circuit 13, and in the connection point determination circuit 13,
The point sequence register 14 is referred to and it is determined whether this contour point data (x 1 , x 1 , y 2 ) is adjacent to any of the end point data of the previously set storage section (x T1 , x T2 ). It is determined whether And x 1 is the contents of x T1 part
Since it is adjacent to x2 , the point sequence extension circuit 17 is activated.
点列延長回路17は、輪郭点データ(x1,x1,
y2)に対し、第2図e図示の如く、連結情報メモ
リ15中の輪郭点データ(x2,x3,y3)に対応す
るアドレスに、輪郭点データ(x1,x1,y2)への
順方向ポインタを設定すると共に、連結情報メ
モリ15中の輪郭点データ(x1,x1,y2)に対応
するアドレスに、輪郭点データ(x2,x3,y3)へ
の逆方向ポインタを設定する。また、点列レジ
スタ14のxT1部をx1に更新する。 The point sequence extension circuit 17 receives contour point data (x 1 , x 1 ,
y 2 ), as shown in FIG. 2e, the contour point data ( x 1 , x 1 , y 2 ), and the contour point data (x 2 , x 3 , y 3 ) is set at the address corresponding to the contour point data (x 1 , x 1 , y 2 ) in the connection information memory 15. Set a backward pointer to . Also, the x T1 portion of the point sequence register 14 is updated to x 1 .
同様に、次の輪郭点データ(x3,x3,y2)が処
理判定回路12に送られると、処理判定回路12
でy座標値のチエツクがなされるが、点列レジス
タ14中のy座標値は変化しないので、そのまま
連結点判定回路13にデータが引き渡される。連
結点判定回路13では、輪郭点データ(x3,x3,
y2)が、点列レジスタ14に記憶されたもう一方
の点列T2に連結することが認知され、点列延長
回路17が起動される。 Similarly, when the next contour point data (x 3 , x 3 , y 2 ) is sent to the processing judgment circuit 12, the processing judgment circuit 12
The y-coordinate value is checked, but since the y-coordinate value in the point sequence register 14 does not change, the data is passed to the connection point determination circuit 13 as is. In the connection point determination circuit 13, contour point data (x 3 , x 3 ,
y 2 ) is recognized as being connected to the other point sequence T2 stored in the point sequence register 14, and the point sequence extension circuit 17 is activated.
点列延長回路17は、輪郭点データ(x3,x3,
y2)に対し、第2図e図示の如く、連結情報メモ
リ15中の輪郭点データ(x2,x3,y3)に対応す
るアドレスに、輪郭点データ(x3,x3,y2)への
順方向ポインタを設定すると共に、連結情報メ
モリ15中の輪郭点データ(x3,x3,y2)に対応
するアドレスに、輪郭点データ(x2,x3,y3)へ
の逆方向ポインタを設定する。また、点列レジ
スタ14のxT2部をx3に更新する。 The point sequence extension circuit 17 receives contour point data (x 3 , x 3 ,
y 2 ), as shown in FIG. 2e, the contour point data ( x 3 , x 3 , y 2 ), and the contour point data (x 2 , x 3 , y 3 ) is set at the address corresponding to the contour point data (x 3 , x 3 , y 2 ) in the connection information memory 15. Set a backward pointer to . Also, the xT2 portion of the point sequence register 14 is updated to x3 .
さらに、次の輪郭点データ(x1,x2,y2)が処
理判定回路12に送られると、処理判定回路12
でy座標値のチエツクがなされ、点列レジスタ1
4中のy座標値が変化しているので、点列レジス
タ14にy1が設定される。そして、連結点判定回
路13にデータが引き渡され、連結点判定回路1
3では、輪郭点データ(x1,x2,y2)が、点列レ
ジスタ14に記憶された点列T1または点列T2
のいずれかに連結するか否かが判定される。この
場合、まず点列T1に連結することが認知され、
点列延長回路17が起動される。 Furthermore, when the next contour point data (x 1 , x 2 , y 2 ) is sent to the processing judgment circuit 12, the processing judgment circuit 12
The y-coordinate value is checked in point sequence register 1.
Since the y coordinate value in 4 has changed, y 1 is set in the point sequence register 14. Then, the data is delivered to the connection point determination circuit 13, and the connection point determination circuit 1
3, the contour point data (x 1 , x 2 , y 2 ) is stored in the point sequence T1 or point sequence T2 stored in the point sequence register 14.
It is determined whether or not to connect to any of the following. In this case, first, it is recognized that it is connected to the point sequence T1,
The point sequence extension circuit 17 is activated.
点列延長回路17は、輪郭点データ(x1,x2,
y2)に対し、第2図e図示の如く、連結情報メモ
リ15中の輪郭点データ(x1,x1,y2)に対応す
るアドレスに、輪郭点データ(x1,x2,y2)への
順方向ポインタを設定すると共に、連結情報メ
モリ15中の輪郭点データ(x1,x1,y2)に対応
するアドレスに、輪郭点データ(x1,x1,y2)へ
の逆方向ポインタを設定する。また、点列レジ
スタ14のxT1部をx2に更新する。これによつて、
点列レジスタ14は第2図fの()のようにな
る。また、連結情報メモリ15は、第2図e図示
のような情報を持つ。 The point sequence extension circuit 17 receives contour point data (x 1 , x 2 ,
y 2 ), the contour point data (x 1 , x 2 , y 2 ) is stored in the address corresponding to the contour point data (x 1 , 2 ), and at the same time, set the contour point data (x 1 , x 1 , y 2 ) at the address corresponding to the contour point data (x 1 , x 1 , y 2 ) in the connected information memory 15. Set a backward pointer to . Also, the x T1 portion of the point sequence register 14 is updated to x 2 . By this,
The point sequence register 14 is as shown in parentheses (f) in FIG. Further, the connection information memory 15 has information as shown in FIG. 2e.
次の段階で、処理判定回路12によつて、デー
タの終了が検出され、処理判定回路12からラス
タ走査終了信号Sが出力されて、閉ループ形成回
路18に与えられる。閉ループ形成回路18は、
連結情報メモリ15中の順方向ポインタまたは逆
方向ポインタをたどり、端点となつている第番
目の(x3,x3,y2)と第番目の(x1,x2,y1)
とが連結関係にあることを検出する。そして、第
2図e図示の圧縮後の輪郭点データ列と連結情報
メモリ15の内容を参照し、輪郭点データ中の左
端のx座標と右端のx座標とが異なるものについ
ては、水平方向への復元を行いつつ、データ点列
T1に相当する部分を順方向に、データ点列T2
に相当する部分を逆方向にたどつて、その結果を
輪郭線データとして輪郭線データメモリ4に書き
込んでいく。輪郭線データメモリ4には、第2図
g図示の如く、物体の輪郭を反時計回り方向に沿
つて抽出した輪郭線データが格納されることとな
る。 At the next stage, the processing determination circuit 12 detects the end of the data, and the processing determination circuit 12 outputs a raster scan end signal S, which is applied to the closed loop forming circuit 18. The closed loop forming circuit 18 is
Follow the forward pointer or backward pointer in the connection information memory 15 and find the end points (x 3 , x 3 , y 2 ) and (x 1 , x 2 , y 1 ).
It is detected that there is a connection relationship between the two. Then, referring to the compressed contour point data string shown in FIG. While restoring the data point sequence T1, the data point sequence T2 is restored in the forward direction while restoring the data point sequence T1.
The portion corresponding to is traced in the opposite direction, and the result is written into the contour data memory 4 as contour data. As shown in FIG. 2g, 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つの場合について説明した
が、物体の輪郭が複雑な場合あるいは物体が複数
ある場合についても、この発明を適用すれば、処
理途中の輪郭点データについて始点検出回路16
が働くことになるので、その分、データ点列の数
が増加するだけで、各データ点列を適宜結合させ
ることにより、同様に輪郭線データを抽出するこ
とができる。 Note that in the above embodiment, the outline of the object is 1
In other words, the case where there is one closed loop has been described, but if the present invention is applied also when the outline of the object is complex or when there are multiple objects, the starting point detection circuit 16
, the number of data point sequences increases accordingly, and by appropriately combining each data point sequence, contour line data can be similarly extracted.
以上説明した如く、本発明によれば、輪郭点デ
ータ群を格納するメモリを実質的に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 may be reduced. Note that horizontally continuous contour point data can be compressed all at once, and if this compression is adopted, the amount of memory can be further reduced.
第1図は本発明の一実施例構成、第2図は第1
図図示実施例の具体的な処理態様を説明するため
の図、第3図は第1図図示実施例による処理概要
を説明するためのフローチヤート、第4図は始点
と連結点との関係を説明するための図、第5図お
よび第6図は従来方式による輪郭線抽出を説明す
るための図を示す。
図中、3は輪郭点データメモリ、4は輪郭線デ
ータメモリ、10はデータ抽出処理部、11は圧
縮回路、12は処理判定回路、13は連結点判定
回路、14は点列レジスタ、15は連結情報メモ
リ、16は始点検出回路、17は点列延長回路、
18は閉ループ形成回路、T1,T2はデータ点
列を表す。
Figure 1 shows the configuration of one embodiment of the present invention, and Figure 2 shows the configuration of the first embodiment.
FIG. 3 is a flowchart for explaining the outline of the processing according to the illustrated embodiment in FIG. 1, and FIG. 4 shows the relationship between the starting point and the connection point. 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 line data memory, 10 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, and 15 is a connection information memory, 16 a starting point detection circuit, 17 a point sequence extension circuit,
18 represents a closed loop forming circuit, and T1 and T2 represent data point sequences.
Claims (1)
して画面走査順に得られる輪郭点データ群を物体
の輪郭に沿う輪郭線データとして抽出する輪郭線
抽出装置であつて、上記輪郭点データ群を格納す
る輪郭点データメモリと、処理される各データ点
列の端点に対応する各点列端点データを記憶する
点列端点記憶手段と、上記各輪郭点データ毎にそ
の連結する輪郭点データを指すポインタ情報を記
憶する連結情報メモリと、上記輪郭点データメモ
リから読み出した輪郭点データが上記点列端点記
憶手段に記憶されている点列端点データと隣接す
るか否かを判定する手段を有するデータ抽出処理
手段と、該データ抽出処理手段により上記輪郭点
データが上記点列端点データに連結しないと判定
されたときに当該輪郭点データを新しいデータ点
列の始点として検出しこれを上記点列端点記憶手
段に格納する始点検出手段と、上記データ抽出処
理手段により上記輪郭点データが先に検出された
点列端点データに連結すると判定されたときに当
該輪郭点データを延長点として検出しこれを上記
点列端点記憶手段に格納すると共にその連結する
輪郭点データを指すポインタ情報を上記連結情報
メモリに格納する延長点検出手段と、上記連結情
報メモリに格納された情報に基づき各点列データ
の端点を比較して各端点相互の連結関係を判定し
連結され得る各点列同士を結合して閉ループ状の
輪郭線データを抽出する閉ループ形成手段と、該
閉ループ形成手段からの輪郭線データが格納され
る輪郭線データメモリとを備えたことを特徴とす
る輪郭線抽出装置。 2 上記データ抽出処理手段は、上記輪郭点デー
タメモリ内の走査方向に連続した輪郭点データを
まとめて1つの輪郭点データとして出力するデー
タ圧縮手段を有することを特徴とする特許請求の
範囲第1項記載の輪郭線抽出装置。[Scope of Claims] 1. 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, comprising: a contour point data memory for storing a group of contour point data; 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; A connection information memory that stores pointer information pointing to contour point data, and 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. and a data extraction processing means having means for detecting the contour point data as a starting point of 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 storing the contour point data in the point sequence end point storage means, and when it is determined by the data extraction processing means that the contour point data is connected to the previously detected point sequence end point data, the contour point data is set as an extension point. an extension point detection means for detecting and storing this in the point sequence end point storage means and storing pointer information pointing to the connected contour point data in the connection information memory; and based on the information stored in the connection information memory. a closed loop forming means that compares the end points of each point sequence data to determine the connection relationship between each end point, and extracts closed loop contour data by combining each point sequence that can be connected; 1. A contour extraction device comprising: a contour data memory in which contour data is stored. 2. The data extraction processing means includes data compression means for collectively outputting continuous contour point data in the scanning direction in the contour point data memory as one contour point data. The contour line extraction device described in Section 1.
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 JPS6155789A (en) | 1986-03-20 |
| JPH0447867B2 true 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) |
-
1984
- 1984-08-27 JP JP59177678A patent/JPS6155789A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6155789A (en) | 1986-03-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Capson | An improved algorithm for the sequential extraction of boundaries from a raster scan | |
| US5075895A (en) | Method and apparatus for recognizing table area formed in binary image of document | |
| JPH02277185A (en) | Extracting method for rectangle coordinates | |
| US5563995A (en) | Method and system for directly drawing a convex polygon having a given number of vertices with high speed | |
| JP2878194B2 (en) | Partial erasure and partial detection method of image data | |
| JPH0447867B2 (en) | ||
| JP5126124B2 (en) | Image processing device | |
| JP2846486B2 (en) | Image input device | |
| JPS6341107B2 (en) | ||
| EP0278528B1 (en) | Area searching system | |
| JPS60117381A (en) | Method and device for extracting contour | |
| JPH07193716A (en) | Edge emphasizing device | |
| JP2838556B2 (en) | Image processing device | |
| JPH0418685A (en) | Picture processing system | |
| JPS6279580A (en) | Image processing device | |
| JP2587812B2 (en) | Figure extraction method | |
| JP2650443B2 (en) | Line figure vectorization method | |
| JPH0421911B2 (en) | ||
| JP2563163B2 (en) | Figure instruction method | |
| JP3037504B2 (en) | Image processing method and apparatus | |
| JPH01112469A (en) | Polygonal line approximate system for linear graphic | |
| JP2932664B2 (en) | 1-pass type figure shape feature quantity calculation device | |
| JPS6250971A (en) | Pattern discriminating device | |
| JPS61131084A (en) | Picture processor | |
| JPH0679350B2 (en) | Line figure processing device |