JPH03206573A - Image labeling processor - Google Patents

Image labeling processor

Info

Publication number
JPH03206573A
JPH03206573A JP94490A JP94490A JPH03206573A JP H03206573 A JPH03206573 A JP H03206573A JP 94490 A JP94490 A JP 94490A JP 94490 A JP94490 A JP 94490A JP H03206573 A JPH03206573 A JP H03206573A
Authority
JP
Japan
Prior art keywords
boundary
address
label
generation circuit
raster scan
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP94490A
Other languages
Japanese (ja)
Inventor
Yutaka Ishiyama
豊 石山
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.)
Stanley Electric Co Ltd
Original Assignee
Stanley Electric Co 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 Stanley Electric Co Ltd filed Critical Stanley Electric Co Ltd
Priority to JP94490A priority Critical patent/JPH03206573A/en
Publication of JPH03206573A publication Critical patent/JPH03206573A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To dispense with a working memory large in capacity and to perform processing only with one time of raster scan by tracing the boundary of an area according to address information from a boundary trace address generation circuit, and attaching a label value from a label value generation circuit on each picture element of the area. CONSTITUTION:The boundary trace address generation circuit 3 outputs the address of a neighboring picture element centering a picture element targeted to be processed to a boundary trace controller 2 as a trace address, and the boundary trace controller 2 transfers processing from the control of the boundary trace controller 2 to that of a raster scan controller 11 when completing one round of the boundary of the area, then, makes it restart the raster scan. The label value generation circuit 12 generates the label value to be attached on the picture element of the area in a boundary based on the scan result of the raster scan controller 11. Thereby, it is possible to dispense with the working memory large in capacity, and to perform the processing only for one time of raster scan.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、画像内の各領域を区別して各々にラベル符
号を付与する画像のラベリング処理装置に関するもので
ある。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an image labeling processing device that distinguishes each region within an image and assigns a label code to each region.

(従来の技術) 画像内の各領域の特徴量、例えば面積,重心などを求め
る場合、各々の領域を区別する必要がある。この時、画
像メモリに記憶された画素毎の画像データに対し、相互
に連結された共通の特徴を有する領域の各画素に同一の
ラベル符号を付与することが行われる。例えば、第6図
(a)に示すような2値画像に対して上記のラベリング
処理を行うと、第6図(b)に示すような1,2.3の
領域に区別されたラベル画像が得られる。以下、このラ
ベリング処理について、手順を追って説明する。
(Prior Art) When determining the feature amount of each region in an image, such as area and center of gravity, it is necessary to distinguish each region. At this time, the same label code is given to each pixel in an interconnected region having a common feature to the image data for each pixel stored in the image memory. For example, when the above labeling process is performed on a binary image as shown in FIG. 6(a), a labeled image divided into regions 1 and 2.3 as shown in FIG. 6(b) is obtained. can get. This labeling process will be explained step by step below.

i)先ず画像のラスタ走査を行い、処理対象画素Aが゛
1” (領域)であれば第7図に示す近傍画素a。0〜
aloを参照する。
i) First, raster scan the image, and if the pixel A to be processed is "1" (area), the neighboring pixels a.0 to 0 shown in FIG.
See alo.

この時、近傍画素が全て“0″ (領域外)の場合には
、新規のラベル番号を生成し、その値をラベル画像メモ
リに書込む。また、近傍画素に既にラベル番号が割当て
られている時は、その値をラベル画像メモリに書込む。
At this time, if all the neighboring pixels are "0" (outside the area), a new label number is generated and its value is written into the label image memory. Furthermore, when a label number has already been assigned to a neighboring pixel, that value is written into the label image memory.

また同一領域にも拘らず別のラベル番号か割当てられて
いる時は、小さい方の値をラベル画像メモリに書込み、
別々のラベル番号が同一のラベル番号になるように連結
情報テーブルにその情報を記憶しておく。
Also, if a different label number is assigned to the same area, the smaller value is written to the label image memory,
The information is stored in the concatenation information table so that different label numbers become the same label number.

そして、以上の処理をラスタ走査1回分(全画素)に対
して行う。
Then, the above processing is performed for one raster scan (all pixels).

ii)次に、上記i)の処理で得られた画像を再度ラス
タ走査し、連結情報テーブルを参照しながらラベル番号
を整理してラベル画像メモリに書直す。
ii) Next, the image obtained in the process i) above is raster-scanned again, and while referring to the connection information table, the label numbers are arranged and rewritten in the label image memory.

そして、この処理をラスタ走査1回分(全画素)に対し
て行う。
Then, this process is performed for one raster scan (all pixels).

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来の画像のラベリング処理装置は上記のようなラベリ
ング処理を行うので、あらゆる対象画像に対応させるた
めに作業用メモリとして大容量の連結情報テーブルが必
要となり、また連結情報テーブルの内容を整理するのに
時間がかかると共に、ラスタ走査を2回行う必要があり
、回路規模が大きく、処理時間が長いという問題点があ
った。
Conventional image labeling processing devices perform the above-mentioned labeling processing, so a large-capacity linked information table is required as a working memory in order to handle all target images, and it is also difficult to organize the contents of the linked information table. This method takes time, requires raster scanning twice, requires a large circuit, and requires a long processing time.

この発明は、このような問題点に着目してなされたもの
であり、大容量の作業用メモリを必要とせず、1回のラ
スタ走査で済み、回路規模が小さく、また処理時間の短
い画像のラベリング処理装置を得ることを目的としてい
る。
This invention was made with attention to these problems, and it is an image processing system that does not require a large capacity working memory, only requires one raster scan, has a small circuit scale, and has a short processing time. The purpose is to obtain a labeling processing device.

〔課題を解決するための手段〕[Means to solve the problem]

この発明の画像のラペリング処理装置は、画像メモリに
記憶された画素毎の画像データに対し、相互に連結され
た共通の特徴を有する領域の各画素に同一のラベル符号
を付与するラベリング処理装置において、画像データの
ラスタ走査を制御するラスタ走査コントローラと、ラス
タ走査用のアドレスを生成するラスタ走査用アドレス生
成器と、そのラスタ走査用アドレス生成器の出力アドレ
スを境界追跡の始点アドレスとして一時保持する座標レ
ジスタ及びその処理対象画素を中心とする近傍画素の方
向コードを生成する方向コード生成器を有した境界追跡
アドレス生成回路と、該境界追跡アドレス生成回路から
出力された追跡アドレスに従って前記境界を追跡する境
界追跡コントローラと、前記ラスタ走査用アドレス生成
器の出力と境界追跡アドレス生成回路の出力を選択して
画像データを記憶した対象画像メモリ及びラベル値を書
き込むラベル画像メモリに制御アドレスを出力するセレ
クタと、前記ラスタ走査コントローラの走査結果に基づ
いて前記境界内の領域の画素に付与するラベル値を発生
するラベル値生成回路と、前記境界追跡アドレス生成回
路からの方向コードの出力によりラベル画像メモリの書
込制御を行うラベル付関数器とを備えたものであり、ま
た、前記領域の境界の周囲長を判定する周囲長判定器を
備え、所定周囲長以上の領域または所定周囲長以下の領
域を除去してラベリング処理を行うようにしたものであ
る。
The image labeling processing device of the present invention is a labeling processing device that assigns the same label code to each pixel in an interconnected region having a common feature to image data for each pixel stored in an image memory. , a raster scan controller that controls raster scan of image data, a raster scan address generator that generates addresses for raster scan, and temporarily holds the output address of the raster scan address generator as a start point address for boundary tracing. a boundary tracking address generation circuit having a coordinate register and a direction code generator for generating direction codes of neighboring pixels centered on the pixel to be processed; and tracking the boundary according to the tracking address output from the boundary tracking address generation circuit. a boundary tracking controller that selects the output of the raster scanning address generator and the output of the boundary tracking address generation circuit and outputs a control address to a target image memory in which image data is stored and a label image memory in which a label value is written. a label value generation circuit that generates a label value to be given to pixels in the area within the boundary based on the scanning result of the raster scan controller; The device is equipped with a labeled function unit that performs writing control, and a perimeter determiner that determines the perimeter of the boundary of the region, and is equipped with a perimeter determiner that determines the perimeter of the boundary of the region, and determines whether the perimeter is greater than or equal to a predetermined perimeter or less than the predetermined perimeter. The labeling process is performed after removal.

(作用) この発明の画像のラベリング処理装置においては、境界
追跡アドレス生成回路からのアドレス情報に従って領域
の境界が追跡され、ラベル値生成回路からのラベル値が
該領域の各画素に付与され、1回のラスタ走査でラベリ
ング処理が行われる。
(Operation) In the image labeling processing device of the present invention, the boundary of an area is tracked according to the address information from the boundary tracking address generation circuit, a label value from the label value generation circuit is given to each pixel of the area, and 1 Labeling processing is performed in each raster scan.

〔実施例〕〔Example〕

第1図はこの発明に係る画像のラベリング処理装置の構
成を示すブロック図である。図において、1はラスタ走
査時のアドレスを生成するラスタ走査用アドレス生成器
、2は画像内の相互に連結された共通の特徴を有する領
域の境界を追跡する境界追跡コントローラ、3はこの境
界追跡コントローラ2に追跡アドレスを与える境界追跡
アドレス生成回路、4は各アドレス出力を2者選択する
セレクタで、境界追跡コントローラ2の出力により制御
される。5は領域の境界の周囲長を判定する周囲長判定
器、6は境界の外周を判定する外周判定器、7は処理対
象画像のデータを記憶する対象画像メモリ、8はラベリ
ング処理した画像のデータを記憶する処理画像メモリで
、境界追跡コントローラ2により書込みが制御される。
FIG. 1 is a block diagram showing the configuration of an image labeling processing apparatus according to the present invention. In the figure, 1 is a raster scanning address generator that generates addresses during raster scanning, 2 is a boundary tracking controller that tracks the boundaries of mutually connected areas having common features in an image, and 3 is this boundary tracking. A boundary tracing address generation circuit provides a tracing address to the controller 2, and a selector 4 selects between two outputs of each address, which is controlled by the output of the boundary tracing controller 2. 5 is a perimeter determiner that determines the perimeter of the boundary of a region; 6 is a perimeter determiner that determines the perimeter of the boundary; 7 is a target image memory that stores data of the image to be processed; 8 is data of the image that has been subjected to labeling processing. A processing image memory storing , the writing of which is controlled by the boundary tracking controller 2 .

9はラベル値を付与した画像のデータを記憶するラベル
画像メモリで、上記各画像メモリ7.8と共にセレクタ
4の出力側がアトレス端子と接続されている。10は境
界追跡アドレス生成回路3からの方向コードに従ってラ
ベル画像メモリ9に書込み制御を行うラベル付関数器、
11は画像データのラスタ走査を制御するラスタ走査コ
ントローラで、処理画像メモリ8の出力データが人力さ
れる。
Reference numeral 9 denotes a label image memory for storing data of images to which label values have been added, and the output side of the selector 4 is connected to the atres terminal together with the image memories 7 and 8 described above. 10 is a labeled function unit that controls writing to the label image memory 9 according to the direction code from the boundary tracking address generation circuit 3;
Reference numeral 11 denotes a raster scan controller for controlling raster scan of image data, and the output data of the processed image memory 8 is input manually.

12はこのラスタ走査コントローラ11の走査結果に基
づいて境界内の領域の画素に付与するラベル値を発生す
るラベル値生成回路で、その値をラベル画像メモリ9の
データ人力端子に出力する。
Reference numeral 12 denotes a label value generation circuit that generates a label value to be given to the pixels in the area within the boundary based on the scanning result of the raster scanning controller 11, and outputs the value to the data input terminal of the label image memory 9.

13はラインバッファ、14は対象画像メモリ7の出力
データを一時記憶してラスタ走査コントローラ11に与
えるラッチ、15は空隙の画素に対応させるためのホー
ル用カウンタである。
13 is a line buffer; 14 is a latch that temporarily stores the output data of the target image memory 7 and supplies it to the raster scan controller 11; and 15 is a hole counter for corresponding to the pixels in the gap.

また、境界追跡アドレス生成回路3の中で、16a,1
6bはラスタ走査用アドレス生成器1から始点アドレス
のX座標値、Y座標値が人力されるX座標レジスタ及び
Y座標レジスタ、17a,17bはセレクタ、18a,
18bはレジスタ16a,16bの出力とセレクタ17
a,17bの出力を比較する比較器で、その結果を境界
追跡コントローラ2に出力する。19a,19bはセレ
クタ17a,17bの出力データを一時保持するレジス
タ、20a,20bは人力値を+1(加)して出力する
インクリメンタ、21a,2lbは人力値を−1(減)
して出力するデクリメンタ、22a,22bはセレクタ
、23は所定順序で前述の方向コードを発生する方向コ
ード生成器、24はその方向コードを一時保持する方向
コードレジスタ、26は該方向コードに従って上記セレ
クタ22a,22bの人力を選択するアドレス生成関数
器、26は方向コードレジスタ24の出力とアドレス生
成関数器25の出力を比較する比較器で、その比較結果
を境界追跡コントローラ2に出力する。27は方向コー
ド生成器23の出力コードが入力される出力方向レジス
タ、28は出力方向レジスタ27の出力を保持する人力
方向レジスタである。
In addition, in the boundary tracking address generation circuit 3, 16a, 1
6b is an X-coordinate register and a Y-coordinate register into which the X-coordinate value and Y-coordinate value of the starting point address are manually entered from the raster scanning address generator 1; 17a and 17b are selectors; 18a,
18b is the output of registers 16a and 16b and selector 17
A comparator that compares the outputs of a and 17b and outputs the result to the boundary tracking controller 2. 19a and 19b are registers that temporarily hold the output data of selectors 17a and 17b, 20a and 20b are incrementers that add 1 (add) to the human power value and output it, and 21a and 2lb are registers that decrease the human power value by -1.
22a and 22b are selectors, 23 is a direction code generator that generates the aforementioned direction code in a predetermined order, 24 is a direction code register that temporarily holds the direction code, and 26 is the selector that outputs the direction code according to the direction code. Address generation function units 22a and 22b select manual input, and 26 is a comparator that compares the output of the direction code register 24 with the output of the address generation function unit 25, and outputs the comparison result to the boundary tracking controller 2. 27 is an output direction register into which the output code of the direction code generator 23 is input, and 28 is a manual direction register that holds the output of the output direction register 27.

また、ラベル値生成回路12の中で、29はラベル値を
選択してラベル画像メモリ9に出力するセレクタ、30
はこのセレクタ23に仮ラベル値を人力する仮ラベル値
生成器、31はラベル用カウンタ、32.33はライン
バッファ及びラッチである。
Further, in the label value generation circuit 12, a selector 29 selects a label value and outputs it to the label image memory 9;
31 is a label counter, and 32 and 33 are line buffers and latches.

上記境界追跡アドレス生成回路3は、処理対象画素を中
心とする近傍画素のアトレスを追跡アドレスとして境界
追跡コントローラ2に出力し、境界追跡コントローラ2
は、領域の境界を1周した時にラスタ走査を再開させる
ようになっている。
The boundary tracking address generation circuit 3 outputs addresses of neighboring pixels around the pixel to be processed as a tracking address to the boundary tracking controller 2.
is designed to restart raster scanning when it has gone around the boundary of the area once.

次に、処理対象画素を中心とする4連結の画素の処理に
ついて、手順を追って説明する。
Next, processing of four connected pixels centered around the pixel to be processed will be explained step by step.

■)先ず、処理対象画素の近傍画素の“1”(領域),
゛0” (領域外)の値により、第2図に示すように3
種に分類して処理する。
■) First, “1” (area) of pixels near the pixel to be processed,
By the value of ``0'' (outside area), 3 as shown in Figure 2.
Sort into species and process.

すなわち、第2図(a)のような画素(下線を引いた画
素)はまだラベル番号が割当てられていない領域のラス
タ走査順の最初の画素、つまりその領域の外側の境界の
一部である。この場合、セレクタ29の八人力を選択し
て境界追跡コントローラ2の制御に処理を移す。また、
第2図(b)のような画素は既にラベル番号Nが割当て
られている領域内の空隙のラスタ走査順の最初のライン
の右端の境界の画素である。この場合、ホール用カウン
タ15の値を+1加算し、セレクタ29のC人力を選択
して境界追跡コントローラ2の制御に処理を移す。また
、第2図(C)のような画素は既にラベル番号が割当て
られている領域内の画素である。この場合、ラスタ走査
コントローラ11によりセレクタ29のD人力を選択し
て、処理対象画素の左隣りの画素のラベル番号Nをラベ
ル画像メモリ9に書込む。そして、ラスタ走査コントロ
ーラ11の制御に処理を移し、ラスタ走査を行う。
That is, the pixel shown in FIG. 2(a) (the underlined pixel) is the first pixel in the raster scanning order of an area that has not yet been assigned a label number, that is, it is part of the outer boundary of that area. . In this case, the selector 29 selects 8 people power and the process is shifted to the control of the boundary tracking controller 2. Also,
A pixel as shown in FIG. 2(b) is a right-most boundary pixel of the first line in the raster scanning order of the gap in the area to which the label number N has already been assigned. In this case, the value of the hall counter 15 is incremented by +1, the selector 29 selects C manual power, and the process is shifted to the control of the boundary tracking controller 2. Further, pixels as shown in FIG. 2(C) are pixels within an area to which a label number has already been assigned. In this case, the raster scan controller 11 selects D manual of the selector 29 and writes the label number N of the pixel to the left of the pixel to be processed into the label image memory 9. Then, the process is transferred to the control of the raster scan controller 11, and raster scan is performed.

■)次に、上記処理対象画素を境界追跡開始画素として
そのX.Y座標を各々のX座標レジスタ16a及びY座
標レジスタ16bに人力する。
(2) Next, the processing target pixel is set as the boundary tracking start pixel, and the X. The Y coordinate is manually entered into each of the X coordinate register 16a and Y coordinate register 16b.

■)セレクタ17a,17b,セレクタ11 22a,22bの八入力及びセレクタ4のB人力を選択
し、レジスタ19a,19bにそのデータを人力する。
(2) Select eight inputs of selectors 17a, 17b, selectors 11, 22a, 22b and B input of selector 4, and input the data to registers 19a, 19b.

その後、セレクタ17a,17bのB人力を選択する。After that, B manual power is selected from selectors 17a and 17b.

■)そして、上記処理対象画素を中心とする近傍画素に
ついて、対象画像メモリ7の値を参照しながら以降の境
界追跡処理に入る。
(2) Then, the subsequent boundary tracking process is started while referring to the values in the target image memory 7 for pixels in the vicinity of the pixel to be processed.

■)境界追跡処理に入ると、先ず方向コード生成器23
は第3図に示すように「2→3→0→1」の順に方向コ
ードを出力する。そして、方向コードの値がアドレス生
成関数器25に人力され、表1に示すようにセレクタ2
2a,22bの人力が選択され、これにより近傍画素の
アドレス値が生成される。
■) When entering the boundary tracking process, first the direction code generator 23
outputs direction codes in the order of "2→3→0→1" as shown in FIG. Then, the value of the direction code is inputted to the address generation function unit 25, and the value of the direction code is inputted to the selector 2 as shown in Table 1.
2a and 22b are selected, thereby generating address values of neighboring pixels.

表   1 1 2 上記生成されたアトレス値に従って対象画像メモリ7を
参照し、最初に“1”となった方向の方向コードを方向
コードレジスタ24及び出力方向レジスタ27へ人力す
る。そして、セレクタ22a,22bの八人力を選択し
、セレクタ29から出力されているラベル値をラベル画
像メモリ9の処理対象画素に書込むと共に、“1”を処
理画像メモリ8の処理対象画素に書込む。
Table 1 1 2 The target image memory 7 is referred to according to the generated address value, and the direction code of the direction that becomes "1" first is inputted into the direction code register 24 and the output direction register 27. Then, the eight selectors 22a and 22b are selected, and the label value output from the selector 29 is written to the processing target pixel of the label image memory 9, and "1" is written to the processing target pixel of the processing image memory 8. It's crowded.

また、全ての方向の値が“0′゜の時は、処理対象画素
を孤立点とし、ラベル値の書込みのみを行う。
Furthermore, when the values in all directions are "0'°," the pixel to be processed is treated as an isolated point, and only the label value is written.

■)再度上記の方向コードに従ってアドレス生成関数器
25によりセレクタ22a,22bの八入力を選択し、
次の境界画素の座標をレジスタ16a,16bへ人力す
る。
■) Select eight inputs of the selectors 22a and 22b by the address generation function unit 25 again according to the above direction code,
The coordinates of the next boundary pixel are entered into registers 16a and 16b.

■)出力方向レジスタ27の出力値を入力方向レジスタ
28に人力し、その値から方向コード生成器23は表2
に示すような参照方向順序で方向コードを生成する。
■) The output value of the output direction register 27 is manually entered into the input direction register 28, and the direction code generator 23 is generated from the value shown in Table 2.
Generate direction codes in the reference direction order as shown in .

表 2 のアドレスに従って対象画像メモリ7を参照しながら次
の境界画素の方向を出す。そして、その方向コードを出
力方向レジスタ27に人力し、ラベル付関数器10は表
3に示すような条件を満たした時に、セレクタ29の出
力ラベル値をラベル画像メモリ9に書込むと共に、゛1
”を処理画像メモリ8に書込む。
The direction of the next boundary pixel is determined while referring to the target image memory 7 according to the address in Table 2. Then, the direction code is entered into the output direction register 27, and when the labeled function unit 10 satisfies the conditions shown in Table 3, it writes the output label value of the selector 29 into the label image memory 9, and
” is written into the processed image memory 8.

域の周囲長をカウントして測定する。Measure the perimeter of the area by counting.

そして、 所 定周囲長以上の領域または所定周囲長以下の領域を除去
してラベリング処理を行う。
Then, the labeling process is performed by removing areas having a circumference greater than or equal to a predetermined circumference or less than a predetermined circumference.

■)次に、比較器18a,18b及び26のそれぞれの
2人力が同時に等しくなった時、つまり領域の境界を1
周した時は、境界追跡コントローラ2からラスタ走査コ
ントローラ11の制御に処理を移し、ラスタ走査を再開
する。
■) Next, when the two forces of the comparators 18a, 18b and 26 become equal at the same time, that is, when the boundary of the area is 1
When the raster scanning controller 2 completes the cycle, the processing is transferred from the boundary tracking controller 2 to the raster scanning controller 11, and the raster scanning is restarted.

しかし、第2図(a)のような場合には、周囲長判定器
5及び外周判定器6が所定の条件を満足した時にラベル
用カウンタ31の値を+1加算してセレクタ29のB人
力を選択し、もう1回領域の境界を上記■)〜■)の手
順で追跡し、セレクタ29の出力ラベル値をラベル画像
メモリ9に書込む。
However, in the case shown in FIG. 2(a), when the perimeter determiner 5 and the outer circumference determiner 6 satisfy a predetermined condition, the value of the label counter 31 is incremented by +1, and the B manual power of the selector 29 is reduced. Then, the boundary of the area is traced once again according to the steps ① to ① above, and the output label value of the selector 29 is written into the label image memory 9.

以上の工)〜■)の処理を対象画像に施すことにより、
1回のラスタ走査でラベル付を行うことができる。その
際、大容量の作業用メモリを必要としないので、回路規
模を小さくすることができると共に、処理時間も短くな
る。また、ラベリング処理と同時に対象画像の穴の数を
抽出すること1 5 もでき、領域の一部が画像の外周を含んでいる時にも、
それを除去してラベリング処理を行うことができる。更
に、領域の周囲長を判定してラベリング処理を行えるの
で、小領域のノイズ除去を行うことができる。
By applying the above steps) to ■) to the target image,
Labeling can be done with one raster scan. At this time, since a large capacity working memory is not required, the circuit scale can be reduced and the processing time can also be shortened. It is also possible to extract the number of holes in the target image at the same time as the labeling process, even when part of the area includes the outer periphery of the image.
The labeling process can be performed by removing it. Furthermore, since the labeling process can be performed by determining the perimeter of the area, it is possible to remove noise from small areas.

なお、上記実施例では4連結の処理について述べたが、
第4図に示すような8連結の画素の処理の場合も同様に
して行うことができる。この場合、方向コード生成器2
3は第5図に示すような順序で方向コードを出力し、ア
ドレス生成関数器25によるセレクタ22a,22bの
人力選択は表4のようになる。
In addition, although the above embodiment described the process of 4 connections,
Processing of 8 connected pixels as shown in FIG. 4 can be performed in a similar manner. In this case, direction code generator 2
3 outputs direction codes in the order shown in FIG.

表4 1 6 また、方向コード生成器23の方向コードを生成する際
の参照方向手順は表5のようになり、ラベル画像メモリ
9にラベル値を書込む時のラベル付関数器10の条件は
表6に示すようになる。
Table 4 1 6 Further, the reference direction procedure when generating the direction code of the direction code generator 23 is as shown in Table 5, and the conditions of the labeled function unit 10 when writing the label value to the label image memory 9 are as follows. Table 6 shows the result.

表   5 表 6 〔発明の効果〕 以上のように、この発明によれば、大容量の作業用メモ
リを必要とせず、1回のラスタ走査で処理が済み、回路
規模も小さく、また処理時間が短いという効果がある。
Table 5 Table 6 [Effects of the Invention] As described above, according to the present invention, a large-capacity working memory is not required, processing is completed with one raster scan, the circuit size is small, and the processing time is reduced. It has the effect of being short.

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

第1図はこの発明の一実施例を示すブロック図、第2図
(a).(b).(c)及び第3図は4連結の画素の処
理動作について示す説明図、第4図(a).(b).(
c)及び第5図は8連結の画素の処理動作について示す
説明図、第6図(a).(b)はラベリング処理を示す
説明図、第7図は従来装置による処理動作について示す
説明図である。 1・・・・・・ラスタ走査用アドレス生成器2・・・・
・・境界追跡コントローラ 3 −−−−−−境界追跡アドレス生成回路4・・・・
・・セレクタ 5 −−−−−・周囲長判定器 6・・・・・・外周判定器 7・・・・・・対象画像メモリ 8・・・・・・処理画像メモリ 9・・・・・・ラベル画像メモリ 10−−−−−・ラベル付関数器 1 1−・・・・・ラスタ走査コントローラ1 2 −
−−−−−ラベル値生成回路16a−・・・・・X座標
レジスタ 16b−−−−−−Y座標レジスタ 1 7 a,  1 7 b−−−−−−セレクタ18
a,18b−−・−比較器 22a,22b−−−−−−セレクタ 23・・・・・・方向コード生成器 24・・・・・・方向コードレジスタ 2 5 −−−−−−アドレス生成関数器2 6 −−
−−−・比較器
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2(a). (b). (c) and FIG. 3 are explanatory diagrams showing processing operations for four connected pixels, and FIG. 4 (a). (b). (
c) and FIG. 5 are explanatory diagrams showing processing operations for 8-connected pixels, and FIG. 6(a). (b) is an explanatory diagram showing the labeling process, and FIG. 7 is an explanatory diagram showing the processing operation by the conventional apparatus. 1... Address generator for raster scanning 2...
・・Boundary tracking controller 3 --------Boundary tracking address generation circuit 4...
・・Selector 5 ・・Perimeter length determiner 6 ・・・Perimeter determiner 7 ・・・Target image memory 8 ・・・Processed image memory 9 ・・・・・-Label image memory 10-----Labeled function unit 1 1-... Raster scan controller 1 2-
-----Label value generation circuit 16a---X coordinate register 16b---Y coordinate register 17a, 17b---Selector 18
a, 18b --- Comparators 22 a, 22 b --- Selector 23 --- Direction code generator 24 --- Direction code register 2 5 --- Address generation Function unit 2 6 --
---Comparator

Claims (2)

【特許請求の範囲】[Claims] (1)画像メモリに記憶された画素毎の画像データに対
し、相互に連結された共通の特徴を有する領域の各画素
に同一のラベル符号を付与するラベリング処理装置にお
いて、画像データのラスタ走査を制御するラスタ走査コ
ントローラと、ラスタ走査用のアドレスを生成するラス
タ走査用アドレス生成器と、そのラスタ走査用アドレス
生成器の出力アドレスを境界追跡の始点アドレスとして
一時保持する座標レジスタ及びその処理対象画素を中心
とする近傍画素の方向コードを生成する方向コード生成
器を有した境界追跡アドレス生成回路と、該境界追跡ア
ドレス生成回路から出力された追跡アドレスに従って前
記境界を追跡する境界追跡コントローラと、前記ラスタ
走査用アドレス生成器の出力と境界追跡アドレス生成回
路の出力を選択して画像データを記憶した対象画像メモ
リ及びラベル値を書き込むラベル画像メモリに制御アド
レスを出力するセレクタと、前記ラスタ走査コントロー
ラの走査結果に基づいて前記境界内の領域の画素に付与
するラベル値を発生するラベル値生成回路と、前記境界
追跡アドレス生成回路からの方向コードの出力によりラ
ベル画像メモリの書込制御を行うラベル付関数器とを備
えたことを特徴とする画像のラベリング処理装置。
(1) Raster scanning of image data is performed in a labeling processing device that assigns the same label code to each pixel in an interconnected region having a common feature to image data for each pixel stored in an image memory. A raster scan controller to control, a raster scan address generator to generate raster scan addresses, a coordinate register to temporarily hold the output address of the raster scan address generator as a start point address for boundary tracing, and the pixel to be processed. a boundary tracking address generation circuit having a direction code generator that generates a direction code of a neighboring pixel centered at , a boundary tracking controller that tracks the boundary according to a tracking address output from the boundary tracking address generation circuit; a selector that selects the output of the raster scanning address generator and the output of the boundary tracking address generation circuit and outputs a control address to a target image memory in which image data is stored and a label image memory in which a label value is written; a label value generation circuit that generates a label value to be given to a pixel in the area within the boundary based on the scanning result; and a labeling circuit that controls writing to the label image memory by outputting a direction code from the boundary tracking address generation circuit. An image labeling processing device characterized by comprising: a function unit.
(2)前記領域の境界の周囲長を判定する周囲長判定器
を備え、所定周囲長以上の領域または所定周囲長以下の
領域を除去してラベリング処理を行うことを特徴とする
請求項1記載の画像ラベリング処理装置。
(2) The labeling apparatus according to claim 1, further comprising a perimeter determiner for determining the perimeter of the boundary of the region, and performs the labeling process by removing regions having a perimeter greater than or equal to a predetermined perimeter or less than a predetermined perimeter. image labeling processing device.
JP94490A 1990-01-09 1990-01-09 Image labeling processor Pending JPH03206573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP94490A JPH03206573A (en) 1990-01-09 1990-01-09 Image labeling processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP94490A JPH03206573A (en) 1990-01-09 1990-01-09 Image labeling processor

Publications (1)

Publication Number Publication Date
JPH03206573A true JPH03206573A (en) 1991-09-09

Family

ID=11487787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP94490A Pending JPH03206573A (en) 1990-01-09 1990-01-09 Image labeling processor

Country Status (1)

Country Link
JP (1) JPH03206573A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5713581A (en) * 1980-06-27 1982-01-23 Toshiba Corp Noise removing system
JPS63174187A (en) * 1987-01-14 1988-07-18 Agency Of Ind Science & Technol Picture processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5713581A (en) * 1980-06-27 1982-01-23 Toshiba Corp Noise removing system
JPS63174187A (en) * 1987-01-14 1988-07-18 Agency Of Ind Science & Technol Picture processor

Similar Documents

Publication Publication Date Title
JP2591984B2 (en) Pattern recognition device
CN111168676B (en) Mechanical arm hand-eye cooperation painting method and device, painting robot and medium
JPH03206573A (en) Image labeling processor
JPS5833588B2 (en) Video processing device
JPH03233689A (en) Outline data drawing device
JPS619776A (en) Picture image processor
JPH04255080A (en) Image input device
JP2838556B2 (en) Image processing device
JPH03206575A (en) Image processing device
JP2634905B2 (en) How to paint shapes
JP3024254B2 (en) Curve drawing method and apparatus
JPS61161576A (en) Picture signal processor
JP2000298729A (en) Two-dimensional image generation device
JP2536183B2 (en) Image processing method and apparatus
JPS62256180A (en) Picture processing method
JPS6220077A (en) Method and device for converting distance
JPH0282371A (en) Picture processor
JPS63310090A (en) Paint out area detecting method for digital picture
JPH0442711B2 (en)
JPH04275199A (en) Figure drawing apparatus
JPH04307680A (en) Image processor
JPH03179575A (en) Boundary tracking device
JPH03280172A (en) Picture processing area setting method
JPH0721382A (en) Picture processor
JPH01112469A (en) Polygonal line approximate system for linear graphic