JP4400709B2 - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP4400709B2 JP4400709B2 JP2003074519A JP2003074519A JP4400709B2 JP 4400709 B2 JP4400709 B2 JP 4400709B2 JP 2003074519 A JP2003074519 A JP 2003074519A JP 2003074519 A JP2003074519 A JP 2003074519A JP 4400709 B2 JP4400709 B2 JP 4400709B2
- Authority
- JP
- Japan
- Prior art keywords
- attribute information
- image
- image data
- intermediate code
- processing
- 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
Links
Images
Landscapes
- Record Information Processing For Printing (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、入力される描画命令を解釈して中間コード画像データを生成し、中間コード画像データをレンダリングしてビットマップイメージを作成し、さらに属性情報をもとにビットマップイメージの補正を行い、最終的なビットマップイメージを印字装置等に出力する画像処理技術に関するものである。
【0002】
【従来の技術】
パーソナルコンピュータなどの上位処理装置から印字命令を受けた画像処理装置は、実際の印字情報である描画命令を受信して順に解釈し、ビットマップイメージを作成して出力する。この処理過程において、画像処理装置がページバッファを保持している場合には、解釈したビットマップイメージをそのままページバッファに書き込み(レンダリング処理)、ページ単位で出力する。また、ページバッファは多大な記憶容量を必要とするため、ページバッファではなく、1ページを複数に分割したバンド単位のバッファ(バンドバッファ)を保持している場合も多い。このような場合には、一度バンド単位の中間コード画像データに変換し、全ての描画命令の解釈および中間コード画像データの生成終了後、バンド単位で中間コード画像データを解釈し、ビットマップイメージをバンドバッファに書き込むレンダリング処理を行う。
【0003】
通常、ページバッファあるいはバンドバッファに書き込まれたビットマップイメージは、印字装置等に送信される前に補正処理が施される。例えば、描画命令による色空間指定がRGBの場合、印字装置に出力するためには色空間をCMYKに変換しなければならない。しかし、全てのビットマップイメージに対して一律に色空間変換を行うと印字の品質に問題が生じるため、描画内容(フォント、グラフィックス、イメージなど)に応じた処理が望ましい。描画内容に応じた処理を行うためには、それぞれの描画命令の内容がどのような描画内容(フォント、グラフィックス、イメージなど)かを示す属性情報が色変換処理時に必要となる。
【0004】
一般に、描画命令が保持する属性情報は1つの描画オブジェクトに対して単一であり、レンダリング処理によってビットマップイメージを生成する際には1ないし数画素毎に属性情報を付加しておく。なお、バンドバッファを保持してバンド単位でレンダリング処理を行う画像処理装置においては、中間コード画像データに描画命令の属性情報が渡され、バンドバッファに展開されたビットマップイメージに対して属性情報が付加される。そして、ビットマップイメージに付加されている属性情報を参照して、展開されたビットマップイメージに対して補正を行えばよい。
【0005】
ここで、これらの一連の処理をCPUのみで行う場合には処理負荷が大きく、そのため、CPUで描画命令あるいは中間コード画像データを解釈してビットマップイメージおよび属性情報をメモリに書き込み、それ以降の処理は、展開したビットマップイメージおよび属性情報をDMAによりイメージ処理回路に転送することにより行うという方法が考案されている。
【0006】
一例として特許文献1に記載されている画像形成装置では、CPUがイメージデータをメモリに書き込む時に、イメージデータの属性を示す属性データをイメージデータに含ませ、DMA回路がイメージデータをメモリから読み込んだ時に、イメージデータに含まれている属性データに応答して、イメージ処理回路に属性パラメータを設定し、属性に応じた処理を行っている。
【0007】
また特許文献2に記載されている印刷装置では、描画命令を解釈して作成されたイメージデータ及びイメージデータの属性データを画素単位のデータとして一時保持しておき、保持されたイメージデータ及び属性データを同時に読み込み、属性データに従ってイメージデータを作像用データとして処理することによって、属性に応じた処理を行っている。
【0008】
上述のように、一般的には描画命令あるいは中間コード画像データは1つの描画オブジェクトに対応するものであるため、描画命令あるいは中間コード画像データが保持する属性情報は単一である。しかし、場合によっては、1つの描画命令あるいは中間コード画像データが複数の描画内容を含むこともあり、そのような場合には単一の属性情報を保持しているだけでは描画内容の属性を正確に表すことができず、問題となる。
【0009】
一例として、描画命令や中間コード画像データを保持する領域が不足した場合が挙げられる。この場合には、例外的な処理として、描画命令あるいはバンド毎の中間コード画像データを途中まで一旦レンダリング処理し、ビットマップイメージをメモリに展開する(あるいは、さらに圧縮を行う)。そして、展開したビットマップイメージ(あるいは、圧縮ビットマップイメージ)が保持される領域のアドレスを保持する単一の描画命令あるいは中間コード画像データを生成する。これによって、それまでレンダリング処理した描画命令あるいは中間コード画像データを削除することができ、描画命令あるいは中間コード画像データを保持する領域の不足を解消することができる。
【0010】
従来は、このとき生成された描画命令あるいは中間コード画像データの属性情報は、単一の情報、例えばイメージが設定される。しかし、展開されたビットマップイメージ中には種々の属性の描画内容が含まれている可能性がある。そのため、設定されている単一の属性情報と異なる属性の描画内容がレンダリングされた部分については、最適な処理が施されないことになり、最終的に印字の品質に問題が生じてしまう。
【0011】
例えば特許文献3に記載されている画像処理装置においても、上述のように記憶手段における記憶可能な容量が所定量以下になると、オブジェクト情報をビットマップイメージデータに展開して圧縮する処理を行っている。このとき、上述のような問題を回避するため、圧縮されたビットマップイメージデータから各属性毎にエリアを検出し、属性毎のオブジェクト情報を生成している。これによって、ビットマップイメージデータは属性毎のオブジェクト情報によって属性に応じた処理を行うことができる。しかし、同一の属性をもつエリアを抽出し、それぞれの属性のオブジェクト情報毎に圧縮されたビットマップイメージデータを対応付けるため、非常に処理時間がかかるという問題がある。
【0012】
また特許文献3には、ビットマップイメージデータに対して1面の属性情報を持たせることも記載されている。この場合、ビットマップイメージに展開していないオブジェクト情報との整合性が問題となる。この問題に対しては、特許文献3には何も記載されていないが、例えば統一的に、未処理のオブジェクトについてもオブジェクト毎に1面の属性情報を保持することが考えられる。しかし、すべて1面の属性情報を保持するとデータ量が増大してしまうため、得策ではない。
【0013】
【特許文献1】
特許第3254672号公報
【特許文献2】
特開2001−236191号公報
【特許文献3】
特開2001−331287号公報
【0014】
【発明が解決しようとする課題】
本発明は、上述した事情に鑑みてなされたもので、いかなる場合でも展開されたビットマップイメージに対して1ないし複数画素単位で属性情報を保持して最適な補正処理を施すことが可能であり、また属性情報のメモリへの展開を高速に行うとともに、データ量を抑えてメモリの有効利用を図った画像処理装置を提供することを目的とするものである。
【0015】
【課題を解決するための手段】
本発明は、入力される描画命令に基づいてビットマップイメージを作成する画像処理装置及び画像処理方法において、描画手段により描画命令あるいは描画命令から生成された中間コード画像データに基づいてレンダリング処理を行い、ビットマップイメージ及び属性情報を生成してビットマップイメージを属性情報とともにイメージ記憶手段に保持させ、ビットマップイメージに対して属性情報に従った補正処理を行うものであって、描画命令あるいは中間コード画像データ中に描画対象の図形毎に設定される単一の属性情報を使用するか否かを示す有効/無効情報を保持させておき、描画手段によるレンダリング処理時に有効/無効情報が有効である旨を示している場合には前記単一の属性情報を使用して前記イメージ記憶手段に属性情報を設定し、無効である旨を示している場合には描画対象の図形の1ないし複数画素毎に付加されている属性情報を使用してイメージ記憶手段に属性情報を設定することを特徴とするものである。
【0016】
このように描画命令あるいは中間コード画像データ中に単一の属性情報を使用するか否かを示す有効/無効情報を保持させておくことによって、従来と同様に単一の属性情報に従った処理を可能とするとともに、例えばイメージデータに画素毎に属性情報が付加されている場合には、その付加された属性情報に従った処理も可能となる。このとき、単一の属性情報も使用できるので、全ての描画命令あるいは中間コード画像データについて画素毎に属性情報を持つ必要はなく、データ量を抑えることができる。
【0017】
特に、描画命令あるいは中間コード画像データを命令記憶手段に保持させてゆく際に命令記憶手段の記憶領域が不足したときには、フォールバック処理によりそれまでに命令記憶手段に記憶されている描画命令あるいは中間コード画像データをレンダリング処理してイメージ記憶手段にビットマップイメージ及び属性情報を展開し、ビットマップイメージおよび属性情報が保持される領域のアドレスを含む単一の描画命令あるいは中間コード画像データを生成することにより命令記憶手段の記憶領域を確保することができる。このとき生成した単一の描画命令あるいは中間コード画像データについては、有効/無効情報を無効に設定して単一の属性情報を使用しないようにする。これによって、レンダリング処理時に複数の属性の図形を描画した場合であっても、それらの図形の属性情報をそのまま反映することができ、補正処理手段でビットマップイメージに対して補正処理を行う際に最適な処理を施すことができる。よって、画質を向上させることができる。
【0018】
なお、展開したビットマップイメージ及び属性情報は、データ量を削減するために、例えば縮小したり、あるいは圧縮して圧縮コードとしておくことができる。圧縮する場合には、ビットマップイメージと属性情報のそれぞれについて異なる圧縮方法を適用することができる。なお、属性情報の圧縮には可逆方式を用いることが望ましい。
【0019】
また、描画手段及び補正処理手段は、専用の回路で構成することが望ましい。本発明の画像処理装置の出力先として例えば印字装置が想定されるが、印字装置においては連続したビットマップイメージの供給が必要であるなど、種々の制約があり、描画手段及び補正処理手段がそのような制約を満たすように専用回路で構成されているとよい。また、描画や補正処理に要する時間を短縮することができる。
【0020】
【発明の実施の形態】
図1は、本発明の実施の一形態を示す機能ブロック図である。図中、1は上位処理装置、2は画像処理装置、3は印字装置、11は中間コード生成部、12は中間コードメモリ、13は中間コード画像データ展開部、14はバンドバッファ、15は補正処理部、16は出力制御部である。画像処理装置2は、本発明の画像処理装置あるいは本発明の画像処理方法を実現する装置の一例であり、この例では描画命令を受け取ってバンド毎の中間コード画像データを生成した後、バンド単位のビットマップイメージを作成し、出力する場合を示している。ここでは、描画命令は例えばパーソナルコンピュータなどの上位処理装置1から受け取り、作成したビットマップイメージを印字装置3に出力するものとして図示している。なお、上位処理装置1と画像処理装置2は、ケーブル接続されたり、あるいはLANなどのネットワークによって通信可能に接続されていてよい。また、画像処理装置2と印字装置3とは、配線などによって直結されている場合が多いが、これに限られるものではない。
【0021】
画像処理装置2は、中間コード生成部11、中間コードメモリ12、中間コード画像データ展開部13、バンドバッファ14、補正処理部15、出力制御部16を含んで構成されている。中間コード生成部11は、上位処理装置1から送られてくる描画命令を受け取り、その描画命令を解釈してバンド単位の中間コード画像データを生成する。生成する中間コード画像データには、その中間コード画像データによって描画される図形に対して単一の属性情報を含ませておくことができる。また、その単一の属性情報を使用するか否かを示す有効/無効情報を含んでいる。なお、中間コード生成部11で生成する中間コード画像データは、通常は有効/無効情報として単一の属性情報を使用する設定とする。もちろんこれに限らず、例えば上位処理装置1から描画命令とともにビットマップイメージに1ないし複数の画素毎の属性情報が付加されている場合についても受け付け可能に構成することができ、この場合には単一の属性情報を使用しない設定とした中間コード画像データを生成する。中間コード画像データのデータフォーマットの例については後述する。
【0022】
中間コードメモリ12は本発明の命令記憶手段であり、中間コード生成部11で生成した中間コード画像データを記憶する。また、例えば中間コード生成部11で上位処理装置1から受け取った描画命令を記憶するなど、中間コード生成部11における処理において利用することも可能である。
【0023】
中間コード画像データ展開部13は、本発明の描画手段の機能を含み、中間コードメモリ12からバンド単位に中間コード画像データを読み出してレンダリングし、ビットマップイメージ及び属性情報を作成してバンドバッファ14に書き込む。なお、属性情報はビットマップイメージの1ないし複数画素毎に付加することができる。
【0024】
また中間コード画像データ展開部13は、中間コード生成部11が中間コードメモリ12に中間コード画像データを保持させてゆく際に、中間コードメモリ12の記憶領域が不足したときには、フォールバック処理を行う。フォールバック処理は、それまでに中間コードメモリ12に記憶されている中間コード画像データをレンダリング処理してビットマップイメージ及び属性情報を展開し、そのビットマップイメージおよび属性情報が保持される領域のアドレスを含む単一の中間コード画像データを生成する処理である。なお、フォールバック処理の詳細は後述する。このフォールバック処理によって、多数の中間コード画像データが1つの中間コード画像データに置き換えられるため、中間コードメモリ12の記憶領域を確保することができる。
【0025】
このとき生成した単一の中間コード画像データについては、有効/無効情報として単一の属性情報を使用しないように設定しておく。フォールバック処理時には、複数の属性を持つ図形を描画している可能性があり、従って展開されたビットマップイメージは単一の属性を有しているとは限らない。単一の属性情報を使用しないように有効/無効情報を設定しておくことによって、生成した単一の中間コード画像データに基づいてレンダリング処理を行う際に、フォールバック処理時に展開した属性情報をそのまま反映することが可能になる。
【0026】
なお、中間コード画像データ展開部13がフォールバック処理を行って展開したビットマップイメージ及び属性情報は、データ量を削減するため、縮小したり、あるいは圧縮して圧縮コードとしておくことができる。圧縮する場合には、ビットマップイメージと属性情報のそれぞれについて異なる圧縮方法を適用することができる。なお、属性情報の圧縮には可逆方式を用いることが望ましい。
【0027】
バンドバッファ14は本発明におけるイメージ記憶手段に対応するものであり、中間コード画像データ展開部13で展開したバンド単位のビットマップイメージを保持するとともに、ビットマップイメージの1ないし数画素毎に属性情報を保持する。なお、バンドバッファ14は例えばカラーのビットマップイメージを記憶する際には、色成分毎に別々のプレーンとして記憶する面順次データとして記憶したり、あるいは画素毎にすべての色成分のデータを保持する点順次データとして記憶することができる。また、バンドバッファ14として、1バンド分の記憶領域を有するほか、複数バンド分の記憶領域を有し、中間コード画像データ展開部13によるビットマップイメージ及び属性情報の書き込みと、次の補正処理部15による処理あるいは出力制御部16による読み出しを並行して行えるように構成することもできる。
【0028】
補正処理部15は、バンドバッファ14に保持されているビットマップイメージに対して、同じくバンドバッファ14に保持されている属性情報に従って補正処理を行う。例えば、それぞれの属性に応じた色変換処理などを行うことができる。もちろん、色変換処理に限らず、属性情報に応じた種々の補正処理を行うことができる。また、出力のためのデータ変換処理なども補正処理部15において行うこともできる。
【0029】
出力制御部16は、バンドバッファ14に展開されたビットマップイメージを読み出し、印字装置3などに転送する。
【0030】
図2は、本発明の実施の一形態における、より具体的な機能ブロック図である。図中、21は入力制御部、22は描画命令解釈部、23は中間コード画像データ生成部、31は中間コード画像データ解釈部、32は圧縮/伸長処理部、33は縮小/拡大処理部、41は色変換部、42は点面変換部である。実線の矢印はデータの流れを示し、破線の矢印は制御の流れを示している。
【0031】
この例では、中間コード生成部11は、入力制御部21、描画命令解釈部22、中間コード画像データ生成部23を含んで構成されている。また中間コード画像データ展開部13は、中間コード画像データ解釈部31、圧縮/伸長処理部32、縮小/拡大処理部33を含んで構成されている。さらに補正処理部15は、色変換部41、点面変換部42を含んで構成されている。
【0032】
入力制御部21は、上位処理装置1などから送られてくる描画命令を受信し、中間コードメモリ12に記憶させる。そして描画命令解釈部22を起動する。描画命令解釈部22は、中間コードメモリ12に記憶されている描画命令を順に読み出し、解釈する。そして、この描画命令の解釈処理によって得られた情報(属性情報、色情報、エッジ情報、イメージなど)を中間コード画像データ生成部23に引き渡す。中間コード画像データ生成部23は、上述の中間コード生成部11における中間コード画像データの生成に関する各種の機能を実行し、描画命令解釈部22から渡された情報から、バンド単位で中間コード画像データを生成し、中間コードメモリ12に格納する。
【0033】
図3は、イメージの中間コード画像データの一例の説明図である。ここでは描画オブジェクトに対する中間コード画像データのフォーマットの一例を示している。描画オブジェクトとしては、グラフィックス、フォント、イメージなどが挙げられる。このうち、グラフィックスやフォントについては、中間コード画像データのみで表現可能であるが、イメージ(縮小/圧縮イメージを含む)の場合には、中間コード画像データとイメージ(縮小/圧縮イメージを含む)の2つで構成される。図3(A)にはグラフィックスやフォントなど、イメージ以外の描画オブジェクトの場合の中間コード画像データのフォーマットを示し、図3(B)にはイメージの場合の中間コード画像データのフォーマットを示している。
【0034】
いずれの描画オブジェクトの場合も、中間コード画像データはヘッダ部とボディ部で構成されている。ヘッダ部にはコマンドID、属性情報フィールドとその他の情報が含まれており、描画オブジェクトがイメージの場合には、さらに、イメージ(縮小/圧縮イメージを含む)が存在するアドレスを「イメージへのポインタ」として保持し、イメージとの関連づけを行っている。ボディ部には、描画命令解釈部22から渡されたエッジ情報から作成した描画領域を指定する情報、例えばランレングス情報を保持する。
【0035】
ここで、属性情報フィールドには、従来は描画命令解釈部22から渡された描画オブジェクトを示す属性情報を設定している。この例では、この属性情報とともに有効/無効情報を属性情報フィールドに設定する。この属性情報フィールドに設定される属性情報は、当該中間コード画像データにおいて単一の属性を示す情報である。すなわち、描画オブジェクトがイメージであれば、イメージ全体に対して共通の「イメージ」という属性を適用することを示すものである。グラフィックスやフォントの場合には、描画領域全てにおいて同一の描画オブジェクトであることが保証されるが、イメージ(縮小/圧縮イメージを含む)の場合には、イメージのみであるという保証はなく、何らかの理由でフォントやグラフィックスなどの複数の描画オブジェクトが展開された状態でイメージとして扱われている場合がある。例えば上述のフォールバック処理の場合があるし、また上位処理装置1から属性を指定されたイメージを受け取った場合なども考えられる。しかし、従来の中間コード画像データのフォーマットでは、属性情報フィールドに設定されている単一の描画オブジェクト情報しか持つことができないため、上記のような場合には対応できず、印字の品質を保証できないという問題が発生する。
【0036】
本発明の中間コード画像データのフォーマットでは、上述のような問題を解決するため、有効/無効情報を有している。この有効/無効情報は、上述の中間コード画像データ中の属性情報フィールドに設定されている単一の属性情報を使用するか否かを示している。この有効/無効情報が有効である旨を示している場合には、属性情報フィールドの単一の属性情報を使用する。また、有効/無効情報が無効である旨を示している場合には、属性情報フィールドの単一の属性情報を使用せず、例えばイメージに付加されている属性情報などを使用する。
【0037】
図3に示した例では、有効/無効情報も属性情報フィールドに格納している。具体例として、属性情報フィールドのサイズが8ビットである場合、下位4ビットで属性情報を表現し(例えばグラフィックス=1、フォント=2、イメージ=3など)、上位4ビットで有効/無効情報を表現する(例えば有効=0、無効=0xf0)。この属性情報と有効/無効情報との論理和を属性情報フィールドに格納している。もちろん、この具体例に限られるものでないことは言うまでもなく、中間コード画像データ中に1ビット以上の有効/無効情報が含まれていればよい。
【0038】
図3(B)に示すイメージの中間コード画像データの場合、上述のようにイメージへのポインタによってイメージが存在する場所が指し示されている。このときのイメージは、有効/無効情報が有効の設定の場合には、図3(C)に示すようにイメージのみである。しかし、有効/無効情報が無効の設定の場合には、図3(D)に示すように、イメージとともに、そのイメージの1ないし複数画素毎に対応付けられた属性情報を含んでいる。
【0039】
このように、何らかの理由でフォントやグラフィックスなどの複数の属性の描画オブジェクトが展開された状態でイメージとして扱われている場合には、属性情報フィールドに有効/無効情報として無効を設定し、かつ中間コード画像データのヘッダ部に格納されているイメージへのポインタで指し示されるイメージ(縮小/圧縮イメージを含む)の中に1ないし複数画素毎の属性情報を付加させる。これによって、確実に各画素に対する属性情報を保持することができ、補正処理部15において属性情報に従った補正処理を行って印字の品質を保証することができる。
【0040】
図2に戻り、中間コード画像データ展開部13の中間コード画像データ解釈部31は、中間コードメモリ12から中間コードを順に取り出して解釈し、バンド単位でバンドバッファ14に描画処理し、ビットマップイメージに展開する。また、描画した画素に対応する属性情報についてもビットマップイメージとともにバンドバッファ14に格納する。このとき、中間コード画像データによっては、圧縮/伸長処理部32、縮小/拡大処理部33等を用いて処理を行うことができる。また中間コード画像データ展開部13は、中間コードメモリ12の空き容量が少なくなったときに、上述のフォールバック処理を行う。フォールバック処理でもバンドバッファ14に対して描画処理を行い、また属性情報も格納する。このとき、一般的には種々の属性の図形が描画されることになる。そのため、フォールバック処理において生成する中間コード画像データには、有効/無効情報として無効を設定しておく。また、その中間コード画像データのイメージには属性情報を付加しておく。
【0041】
なお、フォールバック処理で描画されたビットマップイメージ及び属性情報は中間コードメモリ12に格納されることになるが、ビットマップイメージのままでは中間コードメモリ12の領域を圧迫するおそれもある。このような場合に対応し、データ量を削減するために、例えば縮小/拡大処理部33で縮小したり、あるいは圧縮/伸長処理部32で圧縮しておくことができる。圧縮する場合には、ビットマップイメージと属性情報とで異なる圧縮手法を用いることが可能である。少なくとも属性情報については、可逆圧縮手法を用いることが望ましい。
【0042】
圧縮/伸長処理部32は、圧縮されたイメージを伸長してバンドバッファ14に書き込む。また、例えばフォールバック処理を行い、描画したビットマップイメージを圧縮し、圧縮コードとして保存する場合は、この圧縮/伸長処理部32によって圧縮し、圧縮コードを中間コードメモリ12に格納する。この場合も、バンドバッファ14に書き込む際には、この圧縮/伸長処理部32によって伸長処理を行う。
【0043】
縮小/拡大処理部33は、描画するオブジェクトがイメージの時、中間コードメモリ12に格納されている中間コード画像データ中の拡大率に従って、イメージを縮小あるいは拡大処理する。また、例えばフォールバック処理で描画したビットマップイメージを縮小して保存する場合には、描画したビットマップイメージを縮小し、中間コードメモリ12に格納する。この場合も、バンドバッファ14に書き込む際には、この縮小/拡大処理部33によって必要に応じて拡大処理を行う。
【0044】
補正処理部15の色変換部41は、バンドバッファ14中のビットマップイメージに対して、色空間変換処理や色補正処理などを行う。このとき、ビットマップイメージとともにバンドバッファ14に格納されている属性情報に従って、それぞれの属性の描画図形に最適な処理を行うことができる。
【0045】
点面変換部42は、バンドバッファ14にビットマップイメージを記憶する際に、色成分毎に別々のプレーンとして記憶する面順次データとして記憶し、印字装置3が画素毎にすべての色成分のデータを保持する点順次データを要求する場合、面順次データから点順次データへ変換する。あるいは、バンドバッファ14にビットマップイメージを記憶する際に点順次データとして記憶し、印字装置3が面順次データを要求する場合、点順次データから面順次データへ変換する。
【0046】
なお、中間コード画像データ展開部13、補正処理部15の全部又は一部の構成、あるいはさらにバンドバッファ14などは、専用の回路で構成することが可能である。これによって高速に処理を行うことが可能である。
【0047】
図4は、本発明の実施の一形態における全体処理の一例を示すフローチャートである。例えば、パーソナルコンピュータなどの上位処理装置1と画像処理装置2がネットワークなどで接続されているようなプリントシステムにおいては、上位処理装置1からネットワークなどを通じて描画命令が画像処理装置2に送られてくるので、画像処理装置2は入力制御部21で描画命令を受け取って中間コードメモリ12に格納する。
【0048】
一連の描画命令を受信したら、あるいは描画命令の受信と並行して、描画命令解釈部22及び中間コード画像データ生成部23が動作する。S51において、描画命令解釈部22は、上位処理装置1から受け取った描画命令が存在するか否かを判定し、存在していれば、その描画命令をS52において解釈する。そして、解釈結果を中間コード画像データ生成部23に渡す。
【0049】
画像データ生成部23は、描画命令解釈部22から渡された解釈結果に基づき、それぞれのバンド毎の中間コード画像データを生成する。描画命令に基づく描画領域のY方向の座標の最小値をYmin、最大値をYmaxとしたとき、Yminを含むバンドからYmaxを含むそれぞれのバンドについてS54〜S60の処理が行われるようにS53〜S61を繰り返す。
【0050】
S54では、描画命令によって描画されるオブジェクトのうち、処理中のバンドに描画される部分についての中間コード画像データを生成する。S55において、属性情報フィールドを有効にするか否かを判定する。この判定は、例えば描画オブジェクトがイメージの場合に、そのイメージとともに1ないし複数画素毎に属性情報が付加されているか否かを判定すればよい。別途、属性情報が付加されていなければ、単一の属性情報を適用すればよいので、S56において属性情報フィールドに有効・無効情報として単一の属性情報が有効である旨を設定する。また、属性情報が付加されている場合には、その付加されている属性情報を利用することとし、S57において、有効・無効情報としては単一の属性情報を無効とする旨の設定を行う。
【0051】
中間コード画像データ生成部23で生成された中間コード画像データは、中間コードメモリ12に格納するが、このとき、S58において、中間コード画像データを中間コードメモリ12に格納できるだけの空き領域が存在するか否かを判定する。空き領域が存在すれば、S60において、中間コード画像データ生成部23で生成された中間コード画像データを中間コードメモリ12に格納する。
【0052】
中間コード画像データ生成部23で生成された中間コード画像データを中間コードメモリ12に格納できるだけの空き領域が存在しない場合には、S59においてフォールバック処理を行う。このフォールバック処理についての処理の一例については後述する。このフォールバック処理によって中間コードメモリ12の空き領域を増加させた後、S60において、中間コード画像データ生成部23で生成された中間コード画像データを中間コードメモリ12に格納する。
【0053】
このようにして、ある描画命令について1つのバンドに対する中間コード画像データを生成し、中間コードメモリ12に格納したら、同じ描画命令について他のバンドに対する中間コード画像データを生成すべく、S61からS53に戻って処理を繰り返す。ある描画命令について、その描画命令によって描画される全てのバンドについて中間コード画像データを生成したら、S51へ戻る。そして、次の描画命令についての処理を行う。そして、全ての描画命令について、バンド毎の中間コード画像データを生成したら、S62へ進む。
【0054】
S62〜S64では、すべてのバンドについて、順次、S63において中間コード画像データ解釈部31がレンダリング処理を行う。すなわち、中間コード画像データ解釈部31は、処理中のバンドに対応する中間コード画像データを中間コードメモリ12から読み出してレンダリング処理を行い、ビットマップイメージ及び属性情報をバンドバッファ14に書き込む。1バンド分の中間コード画像データについてレンダリング処理を終えたら、リアルタイム出力を行う場合にはすぐに補正処理部15による属性情報を用いたビットマップイメージの補正処理を行って、出力制御部16から例えば印字装置3などに出力される。また、リアルタイム出力を行わない場合には、バンドバッファ14内のビットマップイメージ及び属性情報を圧縮/伸長処理部32で圧縮して中間コードメモリ12に格納する。なお、レンダリング処理のより詳細な説明を後述する。
【0055】
このようにして全てのバンドについてS63におけるレンダリング処理を行った後、S65においてリアルタイム出力を行ったか否かを判断する。リアルタイム出力を行っている場合には、既に出力まで終了しているので、この処理を終える。
【0056】
リアルタイム出力を行っていない場合には、S66〜S68において、全てのバンドについて、順次、S67における伸長及び出力処理を行う。すなわち、リアルタイム出力を行っていない場合には、上述のようにバンド毎に生成したビットマップイメージ及び属性情報は圧縮されて圧縮コードとして中間コードメモリ12に格納されている。従って、順に圧縮コードを読み出して圧縮/伸長処理部32により伸長し、バンドバッファ14に展開し、出力制御部16から例えば印字装置3などに出力する。
【0057】
なお、上述の一連の動作は、例えば1ページ分のビットマップイメージを出力するものであり、例えば複数ページのビットマップイメージを出力する場合には、上述の図4に示した処理をそれぞれのページ毎に行えばよい。
【0058】
図5は、本発明の実施の一形態におけるフォールバック処理の一例を示すフローチャートである。フォールバック処理の概要は、あるバンドの全ての中間コード画像データを一旦バンドバッファに展開し、バンドバッファに展開されたビットマップイメージに対する単一の中間コード画像データを生成することにより中間コード画像データ保持領域の不足を解消するというものである。ここでは1バンド分の中間コード画像データについてフォールバック処理を行うものとして説明する。もちろん、以下の処理を繰り返すことによって、複数バンドについてフォールバック処理を行うことも可能である。
【0059】
フォールバック処理を行うバンドに対応する中間コード画像データのそれぞれについて、S71〜S81の間の処理を実行する。S72では、中間コード画像データがイメージを描画する(イメージ系の)中間コード画像データであるか否かを判定する。この判定は、コマンドIDや属性情報などによって行うことができる。イメージ系以外の中間コード画像データである場合には、S79において、属性情報として中間コード画像データ中の属性情報フィールドの属性情報を用いるものとして、S80でバンドバッファ14への描画処理を行う。この描画処理によって書き込まれた画素については、中間コード画像データ中の属性情報フィールドの属性情報がバンドバッファ14に書き込まれる。
【0060】
また、イメージ系の中間コード画像データについては、S73において描画するイメージが圧縮された圧縮データである場合には、S74において圧縮/伸長処理部32で伸長処理し、また描画するイメージ(伸長されたイメージを含む)が縮小されたイメージであれば、S76において、縮小/拡大処理部33で拡大処理を行う。なお、描画するイメージがバンドバッファ14に展開する際の解像度と一致していない場合には、S76において解像度を一致させるための拡大あるいは縮小処理を行う。なお、圧縮データであるか否か、及び、圧縮データであるか否かは、中間コード画像データ中のコマンドIDなどによって判断することができる。
【0061】
ここで、処理中の中間コード画像データの有効/無効情報が有効、すなわち中間コード画像データ中の属性情報フィールドの属性情報を用いる旨の設定であるか否かを判定する。有効/無効情報が有効であれば、S79において属性情報として中間コード画像データ中の属性情報フィールドの属性情報を用いるものとし、無効であれば、S78においてイメージに付加されている属性情報を用いるものとする。そして、S80においてバンドバッファ14への描画処理を行う。このとき、描画処理によって書き込まれた画素に対応する属性情報として、有効/無効情報が有効であれば中間コード画像データ中の属性情報フィールドの属性情報をバンドバッファ14に書き込み、有効/無効情報が無効であればイメージに付加されている属性情報をバンドバッファ14に書き込む。
【0062】
このような処理を1バンド分の中間コード画像データのそれぞれについて行うことによって、バンドバッファ14には、フォールバック処理開始時点までに生成されている当該バンドに対応する中間コード画像データにより描画されたビットマップイメージ及び属性情報が格納される。描画された中間コード画像データは中間コードメモリ12から削除され、中間コードメモリ12の空き領域を増やすことができる。
【0063】
なお、ここではイメージ系以外の中間コード画像データについては有効/無効情報を判断していないが、もちろん、イメージ系以外の中間コード画像データについても有効/無効情報を判断してもよい。
【0064】
バンドバッファ14への描画が終了したら、バンドバッファ14内のビットマップイメージを中間コードメモリ12に転送し、後述するS90で生成する新たな中間コード画像データのイメージとして中間コードメモリ12に格納する。上述の処理によって中間コード画像データが削除されて中間コードメモリ12の空き領域は増加するが、イメージを保存するための領域が不足する場合が発生することがある。そのような場合に対応するため、バンドバッファに展開されたビットマップイメージに対して、縮小処理や圧縮処理(可逆または非可逆)を実行することにより、中間コードメモリ12内のイメージ保持領域の不足を解消することができる。縮小処理や圧縮処理を行うか否かは予め設定しておいたり、あるいは中間コード画像データあるいは描画されたビットマップイメージなどから判断するように構成することができる。
【0065】
これらの処理を行う際に、この例ではビットマップイメージを色成分毎に処理するものとし、S82〜S89のループを色成分R、G、Bと属性情報の4回実行するものとしている。例えばS80の描画処理の際に、面順次データとしてバンドバッファ14に描画している場合を想定している。もちろん、点順次データの場合には、ビットマップイメージと属性情報の2回のループとなる。
【0066】
S83において縮小するか否かを判定し、縮小する場合にはS84において縮小・拡大処理部33で縮小(あるいは拡大)処理を行う。またS85において圧縮するか否か、及び圧縮する場合にはS86において圧縮手法として可逆圧縮手法を用いるか否かを判定する。圧縮しない場合には当該色成分あるいは属性情報に対する処理を終えて次の色成分あるいは属性情報に対する処理に移る。圧縮処理を行う場合であって、可逆圧縮手法が選択されている場合にはS87において圧縮・伸長処理部32は可逆圧縮手法による圧縮を行う。また、圧縮処理を行う場合であって、非可逆圧縮手法が選択されている場合にはS88において圧縮・伸長処理部32は非可逆圧縮手法による圧縮を行う。データ量を削減するためには非可逆圧縮手法を用いた方がよいが、正確に元のデータを復元することはできない。従って、属性情報については常に可逆圧縮手法を用いることが望ましい。なお、縮小処理も圧縮処理も行わない場合には、バンドバッファ14に展開されたビットマップイメージ及び属性情報をそのまま中間コードメモリ12に格納することになる。
【0067】
ビットマップイメージのそれぞれの色成分及び属性情報について、必要に応じて縮小処理や圧縮処理を行った後、S90において、バンドバッファ14に展開したビットマップイメージに対して1つの中間コード画像データを生成する。そしてS91において、その中間コード画像データに、有効/無効情報として無効を設定する。また、中間コード画像データのコマンドIDには、縮小処理や圧縮処理などを行ったか否かなどに応じたコマンドIDが設定される。
【0068】
このようにして生成された中間コード画像データとビットマップイメージは中間コードメモリ12に格納され、以後、中間コード画像データ生成部23が描画命令から生成した中間コード画像データと同様に取り扱われる。
【0069】
図6は、ビットマップイメージに属性情報を付加させた場合のデータフォーマットの一例の模式図である。図6(A)にはRGBの面順次のビットマップイメージを示しており、色成分Rからなる画像プレーンと色成分Gからなる画像プレーンと色成分Bからなる画像プレーンによって構成される。それとともに属性情報のプレーンを設け、R、G、Bの画像プレーン中のそれぞれの画素位置と同じ位置にその画素の属性情報を配置している。
【0070】
このようなデータフォーマットのビットマップイメージ及び属性情報に対して、上述の図5に示したフォールバック処理において縮小処理を行った場合を図6(B)に示している。ここでは間引き処理によって1/2に縮小した場合を示しており、偶数画素のデータがそれぞれの画像プレーン及び属性情報のプレーンから間引かれている。もちろん縮小処理の方法や縮小率は任意である。
【0071】
さらにこのような図6(A)または図6(B)に示すデータフォーマットのビットマップイメージ及び属性情報を圧縮する場合には、やはり画像プレーン及び属性情報のプレーン毎に圧縮する。これによって、図6(C)に示すようにR成分の圧縮コードとG成分の圧縮コードとB成分の圧縮コードと属性情報の圧縮コードがそれぞれ生成されることになる。
【0072】
図7は、ビットマップイメージに属性情報を付加させた場合のデータフォーマットの別の例の模式図である。上述の図6には面順次の場合を示したが、図7には点順次のビットマップイメージの場合を示している。点順次の場合には、それぞれの画素毎のデータとして全ての色成分のデータ(R成分データ、G成分データ、B成分データ)を有している。従って図7(A)に示すように、属性情報についてもそれぞれの画素毎に付加してゆけばよい。これによって、それぞれの画素毎に、R成分データ、G成分データ、B成分データ、属性情報の4つを保持することになる。
【0073】
このようなデータフォーマットのビットマップイメージ及び属性情報に対して、上述の図5に示したフォールバック処理において縮小処理を行った場合を図7(B)に示している。ここでは間引き処理によって1/2に縮小した場合を示しており、偶数画素のデータがそれぞれの画像プレーン及び属性情報のプレーンから間引かれている。もちろん縮小処理の方法や縮小率は任意である。
【0074】
さらにこのような図7(A)または図7(B)に示すデータフォーマットのビットマップイメージ及び属性情報を圧縮する場合には、属性情報を分離し、RGBビットマップイメージと属性情報とを別々に圧縮するとよい。RGBビットマップイメージに対する圧縮手法としては種々の手法が知られており、それぞれの圧縮手法によってフォーマットは異なっている。また、属性情報を分離した場合、RGBビットマップイメージとは異なる圧縮手法を適用することができる。例えばRGBビットマップイメージに対して非可逆の圧縮手法を適用している場合、属性情報に対しては可逆圧縮手法を適用するといったことが可能である。このような処理によって、図7(C)に示すようにRGBビットマップイメージに対する圧縮コードと属性情報に対する圧縮コードがそれぞれ生成されることになる。
【0075】
図4でも説明したように、上位処理装置1から送信された全ての描画命令を中間コード画像データに変換した後、バンド単位にレンダリング処理を行う。中間コード画像データの生成時にフォールバック処理を行った場合には、そのフォールバック処理で生成された中間コード画像データも、レンダリング処理の対象となる。
【0076】
図8は、レンダリング処理の一例を示すフローチャートである。ここでは1バンド分のレンダリング処理を示しており、図4のS62,S64によりそれぞれのバンド毎に、このレンダリング処理を繰り返して実行することになる。
【0077】
まずS101において、中間コード画像データの有無を判定する。レンダリング処理すべき中間コード画像データが存在する場合には、その中間コード画像データについてS102〜S110の処理を行ってバンドバッファ14に描画する。なお、S102〜S110の処理は図4に示したフォールバック処理のS72〜S80の処理と同様である。この処理中で上述のフォールバック処理と同様に、有効/無効情報に従って、中間コード画像データ中の属性情報あるいはイメージに付加されている属性情報のいずれかを選択し、描画したビットマップイメージに対応付けて属性情報をバンドバッファ14に書き込む。上述のフォールバック処理の場合も同様であるが、中間コード画像データの中には、この描画処理よりも前に行われたフォールバック処理によって生成された中間コード画像データも含まれている場合がある。そのような中間コード画像データでは有効/無効情報は無効に設定されており、イメージに付加されている属性情報を用いてバンドバッファ14に属性情報を書き込むことになる。S110の描画処理を行ったらS101へ戻り、次の中間コード画像データの処理に移る。
【0078】
1バンド分の中間コード画像データについて全て描画したら、S101からS111へ進む。S111において、描画されたビットマップイメージの色空間と、出力するビットマップイメージの色空間が一致しているか否かを判定する。一致していれば色空間の変換処理は不要であるので次のS113へ進む。色空間が一致していない場合には、S112において、色変換部41は出力するビットマップイメージの色空間への色空間変換処理を行う。例えば、描画されたビットマップイメージの色空間がRGB色空間であり、出力するビットマップイメージの色空間がCMYK色空間である場合には、RGB色空間からCMYK色空間への変換処理を行う。このとき、ビットマップイメージに付加されている属性情報に従って、それぞれの属性の図形に対して最適な色空間変換処理を行うことができる。例えばイメージ部分については忠実な色再現を目的として色空間変換処理を行い、文字などの部分については識別性を重視した色空間変換処理を行うなどといった処理が可能である。もちろん、属性情報に応じてどのような色空間変換処理を行うかは任意である。
【0079】
また、ここでは色空間変換処理について一例として示しているが、もちろんこのほかにも、色調整や各色成分のγ調整、その他、各種のフィルタリング処理などの画処理を、必要に応じて属性情報を用いて行うことができる。
【0080】
S113では、バンドバッファ14に格納されているビットマップイメージのデータ形式(点順次あるいは面順次)が、出力するビットマップイメージのデータ形式と一致しているか否かを判断する。一例として、ここでは出力するビットマップイメージのデータ形式が面順次のデータ形式であるものとしており、バンドバッファ14に格納されているビットマップイメージが点順次のデータ形式であれば、S114において、点面変換部42で面順次のデータ形式に変換する。もちろん、出力するビットマップイメージとして要求されるデータ形式が点順次のデータ形式であれば、面順次のビットマップイメージについて点順次のデータ形式への変換処理を行う。
【0081】
このようにして、バンドバッファ14に格納されているビットマップイメージに対して各種の処理を施した後、S115においてリアルタイム出力を行うか否かを判定する。リアルタイム出力を行う場合には、S117において、出力制御部16がバンドバッファ14からビットマップイメージを読み出し、外部の例えば印字装置3などへ出力する。印字装置3は画像処理装置2からビットマップイメージを受け取り、印字処理を行う。
【0082】
またリアルタイム出力を行わない場合には、S116において、バンドバッファ14に格納されているビットマップイメージを圧縮/伸長処理部23で圧縮し、圧縮データを中間コードメモリ12に格納する。あるいは、複数ページ分の圧縮データを格納する場合には、新たに外部記憶装置を画像処理装置2に設けることにより対応する。出力を行う場合には、図4のS67において圧縮/伸長処理部32で伸長処理を行ってバンドバッファ14に書き込み、そのバンドバッファ14に書き込まれたビットマップイメージを出力制御部16が印字装置3などに対して出力する。
【0083】
リアルタイム出力を行うか否かは、上述のバンド単位のレンダリング処理や、色変換処理および点面変換処理などに要する処理時間が、印字装置3の出力時間に間に合うか否かによって決めることができる。印字装置3の出力時間に間に合う場合にはリアルタイム出力が可能であり、リアルタイム出力を行うことによって印字装置3で印字が開始されるまでの時間を短縮することができる。印字装置3の出力時間に間に合わない場合や、印字装置3の出力時間に間に合う場合であっても設定により、レンダリングしたビットマップイメージを圧縮して保存し、伸長しながら出力すればよい。伸長処理と出力処理はレンダリング処理などに比べて短時間で処理できるので、印字装置3がある程度高速であっても対応することができる。
【0084】
上述の説明では、バンドバッファ14を設け、バンド単位でレンダリング処理及び出力処理を行う場合について述べた。本発明は上述のようなバンド単位で処理する場合に限られるものではなく、ページメモリを有し、ページ単位で処理する場合についても有効である。すなわち、イメージとともに属性情報が送られてくる場合には、送られてきた属性情報を優先して使用する設定を描画命令中で行っておけば追い。また、多量の描画命令が送られてきたとき、メモリの空き容量が不足した場合にページメモリを用いてフォールバック処理を行い、その際に1ないし複数画素毎に属性情報を付加しておいて、後でレンダリング処理を行う際にイメージに付加した属性情報を反映させ、後段の補正処理において最適な処理を施して画質を保証することができる。
【0085】
【発明の効果】
以上の説明から明らかなように、本発明によれば、描画命令あるいは中間コード画像データが保持する単一の属性情報を使用するか否かを示す有効/無効情報を設定可能としたので、例えば1ないし複数画素毎に属性情報が付加されたイメージなどの取り扱いが可能となり、またフォールバック処理が発生した場合でも全ての画素に対する属性情報を保持することが可能となる。これによって、属性情報に応じた補正処理を正確に施すことができ、画質を保証することができるという効果がある。例えば出力するビットマップイメージに基づいて印字装置により印字する場合には、印字品質を保証することが可能となる。また、常に1ないし複数画素毎に属性情報を保持するとデータ量が増大し、多大なメモリ量が必要となるが、描画命令あるいは中間コード画像データ中の単一の属性情報との切り替えが可能であるので、不必要に属性情報のためのデータ量を増大させることはなく、メモリを有効利用することができる。さらに、有効/無効情報に対する処理はそれほど複雑な処理ではないので、描画手段や補正処理手段を専用の回路で構成することが可能であり、高速な処理が可能である。
【図面の簡単な説明】
【図1】 本発明の実施の一形態を示す機能ブロック図である。
【図2】 本発明の実施の一形態における、より具体的な機能ブロック図である。
【図3】 イメージの中間コード画像データの一例の説明図である。
【図4】 本発明の実施の一形態における全体処理の一例を示すフローチャートである。
【図5】 本発明の実施の一形態におけるフォールバック処理の一例を示すフローチャートである。
【図6】 ビットマップイメージに属性情報を付加させた場合のデータフォーマットの一例の模式図である。
【図7】 ビットマップイメージに属性情報を付加させた場合のデータフォーマットの別の例の模式図である。
【図8】 レンダリング処理の一例を示すフローチャートである。
【符号の説明】
1…上位処理装置、2…画像処理装置、3…印字装置、11…中間コード生成部、12…中間コードメモリ、13…中間コード画像データ展開部、14…バンドバッファ、15…補正処理部、16…出力制御部、21…入力制御部、22…描画命令解釈部、23…中間コード画像データ生成部、31…中間コード画像データ解釈部、32…圧縮/伸長処理部、33…縮小/拡大処理部、41…色変換部、42…点面変換部。[0001]
BACKGROUND OF THE INVENTION
The present invention interprets an input drawing command to generate intermediate code image data, renders the intermediate code image data to create a bitmap image, and further corrects the bitmap image based on the attribute information. The present invention relates to an image processing technique for outputting a final bitmap image to a printing device or the like.
[0002]
[Prior art]
An image processing apparatus that has received a print command from a host processing device such as a personal computer receives a drawing command that is actual print information, sequentially interprets it, and creates and outputs a bitmap image. In this process, when the image processing apparatus holds a page buffer, the interpreted bitmap image is directly written in the page buffer (rendering process) and output in units of pages. In addition, since the page buffer requires a large storage capacity, in many cases, a page buffer (band buffer) obtained by dividing one page into a plurality of pages is held instead of the page buffer. In such a case, once converted into band-based intermediate code image data, after interpretation of all drawing commands and generation of intermediate code image data, the intermediate code image data is interpreted in band units, and a bitmap image is converted. Performs rendering processing to write to the band buffer.
[0003]
Normally, a bitmap image written in a page buffer or band buffer is subjected to correction processing before being transmitted to a printing device or the like. For example, when the color space specified by the drawing command is RGB, the color space must be converted to CMYK in order to output to the printing apparatus. However, if color space conversion is uniformly performed on all bitmap images, a problem occurs in print quality, and therefore processing according to the drawing content (font, graphics, image, etc.) is desirable. In order to perform processing according to the drawing contents, attribute information indicating what kind of drawing contents (font, graphics, image, etc.) the contents of the respective drawing commands are required at the time of color conversion processing.
[0004]
Generally, the attribute information held by a drawing command is single for one drawing object, and attribute information is added for every one to several pixels when a bitmap image is generated by rendering processing. In an image processing apparatus that holds a band buffer and performs rendering processing in band units, the attribute information of the rendering command is passed to the intermediate code image data, and the attribute information is stored in the bitmap image developed in the band buffer. Added. Then, the developed bitmap image may be corrected with reference to the attribute information added to the bitmap image.
[0005]
Here, when the series of processing is performed only by the CPU, the processing load is large. For this reason, the CPU interprets the rendering command or the intermediate code image data and writes the bitmap image and attribute information to the memory. A method has been devised in which processing is performed by transferring a developed bitmap image and attribute information to an image processing circuit by DMA.
[0006]
For example, in the image forming apparatus described in
[0007]
In the printing apparatus described in
[0008]
As described above, since the drawing command or the intermediate code image data generally corresponds to one drawing object, the attribute information held by the drawing command or the intermediate code image data is single. However, in some cases, one drawing command or intermediate code image data may contain a plurality of drawing contents. In such a case, the attribute of the drawing contents can be accurately determined only by holding single attribute information. It is not possible to express it as a problem.
[0009]
As an example, there is a case where an area for holding a drawing command or intermediate code image data is insufficient. In this case, as an exceptional process, a rendering command or intermediate code image data for each band is temporarily rendered halfway, and a bitmap image is developed in a memory (or further compressed). Then, a single drawing command or intermediate code image data holding the address of the area where the developed bitmap image (or compressed bitmap image) is held is generated. As a result, the rendering command or intermediate code image data that has been rendered so far can be deleted, and the shortage of the area that holds the rendering command or intermediate code image data can be resolved.
[0010]
Conventionally, single information, for example, an image, is set as the attribute information of the drawing command or intermediate code image data generated at this time. However, there is a possibility that drawing contents having various attributes are included in the developed bitmap image. For this reason, an optimal process is not performed on a portion in which drawing content having an attribute different from the set single attribute information is rendered, which ultimately causes a problem in print quality.
[0011]
For example, also in the image processing apparatus described in
[0012]
Japanese Patent Application Laid-Open No. H10-228561 also describes that one side of attribute information is given to bitmap image data. In this case, there is a problem with consistency with object information that is not expanded into a bitmap image. Although nothing is described in
[0013]
[Patent Document 1]
Japanese Patent No. 3254672
[Patent Document 2]
JP 2001-236191 A
[Patent Document 3]
JP 2001-332187 A
[0014]
[Problems to be solved by the invention]
The present invention has been made in view of the above-described circumstances. In any case, it is possible to perform optimum correction processing by holding attribute information in units of one or a plurality of pixels for a developed bitmap image. It is another object of the present invention to provide an image processing apparatus that develops attribute information in a memory at a high speed and reduces the amount of data to effectively use the memory.
[0015]
[Means for Solving the Problems]
The present invention relates to an image processing apparatus and an image processing method for creating a bitmap image based on an input drawing command, and performing a rendering process based on intermediate code image data generated from the drawing command or the drawing command by a drawing unit. A bitmap image and attribute information are generated, the bitmap image is stored in the image storage means together with the attribute information, and the bitmap image is subjected to correction processing according to the attribute information. Valid / invalid information indicating whether or not to use single attribute information set for each drawing target graphic is held in the image data, and the valid / invalid information is valid at the time of rendering processing by the drawing means. If the image storage means uses the single attribute information, the attribute information is stored in the image storage means. And the attribute information is set in the image storage means using the attribute information added for each pixel or a plurality of pixels of the drawing target graphic. Is.
[0016]
In this way, processing according to single attribute information as in the prior art is performed by holding valid / invalid information indicating whether single attribute information is used in the rendering command or intermediate code image data. For example, when attribute information is added to the image data for each pixel, processing according to the added attribute information is also possible. At this time, since single attribute information can also be used, it is not necessary to have attribute information for each pixel for all drawing commands or intermediate code image data, and the amount of data can be reduced.
[0017]
In particular, when the storage area of the instruction storage means is insufficient when the drawing instruction or intermediate code image data is held in the instruction storage means, the drawing instruction or intermediate data stored so far in the instruction storage means by the fallback process The code image data is rendered and the bitmap image and attribute information are expanded in the image storage means, and a single drawing command or intermediate code image data including the address of the area where the bitmap image and attribute information is held is generated. As a result, the storage area of the instruction storage means can be secured. For the single drawing command or intermediate code image data generated at this time, the valid / invalid information is set to invalid so that the single attribute information is not used. As a result, even when a graphic having a plurality of attributes is drawn during the rendering process, the attribute information of the graphic can be reflected as it is, and when the correction process is performed on the bitmap image, Optimal processing can be performed. Therefore, the image quality can be improved.
[0018]
The decompressed bitmap image and attribute information can be reduced or compressed into a compressed code, for example, in order to reduce the data amount. When compressing, different compression methods can be applied to each of the bitmap image and the attribute information. It is desirable to use a reversible method for compressing attribute information.
[0019]
Further, it is desirable that the drawing unit and the correction processing unit are configured with dedicated circuits. As an output destination of the image processing apparatus of the present invention, for example, a printing apparatus is assumed. However, the printing apparatus has various restrictions such as the need to supply a continuous bitmap image. It may be configured by a dedicated circuit so as to satisfy such restrictions. In addition, the time required for drawing and correction processing can be shortened.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a functional block diagram showing an embodiment of the present invention. In the figure, 1 is a host processing device, 2 is an image processing device, 3 is a printing device, 11 is an intermediate code generation unit, 12 is an intermediate code memory, 13 is an intermediate code image data development unit, 14 is a band buffer, and 15 is a correction. A
[0021]
The
[0022]
The
[0023]
The intermediate code image
[0024]
The intermediate code image
[0025]
The single intermediate code image data generated at this time is set not to use single attribute information as valid / invalid information. During the fallback process, there is a possibility that a figure having a plurality of attributes is drawn. Therefore, the developed bitmap image does not always have a single attribute. By setting the valid / invalid information so that the single attribute information is not used, the attribute information developed during the fallback process is displayed when rendering is performed based on the generated single intermediate code image data. It can be reflected as it is.
[0026]
Note that the bitmap image and the attribute information developed by the fallback process performed by the intermediate code image
[0027]
The
[0028]
The
[0029]
The
[0030]
FIG. 2 is a more specific functional block diagram according to the embodiment of the present invention. In the figure, 21 is an input control unit, 22 is a drawing command interpretation unit, 23 is an intermediate code image data generation unit, 31 is an intermediate code image data interpretation unit, 32 is a compression / decompression processing unit, 33 is a reduction / enlargement processing unit, 41 is a color conversion unit, and 42 is a point plane conversion unit. Solid arrows indicate the flow of data, and broken arrows indicate the flow of control.
[0031]
In this example, the intermediate
[0032]
The
[0033]
FIG. 3 is an explanatory diagram of an example of intermediate code image data of an image. Here, an example of the format of the intermediate code image data for the drawing object is shown. Examples of drawing objects include graphics, fonts, and images. Of these, graphics and fonts can be expressed only with intermediate code image data, but in the case of images (including reduced / compressed images), intermediate code image data and images (including reduced / compressed images). It consists of two. FIG. 3A shows the format of intermediate code image data in the case of drawing objects other than images, such as graphics and fonts, and FIG. 3B shows the format of intermediate code image data in the case of images. Yes.
[0034]
In any drawing object, the intermediate code image data includes a header part and a body part. The header portion includes a command ID, an attribute information field, and other information. When the drawing object is an image, an address at which an image (including a reduced / compressed image) exists is further displayed as “image pointer”. ”And associate with the image. In the body portion, information for specifying a drawing area created from the edge information passed from the drawing command interpretation unit 22, for example, run length information is held.
[0035]
Here, in the attribute information field, conventionally, attribute information indicating the drawing object passed from the drawing command interpreter 22 is set. In this example, valid / invalid information is set in the attribute information field together with this attribute information. The attribute information set in the attribute information field is information indicating a single attribute in the intermediate code image data. That is, if the drawing object is an image, this indicates that the common attribute “image” is applied to the entire image. In the case of graphics and fonts, it is guaranteed that the drawing object is the same in all the drawing areas. However, in the case of an image (including a reduced / compressed image), there is no guarantee that it is only an image. For some reason, a plurality of drawing objects such as fonts and graphics may be handled as an image in a developed state. For example, there is a case where the above-described fallback processing is performed, and a case where an image with an attribute specified from the
[0036]
The intermediate code image data format of the present invention has valid / invalid information in order to solve the above problems. This valid / invalid information indicates whether or not to use single attribute information set in the attribute information field in the intermediate code image data described above. When this valid / invalid information indicates that it is valid, single attribute information in the attribute information field is used. If the valid / invalid information indicates invalidity, the single attribute information in the attribute information field is not used, for example, attribute information added to the image is used.
[0037]
In the example shown in FIG. 3, valid / invalid information is also stored in the attribute information field. As a specific example, when the size of the attribute information field is 8 bits, the attribute information is expressed by lower 4 bits (for example, graphics = 1, font = 2, image = 3, etc.), and valid / invalid information by the upper 4 bits. (For example, valid = 0, invalid = 0xf0). The logical sum of this attribute information and valid / invalid information is stored in the attribute information field. Of course, it is needless to say that the present invention is not limited to this specific example, and it is sufficient that valid / invalid information of 1 bit or more is included in the intermediate code image data.
[0038]
In the case of the intermediate code image data of the image shown in FIG. 3B, the location where the image exists is indicated by the pointer to the image as described above. The image at this time is only an image as shown in FIG. 3C when the valid / invalid information is set to valid. However, when the valid / invalid information is set to invalid, as shown in FIG. 3D, the image includes attribute information associated with one or more pixels of the image.
[0039]
In this way, when a drawing object having a plurality of attributes such as fonts and graphics is treated as an image for some reason, it is set as invalid as valid / invalid information in the attribute information field, and Attribute information for each one or a plurality of pixels is added to an image (including a reduced / compressed image) indicated by a pointer to the image stored in the header portion of the intermediate code image data. As a result, the attribute information for each pixel can be reliably held, and the
[0040]
Returning to FIG. 2, the intermediate code image
[0041]
Note that the bitmap image and attribute information drawn by the fallback process are stored in the
[0042]
The compression /
[0043]
When the object to be drawn is an image, the reduction / enlargement processing unit 33 reduces or enlarges the image according to the enlargement ratio in the intermediate code image data stored in the
[0044]
The color conversion unit 41 of the
[0045]
When storing the bitmap image in the
[0046]
Note that all or part of the intermediate code image
[0047]
FIG. 4 is a flowchart showing an example of the overall processing in the embodiment of the present invention. For example, in a print system in which a
[0048]
When a series of drawing commands is received or in parallel with the reception of the drawing commands, the drawing command interpretation unit 22 and the intermediate code image
[0049]
The image
[0050]
In S54, intermediate code image data is generated for a portion to be drawn in the band being processed among the objects drawn by the drawing command. In S55, it is determined whether or not to enable the attribute information field. For this determination, for example, when the drawing object is an image, it is only necessary to determine whether or not attribute information is added to one or more pixels together with the image. Separately, if no attribute information is added, the single attribute information may be applied, and in S56, it is set in the attribute information field that the single attribute information is valid as valid / invalid information. If attribute information is added, the added attribute information is used, and in S57, setting is made to invalidate a single attribute information as valid / invalid information.
[0051]
The intermediate code image data generated by the intermediate code image
[0052]
If there is not enough free space to store the intermediate code image data generated by the intermediate code image
[0053]
In this way, when intermediate code image data for one band is generated for a certain drawing command and stored in the
[0054]
In S62 to S64, the intermediate code image
[0055]
After performing the rendering process in S63 for all the bands in this way, it is determined whether or not real-time output has been performed in S65. If real-time output is being performed, output has already been completed, so this processing ends.
[0056]
If real-time output is not performed, in S66 to S68, decompression and output processing in S67 are sequentially performed for all bands. That is, when real-time output is not performed, the bitmap image and attribute information generated for each band as described above are compressed and stored in the
[0057]
Note that the series of operations described above outputs, for example, a bitmap image for one page. For example, when outputting a bitmap image of a plurality of pages, the processing shown in FIG. 4 is performed for each page. Just do it every time.
[0058]
FIG. 5 is a flowchart showing an example of fallback processing according to the embodiment of the present invention. The outline of the fallback process is that all intermediate code image data of a certain band is temporarily expanded in a band buffer, and a single intermediate code image data for a bitmap image expanded in the band buffer is generated to generate intermediate code image data. The shortage of the holding area is solved. Here, description will be made assuming that fallback processing is performed on intermediate code image data for one band. Of course, it is also possible to perform fallback processing for a plurality of bands by repeating the following processing.
[0059]
The process between S71 and S81 is executed for each of the intermediate code image data corresponding to the band on which the fallback process is performed. In S72, it is determined whether or not the intermediate code image data is intermediate code image data (image system) for drawing an image. This determination can be made based on the command ID or attribute information. In the case of intermediate code image data other than image data, in S79, the attribute information in the attribute information field in the intermediate code image data is used as attribute information, and the drawing process to the
[0060]
Also, for image-based intermediate code image data, if the image to be rendered in S73 is compressed data, the compression /
[0061]
Here, it is determined whether the validity / invalidity information of the intermediate code image data being processed is valid, that is, whether or not the setting is to use the attribute information in the attribute information field in the intermediate code image data. If the valid / invalid information is valid, the attribute information in the attribute information field in the intermediate code image data is used as the attribute information in S79. If invalid, the attribute information added to the image is used in S78. And In S80, the drawing process to the
[0062]
By performing such processing for each of the intermediate code image data for one band, the
[0063]
Here, the valid / invalid information is not determined for intermediate code image data other than the image system, but of course, the valid / invalid information may also be determined for intermediate code image data other than the image system.
[0064]
When the drawing to the
[0065]
When performing these processes, in this example, the bitmap image is processed for each color component, and the loop of S82 to S89 is executed four times for the color components R, G, B and attribute information. For example, it is assumed that the drawing is performed in the
[0066]
In S83, it is determined whether or not the image is to be reduced. If the image is to be reduced, the reduction / enlargement processing unit 33 performs reduction (or enlargement) processing in S84. In S85, it is determined whether or not compression is performed, and in the case of compression, it is determined in S86 whether or not a reversible compression method is used as the compression method. If not compressed, the process for the color component or attribute information is finished, and the process moves to the process for the next color component or attribute information. If compression processing is performed and the lossless compression method is selected, the compression /
[0067]
After each color component and attribute information of the bitmap image is reduced or compressed as necessary, one intermediate code image data is generated for the bitmap image developed in the
[0068]
The intermediate code image data and the bitmap image generated in this way are stored in the
[0069]
FIG. 6 is a schematic diagram of an example of a data format when attribute information is added to a bitmap image. FIG. 6A shows an RGB frame sequential bitmap image, which is composed of an image plane composed of color components R, an image plane composed of color components G, and an image plane composed of color components B. At the same time, an attribute information plane is provided, and the attribute information of the pixel is arranged at the same position as each pixel position in the R, G, and B image planes.
[0070]
FIG. 6B shows a case where a reduction process is performed in the fallback process shown in FIG. 5 with respect to the bitmap image and attribute information of such a data format. Here, a case where the data is reduced to ½ by thinning processing is shown, and even pixel data is thinned out from each image plane and attribute information plane. Of course, the reduction processing method and reduction ratio are arbitrary.
[0071]
Further, when compressing the bitmap image and attribute information of the data format shown in FIG. 6A or 6B, the image plane and attribute information plane are also compressed. As a result, as shown in FIG. 6C, an R component compressed code, a G component compressed code, a B component compressed code, and an attribute information compressed code are generated.
[0072]
FIG. 7 is a schematic diagram of another example of a data format when attribute information is added to a bitmap image. FIG. 6 shows the case of frame sequential, but FIG. 7 shows the case of a dot sequential bitmap image. In the case of dot sequential, all the color component data (R component data, G component data, B component data) is included as data for each pixel. Therefore, as shown in FIG. 7A, the attribute information may be added for each pixel. As a result, four pieces of R component data, G component data, B component data, and attribute information are held for each pixel.
[0073]
FIG. 7B shows a case where a reduction process is performed on the bitmap image and attribute information of such a data format in the fallback process shown in FIG. 5 described above. Here, a case where the data is reduced to ½ by thinning processing is shown, and even pixel data is thinned out from each image plane and attribute information plane. Of course, the reduction processing method and reduction ratio are arbitrary.
[0074]
Further, when compressing the bitmap image and attribute information of the data format shown in FIG. 7A or FIG. 7B, the attribute information is separated, and the RGB bitmap image and the attribute information are separated separately. Compress it. Various methods are known as compression methods for RGB bitmap images, and the format differs depending on each compression method. In addition, when the attribute information is separated, a compression method different from the RGB bitmap image can be applied. For example, when an irreversible compression method is applied to an RGB bitmap image, a lossless compression method can be applied to attribute information. By such processing, as shown in FIG. 7C, a compression code for the RGB bitmap image and a compression code for the attribute information are respectively generated.
[0075]
As described with reference to FIG. 4, all rendering commands transmitted from the
[0076]
FIG. 8 is a flowchart illustrating an example of rendering processing. Here, rendering processing for one band is shown, and this rendering processing is repeatedly executed for each band in S62 and S64 of FIG.
[0077]
First, in S101, the presence / absence of intermediate code image data is determined. If there is intermediate code image data to be rendered, the intermediate code image data is rendered in the
[0078]
When all the intermediate code image data for one band is drawn, the process proceeds from S101 to S111. In S111, it is determined whether the color space of the drawn bitmap image matches the color space of the output bitmap image. If they match, the color space conversion process is unnecessary, and the process proceeds to the next S113. If the color spaces do not match, in S112, the color conversion unit 41 performs a color space conversion process to the color space of the output bitmap image. For example, when the color space of the drawn bitmap image is the RGB color space and the color space of the output bitmap image is the CMYK color space, conversion processing from the RGB color space to the CMYK color space is performed. At this time, according to the attribute information added to the bitmap image, it is possible to perform the optimum color space conversion processing for each attribute figure. For example, it is possible to perform color space conversion processing for the purpose of faithful color reproduction for the image portion, and color space conversion processing with an emphasis on distinguishability for the character portion or the like. Of course, what kind of color space conversion processing is performed according to the attribute information is arbitrary.
[0079]
In addition, although color space conversion processing is shown here as an example, of course, in addition to this, image processing such as color adjustment, gamma adjustment of each color component, and other various filtering processing, as well as attribute information as necessary Can be used.
[0080]
In S113, it is determined whether or not the data format (dot sequential or frame sequential) of the bitmap image stored in the
[0081]
In this manner, after various processing is performed on the bitmap image stored in the
[0082]
If real-time output is not performed, the bitmap image stored in the
[0083]
Whether or not to perform real-time output can be determined by whether or not the processing time required for the above-described rendering processing in units of bands, color conversion processing, and point plane conversion processing is in time for the output time of the
[0084]
In the above description, the case where the
[0085]
【The invention's effect】
As is clear from the above description, according to the present invention, it is possible to set valid / invalid information indicating whether or not to use single attribute information held by a rendering command or intermediate code image data. It is possible to handle an image or the like to which attribute information is added for each one or a plurality of pixels, and it is possible to hold attribute information for all pixels even when a fallback process occurs. As a result, the correction processing according to the attribute information can be performed accurately, and the image quality can be guaranteed. For example, when printing is performed by a printing device based on the output bitmap image, the print quality can be guaranteed. Also, if attribute information is always held for one or more pixels, the amount of data increases and a large amount of memory is required. However, it is possible to switch between drawing commands or single attribute information in intermediate code image data. Thus, the amount of data for attribute information is not increased unnecessarily, and the memory can be used effectively. Furthermore, since the processing for valid / invalid information is not so complicated, the drawing means and the correction processing means can be configured by a dedicated circuit, and high-speed processing is possible.
[Brief description of the drawings]
FIG. 1 is a functional block diagram showing an embodiment of the present invention.
FIG. 2 is a more specific functional block diagram according to the embodiment of the present invention.
FIG. 3 is an explanatory diagram of an example of intermediate code image data of an image.
FIG. 4 is a flowchart illustrating an example of overall processing according to an embodiment of the present invention.
FIG. 5 is a flowchart showing an example of fallback processing according to the embodiment of the present invention.
FIG. 6 is a schematic diagram illustrating an example of a data format when attribute information is added to a bitmap image.
FIG. 7 is a schematic diagram of another example of a data format when attribute information is added to a bitmap image.
FIG. 8 is a flowchart illustrating an example of rendering processing.
[Explanation of symbols]
DESCRIPTION OF
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003074519A JP4400709B2 (en) | 2003-03-18 | 2003-03-18 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003074519A JP4400709B2 (en) | 2003-03-18 | 2003-03-18 | Image processing apparatus and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004276537A JP2004276537A (en) | 2004-10-07 |
JP4400709B2 true JP4400709B2 (en) | 2010-01-20 |
Family
ID=33290126
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003074519A Expired - Fee Related JP4400709B2 (en) | 2003-03-18 | 2003-03-18 | Image processing apparatus and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4400709B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4363371B2 (en) | 2005-07-08 | 2009-11-11 | ブラザー工業株式会社 | Image forming data generation apparatus, method thereof, and program thereof |
JP4636145B2 (en) * | 2008-09-03 | 2011-02-23 | 富士ゼロックス株式会社 | Image processing apparatus and program |
JP4868026B2 (en) * | 2009-05-26 | 2012-02-01 | コニカミノルタビジネステクノロジーズ株式会社 | Image processing apparatus, image forming apparatus, and program |
JP2016052110A (en) * | 2014-09-02 | 2016-04-11 | コニカミノルタ株式会社 | Image processing method, image forming method, image processing apparatus, and image forming apparatus |
-
2003
- 2003-03-18 JP JP2003074519A patent/JP4400709B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2004276537A (en) | 2004-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3454552B2 (en) | Method and system for generating data for generating a page representation on a page | |
JP4400709B2 (en) | Image processing apparatus and image processing method | |
JPH08278862A (en) | Image output device and image processing method | |
JP2008042345A (en) | Image processing method and image processor | |
JP3685234B2 (en) | Image processing device | |
JP2001219601A (en) | Print controller and data processing method thereof | |
JP3211417B2 (en) | Page description language processor | |
JP3695498B2 (en) | Image processing device | |
JP6882099B2 (en) | Image processing equipment, image processing methods and programs | |
JP2817856B2 (en) | Image processing device | |
JP2001169120A (en) | Method, device, and system for image processing | |
JP2011053263A (en) | Image processing device, image processing method, image output system, program and recording medium | |
JP3581470B2 (en) | Data processing method in page printer and page printer | |
JP3211545B2 (en) | Image processing device | |
US10192282B2 (en) | Information processing device, image processing apparatus, and information processing method for high-speed translucency calculation | |
JP3204136B2 (en) | Image processing apparatus and compression processing method | |
JP2004334533A (en) | Image processing device and method | |
JP3496384B2 (en) | Image output device | |
JP4379571B2 (en) | Image processing apparatus and image processing method | |
JP2004254187A (en) | Information processor | |
JP3066906B2 (en) | Image processing device | |
JP2005038084A (en) | Method and device for converting drawing data | |
JP3624155B2 (en) | Image compression apparatus, image compression method, and information processing system | |
JP3495877B2 (en) | Printer control system, printer control device and their methods | |
JP3214617B2 (en) | Multi-value image printer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060221 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090715 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090910 |
|
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: 20091007 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20091020 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121106 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121106 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131106 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |