JPH07175932A - Image processor - Google Patents

Image processor

Info

Publication number
JPH07175932A
JPH07175932A JP5320381A JP32038193A JPH07175932A JP H07175932 A JPH07175932 A JP H07175932A JP 5320381 A JP5320381 A JP 5320381A JP 32038193 A JP32038193 A JP 32038193A JP H07175932 A JPH07175932 A JP H07175932A
Authority
JP
Japan
Prior art keywords
label
moment
temporary
coordinate
area
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.)
Withdrawn
Application number
JP5320381A
Other languages
Japanese (ja)
Inventor
Tatsunobu Satou
藤 達 信 佐
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.)
JFE Steel Corp
Original Assignee
Kawasaki Steel 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 Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP5320381A priority Critical patent/JPH07175932A/en
Publication of JPH07175932A publication Critical patent/JPH07175932A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To provide an image processor which is capable of calculating a centroid coordinate by small circuit scale at high speed. CONSTITUTION:This processor is composed of a centroid calculation circuit having a temporary labeling part 12 performing a temporary labeling for each area in an image, calculation parts 16 and 18 calculating the lengths of the X coordinate, the Y coordinate and th& picture element of an area for which the temporary labeling is performed, a label integrating part imparting a true same label to the same area and preparing a true label/temporary label correspondence table, calculation parts 30, 32 and 34 calculating the area value, the primary moment in an X direction and the primary moment in a Y direction of the area where the true same label is imparted based on the true label/ temporary label correspondence table and a centroid calculation part 36 determining a centroid by the primary moment in the X direction of the true label/the area value of the true label and the primary moment in the Y direction of the true label/the area value of the true label based on these area value, primary moment in the X direction of the true label and the primary moment in the Y direction of the true label.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は画像処理装置に関し、特
に、画像読み取り手段により所定画素からなる一走査ラ
インを単位として操作された画像パターンの重心検出を
する画像処理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus for detecting the center of gravity of an image pattern operated by an image reading means in units of one scanning line consisting of predetermined pixels.

【0002】[0002]

【従来の技術】画像処理装置を利用して外観検査を行う
場合、画像読み取り手段、例えば、テレビカメラ等から
取り込んだ複数個の散在する連結領域からなる画像デー
タを分析し、これらの連結領域毎の大きさや、位置、個
数等の識別を行っている。この際、特に大切なことは画
像の連結領域間の位置関係を掴むために、これらの画像
の連結領域毎の中心位置、即ち、画像上での重心座標を
算出することである。従って、リアルタイムに処理を行
うために連結領域毎の重心座標を小さい回路規模で、し
かも高速に算出する回路の実現が要望されている。
2. Description of the Related Art When a visual inspection is carried out by using an image processing apparatus, image data consisting of a plurality of scattered connecting areas taken from an image reading means such as a television camera is analyzed, and each connecting area is analyzed. The size, position, number, etc. are identified. At this time, what is particularly important is to calculate the center position of each of the connected regions of these images, that is, the barycentric coordinates on the image, in order to grasp the positional relationship between the connected regions of the images. Therefore, in order to perform the processing in real time, it is desired to realize a circuit that calculates the barycentric coordinates of each connected area with a small circuit size and at high speed.

【0003】従来より、上述の連結領域毎の重心座標を
算出する回路として、図7のブロック図に示すような重
心算出回路がある。同図に示す重心算出回路は、ラベル
付け部84と、ヒストグラム算出部86と、X座標値累
積部88およびY座標値累積部90と、重心算出部92
とから構成されている。まず、ラベル付け部84は、1
画面分の2値画像データが記憶されたメモリ素子から画
像データを読み出し、画像中に散在する連結領域毎に独
立にラベルを付与する。続いて、ヒストグラム算出部8
6は、ラベルが付与された連結領域毎にヒストグラム値
を算出し、X座標値累積部88は、ラベルが付与された
連結領域毎にX方向の座標値を累積加算し、Y座標値累
積部90は、ラベルが付与された連結領域毎にY方向の
座標値を累積加算する。その後、重心算出部92は、下
記の重心算出式に従って、ラベルが付与された連結領域
毎に重心のX座標値、Y座標値を算出していた。 Gxi=ΣXi /ΣAiYi=ΣYi /ΣAi ただし、G:重心座標 X:X方向座標値 Y:Y方向座標値 A:ヒストグラム値 i:ラベルを示す添え字
Conventionally, as a circuit for calculating the barycentric coordinates for each of the above-described connected regions, there is a barycentric point calculating circuit as shown in the block diagram of FIG. The center-of-gravity calculation circuit shown in the figure includes a labeling unit 84, a histogram calculation unit 86, an X coordinate value accumulation unit 88 and a Y coordinate value accumulation unit 90, and a center of gravity calculation unit 92.
It consists of and. First, the labeling unit 84
The image data is read out from the memory element in which the binary image data for the screen is stored, and labels are independently given to the respective connection areas scattered in the image. Then, the histogram calculation unit 8
6 calculates a histogram value for each connected area to which a label is attached, and an X coordinate value accumulating unit 88 cumulatively adds coordinate values in the X direction for each connected area to which a label is attached, and a Y coordinate value accumulating unit. Reference numeral 90 cumulatively adds the coordinate values in the Y direction for each connected region to which a label is attached. After that, the center-of-gravity calculation unit 92 calculates the X-coordinate value and the Y-coordinate value of the center of gravity for each of the labeled connection areas according to the following center-of-gravity calculation formula. G xi = ΣX i / ΣA i G Yi = ΣY i / ΣA i where G: barycentric coordinates X: X direction coordinate values Y: Y direction coordinate values A: histogram value i: subscript indicating a label

【0004】しかし、上述する重心算出回路は、1画面
分の2値画像データを記憶できるメモリ素子を必要とす
るので、回路規模が大きくなるという問題点があるし、
同様に、1画面分の2値画像データをメモリ素子から読
み出して、画像データからラベルが付与された連結領域
毎の重心座標を算出するまでに長時間を必要とするとい
う問題点があった。
However, the above-described center-of-gravity calculation circuit requires a memory element capable of storing one screen of binary image data, which causes a problem that the circuit scale becomes large.
Similarly, there is a problem that it takes a long time to read the binary image data for one screen from the memory element and to calculate the barycentric coordinates for each connected region to which the label is attached from the image data.

【0005】また、連結領域毎の重心座標を算出する別
な回路として、図8のブロック図に示すような、特開平
4−156692号公報に開示された重心算出回路もあ
る。同図に示す重心算出回路は、暫定ラベル付け部96
およびラベル統合部98からなるラベル付け部94と、
暫定ラベルヒストグラム算出部100および更新ラベル
ヒストグラム算出部106と、暫定ラベルX座標累積部
102および更新ラベルX座標累積部108と、暫定ラ
ベルY座標累積部104および更新ラベルY座標累積部
110と、重心算出部112とから構成されている。ま
ず、暫定ラベル付け部96は、画像中に散在する連結領
域毎に暫定的なラベルを付与する。また、暫定ラベルヒ
ストグラム算出部100は、暫定ラベルが付与された連
結領域毎にヒストグラム値を算出し、暫定ラベルX座標
累積部102は、暫定ラベルが付与された連結領域毎に
X座標値を累積加算し、暫定ラベルY座標累積部104
は、暫定ラベルが付与された連結領域毎にY座標値を累
積加算する。また、ラベル統合部98は、暫定ラベルか
ら更新ラベルへの統合化を行い、更新ラベルヒストグラ
ム算出部106は、更新ラベルが付与された連結領域毎
にヒストグラム値を算出し、更新ラベルX座標累積部1
08は、更新ラベル付けされた連結領域毎にX座標値を
累積加算し、更新ラベルY座標累積部110は、更新ラ
ベル付けされた連結領域毎にY座標値を累積加算する。
以上の動作を全て並列処理により行い、その後、重心算
出部112は、下記の重心算出式に従って、ラベルが付
与された連結領域毎に重心のX座標値、Y座標値を算出
していた。 Gxi=ΣΣXki/ΣΣAkiYi=ΣΣYki/ΣΣAki ただし、G:重心座標 X:X方向座標値 Y:Y方向座標値 A:ヒストグラム値 i:本ラベルを表す添え字 k:仮ラベルを表す添え字
Further, as another circuit for calculating the barycentric coordinates for each connected region, there is a barycenter calculating circuit disclosed in Japanese Patent Laid-Open No. 4-156692 as shown in the block diagram of FIG. The center-of-gravity calculation circuit shown in FIG.
And a labeling unit 94 including a label integration unit 98,
The provisional label histogram calculation unit 100 and the updated label histogram calculation unit 106, the provisional label X coordinate accumulation unit 102 and the updated label X coordinate accumulation unit 108, the provisional label Y coordinate accumulation unit 104 and the updated label Y coordinate accumulation unit 110, and the center of gravity. It is composed of a calculation unit 112. First, the tentative labeling unit 96 gives a tentative label to each of the connected areas scattered in the image. Further, the provisional label histogram calculation unit 100 calculates a histogram value for each connected region to which the provisional label is attached, and the provisional label X coordinate accumulation unit 102 accumulates the X coordinate value for each connected region to which the provisional label is attached. The provisional label Y coordinate accumulating unit 104 is added.
Displays the cumulative addition of the Y coordinate value for each connected area to which the provisional label is attached. Further, the label integration unit 98 integrates the provisional label into the updated label, and the updated label histogram calculation unit 106 calculates a histogram value for each connected region to which the updated label is given, and the updated label X coordinate accumulation unit. 1
Reference numeral 08 cumulatively adds the X coordinate values for each updated labeled connected area, and the updated label Y coordinate accumulating unit 110 cumulatively adds the Y coordinate values for each updated labeled connected area.
All of the above operations are performed by parallel processing, and then, the center-of-gravity calculation unit 112 calculates the X-coordinate value and the Y-coordinate value of the center of gravity for each connected region to which the label is attached, according to the following center-of-gravity calculation formula. G xi = ΣΣX ki / ΣΣA ki G Yi = ΣΣY ki / ΣΣA ki However, G: barycentric coordinate X: X-direction coordinate value Y: Y-direction coordinate value A: histogram value i: subscript representing this label k: temporary label Subscript representing

【0006】しかし、上述する重心算出回路は、暫定ラ
ベルが付与された連結領域と更新ラベルが付与された連
結領域の双方に対して、それぞれヒストグラム算出部1
00、106と、X座標累積部102、108と、Y座
標累積部104、110とを必要とするので、回路規模
が大きくなってしまうという問題点があった。
However, the above-described center of gravity calculating circuit has the histogram calculating unit 1 for both the connected area with the provisional label and the connected area with the updated label.
00, 106, the X coordinate accumulating units 102, 108, and the Y coordinate accumulating units 104, 110, there is a problem that the circuit scale becomes large.

【0007】[0007]

【発明が解決しようとする課題】本発明の目的は、前記
従来技術に基づく種々の問題点をかえりみて、画像中の
各連結領域に対する仮ラベル付けと並列して、仮ラベル
が付与された連結領域毎に走査線上でのX座標、Y座標
および画素の長さを算出し、続いて、仮ラベルが付与さ
れた各連結領域に対する本ラベル付けと並列して、本ラ
ベルが付与された連結領域毎に算出されるX方向1次モ
ーメント、Y方向1次モーメントおよび面積値に基づい
て本ラベルの重心座標を算出することにより、小さな回
路規模で高速に重心座標を算出できる画像処理装置を提
供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to solve various problems based on the above-mentioned prior art, and in parallel with provisional labeling of each concatenated region in an image, concatenation with provisional labels is performed. The X-coordinate, the Y-coordinate, and the pixel length on the scanning line are calculated for each area, and subsequently, in parallel with the main labeling for each connected area to which the temporary label is attached, the connected area to which the main label is attached Provided is an image processing apparatus capable of calculating the barycentric coordinates at high speed with a small circuit scale by calculating the barycentric coordinates of the label based on the X direction first moment, the Y direction first moment, and the area value calculated for each. Especially.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、画像中の各連結領域に仮ラベルを付与す
る仮ラベル付け部と、仮ラベルが付与された連結領域毎
の走査線上でのX座標と画素の長さを算出する仮ラベル
X座標算出部と、仮ラベルが付与された連結領域毎の走
査線上でのY座標を算出する仮ラベルY座標算出部と、
同一の連結領域に同一の本ラベルを付与し本ラベル仮ラ
ベル対応テーブルを作成するラベル統合部と、このラベ
ル統合部による画像中の各連結領域に対する本ラベル付
けと並列して、本ラベル仮ラベル対応テーブルに基づい
て同一の本ラベルが付与された画素の長さを累積し本ラ
ベルが付与された連結領域毎の面積値を算出する本ラベ
ル面積算出部と、本ラベル仮ラベル対応テーブルに基づ
いて同一の本ラベルが付与されたX座標と画素の長さか
ら本ラベルが付与された連結領域毎のX方向の1次モー
メントを算出する本ラベルX方向1次モーメント算出部
と、本ラベル仮ラベル対応テーブルに基づいて同一の本
ラベルが付与されたY座標と画素の長さから本ラベルが
付与された連結領域毎のY方向の1次モーメントを算出
する本ラベルY方向1次モーメント算出部と、本ラベル
が付与された連結領域毎に算出される面積値と本ラベル
X方向1次モーメントと本ラベルY方向1次モーメント
に基づいて、本ラベルX方向1次モーメント/本ラベル
面積値、本ラベルY方向1次モーメント/本ラベル面積
値により重心を求める重心算出部とを有する重心算出回
路を備えたことを特徴とする画像制御装置を提供するも
のである。
In order to achieve the above object, the present invention provides a temporary labeling section for providing a temporary label to each connected area in an image, and scanning for each connected area provided with a temporary label. A temporary label X-coordinate calculation unit that calculates the X-coordinate and the pixel length on the line; a temporary label Y-coordinate calculation unit that calculates the Y-coordinate on the scanning line for each connected region to which the temporary label is attached;
The label integration unit that creates the temporary label correspondence table for the real label by assigning the same real label to the same connected area and the real label provisional label in parallel with the real label labeling for each connected area in the image by the label integration unit Based on the book label temporary label correspondence table, and a book label area calculation unit that accumulates the pixel lengths to which the same book label is attached based on the correspondence table and calculates the area value for each connected region to which the book label is attached Main label X-direction first moment calculation unit that calculates the first moment in the X direction for each connected region to which the main label is attached from the X coordinate and the pixel length that are assigned the same main label. Based on the label correspondence table, the Y direction of the main label for calculating the primary moment in the Y direction for each connected region to which the main label is attached, from the Y coordinate to which the same main label is attached and the pixel length Based on the primary moment calculation unit, the area value calculated for each connected region to which this label is attached, the primary moment in the X direction of this label, and the primary moment in the Y direction of this label, the primary moment in the X direction of this label / The present invention provides an image control device comprising a center of gravity calculating circuit having a center of gravity calculating unit that obtains a center of gravity based on a main label area value, a main moment in the Y direction of the main label / a main label area value.

【0009】[0009]

【作用】本発明の画像処理装置は、画像中の各連結領域
に対する仮ラベル付けと並列して、仮ラベルが付与され
た連結領域毎に走査線上でのX座標、Y座標および画素
の長さを算出し、続いて、仮ラベルが付与された各連結
領域に対する本ラベル付けと並列して、本ラベルが付与
された連結領域毎に算出されるX方向1次モーメント、
Y方向1次モーメントおよび面積値に基づいて本ラベル
が付与された連結領域毎の重心座標を、本ラベルX方向
1次モーメント/本ラベル面積値、本ラベルY方向1次
モーメント/本ラベル面積値により算出するものであ
る。従って、本発明の画像処理装置によれば、小さな回
路規模で高速に重心座標を算出することができる。
According to the image processing apparatus of the present invention, X-coordinates, Y-coordinates, and pixel lengths on a scanning line are set in parallel for each concatenated region to which a provisional label is attached in parallel with provisional labeling of each concatenated region in an image. Then, in parallel with the main labeling for each connected area to which the temporary label is given, the X-direction first moment calculated for each connected area to which the main label is given,
The barycentric coordinates of each connected area to which this label is given based on the Y direction first moment and area value are the main label X direction first moment / this label area value, this label Y direction first moment / this label area value It is calculated by Therefore, according to the image processing apparatus of the present invention, the barycentric coordinates can be calculated at high speed with a small circuit scale.

【0010】[0010]

【実施例】本発明の画像処理装置を、添付の図面に示す
好適実施例に基づいて以下に詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The image processing apparatus of the present invention will be described in detail below based on the preferred embodiments shown in the accompanying drawings.

【0011】まず、図1に本発明の画像処理装置の一実
施例のブロック図を示す。同図に示す画像処理装置は、
仮ラベル付け部12およびラベル統合部14からなるラ
ベル付け部10と、仮ラベルX座標算出部16と、仮ラ
ベルY座標算出部18と、ディレイ用バッファ24、2
6、28と、本ラベル面積算出部30と、本ラベルX方
向1次モーメント算出部32と、Y方向1次モーメント
算出部34と、重心算出部36とから構成されている。
First, FIG. 1 shows a block diagram of an embodiment of an image processing apparatus of the present invention. The image processing device shown in FIG.
The labeling unit 10 including the temporary labeling unit 12 and the label integration unit 14, the temporary label X coordinate calculation unit 16, the temporary label Y coordinate calculation unit 18, and the delay buffers 24 and 2.
6, 28, a main label area calculation unit 30, a main label X direction first moment calculation unit 32, a Y direction first moment calculation unit 34, and a center of gravity calculation unit 36.

【0012】同図において、仮ラベル付け部12は、画
像中の連結領域毎に暫定的なラベル(仮ラベル)を付与
するものである。また、ラベル統合部14は、仮ラベル
付け部12により付与された仮ラベルにおいて、同一の
連結領域に複数個の異なる仮ラベルが付与されている場
合、これらをまとめて新たに1つのラベル(本ラベル)
を付与し、本ラベル仮ラベル対応テーブルを作成するも
のである。なお、ラベル統合部14は、特に制限的では
なく、同一連結領域に同一の本ラベルを付与できれば、
例えば、特開平4−156692号公報に開示されたよ
うな従来公知のものであっても良い。
In the figure, the temporary labeling unit 12 is for giving a temporary label (temporary label) to each connected region in an image. In addition, when a plurality of different temporary labels are given to the same connection area in the temporary label given by the temporary labeling section 12, the label integrating section 14 puts these together into a new label (book). label)
Is added to create a temporary label correspondence table for this label. Note that the label integrating unit 14 is not particularly limited, and if the same main label can be given to the same connection region,
For example, it may be a conventionally known one as disclosed in JP-A-4-156692.

【0013】続いて、仮ラベルX座標算出部16は、仮
ラベルが付与された連結領域毎に走査線上でのX座標
(Xk )と、その連結領域の画素の長さ(Rk )を算出
するものである。また、仮ラベルY座標算出部18は、
仮ラベルが付与された連結領域毎に走査線上でのY座標
(Yk )を算出するものである。
Subsequently, the temporary label X-coordinate calculation unit 16 determines the X-coordinate (X k ) on the scanning line and the pixel length (R k ) of the connected region for each connected region to which the temporary label is attached. It is to be calculated. In addition, the temporary label Y coordinate calculation unit 18
The Y coordinate (Y k ) on the scanning line is calculated for each connected region to which the temporary label is attached.

【0014】続いて、ディレイ用バッファ24、26、
28は、それぞれ仮ラベルが付与された連結領域毎に上
述のX座標(Xk )と、画素の長さ(Rk )と、Y座標
(Y k )とを、1画面の走査が終了するまで一時的に記
憶するためのメモリ素子である。例えば、FIFO(フ
ァイフォ)や、通常のRAMや、シフトレジスタ等を使
用することができる。
Subsequently, the delay buffers 24, 26,
28 is an upper area for each connected area to which a temporary label is attached.
X coordinate (Xk) And the pixel length (Rk) And the Y coordinate
(Y k) And are temporarily recorded until the scanning of one screen is completed.
It is a memory element for remembering. For example,
Use a normal RAM, shift register, etc.
Can be used.

【0015】続いて、本ラベル面積算出部30は、本ラ
ベル仮ラベル対応テーブルに基づいて、ラベル統合部1
4によって同一の本ラベルが付与された連結領域の走査
線上での画素の長さ(Rk )を累積し、本ラベルが付与
された連結領域毎に本ラベル面積値を算出するものであ
る。
Subsequently, the main label area calculating unit 30 determines the label integrating unit 1 based on the main label provisional label correspondence table.
4, the pixel lengths (R k ) on the scanning lines of the connected areas to which the same main label is added are accumulated, and the main label area value is calculated for each connected area to which the main label is added.

【0016】続いて、本ラベルX方向1次モーメント算
出部32は、本ラベル仮ラベル対応テーブルに基づい
て、ラベル統合部14によって同一の本ラベルが付与さ
れた連結領域の仮ラベルX方向1次モーメントを累積
し、本ラベルが付与された連結領域毎にX方向の1次モ
ーメント(Mxk)を次式により算出するものである。 Mxk=(Rk /2)・(2・Xk +Rk −1) また、本ラベルY方向1次モーメント算出部34は、本
ラベル仮ラベル対応テーブルに基づいて、ラベル統合部
14によって同一の本ラベルが付与された連結領域の仮
ラベルY方向1次モーメントを累積し、本ラベルが付与
された連結領域毎のY方向の1次モーメント(MYk)を
次式により算出するものである。 MYk=Rk ・Yk
Next, the primary label X-direction primary moment calculation unit 32, based on the permanent-label temporary-label correspondence table, the temporary-label X-direction primary primary of the connected region to which the same primary label is given by the label integration unit 14. The moment is accumulated, and the first moment (M xk ) in the X direction is calculated by the following formula for each connected region to which this label is given. M xk = (R k / 2) · (2 · X k + R k −1) Further, the real label Y-direction first moment calculation unit 34 is identical by the label integration unit 14 based on the real label provisional label correspondence table. The first-order moments in the Y direction of the provisional label in the connected area to which the main label is attached are accumulated, and the first moment in the Y direction (M Yk ) in each connected area to which the main label is attached is calculated by the following formula. . M Yk = R k · Y k

【0017】最後に、重心算出部36は、本ラベル面積
算出部30、本ラベルX方向1次モーメント算出部32
および本ラベルY方向1次モーメント算出部34から算
出された本ラベル面積値、X方向1次モーメントおよび
Y方向1次モーメントに基づいて、本ラベルの重心座標
(Gxi、GYi)を次式により算出するものである。
Finally, the center-of-gravity calculating unit 36 includes a main-label area calculating unit 30 and a main-label X-direction first moment calculating unit 32.
And the barycentric coordinates (G xi , G Yi ) of the present label based on the area value of the present label calculated from the Y direction first moment calculating unit 34, the X direction first moment, and the Y direction first moment. It is calculated by

【0018】[0018]

【数1】 [Equation 1]

【0019】次に、図2に示すフローチャートと図3に
示す仮ラベル画像データを用いて、図1に示す本発明の
画像処理装置の動作を説明する。
Next, the operation of the image processing apparatus of the present invention shown in FIG. 1 will be described using the flowchart shown in FIG. 2 and the temporary label image data shown in FIG.

【0020】まず、F1において1ラインを走査しなが
ら、F2において仮ラベル付け部12が2値画像データ
を画素単位に取り込む。
First, while scanning one line in F1, the temporary labeling unit 12 captures binary image data in pixel units in F2.

【0021】続いて、F1およびF2において走査線上
で画素単位に取り込んだ2値画像データに基づいて、F
3において仮ラベル付け部12が連結領域毎に仮ラベル
を付与する。これは例えば、図3の仮ラベル画像に示す
ように、画素単位に取り込んだ2値画像データの連結領
域について、走査線単位に左側から右側にかつ上側から
下側に走査して、画像が現れた領域に仮ラベルを、例え
ば、1、2、3のように順次付与していく。
Then, based on the binary image data fetched in pixel units on the scanning lines in F1 and F2, F
In 3, the temporary labeling unit 12 gives a temporary label to each connection area. For example, as shown in the temporary label image of FIG. 3, the image appears by scanning the connection area of the binary image data captured in pixel units from the left side to the right side and from the upper side to the lower side in scanning line units. Temporary labels are sequentially applied to the different regions, for example, 1, 2, and 3.

【0022】そして、F3において連結領域毎に仮ラベ
ル付けを行うのと同時に、次に述べるF4、F5の動作
を並列処理により行う。即ち、
Then, in F3, the temporary labeling is performed for each connected region, and at the same time, the operations of F4 and F5 described below are performed by parallel processing. That is,

【0023】F4において、仮ラベルX座標算出部16
が仮ラベルが付与された連結領域毎に、走査線上でのX
座標(Xk )と画素の長さ(Rk )を算出し、それぞれ
ディレイ用バッファ26、24に記憶する。F5におい
て、仮ラベルY座標算出部18が仮ラベルが付与された
連結領域毎に、走査線上でのY座標(YK )を算出し、
ディレイ用バッファ28に記憶する。
At F4, the temporary label X coordinate calculation unit 16
, X on the scanning line for each connected area with a temporary label
The coordinates (X k ) and the pixel length (R k ) are calculated and stored in the delay buffers 26 and 24, respectively. In F5, the temporary label Y-coordinate calculation unit 18 calculates the Y-coordinate (Y K ) on the scanning line for each connected region to which the temporary label is attached,
It is stored in the delay buffer 28.

【0024】以上、F3〜F5までの動作を全て並列処
理することにより、入力された2値画像データにおける
連結領域への仮ラベル付けと、この仮ラベルが付与され
た連結領域毎の走査線上でのX座標(Xk )と画素の長
さ(Rk )、走査線上でのY座標(YK )を算出し、デ
ィレイ用バッファに記憶する。なお、下記の表1は、図
3に示す仮ラベル画像に基づいて走査ライン毎に、連結
領域に仮ラベルを付与し、仮ラベルが付与された連結領
域毎のX座標と、画素の長さと、Y座標とを算出したも
のである。
As described above, all the operations from F3 to F5 are processed in parallel, so that the tentative labeling of the connected area in the input binary image data and the scanning line for each connected area to which the tentative label is attached are performed. X coordinate (X k ), pixel length (R k ), and Y coordinate (Y K ) on the scanning line are calculated and stored in the delay buffer. It should be noted that the following Table 1 shows that, for each scanning line, a temporary label is attached to the connected area based on the temporary label image shown in FIG. 3, the X coordinate of each connected area to which the temporary label is attached, and the pixel length , And Y coordinates are calculated.

【0025】[0025]

【表1】 [Table 1]

【0026】ここで、F6において、1画面の走査をす
べて終了したか否かを判別し、終了した場合には次に述
べるF9に進み、終了していない場合には上述したF1
〜F5までの動作を繰り返し行う。
Here, in F6, it is judged whether or not the scanning of one screen is completed, and when it is completed, the process proceeds to F9 described below, and when it is not completed, the above-mentioned F1 is executed.
The operations from to F5 are repeated.

【0027】次に、F9は、次の画面の走査が開始され
るまでのブランキング期間であり、F9において、ラベ
ル統合部14が画像中の各連結領域に対して、本ラベル
を付与し、本ラベル仮ラベル対応テーブルを作成する。
なお、下記の表2は、図3に示す仮ラベル画像に基づい
て作成した本ラベル仮ラベル対応テーブルを示す。これ
は、連結領域に対して1つの更新ラベル1を付与した状
態で、仮ラベルと本ラベルを対応付けしたものである。
Next, F9 is a blanking period until the scanning of the next screen is started, and in F9, the label integrating unit 14 gives the main label to each connected region in the image, Create this temporary label correspondence table.
In addition, Table 2 below shows a real label temporary label correspondence table created based on the temporary label image shown in FIG. This is a state in which the temporary label and the main label are associated with each other with one updated label 1 attached to the connected area.

【0028】[0028]

【表2】 [Table 2]

【0029】そして、F9における本ラベル付けおよび
本ラベル仮ラベル対応テーブルの作成を行うのと同時
に、以下のF10〜F12までの動作を並列処理により
行う。即ち、
Then, at the same time as the main label is attached in F9 and the main label provisional label correspondence table is created, the following operations from F10 to F12 are performed by parallel processing. That is,

【0030】F10において、仮ラベル本ラベル対応テ
ーブルを参照して、ディレイ用バッファ26、24から
それぞれX座標(Xk )と画素の長さ(Rk )を読み出
し、本ラベルX方向1次モーメント算出部32に入力
し、次式により本ラベルX方向1次モーメントを算出す
る。これを全ての本ラベルが付与された連結領域に対し
て行うことにより本ラベルのX方向の1次モーメントが
求められる。 Mxk=(Rk /2)・(2・Xk +Rk −1)
At F10, the X-coordinate (X k ) and the pixel length (R k ) are read out from the delay buffers 26 and 24 by referring to the temporary label-main label correspondence table, and the primary moment in the X direction of the main label is read. It is input to the calculation unit 32, and the primary moment in the X direction of the label is calculated by the following equation. By performing this for all connected regions to which the main label is attached, the first moment in the X direction of the main label can be obtained. M xk = (R k / 2 ) · (2 · X k + R k -1)

【0031】F11において、仮ラベル本ラベル対応テ
ーブルを参照して、ディレイ用バッファ24、28から
それぞれ画素の長さ(Rk )とY座標(YK )を読み出
し、本ラベルY方向1次モーメント算出部34に入力
し、次式により本ラベルY方向1次モーメントを算出す
る。これを全ての本ラベルが付与された連結領域に対し
て行うことにより本ラベルのY方向の1次モーメントが
求められる。 MYk=RK ・YK
At F11, by referring to the temporary label / main label correspondence table, the pixel length (R k ) and the Y coordinate (Y K ) are read from the delay buffers 24 and 28, respectively, and the main label Y-direction first moment is read. It is input to the calculation unit 34 and the primary moment in the Y direction of this label is calculated by the following equation. By performing this for all the connected regions to which the main label is given, the first moment in the Y direction of the main label can be obtained. M Yk = R K · Y K

【0032】F12において、仮ラベル本ラベル対応テ
ーブルを参照して、ディレイ用バッファ24から画素の
長さ(Rk )を読み出し、本ラベル面積算出部30に入
力し、本ラベルが付与された連結領域の面積を算出す
る。これを全ての本ラベルが付与された連結領域に対し
て行うことにより本ラベルの面積値が求められる。
In F12, the pixel length (R k ) is read from the delay buffer 24 by referring to the temporary label / main label correspondence table, and is input to the main label area calculation unit 30 to be connected with the main label. Calculate the area of the region. The area value of the main label is obtained by performing this for all the connected regions to which the main label is attached.

【0033】以上、F9〜F12までの動作を全て並列
処理することにより、本ラベル仮ラベル対応テーブルを
作成し、本ラベルが付与された連結領域毎のXおよびY
方向1次モーメントと面積値を算出する。なお、下記に
示す表3は、図3に示す仮ラベル画像に基づいて上記の
表1および表2に示すデータから本ラベルXおよびY方
向1次モーメントと本ラベル面積値とを算出したもので
ある。
As described above, all the operations from F9 to F12 are processed in parallel to create the main label provisional label correspondence table, and X and Y for each connected area to which the main label is attached.
Calculate the direction first moment and area value. In addition, Table 3 shown below is obtained by calculating the primary moments in the X and Y directions of the real label and the area value of the real label based on the data shown in Tables 1 and 2 based on the temporary label image shown in FIG. is there.

【0034】[0034]

【表3】 [Table 3]

【0035】次に、F10で本ラベルX方向1次モーメ
ント算出部32により算出された本ラベルX方向1次モ
ーメントと、F11で本ラベルY方向1次モーメント算
出部34により算出された本ラベルY方向1次モーメン
トと、F12で本ラベル面積算出部30により算出され
た本ラベル面積値に基づいて、F13およびF14にお
いて、次式により本ラベルの連結領域毎の重心座標(G
xi、GYi)を求め、これらの求められた重心のX座標、
Y座標をCPUに渡す。
Next, in F10, the primary moment in the main label X direction calculated by the primary moment in the X direction of the regular label, and in F11 the main label Y calculated by the primary moment in the Y direction of the regular label 34. Based on the direction first moment and the main label area value calculated by the main label area calculating unit 30 in F12, in F13 and F14, the barycentric coordinates (G
xi , G Yi ), and the X coordinate of the calculated center of gravity,
Pass the Y coordinate to the CPU.

【0036】[0036]

【数2】 [Equation 2]

【0037】以上の処理により、仮ラベル画像から連結
領域に一意なラベルを付与してラベル画像を生成する処
理と並列して、本ラベルが付与された連結領域毎の重心
座標(Gxi、GYi)を算出する。なお、次式は、上記の
表3に示すデータに基づく重心算出式である。
By the above processing, the barycentric coordinates (G xi , G x) of each connected area to which the main label is added are parallel to the processing of giving a unique label to the connected area from the temporary label image to generate a label image. Yi ) is calculated. The following formula is a gravity center calculation formula based on the data shown in Table 3 above.

【0038】[0038]

【数3】 [Equation 3]

【0039】次に、図4〜図6に示すハードウェア構成
回路図の一実施例により走査線上の仮ラベルが付与され
た連結領域毎に算出されたX座標、Y座標および画素の
長さに基づく本ラベルが付与された連結領域毎のX方向
1次モーメント、Y方向1次モーメント、面積値および
重心座標の算出について順次具体的に説明する。
Next, the X-coordinate, the Y-coordinate, and the pixel length calculated for each connection area provided with a temporary label on the scanning line by one embodiment of the hardware configuration circuit diagram shown in FIGS. The calculation of the X-direction primary moment, the Y-direction primary moment, the area value, and the barycentric coordinate for each connected region based on the present label will be specifically described in order.

【0040】まず、図4に示す本発明の画像処理装置の
一実施例の部分構成回路図は、本ラベル仮ラベル対応テ
ーブル54と、X方向1次モーメント算出回路38と、
Y方向1次モーメント算出回路50と、X方向1次モー
メント累積加算回路56と、Y方向1次モーメント累積
加算回路62と、本ラベル面積算出部68とから構成さ
れている。なお、X方向1次モーメント算出回路38と
X方向1次モーメント累積加算回路56とは、本ラベル
X方向1次モーメント算出部32を、同様に、Y方向1
次モーメント算出回路50とY方向1次モーメント累積
加算回路62とは、本ラベルY方向1次モーメント算出
部34を構成する。
First, the partial configuration circuit diagram of an embodiment of the image processing apparatus of the present invention shown in FIG. 4 is a temporary label correspondence table 54 for the present label, an X-direction first moment calculation circuit 38,
The Y-direction first moment calculation circuit 50, the X-direction first moment cumulative addition circuit 56, the Y-direction first moment cumulative addition circuit 62, and the present label area calculation unit 68. The X-direction first-order moment calculation circuit 38 and the X-direction first-order moment cumulative addition circuit 56 are similar to those of the label X-direction first-order moment calculation unit 32 in the Y-direction first moment.
The secondary moment calculation circuit 50 and the Y-direction primary moment cumulative addition circuit 62 form a Y-direction primary moment calculation unit 34 of the present label.

【0041】同図において、X方向1次モーメント算出
回路38は、左シフト回路40と、減算器42と、加算
器44と、乗算器46と、右シフト回路48とから構成
されている。ここで、ディレイ用バッファ26からX座
標(Xk )が読み出され、左シフト回路40に入力され
て、(2・Xk )が算出される。これと並列して、ディ
レイ用バッファ24から画素の長さ(Rk )が読み出さ
れ、減算器42に入力されて、(Rk −1)が算出され
る。続いて、これらの(2・Xk )と(Rk −1)が加
算器44に入力されて、(2・Xk +Rk −1)が算出
される。さらに、この(2・Xk +Rk −1)と画素の
長さ(Rk )が乗算器46に入力されて、{Rk ・(2
・Xk +Rk −1)}を算出される。最後に、この{R
k ・(2・Xk +Rk −1)}が右シフト回路48に入
力されて、1走査線上のX方向の1次モーメント{Rk
・(2・Xk +Rk −1)}/2が算出される。
In the figure, the X-direction first moment calculation circuit 38 is composed of a left shift circuit 40, a subtractor 42, an adder 44, a multiplier 46, and a right shift circuit 48. Here, the X coordinate (X k ) is read from the delay buffer 26, is input to the left shift circuit 40, and (2 · X k ) is calculated. In parallel with this, the pixel length (R k ) is read from the delay buffer 24 and is input to the subtractor 42 to calculate (R k −1). Subsequently, these (2 · X k ) and (R k −1) are input to the adder 44, and (2 · X k + R k −1) is calculated. Further, this (2 · X k + R k −1) and the pixel length (R k ) are input to the multiplier 46, and {R k · (2
-Xk + Rk- 1)} is calculated. Finally, this {R
k (2X k + R k -1)} is input to the right shift circuit 48, and the first moment {R k in the X direction on one scanning line is {R k.
-(2 * Xk + Rk- 1)} / 2 is calculated.

【0042】続いて、Y方向1次モーメント算出回路5
0は、乗算器52から構成されている。ここで、ディレ
イ用バッファ24から画素の長さ(Rk )が読み出さ
れ、ディレイ用バッファ28からY座標(Yk )が読み
出され、共に乗算器52に入力されて、1走査線上のY
方向の1次モーメント(Yk ・Rk )が算出される。
Subsequently, the Y-direction first moment calculating circuit 5
0 is composed of a multiplier 52. Here, the pixel length (R k ) is read from the delay buffer 24, the Y coordinate (Y k ) is read from the delay buffer 28, and the Y coordinate (Y k ) is input to the multiplier 52 together, which is on one scanning line. Y
The first moment in the direction (Y k · R k ) is calculated.

【0043】続いて、X方向1次モーメント累積加算回
路56は、累積加算器58と、メモリ回路60とから構
成されている。ここで、X方向1次モーメント算出回路
38により算出されるX方向1次モーメントと、本ラベ
ル仮ラベル対応テーブル54を参照して求められる本ラ
ベルをアドレスとするメモリ回路60からの出力データ
とが累積加算器58に入力されて、この加算結果を再度
メモリ回路60の同一メモリアドレスに書き込み、同一
の本ラベルが付与されたX方向の1次モーメントを累積
することにより、本ラベルのX方向の1次モーメントが
算出される。
Subsequently, the X-direction first-order moment cumulative addition circuit 56 comprises a cumulative adder 58 and a memory circuit 60. Here, the X-direction first-order moment calculated by the X-direction first-order moment calculation circuit 38 and the output data from the memory circuit 60 whose address is the present label obtained by referring to the present label provisional label correspondence table 54 are obtained. The addition result is input to the cumulative adder 58, the addition result is written again to the same memory address of the memory circuit 60, and the first moment in the X direction to which the same main label is given is accumulated, so that the X direction of the main label is changed. The first moment is calculated.

【0044】続いて、Y方向1次モーメント累積加算回
路62は、累積加算器64と、メモリ回路66とから構
成されている。ここで、上述の本ラベルのX方向の1次
モーメントの算出と並列して、Y方向1次モーメント算
出回路50により算出されるY方向1次モーメントと、
本ラベル仮ラベル対応テーブル54を参照して求められ
る本ラベルをアドレスとするメモリ回路66からの出力
データとが累積加算器64に入力されて、この加算結果
を再度メモリ回路66の同一メモリアドレスに書き込
み、同一の本ラベルが付与されたY方向の1次モーメン
トを累積することにより、本ラベルのY方向の1次モー
メントが算出される。
Subsequently, the Y-direction first moment cumulative addition circuit 62 is composed of a cumulative adder 64 and a memory circuit 66. Here, in parallel with the calculation of the X-direction first moment of the above label, the Y-direction first moment calculated by the Y-direction first moment calculation circuit 50,
The output data from the memory circuit 66 whose address is the present label obtained by referring to the present label provisional label correspondence table 54 is input to the cumulative adder 64, and the addition result is again applied to the same memory address of the memory circuit 66. By writing and accumulating the first moment in the Y direction to which the same main label is given, the first moment in the Y direction of the main label is calculated.

【0045】最後に、本ラベル面積算出部68は、累積
加算器70と、メモリ回路72とから構成されている。
ここで、上述の本ラベルのX方向の1次モーメントの算
出と並列して、ディレイ用バッファ24から画素の長さ
(Rk )が読み出され、本ラベル仮ラベル対応テーブル
54を参照して求められる本ラベルをアドレスとするメ
モリ回路72からの出力データとが累積加算器70に入
力されて、この加算結果を再度メモリ回路72の同一メ
モリアドレスに書き込み、同一の本ラベルが付与された
連結領域の画素の長さ(Rk )を累積することにより、
本ラベルの面積が算出される。
Finally, the present label area calculating section 68 comprises a cumulative adder 70 and a memory circuit 72.
Here, the length (R k ) of the pixel is read from the delay buffer 24 in parallel with the calculation of the X-direction first moment of the main label, and the main label provisional label correspondence table 54 is referred to. The output data from the memory circuit 72 whose address is the obtained main label is input to the cumulative adder 70, and the addition result is written again to the same memory address of the memory circuit 72, and the same main label is added to the concatenated label. By accumulating the pixel length (R k ) of the region,
The area of this label is calculated.

【0046】次に、図5は、本発明の画像処理装置の別
の実施例の部分構成回路図である。同図に示す画像処理
装置は、図4に示す画像処理装置と比較して、乗算器4
6、52と、加算器58、64とがそれぞれ共有され
て、例えば、X方向およびY方向1次モーメントの算出
を時分割等で使用することにより、図4に示す画像処理
装置よりも更に少ない部品数で構成されている。なお、
X方向およびY方向1次モーメントの入力データの切り
替えには、例えば、マルチプレクサ74、76、78等
を使用する。
Next, FIG. 5 is a partial configuration circuit diagram of another embodiment of the image processing apparatus of the present invention. The image processing apparatus shown in the figure is different from the image processing apparatus shown in FIG.
6, 52 and the adders 58, 64 are respectively shared, and by using, for example, the calculation of the X-direction and Y-direction first-order moments in a time-division manner, the number is further smaller than that of the image processing apparatus shown in FIG. It is composed of the number of parts. In addition,
For switching the input data of the X-direction and Y-direction first moments, for example, multiplexers 74, 76, 78 are used.

【0047】最後に、図6に示す本発明の画像処理装置
の重心算出部の一実施例の構成回路図は、マルチプレク
サ80と、除算回路82とから構成されている。ここ
で、本ラベルX方向1次モーメントと、本ラベルY方向
1次モーメントとがマルチプレクサ80に入力され、例
えば、時分割等により本ラベルX方向1次モーメントあ
るいは本ラベルY方向1次モーメントの一方を順次選択
出力し、このマルチプレクサ80の選択出力信号と、本
ラベル面積値とを除算回路82に入力して、次式に示す
算出式により重心を算出しCPUに渡す。
Finally, the configuration circuit diagram of an embodiment of the center of gravity calculating portion of the image processing apparatus of the present invention shown in FIG. 6 comprises a multiplexer 80 and a dividing circuit 82. Here, the primary moment in the X direction of the label and the primary moment in the Y direction of the label are input to the multiplexer 80. For example, one of the primary moment in the X direction of the label or the primary moment in the Y direction of the label is obtained by time division or the like. Are sequentially selected and output, and the selection output signal of the multiplexer 80 and the present label area value are input to the dividing circuit 82, and the center of gravity is calculated by the calculation formula shown below and passed to the CPU.

【0048】[0048]

【数4】 [Equation 4]

【0049】[0049]

【発明の効果】以上詳細に説明したように、本発明の画
像処理装置は、画像中の各連結領域に対する仮ラベル付
けと並列して、仮ラベルが付与された連結領域毎に走査
線上でのX座標、Y座標および画素の長さを算出し、続
いて、仮ラベルが付与された各連結領域に対する本ラベ
ル付けと並列して、本ラベルが付与された連結領域毎に
算出されるX方向1次モーメント、Y方向1次モーメン
トおよび面積値に基づいて本ラベルが付与された連結領
域毎の重心座標を、本ラベルX方向1次モーメント/本
ラベル面積値、本ラベルY方向1次モーメント/本ラベ
ル面積値により算出するものである。従って、本発明の
画像処理装置によれば、小さな回路規模で高速に重心座
標を算出することができる。
As described in detail above, the image processing apparatus according to the present invention is arranged in parallel with the provisional labeling of each concatenated region in an image, so that each concatenated region to which a provisional label is attached is scanned on a scanning line. The X-direction, the Y-coordinate, and the pixel length are calculated, and subsequently, in parallel with the main labeling for each connected region to which the temporary label is attached, the X direction is calculated for each connected region to which the main label is attached. The barycentric coordinates of each connected region to which this label is assigned based on the first moment, the first moment in the Y direction, and the area value are the first moment in the X direction of this label / the area value of this label, the first moment in the Y direction of this label / It is calculated based on the area value of this label. Therefore, according to the image processing apparatus of the present invention, the barycentric coordinates can be calculated at high speed with a small circuit scale.

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

【図1】本発明の画像処理装置の一実施例のブロック図
である。
FIG. 1 is a block diagram of an embodiment of an image processing apparatus of the present invention.

【図2】本発明の画像処理装置の動作を示すフローチャ
ートである。
FIG. 2 is a flowchart showing the operation of the image processing apparatus of the present invention.

【図3】仮ラベル画像の一例の平面図である。FIG. 3 is a plan view of an example of a temporary label image.

【図4】本発明の画像処理装置の一実施例の部分構成回
路図である。
FIG. 4 is a partial configuration circuit diagram of an embodiment of the image processing apparatus of the present invention.

【図5】本発明の画像処理装置の別の実施例の部分構成
回路図である。
FIG. 5 is a partial configuration circuit diagram of another embodiment of the image processing apparatus of the invention.

【図6】本発明の画像処理装置の重心算出部の一実施例
の構成回路図である。
FIG. 6 is a configuration circuit diagram of an embodiment of a centroid calculation unit of the image processing apparatus of the present invention.

【図7】従来の連結領域の重心算出回路を示すブロック
図の一例である。
FIG. 7 is an example of a block diagram showing a conventional centroid calculation circuit for connected regions.

【図8】従来の連結領域の重心算出回路を示すブロック
図の別の例である。
FIG. 8 is another example of a block diagram showing a conventional centroid calculation circuit for connected regions.

【符号の説明】[Explanation of symbols]

10 ラベル付け部 12 仮ラベル付け部 14 ラベル統合部 16 仮ラベルX座標算出部 18 仮ラベルY座標算出部 24、26、28 ディレイ用バッファ 30、68 本ラベル面積算出部 32 本ラベルX方向1次モーメント算出部 34 本ラベルY方向1次モーメント算出部 36 重心算出部 38 X方向1次モーメント算出回路 40 左シフト回路 42 減算器 44 加算器 46、52 乗算器 48 右シフト回路 50 Y方向1次モーメント算出回路 54 本ラベル仮ラベル対応テーブル 56 X方向1次モーメント累積加算回路 58、64、70 累積加算器 60、66、72 メモリ回路 62 Y方向1次モーメント累積加算回路 74、76、78、80 マルチプレクサ 82 除算回路 84 ラベル付け部 86 ヒストグラム算出部 88 X座標値累積部 90 Y座標値累積部 92 重心算出部 94 ラベル付け部 96 仮ラベル付け部 98 ラベル統合部 100 暫定ラベルヒストグラム算出部 102 暫定ラベルX座標累積部 104 暫定ラベルY座標累積部 106 更新ラベルヒストグラム算出部 108 更新ラベルX座標累積部 110 更新ラベルY座標累積部 112 重心算出部 10 Labeling Section 12 Temporary Labeling Section 14 Label Integration Section 16 Temporary Label X Coordinate Calculation Section 18 Temporary Label Y Coordinate Calculation Section 24, 26, 28 Delay Buffer 30, 68 Label Area Calculation Section 32 Primary Label X Direction Primary Moment calculation unit 34 Main label Y direction moment calculation unit 36 Centroid calculation unit 38 X direction first moment calculation circuit 40 Left shift circuit 42 Subtractor 44 Adder 46, 52 Multiplier 48 Right shift circuit 50 Y direction first moment Calculation circuit 54 Main label provisional label correspondence table 56 X direction primary moment cumulative addition circuit 58, 64, 70 Cumulative adder 60, 66, 72 Memory circuit 62 Y direction primary moment cumulative addition circuit 74, 76, 78, 80 Multiplexer 82 division circuit 84 labeling unit 86 histogram calculation unit 88 X Standard value accumulating unit 90 Y coordinate value accumulating unit 92 Centroid calculating unit 94 Labeling unit 96 Temporary labeling unit 98 Label integrating unit 100 Temporary label histogram calculating unit 102 Temporary label X coordinate accumulating unit 104 Temporary label Y coordinate accumulating unit 106 Update label Histogram calculation unit 108 Update label X-coordinate accumulation unit 110 Update label Y-coordinate accumulation unit 112 Centroid calculation unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】画像中の各連結領域に仮ラベルを付与する
仮ラベル付け部と、仮ラベルが付与された連結領域毎の
走査線上でのX座標と画素の長さを算出する仮ラベルX
座標算出部と、仮ラベルが付与された連結領域毎の走査
線上でのY座標を算出する仮ラベルY座標算出部と、同
一の連結領域に同一の本ラベルを付与し本ラベル仮ラベ
ル対応テーブルを作成するラベル統合部と、このラベル
統合部による画像中の各連結領域に対する本ラベル付け
と並列して、本ラベル仮ラベル対応テーブルに基づいて
同一の本ラベルが付与された画素の長さを累積し本ラベ
ルが付与された連結領域毎の面積値を算出する本ラベル
面積算出部と、本ラベル仮ラベル対応テーブルに基づい
て同一の本ラベルが付与されたX座標と画素の長さから
本ラベルが付与された連結領域毎のX方向の1次モーメ
ントを算出する本ラベルX方向1次モーメント算出部
と、本ラベル仮ラベル対応テーブルに基づいて同一の本
ラベルが付与されたY座標と画素の長さから本ラベルが
付与された連結領域毎のY方向の1次モーメントを算出
する本ラベルY方向1次モーメント算出部と、本ラベル
が付与された連結領域毎に算出される面積値と本ラベル
X方向1次モーメントと本ラベルY方向1次モーメント
に基づいて、本ラベルX方向1次モーメント/本ラベル
面積値、本ラベルY方向1次モーメント/本ラベル面積
値により重心を求める重心算出部とを有する重心算出回
路を備えたことを特徴とする画像処理装置。
1. A temporary labeling unit for providing a temporary label to each connected area in an image, and a temporary label X for calculating the X coordinate on the scanning line and the pixel length for each connected area to which the temporary label is added.
A coordinate calculation unit, a temporary label Y-coordinate calculation unit that calculates the Y coordinate on the scanning line for each connected region to which a temporary label is added, and the same main label is added to the same connected region In parallel with the label integration unit that creates the main label for each connected region in the image by the label integration unit, the length of the pixel to which the same main label is given based on the main label provisional label correspondence table is calculated. A book label area calculation unit that calculates an area value for each connected region to which the book label is accumulated, and a book based on the X coordinate and the pixel length to which the same book label is given based on the book label temporary label correspondence table The same main label was given based on the main label X-direction first moment calculating unit that calculates the first moment in the X direction for each labeled connected region and the main label provisional label correspondence table. A main label Y-direction first moment calculation unit that calculates the Y-direction first moment for each connected region to which the main label is attached from the coordinates and the pixel length, and is calculated for each connected region to which the main label is attached. Based on the area value, the primary moment in the X direction of the label and the primary moment in the Y direction of the label, the center of gravity is determined by the primary moment in the X direction of the label / actual area of the label, and the primary moment in the Y direction of the label / actual area of the label. An image processing apparatus comprising a center of gravity calculating circuit having a center of gravity calculating unit for obtaining.
JP5320381A 1993-12-20 1993-12-20 Image processor Withdrawn JPH07175932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5320381A JPH07175932A (en) 1993-12-20 1993-12-20 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5320381A JPH07175932A (en) 1993-12-20 1993-12-20 Image processor

Publications (1)

Publication Number Publication Date
JPH07175932A true JPH07175932A (en) 1995-07-14

Family

ID=18120843

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5320381A Withdrawn JPH07175932A (en) 1993-12-20 1993-12-20 Image processor

Country Status (1)

Country Link
JP (1) JPH07175932A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000049569A1 (en) * 1999-02-19 2000-08-24 Nippon Chemi-Con Corporation Method for extracting feature of binary image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000049569A1 (en) * 1999-02-19 2000-08-24 Nippon Chemi-Con Corporation Method for extracting feature of binary image
US6973259B1 (en) 1999-02-19 2005-12-06 Nippon Chemi-Con Corporation Method for extracting feature of binary image

Similar Documents

Publication Publication Date Title
US6035075A (en) Image deforming method and apparatus
JPH07175932A (en) Image processor
JPH08125844A (en) Image processing method and image processing system using the method
JPH08320932A (en) Image processor
JPH0795345B2 (en) Image processing method
JP2924528B2 (en) Labeling processing method and labeling processing apparatus
JP3333050B2 (en) Shape measuring method and shape measuring device
JP2001175852A (en) Method and device for convolution processing
JPH056431A (en) Detector for feature point of contour line
JPH10162138A (en) Image processing method
JP2962148B2 (en) Image processing device
JPH10334244A (en) Stereo matching device
JP2806436B2 (en) Arithmetic circuit
JPH0214387A (en) Plural peak points detecting system
KR0173246B1 (en) Apparatus for processing binary image projection
JP2838815B2 (en) Image data processing device
JP3317066B2 (en) Image processing device
JP2536183B2 (en) Image processing method and apparatus
JPH0120469B2 (en)
JPS58200369A (en) Picture processor
JPS62168290A (en) Image recognizing device
JPH01298481A (en) Picture display device
JPH0918749A (en) Successive residue retrieval method for image data
JPS6057472A (en) Projection histogram count circuit
JPH0625658B2 (en) Three-dimensional measuring device for line segment using bit plane

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010306