JP3304404B2 - Tilt detection method and image processing device - Google Patents

Tilt detection method and image processing device

Info

Publication number
JP3304404B2
JP3304404B2 JP20476792A JP20476792A JP3304404B2 JP 3304404 B2 JP3304404 B2 JP 3304404B2 JP 20476792 A JP20476792 A JP 20476792A JP 20476792 A JP20476792 A JP 20476792A JP 3304404 B2 JP3304404 B2 JP 3304404B2
Authority
JP
Japan
Prior art keywords
binary image
moment
linear
straight line
run
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP20476792A
Other languages
Japanese (ja)
Other versions
JPH0652309A (en
Inventor
昌史 古賀
好博 嶋
勝美 丸川
和樹 中島
清道 栗野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP20476792A priority Critical patent/JP3304404B2/en
Publication of JPH0652309A publication Critical patent/JPH0652309A/en
Application granted granted Critical
Publication of JP3304404B2 publication Critical patent/JP3304404B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】光ディスクを用いた文書ファイリ
ングシステム等の画像処理装置に係り、入力された画像
の傾きを検出するのに好適な傾き検出方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus such as a document filing system using an optical disk, and to a tilt detection method suitable for detecting a tilt of an input image.

【0002】[0002]

【従来の技術】光ディスクを用いた文書ファイリングシ
ステムが製品化され、大量の文書をイメージデータで保
存・検索できるようになった。また、多量のテキストデ
ータを高速に検索する技術が開発されている。このよう
に、紙に替わって電子的な手法で高度な文書情報の利用
ができる環境が整いつつある。一方、文書システムの大
容量化に伴い、文書の登録により多くの人手が費やされ
るようになってきた。このため、文書中の文字を認識
し、自動的にシステムに登録する技術が不可欠になって
きている。
2. Description of the Related Art A document filing system using an optical disk has been commercialized, and a large amount of documents can be stored and retrieved with image data. Also, a technique for searching a large amount of text data at high speed has been developed. As described above, an environment in which advanced document information can be used by an electronic method instead of paper is being prepared. On the other hand, with the increase in the capacity of the document system, a large amount of manpower has been used for document registration. For this reason, a technology for recognizing characters in a document and automatically registering the characters in a system has become indispensable.

【0003】文書中には罫線、囲み枠、割り罫、アンダ
ーラインなど様々な黒線が用いられる。こうした黒線を
含む文書中の文字を認識するためには、文書中の黒線を
検出し、黒線の位置、傾きなどの情報用いて文字行を切
り出さなくてはならない。しかし、文書画像中の黒線は
しばしば傾いている場合がある。自動紙送り装置を用い
てスキャナ入力を行う場合、原稿のずれに伴う文書画像
の傾きは±10度以内といわれている。このような場合
に対応するため、傾いた画像から黒線を抽出し、抽出し
た黒線の傾きを算出することが必要とされている。
Various black lines such as ruled lines, enclosing frames, split rules, and underlines are used in a document. In order to recognize a character in a document including such a black line, it is necessary to detect the black line in the document and cut out a character line using information such as the position and inclination of the black line. However, a black line in a document image is often inclined. When scanner input is performed using an automatic paper feeder, it is said that the inclination of a document image due to a shift of a document is within ± 10 degrees. In order to cope with such a case, it is necessary to extract a black line from the inclined image and calculate the inclination of the extracted black line.

【0004】検出した黒線の傾きを算出する従来技術と
して、(a) 端点あてはめ法、(b)反復端点あてはめ法
(R.Nevatia ”MACHINE PERCEPTION”(日本語訳 南
敏監訳”画像認識と画像理解” 啓学出版) pp. 120
- 164 (昭和61年))、(c)ハフ変換による方式
(松山、興水 ”Hough変換とパターンマッチン
グ” 情報処理Vol. 30 No. 9 (平成1年))、等
がある。
Conventional techniques for calculating the slope of the detected black line include (a) an end point fitting method and (b) an iterative end point fitting method (R. Nevatia "MACHINE PERCEPTION"). Understanding ”Keigaku Shuppan) pp. 120
-164 (Showa 61)), (c) Hough transform method (Matsuyama, Kosui "Hough transform and pattern matching" Information Processing Vol. 30 No. 9 (Heisei 1)), and the like.

【0005】このうち(a)は、黒線の端点を結ぶ直線で
黒線を近似し、傾きを求める方式である。この方式は処
理量が少なく、また多くの記憶容量を必要としない。し
かし、画像にノイズやジャギー(画像の縁のぎざぎざ)
がある場合には高い精度が得られない。
[0005] Among them, (a) is a method in which a black line is approximated by a straight line connecting end points of the black line, and a slope is obtained. This method requires a small amount of processing and does not require a large storage capacity. However, noise or jaggies (jaggies at the edges of the image)
In some cases, high accuracy cannot be obtained.

【0006】(b)は、与えられた曲線の2端点を線分に
より結び、この直線から最も遠くにある点まで距離があ
る値以上の場合には線分を二つに分割する。さらに分割
された線分に対して同様の処理を繰り返す、処理は線分
からある値以上に遠くにあるものがなくなった時点で終
了する。これにより黒線の輪郭を区分的な線分により近
似し、傾きを求めることができる。しかしこの方式は、
直線から点への距離の計算を画素毎に反復する必要があ
り、高速化が困難である。また、折れ線を表現するため
に、多くの記憶容量を必要とする。
In (b), two end points of a given curve are connected by a line segment, and when the distance to a point farthest from the straight line is equal to or more than a certain value, the line segment is divided into two. Further, the same processing is repeated for the divided line segments. The process ends when there are no objects farther than a certain value from the line segments. Thereby, the contour of the black line can be approximated by a segmental line segment, and the inclination can be obtained. However, this method
It is necessary to repeat the calculation of the distance from the straight line to the point for each pixel, and it is difficult to increase the speed. In addition, a large storage capacity is required to represent a polygonal line.

【0007】(c)は画像中の任意の点の座標から直線へ
変換する写像を求め、黒画素の写像の直線の集積点を求
めることにより、画像中から直線の傾きを検出するもの
である。この方式は(a、b)平面を表現するのに多くの記
憶容量を必要とし、また、集積点を求めるのに多くの処
理時間が必要である。
(C) finds a mapping for converting a coordinate of an arbitrary point in the image into a straight line, and finds an accumulation point of the straight lines of the mapping of the black pixels, thereby detecting the inclination of the straight line from the image. . This method requires a large amount of storage capacity to represent the (a, b) plane, and requires a large amount of processing time to find an integration point.

【0008】[0008]

【発明が解決しようとする課題】従来の文書画像中の黒
線などの傾き検出方式のうち、(a)の端点あてはめ法は
は精度が高くない。また、(b)の反復端点あてはめ法、
(c)ハフ変換による方式は、処理速度が遅いという問題
点がある。
Among the conventional methods for detecting the inclination of a black line or the like in a document image, the end point fitting method (a) is not high in accuracy. Also, the iterative end point fitting method of (b),
(c) The method using the Hough transform has a problem that the processing speed is slow.

【0009】そこで、本発明の目的は、2値画像中の図
形を高速、高精度に直線近似し、傾きを検出することが
できる画像の傾き検出方法及び画像処理装置を提供する
ことにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an image inclination detecting method and an image processing apparatus which can approximate a figure in a binary image at high speed with high accuracy and detect the inclination.

【0010】[0010]

【課題を解決するための手段】本発明は、入力された2
値画像を符号化し、符号化された2値画像データより2
値画像中の所定の図形を抽出し、抽出された所定の図形
の傾きを最小二乗法による直線近似により求めることを
特徴とするものである。
SUMMARY OF THE INVENTION According to the present invention, there is provided a system comprising:
Encodes the value image, and calculates 2 from the encoded binary image data.
A predetermined figure in a value image is extracted, and a slope of the extracted predetermined figure is obtained by linear approximation using a least squares method.

【0011】特に、ランデータ符号化、輪郭データ符号
化等の画像の符号化方式を利用し、高速に2値画像中の
図形の最小二次モーメントを計算し、直線近似を行うこ
とにより実現する。
In particular, it is realized by calculating the minimum second moment of a figure in a binary image at a high speed and performing linear approximation by using an image coding method such as run data coding and contour data coding. .

【0012】[0012]

【作用】最小二乗法による直線近似を画像処理に適用す
ることにより、2値画像中の所定の図形を高速、高精度
に直線近似し、傾きを検出することができる。
By applying the linear approximation by the least squares method to image processing, a predetermined figure in a binary image can be linearly approximated with high speed and high accuracy, and the inclination can be detected.

【0013】特に、ある図形中のランの直線に対する二
次モーメントはランの中点の座標とラン長の多項式によ
って表現できる。この多項式の値を最小にする係数を求
めることにより、その図形を近似する直線の傾きを得
る。また同様に輪郭データの輪郭長と輪郭方向を用いて
最小二次モーメントを計算することができる。ランデー
タ、輪郭データなどに符号化したデータにより最小二次
モーメントを計算する方式は、画素データを用いる方式
に比べてメモリへのアクセス回数や計算回数が少なくな
り、高速に2値画像中の図形の直線近似を求めることが
できるため、画素数が多い対象物に対して有効ある。
In particular, the second moment with respect to a straight line of a run in a certain figure can be represented by a coordinate of the midpoint of the run and a polynomial of the run length. By obtaining a coefficient that minimizes the value of the polynomial, the slope of a straight line that approximates the figure is obtained. Similarly, the minimum second moment can be calculated using the contour length and the contour direction of the contour data. The method of calculating the minimum second moment using data encoded as run data, contour data, etc. reduces the number of times of access to the memory and the number of calculations compared to the method using pixel data, so that figures in a binary image can be displayed at high speed. Can be obtained, which is effective for an object having a large number of pixels.

【0014】尚、最小二乗法による直線近似自体は、統
計数学等の分野では知られた手法であるが、画像処理の
分野における傾き検出に適用した例はなく、(a)端点あ
てはめ法よりも精度が高く、(b)反復端点あてはめ法、
(c)ハフ変換による方式などに比べて、多くの記憶容量
を必要としない。また、多くの画素を処理する場合で
も、ランデータ、輪郭データを活用すれば処理速度の点
でも問題がない。
Although the straight line approximation itself by the least square method is a known method in the field of statistical mathematics and the like, there is no example in which it is applied to inclination detection in the field of image processing. High accuracy, (b) iterative endpoint fitting,
(c) It does not require a large storage capacity as compared with the Hough transform method. Further, even when processing a large number of pixels, there is no problem in terms of processing speed if run data and contour data are utilized.

【0015】[0015]

【実施例】図1は、黒線の傾き検出を用いた文書画像か
らの文字行抽出の原理を説明する図である。図1(a)に
示すように文書画像101がスキャナより傾いて入力さ
れたり、文書中の罫線102および文字列103が傾い
て印刷される場合がある。これらの場合のように、文書
中の傾いた文字を認識するためにはまず文書中の文字行
の位置を検出する必要がある。一般に文字行の検出には
文書縦方向および横方向の大きな空白の探索により行な
う。
FIG. 1 is a diagram for explaining the principle of extracting a character line from a document image by detecting the inclination of a black line. As shown in FIG. 1A, there is a case where the document image 101 is input by being tilted from the scanner, or the ruled line 102 and the character string 103 in the document are printed while being tilted. As in these cases, in order to recognize a tilted character in a document, it is necessary to first detect the position of a character line in the document. Generally, a character line is detected by searching for a large blank in the vertical and horizontal directions of the document.

【0016】しかし、文書画像自体が傾いている場合に
は、文書縦方向および横方向の大きな空白が良好に見つ
けられず、その文書画像から文字行を取り出すのが困難
である。また図1(a)に示すように、表や罫線が文字行
と混在していると空白を検出する妨げとなってしまうと
いう問題点がある。そこで、まず図1(b)に示すように
文書中から黒線を抽出し(図1(b)の例は横方向の黒線
104および105のみを検出している。)、次に図1
(c)に示すように抽出した文書中の端点座標106と1
07と黒線の傾き108を求め、傾きを補正すると共に
黒線を除去すると、図1(d)に示すように文字行座標1
09を検出することができる。
However, when the document image itself is inclined, large blanks in the vertical and horizontal directions of the document cannot be found well, and it is difficult to extract a character line from the document image. Further, as shown in FIG. 1A, there is a problem that if a table or a ruled line is mixed with a character line, it becomes difficult to detect a blank. Therefore, first, as shown in FIG. 1B, a black line is extracted from the document (only the horizontal black lines 104 and 105 are detected in the example of FIG. 1B), and then FIG.
The end point coordinates 106 and 1 in the extracted document as shown in FIG.
07 and the inclination 108 of the black line, the inclination is corrected, and the black line is removed. Then, as shown in FIG.
09 can be detected.

【0017】図2は黒線傾き検出を用いた文字認識の処
理手順を示す。まず、ステップ201においてスキャナ
などから文書画像を入力する。次にステップ202にお
いて黒線を抽出し、ステップ203において黒線の位置
と傾きを検出する。検出した黒線の位置と傾きを用いて
ステップ204において文書中の文字行を抽出し、ステ
ップ205において文字行中の文字を認識してステップ
206において文字コードを出力する。
FIG. 2 shows a procedure of character recognition using black line inclination detection. First, in step 201, a document image is input from a scanner or the like. Next, in step 202, a black line is extracted, and in step 203, the position and inclination of the black line are detected. A character line in the document is extracted in step 204 using the detected position and inclination of the black line, a character in the character line is recognized in step 205, and a character code is output in step 206.

【0018】本発明では、文書画像中の黒線などの2値
画像中の図形の傾きを検出する方式として最小二乗法に
よる直線近似を例に取り説明する。
In the present invention, a straight line approximation by the least squares method will be described as an example of a method for detecting the inclination of a figure in a binary image such as a black line in a document image.

【0019】図3は基本原理を説明する図である。画像
中のXY座標系は301のように定義する。文書中の横
罫線などX軸にほぼ平行な図形302に対し、点の集合
Aを
FIG. 3 is a diagram for explaining the basic principle. The XY coordinate system in the image is defined as 301. A set of points for a figure 302 substantially parallel to the X axis, such as a horizontal ruled line in a document
A

【0020】[0020]

【数1】 (Equation 1)

【0021】と定義した際にWhen defined as

【0022】[0022]

【数2】 (Equation 2)

【0023】の式で表す積分値Iを最小にする a、b
を求める。これは直線303
A, b which minimizes the integral value I expressed by the following equation:
Ask for. This is a straight line 303

【0024】[0024]

【数3】 (Equation 3)

【0025】周りの二次モーメントを最小とすることに
相当する。このように求められた直線303により図形
302の傾きを近似することができる。
This corresponds to minimizing the surrounding second moment. The inclination of the figure 302 can be approximated by the straight line 303 thus obtained.

【0026】図4は、第1の実施例である画素データに
よる二次モーメントの計算法を説明するものである。離
散化された画像においてXY座標系を401のように定
義する。この画像中の図形402に含まれる画素の集合
S'を
FIG. 4 illustrates a method of calculating a second moment based on pixel data according to the first embodiment. An XY coordinate system is defined as 401 in the discretized image. A set of pixels included in the figure 402 in this image
S '

【0027】[0027]

【数4】 (Equation 4)

【0028】とおくと、数1の I はIn other words, I in Equation 1 is

【0029】[0029]

【数5】 (Equation 5)

【0030】で表されるSで近似できる。数4はCan be approximated by S represented by Equation 4 is

【0031】[0031]

【数6】 (Equation 6)

【0032】と変形できる。ここで数6の各係数をIt can be modified as follows. Where each coefficient of Equation 6 is

【0033】[0033]

【数7】 (Equation 7)

【0034】とおけば数6はさらにThen, the number 6 is further increased

【0035】[0035]

【数8】 (Equation 8)

【0036】と変形できる。Sは a および b の二
次式で、かつ常に p > 0 かつr >0 なので最小値
が存在する。S を最小とする a および b の値は
以下の式数9に数7を代入して求めることができる。
It can be modified as follows. Since S is a quadratic expression of a and b, and always p> 0 and r> 0, there is a minimum value. The values of a and b that minimize S can be obtained by substituting equation 7 into equation 9 below.

【0037】[0037]

【数9】 (Equation 9)

【0038】図5は、第2の実施例である最小二次モー
メントのランデータを用いた計算方式の原理を説明する
図である。ランとは二値画像中である方向に連続した黒
または白の画素の集まりである。本明細書中では断りの
ないかぎり単にランという場合には横方向(X字句方
向)の黒画素のランのことである。図5中の黒く塗潰し
た部分502は画像中の一つのランを示している。
FIG. 5 is a diagram for explaining the principle of a calculation method using run data of the minimum second moment according to the second embodiment. A run is a group of black or white pixels that are continuous in a certain direction in a binary image. In this specification, unless otherwise noted, a simple run means a run of black pixels in the horizontal direction (X lexical direction). The portion 502 painted black in FIG. 5 indicates one run in the image.

【0039】図4の第1の実施例のように画素データを
用いると、画素数が多い場合に計算量が膨大なものとな
るが、図5のランデータを用いて計算を行った場合、画
像処理に二次モーメントの計算を行っても十分実用的な
計算量で済むという利点がある。
When the pixel data is used as in the first embodiment of FIG. 4, the amount of calculation becomes enormous when the number of pixels is large, but when the calculation is performed using the run data of FIG. There is an advantage that even if the second moment is calculated for the image processing, a sufficiently practical calculation amount is sufficient.

【0040】ここで、 Rj : ある図形に属するj番目のラン ( xj 、 yj ) : Rjの中点の座標 lj : Rjのラン長 N : ある図形に属するランの総数 とすると、数2はHere, Rj: the j-th run belonging to a certain figure (xj, yj): the coordinates of the middle point of Rj lj: the run length of Rj N: the total number of runs belonging to a certain figure

【0041】[0041]

【数10】 (Equation 10)

【0042】と置き換えることができる。Can be replaced by

【0043】以下、数10のI'を計算するとIn the following, I ′ of Equation 10 is calculated.

【0044】[0044]

【数11】 [Equation 11]

【0045】ここでWhere

【0046】[0046]

【数12】 (Equation 12)

【0047】とおくとI'は数8と同様にIn other words, I ′ is the same as

【0048】[0048]

【数13】 (Equation 13)

【0049】の時、最小となる。At this time, it becomes the minimum.

【0050】図6は、第3の実施例である輪郭データを
用いた傾き検出の原理を示す図である。第2の実施例同
様、画素数が多い場合に画像データを用いずに、十分実
用的な計算量で画像の二次モーメントの計算を行うもの
である。
FIG. 6 is a diagram showing the principle of inclination detection using contour data according to the third embodiment. As in the second embodiment, when the number of pixels is large, the second moment of the image is calculated with a sufficiently practical calculation amount without using image data.

【0051】二値画像中の黒画素から成る図形601に
対し、その図形に含まれなおかつ白画素に4近傍で接触
している画素を求め、これらの画素の隣り合うもの同士
の中心を結び、輪郭602とする。また図6に示す様に
輪郭602を折れ曲がる点riでN'個の線分Ci(1≦i≦N
c)に分割する。図6の603は折れ曲がる点riの例で
あり、604は、輪郭602を逆時計周りにたどった際
の603のとなりの折れ曲がる点である。線分Ciの方向
Diを図7に示すように定義する。図7のe0、e1等は、
各方向に対応するベクトルである。また、線分Ciの長さ
を画素の座標riとri+1を8近傍距離で表現したものを
(Li)とする。図6の例では605は603と604を
結ぶ線分であり、その長さがLi = 3であり、方向 D
i = 2 である。輪郭データとは、図形の輪郭Cをあら
わすLiとDiのいくつかの対である。なお、輪郭には内輪
郭と外輪郭があり、一つの連結成分は1つの外輪郭と0
個以上の内輪郭で表現されるが、図6に示す様に図形が
唯一の閉曲線で表される場合は内輪郭は0個となる。以
後、断りのないかぎり、図形は唯一の閉曲線で表される
ものとする。
With respect to the figure 601 composed of black pixels in the binary image, pixels which are included in the figure and which are in contact with the white pixels in the vicinity of 4 are obtained, and the centers of adjacent ones of these pixels are connected. The outline 602 is set. Also, as shown in FIG. 6, N ′ line segments Ci (1 ≦ i ≦ N
Divide into c). 603 in FIG. 6 is an example of a bend point ri, and 604 is a bend point next to 603 when the contour 602 is traced counterclockwise. The direction Di of the line segment Ci is defined as shown in FIG. E0, e1, etc. of FIG.
Vector corresponding to each direction. Also, the length of the line segment Ci expressed by the coordinates ri and ri + 1 of the pixel in the neighborhood distance of 8 is defined as (Li). In the example of FIG. 6, 605 is a line segment connecting 603 and 604, the length thereof is Li = 3, and the direction D
i = 2. The contour data is several pairs of Li and Di representing the contour C of the figure. Note that the contour has an inner contour and an outer contour, and one connected component is one outer contour and 0
Although the number of inner contours is represented by more than one, when the figure is represented by a single closed curve as shown in FIG. 6, the number of inner contours is zero. Hereinafter, unless otherwise noted, a figure is represented by a single closed curve.

【0052】最小二乗法による直線近似を行なうために
は数2の積分を図形中の全ての画素に対しておこなえば
よいが、輪郭データを用いてこの積分を行なうとその結
果はa および b の3次式となり、扱いが困難にな
り、処理量も増加する。そこで、簡略な方式として、図
形の外輪郭C上(図中の602)で数2の積分を行な
い、直線近似を行なう。
In order to perform a straight line approximation by the least squares method, the integral of Equation 2 may be performed for all pixels in the figure. When this integral is performed using contour data, the result is a and b. It becomes a cubic expression, handling becomes difficult, and the processing amount increases. Therefore, as a simple method, the integral of Equation 2 is performed on the outer contour C of the figure (602 in the figure), and linear approximation is performed.

【0053】以下にDiの値毎に線分Ci上での数2積分値
I"i の計算式および I" iをa およびを b に関
する多項式
In the following, for each value of Di, the integral value of Equation 2 on the line segment Ci
Formula of I "i and polynomial of I" i with a and b

【0054】[0054]

【数14】 [Equation 14]

【0055】とみなしたときの係数 pi、qi、ri、si、
ti、ui を示す。
Coefficients pi, qi, ri, si,
Indicates ti and ui.

【0056】(Di = 0)(Di = 0)

【0057】[0057]

【数15】 (Equation 15)

【0058】[0058]

【数16】 (Equation 16)

【0059】(Di = 1)(Di = 1)

【0060】[0060]

【数17】 [Equation 17]

【0061】[0061]

【数18】 (Equation 18)

【0062】(Di = 2)(Di = 2)

【0063】[0063]

【数19】 [Equation 19]

【0064】[0064]

【数20】 (Equation 20)

【0065】(Di = 3)(Di = 3)

【0066】[0066]

【数21】 (Equation 21)

【0067】[0067]

【数22】 (Equation 22)

【0068】(Di = 4)(Di = 4)

【0069】[0069]

【数23】 (Equation 23)

【0070】[0070]

【数24】 (Equation 24)

【0071】(Di = 5)(Di = 5)

【0072】[0072]

【数25】 (Equation 25)

【0073】[0073]

【数26】 (Equation 26)

【0074】(Di = 6)(Di = 6)

【0075】[0075]

【数27】 [Equation 27]

【0076】[0076]

【数28】 [Equation 28]

【0077】(Di = 7)(Di = 7)

【0078】[0078]

【数29】 (Equation 29)

【0079】[0079]

【数30】 [Equation 30]

【0080】ここでHere,

【0081】[0081]

【数31】 (Equation 31)

【0082】とし、これを次式And this is given by the following equation:

【0083】[0083]

【数32】 (Equation 32)

【0084】に代入すると、I" は輪郭線上(図6の6
02)の画素の直線l周りの二次モーメントとなる。数
32のI"を最小とする a、b の値は数13と同様に
Then, when I ″ is substituted into the contour (6 in FIG. 6)
02) is the second moment around the straight line l of the pixel. The values of a and b that minimize I ″ in Equation 32 are the same as in Equation 13.

【0085】[0085]

【数33】 [Equation 33]

【0086】である。Is as follows.

【0087】図8に黒線傾き検出の第1の実施例の具体
的な処理手順を示す。図8は画素データを用いる黒線傾
き検出である。図8に示されているのは、図1(b)の1
04、105のように入力画像から取り出した黒線に対
し、図1(c)に示すような直線近似をして端点の座標
及び傾きを求める過程の処理手順である。直線近似はス
テップ801のループの中で画像中の各連結成分毎に行
なわれる。まず、ステップ802においてp、q、r、s、
t等のパラメータを初期化する。次にステップ803の
ループにおいて連結成分に含まれる全ての黒画素の座標
xi、yiをもとめ、ステップ804において各画素毎に数
7に従って各パラメータを加算していく。ただし、数7
の各式のうち後の計算で用いないuは計算しない。連結
成分に含まれる全ての画素について加算し終わった後、
ステップ805において数9に従って傾きanとY接辺bn
(an、bnはそれぞれn番目の連結成分の傾きaとY切辺
b)をもとめる。
FIG. 8 shows a specific processing procedure of the first embodiment for detecting the inclination of the black line. FIG. 8 shows the detection of the inclination of the black line using the pixel data. FIG. 8 shows one of FIG. 1 (b).
This is a processing procedure of a process of obtaining end point coordinates and inclination by performing linear approximation as shown in FIG. The linear approximation is performed for each connected component in the image in the loop of step 801. First, in step 802, p, q, r, s,
Initialize parameters such as t. Next, in the loop of step 803, coordinates of all black pixels included in the connected component
xi and yi are obtained, and in step 804, each parameter is added according to Equation 7 for each pixel. Where Equation 7
U, which is not used in the subsequent calculations, is not calculated. After adding all the pixels included in the connected component,
In step 805, the gradient an and the Y tangent bn are calculated according to Equation 9.
(An and bn are the slope a and Y intercept, respectively, of the nth connected component
b).

【0088】図9に黒線傾き検出の第2の実施例の具体
的な処理手順を示す。図9はランを用いる黒線傾き検出
である。図9に示されているのは、図8と同様に、図1
(b)のように入力画像から取り出した黒線に対し、図
1(c)に示すような直線近似をして傾きを求める過程
の処理手順である。直線近似はステップ901のループ
の中で画像中の各連結成分毎に行なわれる。まず、ステ
ップ902においてp、q、r、s、t等のパラメータを初
期化する。次にステップ903のループにおいて連結成
分に含まれる全ての黒ランの中点座標xi、yiと黒ラン長
liを求め、ステップ904において連結成分に含まれる
全てのラン毎に数12に従って各パラメータを加算して
いく。ただし、後の計算で用いないuは計算しない。連
結成分に含まれる全てのランについて加算し終わった
後、ステップ905において数13に従って傾きanとY
接辺bnをもとめる。
FIG. 9 shows a specific processing procedure of the second embodiment for detecting the inclination of the black line. FIG. 9 shows a black line inclination detection using a run. FIG. 9 shows, like FIG. 8, FIG.
This is a processing procedure of a process of obtaining a slope by performing a linear approximation as shown in FIG. 1C with respect to a black line extracted from an input image as shown in FIG. The linear approximation is performed for each connected component in the image in the loop of step 901. First, in step 902, parameters such as p, q, r, s, and t are initialized. Next, in the loop of step 903, the midpoint coordinates xi, yi and the black run length of all the black runs included in the connected component
li is obtained, and in step 904, each parameter is added according to Equation 12 for every run included in the connected component. However, u which is not used in later calculations is not calculated. After adding all the runs included in the connected component, in step 905, the gradients an and Y according to Expression 13 are calculated.
Find the tangent bn.

【0089】図10、図11に黒線傾き検出の第3の実
施例の具体的な処理手順を示す。図10は輪郭を用いる
黒線傾き検出である。図10、図11に示されているの
は、図8、9と同様に、図1(b)のように入力画像か
ら取り出した黒線に対し、図1(c)に示すような直線
近似をして傾きを求める過程の処理手順である。直線近
似はステップ1001のループ中で画像中の各連結成分
毎に行なわれる。まず、ステップ1002において各連
結成分の輪郭データを生成する。次にステップ1003
においてp、q、r、s、t等のパラメータを初期化する。
次にステップ1004のループにおいて輪郭データを形
成する輪郭の方向(Di)と長さLiを求め、ステップ1
005においてDiに応じてサブルーチン1006、1
007、1008、1009、1010、1011、1
012、1013に分岐する。図11の1101、11
02、1103、1104、1105、1106、11
07に示すように、サブルーチン1006、1007、
1008、1009、1010、1011、1012、
1013ではそれぞれ数16、数18、数20、数2
2、数24、数26、数28、数30に従って各パラメ
ータを加算していく。ただし、後の計算で用いないuは
計算しない。連結成分に含まれる全ての輪郭データにつ
いて加算し終わった後、ステップ1014において数3
3に従って傾きanとY接辺bnをもとめる。上記の例は輪
郭データを8方向で表現したものであるが、より少ない
数の方向で簡略化して傾きanとY接辺bnをもとめること
もできる。例えば輪郭を反時計周りに定義している場合
には輪郭線の下側が黒画素ならば方向Diは1、2、3のい
ずれかの場合である場合が多く、その他の場合を無視す
ることができる。そこでこのような場合には、Diの値
が1、2、3のいずれかならばステップ1005の分岐を
行い、そうでないならば無視して輪郭データを形成する
次の線分についてステップ1004以下の処理を行うこ
ともできる。この方式においても得られるa、bの値の誤
差は無視しうるものである一方、処理時間を大幅に短縮
することができる。
FIGS. 10 and 11 show a specific processing procedure of the third embodiment for detecting the inclination of the black line. FIG. 10 shows the detection of the inclination of the black line using the contour. FIGS. 10 and 11 show a linear approximation as shown in FIG. 1C with respect to a black line extracted from the input image as shown in FIG. Is a processing procedure of a process of obtaining an inclination by performing the following. The linear approximation is performed for each connected component in the image in the loop of step 1001. First, in step 1002, contour data of each connected component is generated. Next, step 1003
Initializes parameters such as p, q, r, s, and t.
Next, in the loop of step 1004, the direction (Di) and length Li of the contour forming the contour data are obtained, and step 1 is executed.
At 005, the subroutine 1006, 1
007, 1008, 1009, 1010, 1011, 1
The process branches to 012 and 1013. 1101, 11 in FIG.
02, 1103, 1104, 1105, 1106, 11
07, subroutines 1006, 1007,
1008, 1009, 1010, 1011, 1012,
In 1013, Equation 16, Equation 18, Equation 20, and Equation 2 respectively
Each parameter is added in accordance with 2, 24, 26, 28, and 30. However, u which is not used in later calculations is not calculated. After the addition for all the contour data included in the connected component is completed, in step 1014
According to 3, the inclination an and the Y tangent bn are obtained. In the above example, the contour data is expressed in eight directions. However, the inclination an and the Y tangent bn can be obtained by simplifying the contour data in a smaller number of directions. For example, when the contour is defined in a counterclockwise direction, if the lower side of the contour is a black pixel, the direction Di is often one of 1, 2, and 3, and the other cases may be ignored. it can. Therefore, in such a case, if the value of Di is any one of 1, 2, and 3, the process branches to step 1005. If not, the process ignores step 1004 for the next line segment that forms the contour data. Processing can also be performed. The errors in the values of a and b obtained in this method are negligible, but the processing time can be greatly reduced.

【0090】上記第1〜第3の実施例では文書画像中の
黒線を例に説明したが、文書画像中の長方形や文字行中
の文字間を補間して得られる細長い黒い図形などの傾き
を求めることもできる。
In the first to third embodiments, the black line in the document image has been described as an example. However, the inclination of a rectangle in a document image or a slender black figure obtained by interpolating the space between characters in a character line is described. Can also be requested.

【0091】図12は本発明を実施するためのシステム
の構成を示す。1201は本発明の傾き算出方式を組み
込んだ画像処理装置である。画像処理装置1201には
光ディスク装置などの画像蓄積装置1202、イメージ
スキャナなどの画像入力装置1203、ファクシミリ等
のような画像伝送装置1204が接続される。これらの
画像入力装置より画像データが画像処理装置1201に
設けられた画像入力部1205を介して図形検出部12
06、セレクタ1207、画像補正部1209、セレク
タ1210に出力される。図形検出部1206は入力画
像より黒線、文字行等傾き検出処理の対象となる図形を
検出する。傾き検出部1208は入力画像または図形検
出部1206の出力である図形に対し、上記の方式で直
線近似を行い傾きを検出する。セレクタ1207は外部
からの指示などにより傾き算出部1208への入力を画
像入力部1205の出力または図形検出部1206の出
力に切り換える。画像補正部1209は入力画像を傾き
算出部1208の結果に応じて入力画像を回転補正した
画像を出力する。画像出力部1211は入力画像または
画像補正部1209で回転補正された画像を光ディスク
などの画像蓄積装置1212、OCR等の画像認識装置
1213、CRTなどの画像表示装置1214、ファク
シミリなどの画像伝送装置1215等の外部の装置へ出
力する。セレクタ1210は画像出力部1211への入
力を外部からの指示などにより画像入力部1205の出
力または画像補正部1209の出力に切り換える。
FIG. 12 shows the configuration of a system for implementing the present invention. Reference numeral 1201 denotes an image processing apparatus incorporating the inclination calculation method of the present invention. The image processing device 1201 is connected to an image storage device 1202 such as an optical disk device, an image input device 1203 such as an image scanner, and an image transmission device 1204 such as a facsimile. From these image input devices, image data is sent to the graphic detection unit 12 via an image input unit 1205 provided in the image processing device 1201.
06, the selector 1207, the image correction unit 1209, and the selector 1210. The figure detecting unit 1206 detects a figure to be subjected to inclination detection processing such as a black line or a character line from the input image. The inclination detection unit 1208 performs linear approximation on the input image or the graphic output from the graphic detection unit 1206 by the above-described method to detect the inclination. The selector 1207 switches the input to the inclination calculation unit 1208 to the output of the image input unit 1205 or the output of the graphic detection unit 1206 according to an instruction from the outside. The image correction unit 1209 outputs an image obtained by rotating and correcting the input image according to the result of the inclination calculation unit 1208. An image output unit 1211 converts an input image or an image whose rotation has been corrected by the image correction unit 1209 into an image storage device 1212 such as an optical disk, an image recognition device 1213 such as an OCR, an image display device 1214 such as a CRT, and an image transmission device 1215 such as a facsimile. Etc. to an external device. The selector 1210 switches the input to the image output unit 1211 to the output of the image input unit 1205 or the output of the image correction unit 1209 according to an external instruction or the like.

【0092】本発明の各実施例の定量的な効果を説明す
る。Mを黒線中の黒画素数とすると、最小二乗法により
黒線の傾きを求めるのに、画素データを用いる第1の実
施例では、3M回の乗算と5M回の加算が必要である。
The quantitative effect of each embodiment of the present invention will be described. Assuming that M is the number of black pixels in the black line, the first embodiment using pixel data requires 3M multiplications and 5M additions to determine the slope of the black line by the least squares method.

【0093】これに対して、ランを用いる第2の実施例
では、Nを黒線中のラン数とすると、6N回の乗算、1N回
の除算、6N回の加算が必要である。一般の計算機にお
いては乗算と除算に費やされる処理時間が同等で、なお
かつ加算に費やされる時間が乗算に費やされる時間に対
して無視できる程度に小さいと仮定できる。このような
仮定が成り立つならば M > 7/3・N なる場合に、ラ
ンを用いる第2の実施例が画像データを用いる第1の実
施例より費やす処理時間が小さくなる。文書画像中の黒
線においては、通常 M = 10N から 2000N の間で
あり、ランを用いる方式が処理時間の面できわめて有利
となる。
On the other hand, in the second embodiment using runs, when N is the number of runs in the black line, 6N multiplications, 1N divisions, and 6N additions are required. In a general computer, it can be assumed that the processing time spent for multiplication and division is the same, and that the time spent for addition is negligibly smaller than the time spent for multiplication. If such an assumption holds, the processing time of the second embodiment using the run is shorter than that of the first embodiment using the image data when M> 7/3 · N. For black lines in a document image, it is usually between M = 10N and 2000N, and the method using a run is extremely advantageous in terms of processing time.

【0094】また、輪郭を用いる第3の実施例では、N'
を黒線中の輪郭データの数とすると、9N'回の乗算、2N'
回の除算が必要である。従って M > 11/3・N' なる
場合に輪郭を用いる第3の実施例が画素を用いる第1の
実施例より処理時間が短くなる。一般にM = 5N' か
ら 4000N' であり、必要とされる計算量は極めて少な
くなる。
In the third embodiment using the contour, N '
Is the number of contour data in the black line, 9N 'multiplications, 2N'
You need to divide times. Therefore, the processing time of the third embodiment using the contour when M> 11 / 3.N 'is shorter than that of the first embodiment using the pixels. In general, M = 5N 'to 4000N', and the amount of calculation required is extremely small.

【0095】[0095]

【発明の効果】本発明により、2値画像の直線近似を、
高精度かつ高速に実行できるようになり、文字認識装置
などの画像処理装置における、前処理の(文書)画像の
傾き検出としての利用が容易になる。
According to the present invention, linear approximation of a binary image
High-precision and high-speed execution can be achieved, and it is easy to use the image processing apparatus such as a character recognition apparatus for detecting the inclination of a preprocessed (document) image.

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

【図1】本発明の原理を示す図である。FIG. 1 is a diagram showing the principle of the present invention.

【図2】本発明の処理手順を示す図である。FIG. 2 is a diagram showing a processing procedure of the present invention.

【図3】本発明における2値画像中の図形の直線近似の
原理を示す図である。
FIG. 3 is a diagram illustrating the principle of linear approximation of a figure in a binary image according to the present invention.

【図4】本発明の第1の実施例における2値画像中の図
形の直線近似の画素データによる計算方式の原理を示す
図である。
FIG. 4 is a diagram illustrating the principle of a calculation method using pixel data of a linear approximation of a figure in a binary image according to the first embodiment of the present invention.

【図5】本発明の第2の実施例における2値画像中の図
形の直線近似のランデータによる計算方式の原理を示す
図である。
FIG. 5 is a diagram illustrating the principle of a calculation method based on run data of linear approximation of a figure in a binary image according to a second embodiment of the present invention.

【図6】本発明の第3の実施例における2値画像中の図
形の直線近似の輪郭データによる計算方式の原理を示す
図である。
FIG. 6 is a diagram illustrating the principle of a calculation method based on contour data for linear approximation of a figure in a binary image according to a third embodiment of the present invention.

【図7】本発明の第3の実施例における2値画像中の図
形の輪郭データの方向の定義を示す図である。
FIG. 7 is a diagram showing a definition of a direction of contour data of a figure in a binary image according to a third embodiment of the present invention.

【図8】本発明の第1の実施例における2値画像中の図
形の直線近似の画素データによる計算方式の手順を示す
図である。
FIG. 8 is a diagram showing a procedure of a calculation method using pixel data of a linear approximation of a figure in a binary image according to the first embodiment of the present invention.

【図9】本発明の第2の実施例における2値画像中の図
形の直線近似のランデータによる計算方式の手順を示す
図である。
FIG. 9 is a diagram showing a procedure of a calculation method based on run data of linear approximation of a figure in a binary image according to the second embodiment of the present invention.

【図10】本発明の第3の実施例における2値画像中の
図形の直線近似の輪郭データによる計算方式の手順を示
す図である。
FIG. 10 is a diagram illustrating a procedure of a calculation method using outline data of a straight line approximation of a figure in a binary image according to a third embodiment of the present invention.

【図11】本発明の第3の実施例における2値画像中の
図形の直線近似の輪郭データによる計算方式のサブルー
チンの手順を示す図である。
FIG. 11 is a diagram illustrating a procedure of a subroutine of a calculation method using outline data of a linear approximation of a figure in a binary image according to a third embodiment of the present invention.

【図12】本発明を実施するためのシステムの構成を示
す図である。
FIG. 12 is a diagram showing a configuration of a system for implementing the present invention.

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

101…文書画像、102…文書画像中の黒線、103
…文書画像中の文字列、104、105…文書画像中か
ら検出された横黒線、302,402…2値画像中の図
形、301、401…画像中の座標系、303,40
3,501,601…2値画像中の図形を近似する直
線、502…黒ラン、602…輪郭。
101: Document image, 102: Black line in document image, 103
... Character strings in the document image, 104, 105 ... Horizontal black lines detected in the document image, 302, 402 ... Figures in the binary image, 301, 401 ... Coordinate system in the image, 303, 40
3, 501, 601: straight line approximating the figure in the binary image, 502: black run, 602: contour.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 中島 和樹 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内 (72)発明者 栗野 清道 神奈川県小田原市国府津2880番地 株式 会社日立製作所小田原工場内 (56)参考文献 特開 昭59−133677(JP,A) 特開 平4−96878(JP,A) 特開 平3−144863(JP,A) 特開 昭58−95465(JP,A) 特開 平2−302612(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 7/00 - 7/60 G06K 9/32 G06T 1/00 H04N 1/40 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Kazuki Nakajima 1-280 Higashi Koigakubo, Kokubunji-shi, Tokyo Inside the Central Research Laboratory, Hitachi, Ltd. (56) References JP-A-59-133677 (JP, A) JP-A-4-96878 (JP, A) JP-A-3-1444863 (JP, A) JP-A-58-95465 (JP, A) JP-A-2-302612 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06T 7 /00-7/60 G06K 9/32 G06T 1/00 H04N 1/40

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力された2値画像をラン符号化し、符号
化された2値画像データより上記2値画像中の直線図形
を抽出し、抽出された直線図形の各ランの中点の座標値
及びラン長から所定軸周りの該直線図形の2次モーメン
トを計算し、該2次モーメントを用いて表される該直線
図形の2次モーメントが最小になる軸の直線式を最小二
乗法により求めて該直線図形を該直線に近似することを
特徴とする傾き検出方法。
1. An input binary image is run-encoded, a linear figure in the binary image is extracted from the encoded binary image data , and coordinates of a middle point of each run of the extracted linear figure are obtained. value
And a second moment of the linear figure around a predetermined axis from the run length
The straight line calculated using the second moment
The linear equation of the axis that minimizes the second moment of the figure
A tilt detection method characterized by approximating the straight line figure to the straight line obtained by a multiplication method.
【請求項2】2値画像を入力する手段と、ラン符号化さ
れた2値画像データより上記2値画像中の直線図形を抽
出する手段と、上記直線図形の各ランの中点の座標値及
びラン長から所定軸周りの該直線図形の2次モーメント
を計算し、該2次モーメントを用いて表される該直線図
形の2次モーメントが最小になる軸の直線式の傾きを最
小二乗法により求める傾き検出手段と、求めた傾きに応
じて上記2値画像を回転補正する手段とを有する画像処
理装置。
2. A means for inputting a binary image, a means for extracting a linear figure in the binary image from the run-coded binary image data, and a coordinate value of a midpoint of each run of the linear figure. Passing
The second moment of the straight line figure around a predetermined axis from the run length
Is calculated, and the linear diagram is expressed using the second moment.
The inclination of the linear equation of the axis where the second moment of the
An image processing apparatus comprising: a slope detecting unit obtained by a small square method; and a unit for performing rotation correction of the binary image according to the obtained tilt.
【請求項3】光電変換により文書の2値画像を入力する
手段と、ラン符号化された2値画像データより上記2値
画像中の直線図形を抽出する手段と、上記直線図形の各
ランの中点の座標値及びラン長から所定軸周りの該直線
図形の2次モーメントを計算し、該2次モーメントを用
いて表される該直線図形の2次モーメントが最小になる
軸の直線式の傾きを最小二乗法により求める傾き検出手
段と、求めた傾きに応じて上記2値画像を回転補正する
手段とを有し、上記文書中の文字を認識する認識手段を
有することを特徴とする画像処理装置。
3. A means for inputting a binary image of the document by photoelectric conversion, means for extracting from the linear shape in the binary image run coded binary image data, each of the straight line graphic
The straight line around the predetermined axis from the coordinate value of the midpoint of the run and the run length
Calculate the second moment of the figure and use the second moment
The second moment of the linear figure represented by
A means for detecting the inclination of the linear expression of the axis by the least squares method; a means for rotating and correcting the binary image in accordance with the obtained inclination; and a means for recognizing characters in the document. An image processing apparatus characterized by the above-mentioned.
【請求項4】光電変換により文書の2値画像を入力する
手段と、ラン符号化された2値画像データより上記2値
画像中の直線図形を抽出する手段と、上記直線図形の各
ランの中点の座標値及びラン長から所定軸周りの該直線
図形の2次モーメントを計算し、該2次モーメントを用
いて表される該直線図形の2次モーメントが最小になる
軸の直線式の傾きを最小二乗法により求める傾き検出手
段と、求めた傾きに応じて上記2値画像を回転補正する
手段とを有し、上記文書の2値画像を文書ファイルとし
て蓄積する手段を有することを特徴とする画像処理装
置。
4. A means for inputting a binary image of the document by photoelectric conversion, means for extracting from the linear shape in the binary image run coded binary image data, each of the straight line graphic
The straight line around the predetermined axis from the coordinate value of the midpoint of the run and the run length
Calculate the second moment of the figure and use the second moment
The second moment of the linear figure represented by
Means for detecting the inclination of the linear equation of the axis by the least square method, and means for correcting the rotation of the binary image according to the obtained inclination, and storing the binary image of the document as a document file An image processing apparatus comprising:
【請求項5】光電変換により文書の2値画像を入力する
手段と、ラン符号化された2値画像データより上記2値
画像中の直線図形を抽出する手段と、上記直線図形の各
ランの中点の座標値及びラン長から所定軸周りの該直線
図形の2次モーメントを計算し、該2次モーメントを用
いて表される該直線図形の2次モーメントが最小になる
軸の直線式の傾きを最小二乗法により求める傾き検出手
段と、求めた傾きに応じて上記2値画像を回転補正する
手段とを有し、上記文書の2値画像を伝送する画像伝送
手段を有することを特徴とする画像処理装置。
5. A means for inputting a binary image of the document by photoelectric conversion, means for extracting from the linear shape in the binary image run coded binary image data, each of the straight line graphic
The straight line around the predetermined axis from the coordinate value of the midpoint of the run and the run length
Calculate the second moment of the figure and use the second moment
The second moment of the linear figure represented by
Image transmitting means for transmitting a binary image of the document, comprising: means for detecting the inclination of the linear expression of the axis by the least square method; and means for rotating and correcting the binary image in accordance with the obtained inclination. An image processing apparatus comprising:
【請求項6】入力された2値画像を輪郭符号化し、符号
化された2値画像データより上記2値画像中の直線図形
を抽出し、抽出された直線図形の輪郭線上の方向と長さ
から該直線図形の所定軸周りの2次モーメントを計算
し、該2次モーメントを用いて表される該直線図形の2
次モーメントが最小になる軸の直線式を最小二乗法によ
り求めて該直線図形を該直線に近似することを特徴とす
る傾き検出方法。
6. An outline of the input binary image is encoded, a linear figure in the binary image is extracted from the encoded binary image data, and the direction and length of the extracted linear figure on the outline are defined.
Calculates the second moment about the specified axis of the straight line figure from
And the second moment of the linear figure represented using the second moment
The linear equation of the axis where the next moment is minimized is calculated by the least squares method.
And calculating a slope of the straight line by approximating the straight line figure .
【請求項7】2値画像を入力する手段と、輪郭符号化さ
れた2値画像データより上記2値画像中の直線図形を抽
出する手段と、上記直線図形のの輪郭線上の方向と長さ
から該直線図形の所定軸周りの2次モーメントを計算
し、該2次モーメントを用いて表される該直線図形の2
次モーメントが最小になる軸の直線式の傾きを最小二乗
法により求める傾き検出手段と、求めた傾きに応じて上
記2値画像を回転補正する手段とを有する画像処理装
置。
7. A means for inputting a binary image, a means for extracting a linear figure in the binary image from the contour-coded binary image data, a direction and a length of the linear figure on the contour line
Calculates the second moment about the specified axis of the straight line figure from
And 2 of the straight line figure represented using the second moment
Least squares the slope of the linear equation of the axis where the next moment is minimized
An image processing apparatus comprising: means for detecting a tilt obtained by a method; and means for rotating and correcting the binary image according to the obtained tilt.
JP20476792A 1992-07-31 1992-07-31 Tilt detection method and image processing device Expired - Lifetime JP3304404B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20476792A JP3304404B2 (en) 1992-07-31 1992-07-31 Tilt detection method and image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20476792A JP3304404B2 (en) 1992-07-31 1992-07-31 Tilt detection method and image processing device

Publications (2)

Publication Number Publication Date
JPH0652309A JPH0652309A (en) 1994-02-25
JP3304404B2 true JP3304404B2 (en) 2002-07-22

Family

ID=16496013

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20476792A Expired - Lifetime JP3304404B2 (en) 1992-07-31 1992-07-31 Tilt detection method and image processing device

Country Status (1)

Country Link
JP (1) JP3304404B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3443141B2 (en) * 1993-10-05 2003-09-02 株式会社リコー Image tilt detection method and table processing method
JP3338537B2 (en) * 1993-12-27 2002-10-28 株式会社リコー Image tilt detector
JP4598426B2 (en) 2004-03-30 2010-12-15 富士通株式会社 Boundary extraction method, program, and apparatus using the same
JP4591501B2 (en) * 2007-12-06 2010-12-01 株式会社デンソー In-vehicle operation device

Also Published As

Publication number Publication date
JPH0652309A (en) 1994-02-25

Similar Documents

Publication Publication Date Title
US6347156B1 (en) Device, method and storage medium for recognizing a document image
US5048099A (en) Polygon-based method for automatic extraction of selected text in a digitized document
EP1999688B1 (en) Converting digital images containing text to token-based files for rendering
US5054098A (en) Method of detecting the skew angle of a printed business form
US20100073735A1 (en) Camera-based document imaging
EP2172856A2 (en) Image processing apparatus, image processing method and program
WO2021051527A1 (en) Image segmentation-based text positioning method, apparatus and device, and storage medium
Den Hartog et al. Knowledge-based interpretation of utility maps
Shafii et al. Skew detection and correction based on an axes-parallel bounding box
CN115497109B (en) Character and image preprocessing method based on intelligent translation
CN114724133B (en) Text detection and model training method, device, equipment and storage medium
CN108921175A (en) One kind being based on the improved SIFT method for registering images of FAST
JP3304404B2 (en) Tilt detection method and image processing device
Hung et al. Critical points on a perfectly 8-or 6-connected thin binary line
JPH0935062A (en) Image processing method
CN113793349A (en) Target detection method and device, computer readable storage medium and electronic equipment
EP0485051A2 (en) Detecting skew in digitised images
US20020164087A1 (en) System and method for fast rotation of binary images using block matching method
CN111368572A (en) Two-dimensional code identification method and system
JP2974167B2 (en) Large Classification Recognition Method for Characters
JPH0628476A (en) Processor for image signal
CN111597375B (en) Picture retrieval method based on similar picture group representative feature vector and related equipment
JPH05174182A (en) Method and device for document tilt angle detection
JPS622382A (en) Feature extracting devie for pattern
JP2885476B2 (en) Image processing method and apparatus

Legal Events

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

Free format text: PAYMENT UNTIL: 20080510

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090510

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100510

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110510

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110510

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120510

Year of fee payment: 10

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130510

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20130510

Year of fee payment: 11