JP6523988B2 - Character recognition device, character recognition method, and program - Google Patents
Character recognition device, character recognition method, and program Download PDFInfo
- Publication number
- JP6523988B2 JP6523988B2 JP2016029068A JP2016029068A JP6523988B2 JP 6523988 B2 JP6523988 B2 JP 6523988B2 JP 2016029068 A JP2016029068 A JP 2016029068A JP 2016029068 A JP2016029068 A JP 2016029068A JP 6523988 B2 JP6523988 B2 JP 6523988B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- font
- recognition
- selection
- string
- 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 - Fee Related
Links
Images
Landscapes
- Character Discrimination (AREA)
Description
本発明の実施形態は、文字認識装置、文字認識方法、およびプログラムに関する。 Embodiments of the present invention relate to a character recognition device, a character recognition method, and a program.
光学的に読み取った文字を自動的に認識する文字認識技術が広く活用されている。文字認識処理は、手書き文字認識と活字文字認識に大別される。ここで、活字文字認識には、活字によって印刷された文字だけではなく、電子データによるフォントに基づいて印刷された文字の認識も含まれる。文字認識処理は、入力された文字の画像と、辞書に含まれている文字のデータとを照合し、そのマッチングの度合いを示すスコア(あるいは距離)を評価することによって行う。辞書に含まれている文字のデータは、文字の形態そのものや、認識における特徴を表す情報である。したがって、例えばある文字(たとえば「あ」という文字)について、フォントごとに辞書に含まれている文字のデータは異なる。活字文字認識処理では、フォント別に予め準備した辞書データを用いて、文字の認識が行われる。 A character recognition technology that automatically recognizes optically read characters is widely used. Character recognition processing is roughly classified into handwritten character recognition and printed character recognition. Here, the printed character recognition includes not only characters printed by printed characters, but also recognition of printed characters based on fonts by electronic data. The character recognition processing is performed by collating the input character image with the character data contained in the dictionary and evaluating a score (or distance) indicating the degree of matching. The character data contained in the dictionary is information representing the character form itself or the feature in recognition. Therefore, for example, for a certain character (for example, the character “a”), the data of the character included in the dictionary differs for each font. In the print character recognition process, character recognition is performed using dictionary data prepared in advance for each font.
従来技術において、数文字分の辞書データと入力データとの間の最小距離値の平均値を計算し、その平均値が最小となるフォントを選択する技術があった。しかし、必ずしも選択されたその数文字がフォント切り替えの単位とは一致していない可能性があった。
また、従来技術において、辞書と入力された文字との間の距離が所定の閾値を超えた回数をカウントし、そのカウント値に基づいて辞書を切り替える技術があった。しかし、そのカウント値に基づいて辞書を切り替える箇所が、フォント切り替えの場所には一致しない場合もあった。
また、従来技術においては、一文字単位で使用フォントの判断を行うなど、フォントを判定する処理が冗長となる可能性があった。
また、従来技術において、最も適合するフォントデータ(辞書)を判定し、その結果として選択されたフォントデータを用いて文字認識を行う技術があった。しかし、文章の途中でフォントが切り変わる場合には、選択された文章の全体において最適であるとは限らない可能性もあった。
In the prior art, there has been a technique of calculating an average value of minimum distance values between dictionary data of several characters and input data, and selecting a font having the minimum average value. However, the selected few characters may not necessarily match the font switching unit.
Further, in the prior art, there has been a technique of counting the number of times that the distance between the dictionary and the input character exceeds a predetermined threshold, and switching the dictionary based on the count value. However, there have been cases where the location where the dictionary is switched based on the count value does not match the location of font switching.
Further, in the prior art, there is a possibility that the process of determining the font becomes redundant, such as determining the font used in units of one character.
Further, in the prior art, there has been a technique of judging the most suitable font data (dictionary) and performing character recognition using the font data selected as a result. However, if the font changes in the middle of a sentence, it may not be optimal in the entire selected sentence.
本発明が解決しようとする課題は、文書内でのフォント変更点を精度よく検出し、使用されているフォントに適した辞書を用いて文字の認識を行うことができる文字認識装置、文字認識方法、およびプログラムを提供することである。 The problem to be solved by the present invention is a character recognition apparatus and character recognition method capable of accurately detecting font change points in a document and using a dictionary suitable for the font being used. , And to provide the program.
実施形態の文字認識装置は、認識用データベースと、文字認識部と、フォント選択部と、選択再考判断部とを持つ。認識用データベースは、フォント種別ごとの文字認識用の辞書データを保持する。文字認識部は、文字画像の列を取得し、前記認識用データベース内の前記辞書データを参照しながら前記文字画像の認識処理を行うとともに、認識処理の際の前記辞書データと前記文字画像との間の合致度を表すスコアを出力する。フォント選択部は、前記文字画像と前記認識用データベース内の前記フォント種別ごとの前記辞書データに基づいて前記文字画像のフォント種別を特定することによって、前記文字認識部が参照する前記辞書データのフォント種別を設定する。選択再考判断部は、前記文字認識部が前記文字画像の列に含まれる前記文字画像の認識処理を順次行った際に、前記スコアが低下した前記列内の区間を検出するとともに、ルールベース内に記憶されているルールに基づいて当該区間または当該区間近傍におけるフォント変更点を推定し、前記フォント変更点以後について前記フォント選択部が前記フォント種別を再設定するよう制御する。 The character recognition device according to the embodiment has a recognition database, a character recognition unit, a font selection unit, and a selection reconsideration determination unit. The recognition database holds dictionary data for character recognition for each font type. The character recognition unit acquires a string of character images, performs recognition processing of the character image while referring to the dictionary data in the recognition database, and performs the recognition process on the dictionary data and the character image. Output a score representing the degree of match between The font selection unit is configured to specify a font type of the character image based on the character image and the dictionary data for each font type in the recognition database. Set the type. The selection reconsideration determination unit detects a section in the row in which the score is lowered when the character recognition unit sequentially performs the recognition process of the character image included in the string of the character image, and also in the rule base. The font change point in the section or in the vicinity of the section is estimated based on the rules stored in the control unit, and the font selection unit is controlled to reset the font type after the font change point.
以下、実施形態の文字認識装置、文字認識方法、およびプログラムを、図面を参照して説明する。 Hereinafter, a character recognition device, a character recognition method, and a program according to an embodiment will be described with reference to the drawings.
(第1の実施形態)
図1は、本実施形態による文字認識装置の概略機能構成を示すブロック図である。同図に示すように、文字認識装置1は、画像入力部21と、画像処理部22と、文字抽出部23と、認識用データベース30と、文字認識部31と、フォント選択部33と、選択再考判断部35と、出力部41とを持つ。
First Embodiment
FIG. 1 is a block diagram showing a schematic functional configuration of the character recognition device according to the present embodiment. As shown in the figure, the
画像入力部21は、外部から画像を取得する。この画像は、文字認識の対象となる文字の列を含む。例えば、画像入力部21は、ガラス面等に置かれた紙の文書を光学的に読み取ることによって、二次元の画像を取得する。画像入力部21が、複数枚の紙を読みと位置に順次供給するためのフィーダーを備えていてもよい。また、例えば、画像入力部21は、外部から供給される画像ファイルを取得するようにしてもよい。ここで、外部から供給される画像ファイルは、例えば、PDF形式、JPEG形式、PNG形式、TIFF形式等の、適切な形式で画像の情報を保持する。なお、「PDF」はPortable Document Formatの略である。また、「JPEG」は、Joint Photographic Experts Groupの略である。また、「PNG」は、Portable Network Graphicsの略である。また、「TIFF」は、Tagged Image File Formatの略である。
The
画像処理部22は、画像入力部21が取得した画像に適切な前処理を施すことにより、文字認識可能な状態にする。前処理の一例は、画像の二値化である。画像処理部22は、画像を、地の色(例えば、白)と文字の色(例えば、黒)とに二値化する。画像処理部22は、二値化の処理以外に、文字領域のサイズの正規化や、画像上のノイズの除去や、文字の線のスムージング等の処理を、適宜、必要に応じて行う。なお、画像処理部22が行うこれらの処理自体は、既存技術を用いて行うことが可能である。
文字抽出部23は、画像処理部22で処理した画像から、個々の文字の部分を抽出して、文字ごとに切り分ける。文字抽出部23が受け取る画像は文字列を含んでいるものであり、文字抽出部23は、その文字列に含まれている各文字の画像を切り出し、文字列内の文字の配列順にしたがって切り出した各文字の画像を保存する。なお、文字の抽出、切り出しの処理自体は、方法などは既存技術を用いて行うことができる。
The
The
認識用データベース30は、文字認識に用いるための辞書データを保持する。辞書データは、各文字の画像の情報または各文字の認識のための特徴量の情報、あるいはそれら両方を含む。認識用データベース30は、フォント種別ごと且つ文字種別ごとに、辞書データを保持する。ここで、フォント種別とは、フォントファミリーと文字装飾属性との組み合わせによって識別される種別である。フォントファミリーとは、大別すると、例えば、ゴシック体、明朝体、教科書体等の区別である。フォントファミリーは、上記大別したグループ(例えばゴシック体)の中でも、さらにその字体によって細かく区別したり、またフォントを作るメーカーによっても細かく区別したりできる。文字装飾属性とは、例えば斜字体(斜めの字として表される)やボールド体(太い線で表される)といったものであり、これらの属性を有するか否かによって、フォントをさらに識別してもよい。例えば、数種類から数百種類程度のフォント種別に対応した辞書データを、認識用データベースが保持するようにしてよい。
The
文字認識部31は、認識用データベース30を参照しながら、文字抽出部23によって抽出された文字の認識を行う。なお、文字認識部31は、後述するフォント選択部33によって選択されたフォント種別の辞書データを認識用データベース30から読み出して、文字認識処理に使用する。具体的には、文字認識部31は、文字抽出部23から渡される1文字分の画像データを基に、文字種別ごとのスコアを算出する。スコアは、辞書データと文字画像との間の合致度を表す数値である。そして、文字認識部31は、スコアの最も高い文字種別を、その画像の認識結果として出力する。文字認識部31は、認識結果としてスコアが最も高かった文字の文字コード(ASCIIコードやJISコード等)の情報を出力する。なお文字認識処理の過程において、確からしさの順に並んだ、文字コードとそのスコアとのペアの列が得られる。本実施形態では、スコアは1000点満点の数値として表される。
なお、入力された画像データと辞書データとを比較することによってその画像データに含まれる文字を特定する(文字認識する)処理自体としては、既存の技術を用いることができる。
The
In addition, the existing technology can be used as processing itself (character recognition) which specifies the character contained in the image data by comparing the input image data and dictionary data.
フォント選択部33は、文字抽出部23によって抽出された文字と、認識用データベース30に記録されている辞書データとを比較することによって、文字のフォント種別を特定する。また、フォント選択部33は、フォント種別を特定した結果にしたがって、文字認識部31が認識処理の際に用いるフォントを設定する。なお、フォント選択部33は、選択再考判断部35からの制御によって、フォントを再選択する場合がある。即ち、既に認識処理用のフォントが既に設定されている状態で、フォント選択部33がフォントを再設定する場合がある。
なお、フォント選択部33がフォントを選択する処理の詳細については、後述する。
The
The details of the process in which the
選択再考判断部35は、文字認識部31からの結果を各文字ごとに受け取り、認識処理におけるスコアの状況から対象フォントに変更があったか否かを判断する。具体的には、選択再考判断部35は、文字認識部31から認識処理の結果であるスコアのデータを受け取り、スコアの系列に基づいて認識処理中の文字列の途中でフォントが変更されたか否かを判断する。つまり、選択再考判断部35は、文字認識部31が文字画像の認識処理を順次行った際に、文字画像の列内においてスコアが低下した区間を検出する。そして、選択再考判断部35は、ルールに基づいて当該区間または当該区間近傍におけるフォントが変更された位置を推定する。これにより、選択再考判断部35は、認識処理において設定したフォントの種別を変更すべきであるか否かを判断する。また、選択再考判断部35は、フォントが変更されたと判定するときには、文字列中のどの文字の位置からフォントが変更されたかを特定する。フォントが変更された位置を「フォント変更点」と呼ぶ場合がある。フォントが変更されたと判定した場合には、選択再考判断部35は、フォントを選択し直すようフォント選択部33を制御する。
The selection
印刷された文書等において1文字ごとにフォントが変化することは通常なく、一度選択されたフォントは少なくともある程度の長さにおいて固定的に使われる。選択再考判断部35は、そういった文書の特性に基づいた判断を行うものである。選択再考判断部35は、内部にルールベースを備えており、そのルールベースは、上記の文書の特性に基づき、フォントが変更される点(位置)についての知識を保持している。選択再考判断部35は、ルールベースに記憶されているルール(知識)に基づいて、フォント選択を再考すべきであるか否かを判断する。その処理の詳細については後述する。
The font does not usually change for each character in a printed document or the like, and once selected, the font is fixedly used at least at a certain length. The selection
出力部41は、文字認識部31による認識処理の結果を外部に出力する。出力部41は、認識結果である文字コードの列を少なくとも出力する。また、出力部41が、認識結果の文字のスコアの値を併せて出力するようにしてもよい。また、出力部41が、認識結果として選ばれなかった文字のうち比較的スコアが高かった文字のコードや、各文字のスコアの値を併せて出力するようにしてもよい。出力部41が出力するデータの内容や形式は、適宜定めてよい。
The
図2は、文字認識装置1が文字列の文字認識処理を行う際の、作業用のデータ記憶領域の構成例を示す概略図である。図示するデータは、処理中において、半導体メモリや磁気ハードディスク装置等に一時的に記録される。図示するデータは、2次元の表形式のデータであり、横方向が文字列中の文字の位置に対応する。このデータは、文字カウントと、入力文字画像と、スコアと、採用されたフォントと、認識結果の各項目を有している。
FIG. 2 is a schematic view showing a configuration example of a work data storage area when the
文字カウントは、画像入力部21が取得した画像(文書等の画像)の先頭からの文字数のカウントである。文字カウントの値は、1から始まる整数である。同図に示すデータの範囲には、文字カウントとして99から119までが含まれている。入力画像とスコアと採用されたフォントと認識結果の各データは、この文字カウントに関連付けて保持されている。
入力文字画像は、文字抽出部23によって抽出された各文字の画像のデータである。この入力文字画像が、文字認識部31による認識処理の対象である。
The character count is a count of the number of characters from the beginning of the image (image such as a document) acquired by the
The input character image is data of an image of each character extracted by the
スコアは、認識処理の結果として得られるスコアのデータである。このスコアのデータとして、最終的に認識結果として決定された文字に対するスコア(最高スコア)だけでなく、他の文字に対するスコアを保持するようにしてもよい。また、さらに、複数のフォント種別によってスコアを算出した場合には、フォント種別と文字種別の組み合わせに関連付けて複数のスコアの値を保持するようにしてもよい。
採用されたフォントは、当該文字に対して、フォント選択部33が選択したフォントの種別を識別するデータを保持する。なお、フォント選択部33がフォントの選択の再設定を行った場合には、当該文字に対して、採用されたフォントのデータも書き換えられる。
認識結果は、認識された文字の種別を保持する。具体的には、認識結果として、文字コードが保持される。なお、例えばフォントの再選択の結果として認識処理を複数回行った場合には、この認識結果が書き換えられる場合もある。
The score is data of a score obtained as a result of recognition processing. As data of the score, not only the score for the character finally determined as the recognition result (the highest score) but also the score for other characters may be held. Furthermore, when scores are calculated using a plurality of font types, values of a plurality of scores may be held in association with a combination of font types and character types.
The adopted font holds data for identifying the type of font selected by the
The recognition result holds the type of recognized character. Specifically, the character code is held as the recognition result. If, for example, recognition processing is performed multiple times as a result of font reselection, the recognition result may be rewritten.
現在ポイントは、文字認識装置1における処理において、現在認識の対象となっている文字の位置を指す指標情報である。文字認識部31が1文字ずつ認識処理を行うにつれて、現在ポイントは1つずつ前へ(同図における左から右へ)進んでいく。ただし、フォントの再選択等によって、現在ポイントが後ろへ(同図における左側へ)戻る場合もあり得る。
The current point is index information that indicates the position of the character that is currently the target of recognition in the processing in the
同図に示す例では、文字カウントの値は、97から、1ずつ増分して、119までである。文字カウントの値が96以下および120以上の部分については、図示を省略している。また、これらの文字カウントに対応する入力文字画像は、それぞれ、「し」、「か」、「し」、「彼」、「は」、・・・(以下省略)という文字の画像である。なお、私用されているフォントは途中で変更されている場合がある。スコアのデータの具体例は、図において省略されている。採用されたフォントは、文字カウントが99から108までの範囲において「A」という識別データで表されるものである。なお、文字カウントが109以上の部分は、現在ポイントよりも後の部分であり、採用されるフォントはみていであるため「−」と示されている。認識結果は、各文字画像に対応する認識結果である。ここでは、文字カウント99の位置から、順次、「し」、「か」、「し」、「彼」、「は」、「、」、「素」、「晴」、「5」、「レ」という認識結果が格納されている。なお、認識結果には認識誤りが含まれる場合もある。
In the example shown in the figure, the value of the character count is from 97 to 119 in increments of one. Illustration is omitted about the part whose value of a character count is 96 or less and 120 or more. Further, the input character images corresponding to these character counts are images of characters "SHI", "SHI", "SHI", "He", "HA",... (Hereinafter omitted). In addition, the font used for private may be changed on the way. Specific examples of score data are omitted in the figure. The adopted font is represented by the identification data "A" in the character count range of 99 to 108. In addition, the part whose character count is 109 or more is a part after the present point, and since the adopted font is seen, it is shown as "-". The recognition result is a recognition result corresponding to each character image. Here, from the position of the
図3は、文字認識装置1による文字認識処理の手順を示すフローチャートである。以下、このフローチャートに沿って、文字認識装置1による処理の全体的な流れを説明する。
FIG. 3 is a flowchart showing the procedure of the character recognition process by the
まずステップS1において、文字認識装置1は、現在ポイントを初期化する。具体的には、文字認識装置1は、現在ポイントを、認識処理の対象の文字の列の先頭にセットする。
First, in step S1, the
次にステップS2において、フォント選択部33は、フォントを選択し、設定する。具体的には、ステップS1からステップS2に移ってきた場合には、フォント選択部33は、予め定められたデフォルトのフォントを選択し、設定する。また、S9からステップS2に移ってきた場合には、フォント選択部33は、フォント変更位置(フォント変更位置については、後述する)以後の文字の画像に基づいて、ステップS8の処理(後述する)の結果として識別されたフォントを選択し、設定する。
なお、ステップS1からステップS2に移ってきた場合においても、フォント選択部33が、現在ポイントから後の数文字分の文字の画像に基づいて、フォントを識別し、選択するようにしてもよい。
なお、フォント選択部33がフォントを選択する処理の詳細については、後述する。
Next, in step S2, the
Even when the process proceeds from step S1 to step S2, the
The details of the process in which the
次にステップS3において、文字認識部31は、現在ポイントの文字の認識処理を行う。具体的には、文字認識部31は、現在選択されているフォントの辞書データを用いて、現在ポイントの文字画像の、各文字に対するスコアを算出する。そして、最もスコアの高い文字を認識結果として決定する。このとき、文字認識部31は、算出したスコアの情報を作業用のデータ記憶領域(図2参照)に書き込んでおく。
Next, in step S3, the
次にステップS4において、選択再考判断部35は、現在ポイントまでの所定の長さの文字列のスコアに基づいて、当該所定の長さの文字列についての総合スコアを算出する。ここで、「所定の長さ」は複数であってもよい。ここで算出される総合スコアは、当該所定の長さの文字列に関して、現在選択されているフォントが妥当なフォントであるか否かを評価するための数値である。この総合スコアが所定の基準値以上であれば、現在選択されているフォントは妥当なフォントであると推定できる。逆に、この総合スコアがその基準値未満であれば、現在選択されているフォントが妥当ではないかもしれないと推定できる。なお、総合スコアについて、絶対的なスコアに基づく算出方法と、直前のスコアとの比較による相対的なスコアに基づく算出方法とがある。これらの総合スコアの算出のしかたについては、後で詳述する。
Next, in step S4, the selection
次にステップS5において、選択再考判断部35は、ステップS4で算出した総合スコアが、基準値以上であったかいなかを判断する。前述の通り、「所定の長さ」が複数である場合には、総合スコアも複数算出される。算出されたすべての総合スコアが基準値以上であった場合、即ち現在選択されているフォントが妥当であると推定される場合(ステップS5:YES)、次にステップS10に進む。1個以上の総合スコアが基準値未満であった場合、即ち現在選択されているフォントを再考すべきであるかもしれない場合(ステップS5:NO)、次にステップS6に進む。
Next, in step S5, the selection
次にステップS6に進んだ場合、同ステップにおいて、選択再考判断部35は、フォントが変更された位置を検出する。このとき、選択再考判断部35は、知識に基づいて、フォント変更位置を検出する。本実施形態における知識は、「フォント変更位置は、単語の区切りの位置に限定される」というものである。言い換えれば、単語の途中ではフォントは変更されないという知識である。そのため、選択再考判断部35は、単語辞書データを内部に備えており、この単語辞書データを参照しながら、作業用のデータ記憶領域との照合を行い、フォント変更位置を検出する。
なお、選択再考判断部35が、形態素解析処理エンジンを備えるようにしてもよい。この場合、選択再考判断部35は、現在ポイントまでの文字の列(認識結果の文字の列)について、形態素解析処理を行う。そして、形態素解析処理の結果として、認識対象の文字列の中の形態素の区切りの位置を、単語の区切りの位置として扱う。なお、形態素と単語とをほぼ同一のものとみなしても、本実施形態では差し支えない。
なお、フォント変更位置を検出する処理については、後でもより詳細に説明する。
このように、選択再考判断部35は、文字認識部31によって算出された一連の文字に関するスコアと、知識とに基づいて、フォント変更位置を検出(推定)する。
Next, when the process proceeds to step S6, in the same step, the selection
The selection
The process of detecting the font change position will be described in more detail later.
Thus, the selection
次にステップS7において、選択再考判断部35は、ステップS6の処理においてフォント変更位置を検出できたか否かを判定する。フォント変更位置が検出されていた場合には次に変更後のフォントを識別するために、ここで処理を分岐する。フォント変更位置が検出できた場合(ステップS7:YES)には、次のステップS8へ進む。フォント変更位置が検出できなかった場合(ステップS7:NO)には、次に、ステップS10へ飛ぶ。
Next, in step S7, the selection
次にステップS8に進んだ場合、同ステップにおいて、フォント選択部33は、フォント変更位置以後の文字画像の列に基づいて、使用されているフォントを識別する。具体的には、フォント選択部33は、フォント変更選択位置以後、且つ現在ポイントまでの文字画像の列について、各フォントの辞書データでスコアを計算する。そして、当該列に関して、最もスコアの高いフォントが、当該列において使用されていると判断する。
Next, when the process proceeds to step S8, in the step, the
次にステップS9において、文字認識装置1は、現在ポイントを、フォント変更位置に設定する。これにより、ステップS6で検出されたフォント変更位置から、ステップS8で識別されたフォントの辞書データを用いて、文字認識処理をし直すこととなる。本ステップの処理の終了後は、ステップS2に戻る。
Next, in step S9, the
ステップS5から、あるいはステップS7から、ステップS10に進んだ場合の処理は、次に述べるとおりである。
ステップS10において、文字認識装置1は、現在ポイントを、次の文字に進める。
次にステップS11において、文字認識装置1は、文字認識処理の対象である入力文字画像がすべて終了したか否かを判定する。終了した場合(ステップS11:YES)、文字認識装置1は、このフローチャート全体の処理を終了する。終了していない場合、即ち、未処理の入力文字画像が残っている場合(ステップS11:NO)、次の文字を処理するために、ステップS3に戻る。
以上で、文字認識装置1の全体の処理手順の説明を終わる。
Processing from step S5 or from step S7 to step S10 is as described below.
In step S10, the
Next, in step S11, the
This is the end of the description of the overall processing procedure of the
次に、選択再考判断の処理の詳細について説明する。選択再考判断は、前述の通り、フォントの選択をし直すべきであるかどうかを判断するとともに、フォント変更点を推定する処理である。 Next, the details of the process of selection reconsideration will be described. As described above, the selection reconsideration determination is a process of determining whether or not to reselect the font and estimating a font change point.
図4は、文字認識装置1による処理途中のある状態における、作業用のデータ記憶領域に書き込まれている内容を示す概略図である。作業用のデータ記憶領域の構成自体は、既に説明した通りである。同図において、現在ポイントは、文字カウント「108」の位置を指している。また、現在選択されているフォントは「A」であり、文字カウント「99」から「108」までの各位置において、フォント「A」の辞書データで算出したスコアが書き込まれている。具体的には、文字カウント「99」においてスコアは950であり、以下、各位置でのスコアは、933、948、923、910、901、777、791、760、750である。文字カウント「109」以後の位置では、まだスコアが算出されていない。同図に示す範囲内において、文字カウント「99」から「104」までにおいてはスコアの値はそれぞれ、1000点満点中の900点以上である。一方で、文字カウント「105」以後「108」までにおいて、スコアの値はそれぞれ800点未満である。このように、認識対象の文字の列の中のある部分列において、不連続性をもってスコアの値が変わってしまうことは、入力文字画像で使用されているフォントが変わった場合に起こり得る。同図に示す例では、文字カウント「105」の位置以後においてスコアが低くなっている。このとき、選択再考判断部35は、文字カウント「105」の位置以後でフォントが変化したかどうかを、次に述べる処理で判定する。また、選択再考判断部35は、フォントが変化した点(位置)を推定する。既に述べたとおり、選択再考判断部35は、その判断のために、文字列の中における所定区間の総合スコアを計算する。これは、図3におけるステップS4で計算される総合スコアである。
FIG. 4 is a schematic view showing the contents written in the data storage area for work in a state in the middle of processing by the
図5は、選択再考判断部35によって算出される総合スコアを説明するための概略図である。同図において、各々の丸印が認識処理の対象の文字に対応する。そして、同図では、文字の位置を相対値で示している。即ち、現在ポイントの位置をゼロとし、文字の列の前方(同図においては左側)を負として、文字の列の後方(同図においては右側)を負とする。また、各位置におけるスコアを、この相対値を用いて表す。即ち、相対位置「0」におけるスコアはS0であり、相対位置「−1」におけるスコアはS−1であり、また、他の位置についても同様である。
FIG. 5 is a schematic diagram for explaining the total score calculated by the selection
ここで、選択再考判断部35は、現在ポイントを含む直近のn個の文字の列の総合スコアを算出する。そのn個の文字とは、同図において、相対位置が、「−n+1」から「0」までの文字である。ただし、nがとり得る範囲は、Nmin≦n≦Nmaxである。NminおよびNmaxは、適宜定められる整数値である。例えば、NminおよびNmaxの値を、文字認識装置1の設定値として定められるようにする。一例として、Nmin=1,Nmax=6とするが、これらの値には限られない。選択再考判断部35は、上記のn個の文字の列の総合スコアを、各々の文字のスコアの値S−n+1,S−n+2,・・・,S0に基づいて算出する。上記n個に含まれる各々の文字のスコアの値が高いほど、そのn個の総合スコアの値が高くなるようにする。
Here, the selection
選択再考判断部35が算出する総合スコアとして、絶対総合スコアまたは相対総合スコアのいずれかを用いる。これらのいずれを用いるかについては、適宜定める。
絶対総合スコアは、上記n個の文字のスコアだけによって定まる絶対的な値である。一例として、選択再考判断部35は、絶対総合スコアとして、これらn個のスコアの平均値を用いる。つまり、このとき、絶対総合スコアは、
(S−n+1+S−n+2+・・・+S0)/n
という式で計算される。
相対総合スコアは、上記n個の文字のスコアが、その直前の所定の長さの文字の列のスコアと比べてどの程度高いか或は低いかを表す相対的な値である。一例として、選択再考判断部35は、これらn個のスコアの平均値から、それらn個の文字の列の直前のN0個のスコアの平均値を減じた値を用いる。なお、N0は、適宜定められる整数値である。一例として、N0=Nmaxとしてよいが、その値には限定されない。つまり、このとき、相対総合スコアは、
{(S−n+1+S−n+2+・・・+S0)/n}−{(S−n−N0+1+S−n−N0+2+・・・+S−n)}/N0}
という式で計算される。
As the overall score calculated by the selection
The absolute total score is an absolute value determined only by the score of the n characters. As an example, the selection
(S- n + 1 + S- n + 2 + ... + S 0 ) / n
It is calculated by the formula
The relative total score is a relative value indicating how much the score of the n characters is higher or lower than the score of the string of characters of a predetermined length immediately preceding it. As an example, the selection
{(S -n + 1 + S -
It is calculated by the formula
nが複数の値をとり得るとき、選択再考判断部35は、その各々のnの値について、総合スコアを計算する。上で例示したNmin=1,Nmax=6の場合、nは、n=1,2,3,4,5,6の6通りの値をとり得る。
When n can take a plurality of values, the selection
図6は、上で説明した総合スコアの具体例を説明するための概略図である。同図に示す例では、n=4であり、N0=4である。同図において示す、948,923,910,901,777,791,760,750という値は、各々の位置について算出されたスコアである。
図示する例において、選択再考判断部35は、絶対総合スコアを次のように計算する。即ち、
(S−3+S−2+S−1+S0)/n
=(777+791+760+750)/4
=769.50
である。
また、図示する例において、選択再考判断部35は、相対総合スコアを次のように計算する。即ち、
{(S−3+S−2+S−1+S0)/n}−{(S−7+S−6+S−5+S−4)}/N0}
={(777+791+760+750)/4}−{(948+923+910+901)/4}
=−151.00
である。
FIG. 6 is a schematic diagram for describing a specific example of the comprehensive score described above. In the example shown in the figure, n = 4 and N 0 = 4. The
In the illustrated example, the selection
(S -3 + S -2 + S -1 + S 0) / n
= (777 + 791 + 760 + 750) / 4
= 769.50
It is.
Further, in the illustrated example, the selection
{(S -3 + S -2 + S -1 + S 0) / n} - {(S -7 + S -6 + S -5 + S -4)} / N 0}
= {(777 + 791 + 760 + 750) / 4}-{(948 + 923 + 910 + 901) / 4}
= -151.00
It is.
既に述べたように、選択再考判断部35によって算出される総合スコア(絶対総合スコアまたは相対総合スコア)が所定の基準値未満である場合には、そのn個の文字の列の先頭の位置が、フォント変更点である可能性がある(図3のステップS5における分岐)。つまり、その位置は、フォント変更点の候補である。なお、nが複数の値をとり得る場合には、フォント変更点の候補が複数存在する場合があり得る。
As described above, when the total score (absolute total score or relative total score) calculated by the selection
ここで、総合スコアについての基準値は、適宜、設定可能とする。
絶対総合スコアについての基準値は、一例として、790点とする。
相対総合スコアについての基準値は、一例として、−100点とする。
なお、ここに例示した値以外を基準値として用いてもよい。
Here, the reference value for the overall score can be set as appropriate.
The reference value for the absolute total score is, for example, 790 points.
The reference value for the relative overall score is, for example, -100.
In addition, you may use as a reference value except the value illustrated here.
図7は、選択再考判断部35が、上記のフォント変更点の候補のそれぞれが、実際にフォント変更点であるか否かを判定する処理を説明するための概略図である。前述の通り、選択再考判断部35は、フォント変更点を推定するために、「フォントが変更されるのは単語の区切りにおいてである」という知識に基づいた処理を行う。選択再考判断部35は、単語辞書データを記憶する手段を内部に備え、その単語辞書データを参照しながらフォント変更点を推定する。同図の(a)および(b)のそれぞれは、選択再考判断部35が前述の総合スコアに基づいて求めたフォント変更点候補の具体例を示す。同図(a)は、フォント変更点が「素晴らしい」の中の「素」である場合の例を示す。このとき、この「素」とその直前の「、」(読点)の間で異なるフォントが用いられている可能性がある。同図(b)は、フォント変更点が「素晴らしい」の中の「し」である場合の例を示す。このとき、この「し」とその直前の「ら」との間で異なるフォントが用いられている可能性がある。
FIG. 7 is a schematic diagram for describing processing in which the selection
選択再考判断部35は、これらのフォント変更点候補のそれぞれについて、単語辞書データを参照しながら処理を行う。単語辞書データは、予め作成されているものであり、例えば「しかし」、「彼」、「は」、「素晴らしい」、「出来」などといった単語を含んでいる。よって、選択再考判断部35は、同図(a)の例におけるフォント変更点候補が、「は」という単語と「素晴らしい」という単語の区切りにあることから、このフォント変更点候補は真にフォント変更点であると判定する。一方、選択再考判断部35は、同図(b)の例におけるフォント変更点候補は、「素晴ら」という文字列と「しい」という文字列を区切る位置にあることから、このフォント変更点候補は真のフォント変更点ではないと判定する。その前提として、「素晴ら」という文字列や「しい」という文字列は、単語辞書データには登録されていない。
The selection
選択再考判断部35が形態素解析処理エンジンを備える場合には、選択再考判断部35は対象の文字列について形態素解析処理を行う。そして、フォント変更点候補が形態素の区切りに位置している場合には、選択再考判断部35は、そのフォント変更点候補が真のフォント変更点であると判定する。また、フォント変更点候補が形態素の区切りではない場合には、選択再考判断部35は、そのフォント変更点候補は真のフォント変更点ではないと判定する。なお、形態素解析処理自体は、既存の技術を用いて行える。
When the selection
次に、フォント選択部33による処理の詳細について説明する。
フォント選択部33は、所定の長さの文字画像の列に基づいて、それらの文字画像で使用されているフォント種別を識別するものである。フォント選択部33は、図3のステップS2でフォントを選択する処理を行う。
Next, details of processing by the
The
図8は、フォント選択部33がフォントを識別し、特定する処理を説明するための概略図である。同図(a)に示す「しかし彼は」文字画像の列は、フォント選択部33がフォントの識別処理を行う対象の文字画像である。フォント選択部33は、まず、これらの文字画像の一つ一つについてフォントを特定する。図示する例では、先頭の「し」のフォントをまず特定する。そのため、フォント選択部33は、この文字画像に関する複数の候補文字を選択する。同図(b)は、選択された文字候補を示すものであり、平仮名の「し」や、片仮名の「レ」や、英字(大文字)の「L」などが文字候補に含まれている。これらの文字候補を選択するために、フォント選択部33は、候補文字特定用辞書を使用する。候補文字特定用辞書は、認識用データベース30に記憶されており、各フォントに共通の特徴量を持つ辞書データである。つまり、候補文字特定用辞書は、フォント種別に依存しない辞書データである。候補文字特定用辞書は、複数のフォント種別における各文字の共通の特徴量等の情報を含むものであり、予め認識用データベース30に書き込んでおく。現段階ではフォントが特定できていないため、フォント選択部33は、この候補文字特定用辞書を用いることによって、複数の候補文字を特定する。フォント種別に共通の特徴量を用いることにより、対象画像から得られた文字形状から候補を絞り込むことは可能である。また、取得した文字候補の類似文字を予め候補文字特定用辞書に登録しておくことにより、その類似文字を候補文字の集合に含めることも可能である。
FIG. 8 is a schematic diagram for explaining a process in which the
同図(b)に示す候補文字が得られると、次にフォント選択部33は、それらの候補文字のそれぞれについて、フォント別の辞書データを参照し、処理対象の文字のスコアを算出する。同図(c)は、処理対象の文字画像について、候補文字ごと、且つフォント種別ごとに算出されたスコアの例を示す。同図(c)の表において、各行はフォント種別に対応し、各列は文字種別(候補文字)に対応する。この表に示すスコアの値の中で、最も高いのは、フォント種別「フォントA」における文字「し」のスコア960である。よって、フォント選択部33は、この文字画像のフォントが「フォントA」であることを特定する。また、フォント選択部33は、フォント識別の対象である他の文字についても、同様の処理を行い、各文字のフォントを特定する。
When the candidate characters shown in FIG. 6B are obtained, the
図9は、フォント選択部33がフォントを識別する処理を説明するための概略図であり、複数の文字画像に対して行ったフォント識別の結果を示している。同図に示す通り、左側から「し」、「か」、「し」、「彼」、「は」の各文字画像に対する識別結果は、それぞれ、「フォントA」、「フォントB」、「フォントA」、「フォントA」、「フォントA」である。このように、フォント選択部33は、フォント選択の確度を高めるため、数文字に渡ってフォントを特定する処理を繰り返し、最も可能性の高いフォントを選択する。フォント選択部33は、複数の文字それぞれについて特定されたフォントに基づき、例えば単純な多数決で全体のフォントを特定する。図示する例では、「フォントA」が選択される。
FIG. 9 is a schematic diagram for explaining the process of the
なお、このとき、文字種別ごとに重み(フォント選択用スコア)を予め設定しておいて、重み付きの多数決によって全体のフォントを特定するようにしてもよい。フォント選択用スコアとしては、字形が単純な文字(例えば、加算記号「+」やコロン「:」などといった記号類)に対して低い値(重みが小さい値)を設定する。逆に字形が複雑な文字(例えば、漢字等)に対して高い値(重みが大きい値)を設定する。 At this time, a weight (score for font selection) may be set in advance for each character type, and the entire font may be specified by a weighted majority. As the font selection score, a lower value (a smaller weight) is set for a character having a simple glyph (for example, a symbol such as an addition symbol “+” or a colon “:”). Conversely, a high value (a value with a large weight) is set for a character having a complicated character shape (for example, kanji or the like).
なお、図8で説明した候補文字特定用辞書による候補文字の絞り込み抽出を行わず、最初からフォント種別ごとの辞書データを使用して、スコアの高いフォントを選択するようにしてもよい。また、その他、類似の方法によってフォント選択部33がフォントを選択するようにしてもよい。
It is also possible to select a font with a high score using dictionary data for each font type from the beginning without narrowing and extracting candidate characters by the candidate character specifying dictionary described in FIG. In addition, the
以上説明したように、第1の実施形態では、選択再考判断部35が、文字認識部31から出力されたスコアのデータに基づいて途中でのフォントの変更の可能性を検出し、ルールにも基づいてフォントが変更された位置を推定する。これにより、選択再考判断部35が、認識処理において設定したフォントの種別を変更すべきであるか否かを判断する。よって、第1の実施形態では、フォントが変更された位置を精度よく検出することができる。
また、第1の実施形態では、選択再考判断部35が、単語の区切りのみがフォントの区切りになり得るというルール(知識)に基づいて、フォントが変更された位置を推定する。これにより、単語の途中でフォントが変更されたという判断を行うことなく、フォントが変更された位置を精度よく検出することができる。
そして、これらにより、文字認識の精度が向上する。
As described above, in the first embodiment, the selection
In the first embodiment, the selection
Then, the accuracy of character recognition is improved by these.
(第2の実施形態)
次に、第2の実施形態について説明する。なお、前述の実施形態と同様の事項については説明を省略する場合がある。以下では、本実施形態に特有の事項を中心に説明する。
図10は、本実施形態による文字認識装置の概略機能構成を示すブロック図である。同図に示すように、文字認識装置2は、画像入力部21と、画像処理部22と、文字抽出部23と、認識用データベース30と、文字認識部31と、フォント選択部33と、選択再考判断部36と、出力部41とを持つ。即ち、文字認識装置2は、第1の実施形態における選択再考判断部35に代えて、選択再考判断部36を持つ。
Second Embodiment
Next, a second embodiment will be described. In addition, description may be abbreviate | omitted about the matter similar to the above-mentioned embodiment. In the following, matters specific to the present embodiment will be mainly described.
FIG. 10 is a block diagram showing a schematic functional configuration of the character recognition device according to the present embodiment. As shown in the figure, the
文字認識装置2による処理手順の全体は、図3を参照しながら説明した文字認識装置1のそれとほぼ同様である。ただし、同図のステップS6において用いる知識が、第1の実施形態において用いる知識と異なる。以下で、選択再考判断部36の処理について説明する。本実施形態における選択再考判断部36は、下記の2つのルールを、知識として利用する。なお、これらのルールは、第1の実施形態で既に述べたルールベースに格納されている。
(ルール1)一対の括弧等で区切られた一連の文字の列は、特有のフォントで印字されている場合がある。
(ルール2)通貨記号で始まる一連の数字列(ただし、コンマ(comma)やピリオド(period)を含んでもよい)は、特有のフォントで印字されている場合がある。
The entire processing procedure by the
(Rule 1) A series of characters separated by a pair of parentheses may be printed in a specific font.
(Rule 2) A series of numeric strings beginning with a currency symbol (but may contain commas or periods) may be printed in a specific font.
上記のルール1における「括弧等」とは、鉤括弧(一重または二重の鉤括弧)や、丸括弧や、角括弧や、波括弧(カーリーブレース)や、山括弧等を含むが、これらに限定されない。これらの括弧は、文書内において、左右の対(ただし、縦書き文書の場合には上下の対)で使用される。これら対を成す括弧等を、便宜上、「囲み記号」と呼ぶ。囲み記号は、文字列を左右から(ただし、縦書き文書の場合には上下から)囲むための記号である。囲みの最初に位置する記号を、「開く囲み記号」(open parenthesis)とも呼ぶ。また、囲みの最後に位置する記号を、「閉じる囲み記号」(closed parenthesis)とも呼ぶ。つまり、ルール1は、入力された列内で一対の囲み記号に囲まれた文字列について、当該文字列の前の文字列および後の文字列とはフォント種別が変更されるというルールである。
上記のルール2における「通貨記号」とは、円を表す記号「¥」や、ドルを表す記号「$」や、その他の通貨を表す記号を含む。なお、通貨記号と、その通貨記号に後続する数字の列とを合わせて、便宜上「数字列」と呼ぶ。つまり、ルール2は、列内における数字列は、当該数字列の前の文字列および後の文字列とは、フォント種別が変更されるというルールである。
Examples of “brackets and the like” in the above-mentioned
The “currency symbol” in
なお、上記の括弧等あるいは通貨記号として、いわゆる全角文字が用いられる場合と、いわゆる半角文字が用いられる場合とがある。これらの文字が全角であるか半角であるかに依らず、選択再考判断部36はルール1またはルール2を適用しながらフォント変更点を推測する。
There are cases where so-called full-size characters are used as the above-mentioned parentheses or the like or currency symbols, and cases where so-called half-size characters are used. Regardless of whether these characters are full-width or half-width, the selection
図11は、選択再考判断部36によるフォント変更点推定の処理を説明するための概略図である。同図(a)〜(c)のそれぞれは、認識処理の対象である文字画像の列を示す。また、同図では、認識処理における現在ポイントを示すとともに、現在ポイントを基準とした相対位置を各文字画像の上に付している。
FIG. 11 is a schematic diagram for explaining the process of font change point estimation by the selection
同図(a)の例では、現在ポイント(相対位置が「0」)の文字は「い」であり、相対位置「−5」における文字は左二重鍵括弧であり、相対位置「+4」における文字は右二重鍵括弧である。なお、現在位置に基づいた部分文字列の総合ポイントは既に計算されている(総合ポイントの計算は、第1の実施形態と同様)。これにより、選択再考判断部36は、フォント変更点の候補を既に求めている。相対位置「−5」の文字がフォント変更点候補である場合、上記のルール1にしたがって、選択再考判断部36は、このフォント変更点候補が真のフォント変更点であると判定する。即ち、相対位置「−6」と相対位置「−5」とで、異なるフォントが用いられていると判定する。一方、相対位置「−2」の文字がフォント変更点候補である場合、上記のルール1によれば、選択再考判断部36は、このフォント変更点候補は真のフォント変更点ではないと判定する。即ち、相対位置「−3」と相対位置「−2」とでは異なるフォントは用いられないという知識(ルール1)を利用した判定を行う。
In the example of (a) of the figure, the character of the current point (relative position is “0”) is “i”, the character at relative position “-5” is the left double bracket, relative position “+4” The characters in are right double brackets. Note that the total points of the partial character string based on the current position have already been calculated (the calculation of the total points is the same as in the first embodiment). Thus, the selection
同図(b)の例では、現在ポイント(相対位置が「0」)の文字は「べ」であり、相対位置「−12」における文字は左二重鍵括弧であり、相対位置「+3」における文字は右二重鍵括弧である。ここでも同様に、選択再考判断部36は、フォント変更点の候補を既に求めている。相対位置「−5」の文字がフォント変更点候補である場合、上記のルール1によれば、選択再考判断部36は、このフォント変更点候補は真のフォント変更点ではないと判定する。即ち、相対位置「−6」と相対位置「−5」とでは異なるフォントは用いられないという知識を利用した判定を行う。一方、相対位置「−2」の文字がフォント変更点候補である場合、上記のルール1にしたがって、選択再考判断部36は、このフォント変更点候補が真のフォント変更点であると判定する。即ち、相対位置「−3」と相対位置「−2」とで、異なるフォントが用いられていると判定する。
In the example of (b) of the figure, the character of the current point (relative position is “0”) is “be”, the character at relative position “-12” is the left double bracket, relative position “+3” The characters in are right double brackets. Here again, the selection
同図(c)の例では、現在ポイント(相対位置が「0」)の文字は数字の「5」であり、相対位置「−5」における文字は通貨記号「$」である。また、相対位置「−5」から「0」までの文字の列は、通貨記号で始まる一連の数字列である。相対位置「−5」の文字がフォント変更点候補である場合、上記のルール2により、選択再考判断部36は、このフォント変更点候補は真のフォント変更点であると判定する。即ち、相対位置「−6」と相対位置「−5」とでは異なるフォントが用いられていると判定する。一方、相対位置「−3」の文字がフォント変更点候補である場合、上記のルール2にしたがえば、選択再考判断部36は、このフォント変更点候補は真のフォント変更点ではないと判定する。その理由は、相対位置「−3」は、ルール2で規定する「通貨記号で始まる一連の数字列」の途中であるためである。即ち、選択再考判断部36は、このような一連の途中ではフォントは変更されないという知識を利用した判定を行っている。
In the example of (c) of the figure, the character of the current point (the relative position is "0") is the numeral "5", and the character at the relative position "-5" is the currency symbol "$". In addition, a string of characters from the relative position "-5" to "0" is a series of digit strings starting with a currency symbol. If the character at the relative position "-5" is a font change point candidate, the selection
以上のように、選択再考判断部36は、ルール1とルール2とを併用して、フォント変更点を推定する処理を行う。なお、選択再考判断部36が、ルール1とルール2のいずれか一方のみを用いるようにしてもよい。また、ルールベースにさらにその他のルールを予め格納しておき、選択再考判断部36が、当該その他のルールを併用してフォント変更点を推定するようにしてもよい。また、選択再考判断部36が、第1の実施形態で説明した「フォント変更位置は、単語の区切りの位置である」というルール(知識)と、本実施形態で説明しているルールとを併用するようにしてもよい。
As described above, the selection
以上説明したように、第2の実施形態では、選択再考判断部36が、囲み記号(左右一対の括弧等)で囲まれた文字列のフォントは、その前後の文字列と異なるフォントである(場合がある)というルールに基づいて、フォントが変更された位置を推定する。これにより、フォント変更点を推定する精度が向上する。
また、第2の実施形態では、選択再考判断部36が、数字列(数字のみの列や、数字とピリオドとコンマのみからなる列や、これらの列の先頭に通貨記号が存在するもの等)のフォントは、その前後の文字列と異なるフォントである(場合がある)というルールに基づいて、フォントが変更された位置を推定する。これにより、フォント変更点を推定する精度が向上する。
さらに第2の実施形態では、第1の実施形態で説明した、単語の区切りの位置のみがフォント変更点になり得るという知識を併用することもできる。これにより、フォント変更点を推定する精度が向上する。
As described above, in the second embodiment, the font of the character string enclosed by the surrounding symbols (a pair of left and right parentheses, etc.) of the selection
Further, in the second embodiment, the selection
Furthermore, in the second embodiment, it is also possible to use the knowledge that only the position of the word break can be a font change point described in the first embodiment. This improves the accuracy of estimating font change points.
上記各実施形態では、選択再考判断部がフォント変更点を推定する際に用いる知識(ルール)を複数説明したが、さらに、次のようなルールを用いてもよい。例えば、通貨記号の有無に依らず、一連の数字列の前後が区切りであり、その区切りの箇所においてフォントは変更されるというルールを用いてもよい。また、例えば、日本語の文の中における一連の英字列の前後が区切りであり、その区切りの箇所においてフォントは変更されるというルールを用いてもよい。 In each of the above embodiments, a plurality of pieces of knowledge (rules) used when the selection reconsideration determination unit estimates a font change point are described. However, the following rule may be used. For example, regardless of the presence or absence of a currency symbol, a rule may be used in which a series of numeric strings precede and follow is a break, and the font is changed at the place of the break. Also, for example, a rule may be used in which a series of alphabetic strings in a Japanese sentence is preceded and followed by a break, and the font is changed at the place of the break.
また、上記各実施形態では、図3に示したフローチャートにしたがって、文字認識部と選択再考判断部とフォント選択部とに順次制御が渡り、シーケンシャルに処理を行う場合を説明したが、例えば、文字認識部と選択再考判断部とフォント選択部の機能を複数のプロセッサーに割り当てて、少なくとも一部機能を並列に処理するようにしてもよい。これにより、適切なフォントを選択しながら、文字認識処理をより高速に実行できる。 In each of the above embodiments, according to the flowchart shown in FIG. 3, the case where control is sequentially passed to the character recognition unit, the selection reconsideration determination unit, and the font selection unit and processing is sequentially performed is described. The functions of the recognition unit, the selection reconsideration determination unit, and the font selection unit may be allocated to a plurality of processors, and at least a part of the functions may be processed in parallel. This makes it possible to execute character recognition processing faster while selecting an appropriate font.
また、上記各実施形態では、1件の入力画像について、ワンパス(one-pass)で文字認識部の処理と選択再考判断部の処理とフォント選択部の処理とを行ったが、例えば、フォントを識別する処理のパスと、そのパスで特定されたフォントに基づく文字認識の処理のパスとを、ツーパス(two-pass)方式で実行するようにしてもよい。 In each of the above embodiments, the processing of the character recognition unit, the processing of the selection reconsideration judgment unit, and the processing of the font selection unit are performed in one pass for one input image. The pass of the process of identification and the pass of the process of character recognition based on the font specified in the pass may be executed by a two-pass method.
また、上記各実施形態における画像処理部の機能を文字認識装置の外部に設けるようにしてもよい。この場合、文字認識装置は、前処理済みの画像を入力する。さらに、上記各実施形態における文字抽出部の機能を文字認識装置の外部に設けるようにしてもよい。この場合、文字認識装置は、切り出された文字画像の、順序付けられた列を入力する。 Further, the function of the image processing unit in each of the above embodiments may be provided outside the character recognition apparatus. In this case, the character recognition device inputs the preprocessed image. Furthermore, the function of the character extraction unit in each of the above embodiments may be provided outside the character recognition device. In this case, the character recognition device inputs an ordered sequence of clipped character images.
以上説明した少なくともひとつの実施形態によれば、文字認識部から出力されたスコアのデータに基づいて途中でのフォントの変更の可能性を検出し、ルールベースに記憶されたルールにも基づいてフォントが変更された位置を推定し、認識処理において設定したフォントの種別を変更すべきであるか否かを判断する選択再考判断部を持つことにより、フォントが変更された位置(フォント変更点)を精度よく検出することができる。これにより、文字認識の精度向上につながる。 According to at least one embodiment described above, the possibility of font change on the way is detected based on the data of the score output from the character recognition unit, and the font is also detected based on the rule stored in the rule base The position (font change point) at which the font has been changed is determined by having a selection reconsideration judgment unit that estimates the position at which the character has been changed and determines whether or not the font type set in the recognition process should be changed. It can detect accurately. This leads to an improvement in the accuracy of character recognition.
なお、上述した各実施形態における文字認識装置の少なくとも一部の機能をコンピューターで実現するようにしても良い。その場合、機能を実現するためのプログラムをコンピューター読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピューターシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピューターシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピューター読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピューターシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピューター読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバーやクライアントとなるコンピューターシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピューターシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。 Note that at least a part of the functions of the character recognition device in each embodiment described above may be realized by a computer. In that case, the program for realizing the function may be recorded in a computer readable recording medium, and the program recorded in the recording medium may be read and executed by a computer system. Here, the “computer system” includes an OS and hardware such as peripheral devices. The term "computer-readable recording medium" refers to a storage medium such as a flexible disk, a magneto-optical disk, a ROM, a portable medium such as a ROM or a CD-ROM, or a hard disk incorporated in a computer system. Furthermore, "computer-readable recording medium" holds a program dynamically for a short time, like a communication line in the case of transmitting a program via a network such as the Internet or a communication line such as a telephone line. It may also include one that holds a program for a certain period of time, such as volatile memory in a computer system that becomes a server or client in that case. The program may be for realizing a part of the functions described above, or may be realized in combination with the program already recorded in the computer system.
本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。 While certain embodiments of the present invention have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the invention. These embodiments can be implemented in other various forms, and various omissions, replacements, and modifications can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the invention described in the claims and the equivalents thereof as well as included in the scope and the gist of the invention.
1,2…文字認識装置、21…画像入力部、22…画像処理部、23…文字抽出部、30…認識用データベース、31…文字認識部、33…フォント選択部、35,36…選択再考判断部、41…出力部 1, 2 ... character recognition device, 21 ... image input unit, 22 ... image processing unit, 23 ... character extraction unit, 30 ... recognition database, 31 ... character recognition unit, 33 ... font selection unit, 35, 36 ... selection reconsideration Judgment part, 41 ... output part
Claims (6)
文字画像の列を取得し、前記認識用データベース内の前記辞書データを参照しながら前記文字画像の認識処理を行うとともに、認識処理の際の前記辞書データと前記文字画像との間の合致度を表すスコアを出力する文字認識部と、
前記文字画像と前記認識用データベース内の前記フォント種別ごとの前記辞書データに基づいて前記文字画像のフォント種別を特定することによって、前記文字認識部が参照する前記辞書データのフォント種別を設定するフォント選択部と、
前記文字認識部が前記文字画像の列に含まれる前記文字画像の認識処理を順次行った際に、前記スコアが低下した前記列内の区間を検出するとともに、ルールベース内に記憶されているルールに基づいて当該区間または当該区間近傍におけるフォント変更点を推定し、前記フォント変更点以後について前記フォント選択部が前記フォント種別を再設定するよう制御する選択再考判断部と、
を備える文字認識装置。 A recognition database that holds dictionary data for character recognition for each font type;
While acquiring a string of character images and performing recognition processing of the character image while referring to the dictionary data in the recognition database, the matching degree between the dictionary data and the character image in the recognition processing is obtained. A character recognition unit that outputs a score representing
A font for setting a font type of the dictionary data to be referred to by the character recognition unit by specifying a font type of the character image based on the character image and the dictionary data for each font type in the recognition database A selection unit,
When the character recognition unit sequentially performs recognition processing of the character image included in the string of the character image, a section in the string whose score has been lowered is detected, and a rule stored in the rule base A selection reconsideration determination unit that estimates a font change point in the section or in the vicinity of the section based on, and controls the font selection section to reset the font type after the font change point;
Character recognition apparatus comprising:
請求項1に記載の文字認識装置。 The selection reconsideration determination unit estimates the font change point based on the rule that the font type is changed only at word break positions in the column.
The character recognition device according to claim 1.
請求項1または2に記載の文字認識装置。 The selection reconsideration determination unit is based on the rule that a character string surrounded by a pair of enclosure symbols in the string is changed in font type with a character string before and after the character string. To estimate the font change point,
The character recognition device according to claim 1 or 2.
請求項1から3までのいずれか一項に記載の文字認識装置。 The selection reconsideration determination unit estimates the font change point based on the rule that a digit string in the string is a character string before and after a character string of the digit string is changed in font type. Do,
The character recognition device according to any one of claims 1 to 3.
前記文字画像と前記認識用データベース内の前記フォント種別ごとの前記辞書データに基づいて前記文字画像のフォント種別を特定することによって、前記文字認識過程で参照する前記辞書データのフォント種別を設定するフォント選択過程と、
前記文字認識過程で前記文字画像の列に含まれる前記文字画像の認識処理を順次行った際に、前記スコアが低下した前記列内の区間を検出するとともに、ルールベース内に記憶されているルールに基づいて当該区間または当該区間近傍におけるフォント変更点を推定し、前記フォント変更点以後について前記フォント選択過程が前記フォント種別を再設定するよう制御する選択再考判断過程と、
を含む文字認識方法。 The character image recognition process is performed while acquiring a string of character images and referring to the dictionary data in a recognition database that holds dictionary data for character recognition for each font type, and performing the character image recognition processing, and the dictionary at the time of recognition processing A character recognition process that outputs a score representing the degree of match between the data and the character image;
A font for setting a font type of the dictionary data to be referred to in the character recognition process by specifying a font type of the character image based on the character image and the dictionary data for each font type in the recognition database The selection process,
When recognition processing of the character image included in the string of the character image is sequentially performed in the character recognition process, a section in the string whose score is lowered is detected, and a rule stored in a rule base A selection reconsideration determining step of estimating a font change point in the section or in the vicinity of the section based on and selecting the font selection process to reset the font type after the font change point;
Character recognition method including.
フォント種別ごとの文字認識用の辞書データを保持する認識用データベースと、
文字画像の列を取得し、前記認識用データベース内の前記辞書データを参照しながら前記文字画像の認識処理を行うとともに、認識処理の際の前記辞書データと前記文字画像との間の合致度を表すスコアを出力する文字認識部と、
前記文字画像と前記認識用データベース内の前記フォント種別ごとの前記辞書データに基づいて前記文字画像のフォント種別を特定することによって、前記文字認識部が参照する前記辞書データのフォント種別を設定するフォント選択部と、
前記文字認識部が前記文字画像の列に含まれる前記文字画像の認識処理を順次行った際に、前記スコアが低下した前記列内の区間を検出するとともに、ルールベース内に記憶されているルールに基づいて当該区間または当該区間近傍におけるフォント変更点を推定し、前記フォント変更点以後について前記フォント選択部が前記フォント種別を再設定するよう制御する選択再考判断部、
として機能させるためのプログラム。 A recognition database holding dictionary data for character recognition for each font type,
While acquiring a string of character images and performing recognition processing of the character image while referring to the dictionary data in the recognition database, the matching degree between the dictionary data and the character image in the recognition processing is obtained. A character recognition unit that outputs a score representing
A font for setting a font type of the dictionary data to be referred to by the character recognition unit by specifying a font type of the character image based on the character image and the dictionary data for each font type in the recognition database A selection unit,
When the character recognition unit sequentially performs recognition processing of the character image included in the string of the character image, a section in the string whose score has been lowered is detected, and a rule stored in the rule base A selection reconsideration determination unit that estimates a font change point in the section or in the vicinity of the section on the basis of, and controls the font selection section to reset the font type after the font change point;
Program to function as.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016029068A JP6523988B2 (en) | 2016-02-18 | 2016-02-18 | Character recognition device, character recognition method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016029068A JP6523988B2 (en) | 2016-02-18 | 2016-02-18 | Character recognition device, character recognition method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2017146841A JP2017146841A (en) | 2017-08-24 |
| JP6523988B2 true JP6523988B2 (en) | 2019-06-05 |
Family
ID=59681516
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016029068A Expired - Fee Related JP6523988B2 (en) | 2016-02-18 | 2016-02-18 | Character recognition device, character recognition method, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6523988B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2023002090A (en) * | 2021-06-22 | 2023-01-10 | 株式会社Pfu | Information processing system, display control method, and program |
| JP7805211B2 (en) * | 2022-03-16 | 2026-01-23 | キヤノン株式会社 | Information processing device, setting method, inspection system, and program |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS63100586A (en) * | 1986-10-16 | 1988-05-02 | Nec Home Electronics Ltd | Pattern recognizing method |
| JPH0233689A (en) * | 1988-07-23 | 1990-02-02 | Seiko Epson Corp | Character recognition device and character recognition means |
| JPH07319879A (en) * | 1994-05-30 | 1995-12-08 | Sharp Corp | Translation processor |
| JPH10283355A (en) * | 1997-04-02 | 1998-10-23 | Nippon Telegr & Teleph Corp <Ntt> | Company name analysis method and device |
| JP3349699B2 (en) * | 2001-01-31 | 2002-11-25 | 株式会社アジャスト | Document reading device and document reading processing program |
| JP3919617B2 (en) * | 2002-07-09 | 2007-05-30 | キヤノン株式会社 | Character recognition device, character recognition method, program, and storage medium |
-
2016
- 2016-02-18 JP JP2016029068A patent/JP6523988B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2017146841A (en) | 2017-08-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Bissacco et al. | Photoocr: Reading text in uncontrolled conditions | |
| CN100483450C (en) | Address recognition apparatus and method | |
| JP3919617B2 (en) | Character recognition device, character recognition method, program, and storage medium | |
| US11170265B2 (en) | Image processing method and an image processing system | |
| US9836646B2 (en) | Method for identifying a character in a digital image | |
| US9286527B2 (en) | Segmentation of an input by cut point classification | |
| Clausner et al. | Icdar2019 competition on recognition of early indian printed documents–reid2019 | |
| US10534846B1 (en) | Page stream segmentation | |
| JP2004227227A (en) | Information retrieval device | |
| US11270143B2 (en) | Computer implemented method and system for optical character recognition | |
| CN111401099A (en) | Text recognition method, device and storage medium | |
| RU2581786C1 (en) | Determination of image transformations to increase quality of optical character recognition | |
| US5524066A (en) | Text recognition by predictive composed shapes | |
| CN103310209A (en) | Method and device for identification of character string in image | |
| JP6523988B2 (en) | Character recognition device, character recognition method, and program | |
| Peng et al. | Multi-font printed Mongolian document recognition system | |
| Naz et al. | Arabic script based character segmentation: a review | |
| JP2022116983A (en) | Image processing apparatus, image processing method, and program | |
| Koga et al. | Segmentation of Japanese handwritten characters using peripheral feature analysis | |
| JP3187899B2 (en) | Character recognition device | |
| JP2004046723A (en) | Character recognition method, program used to execute the method, and character recognition device | |
| JPH07319880A (en) | Keyword extraction / search device | |
| US9047535B2 (en) | Image processing apparatus, image processing method, and computer readable medium | |
| JP2906758B2 (en) | Character reader | |
| JPH10162103A (en) | Character recognition device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180315 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190322 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20190402 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190426 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6523988 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |