[go: up one dir, main page]

JP4366011B2 - Document processing apparatus and method - Google Patents

Document processing apparatus and method Download PDF

Info

Publication number
JP4366011B2
JP4366011B2 JP2000388887A JP2000388887A JP4366011B2 JP 4366011 B2 JP4366011 B2 JP 4366011B2 JP 2000388887 A JP2000388887 A JP 2000388887A JP 2000388887 A JP2000388887 A JP 2000388887A JP 4366011 B2 JP4366011 B2 JP 4366011B2
Authority
JP
Japan
Prior art keywords
image
area
region
luminance
binary
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
JP2000388887A
Other languages
Japanese (ja)
Other versions
JP2002190957A5 (en
JP2002190957A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2000388887A priority Critical patent/JP4366011B2/en
Priority to US10/013,675 priority patent/US7170647B2/en
Publication of JP2002190957A publication Critical patent/JP2002190957A/en
Publication of JP2002190957A5 publication Critical patent/JP2002190957A5/ja
Application granted granted Critical
Publication of JP4366011B2 publication Critical patent/JP4366011B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Character Input (AREA)
  • Color Image Communication Systems (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、文書の電子化処理を行うための文書処理装置及び方法に関し、特に文書の電子化処理に際して実行される像域分離処理に関する。
【0002】
【従来の技術】
近年、情報の電子化が進み、文書を紙ではなく電子化して保存、あるいは送信するという需要が高まっている。特に、蓄積メディアの低価格化、および通信帯域の増大により、電子化の対象となる文書は白黒2値のものから、フルカラーの文書へと広がりつつある。
【0003】
ここでいう文書の電子化とは、単に紙文書をスキャナなどにより光電変換し、画像データ化することのみにとどまらず、記載されている内容を認識して、文書を構成するテキスト、記号、図、写真、表などそれぞれ性質の異なる領域に分割し、文字部は文字コード情報、図はベクトルデータ、写真は画像データ、表は構造データ、といったように各々最も適した形態でデータ化する処理のことを指す。
【0004】
そのような文書の電子化処理の第1段階として行われるのが、1頁の文書画像に書かれた内容を分析し、文字や図、写真、表など異なる性質の部分要素に分割する処理、すなわち領域分割処理である。図25は領域分割の一例を示す図である。
【0005】
このような領域分割処理の実現例としては、米国特許第5680478号の“Methodand Apparatus for character recognition”(Shin-Ywangら/CanonK.K)などが挙げられる。この例では、文書画像中の黒画素の8連結輪郭塊、白画素の4連結輪郭塊の集合を抽出し、その形状、大きさ、集合状態などから、文字領域、絵や図、表、枠、線といった文書に特徴的な領域を抽出している。図25の例では、文字領域(ブロック1、3、4、6)、絵や図領域(ブロック2)、表領域(ブロック5)、枠、線(7)といった文書に特徴的な領域を抽出している。
【0006】
ここで、黒画素の8連結輪郭塊(以下、黒画素塊)とは、図14のように、ある黒画素から8方向のいずれかで連結している黒画素の集合体である。また、白画素の4連結輪郭塊(以下、白画素塊)とは、図16のようにある白画素から4方向のいずれかで連結している白画素の集合体を指す。
【0007】
上述の領域分割処理は、その動作原理より、入力となる文書画像が白黒2値であることが前提となる。従って、この技術を利用してカラー文書の領域分割を行うためには、あらかじめ文書画像の2値化を行う必要がある。一般にカラー画像の2値化は、画素の輝度分布から閾値を求め、画像の各画素を、前出の輝度閾値を境に白又は黒の画素へと変換することで行われる。
【0008】
【発明が解決しようとする課題】
カラー画像の2値化のための閾値の求め方には、全画面単一で求める方法と、領域毎に求める方法が考えられる。本出願人による特願平11−238581号にて提案されている2値化方法では、入力原稿の内容に応じて、領域毎に動的に最適な閾値を求め、これを用いることで領域毎に最適な2値化が行われる。特に低輝度下地上の高輝度文字と、高輝度下地上の低輝度文字が混在するカラー画像から、それらすべてが白地上の黒文字に自動的に変換されるような2値化を可能とし、領域分割処理の入力として最適な2値画像を得ることが可能である。
【0009】
図24は先に提案された2値化手法によって色付きの下地を含む文書に領域分離を行った様子を説明する図である。図24において、カラーの文書2301は、下半分に濃い色付の下地領域があり、その上に薄い色の文字が載っているものとし、それ以外は薄い色の下地に濃い色の文字となっているものとする。この様な文書においては、上半分と下半分は意味的に分離しているであろうことが理解できる。
【0010】
文書2301のようなカラー文書に対して、前述の2値化方式で2値化を行うと、図24の2302で示されるような2値画像が生成される。2値画像2302では、下地は除去されてすべて白画素になり、文字はすべて黒画素になっている。このとき、2値画像2302に対し従来通り領域分割処理を行うと、図24中2303のような結果が得られる、画面の下半分に存在した下地付の領域の情報が欠落しているために、本来TEXT1およびTEXT2はそれぞれ中央で2つに分離すべきなのにもかかわらず、結合してしまっている。
【0011】
つまり、本来カラー画像の持っている下地色による文字領域の範囲指定情報は2値化の際に失われてしまう。
【0012】
本発明は上記の問題に鑑みてなされたものであり、色によって表された領域の区別を維持した領域分割を可能にすることを目的とする。
【0013】
【課題を解決するための手段】
上記の目的を達成するための本発明の一態様による文書処理装置は、
輝度画像を2値化するための閾値を複数決定する第1決定手段と、
前記第1決定手段で決定された複数の閾値それぞれを用いて前記輝度画像を2値化することにより、複数の2値画像を取得する取得手段と、
前記取得手段で取得した複数の2値画像それぞれに含まれる黒画素の連結成分の領域に基づいて、下地の輝度が異なる各領域の位置と大きさ示す領域情報を生成する生成手段と、
前記輝度画像における前記領域情報で示される各領域について、輝度値の反転を行うか否かを決定する第2決定手段と、
前記輝度画像における前記領域情報で示される各領域について、当該各領域を2値化するための閾値をそれぞれ設定する設定手段と、
前記輝度画像における前記領域情報で示される各領域について、前記第2決定手段で反転を行うと決定された領域に関しては、輝度値を反転した前記輝度画像内の対応する領域を、前記設定手段で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得し、一方、前記第2決定手段で反転を行わないと決定された領域に関しては、輝度値を反転していない前記輝度画像内の対応する領域を、前記設定手段で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得する2値部分画像取得手段と、
前記輝度画像の全面を所定閾値で2値化して得られる2値画像における対応する領域に、前記2値部分画像取得手段で取得した各領域の2値部分画像を上書きすることにより、前記輝度画像に関する第2の2値画像を得る2値化手段と、
前記2値化手段で得られた第2の2値画像から文書要素を抽出し、前記生成手段で生成された領域情報で示される各領域を枠の要素とし、前記文書要素と枠の要素とに基づいて木構造を得て、当該木構造に基づいて前記輝度画像の領域分割を行う分割処理手段とを備え、
前記分割処理手段で得る木構造は、前記抽出した文書要素のうち前記領域情報で示される各領域に含まれる文書要素を当該各領域に対応する枠の要素の子孫にした木構造である
【0014】
また、上記の目的を達成するための本発明の文書処理方法は、
第1決定手段が、輝度画像を2値化するための閾値を複数決定する第1決定工程と、
取得手段が、前記第1決定工程で決定された複数の閾値それぞれを用いて前記輝度画像を2値化することにより、複数の2値画像を取得する取得工程と、
生成手段が、前記取得工程で取得した複数の2値画像それぞれに含まれる黒画素の連結成分の領域に基づいて、下地の輝度が異なる各領域の位置と大きさ示す領域情報を生成する生成工程と、
第2決定手段が、前記輝度画像における前記領域情報で示される各領域について、輝度値の反転を行うか否かを決定する第2決定工程と、
設定手段が、前記輝度画像における前記領域情報で示される各領域について、当該各領域を2値化するための閾値をそれぞれ設定する設定工程と、
2値部分画像取得手段が、前記輝度画像における前記領域情報で示される各領域について、前記第2決定工程で反転を行うと決定された領域に関しては、輝度値を反転した前記輝度画像内の対応する領域を、前記設定工程で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得し、一方、前記第2決定工程で反転を行わないと決定された領域に関しては、輝度値を反転していない前記輝度画像内の対応する領域を、前記設定工程で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得する2値部分画像取得工程と、
2値化手段が、前記輝度画像の全面を所定閾値で2値化して得られる2値画像における対応する領域に、前記2値部分画像取得工程で取得した各領域の2値部分画像を上書きすることにより、前記輝度画像に関する第2の2値画像を得る2値化工程と、
分割処理手段が、前記2値化工程で得られた第2の2値画像から文書要素を抽出し、前記生成工程で生成された領域情報で示される各領域を枠の要素とし、前記文書要素と枠の要素とに基づいて木構造を得て、当該木構造に基づいて前記輝度画像の領域分割を行う分割処理工程とを有し、
前記分割処理工程で得る木構造は、前記抽出した文書要素のうち前記領域情報で示される各領域に含まれる文書要素を当該各領域に対応する枠の要素の子孫にした木構造である
【0015】
【発明の実施の形態】
以下、添付の図面を参照して本発明の好適な実施形態を説明する。
【0016】
図1は本実施形態による文書処理装置の装置概観を示す図である。図1において、101はコンピュータ装置であり、添付のフローチャートを参照して以下で説明する処理を実現するためのプログラムを含む、文書の電子化処理プログラムを実行する。コンピュータ装置101は、ユーザに状況や画像を表示するためのディスプレイ装置102、およびユーザの操作を受け付けるキーボードやマウス等のポインティングデバイスを含んで構成される入力装置103が付随する。ディスプレイ102表示デバイスとしては、CRTやLCD等が用いられる。104はスキャナ装置であり、文書画像を光学的に読み取り、電子化し、得られた画像データをコンピュータ装置101に送る。本実施形態では、カラースキャナを用いる。
【0017】
図2は本実施形態による文書処理装置の構成を示すブロック図である。図1において、201はCPUであり、ROM202或いはRAM203に格納された制御プログラムを実行することにより、後述の電子化処理を含む各種機能を実現する。202はROMであり、CPU201によって実行される各種制御プログラムやデータが格納される。203はRAMであり、CPU201によって実行される各種制御プログラムを格納したり、CPU201が各種処理を実行するのに必要な作業領域を提供する。204は外部記憶装置であり、添付のフローチャートを参照して説明する処理をCPU101によって実現するための制御プログラムや、画像入力装置104を読み取って得られた文書画像データ等を格納する。205はコンピュータバスであり、上述の各構成を接続する。
【0018】
図3は本実施形態の文書処理装置による文書の電子化処理の概要を示す図である。本実施形態による電子化処理の流れは、まず入力部301において電子化の対象とするカラー文書をスキャナ104を用いて読み込み、文書を画像データとして外部記憶装置204に格納する。次に、2値化部302において、後段の領域分割処理のために外部記憶装置204に格納された文書画像データに対して2値化処理を施す。領域分割部303では、2値化部302で得られた2値画像から、文字、図、表、枠、線などの要素を抽出し、各領域に分割する。電子化文書作成部304は、分割された各要素毎の属性に基づいて文字認識データや用いたり表構造データを用いたりして電子化文書を作成する。出力部305は生成された電子化文書を外部記憶装置204に格納する。なお、出力部305における出力の形態は外部記憶装置204への格納に限られるものではなく、ディスプレイ102へ表示出力したり、不図示のネットワークインターフェースを介してネットワーク上の他の装置へ出力したり、不図示のプリンタへ出力したりすることも可能である。
【0019】
以下、図3に示した2値化部302の動作について図面参照して説明する。図4は本実施形態による2値化処理を説明するフローチャートである。また、図5は本実施形態の説明に用いるカラー文書画像の例を示す図である。なお、図5に示すカラー文書画像は、3つの下地色(下地A501、下地B502、下地C503)を含み、下地A501の部分が白、下地B502の部分が黄色、下地C503の部分が青であるとする。一方、文字色は、文字列A504,文字列B505が共に黒、文字列C506は白である。
【0020】
まず、ステップS401にて処理対象のカラー文書画像を輝度画像に変換する。ここでは一般的に元画像のカラー形式をRGB形式、輝度画像は1画素あたり0〜255のグレイスケール形式とし、各画素の輝度Yは元画像の画素値R,G,Bに対し、Y=0.299R+0.587G+0.114Bによって求めることにするが、他の形式/変換式を用いてもよいことはもちろんである。これにより図5の下地色A501,下地色B502,下地色C503の各部分の輝度はそれぞれ255,200,40(実際は紙面状態や光電変換時のばらつきによって、同じ下地色であっても位置によって輝度値がばらつく。したがって、図6のようなヒストグラム曲線の山は、ある程度の幅を有することになる)へと変換される。
【0021】
次に、ステップS402にて、ステップS401で得られた輝度画像データのヒストグラムをとる。図6は図5に示したカラー画像から得られる輝度値のヒストグラムを示す図である。ヒストグラムが得られたならば、ステップS403において、そのヒストグラムから複数の閾値を決定する。例えば図6に示したヒストグラムからは、t1,t2の2個の閾値が抽出される。
【0022】
この複数の閾値t1,t2は例えば以下のような手順で決定できる。ヒストグラムの輝度値255(白)から0(黒)まで参照する。参照した輝度値から閾値を選択する条件は、例えば、以下の各条件を設定する。
【0023】
条件1:当該ヒストグラム曲線において、現在の参照点と、その参照点から横軸の輝度値の大きい方向に例えば10画素分だけさかのぼった点との間に含まれる合計度数(面積)が、所定の第1の値より大きい。
【0024】
条件2:当該ヒストグラム曲線における縦軸の度数の急激な減少が発生(例えば「所定の第1の傾きより大」が1回、または「所定の第2の傾きより大」が連続して2回発生)。
【0025】
条件3:当該ヒストグラム曲線の緩い減少、または上昇が発生(所定の第3の傾きより小)。
【0026】
本実施形態において、図6に示すt1、t2の各点は、上記の各条件のうち、「条件1」が満足された後に「条件2」が満足され、その後更に「条件3」が満足された結果として検出した。尚、参照点は、当該ヒストグラム曲線を所定の間隔で参照するようにしてもよい。また、本実施形態では以上のような条件を用いたが、閾値の決定はこれに限るものではない。例えば更に以下のような条件4〜6を同時に満たす場合を閾値として選択しても良い。
【0027】
条件4:当該ヒストグラム曲線において、現在の参照点と、その参照点から横軸の輝度値の大きい方向に例えば40画素さかのぼった点との間に含まれる合計度数(面積)が、所定の第2の値より大きい。
【0028】
条件5:当該ヒストグラム曲線上の現在の参照点における縦軸の度数が、所定の第3の値より小さい。
【0029】
条件6:当該ヒストグラム曲線において、現在の参照点と、その参照点から横軸の輝度値の大きい方向に例えば20画素さかのぼった点におけるヒストグラム値が、所定の第4の値より大きい。
【0030】
ステップS404にて、各閾値から複数の2値画像を作成する。これらはテンポラリの2値画像である。本例では、閾値t1で2値化することにより、図7の(a)に示す2値画像701が、閾値t2で2値化することにより図7の(b)に示す2値画像702が生成される。ここで、領域703及び704はそれぞれ図5に示す下地B502、C503の領域である。閾値t1では下地B502と下地C503の部分も黒となり、閾値t2では、下地502の部分は白となり、下地C503の部分は黒となる。
【0031】
次に、ステップS405にて、ステップS404で得られた各2値画像中の黒領域を抽出し、これを下地色の異なる領域を示す領域情報として記録する。これは、2値画像上の黒画素の連結成分を追跡して、一定の大きさ以上となる四角形の領域を抽出する処理である。図7の例では、2値画像701より領域703が、2値画像702より領域704がそれぞれ抽出される。
【0032】
次に、ステップS406にて、ステップS405で抽出した各領域内の解析を行う。ここでは、ステップS401で得られた輝度画像より、ステップS405で抽出された各領域の範囲を切り出し、各範囲毎に輝度値のヒストグラムをとり、このヒストグラムから各領域について輝度値の反転が必要か否か判断し、必要な場合は輝度値を反転する。更に、このヒストグラムから各領域内に最適な2値化閾値を、図6と同様にして求める(ただし、対象とする領域の大きさが小さくなるので判断に用いる所定の値は異なる)。求められた2値化閾値及び反転情報は、各領域情報に付随するように出力される。尚、反転が必要か否かは、例えば以下に示す計算式により、ヒストグラムの平均値(average)とそのスキュー(skew)とを求めて判断できる。
【0033】
(average)=Σip(i),
σ2=Σ(i-av)2p(i),
(skew)=1/σ2Σ(i-av)3p(i),
但し、Σip(i)は、ip(i)のi=0からi=255までの場合の総和、p(i)は確率密度、avは平均値を表わす。
【0034】
このスキューの絶対値がしきい値より大きいときには、その領域は文字を含むと判断し、更に文字を含むと判断されて且つスキューが正のときには、領域の画像を反転すべきと判断して反転フラグがyesになる。
【0035】
本例では、領域703より図8に示されるヒストグラムが求められて反転必要なしと判断されて該ヒストグラムから閾値t21が求められる。さらに、領域704より図9に示されるヒストグラムが求められて反転必要ありと判断され、図9のヒストグラムを反転して閾値t22が求められる(尚、図9は反転前のヒストグラムを表し、閾値t22は反転前のヒストグラムの対応する値として示している)。そして、図10に示すように、それぞれの領域毎に、座標値と2値化閾値、反転情報を1組とした領域情報が記憶される。
【0036】
本例では、領域703に対する領域情報1001は、座標値として矩形の左端のx座標l1、右端のx座標r1、上端のt1、下端のb1を、2値化閾値として図8のヒストグラムから求まった閾値t21を、反転情報として反転無し(no)を有する。同様に、領域704に対する領域情報1002は、座標値として矩形の左端のx座標l2、右端のx座標r2、上端のt2、下端のb2を、2値化閾値として図9のヒストグラムから求まった閾値t22を、反転情報として反転有り(yes)を有する。
【0037】
次いで、ステップS407にて、ステップS406で得られた領域情報を基に、ステップS401で得た輝度画像から最終的な2値画像を生成する。本例によれば、
(1)全面を閾値t1で2値化して2値画像701を得る。
(2)2値画像701上の領域703の部分の輝度画像について、領域情報1001の内容にしたがって処理(この場合閾値(t21)で2値化)を行い、得られた画像を領域703の部分に上書きする。この結果、2値画像702が得られる。
(3)領域704については、対応する領域情報1002が反転有りを示すので、領域704の部分の輝度画像について反転処理を行い、閾値t22を用いて2値化して得られた画像を領域704の部分に上書きする。この結果、図5に示したカラー画像から図11に示すような最終2値画像が得られることになる。
【0038】
次に、以上のようにして2値化部302によって得られた2値画像と領域情報を用いて、領域分割部303が領域分割を行う。以下、領域分割部303の処理について説明する。
【0039】
図12は本実施形態の領域分割処理を説明するフローチャートである。領域分割部303では、ステップS1201にて、2値化部302により得られた2値化された文書画像から文書要素が抽出され、それらの木構造表現が作られる。このステップS1201の処理の詳細について図13のフローチャートを用いて説明する。図13は図12のステップS1201の要素抽出及び木構造化の処理を説明するフローチャートである。
【0040】
ステップS1301では、2値化画像からすべての黒画素塊を抽出する。なお、黒画素塊とは、上述したように黒画素の8連結輪郭塊であり、図14に示すように、縦横斜めに接触した画素で作られた輪郭を持つ黒画素の集合のことである。続くステップS1302では、抽出した黒画素塊が、予め予想される最大文字高さおよび幅(予め実験的に求めた値)に対し定められた閾値以下の大きさを有するかどうかを判定し、閾値以下である場合はステップS1308に進み、当該黒画素塊を文字要素と判定する。これを“CHAR”と呼ぶ。
【0041】
ステップS1303では、抽出した黒画素が一定比率以上で縦長あるいは横長であるかどうかを判断する。当該黒画素塊が一定比率以上で縦長あるいは横長であった場合は、ステップS1309において“LINE”と判定する。また、ステップS1304では、抽出した黒画素塊中の黒画素のなす輪郭に注目し、その形状が細い斜めの線状であった場合は、ステップS1309へ進み、当該黒画素塊を“LINE”と判定する。
【0042】
ステップS1305では、黒画素塊の輪郭形状が四角形かどうかを調べる。図15は、(a)黒画素塊の輪郭が四角形の場合と、(b)黒画素塊の輪郭が非四角形である場合の例を示す図である。ステップS1305において、黒画素塊の輪郭形状が四角形でなければ、ステップS1312へ進み、当該黒画素塊を“PICTURE”と判定する。
【0043】
一方、黒画素塊が四角形ならばステップS1306へ進む。ステップS1306では、黒画素塊の内部に存在する白画素の4連結輪郭塊を抽出する。白画素の4連結輪郭塊とは、図16のように、縦横のみに接触した画素で作られた輪郭を持つ白画素の集合のことである。以降この集合を白画素塊と呼ぶ。
【0044】
ステップS1307では、ステップS1306で黒画素塊から抽出された白画素塊の形状がすべて四角形であり、かつ黒画素塊内を所定の間隔で隙間なく埋めているかどうかを判定する。この判定の結果がYESであった場合は、ステップS1311へ進み、当該黒画素塊を“FRAME”と判定する。図17は、枠(FRAME)と図(PICTURE)における内部白画素塊の配置例を示す図である。ステップS1307の判定によれば、(a)、(b)はステップS1307の判定条件を満たすので、ステップS1311で枠(FRAME)であると判定されることになる。
【0045】
また、図17の(c)に示した白画素塊の配列は、「黒画素塊から抽出された白画素塊の形状がすべて四角形であり、かつ黒画素塊内を隙間なく埋めている」という条件を満たしておらず、ステップS1312において図(PICTURE)と判定されることになる。結局、ステップS1312では、ステップS1307までの条件のいずれにもあてはまらない黒画素塊を、“PICTURE”としている。
【0046】
さて、本実施形態では、各要素の親となる要素“GROUND”を導入する。画面全体をひとつの“GROUND”とすると、これまで画像から抽出された各要素は、すべてその子供の要素として表現される。そして、“FRAME”と判定された黒画素塊の内部から抽出された白画素塊のひとつひとつをそれぞれ“GROUND”とし、更にこの白画素の内部で、上述したステップS1301〜S1312の処理を行って子供となる要素を抽出する(ステップS1313)。なお、“FRAME”の内部で更に“FRAME”が抽出されたときには、これをGROUNDとしてさらに再帰的に処理を行う。
【0047】
すべての再帰的内部探索が終了した時点で、画像から抽出された要素は木構造を構成することになる。図18は、文書画像の例と、これをステップS1201の要素抽出、木構造化によって処理して得られる木構造の例を示す図である。図18の(a)に示されるように、文書画像1801は、テキスト列(CHAR)1802、1807、1808と、フレーム(FRAME)1804と、図(PICTURE)1803、1809とを有する。
【0048】
この文書画像1801を上述の処理によって木構造化すると、図18の(b)のようになる。GROUND1821は文書画像1801の全体を示し、その要素の一つであるFRAME1824は文書画像1801中のフレーム1804に対応する。更にフレーム1804は2つのフレームに分けられ、木構造上では、それぞれGROUND1825、1826として示されている。
【0049】
以上のようにして、図12のステップS1201で文書画像要素の木構造を得ると、ステップS1202において、ステップS406で取得した領域情報を木構造に当てはめる。即ち、2値化部302による2値化処理の際に記録された領域情報を参照して、ステップS301で得られた木構造を変更する。このステップS1202の処理について、図19のフローチャートを用いて説明する。
【0050】
ステップS1901では、領域情報が存在するかどうかを調べる。領域情報がなければ、そのまま本処理を終了する。領域情報が存在する場合は、ステップS1902へ進み、領域を仮想的に“FRAME”および“GROUND”の組と考えて要素の木構造の適当な箇所に挿入する。すなわち、領域を内包する“GROUND”を親とする位置に、その領域情報が表す矩形に対応する新たな“FRAME”を挿入し、その子として新たな“GROUND”を置く。
【0051】
ステップS1903では、ステップS1902で挿入した“FRAME”と同じ親(GROUND)を持つ兄弟のうち、当該領域内部に位置する要素をすべて自分の子孫、すなわち新たな“GROUND”の子供へと移動する。
【0052】
図20は、上述した木構造変更処理の例を説明する図である。文書画像2001は色付きの下地領域2002を有する。2値化部302はこの文書画像2001を2値化して2値画像2010を生成するとともに、領域2002に対応する領域情報2020を生成する(図4)。領域分割部303は、2値画像2010について図13のフローチャートで説明した処理を施すことにより、画像全体をGROUND2031とする木構造2030を生成する(S1201)。そして、木構造2030に、領域情報2020を当てはめて、木構造を変更し、木構造2040を得る。
【0053】
より具体的には、GROUND2031を親として、領域2002に相当する枠(FRAME)を挿入して、その子としてGROUND2041を置く。そして、領域2002に含まれる各要素(A,B,C,図形)をGROUND2041の子として配置することにより、木構造を変更する。
【0054】
以上のようにして、ステップS1202の処理を終えたならば、ステップS1203へ進む。ステップS1203では、文字要素をグループ化して行および文字領域を作成する。ステップS1203の処理について、図21のフローチャートを用いて説明する。図21はステップS1203における文字領域の作成処理を説明するフローチャートである。
【0055】
ステップS2101では、各“CHAR”に対し、それぞれ隣り合う“CHAR”との水平距離が閾値内にあるもの同志をグループ化する。このグループを“TEXTLINE”と呼ぶ。但し、これらのグループ化は、同じ親を持つ“CHAR”間のみで行われる。
【0056】
次に、ステップS2102において、更にこの“TEXTLINE”同志で、それぞれ隣り合う垂直距離が閾値内にあるもの同志をグループ化する。こうして得られた“TEXTLINE”のグループを“TEXT”あるいは文字領域と呼ぶ。但し、これらのグループ化は同じ親をもつ“CHAR”からなる“TEXTLINE”の間のみで行う。
【0057】
以上の処理で、文書画像は文字領域である“TEXT”、線の画像部分である“LLINE”、図や写真の領域である“PICTURE”、表や枠の領域である“FRAME”という各要素に分割される。
【0058】
なお、ステップS2103における文字領域作成時のグループ化は、木構造を意識して行われるので、例えば図22のように、2値画像上の実線の枠=“FRAME1”がある場合、“FRAME1”内外それぞれの文字は必ず異なるグループとなる。すなわち、“TEXT1”と“TEXT3”、“TEXT2”と“TEXT4”のように異なる文字領域にグループ化される。
【0059】
同様に、図23におけるようなカラー画像の処理の場合、2値化処理後の画像上では枠となるような情報がなくても、ステップS1202における処理により、2値化処理時に得られた領域情報が領域分割に反映され、色下地上の文字は他と異なる文字領域となり、図22と同様な正しい領域分割結果が得られる。即ち、2値化処理部302によって、文書画像2301の2値画像2310が得られるとともに領域情報2320が得られる。2値画像2310を領域分割する際に、ステップS1202の処理により、領域情報2320が反映されて、2330に示す如く領域分割結果が得られる。
【0060】
もし、ステップS1202の処理を行わないで領域分割処理を行った場合は、下地の情報が反映されることがないので、図24のように誤った文字領域が得られることになる。
【0061】
以上説明したように、本実施形態によれば、カラー画像を2値化して領域分割処理を行う際に、2値化処理時に記憶された色付下地の領域情報を用いて領域分割処理の解析内容を変更するので、カラー画像の分割処理に際して2値化の際に失われてしまった情報をも正しく反映した文字領域の抽出が可能になり、より高精度な領域分割処理が可能になる。
【0062】
なお、上記実施形態によれば、2値化部302が保存する領域情報、および領域分割部303が処理する“FRAME”領域は四角形に限定していたが、これは矩形の任意連接体、あるいは円、楕円などの領域を対象とするようにしてもよい。この場合でも、カラー画像にあって、2値化の際に失われてしまった情報をも正しく反映した文字領域の抽出が可能になり、より高精度な領域分割処理が可能になる。
【0063】
なお、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。
【0064】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0065】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0066】
【発明の効果】
以上説明したように、本発明によれば、色によって表された領域の区別を維持した領域分割が可能となる。
【図面の簡単な説明】
【図1】本実施形態による文書処理装置の装置概観を示す図である。
【図2】本実施形態による文書処理装置の構成を示すブロック図である。
【図3】本実施形態の文書処理装置による文書の電子化処理の概要を示す図である。
【図4】本実施形態による2値化処理を説明するフローチャートである。
【図5】本実施形態の説明に用いるカラー文書画像の例を示す図である。
【図6】図5に示したカラー画像から得られる輝度値のヒストグラムを示す図である。
【図7】(a)は図5に示したカラー画像を図6に示す閾値t1で2値化した画像を示し、(b)は閾値t2で2値化した画像を示す図である。
【図8】図7の領域703における輝度値のヒストグラムを示す図である。
【図9】図7の領域704における輝度値のヒストグラムを示す図である。
【図10】領域情報を示す図である。
【図11】図5に示したカラー画像の最終的な2値画像を示す図である。
【図12】本実施形態の領域分割処理を説明するフローチャートである。
【図13】図12のステップS1201の要素抽出及び木構造化の処理を説明するフローチャートである。
【図14】黒画素の8連結輪郭塊の例を示す図である。
【図15】(a)黒画素塊の輪郭が四角形の場合と、(b)黒画素塊の輪郭が非四角形である場合の例を示す図である。
【図16】白画素の4連結輪郭塊の例を示す図である。
【図17】枠(FRAME)と図(PICTURE)における内部白画素塊の配置例を示す図である。
【図18】文書画像の例と、これをステップS1201の要素抽出、木構造化によって処理して得られる木構造の例を示す図である。
【図19】図12のステップS1202による木構造の変更処理を説明するフローチャートである。
【図20】上述した木構造変更処理の例を説明する図である。
【図21】ステップS1203における文字領域の作成処理を説明するフローチャートである。
【図22】枠領域を持つ文書の領域分割処理例を示す図である。
【図23】本実施形態により色付き下地領域を持つカラー文書が正しく領域分割される様子を示す図である。
【図24】一般的な手法により色付きの下地領域を持つカラー文書に領域分割を行った様子を説明する図である。
【図25】領域分割の一例を示す図である。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a document processing apparatus and method for performing digitization processing of a document, and more particularly to an image area separation processing executed in digitization processing of a document.
[0002]
[Prior art]
In recent years, with the progress of computerization of information, there is an increasing demand for storing or transmitting documents in electronic form instead of paper. In particular, due to the low price of storage media and the increase in communication bandwidth, documents to be digitized are expanding from black and white binary to full color documents.
[0003]
Document digitization here refers not only to photoelectric conversion of a paper document by a scanner or the like to convert it into image data, but also to the text, symbols, and figures that make up the document by recognizing the contents described. It is divided into areas with different properties such as photos, tables, etc., and the character part is character code information, the figure is vector data, the picture is image data, the table is structure data, etc. Refers to that.
[0004]
The first stage of electronic processing of such a document is to analyze the content written in a one-page document image and divide it into subelements of different properties such as characters, diagrams, photographs, tables, That is, it is a region division process. FIG. 25 is a diagram illustrating an example of area division.
[0005]
As an implementation example of such region division processing, “Method and Apparatus for character recognition” (Shin-Ywang et al./Canon K. K) of US Pat. No. 5,680,478 can be cited. In this example, a set of eight connected contour blocks of black pixels and four connected contour blocks of white pixels in a document image is extracted, and a character region, a picture or figure, a table, a frame is extracted from its shape, size, set state, and the like. , A characteristic area of a document such as a line is extracted. In the example of FIG. 25, character characteristic areas (blocks 1, 3, 4, 6), pictures and graphic areas (block 2), table areas (block 5), frames, and lines (7) are extracted. is doing.
[0006]
Here, the 8-connected outline block of black pixels (hereinafter referred to as black pixel block) is a collection of black pixels connected in any of eight directions from a certain black pixel as shown in FIG. Further, the 4-connected outline block of white pixels (hereinafter, white pixel block) refers to an aggregate of white pixels connected in any of four directions from a white pixel as shown in FIG.
[0007]
The above-described region division processing is premised on that the input document image is a monochrome binary because of its operation principle. Therefore, in order to perform color document region division using this technique, it is necessary to binarize the document image in advance. In general, binarization of a color image is performed by obtaining a threshold value from a luminance distribution of pixels and converting each pixel of the image into a white or black pixel with the above-described luminance threshold as a boundary.
[0008]
[Problems to be solved by the invention]
As a method for obtaining a threshold value for binarization of a color image, there are a method for obtaining a single screen and a method for obtaining each region. In the binarization method proposed in Japanese Patent Application No. 11-238581 by the present applicant, an optimum threshold value is dynamically obtained for each region according to the contents of the input document, and this is used for each region. The binarization optimal for is performed. In particular, it is possible to binarize a color image in which high-intensity characters on a low-luminance background and low-intensity characters on a high-luminance background are mixed, so that all of them are automatically converted to black characters on a white background. It is possible to obtain an optimal binary image as an input of the division process.
[0009]
FIG. 24 is a diagram for explaining a state in which region separation is performed on a document including a colored background by the previously proposed binarization method. In FIG. 24, a color document 2301 has a dark colored background area in the lower half, and light color characters are placed on it, and other than that, dark color characters are displayed on a light color background. It shall be. It can be seen that in such a document, the upper half and the lower half will be semantically separated.
[0010]
When binarization is performed on a color document such as the document 2301 by the above-described binarization method, a binary image as indicated by 2302 in FIG. 24 is generated. In the binary image 2302, the background is removed to make all white pixels, and the characters are all black pixels. At this time, if region segmentation processing is performed on the binary image 2302 as usual, the result shown in 2303 in FIG. 24 is obtained, because information on the underlying region existing in the lower half of the screen is missing. Originally, TEXT1 and TEXT2 are bonded to each other even though they should be separated into two at the center.
[0011]
That is, the character area range designation information based on the background color originally possessed by the color image is lost when binarization is performed.
[0012]
The present invention has been made in view of the above-described problems, and an object thereof is to enable region division while maintaining the distinction between regions represented by colors.
[0013]
[Means for Solving the Problems]
  In order to achieve the above object, a document processing apparatus according to an aspect of the present invention is provided.
  LuminanceDetermine multiple thresholds for binarizing an imageFirstA determination means;
  SaidFirstUsing each of the plurality of threshold values determined by the determining meansLuminanceObtaining means for obtaining a plurality of binary images by binarizing the images;
  Included in each of a plurality of binary images acquired by the acquisition meansBlack pixelConnected componentAreaOn the basis of the,Each with a different background brightnessArea location and sizeWhenTheShowGenerating means for generating area information;
  Second determination means for determining whether or not to invert the luminance value for each region indicated by the region information in the luminance image;
  For each area indicated by the area information in the luminance image, setting means for setting a threshold for binarizing each area;
  For each region indicated by the region information in the luminance image, with respect to the region determined to be inverted by the second determining unit, a corresponding region in the luminance image whose luminance value has been inverted is determined by the setting unit. A binary partial image is obtained by binarizing with a threshold value set for the area, while the luminance value is inverted for the area determined not to be inverted by the second determining means. A binary partial image acquisition unit that acquires a binary partial image by binarizing a corresponding region in the non-luminance image with a threshold value set for the region by the setting unit;
  By overwriting the binary partial image of each area acquired by the binary partial image acquisition means on the corresponding area in the binary image obtained by binarizing the entire surface of the luminance image with a predetermined threshold, the luminance image ConcerningBinarization means for obtaining a second binary image;
  Second binary image obtained by the binarization meansExtract document elements fromRegion information generated by the generating meansEach area indicated by is used as a frame element, a tree structure is obtained based on the document element and the frame element, and the luminance image is obtained based on the tree structure.Division processing means for performing area division;With
  The tree structure obtained by the division processing means is a tree structure in which document elements included in each area indicated by the area information among the extracted document elements are descendants of frame elements corresponding to the areas..
[0014]
  Also, a document processing method of the present invention for achieving the above objectIs
  FirstThe decision meansLuminanceDetermine multiple thresholds for binarizing an imageFirstA decision process;
  Acquisition meansFirstUsing each of the plurality of threshold values determined in the determination stepLuminanceAn acquisition step of acquiring a plurality of binary images by binarizing the images;
  The generation means is included in each of the plurality of binary images acquired in the acquisition step.Black pixelConnected componentAreaOn the basis of the,Each with a different background brightnessArea location and sizeWhenTheShowA generation step of generating region information;
  A second determination step in which a second determination unit determines whether to invert the luminance value for each region indicated by the region information in the luminance image;
  A setting step in which a setting unit sets a threshold for binarizing each region for each region indicated by the region information in the luminance image;
  The binary partial image acquisition means, for each region indicated by the region information in the luminance image, for the region determined to be inverted in the second determination step, the correspondence in the luminance image with the luminance value inverted. A binary partial image is obtained by binarizing the area to be processed with the threshold value set for the area in the setting step, and on the other hand, the region determined not to be inverted in the second determination step Is a binary partial image that obtains a binary partial image by binarizing a corresponding region in the luminance image that has not been inverted in luminance value with the threshold value set for the region in the setting step. Acquisition process;
  Binarization meansBy overwriting the binary partial image of each region acquired in the binary partial image acquisition step on the corresponding region in the binary image obtained by binarizing the entire surface of the luminance image with a predetermined threshold, the luminance image ConcerningA binarization step for obtaining a second binary image;
  A second binary image obtained in the binarization step by the division processing means;Extract document elements fromRegion information generated in the generating stepEach area indicated by is used as a frame element, a tree structure is obtained based on the document element and the frame element, and the luminance image is obtained based on the tree structure.A division processing step for performing area division;Have
The tree structure obtained in the division processing step is a tree structure in which document elements included in each area indicated by the area information among the extracted document elements are descendants of frame elements corresponding to the areas..
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.
[0016]
FIG. 1 is a diagram showing an overview of a document processing apparatus according to the present embodiment. In FIG. 1, reference numeral 101 denotes a computer apparatus that executes a document digitization processing program including a program for realizing processing described below with reference to the attached flowchart. The computer device 101 is accompanied by a display device 102 for displaying a situation and an image to a user, and an input device 103 configured to include a pointing device such as a keyboard and a mouse for receiving a user operation. As the display device for the display 102, a CRT, an LCD, or the like is used. A scanner device 104 optically reads a document image, digitizes it, and sends the obtained image data to the computer device 101. In this embodiment, a color scanner is used.
[0017]
FIG. 2 is a block diagram showing the configuration of the document processing apparatus according to this embodiment. In FIG. 1, reference numeral 201 denotes a CPU, which realizes various functions including electronic processing described later by executing a control program stored in a ROM 202 or a RAM 203. A ROM 202 stores various control programs executed by the CPU 201 and data. A RAM 203 stores various control programs executed by the CPU 201 and provides a work area necessary for the CPU 201 to execute various processes. Reference numeral 204 denotes an external storage device which stores a control program for realizing the processing described with reference to the attached flowchart by the CPU 101, document image data obtained by reading the image input device 104, and the like. A computer bus 205 connects the above-described components.
[0018]
FIG. 3 is a diagram showing an outline of document digitization processing by the document processing apparatus of this embodiment. In the flow of digitization processing according to the present embodiment, first, a color document to be digitized is read by the input unit 301 using the scanner 104 and stored in the external storage device 204 as image data. Next, the binarization unit 302 performs binarization processing on the document image data stored in the external storage device 204 for the subsequent area division processing. The region dividing unit 303 extracts elements such as characters, diagrams, tables, frames, lines, and the like from the binary image obtained by the binarizing unit 302 and divides them into regions. The digitized document creation unit 304 creates a digitized document by using character recognition data or using table structure data based on the attribute of each divided element. The output unit 305 stores the generated digitized document in the external storage device 204. Note that the output form in the output unit 305 is not limited to storage in the external storage device 204, and is displayed on the display 102 or output to other devices on the network via a network interface (not shown). It is also possible to output to a printer (not shown).
[0019]
Hereinafter, the operation of the binarization unit 302 shown in FIG. 3 will be described with reference to the drawings. FIG. 4 is a flowchart for explaining binarization processing according to this embodiment. FIG. 5 is a diagram showing an example of a color document image used for explaining the present embodiment. The color document image shown in FIG. 5 includes three background colors (background A501, background B502, background C503), the background A501 portion is white, the background B502 portion is yellow, and the background C503 portion is blue. And On the other hand, as for the character color, character string A504 and character string B505 are both black, and character string C506 is white.
[0020]
First, in step S401, a color document image to be processed is converted into a luminance image. Here, in general, the color format of the original image is RGB format, the luminance image is a gray scale format of 0 to 255 per pixel, and the luminance Y of each pixel is Y = the pixel values R, G, and B of the original image. Although it is determined by 0.299R + 0.587G + 0.114B, it goes without saying that other forms / conversion formulas may be used. As a result, the luminance of each part of the background color A501, background color B502, and background color C503 in FIG. Therefore, the peak of the histogram curve as shown in FIG. 6 has a certain width.
[0021]
Next, in step S402, a histogram of the luminance image data obtained in step S401 is taken. FIG. 6 is a diagram showing a histogram of luminance values obtained from the color image shown in FIG. If a histogram is obtained, a plurality of threshold values are determined from the histogram in step S403. For example, two threshold values t1 and t2 are extracted from the histogram shown in FIG.
[0022]
The plurality of threshold values t1 and t2 can be determined by the following procedure, for example. Reference is made from the luminance value 255 (white) to 0 (black) of the histogram. For example, the following conditions are set as conditions for selecting a threshold value from the referenced luminance value.
[0023]
Condition 1: In the histogram curve, a total frequency (area) included between the current reference point and a point that goes back by, for example, 10 pixels in the direction in which the luminance value on the horizontal axis increases from the reference point is a predetermined value. Greater than the first value.
[0024]
Condition 2: A rapid decrease in the frequency of the vertical axis in the histogram curve occurs (for example, “greater than a predetermined first slope” once or “greater than a predetermined second slope” twice in succession. Occurrence).
[0025]
Condition 3: A gentle decrease or increase in the histogram curve occurs (smaller than a predetermined third slope).
[0026]
In this embodiment, each of the points t1 and t2 shown in FIG. 6 satisfies “condition 2” after satisfying “condition 1” among the above conditions, and further satisfies “condition 3” thereafter. Detected as a result. The reference point may refer to the histogram curve at a predetermined interval. Moreover, although the above conditions are used in this embodiment, the determination of a threshold value is not restricted to this. For example, the case where the following conditions 4 to 6 are simultaneously satisfied may be selected as the threshold value.
[0027]
Condition 4: In the histogram curve, the total frequency (area) included between the current reference point and a point that goes back, for example, 40 pixels from the reference point in the direction in which the luminance value on the horizontal axis increases is a predetermined second value. Greater than the value of.
[0028]
Condition 5: The frequency of the vertical axis at the current reference point on the histogram curve is smaller than a predetermined third value.
[0029]
Condition 6: In the histogram curve, the histogram value at the current reference point and a point that goes back, for example, 20 pixels from the reference point in the direction of increasing luminance value on the horizontal axis is larger than a predetermined fourth value.
[0030]
In step S404, a plurality of binary images are created from each threshold value. These are temporary binary images. In this example, the binary image 701 shown in FIG. 7A is obtained by binarizing with the threshold value t1, and the binary image 702 shown in FIG. 7B is obtained by binarizing with the threshold value t2. Generated. Here, regions 703 and 704 are regions of bases B502 and C503 shown in FIG. At the threshold value t1, the background B502 and the background C503 are also black, and at the threshold t2, the background 502 is white and the background C503 is black.
[0031]
Next, in step S405, the black area in each binary image obtained in step S404 is extracted, and this is recorded as area information indicating areas having different background colors. This is a process of tracking a connected component of black pixels on a binary image and extracting a rectangular region having a certain size or more. In the example of FIG. 7, the region 703 is extracted from the binary image 701, and the region 704 is extracted from the binary image 702.
[0032]
Next, in step S406, the analysis in each area extracted in step S405 is performed. Here, the range of each region extracted in step S405 is extracted from the luminance image obtained in step S401, a histogram of luminance values is taken for each range, and is it necessary to invert the luminance value for each region from this histogram? Judgment is made and if necessary, the luminance value is inverted. Further, an optimum binarization threshold value in each region is obtained from this histogram in the same manner as in FIG. 6 (however, the predetermined value used for the judgment is different because the size of the target region is small). The obtained binarization threshold value and inversion information are output so as to accompany each area information. Whether or not inversion is necessary can be determined by obtaining an average value (average) of the histogram and its skew (skew), for example, by a calculation formula shown below.
[0033]
(average) = Σip (i),
σ2= Σ (i-av)2p (i),
(skew) = 1 / σ2Σ (i-av)Threep (i),
However, Σip (i) represents the sum of ip (i) from i = 0 to i = 255, p (i) represents the probability density, and av represents the average value.
[0034]
When the absolute value of the skew is larger than the threshold value, it is determined that the area includes characters, and when it is determined that the area further includes characters and the skew is positive, it is determined that the image of the area should be inverted and inverted. The flag becomes yes.
[0035]
In this example, the histogram shown in FIG. 8 is obtained from the region 703, it is determined that no inversion is necessary, and the threshold value t21 is obtained from the histogram. Furthermore, the histogram shown in FIG. 9 is obtained from the region 704 and it is determined that it is necessary to invert, and the threshold t22 is obtained by inverting the histogram of FIG. 9 (FIG. 9 represents the histogram before inversion and the threshold t22. Is shown as the corresponding value in the histogram before inversion). Then, as shown in FIG. 10, region information in which a coordinate value, a binarization threshold value, and inversion information are set as one set is stored for each region.
[0036]
In this example, the area information 1001 for the area 703 is obtained from the histogram of FIG. 8 by using, as coordinate values, the left end x-coordinate l1, the right end x-coordinate r1, the upper end t1, and the lower end b1 as binarization threshold values. The threshold t21 has “no inversion” (no) as the inversion information. Similarly, the area information 1002 for the area 704 includes a threshold value obtained from the histogram of FIG. 9 using the x coordinate l2 at the left end of the rectangle, the x coordinate r2 at the right end, the t2 at the upper end, and the b2 at the lower end as the binarization threshold values. Inversion information “yes” is included as inversion information t22.
[0037]
Next, in step S407, a final binary image is generated from the luminance image obtained in step S401 based on the region information obtained in step S406. According to this example,
(1) A binary image 701 is obtained by binarizing the entire surface with a threshold value t1.
(2) The luminance image of the area 703 on the binary image 701 is processed according to the contents of the area information 1001 (in this case, binarized with the threshold value (t21)), and the obtained image is converted into the area 703 Overwrite to. As a result, a binary image 702 is obtained.
(3) For the region 704, since the corresponding region information 1002 indicates that there is inversion, the inversion processing is performed on the luminance image of the portion of the region 704, and the image obtained by binarization using the threshold value t22 is displayed in the region 704 Overwrite the part. As a result, a final binary image as shown in FIG. 11 is obtained from the color image shown in FIG.
[0038]
Next, the region dividing unit 303 performs region division using the binary image and region information obtained by the binarizing unit 302 as described above. Hereinafter, the process of the area dividing unit 303 will be described.
[0039]
FIG. 12 is a flowchart for explaining the region division processing of this embodiment. In step S1201, the region dividing unit 303 extracts document elements from the binarized document image obtained by the binarizing unit 302, and creates a tree structure representation thereof. Details of the processing in step S1201 will be described with reference to the flowchart of FIG. FIG. 13 is a flowchart for explaining the element extraction and tree structuring processing in step S1201 of FIG.
[0040]
In step S1301, all black pixel blocks are extracted from the binarized image. Note that the black pixel block is an 8-connected outline block of black pixels as described above, and is a set of black pixels having an outline formed by pixels that are in contact with each other vertically and horizontally as shown in FIG. . In the subsequent step S1302, it is determined whether or not the extracted black pixel block has a size equal to or smaller than a predetermined threshold with respect to a maximum character height and width (values obtained experimentally in advance) expected in advance. If it is below, the process advances to step S1308 to determine that the black pixel block is a character element. This is called “CHAR”.
[0041]
In step S1303, it is determined whether the extracted black pixels are vertically long or horizontally long with a certain ratio or more. If the black pixel block is vertically long or horizontally long with a certain ratio or more, it is determined as “LINE” in step S1309. In step S1304, attention is paid to the outline formed by the black pixels in the extracted black pixel block, and if the shape is a thin diagonal line, the process proceeds to step S1309, and the black pixel block is referred to as “LINE”. judge.
[0042]
In step S1305, it is checked whether the outline shape of the black pixel block is a quadrangle. FIG. 15 is a diagram illustrating an example in which (a) the outline of a black pixel block is a rectangle, and (b) the outline of a black pixel block is a non-rectangle. If it is determined in step S1305 that the outline shape of the black pixel block is not a rectangle, the process proceeds to step S1312, and the black pixel block is determined to be “PICTURE”.
[0043]
On the other hand, if the black pixel block is a square, the process proceeds to step S1306. In step S1306, four connected outline chunks of white pixels existing inside the black pixel chunk are extracted. The 4-connected outline block of white pixels is a set of white pixels having an outline formed by pixels that are in contact only in the vertical and horizontal directions as shown in FIG. Hereinafter, this set is called a white pixel block.
[0044]
In step S1307, it is determined whether or not the shape of the white pixel block extracted from the black pixel block in step S1306 is all quadrangular, and the black pixel block is filled without a gap at a predetermined interval. If the result of this determination is YES, the process advances to step S1311 to determine that the black pixel block is “FRAME”. FIG. 17 is a diagram illustrating an arrangement example of internal white pixel blocks in a frame (FRAME) and a diagram (PICTURE). According to the determination in step S1307, since (a) and (b) satisfy the determination condition in step S1307, it is determined in step S1311 that the frame is a frame (FRAME).
[0045]
In addition, the arrangement of white pixel blocks shown in FIG. 17C is that “the shape of the white pixel blocks extracted from the black pixel blocks are all square and fills the black pixel blocks without any gaps”. The condition is not satisfied, and it is determined as a diagram (PICTURE) in step S1312. Eventually, in step S1312, a black pixel block that does not meet any of the conditions up to step S1307 is set as “PICTURE”.
[0046]
In the present embodiment, an element “GROUND” that is a parent of each element is introduced. Assuming that the entire screen is a single “GROUND”, all the elements extracted so far from the image are expressed as the elements of the child. Then, each of the white pixel blocks extracted from the inside of the black pixel block determined as “FRAME” is set to “GROUND”, and further, the above-described steps S1301 to S1312 are performed inside the white pixel. Are extracted (step S1313). When “FRAME” is further extracted inside “FRAME”, this is further recursively processed as GROUND.
[0047]
At the time when all the recursive internal searches are completed, the elements extracted from the image form a tree structure. FIG. 18 is a diagram showing an example of a document image and an example of a tree structure obtained by processing this by element extraction and tree structuring in step S1201. As shown in FIG. 18A, the document image 1801 has text strings (CHAR) 1802, 1807, 1808, a frame (FRAME) 1804, and diagrams (PICTURE) 1803, 1809.
[0048]
When this document image 1801 is made into a tree structure by the above-described processing, it is as shown in FIG. GROUND 1821 indicates the entire document image 1801, and one of its elements, FRAME 1824, corresponds to a frame 1804 in the document image 1801. The frame 1804 is further divided into two frames, which are indicated as GROUND 1825 and 1826 on the tree structure, respectively.
[0049]
As described above, when the tree structure of the document image element is obtained in step S1201 of FIG. 12, the area information acquired in step S406 is applied to the tree structure in step S1202. That is, the tree structure obtained in step S301 is changed with reference to the area information recorded in the binarization process by the binarization unit 302. The processing in step S1202 will be described using the flowchart in FIG.
[0050]
In step S1901, it is checked whether area information exists. If there is no area information, this process is terminated as it is. If the area information exists, the process proceeds to step S1902, and the area is virtually considered as a set of “FRAME” and “GROUND” and is inserted into an appropriate portion of the element tree structure. In other words, a new “FRAME” corresponding to the rectangle represented by the region information is inserted at a position having “GROUND” as a parent, which contains the region, and a new “GROUND” is placed as a child of that.
[0051]
In step S 1903, among the siblings having the same parent (GROUND) as “FRAME” inserted in step S 1902, all elements located inside the area are moved to their descendants, that is, new “GROUND” children.
[0052]
FIG. 20 is a diagram illustrating an example of the tree structure changing process described above. The document image 2001 has a colored background area 2002. The binarization unit 302 binarizes the document image 2001 to generate a binary image 2010 and also generates area information 2020 corresponding to the area 2002 (FIG. 4). The region dividing unit 303 generates the tree structure 2030 having the entire image as GROUND 2031 by performing the processing described in the flowchart of FIG. 13 on the binary image 2010 (S1201). Then, the area information 2020 is applied to the tree structure 2030 to change the tree structure to obtain the tree structure 2040.
[0053]
More specifically, a frame (FRAME) corresponding to the region 2002 is inserted with GROUND 2031 as a parent, and GROUND 2041 is placed as a child thereof. Then, by arranging each element (A, B, C, figure) included in the region 2002 as a child of the GROUND 2041, the tree structure is changed.
[0054]
When the process of step S1202 is completed as described above, the process proceeds to step S1203. In step S1203, character elements are grouped to create lines and character areas. The process of step S1203 will be described using the flowchart of FIG. FIG. 21 is a flowchart for explaining the character region creation processing in step S1203.
[0055]
In step S2101, each “CHAR” is grouped together with each other having a horizontal distance within the threshold with the adjacent “CHAR”. This group is called “TEXTLINE”. However, these groupings are performed only between “CHAR” s having the same parent.
[0056]
Next, in step S2102, the “TEXTLINE” comrades that are adjacent to each other and whose vertical distance is within the threshold are grouped. The group of “TEXTLINE” obtained in this way is called “TEXT” or character area. However, these groupings are performed only between “TEXTLINE” consisting of “CHAR” having the same parent.
[0057]
With the above processing, each element of the document image is “TEXT” which is a character area, “LLINE” which is a line image part, “PICTURE” which is a picture or picture area, and “FRAME” which is a table or frame area. It is divided into.
[0058]
The grouping at the time of creating the character area in step S2103 is performed in consideration of the tree structure. For example, as shown in FIG. 22, if there is a solid line frame = “FRAME1” on the binary image, “FRAME1” Each character inside and outside must be in a different group. That is, they are grouped into different character areas such as “TEXT1” and “TEXT3”, “TEXT2” and “TEXT4”.
[0059]
Similarly, in the case of color image processing as shown in FIG. 23, even if there is no information that forms a frame on the image after binarization processing, the region obtained during binarization processing by the processing in step S1202 The information is reflected in the area division, and the characters on the color background become different character areas, and a correct area division result similar to FIG. 22 is obtained. That is, the binarization processing unit 302 obtains a binary image 2310 of the document image 2301 and area information 2320. When the binary image 2310 is divided into regions, the region information 2320 is reflected by the processing in step S1202, and a region division result is obtained as indicated by 2330.
[0060]
If the area dividing process is performed without performing the process of step S1202, the background information is not reflected, and an erroneous character area is obtained as shown in FIG.
[0061]
As described above, according to the present embodiment, when the color image is binarized and the area division processing is performed, the analysis of the area division processing is performed using the area information of the colored background stored at the time of the binarization processing. Since the contents are changed, it is possible to extract a character area that correctly reflects information lost in binarization in color image division processing, and more accurate region division processing is possible.
[0062]
According to the above embodiment, the area information stored by the binarizing unit 302 and the “FRAME” area processed by the area dividing unit 303 are limited to squares. An area such as a circle or an ellipse may be targeted. Even in this case, it is possible to extract a character area that accurately reflects information that has been lost in binarization in a color image, and it is possible to perform more accurate area division processing.
[0063]
Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, and a printer), and a device (for example, a copying machine and a facsimile device) including a single device You may apply to.
[0064]
Another object of the present invention is to supply a storage medium (or recording medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (or CPU or CPU) of the system or apparatus. Needless to say, this can also be achieved by the MPU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0065]
Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is determined based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0066]
【The invention's effect】
As described above, according to the present invention, it is possible to divide a region while maintaining the distinction between regions represented by colors.
[Brief description of the drawings]
FIG. 1 is a diagram showing an overview of a document processing apparatus according to an embodiment.
FIG. 2 is a block diagram showing a configuration of a document processing apparatus according to the present embodiment.
FIG. 3 is a diagram illustrating an outline of document digitization processing by the document processing apparatus according to the embodiment;
FIG. 4 is a flowchart illustrating binarization processing according to the present embodiment.
FIG. 5 is a diagram illustrating an example of a color document image used for describing the embodiment.
6 is a diagram showing a histogram of luminance values obtained from the color image shown in FIG. 5. FIG.
7A illustrates an image obtained by binarizing the color image illustrated in FIG. 5 with the threshold value t1 illustrated in FIG. 6, and FIG. 7B illustrates an image binarized using the threshold value t2.
8 is a diagram showing a histogram of luminance values in a region 703 in FIG.
FIG. 9 is a diagram showing a histogram of luminance values in a region 704 in FIG.
FIG. 10 is a diagram showing area information.
11 is a diagram showing a final binary image of the color image shown in FIG. 5. FIG.
FIG. 12 is a flowchart illustrating area division processing according to the present embodiment.
FIG. 13 is a flowchart for describing element extraction and tree structuring processing in step S1201 of FIG. 12;
FIG. 14 is a diagram illustrating an example of 8-connected contour blocks of black pixels.
FIGS. 15A and 15B are diagrams illustrating an example in which the outline of a black pixel block is a square, and FIG. 15B is a case in which the outline of a black pixel block is a non-rectangle.
FIG. 16 is a diagram illustrating an example of four connected outline blocks of white pixels.
FIG. 17 is a diagram illustrating an arrangement example of internal white pixel blocks in a frame (FRAME) and a diagram (PICTURE).
FIG. 18 is a diagram showing an example of a document image and an example of a tree structure obtained by processing this by element extraction and tree structuring in step S1201.
FIG. 19 is a flowchart for describing tree structure change processing in step S1202 of FIG. 12;
FIG. 20 is a diagram illustrating an example of the tree structure changing process described above.
FIG. 21 is a flowchart for describing character area creation processing in step S1203;
FIG. 22 is a diagram illustrating an example of region division processing for a document having a frame region.
FIG. 23 is a diagram illustrating a state in which a color document having a colored background area is correctly divided according to the present embodiment.
FIG. 24 is a diagram illustrating a state in which region division is performed on a color document having a colored background region by a general method.
FIG. 25 is a diagram illustrating an example of region division.

Claims (9)

輝度画像を2値化するための閾値を複数決定する第1決定手段と、
前記第1決定手段で決定された複数の閾値それぞれを用いて前記輝度画像を2値化することにより、複数の2値画像を取得する取得手段と、
前記取得手段で取得した複数の2値画像それぞれに含まれる黒画素の連結成分の領域に基づいて、下地の輝度が異なる各領域の位置と大きさ示す領域情報を生成する生成手段と、
前記輝度画像における前記領域情報で示される各領域について、輝度値の反転を行うか否かを決定する第2決定手段と、
前記輝度画像における前記領域情報で示される各領域について、当該各領域を2値化するための閾値をそれぞれ設定する設定手段と、
前記輝度画像における前記領域情報で示される各領域について、前記第2決定手段で反転を行うと決定された領域に関しては、輝度値を反転した前記輝度画像内の対応する領域を、前記設定手段で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得し、一方、前記第2決定手段で反転を行わないと決定された領域に関しては、輝度値を反転していない前記輝度画像内の対応する領域を、前記設定手段で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得する2値部分画像取得手段と、
前記輝度画像の全面を所定閾値で2値化して得られる2値画像における対応する領域に、前記2値部分画像取得手段で取得した各領域の2値部分画像を上書きすることにより、前記輝度画像に関する第2の2値画像を得る2値化手段と、
前記2値化手段で得られた第2の2値画像から文書要素を抽出し、前記生成手段で生成された領域情報で示される各領域を枠の要素とし、前記文書要素と枠の要素とに基づいて木構造を得て、当該木構造に基づいて前記輝度画像の領域分割を行う分割処理手段とを備え、
前記分割処理手段で得る木構造は、前記抽出した文書要素のうち前記領域情報で示される各領域に含まれる文書要素を当該各領域に対応する枠の要素の子孫にした木構造であることを特徴とする文書処理装置。
First determination means for determining a plurality of threshold values for binarizing the luminance image;
Obtaining means for obtaining a plurality of binary images by binarizing the luminance image using each of the plurality of threshold values determined by the first determining means;
Generation means for, based on the area of the connected component of black pixels, and generates area information in which the luminance of the background indicating the position and size of each different regions included in each of the plurality of binary images obtained by the obtaining means,
Second determination means for determining whether or not to invert the luminance value for each region indicated by the region information in the luminance image;
For each area indicated by the area information in the luminance image, setting means for setting a threshold for binarizing each area;
For each region indicated by the region information in the luminance image, with respect to the region determined to be inverted by the second determining unit, a corresponding region in the luminance image whose luminance value has been inverted is determined by the setting unit. A binary partial image is obtained by binarizing with a threshold value set for the area, while the luminance value is inverted for the area determined not to be inverted by the second determining means. A binary partial image acquisition unit that acquires a binary partial image by binarizing a corresponding region in the non-luminance image with a threshold value set for the region by the setting unit;
By overwriting the binary partial image of each area acquired by the binary partial image acquisition means on the corresponding area in the binary image obtained by binarizing the entire surface of the luminance image with a predetermined threshold, the luminance image and binarizing means for obtaining a second binary image about,
A document element is extracted from the second binary image obtained by the binarizing means, each area indicated by the area information generated by the generating means is set as a frame element, and the document element, the frame element, A division processing means for obtaining a tree structure based on the image and dividing the luminance image into regions based on the tree structure ;
The tree structure obtained by the division processing means is a tree structure in which document elements included in each area indicated by the area information among the extracted document elements are descendants of a frame element corresponding to each area. Feature document processing device.
前記生成手段は、前記複数の2値画像それぞれに含まれる黒画素の連結成分の領域が所定サイズより大きい領域を、前記下地の輝度が異なる領域と判断して、当該下地の輝度が異なる領域の位置と大きさを表す領域情報を生成する
ことを特徴とする請求項1に記載の文書処理装置。
Said generating means, the region area of the connected component is greater than the predetermined size of the black pixels included in each of the plurality of binary images, said brightness of the base is determined to different regions, the luminance of the background is different areas the document processing apparatus according to generate area information indicating a position and size in claim 1, wherein the.
前記設定手段は、前記輝度画像における前記領域情報で示される各領域のヒストグラムに基づいて、当該各領域を2値化するための閾値をそれぞれ設定する
ことを特徴とする請求項1または2に記載の文書処理装置。
The setting means, on the basis of the histogram of the region indicated by the region information in the luminance image, according to claim 1 or 2, characterized in that setting a threshold for binarizing the respective regions, respectively Document processing device.
前記第2決定手段は、前記輝度画像における前記領域情報で示される各領域のヒストグラムに基づいて、当該各領域について輝度値の反転を行うか否かを決定する
ことを特徴とする請求項1乃至のいずれか1項に記載の文書処理装置。
Said second determining means, based on the histogram of the region indicated by the region information in the luminance image, to claim 1, wherein the determining whether to perform inversion of the brightness values for the respective areas 4. The document processing apparatus according to any one of items 3.
前記分割処理手段は、
前記2値化手段で得られた第2の2値画像から前記文書要素を抽出して木構造を形成する形成手段と、
前記形成手段で形成した木構造の中に前記領域情報で示される各領域を枠の要素として挿入し前記抽出された文書要素のうち前記領域情報で示される各文書要素を当該各領域に対応する枠の要素の子孫に移動することにより、前記木構造を変更する変更手段とを備え、
前記変更手段で変更された木構造に基づいて領域分割を行う
ことを特徴とする請求項1乃至4のいずれか1項に記載の文書処理装置。
The division processing means includes
And forming means for forming a tree structure from the second binary image obtained by said binarizing means extracts said document element,
Each area indicated by the area information is inserted as a frame element in the tree structure formed by the forming means, and each document element indicated by the area information among the extracted document elements corresponds to each area. Change means for changing the tree structure by moving to the descendants of the elements of the frame to be
The document processing apparatus according to claim 1, wherein region division is performed based on the tree structure changed by the changing unit.
カラー画像を前記輝度画像に変換する変換手段を更に備えることを特徴とする請求項1乃至のいずれか1項に記載の文書処理装置。The document processing apparatus according to the color image in any one of claims 1 to 5, wherein the obtaining further Bei converting means for converting the luminance image. 前記第1決定手段は、前記輝度画像のヒストグラムをとり、当該ヒストグラムから前記複数の閾値を決定することを特徴とする請求項1乃至のいずれか1項に記載の文書処理装置。Said first determining means takes a histogram of the intensity image, a document processing apparatus according to any one of claims 1 to 6, wherein determining said plurality of threshold values from the histogram. 第1決定手段が、輝度画像を2値化するための閾値を複数決定する第1決定工程と、
取得手段が、前記第1決定工程で決定された複数の閾値それぞれを用いて前記輝度画像を2値化することにより、複数の2値画像を取得する取得工程と、
生成手段が、前記取得工程で取得した複数の2値画像それぞれに含まれる黒画素の連結成分の領域に基づいて、下地の輝度が異なる各領域の位置と大きさ示す領域情報を生成する生成工程と、
第2決定手段が、前記輝度画像における前記領域情報で示される各領域について、輝度値の反転を行うか否かを決定する第2決定工程と、
設定手段が、前記輝度画像における前記領域情報で示される各領域について、当該各領域を2値化するための閾値をそれぞれ設定する設定工程と、
2値部分画像取得手段が、前記輝度画像における前記領域情報で示される各領域について、前記第2決定工程で反転を行うと決定された領域に関しては、輝度値を反転した前記輝度画像内の対応する領域を、前記設定工程で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得し、一方、前記第2決定工程で反転を行わないと決定された領域に関しては、輝度値を反転していない前記輝度画像内の対応する領域を、前記設定工程で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得する2値部分画像取得工程と、
2値化手段が、前記輝度画像の全面を所定閾値で2値化して得られる2値画像における対応する領域に、前記2値部分画像取得工程で取得した各領域の2値部分画像を上書きすることにより、前記輝度画像に関する第2の2値画像を得る2値化工程と、
分割処理手段が、前記2値化工程で得られた第2の2値画像から文書要素を抽出し、前記生成工程で生成された領域情報で示される各領域を枠の要素とし、前記文書要素と枠の要素とに基づいて木構造を得て、当該木構造に基づいて前記輝度画像の領域分割を行う分割処理工程とを有し、
前記分割処理工程で得る木構造は、前記抽出した文書要素のうち前記領域情報で示される各領域に含まれる文書要素を当該各領域に対応する枠の要素の子孫にした木構造であることを特徴とする文書処理方法。
First determining means, a first determination step of plural determining a threshold for binarizing the brightness image,
An acquisition unit that acquires a plurality of binary images by binarizing the luminance image using each of the plurality of threshold values determined in the first determination step;
Generating means, based on the area of the connected component of black pixels contained multiple binary images respectively acquired by the acquisition step, and generates area information in which the luminance of the background indicating the position and size of each different region Generation process;
A second determination step in which a second determination unit determines whether to invert the luminance value for each region indicated by the region information in the luminance image;
A setting step in which a setting unit sets a threshold for binarizing each region for each region indicated by the region information in the luminance image;
The binary partial image acquisition means, for each region indicated by the region information in the luminance image, for the region determined to be inverted in the second determination step, the correspondence in the luminance image with the luminance value inverted. A binary partial image is obtained by binarizing the area to be processed with the threshold value set for the area in the setting step, and on the other hand, the region determined not to be inverted in the second determination step Is a binary partial image that obtains a binary partial image by binarizing a corresponding region in the luminance image that has not been inverted in luminance value with the threshold value set for the region in the setting step. Acquisition process;
The binarizing means overwrites the binary partial image of each area acquired in the binary partial image acquiring step on the corresponding area in the binary image obtained by binarizing the entire surface of the luminance image with a predetermined threshold. A binarization step for obtaining a second binary image related to the luminance image ;
The division processing means extracts a document element from the second binary image obtained in the binarization step, uses each region indicated by the region information generated in the generation step as a frame element, and the document element Obtaining a tree structure based on the frame elements and dividing the luminance image into regions based on the tree structure ,
The tree structure obtained in the division processing step is a tree structure in which document elements included in each area indicated by the area information among the extracted document elements are descendants of frame elements corresponding to the areas. Characteristic document processing method.
コンピュータを、
輝度画像を2値化するための閾値を複数決定する第1決定手段、
前記第1決定手段で決定された複数の閾値それぞれを用いて前記輝度画像を2値化することにより、複数の2値画像を取得する取得手段と
前記取得手段で取得した複数の2値画像それぞれに含まれる黒画素の連結成分の領域に基づいて、下地の輝度が異なる各領域の位置と大きさ示す領域情報を生成する生成手段、
前記輝度画像における前記領域情報で示される各領域について、輝度値の反転を行うか否かを決定する第2決定手段、
前記輝度画像における前記領域情報で示される各領域について、当該各領域を2値化するための閾値をそれぞれ設定する設定手段、
前記輝度画像における前記領域情報で示される各領域について、前記第2決定手段で反転を行うと決定された領域に関しては、輝度値を反転した前記輝度画像内の対応する領域を、前記設定手段で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得し、一方、前記第2決定手段で反転を行わないと決定された領域に関しては、輝度値を反転していない前記輝度画像内の対応する領域を、前記設定手段で当該領域に対して設定された閾値で2値化することにより2値部分画像を取得する2値部分画像取得手段、
前記輝度画像の全面を所定閾値で2値化して得られる2値画像における対応する領域に、前記2値部分画像取得手段で取得した各領域の2値部分画像を上書きすることにより、前記輝度画像に関する第2の2値画像を得る2値化手段、
前記2値化手段で得られた第2の2値画像から文書要素を抽出し、前記生成手段で生成された領域情報で示される各領域を枠の要素とし、前記文書要素と枠の要素とに基づいて木構造を得て、ここで、前記木構造は、前記抽出した文書要素のうち前記領域情報で示される各領域に含まれる文書要素を当該各領域に対応する枠の要素の子孫にした木構造であり、当該木構造に基づいて前記輝度画像の領域分割を行う分割処理手段、
として機能させるためのプログラムを格納した、コンピュータ読取り可能な記憶媒体。
Computer
First determination means for determining a plurality of threshold values for binarizing the luminance image;
An acquisition unit for acquiring a plurality of binary images by binarizing the luminance image using each of the plurality of threshold values determined by the first determination unit, and a plurality of binary images acquired by the acquisition unit, respectively. generating means based on the area of the connected component of black pixels, for generating area information indicating the position and size of each area where the luminance of the background is different contained,
Second determination means for determining whether or not to invert the luminance value for each region indicated by the region information in the luminance image;
Setting means for setting a threshold value for binarizing each area for each area indicated by the area information in the luminance image;
For each region indicated by the region information in the luminance image, with respect to the region determined to be inverted by the second determining unit, a corresponding region in the luminance image whose luminance value has been inverted is determined by the setting unit. A binary partial image is obtained by binarizing with a threshold value set for the area, while the luminance value is inverted for the area determined not to be inverted by the second determining means. A binary partial image obtaining unit that obtains a binary partial image by binarizing a corresponding region in the non-luminance image with a threshold value set for the region by the setting unit;
By overwriting the binary partial image of each area acquired by the binary partial image acquisition means on the corresponding area in the binary image obtained by binarizing the entire surface of the luminance image with a predetermined threshold, the luminance image binarizing means for obtaining a second binary image about,
A document element is extracted from the second binary image obtained by the binarizing means, each area indicated by the area information generated by the generating means is set as a frame element, and the document element, the frame element, The tree structure is obtained based on the document element included in each area indicated by the area information among the extracted document elements as a descendant of a frame element corresponding to each area. A division processing means for dividing an area of the luminance image based on the tree structure ,
A computer-readable storage medium storing a program for functioning as a computer.
JP2000388887A 2000-12-21 2000-12-21 Document processing apparatus and method Expired - Fee Related JP4366011B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2000388887A JP4366011B2 (en) 2000-12-21 2000-12-21 Document processing apparatus and method
US10/013,675 US7170647B2 (en) 2000-12-21 2001-12-13 Document processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000388887A JP4366011B2 (en) 2000-12-21 2000-12-21 Document processing apparatus and method

Publications (3)

Publication Number Publication Date
JP2002190957A JP2002190957A (en) 2002-07-05
JP2002190957A5 JP2002190957A5 (en) 2008-02-14
JP4366011B2 true JP4366011B2 (en) 2009-11-18

Family

ID=18855549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000388887A Expired - Fee Related JP4366011B2 (en) 2000-12-21 2000-12-21 Document processing apparatus and method

Country Status (2)

Country Link
US (1) US7170647B2 (en)
JP (1) JP4366011B2 (en)

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3950777B2 (en) * 2002-09-30 2007-08-01 キヤノン株式会社 Image processing method, image processing apparatus, and image processing program
JP4423076B2 (en) * 2004-03-22 2010-03-03 キヤノン株式会社 Recognition object cutting apparatus and method
JP4713107B2 (en) * 2004-08-20 2011-06-29 日立オムロンターミナルソリューションズ株式会社 Character string recognition method and device in landscape
US7848567B2 (en) * 2004-09-23 2010-12-07 Fuji Xerox Co., Ltd. Determining regions of interest in synthetic images
KR101037936B1 (en) 2004-11-16 2011-05-30 삼성전자주식회사 Selective Scanning System and Method for Color Documents
JP4646797B2 (en) * 2005-02-01 2011-03-09 キヤノン株式会社 Image processing apparatus, control method therefor, and program
US7570403B2 (en) * 2005-03-16 2009-08-04 Kabushiki Kaisha Toshiba Color image processing apparatus
TWI289809B (en) * 2005-07-05 2007-11-11 Compal Electronics Inc A method for undistorting image frame
JP4717562B2 (en) * 2005-09-02 2011-07-06 キヤノン株式会社 Image processing apparatus and method
JP5215545B2 (en) * 2006-09-13 2013-06-19 Towa株式会社 Inspection method of electronic component mounting status
US20090007128A1 (en) * 2007-06-28 2009-01-01 International Business Machines Corporation method and system for orchestrating system resources with energy consumption monitoring
JP4960817B2 (en) 2007-09-19 2012-06-27 キヤノン株式会社 Image processing apparatus and image processing method
US8262457B2 (en) 2007-11-01 2012-09-11 Wms Gaming Inc. Wagering game apparatus and method to provide a trusted gaming environment
JP5656353B2 (en) * 2007-11-07 2015-01-21 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method and apparatus for controlling access of multilingual text resources
JP5121599B2 (en) 2008-06-30 2013-01-16 キヤノン株式会社 Image processing apparatus, image processing method, program thereof, and storage medium
JP5572926B2 (en) * 2008-07-18 2014-08-20 カシオ計算機株式会社 Display device, display method, and program
US8103098B2 (en) * 2008-09-03 2012-01-24 Primax Electronics Ltd. Method for generating a non-graphical digital image from an original digital image
JP5208043B2 (en) * 2009-04-16 2013-06-12 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP5462522B2 (en) * 2009-05-07 2014-04-02 キヤノン株式会社 Image processing apparatus, image processing method, and program for causing computer to realize the image processing method
JP5462557B2 (en) * 2009-09-03 2014-04-02 キヤノン株式会社 Image processing apparatus and control method thereof
JP5511450B2 (en) * 2010-03-16 2014-06-04 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP5733907B2 (en) 2010-04-07 2015-06-10 キヤノン株式会社 Image processing apparatus, image processing method, and computer program
US9367899B1 (en) * 2015-05-29 2016-06-14 Konica Minolta Laboratory U.S.A., Inc. Document image binarization method
CN105761230B (en) * 2016-03-16 2018-12-11 西安电子科技大学 Single image to the fog method based on sky areas dividing processing
JP6452657B2 (en) * 2016-09-07 2019-01-16 キヤノン株式会社 Image processing apparatus, control method thereof, and program
US10838699B2 (en) 2017-01-18 2020-11-17 Oracle International Corporation Generating data mappings for user interface screens and screen components for an application
US10489126B2 (en) * 2018-02-12 2019-11-26 Oracle International Corporation Automated code generation
CN111476067B (en) * 2019-01-23 2023-04-07 腾讯科技(深圳)有限公司 Character recognition method and device for image, electronic equipment and readable storage medium
CN113554658B (en) * 2020-04-23 2024-06-14 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium
CN111611783B (en) * 2020-06-18 2023-04-25 山东旗帜信息有限公司 Positioning and segmentation method and device for graphic form

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3100391B2 (en) * 1990-08-15 2000-10-16 株式会社リコー Color image area separation device
US5617485A (en) * 1990-08-15 1997-04-01 Ricoh Company, Ltd. Image region segmentation system
US5680479A (en) 1992-04-24 1997-10-21 Canon Kabushiki Kaisha Method and apparatus for character recognition
US5872864A (en) * 1992-09-25 1999-02-16 Olympus Optical Co., Ltd. Image processing apparatus for performing adaptive data processing in accordance with kind of image
JP3258122B2 (en) * 1993-03-31 2002-02-18 株式会社東芝 Image processing device
US5768412A (en) * 1994-09-19 1998-06-16 Hitachi, Ltd. Region segmentation method for particle images and apparatus thereof
DE69523135T2 (en) * 1994-12-28 2002-05-02 Canon K.K., Tokio/Tokyo Image processing device and method
US5920655A (en) * 1995-02-10 1999-07-06 Canon Kabushiki Kaisha Binarization image processing for multi-level image data
JPH11238581A (en) 1998-02-23 1999-08-31 Matsushita Electric Works Ltd Output capacitance amplifier
US6360006B1 (en) * 1998-09-29 2002-03-19 Canon Kabushiki Kaisha Color block selection
JP4018310B2 (en) * 1999-04-21 2007-12-05 株式会社リコー Image binarization apparatus, image imaging apparatus, image binarization method, image imaging method, and computer-readable recording medium storing a program for causing a computer to function as each step of the method
JP3708363B2 (en) * 1999-05-07 2005-10-19 シャープ株式会社 Color image forming apparatus
US6473522B1 (en) * 2000-03-14 2002-10-29 Intel Corporation Estimating text color and segmentation of images
GB2364416B (en) * 2000-06-30 2004-10-27 Post Office Image processing for clustering related text objects
JP3904840B2 (en) * 2000-08-15 2007-04-11 富士通株式会社 Ruled line extraction device for extracting ruled lines from multi-valued images
US6580433B2 (en) * 2001-03-06 2003-06-17 Mitsubishi Heavy Industries, Ltd. Automatic reverse method for reversing the black-and-white monochrome image, and printer unit using the same
US6983078B2 (en) * 2001-05-01 2006-01-03 Hewlett-Packard Development Company, L.P. System and method for improving image quality in processed images

Also Published As

Publication number Publication date
JP2002190957A (en) 2002-07-05
US7170647B2 (en) 2007-01-30
US20020085243A1 (en) 2002-07-04

Similar Documents

Publication Publication Date Title
JP4366011B2 (en) Document processing apparatus and method
JP4646797B2 (en) Image processing apparatus, control method therefor, and program
US7903307B2 (en) Image processing method and image processing apparatus
JP3950777B2 (en) Image processing method, image processing apparatus, and image processing program
CN105528614B (en) A kind of recognition methods of the cartoon image space of a whole page and automatic recognition system
CN100585621C (en) Image processing device and image processing method
JP2003132358A (en) Image processing method, device and system
EP0949579A2 (en) Multiple size reductions for image segmentation
JP2003152995A (en) Image processing device
JP3753357B2 (en) Character extraction method and recording medium
JP2010056827A (en) Apparatus and program for processing image
US6360006B1 (en) Color block selection
JP2003244447A (en) Image processor and image processing method
JP4441300B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium storing the program
JP4693289B2 (en) Image compression apparatus, image compression method, program code, and storage medium
JP2010074342A (en) Image processing apparatus, image forming apparatus, and program
JP4208520B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP4632443B2 (en) Image processing apparatus, image processing method, and program
US8295602B2 (en) Image processing apparatus and image processing method
JP2003046746A (en) Method and apparatus for processing image
JP4228905B2 (en) Image processing apparatus and program
JP2003338934A (en) Image processing equipment and method therefor
JP2001043312A (en) Document image processing device
JP4587167B2 (en) Image processing apparatus and image processing method
JP4027016B2 (en) Image processing apparatus, image processing method, and storage medium

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071221

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071221

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20071221

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080829

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090327

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090403

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090601

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090824

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

Free format text: PAYMENT UNTIL: 20120828

Year of fee payment: 3

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130828

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees