JP4587153B2 - Image processing apparatus and method - Google Patents
Image processing apparatus and method Download PDFInfo
- Publication number
- JP4587153B2 JP4587153B2 JP2001191846A JP2001191846A JP4587153B2 JP 4587153 B2 JP4587153 B2 JP 4587153B2 JP 2001191846 A JP2001191846 A JP 2001191846A JP 2001191846 A JP2001191846 A JP 2001191846A JP 4587153 B2 JP4587153 B2 JP 4587153B2
- Authority
- JP
- Japan
- Prior art keywords
- noise
- pixel
- quantization
- value
- threshold
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
- Image Processing (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、例えば、入力された多階調画像を入力画像の階調数より少ない階調数を有する画像に変換する画像処理方法及び装置に関する。
【0002】
【従来の技術】
従来、多値画像データを2値画像(または2値以上で入力階調数より少ない階調数を有する画像)に変換する手段としてR.Floydらによる誤差拡散法("An adaptive algorithm for spatial gray scale", SID International Symposium Digest of Technical Papers, vol4.3, 1975, pp.36-37)がある。この誤差拡散法は、ある画素で生じた2値化誤差を以降の複数画素へ拡散することにより、擬似的に階調表現を行うものである。しかし、誤差拡散法を用いた従来の画像処理装置では、低濃度領域の立ち上り部におけるドット生成が大幅に遅延するという問題があった。また、特定の入力階調においては、出力2値画像に規則的パターンが発生し、それが目について画質を劣化させることがあった。
【0003】
上記問題点を解決するため、特開平8−307680では、多値画像データの階調値に基づいて閾値を設定する誤差拡散法が開示されている。この方法を概略すると、多階調画像データを誤差拡散法又は平均誤差最小法を用いて第1階調値及び第2階調値に変換する画像処理装置において、注目画素の多階調画像データの階調値に基づいて閾値のベース成分を設定し、さらにそのベース成分に乱数値を加えて2値化のための閾値を設定するものである。この方法によれば、注目画素の多階調画像データの階調値に応じて閾値を最適化することにより、上記ドット生成遅延を解消し、さらに注目画素の階調値に応じて閾値にノイズを印加することにより、上記規則的パターンの発生を防止している。
【0004】
【発明が解決しようとする課題】
しかしながら、上記従来例では、閾値に印加するノイズとして乱数を使用するため、前記ノイズの特性を二次元的に制御することが困難であるという欠点があった。このため、複数のプレーンからなるカラー多値画像において、プレーン毎の量子化を行った場合、異なる色成分のドットの重なりを制御することも困難であった。
【0005】
本発明は、上記課題を解決するためになされたものであり、誤差拡散法を用いた多値画像の擬似中間調表現処理に際し、閾値に印加するノイズの二次元的な特性を制御しながら上記規則的パターンを防止し、かつドット生成遅延を解消する画像処理方法及び装置を提供することを目的とする。
【0006】
【課題を解決するための手段】
上記目的を達成するため、本発明は次のような構成から成る。
【0007】
複数の色成分プレーンを有するカラー画像データを量子化する画像処理装置であって、
2つの異なるノイズ制御情報が同数ずつ一様に分散した疑似周期的な2次元配列であるノイズマトリックスを記憶するノイズマトリックス記憶手段と、
画素位置を用いて前記ノイズマトリックスを参照することにより注目画素に対応するノイズ制御情報を求め、該ノイズ制御情報に基づき、入力画素値に対応する量子化閾値に対してノイズ振幅量を加算および減算することにより求められる2つの異なる量子化閾値のいずれかを設定する閾値設定手段と、
前記注目画素の周辺画素から該注目画素に対して拡散された量子化誤差の累積値を、前記注目画素の画素値に加算する加算手段と、
前記閾値設定手段により設定された量子化閾値を用いて、前記加算手段から出力された画素値を量子化する量子化手段と、
前記量子化手段による注目画素の量子化誤差を前記注目画素近傍の画素に拡散する誤差拡散手段とを有し、
前記ノイズマトリクス記憶手段は、前記複数の色成分プレーンのそれぞれに対応させてノイズマトリックスを記憶し、
出力画像におけるドットを重なりにくくすべき、前記複数の色成分プレーンにおける第1色成分プレーンと第2色成分プレーンにおけるノイズマトリクスは、ノイズ制御情報が反転している。
【0008】
あるいは、複数の色成分プレーンを有するカラー画像データを量子化する画像処理装置であって、
2つの異なるノイズ制御情報が同数ずつ一様に分散した疑似周期的な2次元配列であるノイズマトリックスを記憶するノイズマトリックス記憶手段と、
画素位置を用いて前記ノイズマトリックスを参照することにより注目画素に対応するノイズ制御情報を求め、該ノイズ制御情報に基づき、入力画素値に対応する量子化閾値に対してノイズ振幅量を加算および減算することにより求められる2つの異なる量子化閾値のいずれかを設定する閾値設定手段と、
前記注目画素の周辺画素から該注目画素に対して拡散された量子化誤差の累積値を、前記注目画素の画素値に加算する加算手段と、
前記閾値設定手段により設定された量子化閾値を用いて、前記加算手段から出力された画素値を量子化する量子化手段と、
前記量子化手段による注目画素の量子化誤差を前記注目画素近傍の画素に拡散する誤差拡散手段とを有し、
前記閾値設定手段は、出力画像におけるドットを重なりにくくすべき前記複数の色成分プレーンにおける第1色成分プレーンと第2色成分プレーンに対して、異なる量子化閾値を設定する。
【0016】
【発明の実施の形態】
(第1の実施形態)
図1は、第1の実施形態による画像処理装置の構成を示したブロック図である。同図において、10は画素データの入力部、11は累積誤差加算部、12は各要素が1又は−1の値をもつ2次元のノイズマトリックスが格納されたノイズマトリックスメモリ、13は量子化のための閾値に加えるノイズ量が入力画素データ毎に格納されたノイズ量ルックアップテーブル(LUT)、14は入力画素データと画素位置に従い量子化に用いる閾値を設定する閾値設定部、15は量子化部、16は処理後のデータの出力部、17は誤差演算部、18は誤差拡散部、19は累積誤差を格納する誤差バッファである。なおここで、入力画素データとは0から255の範囲の整数値である。
【0017】
<2値化処理手順>
以下、図1の画像処理装置の動作について図2のフローチャートに従って説明する。
【0018】
まず、図示しない画像走査部により入力画像が順次走査され、各画素データが入力部10より入力される(ステップS100)。画像の走査は、画像領域の左上画素から開始し右方向に1画素ずつ進み、右端に達したら1画素下の左端画素から同様に右下画素まで行う。
【0019】
次に、累積誤差加算部11において、入力画素データIに誤差バッファ19の画素位置に対応する値が加算される(ステップS101)。なお、ここでは注目されている入力画素を注目画素と呼ぶ場合もある。注目画素とは注目している画素の位置により同一性が保持されるものとする。すなわち、入力された値に対して何らかの加工がされた場合であっても、位置が変わらない限り注目画素であることには変わらない。
【0020】
誤差バッファ19には、1個の記憶領域Etempと、画像の横画素数Wと同数の記憶領域E(x)とが含まれ、後述する方法で量子化誤差が格納されている。なお、誤差バッファ19は処理開始前に全て初期値0で初期化されているものとする。
【0021】
図3は、誤差バッファ19の詳細を示した図である。累積誤差加算部11では、入力画素データIに横画素位置xに対応する誤差E(x)が加えられる。即ち、誤差加算後のデータをI'とすると、
I'=I+E(x)
となる。
【0022】
次に、閾値設定部14において、後述する方法により閾値Tを設定する(ステップS102)。次に、量子化部15において、誤差加算後の画素データI'と閾値Tとを比較し、出力画素値Oを決定する(ステップS103)。その規則は次の通りである。
O=0 (I'<T)
O=255 (I'≧T)
次に、誤差演算部17において、注目画素Iに誤差加算後の画素データI'と出力画素値Oとの差分Errを、次のようにして計算する(ステップS104)。
Err=I'−O
次に、誤差拡散部18において、横画素位置xに応じて以下の様に誤差Errの拡散処理が行われる(ステップS105)。
すなわち、注目画素の画素位置xが1ラインの両端以外である場合には、二値化誤差Errの値は、その7/16が注目画素の直後の画素に分配され、残りの9/16は注目画素の属するラインの次のラインに分配される。注目画素の次のラインにおいては、注目画素と同じ横画素位置xを有する画素(すなわち注目画素の真下の画素)にErrの5/16が、その直前の画素(すなわち、注目画素の左下の画素)と直後の画素(すなわち、注目画素の右下の画素)に、Errのそれぞれ3/16と1/16が分配される。
【0023】
また、注目画素の位置xが1ラインの先頭である場合には、誤差Errの値は、その7/16が注目画素の直後の画素に、8/16が注目画素の真下の画素に、1/16が注目画素の右下の画素に分配される。
【0024】
また、注目画素の位置xが1ラインの末尾である場合には、誤差Errの値は、すべて次のラインに分配される。その内訳は、Errの3/16が注目画素の左下の画素に、13/16が注目画素の真下の画素に分配される。
【0025】
以上で、1画素分の2値化処理が完了する。以上の処理を全ての画素について行うことで、画像の擬似中間調処理が行われる。
【0026】
<閾値設定処理>
次に、閾値設定部14における閾値Tの設定手順を説明する。まず入力画素データの横と縦の画素位置をそれぞれx、yとし、ノイズマトリックスメモリ12に格納されているノイズマトリックスより画素位置x、yに対応するノイズ符号を求める。ノイズマトリックスは、後述する方法であらかじめ作成され、ノイズマトリックスメモリ12に格納されている。
【0027】
図4はノイズマトリックスの一例であり、マトリックスの各要素は+1又は−1の何れかの値をもつ。本実施形態では、ノイズマトリックスの縦横の要素数を16×16とした。ここで、ノイズマトリックスにおける(i,j)番目の要素をN(i,j)とすると、入力画素データの画素位置(x,y)に対応するノイズ符号Nは、
N=N(x%16,y%16)
となる。なお、%は剰余演算を表す。
【0028】
次に、このノイズ符号Nと入力画素データIに従い、ノイズ量LUT13より閾値Tを求める。ノイズ量LUT13には、0から255までの入力画素データ毎に、Nの値に対応する2個の整数値が格納されている。図5は、ノイズ量LUT13の詳細を示す図であり、このLUTから上記ノイズ符号Nと入力画素データIに対応する値を読み込んで閾値Tとし、閾値設定処理を終了する。
【0029】
すなわち、二値化処理は、二値化しようとする画素の値に応じた値に、その画素の位置に応じたノイズ値を加算した値を閾値として行われる。ノイズは、所定サイズの領域(ここでは16×16)中における総和が0となるように与えられるために、閾値の平均は変わらず、その結果、平均濃度もノイズを加算しない場合と同様に保たれる。
【0030】
次に、ノイズマトリックス12の作成手順を図6のフローチャートに従って説明する。ここで作成するノイズマトリックス12は、最も均一に2つの値が分散した周期的パターンに多少のランダム性を取り入れた擬似周期的なパターンをもつ。本実施形態において前記擬似周期的パターンは、ランダムに初期要素を求め、求めた要素位置に対して一定の斥力ポテンシャルを付与し、該ポテンシャルが最小となる位置に新たな要素を設定する処理を繰り返すことにより生成されるものであり、斥力ポテンシャルは、要素からの位置に従って減衰する関数で表される。まず、1要素目をランダムにひとつ選び、当該要素のみを1、他の要素の値を−1に初期化する(ステップS200)。ここでは、最初に1の値を与えられた要素の位置を(x0,y0)とする。次に、ポテンシャルの初期化を行う(ステップS201)。ポテンシャルは値1をもつ要素からの距離rに対して以下の関数f(r)で与えられるものとする。
f(r)=−0.41r+1.21 (r<2)
f(r)=2.76exp(−r) (2≦r<10)
f(r)=0 (r≧10)
従って、要素(x0,y0)による、マトリックス内の要素(x,y)に対するポテンシャルP(x,y)は次の式で求められる。
P(x,y)=f(√({(x−x0+16)%16}2+{(y−y0+16)%16}2))
ただし、x0−10<x<x0+10、y0−10<y<y0+10
次に、ポテンシャルの最も小さい要素を検索し、その値を1とする(ステップS202)。ポテンシャルの最小値を持つ要素が複数ある場合は、ランダムに一つの要素を選択する。次に、新たに1とした要素に対するポテンシャルを計算する(ステップS203)。ステップS202において1とした要素の位置を(x1、y1)とすると、新たなポテンシャルは次式により求められる。
P(x,y)=f(√({(x−x1+16)%16}2+{(y−y1+16)%16}2))
ただし、x1−10<x<x1+10、y1−10<y<y1+10
前記ステップS202、S203を、1の値をもつ要素と−1の値をもつ要素の数が等しくなるまで繰り返す。以上のようにしてノイズマトリックスの生成が行われる。上記の手順により、1と−1の値をもつ要素が一様に分散した視覚的に好ましい疑似周期的ノイズパターンを生成することができる。このように擬似周期的パターンをノイズパターンとして使用する場合、一様乱数をノイズとして使用した場合と比べて低周波が少ないため、粒状性の悪化を防止するように働く。
なお、ノイズマトリックス生成のための手段は本画像処理装置に組み込まれる必要はなく、予め別個のノイズマトリックス生成装置によりノイズマトリックスを生成し、結果マトリックスのみをノイズマトリックスメモリに格納するものとする。
【0031】
<ノイズ量LUT作成手順>
次に、ノイズ量LUT13の作成手順を図7のフローチャートに従って説明する。図8は後述する量子化(二値化)誤差平均値a v e _E(g)の算出時に使用される画像を示しており、80は二値化処理が施される全画像領域であり、81は量子化誤差平均値a v e _E(g)を算出する際の対象となる画像領域である。図9は、入力画素の階調データと、後述する手順で得られる平均量子化誤差ave_E(g)との関係を示している。以下、例として入力階調g=1に対応する閾値ノイズ量設定手順について説明する。
【0032】
まず、ノイズ量LUT13の値を全ての入力階調データに対して0に初期化する(ステップS300)。
【0033】
次に、512×512画素の一様な階調値g=1をもつ画像データに対して量子化(二値化)処理を行い、量子化誤差の平均値a v e_ E(g)を求める(ステップS301)。画像の走査は画像領域の左上端の画素から開始し、画像の右下端の画素に向かって二値化処理が行われる。この手順は、ノイズ量LUTの内容をすべて0とした場合の図2の手順である。そして、図8に示される、ドットの形成が安定状態に達したと思われる、画像の下端付近における256×256画素の画像領域81に対して、累積誤差加算後の画素データI'と出力画素値Oとの差分、すなわち量子化誤差Eの平均値ave_E(g)を求める。すなわち、図2のステップS104において誤差演算を行い差分Errを計算するが、その値を画像領域81について積算し、256×256画素で割ることで平均化して平均値ave_E(g)が得られる。
【0034】
次に、量子化誤差の平均値a v e _E(g)の符号を反転させ、その値にノイズ振幅量+10及び−10をそれぞれ加算し、さらにその値に二値化に通常用いられる閾値128を加えた値T1、T2をノイズ量LUT13に格納する(ステップS302)。すなわち、T1,T2は次のように与えられる。
T1=−a v e _E(g)+10+128
T2=−a v e _E(g)−10+128
つまり、入力階調g=1の場合の量子化誤差平均値a v e _E (g)を77とすると、ノイズ量LUT13に格納する値は、−77±10+128であり、61及び41となる。
【0035】
次に、入力画素の階調データgが取り得る全ての値(256階調)について上記処理が終了したか確認し(ステップS303)、終了していればノイズ量LUT13作成処理を終了する。終了していなければgの値を変えて、全ての画素がその値をもつ画像の二値化処理における二値化誤差の平均値を求め、ノイズ量LUTへの登録値を求める処理を繰り返す。
【0036】
すなわち、ノイズ量LUT13においては、平均の閾値128に、平均量子化誤差ave_E(g)の符号を反転させた値−ave_E(g)が加えられ、さらにノイズ振幅量として±10が加算されている。ノイズ振幅量の+10と−10は、分布の比率が一定であるために、一定の広がりに対しては平均値が0となる。
そのため、ノイズ量LUT13においては、ある画素値に対しては、その画素の二値化処理時の平均二値化誤差が0となるように閾値が与えられることになる。
【0037】
以上の手順で生成されるノイズマトリックス12及びノイズ量LUT13を用いて、図2の手順に従って多値画像の二値化処理を行うことで、次のような効果がある。
【0038】
すなわち、本実施形態では、量子化のための閾値に加算するノイズ平均値を、平均量子化誤差ave_E(g)の符号を反転させた値とすることで、平均量子化誤差ave_E(g)が全ての入力階調に対して0となる。一般に、ドットの生成遅延は、平均量子化誤差ave_E(g)が0とならない階調において発生するとされている(特開平07-111591)。そのため、本実施形態の画像処理装置においては、二値化処理においてドットの生成遅延を発生させず、原多値画像に忠実な二値画像を生成することができる。
【0039】
また、ノイズ振幅量である±10は、入力階調に応じて変化させることも可能である。例えば、誤差拡散法による二値化を行った際に、64、128等の入力階調においては規則的パターンが発生しやすく、それが目について画質を劣化させることがある。図10は上記規則的パターンの一例であり、パターン100は入力階調64に対応する出力パターン、パターン101は入力階調128に対応する出力パターンである。このような階調においては、ノイズ振幅量を他階調よりも大きく設定することにより、上記規則的パターンの発生を低減できる。逆に、ノイズの印加による粒状性の悪化が目立ちやすい低濃度部においては、ノイズ振幅を小さくすることもできる。
【0040】
以上のような構成により、出力画像の粒状性を悪化させずに誤差拡散法特有の周期性が緩和され、かつドットの生成遅延が低減するような閾値を設定することができる。
【0041】
ここで、図2の二値化処理や、図6のノイズマトリックス作成処理、図7のノイズ量LUT作成処理の手順を行うためのコンピュータの構成を図20に示す。これらの手順は同一のコンピュータにより処理することもできるが、図2の二値化処理時にノイズマトリックス12及びノイズ量LUT13が用意されていればよいことから、それぞれ別個のコンピュータにより処理することもできる。
【0042】
図20において、ホストコンピュータ3000は、ROM3のプログラム用ROMやRAM2に記憶された、図2、図6、図7の手順のコンピュータプログラム等に基づいて、それら手順を実行するCPU1を備え、システムバス4に接続される各デバイスをCPU1が統括的に制御する。RAM2は、CPU1の主メモリ、ワークエリア等として機能する。ノイズマトリックス12やノイズ量LUT13もRAM2に格納される。
【0043】
キーボードコントローラ(KBC)5は、キーボード9や不図示のポインティングデバイスからのキー入力を制御する。CRTコントローラ(CRTC)6は、CRTディスプレイ10の表示を制御する。ディスクコントローラ(DKC)7は、ブートプログラム、種々のアプリケーション、フォントデータ、ユーザファイル、編集ファイル等を記憶するハードディスク(HD)、フロッピーディスク(FD)等の外部メモリ11とのアクセスを制御する。プリンタコントローラ(PRTC)8は、所定の双方向インターフェース(双方向I/F)21を介して不図示のプリンタに接続されて、プリンタとの通信制御処理を実行する。
【0044】
図1に示した各ブロックも、CPU1により所定のプログラムを実行することで実現できる。その場合、入力部10は、外部メモリ11等からの画像の読み込みを行うためのプログラムにより、出力部10は、二値化処理後の画像データをRAM2や外部メモリ11に書き出すプログラムにより実現される。
【0045】
(第2の実施形態)
図11は、本発明の第2の実施形態である画像処理装置の構成を示したブロック図である。本実施形態の画像処理装置は、第1の実施形態の画像処理装置に対して、入力階調毎の閾値平均値が記憶された閾値平均値LUT21と、入力階調毎の閾値ノイズ振幅が記憶されたノイズ量LUT13が追加及び変更された構成となっている。以下、図11の画像処理装置を用いた閾値設定手順を図12のフローチャートに従って説明する。なお、本実施例における入力画像の量子化手順は、図2のフローチャートに示される量子化手順と同様であるため、説明を省略する。
【0046】
まず、入力画素データの横と縦の画素位置をそれぞれx、yとし、ノイズマトリックスメモリ12に格納されているノイズマトリックスより画素位置x、yに対応するノイズ符号Nを、第1の実施形態と同じ図6の手順により求める(ステップS400)。
【0047】
次に、入力画素データIに従い、ノイズ量LUT13よりノイズ振幅N_ a m pを求める(ステップS401)。ノイズ量LUT13には、0から255までの入力階調毎に1個の値が格納されており、規則的パターンの発生しやすい階調においては他の階調より大きい値が格納されている。図13は、ノイズ量LUT13の詳細を示す図である。
【0048】
次に、入力画素データIに従い、閾値平均値LUT21より閾値平均値Th_a v eを求める(ステップS402)。図14は閾値平均値LUT21の詳細を示す図であり、図9に示される入力階調毎の平均量子化誤差a v e_ E (g)の符号を反転し、128を加算した値が格納されている。すなわち、第1実施形態の図7のステップS301で説明した手順と同様の手順で平均量子化誤差a v e_ E (g)を求め、Th_a v e=128−a v e_ E (g)として求めることができる。
【0049】
次に、位置(x,y)における値gの画素の量子化のための閾値Tを、
T=N(x%16,y%16)× N_a m p(g)+ Th_a v e(g)
により求め(ステップS403)、閾値設定処理を終了する。ただし、%は剰余を求める演算であり、N(i,j)は、画素位置(i,j)に対応するノイズ符号、N_a m p(g)は、画素値gに対応する図13のノイズ量LUT13に登録されたノイズ振幅である。
【0050】
このように、閾値平均値と閾値ノイズ振幅を別個に記憶させることにより、前記閾値平均値又はノイズ振幅を個別に変更することが容易となる。
【0051】
(第3の実施形態)
図15は、本発明の第3の実施形態である画像処理装置の構成を示したブロック図である。本実施形態は、シアン(C)、マゼンタ(M)、イエロー(Y)、ブラック(K)の4つのプレーンからなるカラー画像に適用するものであり、本実施形態の画像処理装置は、第1の実施形態の画像処理装置に対して、ノイズ量LUT22が複数の色に対応するLUTに変更されている。
【0052】
図16は、本実施形態におけるノイズ量LUT22の詳細を示した図である。図16においてM、K用の閾値ノイズ量を示す2個の値は、C、Y用の閾値ノイズ量の組み合わせを逆にしたものとなっている。例えば、図16において、入力値が0の場合、C,Y用の閾値ノイズ量は、ノイズ符号N=1に対して118、ノイズ符号N=−1に対して138であるが、M,K用の閾値ノイズ量は、ノイズ符号N=1に対して138、ノイズ符号N=−1に対して118となっている。また、ノイズマトリックスメモリ12には2個のマトリックス170,171が格納されている。ノイズ量LUTの値は、第1実施形態の図7の手順でC,Y用あるいはM,K用のいずれかを求めた後、同一の画素値における、各ノイズ符号値に対する閾値を互いに交換することで得ることができる。
【0053】
図17は、ノイズマトリックスメモリ12の詳細を示す図である。マトリックス170はC、M用ノイズマトリックス、マトリックス171はY、K用ノイズマトリックスである。なおノイズマトリックス170は第1の実施形態と同様に図6の手順により作成されたものである。またノイズマトリックス171の各要素は、前記ノイズマトリックス170を90度回転させる処理を行って得られる値となっている。
【0054】
閾値設定部14では、処理しようとする色に応じた閾値ノイズ量とノイズマトリックスを選択し、第1の実施形態と同様に閾値設定処理を行う。なお本実施例における色毎の量子化処理は第1の実施形態と同様であるため、説明を省略する。
【0055】
このように、CとM、YとK用の閾値ノイズの上限と下限を各画素位置において反転させることにより、出力画像における上記各色のドットを重なりにくくすることができる。なお、CとM、YとK用のノイズマトリクスを共用せず、マトリクスの要素である1と−1を互いに反転させることで、C,M,Y,Kそれぞれのカラープレーンごとに独立したノイズマトリクスを割り当ててもよい。例えば、図17のマトリクス170はCとYとで共用されるが、これを反転させ、一方をC用に、他方をY用に割り当てる。マトリクス171についても同様である。このようにした場合には、各カラープレーンについての量子化処理を全く同一の手順で行う。色によってノイズの上限を取るか下限を取るか切り替える必要はない。こうすることで、上述した処理と同様の結果を得られることに加えて、各カラープレーンについての量子化処理を全く同一の手順で行うことができ、処理対象の色を参酌する必要がなくなり、処理の簡単迅速化を図ることができる。
【0056】
なお上記CとMの閾値ノイズ設定手順を、同色(例えばC)の異なる濃度をもつ2つのプレーンに対して使用することも可能である。
【0057】
以上のような構成により、2つのプレーンにおける入力画素値がほぼ等しい領域において、ドットを重なりにくくなるような閾値を設定することが可能となる。
【0058】
(第4の実施形態)
第3の実施形態では、+1と−1の値をもつ要素(ノイズ符号)の比率が同一であるノイズマトリックスを2個用いて色毎に閾値の設定を行ったが、本実施形態では+1と−1の比率が異なる4つのノイズマトリックスを用いて閾値を設定する。
【0059】
以下、CMYK各色に対応する4個のノイズマトリックス作成手順を図18のフローチャートに従って説明する。なお、各マトリックスは16×16のサイズをもつ。
【0060】
まず、各マトリックスの要素をすべて−1に初期化する(ステップS500)。
次に、C用マトリックスから1要素目をランダムにひとつ選択し、その値を1とする(ステップS501)。次に、ポテンシャルの計算を第1実施形態と同様に行う(ステップS502)。
【0061】
次に、ポテンシャルの最も小さい要素位置を検索し、M用マトリックスにおける当該要素の値を1とする(ステップS503)。ポテンシャルの最小値を持つ要素が複数ある場合は、ランダムに一つの要素を選択する。
【0062】
次に、新たに1とした要素に対するポテンシャルを加算し(ステップS504)、最小ポテンシャルをもつY用マトリックス要素の値を1とする(ステップS505)。K用マトリックスにも同様のステップを繰り返す(ステップS506−508)。
【0063】
前記ステップS501からS508を、各マトリックスにおいて1の値をもつ要素がマトリックスの総要素数の1/4となるまで繰り返す(ステップS509)。
以上のようにしてノイズマトリックスの生成を行う。
【0064】
図19は、本実施形態におけるノイズマトリックスの例であり、マトリックス190から193は、それぞれC、M、Y、K用ノイズマトリックスを示す。上記の手順により、1の値をもつ要素の位置が色毎に全て異なり、かつ各マトリックスにおける1の値をもつ要素が一様に分散した擬似周期的パターンとなるような4個のノイズマトリックスを作成することができる。
【0065】
なおノイズ量LUT12には、第1の実施形態と同様の手順により求めた各入力階調における量子化誤差平均値a v e_E(g)に対して、予め以下の演算により入力階調毎にT1、T2の値を求め、格納しておく。
【0066】
T1 = −a v e_E(g)+15+128
T2 = −a v e_E(g)−5+128
つまり、入力階調g=1の場合の量子化誤差平均値a v e_E (g)を77とすると、ノイズ量LUT13に格納する値は、66及び46となる。T1がノイズ符号N=1に対応し、T2がノイズ符号−1に対応する。各色のノイズマトリックスにおける、ノイズ符号の分布の不均等さ、すなわち+1が1個に対して−1が3個となる分布の不均等さを、ノイズ振幅に、ノイズ符号が+1の場合に対応する振幅を、ノイズ符号が−1の場合に対応する振幅の3倍とするよう重みを付けることで補償している。このため、一定の画像の広がりについては、ノイズ振幅の平均値は0となる。
【0067】
さらに、各カラープレーンに対応するノイズマトリックスを、あたかもひとつのノイズマトリックスを作成するかのようにして作成することで、各カラープレーンにおいて、ノイズマトリックス中の符号が+1となる画素位置が重複することを防止できる。
【0068】
以上のような構成により、特にC、M、Y、Kの各色成分の入力画素値がほぼ等しい領域において、色の異なるドットが重なりにくくなるような閾値を設定することが可能となる。
【0069】
なお本発明の目的は前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラム読出し実行することによっても、本発明の目的が達成される。
【0070】
この場合、記憶媒体から読出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0071】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピーディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることができる。
【0072】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOSなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。
【0073】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。
【0074】
【発明の効果】
以上説明したように、本発明によれば、出力画像の粒状性を悪化させずに誤差拡散法特有の周期性を緩和し、かつドットの生成遅延を軽減することができる。
【図面の簡単な説明】
【図1】本発明の第一の実施例である画像処理装置のブロック図
【図2】第一の実施例である画像処理装置の動作を説明するフローチャート
【図3】誤差バッファの構成例の図
【図4】ノイズマトリックスの一例を示す図
【図5】ノイズ量LUT13の一例を示す図
【図6】閾値ノイズの設定手順を説明するフローチャート
【図7】ノイズ量LUT13の生成手順を説明するフローチャート
【図8】平均量子化誤差量算出時に使用する画像を示す図
【図9】入力階調データと平均量子化誤差の関係を示す図
【図10】特定の入力階調において出力画像に発生する規則的パターンを示す図
【図11】本発明の第二の実施例である画像処理装置のブロック図
【図12】閾値設定手順を説明するフローチャート
【図13】ノイズ量LUT13の一例を示す図
【図14】閾値平均値LUT21の一例を示す図
【図15】本発明の第三の実施例である画像処理装置のブロック図
【図16】ノイズ量LUT13の一例を示す図
【図17】第三の実施例におけるノイズマトリックスメモリを示す図
【図18】ノイズマトリックスの生成手順を説明するフローチャート
【図19】第四の実施例におけるノイズマトリックスメモリを示す図
【図20】実施形態の画像処理装置として機能し得るコンピュータのブロック図[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method and apparatus for converting an input multi-gradation image into an image having a smaller number of gradations than the number of gradations of an input image, for example.
[0002]
[Prior art]
Conventionally, R. Floyd et al. ("An adaptive algorithm for spatial gray") has been used as a means to convert multi-valued image data into a binary image (or an image with more than two values and a smaller number of gradations than the number of input gradations). scale ", SID International Symposium Digest of Technical Papers, vol4.3, 1975, pp.36-37). In this error diffusion method, pseudo gradation expression is performed by diffusing a binarization error generated in a certain pixel to a plurality of subsequent pixels. However, the conventional image processing apparatus using the error diffusion method has a problem that the dot generation at the rising portion of the low density region is significantly delayed. In addition, at a specific input gradation, a regular pattern is generated in the output binary image, which may deteriorate the image quality of the eyes.
[0003]
In order to solve the above problems, Japanese Patent Application Laid-Open No. 8-307680 discloses an error diffusion method in which a threshold value is set based on the gradation value of multivalued image data. In summary, in an image processing apparatus that converts multi-gradation image data into first gradation values and second gradation values using an error diffusion method or an average error minimum method, the multi-gradation image data of the pixel of interest. A threshold base component is set on the basis of the tone value, and a random value is added to the base component to set a threshold for binarization. According to this method, the dot generation delay is eliminated by optimizing the threshold value according to the gradation value of the multi-tone image data of the target pixel, and noise is added to the threshold value according to the gradation value of the target pixel. Is applied to prevent the occurrence of the regular pattern.
[0004]
[Problems to be solved by the invention]
However, since the conventional example uses a random number as the noise applied to the threshold value, it has a drawback that it is difficult to control the characteristics of the noise two-dimensionally. For this reason, in a color multi-valued image composed of a plurality of planes, when quantization is performed for each plane, it is difficult to control the overlapping of dots of different color components.
[0005]
The present invention has been made to solve the above-described problems, and controls the two-dimensional characteristics of noise applied to a threshold value during pseudo halftone expression processing of a multi-value image using an error diffusion method. An object of the present invention is to provide an image processing method and apparatus capable of preventing regular patterns and eliminating dot generation delay.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the present invention comprises the following arrangement.
[0007]
An image processing apparatus for quantizing color image data having a plurality of color component planes,
Noise matrix storage means for storing a noise matrix which is a pseudo-periodic two-dimensional array in which two different noise control information are uniformly distributed in the same number;
The noise control information corresponding to the target pixel is obtained by referring to the noise matrix using the pixel position, and the noise amplitude amount is added to and subtracted from the quantization threshold corresponding to the input pixel value based on the noise control information. Threshold setting means for setting one of two different quantization thresholds required by
Adding means for adding a cumulative value of quantization errors diffused from the peripheral pixels of the target pixel to the target pixel to the pixel value of the target pixel;
Quantizing means for quantizing the pixel value output from the adding means using the quantization threshold set by the threshold setting means;
Error diffusion means for diffusing the quantization error of the pixel of interest by the quantization means to pixels near the pixel of interest.And
The noise matrix storage means stores a noise matrix corresponding to each of the plurality of color component planes;
The noise control information in the noise matrix in the first color component plane and the second color component plane in the plurality of color component planes, which should make it difficult for dots in the output image to overlap, is inverted.The
[0008]
Alternatively, an image processing apparatus for quantizing color image data having a plurality of color component planes,
Noise matrix storage means for storing a noise matrix which is a pseudo-periodic two-dimensional array in which two different noise control information are uniformly distributed in the same number;
The noise control information corresponding to the target pixel is obtained by referring to the noise matrix using the pixel position, and the noise amplitude amount is added to and subtracted from the quantization threshold corresponding to the input pixel value based on the noise control information. Threshold setting means for setting one of two different quantization thresholds required by
Adding means for adding a cumulative value of quantization errors diffused from the peripheral pixels of the target pixel to the target pixel to the pixel value of the target pixel;
Quantizing means for quantizing the pixel value output from the adding means using the quantization threshold set by the threshold setting means;
Error diffusion means for diffusing the quantization error of the pixel of interest by the quantization means to pixels near the pixel of interest;
The threshold value setting means sets different quantization threshold values for the first color component plane and the second color component plane in the plurality of color component planes that are difficult to overlap dots in the output image.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
(First embodiment)
FIG. 1 is a block diagram showing the configuration of the image processing apparatus according to the first embodiment. In the figure, 10 is an input unit for pixel data, 11 is a cumulative error adding unit, 12 is a noise matrix memory in which a two-dimensional noise matrix having each element having a value of 1 or −1 is stored, and 13 is a quantizing unit. A noise amount lookup table (LUT) in which the amount of noise to be added to the threshold value is stored for each input pixel data, 14 is a threshold value setting unit for setting a threshold value used for quantization according to the input pixel data and the pixel position, and 15 is a quantization value , 16 is a data output unit after processing, 17 is an error calculation unit, 18 is an error diffusion unit, and 19 is an error buffer for storing accumulated errors. Here, the input pixel data is an integer value in the range of 0 to 255.
[0017]
<Binarization processing procedure>
The operation of the image processing apparatus of FIG. 1 will be described below with reference to the flowchart of FIG.
[0018]
First, the input image is sequentially scanned by an image scanning unit (not shown), and each pixel data is input from the input unit 10 (step S100). The scanning of the image starts from the upper left pixel of the image area and proceeds one pixel at a time in the right direction.
[0019]
Next, in the cumulative
[0020]
The
[0021]
FIG. 3 is a diagram showing details of the
I '= I + E (x)
It becomes.
[0022]
Next, the threshold
O = 0 (I '<T)
O = 255 (I ′ ≧ T)
Next, the
Err = I'-O
Next, the
That is, when the pixel position x of the target pixel is other than both ends of one line, 7/16 of the binarization error Err is distributed to the pixel immediately after the target pixel, and the remaining 9/16 is It is distributed to the line next to the line to which the pixel of interest belongs. In the next line of the pixel of interest, the pixel having the same horizontal pixel position x as the pixel of interest (ie, the pixel immediately below the pixel of interest) has 5/16 of Err as the immediately preceding pixel (ie, the pixel below the pixel of interest) ) And the immediately following pixel (that is, the pixel on the lower right of the target pixel), 3/16 and 1/16 of Err are respectively distributed.
[0023]
Further, when the position x of the target pixel is the head of one line, the error Err has a value of 1/16 of the pixel immediately after the target pixel and 8/16 of the pixel immediately below the target pixel. / 16 is distributed to the lower right pixel of the target pixel.
[0024]
When the target pixel position x is at the end of one line, the error Err values are all distributed to the next line. The breakdown is such that 3/16 of Err is distributed to the lower left pixel of the pixel of interest and 13/16 is distributed to the pixel immediately below the pixel of interest.
[0025]
Thus, the binarization process for one pixel is completed. By performing the above process for all the pixels, the pseudo halftone process of the image is performed.
[0026]
<Threshold setting process>
Next, a procedure for setting the threshold T in the
[0027]
FIG. 4 is an example of a noise matrix, and each element of the matrix has a value of either +1 or −1. In this embodiment, the number of vertical and horizontal elements of the noise matrix is 16 × 16. Here, when the (i, j) -th element in the noise matrix is N (i, j), the noise code N corresponding to the pixel position (x, y) of the input pixel data is
N = N (
It becomes. In addition,% represents a remainder calculation.
[0028]
Next, a threshold value T is obtained from the
[0029]
That is, the binarization process is performed using a value obtained by adding a noise value corresponding to the position of the pixel to a value corresponding to the value of the pixel to be binarized. Since the noise is given so that the total sum in a region of a predetermined size (16 × 16 in this case) is 0, the average of the thresholds does not change, and as a result, the average density is also maintained in the same manner as when no noise is added. Be drunk.
[0030]
Next, the procedure for creating the
f (r) = − 0.41r + 1.21 (r <2)
f (r) = 2.76exp (−r) (2 ≦ r <10)
f (r) = 0 (r ≧ 10)
Accordingly, the potential P (x, y) for the element (x, y) in the matrix by the element (x0, y0) is obtained by the following equation.
P (x, y) = f (√ ({(x−x0 + 16)% 16}2+ {(Y−y0 + 16)% 16}2))
However, x0-10 <x <x0 + 10, y0-10 <y <y0 + 10
Next, the element having the smallest potential is searched and its value is set to 1 (step S202). If there are multiple elements with the minimum potential value, one element is selected at random. Next, the potential for the element newly set to 1 is calculated (step S203). If the position of the element set to 1 in step S202 is (x1, y1), a new potential is obtained by the following equation.
P (x, y) = f (√ ({(x−x1 + 16)% 16}2+ {(Y-y1 + 16)% 16}2))
However, x1-10 <x <x1 + 10, y1-10 <y <y1 + 10
Steps S202 and S203 are repeated until the number of elements having a value of 1 is equal to the number of elements having a value of -1. The noise matrix is generated as described above. By the above procedure, a visually preferable pseudo-periodic noise pattern in which elements having values of 1 and −1 are uniformly distributed can be generated. As described above, when the pseudo periodic pattern is used as the noise pattern, the low frequency is less than that in the case where the uniform random number is used as the noise, so that the deterioration of the graininess is prevented.
Note that the noise matrix generation means need not be incorporated in the image processing apparatus, but a noise matrix is generated in advance by a separate noise matrix generation apparatus, and only the result matrix is stored in the noise matrix memory.
[0031]
<Noise amount LUT creation procedure>
Next, a procedure for creating the
[0032]
First, the value of the
[0033]
Next, quantization (binarization) processing is performed on image data having a uniform gradation value g = 1 of 512 × 512 pixels, and an average value ave_E (g) of quantization errors is obtained ( Step S301). Image scanning starts from the upper left pixel of the image area, and binarization processing is performed toward the lower right pixel of the image. This procedure is the procedure of FIG. 2 when the contents of the noise amount LUT are all zero. Then, for the 256 × 256
[0034]
Next, the sign of the average value ave_E (g) of the quantization error is inverted, the noise amplitude amount +10 and −10 are added to the value, and the
T1 = −a v e _E (g) + 10 + 128
T2 = −a ve _E (g) −10 + 128
That is, assuming that the quantization error average value ave_E (g) in the case of the input gradation g = 1 is 77, the value stored in the
[0035]
Next, it is confirmed whether or not the above process has been completed for all values (256 gradations) that the gradation data g of the input pixel can take (step S303). If the process has been completed, the
[0036]
That is, in the noise amount LUT13, a value −ave_E (g) obtained by inverting the sign of the average quantization error ave_E (g) is added to the
Therefore, in the
[0037]
By using the
[0038]
That is, in this embodiment, the average quantization error ave_E (g) is obtained by setting the noise average value added to the threshold for quantization to a value obtained by inverting the sign of the average quantization error ave_E (g). 0 for all input gradations. In general, it is assumed that dot generation delay occurs at a gray level where the average quantization error ave_E (g) is not 0 (Japanese Patent Laid-Open No. 07-111591). Therefore, in the image processing apparatus according to the present embodiment, it is possible to generate a binary image that is faithful to the original multi-value image without causing a dot generation delay in the binarization process.
[0039]
The noise amplitude ± 10 can be changed according to the input gradation. For example, when binarization is performed by the error diffusion method, a regular pattern is likely to occur in input gradations such as 64 and 128, which may deteriorate the image quality of the eyes. FIG. 10 shows an example of the regular pattern. The
[0040]
With the above-described configuration, it is possible to set a threshold value that reduces the periodicity peculiar to the error diffusion method without deteriorating the granularity of the output image and reduces the dot generation delay.
[0041]
Here, FIG. 20 shows the configuration of a computer for performing the binarization processing of FIG. 2, the noise matrix creation processing of FIG. 6, and the noise amount LUT creation processing of FIG. These procedures can be processed by the same computer, but since the
[0042]
20, the
[0043]
A keyboard controller (KBC) 5 controls key input from a
[0044]
Each block shown in FIG. 1 can also be realized by the
[0045]
(Second Embodiment)
FIG. 11 is a block diagram showing a configuration of an image processing apparatus according to the second embodiment of the present invention. The image processing apparatus according to the present embodiment stores a threshold
[0046]
First, the horizontal and vertical pixel positions of the input pixel data are set to x and y, respectively, and the noise code N corresponding to the pixel positions x and y is determined from the noise matrix stored in the
[0047]
Next, according to the input pixel data I, the noise amplitude N_amp is obtained from the noise amount LUT 13 (step S401). In the
[0048]
Next, a threshold average value Th_ave is obtained from the threshold
[0049]
Next, the threshold T for quantization of the pixel of value g at position (x, y) is
T = N (
(Step S403) and the threshold value setting process is terminated. However,% is an operation for obtaining a remainder, N (i, j) is a noise code corresponding to the pixel position (i, j), and N_amp (g) is the noise amount of FIG. 13 corresponding to the pixel value g. This is the noise amplitude registered in the
[0050]
Thus, by storing the threshold average value and the threshold noise amplitude separately, it becomes easy to individually change the threshold average value or the noise amplitude.
[0051]
(Third embodiment)
FIG. 15 is a block diagram showing a configuration of an image processing apparatus according to the third embodiment of the present invention. The present embodiment is applied to a color image composed of four planes of cyan (C), magenta (M), yellow (Y), and black (K). The image processing apparatus of the present embodiment is a first image processing apparatus. In the image processing apparatus according to the embodiment, the noise amount LUT 22 is changed to an LUT corresponding to a plurality of colors.
[0052]
FIG. 16 is a diagram showing details of the noise amount LUT 22 in the present embodiment. In FIG. 16, two values indicating the threshold noise amounts for M and K are obtained by reversing the combinations of the threshold noise amounts for C and Y. For example, in FIG. 16, when the input value is 0, the threshold noise amounts for C and Y are 118 for the noise code N = 1 and 138 for the noise code N = −1. The threshold noise amount for use is 138 for the noise code N = 1 and 118 for the noise code N = −1. The
[0053]
FIG. 17 is a diagram showing details of the
[0054]
The
[0055]
Thus, by inverting the upper and lower limits of the threshold noise for C and M and Y and K at each pixel position, it is possible to make the dots of the respective colors in the output image difficult to overlap. In addition, the noise matrix for C and M, Y and K is not shared, and the
[0056]
The C and M threshold noise setting procedures can be used for two planes having the same color (for example, C) and different densities.
[0057]
With the configuration as described above, it is possible to set a threshold value that makes it difficult for dots to overlap in a region where the input pixel values in the two planes are substantially equal.
[0058]
(Fourth embodiment)
In the third embodiment, the threshold value is set for each color using two noise matrices having the same ratio of elements (noise codes) having values of +1 and −1, but in this embodiment, +1 and The threshold value is set using four noise matrices having different ratios of -1.
[0059]
Hereinafter, four noise matrix creation procedures corresponding to CMYK colors will be described with reference to the flowchart of FIG. Each matrix has a size of 16 × 16.
[0060]
First, all the elements of each matrix are initialized to −1 (step S500).
Next, one of the first elements is selected at random from the C matrix, and the value is set to 1 (step S501). Next, the potential is calculated in the same manner as in the first embodiment (step S502).
[0061]
Next, the element position having the smallest potential is searched, and the value of the element in the M matrix is set to 1 (step S503). If there are multiple elements with the minimum potential value, one element is selected at random.
[0062]
Next, the potentials for the elements newly set to 1 are added (step S504), and the value of the matrix element for Y having the minimum potential is set to 1 (step S505). Similar steps are repeated for the K matrix (steps S506 to S508).
[0063]
Steps S501 to S508 are repeated until the number of elements having a value of 1 in each matrix becomes 1/4 of the total number of elements in the matrix (step S509).
The noise matrix is generated as described above.
[0064]
FIG. 19 is an example of a noise matrix in the present embodiment, and
[0065]
Note that the
[0066]
T1 = −a v e_E (g) + 15 + 128
T2 = −a v e_E (g) −5 + 128
That is, assuming that the quantization error average value ave_E (g) when the input gradation g = 1 is 77, the values stored in the
[0067]
Furthermore, by creating a noise matrix corresponding to each color plane as if creating a single noise matrix, pixel positions where the sign in the noise matrix is +1 overlap in each color plane. Can be prevented.
[0068]
With the configuration as described above, it is possible to set a threshold value that makes it difficult for dots of different colors to overlap, particularly in an area where the input pixel values of the C, M, Y, and K color components are substantially equal.
[0069]
An object of the present invention is to supply a storage medium storing software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and store the computer (or CPU or MPU) of the system or apparatus in the storage medium. The object of the present invention is also achieved by executing the read program.
[0070]
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.
[0071]
As a storage medium for supplying the program code, for example, a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
[0072]
Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also the OS running on the computer based on the instruction of the program code performs the actual processing. A case where the functions of the above-described embodiment are realized by performing part or all of the processing is also included.
[0073]
Further, the program code read from the storage medium is subjected to part or all of the actual processing by a CPU or the like provided in a function expansion board or a function expansion unit inserted in the computer, and the functions of the above-described embodiments are realized by the processing. The case where it is realized is also included.
[0074]
【The invention's effect】
As explained above, according to the present invention,OutThe periodicity peculiar to the error diffusion method can be relaxed without deteriorating the granularity of the force image, and the dot generation delay can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram of an image processing apparatus according to a first embodiment of the present invention.
FIG. 2 is a flowchart for explaining the operation of the image processing apparatus according to the first embodiment;
FIG. 3 is a diagram of a configuration example of an error buffer.
FIG. 4 is a diagram illustrating an example of a noise matrix
FIG. 5 is a diagram illustrating an example of a
FIG. 6 is a flowchart for explaining a threshold noise setting procedure;
FIG. 7 is a flowchart for explaining a generation procedure of the
FIG. 8 is a diagram showing an image used when calculating the average quantization error amount;
FIG. 9 is a diagram showing the relationship between input gradation data and average quantization error
FIG. 10 is a diagram showing a regular pattern generated in an output image at a specific input gradation.
FIG. 11 is a block diagram of an image processing apparatus according to a second embodiment of the present invention.
FIG. 12 is a flowchart for explaining a threshold setting procedure.
FIG. 13 is a diagram illustrating an example of a
FIG. 14 is a diagram showing an example of a threshold average value LUT21
FIG. 15 is a block diagram of an image processing apparatus according to a third embodiment of the present invention.
FIG. 16 is a diagram showing an example of the
FIG. 17 is a diagram showing a noise matrix memory in the third embodiment.
FIG. 18 is a flowchart for explaining a noise matrix generation procedure;
FIG. 19 is a diagram showing a noise matrix memory in the fourth embodiment.
FIG. 20 is a block diagram of a computer that can function as the image processing apparatus according to the embodiment.
Claims (5)
2つの異なるノイズ制御情報が同数ずつ一様に分散した疑似周期的な2次元配列であるノイズマトリックスを記憶するノイズマトリックス記憶手段と、
画素位置を用いて前記ノイズマトリックスを参照することにより注目画素に対応するノイズ制御情報を求め、該ノイズ制御情報に基づき、入力画素値に対応する量子化閾値に対してノイズ振幅量を加算および減算することにより求められる2つの異なる量子化閾値のいずれかを設定する閾値設定手段と、
前記注目画素の周辺画素から該注目画素に対して拡散された量子化誤差の累積値を、前記注目画素の画素値に加算する加算手段と、
前記閾値設定手段により設定された量子化閾値を用いて、前記加算手段から出力された画素値を量子化する量子化手段と、
前記量子化手段による注目画素の量子化誤差を前記注目画素近傍の画素に拡散する誤差拡散手段とを有し、
前記ノイズマトリクス記憶手段は、前記複数の色成分プレーンのそれぞれに対応させてノイズマトリックスを記憶し、
出力画像におけるドットを重なりにくくすべき、前記複数の色成分プレーンにおける第1色成分プレーンと第2色成分プレーンにおけるノイズマトリクスは、ノイズ制御情報が反転していることを特徴とする画像処理装置。 What image processing apparatus der for quantizing color image data having a plurality of color components planes,
Noise matrix storage means for storing a noise matrix which is a pseudo-periodic two-dimensional array in which two different noise control information are uniformly distributed in the same number;
The noise control information corresponding to the target pixel is obtained by referring to the noise matrix using the pixel position, and the noise amplitude amount is added to and subtracted from the quantization threshold corresponding to the input pixel value based on the noise control information. Threshold setting means for setting one of two different quantization thresholds required by
Adding means for adding a cumulative value of quantization errors diffused from the peripheral pixels of the target pixel to the target pixel to the pixel value of the target pixel;
Quantizing means for quantizing the pixel value output from the adding means using the quantization threshold set by the threshold setting means;
Error diffusion means for diffusing the quantization error of the pixel of interest by the quantization means to pixels near the pixel of interest;
The noise matrix storage means stores a noise matrix corresponding to each of the plurality of color component planes;
Nikukusubeki overlapping dots in the output image, the noise matrices in the first color component plane and the second color component planes of the plurality of color components plane, the image processing apparatus you characterized in that the noise control information is inverted .
2つの異なるノイズ制御情報が同数ずつ一様に分散した疑似周期的な2次元配列であるノイズマトリックスを記憶するノイズマトリックス記憶手段と、
画素位置を用いて前記ノイズマトリックスを参照することにより注目画素に対応するノイズ制御情報を求め、該ノイズ制御情報に基づき、入力画素値に対応する量子化閾値に対してノイズ振幅量を加算および減算することにより求められる2つの異なる量子化閾値のいずれかを設定する閾値設定手段と、
前記注目画素の周辺画素から該注目画素に対して拡散された量子化誤差の累積値を、前記注目画素の画素値に加算する加算手段と、
前記閾値設定手段により設定された量子化閾値を用いて、前記加算手段から出力された画素値を量子化する量子化手段と、
前記量子化手段による注目画素の量子化誤差を前記注目画素近傍の画素に拡散する誤差拡散手段とを有し、
前記閾値設定手段は、出力画像におけるドットを重なりにくくすべき前記複数の色成分プレーンにおける第1色成分プレーンと第2色成分プレーンに対して、異なる量子化閾値を設定することを特徴とする画像処理装置。 What image processing apparatus der for quantizing color image data having a plurality of color components planes,
Noise matrix storage means for storing a noise matrix which is a pseudo-periodic two-dimensional array in which two different noise control information are uniformly distributed in the same number;
The noise control information corresponding to the target pixel is obtained by referring to the noise matrix using the pixel position, and the noise amplitude amount is added to and subtracted from the quantization threshold corresponding to the input pixel value based on the noise control information. Threshold setting means for setting one of two different quantization thresholds required by
Adding means for adding a cumulative value of quantization errors diffused from the peripheral pixels of the target pixel to the target pixel to the pixel value of the target pixel;
Quantizing means for quantizing the pixel value output from the adding means using the quantization threshold set by the threshold setting means;
Error diffusion means for diffusing the quantization error of the pixel of interest by the quantization means to pixels near the pixel of interest;
Said threshold setting means, the first color component plane and the second color component planes of the plurality of color components planes should hardly overlap the dots in the output image, you and sets different quantization thresholds Image processing device.
画素位置を用いて前記ノイズマトリックスを参照することにより注目画素に対応するノイズ制御情報を求め、該ノイズ制御情報に基づき、入力画素値に対応する量子化閾値に対してノイズ振幅量を加算および減算することにより求められる2つの異なる量子化閾値のいずれかを設定する閾値設定工程と、
前記注目画素の周辺画素から該注目画素に対して拡散された量子化誤差の累積値を、前記注目画素の画素値に加算する加算工程と、
前記閾値設定工程により設定された量子化閾値を用いて、前記加算工程の出力である画素値を量子化する量子化工程と、
前記量子化工程による注目画素の量子化誤差を前記注目画素近傍の画素に拡散する誤差拡散工程とを有し、
前記ノイズマトリクス記憶手段は、前記複数の色成分プレーンのそれぞれに対応させてノイズマトリックスを記憶し、
出力画像におけるドットを重なりにくくすべき、前記複数の色成分プレーンにおける第1色成分プレーンと第2色成分プレーンにおけるノイズマトリクスは、ノイズ制御情報が反転していることを特徴とする画像処理方法。Two different noise control information Ri by the image processing apparatus having a noise matrix storage means for storing a noise matrix is equal by uniformly distributed pseudo periodic two-dimensional array, a color image having a plurality of color components planes An image processing method for quantizing data ,
The noise control information corresponding to the target pixel is obtained by referring to the noise matrix using the pixel position, and the noise amplitude amount is added to and subtracted from the quantization threshold corresponding to the input pixel value based on the noise control information. A threshold setting step for setting one of two different quantization thresholds required by
An addition step of adding a cumulative value of quantization error diffused from the peripheral pixels of the target pixel to the target pixel to the pixel value of the target pixel;
Using a quantization threshold set by the threshold setting step, a quantization step for quantizing a pixel value that is an output of the addition step;
Have a error diffusion step of diffusing a quantization error of the pixel of interest by the quantization step to the pixel of the target pixel neighborhood,
The noise matrix storage means stores a noise matrix corresponding to each of the plurality of color component planes;
An image processing method characterized in that noise control information is inverted in a noise matrix in the first color component plane and the second color component plane in the plurality of color component planes that should make it difficult for dots in the output image to overlap .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001191846A JP4587153B2 (en) | 2001-06-25 | 2001-06-25 | Image processing apparatus and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001191846A JP4587153B2 (en) | 2001-06-25 | 2001-06-25 | Image processing apparatus and method |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2003008893A JP2003008893A (en) | 2003-01-10 |
| JP2003008893A5 JP2003008893A5 (en) | 2008-08-07 |
| JP4587153B2 true JP4587153B2 (en) | 2010-11-24 |
Family
ID=19030397
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001191846A Expired - Fee Related JP4587153B2 (en) | 2001-06-25 | 2001-06-25 | Image processing apparatus and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4587153B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7760400B2 (en) | 2004-10-07 | 2010-07-20 | Ricoh Company, Limited | Creating multiple threshold matrices to be used in error diffused multilevel halftoning |
| JP4522812B2 (en) * | 2004-10-07 | 2010-08-11 | 株式会社リコー | Image processing apparatus, image processing method, program for causing computer to execute the method, and computer-readable recording medium |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3554077B2 (en) * | 1995-05-12 | 2004-08-11 | セイコーエプソン株式会社 | Image processing device |
| JP2001069349A (en) * | 1999-08-27 | 2001-03-16 | Ricoh Co Ltd | Image processing method, image processing apparatus, and recording medium |
| JP2001148783A (en) * | 1999-11-19 | 2001-05-29 | Sharp Corp | Image processing device |
-
2001
- 2001-06-25 JP JP2001191846A patent/JP4587153B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003008893A (en) | 2003-01-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5729663A (en) | Method and apparatus for gray screening | |
| JP4634292B2 (en) | Image processing apparatus, image processing method, and program for causing computer to execute the method | |
| JP2003046777A (en) | Mask creation method, image processing apparatus, software program, and mask data | |
| JPH08107500A (en) | Error diffusion halfton processing system and method of using homogeneous response of high/low brightness picture area | |
| JP4236804B2 (en) | Image processing method, apparatus and storage medium | |
| JPH11164146A (en) | System and method for image data processing | |
| JPH1084478A (en) | Input image conversion method and pixel value quantization method | |
| JPH1070659A (en) | Error spread method and system | |
| KR102307264B1 (en) | Image processing apparatus, image processing method, and storage medium | |
| JP2004042325A (en) | Printer and image processing device thereof | |
| JP4587153B2 (en) | Image processing apparatus and method | |
| JPH10229496A (en) | Method and device for adding gray level to multi-gray level halftone image | |
| JP2003069819A (en) | Image processing apparatus and image processing method | |
| JP3722955B2 (en) | Pseudo halftone processing method, apparatus and recording medium | |
| JPH0863596A (en) | Method and system for diffusion of error as well as generation method of error value | |
| JP2010093756A (en) | Image processing apparatus and control method thereof | |
| JPH0998290A (en) | Image recording apparatus and image recording method | |
| JP2000022951A (en) | Image processing method and apparatus | |
| JP2004048194A (en) | Image processing apparatus and method | |
| JP5312158B2 (en) | Image processing apparatus and image processing method | |
| CN120580163B (en) | Image processing method and system for laser printer | |
| JPH11252364A (en) | Image processing method and its device | |
| JP2000270210A (en) | Image processing device | |
| JP3737471B2 (en) | Image processing method and image processing system | |
| JP4412213B2 (en) | Image processing apparatus, image processing method, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080625 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080625 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20091029 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091116 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100115 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100319 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100618 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20100702 |
|
| 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: 20100830 |
|
| 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: 20100906 Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100831 |
|
| 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: 20130917 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130917 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130917 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130917 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |