JPH0991376A - Image data input processing method and its device - Google Patents

Image data input processing method and its device

Info

Publication number
JPH0991376A
JPH0991376A JP7247644A JP24764495A JPH0991376A JP H0991376 A JPH0991376 A JP H0991376A JP 7247644 A JP7247644 A JP 7247644A JP 24764495 A JP24764495 A JP 24764495A JP H0991376 A JPH0991376 A JP H0991376A
Authority
JP
Japan
Prior art keywords
image data
horizontal ruled
processing block
ruled lines
ruled line
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
JP7247644A
Other languages
Japanese (ja)
Other versions
JP3311551B2 (en
Inventor
Osamu Nakamura
修 中村
Kimitomo Kobayashi
公知 小林
Sueki Matsumura
季樹 松村
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP24764495A priority Critical patent/JP3311551B2/en
Publication of JPH0991376A publication Critical patent/JPH0991376A/en
Application granted granted Critical
Publication of JP3311551B2 publication Critical patent/JP3311551B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To correct the slanting and zigzagging of input image data by correcting the tilt of image data in an area encircled with reference ruled lines according to a corresponding estimated tilt angle. SOLUTION: An area division processing block 101 divides image data inputted from a scanner or a FAX by the prescribed number of divisions. A tilt angle estimation processing block 102 detects lateral ruled lines and estimates the tilt angle of the detected ruled lines as to the respective image data areas divided by the area division processing block 101. A rotation center coordinate estimation processing block 103 calculates correction reference coordinates for correcting the slanting and zigzagging in two modes according to the estimated tilt angle of the reference lateral ruled lines detected from adjacent divided areas. A rotation correction processing block 104 performs correction processing on the basis of the processing mode decision result of the rotation center coordinate estimation processing block 103. Consequently, the slanting and meandering of the input image data can precisely be corrected.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、スキャナやファク
シミリから帳票等をイメージデータとして入力する処理
に関し、特に、罫線枠を配置した帳票を入力する場合の
傾斜や蛇行を補正することによって、後の文字認識のた
めの文字イメージデータの切り出しの高精度化を実現す
るようにしたイメージデータ入力処理方法およびその装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a process of inputting a form or the like as image data from a scanner or a facsimile, and more particularly, by correcting inclination and meandering when inputting a form in which ruled line frames are arranged. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image data input processing method and an apparatus for realizing high-precision cutting of character image data for character recognition.

【0002】[0002]

【従来の技術】スキャナやFAXから入力された文字イ
メージデータを、テキストデータとして計算機が処理可
能な文字コードへ変換するための文字認識技術は、人手
による文字入力稼働を削減する点で有用な技術と考えら
れている。
2. Description of the Related Art A character recognition technique for converting character image data input from a scanner or FAX into a character code that can be processed by a computer as text data is a useful technique for reducing manual character input operation. It is believed that.

【0003】文字認識技術では、予め学習させた文字パ
タンとの類似性によって、入力された文字イメージデー
タがいずれの文字であるかを識別することを処理の基本
としている。従って、入力イメージデータ中の文字領域
を正確に切り出すことが、精度良く文字認識を行うため
の第一条件となる。
In the character recognition technology, the basic processing is to identify which character the input character image data is, based on the similarity with the previously learned character pattern. Therefore, accurately cutting out the character area in the input image data is the first condition for performing character recognition with high accuracy.

【0004】文字領域を切り出すための技術は大別して
2つの方法に分類される。第一の方法は、予め文字位置
に関する情報(書式情報)を定義しておき、文字切り出
しをこの書式定義情報に従って行う方法である。第二の
方法は、書式情報を一切使用せずに任意に配置された文
字領域を切り出す方法である。
Techniques for cutting out a character area are roughly classified into two methods. The first method is a method in which information on character positions (format information) is defined in advance and character cutting is performed according to this format definition information. The second method is a method of cutting out an arbitrarily arranged character area without using any format information.

【0005】これらの内、第二の方法は最終的な目標と
なる理想の方法ではあるが技術的に解決困難な問題が多
いため、もっぱら第一の方法に基づく文字切り出し方法
が考案されてきた。
Of these methods, the second method is an ideal method as a final goal, but there are many problems that are technically difficult to solve. Therefore, a character cutting method based on the first method has been devised. .

【0006】書式定義情報を利用する第一の方法では、
入力された帳票イメージデータがいずれの帳票形式であ
るかを識別する技術、あるいは、予め定義した書式と合
致しているかを判定する技術が重要となる。
[0006] In the first method using the format definition information,
It is important to identify which form the input form image data has, or to determine whether the form image data matches the predefined form.

【0007】従来、これらのために、帳票上に識別マー
クを印刷しておく方法が用いられてきたが、帳票上のス
ペース使用効率が悪い、マークの印刷に特別な技術が必
要等の問題があった。そこで、特別な識別マークを使用
せずに、帳票中の罫線を検出することにより書式識別を
行う方法が有効と考えられてきた。
Conventionally, for these reasons, a method of printing an identification mark on a form has been used. However, there are problems such as inefficient use of space on the form and a special technique for printing the mark. there were. Therefore, it has been considered effective to use a method of performing format identification by detecting a ruled line in a form without using a special identification mark.

【0008】[0008]

【発明が解決しようとする課題】上述のとおり正確な文
字切り出しを行うための書式識別のために、帳票中の罫
線を用いる方法が有望であるが、この方法では基準とす
る縦または横方向に設けられた罫線を正確に検出できる
ことが条件となる。一般にスキャナやFAXから入力さ
れたイメージデータは傾斜したり蛇行している場合が多
く、この場合には正しく罫線の検出を行うことができな
いという問題があった。
As described above, a method of using ruled lines in a form is promising for format identification for accurate character cut-out. However, in this method, the ruled lines in the reference vertical or horizontal direction are used. The condition is that the ruled line provided can be accurately detected. In general, image data input from a scanner or FAX is often inclined or meandering, and in this case, there is a problem that ruled lines cannot be detected correctly.

【0009】本発明は上記事情に鑑みてなされたもの
で、その目的とするところは、従来の技術における上述
の如き問題を解消し、入力イメージデータの傾斜や蛇行
を補正することが可能なイメージデータ入力処理方法お
よびその装置を提供することにある。
The present invention has been made in view of the above circumstances. An object of the present invention is to solve the above-mentioned problems in the prior art and to correct an inclination or meandering of input image data. A data input processing method and an apparatus therefor are provided.

【0010】[0010]

【課題を解決するための手段】本発明は、罫線枠を配置
した帳票イメージデータを入力する処理において、副走
査方向を1個以上の領域に分割し、各分割領域において
最長の横罫線の検出および該横罫線の傾斜角度を推定し
この横罫線を基準横罫線とし、隣接する2本の基準横罫
線が平行でない場合には、これらの基準横罫線を延長し
て交差する点を回転中心座標とし、これらの2本の基準
横罫線に挟まれる領域のイメージデータを回転中心座標
を基準として水平に位置補正を行う処理を全分割領域に
対して繰り返し、隣接する2本の基準横罫線が平行な場
合には、これら2本の基準横罫線によって挟まれる領域
のイメージデータを対応する推定傾斜角度に基づき傾斜
の補正を行う処理を全分割領域に対して繰り返すことを
特徴としている。
According to the present invention, in the process of inputting form image data in which ruled line frames are arranged, the sub-scanning direction is divided into one or more areas, and the longest horizontal ruled line is detected in each divided area. And the inclination angle of the horizontal ruled line is estimated, and this horizontal ruled line is used as a reference horizontal ruled line. When two adjacent reference horizontal ruled lines are not parallel, the reference horizontal ruled line is extended and the intersection point is defined as the center of rotation coordinates. Then, the process of horizontally correcting the position of the image data of the area sandwiched between these two reference horizontal ruled lines is repeated for all the divided areas, and two adjacent reference horizontal ruled lines are parallel to each other. In this case, the process of correcting the inclination of the image data of the area sandwiched by these two reference horizontal ruled lines based on the corresponding estimated inclination angle is repeated for all the divided areas.

【0011】本発明においては、スキャナやFAXから
入力されたイメージデータの傾斜や蛇行を精度良く補正
することが可能となり、記入枠等の罫線検出に基づく書
式識別ならびに文字イメージデータの切り出しの高精度
化を実現することができる。
According to the present invention, it is possible to accurately correct the inclination and meandering of the image data input from the scanner or FAX, and it is possible to perform the format identification based on the ruled line detection of the entry frame and the cutout of the character image data with high accuracy. Can be realized.

【0012】[0012]

【発明の実施の形態】以下、図面を用いて本発明の実施
例を説明する。図1は、本発明の一実施例に係わるイメ
ージデータ入力処理方法および装置の処理ブロック図で
ある。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a processing block diagram of an image data input processing method and apparatus according to an embodiment of the present invention.

【0013】図において、101は入力イメージデータ
を分割する領域分割処理ブロック、102は分割した各
イメージデータにおいて包含する横罫線の検出および傾
斜角度を推定する傾斜角度推定処理ブロック、103は
隣接する分割領域で検出された横罫線の推定傾斜角度か
らこれらの横罫線の延長上の交差点すなわちイメージデ
ータの蛇行発生時における回転中心座標を算出する回転
中心座標推定処理ブロック、104は回転中心座標を基
準にイメージデータ中の画素の位置を補正する回転補正
処理ブロックである。
In the figure, 101 is an area dividing processing block for dividing input image data, 102 is an inclination angle estimating processing block for detecting a horizontal ruled line included in each divided image data and estimating an inclination angle, and 103 is an adjacent division. A rotation center coordinate estimation processing block for calculating a rotation center coordinate when an intersection of these horizontal ruled lines, that is, a meandering of image data from the estimated inclination angle of the horizontal ruled line detected in the area, 104 is based on the rotation center coordinate. It is a rotation correction processing block that corrects the position of a pixel in image data.

【0014】これらの処理ブロックによる、入力イメー
ジデータの傾斜ならびに蛇行を補正する手順を以下に説
明する。領域分割処理ブロック101は、スキャナまた
はFAXから入力されたイメージデータを既定の分割数
nに分割する。分割する方向は、分割境界がイメージデ
ータの主走査方向(横方向)となる方向である。このイ
メージデータ領域の分割は、横罫線をその長さに依らず
イメージデータ中全面に渡って不足なく検出することを
目的に行う。
The procedure for correcting the inclination and meandering of the input image data by these processing blocks will be described below. The area division processing block 101 divides image data input from a scanner or a FAX into a predetermined division number n. The dividing direction is a direction in which the dividing boundary is the main scanning direction (horizontal direction) of the image data. This division of the image data area is carried out for the purpose of detecting the horizontal ruled lines over the entire surface of the image data without any shortage, regardless of the length thereof.

【0015】すなわち、領域分割を行わずに全領域を対
象として既定の長さ以上の横罫線の検出を行う方法で
は、例えばイメージデータの上端付近に比較的長い横罫
線が集中しイメージデータ下端付近に比較的短い横罫線
が集中した場合には、上端付近の横罫線のみが検出さ
れ、イメージデータの傾斜や蛇行の状況を正しく推定す
ることができないという問題が生じるためである。
That is, in the method of detecting horizontal ruled lines having a predetermined length or more for all regions without performing region division, for example, relatively long horizontal ruled lines are concentrated near the upper end of the image data and near the lower end of the image data. This is because, when relatively short horizontal ruled lines are concentrated on, only the horizontal ruled lines near the upper end are detected, and it is impossible to correctly estimate the inclination or meandering condition of the image data.

【0016】傾斜角度推定処理ブロック102では、領
域分割処理ブロック101で分割した各イメージデータ
領域について横罫線の検出および検出罫線の傾斜角度の
推定を行う。横罫線の検出および傾斜角度の推定に当た
っては、例えば、横罫線の検出は、一定方向に連続する
黒画素の追跡や、黒画素分布のピークを検出するなどの
方法により実現できる。また、傾斜角度の推定は、検出
した横罫線の連続方向の推定や、黒画素との距離分布が
最大となる平行線の推定などの方法により実現できる。
これらの具体的な実施例については、後に図3を用いて
詳細に説明する。
The inclination angle estimation processing block 102 detects horizontal ruled lines and estimates the inclination angle of the detected ruled lines for each image data area divided by the area division processing block 101. In detecting the horizontal ruled line and estimating the inclination angle, for example, the detection of the horizontal ruled line can be realized by a method of tracking black pixels continuous in a certain direction or detecting a peak of the black pixel distribution. Further, the inclination angle can be estimated by a method such as estimating the continuous direction of the detected horizontal ruled line or estimating a parallel line that maximizes the distance distribution to the black pixel.
Specific examples of these will be described later in detail with reference to FIG.

【0017】傾斜角度推定処理ブロック102では、各
分割領域における最大長の横罫線を選択し、最終的にこ
の最大長の横罫線の傾斜角度を推定傾斜角度とする。
尚、以降の説明においてはこの選択された横罫線を基準
横罫線と呼ぶことにする。
In the inclination angle estimation processing block 102, the maximum length horizontal ruled line in each divided area is selected, and finally the inclination angle of this maximum length horizontal ruled line is set as the estimated inclination angle.
In the following description, this selected horizontal ruled line will be referred to as a reference horizontal ruled line.

【0018】回転中心座標推定処理ブロック103で
は、隣接する分割領域から検出された基準横罫線の推定
傾斜角度に応じて2つの処理モードで傾斜および蛇行を
補正するための補正基準座標を算出する。
The rotation center coordinate estimation processing block 103 calculates corrected reference coordinates for correcting inclination and meandering in two processing modes according to the estimated inclination angle of the reference horizontal ruled line detected from the adjacent divided areas.

【0019】まず第1の処理モードは、隣接する2つの
分割領域の基準横罫線が平行な場合の処理モードであ
る。この場合には、回転中心座標推定処理ブロック10
3は2本の基準横罫線で囲まれたイメージデータが単純
に傾斜していると判断する。
First, the first processing mode is a processing mode in which the reference horizontal ruled lines of two adjacent divided areas are parallel to each other. In this case, the rotation center coordinate estimation processing block 10
In No. 3, it is determined that the image data surrounded by the two reference horizontal ruled lines is simply inclined.

【0020】第2の処理モードは、隣接する2つの分割
領域の基準横罫線が平行でない場合の処理モードであ
る。この場合には、回転中心座標推定処理ブロック10
3は2本の基準横罫線で囲まれたイメージデータが蛇行
していると判断し、これら2本の基準横罫線を延長して
交差する点の座標を回転中心座標として算出する。
The second processing mode is a processing mode when the reference horizontal ruled lines of two adjacent divided areas are not parallel. In this case, the rotation center coordinate estimation processing block 10
In No. 3, it is determined that the image data surrounded by the two reference horizontal ruled lines meanders, and the coordinates of the intersection of the two reference horizontal ruled lines are calculated as the rotation center coordinates.

【0021】回転補正処理ブロック104では、回転中
心座標推定処理ブロック103での処理モード判定結果
に基づき以下の補正処理を行う。まず、着目する基準横
罫線間のイメージデータが単純に傾斜していた場合に
は、推定傾斜角度に基づき傾斜の補正を行う。ここでは
傾斜補正の具体的な方法については説明を省略するが、
例えば任意の1点を中心に補正対象となるイメージデー
タを傾斜とは逆方向に推定傾斜角度だけ回転させる方法
などによって実現できる。
The rotation correction processing block 104 performs the following correction processing based on the processing mode determination result in the rotation center coordinate estimation processing block 103. First, when the image data between the reference horizontal ruled lines of interest is simply inclined, the inclination is corrected based on the estimated inclination angle. Although a description of a specific method of tilt correction is omitted here,
For example, it can be realized by a method of rotating the image data to be corrected around an arbitrary point by the estimated tilt angle in the direction opposite to the tilt.

【0022】また、着目する基準横罫線間のイメージデ
ータが蛇行していた場合には、回転中心座標推定処理ブ
ロック103によって推定した回転中心座標を中心とし
て、補正対象イメージデータ中の各画素の座標によって
定まる回転角度で、蛇行すなわち着目座標の画素の回転
とは逆方向へ回転させることにより補正を行う。尚、こ
の蛇行の補正方法については、後に図5および図6を用
いて詳細に説明する。
If the image data between the reference horizontal ruled lines of interest meanders, the coordinates of each pixel in the correction target image data are centered on the rotation center coordinates estimated by the rotation center coordinate estimation processing block 103. The correction is performed by rotating in a direction opposite to the meandering, that is, the rotation of the pixel of the coordinate of interest, at a rotation angle determined by. The method of correcting the meandering will be described later in detail with reference to FIGS. 5 and 6.

【0023】図2は、図1に示した領域分割処理ブロッ
ク101によって行う入力イメージデータの領域分割の
模様を具体的に説明するための図面である。図2におい
て、201は、入力イメージデータ全体を示している。
一般に、FAX等から入力される入力イメージデータ2
01の横方向は主走査方向と呼ばれ、縦方向は副走査方
向と呼ばれる。図2中のnは分割数を表し、任意に設定
可能な数値である。例えば、nの値として、4〜10程
度の数値を指定することで、入力イメージデータの全領
域から万遍なく横罫線を検出という領域分割の目的を達
成することができる。
FIG. 2 is a diagram for specifically explaining the pattern of the area division of the input image data performed by the area division processing block 101 shown in FIG. In FIG. 2, 201 shows the entire input image data.
Generally, input image data 2 input from FAX etc.
The horizontal direction of 01 is called the main scanning direction, and the vertical direction is called the sub scanning direction. N in FIG. 2 represents the number of divisions and is a numerical value that can be set arbitrarily. For example, by specifying a numerical value of about 4 to 10 as the value of n, it is possible to achieve the purpose of area division of detecting horizontal ruled lines from all areas of the input image data.

【0024】図3は、図1で示した傾斜角度推定処理ブ
ロック102を詳細に説明するためのサブ処理ブロック
図面である。図3において、301は横罫線検出を行う
サブ処理ブロック、302は最長横罫線を選択するため
のサブ処理ブロック、303は最長横罫線上の2点の座
標を抽出するためのサブ処理ブロック、304は最長横
罫線上の2点の座標からtanθの値を計算するための
サブ処理ブロックである。
FIG. 3 is a sub-process block diagram for explaining the tilt angle estimation process block 102 shown in FIG. 1 in detail. In FIG. 3, 301 is a sub-processing block for detecting horizontal ruled lines, 302 is a sub-processing block for selecting the longest horizontal ruled line, 303 is a sub-processing block for extracting the coordinates of two points on the longest horizontal ruled line, 304 Is a sub-processing block for calculating the value of tan θ from the coordinates of two points on the longest horizontal ruled line.

【0025】以下図3を用いて、分割対象領域に対する
傾斜角度推定を行う具体的な方法の一例を説明する。横
罫線検出サブ処理ブロック301では、対象分割領域中
に含まれる横罫線の検出を行う。横罫線の検出には各種
の方法を用いることができ、例えば、一定方向に連続す
る黒画素を探索し既定の長さ以上の連なりを横罫線とす
る方法や、種々の傾斜を持たせた基準とする罫線に対し
て垂直距離が等しくなる黒画素数の分布をとり、それら
の分布の中で最大の画素数分布を示す部分を横罫線とす
るなどの方法により実現できる。
An example of a specific method for estimating the tilt angle with respect to the division target area will be described below with reference to FIG. The horizontal ruled line detection sub-processing block 301 detects horizontal ruled lines included in the target divided area. Various methods can be used to detect the horizontal ruled lines. For example, a method of searching for black pixels continuous in a certain direction and using a continuous ruled line longer than a predetermined length as the horizontal ruled line, or a reference with various slopes is used. It can be realized by taking a distribution of the number of black pixels having the same vertical distance with respect to the ruled line and defining the portion showing the maximum pixel number distribution among these distributions as the horizontal ruled line.

【0026】サブ処理ブロック302では、サブ処理ブ
ロック301で検出された横罫線の内、各検出罫線の方
向において最長となる横罫線を選択する。サブ処理ブロ
ック303では、検出した最長横罫線上の任意の2点の
座標を抽出する。これは、直線上の2点から、その直線
の傾斜角度を推定するための処理である。サブ処理ブロ
ック304では、抽出した最長横罫線上の2点の座標か
らtanθの値を算出する。このtanθの値は、傾斜
角度と等価な意味を持ち、後の傾斜補正や蛇行補正に使
用する。
In the sub processing block 302, the horizontal ruled line that is the longest in the direction of each detected ruled line is selected from the horizontal ruled lines detected in the sub processing block 301. In the sub processing block 303, the coordinates of any two points on the detected longest horizontal ruled line are extracted. This is a process for estimating the inclination angle of the straight line from two points on the straight line. In the sub processing block 304, the value of tan θ is calculated from the coordinates of the two points on the extracted longest horizontal ruled line. The value of tan θ has the same meaning as the tilt angle and is used for tilt correction and meandering correction later.

【0027】図4は、図1で示した回転中心座標推定処
理ブロック103による回転中心座標の推定の原理を説
明するための図面である。尚、図4では、隣接する基準
横罫線が全て平行ではなく、入力イメージデータが蛇行
している場合の例を示している。
FIG. 4 is a diagram for explaining the principle of the rotation center coordinate estimation by the rotation center coordinate estimation processing block 103 shown in FIG. Note that FIG. 4 shows an example in which all the adjacent reference horizontal ruled lines are not parallel and the input image data meanders.

【0028】図4において、401〜403は第1〜第
3までの分割領域から検出された基準横罫線、404と
405とは、罫線401と罫線402とからおよび罫線
402と罫線403とからそれぞれ推定された回転中心
点を示している。補正対象領域1は基準横罫線402の
延長線から入力イメージデータ201の上端までの全領
域であり、補正対象領域2は基準横罫線402と403
との延長線で囲まれた領域である。補正対象領域の設定
の方法は、入力イメージデータが単純に傾斜している場
合と蛇行の場合とで同様である。
In FIG. 4, reference numerals 401 to 403 are reference horizontal ruled lines detected from the first to third divided areas, 404 and 405 are ruled lines 401 and 402, and ruled lines 402 and 403, respectively. The estimated rotation center point is shown. The correction target area 1 is the entire area from the extension of the reference horizontal ruled line 402 to the upper end of the input image data 201, and the correction target area 2 is the reference horizontal ruled lines 402 and 403.
It is the area surrounded by the extension line with. The method of setting the correction target area is the same when the input image data is simply inclined and when it is meandering.

【0029】図4に示したとおり、まず回転中心点は隣
接する基準横罫線を延長して交差する点として算出する
ことができる。また、隣接する基準横罫線が平行で補正
対象領域が単純に傾斜している場合には、着目する補正
対象領域内のイメージデータが全て一様な傾斜角度で傾
斜していると考えることができる。
As shown in FIG. 4, first, the rotation center point can be calculated as a point where the adjacent reference horizontal ruled lines are extended and intersect. If adjacent reference horizontal ruled lines are parallel and the correction target area is simply tilted, it can be considered that all the image data in the correction target area of interest are tilted at a uniform tilt angle. .

【0030】補正対象領域は、図4の例のように回転中
心点404については入力イメージデータの上端から基
準横罫線402の延長線までの領域を、回転中心点40
5については基準横罫線402と403との延長線で囲
まれた領域を設定する。
As for the correction target area, as shown in the example of FIG. 4, for the rotation center point 404, the area from the upper end of the input image data to the extension line of the reference horizontal ruled line 402 is the rotation center point 40.
For 5, an area surrounded by an extension of the reference horizontal ruled lines 402 and 403 is set.

【0031】図5は、図1で示した回転補正処理ブロッ
ク104による回転補正の具体的な手順を説明するため
の図面である。図5中の501は補正の基準とする副走
査方向アドレスを決定するサブ処理ブロック、502は
補正アドレスを決定するサブ処理ブロック、503は補
正後の座標へ対象黒画素を移動するサブ処理ブロックで
ある。尚、図5は、1つの回転中心点(図5では原点O
n)に基づく蛇行補正の手順例を示している。
FIG. 5 is a drawing for explaining a specific procedure of rotation correction by the rotation correction processing block 104 shown in FIG. In FIG. 5, reference numeral 501 is a sub-processing block that determines the sub-scanning direction address that is the reference for correction, 502 is a sub-processing block that determines the correction address, and 503 is a sub-processing block that moves the target black pixel to the corrected coordinates. is there. Note that FIG. 5 shows one rotation center point (origin O in FIG. 5).
The procedure example of the meandering correction based on n) is shown.

【0032】以下に図5を用いて回転補正の具体的な手
順を説明する。サブ処理ブロック501では、補正対象
とする画素と原点Onとを結ぶ直線上にある入力イメー
ジデータの右端または左端の画素のY座標(Ey)を算
出する。サブ処理ブロック502では、原点Onの座標
(Ox,Oy)と、補正対象画素の座標(Px,P
y)、およびEyから、蛇行補正後の座標(Xc,Y
c)を算出する。実際の算出式は、例えば原点Onが入
力イメージデータの右側にある場合には、式(1) ,(2)
のとおりである。
A specific procedure for rotation correction will be described below with reference to FIG. In the sub-processing block 501, the Y coordinate (Ey) of the pixel at the right end or the left end of the input image data on the straight line connecting the pixel to be corrected and the origin On is calculated. In the sub processing block 502, the coordinates (Ox, Oy) of the origin On and the coordinates (Px, P) of the pixel to be corrected are set.
y) and Ey, the coordinates after the meandering correction (Xc, Y
c) is calculated. The actual calculation formulas are, for example, formulas (1) and (2) when the origin On is on the right side of the input image data.
It is as follows.

【0033】 Xc=Px+(Ox−Px)−((Ox−Px)2 +(Oy−Py)2 1/2 ・・・式(1) Yc=Ey ・・・式(2) 算出サブ処理ブロック503では、補正対象の画素を補
正後の座標へ移動する。
Xc = Px + (Ox−Px) − ((Ox−Px) 2 + (Oy−Py) 2 ) 1/2 Equation (1) Yc = Ey Equation (2) Calculation sub-processing In block 503, the pixel to be corrected is moved to the corrected coordinates.

【0034】図6は、図5で示した回転補正の原理を説
明する図面である。図6中、601は原点On、602
は入力イメージデータの右端、603〜605は補正対
象の画素と原点Onとを結ぶ直線の例を示している。図
6では、中央の矢印から上方の図が補正前の画素の例
を、中央の矢印から下方の図が補正後の画素の例を示し
ている。また、中央矢印より上方の図の画素の例では、
説明を簡便にするため、直線603、604上の画素と
右端の画素以外の記述を省略している。
FIG. 6 is a diagram for explaining the principle of the rotation correction shown in FIG. In FIG. 6, 601 is the origin On, 602
Shows the right end of the input image data, and 603 to 605 show examples of straight lines connecting the pixel to be corrected and the origin On. In FIG. 6, a diagram above the center arrow shows an example of pixels before correction, and a diagram below the center arrow shows an example of pixels after correction. Also, in the example of the pixel in the figure above the central arrow,
For simplification of description, description of pixels other than the pixels on the straight lines 603 and 604 and the rightmost pixel is omitted.

【0035】以下に、直線603上の画素を補正対象と
した場合の回転補正の手順を説明する。まず、補正対象
とする直線603上の画素の補正後のY座標は全て、直
線602と603とが交差する点のY座標とする。補正
後のX座標については、前記の式(1) を用いて算出す
る。
The procedure of rotation correction when the pixels on the straight line 603 are to be corrected will be described below. First, all the corrected Y coordinates of the pixels on the straight line 603 to be corrected are the Y coordinates of the points where the straight lines 602 and 603 intersect. The corrected X coordinate is calculated using the above equation (1).

【0036】図6の例では、直線603上の画素が直線
604上の位置へ補正される。図6の中央の矢印より下
部の画素は、上記の直線603上の画素の補正に相当す
る処理を繰り返した場合の補正後の画素の様子を示して
いる。つまり、図6の例では、原点Onと、イメージデ
ータ右端602上に縦方向に並ぶ画素とを結ぶ直線の延
長上に存在する画素の補正を順次行い、補正後の画素を
積み上げていくことで蛇行補正を行うことができる。
In the example of FIG. 6, the pixels on the straight line 603 are corrected to the positions on the straight line 604. Pixels below the central arrow in FIG. 6 show the state of the corrected pixels when the processing corresponding to the correction of the pixels on the straight line 603 is repeated. That is, in the example of FIG. 6, the pixels existing on the extension of the straight line connecting the origin On and the pixels lined up in the vertical direction on the right end 602 of the image data are sequentially corrected, and the corrected pixels are accumulated. The meandering correction can be performed.

【0037】[0037]

【発明の効果】以上、詳細に説明した如く、本発明によ
れば、スキャナやFAXから入力されたイメージデータ
について、包含する横罫線の検出、これら横罫線の傾斜
角度の推定、および蛇行の回転中心座標の推定を行い、
これらの推定結果より、入力イメージデータの傾斜や蛇
行を精度良く補正することが可能なイメージデータ入力
処理方法およびその装置を実現できるという顕著な効果
を奏するものである。
As described above in detail, according to the present invention, the horizontal ruled lines included in the image data input from the scanner or the FAX are detected, the inclination angles of these horizontal ruled lines are estimated, and the meandering rotation is performed. Estimate the center coordinates,
From these estimation results, it is possible to realize the image data input processing method and device capable of accurately correcting the inclination and meandering of the input image data.

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

【図1】イメージデータ入力処理方法および装置の処理
ブロックを説明する図である。
FIG. 1 is a diagram illustrating a processing block of an image data input processing method and apparatus.

【図2】入力イメージデータの領域分割の模様を具体的
に説明するための図である。
FIG. 2 is a diagram for specifically explaining a pattern of area division of input image data.

【図3】傾斜角度推定処理ブロック102を詳細に説明
するための図である。
FIG. 3 is a diagram for explaining a tilt angle estimation processing block 102 in detail.

【図4】回転中心座標の推定の原理を説明する図であ
る。
FIG. 4 is a diagram illustrating the principle of estimation of rotation center coordinates.

【図5】回転補正の具体的な手順を説明するための図で
ある。
FIG. 5 is a diagram for explaining a specific procedure of rotation correction.

【図6】回転補正の原理を説明するための図である。FIG. 6 is a diagram for explaining the principle of rotation correction.

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

101 領域分割処理ブロック 102 傾斜角度推定処理ブロック 103 回転中心座標推定処理ブロック 104 回転補正処理ブロック 201 入力イメージデータ 301 横罫線検出サブ処理ブロック 302 最長横罫線を選択するサブ処理ブロック 303 最長横罫線上の2点の座標を抽出するサブ処理
ブロック 304 tanθの値を計算するサブ処理ブロック 401〜403 検出された基準横罫線 404〜405 回転中心点 501 基準副走査方向アドレスを決定するサブ処理ブ
ロック 502 補正対象画素の主走査・副走査方向の補正座標
を決定するサブ処理ブロック 503 補正座標へ画素を移動するサブ処理ブロック 601 回転中心点 602 入力イメージデータ右端 603〜605 原点Onと入力イメージデータ右端の
画素を結んだ直線
101 area division processing block 102 inclination angle estimation processing block 103 rotation center coordinate estimation processing block 104 rotation correction processing block 201 input image data 301 horizontal ruled line detection sub-processing block 302 sub-processing block for selecting the longest horizontal ruled line 303 on the longest horizontal ruled line Sub-processing block for extracting the coordinates of two points 304 Sub-processing block for calculating the value of tan θ 401-403 Detected reference horizontal ruled lines 404-405 Rotation center point 501 Sub-processing block for determining reference sub-scanning direction address 502 Correction target Sub-processing block 503 for determining correction coordinates in the main scanning / sub-scanning direction of a pixel Sub-processing block for moving pixels to correction coordinates 601 Rotation center point 602 Input image data right end 603 to 605 Origin On and input image data right end pixel Do it straight

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 罫線枠を配置した帳票イメージデータを
入力する処理において、 副走査方向を1個以上の領域に分割し、 各分割領域において最長の横罫線の検出および該横罫線
の傾斜角度を推定しこの横罫線を基準横罫線とし、 隣接する2本の基準横罫線が平行でない場合には、これ
らの基準横罫線を延長して交差する点を回転中心座標と
し、これらの2本の基準横罫線に挟まれる領域のイメー
ジデータを回転中心座標を基準として水平に位置補正を
行う処理を全分割領域に対して繰り返し、 隣接する2本の基準横罫線が平行な場合には、これら2
本の基準横罫線によって挟まれる領域のイメージデータ
を対応する推定傾斜角度に基づき傾斜の補正を行う処理
を全分割領域に対して繰り返すことを特徴とするイメー
ジデータ入力処理方法。
1. In a process of inputting form image data in which a ruled line frame is arranged, the sub-scanning direction is divided into one or more regions, and the longest horizontal ruled line is detected in each divided region and the inclination angle of the horizontal ruled line is determined. Estimate this horizontal ruled line as the reference horizontal ruled line, and if two adjacent reference horizontal ruled lines are not parallel, extend the reference horizontal ruled lines and set the intersecting point as the center of rotation coordinates, and use these two reference rules. The process of horizontally correcting the image data of the area sandwiched by the horizontal ruled lines with respect to the center of rotation coordinates is repeated for all the divided areas, and when two adjacent reference horizontal ruled lines are parallel, these two
An image data input processing method, wherein the process of correcting the inclination of image data in an area sandwiched by reference horizontal ruled lines of a book based on a corresponding estimated inclination angle is repeated for all divided areas.
【請求項2】 罫線枠を配置した帳票イメージデータを
入力する装置において、 副走査方向を1個以上の領域に分割し、 各分割領域において最長の横罫線の検出および該横罫線
の傾斜角度を推定しこの横罫線を基準横罫線とする手段
と、 隣接する2本の基準横罫線が平行でない場合には、これ
らの基準横罫線を延長して交差する点を回転中心座標と
し、これらの2本の基準横罫線に挟まれる領域のイメー
ジデータを回転中心座標を基準として水平に位置補正を
行う処理を全分割領域に対して繰り返す手段と、 隣接する2本の基準横罫線が平行な場合には、これら2
本の基準横罫線によって挟まれる領域のイメージデータ
を対応する推定傾斜角度に基づき傾斜の補正を行う処理
を全分割領域に対して繰り返す手段とを備えることを特
徴とするイメージデータ入力処理装置。
2. A device for inputting form image data in which a ruled line frame is arranged, divides the sub-scanning direction into one or more areas, and detects the longest horizontal ruled line and the inclination angle of the horizontal ruled line in each divided area. If the means for estimating this horizontal ruled line as the reference horizontal ruled line and two adjacent reference horizontal ruled lines are not parallel to each other, extend the reference horizontal ruled line and set the intersecting point as the rotation center coordinate, and When the image data of the area sandwiched by the reference horizontal ruled lines of the book is horizontally corrected with respect to the rotation center coordinates for all the divided areas, and when two adjacent reference horizontal ruled lines are parallel to each other. These two
An image data input processing apparatus comprising: a unit that repeats a process of correcting inclination of image data in an area sandwiched by reference horizontal ruled lines of a book based on a corresponding estimated inclination angle for all divided areas.
JP24764495A 1995-09-26 1995-09-26 Image data input processing method and apparatus Expired - Lifetime JP3311551B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24764495A JP3311551B2 (en) 1995-09-26 1995-09-26 Image data input processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24764495A JP3311551B2 (en) 1995-09-26 1995-09-26 Image data input processing method and apparatus

Publications (2)

Publication Number Publication Date
JPH0991376A true JPH0991376A (en) 1997-04-04
JP3311551B2 JP3311551B2 (en) 2002-08-05

Family

ID=17166567

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24764495A Expired - Lifetime JP3311551B2 (en) 1995-09-26 1995-09-26 Image data input processing method and apparatus

Country Status (1)

Country Link
JP (1) JP3311551B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014048731A (en) * 2012-08-29 2014-03-17 Fujitsu Frontech Ltd Character recognition device, program and method
US9848104B1 (en) 2016-06-17 2017-12-19 Pfu Limited Image-processing apparatus, method, and computer program product for correcting skew in scanned images

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014048731A (en) * 2012-08-29 2014-03-17 Fujitsu Frontech Ltd Character recognition device, program and method
US9848104B1 (en) 2016-06-17 2017-12-19 Pfu Limited Image-processing apparatus, method, and computer program product for correcting skew in scanned images

Also Published As

Publication number Publication date
JP3311551B2 (en) 2002-08-05

Similar Documents

Publication Publication Date Title
CN111474184B (en) AOI character defect detection method and device based on industrial machine vision
CN106251341B (en) Printing quality detection method
JPH03144863A (en) Detecting method and correcting method for inclination of picture and picture information processor
JP4114959B2 (en) Image processing method and apparatus
JPH03257304A (en) Position recognizing apparatus
JPH08287184A (en) Picture cutting-out device and character recognition device
EP2536123B1 (en) Image processing method and image processing apparatus
JP2002228423A (en) Tire detecting method and device
JP2000251082A (en) Document image inclination detecting device
Pan et al. An efficient method for skew correction of license plate
JPH08320990A (en) Vehicle number reader
JPH0991376A (en) Image data input processing method and its device
JP3321936B2 (en) Moving object detection device
JPH06311333A (en) Picture processing unit
JPH07220081A (en) Segmenting method for graphic of image recognizing device
JP2007323440A (en) Image processing method, image processing program, storage medium recording the image processing program, and image processor
JPH08210811A (en) Method and device for detecting circle or ellipse
JP4141754B2 (en) Image processing apparatus, image processing method, program for causing computer to execute the method, and computer-readable recording medium storing the program
JPH06281421A (en) Image processing method
WO2023068034A1 (en) Image processing device
JP5006250B2 (en) Image correction apparatus, image correction method, image correction program, and recording medium
JPH09179982A (en) Specific pattern detecting method
JPH06215181A (en) Character/character string segmenting method and character recognizing device
JP2000251075A (en) Method and device for processing image and recording medium
JP2982221B2 (en) Character reader

Legal Events

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

Free format text: PAYMENT UNTIL: 20090524

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090524

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100524

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100524

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110524

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120524

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130524

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20140524

Year of fee payment: 12

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term