JPS61145689A - Area labeling circuit - Google Patents

Area labeling circuit

Info

Publication number
JPS61145689A
JPS61145689A JP59267174A JP26717484A JPS61145689A JP S61145689 A JPS61145689 A JP S61145689A JP 59267174 A JP59267174 A JP 59267174A JP 26717484 A JP26717484 A JP 26717484A JP S61145689 A JPS61145689 A JP S61145689A
Authority
JP
Japan
Prior art keywords
label
unnecessary
pixel
address
labels
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
JP59267174A
Other languages
Japanese (ja)
Other versions
JPH0221026B2 (en
Inventor
Hiroshi Hoshino
弘 星野
Minoru Ishikawa
実 石川
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP59267174A priority Critical patent/JPS61145689A/en
Publication of JPS61145689A publication Critical patent/JPS61145689A/en
Publication of JPH0221026B2 publication Critical patent/JPH0221026B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To label efficiently many separating picture areas extracted out of a picture by detecting the label, which is already unnecessary, in accordance with the scanning of the binary picture, and reusing the label which is decided to be unnecessary. CONSTITUTION:A label number table 13, when an unnecessary label deciding part 15 detects the unnecessary label in accordance with the scanning of the binary picture in a continuous mode deciding part 11, stores a label number, which is decided to be unnecessary, to an address designated by a table address counter 12. In the counter 12, receiving the control of the deciding part 11, each time one label is read from the table 13, the count value is +1, and each time the deciding part 15 detects the unnecessary label, the count value is -1. By such a counter 12, the address of the table 3 is designated, and the label number stored in said address is read at an intermediate label generating part 14. Consequently, the label number, which is decided to be unnecessary and registered in the table 13, can be read and reused for labeling.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は2値画像中から所望とする分離画像領域を抽出
し、各分離画像領域に相互に識別可能なラベルを効果的
に付すことのできる領域ラベリング回路に関する。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention is capable of extracting desired separated image regions from a binary image and effectively attaching mutually distinguishable labels to each separated image region. Regarding area labeling circuits.

〔発明の技術的背景とその問題点〕[Technical background of the invention and its problems]

近時、画像処理技術が各種の診断・計測装置に応用され
るようになってきた。例えば細胞診や粒子計測等では、
入力画像中から特定形状・大きさの部分画像だけを分離
画像領域として抽出し、これを計測することが行われて
いる。この場合、上記入力画像中から抽出した複数の分
離画像領域を相互に識別するべく、各分離画像領域にラ
ベルを付すことが行われる。
In recent years, image processing technology has come to be applied to various diagnostic and measurement devices. For example, in cytodiagnosis and particle measurement, etc.
A method is to extract only a partial image of a specific shape and size from an input image as a separate image region, and measure this. In this case, a label is attached to each separated image area in order to mutually identify the plurality of separated image areas extracted from the input image.

例えば第6図(a、 )に示す如き2値画像1中から、
画素データが“1″で示される画素の集りを分離画像領
域としてそれぞれ抽出し、各分離画像領域(分離画像領
域を形成する画素群)毎に同図(b)に示すように順次
ラベル番号を付して、そのラベリングが行われている。
For example, from a binary image 1 as shown in FIG. 6(a, ),
A collection of pixels whose pixel data is "1" is extracted as a separate image area, and a label number is sequentially assigned to each separated image area (pixel group forming the separated image area) as shown in FIG. The labeling is done accordingly.

この分離画像領域の抽出は、例えば前記2値画像を走査
してその画素データを順次入力しながら第7図に示され
るようなマスク2を用い、注目画素とその4方向に隣接
する画素の連結性を判断して行われる。具体的には、前
記2値画像の走査によって画素データが順次入力される
ことがら、走査点Cの画素データGOと、その画素Cに
隣接する1走査ライン前の画素Aの画素データGA、お
よび前走査点Bの画素データGBとから、上記画素Cが
画素データ゛1″で示されるときの該画素Cの孤立性を
判定し、隣接画素と繋りを持つ画素を相互にまとめなが
ら前記2値画像中で孤立した画素データ“1”の集合部
分を検出することによって行われる。そして、このよう
にして抽出される分離画像領域に対して、ラベル番号を
次々と付すことによって、第6図(b)に示すようなラ
ベリング画像3を得ることが可能となる。
Extraction of this separated image area is carried out, for example, by scanning the binary image and sequentially inputting its pixel data, using a mask 2 as shown in FIG. This is done by determining gender. Specifically, since pixel data is input sequentially by scanning the binary image, pixel data GO of a scanning point C, pixel data GA of a pixel A adjacent to that pixel C and one scanning line before, and From the pixel data GB of the previous scanning point B, the isolation of the pixel C when the pixel C is indicated by pixel data "1" is determined, and the binary values are determined while mutually grouping pixels that are connected to adjacent pixels. This is done by detecting isolated clusters of pixel data "1" in the image.Then, by sequentially assigning label numbers to the separated image regions extracted in this way, the image shown in FIG. It becomes possible to obtain a labeling image 3 as shown in b).

しかしてこのようなラベリング処理は、従来、第8図に
示す如く構成した回路によって行われている。第8図に
おいて連結モード判定部4は、上述したマスク2を用い
て走査点画素の隣接画素との連結性を判定するブロック
であり、中間ラベル生成部5は、上記連結モード判定部
4にて検出された分離画像I!域に対してラベル番号カ
ウンタ8によって示されるラベル番号を順に付すブロッ
クである。そして上記ラベル番号カウンタ6は、1つの
分離画像領域にラベル番号が付される都度インクリメン
トされ、順次抽出される分離画像領域に対して次々と新
しいラベル番号を付す如く制御されている。
However, such labeling processing has conventionally been performed by a circuit configured as shown in FIG. In FIG. 8, the connection mode determination unit 4 is a block that determines the connectivity of a scanning point pixel with adjacent pixels using the above-mentioned mask 2, and the intermediate label generation unit 5 Detected separated image I! This block sequentially attaches label numbers indicated by the label number counter 8 to the areas. The label number counter 6 is incremented each time a label number is attached to one separated image area, and is controlled so that new label numbers are attached one after another to the separated image areas that are sequentially extracted.

ところが、上記の如く構成された従来の領域ラベリング
回路にあっては、前記ラベル番号カウンタ6のハードウ
ェア上の制約等から、例えば使用可能なラベル番号を(
0)から(511)までとする等して制限を設けている
。然し乍ら、計測対象の中には上記制約数を遥かに越え
る数の分離画像領域が抽出されるものが多々あり、この
ような場合には上述したラベリング処理が妨げられた。
However, in the conventional area labeling circuit configured as described above, due to hardware constraints of the label number counter 6, for example, the available label numbers are
Limits are set, such as from 0) to (511). However, there are many cases in which a number of separated image regions far exceeding the above-mentioned constraint number are extracted among measurement objects, and in such cases, the above-described labeling process is hindered.

そこで従来、入力画像1を予め複数の処理対象領域に分
割し、各処理対象領域毎に上述したラベリング処理を行
う等の工夫を施しているが、その処理に多大な時間を必
要とする等の不具合があった。
Conventionally, the input image 1 is divided into a plurality of processing target regions in advance, and the above-mentioned labeling processing is performed for each processing target region. However, this process requires a large amount of time, etc. There was a problem.

また前記ラベル番号カウンタ6の容量を増やすことも考
えられているが、回路のハードウェア構成が相当複雑化
することが否めなかった。
It has also been considered to increase the capacity of the label number counter 6, but it cannot be denied that the hardware configuration of the circuit would become considerably complicated.

(発明の目的〕 本発明はこのような事情を考慮してなされたもので、そ
の目的とするところは、画像中から多数抽出される分離
画像領域に効率良くラベルを付すことのできる簡易な構
成の領域ラベリング回路を提供することにある。
(Object of the Invention) The present invention has been made in consideration of the above circumstances, and its purpose is to provide a simple configuration that can efficiently label a large number of separated image regions extracted from an image. The object of the present invention is to provide a region labeling circuit.

〔発明の概要〕[Summary of the invention]

本発明は、2値画像を走査して画素データを順次入力し
、隣接画素との画素データの繋り関係から上記2値画像
中の分離画像領域を検出し、各分離画像領域毎に相互に
識別可能なラベルを付す領域ラベリング回路において、
例えば先にラベルを付した分離画像領域に対する処理が
終了し、その分離画像領域に付したラベルを用いる必要
性がなった等の理由により既に不要となったラベルを、
上記2値画像の走査に応じて、例えば前記2値画像の1
ラインの走査を終了したとき、現ラインおよび前ライン
に出現したラベルを判定する等して検出し、この不要判
定されたラベルを再使用してなることを特徴とするもの
である。
The present invention scans a binary image, sequentially inputs pixel data, detects separated image areas in the binary image from the connection relationship of pixel data with adjacent pixels, and mutually identifies each separated image area. In a region labeling circuit that attaches an identifiable label,
For example, a label that is no longer needed due to reasons such as the processing of a previously labeled separated image area having been completed and the need to use the label attached to that separated image area, etc.
Depending on the scanning of the binary image, for example, 1 of the binary image
The present invention is characterized in that when scanning of a line is completed, labels that have appeared on the current line and the previous line are determined and detected, and the labels that have been determined to be unnecessary are reused.

例えば上記分離画像領域に対するラベルの付与を、複数
のラベルを格納したラベル・テーブルをテーブル・アド
レス・カウンタによりアドレス指定して該ラベルを選択
的に読出し、且つ上記ラベル・テーブルから1つのラベ
ルを読出す都度、前記テーブル・アドレス・カウンタを
インクリメント(+1)して上記ラベルの読出しを制御
して行うようにする。そして上記不要ラベルの検出時に
は、上記テーブル・アドレス中カウンタをデクリメント
(−1)すると共に、このデクリメントされたカウンタ
によって指定される前記ラベル・テーブルのアドレスに
上記不要判定されたラベルを登録し、この登録されたラ
ベルを前記ラベル・テーブルから再び読出すことによっ
て、その不要ラベルを再使用するようにしたものである
For example, to assign a label to the separated image area, a label table storing a plurality of labels is addressed by a table address counter and the labels are selectively read out, and one label is read from the label table. Each time the label is output, the table address counter is incremented (+1) to control reading of the label. When the above-mentioned unnecessary label is detected, the above-mentioned table address counter is decremented (-1), and the above-mentioned unnecessary label is registered at the address of the above-mentioned label table specified by this decremented counter. By reading out the registered labels again from the label table, the unnecessary labels can be reused.

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

かくして本発明によれば、所謂使用済ラベルを再使用す
るのでラベルの絶対数を増やすことなく、多くの分離画
像領域にそれぞれ識別可能なラベルを付すことが可能と
なる。しかもラベル・テーブルを用いた簡易な制御によ
って、且つ比較的小規模な回路構成によってラベリング
を行うことができる。従って、入力画像中から分離画像
領域が多数抽出される場合であっても、従来のように処
理対象領域を予め分割する等の工夫を施す必要がないの
で、その処理時間が長くなることがなく、またその処理
が繁雑化する不具合もない城の実用上多大なる効果が奏
せられる。
Thus, according to the present invention, since so-called used labels are reused, it is possible to attach distinguishable labels to many separated image areas without increasing the absolute number of labels. Moreover, labeling can be performed by simple control using a label table and by a relatively small-scale circuit configuration. Therefore, even when a large number of separated image regions are extracted from an input image, there is no need to take measures such as dividing the processing target region in advance as in the conventional method, so the processing time does not increase. , and there is no problem of complicating the processing, and a great practical effect can be achieved.

〔発明の実施例〕[Embodiments of the invention]

以下、図面を参照して本発明の一実施例につき説明する
Hereinafter, one embodiment of the present invention will be described with reference to the drawings.

第1図は実施例回路の概略構成を示すもので、大略的に
は入力された2値画像を走査し、その画像データを順次
入力して、例えば前述したようなマスク2を用いて画素
間の連結性を判定する連結モード判定部11、テーブル
・アドレス・カウンタ12のアドレス指定を受けてラベ
ル番号テーブル13から選択的に読出されるラベルを、
上記判定検出された画素間の連結モードに従って走査点
画素に付す中間ラベル生成部14、および前記2値画像
の走査に同期して既に不要となったラベルを判定検出す
る不要ラベル判定部15とにより構成される。
FIG. 1 shows a schematic configuration of an embodiment circuit, which basically scans an input binary image, sequentially inputs the image data, and uses, for example, the mask 2 as described above, between pixels. The connection mode determination unit 11 determines the connectivity of the labels selectively read from the label number table 13 in response to the address designation of the table address counter 12.
An intermediate label generation unit 14 attaches to scanning point pixels according to the connection mode between pixels determined and detected, and an unnecessary label determination unit 15 determines and detects labels that are already unnecessary in synchronization with scanning of the binary image. configured.

連結モード判定部11、および中間ラベル生成部14は
、従来0路と同様に構成されるもので、2値画像の走査
点画素の画素データが“1”であるとき、その隣接画素
の画素データが“1”であるか否かを判定している。そ
してその画素が上記隣接画素と連結していないことが検
出された場合には、その画素が分離画像領域として始め
て出現したものであると判定し、中間ラベル生成部14
にて前記ラベル番号テーブル13から読出されたラベル
を付している。また、上記画素がその隣接画素と連結し
ていると判定した場合には、該隣接画素には走査の前時
点で既にラベルが付されていることから、そのラベルを
参照して同じラベルを付している。
The connection mode determination unit 11 and the intermediate label generation unit 14 are configured in the same manner as in the conventional 0 path, and when the pixel data of a scanning point pixel of a binary image is “1”, the pixel data of the adjacent pixel is It is determined whether or not is "1". If it is detected that the pixel is not connected to the adjacent pixel, it is determined that the pixel has appeared for the first time as a separated image area, and the intermediate label generation unit 14
A label read out from the label number table 13 is attached to the label. In addition, if it is determined that the above pixel is connected to its adjacent pixel, since a label has already been attached to the adjacent pixel before scanning, the label is referred to and the same label is attached. are doing.

尚、この場合、前記マスク2を用いて4方向の連結性を
判定していることから、相互に異なるラベルが付されて
いた画素Aと画素Bとが、画素Cの出現によって連結さ
れ、1つの分離画像領域であるとして判定される場合が
ある。このような場合には、中間ラベル生成部14にて
、例えばラベル番号の若い方にそのラベルを統一する等
のラベル修正が行われる。
In this case, since the connectivity in four directions is determined using the mask 2, the pixels A and B, which were given different labels, are connected by the appearance of the pixel C, and the In some cases, it may be determined that there are two separate image areas. In such a case, the intermediate label generation unit 14 performs label correction, such as unifying the labels to those with smaller label numbers, for example.

具体的には、例えば第2図にその処理アルゴリズムを示
すように、1走査ラインの画素数が(512)である場
合、先ず画素制御値Nを零(0)に初期設定しくステッ
プ21)、前記マスク2の処理対象画素(走査点位置の
画素)Cの画素データが“1”であるか否かを判定する
(ステップ22)。そして画素Cが“1”でない場合(
“0”の場合)には、ラベリング対象とする画素でない
として、前記画素制御値Nをインクリメントしくステッ
プ23)、その値Nが1走査ラインの最終画素であるか
否かを判定しくステップ24)、最終画素でないことを
確認して次の走査点画素に対する処理を上記ステップ2
2から繰返す。
Specifically, for example, as shown in the processing algorithm in FIG. 2, when the number of pixels in one scanning line is (512), first, the pixel control value N is initialized to zero (0) (step 21), It is determined whether the pixel data of the processing target pixel (pixel at the scanning point position) C of the mask 2 is "1" (step 22). And if pixel C is not “1” (
If the pixel is "0"), the pixel control value N is incremented as not the pixel to be labeled (step 23), and it is determined whether the value N is the final pixel of one scanning line (step 24). , confirm that it is not the final pixel, and perform the processing for the next scanning point pixel in step 2 above.
Repeat from 2.

しかして画素Cが゛1″である場合には、次のステップ
25として1走査ライン前の画素Aの画素データが″1
”であるか否かを判定し、更にその判定結果に応じてス
テップ26またはステップ21にて1走査点前の画素B
の画素データが“1”であるか否かを判定する。これら
の判定処理によって前記画素Cが“1”である場合の、
隣接画素との連結性が次の4つのモードに分類される。
If the pixel C is "1", the next step 25 is to set the pixel data of the pixel A one scanning line before to "1".
”, and further, depending on the determination result, in step 26 or step 21, pixel B one scanning point before is determined.
It is determined whether the pixel data of is "1". When the pixel C is “1” by these determination processes,
Connectivity with adjacent pixels is classified into the following four modes.

その1つは、画素A、Bが共に°゛0”である場合であ
る。この場合には、画素Cが新たに出現した分離画像領
域を形成するものであると判定し、ステップ28に示す
ように前記ラベル番号テーブル13からその指定アドレ
スTAに格納されているラベル番号を読出し、これをラ
ベリングする。その後、ステップ29にて上記指定アド
レスTAをインクリメントして前記ステップ23に結合
し、次の画素に対する処理に控える。
One of the cases is when pixels A and B are both °゛0''. In this case, it is determined that pixel C forms a newly appeared separated image area, and the process shown in step 28 The label number stored in the specified address TA is read from the label number table 13 and labeled.Then, in step 29, the specified address TA is incremented and connected to step 23, and the next step is performed. Focus on processing pixels.

また画素Bのみが“1”の場合には、画素Cが上記画素
Bに連結して同じ分離画像領域を形成するものであると
判定され、ステップ30にて画素Cに画素Bと同じラベ
ル番号を付し後、次の画素に対する処理に控える。同様
にして、画素Aのみが111 IIの場合には、画素A
に付されたラベル番号を画素Cに付す。
If only pixel B is "1", it is determined that pixel C is connected to pixel B to form the same separated image area, and in step 30, pixel C is assigned the same label number as pixel B. After adding , the next pixel is processed. Similarly, if only pixel A is 111 II, pixel A
The label number assigned to pixel C is assigned to pixel C.

また前記画素A、Bが共に“1′′の場合には、画素C
はその両者にそれぞれ連結していると判定される。この
場合には、その処理の前段階で上記画素A、Bにそれぞ
れ異なるラベル番号が付されていることがあるので、ス
テップ32にて先ずそのラベル番号を相互に判定し、例
えば若い番号のラベルに統一する。その後、ステップ3
3で、画素Cに上記統一したラベル番号を付し、次の画
素に対する処理に控える。このようにして先に付された
ラベルの修正を行いながら、相互に連結した複数の画素
には、順次同じラベルが付されることになる。
Furthermore, if the pixels A and B are both "1'', the pixel C
is determined to be connected to both of them. In this case, different label numbers may be attached to the pixels A and B before the processing, so first, in step 32, the label numbers are mutually determined, and, for example, the label with the lower number is to be unified. Then step 3
In step 3, the above-mentioned unified label number is attached to the pixel C, and processing for the next pixel is reserved. In this way, while the previously attached labels are corrected, the same labels are sequentially attached to a plurality of interconnected pixels.

中間ラベル生成部14では、このようにして先に走査さ
れた画素と連結性を持たない画素が出現したときにのみ
、前記ラベル番号テーブル13から読出される新しいラ
ベルを付し、先に走査された画素と連結性を持つ画素が
出現したときには、その画素に付されたラベルを参照し
て同じラベルを付している。
In this way, the intermediate label generation unit 14 attaches a new label read from the label number table 13 only when a pixel that has no connectivity with the previously scanned pixel appears, and adds a new label to the previously scanned pixel. When a pixel that has connectivity with a pixel that has been identified appears, the label attached to that pixel is referred to and the same label is assigned.

一方、ラベル番号テーブル13は、例えば256のアド
レスを持ち、そのアドレス領域に(0)〜(255)か
らなるラベル番号を予め格納して構成されている。そし
てこのラベル番号テーブル13は、前記不要ラベル判定
部15が後述するようにして不要ラベルを検出したとき
、その不要判定されたラベル番号をテーブル・アドレス
・カウンタ12によって指定されるアドレスに格納する
ものとなっている。
On the other hand, the label number table 13 has, for example, 256 addresses, and is configured by storing label numbers (0) to (255) in advance in the address area. The label number table 13 stores the label number determined to be unnecessary at an address designated by the table address counter 12 when the unnecessary label determination section 15 detects an unnecessary label as described later. It becomes.

しかして、このラベル番号テーブル13をアドレス制御
するテーブル・アドレス・カウンタ12は、例えば前記
連結モード判定部11の制御を受けて、前記ラベル番号
テーブル13から1つのラベルが読出される都度、その
カウント値がインクリメント(+1)され、また前記不
要ラベル判定部15が不要ラベルを検出する都度、その
カウント値がデクリメント(−1)される。上述した不
要ラベルのラベル番号テーブル13への書込み(登録)
は、このデクリメント制御に同期して行われ、そのデク
リメントされたアドレスに該不要判定されたラベルの登
録が行われるようになっている。このようなテーブル・
アドレス・カウンタ12により、上述した如く不要判定
されたラベルの登録が行われるラベル番号テーブル13
がアドレス指定され、その該当アドレスに格納されたラ
ベル番号が前記中間ラベル生成部14に読出される。従
って、不要判定されてラベル番号テーブル13に登録さ
れたラベル番号も、そのアドレス制御によって読出され
、ラベリングに再使用されるものとなっている。
Therefore, the table address counter 12 that controls the address of the label number table 13 is configured to count each time one label is read out from the label number table 13 under the control of the connection mode determining section 11, for example. The value is incremented (+1), and each time the unnecessary label determining section 15 detects an unnecessary label, the count value is decremented (-1). Writing (registration) of the unnecessary label mentioned above to the label number table 13
is performed in synchronization with this decrement control, and the label determined to be unnecessary is registered at the decremented address. A table like this
A label number table 13 in which labels determined as unnecessary by the address counter 12 are registered as described above.
is addressed, and the label number stored at the corresponding address is read out to the intermediate label generation section 14. Therefore, even label numbers that are determined to be unnecessary and registered in the label number table 13 are read out under the address control and reused for labeling.

ところで不要ラベル判定部15によるラベルの不要判定
は、例えば次のようにして行われる。第3図はその処理
アルゴリズムの一例を示すものである。
By the way, the unnecessary label determining unit 15 determines that a label is unnecessary, for example, as follows. FIG. 3 shows an example of the processing algorithm.

今、前記2値画像の走査によりラベリング処理を行いな
がら、その抽出された分離画像領域に対する画像処理(
計測等)をそのラベル番号に基づいて同時に行うものと
すると、一般的には1ライン走査を終了する都度、幾つ
かの抽出された分離画像領域に対する処理を終了するこ
とができる。
Now, while performing labeling processing by scanning the binary image, image processing (
(measurement, etc.) are performed simultaneously based on the label number, it is generally possible to complete processing for several extracted separated image regions each time one line scan is completed.

この場合、処理を終了した分離画像領域に対して付され
たラベル番号が、その後の処理には不要となることから
、該ラベル番号を使用済として不要判定することができ
る。
In this case, since the label number assigned to the separated image area for which processing has been completed is no longer necessary for subsequent processing, the label number can be determined to be used and unnecessary.

そこで不要ラベル判定部15では、例えば前記2値画像
の1ラインの走査が終了する都度、先ずステップ41に
てラベル判定11JIl(IIIを、例えばラベル番号
の大きいものから順に不要判定する如く初期設定する。
Therefore, in the unnecessary label determination unit 15, each time the scanning of one line of the binary image is completed, first, in step 41, the unnecessary label determination unit 15 initializes the label determination units 11JIl (III) such that, for example, the label determination unit 11JIl (III) is determined to be unnecessary in order from the label with the largest label number. .

そして上記制御値Iで示されるラベル番号がその前ライ
ンで出現したか否かをステップ42にて調べ、次にステ
ップ43では同様にして現ラインの走査で出現したか否
かを調べる。そして該ラベル番号が前ラインで出現し、
且つ現ラインで出現しなかった場合、これを前ラインま
でに抽出された分離画像領域に対して付されたものであ
り、現時点では既に不要になったものであると判定して
いる。そして不要ラベルを判定検出したとき、ステップ
44にて前述したように前記テーブル・アドレス・カウ
ンタ12が指すラベル番号テーブル13のアドレスをデ
クリメント(−1)t、、そのアドレスに上記不要判定
したラベル番号を登録している(ステップ45)。その
後、前記ラベル判定制御111i1■をデクリメントし
くステップ46)、その制御値Iが零に達しないことを
確認して(ステップ41)、前述したステップ42から
の処理を繰返す。
Then, in step 42, it is checked whether the label number indicated by the control value I has appeared in the previous line, and then in step 43, it is similarly checked whether it has appeared in the scanning of the current line. Then, the label number appears on the previous line,
If it does not appear in the current line, it is determined that this is attached to the separated image area extracted up to the previous line and is no longer needed at this point. When an unnecessary label is determined and detected, in step 44, the address of the label number table 13 pointed to by the table address counter 12 is decremented (-1) t, and the label number determined to be unnecessary is set at that address. is registered (step 45). Thereafter, the label determination control 111i1■ is decremented (step 46), and it is confirmed that the control value I does not reach zero (step 41), and the processing from step 42 described above is repeated.

従って、この不要ラベル判定時に複数の不要ラベルが検
出される場合には、不要ラベルが検出される都度、上記
アドレスのデクリメントと、そのアドレスへの不要判定
されたラベル番号の磨込みが行われることになる。
Therefore, if multiple unnecessary labels are detected during this unnecessary label determination, each time an unnecessary label is detected, the above address is decremented and the label number determined to be unnecessary is refined to that address. become.

以上のようにして本実施例回路では、入力2値画像を走
査し、画素の連結性から分離画像領域を順次抽出してラ
ベル番号を付すに際して、1ライン走査毎に不要ラベル
の判定を行い、不要判定されたラベ・ル番号をラベル番
号テーブル13に登録しながら、該ラベル番号テーブル
13のアドレスを制御して新しく抽出される分離画像領
域に次々とラベル番号を付していくので、使用済として
不要判定されたラベル番号を効果的に再使用することが
可能となる。
As described above, in the circuit of this embodiment, when scanning an input binary image, sequentially extracting separated image regions based on pixel connectivity, and assigning label numbers, unnecessary labels are determined for each line scan. While registering label numbers that are determined to be unnecessary in the label number table 13, the addresses of the label number table 13 are controlled and label numbers are attached to newly extracted separated image areas one after another. This makes it possible to effectively reuse label numbers that have been determined to be unnecessary.

次に、その具体例を第4図および第5図を参照して説明
する。
Next, a specific example thereof will be explained with reference to FIGS. 4 and 5.

第4図(a)(b)は入力2値画像16と、この21画
像本回路によってラベリングしたラベリング画像11と
を対比して示すものであり、第3図(a)〜(f)はそ
のラベリング処理時におけるラベル番号テーブル13の
遷移状態と、その指定アドレスの関係とを示す図である
。尚、2値画像16中における「1」は、画素データが
“1”なる画素を示しており、その他の画素の画素デー
タは“O”である。またラベリング画像11中の(1)
、+2)。
FIGS. 4(a) and 4(b) show a comparison between the input binary image 16 and the labeling image 11 labeled by this 21-image circuit, and FIGS. 7 is a diagram showing the transition state of the label number table 13 during labeling processing and the relationship between its designated addresses. FIG. Note that "1" in the binary image 16 indicates a pixel whose pixel data is "1", and the pixel data of other pixels is "O". Also, (1) in labeling image 11
, +2).

・・・は、画素に付されたラベル番号を示している。... indicates a label number attached to a pixel.

しかして2値画像16の走査を開始する際、先ずラベル
番号テーブル13は第5図(a)に示すように初期設定
され、その最初のアドレスが矢印(→)で示すように指
定されている。この状態で前記2値画像16の最初のラ
インPOの走査すると、この走査ラインでは画素データ
“1″なる画素が検出されないことから、前述したよう
にラベルの付与は行われない。従ってテーブル13の状
態変化もない。
When starting scanning the binary image 16, the label number table 13 is first initialized as shown in FIG. 5(a), and its first address is designated as shown by the arrow (→). . When the first line PO of the binary image 16 is scanned in this state, no pixel with pixel data "1" is detected in this scanning line, so no label is applied as described above. Therefore, there is no change in the state of the table 13.

その後、2番目のラインP1を走査すると、“1”なる
画素が先ず3つ連続して検出される。
Thereafter, when the second line P1 is scanned, three "1" pixels are detected in succession.

しかしてこの場合には、先ずその最初の画素に対して前
記ラベル番号テーブル13のアドレス指定されているラ
ベル番号(1)が付される。このラベル番号の付与によ
ってラベル番号テーブル13に対する指定アドレスがイ
ンクリメントされる。そして次の画素に対してラベルを
付与しようとするとき、その画素が1つ前の画素に連結
していることから、前記ラベル番号テーブル13からの
次のラベル番号の読出しが行われず、1つ前の画素と同
じラベル番@(1)が付与される。従ってこの時には、
前記ラベル番号テーブル13の状態はそのまま維持され
る。
However, in this case, first, the label number (1) specified by the address in the label number table 13 is assigned to the first pixel. By assigning this label number, the designated address for the label number table 13 is incremented. When trying to attach a label to the next pixel, since that pixel is connected to the previous pixel, the next label number is not read out from the label number table 13, and one The same label number @(1) as the previous pixel is assigned. Therefore, at this time,
The state of the label number table 13 is maintained as it is.

そして次の画素に対しても、同様にしてラベリングが行
われる。
Labeling is then performed on the next pixel in the same manner.

その後、数画素をおいて再び1゛なる画素が検出される
。この場合には、前画素および1ライン上の画素との連
結性がないことから、新たに出現した画素であると判定
され、前記ラベル番号テーブル13から次のラベル番@
(’2が読出され、該画素に付与される。同様にして、
更に数画素をおいて検出される“1″なる画素に対して
は、ラベル番号テーブル13からラベル番号(3)が読
出され、これが付与される。そしてこのラインP1では
、3つの画素群を抽出してその走査が終了することがら
、ラベル番号テーブル13は、4番目のアドレスが指定
された状態で、その読出しを一時中止することになる。
Thereafter, a pixel of 1 is detected again after several pixels. In this case, since there is no connectivity with the previous pixel and the pixel on one line, it is determined that the pixel has newly appeared, and the next label number @ from the label number table 13 is determined.
('2 is read out and given to the pixel. Similarly,
A label number (3) is read out from the label number table 13 and assigned to a pixel "1" detected after a few more pixels. In this line P1, since the scanning ends after extracting three pixel groups, reading of the label number table 13 is temporarily stopped when the fourth address is specified.

このようにして1ラインの走査を終了した時点で、前記
不要ラベル判定部15による不要ラベルの検出処理が行
われる。しかし、この場合には前ラインPOでラベリン
グが行われていないことから、不要ラベルは検出されな
い。従って、次のラインP2の走査が開始される。
When one line of scanning is completed in this manner, unnecessary label detection processing is performed by the unnecessary label determining section 15. However, in this case, since labeling is not performed on the previous line PO, unnecessary labels are not detected. Therefore, scanning of the next line P2 is started.

しかしてこのラインP2の走査時には、画素データが“
1″であるとして検出された画素が、それぞれ1ライン
前の画素と連結性を有していることから、新たなラベリ
ングが行われず、1ライン前の画素に関連付けられてそ
れぞれ同じラベル番号が付される。その後、このライン
P2の走査の終了に伴って前記不要ラベルの判定が行わ
れると、ラベル番号(2が不要ラベルとして検出される
。この不要ラベルの検出によって第5図(b)に示すよ
うにラベル番号テーブル13の指定アドレスが1つ戻さ
れ(デクリメント)、そのアドレスに上記不要判定され
たラベル番号(aが登録される。そしてこのラベル番号
(2が次に読出されるように制御される。
However, when scanning line P2, the pixel data is “
Since each pixel detected as 1" has connectivity with the pixel one line before, new labeling is not performed, and the pixels are associated with the pixel one line before and given the same label number. Thereafter, when the unnecessary label is determined upon completion of the scanning of line P2, label number (2) is detected as an unnecessary label. As a result of the detection of this unnecessary label, as shown in FIG. As shown, the designated address in the label number table 13 is returned by one (decremented), and the label number (a) that was determined to be unnecessary is registered at that address.Then, this label number (2) is read out next. controlled.

しかして次のラインP3を走査すると、このラインでは
画素検出が行われない。この結果、当然ラベリングが行
われることがなく、前述した不要ラベルの判定処理に進
む。そしてこの不要ラベルの判定処理では、先ずラベル
番号(aが不要ラベルとして検出され、前記ラベルデー
プル13のアドレスのデクリメントと、そのアドレスへ
のラベル番号(3の登録が行われ、続いてラベル番号(
1)が不要ラベルとして検出される。そしてこのラベル
番号(1)に対しても、前記アドレスのデクリメントと
、そのアドレスへの上記ラベル番号(1)の登録が行わ
れる。この状態が第5図(C)に示される。
However, when the next line P3 is scanned, no pixel detection is performed on this line. As a result, labeling is naturally not performed, and the process proceeds to the unnecessary label determination process described above. In this unnecessary label determination process, first, the label number (a) is detected as an unnecessary label, the address of the label double 13 is decremented, the label number (3) is registered to that address, and then the label number (a) is detected as an unnecessary label.
1) is detected as an unnecessary label. Also for this label number (1), the address is decremented and the label number (1) is registered at that address. This state is shown in FIG. 5(C).

しかる後、次のラインP4の走査時には、新たに“1”
なる画素が検出されることから、第5図(C)に示す指
定アドレスのラベル番号から順に読出され、ラベル番号
(1)i31がそれぞれラベリングされることになる。
After that, when scanning the next line P4, a new “1” is generated.
Since the pixels are detected, they are read out in order starting from the label number of the designated address shown in FIG. 5(C), and labeled with label number (1) i31.

つまり、先に使用され、その後不要となったラベル番号
(1)i3がそれぞれ再使用されることになる。そして
ラインP4の走査終了時には、ラベル番号テーブル13
は第5図(d)に示すように3番目のアドレスが指定さ
れた状態で待機することになる。
In other words, the label number (1) i3 that was used first and then became unnecessary will be reused. Then, at the end of scanning line P4, label number table 13
will wait with the third address specified, as shown in FIG. 5(d).

しかる後、次のラインの走査時には、ラベル番号(2)
、(4)が順に読出され、第5図(e)に示す状態にラ
ベル番号テーブル13の状態が変化した後、不要ラベル
判定が再び行われる。そしてこの時には、ラベル番号(
1)が再び不要ラベルとして検出され、第5図(f)に
示すように前記ラベル番号テーブル13に再登録される
After that, when scanning the next line, the label number (2)
, (4) are read in order, and after the state of the label number table 13 changes to the state shown in FIG. 5(e), unnecessary label determination is performed again. And at this time, the label number (
1) is again detected as an unnecessary label and is re-registered in the label number table 13 as shown in FIG. 5(f).

以降、このようなラベリング制御と不要ラベルの判定、
およびその再登録とが順次繰返して実行され、不要判定
されたラベル番号を再使用した第4図1)に示す如きラ
ベリング画像17が得られることになる。
From now on, such labeling control and unnecessary label determination,
This and the re-registration are sequentially repeated, and a labeling image 17 as shown in FIG. 4 (1) is obtained in which the label numbers determined to be unnecessary are reused.

以上説明したように本回路によれば、比較的小規模な回
路構成によってラベル番号を効果的に制御しつつ、不要
ラベルを判定検出して、これを再使用することがきる。
As described above, according to the present circuit, it is possible to effectively control label numbers with a relatively small-scale circuit configuration, detect unnecessary labels, and reuse them.

従ってラベル番号テーブル13に準備されたラベルの数
より多い分離画像領域が抽出される場合であっても、こ
れらの分離画像領域に対して効果的にラベルを付すこと
ができる。
Therefore, even if more separated image regions are extracted than the number of labels prepared in the label number table 13, these separated image regions can be effectively labeled.

そして従来のように、そのハードウェア構成が大災りと
なったり、或いはその処理時間が長くなる等の不具合を
招くことがない等の実用上多大なる効果が奏せられる。
Further, it is possible to achieve great practical effects, such as not causing problems such as the hardware configuration becoming a disaster or the processing time becoming longer than in the past.

尚、′本発明は上述した実施例に限定されるものではな
く、その要旨を逸脱しない範囲で種々変形して実施する
ことができる。例えばラベルは番号として与える必要は
なく、相互に識別可能なものであれば良い。またラベル
数等は、処理対象両画の画素数等の仕様に応じて定めれ
ば良いものである。またマスクとして8方向の画素の繋
りを判定するものを用いることも勿論可能である。
It should be noted that the present invention is not limited to the embodiments described above, and can be implemented with various modifications without departing from the gist thereof. For example, labels do not need to be given as numbers, as long as they are mutually distinguishable. Further, the number of labels etc. may be determined according to specifications such as the number of pixels of both images to be processed. Furthermore, it is of course possible to use a mask that determines the connection of pixels in eight directions.

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

第1図は本発明の一実施例回路の概略構成図、第2図は
分離画像領域の抽出とそのラベリングの処理アルゴリズ
ムの例を示す図、第3図は不要うベルの判定検出の処理
アルゴリズムの例を示す図、ベル番号テーブルの遷移状
態を示す図、第6図は従来のラベリング処理を示す図、
第7図は画素の連結性を検出する為のマスクの例を示す
図、第8図は従来の領域ラベリング回路の構成例を示す
図である。 11・・・連結モード判定部、12・・・テーブル・ア
ドレス・カウンタ、13・・・ラベル番号テーブル、1
4・・・中間ラベル生成部、15・・・不要ラベル判定
部。
FIG. 1 is a schematic diagram of a circuit according to an embodiment of the present invention, FIG. 2 is a diagram showing an example of a processing algorithm for extracting separated image regions and labeling thereof, and FIG. 3 is a processing algorithm for detecting unnecessary overlaps. Figure 6 is a diagram showing an example of the transition state of the bell number table, Figure 6 is a diagram showing conventional labeling processing,
FIG. 7 is a diagram showing an example of a mask for detecting pixel connectivity, and FIG. 8 is a diagram showing an example of the configuration of a conventional area labeling circuit. DESCRIPTION OF SYMBOLS 11... Concatenation mode determination unit, 12... Table address counter, 13... Label number table, 1
4... Intermediate label generation unit, 15... Unnecessary label determination unit.

Claims (3)

【特許請求の範囲】[Claims] (1)2値画像を走査して画素データを順次入力し、隣
接画素との画素データの繋り関係から分離画像領域を検
出し、各分離画像領域毎に相互に識別可能なラベルを付
す領域ラベリング回路において、上記2値画像の走査に
応じて既に不要となったラベルを判定検出し、この不要
判定されたラベルを再使用してなることを特徴とする領
域ラベリング回路。
(1) A binary image is scanned, pixel data is input sequentially, separated image areas are detected from the connection relationship of pixel data with adjacent pixels, and a mutually distinguishable label is attached to each separated image area. An area labeling circuit characterized in that the labeling circuit determines and detects labels that are already unnecessary in response to scanning of the binary image, and reuses the labels that have been determined to be unnecessary.
(2)分離画像領域に対するラベルの付与は、複数のラ
ベルを格納したラベル・テーブルをテーブル・アドレス
・カウンタによりアドレス指定して該ラベルを選択的に
読出し、且つ上記ラベル・テーブルから1つのラベルを
読出す都度、前記テーブル・アドレス・カウンタをイン
クリメントして上記ラベルの読出しを制御して行われ、
不要判定されたラベルの再使用は、不要ラベルの検出時
に上記テーブル・アドレス・カウンタをデクリメントす
ると共に、このデクリメントされたカウンタによつて指
定される前記ラベル・テーブルのアドレスに上記不要ラ
ベルを登録して行われるものである特許請求の範囲第1
項記載の領域ラベリング回路。
(2) Adding a label to a separated image area involves selectively reading out a label table storing a plurality of labels by addressing the label table using a table address counter, and then reading out one label from the label table. Each time reading is performed, the table address counter is incremented to control reading of the label,
To reuse a label that has been determined to be unnecessary, the table address counter is decremented when an unnecessary label is detected, and the unnecessary label is registered at the address in the label table specified by this decremented counter. Claim 1 which is carried out
Area labeling circuit as described in Section.
(3)ラベルの不要判定は、2値画像の1ライン走査を
終了したとき、現ラインおよび前ラインに出現したラベ
ルを判定して行われるものである特許請求の範囲第1項
記載の領域ラベリング回路。
(3) Area labeling according to claim 1, wherein the unnecessary determination of a label is performed by determining the labels appearing on the current line and the previous line when one line scanning of the binary image is completed. circuit.
JP59267174A 1984-12-18 1984-12-18 Area labeling circuit Granted JPS61145689A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59267174A JPS61145689A (en) 1984-12-18 1984-12-18 Area labeling circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59267174A JPS61145689A (en) 1984-12-18 1984-12-18 Area labeling circuit

Publications (2)

Publication Number Publication Date
JPS61145689A true JPS61145689A (en) 1986-07-03
JPH0221026B2 JPH0221026B2 (en) 1990-05-11

Family

ID=17441129

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59267174A Granted JPS61145689A (en) 1984-12-18 1984-12-18 Area labeling circuit

Country Status (1)

Country Link
JP (1) JPS61145689A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008097529A (en) * 2006-10-16 2008-04-24 Hiroshima Univ Image processor and processing method
WO2010016411A1 (en) * 2008-08-05 2010-02-11 ソニー株式会社 Image processing device, image processing method, image input device, and image input/output device
JP2013120598A (en) * 2011-12-06 2013-06-17 Lg Display Co Ltd Touch area labeling method and touch sensor drive device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59208667A (en) * 1983-05-13 1984-11-27 Matsushita Electric Ind Co Ltd Labelling device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59208667A (en) * 1983-05-13 1984-11-27 Matsushita Electric Ind Co Ltd Labelling device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008097529A (en) * 2006-10-16 2008-04-24 Hiroshima Univ Image processor and processing method
WO2010016411A1 (en) * 2008-08-05 2010-02-11 ソニー株式会社 Image processing device, image processing method, image input device, and image input/output device
US8836670B2 (en) 2008-08-05 2014-09-16 Japan Display, Inc. Image processing apparatus, image processing method, image input device and image input/output device
JP2013120598A (en) * 2011-12-06 2013-06-17 Lg Display Co Ltd Touch area labeling method and touch sensor drive device
US8847901B2 (en) 2011-12-06 2014-09-30 Lg Display Co., Ltd. Labeling touch regions of a display device
US9182848B2 (en) 2011-12-06 2015-11-10 Lg Display Co., Ltd. Labeling touch regions of a display device

Also Published As

Publication number Publication date
JPH0221026B2 (en) 1990-05-11

Similar Documents

Publication Publication Date Title
US4953224A (en) Pattern defects detection method and apparatus
JPH03256485A (en) Motion vector detecting circuit
US4887302A (en) Labelling circuit for image processor
JPS61145689A (en) Area labeling circuit
JPS6147362B2 (en)
JP3845561B2 (en) Image processing apparatus and target detection tracking apparatus using the same
JPH03206574A (en) Raster scan type labeling processing system
JP2716894B2 (en) Labeling circuit for image processing
JPS6410872B2 (en)
US11852673B1 (en) Method for generating chip probing wafer map
JPH01245366A (en) Labeling processing system
JP3512462B2 (en) Black isolated point removal device
JP3668092B2 (en) Image processing apparatus and target detection tracking apparatus using the same
KR100243194B1 (en) Method of obtaining the connected component in bit-map image
JPS6285884A (en) Image discriminator
JP2969930B2 (en) Line memory of image processing device
JPH0433073A (en) Method and circuit for calculating end point of linked area
JPS6093572A (en) Graphic selective image processor
JPS62108381A (en) Density histogram detecting system
JPS63226784A (en) Contour picture element extracting device
JPH0644289B2 (en) Connected area labeling circuit
JPH11345333A (en) Labeling processing system and method therefor
JPH0146912B2 (en)
JPS62102364A (en) Color code converting device
JPS63198171A (en) Picture processor