JP2848560B2 - Image recognition method and apparatus - Google Patents

Image recognition method and apparatus

Info

Publication number
JP2848560B2
JP2848560B2 JP63242214A JP24221488A JP2848560B2 JP 2848560 B2 JP2848560 B2 JP 2848560B2 JP 63242214 A JP63242214 A JP 63242214A JP 24221488 A JP24221488 A JP 24221488A JP 2848560 B2 JP2848560 B2 JP 2848560B2
Authority
JP
Japan
Prior art keywords
image block
block
character
image
recognition
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
JP63242214A
Other languages
Japanese (ja)
Other versions
JPH0291785A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP63242214A priority Critical patent/JP2848560B2/en
Publication of JPH0291785A publication Critical patent/JPH0291785A/en
Application granted granted Critical
Publication of JP2848560B2 publication Critical patent/JP2848560B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Character Discrimination (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、文字パターンを含む画像ブロックを抽出し
て文字認識する画像認識方法及び装置に関するものであ
る。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image recognition method and apparatus for extracting an image block including a character pattern and recognizing the character.

[従来の技術] 従来、この種の装置においては、光学的文字認識での
文字の切出しをまず縦方向の黒画素ヒストグラムをとる
ことにより文字行の切出しを行い、その後に切出された
各文字行について横方向ヒストグラムをとることにより
文字の外接矩形(以下ブロツクと呼ぶ)を求めて行つて
いる。この際に、例えば「い」・「り」・「ル」・
「仏」などの分離文字においては、各分離文字のブロツ
クが左右二個のブロツクに分かれてしまうが、左右のブ
ロツクを合成した合成ブロツクが平均文字巾に近い巾に
なるときには合成ブロツクを1文字として切出すように
している。
2. Description of the Related Art Conventionally, in this type of apparatus, a character line is cut out by first taking a black pixel histogram in the vertical direction to cut out a character by optical character recognition. A circumscribed rectangle (hereinafter, referred to as a block) of a character is obtained by taking a horizontal histogram of the line. At this time, for example, "i", "ri", "le"
In the case of separated characters such as "Buddha", the block of each separated character is divided into two blocks on the left and right. When the combined block obtained by combining the left and right blocks has a width close to the average character width, one combined block is used. I try to cut it out.

ここで、文字認識動作を第6図に示す従来の文字認識
装置の概略的なブロツク構成に基づいて説明する。
Here, the character recognition operation will be described based on the schematic block configuration of the conventional character recognition device shown in FIG.

まず、読取部51で光学的に読み取つた原稿上のイメー
ジデータをメモリ52に格納する。次にイメージデータに
基づいてブロツク抽出部53で上述のような行の切出し及
びブロツクの抽出を行う。合成可能なブロツク同士があ
ればブロツク合成部54で合成し、文字バツフア55に格納
する。そして認識辞書部57に記憶されている文字の標準
パターンと文字バツフア55に格納されている単独ブロツ
ク或は合成ブロツクとを認識部56で文字認識する。この
ようにして文字認識された標準パターンを認識文字とし
てその文字コードを単独照合部58の単語バツフア(図示
しない)に格納する。単語ブツフアに所定の認識文字が
格納されると単語辞書部59に記憶されている単語辞書と
の単語照合を行うようにする。
First, image data on a document optically read by the reading unit 51 is stored in the memory 52. Next, based on the image data, the block extraction unit 53 performs the above-described line extraction and block extraction. If there are blocks that can be combined, they are combined by the block combining unit 54 and stored in the character buffer 55. The recognition unit 56 recognizes the character standard pattern stored in the recognition dictionary unit 57 and the single block or the composite block stored in the character buffer 55. The standard pattern thus recognized is used as a recognition character, and its character code is stored in a word buffer (not shown) of the single collation unit 58. When a predetermined recognition character is stored in the word buffer, word matching with the word dictionary stored in the word dictionary unit 59 is performed.

[発明が解決しようとする課題] しかしながら、上記従来例では、ピリオド,コンマ,
中黒及び半角数字など文字巾の小さい文字が混在してい
るために、例えば第7図に示すように“3"と“."が合成
されて“3."になつてしまいブロツクの合成を誤つてし
まうことがある。このため文字切出しの段階で、すでに
正しい文字候補が排除されてしまうことになる。これは
単語照合の段階で一文字程度の違いは許して比較するこ
とにより単語候補を見つけることによつて補填すること
も考えられるが、一文字の違いといえども正確性を失う
ことにより、またブロツク合成での誤りは単語を構成す
る文字数を誤ることになるので、長さの異なる単語同志
の類似度比較が必要となり単語照合が複雑となつてしま
う欠点がある。
[Problems to be solved by the invention] However, in the above conventional example, a period, a comma,
Since characters with a small character width, such as black and half-width numerals, are mixed, "3." and "." Are combined to form "3." as shown in FIG. You may make a mistake. For this reason, at the character extraction stage, correct character candidates are already eliminated. This can be compensated for by finding word candidates by comparing while allowing a difference of about one character at the word matching stage, but by losing the accuracy even for a single character, it is also possible to block Since the error in the above results in an error in the number of characters constituting a word, it is necessary to compare the similarity between words having different lengths, and there is a disadvantage that word matching becomes complicated.

本発明は上述の従来例に鑑みてなされたものであり、
文字パターンを含む画像ブロックの文字認識を行う際、
注目する第1画像ブロックとその隣の第2画像ブロック
を合成するか否かを判定し、合成する必要があると判定
された場合に、更に、その合成して得られる第3画像ブ
ロックの幅と予め設定されている所定の文字幅との差分
から、その第3画像ブロックの文字幅の正確度を求め
る。そして、その正確度に応じて、第3画像ブロックの
みを文字認識するか、第3画像ブロックに加えて第1画
像ブロック及び第2画像ブロックをも文字認識するかを
切り替えることで、合成する必要がある画像ブロック、
かつ文字認識する必要がある画像ブロックの種類をより
適切に選定できる画像認識方法及び装置を提供すること
を目的とする。
The present invention has been made in view of the above conventional example,
When performing character recognition of an image block containing a character pattern,
It is determined whether or not the first image block of interest and the second image block adjacent thereto are to be combined. If it is determined that the first image block needs to be combined, the width of the third image block obtained by the combination is further determined. Then, the accuracy of the character width of the third image block is determined from the difference between the character width and the predetermined character width. Then, according to the accuracy, it is necessary to perform the synthesis by switching between character recognition of only the third image block and character recognition of the first image block and the second image block in addition to the third image block. There are image blocks,
It is another object of the present invention to provide an image recognition method and apparatus capable of more appropriately selecting the type of an image block that needs to recognize characters.

[課題が解決するための手段] 上記目的を達成するために本発明の画像認識方法は以
下のような工程を備える。即ち、 画像情報を入力し、 前記画像情報より文字パターンを含む画像ブロックを
抽出し、 前記抽出した画像ブロック内の注目する第1画像ブロ
ックと、その隣の第2画像ブロックを合成する必要があ
るか否かを判定し、 前記判定により合成する必要があると判定された場合
に、前記第1画像ブロックと第2画像ブロックを合成し
た第3画像ブロックの幅と、予め設定されている所定幅
との差分から、前記第3画像ブロックの幅の正確度を求
め、 前記正確度に応じて、前記第3画像ブロックのみを文
字認識するか、該第3画像ブロックに加えて前記第1画
像ブロック及び前記第2画像ブロックをも文字認識する
かを切り替える。
[Means for Solving the Problems] In order to achieve the above object, the image recognition method of the present invention includes the following steps. That is, it is necessary to input image information, extract an image block including a character pattern from the image information, and synthesize a first image block of interest in the extracted image block and a second image block adjacent thereto. It is determined whether or not it is necessary to combine the first image block and the second image block, the width of the third image block obtained by combining the first image block and the second image block, and a predetermined predetermined width The accuracy of the width of the third image block is obtained from the difference between the first image block and the third image block. And whether or not the second image block is also subjected to character recognition.

また、上記目的を達成するために本発明の画像認識装
置は以下のような手段を備える。即ち、 画像情報を入力する入力手段と、 前記入力手段により入力した画像情報より文字パター
ンを含む画像ブロックを抽出する画像ブロック抽出手段
と、 前記画像ブロック抽出手段により抽出した画像ブロッ
クの内の注目する第1画像ブロックと、その隣の第2画
像ブロックを合成する必要があるか否かを判定する判定
手段と、 前記判定手段により合成する必要があると判定された
場合に、前記第1画像ブロックと第2画像ブロックを合
成した第3画像ブロックの幅と、予め設定されている所
定の文字幅との差分から、前記第3画像ブロックの文字
幅の正確度を求る正確度導出手段と、 前記正確度導出手段により求めた正確度に応じて、前
記第3画像ブロックのみを文字認識するか、該第3画像
ブロックに加え前記第1画像ブロック及び前記第2画像
ブロックをも文字認識するかを切り替えるよう制御する
文字認識制御手段とを有する。
Further, in order to achieve the above object, the image recognition device of the present invention includes the following means. That is, input means for inputting image information, image block extracting means for extracting an image block including a character pattern from the image information input by the input means, and attention from among the image blocks extracted by the image block extracting means. Determining means for determining whether or not it is necessary to combine a first image block and a second image block adjacent thereto; and when the determining means determines that the first image block needs to be combined, the first image block An accuracy deriving means for obtaining the accuracy of the character width of the third image block from a difference between the width of the third image block obtained by combining the first image block and the second image block, and a predetermined character width; According to the accuracy obtained by the accuracy deriving means, only the third image block is character-recognized or the first image block and the third image block are added in addition to the third image block. Also the serial second image block to control so as to switch whether to character recognition and a character recognition control unit.

[作用] 以上の構成により、画像情報より文字パターンを含む
画像ブロックを抽出して、その抽出した画像ブロックの
内の注目する第1画像ブロックを、その隣の第2画像ブ
ロックと合成する必要があるか否かを判定する。合成す
る必要があると判定された場合に、第1画像ブロックと
第2画像ブロックを合成した第3画像ブロックの幅と予
め設定されている所定の文字幅との差分から、当該第3
画像ブロックの文字幅の正確度を求める。そして、その
正確度に応じて、第3画像ブロックのみを文字認識する
か、第3画像ブロックに加えて第1画像ブロック及び第
2画像ブロックをも文字認識するかを切り替えるように
動作する。
[Operation] With the above configuration, it is necessary to extract an image block including a character pattern from the image information, and combine the first image block of interest in the extracted image blocks with the adjacent second image block. It is determined whether or not there is. If it is determined that the third image block needs to be synthesized, the third image block obtained by synthesizing the first image block and the second image block is determined from the difference between the predetermined character width and the third image block.
Find the accuracy of the character width of an image block. Then, according to the accuracy, an operation is performed to switch between character recognition of only the third image block and character recognition of the first image block and the second image block in addition to the third image block.

[実施例] 以下、添付図面を参照して本発明に係る好適な実施例
を詳細に説明する。
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

<第1の実施例の説明> まず、第1の実施例について説明する。<Description of First Embodiment> First, a first embodiment will be described.

第1図は本発明に係わる文字認識装置の第1の実施例
を示すブロツク図である。図において、1は第1の実施
例の文字認識装置を示している。2は本装置全体を制御
するCPUを示している。3はCPU2を動作させるための制
御プログラム,エラー処理プログラム,そして後述する
第3図(a),(b)に示すフローチヤートに従つたプ
ログラム等を格納しているROMを示し、4はROM3に格納
されている各種プログラムのワークエリア及びエラー処
理時の一時退避エリアとして用いるRAMを示している。
5は原稿画像を光学的に読み取る読取部を示し、6は読
取部5で読取つた画像データを格納するメモリを示して
いる。7はメモリ6に格納されている画像データより文
字行の切出しを行つた後に一文字分のブロツクを抽出す
るブロツク抽出部を示し、8はブロツク抽出部7で抽出
されたブロツクにおいて隣り合うブロツクとブロツク巾
(この場合、2つのブロツク巾をいう)が通常の一文字
分の文字巾を示す平均文字巾とほぼ等しい場合にブロツ
ク合成を行うブロツク合成部を示している。
FIG. 1 is a block diagram showing a first embodiment of the character recognition device according to the present invention. In the figure, reference numeral 1 denotes a character recognition device according to the first embodiment. Reference numeral 2 denotes a CPU for controlling the entire apparatus. Reference numeral 3 denotes a ROM storing a control program for operating the CPU 2, an error processing program, and programs according to flowcharts shown in FIGS. 3 (a) and 3 (b) which will be described later. A RAM used as a work area for various stored programs and a temporary save area during error processing is shown.
Reference numeral 5 denotes a reading unit that optically reads a document image, and reference numeral 6 denotes a memory that stores image data read by the reading unit 5. Reference numeral 7 denotes a block extracting unit for extracting a block of one character after extracting a character line from the image data stored in the memory 6, and 8 denotes a block and a block adjacent to each other in the blocks extracted by the block extracting unit 7. A block combining unit for performing block combining when the width (in this case, two block widths) is substantially equal to the average character width indicating the character width of one ordinary character.

そして、9はブロツク合成部8で合成した合成ブロツ
クの正確度を判定するブロツク正確度判定部を示し、10
はブロツク正確度判定部9での判定結果により出力され
るブロツク或はブロツク正確度判定部9で判定処理を行
わずに出力される単独ブロツクを格納する文字バツフア
を示している。このブロツク正確度判定部9により文字
バツフア10へ出力されるブロツク数は文字切出しを一回
行つたときの数である。11はブロツク正確度判定部9に
より出力される1回の文字切出しにおけるブロツクの総
数をカウントするブロツクカウンタを示している。12は
文字バツフア10に格納されたブロツクの文字パターンに
該当する後述の認識辞書部13に格納されている標準パタ
ーンをマッツチングさせて文字認識を行う認識部を示し
ている。13はマツチング用の標準パターンを格納してい
る認識辞書部を示している。
Numeral 9 denotes a block accuracy judging unit for judging the accuracy of the synthesized block synthesized by the block synthesizing unit 8;
Indicates a character buffer for storing a block output based on the result of the determination by the block accuracy determination section 9 or a single block output without performing the determination processing in the block accuracy determination section 9. The number of blocks output to the character buffer 10 by the block accuracy judging section 9 is the number when the character is cut out once. Reference numeral 11 denotes a block counter for counting the total number of blocks in one character cut-out outputted by the block accuracy judging section 9. Reference numeral 12 denotes a recognition unit that performs character recognition by matching a standard pattern stored in a recognition dictionary unit 13 described later, which corresponds to the character pattern of the block stored in the character buffer 10. Reference numeral 13 denotes a recognition dictionary unit that stores standard patterns for matching.

また、14は単語ブツフアを有し、認識部12での認識結
果に基づいて単語候補を挙げ、後述の単語辞書部15に格
納されている単語辞書と単語照合する単語照合部を示し
ている。15は認識結果の単語候補と照合させるための単
語辞書を記憶している単語辞書部を示している。
Reference numeral 14 denotes a word matching unit that has a word buffer, enumerates word candidates based on the recognition result of the recognition unit 12, and performs word matching with a word dictionary stored in a word dictionary unit 15 described later. Reference numeral 15 denotes a word dictionary unit that stores a word dictionary to be matched with a word candidate as a recognition result.

次に、第1の実施例の文字認識方法について説明す
る。
Next, a character recognition method according to the first embodiment will be described.

第2図(a),(b)は第1の実施例のCPU2の動作を
説明するフローチヤート、第3図は第1の実施例の単語
照合を説明する図である。
2A and 2B are flow charts for explaining the operation of the CPU 2 of the first embodiment, and FIG. 3 is a diagram for explaining word matching of the first embodiment.

まず、原稿は読取部5によつて光学的に読み取られ、
2値画像に変換されてメモリ6に記憶される(ステツプ
S1)。そしてブロツク抽出部7では、メモリ6に記憶さ
れたイメージデータを主走査方向、即ち、行方向に黒画
素ヒストグラムをとり、ヒストグラムの谷の位置を文字
行の切出し位置として文字行の切出しを行う(ステツプ
S2)。このようにして切出された文字行の領域につい
て、行を副走査方向、即ち、行方向に対して垂直な方向
に黒画素のヒストグラムをとり各文字魂の外接矩形(以
下ブロツクと呼ぶ)を求める(ステツプS3)。
First, the original is optically read by the reading unit 5,
It is converted to a binary image and stored in the memory 6 (step
S1). Then, the block extracting section 7 takes a black pixel histogram in the main scanning direction, that is, the row direction, from the image data stored in the memory 6 and cuts out a character line using the valley position of the histogram as a character line cutout position ( Step
S2). With respect to the region of the character line thus cut out, the line is taken as a histogram of black pixels in the sub-scanning direction, that is, in a direction perpendicular to the line direction, and a circumscribed rectangle (hereinafter, referred to as a block) of each character soul is obtained. Ask (Step S3).

次に、以下の処理手順をブロツク間について順次に行
う。まず一つ目の第1のブロツクのブロツク巾とその次
の第2のブロツクのブロツク巾との合計のブロツク巾を
算出し(ステツプS4)、予め設定されている所定の平均
文字巾とを比較する(ステツプS5)。この結果、ほとん
ど等しい(例えば誤差20%以内の差であれば等しいとす
る)と判定されたときには2つのブロツクを合成すべき
と判断してステツプ7へ進む。一方、誤差20%を越える
ときには2つのブロツクを合成すべきでないと判断して
第1のブロツクを単独ブロツクとしてブロツク正確度判
定部9に出力する。この単独ブロツク出力の場合には、
ブロツク正確度判定部9で何も処理を行わずに文字バツ
フア10に格納する。これと同時に、ブロツクカウンタ11
の内容を一つカウントアツプしてステツプS12に進む
(ステツプS6)。尚、ブロツクカウンタ11の初期値は
“0"とする。
Next, the following processing procedure is sequentially performed between blocks. First, the total block width of the block width of the first first block and the block width of the next second block is calculated (step S4) and compared with a predetermined average character width set in advance. (Step S5). As a result, when it is determined that they are almost equal (for example, if the difference is within 20% of the error), it is determined that the two blocks should be combined, and the process proceeds to step 7. On the other hand, if the error exceeds 20%, it is determined that the two blocks should not be combined, and the first block is output to the block accuracy determining section 9 as a single block. In the case of this single block output,
The block accuracy judging unit 9 stores the data in the character buffer 10 without performing any processing. At the same time, the block counter 11
Is counted up by one, and the process proceeds to step S12 (step S6). Note that the initial value of the block counter 11 is "0".

また、ステツプS5よりステツプS7に進んだ場合には、
隣り合う2個のブロツクを合成し、1つの合成ブロツク
を生成する(ステツプS6)。そして次の式に基づいてブ
ロツク合成の正確度を求める。
Also, if the process proceeds from step S5 to step S7,
Two adjacent blocks are synthesized to generate one synthesized block (step S6). Then, the accuracy of block synthesis is obtained based on the following equation.

以上の式に基づいて算出したブロツク正確度が10%よ
りも小さければ、即ち、合成ブロツク巾と平均文字巾と
の差が平均文字巾10%よりも小さければブロツクの合成
が正確と判断し、一方、ブロツク正確度が10%以上なら
ばブロツクの合成は不正確であるとして判断する。そこ
で、ブロツクの合成が不正確であると判断した場合に
は、2つのブロツクを合成する前のブロツクの状態でそ
れぞれ単独ブロツクを文字バツフア10へ出力し(ステツ
プS10)、さらに2つのブロツクを合成した合成ブロツ
クも文字バツフアに出力してステツプS12に進む(ステ
ツプS11)。以上のステツプS10ではブロツクカウンタ11
を2つカウントアツプし、続くステツプS11ではブロツ
クカウンタ11を1つカウントアツプする。従つてブロツ
クカウンタ11の値は“3"となる。またブロツクの合成は
正確であるとして判断した場合には、直接ステツプS11
に進んで合成ブロツクのみの出力を行つてステツプS11
に進む。この場合には、ブロツクカウンタ11の値は“1"
となる。
If the block accuracy calculated based on the above equation is smaller than 10%, that is, if the difference between the combined block width and the average character width is smaller than the average character width of 10%, it is determined that the block combination is accurate, On the other hand, if the block accuracy is 10% or more, it is determined that block synthesis is incorrect. Therefore, if it is determined that the composition of the blocks is incorrect, a single block is output to the character buffer 10 in the state of the blocks before the two blocks are composed (step S10), and two more blocks are composed. The synthesized block thus output is also output to the character buffer and the process proceeds to step S12 (step S11). In the above step S10, the block counter 11
Is counted up, and in the following step S11, the block counter 11 is counted up by one. Accordingly, the value of the block counter 11 becomes "3". If it is determined that the block synthesis is accurate, the process directly proceeds to step S11.
Proceed to step S11 to output only the synthesis block.
Proceed to. In this case, the value of the block counter 11 is "1".
Becomes

ここで、従来例のところで説明した第7図の例では、
“は”と“で”は平均文字巾との差が10%より小さいの
で単独ブロツクの出力が行われず、“3."は平均文字巾
との差が10%以上となり単独ブロツクの出力がなされる
ことになる。また“は",“で",“3."以外の文字のブロ
ツクの場合には合成が行われることはなく単独ブロツク
として文字バツフア10に出力されることになる。このよ
うに、各文字はブロツク合成の有無およびブロツク合成
の確定度に応じて、 (1)単独ブロツクのみの文字バツフア10への出力(ス
テツプS6)、 (2)合成ブロツクのみの文字バツフア10への出力(ス
テツプS11)、そして、 (3)単独ブロツクと合成ブロツクの文字バツフアへの
出力(ステツプS10,ステツプS11)、 の3通りで文字の切出しが実行される。上記の(1)及
び(2)の場合には、文字バツフア10へは1個のブロツ
クが出力される。また上記の(3)の場合には、文字バ
ツフア10へは3個のブロツク(単独ブロツク2個と合成
ブロツク1個)が出力させることになる。
Here, in the example of FIG. 7 described in the related art,
For “ha” and “de”, the difference between the average character width is less than 10%, so no single block is output. For “3.”, the difference from the average character width is 10% or more, and the single block is output. Will be. Also, in the case of a block of characters other than ",", "," and "3.", no combination is performed and the block is output to the character buffer 10 as a single block. As described above, each character is output to the character buffer 10 including only a single block (step S6) and (2) to the character buffer 10 including only a composite block according to the presence / absence of block synthesis and the degree of determination of block synthesis. (Step S11), and (3) Output of a single block and a composite block to the character buffer (Step S10, Step S11), and character extraction is performed. In the above cases (1) and (2), one block is output to the character buffer 10. In the case of the above (3), three blocks (two single blocks and one composite block) are output to the character buffer 10.

次に、ステップS12では、文字バツフア10からブロツ
クカウンタ11の値に応じた数のブロツクを1個ずつ取り
出し、認識部12で認識辞書13を用いることにより公知の
技術で文字認識を行う(ステツプS12)。そして認識結
果の文字コードは単語照合部14へ送られ、単語照合部15
内の単語バツフアに格納される。但し、ブロツクカウン
タ11の値が“3"の場合には、認識結果、即ち、文字コー
ドの送出に先だつて制御コードを単語照合部14内の単語
バツフアに送出し(ステツプS14)、その後に3つの文
字コードを送出する(ステツプS15)。ここで、前述の
(1),(2),(3)の各々の場合に応じて認識部12
は認識結果を送出する。まず(1)の場合には単独ブロ
ツクの文字コードが1つ送出され、(2)の場合には合
成ブロツクの文字コードが1つ送出され、(3)の場合
には制御コード,第1の単独ブロツクの文字コード,第
2の単独ブロツクの文字コード,そして合成ブロツクの
文字コードの4つが送出される。ここで、文字コードは
JIS2バイトコードが使用され、制御コードはJISコード
系で未使用の2バイトコードが使用されている。
Next, in step S12, the number of blocks corresponding to the value of the block counter 11 is extracted one by one from the character buffer 10, and character recognition is performed by a known technique using the recognition dictionary 13 in the recognition unit 12 (step S12). ). Then, the character code of the recognition result is sent to the word matching unit 14, and the word matching unit 15
Is stored in the word buffer. However, if the value of the block counter 11 is "3", the recognition result, that is, the control code is sent to the word buffer in the word collating unit 14 prior to sending the character code (step S14), and then 3 The two character codes are transmitted (step S15). Here, the recognition unit 12 according to each of the above-mentioned cases (1), (2), and (3).
Sends the recognition result. First, in the case of (1), one character code of the single block is transmitted, in the case of (2), one character code of the composite block is transmitted, and in the case of (3), the control code and the first code are transmitted. The character code of the single block, the character code of the second single block, and the character code of the composite block are transmitted. Where the character code is
JIS 2-byte codes are used, and unused 2-byte codes in the JIS code system are used as control codes.

このようにして、単語照合が可能となる単語バツフア
に1つの単語が蓄積されるまで上述の処理を繰り返す。
即ち、ステツプS15による認識結果の単語バツフアへの
送出が1回終了すると、その時点で単語照合が可能か否
かをステツプS16で判定する。ステツプS16で不可能と判
定された場合には、まず次行の切出しを必要とするか否
かを判定し(ステツプS17)、この判定で行切出しを必
要とした場合には1ページ分の処理が終了していない間
はステツプS2へ戻り上述の処理を繰り返す(ステツプS1
8)。またステツプS17の判定で行切出しを必要無しとし
た場合にはステツプS4に戻り上述の処理を繰り返す。
In this way, the above-described processing is repeated until one word is stored in the word buffer in which word matching can be performed.
That is, once the transmission of the recognition result to the word buffer in step S15 is completed, it is determined in step S16 whether word collation is possible at that time. If it is determined in step S16 that it is impossible, it is first determined whether or not the next line needs to be cut out (step S17). While the process is not completed, the process returns to step S2 to repeat the above processing (step S1
8). If it is determined in step S17 that line segmenting is not necessary, the process returns to step S4 to repeat the above-described processing.

このようにして、単語バツフアに文字コード(制御コ
ードを含む場合がある)による1つの単語が蓄積される
と、単語バツフアの中の制御コードの数を調べ、制御コ
ードが1つも含まれていないときは、単語バツフアの内
容をそのまま最終認識結果として出力する(ステツプS1
9,ステツプS20)。従つて外部には単語バツフアの内容
を認識結果として出力する(ステツプS27)。またステ
ツプS19で単語バツフアに制御コードが含まれていると
判定した場合は、次のように単語照合を行う。まず制御
コード以降に続く3個の文字コードがある場合には、第
1,第2のブロツクの文字コードがブロツク合成を行わな
い第1の文字認識を結果を示し、合成ブロツクの文字コ
ードはブロツク合成を行つた第2の文字認識の結果を示
している。このような条件で単語バツフアに制御コード
n個含まれているとすると、単語候補は2n通りの文字列
の組合せがあることになる。
In this way, when one word by the character code (which may include a control code) is accumulated in the word buffer, the number of control codes in the word buffer is checked, and no control code is included. At this time, the content of the word buffer is output as it is as the final recognition result (step S1).
9, step S20). Therefore, the contents of the word buffer are output to the outside as a recognition result (step S27). If it is determined in step S19 that the control code is included in the word buffer, word matching is performed as follows. First, if there are three character codes following the control code,
1. The character code of the second block indicates the result of the first character recognition without block synthesis, and the character code of the composite block indicates the result of the second character recognition with block synthesis. Assuming that the word buffer contains n control codes under such conditions, the word candidates have 2 n combinations of character strings.

ここで、“アルコール”という文字列を例に挙げ、第
3図を用いて説明する。この場合には、文字切出しの結
果“ル”の文字について前述の(3)が該当する。即
ち、“ル”は制御コードと3つの文字コードで表され
る。従つて文字列“アルコール”には“ル”の文字が2
つ含まれていることにより、単語候補は4通りとなる。
即ち、 の4通りの単語候補が挙げられる。そこですべての単語
候補について単語辞書部15の内容とのマツチングを行
い、単語辞書部15内の一致する単語候補を最終認識結果
とする。従つて上記の“アルコール”の場合、単語候補
の(a),(b),(c)は一致する単語が単語辞書部
15内に存在しないためにはじかれる。最後の単語候補の
(d)は一致する単語が単語辞書部15内に存在するの
で、この(d)の が正しい認識結果となる。従つて処理としては、ステツ
プS21で照合する単語の数(2n)だけ単語候補を挙げ、
一つづつ一致不一致を確認しながら単語照合を行う(ス
テツプS22,ステツプS23)。ここで、一致する単語がな
いままに次の単語候補が切れてしまった場合には、単語
候補すべてを認識結果とし(ステツプS24,ステツプS2
5)、この認識結果を外部に出力する(ステツプS27)。
またステツプS23で一致する単語候補を見つけたときに
は、一致した単語候補を認識結果とする(ステツプS2
6)。そして認識結果を外部に出力する(ステツプS2
7)。
Here, the character string "alcohol" will be described as an example with reference to FIG. In this case, the above-mentioned (3) applies to the character of "R" as a result of character extraction. That is, ““ ”is represented by a control code and three character codes. Therefore, the character string "alcohol" has two characters "ru".
As a result, there are four types of word candidates.
That is, And four types of word candidates. Therefore, matching is performed for all the word candidates with the contents of the word dictionary unit 15, and the matching word candidates in the word dictionary unit 15 are set as final recognition results. Therefore, in the case of the above “alcohol”, word candidates (a), (b), and (c) indicate that the matching word is a word dictionary part.
Being rejected for not being within 15. In the last word candidate (d), since a matching word exists in the word dictionary section 15, this (d) Is the correct recognition result. Therefore, as the processing, word candidates are listed by the number (2 n ) of words to be collated in step S21,
Word matching is performed one by one while confirming the mismatch (steps S22 and S23). Here, if the next word candidate is cut off without a matching word, all the word candidates are regarded as the recognition result (step S24, step S2).
5), and outputs the recognition result to the outside (step S27).
When a matching word candidate is found in step S23, the matching word candidate is determined as a recognition result (step S2).
6). Then, output the recognition result to the outside (step S2
7).

このように、外部に認識結果を出力した後には、再び
ステツプS17に戻り、上述の処理を繰り返す。
Thus, after outputting the recognition result to the outside, the process returns to step S17 again, and the above-described processing is repeated.

以上の説明により第1の実施例によれば、複数の文字
照合させると共に、文字認識の候補に漏れを無くすこと
で正確な文字認識を実施することができる。
As described above, according to the first embodiment, a plurality of character collations can be performed, and accurate character recognition can be performed by eliminating omissions in character recognition candidates.

<第2の実施例の説明> 次に、第2の実施例について説明する。<Description of Second Embodiment> Next, a second embodiment will be described.

第4図は本発明に係わる文字認識装置の第2の実施例
を示すブロツク図であり、第5図は第1の実施例のCPU2
の動作を説明するフローチヤートである。
FIG. 4 is a block diagram showing a second embodiment of the character recognition apparatus according to the present invention, and FIG. 5 is a block diagram showing the CPU 2 of the first embodiment.
3 is a flowchart for explaining the operation of FIG.

第4図において、21は第2の実施例の文字認識装置を
示している。22は本装置全体を制御するCPUを示してい
る。23はCPU22を動作させるための制御プログラム,エ
ラー処理プログラム,そして後述する第5図に示すフロ
ーチヤートに従つたプログラム等を格納しているROMを
示し、24はROM23に格納されている各種プログラムのワ
ークエリア及びエラー処理時の一時退避エリアとして用
いるRAMを示している。ここで、参照番号25〜31までの
各部の機能は前述の第1の実施例と同様のため、説明を
省略する。
In FIG. 4, reference numeral 21 denotes a character recognition device according to the second embodiment. Reference numeral 22 denotes a CPU that controls the entire apparatus. Reference numeral 23 denotes a ROM which stores a control program for operating the CPU 22, an error processing program, and a program according to a flowchart shown in FIG. 5 which will be described later, and 24 denotes a program of various programs stored in the ROM 23. A RAM used as a work area and a temporary save area during error processing is shown. Here, since the function of each unit of the reference numerals 25 to 31 is the same as that of the above-described first embodiment, the description is omitted.

そして、32は文字バツフア30に格納されたブロツク中
の文字パターンを後述の認識辞書部33に記憶されている
標準パターンと比較によつて類似度を求め、類似度が最
大の標準パターンに基づいて認識文字の候補を挙げる類
似度計算部を示している。33は類似度計算部32で認識文
字の候補を挙げるための標準パターンを記憶している認
識辞書部を示している。34は類似度計算部32で挙げた認
識文字の候補より最後の認識結果を識別する識別部を示
している。
Then, 32 obtains a similarity by comparing the character pattern in the block stored in the character buffer 30 with a standard pattern stored in a recognition dictionary unit 33 described later, and based on the standard pattern having the maximum similarity. 6 shows a similarity calculation unit that lists recognition character candidates. Reference numeral 33 denotes a recognition dictionary unit that stores a standard pattern used by the similarity calculation unit 32 to list recognition character candidates. Reference numeral 34 denotes an identification unit that identifies the last recognition result from the recognition character candidates listed in the similarity calculation unit 32.

ここで、第2の実施例による文字認識方法について説
明する。
Here, a character recognition method according to the second embodiment will be described.

第2の実施例においても第1の実施例のステツプS1〜
ステツプS11までの処理と同様の処理がステツプS1′〜
ステツプS11′まで行われる。従つてその間の処理の説
明を省略する。
Also in the second embodiment, steps S1 to S1 of the first embodiment are performed.
The same processing as the processing up to step S11 is performed in steps S1 'to
This is performed up to step S11 '. Therefore, the description of the processing during that period is omitted.

そこで、ステツプS1′〜ステツプS11′により文字バ
ツフア30にブロツクが格納されると、次にブロツクカウ
ンタ31の値を調べる(ステツプS30)。もし値が“1"の
場合には、単独ブロツクか或は合成ブロツクのため、類
似度計算部32で認識辞書部33内の標準パターンと類似度
を算出する(ステツプS31)。そして類似度が最大の標
準パターンを認識結果とする(ステツプS32)。このよ
うにして求めた認識結果は識別部34では何も処理を行わ
ずに外部に出力される(ステツプS42)。またステツプS
30でブロツクカウンタ31の値が“3"であることを確認す
ると、類似度計算部32では文字バツフア30内のそれぞれ
のブロツク(第1の単独ブロツク,第2の単独ブロツク
及び合成ブロツク)に対して認識辞書部33内の標準パタ
ーンとの類似度の計算が行われる。そして各々の計算時
には最大の類似度を求め、第1の単独ブロツクの最大の
類似度,第2の単独ブロツクの最大の類似度,合成ブロ
ツクの最大類似度をそれぞれm1,m2,m3とする(ステツプ
S33〜ステツプS38)。
Then, when a block is stored in the character buffer 30 by steps S1 'to S11', the value of the block counter 31 is checked next (step S30). If the value is "1", the similarity calculation unit 32 calculates the standard pattern and the similarity in the recognition dictionary unit 33 because the block is a single block or a composite block (step S31). Then, the standard pattern having the highest similarity is set as the recognition result (step S32). The recognition result obtained in this way is output to the outside without any processing in the identification section 34 (step S42). Also step S
When it is confirmed at step 30 that the value of the block counter 31 is "3", the similarity calculating section 32 checks each block (the first single block, the second single block, and the composite block) in the character buffer 30. Thus, the similarity with the standard pattern in the recognition dictionary unit 33 is calculated. Then determine the maximum similarity when each of the calculation, the largest similarity first single block, the maximum degree of similarity second single block, m 1 a maximum similarity of the synthetic block, respectively, m 2, m 3 (Step
S33 to step S38).

次に、最大類似度m1,m2,m3より最終的に認識文字とし
て出力するための標準パターンを識別部34で識別する。
この識別方法として以下の式を用いる。即ち、(m1
m2)÷2≧m3ならば単独ブロツクとの類似度も最も大き
い標準パターンの文字コードを最終認識結果とする。こ
の場合には類似度m1,m2にそれぞれ該当する標準パター
ンが認識結果として識別される(ステツプS39,ステツプ
S40)。また(m1+m2)÷2<m3ならば合成ブロツクと
類似度の最も大きい標準パターンの文字コードを最終認
識結果とする。この場合には類似度m3に該当する標準パ
ターンが認識結果として識別される(ステツプS41)。
Next, the identification unit 34 identifies a standard pattern to be finally output as a recognized character from the maximum similarities m 1 , m 2 , and m 3 .
The following equation is used as this identification method. That is, (m 1 +
m 2 ) If ÷ 2 ≧ m 3 , the character code of the standard pattern having the highest similarity to the single block is determined as the final recognition result. In this case, the standard patterns respectively corresponding to the similarities m 1 and m 2 are identified as the recognition results (step S39, step S39).
S40). If (m 1 + m 2 ) ÷ 2 <m 3 , the final recognition result is the character code of the standard pattern having the highest similarity to the composite block. Standard pattern corresponding to the similarity m 3 are identified as the recognition result in this case (step S41).

次に、ステツプS32,ステツプS40,そしてステツプS41
のそれぞれの識別処理により識別された認識結果を外部
に出力する(ステツプS42)。このようにして外部に識
別された認識結果を出力した後には、次の文字認識を行
うために次行の切出しが必要なければ第1の実施例と同
様に対応するステツプS4に戻り(ステツプS43)、また
次行の切出しが必要であれば1ページ分の処理が終了す
るまでは第1の実施例と同様に対応するステツプS2に戻
り処理を繰り返す(ステツプS44)。
Next, step S32, step S40, and step S41
The recognition results identified by the respective identification processes are output to the outside (step S42). After outputting the recognition result thus identified to the outside, if it is not necessary to cut out the next line in order to perform the next character recognition, the process returns to the corresponding step S4 as in the first embodiment (step S43). If it is necessary to cut out the next line, the process returns to the corresponding step S2 as in the first embodiment until the processing for one page is completed, and the processing is repeated (step S44).

以上の説明により第2の実施例によれば、文字認識を
類似度判定で行つても文字認識のための候補に漏れがな
い状態による正確な文字認識を行うこができる。
As described above, according to the second embodiment, even when character recognition is performed by similarity determination, accurate character recognition can be performed in a state where there is no omission in candidates for character recognition.

[発明の効果] 以上説明したように本発明によれば、文字パターンを
含む画像ブロックの文字認識を行う際、注目する第1画
像ブロックとその隣の第2画像ブロックを合成するか否
かを判定し、合成する必要があると判定された場合に、
更に、その合成して得られる第3画像ブロックの幅と予
め設定されている所定の文字幅との差分から、その第3
画像ブロックの文字幅の正確度を求める。そして、その
正確度に応じて、第3画像ブロックのみを文字認識する
か、第3画像ブロックに加えて第1画像ブロック及び第
2画像ブロックをも文字認識するかを切り替えること
で、合成する必要がある画像ブロック、かつ文字認識す
る必要がある画像ブロックの種類をより適切に選定でき
る画像認識方法及び装置を提供できる。
[Effects of the Invention] As described above, according to the present invention, when performing character recognition of an image block including a character pattern, it is determined whether or not to combine the first image block of interest and the second image block adjacent thereto. And if it is determined that it is necessary to combine,
Further, from the difference between the width of the third image block obtained by the synthesis and a predetermined character width, the third image block is obtained.
Find the accuracy of the character width of an image block. Then, according to the accuracy, it is necessary to perform the synthesis by switching between character recognition of only the third image block and character recognition of the first image block and the second image block in addition to the third image block. It is possible to provide an image recognition method and apparatus that can more appropriately select a certain image block and a type of an image block that requires character recognition.

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

第1図は本発明に係わる文字認識装置の第1の実施例を
示すブロツク図、 第2図(a),(b)は第1の実施例のCPU2の動作を説
明するフローチヤート、 第3図は第1の実施例の単語照合を説明する図、 第4図は本発明に係わる文字認識装置の第2の実施例を
示すブロック図、 第5図は第1の実施例のCPU2の動作を説明するフローチ
ヤート、 第6図は従来の文字認識装置を示すブロツク図、 第7図は従来の単語照合を説明する図である。 図中、1,21……文字認識装置、2,22……CPU、3,23……R
OM、4,24……RAM、5,25,51……読取部、6,26,52……メ
モリ、7,27,53……ブロツク抽出部、8,28,54……ブロツ
ク合成部、9,29……ブロツク正確度判定部、10,30,55…
…文字バツフア、11,31……ブロツクカウンタ、12,56…
…認識部、13,33,57……認識辞書部、14,58……単語照
合部、15,59……単語辞書部、32……類似度計算部、34
……識別部である。
FIG. 1 is a block diagram showing a first embodiment of a character recognition apparatus according to the present invention. FIGS. 2 (a) and 2 (b) are flow charts for explaining the operation of the CPU 2 of the first embodiment. FIG. 4 is a diagram for explaining word matching according to the first embodiment. FIG. 4 is a block diagram showing a second embodiment of the character recognition device according to the present invention. FIG. 5 is an operation of the CPU 2 of the first embodiment. FIG. 6 is a block diagram showing a conventional character recognition device, and FIG. 7 is a diagram for explaining conventional word matching. In the figure, 1,21 ... character recognition device, 2,22 ... CPU, 3,23 ... R
OM, 4,24… RAM, 5,25,51… Reader, 6,26,52… Memory, 7,27,53… Block extractor, 8,28,54… Block combiner, 9,29 …… Block accuracy judgment section, 10,30,55…
… Character buffer, 11,31 …… Block counter, 12,56…
... Recognition unit, 13,33,57 ... Recognition dictionary unit, 14,58 ... Word collation unit, 15,59 ... Word dictionary unit, 32 ... Similarity calculation unit, 34
... An identification unit.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】画像情報を入力し、 前記画像情報より文字パターンを含む画像ブロックを抽
出し、 前記抽出した画像ブロック内の注目する第1画像ブロッ
クと、その隣の第2画像ブロックを合成する必要がある
か否かを判定し、 前記判定により合成する必要があると判定された場合
に、前記第1画像ブロックと第2画像ブロックを合成し
た第3画像ブロックの幅と、予め設定されている所定幅
との差分から、前記第3画像ブロックの幅の正確度を求
め、 前記正確度に応じて、前記第3画像ブロックのみを文字
認識するか、該第3画像ブロックに加えて前記第1画像
ブロック及び前記第2画像ブロックをも文字認識するか
を切り替えることを特徴とする画像認識方法。
An image information is input, an image block including a character pattern is extracted from the image information, and a first image block of interest in the extracted image block and a second image block adjacent thereto are synthesized. It is determined whether or not it is necessary. If it is determined that the image needs to be synthesized, the width of the third image block obtained by synthesizing the first image block and the second image block is set in advance. The accuracy of the width of the third image block is obtained from the difference from the predetermined width, and according to the accuracy, only the third image block is character-recognized or the third image block is added in addition to the third image block. An image recognition method, characterized in that whether or not one image block and the second image block are also subjected to character recognition is switched.
【請求項2】画像情報を入力する入力手段と、 前記入力手段により入力した画像情報より文字パターン
を含む画像ブロックを抽出する画像ブロック抽出手段
と、 前記画像ブロック抽出手段により抽出した画像ブロック
の内の注目する第1画像ブロックと、その隣の第2画像
ブロックを合成する必要があるか否かを判定する判定手
段と、 前記判定手段により合成する必要があると判定された場
合に、前記第1画像ブロックと第2画像ブロックを合成
した第3画像ブロックの幅と、予め設定されている所定
の文字幅との差分から、前記第3画像ブロックの文字幅
の正確度を求る正確度導出手段と、 前記正確度導出手段により求めた正確度に応じて、前記
第3画像ブロックのみを文字認識するか、該第3画像ブ
ロックに加え前記第1画像ブロック及び前記第2画像ブ
ロックをも文字認識するかを切り替えるよう制御する文
字認識制御手段とを有することを特徴とする画像認識装
置。
2. An input unit for inputting image information, an image block extracting unit for extracting an image block including a character pattern from the image information input by the input unit, and an image block extracted by the image block extracting unit. A first image block of interest, and a judging means for judging whether or not it is necessary to synthesize the second image block adjacent thereto. If the judging means judges that the first image block needs to be synthesized, Accuracy derivation for obtaining the accuracy of the character width of the third image block from the difference between the width of the third image block obtained by combining the one image block and the second image block and a predetermined character width. Means for character recognition of only the third image block, or the first image block in addition to the third image block, according to the accuracy obtained by the accuracy derivation means. And a character recognition control unit that controls whether or not the second image block also performs character recognition.
JP63242214A 1988-09-29 1988-09-29 Image recognition method and apparatus Expired - Lifetime JP2848560B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63242214A JP2848560B2 (en) 1988-09-29 1988-09-29 Image recognition method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63242214A JP2848560B2 (en) 1988-09-29 1988-09-29 Image recognition method and apparatus

Publications (2)

Publication Number Publication Date
JPH0291785A JPH0291785A (en) 1990-03-30
JP2848560B2 true JP2848560B2 (en) 1999-01-20

Family

ID=17085943

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63242214A Expired - Lifetime JP2848560B2 (en) 1988-09-29 1988-09-29 Image recognition method and apparatus

Country Status (1)

Country Link
JP (1) JP2848560B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4733577B2 (en) * 2006-07-12 2011-07-27 日立コンピュータ機器株式会社 Form recognition device and form recognition program
CN112749529A (en) * 2019-10-29 2021-05-04 西安诺瓦星云科技股份有限公司 Method and device for character self-adaption special-shaped edit box

Also Published As

Publication number Publication date
JPH0291785A (en) 1990-03-30

Similar Documents

Publication Publication Date Title
JP2991779B2 (en) Character recognition method and device
US5905811A (en) System for indexing document images
US5561720A (en) Method for extracting individual characters from raster images of a read-in handwritten or typed character sequence having a free pitch
JP2010061471A (en) Character recognition device and program
JP2848560B2 (en) Image recognition method and apparatus
JP2005301664A (en) Image dictionary forming device, encoding device, data file, image dictionary forming method, and program thereof
US7016535B2 (en) Pattern identification apparatus, pattern identification method, and pattern identification program
JPH0991371A (en) Character display device
KR950001061B1 (en) Correcting apparatus for recognizing document
JPH06251187A (en) Method and device for correcting character recognition error
JP2902097B2 (en) Information processing device and character recognition device
JP2677271B2 (en) Character recognition device
JP2002207960A (en) Method and program for recognized character correction
JPH05217017A (en) Optical character reader
JP2993533B2 (en) Information processing device and character recognition device
JPH1069494A (en) Image retrieval method and device therefor
JP3226355B2 (en) Recognition result evaluation method
JPS6095690A (en) Character reader
JP2570571B2 (en) Optical character reader
JP3138665B2 (en) Handwritten character recognition method and recording medium
JP2000099631A (en) Pattern recognizing device and pattern recognizing method
JPH1139430A (en) Character recognizing device
JPH0816725A (en) Character recognition device and method
JPH07117982B2 (en) Pattern recognition method
JP2001266069A (en) Reading method for optical character

Legal Events

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

Free format text: PAYMENT UNTIL: 20081106

Year of fee payment: 10

EXPY Cancellation because of completion of term