JP4185751B2 - Image processing apparatus, image processing method, and computer program - Google Patents

Image processing apparatus, image processing method, and computer program Download PDF

Info

Publication number
JP4185751B2
JP4185751B2 JP2002291430A JP2002291430A JP4185751B2 JP 4185751 B2 JP4185751 B2 JP 4185751B2 JP 2002291430 A JP2002291430 A JP 2002291430A JP 2002291430 A JP2002291430 A JP 2002291430A JP 4185751 B2 JP4185751 B2 JP 4185751B2
Authority
JP
Japan
Prior art keywords
color
index
value
highlight
output corresponding
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
JP2002291430A
Other languages
Japanese (ja)
Other versions
JP2004128975A (en
JP2004128975A5 (en
Inventor
茂 坂本
尚 石川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2002291430A priority Critical patent/JP4185751B2/en
Publication of JP2004128975A publication Critical patent/JP2004128975A/en
Publication of JP2004128975A5 publication Critical patent/JP2004128975A5/ja
Application granted granted Critical
Publication of JP4185751B2 publication Critical patent/JP4185751B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Ink Jet (AREA)
  • Particle Formation And Scattering Control In Inkjet Printers (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、多値のカラー輝度信号からそれより低い階調数のカラー濃度制御信号を生成するための画像処理装置、画像処理方法、コンピュータプログラム及びコンピュータ読み取り可能な記憶媒体に関し、特にインクジェットプリンターなどの面積階調を用いた出力機器に好適な画像処理装置、画像処理方法、コンピュータプログラム及びコンピュータ読み取り可能な記憶媒体に関するものである。
【0002】
【従来の技術】
インクジェットプリンターなどの面積階調を用いたカラープリンターにおける画像処理装置は、通常、多値の輝度信号を多値の濃度制御信号に変換するための色変換手段、多値の濃度制御信号からそれより少ない階調数の信号(インデックス出力)に変換するためのハーフトーニング手段、及び、得られたインデックス出力をビットマップ化してプリンターエンジンのドットパターンに変換するためのビットマップ化手段から構成されている。
【0003】
また、その後段には、変換されたドットパターンを読み込んでプリンター固有のフォーマットに変換し、その信号に基づいて印字制御を行う印字制御手段が接続されている。例えばインクジェットプリンターにおける印字制御部の機能は、ビットマップ化手段から供給されたドットパターンを、印字ヘッドノズルの物理的な配置に置き換えながら、信号に応じてノズルをオンオフし、インクの吐出を制御することである。
【0004】
近年、プリンターの高精度化と高画質化に伴い、上述した画像処理装置にも、高精度化が求められている。このような要求から、色変換手段には、3次元LUT(Look-Up Table)と補間演算とを組み合わせた方式が、また、ハーフトーニング処理には、誤差拡散法を用いた方式が、それぞれ主流となっている。更に、プリンターの高速化に対応するために、これらの装置をハードウエアで構成する必要性にも迫られている。
【0005】
上述した装置をハードウエアで構成する場合、出力色毎に所定のバンドに区切ってそのバンド内部ではストールすることなく逐次処理してゆく構成をとるのが一般的である。しかしながら、このような構成では、輝度入力からインデックス出力(或いはビットマップ出力)までを一気に作成してしまうので、ある処理の途中段階で他の色の情報を用いることが出来ない。
【0006】
さて、面積階調を用いたインクジェットプリンターなどの画像処理装置における良く知られた欠点として画像の粒状化がある。この現象は、この種のプリンターの出力が原理的に微小画素のオンオフのみで決定されることに起因している。近年のインクジェットプリンターにおけるインク吐出制御技術の進歩により、より微小なドットの形成が可能になり、それに応じてプリンターの解像度があがるため、粒状化に起因する画質の悪化はかなり改善されてきているが、ドットの空間的な配置がまばらになるハイライト領域では、やはり粒状性の悪化は避けられない現象である。
【0007】
この現象を回避する技術が、例えば、特許文献1に述べられている。この公報によれば、誤差拡散処理を行う際に、全ての色を独立に処理するのではなく、シアンとマゼンタの処理では双方の和を入力として用い、通常2値の出力系であれば、それを3値として扱い、真中の状態では、シアン、マゼンタのどちらか一方だけを出力することで、両色が同じ位置に重なりにくくする処理を行っている。こうすることで、ハイライト領域における出力ドットの空間周波数をあげて粒状性の悪化を防ぐと共に、階調も保存されることになる。また、これと似た効果を持つ他の技術が特許文献2に開示されている。この公報に記載の方式では、シアンとマゼンタを同時に処理する際に、ハイライト部ではあらかじめドットの分散性が確保されたディザマトリックスを用いてディザ処理を行い、かつ各色が重ならないように制御することで、前記方式と同様の効果を狙っている。
【0008】
【特許文献1】
特開平8−279920号公報
【0009】
【特許文献2】
特開平2000−184215号公報
【0010】
【発明が解決しようとする課題】
しかしながら、上述した2つの先行技術では、ハーフトーニング処理において2つの色を同時に処理する必要がある。この構成をハードウエアを用いて実現して高速化を図ろうとすると、非常にコストが高いものとなる。何故ならば、もし、システムのストールを排除して高速化を達成しようとすると、ハーフトーニング処理の前段にある色変換処理も2色以上の処理を同時に行わなければならない。もし、色変換処理が前述した補間演算方式で構成されていると仮定すると、2色以上のテーブルを格納するSRAM及び並列動作する複数の演算回路が必要となってしまうという問題がある。
【0011】
また、同様の理由から、ハーフトーニング手段に誤差拡散方式を用いた場合、誤差を保持しておくための誤差バッファーを形成するために、2色分のSRAMが必要になってしまうという問題がある。
【0012】
一方、2色同時処理を行わずに高速化を図ろうとすれば、必然的に動作クロックを上げなければならず、システムの複雑化と素子の高性能化が要求される。従ってコストの上昇は避けられないものとなるという問題がある。
【0013】
本発明はこのような問題に鑑みてなされたものであり、その目的とするところは、インクジェットプリンターなどの面積階調を用いた出力機器における画質を向上させるための低コストな画像処理装置、画像処理方法、コンピュータプログラム及びコンピュータ読み取り可能な記憶媒体を提供することにある。
【0014】
【課題を解決するための手段】
このような目的を達成するために、請求項1に記載の発明は、多値のカラー輝度信号を、2値または多値のカラー濃度制御信号へ変換する画像処理装置であって、前記カラー輝度信号の入力値がハイライト領域に属するかどうかを検出するハイライト検出手段と、該ハイライト検出手段による検出の結果、前記入力値がハイライト領域に属する場合には、第1の色に対応した濃度出力用のテーブルの格子点値と第2の色に対応した濃度出力用のテーブルの格子点値との和からなる格子点値を有するテーブルを用いて補間演算を行い、前記入力値がハイライト領域に属さない場合には、前記第1の色に対応した濃度出力用のテーブルを用いて補間演算を行い、前記入力値を濃度出力に変換する色変換手段と、該色変換手段により変換された濃度出力を誤差拡散処理して、2値または多値のインデックス出力を求めるハーフトーニング手段と、該ハーフトーニング手段により求められたインデックス出力のうち、前記第1の色に対応したインデックス出力と、前記第1及び第2の色の和に対応したインデックス出力とを比較して、該第1及び第2の色の和に対応したインデックス出力を整形する手段とを備え、前記整形する手段は、前記第2の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換元画素数として記録し、前記インデックス値を0に置き換える第1の手段と、前記第1の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内部を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換先候補画素数として記録し、該画素の位置を置換先座標として記録する第2の手段と、前記置換元画素数及び置換先候補画素数のうち小さい方を置換可能画素数として記録する第3の手段と、乱数を用いて、前記置換可能画素数と等しい数の置換先座標を求める第4の手段と、前記置換先座標にある前記第1の色に対応したインデックス出力を0にして、前記第2の色に対応したインデックス出力を1にする第5の手段とを備えたことを特徴とする。
【0016】
また、請求項に記載の発明は、請求項に記載の画像処理装置において、前記ハイライト検出手段は、前記第1及び第2の色の補色成分である2つの輝度信号成分の各々に対応した2つの境界値と、単色処理領域であることを示す他の1つの境界値を有し、前記2つの境界値の各々と、対応する前記入力値とを比較し、全ての入力値が対応する前記境界値より大きいかどうかを判別する第1の手段と、前記第1及び第2の色の補色成分である2つの輝度値を255からそれぞれ減算して2つの値を求め、該2つの値の差の絶対値が前記他の1つの境界値より小さいかどうかを判別する第2の手段と、前記第1の手段及び前記第2の手段の判別結果が共に真であったときに、前記入力値がハイライト領域に属することを決定する第3の手段とを備えたことを特徴とする。
【0017】
また、請求項に記載の発明は、請求項に記載の画像処理装置において、前記色変換手段は、前記ハイライト検出手段の検出結果に基づき、前記入力値がハイライト領域に属すると判断された場合は、前記入力値により定義される空間において、前記第1及び第2の色の補色成分を表す2軸で構成される平面に射影された正方形が、最もハイライト側に位置するような立方体頂点の格子点値の和を用いて補間演算を行うことを特徴とする。
【0019】
また、請求項に記載の発明は、多値のカラー輝度信号を、2値または多値のカラー濃度制御信号へ変換する画像処理装置の画像処理方法であって、前記カラー輝度信号の入力値がハイライト領域に属するかどうかを検出するステップと、該検出の結果、前記入力値がハイライト領域に属する場合には、第1の色に対応した濃度出力用のテーブルの格子点値と第2の色に対応した濃度出力用のテーブルの格子点値との和からなる格子点値を有するテーブルを用いて補間演算を行い、前記入力値がハイライト領域に属さない場合には、前記第1の色に対応した濃度出力用のテーブルを用いて補間演算を行い、前記入力値を濃度出力に変換するステップと、該変換された濃度出力を誤差拡散処理して、2値または多値のインデックス出力を求めるステップと、該求められた前記第1の色に対応したインデックス出力と、前記第1及び第2の色の和に対応したインデックス出力とを比較して、該第1及び第2の色に対応したインデックス出力を整形するステップとを備え、前記整形するステップは、前記第2の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換元画素数として記録し、前記インデックス値を0に置き換える第1のステップと、前記第1の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内部を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換先候補画素数として記録し、該画素の位置を置換先座標として記録する第2のステップと、前記置換元画素数及び置換先候補画素数のうち小さい方を置換可能画素数として記録する第3のステップと、乱数を用いて、前記置換可能画素数と等しい数の置換先座標を求める第4のステップと、前記置換先座標にある第1の色に対応したインデックス出力を0にして、前記第2の色に対応したインデックス出力を1にする第5のステップとを備えたことを特徴とする。
【0021】
また、請求項に記載の発明は、請求項に記載の画像処理方法において、前記検出するステップは、前記第1及び第2の色の補色成分である2つの輝度信号成分の各々に対応した2つの境界値の各々と、対応する前記入力値とを比較し、全ての入力値が対応する前記境界値より大きいかどうかを判別する第1のステップと、前記第1及び第2の色の補色成分である2つの輝度値を255からそれぞれ減算して2つの値を求め、該2つの値の差の絶対値が、単色処理領域であることを判別するための他の1つの境界値より小さいかどうかを判別する第2のステップと、前記第1及び第2のステップの判別結果が共に真であったときに、前記入力値がハイライト領域に属することを決定する第3のステップとを備えたことを特徴とする。
【0022】
また、請求項に記載の発明は、請求項に記載の画像処理方法において、前記変換するステップは、前記検出の結果、前記入力値がハイライト領域に属すると判断された場合は、前記入力値により定義される空間において、前記第1及び第2の色の補色成分を表す2軸で構成される平面に射影された正方形が、最もハイライト側に位置するような立方体頂点の格子点値の和を用いて補間演算を行うことを特徴とする。
【0024】
また、請求項に記載の発明は、コンピュータプログラムであって、多値のカラー輝度信号を、2値または多値のカラー濃度制御信号へ変換する画像処理装置に実行させるコンピュータプログラムであって、前記カラー輝度信号の入力値がハイライト領域に属するかどうかを検出するステップと、該検出の結果、前記入力値がハイライト領域に属する場合には、第1の色に対応した濃度出力用のテーブルの格子点値と第2の色に対応した濃度出力用のテーブルの格子点値との和からなる格子点値を有するテーブルを用いて補間演算を行い、前記入力値がハイライト領域に属さない場合には、前記第1の色に対応した濃度出力用のテーブルを用いて補間演算を行い、前記入力値を濃度出力に変換するステップと、該変換された濃度出力を誤差拡散処理して、2値または多値のインデックス出力を求めるステップと、該求められたインデックス出力のうち、前記第1の色に対応したインデックス出力と、前記第1及び第2の色の和に対応したインデックス出力とを比較して、前記第1及び第2の色の和に対応したインデックス出力を整形するステップとを備え、前記整形するステップは、前記第2の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換元画素数として記録し、前記インデックス値を0に置き換える第1のステップと、前記第1の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内部を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換先候補画素数として記録し、該画素の位置を置換先座標として記録する第2のステップと、前記置換元画素数及び置換先候補画素数のうち小さい方を置換可能画素数として記録する第3のステップと、乱数を用いて、前記置換可能画素数と等しい数の置換先座標を求める第4のステップと、前記置換先座標にある第1の色に対応したインデックス出力を0にして、前記第2の色に対応したインデックス出力を1にする第5のステップとを備えることを特徴とする。
【0027】
本発明では、ハイライト検出手段、色変換手段、ハーフトーニング手段、バンドバッファー及びビットマップ化手段から構成されるので、入力からバンドバッファーに至る一連の処理を各出力色毎に高速に行える。
【0028】
ハイライト検出手段は、入力信号がハイライト領域にあるかどうかを判別してその結果を出力し、色変換手段は、第1の濃度の処理を行うときに、ハイライト検出手段での検出結果に応じて、第1の濃度に対応した単色のテーブルかまたは、それと別の第2の濃度に対応したテーブルとの和を保持するテーブルを切り替えて使う。
【0029】
再配置化手段或いはハーフトーニング手段は、第2の濃度の処理を行う際に、第1の濃度のバンドバッファー出力及びハイライト検出手段出力を参照して、ハイライト領域では、2色がなるべく重ならず、かつ階調性を保てるように第2の濃度の出力処理を行い、かつ第1の濃度のバンドバッファー出力を調整する。
【0030】
このような構成により、インクジェットプリンターなどの面積階調を用いた出力機器における画質を向上させるための低コストな画像処理装置を提供することが可能となる。
【0031】
【発明の実施の形態】
(第1実施形態)
本発明の第1実施形態は、画像処理装置として比較的高解像度のインクジェットプリンターを用いた場合について想定したものである。また、出力色はC,M,Y,Kの4色であるものとする。以下、図面を参照しながら説明する。
【0032】
本実施形態に係る画像処理装置の構成を図1に示す。同図においてCPU101は全体の処理を制御するものであり、画像データ読み込み手段102は画像データバッファー115からCPU101による制御の下で画像データを読み込むためのものである。γ変換手段103は入力された輝度データ(R,G,B)の入力γ特性を変換するためのものであり、ハイライト検出手段104は入力されたデータがハイライト領域に属するかどうかを検出するためのものである。
【0033】
色変換テーブル読み込み手段105はCPU101による制御の下で色変換テーブルバッファー116から所望の色変換テーブルを読み込むためのものであり、色変換手段106は入力された輝度データを濃度データに変換するためのものである。本画像処理装置における色変換手段106は、3次元LUTと補間演算とを用いて色変換を行う構成になっている。補間方式としては、公知のものが複数知られており、ここでは詳細な限定は行わないが、基本的にどのような方式にも対応可能である。
【0034】
ハーフトーニング手段107は入力された濃度データを二値化するためのものであり、インデックス・フラグ合成手段109はハーフトーニング手段から出力されたインデックス出力とハイライト検出手段から出力されたフラグとを合成するためのものである。インデックスバンド書き込み手段108はインデックス・フラグ合成手段109から出力された合成出力をCPU101の制御の下でインデックスバンドバッファー117へ書き込むためのものである。
【0035】
ウインドウバッファー制御手段120はインデックスバンドバッファー117から所定のフォーマットでデータを読み書きするためのものであり、インデックス・フラグ分離手段111はウインドウバッファー制御手段120から読み込まれたウインドウ成分からインデックスとフラグとを分離するためのものであり、CM再配置手段112は、インデックス・フラグ分離手段111から得られたフラグ及びインデックスから、CMのインデックスを整形する。
【0036】
インデックスバンド読み込み手段110は、CPU101による制御の下でインデックスバンドバッファー117からインデックスを読み込み、ビットマップ化手段119に送る。ビットマップ化手段119は、入力されたインデックス出力からビットマップを作成するためのものであり、ヘッド駆動手段113は、入力されたビットマップを基にプリンターヘッドの吐出制御を行うためのものである。プリンターエンジン114は、CPU101による制御の下で、ヘッド駆動制御手段113から出力された制御信号に基づき、印刷出力を行う。また、CPUバス118には、CPU制御が必要な全てのデバイスが、インターフェースを介して接続されている。画像データバッファー115、色変換テーブルバッファー116、インデックスバンドバッファー117は、それぞれが特定のデータを格納しておくためのバッファーであり、その実体はCPUバス118に接続されたRAMである。
【0037】
次に必要に応じて他の図面を参照しながら、この画像処理装置により実行される動作について説明する。尚、この画像処理装置を制御するためのプログラムは、CPUバス118に接続されたROMまたはRAMに格納されているものとする。
【0038】
本実施形態に係る画像処理装置は、図1におけるインデックスバンドバッファー117を境界にして左側のブロックと右側のブロックが並列に動作する。左側のブロックは、γ変換手段103、ハイライト検出手段104、色変換テーブル読み込み手段105、色変換手段106、ハーフトーニング手段107、インデックスバンド書き込み手段108、画像データバッファー115及び色変換テーブルバッファー116から構成されている。このような構成により、画像データバッファー115から読み出された輝度信号を色変換し、ハーフトーニング処理した後、インデックスバンドバッファー117へ格納する一連の処理を行う。
【0039】
また、右側のブロックは、インデックスバンド読み込み手段110、インデックス・フラグ分離手段111、CM再配置手段112、ヘッド駆動制御手段113、プリンターエンジン114、ビットマップ化手段119及びウインドウバッファー制御手段120にて構成され、インデックスバンドバッファー117から読み込まれたインデックスをビットマップ化し、プリンターエンジン114へ供給する処理を行う。以降の説明では、それぞれのブロックの動作について別々に述べることにする。
【0040】
まず、左側のブロックの動作について説明する。最初に図2のフローチャートを参照し、概略の処理シーケンスについて述べる。ステップS201及びステップS215をそれぞれ先端、終端とするループは、各出力色毎に処理が行われることを示している。ここでは一般的な場合として、プリンターがC,M,Y,Kの4つの色材を持っている場合を想定している。最初の出力色はCである。
【0041】
まず、ステップS202で出力色の判定が行われる。出力色がCであった場合は、ステップS203でハイライト検出手段104の状態を有効にすると共に検出用の境界パラメーターを設定する。次にステップS204で色変換テーブル読み込み手段105の読み込み方法をC用に設定すると共に、読み出し用のスタートアドレスを設定する。一方、出力色が他の色であった場合は、ステップS205及びステップS206において、ハイライト検出手段104の状態が無効に設定され、色変換テーブル読み込み手段105の読み込み方法がC以外の該当する色に設定されると共に、読み出し用のスタートアドレスも設定される。これらの設定は全て、対応するレジスターに所定の値を書き込むことで行われるものとする。
【0042】
次にステップS207では、色変換テーブル読み込み手段105のスタートフラグがアサートされて、色変換テーブルバッファー116の読み出し処理が開始される。ステップS208では、設定されたパラメーターに応じた読み込み処理が行われる。色変換テーブルバッファー116から色変換手段106へのデータ転送が終了すると、ステップS209において割り込み、或いはポーリングによる読み込み終了が検出される。
【0043】
次にステップS210では、インデックスバンド書き込み手段108に書き込みスタートアドレスが設定される。ステップS211では画像データ読み込み手段102に読み込みスタートアドレス及びデータ数が設定される。読み込みスタートアドレス及びデータ数は、バンドの高さに応じて変化する。これでハードウエアの設定処理が終わる。
【0044】
最後にステップS212でバンド処理のスタートフラグがアサートされて、一連のバンド処理が開始される。バンド処理が終了すると、ステップS214において、割り込み或いはポーリングを用いて終了が検出され、一色(1バンド)の処理が終わる。以上で概略シーケンスの説明を終わる。
【0045】
次に、ステップS208における色変換テーブル読み込み処理について説明する。図3は、色変換テーブル読み込み手段105及び色変換手段106の概略構成を表す。同図において、色変換テーブル302及び303は3次元LUTである。この内、302には非ハイライト領域における演算を行うためのデータが格納されており、303にはハイライト領域における演算を行うためのデータが格納されている。302は容量が大きいのでSRAMで構成されるのに対し、303は条件によってはレジスターで構成する事も可能である。
【0046】
また、図4は色変換テーブルバッファー116内部の格納イメージを示している。色変換テーブル読み込み手段105の読み込みモードがCyan用に設定されている場合、同時に設定された読み込みスタートアドレスは、図4におけるCyanStartAddressを指している。このとき、色変換テーブル読み込み手段105のリードエンドアドレスは、図4におけるCyanEndAddressに自動設定される。即ちCyanモードでは、設定されたスタートアドレスにあらかじめわかっているCyan用の3次元LUT容量+ハイライト領域用テーブル容量を足した値が色変換テーブル読み込み手段105のリードエンドアドレスに設定されるのである。
【0047】
この状態で画像処理装置が起動されると、色変換テーブル読み込み手段105は、CPUバス118を通じてまず通常のCyan変換用テーブルをロードしながら、内部バスをアクセスしてデータを非ハイライト領域変換用色変換テーブル302に格納する。あらかじめ設定してある非ハイライト領域変換用テーブルのロードが終了したら、内部バスの接続先をハイライト領域変換用テーブル303に切り変えて、ハイライト領域用のテーブル値を格納する。また読み込みモードCyan用でないときは、色変換テーブル読み込み手段105のリードエンドアドレスが、スタートアドレス+該当する色の3次元LUT容量に自動設定され、上述した様に通常の3次元LUTを読み込んで色変換テーブル302に格納する。以上でステップS208における色変換テーブル読み込み処理についての説明を終わる。
【0048】
次にステップS213におけるバンド処理について説明する。図5にバンド処理の動作を表すフローチャートを示す。同図において、ステップS501からステップS509で構成されるループ処理は、ステップS211で設定されたバンドの全てのデータに対して行われる。まずステップS502では、一画素の輝度データ(R,G,B)が画像データ読み込み手段102を通じて画像データバッファー115から読み込まれる。
【0049】
次にステップS503では、読み込まれたデータに対して入力γ変換が施される。この処理は、γ変換手段103における1次元LUTを用いた変換処理である。1次元LUTは、図2における処理が始まる以前に、システムを初期化する任意のタイミングで設定されているものとする。尚、1次元LUTの構成は、RGB各色毎にそれぞれ異なるテーブルを用いても同じテーブルを用いても構わない。
【0050】
次にステップS504ではハイライト検出処理が行われる。この処理は、ステップS203或いはステップS205で設定された条件に基づき、ハイライト検出手段104が行う。処理の内容は単純な大小比較である。ハイライト検出が有効なときは、前述した様にステップS203において境界値が設定されている。ハイライト検出手段104では、下記の2つの条件を満たせば入力値がハイライト領域に属すると判断する。
【0051】
Rh<RかつGh<G(1)
max(255-R,255-G)-min(255-R,255-G)<K (2)
ここに、Rh,Ghは2つの輝度信号成分の各々に対応した2つの境界パラメーター、Kは単色処理領域であることを判断するための他の1つの境界パラメーターであり、入力値の精度は8ビットであるものとする。2つの境界値Rh,Ghの各々と、対応する入力値とを比較し、全ての入力値が対応する境界値より大きいかどうかを判別する(1)の条件は、明らかにハイライト領域であるためのものである。一方、(2)の条件は、無関係のようにも見える。しかし、本実施形態の効果は、C+Mの2次色或いはC+M+Yの3次色に対してのみ現れるものであるから、CあるいはMどちらかの成分が殆ど0である場合には適用するべきではない。そこで、第1及び第2の色の補色成分である2つの輝度値を255からそれぞれ減算して2つの値を求め、2つの値の差の絶対値が境界値Kより小さいかどうかを判別する条件(2)によって、上記ケースへの適用を防いでいるのである。これらの条件が満たされたとき、ハイライト検出手段104は入力値がハイライト領域に属することを決定し、ハイライト検出フラグをアサートする。逆に、上記条件が満たされないとき、及びハイライト検出が無効なときは、ハイライト検出フラグをネゲートする。
【0052】
この処理は、全ての出力色(本実施形態では、CMYKの4色)に適用されるが、前述した通りハイライト検出処理が有効であるのは、出力色がCyanのときだけであり、他色のときは無効である。従って、ハイライト検出フラグがアサートされる可能性があるのは、Cyanについてのみであり、他色のときは、全てネゲートされることになる。
【0053】
次にステップS505では、色変換処理が行われる。ここでの処理の詳細については後述する。次にステップS506では、色変換処理から出力された多値の濃度データをそれより少ない階調数に落とすハーフトーニング処理が行われる。ここでの処理の詳細については後述する。
【0054】
次にステップS507ではステップS506で得られたインデックス出力とステップS504で得られたハイライト検出フラグの合成がインデックス・フラグ合成手段109にて行われる。ここでの処理方法は、インデックス出力の値数や、インデックスバンドバッファー117への書き込み時のデータパッキング手法などに応じて様々な最適化手法が考えられる。例えば、インデックス出力が5値である場合を考えると、3ビットあれば表現可能である。一方、ハイライト検出フラグは1ビットであるから、上位1ビットをハイライト検出フラグに割り当て、下位3ビットをインデックス出力に割り当てた4ビットの信号を生成すれば、合成が可能となる。いずれにせよ、実装に依存した最適な手法を用いれば良い。
【0055】
最後にステップS508では、インデックスバンドバッファー117への書き込み処理が行われる。この処理は、インデックスバンド書き込み手段108によって行われ、バンドデータは、インデックスバンドバッファー117に順次書き込まれてゆく。書き込み手法は、ステップS507に実装された方法に応じて様々なものが考えられる。例えば、上記例のように、インデックス出力とハイライト検出フラグの合成出力が4ビットで与えられるならば、2画素の出力をパッキングして1バイトのデータを生成し、これをアクセス単位としてバッファーを構成するRAMへアクセスすれば良い。以上で、図5を用いた一連のバンド処理の説明を終わり、次にステップS505における色変換処理とステップS506におけるハーフトーニング処理について説明する。
【0056】
まず、色変換処理について説明する。図6は、色変換処理を表すフローチャートである。この処理は、図1における色変換手段106にて行われる。また、その構成は、図3に示されている。まず、ステップS601において、ハイライト検出フラグがアサートされているかどうかがチェックされる。もし、ハイライト領域であるならば、ステップS602で補間演算手段304にハイライト領域変換用の格子点値が入力され、ハイライト領域でないならば、ステップS603に分岐し、非ハイライト領域変換用の格子点値が入力される。ここで問題となるのはハイライト領域をどのように定義するかということである。これは即ち(1)式のRh及びGhを決定する問題に帰着する。これは粒状性向上の効果と装置コストとのトレードオフで定まる。つまり、Rh、Ghが大きいほどハイライト領域変換用テーブルの容量が小さくなりコストが低下するのに対し、粒状性救済の範囲は狭まってゆく。最も効率の高い条件は、
Rh,Gh > 255*(N-2)/(N-1) (Nは格子点数)
を満たす場合であり、この時ハイライト領域変換用テーブルは、図7に示す立方体C0〜C5の各頂点における格子点値のみを保持していれば良い。実験によれば、比較的解像度の高いプリンターではこの条件を満たすことが確認されている。以後、本実施形態では、この条件が満たされているものとして議論を進める。
尚、ハイライト領域用の格子点値は、Cyan用に作成されたテーブルの格子点値とMagenta用に作成されたテーブルの格子点値の和をとったものである。
【0057】
非ハイライト領域用の格子点値とハイライト領域用の格子点値は、ステップS208の説明で述べた通り、それぞれ非ハイライト領域用色変換テーブル302とハイライト領域用色変換テーブル303に格納されている。ステップS601からステップS603で表される動作は、図3におけるセレクター305がハイライト検出フラグに応じて、補間演算手段304への格子点値送出経路を選択することで実現される。
【0058】
最後にステップS604では、得られた格子点値と入力値(RGB)を用いて補間演算を行い、多値の濃度値を出力する。このようにして、ハイライト検出手段104の検出結果に基づき、入力値がハイライト領域に属すると判断された場合に、入力値により定義される空間においてRG平面に射影された正方形が最もハイライト側に位置するような立方体頂点の格子点値の和を用いた補間演算が行われる。
【0059】
尚、補間演算手段304に実装される補間アルゴリズムは、入力空間を均等分割して構成される各立方体をそのまま補間空間として用いるものでも、或いは各立方体を更に複数の多面体に分割してそれを補間単位として用いるものでも構わない。分割空間としては、例えば四面体、三角柱などが知られている。また、この変換処理を高速に逐次処理してゆくためには、補間演算手段304へ送る複数の格子点値を一括して決定する手段がどうしても必要になる。
【0060】
このような手段は、例えば図8に示したような構成を用いて実現できる。ここでは、例として入力空間が各軸15等分に均等分割されており、入力空間における各格子点の座標は、RGB入力値の各上位4ビットからなる12ビットの値で一義的に定まるものとする。同図において、格子点決定手段801〜808という8つの要素は、格子点の座標を決定ものであり、その後段に接続されたSRAM809〜816とそれぞれ一対一に対応している。SRAM809〜816には、入力空間における格子点を重複なく8つの群に分けた場合の格子点値が格納されている。これらの8つの群は、入力座標(R,G,B)の下位1ビットをそれぞれ取り出し、この順番でMSB(Most Significant Bit)から並べた場合の3ビットの値を元に分割されている。即ち、RGBの各々の偶奇の組み合わせにより8通りに分割されていると考えても良い。
【0061】
SRAM809から816に振られた番号Bn(n=0〜7)は、上記3ビットの値を表している。例えば、ブロック809に振られたB0は、このSRAMに格納されている格子点の座標の下位3ビットの値が"000"であるような点の集まり、即ち格子点座標のRGBが全て偶数であるような格子点の値が格納されていることを示している。同様にして、ブロック812のB3は、RGBのうち、Rが偶数でGBが共に奇数であるような格子点値を格納していることを示す。また、1つのSRAMにおけるアドレスインデックスは、格子点座標(R,G,B)の上位3ビットをそれぞれ取り出し、それらをこの順番でMSBから並べた9ビットの値により決定されるものとする。
【0062】
一方、セレクター817は、SRAM(809から816)から出力された8つの値をその後段の8つのレジスターのどれに入力するのかを選択する。またP0レジスター〜P7レジスターは、それぞれが後述する補間立方体の1つの頂点と対応している。選択処理手段826は、補間空間形状に応じて付加されるものであり、上述した補間アルゴリズムに応じて入力された8つの頂点座標から更に補間空間に対応したものを選択する動作を行う。当然のことであるが、もし補間空間が上記の補間立方体そのものであるならば、選択処理手段826は省略することが出来る。最後に積和演算手段827は補間演算を行うための手段であり、通常は複数の積和演算回路を組み合わせて構成される。
【0063】
次にこの構成における処理動作を順を追って説明する。まず、8つの格子点決定手段801〜808には、上述した上位3ビットx3色の9ビット信号と下位1ビットx3色の3ビット信号が同時に入力される。これら8つの座標決定手段は、上記2つの信号から座標を決定するのであるが、その動作モードはそれぞれ異なっている。これらの手段に対応したSRAMの番号(上述したBn)3ビットを1ビットずつ分解し、MSBからKr、Kg、Kbで表し、入力された3ビット信号を1ビットずつ分解し、MSBからLr、Lg、Lbとおき、入力された9ビット信号を3ビットずつ分解し、MSBからMr、Mg、Mbで表すことにすると、出力される格子点座標は、
Ur<<6+Ug<<3+Ub (3)
で求められる。ここに<<nはnビットだけ左にシフトすることを表す。またUp(p=r,g,b)は、以下の式で与えられる。
【0064】
【数1】

Figure 0004185751
【0065】
上式により求められた9ビットの格子点座標は、そのままアドレスインデックスとしてSRAM809〜816に送られ、8つのSRAMからは、そのアドレスに位置する8つの格子点値がそれぞれ同時にセレクター817に出力される。セレクター817は上述したように、これらの8つの値をP0レジスター〜P7レジスターのいずれに出力するかを選択するが、P0レジスターからP7レジスターが、それぞれ、図9に表した補間立方体の8つの頂点に一対一で対応しているものとすると、その選択アルゴリズムは、図10に示す表で表される。
【0066】
最後にレジスターから出力された8つの値から、補間空間の形状に応じた値の選択が、ブロック826で行われ、演算手段827で出力が計算される。尚、この構成と図3に示したハイライト領域における選択の切り分けは、同図におけるハイライト領域変換用テーブル303が上述した構成を持ち、これらをB0'〜B7'と表した時、図8の801〜808の出力がB0'〜B7'に対しても入力され、図3のセレクター305がB0〜B7またはB0'〜B7'のどちらか一方の系列を出力するように構成することで矛盾なく動作可能である。
【0067】
このようにして、ハイライト検出手段104による検出の結果、入力値がハイライト領域に属する場合には、第1の色に対応した濃度出力用のテーブルと第2の色に対応した濃度出力用のテーブルとの和からなるテーブルを用いて補間演算を行い、入力値がハイライト領域に属さない場合には、第1の色に対応した濃度出力用のテーブルを用いて補間演算を行い、入力値を濃度出力に変換する処理が実現される。以上で、ステップS505における色変換処理に関する説明を終わる。
【0068】
次にステップS506におけるハーフトーニング処理について説明する。ハーフトーニング処理は、図1におけるハーフトーニング手段107によって行われ、用いられるアルゴリズムは一般的に良く知られた誤差拡散法である。その構成例は図11のようになる。入力された多値の濃度制御信号は、加算器1101に入力される。一方、加算器1101のもう1つの入力端子には、誤差演算手段1102から出力された累積誤差が入力されている。この累積誤差は、現在処理している画素(着目画素)に隣接した画素で生じた誤差値に所定の係数をかけて加算したものである。この係数は拡散係数と呼ばれ、その値及び空間的配置に特徴を持つ様々なものが考案されている。本手法では、用いる拡散係数及びその空間的配置については特に限定しないが、例えば図12に示したフロイド・スタインバーグ型の係数配置が良く用いられている。同図において、円1202は着目画素を、W0〜W3は以前に処理された画素を拾ってくるウインドウを、矢印1204はスキャン方向、即ち着目画素の移動方向を示す。
【0069】
加算器1101では累積誤差と濃度値が加算され(以後、加算濃度と呼ぶ)、コンパレーター1105に出力される。コンパレーター1105では、入力された加算濃度と設定された閾値とを比較して、入力値の方が大きければ、設定されたインデックスを出力する。インデックスが持ち得る状態数は、通常、入力解像度とプリンターエンジンが持つ出力解像度との関係によって定まる。インクジェットプリンターなどの面積階調方式の出力機器では、その物理解像度によって定まる単位画素が持つ状態数は通常"1"か"0"かの二値であるから、インデックスの状態数は、(Oh/Ih)*(Ov/Iv)+1で与えられる。ここにOh、Ovはそれぞれ水平方向、垂直方向の出力解像度であり、Ih、Ivはそれぞれ水平方向、垂直方向の入力解像度である。
【0070】
例えば、入力解像度が水平・垂直方向とも600 dpiであり、出力解像度が水平・垂直方向とも1200 dpiであれば、インデックスが持つ状態数は5値になる。インデックスが5値の場合を例にとると、入力とコンパレーター1105のインデックス出力との関係は図13に示すようになる。同図においてIは加算誤差であり、T0,T1,T2,T3はそれぞれ閾値である。また、コンパレーター入力値のビット幅を8ビットとすれば、
0<=T0<64 (5)
64<=T1<128 (6)
128<=T2<192 (7)
192<=T3<255 (8)
なる関係を満たす。
【0071】
次に、コンパレーター1105から出力されたインデックスは、インデックス変換器1106に入力され、加算誤差と同じ精度になるように、ビット拡張され出力換算濃度として出力される。例えば加算誤差の精度が8ビットであれば、インデックスとインデックス変換後の出力換算濃度出力との関係は、
Out=min(255,In<<6) (9)
で表される。出力換算濃度は、加算器1104に入力される。加算器1104では、加算濃度から出力換算濃度を減算した結果をエラーバッファー1103へ格納する。
【0072】
以上が図11に示した一般的な構成を用いた誤差拡散法の動作であるが、誤差拡散法には、その欠点を克服するために考案された様々な改良系が存在する。例えば、良く知られた欠点として、(1)「誤差分布の偏りに起因して生じる掃き寄せ」や、(2)「特定のパターンの繰り返しによって生じるテクスチャー」などの現象がある。(1)の現象を回避する手段としては、例えば入力値に応じて閾値を変動させ、誤差分布の偏りをなくす方法などが知られている。また(2)の現象を回避する手段としては、例えば閾値に小振幅のランダムなノイズを加えたり、スキャニング方向をライン毎に変化させたりしてテクスチャーの発生を抑制する方法などが知られている。尚、(2)の解決手段の1つであるノイズ重畳は、色毎にその発生シーケンスを変えることで、ドットの重なりを防いで画質を向上させるための手段としても用いられる。本実施形態に係る画像処理装置にこのような改良形の誤差拡散法を適用することは当然のことながら可能であり、本実施形態の効果をより高めることも出来る。
【0073】
このようにして、色変換手段106により変換された濃度出力を誤差拡散処理して、2値または多値のインデックス出力を求める処理が実現される。以上でステップS506におけるハーフトーニング処理の説明を終わる。
【0074】
上述したように、本実施形態に係る画像処理装置で行われるハーフトーニング処理は、誤差拡散処理であった。しかし、本実施形態では、処理する出力色に応じて、誤差拡散出力の持つ意味が変わってくる。Cyan以外の処理フェーズに対しての誤差拡散出力は、通常の誤差拡散の定義に当てはまるが、Cyanの処理フェーズでは、入力輝度データが属する領域に応じて、Cyan単色の処理とBlue(Cyan+Magenta)に対する処理とが動的に切り替わり、両者が混在しているような領域においては、厳密な意味での動作モードが異なる。そこで、Cyan処理フェーズについて、(1)入力輝度データが定常的にハイライト領域にある場合、(2)入力輝度データが定常的に非ハイライト領域にある場合、(3)両者が混在している場合、の3つの場合に分けてその動作モードを考察しておこう。
【0075】
(1)入力輝度データが定常的にハイライト領域にある場合
誤差拡散の入力値は、常にBlue成分(Cyan+Magenta)と等しくなる。従って、濃度平均値の保存はBlue成分に対して行われ、この意味での矛盾はない。また、ハイライト領域に属する入力に対する一般的な単色処理と比較して、当然ながら入力値が大きくなるため、誤差拡散出力の空間周波数は高くなる。この場合の動作モードは、通常の誤差拡散のそれと全く同じである。
【0076】
(2)入力輝度データが定常的に非ハイライト領域にある場合
誤差拡散の入力値は、常にCyan成分と等しくなる。従って、濃度平均値の保存はCyan成分に対して行われ、この意味での矛盾はない。この場合の動作モードは、通常の誤差拡散のそれと全く同じである。
【0077】
(3)両者が混在している場合
この場合、Blue成分とCyan成分が空間的に混在するので厳密な意味での濃度平均値の保存性は成り立たなくなるが、後述するように後段のビットマップ化手段においてMagenta成分への置き換えが行われるのでマクロ的な平均濃度は保存される。むしろ問題となるのは、Blue成分での処理がCyan成分への処理に(或いはその逆に)切り替わるような境界部分での挙動である。境界部分では、支配系が切り替わるので継ぎ目が擬似輪郭として知覚されやすくなる。しかし、前述したハイライト検出手段の条件(2)より、Cyan或いはMagentaの支配が一方的な場合、ハイライト領域における1次色の処理はほぼ起こらないので、この場合の遷移方向はBlueまたはGrayからCyan方向或いはMagenta方向への変化と、BlueまたはGrayにおける輝度方向への変化となる。前者の場合、境界部分は常に色味の変化を伴うので、元々微小である境界での遷移は色味の変化に隠蔽されて殆ど目立たなくなる。また、後者の場合は、逆に濃度保存性が良好であるため、両者の境界は滑らかにつながる。
【0078】
以上でバンド処理、及び図1における左側のブロックの説明を終わり、次に同図における右側のブロックの動作について説明する。ここでの動作は、中央部のCM再配置手段112を中心としたブロックと右側のビットマップ化手段119を中心としたブロックが機能的に大きく分かれるので、以下、2つのブロックに分けて説明する。
【0079】
図14は中央部のブロックの動作を表すフローチャートである。同図においてステップS1401からステップS1413で構成されるループは、C,Mに関する処理である。同図を見れば明らかなように、CM以外の色に関する処理は、ここには含まれない。
【0080】
C,Mに関する処理は、ウインドウ単位で行われる。ステップS1401におけるパラメーターBhは1バンド当たりのラスター数を示し、Whはウインドウの高さを表している。ここでBhはWhの整数倍になっているものとする。ステップS1401でウインドウ単位の行位置が指定されると、ステップS1402では、ウインドウ行番号が偶数であるか奇数であるかが判別される。ここで偶数であった場合は、ステップS1403において偶数フラグが立てられ、奇数であった場合は、ステップS1404にて奇数フラグが立てられる。偶数フラグが立てられた場合は、ステップS1405からステップS1412のループで構成されるウインドウ単位の列方向処理は、ウインドウ単位で左から右に向けて順次、行われていく。また奇数フラグであった場合は、同様にして右から左に処理される。
【0081】
ステップS1405におけるパラメーターWwはウインドウの幅を表し、Lは1ラスター当たりの画素数を示している。ここでは簡単のために、LはWwの整数倍であるものとする。ステップS1405でウインドウ単位の列位置が指定されると、ステップS1406において該当位置にあるインデックスバンドバッファー117内のデータがウインドウバッファー制御手段120の制御の下、ウインドウ単位で読み込まれ、インデックス・フラグ分離手段111にあるウインドウバッファーに格納される。この読み込み処理は、C,M双方に対して行われ、それぞれが異なるウインドウバッファーに格納される。
【0082】
インデックスバンドから切り出されるウインドウ部のイメージは、図15の例に示すようになる。同図に示された様に、左から右にスキャンしてゆく場合は、ウインドウ1501の左上端を原点として、Ww×Whの範囲が一度に読み込まれる範囲となる。また右から左にスキャンするときは、ウインドウ1502の右上端を原点として、Ww×Whの範囲が一度に読み込まれる範囲となる。ウインドウ原点のインデックスバンドバッファーにおける座標は、左右スキャンのときは(i*Ww,j*Wh)であり、右左スキャンのときは、((L-1)-i*Ww,j*Wh)となる。
【0083】
ステップS1406でC,Mのウインドウバッファーにデータが格納された後、ステップS1407からステップS1409で構成されるループで、フラグとインデックスの分離処理がインデックス・フラグ分離手段111において行われる。ここでの処理は、Cのウインドウバッファーの全てのデータに対して、インデックス・フラグ合成手段109が行ったのと逆の処理を行い、ハイライト検出フラグを分離してフラグが1だった画素の画素番号、即ち図15に示された数値を画素番号バッファーに格納すると同時に、ウインドウバッファーのデータをインデックス出力に戻す。
【0084】
次にステップS1410では、C,M再配置処理が行われるが、この処理については後述する。再配置処理が終わったら、ステップS1411では、ウインドウバッファー制御手段120による制御の下、ウインドウバッファー内のデータがインデックスバンドバッファー117の該当位置に書き戻される。以上の一連の処理をウインドウ単位の列方向に施したら、行方向のポインターを進めて、1バンド分の処理を行うことで、CMに関するシーケンスは終了する。
【0085】
次にステップS1410におけるCM再配置処理について説明する。まず、前提として、ハイライト検出フラグが立っている位置におけるインデックス出力は、CMとも殆ど1または0であることに注意する必要がある。これは、本実施形態が対象としている出力機器が高解像度のものだからである。良く設計された誤差拡散法を用いると、一色当たりの出力ドットの空間周波数が150dpi程度あれば、最早、粒状性は問題にならない。仮に1200dpiの出力解像度を持つプリンターで、150dpiの空間周波数を持つパターンを再現したとすると平均的には8x8ドットに1つの割合でドットがオンする計算になる。これを8ビットの入力濃度に換算すれば、レベル4程度になり、この値をハイライト領域上限に設定すれば良いことになる。従って、インデックスのとり得る値数が2値より大きかったとしても、設定されたハイライト領域は非常に明るいところのみであるから、誤差拡散の出力は大きくても大部分が1なのである。
【0086】
尚、BlueまたはGrayにおける非ハイライト領域からハイライト領域への比較的大きなエッジ近傍では、ハイライト検出フラグが立った状態で2以上のインデックス出力が発生する可能性がある。特に掃き寄せ対策を施した処理系では、エッジに対する応答が速くなるので、発生する確立が高くなると考えられる。このような状態のときに強制的に処理を切り替えると、擬似輪郭の発生などの弊害が考えられるので、後述するようにハイライト処理は、インデックスが1の場合に限定している。
【0087】
図16は、この処理を表すフローチャートである。まずステップS1601において、M用のウインドウ(Mウインドウ)内部をサーチして、置換元画素を特定し、その総数Rcを求めると共に該当位置のMのインデックス(Mインデックス)を0クリアする。置換元画素とは、ハイライト検出フラグが1で、かつ該当位置におけるMインデックスが1である画素のことである。従って、ここでの処理はステップS1408において作成された画素番号バッファーに格納されている画素番号位置におけるMの値を検査し、それが1であるかどうかを判別すれば良い。
【0088】
次にステップS1602では、未置換画素スタックをサーチして、過去の置換元画素数の総和Rpを求める。ここで未置換画素スタックとは、図17の例に示すような構造をしており、t0からtn-1には一度前の処理からn回前の処理までのRcが格納されている。Rpはt0からtn-1の総和である。尚、未置換画素スタックは、最初のCM再配置処理が行われる前の任意のタイミングで0に初期化されているものとする。次にステップS1603では、RcとRpを加算して、現処理における置換元画素数の総和Rを求める。
【0089】
このようにして、第2の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換元画素数として記録し、インデックス値を0に置き換える処理が実現される。
【0090】
次にステップS1604では、Cウインドウ内部の置換先候補画素数Qを求める。ここで置換先候補画素とは、ハイライト検出フラグが1で、かつ該当位置におけるCインデックスが1である画素のことである。従って、ここでの処理はステップS1408において作成された画素番号バッファーに格納されている画素番号位置におけるCの値を検査し、それが1であるかどうかを判別すれば良い。このようにして、第1の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内部を検索して、ハイライト領域にありかつインデックスが1である画素の個数を求めてそれを置換先候補画素数として記録し、画素の位置を置換先座標として記録する処理が実現される。
【0091】
もしQが0であったなら、以降の処理をスキップして、ステップS1610へ飛ぶ。Qが0でない場合、ステップS1606では、現処理における置換可能画素数P=min(R,Q)を求める。このようにして、置換元画素数及び置換先候補画素数のうち小さい方を置換可能画素数として記録する処理が行われる。
【0092】
次にステップS1607では、乱数を用いてP個の置換先画素を求める。この処理は、ステップS1604で求めたQ個の置換先候補画素から、P個の画素を選び出す処理である。乱数による選択アルゴリズムは、例えば次の様にして実現できる。
【0093】
(1)Q個の置換先候補画素の画素番号(図15を参照)を格納した配列QAを作成する。この処理は、ステップS1604で同時に行うことが出来る。
(2)Q個の乱数を発生させ、これと配列QAのインデックスを対応付ける。
(3)上記インデックスに対応した乱数の大小を比較して、大きい順にP個のインデックスを選択する。
(4)上記P個のインデックスに対応した配列QAの要素を置換画素とする。
このようにして、乱数を用いて、置換可能画素数と等しい数の置換先座標を求める処理が実現される。
【0094】
選択された画素に対し、ステップS1608では、対象位置にあるC画素を0クリアし、M画素を1にする
【0095】
次にステップS1609では、未置換画素スタックの終端から始めて置換済み画素数を減算してゆく。この処理については後述する。最後にステップS1610では、Rcで未置換画素スタックをプッシュする。このとき、スタックの終端の値は消滅する。
【0096】
次にステップS1609における未置換画素スタックの減算処理について、図18のフローチャートを用いて説明する。ステップS1801からステップS1806におけるループでは、未置換画素スタック内部での減算処理である。ステップS1802では、置換済み画素数からスタックの現在位置における未置換画素数を減算している。この結果が0以下であれば、減算処理は終了し、ステップS1807でスタックの現在位置における未置換画素数が更新されてループを抜ける。一方、0より大きければ置換済み画素として消費されたものがまだ残っているので、ステップS1805で置換済み画素数を更新して次のスタック位置に進む。こうして全てのスタック領域における減算処理が終了すると、スタックの画素を全て消費しても、置換済み画素数に達しなかったことを意味するので、ステップS1807でRcを消費させる。
【0097】
このようにして、ハーフトーニング手段107により求められた第1の色に対応したインデックス出力と、第1及び第2の色の和に対応したインデックス出力とを比較して、第2のインデックス出力を整形する処理が実現される。以上でCM再配置処理に関する説明を終わる。
【0098】
最後に再び図1に戻り、ビットマップ化手段119を中心としたブロックの動作について説明する。ここでの処理は、全て色毎に行われる。まずインデックスバンド読み込み手段110によって、インデックスバンドバッファー117から1バンド分のインデックスが読み込まれる。次に、ビットマップ化手段119では、読み込まれた各画素に対しインデックス展開を行い、ビットマップを生成する。ここでの処理は、インデックスで表された入力画素の値をプリンターの出力解像度に対応したビットマップに変換する処理である。ハーフトーン処理に関する説明の部分で述べた通り、もし、入力解像度と出力解像度がそれぞれ600dpi、1200dpiであったとすれば、1つの入力画素に対して2x2の4つの出力画素が対応する。このとき、インデックスが持つ値数は0から4の5値であり、これらの値に対応した2x2のビットマップパターンに展開すれば良い。
【0099】
ビットマップ展開の方法には、様々な手法が考案されているが、最も一般的に用いられている方法は、テーブルを用いて置き換える手法である。例えば図19に示したような表を用いて、インデックスに対応するビットマップに展開するのである。同図において、最左欄の数字はインデックス番号を示す。また、P0、P1、・・・は、インデックス内のKn+0の位置を示す。ここで、nは0以上の整数、Kは周期である。通常、このようなパターンテーブルのセットは複数用意されており、それらを何らかの規則(例えばカラム単位)に則って切り替えて使う。
【0100】
ビットマップ化処理が、読み込まれた全ての画素に対して施されると、生成されたビットマップイメージは、ヘッド駆動制御手段113へ送られて、ノズルの物理的な配置に対応した形に並べ替えられる。このとき、通常は、並列して次の色に対して、上述したビットマップ生成が行われるような構成に設計されている。こうして全ての色に対するビットマップ化処理と並べ替えが終了すると、ヘッド駆動制御手段113は、ヘッド制御用の信号を生成して、プリンターエンジン114を駆動し、1バンド分の印字を行う。
【0101】
以上で、本実施形態の動作説明を終了するが、最後に本実施形態で用いたアルゴリズムのポイントについて幾つか述べておく。
【0102】
(1)Mの誤差拡散出力を単なる置換画素数決定の際に用いていること。
本実施形態では、画素の再構成を行うに当たり、CM混合成分に対する誤差拡散出力の分布をベースにしており、Mの出力分布を積極的に用いることはしていない。これは、適切に設計された誤差拡散法においては、その出力分布がその入力濃度におけるほぼ理想的な空間特性を有しており、この分布を少しでもずらすと、まるで低周波成分への折り返しが発生しているような大きなノイズを生成してしまうからである。従って、本実施形態では、なるべくリファレンスの分布を崩さないような手法を採用した。
【0103】
(2)置換のために2次元ウインドウを用いていること。
1次元の処理では、どんなに質の良い乱数を用いても、局所的に発生する2次元的な凝集を回避できず、結果として色のテクスチャーを発生させてしまうからである。
【0104】
(3)置換失敗画素の伝播を抑制していること。
単に濃度の保存性のみを考慮した場合は、無限に伝播させた方が良い。しかし、当然のことながら自然画の相関は局所的なものである。従って、余分なノイズを発生させるよりは、濃度の保存性を多少犠牲にしても、適当なところで打ち切った方が妥当である。
【0105】
(4)置換先の決定に乱数を用いていること。
M画素の出力分布からオン画素を探して、CM分布からその最近接位置を採用しても、処理が複雑になるだけで、効果に殆ど差がないことが実験的に確認された。これは、もともと誤差拡散法の出力分布が多分に乱数的であり、位置を確定する手段としては、どちらもほぼ等価なものであるからだと考えられる。
【0106】
以上説明したように、本実施形態では、CM再配置手段とビットマップ化手段とがバンドメモリー領域を共有するように構成したことで、機能拡張に伴う装置コストの増加を最小限に抑えることが出来るという効果を奏する。
【0107】
尚、本実施形態では、4色出力のプリンターを想定していたが、出力色が2色以上である全ての場合に適用可能である。また、複合する2色はC,Mに限られたことではなく、例えば、同じ色で濃度の異なる2種類の出力など、任意の出力の組み合わせに容易に拡張できることは明らかである。
【0108】
(第2実施形態)
本発明の第2実施形態は、第1実施形態と異なり、低解像度のプリンターにまで適用範囲を広げたものである。図20に、本実施形態の構成を示す。同図において、図1と同じ参照符号を持つ部分は、同一の機能を有していることを示している。図1と比較して異なる部分は、右側のブロックの構成が一体化したこと、及びCM再配置手段112とビットマップ化手段119の処理順序が反対になったことである。また、それに伴い、ウインドウバッファー読み込み手段2001がウインドウバッファー制御手段120の代わりに付加されている。ウインドウバッファー読み込み手段2001は、ウインドウバッファー制御手段120から、インデックスバンドバッファー117への書き込み制御機能を省略したものであり、その他の機能は全て同一である。
【0109】
本実施形態における左側のブロックの処理機序は、図1におけるそれと完全に同一であるので、説明を省略し、右側のブロックについてのみ動作を説明する。左側のブロックにより、1バンドのインデックス出力処理が終わると、ウインドウバッファー読み込み手段2001、ビットマップ化手段119、CM再配置手段112によって構成されるブロックでは、まずCMに関する処理を行ってから他の色に対する処理を行う。
【0110】
この処理シーケンスは、基本的に、図14に示されたものと同じであるが、異なる点は、ステップS1409とステップS1410の間でウインドウ領域におけるビットマップ展開処理が行われ、CM再配置処理が、上記ビットマップ化されたウインドウで行われること(ただし、この場合、ステップS1408で作成された画素番号バッファーは、同じ入力画素を起源とする出力ビットマップの間で共有される)と、ステップS1411とステップS1417におけるインデックスバンドバッファーへの書き込み処理が、ヘッド制御手段113のビットマップメモリーに対する書き込み動作になることである。これ以降の動作は、全て第1実施形態におけるものと同一であるため、説明を省略する。
以上で第2実施形態の説明を終わる。
【0111】
(第3実施形態)
本発明の第3実施形態は、画像処理装置としてインクジェットプリンターを用いた場合について想定したものである。また、出力色はC,M,Y,Kの4色であるものとする。図21は本実施形態の構成を表す。同図において、図1におけるものと同じ参照符号を用いてあるものは、同じ機能を持っていることを示す。図21において、ハーフトーニング手段2101は、本質的な機能は図1に示すハーフトーニング手段107と同等であるが、色に応じて適応的な処理を行う機能が付加されている。またインデックスバンド制御手段2102は、インデックスバンド書き込み手段108に読み込み機能を付加したものである。
【0112】
次に、本実施形態に係る画像処理装置の動作について詳細に説明する。尚、図21の右側のブロックの動作は、図1におけるものと全く同じであるので説明を省略し、左側のブロックについてのみ述べることにする。図21における左側のブロックは、各色の1バンドの処理を行い、結果をインデックスバンドバッファー117へ格納する一連の動作を行う。この基本シーケンスは、図2に示されたものと全く同一であるが、ステップS213におけるバンド処理の内容が異なる。
【0113】
図22は、本実施形態におけるバンド処理のシーケンスを表すフローチャートである。同図において図5と異なるのは、ステップS505で色変換処理が行われた後で、ステップS2201の分岐条件に応じて、Mの処理とそれ以外の色の処理が切り替わる点にある。M以外の色に関する処理は、ステップS506からステップS508で行われるので、第1実施形態の場合と同じ動作になる。
【0114】
次にステップS2202におけるMフェーズでのハーフトーニング処理について説明する。図23は、ハーフトーニング手段2101の概略構成を示す。同図において、図11における参照符号と同じ値が振ってあるものは、同じ機能を持っていることを示している。図11の構成と異なる点は、コンパレーター2301であり、ここには、モード設定信号と、ハイライト検出フラグ及びCのインデックスが入出力されている。モード設定信号は、処理がMに関する処理であるかどうかを判断するためのものであり、図2におけるステップS212以前の任意の時点で、ハーフトーニング手段2101の該当レジスターに出力されているものとする。またインデックスバンド制御手段2102から読み込まれた該当位置におけるCyanインデックス・フラグ出力から、インデックス・フラグ分離手段111を通じて分離されたハイライト検出フラグとCyanインデックスが入力される。もし、モード設定信号がMの処理でないことを表していれば、通常のコンパレート動作を行うので、ハーフトーニング手段2101の動作は、図1に示すハーフトーニング手段107と全く等価になる。
【0115】
動作モードがMであるときのハーフトーニングの処理フローを図24に示す。ステップS2401とステップS2402における処理は、現在処理しているM画素の座標と同じ座標における処理済みのCインデックス出力Ciとハイライト検出フラグHfを求める手続きである。
【0116】
次にステップS2403において、M入力と累積誤差との加算が行われて、加算濃度が計算される。これは通常の誤差拡散処理と同じである。これらが求められると、ステップS2404で現在位置がハイライト領域に含まれているかどうか検査される。もし、ハイライト領域でないならば、ステップS2410で通常の閾値処理が行われる。逆にハイライト領域であった場合は、ステップS2405でそこにC出力があるかどうかが判別される。もし、C出力が存在しなかったら、ステップS2409にてMの出力インデックスMiを0に設定する。一方、C出力が存在したら、ステップS2406で通常の閾値処理が行われて、Miが求められる。ステップS2407では、求めたMiと入力されたCiとの比較が行われて小さい方が改めてMiに設定される。ステップS2408では、CiからMiを減算した値をCiに設定する。
【0117】
このようにして、変換された濃度出力のうち、M以外の濃度出力に対しては誤差拡散処理を行ってインデックス出力を求め、Mの濃度出力に対しては、Cに対応したインデックス出力と、ハイライト検出手段104による検出の結果を示すハイライト検出フラグとに基づいて、誤差拡散出力を制御して第2の色に対応したインデックス出力を求めると共に、Cに対応したインデックス出力を調整する処理が実現される。一連の閾値処理が終わったら、誤差の計算と格納がステップS2411で行われ、最後にCi,Miがインデックスバンドバッファー117に書き込まれる。
【0118】
以上がMを処理するときのハーフトーニング処理動作であるが、この処理で特徴的なものは上述したステップS2405からステップS2408におけるハイライト領域での処理である。最後にこのハイライト領域アルゴリズムについて若干の考察を加えておこう。ステップS2405でCiが0のときは、Miを強制的に0にしているが、これはCM混合で得られた出力分布を尊重してなるべく乱さないようにするための措置であり、基本的な思想は第1実施形態の最後に述べたことと同一である。一方、ステップS2407とステップS2408とで行われる減算による置き換え処理は、Cの濃度保存性をほぼ確保している。Mに関しての濃度保存性は、通常の誤差拡散と同様に保たれることは明らかである。
【0119】
尚、本実施形態では、4色出力のプリンターを想定していたが、出力色が2色以上である全ての場合に適用可能である。また、複合する2色はC,Mに限られたことではなく、例えば、同じ色で濃度の異なる2種類の出力など、任意の出力の組み合わせに容易に拡張できることは明らかである。
以上で本実施形態の説明を終わる。
【0120】
尚、本発明は、前述した各実施の形態の機能を実現するソフトウェアのプログラムコードを記憶した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。
【0121】
この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0122】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光磁気ディスク、光ディスク、CD−ROM、CD−R、磁気テープ不揮発性のメモリカード、ROMなどを用いることが出来る。
【0123】
また、コンピュータが読み出したプログラムコードを実行することによって、前述した実施の形態の機能が実現される他、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOSなどが実際の処理の一部または全部を行い、その処理によっても前述した実施の形態の機能が実現され得る。
【0124】
更に、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によっても前述した実施の形態の機能が実現され得る。
【0125】
本発明は、前述した実施の形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体からそのプログラムをパソコン通信など通信ラインを介して要求者にそのプログラムを配信する場合にも適用できることは言うまでもない。
【0126】
更に、本発明の精神と範囲を逸脱しない限り、種々の態様で変更が可能である。従って、他の実施形態も請求項の範囲に属するものである。
【0127】
【発明の効果】
以上説明したように、本発明によれば、色変換処理において第1の濃度出力を演算する際に、第1の濃度出力、或いは第1の濃度出力と第2の濃度出力との和を適応的に出力させることにより、ハイライト領域での粒状性の向上による画質向上を、高速にかつ低コストで実現できるという効果を奏する。
【図面の簡単な説明】
【図1】本発明第1実施形態の構成を表すブロック図である。
【図2】本発明第1実施形態の動作を表すフローチャートである。
【図3】図1における色変換テーブル読み込み手段及び色変換手段の概略構成を表すブロック図である。
【図4】図1における色変換テーブルバッファー内部の格納イメージを表す図である。
【図5】本発明第1実施形態におけるバンド処理の動作を表すフローチャートである。
【図6】色変換処理を表すフローチャートである。
【図7】色変換処理における補間空間でのハイライト領域の空間的な配置を説明するための図である。
【図8】色変換処理において補間格子の格子点座標を一括して読み込むための構成の一例を示すブロック図である。
【図9】図8におけるレジスターと対応する補間立法体上の格子点の空間的な配置の一例を示す図である。
【図10】図8におけるセレクターの選択アルゴリズムの一例を表す表である。
【図11】本発明第1実施形態におけるハーフトーニング手段の構成の一例を表すブロック図である。
【図12】図11におけるコンパレーターの動作の一例を表す表である。
【図13】誤差拡散法に用いられる拡散係数配置の一例を示す図である。
【図14】図1におけるCM再配置手段を中心としたブロックの動作を表すフローチャートである。
【図15】図1におけるインデックス・フラグ分離手段内部に格納されるウインドウデータのイメージを示す図である。
【図16】 CM再配置処理の一例を表すフローチャートである。
【図17】未置換画素スタックの構造の一例を示す図である。
【図18】図16におけるステップS1609での処理を表すフローチャートである。
【図19】図1におけるビットマップ化手段で行われるインデックス展開処理の一例を示す図である。
【図20】本発明第2実施形態の構成を表すブロック図である。
【図21】本発明第3実施形態の構成を表すブロック図である。
【図22】本発明第3実施形態におけるバンド処理のシーケンスを表すフローチャートである。
【図23】本発明第3実施形態におけるハーフトーニング手段の概略構成を示すブロック図である。
【図24】本発明第3実施形態における動作モードがMであるときのハーフトーニングの処理フローである。
【符号の説明】
101 CPU
102 画像データ読み込み手段
103 γ変換手段
104 ハイライト検出手段
105 色変換テーブル読み込み手段
106 色変換手段
107、2101 ハーフトーニング手段
108 インデックスバンド書き込み手段
109 インデックス・フラグ合成手段
110 インデックスバンド読み込み手段
111 インデックス・フラグ分離手段
112 CM再配置手段
113 ヘッド駆動制御手段
114 プリンターエンジン
115 画像データバッファー
116 色変換テーブルバッファー
117 インデックスバンドバッファー
118 CPUバス
119 ビットマップ化手段
120 ウインドウバッファー制御手段
302 非ハイライト領域用色変換テーブル
303 ハイライト領域用色変換テーブル
304 補間演算手段
305 セレクター
801、802、803、804、805、806、807、808 格子点決定手段
809、810、811、812、813、814、815、816 SRAM817 セレクター
818 P0レジスター
819 P1レジスター
820 P2レジスター
821 P3レジスター
822 P4レジスター
823 P5レジスター
824 P6レジスター
825 P7レジスター
826 選択処理手段
827 積和演算手段
1101、1104 加算器
1102 誤差演算手段
1103 エラーバッファー
1105、2301 コンパレーター
1106 インデックス変換器
1501、1502 ウインドウ
2001 ウインドウバッファー読み込み手段
2102 インデックスバンド制御手段[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus, an image processing method, a computer program, and a computer-readable storage medium for generating a color density control signal having a lower number of gradations from a multi-valued color luminance signal, and in particular, an inkjet printer or the like The present invention relates to an image processing apparatus, an image processing method, a computer program, and a computer-readable storage medium suitable for an output device using the area gradation.
[0002]
[Prior art]
An image processing apparatus in a color printer using an area gradation such as an ink jet printer usually has color conversion means for converting a multi-value luminance signal into a multi-value density control signal, and from a multi-value density control signal. It comprises halftoning means for converting to a signal with a small number of gradations (index output), and bitmapping means for converting the obtained index output into a bitmap pattern of the printer engine. .
[0003]
Also connected to the subsequent stage is print control means for reading the converted dot pattern, converting it into a format unique to the printer, and performing print control based on the signal. For example, the function of a print control unit in an ink jet printer controls the ejection of ink by turning on / off nozzles according to signals while replacing the dot pattern supplied from the bitmapping means with the physical arrangement of print head nozzles. That is.
[0004]
In recent years, with higher accuracy and higher image quality of printers, higher accuracy has been demanded for the above-described image processing apparatuses. Because of these requirements, the color conversion means uses a method that combines a three-dimensional LUT (Look-Up Table) and an interpolation operation, and the halftoning process uses an error diffusion method. It has become. Furthermore, in order to cope with the increase in the speed of printers, there is an urgent need to configure these devices with hardware.
[0005]
When the above-described apparatus is configured by hardware, it is general to take a configuration in which each output color is divided into predetermined bands and sequentially processed without stalling within the band. However, with such a configuration, since the luminance input to the index output (or bitmap output) are created at once, information of other colors cannot be used in the middle of a certain process.
[0006]
As a well-known defect in an image processing apparatus such as an ink jet printer using area gradation, there is an image granulation. This phenomenon is attributed to the fact that the output of this type of printer is determined in principle only by turning on and off the minute pixels. Advances in ink ejection control technology in inkjet printers in recent years have enabled the formation of finer dots, and the resolution of the printer has increased accordingly, so the deterioration in image quality due to granulation has been considerably improved. In the highlight area where the spatial arrangement of dots is sparse, the deterioration of graininess is unavoidable.
[0007]
A technique for avoiding this phenomenon is described in Patent Document 1, for example. According to this publication, when performing error diffusion processing, not all colors are processed independently, but in the cyan and magenta processing, the sum of both is used as an input. This is treated as ternary values, and in the middle state, only one of cyan and magenta is output, so that both colors are not easily overlapped at the same position. By doing so, the spatial frequency of the output dots in the highlight region is increased to prevent the deterioration of graininess and the gradation is also preserved. Another technique having an effect similar to this is disclosed in Patent Document 2. In the method described in this publication, when cyan and magenta are processed simultaneously, dither processing is performed using a dither matrix in which the dispersibility of dots is secured in advance in the highlight portion, and control is performed so that the colors do not overlap. Therefore, it aims at the same effect as the above method.
[0008]
[Patent Document 1]
JP-A-8-279920
[0009]
[Patent Document 2]
JP 2000-184215 A
[0010]
[Problems to be solved by the invention]
However, in the two prior arts described above, it is necessary to simultaneously process two colors in the halftoning process. If this configuration is realized by using hardware to increase the speed, the cost becomes very high. This is because if a system stall is eliminated to achieve high speed, the color conversion process preceding the halftoning process must also perform two or more color processes simultaneously. If it is assumed that the color conversion process is configured by the above-described interpolation calculation method, there is a problem that an SRAM for storing a table of two colors or more and a plurality of calculation circuits operating in parallel are required.
[0011]
For the same reason, when the error diffusion method is used for the halftoning means, there is a problem that SRAM for two colors is required to form an error buffer for holding the error. .
[0012]
On the other hand, if an attempt is made to increase the speed without performing two-color simultaneous processing, the operation clock must be increased, which complicates the system and increases the performance of the elements. Therefore, there is a problem that an increase in cost is inevitable.
[0013]
The present invention has been made in view of such problems, and an object of the present invention is to provide a low-cost image processing apparatus and image for improving image quality in an output device using area gradation such as an inkjet printer. To provide a processing method, a computer program, and a computer-readable storage medium.
[0014]
[Means for Solving the Problems]
  In order to achieve such an object, the invention described in claim 1 is an image processing apparatus for converting a multi-value color luminance signal into a binary or multi-value color density control signal, wherein the color luminance is obtained. Corresponding to the first color when the input value belongs to the highlight area as a result of the detection by the highlight detection means that detects whether or not the input value of the signal belongs to the highlight area Density output tableGrid point value ofAnd density output table corresponding to the second colorGrid point value ofAnd the sumHave grid point valuesWhen interpolation is performed using a table and the input value does not belong to a highlight area, interpolation calculation is performed using a density output table corresponding to the first color, and the input value is output as a density output. Color conversion means for converting into color, density output converted by the color conversion means by error diffusion processing to obtain binary or multi-value index output, and index output obtained by the half toning means The index output corresponding to the first color is compared with the index output corresponding to the sum of the first and second colors, and the index corresponding to the sum of the first and second colors. Means for shaping the outputThe shaping means searches the index output corresponding to the second color in a two-dimensional window having a predetermined size, and determines the number of pixels in the highlight area and having an index value of 1. The first means for replacing the index value with 0 and the index output corresponding to the first color are searched for in the two-dimensional window having a predetermined size. A second means for determining the number of pixels having an index value of 1 in the highlight area, recording the number as a replacement destination candidate pixel number, and recording the position of the pixel as a replacement destination coordinate; Third means for recording the smaller one of the number of original pixels and the number of candidate replacement destination pixels as the number of replaceable pixels, and fourth means for obtaining a number of replacement destination coordinates equal to the number of replaceable pixels using a random number , The index output corresponding to the first color in the substitution destination coordinates to 0, and a fifth means for 1 index output corresponding to the second colorIt is characterized by that.
[0016]
  Claims2The invention described in claim1In the image processing apparatus according to the item 1, the highlight detection means includes two boundary values corresponding to two luminance signal components that are complementary color components of the first and second colors, and a monochromatic processing region. A first boundary value that indicates whether all input values are greater than the corresponding boundary value by comparing each of the two boundary values with the corresponding input value. And the two luminance values that are complementary color components of the first and second colors are subtracted from 255 respectively to obtain two values, and the absolute value of the difference between the two values is the other one boundary. When the determination result of the second means for determining whether or not the value is smaller than both the first means and the second means is true, it is determined that the input value belongs to the highlight area. And a third means.
[0017]
  Claims3The invention described in claim1In the image processing apparatus according to the above, if the color conversion unit determines that the input value belongs to a highlight area based on the detection result of the highlight detection unit, the color conversion unit is configured in a space defined by the input value. Interpolation calculation using the sum of lattice point values of cube vertices such that a square projected on a plane composed of two axes representing the complementary color components of the first and second colors is located on the most highlight side It is characterized by performing.
[0019]
  Claims4The image processing method of the image processing apparatus for converting a multi-valued color luminance signal into a binary or multi-valued color density control signal, wherein the input value of the color luminance signal is in a highlight region. And a table for density output corresponding to the first color when the input value belongs to the highlight area as a result of the detection.Grid point value ofAnd density output table corresponding to the second colorGrid point value ofAnd the sumHave grid point valuesWhen interpolation is performed using a table and the input value does not belong to a highlight area, interpolation calculation is performed using a density output table corresponding to the first color, and the input value is output as a density output. Converting the converted density output into an error diffusion process to obtain a binary or multi-level index output, the index output corresponding to the obtained first color, and the first Comparing the index output corresponding to the sum of the first and second colors and shaping the index output corresponding to the first and second colors.The shaping step searches the index output corresponding to the second color in a two-dimensional window having a predetermined size, and determines the number of pixels in the highlight area and having an index value of 1. In the first step of replacing the index value with 0 and the index output corresponding to the first color, the inside of the two-dimensional window having a predetermined size is searched. A second step of obtaining the number of pixels having an index value of 1 in the highlight area, recording the number as a replacement destination candidate pixel number, and recording the position of the pixel as a replacement destination coordinate; A third step of recording the smaller of the number of original pixels and the number of candidate replacement destination pixels as the number of replaceable pixels, and using a random number, the number of replacement destination coordinates equal to the number of replaceable pixels It includes a Mel fourth step, in the 0 index output corresponding to the first color in the substitution destination coordinates, and a fifth step of the index output corresponding to the second color in 1It is characterized by that.
[0021]
  Claims5The invention described in claim4In the image processing method according to claim 1, the detecting step includes each of two boundary values corresponding to two luminance signal components that are complementary color components of the first and second colors, and the corresponding input value. And subtracting two luminance values, which are complementary color components of the first and second colors, from 255, respectively. A second step of determining two values and determining whether an absolute value of a difference between the two values is smaller than another boundary value for determining that the region is a monochrome processing region; And a third step of determining that the input value belongs to a highlight area when both the determination results of the first and second steps are true.
[0022]
  Claims6The invention described in claim4In the image processing method according to claim 1, in the step of converting, when it is determined that the input value belongs to a highlight area as a result of the detection, the first and second in the space defined by the input value. The interpolation projected using the sum of the grid point values of the cube vertices such that the square projected on the plane composed of two axes representing the complementary color components of the two colors is located on the most highlight side. To do.
[0024]
  Claims7The present invention is a computer program for an image processing apparatus that converts a multi-valued color luminance signal into a binary or multi-valued color density control signal.A computer program to be executedDetecting whether the input value of the color luminance signal belongs to a highlight area; and, as a result of the detection, if the input value belongs to a highlight area, for density output corresponding to the first color TableGrid point value ofAnd density output table corresponding to the second colorGrid point value ofAnd the sumHave grid point valuesWhen interpolation is performed using a table and the input value does not belong to a highlight area, interpolation calculation is performed using a density output table corresponding to the first color, and the input value is output as a density output. Converting the converted density output into an error diffusion process to obtain a binary or multilevel index output, and among the obtained index outputs, an index corresponding to the first color Comparing the output with an index output corresponding to the sum of the first and second colors and shaping the index output corresponding to the sum of the first and second colors;The step of shaping includes searching the two-dimensional window of a predetermined size in the index output corresponding to the second color, and the number of pixels in the highlight area and having an index value of 1 Is obtained and recorded as the number of replacement source pixels, and the inside of the two-dimensional window having a predetermined size is searched in the first step of replacing the index value with 0 and the index output corresponding to the first color. A second step of finding the number of pixels in the highlight area and having an index value of 1 and recording it as a replacement destination candidate pixel number, and recording the position of the pixel as a replacement destination coordinate; A third step of recording the smaller one of the number of replacement source pixels and the number of replacement destination candidate pixels as the number of replaceable pixels, and a replacement destination number equal to the number of replaceable pixels using a random number A fourth step of obtaining a, in the 0 index output corresponding to the first color in the replacement destination coordinates, and a fifth step of the index output corresponding to the second color in 1It is characterized by that.
[0027]
In the present invention, since the highlight detecting means, the color converting means, the halftoning means, the band buffer and the bitmapping means are constituted, a series of processing from the input to the band buffer can be performed at high speed for each output color.
[0028]
The highlight detection means determines whether or not the input signal is in the highlight area and outputs the result, and the color conversion means detects the detection result of the highlight detection means when performing the first density processing. Accordingly, a monochrome table corresponding to the first density or a table holding the sum of the table and another table corresponding to the second density is used.
[0029]
When performing the second density processing, the rearrangement means or the halftoning means refers to the band buffer output of the first density and the output of the highlight detection means, and the two colors are overlapped as much as possible in the highlight area. In addition, the second density output process is performed so as to maintain the gradation, and the band buffer output of the first density is adjusted.
[0030]
With such a configuration, it is possible to provide a low-cost image processing apparatus for improving image quality in an output device using area gradation such as an inkjet printer.
[0031]
DETAILED DESCRIPTION OF THE INVENTION
(First embodiment)
The first embodiment of the present invention assumes a case where a relatively high resolution ink jet printer is used as the image processing apparatus. The output colors are assumed to be four colors of C, M, Y, and K. Hereinafter, description will be given with reference to the drawings.
[0032]
The configuration of the image processing apparatus according to the present embodiment is shown in FIG. In the figure, the CPU 101 controls the entire processing, and the image data reading means 102 is for reading image data from the image data buffer 115 under the control of the CPU 101. The γ conversion means 103 is for converting the input γ characteristic of the input luminance data (R, G, B), and the highlight detection means 104 detects whether the input data belongs to the highlight area. Is to do.
[0033]
The color conversion table reading means 105 is for reading a desired color conversion table from the color conversion table buffer 116 under the control of the CPU 101, and the color conversion means 106 is for converting the input luminance data into density data. Is. The color conversion means 106 in this image processing apparatus is configured to perform color conversion using a three-dimensional LUT and interpolation calculation. A plurality of known interpolation methods are known, and detailed limitation is not performed here, but basically any method can be supported.
[0034]
The halftoning means 107 is for binarizing the input density data. The index / flag combining means 109 combines the index output output from the halftoning means and the flag output from the highlight detecting means. Is to do. The index band writing unit 108 is for writing the combined output output from the index / flag combining unit 109 into the index band buffer 117 under the control of the CPU 101.
[0035]
The window buffer control unit 120 reads and writes data from the index band buffer 117 in a predetermined format, and the index / flag separation unit 111 separates the index and the flag from the window component read from the window buffer control unit 120. The CM rearrangement unit 112 shapes the CM index from the flag and the index obtained from the index / flag separation unit 111.
[0036]
The index band reading unit 110 reads an index from the index band buffer 117 under the control of the CPU 101 and sends it to the bit map forming unit 119. The bitmapping unit 119 is for creating a bitmap from the input index output, and the head driving unit 113 is for performing discharge control of the printer head based on the input bitmap. . The printer engine 114 performs print output based on a control signal output from the head drive control unit 113 under the control of the CPU 101. Also, all devices that require CPU control are connected to the CPU bus 118 via an interface. Each of the image data buffer 115, the color conversion table buffer 116, and the index band buffer 117 is a buffer for storing specific data, and its substance is a RAM connected to the CPU bus 118.
[0037]
Next, operations executed by the image processing apparatus will be described with reference to other drawings as necessary. It is assumed that a program for controlling the image processing apparatus is stored in a ROM or RAM connected to the CPU bus 118.
[0038]
In the image processing apparatus according to the present embodiment, the left block and the right block operate in parallel with the index band buffer 117 in FIG. 1 as a boundary. The left block is composed of the γ conversion unit 103, highlight detection unit 104, color conversion table reading unit 105, color conversion unit 106, halftoning unit 107, index band writing unit 108, image data buffer 115 and color conversion table buffer 116. It is configured. With such a configuration, the luminance signal read from the image data buffer 115 is color-converted, subjected to a halftoning process, and then a series of processes stored in the index band buffer 117 is performed.
[0039]
The right block is composed of an index band reading unit 110, an index / flag separation unit 111, a CM rearrangement unit 112, a head drive control unit 113, a printer engine 114, a bitmapping unit 119, and a window buffer control unit 120. Then, the index read from the index band buffer 117 is converted into a bitmap and supplied to the printer engine 114. In the following description, the operation of each block will be described separately.
[0040]
First, the operation of the left block will be described. First, an outline processing sequence will be described with reference to the flowchart of FIG. The loops having step S201 and step S215 as the leading and trailing ends indicate that processing is performed for each output color. Here, as a general case, it is assumed that the printer has four color materials C, M, Y, and K. The first output color is C.
[0041]
First, the output color is determined in step S202. If the output color is C, in step S203, the highlight detection unit 104 is enabled and a detection boundary parameter is set. In step S204, the reading method of the color conversion table reading means 105 is set for C, and a start address for reading is set. On the other hand, if the output color is another color, the state of the highlight detection unit 104 is set to invalid in step S205 and step S206, and the reading method of the color conversion table reading unit 105 is a corresponding color other than C. And a read start address is also set. All of these settings are performed by writing a predetermined value in the corresponding register.
[0042]
In step S207, the start flag of the color conversion table reading unit 105 is asserted, and the reading process of the color conversion table buffer 116 is started. In step S208, reading processing is performed according to the set parameters. When the data transfer from the color conversion table buffer 116 to the color conversion means 106 is completed, an end of reading by interruption or polling is detected in step S209.
[0043]
In step S210, a write start address is set in the index band writing unit 108. In step S211, the reading start address and the number of data are set in the image data reading means 102. The read start address and the number of data vary depending on the height of the band. This completes the hardware setting process.
[0044]
Finally, in step S212, a band processing start flag is asserted, and a series of band processing is started. When the band process ends, in step S214, the end is detected using interrupt or polling, and the process for one color (one band) ends. This is the end of the description of the general sequence.
[0045]
Next, the color conversion table reading process in step S208 will be described. FIG. 3 shows a schematic configuration of the color conversion table reading unit 105 and the color conversion unit 106. In the figure, color conversion tables 302 and 303 are three-dimensional LUTs. Of these, 302 stores data for performing calculations in the non-highlight region, and 303 stores data for performing operations in the highlight region. 302 has a large capacity and is composed of SRAM, whereas 303 can be composed of a register depending on conditions.
[0046]
FIG. 4 shows an image stored in the color conversion table buffer 116. When the reading mode of the color conversion table reading means 105 is set for Cyan, the reading start address set at the same time indicates CyanStartAddress in FIG. At this time, the read end address of the color conversion table reading means 105 is automatically set to CyanEndAddress in FIG. That is, in the Cyan mode, a value obtained by adding a known Cyan three-dimensional LUT capacity + highlight area table capacity to the set start address is set as the read end address of the color conversion table reading means 105. .
[0047]
When the image processing apparatus is activated in this state, the color conversion table reading unit 105 first loads the normal Cyan conversion table through the CPU bus 118, and accesses the internal bus to convert the data to non-highlight area conversion. Stored in the color conversion table 302. When loading of the preset non-highlight area conversion table is completed, the connection destination of the internal bus is switched to the highlight area conversion table 303, and the table value for the highlight area is stored. When the reading mode is not for Cyan, the read end address of the color conversion table reading means 105 is automatically set to the start address + the three-dimensional LUT capacity of the corresponding color, and the normal three-dimensional LUT is read and the color is read as described above. Store in the conversion table 302. This is the end of the description of the color conversion table reading process in step S208.
[0048]
Next, the band process in step S213 will be described. FIG. 5 is a flowchart showing the band processing operation. In the figure, the loop processing configured from step S501 to step S509 is performed on all data of the band set in step S211. First, in step S <b> 502, luminance data (R, G, B) of one pixel is read from the image data buffer 115 through the image data reading unit 102.
[0049]
In step S503, input γ conversion is performed on the read data. This process is a conversion process using a one-dimensional LUT in the γ conversion means 103. It is assumed that the one-dimensional LUT is set at an arbitrary timing for initializing the system before the processing in FIG. 2 starts. The configuration of the one-dimensional LUT may use a different table for each RGB color or the same table.
[0050]
In step S504, highlight detection processing is performed. This processing is performed by the highlight detection unit 104 based on the conditions set in step S203 or step S205. The content of the process is a simple size comparison. When highlight detection is valid, the boundary value is set in step S203 as described above. The highlight detection unit 104 determines that the input value belongs to the highlight area if the following two conditions are satisfied.
[0051]
Rh <R and Gh <G (1)
max (255-R, 255-G) -min (255-R, 255-G) <K (2)
Here, Rh and Gh are two boundary parameters corresponding to each of the two luminance signal components, K is another boundary parameter for determining that it is a monochromatic processing region, and the accuracy of the input value is 8 It shall be a bit. The condition (1) for comparing each of the two boundary values Rh, Gh with the corresponding input value to determine whether or not all the input values are larger than the corresponding boundary value is clearly a highlight region. Is for. On the other hand, the condition (2) seems to be irrelevant. However, since the effect of the present embodiment appears only for the secondary color of C + M or the tertiary color of C + M + Y, the component of either C or M is almost zero. Should not apply. Therefore, two luminance values that are complementary color components of the first and second colors are subtracted from 255 respectively to obtain two values, and it is determined whether or not the absolute value of the difference between the two values is smaller than the boundary value K. Condition (2) prevents application to the above case. When these conditions are satisfied, the highlight detection means 104 determines that the input value belongs to the highlight area, and asserts a highlight detection flag. Conversely, when the above conditions are not satisfied and when highlight detection is invalid, the highlight detection flag is negated.
[0052]
This process is applied to all output colors (in this embodiment, four colors of CMYK). However, as described above, the highlight detection process is effective only when the output color is Cyan. Invalid when in color. Therefore, the highlight detection flag may be asserted only for Cyan, and all other colors are negated.
[0053]
In step S505, a color conversion process is performed. Details of the processing here will be described later. In step S506, halftoning processing is performed to reduce the multi-value density data output from the color conversion processing to a smaller number of gradations. Details of the processing here will be described later.
[0054]
In step S507, the index / flag combining means 109 combines the index output obtained in step S506 and the highlight detection flag obtained in step S504. As the processing method here, various optimization methods can be considered according to the number of index output values, the data packing method at the time of writing to the index band buffer 117, and the like. For example, considering the case where the index output has 5 values, it can be expressed with 3 bits. On the other hand, since the highlight detection flag is 1 bit, synthesis is possible by generating a 4-bit signal in which the upper 1 bit is assigned to the highlight detection flag and the lower 3 bits are assigned to the index output. In any case, an optimal method depending on the implementation may be used.
[0055]
Finally, in step S508, a write process to the index band buffer 117 is performed. This processing is performed by the index band writing means 108, and the band data is sequentially written in the index band buffer 117. Various writing methods are conceivable depending on the method implemented in step S507. For example, as in the above example, if the combined output of the index output and the highlight detection flag is given by 4 bits, the output of 2 pixels is packed to generate 1 byte data, and this is used as an access unit to store the buffer. What is necessary is just to access RAM which comprises. This is the end of the description of the series of band processing using FIG. 5, and then the color conversion processing in step S505 and the halftoning processing in step S506 will be described.
[0056]
First, the color conversion process will be described. FIG. 6 is a flowchart showing the color conversion process. This processing is performed by the color conversion means 106 in FIG. The configuration is shown in FIG. First, in step S601, it is checked whether the highlight detection flag is asserted. If it is a highlight area, a grid point value for highlight area conversion is input to the interpolation calculation means 304 in step S602, and if it is not a highlight area, the process branches to step S603 for non-highlight area conversion. Grid point values are input. The problem here is how to define the highlight area. This results in the problem of determining Rh and Gh in equation (1). This is determined by a trade-off between the effect of improving the graininess and the apparatus cost. That is, as Rh and Gh increase, the capacity of the highlight area conversion table decreases and the cost decreases, but the range of graininess relief decreases. The most efficient conditions are
Rh, Gh> 255 * (N-2) / (N-1) (N is the number of grid points)
In this case, the highlight area conversion table only needs to hold the lattice point values at the vertices of the cubes C0 to C5 shown in FIG. According to experiments, it is confirmed that this condition is satisfied in a printer having a relatively high resolution. Hereinafter, in the present embodiment, the discussion proceeds assuming that this condition is satisfied.
Note that the grid point value for the highlight region is the sum of the grid point value of the table created for Cyan and the grid point value of the table created for Magenta.
[0057]
The grid point values for the non-highlight area and the grid point values for the highlight area are stored in the non-highlight area color conversion table 302 and the highlight area color conversion table 303, respectively, as described in step S208. Has been. The operations represented by steps S601 to S603 are realized when the selector 305 in FIG. 3 selects a grid point value transmission path to the interpolation calculation unit 304 in accordance with the highlight detection flag.
[0058]
Finally, in step S604, interpolation is performed using the obtained grid point value and input value (RGB), and a multi-value density value is output. In this way, when it is determined that the input value belongs to the highlight area based on the detection result of the highlight detection unit 104, the square projected on the RG plane in the space defined by the input value is the highest highlight. Interpolation is performed using the sum of the lattice point values of the cube vertices located on the side.
[0059]
Note that the interpolation algorithm implemented in the interpolation calculation means 304 may be one in which each cube configured by equally dividing the input space is used as an interpolation space as it is, or each cube is further divided into a plurality of polyhedra and interpolated. You may use what is used as a unit. As the divided space, for example, a tetrahedron and a triangular prism are known. In addition, in order to sequentially perform this conversion process at a high speed, a means for collectively determining a plurality of grid point values to be sent to the interpolation calculation means 304 is absolutely necessary.
[0060]
Such means can be realized by using a configuration as shown in FIG. 8, for example. Here, as an example, the input space is equally divided into 15 axes, and the coordinates of each grid point in the input space are uniquely determined by a 12-bit value consisting of the upper 4 bits of each RGB input value. And In the figure, eight elements of lattice point determination means 801 to 808 determine the coordinates of the lattice points, and correspond one-on-one with SRAMs 809 to 816 connected to the subsequent stage. SRAMs 809 to 816 store grid point values when grid points in the input space are divided into eight groups without duplication. These eight groups are divided based on 3-bit values when the lower 1 bit of the input coordinates (R, G, B) is taken out and arranged in this order from the MSB (Most Significant Bit). In other words, it may be considered that the image is divided into eight different combinations of even and odd RGB colors.
[0061]
A number Bn (n = 0 to 7) assigned to the SRAMs 809 to 816 represents the 3-bit value. For example, B0 assigned to the block 809 is a collection of points whose lower 3 bits of the grid point coordinates stored in the SRAM are “000”, that is, all the RGB of the grid point coordinates are even. It shows that a certain grid point value is stored. Similarly, B3 of the block 812 indicates that a grid point value in which R is even and GB is odd in RGB is stored. Further, the address index in one SRAM is determined by a 9-bit value obtained by taking out the upper 3 bits of the grid point coordinates (R, G, B) and arranging them from the MSB in this order.
[0062]
On the other hand, the selector 817 selects which of the eight registers in the subsequent stage the eight values output from the SRAM (809 to 816) are input. Each of the P0 to P7 registers corresponds to one vertex of an interpolation cube described later. The selection processing means 826 is added according to the shape of the interpolation space, and performs an operation of further selecting the one corresponding to the interpolation space from the eight vertex coordinates input according to the interpolation algorithm described above. Naturally, if the interpolation space is the interpolation cube itself, the selection processing means 826 can be omitted. Finally, the product-sum operation means 827 is a means for performing an interpolation operation, and is usually configured by combining a plurality of product-sum operation circuits.
[0063]
Next, processing operations in this configuration will be described in order. First, the upper 9 bits x 3 colors 9-bit signal and the lower 1 bits x 3 colors 3 bits signal are simultaneously input to the eight lattice point determination means 801 to 808. These eight coordinate determining means determine coordinates from the above two signals, but their operation modes are different. The SRAM number (Bn mentioned above) corresponding to these means is decomposed 3 bits at a time, expressed as Kr, Kg, Kb from MSB, the input 3 bit signal is decomposed bit by bit, MSB to Lr, Lg, Lb, the input 9-bit signal is decomposed 3 bits at a time, and expressed as Mr, Mg, Mb from the MSB, the output grid point coordinates are
Ur << 6 + Ug << 3 + Ub (3)
Is required. Here, << n represents shifting left by n bits. Up (p = r, g, b) is given by the following equation.
[0064]
[Expression 1]
Figure 0004185751
[0065]
The 9-bit lattice point coordinates obtained by the above equation are sent as they are as address indexes to the SRAMs 809 to 816, and the eight lattice point values located at the addresses are simultaneously output to the selector 817 from the eight SRAMs. . As described above, the selector 817 selects which of these eight values is output to the P0 register to the P7 register. The P0 register to the P7 register respectively select the eight vertices of the interpolation cube shown in FIG. Is one-to-one, the selection algorithm is represented by the table shown in FIG.
[0066]
Finally, a value corresponding to the shape of the interpolation space is selected from the eight values output from the register in block 826, and the output is calculated by the calculation means 827. The selection between the configuration and the highlight area shown in FIG. 3 is performed when the highlight area conversion table 303 in FIG. 3 has the above-described configuration, and these are expressed as B0 ′ to B7 ′. 801 to 808 are also input to B0 ′ to B7 ′, and the selector 305 in FIG. 3 is configured to output either one of B0 to B7 or B0 ′ to B7 ′. It is possible to operate without.
[0067]
In this way, when the input value belongs to the highlight area as a result of detection by the highlight detection means 104, the density output table corresponding to the first color and the density output table corresponding to the second color. If the input value does not belong to the highlight area, the interpolation calculation is performed using the density output table corresponding to the first color, and the input is performed. A process of converting the value into a density output is realized. This is the end of the description of the color conversion process in step S505.
[0068]
Next, the halftoning process in step S506 will be described. The halftoning process is performed by the halftoning means 107 in FIG. 1, and the algorithm used is a generally well-known error diffusion method. An example of the configuration is as shown in FIG. The input multi-value density control signal is input to the adder 1101. On the other hand, the accumulated error output from the error calculation means 1102 is input to the other input terminal of the adder 1101. This accumulated error is obtained by adding a predetermined coefficient to an error value generated in a pixel adjacent to the pixel currently processed (target pixel). This coefficient is called a diffusion coefficient, and various factors having characteristics in the value and spatial arrangement have been devised. In this method, the diffusion coefficient to be used and its spatial arrangement are not particularly limited. For example, the Floyd Steinberg type coefficient arrangement shown in FIG. 12 is often used. In the drawing, a circle 1202 indicates a pixel of interest, W0 to W3 indicate windows for picking up previously processed pixels, and an arrow 1204 indicates a scanning direction, that is, a moving direction of the pixel of interest.
[0069]
The adder 1101 adds the accumulated error and the density value (hereinafter referred to as an added density) and outputs the result to the comparator 1105. The comparator 1105 compares the input added density with a set threshold value, and outputs a set index if the input value is larger. The number of states that the index can have is usually determined by the relationship between the input resolution and the output resolution of the printer engine. In an area gradation output device such as an ink jet printer, the number of states of a unit pixel determined by its physical resolution is usually a binary value of “1” or “0”, so the number of index states is (Oh / Ih) * (Ov / Iv) +1. Here, Oh and Ov are output resolutions in the horizontal direction and the vertical direction, respectively, and Ih and Iv are input resolutions in the horizontal direction and the vertical direction, respectively.
[0070]
For example, if the input resolution is 600 dpi in both the horizontal and vertical directions and the output resolution is 1200 dpi in both the horizontal and vertical directions, the number of states of the index is five. Taking the case where the index is 5 as an example, the relationship between the input and the index output of the comparator 1105 is as shown in FIG. In the figure, I is an addition error, and T0, T1, T2, and T3 are threshold values. If the bit width of the comparator input value is 8 bits,
0 <= T0 <64 (5)
64 <= T1 <128 (6)
128 <= T2 <192 (7)
192 <= T3 <255 (8)
Satisfy the relationship.
[0071]
Next, the index output from the comparator 1105 is input to the index converter 1106, bit-extended so as to have the same accuracy as the addition error, and output as an output equivalent density. For example, if the accuracy of the addition error is 8 bits, the relationship between the index and the output converted density output after the index conversion is
Out = min (255, In << 6) (9)
It is represented by The output converted concentration is input to the adder 1104. The adder 1104 stores the result obtained by subtracting the output converted density from the added density in the error buffer 1103.
[0072]
The above is the operation of the error diffusion method using the general configuration shown in FIG. 11, and there are various improved systems designed to overcome the drawbacks of the error diffusion method. For example, as a well-known defect, there are phenomena such as (1) “sweeping caused by deviation of error distribution” and (2) “texture caused by repetition of a specific pattern”. As means for avoiding the phenomenon of (1), for example, a method of changing a threshold value according to an input value and eliminating an error distribution bias is known. Further, as means for avoiding the phenomenon (2), for example, a method of suppressing texture generation by adding random noise with a small amplitude to the threshold or changing the scanning direction for each line is known. . Note that noise superposition, which is one of the solving means (2), is also used as means for preventing dot overlap and improving image quality by changing the generation sequence for each color. It is naturally possible to apply such an improved error diffusion method to the image processing apparatus according to the present embodiment, and the effects of the present embodiment can be further enhanced.
[0073]
In this way, the density output converted by the color conversion means 106 is subjected to error diffusion processing to obtain a binary or multi-level index output. This is the end of the description of the halftoning process in step S506.
[0074]
As described above, the halftoning process performed by the image processing apparatus according to the present embodiment is an error diffusion process. However, in the present embodiment, the meaning of the error diffusion output changes depending on the output color to be processed. Error diffusion output for processing phases other than Cyan fits the normal definition of error diffusion, but in Cyan's processing phase, Cyan monochrome processing and Blue (Cyan + Magenta) depend on the area to which the input luminance data belongs. In a region where the processing for) is dynamically switched and both are mixed, the operation mode in a strict sense is different. Therefore, in the Cyan processing phase, (1) when the input luminance data is constantly in the highlight region, (2) when the input luminance data is constantly in the non-highlight region, (3) both are mixed. Let's consider the operation modes in three cases.
[0075]
(1) When the input luminance data is constantly in the highlight area
The error diffusion input value is always equal to the Blue component (Cyan + Magenta). Therefore, the concentration average value is stored for the Blue component, and there is no contradiction in this sense. In addition, as compared with the general monochromatic processing for the input belonging to the highlight region, the input value is naturally increased, so that the spatial frequency of the error diffusion output is increased. The operation mode in this case is exactly the same as that of normal error diffusion.
[0076]
(2) When the input luminance data is constantly in the non-highlight area
The error diffusion input value is always equal to the Cyan component. Therefore, the concentration average value is stored for the Cyan component, and there is no contradiction in this sense. The operation mode in this case is exactly the same as that of normal error diffusion.
[0077]
(3) When both are mixed
In this case, since the Blue component and the Cyan component are spatially mixed, the storability of the density average value in the strict sense does not hold. However, as described later, replacement with the Magenta component is performed in the subsequent bitmapping means. So the macro average concentration is preserved. Rather, what matters is the behavior at the boundary where the processing with the Blue component switches to the processing with the Cyan component (or vice versa). At the boundary portion, the dominant system is switched, so that the seam is easily perceived as a pseudo contour. However, from the condition (2) of the highlight detection means described above, when the control of Cyan or Magenta is unilateral, almost no primary color processing occurs in the highlight area, so the transition direction in this case is Blue or Gray. From C to Cyan or Magenta, and blue or gray. In the former case, since the boundary portion is always accompanied by a change in color, the transition at the boundary that is originally minute is hidden by the change in color and becomes almost inconspicuous. In the latter case, on the contrary, since the density preservation is good, the boundary between the two is smoothly connected.
[0078]
The band processing and the description of the left block in FIG. 1 have been completed, and the operation of the right block in FIG. Since the block centering on the CM rearrangement unit 112 in the central part and the block centering on the right-side bitmapping unit 119 are largely divided functionally, the operation here will be described separately in two blocks. .
[0079]
FIG. 14 is a flowchart showing the operation of the central block. In the figure, the loop composed of steps S1401 to S1413 is a process related to C and M. As is apparent from the figure, the processes related to colors other than CM are not included here.
[0080]
Processing related to C and M is performed in units of windows. The parameter Bh in step S1401 represents the number of rasters per band, and Wh represents the height of the window. Here, Bh is assumed to be an integral multiple of Wh. When the row position in units of windows is designated in step S1401, it is determined in step S1402 whether the window row number is an even number or an odd number. If it is even, the even flag is set in step S1403. If it is odd, the odd flag is set in step S1404. When the even flag is set, the column direction processing in units of windows configured by the loop from step S1405 to step S1412 is sequentially performed from left to right in units of windows. If the flag is an odd number, it is processed from right to left in the same manner.
[0081]
The parameter Ww in step S1405 represents the window width, and L represents the number of pixels per raster. Here, for simplicity, it is assumed that L is an integer multiple of Ww. When the column position in the window unit is designated in step S1405, the data in the index band buffer 117 at the corresponding position is read in window unit under the control of the window buffer control unit 120 in step S1406, and the index / flag separation unit. 111 is stored in the window buffer. This reading process is performed for both C and M, and each is stored in a different window buffer.
[0082]
The image of the window portion cut out from the index band is as shown in the example of FIG. As shown in the figure, when scanning from left to right, the range of Ww × Wh is read at a time with the upper left corner of the window 1501 as the origin. When scanning from the right to the left, the range of Ww × Wh is read at a time with the upper right end of the window 1502 as the origin. The coordinates in the index band buffer at the window origin are (i * Ww, j * Wh) for left / right scanning, and ((L-1) -i * Ww, j * Wh) for right / left scanning. .
[0083]
After the data is stored in the C and M window buffers in step S1406, flag / index separation processing is performed in the index / flag separation means 111 in a loop composed of steps S1407 to S1409. The processing here is the reverse of the processing performed by the index / flag combining means 109 for all the data in the C window buffer, and the highlight detection flag is separated and the pixel whose flag is 1 is processed. The pixel number, that is, the numerical value shown in FIG. 15 is stored in the pixel number buffer, and at the same time, the data in the window buffer is returned to the index output.
[0084]
In step S1410, a C / M rearrangement process is performed. This process will be described later. When the rearrangement process is completed, in step S1411, the data in the window buffer is written back to the corresponding position in the index band buffer 117 under the control of the window buffer control means 120. When the above-described series of processing is performed in the column direction in units of windows, the sequence for CM is completed by advancing the pointer in the row direction and performing processing for one band.
[0085]
Next, the CM rearrangement process in step S1410 will be described. First, as a premise, it should be noted that the index output at the position where the highlight detection flag is set is almost 1 or 0 for both CMs. This is because the output device targeted by this embodiment has a high resolution. When a well-designed error diffusion method is used, graininess is no longer a problem as long as the spatial frequency of output dots per color is about 150 dpi. If a printer having an output resolution of 1200 dpi reproduces a pattern having a spatial frequency of 150 dpi, on average, dots are turned on at a rate of 1 in 8 × 8 dots. If this is converted into an 8-bit input density, it becomes about level 4, and this value may be set as the upper limit of the highlight area. Therefore, even if the number of values that can be taken by the index is larger than two, the set highlight area is only a very bright area, so the error diffusion output is mostly 1 even if it is large.
[0086]
In the vicinity of a relatively large edge from the non-highlight region to the highlight region in Blue or Gray, two or more index outputs may be generated with the highlight detection flag set. In particular, in a processing system in which sweeping countermeasures are taken, since the response to the edge becomes faster, it is considered that the probability of occurrence increases. If the process is forcibly switched in such a state, adverse effects such as the generation of a pseudo contour can be considered. Therefore, the highlight process is limited to the case where the index is 1, as will be described later.
[0087]
FIG. 16 is a flowchart showing this process. First, in step S1601, the inside of the window for M (M window) is searched, the replacement source pixels are specified, the total number Rc thereof is obtained, and the M index (M index) at the corresponding position is cleared to zero. A replacement source pixel is a pixel having a highlight detection flag of 1 and an M index of 1 at the corresponding position. Therefore, in this process, the value of M at the pixel number position stored in the pixel number buffer created in step S1408 may be examined to determine whether or not it is 1.
[0088]
Next, in step S1602, the unreplaced pixel stack is searched to obtain the total sum Rp of the number of past replacement source pixels. Here, the non-replaced pixel stack has a structure as shown in the example of FIG. 17, and Rc from the previous process to the previous process is stored in t0 to tn-1. Rp is the sum of t0 to tn-1. It is assumed that the non-replaced pixel stack is initialized to 0 at an arbitrary timing before the first CM rearrangement process is performed. In step S1603, Rc and Rp are added to obtain the sum R of the number of replacement source pixels in the current process.
[0089]
In this way, the index output corresponding to the second color is searched in a two-dimensional window having a predetermined size, and the number of pixels in the highlight area and having an index value of 1 is obtained. Is recorded as the number of replacement source pixels, and the process of replacing the index value with 0 is realized.
[0090]
In step S1604, the number Q of replacement candidate pixels inside the C window is obtained. Here, the replacement destination candidate pixel is a pixel having a highlight detection flag of 1 and a C index of 1 at the corresponding position. Accordingly, in this process, the value of C at the pixel number position stored in the pixel number buffer created in step S1408 may be inspected to determine whether or not it is 1. In this way, in the index output corresponding to the first color, the inside of the two-dimensional window having a predetermined size is searched, and the number of pixels in the highlight area and index 1 is obtained. A process of recording as the number of replacement destination candidate pixels and recording the pixel position as the replacement destination coordinates is realized.
[0091]
If Q is 0, the subsequent processing is skipped and the process jumps to step S1610. If Q is not 0, the number of replaceable pixels P = min (R, Q) in the current process is obtained in step S1606. In this way, the process of recording the smaller of the replacement source pixel number and the replacement destination candidate pixel number as the replaceable pixel number is performed.
[0092]
In step S1607, P replacement destination pixels are obtained using random numbers. This process is a process of selecting P pixels from the Q replacement destination candidate pixels obtained in step S1604. The selection algorithm using random numbers can be realized as follows, for example.
[0093]
(1) An array QA is created that stores the pixel numbers (see FIG. 15) of Q replacement candidate pixels. This process can be performed at the same time in step S1604.
(2) Generate Q random numbers and associate this with the index of array QA.
(3) The random numbers corresponding to the above indexes are compared, and P indexes are selected in descending order.
(4) Elements of the array QA corresponding to the P indexes are set as replacement pixels.
In this way, a process for obtaining the number of replacement destination coordinates equal to the number of replaceable pixels using a random number is realized.
[0094]
  In step S1608, the C pixel at the target position is cleared to 0 and the M pixel is set to 1 for the selected pixel..
[0095]
In step S1609, the number of replaced pixels is subtracted starting from the end of the unsubstituted pixel stack. This process will be described later. Finally, in step S1610, the unsubstituted pixel stack is pushed with Rc. At this time, the value at the end of the stack disappears.
[0096]
Next, the subtraction processing of the unsubstituted pixel stack in step S1609 will be described using the flowchart of FIG. The loop from step S1801 to step S1806 is a subtraction process inside the unsubstituted pixel stack. In step S1802, the number of non-replaced pixels at the current position of the stack is subtracted from the number of replaced pixels. If this result is 0 or less, the subtraction process ends, and the number of non-replaced pixels at the current position of the stack is updated in step S1807, and the loop is exited. On the other hand, if it is larger than 0, there are still consumed pixels as replaced pixels, so the number of replaced pixels is updated in step S1805 and the process proceeds to the next stack position. When the subtraction processing in all the stack areas is completed in this way, it means that even if all the pixels in the stack are consumed, the number of replaced pixels has not been reached, so Rc is consumed in step S1807.
[0097]
In this way, the index output corresponding to the first color obtained by the halftoning means 107 is compared with the index output corresponding to the sum of the first and second colors, and the second index output is obtained. The shaping process is realized. This completes the description of the CM rearrangement process.
[0098]
Finally, returning to FIG. 1 again, the operation of the block centering on the bitmapping means 119 will be described. All the processes here are performed for each color. First, the index band reading means 110 reads an index for one band from the index band buffer 117. Next, the bitmap converting means 119 performs index expansion on each read pixel to generate a bitmap. This processing is processing for converting the value of the input pixel represented by the index into a bitmap corresponding to the output resolution of the printer. As described in the description of the halftone process, if the input resolution and the output resolution are 600 dpi and 1200 dpi, respectively, four output pixels of 2 × 2 correspond to one input pixel. At this time, the number of values that the index has is five values from 0 to 4, and it is only necessary to develop into a 2 × 2 bitmap pattern corresponding to these values.
[0099]
Various methods have been devised for the bitmap expansion method, but the most commonly used method is a replacement method using a table. For example, a table as shown in FIG. 19 is used to develop a bitmap corresponding to the index. In the figure, the numbers in the leftmost column indicate index numbers. P0, P1,... Indicate the position of Kn + 0 in the index. Here, n is an integer greater than or equal to 0, and K is a period. Usually, a plurality of such pattern table sets are prepared, and they are used by switching them according to some rule (for example, column unit).
[0100]
When the bitmap processing is performed on all the read pixels, the generated bitmap image is sent to the head drive control unit 113 and arranged in a form corresponding to the physical arrangement of the nozzles. Be replaced. At this time, it is usually designed so that the above-described bitmap generation is performed for the next color in parallel. When the bitmap processing and rearrangement for all colors are completed in this way, the head drive control means 113 generates a head control signal, drives the printer engine 114, and prints for one band.
[0101]
This is the end of the description of the operation of the present embodiment. Finally, some points of the algorithm used in the present embodiment will be described.
[0102]
(1) The M error diffusion output is used when determining the number of replacement pixels.
In the present embodiment, when the pixel is reconfigured, the distribution of the error diffusion output with respect to the CM mixture component is used as a base, and the output distribution of M is not actively used. This is because in an appropriately designed error diffusion method, the output distribution has almost ideal spatial characteristics at the input density, and if this distribution is shifted even a little, it will be folded back to a low frequency component. This is because large noise that is generated is generated. Therefore, in the present embodiment, a technique that does not disturb the reference distribution as much as possible is adopted.
[0103]
(2) A two-dimensional window is used for replacement.
This is because in one-dimensional processing, no matter how good quality random numbers are used, two-dimensional aggregation that occurs locally cannot be avoided, and as a result, color texture is generated.
[0104]
(3) Propagation of replacement failure pixels is suppressed.
When considering only the preservation of concentration, it is better to propagate it indefinitely. However, as a matter of course, the natural picture correlation is local. Therefore, it is more appropriate to cut off at an appropriate place, rather than generating extra noise, even if the preservation of density is somewhat sacrificed.
[0105]
(4) Random numbers are used to determine the replacement destination.
It has been experimentally confirmed that searching for an ON pixel from the output distribution of M pixels and adopting the closest position from the CM distribution only complicates the processing and has almost no difference in effect. This is probably because the output distribution of the error diffusion method is probably random, and both are almost equivalent as means for determining the position.
[0106]
As described above, in this embodiment, the CM relocation unit and the bitmapping unit are configured so as to share the band memory area, thereby minimizing an increase in device cost due to the function expansion. There is an effect that you can.
[0107]
In the present embodiment, a four-color output printer is assumed, but the present invention is applicable to all cases where the output color is two or more. It is obvious that the two colors to be combined are not limited to C and M, but can be easily expanded to any combination of outputs such as two types of outputs having the same color and different densities.
[0108]
(Second Embodiment)
Unlike the first embodiment, the second embodiment of the present invention extends the application range to a low-resolution printer. FIG. 20 shows the configuration of this embodiment. In the figure, parts having the same reference numerals as those in FIG. 1 indicate that they have the same functions. The difference from FIG. 1 is that the configuration of the right block is integrated, and the processing order of the CM rearrangement unit 112 and the bitmapping unit 119 is reversed. Accordingly, a window buffer reading unit 2001 is added instead of the window buffer control unit 120. The window buffer reading unit 2001 is obtained by omitting the function of controlling the writing to the index band buffer 117 from the window buffer control unit 120, and all other functions are the same.
[0109]
Since the processing mechanism of the left block in this embodiment is completely the same as that in FIG. 1, the description is omitted, and only the right block will be described. When the index output processing for one band is completed by the left block, the block constituted by the window buffer reading unit 2001, the bit map converting unit 119, and the CM rearranging unit 112 first performs processing related to CM and then performs other colors. Perform processing for.
[0110]
This processing sequence is basically the same as that shown in FIG. 14, except that the bitmap expansion processing in the window area is performed between step S1409 and step S1410, and the CM rearrangement processing is performed. To be performed in the bitmapped window (in this case, the pixel number buffer created in step S1408 is shared between output bitmaps originating from the same input pixel), and step S1411. The write processing to the index band buffer in step S1417 is a write operation to the bitmap memory of the head control unit 113. Since the subsequent operations are all the same as those in the first embodiment, description thereof will be omitted.
This is the end of the description of the second embodiment.
[0111]
(Third embodiment)
The third embodiment of the present invention assumes that an ink jet printer is used as the image processing apparatus. The output colors are assumed to be four colors of C, M, Y, and K. FIG. 21 shows the configuration of this embodiment. In the figure, the same reference numerals as those in FIG. 1 denote the same functions. In FIG. 21, the halftoning means 2101 has an essential function equivalent to that of the halftoning means 107 shown in FIG. 1, but a function for performing adaptive processing according to the color is added. The index band control unit 2102 is obtained by adding a reading function to the index band writing unit 108.
[0112]
Next, the operation of the image processing apparatus according to this embodiment will be described in detail. The operation of the right block in FIG. 21 is exactly the same as that in FIG. 1, so the description thereof will be omitted and only the left block will be described. The left block in FIG. 21 performs a series of operations for processing one band for each color and storing the result in the index band buffer 117. This basic sequence is exactly the same as that shown in FIG. 2, but the contents of the band processing in step S213 are different.
[0113]
FIG. 22 is a flowchart showing a band processing sequence according to this embodiment. 5 differs from FIG. 5 in that after the color conversion process is performed in step S505, the process of M and the process of other colors are switched according to the branch condition of step S2201. Since processing relating to colors other than M is performed from step S506 to step S508, the operation is the same as that in the first embodiment.
[0114]
Next, the halftoning process in the M phase in step S2202 will be described. FIG. 23 shows a schematic configuration of the halftoning means 2101. In the figure, the same reference numerals as those in FIG. 11 are assigned the same functions. A difference from the configuration of FIG. 11 is a comparator 2301, in which a mode setting signal, a highlight detection flag, and a C index are input and output. The mode setting signal is used to determine whether the process is a process related to M, and is output to the corresponding register of the halftoning means 2101 at an arbitrary time before step S212 in FIG. . The highlight detection flag and the Cyan index separated through the index / flag separation means 111 are input from the Cyan index / flag output at the corresponding position read from the index band control means 2102. If the mode setting signal indicates that the process is not M, a normal comparing operation is performed, so that the operation of the halftoning means 2101 is completely equivalent to the halftoning means 107 shown in FIG.
[0115]
FIG. 24 shows the processing flow of halftoning when the operation mode is M. The processing in step S2401 and step S2402 is a procedure for obtaining the processed C index output Ci and highlight detection flag Hf at the same coordinates as the coordinates of the currently processed M pixel.
[0116]
In step S2403, the M input and the accumulated error are added to calculate the added density. This is the same as a normal error diffusion process. When these are obtained, it is checked in step S2404 whether the current position is included in the highlight area. If it is not a highlight area, normal threshold processing is performed in step S2410. On the other hand, if it is a highlight area, it is determined in step S2405 whether there is a C output. If there is no C output, the output index Mi of M is set to 0 in step S2409. On the other hand, if there is C output, normal threshold processing is performed in step S2406 to obtain Mi. In step S2407, the calculated Mi is compared with the input Ci, and the smaller one is set to Mi again. In step S2408, a value obtained by subtracting Mi from Ci is set to Ci.
[0117]
In this way, among the converted density outputs, the density output other than M is subjected to error diffusion processing to obtain an index output. For the density output of M, an index output corresponding to C, Processing for controlling the error diffusion output based on the highlight detection flag indicating the detection result by the highlight detection means 104 to obtain an index output corresponding to the second color and adjusting the index output corresponding to C Is realized. When a series of threshold processing is completed, error calculation and storage are performed in step S 2411, and finally Ci and Mi are written in the index band buffer 117.
[0118]
The above is the halftoning processing operation when processing M, and what is characteristic of this processing is the processing in the highlight area in steps S2405 to S2408 described above. Finally, let's add some consideration to this highlight area algorithm. When Ci is 0 in step S2405, Mi is forcibly set to 0. This is a measure for respecting the output distribution obtained by the CM mixing and avoiding disturbance as much as possible. The idea is the same as that described at the end of the first embodiment. On the other hand, the replacement processing by subtraction performed in step S2407 and step S2408 almost ensures C density preservation. It is clear that the concentration preservation for M is maintained in the same way as normal error diffusion.
[0119]
In the present embodiment, a four-color output printer is assumed, but the present invention is applicable to all cases where the output color is two or more. It is obvious that the two colors to be combined are not limited to C and M, but can be easily expanded to any combination of outputs such as two types of outputs having the same color and different densities.
This is the end of the description of the present embodiment.
[0120]
In the present invention, a storage medium storing software program codes for realizing the functions of the above-described embodiments is supplied to a system or apparatus, and the computer (or CPU or MPU) of the system or apparatus stores the storage medium. Needless to say, this can also be achieved by reading and executing the program code stored in.
[0121]
In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium storing the program code constitutes the present invention.
[0122]
As a storage medium for supplying the program code, for example, a floppy (registered trademark) disk, a hard disk, a magneto-optical disk, an optical disk, a CD-ROM, a CD-R, a magnetic tape nonvolatile memory card, a ROM, or the like is used. I can do it.
[0123]
In addition, the functions of the above-described embodiments are realized by executing the program code read by the computer, and the OS running on the computer is one of the actual processes based on the instruction of the program code. The functions of the above-described embodiment can be realized by performing some or all of the processes.
[0124]
Further, after the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. The CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments can be realized by the processing.
[0125]
It goes without saying that the present invention can also be applied to the case where the program is distributed to a requester via a communication line such as personal computer communication from a storage medium that records the program code of software that implements the functions of the above-described embodiments. Yes.
[0126]
Furthermore, various modifications can be made without departing from the spirit and scope of the present invention. Accordingly, other embodiments are within the scope of the claims.
[0127]
【The invention's effect】
As described above, according to the present invention, the first density output or the sum of the first density output and the second density output is applied when calculating the first density output in the color conversion process. Thus, the image quality can be improved at high speed and at low cost by improving the graininess in the highlight area.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a first embodiment of the present invention.
FIG. 2 is a flowchart showing the operation of the first embodiment of the present invention.
3 is a block diagram illustrating a schematic configuration of a color conversion table reading unit and a color conversion unit in FIG. 1. FIG.
4 is a diagram illustrating a storage image inside a color conversion table buffer in FIG. 1. FIG.
FIG. 5 is a flowchart showing an operation of band processing in the first embodiment of the present invention.
FIG. 6 is a flowchart showing color conversion processing.
FIG. 7 is a diagram for explaining a spatial arrangement of highlight areas in an interpolation space in color conversion processing.
FIG. 8 is a block diagram illustrating an example of a configuration for collectively reading grid point coordinates of an interpolation grid in color conversion processing.
9 is a diagram illustrating an example of a spatial arrangement of lattice points on an interpolation cube corresponding to the register in FIG. 8;
10 is a table showing an example of a selector selection algorithm in FIG. 8. FIG.
FIG. 11 is a block diagram showing an example of a configuration of halftoning means in the first embodiment of the present invention.
12 is a table showing an example of the operation of the comparator in FIG.
FIG. 13 is a diagram showing an example of a diffusion coefficient arrangement used in the error diffusion method.
14 is a flowchart showing the operation of a block centering on the CM rearrangement means in FIG. 1. FIG.
15 is a diagram showing an image of window data stored in the index / flag separation means in FIG. 1. FIG.
FIG. 16 is a flowchart illustrating an example of a CM rearrangement process.
FIG. 17 is a diagram illustrating an example of a structure of an unsubstituted pixel stack.
FIG. 18 is a flowchart showing processing in step S1609 in FIG.
FIG. 19 is a diagram showing an example of index expansion processing performed by the bitmapping means in FIG. 1;
FIG. 20 is a block diagram showing a configuration of a second embodiment of the present invention.
FIG. 21 is a block diagram showing a configuration of a third exemplary embodiment of the present invention.
FIG. 22 is a flowchart showing a band processing sequence in the third embodiment of the present invention;
FIG. 23 is a block diagram showing a schematic configuration of halftoning means in the third embodiment of the present invention.
FIG. 24 is a processing flow of halftoning when the operation mode is M in the third embodiment of the present invention.
[Explanation of symbols]
101 CPU
102 Image data reading means
103 γ conversion means
104 Highlight detection means
105 Color conversion table reading means
106 Color conversion means
107, 2101 halftoning means
108 Index band writing means
109 Index / flag synthesis means
110 Index band reading means
111 Index / flag separation means
112 CM relocation means
113 Head drive control means
114 Printer engine
115 Image data buffer
116 color conversion table buffer
117 Index band buffer
118 CPU bus
119 Bit-mapping means
120 Window buffer control means
302 Color conversion table for non-highlight area
303 Color Conversion Table for Highlight Area
304 Interpolation calculation means
305 selector
801, 802, 803, 804, 805, 806, 807, 808 Lattice point determining means
809, 810, 811, 812, 813, 814, 815, 816 SRAM 817 selector
818 P0 register
819 P1 register
820 P2 register
821 P3 register
822 P4 register
823 P5 register
824 P6 register
825 P7 register
826 Selection processing means
827 Product-sum operation means
1101, 1104 Adder
1102 Error calculation means
1103 Error buffer
1105 2301 Comparator
1106 Index converter
1501, 1502 window
2001 Window buffer reading means
2102 Index band control means

Claims (7)

多値のカラー輝度信号を、2値または多値のカラー濃度制御信号へ変換する画像処理装置であって、
前記カラー輝度信号の入力値がハイライト領域に属するかどうかを検出するハイライト検出手段と、
該ハイライト検出手段による検出の結果、前記入力値がハイライト領域に属する場合には、第1の色に対応した濃度出力用のテーブルの格子点値と第2の色に対応した濃度出力用のテーブルの格子点値との和からなる格子点値を有するテーブルを用いて補間演算を行い、前記入力値がハイライト領域に属さない場合には、前記第1の色に対応した濃度出力用のテーブルを用いて補間演算を行い、前記入力値を濃度出力に変換する色変換手段と、
該色変換手段により変換された濃度出力を誤差拡散処理して、2値または多値のインデックス出力を求めるハーフトーニング手段と、
該ハーフトーニング手段により求められたインデックス出力のうち、前記第1の色に対応したインデックス出力と、前記第1及び第2の色の和に対応したインデックス出力とを比較して、該第1及び第2の色の和に対応したインデックス出力を整形する手段とを備え
前記整形する手段は、
前記第2の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換元画素数として記録し、前記インデックス値を0に置き換える第1の手段と、
前記第1の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内部を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換先候補画素数として記録し、該画素の位置を置換先座標として記録する第2の手段と、
前記置換元画素数及び置換先候補画素数のうち小さい方を置換可能画素数として記録する第3の手段と、
乱数を用いて、前記置換可能画素数と等しい数の置換先座標を求める第4の手段と、
前記置換先座標にある前記第1の色に対応したインデックス出力を0にして、前記第2の色に対応したインデックス出力を1にする第5の手段と
を備えたことを特徴とする画像処理装置。
An image processing apparatus for converting a multi-value color luminance signal into a binary or multi-value color density control signal,
Highlight detection means for detecting whether an input value of the color luminance signal belongs to a highlight region;
If the input value belongs to the highlight area as a result of the detection by the highlight detection means, the grid point value of the density output table corresponding to the first color and the density output corresponding to the second color When the interpolation calculation is performed using a table having a grid point value that is the sum of the grid point values of the table, and the input value does not belong to the highlight area, the density output corresponding to the first color is used. Color conversion means for performing an interpolation operation using the table of the above and converting the input value into a density output;
Halftoning means for performing error diffusion processing on the density output converted by the color conversion means to obtain a binary or multivalued index output;
Of the index outputs obtained by the halftoning means, the index output corresponding to the first color is compared with the index output corresponding to the sum of the first and second colors, and the first and second Means for shaping an index output corresponding to the sum of the second colors ,
The means for shaping is
The index output corresponding to the second color is searched in a two-dimensional window having a predetermined size, and the number of pixels in the highlight area and having an index value of 1 is obtained and replaced with the original pixel. A first means for recording as a number and replacing the index value with 0;
In the index output corresponding to the first color, the inside of a two-dimensional window having a predetermined size is searched to find the number of pixels in the highlight area and having an index value of 1, and this is replaced with a candidate for replacement destination A second means for recording the number of pixels and recording the position of the pixel as a replacement coordinate;
A third means for recording the smaller of the replacement source pixel number and the replacement destination candidate pixel number as the replaceable pixel number;
A fourth means for obtaining a number of replacement destination coordinates equal to the number of replaceable pixels using a random number;
Fifth means for setting an index output corresponding to the first color at the replacement destination coordinates to 0 and setting an index output corresponding to the second color to 1;
The image processing apparatus characterized by comprising a.
前記ハイライト検出手段は、前記第1及び第2の色の補色成分である2つの輝度信号成分の各々に対応した2つの境界値と、単色処理領域であることを示す他の1つの境界値を有し、
前記2つの境界値の各々と、対応する前記入力値とを比較し、全ての入力値が対応する前記境界値より大きいかどうかを判別する第1の手段と、
前記第1及び第2の色の補色成分である2つの輝度値を255からそれぞれ減算して2つの値を求め、該2つの値の差の絶対値が前記他の1つの境界値より小さいかどうかを判別する第2の手段と、
前記第1の手段及び前記第2の手段の判別結果が共に真であったときに、前記入力値がハイライト領域に属することを決定する第3の手段と
を備えたことを特徴とする請求項に記載の画像処理装置。
The highlight detection means includes two boundary values corresponding to each of the two luminance signal components which are complementary color components of the first and second colors, and another boundary value indicating a single color processing region Have
A first means for comparing each of the two boundary values with the corresponding input value to determine whether all input values are greater than the corresponding boundary value;
The two luminance values which are complementary color components of the first and second colors are subtracted from 255 respectively to obtain two values, and whether the absolute value of the difference between the two values is smaller than the other one boundary value A second means for determining whether or not
And a third means for determining that the input value belongs to a highlight area when both the determination results of the first means and the second means are true. Item 8. The image processing apparatus according to Item 1 .
前記色変換手段は、前記ハイライト検出手段の検出結果に基づき、前記入力値がハイライト領域に属すると判断された場合は、前記入力値により定義される空間において、前記第1及び第2の色の補色成分を表す2軸で構成される平面に射影された正方形が、最もハイライト側に位置するような立方体頂点の格子点値の和を用いて補間演算を行うことを特徴とする請求項に記載の画像処理装置。The color conversion means, when it is determined that the input value belongs to a highlight area based on the detection result of the highlight detection means, the first and second in the space defined by the input value An interpolation operation is performed using a sum of lattice point values of cube vertices such that a square projected on a plane composed of two axes representing complementary color components of color is positioned closest to the highlight side. Item 8. The image processing apparatus according to Item 1 . 多値のカラー輝度信号を、2値または多値のカラー濃度制御信号へ変換する画像処理装置の画像処理方法であって、
前記カラー輝度信号の入力値がハイライト領域に属するかどうかを検出するステップと、
該検出の結果、前記入力値がハイライト領域に属する場合には、第1の色に対応した濃度出力用のテーブルの格子点値と第2の色に対応した濃度出力用のテーブルの格子点値との和からなる格子点値を有するテーブルを用いて補間演算を行い、前記入力値がハイライト領域に属さない場合には、前記第1の色に対応した濃度出力用のテーブルを用いて補間演算を行い、前記入力値を濃度出力に変換するステップと、
該変換された濃度出力を誤差拡散処理して、2値または多値のインデックス出力を求めるステップと、
該求められた前記第1の色に対応したインデックス出力と、前記第1及び第2の色の和に対応したインデックス出力とを比較して、該第1及び第2の色に対応したインデックス出力を整形するステップとを備え
前記整形するステップは、
前記第2の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換元画素数として記録し、前記インデックス値を0に置き換える第1のステップと、
前記第1の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内部を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換先候補画素数として記録し、該画素の位置を置換先座標として記録する第2のステップと、
前記置換元画素数及び置換先候補画素数のうち小さい方を置換可能画素数として記録する第3のステップと、
乱数を用いて、前記置換可能画素数と等しい数の置換先座標を求める第4のステップと、
前記置換先座標にある第1の色に対応したインデックス出力を0にして、前記第2の色に対応したインデックス出力を1にする第5のステップと
を備えたことを特徴とする画像処理方法。
An image processing method of an image processing apparatus for converting a multi-value color luminance signal into a binary or multi-value color density control signal,
Detecting whether an input value of the color luminance signal belongs to a highlight area;
Result of said detecting, if the input value belongs to a highlight region, grid points of the table for the density output corresponding to the grid point values of the first table for density output corresponding to the color and the second color Interpolation is performed using a table having a grid point value that is the sum of the values, and when the input value does not belong to a highlight area, a density output table corresponding to the first color is used. Performing an interpolation operation and converting the input value into a density output;
Performing error diffusion processing on the converted density output to obtain a binary or multi-level index output;
The index output corresponding to the first color is compared with the index output corresponding to the sum of the first and second colors, and the index output corresponding to the first and second colors is compared. A step of shaping ,
The shaping step comprises:
The index output corresponding to the second color is searched in a two-dimensional window having a predetermined size, and the number of pixels in the highlight area and having an index value of 1 is obtained and replaced with the original pixel. A first step of recording as a number and replacing the index value with 0;
In the index output corresponding to the first color, the inside of a two-dimensional window having a predetermined size is searched to find the number of pixels in the highlight area and having an index value of 1, and is used as a replacement destination candidate. A second step of recording as the number of pixels and recording the position of the pixel as a replacement coordinate;
A third step of recording the smaller of the replacement source pixel number and the replacement destination candidate pixel number as the replaceable pixel number;
A fourth step of obtaining a number of replacement destination coordinates equal to the number of replaceable pixels using a random number;
A fifth step of setting an index output corresponding to the first color at the replacement destination coordinates to 0 and an index output corresponding to the second color to 1;
Image processing method characterized by comprising a.
前記検出するステップは、
前記第1及び第2の色の補色成分である2つの輝度信号成分の各々に対応した2つの境界値の各々と、対応する前記入力値とを比較し、全ての入力値が対応する前記境界値より大きいかどうかを判別する第1のステップと、
前記第1及び第2の色の補色成分である2つの輝度値を255からそれぞれ減算して2つの値を求め、該2つの値の差の絶対値が、単色処理領域であることを判別するための他の1つの境界値より小さいかどうかを判別する第2のステップと、
前記第1及び第2のステップの判別結果が共に真であったときに、前記入力値がハイライト領域に属することを決定する第3のステップと
を備えたことを特徴とする請求項に記載の画像処理方法。
The detecting step includes
Each of the two boundary values corresponding to each of the two luminance signal components which are complementary color components of the first and second colors is compared with the corresponding input value, and the boundary corresponding to all the input values A first step of determining whether it is greater than a value;
Two luminance values that are complementary color components of the first and second colors are subtracted from 255 to obtain two values, and it is determined that the absolute value of the difference between the two values is a monochromatic processing region. A second step of determining whether it is less than one other boundary value for:
When the determination result of the first and second step were both true, in claim 4, wherein the input value is characterized in that a third step of determining that it belongs to a highlight region The image processing method as described.
前記変換するステップは、前記検出の結果、前記入力値がハイライト領域に属すると判断された場合は、前記入力値により定義される空間において、前記第1及び第2の色の補色成分を表す2軸で構成される平面に射影された正方形が、最もハイライト側に位置するような立方体頂点の格子点値の和を用いて補間演算を行うことを特徴とする請求項に記載の画像処理方法。The converting step represents the complementary color components of the first and second colors in a space defined by the input value when it is determined that the input value belongs to a highlight area as a result of the detection. 5. The image according to claim 4 , wherein an interpolation operation is performed using a sum of lattice point values of cube vertices such that a square projected on a plane composed of two axes is located closest to the highlight side. Processing method. 多値のカラー輝度信号を、2値または多値のカラー濃度制御信号へ変換する画像処理装置に実行させるコンピュータプログラムであって
前記カラー輝度信号の入力値がハイライト領域に属するかどうかを検出するステップと、
該検出の結果、前記入力値がハイライト領域に属する場合には、第1の色に対応した濃度出力用のテーブルの格子点値と第2の色に対応した濃度出力用のテーブルの格子点値との和からなる格子点値を有するテーブルを用いて補間演算を行い、前記入力値がハイライト領域に属さない場合には、前記第1の色に対応した濃度出力用のテーブルを用いて補間演算を行い、前記入力値を濃度出力に変換するステップと、
該変換された濃度出力を誤差拡散処理して、2値または多値のインデックス出力を求めるステップと、
該求められたインデックス出力のうち、前記第1の色に対応したインデックス出力と、前記第1及び第2の色の和に対応したインデックス出力とを比較して、前記第1及び第2の色の和に対応したインデックス出力を整形するステップとを備え、
前記整形するステップは、
前記第2の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換元画素数として記録し、前記インデックス値を0に置き換える第1のステップと、
前記第1の色に対応したインデックス出力内で、所定の大きさの2次元ウインドウ内部を検索して、ハイライト領域にありかつインデックス値が1である画素の個数を求めてそれを置換先候補画素数として記録し、該画素の位置を置換先座標として記録する第2のステップと、
前記置換元画素数及び置換先候補画素数のうち小さい方を置換可能画素数として記録する第3のステップと、
乱数を用いて、前記置換可能画素数と等しい数の置換先座標を求める第4のステップと、
前記置換先座標にある第1の色に対応したインデックス出力を0にして、前記第2の色に対応したインデックス出力を1にする第5のステップと
を備えることを特徴とするコンピュータプログラム。
A computer program for causing an image processing apparatus to convert a multi-valued color luminance signal into a binary or multi-valued color density control signal,
Detecting whether an input value of the color luminance signal belongs to a highlight area;
Result of said detecting, if the input value belongs to a highlight region, grid points of the table for the density output corresponding to the grid point values of the first table for density output corresponding to the color and the second color Interpolation is performed using a table having a grid point value that is the sum of the values, and when the input value does not belong to a highlight area, a density output table corresponding to the first color is used. Performing an interpolation operation and converting the input value into a density output;
Performing error diffusion processing on the converted density output to obtain a binary or multi-level index output;
Of the obtained index outputs, the index output corresponding to the first color is compared with the index output corresponding to the sum of the first and second colors, and the first and second colors are compared. and a step of shaping the index output corresponding to the sum of,
The shaping step comprises:
The index output corresponding to the second color is searched in a two-dimensional window having a predetermined size, and the number of pixels in the highlight area and having an index value of 1 is obtained and replaced with the original pixel. A first step of recording as a number and replacing the index value with 0;
In the index output corresponding to the first color, the inside of a two-dimensional window having a predetermined size is searched to find the number of pixels in the highlight area and having an index value of 1, and is used as a replacement destination candidate. A second step of recording as the number of pixels and recording the position of the pixel as a replacement coordinate;
A third step of recording the smaller of the replacement source pixel number and the replacement destination candidate pixel number as the replaceable pixel number;
A fourth step of obtaining a number of replacement destination coordinates equal to the number of replaceable pixels using a random number;
A fifth step of setting an index output corresponding to the first color at the replacement destination coordinates to 0 and an index output corresponding to the second color to 1;
The provided computer program characterized Rukoto.
JP2002291430A 2002-10-03 2002-10-03 Image processing apparatus, image processing method, and computer program Expired - Fee Related JP4185751B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002291430A JP4185751B2 (en) 2002-10-03 2002-10-03 Image processing apparatus, image processing method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002291430A JP4185751B2 (en) 2002-10-03 2002-10-03 Image processing apparatus, image processing method, and computer program

Publications (3)

Publication Number Publication Date
JP2004128975A JP2004128975A (en) 2004-04-22
JP2004128975A5 JP2004128975A5 (en) 2005-11-17
JP4185751B2 true JP4185751B2 (en) 2008-11-26

Family

ID=32283029

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002291430A Expired - Fee Related JP4185751B2 (en) 2002-10-03 2002-10-03 Image processing apparatus, image processing method, and computer program

Country Status (1)

Country Link
JP (1) JP4185751B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5376920B2 (en) 2008-12-04 2013-12-25 キヤノン株式会社 Convolution operation circuit, hierarchical convolution operation circuit, and object recognition device
JP2012165200A (en) * 2011-02-07 2012-08-30 Ricoh Co Ltd Image processing device, image forming device, image display device, image processing method, program and recording medium
JP6765917B2 (en) 2016-09-21 2020-10-07 キヤノン株式会社 Search device, its imaging device, and search method

Also Published As

Publication number Publication date
JP2004128975A (en) 2004-04-22

Similar Documents

Publication Publication Date Title
US5428377A (en) Color spatial filtering for thermal ink jet printers
JP2004040781A (en) Pixel number changing technology of halftone dot using dot edge detection scheme
JP2007143082A (en) Method and apparatus for compressing image data
US7773821B2 (en) Method and device for compressing and expanding image data
US5917951A (en) Clustered aperiodic mask
US20010055124A1 (en) System and method for merging line work objects using tokenization and selective compression
EP1079600B1 (en) Image processing apparatus and method, and storage medium
JP2009017533A (en) Tint block image generating program and tint block image generating apparatus
JP4185751B2 (en) Image processing apparatus, image processing method, and computer program
US7327491B2 (en) Image processing apparatus, image processing method, computer program and computer-readable storage medium
US7295348B2 (en) Processor for image processing, method of processing image using the same, and printer incorporating the same
JP2000032280A (en) Image artifact reduction method
JP2019146037A (en) Image processing apparatus and method for controlling the same, and program
US9332155B2 (en) Digital image halftone conversion with selective enhancement
US6995873B1 (en) Flexible digital halftoning
JPH11305752A (en) Smoothing device for multilevel image and image forming device
JP2004282344A (en) Image processing method
JP4696738B2 (en) Image data compression method and apparatus, and pseudo gradation image restoration method
JPH114340A (en) Image processor and image processing system
US8175381B2 (en) Image processing method and apparatus
JP2006237902A (en) Gradation conversion apparatus, image processing apparatus, printer, and gradation conversion method and program
JPH0951421A (en) Image processing unit and its method
JPH0993434A (en) Image processing method and processor
JP2000261670A (en) Image processing unit, its method and memory computer- readable
JP2006179998A (en) Image processor, image processing method and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051003

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051003

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070925

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080523

RD13 Notification of appointment of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7433

Effective date: 20080710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080717

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20080710

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080908

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130912

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees