JPH09120443A - Image processing method and apparatus - Google Patents
Image processing method and apparatusInfo
- Publication number
- JPH09120443A JPH09120443A JP7278910A JP27891095A JPH09120443A JP H09120443 A JPH09120443 A JP H09120443A JP 7278910 A JP7278910 A JP 7278910A JP 27891095 A JP27891095 A JP 27891095A JP H09120443 A JPH09120443 A JP H09120443A
- Authority
- JP
- Japan
- Prior art keywords
- image
- text
- attribute
- unit
- image processing
- 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.)
- Withdrawn
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Image Analysis (AREA)
- Processing Or Creating Images (AREA)
Abstract
(57)【要約】
【課題】 入力画像を属性分離し、その統計情報を生成
して、後の画像の検索を容易にすることができる画像処
理方法とその装置を提供する。
【解決手段】 画像を入力(1、2)し、入力された画
像を、所定の属性の部分画像に分離し(4)、生成され
た同じ属性の部分画像の統計を取り(5)、生成された
前記部分画像の統計結果の画像を形成する(6)。
(57) Abstract: An image processing method and apparatus capable of separating attributes of an input image and generating statistical information thereof to facilitate subsequent image retrieval. SOLUTION: An image is input (1, 2), the input image is separated into partial images having a predetermined attribute (4), statistics of the generated partial images having the same attribute are taken (5), and the partial images are generated. An image of the statistical result of the partial image thus formed is formed (6).
Description
【0001】[0001]
【発明の属する技術分野】本発明は、画像処理方法とそ
の装置に関し、特に、入力画像を属性分離し、その統計
情報を生成して画像形成する画像処理方法とその装置に
関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method and an apparatus therefor, and more particularly to an image processing method and an apparatus for separating an input image from attributes and generating statistical information of the input image to form an image.
【0002】[0002]
【従来の技術】従来の複写機は、画像をスキャナーで入
力して、入力した画像に対して、ノイズ除去、量子化な
どの各種画像処理を行い、画像形成を行っていた。2. Description of the Related Art In a conventional copying machine, an image is input by a scanner, and various image processing such as noise removal and quantization is performed on the input image to form an image.
【0003】[0003]
【発明が解決しようとする課題】しかしながら、近年、
複写機では、単にコピーの機能だけではなく、入力画像
の属性情報も抽出して、例えば、それを検索キーとし
て、対応画像を検索したい等の必要性が生じてきた。本
発明は、上記従来例に鑑みてなされたもので、入力画像
を属性分離し、その統計情報を生成して、後の画像の検
索を容易にする画像処理方法とその装置を提供すること
を目的とする。However, in recent years,
In the copying machine, it is necessary to extract not only the copy function but also the attribute information of the input image and use it as a search key to search for the corresponding image. The present invention has been made in view of the above-mentioned conventional example, and provides an image processing method and an apparatus thereof for separating attributes of an input image, generating statistical information thereof, and facilitating subsequent image retrieval. To aim.
【0004】[0004]
【課題を解決するための手段】上記目的を達成するた
め、本発明の画像処理方法とその装置は以下の構成を備
える。即ち、画像を入力する画像入力工程と、前記画像
入力工程で入力された画像を、所定の属性の部分画像に
分離する属性分離工程と、前記属性分離工程で生成され
た同じ属性の部分画像の統計を取る統計処理工程と、前
記統計処理工程で生成された前記部分画像の統計結果の
画像を形成する画像形成工程とを備える。In order to achieve the above object, an image processing method and apparatus according to the present invention have the following arrangement. That is, an image input step of inputting an image, an attribute separation step of separating the image input in the image input step into partial images of predetermined attributes, and a partial image of the same attribute generated in the attribute separation step. A statistical processing step of collecting statistics and an image forming step of forming an image of a statistical result of the partial image generated in the statistical processing step are provided.
【0005】また、別の発明は、画像を入力する画像入
力手段と、前記画像入力手段で入力された画像を、所定
の属性の部分画像に分離する属性分離手段と、前記属性
分離手段で生成された同じ属性の部分画像の統計を取る
統計処理手段と、前記統計処理手段で生成された前記部
分画像の統計結果の画像を形成する画像形成手段とを備
える。Another aspect of the invention is image input means for inputting an image, attribute separation means for separating the image input by the image input means into partial images having a predetermined attribute, and generation by the attribute separation means. The statistical processing means for obtaining the statistics of the partial images having the same attribute, and the image forming means for forming the image of the statistical result of the partial images generated by the statistical processing means.
【0006】[0006]
【発明の実施の形態】以下、本発明の実施の形態により
詳しく説明する。図1は、本発明の一実施の形態の画像
処理装置の構成を示すブロック図である。図1におい
て、1は、画像を取り込むスキャナ部、2は、メモリコ
ントロール部、3はメモリ部、4は、読み込まれた画像
情報の特徴に応じて属性分離を行う属性分離部、5は、
属性分離結果より各画像要素の分類内容や数量等の情報
をまとめた分類情報のリストを作成する作成部、6a
は、作成部5で作成されたリストを出力する出力部、6
bは、表示部(コントロールパネル)、7は、画像処理
装置のシステムを制御するシステム制御部である。BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail. FIG. 1 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention. In FIG. 1, 1 is a scanner unit that captures an image, 2 is a memory control unit, 3 is a memory unit, 4 is an attribute separation unit that performs attribute separation according to the characteristics of the read image information, and 5 is
A creation unit 6a that creates a list of classification information that summarizes information such as the classification content and quantity of each image element based on the attribute separation result.
Is an output unit for outputting the list created by the creating unit 5, 6
Reference numeral b is a display unit (control panel), and reference numeral 7 is a system control unit that controls the system of the image processing apparatus.
【0007】次に、全体の動作原理を図1に基づいて説
明する。スキャナ部1により、原稿をスキャンして文書
画像を読み込み、システム制御部7により制御されたメ
モリコントロール部2を介して、メモリ部3に記憶され
る。メモリコントロール部2により読みだされた画像情
報は、属性分離部4に供給され、読み込まれた画像情報
の特徴に応じて各画像要素(文字部、タイトル部、写真
部等)に分離する属性分離を行った後、その属性分離結
果を作成部5に供給する。この時、同時に作成部5にリ
スト作成制御信号がシステム制御部7より供給され、こ
のシステム制御部7の制御信号により、属性分離部4か
ら送られてきた属性分離結果より各画像要素の分類名
と、数量等(例えば、タイトル部=有・無等)の情報を
まとめた分類情報として分類情報リストを作成する。Next, the overall operation principle will be described with reference to FIG. The scanner unit 1 scans a document to read a document image, and the document image is stored in the memory unit 3 via the memory control unit 2 controlled by the system control unit 7. The image information read by the memory control unit 2 is supplied to the attribute separation unit 4 and is separated into image elements (character portion, title portion, photograph portion, etc.) according to the characteristics of the read image information. After that, the attribute separation result is supplied to the creation unit 5. At this time, at the same time, a list creation control signal is supplied from the system control unit 7 to the creation unit 5, and according to the control signal of the system control unit 7, the classification name of each image element is obtained from the attribute separation result sent from the attribute separation unit 4. Then, a classification information list is created as classification information in which information such as quantity (for example, title part = present / absent) is collected.
【0008】図2は、以上の処理の処理例を示す。20
は、属性分離部4で、入力画像を各画像要素に分離した
結果の一例を示す画面である。即ち、各四角で囲まれた
タイトル部、表部に分離された例を示す。そして、この
分離情報を作成部5に入力し、21に示したような分類
名とその個数の分類情報リストを生成する。この分類情
報リストと対応する画像は、内蔵するメモリ8に記憶さ
れる。FIG. 2 shows a processing example of the above processing. 20
3 is a screen showing an example of the result of separating the input image into image elements by the attribute separating unit 4. That is, an example in which the title part and the front part surrounded by each square are separated is shown. Then, this separation information is input to the creation unit 5, and a classification information list of classification names and the number thereof as shown in 21 is generated. Images corresponding to this classification information list are stored in the built-in memory 8.
【0009】後に、この分類情報リストの属性名を用い
て、対応する画像を検索することが容易になる。そし
て、この分類情報のリストが出力部6に出力される。そ
して、出力部6にリスト出力制御信号がシステム制御部
7より供給されると、プリンタ出力部6aは、入力した
分類情報をプリント出力する。After that, it becomes easy to search for a corresponding image by using the attribute name of this classification information list. Then, the list of the classification information is output to the output unit 6. When the list output control signal is supplied from the system control unit 7 to the output unit 6, the printer output unit 6a prints out the input classification information.
【0010】次に、図3は、大量にある画像情報31に
対して分類情報を生成してプリント出力する場合での例
を示す。この例では、その大量にある画像情報31に対
してまとめて属性分離部4で分離情報の抽出を行い、作
成部5で分類名とその個数を含む分類情報リスト31を
生成する。この分類情報リスト31は、各画像情報の参
照番号(または、ページ番号)に対応する各分類情報
(分類名とその個数)を順に配置する。Next, FIG. 3 shows an example in which classification information is generated for a large amount of image information 31 and is printed out. In this example, the attribute separation unit 4 extracts the separation information from the large amount of image information 31 collectively, and the creation unit 5 generates the classification information list 31 including the classification name and the number thereof. In this classification information list 31, each classification information (classification name and its number) corresponding to the reference number (or page number) of each image information is arranged in order.
【0011】表示部6bは、内蔵するディスプレイに、
画像情報の属性分離結果を表示する。 この表示部6b
は、本発明の画像処理装置のコントロールパネルと一体
化したものでもよい。次に、属性分離部4の詳細な説明
を行う。属性分離部4は、画像データの属性分離を行っ
て領域情報を作成する処理部であり、この属性分離部4
の動作原理を図4から図27を参照して以下に説明す
る。The display section 6b has a built-in display,
The result of attribute separation of image information is displayed. This display portion 6b
May be integrated with the control panel of the image processing apparatus of the present invention. Next, the attribute separating unit 4 will be described in detail. The attribute separation unit 4 is a processing unit that performs attribute separation of image data to create area information.
The operation principle of is described below with reference to FIGS. 4 to 27.
【0012】図4は、この属性分離部4におけるおおま
かな処理を示すフローチャートである。FIG. 4 is a flowchart showing a rough process in the attribute separating unit 4.
【0013】この属性分離部4における属性分離処理速
度を速くするため、ステップS1で、画像データの間引
きが行なわれる。この画像データの間引きが行なわれた
場合、属性分離部4の処理は、その間引かれたイメージ
に対して行なわれる。この画像データの間引きは、m×
m画素ブロックにおける黒画素の連結性を調べることに
より行なわれる。例えば、3×3の画素ブロックにおい
て、連結した黒画素が2つ存在する場合、その3×3の
画素ブロックは1つの黒画素に間引かれる。逆に、その
画素ブロックにおいて、連結した白画素が2つ存在する
場合は、その画素ブロックは1つの白画素に間引かれ
る。In order to increase the attribute separation processing speed in the attribute separation unit 4, the image data is thinned out in step S1. When the thinning-out of the image data is performed, the processing of the attribute separating unit 4 is performed on the thinned-out image. The thinning out of this image data is mx
This is done by examining the connectivity of black pixels in the m pixel block. For example, in a 3 × 3 pixel block, when there are two connected black pixels, the 3 × 3 pixel block is thinned out to one black pixel. On the contrary, when there are two connected white pixels in the pixel block, the pixel block is thinned out to one white pixel.
【0014】次にステップS2において、画素のイメー
ジが解析され、画素同士の連結性が探索されるととも
に、その大きさや他の連結成分に対する相対的な位置に
応じて分類される。1つの連結成分というのは、白画素
によって完全に囲まれた黒画素の集合である。従って、
1つの黒画素連結成分は、他の黒画素連結成分から少な
くとも1つの白画素により完全に分離される。Next, in step S2, the image of the pixels is analyzed, the connectivity between the pixels is searched, and the pixels are classified according to their size and relative position to other connected components. A connected component is a set of black pixels completely surrounded by white pixels. Therefore,
One black pixel connected component is completely separated from other black pixel connected components by at least one white pixel.
【0015】このステップS2の処理は、図5〜図7の
フローチャートを参照して後述するが、概略を説明する
と、連結成分の探索と、その大きさの情報と連結成分同
士から得られるいくつかの統計的な情報に基づいて行な
われる連結成分のクラス分けを行う。このクラス分けで
は、まず夫々の連結成分が、テキストユニットか、非テ
キストユニットかに分類される。そして、非テキストユ
ニットは、さらに詳細に解析され、それがフレーム構造
をもつデータか、ハーフトーンイメージか、線画か、表
か、又はその他の表形式のテキストデータかに判別され
る。そして、そのデータ構造が未知のものであれば、未
知のものとして、分類が行なわれない。そして、連結成
分の構成データを与え、そのデータの再構築を容易にす
るように、階層的な木(ツリー)構造が、それぞれの連
結成分に対して作成される。The process of step S2 will be described later with reference to the flow charts of FIGS. 5 to 7, but the outline thereof will be described. Search for a connected component and information obtained from its size and some connected components are obtained. The connected components are classified based on the statistical information of. In this classification, each connected component is first classified into a text unit or a non-text unit. The non-text unit is then analyzed in more detail to determine if it is data with a frame structure, halftone image, line drawing, table, or other tabular text data. If the data structure is unknown, it is not classified as unknown. A hierarchical tree structure is then created for each connected component to provide the constituent data for the connected component and facilitate reconstruction of that data.
【0016】次に、ステップS3において、近接した連
結成分は、ギャップラインを挟まない限りグループ化さ
れる。ここでのグループ化は、垂直方向に行う場合と水
平方向に行う場合とがある。これはグループ化しようと
するテキストユニットが縦書きであるか、横書きである
かということに対応しており、両方向に近接した連結成
分間の距離を予め水平及び垂直のそれぞれの方向につい
て調べ、水平方向の距離が小さい場合には水平方向に、
垂直方向の距離が小さい場合には垂直方向にグループ化
を行うこととする。Next, in step S3, adjacent connected components are grouped unless a gap line is sandwiched therebetween. The grouping here may be performed in the vertical direction or in the horizontal direction. This corresponds to whether the text units to be grouped are vertical writing or horizontal writing.The distance between connected components that are close to each other in both directions is checked beforehand in each of the horizontal and vertical directions, and the horizontal If the distance in the direction is small, move horizontally,
If the distance in the vertical direction is small, grouping is performed in the vertical direction.
【0017】尚、ステップS2で生成されたツリー構造
は、テキストと非テキストが不適当に混ざらないように
するために用いられる。更に、ステップS3では、行間
で垂直もしくは水平方向に延長したギャップと、非テキ
ストユニットの垂直方向に延長した境界とを検出するこ
とにより、テキストユニットが行にグループ化されるか
どうかを決定する。この行構造は、適当に階層ツリー構
造を更新して行くことにより、そのツリー構造の中に保
持される。The tree structure generated in step S2 is used to prevent improper mixing of text and non-text. Further, in step S3, it is determined whether the text units are grouped into lines by detecting vertically or horizontally extending gaps between the lines and vertically extending boundaries of non-text units. This row structure is retained in the tree structure by updating the hierarchical tree structure appropriately.
【0018】次に、ステップS4において、ステップS
3でグループ化された行が、先にグループ化された方向
とは逆方向についてスペースが狭ければ、その方向に再
度グループ化されたブロックとなる。一方、非テキスト
ユニットは、そのイメージページに対する境界として用
いられる。2つの非テキストユニットの間にあるテキス
トユニットは、他のテキストラインユニットとは分けら
れて処理される。Next, in step S4, step S
If the rows grouped in 3 have a small space in the direction opposite to the direction in which they were previously grouped, they become blocks regrouped in that direction. On the other hand, non-text units are used as boundaries for the image page. Text units between two non-text units are processed separately from other text line units.
【0019】さらに、ステップS4において、ステップ
S2で分類できなかった非テキストユニットが、大きい
フォントサイズのタイトルであるかどうかを決定するた
めに解析される。もし、それらがタイトルと決定された
ならば、それらのユニットは、適当な属性が付けられ、
そして、ツリー構造が更新される。画像データに含まれ
るタイトルは、そのページを再構成する手助けとなる。Further, in step S4, the non-text units that could not be classified in step S2 are analyzed to determine if they are large font size titles. If they were determined to be titles, their units would have the appropriate attributes attached,
Then, the tree structure is updated. The title included in the image data helps to reconstruct the page.
【0020】図5〜図7は、図4のステップS2におい
て、どのように画素イメージデータの連結画素を検出
し、それらの連結画素を分類するかを示す処理フローチ
ャートである。FIGS. 5 to 7 are process flowcharts showing how to detect connected pixels of pixel image data and classify the connected pixels in step S2 of FIG.
【0021】まず、ステップS11において、画像デー
タに含まれる画素データが輪郭線追跡により探索され
る。この輪郭線追跡は、図8に示されるように、画像を
スキャンすることにより行なわれる。この画像のスキャ
ンは、矢印Aで示す画像の右下部から始まり、図形の右
端に出合うまで上方に行なわれて行く。このスキャン
は、他の方向、例えば左上から右下に向けて順次スキャ
ンされてもよい。黒画素にぶつかると、隣接した画素が
黒画素かどうかが、図8の31で示す矢印方向の順に調
べられる。この黒画素の探索は、中心から見て8方向の
ベクトルで表されるので8方向探索と呼ばれる。そし
て、隣接した黒画素が存在すると、このプロセスにより
図形の外部輪郭が得られる。こうして、図9に示すよう
に、矢印A方向のスキャンが文字“Q”32の端に対応
するポイントにぶつかる。隣接画素の調査が31で示さ
れた方向の順に行なわれ、文字“Q”32の外輪郭が追
跡される。なお、ここでは閉じた輪郭の内側の部分(文
字Qの内側)は追跡されない。First, in step S11, pixel data included in the image data is searched for by contour line tracking. This contour line tracking is performed by scanning an image as shown in FIG. The scanning of this image starts from the lower right portion of the image indicated by the arrow A and proceeds upward until the right edge of the graphic is encountered. This scan may be sequentially scanned in another direction, for example, from upper left to lower right. When a black pixel is hit, whether or not the adjacent pixel is a black pixel is examined in the order of the arrow direction indicated by 31 in FIG. This black pixel search is called an eight-direction search because it is represented by a vector in eight directions when viewed from the center. Then, if there are adjacent black pixels, this process provides the outer contour of the graphic. Thus, as shown in FIG. 9, the scan in the direction of arrow A hits the point corresponding to the end of the letter "Q" 32. An examination of adjacent pixels is performed in the order indicated by 31 to track the outer contour of the letter "Q" 32. It should be noted that the inner part of the closed contour (the inner part of the letter Q) is not traced here.
【0022】こうして、8方向探索により得られた輪郭
線、即ち、1つの連結成分が取り出されると、次の黒画
素に出合うまでスキャンが進行する。こうして、例え
ば、完全な黒領域を表していると思われるオブジェクト
34が8方向探索される。同様に、手書き文字“non
text”である、非テキストのオブジェクト35が追
跡され、そして、単語“text”を形成する個々の文
字の集合オブジェクト36a〜36dが追跡される。こ
の図8で示されるスキャンは、全ての連結成分が検出さ
れるまで続けられる。In this way, when the contour line obtained by the eight-direction search, that is, one connected component is extracted, the scan proceeds until the next black pixel is encountered. Thus, for example, the object 34 that seems to represent a complete black area is searched in eight directions. Similarly, the handwritten character "non"
The non-text object 35, which is "text", is tracked, and the individual character set objects 36a-36d that form the word "text" are tracked. The scan shown in this Fig. 8 is for all connected components. Continues until is detected.
【0023】次に、ステップS12に進み、全ての連結
成分を矩形で切り出す。この場合、個々の連結成分を覆
う可能な限り最小の矩形が描かれることになる。こうし
て、図9におけるオブジェクト32の周りに矩形37
が、オブジェクトの34の周りに矩形39が、オブジェ
クト35の周りに矩形40がそれぞれ描かれる。また、
テキストオブジェクト36a,36b,36c,36d
に対する矩形41a〜41dも同様である。Next, in step S12, all connected components are cut out into rectangles. In this case, the smallest possible rectangle covering the individual connected components will be drawn. Thus, the rectangle 37 around the object 32 in FIG.
, A rectangle 39 is drawn around the object 34, and a rectangle 40 is drawn around the object 35. Also,
Text objects 36a, 36b, 36c, 36d
The same applies to rectangles 41a to 41d for.
【0024】ステップS13では、ステップS12で得
られた全ての矩形に対して木構造における位置付けが成
される。ほとんどの場合、ステップS13で得られた木
構造は、各オブジェクトに対してルートから直接生じ
る。これは、連結成分の外部輪郭だけが追跡され、閉領
域の内部は追跡されないからである。こうして、図10
に示すように、連結成分32に対応する矩形37はペー
ジのルートから直接生じる。しかし、非テキストオブジ
ェクト35を囲む矩形40や、テキストオブジェクト3
6a,36bを囲む矩形41a,41bのように、その
矩形が他の矩形(ここでは矩形39)に完全に含まれて
しまう場合は、これらの連結成分は包含される連結成分
(この場合、成分34)の子となる。さらに、成分34
のように、少なくとも1つの子をもつそれぞれの連結成
分は、成分それ自身を“主要な子”とする。図9の例で
は、成分34は他の子成分40,41a,41bととも
に、自分自身の矩形39を主要な子として含んでいる
(図10参照)。In step S13, all the rectangles obtained in step S12 are positioned in the tree structure. In most cases, the tree structure obtained in step S13 results directly from the root for each object. This is because only the outer contour of the connected component is tracked, not the interior of the closed region. Thus, FIG.
As shown in, the rectangle 37 corresponding to the connected component 32 arises directly from the root of the page. However, the rectangle 40 surrounding the non-text object 35 and the text object 3
When the rectangle is completely included in another rectangle (here, the rectangle 39) like the rectangles 41a and 41b surrounding 6a and 36b, these connected components are included connected components (in this case, the components). 34) becomes a child. In addition, ingredient 34
, Each connected component that has at least one child makes the component itself a “primary child”. In the example of FIG. 9, the component 34 includes its own rectangle 39 as a main child together with the other child components 40, 41a, 41b (see FIG. 10).
【0025】次にステップS14に進み、木における第
1レベルのそれぞれの連結成分は、テキストユニットか
非テキストユニットかに分類される。この分類過程は2
つのステップを含む。最初のステップでは、連結成分を
囲む矩形が予め定められたサイズと比較される。この連
結成分を囲む矩形の高さがフォントサイズの最大値に対
応する予め定められた値を越える場合、あるいは、矩形
の幅がページ幅を経験的に決められた一定の値(“5”
の場合に満足のいく結果が得られている)で割った値よ
り大きい場合は、その連結成分は非テキスト・ユニット
と分類され、そのユニットに“非テキスト”の属性が与
えられる。Next, proceeding to step S14, each first level connected component in the tree is classified as a text unit or a non-text unit. This classification process is 2
Including one step. In the first step, the rectangle surrounding the connected component is compared to a predetermined size. If the height of the rectangle enclosing this connected component exceeds a predetermined value corresponding to the maximum font size, or if the width of the rectangle is the empirically determined constant value (“5”)
, The connected component is classified as a non-text unit and that unit is given the attribute of "non-text".
【0026】次に第2のステップでは、属性が与えられ
なかった残りの全てのユニット、即ち、非テキストとし
て分類されなかったユニットが、残りの全ての連結成分
から得られる統計的なサイズに基づいて決められた値と
比較される。特に、非テキストとみなされなかった全て
の矩形の平均高が計算される。この平均高に、ある一定
値(一般には“2”)を掛けることによって適応的な閾
値が得られる。この閾値より大きい全てのユニットは非
テキストに分類される。一方、その閾値より小さいユニ
ットはテキストとみなす。こうして各ユニットは分類さ
れて適切な属性が与えられる。以上2つのステップによ
る分類は、図5〜図7で示される更にいくつかの処理を
受ける。これについては以下で詳しく述べる。Then, in the second step, all remaining units for which no attributes have been given, ie, units not classified as non-text, are based on the statistical size obtained from all remaining connected components. It is compared with the determined value. In particular, the average height of all rectangles that were not considered non-text is calculated. An adaptive threshold is obtained by multiplying this average height by a certain value (generally "2"). All units above this threshold are classified as non-text. On the other hand, units smaller than the threshold value are regarded as text. Each unit is then classified and given the appropriate attributes. The classification by the above two steps undergoes some further processing shown in FIGS. This is described in more detail below.
【0027】ツリー構造の第1レベルの全てのユニット
がテキストか非テキストかに分類された後、テキストユ
ニットの子は、主要な子(即ち、自分自身)を含めてテ
キストとして分類される。一方、非テキストの主要な子
は非テキストとして残されるが、それ以外の子はテキス
トとして分類される。After all the first level units of the tree structure have been classified as text or non-text, the text unit's children are classified as text, including the major children (ie, themselves). On the other hand, the main non-text children are left as non-text, while the other children are classified as text.
【0028】次にステップS15に進み、最初のユニッ
トを選択する。次にステップS16に進み、もしそのユ
ニットがテキストであればステップS17へ進み、次の
ユニットが選択される。そしてステップS16で非テキ
ストユニットが選択されるまでステップS16〜ステッ
プS17の処理を行い、ステップS16で非テキストユ
ニットが選択されるとステップS18へ進む。Next, in step S15, the first unit is selected. Next, in step S16, if the unit is text, the process advances to step S17 to select the next unit. Then, steps S16 to S17 are performed until the non-text unit is selected in step S16, and when the non-text unit is selected in step S16, the process proceeds to step S18.
【0029】ステップS18で、非テキストユニットが
子を持っているかどうかを調べる。例えば、図10の例
では、非テキストユニット(矩形)34は非テキストで
ある主要な子(矩形)39と、テキストである矩形4
0,41a,41bという子をもつ。In step S18, it is checked whether the non-text unit has children. For example, in the example of FIG. 10, the non-text unit (rectangle) 34 is a non-text main child (rectangle) 39, and the text rectangle 4.
It has children 0, 41a, 41b.
【0030】このステップS18において、そのユニッ
トに子が存在する場合はステップS19に進み、ここで
各ユニットは、ハーフトーン(または、グレースケー
ル)かどうかのフィルタリングを受ける。ハーフトーン
・フィルタリングにおいては、その子が調べられ“ノイ
ズ”サイズより小さいものの数が数えられる。この“ノ
イズサイズ”のユニットは、その高さが入力イメージデ
ータにおける最小のフォントサイズより小さいものであ
る。そしてステップS20において、ノイズサイズより
小さいユニットの数が総数の半分より大きい場合、その
ユニットはハーフトーンイメージであると判定する。そ
の結果、ステップS20からステップS24に進み、そ
のユニットに“ハーフトーン(HALFTONE)”という属性が
与えられる。そしてステップS25に進み、ハーフトー
ンイメージの中のテキストが調べられる。即ち、ハーフ
トーンイメージの子の中ではなく、ハーフトーンイメー
ジと同レベルになるように、木構造を修正する。ここで
子の処置が適切であれば、ハーフトーンイメージ中の文
字認識も可能になる。そしてステップS17に戻って次
のユニットが選択され、前述と同様の処理を実行する。In step S18, if the unit has a child, the process proceeds to step S19, in which each unit is subjected to filtering for halftone (or gray scale). In halftone filtering, the children are examined and the number below the "noise" size is counted. This "noise size" unit is one whose height is smaller than the minimum font size in the input image data. Then, in step S20, when the number of units smaller than the noise size is larger than half of the total number, it is determined that the unit is a halftone image. As a result, the process proceeds from step S20 to step S24, and the attribute of "halftone (HALFTONE)" is given to the unit. Then, in step S25, the text in the halftone image is examined. That is, the tree structure is modified so that the tree structure is at the same level as the halftone image, not in the halftone image child. Here, if the child's treatment is appropriate, character recognition in the halftone image is also possible. Then, returning to step S17, the next unit is selected, and the same processing as described above is executed.
【0031】一方、ステップS19のハーフトーンフィ
ルタリングの結果、そのユニットがハーフトーンでない
ことが分かったらステップS20からステップS21に
進み、そこでそのユニットの主要な子を、後の処理のた
めに選択する。そしてステップS22に進む。On the other hand, if the unit is found not to be halftone as a result of the halftone filtering in step S19, then the process proceeds from step S20 to step S21, where the major children of that unit are selected for later processing. Then, the process proceeds to step S22.
【0032】またステップS18で、非テキストユニッ
トであって、子を持たないと判定された場合、或はステ
ップS21で主要な子が後の処理のために選択された場
合はステップS22に進み、そのユニットがフレーム・
フィルタリングを受ける。このフレームフィルタリング
とは、そのユニットがフレーム(枠)であるかどうかを
判定することである。この「フレームである」とは、そ
のユニットを囲むような矩形を構成するほとんど同じ長
さの幅や高さを持った平行な直線が複数存在することを
意味している。ここでは特に、注目ユニットにおいて画
素単位で見た時の各行での連結成分の線幅を調べる。If it is determined in step S18 that the unit is a non-text unit and has no child, or if the main child is selected for subsequent processing in step S21, the process proceeds to step S22. The unit is a frame
Get filtered. This frame filtering is to determine whether or not the unit is a frame. The term "is a frame" means that there are a plurality of parallel straight lines having almost the same width and height that form a rectangle surrounding the unit. Here, in particular, the line width of the connected component in each row when viewed in pixel units in the target unit is examined.
【0033】図11において、非テキストユニット42
は、44で示す様な輪郭成分をもつ連結成分43を含ん
でいる。この例において、行(ROW)iにおける子の連結
成分の線幅はXi、即ち、輪郭線44の左端45aから
右端45bまでの距離になる。一方、行jでは連結成分
43の内部に2つの線幅が存在する。即ち、46a〜4
6b間と、47a〜47b間である。そして、最も長い
線幅である46a〜46b間が、距離Xjとして定義さ
れる。In FIG. 11, the non-text unit 42
Includes a connected component 43 having a contour component as indicated by 44. In this example, the line width of the child connected component in the row i is Xi, that is, the distance from the left end 45a to the right end 45b of the contour line 44. On the other hand, in line j, two line widths exist inside the connected component 43. That is, 46a-4
6b and between 47a and 47b. The distance between 46a and 46b, which is the longest line width, is defined as the distance Xj.
【0034】このようにして、非テキストユニット42
における全ての行nにおいて距離Xが計算され、その非
テキストユニットがフレームであるかどうかが、次の不
等式によって調べられる。 ここで、Xkは上で述べたように、連結成分中の第k行
における最も長い線幅を示し、Wは矩形42の横幅、N
は行の数であり、閾値は枠が多少傾いていても枠として
検知できるように予め計算された値である。ここで1°
の傾きを許すためには、{sin(1°)×L+(一定
値)}の閾値でよい。この一定値というのは、ステップ
S14で計算された文字の平均高である。そして、上記
の不等式が満たされないと、そのユニットはフレームデ
ータと判定され、ステップS23からステップS26に
進み、“フレーム(FRAME)”という属性が付加される。
こうして、例えば、“フレームであり表”あるいは“フ
レームでありハーフトーン”の様な判定が、フレームに
対して可能になる。In this way, the non-text unit 42
The distance X is calculated for every row n in, and whether the non-text unit is a frame is examined by the following inequality. Here, as described above, Xk represents the longest line width in the k-th row in the connected component, W is the horizontal width of the rectangle 42, N
Is the number of rows, and the threshold value is a value calculated in advance so that a frame can be detected even if the frame is slightly inclined. 1 ° here
In order to allow the inclination of, a threshold value of {sin (1 °) × L + (constant value)} may be used. This constant value is the average height of the characters calculated in step S14. If the above inequality is not satisfied, the unit is determined to be frame data, the process proceeds from step S23 to step S26, and the attribute "frame (FRAME)" is added.
Thus, for example, a judgment such as "frame and table" or "frame and halftone" can be performed on the frame.
【0035】このステップS26からステップS42に
進み、そのフレームデータが表あるいは表形式のものを
含んでいる可能性が調べられ、連結成分内の白輪郭を得
るための検査が行なわれる。この白輪郭は、ステップS
11で得られた(黒)輪郭と基本的には同じだが、ただ
黒画素の代わりに白画素を調べて得られるものである点
が異なる。From step S26 to step S42, the possibility that the frame data includes a table or a table format is checked, and an inspection for obtaining a white contour in the connected component is performed. This white outline is the step S
It is basically the same as the (black) contour obtained in 11 except that it is obtained by examining white pixels instead of black pixels.
【0036】図14のように、非テキストユニットの内
部が右下から左上に向かって矢印Bの方向に探索され
る。初めて白画素に出会うと、その点から近接の白画素
に対して51で示す様な外向きの方向に探索を行う。こ
こでは、1から4で示される方向しか必要でないことに
注意すべきである。その結果、ここでの処理における白
輪郭追跡は4方向の探索ということになる。全ての白輪
郭が取り出されるまで、この処理は続けられる。例え
ば、白輪郭追跡は、黒線分52,53,54,55で囲
まれる輪郭部を取り出すことであり、同様の処理は56
で示す様な黒画素の内部に対しても行なわれる。このよ
うにして非テキストオブジェクト中の全ての閉じた白輪
郭が追跡されるまで、上述した矢印B方向へのスキャン
が続けられる。As shown in FIG. 14, the inside of the non-text unit is searched in the direction of arrow B from the lower right to the upper left. When a white pixel is first encountered, a search is performed in the outward direction as indicated by 51 for a white pixel in the vicinity from that point. It should be noted that only the directions indicated by 1 to 4 are required here. As a result, the white contour tracking in the processing here is a search in four directions. This process continues until all white contours have been retrieved. For example, the white contour tracing is to extract the contour portion surrounded by the black line segments 52, 53, 54, 55, and the similar processing is performed by 56.
It is also performed for the inside of the black pixel as shown by. In this way, the above-described scanning in the direction of arrow B is continued until all closed white contours in the non-text object are tracked.
【0037】そしてステップS43において、非テキス
トユニットの密度が計算される。この密度は、連結成分
内の黒画素の数をカウントし、矩形で囲まれた画素の総
数により、その矩形の黒画素の数を割ることにより求め
られる。Then, in step S43, the density of non-text units is calculated. This density is obtained by counting the number of black pixels in the connected component and dividing the number of black pixels in the rectangle by the total number of pixels surrounded by the rectangle.
【0038】次に、ステップS44に進み、発見された
非テキストユニット内の白輪郭の数が計算される。そし
て、もしその数が“4”以上であれば、その非テキスト
イメージはテーブルか、テキストブロックがテーブル状
に並んだものである可能性があるためステップS47に
進み、白輪郭の充填率が計算される。この白輪郭の充填
率というのは、非テキストイメージ中の白輪郭で囲まれ
る面積の割合を示すものである。Next, in step S44, the number of white contours in the found non-text unit is calculated. If the number is "4" or more, the non-text image may be a table or text blocks arranged in a table, and therefore the process proceeds to step S47, and the white contour filling rate is calculated. To be done. The filling rate of the white outline indicates the ratio of the area surrounded by the white outline in the non-text image.
【0039】即ち、図14の例では、57,59で示す
ように、完全に白画素だけで構成される白輪郭もあれ
ば、60,61のように内部に黒画素領域を含む白輪郭
も存在する。もし、白輪郭の充填率が高ければ、おそら
く、その非テキストイメージはテーブルか、テキストブ
ロックがテーブル状に並んだものである。この推定をよ
り確実にするために、注目白輪郭に対して水平及び垂直
方向に格子状の内部構造を持っているかどうかが調べら
れる。特にステップS49では、水平または垂直方向に
少なくとも2つの輪郭線を横断していないような境界線
をもつ白輪郭は、格子上になっていないとみなして再結
合する。例えば、図14の例では白輪郭59の左境界6
2と右境界63は、別の白画素60の左境界64と右境
界65と一致するように垂直方向に伸びている。そのた
め、これらの白輪郭は格子状に並んでいると判断され、
再結合されることはない。同様に、白輪郭59の上境界
66と下境界67は、別の黒画素70の上境界68と下
境界69と一致するように水平方向に伸びている。その
結果、これらの白輪郭も格子状に並んでいると判定さ
れ、再結合されない。That is, in the example of FIG. 14, some white contours are formed entirely of white pixels, as shown by 57 and 59, and some white contours, such as 60 and 61, include black pixel areas inside. Exists. If the white contours are highly filled, then the non-text image is probably a table or a block of text blocks arranged in a table. In order to make this estimation more reliable, it is examined whether or not it has a grid-like internal structure in the horizontal and vertical directions with respect to the white contour of interest. Particularly, in step S49, a white contour having a boundary line that does not cross at least two contour lines in the horizontal or vertical direction is regarded as not on the grid and is recombined. For example, in the example of FIG. 14, the left boundary 6 of the white outline 59 is
2 and the right boundary 63 extend in the vertical direction so as to coincide with the left boundary 64 and the right boundary 65 of another white pixel 60. Therefore, it is judged that these white outlines are arranged in a grid,
It will not be recombined. Similarly, the upper boundary 66 and the lower boundary 67 of the white contour 59 extend in the horizontal direction so as to coincide with the upper boundary 68 and the lower boundary 69 of another black pixel 70. As a result, it is determined that these white contours are also arranged in a lattice, and are not recombined.
【0040】図15〜図17は、白輪郭が結合される場
合を説明する図である。FIGS. 15 to 17 are diagrams for explaining the case where white contours are combined.
【0041】図15において、例えば非テキストユニッ
ト71は、ハーフトーンイメージからバイナリイメージ
までのユニットを含む非テキストユニットの例を表して
いる。非テキストイメージ71は、黒画素領域72と白
画素領域74,75,76,77,78,79を含んで
いる。おそらくこの白画素領域の充填率は充分高いの
で、ステップS48よりステップS49に進み、再結合
される。まず、図15及び図16で示すように、まず白
輪郭75の上端と下端が白輪郭77の上端と下端と比較
される。これらの上端及び下端は一致しないので、白輪
郭75と76とが結合され、新たな白輪郭76’が作り
出される。尚、この白画素の充填率が低い時はステップ
S48よりステップS55に進む。In FIG. 15, for example, the non-text unit 71 represents an example of a non-text unit including a unit from a halftone image to a binary image. The non-text image 71 includes black pixel areas 72 and white pixel areas 74, 75, 76, 77, 78, 79. Probably, the filling rate of this white pixel area is sufficiently high, so that the process proceeds from step S48 to step S49, and is recombined. First, as shown in FIGS. 15 and 16, first, the upper and lower ends of the white contour 75 are compared with the upper and lower ends of the white contour 77. Since their top and bottom edges do not coincide, white contours 75 and 76 are combined to create a new white contour 76 '. When the filling rate of the white pixels is low, the process proceeds from step S48 to step S55.
【0042】次に図16と図17において、白輪郭77
の左右の境界が白輪郭78の左右の境界と比較される。
これらの境界は一致しないので、白輪郭77と79とは
再結合され、新たな白輪郭77’となる。このプロセス
は、再結合が起らなくなるまで水平および垂直方向に繰
り返される。16 and 17, the white contour 77
The left and right boundaries of the white contour 78 are compared with the left and right boundaries of the white contour 78.
Since these boundaries do not match, the white contours 77 and 79 are recombined into a new white contour 77 '. This process is repeated horizontally and vertically until no recombination occurs.
【0043】以上説明したようにテーブルの白輪郭は結
合されにくく、テーブル以外、例えばハーフトーンイメ
ージや線図形のようなテーブル以外のものは結合され易
い。そしてステップS50で再結合率が計算される。も
し再結合率が高いか、再結合処理の後に残った白輪郭の
数が“4”未満であればステップS55に進み、その非
テキストユニットは、以下で詳述するように、ハーフト
ーンイメージか、線図形であると判定される。As described above, the white contours of the table are difficult to combine, and other than the table, such as a table such as a halftone image or a line figure, is easily combined. Then, in step S50, the recombination rate is calculated. If the recombination rate is high or the number of white contours remaining after the recombination process is less than "4", the process proceeds to step S55, and the non-text unit is a halftone image, as described in detail below. , Is determined to be a line figure.
【0044】ステップS50で、再結合率が高くない
か、または少なくとも4個以上の白輪郭が残った場合は
ステップS51に進み、テーブルと判定されて属性(TAB
LE)が付与される。次にステップS52に進み、新たに
テーブルと判定された図形の内部が調べられ、含まれる
連結成分の探索や分類が行なわれる。新しい内部連結成
分に従って、ステップS53で木構造が更新される。次
にステップS54に進み、内部連結成分はテキストか非
テキストが再び分類され、その分類結果に従って適切な
属性が付加される。この処理は、既に説明したステップ
S12からステップS14の処理と同じである。そして
ステップS54からステップS17に戻り、次のテキス
トユニットが選択される。In step S50, if the recombination rate is not high, or if at least four or more white contours remain, the process proceeds to step S51 and it is determined that the table is the attribute (TAB
LE) is added. Next, in step S52, the inside of the figure newly determined to be a table is examined, and the connected components included therein are searched and classified. The tree structure is updated in step S53 according to the new internally connected component. Next, in step S54, the internally connected component is classified into text or non-text again, and an appropriate attribute is added according to the classification result. This process is the same as the process of steps S12 to S14 already described. Then, the process returns from step S54 to step S17, and the next text unit is selected.
【0045】ステップS48で白輪郭の充填率が高くな
いか、或はステップS50で再結合率が高くない場合、
その非テキスト枠図形はハーフトーンイメージか、線図
形の可能性が高い。そして、そのユニットがハーフトー
ンイメージか線図形かは、そのユニット中の黒画素の水
平方向のランレングスの平均、白画素と黒画素の割合及
び密度によって決定される。一般的に、非常に暗いイメ
ージはハーフトーンイメージと判定され、白く明るいイ
メージは線図形と判定される。If the white contour filling rate is not high in step S48 or the recombination rate is not high in step S50,
The non-text frame graphic is likely to be a halftone image or a line graphic. Then, whether the unit is a halftone image or a line figure is determined by the average of the horizontal run lengths of the black pixels in the unit, the ratio of white pixels to black pixels, and the density. Generally, a very dark image is determined to be a halftone image, and a white and bright image is determined to be a line figure.
【0046】特に、白画素の平均ランレングスがほとん
ど“0”の場合(ほとんど真黒か、まだら模様のイメー
ジ)で、さらにステップS43で計算された密度が白よ
り黒の方が大きい場合(即ち、密度が閾値約0.5(こ
れを1番目の閾値とする)より大きい時)は、そのフレ
ームユニットはハーフトーンであると判定される。も
し、密度が1番目の閾値よりも大きくない場合には、そ
のユニットは、線図形と決められる。また、もし白画素
の平均ランレングスがほとんど“0”と言えず、かつ白
画素の平均ランレングスが黒画素の平均ランレングスよ
りも大きい場合は、そのフレームユニットは線図形と判
定される。しかし、白画素の平均ランレングスが黒画素
の平均ランレングスより大きくない場合(即ち、これも
黒が支配的なイメージである)、さらに詳細なテストが
必要である。特に、黒画素の数が白画素の数よりはるか
に少ない時(即ち、黒画素の数が白画素の2倍(これを
2番目の閾値とする)より小さいとき)、このフレーム
ユニットはハーフトーンと判定される。一方、黒画素の
数を白画素の数で割った値が2番目の閾値より大きくな
いが、ステップS43で計算した密度が1番目の閾値よ
り大きい場合は、そのフレームユニットはハーフトーン
イメージであると判定する。そうでなければ、線図形と
判定される。Particularly, when the average run length of white pixels is almost "0" (almost black or mottled image), and the density calculated in step S43 is larger in black than in white (that is, If the density is above a threshold of about 0.5 (this is the first threshold), then the frame unit is determined to be halftone. If the density is not greater than the first threshold, the unit is determined to be a line graphic. Also, if the average run length of the white pixels can hardly be said to be “0” and the average run length of the white pixels is larger than the average run length of the black pixels, the frame unit is determined to be a line figure. However, if the average run length of white pixels is not greater than the average run length of black pixels (ie, black is also the dominant image), then more detailed testing is needed. In particular, when the number of black pixels is much smaller than the number of white pixels (that is, when the number of black pixels is smaller than twice the number of white pixels (this is the second threshold)), this frame unit is halftone. Is determined. On the other hand, if the value obtained by dividing the number of black pixels by the number of white pixels is not greater than the second threshold value, but the density calculated in step S43 is greater than the first threshold value, the frame unit is a halftone image. To determine. Otherwise, it is determined to be a line figure.
【0047】そしてステップS55において、フレーム
ユニットが線図形と判定されるとステップS58に進
み、ここで“線図形”という属性(LINE-DRAWING)が付加
され、更にステップS59で、全ての子が除去される。
特に、あるユニットが一度線図形と判定されると、もう
そのユニットに対しては文字認識処理が行なわれない。
その後、ステップS17に戻り、次のテキストユニット
が選択される。When it is determined in step S55 that the frame unit is a line figure, the process proceeds to step S58, where an attribute (LINE-DRAWING) called "line figure" is added, and in step S59 all children are removed. To be done.
In particular, once a unit is determined to be a line figure, character recognition processing is not performed for that unit.
Then, the process returns to step S17, and the next text unit is selected.
【0048】一方、ステップS55で、そのフレームユ
ニットが線図形でないと判定されるとステップS56に
進み、“ハーフトーン”という属性(HALFTONE)が付加さ
れ、次にステップS57で、そのユニットの子の内、テ
キストサイズの子が除去される。そして、テキストサイ
ズより大きい全ての子は、フレームハーフトーンイメー
ジの子として残ることが許される。そしてステップS1
7に戻り、次のテキストユニットが選択される。On the other hand, if it is determined in step S55 that the frame unit is not a line figure, the process proceeds to step S56, an attribute (HALFTONE) of "halftone" is added, and then in step S57, a child of the unit is added. Among them, the text size child is removed. And all children larger than the text size are allowed to remain as children of the frame halftone image. And step S1
Returning to 7, the next text unit is selected.
【0049】次に再び図6のステップS44に戻り、白
輪郭の数が“4”より大きくない場合は、そのフレーム
ユニットはテーブルでないと判断されてステップS45
に進み、ステップS43で計算された密度が、ある閾値
(約0.5)と比較される。この閾値はフレーム内のテ
キストユニットや線図形が全画素の半分より小さいはず
だということで選ばれている。もしこの密度が、この閾
値より小さければステップS46に進み、フレームユニ
ットの内部構造が調べられる。この処理は、すでに述べ
た、フレームユニットの内部構造に対するステップS1
1の処理と同じである。Next, returning to step S44 of FIG. 6 again, if the number of white contours is not larger than "4", it is determined that the frame unit is not a table and step S45 is performed.
And the density calculated in step S43 is compared with a certain threshold value (about 0.5). This threshold is chosen because the text units and line graphics in the frame should be less than half of all pixels. If this density is less than this threshold, the process proceeds to step S46, and the internal structure of the frame unit is examined. This process is performed by the above-described step S1 for the internal structure of the frame unit.
This is the same as the processing of 1.
【0050】一方、ステップS45で、その密度が予め
定めた閾値より大きい場合はステップS35に進み、そ
のフレームユニットが線図形かハーフトーンイメージの
どちらかに分類されるか、或はそのフレームが、分類不
可能(即ち、そのフレームは“未知”)であるかが判定
される。On the other hand, in step S45, if the density is larger than the predetermined threshold value, the process proceeds to step S35, and the frame unit is classified as either a line figure or a halftone image, or the frame is It is determined whether it cannot be classified (that is, the frame is “unknown”).
【0051】図5のステップS23に戻り、ステップS
22のフレームフィルタリングによって非テキストユニ
ット内にフレームが検知されなかった場合はステップS
27に進み、その非テキストユニットが“線”を含んで
いるかどうかを判定する。“線”はテキストの境界を表
わすのに有用な非テキストユニットといえる。しかし、
そのような線によって区切られる(囲まれる)テキスト
は、その線に非常に近い場合が多く、接触が起きている
可能性がある。その結果、線探索というのはテキストが
線に接触している場合と、接触していない場合の両方を
考慮する必要がある。Returning to step S23 in FIG. 5, step S
Step 22 if no frame is detected in the non-text unit by frame filtering 22.
Proceed to 27 to determine if the non-text unit contains a "line". A "line" is a non-text unit useful for delineating text boundaries. But,
The text delimited (enclosed) by such a line is often very close to that line and may be touching. As a result, line searching needs to consider both when the text touches the line and when it does not.
【0052】接触が起きていない場合の線探索のために
は、非テキストユニットの縦方向のヒストグラムが計算
される。図12の例では、線のヒストグラム48は、そ
の高さがほぼ線幅に等しい均一の値になるはずである。
線幅というのは近似的にテキストユニットの幅
(“W”)に等しいが、もし違いが生じるとすれば、そ
れは傾きθsのせいである。この傾きは原稿画像が入力
された時点で起きている。そして、非テキストユニット
が線を含んでいるかどうかを判定するためには、ヒスト
グラム中の各セル(cell)kの高さ49を幅Wと比較す
る。次式のように、これらの値の差の2乗平均が閾値と
比較される。For line searching when no contact has occurred, a vertical histogram of non-text units is calculated. In the example of FIG. 12, the line histogram 48 should be a uniform value whose height is approximately equal to the line width.
The line width is approximately equal to the width of the text unit (“W”), but if there is a difference, it is due to the slope θs. This tilt occurs when the document image is input. Then, the height 49 of each cell k in the histogram is compared to the width W to determine whether the non-text unit contains a line. The root mean square of the difference between these values is compared to a threshold as:
【0053】 この閾値は、非テキスト内の線のねじれ、または、傾き
θsを許容するように計算される。1°のねじれや傾き
に対しては、 という閾値が満足な結果を生じることがわかっている。[0053] This threshold is calculated to allow for twists or slopes of lines in non-text. For 1 ° twist and tilt, Has been found to produce satisfactory results.
【0054】上述の不等式によって非接触の線が発見さ
れなかった場合は、接触が起きている線が含まれていな
いかどうかの探索が行なわれる。注目している非テキス
トユニット中に、接触している線が含まれているかどう
かを調べるためには、線状のものがユニットの境界線近
くに存在するかどうかを調べればよい。例えば、図12
の例のように、ユニットを囲む矩形の境界線近くに線が
存在すると、境界線からの距離の2乗和を計算すること
によって調べることができる。即ち、このケースでは、
次式の不等式が計算される。If no non-contact line is found by the above inequality, a search is made as to whether or not the line in contact is included. To find out whether the touching line is included in the non-text unit of interest, it suffices to check whether or not a linear object exists near the boundary of the unit. For example, FIG.
If there is a line near the boundary of the rectangle that encloses the unit, as in the example of, can be investigated by calculating the sum of squares of the distances from the boundary. That is, in this case,
The following inequalities are calculated.
【0055】 もし、上式の左辺が予め定められた閾値より小さけれ
ば、接触している線が存在していることがわかる。この
閾値というのは接触を起していない線の場合と同じとを
使えばよい。[0055] If the left side of the above equation is smaller than a predetermined threshold value, it can be seen that there is a touching line. This threshold may be the same as that for a line that does not make contact.
【0056】こうしてステップS28で線が検出されれ
ばステップS29に進み、“線”という属性(LINE)が、
その非テキストユニットに付加される。そしてステップ
S17に進み、次のユニットが選択される。In this way, if a line is detected in step S28, the process proceeds to step S29, and the attribute (LINE) of "line" is changed to
Appended to the non-text unit. Then, in step S17, the next unit is selected.
【0057】一方、もしステップS28で、線が検出さ
れなかった場合はステップS30に進み、その非テキス
トユニットのサイズが調べられる。このサイズがある閾
値より小さければステップS31に進み、その非テキス
トユニットの分類を決定することができず、その閾値は
最大のフォントサイズから決定される。具体的には、最
大フォントサイズの半分の値にするとよい結果が得られ
る。そして“未知”の属性(UNKNOWN)が付加される。そ
の後ステップS17に進み、次のユニットが選択され
る。On the other hand, if no line is detected in step S28, the flow advances to step S30 to check the size of the non-text unit. If this size is smaller than a certain threshold, the process proceeds to step S31, and the classification of the non-text unit cannot be determined, and the threshold is determined from the maximum font size. Specifically, a good result can be obtained by setting the value to half the maximum font size. Then, an "unknown" attribute (UNKNOWN) is added. After that, the process proceeds to step S17, and the next unit is selected.
【0058】ステップS30において、もしサイズが予
め決められた閾値より大きければステップS32に進
み、そこで非テキストユニットの内部領域で白輪郭の探
索が行なわれ、ステップS42〜ステップS44で説明
した処理と同様の処理がステップS32〜ステップS3
4で実行され、白輪郭の数が計算される。In step S30, if the size is larger than a predetermined threshold value, the process proceeds to step S32, in which the white contour is searched for in the internal area of the non-text unit, and the same processing as described in steps S42 to S44 is performed. Processing is step S32 to step S3
4, the number of white contours is calculated.
【0059】そしてステップS34において、白輪郭の
数が“4”以上でなければステップS35に進み、線図
形あるいはハーフトーンイメージとして十分な大きさを
持っているかどうかを確かめるために、サイズが計算さ
れる。このサイズの決定は、そのテキストのユニットの
高さと幅、及び黒画素のランレングスの最大長に基づい
て行なわれる。特に、その非テキストユニットの高さと
幅が最大フォントサイズより小さい場合は、そのユニッ
トは線図形やハーフトーンイメージを構成するに十分な
大きさを持ってないとみなされてステップS38に進
み、“未知”の属性(UNKNOWN)が付加される。Then, in step S34, if the number of white contours is not "4" or more, the process proceeds to step S35, and the size is calculated in order to confirm whether or not it has a sufficient size as a line figure or a halftone image. It This size determination is based on the height and width of the unit of text and the maximum run length of black pixels. In particular, if the height and width of the non-text unit are smaller than the maximum font size, it is considered that the unit is not large enough to form a line drawing or a halftone image, and the process proceeds to step S38. An unknown (UNKNOWN) attribute is added.
【0060】同様に、ユニットの幅は最大フォントサイ
ズより大きいが、黒画素のランレングスの最大長が最大
フォントサイズより大きくないときもステップS38に
進み“未知”の属性が付加される。そしてステップS1
7に戻り、新しいユニットが選択される。Similarly, when the unit width is larger than the maximum font size but the maximum length of the black pixel run length is not larger than the maximum font size, the process proceeds to step S38 and the attribute "unknown" is added. And step S1
Returning to 7, a new unit is selected.
【0061】ステップS35において、その非テキスト
ユニットが線図形或はハーフトーンイメージを構成する
のに十分な大きさを持っている場合はステップS36に
進み、線図形かどうかが判定され、線図形又はハーフト
ーンイメージという属性が付加される。これらステップ
S36〜S41の処理は、前述のステップS55〜S5
9と同様の処理であるため、それらの説明を省略する。In step S35, if the non-text unit has a size large enough to form a line figure or a halftone image, the process proceeds to step S36, it is judged whether it is a line figure, or the line figure or An attribute called a halftone image is added. The processes of these steps S36 to S41 are the same as the above-mentioned steps S55 to S5.
Since the processing is similar to that of 9, the description thereof will be omitted.
【0062】図5〜図7(図4のステップS2に相当)
で説明した流れに従って、入力画像中の全ての連携成分
が調べられ、分類されると図20で示されるようなツリ
ー構造が得られる。5 to 7 (corresponding to step S2 in FIG. 4)
When all the linked components in the input image are examined and classified according to the flow described in the above, the tree structure as shown in FIG. 20 is obtained.
【0063】図20に示すように、ルート(ROOT)は入力
画像のページにあたる。ルートの子はテキストブロック
(TEXT)、又は、未知(NON-TEXT UNKNOWN)・フレーム(FRA
ME)・写真(図)(PICTURE)・線(LINE)からなる非テキス
トブロックである。フレーム(FRAME)の子はテキストブ
ロック(TEXT)、“未知”の非テキストデータ(UNKNOW
N)、テキストブロックを含む表(TABLE)、写真(図)(PI
CTURE)、線(LINE)である。As shown in FIG. 20, the root corresponds to the page of the input image. The root child is a text block
(TEXT) or unknown (NON-TEXT UNKNOWN) frame (FRA
It is a non-text block consisting of ME), photo (picture), and line. The child of a frame (FRAME) is a text block (TEXT), and "unknown" non-text data (UNKNOW).
N), table containing text blocks (TABLE), photo (figure) (PI
CTURE) and line (LINE).
【0064】図23は、ピクセルイメージデータのペー
ジ90を表わす図で、この中には、大きなフォントサイ
ズのテキスト91、例えば93の様なテキストデータを
含む表92、テキストデータ94、水平線95、別のタ
イトル96、2つの段落からなるテキストデータ97、
キャプション99を備え枠で囲まれた線図形98、タイ
トル100で始まりテキストデータ101へ続く2番目
の段組、キャプション103を備え枠で囲まれたハーフ
トーンイメージ102、テキストデータ104、水平線
105、最終段落106が含まれる。FIG. 23 shows a page 90 of pixel image data, in which a large font size text 91, table 92 containing text data such as 93, text data 94, horizontal lines 95, another. Title 96, text data 97 consisting of two paragraphs,
A line graphic 98 surrounded by a frame with a caption 99, a second column starting with a title 100 and continuing to the text data 101, a halftone image 102 surrounded by a frame including a caption 103, text data 104, a horizontal line 105, and a final line. Paragraph 106 is included.
【0065】図24は、同じイメージに対してステップ
S2(図4)の処理を施したものである。FIG. 24 shows the same image that has been subjected to the process of step S2 (FIG. 4).
【0066】図24から理解できるように、ページ90
中の連結成分は矩形で切り出され、その内部は図5のス
テップS23からステップS42〜ステップS54で示
される処理によって属性が調べられる。ステップS11
で得られた全てのテキストユニットは、ツリーのどの位
置にあっても、ステップS12で垂直方向或は水平方向
にグループ化される。このグループ化の操作は、各テキ
ストユニット及びその周辺のユニットの纏まり具合に基
づいている。また段組を表していると思われるギャップ
(空間スペース)が垂直及び水平両方向について検出さ
れ、保持される。なお、図4のステップS3の詳細な説
明は、図18のフローチャートを参照して以下に説明す
る。As can be seen from FIG. 24, page 90
The connected component in the inside is cut out in a rectangle, and the inside of the connected component is checked for attributes by the processing shown in steps S23 to S42 to S54 in FIG. Step S11
All the text units obtained in step S12 are grouped vertically or horizontally in step S12 regardless of their position in the tree. This grouping operation is based on the degree of gathering of each text unit and its surrounding units. Also, gaps (spatial spaces) that appear to represent columns are detected and maintained in both vertical and horizontal directions. A detailed description of step S3 in FIG. 4 will be given below with reference to the flowchart in FIG.
【0067】まずステップS61では、非テキストユニ
ットの境界線が垂直及び水平方向に伸ばされ、ギャップ
ラインマーカとされる。First, in step S61, the boundary line of the non-text unit is extended vertically and horizontally to form a gap line marker.
【0068】これは図24に示されるように、垂直方向
のギャップラインマーカ109a,109bが、テキス
トあるいは非テキストユニットと交差するまで(この例
では図23のユニット95)垂直方向に伸ばされる。同
様に、ギャップラインマーカ109c,109dも、ユ
ニット95と交差するまで伸ばされる。また、水平方向
のギャップラインマーカについても同様の処理を行う。
ギャップラインマーカは、ギャップ(空間スペース)を
検知するのに有効で、これによって段組を得ることがで
きる。This is as shown in FIG. 24, where the vertical gap line markers 109a, 109b are vertically extended until they intersect a text or non-text unit (in this example, unit 95 of FIG. 23). Similarly, the gap line markers 109c and 109d are also extended until they intersect the unit 95. The same processing is performed for the gap line marker in the horizontal direction.
The gap line marker is effective for detecting a gap (spatial space), whereby a column can be obtained.
【0069】次にステップS62に進み、図24の10
7で示すようなテキストユニットの行結合が行なわれ
る。ここでの行結合は、両方向に近接した連結成分間の
距離を予め水平及び垂直それぞれの方向について調べ
て、水平方向の距離が短い場合には水平方向に、垂直方
向の距離が短い場合には垂直方向について行なわれる。
この結合方向は、結合しようとするテキストユニットの
組方向が縦であるか横であるかに対応しているものであ
る。Next, the process proceeds to step S62, where 10 in FIG.
Line joining of text units is performed as shown at 7. In the row combination here, the distance between connected components that are close to each other in both directions is checked in advance in each of the horizontal and vertical directions. When the horizontal distance is short, the horizontal connection is performed. When the vertical distance is short, the row combination is performed. This is done in the vertical direction.
The combination direction corresponds to whether the text units to be combined are set vertically or horizontally.
【0070】そして、これらのテキストユニットは、次
の条件が満たされると1つのテキスト行として結合され
る。 (1)その結合によってギャップラインマーカを越えな
い。 (2)そのテキストユニットは他のテキストユニットと
接触しているか、一定の閾値以下の距離にある。この閾
値としては図5のステップS14で求めたテキストの平
均長に、実験的に求めたスケールファクタ(本実施例で
は“1.2”で満足いく結果が得られている)をかけた
ものでよい。Then, these text units are combined into one text line when the following conditions are met. (1) The bond does not exceed the gap line marker. (2) The text unit is in contact with another text unit or at a distance equal to or less than a certain threshold value. This threshold is obtained by multiplying the average length of the text obtained in step S14 of FIG. 5 by an experimentally obtained scale factor (“1.2” is obtained in this embodiment, which is a satisfactory result). Good.
【0071】しかし、結合の前にテキストユニット間の
ギャップをテキストユニットが横組である場合には水
平、縦組である場合には垂直の方向に伸ばすことによっ
て、段組構造を表わす方向に、伸びたギャップが存在す
るかどうか決定することができる。例えば、図24の例
では、ギャップ108が2つのテキストの間に存在して
いる。ギャップは数行に亙って垂直方向に伸びているた
め、ステップS62では、テキストユニット間の距離が
閾値以下であってもギャップとして残される。However, by extending the gap between the text units in the horizontal direction when the text units are in horizontal writing mode and in the vertical direction when the text units are in vertical writing mode before combining, in the direction showing the column structure, It can be determined if there is an extended gap. For example, in the example of FIG. 24, the gap 108 exists between two texts. Since the gap extends in the vertical direction over several lines, in step S62, even if the distance between the text units is equal to or less than the threshold value, the gap is left.
【0072】次にステップS63に進み、ステップS6
2で結合されなかったテキストユニットの組みに対し
て、それらのユニットが共に近接する他のテキストユニ
ットによってオーバラップされ、かつ、その結合がギャ
ップラインマーカを横切らないとき結合が行なわれる。
このステップは、段落の構造からくるものではなく、単
にテキスト行におけるスペースの関係から発生したもの
を消去するのに効果的である。図24の例では、ステッ
プS62で残されたギャップ108は、ステップS63
で消去される。なぜなら、すぐ下の文字にオーバラップ
され、かつ、ギャップラインマーカを横切ることもない
からである。そしてステップS64に進み、ツリー構造
を更新する。Next, the process proceeds to step S63 and step S6.
For a set of text units that were not joined by two, a join is made when those units are overlapped by another text unit in close proximity and the join does not cross a gap line marker.
This step is effective in erasing anything that does not come from the structure of paragraphs, but simply from the relationship of spaces in a text line. In the example of FIG. 24, the gap 108 left in step S62 is the same as that in step S63.
To be erased. This is because it overlaps the character immediately below and does not cross the gap line marker. Then, in step S64, the tree structure is updated.
【0073】図19は、図4のステップS3で説明した
グループ化の処理の結果を表わす模式図で、図21は、
このステップS3の処理によってツリー構造がどのよう
に変更されたかを表わす図である。FIG. 19 is a schematic diagram showing the result of the grouping process described in step S3 of FIG. 4, and FIG.
It is a figure showing how the tree structure was changed by the process of this step S3.
【0074】図25に示されるように、結合されたテキ
ストユニットはグループ化されて、110で示すような
テキスト行にされる。特に、ツリー構造のどこにあって
も、テキストユニットは必ず結合されてテキスト行にな
る。例えば、111はツリー構造状のフレームテーブル
の下にあるが、やはり結合されている。しかし、図6の
ステップS27からS39、及びステップS42からス
テップS59で求めた白輪郭を越えた再グループ化は行
なわれないことに注意されたい。これは、テーブル中の
項目を1つの行にしてしまわないためである。尚、左右
の段組の間のギャップは保持される。また、非テキスト
ユニットは再グループ化されない。そのため、112や
113で示すように、これらユニットは閾値以下の距離
にあってもグループ化されていない。As shown in FIG. 25, the combined text units are grouped into text lines as shown at 110. In particular, everywhere in the tree structure, text units are always combined into text lines. For example, 111 is below the frame table in a tree structure, but is also joined. However, it should be noted that regrouping beyond the white contour obtained in steps S27 to S39 and steps S42 to S59 of FIG. 6 is not performed. This is because the items in the table are not put into one line. The gap between the left and right columns is maintained. Also, non-text units are not regrouped. Therefore, as indicated by 112 and 113, these units are not grouped even if they are at a distance equal to or less than the threshold.
【0075】図21では、この新たなグループ化が反映
されたツリー構造になっている。FIG. 21 shows a tree structure that reflects this new grouping.
【0076】図18(図4のステップS3)で述べた過
程でテキストユニットが結合されてテキスト行になった
後、ステップS4で示されるように、テキスト行はテキ
スト行形成時の結合方向とは逆の方向に結合されてテキ
ストブロックとなる。この過程を図19を用いて、より
詳細に説明する。After the text units are combined to form a text line in the process described with reference to FIG. 18 (step S3 in FIG. 4), as shown in step S4, the text line is not connected in the direction in which the text line is formed. Combined in the opposite direction to form a text block. This process will be described in more detail with reference to FIG.
【0077】グループ化の過程は、テキスト行ユニット
のまとまり具合と非テキストユニットの位置による。例
えば、間に存在する非テキスト行は境界線として作用
し、反対側にあるテキスト行同士がグループ化されて1
つのテキストブロックとなるのを防ぐ。2つの連続する
非テキスト行ユニットの間にある全てのテキスト行は同
時に処理を受ける。加えて、ステップS4では、いくつ
かのテキストユニットは非テキストユニットと結合され
るべきか(例えば非テキストイメージとともに構成され
るテキストキャプション)、または、ある非テキストユ
ニットを他の非テキストユニットと結合すべきか(例え
ば、ハーフトーンイメージと関係している線図形)が、
調べられる。The process of grouping depends on the cohesion of the text line units and the positions of the non-text units. For example, intervening non-text lines act as boundaries, and text lines on opposite sides are grouped into one
Prevent it from becoming one text block. All text lines between two consecutive non-text line units are processed simultaneously. In addition, in step S4 some text units should be combined with non-text units (eg text captions composed with non-text images), or some non-text units should be combined with other non-text units. If you have a kika (for example, a line shape associated with a halftone image),
Be examined.
【0078】図19は、テキスト行をグループ化してテ
キストブロックとする様子を表わすフローチャートであ
る。FIG. 19 is a flow chart showing how text lines are grouped into text blocks.
【0079】まずステップS71で、タイトルブロック
が、ステップS14で非テキストユニットと分類された
ものの中から形成される。その判断基準は、最大フォン
トサイズより小さいが、平均テキストサイズより大きい
ということである。そのような、同じ様な大きさで近接
している非テキストユニットが全てグループ化されるこ
とによってタイトルブロックが形成される。そして、そ
のブロックには“タイトル”という属性(TITLE)が付加
される。そして、グループ化できなかった残りの全ての
非テキストブロックは、ピクチャーテキストという属性
が付加される。そして、ツリー構造がこれに応じて適当
に更新される。なお、タイトルはページの再構成に役立
つ。First, in step S71, a title block is formed from those classified as non-text units in step S14. The criterion is that it is smaller than the maximum font size but larger than the average text size. A title block is formed by grouping together all such non-text units of similar size and proximity. Then, an attribute (TITLE) called "title" is added to the block. An attribute of picture text is added to all the remaining non-text blocks that cannot be grouped. The tree structure is then updated accordingly. Note that the title is useful for reconfiguring the page.
【0080】次にステップS72に進み、テキスト行の
間にある非テキストユニットが検出される。これらの非
テキストユニットは、テキストブロック間の境界線とし
て作用し、テキスト行が1つのテキストブロックになる
のを防いでいる。そしてステップS73に進み、2つの
ステップからなる処理によって、テキスト行がテキスト
行形成時の結合方向とは逆の方向(以下、これを「ブロ
ック結合方向」と呼ぶ)にグループ化されてテキストブ
ロックとなる。最初のステップでは、段組の間のギャッ
プが探索される。そのためには、例えば画素のブロック
結合方向のヒストグラムが計算される。2番目のステッ
プでは、ブロック結合方向に連続するテキスト行同士の
距離が、図5のステップS14で計算したテキストの高
さより小さければ、これらのテキスト行は、各段組内に
おいてグループ化される。このステップS73の処理
は、図25のテキスト行114のように、同じ段落に属
するテキスト行を結合するのに有効である。Next, in step S72, a non-text unit between text lines is detected. These non-text units act as boundaries between text blocks, preventing text lines from becoming one text block. Then, the process proceeds to step S73, where the text lines are grouped in a direction (hereinafter, referred to as a "block combining direction") opposite to the combining direction at the time of forming the text line by the process of two steps, and the text blocks are grouped. Become. In the first step, gaps between columns are searched. For this purpose, for example, a histogram of the pixel in the block joining direction is calculated. In the second step, if the distance between consecutive text lines in the block combining direction is smaller than the height of the text calculated in step S14 of FIG. 5, these text lines are grouped in each column. The process of step S73 is effective for joining the text lines belonging to the same paragraph as the text line 114 of FIG.
【0081】次にステップS74に進み、垂直方向又は
水平方向に近接したテキストブロックが、非テキストユ
ニットによって分離されておらず、かつステップS73
で得られたヒストグラムから発見されたどんなギャップ
をも破壊しない場合にグループ化される。これらテキス
トブロックのグループ化は、ステップS14で計算した
垂直方向の高さに応じて計算される一定の閾値より小さ
いブロック間の分離状態に基づいて行なわれる。Next, proceeding to step S74, the text blocks which are vertically or horizontally adjacent to each other are not separated by the non-text unit, and step S73
Grouped if it does not break any gaps found in the histogram obtained in. The grouping of these text blocks is performed based on the separation state between blocks smaller than a certain threshold calculated according to the height in the vertical direction calculated in step S14.
【0082】図25の例で、段落115のテキスト行や
段落116のテキスト行から作られるテキストブロック
をグループ化するのに、このステップS74の処理が有
効である。しかし、段落117と118とを結合するの
には有効でない。これら、これらのテキストブロック1
17,118が非テキストブロック119(線)によっ
て分離されているからである。In the example of FIG. 25, the processing of step S74 is effective for grouping the text blocks formed from the text lines of paragraph 115 and the text lines of paragraph 116. However, it is not valid to combine paragraphs 117 and 118. These, these text blocks 1
This is because 17,118 are separated by the non-text block 119 (line).
【0083】次にステップS75に進み、あるテキスト
ブロックが非テキストブロックと結合すべきか、或はあ
る非テキストブロックが他の非テキストブロックと結合
すべきかを決定する。ここで、テキストブロックは、非
テキストタイトルブロック、非テキストハーフトーンブ
ロック、及び付属物をもつ非テキストラインと結合する
ことができる。これらの結合は次の判断に従って行なわ
れる。Next, in step S75, it is determined whether a certain text block should be combined with a non-text block or a certain non-text block should be combined with another non-text block. Here, text blocks can be combined with non-text title blocks, non-text halftone blocks, and non-text lines with attachments. These connections are made according to the following judgment.
【0084】(1-a)もし、あるテキストブロックが非
テキストのタイトルブロックと水平方向に近く、かつ垂
直方向にオーバラップしている場合、そのテキストブロ
ックは非テキストタイトルブロックに結合される(但
し、テキストブロックおよびタイトルブロックは共に横
組であるとする)。(1-a) If a text block is close to a non-text title block in the horizontal direction and vertically overlaps, the text block is combined with the non-text title block (however, , Text blocks and title blocks are both in horizontal writing mode).
【0085】(1-b)もし、あるテキストブロックが非
テキストのタイトルブロックと垂直方向に近く、かつ水
平方向にオーバラップしている場合、そのテキストブロ
ックは非テキストタイトルブロックに結合される(但
し、テキストブロックおよびタイトルブロックは共に縦
組であるとする)。(1-b) If a text block is vertically close to and horizontally overlaps a non-text title block, the text block is combined with the non-text title block (however, , Text blocks and title blocks are both in vertical writing mode).
【0086】(2)あるテキストブロックが(水平方向
にも垂直方向にも)ワードサイズのブロックより小さ
く、かつそのテキストブロックが、近接するワードサイ
ズのテキストブロックを持たない場合、このテキストブ
ロックは非テキストハーフトーンイメージブロックの内
部に置かれる。(2) If a text block (horizontally and vertically) is smaller than a word-sized block and the text block has no adjacent word-sized text blocks, then this text block is non- Placed inside a text halftone image block.
【0087】(3)付属物を持つ非テキストラインをオ
ーバラップする、あるテキストブロックに対して、その
付属物を持つラインは、おそらくアンダーライン付のテ
キストなので単にテキストとする。(3) For a certain text block that overlaps a non-text line with an adjunct, the line with that adjunct is probably underlined text, so it is simply text.
【0088】また、いくつかの非テキストブロックは、
図27に従って他の非テキストブロックと結合される。
尚、この図27で、“Test”となっているのは、それぞ
れ次の内容である。 Test#1:1つのブロックが完全に他のブロックに
含まれるならば結合する。 Test#2:ピクチャーテキストの幅がワードサイズ
ブロックの幅より小さいならば結合する。 Test#3:ブロック同士が近接しているならば結合
する。Also, some non-text blocks are
Combined with other non-text blocks according to FIG.
In addition, in FIG. 27, "Test" has the following contents. Test # 1: Combine if one block is completely contained in another block. Test # 2: Combine if the width of the picture text is smaller than the width of the word size block. Test # 3: If the blocks are close to each other, they are combined.
【0089】次にステップS76では属性が修正され、
これまでに述べた処理によってツリー構造が更新され
る。Next, in step S76, the attributes are modified,
The tree structure is updated by the processing described so far.
【0090】図26は、図19の処理で得られるブロッ
ク構造を表しており、図22はツリー構造の一例を示す
図である。FIG. 26 shows the block structure obtained by the processing of FIG. 19, and FIG. 22 is a diagram showing an example of the tree structure.
【0091】図26中のブロックとしては、タイトルブ
ロック120、テキストブロック121、写真(線画)
122がある。また、フレームデータとしては、表形式
になっているブロック123、テキストユニット125
を内部に有し表構造になっているブロック124があ
る。尚、非テキストイメージ127は、図26中の様々
なユニットのセパレータとなっている。As the blocks in FIG. 26, a title block 120, a text block 121, and a photograph (line drawing)
There is 122. Further, as frame data, a block 123 and a text unit 125 in a tabular form are used.
There is a block 124 having a table structure inside. The non-text image 127 serves as a separator for various units in FIG.
【0092】以上、属性分離部4の処理の詳細を説明し
た。尚、本発明は、複数の機器から構成されるシステム
に適用しても、1つの機器からなる装置に適用しても良
い。また、本発明はシステム或は装置にプログラムを供
給することによって実施される場合にも適用できること
は言うまでもない。この場合、本発明に係るプログラム
を格納した記憶媒体が本発明を構成することになる。そ
して、該記憶媒体からそのプログラムをシステム或は装
置に読み出すことによって、そのシステム或は装置が、
予め定められた仕方で動作する。The details of the processing of the attribute separating unit 4 have been described above. The present invention may be applied to a system including a plurality of devices or an apparatus including one device. Further, it goes without saying that the present invention can be applied to the case where it is implemented by supplying a program to a system or an apparatus. In this case, the storage medium storing the program according to the present invention constitutes the present invention. Then, by reading the program from the storage medium to the system or device, the system or device
It works in a predetermined way.
【0093】以上説明したように、属性分離部4の属性
分離結果より分類内容、数量を整理し、整理した情報を
分類情報リストとして出力を行うが、大量の書類がある
場合は、例えば一度に分離処理を行い、それを1枚のリ
ストにまとめてプリント出力することにより、属性分離
の修正を行うか否かを事前に判断できるため修正を効率
的かつ容易に行うことができる。As described above, the classified contents and quantity are sorted based on the attribute separation result of the attribute separating unit 4 and the sorted information is output as a classified information list. By performing the separation processing and collectively printing out the list in one sheet, whether or not to correct the attribute separation can be determined in advance, so that the correction can be efficiently and easily performed.
【0094】また、本発明の画像処理装置のコントロー
ルパネルと一体化した表示部6bを用いて、属性分離結
果の修正を行うことができる。以上の様に比較的簡単な
構成でしかも、優れた操作環境を有する画像処理装置の
提供が可能となった。Further, the attribute separation result can be corrected using the display section 6b integrated with the control panel of the image processing apparatus of the present invention. As described above, it is possible to provide an image processing apparatus having a relatively simple structure and an excellent operating environment.
【0095】[0095]
【発明の効果】以上説明したように本発明によれば、入
力画像を属性分離し、その統計情報を生成して、後の画
像の検索を容易にすることができる。As described above, according to the present invention, the input image can be attribute-separated and its statistical information can be generated to facilitate the subsequent retrieval of the image.
【図1】本実施の形態の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of the present embodiment.
【図2】作成部の動作例を示す図である。FIG. 2 is a diagram illustrating an operation example of a creation unit.
【図3】分類情報リストの例を示す図である。FIG. 3 is a diagram showing an example of a classification information list.
【図4】属性分離部における処理の概要を示すフローチ
ャートである。FIG. 4 is a flowchart showing an outline of processing in an attribute separation unit.
【図5】図4のステップS2の処理を示すフローチャー
トである。5 is a flowchart showing a process of step S2 of FIG.
【図6】図4のステップS2の処理を示すフローチャー
トである。FIG. 6 is a flowchart showing a process of step S2 of FIG.
【図7】図4のステップS2の処理を示すフローチャー
トである。FIG. 7 is a flowchart showing a process of step S2 of FIG.
【図8】原稿画像に含まれる画像の属性分離を説明する
図である。FIG. 8 is a diagram illustrating attribute separation of images included in a document image.
【図9】原稿画像に含まれる画像の属性分離を説明する
図である。FIG. 9 is a diagram illustrating attribute separation of images included in a document image.
【図10】本実施の形態における矩形領域の階層構造を
示す図である。FIG. 10 is a diagram showing a hierarchical structure of rectangular areas in the present embodiment.
【図11】非テキスト領域の分離を説明する図である。FIG. 11 is a diagram illustrating separation of non-text areas.
【図12】非テキスト領域の分離を説明する図である。FIG. 12 is a diagram illustrating separation of non-text areas.
【図13】非テキスト領域の分離を説明する図である。FIG. 13 is a diagram illustrating separation of non-text areas.
【図14】非テキストユニットの内部の探索方向を示す
図である。FIG. 14 is a diagram showing a search direction inside a non-text unit.
【図15】本実施の形態において、白輪郭が結合される
場合を説明する図である。FIG. 15 is a diagram illustrating a case where white contours are combined in the present embodiment.
【図16】本実施の形態において、白輪郭が結合される
場合を説明する図である。FIG. 16 is a diagram illustrating a case where white contours are combined in the present embodiment.
【図17】本実施の形態において、白輪郭が結合される
場合を説明する図である。FIG. 17 is a diagram illustrating a case where white contours are combined in the present embodiment.
【図18】図4のステップS3の詳細な処理を示すフロ
ーチャートである。18 is a flowchart showing detailed processing of step S3 of FIG.
【図19】本実施の形態において、テキスト行をグルー
プ化してテキストブロックとする様子を表わすフローチ
ャートである。FIG. 19 is a flowchart showing how text lines are grouped into text blocks in the present embodiment.
【図20】本実施の形態により得られるツリー構造を説
明する図である。FIG. 20 is a diagram illustrating a tree structure obtained according to the present embodiment.
【図21】本実施の形態により得られるツリー構造を説
明する図である。FIG. 21 is a diagram illustrating a tree structure obtained according to this embodiment.
【図22】本実施の形態により得られるツリー構造を説
明する図である。FIG. 22 is a diagram illustrating a tree structure obtained according to this embodiment.
【図23】本実施の形態で処理される原稿画像の具体例
を示す図である。FIG. 23 is a diagram showing a specific example of an original image processed in the present embodiment.
【図24】図23の画像をユニットに分割した例を示す
図である。FIG. 24 is a diagram showing an example in which the image of FIG. 23 is divided into units.
【図25】同じイメージに対してステップS2(図4)
の処理を施した例を示す図である。FIG. 25: Step S2 for the same image (FIG. 4)
It is a figure which shows the example which performed the process of.
【図26】図19の処理で得られるブロック構造を表わ
す図である。FIG. 26 is a diagram showing a block structure obtained by the processing of FIG.
【図27】非テキストブロック同士を結合する論理を示
す図である。FIG. 27 is a diagram showing logic for connecting non-text blocks to each other.
1 スキャナ部 2 メモリコントロール部 3 メモリ部 4 属性分離部 5 作成部 6 出力部 1 Scanner Section 2 Memory Control Section 3 Memory Section 4 Attribute Separation Section 5 Creation Section 6 Output Section
Claims (21)
分画像に分離する属性分離工程と、 前記属性分離工程で生成された同じ属性の部分画像の統
計を取る統計処理工程と、 前記統計処理工程で生成された前記部分画像の統計結果
の画像を形成する画像形成工程とを備えることを特徴と
する画像処理方法。1. An image input step of inputting an image, an attribute separation step of separating the image input in the image input step into partial images of a predetermined attribute, and the same attribute generated in the attribute separation step. An image processing method comprising: a statistical processing step of obtaining statistics of partial images; and an image forming step of forming an image of statistical results of the partial images generated in the statistical processing step.
形成することを特徴とする請求項1に記載の画像処理方
法。2. The image processing method according to claim 1, wherein the image forming step forms an image on a display unit.
像を形成することを特徴とする請求項1に記載の画像処
理方法。3. The image processing method according to claim 1, wherein the image forming step forms an image on an image recording apparatus.
数であることを特徴とする請求項1に記載の画像処理方
法。4. The image processing method according to claim 1, wherein the statistic is the number of partial images having the same attribute.
とを特徴とする請求項1に記載の画像処理方法。5. The image processing method according to claim 1, wherein the predetermined attribute includes a title part.
徴とする請求項1に記載の画像処理方法。6. The image processing method according to claim 1, wherein the predetermined attribute includes a table portion.
を特徴とする請求項1に記載の画像処理方法。7. The image processing method according to claim 1, wherein the predetermined attribute includes a graph portion.
スト部を含むことを特徴とする請求項1に記載の画像処
理方法。8. The image processing method according to claim 1, wherein the predetermined attribute includes a text portion and a non-text portion.
像中の画像要素間の距離が所定の距離より小さい画像要
素を同じグループとすることを特徴とする請求項1に記
載の画像処理方法。9. The image processing method according to claim 1, wherein in the attribute separating step, image elements in which the distance between image elements in the input image is smaller than a predetermined distance are included in the same group. .
画像中の連結する白画素或は黒画素数に応じて、画像属
性がテキストか非テキストかを判別することを特徴とす
る請求項8に記載の画像処理方法。10. The attribute separating step determines whether the image attribute is text or non-text according to the number of connected white pixels or black pixels in the input image. The image processing method described in.
分画像に分離する属性分離手段と、 前記属性分離手段で生成された同じ属性の部分画像の統
計を取る統計処理手段と、 前記統計処理手段で生成された前記部分画像の統計結果
の画像を形成する画像形成手段とを備えることを特徴と
する画像処理装置。11. An image input unit for inputting an image, an attribute separating unit for separating an image input by the image input unit into partial images having a predetermined attribute, and an attribute separating unit of the same attribute generated by the attribute separating unit. An image processing apparatus comprising: statistical processing means for obtaining statistics of partial images; and image forming means for forming an image of statistical results of the partial images generated by the statistical processing means.
を形成することを特徴とする請求項11に記載の画像処
理装置。12. The image processing apparatus according to claim 11, wherein the image forming unit forms an image on a display unit.
画像を形成することを特徴とする請求項11に記載の画
像処理装置。13. The image processing apparatus according to claim 11, wherein the image forming unit forms an image on an image recording apparatus.
の数であることを特徴とする請求項11に記載の画像処
理装置。14. The image processing apparatus according to claim 11, wherein the statistic is the number of partial images having the same attribute.
ことを特徴とする請求項11に記載の画像処理装置。15. The image processing apparatus according to claim 11, wherein the predetermined attribute includes a title portion.
特徴とする請求項11に記載の画像処理装置。16. The image processing apparatus according to claim 11, wherein the predetermined attribute includes a table portion.
とを特徴とする請求項11に記載の画像処理装置。17. The image processing apparatus according to claim 11, wherein the predetermined attribute includes a graph section.
キスト部を含むことを特徴とする請求項11に記載の画
像処理装置。18. The image processing apparatus according to claim 11, wherein the predetermined attribute includes a text portion and a non-text portion.
画像中の画像要素間の距離が所定の距離より小さい画像
要素を同じグループとすることを特徴とする請求項11
に記載の画像処理装置。19. The attribute separating means sets the image elements in which the distance between the image elements in the input image is smaller than a predetermined distance into the same group.
An image processing apparatus according to claim 1.
画像中の連結する白画素或は黒画素数に応じて、画像属
性がテキストか非テキストかを判別することを特徴とす
る請求項18に記載の画像処理装置。20. The attribute separating means determines whether the image attribute is text or non-text according to the number of connected white pixels or black pixels in the input image. The image processing device according to item 1.
る光を入力して対応する電気信号に変換するスキャナー
であることを特徴とする請求項11に記載の画像処理装
置。21. The image processing apparatus according to claim 11, wherein the image input unit is a scanner that inputs light reflected from an image and converts the light into a corresponding electric signal.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7278910A JPH09120443A (en) | 1995-10-26 | 1995-10-26 | Image processing method and apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7278910A JPH09120443A (en) | 1995-10-26 | 1995-10-26 | Image processing method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH09120443A true JPH09120443A (en) | 1997-05-06 |
Family
ID=17603804
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP7278910A Withdrawn JPH09120443A (en) | 1995-10-26 | 1995-10-26 | Image processing method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH09120443A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2000052645A1 (en) * | 1999-03-01 | 2000-09-08 | Matsushita Electric Industrial Co., Ltd. | Document image processor, method for extracting document title, and method for imparting document tag information |
| JP2009183342A (en) * | 2008-02-04 | 2009-08-20 | Hitachi Computer Peripherals Co Ltd | Image processing device |
| JP2010020642A (en) * | 2008-07-11 | 2010-01-28 | Canon Inc | Document managing apparatus, document managing method and computer program |
| JP2010097609A (en) * | 2008-10-15 | 2010-04-30 | Xerox Corp | Method and apparatus for representing document with runlength histogram |
| JP2023051732A (en) * | 2021-09-30 | 2023-04-11 | コニカ ミノルタ ビジネス ソリューションズ ユー.エス.エー., インコーポレイテッド | Method, computer-readable program, and system |
-
1995
- 1995-10-26 JP JP7278910A patent/JPH09120443A/en not_active Withdrawn
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2000052645A1 (en) * | 1999-03-01 | 2000-09-08 | Matsushita Electric Industrial Co., Ltd. | Document image processor, method for extracting document title, and method for imparting document tag information |
| US7035463B1 (en) | 1999-03-01 | 2006-04-25 | Matsushita Electric Industrial Co., Ltd. | Document image processor, method for extracting document title, and method for imparting document tag information |
| JP2009183342A (en) * | 2008-02-04 | 2009-08-20 | Hitachi Computer Peripherals Co Ltd | Image processing device |
| JP2010020642A (en) * | 2008-07-11 | 2010-01-28 | Canon Inc | Document managing apparatus, document managing method and computer program |
| US8650473B2 (en) | 2008-07-11 | 2014-02-11 | Canon Kabushiki Kaisha | Document managing apparatus, document managing method, and storage medium |
| JP2010097609A (en) * | 2008-10-15 | 2010-04-30 | Xerox Corp | Method and apparatus for representing document with runlength histogram |
| JP2023051732A (en) * | 2021-09-30 | 2023-04-11 | コニカ ミノルタ ビジネス ソリューションズ ユー.エス.エー., インコーポレイテッド | Method, computer-readable program, and system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0660256B1 (en) | Method and apparatus for selecting text and/or non-text blocks in a stored document | |
| US8155445B2 (en) | Image processing apparatus, method, and processing program for image inversion with tree structure | |
| EP0567344B1 (en) | Method and apparatus for character recognition | |
| US5892843A (en) | Title, caption and photo extraction from scanned document images | |
| JP3302147B2 (en) | Document image processing method | |
| KR100251600B1 (en) | Image processing method and digital computer | |
| CA2113751C (en) | Method for image segmentation and classification of image elements for document processing | |
| US6574375B1 (en) | Method for detecting inverted text images on a digital scanning device | |
| JPH07131641A (en) | Image processing device | |
| EP1017011A2 (en) | Block selection of table features | |
| US6289120B1 (en) | Method and system for processing images of forms which have irregular construction and/or determining whether characters are interior to a form | |
| JPH1031716A (en) | Character line extraction method and apparatus | |
| JPH09120443A (en) | Image processing method and apparatus | |
| US6356657B1 (en) | Image processing method and apparatus for discriminating an input image area or an attribute of image information in the discriminated area | |
| JP3607753B2 (en) | Document image region dividing method and apparatus, and column type discrimination method and apparatus | |
| JP2002269574A (en) | Run-length-based connected components and contour tracking to improve the performance of bounding region extraction algorithm | |
| JP3187895B2 (en) | Character area extraction method | |
| JP2786355B2 (en) | How to determine the attributes of text images | |
| JPH08272987A (en) | Image processing method and apparatus | |
| TWI242169B (en) | Asian document image preprocessing system and method for character recognition | |
| JP2877548B2 (en) | Document image attribute discrimination method | |
| JP2881066B2 (en) | How to determine the attributes of text images | |
| JPH0728934A (en) | Document image processor | |
| JP3471925B2 (en) | Copying apparatus and image processing method | |
| JPH07296109A (en) | Image processing method and apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20030107 |