JP3784866B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP3784866B2
JP3784866B2 JP25417695A JP25417695A JP3784866B2 JP 3784866 B2 JP3784866 B2 JP 3784866B2 JP 25417695 A JP25417695 A JP 25417695A JP 25417695 A JP25417695 A JP 25417695A JP 3784866 B2 JP3784866 B2 JP 3784866B2
Authority
JP
Japan
Prior art keywords
image
character
size
character symbol
reduced
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
JP25417695A
Other languages
Japanese (ja)
Other versions
JPH08152871A (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.)
Toshiba Corp
Toshiba TEC Corp
Original Assignee
Toshiba Corp
Toshiba TEC Corp
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 Toshiba Corp, Toshiba TEC Corp filed Critical Toshiba Corp
Priority to JP25417695A priority Critical patent/JP3784866B2/en
Publication of JPH08152871A publication Critical patent/JPH08152871A/en
Application granted granted Critical
Publication of JP3784866B2 publication Critical patent/JP3784866B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
この発明は、スキャナ、ファクシミリ、電子メールといったソースから入力されるドキュメントのイメージデータを表示サイズあるいは出力サイズの異なるメディアに表示あるいは出力する画像処理装置に関する。
【0002】
【従来の技術】
従来、スキャナ、ファクシミリ、電子メールといったソースから入力されるドキュメントのイメージデータを表示サイズあるいは出力サイズの異なるメディアに表示あるいは出力する画像処理装置が実用化されている。
【0003】
すなわち、スキャナ、ファクシミリ、電子メールなどの様々な画像読取り手段や画像通信手段を含むソースから入力されるドキュメント画像データを縮小または解像度変換し、或いは複数のドキュメントを一つにまとめ、しかるのちディスプレイへ表示し、プリンタ等によりハードコピー出力し、またはファクシミリの送信出力とする画像処理装置がある。
【0004】
このような装置において、ドキュメントイメージ情報を原稿とは異なる出力サイズのメディアに出力する際には、その出力サイズに応じて一律の変倍(拡大縮小)処理を経て出力される。
【0005】
【発明が解決しようとする課題】
しかしながら、たとえばもともと文字が小さく、文字列間、あるいは文字間に比較的大きい空スペースを含むドキュメント画像全体に対して単純に縮小処理を行うと、空スペースも含むすべての画像領域が比例的に縮小され、ドキュメント内の小さい文字がさらに縮小されて判読困難になる場合がある。また、空スペースを含むドキュメント画像全体に対して単純に拡大処理を行うと、空スペースも比例的に拡大され、表示・出力されるドキュメントイメージ内で文字の大きさに比較して大きな空スペースが目立つ場合もある。
【0006】
すなわち、ドキュメントのイメージデータを、表示・出力サイズの異なるメディアに表示・出力する際に単純に拡大・縮小処理を行うと、ドキュメント内の文字情報を最適なサイズで表示・出力することができず、また表示・出力されるドキュメントイメージ内に大きな空スペースが出来てしまうなど、表示・出力メディアを有効に利用できないという欠点があった。
【0007】
そこで、この発明はドキュメントのイメージデータを表示・出力サイズがドキュメントの原寸と異なるメディアに表示・出力する際に、空スペースを利用することによりドキュメント内の文字情報を最適なサイズに変換することができ、表示・出力メディアを有効に利用できる画像処理装置を提供することを目的とする。
【0008】
【課題を解決するための手段】
この発明の一態様による画像処理装置は、複数の文字記号およびこの複数の文字記号の間にスペースを含む画像の情報を記憶する記憶手段と、上記記憶手段により記憶した画像から文字記号の位置、文字記号のサイズ、文字記号の間隔を含む特徴情報を検出する特徴情報検出手段と、上記記憶手段により記憶した画像のサイズと縮小後の画像サイズとから第1の画像の縮小率(SR1)を算出する第1の算出手段と、上記第1の算出手段にて算出した第1の画像の縮小率に基づいて文字記号の間隔の調整が必要であるか否かを判断する判断手段と、この判断手段により文字記号の間隔の調整が必要でないと判断された場合、上記記憶手段により記憶した画像全体を上記文字記号の位置、文字記号のサイズの特徴情報に基づいて第1の縮小率により縮小し、上記判断手段により文字記号の間隔の調整が必要であると判断された場合、上記記憶手段により記憶した画像のうち文字記号については第1の縮小率よりも小さい第2の縮小率(SR2:SR2<SR1)により縮小しかつ文字記号の間隔は第1の縮小率により縮小した場合よりもさらに小さくなるように縮小し、上記記憶手段により記憶した画像全体を第1の縮小率により縮小した場合と同じサイズとする縮小手段とから構成されている。
【0011】
この発明のさらに他の態様による画像処理装置は、複数の文字記号、各文字記号の間のスペースおよび画像の周囲のマージンスペースを含む画像の情報を記憶する第1記憶手段と、上記第1記憶手段により記憶した画像から文字記号の位置、文字記号のサイズ、文字記号の間隔および画像の周囲のマージンスペースを含む特徴情報を検出する特徴情報検出手段と、文字記号の最小サイズ、文字記号の間隔の最小値、画像の周囲のマージンスペースの最小値を記憶する第2記憶手段と、上記第1記憶手段により記憶した画像のサイズと縮小後の画像サイズとから第1の画像の縮小率(SR1)を算出する第1の算出手段と、上記特徴情報検出手段にて検出した文字記号のサイズに基づき上記算出手段にて算出した第1の縮小率により縮小した場合の縮小文字記号のサイズを算出する第2の算出手段と、縮小後の文字記号サイズと最小サイズとを比較し、縮小後の文字記号サイズが最小サイズよりも大きい場合は文字記号の間隔の調整が必要でないと判断し、縮小後の文字記号サイズが最小サイズよりも小さい場合は文字記号の間隔の調整が必要であると判断する判断手段と、この判断手段により文字記号の間隔の調整が必要でないと判断された場合、上記第1記憶手段により記憶した画像全体を上記文字記号の位置、文字記号のサイズの特徴情報に基づいて第1の縮小率により縮小する第1の縮小手段と、上記判断手段により文字記号の間隔の調整が必要であると判断された場合、上記特徴情報検出手段にて検出した文字記号の間隔および画像の周囲のマージンスペースと上記第2記憶手段により記憶した文字記号の間隔の最小値、画像の周囲のマージンスペースの最小値とに基づき文字記号の間隔およびマージンスペースの調整可能な量を算出する第3の算出手段と、この第3の算出手段により算出された調整可能な量に基づいて文字の縮小率として第1の縮小率よりも小さい第2の縮小率(SR2:SR2<SR1)を算出する第4の算出手段と、上記判断手段により文字記号の間隔の調整が必要であると判断された場合、上記第1記憶手段により記憶した画像のうち文字記号については第4の算出手段により算出された第2の縮小率(SR2)で縮小し、文字記号の間隔およびマージンスペースを第1の縮小率により縮小した場合よりもさらに小さくかつ、最小値以上になるように縮小し、上記第1記憶手段により記憶した画像全体を第1の縮小率により縮小した場合と同じサイズとする縮小手段とから構成されている。
【0012】
この発明は、上記の構成をとることにより、ドキュメントのイメージデータを表示・出力サイズがドキュメントの原寸と異なるメディアに表示・出力する際に、原稿画像の空スペースを利用することができ、たとえば縮小の時の空スペースの調整により、文字部分を比較的大きく出力するなど、ドキュメント内の文字情報を最適なサイズに変換することができ、表示・出力メディアを有効に利用できる画像処理装置を提供することができる。
【0013】
【発明の実施の形態】
以下、この発明の各々の実施例について図面を参照して詳細に説明する。
【0014】
図1はこの発明の画像処理装置の一実施例のブロック構成図である。
【0015】
図1において、入力部1は画像処理部14のデータ入力部として設けられており、複数の入力インターフェース11a〜11nを介して入力機器としての電子カメラ15a,スキャナ15b,パーソナルコンピュータ15cおよびメモリ15dなどが接続されたネットワーク15e,あるいはファクシミリ15fに接続される。入力機器としてはほかにフィルムリーダなどの各種画像入力機器、あるいは電子メール、ハードディスクのようなサーバなどの画像データを提供する入力機器群が含まれる。これらの入力機器群から指定された一つの入力機器からの入力画像データがCPU13Aを含むコントローラ部13からの入力セレクト信号により選択され、入力部1に受け入れられる。選択された入力機器、たとえばスキャナ15bから原稿の画像データが画像処理部14内の入力画像記憶部2に入力される。なお、これらの各種画像入力機器は対応するインターフェースに有線、または無線で接続されている。例えば電子カメラ15aはインターフェース11aと無線で接続される。
【0016】
入力画像記憶部2は入力部1に入力された画像データを一時的に蓄える手段である。
【0017】
特徴量抽出部3は入力画像記憶部2から読み出された入力画像データからドキュメントの左右上下マージン、段組み間の空スペース、文字間隔、単語間隔、文字列間隔、各々の文字の座標、文字寸法、平均文字寸法、平均文字間隔、平均文字列間隔等の物理的特徴量を抽出し、さらにこれらの物理的特徴量からドキュメントが英文か和文かを判断する手段である。
【0018】
なお、ここで文字はアルファベット、ギリシャ文字、ロシア文字、かな、漢字、そのたの国の特殊文字、数字、数学記号、文字以外で形成されたマークなどが含まれる。しかしながら以下の実施例の説明では簡単の為にcharacter として説明する。
【0019】
特徴量記憶部4は抽出された特徴量データおよび和文、英文の判断結果を一時的に記憶するものである。
【0020】
判断基準情報記憶部6は出力可能な出力機器16a、…16mの数、各々の出力機器16a、…16mの解像度、メディアサイズ、最小文字寸法、最小文字間隔、最小文字列間隔、最小左右上下マージン、最小段組み間隔などの、出力機器16a、…16mをセレクトするための判断基準情報、すなわちパラメータ設定情報をCPU13から受け入れて記憶する手段である。たとえば出力機器16aはレーザプリンタであり、16cは表示装置である。
【0021】
変換座標算出部5は特徴量抽出部3で求められた特徴量と判断基準情報記憶部6に予め設定された判断基準情報を基に変倍率、すなわち拡大率または縮小率を求め、各々の文字の元の座標を出力すべく座標に変換する手段である。
【0022】
変換座標記憶部7は変換された座標データを一時的に蓄えるものである。
【0023】
画像変換処理部8は入力画像記憶部2から読み出した入力画像における元の座標データに基づいて画像データから各々の文字画像を切り出し、元の座標に対して、変換座標記憶部7に記憶された変換座標と変換座標記憶部7において求められた変倍率とに基づき、文字サイズなどの変換処理を行うものである。
【0024】
出力画像記憶部9は画像変換処理部8により変換された画像データを一時的に記憶する手段である。
【0025】
出力部10はコントローラ部13により指定された出力機器、たとえばメモリ16a,プリンタ16b,ディスプレイ16c、あるいはネットワーク16dを介して接続されたパーソナルコンピュータ16e,ハードディスク16gに対応するインターフェース12a〜12mのうちの一つ、たとえばレーザプリンタインターフェース12bを選択して文字サイズなどの変換処理を施した変換画像をハードコピーとして出力するものである。これらの出力機器は画像処理装置と有線または無線で結合されている。図示の例では出力インターフェース12cとディスプレイ16cとが無線で結合されている。さらに、入力部1に入力された画像データを処理部14で処理することなく主記憶装置であるメモリ16aに記憶させ、あるいはネットワーク16dを介してハードディスク16gに記憶される。
【0026】
ここで、コントローラ13について更に詳細に説明する。コントローラ13は主としてCPU13Aで構成されるもので、このCPU13Aは市販のもの、あるいはCPUボードを用いて実現される。
【0027】
コントローラ13からは、入力インターフェース11a〜11nを介した入力機器からのリクエストに応じて入力部1に入力セレクト信号が与えられ、この結果、リクエストを出した入力インターフェースに接続された入力機器、たとえばスキャナ15bからの画像データが画像処理部14に送り込まれる。入力インターフェース11a〜11nからのリクエストによりメモリ16aや出力機器16b,16cなども選択することもできる。この場合にはコントローラ13から出力部10に出力セレクト信号が供給され、対応する出力インターフェースを介してセレクトされた、たとえばメモリ16aに処理済みの画像データが送られる。同様に、出力インターフェース12a〜12nを介した出力機器からのリクエストに応じてその出力部10に出力セレクト信号が与えられ、その出力機器からリクエストされた入力機器やメモリを選択することができる。このように出力機器側から必要な入力機器やメモリからのデータ選択が可能であり、そのデータを出力機器のメディアサイズや解像度などに合わせた処理や出力が可能である。
【0028】
さらにコントローラ部13に有線や無線で接続された各種の制御機器やデータ入力機器たとえばキーボードや液晶パネルやリモートコントローラなどによって任意の入力機器から得られる画像を任意の出力機器に出力し、あるいは記憶することもできる。また予め記憶されたデータを任意の出力機器に出力することもできる。
【0029】
コントローラ13における入出力のリクエストを検知する手段の一例を図2Aに示す。図2Aのリクエストポート13Bには複数のビットB1〜Bn+C1〜Cmが設けられており、ビットB1〜Bnには入力インターフェース11a〜11nからのリクエスト情報R1〜Rnが供給され、ビットB1〜Bmには出力インターフェース12a〜12mからのリクエスト情報r1〜rmが供給されるように接続されている。いずれかのインターフェースからリクエスト情報が供給されると、対応するビットが“1”となる。このリクエストポート13Bの複数のビットはCPU13Aによって順番にスキャンされており、“1”が検出されると対応するインターフェースを介して対応する入力機器あるいは出力機器から選択リクエストがあったことが分かる。
【0030】
CPU13Aはビットスキャンの結果“1”を検出すると、セレクト信号(SEL)を制御ポート13Cに送り、“1”を検出したビットに対応する入力インターフェース11a〜11nの制御情報あるいは出力インターフェース12a〜12mの制御情報を端子I1〜In,O1〜Omに出力する。これらの端子I1〜In,O1〜Omは図1の入力部1および出力部10に接続されており、“1”を検出したビットに対応する入力機器あるいは出力機器の制御バスを画像処理部14に接続して選択すべき機器の情報を受ける。この情報をもとにリクエストされた、例えば出力機器が選択される。
【0031】
例えば、会議室から会議中の電子黒板の情報をスキャナを用いて、あるいは通常の黒板あるいは白板上に書かれた情報を電子カメラを用いて、有線または無線で画像処理部14に供給し、スペース調整などの処理を行った、あるいは未処理の画像情報をたとえばサーバに格納し、あるいはファクシミリ伝送することができる。
【0032】
リクエストポート13Bをスキャンした結果、出力機器からのリクエストを検知した場合、その出力機器を画像処理部14に接続するとともにリクエストされた入力機器あるいはメモリが選択される。
【0033】
たとえば、出張先からPDA(Personal Data Assistance)16cを用いて無線で出力インターフェース12cを介して画像処理部14にアクセスし、指定したサーバ上の必要な情報に対してスペース調整などの画像処理を行った後、この処理後の情報を受け取ると、手元のディスプレイに適合した見易い画像表示ができる。
【0034】
コントローラ部13にはさらにデータ/制御入力インターフェース13Dを介してキーボード13E,タッチパネル13F,ネットワーク13Gなどが接続される。このネットワーク13Gにはデスクトップ型のパーソナルコンピュータPCおよびラップトップ型のパーソナルコンピュータLAPTOPなどが接続される。デスクトップ型のパーソナルコンピュータPCにはキーボードKBおよびマウスMSが付属されている。ネットワーク13Gに接続されたこれらの機器は画像データの入力手段、出力手段または記憶手段として用いられる。例えば、リモートコントローラの操作によってリモートカメラを動作させ、その画像をリモートプリンタにそのプリンタのメディアサイズ、解像度などに合わせて出力することができる。
【0035】
図2Aの例ではリクエストポートと制御ポートとを用いて入出力インターフェースからのリクエストに対応するように構成したが、これに限らず、現在計算機システムなどでよく使われているbus arbitration,queingなどのコンセプトに基づいた汎用的でより進んだ制御方法も可能である。
【0036】
次に、図1に示した各部をさらに詳細に説明する。
【0037】
入力部1はコントローラ部13からの入力セレクト信号により指定される入力機器のうちの一つ、例えばスキャナ15bを画像処理部14に接続するものであり、選択されたスキャナ15bからドキュメントの画像データが入力される。例えば、10画素/mm、8ビットのスキャナ115bが選択された場合は、ドキュメントの情報が1mmあたり10画素(0.1mmピッチ)の間隔でサンプリングされて形成された画像データが入力される。
【0038】
図3A〜3Dでは元のドキュメントとサンプリング後のドキュメント情報の対応性の一例を示す。この例ではA3(420mm×297mm)のサイズの原稿を0.1mmピッチでサンプリングしたものを示す。図3Aに示す様にサンプリング後の画素数は(4199×2969)となり、1画素あたり256階調とすると一つの画像データは約12Mbyteで構成されることになる。
【0039】
図3Aに示す原稿の左上のコーナーを原点としてX方向(横方向)に40mm、Y方向(縦方向)に40mmの位置に図3Bに示すような4mm×4mm寸法の文字Aがあるとすると、サンプリング後図3Cに示す様に、その文字Aの始点座標は(400,400)となり、終点座標は(439,439)となる。
【0040】
サンプリングは図3Cに示す面積Sの単位で行われ、その値をその座標の画素値とする。例えば縦方向41.8mm、横方向40mmの位置、すなわち座標(418,400)の位置でサンプリング面積Sに対するサンプリング値を図3Dに示したように220とすれば、この値を座標(418,400)を有する画素の画素値とする。サンプリング座標の画素値の対応の一例を図3Dに示す。入力画像記憶部2は各々の座標に対応するアドレス位置に入力されたドキュメント画像データの画素値を記憶する。各々の画素値はその座標における画素の濃度を表す。つまり画素が黒い程、画素値が高い。
【0041】
特徴量抽出部3は、入力画像記憶部2からのドキュメント画像データを読出し、その画素値から、ドキュメントの上下左右マージン、比較的大きい空きスペースの座標とその大きさ、英語・日本語、文字列の数、各々の文字列における単語の数、各々の単語における文字数、各々の文字の座標、大きさ、平均文字間隔、平均文字間隔等を求めて特徴量記憶手段4に記憶しておく。
【0042】
ここで、特徴量抽出部3の詳細について説明する。特徴量抽出部3の構成図を図4に示す。この図4において、制御部13は特徴量抽出処理等を制御するものである。特徴量アクセス部32は、ドキュメント画像から抽出される特徴を特徴量記憶部4に記憶するためのアドレスと制御信号等を作る手段である。画像アクセス部34は、特徴量アクセス部32と同様に入力画像記憶部2とデータのやり取りをする手段である。
【0043】
2値化部33は、画像アクセス部34により入力画像記憶部2から読取った画像データを受け、2値化を行う手段である。すなわち、2値化部33は、読取った画素値を予め設定された閾値と比較し、対象画素値が閾値より大きい場合は2値化出力を1(黒点)とし、それ以外は2値化出力を0(白点)とするものである。2値画像メモリ38は、2値化部33によって2値化された画像データを記憶するメモリである。
【0044】
全画像射影部35は一つのドキュメントの全画像の縦横の射影を行い、予め設定された閾値をもってその閾値より小さい値を0にし、それ以外のものをそのまま残す。射影とは、縦横の画素の列から黒画素数のみを積算してそれをその行や列の射影値とする。この全画像射影部35による一つのドキュメントにおける全画像射影の一例を図5に示す。閾値を適当に選び、例えば加算された合計黒画素数の半分の値に閾値を設定することにより、全画像射影部35を用いてドキュメント内の様々な空スペースとその寸法等が求められる。
【0045】
例えば図5に示すドキュメントDにおける小さい矩形I1,I2,I3,I4が文字を表す場合は、矩形I1,I2の間隔は文字間隔となり、矩形I1とI4の間隔は文字列間隔となる。矩形I1の左上隅の始点座標(Xs1,Ys1)が図3Aと同じ位置であるとすると(Xs1,Ys1)=(400,400)となる。この場合の文字の寸法が図3Bと同じであるとすると、終点座標(Xe1,Ye2)=(440,440)となる。矩形I1とI2との文字間隔が2mm、I1とI4との文字列間隔が6mmであるとすると、矩形I2の始点座標(Xs2,Ys2)=(460,400)、終点座標(Xe2,Ye2)=(500,440)となる。
【0046】
矩形I4の始点座標(Xs4,Ys4)=(400,500)、終点座標(Xe4,Ye4)=(440,540)とすると、図5に示すように横方向の射影をとることにより、上マージンTMに対応するドキュメントDの上端からほぼ400画素ライン目ぐらいのところで文字列1の上端に対応する山が現れ、その山はほぼ40画素ラインほど続くことで上マージンTMおよび文字列1が検知できる。文字列2の上端に対応する2番目の山はほぼ500画素ライン目あたりから始まり、ほぼ40画素ラインつづくことで文字列2が検知できる。
【0047】
一方、縦方向の射影により左マージンLMはスタートから最初の山の始点(この例では400)まで、文字間隔は最初の山の終点から次の山の始点の距離(例えばXS2−XE1=20)、文字サイズは山の広がり(例えば、XE2−XS1=40)、右マージンRMは最後の山の終点からドキュメントDの右端までの距離として算出できる。
【0048】
もし文字間隔が2種存在し、一つはもう一つの1.5倍から2倍程度ならばその大きい方の間隔を単語間隔とする。同様に各々の文字列間隔が2種存在し、一つはもう一つの例えば3倍程度ならばその大きい方の矩形間隔は段組み間隔を示すものとして扱う。
【0049】
さらに、横射影の山(N1,N2,N3)の数から文字列数NL、縦射影の山(C1,C2,C3)の数から文字列あたりの文字数、または、平均文字サイズ(XL,YL)、平均文字列間隔HLS、平均文字間隔HMS等が算出される。また、各々の文字列の中の文字の縦横比を算出して、平均的に見て縦横比がほぼ同じである文字が多い場合はその文章が和文と判断して出力し、縦横比がほぼ2程度あり、文字間のスペースが2種(文字間隔、単語間隔)存在すると、その文章を英文と判断して、英語ならばEN、日本語ならばJPというラベルを出力する。個々で比較的大きいスペースである段組間隔を段組間の空スペースの座標(XLS、YLS)、空スペースの数(NLS)として記憶する。
【0050】
部分射影部36は、全画像射影部35から文字列位置情報、文字列間隔等の情報を受け、2値画像メモリ38から文字列ごとのデータを取り出し、各文字列において縦方向のみの射影処理を行い、各々の文字列における単語数NW、文字数NC、対象とする文字列における各文字の始点MKZ、または平均文字サイズLHMS等を算出する。
【0051】
各々の文字座標を8近傍画素連結成分抽出部37、ラベリングとグルーピング部40、文字座標算出部42によって部分射影部36と同様に文字列ごとに算出する。この処理の概念図を図6A〜6Dに示す。例として2と3の数字を2値化したものを図6Aに示す。8近傍画素連結成分抽出部37により図6Bに示す結果が得られ、それをラベリングとグルーピング部40により図6Cに示すように、等化処理、グループの融合などを行い図6Dに示す様に連結成分ブロックの始点座標と終点座標が得られる。
【0052】
ここで、8近傍画素連結成分抽出部37による画素連結成分算出について説明する。図7A,7Bには注目画素Pの連結成分をまとめるに必要な近傍ピクセルを示す。画素Pの連結成分を求めるには以下の処理を行う。
【0053】
・画素Pの値が0のときPのラベルを0とする。
【0054】
・画素Pが1で、すでに処理されている近傍画素A,B,CとDのラベルがすべて0であればPに新しいラベルを付ける。
【0055】
・画素Pが1で画素A,B,C,Dの中で一つでも0以外のラベルを持つならば0以外のラベルのなかから1つ選び、(例えば1番小さいラベル)、それをPのラベルとすると同時に、0以外のラベルを持つすべてのラベルが等価であること(等化処理と称する)を記録しておく。例えば図6Bに示す様に(7,10)座標を持つ画素を処理対象画素とすると、この時点では図7Aに示す近傍画素A,B,Cが既に処理されており、図7Bに示すラベルになっている(図6Bの斜線部を参照)。図6Aから明らかなように対象画素のラベルは1なので近傍画素の中から0以外の最小のラベルを捜すと2であるため、対象画素のラベルを2とする。さらに、近傍画素の中には0以外の対象画素と異なる3とラベルされた画素が存在するため、ラベル2とラベル3が等価であることが記憶される。
【0056】
このようにして得られた各画素のラベル値と等価ラベル情報が連結成分情報メモリ39に記憶される。
【0057】
ラベリングとグルーピング部40は連結成分情報メモリ39から連結成分ラベルデータと等価ラベルデータを読出し、等価であるラベルをグルーピングし、図6Cに示したように新しいラベルに置き換える。この情報がラベリング情報メモリ41に記憶される。等価ラベルデータに対して新しいラベルにより再ラベリングを行った後、ラベリングとグルーピング部40はラベリング情報メモリ41をスキャンし、同じラベルを持つ最小座標と最大座標を読取る。同じラベルを付された画素は全体として1つに連結された物理ブロックを表すと考えられるので、最小座標はその物理ブロックの始点座標、最大座標はその物理ブロックの終点座標となる。これらの座標情報が文字座標抽出情報メモリ43に記憶される。
【0058】
さらに文字座標抽出部42は、部分射影部36から平均文字サイズデータLHMSと各文字の始点情報MKZを受取り、これをもとに物理ブロックの融合化を行う。この融合化処理により例えば複数の連結成分からなる1つの文字の座標が算出される。この処理は文字始点から平均文字サイズの範囲内にある物理ブロックを一つの文字とするためのものである。したがって融合化される各々のブロックの座標データのうちの一番小さい座標データは対象文字の始点座標であり、一番大きい座標データはその文字の終点座標となる。
【0059】
例えば、次のような始点座標、終点座標を持つ二つのブロック、
ブロック1(xs1,ys1)、(xe1,ye1)、
ブロック2(xs2,ys2)、(xe2,ye2)
が融合されるとすると、融合されたブロックの始点終点座標(xs,ys),(xe,ye)、ブロックの横、縦の寸法Δx、Δyは以下のようになる。
【0060】
xs=min(xs1,xs2)
ys=min(ys1,ys2) (1)
xe=max(xe1,xe2)
ye=max(ye1,ye2)
Δx=xe−xs
Δy=ye−ys
この処理を文字列毎にすべての文字列に対して行い、ドキュメントD内のすべての文字の座標値および対応する寸法(Δx,Δy)を算出する。
【0061】
上記の方法で算出されたすべての特徴量はCPU13の指示に従って、特徴情報メモリアクセス部32が示す特徴量記憶部4のアドレスに書き込まれる。
【0062】
特徴抽出処理結果は特徴量記憶部4に図8に示したように記憶される。
【0063】
変換座標算出部5は、上記の特徴量記憶部4の特徴量と判断基準情報記憶部6の判断基準情報に基づいて、縮小率、スペース調整等を算出し、各々の文字の対応する座標データを出力すべく座標データに変換し、変換座標として変換座標記憶部7に記憶する。
【0064】
変換座標算出部5の詳細を図9から図14Cを参照しながら更に説明する。
【0065】
判断基準情報記憶部6にはCPU13を介してたとえば図2のキーボード13Eを用いて、もしくは図1の出力インターフェース12a〜12mを介して出力機器であるレーザプリンタ16b、ディスプレイ16cなどの各出力機器の数(N)やハードコピー用の紙サイズなどの対象メディアの大きさ(X1,Y1)や、機器の解像度(K)や、下記の文字間隔、文字列間隔、マージン等の最小値または文字最小寸法等が設定できる。CPU13から与えられ、記憶されている情報の一例を図9に示す。
【0066】
TMM トップ・マージン・ミニマム
BMM ボトム・マージン・ミニマム
LMM レフト・マージン・ミニマム
RMM ライト・マージン・ミニマム
CSM キャラクタ・スペース・ミニマム
LSM ライン・スペース・ミニマム
PSM 段組間の最小値
SAM スペース調整最小値
(このサイズ以下の文字は劣化される。)
変換座標算出部5は、図10に示すフローチャートによって実現される。これは、対象ドキュメントの出力にはスペース調整が必要かどうかを判断する判断処理と、必要であればスペース調整と縮小率を算出する処理と、元の座標データを出力座標データに変換する座標データ変換処理等から構成されている。
【0067】
判断処理は判断情報記憶部6からマージン、文字間隔、文字列間隔、単語間隔、段組み間隔等の最小値を読出し、特徴量記憶部4から各文字における座標データを読取って文字サイズを算出し、それに縮小率をかけることにより縮小後の文字サイズを求める(ST1)。例えば、図示しないドキュメントにおける文字列1の単語1の文字1の横方向(X方向)の大きさは
X_SIZE=XE_1_1_1−XS_1_1_1 (2)
となる。縮小率をSR(例えばA3からA4への出力の場合は0.71)とすると、縮小後の大きさは
XO_SIZE=X_SIZE*SR (3)
となる。縮小後の文字サイズXO_SEZEが判断情報記憶部6に設定された最小文字寸法より小さい場合はスペース調整により文字サイズの縮小率の調整が必要となる(ST2)。
【0068】
スペース調整が必要な場合には、スペース調整のためのパラメータやイメージ(文字)縮小率などが計算される(ST3)。スペース調整が不要な場合にはステップST1で算出された縮小率により変換座標算出部5にてイメージの位置データが変換され、スペース調整が必要な場合にはステップST3で算出されたパラメータおよび縮小率により変換座標算出部5が位置データを変換する(ST4)。そして変換された位置情報は変換座標記憶部7に記憶される(ST5)。
【0069】
スペース調整が必要となる場合の対象は様々であるがその代表的な例を以下に説明する。
【0070】
A.文字間、文字列間のスペース調整:
図11A〜11Cはスペース調整の概念を示す。この例では入力画像Dを従来通り単純に縦横50%縮小して出力すると図11Bに示した様にもとの面積の25%の面積のメディアに出力できる。しかし、文字間隔と文字列間隔をつめることにより図11Cに示すように同じ面積内に文字を比較的に大きく出力できる。図11A〜11Cに示したようにX1を文字の横方向の大きさ、X2を文字間隔、Y1を文字の縦方向の大きさ、Y2を文字列間隔とすると、もとのドキュメントDにおける文字の縦方向の大きさ、文字列間隔の最小値SPは、
SP=min(X2,Y2) (4)
とする。SR1を単純縮小率とすると、CPU13から設定された文字間隔の最小値LSMに対応する縮小前の値LSM´は以下のようになる。
【0071】
LSM′=LSM/SR1 (5)
従って調整(利用)可能なスペースは
X2′=SP−LSM′ (6)
となり、スペース調整後の文字部分X1の縮小率SR2は以下のように求められる。
【0072】
X1*SR2=(X1+X2′)*SR1 (7)
SR2=(1+X2′/X1)*SR1
図12には図10に示した位置情報変換処理のフローチャートを示す。
【0073】
1.図12の説明:
図12においては、最初に入出力メディア情報などから単純縮小率SR1を算出し、(4)式から(7)式に基づいてスペース調整後の縮小率SR2を算出する(ST6)。また特徴量算出手段により抽出される文字列数(ST7)、各ラインの単語数(NWj):(ST9)、各単語の文字数(NCk):(ST11)などを用い、また各々の文字の座標と上記の縮小率SR1,SR2とから(8)式に示すようにスペース調整後の各々の文字の始点座標と終点座標を算出する。図12のフローチャートでは、始点座標と終点座標とを、(XS k、YS k)、(XE k、YE k)が読み出される(ST13)。算出されるスペース調整後の各々の文字の始点座標と終点座標とは、(XTS k、YTS k)、(XTE k、YTE k)となる(ST14)。ただし、(8)式では、算出されるスペース調整後の各々の文字の始点座標と終点座標とは夫々、(XT start、YT start)、(XT end、YT end)として示されている。ここで、i,j、kは夫々、処理中の文字がi番目の文字列のj番目の単語のk番目の文字を表している。
【0074】
各文字の始点座標と終点座標を以下の式で求める。変換前の文字幅、すなわち横方向の長さX1は、
X1=X_end−X_start
したがってスペース調整後の文字部X1の変換始点座標は、
XT_start=X_start*SR1
変換後の文字幅ΔXTは、
ΔXT=X1*SR2
したがってスペース調整後の文字部X1の変換終点座標は、
XT_end=XT_start+ΔXT
となる。
【0075】
同様に、縦方向の変換前の文字長Y1は、
Y1=Y_end−Y_start (8)
したがってスペース調整後の文字部X1の変換始点座標は、
YT_start=Y_start*SR1
変換後の文字長ΔYTは、
ΔYT=Y1*SR2
したがってスペース調整後の文字部X1のY方向の変換終点座標は、
YT_end=YT_start+ΔYT
これらの情報を処理情報として変換座標記憶部7に記憶する。変換座標出力の一例を図13に示す。
【0076】
ステップST15ではk=k+1が計算され、ステップST16ではk≦NCK、すなわち次の文字がi番目の文字列のj番目の単語の最終文字か否かが判断され、k≦NCKなら次の文字についてステップST13、ST14が繰り返される。
【0077】
k>NCKとなった場合、ステップST17にてj=j+1が計算され、ステップST18にてj>NWj、すなわち次の単語がi番目の文字列の最終単語数を越えているか否かが判断される。j>NWjでなければ次の単語についてステップST11ないしST17の処理が繰り返される。
【0078】
ステップST18にてj>NWjとなり、最終単語の処理が終了した場合,i=i+1がステップST19で計算され、次の文字列の処理が行われる。すなわち、ステップST20にてi>NLであるか否か、最終文字列の処理が終了したか否かが判断される。最終文字列の処理が終了していない場合、i>NLの状態になるまでステップST9〜ST19の処理が繰り返される。
【0079】
なお、図1の実施例の画像処理部14を構成する特徴量抽出部3、変換座標算出部5、画像変換処理部8などは公知の方法、装置を導入して容易に実現できるのでここでは説明を省略する。
【0080】
この実施例では縦横両方向のスペース調整について述べたが、上記の(4)式のSPを、SP=min(X2)とすることで横方向のみのスペース調整、またSPを、SP=min(Y2)とすることにより縦方向のみのスペース調整をすることも可能である。
【0081】
B.マージンスペース調整:
図14A〜14Cにはマージンスペース調整の概念を示す。判断基準情報記憶部6から出力機器12a、…12mでの各々最小限のマージンスペースであるトップマージンスペースTMM,ボトムマージンスペースBMM,レフトマージンスペースLMM,ライトマージンスペースRMM等を読込み、特徴量記憶部4からドキュメントDの上下左右マージンTM,BM,LM,RM等を読込み、夫々における調整可能なスペースTMA,BMA,LMA,RMAを算出する。
【0082】
TMA=TM−TMM
BMA=BM−BMM
LMA=LM−LMM
RMA=RM−RMM (9)
上記の調整可能なマージンスペースから1文字あたりの縦横の調整可能なスペースを以下の様に算出する。
【0083】
SPA_X=(LMA+RMA)*SR1/NC
SPA_Y=(TMA+BMA)*SR1/NL
ここでSPA_Xは1文字あたりの横方向での調整可能なスペースを表し、SPA_Yは縦方向の調整可能なスペースを示す。NCは1文字列あたりの文字数で、NLは文字列数を表す。もしSPA_XまたはSPA_Yを(7)式のX2′に置き換えてSR2を求め、(8)式を以下の様に一般化すれば変換後の位置座標が算出できる。
【0084】
X1=X_end−X_start
XT_start=X_start*SR1−α1
XT_end=XT_start+X1*SR2
Y1=Y_end−Y_start
YT_start=Y_start*SR1−β1
YT_end=YT_start+Y1*SR2 (11)
ここで
α1=LMA−i*(SPA_X)
β1=TMA−j*(SPA_Y) (12)
である。αとβを0にすると(11)式は(8)式と等しくなる。
【0085】
C.単語間隔調整:
文字間隔調整と同様に、単語間隔の調整可能なスペースを算出できる。例えば判断基準情報記憶部6から単語間隔の最小値TKMを読出し、特徴量記憶部4から各々の文字列における単語数NW、単語間隔TK、文字数NC、文字間隔等を読出す。調整可能な単語間隔TKAは以下の様に算出できる。
【0086】
TKA=(TK−TKM)*NW
上記の調整可能なスペースから1文字あたりの横の調整可能なスペースを以下の様に算出する。
【0087】
SWA_X=(TKA*SR1)/NC
WKA_X=((TK−TKM)*SR1)+(SWA_X*NCW)(13)
ここで、WKA_Xは1文字あたりの横方向での調整可能なスペースを示し、WKA_Xは単語間のスペースを示し、NCWは単語j内の文字数を示す。
【0088】
縮小率SR2が以下の様に算出できる。
【0089】
X1*SR2=(X1+SWA_X)*SR1
SR2=(1+SWA_X/X1)*SR1 (14)
変換座標は以下のように求められる。
【0090】
X1=X_end−X_start
XT_start=X_start*SR1−α2
XT_end=XT_start+X1*SR2 (15)
ここで、オフセットα2は
α2=((SWA_X)*(i−j))+((WKA_X)*(j−i))(16)
となり、iはその行での対象文字の位置(例えば10番目の文字ならばi=10)であり、jは対象文字が属する単語の位置(例えば2番目の単語ならばj=2)を示す。
【0091】
同様に文字ブロック間のスペース(段組み間隔)を抽出することができる。また比較的大きい文字に関して縦方向のスペース調整のみ行い、そのスペースを利用して小さい文字の縮小率のみを変えることもできる。このように一つのドキュメント内で異なる縮小率を組み合わせたスペース調整も可能である。
【0092】
図15にその構成図を示す。
【0093】
図15において、制御部51は図15の構成全体の処理制御を行うCPUである。したがって前記CPU13をここで用いてもよいし、あるいは図1の画像処理部14のための専用CPUを別に用いても良い。
【0094】
前記特徴量読出し部52は特徴量記憶部4からのデータを読出す手段であり、文字毎の位置情報、原稿のサイズ、処理中の文字が含まれる文字列における平均文字間隔等の情報を読取る手段である。判断基準アクセス部54は、CPU13を介して外部から設定された判断基準情報記憶部6からの判断情報を読出す手段である。縮小率算出部53は特徴量読出し部52を通して原稿サイズ情報を受け、判断基準アクセス部54を通してセレクトされる出力機器16a、…16mのメディアサイズなどの情報を読出し、縮小率SR1を算出する。
【0095】
SR1は原稿のX方向サイズとメディアのX方向のサイズに基づくX方向の縮小率SR1Xと原稿のY方向サイズとメディアのY方向のサイズに基づくY方向の縮小率SR1Yとの各々が計算される。原稿のX方向、Y方向のサイズ比(縦横比)とメディアのX方向、Y方向のサイズ比が同じ場合にはSR1XとSR1Yとは等しくなり、同じでない場合はSR1XとSR1Yとは異なってくる。
【0096】
縮小率変換有無判断部63は、縮小率算出部53で決定された縮小率SR1_XとSR1_Yを変換する必要があるかどうか等を設定された文字サイズ最小寸法等によって判断する手段である。
【0097】
もし変換が必要であれば上記で述べた様に処理対応文字におけるX方向での調整可能なスペースX21,X22,X23,X24、Y方向での調整可能なスペースY21,Y22,Y23またはX方向における座標のオフセットα2,α3,α4とY方向での座標オフセットβ2,β3を調整可能な文字間隔算出部56、文字列間隔算出部60、調整可能な単語間隔調整部57(英文書のとき)、左右マージン調整スペース算出部58,上下マージン調整スペース算出部61とその他の横方向のスペース調整部59,その他の縦方向のスペース調整部62によって算出される。
【0098】
図15の文字間隔算出部56はX方向において文字間隔の調整可能な量X21((6)式参照)を算出するもので、同様に文字列間隔産出部60はY方向において文字間隔の調整可能な量Y21を算出するものである。また、単語間隔算出手段57は、単語間隔の調整可能な量X22を(13)式に基づいて算出し、さらにこれに対応する各文字における座標のオフセットαを(16)式に基づいて算出する。
【0099】
左右マージン算出手段58は調整可能な左右のマージンスペースX23を(10)式に基づいて算出するとともにこれに対応する座標のオフセットα3を(12)式に基づいて算出する。同様に、上下マージン算出手段61は調整可能な上下のマージンスペースY23を算出するとともにこれに対応する座標のオフセットβ2を算出する。
【0100】
同様に、その他の横方向のスペース算出部59とその他の縦方向のスペース算出部62とは、たとえば段組スペースなどの比較的大きいスペースに関しても同じ方法で調整可能なスペースとそれに対応するオフセットを算出するためのものである。
【0101】
それぞれの調整可能なスペースの和X2,Y2とそれぞれのオフセットの和αとβから縮小率SR2_X,SR_Yを算出し、元の座標(XS,YS)、(XE,YE)から変換後の座標(XTS,YTS)、(XTE,YTE)、または各々の文字の寸法(ΔXT,ΔYT)を算出し、CPU51の指示に従って、変換座標メモリアクセス部55によって出力されたアドレスに変換された座標データを変換座標記憶部7に書込む。上記演算は、減算器63a、…63f、加算器64a、…64h、乗算器65a、…65f、除算器66a,66bによって行われている。
【0102】
文字間隔調整、単語間隔、マージン調整のすべての方法は、(7)〜(16)式を参照して各々の調整法の説明に述べたように、まず調整した場合の縮小率SR2を求め、それと各々の連結成分の始点座標、終点座標から調整後の始点座標、終点座標を求めることとなっている。図15の記号をもとに書き直すと下記のようになる。
【0103】
X1=XE−XS (17−1)
SR2 X=(X1+X2)/X1)*SR1 X (17−2)
XTS=XS*SR1 X−α (17−3)
ΔXT=X1*SR2 X (17−4)
XTE=XTS+ΔXT (17−5)
Y1=YE−YS (18−1)
SR2 Y=(Y1+Y2)/Y1)*SR1 Y (18−2)
YTS=YS*SR1 Y−α (18−3)
ΔYT=Y1*SR2 Y (18−4)
YTE=YTS+ΔYT (18−5)
ここで、XSは連結成分の始点のX座標で、XEは連結成分の終点のX座標を示す。SR1 Xは横方向の単純縮小率を示し、SR2 Xは調整を取り入れた場合の縮小率を示す。また、XTSは調整後の始点のX座標で、XTEは調整後の終点のX座標を示す。ここではX2は調整可能なスペースを示す。
【0104】
例えば、図15の文字間隔算出部56のみを考えた場合、上記(17−2)式のX2は出力X21となり、文字間隔による横方向のスペース調整を意味し、(17−3)式のα=0なので上記の式は(7)式、(8)式と同じ物となり文字間隔によるスペース調整を表す。
【0105】
同様に、図15の単語間隔算出部57のみを考えた場合、上記(17−2)式のX2は出力X22となり、単語間隔による横方向のスペース調整となり、上記の式は(10)式、(11)式と同じ物となり単語間隔によるスペース調整を表す。
【0106】
同様に、図15の左右マージン調整算出部58のみを考えた場合、上記(17−2)式のX2は出力X23となり、(17−3)式のαはα3で、上記の式は(14)式、(15)のマージン調整によるスペース調整を代表する。同様に、縦方向におけるスペース調整は(18−1)式〜(18−5)式に示すようにXをY,またαをβに置き換えることによって表すことができる。
【0107】
つまり、すべてのスペース調整が、夫々の文字に対する調整可能なスペースとオフセットの算出を独立にすれば、基本的に(17−1)式〜(17−5)式、(18−1)式〜(18−5)式に示すように、文字のもとの座標(XS,YS)、縮小率SR2 X、SR2 Y、調整可能なスペースX2,Y2と、オフセットα、βにより上記の2つの式で表すことができる。
【0108】
さらに複数の方法による調整も同じ考えでまとめて施すことも可能である。この場合は、例えば、各々の方法による横方向の調整可能なスペースをX21(文字間隔調整)、X22(単語間隔調整)、X23(マージン調整)…などの総和
X2=X21+X22+X23+…=ΣX2i (19)
を総合的な調整可能なスペースX2とし、
α=α1+α2+α3+…=Σαi (20)
を対応する統合オフセットとすれば、上記の(17−1)式〜(17−5)式を用いると、横方向の複数方法によるスペース調整を同時に施すことができる。同様に、縦方向の調整可能なスペースをY21(文字列間隔調整)、Y22(マージン調整)…などの総和、
Y2=Y21+Y22+Y23+…=ΣY2i (21)
を総合的に調整可能なスペースとし、
β=β1+β2+β3+…=Σβi (22)
を対応する統合オフセットとすれば、上記の(18−1)式〜(18−5)式を用いると、縦方向の複数方法によるスペース調整を同時に施すことができる。
【0109】
図15の加算器64aは、(19)式に示す横方向の総合的な調整可能なスペースを算出するもので、それに対応する(20)式に表す総合的なオフセットは加算器64dにて算出される。同様に、(21)式に示す、縦方向の総合的な調整可能なスペースが加算器64fにて算出され、対応する(22)式の総合オフセットが加算器64eにて算出される。
【0110】
図15においては各々のスペース調整算出部56〜62の夫々はCPUなどで制御することも可能であり、CPUの指示によって夫々の処理の有無を決定することもできる。処理なしの場合であれば、対応するスペース調整手段の出力、つまりX2iまたはY2iならびに対応するオフセットαiまたはβiはゼロとなり、その方法によるスペース調整が無効となる。従って、この構成を用いると、一つの手段のみによるスペース調整、例えば単語間隔調整によるスペース調整のみを施すことができ、あるいは二つ以上のスペース調整、例えば文字間隔、文字列間隔、マージン調整などを同時に施すことができる。さらに、縦方向、横方向を独立に調整することもできる構成となっている。
【0111】
図15の構成では、調整可能なスペースとそのオフセットを求めると、(17−1)式〜(17−5)式、または(18−1)式〜(18−5)式よりスペース調整後の各文字の始点座標、終点座標を求めることが出来るように構成されている。
【0112】
(17−1)式のX1は減算器63aにてXEからXSの引き算によって算出される。また(17−2)式の実施において、まず加算器64cにて(17−2)式のX1とX2の加算が行われ、X1とX2の加算の結果とX1との割り算が割り算器66aにて実施され、割り算の結果とSR1 Xの乗算を乗算器65bにて行うことによりSR2 Xが算出される。
【0113】
次に、(17−3)式のスペース調整後のX方向の始点座標XTSは、まず乗算器65aにてSR1 XとXSの乗算が実施され、乗算結果と加算器64dからのオフセット出力の引き算を減算器63bにて行うことにより算出される。(17−4)式のΔXTは乗算器65cにてX1とSR2 Xの乗算を行うことにより算出される。(17−5)式の終点座標XTEは加算器64bにて乗算器65cの出力ΔXTと減算器63bの出力XTSの加算を行うことにより算出される。
【0114】
同様に、(18−1)式のY1は減算器63fにてYEからYSの引き算によって算出される。また(18−2)式のSR2 Yは、まず加算器64gにて(18−2)式のY1とY2の加算が行われ、Y1とY2の加算の結果とY1の割り算が割り算器66bにて実施され、割り算の結果とY1の乗算を乗算器65dにて行うことにより算出される。つぎに、(18−3)式のスペース調整後のY方向の始点座標YTSは、まず乗算器65fにてSR1 YとYSの乗算が実施され、乗算結果と加算器64fからのオフセット出力の引き算を減算器63eにて行うことにより算出される。(18−4)式のΔYTは、乗算器65eにてY1とSR2 Yの乗算を行うことにより算出される。(18−5)式の終点座標YTEは加算器64hにて乗算器65eの出力ΔYTと減算器63eの出力YTSの加算を行うことにより算出される。
【0115】
出力画像変換処理部8は、特徴量記憶部4から座標データを読出し、対応する画像データを入力画像記憶部2から読出し、また対応する変換座標をもとに変換を行い、処理結果は出力画像記憶部9に記憶しておく。
【0116】
図16は出力画像変換処理部8の構成図であり、制御部81は、処理全体の制御を行う汎用CPUである。ここではCPU13またはCPU51を用いることも出来る。変換座標メモリアクセス部82は、制御部81からの指示を受け、必要なアドレスと制御信号を出力し、変換座標記憶部7とのやり取りを行う。例えば、文字数などを読取り、第1文字列の第1単語の第1文字の変換後の座標を読出す。
【0117】
同様に特徴量アクセス部83は特徴量記憶部4から第1文字列の第1単語の第1文字の座標を読出す。特徴量アクセス部83により読取った座標データに対応する画像データを読出し内部バッファ86に記憶する。縮小率算出部85は、特徴量アクセス部83から元の文字座標と変換座標メモリアクセス部82から変換すべく文字座標を読取り、以下のように縮小率を算出する。例えば第1文字列の第1単語の第1文字における横方向の縮小率は、
SR_X=(ΔX1)/(XS_1_1_1−XE_1_1_1)
となる。ここで、SR_Xは縮小率で、ΔX1は変換後の横方向の長さで、XS_1_1_1、XE_1_1_1は文字の元の始点と終点座標を示す。縮小処理部88は縮小率算出部85から入力される縮小率に合わせて内部バッファ86に記憶された画像データの縮小を行う。
【0118】
この実施例ではニアレスト・ネイバー(Nearest Neighbor)法を使って縮小処理を行う。この方法は切出した(文字)画像に対して縮小率に合わせて再標本化を行うものであり、再標本化位置が元の標本化されたサンプル位置の間になった場合は四つの近傍の画素のうち一番近い距離の画素の値をその標本化位置の画素値とする方法である。
【0119】
縮小処理部88の処理構成を図17に示す。列アドレスカウンタ882はINGC信号を画素毎に受けてカウントアップされる。この列アドレスカウンタ882のカウント値は、比較部881により横方向の変換座標(XTE−XTS)と比較され、この比較結果が等しくなると、リセット信号RSTによって列アドレスカウンタ882がリセットされ、アドレスカウンタカウントアップ信号INCLによって行アドレスカウンタ883をインクリメントする。
【0120】
行アドレスカウンタ883は上記の様にインクリメントされる。この行アドレスカウンタ883のカウント値は、比較部884により縦方向の変換座標の差(YTE−YTS)と比較され、この比較結果が等しくなると、対象としている文字に関する縮小処理が終了したことを示す信号をCPU81に知らせる。横方向の変換座標の差は減算器887により算出され、縦方向の変換座標の差は減算器888により算出されている。
【0121】
列アドレスカウンタ882のカウント内容iに横方向の縮小率SR_Xが乗算器885で乗算され、行アドレスカウンタ883のカウント内容jに縦方向縦小率SR_Yが乗算器886で乗算される。乗算器885,886は四捨五入の処理できる乗算器で、再標本化位置を自動的に一番近い標本化位置にする。
【0122】
再標本化処理の結果、i1,j1は図16に示した様にアドレスセレクタ87を通して内部バッファ86のアドレス信号となり、内部バッファ86から再標本化値Pi1j1を読出す。図17のiにXTS、jにYTSを足したものが出力画像記憶部9のアドレスとなり、対応する再標本化値Pijはこのアドレスに記憶すべき画素値である。図16の出力画像メモリアクセス部89にアドレス(XTS+i,YTS+j)が算出され、画素値Pijが出力画像記憶部9に記録される。
【0123】
図17の処理を説明するためのフローチャートを図18に示す。入力ドキュメントDの各々の文字に対して上記の縮小処理を行い出力画像記憶部9に蓄えておく。出力部10は、出力すべき出力機器12a、…12mの一つを選択し、出力画像記憶部9から画像を読出して出力を行う手段である。
【0124】
この実施例では汎用CPUを用いてソフトウエアによる処理を行っているが、専用ハードウエアを用いることにより同じ結果を得ることも可能である。さらに、演算等をすべて座標データをもとに行っているが、座標データの代わりに寸法(例えばmm)をもとに算出することもできる。
【0125】
次に、この発明による画像処理機器の動作を一例をあげて説明する。例えば図19に示すドキュメントDを縦横50%(面積で1/4の)小さいメディアに出力を行うとする。図20Aに単純縮小したものを示し、図20Bにはスペース調整後の一例を示す。図19は異なる文字寸法の領域(1) ,(2) ,(3) ,(4) から構成されているとする。図19の領域(2) の文字は1/4に縮小するとつぶれてしまい読解し難いとする。領域(1) ,(3) ,(4) は(2) と比べて比較的大きい文字とし、領域(1) ,(4) は日本語、領域(3) は英文領域とする。
【0126】
図20Bにおいては上マージンを60%、下マージンを28%、削減した例である。領域(1) においては縮小率は50%で、文字間隔を20%広げ、文字列間隔を20%詰めて出力されている。領域(2) はそのまま50%縮小率で出力すると読解し難いので文字間隔を33%程度詰め、縮小率を80%として出力する。
【0127】
領域(2) を縮小率を80%としたため、段組み領域(1) −領域(3) 、段組み領域(2) −領域(4) の間隔を20%詰めても、段組み領域(3) と段組み領域(4) の横幅を28%程度減らす必要がある。これを領域(3) の場合は縮小率50%とし、文字間隔を50%、単語間隔50%程度詰め、領域IVの場合は縮小率を40%とし、文字間隔を20%程度広げることにより調整する。
【0128】
上記の説明の通り、局所領域の文字の寸法等によって局所的に文字間隔、文字列間隔、拡大、縮小の変倍率を変えることにより、出力メディアのサイズによって見やすい大きさでドキュメント情報の出力が可能である。また領域(1) ,(2) ,(3) ,(4) それぞれを別々のドキュメントと考えることもできる。すなわち複数の異なる寸法の文字から構成されたドキュメントを1つのドキュメントにまとめる際には、各々のドキュメント内の文字寸法、空スペース等を判断し、それらの適切な変倍、調整等を行うことにより見易い出力が可能である。またこの実施例では文字領域の縮小について述べたが、場合によって文字を局所的に拡大して出力する場合も同様に実施できる。
【0129】
上記したように、ドキュメント画像データを入力し、この入力されたドキュメント画像データから、上下左右マージン、文字間隔、文字列間隔、単語間隔、段組み間隔、文字の大きさ、座標などの特徴量を抽出し、あらかじめ設定されている出力時の最小マージン、最小文字寸法等の判断基準情報と上記特徴量とを基に、スペース調整、変倍率等を算出し、元の座標データを変換し、この変換された座標と元の座標から入力画像の変換を行い、この変換された画像を指定された出力機器に出力するようにしたものである。
【0130】
さらに、この発明の画像処理装置を用いて、入力側から任意の出力機器や記憶装置の選択、任意の出力機器から出力機器や任意のサーバ上に予め記憶された画像データの選択が可能である。また、入力側から出力機器やそのメディアに応じて処理を施した後の画像出力、出力側から必要な入力機器やサーバ上の画像データのその出力機器の特性に合った処理を施した後の出力が可能である。
【0131】
さらに、その他のデータ入力機器や制御機器から任意の入力機器や記憶装置からの画像データの任意の出力機器や記憶装置に出力することも可能である。
【0132】
なお、上記の実施例では、複数の入力機器、複数の出力機器を考察した汎用的なシステムについて開示したが、実施例としては種々の構成が考えられる。例えば、図1の実施例の画像処理部14のみを図2Bに示したように入力機器、たとえばスキャナ15bと一体化して入力機器として動作するように調整してから、たとえばプリンタに出力するようにした、適応型スキャナ15b´の構成も考えられる。なお、図2Bにおいて画像処理部14には出力機器情報インターフェース18として、たとえばキーボードやタッチパネルなどが接続されており、画像処理部14から出力される出力機器の情報を画像処理部14にインプットすることができる。
【0133】
この図2Bに示された適応型スキャナ15b´は接続される出力機器の情報をインターフェース18を介して受け、それに合わせて処理パラメータを決定する。入力画像を設定されたパラメータに基づいて処理し、出力機器に合った出力に変換して出力される。
【0134】
スキャナ以外の入力機器においても同様の構成で実現できる。
【0135】
また、この発明の画像処理部を所定の出力機器と一体化することにより、入力される画像を自分自身の出力能力に合った処理を施すことにより入力画像の変換を行い、見易い表示や出力が可能である。
【0136】
例えば図2Cに示すように、画像処理部14をPDA16cと一体化することにより適応型表示ができるPDA16c´を得ることが可能である。ここでは、PDA16cからアクセスする情報に対してまず画像処理を施してスペース調整などを行い、その後表示を行う。
【0137】
同様な構成がその他の出力機器についても可能である。
【0138】
また、スキャナなどで読みとったイメージデータから構造解析技術を用いて文字/写真などの意味のある情報のみを抽出し、その情報の位置と大きさを求める。これをもとにイメージデータから意味のある情報のみを切り出し、それを出力することにより原稿外消去、本の影消去などを実現する。
【0139】
さらに、複数枚の原稿を1枚のドキュメントとして出力する際に、文字サイズと縮小率により、出力される文字が細かすぎることがある。構造解析技術により、文字サイズ、文字間隔などを求め、文字が細かい場合は文字間隔をある程度つめ、文字をできる限り大きく出力することができる。
【0140】
これにより、入力されたドキュメントイメージデータを出力すべきメディアの大きさに合わせて入力ドキュメント内の空スペースを調整することにより文字情報を見やすく出力することができる。
【0141】
したがって、文書構造解析技術を用いて、スキャナなどの入力装置にて読みとったイメージデータの構造化を行うことにより、イメージデータを扱い易くなる。
【0142】
また、構造解析技術を用いて文字/写真などの領域を抽出し、本の影消しや原稿外消去などによる清書コピーが可能となる。
【0143】
さらに、複数枚の原稿を1枚に複写する際に、文字サイズが細かすぎると、自動的に文字間のスペースを詰めて文字をある程度大きく出力できる。
【0144】
【発明の効果】
以上詳述したようにこの発明によれば、ドキュメントのイメージデータを、表示・出力サイズの異なるメディアに表示・出力する際にドキュメント内の文字情報を最適なサイズに変換することができる画像処理装置を提供できる。
【図面の簡単な説明】
【図1】図1はこの発明の一実施例を説明するための画像処理装置の概略構成を示すブロック図。
【図2】図2Aは図1に示した一実施例の画像処理装置のコントローラ部の構成を示すブロック図。図2B、2Cは図1の実施例に用いられるスキャナおよびディスプレイの夫々の一例を示すブロック図。
【図3】図3A、3B、3C、3Dは入力され、サンプリングされるドキュメント画像およびその座標の一例を説明するための図。
【図4】図4は特徴量抽出部の構成を示すブロック図。
【図5】図5は一つのドキュメント上の全画像射影の一例を示す図。
【図6】図6A、6B、6C、6Dはラベリング処理の概念を説明するための図。
【図7】図7A、7Bは夫々8近傍画素の連結成分抽出用の近傍モデルを示す図。
【図8】図8は特徴量抽出部からの出力情報を示す図。
【図9】図9は判断基準情報の一例を示す図。
【図10】図10は変換座標算出部の処理を説明するためのフローチャート。
【図11】図11A、11B、11Cは入出力画像上でスペース調整の概念を説明するための図。
【図12】図12は位置情報変換処理を説明するためのフローチャート。
【図13】図13は変換座標出力の一例を示す図。
【図14】図14A、14B、14Cは入出力画像上でマージンスペース調整の一例を示す図。
【図15】図15は座標変換部の構成例を示す図。
【図16】図16は画像変換部の構成例を示すブロック図。
【図17】図17は縮小処理部の構成例を示すブロック図。
【図18】図18は再標本化処理を説明するためのフローチャート。
【図19】図19は変換前の複数ドキュメントの組合わせ画像を示す図。
【図20】図20A、20Bは夫々異なる方法で変換後の画像を示す図。
【符号の説明】
1…入力部、
2…入力画像記憶部、
3…特徴量抽出部、
4…特徴量記憶部、
5…変換座標算出部、
6…判断基準情報記憶部、
7…変換座標記憶部、
8…画像変換処理部、
9…出力画像記憶部、
10…出力部
11a〜11n…入力インターフェース
12a〜12m…出力インターフェース
13…コントローラ部、
13A…CPU,
14…画像処理部、
15a〜15n…入力装置、
16a〜16m…出力装置。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus that displays or outputs image data of a document input from a source such as a scanner, a facsimile, or an e-mail on media having a different display size or output size.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, image processing apparatuses that display or output document image data input from sources such as scanners, facsimiles, and e-mails on media having different display sizes or output sizes have been put into practical use.
[0003]
That is, document image data input from a source including various image reading means and image communication means such as a scanner, a facsimile machine, and an e-mail is reduced or converted in resolution, or a plurality of documents are integrated into one, and then displayed on a display. There is an image processing apparatus that displays a hard copy by a printer or the like, or a facsimile transmission output.
[0004]
In such an apparatus, when document image information is output to a medium having an output size different from that of the original, the document image information is output through a uniform scaling (enlargement / reduction) process according to the output size.
[0005]
[Problems to be solved by the invention]
However, for example, if the original document is small and the entire document image including a relatively large empty space between character strings or characters is simply reduced, all image areas including the empty space are reduced proportionally. In some cases, small characters in the document are further reduced to make them difficult to read. In addition, if the enlargement process is simply performed on the entire document image including the empty space, the empty space is also proportionally enlarged, and there is a large empty space compared to the character size in the displayed / output document image. It may stand out.
[0006]
In other words, if the enlargement / reduction processing is simply performed when displaying / outputting document image data on media with different display / output sizes, the character information in the document cannot be displayed / output at the optimum size. In addition, there is a drawback that the display / output media cannot be used effectively, such as a large empty space is created in the document image to be displayed / output.
[0007]
Therefore, according to the present invention, when displaying / outputting document image data on a medium whose display / output size is different from the original size of the document, character information in the document can be converted to an optimum size by using an empty space. An object of the present invention is to provide an image processing apparatus that can effectively use display / output media.
[0008]
[Means for Solving the Problems]
  An image processing apparatus according to an aspect of the present invention includes:Storage means for storing a plurality of character symbols and information of an image including a space between the plurality of character symbols, and the position of the character symbol, the size of the character symbol, and the interval between the character symbols from the image stored by the storage means Feature information detection means for detecting feature information; first calculation means for calculating a reduction ratio (SR1) of the first image from the size of the image stored by the storage means and the image size after reduction; A determination means for determining whether or not the adjustment of the character symbol interval is necessary based on the reduction ratio of the first image calculated by the first calculation means; and the adjustment of the character symbol interval by this determination means is necessary If it is determined that the character symbol is not, the entire image stored by the storage means is reduced by the first reduction ratio based on the character / symbol position / character / symbol size feature information. If it is determined that the interval needs to be adjusted, the character symbol in the image stored by the storage means is reduced by a second reduction ratio (SR2: SR2 <SR1) smaller than the first reduction ratio and Reduction means for reducing the interval between the character symbols so as to be even smaller than when the character symbol is reduced by the first reduction ratio, and making the entire image stored by the storage means have the same size as when the image is reduced by the first reduction ratio;It is composed of
