JP3819074B2 - Character recognition device - Google Patents

Character recognition device Download PDF

Info

Publication number
JP3819074B2
JP3819074B2 JP17261696A JP17261696A JP3819074B2 JP 3819074 B2 JP3819074 B2 JP 3819074B2 JP 17261696 A JP17261696 A JP 17261696A JP 17261696 A JP17261696 A JP 17261696A JP 3819074 B2 JP3819074 B2 JP 3819074B2
Authority
JP
Japan
Prior art keywords
character
image
characters
template
matching
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
JP17261696A
Other languages
Japanese (ja)
Other versions
JPH1021335A (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.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP17261696A priority Critical patent/JP3819074B2/en
Publication of JPH1021335A publication Critical patent/JPH1021335A/en
Application granted granted Critical
Publication of JP3819074B2 publication Critical patent/JP3819074B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Character Discrimination (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、文字を含む画像中から文字を認識する装置に関するものであり、詳細にはテンプレートを用いた文字のパターンマッチングによる文字認識装置に関するものである。
【0002】
【従来の技術】
従来より、人体等の被写体をCT、MRI等によって撮影して得られた医用画像の画像データを、各画像データに適切な画像処理を施した後、画像を再生記録することが行われており、これらの画像データに基づき被写体の画像を写真感光材料等の記録材料、CRT等に可視像として出力させる画像記録再生システムがすでに実用化されている。
【0003】
通常医用画像には、患者名、ID番号、撮影日、生年月日等のID情報が付されており、これらのID情報は、一般に漢字、かな、英文字、数字、記号等(以下「文字」と総称する)から構成されている。従って、医用画像には絵柄と文字とが混在している。この絵柄と文字が混在した医用画像から自動的に文字のみを識別する、あるいは文字と絵柄を分離すること等が望まれる場合がある。それは、例えば以下のような場合である。
【0004】
通常、画像記録再生システムにおいては、撮影された画像データが検索情報となるID情報と関連づけてファイリング装置に記憶されている。このファイリング装置への画像データファイリング時の画像データとID情報との関連づけは、外部入力により行われており操作者側の負担となっていた。そのため、撮影時に画像中に付されたID情報を自動的に認識できるようにすることが望まれている。
【0005】
また、画像記録再生システムにおいて、上記のように画像データを得てこの画像データに基づいて可視画像を再生する場合、その可視画像のうち観察対象となる関心領域をより詳細に観察するため、その関心領域を拡大して再生することがある。この拡大再生画像は、原画像を読み取って得られた原画像データに対して所定の補間演算処理を施して原画像データ数とは異なるデータ数の2次元的な画像データである補間画像データを求め、この補間画像データに基づいて画像再生を行うことにより得ることができる。画像にはID情報等の文字と絵柄が同時に存在するが、拡大に際しては文字と絵柄は別々の補間処理を行い、文字はより鮮鋭に、また絵柄は絵柄の性質にあった補間方法を施して拡大補間することが望ましい。この場合、まず、画像から文字を認識して文字と絵柄を分離する必要がある。
【0006】
従来、文字を含む画像から文字を認識するための方法としては、認識すべき文字のテンプレートを用意し、画像と比較して認識を行うテンプレートマッチングという方法が知られている。この方法は、画像上の認識対象領域と全てのテンプレートとを順次マッチングさせ、マッチング結果が最も良いテンプレートを認識結果とするものであり、認識対象領域が指定されていない場合は画像上での認識対象領域を順次ずらして、画像全面に対してマッチングをとっていく必要がある。
【0007】
以下、一般的なテンプレートマッチングによる認識方法を説明する。画像パターンfとテンプレートパターンgが、それぞれ図6に示すような大きさと位置関係にあるとき、画像の点(m,n)における画像パターンfと、テンプレートパターンgの類似度は、以下に示す評価関数で表される。
【0008】
【数1】

Figure 0003819074
【0009】
ここで通常、R(m,n)は相互相関係数と呼ばれ、領域Dは、|i-m|<M/2,|j-n|<N/2を満たす(i,j) の範囲である。画像上でテンプレートを動かして順次、画像とテンプレートとの類似度を上記の相互相関係数Rにより判別する。相互相関係数Rの値は大きいほど画像の(m,n)を中心としてテンプレートに近い図形が存在すること、すなわち、画像とテンプレートとの相関が強いことを示し、画像とテンプレートとが完全一致で1の値、全くの不一致で0の値をとる。通常、最も相互相関係数Rの大きいものを認識結果とする。
【0010】
【発明が解決しようとする課題】
しかしながら、上記のテンプレートマッチング方法では、マッチング領域や位置が決まっていないことによってマッチング処理回数が多くなること、上記式に示されるように2乗や平方根の計算が必要であること、また、通常多階調の画像に対してマッチングを行うことから、計算量が多くなり認識に時間がかかるという欠点がある。
【0011】
そこで、本発明は上記事情に鑑み、文字を含む画像から精度良く簡単にかつ迅速に文字を認識する文字認識装置を提供することを目的とする。
【0012】
【課題を解決するための手段】
本発明の文字認識装置は、各種装置によって生成された文字を含む画像中から該文字を認識する文字認識装置において、
前記各種装置毎に定められている前記画像中の文字領域および文字間隔を含む文字位置情報と前記各種装置とを対応させて記憶している文字位置情報記憶手段と、
前記画像を生成した装置の情報が入力され、該入力された情報に応じて前記文字位置情報を前記文字位置情報記憶手段から選択する文字位置情報選択手段と、前記文字位置情報に基づいて、前記画像中の文字領域に対して、各種、各サイズの文字のテンプレートを用いて文字パターンマッチングさせることにより文字を認識するマッチング手段とを備えてなることを特徴とするものである。
【0013】
すなわち、画像全面に対してではなく、画像中の限られた領域に対してのみパターンマッチングさせることにより、マッチング時の計算量を低減させるものである。
【0014】
また、前記テンプレートを前記文字間隔分ずつ移動させて文字パターンマッチングさせてもよい。
【0015】
なお、ここで文字領域とは文字が付されうる領域のことをいい、実際に文字が付されているかどうかを問わない。また、文字間隔とは一文字の中心と次の文字の中心との間隔のことをいう。
【0016】
さらに、前記各種装置毎の固有の文字のテンプレートを備えた辞書と、前記画像を生成した装置の情報が入力され、該入力された情報に応じて該装置に固有の文字のテンプレートを前記辞書から選択するテンプレート選択手段とを備え、前記画像中の文字に対して前記テンプレートを用いて文字パターンマッチングさせるようにしてもよい。
【0017】
ここで、各種装置毎の固有の文字のテンプレートとは、各種装置が画像撮影時に該画像にID情報等の文字情報を付するのに用いている文字の種類、大きさ等を含む文字フォントについてのテンプレートのことをいう。
【0018】
なお、上述の文字位置情報選択手段とテンプレート選択手段は別個に設けてもよいし、一つの選択手段が両者を兼ねるものであってもよい。
【0019】
また、前記画像を2値化して、2値化画像を生成する2値化画像生成手段を備え、前記マッチングを前記2値化画像に対してマッチングさせる形態であってもよい。
【0020】
なお、前記2値化画像生成手段は、画像の輪郭を抽出する手段を含むものであることが望ましい。特に、前記2値化画像生成手段が、前記画像の各画素毎に該画素の所定近傍範囲中の画素濃度の最大値と最小値との差を求める演算手段と、前記濃度差と所定の閾値との比較により前記各画素を2値化して画像の輪郭を抽出する2値化手段とから成るものとするのが望ましい。この場合、各画素毎に該画素の所定近傍範囲中の画素濃度の最大値と最小値との差を所定の閾値と比較して2値化することにより画像中の文字の輪郭を抽出し、その輪郭に対してパターンマッチングさせて文字認識を行うことを特徴とするものである。
【0021】
そのほか、輪郭の抽出方法としては、例えば一次微分フィルタ(ロバーツのフィルタ、ブレヴィットのフィルタ、ソーベルのフィルタ等)あるいはラプラシアンフィルタ等を用いる方法が挙げられる。
【0022】
なお、ここで画像とは文字および絵柄が混在したものをいう。
【0023】
【発明の効果】
本発明の文字認識装置は、画像全面に対してパターンマッチングするのではなく、画像を生成した装置の情報が入力され、その情報に応じて装置固有の文字位置情報を選択することにより、画像上の文字が付与されている領域に対してのみマッチングすればよく、計算量を大幅に低減することができる。
【0024】
各種装置固有の文字位置情報には、文字領域のほか文字間隔に関する情報も含むため、文字領域に付されうる文字同志の間隔すなわちそれぞれのマッチングすべき文字の中心位置が明らかである。そのため、文字領域のマッチング開始位置から文字間隔分ずつテンプレートを移動させてマッチングさせることにより、一画素毎にずらせてマッチングさせる場合と比較して、高速に処理することができる。
【0025】
また、辞書の有する全てのテンプレートについてマッチングするのではなく、画像を生成した装置の情報が入力され、その情報に応じて装置固有の文字のテンプレートを選択してマッチングさせる場合には、各装置に対応したテンプレートについてのみマッチングさせることができるので、さらに計算量を低減することができる。
【0026】
さらに、画像を2値化した後に、文字パターンマッチングを行うことにより、マッチング時になされる演算を簡単化して、計算量を低減することができる。このため、装置を簡便化することができ、また、高速なマッチング処理を行うことができる。
【0027】
なお、2値化方法として、各画素の所定の近傍範囲中の濃度の最大値と最小値の差と所定の閾値との比較による2値化を行った場合、画像中の近傍画素同志の濃度差が大きい文字の輪郭を黒文字、白文字にかかわらず明確に抽出することができる。このようにして抽出された文字の輪郭とテンプレートをマッチングさせることにより精度良く認識することができる。また、2値化後にマッチングさせるため処理速度も速い。
【0028】
【発明の実施の形態】
以下、本発明の文字認識装置の具体的な実施の形態について説明する。
【0029】
本発明の第一の実施の形態を図1に示す。本文字認識装置10は、種々の撮影装置9からの原画像データSが入力され、該原画像データSに基づく原画像を2値化して2値化画像を生成する2値化画像生成手段20と、原画像を生成する各種装置の固有の文字フォントを2値化したテンプレート5を備えた辞書35と、原画像を生成する各種装置毎に定められている画像中の文字領域および文字間隔等の文字位置情報を有する文字位置情報記憶手段38と、外部入力手段50から入力された装置情報に応じた文字フォントのテンプレート5を辞書35から選択し、装置情報に応じた文字位置情報を文字位置情報記憶手段38から選択する選択手段40と、2値化画像生成手段20によって生成された2値化画像に対して、選択手段40によって選択されたテンプレート5を用いて、同様に選択された文字位置情報に基づいて文字パターンマッチングさせることにより文字を認識するマッチング手段30とから成る。
【0030】
2値化画像生成手段20は、詳しくは原画像の各画素毎の濃度を検出する濃度検出手段22と、該濃度検出手段22により検出された濃度と所定の閾値との比較により前記各画素を2値化する2値化手段24とからなる。
【0031】
次に、本発明の第一の実施の形態における作用を説明する。
【0032】
文字認識装置10は撮影装置9から原画像データSを入力され、同時に外部入力手段50により認識すべき文字を含む原画像A(原画像データSに対応する画像)を生成した装置の情報が入力される。まず、2値化画像生成手段20において、原画像Aから2値化画像Bが生成される(図3(i) )。画像の2値化は、まず、濃度検出手段22により原画像Aの各画素の濃度を検出し、その後、2値化手段24において、検出された濃度と所定の閾値との比較により各画素を2値化することによって行われる。例えば、濃度を表す帯グラフ8に示すbの濃度に閾値を設け、bより濃い部分を「1」薄い部分を「0」として2値化する。その結果2値化画像Bが得られる。
【0033】
次に、選択手段40によって、外部入力手段50により入力された装置情報に応じたテンプレート、すなわち原画像Aを生成した装置が用いている文字フォントのテンプレート5が辞書35から選択され、同時にその装置情報に応じた文字位置情報が文字位置情報記憶手段38から選択されて、マッチング手段30において、選択されたテンプレート5を用いて、2値化画像Bの文字領域6に対してマッチングが行われる(図4)。
【0034】
各種装置固有の文字位置情報には、文字領域6のほか文字間隔に関する情報も含むため、文字領域に付されうる文字同志の間隔すなわちそれぞれマッチングすべき文字の中心位置が明らかである。マッチングは、文字の中心位置とテンプレートの中心位置を一致させて行えば十分であり、そのため、図4に示すように文字領域のマッチング開始位置から文字間隔分ずつテンプレート5を移動させてマッチングさせればよい。これによって、一画素毎にずらせてマッチングさせる場合と比較して、高速に処理することができる。
【0035】
なお、選択された、すなわち非常に限られた数のテンプレートについてのみマッチングすればよいため、高速な識別が可能となる。また、2値化された画像に対してマッチングを行うため、排他的積和(exclusive or)による類似度評価関数R’を用いることができ、計算時間をさらに短縮することができる。なおこの時、画像上の点(m,n)における画像パターンfとテンプレートgのR'(m,n)は、
【0036】
【数2】
Figure 0003819074
【0037】
で表されるものである。ただし領域Dは、|i-m|<M/2,|j-n|<N/2を満たす(i,j)の範囲である。前述の相互相関係数Rの場合とは逆に、R’が最も小さいテンプレートが認識結果とされる。
【0038】
なお、上述の2値化の際に、「1」,「0」ではなく、「1」,「−1」に2値化して単純な積和値を評価関数に用いてもよい。その場合の評価関数R"(m,n)は、
【0039】
【数3】
Figure 0003819074
【0040】
で表され、R”が最も大きいテンプレートが認識結果とされる。
【0041】
また、患者名、ID番号、撮影日等のID情報のうち、特定の情報のみ、例えばID番号のみを認識させたい場合には、ID番号に使用される文字のみをテンプレートとして有し、文字領域のうちID番号が付された領域のみに対してマッチングさせる形態をとることもできる(他のID情報についても同様である)。
【0042】
このようにして、文字の認識が行われ、認識されたID番号等の文字情報Iは、原画像データSと共にファイリング手段60や拡大縮小手段等の画像データ処理手段へ出力される。
【0043】
しかしながら、上記第一の実施の形態の文字認識装置10においてなされる単なる閾値による2値化方法では、文字と絵柄が重なった画像等において文字の抽出がうまくいかず正確な文字認識が困難な場合がある。その一例として図5に示す黒文字1および白文字2を含む原画像Dをある濃度閾値により2値化する場合について説明する。例えば、濃度を表す帯グラフ8に示すeの濃度に閾値を設け、eより濃い部分を「1」薄い部分を「0」として2値化する。その結果2値化画像Eが得られる。また、fに閾値を設けて同様の処理を行うと2値化画像Fが得られる。この時、2値化画像Eでは黒文字1は明確に抽出されるが、白文字2はその一部が絵柄の白い部分と重なり抽出不能になってしまう。一方、2値化画像Fでは白文字2は明確に抽出されるが黒文字1はその一部が絵柄と重なって抽出不能になってしまう。このように、単に画像データを所定の濃度閾値で2値化する従来の方法では黒文字1と白文字2を同時に明確に抽出することができない。当然ながら、2値化によって画像中の文字を明確に抽出できない場合にはテンプレートマッチングの精度があがらず文字認識に支障をきたすものとなる。
【0044】
そこで、文字と絵柄が重なった画像や黒、白文字を含む画像等においては、以下に説明する第二の実施形態に係る文字認識装置が適する。
【0045】
第二の実施の形態の文字認識装置10' を図2に示す。上記の第一の実施の形態の文字認識装置10との相違点のみを説明する。
【0046】
本文字認識装置10' の2値化画像生成手段20' は、原画像の各画素毎に該画その所定近傍範囲中の画素濃度の最大値と最小値との差を求める演算手段26と、該演算手段26によって求められた濃度差と所定の閾値との比較により各画素を2値化して画像の輪郭を抽出する2値化手段28とから成る。
【0047】
なお、辞書35’の有するテンプレートは各種装置に固有の文字のフォントに対応する2値化された中抜き文字のテンプレート5’である。
【0048】
2値化画像生成手段20' においては、入力された原画像データSについて、まず演算手段26において画像の各画素の所定の近傍範囲中における濃度の最大値と最小値との差が求められる。例えば注目画素を2×2画素マスク中の左下に位置させた場合、その2×2画素マスク(所定近傍範囲)中の計4画素における階調濃度(原画像データS)の最大値および最小値を求め、これを注目画素の濃度差とする。当然ながら、2×2という範囲は一例であり、これに限る必要はない。次に、2値化手段28において、前記演算手段26によって求められた前記濃度差を所定の閾値と比較して、例えば閾値より濃度差が大きい場合を「1」、小さい場合を「0」として注目画素を2値化する。この2値化を画像中の各画素について行うことにより、画像中の近傍画素同志の濃度差の大きい部分、すなわち画像の輪郭が抽出され、原画像Aから2値化画像Cが生成される(図3(ii))。通常、文字と周辺画像の濃度差は大きいため、文字の輪郭が抽出される。
【0049】
その後、選択手段40によって、外部入力手段50により入力された装置の情報に応じたテンプレート、すなわち原画像Aを生成した装置が用いている文字フォントに対応するテンプレート5’が辞書35’から選択され、マッチング手段30’において、2値化画像Cの文字領域に対してテンプレート5’を用いてマッチングが行われる。このようにして認識された文字情報Iは、原画像データSと共にファイリング手段60へ出力される。
【0050】
このようにして、本発明の文字認識装置による文字認識結果を、CT、MRI等の医用画像データのファイリング等の際のID情報として用いることができる。
【0051】
なお、一次微分フィルタ、ラプラシアンフィルタ等を用いて画像の輪郭を抽出し、抽出された輪郭部分の画素を「1」、輪郭部分以外の画素を「0」として各画素の2値化を行うことによっても、上記第二の実施の形態において生成される2値化画像Cと同様の、輪郭が抽出された2値化画像を生成することができる。
【図面の簡単な説明】
【図1】本発明の第一の実施の形態の文字認識装置
【図2】本発明の第二の実施の形態の文字認識装置
【図3】第一および第二の実施の形態の文字認識装置によって生成される2値化画像を説明する図
【図4】パターンマッチング時に文字間隔ずつテンプレートを移動させてマッチングさせる様子を説明する図
【図5】第一の実施の形態の文字認識装置によって画像の2値化を行った場合の問題点を説明する図
【図6】文字パターンマッチング方法を説明する図
【符号の説明】
5 テンプレート
10 文字認識装置
20 2値化画像生成手段
22 濃度検出手段
24 2値化手段
30 マッチング手段
35 辞書
38 文字位置情報記憶手段
40 選択手段
50 入力手段[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a device for recognizing characters from an image including characters, and more particularly, to a character recognition device based on character pattern matching using a template.
[0002]
[Prior art]
Conventionally, medical image data obtained by imaging a subject such as a human body by CT, MRI or the like is subjected to appropriate image processing on each image data, and then the image is reproduced and recorded. An image recording / reproducing system for outputting an image of a subject as a visible image to a recording material such as a photographic photosensitive material, a CRT or the like based on these image data has already been put into practical use.
[0003]
Usually, a medical image is attached with ID information such as a patient name, ID number, photographing date, date of birth, etc. These ID information is generally kanji, kana, English letters, numbers, symbols, etc. (hereinafter “characters”). ”). Therefore, the medical image contains a mixture of patterns and characters. In some cases, it may be desirable to automatically identify only the characters from the medical image in which the designs and characters are mixed, or to separate the characters and the designs. This is the case for example as follows.
[0004]
Usually, in an image recording / reproducing system, captured image data is stored in a filing device in association with ID information serving as search information. The association between the image data and the ID information at the time of filing the image data to the filing apparatus is performed by an external input, which is a burden on the operator side. Therefore, it is desired to be able to automatically recognize ID information added to an image at the time of shooting.
[0005]
In the image recording / reproducing system, when the image data is obtained as described above and the visible image is reproduced based on the image data, the region of interest to be observed in the visible image is observed in more detail. The region of interest may be enlarged and played back. The enlarged reproduction image is obtained by subjecting original image data obtained by reading the original image to predetermined interpolation calculation processing to obtain interpolated image data that is two-dimensional image data having a number of data different from the number of original image data. It can be obtained by performing image reproduction based on this interpolated image data. Characters and designs such as ID information exist in the image at the same time, but when expanding, the characters and designs are subjected to separate interpolation processing, the characters are sharper, and the images are subjected to an interpolation method that matches the nature of the design. Enlargement interpolation is desirable. In this case, first, it is necessary to recognize the character from the image and separate the character and the pattern.
[0006]
Conventionally, as a method for recognizing characters from an image including characters, a method called template matching is known in which a template of characters to be recognized is prepared and recognized in comparison with an image. In this method, the recognition target area on the image and all templates are sequentially matched, and the template with the best matching result is used as the recognition result. If the recognition target area is not specified, the recognition on the image is performed. It is necessary to shift the target area sequentially to match the entire image.
[0007]
Hereinafter, a general recognition method by template matching will be described. When the image pattern f and the template pattern g are in the size and positional relationship as shown in FIG. 6, the similarity between the image pattern f and the template pattern g at the point (m, n) of the image is evaluated as follows. Expressed as a function.
[0008]
[Expression 1]
Figure 0003819074
[0009]
Here, R (m, n) is usually called a cross-correlation coefficient, and the region D is a range of (i, j) that satisfies | im | <M / 2, | jn | <N / 2. The template is moved on the image, and the similarity between the image and the template is sequentially discriminated by the cross-correlation coefficient R. The larger the value of the cross-correlation coefficient R, the closer to the template there is the center of the image (m, n), that is, the stronger the correlation between the image and the template. Takes a value of 1 and a value of 0 with no discrepancy. Usually, the recognition result is the one having the largest cross-correlation coefficient R.
[0010]
[Problems to be solved by the invention]
However, in the above template matching method, the number of matching processes increases because the matching region and position are not determined, the square and square root calculations are required as shown in the above formula, and usually many times. Since matching is performed on a gradation image, there is a disadvantage that the amount of calculation increases and recognition takes time.
[0011]
SUMMARY OF THE INVENTION In view of the above circumstances, an object of the present invention is to provide a character recognition device that easily and quickly recognizes characters from an image including characters.
[0012]
[Means for Solving the Problems]
The character recognition device of the present invention is a character recognition device for recognizing characters from images including characters generated by various devices.
Character position information storage means for storing character position information including character regions and character intervals in the image determined for each of the various devices in association with the various devices;
Information on the device that generated the image is input, and character position information selection means for selecting the character position information from the character position information storage means in accordance with the input information, based on the character position information, Matching means for recognizing characters by character pattern matching using character templates of various sizes for character regions in an image is provided.
[0013]
That is, by performing pattern matching only on a limited area in the image, not on the entire image, the amount of calculation at the time of matching is reduced.
[0014]
Further, the template may be moved by the character interval to match the character pattern.
[0015]
Here, the character area means an area to which a character can be attached, regardless of whether or not a character is actually attached. Also, the character spacing refers to the distance between the center of one character and the center of the next character.
[0016]
Furthermore, a dictionary including a unique character template for each of the various devices and information on the device that generated the image are input, and a character template specific to the device is retrieved from the dictionary according to the input information. Template selection means for selecting, and character pattern matching may be performed on characters in the image using the template.
[0017]
Here, a unique character template for each type of device refers to a character font that includes the type, size, etc. of characters used by various devices to attach character information such as ID information to the image at the time of image capture. This is a template.
[0018]
The character position information selection unit and the template selection unit described above may be provided separately, or one selection unit may serve as both.
[0019]
Further, a binarized image generating unit that binarizes the image and generates a binarized image may be provided, and the matching may be matched with the binarized image.
[0020]
The binarized image generating means preferably includes means for extracting the contour of the image. In particular, the binarized image generating means is configured to calculate, for each pixel of the image, a difference between a maximum value and a minimum value of a pixel density in a predetermined neighborhood range of the pixel, and the density difference and a predetermined threshold value. It is preferable that the image forming apparatus includes binarizing means for binarizing each pixel to extract an image outline. In this case, for each pixel, the difference between the maximum value and the minimum value of the pixel density in the predetermined neighborhood range of the pixel is compared with a predetermined threshold value and binarized to extract the outline of the character in the image, Characteristic recognition is performed by pattern matching with respect to the contour.
[0021]
In addition, examples of the contour extracting method include a method using a first-order differential filter (Roberts filter, Brevit filter, Sobel filter, etc.) or a Laplacian filter.
[0022]
Here, the image means an image in which characters and patterns are mixed.
[0023]
【The invention's effect】
The character recognition device of the present invention does not perform pattern matching on the entire image, but inputs information on the device that generated the image, and selects character position information unique to the device according to the information, thereby It is only necessary to match the region to which the character is assigned, and the amount of calculation can be greatly reduced.
[0024]
Since the character position information unique to each device includes information on the character spacing in addition to the character region, the spacing between characters that can be attached to the character region, that is, the center position of each character to be matched is clear. Therefore, by moving the template by the character interval from the matching start position of the character area and performing matching, processing can be performed at a higher speed than in the case of matching by shifting each pixel.
[0025]
Also, instead of matching all the templates in the dictionary, information on the device that generated the image is input, and if a device-specific character template is selected and matched according to the information, Since only corresponding templates can be matched, the amount of calculation can be further reduced.
[0026]
Furthermore, by performing character pattern matching after binarizing the image, the calculation performed at the time of matching can be simplified and the amount of calculation can be reduced. Therefore, the apparatus can be simplified and high-speed matching processing can be performed.
[0027]
As a binarization method, when binarization is performed by comparing the difference between the maximum and minimum values of density in a predetermined neighborhood range of each pixel and a predetermined threshold, the density of neighboring pixels in the image The outline of a character with a large difference can be clearly extracted regardless of whether it is black or white. By matching the outline of the character thus extracted with the template, it can be recognized with high accuracy. Also, since matching is performed after binarization, the processing speed is also fast.
[0028]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, specific embodiments of the character recognition device of the present invention will be described.
[0029]
A first embodiment of the present invention is shown in FIG. The character recognition device 10 receives the original image data S from various photographing devices 9, and binarizes the original image based on the original image data S to generate a binarized image. A dictionary 35 including a template 5 in which character fonts unique to various devices that generate the original image are binarized, character regions and character intervals in the images defined for the various devices that generate the original image, and the like Character position information storage means 38 having the character position information and character font template 5 corresponding to the device information input from the external input means 50 are selected from the dictionary 35, and the character position information corresponding to the device information is selected as the character position. Characters selected in the same manner using the template 5 selected by the selection means 40 for the binarized image generated by the selection means 40 selected from the information storage means 38 and the binarized image generation means 20 location information Based comprising characters from recognizing the matching means 30. By character pattern matching.
[0030]
More specifically, the binarized image generating means 20 includes a density detecting means 22 for detecting the density of each pixel of the original image, and comparing the density detected by the density detecting means 22 with a predetermined threshold value. It comprises binarization means 24 for binarization.
[0031]
Next, the operation in the first embodiment of the present invention will be described.
[0032]
The character recognition device 10 receives the original image data S from the photographing device 9 and simultaneously receives the information of the device that has generated the original image A (image corresponding to the original image data S) including the characters to be recognized by the external input means 50. Is done. First, the binarized image generating means 20 generates a binarized image B from the original image A (FIG. 3 (i)). In the binarization of the image, first, the density detection means 22 detects the density of each pixel of the original image A, and then the binarization means 24 compares each detected density with a predetermined threshold value. This is done by binarizing. For example, a threshold value is provided for the density of b shown in the band graph 8 indicating density, and the portion darker than b is “1” and the portion lighter than “b” is binarized. As a result, a binarized image B is obtained.
[0033]
Next, the selection unit 40 selects from the dictionary 35 a template corresponding to the device information input by the external input unit 50, that is, the character font template 5 used by the device that generated the original image A. Character position information corresponding to the information is selected from the character position information storage means 38, and matching is performed on the character area 6 of the binarized image B using the selected template 5 in the matching means 30 ( FIG. 4).
[0034]
Since the character position information unique to various devices includes information related to the character spacing in addition to the character region 6, the spacing between characters that can be attached to the character region, that is, the center position of the character to be matched is clear. It is sufficient to perform matching by matching the center position of the character with the center position of the template. Therefore, as shown in FIG. 4, the template 5 can be moved by the character interval from the matching start position of the character area and matched. That's fine. As a result, processing can be performed at a higher speed than in the case of matching by shifting for each pixel.
[0035]
Note that only a limited number of templates, that is, a very limited number of templates need to be matched, so that high-speed identification is possible. In addition, since matching is performed on the binarized image, a similarity evaluation function R ′ based on exclusive product or exclusive (exclusive or) can be used, and calculation time can be further shortened. At this time, R ′ (m, n) of the image pattern f and the template g at the point (m, n) on the image is
[0036]
[Expression 2]
Figure 0003819074
[0037]
It is represented by However, the region D is a range of (i, j) that satisfies | im | <M / 2, | jn | <N / 2. Contrary to the case of the cross-correlation coefficient R described above, the template having the smallest R ′ is taken as the recognition result.
[0038]
Note that, in the above binarization, instead of “1” and “0”, binarization to “1” and “−1” and a simple product sum value may be used for the evaluation function. In that case, the evaluation function R "(m, n) is
[0039]
[Equation 3]
Figure 0003819074
[0040]
The template with the largest R ″ is taken as the recognition result.
[0041]
In addition, when it is desired to recognize only specific information among ID information such as a patient name, an ID number, and an imaging date, for example, only an ID number, it has only a character used for the ID number as a template, and a character area Of these, it is possible to take a form of matching only to the region assigned the ID number (the same applies to other ID information).
[0042]
In this way, characters are recognized, and the recognized character information I such as ID numbers is output together with the original image data S to image data processing means such as filing means 60 and enlargement / reduction means.
[0043]
However, when the binarization method based on a simple threshold value performed in the character recognition device 10 of the first embodiment does not extract characters correctly in an image or the like in which characters and images overlap, accurate character recognition is difficult. There is. As an example, a case will be described in which an original image D including black characters 1 and white characters 2 shown in FIG. 5 is binarized by a certain density threshold. For example, a threshold value is provided for the density of e shown in the band graph 8 indicating the density, and the portion darker than e is “1” and the portion lighter than “0” is binarized. As a result, a binarized image E is obtained. Further, if a similar process is performed by setting a threshold value for f, a binarized image F is obtained. At this time, the black character 1 is clearly extracted in the binarized image E, but the white character 2 partially overlaps with the white portion of the pattern and cannot be extracted. On the other hand, in the binarized image F, the white character 2 is clearly extracted, but the black character 1 partly overlaps the pattern and cannot be extracted. Thus, the conventional method of simply binarizing image data with a predetermined density threshold cannot clearly extract black character 1 and white character 2 simultaneously. Of course, if the characters in the image cannot be clearly extracted by the binarization, the template matching accuracy is not improved and the character recognition is hindered.
[0044]
Therefore, the character recognition device according to the second embodiment described below is suitable for an image in which characters and patterns overlap or an image including black and white characters.
[0045]
A character recognition apparatus 10 'according to the second embodiment is shown in FIG. Only differences from the character recognition device 10 of the first embodiment will be described.
[0046]
The binarized image generating means 20 ′ of the character recognition device 10 ′ includes a calculating means 26 for obtaining the difference between the maximum value and the minimum value of the pixel density in the predetermined neighborhood range of the image for each pixel of the original image, The image forming apparatus comprises binarizing means 28 for binarizing each pixel by extracting the contour of the image by comparing the density difference obtained by the calculating means 26 with a predetermined threshold value.
[0047]
Note that the template of the dictionary 35 'is a binarized character template 5' corresponding to character fonts unique to various devices.
[0048]
In the binarized image generating means 20 ′, the difference between the maximum value and the minimum value of the density in a predetermined vicinity range of each pixel of the image is first obtained in the calculating means 26 for the input original image data S. For example, when the target pixel is positioned at the lower left in the 2 × 2 pixel mask, the maximum value and the minimum value of the gradation density (original image data S) in a total of four pixels in the 2 × 2 pixel mask (predetermined neighborhood range) And this is taken as the density difference of the pixel of interest. Of course, the range of 2 × 2 is an example, and is not limited to this. Next, in the binarizing means 28, the density difference obtained by the computing means 26 is compared with a predetermined threshold value. For example, when the density difference is larger than the threshold value, “1” is set, and when it is smaller, “0” is set. The target pixel is binarized. By performing this binarization for each pixel in the image, a portion having a large density difference between neighboring pixels in the image, that is, the contour of the image is extracted, and a binarized image C is generated from the original image A ( FIG. 3 (ii)). Usually, since the density difference between the character and the surrounding image is large, the outline of the character is extracted.
[0049]
After that, the selection unit 40 selects from the dictionary 35 ′ a template 5 ′ corresponding to the character font used by the device that generated the original image A, according to the device information input by the external input unit 50. In the matching means 30 ′, the character area of the binarized image C is matched using the template 5 ′. The character information I recognized in this way is output to the filing means 60 together with the original image data S.
[0050]
In this way, the character recognition result by the character recognition device of the present invention can be used as ID information when filing medical image data such as CT and MRI.
[0051]
Note that the contour of the image is extracted using a first-order differential filter, a Laplacian filter, etc., and binarization of each pixel is performed by setting the extracted contour portion pixel to “1” and the pixels other than the contour portion to “0”. Also, the binarized image from which the contour is extracted, similar to the binarized image C generated in the second embodiment, can be generated.
[Brief description of the drawings]
FIG. 1 is a character recognition device according to a first embodiment of the present invention. FIG. 2 is a character recognition device according to a second embodiment of the present invention. FIG. 3 is a character recognition according to first and second embodiments. FIG. 4 is a diagram for explaining a binarized image generated by the apparatus. FIG. 4 is a diagram for explaining how a template is moved by character spacing at the time of pattern matching. FIG. 5 is a diagram illustrating a character recognition apparatus according to the first embodiment. Fig. 6 is a diagram for explaining problems when binarizing an image. Fig. 6 is a diagram for explaining a character pattern matching method.
5 Template
10 Character recognition device
20 Binary image generation means
22 Concentration detection means
24 Binarization means
30 Matching means
35 dictionary
38 Character position information storage means
40 selection methods
50 Input means

Claims (6)

各種医用画像撮影装置によって生成された、各種 ID 情報を示す文字を含む医用画像中から該文字を認識する文字認識装置において、
前記各種医用画像撮影装置毎に定められている前記画像中の文字領域および文字間隔を含む文字位置情報と前記各種装置とを対応させて記憶している文字位置情報記憶手段と、
前記画像を生成した装置の情報が入力され、該入力された情報に応じて前記文字位置情報を前記文字位置情報記憶手段から選択する文字位置情報選択手段と、
前記文字位置情報に基づく前記画像中の文字領域に対して、各種、各サイズの文字のテンプレートを用いて文字パターンマッチングさせることにより文字を認識するマッチング手段とを備えてなることを特徴とする文字認識装置。
In a character recognition device for recognizing characters from medical images including characters indicating various ID information generated by various medical image capturing devices,
Character position information storage means for storing character position information including character regions and character intervals in the image determined for each of the various medical image photographing devices in association with the various devices;
Character position information selection means for inputting information on the device that generated the image and selecting the character position information from the character position information storage means according to the input information;
Characters comprising: matching means for recognizing characters by matching character patterns in the image based on the character position information using character templates of various sizes and characters Recognition device.
前記テンプレートを前記文字間隔分ずつ移動させて文字パターンマッチングさせることを特徴とする請求項1記載の文字認識装置。  The character recognition apparatus according to claim 1, wherein the template is moved by the character interval to perform character pattern matching. 前記各種医用画像撮影装置毎の固有の文字のテンプレートを備えた辞書と、
前記画像を生成した装置の情報が入力され、該入力された情報に応じて該装置に固有の文字のテンプレートを前記辞書から選択するテンプレート選択手段とをさらに備え、
前記画像中の文字に対して前記テンプレートを用いて文字パターンマッチングさせることを特徴とする請求項1または2いずれか記載の文字認識装置。
A dictionary including a template of unique characters for each of the various medical imaging apparatuses;
Further comprising template selection means for inputting information of the device that generated the image, and selecting a template of characters unique to the device from the dictionary according to the input information;
The character recognition apparatus according to claim 1, wherein the character pattern matching is performed on the characters in the image using the template.
前記画像を2値化して2値化画像を生成する2値化画像生成手段を更に備え、
前記2値化画像に対して文字パターンマッチングを行うことを特徴とする請求項1から3いずれか記載の文字認識装置。
A binarized image generating means for binarizing the image to generate a binarized image;
4. The character recognition apparatus according to claim 1, wherein character pattern matching is performed on the binarized image.
前記2値化画像生成手段が、画像の輪郭を抽出する手段を含むものであることを特徴とする請求項4記載の文字認識装置。  5. The character recognition apparatus according to claim 4, wherein the binarized image generating means includes means for extracting an outline of the image. 前記2値化画像生成手段が、前記画像の各画素毎に該画素の所定近傍範囲中の画素濃度の最大値と最小値との差を求める演算手段と、前記濃度の差と所定の閾値との比較により前記各画素を2値化して画像の輪郭を抽出する2値化手段とから成ることを特徴とする請求項5記載の文字認識装置。 The binarized image generating means for calculating for each pixel of the image a difference between a maximum value and a minimum value of a pixel density in a predetermined neighborhood range of the pixel; a difference between the density and a predetermined threshold value; The character recognition apparatus according to claim 5, further comprising: binarization means for binarizing each pixel by the comparison and extracting an outline of an image.
JP17261696A 1996-07-02 1996-07-02 Character recognition device Expired - Fee Related JP3819074B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17261696A JP3819074B2 (en) 1996-07-02 1996-07-02 Character recognition device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17261696A JP3819074B2 (en) 1996-07-02 1996-07-02 Character recognition device

Publications (2)

Publication Number Publication Date
JPH1021335A JPH1021335A (en) 1998-01-23
JP3819074B2 true JP3819074B2 (en) 2006-09-06

Family

ID=15945185

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17261696A Expired - Fee Related JP3819074B2 (en) 1996-07-02 1996-07-02 Character recognition device

Country Status (1)

Country Link
JP (1) JP3819074B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8488886B2 (en) * 2010-08-02 2013-07-16 Celartem, Inc. Font matching

Also Published As

Publication number Publication date
JPH1021335A (en) 1998-01-23

Similar Documents

Publication Publication Date Title
KR100480781B1 (en) Method of extracting teeth area from teeth image and personal identification method and apparatus using teeth image
EP0899680B1 (en) Method for automatic detection of human eyes in digital images
AU705713B2 (en) Method and system for the detection of lesions in medical images
US11023708B2 (en) Within document face verification
US20120163678A1 (en) System and method for identifying a person with reference to a sclera image
JP4518139B2 (en) Image processing device
EP2104059A1 (en) Apparatus and method for processing image
KR20110024169A (en) Eye state detection method
CN112836653A (en) Face privacy method, device and apparatus and computer storage medium
JP2005275935A (en) Terminal device
WO2023047118A1 (en) A computer-implemented method of enhancing object detection in a digital image of known underlying structure, and corresponding module, data processing apparatus and computer program
JP3195136B2 (en) Image processing device
CN114863431A (en) Text detection method, device and equipment
KR101654287B1 (en) A Navel Area Detection Method Based on Body Structure
JP3819074B2 (en) Character recognition device
US8144965B2 (en) Image processing apparatus, image processing method, and computer storage medium
JP2008217494A (en) Image processing method, image processing program, and image processor
JP3786221B2 (en) Image data management device
JPH1011536A (en) Character recognizer
JPH1021334A (en) Device for recognizing character
Liao et al. Image segmentation of thyroid nodule and capsule for diagnosing central compartment lymph node metastasis
JPH1063779A (en) Character recognition method, and device therefor
JPH1063787A (en) Character recognition method, and device therefor
JP2004145592A (en) Motion vector extraction device, method and program, and its recording medium
JP2006092191A (en) Apparatus for detecting face image, method for detecting face image, and program for detecting face image

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051004

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060214

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: 20060613

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060614

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090623

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090623

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090623

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100623

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100623

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110623

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110623

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120623

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120623

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130623

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees