JPH08293000A - Device and method for image processing - Google Patents

Device and method for image processing

Info

Publication number
JPH08293000A
JPH08293000A JP7096642A JP9664295A JPH08293000A JP H08293000 A JPH08293000 A JP H08293000A JP 7096642 A JP7096642 A JP 7096642A JP 9664295 A JP9664295 A JP 9664295A JP H08293000 A JPH08293000 A JP H08293000A
Authority
JP
Japan
Prior art keywords
image
character
similarity
image processing
unit
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
Application number
JP7096642A
Other languages
Japanese (ja)
Inventor
Tetsuomi Tanaka
哲臣 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP7096642A priority Critical patent/JPH08293000A/en
Priority to EP96302789A priority patent/EP0744711B1/en
Priority to DE69624034T priority patent/DE69624034D1/en
Priority to US08/635,586 priority patent/US5966138A/en
Publication of JPH08293000A publication Critical patent/JPH08293000A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To shorten the processing time by judging the direction of a cut character image and determining the direction of the image on the basis of the judged direction of the character image. CONSTITUTION: A scanner 10 reads the document image and stores the image in a RAM 13 as image data whose document direction should be discriminated. Then, a character area is extracted from the image data stored in the RAM 13. Then, one of extracted character areas is selected and a character is cut out of the character area. Further, the cut character is recognized in four directions of 0, 90, 180, and 279 deg. and respective similarities are calculated. The direction having the largest similarity is determined as the direction of the document. On the basis of the decided direction of the document, the image stored in the RAM 13 is rotated at need and saved as image filing data in an external storage device 15.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は画像処理方法及び装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method and apparatus.

【0002】[0002]

【従来の技術】デジタル複写機では、原稿画像等を光学
的に読み取り、デジタル処理を加えた後に記録紙上に画
像を形成する。このような装置においては、複数枚で構
成される文書を次々に読み取らせて、そのイメージを記
録紙上に形成することが可能である。ここで、複写され
た文書の方向は、装置に提供された元文書の方向に1対
1に対応する方向となる。また、電子ファイリング装置
においても、読取った画像をディスプレイに表示した時
に、読み取り時に対応した方向で表示されることにな
る。
2. Description of the Related Art In a digital copying machine, an original image or the like is optically read and subjected to digital processing to form an image on a recording paper. In such an apparatus, it is possible to read a document composed of a plurality of sheets one after another and form the image on the recording paper. Here, the orientation of the copied document corresponds to the orientation of the original document provided to the device in a one-to-one correspondence. Further, also in the electronic filing device, when the read image is displayed on the display, it is displayed in the direction corresponding to the reading.

【0003】[0003]

【発明が解決しようとする課題】従って、文書のイメー
ジを入力するときに、原稿を正しい方向で入力していな
ければ、複写されて得られた文書も正しい方向とならな
い。例えば、複数枚のうちの1枚の文書が逆さまになっ
ているような場合、複写されて得られた文書も、その頁
のみが逆さまとなる。このような状態で複写を実行して
しまった場合は、入力した後にユーザが確認し、その間
違ったページの文書を取出して方向をそろえなおすとい
う作業が要求される。また、電子ファイリング装置であ
れば、方向を間違ったページの文書を正しい方向で読み
取り装置にセットし、再度読み取り処理を行うか、入力
した文書画像をユーザの指定により回転させる等の処理
が必要となる。
Therefore, when inputting the image of the document, the document obtained by copying is not in the correct direction unless the original is input in the correct direction. For example, when one of a plurality of documents is turned upside down, only the page of the document obtained by copying is turned upside down. When the copying is executed in such a state, the user is required to confirm the input and then take out the document of the wrong page and rearrange the directions. Further, in the case of the electronic filing device, it is necessary to set the document of the wrong page in the correct direction in the reading device and perform the reading process again, or to rotate the input document image according to the user's designation. Become.

【0004】このように、従来のデジタル複写機や電子
ファイリング装置では、間違った方向で原稿が入力され
た場合、ユーザによる何らかの作業による修正が必要と
なり、ユーザに負担をかけなければならなかった。
As described above, in the conventional digital copying machine or electronic filing apparatus, when a document is input in the wrong direction, the user needs to make corrections by some work, and the user must be burdened.

【0005】本発明は上記の問題に鑑みてなされたもの
であり、読み取られた画像データから画像の方向を判定
することを可能とする画像処理方法及び装置を提供する
ことを目的とする。
The present invention has been made in view of the above problems, and it is an object of the present invention to provide an image processing method and apparatus capable of determining the direction of an image from the read image data.

【0006】[0006]

【課題を解決するための手段】上記の目的を達成するた
めの本発明の画像処理装置は、画像より文字画像を切り
出す切り出し手段と、前記切り出し手段で切り出された
文字画像についてその方向を判定する判定手段と、前記
判定手段による判定結果に基づいて当該画像の方向を決
定する決定手段とを備える。
An image processing apparatus of the present invention for achieving the above object determines a cutting-out means for cutting out a character image from an image and a direction of the character image cut out by the cutting-out means. The determination means and the determination means for determining the direction of the image based on the determination result by the determination means.

【0007】また、好ましくは、前記判定手段は、前記
切り出し手段で切り出された文字画像が、0度、90
度、180度、270度の4方向のいずれの方向である
かを判定する。通常、原稿の配置方向としては、この4
方向のいずれかであるから、これらの方向のいずれであ
るかを判断すれば実用に耐える。
Further, preferably, the determination means determines that the character image cut out by the cutout means is 0 degrees or 90 degrees.
It is determined which of the four directions of 180 degrees, 180 degrees, and 270 degrees. Normally, the document placement direction is
Since it is one of the directions, it is practical to judge if it is one of these directions.

【0008】ことを特徴とする請求項1に記載の画像処
理装置。
An image processing apparatus according to claim 1, wherein:

【0009】また、上記の目的を達成する本発明の他の
構成の画像処理装置は、画像より複数の文字画像を切り
出す切り出し手段と、前記切り出し手段で切り出された
各文字画像について、複数の方向について類似度を求め
る算出手段と、前記類似度算出手段で算出された類似度
に基づいて、前記画像の方向を前記複数の方向の一つに
決定する決定手段とを備える。
Further, an image processing apparatus having another configuration of the present invention which achieves the above-mentioned object has a cutting-out means for cutting out a plurality of character images from an image, and a plurality of directions for each character image cut out by the cutting-out means. And a determining unit that determines the direction of the image to be one of the plurality of directions based on the similarity calculated by the similarity calculating unit.

【0010】また、好ましくは、前記複数の方向は、0
°、90度、180度、270度の4方向である。
Preferably, the plurality of directions are 0
There are four directions of 90 degrees, 90 degrees, 180 degrees, and 270 degrees.

【0011】また、好ましくは、前記切り出し手段にお
いて、所定数の文字画像が切り出された時点で当該切り
出し処理を終了する。画像より文字画像を切り出す際
に、切り出された文字領域の数が所定数に達したところ
で文字の切り出しを終了することにより処理時間の短縮
が図れる。
Further, preferably, when the predetermined number of character images are cut out by the cut-out means, the cut-out processing is ended. When cutting out a character image from an image, the processing time can be shortened by ending the cutting out of the character when the number of cut out character areas reaches a predetermined number.

【0012】また、好ましくは、切り出された複数の文
字画像を結合して新たな文字画像を形成し、この新たな
文字画像によって類似度が向上した場合はその類似度に
基づいて前記算出手段により得られた類似度を更新する
更新手段を更に備える。切り出された文字画像を結合し
て類似度が向上する場合に、その結合された画像を用い
るので、例えば偏と旁に文字画像が分解されて切り出さ
れた場合でも、正しい切り出し状態で認識度を算出でき
る。
Further, preferably, a plurality of cut out character images are combined to form a new character image, and when the similarity is improved by the new character image, the calculation means is based on the similarity. It further comprises update means for updating the obtained similarity. When the extracted character images are combined to improve the similarity, the combined images are used.For example, even if the character images are disassembled and dissected and divided into parts, the recognition degree in the correct extraction state is improved. Can be calculated.

【0013】また、好ましくは、前記更新手段は、半角
文字サイズの文字画像が連続する場合、これらを結合し
て全角サイズの文字画像を形成し、類似度が向上した場
合にその類似度に基づいて前記算出手段により得られた
類似度を更新する。誤った文字の切り出しによって認識
された結果を除外することができ、正しい方向に対する
類似度の低下を防止できる。
Further, preferably, when the half-width character size character images are continuous, the updating means combines these to form a full-width size character image, and based on the similarity degree when the similarity degree is improved. Then, the similarity obtained by the calculating means is updated. It is possible to exclude a result recognized by erroneous clipping of a character and prevent a decrease in similarity in the correct direction.

【0014】また、好ましくは、前記更新手段は、半角
サイズの文字画像の類似度が所定値よりも小さい場合に
全角サイズへの結合を行う。類似度の低い半角サイズの
文字画像について全角サイズ等への結合の可能性を調べ
るので、処理が効率的になり、処理時間を短縮できる。
Further, preferably, the updating means performs combining into a full-size character when the similarity of the half-size character image is smaller than a predetermined value. Since the possibility of combining half-size character images with low similarity to full-size characters and the like is examined, the processing becomes efficient and the processing time can be shortened.

【0015】また、好ましくは、前記算出手段は、全角
文字と判断される文字画像について、各方向毎の類似度
の算出を行い、前記判定手段は、前記算出手段で算出さ
れた類似度の各方向毎の総計に基づいて前記画像の方向
を判定する。全角サイズの文字画像を用いるので、文字
の切り出しミスが防止され、正しい方向の類似度の低下
を防止できる。また、すべての文字画像が全角サイズで
あるので、文字画像の結合が不要となる。このため、各
方向の文字数が変化せず、類似度の総和をもって画像の
方向を判定でき、処理内容が簡略化される。
Further, preferably, the calculating means calculates the similarity in each direction for the character image which is determined to be a full-width character, and the determining means determines each of the similarity calculated by the calculating means. The direction of the image is determined based on the total for each direction. Since the full-size character image is used, it is possible to prevent the character from being cut out incorrectly and prevent the degree of similarity in the correct direction from decreasing. Moreover, since all the character images are full-size, it is not necessary to combine the character images. Therefore, the number of characters in each direction does not change, the direction of the image can be determined based on the sum of the similarities, and the processing content is simplified.

【0016】また、好ましくは、前記算出手段において
方向判定に用いられた文字の数が所定数に満たない場
合、前記切り出し手段による文字画像の切り出しを追加
し、前記算出手段と、前記判定手段をくり返し実行する
制御手段を更に備える。画像の方向判定に用いる文字画
像数が所定値以上となるまで判定処理が繰り返されるの
で、文字の切り出しミスによる影響を小さくし、方向判
定の精度が向上する。
Further, preferably, when the number of characters used for the direction determination in the calculation means is less than a predetermined number, the character image is cut out by the cutout means, and the calculation means and the determination means are added. It further comprises control means for repeatedly executing. Since the determination process is repeated until the number of character images used for determining the direction of an image becomes equal to or larger than a predetermined value, the influence of a character cutout error is reduced and the accuracy of the direction determination is improved.

【0017】また、好ましくは、前記算出手段において
算出された各方向の類似度において、第1位の類似度と
第2位の類似度の差が所定値に満たない場合、前記切り
出し手段により別の文字領域からの文字画像の切り出し
を行い、前記算出手段と、前記判定手段をくり返し実行
する制御手段を更に備える。第1位と第2位の類似度の
差が所定値を越える文字領域にて画像の方向を判断で
き、誤って文字領域でない部分や本文字認識方法では対
象としていないタイプの文字領域を方向判定に用いてし
まうことが防止され、方向判定の精度が向上する。
Preferably, in the similarity in each direction calculated by the calculating means, when the difference between the first-rank similarity and the second-rank similarity is less than a predetermined value, the clipping means separates the two. A control means is further provided, which cuts out a character image from the character area and repeatedly executes the calculation means and the determination means. The orientation of the image can be determined in the character area where the difference between the first and second similarities exceeds a predetermined value, and the orientation is erroneously determined for a portion that is not a character area or a type of character area that is not targeted by this character recognition method. Therefore, the accuracy of the direction determination is improved.

【0018】また、好ましくは、前記算出手段において
算出された各方向の類似度において、第1位の類似度が
所定値に満たない場合、前記切り出し手段により別の文
字領域からの文字画像の切り出しを行い、前記算出手段
と、前記判定手段をくり返し実行する制御手段を更に備
える。第1位となった認識度が所定値より小さい場合、
別の文字領域について文字の切り出しを行い、第1位の
認識度が所定値以上の部分を検出するまで判定処理が行
われる。これにより、誤って文字領域でない部分や本文
字認識方法では対象としていないタイプの文字領域を方
向判定に用いてしまうことが防止され、方向判定の精度
が向上する。
Further, preferably, in the similarity in each direction calculated by the calculating means, when the first-order similarity is less than a predetermined value, the cutting means cuts out a character image from another character area. And a control means for repeatedly executing the calculation means and the determination means. If the first-ranked degree of recognition is smaller than a predetermined value,
Characters are cut out from another character area, and the determination process is performed until the first recognition degree portion having a predetermined value or more is detected. This prevents a portion that is not a character area or a character area of a type that is not a target in the present character recognition method from being mistakenly used for the direction determination, and the accuracy of the direction determination is improved.

【0019】また、好ましくは、画像に図もしくは表の
領域がある場合、図或は表中の文字領域は前記切り出し
手段による文字画像の切り出しに用いる優先順位を低く
する。図や表中の文字領域は判定に用いる優先順位を低
くすることにより、方向判定の誤判別を防止する。尚、
図や表の文字領域を判定に用いることを禁止するように
しても良い。
Further, preferably, when the image has an area of a figure or a table, the character area in the figure or the table has a lower priority for cutting out the character image by the cutting means. By lowering the priority used for the determination in the character areas in the figures and tables, erroneous determination of the direction determination is prevented. still,
It may be prohibited to use the character region of the figure or table for the determination.

【0020】また、好ましくは、前記複数の方向は、0
度、または180度の2方向である。画像読み取りの装
置が原稿の供給方向について2方向しかとり得ないよう
な場合は、0度または180度の2方向で十分である。
従って、類似度の算出を2方向に限定することで、処理
速度を向上させることができる。
Also, preferably, the plurality of directions is 0.
Or 180 degrees. In the case where the image reading device can take only two directions with respect to the document feeding direction, two directions of 0 degree or 180 degrees are sufficient.
Therefore, the processing speed can be improved by limiting the calculation of the degree of similarity to two directions.

【0021】また、好ましくは、前記判定手段で判定さ
れた前記画像の方向に基づいて、該画像を必要に応じて
回転して出力する出力手段を更に備える。例えば、電子
ファイリング装置において、原稿の向きが間違った頁が
存在しても、自動的に正しい頁に揃えてファイリングす
ることが可能となり、操作性が向上する。
Further, preferably, the image processing apparatus further comprises an output means for rotating the image as necessary based on the direction of the image judged by the judging means and outputting the image. For example, in an electronic filing device, even if there is a page in which the orientation of the original is wrong, it is possible to automatically align the filing with the correct page for filing, and improve the operability.

【0022】また、好ましくは、前記算出手段は、切り
出された文字画像について走査方向を変更して類似度を
算出することで、前記複数の方向に対応する類似度の算
出を行う。文字画像を回転させる処理を行なわずに、各
方向の類似度を得るので、処理速度が向上する。
Further, preferably, the calculating means calculates the similarity corresponding to the plurality of directions by changing the scanning direction of the cut out character image and calculating the similarity. Since the similarity in each direction is obtained without performing the process of rotating the character image, the processing speed is improved.

【0023】また、好ましくは、前記算出手段は、切り
出された文字画像を所定数のブロックに分割し、所定方
向で走査を行って各ブロック毎に画像の方向成分を計数
し、得られた各ブロック毎の方向成分ごとの計数値を格
納して特徴データとし、該所定方向以外の方向の特徴デ
ータの算出は、前記ブロック単位及び前記方向成分単位
での計数値の入れ替えで行い、得られた各方向の特徴デ
ータに基づいて類似度の算出を行う。所定方向について
文字画像の操作が行なわれ、特徴データを獲得すると、
他の方向の特徴データは得られた特徴データの入れ替え
で得られるので、更に処理速度を向上できる。
Further, preferably, the calculating means divides the cut-out character image into a predetermined number of blocks, scans in a predetermined direction, counts the direction component of the image for each block, and obtains each obtained. The count value for each direction component for each block is stored as feature data, and the feature data for directions other than the predetermined direction is calculated by replacing the count values in the block unit and the direction component unit. The similarity is calculated based on the feature data in each direction. When the character image is operated in a predetermined direction and the characteristic data is acquired,
Since the characteristic data in the other direction is obtained by replacing the obtained characteristic data, the processing speed can be further improved.

【0024】[0024]

【作用】上記の構成によれば、与えられた画像より文字
画像が切り出され、この切り出された文字画像について
その方向が判定される。そして、判定された文字画像の
方向に基づいて、当該画像の方向が決定される。
According to the above construction, a character image is cut out from a given image, and the direction of the cut out character image is determined. Then, based on the determined direction of the character image, the direction of the image is determined.

【0025】また、上記した本発明の他の構成によれ
ば、画像より複数の文字画像を切り出し、切り出された
各文字画像について、複数の方向についての類似度が算
出される。このようにして算出された各方向の類似度に
基づいて、前記画像の方向が前記複数の方向の一つに決
定される。
Further, according to the above-mentioned another configuration of the present invention, a plurality of character images are cut out from the image, and the similarity in a plurality of directions is calculated for each of the cut out character images. The direction of the image is determined as one of the plurality of directions based on the degree of similarity of each direction calculated in this way.

【0026】[0026]

【実施例】以下に添付の図面を参照して本発明の好適な
一実施例を説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will be described below with reference to the accompanying drawings.

【0027】以下の実施例の説明では、本発明を電子フ
ァイリング装置に適用した場合を説明する。
In the following description of the embodiments, the case where the present invention is applied to an electronic filing apparatus will be described.

【0028】図1は実施例における電子ファイリング装
置の構成を表すブロック図である。同図において、10
はスキャナであり、セットされた原稿画像を光学的に読
み取り、画像データを得る。11はCPUであり、電子
ファイリング装置の全体の制御を行う。12はROMで
あり、CPU12が実行すべき各種の制御プログラム
や、各種処理に際して参照されるデータ等を格納する。
13はRAMであり、CPU11の作業用メモリ領域を
提供する。また、後述の原稿方向の判定を行う際に、1
頁文の文書の画像データを格納する。14はインターフ
ェースであり、スキャナ10とバス17とを接続する。
FIG. 1 is a block diagram showing the configuration of the electronic filing apparatus in the embodiment. In the figure, 10
Is a scanner, which optically reads a set original image to obtain image data. A CPU 11 controls the entire electronic filing apparatus. Reference numeral 12 denotes a ROM, which stores various control programs to be executed by the CPU 12 and data referred to in various processes.
A RAM 13 provides a working memory area for the CPU 11. In addition, when determining the orientation of the document, which will be described later, 1
It stores the image data of a page sentence document. An interface 14 connects the scanner 10 and the bus 17.

【0029】15は外部記憶装置であり、ファイリング
すべき文書画像データを格納する。16はディスプレイ
であり種々の表示を行う。例えば、外部記憶装置15に
格納された文書画像データを読み出し、これをディスプ
レイ16上に表示することが可能である。18は印刷部
であり、記録媒体上に可視画像を形成する。例えば、外
部記憶装置15に格納された文書画像を記録紙上に形成
することができる。
An external storage device 15 stores the document image data to be filed. Reference numeral 16 is a display for performing various displays. For example, it is possible to read the document image data stored in the external storage device 15 and display it on the display 16. A print unit 18 forms a visible image on a recording medium. For example, the document image stored in the external storage device 15 can be formed on the recording paper.

【0030】次に、上記の構成を有する本実施例の電子
ファイリング装置の動作について説明する。
Next, the operation of the electronic filing apparatus of this embodiment having the above configuration will be described.

【0031】図2は本実施例における電子ファイリング
装置の動作手順を表すフローチャートである。
FIG. 2 is a flow chart showing the operation procedure of the electronic filing apparatus in this embodiment.

【0032】まず、ステップS1において、スキャナ1
0により文書画像の読み取りを行い、文書方向を判別す
べき画像データとしてRAM13に格納する。次にステ
ップS2において、RAM13に格納された画像データ
の中から文字領域の抽出を行う。ステップS3では、ス
テップS2で抽出された文字領域の一つを選択し、当該
文字領域より文字の切り出しを行う。文字の切り出し
は、切り出された文字領域が所定数個に達した時点でい
ったん終了する。詳細は後述するが、文字数は認識処理
を行うと増減する。そのため最終的な文字数がしきい値
以上になるように、ステップS3における文字切り出し
の数を経験的に決定する。尚、文字領域の抽出や文字の
切り出しは、文字認識技術等において周知の技術を適用
することが可能である。
First, in step S1, the scanner 1
The document image is read at 0 and stored in the RAM 13 as image data for which the document direction should be determined. Next, in step S2, a character area is extracted from the image data stored in the RAM 13. In step S3, one of the character areas extracted in step S2 is selected, and a character is cut out from the character area. The character cutout is once terminated when the cutout character area reaches a predetermined number. Although the details will be described later, the number of characters increases or decreases when the recognition processing is performed. Therefore, the number of character cutouts in step S3 is empirically determined so that the final number of characters becomes equal to or larger than the threshold value. Note that a well-known technique such as a character recognition technique can be applied to the extraction of the character region and the cutting of the character.

【0033】ステップS4では切り出された文字に対し
て、0,90,180,270度の4方向について認識
処理を行い、各平均類似度を算出する。そして、ステッ
プS5において、最も高い平均類似度を有する方向を当
該原稿の方向として決定する。ステップS6では、ステ
ップS5で決定された原稿の方向に基づいて、RAM1
3に格納されている画像を必要に応じて回転処理し、画
像ファイリングデータとして外部記憶装置15に保存す
る。
In step S4, the cut-out character is subjected to recognition processing in four directions of 0, 90, 180, and 270 degrees, and each average similarity is calculated. Then, in step S5, the direction having the highest average similarity is determined as the direction of the document. In step S6, the RAM 1 is determined based on the original orientation determined in step S5.
The image stored in No. 3 is rotated as necessary, and is stored in the external storage device 15 as image filing data.

【0034】一方、ステップS2において文字領域が抽
出できなかった場合は、本実施例による画像の方向検出
は行なえない。この場合、処理はステップS7へ進み、
RAM13内の画像をそのまま電子ファイリングデータ
として外部記憶装置15に保存する。また、ステップS
3において、所定数の文字領域が切り出せなかった場合
は、後述する方向決定のための各閾値を高めに設定して
方向検出を行うようにしてもよい。
On the other hand, if the character area cannot be extracted in step S2, the orientation of the image cannot be detected in this embodiment. In this case, the process proceeds to step S7,
The image in the RAM 13 is stored as it is in the external storage device 15 as electronic filing data. Step S
If the predetermined number of character areas cannot be cut out in 3, the direction detection may be performed by setting a higher threshold value for determining the direction described later.

【0035】上述の、ステップS3、S4、S5、S6
の各処理について、更に詳細に説明する。
The above steps S3, S4, S5, S6
Each of the processes will be described in more detail.

【0036】図3は本実施例における文字の切り出し処
理(ステップS3)の手順を表すフローチャートであ
る。
FIG. 3 is a flowchart showing the procedure of the character cutting process (step S3) in this embodiment.

【0037】文字の切り出し処理においては、まずステ
ップS31において、ステップS2で抽出された文字領
域の一つを選択する。次にステップS32にいて、選択
された文字領域において文字の切り出しを行う。文字が
切り出せたらステップS33からステップS34へ進
み、切り出された文字数が所定値に達したか否かを判断
する。所定数の切り出しが行なえていれば本処理を終了
するが、切り出し数が所定値に未到達である場合は、ス
テップS32へ戻る。
In the character cutting process, first, in step S31, one of the character regions extracted in step S2 is selected. Next, in step S32, a character is cut out in the selected character area. When the characters can be cut out, the process proceeds from step S33 to step S34, and it is determined whether the number of characters cut out has reached a predetermined value. If a predetermined number of cutouts have been made, this processing is terminated, but if the cutout number has not reached the predetermined value, the process returns to step S32.

【0038】ステップS32において文字の切り出しが
行なえない場合は、ステップS33よりステップ35へ
進み、未処理の文字領域(まだ選択されていない文字領
域)があるか否かを判定する。未処理の文字領域があれ
ばステップS31へ戻り、新たな文字領域を選択してス
テップS32へ進むことになる。
If the character cannot be cut out in step S32, the process proceeds from step S33 to step 35, and it is determined whether or not there is an unprocessed character area (a character area that has not been selected yet). If there is an unprocessed character area, the process returns to step S31, a new character area is selected, and the process proceeds to step S32.

【0039】このようにして、所定数分の文字の切り出
しが行われるまで処理が行われることになるが、所定数
分の文字の切り出しが完了する前に未処理のも位領域が
なくなった場合は、ステップS35より図2のステップ
S7へ進むことになる。
In this way, the processing is carried out until the predetermined number of characters have been cut out, but when the unprocessed place area has disappeared before the predetermined number of characters have been cut out. Goes from step S35 to step S7 in FIG.

【0040】次に、4方向の認識処理(ステップS4)
の処理について説明する。図4は本実施例における4方
向認識処理の手順を表すフローチャートである。
Next, recognition processing in four directions (step S4)
The process will be described. FIG. 4 is a flowchart showing the procedure of the four-direction recognition process in this embodiment.

【0041】まず、ステップS41において、先のステ
ップS3で切り出された各領域について0°方向の走査
を行い、特徴量を抽出し、類似度を算出する。そして、
切り出された全ての領域についての類似度の総和を求
め、これを文字数で割って平均類似度を算出する。以
下、ステップS42、S43、S44において、夫々9
0°の方向、180°の方向、270°の方向で走査を
行い、ステップS41と同様の手順で平均類似度を算出
する。
First, in step S41, each area cut out in the previous step S3 is scanned in the direction of 0 °, the feature amount is extracted, and the similarity is calculated. And
The sum of the similarities for all the cut out areas is calculated, and this is divided by the number of characters to calculate the average similarity. Hereinafter, in steps S42, S43, and S44, 9
Scanning is performed in the 0 ° direction, the 180 ° direction, and the 270 ° direction, and the average similarity is calculated in the same procedure as in step S41.

【0042】図5は本実施例における特徴量抽出のため
の走査方向を説明する図である。上述のように本実施例
では、0°、90°、180°及び270°の4方向に
よる走査と、特徴量の抽出が行われる。
FIG. 5 is a diagram for explaining the scanning direction for feature extraction in this embodiment. As described above, in this embodiment, scanning in four directions of 0 °, 90 °, 180 °, and 270 ° and extraction of the characteristic amount are performed.

【0043】ここで各方向の認識処理を行なうため実際
に画像を回転させてから認識を行なうことも考えられ
る。しかしながら、本実施例では、処理時間の短縮を図
るべく上記図5のように、走査方向を変える手法を用い
る。
Here, in order to perform recognition processing in each direction, it is possible to actually rotate the image before recognition. However, in this embodiment, a method of changing the scanning direction is used as shown in FIG. 5 in order to shorten the processing time.

【0044】認識処理は、文字の画像からその特徴を特
徴量として抽出する特徴抽出処理と、得られた特徴量と
マッチングを行う識別処理に別れる。文字の特徴を抽出
する際には、文字画像のスキャンする方向を角度毎に変
えてやることにより、画像を回転させなくても、画像を
回転させて特徴抽出をした時と同じ特徴量を抽出でき
る。即ち、図5に示す様に、0度の場合に文字画像の左
上から右下に向かって特徴量を抽出していくとすると、
90度の場合は左下から右上に向かって特徴量を抽出し
ていけばよいのである。
The recognition process is divided into a feature extraction process for extracting a feature of the character image as a feature amount and an identification process for performing matching with the obtained feature amount. When extracting character features, by changing the scanning direction of the character image for each angle, the same feature amount as when extracting the feature by rotating the image is extracted without rotating the image. it can. That is, as shown in FIG. 5, if the feature amount is extracted from the upper left to the lower right of the character image at 0 degrees,
In the case of 90 degrees, the feature amount should be extracted from the lower left to the upper right.

【0045】次に本実施例における平均類似度の算出に
ついて説明する。図6は本実施例のある走査方向におけ
る平均類似度の算出手順を表わすフローチャートであ
る。例えば、ステップS41においては0度方向の走査
による平均類似度が、指定角度を0度として図6の各ス
テップを実行することにより算出される。以下の説明で
は0度方向の走査を例に挙げて図6の各ステップを説明
するが、90度、180度、270度の各方向の走査に
おいても同様の処理が行われる。
Next, the calculation of the average similarity in this embodiment will be described. FIG. 6 is a flowchart showing a procedure of calculating the average similarity in a scanning direction according to this embodiment. For example, in step S41, the average similarity by scanning in the 0 degree direction is calculated by executing each step in FIG. 6 with the designated angle as 0 degree. In the following description, each step in FIG. 6 will be described by taking the scanning in the 0 ° direction as an example, but the same processing is performed in the scanning in each of the 90 °, 180 °, and 270 ° directions.

【0046】まず、ステップS401において、1つの
切り出し領域について指定方向の走査を行い、特徴量を
獲得する。ここでは当該切り出し領域に対して図5の0
度方向の走査が行われる。そして、当該切り出し領域に
ついて各文字パターンとマッチングをとることにより類
似度を算出し、累積加算していく。また、走査を行った
当該きりだし領域を1文字としてカウントし、文字数の
カウントを行う。以上の処理を、先のステップS3で切
り出された全ての切り出し領域について実行する(ステ
ップS404、S405)。この結果、ステップS3で
切り出された全ての切り出し領域についての類似度の総
和と文字数を得ることができる。
First, in step S401, one cutout area is scanned in a designated direction to acquire a feature amount. In this case, 0 in FIG.
The scanning in the degree direction is performed. Then, the degree of similarity is calculated by performing matching with each character pattern for the cutout area, and cumulative addition is performed. In addition, the exposed region that has been scanned is counted as one character, and the number of characters is counted. The above processing is executed for all the cutout areas cut out in the previous step S3 (steps S404 and S405). As a result, it is possible to obtain the sum of the similarities and the number of characters for all the cutout areas cut out in step S3.

【0047】以上のようにして全ての切り出し領域につ
いて類似度の算出を終了すると、ステップS406へ進
み、半角サイズの切り出し領域が連続している箇所につ
いて、その切り出し領域が夫々半角文字か、全角文字を
構成するものであるかを判断する。
When the calculation of the degree of similarity is completed for all the cutout areas as described above, the process proceeds to step S406, where the cutout areas of the continuous cutout areas are half-width characters or full-width characters. It is determined whether or not it constitutes.

【0048】より詳しく説明すると、文字の切り出しを
された状態では、図7のように各文字の大きさとピッチ
の情報しかない。このため『1234』のような半角文字の
並びであるか『いはほ』のように半角サイズの切り出し
領域に分離できる全角文字の並びであるかを判断できな
い箇所がある。そこで半角文字が全角文字の一部である
かを決定する為、各角度毎に半角文字で認識した場合と
複数の文字矩形を一文字で認識した場合の結果から最良
のものを採用する必要がある。
More specifically, when the characters are cut out, there is only information on the size and pitch of each character as shown in FIG. Therefore, there is a part where it cannot be determined whether it is a sequence of half-width characters such as "1234" or a sequence of full-width characters that can be separated into a half-size cutout area such as "Ihaho". Therefore, in order to determine whether the half-width character is a part of the full-width character, it is necessary to adopt the best one from the results of recognizing the half-width character at each angle and recognizing multiple character rectangles with one character. .

【0049】ステップS406では、切り出された領域
のうち、連続した半角サイズの領域をドッキングして、
1つの切り出し領域とする。ここで、半角サイズの領域
は、切り出された領域の縦横の比で判断できる。そし
て、ステップS407において、ドッキングによってで
きた新たな切り出し領域について指定方向の走査(ここ
では0度の方向の走査)を行って特徴量を抽出し、類似
度の算出を行う。この結果、ドッキング前の半角サイズ
の領域で算出された類似度よりも、ドッキング後の全角
サイズの領域で算出された類似度の方が大きくなった場
合は、当該切り出し領域は全角文字である判断する。そ
して、先のステップS401〜ステップS405で得ら
れた累積類似度と文字数のカウント値を、切り出し領域
のドッキングの結果に基づいて更新する(ステップS4
08、S409)。
In step S406, a continuous half-size region is docked among the cut out regions,
One cutout area. Here, the half-size area can be determined by the aspect ratio of the cut out area. Then, in step S407, the new cutout area formed by docking is scanned in the designated direction (here, scanning in the direction of 0 degree) to extract the feature amount, and the similarity is calculated. As a result, when the similarity calculated in the full-width size area after docking is greater than the similarity calculated in the half-width size area before docking, the cutout area is determined to be full-width characters. To do. Then, the cumulative similarity and the count value of the number of characters obtained in the previous steps S401 to S405 are updated based on the docking result of the cutout area (step S4).
08, S409).

【0050】図8は、半角サイズの切り出し領域のドッ
キング例を説明する図である。図示のように半角サイズ
の領域が3つ並ぶ場合は(図8の(A))、2通りのド
ッキング方法が考えられる(図8の(B)、(C))。
この場合、類似度の和、b+c+dと、f+dと、b+
gのうち最大の値となる切り出し状態が採用されること
になる。
FIG. 8 is a view for explaining an example of docking a half-size cutout area. When three half-size areas are lined up as shown in the figure ((A) of FIG. 8), two docking methods are possible ((B) and (C) of FIG. 8).
In this case, the sum of the similarities, b + c + d, f + d, and b +
The cut-out state having the maximum value of g is adopted.

【0051】以上のような処理を、全てのドッキング可
能な箇所について実行し(ステップS410)、最大の
類似度を得る。そして、この最大の類似度を、このとき
の文字数カウント値にて割り、平均類似度を算出する
(ステップS411)。ここで平均類似度を用いるの
は、上記の処理を0,90,180,270度の各走査
方向で行った場合、ドッキングの処理等で各角度毎の文
字数が異なってくるためである。
The above processing is executed for all dockable portions (step S410) to obtain the maximum similarity. Then, the maximum similarity is divided by the character number count value at this time to calculate the average similarity (step S411). The reason why the average similarity is used here is that when the above process is performed in each of the scanning directions of 0, 90, 180, and 270 degrees, the number of characters at each angle varies due to the docking process and the like.

【0052】さて、上記の特徴量抽出では、図5にも示
されるように、切り出し領域の画像を走査する方向を変
化させて、画像を回転させたのと等価な特徴量を得てい
る。しかしながら、回転画像に対応した特徴量の獲得方
法はこれに限られるものではない。ここでは、回転画像
に対応した特徴量の他の獲得方法について、図9〜図1
1を用いて説明しておく。
In the above feature amount extraction, as shown in FIG. 5, the direction in which the image of the cutout area is scanned is changed to obtain the feature amount equivalent to rotating the image. However, the method of acquiring the feature amount corresponding to the rotated image is not limited to this. Here, another method for acquiring the feature amount corresponding to the rotated image will be described with reference to FIGS.
This will be described using 1.

【0053】図9は回転画像に対応する特徴量獲得の他
の手法を説明するフローチャートである。図10は他の
手法による特徴量獲得のための、切り出し領域に対する
ブロック分割と、方向成分を表わす図である。図11は
他の手法による特徴量獲得によるデータの格納状態を表
わす図である。
FIG. 9 is a flow chart for explaining another method for acquiring the feature quantity corresponding to the rotated image. FIG. 10 is a diagram showing a block division of a cutout region and a direction component for obtaining a feature amount by another method. FIG. 11 is a diagram showing a storage state of data obtained by acquiring a feature amount by another method.

【0054】ここで説明する手法によれば、一度抽出さ
れた特徴量を基準とし、これを変換することによって回
転した文字画像の特徴量を抽出する。まず、ステップS
421において、図11に示すように文字画像(切り出
し領域)を1から16のブロックに分割する。そして、
ステップS422において、各ブロックに含まれる輪郭
画像について、図10に示す方向1から方向4の方向成
分の出現量を計数し、特徴量とする。こうして得られた
各ブロックの方向成分毎の特徴量を図11の如くRAM
13に格納する。
According to the method described here, the feature amount once extracted is used as a reference to convert the feature amount to extract the feature amount of the rotated character image. First, step S
In 421, the character image (cutout area) is divided into blocks 1 to 16 as shown in FIG. And
In step S422, with respect to the contour image included in each block, the appearance amounts of the direction components from the direction 1 to the direction 4 shown in FIG. 10 are counted and set as the feature amount. The feature amount for each direction component of each block thus obtained is stored in the RAM as shown in FIG.
Store in 13.

【0055】0度の特徴を抽出した後は、90,18
0,270度の特徴量は、この0度の特徴量から生成で
きる。より詳細に説明すると、例えば90度の特徴量
は、方向1と方向3、方向2と方向4の特徴量を交換し
てブロック1のデータをブロック4へ、ブロック2のデ
ータをブロック8へというように移動させていくと生成
できる。180度、270度の特徴量についても、各ブ
ロック、方向成分の特徴量を入れ換えることで獲得でき
る。この方法だと画像にアクセスしないでデータ交換の
みで行えるため、図5で示した方法よりも更に高速であ
る。
After extracting the 0-degree feature, 90, 18
The 0,270 degree feature amount can be generated from this 0 degree feature amount. More specifically, for example, for the 90-degree feature amount, the feature amounts of the directions 1 and 3 and the directions 2 and 4 are exchanged, and the data of block 1 is called block 4 and the data of block 2 is called block 8. You can generate it by moving it like this. The 180-degree and 270-degree feature amounts can also be obtained by exchanging the feature amounts of the blocks and the direction components. This method is faster than the method shown in FIG. 5 because it can be performed only by exchanging data without accessing the image.

【0056】いずれの方法を用いるにせよ、画像そのも
のを回転させる必要はなく、高速に各角度毎の特徴量の
抽出を行える。
Whichever method is used, it is not necessary to rotate the image itself, and the feature quantity for each angle can be extracted at high speed.

【0057】以上のようにして各方向毎の平均類似度を
得ると、ステップS5において結果の判定が行われる。
この判定の処理について更に詳細に説明する。図12は
本実施例における方向決定手順を示すフローチャートで
ある。
When the average degree of similarity in each direction is obtained as described above, the result is determined in step S5.
The determination process will be described in more detail. FIG. 12 is a flow chart showing the direction determining procedure in this embodiment.

【0058】まず、ステップS501において、最も高
い平均類似度を抽出する。そしてステップS502にお
いてこの平均類似度が所定値よりも大きいか否かを判断
する。最も高い平均類似度を有する方向が正しい向きと
なるのであるが、問題点として文字領域の抽出を行った
時点ではそこが文字領域ではない可能性が有る。また、
文字領域であっても、網点などの方向判定に用いている
認識手段が対応していない種類の文字領域であった場合
は、正しく方向判定が出来ない。そこで第1位の方向の
平均類似度が所定値より低い場合には、ステップS50
2よりステップS508へ進み、別の文字領域を判定に
用いる。
First, in step S501, the highest average similarity is extracted. Then, in step S502, it is determined whether or not this average similarity is larger than a predetermined value. The direction having the highest average similarity is the correct direction, but as a problem, there is a possibility that it is not the character region when the character region is extracted. Also,
Even in the case of a character area, if the recognition means used to determine the direction of a halftone dot is a type of character area that is not compatible, the direction cannot be correctly determined. Therefore, if the average similarity in the first direction is lower than the predetermined value, step S50
From step 2, the process proceeds to step S508, and another character area is used for the determination.

【0059】一方、『1+100=101』の様に4方
向のどこから認識処理しても類似度の大きい文字が存在
するため各方向の類似度の差が小さくなる。加えてこの
例では反時計方向に270度回転した画像は数字の1、
0の部分は漢数字の一、○と認識されてもおかしくない
ため構文解析の様な知識処理をしたとしてもどの方向か
らみるのが正しいか判断できない(図13参照)。この
様な文字領域を文書方向の判別に用いることは不適当で
あるため別の文字領域を方向判別に用いなければならな
い。よって、ステップS503において第2位の平均類
似度を獲得し、第1位と第2位の平均類似度の差をと
る。第1位と第2位の方向の平均類似度の差が小さい場
合は、その文字領域を方向判別には用いず別の文字領域
を用いるべく、ステップS504からステップS508
へ進む。
On the other hand, even if recognition processing is performed from any of the four directions such as "1 + 100 = 101", there is a character having a high degree of similarity, and the difference in the degree of similarity between the directions is small. In addition, in this example, the image rotated 270 degrees counterclockwise is number 1,
It is not unusual for the 0 part to be recognized as one of the Chinese numerals, and it is not possible to judge from which direction it is correct even if knowledge processing such as syntax analysis is performed (see FIG. 13). Since it is inappropriate to use such a character area for determining the document direction, another character area must be used for determining the direction. Therefore, in step S503, the average similarity of the second rank is obtained, and the difference between the average similarity of the first rank and the average similarity of the second rank is calculated. If the difference in average similarity between the first and second positions is small, the character region is not used for the direction determination, and another character region is used so as to use another character region.
Go to.

【0060】更に、4方向の夫々について文字数のカウ
ント値が異なることは上述したが、これらの最終的な文
字数が所定数以上にならなかった場合は、ステップS3
に戻って処理中の文字領域の残りの文字の切り出しの追
加を行う(ステップS505、ステップS506)。ま
た処理中の文字領域の文字切り出しが全て終了している
場合は、ステップS2で抽出された他の文字領域につい
て処理を実行することは、図3のフローチャートで説明
した通りである。
Further, although it has been described above that the count value of the number of characters is different in each of the four directions, if the final number of characters does not exceed the predetermined number, step S3 is performed.
Then, the process returns to and the cutout of the remaining characters in the character area being processed is added (steps S505 and S506). Further, when the character segmentation of the character area being processed is completed, the processing is executed for the other character areas extracted in step S2, as described with reference to the flowchart of FIG.

【0061】以上のような条件を満足した場合、最大の
平均類似度を有する方向を、当該画像の方向として、そ
の結果を出力する(ステップS507)。
When the above conditions are satisfied, the direction having the maximum average similarity is set as the direction of the image and the result is output (step S507).

【0062】以上説明したように本実施例によれば、文
字の方向を判定することにより原稿の向きを判定し、こ
れに基づいて必要に応じて画像を回転し、電子ファイリ
ングが行われる。このため、間違った向きで原稿が読み
取られても、自動的に正しい向きに修正され、保存され
るので、操作性が飛躍的に向上する。
As described above, according to this embodiment, the orientation of the original is determined by determining the direction of the characters, and the image is rotated if necessary based on this to perform electronic filing. Therefore, even if the original is read in the wrong direction, it is automatically corrected to the correct direction and saved, so that the operability is dramatically improved.

【0063】また、切り出された領域について、画像を
回転させた特徴量を抽出するに際して、画像そのものを
回転することを不要とするので、処理速度が向上する。
Further, in extracting the feature amount obtained by rotating the image in the clipped area, it is not necessary to rotate the image itself, so that the processing speed is improved.

【0064】また、全角・半角の文字について、類似度
が最大となるように切り出し領域の結合等を行うので、
精度よく類似度を算出できる。
Further, for full-width / half-width characters, the cutout areas are combined so that the degree of similarity is maximized.
The degree of similarity can be calculated accurately.

【0065】なお、上記実施例では、全ての連続する半
角サイズの切り出し領域について、領域の結合を試す
が、類似度が所定値以下となった半角サイズの領域を結
合の対象とするようにしてもよい。
In the above embodiment, the area joining is tried for all the continuous cut-out areas having the half-width size. However, the half-size area having the similarity less than a predetermined value is set as the joining target. Good.

【0066】また、上記実施例によれば、第1位の平均
類似度と第2位の平均類似度との差が所定値以下の場合
は、原稿の方向の識別ができなかったものとして、別の
文字領域を用いて方向判別の処理をやり直す。このた
め、縦横の識別が困難な数字等を用いて、方向を決定す
ることが避けられ、精度よく原稿の方向を決定すること
ができる。
Further, according to the above-mentioned embodiment, when the difference between the average similarity of the first rank and the average similarity of the second rank is less than a predetermined value, it is determined that the orientation of the document cannot be identified. The process of determining the direction is redone using another character area. For this reason, it is possible to avoid determining the direction by using numbers or the like whose vertical and horizontal identification is difficult, and it is possible to accurately determine the direction of the original.

【0067】なお、原稿文書中に図が記載されている場
合、その図の中の文字は正しい文書方向とは異なる方向
で書かれている場合がある。例えば、図14に示すよう
に、寸法を表わす数字などは、正しい文書方向とは異な
る方向で記載される。そこで、上述のステップS2の文
字領域の抽出において、図中の文字や図に近接した文字
まで抽出される場合、図中の文字領域は判定に全く用い
ずに無視するか、もしくは判定処理の優先度を低くして
極力用いないようにする。
When a figure is described in the original document, the characters in the figure may be written in a direction different from the correct document direction. For example, as shown in FIG. 14, the numbers representing the dimensions are written in a direction different from the correct document direction. Therefore, in the extraction of the character area in step S2 described above, when characters in the drawing or characters close to the drawing are also extracted, the character area in the drawing is not used at all in the determination and is ignored, or the determination processing is prioritized. Try not to use it as low as possible.

【0068】また、図中の文字や図に接近した文字しか
存在しないような原稿の場合、それが複数か諸あるなら
ば、夫々の判定結果の多数決をとり、画像の方向を決定
する。
Further, in the case of a document in which only characters in the drawing or characters close to the drawing exist, if there are a plurality of them, various judgment results are majority-determined to determine the direction of the image.

【0069】同様に表中の文字は数字である可能性が高
い。数字は、「1、6、8、9、0」のように、回転さ
せて認識処理を行っても区別しにくい。そこで、表中の
文字領域については、判定処理の優先度を低くして極力
用いない様にする。
Similarly, the letters in the table are likely to be numbers. The numbers are difficult to distinguish even if the recognition process is performed by rotating the numbers, such as “1, 6, 8, 9, 0”. Therefore, for the character areas in the table, the priority of the determination process is set to a low level so that it is not used as much as possible.

【0070】尚、原稿を読み取って得られた画像データ
から、文字領域、図形、表を判定する方法としては、例
えば画像データから独立した黒画素のかたまりを取出
し、そのかたまりの大きさ、並び、内外の関係に基づい
て行う方法が知られている。黒画素の取出し方として
は、ラベリング方式や、輪郭追跡等によって行う方法が
ある。
As a method for determining a character area, a figure, and a table from image data obtained by reading an original, for example, a cluster of black pixels independent of the image data is taken out, and the size and arrangement of the cluster are A method based on internal and external relationships is known. As a method of extracting the black pixel, there are a labeling method and a method of performing contour tracking.

【0071】また、ステップS2において各文字領域の
大きさでソートして大きい文字領域から方向判定に用い
るようにしてもよい。或は、ステップS2における文字
領域の抽出の際に、各文字領域の文字数が分かる場合
は、文字数の多い順にソートして、文字数の多い文字領
域から方向判定に用いてもよい。この様にすれば、最初
の文字領域から必要な文字数の切り出し領域を得ること
ができる可能性が高くなるので、処理が高速になる。
Further, in step S2, the character areas may be sorted according to the size and used for determining the direction from the larger character area. Alternatively, when the number of characters in each character region is known when extracting the character regions in step S2, the character regions may be sorted in descending order of the number of characters and used for direction determination from the character region having the largest number of characters. By doing so, it is highly possible that a necessary number of cut-out regions can be obtained from the first character region, so that the processing becomes faster.

【0072】更に、ステップS2とステップS3におい
て、各文字領域の大きさで一定以上の大きさの領域をサ
ーチして見つかった領域から方向判定に用いるようにし
てもよい。最後の文字領域まで処理した場合は先頭に戻
ってスキップされた文字領域を方向判定に用いる。ソー
ティング等の処理が不要なため、抽出された文字領域の
数が多くなるような場合に、処理が高速となる。
Further, in step S2 and step S3, an area of a certain size or more may be searched for in the size of each character area, and the area found may be used for the direction determination. When the last character area is processed, the character area skipped back to the beginning is used for the direction determination. Since processing such as sorting is unnecessary, the processing becomes faster when the number of extracted character areas is large.

【0073】更に、ステップS3の文字の切り出しにお
いて、半角文字か全角文字かの判定が出来ない文字を除
いて一定数以上の文字の切り出しを行い、その各文字の
0,90,180,270度の認識を行い類似度を算出
してもよい。半角/全角文字が確定できる文字のみ判定
に用いるため、各角度の文字数が変化せず、文字数管理
が簡単になる。また、文字切り出しの精度の高い部分の
み方向判定処理にかかるためそこから判定された結果も
信頼性が高い。また、全角サイズの切り出し領域のみを
用いるようにしても同様の効果が得られる。
Further, in the character cut-out in step S3, a certain number or more of characters are cut out except for the characters that cannot be determined to be half-width characters or full-width characters, and 0, 90, 180, 270 degrees of each character are cut out. May be recognized to calculate the degree of similarity. Since only half-width / full-width characters can be determined for determination, the number of characters at each angle does not change and the number of characters can be easily managed. Further, since the direction determination processing is performed only on the portion where the character cutting out accuracy is high, the result determined from that portion is also highly reliable. Also, the same effect can be obtained by using only the full-width cutout region.

【0074】更に、原稿の向きが縦置きか、または横置
きのいずれかに限定されるシステムでは、0度か180
度かの判定のみでよい。
Further, in a system in which the orientation of the original document is limited to either portrait orientation or landscape orientation, 0 degree or 180 degrees.
It only needs to be judged a few times.

【0075】また、上記実施例では、電子ファイリング
装置への適用を説明したが、他の装置への適用を制限す
るものではない。例えば、デジタル複写機に適用すれ
ば、間違った方向の原稿頁が混在しても、自動的に正し
い方向に画像回転させて記録紙上に画像形成することが
可能となり、後から頁の方向を手操作で修正する必要が
なくなり、操作性が向上する。
In the above embodiment, the application to the electronic filing apparatus has been described, but the application to other apparatuses is not limited. For example, if it is applied to a digital copying machine, even if document pages in the wrong direction are mixed, it is possible to automatically rotate the image in the correct direction and form an image on the recording paper. There is no need to modify it by operation, improving operability.

【0076】また、上記実施例では1ページ分の原稿を
読み取った後で画像の方向判定を行うがこれに限らな
い。例えば、原稿を部分単位(バンド処理による)に読
み込んで方向判定の処理を実行するようにしても良い。
そして、判定ができたところで上記バンド単位の処理を
終了し、方向補正の処理に入る。これにより、読み取り
装置において原稿をスキャンしながら方向判定を行なえ
るので、より迅速に方向判定が行なえる。尚、バンド間
にまたがった文字は前のバンドの画像と結合する。
In the above embodiment, the orientation of the image is determined after reading one page of the document, but the invention is not limited to this. For example, the original may be read in units of parts (by band processing) and the processing for direction determination may be executed.
When the determination can be made, the processing for each band is terminated, and the processing for direction correction is started. As a result, the direction can be determined while scanning the document in the reading device, so that the direction can be determined more quickly. It should be noted that the characters spanning the bands are combined with the image of the previous band.

【0077】尚、本発明は、複数の機器から構成される
システムに適用しても、1つの機器から成る装置に適用
しても良い。また、本発明はシステム或は装置にプログ
ラムを供給することによって達成される場合にも適用で
きることはいうまでもない。
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. Further, it goes without saying that the present invention can be applied to the case where it is achieved by supplying a program to a system or an apparatus.

【0078】[0078]

【発明の効果】以上説明したように、本発明によれば、
読み取られた画像データから画像の方向を判定すること
が可能となる。
As described above, according to the present invention,
It is possible to determine the direction of the image from the read image data.

【0079】また、本発明によれば、方向の判別に複数
の文字画像の類似度を用いるため、文字の切りだしや認
識を失敗した場合の影響を小さくし、より正確な判定を
行える。
Further, according to the present invention, since the degree of similarity between a plurality of character images is used to determine the direction, it is possible to reduce the influence of a failure in cutting or recognizing a character and to make a more accurate determination.

【0080】また、本発明によれば、文字画像を各方向
より認識するにおいて、画像自体を回転させる必要がな
いため高速である。
Further, according to the present invention, when recognizing a character image from each direction, it is not necessary to rotate the image itself, so that the speed is high.

【0081】また、本発明によれば、文書中の全文字に
対して認識処理を行なうのではないので処理が高速に行
える。
Further, according to the present invention, since the recognition processing is not performed for all the characters in the document, the processing can be performed at high speed.

【0082】また、本発明によれば、4方向のそれぞれ
に対して全角文字/半角文字の判定を行なうため、認識
度を低下させる不必要なパターンが除去され、方向判定
の精度をより向上させることができる。
Further, according to the present invention, since full-width characters / half-width characters are determined for each of the four directions, unnecessary patterns that reduce the degree of recognition are removed, and the accuracy of direction determination is further improved. be able to.

【0083】また、本発明の他の構成によれば、全角文
字と推定される文字のみを判定に用いるため全角文字/
半角文字の認識度に基づく判定が不用となる。また、4
方向の文字数は同じであるため類似度の平均値を計算し
なくてもよく、総計で画像の方向の判定を行える。
Further, according to another configuration of the present invention, since only the characters estimated to be full-width characters are used for the determination, full-width characters /
The determination based on the degree of recognition of half-width characters becomes unnecessary. Also, 4
Since the number of characters in the direction is the same, it is not necessary to calculate the average value of the similarities, and the direction of the image can be determined in total.

【0084】[0084]

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

【図1】実施例における電子ファイリング装置の構成を
表すブロック図である。
FIG. 1 is a block diagram showing a configuration of an electronic filing device in an example.

【図2】本実施例における電子ファイリング装置の動作
手順を表すフローチャートである。
FIG. 2 is a flowchart showing an operation procedure of the electronic filing device in this embodiment.

【図3】本実施例における文字の切り出し処理(ステッ
プS3)の手順を表すフローチャートである。
FIG. 3 is a flowchart showing a procedure of character cutout processing (step S3) in the present embodiment.

【図4】本実施例における4方向認識処理の手順を表す
フローチャートである。
FIG. 4 is a flowchart showing a procedure of four-direction recognition processing in this embodiment.

【図5】本実施例における特徴量抽出のための走査方向
を説明する図である。
FIG. 5 is a diagram illustrating a scanning direction for feature amount extraction according to the present exemplary embodiment.

【図6】本実施例のある走査方向における平均類似度の
算出手順を表わすフローチャートである。
FIG. 6 is a flowchart showing a procedure of calculating an average similarity in a scanning direction according to the present embodiment.

【図7】文字領域から文字の切り出しを行なった状態を
表す図である。
FIG. 7 is a diagram illustrating a state in which a character is cut out from a character area.

【図8】半角サイズの切り出し領域のドッキング例を説
明する図である。
FIG. 8 is a diagram illustrating an example of docking a cut-out region having a half-width size.

【図9】回転画像に対応する特徴量獲得の他の手法を説
明するフローチャートである。
FIG. 9 is a flowchart illustrating another method of acquiring a feature amount corresponding to a rotated image.

【図10】他の手法による特徴量獲得のための、切り出
し領域に対するブロック分割と、方向成分を表わす図で
ある。
FIG. 10 is a diagram showing a block division of a cutout region and a direction component for obtaining a feature amount by another method.

【図11】他の手法による特徴量獲得によるデータの格
納状態を表わす図である。
FIG. 11 is a diagram showing a storage state of data obtained by acquiring a feature amount by another method.

【図12】本実施例における方向決定手順を示すフロー
チャートである。
FIG. 12 is a flowchart showing a direction determining procedure in the present embodiment.

【図13】回転の識別を行ないにくい文字列の一例を表
す図である。
FIG. 13 is a diagram illustrating an example of a character string in which it is difficult to identify rotation.

【図14】文書中に記載された図中の文字の方向の一例
を表す図である。
FIG. 14 is a diagram showing an example of directions of characters in a document described in a document.

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

10 スキャナ 11 CPU 12 ROM 13 RAM 14 インターフェース 15 外部記憶装置 16 ディスプレイ 17 バス 18 印刷部 10 Scanner 11 CPU 12 ROM 13 RAM 14 Interface 15 External Storage Device 16 Display 17 Bus 18 Printing Section

Claims (20)

【特許請求の範囲】[Claims] 【請求項1】 画像より文字画像を切り出す切り出し手
段と、 前記切り出し手段で切り出された文字画像についてその
方向を判定する判定手段と、 前記判定手段による判定結果に基づいて当該画像の方向
を決定する決定手段とを備えることを特徴とする画像処
理装置。
1. A cutout unit for cutting out a character image from an image, a judgment unit for judging the direction of the character image cut out by the cutout unit, and a direction of the image based on the judgment result of the judgment unit. An image processing apparatus comprising: a determining unit.
【請求項2】 前記判定手段は、前記切り出し手段で切
り出された文字画像が、0度、90度、180度、27
0度の4方向のいずれの方向であるかを判定することを
特徴とする請求項1に記載の画像処理装置。
2. The determination means determines that the character image cut out by the cutout means is 0 degree, 90 degrees, 180 degrees, 27 degrees.
The image processing apparatus according to claim 1, wherein it is determined which one of the four directions of 0 degrees.
【請求項3】 画像より複数の文字画像を切り出す切り
出し手段と、 前記切り出し手段で切り出された各文字画像について、
複数の方向について類似度を求める算出手段と、 前記類似度算出手段で算出された類似度に基づいて、前
記画像の方向を前記複数の方向の一つに決定する決定手
段とを備えることを特徴とする画像処理装置。
3. A cutting-out means for cutting out a plurality of character images from an image, and each character image cut out by the cutting-out means,
And a determining unit that determines the direction of the image to be one of the plurality of directions based on the similarity calculated by the similarity calculating unit. Image processing device.
【請求項4】 前記複数の方向は、0°、90度、18
0度、270度の4方向であることを特徴とする請求項
3に記載の画像処理装置。
4. The plurality of directions are 0 °, 90 °, 18
The image processing apparatus according to claim 3, wherein the image processing apparatus has four directions of 0 degree and 270 degrees.
【請求項5】 前記切り出し手段において、所定数の文
字画像が切り出された時点で当該切り出し処理を終了す
ることを特徴とする請求項3に記載の画像処理装置。
5. The image processing apparatus according to claim 3, wherein when the predetermined number of character images are cut out by the cutout unit, the cutout process is ended.
【請求項6】 切り出された複数の文字画像を結合して
新たな文字画像を形成し、この新たな文字画像によって
類似度が向上した場合はその類似度に基づいて前記算出
手段により得られた類似度を更新する更新手段を更に備
えることを特徴とする請求項3に記載の画像処理装置。
6. A plurality of clipped character images are combined to form a new character image, and when the similarity is improved by the new character image, the new character image is obtained by the calculation means based on the similarity. The image processing apparatus according to claim 3, further comprising an updating unit that updates the degree of similarity.
【請求項7】 前記更新手段は、半角文字サイズの文字
画像が連続する場合、これらを結合して全角サイズの文
字画像を形成し、類似度が向上した場合にその類似度に
基づいて前記算出手段により得られた類似度を更新する
ことを特徴とする請求項6に記載の画像処理装置。
7. The updating means, when character images of half-width character size are continuous, combines these to form a character image of full-width size, and when the similarity is improved, the calculation is performed based on the similarity. The image processing apparatus according to claim 6, wherein the similarity obtained by the means is updated.
【請求項8】 前記更新手段は、半角サイズの文字画像
の類似度が所定値よりも小さい場合に全角サイズへの結
合を行うことを特徴とする請求項7に記載の画像処理装
置。
8. The image processing apparatus according to claim 7, wherein the updating unit performs combining to a full-size character when the similarity of the half-size character image is smaller than a predetermined value.
【請求項9】 前記算出手段は、全角文字と判断される
文字画像について、各方向毎の類似度の算出を行い、 前記判定手段は、前記算出手段で算出された類似度の各
方向毎の総計に基づいて前記画像の方向を判定すること
を特徴とする請求項3に記載の画像処理装置。
9. The calculating means calculates the similarity of each direction for a character image that is determined to be a full-width character, and the determining means determines the similarity of each direction of the similarity calculated by the calculating means. The image processing apparatus according to claim 3, wherein the direction of the image is determined based on a total amount.
【請求項10】 前記算出手段において方向判定に用い
られた文字の数が所定数に満たない場合、前記切り出し
手段による文字画像の切り出しを追加し、前記算出手段
と、前記判定手段をくり返し実行する制御手段を更に備
えることを特徴とする請求項3に記載の画像処理装置。
10. When the number of characters used for the direction determination in the calculation means is less than a predetermined number, the character image is cut out by the cutout means, and the calculation means and the determination means are repeatedly executed. The image processing apparatus according to claim 3, further comprising a control unit.
【請求項11】 前記算出手段において算出された各方
向の類似度において、第1位の類似度と第2位の類似度
の差が所定値に満たない場合、前記切り出し手段により
別の文字領域からの文字画像の切り出しを行い、前記算
出手段と、前記判定手段をくり返し実行する制御手段を
更に備えることを特徴とする請求項3に記載の画像処理
装置。
11. In the similarity in each direction calculated by the calculating means, if the difference between the first-rank similarity and the second-rank similarity is less than a predetermined value, the clipping means separates another character area. The image processing apparatus according to claim 3, further comprising a control unit that cuts out a character image from the image, and repeatedly executes the calculation unit and the determination unit.
【請求項12】 前記算出手段において算出された各方
向の類似度において、第1位の類似度が所定値に満たな
い場合、前記切り出し手段により別の文字領域からの文
字画像の切り出しを行い、前記算出手段と、前記判定手
段をくり返し実行する制御手段を更に備えることを特徴
とする請求項3に記載の画像処理装置。
12. In the similarity in each direction calculated by the calculating means, if the first-order similarity is less than a predetermined value, the cutting means cuts out a character image from another character area, The image processing apparatus according to claim 3, further comprising: a control unit that repeatedly executes the calculation unit and the determination unit.
【請求項13】 画像に図もしくは表の領域がある場
合、図或は表中の文字領域は前記切り出し手段による文
字画像の切り出しに用いる優先順位を低くすることを特
徴とする請求項3に記載の画像処理装置。
13. The method according to claim 3, wherein when the image has a figure or table area, the character area in the figure or table has a lower priority for cutting out the character image by the cutting means. Image processing device.
【請求項14】 前記複数の方向は、0°、または18
0度の2方向であることを特徴とする請求項3に記載の
画像処理装置。
14. The plurality of directions are 0 ° or 18
The image processing apparatus according to claim 3, wherein the image processing apparatus has two directions of 0 degree.
【請求項15】 前記判定手段で判定された前記画像の
方向に基づいて、該画像を必要に応じて回転して出力す
る出力手段を更に備えることを特徴とする請求項3に記
載の画像処理装置。
15. The image processing according to claim 3, further comprising an output unit that rotates and outputs the image as needed based on the direction of the image determined by the determination unit. apparatus.
【請求項16】 前記判定手段で判定された前記画像の
方向に基づいて、該画像を必要に応じて回転して出力す
る出力手段を更に備えることを特徴とする請求項3に記
載の画像処理装置。
16. The image processing according to claim 3, further comprising an output unit that rotates and outputs the image as needed based on the direction of the image determined by the determination unit. apparatus.
【請求項17】 前記算出手段は、切り出された文字画
像について走査方向を変更して類似度を算出すること
で、前記複数の方向に対応する類似度の算出を行うこと
を特徴とする請求項3に記載の画像処理装置。
17. The calculation means calculates the similarity corresponding to the plurality of directions by changing the scanning direction of the clipped character image and calculating the similarity. The image processing device according to item 3.
【請求項18】 前記算出手段は、切り出された文字画
像を所定数のブロックに分割し、所定方向で走査を行っ
て各ブロック毎に画像の方向成分を計数し、得られた各
ブロック毎の方向成分ごとの計数値を格納して特徴デー
タとし、該所定方向以外の方向の特徴データの算出は、
前記ブロック単位及び前記方向成分単位での計数値の入
れ替えで行い、得られた各方向の特徴データに基づいて
類似度の算出を行うことを特徴とする請求項3に記載の
画像処理装置。
18. The calculating means divides the cut-out character image into a predetermined number of blocks, scans in a predetermined direction, counts the direction component of the image for each block, and obtains each block obtained. The count value for each direction component is stored as feature data, and the feature data in a direction other than the predetermined direction is calculated by
The image processing apparatus according to claim 3, wherein the count value is exchanged in the block unit and the direction component unit, and the similarity is calculated based on the obtained feature data in each direction.
【請求項19】 画像より文字画像を切り出す切り出し
工程と、 前記切り出し工程で切り出された文字画像についてその
方向を判定する判定工程と、 前記判定工程による判定結果に基づいて当該画像の方向
を決定する決定工程とを備えることを特徴とする画像処
理方法。
19. A cutting out step of cutting out a character image from an image, a judging step of judging the direction of the character image cut out in the cutting step, and a direction of the image based on the judgment result of the judging step. An image processing method comprising: a determining step.
【請求項20】 画像より複数の文字画像を切り出す切
り出し工程と、 前記切り出し工程で切り出された各文字画像について、
複数の方向について類似度を求める算出工程と、 前記類似度算出工程で算出された類似度に基づいて、前
記画像の方向を前記複数の方向の一つに決定する決定工
程とを備えることを特徴とする画像処理方法。
20. A cutting step of cutting out a plurality of character images from an image, and each character image cut out in the cutting step,
A calculation step of obtaining a similarity for a plurality of directions; and a determination step of determining the direction of the image as one of the plurality of directions based on the similarity calculated in the similarity calculation step. Image processing method.
JP7096642A 1995-04-21 1995-04-21 Device and method for image processing Withdrawn JPH08293000A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP7096642A JPH08293000A (en) 1995-04-21 1995-04-21 Device and method for image processing
EP96302789A EP0744711B1 (en) 1995-04-21 1996-04-19 Method and apparatus for image rotation
DE69624034T DE69624034D1 (en) 1995-04-21 1996-04-19 Image rotation method and apparatus
US08/635,586 US5966138A (en) 1995-04-21 1996-04-22 Image processing method and apparatus for rotating an image in an area of an original

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7096642A JPH08293000A (en) 1995-04-21 1995-04-21 Device and method for image processing

Publications (1)

Publication Number Publication Date
JPH08293000A true JPH08293000A (en) 1996-11-05

Family

ID=14170487

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7096642A Withdrawn JPH08293000A (en) 1995-04-21 1995-04-21 Device and method for image processing

Country Status (1)

Country Link
JP (1) JPH08293000A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006260274A (en) * 2005-03-17 2006-09-28 Ricoh Co Ltd Character direction identification device, image forming device, program, storage medium, and character direction identification method
JP2008084105A (en) * 2006-09-28 2008-04-10 Oki Electric Ind Co Ltd Character cutout method and character recognition device
JP2013012195A (en) * 2011-06-29 2013-01-17 Fujitsu Ltd Method and device for identifying direction of character in image block
JP2013025800A (en) * 2011-07-20 2013-02-04 Fujitsu Ltd Method and device for recognizing character orientation in image block
JP2013235581A (en) * 2012-05-04 2013-11-21 Fujitsu Ltd Image processing method and device
JP2015106910A (en) * 2013-12-03 2015-06-08 カシオ計算機株式会社 Image processing system, image processing method, and program
JP2018116424A (en) * 2017-01-17 2018-07-26 富士ゼロックス株式会社 Image processing device and program

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006260274A (en) * 2005-03-17 2006-09-28 Ricoh Co Ltd Character direction identification device, image forming device, program, storage medium, and character direction identification method
JP4607633B2 (en) * 2005-03-17 2011-01-05 株式会社リコー Character direction identification device, image forming apparatus, program, storage medium, and character direction identification method
JP2008084105A (en) * 2006-09-28 2008-04-10 Oki Electric Ind Co Ltd Character cutout method and character recognition device
JP2013012195A (en) * 2011-06-29 2013-01-17 Fujitsu Ltd Method and device for identifying direction of character in image block
JP2013025800A (en) * 2011-07-20 2013-02-04 Fujitsu Ltd Method and device for recognizing character orientation in image block
JP2013235581A (en) * 2012-05-04 2013-11-21 Fujitsu Ltd Image processing method and device
JP2015106910A (en) * 2013-12-03 2015-06-08 カシオ計算機株式会社 Image processing system, image processing method, and program
JP2018116424A (en) * 2017-01-17 2018-07-26 富士ゼロックス株式会社 Image processing device and program

Similar Documents

Publication Publication Date Title
US5181260A (en) Method for determining the amount of skew of image, method for correcting the same, and image data processing system
US6081621A (en) Positioning templates in optical character recognition systems
EP0439951B1 (en) Data processing
US6430320B1 (en) Image processing system with automatic image cropping and skew correction
US5140650A (en) Computer-implemented method for automatic extraction of data from printed forms
US20070071319A1 (en) Method, apparatus, and program for dividing images
US5745664A (en) Image synthesizing method and image recording apparatus which electronically synthesizes an image with a page of information
US7969631B2 (en) Image processing apparatus, image processing method and computer readable medium storing image processing program
JPH08212298A (en) Automatic judging device for document direction and automatic correcting device for document direction
US6275608B1 (en) Image processing method and apparatus and memory medium
US20040013318A1 (en) System and method for manipulating a skewed digital image
JP2017151916A (en) Information processing device,information processing method, and program
JPH08287184A (en) Picture cutting-out device and character recognition device
US7020352B2 (en) Photo extraction techniques
JPH08293000A (en) Device and method for image processing
CN111126273B (en) Image processing method, device, electronic equipment and storage medium
JP2005045799A (en) Improvement of image quality using partial template matching
US7317552B2 (en) Print data forming apparatus, print data forming method, and computer-readable program
JPH06103411A (en) Document reader
US20060170952A1 (en) Image processing apparatus and method
JP3548234B2 (en) Character recognition method and device
US11853844B2 (en) Information processing apparatus, image orientation determination method, and medium
JP6194781B2 (en) Image processing apparatus and program
JPH0490083A (en) Character recognizing device
JP7310151B2 (en) Mark selection device and image processing device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020702