JP3374551B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JP3374551B2
JP3374551B2 JP26528494A JP26528494A JP3374551B2 JP 3374551 B2 JP3374551 B2 JP 3374551B2 JP 26528494 A JP26528494 A JP 26528494A JP 26528494 A JP26528494 A JP 26528494A JP 3374551 B2 JP3374551 B2 JP 3374551B2
Authority
JP
Japan
Prior art keywords
error
value
image
data
error diffusion
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
JP26528494A
Other languages
Japanese (ja)
Other versions
JPH08130640A (en
Inventor
秀郎 熊城
Original Assignee
ミノルタ株式会社
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 ミノルタ株式会社 filed Critical ミノルタ株式会社
Priority to JP26528494A priority Critical patent/JP3374551B2/en
Priority to US08/545,412 priority patent/US5870503A/en
Publication of JPH08130640A publication Critical patent/JPH08130640A/en
Application granted granted Critical
Publication of JP3374551B2 publication Critical patent/JP3374551B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】この発明は画像処理装置に関し、
特に誤差拡散2値化方式を用いた画像処理装置に関す
る。 【0002】 【従来の技術】従来、画像処理装置の階調性と解像度を
両立させる2値化方式として誤差拡散方式がある。誤差
拡散方式においては、誤差補正された多値画像をしきい
値で2値化し、そのときに発生した2値化誤差を周辺へ
伝搬させることで面積階調保存を行なう。この方式はR.
Floyd らによって提案されたものである。 【0003】図6は従来の画像処理装置に採用された一
般的な誤差拡散法を実現する画像処理回路31の構成を
示すブロック図である。図6を参照して、従来の画像処
理回路は8ビットで表わされた画像データを入力して誤
差補正を行なう誤差補正部22と、誤差補正された入力
画像データを所定のしきい値Thで2値化する2値化部
23と、2値化出力データと誤差補正された入力画像デ
ータとの誤差を算出する2値化誤差算出部24と、2値
化誤差を拡散するための補正データを準備する2値化誤
差拡散部25とを含み、2値化誤差拡散部25で準備さ
れた補正データを用いて入力画像データに対して誤差補
正が行なわれる。 【0004】2値化誤差算出部24は2値化された出力
画像データと、低および高の2つの基準値を入力し、2
値出力画像データに基づいていずれかの基準値を出力す
るセレクタ241と、セレクタ241から出力されたデ
ータと誤差補正された入力画像データとから2値化誤差
を算出する2値化誤差算出器242とを含む。2値化誤
差拡散部25は、2値化誤差算出部24から出力された
データを2ライン分ストアするためのファーストインフ
ァーストアウト形式の誤差格納ラインメモリ251と、
誤差格納ラインメモリ251に接続され、注目画素に近
いほど大きな重み付けを行なう誤差重み付けフィルタ2
52とを含む。 【0005】次に動作について説明する。入力多値画像
の濃度をf(x,y)(0≦f(x,y)≦1)とし、
出力画像濃度をg(x,y)(=0or1)とすると、
2値化誤差Exyは次の式(1)で表わされる。 【0006】 Exy=f(x,y)−g(x,y)…(1) 誤差拡散法は、このExyを平均して小さくしようとす
るもので、入力多値画像に対して周辺画像の重み付け平
均値で補正を行なう。重み付け平均値をEavexyとす
れば、重み付け平均値Eavexyは以下の式(2)で表
わされる。 【0007】 【数1】 【0008】一般に重み付け係数mk,n は注目画素に近
いほど大きく、主走査方向のマトリックスサイズkは5
画素、副走査方向のサイズnは2〜3ラインとする場合
が多い。このような誤差重み付けフィルタ252の具体
的な例は図6に示すとおりである。 【0009】図6を参照して従来の画像処理装置は2値
化誤差を拡散するためにフィードバックループを構成す
る。フィードバックループを持つため、特に画像先端あ
るいは後端の条件(初期化や有効画像領域設定)に注意
が必要である。また、一連の処理をパイプライン化でき
ないため、基本的に高速化が困難な方式といえる。 【0010】ここで、たとえば手書きの鉛筆原稿のよう
に下地の白い低濃度細線では、2値化誤差の発生量は小
さくかつ線画の幅が狭いので、誤差の伝搬が間に合ず、
画像の途切れが生じ、同時にゴーストエラーが発生す
る。このゴーストエラーが蓄積され、線画領域を外れた
ところで2値化しきい値を超えてしまうと、線画の歪が
発生する。この低濃度細線の途切れと歪は、誤差拡散法
の原理に起因する最大の欠点である。濃度が低濃度から
高濃度(あるいはその逆)へ急激に変化する境界領域で
の方向性問題も同様の原因で発生する。下地がある程度
被っていると、これらの現象は発生しにくい。 【0011】またベタ領域では、不規則なテクスチャが
発生する(この誤差重み付けフィルタの形状と密接に関
連している)。特に低濃度部では、そのテクスチャが目
立ちやすく、見慣れていないと奇異に感じることもあ
る。さらに中間濃度部では高周波テクスチャ成分が印字
の際に潰れやすく、黒シミとなる場合がある。 【0012】図6に示した従来の画像処理回路で処理し
た画像の例を図7〜図9に示す。図7を参照して低濃度
細線では、途切れとガタツキが発生している(図7の矢
印部分、しきい値:128/255で2値化しているの
で、これを50程度まで下げれば若干の改善は可能であ
る)。図8を参照して、低濃度部に不規則なテクスチャ
が目立つ。また、黒シミも存在する。図9を参照して黒
色画像と白色画像の境界には黒かぶりや白ヌケのような
方向性も顕著にみられる。 【0013】なお、ここでテクスチャとは縞模様のこと
をいう。 【0014】 【関連の技術】図10は従来の一般的な誤差拡散法の問
題点を解消する2値化平均濃度誤差拡散法を実現する画
像処理回路の構成を示すブロック図である。図10を参
照して2値化濃度誤差拡散法を実現する画像処理回路3
2においては、図6に示した誤差を拡散させる第1のフ
ィードバックループに加えて出力2値画像の平均濃度と
原画像との誤差を拡散させる第2のループを持つことが
大きな特徴である。すなわち、図10を参照して、画像
処理回路32は、画像処理回路31に加えて、2値化誤
差算出部24からの出力データに対して出力2値画像の
平均濃度と原画像との誤差を拡散させる2値化平均誤差
拡散部26と、2値化平均誤差拡散部26からの2値化
平均誤差データを入力画像データから減算する減算部2
9とを含み、減算された画像データも考慮して誤差補正
部22で入力画像データの補正が行なわれる。2値化平
均誤差拡散部26は、2値化画像データを2ライン分格
納する出力2値画像格納ラインメモリ261と、出力2
値画像格納ラインメモリ261に接続され、出力2値画
像に対して所定の重み付けを行なう2値化平均濃度重み
付けフィルタ262とを含む。 【0015】2値化平均濃度誤差拡散法において2値平
均値をBavexyとすれば、次の式(3)で2値化平均
値Bavexyが表わされる。 【0016】 【数2】 【0017】この2値平均値Bavexyと原画像f
(x,y)の差をEBavexyとすれば、式(4)で2
値化平均誤差が表わされる。これを入力多値画像濃度f
(x,y)に対して補正する。 【0018】 EBavexy=f(x,y)−Bavex,y … (4) 第2のループに誤差が発生するのは、以下に示すように
原画像と2値出力平均濃度との差が生じた場合であるか
ら、第1のループで以下の現象が発生したときに、第2
のループはそれを補正する方向に働く。 【0019】(i) 低濃度細線などで2値出力に途切
れ/歪が生じた。 (ii) 方向性が発生した。 【0020】(iii) 極端に低周波のテクスチャが
発生した。 つまり、第1の誤差拡散ループにおいて、誤差拡散の原
理的不具合いが発生したとき、第2のループによってそ
の処理エラーが吸収/拡散され、高画質化が達成され
る。 【0021】この方式による処理サンプルを図11〜図
13に示す。図11を参照して低濃度細線では、前述の
第2ループの補正効果により途切れ/歪が大幅に改善さ
れている。図12を参照して黒シミに対しては改善効果
は少ない。図13を参照して方向性に関してはかなりの
改善効果がみられる。 【0022】したがって本方式は、ほとんどの画像属性
において、一般的な誤差拡散法よりも画質的に同等か優
れる。ただし、ハード的にはフィードバックループが増
えるため、動作速度が遅くなる。 【0023】次に従来の一般的な誤差拡散法を改良する
他の方法としてディザ誤差拡散法について説明する。図
14はディザ誤差拡散法を実現するための画像処理回路
の構成を示すブロック図である。図14を参照して、デ
ィザ誤差拡散法を実現する画像処理回路33は、従来の
画像処理回路31に対して8ビットの入力画像データに
対して4×4のディザマトリックスを用いて4ビットの
画像データが出力され、その出力画像データに対して誤
差補正が行なわれる。 【0024】図14を参照して多値ディザ部21は、8
ビットの入力画像データの上位4ビットと“1”を入力
し、その和を出力する加算器211と、ラスタスキャン
における水平/垂直同期信号を図示のないカウンタによ
りカウントし、図示のないデコーダにより4×4ディザ
マトリックスの4ビットのしきい値を出力するディザマ
トリックス212と、ディザマトリックス212から出
力される4ビットのしきい値Txyと8ビットの入力画
像データの下位4ビットとを比較して1ビットのデータ
を出力する比較器213と、8ビットの入力画像データ
の上位4ビットと、加算器211からの加算データを入
力し、比較器213からの信号に応じていずれかのデー
タを選択的に出力するセレクタ214とを含む。 【0025】ディザ誤差拡散法においては、誤差拡散法
をハード化することによって、動作速度の大幅な向上と
コストダウンが可能である。 【0026】ところで、8ビットの入力画像データに対
して従来の256階調を実現するためには、フィードバ
ック部の基本演算データ幅を8ビットにする必要があっ
た。8ビットだと、誤差重み付け演算時には、係数16
で最大12ビットの加算演算が必要になる。しかしなが
ら、この方式を用いれば、256階調を実現するために
基本演算データ幅は4ビットで十分であり、前述の最大
加算演算は8ビットですむ。これにより、動作速度の大
幅な向上が実現できる。また、誤差格納メモリも従来の
半分ですむ。さらに、画質的には、コンピュータグラフ
ィック画像等で不規則なテクスチャの発生がディザ成分
により抑えられる。 【0027】この場合の処理サンプルを図15〜図17
に示す。図11〜図13と比較して、不規則なテクスチ
ャの発生が抑えられている状態がわかる。 【0028】図18は図6に示した2値化平均濃度誤差
拡散法と図14に示したディザ誤差拡散法とを単純に組
合せた画像処理回路34の構成を示すブロック図であ
る。図18を参照して、2値化平均誤差拡散法とディザ
誤差拡散法とを組合せた画像処理回路34の構成はそれ
ぞれ先に述べた構成を組合せたものであるため、同一箇
所に同一符号を付してその説明は省略する。 【0029】 【発明が解決しようとする課題】図19〜図21は2値
化平均誤差拡散法とディザ誤差拡散法とを単純に組合せ
た画像処理回路34により得られたサンプル画像を示す
図である。図19を参照して、この構成に係る画像処理
回路34においては、画質的にはディザ誤差拡散法単体
の場合である図14の画像処理回路33よりも低濃度細
線の再現性が大幅に向上する。しかしながら、コンピュ
ータグラフィックス画像等の分散の小さな画像において
は、2値化平均誤差を補正した影響により、再び誤差拡
散特有の不規則な縞模様(テクスチャ)が発生してい
る。この影響により黒シミも再発生している。 【0030】ところで、2値化平均誤差拡散法とディザ
誤差拡散法とを組合せれば、高画質で高速な誤差拡散法
が構成できるはずである。しかしながら、単純な組合せ
では、両者の持つ画像的長所が互いのアルゴリズムによ
って打消される現象が発生する場合がある。 【0031】この発明は上記のような問題点を解消する
ためになされたもので、2値化平均誤差拡散法およびデ
ィザ誤差拡散法を組合せた場合でも、コンピュータグラ
フィックス等で縞模様が発生することがなく、かつ高速
の誤差拡散が可能な画像処理装置を提供することを目的
とする。 【0032】 【課題を解決するための手段】この発明に係る画像処理
装置は、N1値で表わされた入力画像データをN1値よ
りも小さいN2値の画像データに変換するN2値変換手
段と、N2値で表わされた画像データをN2値よりも小
さいN3値データに変換するN3値変換手段と、N3値
変換時の誤差を拡散するデータを準備する第1誤差誤差
拡散データ準備手段と、N3値変換時の出力画像の平均
濃度と前記N2値画像との誤差を注目画素の周囲におい
て拡散するデータを準備する第2誤差拡散データを準備
する第2誤差拡散データ準備手段と、N2値画像データ
をもとに入力画像データの局所領域の最大値と最小値と
の差、分散およびエッジ検出量のいずれか1つを判別す
る手段と、判別手段の判別結果に応じて局所領域の最大
値と最小値との差、分散またはエッジ検出量が大きいほ
ど、第2誤差拡散データを大きくフィードバックするよ
うに調整する手段と、第1誤差拡散データと調整された
第2誤差拡散データとを用いてN2値画像データを補正
する手段とを含む。 【0033】 【作用】入力されたN1値の画像データをN2値の画像
データに変換し、N2値の画像データに基づいてその画
像の局所領域の最大値と最小値との差、分散およびエッ
ジ検出量のいずれか1つが判別される。そしてその判別
結果に基づいて平均画像濃度と画像データの誤差を拡散
する第2誤差拡散手段の拡散量が制御される。画像の
所領域の最大値と最小値との差、分散およびエッジ検出
量のいずれか1つに応じてN3値化平均誤差の補正量が
制御されるため、画像の局所領域の最大値と最小値との
差、分散またはエッジ検出量に応じたN3値化処理が行
われる。 【0034】 【実施例】以下この発明の実施例を図面を参照して説明
する。図1はこの発明に係る画像処理装置の構成を示す
ブロック図である。図1を参照して、この発明に係る画
像処理装置は、8ビットの画像データを入力してそれを
4ビットのディザ画像データに変換する多値ディザ回路
11と、多値ディザ回路11から出力された4ビットの
ディザ画像データを後に説明する2値化に伴なう誤差デ
ータで誤差拡散するための誤差補正部12と、誤差補正
部12に接続され、所定のしきい値Thで誤差補正され
たディザ画像データを2値化する2値化部13と、2値
化部13に入力される誤差補正されたディザ画像データ
と2値化出力画像データとの差を算出する2値化誤差算
出部14と、算出された2値化誤差に対して誤差拡散す
るための2値化誤差拡散部15と、2値化された出力画
像データの2値化平均濃度と原画像データとの誤差を出
力するための2値化平均誤差拡散部16と、2値化平均
誤差拡散部16と、多値ディザ回路11から出力された
4ビット4×4ディザマトリックスの画像データをもと
にその画像の属性を判定する属性判定部17と、属性判
定部17からの判定結果に応じて2値化平均濃度誤差を
調整する調整部18とを含む。 【0035】次に動作について説明する。入力された画
像データf1は多値ディザ回路11でディザ画像データ
f2に変換され、誤差補正部12で誤差補正されて誤差
補正データf3となる。誤差補正データf3は2値化部
13で2値出力画像g1として出力される。2値出力画
像データg1はその値に応じたいずれかの基準値に2値
化誤差算出部141で変換され、変換された2値化誤差
データg2は2値化誤差拡散部15へ入力され、2値化
誤差拡散データh1として誤差補正部12へ出力され
る。変換された2値化誤差データg2は2値化平均誤差
拡散部16にも入力される。2値化平均誤差拡散部16
からの2値化平均誤差濃度データh2は後に説明する調
整部18で処理され、誤差補正データh4として誤差補
正部12へ送られる。 【0036】属性判別部17は、ディザマトリックス画
像データを5ライン分ファーストインファーストアウト
形式で記憶するディザ格納ラインメモリ171を含む。
このディザ格納ラインメモリ171で5×5の局所ウィ
ンドウが生成される。5×5局所ウィンドウ内の最大値
と最小値が最大/最小値検出フィルタ172によって検
出され、その差に応じて最大/最小値検出フィルタ17
2に接続された利得制御回路173によって画像の属性
が判定される。具体的には、最大値と最小値との差が小
さいと画像データは非分散属性であると判断され、大き
いと分散属性と判定される。 【0037】図2は利得制御回路173の具体的動作を
説明するための図である。図2を参照して、最大/最小
値検出フィルタ172で検出された最大値と最小値との
差に応じて利得が決定される。すなわち、利得制御回路
173は、最大値と最小値の差を3分割するための利得
変換しきい値Th1およびTh2とを含み、このしきい
値に応じて画像の属性に応じた利得が決定される。具体
的には、最大値と最小値との差がしきい値Th1よりも
小さいときは利得は0となり、その差がしきい値Th1
とTh2との間であるときは0.5とされ、その差しき
い値Th2よりも大きいときは1とされる。 【0038】次に再び図1を参照して、調整部18は多
値ディザ回路11から出力されるディザ画像データf2
と2値化平均誤差拡散部16から出力される出力2値画
像の平均濃度h2との誤差を算出する減算回路181と
減算の結果得られた誤差データh3に対して利得制御回
路173で得られた画像の属性に応じた利得を乗算する
ための乗算回路182とを含む。このようにして調整さ
れた誤差拡散データh4が誤差補正部12へ出力され、
ディザ画像データf2に対して誤差拡散が行なわれる。 【0039】図1に示したこの発明に係る画像処理回路
においては、画像の局所領域の最大値/最小値を検出
し、その値に応じて画像の属性を判別している。たとえ
ばコンピュータグラフィックス画像等では、濃度の分散
が極めて小さいため局所領域の最大値と最小値の差は極
めて小さくなる。この最大、最小値の差が小さいほど2
値化平均誤差のフィードバック量が小さくなるよう制御
される。すなわち、分散が極めて少ない場合には2値化
平均濃度誤差の補正をキャンセルすることにより、ディ
ザ誤差拡散のみを行なわせる。その結果、コンピュータ
グラフィックス等の分散が極めて小さな画像における独
特の縞模様の発生が防止できる。 【0040】図3〜図5はこの発明に係る画像処理回路
において画像処理をした場合の出力画像の例を示す図で
ある。図3〜図5を参照して画像の領域判別をおこなっ
ているため、コンピュータグラフィックス画像における
縞模様の発生が抑えられ、かつ低濃度細線の再現性がよ
く、さらに黒シミの発生も抑えられているのがわかる。 【0041】上記実施例においては、画像の属性を局所
領域の最大値と最小値を検出して行なったが、これに限
らず、画像のエッジや分散値を検出してもよい。画像の
エッジ検出時においては、その検出量が小さいときは調
整部18において誤差補正量を減少させてもよい。 【0042】また、画像の属性判別を分散値を用いて検
出したときは、分散値が小さいときは調整部において誤
差補正量を減少させてもよい。 【0043】また、上記実施例において最大/最小値検
出を行なった場合にその差が小さいときは調整部18に
おいて誤差補正量を減少させてもよい。 【0044】 【発明の効果】以上のようにこの発明によれば、入力さ
れたN1値の画像データをN2値のディザ画像データに
変換し、その画像の属性を判別してその判別結果に基づ
いて平均画像濃度とディザ画像データの誤差を拡散す
る。画像の属性に応じて誤差拡散が制御されるため、デ
ィザ誤差拡散と2値化平均濃度誤差拡散の両者の持つ画
像処理の長所が活かされた画像処理が行なわれる。この
結果、高速動作可能でかつローコストでありながら、従
来の誤差拡散法にあった低濃度細線の途切れ/型付の発
生が少なく、かつコンピュータグラフィックス画像のよ
うな分散の少ない画像データでの特有の縞模様の発生も
低く押えることができ、高画質化も併わせて可能にな
る。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus,
In particular, the present invention relates to an image processing apparatus using an error diffusion binarization method. 2. Description of the Related Art Conventionally, there is an error diffusion system as a binarization system for achieving both gradation and resolution of an image processing apparatus. In the error diffusion method, the multi-valued image subjected to the error correction is binarized by a threshold value, and the binarization error generated at that time is propagated to the periphery to preserve the area gradation. This method is R.
Proposed by Floyd et al. FIG. 6 is a block diagram showing a configuration of an image processing circuit 31 for realizing a general error diffusion method employed in a conventional image processing apparatus. Referring to FIG. 6, a conventional image processing circuit inputs an image data represented by 8 bits and performs an error correction, and an error correction unit 22 that inputs the error-corrected input image data to a predetermined threshold Th. , A binarization error calculator 24 that calculates an error between the binarization output data and the error-corrected input image data, and a correction for diffusing the binarization error. An error correction is performed on the input image data by using the correction data prepared by the binarization error diffusion unit 25. A binarization error calculator 24 receives the binarized output image data and two reference values, low and high, and
A selector 241 that outputs one of the reference values based on the value output image data, and a binarization error calculator 242 that calculates a binarization error from the data output from the selector 241 and the error-corrected input image data. And The binarization error diffusion unit 25 includes a first-in first-out error storage line memory 251 for storing two lines of data output from the binarization error calculation unit 24,
An error weighting filter 2 connected to the error storage line memory 251 and performing greater weighting closer to the pixel of interest
52. Next, the operation will be described. Let the density of the input multi-valued image be f (x, y) (0 ≦ f (x, y) ≦ 1)
If the output image density is g (x, y) (= 0 or 1),
The binarization error Exy is represented by the following equation (1). Exy = f (x, y) −g (x, y) (1) The error diffusion method is to average the Exy and reduce the Exy. Correction is performed using the weighted average value. If the weighted average value Eave xy, the weighted average value Eave xy is represented by the following formula (2). [0007] In general, the weighting coefficient mk, n becomes larger as it approaches the pixel of interest, and the matrix size k in the main scanning direction is 5
Pixels and the size n in the sub-scanning direction are often 2 to 3 lines. A specific example of such an error weighting filter 252 is as shown in FIG. Referring to FIG. 6, the conventional image processing apparatus forms a feedback loop to diffuse a binarization error. Because of the feedback loop, it is necessary to pay particular attention to the conditions at the leading or trailing edge of the image (initialization and effective image area setting). Further, since a series of processes cannot be pipelined, it can be said that it is basically difficult to increase the speed. Here, for example, in the case of a white low-density thin line such as a hand-drawn pencil manuscript, the amount of occurrence of the binarization error is small and the width of the line drawing is narrow, so that the error cannot be propagated in time.
The image is interrupted, and at the same time, a ghost error occurs. If the ghost error is accumulated and exceeds the binarization threshold value outside the line drawing area, line drawing distortion occurs. The discontinuity and distortion of the low-density thin line are the biggest defects caused by the principle of the error diffusion method. A directional problem in a boundary region where the density rapidly changes from a low density to a high density (or vice versa) also occurs for the same reason. If the underlayer is covered to some extent, these phenomena are unlikely to occur. In the solid area, an irregular texture is generated (which is closely related to the shape of the error weighting filter). In particular, in a low-concentration part, the texture is conspicuous, and if you are not familiar with it, you may feel strange. Further, in the intermediate density portion, the high frequency texture component is easily crushed at the time of printing, which may result in black spots. FIGS. 7 to 9 show examples of images processed by the conventional image processing circuit shown in FIG. Referring to FIG. 7, in the low-density thin line, breaks and rattling occur (arrows in FIG. 7, threshold value: 128/255, which is binarized. Improvements are possible). Referring to FIG. 8, irregular texture is conspicuous in the low density portion. There are also black spots. Referring to FIG. 9, the direction between the black image and the white image has remarkable directionality such as black cast or white drop. Here, the texture means a stripe pattern. FIG. 10 is a block diagram showing the configuration of an image processing circuit for realizing a binarized average density error diffusion method which solves the problems of the conventional general error diffusion method. Referring to FIG. 10, image processing circuit 3 for implementing the binarized density error diffusion method
6 is characterized in that it has a second loop for diffusing the error between the average density of the output binary image and the original image in addition to the first feedback loop for diffusing the error shown in FIG. That is, referring to FIG. 10, in addition to image processing circuit 31, image processing circuit 32 outputs an error between the average density of the output binary image and the original image with respect to the output data from binarization error calculating section 24. And a subtraction unit 2 for subtracting the binary averaged error data from the binary averaged error diffusion unit 26 from the input image data.
The error correction unit 22 corrects the input image data in consideration of the subtracted image data. The binarized average error diffusion unit 26 includes an output binary image storage line memory 261 for storing two lines of binary image data, and an output 2
And a binarized average density weighting filter 262 connected to the value image storage line memory 261 and performing predetermined weighting on the output binary image. If the binary average value is Bave xy in the binary average density error diffusion method, the binary average value Bave xy is expressed by the following equation (3). [Equation 2] The binary average Bave xy and the original image f
Assuming that the difference between (x, y) is EBave xy , 2
The quantified average error is represented. This is input multi-valued image density f
Correct (x, y). EBave xy = f (x, y) −Bave x, y (4) An error occurs in the second loop because the difference between the original image and the average binary output density is as shown below. When the following phenomenon occurs in the first loop, the second
Works in a direction to correct it. (I) The binary output is interrupted / distorted by a low-density thin line or the like. (Ii) Directivity has occurred. (Iii) An extremely low frequency texture is generated. In other words, when the principle of error diffusion occurs in the first error diffusion loop, the processing error is absorbed / diffused by the second loop, and high image quality is achieved. FIGS. 11 to 13 show processing samples according to this method. Referring to FIG. 11, in the low-density thin line, the interruption / distortion is largely improved by the correction effect of the second loop described above. Referring to FIG. 12, there is little improvement effect on black spots. Referring to FIG. 13, a considerable improvement effect can be seen in the directionality. Therefore, the present method has almost the same or better image quality than the general error diffusion method in most image attributes. However, since the number of feedback loops increases in terms of hardware, the operation speed is reduced. Next, a dither error diffusion method will be described as another method for improving the conventional general error diffusion method. FIG. 14 is a block diagram showing a configuration of an image processing circuit for realizing the dither error diffusion method. Referring to FIG. 14, an image processing circuit 33 that implements a dither error diffusion method uses a 4 × 4 dither matrix for 8-bit input image data with respect to a conventional image processing circuit 31 and uses a 4-bit dither matrix. Image data is output, and error correction is performed on the output image data. Referring to FIG. 14, multi-valued dither section 21
The adder 211 that inputs the upper 4 bits of the bit input image data and “1” and outputs the sum thereof, and counts the horizontal / vertical synchronization signals in the raster scan by a counter (not shown), and outputs 4 by a decoder (not shown). A dither matrix 212 that outputs a 4-bit threshold value of a × 4 dither matrix is compared with a 4-bit threshold value Txy output from the dither matrix 212 and lower 4 bits of 8-bit input image data, and 1 A comparator 213 that outputs bit data, upper 4 bits of 8-bit input image data, and addition data from the adder 211 are input, and any one of the data is selectively selected according to a signal from the comparator 213. And a selector 214 for outputting the result. In the dither error diffusion method, the operation speed can be greatly improved and the cost can be reduced by hardening the error diffusion method. By the way, in order to realize the conventional 256 gradations for 8-bit input image data, it is necessary to set the basic operation data width of the feedback section to 8 bits. If it is 8 bits, the coefficient 16
Requires an addition operation of up to 12 bits. However, if this method is used, the basic operation data width of 4 bits is enough to realize 256 gradations, and the maximum addition operation described above requires only 8 bits. As a result, a significant improvement in operation speed can be realized. Also, the error storage memory is half that of the conventional one. Further, in terms of image quality, generation of irregular textures in computer graphic images and the like is suppressed by dither components. The processing samples in this case are shown in FIGS.
Shown in It can be seen that the occurrence of irregular texture is suppressed as compared with FIGS. FIG. 18 is a block diagram showing the structure of an image processing circuit 34 in which the binarized average density error diffusion method shown in FIG. 6 and the dither error diffusion method shown in FIG. 14 are simply combined. Referring to FIG. 18, since the configuration of image processing circuit 34 in which the binarized average error diffusion method and the dither error diffusion method are combined is a combination of the configurations described above, the same reference numerals are assigned to the same portions. The description is omitted here. FIGS. 19 to 21 show sample images obtained by an image processing circuit 34 in which the binarized average error diffusion method and the dither error diffusion method are simply combined. is there. Referring to FIG. 19, in the image processing circuit 34 according to this configuration, the reproducibility of a low-density thin line is significantly improved compared to the image processing circuit 33 of FIG. 14 in which the image processing is performed by the dither error diffusion method alone. I do. However, in an image with a small variance such as a computer graphics image, an irregular stripe pattern (texture) peculiar to error diffusion occurs again due to the effect of correcting the binarized average error. Due to this effect, black spots have recurred. By combining the binarized average error diffusion method and the dither error diffusion method, a high-quality and high-speed error diffusion method can be constructed. However, in a simple combination, a phenomenon may occur in which the image advantages of the two are canceled by each other's algorithm. The present invention has been made in order to solve the above-mentioned problems. Even when the binarized average error diffusion method and the dither error diffusion method are combined, a stripe pattern is generated in computer graphics or the like. It is an object of the present invention to provide an image processing apparatus which does not have any problem and can perform high-speed error diffusion. An image processing apparatus according to the present invention comprises an N2 value conversion means for converting input image data represented by an N1 value into image data having an N2 value smaller than the N1 value. , N3 value converting means for converting image data represented by the N2 value into N3 value data smaller than the N2 value, and first error error diffusion data preparing means for preparing data for diffusing an error in the N3 value conversion. A second error diffusion data preparing unit for preparing second error diffusion data for preparing data for diffusing an error between the average density of the output image at the time of the N3 value conversion and the N2 value image around the pixel of interest; Based on the image data, the maximum and minimum values of the local area of the input image data
Greatest local region according to the difference, and means for determining one of dispersion and edge detection amount, the determination result of the determine by means
Means for adjusting so that the larger the difference between the value and the minimum value, the variance or the detected edge amount is, the larger the feedback of the second error diffusion data is, and the first error diffusion data and the adjusted second error diffusion data are used. Means for correcting the N2 value image data by using The input N1 value image data is converted into N2 value image data, and the difference, variance, and edge difference between the maximum value and the minimum value of the local area of the image are converted based on the N2 value image data.
Any one of the detected amounts is determined. Then, the diffusion amount of the second error diffusion means for diffusing the error between the average image density and the image data is controlled based on the determination result. Station of images
Difference, variance and edge detection between the maximum and minimum values of the area
Since the correction amount of the N3- valued average error is controlled according to any one of the amounts, the maximum value and the minimum value of the local region of the image are
N3 binarization processing according to the difference, variance, or edge detection amount is performed. Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to the present invention. Referring to FIG. 1, an image processing apparatus according to the present invention has a multi-valued dither circuit 11 for inputting 8-bit image data and converting it to 4-bit dither image data, and an output from multi-valued dither circuit 11. An error correction unit 12 for error-diffusion of the obtained 4-bit dither image data with error data accompanying binarization, which will be described later, and an error correction unit 12 for error correction with a predetermined threshold value Th A binarizing unit 13 for binarizing the obtained dither image data, and a binarizing error for calculating a difference between the error-corrected dither image data input to the binarizing unit 13 and the binarized output image data A calculation unit 14, a binarization error diffusion unit 15 for performing error diffusion on the calculated binarization error, and an error between the binarized average density of the binarized output image data and the original image data Binarized average error diffusion section 1 for outputting A binarized average error diffusion unit 16, an attribute determination unit 17 that determines the attribute of the image based on the 4-bit 4 × 4 dither matrix image data output from the multi-valued dither circuit 11, And an adjusting unit 18 for adjusting the binarized average density error according to the determination result from the unit 17. Next, the operation will be described. The input image data f1 is converted into dither image data f2 by the multi-value dither circuit 11, and error-corrected by the error correction unit 12 to become error correction data f3. The error correction data f3 is output by the binarizing unit 13 as a binary output image g1. The binary output image data g1 is converted into one of the reference values according to the value by the binarization error calculation unit 141, and the converted binarization error data g2 is input to the binarization error diffusion unit 15, It is output to the error correction unit 12 as binary error diffusion data h1. The converted binarized error data g2 is also input to the binarized average error diffusion unit 16. Binary average error diffusion unit 16
The binarized average error density data h2 is processed by the adjustment unit 18 described later, and sent to the error correction unit 12 as error correction data h4. The attribute determining section 17 includes a dither storage line memory 171 for storing dither matrix image data for five lines in a first-in first-out format.
The dither storage line memory 171 generates a 5 × 5 local window. The maximum and minimum values in the 5 × 5 local window are detected by the maximum / minimum value detection filter 172, and the maximum / minimum value detection filter 17
The attribute of the image is determined by the gain control circuit 173 connected to the second. Specifically, when the difference between the maximum value and the minimum value is small, the image data is determined to have the non-dispersion attribute, and when the difference is large, it is determined to be the distribution attribute. FIG. 2 is a diagram for explaining a specific operation of the gain control circuit 173. Referring to FIG. 2, the gain is determined according to the difference between the maximum value and the minimum value detected by maximum / minimum value detection filter 172. That is, the gain control circuit 173 includes gain conversion threshold values Th1 and Th2 for dividing the difference between the maximum value and the minimum value into three, and the gain according to the attribute of the image is determined according to the threshold values. You. Specifically, when the difference between the maximum value and the minimum value is smaller than the threshold value Th1, the gain is 0, and the difference is equal to the threshold value Th1.
Is set to 0.5 when the difference is between Th2 and Th2, and set to 1 when the difference is greater than the difference threshold value Th2. Next, referring again to FIG. 1, the adjusting unit 18 outputs the dither image data f2 output from the multi-valued dither circuit 11.
And a subtraction circuit 181 for calculating an error between the average density h2 of the output binary image output from the binarized average error diffusion unit 16 and an error data h3 obtained as a result of the subtraction by the gain control circuit 173. And a multiplication circuit 182 for multiplying the gain according to the attribute of the image. The error diffusion data h4 adjusted in this way is output to the error correction unit 12, and
Error diffusion is performed on the dither image data f2. In the image processing circuit according to the present invention shown in FIG. 1, the maximum value / minimum value of a local region of an image is detected, and the attribute of the image is determined according to the detected value. For example, in a computer graphics image or the like, the difference between the maximum value and the minimum value of the local region is extremely small because the variance of the density is extremely small. The smaller the difference between the maximum and minimum values is, the more 2
Control is performed so that the feedback amount of the quantified average error becomes small. That is, when the variance is extremely small, only the dither error diffusion is performed by canceling the correction of the binarized average density error. As a result, it is possible to prevent the occurrence of a unique stripe pattern in an image with extremely small dispersion of computer graphics or the like. FIGS. 3 to 5 are views showing examples of output images when image processing is performed in the image processing circuit according to the present invention. Since the image area determination is performed with reference to FIGS. 3 to 5, the occurrence of a stripe pattern in a computer graphics image is suppressed, the reproducibility of low-density thin lines is good, and the occurrence of black spots is also suppressed. You can see that In the above embodiment, the attribute of the image is detected by detecting the maximum value and the minimum value of the local area. However, the present invention is not limited to this, and the edge or variance of the image may be detected. At the time of edge detection of an image, when the detection amount is small, the adjustment unit 18 may reduce the error correction amount. When the attribute determination of the image is detected by using the variance, if the variance is small, the adjustment unit may reduce the error correction amount. If the difference is small when the maximum / minimum value is detected in the above embodiment, the adjustment unit 18 may reduce the error correction amount. As described above, according to the present invention, the input N1 value image data is converted into N2 value dither image data, the attribute of the image is determined, and the attribute of the image is determined based on the determination result. Error between the average image density and the dither image data. Since the error diffusion is controlled according to the attributes of the image, image processing is performed which takes advantage of the image processing possessed by both dither error diffusion and binarized average density error diffusion. As a result, while being able to operate at high speed and at low cost, there is little occurrence of discontinuity / typing of low-density thin lines in the conventional error diffusion method, and it is peculiar to image data with little dispersion such as computer graphics images. The generation of the stripe pattern can be suppressed low, and high image quality can be achieved.

【図面の簡単な説明】 【図1】この発明に係る画像処理回路の構成を示すブロ
ック図である。 【図2】利得制御回路内で行なわれる内容を説明するた
めの図である。 【図3】この発明に係る画像処理回路で画像を処理した
場合の出力例を示す図である。 【図4】この発明に係る画像処理回路で画像を処理した
場合の出力例を示す図である。 【図5】この発明に係る画像処理回路で画像を処理した
場合の出力例を示す図である。 【図6】従来の一般的な誤差拡散法を実現する画像処理
回路の構成を示すブロック図である。 【図7】従来の一般的な誤差拡散法によって得られる出
力画像の例を示す図である。 【図8】従来の一般的な誤差拡散法によって得られる出
力画像の例を示す図である。 【図9】従来の一般的な誤差拡散法によって得られる出
力画像の例を示す図である。 【図10】2値化平均濃度誤差拡散法を実現する画像処
理回路の構成を示すブロック図である。 【図11】2値化平均濃度誤差拡散法による出力画像の
例を示す図である。 【図12】2値化平均濃度誤差拡散法による出力画像の
例を示す図である。 【図13】2値化平均濃度誤差拡散法による出力画像の
例を示す図である。 【図14】ディザ誤差拡散法を実現する画像処理回路の
構成を示すブロック図である。 【図15】ディザ誤差拡散法で出力した場合の出力例を
示す図である。 【図16】ディザ誤差拡散法で出力した場合の出力例を
示す図である。 【図17】ディザ誤差拡散法で出力した場合の出力例を
示す図である。 【図18】2値化平均誤差拡散法とディザ誤差拡散法を
単純に組合せた場合の画像処理回路を示すブロック図で
ある。 【図19】2値化平均誤差拡散法とディザ誤差拡散法を
単純に組合せた場合の出力画像の例を示す図である。 【図20】2値化平均誤差拡散法とディザ誤差拡散法を
単純に組合せた場合の出力画像の例を示す図である。 【図21】2値化平均誤差拡散法とディザ誤差拡散法を
単純に組合せた場合の出力画像の例を示す図である。 【符号の説明】 10 画像処理回路 11 多値ディザ回路 12 誤差補正部 13 2値化部 14 2値化誤差算出部 15 2値化誤差拡散部 16 2値化平均誤差拡散部 17 属性判別部 18 調整部
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a configuration of an image processing circuit according to the present invention. FIG. 2 is a diagram for explaining contents performed in a gain control circuit. FIG. 3 is a diagram showing an output example when an image is processed by the image processing circuit according to the present invention; FIG. 4 is a diagram showing an output example when an image is processed by the image processing circuit according to the present invention; FIG. 5 is a diagram showing an output example when an image is processed by the image processing circuit according to the present invention. FIG. 6 is a block diagram showing a configuration of an image processing circuit for realizing a conventional general error diffusion method. FIG. 7 is a diagram illustrating an example of an output image obtained by a conventional general error diffusion method. FIG. 8 is a diagram showing an example of an output image obtained by a conventional general error diffusion method. FIG. 9 is a diagram showing an example of an output image obtained by a conventional general error diffusion method. FIG. 10 is a block diagram illustrating a configuration of an image processing circuit that implements a binarized average density error diffusion method. FIG. 11 is a diagram illustrating an example of an output image obtained by a binarized average density error diffusion method. FIG. 12 is a diagram illustrating an example of an output image obtained by a binarized average density error diffusion method. FIG. 13 is a diagram illustrating an example of an output image obtained by a binarized average density error diffusion method. FIG. 14 is a block diagram illustrating a configuration of an image processing circuit that implements a dither error diffusion method. FIG. 15 is a diagram showing an output example when output is performed by the dither error diffusion method. FIG. 16 is a diagram illustrating an example of output when output is performed by a dither error diffusion method. FIG. 17 is a diagram illustrating an output example when output is performed by a dither error diffusion method. FIG. 18 is a block diagram showing an image processing circuit when the binarized average error diffusion method and the dither error diffusion method are simply combined. FIG. 19 is a diagram showing an example of an output image when the binarized average error diffusion method and the dither error diffusion method are simply combined. FIG. 20 is a diagram illustrating an example of an output image when the binarized average error diffusion method and the dither error diffusion method are simply combined. FIG. 21 is a diagram illustrating an example of an output image when the binarized average error diffusion method and the dither error diffusion method are simply combined. [Description of Signs] 10 Image processing circuit 11 Multi-valued dither circuit 12 Error correction unit 13 Binarization unit 14 Binarization error calculation unit 15 Binary error diffusion unit 16 Binary average error diffusion unit 17 Attribute discrimination unit 18 Adjustment unit

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/40 - 1/409 H04N 1/46 H04N 1/60 Continuation of the front page (58) Field surveyed (Int. Cl. 7 , DB name) H04N 1/40-1/409 H04N 1/46 H04N 1/60

Claims (1)

(57)【特許請求の範囲】 【請求項1】 N1値で表わされた入力画像データを前
記N1値より小さいN2値の画像データに変換するN2
値変換手段と、 前記N2値で表わされた画像データを前記N2値より小
さいN3値データに変換するN3値変換手段と、 前記N3値変換時の誤差を拡散するデータを準備する第
1誤差拡散データ準備手段と、 前記N3値変換時の出力画像の平均濃度と前記N2値画
像との誤差を注目画素の周囲において拡散するデータを
準備する第2誤差拡散データを準備する第2誤差拡散デ
ータ準備手段と、 前記N2値画像データをもとに前記入力画像データの
所領域の最大値と最小値との差、分散およびエッジ検出
量のいずれか1つを判別する手段と、 前記判別手段の判別結果に応じて前記局所領域の最大値
と最小値との差、分散またはエッジ検出量が大きいほ
ど、前記第2誤差拡散データを大きくフィードバックす
るように調整する手段と、 前記第1誤差拡散データと前記調整された第2誤差拡散
データとを用いて前記N2値画像データを補正する手段
とを含む、画像処理装置。
(57) [Claim 1] N2 for converting input image data represented by an N1 value into image data having an N2 value smaller than the N1 value.
Value conversion means, N3 value conversion means for converting the image data represented by the N2 value into N3 value data smaller than the N2 value, and a first error for preparing data for diffusing an error in the N3 value conversion Diffusion data preparation means; and second error diffusion data for preparing data for diffusing an error between the average density of the output image at the time of the N3 value conversion and the N2 value image around the pixel of interest. Preparation means; and a station for the input image data based on the N2 value image data.
Difference, variance and edge detection between the maximum and minimum values of the area
And means for determining one of the amount, the maximum value of the local region according to the determination result of the previous SL Determination means
Means for adjusting the difference, the variance or the edge detection amount between the first error diffusion data and the minimum error value to be larger, so that the second error diffusion data is fed back larger; and the first error diffusion data and the adjusted second error diffusion data Means for correcting the N2 value image data by using the image processing apparatus.
JP26528494A 1994-10-20 1994-10-28 Image processing device Expired - Fee Related JP3374551B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP26528494A JP3374551B2 (en) 1994-10-28 1994-10-28 Image processing device
US08/545,412 US5870503A (en) 1994-10-20 1995-10-19 Image processing apparatus using error diffusion technique

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26528494A JP3374551B2 (en) 1994-10-28 1994-10-28 Image processing device

Publications (2)

Publication Number Publication Date
JPH08130640A JPH08130640A (en) 1996-05-21
JP3374551B2 true JP3374551B2 (en) 2003-02-04

Family

ID=17415082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26528494A Expired - Fee Related JP3374551B2 (en) 1994-10-20 1994-10-28 Image processing device

Country Status (1)

Country Link
JP (1) JP3374551B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7929183B2 (en) 2003-03-27 2011-04-19 Seiko Epson Corporation Image output control system, image processing device, and image processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7929183B2 (en) 2003-03-27 2011-04-19 Seiko Epson Corporation Image output control system, image processing device, and image processing method

Also Published As

Publication number Publication date
JPH08130640A (en) 1996-05-21

Similar Documents

Publication Publication Date Title
US5870503A (en) Image processing apparatus using error diffusion technique
US5488673A (en) Image processing with fixed or variable threshold
US5157741A (en) Image processing method and apparatus for out-putting dot-processed data with suppression of false contours and other noise
JP2650759B2 (en) Image processing device
US6332045B1 (en) Image processing device
JP3489806B2 (en) Image processing apparatus and method
JP3374551B2 (en) Image processing device
JPH08298598A (en) Image processor and image processing method
US7292373B2 (en) Method and apparatus for image processing capable of high speed processing
JP3209763B2 (en) Image signal processing method
JP3165225B2 (en) Image processing apparatus and image processing method
JP3207888B2 (en) Image processing device
JPH0662230A (en) Image forming device
JP3260815B2 (en) Image processing device
JP3346111B2 (en) Image processing device
JP2717020B2 (en) Image processing device
JP2779259B2 (en) Binarization device
JP3157870B2 (en) Image processing method
JP2860039B2 (en) Pseudo halftone image reduction device
JP3379300B2 (en) Image processing device
JP2857906B2 (en) Halftone binarization processor
JP3011464B2 (en) Image processing method
JP4460079B2 (en) Image processing device
JPH0822017B2 (en) Image signal processor
JP3288748B2 (en) Image processing method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20021029

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

Free format text: PAYMENT UNTIL: 20071129

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20081129

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20081129

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091129

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101129

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20101129

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111129

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20111129

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121129

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20121129

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20131129

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees