JP3278471B2 - Area division method - Google Patents

Area division method

Info

Publication number
JP3278471B2
JP3278471B2 JP26731392A JP26731392A JP3278471B2 JP 3278471 B2 JP3278471 B2 JP 3278471B2 JP 26731392 A JP26731392 A JP 26731392A JP 26731392 A JP26731392 A JP 26731392A JP 3278471 B2 JP3278471 B2 JP 3278471B2
Authority
JP
Japan
Prior art keywords
character
rectangle
line
horizontal
rectangles
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 - Lifetime
Application number
JP26731392A
Other languages
Japanese (ja)
Other versions
JPH05233873A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP26731392A priority Critical patent/JP3278471B2/en
Publication of JPH05233873A publication Critical patent/JPH05233873A/en
Priority to US08/396,585 priority patent/US5757957A/en
Application granted granted Critical
Publication of JP3278471B2 publication Critical patent/JP3278471B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/155Removing patterns interfering with the pattern to be recognised, such as ruled lines or underlines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Character Input (AREA)
  • Image Analysis (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、図表と文字などが混在
した一般文書の画像に対し、文字の領域と、図領域や表
領域等の文字以外の領域(図・表領域)とを識別分類
し、必要な領域分割を行なうための領域分割方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention identifies a character area and a non-character area (figure / table area) such as a figure area and a table area in an image of a general document in which figures and tables are mixed. The present invention relates to an area dividing method for classifying and performing necessary area division.

【0002】[0002]

【従来の技術】文書画像を光ディスク等の記憶メディア
にファイリングする場合、ファクシミリで通信する場
合、プリンタに出力する場合等に、文書画像を文字領域
と図・表領域に切り分け、文字領域には文字領域用処理
を、図・表領域には図の処理や表の処理を施したいこと
がある。光学的文字認識装置を用いて文書上の文字をコ
ード化する場合にも、同様の文字領域と図・表領域の切
り分けが必要になる。
2. Description of the Related Art When filing a document image on a storage medium such as an optical disk, communicating by facsimile, or outputting to a printer, the document image is divided into a character area and a figure / table area. In some cases, it is desired to perform area processing, and to perform figure processing and table processing on a figure / table area. When encoding characters on a document using an optical character recognition device, it is necessary to separate the same character region from the figure / table region.

【0003】従来、このような領域抽出に関する技術と
して、原稿画像から黒連結成分の外接矩形を抽出し、抽
出した矩形の大きさを予め定めた閾値と比較することに
よって、文字の矩形と線図形の矩形を判定する方法が知
られている(特開昭55−162177号)。
Conventionally, as a technique relating to such an area extraction, a circumscribed rectangle of a black connected component is extracted from a document image, and the size of the extracted rectangle is compared with a predetermined threshold value. Is known (Japanese Patent Application Laid-Open No. 55-162177).

【0004】[0004]

【発明が解決しようとする課題】しかし、黒連結成分の
外接矩形の種類判定に予め定められた閾値を用いるの
で、文字サイズが異なる様々な文書の画像が入力された
場合に柔軟に対応できない。
However, since a predetermined threshold value is used for determining the type of the circumscribed rectangle of the black connected component, it is not possible to flexibly cope with input of various document images having different character sizes.

【0005】領域分割の対象となる原稿が書籍や雑誌の
ページである場合、1ページずつ切り取ってスキャナに
セットすることは稀で、書籍や雑誌の目的ページを開
き、見開き原稿としてスキャナにセットし読み取らせる
ことが多い。このような見開き原稿を読み取った画像の
場合、原稿の中折れ部つまりページ間境界部に黒ずん
だ、あるいは黒い領域が生じやすい。また、スキャナの
押さえ板(スキャナの光源の光を反射させ画像の地肌を
白にするためのもの)を閉じることができず、あるい
は、これが浮き上がり、その結果、原稿の周辺部に黒領
域が生じやすい。このような見開き原稿画像の領域分割
を行なう場合、中折れ部や周辺部に観測される黒領域を
ノイズ領域として適切に処理すべきであるが、従来は、
このノイズ処理を考慮していなかった。
When a document to be divided into regions is a book or magazine page, it is rare to cut out one page at a time and set it on the scanner. Open the target page of the book or magazine and set it on the scanner as a two-page spread document. Often read. In the case of an image obtained by reading such a two-page spread original, a darkened or black area is likely to occur at the center folded portion of the original, that is, at the boundary between pages. In addition, the scanner holding plate (for reflecting the light from the scanner light source to make the background of the image white) cannot be closed, or it rises, resulting in a black area around the original. Cheap. In the case of performing area division of such a two-page spread original image, a black area observed in a bent portion or a peripheral part should be appropriately processed as a noise area.
This noise processing was not considered.

【0006】文書画像においては、罫線を間に文字領域
(コラム)が接近していることがあるが、従来は、この
ような文字領域のセパレータとしての罫線に対する考慮
が払われていないため、罫線により区切られた隣接文字
領域が一つの文字領域に統合されてしまったり、表領域
の文字領域やグラフ領域内の文字領域が、それに隣接し
た外部の文字領域と統合されてしまうことがあった。
In a document image, a character area (column) may be close to a ruled line. However, conventionally, no consideration has been given to a ruled line as a separator for such a character area. In some cases, an adjacent character area delimited by, may be integrated into one character area, or a character area in a table area or a character area in a graph area may be integrated with an external character area adjacent thereto.

【0007】本発明は、より高精度に文字領域の分離を
行なうための領域分割方法を提供しようとするものであ
る。より具体的に言えば、本発明の一つの目的は、文字
サイズ等が様々な文書に対して、文字の領域とそれ以外
の領域とを的確に分離し、必要な領域分割を行なう領域
分割方法を提供することである。もう一つの目的は、書
籍のような見開き原稿や厚手の原稿より読み取った文書
画像に対して、中折れ部や周辺部に生じやすいノイズ領
域の影響を排除し、的確な領域分割が可能な領域分割方
法を提供することにある。本発明の他の目的は、罫線に
より区切られた文字領域や、表領域あるいはグラフ領域
の内部の文字領域を、的確に分離することができる領域
分割方法を提供することにある。
An object of the present invention is to provide an area dividing method for separating a character area with higher accuracy. More specifically, one object of the present invention is to provide an area dividing method for accurately separating a character area and other areas from a document having various character sizes and the like and performing necessary area division. It is to provide. Another purpose is to eliminate the influence of noise areas that are likely to occur in the center-folded area and peripheral area of a document image read from a spread original such as a book or a thick original, and to perform an accurate area division. It is to provide a division method. It is another object of the present invention to provide an area dividing method capable of accurately separating a character area delimited by ruled lines, a character area inside a table area or a graph area.

【0008】[0008]

【課題を解決するための手段】請求項1乃至の発明に
よれば、基本的に文書画像より抽出した黒連結成分に外
接した矩形の高さのヒストグラムより標準文字サイズを
決定し、抽出した矩形を、標準文字サイズとの大小関係
に基づいて、文字の矩形とそれ以外の矩形とに分類し、
そのうえで文字の矩形のみを統合することによって文字
領域を生成する。
According to the first to third aspects of the present invention, a standard character size is determined and extracted from a histogram of the height of a rectangle circumscribing a black connected component basically extracted from a document image. Rectangles are classified into character rectangles and other rectangles based on the size relationship with the standard character size,
Then, a character area is generated by integrating only the character rectangles.

【0009】請求項4の発明によれば、文書画像の処理
対象領域の境界に接している文字以外の矩形をノイズと
して除去する。
According to the fourth aspect of the present invention, a rectangle other than a character in contact with a boundary of a processing target area of a document image is removed as noise.

【0010】請求項5の発明によれば、文書画像より文
字の矩形を抽出するほかに垂直罫線を抽出し、ある注目
した矩形より矩形の統合を行なう際に、当該注目矩形と
の水平距離が水平方向の統合条件である矩形間距離の閾
値より小さく、かつ、当該注目矩形と垂直方向の重なり
を持つ垂直罫線と遭遇した場合、当該注目領域に関し、
水平方向の統合条件である矩形間距離の閾値を、当該注
目矩形と当該垂直罫線との水平距離に対応した値に変更
する。
According to the fifth aspect of the present invention, in addition to extracting a character rectangle from a document image and extracting a vertical ruled line and integrating rectangles from a given rectangle, the horizontal distance from the rectangle of interest is When a vertical ruled line that is smaller than the threshold of the distance between rectangles, which is a horizontal integration condition, and that vertically overlaps with the rectangle of interest is encountered, regarding the region of interest,
The threshold value of the distance between rectangles, which is a horizontal integration condition, is changed to a value corresponding to the horizontal distance between the target rectangle and the vertical ruled line.

【0011】請求項6の発明によれば、文字の矩形の統
合により生成された行の統合を行なうが、注目した行よ
り行を統合する際に、統合しようとする行が、その生成
時に垂直罫線との遭遇により水平統合条件たる矩形間距
離の閾値を変更したものである場合、その行の水平方向
の終点座標より当該注目行の水平方向の終点座標が大き
いときには統合を禁止する。
According to the sixth aspect of the present invention, lines generated by merging rectangles of characters are merged. When lines are merged from a line of interest, the line to be merged is vertical at the time of generation. When the threshold value of the distance between rectangles, which is a horizontal integration condition, is changed due to an encounter with a ruled line, integration is prohibited when the horizontal end point coordinates of the line of interest are larger than the horizontal end point coordinates of the line.

【0012】請求項7の発明によれば、行の統合により
生成された文字領域について再統合を行なうが、ある注
目した文字領域より文字領域の統合を行なう時に、統合
しようとする文字領域内の行の中に、その生成時に垂直
罫線との遭遇により水平方向の統合条件たる矩形間距離
の閾値を変更した行が含まれている場合、当該統合しよ
うとする文字領域の水平方向の終点座標より当該注目文
字領域の水平方向の終点座標が大きいときには統合を禁
止する。
According to the seventh aspect of the present invention, the character area generated by the line integration is reintegrated. When the character area is integrated from a certain noted character area, the character area within the character area to be integrated is re-integrated. If the line includes a line in which the threshold value of the distance between rectangles, which is a horizontal integration condition, is changed due to encountering a vertical ruled line at the time of generation, the horizontal end coordinates of the character area to be integrated are calculated from the horizontal end coordinates. When the coordinates of the end point in the horizontal direction of the character area of interest are large, integration is prohibited.

【0013】請求項8の発明によれば、文書画像より文
字の矩形を抽出するほかに垂直罫線を抽出し、文字の矩
形を統合した行について、ある注目した行より行統合を
行なう際に、当該注目行との垂直距離が垂直方向の統合
条件である行間距離の閾値より小さく、かつ、当該注目
行と水平方向の重なりを持つ水平罫線と遭遇した場合、
当該注目行に関し、垂直方向の統合条件である行間距離
の閾値を、当該注目行と当該水平罫線との垂直距離に対
応した値に変更する。
According to the eighth aspect of the present invention, in addition to extracting a character rectangle from a document image, extracting a vertical ruled line, and performing line integration from a line of interest for a line obtained by integrating character rectangles, When the vertical distance to the line of interest is smaller than the threshold of the line distance which is a vertical integration condition, and a horizontal ruled line having a horizontal overlap with the line of interest is encountered,
For the target line, the threshold value of the distance between lines, which is a vertical integration condition, is changed to a value corresponding to the vertical distance between the target line and the horizontal ruled line.

【0014】請求項9の発明によれば、行統合により生
成された文字領域について注目した文字領域より再統合
を行なうが、その際に、統合しようとする文字領域内の
行の中に、その生成時に水平罫線との遭遇により垂直方
向の統合条件たる行間距離の閾値を変更した行が含まれ
ている場合、当該統合しようとする文字領域の垂直方向
の終点座標より当該注目文字領域の垂直方向の終点座標
が大きいときには統合を禁止する。
According to the ninth aspect of the present invention, the character area generated by the line integration is re-integrated from the focused character area. At this time, the line within the character area to be integrated is included in the line. If a line in which the threshold value of the line spacing as a vertical integration condition is changed due to encounter with a horizontal ruled line at the time of generation is included, the vertical direction of the target character region is calculated from the vertical end coordinates of the character region to be integrated. When the end point coordinates are large, integration is prohibited.

【0015】請求項10または11の発明によれば、文
書画像より、文字の矩形を抽出するほかに、文字以外の
大きな図・表矩形を抽出する。ここで、請求項10の発
明によれば、図・表矩形矩形を水平方向にスキャンして
閾値以上の長い黒ランのみからなる黒連結成分に外接す
る矩形Hを抽出し、それぞれの文字以外の矩形より抽出
された矩形Hの中で、当該文字以外の矩形の上辺または
下辺から所定距離範囲内で最も上または最も下に位置
し、かつ水平罫線としての形状条件を満足したものを架
空水平セパレータとして抽出し、この架空水平セパレー
タを文字領域を上下に区切る水平セパレータとして扱っ
て、文字の矩形を統合する。請求項11の発明によれ
ば、図・表矩形を垂直方向にスキャンして閾値以上の長
い黒ランのみからなる黒連結成分に外接する矩形Vを抽
出し、それぞれの文字以外の矩形より抽出された矩形V
の中で、当該文字以外の矩形の左辺または右辺から所定
距離範囲内で最も左または最も右に位置し、かつ垂直罫
線としての形状条件を満足したものを架空垂直セパレー
タとして抽出し、この架空垂直セパレータを文字領域を
左右に区切る垂直セパレータとして扱って、文字の矩形
の統合を行なう。
According to the tenth or eleventh aspect , in addition to extracting a character rectangle from a document image, a large figure / table rectangle other than a character is extracted. According to the tenth aspect of the present invention, the figure / table rectangular rectangle is scanned in the horizontal direction to extract a rectangle H circumscribing a black connected component consisting of only black runs longer than the threshold, and extracting a rectangle H other than each character. Among the rectangles H extracted from the rectangles, those that are located at the top or bottom within a predetermined distance from the upper side or lower side of the rectangle other than the character and satisfy the shape conditions as horizontal ruled lines are imaginary horizontal separators. And treats this imaginary horizontal separator as a horizontal separator that vertically separates the character area, and integrates the character rectangles. According to the eleventh aspect , the figure / table rectangle is scanned in the vertical direction to extract the rectangle V circumscribing the black connected component consisting of only the black runs longer than the threshold, and is extracted from the rectangles other than the respective characters. Rectangle V
Among them, those which are located at the leftmost or rightmost within a predetermined distance range from the left side or right side of the rectangle other than the character and satisfy the shape conditions as vertical ruled lines are extracted as imaginary vertical separators, and this imaginary vertical separator is extracted. The separator is treated as a vertical separator that separates the character area to the left and right, and character rectangles are integrated.

【0016】[0016]

【作用】請求項1乃至の発明によれば、様々な文字サ
イズの文書の画像に対して、文字の矩形と、それ以外の
矩形(図表矩形)とを正確に分類できるようになるた
め、文字矩形の集合たる文字領域の抽出精度が向上す
る。
According to the first to third aspects of the present invention, character rectangles and other rectangles (chart rectangles) can be accurately classified with respect to images of documents having various character sizes. The accuracy of extracting a character area that is a set of character rectangles is improved.

【0017】請求項4の発明によれば、書籍や厚手の原
稿から読み取られた文書画像に対しても、中折れ部や周
辺部に生じる黒領域の影響を排除し、文字矩形、行また
は文字領域を正確に抽出することができる。
According to the fourth aspect of the present invention, even for a document image read from a book or a thick original, the influence of a black area generated at a bent portion or a peripheral portion is eliminated, and a character rectangle, a line, or a character is read. The region can be accurately extracted.

【0018】請求項5乃至7の発明によれば、垂直セパ
レータで区切られた文字領域(コラム)の誤統合を防止
し、それぞれの文字領域を正しく分離できる。
According to the fifth to seventh aspects of the present invention, erroneous integration of character areas (columns) separated by the vertical separator can be prevented, and each character area can be correctly separated.

【0019】請求項8または9の発明によれば、水平セ
パレータで区切られた文字領域の誤統合を防止し、それ
ぞれの文字領域を正しく分離できる。
According to the eighth or ninth aspect of the present invention, erroneous integration of character regions separated by the horizontal separator can be prevented, and each character region can be correctly separated.

【0020】請求項10または11の発明によれば、表
やグラフの領域と、それに接近した文字領域との誤統合
を防止し、文字領域を正しく抽出できる。
According to the tenth or eleventh aspect of the present invention, it is possible to prevent erroneous integration between a table or graph region and a character region approaching the region, and to correctly extract a character region.

【0021】以下、本発明の特徴と利点をより明確にす
るため、図面を用い様々な実施例について説明する。
Hereinafter, various embodiments will be described with reference to the drawings in order to clarify the features and advantages of the present invention.

【0022】[0022]

【実施例】図1は、後記実施例1乃至実施例6を説明す
るためのブロック図である。
FIG. 1 is a block diagram for explaining Embodiments 1 to 6 to be described later.

【0023】1はスキャナによって読み取られた文書画
像を格納するための文書画像メモリである。この文書画
像の処理の対象となる領域は、文書画像全体としてもよ
いし、あるいは、文書画像をディスプレイ画面に表示し
マウス等を用いて指定した領域としてもよい。
Reference numeral 1 denotes a document image memory for storing a document image read by a scanner. The area to be processed for the document image may be the entire document image or an area specified by displaying the document image on a display screen and using a mouse or the like.

【0024】5は入力された文書画像の黒連結成分に外
接した矩形を抽出する矩形抽出部である。ただし、矩形
抽出部5の前段に画像圧縮手段を設け、入力文書画像を
圧縮した画像(例えば8×8画素を1画素に圧縮した画
像)に対し、矩形抽出を行なってもよい。2は抽出され
た矩形の情報を記憶するための矩形メモリである。
A rectangle extracting unit 5 extracts a rectangle circumscribing the black connected component of the input document image. However, an image compression means may be provided at a stage preceding the rectangle extracting unit 5 to perform rectangle extraction on an image obtained by compressing an input document image (for example, an image obtained by compressing 8 × 8 pixels into one pixel). Reference numeral 2 denotes a rectangular memory for storing information on the extracted rectangle.

【0025】6は矩形の高さのヒストグラムを生成する
ヒストグラム生成部、3はこのヒストグラムの情報を記
憶するためのヒストグラムメモリ、7は矩形の高さのヒ
ストグラムより標準文字サイズを決定する標準文字サイ
ズ決定部、4は決定した標準文字サイズの情報を記憶す
るための標準文字サイズ保持メモリである。
Reference numeral 6 denotes a histogram generation unit for generating a histogram of a rectangular height, reference numeral 3 denotes a histogram memory for storing information of the histogram, and reference numeral 7 denotes a standard character size for determining a standard character size from the histogram of the rectangular height. The determining unit 4 is a standard character size holding memory for storing information on the determined standard character size.

【0026】8は抽出された矩形を、文字の矩形とそれ
以外の矩形(図表の矩形)に分類する矩形分類部であ
る。9は文字矩形を統合して文字列の行を抽出する行抽
出部、12は抽出された行の情報を記憶するための行メ
モリである。10は行を統合して行の集合である文字領
域を生成する文字領域生成部、13は生成された文字領
域の情報を記憶するための領域メモリである。11は前
記各部の動作を制御する制御部である。
Reference numeral 8 denotes a rectangle classifying unit for classifying the extracted rectangles into character rectangles and other rectangles (rectangles in the figures). Reference numeral 9 denotes a line extracting unit that integrates character rectangles and extracts lines of a character string, and 12 denotes a line memory for storing information on the extracted lines. Reference numeral 10 denotes a character area generation unit that integrates lines to generate a character area that is a set of lines, and 13 denotes an area memory for storing information on the generated character areas. A control unit 11 controls the operation of each unit.

【0027】なお、各処理部及び制御部11は、ハード
ウエアで実現しても、コンピュータシステム上でソフト
ウエアにより実現しても、あるいはハードウエアとソフ
トウエアの組み合わせにより実現してもよい。いずれの
実現形態をとるかは、必要とされる処理速度等を考慮し
て選択すればよい。
Each processing unit and control unit 11 may be realized by hardware, may be realized by software on a computer system, or may be realized by a combination of hardware and software. Which of the implementation forms should be selected in consideration of the required processing speed and the like.

【0028】図2は処理概要の説明図である。(a)に
示す原稿画像が入力した場合に、矩形抽出処理によって
(b)に示す矩形データが得られる。(d)は矩形デー
タを拡大して示す。この矩形データに対し、矩形統合と
行統合を行なうことによって(c)に示す行/領域デー
タが得られる。以下、このような処理の内容について実
施例毎に説明する。
FIG. 2 is an explanatory diagram of the processing outline. When the original image shown in (a) is input, rectangle data shown in (b) is obtained by the rectangle extraction processing. (D) shows the enlarged rectangular data. By performing rectangle integration and line integration on the rectangular data, line / region data shown in (c) is obtained. Hereinafter, the contents of such processing will be described for each embodiment.

【0029】実施例1 図3は矩形抽出から標準文字サイズ決定までの処理フロ
ーを示す。ステップ100は矩形抽出部5の処理で、入
力された文書画像上の黒連結を抽出し、それに外接する
矩形を抽出し、例えば矩形の左上角と右下角の座標と矩
形番号などを矩形情報として矩形メモリ2に格納する。
Embodiment 1 FIG. 3 shows a processing flow from rectangle extraction to determination of a standard character size. Step 100 is a process of the rectangle extracting unit 5 for extracting a black link on the input document image and extracting a rectangle circumscribing the black connection, for example, using the coordinates of the upper left corner and the lower right corner of the rectangle and the rectangle number as rectangle information. It is stored in the rectangular memory 2.

【0030】ステップ105はヒストグラム生成部6の
処理で、矩形メモリ2内の矩形情報をもとに矩形の高さ
(行に対して垂直方向の矩形サイズである。縦書き文書
の場合、矩形の横方向のサイズである)のヒストグラム
を生成する。このヒストグラムの例を図4に示す。
Step 105 is a process of the histogram generation unit 6, which is based on the rectangle information in the rectangle memory 2 and which is the height of the rectangle (the size of the rectangle in the vertical direction with respect to the line. Generate a histogram (which is the size in the horizontal direction). FIG. 4 shows an example of this histogram.

【0031】ステップ110〜115は、標準文字サイ
ズ決定部7の処理である。本実施例の場合、矩形の高さ
のヒストグラムの総度数(矩形数)をTとし、t=T/
16を算出する(ステップ110)。次に、矩形の高さ
のヒストグラムをもとに、度数がtを超える矩形高さの
中で最大の矩形高さを当該文書の標準文字サイズsiz
eとする(ステップ111〜115)。したがって、図
4の(a)に示すヒストグラムが得られた場合にはsi
ze=4に決定され、(b)に示すヒストグラムが得ら
れた場合にはsize=6に決定される。
Steps 110 to 115 are processing of the standard character size determination unit 7. In the case of this embodiment, the total frequency (the number of rectangles) of the histogram of the height of the rectangle is T, and t = T /
16 is calculated (step 110). Next, based on the histogram of the heights of the rectangles, the maximum rectangle height among the rectangle heights whose frequency exceeds t is calculated as the standard character size siz of the document.
e (steps 111 to 115). Therefore, when the histogram shown in FIG.
It is determined that ze = 4, and when the histogram shown in (b) is obtained, it is determined that size = 6.

【0032】次に、矩形分類部8によって、標準文字サ
イズsizeを基準に用いて矩形分類を行なう。例え
ば、高さ及び幅(行方向のサイズ)のいずれもが標準文
字サイズsizeの5倍を超えない矩形を文字の矩形と
して分類し、それ以上に大きな矩形を文字以外の矩形
(図・表矩形)とする。
Next, rectangle classification is performed by the rectangle classification unit 8 using the standard character size size as a reference. For example, a rectangle whose height and width (size in the line direction) do not exceed 5 times the standard character size size is classified as a character rectangle, and a rectangle larger than that is a non-character rectangle (figure / table rectangle). ).

【0033】この分類結果が本実施例の出力である。す
なわち、黒連結成分の矩形を単位として文書画像を文字
領域と図・表領域とに分割する。図2で言えば、同図
(b)の矩形データが本実施例の処理結果である。
The result of this classification is the output of this embodiment. That is, the document image is divided into a character area and a figure / table area using the rectangle of the black connected component as a unit. In FIG. 2, the rectangular data in FIG. 2B is the processing result of the present embodiment.

【0034】実施例2 矩形分類部8による矩形分類までの処理は前記実施例1
と同一であるが、次に行抽出部9によって次のような行
抽出を行なう。
Embodiment 2 The processing up to the rectangle classification by the rectangle classification unit 8 is the same as that of the first embodiment.
However, the following row extraction is performed by the row extracting unit 9.

【0035】二つの文字矩形の距離(行方向)を求め、
この距離が標準文字サイズsize以下であれば両文字
矩形を統合する。横書き文書の場合、例えば図5に示す
文字矩形151,152の水平距離sp1を求め、sp
1≦sizeならばそれらを統合する。縦書き文書なら
ば、縦方向の距離により同様の統合を行なう。このよう
な統合処理を全部の文字矩形に対して行ない、統合され
た文字矩形群の外接矩形を文字列の行として切り出す。
図6において、153が切り出された行であり、その内
部の矩形が文字矩形である。
The distance (line direction) between two character rectangles is obtained,
If the distance is equal to or smaller than the standard character size, both character rectangles are integrated. In the case of a horizontally written document, for example, the horizontal distance sp1 of the character rectangles 151 and 152 shown in FIG.
If 1 ≦ size, they are integrated. In the case of a vertically written document, similar integration is performed according to the vertical distance. Such integration processing is performed on all character rectangles, and a circumscribed rectangle of the integrated character rectangle group is cut out as a character string line.
In FIG. 6, reference numeral 153 denotes a cut-out line, and a rectangle inside the line is a character rectangle.

【0036】このように本実施例は、文字矩形を統合
し、文書画像の文字領域を行を単位として抽出するわけ
である。図2で言えば、(b)に示した矩形データに対
し文字矩形の統合により行を抽出した段階のデータが、
処理結果である。
As described above, in this embodiment, the character rectangles are integrated, and the character area of the document image is extracted in units of lines. In FIG. 2, the data at the stage of extracting a line by integrating the character rectangle with the rectangular data shown in FIG.
It is a processing result.

【0037】実施例3 矩形分類の後に文字矩形を統合して行を抽出することは
前記実施例2と同様であるが、文字矩形の統合方法が異
なる。
Embodiment 3 The method of integrating character rectangles after rectangle classification and extracting lines is the same as in the second embodiment, but the method of integrating character rectangles is different.

【0038】すなわち、横書き文書の場合、例えば図7
の文字矩形161,162の重なり量sp2を測定し、
矩形高さh1,h2の小さいほうの値をhとして、sp
2≧h/2ならば文字矩形161,162を統合する。
このようにして統合した文字矩形群の外接矩形を行とし
て抽出する。
That is, in the case of a horizontally written document, for example, FIG.
The overlap amount sp2 of the character rectangles 161, 162 is measured,
Assuming that the smaller value of the rectangular heights h1 and h2 is h, sp
If 2 ≧ h / 2, the character rectangles 161 and 162 are integrated.
The circumscribed rectangle of the character rectangle group integrated in this way is extracted as a line.

【0039】縦書き文書の場合、縦方向についての文字
矩形間の重なり量と、文字矩形の高さ(横方向の大き
さ)を用いて同様の判定を行ない統合して、行を抽出す
る。
In the case of a vertically written document, the same determination is made using the overlap amount between the character rectangles in the vertical direction and the height (the size in the horizontal direction) of the character rectangles, and the lines are extracted by integrating them.

【0040】実施例4 行抽出部9で文字矩形の統合による行抽出を行なうが、
この際に、前記実施例2における文字矩形の統合条件
と、前記実施例3における文字矩形の統合条件の両方を
満足した場合に、文字矩形の統合を行なう。
Embodiment 4 A line extraction unit 9 performs line extraction by integrating character rectangles.
At this time, when both the integration condition of the character rectangle in the second embodiment and the integration condition of the character rectangle in the third embodiment are satisfied, the integration of the character rectangle is performed.

【0041】実施例5 行抽出部9により行が抽出されるまでの処理は前記実施
例2,3または4と同様である。
Fifth Embodiment Processing until a row is extracted by the row extracting unit 9 is the same as that of the second, third or fourth embodiment.

【0042】次に文字領域生成部10において、次に述
べるような行の統合を行なって文字領域(コラム)を生
成する。まず、pに初期値としてsizeを設定し、統
合しようとする行との距離p2がp以下のときは、その
行の統合を行なうが、p2がpを越えるときは統合を行
なわない。
Next, the character area generating unit 10 generates a character area (column) by integrating lines as described below. First, size is set to p as an initial value, and when the distance p2 from the row to be integrated is equal to or less than p, the row is integrated, but when p2 exceeds p, the integration is not performed.

【0043】行を統合した場合には、統合した行の間の
距離p1(行に対し垂直方向の距離)の1.5倍の値p
を求める(p1が一定値以下、例えば1以下の場合、p
を固定値、例えば3に設定する)。そして、次に統合し
ようとする行との距離p2がp以下のときは、その行を
統合し、pを超えるときは統合しない。
When the rows are integrated, a value p that is 1.5 times the distance p1 (the distance in the direction perpendicular to the rows) between the integrated rows.
(If p1 is a certain value or less, for example, 1 or less, p
Is set to a fixed value, for example, 3). When the distance p2 to the next row to be integrated is p or less, the rows are integrated, and when the distance exceeds p, the integration is not performed.

【0044】ただし、p2≦pであっても、統合した最
後の行の高さh1と次に統合しようとする行の高さh2
の比h2/h1が、ある定数(例えば5/4)以上の場
合は統合しない。
However, even if p2 ≦ p, the height h1 of the last row to be integrated and the height h2 of the row to be integrated next
Is not integrated when the ratio h2 / h1 is equal to or greater than a certain constant (for example, 5/4).

【0045】図8は、1番目の統合条件の説明図であ
る。ただし横書き文書の場合である。行171,172
を統合し、次に行173についてp2≦pであるため、
これを統合する。これによって、文字領域174が得ら
れる。
FIG. 8 is an explanatory diagram of the first integration condition. However, this is the case for horizontal writing documents. Rows 171, 172
And then for p2 ≦ p for row 173,
Integrate this. As a result, a character area 174 is obtained.

【0046】図9は、2番目の統合条件の説明図であ
る。行181,182が統合され、次に行183を統合
する際に、h2/h1≧5/4であるため統合しない。
その結果、行181,182の文字領域186が得られ
る。この例は、文字領域186のほかに、行183のみ
の文字領域187と、行184,185を統合した文字
領域188が生成された場合である。
FIG. 9 is an explanatory diagram of the second integration condition. When the rows 181 and 182 are integrated and the row 183 is integrated next, h2 / h1 ≧ 5/4 is not integrated.
As a result, a character area 186 of rows 181 and 182 is obtained. In this example, in addition to the character region 186, a character region 187 of only the line 183 and a character region 188 obtained by integrating the lines 184 and 185 are generated.

【0047】このように本実施例によれば、文書画像よ
り、行がまとまった文字領域を抽出することができる。
図2で言えば、(c)の行/領域データが得られる。
As described above, according to this embodiment, it is possible to extract a character area in which lines are collected from a document image.
In FIG. 2, the row / area data of (c) is obtained.

【0048】実施例6 文字領域生成部10は、前記実施例5と同様の行統合に
よる文字領域生成を行なうが、その統合の完璧を期する
ため、さらに次のような文字領域に対する統合処理を行
なう。
Embodiment 6 The character area generation unit 10 generates a character area by line integration similar to that of the fifth embodiment, but further integrates the following character areas in order to complete the integration. Do.

【0049】統合しようとする二つの文字領域の幅が、
両方とも標準文字サイズsizeの5倍以上の場合と、
少なくとも一方の幅が標準文字サイズsizeの5倍よ
り小さい場合とで、統合条件が異なる。
The width of the two character areas to be integrated is
Both are more than 5 times the standard character size size,
The integration conditions are different when at least one of the widths is smaller than five times the standard character size size.

【0050】図10は、前者の場合、つまり大きい領域
同士の統合の場合の説明図である。191,192は実
施例5と同様の統合処理によって生成された文字領域で
ある。文字領域191,192の行方向の重なり量をs
p1、文字領域191の幅をw、文字領域191,19
2の距離をsp2とし、sp1≧4/5wであって、s
p2<sizeの場合、文字領域191,192を一つ
の文字領域193に統合する。
FIG. 10 is an explanatory diagram of the former case, that is, the case of integrating large areas. 191 and 192 are character areas generated by the same integration processing as in the fifth embodiment. The overlap amount of the character areas 191 and 192 in the row direction is represented by s.
p1, width of the character area 191 is w, character areas 191, 19
2 is sp2, sp1 ≧ 4 / 5w, and s
When p2 <size, the character regions 191 and 192 are integrated into one character region 193.

【0051】図11は、後者の小さい領域の統合の場合
の説明図である。195,196は統合しようとする文
字領域である。文字領域195,196の行方向の距離
をsp1、小さいほうの文字領域196の高さをhと
し、文字領域195,196の行に対し垂直方向の重な
り量がh/2以上で、かつsp1≦2×sizeのと
き、一つの文字領域197に統合する。
FIG. 11 is an explanatory diagram of the latter case of integrating small areas. 195 and 196 are character areas to be integrated. The distance in the line direction of the character regions 195 and 196 is sp1, the height of the smaller character region 196 is h, the amount of overlap in the vertical direction with respect to the lines of the character regions 195 and 196 is h / 2 or more, and sp1 ≦ In the case of 2 × size, they are integrated into one character area 197.

【0052】実施例7 図12は本実施例を説明するためのブロック図である。
ノイズ矩形除去部201が追加されていることが、図1
と異なる。
Embodiment 7 FIG. 12 is a block diagram for explaining the present embodiment .
FIG. 1 shows that the noise rectangle removing unit 201 is added.
And different.

【0053】文書画像メモリ1に入力された文書画像の
原稿が、書籍や厚手の原稿であった場合に、原稿の中折
れ部や周辺部に黒領域もしくは黒ずんだ領域が生じるこ
とは前述した。本実施例は、このような黒領域に対応し
た図・表矩形(文字矩形以外の矩形)をノイズとして除
去するもので、そのために設けられた手段がノイズ矩形
除去部201である。
As described above, when the original of the document image input to the document image memory 1 is a book or a thick original, a black area or a dark area is formed in the middle bent portion or the peripheral portion of the original. In the present embodiment, a figure / table rectangle (a rectangle other than a character rectangle) corresponding to such a black area is removed as noise, and a means provided for that purpose is a noise rectangle removal unit 201.

【0054】図13は、ノイズ矩形除去部201の処理
フロー図である。矩形メモリ2を参照し、矩形分類部8
によって分類後の矩形の情報を読み出し、図・表矩形
(文字矩形以外の矩形)であるか調べ(ステップ21
0)、図・表矩形であれば、処理対象領域のいずれかの
境界辺に接しているか否かを調べる(ステップ21
5)。ここで、処理対象領域は、文書原稿の全体または
指定された領域である。境界辺に接触している場合、そ
の図・表矩形をノイズ矩形として除去する。除去された
矩形は、次の行抽出の対象矩形から除外される。例え
ば、図14に示すように、図・表矩形231が処理対象
領域230に接しているため除外される。
FIG. 13 is a processing flowchart of the noise rectangle removing unit 201. Referring to the rectangle memory 2, the rectangle classification unit 8
The information of the classified rectangle is read out to check whether it is a figure / table rectangle (a rectangle other than a character rectangle) (step 21).
0), if it is a figure / table rectangle, it is checked whether it is in contact with any boundary side of the processing target area (step 21).
5). Here, the processing target region is the entire document document or a designated region. If it touches the boundary side, the figure / table rectangle is removed as a noise rectangle. The removed rectangle is excluded from the target rectangle for the next row extraction. example
For example, as shown in FIG.
Since it is in contact with the area 230, it is excluded.

【0055】図15は、後記実施例8乃至12を説明す
るためのブロック図である。301は入力された文書画
像データを記憶するための文書画像メモリ、306は入
力文書画像の黒連結成分の外接矩形を抽出する矩形抽出
部、302は抽出された矩形の情報を記憶する矩形メモ
リである。
FIG. 15 is a block diagram for explaining Embodiments 8 to 12 to be described later. Reference numeral 301 denotes a document image memory for storing input document image data; 306, a rectangle extraction unit that extracts a circumscribed rectangle of a black connected component of the input document image; and 302, a rectangle memory that stores information on the extracted rectangle. is there.

【0056】矩形抽出の処理は、前記実施例1〜と同
様でよく、例えば文書画像をスキャンしながら接続した
黒ランの外接矩形を抽出し、これを一定距離内にあるも
のについて統合することによって行なう。なお、矩形抽
出部306の前に入力文書画像の例えば8×8画素を1
画素に圧縮(縮小)する手段を設け、圧縮された画像に
対して矩形抽出を行なうようにしてもよい。
The process of extracting a rectangle may be the same as in the first to seventh embodiments. For example, a circumscribed rectangle of a connected black run may be extracted while scanning a document image, and the rectangles within a certain distance may be integrated. Performed by Note that, for example, 8 × 8 pixels of the input document image
A means for compressing (reducing) pixels may be provided, and a rectangle may be extracted from the compressed image.

【0057】307は矩形を文字矩形と、それ以外の図
・表矩形に分類する矩形分類部である。この矩形分類の
処理は、前記実施例1乃至と同様に、矩形の幅と高さ
を閾値と比較することによって行なうが、その際の閾値
は前記実施例1乃至と違って予め与えられる。ただ
し、前記実施例1乃至と同様に、例えば矩形の高さの
ヒストグラムから標準文字サイズを求め、これに適当な
係数を掛けることによって適応的に閾値を算出してもよ
い。
Reference numeral 307 denotes a rectangle classifying unit for classifying rectangles into character rectangles and other figure / table rectangles. Processing of the rectangular classification, similarly as in Example 1 to 7, is performed by comparing the rectangle width and height as the threshold value, the threshold value at that time is given in advance, unlike Embodiments 1 to 7 . However, similarly to the first to seventh embodiments, for example, a standard character size may be obtained from a histogram of a rectangular height and a threshold value may be adaptively calculated by multiplying the standard character size by an appropriate coefficient.

【0058】308は、垂直罫線(垂直セパレータ)を
識別する垂直罫線識別部である。この垂直罫線識別は、
例えば次のような処理によって行なわれる。矩形分類部
307の処理によって分類された図・表矩形(文字矩形
以外の大きな矩形)の中で、その幅(横方向の大きさ)
が所定の閾値より小さく、かつ、高さ(縦方向の大き
さ)が所定の閾値より大きい矩形を垂直罫線の候補とし
て選ぶ。次に、垂直罫線候補矩形の範囲の文書画像を垂
直方向にスキャンすることにより、所定の閾値より長い
黒ランのみを抽出し、この長い黒ランのみの連結成分の
外接矩形を抽出する。そして、この長い黒ラン連結成分
の外接矩形の長さH1、幅W1と、もとの矩形の高さ
H、幅Wとの間で、H1/H>閾値(例えば0.8)か
つW1/W>閾値(例えば0.8)であれば、長い黒ラ
ン連結成分の外接矩形を垂直罫線であると判定する。
Reference numeral 308 denotes a vertical ruled line identification unit for identifying a vertical ruled line (vertical separator). This vertical ruled line identification
For example, the following process is performed. The width (horizontal size) of the figure / table rectangle (large rectangle other than the character rectangle) classified by the processing of the rectangle classification unit 307
Is selected as a candidate for a vertical ruled line having a height smaller than a predetermined threshold and a height (vertical size) larger than the predetermined threshold. Next, by scanning the document image in the range of the vertical ruled line candidate rectangle in the vertical direction, only black runs longer than a predetermined threshold are extracted, and a circumscribed rectangle of a connected component of only the long black runs is extracted. Then, between the length H1 and width W1 of the circumscribed rectangle of this long black run connected component and the height H and width W of the original rectangle, H1 / H> threshold (for example, 0.8) and W1 / If W> threshold (for example, 0.8), it is determined that the circumscribed rectangle of the long black run connected component is a vertical ruled line.

【0059】なお、垂直罫線矩形の判定のための閾値、
及び黒ランの長さの閾値は、矩形分類の閾値と同様に適
応的に決定してもよい。特願平4−160866号の明
細書及び図面に、このような罫線抽出の方法がより詳細
に示されている。
It should be noted that a threshold value for determining a vertical ruled line rectangle,
The threshold value of the length of the black run and the length of the black run may be adaptively determined similarly to the threshold value of the rectangle classification. The specification and drawings of Japanese Patent Application No. 4-160866 show such a ruled line extraction method in more detail.

【0060】309は文字矩形を統合して行を生成する
行抽出部であり、303は行生成の際の文字矩形の統合
判定のための閾値を記憶する統合閾値メモリである。3
04は生成された行の情報を記憶する行メモリである。
310は生成された行を統合し文字領域を生成する文字
領域生成部である。305は生成された文字領域の情報
を記憶するための領域メモリである。行統合の処理は、
前記実施例1乃至と同様に、統合しようとする行の間
の距離と統合閾値とを比較することによって統合可否を
判定し、可能な行間を統合するという方法で行なわれる
が、この統合判定の際に、垂直罫線識別部308により
抽出された垂直罫線の有無と相対的位置関係が参照され
る。311は文字領域生成部310の行統合によって生
成された文字領域に対して、統合し切れなかった領域の
再統合を行ない文字領域を修正する文字領域修正部であ
る。312は前記各部を制御する制御部である。
Reference numeral 309 denotes a line extracting unit that generates a line by integrating character rectangles, and reference numeral 303 denotes an integrated threshold memory that stores a threshold value for judging the integration of character rectangles at the time of line generation. 3
Reference numeral 04 denotes a row memory for storing information on the generated rows.
A character area generation unit 310 integrates the generated lines to generate a character area. An area memory 305 stores information on the generated character area. The process of line unification is
As in the first to seventh embodiments, the integration is determined by comparing the distance between rows to be integrated with the integration threshold, and integration is performed by a method of integrating possible rows. At this time, the presence / absence and relative positional relationship of the vertical ruled line extracted by the vertical ruled line identification unit 308 are referred to. Reference numeral 311 denotes a character region correction unit that corrects a character region by re-integrating a region that has not been completely integrated into a character region generated by the line integration of the character region generation unit 310. Reference numeral 312 denotes a control unit that controls the above-described units.

【0061】以下、実施例8乃至12について個別に説
明する。ただし、文書上の行は横方向であると仮定す
る。
Hereinafter, Examples 8 to 12 will be described individually. However, it is assumed that the lines on the document are horizontal.

【0062】実施例8 矩形抽出部306での矩形抽出処理、矩形分類部307
による矩形分類処理、垂直罫線識別部308による垂直
罫線抽出に続いて、行抽出部309により行生成が行な
われる。
Embodiment 8 Rectangle extraction processing in rectangle extraction section 306, rectangle classification section 307
, A vertical ruled line is extracted by the vertical ruled line identifying unit 308, and then a line is generated by a line extracting unit 309.

【0063】図16は行生成処理の概略フローを示す。
行生成の基本的な処理は、文字矩形と判定された矩形に
対し、ある注目した矩形より、他の矩形との間の水平距
離(sp1)及び垂直距離(sp2)と、予め標準文字
サイズ等から定められて統合閾値メモリ303に格納さ
れている水平統合閾値(Th1)及び垂直統合閾値(T
h2)とを比較することで、近接した矩形を統合すると
いうものであるが、図16に見られるように、垂直罫線
との関係に応じて水平統合閾値を変更する。
FIG. 16 shows a schematic flow of the row generation processing.
The basic processing of line generation is as follows. For a rectangle determined to be a character rectangle, a horizontal distance (sp1) and a vertical distance (sp2) between a given rectangle and another rectangle, a standard character size, etc. From the horizontal integration threshold (Th1) and the vertical integration threshold (T
h2), the adjacent rectangles are integrated. As shown in FIG. 16, the horizontal integration threshold is changed according to the relationship with the vertical ruled line.

【0064】まず、新しい文字矩形Aを選択し(ステッ
プ360)、水平統合閾値をTh1とする(ステップ3
62)。注目した文字矩形Aより右方向へ、水平距離が
Th1以内かつ垂直距離が垂直統合閾値Th2以内の範
囲で矩形(文字矩形または垂直罫線矩形)をサーチし、
見つかった矩形が垂直罫線矩形であるか判定する(ステ
ップ364)。その矩形が文字矩形であるならば統合し
(ステップ366)、次の矩形のサーチを行なう。
First, a new character rectangle A is selected (step 360), and the horizontal integration threshold is set to Th1 (step 3).
62). A rectangle (character rectangle or vertical ruled line rectangle) is searched rightward from the focused character rectangle A in a range where the horizontal distance is within Th1 and the vertical distance is within the vertical integration threshold Th2,
It is determined whether the found rectangle is a vertical ruled line rectangle (step 364). If the rectangle is a character rectangle, they are integrated (step 366), and a search for the next rectangle is performed.

【0065】文字矩形の統合を目的としているのである
から、サーチされた矩形が垂直罫線矩形である場合に
は、当然にその垂直罫線矩形との統合を行なわない。そ
して、注目している矩形Aと垂直罫線矩形とが垂直方向
で重なりがあるか調べ(ステップ368)、重なりがあ
る場合には、矩形Aと垂直罫線矩形の中心線までの距離
Th1’を水平統合閾値に設定し直し(ステップ37
0)、次の矩形のサーチを行なう。
Since the purpose is to integrate character rectangles, if the searched rectangle is a vertical ruled line rectangle, it is not naturally integrated with the vertical ruled line rectangle. Then, it is checked whether or not the rectangle A of interest and the vertical ruled line rectangle overlap in the vertical direction (step 368). If there is an overlap, the distance Th1 'between the rectangle A and the center line of the vertical ruled line rectangle is set horizontally. Reset to the integration threshold (step 37)
0), search for the next rectangle.

【0066】矩形Aに関して、水平統合閾値(Th1ま
たはTh1’)以下かつ垂直統合閾値Th2以下の範囲
内に次の矩形が見つからなくなるまで処理を繰り返すと
(ステップ372)、ステップ360より別の注目矩形
に関して処理を開始する。
When the process is repeated for the rectangle A until the next rectangle is not found within the range below the horizontal integration threshold (Th1 or Th1 ') and below the vertical integration threshold Th2 (step 372), another attention rectangle from step 360 is obtained. The processing is started for.

【0067】文字矩形の統合中に垂直罫線と遭遇する場
合の具体例を、図17により説明する。図17(a)に
おいて、矩形Aに関して、まず矩形Bが統合される。次
に矩形AからTh1以下の水平距離内に垂直罫線矩形3
80が見つかる。この垂直罫線矩形380は矩形Aと重
なりがあるので、水平統合閾値がTh1からTh1’へ
変更され、その結果、水平統合閾値がTh1であれば次
にサーチされ統合されるはずであった矩形Cは矩形Aと
の統合対象から除外される。よって、矩形A,Bからな
る行381と、垂直罫線(垂直セパレータ)により区切
られた矩形Cとが正しく分離される。
A specific example of a case where a vertical ruled line is encountered during the integration of a character rectangle will be described with reference to FIG. In FIG. 17A, first, a rectangle B is integrated with a rectangle A. Next, a vertical ruled line rectangle 3 within a horizontal distance of Th1 or less from rectangle A
80 is found. Since the vertical ruled line rectangle 380 overlaps with the rectangle A, the horizontal integration threshold is changed from Th1 to Th1 ′. As a result, if the horizontal integration threshold is Th1, the rectangle C that was to be searched and integrated next. Are excluded from the integration target with the rectangle A. Therefore, the row 381 composed of the rectangles A and B and the rectangle C separated by the vertical ruled line (vertical separator) are correctly separated.

【0068】図17(b)において、矩形Aに対して矩
形Bが統合され、次に垂直罫線矩形382がサーチされ
る。しかし、この垂直罫線矩形382は矩形Aとの重な
りがないので、水平統合閾値はTh1のままである。し
たがって、次の矩形Cがサーチされて矩形Aと統合さ
れ、矩形A,B,Cからなる行383が生成される。す
なわち、この垂直罫線矩形382は、少なくとも矩形B
と矩形Cとの間の垂直セパレータではないので、その存
在を無視して文字矩形の統合を行なう。
In FIG. 17B, a rectangle B is integrated with a rectangle A, and then a vertical ruled line rectangle 382 is searched. However, since the vertical ruled line rectangle 382 does not overlap with the rectangle A, the horizontal integration threshold remains at Th1. Therefore, the next rectangle C is searched and integrated with the rectangle A, and a row 383 including rectangles A, B, and C is generated. That is, this vertical ruled line rectangle 382 is at least a rectangle B
Since it is not a vertical separator between the character and the rectangle C, the character rectangle is integrated ignoring its existence.

【0069】実施例9 前記実施例8と同様に、行生成処理において、注目する
文字矩形と重なりのある垂直罫線矩形が存在した場合に
水平統合閾値を変更するが、その変更する値の決定方法
が異なる。これ以外は前記実施例8と同様である。
Ninth Embodiment As in the eighth embodiment , the horizontal integration threshold value is changed when a vertical ruled line rectangle overlapping the character rectangle of interest exists in the line generation processing. Are different. Except for this, it is the same as the eighth embodiment .

【0070】図18は、水平統合閾値の変更値の決定方
法の説明図である。矩形Aの垂直方向の範囲(Ya1か
らYa2)と、垂直罫線矩形384の水平方向の範囲
(xr1からXr2)で決まるスキャン範囲385に対
して、画像を水平方向にスキャンし、あるスキャンライ
ン上の垂直罫線の存在位置(Xr3)を求め、距離(X
r3−Xa2)を変更後の水平統合閾値とする。あるい
は、全スキャンラインについて求めた垂直罫線の位置の
平均値をXr3として、(Xr3−Xra)を変更後の
水平統合閾値としてもよい。
FIG. 18 is an explanatory diagram of a method of determining a change value of the horizontal integration threshold. An image is horizontally scanned in a vertical range (Ya1 to Ya2) of the rectangle A and a scan range 385 determined by a horizontal range (xr1 to Xr2) of the vertical ruled rectangle 384. The existence position (Xr3) of the vertical ruled line is obtained, and the distance (Xr3) is obtained.
r3-Xa2) is set as the changed horizontal integration threshold. Alternatively, the average value of the positions of the vertical ruled lines obtained for all the scan lines may be set as Xr3, and (Xr3-Xra) may be set as the changed horizontal integration threshold.

【0071】実施例10 前記実施例8と同様に、行生成処理において、注目する
文字矩形と重なりのある垂直罫線矩形が存在した場合に
水平統合閾値を変更するが、その変更する値の決定方法
が異なる。これ以外は前記実施例8と同様である。
Embodiment 10 In the same manner as in Embodiment 8 , in the line generation processing, when there is a vertical ruled line rectangle overlapping with the character rectangle of interest, the horizontal integration threshold value is changed. Are different. Except for this, it is the same as the eighth embodiment .

【0072】図19は、水平統合閾値の変更値の決定方
法の説明図である。図19(a)及び(b)において、
θはY軸(垂直方向)を基準に予め測定した文書画像の
スキュー角度である。このスキュー角度の測定は、よく
知られたハフ変換等の方法によって求めてもよいし、あ
るいは同一行に属する文字矩形の最大高さと行の高さの
差より算出する方法などによってもよい。ここで、Y軸
に対するスキューの傾き方向により以下のように場合分
けする。
FIG. 19 is an explanatory diagram of a method of determining a change value of the horizontal integration threshold. In FIGS. 19 (a) and (b),
θ is the skew angle of the document image measured in advance with reference to the Y axis (vertical direction). The measurement of the skew angle may be obtained by a well-known method such as Hough transform, or by a method of calculating from the difference between the maximum height of a character rectangle belonging to the same line and the line height. Here, the following cases are classified according to the inclination direction of the skew with respect to the Y axis.

【0073】(a)はθ≧0の場合であり、矩形Aの対
角頂点座標と垂直罫線矩形386の対角頂点座標より、
次式 Th1’={ Yr2-(Ya1+Ya2)/2 }tanθ+Xr1-Xa2 によって水平統合閾値の変更値Th1’を計算する。
(A) is the case where θ ≧ 0, and is obtained from the diagonal vertex coordinates of the rectangle A and the diagonal vertex coordinates of the vertical ruled line rectangle 386.
The change value Th1 'of the horizontal integration threshold is calculated by the following equation: Th1' = {Yr2- (Ya1 + Ya2) / 2} tanθ + Xr1-Xa2.

【0074】(b)はθ<0の場合であり、矩形Aの対
角頂点座標と垂直罫線矩形387の対角頂点座標より、
次式 Th1’={ (Ya1+Ya2)/2-Yr1 }tanθ+Xr1-Xa2 によって水平統合閾値の変更値Th1’を計算する。
(B) is a case where θ <0, and is obtained from the diagonal vertex coordinates of the rectangle A and the diagonal vertex coordinates of the vertical ruled line rectangle 387.
The change value Th1 'of the horizontal integration threshold is calculated by the following equation: Th1' = {(Ya1 + Ya2) / 2-Yr1} tanθ + Xr1-Xa2.

【0075】実施例11 文字矩形の統合による行生成の処理までは前記実施例8
乃至10と同様であるが、次に文字領域生成部310に
より行を統合して文字領域を生成する。この行統合によ
る文字領域生成処理のフローを図20に示す。
Embodiment 11 The above-described embodiment 8 is performed up to the line generation processing by integrating the character rectangles.
10 to 10 , but a character area is generated by the character area generation unit 310 by integrating the lines. FIG. 20 shows a flow of the character area generation processing by line integration.

【0076】図20の最初のステップ400は、行生成
の段階での処理である。このステップでは、注目矩形A
に対して一定距離範囲内で右側に垂直罫線矩形が存在す
る場合(つまり、前記実施例8乃至10で行生成の際に
水平統合閾値を変更する原因となった垂直罫線が存在す
る場合)に、生成した行に「右側に垂直罫線が存在す
る」ということを示すマークRを付加する(ステップ4
00)。例えば図17(a)の行381にマークRが付
けられる。
The first step 400 in FIG. 20 is processing at the stage of row generation. In this step, the target rectangle A
When there is a vertical ruled line rectangle on the right side within a certain distance range (that is, when there is a vertical ruled line that caused the horizontal integration threshold to be changed at the time of row generation in the eighth to tenth embodiments ) , A mark R indicating that a vertical ruled line exists on the right side is added to the generated line (step 4).
00). For example, a mark R is added to the row 381 in FIG.

【0077】ステップ402以降が、行統合による文字
領域生成の処理である。まず、新しい行Aを選択する
(ステップ402)。この注目した行Aとの水平距離及
び垂直距離が一定値以下の行をサーチし、見つかったな
らば、その行がマークR付きの行であるか調べる(ステ
ップ404)。マークR付き行でなければ、行の統合を
行ない(ステップ406)、次の行のサーチを行なうこ
とになる。
Step 402 and subsequent steps are processing for generating a character area by line integration. First, a new row A is selected (step 402). A row whose horizontal distance and vertical distance from the noted row A are equal to or less than a predetermined value is searched, and if found, it is checked whether the row is a row with a mark R (step 404). If the line is not a line with the mark R, the lines are integrated (step 406), and the search for the next line is performed.

【0078】サーチした行がマークR付き行である場
合、この行の水平方向の終点座標(Xr2)と行Aの水
平方向の終点座標(Xa2)とが、Xa2>Xr2の関
係を満たすか判定する(ステップ412)。この関係を
満たさないときは行統合を行なう(ステップ406)
が、関係を満たすときは行統合を行なわず次の行のサー
チに進む。
If the searched row is a row with a mark R, it is determined whether the horizontal end coordinate (Xr2) of this row and the horizontal end coordinate (Xa2) of row A satisfy the relationship of Xa2> Xr2. (Step 412). If this relationship is not satisfied, row integration is performed (step 406).
However, when the relationship is satisfied, the process proceeds to the search for the next line without performing the line integration.

【0079】ステップ412の条件が満たされるために
行統合が行なわれない例を図21に示す。図21の
(a)において、行413はマークR付きであるので、
注目行A414とは統合されない。このような行41
3,414は、垂直罫線416によって区切られた別々
のコラムに属する行と看做すことができる。
FIG. 21 shows an example in which row integration is not performed because the condition of step 412 is satisfied. In FIG. 21A, since the row 413 has the mark R,
It is not integrated with the line of interest A414. Row 41 like this
3, 414 can be considered as rows belonging to different columns separated by the vertical ruled line 416.

【0080】図21の(b)において、マークR付き行
417と注目行A418とは統合されない。このような
行417,418は、別コラムに属するものでない可能
性もあるが、垂直罫線419との位置関係から判断する
と、統合しないのが自然である。
In FIG. 21B, the row with mark R 417 and the row of interest A 418 are not integrated. Such rows 417 and 418 may not belong to different columns, but judging from the positional relationship with the vertical ruled line 419, it is natural that they are not integrated.

【0081】実施例12 前記実施例11と同様に行統合による文字領域生成まで
行なうが、統合された行にマークRが付加されている文
字領域にもマークRを付加する。そして、行統合により
生成された文字領域に対して、文字領域修正部311で
行統合と同様な処理により統合を行なうことによって、
行統合では統合しきれなかった領域の再統合を行なう。
この再統合の際、統合しようとする文字領域がマークR
付きであるか調べ、マークR付きの場合は前記実施例1
の行統合の際と同様に、マークR付き領域の水平方向
の終点座標Xr2と、注目している文字領域の水平方向
の終点座標Xa2とが、Xa2>Xr2の関係にあると
きには統合しない(図21参照)。
Embodiment 12 In the same way as in Embodiment 11 , processing up to the generation of a character area by line integration is performed, but a mark R is also added to a character area where a mark R is added to the integrated line. Then, the character area generated by the line integration is integrated by the character area correction unit 311 by the same processing as the line integration, whereby
In the row integration, the areas that could not be integrated are re-integrated.
In this reintegration, the character area to be integrated is marked R
Checked whether it is attached, the examples in the case of marked R 1
Similarly to the case of the line integration of No. 1 , when the horizontal end coordinate Xr2 of the region with the mark R and the horizontal end coordinate Xa2 of the focused character region are in a relationship of Xa2> Xr2, they are not integrated ( See FIG. 21).

【0082】図22は、後記実施例13乃至16を説明
するためのブロック図である。501は入力された文書
画像データを記憶するための文書画像メモリ、506は
入力文書画像の黒連結成分の外接矩形を抽出する矩形抽
出部、502は抽出された矩形の情報を記憶する矩形メ
モリである。矩形抽出の処理は、入力文書画像を圧縮し
た画像に対して行なうようにしてもよい。507は矩形
を文字矩形と、それ以外の図・表矩形に分類する矩形分
類部である。この矩形分類の処理は、前記実施例8乃至
12または前記実施例1乃至と同様でよい。
FIG. 22 is a block diagram for explaining Embodiments 13 to 16 to be described later. Reference numeral 501 denotes a document image memory for storing input document image data; 506, a rectangle extracting unit for extracting a circumscribed rectangle of a black connected component of the input document image; 502, a rectangular memory for storing information on the extracted rectangle; is there. The rectangle extraction process may be performed on an image obtained by compressing the input document image. A rectangle classification unit 507 classifies rectangles into character rectangles and other figure / table rectangles. The processing of this rectangle classification is performed according to the eighth to thirteenth embodiments.
12 or the same as in the first to seventh embodiments.

【0083】808は、水平罫線(水平セパレータ)を
識別する水平罫線識別部である。この水平罫線識別は、
例えば次のような処理によって行なわれる。矩形分類部
507の処理によって図・表矩形(文字矩形以外の矩
形)と分類された矩形の中で、その高さ(縦方向の大き
さ)が所定の閾値より小さく、かつ、幅(縦方向の大き
さ)が所定の閾値より大きい矩形を水平罫線の候補とし
て選ぶ。次に、水平罫線候補矩形の範囲の文書画像を水
平方向にスキャンすることにより、所定の閾値より長い
黒ランのみを抽出し、この長い黒ランのみの連結成分の
外接矩形を抽出する。そして、この長い黒ラン連結成分
の外接矩形の高さH1、幅W1と、もとの矩形の高さ
H、幅Wとの間で、H1/H>閾値(例えば0.8)か
つW1/W>閾値(例えば0.8)であれば、長い黒ラ
ン連結成分の外接矩形を水平罫線であると判定する。な
お、水平罫線矩形の判定のための閾値、及び黒ランの長
さの閾値は、矩形分類の閾値と同様に適応的に決定して
もよい。
Reference numeral 808 denotes a horizontal ruled line identification unit for identifying a horizontal ruled line (horizontal separator). This horizontal ruled line identification
For example, the following process is performed. Among the rectangles classified as figure / table rectangles (rectangles other than character rectangles) by the processing of the rectangle classification unit 507, the height (vertical size) is smaller than a predetermined threshold and the width (vertical direction) is smaller. Is selected as a candidate for a horizontal ruled line. Next, by scanning the document image in the range of the horizontal ruled line candidate rectangle in the horizontal direction, only black runs longer than a predetermined threshold are extracted, and a circumscribed rectangle of a connected component of only the long black runs is extracted. Then, between the height H1 and width W1 of the circumscribed rectangle of the long black run connected component and the height H and width W of the original rectangle, H1 / H> threshold (for example, 0.8) and W1 / If W> threshold (for example, 0.8), it is determined that the circumscribed rectangle of the long black run connected component is a horizontal ruled line. Note that the threshold value for determining the horizontal ruled line rectangle and the threshold value for the length of the black run may be adaptively determined in the same manner as the threshold value of the rectangle classification.

【0084】509は文字矩形の水平及び垂直方向の距
離に関し統合閾値によって統合判定を行ない、統合条件
を満たす文字矩形を統合して行を生成する行抽出部であ
る。ただし、水平罫線識別部508で抽出された水平罫
線の矩形も、架空の行として抽出する。統合閾値は予め
与えられるか、あるいは矩形の高さのヒストグラム等に
基づいて適応的に決定される。503は抽出された行の
情報を記憶する行メモリである。
Reference numeral 509 denotes a line extraction unit that performs integration determination on the horizontal and vertical distances of the character rectangles based on the integration threshold and integrates the character rectangles that satisfy the integration conditions to generate a line. However, the rectangle of the horizontal ruled line extracted by the horizontal ruled line identification unit 508 is also extracted as an imaginary line. The integration threshold is given in advance or is determined adaptively based on a histogram of the height of the rectangle. A row memory 503 stores information on the extracted rows.

【0085】510は生成された行を統合し文字領域を
生成する文字領域生成部である。505は生成された文
字領域の情報を記憶するための領域メモリである。行統
合の処理は、統合しようとする行間の距離と統合閾値と
を比較することによって統合可否を判定し、可能な行間
を統合するという方法で行なわれるが、この統合判定の
際に水平罫線識別部508により抽出された水平罫線の
存在に応じて統合閾値が変更される。504は行統合の
ための統合閾値が格納される統合閾値メモリである。5
11は文字領域生成部510の行統合によって生成され
た文字領域に対して、統合し切れなかった領域の再統合
を行ない文字領域を修正する文字領域修正部である。5
12は前記各部を制御する制御部である。
Reference numeral 510 denotes a character area generation unit that integrates the generated lines to generate a character area. Reference numeral 505 denotes an area memory for storing information on the generated character area. The process of line integration is performed by comparing the distance between lines to be integrated with an integration threshold to determine whether or not integration is possible, and integrating possible lines. In this integration determination, horizontal ruled line identification is performed. The integration threshold is changed according to the presence of the horizontal ruled line extracted by the unit 508. An integration threshold memory 504 stores an integration threshold for row integration. 5
Reference numeral 11 denotes a character region correction unit that corrects a character region by reintegrating a region that has not been completely integrated into a character region generated by the line integration of the character region generation unit 510. 5
Reference numeral 12 denotes a control unit that controls the above-described units.

【0086】以下、実施例13乃至16について個別に
説明する。ただし、文書上の行は横方向であると仮定す
る。
Hereinafter, Examples 13 to 16 will be described individually. However, it is assumed that the lines on the document are horizontal.

【0087】実施例13 矩形抽出部506での矩形抽出、矩形分類部507によ
る矩形分類、水平罫線識別部508による垂直罫線抽
出、行抽出部509による行抽出に続いて、文字領域生
成部510による文字領域生成が行なわれる。
Embodiment 13 A rectangle extraction unit 506 extracts a rectangle, a rectangle classification unit 507 classifies a rectangle, a horizontal ruled line identification unit 508 extracts a vertical ruled line, and a line extraction unit 509 extracts a line. Character area generation is performed.

【0088】図23は文字領域生成処理の概略フローを
示す。文字領域生成の基本的な処理は、注目した行と他
の行間の水平距離(p1)及び垂直距離(p2)と、予
め標準文字サイズ等から定められて統合閾値メモリ30
3に格納されている水平統合閾値(Th1)及び垂直統
合閾値(Th2)とを比較し、統合閾値より近接した矩
形を統合するというものであるが、図23に示すよう
に、水平罫線たる架空行に関連して垂直統合閾値の変更
操作が行なわれる。
FIG. 23 shows a schematic flow of the character area generating process. The basic processing for generating the character area is performed by determining the horizontal distance (p1) and the vertical distance (p2) between the line of interest and another line, the standard character size, and the like in advance.
3 is compared with the horizontal integration threshold value (Th1) and the vertical integration threshold value (Th2) stored in No. 3 and rectangles closer than the integration threshold value are integrated. As shown in FIG. An operation of changing the vertical integration threshold is performed in relation to the row.

【0089】すなわち、新しい行Aを選択し(ステップ
520)、垂直統合閾値をTh2とする(ステップ52
2)。注目した行Aより下へ向かって、垂直距離が垂直
統合閾値Th2以内かつ水平距離が水平統合閾値Th1
以内の範囲で、行(水平罫線矩形も架空行として含め
る)をサーチし、見つかった行が水平罫線であるか判定
する(ステップ524)。その行が本来の行である場合
には、注目行Aと統合し(ステップ526)、次の行の
サーチを行なう。
That is, a new row A is selected (step 520), and the vertical integration threshold is set to Th2 (step 52).
2). Below the noted row A, the vertical distance is within the vertical integration threshold Th2 and the horizontal distance is the horizontal integration threshold Th1.
A line (including a horizontal ruled line rectangle as an imaginary line) is searched within the range of, and it is determined whether or not the found line is a horizontal ruled line (step 524). If the line is the original line, it is integrated with the line of interest A (step 526), and the search for the next line is performed.

【0090】サーチされた行が水平罫線(架空行)であ
る場合には、当然にその水平罫線との統合を行なわな
い。そして、注目している行Aと水平罫線とが水平方向
に重なりを持っているか調べ(ステップ530)、重な
りがある場合には、注目している行Aから水平罫線の中
心線までの距離Th2’を、垂直統合閾値に設定し直し
(ステップ532)、次の矩形のサーチを行なう。
If the searched line is a horizontal ruled line (an imaginary line), the line is naturally not integrated with the horizontal ruled line. Then, it is checked whether or not the line of interest A and the horizontal ruled line overlap in the horizontal direction (step 530). If there is an overlap, the distance Th2 from the line of interest A to the center line of the horizontal ruled line is determined. Is reset to the vertical integration threshold (step 532), and a search for the next rectangle is performed.

【0091】行Aに関して、垂直統合閾値(Th1また
はTh1’)以下の垂直距離範囲内に次の行が見つから
なくなるまで処理を繰り返すと(ステップ526)、ス
テップ520より別の注目行に関して処理を開始する。
When the processing is repeated for the row A until the next row is not found within the vertical distance range equal to or less than the vertical integration threshold (Th1 or Th1 ') (step 526), the processing starts from step 520 for another target row. I do.

【0092】水平罫線が存在する場合の具体例を図24
により説明する。図24の(a)において、行Aに関す
る行統合中に水平罫線542と遭遇した場合、この水平
罫線542は行Aと重なりがあるので、垂直統合閾値は
Th2からTh2’へ変更される結果、垂直統合閾値が
Th2であれば次にサーチされ統合されるはずであった
行B543は、行Aと統合されなくなる。よって、行A
を含む文字領域544と、水平罫線(水平セパレータ)
542により区切られた行B543とが正しく分離され
る。
FIG. 24 shows a specific example when a horizontal ruled line exists.
This will be described below. In FIG. 24A, when the horizontal ruled line 542 is encountered during the line integration for the row A, this vertical ruled line 542 overlaps with the row A, so that the vertical integration threshold is changed from Th2 to Th2 ′. If the vertical integration threshold is Th2, row B 543, which was to be searched and integrated next, is no longer integrated with row A. Thus, row A
Character area 544 including a horizontal ruled line (horizontal separator)
The row B 543 separated by 542 is correctly separated.

【0093】図24の(b)において、行Aに関して水
平罫線546がサーチされる。しかし、この水平罫線5
46は、水平方向について注目行A540と重なりを持
たないため、垂直統合閾値はTh2のままである。した
がって、次の行B543がサーチされて行A540と統
合され、行A540及び行B543を含む文字領域54
8が生成される。すなわち、この水平罫線546は、少
なくとも行A540と行B543との間の水平セパレー
タではないので、その存在を無視して行統合が行なわれ
る。
In FIG. 24B, a horizontal ruled line 546 is searched for row A. However, this horizontal ruled line 5
Since the line 46 does not overlap the line of interest A 540 in the horizontal direction, the vertical integration threshold value remains at Th2. Therefore, the next line B543 is searched and integrated with line A540, and the character area 54 including line A540 and line B543 is searched.
8 is generated. That is, since the horizontal ruled line 546 is not a horizontal separator at least between the row A 540 and the row B 543, the existence of the horizontal ruled line 546 is ignored and the line integration is performed.

【0094】実施例14 前記実施例13と同様に、文字領域生成(行統合)の処
理において、注目する行と重なりのある水平罫線が存在
した場合に垂直統合閾値を変更するが、その変更する値
の決定方法が異なる。これ以外は前記実施例13と同様
である。
Embodiment 14 In the same manner as in Embodiment 13 , in the process of character area generation (line integration), if there is a horizontal ruled line overlapping the line of interest, the vertical integration threshold is changed. The method of determining the value is different. Except for this, it is the same as the thirteenth embodiment .

【0095】図25は、垂直統合閾値の変更値の決定方
法の説明図である。注目している行A550の水平方向
の範囲(Xa1からXa2)と、水平罫線の矩形551
の垂直方向の範囲(Yr1からYr2)で決まるスキャ
ン範囲552に対して、画像を垂直方向にスキャンし、
あるスキャンライン上の水平罫線の存在位置(Yr3)
を求め、距離(Yr3−Ya2)を変更後の垂直統合閾
値とする。あるいは、全スキャンラインについて求めた
水平罫線の位置の平均値をYr3として、(Yr3−Y
ra)を変更後の垂直統合閾値としてもよい。
FIG. 25 is an explanatory diagram of a method for determining a change value of the vertical integration threshold. The horizontal range (Xa1 to Xa2) of the line A550 of interest and the rectangle 551 of the horizontal ruled line
The image is vertically scanned in a scan range 552 determined by the vertical range (Yr1 to Yr2) of
Existence position of a horizontal ruled line on a certain scan line (Yr3)
And the distance (Yr3-Ya2) is set as the changed vertical integration threshold. Alternatively, assuming that the average value of the horizontal ruled line positions obtained for all the scan lines is Yr3, (Yr3-Y
ra) may be set as the changed vertical integration threshold.

【0096】実施例15 前記実施例13と同様に、文字領域成処理において、注
目する行Aと重なりのある水平罫線が存在した場合に垂
直統合閾値を変更するが、その変更する値の決定方法が
異なる。これ以外は前記実施例13と同様である。
Fifteenth Embodiment As in the thirteenth embodiment , the vertical integration threshold is changed when there is a horizontal ruled line overlapping the line A of interest in the character area formation processing. Are different. Except for this, it is the same as the thirteenth embodiment .

【0097】図26は、垂直統合閾値の変更値の決定方
法の説明図である。図26(a)及び(b)において、
θはX軸(水平方向)を基準に予め測定した文書画像の
スキュー角度である。このスキュー角度の測定は、前記
実施例10において述べたような方法で行なえばよい。
ここで、X軸に対するスキューの傾き方向により以下の
ように場合分けする。 (a)はθ≧0の場合であり、注目矩形A553の対角
頂点座標と水平罫線の矩形554の対角頂点座標より、
次式 Th2’={ (Xa1+Xa2)/2-Xr1 }tanθ+Yr1-Ya2 によって垂直統合閾値の変更値Th2’を計算する。
FIG. 26 is an explanatory diagram of a method of determining a changed value of the vertical integration threshold. In FIGS. 26A and 26B,
θ is the skew angle of the document image measured in advance with reference to the X axis (horizontal direction). The measurement of the skew angle is as described above.
What is necessary is just to carry out by the method as described in the tenth embodiment .
Here, the following cases are classified according to the inclination direction of the skew with respect to the X axis. (A) is a case where θ ≧ 0, and is obtained from the diagonal vertex coordinates of the rectangle of interest A553 and the diagonal vertex coordinates of the rectangle 554 of the horizontal ruled line.
The change value Th2 'of the vertical integration threshold is calculated by the following equation: Th2' = {(Xa1 + Xa2) / 2-Xr1} tanθ + Yr1-Ya2.

【0098】(b)はθ<0の場合であり、矩形A55
3の対角頂点座標と水平罫線矩形555の対角頂点座標
より、次式 Th2’={ Xr2-(Xa1+Xa2)/2 }tanθ+Yr1-Ya2 によって垂直統合閾値の変更値Th2’を計算する。
(B) shows the case where θ <0, and the rectangle A55
From the diagonal vertex coordinates of No. 3 and the diagonal vertex coordinates of the horizontal ruled line rectangle 555, the change value Th2 'of the vertical integration threshold is calculated by the following equation: Th2' = {Xr2- (Xa1 + Xa2) / 2} tanθ + Yr1-Ya2.

【0099】実施例16 行統合による文字領域生成までの処理は前記実施例13
乃至15と同様であるが、次に文字領域修正部511に
より統合しきれなかった文字領域の再統合の処理を行な
う。この処理の概略フローを図27に示す。
Embodiment 16 The processing up to the generation of a character area by line integration is the same as that of the embodiment 13
15 to 15 , but the character area correcting unit 511 performs a reintegration process for character areas that could not be integrated. FIG. 27 shows a schematic flow of this processing.

【0100】図27の最初のステップ560は、行統合
の段階での処理である。このステップでは、注目行Aに
対して一定距離範囲内で下側に水平罫線が存在する場
合、生成した文字領域に「下側に水平罫線が存在する」
ということを示すマークRを付加する(ステップ56
2)。例えば図24(a)の文字領域544にマークR
が付けられる。
The first step 560 in FIG. 27 is a process at the stage of row integration. In this step, if a horizontal ruled line exists below the line of interest A within a certain distance range, “the horizontal ruled line exists below” in the generated character area.
Is added (step 56).
2). For example, in the character area 544 of FIG.
Is attached.

【0101】ステップ562以降が、文字領域再統合の
処理である。まず、新しい文字領域Aを選択する(ステ
ップ562)。この注目文字領域Aとの水平距離及び垂
直距離が一定値以下の文字領域をサーチし、見つかった
ならば、その文字領域がマークR付きの領域であるか調
べる(ステップ563)。マークR付き行でなければ、
統合を行ない(ステップ564)、次の文字領域のサー
チを行なうことになる。
Step 562 and subsequent steps correspond to the character area reintegration processing. First, a new character area A is selected (step 562). A character area whose horizontal distance and vertical distance from the target character area A are equal to or smaller than a predetermined value is searched, and if found, it is checked whether the character area is an area with a mark R (step 563). If the line is not marked R,
Integration is performed (step 564), and a search for the next character area is performed.

【0102】サーチした文字領域がマークR付き領域で
ある場合、この文字領域の垂直方向の終点座標(Yr
2)と文字領域Aの垂直方向の終点座標(Ya2)と
が、Ya2>Yr2の関係を満たすか判定する(ステッ
プ567)。この関係を満たさないときは統合を行なう
(ステップ564)が、関係を満たすときは統合を行な
わず次の文字領域のサーチに進む。
If the searched character area is an area with a mark R, the end point coordinates (Yr
It is determined whether 2) and the end point coordinates (Ya2) of the character area A in the vertical direction satisfy the relationship of Ya2> Yr2 (step 567). When this relationship is not satisfied, integration is performed (step 564). When the relationship is satisfied, integration is not performed and the process proceeds to the search for the next character area.

【0103】ステップ567の条件が満たされるために
統合が行なわれない例を図28に示す。文字領域569
はマークR付きであるので、注目文字領域A568とは
統合されない。このような文字領域は、水平罫線によっ
て区切られた別々の領域と看做すことができる。
FIG. 28 shows an example in which integration is not performed because the condition of step 567 is satisfied. Character area 569
Is marked with a mark R and is not integrated with the noted character area A568. Such character areas can be considered as separate areas separated by horizontal ruled lines.

【0104】図32は後記実施例17の説明のための図
である。図32の(a)は入力される文書の例を示す。
この文書において、660は縦横罫線で囲まれた表の領
域、661はグラフの領域、網掛けされた部分は文字領
域(一つ以上の文字あるいは行からなる領域)である。
FIG. 32 is a view for explaining Example 17 to be described later. FIG. 32A shows an example of an input document.
In this document, 660 is a table area surrounded by vertical and horizontal ruled lines, 661 is a graph area, and shaded parts are character areas (areas of one or more characters or lines).

【0105】従来、この文書の文字領域抽出を行なった
場合、図32(b)に示すように、グラフ領域661や
表領域660と、それに近接した文字領域とが誤って統
合されてしまいやすい。
Conventionally, when a character area is extracted from this document, as shown in FIG. 32B, the graph area 661 and the table area 660 and the character area adjacent thereto are likely to be mistakenly integrated.

【0106】後記実施例17によれば、このような文字
領域の誤統合を防止することによって、図32(a)の
文書に対して図32(c)に示すような領域分割が可能
となる。すなわち、後記実施例17によれば、図32
(c)に見られるように、グラフ領域661の最下部の
水平罫線663と表領域660の最上部の水平罫線66
4を、文字領域(コラム)の区切りのための架空の水平
セパレータとして認識することによって、それを境に上
下の文字領域を分離する。
According to the seventeenth embodiment , by preventing such erroneous integration of character regions, it becomes possible to divide the document shown in FIG. 32A into regions as shown in FIG. 32C. . That is, according to Example 17 described later, FIG.
As shown in (c), the lowermost horizontal ruled line 663 of the graph area 661 and the uppermost horizontal ruled line 66 of the table area 660 are displayed.
By recognizing 4 as an imaginary horizontal separator for separating a character area (column), the upper and lower character areas are separated from the boundary.

【0107】また、後記実施例18によれば、垂直方向
の架空セパレータを認識することによって、垂直方向に
近接した図・表領域と文字領域との誤統合を防止する。
Further, according to the eighteenth embodiment , by recognizing a vertical imaginary separator, erroneous integration between a vertically adjacent figure / table area and a character area is prevented.

【0108】図29は、後記実施例17及び18を説明
するためのブロック図である。図29において、601
は入力された文書画像データを記憶するための文書画像
メモリ、606は入力文書画像の黒連結成分の外接矩形
を抽出する矩形抽出部、602は抽出された矩形の情報
を記憶する矩形メモリである。607は抽出した矩形を
文字矩形と、それ以外のグラフや表などの大きな矩形に
分類する矩形分類部である。この分類結果の情報も矩形
メモリ602に記憶される。
FIG. 29 is a block diagram for explaining Embodiments 17 and 18 to be described later. Referring to FIG.
Is a document image memory for storing input document image data, 606 is a rectangle extracting unit that extracts a circumscribed rectangle of a black connected component of the input document image, and 602 is a rectangle memory that stores information on the extracted rectangle. . A rectangle classification unit 607 classifies the extracted rectangle into a character rectangle and other large rectangles such as graphs and tables. Information on this classification result is also stored in the rectangular memory 602.

【0109】608は、図・表矩形より水平罫線または
垂直罫線を抽出する罫線抽出部である。603は抽出さ
れた罫線の情報を記憶する罫線メモリである。609は
抽出された水平または垂直罫線が水平または垂直の架空
セパレータとして妥当であるか判定する架空セパレータ
検定部であり、604は架空セパレータの情報を記憶す
る架空セパレータメモリである。610は文字領域の生
成を行なう文字領域生成部であり、文字領域生成のため
の領域統合の際に架空セパレータを実際のセパレータと
して利用する。605は生成された文字領域の情報を記
憶する領域メモリである。611は以上の各部を制御す
る制御部である。
Reference numeral 608 denotes a ruled line extraction unit for extracting a horizontal ruled line or a vertical ruled line from a figure / table rectangle. A ruled line memory 603 stores information on the extracted ruled lines. Reference numeral 609 denotes an imaginary separator testing unit that determines whether the extracted horizontal or vertical ruled line is valid as a horizontal or vertical imaginary separator, and 604 denotes an imaginary separator memory that stores information on the imaginary separator. Reference numeral 610 denotes a character area generation unit that generates a character area, and uses a fictitious separator as an actual separator when integrating areas for generating a character area. An area memory 605 stores information of the generated character area. A control unit 611 controls the above units.

【0110】以下、実施例17及び18を個別に説明す
る。
Hereinafter, Examples 17 and 18 will be described individually.

【0111】実施例17 図30は架空セパレータを抽出するための処理の概略フ
ローを示す。矩形抽出部606によって抽出された矩形
の中から、幅(水平方向の大きさ)Wと高さHが、W>
LARGEHTHかつH>LARGEVTHの矩形
(1)を選ぶ(ステップ620,621)。これは矩形
分類部607の処理である。この矩形(1)は、図32
(a)に示した文書の表領域660やグラフ領域661
のような文字以外の大きな領域に相当するものである。
なお、閾値LARGEHTH及びLARGEVTHは、
予め与えられた値であるか、あるいは、矩形の高さのヒ
ストグラム等から適応的に決定した値である。
Embodiment 17 FIG. 30 shows a schematic flow of a process for extracting an imaginary separator. From the rectangles extracted by the rectangle extraction unit 606, the width (the size in the horizontal direction) W and the height H are W>
A rectangle (1) of LARGEHTH and H> LARGEVTH is selected (steps 620 and 621). This is the processing of the rectangle classification unit 607. This rectangle (1) is shown in FIG.
The table area 660 and the graph area 661 of the document shown in FIG.
It corresponds to a large area other than the character like.
Note that the threshold values LARGEHTH and LARGEVTH are
It is a value given in advance or a value adaptively determined from a histogram of the height of the rectangle.

【0112】次に、矩形(1)に対して罫線抽出部60
8で水平罫線の抽出を行なう(ステップ622)。具体
的には、矩形(1)の占める画像の範囲について水平方
向にスキャンして黒ランを検出し、閾値RUNHTH以
上の長さの黒ランを抽出し、この長い黒ランのみの連結
成分に外接した矩形(2)を水平罫線として抽出する。
この際、矩形(2)の幅W1と高さH1も抽出される。
抽出された矩形(2)の情報は罫線矩形メモリ603に
格納される。前記表領域660のような複数の水平罫線
を含む矩形(1)では、複数の矩形(2)が抽出される
ことになる。閾値RUNHTHは予め与えた値である
か、あるいは矩形の高さのヒストグラム等から適応的に
決定された値である。
Next, for the rectangle (1), the ruled line extracting unit 60
In step 8, a horizontal ruled line is extracted (step 622). More specifically, the range of the image occupied by the rectangle (1) is scanned in the horizontal direction to detect a black run, a black run having a length equal to or longer than the threshold value RUNHTH is extracted, and a circumscribed component is connected to only the long black run connected component. The extracted rectangle (2) is extracted as a horizontal ruled line.
At this time, the width W1 and the height H1 of the rectangle (2) are also extracted.
Information on the extracted rectangle (2) is stored in the ruled line rectangle memory 603. In the rectangle (1) including a plurality of horizontal ruled lines, such as the table area 660, a plurality of rectangles (2) are extracted. The threshold value RUNHTH is a value given in advance or a value adaptively determined from a histogram of the height of the rectangle.

【0113】次に、架空セパレータ検定部609におい
て、矩形(1)より抽出された水平罫線矩形(2)につ
いて架空水平セパレータとして妥当であるか検定する
(ステップ623,624)。次のa〜cの条件を全て
満足する矩形(2)は架空水平セパレータであると判定
され、その情報が架空セパレータメモリ604に格納さ
れる。
Next, in the fictitious separator verification section 609, it is verified whether the horizontal ruled line rectangle (2) extracted from the rectangle (1) is valid as a fictitious horizontal separator (steps 623 and 624). The rectangle (2) that satisfies all the following conditions a to c is determined to be a fictitious horizontal separator, and the information is stored in the fictitious separator memory 604.

【0114】 a)W1/W>閾値(例えば0.8) (ただし、Wは元の矩形(1)の幅) b)H1<閾値RLHeightTH (RLHeightTHは、予め与えられた値である
か、あるいHから自動的に決定される値) c)矩形(2)がupperまたはlowerである。
A) W1 / W> threshold value (for example, 0.8) (W is the width of the original rectangle (1)) b) H1 <threshold value RLHeighthTH (RLHeightTH is a predetermined value or is a certain value.) C) The rectangle (2) is upper or lower.

【0115】条件c)について、図31により説明す
る。図31(a)は矩形(1)としての表領域の一例を
示す。(b)はupperとlowerの説明図であ
り、630〜632は水平罫線の矩形(2)を示す。矩
形(1)の上辺よりある範囲RangeUTH内で最も
上にある矩形(2)がupperである。つまり、この
例では矩形630がupperである。また、矩形
(1)の下辺よりある範囲RangeLTH内で最も下
にある矩形(2)がlowerである。この例では、矩
形632がlowerである。
The condition c) will be described with reference to FIG. FIG. 31A shows an example of a table area as a rectangle (1). (B) is an explanatory diagram of upper and lower, and 630 to 632 show the horizontal ruled line rectangle (2). The uppermost rectangle (2) in the range RangeUTH from the upper side of the rectangle (1) is upper. That is, in this example, the rectangle 630 is the upper. The lowermost rectangle (2) in the range RangeLTH from the lower side of the rectangle (1) is the lower. In this example, the rectangle 632 is lower.

【0116】文字領域生成部610においては、以上の
ような処理により抽出された架空水平セパレータを前記
実施例13乃至16における水平罫線(水平セパレー
タ)と同じものとして扱って、前記実施例13乃至16
と同様の処理により文字矩形の統合を行なって文字領域
を生成し、生成した文字領域の情報を領域メモリ605
に格納する。
In the character area generation unit 610, the imaginary horizontal separator extracted by the above processing is
The same as the horizontal ruled lines (horizontal separators) in Embodiments 13 to 16 , the same as in Embodiments 13 to 16,
A character area is generated by integrating character rectangles by the same processing as that described above, and information on the generated character area is stored in the area memory 605.
To be stored.

【0117】実施例18 本実施例では、垂直方向の架空セパレータを抽出する。
すなわち、架空セパレータの抽出処理の全体的フローは
図23のように示されるが、セパレータの方向の違いに
応じてステップ622〜625の内容が変更される。
Embodiment 18 In this embodiment, a vertical imaginary separator is extracted.
That is, the overall flow of the process of extracting the imaginary separator is shown in FIG. 23, but the contents of steps 622 to 625 are changed according to the difference in the direction of the separator.

【0118】すなわち、ステップ622において、文字
以外の大きな矩形(1)の範囲内のの画像を垂直方向に
スキャンして黒ランを検出し、閾値RUNTH以上の長
さの黒ランのみの連結成分に外接する矩形(2)を抽出
する。つまり、垂直罫線の矩形を抽出する。
That is, in step 622, an image within the range of a large rectangle (1) other than a character is scanned in the vertical direction to detect a black run, and is converted into a connected component of only the black run having a length equal to or longer than the threshold value RUNTH. The circumscribed rectangle (2) is extracted. That is, the rectangle of the vertical ruled line is extracted.

【0119】ステップ623〜625で、矩形(1)よ
り抽出された全ての垂直罫線たる矩形(2)に対して、
架空垂直セパレータとしての妥当性を検定する。次のd
〜fの全ての条件を満足する矩形(2)を架空垂直セパ
レータと判定する。
In steps 623 to 625, the rectangle (2) as a vertical ruled line extracted from the rectangle (1) is
Test the validity as a fictitious vertical separator. Next d
The rectangle (2) that satisfies all of the conditions (f) to (f) is determined as the imaginary vertical separator.

【0120】 d)H1/H>閾値(例えば0.8) (ただし、Hは元の矩形(1)の高さ) e)W1<閾値RLWidthTH (RLWidthは、予め与えた値であるか、あるいは
適応的に決定される値) f)矩形(2)がleftまたはrithtである。
D) H1 / H> threshold (for example, 0.8) (where H is the height of the original rectangle (1)) e) W1 <threshold RLWidthTH (RLWidth is a predetermined value, or F) The rectangle (2) is left or right.

【0121】条件f)について、図31により説明す
る。図31(c)はleftとrightの説明図であ
り、634〜636は垂直罫線の矩形(2)を示す。矩
形(1)の左辺よりある範囲RangeLTH内で最も
左にある矩形(2)がleftである。この例では矩形
634がleftである。また、矩形(1)の右辺より
ある範囲RangeRTH内で最も右にある矩形(2)
がrightである。この例では、矩形635がrig
htである。
The condition f) will be described with reference to FIG. FIG. 31C is an explanatory diagram of left and right, and 634 to 636 show a rectangle (2) of a vertical ruled line. The leftmost rectangle (2) in the range RangeLTH from the left side of the rectangle (1) is left. In this example, the rectangle 634 is left. Also, the rightmost rectangle (2) in a range RangeRTH from the right side of the rectangle (1)
Is right. In this example, the rectangle 635 is rig
ht.

【0122】文字領域生成部610においては、以上の
ような処理により抽出された架空垂直セパレータを前記
実施例8乃至12における垂直罫線(垂直セパレータ)
と同じものとして扱って、前記実施例8乃至12と同様
の処理により文字矩形の統合を行なって文字領域を生成
し、生成した文字領域の情報を領域メモリ605に格納
する。
In the character area generation unit 610, the imaginary vertical separator extracted by the above processing is
Vertical ruled lines (vertical separator) in Examples 8 to 12
In the same manner as in Examples 8 to 12 , character rectangles are integrated to generate a character area by the same processing as in the eighth to twelfth embodiments , and information on the generated character area is stored in the area memory 605.

【0123】[0123]

【発明の効果】請求項1乃至の発明によれば、様々な
文字サイズの文書の画像に対して、文字の矩形と、それ
以外の矩形(図表矩形)とを正確に分類できるようにな
るため、文字矩形の集合たる文字領域の抽出精度が向上
する。請求項4の発明によれば、書籍や厚手の原稿から
読み取られた文書画像に対しても、中折れ部や周辺部に
生じる黒領域の影響を排除し、文字矩形、行または文字
領域を正確に抽出することができる。
According to the first to fourth aspects of the present invention, it is possible to accurately classify character rectangles and other rectangles (chart rectangles) in document images of various character sizes. Therefore, the extraction accuracy of a character area, which is a set of character rectangles, is improved. According to the fourth aspect of the present invention, even for a document image read from a book or a thick original, the influence of a black area generated in a bent portion or a peripheral part is eliminated, and a character rectangle, a line, or a character area can be accurately determined. Can be extracted.

【0124】請求項5乃至9の発明によれば、垂直セパ
レータまたは水平セパレータで区切られた文字領域(コ
ラム)の誤統合を防止し、それぞれの文字領域を正しく
分離できる。また、処理内容も簡便であって処理の高速
化が容易であり、さらに処理のために必要なメモリ量も
少なくて済む。
According to the fifth to ninth aspects of the present invention, erroneous integration of character areas (columns) separated by a vertical separator or a horizontal separator can be prevented, and each character area can be correctly separated. Further, the processing contents are simple, the processing can be speeded up easily, and the amount of memory required for the processing can be reduced.

【0125】請求項10または11の発明によれば、表
やグラフの領域と、それに接近した文字領域との誤統合
を防止し、領域分割の精度を大幅に向上できる。
According to the tenth or eleventh aspect of the present invention, it is possible to prevent erroneous integration between a table or graph area and a character area approaching the area, and greatly improve the accuracy of area division.

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

【図1】実施例1乃至実施例6の説明のためのブロック
図である。
FIG. 1 is a block diagram for explaining Examples 1 to 6.

【図2】処理概要の説明のための図である。 FIG. 2 is a diagram for explaining an outline of processing.

【図3】実施例1の矩形抽出から標準文字サイズ決定ま
での処理フロー図である。
FIG. 3 is a processing flowchart from rectangle extraction to standard character size determination in the first embodiment.

【図4】矩形の高さのヒストグラムの例を示す図であ
る。
FIG. 4 is a diagram showing an example of a histogram of rectangular heights;
You.

【図5】実施例2における文字矩形統合の説明図であ
る。
FIG. 5 is an explanatory diagram of character rectangle integration in a second embodiment.

【図6】文字矩形の統合により抽出された行を示す図で
ある。
FIG. 6 is a diagram showing lines extracted by integrating character rectangles.

【図7】実施例3における文字矩形統合による行抽出の
説明図である。
FIG. 7 is an explanatory diagram of line extraction by character rectangle integration in a third embodiment.

【図8】実施例5における行統合による文字領域抽出の
説明図である。
FIG. 8 is an explanatory diagram of character region extraction by line integration according to a fifth embodiment.

【図9】実施例5における行統合による文字領域抽出の
説明図である。
FIG. 9 is an explanatory diagram of character region extraction by line integration according to a fifth embodiment.

【図10】実施例6における大きな文字領域の統合の説
明図である。
FIG. 10 is an explanatory diagram of integration of a large character area according to a sixth embodiment.

【図11】実施例6における小さな文字領域の統合の説
明図である。
FIG. 11 is an explanatory diagram of integration of small character areas according to a sixth embodiment.

【図12】実施例7の説明のためのブロック図である。FIG. 12 is a block diagram for explaining a seventh embodiment ;

【図13】実施例7におけるノイズ矩形除去処理のフロ
ー図である。
FIG. 13 is a flowchart of noise rectangle removal processing according to a seventh embodiment.

【図14】実施例7におけるノイズ矩形除去の説明図で
ある。
FIG. 14 is an explanatory diagram of noise rectangle removal in a seventh embodiment .

【図15】実施例8乃至実施例12の説明のためのブロ
ック図である。
FIG. 15 is a block diagram for explaining Examples 8 to 12 ;

【図16】実施例8における行生成処理のフロー図であ
る。
FIG. 16 is a flowchart of a row generation process according to the eighth embodiment .

【図17】実施例8における行統合と垂直罫線との関係
の説明図である。
FIG. 17 shows a relationship between row integration and vertical ruled lines in the eighth embodiment .
FIG.

【図18】実施例9における垂直罫線までの距離の求め
方の説明図である。
FIG. 18 is an explanatory diagram of a method of obtaining a distance to a vertical ruled line according to the ninth embodiment .

【図19】実施例10における垂直罫線までの距離の求
め方の説明図である。
FIG. 19 is a diagram illustrating a distance to a vertical ruled line according to the tenth embodiment .
FIG.

【図20】実施例11における行統合処理のフロー図で
ある。
FIG. 20 is a flowchart of a row integration process according to the eleventh embodiment .

【図21】実施例11における行統合の説明図である。FIG. 21 is an explanatory diagram of row integration in the eleventh embodiment .

【図22】実施例13乃至実施例16の説明のためのブ
ロック図である。
FIG. 22 is a block diagram for explaining Embodiments 13 to 16 ;

【図23】実施例13における行統合処理のフロー図で
ある。
FIG. 23 is a flowchart of a row integration process according to the thirteenth embodiment .

【図24】実施例13における行統合と水平罫線との関
係の説明図である。
FIG. 24 is a diagram showing a relation between row integration and horizontal ruled lines in the thirteenth embodiment .
It is explanatory drawing of a person in charge.

【図25】実施例14における水平罫線までの距離の求
め方の説明図である。
FIG. 25 is an explanatory diagram of a method of obtaining a distance to a horizontal ruled line according to the fourteenth embodiment .

【図26】実施例15における水平罫線までの距離の求
め方の説明図である。
FIG. 26 is a diagram illustrating a distance to a horizontal ruled line according to the fifteenth embodiment;
FIG.

【図27】実施例16における文字領域再統合処理のフ
ロー図である。
FIG. 27 is a flowchart of a character area reintegration process according to the sixteenth embodiment .

【図28】実施例16における文字領域再統合の説明図
である。
FIG. 28 is an explanatory diagram of character area reintegration in the sixteenth embodiment .

【図29】実施例17及び実施例18の説明のためのブ
ロック図である。
FIG. 29 is a block diagram for explaining Embodiments 17 and 18 ;

【図30】実施例17における架空水平セパレータの抽
出処理のフロー図である。
FIG. 30 is a flowchart of an imaginary horizontal separator extraction process according to the seventeenth embodiment .

【図31】実施例17及び実施例18における架空セパ
レータ抽出の説明図である。
FIG. 31 is an imaginary separator according to the seventeenth and eighteenth embodiments .
It is explanatory drawing of lator extraction.

【図32】実施例17による文字領域の誤統合の防止の
説明図である。
FIG. 32 is an explanatory diagram of prevention of erroneous integration of character areas according to the seventeenth embodiment .

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

1,301,501,601 文書画像メモリ 2,302,502,602 矩形メモリ 3 ヒストグラムメモリ 4 標準文字サイズ保持メモリ 5,306,506,606 矩形抽出部 6 ヒストグラム生成部 7 標準文字サイズ決定部 8,307,507,607 矩形分類部 9,309,509 行抽出部 10,310,510 文字領域生成部 11,312,512,611 制御部 12,304,503 行メモリ 13,305,505,605 領域メモリ 201 ノイズ矩形除去部 303,504 統合閾値メモリ 308 垂直罫線識別部 311,211 文字領域修正部 508 水平罫線識別部 603 罫線メモリ 604 架空セパレータメモリ 608 罫線抽出部 609 架空セパレータ検定部 610 文字領域生成部 1,301,501,601 Document image memory 2,302,502,602 Rectangular memory 3 Histogram memory 4 Standard character size holding memory 5,306,506,606 Rectangular extracting unit 6 Histogram generating unit 7 Standard character size determining unit 8, 307, 507, 607 Rectangle classification unit 9, 309, 509 Line extraction unit 10, 310, 510 Character region generation unit 11, 312, 512, 611 Control unit 12, 304, 503 Line memory 13, 305, 505, 605 Region memory 201 Noise rectangle removal unit 303,504 Integrated threshold memory 308 Vertical ruled line identification unit 311,211 Character area correction unit 508 Horizontal ruled line identification unit 603 Ruled line memory 604 Imaginary separator memory 608 Ruled line extraction unit 609 Imaginary separator test unit 610 Character region generation unit

Claims (11)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 文書画像より黒連結成分に外接した矩形
を抽出し、抽出した矩形の高さのヒストグラムより標準
文字サイズを決定し、抽出した矩形を、その大きさと標
準文字サイズとの大小関係に基づいて、文字の矩形とそ
れ以外の矩形とに分類し、文字矩形について、文字矩形
間の距離と前記標準文字サイズとに基づいて統合するか
否かを決定し、統合した文字矩形群の外接矩形を文字列
の行として抽出することを特徴とする領域分割方法。
1. A rectangle circumscribing a black connected component is extracted from a document image, a standard character size is determined from a histogram of the height of the extracted rectangle, and the extracted rectangle is determined by the size relation between the size and the standard character size. Is classified into character rectangles and other rectangles based on the character rectangle, and it is determined whether or not to combine the character rectangles based on the distance between the character rectangles and the standard character size. A region dividing method characterized by extracting a circumscribed rectangle as a line of a character string.
【請求項2】 請求項1記載の領域分割方法において、
文字矩形間の距離と前記標準文字サイズに加えて、文字
矩形間の重なり量と文字矩形の高さに基づいて、文字矩
形を統合するか否かを決定することを特徴とする領域分
類方法。
2. The area dividing method according to claim 1, wherein
An area classification method characterized by determining whether or not to combine character rectangles based on the overlap amount between character rectangles and the height of character rectangles, in addition to the distance between character rectangles and the standard character size.
【請求項3】 文書画像より黒連結成分に外接した矩形
を抽出し、抽出した矩形の高さのヒストグラムより標準
文字サイズを決定し、抽出した矩形を、その大きさと標
準文字サイズとの大小関係に基づいて、文字の矩形とそ
れ以外の矩形とに分類し、文字矩形を統合して該統合し
た文字矩形群の外接矩形を文字列の行として抽出し、抽
出した文字列行について、文字列行間の距離と前記標準
文字サイズとに基づいて統合するか否か決定し、統合し
た文字列行を文字領域として抽出することを特徴とする
領域分割方法。
3. A rectangle circumscribing a black connected component is extracted from a document image, a standard character size is determined from a histogram of the heights of the extracted rectangles, and the extracted rectangle is determined by the size relationship between the size and the standard character size. Are classified into character rectangles and other rectangles based on the character strings, the character rectangles are integrated, and a circumscribed rectangle of the integrated character rectangle group is extracted as a character string line. An area dividing method characterized by determining whether to integrate based on a distance between lines and the standard character size, and extracting the integrated character string line as a character area.
【請求項4】 請求項1,2または3記載の領域分割方
法において、文書画像の処理対象領域の境界に接してい
文字以外の矩形をノイズとして除去することを特徴と
する領域分割方法。
4. The method of claim 1, 2 or 3 the area dividing method according, in contact with the boundary of the processing region of the document image
Area dividing method characterized by removing rectangular except that character as noise.
【請求項5】 文書画像より、文字に対応した黒連結成
分に外接した矩形を抽出し、抽出した文字の矩形の統合
により行を生成する領域分割方法において、 文書画像より垂直罫線を抽出し、 ある注目した矩形より矩形の統合を行なう際に、当該注
目矩形との水平距離が水平方向の統合条件である矩形間
距離の閾値より小さく、かつ、当該注目矩形と垂直方向
の重なりを持つ垂直罫線と遭遇した場合、当該注目領域
に関し、水平方向の統合条件である矩形間距離の閾値
を、当該注目矩形と当該垂直罫線との水平距離に対応し
た値に変更することを特徴とする領域分割方法。
5. A region dividing method for extracting a rectangle circumscribing a black connected component corresponding to a character from a document image and generating a line by integrating the rectangle of the extracted character, extracting a vertical ruled line from the document image, When merging rectangles from a given rectangle, a vertical ruled line whose horizontal distance to the rectangle of interest is smaller than the threshold value of the distance between rectangles, which is a horizontal integration condition, and which overlaps the rectangle of interest vertically Wherein the threshold value of the distance between rectangles, which is a horizontal integration condition, is changed to a value corresponding to the horizontal distance between the rectangle of interest and the vertical ruled line for the region of interest. .
【請求項6】 文書画像より、文字に対応した黒連結成
分に外接した矩形を抽出し、抽出した文字の矩形の統合
により行を生成し、生成した行の統合により文字領域を
生成する領域分割方法において、 文書画像より垂直罫線を抽出し、 ある注目した矩形より矩形の統合を行なう際に、当該注
目矩形との水平距離が水平方向の統合条件である矩形間
距離の閾値より小さく、かつ、当該注目矩形と垂直方向
の重なりを持つ垂直罫線と遭遇した場合、当該注目領域
に関し、水平方向の統合条件である矩形間距離の閾値
を、当該注目矩形と当該垂直罫線との水平距離に対応し
た値に変更し、 ある注目した行より行の統合を行なう際に、統合しよう
とする行が、その生成時に垂直罫線との遭遇により水平
統合条件たる矩形間距離の閾値を変更したものである場
合、当該統合しようとする行の水平方向の終点座標より
当該注目行の水平方向の終点座標が大きいときには、当
該統合しようとする行の統合を禁止することを特徴とす
る領域分割方法。
6. An area division for extracting a rectangle circumscribing a black connected component corresponding to a character from a document image, generating a line by integrating the extracted character rectangles, and generating a character area by integrating the generated lines. In the method, a vertical ruled line is extracted from a document image, and when a rectangle is integrated from a certain rectangle of interest, a horizontal distance to the rectangle of interest is smaller than a threshold value of a distance between rectangles, which is a horizontal integration condition, and When a vertical ruled line having a vertical overlap with the target rectangle is encountered, the threshold value of the distance between rectangles, which is a horizontal integration condition, for the target region is set to correspond to the horizontal distance between the target rectangle and the vertical ruled line. When merging lines from a certain line of interest, the line to be merged changes the threshold of the distance between rectangles, which is the horizontal merging condition, by encountering a vertical ruled line at the time of generation. In some cases, when the horizontal end point coordinates of the line of interest are larger than the horizontal end point coordinates of the line to be integrated, the integration of the lines to be integrated is prohibited.
【請求項7】 請求項6記載の領域分割方法において、
行統合により生成された文字領域について注目した文字
領域より文字領域の再統合を行ない、その際に、統合し
ようとする文字領域内の行の中に、その生成時に前記垂
直罫線との遭遇により水平方向の統合条件たる矩形間距
離の閾値を変更した行が含まれている場合、当該統合し
ようとする文字領域の水平方向の終点座標より当該注目
文字領域の水平方向の終点座標が大きいときには、当該
統合しようとする文字領域の統合を禁止することを特徴
とする領域分割方法。
7. A method according to claim 6 , wherein:
The character area generated by the line integration is re-integrated from the character area of interest, and at this time, a horizontal line in a line in the character area to be integrated is encountered due to encounter with the vertical ruled line at the time of generation. If a line in which the threshold value of the distance between rectangles as a direction integration condition is changed is included, and the horizontal end point coordinate of the target character area is larger than the horizontal end point coordinate of the character area to be integrated, A region dividing method characterized by prohibiting the integration of character regions to be integrated.
【請求項8】 文書画像より、文字に対応した黒連結成
分に外接した矩形を抽出し、抽出した文字の矩形の統合
により行を生成し、生成した行の統合により文字領域を
生成する領域分割方法において、 文書画像より水平罫線を抽出し、 ある注目した行より行の統合を行なう際に、当該注目行
との垂直距離が垂直方向の統合条件である行間距離の閾
値より小さく、かつ、当該注目行と水平方向の重なりを
持つ水平罫線と遭遇した場合、当該注目行に関し、垂直
方向の統合条件である行間距離の閾値を、当該注目行と
当該水平罫線との垂直距離に対応した値に変更すること
を特徴とする領域分割方法。
8. An area division for extracting a rectangle circumscribing a black connected component corresponding to a character from a document image, generating a line by integrating the extracted character rectangle, and generating a character area by integrating the generated lines. In the method, a horizontal ruled line is extracted from a document image, and when lines are integrated from a certain line of interest, a vertical distance from the line of interest is smaller than a threshold of a line-to-line distance that is a vertical integration condition, and When a horizontal ruled line having a horizontal overlap with the line of interest is encountered, the threshold value of the distance between lines, which is a vertical integration condition, is set to a value corresponding to the vertical distance between the line of interest and the horizontal ruled line for the line of interest. A region dividing method characterized by changing.
【請求項9】 請求項8記載の領域分割方法において、
行統合により生成された文字領域について注目した文字
領域より文字領域の再統合を行ない、その際に、統合し
ようとする文字領域内の行の中に、その生成時に前記水
平罫線との遭遇により垂直方向の統合条件たる行間距離
の閾値を変更した行が含まれている場合、当該統合しよ
うとする文字領域の垂直方向の終点座標より当該注目文
字領域の垂直方向の終点座標が大きいときには、当該統
合しようとする文字領域の統合を禁止することを特徴と
する領域分割方法。
9. The area dividing method according to claim 8 , wherein
The character area generated by the line integration is re-integrated from the character area of interest, and at this time, a line in the character area to be integrated is placed vertically by encountering the horizontal ruled line when it is generated. If a line in which the threshold value of the line-to-line distance as a direction integration condition is changed is included, and if the vertical end coordinate of the target character region is larger than the vertical end coordinate of the character region to be integrated, the integration is performed. A region dividing method characterized in that integration of character regions to be attempted is prohibited.
【請求項10】 請求項8記載の領域分割方法におい
て、 文書画像より文字以外の大きな黒連結成分に外接した矩
形を抽出し、 抽出した文字以外の矩形を水平方向にスキャンして閾値
以上の長い黒ランのみからなる黒連結成分に外接する矩
形Hを抽出し、 それぞれの文字以外の矩形より抽出された矩形Hの中
で、当該文字以外の矩形の上辺または下辺から所定距離
範囲内で最も上または最も下に位置し、かつ水平罫線と
しての形状条件を満足したものを架空水平セパレータと
して抽出し、 文字の矩形の統合による文字領域の生成の際に、前記架
空水平セパレータを文字領域を上下に区切る前記水平罫
線として扱うことを特徴とする領域分割方法。
10. A method according to claim 8 , wherein a rectangle circumscribing a large black connected component other than the character is extracted from the document image, and the rectangle other than the extracted character is scanned in the horizontal direction to obtain a long rectangle equal to or larger than the threshold value. A rectangle H circumscribing the black connected component consisting of only the black run is extracted, and among the rectangles H extracted from the rectangles other than the respective characters, the rectangle H extracted from the upper side or the lower side of the rectangle other than the character within a predetermined distance range. Or, the one that satisfies the shape condition as the horizontal ruled line and is extracted as a fictitious horizontal separator is extracted.When the character area is generated by integrating the character rectangles, the fictitious horizontal separator is moved up and down the character area. An area dividing method, wherein the area is treated as the horizontal ruled line to be separated.
【請求項11】 請求項6記載の領域分割方法におい
て、 文書画像より文字以外の大きな黒連結成分に外接した矩
形を抽出し、 抽出した文字以外の矩形を垂直方向にスキャンして閾値
以上の長い黒ランのみからなる黒連結成分に外接する矩
形Vを抽出し、 それぞれの文字以外の矩形より抽出された矩形Vの中
で、当該文字以外の矩形の左辺または右辺から所定距離
範囲内で最も左または最も右に位置し、かつ垂直罫線と
しての形状条件を満足したものを架空垂直セパレータと
して抽出し、 文字の矩形の統合による文字領域の生成の際に、前記架
空垂直セパレータを文字領域を左右に区切る前記垂直罫
線として扱うことを特徴とする領域分割方法。
11. The area dividing method according to claim 6 , wherein a rectangle circumscribing a large black connected component other than a character is extracted from a document image, and the extracted rectangle other than the character is scanned in a vertical direction to obtain a longer rectangle than a threshold. A rectangle V circumscribing the black connected component consisting of only the black run is extracted, and among the rectangles V extracted from the rectangles other than the respective characters, the leftmost within a predetermined distance from the left side or the right side of the rectangle other than the character is extracted. Or, the one that satisfies the shape condition as the vertical ruled line and is extracted as the imaginary vertical separator is extracted as the imaginary vertical separator. An area dividing method, wherein the area is treated as the vertical ruled line to be divided.
JP26731392A 1991-11-29 1992-10-06 Area division method Expired - Lifetime JP3278471B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP26731392A JP3278471B2 (en) 1991-11-29 1992-10-06 Area division method
US08/396,585 US5757957A (en) 1991-11-29 1995-03-01 Apparatus and method for area separation for image, having improved separation accuracy

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP3-341889 1991-11-29
JP34188991 1991-11-29
JP26731392A JP3278471B2 (en) 1991-11-29 1992-10-06 Area division method

Publications (2)

Publication Number Publication Date
JPH05233873A JPH05233873A (en) 1993-09-10
JP3278471B2 true JP3278471B2 (en) 2002-04-30

Family

ID=26547815

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26731392A Expired - Lifetime JP3278471B2 (en) 1991-11-29 1992-10-06 Area division method

Country Status (2)

Country Link
US (1) US5757957A (en)
JP (1) JP3278471B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7508988B2 (en) 2004-03-09 2009-03-24 Ricoh Company, Ltd. Method, program and apparatus for image processing capable of effectively performing image transmission, and a medium storing the program
US8027061B2 (en) 2007-05-15 2011-09-27 Ricoh Company, Ltd. Security encoding unit and image forming apparatus including same

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2171432T3 (en) * 1993-12-10 2002-09-16 Ricoh Kk APPARATUS AND METHODS TO RECOGNIZE A SPECIFIC IMAGE FROM AN INPUT IMAGE SIGNAL.
EP0692767B1 (en) * 1994-07-13 2003-10-08 Canon Kabushiki Kaisha Image processing apparatus and method
JP3335009B2 (en) 1994-09-08 2002-10-15 キヤノン株式会社 Image processing method and image processing apparatus
JP3425834B2 (en) * 1995-09-06 2003-07-14 富士通株式会社 Title extraction apparatus and method from document image
US6389162B2 (en) 1996-02-15 2002-05-14 Canon Kabushiki Kaisha Image processing apparatus and method and medium
US6226402B1 (en) 1996-12-20 2001-05-01 Fujitsu Limited Ruled line extracting apparatus for extracting ruled line from normal document image and method thereof
US6327387B1 (en) 1996-12-27 2001-12-04 Fujitsu Limited Apparatus and method for extracting management information from image
US5892843A (en) * 1997-01-21 1999-04-06 Matsushita Electric Industrial Co., Ltd. Title, caption and photo extraction from scanned document images
US6298173B1 (en) 1997-10-03 2001-10-02 Matsushita Electric Corporation Of America Storage management system for document image database
JP3601658B2 (en) * 1997-12-19 2004-12-15 富士通株式会社 Character string extraction device and pattern extraction device
US6327388B1 (en) 1998-08-14 2001-12-04 Matsushita Electric Industrial Co., Ltd. Identification of logos from document images
JP4129898B2 (en) * 1999-04-23 2008-08-06 株式会社リコー Character size estimation method and apparatus
JP2001016623A (en) * 1999-06-30 2001-01-19 Agilent Technologies Japan Ltd Test method for image pickup element
JP2004164551A (en) * 2002-06-24 2004-06-10 Ricoh Co Ltd Data recording body, recording medium reader and recording medium reading method
JP2005073015A (en) * 2003-08-26 2005-03-17 Canon Inc Device and method for image processing and computer program
US7602995B2 (en) * 2004-02-10 2009-10-13 Ricoh Company, Ltd. Correcting image distortion caused by scanning
JP4598426B2 (en) * 2004-03-30 2010-12-15 富士通株式会社 Boundary extraction method, program, and apparatus using the same
JP4671885B2 (en) 2005-06-01 2011-04-20 株式会社リコー Image processing apparatus, program, and image processing method
JP2007299321A (en) 2006-05-02 2007-11-15 Ricoh Co Ltd Information processor, information processing method, information processing program and information storage medium
JP4854398B2 (en) * 2006-06-27 2012-01-18 キヤノン株式会社 Image processing apparatus, image processing method, and program
EP2001216A1 (en) * 2007-06-08 2008-12-10 Ricoh Company, Ltd. Security encoding unit and image forming apparatus including same
US8411970B2 (en) 2010-03-16 2013-04-02 Pixia Corp. Method and system for determining statistical data for image pixels having a higher bit depth per band
JP5601027B2 (en) 2010-05-24 2014-10-08 富士ゼロックス株式会社 Image processing apparatus and image processing program
US9576230B2 (en) * 2010-07-06 2017-02-21 Marcelo Amaral Rezende Dot code pattern for absolute position and other information using an optical pen, process of printing the dot code, process of reading the dot code
US8837830B2 (en) * 2012-06-12 2014-09-16 Xerox Corporation Finding text in natural scenes
WO2018003074A1 (en) * 2016-06-30 2018-01-04 楽天株式会社 Image processing device, image processing method, and image processing program
US20230094787A1 (en) * 2021-09-30 2023-03-30 Adobe Inc. Utilizing machine-learning based object detection to improve optical character recognition

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55162177A (en) * 1979-05-31 1980-12-17 Matsushita Electric Ind Co Ltd Picture extraction system
DE3107521A1 (en) * 1981-02-27 1982-09-16 Siemens AG, 1000 Berlin und 8000 München METHOD FOR AUTOMATICALLY DETECTING IMAGE AND TEXT OR GRAPHIC AREAS ON PRINT ORIGINALS
DE3113555A1 (en) * 1981-04-03 1982-10-21 Siemens AG, 1000 Berlin und 8000 München METHOD FOR AUTOMATICALLY RECOGNIZING WHITE BLOCKS AND TEXT, GRAPHIC AND / OR GRAY IMAGE AREAS ON PRINT ORIGINALS
US4741046A (en) * 1984-07-27 1988-04-26 Konishiroku Photo Industry Co., Ltd. Method of discriminating pictures
JP2822189B2 (en) * 1988-05-19 1998-11-11 ソニー株式会社 Character recognition apparatus and method
EP0358815B1 (en) * 1988-09-12 1993-05-26 Océ-Nederland B.V. System and method for automatic segmentation
JP2939985B2 (en) * 1989-03-27 1999-08-25 松下電器産業株式会社 Image processing device
JP2940936B2 (en) * 1989-06-06 1999-08-25 株式会社リコー Tablespace identification method
JPH03126181A (en) * 1989-10-11 1991-05-29 Oki Electric Ind Co Ltd Area dividing method for document image
US5050222A (en) * 1990-05-21 1991-09-17 Eastman Kodak Company Polygon-based technique for the automatic classification of text and graphics components from digitized paper-based forms
US5335290A (en) * 1992-04-06 1994-08-02 Ricoh Corporation Segmentation of text, picture and lines of a document image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7508988B2 (en) 2004-03-09 2009-03-24 Ricoh Company, Ltd. Method, program and apparatus for image processing capable of effectively performing image transmission, and a medium storing the program
US8027061B2 (en) 2007-05-15 2011-09-27 Ricoh Company, Ltd. Security encoding unit and image forming apparatus including same

Also Published As

Publication number Publication date
JPH05233873A (en) 1993-09-10
US5757957A (en) 1998-05-26

Similar Documents

Publication Publication Date Title
JP3278471B2 (en) Area division method
CN111814722B (en) Method and device for identifying table in image, electronic equipment and storage medium
US5410611A (en) Method for identifying word bounding boxes in text
US5452374A (en) Skew detection and correction of a document image representation
US5539841A (en) Method for comparing image sections to determine similarity therebetween
US6035061A (en) Title extracting apparatus for extracting title from document image and method thereof
JP4771804B2 (en) Layout analysis program, layout analysis apparatus, layout analysis method
US5140650A (en) Computer-implemented method for automatic extraction of data from printed forms
JP3576570B2 (en) Comparison method
US5748809A (en) Active area identification on a machine readable form using form landmarks
JP3904840B2 (en) Ruled line extraction device for extracting ruled lines from multi-valued images
JP3215163B2 (en) Ruled line identification method and area identification method
JP3285686B2 (en) Area division method
Bhaskar et al. Implementing optical character recognition on the android operating system for business cards
JP3187895B2 (en) Character area extraction method
JP3476595B2 (en) Image area division method and image binarization method
US7103220B2 (en) Image processing apparatus, method and program, and storage medium
JPH07230525A (en) Method for recognizing ruled line and method for processing table
JP3019897B2 (en) Line segmentation method
JP4731748B2 (en) Image processing apparatus, method, program, and storage medium
JPH0728935A (en) Document image processor
JPH09288714A (en) Method and device for recognizing table
JPH0728934A (en) Document image processor
JP3100825B2 (en) Line recognition method
JPH09269970A (en) Method for recognizing character and its device

Legal Events

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

Free format text: PAYMENT UNTIL: 20080215

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090215

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100215

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110215

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120215

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130215

Year of fee payment: 11

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130215

Year of fee payment: 11