JP3554097B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP3554097B2
JP3554097B2 JP00955496A JP955496A JP3554097B2 JP 3554097 B2 JP3554097 B2 JP 3554097B2 JP 00955496 A JP00955496 A JP 00955496A JP 955496 A JP955496 A JP 955496A JP 3554097 B2 JP3554097 B2 JP 3554097B2
Authority
JP
Japan
Prior art keywords
block
division
processing
type
region
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
JP00955496A
Other languages
Japanese (ja)
Other versions
JPH09198518A (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 JP00955496A priority Critical patent/JP3554097B2/en
Priority to US08/786,913 priority patent/US6201894B1/en
Publication of JPH09198518A publication Critical patent/JPH09198518A/en
Application granted granted Critical
Publication of JP3554097B2 publication Critical patent/JP3554097B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)
  • Processing Or Creating Images (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、所定のフォーマットを有する原稿画像に含まれる属性毎に領域を抽出する画像処理装置及びその方法に関するものである。
【0002】
【従来の技術】
従来の画像処理装置においては複数の罫線を有する原稿画像に対し、その原稿画像に含まれる属性毎に領域を分割する領域分割処理によって、罫線に囲まれた領域を属性の一つとしてその領域を抽出していた。
【0003】
【発明が解決しようとする課題】
しかしながら、上記従来の画像処理装置では、領域分割処理によって罫線に囲まれた領域を抽出できても、領域分割処理のミスの有無はオペレータが目視で確認する必要があった。
また、原稿画像に含まれる所望の罫線に囲まれた領域を、その原稿画像を構成する項目の1つとして抽出しようとしても領域分割処理にミスが有る場合は、その項目を誤って取り出してしまうという問題点があった。
【0004】
本発明は上記の問題点に鑑みてなされたものであり、領域分割処理で生じる処理ミスの有無を容易に判断することができ、かつ、処理ミスがある場合にその処理ミスを容易に修正することができる画像処理装置及びその方法を提供することを目的としている。
また、領域分割処理における操作の作業効率を向上する画像処理装置及びその方法を提供することを目的としている。
【0005】
【課題を解決するための手段】
上記の目的を達成するための本発明による画像処理装置は以下の構成を備える。即ち、
所定のフォーマットに関するフォーマット情報を記憶する記憶手段と、
原稿画像を複数の領域に分割する分割手段と、
前記フォーマット情報に基づいて、前記分割手段で分割された複数の領域の内、所定の位置の領域により前記原稿画像のタイプを分類する処理と、当該分類されたタイプによりキー領域を検出する処理と、当該検出されたキー領域に対して所定の位置にある領域の項目を識別する処理とを行い、いずれかの処理でエラーが生じたか否かをチェックすることによって、前記分割手段による分割結果の正否を判定する判定手段と
を有する。
【0006】
また、好ましくは、前記判定手段で前記分割結果に否があると判定された場合、前記分割手段で分割された領域をディスプレイに表示するように制御し、オペレータからの指示に基づき前記ディスプレイに表示された領域の修正を行う修正手段を、
更に有する。
【0007】
また、好ましくは、前記判定手段で前記分割結果に否があると判定された場合、前記分割手段で分割された複数の領域の内、前記分割手段による分割が間違っている可能性のある領域を、他の領域と区別してディスプレイに表示するように制御する表示制御手段を、
更に有する。
【0008】
また、好ましくは、前記判定手段でチェックされたエラーに基づき、前記分割手段での分割ミスの種類を表示するように制御する表示手段を、
更に有する。
【0011】
また、好ましくは、前記分割手段で分割される領域は、罫線で囲まれる矩形領域である。
【0012】
上記の目的を達成するための本発明による画像処理方法は以下の構成を備える。即ち、
記憶手段に記憶されている所定のフォーマットに関するフォーマット情報を用いて、原稿画像に含まれる領域を抽出する画像処理装置を制御するための画像処理方法であって、
原稿画像を複数の領域に分割する分割工程と、
前記フォーマット情報に基づいて、前記分割工程で分割された複数の領域の内、所定の位置の領域により前記原稿画像のタイプを分類する処理と、当該分類されたタイプによりキー領域を検出する処理と、当該検出されたキー領域に対して所定の位置にある領域の項目を識別する処理とを行い、いずれかの処理でエラーが生じたか否かをチェックすることによって、前記分割工程による分割結果の正否を判定する判定工程と
を有する。
【0016】
【発明の実施の形態】
以下、図面を参照して本発明の好適な実施の形態を詳細に説明する。
図1は本実施の形態の画像処理装置の機能構成を示すブロック図である。
図1において、101はスキャナであり、原稿画像に光を照射し、その反射光を読み取り電気信号に変換する。また、スキャナ101より読み込まれた原稿画像は、イメージデータとしてRAM107のVRAM領域に格納される。102はスキャナインターフェースであり、スキャナ101で得られた電気信号を2値のデジタル電気信号に変換し、他の装置構成要素に伝送する。103はポインティングデバイスとして機能するマウスであり、マウス103を移動することでディスプレイ108上に表示されるカーソル100を移動する。また、画面に表示されるメニューにカーソル100を位置し、そのメニュー上で付帯するボタン(不図示)を用いてドラッグ操作、クリック操作を行うことで、その内容を実行することができる。104はマウスインタフェースであり、マウス103からの信号を受け、それを他の装置構成要素に伝送する。114はKB(キーボード)であり、キーボードを介してデータの入力や命令の実行を行う。113はKBインターフェースであり、KB114からの信号を受け、それを他の装置構成要素に伝送する。
【0017】
105はCPUであり、装置全体の制御及び後述する領域分割等の本発明で説明される処理や認識処理を実行する。106はROMであり、CPU105が実行する制御プログラム、各種処理プログラムやフォントデータ等の各種データを格納している。107はRAMであり、原稿画像の展開や領域分割処理のための作業領域等として用いる。また、スキャナ101より読み込まれたイメージデータ(2値画像データ)を格納するための所定の記憶領域としてVRAM領域を持つ。108はディスプレイであり、RAM107のVRAM領域に格納されているイメージデータや本実施の形態で実行された領域分割結果等を表示する。109はディスプレイインターフェースである。
【0018】
110はFDD(フロッピーディスクドライブ)であり、FDを装着しデータの読み書きが可能である。また、装着されたFD(不図示)に後述する処理フローのプログラムを書き込み、該プログラムを本装置のRAM107に読み込むことで処理を実行させることができる。111はFDDインターフェースである。そして、112は各装置構成要素を接続するバスである。
【0019】
次に本実施の形態で実行される処理について、図2のフローチャートを用いて説明する。
図2は本実施の形態で実行される処理フローを示すフローチャートである。
尚、本実施の形態で実行される処理は、あらかじめ原稿画像を構成する罫線で囲まれる領域(以下、この領域を項目と呼ぶ)が決まっているような、例えば、図11に示すような戸籍文書等に適用した場合について説明するが、これに限定されるものではない。例えば、構成が決まっている原稿画像であるならば、どのようなものでも良い。
【0020】
まず、ステップS201で、原稿画像をスキャナ101で読み込み2値画像データに変換する。ステップS202で、得られた2値画像データに対して、2値画像データに含まれる属性(写真、図形、文字等)毎に領域を分割する領域分割処理を行う。本実施の形態では、領域分割処理において、特に、項目を抽出した場合、その項目の座標データ等の情報をブロックデータとして図3のように記憶する。
【0021】
ここで、図3に示されるブロックデータについて説明する。
図3は本実施の形態のブロックデータの構成を示す図である。
図3は、RAM107に展開される2値画像データに含まれる項目の位置を示すための始点座標(X1,Y1)、終点座標(X2,Y2)、有効フラグ、項目識別ID、認識順序、属性、組方向の情報を格納する。始点座標は、図11に示されるような各項目の右上角の位置座標、終点座標は、各項目の左下角の位置座標を示す。有効フラグは、抽出された項目が有効であるか否かを示す。項目識別IDは、後述する設定方法によって各項目の項目識別IDを格納する。認識順序は、各項目に記入されている文字を認識する場合の認識順序を格納する。属性は、領域分割処理で分割単位である属性を格納する。本発明の場合、項目(罫線で囲まれた領域)を示す属性が格納される。組方向は、各項目に記入されている文字の方向(縦書きあるいは横書き)を示す情報を格納する。
【0022】
次に、ステップS203で、原稿画像の項目の構成を示すフォーマット情報からその原稿画像の項目の構成を分類し、その原稿画像を構成する項目を識別する項目識別処理を行う。
尚、原稿画像の項目の構成を識別する場合、その原稿画像を領域分割して得られるブロックの位置、形状、面積、数等によって、その原稿画像の項目の構成の種類を分類し、各項目を識別する。また、フォーマット情報はあらかじめROM106に記憶されているものとする。
【0023】
また、本実施の形態の原稿画像として用いる戸籍文書の項目を分類し識別するために、各項目を分類し識別するためのID(項目識別ID)を図4の(a)〜(c)のように定義する。そして、各項目のIDを組み合わせることによって戸籍文書の項目を分類し識別する。
ここで、図4の(a)〜(c)に示されるID(項目識別ID)について説明する。
【0024】
図4の(a)は、戸籍文書の項目の構成(以下、ページタイプと呼ぶ)の種別を定義するIDであり、戸籍文書の最上右にある罫線に囲まれたブロック領域(図11参照)に書かれている、「筆頭者」あるいは「非筆頭者」を種別として定義している。図4の(b)は、戸籍文書のページの記載者の種別を定義するIDであり、図4の(b)に示されるような種別のIDが定義されている。図4の(c)は、戸籍文書を構成する項目の項目名を定義するIDであり、図4の(c)に示されるような種別のIDが定義されている。
【0025】
次に、ステップS203で実行される項目識別処理の詳細を、図6を用いて説明する。
図6は本実施の形態の項目識別処理の詳細な処理フローを示すフローチャートである。
まず、ステップS601で、戸籍文書のページタイプの種別を分類し識別する。この識別の方法としては、戸籍文書の最右上にあるブロック(項目)の形状によって、その戸籍文書のページタイプを識別する。
【0026】
尚、戸籍文書のページタイプ、筆頭者が記載されているページタイプ(以下、「筆頭者タイプ」と呼ぶ)と、筆頭者が記載されていないページタイプ(以下、「非筆頭者タイプ」と呼ぶ)の2種類がある。
また、識別の方法としては、例えば、戸籍文書の最右上のブロックの幅がその高さよりも長い場合は「筆頭者タイプ」として識別し、それ以外は「非筆頭者タイプ」として識別することでページタイプを識別する。あるいは、最右上のブロックの幅が、そのブロックのY1座標と同じY1座標を持つブロックの幅よりも大きい場合は「筆頭者タイプ」として識別し、一方、最右上のブロックの幅が、そのブロックのY1座標と同じY1座標を持つブロックの幅が同じである場合は「非筆頭者タイプ」として識別することもできる。
【0027】
再び、フローチャートの説明に戻る。
ステップS601において、戸籍文書の最右上のブロックの幅がその高さよりも長い場合は「筆頭者タイプ」として識別し、ステップS604に進む。一方、戸籍文書の最右上のブロックの幅がその高さよりも短い場合は「非筆頭者タイプ」として識別し、ステップS602に進む。
【0028】
戸籍文書のページタイプが識別されたならば、次に、更に詳細な戸籍文書の識別と項目の識別の鍵となるブロック(以下、KEYブロックと呼ぶ)を、戸籍文書に構成される各項目の相対的な位置関係に検出する。
まず、ページタイプが「筆頭者タイプ」の場合、ステップS604で、「本籍」というタイトルがついているブロックと、編製された年月日が記載されている欄の最初の行のブロックと、入籍データ等が記載されている欄の最初の行のブロックと、「父」というタイトルがついているブロックをそれぞれKEY0〜3ブロックとして検出し、各ブロックデータのアドレスを図5に示すようなKEYブロックデータ構造体に記憶する。
【0029】
ここで図5に示すKEYブロックデータ構造体について説明する。
図5は本実施の形態のKEYブロックデータ構造体の構成を示す図である。
図5において、KEYブロック構造体は、戸籍文書を構成する項目の識別の鍵となる項目の情報を記憶するものであり、図に示すような6つのKEY0〜5ブロックが存在する。そして、ページタイプの種別に応じて検出すべきKEYブロックが検出され、その検出されたKEYブロックのブロックデータを記憶する。
【0030】
次に、ステップS605で、検出したKEY0〜3ブロックを用いて、各KEY0〜3ブロックと共通する情報を持つ項目毎に、更に詳細に項目を抽出し、抽出した項目に対し、項目識別IDを設定する。この設定の詳細については、図7のフローチャートを用いて後述する。
一方、ページタイプが「非筆頭者タイプ」の場合、ステップS602で、1人目の入籍データが記載されている欄の最初の行のブロックと、1人目の「父」というタイトルがついているブロックと、2人目の入籍データ等が記載されている欄の最初の行のブロックと、2人目の「父」というタイトルがついているブロックをそれぞれKEY2〜5ブロックとして検出し、その検出されたKEY2〜5ブロックのブロックデータをKEYブロック構造体に記憶する。
【0031】
次に、ステップS603で、検出したKEY2〜5ブロックを用いて、各KEY2〜5ブロックと共通する情報を持つ項目毎に、更に詳細に項目を抽出し、抽出した項目に対し、項目識別IDを設定する。この設定の詳細については、図8のフローチャートを用いて後述する。
まず、ページタイプが「筆頭者タイプ」の場合の項目識別IDを設定する処理について、図7のフローチャートを用いて説明する。
【0032】
図7は本実施の形態のページタイプが「筆頭者タイプ」の場合の項目識別IDを設定する処理の処理フローを示すフローチャートである。
まず、ステップS701で、KEY0ブロック(図11の「本籍」というタイトルがついているブロック)の下にある3つの同じ幅を持つブロックに対して、それぞれ項目識別IDを設定する。ステップS702で、KEY1ブロック(図11の編製事項が記載されている欄の最初の行のブロック)からKEY1ブロックを含めて左に4個のブロックおよびその下にあるブロックは、同じ項目群(編製事項の欄)とみなせるブロックであるので、これらのブロックに項目識別IDを設定する。
【0033】
ステップS703で、KEY2ブロック(図11の入籍データ等が記載されている欄の最初の行のブロック)からKEY2ブロックを含めて左に10個のブロックは、同じ項目群(入籍データ等の欄)とみなせるブロックであるので、これらのブロックに項目識別IDを設定する。
ステップS704で、KEY2ブロックを含む項目群の下にあるブロックは、KEY3ブロック(図11の「父」というタイトルがついているブロック)からKEY3ブロックを含めて左にあるKEY3ブロックと同じY1座標を持つブロックが存在し、そのブロック数を計数する。そして、ステップS705で、計数されたブロック数に基づいて、KEY2ブロックを含む項目群の下にあるブロックの項目識別IDを設定する。この設定の詳細については、図9のフローチャートを用いて後述する。
【0034】
次に、ページタイプが「非筆頭者タイプ」の場合の項目識別IDを設定する処理について、図8のフローチャートを用いて説明する。
図8は本実施の形態のページタイプが「非筆頭者タイプ」の場合の項目識別IDを設定する処理の処理フローを示すフローチャートである。
まず、ステップS801で、KEY2ブロック(入籍データ等が記載されている欄の最初の行のブロック)からKEY2ブロックを含めて左に9個のブロックは、同じ項目群(入籍データ等の欄)とみなせるブロックであるので、これらのブロックに項目識別IDを設定する。
【0035】
ステップS802で、KEY4ブロック(2人目の入籍データ等が記載されている欄の最初の行のブロック)からKEY4ブロックを含めて左に9個のブロックは、同じ項目群(2人目の入籍データ等の欄)とみなせるブロックであるので、これらのブロックに項目識別IDを設定する。
ステップS803で、KEY2ブロックを含む項目群の下にあるブロックは、KEY3ブロック(「父」というタイトルがついているブロック)からKEY3ブロックを含めて左にあるKEY3ブロックと同じY1座標を持つブロックが存在し、そのブロック数を計数する。そして、ステップS804で、計数されたブロック数に基づいて、KEY2ブロックを含む項目群の下にあるブロックの項目識別IDを設定する。
【0036】
ステップS805で、KEY4ブロックを含む項目群の下にあるブロックは、KEY5ブロック(2人目の「父」というタイトルがついているブロック)からKEY5ブロックを含めて左にあるKEY5ブロックと同じY1座標を持つブロックが存在し、そのブロック数を計数する。そして、ステップS806で、計数されたブロック数に基づいて、KEY4ブロックを含む項目群の下にあるブロックの項目識別IDを設定する。
【0037】
次に、入籍データ等の欄の下にあるブロックの項目識別IDを設定する処理の詳細について、図9のフローチャートを用いて説明する。
図9は本実施の形態の入籍データ等の欄の下にあるブロックの項目識別IDを設定する処理の処理フローを示すフローチャートである。
尚、図9のフローチャートは、図7のフローチャートのステップS704、図8のフローチャートのステップS804、ステップS805で実行される処理であるが、ここでは図7のフローチャートのステップS704、つまり、ページタイプが「筆頭者タイプ」の戸籍文書である場合を、例に挙げて説明する。また、図8のフローチャートのステップS804、ステップS805、つまり、ページタイプが「非筆頭者タイプ」の戸籍文書である場合については、同様の処理で実現されるので、ここでは省略する。
【0038】
まず、ステップS901で、計数されたブロック数を判定し、ブロック数が4の場合は、実父母のみが記載されているタイプ(以下、「実子タイプ」と呼ぶ)と判定して、ステップS902に進む。また、ブロック数が5の場合は、養父あるいは養母のどちらか一方のみが記載されているタイプ(以下、「養子タイプA」と呼ぶ)と判定して、ステップS905に進む。更に、ブロック数が6の場合は、養父および養母の両方が記載されているタイプ(以下、「養子タイプB」と呼ぶ)と判定して、ステップS909に進む。
【0039】
計数されたブロック数が4の場合、つまり、「実子タイプ」である場合、ステップS902で、KEY3ブロックから左に2番目のブロックの形状が横長であるか否かを判定する。横長である場合(ステップS902でYES)、「既婚(夫か妻)タイプ」と判定して、ステップS903に進む。一方、横長でない場合(ステップS902でNO)、「未婚タイプ」と判定して、ステップS904に進む。
【0040】
ステップS903では、「実子タイプ」及び「既婚(夫か妻)タイプ」として、KEY3ブロックとの相対位置関係から項目識別IDを設定する。また、ステップS904では、「実子タイプ」及び「未婚タイプ」として、KEY3ブロックとの相対位置関係から項目識別IDを設定する。
計数されたブロック数が5の場合、つまり、「養子タイプA」である場合、ステップS905で、KEY3ブロックから左に3番目のブロックの形状が横長であるか否かを判定する。横長である場合(ステップS905でYES)、「既婚(夫か妻)タイプ」と判定して、ステップS906に進む。一方、横長でない場合(ステップS905でNO)、「未婚タイプ」と判定して、ステップS907に進む。
【0041】
ステップS906では、「実子タイプ」及び「既婚(夫か妻)タイプ」として、KEY3ブロックとの相対位置関係から項目識別IDを設定する。また、ステップS907では、「実子タイプ」及び「未婚タイプ」として、KEY3ブロックとの相対位置関係から項目識別IDを設定する。
計数されたブロック数が6の場合、つまり、「養子タイプB」である場合、ステップS909で、KEY3ブロックから左に4番目のブロックの形状が横長であるか否かを判定する。横長である場合(ステップS909でYES)、「既婚(夫か妻)タイプ」と判定して、ステップS910に進む。一方、横長でない場合(ステップS909でNO)、「未婚タイプ」と判定して、ステップS911に進む。
【0042】
ステップS910では、「実子タイプ」及び「既婚(夫か妻)タイプ」として、KEY3ブロックとの相対位置関係から項目識別IDを設定する。また、ステップS911では、「実子タイプ」及び「未婚タイプ」として、KEY3ブロックとの相対位置関係から項目識別IDを設定する。
再び、図2のフローチャートの説明に戻る。
【0043】
ステップS204で、上述のステップS203の項目識別処理によって得られた項目に基づいて、上述のステップS202の領域分割処理の処理結果のエラーの有無を判定する領域分割判定処理を行う。この領域分割判定処理の詳細を、図10のフローチャートを用いて説明する。
図10は本実施の形態の領域分割判定処理の詳細な処理フローを示すフローチャートである。
【0044】
まず、ステップS1001で、ページタイプの識別結果のチェックを行う。ステップS1002で、識別結果にエラーがあるか否かを判定する。エラーがある場合、ステップS1008に進む。一方、エラーがない場合、ステップS1003に進む。
例えば、戸籍文書の最右上のブロックの幅が、他の同じY1座標を持つブロックの幅よりも大きいのに「非筆頭者タイプ」と識別されたり、逆に最右上のブロックの幅が他の同じY1座標を持つブロックの幅と同じ幅であるのに「筆頭者タイプ」と識別された場合は、罫線のかすれやテキストの一部を罫線と誤解する等による領域分割処理のミスであると判定する。そして、ステップS1008で、エラーコードとして「1」をセットし、領域分割判定処理を強制終了する。
【0045】
次に、ステップS1003で、KEYブロックの識別結果のチェックを行う。ステップS1004で、識別結果にエラーがあるか否かを判定する。エラーがある場合、ステップS1008に進む。一方、エラーがない場合、ステップS1005に進む。
例えば、戸籍文書のページタイプが「筆頭者タイプ」の場合なのに、KEYブロックが(KEY0、KEY1、KEY2、KEY3)と揃わなかった場合や、「非筆頭者タイプ」の場合なのにKEYブロックが(KEY2、KEY3、KEY4、KEY5)と揃わなかった場合等は、領域分割のミスであると判定する。そして、ステップS1008で、エラーコードとして「1」をセットし、領域分割判定処理処理を強制終了する。
【0046】
次に、ステップS1005で、ページタイプ毎に項目の詳細な識別結果のチェックを行う。ステップS1006で、識別結果にエラーがあるか否かを判定する。エラーがある場合、ステップS1008に進む。一方、エラーがない場合、ステップS1007に進む。
例えば、ページタイプが「筆頭者タイプ」の場合、KEY0ブロックの下の同じ幅を持ったブロックが3つでない場合は、領域分割処理にミスがあると判定する。そして、ステップS1008で、エラーコードとして「1」をセットし、領域分割判定処理を強制終了する。
【0047】
あるいは、KEY1ブロックからKEY1ブロックを含めて左に4個のブロックが同じ幅でない場合は、領域分割処理のミスであると判定する。そして、ステップS1008で、エラーコードとして「1」をセットし、領域分割判定処理を強制終了する。
また、KEY2ブロックからKEY2ブロックを含めて左に10個ブロックが同じ幅でない場合は、領域分割処理のミスであると判定する。そして、ステップS1008で、エラーコードとして「1」をセットし、領域分割判定処理を強制終了する。
【0048】
また、KEY3ブロックからKEY3ブロックを含めて左にあるKEY3ブロックと同じY1座標を持つブロック個数が3個以下または7個以上である場合は、領域分割処理のミスであると判定される。そして、ステップS1008で、エラーコードとして「1」をセットし、領域分割判定処理を強制終了する。
同様にして、ページタイプが「非筆頭者タイプ」の場合の詳細な識別結果のチェックを行う。
【0049】
以上の識別結果のチェックによって項目識別処理が正常に終了したと判定された場合は、領域分割処理にミスはなかったとして、ステップS1007で、エラーコードとして「0」をセットし、領域分割判定処理を終了する。
再び、図2のフローチャートの説明に戻る。
ステップS205で、領域分割判定処理の処理結果をディスプレイ108に表示する領域分割判定結果表示処理を行う。ステップS206で、領域分割判定結果表示処理の処理結果より、領域分割処理にミスがあるか否かを判定する。領域分割処理にミスがない場合、つまり、エラーコードに「0」がセットしてある場合、ミスがないと判定される。そして、正常終了した旨をディスプレイ108に表示し、全ての処理を終了する。一方、領域分割処理にミスがある場合、つまり、エラーコードに「1」がセットしてある場合、領域分割処理にミスがあった旨をディスプレイ108に表示し、領域分割処理のミスの修正をオペレータに促す。
【0050】
ステップS207で、領域分割判定結果表示処理によって領域分割処理のミスがあった旨が表示された後、元原稿画像上に現在のブロックの領域分割状態が表示される。そして、オペレータは修正対象を拡大、縮小、移動、削除するか、新しいブロックを作成する等の画像処理によって領域分割処理の処理結果を修正する領域分割ミス修正処理を行う。
【0051】
修正した結果は、オペレータがマウス103で修正終了ボタンを押す等によって指示することで、修正された項目に対応するブロックデータが更新された後、再度項目識別処理が実行される。修正した結果が正しければ、領域分割判定処理の処理結果として、エラーコードに「0」がセットされ、全ての処理が正常終了する。
【0052】
次に、上述の図2のフローチャートにおいて実行される具体的な処理の過程を、図11〜図15を用いて説明する。
まず、原稿画像の領域分割による属性毎の領域の抽出にミスがなかった場合の例を示す。
例えば、図11のような戸籍文書の原稿画像に対して、図2のステップS202で説明される領域分割処理を施した結果として、図12に示すような複数の項目のブロックB1201〜B1236が得られたとする。そして、図12の領域分割結果に対し、図2のステップS203で説明される項目識別処理を行うと、この場合、最右上のブロックB1201の幅が高さより長く、かつ他の同じY1座標を持つブロックの幅とは異なるので「筆頭者タイプ」と判定される。
【0053】
そして、ページタイプが「筆頭者タイプ」と判定されたので、最右上のブロックB1201を『「本籍」というタイトルがついているブロック(KEY0)』とみなし、KEYブロックデータとしてそのアドレスを記録する。
次に、KEY0ブロックの左に隣接し、KEY0ブロックのY1座標が同じブロックB1205を『編製事項が記載されている欄の最初の行のブロック(KEY1)』とみなし、KEYブロックデータとしてそのアドレスを記憶する。
【0054】
次に、KEY0ブロックのY1座標と同じY1座標を持ち、KEY1ブロックよりも高さが大きく、そのX2座標が最も右にあるブロックB1209を『入籍データ等が記載されている欄の最初の行のブロック(KEY2)』とみなし、KEYブロックデータとしてそのアドレスを記録する。さらにそのブロックB1209の下に隣接するブロックB1223を『「父」というタイトルがついているブロック(KEY3)』とみなして、KEYブロックデータとしてそのアドレスを記憶する。
【0055】
次に、上述のように検出した各KEYブロックと共通する情報を持つ項目毎に、更に詳細にブロックを抽出する。そして、抽出した各ブロックに項目識別IDを設定する。
まず、ページタイプが「筆頭者タイプ」であるので、KEY0ブロックの下には3つの同じ幅を持ったブロックB1202〜B1204が存在する。そのため、KEY0ブロックも含めてそれぞれのブロックに項目識別IDを設定する。例えば、ブロックB1201の項目識別IDは図4の(a)〜(c)を用いると、
1000(ページタイプが筆頭者)+000(筆頭者のページの記載者)+10(本籍というタイトル)=1010
が項目識別IDとして設定される。同様にして、他のブロックB1202〜B1204の項目識別IDはそれぞれ1011〜1013が設定される。
【0056】
次に、KEY1ブロックからKEY1ブロックを含めて左に4個のブロックB1205〜B1208及びその下にあるブロックB1219〜B1222はKEY1ブロックと共通する情報を持つブロックであるので、それぞれのブロックに対応する項目識別IDを設定する。この場合、それぞれの項目識別IDは1020〜1027が設定される。
【0057】
次に、KEY2ブロックからKEY2ブロックを含めて左に10個のブロックB1209〜B1218はKEY2ブロックと共通する情報を持つブロックであるので、それぞれのブロックに対応する項目識別IDを設定する。この場合、それぞれの項目識別IDは1209〜1218が設定される。
次に、KEY2ブロックの下にあるブロックはKEY3ブロックからKEY2ブロックを含めて左にある個数によって、更に項目識別IDを設定する。
【0058】
図11に示される戸籍文書の場合は、その個数が6個であるので、養父および養母の両方が記載されているタイプ(「養父タイプB」)であると判定される。また、更にKEY3ブロックから左に4番目のブロックB1233の形状が横長であるので、「既婚(夫か妻)タイプ」であると判定される。
その結果、KEY3ブロックのY1座標と同じY1座標をもつブロックに対して右から、ブロックB1223はKEY3ブロックそのものであり『「父」とタイトルがついているブロック』と判定され、項目識別IDは1030が設定される。
【0059】
また、ブロックB1226は『「母」とタイトルがついているブロック』と判定され、項目識別IDは1032が設定される。ブロックB1229は『「養父」とタイトルがついているブロック』と判定され、項目識別IDは1040が設定される。ブロックB1232は『「養母」とタイトルがついているブロック』と判定され、項目識別IDは1042が設定される。ブロックB1233は『「夫」または「妻」と記載されるブロック』と判定され、項目識別IDは1050が設定される。ブロックB1235は『「出生」とタイトルがついているブロック』と判定され、項目識別IDは1070が設定される。
【0060】
次に、「父」、「母」、「養父」、「養母」、「夫」または「妻」、「出生」の各ブロックの直下のブロックは、各々の「名前」または「出生年月日」が記載されているブロックと判定され、ブロックB1224には、項目識別IDとして1031が設定される。ブロックB1227には、項目識別IDとして1033が設定される。ブロックB1228には、項目識別IDとして1041が設定される。ブロックB1231には、項目識別IDとして1043が設定される。ブロックB1234には、項目識別IDとして1051が設定される。ブロックB1236には、項目識別IDとして1071が設定される。
【0061】
次に、ブロックB1224とB1227の直下のブロックB1225は「続柄」が記載されているブロックと判定され、ブロックB1225には、項目識別IDとして1034が設定される。また、ブロックB1228とB1231の直下のブロックB1230は「続柄」が記載されているブロックと判定され、ブロックB1230には、項目識別IDとして1034が設定される。
【0062】
このようにして、各項目は図13に示すような項目識別IDが設定されることになる。
そして、項目識別処理の結果から領域分割判定処理を行う。この場合、領域分割処理にミスがないので、領域分割判定結果表示処理によってディスプレイ108にその旨が表示された後、正常終了する。
【0063】
一方、原稿画像の領域分割による属性毎の領域の抽出にミスがあった場合の例を示す。
例えば、図11のような戸籍文書の原稿画像に対して、図2のステップS202で説明される領域分割処理を施した結果として、図14に示すような領域分離処理結果が得られたとする。そして、図14の処理結果に対し、図2のステップS203で説明される項目識別処理を行うと、この場合、罫線1401がかすれていることでブロックB1402がひとまとまりになっている。そのため、最右上のブロックB1402は、高さが幅より長いので「非筆頭者タイプ」と識別される。そして、項目識別処理において、「非筆頭者タイプ」と識別されたにもかかわらず、ブロックB1402のY1座標と同じY1座標を有する他のブロックとは幅が異なるので、「非筆頭者タイプ」として識別することに矛盾が生じる。その結果、この場合は、領域分割処理のミスとして判定され、エラーコードに「1」がセットされ、領域分割判定処理が強制終了される。
【0064】
次に、領域分割判定結果表示処理において、領域分割処理にミスがあった旨がディスプレイ108に表示され、元原稿画像(図11の戸籍文書)の上に処理結果(図14)が表示される。
元原稿画像画像上に現在の処理結果(図14)が表示されると、オペレータはその中から、間違っているブロックB1402(図14)を図15に示すようなブロックB1502の形に縮小しかつ、新しいブロックB1501を作成する。
【0065】
そして、オペレータがマウス103で修正終了のボタン1503を指示することによって、修正された項目のブロックの内容は対応するブロックデータに更新され、再度、項目識別処理が実行される。
そして、項目識別処理の結果から領域分割判定処理を行う。この場合、領域分割処理のミスが修正されたので、領域分割判定結果表示処理によってディスプレイ108にその旨が表示された後、正常終了する。
【0066】
以上説明したように、本実施の形態によれば、戸籍文書に含まれる項目の構成を識別することで、領域分割処理の処理ミスの有無を判定することができる。また、領域分割処理の処理ミスがある場合でも、その処理ミスを修正することができる。
また、上述の領域分割処理と、項目識別処理と、領域分割判定処理と、領域分割判定結果表示処理と、領域分割ミス修正処理を設けて領域分割のミスの修正を行うことができるようにすることにより、ミスの有無の判断が容易になり、操作性を向上し、処理全体の時間の短縮が図ることができる。
【0067】
尚、領域分割判定処理において、エラーがあると判定された場合は、一律にエラーコードとして「1」をセットすることで、領域分割判定結果表示処理において、その旨をオペレータに表示する構成であったが、これに限らない。例えば、各種ミスの種類別に個別にエラーコードを設定することでミスの種類を特定し、領域分割判定結果表示処理において具体的にミスの種類をテキストや音声で示すことも可能である。
【0068】
例えば、図16のフローチャートに示されるような領域分割判定処理を行っても良い。
図16は本実施の形態の他の構成による領域分割判定処理の詳細な処理フローを示すフローチャートである。
まず、ステップS1601で、ページタイプの識別結果のチェックを行う。ステップS1602で、識別結果にエラーがあるか否かを判定する。エラーがある場合、ステップS1608に進む。一方、エラーがない場合、ステップS1603に進む。
【0069】
例えば、戸籍文書の最右上のブロックの幅が、他の同じY1座標を持つブロックの幅よりも大きいのに「非筆頭者タイプ」と識別されたり、逆に最右上のブロックの幅が他の同じY1座標を持つブロックの幅と同じ幅であるのに「筆頭者タイプ」と識別された場合は、罫線のかすれやテキストの一部を罫線と誤解するなどによる領域分割処理のミスであると判定する。そして、ステップS1608で、エラーコードとして「1」をセットし、領域分割判定処理を強制終了する。
【0070】
次に、ステップS1603で、KEYブロックの識別結果のチェックを行う。ステップS1604で、識別結果にエラーがあるか否かを判定する。エラーがある場合、ステップS1609に進む。一方、エラーがない場合、ステップS1605に進む。
例えば、戸籍文書のページタイプが「筆頭者タイプ」の場合なのに、KEYブロックが(KEY0、KEY1、KEY2、KEY3)と揃わなかった場合や、「非筆頭者タイプ」の場合なのにKEYブロックが(KEY2、KEY3、KEY4、KEY5)と揃わなかった場合等は、領域分割処理のミスであると判定する。そして、ステップS1609で、エラーコードとして「2」をセットし、領域分割判定処理を強制終了する。
【0071】
次に、ステップS1605で、ページタイプ毎に項目の詳細な識別結果のチェックを行う。ステップS1606で、識別結果にエラーがあるか否かを判定する。エラーがある場合、ステップS1610に進む。一方、エラーがない場合、ステップS1607に進む。
例えば、ページタイプが「筆頭者タイプ」の場合、KEY0ブロックの下の同じ幅を持ったブロックが3つでない場合は、領域分割処理のミスであると判定する。そして、ステップS1610で、エラーコードとして「3」をセットし、領域分割判定処理を強制終了する。
【0072】
あるいは、KEY1ブロックからKEY1ブロックを含めて左に4個のブロックが同じ幅でない場合は、領域分割処理のミスであると判定する。そして、ステップS1610で、エラーコードとして「3」をセットし、領域分割判定処理を強制終了する。
また、KEY2ブロックからKEY2ブロックを含めて左に10個ブロックが同じ幅でない場合は、領域分割処理のミスであると判定する。そして、ステップS1610で、エラーコードとして「3」をセットし、領域分割判定処理を強制終了する。
【0073】
また、KEY3ブロックからKEY3ブロックを含めて左にあるKEY3ブロックと同じY1座標を持つブロック個数が3個以下または7個以上である場合は、領域分割処理のミスであると判定する。そして、ステップS1610で、エラーコードとして「4」をセットし、領域分割判定処理を強制終了する。
同様にして、ページタイプが「非筆頭者タイプ」の場合の詳細な識別結果のチェックを行う。
【0074】
以上の識別結果のチェックによって項目識別処理が正常に終了したと判定された場合は、領域分割処理にエラーはなかったとして、ステップS1607で、エラーコードとして「0」をセットし、領域分割判定処理を終了する。
また、具体的にミスの種類を表示すると同時に、領域分割ミス修正処理において元原稿画像の上に表示する矩形画像の内、間違っている可能性のある矩形に対して、色や形や形状を変えて表示することも可能である。
【0075】
例えば、図14の場合、ページタイプの識別チェックの結果において、領域分割処理にミスがあると判定されたので、ブロックB1402に対して、「赤色の枠にする」や「領域内を赤色にする」や「枠を点線にする」や「枠を点滅させる」等の表示をすることも可能である。
尚、本発明は、複数の機器(例えばホストコンピュータ、インタフェース機器、リーダ、プリンタ等)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置等)に適用してもよい。
【0076】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。
【0077】
この場合、記憶媒体から読出されたプログラムコード自体が上述した実施の形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
プログラムコードを供給するための記憶媒体としては、例えば、フロッピディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることができる。
【0078】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施の形態の機能が実現される場合も含まれることは言うまでもない。
【0079】
更に、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0080】
本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するプログラムコードを格納することになるが、簡単に説明すると、図17あるいは図18のメモリマップ例に示す各モジュールを記憶媒体に格納することになる。
すなわち、図17では、少なくとも「記憶モジュール」、「分割モジュール」および「判定モジュール」の各モジュールのプログラムコードを記憶媒体に格納すればよい。
【0081】
尚、「記憶モジュール」は、所定のフォーマットに関するフォーマット情報を記憶媒体に記憶する。「分割モジュール」は、所定のフォーマットを有する原稿画像を複数の領域に分割する。「判定モジュール」は、フォーマット情報に基づいて、分割結果の正否を判定する。
また、図18では、少なくとも「記憶モジュール」、「分割モジュール」、「識別モジュール」および「判定モジュール」の各モジュールのプログラムコードを記憶媒体に格納すればよい。
【0082】
尚、「記憶モジュール」は、複数種類の所定のフォーマットを有する原稿画像に関するそれぞれのフォーマット情報を記憶媒体に記憶する。「分割モジュール」は、所定のフォーマットを有する原稿画像を複数の領域に分割する。「識別モジュール」は、分割される領域の特徴に基づいて、所定のフォーマットを有する原稿画像の種類を識別する。識別された種類に対応する所定のフォーマットを有する原稿画像のフォーマット情報に基づいて、分割結果の正否を判定する。
【0083】
【発明の効果】
以上の説明からも明らかなように、本発明によれば、領域分割処理で生じる処理ミスの有無を容易に判断することができ、かつ、処理ミスがある場合にその処理ミスを容易に修正することができる画像処理装置及びその方法を提供できる。
また、領域分割処理における操作の作業効率を向上する画像処理装置及びその方法を提供できる。
【図面の簡単な説明】
【図1】本実施の形態の画像処理装置の機能構成を示すブロック図である。
【図2】本実施の形態で実行される処理の処理フローを示すフローチャートである。
【図3】本実施の形態のブロックデータの構成を示す図である。
【図4】本実施の形態の項目識別IDの構成を示すである。
【図5】本実施の形態のKEYブロックデータ構造体の構成を示す図である。
【図6】本実施の形態の項目識別処理の詳細な処理フローを示すフローチャートである。
【図7】本実施の形態のページタイプが「筆頭者タイプ」の場合の項目識別IDを設定する処理の処理フローを示すフローチャートである。
【図8】本実施の形態のページタイプが「非筆頭者タイプ」の場合の項目識別IDを設定する処理の処理フローを示すフローチャートである。
【図9】本実施の形態の入籍データ等の欄の下にあるブロックに項目識別IDを設定する処理の処理フローを示すフローチャートである。
【図10】本実施の形態の領域分割判定処理の詳細な処理フローを示すフローチャートである。
【図11】本実施の形態の原稿画像の例を示す図である。
【図12】本実施の形態の原稿画像に対して実行した領域分割処理の処理結果を示す図である。
【図13】本実施の形態の原稿画像に対して設定した項目識別IDの設定結果を示す図である。
【図14】本実施の形態の原稿画像に対して実行した領域分割処理にミスがあった時の処理結果を示す図である。
【図15】本実施の形態の原稿画像に対して実行した領域分割処理にミスがあった時の処理結果を修正する処理を示す図である。
【図16】本実施の形態の他の構成による領域分割判定処理の詳細な処理フローを示すフローチャートである。
【図17】本発明で実行される処理フローのプログラムを記憶させたFDのメモリマップの構造を示す図である。
【図18】本発明で実行される処理フローのプログラムを記憶させたFDのメモリマップの構造を示す図である。
【符号の説明】
101 スキャナ
102 スキャナインタフェース
103 マウス
104 マウスインタフェース
105 CPU
106 ROM
107 RAM
108 ディスプレイ
109 ディスプレイインタフェース
110 FDD
111 FDDインタフェース
112 バス
113 KBインタフェース
114 KB
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing apparatus and method for extracting a region for each attribute included in a document image having a predetermined format.
[0002]
[Prior art]
In a conventional image processing apparatus, a document image having a plurality of ruled lines is divided into regions for each attribute included in the document image. Had been extracted.
[0003]
[Problems to be solved by the invention]
However, in the above-described conventional image processing apparatus, even if an area surrounded by ruled lines can be extracted by the area division processing, the operator needs to visually check whether or not there is a mistake in the area division processing.
Further, even if an attempt is made to extract a region surrounded by a desired ruled line included in a document image as one of the items constituting the document image, if there is an error in the region division processing, the item is erroneously extracted. There was a problem.
[0004]
The present invention has been made in view of the above-described problems, and can easily determine whether there is a processing error that occurs in the area division processing, and easily corrects the processing error when there is a processing error. It is an object of the present invention to provide an image processing apparatus and a method thereof that can perform the above-described operations.
It is another object of the present invention to provide an image processing apparatus and a method for improving the work efficiency of the operation in the area division processing.
[0005]
[Means for Solving the Problems]
An image processing apparatus according to the present invention for achieving the above object has the following configuration. That is,
Storage means for storing format information about a predetermined format;
Dividing means for dividing the original image into a plurality of areas;
A process of classifying the type of the document image by a region at a predetermined position among a plurality of regions divided by the dividing unit based on the format information; and a process of detecting a key region by the classified type. Performing a process of identifying an item of a region at a predetermined position with respect to the detected key region, and checking whether an error has occurred in any of the processes. Determining means for determining right or wrong;
Having.
[0006]
Further, preferably, when the determination unit determines that there is no result in the division result, the region divided by the division unit is controlled to be displayed on a display, and displayed on the display based on an instruction from an operator. Correction means for correcting the set area
Have more.
[0007]
Preferably, when the determination unit determines that there is no result in the division result, of the plurality of regions divided by the division unit, an area in which division by the division unit may be incorrect is determined. Display control means for controlling display on the display separately from other areas,
Have more.
[0008]
Preferably, based on the error checked by the determination unit, a display unit that controls to display the type of division error in the division unit,
Have more.
[0011]
Preferably, the area divided by the dividing means is a rectangular area surrounded by ruled lines.
[0012]
An image processing method according to the present invention for achieving the above object has the following configuration. That is,
An image processing method for controlling an image processing device that extracts an area included in a document image using format information about a predetermined format stored in a storage unit,
A dividing step of dividing the document image into a plurality of areas;
Based on the format information, of the plurality of regions divided in the dividing step, a process of classifying the type of the document image according to a region of a predetermined position, a process of detecting a key region by the classified type Performing a process of identifying an item of a region at a predetermined position with respect to the detected key region, and checking whether an error has occurred in any of the processes. A judging step of judging right or wrong;
Having.
[0016]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram illustrating a functional configuration of the image processing apparatus according to the present embodiment.
In FIG. 1, reference numeral 101 denotes a scanner which irradiates a document image with light and reads the reflected light to convert the light into an electric signal. The original image read by the scanner 101 is stored in the VRAM area of the RAM 107 as image data. Reference numeral 102 denotes a scanner interface, which converts an electric signal obtained by the scanner 101 into a binary digital electric signal and transmits it to another device component. Reference numeral 103 denotes a mouse that functions as a pointing device. By moving the mouse 103, the cursor 100 displayed on the display 108 is moved. Further, by positioning the cursor 100 on a menu displayed on the screen and performing a drag operation and a click operation using a button (not shown) attached to the menu, the contents can be executed. Reference numeral 104 denotes a mouse interface, which receives a signal from the mouse 103 and transmits the signal to another device component. A KB (keyboard) 114 inputs data and executes instructions via the keyboard. A KB interface 113 receives a signal from the KB 114 and transmits the signal to another device component.
[0017]
Reference numeral 105 denotes a CPU, which executes control and recognition processing described in the present invention, such as control of the entire apparatus and area division described later. A ROM 106 stores a control program executed by the CPU 105, various processing programs, and various data such as font data. Reference numeral 107 denotes a RAM, which is used as a work area for developing a document image and processing for dividing an area. Further, it has a VRAM area as a predetermined storage area for storing image data (binary image data) read by the scanner 101. Reference numeral 108 denotes a display, which displays image data stored in the VRAM area of the RAM 107, a result of area division performed in the present embodiment, and the like. Reference numeral 109 denotes a display interface.
[0018]
Reference numeral 110 denotes an FDD (Floppy Disk Drive), which can read and write data by mounting the FDD. Further, a program of a processing flow described later is written in an attached FD (not shown), and the program can be read into the RAM 107 of the apparatus to execute the processing. 111 is an FDD interface. Reference numeral 112 denotes a bus for connecting each device component.
[0019]
Next, processing executed in the present embodiment will be described with reference to the flowchart in FIG.
FIG. 2 is a flowchart showing a processing flow executed in the present embodiment.
The processing executed in the present embodiment is performed in such a manner that an area surrounded by ruled lines (hereinafter, this area is referred to as an item) constituting a document image is determined in advance, for example, as shown in FIG. A case where the present invention is applied to a document or the like will be described, but the present invention is not limited to this. For example, any document image may be used as long as the document image has a fixed configuration.
[0020]
First, in step S201, a document image is read by the scanner 101 and converted into binary image data. In step S202, the obtained binary image data is subjected to a region dividing process for dividing a region for each attribute (photo, graphic, character, etc.) included in the binary image data. In this embodiment, when an item is extracted in the area dividing process, information such as coordinate data of the item is stored as block data as shown in FIG.
[0021]
Here, the block data shown in FIG. 3 will be described.
FIG. 3 is a diagram showing a configuration of block data according to the present embodiment.
FIG. 3 shows start point coordinates (X1, Y1), end point coordinates (X2, Y2), valid flag, item identification ID, recognition order, attribute for indicating the position of an item included in the binary image data developed in the RAM 107. , Information on the group direction. The start point coordinates indicate the position coordinates of the upper right corner of each item as shown in FIG. 11, and the end point coordinates indicate the position coordinates of the lower left corner of each item. The valid flag indicates whether the extracted item is valid. The item ID stores the item ID of each item according to a setting method described later. The recognition order stores the recognition order when recognizing characters written in each item. The attribute stores an attribute that is a unit of division in the area dividing process. In the case of the present invention, an attribute indicating an item (an area surrounded by ruled lines) is stored. The set direction stores information indicating the direction (vertical writing or horizontal writing) of the character written in each item.
[0022]
Next, in step S203, the configuration of the item of the document image is classified based on the format information indicating the configuration of the item of the document image, and an item identification process for identifying the item configuring the document image is performed.
When identifying the configuration of items of a document image, the types of configuration of the items of the document image are classified according to the position, shape, area, number, etc. of blocks obtained by dividing the document image into regions. Identify. It is assumed that the format information is stored in the ROM 106 in advance.
[0023]
Further, in order to classify and identify the items of the family register document used as the document image of the present embodiment, IDs (item identification IDs) for classifying and identifying each item are shown in FIGS. 4A to 4C. Is defined as Then, the items of the family register document are classified and identified by combining the IDs of the items.
Here, the IDs (item identification IDs) shown in FIGS. 4A to 4C will be described.
[0024]
FIG. 4A shows an ID that defines the type of the configuration of the items of the family register document (hereinafter referred to as a page type), and is a block area surrounded by a ruled line at the top right of the family register document (see FIG. 11). , "Leader" or "non-leader" is defined as a type. FIG. 4B is an ID that defines the type of the writer of the page of the family register document, and the type ID as shown in FIG. 4B is defined. FIG. 4C is an ID that defines the item names of the items that make up the family register document, and an ID of a type as shown in FIG. 4C is defined.
[0025]
Next, details of the item identification processing executed in step S203 will be described with reference to FIG.
FIG. 6 is a flowchart illustrating a detailed processing flow of the item identification processing according to the present embodiment.
First, in step S601, the type of the page type of the family register document is classified and identified. As a method for this identification, the page type of the family register document is identified by the shape of the block (item) at the upper right of the family register document.
[0026]
In addition, the page type of the family register document, the page type in which the first person is described (hereinafter, referred to as “first person type”), and the page type in which the first person is not described (hereinafter, referred to as “non-first person type”) ).
Also, as a method of identification, for example, if the width of the upper right block of the family register document is longer than its height, it is identified as "first person type", otherwise, it is identified as "non-first person type". Identify the page type. Alternatively, if the width of the top right block is larger than the width of the block having the same Y1 coordinate as the Y1 coordinate of the block, the block is identified as “leader type”, while the width of the top right block is the block of the top right. If the width of the block having the same Y1 coordinate as the Y1 coordinate is the same, it can be identified as “non-first person type”.
[0027]
Return to the description of the flowchart again.
In step S601, if the width of the upper right block of the family register document is longer than its height, it is identified as "first person type", and the process proceeds to step S604. On the other hand, if the width of the upper right block of the family register document is shorter than its height, the block is identified as “non-leader type” and the process proceeds to step S602.
[0028]
When the page type of the family register document is identified, a block (hereinafter, referred to as a KEY block) that is a key for identifying the family register document and identifying the item in more detail is then assigned to each item included in the family register document. Detect relative position.
First, if the page type is "first person type", in step S604, a block entitled "Home register", a block in the first line of the column in which the knitting date is described, and the enrollment data Are detected as KEY 0 to 3 blocks, respectively, in the first row of the column in which columns are described, and the KEY block data structure as shown in FIG. Remember in the body.
[0029]
Here, the KEY block data structure shown in FIG. 5 will be described.
FIG. 5 is a diagram showing a configuration of a KEY block data structure according to the present embodiment.
In FIG. 5, a KEY block structure stores information of an item which is a key of identification of an item constituting a family register document, and includes six KEY0 to 5 blocks as shown in FIG. Then, a KEY block to be detected is detected according to the type of the page type, and block data of the detected KEY block is stored.
[0030]
Next, in step S605, using the detected KEY0 to 3 blocks, an item is extracted in more detail for each item having information common to each of the KEY0 to 3 blocks, and an item identification ID is assigned to the extracted item. Set. Details of this setting will be described later using the flowchart of FIG.
On the other hand, if the page type is “non-leader type”, in step S602, the block in the first row of the column in which the first entry data is described and the first block with the title “father” The block in the first row of the column in which the enrollment data and the like of the second person are described and the block with the title "Father" are detected as KEY2 to 5 blocks, respectively, and the detected KEY2 to 5 are detected. The block data of the block is stored in the KEY block structure.
[0031]
Next, in step S603, using the detected KEY2 to 5 blocks, an item is extracted in more detail for each item having information common to each of the KEY2 to 5 blocks, and an item identification ID is assigned to the extracted item. Set. Details of this setting will be described later with reference to the flowchart of FIG.
First, the process of setting the item identification ID when the page type is “first person type” will be described with reference to the flowchart of FIG.
[0032]
FIG. 7 is a flowchart showing a processing flow of the processing for setting the item identification ID when the page type is “first person type” in the present embodiment.
First, in step S701, an item identification ID is set for each of three blocks having the same width below the KEY0 block (the block entitled "Home" in FIG. 11). In step S702, four blocks to the left including the KEY1 block from the KEY1 block (the block in the first row of the column in which the knitting items are described in FIG. 11) and the blocks under the KEY1 block belong to the same item group (knitting). Items), the item identification IDs are set in these blocks.
[0033]
In step S703, 10 blocks to the left including the KEY2 block from the KEY2 block (the block in the first row of the column where enrollment data and the like in FIG. 11 are described) are the same item group (the column for enrollment data and the like). Therefore, item identification IDs are set for these blocks.
In step S704, the blocks below the item group including the KEY2 block have the same Y1 coordinates as the KEY3 block on the left including the KEY3 block from the KEY3 block (the block entitled “Father” in FIG. 11). There are blocks, and the number of blocks is counted. Then, in step S705, based on the counted number of blocks, the item identification ID of the block below the item group including the KEY2 block is set. Details of this setting will be described later using the flowchart of FIG.
[0034]
Next, a process of setting an item identification ID when the page type is “non-leader type” will be described with reference to the flowchart of FIG.
FIG. 8 is a flowchart illustrating a processing flow of a process of setting an item identification ID when the page type is “non-first person type” according to the present embodiment.
First, in step S801, nine blocks to the left including the KEY2 block from the KEY2 block (the block in the first row of the column in which enrollment data and the like are described) are the same as the same item group (the column for enrollment data and the like). Since the blocks can be regarded as items, item identification IDs are set for these blocks.
[0035]
In step S802, nine blocks to the left including the KEY4 block from the KEY4 block (the block in the first row of the column in which the second person enrollment data and the like are described) belong to the same item group (the second person enrollment data and the like). Column), an item identification ID is set in these blocks.
In step S803, the blocks below the item group including the KEY2 block include blocks having the same Y1 coordinates as the KEY3 block on the left including the KEY3 block from the KEY3 block (the block entitled “Father”). Then, the number of blocks is counted. Then, in step S804, based on the counted number of blocks, the item identification ID of the block below the item group including the KEY2 block is set.
[0036]
In step S805, the blocks below the item group including the KEY4 block have the same Y1 coordinates as the KEY5 block on the left including the KEY5 block from the KEY5 block (the block titled "Father"). There are blocks, and the number of blocks is counted. Then, in step S806, based on the counted number of blocks, an item identification ID of a block below an item group including four KEY blocks is set.
[0037]
Next, the details of the process of setting the item identification ID of the block below the entry data column will be described with reference to the flowchart of FIG.
FIG. 9 is a flowchart showing a processing flow of the processing for setting the item identification ID of the block below the column of the enrollment data or the like according to the present embodiment.
Note that the flowchart of FIG. 9 is a process executed in step S704 of the flowchart of FIG. 7 and steps S804 and S805 of the flowchart of FIG. 8. Here, step S704 of the flowchart of FIG. A case where the document is a “first person type” family register document will be described as an example. Steps S804 and S805 in the flowchart of FIG. 8, that is, the case where the page type is a "non-first person type" family register document are realized by the same processing, and thus the description is omitted here.
[0038]
First, in step S901, the number of counted blocks is determined. If the number of blocks is 4, a type in which only the actual parents are described (hereinafter, referred to as a “real child type”) is determined, and the process proceeds to step S902. move on. If the number of blocks is 5, it is determined that only one of the adoptive father and the adoptive mother is described (hereinafter, referred to as “adoptive type A”), and the process proceeds to step S905. Further, when the number of blocks is 6, it is determined that the type includes both the adoptive father and the adoptive mother (hereinafter, referred to as “adoptive type B”), and the process proceeds to step S909.
[0039]
If the counted number of blocks is 4, that is, if it is the “child type”, in step S902, it is determined whether the shape of the second block to the left of the KEY3 block is horizontally long. If it is horizontal (YES in step S902), it is determined to be “married (husband or wife) type” and the process proceeds to step S903. On the other hand, if it is not horizontal (NO in step S902), it is determined to be “unmarried type” and the process proceeds to step S904.
[0040]
In step S903, an item identification ID is set as the "actual child type" and "married (husband or wife) type" from the relative positional relationship with the KEY3 block. In step S904, an item identification ID is set based on the relative positional relationship with the KEY3 block as "child type" and "unmarried type".
If the counted number of blocks is 5, that is, “adopt type A”, it is determined in step S905 whether the shape of the third block to the left of the KEY3 block is horizontally long. If it is horizontal (YES in step S905), it is determined to be “married (husband or wife) type” and the process proceeds to step S906. On the other hand, if it is not horizontal (NO in step S905), it is determined to be “unmarried type” and the process proceeds to step S907.
[0041]
In step S906, the item identification ID is set as the "actual child type" and "married (husband or wife) type" from the relative positional relationship with the KEY3 block. In step S907, the item identification ID is set as the "actual child type" and "unmarried type" from the relative positional relationship with the KEY3 block.
If the counted number of blocks is 6, that is, “adopt type B”, it is determined in step S909 whether the shape of the fourth block to the left of the KEY3 block is horizontally long. If it is horizontally long (YES in step S909), it is determined to be “married (husband or wife) type” and the process proceeds to step S910. On the other hand, if it is not horizontally long (NO in step S909), it is determined to be “unmarried type” and the process proceeds to step S911.
[0042]
In step S910, an item identification ID is set based on the relative positional relationship with the KEY3 block as the "actual child type" and the "married (husband or wife) type". In step S911, the item identification ID is set as the “child type” and “unmarried type” based on the relative positional relationship with the KEY3 block.
Returning to the description of the flowchart of FIG. 2 again.
[0043]
In step S204, based on the items obtained by the item identification processing in step S203, an area division determination processing is performed to determine whether there is an error in the processing result of the area division processing in step S202. The details of the area division determination processing will be described with reference to the flowchart of FIG.
FIG. 10 is a flowchart illustrating a detailed processing flow of the area division determination processing according to the present embodiment.
[0044]
First, in step S1001, a page type identification result is checked. In step S1002, it is determined whether there is an error in the identification result. If there is an error, the process proceeds to step S1008. On the other hand, if there is no error, the process proceeds to step S1003.
For example, although the width of the top right block of the family register document is larger than the width of other blocks having the same Y1 coordinate, the block is identified as “non-leader type”, and conversely, the width of the top right block is If it is identified as "first person type" even though the width is the same as the width of the block having the same Y1 coordinate, it is determined that an error in the area division processing due to blurring of a ruled line or misunderstanding a part of text as a ruled line. judge. Then, in step S1008, "1" is set as the error code, and the area division determination processing is forcibly terminated.
[0045]
Next, in step S1003, the identification result of the KEY block is checked. In step S1004, it is determined whether there is an error in the identification result. If there is an error, the process proceeds to step S1008. If there is no error, the process advances to step S1005.
For example, when the page type of the family register document is "first person type", but the KEY block is not aligned with (KEY0, KEY1, KEY2, KEY3), or when the KEY block is "non-first person type", the KEY block is (KEY2). , KEY3, KEY4, KEY5), it is determined that an area division error has occurred. In step S1008, “1” is set as the error code, and the area division determination processing is forcibly terminated.
[0046]
Next, in step S1005, a detailed identification result of the item is checked for each page type. In step S1006, it is determined whether there is an error in the identification result. If there is an error, the process proceeds to step S1008. If there is no error, the process advances to step S1007.
For example, when the page type is “first person type”, if there are not three blocks having the same width below the KEY0 block, it is determined that there is an error in the region division processing. Then, in step S1008, "1" is set as the error code, and the area division determination processing is forcibly terminated.
[0047]
Alternatively, when the four left blocks including the KEY1 block to the KEY1 block do not have the same width, it is determined that an error has occurred in the area division processing. Then, in step S1008, "1" is set as the error code, and the area division determination processing is forcibly terminated.
If ten blocks to the left, including the KEY2 block and the KEY2 block, do not have the same width, it is determined that there is a mistake in the area division processing. Then, in step S1008, "1" is set as the error code, and the area division determination processing is forcibly terminated.
[0048]
If the number of blocks having the same Y1 coordinates as the left KEY3 block including the KEY3 block from the KEY3 block is 3 or less, or 7 or more, it is determined that the area division processing is an error. Then, in step S1008, "1" is set as the error code, and the area division determination processing is forcibly terminated.
Similarly, a detailed identification result is checked when the page type is “non-leader type”.
[0049]
If it is determined that the item identification processing has been completed normally by checking the above identification results, there is no mistake in the area division processing, and in step S1007, “0” is set as an error code, and the area division determination processing is performed. To end.
Returning to the description of the flowchart of FIG. 2 again.
In step S205, a region division determination result display process of displaying the processing result of the region division determination process on the display 108 is performed. In step S206, it is determined whether or not there is an error in the area division processing based on the processing result of the area division determination result display processing. If there is no mistake in the area division processing, that is, if “0” is set in the error code, it is determined that there is no mistake. Then, the fact that the process has been completed normally is displayed on the display 108, and all the processes are completed. On the other hand, if there is a mistake in the area division processing, that is, if “1” is set in the error code, the fact that there is a mistake in the area division processing is displayed on the display 108, and correction of the mistake in the area division processing is performed. Prompt the operator.
[0050]
In step S207, after the fact that there is a mistake in the area division processing is displayed by the area division determination result display processing, the area division state of the current block is displayed on the original document image. Then, the operator performs an area division error correction process of correcting the processing result of the area division processing by image processing such as enlarging, reducing, moving, or deleting a correction target, or creating a new block.
[0051]
When the operator indicates the corrected result by pressing the correction end button with the mouse 103 or the like, the block data corresponding to the corrected item is updated, and then the item identification processing is executed again. If the corrected result is correct, “0” is set in the error code as the processing result of the area division determination processing, and all processing ends normally.
[0052]
Next, a specific process executed in the flowchart of FIG. 2 will be described with reference to FIGS.
First, an example will be described in which there is no mistake in extracting a region for each attribute by region division of a document image.
For example, blocks B1201 to B1236 of a plurality of items as shown in FIG. 12 are obtained as a result of performing the area dividing process described in step S202 of FIG. 2 on the document image of the family register document as shown in FIG. Suppose that it was done. Then, when the item identification processing described in step S203 of FIG. 2 is performed on the region division result of FIG. 12, in this case, the width of the upper rightmost block B1201 is longer than the height and has the same other Y1 coordinates. Since it is different from the width of the block, it is determined to be "leader type".
[0053]
Then, since the page type is determined to be the "leader type", the block B1201 at the upper right is regarded as "the block (KEY0) entitled" Home register "), and its address is recorded as KEY block data.
Next, a block B1205 adjacent to the left of the KEY0 block and having the same Y1 coordinate of the KEY0 block is regarded as a “block (KEY1) in the first row of the column where the knitting items are described”, and its address is used as KEY block data. Remember.
[0054]
Next, the block B1209 having the same Y1 coordinate as the Y1 coordinate of the KEY0 block, having a height higher than that of the KEY1 block, and having the X2 coordinate at the rightmost position is referred to as “the first row of the column where the enrollment data and the like are described. Block (KEY2) ", and its address is recorded as KEY block data. Further, the block B1223 adjacent to the block B1209 is regarded as a “block (KEY3) entitled“ Father ””, and its address is stored as KEY block data.
[0055]
Next, a block is extracted in more detail for each item having information common to each KEY block detected as described above. Then, an item identification ID is set for each extracted block.
First, since the page type is the “leader type”, there are three blocks B1202 to B1204 having the same width under the KEY0 block. Therefore, an item identification ID is set for each block including the KEY0 block. For example, when the item identification ID of the block B1201 uses (a) to (c) of FIG.
1000 (the page type is the first person) +000 (the person who describes the page of the first person) +10 (the title of the permanent book) = 1010
Is set as the item identification ID. Similarly, the item identification IDs of the other blocks B1202 to B1204 are set to 1011 to 1013, respectively.
[0056]
Next, the left four blocks B1205 to B1208 including the KEY1 block and the KEY1 block and the blocks B1219 to B1222 thereunder are blocks having information common to the KEY1 block. Set the identification ID. In this case, 1020 to 1027 are set as the item identification IDs.
[0057]
Next, since ten blocks B1209 to B1218 on the left including the KEY2 block and the KEY2 block are blocks having information common to the KEY2 block, an item identification ID corresponding to each block is set. In this case, 1209 to 1218 are set as the item identification IDs.
Next, the item identification ID is further set for the blocks below the KEY2 block by the number on the left including the KEY3 block and the KEY2 block.
[0058]
In the case of the family register document shown in FIG. 11, since the number is six, it is determined to be a type in which both the adoptive father and the adoptive mother are described (“adoptive father type B”). Further, since the shape of the fourth block B1233 to the left of the KEY3 block is horizontally long, it is determined to be the “married (husband or wife) type”.
As a result, from the right to the block having the same Y1 coordinate as the Y1 coordinate of the KEY3 block, the block B1223 is determined to be the KEY3 block itself and “the block titled“ father ””, and the item identification ID is 1030. Is set.
[0059]
The block B1226 is determined to be a “block entitled“ Mother ””, and 1032 is set as the item identification ID. The block B1229 is determined to be “a block titled“ adopted father ””, and 1040 is set as the item identification ID. The block B1232 is determined to be a “block entitled“ adopt mother ””, and the item identification ID is set to 1042. Block B1233 is determined to be a “block described as“ husband ”or“ wife ””, and 1050 is set as the item identification ID. The block B1235 is determined to be “a block titled“ Birth ””, and 1070 is set as the item identification ID.
[0060]
Next, the blocks immediately below the “father”, “mother”, “adoptive father”, “adoptive mother”, “husband” or “wife”, and “birth” are the respective “name” or “date of birth”. "Is described, and 1031 is set as the item identification ID in the block B1224. In the block B1227, 1033 is set as the item identification ID. In block B1228, 1041 is set as the item identification ID. In the block B1231, 1043 is set as the item identification ID. In the block B1234, 1051 is set as the item identification ID. In block B1236, 1071 is set as the item identification ID.
[0061]
Next, the block B1225 immediately below the blocks B1224 and B1227 is determined to be a block in which “connection pattern” is described, and 1034 is set as the item identification ID in the block B1225. Further, the block B1230 immediately below the blocks B1228 and B1231 is determined to be a block in which a “connection pattern” is described, and 1034 is set as the item identification ID in the block B1230.
[0062]
In this way, an item identification ID as shown in FIG. 13 is set for each item.
Then, region division determination processing is performed based on the result of the item identification processing. In this case, since there is no mistake in the area division processing, the processing is normally terminated after the fact is displayed on the display 108 by the area division determination result display processing.
[0063]
On the other hand, an example will be described in which there is a mistake in extracting a region for each attribute by dividing a document image into regions.
For example, it is assumed that the area separation processing result shown in FIG. 14 is obtained as a result of performing the area division processing described in step S202 of FIG. 2 on the document image of the family register document as shown in FIG. Then, when the item identification processing described in step S203 of FIG. 2 is performed on the processing result of FIG. 14, in this case, the ruled lines 1401 are blurred, and the blocks B1402 are united. Therefore, the block B1402 at the upper right is identified as “non-leader type” because the height is longer than the width. In the item identification process, the width is different from the other blocks having the same Y1 coordinate as the Y1 coordinate of the block B1402 despite being identified as “non-leader type”. Inconsistency arises in identification. As a result, in this case, it is determined as a mistake in the area division processing, “1” is set in the error code, and the area division determination processing is forcibly terminated.
[0064]
Next, in the area division determination result display processing, the fact that there is a mistake in the area division processing is displayed on the display 108, and the processing result (FIG. 14) is displayed on the original document image (the family register document in FIG. 11). .
When the current processing result (FIG. 14) is displayed on the original manuscript image, the operator reduces the wrong block B1402 (FIG. 14) into a block B1502 as shown in FIG. , Create a new block B1501.
[0065]
Then, when the operator designates a modification end button 1503 with the mouse 103, the content of the corrected item block is updated to the corresponding block data, and the item identification processing is executed again.
Then, region division determination processing is performed based on the result of the item identification processing. In this case, since the mistake in the area division processing has been corrected, the fact is displayed on the display 108 by the area division determination result display processing, and then the processing ends normally.
[0066]
As described above, according to the present embodiment, it is possible to determine whether or not there is a processing error in the area division processing by identifying the configuration of the items included in the family register document. Further, even when there is a processing error in the area division processing, the processing error can be corrected.
In addition, the above-described area division processing, item identification processing, area division determination processing, area division determination result display processing, and area division error correction processing are provided so that area division errors can be corrected. This makes it easy to determine the presence or absence of a mistake, improves operability, and shortens the overall processing time.
[0067]
Note that, when it is determined that there is an error in the area division determination processing, "1" is set as an error code uniformly, and the fact is displayed to the operator in the area division determination result display processing. However, it is not limited to this. For example, it is possible to specify the type of error by individually setting an error code for each type of error, and to specifically indicate the type of error in text or voice in the area division determination result display processing.
[0068]
For example, an area division determination process as shown in the flowchart of FIG. 16 may be performed.
FIG. 16 is a flowchart showing a detailed processing flow of the area division determination processing according to another configuration of the present embodiment.
First, in step S1601, a page type identification result is checked. In step S1602, it is determined whether there is an error in the identification result. If there is an error, the process proceeds to step S1608. If there is no error, the process advances to step S1603.
[0069]
For example, although the width of the top right block of the family register document is larger than the width of other blocks having the same Y1 coordinate, the block is identified as “non-leader type”, and conversely, the width of the top right block is If it is identified as the “first person type” even though the width is the same as the width of the block having the same Y1 coordinate, it is determined that an error in the area division processing due to blurring of the ruled line or misunderstanding a part of the text as a ruled line. judge. Then, in step S1608, “1” is set as the error code, and the area division determination processing is forcibly terminated.
[0070]
Next, in step S1603, the identification result of the KEY block is checked. In step S1604, it is determined whether there is an error in the identification result. If there is an error, the process proceeds to step S1609. If there is no error, the process advances to step S1605.
For example, when the page type of the family register document is "first person type", but the KEY block is not aligned with (KEY0, KEY1, KEY2, KEY3), or when the KEY block is "non-first person type", the KEY block is (KEY2). , KEY3, KEY4, KEY5), it is determined that there is a mistake in the area division processing. Then, in step S1609, "2" is set as the error code, and the area division determination processing is forcibly terminated.
[0071]
Next, in step S1605, a detailed identification result of the item is checked for each page type. In step S1606, it is determined whether there is an error in the identification result. If there is an error, the process proceeds to step S1610. If there is no error, the process advances to step S1607.
For example, when the page type is the “leader type”, if there are not three blocks having the same width below the KEY0 block, it is determined that the region division processing is an error. Then, in step S1610, “3” is set as the error code, and the area division determination processing is forcibly terminated.
[0072]
Alternatively, when the four left blocks including the KEY1 block to the KEY1 block do not have the same width, it is determined that an error has occurred in the area division processing. Then, in step S1610, “3” is set as the error code, and the area division determination processing is forcibly terminated.
If ten blocks to the left, including the KEY2 block and the KEY2 block, do not have the same width, it is determined that there is a mistake in the area division processing. Then, in step S1610, “3” is set as the error code, and the area division determination processing is forcibly terminated.
[0073]
If the number of blocks having the same Y1 coordinates as the left KEY3 block from the KEY3 block including the KEY3 block is 3 or less or 7 or more, it is determined that the area division processing is an error. Then, in step S1610, “4” is set as the error code, and the area division determination processing is forcibly terminated.
Similarly, a detailed identification result is checked when the page type is “non-leader type”.
[0074]
If it is determined that the item identification processing has been completed normally by checking the above identification results, there is no error in the area division processing, and in step S1607, “0” is set as an error code, and the area division determination processing is performed. To end.
Also, at the same time as displaying the type of mistake specifically, the color, shape, and shape of the rectangle that may be wrong among the rectangular images displayed on the original document image in the area division mistake correction processing are changed. It is also possible to change and display.
[0075]
For example, in the case of FIG. 14, it is determined that there is an error in the area division processing based on the result of the page type identification check. Therefore, “make a red frame” or “make the area red in the block B1402” It is also possible to display such as "", "make the frame a dotted line" or "blink the frame".
It should be noted 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, a printer, and the like), but can be applied to an apparatus (for example, a copier, a facsimile device, and the like) including one device. May be applied.
[0076]
Further, an object of the present invention is to provide a storage medium storing a program code of software for realizing the functions of the above-described embodiments to a system or an apparatus, and a computer (or CPU or MPU) of the system or apparatus to store the storage medium. It is needless to say that the present invention can also be achieved by reading and executing the program code stored in the program.
[0077]
In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.
As a storage medium for supplying the program code, for example, a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, and the like can be used.
[0078]
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an OS (Operating System) running on the computer based on the instruction of the program code. It goes without saying that a part or all of the actual processing is performed, and the functions of the above-described embodiments are realized by the processing.
[0079]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0080]
When the present invention is applied to the storage medium, the storage medium stores program codes corresponding to the above-described flowcharts. Each module shown will be stored in a storage medium.
That is, in FIG. 17, at least the program code of each of the “storage module”, “split module” and “judgment module” may be stored in the storage medium.
[0081]
The “storage module” stores format information on a predetermined format in a storage medium. The “division module” divides a document image having a predetermined format into a plurality of areas. The “determination module” determines whether the division result is correct based on the format information.
In FIG. 18, at least the program code of each of the “storage module”, “division module”, “identification module”, and “judgment module” may be stored in the storage medium.
[0082]
Note that the “storage module” stores, on a storage medium, respective format information relating to a document image having a plurality of types of predetermined formats. The “division module” divides a document image having a predetermined format into a plurality of areas. The “identification module” identifies a type of a document image having a predetermined format based on characteristics of the divided area. Based on the format information of the document image having a predetermined format corresponding to the identified type, whether the division result is correct or not is determined.
[0083]
【The invention's effect】
As is clear from the above description, according to the present invention, it is possible to easily determine the presence or absence of a processing error that occurs in the area division processing, and to easily correct the processing error when there is a processing error. Image processing apparatus and method thereof.
Further, it is possible to provide an image processing apparatus and a method thereof that improve the operation efficiency of the operation in the area division processing.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a functional configuration of an image processing apparatus according to an embodiment.
FIG. 2 is a flowchart showing a processing flow of processing executed in the present embodiment.
FIG. 3 is a diagram showing a configuration of block data according to the present embodiment.
FIG. 4 is a diagram showing a configuration of an item identification ID according to the embodiment.
FIG. 5 is a diagram showing a configuration of a KEY block data structure according to the present embodiment.
FIG. 6 is a flowchart illustrating a detailed processing flow of item identification processing according to the present embodiment.
FIG. 7 is a flowchart illustrating a processing flow of a process of setting an item identification ID when the page type is “first person type” according to the present embodiment;
FIG. 8 is a flowchart illustrating a processing flow of a process of setting an item identification ID when the page type is “non-leader type” according to the present embodiment;
FIG. 9 is a flowchart illustrating a processing flow of a process of setting an item identification ID in a block below a column such as enrollment data according to the present embodiment;
FIG. 10 is a flowchart illustrating a detailed processing flow of a region division determination process according to the present embodiment.
FIG. 11 is a diagram illustrating an example of a document image according to the present embodiment.
FIG. 12 is a diagram illustrating a processing result of a region dividing process performed on a document image according to the present embodiment;
FIG. 13 is a diagram illustrating a setting result of an item identification ID set for a document image according to the present embodiment.
FIG. 14 is a diagram illustrating a processing result when there is an error in the area division processing performed on a document image according to the present embodiment;
FIG. 15 is a diagram illustrating processing for correcting a processing result when there is an error in the area division processing performed on the document image according to the present embodiment.
FIG. 16 is a flowchart illustrating a detailed processing flow of a region division determination process according to another configuration of the present embodiment.
FIG. 17 is a diagram showing a structure of a memory map of an FD in which a program of a processing flow executed in the present invention is stored.
FIG. 18 is a diagram showing a structure of a memory map of an FD in which a program of a processing flow executed in the present invention is stored.
[Explanation of symbols]
101 Scanner
102 Scanner interface
103 mouse
104 Mouse interface
105 CPU
106 ROM
107 RAM
108 Display
109 Display interface
110 FDD
111 FDD interface
112 bus
113 KB interface
114 KB

Claims (10)

所定のフォーマットに関するフォーマット情報を記憶する記憶手段と、
原稿画像を複数の領域に分割する分割手段と、
前記フォーマット情報に基づいて、前記分割手段で分割された複数の領域の内、所定の位置の領域により前記原稿画像のタイプを分類する処理と、当該分類されたタイプによりキー領域を検出する処理と、当該検出されたキー領域に対して所定の位置にある領域の項目を識別する処理とを行い、いずれかの処理でエラーが生じたか否かをチェックすることによって、前記分割手段による分割結果の正否を判定する判定手段と
を有することを特徴とする画像処理装置。
Storage means for storing format information about a predetermined format;
Dividing means for dividing the original image into a plurality of areas;
A process of classifying the type of the document image by a region at a predetermined position among a plurality of regions divided by the dividing unit based on the format information, and a process of detecting a key region based on the classified type. Performing a process of identifying an item of a region located at a predetermined position with respect to the detected key region, and checking whether an error has occurred in any of the processes. An image processing apparatus comprising: a determination unit that determines whether the image processing is correct.
前記判定手段で前記分割結果に否があると判定された場合、前記分割手段で分割された領域をディスプレイに表示するように制御し、オペレータからの指示に基づき前記ディスプレイに表示された領域の修正を行う修正手段を、
更に有することを特徴とする請求項1に記載の画像処理装置。
If the determination unit determines that there is no result in the division result, control is performed so that the region divided by the division unit is displayed on a display, and correction of the region displayed on the display is performed based on an instruction from an operator. The corrective means to do
The image processing apparatus according to claim 1, further comprising:
前記判定手段で前記分割結果に否があると判定された場合、前記分割手段で分割された複数の領域の内、前記分割手段による分割が間違っている可能性のある領域を、他の領域と区別してディスプレイに表示するように制御する表示制御手段を、
更に有することを特徴とする請求項1又は2のいずれかに記載の画像処理装置。
When the determination unit determines that there is no result of the division, of the plurality of regions divided by the division unit, a region that may be incorrectly divided by the division unit is defined as another region. Display control means for controlling so as to be distinguished and displayed on a display,
The image processing apparatus according to claim 1, further comprising:
前記判定手段でチェックされたエラーに基づき、前記分割手段での分割ミスの種類を表示するように制御する表示手段を、
更に有することを特徴とする請求項1乃至3のいずれかに記載の画像処理装置。
Display means for controlling to display the type of division error in the division means based on the error checked by the determination means,
The image processing apparatus according to claim 1, further comprising:
前記分割手段で分割される領域は、罫線で囲まれる矩形領域である
ことを特徴とする請求項1乃至のいずれかに記載の画像処理装置。
The areas divided by the division means, the image processing apparatus according to any one of claims 1 to 4, characterized in that a rectangular region surrounded by the border.
記憶手段に記憶されている所定のフォーマットに関するフォーマット情報を用いて、原稿画像に含まれる領域を抽出する画像処理装置を制御するための画像処理方法であって、
原稿画像を複数の領域に分割する分割工程と、
前記フォーマット情報に基づいて、前記分割工程で分割された複数の領域の内、所定の位置の領域により前記原稿画像のタイプを分類する処理と、当該分類されたタイプによりキー領域を検出する処理と、当該検出されたキー領域に対して所定の位置にある領域の項目を識別する処理とを行い、いずれかの処理でエラーが生じたか否かをチェックすることによって、前記分割工程による分割結果の正否を判定する判定工程と
を有することを特徴とする画像処理方法。
An image processing method for controlling an image processing device that extracts an area included in a document image using format information about a predetermined format stored in a storage unit,
A dividing step of dividing the document image into a plurality of areas;
Based on the format information, of the plurality of regions divided in the dividing step, a process of classifying the type of the document image according to a region of a predetermined position, a process of detecting a key region by the classified type Performing a process of identifying an item of a region at a predetermined position with respect to the detected key region, and checking whether an error has occurred in any of the processes. A determining step of determining whether the image is correct or not.
前記判定工程で前記分割結果に否があると判定された場合、前記分割工程で分割された領域をディスプレイに表示するように制御し、オペレータからの指示に基づき前記ディスプレイに表示された領域の修正を行う修正工程を、
更に有することを特徴とする請求項に記載の画像処理方法。
When it is determined in the determination step that there is no result in the division result, control is performed so that the area divided in the division step is displayed on a display, and correction of the area displayed on the display is performed based on an instruction from an operator. The correction process that performs
The image processing method according to claim 6 , further comprising:
前記判定工程で前記分割結果に否があると判定された場合、前記分割工程で分割された複数の領域の内、前記分割工程による分割が間違っている可能性のある領域を、他の領域と区別してディスプレイに表示するように制御する表示制御工程を、
更に有することを特徴とする請求項又はのいずれかに記載の画像処理方法。
If it is determined in the determination step that there is no result of the division, of the plurality of regions divided in the division step, the region that may be incorrectly divided by the division step, other regions A display control step of controlling so as to be distinguished and displayed on a display,
The image processing method according to claim 6 or 7, characterized by further comprising.
前記判定工程でチェックされたエラーに基づき、前記分割工程での分割ミスの種類をディスプレイに表示するように制御する表示工程を、
更に有することを特徴とする請求項乃至のいずれかに記載の画像処理方法。
Based on the error checked in the determination step, a display step of controlling the type of the division mistake in the division step to be displayed on a display,
The image processing method according to any one of claims 6 to 8, further comprising.
前記分割工程で分割される領域は罫線で囲まれる矩形領域である
ことを特徴とする請求項乃至のいずれかに記載の画像処理方法。
The image processing method according to any one of claims 6 to 9 regions divided by the dividing step is characterized by a rectangular area surrounded by ruled lines.
JP00955496A 1996-01-23 1996-01-23 Image processing apparatus and method Expired - Fee Related JP3554097B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP00955496A JP3554097B2 (en) 1996-01-23 1996-01-23 Image processing apparatus and method
US08/786,913 US6201894B1 (en) 1996-01-23 1997-01-22 Method and apparatus for extracting ruled lines or region surrounding ruled lines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00955496A JP3554097B2 (en) 1996-01-23 1996-01-23 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JPH09198518A JPH09198518A (en) 1997-07-31
JP3554097B2 true JP3554097B2 (en) 2004-08-11

Family

ID=11723507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00955496A Expired - Fee Related JP3554097B2 (en) 1996-01-23 1996-01-23 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP3554097B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11508173B2 (en) * 2019-10-30 2022-11-22 Adobe Inc. Machine learning prediction and document rendering improvement based on content order

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2379293B (en) 2001-08-31 2005-07-06 Discreet Logic Inc Processing Data in an Application comprising a plurality of Application Modules

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11508173B2 (en) * 2019-10-30 2022-11-22 Adobe Inc. Machine learning prediction and document rendering improvement based on content order

Also Published As

Publication number Publication date
JPH09198518A (en) 1997-07-31

Similar Documents

Publication Publication Date Title
US5748809A (en) Active area identification on a machine readable form using form landmarks
US8422796B2 (en) Image processing device
US6201894B1 (en) Method and apparatus for extracting ruled lines or region surrounding ruled lines
JP2835178B2 (en) Document reading device
JPH08212298A (en) Automatic judging device for document direction and automatic correcting device for document direction
US6600482B1 (en) Method and system for form recognition and digitized image processing
JP2004258706A (en) Form definition data creation method and form processing device
JP4655824B2 (en) Image recognition apparatus, image recognition method, and image recognition program
JP5080872B2 (en) Scoring system and scoring program
JP3554097B2 (en) Image processing apparatus and method
EP1202213A2 (en) Document format identification apparatus and method
JP6888410B2 (en) Information processing equipment and information processing programs
JP4281236B2 (en) Image recognition apparatus, image recognition method, and computer-readable recording medium storing image recognition program
JP4804433B2 (en) Image processing apparatus, image processing method, and image processing program
JP3581471B2 (en) Image processing apparatus and method
JP3412999B2 (en) Image processing apparatus and method
JP5673277B2 (en) Image processing apparatus and program
JP2001052112A (en) Recognizing processing method, information processor and recording medium
JP3484446B2 (en) Optical character recognition device
JP6682827B2 (en) Information processing apparatus and information processing program
JP3412998B2 (en) Image processing apparatus and method
JP4863057B2 (en) Image processing apparatus, image processing program, and image processing method
JP2000339407A (en) Picture processor, picture processing method and computer readable storage medium
JP2006293970A (en) Image processor, image processing method and image processing program
JPS61198375A (en) Optical character reader

Legal Events

Date Code Title Description
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: 20040419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040506

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

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100514

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100514

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110514

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120514

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120514

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140514

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees