JP5729348B2 - Character recognition device and character recognition method - Google Patents
Character recognition device and character recognition method Download PDFInfo
- Publication number
- JP5729348B2 JP5729348B2 JP2012098539A JP2012098539A JP5729348B2 JP 5729348 B2 JP5729348 B2 JP 5729348B2 JP 2012098539 A JP2012098539 A JP 2012098539A JP 2012098539 A JP2012098539 A JP 2012098539A JP 5729348 B2 JP5729348 B2 JP 5729348B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- learning data
- support vector
- cell
- vector machine
- 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
本発明は、文字認識装置および文字認識方法に関するものである。 The present invention relates to a character recognition device and a character recognition method.
従来、特許文献1には、実際に誤読の起こる可能性のあるモデル組に関する情報を記憶しておく文字認識方法が記載されている。
Conventionally,
この従来技術では、整合処理によって得られた二つの候補モデルがMi1、Mi2であった場合(Mi1、Mi2のいずれが第1位、第2位であるかを問わない)、テーブル要素Aiが参照されることになる。 In this prior art, when the two candidate models obtained by the matching process are Mi1 and Mi2 (regardless of which of Mi1 and Mi2 is the first and second), the table element Ai refers to Will be.
そして、認識処理対象の文字画像と各候補モデル(ここではMi1、Mi2)との相違度Di1、Di2を、対応した再評価係数ki1、ki2を乗じて再評価し、ki1×Di1≦ki2×Di2のときはモデルMi1の文字カテゴリを最終結果とし、ki1×Di1>ki2×Di2のときはモデルMi2の文字カテゴリを最終結果とする。 Then, the degree of difference Di1, Di2 between the character image to be recognized and each candidate model (here, Mi1, Mi2) is re-evaluated by multiplying the corresponding re-evaluation coefficients ki1, ki2, and ki1 × Di1 ≦ ki2 × Di2 In this case, the character category of the model Mi1 is the final result, and when ki1 × Di1> ki2 × Di2, the character category of the model Mi2 is the final result.
しかしながら、上記従来技術によると、候補モデルとの相違度を係数と掛け合わせて再評価しているに過ぎず、実質的に文字認識をしていない。また、評価係数の求め方が不明であるし、そもそも誤認識しない評価係数を予め決定することは困難であると考えられる。 However, according to the above prior art, the degree of difference from the candidate model is merely re-evaluated by multiplying it with a coefficient, and character recognition is not substantially performed. Moreover, it is considered that it is difficult to determine in advance an evaluation coefficient that is not erroneously recognized.
本発明は上記点に鑑みて、文字の認識精度を向上することを目的とする。 The present invention has been made in view of the above points, and an object thereof is to improve the recognition accuracy of characters.
上記目的を達成するため、請求項1に記載の発明では、文字が記された被検査物1を撮影した検査画像を取得する画像取得手段11と、
検査画像の文字領域から求めた特徴量に基づいて、文字領域に写っている文字を識別するサポートベクターマシン129と、
複数のモデル画像の文字部分相互間の相違領域A1を細分化した第1セルB1の輝度値を特徴量としてサポートベクターマシン129の学習データを生成する学習データ生成手段S120とを備えることを特徴とする。
In order to achieve the above object, according to the first aspect of the present invention, an
A
And learning data generation means S120 for generating learning data of the
これによると、複数文字相互間の相違を顕在化させることができるので、文字の誤認識を抑制して認識精度を向上させることができる。 According to this, since a difference between a plurality of characters can be made apparent, erroneous recognition of characters can be suppressed and recognition accuracy can be improved.
なお、この欄および特許請求の範囲で記載した各手段の括弧内の符号は、後述する実施形態に記載の具体的手段との対応関係を示すものである。 In addition, the code | symbol in the bracket | parenthesis of each means described in this column and the claim shows the correspondence with the specific means as described in embodiment mentioned later.
以下、一実施形態を説明する。図1に示す文字認識装置10は、車両のエンジンに燃料を供給する燃料ポンプの生産ラインに設置され、燃料ポンプの部品の表面に刻印された型番等の文字(本例では、アルファベット大文字)を認識する。
Hereinafter, an embodiment will be described. A
文字認識装置10は、先ずパターンマッチングにより文字認識を行って候補文字を選択し、候補文字に類似する類似文字がある場合、類似文字との相違領域等から抽出したセルの輝度値をサポートベクターマシンの入力特徴量として、候補文字である可能性を表すプロバビリティ(確信度)を求める。
The
文字認識装置10は、撮像部11と処理部12とを備えている。撮像部11は、被検査物であるワーク1を撮影して検査画像を取得する画像取得手段であり、取得した検査画像を処理部12へ送信する。撮像部11は、ワーク1を照明する照明光源を有してもよい。
The
処理部12は、撮像部11が取得した検査画像に基づいてワーク1表面に刻印された文字を認識するとともに種々の制御を行う。処理部12は、パーソナルコンピュータおよびその周辺機器で構成されている。
The
図2に示すように、処理部12は、制御手段121、通信手段122、記憶手段123、パターンマッチング手段124、XOR演算手段125、AND演算手段126、セル抽出手段127、平均輝度値算出手段128およびサポートベクターマシン129等を有している。
As shown in FIG. 2, the
制御手段121は、パーソナルコンピュータの中央演算装置(CPU)と、その周辺回路などで構成され、CPUに読み込まれたプログラムにしたがって動作し、撮像部11および処理部12の各手段を制御する。
The
通信手段122は、処理部12と、撮像部11等の機器との間で制御信号、画像データおよびデータ信号を送受信する通信インタフェースであり、I/Oポートおよびそのドライバで構成される。
The
処理部12は、通信手段122を通じて撮像部11から検査画像を受信する。制御手段121で生成された制御信号は、通信手段122を通じて撮像部11へ送信される。処理部12は、認識した文字の情報を、通信手段122を通じて外部の機器へ出力する。
The
記憶手段123は、ランダムアクセスメモリ(RAM)やリードオンリメモリ(ROM)といった半導体メモリ、磁気ディスク、光ディスクなどの記憶媒体、および記憶媒体へのアクセス装置などで構成されており、処理部12の制御を行うプログラムや種々のデータを記憶する。
The
記憶手段123が記憶するデータとしては、例えば、ワーク1に刻印される可能性のある各文字(以下、認識対象文字という)に対応するテンプレート画像、サポートベクターマシン129の学習データ、および撮像部11が撮影した検査画像などがある。
Data stored in the
パターンマッチング手段124、XOR演算手段125、AND演算手段126、セル抽出手段127、平均輝度値算出手段128およびサポートベクターマシン129は、例えばCPU上で実行されるプログラムにより実装される機能モジュールである。これらの手段124〜129は、CPUとは別個の画像処理用プロセッサを備える専用処理ボードとして実装されてもよい。
The
パターンマッチング手段124は、入力画像を記憶手段123から読み出したテンプレート画像と比較してパターンマッチングを行って、入力画像に含まれる文字を認識する。具体的には、パターンマッチング手段124は、入力画像と各テンプレート画像との一致度を表すスコアを求め、そのスコアが最大となるテンプレート画像を決定する。本例では、スコアを下記の数式1に示す正規化相関係数で求める。
The
入力画像に含まれる文字とテンプレート画像に含まれる文字とが完全に一致する場合、スコアR=1となり、入力画像に含まれる文字とテンプレート画像に含まれる文字とに全く相関が無い場合、スコアR=0となる。 When the character included in the input image and the character included in the template image completely match, the score R = 1, and when there is no correlation between the character included in the input image and the character included in the template image, the score R = 0.
XOR演算手段125は、2つの画像の排他的論理和(XOR)を求める。AND演算手段126は、2つの画像の論理積(AND)を求める。セル抽出手段127は、画像中の所定領域から所定の大きさのセルを抽出する。平均輝度値算出手段128は、セル抽出手段127が抽出した各セルの平均輝度値を算出する。XOR演算手段125、AND演算手段126、セル抽出手段127および平均輝度値算出手段128の詳細については後述する。
The XOR operation means 125 obtains an exclusive OR (XOR) of the two images. The AND operation means 126 calculates a logical product (AND) of the two images. The
サポートベクターマシン129は、平均輝度値算出手段128が算出した各セルの平均輝度値を特徴量として、画像中に写っている文字を識別する。図3に、サポートベクターマシン129の概念図を示す。
The
サポートベクターマシン129は、所定の識別対象物が、複数のカテゴリの何れかに属する場合、その識別対象物から求めた特徴量に基づいて、その識別対象物を何れのカテゴリに属するかを判定する識別器である。
When the predetermined identification object belongs to any of a plurality of categories, the
カテゴリ間の境界は、各カテゴリに属する学習データの特徴量のうち、隣接するカテゴリに属する学習データの特徴量との距離が最も近いものの組で表される。このカテゴリ間の境界を表す特徴量は、サポートベクトルと呼ばれる。 The boundary between categories is represented by a set of features having the shortest distance from feature amounts of learning data belonging to adjacent categories among feature amounts of learning data belonging to each category. A feature amount representing a boundary between categories is called a support vector.
図3の例では、丸印で示された各点が、カテゴリC1に属する特徴量であり、このうち特徴量201〜203が、カテゴリC1のサポートベクトルである。また、菱形で示された各点が、カテゴリC2に属する特徴量であり、このうち特徴量204〜206が、カテゴリC2のサポートベクトルである。
In the example of FIG. 3, each point indicated by a circle is a feature quantity belonging to the category C1, and among these, the
サポートベクターマシン129では、識別精度を向上するために、カテゴリC1のサポートベクトルと、カテゴリC2のサポートベクトル間の距離(マージン)が最大化されるように、サポートベクトルが決定される。
In the
サポートベクターマシン129では、カテゴリ間の境界が非線形な場合でも、カーネル関数を利用して、学習データの特徴量を高次元に写像した上でサポートベクトルを決定することにより、各カテゴリに属する特徴量を線形分離可能とすることで、良好な識別性能を得ることができる。
In the
本実施形態では、互いに類似する複数の認識対象文字の相違領域等から抽出したセルの平均輝度値を学習データの特徴量としてサポートベクターマシン129を予め学習させた。サポートベクターマシン129の学習に用いる学習データの生成方法については後述する。
In the present embodiment, the
サポートベクターマシン129は、複数の画像の相違領域等から抽出したセルの平均輝度値を受け取ると、それを入力特徴量とすることにより、特定の認識対象文字である確信度を表すプロバビリティを求める。
When the
処理部12は、パターンマッチング手段124またはサポートベクターマシン129による文字認識結果を、ディスプレイに表示してユーザに報知したり通信手段122を介して通信可能に接続された他の機器へ出力したりする。
The
次に、サポートベクターマシン129の学習方法を説明する。サポートベクターマシン129の学習は、処理部12が図4のフローチャートに示す処理を実行することによって行われる。
Next, a learning method of the
まずステップS100では、学習に用いる入力画像を生成する。具体的には、認識対象文字に対応するモデル画像の大きさなどを自動調整する。本例では、モデル画像は予め記憶手段123に記憶されている。
First, in step S100, an input image used for learning is generated. Specifically, the size of the model image corresponding to the recognition target character is automatically adjusted. In this example, the model image is stored in the
続くステップS110では、類似文字のグルーピングを行う。具体的には、パターンマッチング手段124が、各テンプレート画像相互間で、上述の数式1に示す正規化相関係数を用いてパターンマッチングを行う。そして、パターンマッチングのスコアRが閾値(本例では0.7)を超えた文字を類似文字としてグルーピングする。
In subsequent step S110, similar characters are grouped. Specifically, the
図5は、認識対象文字「C」についてパターンマッチングを行った結果の例を示している。この場合、認識対象文字「D」、「G」、「O」、「Q」のスコアが0.7を超えるため、認識対象文字「C」と、類似文字「C」、「D」、「G」、「O」、「Q」との組合せでグルーピングする。 FIG. 5 shows an example of the result of pattern matching for the recognition target character “C”. In this case, since the scores of the recognition target characters “D”, “G”, “O”, and “Q” exceed 0.7, the recognition target character “C” and the similar characters “C”, “D”, “ Group by a combination of “G”, “O”, and “Q”.
本例では、2種類の文字の組合せでグルーピングして類似グループを作成する。具体的には、「C、D」、「C、G」、「C、O」および「C、Q」の4つの類似グループを作成する。 In this example, a similar group is created by grouping with a combination of two types of characters. Specifically, four similar groups “C, D”, “C, G”, “C, O”, and “C, Q” are created.
このようなグルーピングを「C」以外の認識対象文字についても行う。本例では、学習対象文字がアルファベット大文字であるので、例えば図6に示すような類似グループが作成される。作成された類似グループは、記憶手段123に書き込まれて登録される。
Such grouping is also performed on recognition target characters other than “C”. In this example, since the learning target character is an uppercase alphabet, for example, a similar group as shown in FIG. 6 is created. The created similar group is written and registered in the
続くステップS120では、サポートベクターマシン129の学習に用いる学習データを生成する。したがって、ステップS120は学習データ生成手段を構成している。ステップS120の詳細を図7に示す。
In subsequent step S120, learning data used for learning of the
まずステップS1210では、ステップS110で作成した類似グループの各認識対象文字に対応する各テンプレート画像を記憶手段123から読み出して入力する。
First, in step S1210, each template image corresponding to each recognition target character of the similar group created in step S110 is read from the
続くステップS1220では、ステップS1210で入力された各テンプレート画像について、文字部分の相違領域を抽出し、抽出した文字部分の相違領域を多数個のセルに細分化する。続くステップS1230では、ステップS1220で細分化した多数個のセルについて学習データを生成する。 In the following step S1220, a character area difference area is extracted from each template image input in step S1210, and the extracted character area difference area is subdivided into a number of cells. In subsequent step S1230, learning data is generated for a large number of cells subdivided in step S1220.
図8(a)は、「C、D」の類似グループについてステップS1220、S1230を実行した例を示し、図8(b)は、「C、O」の類似グループについてステップS1220、S1230を実行した例を示している。 FIG. 8A shows an example in which steps S1220 and S1230 are executed for similar groups “C, D”, and FIG. 8B shows that steps S1220 and S1230 are executed for similar groups “C, O”. An example is shown.
ステップS1220では、XOR演算手段125が類似グループの各認識対象文字に対応する各テンプレート画像の各文字部分に対して排他的論理和(XOR)を求めることによって文字部分の相違領域A1(図中の白色の領域)を抽出し、セル抽出手段127が相違領域A1から第1セルB1を抽出することによって相違領域A1を多数個の第1セルB1に細分化する。 In step S1220, the XOR operation means 125 obtains an exclusive logical sum (XOR) for each character portion of each template image corresponding to each recognition target character in the similar group, whereby the character portion difference area A1 (in the figure). White area) is extracted, and the cell extraction means 127 extracts the first cell B1 from the different area A1, thereby subdividing the different area A1 into a number of first cells B1.
図8(a)の例では、「C」、「D」のテンプレート画像の各文字部分に対して排他的論理和(XOR)を求めることによって文字部分の相違領域A1を抽出し、図8(b)の例では、「C」、「O」のテンプレート画像の各文字部分に対して排他的論理和(XOR)を求めることによって文字部分の相違領域A1を抽出した。 In the example of FIG. 8A, a character area difference area A1 is extracted by obtaining an exclusive OR (XOR) for each character part of the template images “C” and “D”. In the example of b), the character part difference area A1 is extracted by obtaining an exclusive OR (XOR) for each character part of the template images “C” and “O”.
本例では、相違領域A1から四角形の第1セルB1を抽出している。相違領域A1から第1セルB1を抽出する方法としては、例えば、第1セルB1に対応した四角形のパターンで相違領域をサーチングすることによって、相違領域を多数個の第1セルB1に細分化することができる。 In this example, a rectangular first cell B1 is extracted from the different area A1. As a method of extracting the first cell B1 from the different area A1, for example, the different area is subdivided into a number of first cells B1 by searching the different area with a rectangular pattern corresponding to the first cell B1. can do.
ステップS1230では、平均輝度値算出手段128が各第1セルB1の平均輝度値を算出し、その平均輝度値を学習データとする。本例では、各第1セルB1の画像(グレー画像)の平均輝度値を、黒を0、白を1として正規化して学習データとする。
In step S1230, the average luminance
続くステップS1240では、ステップS1210で入力された各テンプレート画像について、背景部分(文字以外の部分)の相違領域を抽出し、抽出した背景部分の相違領域を多数個のセルに細分化する。続くステップS1250では、ステップS1240で細分化した多数個のセルについて学習データを作成する。 In subsequent step S1240, a different area of the background part (part other than the character) is extracted from each template image input in step S1210, and the extracted different area of the background part is subdivided into a number of cells. In subsequent step S1250, learning data is created for a large number of cells subdivided in step S1240.
図8(c)は、「C、D」の類似グループについてステップS1240、S1250を実行した例を示し、図8(d)は、「C、O」の類似グループについてステップS1240、S1250を実行した例を示している。 FIG. 8C shows an example in which steps S1240 and S1250 are executed for the similar group “C, D”, and FIG. 8D shows that steps S1240 and S1250 are executed for the similar group “C, O”. An example is shown.
ステップS1240では、XOR演算手段125が類似グループの各認識対象文字に対応する各テンプレート画像の各背景部分に対して排他的論理和(XOR)を求めることによって背景部分の相違領域A2(図中の白色の領域)を抽出し、セル抽出手段127が相違領域A2から第2セルB2を抽出することによって相違領域A2を多数個の第2セルB2に細分化する。 In step S1240, the XOR operation means 125 obtains an exclusive OR (XOR) for each background portion of each template image corresponding to each recognition target character in the similar group, thereby differentiating the background portion difference area A2 (in the figure). White area) is extracted, and the cell extracting means 127 extracts the second cell B2 from the different area A2, thereby subdividing the different area A2 into a plurality of second cells B2.
図8(c)の例では、「C」、「D」のテンプレート画像の各背景部分に対して排他的論理和(XOR)を求めることによって背景部分の相違領域A2を抽出し、図8(d)の例では、「C」、「O」のテンプレート画像の各背景部分に対して排他的論理和(XOR)を求めることによって背景部分の相違領域A2を抽出した。 In the example of FIG. 8C, the background region difference area A2 is extracted by obtaining an exclusive OR (XOR) for each background portion of the template images “C” and “D”. In the example of d), the background portion difference area A2 is extracted by obtaining an exclusive OR (XOR) for each background portion of the template images “C” and “O”.
本例では、ステップS1220と同様に、相違領域A2から四角形の第2セルB2を抽出している。なお、図8(d)の例では、相違領域A2の大きさが小さいため、第2セルB2が1つも抽出されていない。 In this example, a rectangular second cell B2 is extracted from the different area A2 as in step S1220. In the example of FIG. 8D, since the size of the different area A2 is small, no second cell B2 is extracted.
ステップS1250では、ステップS1230と同様に、平均輝度値算出手段128が各第2セルB2の平均輝度値を算出し、その平均輝度値を学習データとする。
In step S1250, as in step S1230, the average luminance
続くステップS1260では、ステップS1210で入力された各テンプレート画像について、文字部分の共通領域を抽出し、抽出した文字部分の共通領域を多数個のセルに細分化する。続くステップS1270では、ステップS1260で細分化した多数個のセルについて学習データを作成する。 In subsequent step S1260, a common area of the character part is extracted from each template image input in step S1210, and the extracted common area of the character part is subdivided into a number of cells. In the subsequent step S1270, learning data is created for a large number of cells subdivided in step S1260.
図8(e)は、「C、D」の類似グループについてステップS1260、S1270を実行した例を示し、図8(f)は、「C、O」の類似グループについてステップS1260、S1270を実行した例を示している。 FIG. 8E shows an example in which steps S1260 and S1270 are executed for the similar group “C, D”, and FIG. 8F shows that steps S1260 and S1270 are executed for the similar group “C, O”. An example is shown.
ステップS1260では、AND演算手段126が類似グループの各認識対象文字に対応する各テンプレート画像の各文字部分に対して論理積(AND)を求めることによって文字部分の共通領域A3(図中の白色の領域)を抽出し、セル抽出手段127が共通領域A3から第3セルB3を抽出することによっ共通領域A3を多数個の第3セルB3に細分化する。 In step S1260, the AND operation means 126 obtains a logical product (AND) for each character portion of each template image corresponding to each recognition target character of the similar group, thereby obtaining a common area A3 (white color in the figure) of the character portion. Area), and the cell extraction means 127 extracts the third cell B3 from the common area A3, thereby subdividing the common area A3 into a number of third cells B3.
図8(e)の例では、「C」、「D」のテンプレート画像の各文字部分に対して論理積(AND)を求めることによって文字部分の共通領域A3を抽出し、図8(f)の例では、「C」、「O」のテンプレート画像の各文字部分に対して論理積(AND)を求めることによって文字部分の共通領域A3を抽出した。 In the example of FIG. 8E, the common area A3 of the character part is extracted by obtaining a logical product (AND) for each character part of the template images “C” and “D”, and FIG. In the example, the common area A3 of the character part is extracted by obtaining a logical product (AND) for each character part of the template images “C” and “O”.
本例では、ステップS1220、S1240と同様に、共通領域A3から四角形の第3セルB3を抽出している。 In this example, a rectangular third cell B3 is extracted from the common area A3, as in steps S1220 and S1240.
ステップS1270では、ステップS1230、S1250と同様に、平均輝度値算出手段128が各第3セルB3の平均輝度値を算出し、その平均輝度値を学習データとする。
In step S1270, as in steps S1230 and S1250, the average luminance
続くステップS1280では、ステップS1230、S1250、S1270で作成した学習データ、すなわち各第1、第2、第3セルB1、B2、B3の平均輝度値データを併合してSVM学習テーブルを作成する。図9は、「C、O」の類似グループについて作成した学習テーブルの例を示している。 In subsequent step S1280, the learning data created in steps S1230, S1250, and S1270, that is, the average luminance value data of the first, second, and third cells B1, B2, and B3 are merged to create an SVM learning table. FIG. 9 shows an example of a learning table created for a similar group of “C, O”.
ステップS1280では、第1、第2、第3セルB1、B2、B3の個数を調整して重み付けを行う。具体的には、文字部分および背景部分の相違領域A1、A2の第1、第2セルB1、B2の合計個数が、文字部分の共通領域の第3セルB3の個数よりも多くなるように、第1、第2、第3セルB1、B2、B3を適宜間引きする。 In step S1280, weighting is performed by adjusting the number of first, second, and third cells B1, B2, and B3. Specifically, the total number of the first and second cells B1 and B2 in the different areas A1 and A2 of the character part and the background part is larger than the number of the third cells B3 in the common area of the character part. The first, second, and third cells B1, B2, and B3 are thinned out as appropriate.
より具体的には、学習テーブル上のセルの全個数(図9の例では100個)に対して、文字部分および背景部分の相違領域A1、A2の第1、第2セルB1、B2の合計個数を70%以上、文字部分の共通領域の第3セルB3の個数を30%未満とするのが好ましい。 More specifically, with respect to the total number of cells on the learning table (100 in the example of FIG. 9), the sum of the first and second cells B1 and B2 of the different areas A1 and A2 of the character part and the background part. The number is preferably 70% or more, and the number of the third cells B3 in the common area of the character part is preferably less than 30%.
このとき、間引き後の各第1、第2、第3セルB1、B2、B3が各領域A1、A2、A3において極力均等に位置するように第1、第2、第3セルB1、B2、B3を間引きするのが好ましい。このような第1、第2、第3セルB1、B2、B3の間引きについての理解を容易にするために、図8(e)、(f)では、間引きされて少なくなった第3セルB3が文字部分の共通領域A3に略均等に位置している様子を模式的に示している。 At this time, the first, second, and third cells B1, B2, B2, B3 are positioned as evenly as possible in the respective regions A1, A2, A3. It is preferable to thin out B3. In order to facilitate understanding of the thinning of the first, second, and third cells B1, B2, and B3, in FIG. 8E and FIG. 8F, the third cell B3 that has been thinned and reduced. Are schematically shown in the character area common area A3.
本例では、サポートベクターマシン129の学習対象としてのモデル画像として、認識対象文字に対応するテンプレート画像と同じ画像の他、文字の周囲に汚れがあったり文字の一部が欠けていたりする不鮮明な画像も複数個含め、これらの不鮮明なモデル画像から抽出した学習データもデフォルト設定に含めている。図9では、不鮮明なモデル画像から抽出した学習データを太枠で囲んで示している。このような不鮮明なモデル画像から抽出した学習データも利用することにより、サポートベクターマシン129のロバスト性を向上することができる。
In this example, as a model image as a learning target of the
なお、図9では図示を省略しているが、本例では、学習テーブルに各セルB1、B2、B3の位置情報(重心に対する相対位置)も含めている。 Although not shown in FIG. 9, in this example, position information (relative position with respect to the center of gravity) of each cell B1, B2, B3 is also included in the learning table.
ステップS1290では、ステップS1280で併合した学習データ(学習テーブル)を記憶手段123に出力して書き込む。 In step S1290, the learning data (learning table) merged in step S1280 is output and written to the storage means 123.
ステップS130では、SVM学習(サポートベクターマシン学習)を行う。具体的には、ステップS120で作成した学習データ(学習テーブル)をサポートベクターマシン129に入れ込む。以上により、サポートベクターマシン129の学習処理を終了する。
In step S130, SVM learning (support vector machine learning) is performed. Specifically, the learning data (learning table) created in step S120 is inserted into the
次に、文字認識装置10を用いた文字認識方法を説明する。文字認識装置10を用いた文字認識は、サポートベクターマシン129の学習処理を終了した後に処理部12が図10のフローチャートに示す処理を実行することによって行われる。
Next, a character recognition method using the
まずステップS200では、撮像部11によって撮影された検査画像を入力する。続くステップS210では、ステップS200で入力された検査画像から文字が写っている領域の画像(以下、文字領域画像という。)を切り出す。
First, in step S200, an inspection image photographed by the
続くステップS220では、ステップS210で切り出された文字領域画像と、各認識対象文字に対応するテンプレート画像との間でパターンマッチングを行う。具体的には、パターンマッチング手段124が、ステップS210で切り出された文字領域画像と、各認識対象文字に対応するテンプレート画像との間で、上述の数式1に示す正規化相関係数を用いてパターンマッチングを行う。
In subsequent step S220, pattern matching is performed between the character region image cut out in step S210 and the template image corresponding to each recognition target character. Specifically, the
続くステップS230では、ステップS220のパターンマッチングで最も高いスコアが得られた文字(以下、最高スコア文字)について、記憶手段123に登録されている類似グループを探索する。
In the subsequent step S230, the similar group registered in the
ステップS240では、ステップS230での探索結果に基づいて、類似グループの登録があるか否かを判定する。類似グループの登録があると判定した場合、ステップS250へ進みSVM判別(サポートベクターマシン判別)を行う。 In step S240, based on the search result in step S230, it is determined whether there is a similar group registered. If it is determined that a similar group is registered, the process proceeds to step S250, and SVM determination (support vector machine determination) is performed.
具体的には、ステップS210で切り出された文字領域画像、およびステップS230で探索された類似グループに属する類似文字のテンプレート画像の両画像に基づいて上述のステップS1220〜S1270と同様の処理を行って、両画像の文字部分の相違領域、背景部分の相違領域および文字部分の共通領域を抽出し、抽出した各領域から多数個のセルを抽出して各セルの平均輝度値を求める。そして、各セルの平均輝度値をサポートベクターマシンの入力特徴量とすることにより、ステップS220のパターンマッチングにおける最高スコア文字についてプロバビリティを求める。 Specifically, processing similar to that in steps S1220 to S1270 described above is performed based on both the character region image cut out in step S210 and the template image of similar characters belonging to the similar group searched in step S230. Then, the difference area of the character part, the difference area of the background part, and the common area of the character part of both images are extracted, and a large number of cells are extracted from each extracted area to obtain the average luminance value of each cell. Then, by using the average luminance value of each cell as the input feature amount of the support vector machine, the probability is obtained for the highest score character in the pattern matching in step S220.
一方、ステップS240にて類似グループの登録がないと判定した場合、ステップS260へ進み、ステップS220のパターンマッチングにおける最高スコア文字を第1位候補文字として選択する。 On the other hand, if it is determined in step S240 that no similar group is registered, the process proceeds to step S260, and the highest score character in the pattern matching in step S220 is selected as the first candidate character.
ステップS250、S260に続くステップS270では、ステップS260で選択した第1位候補文字におけるパターンマッチングのスコア、またはステップS240のSVM判別で求められたプロバビリティが閾値以上であるか否かを判定する。 In step S270 following steps S250 and S260, it is determined whether or not the pattern matching score in the first candidate character selected in step S260 or the probability obtained in the SVM discrimination in step S240 is greater than or equal to a threshold value.
閾値以上であると判定した場合、ステップS280へ進み、ステップS220のパターンマッチングにおける最高スコア文字(第1位候補文字)を認識文字としてディスプレイ等の出力対象機器に出力する。 If it is determined that the value is greater than or equal to the threshold value, the process proceeds to step S280, and the highest score character (first candidate character) in the pattern matching of step S220 is output as a recognized character to an output target device such as a display.
一方、閾値未満であると判定した場合、ステップS290へ進み、文字の識別が不能であったこと(認識NG)をディスプレイ等の出力対象機器に出力する。 On the other hand, when it determines with it being less than a threshold value, it progresses to step S290 and outputs that it was impossible to identify a character (recognition NG) to output object apparatuses, such as a display.
なお、ステップS270で用いる閾値は、文字認識装置10に要求される認識精度に応じて適宜設定される。本例では、閾値が0.7に設定されている。
Note that the threshold used in step S270 is appropriately set according to the recognition accuracy required for the
次に、図10のフローチャートに示す処理によって文字認識を実行した結果の例を説明する。図11(a)、(b)は、ステップS210で切り出された文字領域画像の例を示している。 Next, an example of the result of performing character recognition by the process shown in the flowchart of FIG. 10 will be described. FIGS. 11A and 11B show examples of character area images cut out in step S210.
図11(a)は、文字「C」を鮮明に視認できる画像であり、この画像に対して文字認識を実行した結果は以下の通りであった。 FIG. 11A shows an image in which the character “C” can be clearly seen. The result of executing character recognition on this image is as follows.
ステップS220のパターンマッチングでは、最高スコア文字が「C」となり、そのスコアは0.999となった。 In the pattern matching in step S220, the highest score character is “C”, and the score is 0.999.
したがって、ステップS230では文字「C」について類似グループの探索が行われステップS240では、登録された類似グループとして「C、D」、「C、G」、「C、O」、「C、Q」の4つがあると判定された。 Therefore, in step S230, a similar group is searched for the character “C”. In step S240, “C, D”, “C, G”, “C, O”, “C, Q” are registered as the similar groups. It was determined that there were four.
したがって、ステップS250で「C、D」、「C、G」、「C、O」、「C、Q」の4つの類似グループについてSVM判別が行われ、その結果、「C、D」の類似グループについては文字「C」のプロバビリティが0.949、類似グループ「C、G」については文字「C」のプロバビリティが0.949、「C、O」の類似グループについては文字「C」のプロバビリティが0.951、類似グループ「C、Q」については文字「C」のプロバビリティが0.948となった。 Accordingly, in step S250, SVM discrimination is performed for four similar groups “C, D”, “C, G”, “C, O”, “C, Q”, and as a result, the similarity of “C, D” is determined. For the group, the letter “C” has a probability of 0.949, for the similar group “C, G”, the letter “C” has a probability of 0.949, and for the similar group “C, O”, the letter “C”. The probability of the letter “C” is 0.948 for the similar group “C, Q”.
したがって、ステップS270の判定において、パターンマッチングのスコアおよびSVM判別のプロバビリティのいずれもが閾値0.7を上回ったと判定され、ステップS280にて文字「C」が認識文字として出力された。 Therefore, in the determination in step S270, it is determined that both the pattern matching score and the SVM discrimination probability exceed the threshold value 0.7, and the character “C” is output as a recognized character in step S280.
一方、図11(b)は、文字「C」が不鮮明な画像であり、この画像に対して文字認識を実行した結果は以下の通りであった。 On the other hand, FIG. 11B shows an image in which the character “C” is unclear, and the result of executing character recognition on this image is as follows.
ステップS220のパターンマッチングでは、最高スコア文字が「C」となり、そのスコアは0.33となった。 In the pattern matching in step S220, the highest score character is “C”, and the score is 0.33.
したがって、ステップS230では文字「C」について類似グループの探索が行われ、ステップS240では、登録された類似グループとして「C、D」、「C、G」、「C、O」、「C、Q」の4つがあると判定された。 Therefore, in step S230, a similar group is searched for the character “C”. In step S240, “C, D”, “C, G”, “C, O”, “C, Q” are registered as the similar groups. ”Was determined.
したがって、ステップS250で「C、D」、「C、G」、「C、O」、「C、Q」の4つの類似グループについてSVM判別が行われ、その結果、「C、D」の類似グループについては文字「C」のプロバビリティが0.851、類似グループ「C、G」については文字「C」のプロバビリティが0.889、「C、O」の類似グループについては文字「C」のプロバビリティが0.870、類似グループ「C、Q」については文字「C」のプロバビリティが0.900となった。 Accordingly, in step S250, SVM discrimination is performed for four similar groups “C, D”, “C, G”, “C, O”, “C, Q”, and as a result, the similarity of “C, D” is determined. The probability of the letter “C” is 0.851 for the group, the probability of the letter “C” is 0.889 for the similar group “C, G”, and the letter “C” is for the similar group of “C, O”. The probability of the letter “C” is 0.900 for the similar group “C, Q”.
したがって、ステップS270の判定において、SVM判別のプロバビリティが閾値0.7を上回ったと判例されたので、ステップS280にて文字「C」が認識文字として出力された。このように、文字「C」が不鮮明な画像についても良好な認識結果を得ることができた。 Accordingly, in the determination in step S270, it was determined that the SVM discrimination probability exceeded the threshold value 0.7, and therefore the character “C” was output as a recognized character in step S280. Thus, a good recognition result could be obtained even for an image in which the letter “C” is unclear.
本実施形態によると、ステップS1220、S1230等で述べたように、複数のモデル画像の文字部分相互間の相違領域A1を細分化した第1セルB1の輝度値を特徴量としてサポートベクターマシン129の学習データを生成する。
According to the present embodiment, as described in steps S1220, S1230, and the like, the
このため、相違領域A1の面積を特徴量とした場合と比較して複数文字相互間の相違を顕在化させることができる。このため、文字の誤認識を抑制して認識精度を向上させることができる。 For this reason, compared with the case where the area of different area A1 is made into the feature-value, the difference between several characters can be made clear. For this reason, the recognition accuracy can be improved by suppressing erroneous recognition of characters.
本実施形態によると、ステップS1240、S1250等で述べたように、モデル画像の背景部分相互間の相違領域A2を細分化した第2セルB2の輝度値も特徴量として学習データを生成する。このため、複数文字相互間の相違をさらに顕在化させることができ、ひいては文字の誤認識をさらに抑制することができる。 According to the present embodiment, as described in steps S1240, S1250, etc., learning data is generated using the luminance value of the second cell B2 obtained by subdividing the different area A2 between the background portions of the model image as a feature amount. For this reason, the difference between a plurality of characters can be further manifested, and thus erroneous recognition of characters can be further suppressed.
本実施形態によると、ステップS1260、S1270等で述べたように、文字部分相互間の共通領域A3を細分化した第3セルB3の輝度値も特徴量としてサポートベクターマシン129の学習データを生成する。このため、相違領域A1、A2を細分化したセルB1、B2の輝度値のみを特徴量としてサポートベクターマシン129の学習データを生成する場合と比較して文字認識精度を向上させることができる。
According to the present embodiment, as described in steps S1260, S1270, etc., the learning data of the
本実施形態によると、ステップS1280で述べたように、学習データに利用する第1セルB1および第2セルB2の合計個数を、学習データに利用する第3セルB3の個数よりも多くする。このため、サポートベクターマシン(129)による検出マージンを拡大することができ、ひいては文字認識精度をさらに向上させることができる。 According to the present embodiment, as described in step S1280, the total number of first cells B1 and second cells B2 used for learning data is made larger than the number of third cells B3 used for learning data. For this reason, the detection margin by the support vector machine (129) can be expanded, and the character recognition accuracy can be further improved.
本実施形態によると、ステップS240で述べたように、サポートベクターマシン129は、パターンマッチングによるスコア(一致度)が最も高くなった認識対象文字についてプロバビリティ(確信度)を求める。すなわち、パターンマッチングによる認識結果をサポートベクターマシン129で再評価する。このため、文字認識精度をさらに向上させることができる。
According to the present embodiment, as described in step S240, the
(他の実施形態)
なお、上記一実施形態では、第1、第2、第3セルB1、B2、B3の平均輝度値を特徴量としてサポートベクターマシン129の学習データを生成したが、第1、第2、第3セルB1、B2、B3の最大輝度値等を特徴量としてサポートベクターマシン129の学習データを生成してもよい。
(Other embodiments)
In the above-described embodiment, the learning data of the
また、上記一実施形態では、2種類の文字の組合せで類似グループを作成し、2種類の文字に対してSVM判別を行ったが、3種類以上の文字の組合せで類似グループを作成し、3種類以上の文字に対してSVM判別を行ってもよい。 In the above embodiment, a similar group is created by combining two types of characters and SVM discrimination is performed on two types of characters. However, a similar group is created by combining three or more types of characters. You may perform SVM discrimination | determination with respect to the character more than a kind.
また、上記一実施形態において、サポートベクターマシン129の学習データ上のセルの全個数や、第1、第2、第3セルB1、B2、B3の個数の比率等を適宜変更してもよい。
In the above embodiment, the total number of cells on the learning data of the
1 ワーク(被検査物)
11 撮像部(画像取得手段)
124 パターンマッチング手段
129 サポートベクターマシン
A1 文字部分の相違領域
B1 第1セル
A2 背景部分の相違領域
B2 第2セル
A3 文字部分の共通領域
B3 第3セル
S120 学習データ生成手段
1 Workpiece (inspection object)
11 Imaging unit (image acquisition means)
124 Pattern matching means 129 Support vector machine A1 Character area difference area B1 1st cell A2 Background area difference area B2 2nd cell A3 Character area common area B3 3rd cell S120 Learning data generation means
Claims (7)
前記検査画像の文字領域から求めた特徴量に基づいて、前記文字領域に写っている文字を識別するサポートベクターマシン(129)と、
複数のモデル画像の文字部分相互間の相違領域(A1)を細分化した第1セル(B1)の輝度値を特徴量として前記サポートベクターマシン(129)の学習データを生成する学習データ生成手段(S120)とを備えることを特徴とする文字認識装置。 Image acquisition means (11) for acquiring an inspection image obtained by photographing the inspection object (1) on which characters are written;
A support vector machine (129) for identifying a character appearing in the character region based on a feature amount obtained from the character region of the inspection image;
Learning data generating means for generating learning data of the support vector machine (129) using the luminance value of the first cell (B1) obtained by subdividing the difference area (A1) between the character portions of the plurality of model images as a feature amount ( S120). A character recognition device comprising:
前記サポートベクターマシン(129)は、前記一致度が最も高くなった前記認識対象文字に対する確信度を求めることを特徴とする請求項1ないし5のいずれか1つに記載の文字認識装置。 Pattern matching means (124) for performing pattern matching by comparing the character region with a template image corresponding to a recognition target character and obtaining a degree of matching with the recognition target character;
6. The character recognition device according to claim 1, wherein the support vector machine (129) obtains a certainty factor for the recognition target character having the highest degree of coincidence.
文字が記された被検査物(1)を撮影した検査画像を取得するステップ(S200)と、
前記サポートベクターマシン(129)を用いて、前記検査画像の文字領域から求めた特徴量に基づいて前記文字領域に写っている文字を識別するステップ(S250)とを含むことを特徴とする文字認識方法。 Generating learning data of the support vector machine (129) using the luminance value of the first cell (B1) obtained by subdividing the difference area (A1) between the character portions of the plurality of model images as a feature amount (S120);
A step (S200) of acquiring an inspection image obtained by photographing the inspection object (1) on which characters are written;
Using the support vector machine (129) to identify a character appearing in the character area based on a feature amount obtained from the character area of the inspection image (S250). Method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012098539A JP5729348B2 (en) | 2012-04-24 | 2012-04-24 | Character recognition device and character recognition method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012098539A JP5729348B2 (en) | 2012-04-24 | 2012-04-24 | Character recognition device and character recognition method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2013228781A JP2013228781A (en) | 2013-11-07 |
| JP5729348B2 true JP5729348B2 (en) | 2015-06-03 |
Family
ID=49676375
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2012098539A Expired - Fee Related JP5729348B2 (en) | 2012-04-24 | 2012-04-24 | Character recognition device and character recognition method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5729348B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6075238B2 (en) * | 2013-08-01 | 2017-02-08 | 株式会社デンソー | Character recognition device and character recognition method |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0746372B2 (en) * | 1987-03-25 | 1995-05-17 | ダイハツ工業株式会社 | Character recognition device |
| JP2007179413A (en) * | 2005-12-28 | 2007-07-12 | Toshiba Corp | Pattern recognition apparatus, pattern recognition method, and feature extraction parameter generation method |
| JP4872930B2 (en) * | 2008-01-21 | 2012-02-08 | 株式会社デンソー | Character recognition device, fuel pump module assembling device equipped with such device, and character recognition method |
| JP2010026805A (en) * | 2008-07-18 | 2010-02-04 | Denso Corp | Character recognition device and character recognition method |
-
2012
- 2012-04-24 JP JP2012098539A patent/JP5729348B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2013228781A (en) | 2013-11-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102460508B (en) | Image-recognizing method and image recognition apparatus | |
| US20190370982A1 (en) | Movement learning device, skill discriminating device, and skill discriminating system | |
| JP6756406B2 (en) | Image processing equipment, image processing method and image processing program | |
| JP6897749B2 (en) | Learning methods, learning systems, and learning programs | |
| US20250166222A1 (en) | Information processing system, information processing method, and program | |
| CN109961063B (en) | Text detection method and device, computer equipment and storage medium | |
| JP6075238B2 (en) | Character recognition device and character recognition method | |
| KR101545809B1 (en) | Method and apparatus for detection license plate | |
| CN117576079A (en) | An industrial product surface anomaly detection method, device and system | |
| JP5729348B2 (en) | Character recognition device and character recognition method | |
| JP7775668B2 (en) | Method for performing classification processing using machine learning model, information processing device, and computer program | |
| JP6405603B2 (en) | Information processing apparatus, information processing system, and program | |
| CN117809027B (en) | Clothing prior probability mask map generation method and related device based on human skeleton | |
| CN117495891B (en) | Point cloud edge detection method and device and electronic equipment | |
| JP6393495B2 (en) | Image processing apparatus and object recognition method | |
| JP2014092817A (en) | Character recognition device and program | |
| CN119091447A (en) | A target recognition method and system based on computer vision | |
| KR20210096817A (en) | Face identification method, and device and program using the same | |
| JP2010191767A (en) | Device and method for recognizing character | |
| CN117058736A (en) | Face misdetection recognition method, device, medium and equipment based on key point detection | |
| JP2001014465A (en) | Object recognition method and object recognition device | |
| TWI689723B (en) | Method for extracting dent on surface of object | |
| JP5901054B2 (en) | Object detection method and object detection apparatus using the method | |
| Elsayed et al. | Hybrid method based on multi-feature descriptor for static sign language recognition | |
| Nikisins et al. | Reduced complexity automatic face recognition algorithm based on local binary patterns |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140623 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150304 |
|
| 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: 20150310 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150323 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 5729348 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |