JP3368511B2 - Apparatus and method for extracting connected area - Google Patents

Apparatus and method for extracting connected area

Info

Publication number
JP3368511B2
JP3368511B2 JP18937594A JP18937594A JP3368511B2 JP 3368511 B2 JP3368511 B2 JP 3368511B2 JP 18937594 A JP18937594 A JP 18937594A JP 18937594 A JP18937594 A JP 18937594A JP 3368511 B2 JP3368511 B2 JP 3368511B2
Authority
JP
Japan
Prior art keywords
label
circumscribed rectangle
rectangle
circumscribed
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP18937594A
Other languages
Japanese (ja)
Other versions
JPH0855219A (en
Inventor
聡 直井
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 JP18937594A priority Critical patent/JP3368511B2/en
Priority to KR1019950013888A priority patent/KR100228618B1/en
Publication of JPH0855219A publication Critical patent/JPH0855219A/en
Priority to US08/959,712 priority patent/US6081618A/en
Application granted granted Critical
Publication of JP3368511B2 publication Critical patent/JP3368511B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は,2値画像において1つ
に繋がった連結領域を抽出し,その連結領域に基づいて
ラベル画像情報を作成する連結領域抽出装置及び方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a connected area extracting apparatus and method for extracting connected areas connected in a binary image and creating label image information based on the connected areas.

【0002】近年,連結領域を抽出するラベリング手法
は,画像を解析して画像中から文字や図形等を抽出する
手段として重要になっている。例えば,手書き文字認識
装置(optical character reader:OCR)において
は,複数文字から個々の文字を切り出す手段として,そ
の前処理部にラベリングが使用されている。さらに,検
査や監視を目的とした画像処理の応用システムに幅広く
実現されている。
In recent years, a labeling method for extracting connected regions has become important as a means for analyzing an image and extracting characters, figures, etc. from the image. For example, in a handwritten character recognition device (optical character reader: OCR), labeling is used in the preprocessing unit as a means for cutting out individual characters from a plurality of characters. Furthermore, it has been widely implemented in image processing application systems for inspection and monitoring.

【0003】[0003]

【従来の技術】図23は従来方法を説明する図である。全
図を通して,同一符号は同一又は同様な構成要素を示
す。
2. Description of the Related Art FIG. 23 is a diagram for explaining a conventional method. Throughout the drawings, the same reference numerals indicate the same or similar components.

【0004】従来方法において,ラベリング処理部は入
力の2値画像データから連結成分(2値画像において1
つに繋がった画像の成分,図では3つの連結成分が存在
する)を算出し,各連結成分ごとにラベル(図では1,
2,3のラベル)を付けたラベル画像をラベル画像格納
部に格納して記憶する。それらを後段の処理で活用し
て,たとえば,画像解析や文書画像処理を行う。このラ
ベリング処理については,たとえば,「ラスタ走査型ラ
ベリング処理方式」(特願平03−206574),
「ラベリング処理方式」(特願平05−237552)
が公知である。
In the conventional method, the labeling processing unit converts the connected binary image data from the connected component (1 in the binary image).
The components of the image that are connected to each other (three connected components exist in the figure) are calculated, and a label (1, 1,
The label images with the labels (2, 3) are stored and stored in the label image storage unit. By utilizing them in the subsequent processing, for example, image analysis and document image processing are performed. Regarding this labeling processing, for example, “Raster scanning type labeling processing method” (Japanese Patent Application No. 03-206574),
"Labeling processing method" (Japanese Patent Application No. 05-237552)
Is known.

【0005】[0005]

【発明が解決しようとする課題】従来方法では,入力の
2値画像データから連結成分にラベル付けしたラベル画
像データを記憶するので,ラベル画像に要する記憶容量
は2値画像の連結成分の数に比例して増大する。例え
ば,255個のラベルを付けるとすると,1画素あたり
8ビットを必要とし,入力の2値画像は1ビット/画素
であるので,データ量が1画像全体の画素数の8倍にも
なる。即ち,1画像内の画素数をnとすると,8nビッ
トの記憶容量を必要とする。
In the conventional method, since label image data in which connected components are labeled from the input binary image data is stored, the storage capacity required for the label image is equal to the number of connected components of the binary image. Increase proportionally. For example, if 255 labels are attached, each pixel requires 8 bits, and since the input binary image has 1 bit / pixel, the data amount becomes 8 times the number of pixels of the entire image. That is, assuming that the number of pixels in one image is n, a storage capacity of 8n bits is required.

【0006】一般の画像処理ではラベル数は,通常,2
55よりもかなり多く,例えば,64K(K=102
4)又は4G(G=10243)にもなる。このとき,1
画素あたり16ビット,あるいは,32ビットが必要に
なり,その分,データ量も,それぞれ,1画像全体の画
素数の16倍,32倍になる。
In general image processing, the number of labels is usually 2
Considerably more than 55, for example 64K (K = 102
4) or 4G (G = 1024 3 ). At this time, 1
16 bits or 32 bits are required for each pixel, and accordingly, the data amount is 16 times and 32 times the number of pixels of one image as a whole, respectively.

【0007】上記のように従来方法によると,入力の2
値画像からラベリング処理をするときに膨大の記憶容量
を必要とするという問題点があった。特に,汎用プロセ
ッサでラベリング処理を実現するとき,記憶容量不足,
処理速度が著しく低下するなど問題があった。
As described above, according to the conventional method, the input 2
There is a problem that a huge storage capacity is required when performing the labeling process from the value image. In particular, when the labeling process is implemented on a general-purpose processor, the storage capacity is insufficient,
There was a problem that the processing speed was significantly reduced.

【0008】本発明は,画像解析,文書画像処理等を行
う画像処理装置へ少ない記憶容量で経済的に,ラベル画
像情報を出力することができる連結領域の抽出装置及び
方法を提供することを目的とする。
It is an object of the present invention to provide a connected area extracting apparatus and method capable of economically outputting label image information to an image processing apparatus for image analysis, document image processing, etc. with a small storage capacity. And

【0009】[0009]

【課題を解決するための手段】図1は本発明の原理ブロ
ック図を示す。2値画像記憶手段は入力された2値画像
データを記憶する手段,外接矩形算出手段は2値画像デ
ータから連結成分の外接矩形を算出し各外接矩形にラベ
ルを付して記憶する手段,重なり判定手段は外接矩形算
出手段によって算出された各外接矩形について他の外接
矩形との重なりの有無を判定する手段,ラベリング手段
は重なり判定手段によって重なり有と判定された外接矩
形にラベリング処理を行って,そのラベル画像を作成す
る手段,細分割手段はラベリング手段によって作成され
たラベル画像の外接矩形を親として,その内部に含まれ
るラベルを基に子の外接矩形に細分割し,さらに子の外
接矩形を内部に含まれるラベル数が単一になるまで細分
割する操作を繰り返し,ラベル数が単一になったときの
各々の子の外接矩形の座標を求める手段,出力手段は2
値画像記憶手段に記憶された2値画像と,重なり判定手
段によって重なり無と判定された外接矩形の座標と,細
分割手段によって求められた親及び各々の子の外接矩形
とから成るデータを出力する手段である。
FIG. 1 shows a block diagram of the principle of the present invention. The binary image storage means stores the input binary image data, and the circumscribed rectangle calculation means calculates the circumscribed rectangle of the connected component from the binary image data, labels each circumscribed rectangle, and stores the circumscribed rectangle. The determining means determines whether or not each circumscribing rectangle calculated by the circumscribing rectangle calculating means is overlapped with another circumscribing rectangle, and the labeling means performs labeling processing on the circumscribing rectangle determined to be overlapped by the overlap determining means. , The means for creating the label image and the subdivision means subdivide the circumscribed rectangle of the label image created by the labeling means into the circumscribed rectangle of the child based on the label contained inside, and further circumscribe the child. Repeatedly subdivide the rectangle until the number of labels contained inside becomes single, and find the coordinates of the circumscribed rectangle of each child when the number of labels becomes single. Means, output means 2
Output data consisting of the binary image stored in the value image storage means, the coordinates of the circumscribing rectangle determined to be non-overlapping by the overlap determining means, and the circumscribing rectangle of the parent and each child determined by the subdivision means. Is a means to do.

【0010】[0010]

【作用】ラベル画像情報に基づいて画像処理を行う画像
処理装置に対して,入力された画面の2値画像データか
ら画素の連結領域を抽出し,その情報を一画面のラベル
画像情報として出力する連結領域の抽出装置において,
2値画像記憶手段は入力された2値画像データを記憶
し,外接矩形算出手段は2値画像データから連結成分の
外接矩形を算出し各外接矩形にラベルを付して記憶す
る。重なり判定手段は外接矩形算出手段によって算出さ
れた各外接矩形について他の外接矩形との重なりの有無
を判定し,ラベリング手段は重なり判定手段によって重
なり有と判定された外接矩形にラベリング処理を行っ
て,そのラベル画像を作成する。細分割手段はラベリン
グ手段によって作成されたラベル画像の外接矩形を親と
して,その内部に含まれるラベルを基に子の外接矩形に
細分割し,さらに子の外接矩形を内部に含まれるラベル
数が単一になるまで細分割する操作を繰り返し,ラベル
数が単一になったときの各々の子の外接矩形の座標を求
める。出力手段は2値画像記憶手段に記憶された2値画
像と,重なり判定手段によって重なり無と判定された外
接矩形の座標と,細分割手段によって求められた親及び
各々の子の外接矩形とから成るデータを出力する。従っ
て,画像処理装置は出力手段から出力されたデータに基
づいて一画面のラベル画像情報を再現して画像処理を行
うことができる。
In the image processing apparatus which performs the image processing based on the label image information, the connected area of the pixels is extracted from the input binary image data of the screen and the information is output as the label image information of one screen. In the connected area extraction device,
The binary image storage means stores the inputted binary image data, and the circumscribed rectangle calculation means calculates the circumscribed rectangle of the connected component from the binary image data, labels each circumscribed rectangle and stores it. The overlap determination means determines whether or not each circumscribed rectangle calculated by the circumscribed rectangle calculation means overlaps with other circumscribed rectangles, and the labeling means performs labeling processing on the circumscribed rectangles determined to have overlap by the overlap determination means. , Create the label image. The subdivision means subdivides the circumscribed rectangle of the label image created by the labeling means into the circumscribed rectangle of the child based on the label contained therein, and further divides the circumscribed rectangle of the child into the number of labels contained inside. Repeat the subdividing operation until the number of labels becomes one, and find the coordinates of the circumscribed rectangle of each child when the number of labels becomes unity. The output means is based on the binary image stored in the binary image storage means, the coordinates of the circumscribing rectangle determined to have no overlap by the overlap determining means, and the circumscribed rectangle of the parent and each child determined by the subdivision means. Output data consisting of Therefore, the image processing device can perform the image processing by reproducing the label image information of one screen based on the data output from the output means.

【0011】[0011]

【実施例】図2は本発明の原理を説明する概要図であ
る。 (1) 入力2値画像から,2値画像において1つに繋がっ
た画像の成分である連結成分を抽出する。 (2) 抽出された連結成分内にさらに他の連結成分が含ま
れるときは,前記抽出された連結成分(2-1) をその内部
に含まれる各連結成分(2-2, 2-3)の領域に細分割す
る。 (3) ラベルに基づいて,各細分割された領域がどの連結
成分のものか判定する。 (4) 前記抽出された連結成分を細分割された領域の和,
差等の算術式で表現して記憶する。
FIG. 2 is a schematic diagram for explaining the principle of the present invention. (1) From the input binary image, the connected component, which is the component of the image connected to one in the binary image, is extracted. (2) When the extracted connected component further contains other connected components, each connected component (2-2, 2-3) containing the extracted connected component (2-1) inside Subdivided into regions. (3) Determine which connected component each subdivided region is based on the label. (4) Sum of regions obtained by subdividing the extracted connected component,
It is expressed by an arithmetic expression such as a difference and stored.

【0012】このように,一画面全体のラベル,又は他
の連結成分と重なり部を有する連結成分のラベル画像を
記憶した従来方式と違って,本発明は連結成分が細分割
された領域の和,差等で表すことによって,記憶するラ
ベル画像その数を減少もしくは皆無にするように構成す
る。
As described above, unlike the conventional method in which the label image of the entire screen or the label image of the connected component having the overlapping portion with other connected components is stored, the present invention is the sum of the regions where the connected component is subdivided. , The number of label images to be stored is reduced or eliminated by representing the difference.

【0013】図3は本発明の第1の実施例の概要を説明
するフローチャートである。 (1) 入力される2値画像データにラベリング処理〔「ラ
ベリング処理方式」(特願平05−237552)〕を
施して,連結したパターン(連結成分)ごとにそれらを
区別するラベルが付いた,その連結したパターンの外接
矩形を求める。(外接矩形の意味は画面上の座標及び/
又はラベルをその属性として含むことがある。) (2) 各ラベルの外接矩形がお互いに重なっているかどう
か判定する。 (3) 判定結果に基づいて重なっていないラベルに対して
は,重なっていないラベル(番号)とその外接矩形の対
応関係を記憶する。 (4) 重なっているラベルについては,重なり注目ラベル
内再外接矩形算出部は注目するラベル内の画像に対して
再び連結パターンごとの外接矩形を算出する。 (5) 注目ラベルの外接矩形は再外接矩形算出のための画
像サイズと一致することから,重なり注目ラベル以外の
ラベルの外接矩形(以下,この外接矩形のことを雑音外
接矩形という)を算出する。 (6) 雑音外接矩形内に含まれる複数個の連結パターンが
1つであるか否かを確認する。具体的には,各雑音外接
矩形内の画像を対象として,再び連結パターンの外接矩
形を算出し,その外接矩形の数から単一ラベルか否かを
確認する。 (7) 複数個の雑音外接矩形がすべて単一ラベルの場合に
は,それらの雑音外接矩形を重なり注目ラベル内の雑音
矩形として記憶しておく。こうして,ラベル画像を復元
するときには,重なり注目ラベルの外接矩形から雑音外
接矩形を除いた領域が重なり注目ラベルの領域となる。 (8) 複数個の雑音外接矩形が一つでも単一ラベル(即
ち,注目ラベルと同一ラベル)でない場合,重なり注目
ラベル内のラベル画像を記憶する。このラベル画像は重
なり注目ラベルの矩形内画像に対してラベリング処理を
行って算出するが,前記(4) の外接矩形の算出の際に,
ラベル画像の記憶を同時に行ってもよい。このように本
実施例は連結パターンを外接矩形だけでなく,ラベル画
像と共に表現して出力する。このようにして出力された
外接矩形及びラベル画像に基づいて,画像処理装置は画
像解析,文書画像処理等を行う。
FIG. 3 is a flow chart for explaining the outline of the first embodiment of the present invention. (1) Labeling processing [“Labeling processing method” (Japanese Patent Application No. 05-237552)] is applied to the input binary image data, and a label for distinguishing them is attached for each connected pattern (connected component). The circumscribed rectangle of the connected pattern is calculated. (The meaning of the circumscribed rectangle is the coordinates on the screen and /
Or it may include a label as its attribute. (2) Determine whether the circumscribed rectangles of each label overlap each other. (3) For the non-overlapping labels based on the judgment result, the correspondence between the non-overlapping labels (number) and its circumscribed rectangle is stored. (4) For overlapping labels, the re-circumscribing rectangle in the overlapping label-of-interest label calculates the circumscribing rectangle of each concatenated pattern again for the image in the label of interest. (5) Since the circumscribed rectangle of the label of interest matches the image size for re-circumscribed rectangle calculation, the circumscribed rectangles of labels other than the overlapping label of interest (hereinafter, this circumscribed rectangle is referred to as a noise circumscribed rectangle) are calculated. . (6) It is confirmed whether or not there is one connecting pattern included in the noise circumscribing rectangle. Specifically, the circumscribed rectangle of the connected pattern is calculated again for the image in each noise circumscribed rectangle, and whether or not there is a single label is confirmed from the number of circumscribed rectangles. (7) If all noise circumscribed rectangles are single labels, those noise circumscribed rectangles are overlapped and stored as noise rectangles in the label of interest. In this way, when the label image is restored, the area obtained by removing the noise circumscribing rectangle from the circumscribed rectangle of the overlapping target label becomes the overlapping target label area. (8) If at least one noise circumscribed rectangle is not a single label (that is, the same label as the target label), the label image in the overlapping target label is stored. This label image is calculated by performing labeling processing on the rectangular image of the overlapping label of interest. When calculating the circumscribed rectangle in (4) above,
The label images may be stored at the same time. As described above, in the present embodiment, not only the circumscribing rectangle but also the label image is represented and the connection pattern is output. Based on the circumscribed rectangle and the label image output in this way, the image processing device performs image analysis, document image processing, and the like.

【0014】図4は本発明の第1の実施例を説明するブ
ロック図である。図4に基づいて,以下に詳細を説明す
る。ラベリング処理部2aは,例えば,前述の「ラベリン
グ処理方式」に基づいてラベリング処理を実行する。そ
の処理結果の一例を図5,図6,図7に示す。図5はラ
ベル画像を説明する図であって,2値画像における各連
結成分は,その区別がつくように左上から順番に番号
(ラベル)が付けられる。図6は全ラベル数を格納する
ラベル数格納領域22a を示し,付けられたラベル番号の
最大値,すなわち,最大ラベル値が格納される。図7は
外接矩形格納領域23a を示し,各ラベルを外接する矩形
の左上と右下の座標データが格納される。
FIG. 4 is a block diagram for explaining the first embodiment of the present invention. Details will be described below with reference to FIG. The labeling processing unit 2a executes the labeling processing based on, for example, the "labeling processing method" described above. Examples of the processing results are shown in FIGS. 5, 6 and 7. FIG. 5 is a diagram for explaining a label image, and each connected component in the binary image is numbered (labeled) in order from the upper left so that the connected components can be distinguished. FIG. 6 shows a label number storage area 22a for storing the total number of labels, and stores the maximum value of the assigned label numbers, that is, the maximum label value. FIG. 7 shows the circumscribed rectangle storage area 23a, in which the coordinate data of the upper left and lower right of the rectangle circumscribing each label is stored.

【0015】外接矩形の重なり判定部3aは,図15のフロ
ーチャート(外接矩形重なりの判定方法の一例を示す)
に従って,相手の外接矩形の頂点が注目している外接矩
形内に包含されるか否かに基づいて外接矩形の重なりの
判定を行う。図8は外接矩形重なりテーブル31a を示
し,各ラベルの外接矩形の重なりの有無と重なっている
相手のラベルを表形式で格納する。
The circumscribed rectangle overlap determination unit 3a is a flowchart of FIG. 15 (shows an example of a circumscribed rectangle overlap determination method).
According to the above, it is determined whether the circumscribed rectangles overlap with each other based on whether or not the vertices of the circumscribed rectangle of the other party are included in the circumscribed rectangle of interest. FIG. 8 shows the circumscribing rectangle overlapping table 31a, which stores the presence or absence of overlapping of the circumscribing rectangles of the respective labels and the label of the overlapping partner in a table format.

【0016】非重なり部外接矩形記憶部4aは,前記作成
された外接矩形重なりテーブル31aを用いて,重ならな
い外接矩形のみを非重なり部外接矩形格納領域41a (図
9参照)に格納する。
The non-overlapping part circumscribing rectangle storage unit 4a stores only non-overlapping circumscribing rectangles in the non-overlapping part circumscribing rectangle storage area 41a (see FIG. 9) using the created circumscribing rectangle overlapping table 31a.

【0017】重なり部再外接矩形算出部5aは,先ず重な
り部領域内に対して再び各連結成分の外接矩形を算出
し,それを重なり部再外接矩形格納領域51a(詳細は図10
参照)に格納する。例えば,図11におけるラベル3に対
しては,左上座標(X131,Y131)及び右下座標(X231,
Y231)の外接矩形と,左上座標(X132,Y132)及び右下
座標(X232,Y232)の外接矩形とを格納する。
The overlapping part re-circumscribing rectangle calculating unit 5a first calculates the circumscribing rectangle of each connected component again in the overlapping part region, and stores it in the overlapping part re-circumscribing rectangle storage region 51a (see FIG. 10 for details).
(See Reference). For example, for label 3 in FIG. 11, upper left coordinates (X131, Y131) and lower right coordinates (X231,
The circumscribed rectangle of Y231) and the circumscribed rectangle of upper left coordinates (X132, Y132) and lower right coordinates (X232, Y232) are stored.

【0018】重なり部注目ラベル外の雑音外接矩形算出
部6aは,外接矩形格納領域23a に格納された注目ラベル
の外接矩形と,重なり部再外接矩形格納領域51a に格納
された外接矩形との一致を調べることにより注目ラベル
以外の外接矩形を見つける。不一致のときは注目ラベル
以外の外接矩形として,図10の重なり部再外接矩形格納
領域の注目ラベルの欄をNoとする。ラベル3について
は,左上座標(X132,Y132)及び右下座標(X232,Y23
2)の外接矩形がこれに該当する。
The noise circumscribing rectangle calculating unit 6a outside the overlapping portion attention label matches the circumscribing rectangle of the attention label stored in the circumscribing rectangle storage area 23a with the circumscribing rectangle stored in the overlapping portion recircumscribing rectangle storage area 51a. Find a circumscribed rectangle other than the label of interest by examining. If they do not match, the circumscribing rectangle other than the target label is set, and the column of the target label in the overlapping part recircumscribing rectangle storage area in FIG. 10 is set to No. For label 3, upper left coordinates (X132, Y132) and lower right coordinates (X232, Y23)
The circumscribed rectangle of 2) corresponds to this.

【0019】雑音外接矩形内単一ラベル確認処理部7a
は,注目ラベル以外の外接矩形内で,再度,連結成分の
外接矩形を算出し,連結成分が一つであれば,図10の重
なり部再外接矩形格納領域の単一ラベルの欄をYes とす
る。図11におけるラベル3では,注目する外接矩形〔左
上座標(X132,Y132)及び右下座標(X232,Y232)〕内
に4と3の2つのラベルが存在するため単一ラベルの欄
はNoとなる。一方,図12におけるラベル5については,
注目ラベル以外の外接矩形〔左上座標(X152,Y152)及
び右下座標(X252,Y252)内に同一の6のラベルしかな
いため,連結成分は1つであって単一ラベルの欄はYes
となる。
Single label confirmation processing unit 7a in a rectangle circumscribing noise
Calculates the circumscribed rectangle of the connected component again in the circumscribed rectangle other than the label of interest, and if the connected component is one, the single label column of the overlapping part recircumscribed rectangle storage area in FIG. To do. In Label 3 in Figure 11, there are two labels 4 and 3 in the circumscribing rectangle of interest [upper left coordinates (X132, Y132) and lower right coordinates (X232, Y232)], so the single label column is No. Become. On the other hand, for label 5 in FIG.
Since there are only 6 identical labels in the circumscribed rectangles other than the label of interest [the upper left coordinates (X152, Y152) and the lower right coordinates (X252, Y252), there is one connected component and the single label column is Yes.
Becomes

【0020】重なり注目ラベルの外接矩形記憶部8aは,
重なり注目ラベルの外接矩形を重なり部外接矩形格納領
域89a(図13参照)に記憶すると共に,図10の表で単一ラ
ベルの欄がYes の注目ラベル以外の外接矩形を記憶す
る。
The circumscribed rectangle storage unit 8a of the overlapping attention label is
The circumscribing rectangle of the overlapping attention label is stored in the overlapping portion circumscribing rectangle storage area 89a (see FIG. 13), and the circumscribing rectangles other than the attention label of which the single label column is Yes in the table of FIG. 10 are stored.

【0021】重なり注目ラベルのラベル画像記憶部8a
は,図10の表で単一ラベルの欄がNoの注目ラベルに対し
て,そのラベル画像をラベル画像格納領域89a に記憶
(図14参照)すると共に,図13の重なり部外接矩形格納
領域にラベル画像が記憶された記憶場所の先頭アドレス
を記憶する。重なり部のラベル画像はラベル画像格納ワ
ーク領域21a から重なり部の外接矩形で切りだし,か
つ,注目のラベル以外のラベルを0にして記憶される
(図14,記憶するラベル画像(1) 参照)。さらに,ラベ
ル画像のデータ量を圧縮するために.注目のラベルは1
に,それ以外を0にして1バイト又は1語にビット詰め
で記憶してもよい。
A label image storage unit 8a for overlapping attention labels
Is stored in the label image storage area 89a (see FIG. 14) for the target label of which the single label column is No in the table of FIG. 10 (see FIG. 14), and in the overlapping portion circumscribed rectangle storage area of FIG. The head address of the storage location where the label image is stored is stored. The label image of the overlapping portion is cut out from the label image storage work area 21a by the circumscribed rectangle of the overlapping portion, and the labels other than the label of interest are stored as 0 (see FIG. 14, label image (1) to be stored). . Furthermore, in order to compress the data amount of the label image. The label of interest is 1
Alternatively, bits other than the above may be set to 0 and stored in 1 byte or 1 word by packing bits.

【0022】以上の処理を行った後,最終的に,図6,
9,13,14に示されるデータのみを記憶する(2値画像
は当然記憶すると仮定している)。これらの記憶された
データを用いてラベル画像を復元するときには、非重な
り部に対しては図9の外接矩形の座標値を用いて2値画
像から切りだし,1を注目ラベルに置き換える。また,
重なり部に対しては,ラベル画像の先頭アドレスと単一
ラベル外接矩形の欄が「無」の場合,非重なり部と同様
に復元する。単一ラベル外接矩形が有る場合には,非重
なり部と同様な復元に加え,単一ラベル矩形内の画素値
を0にする。ラベル画像の先頭アドレスが有る場合に
は,図9の外接矩形の座標値と図14のラベル画像(1) で
復元する。もし,ラベル画像(2) で圧縮した場合には,
1を注目ラベルに置き換えてラベル画像を復元する。
After performing the above processing, finally, as shown in FIG.
Only the data shown at 9, 13, and 14 are stored (it is assumed that binary images are stored naturally). When the label image is restored using these stored data, the non-overlap portion is cut out from the binary image using the coordinate values of the circumscribed rectangle in FIG. 9, and 1 is replaced with the label of interest. Also,
When the head address of the label image and the column of the single-label circumscribing rectangle are “none”, the overlapping portion is restored in the same manner as the non-overlapping portion. When there is a single-label circumscribed rectangle, the pixel value in the single-label rectangle is set to 0, in addition to the restoration similar to the non-overlapping part. When the head address of the label image is present, the coordinate values of the circumscribing rectangle in FIG. 9 and the label image (1) in FIG. 14 are used for restoration. If compressed with label image (2),
Replace 1 with the label of interest and restore the label image.

【0023】ここで,図15のフローチャートに基づい
て,外接矩形重なり判定部4aによる外接矩形の重なりの
有無の判定について説明する。判定方法は,相手の外接
矩形jの頂点が注目している外接矩形i内に包含される
か否かに基づいて判定が行われる。先ず,iを1に固定
し,jをj=1〜m(mは外接矩形の総数)に変化さ
せ,個々のjについて外接矩形jの頂点が外接矩形i内
に包含されるか否かを判定する。次に,iを1だけ増加
し(i=2),jをj=1〜mに変化させて同様の判定
を行う。以上の処理をi=1〜mについて行う。この処
理過程で所定の判定結果が発生したときには,iとjと
を入れ替え(逆にし)て,即ち,外接矩形iの頂点が外
接矩形j内に包含されるか否かに基づいて判定が行われ
る。 (S01)iを初期値1に設定し,先ず,外接矩形j(j=
1〜m)の頂点が外接矩形1内に包含されるか否かの判
定から開始する。 (S02)iに1を加算した値をj(最初はj=2から)と
することによって,外接矩形iとその次の外接矩形jに
ついての重なりの有無の判定を行う。 (S03)重なりの判定に際して,inflagなる演算式を実行
する。
Here, the determination of whether or not the circumscribed rectangles overlap by the circumscribed rectangle overlap determination unit 4a will be described with reference to the flowchart of FIG. The determination method is performed based on whether or not the vertices of the circumscribed rectangle j of the opponent are included in the circumscribed rectangle i of interest. First, i is fixed to 1, j is changed to j = 1 to m (m is the total number of circumscribing rectangles), and whether or not the vertices of the circumscribing rectangle j are included in the circumscribing rectangle i is determined for each j. judge. Next, i is increased by 1 (i = 2), j is changed from j = 1 to m, and the same judgment is performed. The above processing is performed for i = 1 to m. When a predetermined judgment result is generated in this process, the judgment is performed by exchanging (reversing) i and j, that is, based on whether or not the vertex of the circumscribed rectangle i is included in the circumscribed rectangle j. Be seen. (S01) i is set to an initial value of 1, and first, a circumscribing rectangle j (j =
1 to m) is started by determining whether or not the vertices 1 to m are included in the circumscribed rectangle 1. (S02) The value obtained by adding 1 to i is set to j (beginning with j = 2) to determine whether or not the circumscribed rectangle i and the next circumscribed rectangle j overlap. (S03) When the overlap is determined, the arithmetic expression of inflag is executed.

【0024】ここで,図16の(a) に基づいて,演算式in
flagの定義を説明する。 inflag=in(X1i,Y1i,X2i,Y2i,a,b) は左上及び右下の頂点のxーy座標を,それぞれ,(X
1i,Y1i),(X2i,Y2i)とする矩形に対する点
(a,b)の位置関係(内部,頂点,境界,外部)を16
進2桁(但し,OXは以下の数値が16進表示であることを
示し,Fは16進数の15を表す)で示す。即ち, X1i≦a,かつ,a≦X2i,かつ,Y1i≦b,かつ,
b≦Y2i〔即ち,点(a,b)は矩形内又はその境界
上〕であって, X1i<a,かつ,a<X2i,かつ,Y1i<b,かつ,
b<Y2iのとき,inflag=OX20(内部)とする。
Here, based on (a) of FIG. 16, the arithmetic expression in
The definition of flag is explained. inflag = in (X1i, Y1i, X2i, Y2i, a, b) is the xy coordinates of the upper left and lower right vertices, respectively (X
1i, Y1i), (X2i, Y2i) The positional relationship (inside, apex, boundary, outside) of the point (a, b) with respect to the rectangle is 16
It is indicated by two decimal digits (however, OX indicates that the following numerical values are displayed in hexadecimal, and F indicates hexadecimal 15). That is, X1i≤a, a≤X2i, and Y1i≤b, and
b ≦ Y2i [that is, the point (a, b) is within the rectangle or on the boundary thereof], and X1i <a and a <X2i and Y1i <b, and
When b <Y2i, inflag = OX20 (internal).

【0025】前記の条件を満たさず,(X1i=a,
かつ,Y1i=b)又は(X2i=a,かつ,Y1i=b)又
は(X1i=a,かつ,Y2i=b)又は(X2i=a,か
つ,Y2i=b)のとき,inflag=0X02(頂点)とする。
If the above condition is not satisfied, (X1i = a,
And Y1i = b) or (X2i = a and Y1i = b) or (X1i = a and Y2i = b) or (X2i = a and Y2i = b), inflag = 0X02 (vertex) ).

【0026】前記の条件をも満たさないとき,infl
ag=0X08(境界)とする。 上記の条件を満たさないとき,inflag=0X00(外
部)とする。
When neither of the above conditions is satisfied, infl
Set ag = 0X08 (boundary). When the above conditions are not met, inflag = 0X00 (external).

【0027】但し,内部は矩形内部の点であり,矩形の
輪郭線上は含まない。頂点は矩形の4頂点を,境界は頂
点以外の輪郭線上を,また外部は矩形外部の点を示す。
以上の定義に基づいて,4つの演算式(inflag)を順
次,実行する。各演算式の第1項は,注目する外接矩形
iの左上及び右下の頂点の座標を(X1i,Y1i)及び
(X2i,Y2i)とする外接矩形iに対する,相手の外接
矩形jの4つの頂点(X1j,Y1j),(X2j,Y1j),
(X1j,Y2j),(X2j,Y2j)の位置関係を判定す
る。 (S04)演算の最終結果のinflagと2桁の16進数OF(Fは
10進数の15を表す)とを比較する。比較の結果,前者が
後者より大きい(yes)の場合は内部点が1つ以上又は境
界点が2つ以上存することを示し,(S09)の処理を行
う。(例えば,内部点が1つのとき演算結果のinflag=
0X20+0X00+0X00+0X00=0X20,境界点が2つのときin
flag=0X08+0X00+0X00+0X08=0X10となる) (S05)前記(S04)の比較の結果,前者が後者より大きく
ない(no)の場合はinflagの値が0X08もしくは0X02と等
しいか検査する。検査の結果,何れかと等しい場合は境
界点が1つ又は頂点が1つ存することを示し,(S06)の
処理を行う。 (S06)外接矩形iの各頂点が外接矩形j内に包含される
か否かを判定するために,iとjとを入れ替えて,即
ち,図16の(b) に示すinflag逆演算を行う。次に,演算
結果のinflagと0X1Fとを比較する。比較の結果,前者が
後者より大きい(yes)場合は内部点が1つ以上存するこ
とを示し,(S09)の処理を行う。前者が後者より大きく
ない(no)場合は(S10)の処理を行う。 (S07)前記(S05)の比較の結果,inflagが0X08にも0X02
にも等しくない(no)場合はinflagと0X04とを比較す
る。比較の結果,前者が後者より大きくない(no)場合
は(S10)を実行し,前者が後者より大きい(yes)場合は
(S08)を実行する。 (S08)外接矩形iの各頂点が外接矩形j内に包含される
か否かを判定するためにiとjとを逆にしてinflag逆演
算を実行する。次に,演算結果のinflagと0XOFとを比較
する。前者が後者より大きい(yes)場合は境界点が2つ
以上存することを示し,(S09)の処理を行う。前者が後
者より大きくない(no)場合は(S10)の処理を行う。 (S09)外接矩形重なりテーブル41へ外接矩形iとjに重
なり有りを登録する。 (S10)外接矩形iに対して次の外接矩形jの重なりの有
無を検査するため,jに1を加算する。 (S11)前記(S10)において加算されたjと外接矩形の総
数mとを比較する。jがm以下(no)の場合は,前記(S
03)に戻って(次の外接矩形jを相手の外接矩形とす
る)重なり判定を行う。jがmより大(yes)の場合は,
相手の外接矩形jについて最後の外接矩形まで判定処理
が終了したことを示し,iを1だけ増加して次の外接矩
形iに注目して判定処理を続行する。 (S12)前記(S11)において加算されたiと(m−1)と
を比較する。iが(m−1)以下(no)の場合は,前記
(S02)に戻って(次の外接矩形iを注目する外接矩形と
する)重なりの判定を行う。iが(m−1)より大(ye
s)の場合は,注目する外接矩形iについて最後まで判
定処理が終了したことを示し,(かつ,前記(S11)の比
較により,相手の外接矩形jについて最後まで判定処理
が終了したことを示し,)重なり判定処理を終了する。
However, the inside is a point inside the rectangle and does not include the outline of the rectangle. The vertices are the four vertices of the rectangle, the boundaries are on the contour line other than the vertices, and the outside is points outside the rectangle.
Based on the above definitions, four arithmetic expressions (inflag) are sequentially executed. The first term of each arithmetic expression is the four circumscribed rectangles j of the partner circumscribed rectangle j with respect to the circumscribed rectangle i whose coordinates of the upper left and lower right vertices of the circumscribed rectangle i of interest are (X1i, Y1i) and (X2i, Y2i). Vertices (X1j, Y1j), (X2j, Y1j),
The positional relationship between (X1j, Y2j) and (X2j, Y2j) is determined. (S04) inflag of the final result of the operation and a 2-digit hexadecimal number OF (F is
Represents the decimal number 15). As a result of the comparison, when the former is larger than the latter (yes), it indicates that there are one or more internal points or two or more boundary points, and the processing of (S09) is performed. (For example, if there is one internal point,
0X20 + 0X00 + 0X00 + 0X00 = 0X20, when there are two boundary points in
flag = 0X08 + 0X00 + 0X00 + 0X08 = 0X10) (S05) As a result of the comparison in (S04), if the former is not larger than the latter (no), it is checked whether the value of inflag is equal to 0X08 or 0X02. If the result of the inspection is equal to any of them, it means that there is one boundary point or one vertex, and the process of (S06) is performed. (S06) In order to determine whether each vertex of the circumscribed rectangle i is included in the circumscribed rectangle j, i and j are exchanged, that is, the inflag inverse operation shown in (b) of FIG. 16 is performed. . Next, the inflag of the operation result is compared with 0X1F. As a result of the comparison, if the former is larger than the latter (yes), it indicates that there is one or more internal points, and the process of (S09) is performed. If the former is not larger than the latter (no), the process of (S10) is performed. (S07) As a result of the comparison in (S05) above, inflag is 0X02 even if it is 0X08.
If not equal to (no), inflag is compared with 0X04. As a result of the comparison, if the former is not larger than the latter (no), execute (S10), and if the former is larger than the latter (yes),
Execute (S08). (S08) To determine whether each vertex of the circumscribing rectangle i is included in the circumscribing rectangle j, i and j are reversed to perform the inflag inverse calculation. Next, the inflag of the operation result is compared with 0XOF. If the former is larger than the latter (yes), it indicates that there are two or more boundary points, and the process of (S09) is performed. If the former is not larger than the latter (no), the process of (S10) is performed. (S09) The circumscribing rectangle overlapping table 41 is registered with the circumscribing rectangles i and j with overlapping. (S10) In order to check whether or not the next circumscribed rectangle j overlaps the circumscribed rectangle i, 1 is added to j. (S11) The j added in (S10) is compared with the total number m of circumscribing rectangles. If j is less than or equal to m (no), then (S
Returning to 03) (the next circumscribing rectangle j is set as the circumscribing rectangle of the other party), the overlap determination is performed. When j is larger than m (yes),
It indicates that the determination process has been completed up to the last circumscribed rectangle for the circumscribed rectangle j of the other party, i is incremented by 1, and the determination process is continued while paying attention to the next circumscribed rectangle i. (S12) The i added in (S11) is compared with (m-1). When i is (m-1) or less (no), the above
Returning to (S02), overlapping is determined (the next circumscribing rectangle i is the circumscribing rectangle of interest). i is larger than (m-1) (yes
In the case of s), it indicates that the determination process has been completed to the end for the circumscribing rectangle i of interest (and by the comparison in (S11) above, the determination process has been completed to the end for the circumscribed rectangle j of the other party. ,) Overlap determination processing ends.

【0028】次に,本発明の第2の実施例について説明
する。図17は本発明の第2の実施例を説明するブロック
図である。前記の第1の実施例(図4参照)では,ラベ
リング処理で一旦ラベル画像を算出し,その後で,ラベ
ル画像間の重なりの有無を検査した後,(非重なり部に
ついて外接矩形の記憶などの)ラベル画像のデータ圧縮
を行った。そのため,ラベル画像のワーク領域21a が必
要になる。第2の実施例はワーク領域21a の削減を目的
とする。
Next, a second embodiment of the present invention will be described. FIG. 17 is a block diagram for explaining the second embodiment of the present invention. In the first embodiment (see FIG. 4), the label images are once calculated by the labeling process, and then the presence or absence of the overlap between the label images is inspected. ) Data compression of the label image was performed. Therefore, the work area 21a for the label image is required. The second embodiment aims to reduce the work area 21a.

【0029】図17では,第1の実施例(図4参照)と比
較してラベル画像格納ワーク領域21a が無くなってい
る。即ち,ラベリング処理部2bはラベル数と各ラベルの
外接矩形のみを算出して,それぞれ,ラベル数格納領域
22b 及び外接矩形格納領域23bに格納する。以下の各部
は実施例1のそれらと同等の処理を行う。
In FIG. 17, the label image storage work area 21a is eliminated as compared with the first embodiment (see FIG. 4). That is, the labeling processing unit 2b calculates only the number of labels and the circumscribed rectangle of each label, and the label number storage area
22b and the circumscribed rectangle storage area 23b. The following units perform the same processing as those in the first embodiment.

【0030】その後で重なり注目ラベルのラベル画像記
憶部9bは,2値画像1b,及び外接矩形格納領域23b と外
接矩形重なりテーブル31b のデータを使用して,先ず,
重なり部の外接矩形(αとする)内の2値画像を算出す
る。次に,その画像に対して再びラベリング処理を実行
し,ラベル画像と外接矩形を求める。ここで,他のラベ
ルも含まれるので,各ラベルの外接矩形を算出して,α
と一致する外接矩形のラベルだけを残し,図14のラベル
画像(2) の形式で記憶する。ここで,使用するラベル画
像のワーク領域はラベル画像の記憶領域89b(詳細は図14
参照)で代用することができる。これにより,第2の実
施例では小さいワーク領域で第1の実施例と同じデータ
が得られる。
After that, the label image storage unit 9b of the overlapping attention label uses the binary image 1b and the data of the circumscribing rectangle storage area 23b and the circumscribing rectangle overlapping table 31b, and
A binary image in the circumscribed rectangle (denoted by α) of the overlapping portion is calculated. Next, the labeling process is performed again on the image to obtain the label image and the circumscribed rectangle. Here, since other labels are also included, the circumscribed rectangle of each label is calculated, and α
Only the label of the circumscribing rectangle that matches is retained and stored in the format of label image (2) in Fig. 14. Here, the work area of the label image to be used is the label image storage area 89b (for details, see FIG.
(See) can be substituted. As a result, in the second embodiment, the same data as in the first embodiment can be obtained with a small work area.

【0031】次に,本発明の第3の実施例について説明
する。図18は本発明の第3の実施例を説明するブロック
図である。実施例1及び2(図4及び17のブロック図参
照)の例ではいずれも,重なり部で注目ラベル以外の外
接矩形が単一である場合にのみ注目ラベルの外接矩形を
外接矩形の演算式(差)で表現し,重なり部で注目ラベ
ル以外の外接矩形が複数存在した場合にはラベル画像を
記憶した。実施例3は,ラベル画像の記憶に要するデー
タ量を削減するために,注目ラベル以外の外接矩形(雑
音外接矩形という)の内部に含まれるラベルが単一にな
るまで細分割操作を繰り返す。即ち,実施例2における
と同様な処理を実行した後,重なり部再外接矩形算出部
5c,重なり部注目ラベル外の雑音外接矩形算出部6c,雑
音外接矩形内単一ラベル確認処理部7cによって雑音外接
矩形の内部に含まれるラベルが単一になるまで細分割処
理を繰り返す。
Next, a third embodiment of the present invention will be described. FIG. 18 is a block diagram for explaining the third embodiment of the present invention. In each of the examples of Embodiments 1 and 2 (see the block diagrams of FIGS. 4 and 17), the circumscribed rectangle of the attention label is calculated as the circumscribed rectangle only when the circumscribed rectangle other than the attention label is single at the overlapping portion. Difference), and if there are multiple circumscribing rectangles other than the label of interest at the overlapping part, the label image is stored. In the third embodiment, in order to reduce the amount of data required to store the label image, the subdivision operation is repeated until the number of labels included in the circumscribed rectangle (called noise circumscribed rectangle) other than the target label becomes single. That is, after performing the same processing as in the second embodiment, the overlapping portion re-circumscribing rectangle calculation unit
5c, the noise circumscribing rectangle calculation unit 6c outside the label of interest in the overlapping portion, and the single label confirmation processing unit 7c in the noise circumscribing rectangle repeat the subdivision processing until the number of labels included in the noise circumscribing rectangle becomes single.

【0032】図19〜図21にその処理例を示す。先ず,図
19に示すように,注目ラベルの外接矩形内の各外接矩形
(雑音外接矩形)内のラベルが単一になるまで,雑音外
接矩形を細分割する処理を繰り返す。即ち,注目ラベル
の外接矩形を親とすると,子1,子2・・・というよう
に,注目ラベルの外接矩形は階層的に表現できる。重な
り部注目ラベル外の雑音外接矩形算出部6cによって格納
される重なり部再外接矩形格納領域51c(詳細は図20参
照)において,子1の矩形属性1は子1の階層の1番目
のラベル,子2の矩形属性1-1 は子1の1番目の矩形に
属する1番目のラベルを意味している。重なり注目ラベ
ルの外接矩形記憶部8cによって格納される重なり注目ラ
ベル外接矩形格納領域89c(詳細は図21参照)において,
単一ラベルに細分割された各外接矩形が注目ラベルかど
うか判定して,注目ラベルのときは演算属性を『+』,
そうでないときには『−』にする。当然,子1の階層の
演算属性は全て『−』になる。注目ラベルかどうかの判
定は,注目ラベルの外接矩形にラベリング処理を施して
ラベル画像を算出し,子の外接矩形内のラベル値と親の
ラベル値が等しいか否かで判定する。さて,重なり部の
復元方法は,図21から各ラベルの領域を算出し,2値画
像内のその領域内の画素値1の各画素をラベル番号に置
き換えることによってラベル画像が得られる。例えば,
図21に示すように,ラベル番号9の領域は以下のように
親から子1,子2・・・の順番で,演算属性を用いて加
減算を行うことによって復元することができる。
19 to 21 show a processing example thereof. First, the figure
As shown in FIG. 19, the process of subdividing the noise circumscribed rectangle is repeated until the label in each circumscribed rectangle (noise circumscribed rectangle) in the circumscribed rectangle of the target label becomes single. That is, when the circumscribed rectangle of the label of interest is the parent, the circumscribed rectangle of the label of interest can be expressed hierarchically, such as child 1, child 2, ... In the overlapping portion re-circumscribing rectangle storage area 51c (see FIG. 20 for details), which is stored by the noise circumscribing rectangle calculating unit 6c outside the overlapping portion attention label, the rectangle attribute 1 of the child 1 is the first label of the hierarchy of the child 1, The rectangle attribute 1-1 of child 2 means the first label belonging to the first rectangle of child 1. In the overlapping attention label circumscribing rectangle storage area 89c (see FIG. 21 for details) stored by the circumscribing rectangle storage unit 8c of the overlapping attention label,
It is determined whether each circumscribed rectangle subdivided into a single label is the label of interest, and if it is the label of interest, the operation attribute is "+",
If not, set it to "-". Naturally, all the operation attributes of the hierarchy of child 1 are "-". To determine whether the label is the target label, the circumscribed rectangle of the target label is labeled to calculate a label image, and it is determined whether the label value in the circumscribed rectangle of the child is equal to the label value of the parent. In the method of restoring the overlapping portion, the label image is obtained by calculating the area of each label from FIG. 21 and replacing each pixel of the pixel value 1 in that area in the binary image with the label number. For example,
As shown in FIG. 21, the area of label number 9 can be restored by performing addition and subtraction using the operation attribute in the following order from parent to child 1, child 2 ...

【0033】ところで,重なり部の細分割処理を行うと
き,その領域が大きい場合やラベル数が多い場合は重な
り部のラベル画像を一時的に格納するワーク領域が大き
くなるという問題がある。そこで,対象となる領域を分
割してラベル画像を算出することによって問題を解決す
ることができる。例えば,図21の演算属性を算出すると
きに親の外接矩形を対象領域としてラベル画像を算出し
て注目ラベルかどうかを判定したが,対象領域を図22の
(a) ように分割してラベル画像を算出する。このとき,
対象領域が縦長の場合には水平に分割し,横長の場合に
は垂直に分割する。もちろん,演算属性を判定するラベ
ルの外接矩形を包含するようにする。分割領域内でラベ
ル画像を算出したとき分割領域と同じ大きさの外接矩形
を有するラベルが対象領域の注目ラベルとなる。もし,
分割領域と同じ大きさの外接矩形を有するラベルが存在
しない場合には,再度,分割領域の設定を行う。図22の
(b) に示すように小さいワーク領域でラベル画像を算出
することができる。
When performing the subdivision processing of the overlapping portion, if the area is large or the number of labels is large, there is a problem that the work area for temporarily storing the label image of the overlapping portion becomes large. Therefore, the problem can be solved by dividing the target area and calculating the label image. For example, when calculating the calculation attribute of FIG. 21, a label image is calculated using the circumscribed rectangle of the parent as the target area to determine whether or not the label is the target label.
The label image is calculated by dividing as in (a). At this time,
If the target area is vertically long, it is divided horizontally, and if it is horizontally long, it is vertically divided. Of course, the circumscribed rectangle of the label that determines the operation attribute should be included. When the label image is calculated in the divided area, a label having a circumscribed rectangle having the same size as the divided area becomes the target label of the target area. if,
If there is no label having a circumscribed rectangle of the same size as the divided area, the divided area is set again. Figure 22
The label image can be calculated in a small work area as shown in (b).

【0034】分割領域の設定方法は,前述のとおり,対
象領域が縦長の場合には水平分割し,横長の場合には垂
直に分割するが,演算属性を判定するラベルの外接矩形
を包含すると共に,関連するラベルの外接領域よりも大
きい領域に設定する。そして,分割領域と同じ大きさの
外接矩形を有するラベルが現れるまで分割領域を拡大す
ることによってラベル画像を算出することができる。
As described above, the division area setting method divides horizontally when the target area is vertically long and vertically when the target area is horizontally long, and includes the circumscribed rectangle of the label for determining the operation attribute. , Set to the area larger than the circumscribed area of the related label. Then, the label image can be calculated by enlarging the divided area until a label having a circumscribed rectangle having the same size as the divided area appears.

【0035】[0035]

【発明の効果】以上説明したように,本発明の連結領域
の抽出方法はラベル画像情報に基づいて画像処理する画
像処理装置に対して,重なりを有しない外接矩形につい
てはその座標及びラベルを含む外接矩形情報を出力する
と共に,(1) 重なりを有する外接矩形については,それ
を親として子の外接矩形に細分割して,その内部に含ま
れる子の外接矩形のラベルが複数の場合は親の外接矩形
のラベル画像を出力し,ラベルが単一の場合は親及び子
の外接矩形の座標を画像処理装置へ出力する。または,
(2) 重なりを有する外接矩形については,それを親とし
て子の外接矩形に細分割する操作を,その内部に含まれ
る子の外接矩形のラベルが単一まで繰り返して,そのと
きの各々の子の外接矩形の座標及びそれが親の外接矩形
に属する矩形であるか否かを示す属性を画像処理装置へ
出力する。画像処理装置はこうして入力された情報に基
づいて容易に画面全体のラベル画像を再現することがで
きる。従って,画像処理部へ画面全体のラベル画像を出
力するために膨大な記憶容量を必要とした従来方法に比
して,本発明はラベル画像の量を減少又は皆無にするこ
とができ,極めて少量の記憶容量を要するだけで経済的
な連結領域の抽出装置及び方法を実現できるという効果
がある。
As described above, according to the method for extracting a connected area of the present invention, an image processing apparatus for image processing based on label image information includes coordinates and labels of a circumscribed rectangle having no overlap. In addition to outputting the circumscribed rectangle information, (1) For circumscribed rectangles that have overlap, subdivide them into child circumscribed rectangles, and if there are multiple labels for the child circumscribed rectangles contained in the circumscribed rectangle, the parent The label image of the circumscribing rectangle is output, and when the label is single, the coordinates of the circumscribing rectangle of the parent and child are output to the image processing device. Or
(2) For a bounding rectangle that has an overlap, the operation of subdividing the bounding rectangle as a parent into the bounding rectangle of the child is repeated until the label of the bounding rectangle of the child contained within is repeated until each child at that time. The coordinates of the circumscribed rectangle and the attribute indicating whether or not the rectangle belongs to the circumscribed rectangle of the parent are output to the image processing apparatus. The image processing apparatus can easily reproduce the label image of the entire screen based on the information thus input. Therefore, the present invention can reduce or eliminate the amount of label images in comparison with the conventional method that requires a huge storage capacity to output the label image of the entire screen to the image processing unit, and the amount is extremely small. There is an effect that it is possible to realize an economical connected area extracting apparatus and method by only requiring the storage capacity of

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

【図1】 本発明の原理ブロック図FIG. 1 is a block diagram of the principle of the present invention.

【図2】 本発明の原理を説明する概念図FIG. 2 is a conceptual diagram illustrating the principle of the present invention.

【図3】 本発明の第1の実施例の概要を説明するフロ
ーチャート
FIG. 3 is a flowchart for explaining the outline of the first embodiment of the present invention.

【図4】 本発明の第1の実施例を説明するブロック図FIG. 4 is a block diagram illustrating a first embodiment of the present invention.

【図5】 ラベル画像を説明する図FIG. 5 is a diagram illustrating a label image.

【図6】 ラベル数格納領域を説明する図FIG. 6 is a diagram illustrating a label number storage area.

【図7】 外接矩形格納領域を説明する図FIG. 7 is a diagram illustrating a circumscribed rectangle storage area.

【図8】 外接矩形重なりテーブルを説明する図FIG. 8 is a diagram illustrating a circumscribing rectangle overlapping table.

【図9】 非重なり部外接矩形格納領域を説明する図FIG. 9 is a diagram illustrating a non-overlapping portion circumscribed rectangle storage area.

【図10】 重なり部再外接矩形格納領域を説明する図
(その1)
FIG. 10 is a diagram (part 1) for explaining a re-circumscribing rectangle storage area of an overlapping portion.

【図11】 単一レベルにならない重なり部の例を示す
FIG. 11 is a diagram showing an example of an overlapping portion that does not have a single level.

【図12】 単一レベルになる重なり部の例を示す図FIG. 12 is a diagram showing an example of an overlapping portion having a single level.

【図13】 重なり部外接矩形格納領域を説明する図
(その1)
FIG. 13 is a diagram (part 1) explaining an overlapping part circumscribed rectangle storage area.

【図14】 重なり部のラベル画像を説明する図FIG. 14 is a diagram illustrating a label image of an overlapping portion.

【図15】 外接矩形重なり判定処理のフローチャートFIG. 15 is a flowchart of circumscribed rectangle overlap determination processing.

【図16】 演算式の説明図FIG. 16 is an explanatory diagram of an arithmetic expression

【図17】 本発明の第2の実施例を説明するブロック
FIG. 17 is a block diagram illustrating a second embodiment of the present invention.

【図18】 本発明の第3の実施例を説明するブロック
FIG. 18 is a block diagram illustrating a third embodiment of the present invention.

【図19】 雑音外接矩形の細分割処理を説明する図FIG. 19 is a diagram illustrating a subdivision process of a noise circumscribed rectangle.

【図20】 重なり部再外接矩形格納領域を説明する図
(その2)
FIG. 20 is a diagram (part 2) explaining the overlapping part re-circumscribing rectangle storage area.

【図21】 重なり部外接矩形格納領域を説明する図
(その2)
FIG. 21 is a diagram (part 2) explaining an overlapping part circumscribed rectangle storage area.

【図22】 対象領域の分割によるラベル画像格納ワー
ク領域の削減を説明するブロック図
FIG. 22 is a block diagram illustrating reduction of the label image storage work area by dividing the target area.

【図23】 従来方法を説明する図FIG. 23 is a diagram illustrating a conventional method.

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

1a 2値画像格納領域 2a〜2c ラベリング処理部 3a〜3c 外接矩形重なり判定部 4a〜4c 非重なり部外接矩形記憶部 5a〜5c 重なり部再外接矩形算出部 6a〜6c 重なり部注目ラベル外の雑音外接矩形算出部 7a〜7c 雑音外接矩形内単一ラベル確認部 8a〜8c 重なり注目ラベル外接矩形記憶部 9a, 9b 重なり注目ラベルのラベル画像記憶部 21a ラベル画像格納ワーク領域 22a 〜22c ラベル数格納領域 23a 〜23c 外接矩形格納領域 31a 〜31c 外接矩形重なりテーブル 41a 〜41c 非重なり部外接矩形格納領域 51a 〜51c 重なり部再外接矩形格納領域 89a, 89b 重なり部外接矩形及びラベル画像格納領域 89c 重なり部外接矩形格納領域 1a Binary image storage area 2a ~ 2c Labeling processing section 3a to 3c Circumscribed rectangle overlap determination section 4a to 4c Non-overlapping area circumscribed rectangle storage area 5a to 5c Overlap part Re-circumscribing rectangle calculation part 6a to 6c Overlapping part Noise circumscribed rectangle calculation part outside the label of interest 7a to 7c Single label confirmation part inside the noise circumscribed rectangle 8a to 8c Overlapping attention label circumscribed rectangle storage unit 9a, 9b Label image memory for overlapping attention labels 21a Label image storage work area 22a to 22c Label number storage area 23a to 23c Enclosing rectangle storage area 31a ~ 31c circumscribed rectangular overlapping table 41a to 41c Non-overlapping part circumscribed rectangle storage area 51a to 51c Overlapping area re-circumscribing rectangle storage area 89a, 89b Storage area for bounding box and label image 89c Overlap rectangle storage area

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06T 7/00 - 7/60 G06T 1/00 JICSTファイル(JOIS)Front page continued (58) Fields surveyed (Int.Cl. 7 , DB name) G06T 7 /00-7/60 G06T 1/00 JISST file (JOIS)

Claims (22)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ラベル画像情報に基づいて画像処理を行
う画像処理装置に対して,入力された2値画像データか
らラベリングにより画素の連結領域を抽出し,その情報
を一画面のラベル画像情報として出力する連結領域の抽
出装置において, 2値画像データから抽出された第1のラベルの連結領域
を外接する第1の外接方形の中に第2のラベルの連結領
域を外接する第2の外接方形が含まれることを判定する
第1の判定手段と,該第1の判定手段の判定に基づいて,該第2の外接方形
内に前記第1のラベルが含まれるか否か判定し,含まれ
るときは該第2の外接方形内の第1のラベルの領域を外
接する第3の外接方形を求める第2の判定手段と,第2の判定手段の判定に基づいて,該第1の外接方形
から該第2の外接方形を削除,もしくは該第1の外接方
から該第2の外接方形を削除し,かつ,該第3の外接
方形を付加することを示す情報を,前記第1のラベルの
連結領域のラベル画像情報として前記画像処理装置へ出
力する出力手段とを設けることを特徴とする連結領域の
抽出装置。
1. An image processing apparatus that performs image processing based on label image information extracts a connected region of pixels from the input binary image data by labeling, and uses that information as label image information for one screen. In a connected area extraction device for outputting, a second circumscribed rectangle that circumscribes a connected area of a second label in a first circumscribed rectangle that circumscribes a connected area of a first label extracted from binary image data Determines that is included
First judging means and the second circumscribing rectangle based on the judgment of the first judging means.
It is determined whether the first label is included in the
The area of the first label in the second circumscribed rectangle is
The third and second determination means for determining a circumscribing rectangle, based on the determination of the second determination means, the first circumscribed rectangle in contact
Remove the circumscribed rectangular second from or circumscribing side of the first
Removing the second circumscribing rectangle from the shape and the third circumscribing
Information indicating that a square is added is added to the first label.
An output device for outputting label image information of a connected area to the image processing apparatus, the connected area extracting device.
【請求項2】 ラベル画像情報に基づいて画像処理を行
う画像処理装置に対して,入力された2値画像データか
らラベリングにより画素の連結領域を抽出し,その情報
を一画面のラベル画像情報として出力する連結領域の抽
出装置において,2値画像データから抽出された第1のラベルの連結領域
を外接する第1の外接方形と第2のラベルの連結領域を
外接する第2の外接方形とが重なる領域を有することを
判定する第1の判定手段と, 該第1の判定手段の判定に基づいて,該重なる領域内に
前記第1のラベルが含まれるか否か判定し,含まれると
きは該重なる領域内の該第1のラベルの領域を外接する
第3の外接方形を求める第2の判定手段と, 該第2の判定手段の判定に基づいて,該第1の外接方形
から該重なる領域を削除,もしくは該第1の外接方形か
ら該重なる領域を削除し,かつ,第3の外接方形を付加
することを示す情報を,前記第1のラベルの連結領域の
ラベル画像情報 として前記画像処理装置へ出力する出力
手段とを設けることを特徴とする連結領域の抽出装置。
2. An image processing apparatus that performs image processing based on label image information extracts a connected area of pixels from the input binary image data by labeling, and uses that information as label image information for one screen. In the connected area extraction device for output, the connected area of the first label extracted from the binary image data
The connecting area of the first circumscribed rectangle and the second label that circumscribe
Having a region where the circumscribing second circumscribing rectangle overlaps
First determining means for determining, and based on the determination of the first determining means, within the overlapping area
It is determined whether the first label is included, and if it is included,
Circumscribes the area of the first label within the overlapping area
Second judging means for obtaining a third circumscribing rectangle, and the first circumscribing rectangle based on the judgment of the second judging means.
From the overlapping area, or the first circumscribed rectangle
Delete the overlapping area and add the third circumscribed rectangle
The information indicating that the
Output to the image processing device as label image information
An apparatus for extracting a connected area, characterized by comprising:
【請求項3】 該出力手段は,さらに,前記第1のラベ
ルの連結領域のラベル画像情報を出力することを特徴と
する請求項1又は2記載の連結領域の抽出装置。
3. The output means further comprises the first label.
3. The connection area extracting device according to claim 1 , wherein label image information of the connection area of the connection area is output.
【請求項4】 該出力手段は,さらに,前記第1のラベ
ルの連結領域のラベルを1に置換したデータと該ラベル
の番号とを出力することを特徴とする請求項1又は2記
載の連結領域の抽出装置。
4. The output means further comprises the first label.
Data in which the label of the connected region of the
Connection region according to claim 1 or 2, and outputs the number of the extraction device.
【請求項5】 ラベル画像情報に基づいて画像処理を行
う画像処理装置に対して,入力された2値画像データか
ら画素の連結領域を抽出し,その情報を一画面のラベル
画像情報として出力する連結領域の抽出装置において, 入力された2値画像データを記憶する2値画像記憶手段
と, 2値画像データから,1つに繋がった画像の成分である
連結成分を算出し,その連結成分にラベルを付したラベ
ル画像を作成するラベリング処理を行って,ラベル画像
を記憶するラベリング手段と, 連結成分の外接方形の画面上の座標を算出して記憶する
外接方形算出手段と, 該外接方形算出手段によって算出された各外接方形につ
いて他の外接方形との重なりの有無を判定する重なり判
定手段と, 該重なり判定手段によって重なり有と判定された外接方
形を親として,その内部に含まれるラベルに基づいて子
の外接方形に細分割し,子の外接方形の座標を求める細
分割手段と, 該細分割手段によって細分割された子の外接方形のラベ
ル数が単一か複数かを判定するラベル数判定手段と, 該2値画像記憶手段に記憶された2値画像と,該重なり
判定手段によって重なり無と判定された外接方形の座標
と,該ラベル数判定手段によってラベル数が単一と判定
された親及び子の外接方形の座標と,ラベル数が複数と
判定された親の外接方形のラベル画像とから成るデータ
を出力する出力手段とを設けることを特徴とする連結領
域の抽出装置。
5. An image processing apparatus that performs image processing based on label image information extracts a connected region of pixels from input binary image data and outputs the information as label image information for one screen. In a connected area extracting apparatus, a binary image storage unit that stores input binary image data, and a connected component that is a component of one connected image are calculated from the binary image data, and the connected component is obtained. Labeling means for performing a labeling process to create a labeled image with labels, memorizing the label image, circumscribing rectangle calculating means for calculating and storing coordinates of the circumscribed rectangle of the connected component on the screen, and circumscribing rectangle calculation Overlap judging means for judging whether or not each circumscribing rectangle calculated by the means overlaps with other circumscribing rectangles; As a parent, a subdivision means for subdividing the child's circumscribed rectangle based on the labels contained therein and for obtaining the coordinates of the circumscribed rectangle of the child, and the number of labels of the circumscribed rectangle of the child subdivided by the subdivision means The number of labels, the binary image stored in the binary image storage means, the coordinates of the circumscribed rectangle determined to be non-overlapping by the overlap determining means, and the number of labels. Providing output means for outputting data consisting of the coordinates of the circumscribed rectangle of the parent and the child whose number of labels is judged to be single by the judgment means and the circumscribed rectangular label image of the parent whose number of labels is judged to be plural A device for extracting connected regions, characterized by:
【請求項6】 ラベル画像情報に基づいて画像処理を行
う画像処理装置に対して,入力された2値画像データか
ら画素の連結領域を抽出し,その情報を一画面のラベル
画像情報として出力する連結領域の抽出装置において, 入力された2値画像データを記憶する2値画像記憶手段
と, 2値画像データから連結成分の外接方形を算出し,各外
接方形にラベルを付して記憶する外接方形算出手段と, 該外接方形算出手段によって算出された各外接方形につ
いて他の外接方形との重なりの有無を判定する重なり判
定手段と, 該重なり判定手段によって重なり有と判定された外接方
形に対してラベリング処理を行って,そのラベル画像を
作成し記憶するラベリング手段と, 該ラベリング手段によって作成されたラベル画像の外接
方形を親として,その内部に含まれるラベルを基に子の
外接方形に細分割し,子の外接方形の座標を求める細分
割手段と, 該細分割手段によって細分割された子の外接方形のラベ
ル数が単一か複数かを判定するラベル数判定手段と, 該2値画像記憶手段に記憶された2値画像と,該重なり
判定手段によって重なり無と判定された外接方形の座標
と,該ラベル数判定手段によってラベル数が単一と判定
された親及び子の外接方形の座標と,ラベル数が複数と
判定された親の外接方形のラベル画像とから成るデータ
を出力する出力手段とを設けることを特徴とする連結領
域の抽出装置。
6. An image processing apparatus that performs image processing based on label image information extracts a connected region of pixels from input binary image data and outputs the information as label image information for one screen. In a connected area extraction device, a binary image storage unit that stores input binary image data, and a circumscribed box that calculates a circumscribed rectangle of a connected component from the binary image data, labels each circumscribed rectangle, and stores the circumscribed rectangle. With respect to the circumscribing rectangles determined to have overlap by the rectangle calculating means, the overlap determining means for determining whether or not each circumscribing rectangle calculated by the circumscribing rectangle calculating means overlaps with other circumscribing rectangles, Labeling means for performing a labeling process to create and store the label image and a circumscribed rectangle of the label image created by the labeling means as a parent. A subdivision means for subdividing the child's circumscribed rectangle based on the labels contained inside to find the coordinates of the child's circumscribed rectangle, and whether the number of labels of the child's circumscribed rectangle subdivided by the subdivision means is single A label number determining means for determining whether there is a plurality, a binary image stored in the binary image storing means, coordinates of a circumscribed rectangle determined to be non-overlapping by the overlap determining means, and a label for the label number determining means. The present invention is characterized in that output means is provided for outputting data consisting of circumscribed rectangle coordinates of the parent and child whose number is determined to be single, and a circumscribed rectangle label image of the parent whose number of labels is determined to be plural. Connected area extraction device.
【請求項7】 前記出力手段は,ラベルが複数と判定さ
れた親の外接方形のラベル画像の代わりに,そのラベル
を1に置換したデータとラベルとを出力することを特徴
とする請求項5又は6記載の連結領域の抽出装置。
7. The output means outputs data and a label in which the label is replaced with 1 instead of the label image of the circumscribed rectangle of the parent whose label is determined to be plural. Alternatively, the connected area extracting device according to item 6.
【請求項8】 ラベル画像情報に基づいて画像処理を行
う画像処理装置に対して,入力された2値画像データか
ら画素の連結領域を抽出し,その情報を一画面のラベル
画像情報として出力する連結領域の抽出装置において, 入力された2値画像データを記憶する2値画像記憶手段
と, 2値画像データから連結成分の外接方形を算出し,各外
接方形にラベルを付して記憶する外接方形算出手段と, 該外接方形算出手段によって算出された各外接方形につ
いて他の外接方形との重なりの有無を判定する重なり判
定手段と, 該重なり判定手段によって重なり有と判定された外接方
形にラベリング処理を行って,そのラベル画像を作成す
るラベリング手段と, 該ラベリング手段によって作成されたラベル画像の外接
方形を親として,その内部に含まれるラベルを基に子の
外接方形に細分割し,さらに子の外接方形を内部に含ま
れるラベル数が単一になるまで細分割する操作を繰り返
し,ラベル数が単一になったときの各々の子の外接方形
の座標を求める細分割手段と, 該2値画像記憶手段に記憶された2値画像と,該重なり
判定手段によって重なり無と判定された外接方形と,該
細分割手段によって求められた親及び各々の子の外接方
形とから成るデータを出力する出力手段とを設けること
を特徴とする連結領域の抽出装置。
8. An image processing apparatus that performs image processing based on label image information extracts a connected region of pixels from input binary image data and outputs the information as label image information for one screen. In a connected area extraction device, a binary image storage unit that stores input binary image data, and a circumscribed box that calculates a circumscribed rectangle of a connected component from the binary image data, labels each circumscribed rectangle, and stores the circumscribed rectangle. Square calculating means, overlap determining means for determining whether or not each circumscribing rectangle calculated by the circumscribing rectangle calculating means overlaps with other circumscribing rectangles, and labeling of the circumscribing rectangles determined to have overlap by the overlap determining means. Labeling means for performing the processing to create the label image and the circumscribed rectangle of the label image created by the labeling means are included in the inside as parents. Subdivide the child's circumscribed rectangle based on the label, and then further subdivide the child's circumscribed rectangle until the number of labels contained inside is repeated. Subdividing means for obtaining the coordinates of the circumscribing rectangle of the child, the binary image stored in the binary image storing means, the circumscribing rectangle determined to be non-overlapping by the overlap determining means, and the subdividing means And an output means for outputting data including the circumscribed rectangle of each parent and each child.
【請求項9】 前記ラベル数判定手段は,親の外接方形
に対してラベリング処理を行ってそのラベル画像を求
め,親の外接方形のラベルと細分割された各々の子の外
接方形のラベルとを比較することによって,ラベル数が
単一か複数かを判定することを特徴とする請求項5又は
6記載の連結領域の抽出装置。
9. The label number determining means performs a labeling process on a circumscribed rectangle of a parent to obtain a label image of the circumscribed rectangle of the parent, and a circumscribed quadrangle label of each subdivided child. 7. The connected area extracting device according to claim 5, wherein it is determined whether the number of labels is single or plural by comparing.
【請求項10】 前記細分割手段は,親の外接方形に対
してラベリング処理を行ってそのラベル画像を求め,各
々の子の外接方形のラベルが親の外接方形のラベルに対
する一致/不一致を示す属性をラベルの比較によって求
める属性付け手段を有し, 前記出力手段は各々の子の外接方形の座標,及び該属性
付け手段によって求められた属性データを出力すること
を特徴とする請求項8記載の連結領域の抽出装置。
10. The subdivision means performs a labeling process on a circumscribed rectangle of a parent to obtain its label image, and the label of the circumscribed rectangle of each child indicates a match / mismatch with the label of the circumscribed rectangle of the parent. 9. An attribute assigning unit for obtaining an attribute by comparing labels, the output unit outputting the coordinates of the circumscribed rectangle of each child and the attribute data obtained by the attribute assigning unit. Connected area extraction device.
【請求項11】 前記属性付け手段は親の外接方形を,
属性を求めるべき子の外接方形を含むようにし,分割し
た領域に対してラベリング処理を行って求めたラベル画
像に基づいて,属性を判定することを特徴とする請求項
10記載の連結領域の抽出装置。
11. The attribute assigning means defines a circumscribed rectangle of a parent,
The attribute is determined based on a label image obtained by performing a labeling process on the divided area so as to include the circumscribing rectangle of the child whose attribute is to be obtained.
10. The connected area extracting device according to 10.
【請求項12】 ラベル画像情報に基づいて画像処理を
行う画像処理装置に対して,入力された2値画像データ
からラベリングにより画素の連結領域を抽出し,その情
報を一画面のラベル画像情報として出力する連結領域の
抽出方法において, (a) 2値画像データから抽出された第1のラベルの連結
領域を外接する第1の外接方形の中に第2のラベルの
結領域を外接する第2の外接方形が含まれることを判定
する工程と,(b) 該工程(a) の判定に基づいて,該第2の外接方形内
に前記第1のラベルが含まれるか否か判定し,含まれる
ときは該第2の外接方形内の該第1のラベルの領域を外
接する第3の外接方形を求める工程と, (c) 該工程(b) の判定に基づいて,該第1の外接方形か
該第2の外接方形を削除,もしくは該第1の外接方形
から該第2の外接方形を削除し,かつ,該第3の外接方
形を付加することを示す情報を,前記第1のラベルの連
結領域のラベル画像情報として前記画像処理装置へ出力
する工程とを設けることを特徴とする連結領域の抽出方
法。
12. An image processing apparatus that performs image processing based on label image information extracts a connected region of pixels from the input binary image data by labeling and uses the information as label image information for one screen. in the extraction method of the connection area to be output, (a) a first second communication <br/> binding region of the label into the first circumscribed rectangle which circumscribes the coupling region of the label extracted from the binary image data A step of determining that a second circumscribing rectangle that circumscribes is included, and (b) based on the determination of step (a),
Is determined whether or not the first label is included in
When the area of the first label within the second circumscribed rectangle is
A step of obtaining a third circumscribing rectangle that touches, and (c) the first circumscribing rectangle based on the judgment in the step (b) .
The second circumscribing rectangle, or the second circumscribing rectangle is deleted from the first circumscribing rectangle , and the third circumscribing rectangle .
Information indicating that a shape is added is added to the first label sequence.
And a step of outputting the label image information of the connection area to the image processing apparatus, the extraction method of the connection area.
【請求項13】 ラベル画像情報に基づいて画像処理を
行う画像処理装置に対して,入力された2値画像データ
からラベリングにより画素の連結領域を抽出し,その情
報を一画面のラベル画像情報として出力する連結領域の
抽出方法において,(a) 2値画像データから抽出された第1のラベルの連結
領域を外接する第1の外接方形と第2のラベルの連結領
域を外接する第2の外接方形とが重なる領域を有するこ
とを判定する工程と, (b) 該工程(a) の判定に基づいて,該重なる領域内に前
記第1のラベルが含まれるか否か判定し,含まれるとき
は該重なる領域内の該第1のラベルの領域を外接する第
3の外接方形を求める工程と, (c) 該工程(b) の判定に基づいて,該第1の外接方形か
ら該重なる領域を削除,もしくは該第1の外接方形から
該重なる領域を削除し,かつ,第3の外接方形を付加す
ることを示す情報を,前記第1のラベルの連結領域のラ
ベル画像情報として前記画像処理装置へ出力する工程と
を設けることを特徴とする連結領域の抽出方法。
13. An image processing apparatus that performs image processing based on label image information extracts a connected region of pixels from the input binary image data by labeling and uses the information as label image information for one screen. In the extraction method of the connected area to be output, (a) the connection of the first label extracted from the binary image data
Connecting area of the first circumscribed rectangle and the second label that circumscribe the area
It has a region that overlaps with a second circumscribed rectangle that circumscribes the region.
And (b) based on the judgment in step (a),
It is determined whether the first label is included, and when it is included.
Is a first circumscribed region of the first label within the overlapping region.
3 ) the step of obtaining the circumscribed rectangle, and (c) the first circumscribed rectangle based on the judgment of the step (b).
From the overlapping area, or from the first circumscribed rectangle
Delete the overlapping area and add a third circumscribed rectangle
Information indicating that the label of the connection area of the first label is
Outputting to the image processing device as bell image information;
A method for extracting a connected area, comprising:
【請求項14】 該工程(c) の出力は,さらに,前記第
1のラベルの連結領域のラベル画像情報を出力すること
を特徴とする請求項12又は13記載の連結領域の抽出方
法。
14. The output of the step (c) further comprises:
Method of extracting a connected region of claim 12, wherein outputting the label image information of the connection area of the first label.
【請求項15】 該工程(c) の出力は,さらに,前記第
1のラベルの連結領域のラベルを1に置換したデータと
該ラベルの番号とを出力することを特徴とする請求項12
又は13記載の連結領域の抽出方法。
15. The output of the step (c) further comprises:
Data in which the label of the connected area of the label of 1 is replaced with 1
Claim and outputs the number of the label 12
Or a method for extracting a connected region according to 13 above.
【請求項16】 ラベル画像情報に基づいて画像処理を
行う画像処理装置に対して,入力された2値画像データ
から画素の連結領域を抽出し,その情報を一画面のラベ
ル画像情報として出力する連結領域の抽出方法におい
て, (a) 入力された2値画像データを記憶する工程と, (b) 2値画像データから連結成分を算出し,その連結成
分にラベルを付したラベル画像を作成するラベリング処
理を行って,ラベル画像を記憶する工程と, (c) 連結成分の外接方形の画面上の座標を算出して記憶
する工程と, (d) 該工程(c) によって算出された各外接方形について
他の外接方形との重なりの有無を判定する工程と, (e) 該工程(d) によって重なり有と判定された親の外接
方形を,その内部に含まれるラベルに基づいて子の外接
方形に細分割し,子の外接方形の座標を求める工程と, (f) 該工程(e) によって細分割された子の外接方形のラ
ベル数が単一か複数かを判定する工程と, (g) 該工程(a) によって記憶された2値画像と,該工程
(d) によって重なり無と判定された外接方形の座標と,
該工程(f) によってラベル数が単一と判定された親及び
子の外接方形の座標と,ラベル数が複数と判定された親
の外接方形のラベル画像とから成るデータを出力する工
程とを設けることを特徴とする連結領域の抽出方法。
16. An image processing apparatus that performs image processing based on label image information extracts a connected region of pixels from input binary image data and outputs the information as label image information for one screen. In the method of extracting a connected region, (a) a step of storing the input binary image data, and (b) calculating a connected component from the binary image data, and creating a label image with the connected component labeled. The process of labeling and storing the label image, (c) the process of calculating and storing the coordinates on the screen of the circumscribed rectangle of the connected component, and (d) the circumscribed tangent calculated by the process (c). A step of determining whether or not a rectangle overlaps with other circumscribing rectangles; and (e) a circumscribed rectangle of the parent determined to have overlap in step (d), and a circumscribed child of the child based on the label contained inside. Subdivided into squares, circumscribed rectangle of child And (f) determining whether the number of labels of the circumscribed rectangle of the child subdivided by the step (e) is single or plural, and (g) storing it by the step (a). Binary image and the process
The coordinates of the circumscribed rectangle determined to be non-overlapping in (d),
A step of outputting data consisting of the coordinates of the circumscribed rectangle of the parent and the child whose number of labels is determined to be single by the step (f) and the label image of the circumscribed rectangle of the parent whose number of labels is determined to be plural. A method for extracting a connected region, which is characterized by being provided.
【請求項17】 ラベル画像情報に基づいて画像処理を
行う画像処理装置に対して,入力された2値画像データ
から画素の連結領域を抽出し,その情報を一画面のラベ
ル画像情報として出力する連結領域の抽出方法におい
て, (a) 入力された2値画像データを記憶する工程と, (b) 2値画像データから連結成分の外接方形を算出し,
各外接方形にラベルを付して記憶する工程と, (c) 該工程(b) によって算出された各外接方形について
他の外接方形との重なりの有無を判定する工程と, (d) 該工程(c) によって重なり有と判定された外接方形
に対してラベリング処理を行って,そのラベル画像を作
成し記憶する工程と, (e) 該工程(d) によって作成されたラベル画像の親の外
接方形を,その内部に含まれるラベルを基に子の外接方
形に細分割し,子の外接方形の座標を求める工程と, (f) 該工程(e) によって細分割された子の外接方形のラ
ベル数が単一か複数かを判定する工程と, (g) 該工程(a) によって記憶された2値画像と,該工程
(c) によって重なり無と判定された外接方形の座標と,
該工程(f) によってラベル数が単一と判定された親及び
子の外接方形の座標と,ラベル数が複数と判定された親
の外接方形のラベル画像とから成るデータを出力する工
程とを設けることを特徴とする連結領域の抽出方法。
17. An image processing apparatus that performs image processing based on label image information extracts a connected area of pixels from input binary image data and outputs the information as label image information for one screen. In the method of extracting a connected region, (a) storing the input binary image data, and (b) calculating the circumscribed rectangle of the connected component from the binary image data,
Labeling and storing each circumscribed rectangle; (c) determining whether or not each circumscribed rectangle calculated in step (b) overlaps another circumscribed rectangle; and (d) the process. Labeling processing is performed on the circumscribing rectangles that are determined to have overlap in (c), and the label image is created and stored; and (e) The circumscribed parent of the label image created in step (d). The step of subdividing the rectangle into the circumscribed rectangles of the child based on the labels contained in the rectangle to obtain the coordinates of the circumscribed rectangle of the child, and (f) the circumscribed rectangle of the child subdivided by the step (e). A step of determining whether the number of labels is single or plural; (g) a binary image stored in the step (a);
The coordinates of the circumscribed rectangle determined as non-overlapping in (c),
A step of outputting data consisting of the coordinates of the circumscribed rectangle of the parent and the child whose number of labels is determined to be single by the step (f) and the label image of the circumscribed rectangle of the parent whose number of labels is determined to be plural. A method for extracting a connected region, which is characterized by being provided.
【請求項18】 前記(g) の出力工程は,ラベルが複数
と判定された親の外接方形のラベル画像の代わりに,そ
のラベルを1に置換したデータとラベルとを出力するこ
とを特徴とする請求項16又は17記載の連結領域の抽出方
法。
18. The output step (g) is characterized in that, instead of the circumscribed rectangular label image of the parent whose label is determined to be plural, the label is replaced with 1 and the output data and the label are output. 18. The method for extracting a connected region according to claim 16 or 17.
【請求項19】 ラベル画像情報に基づいて画像処理を
行う画像処理装置に対して,入力された2値画像データ
から画素の連結領域を抽出し,その情報を一画面のラベ
ル画像情報として出力する連結領域の抽出方法におい
て, (a) 入力された2値画像データを記憶する工程と, (b) 2値画像データから連結成分の外接方形を算出し,
各外接方形にラベルを付して記憶する工程と, (c) 該工程(b) によって算出された各外接方形について
他の外接方形との重なりの有無を判定する工程と, (d) 該工程(c) によって重なり有と判定された外接方形
にラベリング処理を行って,そのラベル画像を作成する
工程と, (e) 該工程(d) によって作成されたラベル画像の親の外
接方形を,その内部に含まれるラベルを基に子の外接方
形に細分割し,さらに子の外接方形を内部に含まれるラ
ベル数が単一になるまで細分割する操作を繰り返し,ラ
ベル数が単一になったときの各々の子の外接方形の座標
を求める工程と, (f) 該工程(a) によって記憶された2値画像と,該工程
(c) によって重なり無と判定された外接方形の座標と,
該工程(e) によって求められた親及び各々の子の外接方
形とから成るデータを出力する工程とを設けることを特
徴とする連結領域の抽出方法。
19. An image processing apparatus that performs image processing based on label image information extracts a connected region of pixels from input binary image data and outputs the information as label image information for one screen. In the method of extracting a connected region, (a) storing the input binary image data, and (b) calculating the circumscribed rectangle of the connected component from the binary image data,
Labeling and storing each circumscribed rectangle; (c) determining whether or not each circumscribed rectangle calculated in step (b) overlaps another circumscribed rectangle; and (d) the process. The step of creating a label image by performing labeling processing on the circumscribing rectangle determined to have overlap in (c) and (e) the circumscribed rectangle of the parent of the label image created in step (d) are Repeatedly subdivide the child's circumscribed rectangle based on the labels contained inside, and further subdivide the child's circumscribed rectangle until the number of labels contained inside becomes single, resulting in a single label. And (f) the binary image stored in step (a), and the step of obtaining the coordinates of the circumscribed rectangle of each child
The coordinates of the circumscribed rectangle determined as non-overlapping in (c),
And a step of outputting data consisting of a parent and a circumscribed rectangle of each child obtained in the step (e).
【請求項20】 前記(f) のラベル数を判定する工程
は,親の外接方形に対してラベリング処理を行ってその
ラベル画像を求め,親の外接方形のラベルと細分割され
た各々の子の外接方形のラベルとを比較することによっ
て,ラベル数が単一か複数かを判定することを特徴とす
る請求項16又は17記載の連結領域の抽出方法。
20. In the step (f) of determining the number of labels, a labeling process is performed on the circumscribed rectangle of the parent to obtain its label image, and the label of the circumscribed rectangle of the parent and each child subdivided. 18. The method for extracting a connected region according to claim 16, wherein it is determined whether the number of labels is single or plural by comparing with the circumscribed rectangular label.
【請求項21】 前記(e) の細分割する工程は,親の外
接方形に対してラベリング処理を行ってそのラベル画像
を求め,各々の子の外接方形のラベルが親の外接方形の
ラベルに対する一致/不一致を示す属性をラベルの比較
によって求める工程(g) を有し, 前記(f) の出力工程は各々の子の外接方形の座標,及び
該工程(g) によって求められた属性データを出力するこ
とを特徴とする請求項19記載の連結領域の抽出方法。
21. In the step (e) of subdividing, a labeling process is performed on the circumscribed rectangle of the parent to obtain its label image, and the circumscribed quadrangle label of each child corresponds to the circumscribed quadrangle label of the parent. There is a step (g) for finding the attribute indicating the match / mismatch by comparing the labels, and the output step in (f) above includes the coordinates of the circumscribed rectangle of each child and the attribute data found by the step (g). 20. The method for extracting a connected area according to claim 19, wherein the extraction is performed.
【請求項22】 前記(g) の工程は親の外接方形を,属
性を求めるべき子の外接方形を含むようにし,分割した
領域に対してラベリング処理を行って求めたラベル画像
に基づいて,属性を判定することを特徴とする請求項21
記載の連結領域の抽出方法。
22. In the step (g), the circumscribed rectangle of the parent is made to include the circumscribed rectangle of the child whose attribute is to be determined, and based on the label image obtained by performing the labeling process on the divided regions, 22. Attribute determination
A method for extracting a connected region as described.
JP18937594A 1994-05-31 1994-08-11 Apparatus and method for extracting connected area Expired - Fee Related JP3368511B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP18937594A JP3368511B2 (en) 1994-08-11 1994-08-11 Apparatus and method for extracting connected area
KR1019950013888A KR100228618B1 (en) 1994-05-31 1995-05-30 Method and apparatus for assigning temporary and true labels to digital image
US08/959,712 US6081618A (en) 1994-05-31 1997-10-28 Method and an apparatus for extracting a connected element from a binary image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18937594A JP3368511B2 (en) 1994-08-11 1994-08-11 Apparatus and method for extracting connected area

Publications (2)

Publication Number Publication Date
JPH0855219A JPH0855219A (en) 1996-02-27
JP3368511B2 true JP3368511B2 (en) 2003-01-20

Family

ID=16240271

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18937594A Expired - Fee Related JP3368511B2 (en) 1994-05-31 1994-08-11 Apparatus and method for extracting connected area

Country Status (1)

Country Link
JP (1) JP3368511B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3411472B2 (en) 1997-05-30 2003-06-03 富士通株式会社 Pattern extraction device
JP3422924B2 (en) 1998-03-27 2003-07-07 富士通株式会社 CHARACTER RECOGNITION DEVICE, CHARACTER RECOGNITION METHOD, AND COMPUTER-READABLE RECORDING MEDIUM RECORDING PROGRAM FOR CAUSING COMPUTER TO EXECUTE THE METHOD
JP3845045B2 (en) 2002-07-23 2006-11-15 株式会社リコー Image processing apparatus, image processing method, image forming apparatus, printing apparatus, and host PC
JP4710304B2 (en) * 2004-11-12 2011-06-29 ソニー株式会社 Data transfer control device

Also Published As

Publication number Publication date
JPH0855219A (en) 1996-02-27

Similar Documents

Publication Publication Date Title
US5416849A (en) Data processing system and method for field extraction of scanned images of document forms
US5048099A (en) Polygon-based method for automatic extraction of selected text in a digitized document
JP2993673B2 (en) Electronic file device
JP4757001B2 (en) Image processing apparatus and image processing method
JPH07107694B2 (en) Document processor
US6711292B2 (en) Block selection of table features
JP2608571B2 (en) Apparatus and method for vectorizing input scanned image data
JPS6055475A (en) Extracting device of boundary line
JP3368511B2 (en) Apparatus and method for extracting connected area
JPH10513284A (en) Automatic determination of blank pages and character frames for binary images
JPH0256707B2 (en)
JPS62131382A (en) Vector conversion system for binary picture
JP3070801B2 (en) Drawing management method
JP2979588B2 (en) Image processing apparatus and image data management / processing method thereof
JPH07325921A (en) Device and method for extracting connected area
JPH01129358A (en) Arithmetic unit for table numerical value
JP2003296726A (en) Method, device and program for converting drawing and recording medium
JP2005055996A (en) Computerized storage method of drawing, computerized storage system of drawing, and drawing data providing system
JPH06187438A (en) Coordinate data compressing and restoring device
JPH05108740A (en) Band graph recognizing device
CN115641601A (en) Vehicle part document processing method, device, equipment and storage medium
JPH07104940B2 (en) Figure recognition device
JP2993880B2 (en) Electronic file device
JPH05174150A (en) Circular graph recognition device
JP3078038B2 (en) Automatic drawing input system and method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20021008

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081115

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081115

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091115

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101115

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101115

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111115

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111115

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121115

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees