JP3923243B2 - Character extraction method from color document image - Google Patents

Character extraction method from color document image Download PDF

Info

Publication number
JP3923243B2
JP3923243B2 JP2000222063A JP2000222063A JP3923243B2 JP 3923243 B2 JP3923243 B2 JP 3923243B2 JP 2000222063 A JP2000222063 A JP 2000222063A JP 2000222063 A JP2000222063 A JP 2000222063A JP 3923243 B2 JP3923243 B2 JP 3923243B2
Authority
JP
Japan
Prior art keywords
color
image
character
cluster
rectangle
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
JP2000222063A
Other languages
Japanese (ja)
Other versions
JP2002042055A (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.)
Japan Science and Technology Agency
National Institute of Japan Science and Technology Agency
Original Assignee
Japan Science and Technology Agency
National Institute of Japan Science and Technology Agency
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 Japan Science and Technology Agency, National Institute of Japan Science and Technology Agency filed Critical Japan Science and Technology Agency
Priority to JP2000222063A priority Critical patent/JP3923243B2/en
Publication of JP2002042055A publication Critical patent/JP2002042055A/en
Application granted granted Critical
Publication of JP3923243B2 publication Critical patent/JP3923243B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、複雑で多様な背景を持ったカラー文書画像から文字色部分のみを抜き出すようにした、カラー文書画像からの文字抽出方法に関するものである。
【0002】
【従来の技術】
近年、多くの光学的文字読み取り装置(OCR)が研究されてきた。その結果、印刷物からの文字認識では、非常に高い精度の認識が行なわれるようになってきている。
【0003】
しかしながら、それらのシステムはすべて2値(例えば白黒)の印刷物を対象にしたものであり、カラー文書を読み取るためのシステムは存在しない。
【0004】
〔1〕M.Celenk,“A Color Clustering Technique for Image Segmentation”,Comput.Vision Graphics Image Process.52,pp.145−170(1990)
〔2〕J.Liu and Y.H.Yang,“Multiresolution Color Image Segmentation”,IEEE Trans.Pattern Anal.Mach.Intell.16,7,pp.689−700(1994)
〔3〕S.H.Park,I.D.Yun and S.U.Lee,“Color Image Segmentation based on 3−D Clustering:Morphological Approach”,Pattern Recognition 31,8,pp.1061−1076(1998)
〔4〕J.Ohya,A.Shio and S.Akamatsu,“Recognition Characters in Scene Images”,IEEE Trans.Pattern Anal.Mach.Intell.16,2,pp.214−220(1994)
〔5〕松尾賢一、梅田三千雄、“濃淡及び色情報による情景画像からの文字列抽出”電子情報通信学会技術研究会報告PRU92−121(1992)
〔6〕仙田修司、美濃導彦、池田克夫、“文字列の単色性に着目したカラー画像からの文字パタン抽出法”電子情報通信学会技術研究報告PRU94−29(1994)
〔7〕Y.Zhong,K.Karu and A.K.Jain,“Locating Text in Complex Color Images”,Pattern Recognition 28,10,pp.1523−1535(1995)
〔8〕J.C.Bezdek,“Pattern Recognition with Fuzzy Objective Function Algorithms”Plenum Press(1981)
【0005】
【発明が解決しようとする課題】
現在出版されている印刷物の中には、多彩な色を持ち、複雑な背景の上に書かれた、雑誌のような出版物も存在する。そのような雑誌等のカラー印刷物から文字認識を行なう場合、白地に黒で印刷されているだけの印刷物と違い、背景の中から文字色を見つけ出す作業が必要となる。
【0006】
ところで、カラー画像の領域分割に関しては、過去に上記したいくつかの研究がある(上記文献〔1〕,〔2〕,〔3〕)。また、情景画像からの文字抽出に関しても、上記文献〔4〕,〔5〕のような研究がある。しかし、上記文献〔4〕はカラー画像の色の情報を利用しておらず、上記文献〔5〕は限定された状況(画像中に文字列が1列のみ)の研究である。
【0007】
そこで、文字色を推定し、それを利用して文字を抽出する方法としては、上記文献〔6〕,〔7〕が存在する。
【0008】
上記文献〔6〕は、色ヒストグラムからK平均法(K−means法)によるクラスタリングによって色を分解しており、本発明の方法に近いアルゴリズムになっている。
【0009】
しかしながら、本発明の方法はファジイクラスタリングを用いた方法であり、要素の所属が2値的(所属するか、しないか)に決まってしまうハードクラスタリングと異なり、所属の程度まで判別できるクラスタリングを使用している。
【0010】
このファジイクラスタリングによって得られる帰属度を用いることによって、2値的な分類だけでは判別の難しかった画像についての微妙な色の識別ができるようになる。そして、色ごとに分解された画像(2値画像)から、文字パターンを抽出する方法についても述べる。
【0011】
本発明では、2値化された色分解画像をラベリングし、そのラベルの外接矩形から文字の並びと思われる特徴を見つけ出している。本発明の方法は、同じ文字列内の各文字の色が同一で単色であれば、複数行で複数色の文字列があっても抽出可能である。また、様々なサイズの文字が混じっていても抽出が可能である。
【0012】
本発明は、上記状況に鑑みて、文字列が単色で書かれていることを前提として、色情報をクラスタリングすることによって、画像の背景色と文字色を分離し、複雑で多様な背景からでも文字を抽出できるカラー文書画像からの文字抽出方法を提供することを目的としている。
【0013】
【課題を解決するための手段】
本発明は、上記目的を達成するために、
〔1〕複雑で多様な背景を持ったカラー文書画像から文字色部分のみを抜き出すようにしたカラー文書画像からの文字抽出方法であって、(a)前記カラー文書画像からスムージングによるディザの除去を行い、(b)このディザの除去を行った画像の色値のRGBからL* * * ヘの変換とヒストグラム作成を行い、(c)次に、前記L* * * の3次元だけでなく、画像の垂直方向の座標(y座標)も加えた4次元の空間に対して、クラスタ内の要素の分散による分割、統合、所属要素数による消滅を含むファジイクラスタリングを行うことにより、各色がそのクラスタにどの程度属しているかを示す帰属度を求め、(d)次に、前記帰属度を基に閾値ti は、そのクラスタに所属する要素の数ρi (重みつき帰属度合計)に応じて、

Figure 0003923243
つまり、所属する要素の数が多いクラスタは画像の広い範囲で使われる背景の色であるので、なるべく文字部分を含まない2値画像を作成するために閾値を高くし、逆に、所属する要素の数が少ないクラスタは文字色である可能性が高く、色のにじみも含めて抽出するために閾値は低くするように設定する色分解画像である2値画像の作成を行い、(e)次に、前記2値画像のノイズを除去し、(f)次に、黒画素および白画素のラベリングを行い、(g)次に、文字抽出に適した2値画像の選択を行い、(h)次に、文字行の抽出を行うことを特徴とする。
【0015】
【発明の実施の形態】
以下、本発明の実施の形態を図を参照しながら説明する。
【0016】
まず、本発明に係るカラー文書画像からの文字抽出のための処理の概要について説明する。
【0017】
大まかな流れとしては、色分解画像を作成し、その2値化したデータをラベリングし、そのラベルを囲む外接矩形より文字列を抽出する、といった流れになっている。本発明の方法の特徴は、色分解画像を作成するにあたり、入力画像の色情報に対してファジイクラスタリングを用いて色分割を行なっていることである。
【0018】
細かな処理の流れは、図1に示すように、以下の通りである。
【0019】
(1)まず、カラー文書画像からのスムージングによるディザの除去を行う(ステップS1)。
【0020】
(2)次に、画素の色値のRGBからL* * * ヘの変換とヒストグラム作成を行う(ステップS2)。
【0021】
(3)次に、色情報のファジイクラスタリングを行う(ステップS3)。
【0022】
(4)次に、帰属度を基に色分解画像(2値画像)作成を行う(ステップS4)。
【0023】
(5)次に、2値画像のノイズ除去を行う(ステップS5)。
【0024】
(6)次に、黒画素および白画素のラベリングを行う(ステップS6)。
【0025】
(7)次に、文字抽出に適した2値画像の選択を行う(ステップS7)。
【0026】
(8)次に、文字行の抽出を行う(ステップS8)。
【0027】
次に、それぞれの処理における細かなアルゴリズムについて説明する。
【0028】
▲1▼上記(1)の「スムージングによるディザの除去」
3色もしくは4色の色を周期的に配置することで、見た目にはそれらの色を混ぜ合わせたような効果を期待するのがディザ法である。ディザ法によって印刷されている文字があると、図2(a)に示すように文字の単色性が満たされ難い。上記文献〔6〕では、スムージングを行なうことによって、ディザの影響を軽減する方法が提案されている。そこでは、文字の輪郭がぼやけてしまわないように、画像のエッジの弱い部分のみを平均化する方法を提案している。なお、図2において、1はディザ法によって印刷されている文字、2はディザが除かれた文字である。
【0029】
本発明の方法では、エッジであるかどうかの判定に、次の式を用いている。
【0030】
i max=max(‖xj −xk ‖) …(1)
j,k∈N={座標iとその8近傍の座標}
なお、xi は座標iの色値を表す
式(1)は、目標画素とその8近傍の画素の計9つの画素の色値のうち、最も離れた2つの色値の距離である。di maxが一定値以内ならば、エッジではないと考えて、式(2)で表されるフィルタで8近傍の画素との平均化を行なう。
【0031】
【数1】
Figure 0003923243
【0032】
i maxが一定値以上ならば、エッジを含んでいると考えて平均化を行なわない。
【0033】
このようなスムージング処理を行なうことによって、図2(a)が図2(b)のようになる。
▲2▼上記(2)の「色値のRGBからL* * * への変換とヒストグラム作成」CIEのL* * * 色空間は、人間の色感覚に近いとされる均等知覚色空間である。そこで、RGBで表される色値をL* * * に変換する。その変換式は以下の通りである。
【0034】
X=0.478R+0.299G+0.175B …(3)
Y=0.263R+0.655G+0.051B …(4)
Z=0.020R+0.160G+0.908B …(5)
* =25(100Y/Y0 1/3 −16 …(6)
* =13L(u′−u′0 ) …(7)
* =13L(v′−v′0 ) …(8)
u′=4X/(X+15Y+3Z) …(9)
v′=9Y/(X+15Y+3Z) …(10)
なお、RGBは多くの場合0〜255の値を持つデータだが、それを0〜1の値に変換したものを上記の式に適用する。
【0035】
また、Y0 =1,u0 =0.201,v0 =0.461となっている。
【0036】
RGBからXYZへの変換式についてはいくつかのバリエーションが存在するが、本発明では上記の式を用いている。なお、このL* * * 色空間は立方体をしておらず、L* ,u* ,v* のとる値の範囲もそれぞれ違っている。イメージとしては図3(b)に示すような形状をしている。ちなみにL* は0〜116の値をとり、u* は−97〜171の値をとり、v* は−128〜109の値をとる。なお、図3(a)はRGB色空間を示している。
【0037】
このようにして得られた色値からヒストグラムを作成し、クラスタリングを行なうが、本システムでは文字がすべて横書きで書かれているものとして考え、その位置情報も利用してクラスタリングを行なう。そこで、L* * * の3次元だけでなく、画像の垂直方向の座標(y座標)も加えた4次元の空間に対してクラスタリングを行なう。この4次元の空間は17×45×40×10(L* が17,u* が45,v* が40,y座標が10)に分けられ、ヒストグラムが作成される。
【0038】
▲3▼上記(3)の「色情報のファジイクラスタリング」
入力された画像の色情報に対してファジイクラスタリングを行ない、色を分解する。ファジイクラスタリングが、ハードクラスタリングといわれる通常のクラスタリングと異なる点は、要素が複数のクラスタに少しずつ所属する事を認めている点である。ハードクラスタリングにおける、要素のクラスタヘの所属の有無を1と0で表すと、図4に示すようになる。これがファジイクラスタリングでは、各クラスタ中心までの距離の比で決まる0〜1の値の帰属度という数値で表される(図5参照)。帰属度は、要素にそのクラスタがどれだけ強い影響を与えているかを示している。
【0039】
これにより、あるクラスタに所属するかしないかといった2値的な判別ではなく、どのクラスタにどの程度所属しているかといった程度の違いまで判断できるようになる。
【0040】
▲3▼−1:FCMについて説明する。
【0041】
代表的なファジイクラスタリングとしては、Bezdekらによるファジイc−means法(FCM)、つまり、上記文献〔8〕に示されるアルゴリズムが存在する。これは、K−means法に帰属度の考えを付け加えて拡張したアルゴリズムである。ここで、K−means法について説明すると、K−means法は予めクラスタ数(K個)が定まっている場合のクラスタリング手法である。ここでは、まず、初期クラスタ中心を適当に与え、各要素を最も近いクラスタ中心に所属させる。その後、各クラスタに対して平均値により新たなクラスタ中心を計算し、再度新しいクラスタを求める。これらの操作をクラスタ中心が変化しなくなるまで繰り返し、最終的なクラスタを得る。
【0042】
このFCMのアルゴリズムを簡単に述べると次のようになっている。
【0043】
ステップ1:c個の初期クラスタ中心vi 、(i=1,2,…,c)を適当に決める。
【0044】
ステップ2:すべての要素xk 、(k=1,…,n)の帰属度
【0045】
【数2】
Figure 0003923243
【0046】
を求める
ステップ3:新たなクラスタ中心
【0047】
【数3】
Figure 0003923243
【0048】
ここでのmは帰属度に対する重み値で、1<m<∞の値をとり、mが大きくなればなるほど、帰属度の大きな要素xk のクラスタ中心vi に対する影響が大きくなる。なお、式(11),(12)で、m→1,uik∈{0,1}と置けば、このアルゴリズムは通常のK−means法と同じものとなる。
【0049】
▲3▼−2:自己収束型ファジイクラスタリング
本発明では、最も一般的なファジイクラスタリングであるFCMにクラスタの分割、統合、消滅といった処理を加えた、自己収束型ファジイクラスタリングを使用している。
【0050】
この自己収束型ファジイクラスタリングのアルゴリズムは以下のようになっている。
【0051】
ステップ1:クラスタ数の初期値c、帰属度の重みm、収束判定値ε、最大繰り返し数I、クラスタ分割条件の閾値θS 、クラスタ統合の閾値θd 、クラスタ消滅条件の閾値θC を決める。
【0052】
ステップ2:初期クラスタ中心vi ,(i=1,2,…,c)を決める。
【0053】
ステップ3:要素xk =(xkL,xku,xkv,xky)、(k=1,…,n)の帰属度
【0054】
【数4】
Figure 0003923243
【0055】
を求める。
【0056】
ステップ4:各クラスタの分散
【0057】
【数5】
Figure 0003923243
【0058】
を求め、ソートする。
【0059】
ステップ5:σi がθS 以上のクラスタを分割する。なお、分割後の新しいクラスタ中心は、
【0060】
【数6】
Figure 0003923243
【0061】
(S1 ={xk |xkq>viq}、S2 ={xk |xkq iq}、qはL,u,v,yのうち最も分散の大きいもの)
ステップ6:クラスタ間の距離がθd 以下のクラスタを統合する。なお、統合後の新たなクラスタ中心は、2つのクラスタ中心の中間点である。クラスタを統合したならば、すべての要素の帰属度を求め直す。
【0062】
ステップ7:各クラスタの所属要素数(重みつき帰属度合計)
【0063】
【数7】
Figure 0003923243
【0064】
がθC 以下のクラスタを消滅させ、再度すべての要素の帰属度を計算する。
【0065】
ステップ8:新たなクラスタ中心
【0066】
【数8】
Figure 0003923243
【0067】
を計算する。
【0068】
【数9】
Figure 0003923243
【0069】
さもなくば、ステップ4に戻る。
【0070】
クラスタ数が増減し、自己収束するアルゴリズムは、K−means法を基にしたものではいくつも存在する。本発明の方法は、ハードクラスタリングで使われる自己収束化方法を、ファジイクラスタリングに拡張したものである。本来のファジイクラスタリングと異なる点は、ステップ4、ステップ5のクラスタ分割処理、ステップ6のクラスタ統合処理、そして、ステップ7のクラスタ消滅処理である。
【0071】
クラスタ分割処理は、クラスタの分散の大きさを見て行われる。分散の大きなクラスタは2つに分割される。次に、クラスタ同士が接近していた場合(クラスタ中心間の距離が小さかった場合)、その2つのクラスタを1つにする。そして、このクラスタ数の変化などによって、所属する要素の数(重みつき帰属度合計)が少なくなったクラスタは消滅させる。
【0072】
ただし、このようなクラスタ数決定アルゴリズムは、解が振動してしまい、収束しないことがある。そこで、解の振動を抑えるために、繰り返しが進むにつれて閾値や収束条件を緩めることが考えられる。
【0073】
このような処理を加えた、適切なクラスタ数で自己収束するファジイクラスタリングを用いて、各クラスタおよび帰属度が計算される。
【0074】
なお、実験結果のところで示してあるデータは以下の初期値、閾値で計算された結果である。
【0075】
c=1
m=1.5
I=10
ε=1.0
θS =8.0
θd =3.0
θC =全画素数/100
なお、閾値に関しては、解が振動することが多いことから、繰り返しが進むにつれて閾値を緩める方法を用いた。この値は、あくまで実験的に求めた値である。
【0076】
▲4▼上記(4)の「帰属度を基に色分解画像(2値画像)作成」
ファジイクラスタリングによって得られる各色の帰属度から、そのクラスタヘの所属の程度が分かる。その帰属度を基に、2値画像を作成する。その際の閾値ti は、そのクラスタに所属する要素の数ρi 〔式(16)〕に応じて次の式で決定する。
【0077】
【数10】
Figure 0003923243
【0078】
所属する要素の数が多いクラスタは画像の広い範囲で使われる背景の色であると考えられ、なるべく文字部分を含まない2値画像を作成するために閾値を高くする。逆に、所属する要素の数が少ないクラスタは文字色である可能性が高く、色のにじみも含めて抽出するために閾値は低くする。
【0079】
なお、この2値化処理の際には、y座標(画素の垂直方向の座標)が違うのみでL* ,u* ,v* の値がほぼ同じクラスタに対しては、それぞれの帰属度を足して1つのものとして閾値処理を行っている。画像によっては、背景色のように広い範囲で使われている色が、y座標で2つに分けられることがある。このような場合、2つのクラスタを統合して処理しても、文字色と背景色の分離性にはほとんど影響しないので、2値画像の数を減らし、処理の効率化を図るために、クラスタを統合処理する必要がある。
【0080】
このようにして、図6の画像からは図7中に示してあるような2値画像が作成される。
【0081】
▲5▼上記(5)の「2値画像のノイズ除去」
作成された2値画像には、スムージング処理で吸収しきれなかったディザや、背景上の孤立点等がノイズとして出現する。具体的には、画素の連結数が少ないものである。画像の解像度によって、いくつの連結数のものまでをノイズとするかは変わる。これらは、次のラベリング処理やそれに続く文字行の抽出で、使用メモリ量の減少や処理速度の高速化のために除去する。
【0082】
▲6▼上記(6)の「黒画素および自画素のラベリング」
ラベリングとは、同じ連結成分に属するすべての画素に同じラベル(番号)を割り当て、異なった連結成分には異なったラベルを割り当てる操作である。2値化された画像の黒画素、白画素両方に対してラベリングを行ない、各連結成分に対して外接矩形を求める。図8に示すような2値画像には、図9(a),図9(b)に示すようにラベルが付けられる。ここでは4連結でラベリングを行なっている。そして、同一のラベルをつけられた連結成分を囲う矩形(外接矩形)を元に文字の抽出を行なう。
【0083】
図10(a),図10(b)が図9の黒画素、白画素のラベルに対してのそれぞれの外接矩形となる。この時、大き過ぎる矩形(入力画像の4分の1以上の大きさ)、あるいは小さ過ぎる矩形(幅と高さの両方が3画素以下)、縦横比が大きく違う矩形(幅/高さが15以上、または15分の1以下)は、文字矩形ではないとして除外する。
【0084】
図6の画像から得られる外接矩形は、図7に示すようになっている。
【0085】
▲7▼上記(7)の「文字抽出に適した2値画像の選択」
以後の処理の高速化とメモリの節約のため文字抽出に適した画像を選ぶ。その際には次の4点を考慮する。
【0086】
・矩形の分散
・矩形数
・画素密度
・平均矩形サイズ
各文字行は同じくらいの大きさの矩形からできているはずなので、各2値画像中の矩形の幅と高さの分散を計算し、その値が大き過ぎる画像については文字行を含んでいないと考え、以後の処理を行なわない。また、矩形数が多過ぎるものも、文字色を含んだ画像である可能性が低いので棄却する。各矩形ごとの黒及び白の画素密度が高過ぎたり低過ぎたりするものも、文字ではない可能性が高いので棄却する。なお、画素密度(density)とは
density=N/(w+h) …(19)
ここで、N:ラベルのついた画素数
w:矩形の幅
h:矩形の高さ
で表される値である。また、平均矩形サイズが小さ過ぎるものも文字を含んでいないとして棄却する。
【0087】
▲8▼上記(8)の「文字行の抽出」
文字矩形が含まれていると思われる2値画像が求まったら、文字列としての特徴を持った矩形を抽出するために、各矩形ごとに隣接する(対象矩形から一定距離内にある)矩形を求め、それをもとに矩形の連結(文字行として推定されるもの)を求める。この隣接矩形は対象矩形から見て次の条件を満たすものである。
【0088】
*対象矩形をその高さ(もしくは幅のどちらか大きい方)の0.7倍、上下左右に拡大した範囲に、一部、または全部含まれている(図11参照)。
【0089】
*対象矩形の中に完全に含まれてしまっていない。つまり、一部は含まれていても良い)〔図12(a)参照〕。
【0090】
*対象矩形と交差していない〔図12(b)参照〕。
【0091】
この条件を満たす矩形を対象矩形の隣接矩形とし、それらを次々と連結させて矩形の連なり、連結矩形を求める。この隣接矩形の連結条件は以下の通りである。
【0092】
*矩形の大きさが同じくらいである(幅及び高さが対象矩形の4分の1以上4倍以下、かつ幅もしくは高さのどちらかが対象矩形の2分の1以上2倍以下)。
【0093】
*それぞれの矩形の代表色が近い色である。
【0094】
*矩形がほぼ水平にならんでいる(矩形の左下の座標同士をみて、その角度θが水平から10°以内(図13参照)。
【0095】
上記の条件を満たす矩形を次々に連結させて、連結矩形を求める。
【0096】
このようにして求めた連結矩形の連結数が4以上であれば、その連結矩形は文字行の一部であるとみなす。そして、その連結矩形から文字行の幅と高さを推定する。
【0097】
推定される文字行の高さは、連結矩形の最上部と最下部を、もっとも高さの大きい矩形の高さの2分の1だけ広げた範囲である(図14参照)。幅は、先に求めた高さの範囲内で、連結矩形と同じくらいの大きさで近い色の矩形を求め、そのような矩形の存在する終端を図14に示すように延長した範囲とする。推定された文字行の範囲内に矩形の中心が存在し、その矩形の色が連結矩形の色に近いならば、それを文字の要素として抽出する。
【0098】
上記した通りに、いくつかのカラー文書画像に対して実験を行なった結果、その多くでほとんどの文字を抽出できた。図15は図6から文字を抽出した結果である。他にもいくつか実験結果を示す。図16、図17では、すべての文字が抽出されている。
【0099】
特に、ファジイクラスタリングを用いることにより、ハードクラスタリングを用いた時よりもいくつかの点で効果的に文字を抽出できるようになった。まず、全画素中で少数しか使われていない文字色は、ハード、ファジイの両クラスタリングでも背景との分離が困難である。この時、ハードクラスタリングではその文字を抽出することはまず不可能であるが、ファジイクラスタリングでは帰属度の違いにより背景より分離することが可能になることが多い。
【0100】
また、色空間の広い範囲に渡って色が使われている画像では、ハードクラスタリングは必要以上に色空間を分割してしまい、処理効率の悪化や背景パターンの誤抽出が起こりやすくなっていたが、ファジイクラスタリングではそれらは改善されている。逆に、使われている色数が少なく偏っていた場合には、ファジイクラスタリングの方が多くクラスタを生成する傾向がある。しかし、ファジイクラスタリングでは極端にクラスタ数が多くなることはなかったので、処理効率の点でも十分有用性があると言える。
【0101】
本発明の方法による文字抽出は、背景に複雑で多様な色が使われている時に特に有効である。シンプルな背景(模様がなく、単一色)の場合には、ハードクラスタリングや、従来の他の方法を用いても文字抽出が容易であり、メモリや処理速度の効率の点で本方法よりすぐれているものも多い。
【0102】
本発明の方法では、色ヒストグラムと画像の垂直座標を元にクラスタリングを行ない色分解画像を作成したが、本発明の方法だけでは、背景と文字色を完全に分離することは困難な場合もある。
【0103】
また、今後は横書きの文字だけでなく、縦書きの文字にも対応させていくことが考えられるので、その場合には本発明の方法のような垂直座標だけではうまく処理できない。そのような場合には、画像中の位置情報を現在以上にうまく利用したクラスタリングを考えることが必要である。
【0104】
なお、本発明は上記実施例に限定されるものではなく、本発明の趣旨に基づいて種々の変形が可能であり、それらを本発明の範囲から排除するものではない。
【0105】
【発明の効果】
以上、詳細に説明したように、本発明によれば、以下のような効果を奏することができる。
【0106】
(A)カラー文書画像からの文字抽出にあたり、ファジイクラスタリングを利用し、類似色をまとめることによって、複雑で多様な背景を持ったカラー文書画像から、文字色部分のみを抜き出すことができる。ファジイクラスタリングは、要素のクラスタヘの所属の程度を表す帰属度という値を持つクラスタリングアルゴリズムであり、これにより、微妙な色(背景と文字の中間色など)の所属の程度が分かるようになり、2値的な分類をするハードクラスタリングでは判断の難しい低画質の画像や、色彩の豊富な画像についてもそれなりに良好な結果が得られるようになった。
【0107】
(B)画素数の少ない色の分離が有効にできるようになったり、色彩の豊富な画像で必要以上にクラスタを生成しなくなった。本発明は、特に、複雑な背景で多彩な色を持つ画像に対して有効性が認められた。
【図面の簡単な説明】
【図1】本発明にかかるカラー文書画像からの文字抽出フローチャートである。
【図2】本発明にかかるスムージング処理例の説明図である。
【図3】本発明にかかる色空間の形状例を示す図である。
【図4】従来のハードクラスタリング例の結果を示す図である。
【図5】本発明にかかるファジイクラスタリング例を示す図である。
【図6】本発明にかかる入力画像例を示す図である。
【図7】本発明にかかる図6の入力画像の色分解画像を示す図である。
【図8】2値画像例を示す図である。
【図9】図8の2値画像のラベリングの説明図である。
【図10】図8の2値画像の外接矩形の説明図である。
【図11】本発明にかかる隣接矩形の説明図である。
【図12】本発明にかかる隣接矩形条件の説明図である。
【図13】本発明にかかる矩形同士の角度の説明図である。
【図14】本発明にかかる文字行の推定範囲の説明図である。
【図15】本発明にかかる図6の入力画像の文字抽出結果を示す図である。
【図16】本発明の実験結果(その1)を示す図である。
【図17】本発明の実験結果(その2)を示す図である。
【符号の説明】
1 ディザ法によって印刷されている文字
2 ディザが除かれた文字[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method for extracting characters from a color document image in which only the character color portion is extracted from the color document image having a complicated and diverse background.
[0002]
[Prior art]
In recent years, many optical character readers (OCR) have been studied. As a result, character recognition from printed matter has been performed with extremely high accuracy.
[0003]
However, these systems are all intended for binary (for example, black and white) printed matter, and there is no system for reading a color document.
[0004]
[1] M.M. Celenk, “A Color Clustering Technology for Image Segmentation”, Comput. Vision Graphics Image Process. 52, pp. 145-170 (1990)
[2] J. Liu and Y.M. H. Yang, “Multiresolution Color Image Segmentation”, IEEE Trans. Pattern Anal. Mach. Intell. 16, 7, pp. 689-700 (1994)
[3] S. H. Park, I. et al. D. Yun and S. U. Lee, "Color Image Segmentation based on 3-D Clustering: Morphological Approach", Pattern Recognition 31, 8, pp. 1061-1076 (1998)
[4] J. Ohya, A .; Shio and S. Akamatsu, “Recognition Characters in Scene Images”, IEEE Trans. Pattern Anal. Mach. Intell. 16, 2, pp. 214-220 (1994)
[5] Kenichi Matsuo, Michio Umeda, “Character string extraction from scene image by shading and color information” IEICE Technical Report, PRU92-121 (1992)
[6] Shuji Senda, Tadahiko Mino, Katsuo Ikeda, “Character Pattern Extraction Method from Color Image Focusing on Monochromaticity of Character Strings” IEICE Technical Report PRU94-29 (1994)
[7] Y. Zhong, K .; Karu and A.K. K. Jain, “Locating Text in Complex Color Images”, Pattern Recognition 28, 10, pp. 1523-1535 (1995)
[8] J. et al. C. Bezdek, “Pattern Recognition with Fuzzy Objective Function Algorithms”, Plenum Press (1981)
[0005]
[Problems to be solved by the invention]
Among the printed publications that are currently published, there are magazine-like publications that have a variety of colors and are written on a complex background. When character recognition is performed from such a color printed matter such as a magazine, it is necessary to find the character color from the background, unlike a printed matter that is printed in black on a white background.
[0006]
By the way, there have been several studies on color image area division in the past (the above documents [1], [2], [3]). There are also studies on character extraction from scene images as described in the above references [4] and [5]. However, the document [4] does not use the color information of the color image, and the document [5] is a study of a limited situation (only one character string in the image).
[0007]
Therefore, the above-mentioned documents [6] and [7] exist as methods for estimating the character color and extracting the character using the estimated character color.
[0008]
In the above document [6], colors are separated from the color histogram by clustering by the K-means method (K-means method), which is an algorithm close to the method of the present invention.
[0009]
However, the method of the present invention is a method using fuzzy clustering. Unlike hard clustering in which element affiliation is determined binary (whether it belongs or not), clustering that can discriminate to the degree of affiliation is used. ing.
[0010]
By using the degree of attribution obtained by this fuzzy clustering, it becomes possible to identify subtle colors for images that were difficult to discriminate by only binary classification. A method for extracting a character pattern from an image (binary image) decomposed for each color will also be described.
[0011]
In the present invention, a binarized color separation image is labeled, and a feature that seems to be an arrangement of characters is found from a circumscribed rectangle of the label. According to the method of the present invention, as long as each character in the same character string has the same color and is a single color, it can be extracted even if there are character strings of a plurality of colors in a plurality of lines. In addition, extraction is possible even if characters of various sizes are mixed.
[0012]
In view of the above situation, the present invention separates the background color and the character color of an image by clustering color information on the premise that the character string is written in a single color, even from complicated and diverse backgrounds. An object of the present invention is to provide a method for extracting characters from a color document image from which characters can be extracted.
[0013]
[Means for Solving the Problems]
  In order to achieve the above object, the present invention provides
  [1] A character extraction method from a color document image in which only a character color portion is extracted from a color document image having a complicated and diverse background, wherein (a) dither is removed from the color document image by smoothing. (B) The RGB color values of the image from which this dither is removed are converted to L*u*v*(C) Next, L*u*v*Fuzzy clustering including division and integration by dispersion of elements in the cluster, and annihilation by the number of belonging elements is performed on a four-dimensional space including not only the three dimensions but also the vertical coordinate (y coordinate) of the image. Thus, the degree of attribution indicating how much each color belongs to the cluster is obtained. (D) Next, based on the degree of attribution, a threshold value tiIs the number of elements ρ belonging to the clusteri (Total weighted attribution)In response to the,
Figure 0003923243
  In other words, a cluster with a large number of belonging elements is a background color that is used in a wide range of images. Therefore, in order to create a binary image that does not include character parts as much as possible, the threshold is increased, and conversely A cluster having a small number of characters is likely to be a character color, and a binary image, which is a color separation image that is set so that a threshold value is set low in order to extract it including a color blur, is created. (F) Next, black pixels and white pixels are labeled. (G) Next, a binary image suitable for character extraction is selected. (H) Next, character lines are extracted.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0016]
First, an outline of processing for character extraction from a color document image according to the present invention will be described.
[0017]
As a general flow, a color separation image is created, the binarized data is labeled, and a character string is extracted from a circumscribed rectangle surrounding the label. A feature of the method of the present invention is that, when creating a color separation image, color division is performed on color information of an input image using fuzzy clustering.
[0018]
The detailed processing flow is as follows, as shown in FIG.
[0019]
(1) First, dither is removed from the color document image by smoothing (step S1).
[0020]
(2) Next, RGB of the color value of the pixel is L*u*v*Conversion to F and histogram creation are performed (step S2).
[0021]
(3) Next, fuzzy clustering of color information is performed (step S3).
[0022]
(4) Next, a color separation image (binary image) is created based on the degree of attribution (step S4).
[0023]
(5) Next, noise is removed from the binary image (step S5).
[0024]
(6) Next, black pixels and white pixels are labeled (step S6).
[0025]
(7) Next, a binary image suitable for character extraction is selected (step S7).
[0026]
(8) Next, a character line is extracted (step S8).
[0027]
Next, a detailed algorithm in each process will be described.
[0028]
(1) “Removing dither by smoothing” in (1) above
By arranging three or four colors periodically, the dither method is expected to produce an effect that the colors are mixed. If there is a character printed by the dither method, it is difficult to satisfy the monochromaticity of the character as shown in FIG. In the above document [6], a method of reducing the influence of dither by performing smoothing is proposed. There, a method has been proposed in which only the weak edges of the image are averaged so that the outlines of characters are not blurred. In FIG. 2, 1 is a character printed by the dither method, and 2 is a character from which dither is removed.
[0029]
In the method of the present invention, the following equation is used to determine whether an edge is present.
[0030]
dimax = max (‖xj-Xk‖)… (1)
j, kεN = {coordinate i and its eight neighboring coordinates}
XiRepresents the color value of coordinate i
Expression (1) is the distance between the two color values that are farthest among the color values of a total of nine pixels, that is, the target pixel and the eight neighboring pixels. diIf max is within a certain value, it is considered not to be an edge, and averaging with 8 neighboring pixels is performed by the filter expressed by the equation (2).
[0031]
[Expression 1]
Figure 0003923243
[0032]
diIf max is greater than or equal to a certain value, it is assumed that the edge is included and averaging is not performed.
[0033]
By performing such smoothing processing, FIG. 2A becomes as shown in FIG.
(2) “Color value RGB to L” in (2) above*u*v*Conversion to Histogram and Histogram Creation ”CIE L*u*v*The color space is a uniform perceptual color space which is considered to be close to human color sense. Therefore, the color value expressed in RGB is set to L*u*v*Convert to The conversion formula is as follows.
[0034]
X = 0.478R + 0.299G + 0.175B (3)
Y = 0.263R + 0.655G + 0.051B (4)
Z = 0.020R + 0.160G + 0.908B (5)
L*= 25 (100 Y / Y0)1/3-16 (6)
u*= 13L (u'-u '0(7)
v*= 13L (v′−v ′0... (8)
u ′ = 4X / (X + 15Y + 3Z) (9)
v '= 9Y / (X + 15Y + 3Z) (10)
In many cases, RGB is data having a value of 0 to 255, but the data converted into a value of 0 to 1 is applied to the above formula.
[0035]
Y0= 1, u0= 0.201, v0= 0.461.
[0036]
Although there are some variations on the conversion formula from RGB to XYZ, the above formula is used in the present invention. This L*u*v*The color space is not a cube, L*, U*, V*The range of values taken by is also different. The image has a shape as shown in FIG. By the way, L*Takes a value between 0 and 116, u*Takes values from -97 to 171 and v*Takes a value of -128 to 109. FIG. 3A shows an RGB color space.
[0037]
A histogram is created from the color values obtained in this way and clustering is performed. In this system, it is assumed that all characters are written horizontally, and clustering is performed using the position information. So, L*u*v*Clustering is performed not only on the three-dimensional space but also on a four-dimensional space including the vertical coordinate (y-coordinate) of the image. This four-dimensional space is 17 × 45 × 40 × 10 (L*Is 17, u*Is 45, v*Is divided into 40, y-coordinate is 10), and a histogram is created.
[0038]
(3) “Fuzzy clustering of color information” in (3) above
Fuzzy clustering is performed on the color information of the input image to separate the colors. Fuzzy clustering differs from normal clustering called hard clustering in that elements are allowed to belong to a plurality of clusters little by little. In hard clustering, the presence / absence of an element belonging to a cluster is represented by 1 and 0 as shown in FIG. In fuzzy clustering, this is represented by a numerical value called the degree of membership of a value of 0 to 1 determined by the ratio of the distance to each cluster center (see FIG. 5). The degree of membership indicates how strongly the cluster has an influence on the element.
[0039]
As a result, it is possible to determine not only the binary determination as to whether or not to belong to a certain cluster, but also to the extent of the degree to which cluster it belongs.
[0040]
(3) -1: FCM will be described.
[0041]
As a typical fuzzy clustering, there is a fuzzy c-means method (FCM) by Bezdek et al., That is, the algorithm shown in the above document [8]. This is an algorithm extended by adding the idea of the degree of attribution to the K-means method. Here, the K-means method will be described. The K-means method is a clustering method when the number of clusters (K) is determined in advance. Here, first, an initial cluster center is appropriately given, and each element is assigned to the nearest cluster center. Thereafter, a new cluster center is calculated from the average value for each cluster, and a new cluster is obtained again. These operations are repeated until the cluster center does not change to obtain a final cluster.
[0042]
The FCM algorithm is briefly described as follows.
[0043]
Step 1: c initial cluster centers vi, (I = 1, 2,..., C) are appropriately determined.
[0044]
Step 2: All elements xk, (K = 1, ..., n)
[0045]
[Expression 2]
Figure 0003923243
[0046]
Ask for
Step 3: New cluster center
[0047]
[Equation 3]
Figure 0003923243
[0048]
Here, m is a weight value for the degree of attribution, and takes a value of 1 <m <∞. The larger the value of m, the larger the factor xkCluster center viThe effect on is increased. In equations (11) and (12), m → 1, uikIf ε {0,1} is set, this algorithm is the same as the normal K-means method.
[0049]
(3) -2: Self-convergence type fuzzy clustering
In the present invention, self-convergence type fuzzy clustering in which processing such as cluster division, integration, and annihilation is added to FCM, which is the most common fuzzy clustering, is used.
[0050]
The self-convergence type fuzzy clustering algorithm is as follows.
[0051]
Step 1: Initial value c of cluster number, membership weight m, convergence determination value ε, maximum number of iterations I, threshold value θ for cluster division conditionS, Cluster integration threshold θd, Threshold value of cluster extinction condition θCDecide.
[0052]
Step 2: Initial cluster center vi, (I = 1, 2,..., C).
[0053]
Step 3: Element xk= (XkL, Xku, Xkv, Xky), (K = 1,..., N) degree of attribution
[0054]
[Expression 4]
Figure 0003923243
[0055]
Ask for.
[0056]
Step 4: Distribute each cluster
[0057]
[Equation 5]
Figure 0003923243
[0058]
And sort.
[0059]
Step 5: σiIs θSDivide these clusters. The new cluster center after the division is
[0060]
[Formula 6]
Figure 0003923243
[0061]
(S1= {Xk| Xkq> Viq}, S2= {Xk| Xkq <viq} And q are those having the largest variance among L, u, v, and y)
Step 6: Distance between clusters is θdIntegrate the following clusters: Note that the new cluster center after integration is an intermediate point between the two cluster centers. Once the cluster is merged, recalculate the attribution of all elements.
[0062]
Step 7: Number of elements belonging to each cluster (weighted attribution total)
[0063]
[Expression 7]
Figure 0003923243
[0064]
Is θCMake the following clusters disappear, and calculate the membership of all elements again.
[0065]
Step 8: New cluster center
[0066]
[Equation 8]
Figure 0003923243
[0067]
Calculate
[0068]
[Equation 9]
Figure 0003923243
[0069]
Otherwise, return to step 4.
[0070]
There are a number of algorithms based on the K-means method that increase or decrease the number of clusters and self-converge. The method of the present invention is an extension of the self-convergence method used in hard clustering to fuzzy clustering. Differences from the original fuzzy clustering are the cluster division process in step 4 and step 5, the cluster integration process in step 6, and the cluster disappearance process in step 7.
[0071]
The cluster division process is performed by checking the size of cluster dispersion. A cluster with a large variance is divided into two. Next, when the clusters are close to each other (when the distance between the cluster centers is small), the two clusters are made one. Then, a cluster whose number of elements to which it belongs (total weighted membership) is reduced due to the change in the number of clusters or the like is eliminated.
[0072]
However, such a cluster number determination algorithm may not converge because the solution vibrates. Therefore, in order to suppress the vibration of the solution, it can be considered that the threshold value and the convergence condition are relaxed as the iteration proceeds.
[0073]
Each cluster and the degree of membership are calculated using fuzzy clustering that self-converges with an appropriate number of clusters, with such processing added.
[0074]
The data shown in the experimental results are the results calculated with the following initial values and threshold values.
[0075]
c = 1
m = 1.5
I = 10
ε = 1.0
θS= 8.0
θd= 3.0
θC= Total number of pixels / 100
As for the threshold, since the solution often vibrates, a method of relaxing the threshold as the iteration progresses was used. This value is an experimentally obtained value.
[0076]
(4) “Creation of color separation image (binary image) based on attribution” in (4) above
From the degree of attribution of each color obtained by fuzzy clustering, the degree of affiliation to the cluster can be known. A binary image is created based on the degree of attribution. Threshold t at that timeiIs the number of elements ρ belonging to the clusteriIt is determined by the following formula according to [Formula (16)].
[0077]
[Expression 10]
Figure 0003923243
[0078]
A cluster having a large number of belonging elements is considered to be a background color used in a wide range of the image, and the threshold value is increased to create a binary image that does not include a character portion as much as possible. Conversely, a cluster with a small number of elements belonging to it is highly likely to be a character color, and the threshold is lowered in order to extract it including the color blur.
[0079]
In this binarization process, only the y coordinate (the vertical coordinate of the pixel) is different.*, U*, V*For clusters having substantially the same value of, threshold values are processed as one by adding their respective degrees of attribution. Depending on the image, the color used in a wide range such as the background color may be divided into two by the y coordinate. In such a case, even if the two clusters are integrated and processed, the separation between the character color and the background color is hardly affected. Therefore, in order to reduce the number of binary images and improve the processing efficiency, the cluster Need to be integrated.
[0080]
In this way, a binary image as shown in FIG. 7 is created from the image of FIG.
[0081]
(5) “Denoise of binary image” in (5) above
In the created binary image, dither that cannot be absorbed by the smoothing process, isolated points on the background, and the like appear as noise. Specifically, the number of connected pixels is small. Depending on the resolution of the image, how many connections are used as noise varies. These are removed to reduce the amount of memory used and increase the processing speed in the next labeling process and subsequent extraction of character lines.
[0082]
(6) “Labeling of black pixels and own pixels” in (6) above
Labeling is an operation of assigning the same label (number) to all pixels belonging to the same connected component and assigning different labels to different connected components. Labeling is performed for both black pixels and white pixels of the binarized image, and a circumscribed rectangle is obtained for each connected component. A binary image as shown in FIG. 8 is labeled as shown in FIGS. 9 (a) and 9 (b). Here, labeling is performed with four connections. Then, characters are extracted based on a rectangle (a circumscribed rectangle) surrounding the connected components having the same label.
[0083]
10A and 10B are circumscribed rectangles for the black pixel and white pixel labels in FIG. At this time, a rectangle that is too large (more than a quarter of the input image), a rectangle that is too small (both width and height are 3 pixels or less), and a rectangle with a greatly different aspect ratio (width / height of 15) The above or less than 1/15) is excluded because it is not a character rectangle.
[0084]
The circumscribed rectangle obtained from the image of FIG. 6 is as shown in FIG.
[0085]
(7) “Selecting a binary image suitable for character extraction” in (7) above
Select an image suitable for character extraction to speed up subsequent processing and save memory. In that case, the following four points are considered.
[0086]
・ Rectangle distribution
・ Number of rectangles
・ Pixel density
・ Average rectangle size
Since each character line should be made up of rectangles of the same size, calculate the variance of the width and height of the rectangles in each binary image, and images that are too large will not contain character lines The subsequent processing is not performed. In addition, an image having too many rectangles is rejected because it is unlikely that the image includes a character color. Any black and white pixel density that is too high or too low for each rectangle is rejected because it is highly possible that it is not a character. What is pixel density?
density = N / (w + h) (19)
Where N is the number of labeled pixels
w: width of the rectangle
h: Height of the rectangle
It is a value represented by In addition, an object whose average rectangle size is too small is rejected as not including characters.
[0087]
(8) “Character line extraction” in (8) above
When a binary image that seems to contain character rectangles is obtained, adjacent rectangles (within a certain distance from the target rectangle) are extracted for each rectangle in order to extract rectangles having characteristics as character strings. Find a rectangle concatenation (estimated as a character line) based on it. This adjacent rectangle satisfies the following condition when viewed from the target rectangle.
[0088]
* The target rectangle is partially or wholly included in a range enlarged 0.7 times the height (or width, whichever is greater), vertically and horizontally (see FIG. 11).
[0089]
* It is not completely contained in the target rectangle. That is, a part may be included) [see FIG.
[0090]
* It does not intersect with the target rectangle [see FIG. 12 (b)].
[0091]
A rectangle satisfying this condition is set as an adjacent rectangle of the target rectangle, and the rectangles are connected one after another to obtain a connected rectangle. The conditions for connecting the adjacent rectangles are as follows.
[0092]
* The size of the rectangle is about the same (width and height are 1/4 or more and 4 or less times that of the target rectangle, and either the width or height is 1/2 or more and 2 times or less that of the target rectangle).
[0093]
* The representative colors of each rectangle are close to each other.
[0094]
* The rectangles are almost horizontal (the angle θ is within 10 ° from the horizontal when viewing the lower left coordinates of the rectangles (see FIG. 13).
[0095]
The rectangles satisfying the above conditions are connected one after another to obtain a connected rectangle.
[0096]
If the number of connected rectangles obtained in this way is 4 or more, the connected rectangle is regarded as a part of a character line. Then, the width and height of the character line are estimated from the connected rectangle.
[0097]
The estimated height of the character line is a range in which the uppermost part and the lowermost part of the connected rectangle are expanded by one half of the height of the largest rectangle (see FIG. 14). The width is within the range of the height previously obtained, and a rectangle of the same color as the connected rectangle is obtained, and the end where such a rectangle exists is extended as shown in FIG. . If the center of the rectangle exists within the estimated range of the character line and the color of the rectangle is close to the color of the connected rectangle, it is extracted as a character element.
[0098]
As described above, as a result of experiments on several color document images, most of the characters could be extracted. FIG. 15 shows the result of extracting characters from FIG. Several other experimental results are shown. In FIG. 16 and FIG. 17, all characters are extracted.
[0099]
In particular, by using fuzzy clustering, characters can be extracted more effectively at several points than when using hard clustering. First, character colors that are used only in a small number in all pixels are difficult to separate from the background even in both hard and fuzzy clustering. At this time, it is impossible to extract the characters by hard clustering, but in fuzzy clustering, it is often possible to separate the characters from the background due to the difference in the degree of attribution.
[0100]
In addition, in an image in which colors are used over a wide range of color space, hard clustering divides the color space more than necessary, which tends to cause deterioration in processing efficiency and erroneous background pattern extraction. In fuzzy clustering, they are improved. Conversely, when the number of colors used is small and biased, fuzzy clustering tends to generate more clusters. However, in fuzzy clustering, the number of clusters did not increase extremely, so it can be said that it is sufficiently useful in terms of processing efficiency.
[0101]
Character extraction by the method of the present invention is particularly effective when complex and diverse colors are used in the background. In the case of a simple background (no pattern, single color), it is easy to extract characters using hard clustering or other conventional methods, which is superior to this method in terms of memory and processing speed efficiency. There are many that are.
[0102]
In the method of the present invention, a color separation image is created by performing clustering based on the color histogram and the vertical coordinates of the image. However, it may be difficult to completely separate the background and the character color only by the method of the present invention. .
[0103]
Further, in the future, it is conceivable to support not only horizontally written characters but also vertically written characters. In such a case, processing cannot be performed well only by the vertical coordinates as in the method of the present invention. In such a case, it is necessary to consider clustering that uses position information in an image more effectively than at present.
[0104]
In addition, this invention is not limited to the said Example, A various deformation | transformation is possible based on the meaning of this invention, and they are not excluded from the scope of the present invention.
[0105]
【The invention's effect】
As described above in detail, according to the present invention, the following effects can be obtained.
[0106]
(A) When extracting characters from a color document image, fuzzy clustering is used to group similar colors, so that only a character color portion can be extracted from a color document image having a complex and diverse background. Fuzzy clustering is a clustering algorithm that has a value called the degree of membership that represents the degree of affiliation to the cluster of elements. By this, the degree of affiliation of subtle colors (such as the intermediate color between the background and characters) can be understood and binary. As a result, good results can be obtained even for low-quality images that are difficult to judge by hard clustering, and images with abundant colors.
[0107]
(B) Separation of colors with a small number of pixels can be effectively performed, and clusters are not generated more than necessary in a rich image. The present invention has been found to be particularly effective for images having various colors with complex backgrounds.
[Brief description of the drawings]
FIG. 1 is a flowchart of character extraction from a color document image according to the present invention.
FIG. 2 is an explanatory diagram of an example of smoothing processing according to the present invention.
FIG. 3 is a diagram illustrating a shape example of a color space according to the present invention.
FIG. 4 is a diagram illustrating a result of a conventional hard clustering example.
FIG. 5 is a diagram showing an example of fuzzy clustering according to the present invention.
FIG. 6 is a diagram showing an example of an input image according to the present invention.
7 is a diagram showing a color separation image of the input image of FIG. 6 according to the present invention.
FIG. 8 is a diagram illustrating an example of a binary image.
FIG. 9 is an explanatory diagram of labeling of the binary image in FIG.
10 is an explanatory diagram of a circumscribed rectangle of the binary image in FIG. 8. FIG.
FIG. 11 is an explanatory diagram of adjacent rectangles according to the present invention.
FIG. 12 is an explanatory diagram of adjacent rectangle conditions according to the present invention.
FIG. 13 is an explanatory diagram of angles between rectangles according to the present invention.
FIG. 14 is an explanatory diagram of an estimated range of character lines according to the present invention.
15 is a diagram showing a character extraction result of the input image of FIG. 6 according to the present invention.
FIG. 16 is a diagram showing an experimental result (No. 1) of the present invention.
FIG. 17 is a diagram showing an experimental result (No. 2) of the present invention.
[Explanation of symbols]
1 Characters printed by the dither method
2 Characters without dither

Claims (1)

複雑で多様な背景を持ったカラー文書画像から文字色部分のみを抜き出すようにしたカラー文書画像からの文字抽出方法であって、
(a)前記カラー文書画像からスムージングによるディザの除去を行い、
(b)該ディザの除去を行った画像の色値のRGBからL* * * ヘの変換とヒストグラム作成を行い、
(c)次に、前記L* * * の3次元だけでなく、画像の垂直方向の座標(y座標)も加えた4次元の空間に対して、クラスタ内の要素の分散による分割、統合、所属要素数による消滅を含むファジイクラスタリングを行うことにより、各色がそのクラスタにどの程度属しているかを示す帰属度を求め、
(d)次に、前記帰属度を基に閾値ti は、そのクラスタに所属する要素の数(重みつき帰属度合計)ρi に応じて、
Figure 0003923243
つまり、所属する要素の数が多いクラスタは画像の広い範囲で使われる背景の色であるので、なるべく文字部分を含まない2値画像を作成するために閾値を高くし、逆に、所属する要素の数が少ないクラスタは文字色である可能性が高く、色のにじみも含めて抽出するために閾値は低くするように設定する色分解画像である2値画像の作成を行い、
(e)次に、前記2値画像のノイズを除去し、
(f)次に、黒画素および白画素のラベリングを行い、
(g)次に、文字抽出に適した2値画像の選択を行い、
(h)次に、文字行の抽出を行うことを特徴とするカラー文書画像からの文字抽出方法。
A method for extracting characters from a color document image in which only a character color portion is extracted from a color document image having a complicated and diverse background,
(A) performing dither removal by smoothing from the color document image;
(B) The color value of the image from which the dither has been removed is converted from RGB to L * u * v * and a histogram is created.
(C) Next, a four-dimensional space including not only the three-dimensional L * u * v * but also the vertical coordinate (y-coordinate) of the image is divided by dispersion of elements in the cluster. By performing fuzzy clustering including integration and disappearance by the number of belonging elements, the degree of belonging indicating how much each color belongs to the cluster is obtained,
(D) Next, based on the degree of attribution, the threshold value t i depends on the number of elements belonging to the cluster (weighted degree of attribution total) ρ i ,
Figure 0003923243
In other words, a cluster with a large number of belonging elements is a background color that is used in a wide range of images. Therefore, in order to create a binary image that does not include character parts as much as possible, the threshold is increased, and conversely, the belonging elements A cluster with a small number of characters is likely to be a character color, and a binary image that is a color separation image that is set so that a threshold value is set to be low in order to extract including a color blur is created.
(E) Next, noise of the binary image is removed,
(F) Next, black pixels and white pixels are labeled,
(G) Next, a binary image suitable for character extraction is selected,
(H) Next, a method for extracting characters from a color document image, wherein character lines are extracted.
JP2000222063A 2000-07-24 2000-07-24 Character extraction method from color document image Expired - Fee Related JP3923243B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000222063A JP3923243B2 (en) 2000-07-24 2000-07-24 Character extraction method from color document image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000222063A JP3923243B2 (en) 2000-07-24 2000-07-24 Character extraction method from color document image

Publications (2)

Publication Number Publication Date
JP2002042055A JP2002042055A (en) 2002-02-08
JP3923243B2 true JP3923243B2 (en) 2007-05-30

Family

ID=18716368

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000222063A Expired - Fee Related JP3923243B2 (en) 2000-07-24 2000-07-24 Character extraction method from color document image

Country Status (1)

Country Link
JP (1) JP3923243B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004062385A (en) * 2002-07-26 2004-02-26 Ricoh Co Ltd Method for recognizing character, program to be used for execution of the method and character recognition device
JP2005122609A (en) * 2003-10-20 2005-05-12 Mitsubishi Electric Corp Device for recognizing photographed object
JP2006053690A (en) * 2004-08-10 2006-02-23 Ricoh Co Ltd Image processing device, image processing method, image processing program, and recording medium
US20090274377A1 (en) * 2005-11-11 2009-11-05 Japan Advanced Institute Of Science And Technology Clustering System and Image Processing System Having the Same
US8320674B2 (en) * 2008-09-03 2012-11-27 Sony Corporation Text localization for image and video OCR
US8693743B1 (en) 2010-02-19 2014-04-08 Olive Tree Media, LLC Analysis and display of multiple biomarker co-expression in cells and tissues
JP6092024B2 (en) * 2013-07-03 2017-03-08 日本電信電話株式会社 Character recognition apparatus, method, and program
JP6578854B2 (en) * 2015-09-29 2019-09-25 ブラザー工業株式会社 Image reading apparatus and program
JP7134045B2 (en) * 2018-09-26 2022-09-09 キヤノン株式会社 Image processing device, image processing method, and program
JP7464252B2 (en) 2020-02-13 2024-04-09 i-PRO株式会社 License plate image correction method, license plate image correction program, passport image correction method, and passport image correction program

Also Published As

Publication number Publication date
JP2002042055A (en) 2002-02-08

Similar Documents

Publication Publication Date Title
Lee et al. Multiple random walkers and their application to image cosegmentation
CN110032942B (en) Action identification method based on time domain segmentation and feature difference
US11120556B2 (en) Iterative method for salient foreground detection and multi-object segmentation
US6993185B2 (en) Method of texture-based color document segmentation
CN104751142B (en) A kind of natural scene Method for text detection based on stroke feature
US6996272B2 (en) Apparatus and method for removing background on visual
US7440638B2 (en) Image retrieving system, image classifying system, image retrieving program, image classifying program, image retrieving method and image classifying method
CN108537239B (en) Method for detecting image saliency target
JP2003515230A (en) Method and system for separating categorizable symbols of video stream
CN110866896B (en) Image saliency target detection method based on k-means and level set super-pixel segmentation
JP2003016448A (en) Event clustering of images using foreground/background segmentation
JP3923243B2 (en) Character extraction method from color document image
CN109086777A (en) A kind of notable figure fining method based on global pixel characteristic
CN108038458B (en) Method for automatically acquiring outdoor scene text in video based on characteristic abstract diagram
CN108710883A (en) A kind of complete conspicuousness object detecting method using contour detecting
CN109299702B (en) Human behavior recognition method and system based on depth space-time diagram
Murphy-Chutorian et al. N-tree Disjoint-Set Forests for Maximally Stable Extremal Regions.
CN107368826B (en) Method and apparatus for text detection
Youlian et al. Face detection method using template feature and skin color feature in rgb color space
Dai et al. Scene text detection based on enhanced multi-channels MSER and a fast text grouping process
CN110807747A (en) Document image noise reduction method based on foreground mask
CN109800758A (en) A kind of natural scene character detecting method of maximum region detection
Tehsin et al. Survey of region-based text extraction techniques for efficient indexing of image/video retrieval
Vu et al. Automatic extraction of text regions from document images by multilevel thresholding and k-means clustering
Chan et al. Using colour features to block dubious images

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060817

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060829

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061023

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061212

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061225

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070221

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees