JPH0589284A - Device for discriminating longitudinal and transverse direction of document - Google Patents

Device for discriminating longitudinal and transverse direction of document

Info

Publication number
JPH0589284A
JPH0589284A JP3277069A JP27706991A JPH0589284A JP H0589284 A JPH0589284 A JP H0589284A JP 3277069 A JP3277069 A JP 3277069A JP 27706991 A JP27706991 A JP 27706991A JP H0589284 A JPH0589284 A JP H0589284A
Authority
JP
Japan
Prior art keywords
document
picture
fourier transform
projection
dimensional fourier
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.)
Pending
Application number
JP3277069A
Other languages
Japanese (ja)
Inventor
Shoji Shimomura
昭二 下村
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.)
Fuji Electric Co Ltd
Fuji Facom Corp
Original Assignee
Fuji Electric Co Ltd
Fuji Facom 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 Fuji Electric Co Ltd, Fuji Facom Corp filed Critical Fuji Electric Co Ltd
Priority to JP3277069A priority Critical patent/JPH0589284A/en
Publication of JPH0589284A publication Critical patent/JPH0589284A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To discriminate whether a character picture is written vertically or horizontally by subjecting projection distributions in X-axis and Y-axis directions of the document picture to one-dimensional Fourier transform and comparing values of obtained power spectrums with each other. CONSTITUTION:An inputted picture signal is converted to a binarized picture. Projection distribution in vertical and horizontal directions are obtained with respect to a divided area A of the document picture. Obtained projection distributions hX(x) and hY(y) are subjected to the one-dimensional Fourier transform of a discrete value system to obtain respective harmonic components (power spectrums). Values of these power spectrums are compared with each other to discriminate whether the input picture is written vertically or horizontally by the comparison result.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、OCR等に用いられ、
入力された文書画像の縦横方向を判定する文書の縦横方
向判定装置に関する。
BACKGROUND OF THE INVENTION The present invention is used in OCR and the like.
The present invention relates to a document vertical / horizontal direction determination device for determining the vertical / horizontal direction of an input document image.

【0002】[0002]

【従来の技術】和文からなる文書画像について文字認識
する場合、初めに縦横方向を判定しなければならない。
そのためのレイアウト解析方式として、文書画像を2値
化して投影分布を求め、さらに2次元フーリエ変換して
得られたピーク値から、縦書きか横書きかを判定するこ
とがある。
2. Description of the Related Art When recognizing characters in a Japanese document image, it is necessary to first determine the vertical and horizontal directions.
As a layout analysis method therefor, there is a case in which vertical writing or horizontal writing is determined from a peak value obtained by binarizing a document image to obtain a projection distribution and further performing two-dimensional Fourier transform.

【0003】[0003]

【発明が解決しようとする課題】ところで、上述した従
来の判定方法は、2次元フーリエ変換を用いるため、そ
の演算処理量が膨大となって、判定までの処理時間が長
くなり実用的でないという問題がある。本発明は上記問
題点を解決するためになされたもので、その目的とする
ところは、短時間の処理で判定できる実用的な文書の縦
横方向判定装置を提供することにある。
By the way, since the above-mentioned conventional determination method uses the two-dimensional Fourier transform, the calculation processing amount becomes enormous and the processing time until the determination becomes long, which is not practical. There is. The present invention has been made to solve the above problems, and an object of the present invention is to provide a practical document vertical / horizontal direction determination apparatus capable of performing determination in a short time.

【0004】[0004]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、入力された画像信号を2値化画像に変換
する手段と、2値化画像のX軸およびY軸方向の投影分
布を求める手段と、各投影分布に対し離散値系の1次元
フーリエ変換をしてパワースペクトルを求める手段と、
各パワースペクトルの値を比較しその大小関係から、入
力画像が縦書き横書きのいずれの方向であるかを判定す
る手段とを備えたことを特徴とする。
In order to achieve the above object, the present invention provides a means for converting an input image signal into a binary image and a projection of the binary image in the X-axis and Y-axis directions. A means for obtaining a distribution, a means for obtaining a power spectrum by performing a one-dimensional Fourier transform of a discrete value system on each projection distribution,
It is characterized by comprising means for comparing the values of the respective power spectra and judging from which of the magnitudes the input image is in the vertical writing direction and the horizontal writing direction.

【0005】[0005]

【作用】本発明においては、入力された文書画像の画像
信号が2値化画像に変換され、その2値化画像のX軸お
よびY軸方向についての投影分布がそれぞれ求められ
る。次いで、それぞれの投影分布について離散値系の1
次元フーリエ変換がなされてパワースペクトルが求めら
れ、さらにその値の大小が比較されて、入力画像が縦書
き横書きのいずれであるかが判定される。
In the present invention, the image signal of the input document image is converted into a binarized image, and the projection distributions of the binarized image in the X-axis and Y-axis directions are obtained. Then, for each projection distribution, 1 in the discrete value system
The dimensional Fourier transform is performed to obtain the power spectrum, and the magnitudes of the values are compared to determine whether the input image is in vertical writing or horizontal writing.

【0006】[0006]

【実施例】以下、図に沿って本発明の実施例を説明す
る。図1は実施例に入力される文書画像の説明図であ
り、図2は図1中の分割された画像領域の1つを取り出
してその投影分布とともに示したものである。図1にお
いて、文書画像1は、入力された画像信号を予め設定さ
れている閾値により2値化して得られた2値化画像であ
り、文書画像1の中に○で示したのが、個々の文字2で
ある。文字2は横方向に連なり横書きの行を形成してい
る。また、文書中に傾きがある場合を考慮して、文書画
像1を、X,Y方向に分割し、各領域A〜Dごとに処理
する。領域の1辺の長さは、それぞれ画素数Wx,Wy
である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is an explanatory view of a document image input to the embodiment, and FIG. 2 shows one of the divided image areas in FIG. 1 and shows it along with its projection distribution. In FIG. 1, a document image 1 is a binarized image obtained by binarizing an input image signal with a preset threshold value, and the circles in the document image 1 indicate individual images. It is the character 2. The characters 2 are continuous in the horizontal direction to form a line for horizontal writing. Further, in consideration of the case where the document has an inclination, the document image 1 is divided in the X and Y directions and processed for each of the areas A to D. The length of one side of the area is the number of pixels Wx and Wy, respectively.
Is.

【0007】図2において、文書画像1の分割された領
域Aに対し、垂直および水平方向の投影分布を求め、そ
れぞれの分布をhx(x),hy(y)とする。ここで得
られた投影分布hx(x),hy(y)に対し離散値系の
1次元フーリエ変換をして、数式1,数式2のようにそ
れぞれの高調波成分(パワースペクトル)Cxn,Cym
求める。なお、nおよびmは次数である。
In FIG. 2, projection distributions in the vertical and horizontal directions are obtained for the divided area A of the document image 1, and the respective distributions are h x (x) and h y (y). The projection distributions h x (x) and h y (y) obtained here are subjected to a one-dimensional Fourier transform in a discrete value system, and each harmonic component (power spectrum) C Find xn and C ym . Note that n and m are orders.

【0008】[0008]

【数1】 [Equation 1]

【0009】[0009]

【数2】 [Equation 2]

【0010】次に、高調波成分Cxn,Cymの中からそれ
ぞれ最大値Cxmax,Cymaxを求め、さらに、両者の最大
値Cmax=max〔Cxmax,Cymax〕を求める。領域A
では、X軸についての投影分布hx(x)に明確な山と
谷が現れないが、Y軸についての投影分布hy(y)に
は山と谷があらわれている。そのため、最大値Cmax
してCymaxが選ばれる。これで領域Aについての処理を
終了し、引き続き、他の領域B,C,Dについても同様
に処理をする。
Next, the maximum values C xmax and C ymax are obtained from the harmonic components C xn and C ym , respectively, and the maximum values C max = max [C xmax and C ymax ] of both are obtained. Area A
In the above, clear peaks and valleys do not appear in the projection distribution h x (x) about the X axis, but peaks and valleys appear in the projection distribution h y (y) about the Y axis. Therefore, C ymax is selected as the maximum value C max . With this, the processing for the area A is completed, and subsequently, the other areas B, C, and D are similarly processed.

【0011】なお、各領域A〜Dの最大値をそれぞれC
Amax,CBmax,CCmax,CDmaxとするとともに、予め初
期値を0とする2つの変数YC,TCを用意しておき、各
領域で最大値Cmaxを求めるごとに、最大値CmaxがC
xmaxの場合は変数TCをインクリメントし、Cymaxの場
合は変数YCをインクリメントする。全領域についてイ
ンクリメントの処理が終了したら、変数YC,TCの値を
呼出して、最大値CxmaxとCymaxの頻度を比較する。す
なわち、変数YCの方が大きい場合は、文書画像1の文
字の方向を横書きと判定する。また、変数TCの方が大
きい場合は縦書きと判定する。
The maximum value of each area A to D is C
Amax , C Bmax , C Cmax , C Dmax and two variables Y C and T C whose initial values are 0 are prepared in advance, and the maximum value C max is calculated every time the maximum value C max is obtained in each region. max is C
In the case of xmax , the variable T C is incremented, and in the case of C ymax , the variable Y C is incremented. When the increment processing is completed for all areas, the values of the variables Y C and T C are called and the frequencies of the maximum values C xmax and C ymax are compared. That is, when the variable Y C is larger, it is determined that the direction of characters in the document image 1 is horizontal writing. If the variable T C is larger, vertical writing is determined.

【0012】この実施例では、1次元フーリエ変換によ
り処理されるため、1領域あたりの処理回数が、垂直方
向について次数m回、水平方向について次数n回とな
る。これに対し、従来の2次元フーリエ変換で同一の領
域を処理しょうとすると、次数m,nの積の処理回数が
必要である。すなわち、この実施例では(m+n)回、
従来の方法では(m×n)回のフーリエ変換の処理回数
となり、両者の比は(m+n)/(m×n)となって、
従来方法に比べ実施例の処理量が桁違いに少なくなる。
このように、実施例では、演算時間が短縮されて実用的
な処理速度となり、OCR等の使用にも充分に耐えるこ
とができる。
In this embodiment, since the processing is performed by the one-dimensional Fourier transform, the number of times of processing per region is m times in the vertical direction and n times in the horizontal direction. On the other hand, in order to process the same area by the conventional two-dimensional Fourier transform, the number of times of processing the product of the orders m and n is necessary. That is, in this embodiment, (m + n) times,
In the conventional method, the number of times of Fourier transform processing is (m × n), and the ratio of both is (m + n) / (m × n).
The processing amount of the embodiment is reduced by an order of magnitude as compared with the conventional method.
As described above, in the embodiment, the calculation time is shortened to provide a practical processing speed, and it is possible to sufficiently withstand the use of OCR or the like.

【0013】なお、この実施例では、多様な文書画像に
対応するため、文書画像1を複数の領域に分割し領域ご
とに水平および垂直方向の投影分布をフーリエ変換し、
得られた高調波成分(パワースペクトル)の最大値がど
ちらの軸方向であるかを判別し、その後、文書画像1全
体で軸方向ごとの最大値の頻度を比較して文書の方向を
判定している。しかし、入力されるのが一様な文書画像
であるような場合は、文書画像1を分割することなく全
体のままで処理することも可能である。その場合は、処
理時間がほぼ分割数に反比例して短縮される。
In this embodiment, in order to deal with various document images, the document image 1 is divided into a plurality of regions, and the horizontal and vertical projection distributions of each region are Fourier transformed,
It is determined which axial direction the maximum value of the obtained harmonic component (power spectrum) is, and then the frequency of the maximum value for each axial direction is compared in the entire document image 1 to determine the document direction. ing. However, if the input is a uniform document image, the document image 1 can be processed as it is without being divided. In that case, the processing time is reduced almost in inverse proportion to the number of divisions.

【0014】[0014]

【発明の効果】以上述べたように本発明によれば、文書
画像のX軸およびY軸方向の投影分布をそれぞれ1次元
フーリエ変換し、得られたパワースペクトルの値を比較
することにより、文書画像が縦書き横書きのいずれの方
向であるかが判定される。その結果、従来の2次元フー
リエ変換処理の場合に比較して処理時間が大幅に短縮さ
れ、充分実用に耐えることができ、さらには、後段に接
続されるOCR等の処理速度の向上も可能にする。
As described above, according to the present invention, the projection distributions in the X-axis and Y-axis directions of a document image are each subjected to a one-dimensional Fourier transform, and the values of the obtained power spectra are compared with each other to obtain a document It is determined whether the image is in vertical writing or horizontal writing. As a result, the processing time is greatly shortened as compared with the case of the conventional two-dimensional Fourier transform processing, and it can withstand practical use sufficiently, and further, the processing speed of the OCR connected in the subsequent stage can be improved. To do.

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

【図1】文書画像の説明図である。FIG. 1 is an explanatory diagram of a document image.

【図2】分割された領域およびその投影分布を示す説明
図である。
FIG. 2 is an explanatory diagram showing a divided region and its projection distribution.

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

1 文書画像 2 文字 A〜D 領域 1 document image 2 characters A to D area

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 入力された画像信号を2値化画像に変換
する手段と、 2値化画像のX軸およびY軸方向の投影分布を求める手
段と、 各投影分布に対し離散値系の1次元フーリエ変換をして
パワースペクトルを求める手段と、 各パワースペクトルの値を比較しその大小関係から、入
力画像が縦書き横書きのいずれの方向であるかを判定す
る手段と、 を備えたことを特徴とする文書の縦横方向判定装置。
1. A means for converting an input image signal into a binarized image, a means for obtaining a projection distribution in the X-axis and Y-axis directions of the binarized image, and a discrete value system 1 for each projection distribution. A means for obtaining a power spectrum by performing a four-dimensional Fourier transform and a means for comparing the values of each power spectrum and determining which direction of the input image is vertical writing or horizontal writing based on the magnitude relationship are provided. A device for determining the vertical and horizontal directions of a document.
JP3277069A 1991-09-27 1991-09-27 Device for discriminating longitudinal and transverse direction of document Pending JPH0589284A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3277069A JPH0589284A (en) 1991-09-27 1991-09-27 Device for discriminating longitudinal and transverse direction of document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3277069A JPH0589284A (en) 1991-09-27 1991-09-27 Device for discriminating longitudinal and transverse direction of document

Publications (1)

Publication Number Publication Date
JPH0589284A true JPH0589284A (en) 1993-04-09

Family

ID=17578351

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3277069A Pending JPH0589284A (en) 1991-09-27 1991-09-27 Device for discriminating longitudinal and transverse direction of document

Country Status (1)

Country Link
JP (1) JPH0589284A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7277596B2 (en) 2002-04-10 2007-10-02 Ricoh Company, Ltd. Apparatus configured to eliminate image data show-through

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7277596B2 (en) 2002-04-10 2007-10-02 Ricoh Company, Ltd. Apparatus configured to eliminate image data show-through
US7369713B2 (en) 2002-04-10 2008-05-06 Ricoh Company, Ltd. Image processing apparatus and method for determining whether an image is of a vertical or horizontal writing

Similar Documents

Publication Publication Date Title
US6195459B1 (en) Zone segmentation for image display
US6347156B1 (en) Device, method and storage medium for recognizing a document image
US5563403A (en) Method and apparatus for detection of a skew angle of a document image using a regression coefficient
EP0352016A2 (en) Method and system for enhancement of a digitized image
DE19956158A1 (en) Image binarisation method for scanned greytone images e.g. newspaper article, uses 2 different conversion methods for providing 2 binary images from scanned greytone image, combined to provide output binary image
EP3762864A1 (en) Determining a dithered image region
JP3438440B2 (en) Image processing device
US6633411B1 (en) Method and apparatus for repurposing binary images
JPH0589284A (en) Device for discriminating longitudinal and transverse direction of document
JP3324040B2 (en) Particle recognition device
JP2775122B2 (en) Automatic contour extraction vectorization processing method of illustration data and processing device used for the method
JPH0373915B2 (en)
JP2960468B2 (en) Method and apparatus for binarizing grayscale image
JP2988097B2 (en) How to segment a grayscale image
JPH06301775A (en) Picture processing method, picture identification method and picture processor
JP2856174B2 (en) Image binarization device
JPS59140589A (en) Outline extracting device
JP2621868B2 (en) Image feature extraction device
JPH0490082A (en) Device for detecting character direction in document
JP2795860B2 (en) Character recognition device
JP2784059B2 (en) Method and apparatus for removing noise from binary image
JP3150778B2 (en) Threshold determination device
JP3058951B2 (en) Image pattern recognition device
JPS60153567A (en) Method for extracting area in printed document picture
KR100332753B1 (en) Image processing method of image processing system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20000307