[0011]
According to still another aspect of the present invention, an image processing apparatus includes a first storage unit that stores image information including a plurality of character symbols, a space between the character symbols, and a margin space around the image, and the first storage. Feature information detecting means for detecting feature information including character symbol position, character symbol size, character symbol interval and margin space around the image from the image stored by the means, minimum character symbol size, character symbol interval The first image reduction ratio (SR1) from the second storage means for storing the minimum value of the image and the minimum value of the margin space around the image, and the size of the image stored by the first storage means and the image size after reduction. ) And a first reduction rate calculated by the calculation unit based on the size of the character symbol detected by the feature information detection unit. The second calculation means for calculating the size of the reduced character symbol is compared with the reduced character symbol size and the minimum size, and when the reduced character symbol size is larger than the minimum size, the adjustment of the character symbol interval is performed. If the character symbol size after the reduction is smaller than the minimum size, the judgment means judges that the character symbol interval needs to be adjusted, and the character symbol spacing needs to be adjusted by this judgment means. A first reduction means for reducing the entire image stored by the first storage means at a first reduction rate based on the feature information of the position of the character symbol and the size of the character symbol; When it is determined by the determining means that the character symbol interval needs to be adjusted, the character symbol interval detected by the feature information detecting means, the margin space around the image, and the second Third calculating means for calculating an adjustable amount of the character symbol interval and the margin space based on the minimum value of the character symbol interval stored by the means and the minimum value of the margin space around the image; Fourth calculation means for calculating a second reduction ratio (SR2: SR2 <SR1) smaller than the first reduction ratio as a character reduction ratio based on the adjustable amount calculated by the calculation means; When it is determined by the means that the adjustment of the character symbol interval is necessary, the second reduction rate (SR2) calculated by the fourth calculation means for the character symbols in the image stored by the first storage means. , The character symbol interval and the margin space are further reduced to be smaller than the first reduction ratio and equal to or larger than the minimum value, and stored in the first storage means. And a reduction means for making the entire image the same size as when the image is reduced by the first reduction ratio.
[0012]
By adopting the above configuration, the present invention can use an empty space of a document image when displaying / outputting document image data on a medium whose display / output size is different from the original size of the document. Provide an image processing device that can convert character information in a document to an optimal size, such as outputting a relatively large character portion by adjusting the empty space at the time, and that can effectively use display / output media be able to.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0014]
FIG. 1 is a block diagram showing an image processing apparatus according to an embodiment of the present invention.
[0015]
In FIG. 1, an input unit 1 is provided as a data input unit of the image processing unit 14, and includes an electronic camera 15a, a scanner 15b, a personal computer 15c, a memory 15d, and the like as input devices via a plurality of input interfaces 11a to 11n. Is connected to the network 15e or the facsimile 15f. Other input devices include various image input devices such as a film reader, or an input device group that provides image data such as a server such as an e-mail or a hard disk. Input image data from one input device designated from these input device groups is selected by an input select signal from the controller unit 13 including the CPU 13 </ b> A and accepted by the input unit 1. Image data of the original is input to the input image storage unit 2 in the image processing unit 14 from the selected input device, for example, the scanner 15b. These various image input devices are connected to corresponding interfaces by wire or wirelessly. For example, the electronic camera 15a is wirelessly connected to the interface 11a.
[0016]
The input image storage unit 2 is a means for temporarily storing the image data input to the input unit 1.
[0017]
The feature amount extraction unit 3 reads the left and right and top and bottom margins of the document, empty spaces between columns, character intervals, word intervals, character string intervals, the coordinates of each character, characters from the input image data read from the input image storage unit 2 It is a means for extracting physical features such as dimensions, average character size, average character spacing, average character string spacing, and determining whether the document is in English or Japanese based on these physical features.
[0018]
Here, the characters include alphabets, Greek characters, Russian characters, kana, kanji, special characters of those countries, numbers, mathematical symbols, marks formed with other characters, and the like. However, in the following description of the embodiment, it will be described as character for simplicity.
[0019]
The feature quantity storage unit 4 temporarily stores the extracted feature quantity data and the judgment results of Japanese and English.
[0020]
The criterion information storage unit 6 includes the number of output devices 16a,... 16m that can be output, the resolution of each output device 16a,..., 16m, media size, minimum character size, minimum character spacing, minimum character string spacing, and minimum left / right and top / bottom margins. This is a means for receiving and storing determination criterion information for selecting the output devices 16a,. For example, the output device 16a is a laser printer, and 16c is a display device.
[0021]
The converted coordinate calculation unit 5 obtains a scaling factor, that is, an enlargement rate or a reduction rate, based on the feature amount obtained by the feature amount extraction unit 3 and the judgment criterion information preset in the judgment criterion information storage unit 6, and each character Is a means for converting the original coordinates to coordinates to output.
[0022]
The converted coordinate storage unit 7 temporarily stores the converted coordinate data.
[0023]
The image conversion processing unit 8 cuts out each character image from the image data based on the original coordinate data in the input image read from the input image storage unit 2, and the original coordinates are stored in the conversion coordinate storage unit 7. A conversion process such as a character size is performed based on the conversion coordinates and the scaling factor obtained in the conversion coordinate storage unit 7.
[0024]
The output image storage unit 9 is means for temporarily storing the image data converted by the image conversion processing unit 8.
[0025]
The output unit 10 is one of interfaces 12a to 12m corresponding to an output device designated by the controller unit 13, such as a memory 16a, a printer 16b, a display 16c, a personal computer 16e connected via a network 16d, and a hard disk 16g. For example, the laser printer interface 12b is selected, and a converted image subjected to conversion processing such as character size is output as a hard copy. These output devices are coupled to the image processing apparatus by wire or wirelessly. In the illustrated example, the output interface 12c and the display 16c are coupled wirelessly. Further, the image data input to the input unit 1 is stored in the memory 16a, which is the main storage device, without being processed by the processing unit 14, or is stored in the hard disk 16g via the network 16d.
[0026]
Here, the controller 13 will be described in more detail. The controller 13 is mainly composed of a CPU 13A, and this CPU 13A is realized by using a commercially available one or a CPU board.
[0027]
The controller 13 gives an input select signal to the input unit 1 in response to a request from the input device via the input interfaces 11a to 11n. As a result, the input device connected to the input interface that issued the request, such as a scanner, for example. Image data from 15 b is sent to the image processing unit 14. The memory 16a, the output devices 16b and 16c, and the like can also be selected by a request from the input interfaces 11a to 11n. In this case, an output select signal is supplied from the controller 13 to the output unit 10, and the processed image data selected via the corresponding output interface, for example, is sent to the memory 16a. Similarly, an output select signal is given to the output unit 10 in response to a request from an output device via the output interfaces 12a to 12n, and an input device or memory requested by the output device can be selected. In this way, it is possible to select necessary data from the input device or memory from the output device side, and it is possible to process and output the data according to the media size, resolution, etc. of the output device.
[0028]
Further, various control devices and data input devices connected to the controller unit 13 by wire or wirelessly, such as a keyboard, a liquid crystal panel, or a remote controller, output or store images obtained from any input device to any output device. You can also. In addition, data stored in advance can be output to an arbitrary output device.
[0029]
An example of means for detecting an input / output request in the controller 13 is shown in FIG. 2A. The request port 13B in FIG. 2A is provided with a plurality of bits B1 to Bn + C1 to Cm, the request information R1 to Rn from the input interfaces 11a to 11n is supplied to the bits B1 to Bn, and the bits B1 to Bm are The request information r1 to rm from the output interfaces 12a to 12m is connected so as to be supplied. When request information is supplied from any of the interfaces, the corresponding bit becomes “1”. The plurality of bits of the request port 13B are scanned in sequence by the CPU 13A, and when “1” is detected, it is understood that there has been a selection request from the corresponding input device or output device via the corresponding interface.
[0030]
When the CPU 13A detects “1” as a result of the bit scan, it sends a select signal (SEL) to the control port 13C and controls the control information of the input interfaces 11a to 11n or the output interfaces 12a to 12m corresponding to the bit where “1” is detected. Control information is output to terminals I1 to In and O1 to Om. These terminals I1 to In and O1 to Om are connected to the input unit 1 and the output unit 10 in FIG. 1, and the control bus of the input device or output device corresponding to the bit in which “1” is detected is used as the image processing unit 14. Connect to and receive information on the device to be selected. For example, an output device requested based on this information is selected.
[0031]
For example, information on the electronic blackboard during the meeting is supplied from the meeting room to the image processing unit 14 by wire or wirelessly using a scanner, or information written on a normal blackboard or white board using an electronic camera. Image information that has undergone processing such as adjustment or that has not been processed can be stored in, for example, a server or transmitted by facsimile.
[0032]
When a request from the output device is detected as a result of scanning the request port 13B, the output device is connected to the image processing unit 14 and the requested input device or memory is selected.
[0033]
For example, a business trip destination uses a PDA (Personal Data Assistance) 16c to access the image processing unit 14 wirelessly via the output interface 12c, and performs image processing such as space adjustment on necessary information on the designated server. Then, when the processed information is received, an easy-to-see image display suitable for the display at hand can be performed.
[0034]
Further, a keyboard 13E, a touch panel 13F, a network 13G, and the like are connected to the controller unit 13 via a data / control input interface 13D. A desktop personal computer PC and a laptop personal computer laptop are connected to the network 13G. A desktop KB and a mouse MS are attached to the desktop personal computer PC. These devices connected to the network 13G are used as image data input means, output means, or storage means. For example, a remote camera can be operated by operating a remote controller, and the image can be output to a remote printer in accordance with the media size, resolution, etc. of the printer.
[0035]
In the example of FIG. 2A, the request port and the control port are used to respond to the request from the input / output interface. However, the present invention is not limited to this, such as bus arbitration and queing that are often used in computer systems and the like. A general and more advanced control method based on the concept is also possible.
[0036]
Next, each part shown in FIG. 1 will be described in more detail.
[0037]
The input unit 1 connects one of input devices specified by an input select signal from the controller unit 13, for example, a scanner 15 b to the image processing unit 14, and image data of a document is received from the selected scanner 15 b. Entered. For example, when the 10-pixel / mm, 8-bit scanner 115b is selected, image data formed by sampling document information at intervals of 10 pixels (0.1 mm pitch) per 1 mm is input.
[0038]
3A to 3D show an example of correspondence between the original document and the document information after sampling. In this example, a document of A3 (420 mm × 297 mm) size is sampled at a pitch of 0.1 mm. As shown in FIG. 3A, the number of pixels after sampling is (4199 × 2969), and assuming that there are 256 gradations per pixel, one image data is composed of about 12 Mbytes.
[0039]
If the upper left corner of the document shown in FIG. 3A is the origin and there is a letter A having a size of 4 mm × 4 mm as shown in FIG. 3B at a position of 40 mm in the X direction (horizontal direction) and 40 mm in the Y direction (vertical direction), After sampling, as shown in FIG. 3C, the start point coordinates of the character A are (400, 400), and the end point coordinates are (439, 439).
[0040]
Sampling is performed in units of area S shown in FIG. 3C, and the value is set as the pixel value of the coordinate. For example, if the sampling value for the sampling area S is 220 as shown in FIG. 3D at the position of 41.8 mm in the vertical direction and 40 mm in the horizontal direction, that is, the position of the coordinates (418,400), this value is the coordinates (418,400). ). An example of the correspondence between the pixel values of the sampling coordinates is shown in FIG. 3D. The input image storage unit 2 stores the pixel value of the document image data input at the address position corresponding to each coordinate. Each pixel value represents the density of the pixel at that coordinate. That is, the blacker the pixel, the higher the pixel value.
[0041]
The feature amount extraction unit 3 reads out the document image data from the input image storage unit 2, and based on the pixel value, the top and bottom, left and right margins of the document, the coordinates and size of a relatively large free space, English / Japanese, character string , The number of words in each character string, the number of characters in each word, the coordinates, size, average character spacing, average character spacing, etc. of each character are stored in the feature quantity storage means 4.
[0042]
Here, details of the feature quantity extraction unit 3 will be described. A block diagram of the feature quantity extraction unit 3 is shown in FIG. In FIG. 4, the control unit 13 controls a feature amount extraction process and the like. The feature amount access unit 32 is a means for creating an address, a control signal, and the like for storing the feature extracted from the document image in the feature amount storage unit 4. The image access unit 34 is means for exchanging data with the input image storage unit 2 in the same manner as the feature amount access unit 32.
[0043]
The binarization unit 33 is a unit that receives the image data read from the input image storage unit 2 by the image access unit 34 and performs binarization. In other words, the binarization unit 33 compares the read pixel value with a preset threshold value, and if the target pixel value is larger than the threshold value, the binarization output is set to 1 (black dot), otherwise the binarization output is performed. Is set to 0 (white point). The binary image memory 38 is a memory that stores the image data binarized by the binarizing unit 33.
[0044]
The all-image projecting unit 35 performs vertical and horizontal projection of all the images of one document, sets a value that is smaller than the predetermined threshold value to 0, and leaves the rest as it is. In the projection, only the number of black pixels is integrated from the vertical and horizontal pixel columns, and this is used as the projection value of the row or column. An example of the whole image projection in one document by the all image projection unit 35 is shown in FIG. By appropriately selecting the threshold value and setting the threshold value to, for example, half of the total number of black pixels added, various empty spaces in the document, their dimensions, and the like are obtained using the entire image projection unit 35.
[0045]
For example, when the small rectangles I1, I2, I3, and I4 in the document D shown in FIG. 5 represent characters, the intervals between the rectangles I1 and I2 are character intervals, and the intervals between the rectangles I1 and I4 are character string intervals. If the start point coordinates (Xs1, Ys1) of the upper left corner of the rectangle I1 are the same position as in FIG. 3A, (Xs1, Ys1) = (400, 400). If the character dimensions in this case are the same as in FIG. 3B, the end point coordinates (Xe1, Ye2) = (440,440). If the character interval between the rectangles I1 and I2 is 2 mm, and the character string interval between the I1 and I4 is 6 mm, the start point coordinates (Xs2, Ys2) = (460,400) and the end point coordinates (Xe2, Ye2) of the rectangle I2 = (500, 440).
[0046]
Assuming that the start point coordinates (Xs4, Ys4) = (400, 500) and the end point coordinates (Xe4, Ye4) = (440, 540) of the rectangle I4, the upper margin is obtained by taking a horizontal projection as shown in FIG. A peak corresponding to the upper end of the character string 1 appears at about the 400th pixel line from the upper end of the document D corresponding to TM, and the upper margin TM and the character string 1 can be detected when the peak continues for about 40 pixel lines. . The second peak corresponding to the upper end of the character string 2 starts from approximately the 500th pixel line, and the character string 2 can be detected by continuing approximately 40 pixel lines.
[0047]
On the other hand, due to the projection in the vertical direction, the left margin LM is from the start to the start of the first peak (400 in this example), and the character spacing is the distance from the end of the first peak to the start of the next peak (for example, XS2-XE1 = 20). The character size can be calculated as the spread of a mountain (eg, XE2-XS1 = 40), and the right margin RM can be calculated as the distance from the end of the last mountain to the right edge of the document D.
[0048]
If there are two types of character intervals and one is about 1.5 to 2 times the other, the larger interval is set as the word interval. Similarly, there are two types of character string intervals, and if one is about another three times, for example, the larger rectangular interval is treated as a column interval.
[0049]
Furthermore, the number of character strings NL from the number of horizontal projection peaks (N1, N2, N3), the number of characters per character string from the number of vertical projection peaks (C1, C2, C3), or the average character size (XL, YL) ), Average character string interval HLS, average character interval HMS, and the like are calculated. Also, calculate the aspect ratio of the characters in each character string, and if there are many characters with the same aspect ratio on average, the sentence is judged to be a Japanese sentence and output, and the aspect ratio is almost If there are about two spaces between characters (character spacing, word spacing), the sentence is judged to be English, and a label of EN is output for English and JP is output for Japanese. The interval between columns, which is a relatively large space, is stored as the coordinates of the empty space (XLS, YLS) and the number of empty spaces (NLS) between the columns.
[0050]
The partial projection unit 36 receives information such as character string position information and character string spacing from the entire image projection unit 35, extracts data for each character string from the binary image memory 38, and performs projection processing only in the vertical direction for each character string. The number of words NW, the number of characters NC in each character string, the starting point MKZ of each character in the target character string, or the average character size LHMS is calculated.
[0051]
Each character coordinate is calculated for each character string by the 8-neighbor pixel connected component extraction unit 37, the labeling and grouping unit 40, and the character coordinate calculation unit 42 in the same manner as the partial projection unit 36. A conceptual diagram of this processing is shown in FIGS. As an example, FIG. 6A shows binarized numbers 2 and 3. The result shown in FIG. 6B is obtained by the 8-neighbor pixel connected component extraction unit 37, and the result is equalized and grouped as shown in FIG. 6C by the labeling and grouping unit 40 and connected as shown in FIG. 6D. The start point coordinates and end point coordinates of the component block are obtained.
[0052]
Here, pixel connection component calculation by the 8-neighbor pixel connection component extraction unit 37 will be described. FIGS. 7A and 7B show neighboring pixels necessary for collecting the connected components of the target pixel P. FIG. In order to obtain the connected component of the pixel P, the following processing is performed.
[0053]
When the value of the pixel P is 0, the label of P is set to 0.
[0054]
If pixel P is 1 and the labels of already processed neighboring pixels A, B, C and D are all 0, a new label is attached to P.
[0055]
If the pixel P is 1 and at least one of the pixels A, B, C, D has a label other than 0, select one from the labels other than 0 (for example, the smallest label), and select P At the same time, it is recorded that all labels having labels other than 0 are equivalent (referred to as equalization processing). For example, as shown in FIG. 6B, if a pixel having (7, 10) coordinates is a processing target pixel, the neighboring pixels A, B, and C shown in FIG. 7A have already been processed at this point, and the label shown in FIG. (See the shaded area in FIG. 6B). As apparent from FIG. 6A, since the label of the target pixel is 1, searching for the smallest label other than 0 from the neighboring pixels is 2. Therefore, the label of the target pixel is 2. Further, since there is a pixel labeled 3 different from the target pixel other than 0 in the neighboring pixels, it is stored that label 2 and label 3 are equivalent.
[0056]
The label value and equivalent label information of each pixel obtained in this way are stored in the connected component information memory 39.
[0057]
The labeling and grouping unit 40 reads the connected component label data and the equivalent label data from the connected component information memory 39, groups the equivalent labels, and replaces them with new labels as shown in FIG. 6C. This information is stored in the labeling information memory 41. After relabeling the equivalent label data with a new label, the labeling and grouping unit 40 scans the labeling information memory 41 and reads the minimum and maximum coordinates having the same label. Since the pixels with the same label are considered to represent the physical blocks connected together as a whole, the minimum coordinate is the start point coordinate of the physical block, and the maximum coordinate is the end point coordinate of the physical block. These pieces of coordinate information are stored in the character coordinate extraction information memory 43.
[0058]
Further, the character coordinate extraction unit 42 receives the average character size data LHMS and the start point information MKZ of each character from the partial projection unit 36, and based on this, the physical blocks are merged. By this fusion processing, for example, the coordinates of one character composed of a plurality of connected components are calculated. This process is for making a physical block within the range of the average character size from the character start point into one character. Accordingly, the smallest coordinate data of the coordinate data of each block to be merged is the start point coordinate of the target character, and the largest coordinate data is the end point coordinate of the character.
[0059]
For example, the following two blocks with start and end coordinates:
Block 1 (xs1, ys1), (xe1, ye1),
Block 2 (xs2, ys2), (xe2, ye2)
Are merged, the start point and end point coordinates (xs, ys), (xe, ye) and the horizontal and vertical dimensions Δx, Δy of the block are as follows.
[0060]
xs = min (xs1, xs2)
ys = min (ys1, ys2) (1)
xe = max (xe1, xe2)
ye = max (ye1, ye2)
Δx = xe−xs
Δy = ye−ys
This process is performed for all character strings for each character string, and the coordinate values and corresponding dimensions (Δx, Δy) of all characters in the document D are calculated.
[0061]
All feature amounts calculated by the above method are written to the address of the feature amount storage unit 4 indicated by the feature information memory access unit 32 in accordance with an instruction from the CPU 13.
[0062]
The feature extraction processing result is stored in the feature amount storage unit 4 as shown in FIG.
[0063]
The converted coordinate calculation unit 5 calculates a reduction ratio, space adjustment, and the like based on the feature amount of the feature amount storage unit 4 and the determination reference information of the determination reference information storage unit 6, and the corresponding coordinate data of each character. Is converted into coordinate data so as to be output, and stored in the converted coordinate storage unit 7 as converted coordinates.
[0064]
Details of the conversion coordinate calculation unit 5 will be further described with reference to FIGS. 9 to 14C.
[0065]
For example, the keyboard 13E shown in FIG. 2 is used for the determination reference information storage unit 6 via the CPU 13, or the output printers 12a to 12m shown in FIG. Target media size (X1, Y1) such as number (N) and hard copy paper size, device resolution (K), minimum value of character spacing, character string spacing, margin, etc. Dimensions can be set. An example of the information given from the CPU 13 and stored is shown in FIG.
[0066]
TMM Top Margin Minimum
BMM Bottom margin Minimum
LMM Left Margin Minimum
RMM light margin minimum
CSM character space minimum
LSM Line Space Minimum
Minimum value between PSM columns
SAM space adjustment minimum
(Characters below this size are degraded.)
The transformed coordinate calculation unit 5 is realized by the flowchart shown in FIG. This includes determination processing for determining whether space adjustment is required for output of the target document, processing for calculating space adjustment and reduction ratio if necessary, and coordinate data for converting original coordinate data into output coordinate data It consists of conversion processing.
[0067]
In the determination process, minimum values such as margin, character interval, character string interval, word interval, column interval, etc. are read from the determination information storage unit 6, and the coordinate data of each character is read from the feature amount storage unit 4 to calculate the character size. Then, the character size after reduction is obtained by multiplying it by the reduction rate (ST1). For example, the horizontal size (X direction) of the character 1 of the word 1 of the character string 1 in the document (not shown) is
X_SIZE = XE_1_1_1-XS_1_1_1 (2)
It becomes. If the reduction ratio is SR (for example, 0.71 in the case of output from A3 to A4), the size after reduction is
XO_SIZE = X_SIZE * SR (3)
It becomes. When the reduced character size XO_SEZE is smaller than the minimum character size set in the determination information storage unit 6, it is necessary to adjust the reduction rate of the character size by space adjustment (ST2).
[0068]
If space adjustment is necessary, parameters for space adjustment, image (character) reduction ratio, and the like are calculated (ST3). When the space adjustment is unnecessary, the position data of the image is converted by the conversion coordinate calculation unit 5 based on the reduction ratio calculated at step ST1, and when the space adjustment is necessary, the parameter and the reduction ratio calculated at step ST3. Thus, the conversion coordinate calculation unit 5 converts the position data (ST4). The converted position information is stored in the converted coordinate storage unit 7 (ST5).
[0069]
There are various targets when space adjustment is required, but typical examples will be described below.
[0070]
A. Space adjustment between characters and strings:
11A-11C illustrate the concept of space adjustment. In this example, if the input image D is simply reduced by 50% in length and width as usual, and output, it can be output to a medium having an area of 25% of the original area as shown in FIG. 11B. However, by filling the character spacing and character string spacing, characters can be output relatively large within the same area as shown in FIG. 11C. As shown in FIGS. 11A to 11C, when X1 is the horizontal size of the character, X2 is the character spacing, Y1 is the vertical size of the character, and Y2 is the character string spacing, the character of the original document D The size in the vertical direction and the minimum value SP of the character string interval are
SP = min (X2, Y2) (4)
And When SR1 is a simple reduction ratio, a value LSM ′ before reduction corresponding to the minimum value LSM of character spacing set by the CPU 13 is as follows.
[0071]
LSM '= LSM / SR1 (5)
Therefore, the space that can be adjusted (used) is
X2 '= SP-LSM' (6)
Thus, the reduction ratio SR2 of the character part X1 after the space adjustment is obtained as follows.
[0072]
X1 * SR2 = (X1 + X2 ′) * SR1 (7)
SR2 = (1 + X2 ′ / X1) * SR1
FIG. 12 shows a flowchart of the position information conversion process shown in FIG.
[0073]
1. Description of FIG. 12:
In FIG. 12, first, the simple reduction rate SR1 is calculated from the input / output media information and the like, and the reduction rate SR2 after space adjustment is calculated based on the equations (4) to (7) (ST6). Further, the number of character strings extracted by the feature quantity calculating means (ST7), the number of words in each line (NWj): (ST9), the number of characters in each word (NCk): (ST11), etc., and the coordinates of each character From the reduction ratios SR1 and SR2, the start point coordinates and end point coordinates of each character after space adjustment are calculated as shown in equation (8). In the flowchart of FIG. 12, the start point coordinates and the end point coordinates are represented by (XS i j k, YS i j k), (XE i j k, YE i j k) is read (ST13). The calculated start point coordinates and end point coordinates of each character after space adjustment are (XTS i j k, YTS i j k), (XTE i j k, YTE i j k) (ST14). However, in the equation (8), the calculated start point coordinates and end point coordinates of each character after space adjustment are respectively (XT start, YT start), (XT end, YT end). Here, i, j, and k represent the k-th character of the j-th word in the i-th character string, respectively.
[0074]
The start point coordinates and end point coordinates of each character are obtained by the following equations. The character width before conversion, that is, the horizontal length X1 is
X1 = X_end−X_start
Therefore, the conversion start point coordinate of the character part X1 after the space adjustment is
XT_start = X_start * SR1
The character width ΔXT after conversion is
ΔXT = X1 * SR2
Therefore, the conversion end point coordinate of the character part X1 after the space adjustment is
XT_end = XT_start + ΔXT
It becomes.
[0075]
Similarly, the character length Y1 before the vertical conversion is
Y1 = Y_end−Y_start (8)
Therefore, the conversion start point coordinate of the character part X1 after the space adjustment is
YT_start = Y_start * SR1
The character length ΔYT after conversion is
ΔYT = Y1 * SR2
Therefore, the conversion end point coordinate in the Y direction of the character part X1 after the space adjustment is
YT_end = YT_start + ΔYT
These pieces of information are stored in the converted coordinate storage unit 7 as processing information. An example of the converted coordinate output is shown in FIG.
[0076]
In step ST15, k = k + 1 is calculated. In step ST16, it is determined whether k ≦ NCK, that is, whether the next character is the last character of the jth word in the i-th character string. If k ≦ NCK, the next character is determined. Steps ST13 and ST14 are repeated.
[0077]
If k> NCK, j = j + 1 is calculated in step ST17, and it is determined in step ST18 whether j> NWj, that is, whether the next word exceeds the final number of words in the i-th character string. The If j> NWj is not satisfied, steps ST11 to ST17 are repeated for the next word.
[0078]
If j> NWj is satisfied in step ST18 and the processing of the last word is completed, i = i + 1 is calculated in step ST19, and the next character string is processed. That is, in step ST20, it is determined whether i> NL and whether the processing of the final character string has been completed. If the final character string has not been processed, the processes of steps ST9 to ST19 are repeated until i> NL.
[0079]
It should be noted that the feature quantity extraction unit 3, the conversion coordinate calculation unit 5, the image conversion processing unit 8 and the like constituting the image processing unit 14 of the embodiment of FIG. 1 can be easily realized by introducing known methods and apparatuses. Description is omitted.
[0080]
In this embodiment, the space adjustment in both the vertical and horizontal directions has been described. By setting SP in the above equation (4) to SP = min (X2), the space adjustment only in the horizontal direction is performed. It is also possible to adjust the space only in the vertical direction.
[0081]
B. Margin space adjustment:
14A to 14C show the concept of margin space adjustment. Reads the minimum margin space, ie, top margin space TMM, bottom margin space BMM, left margin space LMM, right margin space RMM, etc., from the criterion information storage section 6 in the output devices 12a,. 4, the top, bottom, left and right margins TM, BM, LM, RM, etc. of the document D are read, and adjustable spaces TMA, BMA, LMA, RMA in each are calculated.
[0082]
TMA = TM-TMM
BMA = BM-BMM
LMA = LM-LMM
RMA = RM-RMM (9)
The vertical and horizontal adjustable spaces per character are calculated from the above adjustable margin space as follows.
[0083]
SPA_X = (LMA + RMA) * SR1 / NC
SPA_Y = (TMA + BMA) * SR1 / NL
Here, SPA_X represents an adjustable space in the horizontal direction per character, and SPA_Y represents an adjustable space in the vertical direction. NC is the number of characters per character string, and NL is the number of character strings. If SPA_X or SPA_Y is replaced with X2 'in the equation (7) to obtain SR2, and the equation (8) is generalized as follows, the converted position coordinates can be calculated.
[0084]
X1 = X_end−X_start
XT_start = X_start * SR1-α1
XT_end = XT_start + X1 * SR2
Y1 = Y_end−Y_start
YT_start = Y_start * SR1-β1
YT_end = YT_start + Y1 * SR2 (11)
here
α1 = LMA-i * (SPA_X)
β1 = TMA-j * (SPA_Y) (12)
It is. When α and β are set to 0, equation (11) becomes equal to equation (8).
[0085]
C. Word spacing adjustment:
Similar to the character spacing adjustment, a space in which the word spacing can be adjusted can be calculated. For example, the minimum value TKM of the word interval is read from the criterion information storage unit 6, and the number of words NW, the word interval TK, the number of characters NC, the character interval, etc. in each character string are read from the feature amount storage unit 4. The adjustable word spacing TKA can be calculated as follows.
[0086]
TKA = (TK-TKM) * NW
The horizontal adjustable space per character is calculated from the above adjustable space as follows.
[0087]
SWA_X = (TKA * SR1) / NC
WKA_X = ((TK−TKM) * SR1) + (SWA_X * NCW) (13)
Here, WKA_X indicates an adjustable space in the horizontal direction per character, WKA_X indicates a space between words, and NCW indicates the number of characters in the word j.
[0088]
The reduction rate SR2 can be calculated as follows.
[0089]
X1 * SR2 = (X1 + SWA_X) * SR1
SR2 = (1 + SWA_X / X1) * SR1 (14)
Conversion coordinates are obtained as follows.
[0090]
X1 = X_end−X_start
XT_start = X_start * SR1-α2
XT_end = XT_start + X1 * SR2 (15)
Here, the offset α2 is
α2 = ((SWA_X) * (i−j)) + ((WKA_X) * (j−i)) (16)
I represents the position of the target character in the line (for example, i = 10 for the tenth character), and j represents the position of the word to which the target character belongs (for example, j = 2 for the second word). .
[0091]
Similarly, a space (column spacing) between character blocks can be extracted. It is also possible to adjust only the vertical space for relatively large characters and change only the reduction rate of small characters using the space. In this way, it is possible to adjust the space by combining different reduction ratios in one document.
[0092]
FIG. 15 shows a configuration diagram thereof.
[0093]
In FIG. 15, a control unit 51 is a CPU that performs processing control of the entire configuration of FIG. 15. Therefore, the CPU 13 may be used here, or a dedicated CPU for the image processing unit 14 in FIG. 1 may be used separately.
[0094]
The feature amount reading unit 52 is a means for reading data from the feature amount storage unit 4, and reads information such as position information for each character, the size of the document, and the average character spacing in the character string including the character being processed. Means. The judgment criterion access unit 54 is a means for reading judgment information from the judgment criterion information storage unit 6 set from the outside via the CPU 13. The reduction rate calculation unit 53 receives the document size information through the feature amount reading unit 52, reads out information such as the media size of the output devices 16a,..., 16m selected through the determination reference access unit 54, and calculates the reduction rate SR1.
[0095]
SR1 is calculated as a reduction ratio SR1X in the X direction based on the X direction size of the original and the size in the X direction of the medium, and a reduction ratio SR1Y in the Y direction based on the Y direction size of the original and the size in the Y direction of the medium. . SR1X and SR1Y are equal when the size ratio (aspect ratio) of the document in the X and Y directions is the same as the size ratio of the media in the X and Y directions, and otherwise SR1X and SR1Y are different. .
[0096]
The reduction rate conversion presence / absence determination unit 63 is a unit that determines whether or not the reduction rates SR1_X and SR1_Y determined by the reduction rate calculation unit 53 need to be converted based on the set character size minimum dimension or the like.
[0097]
If conversion is necessary, the X-direction adjustable space X21, X22, X23, X24, the Y-direction adjustable space Y21, Y22, Y23 or the X-direction in the X direction as described above. A character interval calculation unit 56, a character string interval calculation unit 60, an adjustable word interval adjustment unit 57 (for English documents) that can adjust coordinate offsets α2, α3, α4 and coordinate offsets β2, β3 in the Y direction, It is calculated by the left and right margin adjustment space calculation unit 58, the vertical margin adjustment space calculation unit 61, the other horizontal space adjustment unit 59, and the other vertical space adjustment unit 62.
[0098]
The character spacing calculation unit 56 in FIG. 15 calculates a character spacing adjustable amount X21 (see equation (6)) in the X direction. Similarly, the character string spacing generating unit 60 can adjust the character spacing in the Y direction. A simple amount Y21 is calculated. Further, the word interval calculation means 57 calculates an adjustable amount X22 of the word interval based on the equation (13), and further calculates an offset α of coordinates corresponding to each character based on the equation (16). .
[0099]
The left and right margin calculating means 58 calculates an adjustable left and right margin space X23 based on the equation (10) and calculates a coordinate offset α3 corresponding to this based on the equation (12). Similarly, the upper and lower margin calculating means 61 calculates an adjustable upper and lower margin space Y23 and calculates a coordinate offset β2 corresponding thereto.
[0100]
Similarly, the other horizontal space calculation unit 59 and the other vertical space calculation unit 62 have a space that can be adjusted by the same method and a corresponding offset for a relatively large space such as a column space. It is for calculating.
[0101]
The reduction ratios SR2_X and SR_Y are calculated from the respective adjustable space sums X2 and Y2 and the respective offset sums α and β, and the converted coordinates (from the original coordinates (XS, YS) and (XE, YE)) ( XTS, YTS), (XTE, YTE), or the size (ΔXT, ΔYT) of each character is calculated, and the coordinate data converted into the address output by the conversion coordinate memory access unit 55 is converted according to the instruction of the CPU 51 Write to the coordinate storage unit 7. The above calculation is performed by subtractors 63a,... 63f, adders 64a,... 64h, multipliers 65a,.
[0102]
As described in the explanation of each adjustment method with reference to the equations (7) to (16), all the methods for adjusting the character spacing, the word spacing, and the margin, first obtain the reduction rate SR2 when adjusted. Then, the adjusted start point coordinates and end point coordinates are obtained from the start point coordinates and end point coordinates of each connected component. When rewritten based on the symbols in FIG.
[0103]
X1 = XE-XS (17-1)
SR2 X = (X1 + X2) / X1) * SR1 X (17-2)
XTS = XS * SR1 X-α (17-3)
ΔXT = X1 * SR2 X (17-4)
XTE = XTS + ΔXT (17-5)
Y1 = YE-YS (18-1)
SR2 Y = (Y1 + Y2) / Y1) * SR1 Y (18-2)
YTS = YS * SR1 Y-α (18-3)
ΔYT = Y1 * SR2 Y (18-4)
YTE = YTS + ΔYT (18-5)
Here, XS is the X coordinate of the start point of the connected component, and XE is the X coordinate of the end point of the connected component. SR1 X represents the simple reduction ratio in the horizontal direction, SR2 X indicates the reduction ratio when adjustment is taken in. XTS is the X coordinate of the start point after adjustment, and XTE is the X coordinate of the end point after adjustment. Here, X2 indicates an adjustable space.
[0104]
For example, when only the character spacing calculation unit 56 of FIG. 15 is considered, X2 in the above equation (17-2) becomes the output X21, which means horizontal space adjustment by the character spacing, and α in the equation (17-3) Since = 0, the above expression becomes the same as Expressions (7) and (8), and represents space adjustment by character spacing.
[0105]
Similarly, when only the word interval calculation unit 57 in FIG. 15 is considered, X2 in the above equation (17-2) becomes the output X22, and the horizontal space adjustment by the word interval is performed, and the above equation is the equation (10), It becomes the same thing as a formula (11), and represents the space adjustment by a word space | interval.
[0106]
Similarly, when only the left and right margin adjustment calculation unit 58 of FIG. 15 is considered, X2 in the above equation (17-2) becomes the output X23, α in (17-3) is α3, and the above equation is (14 ) And the space adjustment by the margin adjustment of (15). Similarly, the space adjustment in the vertical direction can be expressed by substituting X for Y and α for β as shown in equations (18-1) to (18-5).
[0107]
In other words, if all the space adjustments independently calculate the adjustable space and offset for each character, the equations (17-1) to (17-5) and (18-1) As shown in the equation (18-5), the original coordinates (XS, YS) of the character, the reduction ratio SR2 X, SR2 Y, adjustable spaces X2, Y2 and offsets α, β can be expressed by the above two equations.
[0108]
Furthermore, adjustments by a plurality of methods can also be performed together with the same idea. In this case, for example, the laterally adjustable space by each method is the sum of X21 (character spacing adjustment), X22 (word spacing adjustment), X23 (margin adjustment), etc.
X2 = X21 + X22 + X23 + ... = ΣX2i (19)
Is a comprehensive adjustable space X2,
α = α1 + α2 + α3 +... = Σαi (20)
If the above-mentioned integrated offset is used, the above-described equations (17-1) to (17-5) can be used to simultaneously perform space adjustment by a plurality of methods in the horizontal direction. Similarly, the vertical adjustable space is the sum of Y21 (character string interval adjustment), Y22 (margin adjustment), etc.,
Y2 = Y21 + Y22 + Y23 + ... = ΣY2i (21)
A comprehensively adjustable space,
β = β1 + β2 + β3 +... = Σβi (22)
If the above-mentioned integrated offsets are used, the above-described equations (18-1) to (18-5) can be used to simultaneously adjust the space by a plurality of methods in the vertical direction.
[0109]
The adder 64a in FIG. 15 calculates a total adjustable space in the horizontal direction shown in the equation (19), and the corresponding total offset shown in the equation (20) is calculated by the adder 64d. Is done. Similarly, the total adjustable space in the vertical direction shown in the equation (21) is calculated by the adder 64f, and the corresponding total offset of the equation (22) is calculated by the adder 64e.
[0110]
In FIG. 15, each of the space adjustment calculation units 56 to 62 can be controlled by a CPU or the like, and whether or not each process is performed can be determined by an instruction from the CPU. If there is no processing, the output of the corresponding space adjusting means, that is, X2i or Y2i and the corresponding offset αi or βi becomes zero, and the space adjustment by the method becomes invalid. Therefore, using this configuration, it is possible to perform space adjustment by only one means, for example, space adjustment by word interval adjustment, or two or more space adjustments, for example, character interval, character string interval, margin adjustment, etc. Can be applied at the same time. Further, the vertical direction and the horizontal direction can be adjusted independently.
[0111]
In the configuration of FIG. 15, when the adjustable space and its offset are obtained, the space-adjusted after the space adjustment from the equations (17-1) to (17-5) or (18-1) to (18-5). It is configured so that the start point coordinates and end point coordinates of each character can be obtained.
[0112]
X1 in the equation (17-1) is calculated by subtracting XS from XE in the subtractor 63a. In the implementation of the equation (17-2), the adder 64c first adds X1 and X2 in the equation (17-2), and the result of the addition of X1 and X2 and the division of X1 is sent to the divider 66a. The result of division and SR1 SR2 is obtained by multiplying X by the multiplier 65b. X is calculated.
[0113]
Next, the start point coordinate XTS in the X direction after the space adjustment of the expression (17-3) is first set to SR1 by the multiplier 65a. The multiplication of X and XS is performed, and the result of the multiplication and the offset output from the adder 64d are subtracted by the subtractor 63b. ΔXT in the equation (17-4) is multiplied by X1 and SR2 by the multiplier 65c. Calculated by multiplying by X. The end point coordinate XTE of the equation (17-5) is calculated by adding the output ΔXT of the multiplier 65c and the output XTS of the subtractor 63b by the adder 64b.
[0114]
Similarly, Y1 in the equation (18-1) is calculated by subtracting YS from YE in the subtractor 63f. In addition, SR2 in the formula (18-2) First, Y is added by Y1 and Y2 in the equation (18-2) by the adder 64g, and the result of addition of Y1 and Y2 and the division of Y1 are performed by the divider 66b. Is calculated by the multiplier 65d. Next, the start point coordinate YTS in the Y direction after the space adjustment of the equation (18-3) is first set to SR1 by the multiplier 65f. The multiplication of Y and YS is performed, and the result of the multiplication and the offset output from the adder 64f are subtracted by the subtractor 63e. ΔYT in the equation (18-4) is determined by Y1 and SR2 in the multiplier 65e. Calculated by multiplying Y. The end point coordinate YTE in the equation (18-5) is calculated by adding the output ΔYT of the multiplier 65e and the output YTS of the subtractor 63e by the adder 64h.
[0115]
The output image conversion processing unit 8 reads the coordinate data from the feature amount storage unit 4, reads the corresponding image data from the input image storage unit 2, performs conversion based on the corresponding conversion coordinates, and the processing result is the output image. This is stored in the storage unit 9.
[0116]
FIG. 16 is a configuration diagram of the output image conversion processing unit 8, and a control unit 81 is a general-purpose CPU that controls the entire processing. Here, the CPU 13 or the CPU 51 can also be used. The conversion coordinate memory access unit 82 receives an instruction from the control unit 81, outputs a necessary address and a control signal, and exchanges with the conversion coordinate storage unit 7. For example, the number of characters is read and the coordinates after conversion of the first character of the first word of the first character string are read.
[0117]
Similarly, the feature amount access unit 83 reads the coordinates of the first character of the first word of the first character string from the feature amount storage unit 4. Image data corresponding to the coordinate data read by the feature amount access unit 83 is read and stored in the internal buffer 86. The reduction rate calculation unit 85 reads the original character coordinates from the feature amount access unit 83 and the character coordinates to be converted from the conversion coordinate memory access unit 82, and calculates the reduction rate as follows. For example, the horizontal reduction ratio of the first character of the first word of the first character string is
SR_X = (ΔX1) / (XS_1_1_1-XE_1_1_1)
It becomes. Here, SR_X is the reduction ratio, ΔX1 is the horizontal length after conversion, and XS_1_1_1 and XE_1_1_1 indicate the original start point and end point coordinates of the character. The reduction processing unit 88 reduces the image data stored in the internal buffer 86 in accordance with the reduction rate input from the reduction rate calculation unit 85.
[0118]
In this embodiment, the reduction process is performed using the nearest neighbor method. This method re-samples the extracted (character) image according to the reduction ratio. If the re-sampling position is between the original sampled positions, there are four neighboring images. In this method, the pixel value at the closest distance among the pixels is used as the pixel value at the sampling position.
[0119]
The processing configuration of the reduction processing unit 88 is shown in FIG. The column address counter 882 receives the INGC signal for each pixel and counts up. The count value of the column address counter 882 is compared with the converted coordinate (XTE-XTS) in the horizontal direction by the comparison unit 881, and when the comparison result becomes equal, the column address counter 882 is reset by the reset signal RST, and the address counter count The row address counter 883 is incremented by the up signal INCL.
[0120]
The row address counter 883 is incremented as described above. The count value of the row address counter 883 is compared with the vertical conversion coordinate difference (YTE-YTS) by the comparison unit 884. If the comparison results are equal, it indicates that the reduction process for the target character has been completed. Inform the CPU 81 of the signal. The difference between the converted coordinates in the horizontal direction is calculated by a subtracter 887, and the difference between the converted coordinates in the vertical direction is calculated by a subtracter 888.
[0121]
The count content i of the column address counter 882 is multiplied by the horizontal reduction rate SR_X by the multiplier 885, and the count content j of the row address counter 883 is multiplied by the vertical size reduction rate SR_Y by the multiplier 886. Multipliers 885 and 886 are roundable multipliers, and automatically set the re-sampling position to the nearest sampling position.
[0122]
As a result of the resampling process, i1 and j1 become the address signal of the internal buffer 86 through the address selector 87 as shown in FIG. 16, and the resampled value Pi1j1 is read from the internal buffer 86. In FIG. 17, i is the sum of XTS, j is YTS, and the output image storage unit 9 is an address. The corresponding resampled value Pij is a pixel value to be stored at this address. Addresses (XTS + i, YTS + j) are calculated in the output image memory access unit 89 of FIG. 16, and the pixel value Pij is recorded in the output image storage unit 9.
[0123]
FIG. 18 is a flowchart for explaining the processing of FIG. The above reduction processing is performed on each character of the input document D and stored in the output image storage unit 9. The output unit 10 is a unit that selects one of the output devices 12a,... 12m to be output, reads an image from the output image storage unit 9, and outputs the image.
[0124]
In this embodiment, software processing is performed using a general-purpose CPU, but the same result can be obtained by using dedicated hardware. Furthermore, all calculations are performed based on the coordinate data, but it is also possible to calculate based on dimensions (for example, mm) instead of the coordinate data.
[0125]
Next, an example of the operation of the image processing apparatus according to the present invention will be described. For example, it is assumed that the document D shown in FIG. 19 is output to a medium that is 50% vertically and horizontally (1/4 in area). FIG. 20A shows a simple reduction, and FIG. 20B shows an example after space adjustment. FIG. 19 is assumed to be composed of regions (1), (2), (3), and (4) having different character dimensions. It is assumed that the characters in the region (2) in FIG. Regions (1), (3), and (4) are relatively large characters compared to (2), regions (1) and (4) are in Japanese, and region (3) is in English.
[0126]
FIG. 20B shows an example in which the upper margin is reduced by 60% and the lower margin is reduced by 28%. In the area (1), the reduction ratio is 50%, the character spacing is increased by 20%, and the character string spacing is reduced by 20%. Since the region (2) is difficult to read if it is output at the 50% reduction rate as it is, the character spacing is reduced by about 33% and the reduction rate is set to 80%.
[0127]
Since the reduction ratio of the area (2) is 80%, even if the space between the column area (1) -area (3) and the column area (2) -area (4) is reduced by 20%, the column area (3) ) And the width of the column area (4) should be reduced by about 28%. This is adjusted by increasing the reduction ratio to 50% for the area (3), reducing the character spacing by 50% and the word spacing by about 50%, and for the area IV by reducing the reduction ratio to 40% and increasing the character spacing by about 20%. To do.
[0128]
As described above, document information can be output in a size that is easy to see depending on the size of the output media by locally changing the character spacing, character string spacing, enlargement / reduction scaling factor according to the character size of the local area, etc. It is. Regions (1), (2), (3), and (4) can be considered as separate documents. In other words, when documents composed of a plurality of characters with different dimensions are combined into one document, the character size, empty space, etc. in each document are judged, and appropriate scaling or adjustment is performed. Easy-to-see output is possible. Further, in this embodiment, the reduction of the character area has been described. However, the case where the character is locally enlarged and outputted in some cases can be similarly implemented.
[0129]
As described above, the document image data is input, and from the input document image data, the feature amount such as the top / bottom / left / right margin, the character spacing, the character string spacing, the word spacing, the column spacing, the character size, the coordinates, etc. Extract and calculate the space adjustment, scaling factor, etc. based on the preset criteria information such as the minimum margin and minimum character size at the time of output and the above features, and convert the original coordinate data. An input image is converted from the converted coordinates and the original coordinates, and the converted image is output to a designated output device.
[0130]
Furthermore, by using the image processing apparatus of the present invention, it is possible to select an arbitrary output device or storage device from the input side, and to select image data stored in advance on an output device or an arbitrary server from any output device. . In addition, image output after processing according to the output device and its media from the input side, after processing that matches the characteristics of the output device of the required input device and server image data from the output side Output is possible.
[0131]
Furthermore, it is also possible to output image data from any other input device or control device to any output device or storage device.
[0132]
In the above-described embodiment, a general-purpose system considering a plurality of input devices and a plurality of output devices has been disclosed. However, various configurations are conceivable as the embodiments. For example, as shown in FIG. 2B, only the image processing unit 14 of the embodiment of FIG. 1 is adjusted to be integrated with an input device, for example, the scanner 15b so as to operate as an input device, and then output to a printer, for example. The configuration of the adaptive scanner 15b ′ is also conceivable. In FIG. 2B, for example, a keyboard or a touch panel is connected to the image processing unit 14 as the output device information interface 18, and output device information output from the image processing unit 14 is input to the image processing unit 14. Can do.
[0133]
The adaptive scanner 15b ′ shown in FIG. 2B receives the information of the output device to be connected via the interface 18, and determines the processing parameters according to the information. The input image is processed based on the set parameters, converted into an output suitable for the output device, and output.
[0134]
An input device other than the scanner can be realized with the same configuration.
[0135]
Also, by integrating the image processing unit of the present invention with a predetermined output device, the input image is converted by performing processing that matches the output capability of the input image, so that an easy-to-read display and output are possible. Is possible.
[0136]
For example, as shown in FIG. 2C, it is possible to obtain a PDA 16c ′ capable of adaptive display by integrating the image processing unit 14 with the PDA 16c. Here, the information accessed from the PDA 16c is first subjected to image processing to perform space adjustment and then displayed.
[0137]
Similar configurations are possible for other output devices.
[0138]
Further, only meaningful information such as characters / photos is extracted from the image data read by a scanner or the like using a structure analysis technique, and the position and size of the information are obtained. Based on this, only meaningful information is extracted from the image data, and output from the extracted data realizes erasure outside the document, shadow removal of the book, and the like.
[0139]
Furthermore, when outputting a plurality of originals as a single document, the output characters may be too fine due to the character size and reduction ratio. With the structural analysis technology, the character size, character spacing, etc. are obtained. When the character is fine, the character spacing can be increased to some extent, and the character can be output as large as possible.
[0140]
Thus, the character information can be easily output by adjusting the empty space in the input document in accordance with the size of the medium to which the input document image data is to be output.
[0141]
Therefore, the image data can be handled easily by structuring the image data read by an input device such as a scanner using a document structure analysis technique.
[0142]
Further, it is possible to extract a region such as a character / photo using a structure analysis technique, and to copy a copy by shadowing a book or erasing outside a document.
[0143]
Furthermore, when copying a plurality of originals into one, if the character size is too small, the space between characters can be automatically reduced and characters can be output to a certain extent.
[0144]
【The invention's effect】
As described above in detail, according to the present invention, when displaying and outputting document image data on media having different display and output sizes, the image processing apparatus can convert character information in the document to an optimum size. Can provide.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of an image processing apparatus for explaining an embodiment of the present invention;
2A is a block diagram illustrating a configuration of a controller unit of the image processing apparatus according to the embodiment illustrated in FIG. 1; 2B and 2C are block diagrams showing examples of the scanner and the display used in the embodiment of FIG.
FIGS. 3A, 3B, 3C, and 3D are diagrams for explaining an example of a document image that is input and sampled and coordinates thereof; FIGS.
FIG. 4 is a block diagram showing a configuration of a feature amount extraction unit.
FIG. 5 is a diagram showing an example of full image projection on one document.
6A, 6B, 6C, and 6D are diagrams for explaining the concept of labeling processing. FIG.
7A and 7B are diagrams showing neighborhood models for extracting connected components of 8 neighborhood pixels, respectively.
FIG. 8 is a diagram showing output information from a feature amount extraction unit;
FIG. 9 is a diagram illustrating an example of determination criterion information.
FIG. 10 is a flowchart for explaining processing of a transformed coordinate calculation unit;
11A, 11B, and 11C are diagrams for explaining the concept of space adjustment on input / output images. FIG.
FIG. 12 is a flowchart for explaining position information conversion processing;
FIG. 13 is a diagram showing an example of converted coordinate output.
14A, 14B, and 14C are diagrams showing an example of margin space adjustment on an input / output image. FIG.
FIG. 15 is a diagram illustrating a configuration example of a coordinate conversion unit;
FIG. 16 is a block diagram illustrating a configuration example of an image conversion unit.
FIG. 17 is a block diagram illustrating a configuration example of a reduction processing unit.
FIG. 18 is a flowchart for explaining resampling processing;
FIG. 19 is a view showing a combined image of a plurality of documents before conversion.
FIGS. 20A and 20B are diagrams showing images after conversion by different methods. FIGS.
[Explanation of symbols]
1 ... input part,
2 ... Input image storage unit,
3 ... feature amount extraction unit,
4 ... Feature amount storage unit,
5 ... Conversion coordinate calculation unit,
6 ... Judgment criteria information storage unit,
7: Conversion coordinate storage unit,
8: Image conversion processing unit,
9: Output image storage unit,
10 ... Output unit
11a to 11n: Input interface
12a-12m ... Output interface
13 ... Controller part,
13A ... CPU,
14: Image processing unit,
15a-15n ... input device,
16a-16m ... Output device.

Claims (8)

複数の文字記号およびこの複数の文字記号の間にスペースを含む画像の情報を記憶する記憶手段と、
上記記憶手段により記憶した画像から文字記号の位置、文字記号のサイズ、文字記号の間隔を含む特徴情報を検出する特徴情報検出手段と、
上記記憶手段により記憶した画像のサイズと縮小後の画像サイズとから第1の画像の縮小率(SR1)を算出する第1の算出手段と、
上記第1の算出手段にて算出した第1の画像の縮小率に基づいて文字記号の間隔の調整が必要であるか否かを判断する判断手段と、
この判断手段により文字記号の間隔の調整が必要でないと判断された場合、上記記憶手段により記憶した画像全体を上記文字記号の位置、文字記号のサイズの特徴情報に基づいて第1の縮小率により縮小し、上記判断手段により文字記号の間隔の調整が必要であると判断された場合、上記記憶手段により記憶した画像のうち文字記号については第1の縮小率よりも小さい第2の縮小率(SR2:SR2<SR1)により縮小しかつ文字記号の間隔は第1の縮小率により縮小した場合よりもさらに小さくなるように縮小し、上記記憶手段により記憶した画像全体を第1の縮小率により縮小した場合と同じサイズとする縮小手段と、
を具備することを特徴とする、画像のサイズを縮小して出力する画像処理装置。
Storage means for storing a plurality of character symbols and image information including a space between the plurality of character symbols;
Feature information detection means for detecting feature information including the position of the character symbol, the size of the character symbol, and the interval between the character symbols from the image stored by the storage means;
First calculation means for calculating a reduction ratio (SR1) of the first image from the size of the image stored by the storage means and the image size after reduction;
Determining means for determining whether or not the adjustment of the interval between character symbols is necessary based on the reduction ratio of the first image calculated by the first calculating means;
If it is determined by the determining means that the adjustment of the character symbol interval is not necessary, the entire image stored by the storage means is converted by the first reduction ratio based on the character symbol size and character symbol size feature information. When it is determined that the character symbol interval needs to be adjusted by the determining means, a second reduction ratio (less than the first reduction ratio) for the character symbols in the image stored by the storage means ( SR2: SR2 <SR1), and the character symbol interval is reduced to be smaller than that when reduced by the first reduction ratio, and the entire image stored by the storage means is reduced by the first reduction ratio. Reduction means to the same size as the case,
An image processing apparatus that reduces the size of an image and outputs the reduced image.
上記判断手段は、
文字記号の最小サイズを記憶する第2の記憶手段と、
前記特徴情報検出手段にて検出した文字記号のサイズに基づき上記算出手段にて算出した第1の縮小率により縮小した場合の縮小文字記号のサイズを算出する第2の算出手段と、
縮小後の文字記号サイズと最小サイズとを比較し、縮小後の文字記号サイズが最小サイズよりも大きい場合は文字記号の間隔の調整が不要であると判断し、縮小後の文字記号サイズが最小サイズよりも小さい場合は文字記号の間隔の調整が必要であると判断する比較手段とを有することを特徴とする請求項1記載の画像処理装置。
The above judgment means is
Second storage means for storing a minimum size of the character symbol;
Second calculating means for calculating the size of the reduced character symbol when reduced by the first reduction ratio calculated by the calculating means based on the size of the character symbol detected by the feature information detecting means;
Compare the reduced size of the character symbol with the minimum size, and if the reduced size of the character symbol is larger than the minimum size, determine that adjustment of the character symbol spacing is unnecessary, and reduce the reduced size of the character symbol The image processing apparatus according to claim 1, further comprising a comparison unit that determines that adjustment of the character symbol interval is necessary when the size is smaller than the size.
前記特徴情報検出手段はさらに、前記記憶手段に記憶された画像情報から画像の周囲のマージンスペースを検出する手段を含むことを特徴とする請求項1記載の画像処理装置。  2. The image processing apparatus according to claim 1, wherein the feature information detecting means further includes means for detecting a margin space around the image from the image information stored in the storage means. 上記縮小手段は、
前記特徴情報検出手段にて検出した文字記号の位置情報に基づき第1の縮小率で縮小した場合の文字記号の変換位置情報を算出する変換位置算出手段と、
前記判断手段の判断結果に基づき、第1の縮小率または第2の縮小率の一方により文字記号を縮小するとともに上記変換位置算出手段により変換された位置に縮小された文字記号を配置する画像変換手段とを含むことを特徴とする請求項1記載の画像処理装置。
The reduction means is
Conversion position calculation means for calculating conversion position information of the character symbol when reduced at a first reduction rate based on the position information of the character symbol detected by the feature information detection means;
Image conversion for reducing a character symbol by one of the first reduction ratio and the second reduction ratio and arranging the reduced character symbol at the position converted by the conversion position calculation means based on the determination result of the determination means The image processing apparatus according to claim 1, further comprising: means.
上記画像処理装置はさらに、
縮小手段により縮小された画像を可視表示出力する手段と、
縮小後の画像サイズとしてこの可視表示にて表示可能なサイズ情報を設定する手段とを具備したことを特徴とする請求項1記載の画像処理装置。
The image processing apparatus further includes:
Means for visually displaying and outputting the image reduced by the reduction means;
2. The image processing apparatus according to claim 1, further comprising means for setting size information that can be displayed by the visible display as the reduced image size.
上記画像処理装置は画像入力装置と所定のサイズの画像を可視表示出力する画像出力装置との間に設けられ、上記画像処理装置はさらに、
画像入力装置により入力された画像を画像入力装置から受信する手段と、
縮小手段により縮小された画像を画像出力装置へ送信する手段とを含むことを特徴とする請求項1記載の画像処理装置。
The image processing device is provided between an image input device and an image output device that visually displays and outputs an image of a predetermined size, and the image processing device further includes:
Means for receiving an image input by the image input device from the image input device;
2. The image processing apparatus according to claim 1, further comprising means for transmitting the image reduced by the reduction means to the image output apparatus.
上記画像処理装置はさらに、
縮小後の画像サイズ情報として画像出力装置により可視表示される画像のサイズ情報を画像出力装置より獲得する手段を具備することを特徴とする請求項1記載の画像処理装置。
The image processing apparatus further includes:
2. The image processing apparatus according to claim 1, further comprising means for acquiring, from the image output apparatus, size information of an image that is visually displayed by the image output apparatus as the reduced image size information.
複数の文字記号、各文字記号の間のスペースおよび画像の周囲のマージンスペースを含む画像の情報を記憶する第1記憶手段と、
上記第1記憶手段により記憶した画像から文字記号の位置、文字記号のサイズ、文字記号の間隔および画像の周囲のマージンスペースを含む特徴情報を検出する特徴情報検出手段と、
文字記号の最小サイズ、文字記号の間隔の最小値、画像の周囲のマージンスペースの最小値を記憶する第2記憶手段と、
上記第1記憶手段により記憶した画像のサイズと縮小後の画像サイズとから第1の画像の縮小率(SR1)を算出する第1の算出手段と、
上記特徴情報検出手段にて検出した文字記号のサイズに基づき上記算出手段にて算出した第1の縮小率により縮小した場合の縮小文字記号のサイズを算出する第2の算出手段と、
縮小後の文字記号サイズと最小サイズとを比較し、縮小後の文字記号サイズが最小サイズよりも大きい場合は文字記号の間隔の調整が必要でないと判断し、縮小後の文字記号サイズが最小サイズよりも小さい場合は文字記号の間隔の調整が必要であると判断する判断手段と、
この判断手段により文字記号の間隔の調整が必要でないと判断された場合、上記第1記憶手段により記憶した画像全体を上記文字記号の位置、文字記号のサイズの特徴情報に基づいて第1の縮小率により縮小する第1の縮小手段と、
上記判断手段により文字記号の間隔の調整が必要であると判断された場合、上記特徴情報検出手段にて検出した文字記号の間隔および画像の周囲のマージンスペースと上記第2記憶手段により記憶した文字記号の間隔の最小値、画像の周囲のマージンスペースの最小値とに基づき文字記号の間隔およびマージンスペースの調整可能な量を算出する第3の算出手段と、
この第3の算出手段により算出された調整可能な量に基づいて文字の縮小率として第1の縮小率よりも小さい第2の縮小率(SR2:SR2<SR1)を算出する第4の算出手段と、
上記判断手段により文字記号の間隔の調整が必要であると判断された場合、上記第1記憶手段により記憶した画像のうち文字記号については第4の算出手段により算出された第2の縮小率(SR2)で縮小し、文字記号の間隔およびマージンスペースを第1の縮小率により縮小した場合よりもさらに小さくかつ、最小値以上になるように縮小し、上記第1記憶手段により記憶した画像全体を第1の縮小率により縮小した場合と同じサイズとする縮小手段とを具備することを特徴とする、画像のサイズを縮小して出力する画像処理装置。
First storage means for storing image information including a plurality of character symbols, a space between the character symbols, and a margin space around the image;
Feature information detection means for detecting feature information including the position of the character symbol, the size of the character symbol, the interval between the character symbols, and the margin space around the image from the image stored by the first storage means;
Second storage means for storing the minimum size of the character symbol, the minimum value of the space between the character symbols, and the minimum value of the margin space around the image;
First calculation means for calculating a reduction ratio (SR1) of the first image from the size of the image stored by the first storage means and the reduced image size;
Second calculating means for calculating the size of the reduced character symbol when reduced by the first reduction ratio calculated by the calculating means based on the size of the character symbol detected by the feature information detecting means;
Compare the reduced size of the character symbol to the minimum size. If the reduced size of the character symbol is larger than the minimum size, it is determined that adjustment of the character symbol spacing is not necessary. A determination means for determining that the adjustment of the character symbol interval is necessary if
If it is determined by the determining means that the adjustment of the character symbol interval is not necessary, the entire image stored by the first storage means is first reduced based on the feature information of the position of the character symbol and the size of the character symbol. First reduction means for reducing at a rate;
When it is determined by the determining means that the character symbol interval needs to be adjusted, the character symbol interval detected by the feature information detecting means, the margin space around the image, and the character stored by the second storage means Third calculating means for calculating an adjustable amount of the character symbol interval and the margin space based on the minimum value of the symbol interval and the minimum value of the margin space around the image;
Fourth calculation means for calculating a second reduction ratio (SR2: SR2 <SR1) smaller than the first reduction ratio as a character reduction ratio based on the adjustable amount calculated by the third calculation means. When,
When it is determined by the determining means that adjustment of the interval between the character symbols is necessary, for the character symbols in the image stored by the first storage means, the second reduction ratio ( SR2), the character symbol interval and the margin space are further reduced to be smaller than the first reduction ratio and equal to or larger than the minimum value, and the entire image stored in the first storage unit is reduced. An image processing apparatus for reducing and outputting an image size, comprising: a reduction unit configured to have the same size as that when reduced by a first reduction ratio.
JP25417695A 1994-09-29 1995-09-29 Image processing device Expired - Fee Related JP3784866B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25417695A JP3784866B2 (en) 1994-09-29 1995-09-29 Image processing device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP6-235391 1994-09-29
JP23539194 1994-09-29
JP25417695A JP3784866B2 (en) 1994-09-29 1995-09-29 Image processing device

Publications (2)

Publication Number Publication Date
JPH08152871A JPH08152871A (en) 1996-06-11
JP3784866B2 true JP3784866B2 (en) 2006-06-14

Family

ID=26532095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25417695A Expired - Fee Related JP3784866B2 (en) 1994-09-29 1995-09-29 Image processing device

Country Status (1)

Country Link
JP (1) JP3784866B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7912291B2 (en) * 2003-11-10 2011-03-22 Ricoh Co., Ltd Features for retrieval and similarity matching of documents from the JPEG 2000-compressed domain
JP2009065640A (en) * 2007-08-10 2009-03-26 Sharp Corp Image forming device, image formation method, image formation program, and computer-readable recording medium with recording image forming program stored
US8380009B2 (en) * 2010-03-11 2013-02-19 Microsoft Corporation Resolution adjustment of an image that includes text undergoing an OCR process
JP6016508B2 (en) * 2012-08-02 2016-10-26 シャープ株式会社 Display device

Also Published As

Publication number Publication date
JPH08152871A (en) 1996-06-11

Similar Documents

Publication Publication Date Title
US5613017A (en) Apparatus for processing image data among media having different image output sizes
US4538183A (en) Image editing apparatus
JP5274495B2 (en) How to change the document image size
US20090180713A1 (en) Method and system of adaptive reformatting of digital image
US5204959A (en) System for determining image size ratio of data for presentation of proper size on displays or printers from optical storage
JP4569622B2 (en) Image processing apparatus and image processing program
US20060126120A1 (en) Image recording apparatus, method of generating print data for the same, and control program for implementing the method
CN101626451A (en) Image processing system and image processing program
US5355421A (en) Method of noise detection and noise apparatus
EP0410771A2 (en) Image processing apparatus
US20030231786A1 (en) Digital watermark embedding apparatus, digital watermark extraction apparatus, and methods thereof
JP3784866B2 (en) Image processing device
US8311322B2 (en) Image processing apparatus, image processing method, and computer readable medium
US7269274B2 (en) Digital watermark embedding method, digital watermark extraction method, digital watermark embedding apparatus, and digital watermark extraction apparatus
US7609881B2 (en) Device and method for image processing as well as image processing computer program
JP2000011167A (en) Method and device for interpolating pixel based on gradient
US7260238B2 (en) Digital watermark embedding method, apparatus, digital watermark extraction method and apparatus
JP2009171563A (en) Image processor, image processing method,program for executing image processing method, and storage medium
JPS6187461A (en) Document circulating system
JP2007011939A (en) Image decision device and method therefor
JPH05108793A (en) Document edition device
CN114707126B (en) Network disk document watermark adding method and device, network disk and storage medium
JP2513636B2 (en) Image processing device
JP4861250B2 (en) Image processing apparatus and control method thereof
JP3799011B2 (en) How to generate print data for all pages

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050412

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050613

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060316

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees