JPH09185726A - Ruled line removing method - Google Patents

Ruled line removing method

Info

Publication number
JPH09185726A
JPH09185726A JP7352856A JP35285695A JPH09185726A JP H09185726 A JPH09185726 A JP H09185726A JP 7352856 A JP7352856 A JP 7352856A JP 35285695 A JP35285695 A JP 35285695A JP H09185726 A JPH09185726 A JP H09185726A
Authority
JP
Japan
Prior art keywords
ruled line
character
ruled
memory
cutting position
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
JP7352856A
Other languages
Japanese (ja)
Other versions
JP2995650B2 (en
Inventor
Naoya Tanaka
直哉 田中
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP7352856A priority Critical patent/JP2995650B2/en
Publication of JPH09185726A publication Critical patent/JPH09185726A/en
Application granted granted Critical
Publication of JP2995650B2 publication Critical patent/JP2995650B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To attain high speed and accuracy in processing at the time of realizing the removing of a ruled line while preventing the chipping of the stroke of a character at a slip picture. SOLUTION: A ruled line position storing memory 5 stores ruled line position information of a ruled line in the slip picture within a picture memory 1. A ruled line erasing means 2 erases the ruled line in the slip picture within the picture memory 1 through the use of this ruled line position information and stores a coordinate value showing the cutting position of a character component generated at the interference place of the character and the ruled line in the process of erasing the ruled line in a cutting position storing memory 3. A character chipping restoring means 4 analyzes the graphic structure of the slip picture in the neighborhood of this cutting position based on the reference of ruled line position information within the ruled line position storing memory 5, the coordinate value showing the cutting position within cutting position storing memory 3 and the slip picture within the picture memory 1, estimates the interference pattern between the character and the ruled line generated at this cutting position by the analyzing, and restores the chipping part of the character based on the estimate.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、少数のストローク
から形成される文字(数字(算用数字),アルファベッ
ト,カタカナ,およびひらがな等の文字。数字が最も一
般的である)が記入された帳票(罫線を有する帳票)の
画像(帳票画像)から罫線を除去する罫線除去方式に関
し、特に罫線と重なっている文字(接触または交差して
いる文字)のストロークを欠損することなく罫線の除去
を実現するための罫線除去方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a form in which characters formed of a small number of strokes (characters such as numbers (arithmetic numerals), alphabets, katakana, and hiragana; numbers are the most common) are filled in. Regarding the ruled line removal method that removes ruled lines from the image (form image) of (forms with ruled lines), it is possible to remove ruled lines without losing strokes of characters (characters that touch or intersect) that overlap the ruled lines. The ruled line removal method for doing.

【0002】[0002]

【従来の技術】従来より、この種の罫線除去方式は、O
CR(Optical Character Read
er)において、文字認識処理の前に文字認識の障害と
なる罫線を除去するために用いられる。
2. Description of the Related Art Conventionally, this type of ruled line removal method has been
CR (Optical Character Read
er), it is used to remove a ruled line that hinders character recognition before the character recognition processing.

【0003】従来のこの種の罫線除去方式は、帳票画像
を予め蓄積している画像メモリと、該帳票画像上の罫線
の位置を示す情報(罫線位置情報)を予め蓄積している
罫線位置保存メモリと、画像解析手段と、罫線消去手段
とから構成される。
The conventional ruled line removing method of this kind stores an image memory in which form images are stored in advance and a ruled line position storage in which information indicating the positions of ruled lines on the form image (ruled line position information) is stored in advance. It is composed of a memory, an image analysis means, and a ruled line erasing means.

【0004】画像解析手段は、例えば、帳票画像上で図
形の輪郭追跡を行い、罫線位置情報と輪郭追跡結果の位
置情報とを比較解析して、罫線と文字とが重なっている
かどうかを判定する。
The image analysis means, for example, traces the contour of the figure on the form image, compares and analyzes the ruled line position information and the position information of the contour tracking result, and determines whether the ruled line and the character overlap. .

【0005】すなわち、罫線の内側の輪郭は罫線位置情
報と輪郭追跡によって検出された各輪郭線の位置情報
(輪郭追跡結果の位置情報)とを比較することにより特
定できるが、この輪郭が罫線位置保存メモリから読み出
された罫線位置情報によって示される罫線の位置から大
きくずれることなく、かつ、単純な矩形形状をしていた
なら、罫線とその内部に書かれている文字との干渉はな
いと判定できる。一方、この条件(輪郭が罫線の位置か
ら大きくずれることなく単純な矩形形状をしているとい
う条件)が満たされず、干渉があると判定された場合に
は、さらに解析が行われ、文字と重なっていない罫線の
区間が特定される。
That is, the contour inside the ruled line can be specified by comparing the ruled line position information with the position information of each contour detected by the contour tracing (position information of the contour tracing result). There is no interference between the ruled line and the characters written inside it if the ruled line position indicated by the ruled line position information read out from the storage memory does not largely deviate and if it has a simple rectangular shape. You can judge. On the other hand, if this condition (the condition that the contour has a simple rectangular shape without being greatly displaced from the position of the ruled line) is not satisfied and it is determined that there is interference, further analysis is performed and the characters overlap. The section of the ruled line that has not been specified is specified.

【0006】さらに、画像解析手段は、文字と重なって
いない罫線の区間として特定された区間を消去すること
により、文字のストロークの欠損を避けつつ罫線の除去
を実現している。
Further, the image analysis means realizes the removal of the ruled line while avoiding the loss of the stroke of the character by erasing the section specified as the section of the ruled line which does not overlap with the character.

【0007】[0007]

【発明が解決しようとする課題】上述した従来の罫線除
去方式では、輪郭追跡および輪郭追跡結果に基づく解析
を行う必要があるので、文字のストロークの欠損を回避
しつつ罫線除去を実現するための処理量(計算機システ
ムの演算量)が大きくなり、その演算コスト(大規模な
計算機システムを構築するための金額および罫線除去処
理に要する処理時間や処理数等)が大きくなるという問
題点があった。
In the above-described conventional ruled line removal method, it is necessary to perform contour tracing and analysis based on the contour tracing result, so that it is possible to realize the ruled line elimination while avoiding the loss of the stroke of the character. There is a problem that the processing amount (calculation amount of the computer system) becomes large, and the calculation cost (the amount of money for constructing a large-scale computer system, the processing time and the number of processing required for the ruled line removal processing, etc.) becomes large. .

【0008】しかも、従来の罫線除去方式では、画像上
に罫線成分の途切れが生じていた場合には、この途切れ
を補間するための前処理を組み込む必要があるので、こ
の処理(途切れ補間のための前処理)に要する演算コス
トが大きくなるという問題点もあった。
In addition, in the conventional ruled line removal method, if there is a break in the ruled line component on the image, it is necessary to incorporate a pre-process for interpolating this break. There is also a problem that the calculation cost required for the (pre-processing of step 1) increases.

【0009】また、従来の罫線除去方式では、文字と罫
線との干渉箇所で両者を分離する際に、文字に罫線成分
の一部が残った状態で分離される等のおそれがあるの
で、罫線除去に際しての精度が悪くなるという問題点が
あった。
Further, in the conventional ruled line removing method, when the characters and the ruled lines interfere with each other, there is a risk that the characters may be separated with some of the ruled line components remaining. There is a problem in that the accuracy of removal is poor.

【0010】本発明の目的は、上述の点に鑑み、文字
(少数のストロークによって形成される文字)および罫
線を有する帳票画像において文字のストロークの欠損を
回避しつつ罫線の除去を実現する際に、演算量が少なく
てすみ(したがって、高速処理が可能となる)、高精度
の処理を実現することができる罫線除去方式を提供する
ことにある。
In view of the above points, an object of the present invention is to realize removal of ruled lines while avoiding loss of strokes of characters in a form image having characters (characters formed by a small number of strokes) and ruled lines. Another object of the present invention is to provide a ruled line removal method that requires only a small amount of calculation (thus enabling high-speed processing) and realizes highly accurate processing.

【0011】[0011]

【課題を解決するための手段】本発明の罫線除去方式
は、少数のストロークによって形成される文字および罫
線を有する帳票画像を予め蓄積している画像メモリと、
前記画像メモリ内の帳票画像中の罫線の罫線位置情報を
蓄積している罫線位置保存メモリと、文字と罫線との干
渉箇所で生じた文字の切断位置の座標値を保存する切断
位置保存メモリと、前記罫線位置保存メモリから読み出
された罫線位置情報を利用して前記画像メモリ内の帳票
画像中の罫線を消去し、罫線消去の過程で文字と罫線と
の干渉箇所で生じた文字成分の切断位置を示す座標値を
前記切断位置保存メモリに保存する罫線消去手段と、前
記罫線位置保存メモリ内の罫線位置情報,前記切断位置
保存メモリ内の切断位置を示す座標値,および前記画像
メモリ内の帳票画像の参照に基づいて該切断位置の近傍
の帳票画像の図形構造を解析し、その解析によって該切
断位置で生じている文字と罫線との干渉パターンを推定
し、その推定に基づいて文字の欠損部分を復元する文字
欠損復元手段とを有する。
The ruled line removing method of the present invention includes an image memory that stores in advance a form image having characters and ruled lines formed by a small number of strokes.
A ruled line position storage memory that stores ruled line position information of ruled lines in the form image in the image memory, and a cut position save memory that saves coordinate values of the cut positions of characters generated at the points of interference between characters and ruled lines. The ruled line position information read from the ruled line position storage memory is used to erase the ruled lines in the form image in the image memory, and the character components generated at the points of interference between the characters and the ruled lines in the process of deleting the ruled lines are deleted. Ruled line erasing means for storing coordinate values indicating a cutting position in the cutting position saving memory, ruled line position information in the ruled line position saving memory, coordinate values indicating a cutting position in the cutting position saving memory, and in the image memory Based on the reference of the form image, the graphic structure of the form image near the cutting position is analyzed, the interference pattern between the character and the ruled line occurring at the cutting position is estimated by the analysis, and based on the estimation. There and a character defect restoring means for restoring the lost portion of the character.

【0012】[0012]

【発明の実施の形態】次に、本発明について図面を参照
して詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described in detail with reference to the drawings.

【0013】図1は、本発明の罫線除去方式の一実施例
の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an embodiment of the ruled line removing method of the present invention.

【0014】本実施例の罫線除去方式は、帳票の画像
(帳票画像)を予め蓄積している画像メモリ1と、画像
メモリ1中に蓄積された帳票画像上の罫線を消去する罫
線消去手段2と、罫線に接触または交差していた図形
(文字のストロークを構成する図形等)について罫線消
去によって途切れた箇所(切断箇所)の位置(切断位
置)の座標値を保存する切断位置保存メモリ3と、罫線
の消去により生じた文字欠損を復元する文字欠損復元手
段4と、罫線位置情報を蓄積している罫線位置保存メモ
リ5とを含んで構成されている。
In the ruled line removing method of this embodiment, the image memory 1 in which the image of the form (form image) is stored in advance, and the ruled line erasing means 2 for erasing the ruled line on the form image stored in the image memory 1. And a cutting position storage memory 3 for storing the coordinate value of the position (cutting position) of the position (cutting position) interrupted by the ruled line erasure for a figure (a figure forming a stroke of a character, etc.) that touches or intersects the ruled line. A character loss restoring means 4 for restoring a character loss caused by erasing ruled lines, and a ruled line position storage memory 5 that stores ruled line position information.

【0015】なお、以下の〜に、図1中のいくつか
の構成要素について説明を加えておく。
It should be noted that some of the constituent elements in FIG. 1 will be described in the following items.

【0016】 画像メモリ1 画像メモリ1は、金額等の数字を記入した帳票をイメー
ジスキャナ等で取り込んで得られた2値の2次元ディジ
タル画像である帳票を予め蓄積している。ここで、帳票
の無い部分の画素値は「1」であり、帳票の背景部分
(文字および罫線等の図形パターンが存在しない部分)
の画素値は「0」であり、帳票における文字および罫線
等の図形パターンの部分の画素値は「1」である。な
お、上記のように本実施例では罫線と干渉する文字が数
字である場合について述べるが、数字以外の文字につい
ても、ストローク数が少ない文字(アルファベット,カ
タカナ,およびひらがな等)に対してであれば本発明は
有効である。
Image memory 1 The image memory 1 stores in advance a form which is a binary two-dimensional digital image obtained by capturing a form in which numbers such as amounts are entered by an image scanner or the like. Here, the pixel value of the part without the form is "1", and the background part of the form (the part where the graphic pattern such as characters and ruled lines does not exist)
Has a pixel value of "0", and the pixel value of a figure pattern portion such as characters and ruled lines in the form is "1". As described above, in the present embodiment, the case where the character that interferes with the ruled line is a number will be described. However, even for a character other than a number, a character having a small number of strokes (alphabet, katakana, hiragana, etc.) can be used. For example, the present invention is effective.

【0017】 罫線位置保存メモリ5 罫線位置保存メモリ5は、画像メモリ1に蓄積されてい
る帳票画像中の罫線の位置を本発明の構成要素以外の手
段・装置等により検出した結果を示す罫線位置情報を予
め蓄積している。
Ruled Line Position Saving Memory 5 The ruled line position saving memory 5 indicates the result of detecting the position of the ruled line in the form image stored in the image memory 1 by means or device other than the constituent elements of the present invention. Information is stored in advance.

【0018】図13に示すように、罫線位置保存メモリ
5内の罫線位置情報は、変数A,B,C,D,およびE
の変数値の組として表現される。
As shown in FIG. 13, the ruled line position information in the ruled line position storage memory 5 includes variables A, B, C, D, and E.
Expressed as a set of variable values for.

【0019】ここで、変数Aは、罫線が横罫線であるか
縦罫線であるかを識別するコードである。
Here, the variable A is a code for identifying whether the ruled line is a horizontal ruled line or a vertical ruled line.

【0020】変数Bおよび変数Cは、罫線を次の一次式 y=ax+b(横罫線) ・・・(式1) または、 x=cy+d(縦罫線) ・・・(式2) で表現した場合の、一次の項の係数aまたはcの値(変
数B)と、定数項bまたはdの値(変数C)とである。
Variables B and C are expressed when the ruled line is expressed by the following linear expression: y = ax + b (horizontal ruled line) ... (Formula 1) or x = cy + d (vertical ruled line) ... (Formula 2) Value of the coefficient a or c of the first-order term (variable B) and the value of the constant term b or d (variable C).

【0021】変数Dおよび変数Eは、式1および式2に
おいて、横罫線ならばxの取り得る範囲(x0 ≦x≦x
M )を示しており、縦罫線ならばyの取り得る範囲(y
0 ≦y≦yN )を示している。すなわち、変数Dはx0
またはy0 を示し、変数EはxM またはyN を示す。
Variables D and E are the ranges (x 0 ≤x≤x) that can be taken by x in the case of the horizontal ruled line in the expressions 1 and 2.
M ), which is the range of y that can be taken by vertical ruled lines (y
0 ≦ y ≦ y N ). That is, the variable D is x 0
Or y 0 , and the variable E indicates x M or y N.

【0022】 文字欠損復元手段4 図4に示すように、文字欠損復元手段4は、交点座標算
出手段401と、交点座標記憶手段402と、切断位置
情報棄却手段403と、区間設定手段404と、特徴抽
出手段405と、第1判定手段406と、第2判定手段
407と、復元手段408と、切断位置情報選別手段4
09と、局所切断位置情報保存手段410とを含んで構
成されている。
Character Loss Restoring Unit 4 As shown in FIG. 4, the character loss restoring unit 4 includes an intersection point coordinate calculating unit 401, an intersection point coordinate storing unit 402, a cutting position information discarding unit 403, and a section setting unit 404. Feature extraction means 405, first determination means 406, second determination means 407, restoration means 408, cutting position information selection means 4
09 and a local cutting position information storage means 410.

【0023】図2は、本実施例の罫線除去方式の処理
(全体動作に係る処理)を示す流れ図である。この処理
は、罫線読込みステップ201と、罫線消去ステップ2
02と、文字欠損復元ステップ203と、終了判定ステ
ップ204とからなる。
FIG. 2 is a flow chart showing the processing of the ruled line removal method of this embodiment (processing relating to the overall operation). This processing includes ruled line reading step 201 and ruled line erasing step 2
02, a character loss restoration step 203, and an end determination step 204.

【0024】図3は、罫線消去手段2の処理を示す流れ
図である。この処理は、仮罫線境界検出ステップ301
と、平均線幅等算出ステップ302と、罫線境界修正ス
テップ303と、罫線境界未検出箇所補間ステップ30
4と、罫線成分消去ステップ305とからなる。
FIG. 3 is a flow chart showing the processing of the ruled line erasing means 2. This process is performed by the provisional ruled line boundary detection step 301.
An average line width calculation step 302, a ruled line boundary correction step 303, and a ruled line boundary undetected point interpolation step 30
4 and a ruled line component erasing step 305.

【0025】図4は、先に述べたように、文字欠損復元
手段4の構成を示すブロック図である。
FIG. 4 is a block diagram showing the configuration of the character loss restoring means 4 as described above.

【0026】図5は、文字欠損復元手段4の処理を示す
流れ図である。この処理は、交点検出ステップ501
と、交点該当切断位置座標値棄却ステップ502と、区
間設定ステップ503と、局所特徴抽出ステップ504
と、第1判定ステップ505と、第2判定ステップ50
6と、復元ステップ507とからなる。
FIG. 5 is a flow chart showing the processing of the character loss restoring means 4. This process is performed by the intersection detection step 501.
, Intersection point cutting position coordinate value rejection step 502, section setting step 503, and local feature extraction step 504
And a first determination step 505 and a second determination step 50
6 and a restoration step 507.

【0027】図6は、罫線消去手段2の動作を説明する
ための図である。
FIG. 6 is a diagram for explaining the operation of the ruled line erasing means 2.

【0028】図7〜図12は、本実施例の罫線除去方式
の具体的な動作を説明するための図である。
7 to 12 are diagrams for explaining the specific operation of the ruled line removing method of this embodiment.

【0029】図13は、先に述べたように、罫線位置保
存メモリ5内の罫線位置情報の構造(データ構造)を示
す図である。
FIG. 13 is a diagram showing the structure (data structure) of the ruled line position information in the ruled line position storage memory 5, as described above.

【0030】次に、このように構成された本実施例の罫
線除去方式の動作について説明する。
Next, the operation of the ruled line removing method of the present embodiment having such a configuration will be described.

【0031】まず、図1および図2を参照して、本実施
例の罫線除去方式の全体動作について説明する。
First, the overall operation of the ruled line removing method of this embodiment will be described with reference to FIGS. 1 and 2.

【0032】罫線消去手段2は、まず、罫線位置保存メ
モリ5から図13中の変数A,B,C,D,およびEの
値で示される1本分の罫線についての罫線位置情報を読
み込む(ステップ201)。
The ruled line erasing means 2 first reads ruled line position information for one ruled line indicated by the values of variables A, B, C, D and E in FIG. 13 from the ruled line position storage memory 5 ( Step 201).

【0033】次に、罫線消去手段2は、ステップ201
で読み込んだ罫線位置情報に該当する画像メモリ1内の
帳票画像中の罫線を消去する(ステップ202)。すな
わち、画像メモリ1中の2値2次元ディジタル画像にお
いて該罫線成分の画素値を「1」から「0」に変換す
る。この処理では文字成分のうち、罫線に重なる成分の
部分も消去されるが、この時にできる画素値「1」の画
素領域(画素値「1」の画素が途切れなく連続する1つ
の領域)の箇所(切断箇所)の座標値(切断位置を示す
座標値)を切断位置保存メモリに出力して保存する。
Next, the ruled line erasing means 2 executes step 201.
The ruled line in the form image in the image memory 1 corresponding to the ruled line position information read in step 3 is erased (step 202). That is, the pixel value of the ruled line component in the binary two-dimensional digital image in the image memory 1 is converted from "1" to "0". In this process, the part of the character component that overlaps the ruled line is also erased, but at this time the location of the pixel area of pixel value "1" (one area where the pixels of pixel value "1" are continuous without interruption) The coordinate value (coordinate value indicating the cutting position) of (cutting point) is output and saved in the cutting position saving memory.

【0034】罫線消去手段2による罫線の消去が終了す
ると、文字欠損復元手段4が起動される。
When the ruled line erasing means 2 has finished erasing the ruled lines, the character loss restoring means 4 is activated.

【0035】文字欠損復元手段4は、文字切断位置保存
メモリ3から画素値が「1」の画素領域(切断箇所)の
切断位置を読み出し、罫線位置保存メモリ5内の罫線位
置情報を利用しながら画像メモリ1内の該当座標値近傍
の成分の図形構造を解析することによって、欠損前の文
字成分の形状を推定し、その推定に基づいて欠損した文
字の復元を行う(ステップ203)。なお、復元結果に
ついては、画像メモリ1に書き込む。
The character loss restoring means 4 reads the cutting position of the pixel area (cutting point) having a pixel value of "1" from the character cutting position storage memory 3 and utilizes the ruled line position information in the ruled line position saving memory 5. The shape of the character component before the loss is estimated by analyzing the graphic structure of the component near the corresponding coordinate value in the image memory 1, and the lost character is restored based on the estimation (step 203). The restoration result is written in the image memory 1.

【0036】以上の処理が終了すると、罫線消去手段2
は、罫線位置保存メモリ5内の全ての罫線位置情報につ
いて処理が終了したか否かを判定する(ステップ20
4)。
When the above processing is completed, the ruled line erasing means 2
Determines whether processing has been completed for all ruled line position information in the ruled line position storage memory 5 (step 20).
4).

【0037】罫線消去手段2は、ステップ204で「罫
線位置保存メモリ5内の全ての罫線位置情報について処
理が終了した」と判定した場合には、本実施例の罫線除
去方式の全体動作を終了させる。
If the ruled line erasing means 2 determines in step 204 that "the processing has been completed for all ruled line position information in the ruled line position storage memory 5," the ruled line removal method of this embodiment completes the entire operation. Let

【0038】また、罫線消去手段2は、ステップ204
で「罫線位置保存メモリ5内の全ての罫線位置情報につ
いて処理が終了していない」と判定した場合には、罫線
位置保存メモリ5から未処理の罫線位置情報を読み出
し、その罫線位置情報に関して上述のステップ201〜
203と同様な処理を実行する。
Further, the ruled line erasing means 2 executes step 204.
When it is determined that "processing has not been completed for all ruled line position information in the ruled line position storage memory 5", unprocessed ruled line position information is read from the ruled line position storage memory 5 and the above-mentioned ruled line position information is described above. Steps 201-
The same process as 203 is executed.

【0039】次に、罫線消去手段2および文字欠損復元
手段4の各々の詳細な動作について説明する。
Next, detailed operations of the ruled line erasing means 2 and the character loss restoring means 4 will be described.

【0040】第1に、図3および図6を参照して、罫線
消去手段2の動作を説明する。
First, the operation of the ruled line erasing means 2 will be described with reference to FIGS. 3 and 6.

【0041】罫線消去手段2は、以下の(1)〜(5)
に示す処理を行う。
The ruled line erasing means 2 has the following (1) to (5)
Is performed.

【0042】(1) 初めに、次のようにして、仮の罫
線の境界を検出する(ステップ301)。
(1) First, the boundary of a temporary ruled line is detected as follows (step 301).

【0043】まず、罫線位置保存メモリ5から罫線1本
分の罫線位置情報を読み取る。読み取った罫線をLとす
る。罫線位置情報の読み取り後、罫線Lと平行で、罫線
LからΔs離れた罫線LaおよびLbを生成する。ここ
では、これら罫線LaおよびLbで挟まれる領域を領域
Zと呼ぶ(図6参照)。
First, the ruled line position information for one ruled line is read from the ruled line position storage memory 5. Let the read ruled line be L. After reading the ruled line position information, ruled lines La and Lb that are parallel to the ruled line L and are separated from the ruled line L by Δs are generated. Here, the area sandwiched between these ruled lines La and Lb is referred to as area Z (see FIG. 6).

【0044】今、罫線Lが横罫線である場合について説
明する(なお、罫線Lが縦罫線である場合の処理は、以
下の説明における処理において、x軸とy軸とを交換し
たものとなる)。
Now, a case where the ruled line L is a horizontal ruled line will be described (note that the process when the ruled line L is a vertical ruled line is the process in which the x axis and the y axis are exchanged in the process described below. ).

【0045】画像メモリ1中で領域Z内の画像上をx=
0 (罫線位置保存メモリ5における変数Dの値)から
x=xM (罫線位置保存メモリ5における変数Eの値)
まで1画素単位に変化させ、各x座標値において、y座
標値を領域Zの範囲内でy方向に変化させる。この過程
で指定される各座標値(x,y)における画素値を読み
取る。
On the image in the area Z in the image memory 1, x =
From x 0 (value of variable D in ruled line position saving memory 5) to x = x M (value of variable E in ruled line position saving memory 5)
Up to 1 pixel unit, the y coordinate value is changed in the y direction within the range Z at each x coordinate value. The pixel value at each coordinate value (x, y) designated in this process is read.

【0046】その読取り結果に基づき、次の条件を満た
す罫線Lに最も近い座標値(x,y)を検出する。ここ
で、f(x,y)は座標値(x,y)における画素の画
素値を表している。 条件: f(x,y)=1、かつ、f(x,y−1)=0 ・・・(式3) または、 f(x,y)=1、かつ、f(x,y+1)=0 ・・・(式4)
Based on the read result, the coordinate value (x, y) closest to the ruled line L satisfying the following conditions is detected. Here, f (x, y) represents the pixel value of the pixel at the coordinate value (x, y). Condition: f (x, y) = 1 and f (x, y−1) = 0 (Equation 3) or f (x, y) = 1 and f (x, y + 1) = 0 ... (Equation 4)

【0047】領域Z内で、式3を満たす罫線Lに最も近
い座標値が検出された場合には、その座標値の画素を起
点としてyの値を1画素づつ増加させ、式4を満たす座
標値を検出する。逆に、式4を満たす罫線Lに最も近い
座標値が検出された場合には、その座標値の画素を起点
としてyの値を1画素ずつ減少させ、式3を満たす座標
値を検出する。
When the coordinate value closest to the ruled line L satisfying the expression 3 is detected in the area Z, the value of y is increased by 1 pixel from the pixel having the coordinate value as the starting point, and the coordinate satisfying the expression 4 is obtained. Detect the value. On the contrary, when the coordinate value closest to the ruled line L satisfying the expression 4 is detected, the value of y is decreased by one pixel starting from the pixel having the coordinate value, and the coordinate value satisfying the expression 3 is detected.

【0048】以上のようにして検出された式3を満たす
座標値(x,y)の画素の位置は仮の罫線の上端位置を
示している。また、以上のようにして検出された式4を
満たす座標値(x,y)の画素の位置は仮の罫線の下端
位置を示している。各座標値は、罫線消去手段2の内部
に用意された以下のおよびに示す配列に、次のよう
に保存される。
The position of the pixel having the coordinate value (x, y) satisfying the expression 3 detected as described above indicates the upper end position of the temporary ruled line. Further, the position of the pixel having the coordinate value (x, y) satisfying the expression 4 detected as described above indicates the lower end position of the temporary ruled line. Each coordinate value is stored in the array shown in and provided below in the ruled line erasing means 2 as follows.

【0049】 横罫線上端座標値保存用配列: KUPP={(x0 ,yu0),(x1 ,yu1),
(x2 ,yu2),…,(xM ,yuM)}
The horizontal ruled upper coordinate storage array: KUPP = {(x 0, y u0), (x 1, y u1),
(X 2, y u2), ..., (x M, y uM)}

【0050】 横罫線下端座標値保存用配列: KLOW={(x0 ,yw0),(x1 ,yw1),
(x2 ,yw2),…,(xM ,ywM)}
Horizontal ruled line lower end coordinate value storage array: KLOW = {(x 0 , y w0 ), (x 1 , y w1 ),
(X 2 , y w2 ), ..., (x M , y wM )}

【0051】ここで、x0 ,x1 ,x2 ,…,xM は、
着目している横罫線が存在する範囲のx座標値を1画素
単位で保存したものである。
Where x 0 , x 1 , x 2 , ..., X M are
The x-coordinate value of the range in which the horizontal ruled line of interest exists is saved for each pixel.

【0052】また、yu0,yu1,yu2,…,yuMは、対
応するx座標値x0 ,x1 ,x2 ,…,xM での該横罫
線の上端y座標値を保存したものである。なお、上記の
処理によって該横罫線の上端y座標値のいくつかを検出
できなかった場合には、該上端y座標値として「−1」
を保存する(「−1」は「検出できなかった」ことを示
す情報であり、必ずしも「−1」という値に限定される
ものではない)。
[0052] In addition, y u0, y u1, y u2, ..., y uM , the corresponding x-coordinate value x 0, x 1, x 2 , ..., the upper end of the y-coordinate value of the lateral borders in the x M store It was done. If some of the upper end y-coordinate values of the horizontal ruled line cannot be detected by the above processing, “−1” is set as the upper end y-coordinate value.
Is stored (“−1” is information indicating “not detected” and is not necessarily limited to the value “−1”).

【0053】さらに、yw0,yw1,yw2,…,ywMは、
対応するx座標値x0 ,x1 ,x2,…,xM での該横
罫線の下端y座標値を保存したものである。なお、上記
の処理によって該横罫線の下端y座標値のいくつかを検
出できなかった場合には、該下端y座標値として「−
1」を保存する。
Further, y w0 , y w1 , y w2 , ..., Y wM are
The lower end y coordinate value of the horizontal ruled line at the corresponding x coordinate value x 0 , x 1 , x 2 , ..., X M is stored. In addition, when some of the lower end y coordinate values of the horizontal ruled line cannot be detected by the above processing, the lower end y coordinate value is set to "-".
Save 1 ”.

【0054】以上のようにして、仮の罫線の境界(この
場合には、該横罫線の上端および下端)を検出する。
As described above, the boundaries of the temporary ruled lines (in this case, the upper and lower ends of the horizontal ruled lines) are detected.

【0055】(2) ステップ301で検出した仮の罫
線の境界に基づき、次のようにして平均線幅および許容
線幅を算出する(ステップ302)。
(2) Based on the boundaries of the provisional ruled lines detected in step 301, the average line width and the allowable line width are calculated as follows (step 302).

【0056】まず、横罫線上端座標値保存用配列KUP
Pと横罫線下端座標値保存用配列KLOWとの間で、等
しいx座標値xm におけるy座標の差を求め、そのx座
標値xm における上端と下端との距離すなわち線幅d
uwm を求める。ただし、mは0,1,2,…,Mの値を
とる。
First, an array KUP for storing the horizontal coordinate upper end coordinate value
The difference between the y coordinates at the same x coordinate value x m is calculated between P and the horizontal ruled line lower end coordinate value storage array KLOW, and the distance between the upper and lower ends at the x coordinate value x m , that is, the line width d.
Find uwm . However, m takes the value of 0, 1, 2, ..., M.

【0057】この算出結果から、平均線幅dを次式によ
って求める。 d=(m=0 M Σduwm )/(M+1−M′) ・・・(式5)
From this calculation result, the average line width d is calculated by the following equation. d = ( m = 0 M Σd uwm ) / (M + 1-M ′) (Equation 5)

【0058】なお、式(5)におけるdは、duwm につ
いてのm=0からm=Mまでの総和を示す。ただし、y
um=−1または/およびywm=−1である場合のduwm
は加算されない。また、M′はその場合(yum=−1ま
たは/およびywm=−1である場合)の数を示す。
Note that d in the equation (5) represents the total sum of m = 0 to m = M for d uwm . Where y
d uwm where um = -1 or / and y wm = -1
Is not added. M'represents the number in that case (when y um = -1 or / and y wm = -1).

【0059】さらに、平均線幅dに所定の微小量αを足
した値のdlimit を許容線幅として求める。
Further, d limit, which is a value obtained by adding a predetermined minute amount α to the average line width d, is obtained as the allowable line width.

【0060】(3) 横罫線上端座標値保存用配列KU
PPおよび横罫線下端座標値保存用配列KLOWにおい
て「duwm >dlimit 」となるm番目の要素(なお、K
UPPおよびKLOWの配列データは0番目の要素から
始まる)のy座標値(yumおよびywm)を共に「−1」
に変更する。すなわち、ステップ302の算出結果に基
づいて着目している罫線の境界を修正する(ステップ3
03)。
(3) Horizontal ruled line upper end coordinate value storage array KU
In the PP and horizontal ruled line bottom coordinate value storage array KLOW, the m-th element that satisfies "d uwm > d limit " (K
Array data of UPP and KLOW start from the 0th element) and the y coordinate values (y um and y wm ) are both “−1”.
Change to That is, the boundary of the ruled line of interest is corrected based on the calculation result of step 302 (step 3
03).

【0061】(4) 次のようにして、罫線境界未検出
箇所を求め、その罫線境界未検出箇所の補間を行う(ス
テップ304)。
(4) In the following manner, a ruled line boundary undetected portion is obtained, and the ruled line boundary undetected portion is interpolated (step 304).

【0062】まず、横罫線上端座標値保存用配列KUP
Pおよび横罫線下端座標値保存用配列KLOWにおい
て、y座標値が「−1」をとる要素を検索する。このよ
うな要素は、画像メモリ1中の帳票画像上で、罫線と背
景との境界が発見されなかった箇所(罫線境界未検出箇
所)に対応している。
First, an array KUP for storing the upper coordinate value of the horizontal ruled line
In P and the horizontal ruled line lower end coordinate value storage array KLOW, an element having a y coordinate value of "-1" is searched. Such an element corresponds to a position where a boundary between the ruled line and the background is not found (a ruled line boundary undetected position) on the form image in the image memory 1.

【0063】次に、横罫線上端座標値保存用配列KUP
Pおよび横罫線下端座標値保存用配列KLOWの各配列
データ上で、この罫線境界未検出箇所について補間を行
う。すなわち、連続するx座標値の系列において、罫線
境界未検出箇所の周囲の検出成功箇所によってその罫線
境界未検出箇所の補間を行う。これによって、着目して
いる罫線の位置が確定する(横罫線上端座標値保存用配
列KUPPおよび横罫線下端座標値保存用配列KLOW
の最終的な生成が完了する)。
Next, an array KUP for storing the horizontal coordinate upper end coordinate value
Interpolation is performed for the undetected part of the ruled line boundary on each array data of P and the horizontal ruled line lower end coordinate value storage array KLOW. That is, in a series of continuous x-coordinate values, the ruled line boundary undetected portion is interpolated by the detection successful point around the ruled line boundary undetected portion. As a result, the position of the ruled line of interest is determined (the horizontal ruled line upper end coordinate value storage array KUPP and the horizontal ruled line lower end coordinate value storage array KLOW.
Final generation of is completed).

【0064】なお、この場合に、罫線境界未検出箇所の
両端のx座標値およびy座標値を切断箇所の位置(切断
位置)の座標値として切断位置保存メモリ3に出力す
る。
In this case, the x-coordinate value and the y-coordinate value at both ends of the ruled line boundary undetected portion are output to the cutting position storage memory 3 as the coordinate value of the position (cutting position) of the cutting position.

【0065】(5) 最後に、ステップ304までの処
理によって生成された横罫線上端座標値保存用配列KU
PPおよび横罫線下端座標値保存用配列KLOWのxm
座標値(m=0〜M)の各々において、yumの座標値で
示される位置とywmの座標値で示される位置とで挟まれ
る区間にある画素(罫線成分の画素)を消去する(ステ
ップ305)。すなわち、それらの画素の画素値を
「1」から「0」に変換する(もともと画素値が「0」
である画素については「0」のままとする)。
(5) Finally, a horizontal ruled line upper end coordinate value storage array KU generated by the processing up to step 304
PP and horizontal ruled line lower end coordinate value storage array KLOW x m
In each of the coordinate values (m = 0 to M), to erase the pixels (pixel border component) in the section sandwiched between the position indicated by the coordinate values of the position and y wm represented by the coordinate values of y um ( Step 305). That is, the pixel values of those pixels are converted from “1” to “0” (the pixel value is originally “0”).
The pixel that is is left as "0").

【0066】第2に、図4および図5を参照して、文字
欠損復元手段4の動作を説明する。
Secondly, the operation of the character loss restoring means 4 will be described with reference to FIGS.

【0067】文字欠損復元手段4は、着目罫線(処理対
象として着目している罫線)に対する罫線消去手段2の
処理の終了後に起動され、以下の(1)〜(8)に示す
処理を行う。
The character loss restoring means 4 is activated after the processing of the ruled line erasing means 2 for the ruled line of interest (the ruled line of interest as the processing target) is completed, and performs the following processes (1) to (8).

【0068】(1) 文字欠損復元手段4内の交点座標
算出手段401は、罫線位置保存メモリ5から、着目罫
線の罫線位置情報と、この罫線に直交する罫線の罫線位
置情報とを読み込む。さらに、交点座標算出手段401
は、これらの罫線位置情報に基づき、これらの罫線の交
点の座標値を計算(検出)し、交点座標記憶手段402
にその座標値(罫線交点座標値)を出力する(ステップ
501)。交点座標記憶手段402は、その罫線交点座
標値を保存する。
(1) The intersection point coordinate calculating means 401 in the character loss restoring means 4 reads the ruled line position information of the ruled line of interest and the ruled line position information of the ruled line orthogonal to this ruled line from the ruled line position storage memory 5. Further, the intersection coordinate calculation means 401
Calculates (detects) the coordinate values of the intersections of these ruled lines based on these ruled line position information, and the intersection point coordinate storage means 402
The coordinate value (coordinate value of ruled line intersection) is output to (step 501). The intersection coordinate storage means 402 stores the ruled line intersection coordinate values.

【0069】(2) 切断位置情報棄却手段403は、
交点座標記憶手段402に保存された罫線交点座標値を
用いて、切断位置保存メモリ3に保存された切断箇所の
座標値の中から、該交点で生じた切断箇所の座標値を検
出してこれを棄却する(ステップ502)。
(2) The cutting position information rejection means 403 is
Using the ruled line intersection point coordinate value stored in the intersection point coordinate storage means 402, the coordinate value of the cutting point generated at the intersection point is detected from the coordinate values of the cutting point stored in the cutting point storage memory 3 Is rejected (step 502).

【0070】(3) 区間設定手段404は、交点座標
記憶手段402内の罫線交点座標値を読み出し、連続す
る交点に挟まれた区間の内の1つを抽出し、その区間の
両端を数画素広げた区間を設定する(ステップ50
3)。このように、本実施例では、1区間(1文字分の
領域)の認識において、横罫線が着目罫線である場合に
縦罫線で区切られた1区間に基づいて該認識を行ってい
る(縦罫線が着目罫線である場合には横罫線で区切られ
た1区間に基づいて該認識を行うこととなる)。ただ
し、予め区間指定を行っておく等の他の認識手法も考え
られる。
(3) The section setting means 404 reads the ruled line intersection point coordinate values in the intersection point coordinate storage means 402, extracts one of the sections sandwiched by consecutive intersection points, and several pixels at both ends of the section. Set the widened section (Step 50)
3). As described above, in the present embodiment, in the recognition of one section (area for one character), when the horizontal ruled line is the target ruled line, the recognition is performed based on one section divided by the vertical ruled line (vertical direction). If the ruled line is the target ruled line, the recognition is performed based on one section delimited by the horizontal ruled line). However, other recognition methods, such as designating a section in advance, are possible.

【0071】(4) 特徴抽出手段405は、以下の局
所特徴群を抽出する(ステップ504)。ただし、ここ
では、説明の便宜上、横罫線が着目罫線である場合に限
定した説明を行う。
(4) The feature extracting means 405 extracts the following local feature groups (step 504). However, for convenience of description, the description is limited to the case where the horizontal ruled line is the target ruled line.

【0072】今、切断位置保存メモリ3から読み出され
た切断箇所を以下のように称する。 ○ 横罫線の上部で生じた切断箇所{ai},i=0,
1,…,Nupp −1 ○ 横罫線の下部で生じた切断箇所{bj},j=0,
1,…,Nlow −1
Now, the cutting position read from the cutting position storage memory 3 will be referred to as follows. ○ Cutting point {ai}, i = 0, generated at the top of the horizontal ruled line
1, ..., N upp -1 ○ Cutting point {bj}, j = 0, generated at the bottom of the horizontal ruled line
1, ..., N low -1

【0073】ただし、Nupp は罫線上部で生じた切断箇
所の個数であり、Nlow は罫線下部で生じた切断箇所の
個数である。座標値は、X座標値が小さいものから大き
いものに順に並んでいるものとする。また、各切断箇所
の左端の座標値を(xaLi ,yaLi )または(xbLj
bLj )と表し、右端の座標値を(xaRi ,yaRi )ま
たは(xbRj ,ybRj )と表し、中央の座標値を(x
aMi ,yaMi )または(xbMj ,ybMj )と表すものと
する。
However, N upp is the number of cut points formed above the ruled line, and N low is the number of cut points generated below the ruled line. It is assumed that the coordinate values are arranged in order from the smallest X coordinate value to the largest X coordinate value. In addition, the coordinate value of the left end of each cutting point is (x aLi , yaLi ) or (x bLj ,
y bLj ), the rightmost coordinate value is (x aRi , y aRi ), or (x bRj , y bRj ), and the central coordinate value is (x bRj ).
aMi , yaMi ) or ( xbMj , ybMj ).

【0074】特徴抽出手段405は、これらの切断箇所
に関して以下の〜に示す局所特徴を抽出する。
The feature extraction means 405 extracts the following local features from these cut points.

【0075】 局所特徴1:着目区間(ステップ50
3で設定された区間)内でのaiとbjとのx軸方向の
距離差: dij=|xaMi −xbMj | ただし、Nupp >0かつNlow >0の場合にのみ抽出す
る。
Local Feature 1: Target Section (Step 50
(Distance set in 3), the distance difference between ai and bj in the x-axis direction: d ij = | x aMi −x bMj | However, it is extracted only when N upp > 0 and N low > 0.

【0076】 局所特徴2:各切断箇所に連続する文
字等の成分の方向: θai,θbj(0≦θai,θbj<π)
Local feature 2: Direction of components such as characters continuous at each cut point: θ ai , θ bj (0 ≦ θ ai , θ bj <π)

【0077】 局所特徴3:各切断箇所に連続する文
字等の成分の高さ(罫線端から延びている距離): hai,hbj
Local feature 3: Height of components such as characters continuous at each cut point (distance extending from ruled line end): h ai , h bj

【0078】(5) 第1判定手段406は、上述の局
所特徴の抽出処理の終了後に起動され、特徴抽出手段4
05から局所特徴1〜3の特徴量を受け取り、切断位置
保存メモリ3から着目区間内の切断箇所の座標値を受け
取り、1対1に対応する(x座標値が最も近い)罫線上
部の切断箇所aiと罫線下部の切断箇所bjとの組につ
いて以下の判定(判定および判定からなる第1の判
定)を実施する(ステップ505)。なお、d
threshold1,dthreshold2,およびθthreshold は、所
定のしきい値であり、dthreshold1<dthreshold2であ
る。
(5) The first determination means 406 is activated after the above-mentioned local feature extraction processing is completed, and the feature extraction means 4
05, the feature amounts of the local features 1 to 3 are received, the coordinate values of the cut points in the target section are received from the cut position storage memory 3, and the cut points on the upper part of the ruled line corresponding to one-to-one (x coordinate values are the closest) The following judgment (first judgment consisting of judgment and judgment) is performed on the set of ai and the cut portion bj under the ruled line (step 505). Note that d
threshold1 , d threshold2 , and θ threshold are predetermined thresholds, and d threshold1 <d threshold2 .

【0079】判定:dij<dthreshold1ならば、ai
とbjとが「交差1」の干渉パターン(図7参照)に関
する切断箇所であると判定する。
Judgment: If d ij <d threshold1 , ai
And bj are determined to be cutting points regarding the interference pattern of “intersection 1” (see FIG. 7).

【0080】判定:dij<dthreshold2、かつ、|θ
i −θj |<θthreshold ならば、aiとbjとが「交
差1」の干渉パターンに関する切断箇所であると判定す
る。
Judgment: d ij <d threshold2 and | θ
If i −θ j | <θ threshold , it is determined that ai and bj are cutting points regarding the interference pattern of “intersection 1”.

【0081】以上の第1の判定の判定結果は、第2判定
手段407に出力される。
The determination result of the above first determination is output to the second determining means 407.

【0082】(6) 切断位置情報選別手段409は、
ステップ505における第1の判定の終了後に起動さ
れ、区間設定手段404で設定された各区間内の切断位
置に関する情報を選別し、その選別結果を局所切断位置
情報保存手段410に蓄積する。
(6) The cutting position information selecting means 409
It is started after the completion of the first determination in step 505, information regarding cutting positions in each section set by the section setting unit 404 is selected, and the selection result is stored in the local cutting position information storage unit 410.

【0083】(7) 第2判定手段407は、切断位置
情報選別手段409による選別処理の後に起動され、第
1判定手段406の判定結果(判定の過程で使われた値
を含む)と局所切断位置情報保存手段410から受け取
る着目区間内の切断箇所の位置(切断位置)の座標値と
から、罫線上部の切断箇所ai(i=0,…,Nupp
と罫線下部の切断箇所bj(j=0,…,Nlow )との
組について以下の判定(判定,,およびからなる
第2の判定)を実施する(ステップ506)。ここで、
判定,,およびの判定結果として出力される干渉
パターンは、「交差2」,「交差1」,および「重な
り」の干渉パターンである。これらは、それぞれ、図
8,図7,および図9に示す干渉パターンに対応する。
(7) The second judging means 407 is activated after the cutting processing by the cutting position information selecting means 409, and the judgment result (including the value used in the judgment process) of the first judging means 406 and the local cutting. From the coordinate value of the position (cutting position) of the cutting point in the section of interest received from the position information storage means 410, the cutting point ai (i = 0, ..., N upp ) above the ruled line.
The following judgment (the judgment, and the second judgment consisting of) is performed on the set of the cut point bj (j = 0, ..., N low ) under the ruled line (step 506). here,
The interference patterns output as the determination results of, and are the intersection patterns of “intersection 2”, “intersection 1”, and “overlap”. These correspond to the interference patterns shown in FIGS. 8, 7 and 9, respectively.

【0084】判定:Nupp =2、かつ、Nlow =1
で、 xaM0 −xbM0 >Dshort 、かつ、 xbL0 −xaR0 <Dlong 、かつ、 xaM1 −xbM0 >Dshort 、かつ、 xaL1 −xbR0 <Dlong 、かつ、 xaL1 −xaR0 <Dlong2 、かつ、 ha0 <Hshort 、かつ、 ha0 >Hlong 、かつ、 ha1 >Hlong ならば、a0,a1,およびb0は「交差2」の干渉パ
ターンに関する切断箇所であると判定する。なお、各し
きい値の値は、例えば、Dshort =2(この数値は画素
数を示す。以下同様),Dlong=7,Dlong2 =14,
short =5,およびHlong=5である。
Judgment: N upp = 2 and N low = 1
Where x aM0 −x bM0 > D short , and x bL0 −x aR0 <D long , and x aM1 −x bM0 > D short , and x aL1 −x bR0 <D long , and x aL1 −x. If aR0 <D long2 , h a0 <H short , h a0 > H long , and h a1 > H long, then a0, a1, and b0 are cut points related to the “intersection 2” interference pattern. To determine. The values of the respective threshold values are, for example, D short = 2 (this numerical value indicates the number of pixels. The same applies hereinafter), D long = 7, D long2 = 14,
H short = 5 and H long = 5.

【0085】判定:Nupp =2、かつ、Nlow =2
で、 xaR0 −xaL0 <Wth、かつ、 xaR1 −xaL1 <Wth、かつ、 xbR0 −xbL0 <Wth、かつ、 xbR1 −xbL1 <Wth、かつ、 |xaM0 −xbM0 |<Dth2 、かつ、 |xaM1 −xbM1 |<Dth2 、かつ、 xaL1 −xaR0 <Dth3 、かつ、 ha0 >HLong 、かつ、 hb1 >HLong 、かつ、 hb0 <Hshort 、かつ、 ha1 <Hshort ならば、a0,a1,b0,およびb1は2組(a0と
b0との組およびa1とb1との組)の「交差1」の干
渉パターンに関する切断箇所であると判定する。なお、
各しきい値の値は、例えば、Wth=5,Dth2 =10,
th3 =14,HLong=7,およびHshort =5であ
る。
Judgment: N upp = 2 and N low = 2
X aR0 −x aL0 <W th , and x aR1 −x aL1 <W th , and x bR0 −x bL0 <W th , and x bR1 −x bL1 <W th , and | x aM0 − x bM0 | <D th2 and | x aM1 −x bM1 | <D th2 and x aL1 −x aR0 <D th3 and h a0 > H Long and h b1 > H Long and h If b0 <H short and h a1 <H short, then a0, a1, b0, and b1 relate to two sets of “intersection 1” interference patterns (a0 and b0 and a1 and b1). It is determined to be a cut point. In addition,
The value of each threshold is, for example, W th = 5, D th2 = 10,
D th3 = 14, H Long = 7, and H short = 5.

【0086】判定:Nupp =2、かつ、Nlow =0
で、 xaM1 −xaM0 <Dth4 、かつ、 ha0 >HLong 、かつ、 ha1 >HLong ならば、a0およびa1は「重なり」の干渉パターンに
関する切断箇所であると判定する。なお、各しきい値の
値は、例えば、Dth4 =20およびHLong=7である。
Judgment: N upp = 2 and N low = 0
Then, if x aM1 −x aM0 <D th4 , and h a0 > H Long , and h a1 > H Long, then it is determined that a0 and a1 are cutting points related to the “overlapping” interference pattern. The threshold values are, for example, D th4 = 20 and H Long = 7.

【0087】第2判定手段407は、以上の第2の判定
の判定結果と第1判定手段406による第1の判定の判
定結果とを、復元手段408に出力する。
The second judgment means 407 outputs the judgment result of the above second judgment and the judgment result of the first judgment by the first judgment means 406 to the restoration means 408.

【0088】なお、第2の判定では、上記のように、区
間内のNupp およびNlow の数が限定されたものとなっ
ている。したがって、この判定が適用される文字として
は数字がふさわしいと考えられる。
In the second determination, the number of N upp and N low in the section is limited as described above. Therefore, it is considered that the numbers are suitable as the characters to which this judgment is applied.

【0089】(8) 復元手段408は、ステップ50
6における第2の判定の終了後に起動され、第1判定手
段406による判定結果と第2判定手段407による判
定結果とを入力し、これらの判定結果に基づいて切断位
置保存メモリ3から受け取る着目区間内の切断箇所の座
標値で示される画像メモリ1中の文字欠損位置に対して
復元処理を施す(ステップ507)。
(8) The restoring means 408 executes step 50.
6 is started after the second determination in 6 is completed, the determination result by the first determination means 406 and the determination result by the second determination means 407 are input, and the section of interest received from the cutting position storage memory 3 based on these determination results. Restoration processing is performed on the character loss position in the image memory 1 indicated by the coordinate values of the cut position in the inside (step 507).

【0090】この復元処理は、「交差1」,「交差
2」,および「重なり」の3種類の干渉パターンに対し
て、それぞれ異なる手続きで行われる。以下の〜
で、各干渉パターンに対する復元処理の手続きを説明す
る(具体例である図10〜図12参照)。
This restoration processing is performed by different procedures for the three types of interference patterns of "crossing 1", "crossing 2", and "overlap". below~
Now, the procedure of the restoration process for each interference pattern will be described (see FIGS. 10 to 12 which are specific examples).

【0091】なお、以下では横罫線によって生じた文字
欠損の復元処理の場合に限定して説明するが、x軸とy
軸の関係を交換することにより、縦罫線によって生じた
文字欠損の復元処理も同様に可能となる。
The following description will be limited to the case of restoration processing of a character loss caused by a horizontal ruled line, but the x axis and y
By exchanging the relationship of the axes, it is possible to similarly restore the character loss caused by the vertical ruled line.

【0092】 「交差1」の干渉パターンに対する復
元処理の手続き 図10に示されるように罫線上部の切断箇所の右端と罫
線下部の切断箇所の右端とを結ぶ直線と、同じく上下の
切断箇所の左端同士を結ぶ直線とを生成する。その結果
得られる上下の切断箇所と上記手続きによって生成され
た2直線とで囲まれる領域内の画素(図10において
「○」で示される画素)の画素値を「0」から「1」に
変換する。
Procedure of Restoration Process for Interference Pattern of “Cross 1” As shown in FIG. 10, a straight line connecting the right end of the cut point above the ruled line and the right end of the cut point below the ruled line and the left end of the upper and lower cut points as well And a straight line connecting them are generated. Convert the pixel value of the pixel (pixel indicated by "○" in FIG. 10) in the area surrounded by the upper and lower cutting points and the two straight lines generated by the above procedure from "0" to "1" To do.

【0093】 「交差2」の干渉パターンに対する復
元処理の手続き 罫線上部の切断箇所a0およびa1と罫線下部の切断箇
所b0とについて、a0とb0とに対してと、a1とb
0とに対してとのそれぞれに、上記「交差1」に適用し
た手続きと同じ手続きを施す(図11参照。図11にお
いて「○」で示される画素の画素値を「0」から「1」
に変換する)。
Procedure of Restoration Processing for Interference Pattern of “Cross 2” For the cut points a0 and a1 above the ruled line and the cut point b0 below the ruled line, a1 and b, and a1 and b
The same procedure as that applied to the above "crossing 1" is applied to each of 0 and (see FIG. 11. The pixel value of the pixel indicated by "○" in FIG. 11 is changed from "0" to "1".
Convert to).

【0094】 「重なり」の干渉パターンに対する復
元処理の手続き 図12に示されるように、罫線上部の切断箇所a0およ
びa1について、まず、2つの切断箇所a0およびa1
の外接矩形領域(図12において「×」で示される画素
の領域)を設定する。次に、設定された外接矩形領域に
含まれる画素の画素値を「0」から「1」に変換する
(図12の例ではもともと「1」である)。さらに、そ
の外接矩形領域の下部に隣接する2ライン分(画素2つ
の間隔のライン分)の領域に含まれる画素(図12にお
いて「○」で示される画素)の画素値を「0」から
「1」に変換する。ただし、各ラインの長さは矩形領域
から離れるに従って短く復元する。
Procedure of Restoration Processing for "Overlapping" Interference Pattern As shown in FIG. 12, for the cut points a0 and a1 above the ruled line, first, two cut points a0 and a1.
The circumscribed rectangular area (area of pixels indicated by “x” in FIG. 12) is set. Next, the pixel value of the pixel included in the set circumscribed rectangular area is converted from "0" to "1" (it is originally "1" in the example of FIG. 12). Further, the pixel values of the pixels (pixels indicated by “◯” in FIG. 12) included in the area of two lines (the line between two pixels) adjacent to the lower part of the circumscribed rectangular area are changed from “0” to “0”. 1 ". However, the length of each line is shortened as it goes away from the rectangular area.

【0095】本実施例では「横罫線と文字との干渉(特
に、横罫線と文字の下部との干渉)」を対象として説明
を進めてきたが、上述の各所でも一部言及したように、
横罫線と文字の上部との干渉,縦罫線と文字の右部との
干渉,および縦罫線と文字の左部との干渉に対しても、
上記の説明における座標を180°,反時計回転方向に
90°,および時計回転方向に90°だけ回転させるこ
とによって同様に対処することができる。
In the present embodiment, the description has been directed to "interference between horizontal ruled lines and characters (particularly, interference between horizontal ruled lines and lower part of characters)", but as mentioned above in part,
For interference between horizontal ruled lines and the upper part of characters, vertical ruled lines and the right part of characters, and vertical ruled lines and the left part of characters,
The same can be dealt with by rotating the coordinates in the above description by 180 °, 90 ° counterclockwise and 90 ° clockwise.

【0096】[0096]

【発明の効果】以上説明したように、本発明の罫線除去
方式は、罫線を消去した後に生じる欠損文字の切断位置
に着目し、その近傍の図形構造を解析することによって
文字と罫線との干渉パターンを推定し、その干渉パター
ンに基づいて復元処理を行うように構成することによ
り、輪郭追跡等を利用する他の方式(従来の罫線除去方
式)に比べて、高精度、かつ高速に欠損文字の復元処理
が可能になるという効果を有する。この効果により、本
発明の罫線除去方式が組み込まれるOCRにおける罫線
除去処理の処理精度や処理速度の向上を実現することが
できる。
As described above, according to the ruled line removing method of the present invention, attention is paid to the cutting position of a defective character generated after the ruled line is erased, and the graphic structure in the vicinity thereof is analyzed to cause interference between the character and the ruled line. By estimating the pattern and performing restoration processing based on the interference pattern, it is more accurate and faster than other methods (conventional ruled line removal method) that use contour tracking, etc. This has the effect of enabling restoration processing of. With this effect, it is possible to improve the processing accuracy and processing speed of the ruled line removal processing in the OCR incorporating the ruled line removal method of the present invention.

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

【図1】本発明の罫線除去方式の一実施例の構成を示す
ブロック図である。
FIG. 1 is a block diagram showing a configuration of an embodiment of a ruled line removing method of the present invention.

【図2】図1に示す罫線除去方式の処理(全体動作に係
る処理)を示す流れ図である。
FIG. 2 is a flowchart showing a process (process related to overall operation) of the ruled line removal method shown in FIG.

【図3】図1中の罫線消去手段の処理を示す流れ図であ
る。
FIG. 3 is a flowchart showing a process of ruled line erasing means in FIG.

【図4】図1中の文字欠損復元手段の構成を示すブロッ
ク図である。
FIG. 4 is a block diagram showing a configuration of a character loss restoring means in FIG.

【図5】図4に示す文字欠損復元手段の処理を示す流れ
図である。
FIG. 5 is a flowchart showing the processing of the character loss restoring means shown in FIG.

【図6】図1中の罫線消去手段の動作を説明するための
図である。
FIG. 6 is a diagram for explaining an operation of ruled line erasing means in FIG. 1.

【図7】干渉パターン「交差1」の例を示す図である。FIG. 7 is a diagram showing an example of an interference pattern “crossing 1”.

【図8】干渉パターン「交差2」の例を示す図である。FIG. 8 is a diagram showing an example of an interference pattern “intersection 2”.

【図9】干渉パターン「重なり」の例を示す図である。FIG. 9 is a diagram showing an example of an interference pattern “overlap”.

【図10】「交差1」に対する復元処理を説明するため
の図である。
FIG. 10 is a diagram for explaining a restoration process for “intersection 1”.

【図11】「交差2」に対する復元処理を説明するため
の図である。
FIG. 11 is a diagram for explaining a restoration process for “intersection 2”.

【図12】「重なり」に対する復元処理を説明するため
の図である。
FIG. 12 is a diagram for explaining a restoration process for “overlap”.

【図13】図1中の罫線位置保存メモリに蓄積されてい
る罫線位置情報のデータ構造を示す図である。
13 is a diagram showing a data structure of ruled line position information accumulated in a ruled line position storage memory in FIG.

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

1 画像メモリ 2 罫線消去手段 3 切断位置保存メモリ 4 文字欠損復元手段 5 罫線位置保存メモリ 401 交点座標算出手段 402 交点座標記憶手段 403 切断位置情報棄却手段 404 区間設定手段 405 特徴抽出手段 406 第1判定手段 407 第2判定手段 408 復元手段 409 切断位置情報選別手段 410 局所切断位置情報保存手段 1 Image Memory 2 Ruled Line Erasing Means 3 Cutting Position Saving Memory 4 Character Loss Restoring Means 5 Ruled Line Position Saving Memory 401 Intersection Coordinate Calculating Means 402 Intersection Coordinate Storage Means 403 Cutting Position Information Rejecting Means 404 Section Setting Means 405 Feature Extracting Means 406 First Judgment Means 407 Second judging means 408 Restoring means 409 Cutting position information selecting means 410 Local cutting position information storing means

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 少数のストロークによって形成される文
字および罫線を有する帳票画像を予め蓄積している画像
メモリと、 前記画像メモリ内の帳票画像中の罫線の罫線位置情報を
蓄積している罫線位置保存メモリと、 文字と罫線との干渉箇所で生じた文字の切断位置の座標
値を保存する切断位置保存メモリと、 前記罫線位置保存メモリから読み出された罫線位置情報
を利用して前記画像メモリ内の帳票画像中の罫線を消去
し、罫線消去の過程で文字と罫線との干渉箇所で生じた
文字成分の切断位置を示す座標値を前記切断位置保存メ
モリに保存する罫線消去手段と、 前記罫線位置保存メモリ内の罫線位置情報,前記切断位
置保存メモリ内の切断位置を示す座標値,および前記画
像メモリ内の帳票画像の参照に基づいて該切断位置の近
傍の帳票画像の図形構造を解析し、その解析によって該
切断位置で生じている文字と罫線との干渉パターンを推
定し、その推定に基づいて文字の欠損部分を復元する文
字欠損復元手段とを有することを特徴とする罫線除去方
式。
1. An image memory in which a form image having characters and ruled lines formed by a small number of strokes is accumulated in advance, and a ruled line position in which ruled line position information of ruled lines in the form image in the image memory is accumulated. A storage memory, a cutting position storage memory that stores the coordinate value of the cutting position of the character generated at the point where the character and the ruled line interfere, and the image memory using the ruled line position information read from the ruled line position storage memory. Ruled line erasing means for erasing the ruled lines in the form image in the inside, and for saving the coordinate value indicating the cutting position of the character component generated at the interference point between the character and the ruled line in the process of erasing the ruled lines in the cutting position saving memory, Based on the ruled line position information in the ruled line position saving memory, the coordinate value indicating the cutting position in the cutting position saving memory, and the reference of the form image in the image memory, a book near the cutting position is obtained. A character loss restoration means for analyzing a graphic structure of an image, estimating an interference pattern between a character and a ruled line generated at the cutting position by the analysis, and restoring a defective portion of the character based on the estimation. A characteristic ruled line removal method.
【請求項2】 一旦仮の罫線を検出した後にその仮罫線
検出結果から平均線幅および許容線幅を算出してその算
出結果に基づいてその罫線検出結果を修正して消去すべ
き罫線を確定する罫線消去手段を有すること特徴とする
請求項1記載の罫線除去方式。
2. A temporary ruled line is once detected, then an average line width and an allowable line width are calculated from the temporary ruled line detection result, and the ruled line detection result is corrected based on the calculation result to determine the ruled line to be erased. The ruled line removing method according to claim 1, further comprising:
【請求項3】 縦罫線と横罫線とが存在する帳票の帳票
画像を蓄積する画像メモリと、 1文字分の領域の認識において、横罫線が着目罫線であ
る場合には縦罫線で区切られた1区間に基づいて該認識
を行い、縦罫線が着目罫線である場合には横罫線で区切
られた1区間に基づいて該認識を行う文字欠損復元手段
とを有することを特徴とする請求項1または請求項2記
載の罫線除去方式。
3. An image memory for accumulating a form image of a form having vertical ruled lines and horizontal ruled lines, and in recognizing an area for one character, if the horizontal ruled line is a target ruled line, it is separated by vertical ruled lines. The character loss restoration means for performing the recognition based on one section and performing the recognition based on one section divided by a horizontal ruled line when the vertical ruled line is a target ruled line. Alternatively, the ruled line removing method according to claim 2.
【請求項4】 推定対象の「文字と罫線との干渉パター
ン」が「交差1」,「交差2」,および「重なり」であ
る文字欠損復元手段を有することを特徴とする請求項1
または請求項2記載の罫線除去方式。
4. The character loss restoration means, wherein the “interference pattern between characters and ruled lines” to be estimated is “intersection 1”, “intersection 2”, and “overlap”.
Alternatively, the ruled line removing method according to claim 2.
【請求項5】 推定対象の「文字と罫線との干渉パター
ン」が「交差1」,「交差2」,および「重なり」であ
る文字欠損復元手段を有することを特徴とする請求項3
記載の罫線除去方式。
5. The character loss restoration means having the "interference pattern between characters and ruled lines" to be estimated as "intersection 1", "intersection 2", and "overlap".
Ruled line removal method described.
【請求項6】 「少数のストロークによって形成される
文字」が数字であることを特徴とする請求項1または請
求項2記載の罫線除去方式。
6. The ruled line removing method according to claim 1, wherein the “character formed by a small number of strokes” is a numeral.
【請求項7】 「少数のストロークによって形成される
文字」が数字であることを特徴とする請求項3記載の罫
線除去方式。
7. The ruled line removing method according to claim 3, wherein the “character formed by a small number of strokes” is a numeral.
【請求項8】 「少数のストロークによって形成される
文字」が数字であることを特徴とする請求項4記載の罫
線除去方式。
8. The ruled line removing method according to claim 4, wherein the “character formed by a small number of strokes” is a numeral.
【請求項9】 「少数のストロークによって形成される
文字」が数字であることを特徴とする請求項5記載の罫
線除去方式。
9. The ruled line removing method according to claim 5, wherein the “character formed by a small number of strokes” is a numeral.
JP7352856A 1995-12-28 1995-12-28 Ruled line removal method Expired - Fee Related JP2995650B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7352856A JP2995650B2 (en) 1995-12-28 1995-12-28 Ruled line removal method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7352856A JP2995650B2 (en) 1995-12-28 1995-12-28 Ruled line removal method

Publications (2)

Publication Number Publication Date
JPH09185726A true JPH09185726A (en) 1997-07-15
JP2995650B2 JP2995650B2 (en) 1999-12-27

Family

ID=18426914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7352856A Expired - Fee Related JP2995650B2 (en) 1995-12-28 1995-12-28 Ruled line removal method

Country Status (1)

Country Link
JP (1) JP2995650B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6654495B1 (en) 1999-04-27 2003-11-25 International Business Machines Corporation Method and apparatus for removing ruled lines
JP2007241397A (en) * 2006-03-06 2007-09-20 Fuji Xerox Co Ltd Image processor and program
JP2010250425A (en) * 2009-04-13 2010-11-04 Hitachi Software Eng Co Ltd Underline removal apparatus
JP2012084132A (en) * 2010-09-16 2012-04-26 Toshiba Corp Character recognition device, character recognition method, and sorting device
JP2016177754A (en) * 2015-03-23 2016-10-06 日本電気株式会社 Character extraction device, character extraction method, and character extraction program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6654495B1 (en) 1999-04-27 2003-11-25 International Business Machines Corporation Method and apparatus for removing ruled lines
JP2007241397A (en) * 2006-03-06 2007-09-20 Fuji Xerox Co Ltd Image processor and program
JP2010250425A (en) * 2009-04-13 2010-11-04 Hitachi Software Eng Co Ltd Underline removal apparatus
US8452133B2 (en) 2009-04-13 2013-05-28 Hitachi Solutions, Ltd. Underline removal apparatus
EP2241999B1 (en) * 2009-04-13 2018-10-31 Hitachi Solutions, Ltd. Underline removal apparatus
JP2012084132A (en) * 2010-09-16 2012-04-26 Toshiba Corp Character recognition device, character recognition method, and sorting device
JP2016177754A (en) * 2015-03-23 2016-10-06 日本電気株式会社 Character extraction device, character extraction method, and character extraction program

Also Published As

Publication number Publication date
JP2995650B2 (en) 1999-12-27

Similar Documents

Publication Publication Date Title
CN110738207B (en) Character detection method for fusing character area edge information in character image
CN111640089B (en) Defect detection method and device based on feature map center point
CN111797829A (en) License plate detection method and device, electronic equipment and storage medium
CN101727580A (en) Image processing apparatus, electronic medium, and image processing method
CN111433780A (en) Lane line detection method, lane line detection apparatus, and computer-readable storage medium
CN110738030A (en) Table reconstruction method and device, electronic equipment and storage medium
CN104298947A (en) Method and device for accurately positioning two-dimensional bar code
JP2021135993A (en) Text recognition method, text recognition apparatus, electronic device, and storage medium
CN111626145B (en) Simple and effective incomplete form identification and page-crossing splicing method
JPH07220090A (en) Object recognition method
JP2640673B2 (en) Pattern recognition device
US20230065041A1 (en) Geometric pattern matching method and device for performing the method
JPH10171922A (en) Ruled line eraser and recording medium
JP2995650B2 (en) Ruled line removal method
CN113311507A (en) Typhoon path identification method and device
CN112364863A (en) Character positioning method and system for license document
CN115953744A (en) Vehicle identification tracking method based on deep learning
CN115187744A (en) Cabinet identification method based on laser point cloud
CN114495132A (en) Character recognition method, device, equipment and storage medium
JP3904397B2 (en) Table recognition method
CN113505745A (en) Character recognition method and device, electronic equipment and storage medium
JPH01271883A (en) Detecting system for center of fingerprint
CN111709419A (en) Method, system and equipment for positioning banknote serial number and readable storage medium
JP3466899B2 (en) Character recognition device and method, and program storage medium
JP3272776B2 (en) Character pattern recognition method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071029

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20081029

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091029

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20091029

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20101029

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20111029

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20121029

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20131029

Year of fee payment: 14

LAPS Cancellation because of no payment of annual fees