JPH06150055A - Character recognizing device - Google Patents

Character recognizing device

Info

Publication number
JPH06150055A
JPH06150055A JP4296850A JP29685092A JPH06150055A JP H06150055 A JPH06150055 A JP H06150055A JP 4296850 A JP4296850 A JP 4296850A JP 29685092 A JP29685092 A JP 29685092A JP H06150055 A JPH06150055 A JP H06150055A
Authority
JP
Japan
Prior art keywords
japanese
area
circumscribing rectangle
circumscribing
english
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
JP4296850A
Other languages
Japanese (ja)
Inventor
Yumiko Ikemure
由美子 池牟禮
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 JP4296850A priority Critical patent/JPH06150055A/en
Publication of JPH06150055A publication Critical patent/JPH06150055A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enable highly accurate recognition even for a document mixing Japanese and English sentences by judging whether the sentence is the Japanese sentence or English sentence while calculating a non-average height rate as the rate of a rectangle provided with a height higher than the average height of integrated circumscribed rectangles. CONSTITUTION:A recognizing area detection part 3 detects the rectangles circumscribed on the linked black picture elements of image data stored in an image data storage part 2 and detects an area for each attribute such as a character, graphic, table and image (photograph) basing on the size of circumscribed rectangles, the density of black picture elements and the complicated degree of picture elements. On the other hand, an attribute sort part 4 sorts the respective areas corresponding to the attributes so as to perform recognition processing corresponding to the respective attributes. Then, concerning the are where the character is sorted by attribute by the attribute sorting part 4, a Japanese/English sentence judging means 5 judges whether that area is a Japanese sentence area or an English sentence area basing on the features of characters themselves inside the area. In this case, the Japanese sentence/English sentence is judged while calculating the non-average height rate as the rate of the rectangle having the height higher than the average height of integrated circumscribed rectangles.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はスキャナ等の光学的手段
を用いて文書画像を取り込み、取り込んだ画像データか
ら文字,図形,表等の属性毎に領域を検出し、各属性に
応じた認識処理を行う文字認識装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention captures a document image by using an optical means such as a scanner, detects an area for each attribute such as a character, a figure and a table from the captured image data, and recognizes according to each attribute. The present invention relates to a character recognition device that performs processing.

【0002】[0002]

【従来の技術】近年、印刷文書のデータベース化や文書
の再利用を目的として、文書等の電子化が広く行われて
おり、そのためのコンピュータ等への入力装置として文
字認識装置が用いられている。
2. Description of the Related Art In recent years, digitization of documents and the like has been widely performed for the purpose of creating a database of printed documents and reusing documents, and a character recognition device is used as an input device to a computer or the like for that purpose. .

【0003】以下に従来の文字認識装置について説明す
る。従来の文字認識装置は、認識効率を向上させるた
め、画像データから検出された文字領域を和文領域と英
文領域とに判別し、それぞれ別個に文字認識処理を行っ
ていた。
A conventional character recognition device will be described below. In order to improve the recognition efficiency, the conventional character recognition device distinguishes a character area detected from image data into a Japanese sentence area and an English sentence area, and performs character recognition processing separately.

【0004】文字領域が和文領域であるか英文領域であ
るかを判定するには、英文は単語間スペースと単語内の
文字間のスペースとの2タイプのスペースが存在し、文
字に外接する矩形の間の距離の分布をとると分布のピー
クが2箇所検出できるのに対し、日本語では文字間のス
ペースのみしか存在しないため、文字に外接する矩形の
間の距離の分布をとると分布のピークが2箇所検出され
ることはない、という特徴を基にしていた。
In order to determine whether the character area is a Japanese text area or an English text area, there are two types of spaces in an English sentence, that is, a space between words and a space between characters in a word, and a rectangle circumscribing a character. When the distribution of the distances between the two is detected, the peaks of the distribution can be detected at two points. However, in Japanese, only the spaces between the characters exist. Therefore, if the distribution of the distances between the rectangles circumscribing the characters is taken, It was based on the feature that no two peaks were detected.

【0005】以上のように構成された文字認識装置につ
いて、以下その動作を説明する。始めに、スキャナによ
って取り込まれた画像データから連結する黒画素に外接
する矩形を外接矩形として検出し、外接矩形の大きさと
外接矩形内の黒画素密度から、文字外接矩形と文字以外
の外接矩形とに分類する。
The operation of the character recognizing device constructed as above will be described below. First, the rectangle circumscribing the black pixels connected from the image data captured by the scanner is detected as the circumscribed rectangle, and the character circumscribed rectangle and the circumscribed rectangle other than the character are determined from the size of the circumscribed rectangle and the black pixel density in the circumscribed rectangle. Classify into.

【0006】次に、分類された文字外接矩形を統合する
ことにより文字領域を検出する。次に、指定された文字
領域の外接矩形を検出する。
Next, the character area is detected by integrating the classified character circumscribing rectangles. Next, the circumscribed rectangle of the specified character area is detected.

【0007】次に、検出された各外接矩形に対して左右
に隣接する外接矩形を取り出し外接矩形間の距離の分布
をとる。
Next, the circumscribed rectangles that are adjacent to the left and right of each of the detected circumscribed rectangles are extracted and the distribution of the distances between the circumscribed rectangles is obtained.

【0008】次に、外接矩形間の距離の分布のピークが
2箇所検出できた場合はその文字領域を英文領域と判定
し、それ以外は和文領域と判定する。
Next, when two peaks of the distribution of the distance between the circumscribed rectangles can be detected, the character area is determined to be an English text area, and the other areas are determined to be a Japanese text area.

【0009】次に、和文領域は漢字,平仮名,片仮名等
の日本語文字認識を行い、英文領域はアルファベット等
の英文字認識を行う。
Next, the Japanese area recognizes Japanese characters such as kanji, hiragana and katakana, and the English area recognizes alphabetic characters such as alphabets.

【0010】[0010]

【発明が解決しようとする課題】しかしながら上記従来
の構成では、タイプライター等で作成されたモノスペー
ス文書等では文字の種類によって外接矩形間の距離が変
化し、イタリック体等で書かれた文書については字体が
傾いているので外接矩形が重なってしまうため、単語内
の文字間のスペースを安定して検出できなかった。
However, in the above-mentioned conventional configuration, in a monospace document created by a typewriter or the like, the distance between circumscribing rectangles changes depending on the type of character, and a document written in italics or the like is used. Since the fonts are tilted and the circumscribed rectangles overlap, the space between characters in the word could not be detected stably.

【0011】このため、英文領域であっても外接矩形の
距離の分布のピークが2つにならず、英文領域を和文領
域と誤判定してしまい、認識率が低下し信頼性、汎用性
に欠けるという問題点を有していた。
Therefore, even in the English text area, the distribution of the distances of the circumscribed rectangles does not have two peaks, and the English text area is erroneously determined as the Japanese text area, and the recognition rate is lowered, resulting in reduced reliability and versatility. It had a problem of chipping.

【0012】本発明は上記従来の問題点を解決するもの
で、文書の種類や、字体の種類に係わりなく、正確で安
定した認識結果を得ることのできる信頼性、汎用性に優
れた文字認識装置を提供することを目的とする。
The present invention solves the above-mentioned problems of the prior art. Character recognition excellent in reliability and versatility that can obtain an accurate and stable recognition result regardless of the type of document and the type of font. The purpose is to provide a device.

【0013】[0013]

【課題を解決するための手段】この目的を達成するため
に本発明の文字認識装置は、二値化された認識対象文書
から認識する文字領域の座標を連結黒画素特徴より検出
する文字領域検出手段と、前記文字領域検出手段で検出
された文字領域に対して連結黒画素の外接矩形を検出し
て外接矩形総数を検出する外接矩形検出手段と、他の外
接矩形と重なる外接矩形を検出しそれらの外接矩形に外
接する外接矩形を検出する外接矩形統合手段と、他の外
接矩形と重なる外接矩形の割合を算出する重なり割合算
出手段と、上下方向に重なる外接矩形の割合を算出する
上下重なり割合算出手段と、出現頻度の最も高い外接矩
形の高さを外接矩形平均高さとして算出する外接矩形平
均高さ算出手段と、前記外接矩形平均高さ算出手段で算
出した外接矩形平均高さ以上の高さをもつ外接矩形の割
合を算出する非平均高さ割合算出手段と、前記重なり割
合算出手段で算出した重なり割合と上下重なり割合算出
手段で算出された上下重なり割合と前記非平均高さ割合
算出手段で算出された非平均高さ割合を基にその文字領
域が和文領域か英文領域かを判定する和文英文判定手段
と、前記和文英文判定手段で判定された和文領域に対し
て日本語文字認識を行う日本語文字認識手段と、前記和
文英文判定手段で判定された英文領域に対して英文字認
識を行う英文字認識手段と、を備えた構成を有してい
る。
In order to achieve this object, a character recognition device of the present invention detects a character area which detects a coordinate of a character area recognized from a binarized recognition target document from a connected black pixel feature. Means, a circumscribing rectangle detecting means for detecting a circumscribing rectangle of connected black pixels in the character area detected by the character area detecting means, and detecting a total number of circumscribing rectangles, and a circumscribing rectangle overlapping another circumscribing rectangle. A circumscribing rectangle unifying unit that detects a circumscribing rectangle that circumscribes those circumscribing rectangles, an overlap ratio calculating unit that calculates a ratio of a circumscribing rectangle that overlaps another circumscribing rectangle, and an upper and lower overlap that calculates a ratio of a circumscribing rectangle that vertically overlaps. A ratio calculating means, a circumscribing rectangle average height calculating means for calculating the height of the circumscribing rectangle having the highest appearance frequency as the circumscribing rectangle average height, and a circumscribing rectangle flat calculated by the circumscribing rectangle average height calculating means. A non-average height ratio calculating means for calculating a ratio of a circumscribed rectangle having a height equal to or higher than a height, an overlapping ratio calculated by the overlapping ratio calculating means, and an upper and lower overlapping ratio calculated by the upper and lower overlapping ratio calculating means A Japanese-English sentence determining unit that determines whether the character region is a Japanese sentence region or an English sentence region based on the non-average height percentage calculated by the average height percentage calculating unit, and a Japanese sentence region determined by the Japanese sentence English sentence judging unit. And a Japanese character recognizing unit for recognizing Japanese characters, and an English character recognizing unit for recognizing English characters in the English sentence region judged by the Japanese sentence English sentence judging unit.

【0014】[0014]

【作用】この構成によって、日本語及び英語の文字の特
徴から文字領域の和文英文判定を行うために、文書の作
成方法や書体の種類に関係なく正確に文字領域が和文領
域か英文領域かを判定することができ、認識確度を向上
させることができる。
[Operation] With this configuration, in order to determine whether the text area is Japanese or English based on the characteristics of Japanese and English characters, it is possible to accurately determine whether the text area is a Japanese area or an English area regardless of the document creation method or typeface. It is possible to make a determination and improve the recognition accuracy.

【0015】[0015]

【実施例】以下本発明の一実施例について図面を参照し
ながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0016】図1は本発明の一実施例における文字認識
装置の機能ブロック図であり、図2は文字認識装置の装
置ブロック図である。
FIG. 1 is a functional block diagram of a character recognition device according to an embodiment of the present invention, and FIG. 2 is a device block diagram of the character recognition device.

【0017】1は認識画像文書をスキャナにより2値化
された画像データに変換して取り込む画像データ取り込
み部、2は画像データ取り込み部1によって取り込まれ
た画像データを格納する画像データ格納部、3は画像デ
ータ格納部2に格納されている画像データの連結黒画素
に外接する矩形を検出し外接矩形の大きさ,黒画素の密
度,画素の複雑度に基づいて文字,図形,表,画像(写
真)のそれぞれの属性毎に領域を検出する認識領域検出
部、4は各属性に応じた認識処理を行うように各領域を
属性による選り分けをおこなう属性選り分け部、5は属
性選り分け部4で属性が文字と選り分けされた領域に対
してその領域が和文領域であるか英文領域であるかを領
域内の文字自体の特徴を基に判定する和文英文判定手
段、6は属性選り分け部4で属性が画像(写真)と選り
分けされた領域を処理する画像(写真)処理部、7は和
文英文判定手段5による判定結果が和文領域の場合に漢
字,平仮名,片仮名等の日本語文字用の文字認識を行う
日本語文字認識手段、8は和文英文判定手段5による判
定結果が英文領域の場合にアルファベット等の英文字用
の文字認識を行う英文字認識手段、9は属性選り分け部
4で属性が表,図形と選り分けされた領域を処理する表
図形処理部である。
Reference numeral 1 denotes an image data capturing section for converting a recognized image document into image data binarized by a scanner and capturing the image data. Reference numeral 2 denotes an image data storage section for storing the image data captured by the image data capturing section 1. Detects a rectangle circumscribing the concatenated black pixels of the image data stored in the image data storage unit 2, and detects characters, figures, tables, images (based on the size of the circumscribing rectangle, the density of black pixels, and the pixel complexity). Recognition area detection unit 4 for detecting an area for each attribute of (photograph), 4 is an attribute selection unit for performing selection processing according to each attribute so as to perform recognition processing according to each attribute, and 5 is an attribute selection unit 4 Is a Japanese-English sentence determination unit that determines whether the region is a Japanese sentence region or an English sentence region based on the characteristics of the characters themselves in the region, and 6 is an attribute selection item. An image (photo) processing unit that processes a region whose attribute is selected from the image (photo) in the unit 4, and 7 is a Japanese character such as Kanji, Hiragana, or Katakana when the determination result by the Japanese-English sentence determination unit 5 is a Japanese region. For recognizing characters for Japanese characters, 8 for recognizing characters for English characters such as alphabets when the result of judgment by the Japanese-English sentence judging unit 5 is an English region, 9 for attribute selection unit 4 This is a table / graphics processing unit that processes areas whose attributes are tables and graphics.

【0018】図2において、10は文字認識装置全体を
制御する中央処理装置(以下CPUと略す)、11は文
字認識プログラム等が格納されているリードオンリーメ
モリー(以下ROMと略す)、12は画像データ及び認
識プログラムのデータ等が格納されるランダムアクセス
メモリー(以下RAMと略す)、13は認識対象文書を
読み取って画像データに変換するスキャナ、14は外部
からCPU10に対して認識開始・終了等の指令を与え
るためのキーボード、15はCPU10によってRAM
12に格納された認識結果等を表示するCRTである。
In FIG. 2, 10 is a central processing unit (hereinafter abbreviated as CPU) that controls the entire character recognition device, 11 is a read-only memory (hereinafter abbreviated as ROM) that stores a character recognition program, and 12 is an image. Random access memory (hereinafter abbreviated as RAM) in which data and data of a recognition program are stored, 13 is a scanner that reads a document to be recognized and converts it into image data, and 14 is a CPU 10 from outside to start and end recognition. Keyboard for giving commands, 15 is RAM by CPU10
12 is a CRT that displays the recognition result and the like stored in 12.

【0019】和文英文判定手段5においては文字自体の
特徴を基にその領域が和文領域か英文領域かを判定する
が、その際に用いられる英文字の特徴は、(1)大文字
の“A”、小文字の“a”のように文字の高さにばらつ
きがある。(2)分離している文字が少ないので、連結
黒画素の外接矩形を検出した場合、外接矩形1つが1文
字と対応する。(3)外接矩形が他の外接矩形と重なる
ことはほとんどない。イタリック体の文字の場合は外接
矩形が他の外接矩形と重なるが、この場合でも横方向に
重なることがあっても上下方向に重なることはない。
The Japanese / English sentence determination means 5 determines whether the region is a Japanese region or an English region based on the feature of the character itself. The feature of the English character used at that time is (1) capital letter "A" , There are variations in the height of the characters, such as the lower case “a”. (2) Since there are few separated characters, when a circumscribed rectangle of connected black pixels is detected, one circumscribed rectangle corresponds to one character. (3) The circumscribed rectangle rarely overlaps with other circumscribed rectangles. In the case of italicized characters, the circumscribing rectangle overlaps with other circumscribing rectangles, but even in this case, the circumscribing rectangle does not overlap in the vertical direction even though it may overlap in the horizontal direction.

【0020】一方、日本語文字の特徴は、(1)英文字
に見られるような文字高さのばらつきはない。(2)漢
字が偏と旁等からなるように、日本語文字は複数の外接
矩形により1文字が形成される場合が多い。(3)日本
語文字を形成する外接矩形は上下左右どの方向にも重な
る。といったものである。
On the other hand, the characteristics of Japanese characters are: (1) There is no variation in character height as seen in English characters. (2) Japanese characters are often formed by a plurality of circumscribing rectangles so that the Kanji characters are composed of one-sided and one-sided. (3) The circumscribing rectangles that form Japanese characters overlap vertically, horizontally, and vertically. And so on.

【0021】以上のように構成された文字認識装置の和
文英文判定手段について、以下その動作を図3乃至図1
2を参照しながら説明する。
The operation of the Japanese / English sentence determining means of the character recognizing device configured as described above will be described below with reference to FIGS.
This will be described with reference to 2.

【0022】図3は本実施例における文字認識装置の和
文英文判定手段の初期設定処理のフローチャートであ
り、図4は和文英文判定手段の外接矩形統合処理のフロ
ーチャートであり、図5は和文英文判定手段の和文英文
判断処理のフローチャートであり、図6及び図9は画像
データの具体例を示す図であり、図7及び図10は外接
矩形検出処理結果の具体例を示す図であり、図8及び図
11は外接矩形統合処理結果の具体例を示す図であり、
図12は外接矩形検出処理の具体例を示す図である。
FIG. 3 is a flow chart of the initialization process of the Japanese / English sentence determination means of the character recognition device in this embodiment, FIG. 4 is a flow chart of the circumscribed rectangle integration process of the Japanese / English sentence determination means, and FIG. 5 is a Japanese / English determination. 6 is a flowchart showing a concrete example of image data, FIG. 7 and FIG. 10 are diagrams showing a concrete example of a circumscribed rectangle detection processing result, and FIG. FIG. 11 is a diagram showing a specific example of the circumscribed rectangle integration processing result,
FIG. 12 is a diagram showing a specific example of the circumscribing rectangle detection processing.

【0023】まず、初期設定処理を行う。図3におい
て、始めに、指定された文字領域内の連結黒画素の外接
矩形を検出し全ての外接矩形の座標情報をRAM12に
格納する(S1)。ここで、外接矩形の座標の座標系は
図12に示すように左上が原点で、水平方向の座標を
x、垂直方向の座標をyで表す。外接矩形は左上の座標
(x1,y1)と右下の座標(x2,y2)で表す。図
6の英文の画像データに対する外接矩形検出例が図7で
K1からK11までの11個の外接矩形が検出される。
又、図9の日本語の画像データの外接矩形検出例が図1
0でK12からK22までの11個の外接矩形が検出さ
れる。外接矩形平均高さを検出するためにRAM12の
ワークエリアlayworkを0クリアする(S2)。
次に、外接矩形の重なりを検査する回数を減らすために
外接矩形の格納順番をy1昇順に並び変える(S3)。
ここで、図7の外接矩形はy1でソートすることによ
り、K1→K2→K5→K11→K6→K9→K3→K
4→K7→K8→K10の順に格納される。又、図10
の外接矩形は、K12→K15→K18→K13→K1
4→K19→K21→K22→K16→K17→K20
の順である。次に、検出した外接矩形の総数を格納する
recTotal,他の外接矩形と重なる外接矩形数を
格納するmCt,上下に重なる外接矩形数を格納するv
mCtを0にする(S4)。
First, initial setting processing is performed. In FIG. 3, first, the circumscribed rectangles of the connected black pixels in the designated character area are detected, and the coordinate information of all the circumscribed rectangles is stored in the RAM 12 (S1). Here, in the coordinate system of the coordinates of the circumscribed rectangle, the upper left corner is the origin, the horizontal coordinate is x, and the vertical coordinate is y, as shown in FIG. The circumscribed rectangle is represented by the upper left coordinates (x1, y1) and the lower right coordinates (x2, y2). In the example of circumscribing rectangle detection for the English image data in FIG. 6, eleven circumscribing rectangles K1 to K11 are detected.
Further, an example of circumscribing rectangle detection of Japanese image data in FIG. 9 is shown in FIG.
At 0, 11 circumscribing rectangles K12 to K22 are detected. The work area laywork of the RAM 12 is cleared to 0 to detect the average height of the circumscribing rectangle (S2).
Next, the storage order of the circumscribed rectangles is rearranged in the ascending y1 order in order to reduce the number of times the circumscribed rectangles are overlapped (S3).
Here, the circumscribed rectangles in FIG. 7 are sorted by y1, so that K1 → K2 → K5 → K11 → K6 → K9 → K3 → K.
They are stored in the order of 4 → K7 → K8 → K10. Also, FIG.
The circumscribed rectangle is K12 → K15 → K18 → K13 → K1
4 → K19 → K21 → K22 → K16 → K17 → K20
In that order. Next, recTotal that stores the total number of detected circumscribing rectangles, mCt that stores the number of circumscribing rectangles that overlap other circumscribing rectangles, and v that stores the number of circumscribing rectangles that vertically overlap.
mCt is set to 0 (S4).

【0024】次に、外接矩形統合処理を行う。図4にお
いて、まず、外接矩形の総数検出と外接矩形の重なり検
査のために、検査の対象となる外接矩形のアドレスを格
納するbsBoxにS3でソートした1番目の外接矩形
を設定する(S5)。ここで、図7ではK1の外接矩
形、図10ではK12の外接矩形が設定される。次に、
外接矩形総数カウンタrecTotalを1進める(S
6)。bsBoxと重なる外接矩形があるか確認するた
めの対象外接矩形のアドレスを格納するobjBoxに
bsBoxの次の外接矩形アドレスをセットする(S
7)。ここで、bsBoxが図7のK1の場合はobj
BoxはK2で、bsBoxが図10のK12の場合は
objBoxにはK15が設定される。
Next, circumscribing rectangle integration processing is performed. In FIG. 4, first, in order to detect the total number of circumscribed rectangles and inspect the overlap of the circumscribed rectangles, the first circumscribed rectangle sorted in S3 is set in bsBox storing the address of the circumscribed rectangle to be inspected (S5). . Here, the circumscribed rectangle of K1 is set in FIG. 7, and the circumscribed rectangle of K12 is set in FIG. next,
The circumscribing rectangle total number counter recTotal is incremented by 1 (S
6). The circumscribing rectangle address next to bsBox is set in objBox that stores the address of the target circumscribing rectangle for checking whether or not there is a circumscribing rectangle overlapping with bsBox (S
7). Here, if bsBox is K1 in FIG. 7, obj is
Box is K2, and if bsBox is K12 in FIG. 10, K15 is set in objBox.

【0025】次に、objBoxがあり、且つ、obj
Boxのy1の値がbsBoxのy2+1の値より小さ
いかどうか調べる(S8)。noである場合は、bsB
oxに重なる外接矩形はobjBox以降にないものと
してS16へjumpする。yesである場合は、bs
Boxに重なる外接矩形が存在する可能性があるものと
して、bsBoxとobjBoxが重なっているか調べ
る(S9)。ここで、bsBoxのx1がobjBox
のx2より小さくて、且つbsBoxのx2がobjB
oxのx1より大きければbsBoxとobjBoxが
重なっていると判定される。図9ではbsBoxがK1
2でobjBoxがK13の場合等がこの例に当たる。
noである場合は、S15へjumpする。yesであ
る場合は、他の外接矩形と重なる外接矩形数カウンタm
Ctを1つ進める(S10)。
Next, there is an objBox, and obj
It is checked whether the y1 value of the Box is smaller than the y2 + 1 value of the bsBox (S8). bsB if no
The circumscribing rectangle overlapping ox is jumped to S16 as not existing after objBox. If yes, bs
As there is a possibility that a circumscribed rectangle that overlaps the Box exists, it is checked whether bsBox and objBox overlap (S9). Here, x1 of bsBox is objBox
X2 of bsBox is smaller than objB
If it is larger than x1 of ox, it is determined that bsBox and objBox overlap. In Figure 9, bsBox is K1
The case where the objBox is K13 in 2 corresponds to this example.
If no, jump to S15. If yes, a circumscribed rectangle number counter m that overlaps another circumscribed rectangle
Advance Ct by 1 (S10).

【0026】次に、bsBoxとobjBoxが上下に
重なっているか調べる(S11)。ここで、bsBox
のx2とobjBoxのx2の小さい方の値とbsBo
xのx1とobjBoxのx1の大きい方の値との差
が、bsBoxのy2とobjBoxのy2の小さい方
の値とbsBoxのy1とobjBoxのy1の大きい
方の値との差より大きければ、bsBoxとobjBo
xは上下に重なっていると判定される。図9ではbsB
oxがK18でobjBoxがK17の時がこの例にあ
たる。noである場合は、S13にjumpする。ye
sである場合は、上下に重なる外接矩形数カウンタvm
Ctを1つすすめる(S12)。
Next, it is checked whether or not bsBox and objBox are vertically overlapped (S11). Where bsBox
X2 of x and the smaller value of x2 of objBox and bsBo
If the difference between x1 of x and the larger value of x1 of objBox is greater than the difference between the smaller value of y2 of bsBox and y2 of objBox and the larger value of y1 of bsBox and y1 of objBox, bsBox And objBo
It is determined that x overlaps vertically. In FIG. 9, bsB
This is the case when ox is K18 and objBox is K17. If no, jump to S13. ye
If it is s, the circumscribed rectangle number counter vm that overlaps vertically
One Ct is recommended (S12).

【0027】次に、bsBoxとobjBoxの2つの
外接矩形に外接する矩形を検出して、その座標をbsB
oxに再設定することで、外接矩形を統合する(S1
3)。objBoxのデータを削除する(S14)。こ
こで、例としては図9のbsBoxがK18でobjB
oxがK17の時に、K18とK17の外接矩形が図1
1のT14で、bsBoxにはT14のー座標が設定さ
れ、objBoxのK17は削除される。objBox
の次のデータをobjBoxに再設定してS8にjum
pする(S15)。現在対象となっているbsBoxと
重なり検査をする外接矩形がなくなるまでS8からS1
5までの処理を繰り返す。
Next, a rectangle circumscribing two circumscribing rectangles bsBox and objBox is detected, and the coordinates thereof are set to bsB.
The circumscribed rectangles are integrated by resetting to ox (S1
3). The data of objBox is deleted (S14). Here, as an example, bsBox in FIG. 9 is objB with K18.
When ox is K17, the circumscribed rectangle of K18 and K17 is shown in Fig. 1.
At T14 of 1, the − coordinate of T14 is set in bsBox, and K17 of objBox is deleted. objBox
Next data of is reset to objBox and jumped to S8
p (S15). S8 to S1 until there is no circumscribed rectangle to be inspected that overlaps with the current bsBox.
The processes up to 5 are repeated.

【0028】次に、bsBoxと重なる外接矩形が存在
しなくなったと判定されたら、現在対象となっているb
sBoxの統合は終了したと判断し、layWorkエ
リアのbsBoxの高さ番目を1インクリメントする
(S16)。ここで、bsBoxの高さは、bsBox
のy2−bsBoxのy1+1より算出される。例とし
て、図11の統合された外接矩形T12の高さは12と
計算され、layWorkの12番目のカウントを1つ
すすめる。bsBoxに現在対象となっているbsBo
xの次の外接矩形データを設定する(S17)。次に、
bsBoxにデータが存在するか調べる(S18)。y
esである場合は、S6にjumpし、S6からS17
の処理を繰り返す。noである場合は、外接矩形統合処
理を終了する。
Next, if it is determined that the circumscribing rectangle that overlaps with bsBox no longer exists, the current target b
It is determined that the integration of sBox is completed, and the height number of bsBox in the layWork area is incremented by 1 (S16). Here, the height of bsBox is bsBox
Y2-bsBox y1 + 1. As an example, the height of the integrated circumscribing rectangle T12 in FIG. 11 is calculated to be 12, and the twelfth count of layWork is advanced by one. bsBo currently targeted for bsBox
The circumscribed rectangle data next to x is set (S17). next,
It is checked whether data exists in bsBox (S18). y
If it is es, jump to S6, and from S6 to S17
The process of is repeated. If it is no, the circumscribing rectangle integration process is terminated.

【0029】以上の処理によって、rectotal、
mCt、vmCt、layWorkの値が設定される。
By the above processing, rectotal,
The values of mCt, vmCt, and layWork are set.

【0030】図6の英文の画像データに対しては、re
ctotal=11,mCt=0,vmCt=0,la
yWorkの5番目=4,layWorkの6番目=
1,layWorkの9番目=3となり、図9の日本語
の画像データに対しては、rectotal=11,m
Ct=5,vmCt=1,layWorkの11番目=
3,layWorkの12番目=3となる。
For the English image data in FIG. 6, re
ctotal = 11, mCt = 0, vmCt = 0, la
5th in yWork = 4, 6th in layWork =
9th of 1, layWork = 3, and for the Japanese image data of FIG. 9, rectotal = 11, m
Ct = 5, vmCt = 1, 11th of layWork =
3, 12 = 3 in layWork.

【0031】次に、和文英文判断処理を行う。図5にお
いて、他の外接矩形と重なる外接矩形数カウンタmCt
と上下に重なる外接矩形数カウンタvmCtの外接矩形
総数recTotalに対する割合を算出する(S1
9)。ここで、重なり割合と上下重なり割合は、それぞ
れ、重なり割合=mCt/rectotal×100
%,上下重なり割合=vmCt/rectotal×1
00%として算出される。例として、図6の英文の画像
データに対しては、重なり割合=0,上下重なり割合=
0、図9の日本語の画像データに対しては、重なり割合
=45.4,上下重なり割合=9.0となる。
Next, a Japanese / English sentence determination process is performed. In FIG. 5, a circumscribed rectangle number counter mCt that overlaps another circumscribed rectangle
And the ratio of the circumscribing rectangle number counter vmCt that vertically overlaps with the total circumscribing rectangle number recTotal is calculated (S1).
9). Here, the overlap ratio and the top-bottom overlap ratio are respectively the overlap ratio = mCt / rectotal × 100.
%, Overlapping ratio = vmCt / rectotal * 1
It is calculated as 00%. As an example, with respect to the English image data in FIG. 6, the overlapping ratio = 0, the upper and lower overlapping ratio =
0, for the Japanese image data in FIG. 9, the overlapping ratio = 45.4, and the vertical overlapping ratio = 9.0.

【0032】次に、統合された外接矩形の平均高さを検
出する(S20)。layWorkの中で最も数値の高
い位置を外接矩形平均高さとする。layWorkの中
に最大の数値の位置が複数ある場合は、位置の大きいも
のを外接矩形平均高さとする。例として、図6の英文の
画像データに対しては、layWorkの5番目が4と
最も高いので外接矩形平均高さは5となり、図9の日本
語の画像データに対しては、layWorkの11番目
と12番目が3で同数であるが、位置の大きい方を採用
して外接矩形平均高さを12とする。
Next, the average height of the integrated circumscribing rectangles is detected (S20). The position having the highest numerical value in the layWork is the circumscribing rectangle average height. When there are a plurality of positions with the maximum numerical values in the layWork, the one with the largest position is the circumscribing rectangle average height. As an example, for the English image data of FIG. 6, the fifth laywork is the highest at 4, so the average height of the circumscribed rectangle is 5, and for the Japanese image data of FIG. The third and twelfth are 3 and the same number, but the one having the larger position is adopted and the circumscribed rectangle average height is set to 12.

【0033】次に、統合された外接矩形のうち外接矩形
平均高さの1.25倍以上の高さをもつ外接矩形の数を
算出し、その外接矩形総数recTotalに対する割
合を非平均高さ割合として算出する(S21)。例とし
て、図8の統合された外接矩形に対しては外接矩形平均
高さ5の1.25倍の高さをもつものが5つあり、非平
均高さ割合は45.5%である。又、図形11の統合さ
れた外接矩形では外接矩形平均高さ12の1.25倍以
上の高さを持つものは0で、非平均高さ割合も当然0%
である。
Next, the number of circumscribing rectangles having a height of 1.25 times or more the average height of the circumscribing rectangles among the integrated circumscribing rectangles is calculated, and the ratio to the total circumscribing rectangles recTotal is calculated as a non-average height ratio. Is calculated as (S21). As an example, there are five integrated circumscribing rectangles in FIG. 8 having a height of 1.25 times the circumscribing rectangle average height 5, and the non-average height ratio is 45.5%. Further, in the circumscribing rectangle in which the figure 11 is integrated, 0 is 1.25 times or more the circumscribing rectangle average height 12, and the non-average height ratio is naturally 0%.
Is.

【0034】次に、重なり割合が、あらかじめ定められ
た第一閾値以上(=20)であるか調べる(S22)。
noである場合は、S25へjumpする。yesであ
る場合は、上下重なり割合が、第二閾値以上(=10)
であるか調べる(S23)。yesである場合は、その
領域を日本語と判断してS27へjumpする。noで
ある場合は、上下重なり割合が、重なり割合の第三閾値
倍(=1/4倍)以上であるか調べる(S24)。ye
sである場合は、その領域を日本語と判断してS27へ
jumpする。noである場合は、非平均高さ割合が、
重なり割合の第四閾値倍(=2/3倍)に第五閾値(=
10)を加えたものより大きいか調べる(S25)。n
oである場合は、その領域を日本語と判断してS27へ
jumpする。yesである場合は、その領域を英文と
判断し、その領域の属性を英文に設定し、全ての処理を
終了する(S26)。次に、その領域を日本語と判断
し、その領域の属性を和文に設定し、全ての処理を終了
する(S27)。
Next, it is checked whether or not the overlapping ratio is equal to or larger than the first threshold value (= 20) set in advance (S22).
If no, jump to S25. If yes, the upper and lower overlapping ratio is greater than or equal to the second threshold (= 10)
Is checked (S23). If yes, the area is determined to be Japanese and jump to S27. If no, it is checked whether the upper and lower overlapping ratio is equal to or more than a third threshold value (= 1/4) of the overlapping ratio (S24). ye
If it is s, the area is judged to be Japanese and jump to S27. If no, the non-average height ratio is
The fourth threshold times (= 2/3 times) of the overlapping ratio is changed to the fifth threshold (=
It is checked whether it is larger than the value obtained by adding 10) (S25). n
If it is o, the area is judged to be Japanese and jump to S27. If yes, the area is determined to be English, the attribute of the area is set to English, and all processing is terminated (S26). Next, the area is determined to be Japanese, the attribute of the area is set to Japanese, and all the processing ends (S27).

【0035】以上の処理により、図6の画像データは重
なり割合が0%,上下重なり割合が0%,非平均高さ割
合が45.5%であることから英文領域と判断され、図
6の画像データは重なり割合が45.4%,上下重なり
割合が9.0%,非平均高さ割合が0%であることから
和文領域と判断され、認識対象領域が和文領域であるか
英文領域であるかを正しく判断することができる。
As a result of the above processing, the image data of FIG. 6 is determined to be an English region because the overlapping ratio is 0%, the vertical overlapping ratio is 0%, and the non-average height ratio is 45.5%. The image data is judged to be a Japanese sentence area because the overlapping ratio is 45.4%, the vertical overlapping ratio is 9.0%, and the non-average height ratio is 0%. You can judge correctly whether there is.

【0036】[0036]

【発明の効果】以上のように本発明は、外接矩形を統合
する際に、他の外接矩形と重なる外接矩形の割合である
重なり割合と上下に重なる外接矩形の割合である上下重
なり割合を算出し、更に統合された外接矩形の平均高さ
以上の高さを持つ矩形の割合である非平均高さ割合を算
出して、これらの情報によって得られる日本語と英語の
文字自体の特徴に着目して和文英文判定を行うため、モ
ノスペース文書等の文書の種類やイタリック体等の書体
に係わりなく案定した和文英文の判定が可能となり、和
文英文の混在する文書に対しても精度の高い認識を行う
ことのできる信頼性、汎用性に優れた文字認識装置を実
現できるものである。
As described above, according to the present invention, when the circumscribing rectangles are integrated, the overlapping ratio, which is the ratio of the circumscribing rectangle that overlaps the other circumscribing rectangle, and the vertical overlapping ratio, which is the ratio of the circumscribing rectangles that vertically overlap, are calculated. Then, calculate the non-average height ratio, which is the ratio of rectangles that have a height equal to or higher than the average height of the integrated circumscribing rectangle, and pay attention to the characteristics of the Japanese and English characters themselves obtained from this information. Since Japanese / English judgment is performed by using the Japanese / English judgment, it is possible to judge the proposed Japanese / English sentence regardless of the type of document such as monospaced document or italic typeface, and it is highly accurate even for documents with mixed Japanese / English sentence. It is possible to realize a character recognition device which is highly reliable and versatile for recognition.

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

【図1】本発明の一実施例における文字認識装置の機能
ブロック図
FIG. 1 is a functional block diagram of a character recognition device according to an embodiment of the present invention.

【図2】本発明の一実施例における文字認識装置の装置
ブロック図
FIG. 2 is a device block diagram of a character recognition device according to an embodiment of the present invention.

【図3】本発明の一実施例における文字認識装置の和文
英文判定手段の初期設定処理のフローチャート
FIG. 3 is a flowchart of an initial setting process of Japanese-English sentence determination means of the character recognition device in the embodiment of the present invention.

【図4】本発明の一実施例における文字認識装置の和文
英文判定手段の外接矩形統合処理のフローチャート
FIG. 4 is a flowchart of a circumscribing rectangle integration process of the Japanese / English sentence determination means of the character recognition device in the embodiment of the present invention.

【図5】本発明の一実施例における文字認識装置の和文
英文判定手段の和文英文判断処理のフローチャート
FIG. 5 is a flowchart of a Japanese / English sentence determination process of a Japanese / English sentence determination unit of the character recognition device in one embodiment of the present invention.

【図6】本発明の一実施例における画像データの具体例
を示す図
FIG. 6 is a diagram showing a specific example of image data according to an embodiment of the present invention.

【図7】本発明の一実施例における外接矩形検出処理結
果の具体例を示す図
FIG. 7 is a diagram showing a specific example of a circumscribed rectangle detection processing result according to an embodiment of the present invention.

【図8】本発明の一実施例における外接矩形統合処理結
果の具体例を示す図
FIG. 8 is a diagram showing a specific example of a circumscribed rectangle integration processing result according to an embodiment of the present invention.

【図9】本発明の一実施例における画像データの具体例
を示す図
FIG. 9 is a diagram showing a specific example of image data according to an embodiment of the present invention.

【図10】本発明の一実施例における外接矩形検出処理
結果の具体例を示す図
FIG. 10 is a diagram showing a specific example of a circumscribed rectangle detection processing result according to an embodiment of the present invention.

【図11】本発明の一実施例における外接矩形統合処理
結果の具体例を示す図
FIG. 11 is a diagram showing a specific example of a circumscribing rectangle integration processing result according to an embodiment of the present invention.

【図12】本発明の一実施例における外接矩形検出処理
の具体例を示す図
FIG. 12 is a diagram showing a specific example of circumscribing rectangle detection processing according to an embodiment of the present invention.

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

1 画像データ取り込み部 2 画像データ格納部 3 認識領域検出部 4 属性選り分け部 5 和文英文判定手段 6 画像(写真)処理部 7 日本語文字認識手段 8 英文字認識手段 9 表図形処理部 10 CPU 11 ROM 12 RAM 13 スキャナ 14 キーボード 15 CRT 1 Image Data Importing Section 2 Image Data Storage Section 3 Recognition Area Detection Section 4 Attribute Selection Section 5 Japanese / English Judgment Section 6 Image (Photo) Processing Section 7 Japanese Character Recognition Section 8 English Character Recognition Section 9 Table / Graphic Processing Section 10 CPU 11 ROM 12 RAM 13 Scanner 14 Keyboard 15 CRT

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】二値化された認識対象文書から認識する文
字領域の座標を連結黒画素特徴より検出する文字領域検
出手段と、前記文字領域検出手段で検出された文字領域
に対して連結黒画素の外接矩形を検出して外接矩形総数
を検出する外接矩形検出手段と、他の外接矩形と重なる
外接矩形を検出しそれらの外接矩形に外接する外接矩形
を検出する外接矩形統合手段と、他の外接矩形と重なる
外接矩形の割合を算出する重なり割合算出手段と、上下
方向に重なる外接矩形の割合を算出する上下重なり割合
算出手段と、出現頻度の最も高い外接矩形の高さを外接
矩形平均高さとして算出する外接矩形平均高さ算出手段
と、前記外接矩形平均高さ算出手段で算出した外接矩形
平均高さ以上の高さをもつ外接矩形の割合を算出する非
平均高さ割合算出手段と、前記重なり割合算出手段で算
出した重なり割合と上下重なり割合算出手段で算出され
た上下重なり割合と前記非平均高さ割合算出手段で算出
された非平均高さ割合を基にその文字領域が和文領域か
英文領域かを判定する和文英文判定手段と、前記和文英
文判定手段で判定された和文領域に対して日本語文字認
識を行う日本語文字認識手段と、前記和文英文判定手段
で判定された英文領域に対して英文字認識を行う英文字
認識手段とを備えたことを特徴とする文字認識装置。
1. A character area detecting unit for detecting coordinates of a character area recognized from a binarized recognition target document from a connected black pixel feature, and a connected black area for a character area detected by the character area detecting unit. A circumscribing rectangle detecting means for detecting a circumscribing rectangle of pixels to detect the total circumscribing rectangle, a circumscribing rectangle unifying means for detecting a circumscribing rectangle overlapping another circumscribing rectangle and detecting a circumscribing rectangle circumscribing the circumscribing rectangle, and the like. Of the circumscribing rectangle that overlaps with the circumscribing rectangle of the circumscribing rectangle, the overlapping ratio calculating means of calculating the ratio of the circumscribing rectangle that vertically overlaps, and the height of the circumscribing rectangle with the highest appearance frequency is the circumscribing rectangle average. A circumscribing rectangle average height calculating means for calculating the height, and a non-average height ratio calculation for calculating a ratio of circumscribing rectangles having a height equal to or higher than the circumscribing rectangle average height calculated by the circumscribing rectangle average height calculating means. And a character area based on the overlapping ratio calculated by the overlapping ratio calculating unit, the vertical overlapping ratio calculated by the vertical overlapping ratio calculating unit, and the non-average height ratio calculated by the non-average height ratio calculating unit. Is a Japanese-language area or an English-language area, a Japanese-English sentence determination means, a Japanese character recognition means for recognizing Japanese characters in the Japanese-language area determined by the Japanese-language sentence determination means, and a determination made by the Japanese-language sentence determination means. A character recognition device comprising an English character recognition means for recognizing an English character in a specified English text area.
JP4296850A 1992-11-06 1992-11-06 Character recognizing device Pending JPH06150055A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4296850A JPH06150055A (en) 1992-11-06 1992-11-06 Character recognizing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4296850A JPH06150055A (en) 1992-11-06 1992-11-06 Character recognizing device

Publications (1)

Publication Number Publication Date
JPH06150055A true JPH06150055A (en) 1994-05-31

Family

ID=17838974

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4296850A Pending JPH06150055A (en) 1992-11-06 1992-11-06 Character recognizing device

Country Status (1)

Country Link
JP (1) JPH06150055A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003030584A (en) * 2001-07-12 2003-01-31 Ricoh Co Ltd Document recognizing device, region identifying method for document image, and program and recording medium therefor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003030584A (en) * 2001-07-12 2003-01-31 Ricoh Co Ltd Document recognizing device, region identifying method for document image, and program and recording medium therefor
JP4616522B2 (en) * 2001-07-12 2011-01-19 株式会社リコー Document recognition apparatus, document image region identification method, program, and storage medium

Similar Documents

Publication Publication Date Title
EP0854434B1 (en) Ruled line extracting apparatus for extracting ruled line from normal document image and method thereof
EP1052593B1 (en) Form search apparatus and method
CN113139445A (en) Table recognition method, apparatus and computer-readable storage medium
JPH0721310A (en) Document recognizing device
JP2002015280A (en) Device and method for image recognition, and computer- readable recording medium with recorded image recognizing program
JPH06150055A (en) Character recognizing device
Malleron et al. Text lines and snippets extraction for 19th century handwriting documents layout analysis
JPH06187489A (en) Character recognizing device
JP2917427B2 (en) Drawing reader
JPH0721309A (en) Document recognizing device
JPH07160810A (en) Character recognizing device
JPH0916713A (en) Image area dividing method
JPH0628520A (en) Character recognition device
JPH0528310A (en) Form type document identification device
JP2887823B2 (en) Document recognition device
JPH10214308A (en) Character discrimination method
KR100248384B1 (en) Individual character extraction method in multilingual document recognition and its recognition system
JPH0573718A (en) Area attribute identifying system
JP3064508B2 (en) Document recognition device
JPH07168911A (en) Document recognition device
JP2687902B2 (en) Document image recognition device
JP2972443B2 (en) Character recognition device
JP2893781B2 (en) Character recognition device
JP2022020277A (en) Information processing device, information processing method, and program
JPH09161005A (en) Device and method for recognizing character and scanner using the same