Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6523988B2 - Character recognition device, character recognition method, and program - Google Patents
[go: Go Back, main page]

JP6523988B2 - Character recognition device, character recognition method, and program - Google Patents

Character recognition device, character recognition method, and program Download PDF

Info

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
Application number
JP2016029068A
Other languages
Japanese (ja)
Other versions
JP2017146841A (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.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Digital Solutions Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba Digital Solutions Corp filed Critical Toshiba Corp
Priority to JP2016029068A priority Critical patent/JP6523988B2/en
Publication of JP2017146841A publication Critical patent/JP2017146841A/en
Application granted granted Critical
Publication of JP6523988B2 publication Critical patent/JP6523988B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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.

特開平5−159107号公報Japanese Patent Application Laid-Open No. 5-159107 特開2006−092138号公報JP, 2006-092138, A 特開平1−180083号公報Unexamined-Japanese-Patent No. 1-180083 特開昭63−238688号公報Japanese Patent Application Laid-Open No. 63-238688 特開平3−068092号公報Unexamined-Japanese-Patent No. 3-068092

本発明が解決しようとする課題は、文書内でのフォント変更点を精度よく検出し、使用されているフォントに適した辞書を用いて文字の認識を行うことができる文字認識装置、文字認識方法、およびプログラムを提供することである。   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.

第1の実施形態の文字認識装置の概略機能構成を示すブロック図。FIG. 1 is a block diagram showing a schematic functional configuration of a character recognition device according to a first embodiment. 第1の実施形態の文字認識装置が備える作業用のデータ記憶領域の構成例を示す概略図。FIG. 2 is a schematic view showing a configuration example of a work data storage area provided in the character recognition device of the first embodiment. 第1の実施形態の文字認識装置による文字認識処理の手順を示すフローチャート。6 is a flowchart showing the procedure of character recognition processing by the character recognition device of the first embodiment; 第1の実施形態の文字認識装置による処理中での、作業用のデータ記憶領域に書き込まれている内容を示す概略図。FIG. 7 is a schematic view showing contents written in a work data storage area during processing by the character recognition device of the first embodiment. 第1の実施形態の選択再考判断部によって算出される総合スコアを説明するための概略図。The schematic diagram for demonstrating the comprehensive score calculated by the selection reconsideration judgment part of 1st Embodiment. 第1の実施形態の選択再考判断部によって算出される総合スコアの具体例を説明するための概略図。The schematic for demonstrating the specific example of the comprehensive score calculated by the selection reconsideration judgment part of 1st Embodiment. 第1の実施形態の選択再考判断部が、フォント変更点候補が、実際にフォント変更点であるか否かを判定する処理を説明するための概略図。FIG. 7 is a schematic diagram for explaining processing in which a selection reconsideration determination unit according to the first embodiment determines whether a font change point candidate is actually a font change point. 第1の実施形態のフォント選択部がフォントを識別し、特定する処理を説明するための概略図。FIG. 5 is a schematic diagram for explaining processing for identifying and specifying a font by the font selection unit of the first embodiment. 第1の実施形態のフォント選択部がフォントを識別する処理を説明するための概略図。FIG. 7 is a schematic view for explaining processing of the font selection unit of the first embodiment for identifying a font. 第2の実施形態の文字認識装置の概略機能構成を示すブロック図。FIG. 8 is a block diagram showing a schematic functional configuration of a character recognition device according to a second embodiment. 第2の実施形態の選択再考判断部によるフォント変更点推定の処理を説明するための概略図。FIG. 14 is a schematic view for explaining the process of font change point estimation by the selection reconsideration determination unit of the second embodiment;

以下、実施形態の文字認識装置、文字認識方法、およびプログラムを、図面を参照して説明する。   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 character recognition device 1 selects an image input unit 21, an image processing unit 22, a character extraction unit 23, a recognition database 30, a character recognition unit 31, a font selection unit 33, and It has a reconsideration determination unit 35 and an output unit 41.

画像入力部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 image input unit 21 acquires an image from the outside. This image includes a string of characters to be subjected to character recognition. For example, the image input unit 21 acquires a two-dimensional image by optically reading a paper document placed on a glass surface or the like. The image input unit 21 may be provided with a feeder for reading and feeding a plurality of sheets of paper sequentially. Further, for example, the image input unit 21 may acquire an image file supplied from the outside. Here, the image file supplied from the outside holds the information of the image in an appropriate format such as PDF format, JPEG format, PNG format, TIFF format and the like. "PDF" is an abbreviation for Portable Document Format. Also, "JPEG" is an abbreviation of Joint Photographic Experts Group. Also, "PNG" is an abbreviation of Portable Network Graphics. Also, "TIFF" is an abbreviation of Tagged Image File Format.

画像処理部22は、画像入力部21が取得した画像に適切な前処理を施すことにより、文字認識可能な状態にする。前処理の一例は、画像の二値化である。画像処理部22は、画像を、地の色(例えば、白)と文字の色(例えば、黒)とに二値化する。画像処理部22は、二値化の処理以外に、文字領域のサイズの正規化や、画像上のノイズの除去や、文字の線のスムージング等の処理を、適宜、必要に応じて行う。なお、画像処理部22が行うこれらの処理自体は、既存技術を用いて行うことが可能である。
文字抽出部23は、画像処理部22で処理した画像から、個々の文字の部分を抽出して、文字ごとに切り分ける。文字抽出部23が受け取る画像は文字列を含んでいるものであり、文字抽出部23は、その文字列に含まれている各文字の画像を切り出し、文字列内の文字の配列順にしたがって切り出した各文字の画像を保存する。なお、文字の抽出、切り出しの処理自体は、方法などは既存技術を用いて行うことができる。
The image processing unit 22 performs an appropriate pre-processing on the image acquired by the image input unit 21 so as to enable character recognition. An example of pre-processing is image binarization. The image processing unit 22 binarizes the image into a ground color (for example, white) and a character color (for example, black). The image processing unit 22 appropriately performs processing such as normalization of the size of the character area, removal of noise on the image, and smoothing of character lines, as needed, in addition to the binarization processing. Note that these processes performed by the image processing unit 22 can be performed using the existing technology.
The character extraction unit 23 extracts individual character portions from the image processed by the image processing unit 22 and separates the characters into individual characters. The image received by the character extraction unit 23 includes a character string, and the character extraction unit 23 cuts out the image of each character contained in the character string, and cuts out the image according to the arrangement order of the characters in the character string Save the image of each character. Note that the character extraction and cutout processing itself can be performed using existing techniques.

認識用データベース30は、文字認識に用いるための辞書データを保持する。辞書データは、各文字の画像の情報または各文字の認識のための特徴量の情報、あるいはそれら両方を含む。認識用データベース30は、フォント種別ごと且つ文字種別ごとに、辞書データを保持する。ここで、フォント種別とは、フォントファミリーと文字装飾属性との組み合わせによって識別される種別である。フォントファミリーとは、大別すると、例えば、ゴシック体、明朝体、教科書体等の区別である。フォントファミリーは、上記大別したグループ(例えばゴシック体)の中でも、さらにその字体によって細かく区別したり、またフォントを作るメーカーによっても細かく区別したりできる。文字装飾属性とは、例えば斜字体(斜めの字として表される)やボールド体(太い線で表される)といったものであり、これらの属性を有するか否かによって、フォントをさらに識別してもよい。例えば、数種類から数百種類程度のフォント種別に対応した辞書データを、認識用データベースが保持するようにしてよい。   The recognition database 30 holds dictionary data to be used for character recognition. The dictionary data includes information of an image of each character, information of a feature amount for recognition of each character, or both of them. The recognition database 30 holds dictionary data for each font type and each character type. Here, the font type is a type identified by a combination of a font family and a character decoration attribute. The font family is roughly classified into, for example, a Gothic font, a Mincho font, a textbook font, and the like. The font family can be further classified finely according to the font, even among the above roughly classified groups (eg, Gothic type), and also finely classified according to the maker of the font. The character decoration attributes are, for example, italics (represented as diagonal characters) or bold (represented by thick lines), and the font is further identified according to whether or not these attributes are included. It is also good. For example, the recognition database may hold dictionary data corresponding to several to several hundreds of font types.

文字認識部31は、認識用データベース30を参照しながら、文字抽出部23によって抽出された文字の認識を行う。なお、文字認識部31は、後述するフォント選択部33によって選択されたフォント種別の辞書データを認識用データベース30から読み出して、文字認識処理に使用する。具体的には、文字認識部31は、文字抽出部23から渡される1文字分の画像データを基に、文字種別ごとのスコアを算出する。スコアは、辞書データと文字画像との間の合致度を表す数値である。そして、文字認識部31は、スコアの最も高い文字種別を、その画像の認識結果として出力する。文字認識部31は、認識結果としてスコアが最も高かった文字の文字コード(ASCIIコードやJISコード等)の情報を出力する。なお文字認識処理の過程において、確からしさの順に並んだ、文字コードとそのスコアとのペアの列が得られる。本実施形態では、スコアは1000点満点の数値として表される。
なお、入力された画像データと辞書データとを比較することによってその画像データに含まれる文字を特定する(文字認識する)処理自体としては、既存の技術を用いることができる。
The character recognition unit 31 recognizes characters extracted by the character extraction unit 23 while referring to the recognition database 30. The character recognition unit 31 reads out dictionary data of the font type selected by the font selection unit 33 described later from the recognition database 30, and uses it for character recognition processing. Specifically, the character recognition unit 31 calculates a score for each character type based on the image data for one character passed from the character extraction unit 23. The score is a numerical value representing the degree of match between the dictionary data and the character image. Then, the character recognition unit 31 outputs the character type with the highest score as the recognition result of the image. The character recognition unit 31 outputs information of the character code (ASCII code, JIS code, etc.) of the character with the highest score as the recognition result. In the process of character recognition processing, a string of pairs of character code and its score, which are arranged in order of certainty, is obtained. In the present embodiment, the score is represented as a value of 1000 full marks.
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 font selection unit 33 specifies the font type of the character by comparing the character extracted by the character extraction unit 23 with the dictionary data stored in the recognition database 30. Further, the font selection unit 33 sets a font to be used when the character recognition unit 31 performs recognition processing according to the result of specifying the font type. The font selection unit 33 may reselect a font under the control of the selection reconsideration determination unit 35. That is, there is a case where the font selection unit 33 resets the font while the font for recognition processing is already set.
The details of the process in which the font selection unit 33 selects a font will be described later.

選択再考判断部35は、文字認識部31からの結果を各文字ごとに受け取り、認識処理におけるスコアの状況から対象フォントに変更があったか否かを判断する。具体的には、選択再考判断部35は、文字認識部31から認識処理の結果であるスコアのデータを受け取り、スコアの系列に基づいて認識処理中の文字列の途中でフォントが変更されたか否かを判断する。つまり、選択再考判断部35は、文字認識部31が文字画像の認識処理を順次行った際に、文字画像の列内においてスコアが低下した区間を検出する。そして、選択再考判断部35は、ルールに基づいて当該区間または当該区間近傍におけるフォントが変更された位置を推定する。これにより、選択再考判断部35は、認識処理において設定したフォントの種別を変更すべきであるか否かを判断する。また、選択再考判断部35は、フォントが変更されたと判定するときには、文字列中のどの文字の位置からフォントが変更されたかを特定する。フォントが変更された位置を「フォント変更点」と呼ぶ場合がある。フォントが変更されたと判定した場合には、選択再考判断部35は、フォントを選択し直すようフォント選択部33を制御する。   The selection reconsideration determination unit 35 receives the result from the character recognition unit 31 for each character, and determines from the situation of the score in the recognition processing whether or not the target font has been changed. Specifically, the selection reconsideration determination unit 35 receives the data of the score that is the result of the recognition process from the character recognition unit 31, and the font is changed in the middle of the character string in the recognition process based on the score sequence. To judge. That is, when the character recognition unit 31 sequentially performs character image recognition processing, the selection reconsideration determination unit 35 detects a section in which the score is lowered in the string of character images. Then, the selection reconsideration determination unit 35 estimates the position where the font in the section or the vicinity of the section has been changed based on the rule. Thereby, the selection reconsideration determination unit 35 determines whether or not the font type set in the recognition process should be changed. In addition, when determining that the font has been changed, the selection reconsideration determination unit 35 specifies from which position in the character string the font has been changed. The position where the font has been changed may be called "font change point". If it is determined that the font has been changed, the selection reconsideration determination unit 35 controls the font selection unit 33 to reselect the font.

印刷された文書等において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 reconsideration determination unit 35 makes a determination based on the characteristics of such a document. The selection reconsideration determination unit 35 internally includes a rule base, and the rule base holds knowledge of the point (position) at which the font is changed based on the above-mentioned characteristics of the document. The selection reconsideration determination unit 35 determines whether font selection should be reconsidered based on the rules (knowledge) stored in the rule base. Details of the process will be described later.

出力部41は、文字認識部31による認識処理の結果を外部に出力する。出力部41は、認識結果である文字コードの列を少なくとも出力する。また、出力部41が、認識結果の文字のスコアの値を併せて出力するようにしてもよい。また、出力部41が、認識結果として選ばれなかった文字のうち比較的スコアが高かった文字のコードや、各文字のスコアの値を併せて出力するようにしてもよい。出力部41が出力するデータの内容や形式は、適宜定めてよい。   The output unit 41 outputs the result of the recognition process by the character recognition unit 31 to the outside. The output unit 41 outputs at least a string of character codes which is a recognition result. In addition, the output unit 41 may output the value of the score of the character as the recognition result. Further, the output unit 41 may output the code of the character whose score is relatively high among the characters not selected as the recognition result and the value of the score of each character. The content and format of the data output by the output unit 41 may be determined as appropriate.

図2は、文字認識装置1が文字列の文字認識処理を行う際の、作業用のデータ記憶領域の構成例を示す概略図である。図示するデータは、処理中において、半導体メモリや磁気ハードディスク装置等に一時的に記録される。図示するデータは、2次元の表形式のデータであり、横方向が文字列中の文字の位置に対応する。このデータは、文字カウントと、入力文字画像と、スコアと、採用されたフォントと、認識結果の各項目を有している。   FIG. 2 is a schematic view showing a configuration example of a work data storage area when the character recognition device 1 performs character recognition processing of a character string. The illustrated data is temporarily recorded in a semiconductor memory, a magnetic hard disk drive, or the like during processing. The illustrated data is two-dimensional tabular data, and the horizontal direction corresponds to the position of the character in the character string. This data includes the items of character count, input character image, score, adopted font, and recognition result.

文字カウントは、画像入力部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 image input unit 21. The character count value is an integer starting at one. The range of data shown in the figure includes 99 to 119 as the character count. Each data of the input image, the score, the adopted font and the recognition result is held in association with the character count.
The input character image is data of an image of each character extracted by the character extraction unit 23. This input character image is a target of recognition processing by the character recognition unit 31.

スコアは、認識処理の結果として得られるスコアのデータである。このスコアのデータとして、最終的に認識結果として決定された文字に対するスコア(最高スコア)だけでなく、他の文字に対するスコアを保持するようにしてもよい。また、さらに、複数のフォント種別によってスコアを算出した場合には、フォント種別と文字種別の組み合わせに関連付けて複数のスコアの値を保持するようにしてもよい。
採用されたフォントは、当該文字に対して、フォント選択部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 font selection unit 33 for the character. When the font selection unit 33 resets the font selection, the data of the adopted font is also rewritten for the character.
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 character recognition device 1. As the character recognition unit 31 performs recognition processing one character at a time, the current point advances one by one (from left to right in the figure). However, there is also a possibility that the current point moves back (to the left in the figure) due to font reselection or the like.

同図に示す例では、文字カウントの値は、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 character count 99, "S", "S", "S", "S", "He", "H", "," "E", "Ear", "Sunny", "S", "Re" The recognition result "" is stored. The recognition result may include recognition errors.

図3は、文字認識装置1による文字認識処理の手順を示すフローチャートである。以下、このフローチャートに沿って、文字認識装置1による処理の全体的な流れを説明する。   FIG. 3 is a flowchart showing the procedure of the character recognition process by the character recognition device 1. The overall flow of processing by the character recognition device 1 will be described below along the flowchart.

まずステップS1において、文字認識装置1は、現在ポイントを初期化する。具体的には、文字認識装置1は、現在ポイントを、認識処理の対象の文字の列の先頭にセットする。   First, in step S1, the character recognition device 1 initializes the current point. Specifically, the character recognition device 1 sets the current point to the beginning of the character string to be recognized.

次にステップS2において、フォント選択部33は、フォントを選択し、設定する。具体的には、ステップS1からステップS2に移ってきた場合には、フォント選択部33は、予め定められたデフォルトのフォントを選択し、設定する。また、S9からステップS2に移ってきた場合には、フォント選択部33は、フォント変更位置(フォント変更位置については、後述する)以後の文字の画像に基づいて、ステップS8の処理(後述する)の結果として識別されたフォントを選択し、設定する。
なお、ステップS1からステップS2に移ってきた場合においても、フォント選択部33が、現在ポイントから後の数文字分の文字の画像に基づいて、フォントを識別し、選択するようにしてもよい。
なお、フォント選択部33がフォントを選択する処理の詳細については、後述する。
Next, in step S2, the font selection unit 33 selects and sets a font. Specifically, when the process proceeds from step S1 to step S2, the font selection unit 33 selects and sets a predetermined default font. When the process proceeds from step S9 to step S2, the font selection unit 33 executes the process of step S8 (described later) based on the image of characters after the font change position (the font changed position will be described later). Select and set the font identified as a result of.
Even when the process proceeds from step S1 to step S2, the font selection unit 33 may identify and select the font based on the image of the characters of several characters after the current point.
The details of the process in which the font selection unit 33 selects a font will be described later.

次にステップS3において、文字認識部31は、現在ポイントの文字の認識処理を行う。具体的には、文字認識部31は、現在選択されているフォントの辞書データを用いて、現在ポイントの文字画像の、各文字に対するスコアを算出する。そして、最もスコアの高い文字を認識結果として決定する。このとき、文字認識部31は、算出したスコアの情報を作業用のデータ記憶領域(図2参照)に書き込んでおく。   Next, in step S3, the character recognition unit 31 performs recognition processing of the character of the current point. Specifically, the character recognition unit 31 uses the dictionary data of the currently selected font to calculate the score for each character of the character image of the current point. Then, the character with the highest score is determined as the recognition result. At this time, the character recognition unit 31 writes the information of the calculated score in the data storage area for work (see FIG. 2).

次にステップS4において、選択再考判断部35は、現在ポイントまでの所定の長さの文字列のスコアに基づいて、当該所定の長さの文字列についての総合スコアを算出する。ここで、「所定の長さ」は複数であってもよい。ここで算出される総合スコアは、当該所定の長さの文字列に関して、現在選択されているフォントが妥当なフォントであるか否かを評価するための数値である。この総合スコアが所定の基準値以上であれば、現在選択されているフォントは妥当なフォントであると推定できる。逆に、この総合スコアがその基準値未満であれば、現在選択されているフォントが妥当ではないかもしれないと推定できる。なお、総合スコアについて、絶対的なスコアに基づく算出方法と、直前のスコアとの比較による相対的なスコアに基づく算出方法とがある。これらの総合スコアの算出のしかたについては、後で詳述する。   Next, in step S4, the selection reconsideration determination unit 35 calculates an overall score for the character string of the predetermined length based on the score of the character string of the predetermined length up to the current point. Here, the "predetermined length" may be plural. The total score calculated here is a numerical value for evaluating whether or not the currently selected font is a valid font for the character string of the predetermined length. If the total score is equal to or higher than a predetermined reference value, it can be estimated that the currently selected font is a valid font. Conversely, if this total score is less than the reference value, it can be estimated that the currently selected font may not be appropriate. In addition, there are a calculation method based on an absolute score and a calculation method based on a relative score by comparison with the immediately preceding score. The method of calculating these total scores will be described in detail later.

次にステップS5において、選択再考判断部35は、ステップS4で算出した総合スコアが、基準値以上であったかいなかを判断する。前述の通り、「所定の長さ」が複数である場合には、総合スコアも複数算出される。算出されたすべての総合スコアが基準値以上であった場合、即ち現在選択されているフォントが妥当であると推定される場合(ステップS5:YES)、次にステップS10に進む。1個以上の総合スコアが基準値未満であった場合、即ち現在選択されているフォントを再考すべきであるかもしれない場合(ステップS5:NO)、次にステップS6に進む。   Next, in step S5, the selection reconsideration determination unit 35 determines whether the total score calculated in step S4 is equal to or higher than a reference value. As described above, when the “predetermined length” is more than one, more than one total score is also calculated. If all the calculated total scores are equal to or higher than the reference value, that is, if it is estimated that the currently selected font is valid (step S5: YES), the process proceeds to step S10. If one or more total scores are less than the reference value, that is, if the currently selected font may be reconsidered (step S5: NO), the process proceeds to step S6.

次にステップS6に進んだ場合、同ステップにおいて、選択再考判断部35は、フォントが変更された位置を検出する。このとき、選択再考判断部35は、知識に基づいて、フォント変更位置を検出する。本実施形態における知識は、「フォント変更位置は、単語の区切りの位置に限定される」というものである。言い換えれば、単語の途中ではフォントは変更されないという知識である。そのため、選択再考判断部35は、単語辞書データを内部に備えており、この単語辞書データを参照しながら、作業用のデータ記憶領域との照合を行い、フォント変更位置を検出する。
なお、選択再考判断部35が、形態素解析処理エンジンを備えるようにしてもよい。この場合、選択再考判断部35は、現在ポイントまでの文字の列(認識結果の文字の列)について、形態素解析処理を行う。そして、形態素解析処理の結果として、認識対象の文字列の中の形態素の区切りの位置を、単語の区切りの位置として扱う。なお、形態素と単語とをほぼ同一のものとみなしても、本実施形態では差し支えない。
なお、フォント変更位置を検出する処理については、後でもより詳細に説明する。
このように、選択再考判断部35は、文字認識部31によって算出された一連の文字に関するスコアと、知識とに基づいて、フォント変更位置を検出(推定)する。
Next, when the process proceeds to step S6, in the same step, the selection reconsideration determination unit 35 detects the position at which the font has been changed. At this time, the selection reconsideration determination unit 35 detects the font change position based on the knowledge. The knowledge in the present embodiment is that "the font change position is limited to the position of the word break". In other words, it is the knowledge that the font is not changed in the middle of the word. Therefore, the selection reconsideration determination unit 35 internally includes word dictionary data, and collates with the data storage area for work while referring to the word dictionary data to detect a font change position.
The selection reconsideration determination unit 35 may include a morphological analysis processing engine. In this case, the selection reconsideration determination unit 35 performs morphological analysis processing on the character string up to the current point (the character string of the recognition result). Then, as a result of the morpheme analysis process, the position of the morpheme delimiter in the character string to be recognized is treated as the position of the word delimiter. In addition, even if it considers that a morpheme and a word are substantially the same, it does not interfere in this embodiment.
The process of detecting the font change position will be described in more detail later.
Thus, the selection reconsideration determination unit 35 detects (estimates) the font change position based on the score of the series of characters calculated by the character recognition unit 31 and the knowledge.

次にステップS7において、選択再考判断部35は、ステップS6の処理においてフォント変更位置を検出できたか否かを判定する。フォント変更位置が検出されていた場合には次に変更後のフォントを識別するために、ここで処理を分岐する。フォント変更位置が検出できた場合(ステップS7:YES)には、次のステップS8へ進む。フォント変更位置が検出できなかった場合(ステップS7:NO)には、次に、ステップS10へ飛ぶ。   Next, in step S7, the selection reconsideration determination unit 35 determines whether or not the font change position has been detected in the process of step S6. If the font change position has been detected, the process branches here to identify the changed font. If the font change position can be detected (step S7: YES), the process proceeds to the next step S8. If the font change position can not be detected (step S7: NO), the process jumps to step S10.

次にステップS8に進んだ場合、同ステップにおいて、フォント選択部33は、フォント変更位置以後の文字画像の列に基づいて、使用されているフォントを識別する。具体的には、フォント選択部33は、フォント変更選択位置以後、且つ現在ポイントまでの文字画像の列について、各フォントの辞書データでスコアを計算する。そして、当該列に関して、最もスコアの高いフォントが、当該列において使用されていると判断する。   Next, when the process proceeds to step S8, in the step, the font selection unit 33 identifies the used font based on the string of character images after the font change position. Specifically, the font selection unit 33 calculates a score using dictionary data of each font for a string of character images after the font change selection position and up to the current point. Then, for the column, it is determined that the font with the highest score is used in the column.

次にステップS9において、文字認識装置1は、現在ポイントを、フォント変更位置に設定する。これにより、ステップS6で検出されたフォント変更位置から、ステップS8で識別されたフォントの辞書データを用いて、文字認識処理をし直すこととなる。本ステップの処理の終了後は、ステップS2に戻る。   Next, in step S9, the character recognition device 1 sets the current point as the font change position. As a result, character recognition processing is performed again using the dictionary data of the font identified in step S8 from the font change position detected in step S6. After the process of this step is completed, the process returns to step S2.

ステップ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 character recognition device 1 advances the current point to the next character.
Next, in step S11, the character recognition device 1 determines whether or not all the input character images to be subjected to the character recognition process have ended. If it has ended (step S11: YES), the character recognition device 1 ends the processing of the entire flowchart. If it has not ended, that is, if an unprocessed input character image remains (step S11: NO), the process returns to step S3 to process the next character.
This is the end of the description of the overall processing procedure of the character recognition device 1.

次に、選択再考判断の処理の詳細について説明する。選択再考判断は、前述の通り、フォントの選択をし直すべきであるかどうかを判断するとともに、フォント変更点を推定する処理である。   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 character recognition device 1. The configuration itself of the data storage area for work is as described above. In the figure, the current point indicates the position of the character count "108". The currently selected font is "A", and at each position from the character count "99" to "108", the score calculated with the dictionary data of font "A" is written. Specifically, in the character count "99", the score is 950, and thereafter, the score at each position is 933, 948, 923, 910, 901, 777, 791, 760, 750. The score has not been calculated at positions after the character count “109”. Within the range shown in the figure, in the character count "99" to "104", the value of the score is 900 or more out of 1000 points, respectively. On the other hand, the value of the score is less than 800 points in each of the character count "105" to "108". As described above, in a partial string in a character string to be recognized, the score value may change with discontinuity, which may occur when the font used in the input character image changes. In the example shown in the figure, the score is low after the position of the character count "105". At this time, the selection reconsideration determination unit 35 determines whether or not the font has changed after the position of the character count “105” in the process described below. Further, the selection reconsideration determination unit 35 estimates a point (position) at which the font has changed. As described above, the selection reconsideration determination unit 35 calculates the total score of the predetermined section in the character string for the determination. This is the total score calculated in step S4 in FIG.

図5は、選択再考判断部35によって算出される総合スコアを説明するための概略図である。同図において、各々の丸印が認識処理の対象の文字に対応する。そして、同図では、文字の位置を相対値で示している。即ち、現在ポイントの位置をゼロとし、文字の列の前方(同図においては左側)を負として、文字の列の後方(同図においては右側)を負とする。また、各位置におけるスコアを、この相対値を用いて表す。即ち、相対位置「0」におけるスコアはSであり、相対位置「−1」におけるスコアはS−1であり、また、他の位置についても同様である。 FIG. 5 is a schematic diagram for explaining the total score calculated by the selection reconsideration determination unit 35. As shown in FIG. In the figure, each circle corresponds to a character to be recognized. And in the same figure, the position of the character is shown by relative value. That is, the position of the current point is zero, the front (left side in the figure) of the character string is negative, and the rear (right side in the figure) of the character string is negative. Also, the score at each position is represented using this relative value. That is, the score at a relative position "0" is S 0, the score at a relative position "-1" is S -1, The same applies to the other positions.

ここで、選択再考判断部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,・・・,Sに基づいて算出する。上記n個に含まれる各々の文字のスコアの値が高いほど、そのn個の総合スコアの値が高くなるようにする。 Here, the selection reconsideration determination unit 35 calculates the total score of the string of the latest n characters including the current point. The n characters are characters having a relative position of “−n + 1” to “0” in the same figure. However, the range which n can take is N min ≦ n ≦ N max . N min and N max are integer values appropriately determined. For example, the values of N min and N max can be determined as setting values of the character recognition device 1. As an example, N min = 1 and N max = 6 but they are not limited to these values. The selection reconsideration determination unit 35 calculates the total score of the above-described n character string based on the score values S −n + 1 , S −n +2 ,..., S 0 of the respective character scores. The higher the score value of each character included in the n, the higher the value of the n overall scores.

選択再考判断部35が算出する総合スコアとして、絶対総合スコアまたは相対総合スコアのいずれかを用いる。これらのいずれを用いるかについては、適宜定める。
絶対総合スコアは、上記n個の文字のスコアだけによって定まる絶対的な値である。一例として、選択再考判断部35は、絶対総合スコアとして、これらn個のスコアの平均値を用いる。つまり、このとき、絶対総合スコアは、
(S−n+1+S−n+2+・・・+S)/n
という式で計算される。
相対総合スコアは、上記n個の文字のスコアが、その直前の所定の長さの文字の列のスコアと比べてどの程度高いか或は低いかを表す相対的な値である。一例として、選択再考判断部35は、これらn個のスコアの平均値から、それらn個の文字の列の直前のN個のスコアの平均値を減じた値を用いる。なお、Nは、適宜定められる整数値である。一例として、N=Nmaxとしてよいが、その値には限定されない。つまり、このとき、相対総合スコアは、
{(S−n+1+S−n+2+・・・+S)/n}−{(S−n−N0+1+S−n−N0+2+・・・+S−n)}/N
という式で計算される。
As the overall score calculated by the selection reconsideration determination unit 35, either an absolute overall score or a relative overall score is used. About which of these is used, it determines suitably.
The absolute total score is an absolute value determined only by the score of the n characters. As an example, the selection reconsideration determination unit 35 uses an average value of these n scores as an absolute total score. That is, at this time, the absolute comprehensive score is
(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 reconsideration determination unit 35 uses a value obtained by subtracting the average value of the N 0 scores immediately before the string of n characters from the average value of the n scores. Note that N 0 is an integer value that is appropriately determined. As an example, N 0 = N max may be used, but is not limited to that value. That is, at this time, the relative comprehensive score is
{(S -n + 1 + S -n + 2 + ··· + S 0) / n} - {(S -n-N0 + 1 + S -n-N0 + 2 + ··· + S -n)} / N 0}
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 reconsideration determination unit 35 calculates a total score for each value of n. In the case of N min = 1, N max = 6 exemplified above, n can take six values: n = 1, 2, 3, 4, 5, 6.

図6は、上で説明した総合スコアの具体例を説明するための概略図である。同図に示す例では、n=4であり、N=4である。同図において示す、948,923,910,901,777,791,760,750という値は、各々の位置について算出されたスコアである。
図示する例において、選択再考判断部35は、絶対総合スコアを次のように計算する。即ち、
(S−3+S−2+S−1+S)/n
=(777+791+760+750)/4
=769.50
である。
また、図示する例において、選択再考判断部35は、相対総合スコアを次のように計算する。即ち、
{(S−3+S−2+S−1+S)/n}−{(S−7+S−6+S−5+S−4)}/N
={(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 values 948, 923, 910, 901, 777, 791, 760, 750 shown in the figure are scores calculated for each position.
In the illustrated example, the selection reconsideration determination unit 35 calculates the absolute total score as follows. That is,
(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 reconsideration determination unit 35 calculates the relative total score as follows. That is,
{(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 reconsideration determination unit 35 is less than a predetermined reference value, the position of the head of the n character string is , And may be a font change point (branch in step S5 of FIG. 3). That is, the position is a font change point candidate. When n can take a plurality of values, there may be a plurality of font change point candidates.

ここで、総合スコアについての基準値は、適宜、設定可能とする。
絶対総合スコアについての基準値は、一例として、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 reconsideration determination unit 35 determines whether or not each of the font change point candidates is actually a font change point. As described above, in order to estimate the font change point, the selection reconsideration determination unit 35 performs processing based on the knowledge that “the font is changed at the word break”. The selection reconsideration determination unit 35 internally includes means for storing word dictionary data, and estimates a font change point while referring to the word dictionary data. Each of (a) and (b) of the same figure shows the example of the font change point candidate which the selection reconsideration judgment part 35 calculated | required based on the above-mentioned total score. The figure (a) shows an example in case a font change point is "element" in "it is wonderful." At this time, there is a possibility that different fonts are used between this "element" and the immediately preceding "," (dot). The figure (b) shows an example in case a font change point is "it" in "it is wonderful." At this time, it is possible that different fonts are used between this “shi” and the immediately preceding “ra”.

選択再考判断部35は、これらのフォント変更点候補のそれぞれについて、単語辞書データを参照しながら処理を行う。単語辞書データは、予め作成されているものであり、例えば「しかし」、「彼」、「は」、「素晴らしい」、「出来」などといった単語を含んでいる。よって、選択再考判断部35は、同図(a)の例におけるフォント変更点候補が、「は」という単語と「素晴らしい」という単語の区切りにあることから、このフォント変更点候補は真にフォント変更点であると判定する。一方、選択再考判断部35は、同図(b)の例におけるフォント変更点候補は、「素晴ら」という文字列と「しい」という文字列を区切る位置にあることから、このフォント変更点候補は真のフォント変更点ではないと判定する。その前提として、「素晴ら」という文字列や「しい」という文字列は、単語辞書データには登録されていない。   The selection reconsideration determination unit 35 performs processing with reference to the word dictionary data for each of the font change point candidates. The word dictionary data is prepared in advance, and includes, for example, words such as "but", "he", "ha", "wonderful", "good" and the like. Therefore, since the font change point candidate in the example of FIG. 6A is at the delimitation of the word “ha” and the word “superb”, the selection reconsideration determination unit 35 determines that the font change point candidate is a true font. It determines that it is a change point. On the other hand, since the font change point candidate in the example (b) of the selection reconsideration determination unit 35 is located at the position where the character string “superb” is separated from the character string “i” The candidate is determined not to be a true font change point. As its premise, the character string "Superb" and the character string "I" are not registered in the word dictionary data.

選択再考判断部35が形態素解析処理エンジンを備える場合には、選択再考判断部35は対象の文字列について形態素解析処理を行う。そして、フォント変更点候補が形態素の区切りに位置している場合には、選択再考判断部35は、そのフォント変更点候補が真のフォント変更点であると判定する。また、フォント変更点候補が形態素の区切りではない場合には、選択再考判断部35は、そのフォント変更点候補は真のフォント変更点ではないと判定する。なお、形態素解析処理自体は、既存の技術を用いて行える。   When the selection reconsideration determination unit 35 includes a morpheme analysis processing engine, the selection reconsideration determination unit 35 performs morpheme analysis processing on the target character string. Then, if the font change point candidate is located at the morpheme delimiter, the selection reconsideration determination unit 35 determines that the font change point candidate is a true font change point. If the font change point candidate is not a morpheme delimiter, the selection reconsideration determination unit 35 determines that the font change point candidate is not a true font change point. The morphological analysis processing itself can be performed using an existing technology.

次に、フォント選択部33による処理の詳細について説明する。
フォント選択部33は、所定の長さの文字画像の列に基づいて、それらの文字画像で使用されているフォント種別を識別するものである。フォント選択部33は、図3のステップS2でフォントを選択する処理を行う。
Next, details of processing by the font selection unit 33 will be described.
The font selection unit 33 identifies the font type used in the character image based on a string of character images of a predetermined length. The font selection unit 33 performs a process of selecting a font in step S2 of FIG.

図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 font selection unit 33 identifies and identifies a font. The row of "but he" character images shown in FIG. 6A is a character image which is a target of the font selection process performed by the font selection unit 33. The font selection unit 33 first specifies a font for each of these character images. In the illustrated example, the font of the leading "" is first identified. Therefore, the font selection unit 33 selects a plurality of candidate characters related to this character image. The figure (b) shows the character candidate selected, and the character candidate includes "hi" in hiragana, "re" in katakana, and "L" in alphabetic (upper case) letters. In order to select these character candidates, the font selection unit 33 uses a dictionary for candidate character specification. The candidate character specification dictionary is stored in the recognition database 30, and is dictionary data having a feature amount common to each font. That is, the candidate character specification dictionary is dictionary data that does not depend on the font type. The candidate character specification dictionary contains information such as the common feature amount of each character in a plurality of font types, and is written in the recognition database 30 in advance. At this stage, since the font has not been identified, the font selection unit 33 identifies a plurality of candidate characters by using this candidate character identification dictionary. By using the common feature amount for the font type, it is possible to narrow down the candidates from the character shape obtained from the target image. Moreover, it is also possible to include the similar character in the set of candidate characters by registering the similar character of the acquired character candidate in the candidate character specifying dictionary in advance.

同図(b)に示す候補文字が得られると、次にフォント選択部33は、それらの候補文字のそれぞれについて、フォント別の辞書データを参照し、処理対象の文字のスコアを算出する。同図(c)は、処理対象の文字画像について、候補文字ごと、且つフォント種別ごとに算出されたスコアの例を示す。同図(c)の表において、各行はフォント種別に対応し、各列は文字種別(候補文字)に対応する。この表に示すスコアの値の中で、最も高いのは、フォント種別「フォントA」における文字「し」のスコア960である。よって、フォント選択部33は、この文字画像のフォントが「フォントA」であることを特定する。また、フォント選択部33は、フォント識別の対象である他の文字についても、同様の処理を行い、各文字のフォントを特定する。   When the candidate characters shown in FIG. 6B are obtained, the font selection unit 33 then refers to dictionary data for each font, and calculates the score of the character to be processed. The figure (c) shows the example of the score computed for every candidate character and for every font classification about the character image of a process target. In the table of FIG. 6C, each row corresponds to a font type, and each column corresponds to a character type (candidate character). Among the score values shown in this table, the highest is the score 960 of the character "B" in the font type "font A". Therefore, the font selection unit 33 specifies that the font of this character image is "font A". Also, the font selection unit 33 performs the same processing on other characters that are targets of font identification, and specifies the font of each character.

図9は、フォント選択部33がフォントを識別する処理を説明するための概略図であり、複数の文字画像に対して行ったフォント識別の結果を示している。同図に示す通り、左側から「し」、「か」、「し」、「彼」、「は」の各文字画像に対する識別結果は、それぞれ、「フォントA」、「フォントB」、「フォントA」、「フォントA」、「フォントA」である。このように、フォント選択部33は、フォント選択の確度を高めるため、数文字に渡ってフォントを特定する処理を繰り返し、最も可能性の高いフォントを選択する。フォント選択部33は、複数の文字それぞれについて特定されたフォントに基づき、例えば単純な多数決で全体のフォントを特定する。図示する例では、「フォントA」が選択される。   FIG. 9 is a schematic diagram for explaining the process of the font selection unit 33 identifying a font, and shows the result of font identification performed on a plurality of character images. As shown in the figure, the identification results for each character image of "S", "S", "S", "He" and "H" from the left side are "Font A", "Font B" and "Font" respectively. A "," font A ", and" font A ". In this manner, the font selection unit 33 repeats the process of specifying the font over several characters in order to increase the accuracy of font selection, and selects the most probable font. The font selection unit 33 specifies the entire font by, for example, a simple majority rule, based on the font specified for each of the plurality of characters. In the illustrated example, "font A" is selected.

なお、このとき、文字種別ごとに重み(フォント選択用スコア)を予め設定しておいて、重み付きの多数決によって全体のフォントを特定するようにしてもよい。フォント選択用スコアとしては、字形が単純な文字(例えば、加算記号「+」やコロン「:」などといった記号類)に対して低い値(重みが小さい値)を設定する。逆に字形が複雑な文字(例えば、漢字等)に対して高い値(重みが大きい値)を設定する。   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 font selection unit 33 may select a font by a similar method.

以上説明したように、第1の実施形態では、選択再考判断部35が、文字認識部31から出力されたスコアのデータに基づいて途中でのフォントの変更の可能性を検出し、ルールにも基づいてフォントが変更された位置を推定する。これにより、選択再考判断部35が、認識処理において設定したフォントの種別を変更すべきであるか否かを判断する。よって、第1の実施形態では、フォントが変更された位置を精度よく検出することができる。
また、第1の実施形態では、選択再考判断部35が、単語の区切りのみがフォントの区切りになり得るというルール(知識)に基づいて、フォントが変更された位置を推定する。これにより、単語の途中でフォントが変更されたという判断を行うことなく、フォントが変更された位置を精度よく検出することができる。
そして、これらにより、文字認識の精度が向上する。
As described above, in the first embodiment, the selection reconsideration determination unit 35 detects the possibility of the font change in the middle based on the data of the score output from the character recognition unit 31, and Estimate the position where the font was changed based on it. Thereby, the selection reconsideration determination unit 35 determines whether or not the font type set in the recognition process should be changed. Therefore, in the first embodiment, the position where the font is changed can be detected with high accuracy.
In the first embodiment, the selection reconsideration determination unit 35 estimates the position where the font has been changed, based on the rule (knowledge) that only the word break can be the font break. This makes it possible to accurately detect the position at which the font has been changed without making a determination that the font has been changed in the middle of the word.
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 character recognition device 2 selects an image input unit 21, an image processing unit 22, a character extraction unit 23, a recognition database 30, a character recognition unit 31, a font selection unit 33, and A reconsideration determination unit 36 and an output unit 41 are provided. That is, the character recognition device 2 has a selection reconsideration determination unit 36 in place of the selection reconsideration determination unit 35 in the first embodiment.

文字認識装置2による処理手順の全体は、図3を参照しながら説明した文字認識装置1のそれとほぼ同様である。ただし、同図のステップS6において用いる知識が、第1の実施形態において用いる知識と異なる。以下で、選択再考判断部36の処理について説明する。本実施形態における選択再考判断部36は、下記の2つのルールを、知識として利用する。なお、これらのルールは、第1の実施形態で既に述べたルールベースに格納されている。
(ルール1)一対の括弧等で区切られた一連の文字の列は、特有のフォントで印字されている場合がある。
(ルール2)通貨記号で始まる一連の数字列(ただし、コンマ(comma)やピリオド(period)を含んでもよい)は、特有のフォントで印字されている場合がある。
The entire processing procedure by the character recognition device 2 is substantially the same as that of the character recognition device 1 described with reference to FIG. However, the knowledge used in step S6 in the same figure is different from the knowledge used in the first embodiment. The process of the selection reconsideration determination unit 36 will be described below. The selection reconsideration determination unit 36 in the present embodiment uses the following two rules as knowledge. These rules are stored in the rule base already described in the first embodiment.
(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 rule 1 include brackets (single or double brackets), parentheses, brackets, curly brackets (curly braces), angle brackets, etc. It is not limited. These parentheses are used in the document in left and right pairs (but in the case of vertical writing, upper and lower pairs). These pairs of parentheses and the like are called “enclosed symbols” for convenience. An enclosure symbol is a symbol for enclosing a character string from the left and right (but from top and bottom in the case of a vertical writing document). The symbol located at the beginning of the box is also called "open parenthesis". Also, the symbol located at the end of the box is also referred to as "closed parenthesis". In other words, rule 1 is a rule that, regarding a character string surrounded by a pair of enclosure symbols in the input string, the font type is changed between the character string before and after the character string.
The “currency symbol” in rule 2 above includes the symbol “¥” representing a yen, the symbol “$” representing a dollar, and symbols representing other currencies. Note that the currency symbol and the sequence of numbers following the currency symbol are collectively referred to as “number sequence” for convenience. That is, rule 2 is a rule that the type of the numeral string in the string is changed between the character string before and the character string after the numeral string.

なお、上記の括弧等あるいは通貨記号として、いわゆる全角文字が用いられる場合と、いわゆる半角文字が用いられる場合とがある。これらの文字が全角であるか半角であるかに依らず、選択再考判断部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 reconsideration determination unit 36 infers font change points while applying Rule 1 or Rule 2.

図11は、選択再考判断部36によるフォント変更点推定の処理を説明するための概略図である。同図(a)〜(c)のそれぞれは、認識処理の対象である文字画像の列を示す。また、同図では、認識処理における現在ポイントを示すとともに、現在ポイントを基準とした相対位置を各文字画像の上に付している。   FIG. 11 is a schematic diagram for explaining the process of font change point estimation by the selection reconsideration determination unit 36. As shown in FIG. Each of the figures (a) to (c) shows a string of character images to be recognized. In addition, in the same figure, while showing the present point in recognition processing, the relative position on the basis of the present point is attached on each character image.

同図(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 reconsideration determination unit 36 has already obtained font change point candidates. If the character at the relative position "-5" is a font change point candidate, the selection reconsideration determination unit 36 determines that the font change point candidate is a true font change point according to the above-described rule 1. That is, it is determined that different fonts are used for the relative position "-6" and the relative position "-5". On the other hand, when the character at the relative position "-2" is a font change point candidate, according to rule 1 described above, the selection reconsideration determination unit 36 determines that this font change point candidate is not a true font change point. . That is, it is determined using the knowledge (rule 1) that different fonts are not used for the relative position "-3" and the relative position "-2".

同図(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 reconsideration determination unit 36 has already obtained font change point candidates. If the character at the relative position "-5" is a font change point candidate, according to rule 1 described above, the selection reconsideration determination unit 36 determines that the font change point candidate is not a true font change point. That is, the determination is performed using the knowledge that different fonts are not used for the relative position "-6" and the relative position "-5". On the other hand, if the character at the relative position "-2" is a font change point candidate, the selection reconsideration determination unit 36 determines that the font change point candidate is a true font change point according to the above-described rule 1. That is, it is determined that different fonts are used for the relative position "-3" and the relative position "-2".

同図(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 reconsideration determination unit 36 determines that the font change point candidate is a true font change point according to the above-described rule 2. That is, it is determined that different fonts are used for the relative position "-6" and the relative position "-5". On the other hand, when the character at the relative position "-3" is a font change point candidate, according to the above-mentioned rule 2, the selection reconsideration determination unit 36 determines that this font change point candidate is not a true font change point. Do. The reason is that the relative position “-3” is in the middle of “a series of digit strings starting with a currency symbol” defined in rule 2. That is, the selection reconsideration determination unit 36 performs the determination using the knowledge that the font is not changed in the middle of such a series.

以上のように、選択再考判断部36は、ルール1とルール2とを併用して、フォント変更点を推定する処理を行う。なお、選択再考判断部36が、ルール1とルール2のいずれか一方のみを用いるようにしてもよい。また、ルールベースにさらにその他のルールを予め格納しておき、選択再考判断部36が、当該その他のルールを併用してフォント変更点を推定するようにしてもよい。また、選択再考判断部36が、第1の実施形態で説明した「フォント変更位置は、単語の区切りの位置である」というルール(知識)と、本実施形態で説明しているルールとを併用するようにしてもよい。   As described above, the selection reconsideration determination unit 36 uses the rule 1 and the rule 2 in combination to estimate the font change point. Note that the selection reconsideration determination unit 36 may use only one of the rule 1 and the rule 2. In addition, other rules may be stored in advance in the rule base, and the selection reconsideration determination unit 36 may estimate the font change point using the other rules in combination. In addition, the rule (knowledge) that “the font change position is the position of the word break” described in the first embodiment by the selection reconsideration determination unit 36 and the rule described in the present embodiment are used in combination. You may do it.

以上説明したように、第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 reconsideration determination unit 36 is a font different from the character string before and after it ( Estimate the position where the font has been changed based on the following rule. This improves the accuracy of estimating font change points.
Further, in the second embodiment, the selection reconsideration determination unit 36 determines a number string (a string consisting of only numbers, a string consisting only of numbers, periods and commas, a symbol having a currency symbol at the beginning of these strings, etc.) The position of the font is estimated based on the rule that the font of (in some cases) is a font different from the preceding and following character strings. This improves the accuracy of estimating font change points.
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.
JP2016029068A 2016-02-18 2016-02-18 Character recognition device, character recognition method, and program Expired - Fee Related JP6523988B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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