JP3937645B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP3937645B2
JP3937645B2 JP10573699A JP10573699A JP3937645B2 JP 3937645 B2 JP3937645 B2 JP 3937645B2 JP 10573699 A JP10573699 A JP 10573699A JP 10573699 A JP10573699 A JP 10573699A JP 3937645 B2 JP3937645 B2 JP 3937645B2
Authority
JP
Japan
Prior art keywords
value
image processing
data
quantization error
threshold value
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
JP10573699A
Other languages
Japanese (ja)
Other versions
JP2000299782A5 (en
JP2000299782A (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 JP10573699A priority Critical patent/JP3937645B2/en
Publication of JP2000299782A publication Critical patent/JP2000299782A/en
Publication of JP2000299782A5 publication Critical patent/JP2000299782A5/ja
Application granted granted Critical
Publication of JP3937645B2 publication Critical patent/JP3937645B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は多値の入力画像データを階調変換して画像形成をする画像処理装置及び画像処理方法に関する。
【0002】
【従来の技術】
中間調表現をおこなうための画像形成手法として誤差拡散法(以後EDと呼ぶ)や平均濃度保存法(以後MDと呼ぶ)などが一般に知られている。これらは、少ない階調数を用いて面積階調表現することにより、マクロ的に中間調を表現しようとするものである。つまり、擬似中間調表現法である。これは、少ないビット数で階調表現できるために、画像データを扱うハードウェアへの負荷を低減できるといった効果がある。
【0003】
また、プリンターの特性によっては、n値化の階調変換処理に於いて、孤立ドットを正確に出力できないものもあり、そのようなプリンターに対しては、ムラが発生する領域で、ある程度のドット集中を行なう処理により画質の安定化を図ってきた。
【0004】
【発明が解決しようとする課題】
しかしながら、ドットを集中させると、解像度が落ちた状態と近似したものになるという問題がある。つまり、写真などの階調性を重視する所では、ドットを集中させることによる効果は大きいが、文字などの解像度を重視する所では、ドットを集中させると逆にジャギーが目立つようになってしまう問題があり、写真領域と文字領域とでは、要求される処理は異なるものである。
【0005】
【課題を解決するための手段】
そこで、本発明にかかる画像処理装置は、上記の問題点を解決するために、過去に階調変換がおこなわれた結果に応じて階調変換の閾値を制御し、写真領域と文字領域とで、閾値生成パラメータを変える構成をとることを特徴とする。
【0006】
すなわち、画素毎に濃淡情報をもつ多値データを入力する手段と、前記入力した多値データを階調変換する手段とを有する画像処理装置は、
前記多値データを階調変換して出力する際に発生する量子化誤差を算出する第1の算出手段と、
前記量子化誤差に基き注目画素近傍の量子化誤差を算出する第2の算出手段と、
前記注目画素近傍の量子化誤差値を注目画素に加算して誤差を補正する補正手段と、
記階調変換の結果を記憶する記憶手段と、
前記記憶手段に記憶された複数画素分の階調変換の結果の平均値に応じて、前記階調変換の閾値を生成する生成手段と、
文字領域と写真領域を示す信号に応じて、前記生成手段により生成される閾値を制御する制御手段とを有し、
前記制御手段は、文字領域に対してはドットを分散化させるべく前記閾値を制御し、写真領域に対してはドットを集中化させるべく前記閾値を制御し、
前記第1の算出手段は、前記多値データと前記記憶手段に記憶された複数画素分の階調変換の結果の平均値とを減算処理することにより、前記多値データを階調変換して出力する際に発生する量子化誤差を算出することを特徴とする。
【0008】
これにより、任意の領域、写真領域と文字領域とで階調変換処理のテクスチャー制御が可能となる。
また、画素毎に濃淡情報をもつ多値データを入力する手段と、前記入力した多値データを階調変換する手段とを有する画像処理装置において実行する画像処理方法は、
前記多値データを階調変換して出力する際に発生する量子化誤差を算出する第1の算出工程と、
前記量子化誤差に基き注目画素近傍の量子化誤差を算出する第2の算出工程と、
前記注目画素近傍の量子化誤差値を注目画素に加算して誤差を補正する補正工程と、
記階調変換の結果を記憶手段に記憶する記憶工程と、
前記記憶手段に記憶された複数画素分の階調変換の結果の平均値に応じて、前記階調変換の閾値を生成する生成工程と、
文字領域と写真領域を示す信号に応じて、前記生成工程により生成される閾値を制御する制御工程とを有し、
前記制御工程は、文字領域に対してはドットを分散化させるべく前記閾値を制御し、写真領域に対してはドットを集中化させるべく前記閾値を制御し、
前記第1の算出工程は、前記多値データと前記記憶手段に記憶された複数画素分の階調変換の結果の平均値とを減算処理することにより、前記多値データを階調変換して出力する際に発生する量子化誤差を算出することを特徴とする。
【0009】
【発明の実施の形態】
[第1の実施形態]
以下、図面を参照して本発明にかかる画像処理装置の実施形態を説明する。
【0010】
<処理概略>
図1は本発明にかかる画像処理装置の構成全体の概略を示したブロック図である。
【0011】
画像読み取り部109は、CCDセンサ102、アナログ信号処理部103等により構成され、レンズ101を介しCCDセンサ102に結像された原稿画像が、CCDセンサ102によりR(Red),G(Green),B(Blue)のアナログ電気信号に変換される。変換された画像情報は、アナログ信号処理部103に入力され、R,G,B,の各色毎にサンプル&ホールド、ダークレベルの補正等が行われた後にアナログ・デジタル変換(A/D変換)される。前記デジタル化されたフルカラー信号は、画像処理部104に入力される。
【0012】
画像処理部104では、シェーディング補正、色補正、γ補正等の読み取り系で必要な補正処理や、スムージング処理、エッジ強調、その他の処理、加工等が行われ、プリンタ部105に出力される。
【0013】
プリンタ部105は、レーザ等からなる露光制御部(図示せず)、画像形成部(図示せず)、転写紙の搬送制御部(図示せず)等により構成され、入力された画像信号により転写紙上に画像を記録する。
【0014】
また、CPU回路部110は、CPU106,ROM107,RAM108等により構成され、画像読み取り部109、画像処理部104、プリンタ部105等を制御し、本装置のシーケンスを統括的に制御する。
【0015】
<画像処理部>
次に、画像処理部104について説明する。図2は、画像処理部104の構成ブロック図である。
【0016】
図1のアナログ信号処理部103より出力されるデジタル画像信号は、シェーディング補正部201に入力される。シェーディング補正部201では、原稿を読みとるセンサーのばらつき及び、原稿照明用ランプの配光特性の補正を行っている。補正演算された画像信号は、輝度信号から、濃度データに変換するために、階調補正部202に入力され、濃度画像データを作成する。濃度データに変換された画像信号は、カラー/モノクロ変換部203に入力され、モノクロデータとして出力される。そして、カラー/モノクロ変換部203から出力されたデータは、階調変換処理部204に入力され、擬似中間調表現として誤差拡散処理(ED処理)もしくは平均濃度保存処理(MD処理)がおこなわれる。
【0017】
それでは、次に本発明のポイントである階調変換処理部204の全体構成を図3を用いて説明する。
【0018】
<階調変換処理部>
図3は本発明のポイントとなる階調変換処理部の詳細なブロック図である。尚、第1の実施形態においては1bitのMD法を例に挙げて説明する。
【0019】
誤差補正手段302は、カラーモノクロ変換部203の入力多値の画像信号Dに後述する乱数を加算した信号DRと、後述する2値化処理手段301で発生した誤差データEとを入力し、誤差補正を行って画像信号DEを算出し、2値化手段301へと出力を行う。
【0020】
2値化手段301は、画像信号DEと、後述する2値化スライス値Sと、後述する平均濃度算出値mとを入力し、画像信号DEと2値化スライス値Sとを比較することによって、2値出力Nを求めた後、画像信号DEと平均濃度算出値mとを減算処理することによって、2値化誤差データEの算出を行う。
【0021】
2値化結果遅延手段303は、2値出力Nを入力し、所定のライン数の遅延を行い、複数ライン2値化結果Nmn及びB*ijとして、平均濃度算出手段304、及び閾値算出手段309にデータを送る。
【0022】
平均濃度算出手段304は、複数ライン2値化結果Nmnを入力し、予め設定してある係数と、遅延された2値結果とで積和演算を行い、2値化手段301と、加算手段310と、セレクタ311とへ平均濃度算出値mの出力を行う。
【0023】
閾値算出手段309は、注目画素直前の結果を除く2値化結果遅延手段303の出力B*ijと、ヒステリシス制御量算出手段308の出力Tと、多値信号Dとが、入力されており、2値化スライス値S’を注目画素直前の(2値化)結果を参照しないで算出し、加算手段310へ出力を行う。
【0024】
閾値算出手段309で求められた信号値S’は、平均濃度算出手段304の出力mと共に、加算手段310に入力されて加算処理がおこなわれる。
【0025】
このとき、S’の信号が255のときには、2値化スライス値Sを255として出力し、それ以外のときには、S=S’+mの演算をおこなって出力している。その処理をプログラムとしてコーディングすると図13のようになる。
【0026】
セレクタ311は、本発明のポイントであり、外部から入力された文字/写真切替信号に応じて、平均濃度算出手段304の出力値と加算手段310の出力値とを切り替える処理がおこなわれる。
【0027】
この処理は、加算手段310のドット集中化制御信号と平均濃度算出手段304との信号を切り替えることにより、文字領域と写真領域とでドットの集中化量を変えることにより行われる。
【0028】
これにより、文字領域では、ドットの集中化制御を行わない解像度重視の画像形成が可能となり、写真部では、ドット集中化制御をおこなった階調重視の処理をおこなうことが可能となる。
【0029】
次に、乱数発生手段306は、後述する手法により、−17から+17の間のm系列の乱数Rを生成し、加算手段307で階調処理部204に入力された画像信号Dと加算処理が行われる。このとき、図示していないが、加算結果DRが0〜255の間に収まるようにリミッタ処理が”<0”,”>255”で示される範囲内で行われる。
【0030】
ヒステリシス制御量算出手段308は、後述する手法により、加算手段307の出力信号DRに応じた閾値制御がおこなわれる構成となっている。以下に各処理手段の詳細を説明する。
【0031】
<2値化>
2値化手段301は、画像信号DEと、後述する2値化スライス値Sと、後述する平均濃度算出値mとを入力し、これらを比較することによって、2値出力N及び2値化誤差データEの出力を行うもので、図4のような構成からなる。
【0032】
入力された画像信号DEは、2系統に別れ、一方は比較回路401に入力され、もう一方は減算回路402に入力される。
【0033】
比較回路401では画像信号DEと、2値化スライス値Sとの値を比較し、
DE>S の時は、N=1 (1)
DE≦S の時は、N=0 (2)
として2値出力Nを出力する。
【0034】
また、減算回路402では、平均濃度算出値mから画像信号DEの値を差し引き、2値化誤差データEとして、出力を行う。ここで、2値化誤差データEは(3)式で求めることができる。
【0035】
E=m−DE (3)
<誤差補正>
誤差補正手段302は、前記画像信号DRと、前記2値化誤差データEとを入力し、画像信号DRに誤差補正を行った画像信号DEを算出し、前記2値化手段301へと出力を行うもので、図5(a)のような構成からなる。
【0036】
入力された2値化誤差データEは除算回路5−1によって1/2にされる。その結果は2系統に分岐し、一方は減算回路5−2に入力、もう一方はラインバッファ5−3に入力される。
【0037】
減算回路5−2では、2値化誤差データEとE/2の差EB(=E−E/2)を算出し、加算回路5−4にその結果を入力する。
【0038】
加算回路5−4では、複数ビット(本実施形態の場合8ビットとする)1ライン分のラインバッファ5−3によって1ライン分遅延されたEAとEBとの和を算出し、加算回路5−5に出力する。
【0039】
加算回路5−5では、1ライン分遅延されたEAとEBとの和と、画像信号DRとの和を算出し、画像信号DEとして出力する。
【0040】
つまり、誤差補正手段302では、図5(b)のように、注目画素に対して1ライン上のAを2値化したときの2値化誤差EAと1画素前のBを2値化したときの2値化誤差EBの値を注目画素のデータに足し込む処理を行う。
【0041】
<2値化結果遅延>
2値化結果遅延手段303は、2値出力Nを入力し、所定のライン数の遅延を行い、複数ライン2値化結果Nmn、B*ijとして、平均濃度算出手段304及び閾値算出手段309にデータを送るもので、図6のような構成からなる。
【0042】
入力された2値出力Nは、1ビット1ライン分のラインバッファ6−1からラインバッファ6−2へと送られていき、データがライン毎に遅延されていく。
【0043】
また、遅延されないデータは、1画素分の遅延回路からなる遅延6−3から遅延6−8によって、次々と1画素分の遅延がなされる。そして、遅延6−6の出力、遅延6−7の出力をそれぞれN14,N15として出力する。
【0044】
ラインバッファ6−1によって1ライン分遅延がなされた2値化データは、遅延6−9から遅延6−14によって、遅延され、遅延6−9から6−13の出力がN21からN25として、また、ラインバッファ6−2によってもう1ライン分遅延がなされた2値化データは、遅延6−15から遅延6−20によって、遅延され、遅延6−15から6−19の出力がN31からN35として出力される。
【0045】
同時に、遅延6−7から6−8の出力をそれぞれB20,B30として出力する。また、ラインバッファ6−1によって1ライン分遅延がなされた2値化データは、遅延6−9から遅延6−14によって、遅延され、それぞれB32からB02、Bi12からBi32として出力する。さらに、ラインバッファ6−2によってもう1ライン分遅延がなされた2値化データは、遅延6−15から遅延6−20によって、遅延され、それぞれB31からB01、Bi1からBi31として出力される。
【0046】
<平均濃度算出>
つまり、平均濃度算出手段304には、2次元の画像を2値化したデータが、複数ライン、複数画素の遅延処理が施され、複数ライン2値化結果Nmnとして、図7のような状態で平均濃度算出手段304に入力されることとなる。
【0047】
平均濃度算出手段304は、複数ライン2値化結果Nmnを入力し、予め設定してある係数と、遅延された2値結果とで、積和演算を行い2値化手段301と閾値算出手段309とで使用するデータmの出力を行うもので、図8のような構成からなる。
【0048】
つまり、乗算回路8−1では、2値化データN15と、係数M15とを入力し、両者の乗算結果を出力する。乗算回路8−2では、2値化データN14と、係数M14とを入力し、両者の乗算結果を出力する。同様な演算を乗算回路:8−3から乗算回路:8−12の全ての回路によって行い、それらの乗算結果を加算回路8−13によって全て足し込む。その結果を平均濃度算出値mとして出力を行う。この処理を行うときの係数の例は図9に示すとうりである。
【0049】
<乱数発生>
乱数発生手段306は、図10に示したようなm系列のシフトレジスタ符号系列発生器を用いた。これは、構成するシフトレジスタの段数をNとすると2N−1を周期とする擬似乱数を簡単なハードウェアで容易に発生できる。本構成では、A3原稿を400dpiで処理をしても周期性が現れないようにする為に25段の1bitシフトレジスタにより構成されている。
【0050】
その構成を図10(a)に基本的なブロック概念図として示し、図10(b)に処理プログラムを示す。以下、図10(b)を用いて説明する。
【0051】
ここで、本乱数発生器は、初期化でp[ii]:(0≦ii≦25)のレジスタに”0”を書き込み、p[12]のレジスタのみに”1”を設定する。そして、乱数値を出力する前に、毎回
p[0]=(p[25]^p[24]^p[23]^p[22]&1) (4)
の演算を行い、(5)式の乱数演算を行なう。
【0052】
ここで(4)式の処理で、「p[i]^p[j]」はビットi,jのOR論理演算を示し、「&」はAND論理演算を示す。
【0053】
以下同様にビットを1ビットずつシフトさせて、24番目のビットまで同様の処理が実行される。
【0054】
乱数=(1−2*p[22])*(((p[15]*64+p[16]
*32+p[17]*16+p[18]*8+p[19]*4
+p[20]*2+p[21]*17)/128) (5)
により、−17〜17の乱数値を出力する構成としている。
【0055】
本実施形態では、−17〜17の乱数を用いているが、乱数発生部を
乱数=(1−2*p[2])*(p[18]*8+p[19]*4
+p[20]*2+p[21]) (6)
とし、−15〜15までの乱数値を出力する様に変更しても同様な効果が得られる。無論、乱数の値を0にしてしまうことも可能だが、2値化スライス値を変化させテクスチャ制御を自然に行う為には、ある程度の乱数が付加されたデータを用いるのが良い。ここで、(5)、(6)式で用いる「*」は乗算を示すものである。以下に説明する(8)、(9)式においても同様である。
【0056】
<加算>
加算手段307は、前述したように、階調処理部204に入力された画像信号Dと乱数発生手段306で発生した乱数との加算処理が行われる。
【0057】
DR=D+R
if(DR>255){DR=255;} (7)
if(DR<){DR=0;}
このとき、加算結果DRが0〜255の間に収まるようにリミッタ処理が行われる。
【0058】
<ヒステリシス制御量算出>
図11はヒステリシス制御量算出手段308の処理内容を示す図である。ヒステリシス制御量算出手段308は、入力信号DRに応じて、定数ALF(=32)の値を変化させて出力する。これは、任意の濃度領域で、ヒステリシス量を調整する為である。つまり、これにより、任意の濃度領域でテクスチャ制御が可能となる。
【0059】
例えば、入力された信号DRが定数LR1(=16)以下の場合、llを0に設定するような処理をおこない、入力された信号DRが定数LR1より大きくかつ定数LR2(=48)以下の場合には、llを次式により求める。
【0060】
ll=((DR-LR1)*(ALF*256/(LR2-LR1)))/256; (8)
この演算により、入力信号DRの値が定数LR1から定数LR2に増加するに従い、llの値は、徐々に0から定数ALFに近づくことになる。
【0061】
同様に、入力信号DRが、定数LR2より大きくかつ定数LR3(=223)以下の場合には、llを一定な定数ALFとして出力する。
【0062】
さらに、入力信号DRが、定数LR3より大きくかつ定数LR4(=255)以下の場合には、llを次式により求める。
【0063】
ll=ALF-(DR-LR3)*(ALF*256/(LR4-LR3)))/256; (9)
これは入力信号DRの値がLR3から定数LR4に増加するに従い、出力llが、徐々に定数ALFから0に近づくことを示している。
【0064】
一方、入力信号DRがLR4より大きい場合には、llを0に設定するような処理が行われる。
【0065】
以上の処理結果llから、定数ALFm(=16)を減算したものが、出力信号Tとして出力される。この減算を行う目的は、ヒステリシス制御量算出手段308の信号Tを負の値から正の値まで変化させる為である。これにより、ラチチュードが広い範囲で任意の濃度領域に於けるテクスチャ制御が可能となる。
【0066】
<閾値算出>
次に、閾値算出手段309の処理を図12(a),(b)を用いて説明する。ここでは、説明の関係上プログラム言語Cにより説明する。
【0067】
閾値算出手段309へ入力されたヒステリシス制御量算出手段308の信号Tの値を、それぞれ定数LT1(=2),LT2(=4),LT3(=8),LT4(=16)で割って、内部演算により、変数A(=T/LT1),B(=T/LT2),C(=T/LT3),D(=T/LT4)を求める。
【0068】
次に、閾値算出手段309は、後述する図12(a)で、2値化結果遅延手段303からの出力B*ijの2値化結果配置状態(パターン)に応じて、2値化スライス値S’の値を、変数A,B,C,Dと定数のみで制御する。ここで平均濃度算出手段304の出力mを用いていない為、平均濃度算出手段304の演算結果が求まる前に、閾値算出手段309の演算を始めることが可能となる。
【0069】
この2値化結果配置状態(パターン)は、図12(b)に示した通りである。これらは、すべて過去の2値化結果をあらわしており、注目画素の一つ前の画素を参照していない。実際に2値化結果の配置(パターン)に応じて、2値化スライス値Sが制御される構成を図12(a)を用いて説明する。図12(a)はC言語によるプログラムにより処理内容を詳細に表現したものである。ここで、「&&」は論理演算の「AND」に相当し、「==」は変数の設定に相当する処理を示す(以下、同様の標記において同じ)。
【0070】
注目画素の周りの2値化状況が,
B32==0&&B22==1&&B12==0&&B21==0 (10)
&&B11==1&&B01=0
または、
Bi12==0&&Bi22==1&&Bi32==0 (11)
&&B01==0&&Bi11==1&&Bi21=0
の場合には、2値化スライス値Sを強制的にmaxの定数255にして出力する。
【0071】
これは、上記の条件の時に、強制的にドットを打ちにくくする為である。
【0072】
また、注目画素の周りの2値化状況が、
B12==0&&B02==0&&Bi12==0&&Bi22
==0&&Bi32==0&&B11==0&&B01==0 (12)
&&Bi11==1&&Bi21==0&&Bi31==0
&&B20==0&&hi==1
で、かつ入力多値データDが、31(0〜255中の31)未満の場合にも、2値化スライス値Sを強制的にmaxの定数255にして出力する。
【0073】
これも上記の条件の時に、強制的にドットを打ちにくくする為である。このとき、注目画素の一画素前の結果を参照していない。
【0074】
一方、上記の条件で、入力多値データDが、31(0〜255中の31)以上の場合には、22値化スライス値Sを平均濃度算出値mに設定して出力をおこなう。
【0075】
これは、過去の2値化結果が特定の配列(パターン)になった場合には、テクスチャ制御をおこなわないようにする為である。無論、ここでいう31という定数は、決まった値ではなく、パラメータであり48や64などの別な値にも設定可能である。このとき、31の値を大きくすると、積極的にテクスチャ制御がかかりやすくなり、逆に、小さくするとテクスチャ制御がかかりにくくなることは言うまでもない。
【0076】
一方、注目画素の周りの2値化状況が、
B02==0&&Bi12==0&&B11==0&&B01==1 (13)
&&Bi11==1&&Bi21=0&&B20=0
の場合には、2値化スライス値Sを平均濃度算出値mから、変数Aを減算した値(S=m−A)に設定して出力する。
【0077】
これは、上記の条件の時に、強制的にドットを打ち易くする為である。このときも、注目画素直前の2値化結果は参照しないで処理をおこなっている。
【0078】
同様に、各2値化結果のパターンに応じて、注目画素直前の結果を参照せずに2値化スライス値Sの値を内部変数A,B,C,Dと定数とを用いて2値化スライス値S’を制御していく。
【0079】
その結果、ヒステリシス制御量算出値Tが正の場合には、ドットが打たれやすい方に制御され、ヒステリシス制御量算出値Tが負の場合には、ドットが打たれにくい方に制御される。本実施例では、ヒステリシス制御量算出値Tの値を正にすることで、ドットが打たれやすいように制御している。言い換えると、ドットが集中するように制御している。
【0080】
以上のような処理を各画素に関して順次行っていくと、ヒステリシス制御量算出値Tの値に応じて任意の濃度領域で、かつ、2値化結果遅延手段の出力値B*ijの値に応じて任意の形のテクスチャに制御が可能となる。
【0081】
このようにして求められた2値化スライス値S’は、平均濃度算出手段304の出力mと共に、加算手段310に入力されて加算処理がおこなわれる。
【0082】
このとき、S’の信号が255のときには、2値化スライス値Sを255として出力し、それ以外のときには、S=S’+mの演算をおこなって出力している。その処理内容をプログラムで記述すると図13で示すようになる。
【0083】
上記の処理を各画素に関して順次行っていくと、ヒステリシス制御量算出値Tの値に応じて任意の濃度領域で、かつ、2値化結果遅延手段の出力値B*ijの値に応じて任意の形のテクスチャに制御が可能となる。
【0084】
本実施形態では、2×2の画素単位のテクスチャになるような制御を行なっている。これにより、プリンターの特性で一画素が安定しない領域で任意の数のドットを集めて安定化させた画像形成が可能となる。
【0085】
このような処理が閾値算出手段309で行われた後、前述した2値化手段301により、2値化処理がおこなわれ、その2値信号を階調変換処理部204から出力し、プリンタ部105でプリントアウトされる構成となっている。
【0086】
文字/写真領域信号により、ドット集中化量を制御した階調変換を行なうことにより、写真部は階調性を重視した画像形成が可能となり、文字部では解像度を重視した画像形成が可能となる。これにより、プリンターの特性でドットが安定しないプリンターに於いても、テクスチャ制御をおこないながら文字部の解像度を下げない処理が可能となる。
【0087】
[第2の実施形態]
図面を参照して第2の実施形態を詳細に説明する。第2の実施形態における基本的な装置構成で上述した第1の実施形態と同様な部分は、同一番号を付け説明を省略する。
【0088】
図3に示した第1の実施形態の構成は、セレクタ311に於いて、文字/写真切替信号により、加算手段310の信号と平均濃度算出手段304の信号とを切り替えて出力する構成としていた。これにより、文字部では解像度を重視した画像形成、写真部では階調性を重視した画像形成を行っていた。
【0089】
それに対し、図14に示した第2の実施形態の構成は、閾値算出手段312に文字/写真切替信号を入力し、閾値算出手段312内で文字部と写真部との生成閾値を変える構成にしたものである。
【0090】
閾値算出手段312の詳細の処理を図15にプログラムとして示す。
【0091】
第1の実施形態に示した図12(a)の場合は、一律に定数A,B,C,Dを
A=T/LT1; (14)
B=T/LT2; (15)
C=T/LT3; (16)
D=T/LT4; (17)
(T:入力信号、LT1,LT2,LT3,LT4:定数)
の演算によって求めていたが、本実施形態では、
文字領域A=T/LT1M; (18)
B=T/LT2M; (19)
C=T/LT3M; (20)
D=T/LT4M; (21)
写真領域A=T/LT1S; (22)
B=T/LT2S; (23)
C=T/LT3S; (24)
D=T/LT4S; (25)
(T:入力信号、LT1M,LT2M,LT3M,LT4M,LT1S,LT2S,LT3S,LT4S:定数)
のA,B,C,Dの信号を、文字/写真切替信号により切り替えて生成していることを特徴としている。
【0092】
このとき、定数LT1S,LT2S,LT3S,LT4Sの値には、正の値を設定してあり、定数LT1M,LT2M,LT3M,LT4Mには、負に値が設定してある。正負により濃度の疎密を制御するのは第1の実施形態と同様である。
【0093】
第2の実施形態で設定した具体的な値は図15(a)に具体的に示されている。写真領域に於いて、定数LT1S,LT2S,LT3S,LT4Sの値を正の値に設定するのは、第1の実施形態で説明したように、写真領域の演算結果A、B、C、D((22)式から(25)式)を正の値にする為であり、これにより、ドット集中化量の制御を行い、階調の安定性を重視した出力を可能としている。
【0094】
同様に、文字領域に於いて、定数LT1M,LT2M,LT3M,LT4Mの値を負の値に設定するのは、第1の実施形態で説明したように、文字領域の演算結果A、B、C、D((18)式から(21)式)を負の値にする為であり、これにより、ドット分散化の制御を行い、解像度重視の出力を可能としている。
【0095】
本実施形態は、写真領域に於けるドットを集中化させた階調性重視の画像形成や、文字領域に於けるドットを分散化させた解像度重視の画像形成との割合(ドットの集中/分散化量)を自由にコントロールできる為、様々なプリンター特性に任意に対応できることを特徴としている。
【0096】
以上説明した処理が閾値算出手段312で行われた後、第1の実施形態と同様な処理を行って、2値信号を階調変換処理部204から出力し、プリンタ部105でプリントアウトする構成となっている。
【0097】
ところで、第1及び第2の実施形態では、2値化について述べたが、本発明はこれに限定するものではない。つまり、4値化、8値化、16値化などの一般的な多値化にも適用ができる。さらに、第1及び第2の実施形態のように平均濃度保存法(MD法)に限定したものではなく、一般的な誤差拡散法(ED法)にも適用できることは言うまでもない。
【0098】
また、カラー画像に対して、適用出来ることも言うまでもない。
【0099】
【他の実施形態】
なお、本発明は、複数の機器(例えばホストコンピュータ,インタフェイス機器,リーダ,プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用してもよい。
【0100】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。
【0101】
この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0102】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。
【0103】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0104】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0105】
【発明の効果】
文字/写真領域信号により、ドット集中化量を制御した階調変換を行なうことにより、写真部は階調性を重視した画像形成が可能となり、文字部では解像度を重視した画像形成が可能となる。これにより、プリンターの特性でドットが安定しないプリンターに於いても、テクスチャ制御をおこないながら文字部の解像度を下げない処理が可能となる。
【図面の簡単な説明】
【図1】本発明にかかる画像処理装置の構成を説明するブロック図である。
【図2】画像処理部を説明するブロック図である。
【図3】本発明に係る第1の実施形態の階調変換処理部204の詳細を説明するブロック図である。
【図4】第1の実施形態における2値化手段301の構成を説明する図である。
【図5】第1の実施形態における誤差補正手段302の構成及び処理を説明する図である。
【図6】第1の実施形態における2値化結果遅延手段303の構成を説明する図である。
【図7】第1の実施形態における2値化結果遅延手段303で用いるデータの構成を示す図である。
【図8】第1の実施形態における平均濃度算出手段304の構成を説明する図である。
【図9】第1の実施形態における平均濃度算出手段304で用いる係数の構成を示す図である。
【図10】第1の実施形態における乱数発生手段306の構成と処理を説明する図である。
【図11】第1の実施形態における手段ヒステリシス制御量算出手段308の処理を説明する図である。
【図12】第1の実施形態における閾値算出手段309の処理を説明する図である。
【図13】第1の実施形態における加算手段310の処理を説明する図である。
【図14】第2の実施形態における画像処理部204の詳細を示すブロック図である。
【図15】第2の実施形態における閾値算出手段312の処理を説明する図である。
【符号の説明】
101 レンズ
102 CCDセンサ
103 アナログ信号処理部
104 画像処理部
105 プリンタ
106 CPU
107 ROM
108 RAM
109 画像読取り部
110 CPU回路部
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to an image processing apparatus and an image processing method for forming an image by converting gradation of multi-value input image data.
[0002]
[Prior art]
An error diffusion method (hereinafter referred to as ED), an average density preservation method (hereinafter referred to as MD), and the like are generally known as image forming methods for performing halftone expression. These are intended to represent halftones in a macro manner by expressing area gradations using a small number of gradations. That is, it is a pseudo halftone expression method. Since gradation can be expressed with a small number of bits, this has the effect of reducing the load on hardware that handles image data.
[0003]
In addition, depending on the characteristics of the printer, there are cases where isolated dots cannot be accurately output in the n-value gradation conversion process. Stabilization of image quality has been achieved through the process of concentration.
[0004]
[Problems to be solved by the invention]
However, when the dots are concentrated, there is a problem that the resolution is approximated to a reduced state. In other words, the effect of concentrating dots is great in places where importance is placed on gradation such as photographs, but jaggies become conspicuous if the dots are concentrated in places where importance is placed on the resolution of characters and the like. There is a problem, and the required processing differs between the photo area and the character area.
[0005]
[Means for Solving the Problems]
Therefore, in order to solve the above problems, the image processing apparatus according to the present invention controls the threshold value of gradation conversion according to the result of gradation conversion performed in the past, and the photographic area and the character area. The threshold generation parameter is changed.
[0006]
  That is, an image processing apparatus having means for inputting multi-value data having shading information for each pixel, and means for gradation-converting the input multi-value data,
  Quantization error generated when the multi-value data is output after gradation conversionFirst calculationMeans,
  Based on the quantization error, a quantization error near the target pixel is calculated.Second calculationMeans,
  The quantization error value in the vicinity of the target pixel is added to the target pixel to correct the error.correctionMeans,
  in frontFloorStorage means for storing the result of the key conversion;
  Stored in the storage meansAverage value of gradation conversion results for multiple pixelsAccording to the generation means for generating a threshold value of the gradation conversion,
  Control means for controlling a threshold value generated by the generating means in response to a signal indicating a character area and a photo area;
  The control means controls the threshold value to disperse dots for character areas, and controls the threshold value to concentrate dots for photo areas.And
  The first calculation means performs gradation conversion on the multi-value data by subtracting the multi-value data and an average value of the results of gradation conversion for a plurality of pixels stored in the storage means. Calculate the quantization error that occurs during outputIt is characterized by that.
[0008]
  Thereby, texture control of gradation conversion processing can be performed in an arbitrary area, a photograph area, and a character area.
  Further, an image processing method executed in an image processing apparatus having means for inputting multivalued data having grayscale information for each pixel and means for converting the gradation of the inputted multivalued data,
  Quantization error generated when the multi-value data is output after gradation conversionFirst calculationProcess,
  Based on the quantization error, a quantization error near the target pixel is calculated.Second calculationProcess,
  The quantization error value in the vicinity of the target pixel is added to the target pixel to correct the error.correctionProcess,
  in frontFloorA storage step of storing the result of the key conversion in the storage means;
  Store in the storage meansAverage value of gradation conversion results for multiple pixelsAccording to the generation step of generating a threshold value of the gradation conversion,
  A control step of controlling a threshold value generated by the generation step in response to a signal indicating a character region and a photo region;
  The control step controls the threshold value to disperse dots for character areas and controls the threshold value to concentrate dots for photo areas.And
  The first calculation step performs gradation conversion on the multi-value data by subtracting the multi-value data and an average value of the results of gradation conversion for a plurality of pixels stored in the storage unit. Calculate the quantization error that occurs during outputIt is characterized by that.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
[First embodiment]
Embodiments of an image processing apparatus according to the present invention will be described below with reference to the drawings.
[0010]
<Process outline>
FIG. 1 is a block diagram showing an outline of the overall configuration of an image processing apparatus according to the present invention.
[0011]
The image reading unit 109 includes a CCD sensor 102, an analog signal processing unit 103, and the like. A document image formed on the CCD sensor 102 via the lens 101 is converted into R (Red), G (Green), It is converted into an analog electric signal of B (Blue). The converted image information is input to the analog signal processing unit 103, and is subjected to analog-digital conversion (A / D conversion) after sample & hold, dark level correction, etc. for each of R, G, B colors. Is done. The digitized full color signal is input to the image processing unit 104.
[0012]
The image processing unit 104 performs correction processing necessary for the reading system such as shading correction, color correction, and γ correction, smoothing processing, edge enhancement, other processing, processing, and the like, and outputs the result to the printer unit 105.
[0013]
The printer unit 105 includes an exposure control unit (not shown) including a laser, an image forming unit (not shown), a transfer paper conveyance control unit (not shown), and the like. Record an image on paper.
[0014]
The CPU circuit unit 110 includes a CPU 106, a ROM 107, a RAM 108, and the like, and controls the image reading unit 109, the image processing unit 104, the printer unit 105, and the like, and comprehensively controls the sequence of the apparatus.
[0015]
<Image processing unit>
Next, the image processing unit 104 will be described. FIG. 2 is a configuration block diagram of the image processing unit 104.
[0016]
The digital image signal output from the analog signal processing unit 103 in FIG. 1 is input to the shading correction unit 201. The shading correction unit 201 corrects variations in sensors for reading a document and light distribution characteristics of a document illumination lamp. The corrected image signal is input to the gradation correction unit 202 to generate density image data in order to convert the brightness signal into density data. The image signal converted into density data is input to the color / monochrome conversion unit 203 and output as monochrome data. The data output from the color / monochrome conversion unit 203 is input to the gradation conversion processing unit 204, and error diffusion processing (ED processing) or average density storage processing (MD processing) is performed as a pseudo halftone expression.
[0017]
Next, the overall configuration of the gradation conversion processing unit 204, which is the point of the present invention, will be described with reference to FIG.
[0018]
<Tone conversion processing unit>
FIG. 3 is a detailed block diagram of the gradation conversion processing unit as a point of the present invention. In the first embodiment, the 1-bit MD method will be described as an example.
[0019]
The error correction unit 302 receives a signal DR obtained by adding a random number (to be described later) to the input multivalued image signal D of the color / monochrome conversion unit 203 and error data E generated by the binarization processing unit 301 (to be described later). The image signal DE is calculated by performing correction, and output to the binarization means 301.
[0020]
The binarization unit 301 inputs an image signal DE, a binarized slice value S described later, and an average density calculated value m described later, and compares the image signal DE with the binarized slice value S. After obtaining the binary output N, the binarization error data E is calculated by subtracting the image signal DE and the average density calculation value m.
[0021]
The binarization result delay unit 303 receives the binary output N, delays by a predetermined number of lines, and calculates the average density calculation unit 304 and the threshold value calculation unit 309 as a plurality of line binarization results Nmn and B * ij. Send data to.
[0022]
The average density calculation unit 304 receives a multi-line binarization result Nmn, performs a product-sum operation on a preset coefficient and the delayed binary result, and performs binarization unit 301 and addition unit 310. Then, the average density calculation value m is output to the selector 311.
[0023]
The threshold value calculation means 309 receives the output B * ij of the binarization result delay means 303 excluding the result immediately before the target pixel, the output T of the hysteresis control amount calculation means 308, and the multilevel signal D. The binarized slice value S ′ is calculated without referring to the (binarization) result immediately before the target pixel, and is output to the adding means 310.
[0024]
The signal value S ′ obtained by the threshold value calculating means 309 is input to the adding means 310 together with the output m of the average density calculating means 304 to be added.
[0025]
At this time, when the signal of S ′ is 255, the binarized slice value S is output as 255, and otherwise, the calculation of S = S ′ + m is performed and output. If the process is coded as a program, it is as shown in FIG.
[0026]
The selector 311 is a point of the present invention, and a process of switching between the output value of the average density calculating unit 304 and the output value of the adding unit 310 is performed in accordance with a character / photo switching signal input from the outside.
[0027]
This processing is performed by switching the dot concentration control signal of the adding unit 310 and the signal of the average density calculating unit 304 to change the dot concentration amount between the character region and the photo region.
[0028]
As a result, it is possible to form an image with emphasis on resolution without performing dot concentration control in the character region, and it is possible to perform gradation-oriented processing with dot concentration control in the photo section.
[0029]
Next, the random number generation unit 306 generates an m-sequence random number R between −17 and +17 by a method to be described later, and the addition unit 307 performs addition processing with the image signal D input to the gradation processing unit 204. Done. At this time, although not shown, limiter processing is performed within a range indicated by “<0” and “> 255” so that the addition result DR falls within the range of 0 to 255.
[0030]
The hysteresis control amount calculating unit 308 is configured to perform threshold control according to the output signal DR of the adding unit 307 by a method described later. Details of each processing means will be described below.
[0031]
<Binarization>
The binarization means 301 inputs an image signal DE, a binarized slice value S, which will be described later, and an average density calculation value m, which will be described later, and compares them to obtain a binary output N and a binarization error. Data E is output and has a configuration as shown in FIG.
[0032]
The input image signal DE is divided into two systems, one being input to the comparison circuit 401 and the other being input to the subtraction circuit 402.
[0033]
The comparison circuit 401 compares the value of the image signal DE and the binarized slice value S,
When DE> S, N = 1 (1)
When DE ≦ S, N = 0 (2)
As a result, a binary output N is output.
[0034]
Further, the subtraction circuit 402 subtracts the value of the image signal DE from the average density calculation value m and outputs the result as binarization error data E. Here, the binarization error data E can be obtained by equation (3).
[0035]
E = m-DE (3)
<Error correction>
The error correction unit 302 receives the image signal DR and the binarized error data E, calculates an image signal DE obtained by performing error correction on the image signal DR, and outputs the image signal DE to the binarization unit 301. This is performed and has a configuration as shown in FIG.
[0036]
The input binarization error data E is halved by the division circuit 5-1. The result is branched into two systems, one input to the subtraction circuit 5-2 and the other input to the line buffer 5-3.
[0037]
The subtraction circuit 5-2 calculates a difference EB (= EE−E / 2) between the binarization error data E and E / 2, and inputs the result to the addition circuit 5-4.
[0038]
The adder circuit 5-4 calculates the sum of EA and EB delayed by one line by the line buffer 5-3 for one line of plural bits (8 bits in this embodiment). 5 is output.
[0039]
The adder circuit 5-5 calculates the sum of the EA and EB delayed by one line and the image signal DR and outputs it as the image signal DE.
[0040]
That is, in the error correction unit 302, as shown in FIG. 5B, the binarization error EA when binarizing A on one line with respect to the pixel of interest and B before one pixel are binarized. At this time, a process of adding the value of the binarization error EB to the data of the target pixel is performed.
[0041]
<Binary result delay>
The binarization result delay unit 303 receives the binary output N, performs a delay of a predetermined number of lines, and outputs to the average density calculation unit 304 and the threshold calculation unit 309 as a plurality of line binarization results Nmn and B * ij. Data is sent and has a configuration as shown in FIG.
[0042]
The input binary output N is sent from the line buffer 6-1 for one bit to one line to the line buffer 6-2, and data is delayed for each line.
[0043]
In addition, the data that is not delayed is delayed one pixel at a time by delay 6-3 to delay 6-8 including a delay circuit for one pixel. The outputs of delay 6-6 and delay 6-7 are output as N14 and N15, respectively.
[0044]
The binarized data delayed by one line by the line buffer 6-1 is delayed by delays 6-9 to 6-14, the outputs of delays 6-9 to 6-13 are changed from N21 to N25, and The binarized data delayed by another line by the line buffer 6-2 is delayed by delay 6-15 to delay 6-20, and the outputs of delays 6-15 to 6-19 are changed from N31 to N35. Is output.
[0045]
At the same time, outputs of delays 6-7 to 6-8 are output as B20 and B30, respectively. The binarized data delayed by one line by the line buffer 6-1 is delayed by delays 6-9 to 6-14 and output as B32 to B02 and Bi12 to Bi32, respectively. Further, the binarized data delayed by another line by the line buffer 6-2 is delayed by delays 6-15 to 6-20 and output as B31 to B01 and Bi1 to Bi31, respectively.
[0046]
<Average concentration calculation>
That is, the average density calculation means 304 is subjected to delay processing of a plurality of lines and a plurality of pixels from data obtained by binarizing a two-dimensional image, and a plurality of lines binarization result Nmn is as shown in FIG. This is input to the average density calculation means 304.
[0047]
The average density calculation unit 304 receives a multi-line binarization result Nmn, performs a product-sum operation on a preset coefficient and the delayed binary result, and performs binarization unit 301 and threshold calculation unit 309. The data m used in the above is output, and has a configuration as shown in FIG.
[0048]
That is, the multiplication circuit 8-1 receives the binarized data N15 and the coefficient M15, and outputs the multiplication result of both. In the multiplication circuit 8-2, the binarized data N14 and the coefficient M14 are input, and the multiplication result of both is output. Similar operations are performed by all the circuits from the multiplier circuit 8-3 to the multiplier circuit 8-12, and all the multiplication results are added by the adder circuit 8-13. The result is output as an average density calculation value m. An example of the coefficient when this processing is performed is as shown in FIG.
[0049]
<Random number generation>
As the random number generation means 306, an m-sequence shift register code sequence generator as shown in FIG. 10 is used. In this case, if the number of stages of the shift register is N, a pseudo random number having a cycle of 2N-1 can be easily generated with simple hardware. In this configuration, a 25-bit 1-bit shift register is used so that periodicity does not appear even when an A3 document is processed at 400 dpi.
[0050]
FIG. 10A shows the configuration as a basic block conceptual diagram, and FIG. 10B shows a processing program. Hereinafter, a description will be given with reference to FIG.
[0051]
Here, the random number generator writes “0” to the register of p [ii]: (0 ≦ ii ≦ 25) at initialization, and sets “1” only to the register of p [12]. And every time before outputting random value,
p [0] = (p [25] ^ p [24] ^ p [23] ^ p [22] & 1) (4)
And the random number calculation of equation (5) is performed.
[0052]
Here, in the processing of equation (4), “p [i] ^ p [j]” indicates an OR logic operation of bits i and j, and “&” indicates an AND logic operation.
[0053]
Similarly, the bits are shifted one bit at a time, and the same processing is executed up to the 24th bit.
[0054]
Random number = (1-2 * p [22]) * (((p [15] * 64 + p [16]
* 32 + p [17] * 16 + p [18] * 8 + p [19] * 4
+ P [20] * 2 + p [21] * 17) / 128) (5)
Therefore, a random number value of −17 to 17 is output.
[0055]
In the present embodiment, random numbers of -17 to 17 are used.
Random number = (1-2 * p [2]) * (p [18] * 8 + p [19] * 4
+ P [20] * 2 + p [21]) (6)
The same effect can be obtained even if it is changed to output random values from -15 to 15. Of course, the value of the random number can be set to 0, but in order to change the binarized slice value and perform texture control naturally, it is preferable to use data with a certain amount of random number added. Here, “*” used in equations (5) and (6) indicates multiplication. The same applies to equations (8) and (9) described below.
[0056]
<Addition>
As described above, the adding unit 307 performs addition processing of the image signal D input to the gradation processing unit 204 and the random number generated by the random number generating unit 306.
[0057]
DR = D + R
if (DR> 255) {DR = 255;} (7)
if (DR <) {DR = 0;}
At this time, the limiter process is performed so that the addition result DR falls within the range of 0 to 255.
[0058]
<Hysteresis control amount calculation>
FIG. 11 is a diagram showing the processing contents of the hysteresis control amount calculation means 308. The hysteresis control amount calculation means 308 changes the value of the constant ALF (= 32) in accordance with the input signal DR and outputs it. This is for adjusting the hysteresis amount in an arbitrary density region. That is, this enables texture control in an arbitrary density region.
[0059]
For example, when the input signal DR is less than or equal to the constant LR1 (= 16), processing is performed to set ll to 0, and when the input signal DR is greater than the constant LR1 and less than or equal to the constant LR2 (= 48) Is obtained from the following equation.
[0060]
ll = ((DR-LR1) * (ALF * 256 / (LR2-LR1))) / 256; (8)
By this calculation, the value of ll gradually approaches 0 from the constant LR1 to the constant ALF as the value of the input signal DR increases from the constant LR1 to the constant LR2.
[0061]
Similarly, when the input signal DR is larger than the constant LR2 and equal to or smaller than the constant LR3 (= 223), 11 is output as a constant constant ALF.
[0062]
Further, when the input signal DR is larger than the constant LR3 and equal to or smaller than the constant LR4 (= 255), 11 is obtained by the following equation.
[0063]
ll = ALF- (DR-LR3) * (ALF * 256 / (LR4-LR3))) / 256; (9)
This indicates that the output 11 gradually approaches 0 from the constant ALF as the value of the input signal DR increases from LR3 to the constant LR4.
[0064]
On the other hand, when the input signal DR is larger than LR4, a process for setting 11 to 0 is performed.
[0065]
A value obtained by subtracting the constant ALFm (= 16) from the above processing result ll is output as the output signal T. The purpose of this subtraction is to change the signal T of the hysteresis control amount calculation means 308 from a negative value to a positive value. This makes it possible to control the texture in an arbitrary density region within a wide range of latitude.
[0066]
<Threshold calculation>
Next, the processing of the threshold value calculation unit 309 will be described with reference to FIGS. Here, the description will be given in the program language C for the sake of explanation.
[0067]
The value of the signal T of the hysteresis control amount calculation means 308 input to the threshold value calculation means 309 is divided by constants LT1 (= 2), LT2 (= 4), LT3 (= 8), and LT4 (= 16), respectively. Variables A (= T / LT1), B (= T / LT2), C (= T / LT3), and D (= T / LT4) are obtained by internal calculation.
[0068]
Next, the threshold value calculation unit 309 performs binarization slice values according to the binarization result arrangement state (pattern) of the output B * ij from the binarization result delay unit 303 in FIG. The value of S ′ is controlled only by variables A, B, C, D and constants. Since the output m of the average density calculation unit 304 is not used here, the calculation of the threshold value calculation unit 309 can be started before the calculation result of the average density calculation unit 304 is obtained.
[0069]
This binarization result arrangement state (pattern) is as shown in FIG. All of these represent past binarization results and do not refer to the pixel immediately before the target pixel. A configuration in which the binarized slice value S is actually controlled according to the binarization result arrangement (pattern) will be described with reference to FIG. FIG. 12A shows the details of processing by a program in C language. Here, “&&” corresponds to “AND” of a logical operation, and “==” indicates processing corresponding to setting of a variable (hereinafter, the same notation is used).
[0070]
The binarization situation around the pixel of interest
B32 == 0 && B22 == 1 && B12 == 0 && B21 == 0 (10)
&& B11 == 1 && B01 = 0
Or
Bi12 == 0 && Bi22 == 1 && Bi32 == 0 (11)
&& B01 == 0 && Bi11 == 1 && Bi21 = 0
In this case, the binarized slice value S is forcibly set to a constant 255 of max and output.
[0071]
This is to make it difficult to forcibly hit dots under the above conditions.
[0072]
Also, the binarization situation around the pixel of interest is
B12 == 0 && B02 == 0 && Bi12 == 0 && Bi22
== 0 && Bi32 == 0 && B11 == 0 && B01 == 0 (12)
&& Bi11 == 1 && Bi21 == 0 && Bi31 == 0
&& B20 == 0 && hi == 1
In addition, even when the input multi-value data D is less than 31 (31 out of 0 to 255), the binarized slice value S is forcibly set to a constant constant 255 of max.
[0073]
This is also for making it difficult to forcibly hit dots under the above conditions. At this time, the result one pixel before the target pixel is not referred to.
[0074]
On the other hand, if the input multi-value data D is 31 (31 out of 0 to 255) or more under the above conditions, the 22-valued slice value S is set to the average density calculated value m and output is performed.
[0075]
This is to prevent the texture control from being performed when the past binarization result has a specific arrangement (pattern). Of course, the constant 31 here is not a fixed value but a parameter and can be set to another value such as 48 or 64. At this time, it goes without saying that if the value of 31 is increased, texture control is more likely to be actively applied. Conversely, if the value is decreased, texture control is less likely to be applied.
[0076]
On the other hand, the binarization situation around the pixel of interest is
B02 == 0 && Bi12 == 0 && B11 == 0 && B01 == 1 (13)
&& Bi11 == 1 && Bi21 = 0 && B20 = 0
In this case, the binarized slice value S is set to a value obtained by subtracting the variable A from the average density calculated value m (S = m−A) and output.
[0077]
This is to make it easier to forcibly hit the dots under the above conditions. Also at this time, the processing is performed without referring to the binarization result immediately before the target pixel.
[0078]
Similarly, the binarized slice value S is binarized using the internal variables A, B, C, D and constants without referring to the result immediately before the target pixel, according to each binarization result pattern. The slice value S ′ is controlled.
[0079]
As a result, when the hysteresis control amount calculation value T is positive, control is performed so that the dot is easily hit, and when the hysteresis control amount calculation value T is negative, control is performed so that the dot is not easily hit. In this embodiment, the control value is controlled so that the dot is easily shot by making the hysteresis control amount calculated value T positive. In other words, control is performed so that dots are concentrated.
[0080]
When the above-described processing is sequentially performed on each pixel, in any density region according to the value of the hysteresis control amount calculation value T and according to the output value B * ij of the binarization result delay means. Control to any shape of texture.
[0081]
The binarized slice value S ′ obtained in this way is input to the adding means 310 together with the output m of the average density calculating means 304 to be added.
[0082]
At this time, when the signal of S ′ is 255, the binarized slice value S is output as 255, and otherwise, the calculation of S = S ′ + m is performed and output. When the processing contents are described by a program, it is as shown in FIG.
[0083]
When the above-described processing is sequentially performed on each pixel, it is arbitrary in accordance with the value of the hysteresis control amount calculation value T and arbitrary in accordance with the value of the binarization result delay unit output value B * ij. It becomes possible to control the texture of the shape.
[0084]
In the present embodiment, control is performed so that the texture becomes a 2 × 2 pixel unit. This makes it possible to form an image in which an arbitrary number of dots are collected and stabilized in an area where one pixel is not stable due to the characteristics of the printer.
[0085]
After such processing is performed by the threshold value calculation unit 309, binarization processing is performed by the binarization unit 301 described above, and the binary signal is output from the gradation conversion processing unit 204, and the printer unit 105 Is printed out.
[0086]
By performing tone conversion that controls the amount of dot concentration based on the character / photo area signal, it is possible to form an image with emphasis on gradation in the photographic part, and image formation with emphasis on resolution in the character part. . As a result, even in a printer in which dots are not stable due to the characteristics of the printer, it is possible to perform processing that does not lower the resolution of the character portion while performing texture control.
[0087]
[Second Embodiment]
The second embodiment will be described in detail with reference to the drawings. Parts similar to those in the first embodiment described above in the basic apparatus configuration in the second embodiment are denoted by the same reference numerals, and description thereof is omitted.
[0088]
In the configuration of the first embodiment shown in FIG. 3, the selector 311 switches and outputs the signal of the adding means 310 and the signal of the average density calculating means 304 by a character / photo switching signal. As a result, image formation is performed with emphasis on resolution in the character portion, and image formation is performed with emphasis on gradation in the photo portion.
[0089]
On the other hand, the configuration of the second embodiment shown in FIG. 14 is a configuration in which a character / photo switching signal is input to the threshold value calculation unit 312 and the generation threshold value between the character part and the photo unit is changed in the threshold value calculation unit 312. It is a thing.
[0090]
Detailed processing of the threshold calculation means 312 is shown as a program in FIG.
[0091]
In the case of FIG. 12A shown in the first embodiment, constants A, B, C, and D are uniformly set.
A = T / LT1; (14)
B = T / LT2; (15)
C = T / LT3; (16)
D = T / LT4; (17)
(T: input signal, LT1, LT2, LT3, LT4: constant)
In this embodiment,
Character area A = T / LT1M; (18)
B = T / LT2M; (19)
C = T / LT3M; (20)
D = T / LT4M; (21)
Photo area A = T / LT1S; (22)
B = T / LT2S; (23)
C = T / LT3S; (24)
D = T / LT4S; (25)
(T: input signal, LT1M, LT2M, LT3M, LT4M, LT1S, LT2S, LT3S, LT4S: constant)
The A, B, C, and D signals are generated by switching by a character / photo switching signal.
[0092]
At this time, positive values are set for the constants LT1S, LT2S, LT3S, and LT4S, and negative values are set for the constants LT1M, LT2M, LT3M, and LT4M. Similar to the first embodiment, density density is controlled by positive and negative.
[0093]
Specific values set in the second embodiment are specifically shown in FIG. In the photo area, the constants LT1S, LT2S, LT3S, and LT4S are set to positive values, as described in the first embodiment, the calculation results A, B, C, D ( (22) to (25)) are set to positive values, thereby controlling the dot concentration amount and enabling output with an emphasis on gradation stability.
[0094]
Similarly, in the character area, the constants LT1M, LT2M, LT3M, and LT4M are set to negative values, as described in the first embodiment, the calculation results A, B, and C of the character area. , D (formula (18) to formula (21)) is set to a negative value, thereby controlling dot dispersion and enabling output with emphasis on resolution.
[0095]
In the present embodiment, the ratio between the gradation-oriented image formation in which dots are concentrated in the photographic area and the resolution-oriented image formation in which dots are dispersed in the character area (dot concentration / dispersion). It is characterized by being able to respond arbitrarily to various printer characteristics.
[0096]
After the processing described above is performed by the threshold value calculation unit 312, processing similar to that of the first embodiment is performed, and a binary signal is output from the gradation conversion processing unit 204 and printed out by the printer unit 105. It has become.
[0097]
In the first and second embodiments, binarization has been described, but the present invention is not limited to this. That is, the present invention can be applied to general multi-value conversion such as quaternarization, 8-level conversion, and 16-level conversion. Further, it is needless to say that the present invention is not limited to the average concentration storage method (MD method) as in the first and second embodiments, but can be applied to a general error diffusion method (ED method).
[0098]
Needless to say, this is applicable to color images.
[0099]
[Other Embodiments]
Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), or a device (for example, a copier, a facsimile device, etc.) including a single device. You may apply to.
[0100]
Another object of the present invention is to supply a storage medium storing software program codes for implementing the functions of the above-described embodiments 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 the.
[0101]
In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.
[0102]
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.
[0103]
Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) operating on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0104]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
[0105]
【The invention's effect】
By performing tone conversion that controls the amount of dot concentration based on the character / photo area signal, it is possible to form an image with emphasis on gradation in the photographic part, and image formation with emphasis on resolution in the character part. . As a result, even in a printer in which dots are not stable due to the characteristics of the printer, it is possible to perform processing that does not lower the resolution of the character portion while performing texture control.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to the present invention.
FIG. 2 is a block diagram illustrating an image processing unit.
FIG. 3 is a block diagram illustrating details of a gradation conversion processing unit 204 according to the first embodiment of the present invention.
FIG. 4 is a diagram illustrating the configuration of binarization means 301 in the first embodiment.
FIG. 5 is a diagram for explaining the configuration and processing of error correction means 302 in the first embodiment.
FIG. 6 is a diagram illustrating a configuration of binarization result delay means 303 in the first embodiment.
FIG. 7 is a diagram showing a data configuration used in the binarization result delay unit 303 in the first embodiment.
FIG. 8 is a diagram illustrating the configuration of average density calculation means 304 in the first embodiment.
FIG. 9 is a diagram showing a configuration of coefficients used in average density calculation means 304 in the first embodiment.
FIG. 10 is a diagram for explaining the configuration and processing of random number generation means 306 in the first embodiment.
FIG. 11 is a diagram for explaining processing of means hysteresis control amount calculation means 308 in the first embodiment.
FIG. 12 is a diagram for explaining processing of a threshold value calculation unit 309 in the first embodiment.
FIG. 13 is a diagram for explaining processing of adding means 310 in the first embodiment.
FIG. 14 is a block diagram showing details of an image processing unit 204 in the second embodiment.
FIG. 15 is a diagram for explaining processing of a threshold value calculation unit 312 in the second embodiment.
[Explanation of symbols]
101 lens
102 CCD sensor
103 Analog signal processor
104 Image processing unit
105 Printer
106 CPU
107 ROM
108 RAM
109 Image reader
110 CPU circuit section

Claims (8)

画素毎に濃淡情報をもつ多値データを入力する手段と、前記入力した多値データを階調変換する手段とを有する画像処理装置において、
前記多値データを階調変換して出力する際に発生する量子化誤差を算出する第1の算出手段と、
前記量子化誤差に基き注目画素近傍の量子化誤差を算出する第2の算出手段と、
前記注目画素近傍の量子化誤差値を注目画素に加算して誤差を補正する補正手段と、
記階調変換の結果を記憶する記憶手段と、
前記記憶手段に記憶された複数画素分の階調変換の結果の平均値に応じて、前記階調変換の閾値を生成する生成手段と、
文字領域と写真領域を示す信号に応じて、前記生成手段により生成される閾値を制御する制御手段とを有し、
前記制御手段は、文字領域に対してはドットを分散化させるべく前記閾値を制御し、写真領域に対してはドットを集中化させるべく前記閾値を制御し、
前記第1の算出手段は、前記多値データと前記記憶手段に記憶された複数画素分の階調変換の結果の平均値とを減算処理することにより、前記多値データを階調変換して出力する際に発生する量子化誤差を算出することを特徴とする画像処理装置。
In an image processing apparatus having means for inputting multi-value data having shading information for each pixel, and means for gradation-converting the inputted multi-value data,
First calculation means for calculating a quantization error that occurs when the multi-value data is gradation-converted and output;
Second calculating means for calculating a quantization error in the vicinity of the target pixel based on the quantization error;
Correction means for correcting an error by adding a quantization error value in the vicinity of the target pixel to the target pixel;
Storage means for storing the results of the previous Machinery scale conversion,
Generating means for generating a threshold value for gradation conversion according to an average value of gradation conversion results for a plurality of pixels stored in the storage means;
Control means for controlling a threshold value generated by the generating means in response to a signal indicating a character area and a photo area;
Wherein, for the character region controls the threshold in order to disperse the dots, for the photograph region controls the threshold in order to centralize the dots,
The first calculation means performs gradation conversion on the multi-value data by subtracting the multi-value data and an average value of the results of gradation conversion for a plurality of pixels stored in the storage means. An image processing apparatus that calculates a quantization error that occurs during output .
前記制御手段は、任意の濃度領域で前記閾値を制御する可能であることを特徴とする請求項1に記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the control unit is capable of controlling the threshold value in an arbitrary density region. 前記記憶手段は、ライン単位にデータを遅延させるためのラインバッファと、画素単位にデータを遅延させるための遅延回路とを備えることを特徴とする請求項1に記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the storage unit includes a line buffer for delaying data in units of lines and a delay circuit for delaying data in units of pixels. 前記ラインバッファ及び前記遅延回路の出力は、前記注目画素近傍の画素配置パターンに対応することを特徴とする請求項3に記載の画像処理装置。  The image processing apparatus according to claim 3, wherein outputs of the line buffer and the delay circuit correspond to a pixel arrangement pattern in the vicinity of the target pixel. 画素毎に濃淡情報をもつ多値データを入力する手段と、前記入力した多値データを階調変換する手段とを有する画像処理装置において実行する画像処理方法であって、
前記多値データを階調変換して出力する際に発生する量子化誤差を算出する第1の算出工程と、
前記量子化誤差に基き注目画素近傍の量子化誤差を算出する第2の算出工程と、
前記注目画素近傍の量子化誤差値を注目画素に加算して誤差を補正する補正工程と、
記階調変換の結果を記憶手段に記憶する記憶工程と、
前記記憶手段に記憶された複数画素分の階調変換の結果の平均値に応じて、前記階調変換の閾値を生成する生成工程と、
文字領域と写真領域を示す信号に応じて、前記生成工程により生成される閾値を制御する制御工程とを有し、
前記制御工程は、文字領域に対してはドットを分散化させるべく前記閾値を制御し、写真領域に対してはドットを集中化させるべく前記閾値を制御し、
前記第1の算出工程は、前記多値データと前記記憶手段に記憶された複数画素分の階調変換の結果の平均値とを減算処理することにより、前記多値データを階調変換して出力する際に発生する量子化誤差を算出することを特徴とする画像処理方法。
An image processing method executed in an image processing apparatus having means for inputting multi-value data having grayscale information for each pixel, and means for gradation-converting the input multi-value data,
A first calculation step of calculating a quantization error generated at the time of outputting the multi-value data by tone conversion,
A second calculation step of calculating a quantization error in the vicinity of the target pixel based on the quantization error;
A correction step of correcting an error by adding a quantization error value in the vicinity of the target pixel to the target pixel;
A storage step of storing the results of the previous Machinery scale conversion in the storage means,
A generation step of generating a threshold value of the gradation conversion according to an average value of gradation conversion results for a plurality of pixels stored in the storage unit;
A control step of controlling a threshold value generated by the generation step in response to a signal indicating a character region and a photo region;
The control step controls the threshold value to disperse dots for character areas, and controls the threshold value to concentrate dots for photo areas ,
The first calculation step performs gradation conversion on the multi-value data by subtracting the multi-value data and an average value of the results of gradation conversion for a plurality of pixels stored in the storage unit. An image processing method characterized by calculating a quantization error that occurs during output .
前記制御工程は、任意の濃度領域で前記閾値を制御する可能であることを特徴とする請求項5に記載の画像処理方法。  The image processing method according to claim 5, wherein the control step is capable of controlling the threshold value in an arbitrary density region. 前記記憶工程は、ライン単位にデータを遅延させるためのラインバッファと、画素単位にデータを遅延させるための遅延回路とを制御することを特徴とする請求項5に記載の画像処理方法。  6. The image processing method according to claim 5, wherein the storing step controls a line buffer for delaying data in line units and a delay circuit for delaying data in pixel units. 前記ラインバッファ及び前記遅延回路の出力は、前記注目画素近傍の画素配置パターンに対応することを特徴とする請求項7に記載の画像処理方法。  The image processing method according to claim 7, wherein outputs of the line buffer and the delay circuit correspond to a pixel arrangement pattern in the vicinity of the target pixel.
JP10573699A 1999-04-13 1999-04-13 Image processing apparatus and image processing method Expired - Fee Related JP3937645B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10573699A JP3937645B2 (en) 1999-04-13 1999-04-13 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10573699A JP3937645B2 (en) 1999-04-13 1999-04-13 Image processing apparatus and image processing method

Publications (3)

Publication Number Publication Date
JP2000299782A JP2000299782A (en) 2000-10-24
JP2000299782A5 JP2000299782A5 (en) 2004-11-11
JP3937645B2 true JP3937645B2 (en) 2007-06-27

Family

ID=14415574

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10573699A Expired - Fee Related JP3937645B2 (en) 1999-04-13 1999-04-13 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP3937645B2 (en)

Also Published As

Publication number Publication date
JP2000299782A (en) 2000-10-24

Similar Documents

Publication Publication Date Title
US6118547A (en) Image processing method and apparatus
JP2500837B2 (en) Pixel value quantization method
EP0781034B1 (en) Image processing apparatus and method
US5307426A (en) Image processing apparatus with improved dithering scheme
JPH05268462A (en) Picture processor
JPH10112801A (en) Input image processing method
EP0817466A2 (en) Edge enhanced error diffusion
JP3976863B2 (en) Image processing apparatus and method
EP0382581B1 (en) Image processing apparatus
JP2801195B2 (en) Image processing device
JP3937645B2 (en) Image processing apparatus and image processing method
JP2010278933A (en) Image processing device, image forming device, image processing method, program and recording medium
JP3809274B2 (en) Image processing apparatus and method
JPH0738767A (en) Image binarizing processor
JP3245600B2 (en) Image processing device
JPH11346311A (en) Gradation reproduction method
JP2946217B2 (en) Image processing device
JP3432064B2 (en) Image processing apparatus and method
JP3679522B2 (en) Image processing method and apparatus
KR100490244B1 (en) Error diffusion method using variable threshold value in image processing system
JP4152337B2 (en) Image processing device
JPH0691605B2 (en) Image processing device
JP3048170B2 (en) Color image processing equipment
JPH11339032A (en) Image processing method and device therefor
JPH11331590A (en) Image processor and its method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060405

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060417

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060616

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20061016

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061215

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070213

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070319

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120406

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140406

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees