JP3534997B2 - Ruled line extraction device and method - Google Patents

Ruled line extraction device and method

Info

Publication number
JP3534997B2
JP3534997B2 JP34685197A JP34685197A JP3534997B2 JP 3534997 B2 JP3534997 B2 JP 3534997B2 JP 34685197 A JP34685197 A JP 34685197A JP 34685197 A JP34685197 A JP 34685197A JP 3534997 B2 JP3534997 B2 JP 3534997B2
Authority
JP
Japan
Prior art keywords
pattern
line
information
extracting
straight line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP34685197A
Other languages
Japanese (ja)
Other versions
JPH10240959A (en
Inventor
敦子 小原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP34685197A priority Critical patent/JP3534997B2/en
Publication of JPH10240959A publication Critical patent/JPH10240959A/en
Application granted granted Critical
Publication of JP3534997B2 publication Critical patent/JP3534997B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Document Processing Apparatus (AREA)
  • Image Analysis (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、光電変換装置等に
より読み込まれた任意の画像から罫線部分を抽出する罫
線抽出装置および方法に関する。本発明は、手書き文字
認識装置だけでなく、印刷文字認識装置、図面認識にお
ける文字、記号の切り出し、画像中の罫線と物体、図
形、文字の接触部分を分離するための装置等において、
直線と広い意味での図形とが重なったパターンからその
図形だけを切り出す場合に用いられる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a ruled line extracting apparatus and method for extracting a ruled line portion from an arbitrary image read by a photoelectric conversion device or the like. INDUSTRIAL APPLICABILITY The present invention is not only a handwritten character recognition device, but also a printed character recognition device, a character in drawing recognition, a cutout of a symbol, a device for separating ruled lines and objects in an image, a figure, a contact portion of a character,
It is used when cutting out only a figure from a pattern in which a straight line and a figure in a broad sense overlap.

【0002】[0002]

【従来の技術】近年、金融文書、ビジネス文書などの入
力周辺機器として、光学文字読み取り装置(optical ch
aracter reader:OCR)等に代表される文字認識装置
の需要が増加している。
2. Description of the Related Art Recently, an optical character reader (optical ch) has been used as an input peripheral device for financial documents, business documents, etc.
There is an increasing demand for character recognition devices represented by aracter reader (OCR).

【0003】従来の光学文字読み取り装置では、文字認
識を行う前に、入力された画像から1文字ずつの文字パ
ターンを切り出す文字の切り出し処理が行われる。光学
文字読み取り装置において、個々の文字の高い認識率を
実現するためには、認識の前処理である文字の切り出し
処理を正確に行うことが重要になる。
In the conventional optical character reading device, a character cutting process for cutting out a character pattern for each character from an input image is performed before performing character recognition. In order to realize a high recognition rate of individual characters in an optical character reading device, it is important to accurately perform character cutting processing, which is a preprocessing for recognition.

【0004】このため、従来の光学文字読み取り装置で
文字を読み取る場合、帳票などの文字の記入位置をあら
かじめ指定した文書(ドロップアウトカラーではなく黒
枠等の、罫線と文字とが同じような色および濃度で記入
された文書)に対し、指定された範囲内に文字を記入す
ることにより、高い認識率を実現するようにしていた。
Therefore, when a character is read by a conventional optical character reading device, a document such as a form in which the writing position of the character is designated in advance (not a dropout color but a black frame or the like, a ruled line and a character having the same color and It was designed to achieve a high recognition rate by writing characters in the specified range for documents written in density).

【0005】ところが、従来の光学文字読み取り装置で
は、指定範囲を示す罫線や枠に文字が接触したり、指定
範囲を示す罫線や枠から文字がはみ出したりした場合、
文字を正確に切り出すことが困難となり、文字の認識率
が低下するという問題があった。例えば、枠を除去する
際、文字領域の枠(文字枠)のわずかな傾きや凹凸に対
応することができず、文字枠の位置や線幅の変動によ
り、本来の文字の一部が欠けてしまったり、枠が残存し
たりする。
However, in the conventional optical character reading device, when a character comes into contact with a ruled line or a frame indicating a designated range or a character protrudes from the ruled line or the frame indicating a designated range,
There is a problem that it is difficult to accurately cut out a character and the recognition rate of the character decreases. For example, when removing the frame, it is not possible to deal with slight inclinations and irregularities of the frame of the character area (character frame), and part of the original character may be missing due to changes in the position and line width of the character frame. It disappears or the frame remains.

【0006】これらの問題点に対応するための従来技術
として、本出願人による「画像抽出方式」(特開平6−
309498)と「画像抽出装置」(特開平7−289
37)がある。これらの技術によれば、枠の位置やサイ
ズ等のフォーマット情報の入力を必要とせずに、枠の抽
出や除去を行うことが可能である。これらにより処理可
能な帳票は、一文字枠、ブロック枠(横一行枠またはフ
リーフォーマット枠)、または枠の外形が矩形状となっ
ており横枠線が規則的に配置されている構造を持つ表を
有するものである。
[0006] As a conventional technique for dealing with these problems, an "image extraction method" by the present applicant (Japanese Patent Laid-Open No.
309498) and "Image Extraction Device" (Japanese Patent Laid-Open No. 7-289).
37). According to these techniques, it is possible to extract or remove a frame without having to input format information such as the position and size of the frame. The form that can be processed by these is a one-character frame, a block frame (horizontal one-line frame or free format frame), or a table with a rectangular outer shape and a horizontal frame line arranged regularly. I have.

【0007】また、本出願人による先願の罫線抽出技術
としては、「枠抽出装置及び矩形抽出装置」(特願平7
−203259)、「パターン領域切り出し方式及びパ
ターン抽出装置」(特願平7−282171)、および
「パターン抽出装置及びパターン領域の切り出し方法」
(特願平8−107568)がある。
As a ruled line extraction technique of the prior application by the present applicant, "frame extraction device and rectangle extraction device" (Japanese Patent Application No.
-203259), "Pattern region cutting method and pattern extracting device" (Japanese Patent Application No. 7-282171), and "Pattern extracting device and pattern region cutting method"
(Japanese Patent Application No. 8-107568).

【0008】これらの技術によれば、図40に示すよう
に、外形が矩形となっており横枠線が規則的に配置され
ている構造を持つ表形式枠であっても、また、図41に
示すように、枠の外形が矩形でなくても、また、図41
の網掛け部分のように、枠で囲まれた矩形の中にさらに
細かい構造(入れ子構造)を持つ表形式枠についても、
枠の抽出および除去を行うことができる。さらに、点線
と実線とが混在していたり、画像に多少のかすれがあっ
たりする場合でも、処理可能である。以下に処理の概要
を示す。
According to these techniques, as shown in FIG. 40, even if the tabular frame has a structure in which the outer shape is rectangular and the horizontal frame lines are regularly arranged, FIG. 41. Even if the outer shape of the frame is not rectangular as shown in FIG.
For a tabular frame that has a finer structure (nested structure) in a rectangle surrounded by a frame, like the shaded part of
Frames can be extracted and removed. Furthermore, it is possible to process even when the dotted line and the solid line are mixed or the image has some blur. The outline of the processing is shown below.

【0009】(1)細線化:マスク処理によって、縦横
のパターンを細線化し、文字と枠の太さの差をなくす。 (2)線分抽出:「画像抽出方式」(特開平6−309
498)における隣接投影法を用いて、比較的長い直線
の抽出を行う。隣接投影とは、注目する行または列に含
まれる画素の投影値に、その周囲の行または列の投影値
を足し合せた結果を、注目する行または列の最終的な投
影値とする方法である。この投影法によれば、特定の行
または列の周囲の画素分布を大局的に捉えることができ
る。
(1) Thinning: By masking, the vertical and horizontal patterns are thinned to eliminate the difference in thickness between the character and the frame. (2) Line segment extraction: “image extraction method” (Japanese Patent Laid-Open No. 6-309
498), the adjacent projection method is used to extract a relatively long straight line. Adjacent projection is a method in which the projection values of pixels included in the row or column of interest are added to the projection values of the surrounding rows or columns to obtain the final projection value of the row or column of interest. is there. According to this projection method, the pixel distribution around a specific row or column can be comprehensively captured.

【0010】(3)直線抽出:抽出された線分を順に探
索し、線分と線分の間に一定長さ以上の途切れがないか
どうかを検査する。間にそのような途切れがない線分同
士を順に統合していき、長い直線を抽出する。
(3) Straight line extraction: The extracted line segments are searched in order, and it is inspected whether there is a break of a certain length or more between the line segments. In the meantime, line segments that do not have such discontinuities are sequentially integrated to extract a long straight line.

【0011】(4)直線統合:抽出された直線同士を再
度統合する。かすれにより2つ以上の部分に分離された
直線を、1つの直線に統合する。 (5)直線伸張:規則的な帳票であると分かっていると
きに限り、かすれにより短くなった直線の伸張処理を行
い、本来の長さに修復する。
(4) Line integration: The extracted lines are integrated again. A straight line separated into two or more parts by blurring is integrated into a single straight line. (5) Straight line extension: Only when it is known that the form is regular, a straight line shortened by fading is extended to restore the original length.

【0012】(6)横枠決定:先願の「枠抽出装置及び
矩形抽出装置」(特願平7−203259)に示された
規則に従って、表の上部から順に、2本1組で1行の記
入欄を構成する横直線を、横枠線として2本ずつ抽出す
る。
(6) Determination of horizontal frame: In accordance with the rules set forth in the prior application "Frame Extracting Device and Rectangular Extracting Device" (Japanese Patent Application No. 7-203259), one set of two lines in order from the top of the table The horizontal straight lines that form the entry fields are extracted as horizontal frame lines, two by two.

【0013】(7)縦枠決定:縦枠線は、上述の記入欄
1行毎に決定する。注目している行を構成する2本の横
枠線に、上下端がともに達している縦直線を、その行に
おける縦枠線とする。
(7) Vertical frame determination: The vertical frame line is determined for each line of the above-mentioned entry column. A vertical straight line whose upper and lower ends reach the two horizontal frame lines forming the line of interest is the vertical frame line in that line.

【0014】(8)入れ子処理:決定された縦枠と横枠
によって4辺を囲まれた矩形範囲の内部がさらに細かく
分割されて、表の入れ子を構成している場合には、その
矩形範囲を新たに表とみなす。そして、上記(1)〜
(7)の処理を繰り返すことにより、それを2つ以上の
矩形範囲に分割する。
(8) Nesting processing: When the inside of a rectangular range surrounded by the determined vertical and horizontal frames on four sides is further finely divided to form a nested table, the rectangular range is set. Is newly regarded as a table. And the above (1)-
By repeating the process of (7), it is divided into two or more rectangular ranges.

【0015】[0015]

【発明が解決しようとする課題】しかしながら、上述し
た罫線抽出技術には次のような問題がある。実際に帳票
データをイメージスキャナで入力し、様々な帳票の画像
に対して処理を行うと、先願の技術では対応しきれない
形状や画像状態の中にも、比較的出現頻度の高いものが
あることが分かった。これらの形状や状態とは、以下の
ようなものである。
However, the ruled line extraction technique described above has the following problems. By actually inputting form data with an image scanner and processing images of various forms, some of the shapes and image states that cannot be handled by the technology of the prior application have a relatively high frequency of appearance. I knew it was. These shapes and states are as follows.

【0016】[1] 先願の技術においては、表を構成
する部分パターンの大きさがある一定の大きさ以上であ
る必要がある。しかし、実際にスキャナ等で入力した画
像においては、パターンのかすれ方や潰れ方が様々であ
り、定められた大きさ以上のパターンが常に存在すると
は限らない。
[1] In the technique of the prior application, it is necessary that the size of the partial pattern forming the table is not less than a certain size. However, in an image actually input by a scanner or the like, there are various patterns of blurring and collapsing, and a pattern having a size larger than a predetermined size does not always exist.

【0017】かすれによって、本来は1つのパターンが
ばらばらに分割されている場合もあり、潰れによって、
点線の所々に周囲とは大きさの異なるパターンが存在す
る場合もある。このため、かすれにより途切れた短い罫
線パターンや、潰れにより部分的に変形した点線パター
ンを、救済する必要がある。
In some cases, one pattern is originally divided into pieces due to blurring, and due to crushing, one pattern is divided into pieces.
There may be a pattern having a size different from that of the surroundings at the dotted lines. For this reason, it is necessary to rescue short ruled line patterns that are interrupted due to blurring and dotted line patterns that are partially deformed due to crushing.

【0018】[2] また、先願の技術においては、文
字領域が4本の枠線によって4辺を囲まれた矩形領域で
あることと、その4箇所の角部の各々において、2本の
縦横枠線が90度の角を形成していることが、前提条件
となっている。しかし、これらの条件は実際の帳票に必
ずしも適合しているとは限らない。
[2] In the technique of the prior application, the character area is a rectangular area surrounded by four frame lines on four sides, and two corners are provided at each of the four corners. A prerequisite is that the vertical and horizontal frame lines form a 90-degree corner. However, these conditions do not always match the actual form.

【0019】例えば、文字領域の一辺は必ずしも1本の
枠線ではなく、二重線によって構成されている場合もあ
る。また、文字領域の角部は必ずしも90度の角を形成
しているわけではなく、角が丸くなったR付き罫線によ
り構成されている場合もある。さらに、4辺を枠線で囲
まれた文字領域内部に、枠線に接触しない独立したパタ
ーンとして、より小さい表構造を持つものが存在する場
合もある。そこで、このような出現頻度の高い形状を処
理可能とし、精度を上げることが必要となる。
For example, one side of the character area may be constituted by a double line instead of one frame line. Further, the corners of the character area do not necessarily form corners of 90 degrees, and may be formed by R-shaped ruled lines with rounded corners. Further, there may be a case where a pattern having a smaller table structure exists as an independent pattern that does not contact the frame line inside the character area surrounded by the frame line on four sides. Therefore, it is necessary to process such a frequently appearing shape and improve the accuracy.

【0020】[3] また、先願の技術においては、規
則的な表と不規則な表とに処理を分け、規則的であると
あらかじめ分かっている場合には、その情報を用いるこ
とで、処理精度の向上を図っている。規則的であるとい
う情報を用いて処理を行う場合、かすれによって短くな
った直線を一定の規則に従って伸張したり、新たな罫線
を仮想的に作成したりする処理を行った結果、実際の画
像とは異なる罫線情報が作成される。
[3] In the technique of the prior application, the processing is divided into a regular table and an irregular table, and if it is known in advance that the table is regular, the information is used to We are working to improve processing accuracy. When performing processing using information that is regular, as a result of performing processing that expands a straight line shortened by blurring according to a certain rule or creates a new ruled line virtually, Creates different ruled line information.

【0021】したがって、その罫線抽出処理に後続する
処理では、画像上に実在しない罫線を実在するものと同
様に扱ってしまうので、処理の精度が低下するという問
題がある。このような後続処理の一例として、入力され
た画像が既知の帳票に対応するかどうかを調べるレイア
ウト認識処理がある。
Therefore, in the process subsequent to the ruled line extracting process, ruled lines that do not actually exist on the image are treated in the same manner as those that actually exist, and thus there is a problem that the accuracy of the process decreases. As an example of such subsequent processing, there is a layout recognition processing for checking whether the input image corresponds to a known form.

【0022】[4] また、他の後続処理の一例とし
て、「画像抽出方式」(特開平6−309498)にも
示されている文字補完処理がある。この処理では、罫線
に接触したり、罫線と重複したりしている文字の画像か
ら罫線部分の画素を除去したときに失われた文字部分の
画素を補完して、文字を修復する。これにより、枠によ
って分断された文字パターンが補完される。このとき、
修復対象の文字と同じ文字領域内にある他の文字の大き
さの平均値が、処理に用いられる。
[4] As another example of the subsequent processing, there is a character complementing processing described in "Image Extraction Method" (JP-A-6-309498). In this processing, the pixels of the character portion lost when the pixels of the ruled line portion are removed from the image of the character that is in contact with the ruled line or overlaps with the ruled line are complemented to restore the character. As a result, the character pattern divided by the frame is complemented. At this time,
The average value of the sizes of other characters in the same character area as the character to be restored is used for the processing.

【0023】ところが、罫線抽出処理において文字補完
処理に渡すデータを作成する際、個々の文字領域の大き
さが小さ過ぎると、後続する文字補完処理の精度が悪く
なる。この理由は、小さな文字領域では含まれる文字の
個数が少ないため、文字の大きさの平均値の精度が悪く
なり、結果として文字補完の精度も悪くなるためであ
る。そこで、文字補完の精度をなるべく落とさないよう
な工夫が必要とされる。
However, when the data to be passed to the character complementing process in the ruled line extracting process is created, if the size of each character area is too small, the accuracy of the subsequent character complementing process becomes poor. The reason for this is that the small number of characters contained in a small character area reduces the accuracy of the average value of the character size, and consequently the accuracy of character completion. Therefore, it is necessary to devise a method that does not reduce the accuracy of character completion as much as possible.

【0024】[5] また、先願の技術においては、点
線を構成するパターンの大きさが一定でないと点線を正
確に抽出することができず、2本の点線がT字型に交差
している場合には、T字の縦棒に相当する点線を実際よ
り長く抽出してしまう傾向がある。そこで、点線をより
正確に抽出する技術が必要とされる。
[5] In the technique of the prior application, the dotted lines cannot be accurately extracted unless the size of the pattern forming the dotted lines is constant, and the two dotted lines intersect in a T-shape. If there is, the dotted line corresponding to the T-shaped vertical bar tends to be extracted longer than it actually is. Therefore, a technique for more accurately extracting the dotted line is needed.

【0025】[6] また、先願の技術においては、直
線矩形と判断された矩形範囲内に短冊状の短い線分矩形
が含まれていない場合は、線分矩形の位置情報により罫
線の位置を詳細に判断することができない。このため、
罫線の位置抽出の精度があまりよくないという問題があ
る。
[6] Further, in the technique of the prior application, when the strip-shaped short line segment rectangle is not included in the rectangular range determined as the straight line rectangle, the position of the ruled line is determined by the position information of the line segment rectangle. Can't judge in detail. For this reason,
There is a problem in that the accuracy of ruled line position extraction is not very good.

【0026】上記[1]から[6]までに述べた通り、
先願の罫線抽出技術においては、位置、形式ともに未知
の帳票の画像や、かすれや潰れのある画質の悪い画像
や、文字と枠が接触したり、枠から文字がはみ出したり
している画像に、十分に対処できないという問題があ
る。
As described in the above [1] to [6],
In the ruled line extraction technology of the previous application, the image of a form whose position and format are unknown, the image of poor quality with faintness or crushing, and the image where characters and frames are in contact with each other or characters are protruding from the frames are used. , There is a problem that cannot be dealt with sufficiently.

【0027】本発明の課題は、任意の入力画像に対して
想定される様々な形態のパターンを効率よく処理し、よ
り正確に罫線を抽出することのできる罫線抽出装置およ
び方法を提供することである。
An object of the present invention is to provide a ruled line extracting apparatus and method capable of efficiently processing various patterns assumed for an arbitrary input image and extracting ruled lines more accurately. is there.

【0028】[0028]

【課題を解決するための手段】図1は、本発明の装置の
原理図である。図1の装置は、本発明の罫線抽出装置に
関する第1、第2、第3、第4、第5、第6、第7、第
8、第9、第10、第11、第12、第13、第14、
および第15の原理と、文字切り出し装置に関する第1
6の原理を含む。
FIG. 1 shows the principle of the device of the present invention. The apparatus of FIG. 1 is the first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, and twelfth related to the ruled line extracting apparatus of the present invention. Thirteenth, fourteenth,
And the fifteenth principle and the first of the character cutting device
Including 6 principles.

【0029】そして、図1の装置は、パターン抽出手段
1、判定手段2−1、2−2、2−3、2−4、2−
5、点線抽出手段3−1、直線抽出手段3−2、線抽出
手段3−3、補正手段4−1、4−4、付加手段4−
2、4−5、4−6、作成手段4−3、生成手段4−
7、表抽出手段5、枠線抽出手段6、領域抽出手段7、
入力手段8、および変更手段9を備える。
The apparatus shown in FIG. 1 has the pattern extracting means 1 and the judging means 2-1, 2-2, 2-3, 2-4, 2-.
5, dotted line extraction means 3-1, straight line extraction means 3-2, line extraction means 3-3, correction means 4-1, 4-4, addition means 4-
2, 4-5, 4-6, creating means 4-3, generating means 4-
7, table extraction means 5, frame line extraction means 6, area extraction means 7,
The input means 8 and the change means 9 are provided.

【0030】第1の原理において、パターン抽出手段1
は、入力画像から画素の連結情報に基づいて部分パター
ンを抽出する。判定手段2−1は、注目している部分パ
ターンの外接矩形の内側に位置する一定以上の大きさの
部分パターンを処理対象と判定し、判定手段2−2は、
判定手段2−1により処理対象と判定されなかった部分
パターンのうち、細長い形状を有する部分パターンを処
理対象と判定する。
In the first principle, the pattern extraction means 1
Extracts a partial pattern from the input image based on the pixel connection information. The determining unit 2-1 determines a partial pattern, which is located inside the circumscribing rectangle of the target partial pattern and has a size equal to or larger than a certain size, as a processing target, and the determining unit 2-2
Among the partial patterns that are not determined as the processing target by the determination unit 2-1, a partial pattern having an elongated shape is determined as the processing target.

【0031】部分パターンとは、入力画像に含まれる互
いに連結した画素の集合を表す。判定手段2−1は、一
定以上の大きさの部分パターンを表の候補とみなして、
これに注目し、その内側に位置する一定以上の大きさの
部分パターンを、罫線抽出処理の処理対象と判定する。
判定手段2−2は、処理対象と判定されなかった部分パ
ターンであっても、その縦または横の幅が比較的小さ
く、細長い形状をしている場合に、それを処理対象に加
える。
The partial pattern represents a set of connected pixels included in the input image. The judging means 2-1 considers the partial patterns having a certain size or more as table candidates,
Paying attention to this, the partial pattern having a certain size or more located inside thereof is determined as the processing target of the ruled line extraction processing.
The determining unit 2-2 adds a partial pattern, which has not been determined to be a processing target, to a processing target when the vertical or horizontal width thereof is relatively small and has an elongated shape.

【0032】これにより、ある罫線がかすれによって小
さいパターンに分離してしまった状態や、点線の一部が
潰れて細長い形状のパターンになった状態を救済して、
処理対象に加えることが可能になり、より正確な罫線抽
出処理が行われる。
As a result, the state in which a certain ruled line is separated into small patterns due to blurring, or the state in which a part of the dotted line is crushed to form an elongated shape pattern is rescued,
It becomes possible to add to the processing target, and more accurate ruled line extraction processing is performed.

【0033】第2の原理において、パターン抽出手段1
は、入力画像から画素の連結情報に基づいて部分パター
ンを抽出する。点線抽出手段3−1は、部分パターンに
基づいて点線パターンを抽出し、点線パターンを構成す
る部分パターンを含まないように他の点線パターンを抽
出する。
In the second principle, the pattern extraction means 1
Extracts a partial pattern from the input image based on the pixel connection information. The dotted line extraction means 3-1 extracts the dotted line pattern based on the partial pattern, and extracts other dotted line patterns so as not to include the partial patterns forming the dotted line pattern.

【0034】点線パターンとは、複数の部分パターンが
規則的に並んでいる部分を表す。点線抽出手段3−1が
点線パターンを抽出する際、一度ある点線パターンを構
成すると判断した部分パターンは、他の点線パターンを
構成することができないという制約を課すことで、複数
の点線パターンを互いに重複しないように抽出すること
ができる。したがって、2本の点線がT字型に交差して
いるような場合でも、一方の点線を実際より長く抽出し
てしまう可能性が低下する。
The dotted line pattern represents a portion in which a plurality of partial patterns are regularly arranged. When the dotted line extraction means 3-1 extracts a dotted line pattern, a partial pattern that has once been determined to form a certain dotted line pattern is constrained to be unable to form another dotted line pattern, thereby making a plurality of dotted line patterns mutually. It can be extracted so that it does not overlap. Therefore, even if two dotted lines intersect in a T-shape, the possibility of extracting one dotted line longer than it actually is is reduced.

【0035】第3の原理において、パターン抽出手段1
は、入力画像から画素の連結情報に基づいて部分パター
ンを抽出する。点線抽出手段3−1は、2つの部分パタ
ーン間の距離を、各部分パターンの外接矩形の位置座標
を用いて算出し、部分パターン間の距離に基づいて点線
パターンを抽出する。
In the third principle, the pattern extracting means 1
Extracts a partial pattern from the input image based on the pixel connection information. The dotted line extraction means 3-1 calculates the distance between the two partial patterns using the position coordinates of the circumscribing rectangle of each partial pattern, and extracts the dotted line pattern based on the distance between the partial patterns.

【0036】例えば、点線抽出手段3−1が、2つの部
分パターンの外接矩形の端点間の距離を部分パターン間
の距離として用い、それに基づいて部分パターンの並び
の規則性を判定することで、大きさの異なる部分パター
ンの並びからも点線パターンを抽出することが可能にな
る。
For example, the dotted line extracting means 3-1 uses the distance between the end points of the circumscribed rectangles of the two partial patterns as the distance between the partial patterns, and determines the regularity of the arrangement of the partial patterns based on the distance. It is possible to extract the dotted line pattern from the arrangement of the partial patterns having different sizes.

【0037】第4の原理において、パターン抽出手段1
は、入力画像から画素の連結情報に基づいて部分パター
ンを抽出する。点線抽出手段3−1は、上記部分パター
ンに基づいて点線パターンを抽出し、補正手段4−1
は、その点線パターンの端点の位置に補正が必要な場合
に端点の位置を変更する。
In the fourth principle, the pattern extraction means 1
Extracts a partial pattern from the input image based on the pixel connection information. The dotted line extraction means 3-1 extracts the dotted line pattern based on the partial pattern, and the correction means 4-1.
Changes the position of the end point when the position of the end point of the dotted line pattern needs to be corrected.

【0038】このように、補正手段4−1が点線パター
ンの端点の位置を補正し、変更することで、点線抽出の
精度が向上する。第5の原理において、直線抽出手段3
−2は、入力画像から画素の連結情報に基づいて直線パ
ターンを抽出する。付加手段4−2は、上記直線パター
ンと、その直線パターンを構成する線分パターンとを関
連付ける情報を、その直線パターンの情報とその線分パ
ターンの情報の両方または片方に付加する。
As described above, the correction means 4-1 corrects and changes the positions of the end points of the dotted line pattern, thereby improving the accuracy of dotted line extraction. In the fifth principle, the straight line extracting means 3
-2 extracts a straight line pattern from the input image based on the pixel connection information. The adding means 4-2 adds the information for associating the straight line pattern and the line segment pattern forming the straight line pattern to both or one of the straight line pattern information and the line segment pattern information.

【0039】直線パターンとは、横長または縦長のマス
クを用いたマスク処理等により、入力画像から抽出され
た横長または縦長のパターンに相当し、より短い1つ以
上の線分パターンに分割されて管理される。付加手段4
−2は、例えば、線分パターンの識別情報を直線パター
ンの情報に付加したり、または、直線パターンの識別情
報を線分パターンの情報に付加したりすることで、両者
を関連付ける。
A straight line pattern corresponds to a horizontally or vertically long pattern extracted from an input image by mask processing using a horizontally or vertically long mask, and is divided into one or more shorter line segment patterns for management. To be done. Adding means 4
-2 associates both by adding line segment pattern identification information to straight line pattern information, or adding straight line pattern identification information to line segment pattern information.

【0040】これにより、直線パターンの情報から線分
パターンの情報を参照することが容易になり、必要に応
じて、直線パターンの位置を詳細に認識できるようにな
る。第6の原理において、直線抽出手段3−2は、入力
画像から画素の連結情報に基づいて直線パターンを抽出
する。付加手段4−2は、上記直線パターンを構成する
複数の線分パターンの位置関係を表す情報を、その線分
パターンの情報に付加する。
As a result, it becomes easy to refer to the information on the line segment pattern from the information on the straight line pattern, and the position of the straight line pattern can be recognized in detail as necessary. In the sixth principle, the straight line extraction means 3-2 extracts a straight line pattern from the input image based on the pixel connection information. The adding means 4-2 adds the information indicating the positional relationship of the plurality of line segment patterns forming the straight line pattern to the information of the line segment pattern.

【0041】例えば、付加手段4−2が、隣接する2つ
の線分パターンのうち、一方の線分パターンの識別情報
を他方の線分パターンの情報に付加することにより、こ
れらの位置関係が記述される。これにより、ある線分パ
ターンの情報から隣接する線分パターンの情報を参照す
ることが容易になり、線分パターンの情報を検索する処
理が効率化される。
For example, the adding means 4-2 adds the identification information of one line segment pattern of the two adjacent line segment patterns to the information of the other line segment pattern to describe the positional relationship between them. To be done. Thereby, it becomes easy to refer to the information of the adjacent line segment pattern from the information of a certain line segment pattern, and the process of searching the information of the line segment pattern becomes efficient.

【0042】第7の原理において、直線抽出手段3−2
は、入力画像から画素の連結情報に基づいて直線パター
ンを抽出する。付加手段4−2は、上記直線パターンを
抽出する際にその直線パターンに対して施された処理を
表す情報を、その直線パターンの情報に付加する。
In the seventh principle, the straight line extracting means 3-2
Extracts a straight line pattern from the input image based on the pixel connection information. The adding means 4-2 adds information indicating the processing performed on the straight line pattern when the straight line pattern is extracted, to the information on the straight line pattern.

【0043】直線パターンに対して施される処理として
は、例えば、直線パターン同士を統合する統合処理や、
直線パターンを特定の方向に伸張する伸張処理等があ
る。付加手段4−2は、これらの処理の種類と、その処
理を行ったかどうかを表す情報を、直線パターンの情報
に付加する。これにより、レイアウト認識処理等におい
て、対象とする直線が元々存在していたものか、特定の
処理により変形されたものかを判別することができ、よ
り詳細な処理を行うことが可能になる。
As the processing performed on the straight line patterns, for example, an integration processing for integrating the straight line patterns,
There is a stretching process for stretching a straight line pattern in a specific direction. The adding unit 4-2 adds the type of processing and information indicating whether or not the processing is performed to the linear pattern information. As a result, in layout recognition processing or the like, it is possible to determine whether the target straight line originally existed or was deformed by specific processing, and it is possible to perform more detailed processing.

【0044】第8の原理において、直線抽出手段3−2
は、入力画像から画素の連結情報に基づいて直線パター
ンを抽出する。作成手段4−3は、上記直線パターンを
表す領域の中で、その直線パターンを構成する線分パタ
ーンが存在していない部分に、仮想的に線分パターンを
作成する。
In the eighth principle, the straight line extracting means 3-2
Extracts a straight line pattern from the input image based on the pixel connection information. The creating unit 4-3 virtually creates a line segment pattern in a portion of the area representing the straight line pattern where the line segment pattern forming the straight line pattern does not exist.

【0045】作成手段4−3が適当な線分パターンを仮
想的に作成することで、元々線分パターンが存在してい
ない領域においても、線分パターンの情報を参照するこ
とが可能になる。これにより、直線パターンの位置がよ
り正確に決定されるので、その位置情報を必要とする他
の処理の精度が向上する。
Since the creating means 4-3 virtually creates an appropriate line segment pattern, it becomes possible to refer to the information of the line segment pattern even in an area where the line segment pattern originally does not exist. As a result, the position of the straight line pattern is determined more accurately, and the accuracy of other processing that requires the position information is improved.

【0046】第9の原理において、直線抽出手段3−2
は、入力画像から画素の連結情報に基づいて直線パター
ンを抽出する。補正手段4−4は、上記直線パターンを
表す領域の中で、その直線パターンを構成する線分パタ
ーンが存在していない部分を補うように、線分パターン
の大きさを変更する。
In the ninth principle, the line extracting means 3-2
Extracts a straight line pattern from the input image based on the pixel connection information. The correction unit 4-4 changes the size of the line segment pattern so as to compensate for the portion of the region representing the straight line pattern where the line segment pattern forming the straight line pattern does not exist.

【0047】例えば、補正手段4−4が線分パターンを
伸張して、線分パターンが存在していない領域をなくす
ことで、第8の原理と同様に、直線パターンの位置がよ
り正確に決定され、その位置情報を必要とする他の処理
の精度が向上する。
For example, by correcting the line segment pattern by the correction means 4-4 to eliminate the area where the line segment pattern does not exist, the position of the straight line pattern can be more accurately determined as in the eighth principle. The accuracy of other processing that requires the position information is improved.

【0048】第10の原理において、直線抽出手段3−
2は、入力画像から画素の連結情報に基づいて直線パタ
ーンを抽出する。作成手段4−3は、上記直線パターン
を表す領域に仮想的に線分パターンを作成し、補正手段
4−4は、その直線パターンを構成する線分パターンの
大きさを変更する。判定手段2−3は、上記直線パター
ンを表す領域の中で、その直線パターンを構成する線分
パターンが存在していない部分の大きさによって、新た
に線分パターンを作成するか、周囲の線分パターンの大
きさを変更するかを判定する。
In the tenth principle, the straight line extracting means 3-
2 extracts a straight line pattern from the input image based on the pixel connection information. The creating unit 4-3 virtually creates a line segment pattern in the area representing the straight line pattern, and the correcting unit 4-4 changes the size of the line segment pattern forming the straight line pattern. The determining unit 2-3 creates a new line segment pattern or a surrounding line depending on the size of a portion in the line pattern that does not include the line segment pattern. Determine whether to change the size of the minute pattern.

【0049】線分パターンが存在していない部分の大き
さによって、作成手段4−3による線分パターンの作成
と補正手段4−4による線分パターンの大きさの変更の
いずれかを選択できるようにすることで、処理の効率が
高められる。
Depending on the size of the portion where the line segment pattern does not exist, either the creation of the line segment pattern by the creating means 4-3 or the change of the size of the line segment pattern by the correcting means 4-4 can be selected. By so doing, the processing efficiency can be improved.

【0050】第11の原理において、枠線抽出手段6
は、入力画像から画素の連結情報に基づいて枠線パター
ンを抽出し、領域抽出手段7は、縦横の枠線パターンで
囲まれた矩形領域を抽出する。判定手段2−5は、上記
矩形領域の角の部分が特定の形状であるかどうかを判定
し、付加手段4−6は、特定の形状である可能性を表す
情報を、補完処理のための情報に付加する。
In the eleventh principle, the frame line extracting means 6
Is a frame line pattern extracted from the input image based on the pixel connection information, and the region extraction means 7 extracts a rectangular region surrounded by the vertical and horizontal frame line patterns. The determining unit 2-5 determines whether or not the corner portion of the rectangular area has a specific shape, and the adding unit 4-6 uses the information indicating the possibility of the specific shape for the complementary processing. Append to information.

【0051】枠線パターンとは、直線パターンのうち
で、表の罫線の候補となるパターンを表し、通常、縦横
2本ずつの枠線パターンにより、1つの文字領域に対応
する矩形領域が形成される。例えば、判定手段2−5
は、その矩形領域の角の部分を調べて、縦横の罫線がR
付き罫線に相当するかどうかを判定し、付加手段4−6
は、R付き罫線の可能性を表す情報を文字補完処理へ渡
す情報に付加する。
The frame line pattern represents a pattern that is a candidate for a ruled line in a table among straight line patterns. Usually, a frame region pattern of two vertical lines and a horizontal line forms a rectangular area corresponding to one character area. It For example, the determination means 2-5
Examines the corners of the rectangular area and finds that the vertical and horizontal ruled lines are R
It is determined whether or not it corresponds to the ruled line, and the adding means 4-6.
Adds information indicating the possibility of a ruled line with R to the information to be passed to the character complementing process.

【0052】これにより、文字補完処理において、矩形
領域内のパターンが文字なのか罫線の一部なのかを判断
するためのデータが増えるので、文字補完処理の精度が
向上する。
As a result, in the character complementing process, the amount of data for determining whether the pattern in the rectangular area is a character or a part of a ruled line is increased, so that the accuracy of the character complementing process is improved.

【0053】第12の原理において、枠線抽出手段6
は、入力画像から画素の連結情報に基づいて枠線パター
ンを抽出し、領域抽出手段7は、縦横の枠線パターンで
囲まれた矩形領域を抽出する。判定手段2−5は、上記
矩形領域に二重線が存在するかどうかを判定し、上記二
重線が存在すると判定された場合、生成手段4−7は、
判定結果に基づいて補完処理のための情報を生成する。
In the twelfth principle, the frame line extracting means 6
Is a frame line pattern extracted from the input image based on the pixel connection information, and the region extraction means 7 extracts a rectangular region surrounded by the vertical and horizontal frame line patterns. The determining means 2-5 determines whether or not a double line exists in the rectangular area, and when it is determined that the double line exists, the generating means 4-7,
Information for the complementary process is generated based on the determination result.

【0054】判定手段2−5が矩形領域の周辺付近に二
重線が存在すると判定した場合、生成手段4−7は、例
えば、その二重線を含まないような領域を文字補完処理
の処理対象とするような情報を生成する。これにより、
文字補完処理において、矩形領域内の二重線の一部が文
字とみなさる恐れがなくなるので、文字補完処理の精度
が向上する。
When the determining means 2-5 determines that a double line exists near the periphery of the rectangular area, the generating means 4-7, for example, processes the area not including the double line in the character complementing process. Generate the target information. This allows
In the character complementing process, there is no possibility that a part of the double line in the rectangular area is regarded as a character, so that the accuracy of the character complementing process is improved.

【0055】第13の原理において、枠線抽出手段6
は、入力画像から画素の連結情報に基づいて枠線パター
ンを抽出し、領域抽出手段7は、縦横の枠線パターンで
囲まれた矩形領域を抽出する。生成手段4−7は、一定
の大きさに満たない矩形領域が一定数以上並んでいる場
合に、複数の矩形領域をまとめて補完処理の処理範囲を
生成する。
In the thirteenth principle, the frame line extracting means 6
Is a frame line pattern extracted from the input image based on the pixel connection information, and the region extraction means 7 extracts a rectangular region surrounded by the vertical and horizontal frame line patterns. When a certain number of rectangular areas that are less than a certain size are lined up, the generation means 4-7 collects a plurality of rectangular areas and generates a processing range of the complementary processing.

【0056】例えば、帳票の金額欄のように、1文字分
の升目が横に1列に並んでいるような場合であっても、
生成手段4−7は、それらを1つの文字領域であるとみ
なし、まとめて文字補完処理の処理対象とするような情
報を生成する。これにより、文字補完処理において、他
の升目の文字の大きさを参照することが可能となり、文
字補完処理の精度が向上する。
For example, even if the squares for one character are arranged side by side in one row like the amount column of a form,
The generating unit 4-7 regards them as one character area, and collectively generates information that is a processing target of the character complement processing. As a result, in the character complementing process, it is possible to refer to the size of the character in another square, and the accuracy of the character complementing process is improved.

【0057】第14の原理において、パターン抽出手段
1は、入力画像から画素の連結情報に基づいて部分パタ
ーンを抽出し、表抽出手段5は、表の候補となる部分パ
ターンを表パターンとして抽出し、枠線抽出手段6は、
その表パターンから枠線パターンを抽出する。入力手段
8は、上記表パターンの外接矩形の内側に位置する一定
以上の大きさの部分パターンのうち、枠線パターンの一
部とみなされなかった部分パターンを、新たな表パター
ンとして枠線抽出手段6に入力する。
In the fourteenth principle, the pattern extraction means 1 extracts a partial pattern from the input image based on the pixel connection information, and the table extraction means 5 extracts a partial pattern which is a candidate for a table as a table pattern. The frame line extraction means 6
A frame line pattern is extracted from the table pattern. The input unit 8 extracts a frame pattern of a partial pattern, which is located inside the circumscribing rectangle of the table pattern and has a certain size or more, and which is not regarded as a part of the frame line pattern, as a new table pattern. Input to the means 6.

【0058】表抽出手段5は、例えば、一定以上の大き
さの部分パターンを表パターンとして抽出し、枠線抽出
手段6は、例えば、その表パターンの外接矩形の内側に
位置する1つ以上の部分パターンから枠線パターンを抽
出する。入力手段8は、枠線パターンとして抽出されな
かった残りの部分パターンであって、一定以上の大きさ
を持つものを、もう1つの表の候補とみなす。そして、
枠線抽出手段6は、これを新たな表パターンとして再帰
的に処理する。
The table extracting means 5 extracts, for example, a partial pattern having a certain size or more as a table pattern, and the frame line extracting means 6 has, for example, one or more parts located inside the circumscribed rectangle of the table pattern. A frame line pattern is extracted from the partial pattern. The input unit 8 regards the remaining partial patterns that are not extracted as the frame line pattern and have a certain size or more, as candidates for another table. And
The frame extraction unit 6 recursively processes this as a new table pattern.

【0059】これにより、表の内部に独立した小さな表
が含まれている場合であっても、その表の罫線を抽出す
ることが可能となり、小さな表が誤って文字として処理
されることがなくなる。
As a result, even if an independent small table is included in the table, the ruled lines of the table can be extracted, and the small table is not erroneously processed as a character. .

【0060】第15の原理において、表抽出手段5は、
入力画像から画素の連結情報に基づいて表の候補となる
表パターンを抽出し、枠線抽出手段6は、その表パター
ンから枠線パターンを抽出し、領域抽出手段7は、縦横
の枠線パターンで囲まれた矩形領域を抽出する。入力手
段8は、入れ子状態になっている矩形領域を、新たな表
パターンとして枠線抽出手段6に入力し、変更手段9
は、枠線抽出手段6および入力手段8による再帰処理の
繰り返し回数を、外部から与えられた情報または内部で
作成された情報に基づいて変更する。
In the fifteenth principle, the table extracting means 5 is
A table pattern, which is a table candidate, is extracted from the input image based on the pixel connection information, the frame line extracting unit 6 extracts a frame line pattern from the table pattern, and the region extracting unit 7 extracts vertical and horizontal frame line patterns. Extract the rectangular area surrounded by. The input means 8 inputs the rectangular area in the nested state into the frame line extraction means 6 as a new table pattern, and the change means 9
Changes the number of times the recursive process is repeated by the frame line extraction means 6 and the input means 8 based on information provided from the outside or information created inside.

【0061】領域抽出手段7により抽出された矩形領域
をもう1つの表の候補とみなして、入力手段8が再び枠
線抽出手段6に入力し、枠線抽出手段6が再帰的に処理
することで、入れ子構造の罫線が抽出される。変更手段
9は、この入れ子処理の繰り返し回数の設定を、ユーザ
の指示や内部で自動的に生成される情報に基づいて変更
する。
The rectangular area extracted by the area extracting means 7 is regarded as another table candidate, the input means 8 inputs it again to the frame line extracting means 6, and the frame line extracting means 6 recursively processes. Then, the ruled line of the nested structure is extracted. The changing unit 9 changes the setting of the number of repetitions of this nesting process based on a user's instruction or information automatically generated internally.

【0062】ユーザの指示に基づいて繰り返し回数を設
定することで、処理対象の表の入れ子構造の深さをあら
かじめ特定した処理が可能となり、それを内部で生成さ
れる情報に基づいて設定することで、その深さを特定し
ない処理が可能となる。
By setting the number of repetitions based on the user's instruction, it is possible to perform a process in which the depth of the nested structure of the table to be processed is specified in advance, and to set it based on the information generated internally. Thus, it is possible to perform processing without specifying the depth.

【0063】第16の原理において、パターン抽出手段
1は、入力画像から画素の連結情報に基づいて部分パタ
ーンを抽出し、線抽出手段3−3は、その部分パターン
から実線または点線の線パターンを抽出する。判定手段
2−5は、上記線パターンが枠を構成するかどうかを判
定し、付加手段4−6は、枠を構成すると判定された線
パターンの情報に、その線パターンの状態を表す情報を
付加する。領域抽出手段7は、上記線パターンに基づい
て文字領域を抽出し、生成手段4−7は、文字補完のた
めの情報を生成する。
In the 16th principle, the pattern extracting means 1 extracts a partial pattern from the input image based on the connection information of the pixels, and the line extracting means 3-3 extracts a solid line or a dotted line pattern from the partial pattern. Extract. The determining means 2-5 determines whether or not the line pattern constitutes a frame, and the adding means 4-6 adds information indicating the state of the line pattern to the information of the line pattern determined to constitute the frame. Add. The area extracting means 7 extracts a character area based on the line pattern, and the generating means 4-7 generates information for character complement.

【0064】線パターンは、直線パターンおよび点線パ
ターンを含み、判定手段2−5は、縦横の線パターンが
矩形領域を形成している場合に、枠を構成すると判定す
る。ここで、線パターンの状態を表す情報には、その線
パターンを構成する線分パターンまたは部分パターンの
識別情報と、その線パターンに施された処理を表す情報
のうち、両方または片方が含まれる。付加手段4−6が
このような情報を線パターンの情報に付加することで、
領域抽出手段7の処理やレイアウト認識処理等の精度が
向上する。
The line pattern includes a straight line pattern and a dotted line pattern, and the determining means 2-5 determines that a frame is formed when the vertical and horizontal line patterns form a rectangular area. Here, the information indicating the state of the line pattern includes both or one of the identification information of the line segment pattern or the partial pattern forming the line pattern and the information indicating the processing performed on the line pattern. . By the addition means 4-6 adding such information to the information of the line pattern,
The accuracy of the processing of the area extracting means 7 and the layout recognition processing is improved.

【0065】また、生成手段4−7は、文字補完のため
の情報として、R付き罫線の可能性を表す情報、二重線
の可能性を考慮した文字領域情報、一列にならんでいる
小さな文字領域を1つにまとめた文字領域情報等を生成
する。これらの情報を文字補完処理に渡すことで、上述
のように処理精度が向上する。
Further, the generation means 4-7 uses, as information for character complement, information indicating the possibility of R ruled lines, character area information considering the possibility of double lines, and small characters arranged in a line. Character area information or the like in which areas are combined is generated. By passing these pieces of information to the character completion processing, the processing accuracy is improved as described above.

【0066】以上のように、本発明によれば、かすれや
潰れのある画質の良くない画像から、罫線(枠線)、文
字領域等を高精度に抽出することが可能になる。例え
ば、図1の各手段1、2−1、2−2、2−3、2−
4、2−5、3−1、3−2、3−3、4−1、4−
2、4−3、4−4、4−5、4−6、4−7、5、
6、7、8、9は、後述する図3におけるCPU(中央
処理装置)31およびメモリ32に対応する。
As described above, according to the present invention, it is possible to extract ruled lines (frame lines), character regions, etc. with high accuracy from an image with poor image quality that is blurred or crushed. For example, each means 1, 2-1, 2-2, 2-3, 2- of FIG.
4, 2-5, 3-1, 3-2, 3-3, 4-1, 4
2, 4-3, 4-4, 4-5, 4-6, 4-7, 5,
Reference numerals 6, 7, 8, and 9 correspond to a CPU (central processing unit) 31 and a memory 32 in FIG. 3, which will be described later.

【0067】[0067]

【発明の実施の形態】以下、図面を参照しながら、本発
明の実施の形態を詳細に説明する。本発明によれば、画
像のかすれの有無にかかわらず、また実線と点線の混在
する表であっても、文字領域が矩形範囲で構成されてい
れば、その枠を抽出することが可能である。以下の実施
形態においては、サイズや位置や傾きが分からない枠が
単数または複数個あり、それらの枠に対して、枠に接触
した文字、枠からはみ出した文字を含む多様な文字が書
かれているような文書を対象とする。そして、そのよう
な文書の画像から枠を抽出する場合を考える。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described in detail below with reference to the drawings. According to the present invention, it is possible to extract a frame regardless of whether or not there is a blur in an image, and even in a table in which a solid line and a dotted line are mixed, as long as the character area is formed of a rectangular range. . In the following embodiments, there are one or more frames whose size, position, and inclination are unknown, and various characters including characters touching the frame and characters protruding from the frame are written on these frames. For documents that have Then, consider the case where a frame is extracted from the image of such a document.

【0068】図2は、実施形態の罫線抽出装置を適用し
た文字認識装置の機能ブロック図である。図2におい
て、罫線抽出装置は、縮小処理部12、連結パターン抽
出部13、マスク処理部14、横直線抽出部15、縦直
線抽出部16、および入れ子構造処理部17を含む。ま
た、網掛けされた処理ブロックが、主として、「パター
ン抽出装置及びパターン領域の切り出し方法」(特願平
8−107568)等の先願とは異なる処理(変更部
分)を表す。
FIG. 2 is a functional block diagram of a character recognition device to which the ruled line extraction device of the embodiment is applied. In FIG. 2, the ruled line extraction device includes a reduction processing unit 12, a connection pattern extraction unit 13, a mask processing unit 14, a horizontal straight line extraction unit 15, a vertical straight line extraction unit 16, and a nested structure processing unit 17. Further, the shaded processing blocks mainly represent different processing (changed portion) from the prior application such as “Pattern extracting device and pattern region cutting method” (Japanese Patent Application No. 8-107568).

【0069】まず、縮小処理部12は、入力パターン1
1を縮小する。入力パターン11は、極端な傾きや回転
を補正した後の2値画像である。連結パターン抽出部1
3は、縮小された画像から画素の連結パターンを抽出
し、マスク処理部14は、それを細線化する。
First, the reduction processing section 12 uses the input pattern 1
Reduce 1 The input pattern 11 is a binary image after correction of extreme inclination and rotation. Connection pattern extraction unit 1
3 extracts a pixel connection pattern from the reduced image, and the mask processing unit 14 thins it.

【0070】このとき、連結パターン抽出部13は、画
像パターンの大きさがある一定の大きさに達しない小さ
いパターンである場合に、縦横どちらかの幅が小さく細
長い形であることを条件に処理対象として抽出する。こ
のような条件を課すのは、文字パターンを罫線抽出の処
理対象としてしまう可能性を少なくするためである。小
さいパターンを抽出する際、種々のしきい値等の調整を
行う。
At this time, when the size of the image pattern is a small pattern that does not reach a certain size, the connected pattern extraction unit 13 processes on condition that the width of either the vertical or horizontal is small and elongated. Extract as a target. The reason for imposing such a condition is to reduce the possibility that the character pattern will be the target of ruled line extraction processing. When extracting a small pattern, various threshold values are adjusted.

【0071】また、マスク処理部14は、この条件に合
った小さいパターンの処理を行う場合、その大きさに合
わせてマスクの大きさを調整し、いくつかのマスクのう
ちの適当なものを用いる。これにより、かすれによって
途切れて短くなった罫線等を抽出することが可能にな
る。
When processing a small pattern that meets this condition, the mask processing section 14 adjusts the size of the mask according to the size and uses an appropriate one of several masks. . This makes it possible to extract a ruled line or the like that is interrupted and shortened due to blurring.

【0072】次に、横直線抽出部15が、横隣接投影
(処理P1)、横線分検出(処理P2)、横線分統合
(処理P3)、横直線検出(処理P4)、および横直線
探索(処理P5)を行った後、罫線抽出装置は、横点線
検出(処理P6)および横直線統合(処理P7)を行
う。
Next, the horizontal straight line extraction unit 15 performs horizontal adjacent projection (process P1), horizontal line segment detection (process P2), horizontal line segment integration (process P3), horizontal straight line detection (process P4), and horizontal straight line search ( After performing the process P5), the ruled line extraction device performs horizontal dotted line detection (process P6) and horizontal straight line integration (process P7).

【0073】次に、縦直線抽出部16が、縦隣接投影
(処理P8)、縦線分検出(処理P9)、縦線分統合
(処理P10)、縦直線検出(処理P11)、および縦
直線探索(処理P12)を行った後、罫線抽出装置は、
縦点線検出(処理P13)および縦直線統合(処理P1
4)を行う。
Next, the vertical line extraction unit 16 causes vertical adjacent projection (process P8), vertical line segment detection (process P9), vertical line segment integration (process P10), vertical line detection (process P11), and vertical line. After performing the search (process P12), the ruled line extraction device
Vertical dotted line detection (process P13) and vertical straight line integration (process P1)
4) is performed.

【0074】点線検出処理P6、P13においては、罫
線抽出装置は、一定の大きさより小さいパターンに対し
て、パターン同士の距離を算出する。その際に、2つの
パターンの中点間の距離ではなく、それらの外接矩形間
の間隔を、2つのパターンの距離として用いる。
In the dotted line detection processes P6 and P13, the ruled line extraction device calculates the distance between patterns for patterns smaller than a certain size. At that time, the distance between the circumscribed rectangles of the two patterns is used as the distance between the two patterns, instead of the distance between the midpoints of the two patterns.

【0075】この結果、潰れによりパターンの大きさが
多少異なっている場合であっても、間隔が一定であれ
ば、点線として抽出することが可能となる。また、一度
点線抽出に使用したパターンは再度使用しないようにす
ることで、本来存在しない点線を抽出してしまうのを避
けることが可能となる。
As a result, even if the size of the pattern is slightly different due to the crushing, if the interval is constant, it can be extracted as a dotted line. Further, by not using the pattern once used for the dotted line extraction again, it is possible to avoid extracting a dotted line that does not originally exist.

【0076】また、点線が部分的に潰れている場合、潰
れた部分の大きさによっては、その部分が実線としても
点線としても抽出されない場合がある。そこで、罫線抽
出装置は、点線の抽出後に、抽出された点線の両端から
一定長さの範囲で画素探索を行う。そして、点線がどこ
まで存在しているのかを判断し、点線として抽出できな
かった部分を補う。
When the dotted line is partially crushed, it may not be extracted as a solid line or a dotted line depending on the size of the crushed part. Therefore, the ruled line extraction device performs a pixel search within a fixed length range from both ends of the extracted dotted line after extracting the dotted line. Then, it is judged to what extent the dotted line exists, and the part which could not be extracted as the dotted line is supplemented.

【0077】直線統合処理P7、P14においては、罫
線抽出装置は、直線とみなされた範囲内の領域であっ
て、短冊状の線分矩形の存在しない部分には、仮想的に
線分矩形を作成する。その作成位置や太さ等は、周囲の
線分の位置や太さ等を基準にして算出される。これによ
り、後の処理において、仮想的に作成された線分矩形を
用いることができ、直線の位置を正確に評価することが
可能となる。
In the straight line integration processing P7 and P14, the ruled line extraction device virtually creates a line segment rectangle in a region within the range regarded as a straight line and where the strip-shaped line segment rectangle does not exist. create. The created position, thickness, etc. are calculated based on the position, thickness, etc. of surrounding line segments. Thereby, in the subsequent processing, a virtually created line segment rectangle can be used, and the position of the straight line can be accurately evaluated.

【0078】次に、罫線抽出装置は、表のルール処理を
行い(処理P15)、横枠線を決定し(処理P16)、
縦横枠線を決定して(処理P17)、縦横枠線を抽出す
る。そして、入れ子構造処理部17は、それらの枠線に
囲まれた矩形領域内の横枠線を決定し(処理P18)、
縦横枠線を決定する(処理P19)。
Next, the ruled line extraction device performs rule processing on the table (process P15), determines a horizontal frame line (process P16),
Vertical and horizontal frame lines are determined (process P17), and vertical and horizontal frame lines are extracted. Then, the nested structure processing unit 17 determines a horizontal frame line within the rectangular area surrounded by these frame lines (process P18),
Vertical and horizontal frame lines are determined (process P19).

【0079】ここで、表のルール処理P15は、あらか
じめ処理対象は規則的な構造を持つ表であると分かって
いる場合に限り行われる。罫線抽出装置は、この処理P
15において、直線を伸張する処理や新たに直線を作成
する処理を行う。
Here, the table rule processing P15 is performed only when it is known in advance that the processing target is a table having a regular structure. The ruled line extraction device performs this process P
At 15, the process of extending the straight line and the process of creating a new straight line are performed.

【0080】このとき、どのような処理を行った結果直
線が抽出されたのかを示すフラグ情報、および、直線矩
形内での実際の画素密度はどのくらいかという情報を、
直線の情報に付け加えておく。これらの情報により、後
のレイアウト認識処理P23等において、文字認識装置
が直線毎に処理の上での重み付けをすることが可能とな
る。
At this time, flag information indicating what kind of processing has been performed to extract a straight line, and information about the actual pixel density in the straight line rectangle,
I will add it to the straight line information. These pieces of information enable the character recognition device to perform weighting on each line in the subsequent layout recognition process P23 and the like.

【0081】次に、罫線抽出装置は、抽出された縦横枠
線を用いて矩形表現を行い(処理P20)、文字領域を
算出する(処理P21)。そして、罫線抽出結果に関す
るデータを作成し、それを後続する処理P22、P23
に渡す。
Next, the ruled line extracting device performs a rectangular expression using the extracted vertical and horizontal frame lines (process P20) and calculates a character area (process P21). Then, data relating to the ruled line extraction result is created and the subsequent processes P22 and P23 are performed.
Pass to.

【0082】このとき、罫線の形状に関しては、従来想
定していたものとは異なる形状のうち出現頻度の高いも
のについて、新たな情報を付加する。出現頻度の高い形
状には、角が丸く湾曲したR付き罫線と、2本の直線が
一組になっている二重線が含まれる。
At this time, regarding the shape of the ruled line, new information is added to the shape having a high appearance frequency out of the shapes different from those conventionally assumed. Frequently appearing shapes include R-shaped ruled lines with rounded corners and double lines in which two straight lines form one set.

【0083】このうち、R付き罫線に関しては、罫線で
囲まれた文字領域の角部に注目し、ある一定範囲内にパ
ターンが存在する場合には、R付き罫線である可能性が
高いとして、その情報を文字補完処理P22に渡す。ま
た、二重線に関しては、その存在を考慮した文字領域を
算出し、算出した情報を文字補完処理P22に渡す。
Regarding the R ruled line, pay attention to the corners of the character area surrounded by the ruled line, and if the pattern exists within a certain fixed range, it is highly likely that the R ruled line is a ruled line. The information is passed to the character complementing process P22. In addition, regarding the double line, a character area in consideration of its existence is calculated, and the calculated information is passed to the character complementing process P22.

【0084】文字補完処理P22に渡す情報の作成時に
は、それまでの処理で用いていた縮小された画像ではな
く、入力された原画像を用いて処理を行う。これによ
り、枠の形状をより詳細に判断することが可能となる。
When the information to be passed to the character complementing process P22 is created, the input original image is used instead of the reduced image used in the previous processes. This makes it possible to determine the shape of the frame in more detail.

【0085】また、文字領域がある一定以下の大きさで
あり、その周囲にある一定数以上の文字領域が同様に同
じ程度の大きさを持つ場合には、それらの文字領域を1
つにまとめて、文字補完処理P22に渡すデータを作成
する。これにより、文字数の少ない文字領域であって
も、関連する他の文字領域に含まれる文字の大きさを参
照することが可能となる。
If the character areas have a certain size or less and a certain number or more of character areas around the character areas have the same size, the character areas are set to 1
The data to be passed to the character complementing process P22 is created collectively. This makes it possible to refer to the size of a character included in another related character area even if the character area has a small number of characters.

【0086】そして、文字認識装置は、罫線抽出装置か
ら渡されたデータを用いて、文字補完(処理P22)、
レイアウト認識(処理P23)、文字認識(処理P2
4)、および表認識(処理P25)を行う。
Then, the character recognition device uses the data passed from the ruled line extraction device to perform character complement (process P22),
Layout recognition (process P23), character recognition (process P2)
4) and table recognition (process P25) are performed.

【0087】文字補完処理P22において、文字認識装
置は、渡された情報に基づき、文字領域の角部のパター
ンが文字に対応するかR付き罫線に対応するかの判断等
を行う。本実施形態では、罫線の位置と形状に関するよ
り正確な情報が渡されるので、文字補完処理P22の精
度が向上する。
In the character complementing process P22, the character recognition device determines, based on the passed information, whether the pattern of the corner portion of the character area corresponds to a character or a ruled line with R. In the present embodiment, more accurate information about the position and shape of the ruled line is passed, so the accuracy of the character complementing process P22 is improved.

【0088】また、上述したように、罫線抽出処理にお
いては、例えば各罫線に対して伸張処理を行ったかどう
かというような罫線の状態を示すフラグが、その罫線の
信頼度を表す情報として生成され、レイアウト認識処理
P23に渡される。ここで、罫線の信頼度とは、抽出さ
れた罫線が、実際にその位置に存在する可能性を示す情
報を意味する。
Further, as described above, in the ruled line extracting process, a flag indicating the state of the ruled line, such as whether or not each ruled line is expanded, is generated as information indicating the reliability of the ruled line. , And is passed to the layout recognition process P23. Here, the reliability of the ruled line means information indicating that the extracted ruled line may actually exist at that position.

【0089】文字認識装置は、レイアウト認識処理P2
3において罫線構造のマッチング処理を行う際、各罫線
の信頼度に基づいて、その罫線の処理の上での影響力を
変更する。このようにして、信頼度の高い罫線を主とし
て使用することで、高精度なマッチング処理が行われ
る。
The character recognition device performs layout recognition processing P2.
When matching processing of the ruled line structure is performed in 3, the influence on the processing of the ruled line is changed based on the reliability of each ruled line. In this way, highly accurate matching processing is performed by mainly using highly reliable ruled lines.

【0090】図2に示した各処理を行うことにより、位
置、形式ともに未知の帳票の画像や、かすれのある画質
の悪い画像であっても、表形式枠中の枠を正確に抽出す
ることができる。また、文字と枠が接触したり、文字が
枠からはみ出したりしている場合でも、文字領域を正確
に抽出することができる。
By performing the respective processes shown in FIG. 2, even if the image of a form whose position and format are unknown or the image with blur and poor image quality, the frame in the table format frame is accurately extracted. You can Further, even when the character and the frame are in contact with each other or the character is outside the frame, the character region can be accurately extracted.

【0091】本実施形態の罫線抽出装置は、例えば図3
に示すような情報処理装置(コンピュータ)により実現
される。図3の情報処理装置は、CPU31、メモリ3
2、入力装置33、出力装置34、外部記憶装置35、
媒体駆動装置36、ネットワーク接続装置37、光電変
換装置38を備え、それらの各装置はバス39により互
いに結合されている。
The ruled line extracting apparatus of this embodiment is, for example, as shown in FIG.
It is realized by an information processing device (computer) as shown in. The information processing apparatus of FIG. 3 includes a CPU 31 and a memory 3.
2, input device 33, output device 34, external storage device 35,
A medium driving device 36, a network connection device 37, and a photoelectric conversion device 38 are provided, and these devices are connected to each other by a bus 39.

【0092】CPU31は、メモリ32に格納されたプ
ログラムを実行して、図2に示した各処理を行う。メモ
リ32としては、例えばROM(read only memory)、
RAM(random access memory)等が用いられる。メモ
リ32には、上述のプログラムと処理に必要なデータが
格納される。
The CPU 31 executes the program stored in the memory 32 to perform each processing shown in FIG. As the memory 32, for example, ROM (read only memory),
RAM (random access memory) or the like is used. The memory 32 stores the above-mentioned programs and data necessary for processing.

【0093】入力装置32は、例えばキーボード、ポイ
ンティングデバイス等に相当し、ユーザからの要求や指
示の入力に用いられる。また、出力装置34は、表示装
置やプリンタ等に相当し、処理結果等の出力に用いられ
る。
The input device 32 corresponds to, for example, a keyboard, a pointing device, etc., and is used for inputting a request or an instruction from the user. The output device 34 corresponds to a display device, a printer, etc., and is used to output processing results and the like.

【0094】外部記憶装置35は、例えば、磁気ディス
ク装置、光ディスク装置、光磁気ディスク装置等であ
る。この外部記憶装置35に、上述のプログラムとデー
タを保存しておき、必要に応じて、それらをメモリ32
にロードして使用することができる。また、外部記憶装
置35は、入力画像等を保存するデータベースとしても
使用される。
The external storage device 35 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, or the like. The above-mentioned program and data are stored in the external storage device 35, and if necessary, they are stored in the memory 32.
It can be loaded and used. The external storage device 35 is also used as a database for storing input images and the like.

【0095】媒体駆動装置36は、可搬記録媒体40を
駆動し、その記憶内容にアクセスすることができる。可
搬記録媒体40としては、メモリカード、フロッピーデ
ィスク、CD−ROM(compact disk read only memor
y )、光ディスク、光磁気ディスク等、任意のコンピュ
ータ読み取り可能な記録媒体を使用することができる。
この可搬記録媒体40に、上述のプログラムとデータを
格納しておき、必要に応じて、それらをメモリ32にロ
ードして使用することができる。
The medium driving device 36 can drive the portable recording medium 40 and access the stored contents. As the portable recording medium 40, a memory card, a floppy disk, a CD-ROM (compact disk read only memor)
y), an optical disk, a magneto-optical disk, or any other computer-readable recording medium can be used.
The above-described program and data can be stored in the portable recording medium 40, and can be loaded into the memory 32 and used as necessary.

【0096】ネットワーク接続装置37は、LAN(lo
cal area network)等の任意の通信ネットワークに接続
され、通信に伴うデータ変換等を行を行って、外部の情
報提供者のデータベース40′等と通信する。これによ
り、罫線抽出装置は、必要に応じて、上述のプログラム
とデータをデータベース40′からネットワークを介し
て受け取り、それらをメモリ32にロードして使用する
ことができる。
The network connection device 37 is a LAN (lo
It is connected to an arbitrary communication network such as a cal area network), performs data conversion accompanying communication, and communicates with a database 40 'or the like of an external information provider. As a result, the ruled line extraction device can receive the above-mentioned program and data from the database 40 'via the network and load them into the memory 32 for use as needed.

【0097】また、光電変換装置38は、例えばイメー
ジスキャナであり、処理対象となる帳票等の画像を入力
する。次に、図4から図38までを参照しながら、図2
の各処理を順に説明する。
The photoelectric conversion device 38 is, for example, an image scanner and inputs an image such as a form to be processed. Next, referring to FIG. 4 to FIG.
Each processing of will be described in order.

【0098】縮小処理部12は、入力パターン11の画
像がある一定以上の解像度を持ち、その画像の大きさが
比較的大きい場合に、処理の効率化のため、画像の縮小
処理を行う。入力された原画像はそのまま記憶してお
く。
When the image of the input pattern 11 has a certain resolution or higher and the size of the image is relatively large, the reduction processing unit 12 performs the image reduction process for the efficiency of the process. The input original image is stored as it is.

【0099】連結パターン抽出部13は、「パターン領
域切り出し方式及びパターン抽出装置」(特願平7−2
82171)に示された方法により、ラベリング処理を
行う。この処理では、複数の表が配置される位置の相対
的な関係に依存することなく、各パターンを安定にピッ
クアップするために、上下左右8連結で繋がっている黒
画素連結領域を部分パターンとして抽出し、それにラベ
ルを付与する。
The concatenated pattern extraction unit 13 uses the "pattern area cutting method and pattern extraction device" (Japanese Patent Application No. 7-2).
Labeling processing is performed by the method shown in 82171). In this process, the black pixel connection area connected by 8 connections in the upper, lower, left, and right directions is extracted as a partial pattern in order to stably pick up each pattern without depending on the relative relationship of the positions where a plurality of tables are arranged. And give it a label.

【0100】そして、これらの部分パターンを判別し
て、画像に含まれる表のパターンを抽出する。また、ラ
ベリングで得られた部分パターンのサイズが後に必要に
なるので、連結パターン抽出部13は、部分パターンを
近似する外接矩形の角の座標をラベリングの処理中に算
出しておく。
Then, these partial patterns are discriminated and the patterns of the table included in the image are extracted. Further, since the size of the partial pattern obtained by labeling is necessary later, the connected pattern extraction unit 13 calculates the coordinates of the corners of the circumscribed rectangle that approximates the partial pattern during the labeling process.

【0101】次に、抽出された部分パターンの中で、一
定以上の大きさのあるパターンを表の候補であるとして
抽出する。大きな連結パターンを抽出する際、大きな連
結パターンの内側にあり、かつ一定以上の大きさのある
パターンも同時に抽出し、それらの大小のパターンを同
じラベルを持つパターンとして扱う。
Next, among the extracted partial patterns, a pattern having a certain size or more is extracted as a table candidate. When extracting a large connected pattern, patterns that are inside the large connected pattern and have a certain size or more are also extracted at the same time, and those large and small patterns are treated as patterns having the same label.

【0102】また、一定の大きさに達していない小さな
パターンに関しては、縦横どちらかの幅が一定の値より
小さく、細長い形をしている場合にのみ、表の候補であ
るとして抽出し、上記大きな連結パターンと同じラベル
を付与する。これらの小さいパターンを処理する場合に
は、その大きさに比例して、しきい値等を自動的に変更
する。
As for small patterns that have not reached a certain size, they are extracted as table candidates only when either the vertical or horizontal width is smaller than a certain value and have an elongated shape. Give the same label as the large connection pattern. When processing these small patterns, the threshold value and the like are automatically changed in proportion to the size thereof.

【0103】このように、画素の連結情報に基づいて処
理対象となる部分パターンを抽出する際に、注目パター
ンの外接矩形の内側に位置するパターンのうち、処理対
象となる大きさに達していないものでも、縦横どちらか
の幅が極端に小さく、細長い形をしたパターンは処理対
象とみなす。これにより、かすれにより小さいパターン
に分離してしまった状態や、点線の一部が潰れてしまっ
た状態の画像に対しても、正確に抽出処理を行うことが
可能となる。
As described above, when the partial pattern to be processed is extracted based on the pixel connection information, the size of the pattern to be processed does not reach the size of the pattern located inside the circumscribed rectangle of the pattern of interest. Even in the case of a pattern, a pattern having an elongated shape with an extremely small vertical or horizontal width is regarded as a processing target. As a result, it is possible to accurately perform the extraction process even on an image in which the pattern is faintly separated into smaller patterns or in which a part of the dotted line is crushed.

【0104】図4は、上述のラベリング処理後の画像の
例を示している。図4においては、パターン41、4
2、43、44、45、46、47、48、49の9つ
の連結パターンが抽出されている。連結パターン抽出部
13は、始めに一番大きな外接矩形を持つパターン41
を抽出し、それにラベルを付加する。次に、パターン4
2とパターン48の間にある横線パターン46は一定以
上の横幅があるため、これを大きいパターン41の一部
であるとみなす。
FIG. 4 shows an example of an image after the above-mentioned labeling processing. In FIG. 4, patterns 41, 4
Nine connection patterns of 2, 43, 44, 45, 46, 47, 48, 49 are extracted. The connected pattern extraction unit 13 firstly selects the pattern 41 having the largest circumscribed rectangle.
Is extracted and a label is added to it. Next, pattern 4
Since the horizontal line pattern 46 between the pattern 2 and the pattern 48 has a certain width or more, it is considered to be a part of the large pattern 41.

【0105】また、パターン43とパターン49の間に
ある横線パターン47は、大きさは一定値に満たない
が、線幅が小さく横長になっているので、これを大きい
パターン41の一部であるとみなす。こうして、図5に
示すように、パターン41、46、47はすべて、同じ
ラベルに属するパターンとして扱われる。
The horizontal line pattern 47 between the pattern 43 and the pattern 49 has a size smaller than a certain value, but has a small line width and a long horizontal line. Therefore, the horizontal line pattern 47 is a part of the large pattern 41. To consider. Thus, as shown in FIG. 5, all the patterns 41, 46 and 47 are treated as patterns belonging to the same label.

【0106】図6は、連結パターン抽出部13の処理の
フローチャートである。処理が開始されると、連結パタ
ーン抽出部13は、まず、入力画像に対してラベリング
処理を行い(ステップS1)、あるラベルを持つ部分パ
ターンの外接矩形の縦または横の長さがしきい値TH1
以上かどうかを判定する(ステップS2)。
FIG. 6 is a flowchart of the processing of the connection pattern extraction unit 13. When the process is started, the connection pattern extraction unit 13 first performs a labeling process on the input image (step S1), and the vertical or horizontal length of the circumscribed rectangle of the partial pattern having a certain label is the threshold TH1.
It is determined whether or not the above (step S2).

【0107】それがTH1以上であればそのラベルの番
号を記憶し(ステップS3)、すべてのラベルについて
処理が終了したかどうかを判定する(ステップS4)。
そして、未処理のラベルが残っていればステップS2以
降の処理を繰り返す。
If it is greater than or equal to TH1, the label number is stored (step S3), and it is determined whether the processing has been completed for all labels (step S4).
Then, if any unprocessed label remains, the processing from step S2 is repeated.

【0108】ステップS2において、外接矩形の縦およ
び横の長さがともにTH1に達しない場合は、次に、縦
または横の長さがしきい値TH2で、かつ、その外接矩
形が縦長または横長のような細長い形状を持つかどうか
を調べる(ステップS5)。この条件が満たされれば、
ステップS3以降の処理を行ってその部分パターンを処
理対象に残し、それが満たされなければ、ステップS4
以降の処理を行う。そして、すべてのラベルを処理し終
えると、処理を終了する。
If both the vertical and horizontal lengths of the circumscribing rectangle do not reach TH1 in step S2, then it is determined that the vertical or horizontal length is the threshold value TH2 and the circumscribing rectangle is vertical or horizontal. It is checked whether or not it has an elongated shape (step S5). If this condition is met,
If the partial pattern is left to be processed by performing the processing of step S3 and subsequent steps and if it is not satisfied, step S4
Perform the following processing. When all the labels have been processed, the process ends.

【0109】このように、2つのしきい値を用いてパタ
ーンの大きさを判定することで、罫線である可能性の高
い小さな部分パターンを、処理対象として残すことが可
能となる。なお、ステップS3において残された部分パ
ターンのうち、表の候補とみなされたパターンの内側に
あるものについては、そのパターンと同じラベルに書き
換えられる。
By thus determining the size of the pattern using the two threshold values, it becomes possible to leave a small partial pattern that is highly likely to be a ruled line as a processing target. Note that, of the partial patterns left in step S3, those that are inside the patterns considered as table candidates are rewritten to the same label as that pattern.

【0110】次に、マスク処理部14は、連結パターン
抽出部13により抽出された、ある一定以上の大きさを
持つ連結パターンと、その内部に存在する連結パターン
(前者と同じラベルを持つパターン)とを表の候補とす
る。そして、先願の「枠抽出装置及び矩形抽出装置」
(特願平7−203259)の方法に準じて、マスク処
理を行う。
Next, the mask processing unit 14 extracts the connection pattern extracted by the connection pattern extraction unit 13 and has a certain size or more, and the connection pattern existing therein (the pattern having the same label as the former). And are candidates for the table. Then, the “frame extraction device and rectangle extraction device” of the prior application
Masking is performed according to the method of (Japanese Patent Application No. 7-203259).

【0111】このマスク処理は、画像から極端な斜め成
分を省き、表だけに存在する長い直線を抽出しやすくす
るために行われる。具体的には、マスク処理部14は、
画像全体に対して、横長および縦長のマスク矩形による
走査を行う。マスク内での黒画素のパターンの占める割
合を算出し、それがある一定値以上であれば、そのマス
ク内の領域全体を黒画素で埋めてパターンとして残し、
また一定値以下であれば、マスク内のパターンを削除す
る。こうして、縦横成分の抽出を行う。
This mask processing is carried out in order to facilitate extraction of long straight lines existing only in the table by eliminating the extreme oblique component from the image. Specifically, the mask processing unit 14
The entire image is scanned using horizontally and vertically long mask rectangles. Calculate the ratio of the black pixel pattern in the mask, and if it is more than a certain value, fill the entire area in the mask with black pixels and leave it as a pattern.
If it is less than a certain value, the pattern in the mask is deleted. In this way, the vertical and horizontal components are extracted.

【0112】ここで、複数の行または列が続いて、上記
割合が所定のしきい値以上に達した場合、それらの連続
するパターンをまとめて大きな矩形範囲をつくり、その
中心線を処理結果とする。これにより、太いパターンが
細線化される。また、処理結果の線分パターン同士の隙
間が開かないようにするため、マスクの適用範囲を、お
互いに重なりを持つように設定する。マスク処理前の原
画像は、マスク処理後の画像とは別に記憶しておく。
Here, when a plurality of rows or columns continue and the above ratio reaches a predetermined threshold value or more, a large rectangular range is formed by combining those continuous patterns, and the center line thereof is set as the processing result. To do. As a result, the thick pattern is thinned. Further, in order to prevent the gap between the line segment patterns of the processing result from being opened, the mask application ranges are set so as to overlap each other. The original image before the mask processing is stored separately from the image after the mask processing.

【0113】マスク処理部14は、抽出された連結パタ
ーン毎にマスク処理を行い、パターンの大きさが一定の
大きさより大きい場合には、先願と同様に同じ大きさの
マスクを用いる。パターンの大きさが一定の大きさ以下
の場合には、その大きさに従って、マスクの長さを適当
に変更する。
The mask processing section 14 carries out mask processing for each of the extracted connected patterns, and when the size of the pattern is larger than a certain size, the mask of the same size is used as in the previous application. When the size of the pattern is less than a certain size, the length of the mask is changed appropriately according to the size.

【0114】図7は、図5に示した3つのパターン4
1、46、47を対象としてマスク処理を行った結果を
示している。図7においては、パターン41、46、4
7の縦横成分のみが抽出され、パターン全体が細線化さ
れている。この場合、パターン毎にマスクの長さが調整
されて、それぞれ異なる長さのマスクが使用されてい
る。
FIG. 7 shows the three patterns 4 shown in FIG.
The result of performing the mask processing on 1, 46, and 47 is shown. In FIG. 7, patterns 41, 46, 4
Only the vertical and horizontal components of 7 are extracted, and the entire pattern is thinned. In this case, the mask length is adjusted for each pattern, and masks having different lengths are used.

【0115】図8は、マスク処理部14の処理のフロー
チャートである。処理が開始されると、マスク処理部1
4は、まず、あるラベルの連結パターンが連結パターン
抽出部13により抽出されたパターンのラベルかどうか
を判定する(ステップS11)。
FIG. 8 is a flowchart of the processing of the mask processing section 14. When the processing is started, the mask processing unit 1
4 determines whether the connected pattern of a certain label is the label of the pattern extracted by the connected pattern extraction unit 13 (step S11).

【0116】それが連結パターン抽出部13により抽出
されたラベルに相当すれば、そのラベルの部分パターン
の外接矩形の大きさから、所定の算出方法に基づいてマ
スク処理のパラメータを算出する(ステップS12)。
このとき、例えば、外接矩形の縦または横の長さに基づ
いてマスクの長さが算定される。
If it corresponds to the label extracted by the concatenated pattern extraction unit 13, the mask processing parameter is calculated from the size of the circumscribed rectangle of the partial pattern of the label based on a predetermined calculation method (step S12). ).
At this time, for example, the length of the mask is calculated based on the vertical or horizontal length of the circumscribing rectangle.

【0117】次に、算出されたパラメータを用いてマス
クを生成し、注目しているラベルの部分パターン(ラベ
ル画像)のマスク処理を行う(ステップS13)。そし
て、すべてのラベルについて処理が終了したかどうかを
判定し(ステップS14)、未処理のラベルが残ってい
ればステップS11以降の処理を繰り返す。
Next, a mask is generated using the calculated parameters, and mask processing is performed on the partial pattern (label image) of the label of interest (step S13). Then, it is determined whether or not the processing has been completed for all the labels (step S14), and if any unprocessed label remains, the processing from step S11 is repeated.

【0118】また、ステップS11において、処理対象
が連結パターン抽出部13により抽出されたラベルに相
当しなければ、ステップS14以降の処理を行い、すべ
てのラベルを処理し終えると、処理を終了する。このよ
うに、処理対象の部分パターンの大きさに応じてマスク
の大きさを変えることで、小さなパターンからもマスク
画像を抽出することが可能になる。
In step S11, if the processing target does not correspond to the label extracted by the concatenation pattern extraction unit 13, the processing from step S14 onward is performed, and when all the labels have been processed, the processing ends. As described above, by changing the size of the mask according to the size of the partial pattern to be processed, it becomes possible to extract the mask image even from the small pattern.

【0119】次に、横直線抽出部15は、処理P1にお
いて、図7のような部分パターンのマスク処理画像に対
して、従来の隣接投影法を用いて投影値を算出する。そ
して、処理P2において、ある一定長さの横線分あるい
は横直線の一部を、図9に示すように矩形近似して検出
する。これらの処理ではマスク処理画像を使用している
が、以下の処理では原画像を使用する。
Next, in the process P1, the horizontal straight line extracting section 15 calculates a projection value for the mask processing image of the partial pattern as shown in FIG. 7 by using the conventional adjacent projection method. Then, in the process P2, a horizontal line segment or a part of a horizontal line having a certain length is approximated to a rectangle as shown in FIG. 9 and detected. Although the masked image is used in these processes, the original image is used in the following processes.

【0120】次に、横直線抽出部15は、処理P3、P
4において、先願の「枠抽出装置及び矩形抽出装置」
(特願平7−203259)の方法を用いて、線分同士
の接続状態を調査し、いくつかの線分が構成する横直線
を罫線候補として抽出する。これらの処理では、図10
に示すように、検出された線分矩形のうち近隣の線分矩
形同士を統合して長い直線を検出し、検出された横直線
をその外接矩形で近似する。
Next, the horizontal straight line extracting unit 15 performs the processes P3 and P3.
4, "frame extraction device and rectangle extraction device" of the prior application
Using the method of (Japanese Patent Application No. 7-203259), the connection state between line segments is investigated, and the horizontal straight lines formed by some line segments are extracted as ruled line candidates. In these processes, FIG.
As shown in, a long straight line is detected by integrating neighboring line segment rectangles among the detected line segment rectangles, and the detected horizontal line is approximated by the circumscribed rectangle.

【0121】処理P4においては、横直線の検出後、直
線とそれを構成する線分の関係を示す情報を記憶してお
く。この情報としては、ある直線を構成する1つ以上の
線分に関して、線分の並んでいる順番と、どの線分がど
の直線を構成しているかを示す情報が用いられる。縦直
線抽出部16の処理P8、P9、P10、P11につい
ても、横直線の場合と同様である。
In the process P4, after the detection of the horizontal straight line, information indicating the relationship between the straight line and the line segments constituting the straight line is stored. As this information, regarding one or more line segments forming a certain straight line, information indicating the order in which the line segments are arranged and which line segment forms which straight line is used. The processes P8, P9, P10, and P11 of the vertical straight line extraction unit 16 are the same as the case of the horizontal straight line.

【0122】処理P4、P11では、例えば、次のよう
な情報が直線および線分の情報に付加される。直線抽出
部15、16は、まず、すべての直線、線分に対して、
抽出時にそれぞれ番号を振っておく。そして、線分を示
す情報の中に、それが属する直線の番号と、その直線を
構成する右隣(縦線の場合には下隣)にある線分の番号
を加える。また、直線を示す情報には、その直線を構成
する線分のうち、一番左(縦線の場合には一番上)にあ
る線分の番号を加える。
In the processes P4 and P11, for example, the following information is added to the straight line and line segment information. The straight line extraction units 15 and 16 firstly, for all straight lines and line segments,
Number each one when extracting. Then, in the information indicating the line segment, the number of the straight line to which it belongs and the number of the line segment on the right side (below in the case of a vertical line) that constitutes the straight line are added. Further, to the information indicating the straight line, the number of the line segment on the leftmost side (the topmost in the case of a vertical line) among the line segments forming the straight line is added.

【0123】なお、以下の直線探索処理P5、P12、
直線統合処理P7、P14等において、直線の長さ、位
置、構成する線分の本数が変化する度に、これらの直線
と線分の関係を示す情報が更新される。
The following straight line search processing P5, P12,
In the straight line integration processing P7, P14, etc., information indicating the relationship between these straight lines and line segments is updated each time the length, position, and the number of line segments forming the line change.

【0124】図11は、直線抽出部15、16による線
分統合処理および直線検出処理のフローチャートであ
る。処理が開始されると、直線抽出部15、16は、ま
ず、処理P2、P9において抽出された線分矩形の情報
を入力し(ステップS21)、互いに接したり、重なり
合ったりしている線分同士を統合して(ステップS2
2)、統合された複数の線分を囲む外接矩形の座標値
を、直線を表す座標情報とする(ステップS23)。
FIG. 11 is a flowchart of the line segment integration processing and the straight line detection processing by the straight line extraction units 15 and 16. When the processing is started, the straight line extraction units 15 and 16 first input the information of the line segment rectangles extracted in the processing P2 and P9 (step S21), and the line segments that are in contact with each other or overlap each other. Are integrated (step S2
2) The coordinate values of the circumscribing rectangle that surrounds the plurality of integrated line segments are used as coordinate information representing a straight line (step S23).

【0125】次に、統合された複数の線分のそれぞれの
情報に、横線の場合は右隣の線分の番号を付加し、縦線
の場合は下隣の線分の番号を付加する(ステップS2
4)。そして、それらが構成する直線の情報に、横線の
場合は一番左の線分の番号を付加し、縦線の場合は一番
上の線分の番号を付加して(ステップS25)、処理を
終了する。
Next, to the information of each of the plurality of integrated line segments, the number of the adjacent line segment on the right side is added in the case of a horizontal line, and the number of the adjacent line segment below is added in the case of a vertical line ( Step S2
4). Then, the number of the leftmost line segment is added in the case of a horizontal line and the number of the topmost line segment is added in the case of a vertical line to the information of the straight lines formed by them (step S25), and the processing is performed. To finish.

【0126】このように、直線を抽出する際に、ある直
線とその直線を構成する線分とを関連づける情報を、直
線と線分の両方または片方に加えることにより、ある直
線の位置を詳細に記述することができる。また、直線を
構成する線分同士の位置関係を記述した情報を線分の情
報に加えることにより、その直線の位置をさらに詳細に
記述することができる。そして、これらの詳細な情報を
文字補完処理P22に渡すことで、処理P22が効率化
される。
As described above, when a straight line is extracted, information relating to a straight line and a line segment forming the straight line is added to one or both of the straight line and the line segment, so that the position of the certain straight line is detailed. Can be described. Further, by adding information describing the positional relationship between the line segments forming the straight line to the information about the line segment, the position of the straight line can be described in more detail. Then, by passing these detailed information to the character complementing process P22, the process P22 becomes efficient.

【0127】次に、横直線抽出部15は、処理P5にお
いて、矩形近似された横直線の左右端を正確に検出する
ために、図12に示すように、その直線内のパターン
(画素)の探索を、左右に向かって行う。
Next, in the process P5, the horizontal straight line extracting section 15 detects the pattern (pixel) in the straight line as shown in FIG. 12 in order to accurately detect the left and right ends of the horizontal line which is approximated by the rectangle. The search is performed left and right.

【0128】探索の途中で、進行方向に画素のない部分
(空白)が存在した場合、一定の画素数までは画素があ
るものと仮定して、進行方向に探索を続行する。一定画
素数を越えて空白が存在した場合には、その位置を端点
として探索を終了する。以下の処理では、探索によって
検出された端点が、直線の端点として用いられる。同様
に、縦直線抽出部16は、処理P12において、直線の
上下端を正確に検出するために、上下に向かってパター
ンの探索を行う。
When a portion having no pixel (blank) exists in the traveling direction during the search, it is assumed that there are pixels up to a certain number of pixels, and the search is continued in the traveling direction. If there is a blank space over a certain number of pixels, the search is terminated with that position as the end point. In the following processing, the end points detected by the search are used as the end points of the straight line. Similarly, in the process P12, the vertical straight line extraction unit 16 searches for a pattern vertically in order to accurately detect the upper and lower ends of the straight line.

【0129】ここで、直線探索の結果、図13に示すよ
うに、直線51を構成する線分52が存在しない領域ま
で探索が及び、直線51の外に端点(探索終了点)5
3、54が求まったとする。この場合は、図14に示す
ように、新たに適当な大きさの線分矩形55、56を作
成する。線分矩形55、56の位置や太さは、あらかじ
め算出された表の傾き、近隣の線分の太さ等から決めら
れる。そして、線分矩形55、56を含む外接矩形5
1′を新たな直線矩形とする。
Here, as a result of the straight line search, as shown in FIG. 13, the search extends to a region where the line segment 52 forming the straight line 51 does not exist, and the end point (search end point) 5 outside the straight line 51.
Suppose that 3 and 54 are obtained. In this case, as shown in FIG. 14, line segment rectangles 55 and 56 of appropriate sizes are newly created. The positions and thicknesses of the line segment rectangles 55 and 56 are determined from the inclination of the table calculated in advance, the thickness of the neighboring line segments, and the like. And the circumscribed rectangle 5 including the line segment rectangles 55 and 56
Let 1'be a new straight line rectangle.

【0130】このように、直線を示す領域内で、直線を
構成する線分が存在していない部分に関しては、仮想的
に線分を作成することにより、線分の位置情報を必要と
する他の処理の精度が向上する。また、線分が存在して
いない部分の周囲にある線分の大きさを変更すること
で、線分が存在しない部分をなくすことも可能である。
As described above, the line segment position information is required by virtually creating a line segment for a portion in which the line segment forming the straight line does not exist in the area indicating the straight line. The accuracy of the processing of is improved. Further, by changing the size of the line segment around the portion where the line segment does not exist, it is possible to eliminate the portion where the line segment does not exist.

【0131】例えば、図15に示すような線分57、5
8、59から成る直線において、その両端が端点60、
61に決定されたとする。このとき、直線抽出部15
は、図16に示すように、両端の線分57、59をそれ
ぞれ端点60、61まで伸ばして、線分57′、59′
を生成し、これらの座標値を線分情報として記憶する。
これにより、線分の位置情報を必要とする他の処理の精
度が向上する。
For example, line segments 57 and 5 as shown in FIG.
In a straight line consisting of 8 and 59, both ends are end points 60,
It is assumed that the decision is 61. At this time, the straight line extraction unit 15
16, the line segments 57 and 59 at both ends are extended to end points 60 and 61, respectively, and line segments 57 'and 59' are formed.
Is generated and these coordinate values are stored as line segment information.
This improves the accuracy of other processing that requires the position information of the line segment.

【0132】このように、直線の抽出後に端点の位置に
補正が必要な場合には、それを補正し変更することによ
り、直線抽出の精度が向上する。さらに、直線を構成す
る線分が存在していない部分の大きさによって、新たに
線分を生成するか、周囲の線分の大きさを変更するかを
選択するような直線探索処理を採用することもできる。
As described above, when the position of the end point needs to be corrected after the straight line is extracted, the accuracy of the straight line extraction is improved by correcting and changing the end point. Furthermore, a straight line search process is adopted that selects whether to newly generate a line segment or change the size of surrounding line segments depending on the size of a portion that does not include a line segment that constitutes a straight line. You can also

【0133】図17は、このような直線探索処理のフロ
ーチャートである。処理が開始されると、直線抽出部1
5、16は、まず、直線の端点から左右または上下方向
に画素を探索し(ステップS31)、探索処理を一定長
さ以上行ったかどうかを判定する(ステップS32)。
FIG. 17 is a flowchart of such a straight line search process. When the processing is started, the straight line extraction unit 1
First, the pixels 5 and 16 search for pixels in the horizontal or vertical direction from the end points of the straight line (step S31), and determine whether or not the search processing has been performed for a certain length or longer (step S32).

【0134】一定長さ以上探索して画素が見つからなか
った場合は、図14と同様に、その空白部分に仮想的に
線分を作成する(ステップS33)。そして、作成した
線分と、その隣の線分との位置関係を表す情報を作成し
て(ステップS34)、処理を終了する。2つの隣り合
う線分の位置関係を表すには、例えば、左の線分の情報
に右の線分の番号が付加される。あるいは、上の線分の
情報に下の線分の番号が付加される。
If a pixel is not found by searching for a certain length or more, a line segment is virtually created in the blank portion as in FIG. 14 (step S33). Then, information indicating the positional relationship between the created line segment and the adjacent line segment is created (step S34), and the process ends. In order to express the positional relationship between two adjacent line segments, for example, the number of the right line segment is added to the information of the left line segment. Alternatively, the number of the lower line segment is added to the information of the upper line segment.

【0135】また、ステップS32において、一定長さ
以上探索していない場合は、図16と同様に、その直線
を構成する両端の線分を探索終了点まで伸ばして(ステ
ップS35)、処理を終了する。
Further, in step S32, when the search is not performed for a certain length or more, the line segments at both ends forming the straight line are extended to the search end point as in FIG. 16 (step S35), and the process is ended. To do.

【0136】このように、線分が存在していない部分の
大きさによって、新たに線分を生成するか、周囲の線分
の大きさを変更するかを選択することで、処理が効率化
され、処理速度が向上する。次に、罫線抽出装置は、処
理P6において、先願の「枠抽出装置及び矩形抽出装
置」(特願平7−203259)の方法に準じて、横点
線を抽出する。また、処理P13において、同様にして
縦点線を抽出する。ただし、処理P6は、必ずしも処理
P13より前に行われるとは限らず、必要に応じて処理
P13の後に行われることもある。これらの処理では、
一定の大きさを持ち、かつ規則正しく並んでいる部分パ
ターンを探し、それらのパターンを矩形で囲んで、点線
の位置を表現する。
As described above, by selecting whether to newly generate a line segment or change the size of the surrounding line segment depending on the size of the portion where the line segment does not exist, the processing efficiency is improved. Therefore, the processing speed is improved. Next, in the process P6, the ruled line extraction device extracts a horizontal dotted line according to the method of the “frame extraction device and rectangle extraction device” (Japanese Patent Application No. 7-203259) of the prior application. Further, in the process P13, a vertical dotted line is similarly extracted. However, the process P6 is not always performed before the process P13, and may be performed after the process P13 as necessary. In these processes,
Find the partial patterns that have a certain size and are regularly arranged, and enclose these patterns in a rectangle to express the position of the dotted line.

【0137】ところで、先願の方法においては、図18
に示すように、各パターンを囲む外接矩形の中点間の距
離d1、d2、d3、d4、d5、d6を算出し、それ
らの距離を比較して、パターンが規則正しく並んでいる
かどうかを判断していた。
By the way, in the method of the prior application, FIG.
As shown in, the distances d1, d2, d3, d4, d5, and d6 between the midpoints of the circumscribing rectangles surrounding each pattern are calculated, and the distances are compared to determine whether the patterns are regularly arranged. Was there.

【0138】図18の点線はもともと2点破線である場
合に相当し、パターンは規則的に並んでいるが、先願の
距離算出法では距離d1、d2、d4、d5と距離d
3、d6が等しいとは言えない。このため、点線として
抽出されない可能性が高い。通常の点線が部分的に潰れ
て図18のようなパターンになった場合も同様である。
The dotted line in FIG. 18 originally corresponds to the case of a two-dot broken line, and the patterns are regularly arranged. However, in the distance calculation method of the prior application, the distances d1, d2, d4, d5 and the distance d are set.
It cannot be said that 3 and d6 are equal. Therefore, there is a high possibility that the dotted line will not be extracted. The same applies when the normal dotted line is partially crushed to form a pattern as shown in FIG.

【0139】そこで、各パターンの外接矩形の間の間隔
D1、D2、D3、D4、D5、D6を、代わりに距離
として用いることにする。パターンの大きさが異なる場
合でも、パターン間の間隔はほぼ等しくなるので、パタ
ーンの規則性を検出しやすく、点線の抽出を行うことが
可能となる。
Therefore, the intervals D1, D2, D3, D4, D5, D6 between the circumscribing rectangles of each pattern will be used as the distance instead. Even if the sizes of the patterns are different, the intervals between the patterns are almost equal, so that it is easy to detect the regularity of the patterns, and the dotted lines can be extracted.

【0140】また、図19に示すように、点線を構成す
る点の大きさがかなり大きく、先願の方法で使用してい
た中点間の距離dd1、dd2、dd3では、距離が大
き過ぎると判定され、点線とみなされない場合がある。
このような場合でも、各パターンの外接矩形の間の間隔
DD1、DD2、DD3を用いることで、点が規則的に
並んでいると判定され、点線として抽出することが可能
となる。
Further, as shown in FIG. 19, the size of the points forming the dotted line is considerably large, and if the distances dd1, dd2, dd3 between the midpoints used in the method of the prior application are too large, It may be judged and may not be regarded as a dotted line.
Even in such a case, by using the intervals DD1, DD2, and DD3 between the circumscribing rectangles of the respective patterns, it is determined that the points are regularly arranged, and it is possible to extract the points as dotted lines.

【0141】このように、点線を抽出する際に、部分パ
ターン同士の距離を、各部分パターンの外接矩形の位置
座標を用いて算出することで、大きさの異なるパターン
から成る点線(破線)を抽出することが可能となる。ま
た、一度点線を構成すると判断されたパターンは再度処
理には使用しないようにすることで、点線の端を余分に
伸ばして、点線を長めに抽出してしまう可能性を低くす
ることができる。
As described above, when the dotted lines are extracted, the distance between the partial patterns is calculated by using the position coordinates of the circumscribing rectangle of each partial pattern, so that the dotted lines (broken lines) composed of patterns of different sizes can be obtained. It becomes possible to extract. Further, by not using the pattern once determined to form the dotted line for the processing again, it is possible to reduce the possibility that the end of the dotted line is extended excessively and the dotted line is extracted longer.

【0142】例えば、図20に示すように、T字型に交
差した点線のパターンの場合、まず、2本の縦点線が、
矩形c1から矩形c4までの範囲と矩形d1から矩形d
4までの範囲に、それぞれ抽出される。ここで、一度点
線を構成すると判断されたパターンを再度使用可能とす
ると、2本の横点線は、矩形a1から矩形d2までの範
囲と矩形b1から矩形d3までの範囲に、それぞれ抽出
される。ただし、矩形c2と矩形d2の間隔はあまり広
くないものとする。
For example, as shown in FIG. 20, in the case of a dotted line pattern intersecting in a T shape, first, two vertical dotted lines are
Range from rectangle c1 to rectangle c4 and rectangle d1 to rectangle d
It is extracted in the range up to 4. Here, if the pattern once determined to constitute the dotted line can be used again, the two horizontal dotted lines are extracted in the range from the rectangle a1 to the rectangle d2 and in the range from the rectangle b1 to the rectangle d3, respectively. However, the interval between the rectangle c2 and the rectangle d2 is not so wide.

【0143】しかし、ユーザの目には、矩形c2と矩形
d2の間、および、矩形c3と矩形d3の間には点がな
いため、これらの横点線は矩形d2、d3までは伸びて
いないと考えるのが自然である。そこで、一度縦点線を
構成すると判断された矩形c2、c3、d2、d3に関
しては、横点線を抽出する際に使用しないようにするこ
とで、図21に示すように、横点線を正確に抽出するこ
とが可能となる。
However, since there are no points in the eyes of the user between the rectangles c2 and d2 and between the rectangles c3 and d3, these horizontal dotted lines do not extend to the rectangles d2 and d3. It is natural to think. Therefore, the rectangles c2, c3, d2, and d3 that are once determined to form the vertical dotted line are not used when extracting the horizontal dotted line, so that the horizontal dotted line is accurately extracted as shown in FIG. It becomes possible to do.

【0144】図21において、縦点線の抽出範囲は図2
0の場合と同様であるが、横点線の抽出範囲は、矩形a
1から矩形a2までと矩形b1から矩形b2までであ
り、より正確に横点線が抽出されていることが分かる。
In FIG. 21, the extraction range of the vertical dotted line is shown in FIG.
Similar to the case of 0, the horizontal dotted line extraction range is rectangle a.
It is understood that the horizontal dotted lines are more accurately extracted from 1 to rectangle a2 and rectangle b1 to rectangle b2.

【0145】図22は、このような点線検出処理のフロ
ーチャートである。処理が開始されると、罫線抽出装置
は、まず、各ラベルのパターンの外接矩形の情報を入力
し(ステップS41)、縦点線を抽出する(ステップS
42)。次に、縦点線で使用したラベルを処理対象から
省いて(ステップS43)、横点線を抽出し(ステップ
S44)、処理を終了する。これにより、縦点線の一部
とみなされたパターンが、同時に、横点線の一部とみな
されることがなくなる。
FIG. 22 is a flowchart of such dotted line detection processing. When the processing is started, the ruled line extraction device first inputs the information of the circumscribed rectangle of the pattern of each label (step S41) and extracts the vertical dotted line (step S).
42). Next, the label used by the vertical dotted line is omitted from the processing target (step S43), the horizontal dotted line is extracted (step S44), and the process is terminated. As a result, the pattern regarded as part of the vertical dotted line is not simultaneously regarded as part of the horizontal dotted line.

【0146】このように、点線を抽出する際に、一度点
線を構成すると判断されたパターンに関しては、再度点
線を構成することができないものとすることで、実際は
存在しない部分に点線があるものと判断されることを防
ぐことができる。
As described above, when extracting a dotted line, it is assumed that the dotted line cannot be constructed again for a pattern that is once determined to constitute the dotted line. It can prevent being judged.

【0147】ところで、この抽出方法では、T字型の横
棒方向の点線を先に抽出しなければ、先願の方法と同じ
結果となってしまう。このため、図20のパターンを9
0度回転させたようなパターンの場合は、縦点線抽出処
理と横点線抽出処理の順序を入れ替える必要がある。し
たがって、処理を行う画像の傾向が分かっており、縦横
どちらを先に抽出したらよいかを判断できる場合に有効
な処理方法である。
By the way, in this extracting method, unless the dotted line in the T-shaped horizontal bar direction is extracted first, the same result as the method of the prior application will be obtained. Therefore, the pattern of FIG.
In the case of a pattern rotated by 0 °, it is necessary to switch the order of the vertical dotted line extraction processing and the horizontal dotted line extraction processing. Therefore, this is an effective processing method when the tendency of the image to be processed is known and it is possible to determine which of the vertical and horizontal directions should be extracted first.

【0148】点線抽出後、罫線抽出装置は、直線探索処
理P5、P12と同様にして、点線の端点から、横線の
場合は左右に、縦線の場合は上下に、ある一定範囲の画
素探索を行う。そして、端点より外側まで探索が進んだ
場合には、探索を行った場所に新たに仮想的な線分矩形
を作成する。
After extracting the dotted lines, the ruled line extracting apparatus searches for a certain range of pixels from the end points of the dotted lines to the left and right in the case of horizontal lines and the upper and lower sides in the case of vertical lines, in the same manner as the straight line search processing P5 and P12. To do. Then, when the search proceeds to the outside of the end point, a new virtual line segment rectangle is created at the place where the search was performed.

【0149】このように、点線の抽出後に点線の両端か
ら一定長さの範囲で画素の探索を行うことにより、潰れ
によって点線が部分的に抽出されない場合であっても、
その端点を正確に抽出することが可能となる。また、端
点の位置に補正が必要な場合には、それを補正し変更す
ることにより、点線抽出の精度が向上する。
In this way, even if the dotted line is not partially extracted due to crushing by searching for pixels within a fixed length from both ends of the dotted line after extracting the dotted line,
It becomes possible to accurately extract the end points. Further, when the position of the end point needs to be corrected, the accuracy of the dotted line extraction is improved by correcting and changing the position.

【0150】以下の処理では、点線の位置を示す矩形
を、既に検出されている実線の位置を示す直線矩形と同
様に扱う。したがって、ある点線とその点線を構成する
線分とを関連付ける情報を、点線と線分の両方または片
方に付加し、線分同士の位置関係を記述した情報を線分
の情報に付加しておく。これにより、点線の位置をさら
に詳細に記述することができ、後の文字補完処理P22
等が効率化される。
In the following processing, the rectangle indicating the position of the dotted line is treated in the same manner as the straight line rectangle indicating the position of the already detected solid line. Therefore, information that associates a certain dotted line with the line segments that make up the dotted line is added to one or both of the dotted line and the line segment, and information that describes the positional relationship between the line segments is added to the information of the line segment. . As a result, the position of the dotted line can be described in more detail, and the subsequent character complementing process P22
Etc. are made more efficient.

【0151】次に、罫線抽出装置は、処理P7におい
て、抽出された横直線の再統合を行う。横直線探索処理
P5では比較的長さの短いかすれが吸収されるが、直線
統合処理P7は、処理P5で吸収しきれなかった、より
大きなかすれを吸収するために行われる。
Next, the ruled line extracting device reintegrates the extracted horizontal straight lines in process P7. The horizontal straight line search process P5 absorbs a blur having a relatively short length, but the straight line integration process P7 is performed to absorb a larger blur that cannot be completely absorbed in the process P5.

【0152】例えば、図23(a)に示すマスク処理後
の画像からは、横直線抽出部15により、図23(b)
に示すような横直線71、72、73、74、75が抽
出される。この場合、横罫線の部分的なかすれのため
に、横直線72と横直線73は分離している。そこで、
y方向の距離が一定値以下であり、かつx方向の距離も
一定値以下である横直線同士を統合し、1本の長い横直
線とする。この結果、図23(c)に示すように、横直
線72と横直線73は1本の横直線76に統合される。
For example, from the image after the mask processing shown in FIG. 23 (a), the horizontal straight line extraction unit 15 performs the processing shown in FIG. 23 (b).
Horizontal lines 71, 72, 73, 74, and 75 shown in are extracted. In this case, the horizontal straight line 72 and the horizontal straight line 73 are separated due to partial blurring of the horizontal ruled line. Therefore,
Horizontal lines whose distance in the y direction is less than or equal to a fixed value and distance in the x direction are also less than or equal to the fixed value are integrated into one long horizontal line. As a result, the horizontal line 72 and the horizontal line 73 are integrated into one horizontal line 76, as shown in FIG.

【0153】ここでは、傾いた処理画像に対応するた
め、罫線抽出装置は、まず、処理P7の前までに抽出さ
れた一定長さ以上の直線の傾きを、直線を構成する線分
の位置情報等から求め、それらの傾きの平均値を計算す
る。次に、任意の2つの直線のx方向の距離xdを算出
し、それが一定値以下であるような直線の組を抽出す
る。そして、各組のxdと傾きの平均値から対応するy
方向の距離yd1を算出し、その組の直線間のy方向の
距離ydがyd1に近い場合に、それらを統合する。
Here, in order to deal with a tilted processed image, the ruled line extraction apparatus first determines the tilt of a straight line having a predetermined length or more extracted before the process P7 by using the position information of the line segments forming the straight line. Etc., and calculate the average value of those slopes. Next, the distance xd between two arbitrary straight lines in the x direction is calculated, and a set of straight lines having a certain value or less is extracted. Then, from the average value of xd and the slope of each set, the corresponding y
The distance yd1 in the direction is calculated, and if the distance yd in the y direction between the straight lines of the set is close to yd1, they are integrated.

【0154】例えば、図24に示すように、横直線が右
上がりの傾きを持っている場合、画像内の横直線の傾き
の平均値を求めておく。次に、yd1/xdが傾きの平
均値と同じ値になるように、組となる直線77、78の
x方向の距離xdに傾きの平均値を乗じてyd1の値を
算出する。そして、直線77、78のy方向の距離yd
が一定の許容範囲でyd1と一致すれば、直線77と直
線78を統合する。直線の傾きの計算には、斜線で示さ
れる線分の座標値が用いられる。
For example, as shown in FIG. 24, when the horizontal straight line has an upward slope, the average value of the horizontal straight lines in the image is calculated. Next, the value of yd1 is calculated by multiplying the average value of inclination by the distance xd of the pair of straight lines 77 and 78 in the x direction so that yd1 / xd becomes the same value as the average value of inclination. Then, the distance yd of the straight lines 77 and 78 in the y direction
If is equal to yd1 within a certain allowable range, the straight line 77 and the straight line 78 are integrated. For the calculation of the inclination of the straight line, the coordinate value of the line segment indicated by the diagonal line is used.

【0155】また、表に含まれる複数の横罫線の一部が
かすれていて、図25に示すような横直線81、82、
83、84、85、86、87、88が抽出された場
合、直線83と直線88は同じy座標値を示すことにな
る。このため、先願の「パターン領域切り出し方式及び
パターン抽出装置」(特願平7−282171)の直線
統合方法を用いると、破線Bで示されるように、直線8
3は直線88と統合されてしまう。
Further, some of the plurality of horizontal ruled lines included in the table are faint, and horizontal straight lines 81, 82, as shown in FIG.
When 83, 84, 85, 86, 87 and 88 are extracted, the straight line 83 and the straight line 88 have the same y coordinate value. For this reason, when the straight line integration method of “Pattern region cutout method and pattern extraction device” (Japanese Patent Application No. 7-282171) of the prior application is used, as shown by a broken line B, a straight line 8
3 is integrated with the straight line 88.

【0156】しかし、本発明の方法では、周囲の直線の
平均的な傾きに従って適切なy方向の距離が計算され、
破線Aで示されるように、直線83は直線87と繋がっ
ているとみなされる。その結果、直線83は直線87と
統合され、同様にして、直線84は直線88と統合され
る。
However, according to the method of the present invention, an appropriate distance in the y direction is calculated according to the average slope of the surrounding straight line,
As shown by the broken line A, the straight line 83 is considered to be connected to the straight line 87. As a result, the straight line 83 is integrated with the straight line 87, and similarly, the straight line 84 is integrated with the straight line 88.

【0157】ところで、統合処理の対象となる直線と直
線の間には、元々短冊状の線分矩形は存在していない。
そこで、単に直線の外接矩形を変更するだけでなく、統
合された直線内の線分の存在しない領域に、周囲の線分
の位置情報を基準にして、仮想的に線分矩形を作成して
おく。
By the way, originally, no strip-shaped line segment rectangle exists between the straight lines to be integrated.
Therefore, in addition to simply changing the circumscribed rectangle of a straight line, a virtual line segment rectangle is created based on the position information of surrounding line segments in an area where the line segments do not exist in the integrated straight line. deep.

【0158】図26は、このような線分作成処理を示し
ている。図26において、直線91と直線92が統合さ
れ、直線93が生成された場合、直線91と直線92の
間の線分矩形が存在しなかった領域に、新たに線分矩形
94、95が作成される。これらの線分矩形94、95
の大きさおよび位置は、その周囲の線分矩形の情報に基
づいて適当に決められる。
FIG. 26 shows such a line segment creating process. In FIG. 26, when the straight line 91 and the straight line 92 are integrated and the straight line 93 is generated, new line segment rectangles 94 and 95 are created in the region where the line segment rectangle between the straight line 91 and the straight line 92 does not exist. To be done. These line segment rectangles 94, 95
The size and position of the are determined appropriately based on the information of the line segment rectangles around them.

【0159】また、対象としている枠が不規則な枠であ
る場合には、それに含まれる罫線の長さや位置が様々な
ので、ある一定値以上距離の離れた直線同士の統合は行
わないものとする。縦直線統合処理P14においても、
横直線の場合と同様にして、x方向の距離が一定値以下
であり、かつy方向の距離も一定値以下である縦直線同
士を統合し、それらの間に仮想的な線分を作成する。
When the target frame is an irregular frame, the lengths and positions of the ruled lines included in the frame are various, and therefore the straight lines separated by a certain distance or more are not integrated. . Also in the vertical straight line integration process P14,
Similar to the case of a horizontal line, vertical lines whose distances in the x direction are less than or equal to a certain value and distances in the y direction are less than or equal to a certain value are integrated, and a virtual line segment is created between them. .

【0160】図27は、線分作成を行う直線統合処理の
フローチャートである。処理が開始されると、罫線抽出
装置は、まず、抽出された直線情報を入力し(ステップ
S51)、ある一定距離以下の直線同士を統合する(ス
テップS52)。次に、統合された直線と直線の間の線
分が存在しない範囲を検出し(ステップS53)、検出
した範囲に仮想的に線分矩形を作成する(ステップS5
4)。
FIG. 27 is a flow chart of straight line integration processing for creating a line segment. When the process is started, the ruled line extraction device first inputs the extracted straight line information (step S51) and integrates straight lines with a certain distance or less (step S52). Next, a range in which no line segment between the integrated straight lines exists is detected (step S53), and a line segment rectangle is virtually created in the detected range (step S5).
4).

【0161】そして、作成した線分と、元からある線分
との位置関係を記述して(ステップS55)、処理を終
了する。ステップS55では、横直線の場合は、ある線
分の情報にその右隣の線分の番号を付加し、縦直線の場
合は、ある線分の情報にその下隣の線分の番号を付加す
ることで、各線分間の位置関係を記述する。
Then, the positional relationship between the created line segment and the line segment originally present is described (step S55), and the process is terminated. In step S55, in the case of a horizontal straight line, the number of the line segment adjacent to the right is added to the information of a certain line segment, and in the case of the vertical straight line, the number of the line segment adjacent to the lower line is added to the information of a certain line segment. By doing so, the positional relationship between each line segment is described.

【0162】このような線分作成を行うことで、文字補
完処理P22等の後の処理において、直線の位置を正確
に知る必要のある場合に、その情報を利用することがで
きる。したがって、線分が存在しないために後の処理の
精度が低下するようなことが防止される。
By creating such a line segment, the information can be used when it is necessary to know the position of the straight line accurately in the process after the character complementing process P22 and the like. Therefore, it is possible to prevent the accuracy of the subsequent processing from being lowered due to the absence of the line segment.

【0163】以上の処理は、枠の構造が規則的か不規則
かに関わらずに行う処理である。それが規則的な構造で
あるとあらかじめ分かっている場合に限り、罫線抽出装
置は、その規則性(ルール)を用いて枠線を決定するた
めに、表のルール処理P15を行う。この処理は、先願
の「パターン抽出装置及びパターン領域の切り出し方
法」(特願平8−107568)の方法に準じて、直線
統合処理P14の後、矩形領域の抽出処理(処理P16
〜P21)の前に行われる。表のルール処理P15は、
次の3つの処理を含んでいる。
The above-mentioned processing is performed regardless of whether the frame structure is regular or irregular. Only when it is known in advance that it has a regular structure, the ruled line extraction device performs table rule processing P15 in order to determine the frame line using the regularity (rule). This process follows the method of “Pattern extraction device and pattern region cutting method” (Japanese Patent Application No. 8-107568) of the previous application, and after the straight line integration process P14, a rectangular region extraction process (process P16).
~ P21) is performed before. The table rule processing P15 is
It includes the following three processes.

【0164】第1の処理は、図41に示したような入れ
子内の矩形を構成する直線候補を検出する処理である。
この処理では、横直線の中で、左右の端点のx座標値が
ほとんど同じものが多数存在した場合には、かすれの有
無に関わらず、それらを無条件に入れ子を構成する直線
の候補とする。
The first process is a process for detecting straight line candidates forming a rectangle in a nest as shown in FIG.
In this process, if a large number of horizontal straight lines have substantially the same x-coordinate values of the left and right end points, they are unconditionally regarded as straight line candidates forming a nest regardless of whether or not they are blurred. .

【0165】第2の処理は、直線候補の作成処理であ
る。この処理では、第1の処理で検出された、同じ位置
の端点および同じ長さを持つ直線すべてについて、それ
ぞれの間隔が等しくなるように、新たに直線を作成す
る。
The second process is a process for creating straight line candidates. In this processing, a new straight line is created so that the intervals of all the straight lines having the same end point and the same length detected in the first processing are equal.

【0166】第3の処理は、直線の伸張処理である。こ
の処理では、対象が規則的な帳票であると分かっている
場合に、かすれにより短くなった直線を伸張する。この
とき、統合後の直線を元に、対象としている帳票の傾き
に沿って直線の伸張を行い、直線抽出の場合と同様にし
て、短い線分矩形を用いて伸張部分を表現する。作成さ
れる矩形の太さは、伸ばす前の直線矩形の太さを基準と
して算出される。
The third processing is straight line expansion processing. In this process, when it is known that the object is a regular form, the straight line shortened due to blurring is extended. At this time, based on the straight line after integration, the straight line is extended along the inclination of the target form, and the extended portion is expressed using a short line segment rectangle in the same manner as in the case of straight line extraction. The thickness of the created rectangle is calculated based on the thickness of the straight line rectangle before the extension.

【0167】また、伸張された直線に関しては、伸張処
理を行ったことを示す情報を、その直線の情報に加えて
おく。この情報としては、例えば、直線の伸張比率(直
線の伸張後の長さに対する伸張された部分の割合)が用
いられる。伸張比率が0であれば、伸張処理が行われて
いないことを表し、それが0より大きければ、伸張処理
が行われたことを表す。
As for the expanded straight line, information indicating that the expansion process has been performed is added to the information of the straight line. As this information, for example, a straight line expansion ratio (ratio of the expanded part to the length of the straight line after expansion) is used. If the expansion ratio is 0, it means that the expansion process is not performed, and if it is larger than 0, it means that the expansion process is performed.

【0168】図28は、このような直線伸張処理のフロ
ーチャートである。処理が開始されると、罫線抽出装置
は、まず、表のルールに従って短い直線の伸張処理を行
い(ステップS61)、各直線について、全体の長さと
伸張した部分の長さの比率を計算する(ステップS6
2)。そして、算出された比率を各直線の情報として付
加し(ステップS63)、処理を終了する。
FIG. 28 is a flow chart of such a linear expansion process. When the process is started, the ruled line extraction device first performs a process of extending a short straight line according to the rules of the table (step S61), and calculates the ratio of the total length and the length of the stretched part for each straight line ( Step S6
2). Then, the calculated ratio is added as the information of each straight line (step S63), and the process ends.

【0169】さらに、伸張処理を行ったことを示す情報
以外にも、統合処理を行ったことを示す情報等、直線を
抽出する際に行った処理の種類を示す情報を、直線の情
報に付加しておく。これらの情報は、後の処理における
判断基準として用いられる。例えば、レイアウト認識処
理P23では、付加された情報に基づいて各直線の処理
の重みを可変にすることができ、処理をより詳細に行え
るようになるので、その精度が向上する。
Further, in addition to the information indicating that the decompression processing has been performed, the information indicating the type of processing performed when the straight line is extracted, such as the information indicating that the integration processing has been performed, is added to the straight line information. I'll do it. These pieces of information are used as criteria for the subsequent processing. For example, in the layout recognition process P23, the weight of the process of each straight line can be made variable based on the added information, and the process can be performed in more detail, which improves the accuracy.

【0170】ここでは、規則的な表に対する処理方法を
述べたが、升目状の表でなくても、あらかじめなんらか
の規則が分かっていれば、その規則に従って処理の内容
をその都度変化させることで、処理精度や処理速度を上
げることができる。例えば、入れ子状態になった矩形は
存在しないという規則が与えられた場合、後述する入れ
子処理を省略することが可能である。
Here, the method of processing a regular table has been described, but even if the table is not a grid-like table, if some rule is known in advance, the content of the process can be changed each time according to the rule. Processing accuracy and processing speed can be increased. For example, if a rule is given that there is no rectangle that is in a nested state, the nesting process described later can be omitted.

【0171】次に、罫線抽出装置は、処理P16からP
20において、先願の「パターン領域切り出し方式及び
パターン抽出装置」(特願平7−282171)の方法
を用いて、枠の矩形表現を行う。ここでは、これまでに
検出された縦横の直線の中で枠を構成する直線を決定
し、上下左右の4辺を枠で囲まれた矩形範囲を、画像の
左上から順番に抽出することで、枠の構造を表現する。
Next, the ruled line extraction device performs processing P16 to P16.
20, a rectangular representation of the frame is performed using the method of “Pattern region cutting method and pattern extraction device” (Japanese Patent Application No. 7-281171) of the previous application. Here, by determining the straight lines forming the frame among the vertical and horizontal straight lines detected so far, and extracting the rectangular range surrounded by the four sides of the top, bottom, left, and right in order from the upper left of the image, Represent the frame structure.

【0172】例えば、図29(a)に示す表の場合、ま
ず、図29(b)に示すように、大枠の複数の行に分割
され、次に、図29(c)に示すように、各行がさらに
小さな矩形に分割される。この段階で、表の2行目一番
左の網掛け部分のように、矩形がさらに細かく分割され
ている状態(入れ子)の場合は、その矩形が新たな表と
みなされ、図29(d)に示すように、さらに細かく分
割される。
For example, in the case of the table shown in FIG. 29 (a), first, as shown in FIG. 29 (b), it is divided into a plurality of outline frames, and then, as shown in FIG. 29 (c), Each line is divided into smaller rectangles. At this stage, in the case where the rectangle is further subdivided (nested) like the leftmost shaded portion in the second row of the table, the rectangle is regarded as a new table, and FIG. ), It is further subdivided.

【0173】まず、処理P16において、罫線抽出装置
は、枠の上部から順に、一定の規則に従って一行を構成
する2本の横直線の組を決定し、それらを横枠線とす
る。また、処理P17において、組になった2本の横直
線によって形成される間隙、すなわち一行毎に縦直線を
抽出し、抽出された縦直線の中で、上下端ともに2本の
横枠線に達しているものを、縦枠線とする。そして、決
定された横枠線と縦枠線に四方を囲まれた矩形範囲を抽
出する。
First, in process P16, the ruled line extracting apparatus determines a set of two horizontal straight lines forming one line in order from the top of the frame according to a certain rule, and sets them as horizontal frame lines. In the process P17, a gap formed by two horizontal lines forming a pair, that is, a vertical line is extracted for each line, and in the extracted vertical line, both the upper and lower ends are converted into two horizontal frame lines. What has reached is the vertical frame line. Then, a rectangular range surrounded by the determined horizontal and vertical frame lines on all sides is extracted.

【0174】入れ子構造処理部17は、抽出された矩形
範囲の中がさらに細かく分割されている場合に、入れ子
処理P18、P19を行う。処理P18、P19におい
ては、抽出された矩形範囲全体が新たな表とみなされ、
再帰的に処理が行われる。そして、処理P16、P17
と同様にして、矩形範囲内の横枠線と縦枠線が決定され
る。このとき、入れ子に対応する矩形範囲の内部に限
り、対応可能なかすれの長さを短く設定する。
The nesting structure processing section 17 carries out nesting processing P18 and P19 when the extracted rectangular range is further subdivided. In the processes P18 and P19, the entire extracted rectangular range is regarded as a new table,
Processing is done recursively. Then, the processes P16 and P17
Similarly, the horizontal frame line and the vertical frame line within the rectangular range are determined. At this time, only the inside of the rectangular range corresponding to the nesting is set to have a shortable blur length.

【0175】罫線抽出装置は、入れ子構造処理部17に
よる処理を、新たな入れ子構造が現れなくなるまで繰り
返すことで、最終的に処理P20において、表の矩形表
現を完成させる。こうして、縮小画像から抽出された各
矩形領域の座標が決定される。
The ruled line extraction device repeats the processing by the nested structure processing section 17 until a new nested structure does not appear, and finally in process P20, the rectangular representation of the table is completed. In this way, the coordinates of each rectangular area extracted from the reduced image are determined.

【0176】そして、罫線抽出装置は、処理21におい
て、矩形領域の座標値を、原画像である入力パターン1
1における座標値に変換し、その領域を文字領域とす
る。そして、原画像における文字領域の内側を4本の枠
線に沿って探索し、文字等が枠線に接触しているかどう
かを判定して、判定結果を文字補完処理P22に渡す。
Then, in the processing 21, the ruled line extraction device determines the coordinate values of the rectangular area as input pattern 1 which is the original image.
It is converted into the coordinate value in 1 and the area is set as the character area. Then, the inside of the character area in the original image is searched along the four frame lines, it is determined whether a character or the like is in contact with the frame line, and the determination result is passed to the character complementing process P22.

【0177】文字認識装置は、罫線抽出装置が生成した
情報を用いて、処理P22からP25を行う。処理P2
2においては、文字と枠線が接触している場合に、接触
文字の補完処理を原画像を用いて行い、その後、処理P
24において、文字補完された画像に対して文字認識を
行う。文字が接触していない場合には、文字領域をその
まま文字認識の対象とする。また、処理P23において
は、原画像を用いたレイアウト認識処理を行い、処理P
25においては、処理P23、P24の結果を元に表認
識を行う。
The character recognizing device performs the processes P22 to P25 using the information generated by the ruled line extracting device. Process P2
In No. 2, when the character and the frame line are in contact, the contact character is complemented using the original image, and then the process P is performed.
At 24, character recognition is performed on the character complemented image. When the characters are not in contact with each other, the character area is directly used for character recognition. Further, in the process P23, the layout recognition process using the original image is performed, and the process P23 is performed.
In 25, table recognition is performed based on the results of the processes P23 and P24.

【0178】ところで、表の各項目を表す矩形を構成し
ている4つの直線は、必ずしも通常の長方形を形成して
いるわけではない。実際に使用されている様々な帳票を
スキャナで入力したところ、次のようなものが出現頻度
が高いということが分かった。 (A)R付き帳票と呼ばれている、枠の角が丸くなった
帳票である場合。 (B)文字領域が二重の枠線により構成された場合。
By the way, the four straight lines forming the rectangle representing each item in the table do not necessarily form a normal rectangle. When I input various forms that were actually used with a scanner, I found that the following frequently appeared. (A) A form with rounded corners, called a form with R. (B) When the character area is composed of double borders.

【0179】文字領域にこうした特徴があるかどうかに
よって、後続する文字補完処理P22の精度が左右され
る。しかし、枠の角のR付き部分や二重線は、縮小され
た画像では潰れてしまうことが多く、はっきりとは判別
できない。そこで、処理21においては、原画像のデー
タを元にして、文字領域がこれらの状態に該当するかど
うかを判定し、判定結果に基づく情報を文字補完処理P
22に渡すことにする。この判定処理は次のようにして
行われる。
The accuracy of the subsequent character complementing process P22 depends on whether or not the character area has such characteristics. However, the rounded portions and double lines at the corners of the frame are often crushed in the reduced image, and cannot be clearly identified. Therefore, in process 21, based on the data of the original image, it is determined whether or not the character area corresponds to these states, and the information based on the determination result is used as the character complement process P.
I will give it to 22. This determination process is performed as follows.

【0180】図30は、(A)のR付き罫線で構成され
た帳票の一部分の例を示している。図30において、左
上の文字領域として抽出された部分に関して、その4辺
の枠線の外側を囲む領域101は実線で表され、4辺の
枠線の内側の領域102は点線で表されている。これら
の領域の境界の位置は、画像の傾き等に対処するため、
各枠線内の線分矩形の座標情報に基づいて決められる。
FIG. 30 shows an example of a part of the form formed by the ruled line with R in (A). In FIG. 30, regarding the portion extracted as the upper left character area, the area 101 surrounding the outside of the four-sided frame line is shown by a solid line, and the area 102 inside the four-sided frame line is shown by a dotted line. . The positions of the boundaries of these areas are
It is determined based on the coordinate information of the line segment rectangle within each frame line.

【0181】左上の丸くなった部分103に関しては、
内側の座標を表す点線の内側に、部分的に罫線のパター
ンが存在している。そこで、罫線抽出装置は、文字領域
の4隅のいずれかの部分に、枠線の内側の座標を表す位
置に接触しているパターンが存在している場合には、そ
の文字領域を囲む枠線はR付き罫線の可能性があるとみ
なす。そして、R付き罫線を表す情報とその位置(4隅
のうちのどれか)を表す情報とを文字領域の情報に付加
する。
Regarding the rounded portion 103 at the upper left,
A ruled line pattern partially exists inside the dotted line representing the inner coordinate. Therefore, the ruled line extraction device, when there is a pattern in contact with the position indicating the coordinates inside the frame line at any of the four corners of the character region, the ruled line extraction device surrounds the frame region. Is considered to be a ruled line with R. Then, the information indicating the R ruled line and the information indicating the position thereof (any one of the four corners) are added to the information of the character area.

【0182】このように、文字領域の角の部分の内側に
パターンが枠線と接触して存在する場合には、その領域
を囲む枠の角が丸く湾曲している丸角状態である可能性
があるとみなし、その情報を文字補完処理P22のため
に作成するデータに加える。これにより、処理P22に
おいて、文字領域のパターンが文字か文字以外かを判断
するための判断基準が増えるため、処理精度が向上す
る。
As described above, when the pattern exists inside the corner portion of the character area in contact with the frame line, it is possible that the corners of the frame surrounding the area are rounded and curved. It is assumed that there is a character, and that information is added to the data created for the character complementing process P22. Thereby, in the process P22, the number of judgment criteria for judging whether the pattern of the character area is a character or a character other than the character is increased, so that the processing accuracy is improved.

【0183】また、図31は、(B)の二重線を含む帳
票の一部分を示している。文字領域を囲む枠線の位置座
標を算出する際、矢印で示される直線104、105の
ように、2本の直線が接近して存在している場合には二
重線であるとみなし、それらの直線の位置座標を別々に
算出する。そして、内側に近い直線105の内側の領域
を文字領域とする。
FIG. 31 shows a part of the form including the double line of (B). When calculating the position coordinates of the frame line surrounding the character area, if two straight lines are close to each other, such as straight lines 104 and 105 indicated by arrows, it is considered as a double line and The position coordinates of the straight line are calculated separately. Then, the area inside the straight line 105 close to the inside is defined as the character area.

【0184】また、図32においては、矢印で示す直線
106は上辺の枠線に対応し、もう1つの矢印で示す直
線107は文字“7”の一部分を表す線分に対応する。
これらの直線106、107は互いに平行であり、二重
であるように見えるが、直線107が左の縦枠線まで達
していないので、二重線ではないと判断する。
Further, in FIG. 32, the straight line 106 indicated by an arrow corresponds to the frame line of the upper side, and the straight line 107 indicated by another arrow corresponds to a line segment representing a part of the character "7".
These straight lines 106 and 107 are parallel to each other and appear to be double lines, but since the straight line 107 does not reach the left vertical frame line, it is determined that they are not double lines.

【0185】このように、2本の直線が部分的に二重線
を構成している場合は、実際は二重の枠線ではない場合
もあり得るため、文字領域内の端から端まで存在する直
線が2本ある場合にのみ二重線とする。縦直線について
も同様である。こうして、文字領域の内側に、枠線と同
じくらいの長さの直線が枠線に接近して存在する場合、
枠線と内側の直線とで二重線を構成するとみなされ、罫
線の情報をより正確に記述することが可能となる。
As described above, when the two straight lines partially form a double line, it may not be a double frame line in practice, and therefore, the line exists within the character area from end to end. Double lines only if there are two straight lines. The same applies to the vertical straight line. Thus, if there is a straight line that is as long as the frame line inside the character area and is close to the frame line,
Since it is considered that the frame line and the inner straight line form a double line, it becomes possible to describe the ruled line information more accurately.

【0186】また、処理P21において、大きさがある
一定値より小さい矩形範囲(文字領域)が複数(一定数
以上)横並びに存在する場合には、それらをひとまとま
りにして、文字補完処理P22に渡す領域とする。
Further, in the process P21, when a plurality of rectangular regions (character regions) whose sizes are smaller than a certain fixed value are present side by side (a certain number or more) side by side, they are grouped together and the character completion process P22 is performed. The area to pass.

【0187】文字補完処理P22においては、処理対象
の領域内に存在する文字の大きさの平均値を使用するた
め、領域が小さく、文字が少ないと処理精度が落ちる。
例えば、図33に示すように、文字領域117内の文字
“7”が右辺と接触している場合、この領域117を単
独で処理P22の文字領域とすると、その領域内に他の
文字が存在しないため、文字の大きさの平均値が算出で
きなくなる。
In the character complementing process P22, since the average value of the sizes of the characters existing in the region to be processed is used, the processing accuracy decreases when the region is small and the number of characters is small.
For example, as shown in FIG. 33, when the character “7” in the character area 117 is in contact with the right side, if this area 117 is set as the character area of the process P22 alone, another character exists in that area. Therefore, the average value of the character size cannot be calculated.

【0188】そこで、横に並んだ同じような大きさの複
数の文字領域111、112、113、114、11
5、116、117を、点線で示すように1つの文字領
域118にまとめて、これを文字補完処理P22の処理
領域として渡すことにする。文字領域の情報としては、
横罫線および縦罫線の数と位置、文字の存在する領域を
表す矩形座標等が渡される。また、複数の小さな文字領
域が縦に並んでいる場合も同様である。
Therefore, a plurality of character areas 111, 112, 113, 114, 11 of the same size arranged side by side are arranged.
5, 116, and 117 are put together in one character area 118 as shown by the dotted line, and this is passed as the processing area of the character complementing process P22. As the information of the character area,
The number and position of horizontal ruled lines and vertical ruled lines, rectangular coordinates indicating the area where the character exists, and the like are passed. The same applies when a plurality of small character areas are arranged vertically.

【0189】このように、文字領域の大きさが一定値に
満たないものが一定数以上並んでいた場合は、それらを
まとめて一つの領域であるとみなして、文字補完処理P
22に渡すデータの作成を行うことで、処理P22の処
理精度が向上する。
As described above, when a certain number or more of character areas are less than a certain size, they are collectively regarded as one area, and the character completion process P is performed.
By creating the data to be passed to 22, the processing accuracy of the process P22 is improved.

【0190】また、図34に示すように、表121の内
部に独立して別の表122が存在する場合には、まず点
線で示すように、外側の表121の文字領域が抽出され
る。しかし、内側の表122に関しては、表121の枠
線に接触していないため、入れ子構造処理部17により
入れ子状態ではないと判断され、文字パターンとみなさ
れてしまう。
Further, as shown in FIG. 34, when another table 122 exists independently inside the table 121, the character area of the outer table 121 is first extracted as indicated by the dotted line. However, since the inner table 122 is not in contact with the frame line of the table 121, the nested structure processing unit 17 determines that it is not in the nested state, and regards it as a character pattern.

【0191】そこで、処理21において、ある文字領域
中に一定値以上の大きさを持つ部分パターンが存在した
場合には、その部分パターンを対象として、図2の罫線
抽出処理を再帰的に行うことにする。そして、その部分
パターンから文字領域が1つ以上抽出されれば、そのパ
ターンを表とみなす。この結果、図35に点線で示すよ
うに、表122の文字領域が抽出される。
Therefore, in the process 21, if a partial pattern having a size larger than a certain value exists in a certain character area, the ruled line extracting process of FIG. 2 is recursively performed on the partial pattern. To If one or more character areas are extracted from the partial pattern, the pattern is regarded as a table. As a result, the character area of the table 122 is extracted as shown by the dotted line in FIG.

【0192】このように、注目パターンの外接矩形の内
側に位置するパターンのうち、一定値以上の大きさを持
ち、枠線を構成しなかったパターンに関しては、再度、
このパターンを表の候補とみなして、一連の罫線抽出処
理を行うことにより、表の内部に独立して小さい表が存
在する場合にも処理が可能となる。
As described above, among the patterns located inside the circumscribed rectangle of the pattern of interest, the patterns having the size of a certain value or more and not forming the frame line are again
By treating this pattern as a table candidate and performing a series of ruled line extraction processing, it is possible to perform processing even when a small table exists independently inside the table.

【0193】このとき、内側の表の処理を行うか否かま
たは再帰処理の繰り返し回数を、外部から与えられた情
報または処理の内部で作成した情報に基づいて変更する
ことができるようにしておく。このように、再帰処理の
指定を変更可能とすることで、処理対象とする表の構造
をあらかじめ特定しておくこともでき、また、特定しな
いこともできる。
At this time, whether or not to process the inner table or the number of repetitions of the recursive process can be changed based on the information given from the outside or the information created inside the process. . As described above, by making it possible to change the specification of the recursive process, the structure of the table to be processed can be specified in advance, or not specified.

【0194】外部から与えられた情報とは、ユーザから
入力される特定の指示を意味する。処理の内部で作成し
た情報としては、例えば、外側の表全体または対象とし
ている文字領域のパターンの大きさに一定の比率を乗じ
て算出したしきい値を用いる。そして、このしきい値よ
り小さな内側のパターンを、再帰処理の対象から除外す
る。
The information given from the outside means a specific instruction inputted by the user. As the information created inside the process, for example, a threshold value calculated by multiplying the size of the pattern of the entire outer table or the target character area by a certain ratio is used. Then, the inner pattern smaller than this threshold is excluded from the recursive processing target.

【0195】また、処理21において、抽出された文字
領域の大きさによって、以後の処理対象とみなすか否か
を決定するようにしてもよい。例えば、ある一定以下の
大きさの文字領域に関しては、文字認識等の処理対象か
ら除外することで、文字上の線分を誤って直線として抽
出した場合であっても、それを罫線候補から外すことが
可能となる。
Further, in the process 21, it may be determined whether or not to consider it as a subsequent process target depending on the size of the extracted character area. For example, with respect to a character area of a certain size or less, by excluding it from a processing target such as character recognition, even if a line segment on a character is accidentally extracted as a straight line, it is excluded from the ruled line candidates. It becomes possible.

【0196】さらに、入れ子構造処理部17の処理P1
8、P19についても、次のように変更することで、処
理の柔軟性が高められる。今、抽出された文字領域の内
部が入れ子状態となっている場合を一重の入れ子と呼
び、一重の入れ子を構成している文字領域の中にさらに
入れ子状態が存在している場合には、それを二重の入れ
子と呼ぶことにする。
Further, the process P1 of the nested structure processing section 17
Also regarding 8 and P19, the flexibility of processing can be improved by changing as follows. Now, when the inside of the extracted character area is in a nested state, it is called single nesting, and when there is a further nested state in the character area that constitutes the single nesting, Will be called double nesting.

【0197】このとき、入れ子構造処理部17は、外部
から与えられた情報または処理の内部で作成した情報に
より、何重の入れ子までを処理対象とするかを変更する
ことができるようにしておく。これにより、処理対象と
する表の構造をあらかじめ特定しておくこともでき、ま
た、特定しないこともできる。
At this time, the nesting structure processing section 17 can change the number of nests to be processed by the information given from the outside or the information created inside the processing. . As a result, the structure of the table to be processed can be specified in advance or not specified.

【0198】外部から与えられた情報については、上述
した通りである。処理の内部で作成した情報としては、
例えば、外側の表のパターンの大きさに一定の比率を乗
じて算出したしきい値を用いる。そして、このしきい値
より小さな文字領域を、入れ子処理の対象から除外す
る。
The information given from the outside is as described above. As the information created inside the process,
For example, a threshold value calculated by multiplying the size of the pattern on the outside table by a fixed ratio is used. Then, a character area smaller than this threshold is excluded from the nesting processing target.

【0199】図36は、文字領域の枠線に接触している
接触文字の例を示している。例えば、このような接触文
字を含む文字領域の場合、処理P21において、以下の
ような情報が生成され、文字補完処理P22に渡され
る。
FIG. 36 shows an example of a touching character touching the frame line of the character area. For example, in the case of a character area including such contact characters, the following information is generated in process P21 and passed to the character complement process P22.

【0200】(a)接触位置:文字領域の4辺のうち、
文字の接触している辺(上下左右)を表す情報。 (b)処理範囲:接触している方向に文字領域を拡大し
て得られる矩形範囲の座標情報。
(A) Contact position: Of the four sides of the character area,
Information that indicates the sides (top, bottom, left, and right) of the characters that are in contact. (B) Processing range: coordinate information of a rectangular range obtained by enlarging the character area in the contact direction.

【0201】(c)縦罫線数:処理範囲内に存在する縦
罫線の数。 (d)縦罫線情報:罫線番号、罫線を構成する縦線分の
数、それらの縦線分の情報。縦線分の情報には、線分の
座標情報、実線や点線等の種別、仮想的に作成された線
分かどうかを示すフラグ情報等が含まれる。
(C) Number of vertical ruled lines: The number of vertical ruled lines existing within the processing range. (D) Vertical ruled line information: Ruled line number, the number of vertical line segments that form a ruled line, and information about those vertical line segments. The information of the vertical line segment includes coordinate information of the line segment, types of solid line, dotted line, and the like, flag information indicating whether the line segment is a virtually created line segment, and the like.

【0202】(e)横罫線数:処理範囲内に存在する横
罫線の数。 (f)横罫線情報:罫線番号、罫線を構成する横線分の
数、それらの横線分の情報。横線分の情報の内容も縦線
分の情報と同様である。
(E) Number of horizontal ruled lines: The number of horizontal ruled lines existing in the processing range. (F) Horizontal ruled line information: Ruled line number, the number of horizontal line segments forming the ruled line, and information about those horizontal line segments. The information content of the horizontal line segment is the same as that of the vertical line segment information.

【0203】(g)行番号:文字領域の属する行の番
号。 (h)列番号:文字領域の属する列の番号。 (i)入れ子フラグ:文字領域が入れ子状態を構成する
か否かを表すフラグ情報。
(G) Line number: The line number to which the character area belongs. (H) Column number: The number of the column to which the character area belongs. (I) Nesting flag: Flag information indicating whether or not the character area forms a nested state.

【0204】(j)R付き罫線フラグ:文字領域にR付
き罫線が存在するか否かを表すフラグ情報。 図36に点線で示した領域131、132、133、1
34は、対応する各文字領域の処理範囲を表している。
領域131は左接触の場合に該当し、領域132は下接
触の場合に該当し、領域133は上下接触の場合に該当
し、領域134は上接触の場合に該当する。
(J) Ruled line with R: Flag information indicating whether a ruled line with R exists in the character area. Areas 131, 132, 133, and 1 indicated by dotted lines in FIG.
Reference numeral 34 represents the processing range of each corresponding character area.
The area 131 corresponds to the case of left contact, the area 132 corresponds to the case of bottom contact, the area 133 corresponds to the case of vertical contact, and the area 134 corresponds to the case of upper contact.

【0205】このうち、領域131を拡大すると、図3
7のようになり、対応する文字領域の情報は、次のよう
になる。 (a)接触位置:左 (b)処理範囲:領域131の座標情報。 (c)縦罫線数:1 (d)縦罫線情報:縦線分の数は2。縦線分の情報は、
図37の線分矩形135、136の情報。 (e)横罫線数:0 (f)横罫線情報:なし。 (g)行番号:2 (h)列番号:1 (i)入れ子フラグ:0(入れ子ではない) (j)R付き罫線フラグ:0(R付き罫線ではない) 文字領域が接触文字を含まない場合には、上述の情報か
ら(a)、(c)、(d)、(e)、(f)の情報が省
かれる。また、(b)の処理範囲は文字領域の座標情報
に一致する。
Of these, when the area 131 is enlarged, FIG.
7, and the information of the corresponding character area is as follows. (A) Contact position: left (b) Processing range: coordinate information of the area 131. (C) Number of vertical ruled lines: 1 (d) Vertical ruled line information: The number of vertical line segments is 2. The vertical line segment information is
Information on the line segment rectangles 135 and 136 in FIG. (E) Number of horizontal ruled lines: 0 (f) Horizontal ruled line information: None. (G) Row number: 2 (h) Column number: 1 (i) Nesting flag: 0 (not nesting) (j) Ruled line flag with R: 0 (not ruled line with R) Character area does not include contact characters In this case, the information (a), (c), (d), (e), (f) is omitted from the above information. The processing range of (b) matches the coordinate information of the character area.

【0206】図38は、このような文字領域の情報の作
成処理のフローチャートである。処理が開始されると、
罫線抽出装置は、まず、矩形範囲の4辺の罫線を構成す
る線分矩形を抽出し、それらの座標値を元に、罫線で囲
まれた内側の矩形領域の座標値を求める(ステップS7
1)。そして、得られた座標値のすぐ内側(1画素また
は2画素分程度内側)に、画像パターンが存在するかど
うかを調べる(ステップS72)。
FIG. 38 is a flow chart of a process for creating such character area information. When the process starts
The ruled line extraction device first extracts line segment rectangles that form the ruled lines on the four sides of the rectangular range, and determines the coordinate values of the inner rectangular area surrounded by the ruled lines based on the coordinate values thereof (step S7).
1). Then, it is checked whether or not the image pattern exists immediately inside (about 1 pixel or 2 pixels inside) of the obtained coordinate value (step S72).

【0207】矩形領域のすぐ内側に画像パターンが存在
すれば、次に、縮小前の原画像である入力パターン11
を処理対象として(ステップS73)、対応する矩形領
域周辺の画素を縦横両方向に投影し、画素の投影値に基
づいて直線の位置を検出する(ステップS74)。そし
て、一定距離より接近して存在する2本の直線があるか
どうかを判定し(ステップS75)、そのような直線の
組があれば、次に、それらの直線の長さがほぼ等しいか
どうかを判定する(ステップS76)。
If the image pattern exists just inside the rectangular area, the input pattern 11 which is the original image before reduction is next generated.
Is processed (step S73), pixels around the corresponding rectangular area are projected in both vertical and horizontal directions, and the position of a straight line is detected based on the projection value of the pixel (step S74). Then, it is determined whether or not there are two straight lines existing closer than a certain distance (step S75), and if there is such a set of straight lines, then whether or not the lengths of these straight lines are substantially equal to each other. Is determined (step S76).

【0208】それらが一定の許容範囲内で同じ長さと判
定されれば、2本の直線をともに罫線とし(ステップS
77)、同じ長さと判定されなければ、長い方の直線の
みを罫線とする(ステップS78)。そして、縦横の2
本の罫線が交差する角部の矩形領域内に画像パターンが
存在するかどうかを調べる(ステップS79)。ステッ
プS75において、接近して存在する2本の直線がなけ
れば、そのままステップS79の判定を行う。
If it is determined that they have the same length within a certain allowable range, the two straight lines are both ruled lines (step S
77), if not determined to be the same length, only the longer straight line is set as the ruled line (step S78). And the horizontal and vertical 2
It is checked whether or not the image pattern is present in the rectangular area of the corner where the ruled lines of the book intersect (step S79). If there are no two straight lines that are close to each other in step S75, the determination in step S79 is performed as it is.

【0209】角部に画像パターンが存在すれば、R付き
罫線の可能性があることを示す情報を、文字補完処理P
22へ渡す情報に加える(ステップS80)。ここで
は、上述のR付き罫線フラグを立てる(値を1に設定す
る)ことにより、その情報が付加される。そして、文字
補完処理P22へ渡す情報として、罫線の位置、文字パ
ターンと罫線が接触している方向等の情報を記憶する
(ステップS81)。ここで記憶される情報は、上述の
(a)〜(j)の情報に相当する。
If an image pattern exists at the corner, information indicating that there is a possibility of a ruled line with R is added to the character complementing process P.
It is added to the information to be passed to 22 (step S80). Here, the information is added by setting the R-ruled line flag described above (setting the value to 1). Then, as information to be passed to the character complementing process P22, information such as the position of the ruled line, the direction in which the character pattern and the ruled line are in contact with each other is stored (step S81). The information stored here corresponds to the above information (a) to (j).

【0210】ステップS79において、角部に画像パタ
ーンが存在しなければ、そのままステップS81の処理
を行う。そして、すべての文字領域について処理を終え
たかどうかを判定する(ステップS82)。ステップS
72において、矩形領域のすぐ内側に画像パターンが存
在しなければ、そのままステップS82の判定を行う。
そして、未処理の文字領域が残っていればステップS7
1以降の処理を繰り返し、文字領域が残っていなければ
処理を終了する。
In step S79, if there is no image pattern at the corner, the process of step S81 is performed as it is. Then, it is determined whether the processing has been completed for all the character areas (step S82). Step S
In 72, if there is no image pattern just inside the rectangular area, the determination in step S82 is performed as it is.
Then, if an unprocessed character area remains, step S7.
The processing from 1 onward is repeated, and if there is no character area remaining, the processing ends.

【0211】以上説明したように、本発明では、実際に
様々な帳票の処理を行う過程で検出された問題に対処す
ることで、処理精度の向上が図られる。ただし、矩形範
囲で表現できない、図39のような形状の枠図形の処理
方法については今後の課題である。
As described above, according to the present invention, the processing accuracy is improved by addressing the problems detected in the process of actually processing various forms. However, a method for processing a frame graphic having a shape as shown in FIG. 39, which cannot be expressed in the rectangular range, is a future subject.

【0212】本発明の罫線抽出技術は、手書き文字認識
装置だけでなく、記号や文字を含む広い意味での図形と
直線が重なったパターンから、その図形だけを切り出す
技術に適用される。例えば、印刷文字認識装置、図面認
識における文字、記号等のパターンの切り出し、および
画像中の罫線と物体、図形、文字等の接触部分の分離に
適用可能である。さらに、電子ファイリングシステムに
おけるファイルの管理情報を画像から抽出する際にも適
用可能である。
The ruled line extraction technique of the present invention is applied not only to a handwritten character recognition device, but also to a technique of cutting out only a figure including a symbol or a character in a broad sense from a pattern in which a straight line overlaps. For example, it can be applied to a printing character recognition device, cutting out patterns of characters, symbols, etc. in recognition of drawings, and separating ruled lines in an image and contact portions of objects, figures, characters and the like. Further, it can be applied when extracting file management information in an electronic filing system from an image.

【0213】また、直線や線分を表す領域の形状は必ず
しも矩形でなくてもよく、直線または曲線により囲まれ
た任意の形状の領域を用いることができる。この場合、
用いる形状に応じて、直線や線分の位置、高さ、および
幅、それらの間の距離等を適当に定義すれば、図2と同
様の処理を行うことができる。
Further, the shape of the area representing a straight line or a line segment is not necessarily rectangular, and an area of any shape surrounded by a straight line or a curved line can be used. in this case,
If the positions, heights, and widths of straight lines and line segments, the distance between them, and the like are appropriately defined according to the shape to be used, the same processing as in FIG. 2 can be performed.

【0214】[0214]

【発明の効果】本発明によれば、かすれや潰れのある画
質の良くない画像から、より正確に罫線を抽出すること
が可能になる。したがって、枠線や文字領域の抽出を高
精度に行うことができる。また、抽出された罫線の状態
を表す情報や文字補完処理のための詳細情報等を自動的
に生成することができ、後続する処理の精度が向上す
る。
According to the present invention, it is possible to more accurately extract ruled lines from an image with poor image quality that has a blur or a blur. Therefore, the frame line and the character area can be extracted with high accuracy. Further, it is possible to automatically generate the information indicating the state of the extracted ruled line, the detailed information for the character complementing process, etc., and the accuracy of the subsequent process is improved.

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

【図1】本発明の罫線抽出装置の原理図である。FIG. 1 is a principle diagram of a ruled line extraction device of the present invention.

【図2】文字認識装置の機能ブロック図である。FIG. 2 is a functional block diagram of a character recognition device.

【図3】情報処理装置の構成図である。FIG. 3 is a configuration diagram of an information processing device.

【図4】ラベリング処理画像を示す図である。FIG. 4 is a diagram showing a labeling-processed image.

【図5】同じラベルに属するパターンを示す図である。FIG. 5 is a diagram showing patterns belonging to the same label.

【図6】連結パターン抽出処理のフローチャートであ
る。
FIG. 6 is a flowchart of a connection pattern extraction process.

【図7】マスク処理画像を示す図である。FIG. 7 is a diagram showing a mask processed image.

【図8】マスク処理のフローチャートである。FIG. 8 is a flowchart of mask processing.

【図9】線分検出処理を示す図である。FIG. 9 is a diagram showing line segment detection processing.

【図10】線分統合処理を示す図である。FIG. 10 is a diagram showing line segment integration processing.

【図11】直線検出処理のフローチャートである。FIG. 11 is a flowchart of straight line detection processing.

【図12】直線探索処理を示す図である。FIG. 12 is a diagram showing a line search process.

【図13】探索が終了した第1の直線を示す図である。FIG. 13 is a diagram showing a first straight line after the search.

【図14】線分作成処理を示す図である。FIG. 14 is a diagram showing a line segment creating process.

【図15】探索が終了した第2の直線を示す図である。FIG. 15 is a diagram showing a second straight line after the search.

【図16】線分伸張処理を示す図である。FIG. 16 is a diagram showing line segment expansion processing.

【図17】直線探索処理のフローチャートである。FIG. 17 is a flowchart of a straight line search process.

【図18】2点破線を示す図である。FIG. 18 is a diagram showing a two-dot broken line.

【図19】大きな点から成る点線を示す図である。FIG. 19 is a diagram showing a dotted line composed of large dots.

【図20】第1の点線検出処理を示す図である。FIG. 20 is a diagram showing a first dotted line detection process.

【図21】第2の点線検出処理を示す図である。FIG. 21 is a diagram showing a second dotted line detection process.

【図22】点線検出処理のフローチャートである。FIG. 22 is a flowchart of a dotted line detection process.

【図23】第1の直線統合処理を示す図である。FIG. 23 is a diagram showing a first straight line integration process.

【図24】第2の直線統合処理を示す図である。FIG. 24 is a diagram showing second straight line integration processing.

【図25】第3の直線統合処理を示す図である。FIG. 25 is a diagram showing a third straight line integration process.

【図26】第4の直線統合処理を示す図である。FIG. 26 is a diagram showing a fourth straight line integration process.

【図27】直線統合処理のフローチャートである。FIG. 27 is a flowchart of straight line integration processing.

【図28】直線伸張処理のフローチャートである。FIG. 28 is a flowchart of a linear expansion process.

【図29】矩形表現処理を示す図である。FIG. 29 is a diagram showing a rectangle representation process.

【図30】R付き帳票の一部を示す図である。FIG. 30 is a diagram showing a part of a form with R.

【図31】二重線を示す図である。FIG. 31 is a diagram showing a double line.

【図32】二重線でない場合を示す図である。FIG. 32 is a diagram showing a case where the line is not a double line.

【図33】文字補完の処理領域を示す図である。FIG. 33 is a diagram showing a processing area for character complement.

【図34】外側の表の文字領域を示す図である。FIG. 34 is a diagram showing a character area of an outer table.

【図35】内側の表の文字領域を示す図である。FIG. 35 is a diagram showing a character area of an inner table.

【図36】接触文字を示す図である。FIG. 36 is a diagram showing contact characters.

【図37】接触文字を含む文字領域を示す図である。FIG. 37 is a diagram showing a character area including a contact character.

【図38】文字補完処理へ渡す情報の作成処理のフロー
チャートである。
FIG. 38 is a flowchart of a process of creating information to be passed to the character complement process.

【図39】矩形表現のできない枠を示す図である。[Fig. 39] Fig. 39 is a diagram illustrating a frame that cannot be represented by a rectangle.

【図40】単純な表形式枠を示す図である。FIG. 40 is a diagram showing a simple tabular frame.

【図41】複雑な表形式枠を示す図である。FIG. 41 is a diagram showing a complicated tabular frame.

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

1 パターン抽出手段 2−1、2−2、2−3、2−4、2−5 判定手段 3−1 点線抽出手段 3−2 直線抽出手段 3−3 線抽出手段 4−1、4−4 補正手段 4−2、4−5、4−6 付加手段 4−3 作成手段 4−7 生成手段 5 表抽出手段 6 枠線抽出手段 7 領域抽出手段 8 入力手段 9 変更手段 11 入力パターン 12 縮小処理部 13 連結パターン抽出部 14 マスク処理部 15 横直線抽出部 16 縦直線抽出部 17 入れ子構造処理部 31 CPU 32 メモリ 33 入力装置 34 出力装置 35 外部記憶装置 36 媒体駆動装置 37 ネットワーク接続装置 38 光電変換装置 39 バス 40 可搬記録媒体 40′ データベース 41、42、43、44、45、46、47、48、4
9 パターン 51、51′、71、72、73、74、75、76、
77、78、91、92、93 直線矩形 81、82、83、84、85、86、87、88、1
04、105、106、107 直線 52、55、56、57、58、59、57′、5
9′、94、95、135、136 線分矩形 53、54、60、61 探索終了点 101、102 領域 103 角部 111、112、113、114、115、116、1
17、118 文字領域 121、122 表 131、132、133、134 処理範囲
1 pattern extraction means 2-1, 2-2, 2-3, 2-4, 2-5 determination means 3-1 dotted line extraction means 3-2 straight line extraction means 3-3 line extraction means 4-1 and 4-4 Correction means 4-2, 4-5, 4-6 Addition means 4-3 Creation means 4-7 Generation means 5 Table extraction means 6 Frame line extraction means 7 Area extraction means 8 Input means 9 Change means 11 Input pattern 12 Reduction processing Part 13 Connection pattern extractor 14 Mask processor 15 Horizontal straight line extractor 16 Vertical straight line extractor 17 Nested structure processor 31 CPU 32 Memory 33 Input device 34 Output device 35 External storage device 36 Medium drive device 37 Network connection device 38 Photoelectric conversion Device 39 Bus 40 Portable recording medium 40 'Database 41, 42, 43, 44, 45, 46, 47, 48, 4
9 patterns 51, 51 ', 71, 72, 73, 74, 75, 76,
77, 78, 91, 92, 93 Linear rectangles 81, 82, 83, 84, 85, 86, 87, 88, 1
04, 105, 106, 107 Straight lines 52, 55, 56, 57, 58, 59, 57 ', 5
9 ′, 94, 95, 135, 136 Line segment rectangles 53, 54, 60, 61 Search end points 101, 102 Region 103 Corners 111, 112, 113, 114, 115, 116, 1
17,118 Character area 121,122 Table 131,132,133,134 Processing range

フロントページの続き (56)参考文献 特開 平2−266479(JP,A) 特開 平2−210586(JP,A) 特開 平1−173178(JP,A) 特開 平5−233873(JP,A) 特開 平5−290112(JP,A) 特開 平2−232780(JP,A) 特開 平6−309498(JP,A) 特開 平8−262974(JP,A) 特開 平3−250278(JP,A) 特開 平1−269185(JP,A) 特開 平4−142679(JP,A) 特開 平9−309498(JP,A) 特開 平1−119875(JP,A) 特開 平1−113883(JP,A) 特開 平3−122773(JP,A) 特開 平8−115421(JP,A) 特開 平8−221506(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 11/60 G06F 17/21 G06T 7/60 G06K 9/00 Continuation of front page (56) Reference JP-A-2-266479 (JP, A) JP-A-2-210586 (JP, A) JP-A-1-173178 (JP, A) JP-A-5-233873 (JP , A) JP 5-290112 (JP, A) JP 2-232780 (JP, A) JP 6-309498 (JP, A) JP 8-262974 (JP, A) JP 3-250278 (JP, A) JP-A-1-269185 (JP, A) JP-A-4-142679 (JP, A) JP-A-9-309498 (JP, A) JP-A-1-119875 (JP, A) A) Japanese Unexamined Patent Publication No. 1-113883 (JP, A) Japanese Unexamined Patent Publication No. 3-122773 (JP, A) Japanese Unexamined Patent Publication No. 8-115421 (JP, A) Japanese Unexamined Patent Publication No. 8-221506 (JP, A) (58) Investigation Areas (Int.Cl. 7 , DB name) G06T 11/60 G06F 17/21 G06T 7/60 G06K 9/00

Claims (22)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力画像から画素の連結情報に基づいて
直線パターンを抽出する直線抽出手段と、 前記直線パターンを抽出する際に該直線パターンに対し
て施された処理を表す情報を、該直線パターンの情報に
付加する付加手段とを備えることを特徴とする罫線抽出
装置。
1. A straight line extracting means for extracting a straight line pattern from an input image based on connection information of pixels, and information indicating processing performed on the straight line pattern when the straight line pattern is extracted, A ruled line extraction device comprising: an addition unit that adds the pattern information.
【請求項2】 前記付加手段は、前記直線パターンが複
数の直線パターンを統合して生成されたことを表す情報
を、前記直線パターンの情報に付加することを特徴とす
請求項1記載の罫線抽出装置。
Wherein said adding means, the information indicating that the line pattern is generated by integrating a plurality of linear patterns, borders according to claim 1, characterized in that added to the information of the linear pattern Extractor.
【請求項3】 前記付加手段は、前記直線パターンに伸
張処理が施されていることを表す情報を、前記直線パタ
ーンの情報に付加することを特徴とする請求項1記載
罫線抽出装置。
3. The ruled line extracting apparatus according to claim 1 , wherein the adding means adds information indicating that the straight line pattern has been subjected to expansion processing to the information of the straight line pattern.
【請求項4】 入力画像から画素の連結情報に基づいて
直線パターンを抽出する直線抽出手段と、 前記直線パターンを表す領域に仮想的に線分パターンを
作成する作成手段と、 前記直線パターンを構成する線
分パターンの大きさを変更する補正手段と、 前記直線パターンを表す領域の中で、該直線パターンを
構成する線分パターンが存在していない部分の大きさに
よって、新たに線分パターンを作成するか、周囲の線分
パターンの大きさを変更するかを判定する判定手段とを
備えることを特徴とする罫線抽出装置。
Configuration and the straight line extracting means for extracting a linear pattern from wherein the input image based on the connection information of the pixel, and generation means for generating a virtually line pattern in the region representing the linear pattern, the straight line pattern And a correction unit for changing the size of the line segment pattern, and a line segment pattern is newly created according to the size of a portion of the region representing the straight line pattern where the line segment pattern forming the straight line pattern does not exist. A ruled line extraction device comprising: a determination unit that determines whether to create or change the size of a surrounding line segment pattern.
【請求項5】 入力画像から画素の連結情報に基づいて
枠線パターンを抽出する枠線抽出手段と、 縦横の枠線パターンで囲まれた矩形領域を抽出する領域
抽出手段と、 前記矩形領域の角の部分が特定の形状であるかどうかを
判定する判定手段と、 前記特定の形状である可能性を
表す情報を、補完処理のための情報に付加する付加手段
とを備えることを特徴とする罫線抽出装置。
5. A frame line extracting means for extracting a frame line pattern from an input image based on pixel connection information, an area extracting means for extracting a rectangular area surrounded by vertical and horizontal frame line patterns, and the rectangular area It is characterized by further comprising: determination means for determining whether or not the corner portion has a specific shape; and addition means for adding the information indicating the possibility of the specific shape to the information for the complementary processing. Ruled line extraction device.
【請求項6】 前記判定手段は、前記矩形領域の角の部
分にいずれかの枠線パターンと接するパターンが存在す
る場合に、該矩形領域の角が丸角状態である可能性があ
ると判定することを特徴とする請求項5記載の罫線抽出
装置。
Wherein said determining means determines if the pattern in contact with any of the border pattern in the portion of the corner of the rectangular region is present, the corners of the rectangular region is likely to be round angle state The ruled line extracting device according to claim 5, wherein:
【請求項7】 入力画像から画素の連結情報に基づいて7. Based on connection information of pixels from an input image
枠線パターンを抽出する枠線抽出手段と、A frame line extraction means for extracting a frame line pattern, 縦横の枠線パターンで囲まれた矩形領域を抽出する領域Area to extract rectangular area surrounded by vertical and horizontal frame pattern
抽出手段と、Extraction means, 前記矩形領域の内側に、前記枠線と同じくらいの長さのInside the rectangular area, of the same length as the frame
直線パターンが該枠線に接近して存在する場合に、二重Double if a straight line pattern exists close to the border
線が存在すると判定する判定手段と、Determination means for determining that a line exists, 前記二重線が存在すると判定された場合、該直線パターIf it is determined that the double line exists, the straight line pattern
ンを含まない領域を補完処理の処理範囲とするように該Area that does not include
補完処理のための情報を生成する生成手段とを備えるこAnd a generating means for generating information for the complementary processing.
とを特徴とする罫線抽出装置。Ruled line extraction device characterized by and.
【請求項8】 入力画像から画素の連結情報に基づいて
部分パターンを抽出するパターン抽出手段と、 表の候補となる部分パターンを表パターンとして抽出す
る表抽出手段と、 前記表パターンから枠線パターンを抽出する枠線抽出手
段と、 前記表パターンの外接矩形の内側に位置する一定以上の
大きさの部分パターンのうち、枠線パターンの一部とみ
なされなかった部分パターンを、新たな表パターンとし
て前記枠線抽出手段に入力する入力手段とを備えること
を特徴とする罫線抽出装置。
8. A pattern extracting means for extracting a partial pattern from an input image based on pixel connection information, a table extracting means for extracting a partial pattern as a table candidate as a table pattern, and a frame line pattern from the table pattern. A frame line extracting means for extracting a partial pattern which is located inside the circumscribing rectangle of the table pattern and has a certain size or more, and which is not regarded as a part of the frame line pattern is a new table pattern. The ruled line extracting apparatus further comprises: input means for inputting to the frame line extracting means.
【請求項9】 前記枠線抽出手段および入力手段による
再帰処理の繰り返し回数を、外部から与えられた情報ま
たは内部で作成された情報に基づいて変更する変更手段
をさらに備えることを特徴とする請求項8記載の罫線抽
出装置。
9. A number of iterations of the recursive process by the frame line extracting means and the input means, according to, further comprising a changing means for changing, based on information created by the internal information or given from the outside Item 8. The ruled line extraction device according to item 8 .
【請求項10】 前記入力手段は、前記部分パターンの
大きさに基づいて、該部分パターンを前記新たな表パタ
ーンとみなすかどうかを決定することを特徴とする請求
項8記 の罫線抽出装置。
Wherein said input means, wherein said partial pattern based on the size of, and determines whether the partial pattern regarded as the new table pattern
8. Symbol mounting the ruled-line extraction device.
【請求項11】 入力画像から画素の連結情報に基づい
て表の候補となる表パターンを抽出する表抽出手段と、 前記表パターンから枠線パターンを抽出する枠線抽出手
段と、 縦横の枠線パターンで囲まれた矩形領域を抽出する領域
抽出手段と、 入れ子状態になっている矩形領域を、新たな表パターン
として前記枠線抽出手段に入力する入力手段と、 前記枠線抽出手段および入力手段による再帰処理の繰り
返し回数を、外部から与えられた情報または内部で作成
された情報に基づいて変更する変更手段とを備えること
を特徴とする罫線抽出装置。
11. A table extracting means for extracting a table pattern which is a table candidate based on pixel connection information from an input image, a frame line extracting means for extracting a frame line pattern from the table pattern, and vertical and horizontal frame lines. Area extraction means for extracting a rectangular area surrounded by a pattern; input means for inputting a nested rectangular area into the frame line extraction means as a new table pattern; and the frame line extraction means and input means A ruled line extracting device, comprising: a changing unit that changes the number of times the recursive process is repeated based on information provided from outside or information created inside.
【請求項12】 前記入力手段は、前記矩形領域の大き
さに基づいて、該矩形領域を前記新たな表パターンとみ
なすかどうかを決定することを特徴とする請求項11記
の罫線抽出装置。
12. The input means, based on the size of the rectangular region, according to claim 11 SL, characterized by determining whether the said rectangular region regarded as the new table pattern
The placing of a ruled line extraction device.
【請求項13】 コンピュータのためのプログラムを記
録した記録媒体であって、 入力画像から画素の連結情報に基づいて直線パターンを
抽出する機能と、 前記直線パターンを抽出する際に該直線パターンに対し
て施された処理を表す情報を、該直線パターンの情報に
付加する機能とを前記コンピュータに実現させるための
プログラムを記録したコンピュータ読み取り可能な記録
媒体。
13. A recording medium for recording a program for a computer, which has a function of extracting a linear pattern from an input image based on connection information of pixels, and a function for extracting the linear pattern when extracting the linear pattern. A computer-readable recording medium in which is recorded a program for causing the computer to realize a function of adding information indicating the applied processing to the information of the linear pattern.
【請求項14】 コンピュータのためのプログラムを記
録した記録媒体であって、 入力画像から画素の連結情報に基づいて直線パターンを
抽出する機能と、 前記直線パターンを表す領域に仮想的に線分パターンを
作成する機能と、 前記直線パターンを構成する線分パターンの大きさを変
更する機能と、 前記直線パターンを表す領域の中で、該直線パターンを
構成する線分パターンが存在していない部分の大きさに
よって、新たに線分パターンを作成するか、周囲の線分
パターンの大きさを変更するかを判定する機能とを前記
コンピュータに実現させるためのプログラムを記録した
コンピュータ読み取り可能な記録媒体。
14. A recording medium for recording a program for a computer, the function of extracting a straight line pattern from an input image based on connection information of pixels, and a virtual line segment pattern in an area representing the straight line pattern. And a function of changing the size of a line segment pattern forming the straight line pattern, and a portion of the area representing the straight line pattern where the line segment pattern forming the straight line pattern does not exist. A computer-readable recording medium recording a program for causing the computer to realize a function of determining whether to newly create a line segment pattern or change the size of a surrounding line segment pattern according to the size.
【請求項15】 コンピュータのためのプログラムを記
録した記録媒体であって、 入力画像から画素の連結情報に基づいて枠線パターンを
抽出する機能と、 縦横の枠線パターンで囲まれた矩形領域を抽出する機能
と、 前記矩形領域の角の部分が特定の形状であるかどうかを
判定する機能と、 前記特定の形状である可能性を表す情報を、補完処理の
ための情報に付加する機能とを前記コンピュータに実現
させるためのプログラムを記録したコンピュータ読み取
り可能な記録媒体。
15. A recording medium for recording a program for a computer, which has a function of extracting a frame line pattern from an input image based on pixel connection information, and a rectangular area surrounded by vertical and horizontal frame line patterns. A function of extracting, a function of determining whether or not a corner portion of the rectangular area has a specific shape, and a function of adding information indicating the possibility of having the specific shape to information for complementary processing, A computer-readable recording medium recording a program for realizing the above-mentioned computer.
【請求項16】 コンピュータのためのプログラムを記
録した記録媒体であって、 入力画像から画素の連結情報に基づいて部分パターンを
抽出する機能と、 表の候補となる部分パターンを表パターンとして抽出す
る機能と、 前記表パターンから枠線パターンを抽出する機能と、 前記表パターンの外接矩形の内側に位置する一定以上の
大きさの部分パターンのうち、枠線パターンの一部とみ
なされなかった部分パターンを、新たな表パターンとし
て再帰的に処理する機能とを前記コンピュータに実現さ
せるためのプログラムを記録したコンピュータ読み取り
可能な記録媒体。
16. A recording medium recording a program for a computer, having a function of extracting a partial pattern from an input image based on connection information of pixels and a partial pattern which is a candidate for a table as a table pattern. A function, a function of extracting a frame line pattern from the table pattern, and a part of the partial pattern of a certain size or more located inside the circumscribed rectangle of the table pattern, which is not regarded as a part of the frame line pattern A computer-readable recording medium in which a program for causing the computer to realize a function of recursively processing a pattern as a new table pattern is recorded.
【請求項17】 コンピュータのためのプログラムを記
録した記録媒体であって、 入力画像から画素の連結情報に基づいて表の候補となる
表パターンを抽出する機能と、 前記表パターンから枠線パターンを抽出する機能と、 縦横の枠線パターンで囲まれた矩形領域を抽出する機能
と、 入れ子状態になっている矩形領域を、新たな表パターン
として再帰的に処理する機能と、 前記枠線抽出機能および入力機能による再帰処理の繰り
返し回数を、外部から与えられた情報または内部で作成
された情報に基づいて変更する機能とを前記コンピュー
タに実現させるためのプログラムを記録したコンピュー
タ読み取り可能な記録媒体。
17. A recording medium for recording a program for a computer, which has a function of extracting a table pattern that is a table candidate from an input image based on connection information of pixels, and a frame line pattern from the table pattern. A function to extract, a function to extract a rectangular area surrounded by vertical and horizontal frame line patterns, a function to recursively process a nested rectangular area as a new table pattern, and the frame line extraction function And a computer-readable recording medium recording a program for causing the computer to realize a function of changing the number of times of recursive processing by the input function based on information given from the outside or information created inside.
【請求項18】 入力画像から画素の連結情報に基づい
て直線パターンを抽出し、 前記直線パターンを抽出する際に該直線パターンに対し
て施された処理を表す情報を、該直線パターンの情報に
付加することを特徴とする罫線抽出方法。
18. A straight line pattern is extracted from an input image based on pixel connection information, and information representing processing performed on the straight line pattern when the straight line pattern is extracted is used as the straight line pattern information. A ruled line extraction method characterized by adding.
【請求項19】 入力画像から画素の連結情報に基づい
て直線パターンを抽出し、 前記直線パターンを表す領域の中で、該直線パターンを
構成する線分パターンが存在していない部分の大きさに
よって、該直線パターンを表す領域に仮想的に線分パタ
ーンを作成するか、周囲の線分パターンの大きさを変更
するかを判定し、 判定結果に基づいて、新たな線分パターンの作成または
既存の線分パターンの大きさの変更を行うことを特徴と
する罫線抽出方法。
19. A straight line pattern is extracted from an input image based on connection information of pixels, and a line segment pattern forming the straight line pattern is not present in a region representing the straight line pattern. , It is determined whether to virtually create a line segment pattern in the area representing the straight line pattern or to change the size of the surrounding line segment pattern, and based on the determination result, a new line segment pattern is created or an existing line segment pattern is created. A ruled line extraction method, characterized in that the size of the line segment pattern is changed.
【請求項20】 入力画像から画素の連結情報に基づい
て枠線パターンを抽出し、 縦横の枠線パターンで囲まれた矩形領域を抽出し、 前記矩形領域の角の部分が特定の形状であるかどうかを
判定し、 前記角の部分が前記特定の形状である可能性がある場合
に、該可能性を表す情報を補完処理のための情報に付加
することを特徴とする罫線抽出方法。
20. A frame line pattern is extracted from an input image based on pixel connection information, a rectangular area surrounded by vertical and horizontal frame line patterns is extracted, and a corner portion of the rectangular area has a specific shape. It is determined whether or not there is a possibility that the corner portion has the specific shape, and information indicating the possibility is added to the information for the complementary processing.
【請求項21】 入力画像から画素の連結情報に基づい
て部分パターンを抽出し、 表の候補となる部分パターンを表パターンとして抽出
し、 前記表パターンから枠線パターンを抽出し、 前記表パターンの外接矩形の内側に位置する一定以上の
大きさの部分パターンのうち、枠線パターンの一部とみ
なされなかった部分パターンを、新たな表パターンとし
て再帰的に処理することを特徴とする罫線抽出方法。
21. A partial pattern is extracted from an input image based on pixel connection information, a partial pattern that is a candidate for a table is extracted as a table pattern, and a frame line pattern is extracted from the table pattern. Ruled line extraction characterized by recursively processing, as a new table pattern, partial patterns that are not considered to be part of the frame line pattern among partial patterns of a certain size or larger located inside the circumscribed rectangle Method.
【請求項22】 入力画像から画素の連結情報に基づい
て表の候補となる表パターンを抽出し、 前記表パターンから枠線パターンを抽出し、 縦横の枠線パターンで囲まれた矩形領域を抽出し、 入れ子状態になっている矩形領域を、新たな表パターン
として再帰的に処理し、 再帰処理の繰り返し回数を、外部から与えられた情報ま
たは内部で作成された情報に基づいて変更することを特
徴とする罫線抽出方法。
22. A table pattern which is a table candidate is extracted from an input image based on pixel connection information, a frame line pattern is extracted from the table pattern, and a rectangular area surrounded by vertical and horizontal frame line patterns is extracted. However, the nested rectangular area is recursively processed as a new table pattern, and the number of repetitions of the recursive processing is changed based on the information given from the outside or the information created internally. A characteristic ruled line extraction method.
JP34685197A 1996-12-26 1997-12-16 Ruled line extraction device and method Expired - Fee Related JP3534997B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34685197A JP3534997B2 (en) 1996-12-26 1997-12-16 Ruled line extraction device and method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8-347704 1996-12-26
JP34770496 1996-12-26
JP34685197A JP3534997B2 (en) 1996-12-26 1997-12-16 Ruled line extraction device and method

Publications (2)

Publication Number Publication Date
JPH10240959A JPH10240959A (en) 1998-09-11
JP3534997B2 true JP3534997B2 (en) 2004-06-07

Family

ID=26578378

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34685197A Expired - Fee Related JP3534997B2 (en) 1996-12-26 1997-12-16 Ruled line extraction device and method

Country Status (1)

Country Link
JP (1) JP3534997B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5556511B2 (en) * 2010-08-31 2014-07-23 富士ゼロックス株式会社 Image processing apparatus and program

Also Published As

Publication number Publication date
JPH10240959A (en) 1998-09-11

Similar Documents

Publication Publication Date Title
US6917706B2 (en) Ruled line extracting apparatus for extracting ruled line from normal document image and method thereof
US5048099A (en) Polygon-based method for automatic extraction of selected text in a digitized document
EP1211640A2 (en) Image processing methods and apparatus for detecting human eyes, human face and other objects in an image
JP2002133426A (en) Ruled line extracting device for extracting ruled line from multiple image
JPH0668301A (en) Method and device for recognizing character
EP1017011A2 (en) Block selection of table features
JP2000235619A (en) Surface image processor and its program storage medium
JP3534997B2 (en) Ruled line extraction device and method
JP3798179B2 (en) Pattern extraction device and character segmentation device
JP4194309B2 (en) Document direction estimation method and document direction estimation program
US7103220B2 (en) Image processing apparatus, method and program, and storage medium
JP3947173B2 (en) Table image processing apparatus, program recording medium, and table image processing method
JP3517077B2 (en) Pattern extraction device and method for extracting pattern area
JP3095470B2 (en) Character recognition device
JPH09128480A (en) Pattern area segmenting system and pattern extraction device
JP4079411B2 (en) Image processing method, image processing apparatus, image processing program, and computer-readable storage medium storing image processing program
JP3565310B2 (en) Ruled line extracting apparatus and method for extracting ruled lines from general document images
JP3406942B2 (en) Image processing apparatus and method
JP2755299B2 (en) Image processing method
Amano et al. Character string detection algorithm using horizontal boundaries, and its application to a part number entry system
JP2003317107A (en) Method and device for ruled-line detection
JP2962525B2 (en) Text block recognition method
JP3566738B2 (en) Shaded area processing method and shaded area processing apparatus
JPH0728934A (en) Document image processor
JP3024234B2 (en) Document image ruled line extraction device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20031209

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040128

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040309

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040310

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080319

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090319

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100319

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100319

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110319

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110319

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120319

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130319

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130319

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140319

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees