JPH0797390B2 - Character recognition device - Google Patents

Character recognition device

Info

Publication number
JPH0797390B2
JPH0797390B2 JP60182014A JP18201485A JPH0797390B2 JP H0797390 B2 JPH0797390 B2 JP H0797390B2 JP 60182014 A JP60182014 A JP 60182014A JP 18201485 A JP18201485 A JP 18201485A JP H0797390 B2 JPH0797390 B2 JP H0797390B2
Authority
JP
Japan
Prior art keywords
character
image
recognition
unit
histogram
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
JP60182014A
Other languages
Japanese (ja)
Other versions
JPS6254380A (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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP60182014A priority Critical patent/JPH0797390B2/en
Publication of JPS6254380A publication Critical patent/JPS6254380A/en
Publication of JPH0797390B2 publication Critical patent/JPH0797390B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、新聞・雑誌等の活字および手書き文字を認識
し、たとえばJISコード等の情報量に変換する文字認識
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character recognition device for recognizing printed characters and handwritten characters of newspapers, magazines, etc. and converting them into information amount such as JIS code.

従来の技術 従来の文字認識装置では、縦書き,横書きおよび行間隔
・文字間隔等の書式が明確な文書、つまり読み取る文字
の用紙上の絶対的な位置があらかじめ判明している文書
を対象に文字認識を行ってきた。このことは、文字認識
装置が対象とする文書に制限を与えており、この問題を
解決するために、入力画像の2次元フーリエ変換を用い
て行間を検出して縦書き・横書き等の行方向を抽出し、
書式が未知の文書に対しても、文章の意味が理解できる
ように認識候補文字の順序を決定する方法がとられてい
た。(例えば、長谷・星野“印刷文字列の周期的特徴”
信学論(D),J65-D,2,PP.298〜299) 発明が解決しようとする問題点 しかしながら、入力画像の2次元フーリエ変換により入
力文書の行方向を検出する従来の技術では、2次フーリ
エ変換という多大な計算量を必要とする方法を用いてい
るために処理に時間がかかる。
2. Description of the Related Art A conventional character recognition device targets characters for vertical writing, horizontal writing, and a document with a clearly defined line spacing, character spacing, etc. Have been recognized. This limits the document targeted by the character recognition device, and in order to solve this problem, the line spacing such as vertical writing and horizontal writing is detected by detecting the line spacing using the two-dimensional Fourier transform of the input image. Extract
Even for documents of unknown format, a method of determining the order of recognition candidate characters has been adopted so that the meaning of the sentence can be understood. (For example, Hase and Hoshino “Periodic features of printed character strings”
(Problem theory (D), J65-D, 2, PP.298-299) Problems to be solved by the invention However, in the conventional technique of detecting the line direction of the input document by the two-dimensional Fourier transform of the input image, The processing takes a long time because the method that requires a large amount of calculation called the quadratic Fourier transform is used.

本発明はかかる点に鑑みてなされたものであり、簡易な
方法で入力画像の行方向を検出し、書式が未知の文書に
対しても、文章の意味が理解できるように認識候補文字
を編集することができる文字認識装置を提供することを
目的としている。
The present invention has been made in view of the above points, and detects a line direction of an input image by a simple method, and edits a recognition candidate character so that the meaning of a sentence can be understood even in a document whose format is unknown. It is an object of the present invention to provide a character recognition device that can be used.

問題を解決するための手段 本発明は前記問題点を解決するため、画像入力部で入力
された画像の内、疑似正方形(正方形も含む)の領域を
縦方向・横方向に走査して文字部を形成する画素のヒス
トグラムを求め、ヒストグラムの値がN画素以下である
文字間部の連続する走査線の数で定義される文字間隔長
の平均値を縦方向と横方向で比較することにより縦書き
・横書きを判定する行方向判定部を備えている。
Means for Solving the Problems In order to solve the above-mentioned problems, the present invention scans a pseudo-square (including a square) region in an image input by an image input unit in a vertical direction and a horizontal direction so that a character part is scanned. By obtaining the histogram of the pixels forming the pixel and comparing the average value of the character interval length defined by the number of continuous scanning lines in the character space where the value of the histogram is N pixels or less in the vertical and horizontal directions, A line direction determination unit for determining writing / horizontal writing is provided.

作用 本発明は前記した技術的手段により、書式が未知の文書
に対して、高速に行方向を抽出して認識候補文字を文章
の意味が理解できるように編集することが可能となる。
Effect According to the above-mentioned technical means, the present invention makes it possible to quickly extract the line direction of a document whose format is unknown and edit the recognition candidate characters so that the meaning of the sentence can be understood.

実施例 以下、本発明の実施例について図面を参照しながら説明
する。
Examples Hereinafter, examples of the present invention will be described with reference to the drawings.

第1図は、本発明による文字認識装置の一実施例の構成
図である。1は画像入力部であり、認識対象文字を含む
画像を走査し2値信号で画像を入力し画像メモリ2に格
納する。3は行方向判定部であり、画像メモリ2に格納
されている入力画像に対して正方形の領域を設定し、そ
の領域を走査して入力画像の縦書き・横書き判定を行
う。4は文字切り出し部であり、行方向判定部3で検出
した行方向を用いて画像メモリ2を走査して行アドレス
を検出し、行アドレスを用いて画像メモリ2を行単位で
走査し、行単位の画像の射影を用いて1字ずつ認識対象
文字画像を切り出し、各文字の入力画像上の文字アドレ
スを検出する。5は認識部であり、文字切り出し部4で
切り出した認識対象文字のストローク等の特徴量を求
め、あらかじめ辞書6に登録されている文字の特徴量と
照合し、最も似た文字を認識候補文字とする。7は編集
部であり、行方向判定部3で求めた行方向及び文字切り
出し部4で求めた行アドレスと文字アドレスを用いて、
認識部5で抽出した認識候補文字を文章の意味が理解で
きる順序に編集し、文章メモリ8に文字コードで格納す
る。
FIG. 1 is a block diagram of an embodiment of a character recognition device according to the present invention. An image input unit 1 scans an image including a character to be recognized, inputs the image with a binary signal, and stores it in the image memory 2. Reference numeral 3 denotes a row direction determination unit that sets a square area for the input image stored in the image memory 2 and scans the area to determine whether the input image is vertically or horizontally written. Reference numeral 4 denotes a character slicing unit, which scans the image memory 2 by using the line direction detected by the line direction determination unit 3 to detect a row address, scans the image memory 2 using the line address in units of lines, The character image to be recognized is cut out one by one using the projection of the unit image, and the character address on the input image of each character is detected. Reference numeral 5 denotes a recognition unit, which obtains a feature amount such as a stroke of the recognition target character cut out by the character cutout unit 4 and collates it with the feature amount of the character registered in the dictionary 6 in advance to identify the most similar character as a recognition candidate character. And An editing unit 7 uses the line direction obtained by the line direction determining unit 3 and the line address and the character address obtained by the character cutting unit 4,
The recognition candidate characters extracted by the recognition unit 5 are edited in an order in which the meaning of the sentence can be understood, and stored in the sentence memory 8 as a character code.

以上のように構成された文字認識装置について、第2図
に示す入力画像Pを例に説明する。
The character recognition device configured as described above will be described by taking the input image P shown in FIG. 2 as an example.

画像入力部1から入力された画像Pは文字部1、白部O
の2値データで画像メモリ2に蓄えられる。まず行方向
判定部3で画像メモリ2に蓄えられている入力画像Pを
左上から横方向にm画素、縦方向にm画素走査して、入
力画像の内の正方形領域P′における文字部を形成する
画素の縦方向ヒストグラムHvと横方向ヒストグラムHh
求めると第2図に示す様になる。文字部と文字間部を分
けるために、ヒストグラムHvとHhそれぞれに対してヒス
トグラムの値がO画素以下である文字間部分とO画素よ
り大い画素数の文字部分に分け、各部分の先頭アドレス
を求める。第2図中のys1・ys2……ysi……及びxs1・x
s2……xsi……は文字部分の先頭アドレスであり、ye1
ye2……yei……及びxe1・xe2……xei……は文字間部分
の先頭アドレスである。このアドレスから正方形領域
P′における縦方向の文字間隔長の平均値SPYと横方向
の文字間隔長SPXとを比較する。ここで、 SPY=ave(Ys(i+1)-Yei) SPX=ave(Xs(i+1)-Xei) ただし、ave(f(i))は、i=1,2,…におけるf
(i)の平均値を示す。
The image P input from the image input unit 1 includes a character portion 1 and a white portion O.
And is stored in the image memory 2 as binary data. First, the row direction determination unit 3 scans the input image P stored in the image memory 2 from the upper left by m pixels in the horizontal direction and m pixels in the vertical direction to form a character portion in a square area P ′ in the input image. The vertical histogram H v and the horizontal histogram H h of the selected pixels are as shown in FIG. In order to separate the character portion and the character portion from each other, for each of the histograms H v and H h, it is divided into a character portion whose histogram value is O pixels or less and a character portion having a pixel number larger than O pixels. Find the start address. Y s1・ y s2 …… y si …… and x s1・ x in Fig. 2
s2 …… x si …… is the start address of the character part, and y e1
y e2 …… y ei …… and x e1・ x e2 …… x ei …… are the start addresses of the characters. From this address, the average value SP Y of the vertical character spacing length in the square area P ′ is compared with the horizontal character spacing length SP X. Where SP Y = ave (Y s (i + 1) -Y ei ) SP X = ave (X s (i + 1) -X ei ), where ave (f (i)) is i = 1, F in 2, ...
The average value of (i) is shown.

正方形領域P′においては、SPY>SPXとなり、正方形領
域P′ひいては入力画像Pの行方向は横書きであること
がわかる。
In the square area P ′, SP Y > SP X , and it can be seen that the square area P ′ and thus the input image P are written horizontally in the horizontal direction.

次に文字切り出し部4では、入力画像Pの行方向が横書
きと決定したことから、入力画像全体における文字部を
形成する画素の縦方向のヒストグラムHlを求めて、入力
画像Pの行アドレス(ls1,le1)…(lsi,lei)…を求め
る。第2図に結果を示す。行アドレスを用いて画像メモ
リ2から第3図に示す行画像Lを抽出する。抽出した行
画像Lを射影してヒストグラムHcを求めると第3図に示
す様になる。ヒストグラムHcから1字1字の横方向のア
ドレス(cs1,ce1)…(csi,cei)…を求め、認識対象文
字画像を1字ずつ切り出し、さらに、行アドレスと組合
せて文字アドレスを決定する。
Next, in the character clipping unit 4, since the line direction of the input image P is determined to be horizontal writing, the vertical histogram H l of the pixels forming the character part in the entire input image is obtained, and the line address of the input image P ( l s1 , l e1 ) ... (l si , l ei ) ... The results are shown in FIG. The row image L shown in FIG. 3 is extracted from the image memory 2 using the row address. When the histogram H c is obtained by projecting the extracted row image L, it becomes as shown in FIG. The horizontal address (c s1 , c e1 ) ... (c si , c ei ) ... of each character is obtained from the histogram H c , the character images to be recognized are cut out one by one, and the characters are combined with the line address. Determine the address.

認識部5には切り出された認識対象文字の矩形Rが順次
入力される。第4図(a)に切り出された認識対象文字
『松』を示す。切り出した『松』の各画素について、第
4図(b)の矢印が示す方向に着目画素を含んでM個以
上(Mはあらかじめ設定)連っているか否かを調べ方向
コードを設定する。方向コード毎に各画素の連結性を調
べてストロークを抽出し、ストロークの数・位置・長さ
等の特徴量を抽出する。第4図(a)に認識対象文字
『松』のストローク抽出結果を示す。抽出した特徴量を
辞書6に登録されている文字の特徴量と照合し、最も似
た文字「松」を認識候補文字とする。
The cutout rectangle R of the recognition target character is sequentially input to the recognition unit 5. FIG. 4 (a) shows the cut-out recognition target character "pine". For each of the cut out "pine" pixels, it is checked whether or not there are M or more (M is preset) including the pixel of interest in the direction indicated by the arrow in FIG. 4 (b), and the direction code is set. Strokes are extracted by checking the connectivity of each pixel for each direction code, and feature quantities such as the number, position, and length of strokes are extracted. FIG. 4A shows the stroke extraction result of the recognition target character "pine". The extracted feature amount is collated with the feature amount of the character registered in the dictionary 6, and the most similar character "pine" is set as the recognition candidate character.

認識部5から順次抽出される入力画像Pから切り出され
た認識対象文字の認識候補文字は、入力画像Pが横書き
であること及びそれぞれの文字アドレスから、編集部7
で「松」「下」「電」「器」(登録商標)…と横方向に
左上から右下へ文字をならべて、文章の意味が理解でき
るように編集され文章メモリ8に文字コードで蓄えられ
る。
The recognition candidate character of the recognition target character cut out from the input image P that is sequentially extracted from the recognition unit 5 is the editing unit 7 based on that the input image P is in horizontal writing and each character address.
"Matsu", "Lower", "Den", "Container" (registered trademark), etc. are arranged horizontally from the upper left to the lower right and edited so that the meaning of the sentence can be understood and stored in the sentence memory 8 with a character code. To be

以上のように構成された文字認識装置では、簡易な方法
で求めた行方向及び行アドレスを用いて、認識対象文字
の切り出し、さらに認識候補文字の編集を行うことによ
り、文章の意味が理解できる文字列を作成することがで
きる。さらに、文章メモリを文書処理装置等に接続する
ことにより、新たな文書編集が可能となる。
With the character recognition device configured as described above, the meaning of the sentence can be understood by cutting out the recognition target character and further editing the recognition candidate character using the line direction and line address obtained by a simple method. You can create strings. Furthermore, a new document can be edited by connecting the text memory to a document processing device or the like.

尚、本実施例では入力画像の内、m×m画素の正方形領
域を走査して行方向を判定したが、数画素の差である疑
似正方形の領域を走査して、行方向を判定しても問題は
ない。
In this embodiment, in the input image, the square direction of m × m pixels is scanned to determine the row direction. However, the pseudo square area having a difference of several pixels is scanned to determine the row direction. There is no problem.

発明の効果 本発明によれば、画像入力部で入力された画像の内、疑
似正方形(正方形も含む)の領域を縦方向・横方向に走
査して文字部を形成する画素のヒストグラムを求め、ヒ
ストグラムの値がN画素以下である文字間部の連続する
走査線の数で定義される文字間隔長の平均値を縦方向と
横方向で比較することにより縦書き・横書きを判定する
という簡易な方法で高速に入力画像の行方向を抽出する
ことにより、書式が未知の文書に対して文章の意味が理
解できるように認識候補文字を編集することが可能とな
る。
EFFECTS OF THE INVENTION According to the present invention, in an image input by the image input unit, a pseudo square (including square) region is scanned in the vertical and horizontal directions to obtain a histogram of pixels forming a character portion, A simple method of determining vertical writing / horizontal writing by comparing the average value of the character interval length defined by the number of continuous scanning lines in the character space where the value of the histogram is N pixels or less in the vertical direction and the horizontal direction. By extracting the line direction of the input image at high speed by the method, it becomes possible to edit the recognition candidate characters so that the meaning of the sentence can be understood for a document whose format is unknown.

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

第1図は本発明における一実施例による文字認識装置の
構成図、第2図は入力画像及び入力画像の行方向と行ア
ドレスの判定方法の説明図、第3図は入力画像内の認識
対象文字切り出し方法の説明図、第4図は文字認識方法
の説明図である。 1……画像入力部、2……画像メモリ、3……行方向判
定部、4……文字切り出し部、5……認識部、6……辞
書、7……編集部、8……文章メモリ。
FIG. 1 is a block diagram of a character recognition apparatus according to an embodiment of the present invention, FIG. 2 is an explanatory diagram of an input image and a method of determining a line direction and a line address of the input image, and FIG. 3 is a recognition target in the input image. FIG. 4 is an explanatory diagram of a character cutting method, and FIG. 4 is an explanatory diagram of a character recognition method. 1 ... Image input unit, 2 ... Image memory, 3 ... Line direction determination unit, 4 ... Character cutout unit, 5 ... Recognition unit, 6 ... Dictionary, 7 ... Editing unit, 8 ... Text memory .

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】認識対象文字を含む画像を入力する画像入
力部と、前記画像入力部で入力された画像の内、疑似正
方形(正方形も含む)の領域を縦方向・横方向に走査し
て文字部を形成する画素のヒストグラムを求め、ヒスト
グラムの値がN画素以下である文字間部の連続する走査
線の数で定義される文字間隔長の平均値を縦方向と横方
向で比較することにより縦書き・横書きを判定する行方
向判定部と、入力画像から認識対象文字を切り出す文字
切り出し部と、前記認識対象文字を辞書と照合すること
により認識候補文字を抽出する認識部と、前記認識候補
文字を編集する編集部を有することを特徴とする文字認
識装置。
1. An image input section for inputting an image including a character to be recognized, and a pseudo-square (including a square) area in the image input by the image input section is scanned in the vertical and horizontal directions. Obtaining a histogram of pixels forming a character portion, and comparing the average value of the character interval length defined by the number of continuous scanning lines in the character portion where the value of the histogram is N pixels or less in the vertical direction and the horizontal direction. A line direction determination unit that determines vertical writing / horizontal writing by a character cutting unit that cuts out a recognition target character from an input image; a recognition unit that extracts a recognition candidate character by collating the recognition target character with a dictionary; A character recognition device having an editing unit for editing a candidate character.
JP60182014A 1985-08-20 1985-08-20 Character recognition device Expired - Lifetime JPH0797390B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60182014A JPH0797390B2 (en) 1985-08-20 1985-08-20 Character recognition device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60182014A JPH0797390B2 (en) 1985-08-20 1985-08-20 Character recognition device

Publications (2)

Publication Number Publication Date
JPS6254380A JPS6254380A (en) 1987-03-10
JPH0797390B2 true JPH0797390B2 (en) 1995-10-18

Family

ID=16110824

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60182014A Expired - Lifetime JPH0797390B2 (en) 1985-08-20 1985-08-20 Character recognition device

Country Status (1)

Country Link
JP (1) JPH0797390B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3090342B2 (en) * 1991-05-30 2000-09-18 株式会社東芝 Character string direction discriminator
JPH1011542A (en) * 1996-06-20 1998-01-16 Fujitsu Ltd Character recognition device
JP5812702B2 (en) * 2011-06-08 2015-11-17 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Reading order determination apparatus, method and program for determining reading order of characters
JP6863753B2 (en) * 2017-01-20 2021-04-21 リード テクノロジーズ,インコーポレイティド Devices, methods and computer-readable storage media that determine the angle of rotation of text

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55127678A (en) * 1979-03-22 1980-10-02 Nec Corp Character array direction detector
JPS55135972A (en) * 1979-04-10 1980-10-23 Toshiba Corp Character line direction discrimination circuit

Also Published As

Publication number Publication date
JPS6254380A (en) 1987-03-10

Similar Documents

Publication Publication Date Title
US5410611A (en) Method for identifying word bounding boxes in text
Shi et al. Line separation for complex document images using fuzzy runlength
JP2713622B2 (en) Tabular document reader
Gebhardt et al. Document authentication using printing technique features and unsupervised anomaly detection
EP0481979A1 (en) Document recognition and automatic indexing for optical character recognition.
JPH05242292A (en) Separating method
JPH11161737A (en) Method and device for recognizing handwriting word
JPH01253077A (en) Detection of string
Carter et al. Automatic recognition of printed music
Amin et al. Page segmentation and classification utilizing bottom-up approach
JPH0797390B2 (en) Character recognition device
CN115050025A (en) Knowledge point extraction method and device based on formula recognition
JP2861860B2 (en) Address line extraction device
JP2661898B2 (en) Character recognition device
JP3276555B2 (en) Format recognition device and character reader
JP2537973B2 (en) Character recognition device
JPH0578068B2 (en)
JPH07230525A (en) Method for recognizing ruled line and method for processing table
Mirzaian A minimum separation algorithm for river routing with bounded number of jogs
Sambyal et al. Connected component based English character set segmentation
Gayashan et al. Old Sinhala newspaper article segmentation for content recognition using image processing
JPH0564396B2 (en)
JP2894111B2 (en) Comprehensive judgment method of recognition result in optical type character recognition device
JPS6227887A (en) Character type separating system
JP3100825B2 (en) Line recognition method