JP2001175858A - High-speed labeling system - Google Patents

High-speed labeling system

Info

Publication number
JP2001175858A
JP2001175858A JP35905199A JP35905199A JP2001175858A JP 2001175858 A JP2001175858 A JP 2001175858A JP 35905199 A JP35905199 A JP 35905199A JP 35905199 A JP35905199 A JP 35905199A JP 2001175858 A JP2001175858 A JP 2001175858A
Authority
JP
Japan
Prior art keywords
pixel
label
line
labeling
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP35905199A
Other languages
Japanese (ja)
Other versions
JP4763113B2 (en
Inventor
Masanori Yabuki
眞紀 矢吹
Shinichi Eguchi
真一 江口
Koichi Kanemoto
浩一 金元
Katsutoshi Obara
勝利 小原
Nobukazu Chiba
亘一 千葉
Toshiyuki Wakita
利之 淮田
Kazunori Yamamoto
一範 山本
Yutaka Katsumata
裕 勝又
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 JP35905199A priority Critical patent/JP4763113B2/en
Publication of JP2001175858A publication Critical patent/JP2001175858A/en
Application granted granted Critical
Publication of JP4763113B2 publication Critical patent/JP4763113B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To allocate label values while shortening a retrieval time as compared with the retrieval of all patterns without managing label allocation as to all window patterns as a high-speed labeling system which allocates temporary labels to respective pixels of image information and converts them into real labels. SOLUTION: This system is equipped with an interest-pixel and nearby-pixel extraction part which matches pixels at the same positions of a labeling line including a pixel of interest as an object pixel of label value allocation and a pixel of interest for extracting pixels nearby it and the reference line right above the line and detects plural pixels until a discrepancy is detected and an allocation knowledge matching part which matches labeling knowledge information having a prescribed temporary label giving method for previously given nearby pixel environment, and further equipped with a temporary label constitution part which updates the connection relation between labeling and labels according to the temporary label giving method.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は画像中の複数の領域
を分離区別するための高速ラベリング方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a high-speed labeling system for separating and distinguishing a plurality of regions in an image.

【0002】近年,金融文書,ビジネス文書等を情報処
理システムへ入力するための周辺機器として,文字認識
装置(OCRという:Optical Charactor Reader) の需
要が増大している。
In recent years, as a peripheral device for inputting financial documents, business documents and the like to an information processing system, a demand for a character recognition device (OCR: Optical Charactor Reader) has been increasing.

【0003】OCRでは,文字切り出して,個々の文字
の認識率を高めるには,認識の前段階である切り出し処
理を正確に行うことが重要である。これまでは,帳票等
の文字記入位置を予め指定した文書(ドロップアウトカ
ラーではなく,黒枠や罫線等と文字が同じ色,または濃
度で書かれたもの)に対し,指定した範囲内に文字が正
しく書かれてあれば,かなりの率で文字を自動認識でき
たが,少しでも指定した範囲を超えて指定範囲を示す枠
や罫線に接触,またははみ出しが生じると,著しく認識
率が低下していた。
In the OCR, in order to cut out characters and increase the recognition rate of individual characters, it is important to accurately perform cutout processing, which is a pre-recognition stage. Until now, for a document (such as a form in which the text is written in the same color or density as the black frame or ruled line, instead of the dropout color), the characters are specified within the specified range. If it was written correctly, characters could be recognized automatically at a considerable rate. However, the recognition rate would drop significantly if the frame or ruled line indicating the specified range exceeded or slightly exceeded the specified range. Was.

【0004】このように,罫線,枠に触れている文字か
ら,文字だけを正確に切り出すための前処理を行うため
にラベリング処理が用いられており,その高速化が望ま
れている。なお,ラベリング処理の技術は,OCRだけ
でなく,印刷文字認識装置,図面認識における文字,記
号の切り出し,画像中の罫線と物体,図形,文字の接触
部分の分離等のように直線と広い意味での図形が重なっ
たパターンからその図だけ抽出する場合にも使用され
る。
[0004] As described above, labeling processing is used to perform preprocessing for accurately cutting out only characters from characters touching ruled lines and frames, and it is desired to increase the speed. Note that labeling processing technology is not limited to OCR, but can be broadly defined as a straight line such as a print character recognition device, cutting out characters and symbols in drawing recognition, and separating ruled lines in an image from contact portions of objects, figures, and characters. It is also used when extracting only the figure from the pattern in which the figures are overlapped.

【0005】[0005]

【従来の技術】図11は従来例の説明図である。2. Description of the Related Art FIG. 11 is an explanatory view of a conventional example.

【0006】従来のラスタ走査型ラベリング処理の方法
を説明する。最初に,1 回目のラスタ走査で,背景でな
い画像部分に仮ラベルを割り付けると共に,仮ラベル間
の接続関係を検出し,次にこの接続関係を整理すること
で,仮ラベルから実ラベルへの変換テーブルを作成し,
続いて2回目のラスタ走査で変換テーブルを参照しなが
ら,仮ラベル画像を実ラベル画像に変換する処理を行
う。
A conventional raster scanning type labeling method will be described. First, in the first raster scan, temporary labels are assigned to the image parts that are not the background, the connection relation between the temporary labels is detected, and this connection relation is rearranged to convert the temporary labels into actual labels. Create a table,
Subsequently, a process of converting the temporary label image into an actual label image is performed by referring to the conversion table in the second raster scan.

【0007】ラスタ走査のラベリング処理を実行する場
合,図11のA.に示すようなウインドウを設定して,
このウインドウを水平方向/垂直方向に1画素ずつずら
しながら,このウインドウに含まれる画素のラベルを見
ながら注目画素に対し仮ラベルを割り付けるものであ
る。すなわち,図11のAに示すように,注目画素(仮
ラベルが付与される対象となる画素)が“1”(文字等
の画像を表す画素の値)の場合に,これに隣接する4つ
の画素(注目画素の左上画素,真上の画素,右上画素及
び左画素)のラベルを識別して,4画素中に0でないラ
ベルのものがあれば図11のB.に示すようにそのラベ
ル値を注目画素の仮ラベル値として設定し,4画素の何
れも0のラベルであれば図11のC.に示すように新規
ラベル値を注目画素の仮ラベル値として設定する。
When the raster scanning labeling process is executed, the process shown in FIG. Set the window as shown in
While shifting this window by one pixel in the horizontal direction / vertical direction, a temporary label is assigned to the target pixel while looking at the labels of the pixels included in this window. That is, as shown in FIG. 11A, when the target pixel (pixel to which a temporary label is to be assigned) is “1” (the value of a pixel representing an image of a character or the like), four adjacent pixels The labels of the pixels (the upper left pixel, the pixel immediately above, the upper right pixel, and the left pixel of the target pixel) are identified, and if any of the 4 pixels has a label other than 0, the label B. in FIG. As shown in FIG. 11, the label value is set as the temporary label value of the pixel of interest. The new label value is set as the temporary label value of the target pixel as shown in FIG.

【0008】図12〜図14は従来のラベリング処理の
説明図(その1)〜(その3)である。
FIGS. 12 to 14 are explanatory diagrams (part 1) to (part 3) of a conventional labeling process.

【0009】図12の(a) に示す2値化画像を処理対象
とする場合,1回目のラスタ走査で,背景でない画像部
分について注目画素が仮ラベルの割り付けられた画素に
接続する場合には,その仮ラベルを注目画素に割り付け
ていくと共に,仮ラベルの割り付けられた画素に割り付
けていくことで,図12の(b) に示すような仮ラベルを
割り付けると共に,仮ラベル1は仮ラベル2,3と接続
するという,図13の(a) に示すような接続関係を検出
する。次に,この接続関係を整理することで,仮ラベル
1はどの仮ラベルとも接続せず,仮ラベル2は仮ラベル
1と接続し,仮ラベル3は仮ラベル1と接続し,仮ラベ
ル4はどの仮ラベルとも接続せずといった,図13の
(b) に示す接続テーブルを作成して,この接続テーブル
を更に整理することで,仮ラベル1には実ラベル1,仮
ラベル2には実ラベル1,仮ラベル3には実ラベル1,
仮ラベル4には実ラベル2を割り付けるという図13の
(c)に示す変換テーブルを作成する。なお,背景には実
ラベル0が割り付けられる。続いて2回目のラスタ走査
で,この変換テーブルを参照しながら仮ラベル画像を実
ラベル画像に変換することで,図14に示すような実ラ
ベルが割り付けられる。
In the case where the binarized image shown in FIG. 12A is to be processed, in the first raster scan, when the pixel of interest is connected to a pixel to which a temporary label is assigned for an image portion other than the background, By assigning the temporary label to the target pixel and assigning the temporary label to the pixel to which the temporary label is assigned, the temporary label as shown in FIG. , 3 are detected as shown in FIG. 13 (a). Next, by rearranging this connection relationship, the temporary label 1 is not connected to any temporary label, the temporary label 2 is connected to the temporary label 1, the temporary label 3 is connected to the temporary label 1, and the temporary label 4 is connected to the temporary label 1. FIG. 13 shows that no connection is made with any temporary label.
By creating the connection table shown in (b) and further organizing this connection table, the temporary label 1 has the real label 1, the temporary label 2 has the real label 1, and the temporary label 3 has the real label 1,
In FIG. 13, the actual label 2 is assigned to the temporary label 4.
Create the conversion table shown in (c). Note that a real label 0 is assigned to the background. Subsequently, in the second raster scan, the temporary label image is converted into the real label image while referring to this conversion table, so that the real labels as shown in FIG. 14 are allocated.

【0010】上記仮ラベルの割り付けを図11のような
ウインドウを用いて1画素ずつずらして仮ラベルを割り
付ける従来の方法によると,仮ラベルの割り付けに時間
がかかるという問題があった。
According to the conventional method of assigning temporary labels by shifting the assignment of temporary labels one pixel at a time using a window as shown in FIG. 11, there is a problem that it takes time to assign temporary labels.

【0011】これを改良するために本発明と同じ出願人
により先に「仮ラベル割付処理方式と実ラベル割付処理
方式」(特願平5−237552号:特開平7−935
39号公報)が提案された。この提案された方式の概要
を説明すると,予め2×X画素の大きさを持つウインド
ウを水平方向には重複することなく移動させ,垂直方向
に1画素ずつずらして移動させる制御を行い,上段列を
参照ラインとしウインドウの下段列を注目ラインとし
て,下段列の各画素に割りつける仮ラベルの割付方法を
記述する複数のラベル割付ルールを,ウインドウ内画素
の示す2値化パターンと対応付けて管理する手段を備
え,ウインドウが新たな位置に移動するとウインドウ内
画素の2値化パターンを特定し,特定された2値化パタ
ーンに従って対応するラベル割付ルールを検索し,検索
されたラベル割り付けルールに従って,ウインドウの下
段列の各画素に仮ラベルを割り付けるものである。
In order to improve this, the same applicant as the present invention has previously described "temporary label allocation processing method and actual label allocation processing method" (Japanese Patent Application No. 5-237552: Japanese Patent Application Laid-Open No. 7-935).
No. 39) has been proposed. The outline of the proposed method is as follows. Control is performed such that a window having a size of 2 × X pixels is moved in the horizontal direction without overlapping, and shifted by one pixel in the vertical direction. Is used as a reference line, and the lower row of the window is set as a target line, and a plurality of label allocation rules that describe a temporary label allocation method to be allocated to each pixel in the lower row are managed in association with the binarization pattern indicated by the pixels in the window. When the window moves to a new position, the binarization pattern of the pixel in the window is specified, a corresponding label allocation rule is searched according to the specified binarization pattern, and according to the searched label allocation rule, A temporary label is assigned to each pixel in the lower row of the window.

【0012】図15は提案された方式によるラベル付け
の1例を示す。
FIG. 15 shows an example of labeling according to the proposed method.

【0013】図15にはa〜hで表す各行にウインドウ
のパターンが設定され,a,bは2行×4画像(上段の
4画素と下段の4画素)のパターン,c〜hは2×2
(上段の2画素と下段の2画素)のパターンであり,各
パターンを構成する画素は白が背景を表し,黒が画像
(文字や図形の線)を表し,それぞれ上段の画素が参照
ラインで,下段の各画素が注目画素(下段の全て画像)
である。
In FIG. 15, a window pattern is set in each row represented by a to h, a and b are patterns of 2 rows × 4 images (4 pixels in the upper row and 4 pixels in the lower row), and c to h are 2 × 2
(Upper two pixels and lower two pixels), the pixels constituting each pattern are white for the background, black for the image (character or figure line), and the upper pixel for each reference line. , Each pixel in the lower row is the pixel of interest (all lower images)
It is.

【0014】図15において,aのパターンは上段と下
段の各4画素が全て背景の画素である例で,この場合
は,下段の4画素に対してラベルは付与されず,背景を
表す0が割り付けられる。bのパターン上段と下段の各
4画素が全て画像の画素である例で,この場合は,下段
の4画素に対してラベルは上段の参照ラインに割り付け
られているラベル(Xで表す)と同一のXのラベルが付
与される。c,dの場合は,注目画素が何れも背景の画
素(0の値)であり,この場合はラベルは割り付けられ
ない。eの場合は,下段の注目画素の中の右側の画素に
対しY(新規仮ラベル番号)が割り付けられ,左側は割
り付けられない(0のまま)。fの場合は,上段と下段
の2つの画素が「01」の場合であり,下段の右側の注
目画素に対し上段の右側の画素に割り付けられたラベル
と同じラベル(Xで表す)が割り付けられる。またはg
のパターンの場合,注目画素の下段の左側の画素に対し
ラベルZを付与する。但し,Zは直前画素が黒画素の場
合,それと同一ラベルを付けて,直前の2画素が白画素
の場合,Zは新規仮ラベル番号となる。hのパターンで
は,注目画素の下段の右側に画素に対しラベルZを割付
方法に示すようにして割り付けられる。
In FIG. 15, the pattern a is an example in which the upper and lower four pixels are all background pixels. In this case, no label is assigned to the lower four pixels, and 0 representing the background is replaced by 0. Assigned. This is an example in which the upper and lower four pixels of the pattern b are all pixels of the image. In this case, the label for the lower four pixels is the same as the label (represented by X) assigned to the upper reference line. X is given. In the case of c and d, the target pixel is a background pixel (a value of 0), and in this case, no label is assigned. In the case of e, Y (new temporary label number) is assigned to the pixel on the right side of the target pixel at the lower stage, and is not assigned on the left side (leave 0). The case of f is a case where the upper and lower two pixels are “01”, and the same label (represented by X) as the label allocated to the upper right pixel is assigned to the lower right pixel of interest. . Or g
In the case of the pattern of (1), a label Z is assigned to a pixel on the lower left side of the target pixel. However, if the immediately preceding pixel is a black pixel, Z is given the same label, and if the immediately preceding two pixels are white pixels, Z is a new temporary label number. In the pattern of h, a label Z is assigned to the pixel on the lower right side of the target pixel as shown in the assignment method.

【0015】図16は上記提案された方式による実ラベ
ル割付処理方式の説明図であり,はある画像の外接矩
形(画像を表す図形に外接する矩形)であり,はの
図形に接する画像の外接矩形を表す。仮ラベルの初期値
として実ラベルの初期値を用いる従来の方法では正確に
実ラベルが割り付けられなくなるので,これを防止する
ために,図16の方式では,外接矩形単位で仮ラベルを
実ラベルに割り付けるが,予め仮ラベルの初期値を実ラ
ベルの初期値と異ならせて割り付け,図16の(a) に示
す例ではの外接矩形内については仮ラベルL,L+
1,L+2というように割り付け,の外接矩形内につ
いては仮ラベルL,L+2が割り付けられている。
FIG. 16 is an explanatory diagram of the actual label allocation processing method according to the above proposed method, where は is a circumscribed rectangle of an image (a rectangle circumscribed to a graphic representing an image), and Represents a rectangle. In the conventional method that uses the initial value of the real label as the initial value of the temporary label, the actual label cannot be assigned accurately. To prevent this, in the method of FIG. The temporary label is assigned in advance by making the initial value of the temporary label different from the initial value of the real label. In the example shown in FIG.
The temporary labels L and L + 2 are allocated in the circumscribed rectangle of 1, L + 2.

【0016】この(a) に示す各外接矩形, の仮ラベ
ルを実ラベルに変換する場合, 仮ラベル1を実ラベル1
に,仮ラベル(L+1)を実ラベル1に,仮ラベル(L
+2)を実ラベル2に,L以下の実ラベルはそのままと
するように変換される。これにより,図16の(b) に示
すようにの外接矩形内の仮ラベルL/(L+1)は実
ラベル1に変換され,仮ラベル(L+2)は実ラベル2
に変換される。続いての外接矩形内について変換処理
が行われることで,図16の(c) に示すように,外接矩
形の仮ラベル(L+2)は実ラベル2に変換され,仮
ラベルとして扱われる実ラベル2はそのままの値を維持
し,正確な実ラベルの割り付けが実現される。
When converting the temporary label of each circumscribed rectangle shown in (a) into a real label, the temporary label 1 is replaced with the real label 1
And the temporary label (L + 1) as the real label 1 and the temporary label (L
+2) is converted to the real label 2 and the real labels below L are left as they are. As a result, the temporary label L / (L + 1) in the circumscribed rectangle as shown in FIG. 16B is converted into the real label 1 and the temporary label (L + 2) is converted into the real label 2
Is converted to Subsequently, the conversion process is performed on the inside of the circumscribed rectangle, so that the temporary label (L + 2) of the circumscribed rectangle is converted into the real label 2 as shown in FIG. Keeps the value as it is, and accurate real label assignment is realized.

【0017】[0017]

【発明が解決しようとする課題】上記提案されたウイン
ドウパターンのラベル割付方法では,全てのウインドウ
パターンを作成することが困難であり,また,全パター
ン作成した場合には,どのパターンに対応するかを検索
するのに時間を要するという問題があった。
It is difficult to create all the window patterns by the above-described method of assigning labels to the window patterns, and when all the patterns are created, which pattern should be used? There is a problem that it takes time to search for.

【0018】本発明は全ウインドウパターンについてラ
ベル割付を管理することなく,検索時間も全パターンを
検索するより短縮してラベル値の割付を行うことができ
る高速ラベリング方式を提供することを目的とする。
An object of the present invention is to provide a high-speed labeling method capable of allocating label values with a shorter search time than searching all patterns without managing label allocation for all window patterns. .

【0019】[0019]

【課題を解決するための手段】図1は本発明の原理構成
を示す図である。図中,1は全白ライン抽出部,2は注
目画素と近傍画素抽出部,3は割付知識照合部,4は割
付知識格納部,5は仮ラベル構成部,6は真ラベル構成
部,7は記憶部であり,7aはラスタ走査により得られ
た画像データ格納部,7bは黒画素検出位置格納部,7
cは注目画素と近傍画素格納部,7dは割付知識照合結
果格納部,7eは仮ラベルデータ格納部,7fは真ラベ
ルデータ格納部である。
FIG. 1 is a diagram showing the principle configuration of the present invention. In the figure, 1 is an all white line extracting unit, 2 is a pixel of interest and neighboring pixel extracting unit, 3 is an assigned knowledge collating unit, 4 is an assigned knowledge storing unit, 5 is a temporary label forming unit, 6 is a true label forming unit, 7 Is a storage unit, 7a is an image data storage unit obtained by raster scanning, 7b is a black pixel detection position storage unit, 7a
Reference numeral c denotes a target pixel and neighboring pixel storage unit, 7d denotes an allocation knowledge collation result storage unit, 7e denotes a temporary label data storage unit, and 7f denotes a true label data storage unit.

【0020】本発明は注目画素の近辺の画素に対し,予
め設定されたルールに従い,集団の注目画素に一度にラ
ベル付けを行うものである。
According to the present invention, the pixels in the vicinity of the target pixel are labeled at once according to a preset rule.

【0021】最初に,ラスタ走査により得られた画像デ
ータについて,全白ライン抽出部1はラスタ走査により
画像データが得られるとこれを記憶部7の画像データ格
納部7aに格納する。この画像データについて各画素が
行方向(または列方向)に画像の画素(線または黒を表
すビット値を持つ画素)が全く無いラインの抽出を行
う。この時,全白ラインが抽出されると,続くラインに
ついても抽出を行って白ラインの連続を検出し,それら
の全白ラインについては真ラベル構成部6が駆動され
て,真ラベル(実ラベルと同じ)の割当てを行う。全白
ライン抽出部1の抽出動作中に黒画素を検出すると,そ
の黒画素位置を記憶部7の黒画素検出位置格納部7bに
格納する。黒画素が検出されたラインに対して注目画素
と近傍画素抽出部2による抽出動作が行われ,黒画素を
含む画像の矩形領域に垂直方向の最上位のラインから順
番にラベル付けラインとその上の参照ラインの対応する
画素を照合して一致する画素の個数を検出して注目画素
と近傍画素を抽出し,記憶部7の注目画素と近傍画素格
納部7cに格納する。続いて,割付知識照合部3の動作
により予め注目画素状態のパターンに対応する仮ラベル
の割付方法が規定された割付知識格納部4の内容と照合
し,仮ラベル割付方法を獲得すると照合結果を記憶部7
の割付知識照合結果格納部7dに格納し,仮ラベル構成
部5において仮ラベル割付方法に従ってラベル付けライ
ンに対し仮ラベルを割り付けて記憶部7の仮ラベルデー
タ格納部7eに格納する。続いて,真ラベル構成部6に
より従来技術を用いて仮ラベルの接続関係の存在に応じ
て,真ラベル(実ラベル)を割り付けて記憶部7の真ラ
ベルデータ格納部7fに格納する。この真ラベルデータ
格納部7fの内容は印刷または表示として出力すること
ができる。
First, with respect to the image data obtained by the raster scanning, when the image data is obtained by the raster scanning, the all white line extracting unit 1 stores the image data in the image data storage unit 7a of the storage unit 7. With respect to this image data, a line is extracted in which each pixel has no pixel (pixel having a bit value representing a line or black) in the image in the row direction (or the column direction). At this time, when all the white lines are extracted, the succeeding lines are also extracted to detect the continuation of the white lines, and the true label forming unit 6 is driven for these all white lines, and the true label (real label) is output. The same as above). When a black pixel is detected during the extraction operation of the all white line extraction unit 1, the black pixel position is stored in the black pixel detection position storage unit 7b of the storage unit 7. The extraction operation of the pixel of interest and the neighboring pixel extraction unit 2 is performed on the line where the black pixel is detected, and the labeling line and the uppermost line are sequentially arranged in the rectangular area of the image including the black pixel from the topmost line in the vertical direction. The corresponding pixel of the reference line is compared and the number of matching pixels is detected to extract a target pixel and a neighboring pixel, and stored in the target pixel and neighboring pixel storage unit 7c of the storage unit 7. Subsequently, the operation of the assignment knowledge collating unit 3 compares the contents of the assignment knowledge storage unit 4 in which the assignment method of the temporary label corresponding to the pattern of the target pixel state is specified in advance. Storage unit 7
Is stored in the provisional label collation result storage unit 7d, a provisional label is allocated to the labeling line in the provisional label configuration unit 5 according to the provisional label allocation method, and is stored in the provisional label data storage unit 7e of the storage unit 7. Subsequently, a true label (real label) is allocated by the true label forming unit 6 using a conventional technique according to the existence of the connection relationship of the temporary label, and stored in the true label data storage unit 7f of the storage unit 7. The contents of the true label data storage 7f can be output as a print or a display.

【0022】[0022]

【発明の実施の形態】本発明はプログラムによりデータ
処理する情報処理装置において実施することができ,上
記図1に示す各部の処理フローと各部の関係及び具体例
と共に以下に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention can be implemented in an information processing apparatus for performing data processing by a program, and will be described below together with a processing flow of each section shown in FIG.

【0023】図2は全白ライン抽出の処理フローであ
り,上記図1の全白ライン抽出部1の機能を実現するフ
ローである。最初に2値画像のデータ(図1のエリア7
aに格納)を読込み(図2のS1),まずラインの属性
(全白ライン,黒画素を含むラインの何れか)を表す変
数yを0に設定する(同S2)。先頭(最上行)の横ラ
インの黒画素を探索し(図2のS3),黒画素があるか
判別し(同S4),黒画素がない場合は全白ラインと決
定する(同S5)。この場合,前ラインも全白ラインか
判別し(図2のS6),前ラインが全白ラインでない場
合は,新たな全白ラインでありこれに対し真ラベル構成
部による真ラベル(実ラベル)の割り付けを実行する
(同S7)。この場合,y=y2に設定する。また,前
ラインも全白ラインである場合は,y=y3に設定して
次の縦ライン(次の行)に移行する(図2のS12)。
続いて全ライン終了か判別し(同S13),終了しない
場合はS3に移行して同様の処理が繰り返され,終了し
た場合は真ラベル構成部の処理が実行される。
FIG. 2 is a processing flow for extracting the all-white line, which is a flow for realizing the function of the all-white line extracting unit 1 in FIG. First, the binary image data (area 7 in FIG. 1)
is read (S1 in FIG. 2), and first, a variable y representing the attribute of the line (either an all white line or a line including black pixels) is set to 0 (S2). A black pixel on the top (top row) horizontal line is searched (S3 in FIG. 2), and it is determined whether there is a black pixel (S4). If there is no black pixel, an all white line is determined (S5). In this case, it is determined whether the previous line is also an all-white line (S6 in FIG. 2). If the previous line is not an all-white line, it is a new all-white line, and a true label (real label) is generated by the true label component. Is assigned (S7). In this case, y = y2 is set. If the previous line is also an all-white line, y = y3 is set and the process moves to the next vertical line (next line) (S12 in FIG. 2).
Subsequently, it is determined whether or not all lines have been completed (S13). If not completed, the process proceeds to S3 and the same processing is repeated. If completed, the processing of the true label forming unit is executed.

【0024】上記S4において黒画素が検出された場
合,y=y1に設定し,その黒画素位置を記憶部に格納
する(図2のS8)。この黒画素位置は,次の注目画素
と近傍画素抽出部の処理(同S9)における処理の開始
位置として利用される。注目画素と近傍画素抽出部の処
理の内容は後述する図4に示す。
When a black pixel is detected in S4, y = y1 is set, and the position of the black pixel is stored in the storage unit (S8 in FIG. 2). This black pixel position is used as the start position of the process in the process of the next pixel of interest and neighboring pixel extraction unit (S9). The details of the processing of the target pixel and the neighboring pixel extraction unit are shown in FIG. 4 described later.

【0025】この注目画素と近傍画素抽出部の処理に続
いて,後述する割付知識照合部の処理(同S10)及び
仮ラベル構成部の処理(同S11)が順に実行される。
Subsequent to the process of the pixel of interest and neighboring pixel extraction unit, the process of the assignment knowledge collation unit (S10) and the process of the temporary label configuration unit (S11), which will be described later, are sequentially executed.

【0026】図3は全白ライン抽出処理の具体例を示
す。図3の(1) はラスタ走査により得られた2値画像で
あり,これに対し上記図2の全白ライン抽出の処理によ
り,図3の(2) のような結果が得られる。すなわち, 黒
画素を含むラインy1の下側に全白ラインのy2,y3
が存在し,その下にy1のラインが存在する。また,網
掛け部分は白ライン内領域を表す。
FIG. 3 shows a specific example of the all white line extraction processing. FIG. 3 (1) is a binary image obtained by raster scanning. On the other hand, the result shown in FIG. 3 (2) is obtained by the process of extracting all white lines in FIG. That is, all white lines y2 and y3 are located below the line y1 including the black pixels.
Exists, and a line of y1 exists below it. The shaded portion represents the area within the white line.

【0027】図4は注目画素と近傍画素抽出の処理フロ
ーであり,上記図1の注目画素と近傍画素抽出部2の機
能を実現する処理フローである。最初に処理の対象とな
る画像データとして予め水平方向サイズ(xx)と垂直
方向サイズ(yy)が既知の値としてファイルにより与
えられ,処理の開始時にこれらのサイズを設定する(図
4のS1)。次に先頭の行から処理を行うため垂直方向
(y方向)を表す変数yを0に設定し(図4のS2),
この行をラベル付けラインとし,これに対する参照ライ
ンも設定する(同S3)。この参照ラインは,最初にラ
ベルを割り付ける対象となる最上段のラベル付けライン
(y=0のライン)の上のラインであるが,この最上段
の画像は存在しないので,仮想的にラインが全て背景
(0)と同じ値を持つ00〜0に設定される(横方向の
xx画素分)。
FIG. 4 is a processing flow for extracting the target pixel and the neighboring pixel, and is a processing flow for realizing the function of the target pixel and the neighboring pixel extracting unit 2 in FIG. First, a horizontal size (xx) and a vertical size (yy) are given as known values in a file in advance as image data to be processed, and these sizes are set at the start of the process (S1 in FIG. 4). . Next, a variable y representing the vertical direction (y direction) is set to 0 to perform processing from the first row (S2 in FIG. 4),
This line is used as a labeling line, and a reference line for the line is also set (S3). This reference line is a line above the topmost labeling line (line of y = 0) to which a label is first assigned, but since this topmost image does not exist, virtually all lines are present. It is set to 00 to 0 having the same value as the background (0) (xx pixels in the horizontal direction).

【0028】次に黒画素先頭位置(上記図2のS8で記
憶)を横方向の位置を表すxの初期値に設定し(図4の
S4),続いて前画素初期値を0(背景)に設定する
(同S5)。この場合の,前画素は,水平方向(x方
向)の参照ライン及びラベル付ラインの両方のラインの
先頭画素に対しその直前に仮想的に初期値を0とする画
素を設定するものである。ここで,画像の各画素のデー
タ構造に応じて次の2つの何れかが実行される。すなわ
ち,1つの画素が8ビット以上(多値)で構成されてい
る場合は,1画素(8ビットで構成)を注目画素に設定
し(図4のS6),1画素が1ビットで構成されている
場合は,8画素(8ビットで構成)を注目画素に設定す
る(同S7)。
Next, the head position of the black pixel (stored in S8 in FIG. 2) is set to the initial value of x representing the horizontal position (S4 in FIG. 4), and the initial value of the previous pixel is set to 0 (background). (S5). In this case, as the previous pixel, a pixel whose initial value is virtually zero is set immediately before the first pixel of both the reference line and the labeled line in the horizontal direction (x direction). Here, one of the following two is executed according to the data structure of each pixel of the image. That is, when one pixel is composed of 8 bits or more (multi-valued), one pixel (consisting of 8 bits) is set as a target pixel (S6 in FIG. 4), and one pixel is composed of 1 bit. If so, 8 pixels (composed of 8 bits) are set as the target pixel (S7).

【0029】S6またはS7に続いて,同じ参照/ラベ
ル付けラインのパターンを獲得する(図4のS8)。こ
れは,上,下に並んだ参照ラインとラベル付けラインの
同じ位置(x方向)の画素同士を照合して,同じ値をと
るパターンを獲得するものである。これにより,例え
ば,先頭画素からm個の画素までが一致して,m+1画
素目で不一致になると,その参照ラインのm個の画素
と,ラベル付けラインの先頭画素が近傍画素となり,ラ
ベル付けラインの先頭画素(前画素)を除いた(m−
1)個の画素が注目画素となる。
Subsequent to S6 or S7, the same reference / labeling line pattern is obtained (S8 in FIG. 4). In this method, pixels at the same position (x direction) of a reference line and a labeling line arranged above and below are collated with each other to obtain a pattern having the same value. As a result, for example, if the first pixel and the m pixels match and the (m + 1) th pixel does not match, the m pixels of the reference line and the first pixel of the labeling line become neighboring pixels, and the labeling line Excluding the first pixel (previous pixel) of (m−
1) Pixels are pixels of interest.

【0030】これに続いて,後述する割付知識照合部の
処理が行われる(図4のS9)。その割付知識照合処理
において,参照ラインとラベル付けラインの画素の対応
付けによる一致数が増大する場合があり,その数をn個
(n≧m)とする。次いで,xの値を上記により処理が
行われた画素の隣の画素に更新し(図4のS10),そ
のxの値に対応した位置に画素があるか判別し(同S1
1),ある場合は上記S8の処理における照合一致した
最終画素を次の前画素に設定し(同S12),上記S6
またはS7の処理に戻り,新たなラインについて注目画
素と近傍画素抽出の処理を行う。
Subsequently, the processing of the assignment knowledge collating unit described later is performed (S9 in FIG. 4). In the allocation knowledge collation processing, the number of matches due to the correspondence between the pixels of the reference line and the labeling line may increase, and the number is set to n (n ≧ m). Next, the value of x is updated to a pixel adjacent to the pixel processed as described above (S10 in FIG. 4), and it is determined whether or not there is a pixel at a position corresponding to the value of x (S1).
1) In some cases, the last pixel that has been matched in the processing of S8 is set as the next previous pixel (S12), and the processing of S6 is performed.
Alternatively, the process returns to S7 to perform the process of extracting the target pixel and the neighboring pixels for the new line.

【0031】上記S11の処理において更新されたxに
対応する画素が無い場合にはそのラインの処理の対象と
なる画素が終了したことになり,このラベル付ラインに
対して仮ラベル構成部(後述する)による仮ラベルを割
り付ける処理が行われる(図4のS13)。この後,次
の参照ラインにラベル付けラインを設定し(図4のS1
4),yの値を+1して更新する(同S15)。次にy
の値がy方向の最終ライン(サイズyyに対応)以下で
あるか判別し(図4のS16),以下の場合は,次ラベ
ル付けラインについて上記S4の処理が行われ,以下同
様の処理が繰り返される。当該画像のy方向の最終ライ
ンに達した場合には,真ラベル構成部による真ラベル
(実ラベルと同じ)の割り付けが従来と同じ方法で行わ
れる(同S17)。
If there is no pixel corresponding to the updated x in the process of S11, it means that the pixel to be processed for the line has been completed, and the provisional label forming unit (described later) (Step S13 in FIG. 4). Thereafter, a labeling line is set for the next reference line (S1 in FIG. 4).
4) The value of y is incremented by 1 and updated (S15). Then y
Is determined to be equal to or smaller than the last line (corresponding to the size yy) in the y direction (S16 in FIG. 4). In the following cases, the processing in S4 is performed for the next labeling line, and the same processing is performed thereafter. Repeated. When the image reaches the last line in the y direction of the image, the assignment of a true label (the same as the actual label) by the true label forming unit is performed in the same manner as in the related art (S17).

【0032】図5はライン毎の先頭画素を初期化した近
傍画素と注目画素抽出の具体例である。
FIG. 5 shows a specific example of extracting a neighboring pixel and a pixel of interest by initializing the leading pixel of each line.

【0033】ライン毎に左端からラベル付けを行う場
合,上記図4のS5の処理により最左端の画素の更に左
側に仮の前画素を0に設定して付加する。図5の例で
は,A.に示すように画像の中の一つの参照ラインに仮
ラベルが,「001000220333044440」
と割り付けられ,このラインに続くラベル付けラインの
画素が図のように「0001110000101111
0」のパターンを備えている。この場合,参照ラインの
先頭画素のラベルが0で,ラベル付けラインの先頭画素
が0であるが,上記図4のS5の処理により,初期値が
0(背景)である架空の前画素が先頭画素の前に付加さ
れ,図4のS8の処理により図5のB.に示すような注
目画素(3つの□で表す画素)と近傍画素(参照ライン
の0001とラベル付けラインの先頭の0)が一致した
パターンとして得られる。
When labeling is performed from the left end for each line, the temporary previous pixel is set to 0 and added to the left of the leftmost pixel by the processing of S5 in FIG. In the example of FIG. As shown in the figure, the temporary label is “0010002220333044440” on one reference line in the image.
And the pixel of the labeling line following this line is “0001110000101111” as shown in the figure.
0 ”pattern. In this case, the label of the first pixel of the reference line is 0, and the first pixel of the labeling line is 0. However, by the processing of S5 in FIG. 4, the imaginary previous pixel whose initial value is 0 (background) is the first pixel. 5 is added before the pixel, and the processing of S8 in FIG. And the neighboring pixel (0001 of the reference line and 0 at the beginning of the labeling line) coincide with each other.

【0034】このように前画素を設定することで,以降
のラインの中間部分(xの値が0でない位置)の近傍画
素と注目画素抽出の処理でも最左端かどうかの識別を要
することなく,同様の流れでラベル付けを行うことがで
きる。
By setting the previous pixel in this way, it is not necessary to identify whether the pixel is the leftmost end in the process of extracting the pixel of interest and the neighboring pixel in the middle part (position where the value of x is not 0) of the subsequent line. Labeling can be performed in a similar flow.

【0035】図6は最初のラインに対する注目画素と近
傍画素抽出の具体例である。
FIG. 6 shows a specific example of extracting a target pixel and a neighboring pixel for the first line.

【0036】図6の例では,B.に示すように画像領域
を構成する各ラインの画素が先頭ラインから順番に配列
されている。この画像領域の先頭ライン(y=0)をラ
ベル付けラインとする場合に,注目画素と近傍画素の抽
出を行う場合,上記図4のS3の処理により全て背景
(0)を持つA.に示すような仮想領域(水平方向のサ
イズは画像領域のサイズと同じ)を設定する。この先頭
ラインに対する注目画素と近傍画素を抽出すると,上記
図5に示した先頭画素を前に設定する処理を含めた処理
により,C.に示すように注目画素(3個の□の画素)
と近傍画素(参照ラインが4個の0の画素とラベル付け
ラインの先頭の0の画素)が抽出される。
In the example of FIG. As shown in (1), the pixels of each line constituting the image area are arranged in order from the top line. When the head line (y = 0) of this image area is used as a labeling line and the pixel of interest and neighboring pixels are extracted, the A.P. (The size in the horizontal direction is the same as the size of the image area.) When the pixel of interest and the neighboring pixels for this top line are extracted, the processing including the processing of setting the top pixel before as shown in FIG. Pixel of interest (3 □ pixels) as shown in
And the neighboring pixels (the four 0 pixels on the reference line and the first 0 pixel on the labeling line) are extracted.

【0037】このように,最初の1ライン目が全白ライ
ンでない場合に,仮に全白ラインを参照ラインに設定す
ることで,最初の1ラインかどうかを判定する必要がな
く,2ライン以降と同様にラベル付けを行うことが可能
となる。
As described above, when the first line is not an all-white line, by setting the all-white line as a reference line, it is not necessary to determine whether the first line is the first line or not. Similarly, labeling can be performed.

【0038】図7,図8は割付知識の実施例(その
1),(その2)を示す。この割付知識には,割付知識
照合部(図1の3)において上記図4に示す処理により
得られた注目画素と近傍画素のパターンと照合される多
数のパターンが用意されている。
FIGS. 7 and 8 show embodiments (part 1) and (part 2) of the allocation knowledge. As the allocation knowledge, there are prepared a large number of patterns that are compared with the pattern of the target pixel and the neighboring pixels obtained by the processing shown in FIG. 4 in the allocation knowledge matching unit (3 in FIG. 1).

【0039】図7,図8には先頭の欄に注目画素状態が
設定され,その後に対象となるパターン例,ラベル付け
結果及びラベル割付方法の各欄が設けられている。最初
の(a) には参照ライン及びラベル付けラインが共に全部
白画素である場合で,「0000」,「00」「000
0000」のパターンについてラベル付け結果が図に示
すように0ラベルのパターンが付けられる。(b) は参照
ライン及びラベル付けラインの共に全部黒画素である場
合で, この場合は参照ラインのラベルと同一のラベル
(X)を図に示すように付けられる。(c) は, 参照ライ
ンが白画素(全部),ラベル付けラインが黒画素で右端
が白画素である場合で,直前画素に黒画素が存在すれ
ば,Y0となる(ただしYは、直前画素のラベルと同
一、そうでなければYは新規ラベルを割り付ける)。
(d) の場合ラベル付けラインが連続する白画素(参照ラ
インは不問)であり,ラベル割付は全部0となる。
In FIGS. 7 and 8, the state of the pixel of interest is set in the first column, and after that, each column of the target pattern example, labeling result and label allocation method is provided. The first (a) shows the case where both the reference line and the labeling line are all white pixels, "0000", "00", "000".
The labeling result of the pattern of “0000” is assigned a pattern of 0 label as shown in the figure. (b) is a case where both the reference line and the labeling line are all black pixels. In this case, the same label (X) as the label of the reference line is attached as shown in the figure. (c) is a case where the reference line is a white pixel (all), the labeling line is a black pixel, and the right end is a white pixel. If there is a black pixel in the immediately preceding pixel, it becomes Y0 (where Y is the immediately preceding pixel). , Otherwise Y assigns a new label).
In the case of (d), the labeling line is a continuous white pixel (the reference line is irrelevant), and the label allocation is all zero.

【0040】図8に示す(e) は参照ラインが白画素(全
部)で,ラベル付けラインの左側が白画素,右側が黒画
素の場合であり,ラベル付けは0Y,00Y,000Y
YYYである。但しYは新規仮ラベル番号である。(f)
はラベル付けラインが参照ラインと同一パターンで,左
端が白画素の場合であり,図のラベル付け結果に示すよ
うな仮ラベルが割り付けられる。(g) はラベル付けライ
ンが参照ラインと同一パターンで,左端が黒画素の場合
であり,図のラベル付け結果に示すような仮ラベルが割
り付けられる。(h) は参照ラインの左側が白画素で右側
が黒画素の時,ラベル付けラインの左側が黒画素右側は
不問であり,ラベル割付方法は,直前画素が黒画素の場
合,Zはそれと同一ラベル直前の2画素が白画素の場
合,Zは参照ラインと同一ラベルとなる。
FIG. 8E shows the case where the reference line is white pixels (all), the left side of the labeling line is white pixels, and the right side is black pixels, and the labeling is 0Y, 00Y, 000Y.
YYY. Here, Y is a new temporary label number. (f)
Indicates a case where the labeling line has the same pattern as the reference line and the left end is a white pixel, and a temporary label as shown in the labeling result in the figure is allocated. (g) shows a case where the labeling line has the same pattern as the reference line and the left end is a black pixel, and a temporary label is assigned as shown in the labeling result in the figure. (h): When the left side of the reference line is a white pixel and the right side is a black pixel, the left side of the labeling line is a black pixel and the right side is irrelevant. The label assignment method is as follows. If the two pixels immediately before the label are white pixels, Z has the same label as the reference line.

【0041】上記図7,図8に示す割付知識について
は,各パターンの順は使用頻度に応じて適用順番を更新
するようにして,効率的な照合を可能にする。
With respect to the allocation knowledge shown in FIGS. 7 and 8, the order of each pattern is updated in accordance with the frequency of use, thereby enabling efficient collation.

【0042】上記図4の注目画素と近傍画素抽出の処理
フローにより得られた注目画素と近傍画素を上記図7,
図8に示す割付知識の各パターンとの照合が割付知識照
合部(図1の3)において行われる。この処理は単純に
パターンを照合する処理であり,従来の技術により実現
することができる。
The target pixel and the neighboring pixel obtained by the processing flow of extracting the target pixel and the neighboring pixel in FIG.
The collation with each pattern of the allocation knowledge shown in FIG. 8 is performed in the allocation knowledge verification unit (3 in FIG. 1). This process is a process of simply comparing patterns, and can be realized by a conventional technique.

【0043】図9は仮ラベル付けの処理フローであり,
割付知識照合部(図1の3)による割付の後実行され,
上記図1の仮ラベル構成部5の機能を実現するものであ
る。最初に,上記の注目画素と近傍画素抽出の処理にお
いて検出された注目画素数(Ncとする)を設定する
(図9のS1)。次に注目画素の全画素に0であるか判
別し(図9のS2),全画素が0である場合は上記図7
の(a) の注目画素の状態に対応し,これに対してはNc
個にラベルとして値0を設定する(同S3)。上記S2
において,全画素が0でないことが分かると,全部同一
のL(ラベル番号)であるかの判別を行い(図9のS
4),同一である場合は上図7の(b) の注目画素の状態
に対応し,その注目画素のNc個の仮ラベルはL(番
号)に設定する(同S5)。続いて,ラベルLの矩形情
報を更新し(同S6),y=y+1する。これは,同じ
ラベルの値が上のラインから当該対象とするラインへと
継続するので,そのラベルのサイズを表す矩形情報の行
方向の値を+1する。S6の次は後述するS10へ移行
する。
FIG. 9 is a processing flow for provisional labeling.
It is executed after the assignment by the assignment knowledge collating unit (3 in FIG. 1).
This implements the function of the temporary label forming unit 5 of FIG. First, the number of target pixels (referred to as Nc) detected in the process of extracting the target pixel and the neighboring pixels is set (S1 in FIG. 9). Next, it is determined whether or not all the pixels of interest are 0 (S2 in FIG. 9).
(A) corresponds to the state of the pixel of interest, and Nc
A value 0 is set as a label for each (S3). S2 above
When it is found that all the pixels are not 0, it is determined whether or not all the pixels have the same L (label number) (S in FIG. 9).
4) If they are the same, the state corresponds to the state of the target pixel in FIG. 7B, and the Nc temporary labels of the target pixel are set to L (number) (S5). Subsequently, the rectangle information of the label L is updated (S6), and y = y + 1. Since the value of the same label continues from the upper line to the target line, the value of the rectangle information representing the size of the label in the row direction is incremented by one. After S6, the process proceeds to S10 described later.

【0044】図9において,S2,S4の何れにも該当
しない場合,次に参照ラインの同位置と同一のラベルで
あるかの判別を行う(図9のS7)。同一である場合
は,上記図8の(f) または(g) を変形した場合に該当
し, Nc個の参照ラインのラベルを注目画素に対するラ
ベルとしてコピーし(図9のS8),コピーした全ラベ
ルの矩形情報を更新する(同S9)。続いて,他のラベ
ルと接続関係を見てラベルを統合する必要があるか判別
し(図9のS10),必要があれば左画素と左端上画素
のラベルを統合し(同S11),必要がなければ終了す
る。また,上記S7の判別でNOである場合は,黒画素
にラベルK(番号)を設定し(同S12),ラベルKの
矩形情報を更新し(同S13),上記S10に移行す
る。
In FIG. 9, if none of S2 and S4 is satisfied, it is next determined whether or not the label is the same as the same position on the reference line (S7 in FIG. 9). If they are the same, this corresponds to the case where (f) or (g) in FIG. 8 is modified, and the labels of the Nc reference lines are copied as labels for the target pixel (S8 in FIG. 9). The rectangle information of the label is updated (S9). Subsequently, it is determined whether or not the labels need to be integrated by checking the connection relationship with other labels (S10 in FIG. 9). If necessary, the labels of the left pixel and the upper left pixel are integrated (S11), and If there is no, it ends. If the determination in S7 is NO, a label K (number) is set for the black pixel (S12), the rectangular information of the label K is updated (S13), and the process proceeds to S10.

【0045】図10は仮ラベル付けの具体的な動作手順
を示す。
FIG. 10 shows a specific operation procedure for provisional labeling.

【0046】注目画素は参照ラインとラベル付けライン
がそれぞれ8画素分が図に示すようなパターンを持つも
のとする(図10の)。このパターンについて上記図
7,図8に示すような割付知識と照合を行うと(図10
の),図8の(f) に規定する状態(参照ラインと同一
パターンで左端が黒画素)であることが分かる(図10
の)。これにより,(f) を適用する間の注目画素の探
索を行う(図10の)。すなわち,注目画素として上
記に示すような8画素が設定されているが,この(f)
を適用することで, 更に後続の参照ラインとラベル付け
ラインのパターンについても探索を行い, 結局25画素
まで一致することが分かる。次に,前画素を含む近傍ラ
ベル(参照ラインのラベル)を抽出する(図10の
)。図の例では,前画素のラベルがZで,その後の各
画素に対し0(背景)のラベルを挟んでA,B,C,
D,E,Fの各ラベルが付けられる。続いて上記(f) に
規定されたラベル割付方法により仮ラベルを構成するこ
とで(図10の),ラベル付けラインのラベルが参照
ラインからのコピーにより割り付けられる。この後,ラ
ベルA〜Fの各矩形情報(矩形の左上の座標x1,y1
と右下の座標x2,y2で表す)の更新が行われる(図
10の)。この例では,仮ラベルA〜Fのそれぞれに
ついて,それぞれ矩形情報のy2の値を+1(下の行に
増加させる)する。
It is assumed that the reference pixel and the labeling line for the target pixel have eight pixels each having a pattern as shown in FIG. 10 (FIG. 10). When this pattern is collated with the assignment knowledge as shown in FIGS.
(F) of FIG. 8 (the same pattern as the reference line and the left end is a black pixel).
of). As a result, the pixel of interest is searched for while applying (f) (FIG. 10). That is, eight pixels as described above are set as the pixel of interest.
By applying, the pattern of the subsequent reference line and the labeling line are also searched, and it can be seen that the pattern eventually matches up to 25 pixels. Next, a neighborhood label (reference line label) including the previous pixel is extracted (FIG. 10). In the example of the figure, the label of the previous pixel is Z, and A, B, C,
Labels D, E, and F are attached. Subsequently, by forming a temporary label by the label allocation method defined in the above (f) (FIG. 10), the label of the labeling line is allocated by copying from the reference line. Thereafter, rectangular information of labels A to F (coordinates x1, y1 at the upper left of the rectangle)
(Represented by coordinates x2 and y2 at the lower right) (FIG. 10). In this example, for each of the temporary labels A to F, the value of y2 of the rectangular information is incremented by 1 (increased to the lower row).

【0047】このようにして,各ラベル付けラインに対
して仮ラベルを割り付けられた後は,従来と同様の技術
を用いた図1の真ラベル構成部6により真ラベル(実ラ
ベル)の割り付けが行われる。
After the provisional labels are assigned to the respective labeling lines in this manner, the assignment of the true labels (real labels) is performed by the true label forming unit 6 of FIG. 1 using the same technique as the conventional technique. Done.

【0048】[0048]

【発明の効果】本発明によれば,全てのウインドウパタ
ーンについてラベル割付を管理することなく,また検索
時間も全パターンを検索するより短縮することができる
ため,ラベル値の割り付けを効果的に行うことができ
る。また,ラベル矩形の小容量化及び高速化を促進でき
る。特に,帳票等を含んだビジネス文書を扱う場合に有
効である。
According to the present invention, label values can be effectively allocated because it is not necessary to manage label allocation for all window patterns and the search time can be shortened compared to searching for all patterns. be able to. Further, the capacity and speed of the label rectangle can be reduced. This is particularly effective when dealing with business documents including forms and the like.

【0049】出願人による実際の試験での測定結果によ
れば,従来のラベリングと比較して処理時間が40%〜
60%減少した。
According to the measurement results of the actual test by the applicant, the processing time is reduced by 40% or more compared with the conventional labeling.
It decreased by 60%.

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

【図1】本発明の原理構成を示す図である。FIG. 1 is a diagram showing a principle configuration of the present invention.

【図2】全白ライン抽出の処理フローを示す図である。FIG. 2 is a diagram showing a processing flow of all white line extraction.

【図3】全白ライン抽出処理の具体例を示す図である。FIG. 3 is a diagram illustrating a specific example of an all white line extraction process.

【図4】注目画素と近傍画素抽出の処理フローを示す図
である。
FIG. 4 is a diagram showing a processing flow for extracting a target pixel and neighboring pixels.

【図5】ライン毎の先頭画素を初期化した近傍画素と注
目画素抽出の具体例を示す図である。
FIG. 5 is a diagram showing a specific example of extraction of a neighboring pixel in which a head pixel of each line is initialized and a target pixel.

【図6】最初のラインに対する注目画素と近傍画素抽出
の具体例を示す図である。
FIG. 6 is a diagram illustrating a specific example of extraction of a target pixel and neighboring pixels for a first line.

【図7】割付知識の実施例(その1)を示す図である。FIG. 7 is a diagram illustrating an example (part 1) of assignment knowledge;

【図8】割付知識の実施例(その2)を示す図である。FIG. 8 is a diagram showing an example (part 2) of allocation knowledge.

【図9】仮ラベル付けの処理フローを示す図である。FIG. 9 is a diagram showing a processing flow of provisional labeling.

【図10】仮ラベル付けの具体的な動作手順を示す図で
ある。
FIG. 10 is a diagram showing a specific operation procedure of provisional labeling.

【図11】従来例の説明図である。FIG. 11 is an explanatory diagram of a conventional example.

【図12】従来のラベリング処理の説明図(その1)で
ある。
FIG. 12 is an explanatory diagram (part 1) of a conventional labeling process.

【図13】従来のラベリング処理の説明図(その2)で
ある。
FIG. 13 is an explanatory diagram (part 2) of a conventional labeling process.

【図14】従来のラベリング処理の説明図(その3)で
ある。
FIG. 14 is an explanatory diagram (part 3) of a conventional labeling process.

【図15】提案された方式によるラベル付けの1例を示
す図である。
FIG. 15 is a diagram showing an example of labeling according to the proposed method.

【図16】提案された方式による実ラベル割付処理方式
の説明図である。
FIG. 16 is an explanatory diagram of an actual label allocation processing method according to a proposed method.

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

1 全白ライン抽出部 2 注目画素と近傍画素抽出部 3 割付知識照合部 4 割付知識格納部 5 仮ラベル構成部 6 真ラベル構成部 7 記憶部 7a 画像データ格納部 7b 黒画素検出位置格納部 7c 注目画素と近傍画素格納部 7d 割付知識照合結果格納部 7e 仮ラベルデータ格納部 7f 真ラベルデータ格納部 DESCRIPTION OF SYMBOLS 1 All white line extraction part 2 Target pixel and neighboring pixel extraction part 3 Assigned knowledge collation part 4 Assigned knowledge storage part 5 Temporary label construction part 6 True label construction part 7 Storage part 7a Image data storage part 7b Black pixel detection position storage part 7c Target pixel and neighboring pixel storage unit 7d Assigned knowledge collation result storage unit 7e Temporary label data storage unit 7f True label data storage unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 金元 浩一 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 (72)発明者 小原 勝利 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 (72)発明者 千葉 亘一 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 (72)発明者 淮田 利之 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 (72)発明者 山本 一範 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 (72)発明者 勝又 裕 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 Fターム(参考) 5B029 BB03 EE12 5B050 BA16 EA02 EA06 5L096 AA07 CA09 GA34  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Koichi Kanamoto 4-1-1, Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Prefecture Inside Fujitsu Limited (72) Inventor Katsushi Ohara 4-chome, Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Prefecture No. 1 Fujitsu Limited (72) Inventor Watichi Chiba 4-1-1 Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Fujitsu Limited (72) Inventor Toshiyuki Huitada Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture 4-1-1 1-1 Fujitsu Limited (72) Inventor Kazunori Yamamoto 4-1-1 Kamikadanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Fujitsu Limited (72) Inventor Hiroshi Katsumata, Nakahara-ku, Kawasaki City, Kanagawa Prefecture 4-1-1 Odanaka F-term in Fujitsu Limited (Reference) 5B029 BB03 EE12 5B050 BA16 EA02 EA06 5L096 AA07 CA09 GA34

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 画像をラスタ走査して得られた画像情報
の各画素について仮ラベルを割り付けて,実ラベルに変
換を行う処理を行う高速ラベリング方式において,ラベ
ル値を割り当てる対象となる画素である注目画素とその
近傍の画素を抽出するため注目画素を含むラベル付けラ
インとその上の行の参照ラインの同じ位置同士の画素を
照合し不一致が検出されるまでの複数の画素を検出する
注目画素と近傍画素抽出部と,予め与えられた近傍画素
環境による仮ラベル付与方法を規定したラベル付け知識
情報と照合する割付知識照合部と,前記仮ラベル付与方
法に従ってラベル付けとラベルの結合関係の更新を行う
仮ラベル構成部とを備えることを特徴とする高速ラベリ
ング方式。
1. A high-speed labeling method in which a temporary label is assigned to each pixel of image information obtained by raster-scanning an image and converted to a real label, and is a pixel to which a label value is assigned. To extract the pixel of interest and its neighboring pixels, compare the pixels at the same position on the labeling line containing the pixel of interest with the reference line in the row above it, and detect multiple pixels until a mismatch is detected , A neighboring pixel extracting unit, an assignment knowledge collating unit for collating with a labeling knowledge information defining a tentative label assigning method based on a given neighboring pixel environment, and updating a labeling and label connection relationship according to the tentative label assigning method A high-speed labeling method, comprising:
【請求項2】 請求項1において,適用される知識情報
の使用頻度が高いものについて,適宜降順に適用順番を
更新することを特徴とする高速ラベリング方式。
2. The high-speed labeling method according to claim 1, wherein the application order is updated in descending order as appropriate for the knowledge information to be applied having a high use frequency.
【請求項3】 請求項1または2において,任意のラベ
ル付けラインと参照ラインの注目画素の直前の画素のパ
ターンを記憶する手段を備えることを特徴とする高速ラ
ベリング方式。
3. The high-speed labeling method according to claim 1, further comprising means for storing a pattern of a pixel immediately before a pixel of interest on an arbitrary labeling line and a reference line.
【請求項4】 請求項3において,任意のラベル付けラ
イン及び参照ラインの最初の画素の前画素の初期を白画
素と設定して,前ラインの近傍画素と区別することを特
徴とする高速ラベリング方式。
4. The high-speed labeling method according to claim 3, wherein an initial of a previous pixel of an arbitrary labeling line and a first pixel of a reference line is set as a white pixel to be distinguished from neighboring pixels of the previous line. method.
【請求項5】 請求項3において,先頭のラベル付けの
ラインの参照ラインを全白画素のラインに設定すること
で,先頭以外のラインと同様な処理を行えることを特徴
とする高速ラベリング方式。
5. The high-speed labeling method according to claim 3, wherein the same processing as the lines other than the head can be performed by setting the reference line of the head labeling line to the line of all white pixels.
【請求項6】 請求項1乃至5の何れかにおいて,任意
のラインの黒画素の有無を調査し,全白画素ラインを検
出する全白ライン抽出部を設け,全白画素ラインを検出
すると,仮ラベルを真ラベルに更新することで仮ラベル
の領域を可能な限り縮小することを特徴とする高速ラベ
リング方式。
6. An apparatus according to claim 1, further comprising an all-white-line extracting unit for detecting the presence or absence of a black pixel on an arbitrary line and detecting an all-white pixel line. A high-speed labeling method characterized in that a temporary label area is reduced as much as possible by updating a temporary label to a true label.
【請求項7】 請求項6において,全白画素ラインが2
ライン以上継続した場合には,仮ラベルの更新処理を行
わないことを特徴とする高速ラベリング方式。
7. The method according to claim 6, wherein all the white pixel lines are 2
A high-speed labeling method characterized in that temporary label update processing is not performed if the number of lines has been continued.
JP35905199A 1999-12-17 1999-12-17 High speed labeling method Expired - Lifetime JP4763113B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35905199A JP4763113B2 (en) 1999-12-17 1999-12-17 High speed labeling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35905199A JP4763113B2 (en) 1999-12-17 1999-12-17 High speed labeling method

Publications (2)

Publication Number Publication Date
JP2001175858A true JP2001175858A (en) 2001-06-29
JP4763113B2 JP4763113B2 (en) 2011-08-31

Family

ID=18462490

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35905199A Expired - Lifetime JP4763113B2 (en) 1999-12-17 1999-12-17 High speed labeling method

Country Status (1)

Country Link
JP (1) JP4763113B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012164108A (en) * 2011-02-07 2012-08-30 Canon Inc Labeling processing device and labeling processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012164108A (en) * 2011-02-07 2012-08-30 Canon Inc Labeling processing device and labeling processing method

Also Published As

Publication number Publication date
JP4763113B2 (en) 2011-08-31

Similar Documents

Publication Publication Date Title
US6006240A (en) Cell identification in table analysis
US5335290A (en) Segmentation of text, picture and lines of a document image
US5854854A (en) Skew detection and correction of a document image representation
JP3640972B2 (en) A device that decodes or interprets documents
US5201011A (en) Method and apparatus for image hand markup detection using morphological techniques
JP3345224B2 (en) Pattern extraction device, pattern re-recognition table creation device, and pattern recognition device
EP0490687A2 (en) Method and apparatus for image processing
CA1309180C (en) Method for detecting character strings
JP2641380B2 (en) Bending point extraction method for optical character recognition system
JP2005523530A (en) System and method for identifying and extracting character string from captured image data
CN114005123A (en) System and method for digitally reconstructing layout of print form text
CN112446259A (en) Image processing method, device, terminal and computer readable storage medium
JP2000285190A (en) Method and device for identifying slip and storage medium
US5113453A (en) Character recognition method and apparatus
EP0657838A2 (en) Image processing apparatus and method
JP2926066B2 (en) Table recognition device
JPH08320914A (en) Table recognition method and device
JP2001175858A (en) High-speed labeling system
JPH11259597A (en) Format recognition device and character reader
EP1010128B1 (en) Method for performing character recognition on a pixel matrix
JP3476595B2 (en) Image area division method and image binarization method
CN109409370B (en) Remote desktop character recognition method and device
JP3276555B2 (en) Format recognition device and character reader
Mehta et al. Segmentation methods: A review
CN109410291B (en) Processing method and device for burr type pen segments

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060905

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090708

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090721

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090924

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20090924

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20090924

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100209

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20100324

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20100416

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110511

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110609

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

Free format text: PAYMENT UNTIL: 20140617

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4763113

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

EXPY Cancellation because of completion of term