JP3517465B2 - How to order character areas - Google Patents

How to order character areas

Info

Publication number
JP3517465B2
JP3517465B2 JP28338794A JP28338794A JP3517465B2 JP 3517465 B2 JP3517465 B2 JP 3517465B2 JP 28338794 A JP28338794 A JP 28338794A JP 28338794 A JP28338794 A JP 28338794A JP 3517465 B2 JP3517465 B2 JP 3517465B2
Authority
JP
Japan
Prior art keywords
column
character
same
group
article
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP28338794A
Other languages
Japanese (ja)
Other versions
JPH08147409A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP28338794A priority Critical patent/JP3517465B2/en
Priority to US08/558,184 priority patent/US5689342A/en
Publication of JPH08147409A publication Critical patent/JPH08147409A/en
Application granted granted Critical
Publication of JP3517465B2 publication Critical patent/JP3517465B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、OCR(光学的文字認
識)装置、複写機、ファクシミリなどの電子装置におい
て、特に入力画像に対して抽出された文字領域に読み順
を付ける文字の順序付け方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic device such as an OCR (optical character recognition) device, a copying machine, and a facsimile, and in particular, a character ordering method for placing a reading order on a character area extracted from an input image. It is about.

【0002】[0002]

【従来の技術】従来の順序付け方法として、原稿画像中
の各領域の位置により縦書きの場合は右から左方向に順
序を付け、同様に上下方向に関しては、上から下方向に
順序を付けていくもの等がある。
2. Description of the Related Art As a conventional ordering method, according to the position of each area in an original image, in the case of vertical writing, the order is from right to left, and similarly in the vertical direction, from top to bottom. There are things to go.

【0003】[0003]

【発明が解決しようとしている課題】しかしながら、上
述の従来技術では新聞記事等、原稿の中に複数の記事が
存在する場合に、複数の記事の本文が入り組んでしまい
正しく読み順を付けることができず、修正等が必要とな
るという問題点があった。
However, in the above-mentioned prior art, when there are a plurality of articles in a manuscript such as a newspaper article, the texts of the plurality of articles are complicated and the reading order can be correctly set. However, there was a problem that corrections were necessary.

【0004】[0004]

【課題を解決するための手段】上記課題を解決するため
に、本発明の順序付け方法は、入力された画像から文字
領域を抽出し、黒画素数が前記入力された画像全体の黒
画素数に対して所定の閾値以上の割合を持つセパレータ
画像もしくは図画像の少なくともいずれかと前記文字領
域との位置関係に従って、前記文字領域をグループに分
け、前記分けられた各グループ内で該文字領域の順序を
決定する。また、上記課題を解決するために、本発明の
順序付け装置は、入力された画像から文字領域を抽出す
る抽出手段と、黒画素数が前記入力された画像全体の黒
画素数に対して所定の閾値以上の割合を持つセパレータ
画像もしくは図画像の少なくともいずれかと前記文字領
域との位置関係に従って、前記文字領域をグループに分
けるグループ分け手段と、前記分けられた各グループ内
で該文字領域の順序を決定する順序決定手段とを有す
る。
In order to solve the above-mentioned problems, the ordering method of the present invention extracts a character area from an input image and sets the number of black pixels to the number of black pixels of the entire input image. On the other hand, according to the positional relationship between the character area and at least one of a separator image or a figure image having a ratio of a predetermined threshold value or more, the character area is divided into groups, and the order of the character areas is divided in each of the divided groups. decide. Further, in order to solve the above-mentioned problems, the ordering device of the present invention is an extraction unit that extracts a character region from an input image, and a black pixel number is predetermined with respect to the total number of black pixels of the input image. Grouping means for dividing the character area into groups according to a positional relationship between the character area and at least one of a separator image or a graphic image having a ratio of a threshold value or more, and an order of the character areas in each of the divided groups. And an order determining means for determining.

【0005】[0005]

【作用】以上の構成において、新聞記事等、原稿の中に
複数の記事が入り組んでいる場合でも、正しく読み順を
付けることができ、修正等の手間を削減できる。
With the above configuration, even if a plurality of articles are complicated in a manuscript, such as a newspaper article, the reading order can be correctly set, and the trouble of correction and the like can be reduced.

【0006】[0006]

【実施例】図20は本実施例における装置の構成を表わ
すブロック図である。1001は本装置全体の処理を実
行するCPUであって、ROM1002に格納されてい
る制御プログラムに従って判断及び処理を制御する。1
002はROMであり、本実施例において説明するフロ
ーチャートの制御プログラム、或いは処理に用いる予め
定まっているパラメータ等のデータを記憶している。1
003はRAMであり、CPU1001での処理中のデ
ータを記憶するワーキングメモリエリアを備える。10
04はスキャナであり、原稿画像を光学的に読み込む。
読み込まれた画像データはRAM1003に記憶でき
る。1005はキーボードであり、各種コードの入力、
オペレータの指示が入力できる。1006はポインティ
ングデバイスであり、表示器1007の表示画面上の所
望の位置を指示でき、また、ボタンをクリックすること
により選択、取消の指示を入力することもできる。10
07は表示器であり、CRT或いは液晶表示器からな
る。1008は例えばLBP、インクジェット式等のプ
リンタ、1009は例えばFDなどの外部記憶装置、1
010はこれら各構成間でのデータの授受を行う為のデ
ータバスである。
[Embodiment] FIG. 20 is a block diagram showing the arrangement of an apparatus according to this embodiment. Reference numeral 1001 denotes a CPU that executes processing of the entire apparatus, and controls judgment and processing according to a control program stored in the ROM 1002. 1
A ROM 002 stores the control program of the flowchart described in the present embodiment, or data such as predetermined parameters used for processing. 1
A RAM 003 has a working memory area for storing data being processed by the CPU 1001. 10
A scanner 04 optically reads a document image.
The read image data can be stored in the RAM 1003. 1005 is a keyboard for inputting various codes,
Operator's instructions can be input. A pointing device 1006 can instruct a desired position on the display screen of the display 1007, and can also input a selection or cancellation instruction by clicking a button. 10
Reference numeral 07 is a display, which is a CRT or a liquid crystal display. Reference numeral 1008 denotes, for example, an LBP or inkjet printer, 1009 denotes, for example, an external storage device such as FD, 1
Reference numeral 010 is a data bus for exchanging data between these components.

【0007】〔第1の実施例〕図1は、本実施例の順序
付け方法を表すフローチャートである。同図において、 ステップS101 スキャナー1004等から画像を入力する。
[First Embodiment] FIG. 1 is a flowchart showing the ordering method of the present embodiment. In the figure, in step S101, an image is input from the scanner 1004 or the like.

【0008】ステップS102 次にステップS101で入力した画像の領域分割を行
い、文字、セパレータ、図等の領域を画像から抽出す
る。このステップでの領域分割方法は、例えば特願平4
−243252号公報等で示される方法がある。ここで
分割された領域情報は全てRAM1003に格納する。
Step S102 Next, the area of the image input in step S101 is divided, and areas such as characters, separators, and drawings are extracted from the image. The area dividing method in this step is, for example, Japanese Patent Application No.
There is a method disclosed in Japanese Patent Laid-Open No. 243252. All the area information divided here is stored in the RAM 1003.

【0009】ステップS103 次に画像から抽出された文字、セパレータ、図等の領域
に関わる領域情報をRAM1003から読み出して、階
層的なグループに分ける。以下そのグループ化について
詳細に説明する。図2は、画像から抽出された領域を画
像全体(ROOT)、記事、段組、同一段グループ、段
落(同一行グループ)、行という6階層にグループ分け
したところを示した図である。201は階層0即ち画像
全体である。202は記事1である。203は同じ階層
内において更に幾つかあることを示している。階層内の
グループの個数は、階層0は1個のみ、階層1〜4は1
個以上、階層5は0個以上存在する。204は段組1で
あり、記事1(202)に属している。205は同一段
グループであり、段組1(204)に属している。20
6は段落1であり、同一段グループ1(205)に属し
ている。段落1は、行からなるグループ階層5を持って
いない。207は段落2すなわち行1、行2からなる同
一行グループであり、同一段グループ1(205)に属
している。208は行1であり、段落2(207)に属
している。
Step S103 Next, area information relating to areas such as characters, separators and figures extracted from the image is read from the RAM 1003 and divided into hierarchical groups. The grouping will be described in detail below. FIG. 2 is a diagram showing a region extracted from an image, which is divided into six layers of the entire image (ROOT), article, column, same column group, paragraph (same line group), and line. Reference numeral 201 is layer 0, that is, the entire image. 202 is the article 1. Reference numeral 203 indicates that there are some more in the same hierarchy. The number of groups in the hierarchy is only one in hierarchy 0 and 1 in hierarchy 1 to 4.
There are more than one and there are more than one hierarchy 5. Reference numeral 204 is column 1 and belongs to article 1 (202). 205 is the same column group and belongs to column set 1 (204). 20
6 is a paragraph 1 and belongs to the same column group 1 (205). Paragraph 1 does not have a group hierarchy 5 of lines. 207 is a same-line group consisting of paragraph 2, that is, line 1 and line 2, and belongs to the same-column group 1 (205). Line 208 is in line 1 and belongs to paragraph 2 (207).

【0010】図3はステップS103についての詳細な
フローチャートである。
FIG. 3 is a detailed flowchart of step S103.

【0011】図4は、領域分割によって抽出された文字
領域、セパレータ領域、図領域、グループ化によってで
きた記事、段組、同一段グループ、同一行グループの一
部を示している。図4において、401はスキャナー等
から入力した縦書きの原稿画像である。413、443
は抽出した文字領域、特に見出し領域かつ記事、同一段
グループ、段落でもある。426、427は抽出した文
字領域、特に見出し領域かつ行である。414、41
6、430、444は抽出した文字領域かつ同一段グル
ープである。428、429は抽出した文字領域かつ段
落である。415、445、446は抽出したセパレー
タ領域である。425は抽出した図領域である。41
1、421、441はセパレータ446及び図領域42
5によって分割した記事領域である。412、422、
442は段組である。423は同一段グループである。
FIG. 4 shows a part of the character area, the separator area, the figure area, the articles created by the area division, the grouped article, the column group, the same column group, and the same line group. In FIG. 4, reference numeral 401 denotes a vertically written original image input from a scanner or the like. 413,443
Is an extracted character area, particularly a headline area and also an article, in-column group, or paragraph. Reference numerals 426 and 427 are extracted character areas, particularly heading areas and lines. 414, 41
Reference numerals 6, 430, and 444 are extracted character areas and in-column groups. 428 and 429 are extracted character areas and paragraphs. 415, 445, and 446 are extracted separator areas. 425 is an extracted drawing area. 41
1, 421 and 441 are the separator 446 and the drawing area 42.
It is an article area divided by 5. 412, 422,
442 is a column. 423 is a same-stage group.

【0012】図5は、ステップS301についての詳細
なフローチャートである。図6はステップS304につ
いての詳細なフローチャートである。図7はステップS
302についての詳細なフローチャートである。図8は
図4の画像から抽出された領域を画像全体、記事、段
組、同一段グループ、段落(同一行グループ)、行とい
う6階層にグループ分けしたところを示した図である。
図9はステップS104についての詳細なフローチャー
トである。図10はステップS901についての詳細な
フローチャートである。図11はステップS902につ
いての詳細なフローチャートである。図12はステップ
S903についての詳細なフローチャートである。図1
3はステップS904についての詳細なフローチャート
である。図14はステップS905についての詳細なフ
ローチャートである。図15はステップS305につい
ての詳細なフローチャートである。図16は図4の画像
から抽出された文章領域426である。図16におい
て、1601は文字領域426の黒画素のY方向(縦方
向)のヒストグラムである。1602はヒストグラム1
601から求めた黒画素の幅である。図17はステップ
S906についての詳細なフローチャートである。
FIG. 5 is a detailed flowchart of step S301. FIG. 6 is a detailed flowchart of step S304. FIG. 7 shows step S
3 is a detailed flowchart of 302. FIG. 8 is a diagram showing the regions extracted from the image of FIG. 4 divided into six layers of the entire image, article, column, same column group, paragraph (same line group), and line.
FIG. 9 is a detailed flowchart of step S104. FIG. 10 is a detailed flowchart of step S901. FIG. 11 is a detailed flowchart of step S902. FIG. 12 is a detailed flowchart of step S903. Figure 1
3 is a detailed flowchart of step S904. FIG. 14 is a detailed flowchart of step S905. FIG. 15 is a detailed flowchart of step S305. FIG. 16 shows the text area 426 extracted from the image of FIG. In FIG. 16, 1601 is a histogram of black pixels in the character area 426 in the Y direction (vertical direction). 1602 is the histogram 1
It is the width of the black pixel obtained from 601. FIG. 17 is a detailed flowchart of step S906.

【0013】図3のフローチャートに従って、ステップ
S103を説明する。
Step S103 will be described with reference to the flowchart of FIG.

【0014】◎ステップS301 画像全体に対してある一定割合以上の長さを持つセパレ
ータ、図によって画像を1個以上の領域に分け、記事と
する。図4及びフローチャート図5に従って詳細に説明
する。まず、ステップS501では、図1の領域分割S
102によって抽出されたセパレータまたは図を一つ取
り出す。次にステップS502で、画像全体の黒画素数
をLall、セパレータまたは図の黒画素数をLsep
とする。
Step S301 A separator having a length of a certain ratio or more with respect to the entire image, the image is divided into one or more regions according to the drawing, and is made into an article. This will be described in detail with reference to FIG. 4 and the flowchart of FIG. First, in step S501, the area division S in FIG.
One separator or drawing extracted by 102 is taken out. Next, in step S502, the number of black pixels in the entire image is Lall, and the number of black pixels in the separator or figure is Lsep.
And

【0015】ステップS504で、 Lsep÷Lall≧α…(1) を充たすか否か判断する。ここで、αは閾値でここでは
0.1とする。式(1)を充たすセパレータまたは図を
ステップS505で配列LONGSEPに格納する。充
たさない場合はステップS506に進む。図4の例で
は、セパレータ415、445は式(1)を充たしてい
ない。セパレータ446及び図領域425は式(1)を
充たしているので配列LONGSEPに格納する。
In step S504, it is determined whether or not Lsep ÷ Lall ≧ α (1) is satisfied. Here, α is a threshold value, which is 0.1 here. In step S505, the separator or diagram satisfying the expression (1) is stored in the array LONGSEP. If not satisfied, the process proceeds to step S506. In the example of FIG. 4, the separators 415 and 445 do not satisfy the formula (1). Since the separator 446 and the drawing area 425 satisfy Expression (1), they are stored in the array LONGSEP.

【0016】ステップS506では、すべてのセパレー
タまたは図を処理したか判断する。すべて処理した場合
は、ステップS507に進む。また、処理していないセ
パレータまたは図が残っている場合は、ステップS50
1に戻って処理を継続する。
In step S506, it is determined whether all separators or figures have been processed. If all have been processed, the process proceeds to step S507. If there is any unprocessed separator or drawing, step S50.
Return to 1 to continue the process.

【0017】ステップS507では、配列LONGSE
Pに格納したセパレータ、図を幅または高さの長い方を
比較して長い順に並べる。
In step S507, the array LONGSE
The separators and figures stored in P are arranged in the order of longer width by comparing the ones having the longer widths or heights.

【0018】ステップS508で、配列LONGSEP
に格納したセパレータまたは図を長い順にひとつ取り出
す。ステップS509で、取り出したセパレータ、図に
より領域を二分する。図4では、まず初めに一番長いセ
パレータ446によって画像401を左右に二分する。
分割した領域の左側の領域が記事441である。
In step S508, the array LONGSEP is arranged.
Take out one of the separators or figures stored in. In step S509, the taken-out separator and the area are divided into two according to the drawing. In FIG. 4, first, the longest separator 446 divides the image 401 into left and right.
An area on the left side of the divided area is an article 441.

【0019】次にステップS510で、配列LONGS
EPに格納されたすべてのセパレータ、図に関して処理
したか判断する。すべて処理した場合は、ステップS5
11に進む。図4の例では、図領域425に関して未処
理なのでステップS508に戻る。図領域425によっ
て先程分割してできた右側の領域を上下に分割する。そ
うしてできたのが階層1の記事411、421である。
Next, in step S510, the array LONGS is arranged.
It is determined whether all separators and figures stored in the EP have been processed. If all have been processed, step S5
Proceed to 11. In the example of FIG. 4, since the drawing area 425 has not been processed, the process returns to step S508. The area on the right side formed by the division by the drawing area 425 is divided vertically. Then, the articles 411 and 421 of the layer 1 are created.

【0020】配列LONGSEPに格納されたすべての
セパレータ、図に関して処理したのでステップS511
に進む。ステップS511では、枠や表の領域も別領域
として分離する。例えば、新聞のコラムの文字や表の中
の文やデータ等は、他の本文と混在することはない。よ
ってこれらも、別の記事として扱う必要があるため、別
領域として分離する。次にステップS513に進む。
Since all the separators and figures stored in the array LONGSEP have been processed, step S511
Proceed to. In step S511, the frame and the table area are also separated as separate areas. For example, letters in newspaper columns, sentences in tables, data, etc., do not coexist with other text. Therefore, these also need to be treated as separate articles, so they are separated as separate areas. Then, the process proceeds to step S513.

【0021】ステップS513では、分割した領域を各
々記事としてID番号をつける。図4では、それぞれ記
事411を記事1、記事421を記事2、記事441を
記事3とする。
In step S513, ID numbers are assigned to the divided areas as articles. In FIG. 4, the article 411 is referred to as the article 1, the article 421 is referred to as the article 2, and the article 441 is referred to as the article 3.

【0022】◎ステップS302 領域分割で取り出した文字領域の中で一行のみからなる
領域が並んでいる場合には、それらを合わせて同一行グ
ループとし、各々の領域を行とする。図4及びフローチ
ャート図7に従って詳細に説明する。まずステップS7
01で、一つの記事を取り出す。図4及び図16の例で
は、記事ID2の記事421を取り出して説明する。
(Step S302) If the character areas extracted by the area division include areas consisting of only one line, they are combined into the same line group, and each region is made into a line. This will be described in detail with reference to FIG. 4 and the flowchart of FIG. First, step S7
At 01, retrieve one article. In the example of FIGS. 4 and 16, the article 421 having the article ID 2 is taken out and described.

【0023】次にステップS702で、記事内の文字領
域を一つ取り出す。ステップS703で、取り出した領
域が一行のみからなる文字領域か判定する。一行のみか
らなる文字領域であれば、ステップS704に進む。一
行のみからなる文字領域ではない場合は、ステップS7
05に進む。
Next, in step S702, one character area in the article is extracted. In step S703, it is determined whether the extracted area is a character area including only one line. If it is a character area including only one line, the process proceeds to step S704. If the character area is not composed of only one line, step S7.
Go to 05.

【0024】取り出した文字領域が何行からなるかを調
べる方法を図16に従って示す。文字領域426の組方
向が縦書きであることは、ステップS102の領域分割
の結果から分かっている。縦書きの時は、文字領域42
6の黒画素の縦方向のヒストグラムを取る。横書きの時
は同様に横方向のヒストグラムを取る。図16の例で
は、縦方向のヒストグラムを取った結果がヒストグラム
1601である。ヒストグラム1601を横方向に見る
ことによって、黒画素の存在が連続する箇所が何か所あ
るか数え、それが求める行数となる。ヒストグラム16
01の例では黒画素の存在が連続する箇所が1か所なの
で、文字領域426の行数は1行である。1行なので、
ステップS704へ進む。
A method of checking how many lines the fetched character area consists of is shown in FIG. It is known from the result of area division in step S102 that the set direction of the character area 426 is vertical writing. When writing vertically, the character area 42
The vertical histogram of 6 black pixels is taken. When writing horizontally, the horizontal histogram is taken in the same way. In the example of FIG. 16, the histogram 1601 is the result of taking the histogram in the vertical direction. By looking at the histogram 1601 in the horizontal direction, it is possible to count how many consecutive black pixels exist, and the number of rows is obtained. Histogram 16
In the example of 01, the number of lines of the character area 426 is one because there is one continuous black pixel. Because it is one line,
It proceeds to step S704.

【0025】ステップS704では、文字領域の組方向
と同じ方向に隣り合って一行のみからなる文字領域があ
り、かつ間にセパレータや図がなく、文字の大きさがほ
ぼ同じ、かつ組方向が同じで、隙間も大きくならないな
らば同一行グループとする。図4の記事421の文字領
域426の例では、ステップS703で文字領域426
が一行のみからなると判定され、縦書きなので縦方向に
1行のみからなる文字領域がないか捜す。文字領域42
7が文字領域426と縦方向に並んでいて、しかも1行
のみからなっていることが分かる。また、文字領域42
6と文字領域427の間にセパレータや図がないことは
明白である。詳しく述べると2つの文字領域が縦方向に
並んでいるので、並んでいる上の領域、この場合は文字
領域426の下底と、並んでいる下の領域、この場合は
文字領域427の上底から構成される平行四辺形の中に
セパレータまたは図の一部または全部が含まれているか
調べる。横並びの時は、同様に右辺と左辺により構成さ
れる平行四辺形内にセパレータまたは図が含まれるか調
べる。次に文字の大きさを調べる。図16の例で説明す
ると、ヒストグラム1601の幅1602を簡易的に文
字の大きさとする。つまり、おおよその文字幅を文字大
きさとする。ヒストグラムを取った時に黒画素の連続す
る領域が数カ所に分かれている時、つまり文字領域内に
複数行が存在する時は、それらの幅の平均を取って文字
大きさとする。本文字領域426と文字領域427の文
字大きさを比較して、大きい方をCbig、小さい方を
Csmallとする。
In step S704, there is a character area consisting of only one line that is adjacent in the same direction as the character area, and there is no separator or figure between them, and the size of the character is almost the same and the direction of the character is the same. Then, if the gap does not become large, use the same row group. In the example of the character area 426 of the article 421 in FIG. 4, the character area 426 is selected in step S703.
Is determined to consist of only one line, and it is written vertically, so a search is made for a character area consisting of only one line in the vertical direction. Character area 42
It can be seen that 7 is vertically aligned with the character area 426 and is composed of only one line. In addition, the character area 42
It is clear that there is no separator or figure between 6 and the character area 427. More specifically, since the two character areas are vertically aligned, the upper area that is aligned, in this case, the lower bottom of the character area 426, and the lower area that is aligned, in this case, the upper bottom of the character area 427. Check if part or all of the separator or figure is contained in the parallelogram consisting of. In the case of side-by-side alignment, check whether the separator or figure is included in the parallelogram that is also composed of the right side and the left side. Next, check the character size. In the example of FIG. 16, the width 1602 of the histogram 1601 is simply set to the character size. That is, the approximate character width is the character size. When a continuous area of black pixels is divided into several areas when a histogram is taken, that is, when there are multiple lines in a character area, the average of those widths is taken as the character size. The character sizes of the character region 426 and the character region 427 are compared, and the larger one is Cbig and the smaller one is Csmall.

【0026】Csmall÷Cbig≧α2…(2) を充たせば、文字大きさが同じとする。ただし、α2は
閾値でここでは0.9とする。文字領域426と文字領
域427の場合は、式(2)を充たすので文字大きさが
同じと判定する。次に組方向が同じか調べる。前述した
様に文字領域426は縦書きであり、文字領域427も
縦書きであるので、組方向は共に同じと判定する。
If Csmall / Cbig ≧ α2 (2) is satisfied, the character sizes are the same. However, α2 is a threshold value and is 0.9 here. In the case of the character area 426 and the character area 427, since the expression (2) is satisfied, it is determined that the character sizes are the same. Next, check whether the assembly directions are the same. As described above, since the character area 426 is vertically written and the character area 427 is also vertically written, it is determined that the grouping directions are the same.

【0027】次に隙間が大きくないか調べる。文字領域
426と文字領域427の間の隙間をG、文字大きさの
小さい方をCsmallとすると、 G÷Csmall≦α3…(3) を充たせば、文字領域426と文字領域427の隙間は
大きくないと判定する。ただし、α3は閾値でここでは
10とする。従って、文字領域426と文字領域427
を、あわせて同一行グループ424とする。また、文字
領域426と文字領域427を、行と判定する。
Next, it is examined whether the gap is large. Assuming that the gap between the character areas 426 and 427 is G and the smaller character size is Csmall, the gap between the character areas 426 and 427 is large if G ÷ Csmall ≤ α3 (3) is satisfied. It is determined not to. However, α3 is a threshold value and is set to 10 here. Therefore, the character area 426 and the character area 427
Are combined to form the same row group 424. Further, the character area 426 and the character area 427 are determined as lines.

【0028】ステップS705では、すべての文字領域
に関して処理したか判定する。すべてを処理したのであ
れば、ステップS706に進む。処理していない文字領
域があればステップS702に戻って、同一行グループ
の判定を行う。文字領域428、429、430は複数
行からなるので行にはならない。ステップS706で
は、行に各々ID番号を付ける。
In step S705, it is determined whether all character areas have been processed. If all have been processed, the process proceeds to step S706. If there is a character region that has not been processed, the process returns to step S702 to determine the same line group. The character areas 428, 429, and 430 are composed of a plurality of lines and thus do not form a line. In step S706, each row is given an ID number.

【0029】ステップS707では、すべての記事に関
して処理したか判定する。すべてを処理したのであれ
ば、ステップS302を終了してステップS303に進
む。処理していない記事があればステップS701に戻
って、同一行グループの判定を行う。
In step S707, it is determined whether all articles have been processed. If all have been processed, step S302 ends and the process proceeds to step S303. If there is an article that has not been processed, the process returns to step S701, and the same line group is determined.

【0030】◎ステップS303 ここでは、ステップS102の領域分割の結果をそのま
ま階層2の段落としてID番号を付ける。ただし、ステ
ップS302で生成された同一行グループが存在すれば
同様に階層4の段落とし、ID番号をつける。ステップ
S302で行となった領域は段落とはしない。図4の例
では、文字領域426と文字領域427から生成した同
一行グループ424も段落として扱う。
Step S303 Here, the result of the area division in step S102 is directly assigned as an ID number as a paragraph of hierarchy 2. However, if the same line group generated in step S302 exists, it is similarly set as a paragraph of hierarchy 4 and an ID number is given. The area made into a line in step S302 is not a paragraph. In the example of FIG. 4, the same line group 424 generated from the character area 426 and the character area 427 is also treated as a paragraph.

【0031】◎ステップS304 ここでは、段組の一つの段となる段落を、「同一段グル
ープ」とする。図4の例では、段落413、段落41
4、段落416、段落(同一行グループ)424、段落
430、段落443、段落444はそれぞれ一つの領域
のみで階層3の同一段グループを形成する。段落42
8、段落429は共に同じ同一段グループに属する。図
6のフローチャートに従って記事2に関して説明する。
ステップS601で、一つの記事を取り出す。ここで
は、記事2を取り出す例を示す。ステップS602で、
記事の組方向を判定する。図4の記事2の例では、記事
2に属する文字領域の全てが縦書きであることはステッ
プS102の領域分割の結果で分かっているので、記事
2の組方向は縦書きであると分かる。仮に縦書きと横書
きの文字領域が混在していた場合は、各々の面積を求め
て大きい方の組方向とする。または、各々の個数の大き
い方の組方向とする。縦書きなのでステップS603に
進む。横書きの場合はステップS609に進む。
Step S304 Here, a paragraph that constitutes one column of a column group is defined as a “same column group”. In the example of FIG. 4, paragraph 413 and paragraph 41
4, a paragraph 416, a paragraph (same line group) 424, a paragraph 430, a paragraph 443, and a paragraph 444 each form an in-column group of hierarchy 3 with only one area. Paragraph 42
8 and paragraph 429 belong to the same in-column group. Article 2 will be described according to the flowchart of FIG.
In step S601, one article is taken out. Here, an example of extracting article 2 is shown. In step S602,
Determines the grouping direction of articles. In the example of article 2 in FIG. 4, it is known from the result of the area division in step S102 that all of the character areas belonging to article 2 are vertically written, so that it is understood that the grouping direction of article 2 is vertically written. If vertical and horizontal character areas are mixed, the area of each is determined and the larger set direction is used. Alternatively, the direction with the larger number of each is set. Since it is written vertically, the process proceeds to step S603. In the case of horizontal writing, the process proceeds to step S609.

【0032】ステップS603で、記事内の段落を高さ
の大きい順に並べる。ステップS604で、どの同一段
グループにも属していない一つの段落を並べた順に取り
出し基本同一段グループとする。ステップS605で、
どの同一段グループにも属していない他の段落を並べた
順に取り出し比較段落とすると共に、基本同一段グルー
プと比較して、文字の大きさがほぼ等しく、あいだに記
事の組方向と逆方向のセパレータや他の同一段グループ
に属する段落がなく、領域が記事の組方向と逆方向に重
なっていて、隙間も余り大きく開いてないなら、比較段
落を基本同一段グループと同じ同一段グループとして結
合する。どの同一段グループにも属していない他の段落
を比較として繰り返す。
In step S603, the paragraphs in the article are arranged in descending order of height. In step S604, one paragraph that does not belong to any in-column group is taken out in the arranged order to form a basic in-column group. In step S605,
Other paragraphs that do not belong to any in-column group are taken out in the order in which they are arranged, and compared with the basic in-column group. If there are no separators or other paragraphs that belong to the same inline group, the areas overlap in the opposite direction to the writing direction of the article, and the gap is not too wide, the comparison paragraph is combined as the same inline group as the basic inline group. To do. Repeat other paragraphs that do not belong to any in-column group as a comparison.

【0033】図4の記事2の例では、まず段落(同一行
グループ)424が基本同一段グループ424となる
が、文字の大きさが他の段落と違うため、単独で同一段
グループを形成する。次に段落428が基本段落とな
る。比較段落429とのあいだで、式(2)を充たし、
文字の大きさが等しいと判定する。また、間に記事の組
方向と逆方向(つまり横方向)のセパレータや他の同一
段グループに属する段落もない。判定の仕方は、ステッ
プS704で述べた方法と同じである。次に基本同一段
グループと比較段落の記事の組方向と逆方向(つまり横
方向)の重なり具合を判定する。基本段落と比較段落の
高さ(横書きの時は幅)の小さい方をHsmall、横
方向に重なっている長さをKとすると、 K÷Hsmall≧α4…(4) を充たせば、重なっていると判定する。ただし、α4は
閾値でここでは0.8とする。基本同一段グループ42
8と比較段落429は式(4)を充たす。次に隙間を調
べる。基本同一段グループ428と比較段落429の間
の隙間は式(3)を充たすので隙間は大きくないと判定
する。よって比較段落429を基本同一段グループ42
8と同じ同一段グループとし結合して一つの基本同一段
グループとする。同様に、段落430を比較段落として
調べる。領域が横方向に式(4)を充たさないので同一
段グループとはしない。故に、段落428と段落429
のみが同一段落となり、合わせて同一段グループ423
を作る。
In the example of article 2 in FIG. 4, the paragraph (same line group) 424 becomes the basic in-column group 424, but since the character size is different from that of the other paragraphs, the in-column group is formed independently. . Next, paragraph 428 becomes the basic paragraph. Between the comparison paragraph 429, the formula (2) is satisfied,
It is determined that the characters are the same size. In addition, there is neither a separator in the opposite direction (that is, a horizontal direction) to the set direction of articles nor a paragraph belonging to another in-column group. The determination method is the same as the method described in step S704. Next, the degree of overlap between the basic in-column group and the article in the comparison paragraph in the opposite direction (that is, in the horizontal direction) is determined. Letting Hsmall be the smaller height (width when writing horizontally) of the basic paragraph and the comparison paragraph, and let K be the overlapping length in the horizontal direction. If K ÷ Hsmall ≧ α4 ... (4) is satisfied, it overlaps. Determine that However, α4 is a threshold value and is 0.8 here. Basic in-column group 42
8 and comparative paragraph 429 satisfy equation (4). Next, check the gap. Since the gap between the basic in-column group 428 and the comparison paragraph 429 satisfies the formula (3), it is determined that the gap is not large. Therefore, the comparison paragraph 429 is referred to as the basic in-column group 42.
The same in-level group as 8 is combined to form one basic in-level group. Similarly, paragraph 430 is examined as a comparison paragraph. Since the region does not satisfy the formula (4) in the horizontal direction, it is not a same-stage group. Therefore, paragraphs 428 and 429
Only the same paragraph, the same column group 423
make.

【0034】ステップS606で全ての段落がいずれか
の同一段グループに属したか調べる。図4の記事2の例
では、まだ段落430が残っているので、ステップS6
04に進む。段落430は基本同一段グループとなる
が、ステップS605で比較段落がないので、段落43
0単独で同一段グループを形成する。全ての段落が同一
段グループに属したので、ステップS607に進む。
In step S606, it is checked whether all paragraphs belong to any in-column group. In the example of article 2 in FIG. 4, since paragraph 430 still remains, step S6
Go to 04. Although paragraph 430 is a basic in-column group, there is no comparison paragraph in step S605, so paragraph 43
0 alone forms the same row group. Since all paragraphs belong to the same column group, the process proceeds to step S607.

【0035】ステップS607では、同一段グループに
各々ID番号を付ける。段落424を同一段グループ
1、同一段グループ423を同一段グループ2に、段落
430を同一段グループ3とする。
In step S607, ID numbers are assigned to the same-stage groups. The paragraph 424 is the in-column group 1, the in-column group 423 is the in-column group 2, and the paragraph 430 is the in-column group 3.

【0036】ステップS608で、全ての記事を処理し
たか判定する。全ての記事を処理したらステップS30
4を終了し、ステップS305に進む。処理していない
記事が残っていればステップS601に戻って処理を続
ける。
In step S608, it is determined whether all articles have been processed. After processing all articles, step S30
4 is ended, and the process proceeds to step S305. If there are unprocessed articles, the process returns to step S601 to continue the processing.

【0037】◎ステップS305 ここでは、同じ段組となる同一段グループをまとめて
「段組」とする。図4の記事411、記事421の例で
は、同一段グループ413、424、443はそれぞれ
一つの同一段グループのみで段組を形成する。同一段グ
ループ414、416は段組412を形成する。同様に
記事2では、同一段グループ423、430は段組42
2を形成する。
[Step S305] Here, the same column group having the same column is collectively referred to as a "column". In the example of the article 411 and the article 421 in FIG. 4, the in-column groups 413, 424, and 443 each form a column group with only one in-column group. The same-column groups 414 and 416 form a column set 412. Similarly, in article 2, the same-column groups 423 and 430 have columns 40
Form 2.

【0038】図15のフローチャートに従って記事42
1に関して説明する。ステップS1501で、一つの記
事を取り出す。ここでは、記事421を取り出すことに
する。ステップS1502で、記事の組方向を判定す
る。これは、ステップS602と同様である。ここでは
記事の組方向は縦書きである。縦書きなのでステップS
1503に進む。同様に横書きの場合はステップS15
09に進む。ステップS1503で、記事内の同一段グ
ループを右から順に並べる。ステップS1504で、ど
の段組にも属していない一つの同一段グループを並べた
順に取り出し基本段組とする。ステップS1505で、
どの段組にも属していない他の同一段グループを並べた
順に取り出し比較同一段グループとすると共に、基本段
組と比較して、文字の大きさがほぼ等しく、隣り合って
領域が組方向と同じ方向に重なっていて、隙間も余り大
きく開いてないなら、比較同一段グループを基本段組と
同じ段組として結合する。どの段組にも属していない他
の同一段グループを比較同一段グループとして繰り返
す。
Article 42 according to the flowchart of FIG.
1 will be described. In step S1501, one article is retrieved. Here, the article 421 is taken out. In step S1502, the set direction of articles is determined. This is the same as step S602. Here, the writing direction of articles is vertical writing. Since it is vertical writing, step S
Proceed to 1503. Similarly, in the case of horizontal writing, step S15
Go to 09. In step S1503, the in-column groups in the article are arranged in order from the right. In step S1504, one identical column group that does not belong to any column is taken out in the arranged order and is set as a basic column. In step S1505,
Other in-column groups that do not belong to any column are taken out in the order in which they are arranged, and compared to the same column group. If they overlap in the same direction and the gap is not too wide, combine the comparative same-column groups as the same column as the basic column. Other in-column groups that do not belong to any column are repeated as comparison in-column groups.

【0039】図4の記事421の例では、まず同一段グ
ループ424が基本段組424となるが、文字の大きさ
が他の段組と違うため、単独で基本段組を形成する。次
に同一段グループ423が基本段組423となる。比較
同一段グループ430とのあいだで、式(2)を充た
し、文字の大きさが等しいと判定する。
In the example of the article 421 in FIG. 4, first, the same column group 424 becomes the basic column set 424, but since the character size is different from other column sets, the basic column set is formed independently. Next, the same column group 423 becomes the basic column set 423. Expression (2) is satisfied between the comparison in-column group 430 and it is determined that the character sizes are equal.

【0040】次に基本段組と比較同一段グループの記事
の組方向と逆方向(つまり横方向)の重なり具合を判定
する。基本段落と比較同一段グループの高さ(横書きの
時は幅)の小さい方をHsmall、横方向に重なって
いる長さをKとすると、式(4)を充たしているので、
重なっていると判定する。また隣り合っていることは明
白である。調べ方は、ステップS704で述べたのと同
様に、間に他の同一段グループがないか調べる。
Next, the degree of overlap of the articles in the same column group in the direction opposite to the grouping direction (that is, in the horizontal direction) is compared with the basic column. Assuming that the smaller height (width in horizontal writing) of the in-column group is Hsmall and the overlapping length in the horizontal direction is K, the equation (4) is satisfied.
It is determined that they overlap. It is also clear that they are next to each other. As for the checking method, as in step S704, it is checked whether there is another in-column group between them.

【0041】次に隙間を調べる。基本段組423と比較
同一段グループ430の間の隙間は式(3)を充たすの
で隙間は大きくないと判定する。よって比較同一段グル
ープ430を基本段組423と同じ段組として、基本段
組に結合して、段組422を形成する。他に比較同一段
グループとすべき同一段グループはないのでステップS
1505を終了し、ステップS1506に進む。
Next, the gap is examined. Since the gap between the basic column 423 and the comparative column group 430 satisfies the formula (3), it is determined that the gap is not large. Therefore, the comparative same-column group 430 is combined with the basic column as the same column as the basic column 423 to form the column 422. Since there is no other in-column group that should be the comparison in-column group, step S
The process ends 1505, and the process advances to step S1506.

【0042】ステップS1506で全ての同一段グルー
プがいずれかの段組に属したか調べる。全ての同一段グ
ループが段組に属したら、ステップS1507に進む。
In step S1506, it is checked whether all the same column groups belong to any column. If all the same column groups belong to the column set, the process advances to step S1507.

【0043】ステップS1507では、段組に各々ID
番号を付ける。段組424を段組1、段組422を段組
2とする。ステップS1508で、全ての記事を処理し
たか判定する。全ての記事を処理したらステップS30
5を終了し、グループ化が完了する。処理していない記
事が残っていればステップS1501に戻って処理を続
ける。
In step S1507, IDs are added to the columns.
Number them. The column set 424 is referred to as column set 1, and the column set 422 is referred to as column set 2. In step S1508, it is determined whether all articles have been processed. After processing all articles, step S30
5, the grouping is completed. If there are unprocessed articles, the process returns to step S1501 to continue the processing.

【0044】以上でステップS103を終了する。図4
の例で、ステップS103でグループ化した結果を階層
的に示した図が図8である。図8で、各番号は図4の番
号に対応している。異なる階層で同じ番号がついている
ものがあるが、それは単独で一つの段落や同一段グルー
プを構成しているためである。例えば、記事1の段組1
は単独の同一段グループ1から構成されており、更に単
独の段落1、即ち文字領域413から構成されているの
で、全て同じ番号の413となる。
Thus, step S103 is completed. Figure 4
FIG. 8 is a diagram hierarchically showing the results of grouping in step S103 in the above example. In FIG. 8, each number corresponds to the number in FIG. Some layers have the same number in different layers, but this is because they form a single paragraph or in-column group by themselves. For example, column 1 of article 1
Is composed of a single in-column group 1, and further is composed of a single paragraph 1, that is, a character area 413, so that all have the same number 413.

【0045】ステップS104 グループ別に順序付けを行い、最後に画像全体に関する
順序を付ける。
Step S104 The ordering is performed for each group, and finally the ordering for the entire image is performed.

【0046】以下、グループ別順序付けについて詳細に
説明する。図9はステップS104についての詳細なフ
ローチャートである。図10はステップS901につい
ての詳細なフローチャートである。図11はステップS
902についての詳細なフローチャートである。図12
はステップS903についての詳細なフローチャートで
ある。図13はステップS904についての詳細なフロ
ーチャートである。図14はステップS905について
の詳細なフローチャートである。図17はステップS9
06についての詳細なフローチャートである。
The ordering by group will be described in detail below. FIG. 9 is a detailed flowchart of step S104. FIG. 10 is a detailed flowchart of step S901. FIG. 11 shows step S
9 is a detailed flowchart of 902. 12
Is a detailed flowchart of step S903. FIG. 13 is a detailed flowchart of step S904. FIG. 14 is a detailed flowchart of step S905. FIG. 17 shows step S9.
It is a detailed flowchart about 06.

【0047】図9のフローチャートに従って、ステップ
S104を説明する。
Step S104 will be described with reference to the flowchart of FIG.

【0048】◎ステップS901 全ての同一行グループ内の行にそれぞれ順序付けをす
る。図4及びフローチャート図10に従って詳細に説明
する。ステップS1001で一つの同一行グループを取
り出す。図4の例では、同一行グループは同一行グルー
プ424のみである。
(Step S901) All the rows in the same row group are ordered. This will be described in detail with reference to FIG. 4 and the flowchart of FIG. In step S1001, one same line group is taken out. In the example of FIG. 4, the same row group is only the same row group 424.

【0049】ステップS1002で同一行グループの組
方向は横書きか判定する。横書きならステップS100
3へ進む。縦書きならステップS1004に進む。組方
向の判定方法は、ステップS602と同様である。同一
行グループ424は、縦書きの行426、行427から
なるので、縦書きと判定し、ステップS1004に進
む。
In step S1002, it is determined whether the set direction of the same line group is horizontal writing. Step S100 for horizontal writing
Go to 3. If it is vertical writing, the process proceeds to step S1004. The method of determining the set direction is the same as in step S602. Since the same line group 424 is composed of vertically written lines 426 and 427, it is determined to be vertically written, and the process proceeds to step S1004.

【0050】ステップS1004では、同一行グループ
の中に含まれる行に上から順に番号をつける。行426
と行427では、行426が上なので、行426、行4
27の順に番号を付ける。
In step S1004, the rows included in the same row group are sequentially numbered from the top. Line 426
And row 427, row 426 is on top, so row 426, row 4
Number in order of 27.

【0051】ステップS1005で、すべての同一行グ
ループを処理したか判定する。全て処理していればステ
ップS901を終了してステップS902に進む。残っ
ていれば、ステップS1001に戻って処理を続ける。
図4の例では、全て処理したのでステップS901を終
了して、ステップS902に進む。
In step S1005, it is determined whether all the same row groups have been processed. If all have been processed, step S901 ends and the process proceeds to step S902. If any remain, the process returns to step S1001 to continue the processing.
In the example of FIG. 4, since all processing has been performed, step S901 is ended and the process proceeds to step S902.

【0052】◎ステップS902 全て同一段グループ内の段落及び同一行グループにそれ
ぞれ順序付けをする。図4及びフローチャート図11に
従って詳細に説明する。
Step S902 The paragraphs and the same line groups in the same column group are all ordered. This will be described in detail with reference to FIG. 4 and the flowchart of FIG.

【0053】ステップS1101で一つの同一段グルー
プを取り出す。図4の例では、複数の段落から構成する
同一段グループは同一段グループ423のみであるの
で、同一段グループ423を中心に説明する。
In step S1101, one in-column group is taken out. In the example of FIG. 4, since the in-column group 423 is the only in-column group formed of a plurality of paragraphs, the in-column group 423 will be mainly described.

【0054】ステップS1102で同一段グループの組
方向は横書きか判定する。横書きならステップS110
3へ進む。縦書きならステップS1104に進む。組方
向の判定方法は、ステップS602と同様である。同一
段グループ423は、縦書きの段落428、段落429
からなるので、縦書きと判定し、ステップS1104に
進む。
In step S1102, it is determined whether the set direction of the in-column group is horizontal writing. Step S110 for horizontal writing
Go to 3. If it is vertical writing, the process proceeds to step S1104. The method of determining the set direction is the same as in step S602. The in-column group 423 includes vertical writing paragraphs 428 and 429.
Therefore, vertical writing is determined, and the process proceeds to step S1104.

【0055】ステップS1104では、同一段グループ
の中に含まれる段落及び同一行グループに右から順に番
号をつける。段落428と段落429では、段落428
が右なので、段落428、段落429の順に番号を付け
る。
In step S1104, the paragraphs and the same line groups included in the same column group are sequentially numbered from the right. In paragraphs 428 and 429, paragraph 428
Is right, so the numbers are given in the order of paragraph 428 and paragraph 429.

【0056】ステップS1105で、すべての同一段グ
ループを処理したか判定する。全て処理していればステ
ップS902を終了してステップS903に進む。残っ
ていれば、ステップS1101に戻って処理を続ける。
In step S1105, it is determined whether all in-column groups have been processed. If all have been processed, step S902 ends and the process proceeds to step S903. If any remain, the process returns to step S1101 to continue the processing.

【0057】◎ステップS903 全ての記事内の同一段グループにそれぞれ順序付けをす
る。図4及びフローチャート図12に従って詳細に説明
する。
(Step S903) The same column group in all articles is ordered. This will be described in detail with reference to FIG. 4 and the flowchart of FIG.

【0058】ステップS1201で一つの段組を取り出
す。図4の例では、段組422に関して説明する。
In step S1201, one column is extracted. In the example of FIG. 4, the column set 422 will be described.

【0059】ステップS1202で段組の組方向は横書
きか判定する。横書きならステップS1203へ進む。
縦書きならステップS1204に進む。組方向の判定方
法は、ステップS602と同様である。段組422は、
縦書きの同一段グループ423、同一段グループ430
からなるので、縦書きと判定し、ステップS1204に
進む。
In step S1202, it is determined whether the writing direction of the column is horizontal writing. If it is horizontal writing, the process proceeds to step S1203.
If it is vertical writing, the process proceeds to step S1204. The method of determining the set direction is the same as in step S602. The column 422 is
Vertical writing in-column group 423, in-column group 430
Therefore, vertical writing is determined, and the process proceeds to step S1204.

【0060】ステップS1204では、段組の中に含ま
れる同一段グループを上から順に番号をつける。同一段
グループ423と同一段グループ430では、同一段グ
ループ423が上なので、同一段グループ423、同一
段グループ430の順に順番を付ける。
In step S1204, the same column groups included in the column set are numbered from the top. In the in-column group 423 and the in-column group 430, since the in-column group 423 is on the upper side, the in-column group 423 and the in-column group 430 are sequentially ordered.

【0061】ステップS1205で、すべての段組を処
理したか判定する。全て処理していればステップS90
3を終了してステップS904に進む。残っていれば、
ステップS1201に戻って処理を続ける。
In step S1205, it is determined whether all columns have been processed. If all have been processed, step S90
3 is ended and the process proceeds to step S904. If there are
It returns to step S1201 and continues processing.

【0062】◎ステップS904 全ての記事内の段組にそれぞれ順序付けをする。図4及
びフローチャート図13に従って詳細に説明する。
Step S904 The columns in all articles are ordered. This will be described in detail with reference to FIG. 4 and the flowchart of FIG.

【0063】ステップS1301で一つの記事を取り出
す。図4の例では、記事421に関して説明する。
In step S1301, one article is taken out. In the example of FIG. 4, the article 421 will be described.

【0064】ステップS1302で記事の組方向は横書
きか判定する。横書きならステップS1303へ進む。
縦書きならステップS1304に進む。組方向の判定方
法は、ステップS602と同様である。記事421は、
縦書きの段組424、段組422からなるので、縦書き
と判定し、ステップS1304に進む。
In step S1302, it is determined whether the writing direction of the article is horizontal writing. If it is horizontal writing, the process proceeds to step S1303.
If it is vertical writing, the process advances to step S1304. The method of determining the set direction is the same as in step S602. Article 421
Since it is composed of the vertical writing column 424 and the vertical column 422, it is determined to be vertical writing, and the process advances to step S1304.

【0065】ステップS1304では、記事の中に含ま
れる段組に右から順に番号をつける。段組424と段組
422では、段組424が右なので、段組424、段組
422の順に順番を付ける。
In step S1304, the columns included in the article are sequentially numbered from the right. In the columns 424 and 422, since the column 424 is on the right side, the columns 424 and 422 are sequentially ordered.

【0066】ステップS1305で、すべての記事を処
理したか判定する。全て処理していればステップS90
4を終了してステップS905に進む。残っていれば、
ステップS1301に戻って処理を続ける。
In step S1305, it is determined whether all articles have been processed. If all have been processed, step S90
4 is ended and the process proceeds to step S905. If there are
The process returns to step S1301 to continue the processing.

【0067】◎ステップS905 記事にそれぞれ順序付けをする。図4及びフローチャー
ト図14に従って詳細に説明する。
[Step S905] Articles are ordered respectively. This will be described in detail with reference to FIG. 4 and the flowchart of FIG.

【0068】ステップS1401で画像全体の組方向は
横書きか判定する。横書きならステップS1402へ進
む。縦書きならステップS1403に進む。組方向の判
定方法は、ステップS602と同様である。画像401
は、縦書きの記事411、記事421、記事441から
なるので、縦書きと判定し、ステップS1403に進
む。
In step S1401, it is determined whether the set direction of the entire image is horizontal writing. If it is horizontal writing, the process proceeds to step S1402. If it is vertical writing, the process proceeds to step S1403. The method of determining the set direction is the same as in step S602. Image 401
Is composed of a vertically written article 411, an article 421, and an article 441. Therefore, it is determined to be vertically written, and the process proceeds to step S1403.

【0069】ステップS1403では、画像全体の中に
含まれる記事に右から順に番号をつけて、ステップS9
05を終了して、ステップS906に進む。記事41
1、記事421、記事441の順に順番を付ける。
In step S1403, the articles included in the entire image are numbered in order from the right, and in step S9.
05 is ended and the process proceeds to step S906. Article 41
The order is 1, the article 421, and the article 441.

【0070】◎ステップS906 画像全体に関して全ての文字領域に全体としての順序付
けをする。図4及びフローチャート図17に従って詳細
に説明する。
Step S906 All character areas of the entire image are ordered as a whole. This will be described in detail with reference to FIG. 4 and the flowchart of FIG.

【0071】ステップS1701で、変数ORDERに
1を代入する(初期化)。この変数値が文字領域の画像
全体に関する順番となる。ステップS1702で、記事
を番号の小さい順に一つ取り出す。ここで番号とは、ス
テップS901からステップS905で付けた各々のI
D番号をさす。ステップS1703で、ステップS17
02で取り出した記事内の段組を番号の小さい順に一つ
取り出す。ステップS1704で、ステップS1703
で取り出した段組内の同一段グループを番号の小さい順
に一つ取り出す。ステップS1705で、ステップS1
704で取り出した同一段グループ内の段落を番号の小
さい順に一つ取り出す。ステップS1706で、ステッ
プS1705で取り出した段落は同一行グループか判定
する。同一行グループであれば、ステップS1707に
進む。同一行グループでなければ、ステップS1708
に進む。ステップS1707で、ステップS1705で
取り出した段落内の行を番号の小さい順に一つ取り出
す。ステップS1709で、行に変数ORDERの順番
を付け、ORDERに1加える。ステップS1710で
は、全ての行を処理したか判定する。全ての行を処理し
ていればステップS1711に進む。残っていれば、ス
テップS1707に戻って処理を続ける。また、ステッ
プS1708では、段落に変数ORDERの順番を付
け、ORDERに1加える。ステップS1711では、
すべての段落を処理したか判定する。全ての段落を処理
していればステップS1712に進む。残っていれば、
ステップS1705に戻って処理を続ける。ステップS
1712では、全ての同一段グループを処理したか判定
する。全ての同一段グループを処理していればステップ
S1713に進む。残っていれば、ステップS1704
に戻って処理を続ける。ステップS1713では、全て
の段組を処理したか判定する。全ての段組を処理してい
ればステップS1714に進む。残っていれば、ステッ
プS1703に戻って処理を続ける。ステップS171
4では、全ての記事を処理したか判定する。全ての記事
を処理していればステップS906を終了する。残って
いれば、ステップS1702に戻って処理を続ける。以
上でステップS104を終了する。
In step S1701, 1 is assigned to the variable ORDER (initialization). This variable value is the order for the entire image of the character area. In step S1702, one article is taken out from the smallest number. Here, the number means each I assigned in steps S901 to S905.
D number. In step S1703, step S17
The columns in the article extracted in 02 are extracted in ascending order of number. In step S1704, step S1703
The same column group in the column set extracted in step 1 is taken out in ascending order of number. In step S1705, step S1
The paragraphs in the in-column group extracted in step 704 are extracted in order from the smallest number. In step S1706, it is determined whether the paragraphs extracted in step S1705 are in the same line group. If it is the same row group, the process advances to step S1707. If not in the same row group, step S1708
Proceed to. In step S1707, one line in the paragraph extracted in step S1705 is extracted in ascending order of number. In step S1709, the order of the variable ORDER is assigned to the row, and 1 is added to ORDER. In step S1710, it is determined whether all rows have been processed. If all rows have been processed, the process advances to step S1711. If any remain, the process returns to step S1707 to continue the processing. Also, in step S1708, the paragraph is assigned the order of the variable ORDER, and 1 is added to ORDER. In step S1711,
Determine if all paragraphs have been processed. If all paragraphs have been processed, the process advances to step S1712. If there are
The process returns to step S1705 to continue the process. Step S
At 1712, it is determined whether all in-column groups have been processed. If all in-tier groups have been processed, the process advances to step S1713. If so, step S1704
Return to and continue processing. In step S1713, it is determined whether all columns have been processed. If all columns have been processed, the process advances to step S1714. If any remain, the process returns to step S1703 to continue the processing. Step S171
At 4, it is determined whether all articles have been processed. If all articles have been processed, step S906 ends. If any remain, the process returns to step S1702 to continue the processing. Thus, step S104 is completed.

【0072】〔第2の実施例〕図5のフローチャートで
示す通り、図3のステップS301の記事のグループ化
に関する処理において、第1の実施例では、ステップS
504の閾値αを一定値にしていたが、図19のステッ
プS1901に示す様に画像の黒画素数に応じて変化さ
せてもかまわない。例えば、画像の黒画素数が多い場合
は閾値は小さめにするが、画像の黒画素数が少なくなる
に従って閾値を大きくしていく等である。これによっ
て、実際セパレータ等の長さは小さいが画像も小さかっ
たことによって、分離しなくてもよいところを分離して
しまうようなミスを少なくし、順序付けの精度を上げる
ことができる。例えば、A4の400DPIの画像の場
合に、画像全体の黒画素数が、 100,000以上 α=0.1 50,000〜100,000 α=0.05 10,000〜50,000 α=0.03 10,000未満 α=0.01 同様に式(2)〜(4)で使われている閾値も画像の黒
画素数や階層等によって変化させてもよい。本実施例の
順序付け方法を表すフローチャートは図1に示す第一の
実施例と同様である。以上の説明により、前述の第一の
実施例と同様の作用、効果が得られる。
[Second Embodiment] As shown in the flowchart of FIG. 5, in the processing relating to the grouping of articles in step S301 of FIG. 3, in the first embodiment, step S
Although the threshold value α of 504 is set to a constant value, it may be changed according to the number of black pixels of the image as shown in step S1901 of FIG. For example, when the number of black pixels in the image is large, the threshold value is set small, but as the number of black pixels in the image decreases, the threshold value is increased. As a result, since the length of the separator or the like is actually small, but the image is also small, it is possible to reduce mistakes such as separating a portion that does not need to be separated, and improve the ordering accuracy. For example, in the case of an A4 400 DPI image, the number of black pixels in the entire image is 100,000 or more α = 0.1 50,000-100,000 α = 0.05 10,000-50,000 α = 0 Less than 0.03 10,000 α = 0.01 Similarly, the threshold values used in the equations (2) to (4) may be changed depending on the number of black pixels of the image, the layer, and the like. The flowchart showing the ordering method of this embodiment is the same as that of the first embodiment shown in FIG. With the above description, the same operation and effect as those of the above-described first embodiment can be obtained.

【0073】[0073]

【発明の効果】以上説明したように、本実施例によれ
ば、新聞記事等、原稿の中に複数の記事が存在する場合
でも、正しく読み順をつけることができ、修正等の手間
を削減できる効果がある。
As described above, according to this embodiment, even if there are a plurality of articles in a manuscript such as a newspaper article, the reading order can be correctly set, and the time and effort for corrections can be reduced. There is an effect that can be done.

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

【図1】本実施例の順序付け方法を表すフローチャー
ト。
FIG. 1 is a flowchart showing an ordering method according to this embodiment.

【図2】画像から抽出された領域を6階層にグループ分
けしたところを示した図。
FIG. 2 is a diagram showing areas extracted from an image, which are divided into six layers.

【図3】ステップS103についての詳細なフローチャ
ート。
FIG. 3 is a detailed flowchart of step S103.

【図4】領域分割によって抽出された各領域の例示図。FIG. 4 is an exemplary diagram of each area extracted by area division.

【図5】ステップS301についての詳細なフローチャ
ート。
FIG. 5 is a detailed flowchart of step S301.

【図6】ステップS304についての詳細なフローチャ
ート。
FIG. 6 is a detailed flowchart of step S304.

【図7】ステップS302についての詳細なフローチャ
ート。
FIG. 7 is a detailed flowchart of step S302.

【図8】図4の画像から抽出された領域を6階層にグル
ープ分けしたところを示した図。
FIG. 8 is a diagram showing areas extracted from the image of FIG. 4 divided into six layers.

【図9】ステップS104についての詳細なフローチャ
ート。
FIG. 9 is a detailed flowchart of step S104.

【図10】ステップS901についての詳細なフローチ
ャート。
FIG. 10 is a detailed flowchart of step S901.

【図11】ステップS902についての詳細なフローチ
ャート。
FIG. 11 is a detailed flowchart of step S902.

【図12】ステップS903についての詳細なフローチ
ャート。
FIG. 12 is a detailed flowchart of step S903.

【図13】ステップS904についての詳細なフローチ
ャート。
FIG. 13 is a detailed flowchart of step S904.

【図14】ステップS905についての詳細なフローチ
ャート。
FIG. 14 is a detailed flowchart of step S905.

【図15】ステップS305についての詳細なフローチ
ャート。
FIG. 15 is a detailed flowchart of step S305.

【図16】図4の画像から抽出された文字領域426を
表す図。
16 is a diagram showing a character area 426 extracted from the image of FIG.

【図17】ステップS906についての詳細なフローチ
ャート。
FIG. 17 is a detailed flowchart of step S906.

【図18】図4の画像から抽出された領域を3階層にグ
ループ分けしたところを示した図。
FIG. 18 is a diagram showing the areas extracted from the image of FIG. 4 divided into three layers.

【図19】ステップS301についての詳細なフローチ
ャート。
FIG. 19 is a detailed flowchart of step S301.

【図20】本実施例における装置の構成ブロック図。FIG. 20 is a configuration block diagram of a device according to the present embodiment.

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06K 9/00 - 9/82 H04N 1/40 G06T 1/00 G06T 7/00 - 7/60 G06F 17/20 - 17/26 Front page continued (58) Fields surveyed (Int.Cl. 7 , DB name) G06K 9/00-9/82 H04N 1/40 G06T 1/00 G06T 7/00-7/60 G06F 17/20-17 / 26

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力された画像から文字領域を抽出し、 黒画素数が前記入力された画像全体の黒画素数に対して
所定の閾値以上の割合を持つセパレータ画像もしくは図
画像の少なくともいずれかと前記文字領域との位置関係
に従って、前記文字領域をグループに分け、 前記分けられた各グループ内で該文字領域の順序を決定
することを特徴とする順序付け方法。
1. A character area is extracted from an input image, and at least one of a separator image or a graphic image having a ratio of the number of black pixels to the total number of black pixels of the input image is a predetermined threshold value or more. An ordering method, characterized in that the character areas are divided into groups according to a positional relationship with the character areas, and the order of the character areas is determined in each of the divided groups.
【請求項2】 前記所定の閾値は、前記入力された画像
全体の黒画素数に応じて定められることを特徴とする請
求項1に記載の順序付け方法。
2. The ordering method according to claim 1, wherein the predetermined threshold value is determined according to the number of black pixels of the entire input image.
【請求項3】 前記文字領域をグループに分ける際、複
数階層からなるグループに分けることを特徴とする請求
項1に記載の順序付け方法。
3. The ordering method according to claim 1, wherein when the character areas are divided into groups, the character areas are divided into groups having a plurality of layers.
【請求項4】 入力された画像から文字領域を抽出する
抽出手段と、 黒画素数が前記入力された画像全体の黒画素数に対して
所定の閾値以上の割合を持つセパレータ画像もしくは図
画像の少なくともいずれかと前記文字領域との位置関係
に従って、前記文字領域をグループに分けるグループ分
け手段と、 前記分けられた各グループ内で該文字領域の順序を決定
する順序決定手段とを有することを特徴とする順序付け
装置。
4. Extraction means for extracting a character area from an input image, and a separator image or a graphic image having a ratio of the number of black pixels to the total number of black pixels of the input image being a predetermined threshold value or more. According to a positional relationship between at least one of the character areas and the character area, grouping means for dividing the character area into groups, and order determining means for determining the order of the character areas in each of the divided groups, Ordering device.
JP28338794A 1994-11-17 1994-11-17 How to order character areas Expired - Fee Related JP3517465B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP28338794A JP3517465B2 (en) 1994-11-17 1994-11-17 How to order character areas
US08/558,184 US5689342A (en) 1994-11-17 1995-11-15 Image processing method and apparatus which orders text areas which have been extracted from an image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28338794A JP3517465B2 (en) 1994-11-17 1994-11-17 How to order character areas

Publications (2)

Publication Number Publication Date
JPH08147409A JPH08147409A (en) 1996-06-07
JP3517465B2 true JP3517465B2 (en) 2004-04-12

Family

ID=17664863

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28338794A Expired - Fee Related JP3517465B2 (en) 1994-11-17 1994-11-17 How to order character areas

Country Status (1)

Country Link
JP (1) JP3517465B2 (en)

Also Published As

Publication number Publication date
JPH08147409A (en) 1996-06-07

Similar Documents

Publication Publication Date Title
EP0654746B1 (en) Form identification and processing system
JP4856925B2 (en) Image processing apparatus, image processing method, and image processing program
CN102782703B (en) Page layout determination of an image undergoing optical character recognition
US5689342A (en) Image processing method and apparatus which orders text areas which have been extracted from an image
US7623259B2 (en) Image processing apparatus and image processing method to store image data for subsequent retrieval
EP1698988A1 (en) Image processing apparatus and its method
EP0130050B1 (en) Data management apparatus
JP4405831B2 (en) Image processing apparatus, control method therefor, and program
US5701500A (en) Document processor
US5390354A (en) Computerized directory pagination system and method
US7876471B2 (en) Image processing apparatus, control method and program thereof which searches for corresponding original electronic data based on a paper document
JPH09171557A (en) Method for processing image and device therefor
EP0690415A2 (en) Editing scanned document images using simple interpretations
JP5753828B2 (en) Image processing apparatus and image processing program
US20070036468A1 (en) Image processing apparatus for image retrieval and control method therefor
CN1127044A (en) Method and apparatus for grouping and manipulating electronic representations of handwriting, printing and drawings
JP2004348706A (en) Information processing device, information processing method, storage medium, and program
JPH0668301A (en) Method and device for recognizing character
US5502777A (en) Method and apparatus for recognizing table and figure having many lateral and longitudinal lines
JP2010123002A (en) Document image layout device
US20120229860A1 (en) Information processing apparatus, method for controlling same, and storage medium on which computer program has been recorded
JP5551986B2 (en) Information processing apparatus, information processing method, and program
JP3683923B2 (en) How to order character areas
JP3517465B2 (en) How to order character areas
JPH1031716A (en) Method and device for extracting character line

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040113

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040120

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040126

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

Free format text: PAYMENT UNTIL: 20090130

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090130

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100130

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110130

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120130

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130130

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140130

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees