JP2003259111A - Image processing method - Google Patents

Image processing method

Info

Publication number
JP2003259111A
JP2003259111A JP2002057528A JP2002057528A JP2003259111A JP 2003259111 A JP2003259111 A JP 2003259111A JP 2002057528 A JP2002057528 A JP 2002057528A JP 2002057528 A JP2002057528 A JP 2002057528A JP 2003259111 A JP2003259111 A JP 2003259111A
Authority
JP
Japan
Prior art keywords
image
inclination
correction
detected
normal direction
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.)
Granted
Application number
JP2002057528A
Other languages
Japanese (ja)
Other versions
JP3915974B2 (en
Inventor
Toshifumi Yamaai
敏文 山合
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2002057528A priority Critical patent/JP3915974B2/en
Publication of JP2003259111A publication Critical patent/JP2003259111A/en
Application granted granted Critical
Publication of JP3915974B2 publication Critical patent/JP3915974B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To correct the direction and tilt of an input image. <P>SOLUTION: The direction of the input image is decided (S102) to rotate the image to a normal direction (S105) and the tilt is decided (S106) to correct the tile of the image (S113). Here, if the decision making ends in failure at a step S102 (N at S103), tilt decision processing is performed first (S108) and after the tilt of the image is corrected, the direction of the image is decided again (S110). After the direction is decided, the image is rotated to the normal direction (S112) and outputted (S113). <P>COPYRIGHT: (C)2003,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、文字認識(OC
R)、スキャン画像閲覧ソフトなどに適用可能な、画像
の方向及び傾きを補正するための画像処理方法、画像処
理装置、画像処理を実行するためのプログラム、及び該
プログラムを記録した記録媒体に関するものである。
TECHNICAL FIELD The present invention relates to character recognition (OC).
R), an image processing method applicable to scan image browsing software, etc. for correcting the direction and inclination of an image, an image processing apparatus, a program for executing image processing, and a recording medium recording the program Is.

【0002】[0002]

【従来の技術】文書の方向を判別する処理は、えてして
傾いている場合に精度が落ちるものが多い。例えば、特
許第3187894号の文書画像傾き検出方法では、二
値化された文書画像(原画像)の傾きを検出する文書画
像傾きを検出するため、原画像を縮小し、該縮小された
画像から文字列領域を抽出し、該文字列領域に対応する
原画像上の文字列領域内の黒画素連結成分、つまり文字
の周囲を囲む外接矩形について、各外接矩形の高さのヒ
ストグラムを作成し、頻度の最も高い値をとる外接矩形
の高さを基準値とし、該基準値に対して所定の閾値以上
大きい(つまり高い)外接矩形を基準値に変換し、変換
後の外接矩形に対して、外接矩形の中心から最もずれの
小さい直線を最小二乗近似法を用いて算出することによ
り文字列の傾きを求めている。この検出方法では、文字
からその中心点を得るために、基準より大きな矩形高さ
のものでは上部を削る変換処理を行っている。しかしな
がら、英字のように文字の大きさがまちまちのもので
は、その文書方向が目で見たとき例えばその1文字が自
然に読み取れる方向(ここでは正規方向という、また、
便宜上この方向を北向きとして他の方向を東、西、南向
きということもある)と異なる南向きつまり上下逆にな
った状態では、中心点がずれそれが全体の傾き検出に悪
影響を与えることになる。加えて、文書の傾きの検出処
理は、文書が正規の向きであることを前提にしているも
のが多く、文書が正規方向以外の方向、つまり東、西、
南を向いている場合に精度が落ちることが多い。
2. Description of the Related Art In many cases, the accuracy of processing for determining the orientation of a document is degraded when the document is tilted. For example, in the document image inclination detection method of Japanese Patent No. 3187894, the original image is reduced in order to detect the document image inclination for detecting the inclination of the binarized document image (original image). The character string area is extracted, and the black pixel connected component in the character string area on the original image corresponding to the character string area, that is, for the circumscribing rectangle surrounding the character, creates a histogram of the height of each circumscribing rectangle, The height of the circumscribing rectangle having the highest frequency is used as a reference value, and a circumscribing rectangle that is larger than a predetermined threshold by the reference value (that is, higher) is converted to a reference value. The straight line with the smallest deviation from the center of the circumscribed rectangle is calculated using the least squares approximation method to obtain the inclination of the character string. In this detection method, in order to obtain the center point of a character, a conversion process is performed to remove the upper part of a rectangle whose height is larger than the reference. However, if the size of the characters is different, such as English letters, the direction of the document can be visually read, for example, the direction in which one character can be read naturally (here, the normal direction,
For convenience, this direction is facing north, and the other directions are facing east, west, and south.) Different from south facing, that is, upside down, the center point shifts, which adversely affects the overall tilt detection. become. In addition, the document tilt detection process often assumes that the document is in the normal orientation, and the document is in a direction other than the regular direction, that is, east, west,
Accuracy is often reduced when facing south.

【0003】また、文書の方向判別について、例えば特
開2000−113103号公報に開示されたもので
は、文字認識の確信度(類似度、例えば、文字の特徴量
と辞書パターンの特徴量(ユークリッド距離、マハラノ
ビス距離など)の評価値を用いる)を利用して文書の方
向を判別している。つまり、画像のレイアウトを解析
し、最も優先順位の高い処理対象領域を選択する。具体
的には、例えば、選択された領域の中からN行を抽出
し、そのうち最初のM個を抽出する。各文字を90゜毎
に上下左右の4方向で認識処理し、類似度が大きい(距
離が小さい)文字ほど確信度が大きい値をとるようにし
ている。方向判別手段は、4方向の中で最大の確信度の
みがしきい値を超えたとき、当該文字については方向性
があると判定する。方向性があると判定したときはデー
タ記憶部に作成された方向頻度ヒストグラムにカウント
して方向頻度ヒストグラムを作成し、最大頻度値がしき
い値以上である最大頻度値の方向を画像方向と判別す
る。ただ、この場合、傾いていると文字の切り出しや特
徴量の抽出が傾きなしに比べて難しく、正常な状態より
も確信度情報が小さめにでる傾向があるため判別不能の
割合は若干ながら増える傾向がある。そのような場合、
傾いていてかつ文書方向が正規の向きでないような画像
は、どちらから先に処理を行っても、期待される精度が
でないということが起こり得る。
Regarding the document orientation discrimination disclosed in, for example, Japanese Patent Laid-Open No. 2000-113103, certainty of character recognition (similarity, for example, character feature amount and dictionary pattern feature amount (Euclidean distance). , Mahalanobis distance, etc.) is used) to determine the orientation of the document. That is, the layout of the image is analyzed and the processing target area having the highest priority is selected. Specifically, for example, N rows are extracted from the selected area, and the first M rows are extracted. Recognition processing is performed on each character in four directions of up, down, left, and right at 90 ° intervals, and a character having a higher similarity (smaller distance) has a higher certainty factor. The direction determining means determines that the character has directionality when only the maximum certainty factor in the four directions exceeds the threshold value. When it is determined that there is directionality, it is counted in the direction frequency histogram created in the data storage unit to create a direction frequency histogram, and the direction with the maximum frequency value that is greater than or equal to the threshold value is determined as the image direction. To do. However, in this case, when it is tilted, it is more difficult to cut out characters and extract features than when it is not tilted, and the confidence factor information tends to be smaller than in the normal state, so the rate of undecidability tends to increase slightly. There is. In such cases,
An image that is tilted and whose document orientation is not the proper orientation may not have the expected accuracy regardless of which is processed first.

【0004】[0004]

【発明が解決しようとする課題】本発明は、以上のよう
な従来技術の問題を解決すべくなされたものであって、
その第1の目的は、正規の方向でなくしかも傾いた画像
を精度よく補正して、例えば、OCRで文字を読み取る
とき、或いはユーザーが文書画像を閲覧する際に、不自
然でなく違和感ないものとすることである。本発明の第
2の目的は、画像の方向や傾きの補正に伴う画質の劣化
を防止することである。本発明の第3の目的は、多値画
像の方向や傾きの補正を精度良くかつ画像の劣化を伴う
ことなく行うことである。本発明の第4の目的は、画像
の方向及び傾きの補正処理を任意のコンピュータにより
容易に実行できるようにすることである。
SUMMARY OF THE INVENTION The present invention has been made to solve the problems of the prior art as described above.
The first purpose is to correct an image that is not in a normal direction and is tilted with high accuracy so that, for example, when reading a character by OCR or when a user browses a document image, it is not unnatural and uncomfortable. Is to A second object of the present invention is to prevent deterioration of image quality due to correction of image direction and inclination. A third object of the present invention is to accurately correct the direction and inclination of a multi-valued image without degrading the image. A fourth object of the present invention is to make it possible to easily execute the image direction and inclination correction processing by an arbitrary computer.

【0005】[0005]

【課題を解決するための手段】請求項1の発明は、入力
された二値画像の方向を検出し、該画像を正規の方向へ
回転し、正規方向に回転された前記画像の傾きを検出
し、検出した傾きに応じて傾きを補正する、各工程を有
することを特徴とする画像処理方法である。
According to a first aspect of the present invention, the direction of an input binary image is detected, the image is rotated in a normal direction, and the inclination of the image rotated in the normal direction is detected. Then, the image processing method is characterized by including each step of correcting the inclination according to the detected inclination.

【0006】請求項2の発明は、請求項1に記載された
画像処理方法において、入力された二値画像の方向が検
出できないときは、まず前記画像の傾きを検出し、検出
した傾きに応じて前記画像の傾きを補正し、その後2度
目の画像方向の検出を行い、前記画像を正規方向へ回転
する、各工程を有することを特徴とする画像処理方法で
ある。
According to a second aspect of the present invention, in the image processing method according to the first aspect, when the direction of the input binary image cannot be detected, the inclination of the image is first detected and the detected inclination is detected. The image processing method is characterized by including each step of correcting the inclination of the image, detecting the image direction for the second time, and rotating the image in the normal direction.

【0007】請求項3の発明は、請求項2に記載された
画像処理方法において、前記2度目の画像方向の検出に
基づき前記画像を正規方向へ回転し、その後2度目の画
像の傾き検出を行い、検出した傾きに応じて前記画像の
傾きを補正する、各工程を有することを特徴とする画像
処理方法である。
According to a third aspect of the present invention, in the image processing method according to the second aspect, the image is rotated in the normal direction based on the detection of the image direction of the second time, and thereafter the inclination detection of the image of the second time is performed. The image processing method is characterized by including each step of correcting the inclination of the image according to the detected inclination.

【0008】請求項4の発明は、入力した画像から画像
の方向及び傾き補正処理用二値画像を形成し、該補正処
理用二値画像について請求項1乃至3のいずれかに記載
された画像処理方法に基づき正規方向への回転及び傾き
補正を行い、該補正データをメモリに保存し、該補正デ
ータに基づき前記入力した画像の方向および傾きを補正
処理する、各工程を有することを特徴とする画像処理方
法である。
According to a fourth aspect of the present invention, a binary image for image direction and inclination correction processing is formed from the input image, and the binary image for correction processing is the image described in any one of the first to third aspects. Rotation in a normal direction and inclination correction are performed based on a processing method, the correction data is stored in a memory, and the direction and the inclination of the input image are corrected based on the correction data. Image processing method.

【0009】請求項5の発明は、多値画像から画像方向
検出のための第1の二値画像及び画像の傾き検出のため
の第2の二値化画像を形成し、請求項1乃至3のいずれ
かに記載された画像処理方法に基づき、第1の二値画像
についての画像の正規方向への回転及び第2の二値画像
についての傾き補正を行い、それぞれの補正データをメ
モリに保存し、該補正データに基づき前記多値画像の正
規方向への回転及び傾き補正を行う、各工程を有するこ
とを特徴とする画像処理方法である。
According to a fifth aspect of the present invention, a first binary image for detecting the image direction and a second binary image for detecting the inclination of the image are formed from the multi-valued image. Based on the image processing method described in any one of (1) to (3), the image of the first binary image is rotated in the normal direction and the inclination of the second binary image is corrected, and each correction data is stored in the memory. Then, the image processing method is characterized by including each step of performing rotation and tilt correction of the multi-valued image in the normal direction based on the correction data.

【0010】請求項6の発明は、請求項1乃至5のいず
れかに記載された画像処理方法における各工程の処理を
実行するためのプログラムである。
A sixth aspect of the present invention is a program for executing processing of each step in the image processing method according to any one of the first to fifth aspects.

【0011】請求項7の発明は、請求項6に記載された
プログラムを記録したコンピュータ読取可能な記録媒体
である。
A seventh aspect of the present invention is a computer-readable recording medium in which the program according to the sixth aspect is recorded.

【0012】請求項8の発明は、画像入力手段、請求項
6に記載されたプログラムを格納する手段、及び前記プ
ログラムに基づき入力画像の正規方向への回転及び傾き
補正処理を実行する画像処理制御手段、を有することを
特徴とする画像処理装置である。
According to an eighth aspect of the present invention, an image input means, a means for storing the program according to the sixth aspect, and an image processing control for executing rotation and inclination correction processing of an input image in a normal direction based on the program. And an image processing device.

【0013】[0013]

【発明の実施形態】本発明を図示する実施形態について
説明する。図1は、本発明に係る画像処理装置の1実施
形態の構成を示すブロック図である。図示の画像形成装
置は、マイクロプロセッサ等によるデジタル処理で実行
するために構成したものである。同図において、スキャ
ナ101は文書画像原稿を光学的に読み取り、電気信号
である画像データに変換する。コンピュータのCPU1
02は、本発明の処理を実行するためのプログラムが格
納されたプログラム格納ROM/RAM107から、又
はCD−ROM/FD(フレキシブルディスク)等の任
意の記録媒体100からCD−ROM/FDドライブ1
05によって当該プログラムを読み出して、ワークエリ
アRAM106において文書画像データに対する方向判
別処理、傾き角度判別処理、画像回転処理などを実行す
る。処理された文書画像データはCPU102の指示に
よりメモリ103に格納され、必要によりディスプレイ
104に表示され、或いは印字装置108によって印字
出力される。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments illustrating the present invention will be described. FIG. 1 is a block diagram showing the configuration of an embodiment of an image processing apparatus according to the present invention. The illustrated image forming apparatus is configured to be executed by digital processing by a microprocessor or the like. In the figure, a scanner 101 optically reads a document image original and converts it into image data which is an electric signal. CPU1 of computer
Reference numeral 02 denotes a CD-ROM / FD drive 1 from a program storage ROM / RAM 107 in which a program for executing the processing of the present invention is stored, or from an arbitrary recording medium 100 such as a CD-ROM / FD (flexible disk).
In step 05, the program is read out, and the work area RAM 106 executes the direction determination processing, the inclination angle determination processing, the image rotation processing, and the like for the document image data. The processed document image data is stored in the memory 103 according to an instruction from the CPU 102, displayed on the display 104 as necessary, or printed out by the printing device 108.

【0014】次に、入力画像の方向が正規方向でなくこ
れとは異なる方向であったり、或いは傾きがあるかもし
れない状態で入力された場合における傾きのない正規方
向の画像の作成について説明する。 (請求項1、2に係る発明)請求項1、2に係る発明の
実施形態では、まず、最初に文書方向の判別処理を行う
(なお、文書方向の判別は既に知られた従来の方法によ
る)。そして、画像を傾きと逆方向に回転、つまり補正
して傾きのない画像を生成する。ここで、第一の文書方
向判別が失敗した場合、次の工程(ステップ)として傾
き(傾斜角度)の検出を行い、傾きの補正後に再度文書
方向の判別を行う。これによって、二度目の処理は、画
像に傾きのない状態で文書方向判別が行えるので、一度
目の判別に失敗した画像でも文書方向の判別が成功する
ようになる。図2はこの処理を説明するためのフローチ
ャートである。画像を入力し(S101)、該画像につ
いて、従来知られている適宜の方法によりその方向判別
処理を行い(S102)、判別が成功し(S103、
Y)、正規の方向であれば(S104、Y)そのまま、
それが正規の方向でなければ(S104、N)画像を正
規の方向に回転処理して(S105)、次にこれも従来
既に知られた適宜の方法で傾き判別処理を行う(S10
6)。最後に判別された傾きを補正するため画像を回転
処理して出力する(S113)。以上の処理において、
ステップS103において、判別に失敗したときには
(S103、N)、その状態で傾き判別処理を行い(S
108)、その判別結果に従って画像の傾きを補正する
ため回転する(S109)。次に、このように画像の傾
きを補正した状態で再度画像の方向を判別する(S11
0)、判別の結果画像の方向が正規の方向あれば(S1
11、Y)そのまま、正規の方向でなければ(S11
1、N)、画像を正規の方向に回転処理して(S11
2)出力する(S113)。以上のようにして、傾きの
ない正規方向の画像が得られる。以下、同様の処理を異
なる他の実施例について説明する。
Next, description will be made on the creation of an image in the normal direction without inclination when the input image is not in the normal direction but in a direction different from the normal direction, or when the input image is input in a state in which there may be inclination. . (Invention of Claims 1 and 2) In the embodiments of the inventions of Claims 1 and 2, first, the document direction determination processing is performed (note that the document direction determination is performed by a known method. ). Then, the image is rotated in the direction opposite to the inclination, that is, corrected to generate an image without inclination. If the first document orientation determination fails, the inclination (inclination angle) is detected as the next step (step), and the document orientation is determined again after the inclination is corrected. As a result, in the second processing, the document orientation can be determined in a state where the image is not tilted, so that the orientation of the document can be successfully determined even in the image in which the first identification has failed. FIG. 2 is a flow chart for explaining this processing. An image is input (S101), the direction of the image is discriminated by an appropriately known method (S102), and the discrimination is successful (S103,
Y), if it is the normal direction (S104, Y),
If it is not in the normal direction (S104, N), the image is rotated in the normal direction (S105), and then the inclination determination process is also performed by an appropriate method that has already been known (S10).
6). The image is rotated and output in order to correct the finally determined inclination (S113). In the above process,
When the determination fails in step S103 (N in S103), the inclination determination process is performed in that state (S103).
108), according to the determination result, the image is rotated to correct the inclination of the image (S109). Next, the direction of the image is discriminated again in the state in which the inclination of the image is corrected (S11).
0), if the direction of the image as a result of the discrimination is the normal direction (S1
11, Y) If it is not in the normal direction as it is (S11
1, N), the image is rotated in the normal direction (S11
2) Output (S113). As described above, an image in the normal direction without inclination can be obtained. Hereinafter, the same processing will be described with respect to another embodiment.

【0015】(請求項3に係る発明)請求項3に係る発
明の実施形態について説明する。入力画像が文書方向が
正規の向きに限定されない、傾きがあるかもしれない状
態で入力された場合、請求項1、2の実施形態と同様の
処理を行う。ここで、本実施例は、二度目の文書方向の
判別処理が成功した場合、画像の方向を正規の方向に回
転させるが、これによって画像が正規の向きになること
で、さらに画像の傾き(傾斜角度)が精度良く検出でき
る。そこで、この正規の向きになった画像に対して、2
度目の傾き検出処理を行い、補正が必要な角度が検出で
きた場合、その角度で補正を行うものである。図3は、
請求項3の実施形態である前記処理を説明するためのフ
ローチャートである。図3において、画像を入力し(S
201)、該画像について、既に従来知られている適宜
の方法によりその方向判別処理を行い(S202)、判
別が成功し(S203、Y)、画像が正規の方向であれ
ば(S204、Y)そのまま、正規の方向でなければ
(S204、N)画像を正規の方向に回転処理する(S
205)。次に、従来既に知られた適宜の方法で傾き判
別を行う(S206)。最後に判別された傾きを補正す
るため画像を回転して(S207)、画像を出力する
(215)。以上の処理において、ステップS203に
おいて、画像方向の判別に失敗したときには(S20
3、N)、その状態で傾き判別を行い(S208)、そ
の判別結果に従って画像の傾き(傾斜角度)を補正する
ため回転する(S209)。このように画像の傾きを補
正した状態で再度画像の方向を判別する(S210)、
判別の結果画像の方向が正規の方向あれば(S211、
Y)そのまま、正規の方向でなければ(S211、
N)、画像を正規の方向に回転処理して(S212)か
ら、再度画像の傾き判別処理を行い(S213)、その
判別結果に基づき画像を回転して補正して(S214)
出力する(S215)。以上のように処理することで、
画像の向き、角度ともに請求項1、2に係る発明の実施
形態の処理に比してより精度良い認識を行うことができ
る。
(Invention of Claim 3) An embodiment of the invention of Claim 3 will be described. When the input image is input in a state where the document direction is not limited to the normal direction and there may be a tilt, the same processing as that of the embodiments of claims 1 and 2 is performed. Here, in the present embodiment, when the document orientation determination processing for the second time is successful, the orientation of the image is rotated to the regular orientation. By this, the orientation of the image is changed to the orientation of the image ( The inclination angle) can be accurately detected. So, for this normal orientation image, 2
If the angle for which the correction is necessary can be detected by performing the inclination detection process for the second time, the correction is performed at that angle. Figure 3
6 is a flowchart for explaining the processing according to the exemplary embodiment of claim 3. In FIG. 3, input an image (S
201), the direction determination processing is performed on the image by an appropriate method that has been conventionally known (S202), the determination is successful (S203, Y), and if the image is in the normal direction (S204, Y). As it is, if it is not in the normal direction (S204, N), the image is rotated in the normal direction (S).
205). Next, the inclination is discriminated by an appropriate method that has already been known (S206). The image is rotated to correct the finally determined inclination (S207), and the image is output (215). In the above processing, when the determination of the image orientation fails in step S203 (S20
3, N), tilt determination is performed in that state (S208), and rotation is performed to correct the tilt (tilt angle) of the image according to the determination result (S209). In this way, the orientation of the image is determined again with the inclination of the image corrected (S210),
As a result of the determination, if the direction of the image is the normal direction (S211,
Y) If it is not in the normal direction as it is (S211,
N), the image is rotated in the normal direction (S212), the image inclination determination process is performed again (S213), and the image is rotated and corrected based on the determination result (S214).
It is output (S215). By processing as above,
Both the orientation and the angle of the image can be recognized more accurately than the processing of the embodiments of the invention according to claims 1 and 2.

【0016】(請求項4に係る発明)請求項4に係る発
明の実施形態を以下実施例1及び2について説明する。 (実施例1)本実施例においては、画像の処理に先立
ち、まず、入力画像をオリジナル画像として保存してお
き実際の処理は複製画像において実施例2の場合と同じ
処理を行い、画像の方向、傾斜角度の検出及び補正を行
う。そして、補正を行った全補正データ(角度データ)
をメモリ上に保存しておく。例えば、1度目の方向判別
に失敗したとき、つまり、この場合は画像の正規方向へ
の回転は不可能であるから、回転による補正角A1=0
度、1度目の画像傾き角度1.3度(補正角B1=−
1.3度)、2度目の方向判別 東向(正規の向きを便
宜上北向きとしたときの文書の方向、補正角A2=−9
0度)、2度目の画像傾き角度0.8度(補正角B2=
−0.8度)とする。ここで、最初に作成された複製画
像は補正全体では、90単位では−90度、細かい単位
で−2.1度の補正を行っている。そこで、この補正デ
ータ(角度データ)に基づいて、保存しておいたオリジ
ナル画像に補正をかけ、それによって目的とする方向及
び傾きが補正された最終画像を得ることができる。以上
の処理を行う理由は、画像回転には量子化誤差が伴うこ
とが不可避であるため、微小角の回転を複数回実行する
と明らかに画像の品質が低下し、また、微小角度の補正
を高速実行するため、画像処理ソフトによっては、1バ
イトごとに補正をかけたることもあり、その場合益々画
像にゆがみが生じるという問題がああるので、それを回
避するためである。
(Invention of Claim 4) An embodiment of the invention of Claim 4 will be described with reference to Examples 1 and 2. (Embodiment 1) In this embodiment, prior to image processing, the input image is first saved as an original image, and the actual processing is the same as in Embodiment 2 for the duplicate image, and the image direction is changed. , The tilt angle is detected and corrected. And all the corrected data (angle data)
Is stored in memory. For example, when the first direction determination fails, that is, in this case, the image cannot be rotated in the normal direction, so the correction angle A1 = 0 by the rotation.
Degree, the first image inclination angle of 1.3 degrees (correction angle B1 =-
1.3 degrees) Second direction determination East direction (direction of document when normal direction is north for convenience, correction angle A2 = -9)
0 degree) The second image tilt angle 0.8 degree (correction angle B2 =
-0.8 degrees). Here, in the entire correction, the first created duplicate image is corrected by -90 degrees in 90 units and by -2.1 degrees in fine units. Therefore, based on this correction data (angle data), the stored original image is corrected, and thereby the final image in which the target direction and inclination are corrected can be obtained. The reason for performing the above processing is that it is unavoidable that the image rotation is accompanied by a quantization error. Therefore, if the rotation of the minute angle is performed multiple times, the image quality obviously deteriorates, and the correction of the minute angle is performed at high speed. This is because, depending on the image processing software, correction may be performed for each byte, and in this case, there is a problem that the image is further distorted, so that it is avoided.

【0017】ここで、角度が90度単位とそうでないの
とで分けているのは、90度単位の画像補正は微小角度
の補正と違ったアルゴリズムで実装できるためためであ
る、即ち、例えば画像を180度回転する場合は、単に
上下左右を逆にすればよいだけであるため、X、Y座標
でみればあるドット(X、Y)をX=−x、Y=−yに
変換して計算するだけでよいが、微小角の場合は、ある
ドット(X、Y)をX=xcosθ+ysinθ、Y=ycos
θ−xsinθに変換して計算するため、90度単位の計算
の方が微小角度の補正の計算より高速に計算処理が行え
るからである。なお、全ての総和の−92.1度を一度
で画像補正することが可能な画像回転処理を一度かけて
しまう方法があればその方が効率的である。
Here, the reason why the angle is divided into 90-degree unit and not 90-degree unit is that the image correction in 90-degree unit can be implemented by an algorithm different from the correction of the minute angle. Is rotated 180 degrees, all that is required is to reverse the top, bottom, left, and right. Therefore, when looking at the X and Y coordinates, a dot (X, Y) is converted to X = -x, Y = -y. It is only necessary to calculate, but in the case of a small angle, a certain dot (X, Y) is calculated as X = xcosθ + ysinθ, Y = ycos
This is because the calculation is performed by converting to θ−xsin θ, and therefore the calculation processing in 90 ° units can be performed at a higher speed than the calculation for correction of a minute angle. It should be noted that if there is a method in which the image rotation processing capable of correcting the image of −92.1 degrees of all the sums at one time is performed once, it is more efficient.

【0018】図4は以上で説明した実施例1における処
理を示すフローチャートである。画像を入力し(S30
1)、該画像について複写画像を作成し(S302)、
かつ元の画像はオリジナル画像として保存しておく、こ
の複写画像について従来既に知られた方法によりその方
向判別処理を行い(S303)、判別が成功し(S30
4、Y)、画像方向が正規の向きであれば(S305、
Y)そのまま、正規方向でなければ(S305、N)画
像を正規の向きにして回転処理し(S306)、次に従
来知られた方法で傾き判別処理を行う(S307)。以
上の処理において補正を行った補正データ(角度デー
タ)をメモリ上に保存しておき、このメモリ上に保存し
た補正データに基づいて、保存しておいたオリジナル画
像を回転処理して(S308)出力する(S316)。
以上の処理において、ステップS304において、判別
に失敗したときには(S304、N)、その状態で傾き
判別処理を行い(S309)、その判別結果に従って複
写画像の傾きを補正するため回転する(S310)。こ
のように複写画像の傾きを補正した状態で再度画像の方
向を判別する(S311)、判別の結果画像の方向が正
規の向きであれば(S312、Y)そのまま、正規の向
きでなければ(S312、N)、画像を正規の方向に回
転処理して(S313)、再び傾き判別を行う(S31
4)。以上の処理において補正を行った補正データ(角
度データ)をメモリ上に保存しておき、このメモリ上に
保存した補正データに基づいて、オリジナル画像の回転
処理を行い(S315)、補正画像を出力する(S31
6)。
FIG. 4 is a flowchart showing the processing in the first embodiment described above. Enter the image (S30
1), a copy image is created for the image (S302),
In addition, the original image is saved as an original image. The direction of this copied image is discriminated by a method known in the art (S303), and the discrimination succeeds (S30).
4, Y), if the image direction is the normal direction (S305,
Y) If the image is not in the normal direction as it is (S305, N), the image is rotated in the normal direction (S306), and then the inclination determination process is performed by a conventionally known method (S307). The correction data (angle data) corrected in the above process is stored in the memory, and the stored original image is rotated based on the correction data stored in the memory (S308). It is output (S316).
In the above processing, when the determination fails in step S304 (N in S304), the inclination determination processing is performed in that state (S309), and the image is rotated to correct the inclination of the copied image according to the determination result (S310). In this way, the image orientation is determined again with the inclination of the copied image corrected (S311). If the orientation of the image is a normal orientation as a result of the determination (S312, Y), the orientation is not correct (Y). (S312, N), the image is rotated in the normal direction (S313), and the tilt determination is performed again (S31).
4). The correction data (angle data) corrected in the above process is stored in the memory, the original image is rotated based on the correction data stored in this memory (S315), and the corrected image is output. Yes (S31
6).

【0019】(実施例2)実施例2は、入力が多値画像
(カラーまたはグレー)が入力された場合の動作であ
る。多値画像が入力された場合に、それぞれ文書方向、
スキュー(傾き)補正で処理できる二値画像への変換を
行う必要がある。二値化の方法については、例えば、特
開平9−233326公報には、多値画像中のブロック
毎に輝度頻度を算出し、該輝度頻度中の輝度頻度最適領
域を特定してその輝度頻度最適領域の平均輝度値を算出
し、該平均値に基づいてブロック単位の二値化閾値を算
出し、該ブロック単位の二値化閾値を補完する領域を設
定し、設定された領域に対しブロック単位の二値化閾値
を補完することで画素単位の二値化閾値を算出して二値
化する方法などの方法が開示されているが、このような
公知の方法を適宜利用して多値画像から二値画像を形成
することができる。本実施例では、得られた二値画像に
対して請求項1乃至3に係る発明の実施形態のいずれか
の方法で画像傾き及び画像方向を検出する。その結果を
反映させるのに、本実施例でも請求項3の実施形態の場
合のように補正角度データ(情報)を保存しておき、オ
リジナルの多値画像に対してその角度の補正を行うこと
で、カラー画像のスキュー補正、文書方向補正が可能で
ある。
(Embodiment 2) Embodiment 2 is an operation when a multi-valued image (color or gray) is input. When a multi-valued image is input, the document direction,
It is necessary to perform conversion into a binary image that can be processed by skew (tilt) correction. Regarding the binarization method, for example, in Japanese Patent Laid-Open No. 9-233326, the brightness frequency is calculated for each block in a multi-valued image, the brightness frequency optimum region in the brightness frequency is specified, and the brightness frequency is optimized. The average brightness value of the area is calculated, the binarization threshold value of the block unit is calculated based on the average value, the area that complements the binarization threshold value of the block unit is set, and the block unit is set for the set area. Although a method such as a method of calculating a binarization threshold value for each pixel and binarizing the pixel value by complementing the binarization threshold value is disclosed, a multi-valued image is appropriately used by using such a known method. From which a binary image can be formed. In the present example, the image inclination and the image direction are detected for the obtained binary image by any of the methods of the embodiments of the invention according to claims 1 to 3. In order to reflect the result, correction angle data (information) is stored in the present embodiment as in the case of the embodiment of claim 3, and the angle is corrected for the original multi-valued image. Thus, skew correction of the color image and document direction correction are possible.

【0020】図5は実施例2の処理を示すフローチャー
トであり、以下、図5に実施例4にの処理手順を説明す
る。まず、多値画像を入力する(S401)。次に、該
画像について二値画像の複写画像を作成し(S402)
かつ元の画像はオリジナル画像として保存しておく、こ
の複写画像について例えば前記従来の方法によりその方
向判別処理を行い(S403)、その結果、判別が成功
し(S404、Y)、画像の方向が正規の向きであれば
(S405、Y)そのまま、正規方向でなければ(S4
05、N)、二値画像を正規の向きにして回転処理し
(S406)、次に従来既に知られた方法で傾き判別処
理を行う(S407)。以上の処理において補正を行っ
た補正データ(角度データ)をメモリ上に保存してお
き、このメモリ上に保存した補正データに基づいて、保
存したおいた多値入力画像を回転処理して(S408)
出力する(S416)。以上の処理において、ステップ
S404において、画像の方向の判別に失敗したときに
は(S404、N)、その状態で傾き判別処理を行い
(S409)、その判別結果に従って二値画像の傾きを
補正するため回転する(S410)。このように二値画
像の傾きを補正した状態で再度画像の方向を判別する
(S411)、判別の結果画像の方向が正規の向きあれ
ば(S412、Y)そのまま、正規の向きでなければ
(S412、N)、二値画像を正規の向きに回転して
(S413)傾き判別を行う(S414)。以上の処理
において補正を行った補正データ(角度データ)をメモ
リ上に保存しておき、このメモリ上に保存した補正デー
タに基づいて多値画像の回転処理を行い(S415)、
画像出力する(S416)。
FIG. 5 is a flow chart showing the processing of the second embodiment, and the processing procedure of the fourth embodiment will be described below with reference to FIG. First, a multi-valued image is input (S401). Next, a binary image copy image is created for the image (S402).
The original image is stored as an original image. The direction of the copied image is discriminated by the conventional method, for example (S403). As a result, the discrimination is successful (S404, Y), and the direction of the image is changed. If it is in the normal direction (Y in S405), it is not in the normal direction (S4).
05, N), the binary image is rotated in the normal orientation (S406), and then the inclination determination process is performed by a method already known in the related art (S407). The correction data (angle data) corrected in the above process is stored in the memory, and the stored multivalued input image is rotated based on the correction data stored in the memory (S408). )
It is output (S416). In the above processing, when the image orientation determination fails in step S404 (N in S404), the inclination determination processing is performed in that state (S409), and rotation is performed to correct the inclination of the binary image according to the determination result. Yes (S410). In this way, the orientation of the image is discriminated again with the inclination of the binary image corrected (S411). If the orientation of the image as a result of the discrimination is the normal orientation (S412, Y), it is not the normal orientation as it is ( (S412, N), the binary image is rotated in the normal direction (S413), and the tilt determination is performed (S414). The correction data (angle data) corrected in the above process is stored in the memory, and the multivalued image is rotated based on the correction data stored in the memory (S415).
An image is output (S416).

【0021】(請求項5に係る発明)本実施形態は、二
値化を行う際に傾き検出と文書方向判別するのに最適な
二値画像が異なることが考えられるため、それに対応す
る処理である。例えば文書方向を判別するには、文字認
識を使うことが有効であり、1例として前掲の特開20
00−113103号公報に開示された処理法では、文
字認識の精度が上がるような二値化が最適である。例え
ば200dpiカラー画像が入力されたとき、日本語な
どでは、400dpi相当に画像を拡大して文字認識を
かけたほうが、認識精度が向上することが分かってい
る。従って、文書方向判別を行うには、画像を拡大する
二値化が望ましい。また、画像の傾き判別に限ると、例
えば、前掲の特許第3187894号の明細書に開示さ
れた文書画像傾き検出方法のように、文字は認識せず、
その文字とおぼしき外接矩形を利用するものが多く、こ
れらの公知の検出方法を用いることができる。また、罫
線情報に着目した、例えば、特開平7−105310公
報に示された方法を利用することもできる。この方法で
は、例えば、図6に示すように、主走査方向罫線に着目
した主走査方向の黒ランの統合の際に、統合される主走
査方向の長い2本の黒ランLH1,LH2の始点または
終点のX座標を比較する。図6(a)に示すように、上
側の黒ランLH1の始点のX座標(xs1)と下側の黒ラ
ンLH2の始点のX座標(xs2)との関係が xs1<xs
2 ならば「右下がり」と判別し、また図6(b)に示す
ように 黒ランLH1の終点のX座標(xe1)と黒ラン
LH2の終点のX座標(xe2)が xe1>xe2 ならば
「右上がり」と判別する。そのいずれでもない場合に
は、傾きなしと判別する。この判別を、統合される黒ラ
ンの複数ペアについて行ない、例えば、各ペアの判別結
果の多数決により最終的な判別結果を決める。あるい
は、右下がり、右上がりのそれぞれの判別回数をカウン
トし、所定値に先に到達した傾き方向を最終的な判別結
果とするものである。また、傾きの角度θは、例えば、
注目した罫線の幅と黒画素とから罫線の太さ=黒画素数
/罫線の幅、を求め、注目した罫線の高さと前記罫線の
太さとから、罫線のずれ=罫線の高さ−罫線の太さを求
め、傾き角度θをtanθ=罫線のずれ/罫線の幅から求
めている。
(Invention of Claim 5) In the present embodiment, it is considered that the optimum binary image for detecting the skew and the document direction are different when performing the binarization. is there. For example, in order to determine the document direction, it is effective to use character recognition.
In the processing method disclosed in Japanese Unexamined Patent Application Publication No. 00-113103, binarization that increases the accuracy of character recognition is optimal. For example, when a 200 dpi color image is input, it has been known that in Japanese or the like, the recognition accuracy is improved by enlarging the image to 400 dpi and performing character recognition. Therefore, in order to discriminate the document orientation, binarization for enlarging the image is desirable. Further, as far as image tilt determination is concerned, for example, unlike the document image tilt detection method disclosed in the specification of Japanese Patent No. 3187894 mentioned above, characters are not recognized,
Many of them utilize the character and a possibly circumscribed rectangle, and these known detection methods can be used. Further, for example, the method shown in Japanese Patent Laid-Open No. 7-105310, which focuses on ruled line information, can be used. In this method, for example, as shown in FIG. 6, when the black runs in the main scanning direction are focused on the ruled lines in the main scanning direction, the start points of the two long black runs LH1 and LH2 to be integrated in the main scanning direction are integrated. Alternatively, the X coordinate of the end point is compared. As shown in FIG. 6A, the relationship between the X coordinate (xs1) of the starting point of the upper black run LH1 and the X coordinate (xs2) of the starting point of the lower black run LH2 is xs1 <xs.
If it is 2, it is determined to be “downward right”, and if the X coordinate (xe1) of the end point of the black run LH1 and the X coordinate (xe2) of the end point of the black run LH2 are xe1> xe2 as shown in FIG. 6B. It is determined to be "rightward". If none of the above, it is determined that there is no inclination. This determination is performed for a plurality of pairs of integrated black runs, and the final determination result is determined by, for example, a majority decision of the determination results of each pair. Alternatively, the number of times of discrimination of each of the downward sloping and the upward sloping is counted, and the inclination direction which has reached the predetermined value first is used as the final discrimination result. In addition, the inclination angle θ is, for example,
The thickness of the ruled line = the number of black pixels / the width of the ruled line is obtained from the width of the ruled line and the black pixel of interest, and from the height of the ruled line of interest and the thickness of the ruled line, the deviation of the ruled line = the height of the ruled line−the ruled line The thickness is obtained, and the inclination angle θ is obtained from tan θ = ruled line deviation / ruled line width.

【0022】ここで、画像傾き検出には、画像を拡大し
たりせず、逆に縮小して処理量を減らしたり、エッジ強
調をかけて、罫線がはっきり出るような二値化をする方
がより精度の高い検出が期待できる。請求項5に係る発
明の実施形態ではこの点を考慮して、それぞれ処理に適
した画像を作成し、それを認識にかけることで、画像方
向、画像傾きを検出し、オリジナルの多値画像に反映す
ることでオリジナル画像の画像方向、画像傾きをなくし
た画像を作成することが可能となる。図6は、本実施形
態の処理を説明するためのフローチャートを示す。多値
入力画像を準備し(S501)、該画像について方向判
別用の二値画像を複写画像を作成し(S502)かつ元
の多値入力画像はオリジナル画像として保存しておく、
この複写した二値画像について従来公知の方法によりそ
の方向判別処理を行い(S503)、その結果、判別が
成功し(S504、Y)、画像の方向が正規の向きであ
れば(S505、Y)そのまま、正規方向でなければ
(S505、N)二値画像を正規の向きにして回転処理
し(S506)、次に、傾き判別に適する二値化処理、
つまり傾き判別用二値化を行い(S507)、従来既に
知られた方法で傾き判別処理行う(S508)。以上の
処理において補正を行った補正データ(角度データ)を
メモリ上に保存しておき、このメモリ上に保存した補正
データに基づいて、保存したおいた多値入力画像を回転
処理して(S509)出力する(S519)。以上の処
理において、ステップS504において、判別に失敗し
たときには(S504、N)、傾き判別用二値化処理を
行い(510)、その状態で傾き判別処理を行う(S5
11)。その判別結果に従って二値画像の傾きを補正す
るため回転処理する(S512)。このように二値画像
の傾きを補正した状態で再度画像の方向を判別するため
方向判別用二値化処理を行い(S513)、方向判別処
理を行う(514)。判別の結果画像の方向が正規の向
きあれば(S515、Y)そのまま、正規の向きでなけ
れば(S515、N)、二値画像を正規の向きに回転し
て(S516)傾き判別を行う(S517)。以上の処
理において補正を行った補正データ(角度データ)をメ
モリ上に保存しておき、このメモリ上に保存した補正デ
ータに基づいて、多値画像の回転処理を行い(S51
8)、画像出力する(S519)。
Here, in detecting the image inclination, it is better not to enlarge the image but to reduce the processing amount by conversely reducing it, or to perform edge emphasis to perform binarization so that the ruled line appears clearly. Higher precision detection can be expected. In the embodiment of the invention according to claim 5, in consideration of this point, an image suitable for each process is created, and the image direction and the image inclination are detected by applying the images to the original multi-valued image. By reflecting it, it becomes possible to create an image in which the image direction and the image inclination of the original image are eliminated. FIG. 6 shows a flowchart for explaining the process of this embodiment. A multi-valued input image is prepared (S501), a binary image for discriminating the direction of the image is created as a copy image (S502), and the original multi-valued input image is stored as an original image.
The direction discrimination processing is performed on the copied binary image by a conventionally known method (S503). As a result, the discrimination is successful (S504, Y), and if the image direction is the normal orientation (S505, Y). As it is, if it is not the normal direction (S505, N), the binary image is rotated in the normal direction (S506), and then the binarization process suitable for the tilt determination,
That is, binarization for inclination determination is performed (S507), and inclination determination processing is performed by a method already known in the related art (S508). The correction data (angle data) corrected in the above process is stored in the memory, and the stored multivalued input image is rotated based on the correction data stored in this memory (S509). ) Output (S519). In the above process, if the determination fails in step S504 (N in S504), the binarization process for tilt determination is performed (510), and the tilt determination process is performed in that state (S5).
11). According to the result of the determination, rotation processing is performed to correct the inclination of the binary image (S512). In this way, in the state where the inclination of the binary image is corrected, the direction discrimination binarization process is performed again to discriminate the direction of the image (S513), and the direction discrimination process is performed (514). As a result of the discrimination, if the direction of the image is the normal direction (S515, Y), and if it is not the normal direction (S515, N), the binary image is rotated to the normal direction (S516) and the inclination judgment is performed (S516). S517). The correction data (angle data) corrected in the above processing is stored in the memory, and the multivalued image rotation processing is performed based on the correction data stored in this memory (S51).
8) The image is output (S519).

【0023】[0023]

【発明の効果】請求項1に対応する効果; 正規の方向
でなくしかも傾いた画像を精度よく補正できるため、O
CRで文字を読み取るときやユーザーが文書画像を閲覧
する際などにおいて、画像の方向や傾きを正しく補正す
ることで識字の精度を上げたり或いは見たときに不自然
でなく違和感ない画像を得ることができる。 請求項2に対応する効果; 画像の方向の最初の判別に
失敗しても、画像の傾きを補正してから再度画像の方向
を判別することで、画像の判別が可能になる。 請求項3に対応する効果; 画像の傾きを画像判別後に
再度行うことで画像の正しい傾斜補正を行うことができ
る。 請求項4に対応する効果; 原画像から作成した原画像
の方向及び傾き補正処理用二値画像を作成して、該画像
について画像の方向及び傾き補正処理を行い、その補正
データを用いて原画像の補正を行うため、微小角の回転
等により生じる画像劣化を防止して方向及び傾きを補正
した画像を得ることができる。 請求項5に対応する効果; 多値画像から二値画像を形
成する際に、画像の方向を補正するための第1の二値画
像と画像の傾きを補正するための第2の二値画像とをそ
れぞれ別々に作成して、第1の二値画像について画像の
方向を判別して補正を行い、第2の二値画像について傾
きを判別して補正を行い、それぞれの補正値で多値画像
の方向と傾きを補正するようにしたため、多値画像の方
向及び傾きの補正を、画像の劣化を伴うことなくしかも
高精度で行うことができる。 請求項6に対応する効果; 本発明の処理のためのプロ
グラムをコンピュータに読み取らせることで画像の方向
及び傾きを補正する処理を容易に実行することができ
る。 請求項7に対応する効果; 画像の方向及び傾きを補正
する処理を実行するためのプログラムを任意のコンピュ
ータにロードして前記処理を容易に実行することができ
る。 請求項8に対応する効果; 本発明の処理のためのプロ
グラムを読み取る、その処理手順に従い、入力した画像
の方向及び傾きを補正し、請求項1乃至5に対応した効
果を実現することができる。
The effect corresponding to claim 1; since it is possible to accurately correct an image which is not in the normal direction and is inclined, O
When reading characters with CR or when a user browses a document image, correct the direction and tilt of the image to improve literacy accuracy or obtain an image that is not unnatural and unnatural when viewed. You can Effect corresponding to claim 2 Even if the initial determination of the image direction fails, the image can be determined by correcting the inclination of the image and then determining the image direction again. Effect corresponding to claim 3; Correct inclination correction of an image can be performed by performing the inclination of the image again after the image determination. Effect corresponding to claim 4; A binary image for orientation and tilt correction processing of an original image created from an original image is created, image orientation and tilt correction processing is performed on the image, and the original data is used by using the correction data. Since the image is corrected, it is possible to obtain the image in which the direction and the inclination are corrected by preventing the image deterioration caused by the rotation of the minute angle and the like. Effect corresponding to claim 5; When forming a binary image from a multivalued image, a first binary image for correcting the orientation of the image and a second binary image for correcting the inclination of the image. And are created separately, the direction of the image is determined for the first binary image and correction is performed, and the inclination is determined for the second binary image and correction is performed, and multivalued with each correction value. Since the direction and the tilt of the image are corrected, the correction of the direction and the tilt of the multi-valued image can be performed with high accuracy without deterioration of the image. Effect corresponding to claim 6; By causing a computer to read the program for the processing of the present invention, the processing for correcting the direction and inclination of the image can be easily executed. Effect corresponding to claim 7: The program for executing the process of correcting the direction and the inclination of the image can be loaded into any computer to easily execute the process. Effect corresponding to claim 8: A program for processing of the present invention is read, the direction and inclination of an input image are corrected according to the processing procedure, and the effect corresponding to claims 1 to 5 can be realized. .

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

【図1】 本発明の実施形態に係る画像処理装置の構成
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to an embodiment of the present invention.

【図2】 本発明の実施形態による画像の方向及び傾き
を補正する処理のフロー図である。
FIG. 2 is a flow chart of a process for correcting the direction and inclination of an image according to the embodiment of the present invention.

【図3】 本発明の他の実施形態による画像の方向及び
傾きを補正する処理のフロー図である。
FIG. 3 is a flowchart of a process for correcting the direction and inclination of an image according to another embodiment of the present invention.

【図4】 本発明の他の実施形態による画像の方向及び
傾きを補正する処理のフロー図である。
FIG. 4 is a flowchart of a process for correcting the direction and inclination of an image according to another embodiment of the present invention.

【図5】 本発明の他の実施形態による画像の方向及び
傾きを補正する処理のフロー図である。
FIG. 5 is a flow chart of a process for correcting the direction and inclination of an image according to another embodiment of the present invention.

【図6】 画像の傾き判別方法の1例を説明するための
図である。
FIG. 6 is a diagram for explaining an example of an image inclination determination method.

【図7】 本発明の他の実施形態による画像の方向及び
傾きを補正する処理のフロー図である。
FIG. 7 is a flowchart of a process for correcting the direction and inclination of an image according to another embodiment of the present invention.

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

100…記録媒体(CD−ROM)、101…スキャ
ナ、102…CPU、103…メモリ、104…ディス
プレイ、105…CD−ROM/FDドライブ、106
…ワークエリアRAM、107…プログラム格納ROM
/RAM、108・・・印字装置。
100 ... Recording medium (CD-ROM), 101 ... Scanner, 102 ... CPU, 103 ... Memory, 104 ... Display, 105 ... CD-ROM / FD drive, 106
... work area RAM, 107 ... program storage ROM
/ RAM, 108 ... Printing device.

フロントページの続き Fターム(参考) 5B057 AA11 BA02 CA02 CA06 CA08 CA12 CA16 CB02 CB06 CB12 CB16 CC01 CD03 CE12 DA17 DB02 DB05 DB08 DC08 DC22 DC36 5C076 AA24 BA06 5L096 AA07 FA67 MA03 Continued front page    F term (reference) 5B057 AA11 BA02 CA02 CA06 CA08                       CA12 CA16 CB02 CB06 CB12                       CB16 CC01 CD03 CE12 DA17                       DB02 DB05 DB08 DC08 DC22                       DC36                 5C076 AA24 BA06                 5L096 AA07 FA67 MA03

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 入力された二値画像の方向を検出し、該
画像を正規の方向へ回転し、正規方向に回転された前記
画像の傾きを検出し、検出した傾きに応じて傾きを補正
する、各工程を有することを特徴とする画像処理方法。
1. A direction of an input binary image is detected, the image is rotated in a normal direction, an inclination of the image rotated in the normal direction is detected, and the inclination is corrected according to the detected inclination. An image processing method comprising the steps of:
【請求項2】 請求項1に記載された画像処理方法にお
いて、入力された二値画像の方向が検出できないとき
は、まず前記画像の傾きを検出し、検出した傾きに応じ
て前記画像の傾きを補正し、その後2度目の画像方向の
検出を行い、前記画像を正規方向へ回転する、各工程を
有することを特徴とする画像処理方法。
2. The image processing method according to claim 1, wherein when the direction of the input binary image cannot be detected, the inclination of the image is first detected, and the inclination of the image is detected according to the detected inclination. Is corrected, then the image direction is detected for the second time, and the image is rotated in the normal direction.
【請求項3】 請求項2に記載された画像処理方法にお
いて、前記2度目の画像方向の検出に基づき前記画像を
正規方向へ回転し、その後2度目の画像の傾き検出を行
い、検出した傾きに応じて前記画像の傾きを補正する、
各工程を有することを特徴とする画像処理方法。
3. The image processing method according to claim 2, wherein the image is rotated in the normal direction based on the detection of the image direction of the second time, and thereafter the inclination of the image of the second time is detected, and the detected inclination is detected. Corrects the inclination of the image according to
An image processing method comprising each step.
【請求項4】 入力した画像から画像の方向及び傾き補
正処理用二値画像を形成し、該補正処理用二値画像につ
いて請求項1乃至3のいずれかに記載された画像処理方
法に基づき正規方向への回転及び傾き補正を行い、該補
正データをメモリに保存し、該補正データに基づき前記
入力した画像の方向および傾きを補正処理する、各工程
を有することを特徴とする画像処理方法。
4. A binary image for image direction and tilt correction processing is formed from an input image, and the binary image for correction processing is normalized based on the image processing method according to claim 1. An image processing method comprising: performing rotation and tilt correction in a direction, storing the correction data in a memory, and correcting the direction and tilt of the input image based on the correction data.
【請求項5】 多値画像から画像方向検出のための第1
の二値画像及び画像の傾き検出のための第2の二値化画
像を形成し、請求項1乃至3のいずれかに記載された画
像処理方法に基づき、第1の二値画像についての画像の
正規方向への回転及び第2の二値画像についての傾き補
正を行い、それぞれの補正データをメモリに保存し、該
補正データに基づき前記多値画像の正規方向への回転及
び傾き補正を行う、各工程を有することを特徴とする画
像処理方法。
5. A first for image direction detection from a multi-valued image
Image of the first binary image based on the image processing method according to any one of claims 1 to 3, wherein the second binary image for detecting the inclination of the image and the second binary image for detecting the inclination of the image are formed. Rotation in the normal direction and inclination correction for the second binary image are performed, each correction data is stored in the memory, and rotation and inclination correction of the multi-valued image in the normal direction are performed based on the correction data. And an image processing method including each step.
【請求項6】 請求項1乃至5のいずれかに記載された
画像処理方法における各工程の処理を実行するためのプ
ログラム。
6. A program for executing processing of each step in the image processing method according to claim 1. Description:
【請求項7】 請求項6に記載されたプログラムを記録
したコンピュータ読取可能な記録媒体。
7. A computer-readable recording medium in which the program according to claim 6 is recorded.
【請求項8】 画像入力手段、請求項6に記載されたプ
ログラムを格納する手段、及び前記プログラムに基づき
入力画像の正規方向への回転及び傾き補正処理を実行す
る画像処理制御手段、を有することを特徴とする画像処
理装置。
8. An image input means, a means for storing the program according to claim 6, and an image processing control means for executing rotation and inclination correction processing of an input image in a normal direction based on the program. An image processing device characterized by:
JP2002057528A 2002-03-04 2002-03-04 Image processing apparatus, image processing method, program, and recording medium Expired - Fee Related JP3915974B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002057528A JP3915974B2 (en) 2002-03-04 2002-03-04 Image processing apparatus, image processing method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002057528A JP3915974B2 (en) 2002-03-04 2002-03-04 Image processing apparatus, image processing method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2003259111A true JP2003259111A (en) 2003-09-12
JP3915974B2 JP3915974B2 (en) 2007-05-16

Family

ID=28667763

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002057528A Expired - Fee Related JP3915974B2 (en) 2002-03-04 2002-03-04 Image processing apparatus, image processing method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP3915974B2 (en)

Also Published As

Publication number Publication date
JP3915974B2 (en) 2007-05-16

Similar Documents

Publication Publication Date Title
JP4631133B2 (en) Apparatus, method and recording medium for character recognition processing
US7636483B2 (en) Code type determining method and code boundary detecting method
US8139897B2 (en) Detecting tilt in an image having different resolutions in different directions
JPH11313207A (en) Method for deciding tilt angle of document image
JPH118755A (en) Method for scanning and detecting many photographs and removing artificial edge
US6771842B1 (en) Document image skew detection method
JP2001358925A (en) Unit and method for image processing and recording medium
JP4419269B2 (en) Two-dimensional code extraction method
JPH05250409A (en) High-speed detection for page direction
JPH1139428A (en) Direction correcting method for document video
JP3698136B2 (en) Image processing apparatus and image processing program
JP2011008549A (en) Image processor, image reader, multifunctional machine, image processing method, program, and recording medium
US7961941B2 (en) Color form dropout using dynamic geometric solid thresholding
JP2006019893A (en) Image distortion correcting device, image reader, image forming apparatus, program, and storage medium
JP2007189577A (en) Computer program, image input apparatus, image input system and image input method
JP3915974B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP2010287178A (en) Image processing device, image reading apparatus, multifunction machine, image processing method, program and recording medium
JPH06203202A (en) Image processor
JP2005234845A (en) Image processor, image processing method, character recognition device, program and recording medium
CN112800824A (en) Processing method, device and equipment for scanning file and storage medium
JPH11288453A (en) Method and system for detecting skew angle and black boundary line of original image in scan environment for reproduction
JP3709991B2 (en) Score recognition device
JPH04276888A (en) Character reader
JP2004241827A (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP2007328652A (en) Image processing device and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041005

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060727

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060817

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061016

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070109

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070131

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070131

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110216

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120216

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130216

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130216

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140216

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees