JPH04156692A - Centroid calculation circuit for link area - Google Patents

Centroid calculation circuit for link area

Info

Publication number
JPH04156692A
JPH04156692A JP2282381A JP28238190A JPH04156692A JP H04156692 A JPH04156692 A JP H04156692A JP 2282381 A JP2282381 A JP 2282381A JP 28238190 A JP28238190 A JP 28238190A JP H04156692 A JPH04156692 A JP H04156692A
Authority
JP
Japan
Prior art keywords
label
coordinate
value
provisional
cumulative
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
JP2282381A
Other languages
Japanese (ja)
Inventor
Yoshiyuki Ota
善之 太田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2282381A priority Critical patent/JPH04156692A/en
Publication of JPH04156692A publication Critical patent/JPH04156692A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To calculate the centroid at high speed by finding the X coordinate accumulation value, Y coordinate accumulation value, and histogram of an update label in parallel with processing to attach an update label unifying temporary labels. CONSTITUTION:Temporary label X/Y coordinate accumulation parts 1, 3 calculate the accumulation values of X/Y coordinates in a label area attached by a temporary labeling part 9 on the area of an image temporarily. Also, a temporary label histogram calculation part 5 calculates the histogram value of a label supplied to the area in the image by the labeling part 9. At this time, update label X/Y coordinate accumulation parts 2, 4 find the X/Y coordinate accumulation values based on the temporary and update labels found at a clustering part 14. Thereby, an update label centroid calculation part 7 calculates the coordinate of the centroid from the X/Y coordinate accumulation values and the histogram value found at the accumulation parts 2, 4 and an calculation part 6 at high speed.

Description

【発明の詳細な説明】 〔概要〕 画像中の連結領域の重心を算出する重心算出回路に関し
、 暫定ラベル付けと並列にこの暫定ラベルのX座標累積値
、Y座標累積値、ヒストグラム値を算出し、次の暫定ラ
ベルを付与した部分領域の接続関係から1領域に付与さ
れた複数の暫定ラベルを1つの更新ラベルにまとめるク
ラスタリング処理と並列に更新ラベルのX座標累積値、
Y座標累積値、ヒストグラム値を算出してこれらから重
心を算出し、画像中の各領域のラベル付けと並行して高
速に重心の算出を可能にすることを目的とし、画像中の
各領域に暫定的なラベル(暫定ラベル)を付与する暫定
ラベル付け部と、付与された暫定ラベルの領域のX座標
の累積値を算出する暫定ラベルX座標累積部と、付与さ
れた暫定ラベルの領域のY座標の累積値を算出する暫定
ラベルY座標累積部と、付与された暫定ラベルの領域の
ヒストグラム値を算出する暫定ラベルヒストグラム算出
部とによって、画像中の領域に暫定ラベルの付与、およ
びこの暫定ラベル毎のX座標累積値、Y座標累積値、ヒ
ストグラム値の算出を並列に実行した後1、連結領域の
暫定ラベルをまとめたラベル(更新ラベル)を付与する
処理と並列に、これら暫定ラベルのX座標累積値、Y座
標累積値、ヒストグラム値の和から更新ラベルのX座標
累積値、Y座標累積値、ヒストグラム値を求め、これら
から更新ラベルのX座標累積値/ヒストグラム値、Y座
標累積値/ヒストグラム値によって重心を求めるように
構成する。
[Detailed Description of the Invention] [Summary] Regarding a center of gravity calculation circuit that calculates the center of gravity of a connected region in an image, the circuit calculates the cumulative X-coordinate value, cumulative Y-coordinate value, and histogram value of the provisional label in parallel with provisional labeling. , the cumulative X-coordinate value of the updated label in parallel with the clustering process that combines multiple provisional labels given to one region into one updated label based on the connection relationship of the partial regions to which the next provisional label has been given,
The purpose is to calculate the Y coordinate cumulative value and histogram value and calculate the center of gravity from these, and to quickly calculate the center of gravity in parallel with labeling each region in the image. a provisional labeling section that assigns a provisional label (temporary label); a provisional label A provisional label Y-coordinate accumulation section that calculates the cumulative value of coordinates and a provisional label histogram calculation section that calculates the histogram value of the region of the given provisional label assign a provisional label to the region in the image and calculate the provisional label. After calculating the X-coordinate cumulative value, Y-coordinate cumulative value, and histogram value for each time in parallel, 1, the Calculate the cumulative X-coordinate value, cumulative Y-coordinate value, and histogram value of the updated label from the sum of the cumulative coordinate value, cumulative Y-coordinate value, and histogram value, and calculate the cumulative X-coordinate value, histogram value, and cumulative Y-coordinate value of the updated label from these. It is configured to find the center of gravity based on the histogram value.

〔産業上の利用分野〕 本発明は、画像中の連結領域の重心を算出する重心算出
回路に関するものである。画像処理を利用した部品検査
や医療分野における血球検査、細胞検査などにおいて画
像中に散在する複数の物体を識別し、物体毎にその大き
さ・位置・周囲長などの図形的特徴を算出する処理が必
要である。特に物体毎の位置を知る場合に高速に連結領
域の重心の位置を求める回路の実現が望まれている。
[Industrial Application Field] The present invention relates to a center of gravity calculation circuit that calculates the center of gravity of connected regions in an image. A process that uses image processing to identify multiple objects scattered in an image in parts inspection, blood cell testing, cell testing, etc. in the medical field, and calculates the graphical characteristics of each object, such as its size, position, and perimeter. is necessary. In particular, when determining the position of each object, it is desired to realize a circuit that can quickly determine the position of the center of gravity of a connected region.

〔従来の技術〕[Conventional technology]

従来、連結領域の重心を算出する回路として、第8図の
回路例に示すように、ラベル付け部28が画像中に散在
する各領域に独立にラベルを付与する。次に、ヒストグ
ラム算出部35がこのラベル付けされた領域の面積をヒ
ストグラム値としてラベル毎に算出し、X座標値累積部
36がこのラベル付けされた領域のX座標値の累積値を
ラベル毎に算出し、Y座標値累積部37がこのラベル付
けされた領域のX座標値の累積値をラベル毎に算出する
。そして、重心算出部38がラベル毎にX座標累積4M
/ヒストグラム値、Y座標累積値/ヒストグラム値の計
算を行い、ラベル毎の重心のX座標値、X座標値を算出
するようにしていた。
Conventionally, as a circuit for calculating the center of gravity of a connected region, as shown in the circuit example of FIG. 8, a labeling section 28 independently labels each region scattered in an image. Next, the histogram calculating unit 35 calculates the area of this labeled area as a histogram value for each label, and the X coordinate value accumulating unit 36 calculates the cumulative value of the X coordinate values of this labeled area for each label. The Y-coordinate value accumulator 37 calculates the cumulative value of the X-coordinate values of the labeled area for each label. Then, the center of gravity calculation unit 38 calculates the cumulative X coordinate of 4M for each label.
/ Histogram value, Y coordinate cumulative value / Histogram value was calculated, and the X coordinate value and X coordinate value of the center of gravity for each label were calculated.

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

上述したように、従来は、ラベル付けを行った後の領域
に対して、ラベル毎にその領域についてX座標累積値、
Y座標累積値、ヒストグラム値を求め、更にX座標累積
値、Y座標累積値をそれぞれヒストグラム値で除算して
重心のX座標、Y座標を順次算出していたため、画像か
らラベル毎の各領域の重心を算出するまでに多くの時間
が必要となってしまうという問題があった。
As mentioned above, conventionally, for each label, the cumulative X coordinate value,
The Y coordinate cumulative value and histogram value were calculated, and the X coordinate cumulative value and Y coordinate cumulative value were each divided by the histogram value to calculate the center of gravity's X and Y coordinates, so it was possible to calculate each region for each label from the image. There has been a problem in that it takes a lot of time to calculate the center of gravity.

本発明は、暫定ラベル付けと並列にこの暫定ラベルのX
座標累積値、Y座標累積値、ヒストグラム値を算出し、
次の暫定ラベルを付与した部分領域の接続関係から1領
域に付与された複数の暫定ラベルを1つの更新ラベルに
まとめるクラスタリング処理と並列に更新ラベルのX座
標累積値、Y座標累積値、ヒストグラム値を算出してこ
れらから重心を算出し、画像中の各領域のラベル付けと
並行して高速に重心の算出を可能にすることを目的とし
ている。
In parallel with provisional labeling, the present invention provides
Calculate the coordinate cumulative value, Y coordinate cumulative value, and histogram value,
The cumulative X coordinate value, cumulative Y coordinate value, and histogram value of the updated label are performed in parallel with the clustering process that combines multiple provisional labels given to one region into one updated label based on the connectivity of the partial regions that have been given the next provisional label. The aim is to calculate the center of gravity from these and to enable high-speed calculation of the center of gravity in parallel with labeling each area in the image.

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

第1図を参照して課題を解決するための手段を説明する
Means for solving the problem will be explained with reference to FIG.

第1図において、暫定ラベル付け部9は、画像中の各領
域に暫定的なラベル(暫定ラベル)を付与するものであ
る。
In FIG. 1, a provisional labeling section 9 provides a provisional label (temporary label) to each region in the image.

暫定ラベルX座標累積部1は、付与された暫定ラベルの
領域のX座標の累積値を算出するものである。
The provisional label X-coordinate accumulator 1 calculates the cumulative value of the X-coordinates of the area of the given provisional label.

暫定ラベルY座標累積部3は、付与された暫定ラベルの
領域のY座標の累積値を算出するものである。
The provisional label Y-coordinate accumulator 3 calculates the cumulative value of the Y-coordinate of the area of the provided provisional label.

暫定ラベルヒストグラム算出部5は、付与された暫定ラ
ベルの領域のヒストグラム値を算出するものである。
The provisional label histogram calculation unit 5 calculates the histogram value of the area of the provided provisional label.

クラスクリング部14は、連結領域の暫定ラベルについ
てまとめたラベル(更新ラベル)を付与などするもので
ある。
The class linking unit 14 assigns a label (updated label) that summarizes the provisional labels of the connected areas.

更新ラベル重心算出部7は、更新ラベルのX座標累積値
/ヒストグラム値、Y座標累積値/ヒストグラム値によ
って重心を算出するものである。
The updated label gravity center calculation unit 7 calculates the gravity center based on the X coordinate cumulative value/histogram value and the Y coordinate cumulative value/histogram value of the updated label.

〔作用〕[Effect]

本発明は、第1図に示すように、暫定ラベル付け部9が
画像中の各領域に暫定的な暫定ラベルの付与を行ってい
るのと並列にこれら付与した領域の暫定ラベル毎に、暫
定ラベルX座標累積部1がX座標の累積値を算出し、暫
定ラベルY座標累積部3がY座標の累積値を算出し、暫
定ラベルヒストグラム算出部6がヒストグラム値を算出
した後、クラスタリング部14が連結領域の暫定ラベル
連結領域の暫定ラベルをまとめたラベル(更新ラベル)
を付与する処理と並列にこれら暫定ラベルのX座標累積
値、Y座標累積値、ヒストグラム値の和として更新ラベ
ルのX座標累積値、Y座標累積値、ヒストグラム値を求
め、これらから更新ラベルのX座標累積値/ヒストグラ
ム値、Y座標累積値/ヒストグラム値によって重心を求
めるようにしている。
As shown in FIG. 1, in parallel with the provisional labeling unit 9 assigning a provisional label to each region in an image, the provisional After the label X coordinate accumulating unit 1 calculates the cumulative value of the X coordinate, the temporary label Y coordinate accumulating unit 3 calculates the cumulative value of the Y coordinate, and the temporary label histogram calculating unit 6 calculates the histogram value, the clustering unit 14 is the temporary label of the connected area Label that summarizes the temporary labels of the connected area (updated label)
In parallel with the process of assigning the temporary label, the X coordinate cumulative value, Y coordinate cumulative value, and histogram value of the updated label are calculated as the sum of the X coordinate cumulative value, Y coordinate cumulative value, and histogram value of these provisional labels, and from these, the updated label's The center of gravity is determined by the coordinate cumulative value/histogram value and the Y coordinate cumulative value/histogram value.

従って、暫定ラベル付けと並列にこの暫定ラベルのX座
標累積値、Y座標累積値、ヒストグラム値を算出し、次
のクラスタリング処理と並列に更新ラベルのX座標累積
値、Y座標累積値、ヒストグラム値を算出してこれらか
ら重心を算出することにより、画像中の各領域のラベル
付けと並行して高速に重心を算出することが可能となる
Therefore, in parallel with provisional labeling, the cumulative X-coordinate value, cumulative Y-coordinate value, and histogram value of this provisional label are calculated, and in parallel with the next clustering process, the cumulative X-coordinate value, cumulative Y-coordinate value, and histogram value of the updated label are calculated. By calculating the center of gravity from these, it becomes possible to calculate the center of gravity at high speed in parallel with labeling each area in the image.

〔実施例〕〔Example〕

次に、第1図から第7図を用いて本発明の実施例の構成
および動作を順次詳細に説明する。
Next, the configuration and operation of the embodiment of the present invention will be explained in detail using FIGS. 1 to 7.

第1図において、暫定ラベルX座標累積部1は、画像中
の領域に暫定ラベル付け部9によって暫定的に付与した
ラベル(−暫定ラベル)の領域の各画素のX座標値の累
積値を算出するものである。
In FIG. 1, a provisional label It is something to do.

暫定ラベルY座標累積部3は、画像中の領域に暫定ラベ
ル付け部9によって暫定的に付与した暫定ラベルの領域
の各画素のY座標値の累積値を算出するものである。
The provisional label Y-coordinate accumulating unit 3 calculates the cumulative value of the Y-coordinate values of each pixel in the region of the provisional label provisionally given to the region in the image by the provisional labeling unit 9.

暫定ラベルヒストグラム算出部5は、画像中の領域に暫
定ラベル付け部9によって暫定的に付与した暫定ラベル
の領域のヒストグラム値を算出するものである。
The provisional label histogram calculation section 5 calculates the histogram value of the region of the provisional label provisionally given by the provisional labeling section 9 to the region in the image.

更新ラベルX座標累積部2は、クラスタリング部14に
よって求めたベア〔暫定ラベル、更新ラベル〕をもとに
更新ラベルのX座標累積値(例えば第3図(ニ)の更新
ラベルAのX座標累積値)を求めるものである。ここで
、更新ラベルは、連結領域の暫定ラベルを1つにまとめ
たラベルである(例えば第3図(ハ)の連結領域の暫定
ラベル1.2.3をまとめた更新ラベルAである)。
The updated label X coordinate accumulation unit 2 calculates the cumulative X coordinate value of the updated label (for example, the cumulative value). Here, the updated label is a label that combines the provisional labels of the connected areas (for example, it is the updated label A that combines the provisional labels 1.2.3 of the connected area in FIG. 3(C)).

更新ラベルY座標累積部4は、クラスタリング部14に
よって求めたペア〔暫定ラベル、更新ラベル〕をもとに
更新ラベルのY座標累積値(例えば第3図(ニ)の更新
ラベルAのY座標累積値)を求めるものである。
The updated label Y coordinate accumulation unit 4 calculates the Y coordinate cumulative value of the updated label (for example, the Y coordinate cumulative value of the updated label A in FIG. 3(d)) based on the pair [temporary label, updated label] obtained by the clustering unit 14. value).

更新ラベルヒストグラム算出部6は、クラスタリング部
14によって求めたペア〔暫定ラベル、更新ラベル〕を
もとに更新ラベルのヒストグラム値(例えば第3図(ニ
)の更新ラベルAのヒストグラム値)を求めるものであ
る。
The updated label histogram calculation unit 6 calculates the histogram value of the updated label (for example, the histogram value of the updated label A in FIG. 3(d)) based on the pair [temporary label, updated label] obtained by the clustering unit 14. It is.

更新ラベル重心算出部7は、更新ラベルX座標累積部2
、更新ラベルY座標累積部4、および更新ラベルヒスト
グラム算出部6によって求めた、更新ラベルのX座標累
積値、Y座標累積値、およびヒストグラム値から、重心
を下式il+、(2)によって算出するものである。
The updated label center of gravity calculation section 7 includes the updated label X coordinate accumulation section 2
, the center of gravity is calculated by the following formula il+, (2) from the cumulative X-coordinate value, cumulative Y-coordinate value, and histogram value of the updated label obtained by the updated label Y-coordinate accumulation unit 4 and the updated label histogram calculation unit 6. It is something.

重心のX座標=(更新ラベルのX座標累積値)/(ヒス
トグラム値)・・・・・・・・・・・(1)重心のY座
標=(更新ラベルのY座標累積値)/(ヒストグラム値
)・・・・・・ ・・・・ ・(2)ラベル付け部8は
、2値画像の各領域に暫定ラベルを付与する暫定ラベル
付け部9.2値画像について1画面分のデイレイするた
めのデイレイ用バフファ10、ベア〔暫定ラベル、更新
ラベル〕をもとに連結領域の各々の画素に付与された暫
定ラベルを更新ラベルに更新するラベル更新部11、暫
定ラベル付け部9でN域に暫定ラベルを付与した領域の
うちの連結領域の暫定ラベル同士の接続関係を整理する
接続関係整理部12、この接続関係整理部12で整理さ
れた暫定ラベル同士の直接接続を格納するラベル接続関
係格納部13、およびラベル接続関係格納部13から取
り出した暫定ラベル同士の接続関係をもとにまとめた1
つの更新ラベルを各暫定ラベルとペアにした〔暫定ラベ
ル、更新ラベル〕を生成するクラスタリング部14から
構成されるものである。
X coordinate of center of gravity = (cumulative value of X coordinate of updated label) / (histogram value) (1) Y coordinate of center of gravity = (cumulative value of Y coordinate of updated label) / (histogram (2) The labeling unit 8 is a provisional labeling unit 9 that assigns a provisional label to each area of the binary image.The labeling unit 8 delays the binary image by one screen. A delay buffer 10 for processing, a label updating unit 11 that updates the temporary label given to each pixel in the connected area to an updated label based on the bare [temporary label, updated label], and a temporary labeling unit 9 for updating the N area. A connection relationship organizer 12 organizes connection relationships between provisional labels of connected areas among areas to which provisional labels have been assigned, and a label connection relationship stores direct connections between provisional labels organized by the connection relationship organizer 12. 1 compiled based on the storage unit 13 and the connection relationships between temporary labels taken out from the label connection relationship storage unit 13
The clustering unit 14 generates [temporary labels, updated labels] in which one updated label is paired with each provisional label.

次に、第2図フローチャートに示す順序に従い、第3図
を参照しつつ第1図構成の動作を詳細に説明する。
Next, the operation of the configuration shown in FIG. 1 will be explained in detail in accordance with the order shown in the flowchart of FIG. 2 and with reference to FIG.

第2図において、■は、画素単位に取り込む。In FIG. 2, ■ is taken in pixel by pixel.

これは、第1図2値画像を暫定ラベル付け部9が画素単
位に取り込む。
In this case, the temporary labeling section 9 captures the binary image shown in FIG. 1 pixel by pixel.

■は、■で画素単位に取り込んだ2値画像をもとに、暫
定ラベル付け部9が各領域に暫定ラベルを付与する。こ
れは、例えば第3図(イ)に示すように、画素単位に取
り込んだ2値画像の領域について、ライン毎に左から右
方向に走査し、暫定ラベルを図示、1.2.3のように
付与する。そして、暫定ラベル付け部9が@で暫定ラベ
ルの付与を行うと並列に、■で暫定ラベルX座標累積部
1が付与された暫定ラベルの領域の画素単位にX座標を
累積したX座標累積値を算出、■で暫定ラベルY座標累
積部3が付与された暫定ラベルの領域の画素単位にY座
標を累積したX座標累積値を算出、■で暫定ラベルヒス
トグラム算出部5が付与された暫定ラベルの領域の画素
単位に累積したヒストグラム値を算出する。
In (2), the temporary labeling unit 9 assigns a temporary label to each area based on the binary image captured pixel by pixel in (2). For example, as shown in Fig. 3 (a), the area of the binary image captured pixel by pixel is scanned line by line from left to right, and the provisional label is shown in the diagram, as shown in 1.2.3. granted to. Then, when the provisional labeling unit 9 assigns a provisional label with @, in parallel, the provisional label Calculate the cumulative value of the X coordinate by accumulating the Y coordinate for each pixel in the area of the provisional label to which the provisional label Y coordinate accumulation unit 3 has been added in ■.The provisional label histogram calculation unit 5 has added the provisional label in ■. The histogram value accumulated for each pixel in the area is calculated.

[相]は、1画面終了したか否かを判別する。YESの
場合には、0に進む。Noの場合には、@を繰り返し行
う。
[Phase] determines whether one screen has finished. If YES, proceed to 0. If No, repeat @.

以上の処理によって、入力された2値画像の領域の画素
単位の暫定ラベルの付与と、並列にこの暫定ラベルを付
与した領域の画素のX座標累積値、X座標累積値、ヒス
トグラム値を算出する。
Through the above processing, a provisional label is assigned to each pixel of the region of the input binary image, and in parallel, the cumulative X coordinate value, cumulative X coordinate value, and histogram value of the pixels in the region to which this provisional label is given are calculated. .

第2図Oは、1画面デイレイする。この間に、[相]で
クラスクリング処理、即ち第1図クラスタリンク部14
が接続関係(例えば第3図(ロ)ニ示すような直接接続
関係を持つ暫定ラベルの接続関係)をもとに、相互に接
続している暫定ラベルに1つの更新ラベルを付与し、〔
暫定ラベル、更新ラベル〕のペアを生成する処理を行う
。このクラスタリング処理に並列に、■で〔暫定ラベル
、更新ラベル〕のペアのうちの、暫定ラベルを暫定ラベ
ルX座標累積部1に入力および更新ラベルを更新ラベル
X座標累積部2に人力し、1画面前に0で暫定ラベルX
座標累積部1で求めたX座標累積値を取り出して更新ラ
ベルX座標累積部2に入力して当該更新ラベルに対応づ
けて累積することを〔暫定ラベル、更新ラベル〕のペア
について全て行う。これにより、更新ラベルのX座標累
積値を算出する(第6図更新ラベルX座標累積テーブル
46.47に累積する)。同様に、[相]で(暫定ラベ
ル、更新ラベル〕のペアのうちの、暫定ラベルを暫定ラ
ベルY座標累積部3に入力および更新ラベルを更新ラベ
ルY座標累積部4に入力し、1画面前に[相]で暫定ラ
ベルY座標累積部3で求めたX座標累積値を取り出して
更新ラベルY座標累積部4に入力して当該更新ラベルに
対応づけて累積することを〔暫定ラベル、更新ラベル〕
のペアについて全て行う、これにより、更新ラベルのX
座標累積値を算出する。同様に、■で〔暫定ラベル、更
新ラベル〕のペアのうちの、暫定ラベルを暫定ラベルヒ
ストグラム算出部5に入力および更新ラベルを更新ラベ
ルヒストグラム算出部6に入力し、1画面前に@で暫定
ラベルヒストグラム算出部5で求めたヒストグラム値を
取り出して更新ラベルヒストグラム算出部6に入力して
当該更新ラベルに対応づけて累積することを〔暫定ラベ
ル、更新ラベル〕のペアについて全て行う。これにより
、更新ラベルのヒストグラム値を算出する。
In FIG. 2 O, there is a one-screen delay. During this time, the cluster linking process is performed in [phase], that is, the cluster linking section 14 in FIG.
gives one update label to the mutually connected provisional labels based on the connection relationship (for example, the connection relationship of temporary labels that have a direct connection relationship as shown in FIG. 3(b)-d),
Performs processing to generate a pair of [temporary label, updated label]. Parallel to this clustering process, in ■, the provisional label of the pair [temporary label, updated label] is input to the provisional label X coordinate accumulation unit 1, and the updated label is manually input to the updated label Temporary label X with 0 in front of the screen
The X-coordinate cumulative value obtained by the coordinate accumulator 1 is taken out, inputted to the updated label X-coordinate accumulator 2, and accumulated in association with the updated label for all pairs of [temporary label, updated label]. As a result, the cumulative X-coordinate value of the updated label is calculated (accumulated in the updated label X-coordinate cumulative table 46, 47 in FIG. 6). Similarly, in [Phase], of the pair (temporary label, updated label), enter the provisional label into the provisional label Y coordinate accumulation section 3, input the updated label into the updated label Y coordinate accumulation section 4, and move one screen forward. [Phase] indicates that the X-coordinate cumulative value obtained by the provisional label Y-coordinate accumulator 3 is extracted, inputted to the updated label Y-coordinate accumulator 4, and accumulated in association with the updated label. ]
This allows the updated label of X
Calculate the cumulative coordinate value. Similarly, input the provisional label of the pair [temporary label, updated label] into the provisional label histogram calculation unit 5 and input the updated label into the update label histogram calculation unit 6 in ■, and enter the provisional label with @ in the previous screen. The histogram values obtained by the label histogram calculation unit 5 are extracted, inputted to the update label histogram calculation unit 6, and accumulated in association with the updated label for all pairs of [temporary label, update label]. Thereby, the histogram value of the updated label is calculated.

以上の処理によって、クラスタリング処理によフて〔暫
定ラベル、更新ラベル〕のペアを生成すると並列に、更
新ラベルのX座標累積値、X座標累積値、ヒストグラム
値を算出する。
Through the above processing, when a pair of [temporary label, updated label] is generated by the clustering process, the X coordinate cumulative value, the X coordinate cumulative value, and the histogram value of the updated label are calculated in parallel.

第2図Oは、ラベル更新する。これは、第1図ラベル更
新部11が、〔暫定ラベル、更新ラベル〕のペアをもと
に暫定ラベルと更新ラベルの対応テーブルを作成し、こ
の対応テーブルをもとに1画面分のデイレイをさせた暫
定ラベル画像について1つの連結領域に一意のラベルを
付与したラベル画像を生成する。このラベル更新の処理
と並列に、0、[相]で第1図更新ラベル重心算出部7
が、0、[相]、■で算出した更新ラベルのX座標累積
値、Y座標累積値、ヒストグラム値をもとに、重心(X
座標)=(X座標累積値)/ヒストグラム値・・・・・
・・・・・・・・・・・・・(3)重心(Y座標)=(
Y座標累積値)/ヒストグラム値・・・・・・・・・・
・・・・・・・・(4)を求める。そして、これら求め
た重心のX座標、Y座標をMPUに渡す。
FIG. 2 O updates the label. This is because the label update unit 11 in FIG. 1 creates a correspondence table between the temporary label and the updated label based on the pair of [temporary label, updated label], and then creates a delay for one screen based on this correspondence table. A label image is generated in which a unique label is assigned to one connected region for the temporary label image. In parallel with this label update process, the update label centroid calculation unit 7 in FIG.
is the center of gravity (X
coordinates) = (X coordinate cumulative value)/histogram value...
・・・・・・・・・・・・・・・(3) Center of gravity (Y coordinate) = (
Y-coordinate cumulative value)/histogram value・・・・・・・・・・
...... Find (4). Then, the obtained X and Y coordinates of the center of gravity are passed to the MPU.

以上の処理によって、〔暫定ラベル、更新ラベル〕のペ
アをもとに暫定ラベル画像から連結領域に一意なラベル
を付与してラベル画像を生成する処理と並列に上記(3
)、(4)によって重心の座標X、Yを算出する。
Through the above processing, the above (3
), (4) calculate the coordinates X and Y of the center of gravity.

第3図は、本発明に係る連結領域の重心算出例を示す。FIG. 3 shows an example of calculating the center of gravity of a connected region according to the present invention.

第3図(イ)は、暫定ラベル画像を示す。これは、2値
画像についてライン単位に左から右側に走査しく局所的
なウィンドウで走査し)、1が現れた領域に暫定ラベル
1.2.3を順次付与したものである。
FIG. 3(A) shows a temporary label image. In this method, a binary image is scanned line by line from left to right using a local window), and provisional labels 1.2.3 are sequentially given to areas where 1 appears.

第3図(ロ)は、第3図(イ)の暫定ラベルの接続関係
を示す。ここで、■−3,2−3は暫定ラベル1と暫定
ラベル3、暫定ラベル2と暫定ラベル3が接続関係にあ
る旨を表す。
FIG. 3(b) shows the connection relationship of the provisional labels in FIG. 3(a). Here, ■-3 and 2-3 indicate that provisional label 1 and provisional label 3, and provisional label 2 and provisional label 3 are in a connection relationship.

第3図(ハ)は、対応テーブルを示す。これは、連結領
域の暫定ラベルについて1つの更新ラベルを付与した状
態で、暫定ラベルと更新ラベルとを対応づけてペア〔暫
定ラベル、更新ラベル〕を生成したものである。
FIG. 3(c) shows a correspondence table. This is a pair [temporary label, updated label] generated by associating the temporary label and the updated label with one updated label assigned to the provisional label of the connected region.

第3図(ニ)は、各領域の暫定ラベルのX座標累積値、
Y座標累積値、ヒストグラム値を算出、および更新ラベ
ルに対応づけてX座標累積値、Y座標累積値、ヒストグ
ラム値を算出した様子を示す。Xl、X2、X3は、第
1図暫定ラベルX座標累積部1が算出した暫定ラベル1
.2.3のX座標累積値である。また、X1+X2+X
3は、連結領域の暫定ラベル1.2.3をまとめた更新
ラベルAについて求めたX座標累積値である。
Figure 3 (d) shows the cumulative X-coordinate value of the provisional label of each area,
It shows how the Y-coordinate cumulative value and histogram value are calculated, and the X-coordinate cumulative value, Y-coordinate cumulative value, and histogram value are calculated in association with the updated label. Xl, X2, and X3 are the provisional label 1 calculated by the provisional label X coordinate accumulation unit 1 in FIG.
.. This is the cumulative value of the X coordinate of 2.3. Also, X1+X2+X
3 is the cumulative X-coordinate value obtained for the updated label A, which is a compilation of the provisional labels 1.2.3 of the connected region.

第3図(ホ)は、重心を表す。Figure 3 (e) represents the center of gravity.

次に、第4図から第7図のハードウェア回路によって暫
定ラベルのX座標累積値の算出(第4図、第5図)、更
新ラベルのX座標累積値の算出(第6図)、更新ラベル
の重心の算出(第7図)について順次具体的に説明する
Next, the hardware circuits shown in FIGS. 4 to 7 calculate the cumulative X-coordinate value of the temporary label (FIGS. 4 and 5), calculate the cumulative X-coordinate value of the updated label (FIG. 6), and update the Calculation of the center of gravity of the label (FIG. 7) will be explained in detail.

第4図は、暫定ラベルX座標累積部実施例回路図を示す
FIG. 4 shows a circuit diagram of an embodiment of the temporary label X-coordinate accumulator.

(1)第1図暫定ラベル付け部9からの暫定ラベル値■
を入力として、当該暫定ラベル値のX座標の累積値を求
める暫定ラベルX座標累積部(偶数フレーム)19と、
奇数フレームのときに当該暫定ラベル値のX座標の累積
値を求める暫定ラベルX座標累積部(奇数フレーム)2
0から構成され(2)第1図クラスタリング部14によ
って生成された既述した〔暫定ラベル、更新ラベル〕の
ペアのうちの、暫定ラベル値■を入力として、第4図垂
直間期信号を計数回路21で計数して偶数フレームのと
きに(SL=O)暫定ラベルX座標累積部(偶数フレー
ム)19から(1)で求めたX座標累積値について2→
1セレクタ22を介して取り出し、一方、奇数フレーム
のときに(SL=1)暫定ラベルX座標累積部(奇数フ
レーム)20から(11で求めたX座標累積値について
2→1セレクタ22を介して取り出すことを交互に繰り
返し、更新ラベルX座標累積部2に入力して、上記ペア
の更新ラベルに対応づけて累積する(第6図)。
(1) Temporary label value from temporary labeling section 9 in Figure 1 ■
a provisional label X-coordinate accumulation unit (even frame) 19 for calculating the cumulative value of the
Temporary label X-coordinate accumulation unit (odd frame) 2 that calculates the cumulative value of the X-coordinate of the provisional label value when the frame is an odd-numbered frame.
(2) Count the vertical interphase signal in FIG. 4 by inputting the provisional label value ■ of the pair of [temporary label, updated label] generated by the clustering unit 14 in FIG. When the circuit 21 counts and the frame is an even number (SL=O), the provisional label
1 selector 22, and on the other hand, when the frame is an odd number (SL=1), the provisional label This process of taking out the labels is repeated alternately, and the updated labels are inputted to the X-coordinate accumulating section 2 and accumulated in association with the above-mentioned pair of updated labels (FIG. 6).

第5図は、偶数(奇数)フレームの暫定ラベルX座標累
積部実施例回路図を示す。これは、第4図回路図の具体
的回路を示す、ここで、第4図(1)で説明した第1図
暫定ラベル付け部9からの暫定レベル値■の入力に対応
して、点線で示すルートで暫定ラベルX座標累積テーブ
ル23に暫定ラベルのX座標値を累積する。そして、次
のフレームにおいて第4図(2)で説明した第1図クラ
スクリング部14からのペア〔暫定ラベル、更新ラベル
〕のうちの、暫定ラベル値■の入力に対応して、−点鎖
線で示すルートで暫定ラベルX座標累積テーブル23に
上記(1)で累積した暫定ラベルのX累積値を取り出し
、右側から出力する(更新ラベルX座標累積部2に入力
する)。偶数フレームX座標累積部19が偶数フレーム
に対して、点数で示すルートにそって暫定ラベルのX座
標値を累積している間、奇数フレームX座標累積部20
が一点鎖線で示すルートで、暫定ラベルのX累積値を右
側から出力する。この偶数フレームの動作に続けて奇数
フレームは、暫定ラベルX座標累積部19が一点鎖線で
示すルーl−で、累積値を右側から出力し、暫定ラベル
X座標累積部20が点線ルートでX座標値を累積する。
FIG. 5 shows a circuit diagram of an embodiment of the provisional label X-coordinate accumulator for even (odd) frames. This shows the specific circuit of the circuit diagram in FIG. 4. Here, in response to the input of the provisional level value ■ from the provisional labeling section 9 in FIG. The X coordinate values of the provisional labels are accumulated in the provisional label X coordinate accumulation table 23 along the route shown. Then, in the next frame, in response to the input of the provisional label value ■ out of the pair [temporary label, updated label] from the class kling unit 14 in FIG. The X cumulative value of the provisional label accumulated in the above (1) is extracted from the provisional label X coordinate cumulative table 23 through the route shown by and outputted from the right side (inputted to the updated label X coordinate accumulator 2). While the even number frame
The X cumulative value of the provisional label is output from the right side along the route indicated by the dashed line. Following the operation of the even frames, in the odd frames, the temporary label Accumulate values.

暫定ラベルX座標累積テーブル23と暫定ラベルX座標
累積テーブル24の違いは、メモリのリードライトが1
τ(TV信号において1画素を処理する時間)内に終了
しないため、1画素おきに23と24とを切り換えて使
用する。
The difference between the provisional label X-coordinate cumulative table 23 and the provisional label
Since the processing does not end within τ (time to process one pixel in a TV signal), 23 and 24 are switched and used every other pixel.

第6図は、更新ラベルX座標累積部実施例回路図を示す
。これは、第1図更新ラベルX座標累積部2の具体的回
路例である。
FIG. 6 shows a circuit diagram of an embodiment of the updated label X-coordinate accumulator. This is a specific circuit example of the updated label X-coordinate accumulator 2 in FIG.

(1)  クラスタリング部14からのペア〔暫定ラベ
ル、更新ラベル〕のうちの、暫定ラベルを既述した第5
図暫定ラベル■を入力して一点鎖線のルートで取り出し
た累積X座標値を第6図Cの入力とし、−点鎖線のルー
トで更新ラベルX座標累積テーブル4Gに更新ラベルの
累積X座標値を累積する。この偶数フレームの動作に続
けて、奇数フレームのときに同様に更新ラベルX座標累
積テーブル47に対して行う。
(1) Of the pair [temporary label, updated label] from the clustering unit 14, the fifth label that has already described the provisional label
Input the cumulative X coordinate value of the updated label in the updated label X coordinate accumulation table 4G by inputting the provisional label ■ and taking it out along the route indicated by the dashed dotted line as input in Figure 6C. Accumulate. Following this operation for even frames, the same process is performed for the updated label X-coordinate accumulation table 47 for odd frames.

第7図は、更新ラベル重心算出部実施例回路図を示す。FIG. 7 shows a circuit diagram of an embodiment of the update label gravity center calculating section.

これは、第1図更新ラベルX座標累積部2からのX座標
累積値(第6図更新ラベルX座標累積テーブル46.4
7からのX座標累積値)を■の入力とし、第1図更新ラ
ベルY座標累積部4からのX座標累積値を[F]の入力
とし、および第1図更新ラベルヒストグラム算出部6か
らのヒストグラム値を@の入力とし、除算回路62.6
3によって、 X座標累積値[F]/ヒストグラム値@−重心(X座標
) X座標累積値[F]/ヒストグラム値@=重心(Y座標
) を算出し、MPUに渡す。
This is the X coordinate cumulative value from the updated label X coordinate accumulation unit 2 in FIG.
7) is input to ■, the X coordinate cumulative value from update label Y coordinate accumulation section 4 in FIG. 1 is input to [F], and The histogram value is input to @, and the division circuit 62.6
3, X coordinate cumulative value [F]/histogram value @-center of gravity (X coordinate) X coordinate cumulative value [F]/histogram value @=center of gravity (Y coordinate) is calculated and passed to the MPU.

以上の第4図から第7図を用いて説明したハードウェア
回路によって、暫定ラベル付け部9からの暫定ラベルに
対応して、第4図(第4図を詳細化した第5図)で暫定
ラベルのX座標累積値、更に同様の回路で暫定ラベルの
X座標累積値、ヒストグラム値を算出する0次のフレー
ムで、これら算出した暫定ラベルのX座標累積値、X座
標累積値、ヒストグラム値をクラスタリング部工4で生
成したペア〔暫定ラベル、更新ラベル〕のうちの暫定ラ
ベルによって取り出し、これを第6図で更新ラベルに対
応づけて累積した更新ラベルのX座標累積値、X座標累
積値、ヒストグラム値を算出する。更に次のフレームで
、これら算出した更新ラベルのX座標累積値、X座標累
積値、ヒストグラム値をもとに、第7図で除算して重心
のX座標、Y座標を求める。
By using the hardware circuit explained above using FIGS. 4 to 7, the temporary label in FIG. 4 (FIG. 5, which is a detailed version of FIG. In the 0th frame, the cumulative X-coordinate value of the label, and the cumulative X-coordinate value and histogram value of the temporary label are calculated using a similar circuit. The X-coordinate cumulative value, the X-coordinate cumulative value, and Calculate the histogram value. Furthermore, in the next frame, based on the calculated X-coordinate cumulative value, X-coordinate cumulative value, and histogram value of the updated label, the X-coordinate and Y-coordinate of the center of gravity are determined by dividing by FIG.

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

以上説明したように、本発明によれば、暫定ラベル付け
処理と並列にこの暫定ラベルのX座標累積値、X座標累
積値、ヒストグラム値を算出し、次のクラスタリング処
理と並列に更新ラベルのX座標累積値、X座標累積値、
ヒストグラム値を算出し、これらからX座標累積値/ヒ
ストグラム値、X座標累積値/ヒストグラム値として重
心を算出する構成を採用しているため、画像中の領域へ
の暫定ラベル付け、クラスタリング処理、ラベル更新と
並列に各wI域毎の重心の算出を行い、高速に重心を求
めることができる。
As explained above, according to the present invention, the X coordinate cumulative value, the X coordinate cumulative value, and the histogram value of this provisional label are calculated in parallel with the provisional labeling process, and the Coordinate cumulative value, X coordinate cumulative value,
Since the histogram value is calculated and the center of gravity is calculated from these as the X coordinate cumulative value/histogram value and the X coordinate cumulative value/histogram value, provisional labeling, clustering processing, and labeling of regions in the image are adopted. The center of gravity for each wI region is calculated in parallel with the update, and the center of gravity can be determined at high speed.

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

第1図は本発明の1実施例構成図 第2図は本発明に係る連結領域の重心算出回路フローチ
ャート 第3図は本発明に係る連結領域の重心算出例第4図は暫
定ラベルX座標累積部実施例回路図第5図は偶数(奇数
)フレームの暫定ラベルX座標累積部実施例回路図 第6図は更新ラベルX座標累積実施例回路図第7図は更
新ラベル重心算出部実施例回路図第8図は従来の連結領
域の重心算出回路例を示す。 図中、1:暫定ラベルX座標累積部 2:更新ラベルX座標累積部 3;暫定ラベルY座標累積部 4:更新ラベルY座標累積部 5:暫定ラベルヒストグラム算出部 6:更新ラベルヒストグラム算出部 7:更新ラベル重心算出部 8ニラベル付け部 9:暫定ラベル付け部 10;デイレイ用バッファ 11ニラベル更新部 12;接続関係整理部 +3;ラベル接続関係格納部 14:クラスクリング部
FIG. 1 is a configuration diagram of one embodiment of the present invention. FIG. 2 is a flowchart of a circuit for calculating the center of gravity of a connected region according to the present invention. FIG. 3 is an example of calculating the center of gravity of a connected region according to the present invention. Fig. 5 is a circuit diagram of an embodiment of the provisional label X-coordinate accumulation section for even (odd) frames. Fig. 6 is a circuit diagram of an embodiment of update label X-coordinate accumulation. Fig. 7 is an embodiment circuit of an update label centroid calculation section. FIG. 8 shows an example of a conventional circuit for calculating the center of gravity of connected regions. In the figure, 1: provisional label X coordinate accumulation section 2: updated label : Update label centroid calculation unit 8 Labeling unit 9 Temporary labeling unit 10; Delay buffer 11 Label updating unit 12; Connection relationship organizing unit +3; Label connection relationship storage unit 14: Class Kling unit

Claims (1)

【特許請求の範囲】 画像中の連結領域の重心を算出する重心算出回路におい
て、 画像中の各領域に暫定的なラベル(暫定ラベル)を付与
する暫定ラベル付け部(9)と、付与された暫定ラベル
の領域のX座標の累積値を算出する暫定ラベルX座標累
積部(1)と、付与された暫定ラベルの領域のY座標の
累積値を算出する暫定ラベルY座標累積部(3)と、付
与された暫定ラベルの領域のヒストグラム値を算出する
暫定ラベルヒストグラム算出部(5)とによって、画像
中の領域に暫定ラベルの付与、およびこの暫定ラベル毎
のX座標累積値、Y座標累積値、ヒストグラム値の算出
を並列に実行した後、連結領域の暫定ラベルをまとめた
ラベル(更新ラベル)を付与する処理と並列に、これら
暫定ラベルのX座標累積値、Y座標累積値、ヒストグラ
ム値の和から更新ラベルのX座標累積値、Y座標累積値
、ヒストグラム値を求め、 これらから更新ラベルのX座標累積値/ヒストグラム値
、Y座標累積値/ヒストグラム値によって重心を求める
ように構成したことを特徴とする連結領域の重心算出回
路。
[Claims] A center of gravity calculation circuit that calculates the center of gravity of connected regions in an image, comprising: a provisional labeling unit (9) that assigns a provisional label (provisional label) to each region in the image; a provisional label , a provisional label histogram calculation unit (5) that calculates the histogram value of the region of the given provisional label, assigns a provisional label to the region in the image, and calculates the cumulative X-coordinate value and cumulative Y-coordinate value for each provisional label. After calculating the histogram values in parallel, in parallel with the process of adding a label (updated label) that summarizes the provisional labels of the connected region, the cumulative X coordinate value, cumulative Y coordinate value, and histogram value of these provisional labels are calculated. The X-coordinate cumulative value, Y-coordinate cumulative value, and histogram value of the updated label are calculated from the sum, and the center of gravity is determined from the updated label's X-coordinate cumulative value/histogram value and Y-coordinate cumulative value/histogram value. Features a circuit for calculating the center of gravity of connected regions.
JP2282381A 1990-10-20 1990-10-20 Centroid calculation circuit for link area Pending JPH04156692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2282381A JPH04156692A (en) 1990-10-20 1990-10-20 Centroid calculation circuit for link area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2282381A JPH04156692A (en) 1990-10-20 1990-10-20 Centroid calculation circuit for link area

Publications (1)

Publication Number Publication Date
JPH04156692A true JPH04156692A (en) 1992-05-29

Family

ID=17651661

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2282381A Pending JPH04156692A (en) 1990-10-20 1990-10-20 Centroid calculation circuit for link area

Country Status (1)

Country Link
JP (1) JPH04156692A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0664434A1 (en) * 1994-01-20 1995-07-26 Kubo, Akio Device for finding centroid coordinates of figures

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0664434A1 (en) * 1994-01-20 1995-07-26 Kubo, Akio Device for finding centroid coordinates of figures

Similar Documents

Publication Publication Date Title
US7444013B2 (en) Method and apparatus for recovering depth using multi-plane stereo and spatial propagation
KR19990080598A (en) Method for measuring similarity using the number of matched pixels and apparatus for implementing the same
JP3770280B2 (en) 3D image display method and apparatus
EP0854441A3 (en) Method and apparatus for rapidly rendering computer generated images of complex structures
JPH07118784B2 (en) Method for detecting motion of television signals
Miyajima et al. A real-time stereo vision system with FPGA
EP2897358B1 (en) Method and apparatus for de-interlacing video
JP4646384B2 (en) Endoscope device for measurement and scale display method
JPH04156692A (en) Centroid calculation circuit for link area
JP2002159021A (en) Apparatus and method for displaying scale
KR20100029149A (en) Image signal processing apparatus
JPH10320565A (en) Image processing method and device therefor
JP2009118456A (en) Image interpolation apparatus and method
JP3135162B2 (en) Distance measuring device
JP2002153415A (en) Scale display device and method therefor
JPH07175932A (en) Image processor
JP2000213933A (en) Image processor
JPH0877353A (en) Method and device for processing information
KR100234289B1 (en) Method for matching pattern of image
JPH0222419B2 (en)
Crossley et al. Improving accuracy, robustness and computational efficiency in 3D computer vision
EP0270681A1 (en) Image processing system
JPS63198171A (en) Picture processor
JPS6318478A (en) Digital differential analyzer
JP2002222417A (en) Image processor