JP4108517B2 - Halftoning processing method and halftoning processing system - Google Patents

Halftoning processing method and halftoning processing system Download PDF

Info

Publication number
JP4108517B2
JP4108517B2 JP2003095531A JP2003095531A JP4108517B2 JP 4108517 B2 JP4108517 B2 JP 4108517B2 JP 2003095531 A JP2003095531 A JP 2003095531A JP 2003095531 A JP2003095531 A JP 2003095531A JP 4108517 B2 JP4108517 B2 JP 4108517B2
Authority
JP
Japan
Prior art keywords
luminance value
pixel
image
binary image
error
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
JP2003095531A
Other languages
Japanese (ja)
Other versions
JP2004304543A (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 JP2003095531A priority Critical patent/JP4108517B2/en
Publication of JP2004304543A publication Critical patent/JP2004304543A/en
Application granted granted Critical
Publication of JP4108517B2 publication Critical patent/JP4108517B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、各画素の輝度が多値で表される原多値画像を各画素の輝度が二値で表される二値画像に変換するハーフトーン化処理方法及びハーフトーン化処理システムに関する。
【0002】
【従来の技術】
画像を出力する出力装置には、各画素の輝度が多値で表される多値画像(すなわち、各画素が0以上1以下の実数の輝度値をとる多値画像、連続階調画像とも呼ばれる)を出力可能なものもあるが、例えばドットの有無によって画像を出力するプリンタなどのように、各画素の輝度が二値で表される二値画像(すなわち、各画素が0または1の輝度値をとる画像)しか出力できない出力装置も多い。このように二値画像しか出力できない出力装置を使用して多値画像を出力するときは、出力対象である原多値画像を二値画像に変換し、原多値画像を擬似的に表現する二値画像を出力する。この変換処理はハーフトーン化処理(或いは綱点処理)と呼ばれている。
【0003】
たとえば、モノクロプリンタでは、原多値画像にハーフトーン化処理を施して二値画像を生成し、この二値画像の各画素に対して輝度値が0の場合は黒いドットを白い紙に印刷する。また、カラープリンタにおいても、カラー多値画像をCMYK(シアン、マゼンダ、イエロー、ブラック)の色成分に分解し、各色成分ごとにモノクロ多値画像とみなし、このモノクロ多値画像にハーフトーン化処理を行って二値画像を生成し、各色のドットを紙に印刷する。
【0004】
かかるハーフトーン化処理においては、原多値画像により近似した二値画像を生成することにより、二値画像によって原多値画像を可能な限り再現することが要求されており、特に原多値画像にはない目障りな模様やモアレがなく、輪郭が鮮明であり、且つ、再現する階調にムラやざらつきのないことが要求される。
【0005】
ハーフトーン化処理の方法としては、ディザ法や誤差拡散法が広く使用されている。ディザ法は、原多値画像を同じ大きさのブロックに分割し、各ブロック毎にディザ行列を用いて、対応する二値画像の輝度値を定める方法である。誤差拡散法は、入力多値画像の画素をラスタスキャン順に走査しながら、対応する二値画像の画素の輝度値を決定し、決定する際に生じる入力多値画像の輝度値と二値画像の輝度値の誤差を、周囲の輝度値未決定画素に拡散させる方法である。
【0006】
しかし、ディザ法ではブロック毎に処理を行うので、原多値画像で同じ輝度値をとる画素が連続した広い領域にある場合、各ブロックが同じパターンの二値画像を出力するので、ブロックの大きさの周期をもつ目障りな模様が発生しやすい。また、ブロックを大きくすれば、原多値画像の階調を高い精度で再現できるようになるが、輪郭がぼやけて鮮明な画像が得られない。また、誤差拡散法では、ディザ法にくらべて目障りな模様やモアレが比較的発生しにくいが、誤差を周囲に拡散させるため輪郭がぼやけるという問題が生じる。
【0007】
これらの問題が発生しにくいハーフトーン化処理方法として、ダイレクト・バイナリー・サーチ(DBS)法がある。ダイレクト・バイナリー・サーチ(DBS)法は、例えば下記の非特許文献1に開示されている。
【0008】
【非特許文献1】
DBSが最初に発表された論文は、タイトル「Model based halftoning using direct binary search」、著者「M.Analoui, J.P. Allebach」、発表誌「Proceedings SPIE Human Vision, Visual Proceedings, and Digital Display III」(Volume 1666, pages 96−108, August 1992)である。
【0009】
以下に、DBS法について説明する。まず、各画素ごとに任意の輝度値を有する二値画像を一画素単位で走査しながら一の画素を特定する。その特定された一の画素(以下、注目画素という)について、注目画素の輝度値を0から1または1から0に反転したり、隣接する画素の輝度値と交換することにより、注目画素の輝度値を置換した場合に得られる二値画像に二次元フィルタ処理を行って復元多値画像を生成し、復元多値画像と原多値画像との誤差(以下、置換後誤差という)を計算する。また、注目画素の置換前の二値画像に二次元フィルタ処理を行って得られる復元多値画像についても、原多値画像との誤差(以下、置換前誤差という)を計算する。置換前誤差よりも置換後誤差が小さい場合は、二値画像の注目画素の輝度値を置換後の輝度値で更新する。置換前誤差よりも置換後誤差が大きい場合は、輝度値の更新を行うことなく次の注目画素について同一の処理を行う。以下、走査の過程において順次特定される注目画素について同様の処理を繰り返して行う。
【0010】
かかるDBS法では、ハーフトーン化処理の最初に使用される初期二値画像をランダムなノイズ画像とすることにより、ディザ法や誤差拡散法で問題となっていた周期的で目障りな模様やモアレの発生を避けることができる。また、誤差拡散法のように輝度値を近傍に拡散させる作業を行わないので、輪郭の鮮明な二値画像が得られるという利点を有する。
【0011】
【発明が解決しようとする課題】
しかしながら、DBS法では、一画素単位で走査が行われ、輝度値の反転や輝度値の交換による輝度値の置換が一画素単位で行われるので、最終的に得られる二値画像に二次元フィルタ処理を施して得られる復元多値画像は、原多値画像と比較して誤差が大きくなり、この二値画像を出力装置に出力すると、出力画像に階調のムラやざらつきが現れるという問題が生じていた。
【0012】
また、とくに出力装置としてプリンタ等を使用する場合は、ドットが形成される画素が一定数以上隣接した状態で集中していないとドット抜けや画像のボケが生じる場合があるため、ハーフトーン化処理においてはドットが集中して形成される二値画像が求められている。たとえば、輝度値0の画素にドットを印刷して画像を形成するプリンタを例に説明すると、輝度値が0である画素に対して上下左右に隣接する画素の輝度値が1である場合は、輝度値1の画素に上下左右が囲まれた輝度値0の画素に孤立したドットを一つ印刷することとなる。このように孤立したドットを印刷する場合は、一画素という小さな面積にインクやトナーなどの印刷塗料を付着させる必要があるため、印刷塗料が付着しにくく、ドット抜けが生じる場合があるという問題が生じていた。とくに、レーザプリンタにおいては、感光体ドラムにトナーを付着させる工程においてドット抜けが生じやすく、大きな問題となっていた。一方、輝度値0の画素が複数隣接した状態で集中していれば、複数画素が連結した広い面積に印刷塗料を付着させることとなり、ドット抜けが生じにくくなる。また、プリンタの性能や印刷用紙の素材や印刷塗料の素材によっては、各画素のドットが滲むなどしてドットの輪郭がボケた状態となる場合があり、孤立したドットについては狭い面積のドットに生じた輪郭のボケがそのまま視認され、画像がボケるという問題が生じていた。一方で、輝度値0の画素が複数隣接するように集中していれば、ドットが連続して形成されるために、各画素に形成されたドットは互いに一部重なり合い、各画素の輪郭のボケが目立たなくなる。このため、ハーフトーン化処理においては、ドットが形成される輝度値0の画素が複数集中して配列している二値画像を得ることが求められている。
【0013】
また、プリンタ等の出力装置によっては、例えば輝度値が1である画素に対して上下左右に隣接する画素の輝度値が0の場合、輝度値0に対応して印刷等によって形成されたドットがにじみ、輝度値1の画素に対応する白抜き部分が欠落することがある。よって、輝度値1の画素についても、互いに隣接した状態で集中して配列している二値画像を得ることが求められている。
【0014】
なお、上記は輝度値0の画素にドットが形成される場合について説明したが、輝度値1の画素にドットが形成される場合もあり、どちらの画素にドットが形成されるかは、プログラムの設定などに依存する。複数のドットが集中して配列する傾向にある二値画像はドット集中型二値画像と呼ばれ、一方、孤立したドットが拡散するように配列する傾向にある二値画像はドット拡散型二値画像と呼ばれている。
【0015】
本発明は上記のような課題に鑑みなされたもので、第1の目的は、階調にムラやざらつきのない二値画像を得ることができるハーフトーン化処理方法及びハーフトーン化処理システムを提供することにある。また、第2の目的は、ドット抜けや画像ボケや白抜き部分の欠落が生じにくい二値画像を得ることができるハーフトーン化処理方法及びハーフトーン化処理システムを提供することにある。
【0016】
【課題を解決するための手段】
本発明のハーフトーン化処理方法は、各画素の輝度が多値で表される原多値画像を各画素の輝度が二値で表される二値画像に変換するハーフトーン化処理方法であり、
各画素ごとに任意の輝度値を有する二値画像を走査して二以上の画素から成る画素ブロックを特定する特定ステップと、
二値により表される輝度の組み合わせから成る複数の組み合わせパターンを輝度値パターンとすると、各輝度値パターンごとに、前記特定ステップにおいて特定された画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像に対し二次元フィルタ処理を行うことで得られる復元多値画像について、原多値画像との誤差を計算する誤差計算ステップと、
前記誤差計算ステップにおいて計算された誤差が所定条件を満たす輝度値パターンで、当該画素ブロックの輝度値を更新する更新ステップとを備え、
所定の条件を満たすまで、前回の更新ステップにより輝度値が更新された二値画像を走査して次の画素ブロックを特定し、当該画素ブロックが特定された二値画像を用いて前記誤差計算ステップと更新ステップを行い、
前記誤差計算ステップでは、前記画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像において、画素の輝度値の配列が所定の配列条件に適合しない場合は、前記誤差に所定値を加算することを特徴とする
【0017】
本発明のハーフトーン化処理システムは、各画素の輝度が多値で表される原多値画像を各画素の輝度が二値で表される二値画像に変換するハーフトーン化処理システムであり、
各画素ごとに任意の輝度値を有する二値画像を走査して二以上の画素から成る画素ブロックを特定する特定手段と、
二値により表される輝度の組み合わせから成る複数の組み合わせパターンを輝度値パターンとすると、各輝度値パターンごとに、前記特定手段によって特定された画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像に対し二次元フィルタ処理を行うことで得られる復元多値画像について、原多値画像との誤差を計算する誤差計算手段と、
前記誤差計算手段によって計算された誤差が所定条件を満たす輝度値パターンで、当該画素ブロックの輝度値を更新する更新手段とを備え、
所定の条件を満たすまで、前回の更新手段による処理によって画素ブロックの輝度値が更新された二値画像を走査して次の画素ブロックを特定し、当該画素ブロックが特定された二値画像を用いて前記誤差計算手段及び更新手段による処理を行い、
前記誤差計算手段は、前記画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像において、画素の輝度値の配列が所定の配列条件に適合しない場合は、前記誤差に所定値を加算することを特徴とすることを特徴とする。
【0018】
発明によれば、例えばユーザが、デジタルカメラで撮影等して得られた原多値画像をプリンタ等に二値画像として出力する操作を行うと、ハーフトーン化処理システムは以下の処理を行う。まず、特定手段が、各画素ごとに任意の輝度値を有する二値画像を走査して二以上の画素から成る画素ブロックを特定する(特定ステップ)。特定手段により画素ブロックが特定されると、誤差計算手段が、二値により表される輝度の組み合わせから成る複数の組み合わせパターンを輝度値パターンとすると、各輝度値パターンごとに、前記特定手段によって特定された画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像に対し二次元フィルタ処理を行うことで得られる復元多値画像について、原多値画像との誤差を計算する(誤差計算ステップ)。前記誤差計算手段によって各輝度値パターンごとに誤差が計算されると、更新手段が、前記誤差計算手段によって計算された誤差が所定条件を満たす輝度値パターンで、当該画素ブロックの輝度値を更新する(更新ステップ)。そして、更新ステップ又は更新手段によって当該画素ブロックの輝度値が更新された二値画像について、特定手段が次の画素ブロックを特定する特定ステップを行い、次の画素ブロックについて誤差計算ステップ、更新ステップ、設定ステップが繰り返されることとなる。したがって、二以上の画素から成る画素ブロック単位で誤差計算や輝度値の更新が行われるため、一画素ごとに誤差計算や輝度値の更新を行うDBS法と比較して、本発明により最終的に得られる二値画像は、原多値画像にはない階調ムラやざらつきが少ないものとなる。
【0019】
また、誤差計算ステップにおいて又は誤差計算手段が、前記画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像において、画素の輝度値が所定の配列条件に適合しない場合は、前記誤差に所定値を加算する。したがって、画素の輝度値が所定の配列条件に適合しない二値画像については誤差が大きくなり、更新ステップ又は更新手段においては、輝度値の配列が所定の配列条件に適合することとなる輝度値パターンで画素ブロックが更新されやすくなる。
【0020】
前記配列条件には、ドットが形成される一の画素にはドットが形成される他の画素が所定数以上隣接して配列していることを条件として含むことが好ましい。
【0021】
前記配列条件には、ドットが形成される一の画素にはドットが形成される他の画素が所定数以上隣接して配列していることを条件として含むことが好ましい。
【0022】
これによれば、誤差計算ステップにおいて又は誤差計算手段が、ドットが形成される一の画素(通常は輝度値0の画素)にはドットが形成される他の画素が所定数以上隣接して配列していることを少なくとも配列条件とし、この配列条件に適合しない場合は、復元多値画像と原多値画像との誤差に所定値を加算する。したがって、ドットが形成される一の画素に対してドットが形成される画素が所定数未満しか隣接していない場合、例えばドットが形成される画素が一つだけ孤立した状態で配列している場合などは、誤差計算ステップ又は誤差計算手段において誤差に所定値が加算されて誤差が大きくなり、更新ステップ又は更新手段においては、二値画像が上記配列パターンに適合することとなる輝度値パターンにより更新されやすくなる。したがって、最終的に得られる二値画像はドット集中型二値画像となりやすく、この二値画像をプリンタ等に出力すると、ドット抜けや各画素の輪郭ボケを原因とする画像ボケが少ない画像が出力される。なお、配列条件としては、少なくとも上記条件が含まれていれば良く、上記条件と他の条件とが組み合わせられて配列条件とされても良い。
【0023】
前記配列条件には、ドットが形成されない一の画素にはドットが形成されない他の画素が所定数以上隣接して配列していることを条件として含むことが好ましい。
【0024】
前記配列条件には、ドットが形成されない一の画素にはドットが形成されない他の画素が所定数以上隣接して配列していることを条件として含むことが好ましい。
【0025】
これによれば、誤差計算ステップにおいて又は誤差計算手段が、前記配列条件には、ドットが形成されない一の画素(通常は輝度値1の画素)にはドットが形成されない他の画素が所定数以上隣接して配列していることが少なくとも配列条件として含まれており、この配列条件に適合しない場合は、復元多値画像と原多値画像との誤差に所定値を加算する。上記配列条件に適合しない場合、例えばドットが形成されない画素が一つだけ孤立した状態で配列している場合などは、誤差計算ステップ又は誤差計算手段において誤差に所定値が加算されて誤差が大きくなり、更新ステップ又は更新手段においては、二値画像の輝度値の配列が所定条件に適合することとなる輝度値パターンで画素ブロックが更新されやすくなる。したがって、最終的に得られる二値画像をプリンタ等の出力装置に出力すると、ドットが形成されない画素に対応する白抜き部分が印刷塗料などのにじみを原因として欠落するという問題が生じにくく、白抜き部分の欠落が少ない画像が出力される。なお、配列条件としては、少なくとも上記条件が含まれていれば良く、上記条件と他の条件とが組み合わせられて配列条件とされても良い。
【0026】
前記特定ステップにおいて、特定ブロックの範囲(形状)を少なくとも一回変更することが好ましい。
【0027】
前記特定手段が特定ブロックの範囲(形状)を少なくとも一回変更することが好ましい。
【0028】
これによれば、特定ステップにおいて又は特定手段は、画素ブロックを構成する画素の個数や配列を異ならせることにより、画素ブロックを少なくとも一回変形させて特定し、誤差計算ステップにおいて又は誤差計算手段は、変形された画素ブロックについて輝度値パターンで置換した場合に得られる二値画像に対し二次元フィルタ処理を行うことで得られる復元多値画像について、原多値画像との誤差を計算する。したがって、画素ブロックの範囲(形状)を一定とした場合とは異なる二値画像が得られ、画素ブロックの範囲(形状)を変更することにより誤差が更に小さくなる場合にも対応することが可能となる。
【0029】
前記誤差計算ステップにおいて、復元多値画像と原多値画像について互いに対応する画素ごとに輝度値の差を計算し、計算された輝度値の差を合計した値を復元多値画像と原多値画像との誤差とすることが好ましい。
【0030】
前記誤差計算手段は、復元多値画像と原多値画像について互いに対応する画素ごとに輝度値の差を計算し、計算された輝度値の差を合計した値を復元多値画像と原多値画像との誤差とすることが好ましい。
【0031】
これによれば、誤差計算ステップにおいて又は誤差計算手段が、復元多値画像と原多値画像について互いに対応する画素ごとに輝度値の差を計算し、算出された輝度値の差を合計した値を復元多値画像と原元多値画像との誤差とする。復元多値画像と原多値画像について互いに対応する画素としては、例えば両多値画像において同一座標にある画素が挙げられる。
【0032】
前記更新ステップにおける所定条件は、前記誤差計算ステップにおいて輝度値パターンごとに計算された誤差の中で最小の誤差であるという条件であることが好ましい。
【0033】
前記更新手段における所定条件は、前記誤差計算手段によって輝度値パターンごとに計算された誤差の中で最小の誤差であるという条件であることが好ましい。
【0034】
これによれば、更新ステップにおいて又は更新手段が、複数の輝度値パターンのうち原多値画像と復元多値画像との誤差が最小となる輝度値パターンで、画素ブロックの輝度値を更新する。かかる条件とすることにより、最終的に得られる二値画像は、原多値画像にはない階調ムラやざらつきが更に少ないものとなり、原多値画像に更に近似したものとなる。
【0035】
【0036】
【0037】
【発明の実施の形態】
以下、本発明のハーフトーン化処理システム及びハーフトーン化処理方法について詳述する。
【0038】
(第1の実施の形態)
図1は、本実施の形態のハーフトーン化処理システムSys1を実現するコンピュータシステムSys1及びそれに接続される入力装置5や出力装置6などを示す図である。本実施の形態のハーフトーン化処理システムSys1はパーソナルコンピュータ等のコンピュータシステムSys1により実現され、このコンピュータシステムSys1は中央演算処理装置1と、メモリ等の記憶手段2と、入力出力インターフェース3と、それらを接続する内部バス4などから構成されている。コンピュータシステムSys1の入力出力インターフェース3には、入力装置5や出力装置6やネットワークNETを介してサーバ等が接続されている。入力装置5は、コンピュータシステムSys1に画像データを入力するメモリカードやデジタルカメラやスキャナやハードディスク等である。出力装置6は、コンピュータシステムSys1からの画像データを画像として出力するプリンタやディスプレイ等である。コンピュータシステムSys1は、汎用的なコンピュータシステムであり、ハーフトーン化処理に際して本実施の形態のハーフトーン化処理システムSys1として機能するだけでなく、入力装置5から入力された画像の記憶や、ハーフトーン化処理の前に行われる前処理(拡大縮小処理やCMYK処理等)や、画像を出力装置に出力するなどの他の処理を行うシステムとしても機能する。
【0039】
ハーフトーン化処理システムSys1は、各画素の輝度が多値で表される原多値画像を各画素の輝度が二値で表される二値画像に変換するシステムであり、特定手段s2と、誤差計算手段s3と、更新手段s4とを備え、さらに初期二値画像生成手段s1とハーフトーン化処理終了条件判断手段s5とを備える。記憶手段2にはプログラムが格納されており、中央演算処理装置1がこのプログラムを実行することにより、コンピュータシステムSys1を前記各手段s1〜s5を備えるハーフトーン化処理システムSys1として機能させている。
【0040】
本実施の形態では、ユーザが入力装置5からコンピュータシステムSys1に原多値画像Gaを入力し、プリンタ等の出力装置6に出力する場合を例に説明する。図2は、コンピュータシステムSys1の原多値画像Gaの入力から二値画像Gbの出力までの一連の動作を示す概略フローチャートである。コンピュータシステムSys1は、この一連の動作のうちハーフトーン化処理を行うステップ(Step3)において、ハーフトーン化処理システムSys1として機能する。
【0041】
ユーザは、まず入力装置5から原多値画像GaをコンピュータシステムSys1に入力する。原多値画像Gaは、例えばデジタルカメラで撮影された画像や、ネットワークを介して接続されたサーバに公開されている画像や、スキャナで読み込まれた画像などであり、0以上1以下の多値で表される輝度を有する画素が複数配列して構成されている。本実施の形態では、5行5列に25個の画素が配列した原多値画像Ga(図8参照)を例に説明するが、これに限られない。コンピュータシステムSys1は、入力された原多値画像Gaを、入力出力インターフェース3と内部バス4を経由させて、記憶手段(メモリ等)2に記憶する(Step1)。
【0042】
つぎにユーザは、コンピュータシステムSys1に、原多値画像Gaの出力要求を入力する。たとえば、ディスプレイに印刷コマンド用ウィンドウを表示させ、用紙サイズや印刷部数等を指定した後に、印刷の開始を要求する「OK」のボタンをマウスでクリックすることによりプリンタに出力要求を行ったり、原多値画像Gaを示すアイコンをクリックすることによりディスプレイに表示するよう出力要求を行う。
【0043】
コンピュータシステムSys1は、ユーザからの出力要求を検知すると、記憶手段2に記憶された原多値画像Gaに対して、ハーフトーン化処理の前に必要な前処理を行う(Step2)。前処理としては、例えば入力された原多値画像Gaが符号化されている場合は復号化を行う復号化処理や、原多値画像GaをRGB表色系のイメージデータに変換するRGB処理や、RGB変換された原多値画像Gaを所定の倍率に拡大又は縮小する拡大縮小処理や、RGB表色系の原多値画像GaをCMYK表色系に変換するCMYK色変換処理などがある。
【0044】
コンピュータシステムSys1は、上記前処理が終了すると、記憶手段2に記憶されているプログラムによりハーフトーン化処理システムSys1として機能する(Step3)。ハーフトーン化処理システムSys1は、メモリ2に記憶された原多値画像Gaに対してハーフトーン化処理を行う(Step3)。ハーフトーン化処理は、図5に示すように、二値画像Gb(詳細は後述する)をラスタスキャン順に走査ウィンドウW(詳細は後述する)で走査しながら、走査ウィンドウWにより特定された画素ブロックBn(詳細は後述する)の各画素の輝度値を更新することにより行われる。具体的には、ハーフトーン化処理は、ハーフトーン化処理システムSys1が備える以下の各手段s1,s2,s3,s4,s5により、各手段に対応する各ステップ(Step11〜Step15)を順次実行する方法で行われる。図3(a)は、ハーフトーン化処理ステップ(step3)におけるハーフトーン化処理システムSys1の動作を抽出して示す概略フローチャートである。
【0045】
(初期二値画像生成ステップ:Step11)
ハーフトーン化処理システムSys1は、初期二値画像生成手段s1により、各画素の輝度値に0又は1の初期値を設定した二値画像Gbを生成し(図4)、この二値画像Gbを記憶手段2に格納する。二値画像Gbの画素の配列は、原多値画像Gaと同一の5行5列である。輝度の初期値の設定方法としては、総ての画素の輝度値を0又は1に設定する方法がある。また、各画素ごとに乱数を用いて一定の確率で輝度値を1に設定する方法や、あるいは、乱数を用いて原多値画像Gaの各画素ごとにその輝度値に依存した確率で、二値画像Gbの同じ座標にある画素の輝度値を1とする方法がある。たとえば、原多値画像Gaを構成する一の画素の輝度値がXのときに、二値画像Gbの同じ座標にある画素の輝度値を確率Xで1とし、確率(1−X)で0とする。これらの乱数を用いる方法を用いれば、ハーフトーン化処理の後に出力装置6に出力される二値画像Gbに周期的で目障りな模様が生じにくくなる。なお、この初期の二値画像Gbとしては、各画素ごとに任意の輝度値を有する二値画像Gbが予め記憶手段2に記憶されていてもよく、この場合は初期二値画像生成手段s1とこのステップ(Step11)の処理は不要である。
【0046】
(特定ステップ:Step12)
つぎに、ハーフトーン化処理システムSys1は、特定手段s2により、二値画像Gbを走査ウィンドウWにより画素ブロックBの単位で走査して、一の画素ブロックBを特定する。図5(a)(b)はその説明図である。
【0047】
画素ブロックBとは、二値画像Gbを構成する複数画素のうち二以上の画素から成るブロックである。本実施の形態では、画素ブロックBは2行2列の4つの画素から成る正方形状の画素の集合体であり、画素ブロックB1から画素ブロックB16までの16の画素ブロックがある。画素ブロックBの配列や画素数や形状はこれに限られず、それ以上又は以下の複数の画素を含む他の形状の画素ブロックBでも良い。
【0048】
走査ウィンドウWとは、二値画像Gbを走査しながら画素ブロックBを特定するウィンドウである。本実施の形態では、一画素ごとに走査ウィンドウWを列方向(図5(a)の矢印方向)に1画素分だけ移動させながらラスタスキャン順に二値画像Gbを走査して画素ブロックB1から画素ブロックB16を順次特定する。走査ウィンドウWを行方向に移動させたり、ランダムに移動させて走査しても良く、走査の順序は問わない。以下、特定ステップ(Step12)において走査ウィンドウWにより特定された一の画素ブロックを画素ブロックBn(本実施の形態ではnは1から16までのいずれかの値)として説明する。
【0049】
(誤差計算ステップ:Step13)
つぎに、ハーフトーン化処理システムSys1は、誤差計算手段s3により、複数の輝度値パターンPごとに、前記特定手段s2により特定された画素ブロックBnを上記輝度値パターンPで置換した場合に得られる二値画像Gbに対して二次元フィルタ処理を行うことにより得られる復元多値多像Grについて、原多値画像Gaとの誤差Eを計算する。以下、詳細に説明する。
【0050】
輝度値パターンPは、図6(a)に示すように、二値により表される輝度の組み合わせから成る輝度値の組み合わせパターンであり、画素ブロックBnの各画素に対応するように輝度値が配列されて構成されている。本実施の形態では、各輝度値パターンPは2行2列の4つの輝度が配列された二次元行列で構成されており、各輝度の総ての組み合わせから16通りの輝度値パターンP1〜P16が使用される。輝度値パターンPは、あらかじめプログラムに記述されるなどして記憶手段2に記憶されていても良いし、誤差計算ステップ(Step13)の処理ごとに生成されても良い。また、輝度値パターンPとしては、本実施の形態のように総ての組み合わせを輝度値パターンPとして使用しても良いし、その中のいくつかの組み合わせのみを輝度値パターンPとして使用しても良い。図3(b)は、誤差計算ステップ(Step13)におけるハーフトーン化処理システムSys1の動作を抽出して示す概略フローチャートである。誤差計算手段s3は、各輝度値パターンP1〜P16ごとに以下のステップ(置換ステップStep13−1、二次元フィルタ処理ステップStep13−2、計算ステップStep13−3、誤差計算終了条件判断ステップStep13−4)を行う。
【0051】
(置換ステップ:Step13−1)
誤差計算手段s3は、特定ステップ(Step12)において特定された画素ブロックBnを、輝度値パターンP1からP16のうち一の輝度値パターンPxで置換する(図6(b)参照)。本実施の形態では、まず輝度値パターンP1で置換する(図6(b)Gb11参照)。
【0052】
(二次元フィルタ処理ステップ:Step13−2)
次に、誤差計算手段s3は、置換ステップ(Step13−1)において画素ブロックBnの輝度値が一の輝度値パターンPxで置換された二値画像Gbに二次元フィルタ処理を行い、復元多値画像Grを生成する(図7)。二次元フィルタ処理とは、二値画像Gbが目視されたときの人間の視覚特性を考慮して、二値画像Gnの各画素の輝度値を増減させて、人間の網膜に映る画像を擬似的に再現した復元多値画像Grを生成する処理であり、ぼかしや平滑化と呼ばれる。たとえば、本実施の形態では、人間が二値画像Gbを目視するときは、隣接する画素同士が影響し合った状態で認識される視覚特性を考慮して、各画素ごとに隣接する画素の輝度値に依存して輝度値を増減させ、復元多値画像Grを生成する。二次元フィルタFは二次元ガウス分布に基づいたk行l列の二次元行列であり、k行l列で配列する値w(k,l)から構成されている。二次元フィルタFとしては、画像の輪郭ぼけを少なくしながら画像を滑らかにできる荷重平均フィルタが好ましい。荷重平均フィルタは、画素の位置によって異なる重み付けにより平均をするフィルタであり、中央の値が大きく、周辺の画素に向かって除々に値が小さくなるようにしたものなど様々な種類があるが、どの種類の荷重平均フィルタを使用するかは適宜選択すればよい。本実施の形態の二次元フィルタFは3行3列の二次元行列を用いた荷重平均フィルタFであるが、それ以上又は以下の大きさや他の形状でも良い。
【0053】
具体的には、二値画像Gbの座標(i,j)の輝度値をb(i,j)、二次元フィルタ処理のための二次元行列(すなわち二次元フィルタF)のk行l列の値をw(k,l)、二値画像Gbに二次元フィルタ処理を行って得られる復元多値画像Grの座標(i,j)の輝度値をr(i,j)と表わすと、誤差計算手段s3は、復元多値画像Grの座標(i,j)の輝度値r(i,j)を以下の数式1で計算する。
【0054】

Figure 0004108517
【0055】
二次元フィルタ処理のための二次元行列(すなわち二次元フィルタF)の全要素の合計が1になるように定めることにより、各輝度値r(i,j)は0以上1以下の実数値となる。
【0056】
数式1において、輝度値b(i+k,j+l)が大きさ5×5の二値画像Gbの範囲外になり得る。例えば、r(1,1)の値を計算するのに、数式1では、b(0,0)の値が必要になる。そこで、範囲外の画素の輝度値b(i+k,j+l)は任意に決め、数式1を評価することができる。例えば、範囲外の画素の輝度値を範囲内にある最もユークリッド距離で近い画素の輝度値にすることができる。上記例では、輝度値b(0,0)を範囲内の最もユークリッド距離で近い画素の輝度値b(1,1)とすることができる。
【0057】
二次元フィルタFによる復元画像の輝度値r(i,j)を求める数式1は一例であり、r(i,j)を、二値画像の位置(i,j)とその近傍の画素の輝度値に依存して任意に定めることができる。例えば、位置(i,j)とその上下左右に隣接する画素の輝度値を引数とする任意の関数gを用いて以下の数式2とすることができる。
【0058】
Figure 0004108517
【0059】
(計算ステップ:Step13−3)
つぎに、誤差計算手段s3は、前記二次元フィルタ処理ステップ(Step13−2)において生成された復元多値画像Grと原多値画像Gaとの誤差Eを計算する。たとえば、図8に示すように、原多値画像Gaと復元多値画像Grについて互いに対応する画素ごとに輝度値の差eを計算し、算出された輝度値の差eを合計した値を原多値画像Gaと復元多値画像Grとの誤差Eとする。原多値画像Gaの座標(i,j)の輝度値をa(i,j)とすると、原多値画像Gaと復元多値画像Grの同一座標(i,j)における輝度値の差e(i,j)は以下の式で計算される。
e(i,j)=|a(i,j)−r(i,j)|・・・(数式3)
誤差計算手段s3は、復元多値画像Grと原多値画像Gaの誤差Eを以下の数式4で計算する。
【0060】
Figure 0004108517
【0061】
数式4により、二値画像Gbが目視されたときに認識される画像である復元多値画像Grと原多値画像Gaとの誤差が計算されるので、二値画像Gbと原多値画像との誤差を計算する場合と比較して、算出された誤差が実際に目視されたときの誤差に近い値となる。
【0062】
ここで、誤差Eを計算する数式は上述のものに限らず、誤差の主旨を逸脱しない範囲で変更可能である。たとえば、誤差計算手段s3は、任意の増加関数fを使用して、以下の数式5で誤差Eを計算することも可能である。
【0063】
Figure 0004108517
【0064】
たとえば、増加関数fとして自乗関数f(x)=xとすると、数式6のようになる。
【0065】
Figure 0004108517
【0066】
(誤差計算終了条件判断ステップ:Step13−4)
誤差計算手段s3は、上記計算ステップ(Step13−3)が終了すると、総ての輝度値パターンP1〜P16について誤差Eを計算したことを誤差計算終了条件とし、この終了条件を満たしていない場合は再度置換ステップ(Step13−1)に戻り、残りの各輝度値パターンPについて上記置換ステップ(Step13−1)、二次元フィルタ処理ステップ(Step13−2)、計算ステップ(Step13−3)、誤差計算終了条件判断ステップ(Step13−4)を行う。総ての輝度値パターンP1〜P16について誤差Eを計算しており、終了条件を満たしている場合は更新ステップ(Step14)に進む。このように、各輝度値パターンP1〜P16ごとに上記各ステップ(Step13−1からStep13−4)を繰り返して行い、各輝度値パターンP1〜P16について誤差Eを算出する。
【0067】
なお、上記計算ステップ(Step13−3)については、誤差Eは、数式4や数式5や数式6に従って忠実に25個の総ての画素から成る全領域について計算する必要はなく、置換ステップ(Step13−1)における画素ブロックBnの輝度値の置換により復元多値画像Grの輝度値に影響が及ぶ範囲についてのみ計算しても良い。たとえば、図9に示すように、置換ステップ(Step13−1)において座標(2,2)(2,3)(3,2)(3,3)の四つの画素から成る画素ブロックB6の輝度値が各輝度値パターンP1〜P16で置換される場合は、二次元フィルタ処理ステップ(Step13−2)において座標(1,1)(1,4)(4,1)(4,4)の内側にある16画素から成る領域の輝度値が影響を受けて変化するが、他の座標の輝度値は一定であるので、上記16画素から成る領域のみについて誤差Eを計算しても良い。これにより、全画素から成る領域について誤差Eの計算を行う場合と比較して、処理量を減少させ、処理時間を短縮することができる。なお、この場合は二次元フィルタ処理ステップ(Step13−2)においては、上記影響が及ぶ範囲についてのみ二次元フィルタ処理を行うことにより、さらに処理量の減少及び処理時間の短縮を図ることができる。
【0068】
また、上記誤差計算ステップ(Step13)については、総ての輝度値パターンP1〜P16に対して誤差計算ステップ(Step13)を行わずに、一部の輝度値パターンPに対してのみ誤差計算ステップ(Step13)を行っても良い。たとえば、画素ブロックBnに対応する原多値画像Gaの画素が総て輝度値1である場合は、総ての画素が輝度値0である輝度値パターンP1で画素ブロックBnを置換することにより原多値画像Gaが良好に再現されることはほとんど無く、逆に、画素ブロックBnに対応する原多値画像Gaの画素の輝度値が総て輝度値0である場合は、総ての画素が輝度値1である輝度値パターンP16で画素ブロックBnを置換することにより原多値画像Gaが良好に再現されることはほとんど無いため、この輝度値パターンP1やP16については誤差計算ステップ(Step13)を省略する。たとえば、原多値画像Gaにおける4つの画素の輝度値a(2,2),a(2,3),a(3,2),a(3,3)がいずれも輝度値1の場合、二値画像Gbにおける画素ブロックB6の4つの画素の輝度値b(2,2),b(2,3),b(3,2),b(3,3)を輝度値パターンP1で置換しても原多値画像Gaを良好に再現することはほとんどないので、このような輝度値パターンP1に対しては誤差計算ステップ(Step13)を省略する。これにより、総ての輝度値パターンP1〜P16について誤差計算ステップ(Step13)を行う場合と比較して、処理量を減少させ、処理時間を短縮することができる。
【0069】
(更新ステップ:Step14)
つぎに、ハーフトーン化処理システムSys1は、更新手段s4により、誤差計算ステップ(Step13)において計算された誤差Eが所定条件を満たす一の輝度値パターンPで、特定ステップ(Step12)において特定された画素ブロックBnの輝度値を更新する。誤差Eの所定条件としては、誤差計算ステップ(Step13)において各輝度値パターンP1〜P16ごとに計算された誤差Eの中で最小の誤差Eであることを条件とするのが好ましい。かかる条件とすることにより、画素ブロックBnは誤差Eが最小となる輝度値パターンPで更新されるため、更新ステップ(Step14)を行うたびに、二値画像Gbは原多値画像Gaに近似していく。このハーフトーン化処理により最終的に得られる二値画像Gbは、原多値画像Gaには無い階調ムラやざらつきが少なく、原多値画像Gaにより近似した画像となる。
【0070】
上記誤差Eの他の所定条件としては、誤差Eが所定値以下であることを条件としても良い。所定値としては、ハーフトーン化処理により最終的に得られる二値画像(すなわち、プリンタ等の出力装置に出力される二値画像)Gbにおいて、原多値画像Gaには無い階調ムラやざらつきが視認されにくい程度に十分に小さい値とすることが好ましい。誤差Eが最小であることを条件とすると、誤差計算手段s3は総ての輝度値パターンP1〜P16について誤差計算ステップ(Step13)を行う必要があるが、誤差Eが所定値以下であることを条件とすることにより、所定値以下となる誤差Eが算出された時点で誤差計算ステップ(Step13)を終了することとなるので、処理量の軽減及び処理時間の短縮を図ることができる。
【0071】
(ハーフトーン化処理終了条件判断ステップ:Step15)
つぎに、ハーフトーン化処理システムSys1は、ハーフトーン化処理終了条件判断手段s5により、ハーフトーン化処理を終了するための終了条件が満たされているか否かを判断し、終了条件が満たされていない場合は特定ステップ(Step12)に戻り、終了条件が満たされている場合はハーフトーン化処理ステップ(Step3)を終了して次の出力ステップ(Step4)に進む。ここで、ハーフトーン化処理終了条件としては、「二値画像Gbの総ての画素ブロックBについて更新ステップ(Step14)が行われたこと」を条件とする。たとえば、座標(1,1)(2,1)(1,2)(2,2)の画素から成る最初の画素ブロックB1から最後の画素ブロックB16までラスタスキャン順に走査する本実施の形態では、座標(4,4)(4,5)(5,4)(5,5)の画素から成る最後の画素ブロックB16について上記更新ステップ(Step14)が終了済みの場合はハーフトーン化処理を終了することを終了条件とする。この条件の場合は、二値画像Gbについて一通り(例えばラスタスキャン順に走査する場合は、画素ブロックB1から画素ブロックB16まで)更新ステップ(Step14)が行われた時点でハーフトーン化処理が終了し、次の出力ステップ(Step4)へ進む。一方、途中の画素ブロックBnまでしか更新ステップ(Step14)が行われていない場合は、特定ステップ(Step12)に戻る。図5に示すように、次の特定ステップ(Step12)においては、画素ブロックBnの輝度値が更新された二値画像Gbについて走査が行われ、走査ウィンドウWが1画素分だけ移動して次の画素ブロックB(n+1)が特定される。その後、特定された画素ブロックB(n+1)について、誤差計算ステップ(Step13)以降の処理が行われることとなる。
【0072】
また、他の終了条件として、「更新ステップ(Step14)において得られた二値画像Gbの復元多値画像Grと、原多値画像Gaとの誤差Eが所定値以下であること」としても良い。この条件の場合は、画素ブロックBnについて上記更新ステップ(Step14)が終了した時点で、その二値画像Gbの復元多値画像Grと原多値画像Gaとの誤差Eが所定値以下である場合は出力ステップ(Step4)に進み、所定値よりも大きい場合は再度特定ステップ(Step12)に戻って次の画素ブロックB(n+1)を特定する。また、他の条件として、「二値画像Gbの総ての画素ブロックB1〜B16について更新ステップ(Step14)が行われたこと」且つ「更新ステップにおいて得られた二値画像Gbの復元多値画像Grと、原多値画像Gaとの誤差Eが所定値以下であること」の両方を終了条件としても良い。この条件の場合は、最後の画素ブロックB16について上記更新ステップ(Step14)が終了し、且つその更新ステップ(Step14)において得られた二値画像Gbの復元多値画像Grと原多値画像Gaとの誤差Eが所定値以下である場合は出力ステップ(Step4)に進む。一方、最後の画素ブロックB16について上記更新ステップ(Step14)が終了した時点で上記誤差Eが所定値以下でない場合は特定ステップ(Step12)に戻り、走査を開始した最初の画素ブロックB1に走査ウィンドウWを移動させてこの画素ブロックB1を特定し、再度最初の画素ブロックB1から上記各ステップ(Step11からStep15)を行う。さらに他の条件として「更新ステップ(Step14)があらかじめ決めた規定回数実行されたこと」を終了条件としても良く、この条件の場合は例えば画素ブロックB1〜B16について規定回数繰り返して上記各ステップ(Step11〜Step15)が行われることとなり、規定回数を増減させることにより処理量及び処理時間をある程度制御することができる。また他の条件として「画像ブロックBnについて輝度値が更新された二値画像Gbと、その直前に実行された画素ブロックB(n−1)について輝度値が更新された二値画像Gbが同一であること」を終了条件としても良く、この条件の場合は画素ブロックBnの輝度値を更新しても誤差Eが変化しなくなるまで上記各ステップ(Step11からStep15)が繰り返し行われ、可能な限り原多値画像Gaに近似した二値画像Gbを得ることができる。
【0073】
(出力ステップ:Step4)
ハーフトーン化処理システムSys1によりハーフトーン化処理ステップ(Step3)が終了すると、コンピュータシステムSys1は、内部バス4及び入力出力インターフェース3を経由してプリンタやディスプレイ等の出力装置6に上記二値画像Gbを出力する。上記二値画像Gbはネットワークを介して遠隔地のプリンタやディスプレイに出力されても良い。たとえばコンピュータシステムSys1が二値画像Gbをプリンタに出力した場合は、プリンタは、コンピュータシステムSys1から入力された二値画像Gbの輝度値0の画素にトナーなどの印刷塗料を塗布してドットを形成し、二値画像Gbを印刷する。また、例えば二値画像Gbを液晶ディスプレイに出力した場合は、液晶ディスプレイは、輝度値0の画素についてはバックライトからの光を遮断状態とし、輝度値1の画素については光を透過状態として二値画像Gbを可視画像として出力する。出力装置6により出力された二値画像Gbは、原多値画像Gaには無い階調ムラやざらつきが少なく、目視されたときに原多値画像Gaをより近い状態で再現するものとなる。
【0074】
ここで、特定ステップ(Step12)においては、特定手段s2が走査ウィンドウWの範囲(形状)を変更して、特定される画素ブロックBの範囲(形状)を変更するようにしても良い。画素ブロックBの範囲(形状)は少なくとも一回変更させれば良く、偶数回目の特定ステップでは走査ウィンドウWの形状を一の形状(例えば2行3列)とし、奇数回目では他の形状(例えば3行2列)とすることで、画素ブロックBの範囲(形状)が奇数番目と偶数番目とで異なるようにしても良い。また、二値画像Gbについて最初の画素ブロックB1から最後の画素ブロックB16までの走査が複数回繰り返して行われる場合は、奇数回目の走査については画素ブロックBを一の範囲(例えば2行3列)とし、偶数回目の走査については画素ブロックBを他の範囲(例えば3行2列)としても良い。また、画素ブロックBを構成する画素の個数を異ならせることにより、画素ブロックBを他の範囲(形状)に変更しても良い。記憶手段2には、各形状の画素ブロックBに対応して輝度値パターンPが記憶されており、誤差計算ステップ(Step13)においては、各形状の画素ブロックBに応じた輝度値パターンPで画素ブロックBが置換される。走査ウィンドウW及び画素ブロックBの範囲(形状)を変更し、誤差計算ステップにおいて範囲(形状)が変更された画素ブロックBの輝度値を置換すると、走査ウィンドウW及び画素ブロックBの範囲(形状)を一定とした場合とは異なる二値画像が得られ、階調ムラやざらつきが更に少ない二値画像が得られる場合があるからである。
【0075】
(第1の実施の形態の実施例)
第1の実施の形態の実施例として、ハーフトーン化処理ステップ(Step3)のみに限定し、ハーフトーン化処理システムSys1の動作を説明する。
【0076】
ハーフトーン化処理システムSys1は、初期二値画像生成手段s1により、二値画像Gbを生成し(初期二値画像生成ステップ(Step11)、図4参照)、特定手段s2により、二値画像Gbを走査して最初の画素ブロックB1を特定する(特定ステップ(Step12)、図5(b)Gb1参照)。つぎに、ハーフトーン化処理システムSys1は、誤差計算手段s3により誤差Eを計算する(誤差計算ステップ(Step13))。誤差計算ステップ(Step13)を詳細に説明すると、まず二値画像Gbの画素ブロックB1を輝度値パターンP1で置換し(置換ステップ(Step13−1)、図6(b)Gb11参照)、この二値画像Gbに二次元フィルタ処理を行って復元多値画像Grを生成し(二次元フィルタ処理ステップ(Step13−2))、この復元多値画像Grについて原多値画像Gaとの誤差Eを計算する(計算ステップ(Step13−3))。次にハーフトーン化処理システムSys1は、総ての輝度値パターンPについて誤差Eを計算したか判断する(誤差計算終了条件判断ステップ(Step13−4))。この時点では輝度値パターンP1について誤差Eを計算しただけであるので、再度置換ステップ(Step13−1)に戻り、次の輝度値パターンP2について置換ステップ(図6(b)Gb12参照)、二次元フィルタ処理ステップ、計算ステップ、誤差計算終了条件判断ステップを行う。ハーフトーン化処理システムSys1は、同様に輝度値パターンP3からP16まで上記各ステップ(Step13−1からStep13−4)の処理を行い、誤差計算終了条件判断ステップ(Step13−4)において輝度値パターンP16となったときに総ての輝度値パターンP1〜P16について誤差Eを計算したと判断して更新ステップ(Step14)に進む。ハーフトーン化処理システムSys1は、更新手段s4により、上記誤差計算ステップ(Step13)において各輝度値パターンP1〜P16ごとに計算された誤差Eの中から、誤差Eが最小となる一の輝度値パターンPで二値画像Gbの画素ブロックB1の輝度値を更新する(更新ステップ(Step14))。つぎに、ハーフトーン化処理システムSys1は、ハーフトーン化処理終了条件判断手段s5により、「更新ステップにおいて更新された画素ブロックBが最後の画素ブロックB16である」という終了条件を満たすか判断する(ハーフトーン化処理終了条件判断ステップ:Step15)。現時点では特定された画素ブロックBは最初の画素ブロックB1であるので、再度特定ステップ(Step12)に戻る。次の特定ステップ(Step12)では、ハーフトーン化処理システムSys1は、画素ブロックB1について輝度値が更新された状態の二値画像Gbを走査して次の画素ブロックB2を特定し(図5(b)Gb2参照)、以下画素ブロックB1の場合と同様の処理を行う。その後、ハーフトーン化処理システムSys1は、各画素ブロックB3からB16まで同様の処理を行う。そして、更新ステップ(Step14)において画素ブロックB16が更新された後に、ハーフトーン化処理終了条件判断ステップ(Step15)において終了条件を満たすと判断し、出力ステップ(Step4)に進む。出力ステップ(Step4)では、二値画像Gbがプリンタ等の出力装置6に出力される。
【0077】
なお、ハーフトーン化処理終了条件として「二値画像Gbの総ての画素ブロックBについて更新ステップ(Step14)が行われたこと」且つ「更新ステップにおいて得られた二値画像Gbの復元多値画像Grと原多値画像Gaとの誤差Eが所定値以下であること」を条件とした場合は、ハーフトーン化処理システムSys1は、更新ステップ(Step14)において更新された画素ブロックBnが最後の画素ブロックB16であっても「画素ブロックB16の輝度値が更新された二値画像Gbの復元多値画像Grと原多値画像Gaとの誤差Eが所定値以下である」ことを満たしていなければ、終了条件を満たさないと判断し、再度特定ステップ(Step12)に戻る。次の特定ステップ(Step12)では、ハーフトーン化処理システムSys1は、画素ブロックB16の輝度値が更新された二値画像Gbを走査して最初の画素ブロックB1を特定し、同様の処理を繰り返す。
【0078】
(第2の実施の形態)
本実施の形態は、前記第1の実施の形態とほぼ同様であるが、誤差計算ステップ(Step13)のみ異なり、特に誤差計算ステップ(Step13)のうち計算ステップ(Step13−3)において異なる。
【0079】
(計算ステップ:Step13−3)
本実施の形態の誤差計算ステップ(Step13)における計算ステップ(Step13−3)では、置換ステップ(Step13−1)において画素ブロックBnを一の輝度値パターンPで置換した場合に得られる二値画像Gb(以下、置換ステップで得られる二値画像Gbという)について、輝度値の配列が所定の配列条件に適合しない場合は、誤差Eに所定値dを加算する。本実施の形態では、ドットが形成される一の画素にはドットが形成される他の画素が一つ以上隣接して配列していることを配列条件(以下、配列条件1という)としている。
【0080】
本実施の形態では、置換ステップ(Step13−1)における二値画像Gbの各画素の輝度値が、予め記憶手段2に記憶されている配列パターンAPに適合するか否かを判断することにより、配列条件1に適合するか否かを判断している。具体的には、二値で表される輝度が配列したパターンを配列パターンAPとすると、輝度値の配列が異なる複数種類の配列パターンAPがハーフトーン化処理システムSys2の記憶手段2に記憶されている。配列パターンAPとしては、図10(a)に示すように、座標(i,j)の画素(図10(a)中太線に囲まれた画素、以下注目画素という)の輝度値が0のときに、その座標(i,j)の注目画素に対して上下左右のいずれかに隣接する画素、すなわち(i−1,j)の画素、又は(i,j−1)の画素、又は(i+1,j)の画素、又は(i,j+1)の画素のいずれかが輝度値0である4つの配列パターンAPa1〜APa4が記憶されている。そして、ハーフトーン化処理システムSys2は、原多値画像Gaと復元多値画像Grの同一座標(i,j)の画素における輝度の差eを計算する際に、置換ステップ(Step13−1)で得られる二値画像Gbの同一座標(i,j)の画素を注目画素とすると、注目画素が輝度値0のときに上記配列パターンAPa1〜APa4のいずれかに適合するかを判断する。二値画像Gbの同一座標(i,j)の画素を注目画素としたときに上記配列パターンAP1〜AP4のいずれかに適合する場合は、輝度値の差e(i,j)を上記数式3で計算する。配列パターンAP1〜AP4のいずれにも適合しない場合は、上記数式3で算出される輝度値の差e(i,j)に所定値dを加算した値を、その座標(i,j)の輝度値の差e(i,j)とする。具体的には、下記の数式7で計算する。
e(i,j)=|a(i,j)−r(i,j)|+d・・・(数式7)
誤差Eは、上記第1の実施の形態と同様に数式4や数式5や数式6で計算される。これにより、上記配列条件1に適合しない画素の数に応じて、誤差Eに所定値dが加算されることとなり、配列条件1に適合しない画素が多いほど誤差Eが大きくなる。なお、本実施の形態では、注目画素が輝度値1であることを配列条件0とし、座標(i,j)の注目画素が輝度値1である配列パターンAP0も配列パターンAPの一つとして記憶されている。注目画素が輝度値1の場合は数式3で計算され、誤差e(i,j)に所定値dが加算されることはない。輝度値1にはドットが形成されず、ドット抜けやドット輪郭ボケといった問題がそもそも生じないためである。
【0081】
更新ステップ(Step14)は第1の実施の形態と同様であるが、配列条件1を満たす画素が少なく、二値画像Gbにおいて輝度値0の画素が孤立した配列となるような(すなわち、輝度値0の画素に対して隣接する総ての画素の輝度値が1となるような)輝度値パターンPでは画素ブロックBnが更新されにくくなる。一方、配列条件1を満たす画素が多く、二値画像Gbにおいて輝度値0の一の画素に対して輝度値0の他の画素が少なくとも一つ隣接する配列となるような輝度値パターンPでは画素ブロックBnが更新されやすくなる。したがって、更新ステップ(Step14)により生成される二値画像Gbは輝度値0が集中して配列する傾向にあるドット集中型二値画像となる。
【0082】
出力ステップ(Step4)は第1の実施の形態と同様である。出力される二値画像Gbはドット集中型二値画像であるため、ドット抜けや画像ボケの問題が生じにくくなる。すなわち、二値画像Gbにおいてドットが形成される輝度値0の画素が一つだけ孤立して存在する場合は、ドットが形成される一画素の面積が狭すぎるため、トナーなどの印刷塗料が付着しにくく、ドット抜けの問題が生じやすい。また、プリンタによっては各画素のドットに印刷された塗料がにじんだり、ディスプレイによっては各画素のドットの輪郭がボケる場合があり、輝度値0の画素が孤立して存在する場合は、ドットの輪郭のボケがそのまま画像のボケとして視認される。これに対して、ドット集中型二値画像である二値画像Gbはドットが形成される輝度値0の画素が集中して存在するため、ドットが形成される画素が互いに連続した状態となって面積が広くなり、印刷塗料が付着しやすくなる。また、集中して配列した状態の輝度値0の画素にドットが形成されると、形成されたドットが連結状態となって各ドットの輪郭ボケが目立ちにくくなるため、画像ボケが抑制される。
【0083】
なお、本実施の形態の配列条件は上記条件に限らず、プリンタの性能等により、輝度値0を有する画素が二つ隣接する程度の面積ではトナー等の印刷塗料が付着しにくい場合等には、その程度に応じて配列パターンAPの注目画素に隣接する輝度値0の画素の個数を増減させればよい。例えば、ドットが形成される一の画素にはドットが形成される他の画素が二以上隣接して配列していることを配列条件2として、配列パターンAPを輝度値0の注目画素に輝度値0である他の画素が二つ隣接している配列パターンAPb1〜APb4(図10(b))、配列パターンAPc1〜APc8(図10(c))としても良いし、また、ドットが形成される一の画素にはドットが形成される他の画素が三つ以上隣接して配列していることを配列条件3として、配列パターンAPを輝度値0の注目画素に輝度値0の他の画素が三つ隣接している配列パターンAPd1〜APd4(図10(d))としても良い。また、予め複数の配列パターンAPを記憶手段2に記憶しておくことなく、輝度値0の画素に隣接する画素を走査し、隣接する画素に輝度値0の画素が無い場合に配列条件を満たさないとして所定値dを加算するようにしても良い。
【0084】
また、所定値dを増減させることにより、二値画像Gbにおいて輝度値0の画素が互いに所定数隣接する確率を調節しても良い。確率を高めるときは所定値dをある程度大きく設定する。また、複数の配列条件について所定値dを異ならせることにより重み付けして使用しても良い。たとえば、輝度値0の一の画素に輝度値0の他の画素が二つ隣接しているときの所定値d1、一つ隣接しているときの所定値d2、隣接していないときの所定値d3を、d1<d2<d3となるようにしても良い。
【0085】
(第2の実施の形態の他の例1)
第2の実施の形態の他の例として、ドットが形成されない輝度値1の一の画素にはドットが形成されない輝度値1の他の画素が所定数以上隣接して配列していること、を配列条件とする。例えば、ドットが形成されない一の画素にはドットが形成されない他の画素が一つ以上隣接して配列していることを配列条件4とする場合は、図11(a)に示すように、座標(i,j)の注目画素に対して上下左右のいずれかに隣接する画素、すなわち(i−1,j)の画素、又は(i,j−1)の画素、又は(i+1,j)の画素、又は(i,j+1)の画素のいずれかが輝度値1である4つの配列パターン配列パターンAPa11〜APa14のいずれかに適合するかを判断する。この配列パターンAPa11〜APa14に適合しない場合は、その座標(i,j)の輝度値の差e(i,j)には所定値dが加算される(数式7参照)。したがって、画素ブロックBnは、輝度値1の画素に対して上下左右のいずれかの画素が輝度値1となるような輝度値パターンPで更新されやすくなり、プリンタ等に印刷したときに白抜き部分の欠落が生じにくい二値画像Gbとなる。
【0086】
プリンタの性能等により、トナー等の印刷塗料のにじむ程度に大小があるため、その程度に応じて隣接する輝度値1の画素の個数を増減させればよい。例えば、ドットが形成されない一の画素にはドットが形成されない他の画素が二つ以上隣接して配列していることを配列条件5とする場合は、輝度値1の注目画素に輝度値1である他の画素が二つ隣接している配列パターンAPb11〜APb14(図11(b))及びAPc11〜APc18(図11(c))を使用し、また、ドットが形成されない一の画素にはドットが形成されない他の画素が三つ以上隣接して配列していることを配列条件6とする場合は、輝度値1の注目画素に輝度値1の他の画素が三つ隣接している配列パターンAPd11〜APd14(図11(d))を使用する。
【0087】
(第2の実施の形態の他の例2)
さらに、「ドットが形成される一の画素にはドットが形成される他の画素が所定数以上隣接して配列しており、且つ、ドットが形成されない一の画素にはドットが形成されない他の画素が所定数以上隣接して配列していること」を配列条件としても良い。たとえば、配列条件1又は配列条件4のいずれかに適合することを配列条件としたり、配列条件2又は配列条件5のいずれかに適合することを配列条件としたり、配列条件3又は配列条件6のいずれかに適合することを配列条件としても良い。これにより、ハーフトーン化処理により最終的に得られる二値画像は、ドット集中型二値画像であり且つ輝度値1の画素についても集中して配列する傾向にある二値画像となる。したがって、出力装置に出力したときに、ドット抜けや画像ボケが生じにくく、且つ、白抜き部分の欠落も生じにくい二値画像が得られる。
【0088】
なお、かかる配列条件を使用する方法及びシステムは、従来のDBS法に適用することも可能である。これにより、従来のDBS法による二値画像についてもドット集中型二値画像が得られ、また輝度値1の画素についても集中して配列する傾向にある二値画像が得られる。
【0089】
上記各実施の形態は、コンピュータシステムSys1,Sys2をハーフトーン化処理システムSys1,Sys2として機能させた場合を例に説明したが、プリンタ等の出力装置に内蔵されている記憶手段にプログラムを記憶させ、このプログラムにより出力装置に内蔵されているCPUをハーフトーン化処理システムとして機能させても良い。また、上記各手段s1〜s5の一部、または全部を実現する回路を実装したFPGAやASICなどの集積回路をプリンタ等の出力装置6に搭載し、出力装置6がハーフトーン化処理システムとしての機能を有するようにしても良い。
【0090】
(比較実験)
本発明の有効性を証明するために、本発明のハーフトーン化処理システムを用いた本発明のハーフトーン化処理方法と、従来のハーフトーン化処理方法(DBS法、誤差拡散法、ディザ法)とを比較する比較実験を行った。実験方法は、原多値画像をそれぞれのハーフトーン化処理方法でハーフトーン化処理を行うことにより二値画像を生成し、その二値画像をプリンタにより印刷して、各方法により生成された二値画像を比較した。図12(A)は原多値画像であり、(B)は誤差拡散法、(C)はディザ法、(D)はDBS法により生成された二値画像であり、(E)は本発明の第1の実施の形態のハーフトーン化処理システムSys1を用いたハーフトーン化処理方法により生成された二値画像であり、(F)は本発明の第2の実施の形態のハーフトーン化処理システムSys2を用いたハーフトーン化処理方法において上記配列条件1又は上記配列条件0のいずれかに適合することを配列条件としたときの二値画像、(G)は上記配列条件2又は上記配列条件0のいずれかに適合することを配列条件としたときの二値画像、(H)は上記配列条件3又は上記配列条件0のいずれかに適合することを配列条件としたときの二値画像であり、(I)は上記配列条件1又は配列条件4のいずれかに適合することを配列条件としたときの二値画像、(J)は上記配列条件2又は配列条件5のいずれかに適合することを配列条件としたときの二値画像、(K)上記配列条件3又は上記配列条件6のいずれかに適合することを配列条件としたときの二値画像である。
【0091】
本発明の第1の実施の形態のハーフトーン化処理システムSys1を用いたハーフトーン化処理方法により生成された二値画像(E)は、DBS法による二値画像(D)と比較して、原多値画像には無い階調ムラやざらつきが少なくなっており、原多値画像Gaにより近似したものとなっている。また、DBS法ではドットが形成される画素が孤立して配列する傾向にあるドット拡散型二値画像となっているのに対して、本発明の第2の実施の形態のハーフトーン化処理システムSys2を用いたハーフトーン化処理方法により生成された二値画像(F)(G)(H)は、それぞれドットが形成される画素が二以上、三以上、四以上集中して配列する傾向にあるドット集中型二値画像となっている。したがって、二値画像(F)(G)(H)は、印刷塗料が付着しにくいプリンタや各ドットの輪郭がボケるプリンタを使用した場合でも、ドット抜けや各画素の輪郭ボケを原因とする画像ボケが生じにくい良好な二値画像となる。また、本発明の第2の実施の形態の他の例におけるハーフトーン化処理システムSys2を用いたハーフトーン化処理方法により生成された二値画像(I)(J)(K)は、ドット集中型二値画像であり、更にそれぞれドットが形成されない輝度値1の画素が二以上、三以上、四以上集中して配列する傾向にある二値画像となっている。したがって、ドット抜けや画像ボケが生じにくいだけでなく、印刷塗料などのにじみを原因として白抜き部分が欠落するという問題が生じにくく、さらに良好な二値画像を得ることができる。なお、参考として、誤差拡散法による二値画像(B)と比較すると、本発明により生成された二値画像(E)から(K)は一定の周期を持つ目障りな模様やモアレが少なく、また、ディザ法による二値画像(C)と比較すると輪郭のボケが少なく、本発明によれば誤差拡散法やディザ法による二値画像と比較しても良好な二値画像が得られることがわかる。
【0092】
【発明の効果】
本発明のハーフトーン化処理方法及びハーフトーン化処理システムによれば、二以上の画素から成る画素ブロック単位で誤差計算や輝度値の更新が行われるため、一画素ごとに誤差計算や輝度値の更新を行うDBS法と比較して、原多値画像には無い階調ムラやざらつきが少ない二値画像が得られる。したがって、二値画像は原多値画像をより近い状態で再現するものとなり、この二値画像が目視されると原多値画像により近似したものとして認識される。
【0093】
さらに、本発明のハーフトーン化処理方法及びハーフトーン化処理システムによれば、上記画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像において、画素の輝度値の配列が所定条件に適合しない場合は、上記誤差に所定値を加算するため、更新ステップ又は更新手段においては、輝度値が好ましい配列となる輝度値パターンで画素ブロックが更新される。とくに、ドットが形成される一の画素にはドットが形成される他の画素が所定数以上隣接して配列していることを配列条件に含むと、ハーフトーン化処理により最終的に生成される二値画像は、ドットが形成される輝度値0の画素が複数集中して配列する傾向にあるドット集中型二値画像となりやすくなる。したがって、ドットが形成される画素が互いに連続して面積が広くなり、印刷塗料が付着しやすくなる。また、複数連続した輝度値0の画素にドットが形成されると、形成されたドットが連結して各ドットの輪郭ボケが目立ちにくくなるため、画像全体として画像ボケが抑制される。この二値画像をプリンタやディスプレイなどに出力すると、ドット抜けや画像ボケのない良好な画像が出力される。また、ドットが形成されない一の画素にはドットが形成される他の画素が所定数以上隣接して配列していることを配列条件に含むと、ハーフトーン化処理により最終的に生成される二値画像は、ドットが形成されない輝度値1の画素が複数集中して配列する傾向にある二値画像となりやすくなる。したがって、本発明によって最終的に得られる二値画像をプリンタ等の出力装置に出力すると、ドットが形成されない画素に対応する白抜き部分が印刷塗料などのにじみを原因として欠落するという問題が生じにくく、白抜き部分についても明瞭な画像が出力される。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態の本実施の形態のハーフトーン化処理システムを実現するコンピュータシステム及びそれに接続される入力装置や出力装置などを示す図。
【図2】上記実施の形態のコンピュータシステムの原多値画像の入力から二値画像の出力までの一連の動作を示す概略フローチャート。
【図3】(a)は上記実施の形態のハーフトーン化処理ステップにおけるハーフトーン化処理システムの動作を抽出して示す概略フローチャート、(b)は誤差計算ステップにおけるハーフトーン化処理システムの動作を抽出して示す概略フローチャート。
【図4】上記実施の形態の二値画像を示す図。
【図5】二値画像を走査ウィンドウにより画素ブロックの単位で走査して、一の画素ブロックを特定する処理を説明する説明図。
【図6】(a)は上記実施の形態の輝度値パターンを示す図、(b)は二値画像の一の画素ブロックを各輝度値パターンで置換した場合の二値画像を示す図。
【図7】上記実施の形態の誤差計算ステップに含まれる二次元フィルタ処理ステップを説明する説明図。
【図8】上記実施の形態の誤差計算ステップに含まれる計算ステップを説明する説明図。
【図9】画素ブロックの輝度値の置換により復元多値画像の輝度値に影響が及ぶ範囲を説明する説明図。
【図10】(a)は本発明の第2の実施の形態の配列パターンを示す図、(b)と(c)と(d)は配列パターンの他の例を示す図。
【図11】(a)は本発明の第2の実施の形態の他の例における配列パターンを示す図、(b)と(c)は配列パターンの他の例を示す図。
【図12】従来のハーフトーン化処理方法により得られる二値画像と本発明のハーフトーン化処理方法により得られる二値画像を示す図。
【符号の説明】
Sys1,Sys2 ハーフトーン化処理システム(コンピュータシステム)
1 中央演算処理装置
2 記憶手段
3 入力出力インターフェース
4 内部バス
5 入力装置
6 出力装置
s1 初期二値画像生成手段
s2 特定手段
s3 誤差計算手段
s4 更新手段
s5 ハーフトーン化処理終了条件判断手段
Ga 原多値画像
Gb 二値画像
Gr 復元多値画像
W 走査ウィンドウ
F 二次元フィルタ
B 画素ブロック
B1 最初の画素ブロック
B16 最後の画素ブロック
P(P1〜P16) 輝度値パターン
AP 配列パターン[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a halftoning processing method and a halftoning processing system for converting an original multi-valued image in which the luminance of each pixel is expressed in multiple values into a binary image in which the luminance of each pixel is expressed in binary.
[0002]
[Prior art]
  For an output device that outputs an image, a multi-value image in which the luminance of each pixel is expressed in multiple values (that is, a multi-value image in which each pixel takes a real luminance value of 0 to 1 is also called a continuous tone image) ), But a binary image in which the luminance of each pixel is expressed in binary, such as a printer that outputs an image depending on the presence or absence of dots (that is, the luminance of each pixel is 0 or 1) There are many output devices that can only output images that take values. When a multi-value image is output using an output device that can output only a binary image in this way, the original multi-value image to be output is converted into a binary image, and the original multi-value image is represented in a pseudo manner. Output a binary image. This conversion processing is called halftoning processing (or rope point processing).
[0003]
  For example, in a monochrome printer, a binary image is generated by performing halftoning processing on an original multi-valued image, and black dots are printed on white paper when the luminance value is 0 for each pixel of the binary image. . Also in a color printer, a color multivalued image is decomposed into CMYK (cyan, magenta, yellow, black) color components, and each color component is regarded as a monochrome multivalued image, and halftone processing is performed on this monochrome multivalued image. To generate a binary image and print dots of each color on paper.
[0004]
  In such halftoning processing, it is required to reproduce the original multi-valued image as much as possible by generating the binary image approximated to the original multi-valued image, particularly the original multi-valued image. There are no obtrusive patterns or moiré that are not present in the image, the outline is clear, and the gradation to be reproduced is not uneven or rough.
[0005]
  As a halftoning method, a dither method or an error diffusion method is widely used. The dither method is a method in which an original multi-valued image is divided into blocks of the same size, and a luminance value of a corresponding binary image is determined using a dither matrix for each block. The error diffusion method determines the luminance value of the corresponding binary image pixel while scanning the pixels of the input multilevel image in the raster scan order, and the luminance value of the input multilevel image and the binary image generated at the time of determination are determined. This is a method of diffusing a luminance value error to surrounding luminance value undetermined pixels.
[0006]
  However, since dither processing is performed on a block-by-block basis, each pixel outputs a binary image with the same pattern when pixels with the same luminance value in the original multi-valued image are in a continuous wide area. An unsightly pattern with a long period is likely to occur. If the block is enlarged, the gradation of the original multi-valued image can be reproduced with high accuracy, but the outline is blurred and a clear image cannot be obtained. Further, in the error diffusion method, an unsightly pattern or moire is relatively less likely to occur than in the dither method, but there is a problem that the outline is blurred because the error is diffused around.
[0007]
  A direct binary search (DBS) method is a halftone processing method in which these problems are unlikely to occur. The direct binary search (DBS) method is disclosed, for example, in Non-Patent Document 1 below.
[0008]
[Non-Patent Document 1]
  DBS's first paper was published with the title “Model based halftoning using direct binary search”, author “M. Analoui, JP Allebach”, and publication “Proceedings SPIE Human Vision, Visual Proceeding”. (Volume 1666, pages 96-108, August 1992).
[0009]
  The DBS method will be described below. First, one pixel is specified while scanning a binary image having an arbitrary luminance value for each pixel in units of pixels. For the specified pixel (hereinafter referred to as the pixel of interest), the luminance value of the pixel of interest is inverted from 0 to 1 or 1 to 0, or replaced with the luminance value of the adjacent pixel. A binary image obtained by replacing values is subjected to two-dimensional filter processing to generate a restored multi-valued image, and an error between the restored multi-valued image and the original multi-valued image (hereinafter referred to as post-substitution error) is calculated. . An error from the original multi-value image (hereinafter referred to as pre-replacement error) is also calculated for the restored multi-value image obtained by performing the two-dimensional filter processing on the binary image before the pixel of interest is replaced. When the error after replacement is smaller than the error before replacement, the luminance value of the target pixel of the binary image is updated with the luminance value after replacement. If the error after replacement is larger than the error before replacement, the same process is performed for the next pixel of interest without updating the luminance value. Thereafter, the same processing is repeated for the target pixel sequentially identified in the scanning process.
[0010]
  In such a DBS method, the initial binary image used at the beginning of the halftoning process is a random noise image, so that the periodic and annoying patterns and moire that have been a problem in the dither method and the error diffusion method can be obtained. Occurrence can be avoided. Further, since the work of diffusing the luminance value in the vicinity is not performed unlike the error diffusion method, there is an advantage that a binary image having a clear outline can be obtained.
[0011]
[Problems to be solved by the invention]
  However, in the DBS method, scanning is performed on a pixel-by-pixel basis, and the luminance value is inverted by replacing the luminance value or exchanging the luminance value on a pixel-by-pixel basis. Therefore, a two-dimensional filter is added to the finally obtained binary image. The restored multi-valued image obtained by performing processing has a larger error than the original multi-valued image, and when this binary image is output to an output device, there is a problem that uneven gradation or roughness appears in the output image. It was happening.
[0012]
  In particular, when a printer or the like is used as an output device, dot missing or image blur may occur if the pixels on which dots are formed are not concentrated in a state where they are adjacent to each other. However, there is a need for a binary image in which dots are formed in a concentrated manner. For example, a printer that prints dots on pixels with a luminance value of 0 to form an image will be described as an example. If the luminance value of pixels adjacent in the vertical and horizontal directions with respect to a pixel with a luminance value of 0 is 1, One isolated dot is printed on a pixel with a luminance value of 0 surrounded by a pixel with a luminance value of 1 at the top, bottom, left, and right. When printing such isolated dots, it is necessary to attach a printing paint such as ink or toner to a small area of one pixel. Therefore, there is a problem that the printing paint is difficult to adhere and dot missing may occur. It was happening. In particular, in laser printers, dot omission is likely to occur in the process of attaching toner to the photosensitive drum, which is a serious problem. On the other hand, if pixels having a luminance value of 0 are concentrated in a state of being adjacent to each other, the printing paint is attached to a wide area where the plurality of pixels are connected, and dot missing is unlikely to occur. Also, depending on the printer performance, the printing paper material, and the printing paint material, the dot outline may be blurred due to bleeding of each pixel. The blur of the generated outline is visually recognized as it is, and there is a problem that the image is blurred. On the other hand, if a plurality of pixels having a luminance value of 0 are concentrated so as to be adjacent to each other, dots are formed continuously, so that the dots formed in each pixel partially overlap each other, and the outline of each pixel is blurred. Disappears. For this reason, in the halftoning process, it is required to obtain a binary image in which a plurality of pixels having a luminance value 0 on which dots are formed are arranged in a concentrated manner.
[0013]
  Also, depending on the output device such as a printer, for example, when the luminance value of a pixel adjacent in the vertical and horizontal directions with respect to a pixel having a luminance value of 1 is 0, dots formed by printing or the like corresponding to the luminance value 0 The white portion corresponding to the pixel having the luminance value 1 may be lost. Therefore, it is required to obtain a binary image in which pixels having a luminance value of 1 are also concentrated and arranged adjacent to each other.
[0014]
  In the above description, a dot is formed in a pixel having a luminance value of 0. However, a dot may be formed in a pixel having a luminance value of 1. The pixel in which a dot is formed is determined by the program. Depends on settings. A binary image in which multiple dots tend to be arranged in a concentrated manner is called a dot concentrated binary image, while a binary image in which isolated dots tend to be arranged in a diffused manner is a dot diffusion type binary image. It is called an image.
[0015]
  The present invention has been made in view of the above problems, and a first object thereof is to provide a halftoning processing method and a halftoning processing system capable of obtaining a binary image without unevenness or roughness in gradation. There is to do. A second object is to provide a halftoning processing method and a halftoning processing system capable of obtaining a binary image in which dot missing, image blur, and whiteout portions are unlikely to occur.
[0016]
[Means for Solving the Problems]
  The halftoning processing method of the present invention is a halftoning processing method for converting an original multivalued image in which the luminance of each pixel is expressed in multiple values into a binary image in which the luminance of each pixel is expressed in binary. ,
  A specific step of scanning a binary image having an arbitrary luminance value for each pixel to identify a pixel block composed of two or more pixels;
  When a plurality of combination patterns composed of combinations of luminance represented by binary values are used as luminance value patterns, the luminance value pattern is obtained when the pixel block specified in the specific step is replaced with the luminance value pattern for each luminance value pattern. An error calculating step for calculating an error from the original multi-valued image for the restored multi-valued image obtained by performing the two-dimensional filter processing on the binary image;
  An update step of updating the brightness value of the pixel block in a brightness value pattern in which the error calculated in the error calculation step satisfies a predetermined condition;
  Until the predetermined condition is satisfied, the binary image whose luminance value has been updated in the previous update step is scanned to identify the next pixel block, and the error calculation step using the binary image in which the pixel block is identified And update steps,
  In the error calculation step, in a binary image obtained when the pixel block is replaced with the luminance value pattern, a predetermined value is added to the error when the luminance value arrangement of the pixels does not meet a predetermined arrangement condition. It is characterized by.
[0017]
  The halftoning processing system of the present invention is a halftoning processing system that converts an original multi-valued image in which the luminance of each pixel is expressed in multiple values into a binary image in which the luminance of each pixel is expressed in binary. ,
  A specifying unit that scans a binary image having an arbitrary luminance value for each pixel and specifies a pixel block including two or more pixels;
  When a plurality of combination patterns composed of combinations of luminances represented by binary values are used as luminance value patterns, the luminance value pattern is obtained when the pixel block specified by the specifying unit is replaced with the luminance value pattern for each luminance value pattern. An error calculating means for calculating an error from the original multi-valued image for the restored multi-valued image obtained by performing the two-dimensional filter processing on the binary image,
  An update means for updating the brightness value of the pixel block in a brightness value pattern in which the error calculated by the error calculation means satisfies a predetermined condition;
  Until the predetermined condition is satisfied, the binary image in which the luminance value of the pixel block is updated by the processing by the previous updating unit is scanned to identify the next pixel block, and the binary image in which the pixel block is identified is used. Processing by the error calculating means and the updating means,
  In the binary image obtained when the pixel block is replaced with the luminance value pattern, the error calculation means adds a predetermined value to the error if the luminance value arrangement of the pixels does not meet a predetermined arrangement condition. DoIt is characterized by that.
[0018]
  BookAccording to the invention, for example, when a user performs an operation of outputting an original multi-valued image obtained by photographing with a digital camera to a printer or the like as a binary image, the halftoning processing system performs the following processing. First, the specifying unit specifies a pixel block composed of two or more pixels by scanning a binary image having an arbitrary luminance value for each pixel (specification step). When the pixel block is specified by the specifying unit, the error calculating unit specifies a plurality of combination patterns composed of luminance combinations represented by binary values as the luminance value pattern, and specifies each luminance value pattern by the specifying unit. An error from the original multi-valued image is calculated for the restored multi-valued image obtained by performing a two-dimensional filter process on the binary image obtained when the pixel block is replaced with the luminance value pattern (error calculation) Step). When an error is calculated for each luminance value pattern by the error calculation unit, the update unit updates the luminance value of the pixel block with the luminance value pattern in which the error calculated by the error calculation unit satisfies a predetermined condition. (Update step). Then, for the binary image in which the luminance value of the pixel block is updated by the updating step or the updating unit, the specifying unit performs a specifying step for specifying the next pixel block, and an error calculating step, an updating step for the next pixel block, The setting step will be repeated. Accordingly, since error calculation and luminance value update are performed in units of pixel blocks composed of two or more pixels, the present invention finally compares with the DBS method in which error calculation and luminance value update are performed for each pixel. The obtained binary image has less gradation unevenness and roughness that are not found in the original multi-valued image.
[0019]
  AlsoIn the binary calculation image obtained in the error calculation step or when the error calculation means replaces the pixel block with the luminance value pattern, if the luminance value of the pixel does not meet a predetermined arrangement condition, the error is determined as the predetermined value. Add values. Therefore, the error is large for a binary image in which the luminance value of the pixel does not conform to the predetermined arrangement condition, and the luminance value pattern in which the arrangement of the luminance value conforms to the predetermined arrangement condition in the update step or the update unit. Thus, the pixel block is easily updated.
[0020]
  It is preferable that the arrangement condition includes that one pixel in which dots are formed is adjacent to a predetermined number or more of other pixels in which dots are formed.
[0021]
  It is preferable that the arrangement condition includes that one pixel in which dots are formed is adjacent to a predetermined number or more of other pixels in which dots are formed.
[0022]
  According to this, in the error calculation step or the error calculation means, one pixel (normally a pixel having a luminance value of 0) where dots are formed is arranged adjacent to a predetermined number of other pixels where dots are formed. This is at least an array condition, and if the array condition is not met, a predetermined value is added to the error between the restored multi-valued image and the original multi-valued image. Therefore, when less than a predetermined number of pixels are adjacent to one pixel where dots are formed, for example, when only one pixel where dots are formed is arranged in an isolated state In the error calculation step or error calculation means, a predetermined value is added to the error to increase the error, and in the update step or update means, the binary image is updated with a luminance value pattern that matches the above array pattern. It becomes easy to be done. Therefore, the finally obtained binary image is likely to be a dot-concentrated binary image, and when this binary image is output to a printer or the like, an image with little image blur caused by missing dots or outline blurring of each pixel is output. Is done. In addition, as arrangement conditions, the said conditions should just be included at least, and the said conditions and other conditions may be combined and it may be set as arrangement conditions.
[0023]
  It is preferable that the arrangement condition includes that one pixel in which no dots are formed is adjacent to a predetermined number or more of other pixels in which dots are not formed.
[0024]
  It is preferable that the arrangement condition includes that one pixel in which no dots are formed is adjacent to a predetermined number or more of other pixels in which dots are not formed.
[0025]
  According to this, in the error calculation step or when the error calculation means has a predetermined number of other pixels in which dots are not formed in one pixel (normally a pixel having a luminance value of 1) in which the dots are not formed in the arrangement condition. Arrangement adjacently is included as at least an arrangement condition, and if this arrangement condition is not met, a predetermined value is added to the error between the restored multivalued image and the original multivalued image. When the above arrangement conditions are not met, for example, when only one pixel in which dots are not formed is arranged in an isolated state, a predetermined value is added to the error in the error calculation step or error calculation means, and the error increases. In the updating step or the updating means, the pixel block is easily updated with a luminance value pattern that will ensure that the array of luminance values of the binary image meets a predetermined condition. Therefore, when the finally obtained binary image is output to an output device such as a printer, it is difficult to cause a problem that a white portion corresponding to a pixel in which dots are not formed is lost due to bleeding such as printing paint. An image with few missing parts is output. In addition, as arrangement conditions, the said conditions should just be included at least, and the said conditions and other conditions may be combined and it may be set as arrangement conditions.
[0026]
  In the specifying step, the range (shape) of the specific block is preferably changed at least once.
[0027]
  It is preferable that the specifying unit changes the range (shape) of the specific block at least once.
[0028]
  According to this, in the specifying step or the specifying means, the pixel block is deformed and specified at least once by changing the number or arrangement of pixels constituting the pixel block, and the error calculating means or the error calculating means Then, an error from the original multi-valued image is calculated for the restored multi-valued image obtained by performing two-dimensional filtering on the binary image obtained when the deformed pixel block is replaced with the luminance value pattern. Therefore, a binary image different from the case where the pixel block range (shape) is fixed is obtained, and it is possible to cope with a case where the error is further reduced by changing the pixel block range (shape). Become.
[0029]
  In the error calculating step, the difference between the luminance values is calculated for each pixel corresponding to each other in the restored multi-valued image and the original multi-valued image, and the sum of the calculated luminance value differences is calculated. An error from the image is preferable.
[0030]
  The error calculation means calculates a difference in luminance value for each pixel corresponding to each other in the restored multi-valued image and the original multi-valued image, and calculates the sum of the calculated luminance value differences as the restored multi-valued image and the original multi-valued value. An error from the image is preferable.
[0031]
  According to this, the error calculation step or the error calculation means calculates the difference in luminance value for each corresponding pixel for the restored multi-valued image and the original multi-valued image, and summed the calculated difference in luminance value Is an error between the restored multi-valued image and the original multi-valued image. Examples of pixels corresponding to each other in the restored multi-valued image and the original multi-valued image include pixels at the same coordinates in both multi-valued images.
[0032]
  The predetermined condition in the update step is preferably a condition that the error is the smallest error among the errors calculated for each luminance value pattern in the error calculation step.
[0033]
  The predetermined condition in the updating means is preferably a condition that the error is the smallest error among the errors calculated for each luminance value pattern by the error calculating means.
[0034]
  According to this, in the updating step or the updating means, the luminance value of the pixel block is updated with the luminance value pattern that minimizes the error between the original multi-valued image and the restored multi-valued image among the plurality of luminance value patterns. By setting such a condition, the finally obtained binary image has less gradation unevenness and roughness which are not found in the original multi-valued image, and is more approximate to the original multi-valued image.
[0035]
[0036]
[0037]
DETAILED DESCRIPTION OF THE INVENTION
  Hereinafter, the halftoning processing system and the halftoning processing method of the present invention will be described in detail.
[0038]
(First embodiment)
  FIG. 1 is a diagram showing a computer system Sys1 that realizes the halftoning processing system Sys1 of the present embodiment, and an input device 5 and an output device 6 connected thereto. The halftoning processing system Sys1 of the present embodiment is realized by a computer system Sys1 such as a personal computer. The computer system Sys1 includes a central processing unit 1, a storage means 2 such as a memory, an input / output interface 3, and the like. It is composed of an internal bus 4 for connecting the two. A server or the like is connected to the input / output interface 3 of the computer system Sys1 via an input device 5, an output device 6, and a network NET. The input device 5 is a memory card, a digital camera, a scanner, a hard disk, or the like that inputs image data to the computer system Sys1. The output device 6 is a printer, a display, or the like that outputs image data from the computer system Sys1 as an image. The computer system Sys1 is a general-purpose computer system that not only functions as the halftoning processing system Sys1 of the present embodiment in the halftoning process, but also stores the image input from the input device 5 and the halftone. It also functions as a system for performing pre-processing (enlargement / reduction processing, CMYK processing, etc.) performed before the conversion processing, and other processing such as outputting an image to an output device.
[0039]
  The halftoning processing system Sys1 is a system that converts an original multi-valued image in which the luminance of each pixel is represented by a multi-value into a binary image in which the luminance of each pixel is represented by a binary value. It comprises an error calculation means s3 and an update means s4, and further comprises an initial binary image generation means s1 and a halftoning process end condition determination means s5. The storage unit 2 stores a program, and the central processing unit 1 executes the program, thereby causing the computer system Sys1 to function as a halftone processing system Sys1 including the units s1 to s5.
[0040]
  In the present embodiment, a case where the user inputs the original multi-valued image Ga from the input device 5 to the computer system Sys1 and outputs it to the output device 6 such as a printer will be described as an example. FIG. 2 is a schematic flowchart showing a series of operations from the input of the original multivalued image Ga to the output of the binary image Gb of the computer system Sys1. The computer system Sys1 functions as the halftoning processing system Sys1 in the step of performing halftoning processing (Step 3) in the series of operations.
[0041]
  The user first inputs the original multi-valued image Ga from the input device 5 to the computer system Sys1. The original multi-valued image Ga is, for example, an image taken with a digital camera, an image published to a server connected via a network, an image read with a scanner, or the like. A plurality of pixels having the brightness represented by In the present embodiment, the original multi-valued image Ga (see FIG. 8) in which 25 pixels are arranged in 5 rows and 5 columns will be described as an example, but the present invention is not limited to this. The computer system Sys1 stores the input original multivalued image Ga in the storage means (memory etc.) 2 via the input / output interface 3 and the internal bus 4 (Step 1).
[0042]
  Next, the user inputs an output request for the original multivalued image Ga to the computer system Sys1. For example, a print command window is displayed on the display, and after specifying the paper size, number of copies, etc., an output request is made to the printer by clicking the “OK” button that requests the start of printing with the mouse, By clicking an icon indicating the multi-valued image Ga, an output request is made to display on the display.
[0043]
  When the computer system Sys1 detects an output request from the user, the computer system Sys1 performs necessary preprocessing before the halftoning process on the original multi-valued image Ga stored in the storage unit 2 (Step 2). As the preprocessing, for example, when the input original multi-valued image Ga is encoded, a decoding process that performs decoding, an RGB process that converts the original multi-valued image Ga into RGB color system image data, There are an enlargement / reduction process for enlarging or reducing the RGB-converted original multivalued image Ga to a predetermined magnification, a CMYK color conversion process for converting the RGB multicolored original multivalued image Ga to the CMYK color system, and the like.
[0044]
  When the preprocessing is completed, the computer system Sys1 functions as a halftoning processing system Sys1 by a program stored in the storage unit 2 (Step 3). The halftoning processing system Sys1 performs halftoning processing on the original multi-valued image Ga stored in the memory 2 (Step 3). As shown in FIG. 5, the halftoning process is performed by scanning a binary image Gb (details will be described later) with a scanning window W (details will be described later) in a raster scan order, and a pixel block specified by the scanning window W. This is done by updating the luminance value of each pixel of Bn (details will be described later). Specifically, in the halftoning process, the following steps s1, s2, s3, s4, and s5 included in the halftone processing system Sys1 sequentially execute the steps (Step 11 to Step 15) corresponding to the respective units. Done in the way. FIG. 3A is a schematic flowchart showing an extracted operation of the halftoning processing system Sys1 in the halftoning processing step (step 3).
[0045]
(Initial binary image generation step: Step 11)
  The halftoning processing system Sys1 generates a binary image Gb in which an initial value of 0 or 1 is set as the luminance value of each pixel by the initial binary image generating unit s1 (FIG. 4), and this binary image Gb is generated. Store in the storage means 2. The arrangement of the pixels of the binary image Gb is the same 5 rows and 5 columns as the original multi-valued image Ga. As a method for setting the initial value of the luminance, there is a method of setting the luminance value of all the pixels to 0 or 1. In addition, a method of setting a luminance value to 1 with a certain probability using a random number for each pixel, or a probability depending on the luminance value for each pixel of the original multivalued image Ga using a random number, There is a method in which the luminance value of a pixel at the same coordinate of the value image Gb is set to 1. For example, when the luminance value of one pixel constituting the original multi-valued image Ga is X, the luminance value of a pixel at the same coordinate in the binary image Gb is set to 1 with probability X, and 0 with probability (1-X). And If these methods using random numbers are used, it becomes difficult for a periodic and annoying pattern to be generated in the binary image Gb output to the output device 6 after the halftoning process. As the initial binary image Gb, a binary image Gb having an arbitrary luminance value for each pixel may be stored in the storage unit 2 in advance, and in this case, the initial binary image Gb is an initial binary image generation unit s1. The processing in this step (Step 11) is not necessary.
[0046]
(Specific step: Step 12)
  Next, the halftoning processing system Sys1 specifies one pixel block B by scanning the binary image Gb by the scanning window W in units of pixel blocks B by the specifying unit s2. FIGS. 5A and 5B are explanatory diagrams thereof.
[0047]
  The pixel block B is a block composed of two or more pixels among a plurality of pixels constituting the binary image Gb. In the present embodiment, the pixel block B is an aggregate of square pixels composed of four pixels in two rows and two columns, and there are 16 pixel blocks from the pixel block B1 to the pixel block B16. The arrangement, the number of pixels, and the shape of the pixel block B are not limited to this, and may be a pixel block B having another shape including a plurality of the following or more pixels.
[0048]
  The scanning window W is a window for specifying the pixel block B while scanning the binary image Gb. In the present embodiment, the binary image Gb is scanned in the raster scan order while moving the scanning window W by one pixel in the column direction (arrow direction in FIG. 5A) for each pixel, and the pixels from the pixel block B1 are scanned. Block B16 is identified sequentially. The scanning window W may be moved in the row direction or randomly moved for scanning, and the scanning order is not limited. Hereinafter, one pixel block specified by the scanning window W in the specifying step (Step 12) will be described as a pixel block Bn (in the present embodiment, n is any value from 1 to 16).
[0049]
(Error calculation step: Step 13)
  Next, the halftoning processing system Sys1 is obtained when the pixel block Bn specified by the specifying unit s2 is replaced with the luminance value pattern P for each of the plurality of luminance value patterns P by the error calculating unit s3. An error E with respect to the original multi-valued image Ga is calculated for the restored multi-valued multi-image Gr obtained by performing the two-dimensional filter processing on the binary image Gb. Details will be described below.
[0050]
  As shown in FIG. 6A, the luminance value pattern P is a luminance value combination pattern composed of luminance combinations represented by binary values, and the luminance values are arranged so as to correspond to the respective pixels of the pixel block Bn. Has been configured. In the present embodiment, each luminance value pattern P is composed of a two-dimensional matrix in which four luminances in 2 rows and 2 columns are arranged, and 16 types of luminance value patterns P1 to P16 from all combinations of the luminances. Is used. The luminance value pattern P may be stored in the storage unit 2 by being described in a program in advance, or may be generated for each process of the error calculation step (Step 13). Further, as the luminance value pattern P, all combinations may be used as the luminance value pattern P as in the present embodiment, or only some combinations among them may be used as the luminance value pattern P. Also good. FIG. 3B is a schematic flowchart showing an extracted operation of the halftoning processing system Sys1 in the error calculation step (Step 13). The error calculation means s3 performs the following steps for each luminance value pattern P1 to P16 (replacement step Step 13-1, two-dimensional filter processing step Step 13-2, calculation step Step 13-3, error calculation end condition determination step Step 13-4). I do.
[0051]
(Replacement step: Step 13-1)
  The error calculation unit s3 replaces the pixel block Bn specified in the specifying step (Step 12) with one luminance value pattern Px among the luminance value patterns P1 to P16 (see FIG. 6B). In the present embodiment, first, the luminance value pattern P1 is replaced (see FIG. 6 (b) Gb11).
[0052]
(Two-dimensional filter processing step: Step 13-2)
  Next, the error calculation means s3 performs a two-dimensional filter process on the binary image Gb in which the luminance value of the pixel block Bn is replaced with the single luminance value pattern Px in the replacement step (Step 13-1), and the restored multi-value image Gr is generated (FIG. 7). In the two-dimensional filter processing, in consideration of human visual characteristics when the binary image Gb is viewed, the luminance value of each pixel of the binary image Gn is increased or decreased to simulate an image reflected on the human retina. Is a process for generating a restored multi-valued image Gr reproduced in the above, and is called blurring or smoothing. For example, in the present embodiment, when a human views the binary image Gb, the luminance of the adjacent pixel for each pixel is considered in consideration of the visual characteristics recognized in a state where the adjacent pixels influence each other. The luminance value is increased or decreased depending on the value to generate the restored multi-valued image Gr. The two-dimensional filter F is a two-dimensional matrix of k rows and l columns based on a two-dimensional Gaussian distribution, and is composed of values w (k, l) arranged in k rows and l columns. As the two-dimensional filter F, a weighted average filter that can smooth the image while reducing the outline blur of the image is preferable. The weighted average filter is a filter that averages with different weights depending on the position of the pixel, and there are various types such as one that has a large value at the center and gradually decreases toward the surrounding pixels. What kind of weight average filter is used may be appropriately selected. The two-dimensional filter F of the present embodiment is a weighted average filter F using a three-row, three-column two-dimensional matrix, but may have a larger or smaller size or other shapes.
[0053]
  Specifically, the luminance value of the coordinates (i, j) of the binary image Gb is b (i, j), and k rows and l columns of a two-dimensional matrix for two-dimensional filter processing (that is, the two-dimensional filter F). If the value is w (k, l) and the luminance value of the coordinate (i, j) of the restored multi-valued image Gr obtained by performing the two-dimensional filter processing on the binary image Gb is represented by r (i, j), an error will occur. The calculation means s3 calculates the luminance value r (i, j) of the coordinates (i, j) of the restored multi-valued image Gr using the following formula 1.
[0054]
Figure 0004108517
[0055]
  By determining that the sum of all the elements of the two-dimensional matrix (that is, the two-dimensional filter F) for the two-dimensional filter processing is 1, each luminance value r (i, j) Become.
[0056]
  In Equation 1, the luminance value b (i + k, j + l) can be outside the range of the binary image Gb having a size of 5 × 5. For example, in order to calculate the value of r (1,1), the value of b (0,0) is required in Equation 1. Therefore, the luminance value b (i + k, j + l) of the pixel outside the range can be arbitrarily determined and Equation 1 can be evaluated. For example, the luminance value of a pixel outside the range can be set to the luminance value of the pixel closest to the Euclidean distance within the range. In the above example, the luminance value b (0, 0) can be set to the luminance value b (1, 1) of the pixel closest to the Euclidean distance in the range.
[0057]
  Formula 1 for obtaining the luminance value r (i, j) of the restored image by the two-dimensional filter F is an example, and r (i, j) is the luminance of the binary image position (i, j) and its neighboring pixels. It can be arbitrarily determined depending on the value. For example, the following formula 2 can be obtained by using an arbitrary function g having as arguments the position (i, j) and the luminance values of pixels adjacent to the top, bottom, left, and right.
[0058]
Figure 0004108517
[0059]
(Calculation step: Step 13-3)
  Next, the error calculation means s3 calculates an error E between the restored multi-valued image Gr and the original multi-valued image Ga generated in the two-dimensional filter processing step (Step 13-2). For example, as shown in FIG. 8, the luminance value difference e is calculated for each pixel corresponding to each other in the original multi-valued image Ga and the restored multi-valued image Gr, and the total value of the calculated luminance value differences e is calculated. An error E between the multi-valued image Ga and the restored multi-valued image Gr is assumed. If the luminance value of the coordinate (i, j) of the original multi-valued image Ga is a (i, j), the difference in luminance value e at the same coordinate (i, j) of the original multi-valued image Ga and the restored multi-valued image Gr. (I, j) is calculated by the following equation.
e (i, j) = | a (i, j) −r (i, j) | (Formula 3)
The error calculation means s3 calculates an error E between the restored multi-valued image Gr and the original multi-valued image Ga using the following Equation 4.
[0060]
Figure 0004108517
[0061]
  Since the error between the restored multi-valued image Gr, which is an image recognized when the binary image Gb is viewed, and the original multi-valued image Ga is calculated by Equation 4, the binary image Gb, the original multi-valued image, Compared with the case of calculating the error, the calculated error is close to the error when actually viewed.
[0062]
  Here, the mathematical formula for calculating the error E is not limited to the above, and can be changed without departing from the gist of the error. For example, the error calculation means s3 can also calculate the error E by the following formula 5 using an arbitrary increase function f.
[0063]
Figure 0004108517
[0064]
For example, the square function f (x) = x as the increasing function f2Then, Equation 6 is obtained.
[0065]
Figure 0004108517
[0066]
(Error calculation end condition judgment step: Step 13-4)
  When the calculation step (Step 13-3) ends, the error calculation means s3 sets the error E for all the luminance value patterns P1 to P16 as an error calculation end condition, and when the end condition is not satisfied, Returning to the replacement step (Step 13-1) again, for each remaining luminance value pattern P, the replacement step (Step 13-1), the two-dimensional filter processing step (Step 13-2), the calculation step (Step 13-3), and the error calculation end A condition determination step (Step 13-4) is performed. The error E is calculated for all the luminance value patterns P1 to P16, and if the end condition is satisfied, the process proceeds to the update step (Step 14). In this way, the above steps (Step 13-1 to Step 13-4) are repeated for each of the luminance value patterns P1 to P16, and the error E is calculated for each of the luminance value patterns P1 to P16.
[0067]
  Regarding the calculation step (Step 13-3), the error E does not have to be calculated for the entire region of all 25 pixels faithfully according to Equation 4, Equation 5, and Equation 6, and the replacement step (Step 13). It is also possible to calculate only the range in which the luminance value of the restored multi-valued image Gr is affected by the replacement of the luminance value of the pixel block Bn in -1). For example, as shown in FIG. 9, in the replacement step (Step 13-1), the luminance value of a pixel block B6 composed of four pixels at coordinates (2, 2) (2, 3) (3, 2) (3, 3) Is replaced with each of the luminance value patterns P1 to P16, in the two-dimensional filter processing step (Step 13-2), inside the coordinates (1, 1) (1, 4) (4, 1) (4, 4). Although the luminance value of an area consisting of a certain 16 pixels changes under the influence, the luminance value of other coordinates is constant, so that the error E may be calculated only for the area consisting of the 16 pixels. As a result, the processing amount can be reduced and the processing time can be shortened as compared with the case where the error E is calculated for the region composed of all pixels. In this case, in the two-dimensional filter processing step (Step 13-2), it is possible to further reduce the processing amount and the processing time by performing the two-dimensional filter processing only for the range affected by the influence.
[0068]
  In addition, with respect to the error calculation step (Step 13), the error calculation step (Step 13) is not performed for all the luminance value patterns P1 to P16, and the error calculation step (Step 13) is performed only for a part of the luminance value patterns P. Step 13) may be performed. For example, when all the pixels of the original multi-valued image Ga corresponding to the pixel block Bn have the luminance value 1, the original pixel value is replaced by replacing the pixel block Bn with the luminance value pattern P1 in which all the pixels have the luminance value 0. The multi-value image Ga is hardly reproduced well. Conversely, when the luminance values of the pixels of the original multi-value image Ga corresponding to the pixel block Bn are all the luminance values 0, all the pixels are Since the original multi-value image Ga is hardly reproduced satisfactorily by replacing the pixel block Bn with the luminance value pattern P16 having the luminance value 1, an error calculating step (Step 13) is performed for the luminance value patterns P1 and P16. Is omitted. For example, when the luminance values a (2, 2), a (2, 3), a (3, 2), and a (3, 3) of four pixels in the original multi-valued image Ga are all luminance values 1, The luminance values b (2, 2), b (2, 3), b (3, 2), b (3, 3) of the four pixels of the pixel block B6 in the binary image Gb are replaced with the luminance value pattern P1. However, since the original multi-valued image Ga is hardly reproduced well, the error calculation step (Step 13) is omitted for such a luminance value pattern P1. Thereby, compared with the case where an error calculation step (Step13) is performed about all the luminance value patterns P1-P16, processing amount can be reduced and processing time can be shortened.
[0069]
(Update step: Step14)
  Next, in the halftoning processing system Sys1, the error E calculated in the error calculation step (Step 13) is specified by the update means s4 as one luminance value pattern P that satisfies the predetermined condition, and is specified in the specifying step (Step 12). The luminance value of the pixel block Bn is updated. As a predetermined condition for the error E, it is preferable that the error E is the smallest error E among the errors E calculated for each of the luminance value patterns P1 to P16 in the error calculation step (Step 13). With this condition, the pixel block Bn is updated with the luminance value pattern P that minimizes the error E. Therefore, each time the update step (Step 14) is performed, the binary image Gb approximates the original multivalued image Ga. To go. The binary image Gb finally obtained by the halftoning process is an image approximate to the original multi-valued image Ga with little gradation unevenness and roughness not found in the original multi-valued image Ga.
[0070]
  Another predetermined condition for the error E may be that the error E is not more than a predetermined value. As the predetermined value, in a binary image (that is, a binary image output to an output device such as a printer) Gb finally obtained by halftoning processing, gradation unevenness and roughness that are not in the original multi-valued image Ga. It is preferable to make it a value small enough that it is difficult to be visually recognized. On condition that the error E is the minimum, the error calculation means s3 needs to perform the error calculation step (Step 13) for all the luminance value patterns P1 to P16, but the error E is less than a predetermined value. By setting the condition, the error calculation step (Step 13) is completed when the error E that is equal to or less than the predetermined value is calculated, so that it is possible to reduce the processing amount and the processing time.
[0071]
(Halftone processing end condition judging step: Step 15)
  Next, the halftoning processing system Sys1 determines whether or not an end condition for ending the halftoning process is satisfied by the halftone processing end condition determining means s5, and the end condition is satisfied. If not, the process returns to the specific step (Step 12). If the end condition is satisfied, the halftoning process step (Step 3) is ended and the process proceeds to the next output step (Step 4). Here, the condition for ending the halftoning process is that “the update step (Step 14) has been performed for all pixel blocks B of the binary image Gb”. For example, in this embodiment in which scanning is performed in the raster scan order from the first pixel block B1 to the last pixel block B16 composed of pixels of coordinates (1, 1) (2, 1) (1, 2) (2, 2), If the update step (Step 14) has been completed for the last pixel block B16 composed of the pixels at coordinates (4, 4) (4, 5) (5, 4) (5, 5), the halftoning process is terminated. This is the end condition. In the case of this condition, the halftoning process is completed when the update step (Step 14) is performed for the binary image Gb as a whole (for example, when scanning in the raster scan order, from pixel block B1 to pixel block B16). The process proceeds to the next output step (Step 4). On the other hand, when the update step (Step 14) is performed only up to the middle pixel block Bn, the process returns to the specifying step (Step 12). As shown in FIG. 5, in the next specific step (Step 12), scanning is performed on the binary image Gb in which the luminance value of the pixel block Bn is updated, and the scanning window W is moved by one pixel to move to the next. Pixel block B (n + 1) is specified. Thereafter, the process after the error calculation step (Step 13) is performed for the identified pixel block B (n + 1).
[0072]
  Further, as another end condition, “the error E between the restored multilevel image Gr of the binary image Gb obtained in the update step (Step 14) and the original multilevel image Ga may be equal to or less than a predetermined value”. . In the case of this condition, the error E between the restored multi-valued image Gr and the original multi-valued image Ga of the binary image Gb is equal to or less than a predetermined value at the time when the update step (Step 14) is completed for the pixel block Bn. Advances to the output step (Step 4), and if larger than the predetermined value, returns to the specifying step (Step 12) again to specify the next pixel block B (n + 1). Further, as another condition, “the update step (Step 14) has been performed for all the pixel blocks B1 to B16 of the binary image Gb” and “the restored multi-value image of the binary image Gb obtained in the update step” Both of “the error E between Gr and the original multi-valued image Ga being equal to or less than a predetermined value” may be set as the end condition. In the case of this condition, the update step (Step 14) is completed for the last pixel block B16, and the restored multi-value image Gr and the original multi-value image Ga of the binary image Gb obtained in the update step (Step 14) If the error E is less than or equal to the predetermined value, the process proceeds to the output step (Step 4). On the other hand, if the error E is not less than or equal to the predetermined value at the time when the update step (Step 14) is completed for the last pixel block B16, the process returns to the specific step (Step 12), and the scan window W is added to the first pixel block B1 that has started scanning. This pixel block B1 is specified by moving and the above steps (Step 11 to Step 15) are performed again from the first pixel block B1. Furthermore, as another condition, “the updating step (Step 14) has been executed a predetermined number of times” may be set as an end condition. In this case, for example, each of the above steps (Step 11) is repeated for the pixel blocks B1 to B16. Step 15) is performed, and the processing amount and processing time can be controlled to some extent by increasing or decreasing the specified number of times. As another condition, “the binary image Gb whose luminance value is updated for the image block Bn and the binary image Gb whose luminance value is updated for the pixel block B (n−1) executed immediately before the same are the same. The above-mentioned steps (Step 11 to Step 15) are repeatedly performed until the error E does not change even if the luminance value of the pixel block Bn is updated. In this case, the above steps (Step 11 to Step 15) are repeated. A binary image Gb approximated to the multi-valued image Ga can be obtained.
[0073]
(Output step: Step 4)
  When the halftoning processing step (Step 3) is completed by the halftoning processing system Sys1, the computer system Sys1 sends the binary image Gb to the output device 6 such as a printer or a display via the internal bus 4 and the input / output interface 3. Is output. The binary image Gb may be output to a remote printer or display via a network. For example, when the computer system Sys1 outputs the binary image Gb to the printer, the printer forms dots by applying printing paint such as toner to the pixels having the luminance value 0 of the binary image Gb input from the computer system Sys1. Then, the binary image Gb is printed. For example, when the binary image Gb is output to the liquid crystal display, the liquid crystal display is configured to block the light from the backlight for the pixels with the luminance value 0 and to transmit the light for the pixels with the luminance value 1 to the second state. The value image Gb is output as a visible image. The binary image Gb output by the output device 6 has less gradation unevenness and roughness that are not present in the original multi-valued image Ga, and reproduces the original multi-valued image Ga in a closer state when viewed.
[0074]
  Here, in the specifying step (Step 12), the specifying unit s2 may change the range (shape) of the scanning window W to change the range (shape) of the specified pixel block B. The range (shape) of the pixel block B may be changed at least once. The shape of the scanning window W is set to one shape (for example, 2 rows and 3 columns) in the even-numbered specific step, and another shape (for example, the number of times) (3 rows and 2 columns), the range (shape) of the pixel block B may be different between the odd number and the even number. Further, in the case where the scan from the first pixel block B1 to the last pixel block B16 is repeated a plurality of times for the binary image Gb, the pixel block B is set within one range (for example, 2 rows and 3 columns) for the odd number of scans. ) And the pixel block B may be in another range (for example, 3 rows and 2 columns) for even-numbered scanning. Further, the pixel block B may be changed to another range (shape) by changing the number of pixels constituting the pixel block B. The storage means 2 stores a luminance value pattern P corresponding to each shape of the pixel block B, and in the error calculation step (Step 13), the pixel is used with the luminance value pattern P corresponding to the shape of the pixel block B. Block B is replaced. When the range (shape) of the scanning window W and the pixel block B is changed and the luminance value of the pixel block B whose range (shape) is changed in the error calculation step is replaced, the range (shape) of the scanning window W and the pixel block B This is because a binary image that is different from the case where the value is constant may be obtained, and a binary image with less gradation unevenness and roughness may be obtained.
[0075]
(Example of the first embodiment)
  As an example of the first embodiment, the operation of the halftoning processing system Sys1 will be described by limiting only to the halftoning processing step (Step 3).
[0076]
  The halftoning processing system Sys1 generates a binary image Gb by the initial binary image generation unit s1 (see an initial binary image generation step (Step 11), see FIG. 4), and the binary image Gb by the specifying unit s2. The first pixel block B1 is specified by scanning (specifying step (Step 12), see FIG. 5 (b) Gb1). Next, the halftoning processing system Sys1 calculates the error E by the error calculation means s3 (error calculation step (Step 13)). The error calculation step (Step 13) will be described in detail. First, the pixel block B1 of the binary image Gb is replaced with the luminance value pattern P1 (see the replacement step (Step 13-1), FIG. 6 (b) Gb11). A two-dimensional filter process is performed on the image Gb to generate a restored multi-valued image Gr (two-dimensional filter processing step (Step 13-2)), and an error E between the restored multi-valued image Gr and the original multi-valued image Ga is calculated. (Calculation step (Step 13-3)). Next, the halftoning processing system Sys1 determines whether the error E has been calculated for all the luminance value patterns P (error calculation end condition determination step (Step 13-4)). At this time, since the error E has only been calculated for the luminance value pattern P1, the process returns to the replacement step (Step 13-1) again, and for the next luminance value pattern P2, the replacement step (see FIG. 6 (b) Gb12), two-dimensional A filter processing step, a calculation step, and an error calculation end condition determination step are performed. Similarly, the halftoning processing system Sys1 performs the processing of each of the above steps (Step 13-1 to Step 13-4) from the luminance value patterns P3 to P16, and the luminance value pattern P16 in the error calculation end condition determining step (Step 13-4). Then, it is determined that the error E has been calculated for all the luminance value patterns P1 to P16, and the process proceeds to the update step (Step 14). The halftoning processing system Sys1 uses the updating means s4 to obtain one luminance value pattern that minimizes the error E among the errors E calculated for each of the luminance value patterns P1 to P16 in the error calculation step (Step 13). The luminance value of the pixel block B1 of the binary image Gb is updated with P (update step (Step 14)). Next, the halftoning processing system Sys1 determines whether or not the end condition “the pixel block B updated in the updating step is the last pixel block B16” is satisfied by the halftone processing end condition determining unit s5 ( Halftoning process end condition determination step: Step 15). Since the specified pixel block B is the first pixel block B1 at the present time, the process returns to the specifying step (Step 12) again. In the next specific step (Step 12), the halftone processing system Sys1 specifies the next pixel block B2 by scanning the binary image Gb in which the luminance value is updated for the pixel block B1 (FIG. 5B). ) (See Gb2), the same processing as in the case of the pixel block B1 is performed. Thereafter, the halftoning processing system Sys1 performs the same processing from the pixel blocks B3 to B16. Then, after the pixel block B16 is updated in the update step (Step 14), it is determined that the end condition is satisfied in the halftoning process end condition determination step (Step 15), and the process proceeds to the output step (Step 4). In the output step (Step 4), the binary image Gb is output to the output device 6 such as a printer.
[0077]
  As the halftoning process end condition, “the update step (Step 14) has been performed for all the pixel blocks B of the binary image Gb” and “the restored multi-value image of the binary image Gb obtained in the update step” If the condition is that the error E between Gr and the original multi-valued image Ga is equal to or less than a predetermined value, the halftoning processing system Sys1 uses the pixel block Bn updated in the updating step (Step 14) as the last pixel. Even in the case of the block B16, if “the error E between the restored multilevel image Gr of the binary image Gb in which the luminance value of the pixel block B16 has been updated and the original multilevel image Ga is equal to or less than a predetermined value” is not satisfied. Then, it is determined that the end condition is not satisfied, and the process returns to the specific step (Step 12) again. In the next specific step (Step 12), the halftoning processing system Sys1 specifies the first pixel block B1 by scanning the binary image Gb in which the luminance value of the pixel block B16 is updated, and repeats the same processing.
[0078]
(Second Embodiment)
  The present embodiment is substantially the same as the first embodiment, but differs only in the error calculation step (Step 13), particularly in the calculation step (Step 13-3) of the error calculation step (Step 13).
[0079]
(Calculation step: Step 13-3)
  In the calculation step (Step 13-3) in the error calculation step (Step 13) of the present embodiment, the binary image Gb obtained when the pixel block Bn is replaced with one luminance value pattern P in the replacement step (Step 13-1). For the binary image Gb obtained in the replacement step (hereinafter referred to as “binary image Gb”), the predetermined value d is added to the error E when the luminance value arrangement does not meet the predetermined arrangement condition. In this embodiment, the arrangement condition (hereinafter referred to as arrangement condition 1) is that one or more other pixels in which dots are formed are arranged adjacent to one pixel in which dots are formed.
[0080]
  In the present embodiment, by determining whether or not the luminance value of each pixel of the binary image Gb in the replacement step (Step 13-1) matches the array pattern AP stored in the storage unit 2 in advance, It is determined whether or not the array condition 1 is met. Specifically, if a pattern in which luminance expressed by binary values is arranged is an arrangement pattern AP, a plurality of types of arrangement patterns AP having different luminance values are stored in the storage unit 2 of the halftoning processing system Sys2. Yes. As the array pattern AP, as shown in FIG. 10A, when the luminance value of a pixel at coordinates (i, j) (a pixel surrounded by a thick line in FIG. 10A, hereinafter referred to as a target pixel) is 0. In addition, a pixel adjacent to the target pixel at the coordinate (i, j), either up, down, left, or right, that is, a pixel of (i-1, j), a pixel of (i, j-1), or (i + 1) , J) or four array patterns APa1 to APa4 in which any one of the pixels (i, j + 1) has a luminance value 0 is stored. Then, when the halftoning processing system Sys2 calculates the luminance difference e in the pixel at the same coordinate (i, j) of the original multi-valued image Ga and the restored multi-valued image Gr, the replacement step (Step 13-1). If the pixel of the same coordinate (i, j) of the obtained binary image Gb is a pixel of interest, it is determined whether the pixel of interest matches any of the arrangement patterns APa1 to APa4 when the pixel of interest has a luminance value of 0. When the pixel at the same coordinate (i, j) of the binary image Gb is used as the pixel of interest, the luminance value difference e (i, j) is expressed by the above Equation 3 if it matches any of the array patterns AP1 to AP4. Calculate with If none of the array patterns AP1 to AP4 is suitable, a value obtained by adding a predetermined value d to the luminance value difference e (i, j) calculated by Equation 3 above is used as the luminance at the coordinates (i, j). The value difference e (i, j) is assumed. Specifically, it is calculated by the following formula 7.
e (i, j) = | a (i, j) −r (i, j) | + d (Expression 7)
The error E is calculated by Equation 4, Equation 5, and Equation 6 as in the first embodiment. Thus, the predetermined value d is added to the error E according to the number of pixels that do not conform to the arrangement condition 1, and the error E increases as the number of pixels that do not conform to the arrangement condition 1 increases. In the present embodiment, an array condition 0 is that the pixel of interest has a luminance value of 1, and an array pattern AP0 in which the pixel of interest at coordinates (i, j) has a luminance value of 1 is also stored as one of the array patterns AP. Has been. When the pixel of interest has a luminance value of 1, it is calculated by Equation 3, and the predetermined value d is not added to the error e (i, j). This is because dots are not formed in the luminance value 1, and problems such as missing dots and blurred dot outlines do not occur in the first place.
[0081]
  The update step (Step 14) is the same as in the first embodiment, but there are few pixels that satisfy the array condition 1, and the binary image Gb has an isolated array of pixels with a brightness value of 0 (that is, the brightness value). In the luminance value pattern P (in which the luminance value of all the pixels adjacent to the 0 pixel is 1), the pixel block Bn is difficult to be updated. On the other hand, in the luminance value pattern P in which there are many pixels that satisfy the arrangement condition 1, and in the binary image Gb, there is an arrangement in which at least one other pixel with the luminance value 0 is adjacent to one pixel with the luminance value 0. The block Bn is easily updated. Therefore, the binary image Gb generated by the update step (Step 14) is a dot-concentrated binary image in which the luminance value 0 tends to be arranged in a concentrated manner.
[0082]
  The output step (Step 4) is the same as that in the first embodiment. Since the output binary image Gb is a dot-concentrated binary image, problems of missing dots and image blur are less likely to occur. That is, in the binary image Gb, when only one pixel with a luminance value of 0 on which dots are formed is isolated, the area of one pixel on which dots are formed is too small, and thus printing paint such as toner adheres. It is difficult to do so and the problem of missing dots is likely to occur. Also, depending on the printer, the paint printed on the dots of each pixel may be blurred, or the outline of the dots of each pixel may be blurred depending on the display. The blurred outline is visually recognized as the blurred image. On the other hand, in the binary image Gb, which is a dot-concentrated binary image, pixels with a brightness value of 0 where dots are formed are concentrated, so that the pixels where dots are formed are in a continuous state. The area becomes large, and it becomes easy for the printing paint to adhere. In addition, when dots are formed on pixels with a luminance value of 0 in a concentrated arrangement, the formed dots are connected and the outline blur of each dot is less noticeable, so image blur is suppressed.
[0083]
  Note that the arrangement conditions of the present embodiment are not limited to the above conditions. For example, when printing paint such as toner is difficult to adhere in an area where two pixels having a luminance value of 0 are adjacent to each other due to the performance of the printer or the like. Depending on the degree, the number of pixels with luminance value 0 adjacent to the target pixel of the array pattern AP may be increased or decreased. For example, assuming that one pixel in which dots are formed is arranged with two or more other pixels in which dots are formed adjacently arranged as an array condition 2, the array pattern AP is set to a target pixel having a brightness value of 0 as a brightness value. Arrangement patterns APb1 to APb4 (FIG. 10B) and arrangement patterns APc1 to APc8 (FIG. 10C) in which two other pixels that are 0 are adjacent to each other may be used, and dots are formed. Assuming that three or more other pixels in which dots are formed are arranged adjacent to one pixel, the array pattern AP is the target pixel having the luminance value 0 and the other pixels having the luminance value 0 are arranged. Three adjacent arrangement patterns APd1 to APd4 (FIG. 10D) may be used. Further, without storing a plurality of array patterns AP in the storage unit 2 in advance, pixels adjacent to a pixel with a brightness value of 0 are scanned, and the array condition is satisfied when there are no pixels with a brightness value of 0 in the adjacent pixels. If not, the predetermined value d may be added.
[0084]
  Further, by increasing or decreasing the predetermined value d, the probability that pixels having a luminance value of 0 in the binary image Gb are adjacent to each other by a predetermined number may be adjusted. In order to increase the probability, the predetermined value d is set large to some extent. Further, the plurality of arrangement conditions may be weighted by using different predetermined values d. For example, a predetermined value d1 when two pixels having a luminance value 0 are adjacent to one pixel having a luminance value 0, a predetermined value d2 when one pixel is adjacent, and a predetermined value when the pixels are not adjacent to each other d3 may be d1 <d2 <d3.
[0085]
(Another example 1 of the second embodiment)
As another example of the second embodiment, a pixel having a luminance value 1 in which dots are not formed is arranged adjacent to a predetermined number or more of pixels having a luminance value 1 in which dots are not formed. Let it be an array condition. For example, in the case where the arrangement condition 4 is that one or more other pixels in which dots are not formed are arranged adjacent to one pixel in which dots are not formed, as shown in FIG. Pixels adjacent to either the top, bottom, left, or right of the target pixel of (i, j), that is, a pixel of (i-1, j), a pixel of (i, j-1), or (i + 1, j) It is determined whether one of the pixels or the pixel of (i, j + 1) matches any of the four array pattern array patterns APa11 to APa14 having a luminance value of 1. If the pattern does not conform to the array patterns APa11 to APa14, a predetermined value d is added to the luminance value difference e (i, j) of the coordinates (i, j) (see Equation 7). Accordingly, the pixel block Bn is easily updated with the luminance value pattern P in which any one of the upper, lower, left, and right pixels has the luminance value 1 with respect to the pixel having the luminance value 1, and the white portion is displayed when the pixel block Bn is printed on a printer or the like. The binary image Gb is less likely to be lost.
[0086]
  Depending on the performance of the printer, etc., the degree of bleeding of the printing paint such as toner is large, so the number of adjacent pixels having a luminance value of 1 may be increased or decreased according to the degree. For example, in the case where the arrangement condition 5 is that one or more other pixels in which dots are not formed are arranged adjacent to one pixel in which dots are not formed, a luminance value of 1 is assigned to a target pixel of luminance value 1. An array pattern APb11 to APb14 (FIG. 11 (b)) and APc11 to APc18 (FIG. 11 (c)) in which two other pixels are adjacent to each other is used. In the case where the arrangement condition 6 is that three or more other pixels that are not formed are arranged adjacent to each other, an arrangement pattern in which three pixels of the luminance value 1 are adjacent to the target pixel of the luminance value 1 APd11 to APd14 (FIG. 11 (d)) are used.
[0087]
(Another example 2 of the second embodiment)
  Further, “one pixel in which dots are formed is arranged adjacent to a predetermined number of other pixels in which dots are formed, and other pixels in which dots are not formed are formed in other pixels in which dots are not formed. The arrangement condition may be that “a predetermined number or more of pixels are arranged adjacent to each other”. For example, an array condition that conforms to either array condition 1 or array condition 4 is an array condition, an array condition that conforms to either array condition 2 or array condition 5 is an array condition, It is good also as arrangement | sequence conditions to match either. Thereby, the binary image finally obtained by the halftoning process is a binary image that is a dot-concentrated binary image and tends to be arranged in a concentrated manner with respect to pixels having a luminance value of 1. Therefore, when output to the output device, it is possible to obtain a binary image that is less likely to cause dot omission and image blurring and that is less likely to lose white portions.
[0088]
  Note that the method and system using such an array condition can also be applied to the conventional DBS method. As a result, a dot-concentrated binary image can be obtained for a binary image by the conventional DBS method, and a binary image that tends to be arranged in a concentrated manner for pixels having a luminance value of 1 can also be obtained.
[0089]
  In each of the above embodiments, the case where the computer systems Sys1 and Sys2 are functioned as the halftoning processing systems Sys1 and Sys2 has been described as an example. However, the program is stored in a storage unit built in an output device such as a printer. The CPU built in the output device may function as a halftone processing system by this program. Further, an integrated circuit such as an FPGA or an ASIC on which a circuit for realizing a part or all of the above means s1 to s5 is mounted on an output device 6 such as a printer, and the output device 6 serves as a halftone processing system. You may make it have a function.
[0090]
(Comparative experiment)
  In order to prove the effectiveness of the present invention, the halftoning processing method of the present invention using the halftoning processing system of the present invention and the conventional halftoning processing method (DBS method, error diffusion method, dither method) A comparative experiment was conducted to compare with. In the experimental method, a binary image is generated by halftoning the original multi-valued image with each halftoning method, the binary image is printed by a printer, and the binary image generated by each method is generated. Value images were compared. 12A is an original multi-valued image, FIG. 12B is an error diffusion method, FIG. 12C is a dither method, FIG. 12D is a binary image generated by the DBS method, and FIG. FIG. 4B is a binary image generated by the halftoning processing method using the halftoning processing system Sys1 of the first embodiment, and FIG. 5F is a halftoning process of the second embodiment of the present invention. In the halftoning processing method using the system Sys2, a binary image when the alignment condition is that either the alignment condition 1 or the alignment condition 0 is satisfied, (G) is the alignment condition 2 or the alignment condition (H) is a binary image when the alignment condition is that it satisfies either the above array condition 3 or the above array condition 0. And (I) is the sequence condition 1 or A binary image when the alignment condition is to meet one of the column conditions 4, and (J) is a binary image when the alignment condition is to meet either the array condition 2 or the array condition 5. , (K) is a binary image when the alignment condition is to satisfy either the alignment condition 3 or the alignment condition 6.
[0091]
  The binary image (E) generated by the halftoning processing method using the halftoning processing system Sys1 of the first embodiment of the present invention is compared with the binary image (D) by the DBS method, Gradation unevenness and roughness which are not present in the original multi-valued image are reduced, and approximate to the original multi-valued image Ga. Further, the DBS method is a dot diffusion type binary image in which pixels on which dots are formed tend to be arranged in isolation, whereas the halftoning processing system according to the second embodiment of the present invention The binary images (F), (G), and (H) generated by the halftoning method using Sys2 tend to be arranged in such a manner that two or more, three or more, four or more pixels on which dots are formed are concentrated. It is a dot-concentrated binary image. Accordingly, the binary images (F), (G), and (H) are caused by missing dots or blurred outlines of pixels even when using a printer to which printing paint is difficult to adhere or a printer with blurred outlines of dots. A good binary image in which image blurring hardly occurs is obtained. In addition, binary images (I), (J), and (K) generated by the halftoning processing method using the halftoning processing system Sys2 in another example of the second embodiment of the present invention are dot concentration. It is a type binary image, and further, a binary image in which there is a tendency that two or more, three or more, four or more pixels each having no dot formed thereon are arranged in a concentrated manner. Accordingly, not only dot missing or image blurring hardly occurs, but also a problem that white portions are lost due to bleeding of printing paint or the like hardly occurs, and a better binary image can be obtained. As a reference, the binary images (E) to (K) generated by the present invention have less annoying patterns and moire patterns with a certain period compared to the binary image (B) obtained by the error diffusion method. As compared with the binary image (C) by the dither method, the outline blur is less, and according to the present invention, it can be seen that a good binary image can be obtained even when compared with the binary image by the error diffusion method or the dither method. .
[0092]
【The invention's effect】
  According to the halftoning processing method and the halftoning processing system of the present invention, error calculation and luminance value updating are performed in units of pixel blocks composed of two or more pixels. Compared with the DBS method in which updating is performed, a binary image with less gradation unevenness and roughness not found in the original multi-valued image can be obtained. Therefore, the binary image reproduces the original multi-valued image in a closer state, and when this binary image is viewed, it is recognized as an approximation of the original multi-valued image.
[0093]
  Furthermore, according to the halftoning processing method and halftoning processing system of the present invention, in the binary image obtained when the pixel block is replaced with the luminance value pattern, the arrangement of the luminance values of the pixels is a predetermined condition. If not, a predetermined value is added to the error, so that the updating step or the updating means updates the pixel block with a luminance value pattern that provides a preferable arrangement of luminance values. In particular, when the arrangement condition includes that one pixel in which dots are formed includes a predetermined number of other pixels adjacent to each other in the arrangement condition, the pixel is finally generated by halftoning processing. A binary image is likely to be a dot-concentrated binary image in which a plurality of pixels with a luminance value of 0 on which dots are formed tend to be concentrated and arranged. Therefore, the pixels in which dots are formed continuously increase in area, and the printing paint tends to adhere. Further, when dots are formed on a plurality of pixels having a continuous luminance value 0, the formed dots are connected and the outline blur of each dot is less noticeable, so that the image blur is suppressed as a whole image. When this binary image is output to a printer, a display, or the like, a good image with no missing dots or image blur is output. In addition, if the arrangement condition includes that one pixel in which dots are not formed includes a predetermined number or more of other pixels in which dots are formed adjacently arranged, the two pixels that are finally generated by the halftoning process are generated. A value image is likely to be a binary image in which a plurality of pixels having a luminance value 1 in which dots are not formed tend to be concentrated and arranged. Therefore, when the binary image finally obtained by the present invention is output to an output device such as a printer, a problem that white portions corresponding to pixels on which dots are not formed is lost due to bleeding such as printing paint hardly occurs. A clear image is also output for the white portion.
[Brief description of the drawings]
FIG. 1 is a diagram showing a computer system that realizes a halftoning processing system according to a first embodiment of the present invention and an input device and an output device connected thereto.
FIG. 2 is a schematic flowchart showing a series of operations from input of a multi-valued image to output of a binary image of the computer system of the embodiment.
FIG. 3A is a schematic flowchart showing an extracted operation of the halftoning processing system in the halftoning processing step of the above embodiment, and FIG. 3B is an operation of the halftoning processing system in the error calculating step. The schematic flowchart extracted and shown.
FIG. 4 is a diagram showing a binary image according to the embodiment.
FIG. 5 is an explanatory diagram for explaining processing of scanning a binary image in units of pixel blocks by a scanning window and specifying one pixel block.
6A is a diagram illustrating a luminance value pattern according to the embodiment, and FIG. 6B is a diagram illustrating a binary image when one pixel block of the binary image is replaced with each luminance value pattern.
FIG. 7 is an explanatory diagram for explaining a two-dimensional filter processing step included in the error calculation step of the embodiment.
FIG. 8 is an explanatory diagram illustrating calculation steps included in the error calculation step of the embodiment.
FIG. 9 is an explanatory diagram for explaining a range in which the luminance value of the restored multi-valued image is affected by the replacement of the luminance value of the pixel block.
FIG. 10A is a diagram showing an array pattern according to the second embodiment of the present invention, and FIGS. 10B and 10C are diagrams showing other examples of the array pattern.
11A is a diagram showing an array pattern in another example of the second embodiment of the present invention, and FIG. 11B is a diagram showing another example of the array pattern.
FIG. 12 is a diagram showing a binary image obtained by a conventional halftoning processing method and a binary image obtained by a halftoning processing method of the present invention.
[Explanation of symbols]
Sys1, Sys2 Halftoning processing system (computer system)
1 Central processing unit
2 storage means
3 Input / output interface
4 Internal bus
5 input devices
6 Output device
s1 Initial binary image generation means
s2 identification means
s3 Error calculation means
s4 update means
s5 Halftoning process end condition judging means
Ga original multi-valued image
Gb binary image
Gr restored multi-valued image
W Scan window
F Two-dimensional filter
B Pixel block
B1 First pixel block
B16 Last pixel block
P (P1 to P16) Luminance value pattern
AP array pattern

Claims (8)

各画素の輝度が多値で表される原多値画像を各画素の輝度が二値で表される二値画像に変換するハーフトーン化処理方法であり、
各画素ごとに任意の輝度値を有する二値画像を走査して二以上の画素から成る画素ブロックを特定する特定ステップと、
二値により表される輝度の組み合わせから成る複数の組み合わせパターンを輝度値パターンとすると、各輝度値パターンごとに、前記特定ステップにおいて特定された画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像に対し二次元フィルタ処理を行うことで得られる復元多値画像について、原多値画像との誤差を計算する誤差計算ステップと、
前記誤差計算ステップにおいて計算された誤差が所定条件を満たす輝度値パターンで、当該画素ブロックの輝度値を更新する更新ステップとを備え、
所定の条件を満たすまで、前回の更新ステップにより輝度値が更新された二値画像を走査して次の画素ブロックを特定し、当該画素ブロックが特定された二値画像を用いて前記誤差計算ステップと更新ステップを行い、
前記誤差計算ステップでは、前記画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像において、画素の輝度値の配列が所定の配列条件に適合しない場合は、前記誤差に所定値を加算することを特徴とするハーフトーン化処理方法。
A halftoning method for converting an original multi-valued image in which the luminance of each pixel is represented by a multi-value into a binary image in which the luminance of each pixel is represented by a binary value,
A specific step of scanning a binary image having an arbitrary luminance value for each pixel to identify a pixel block composed of two or more pixels;
When a plurality of combination patterns composed of combinations of luminance represented by binary values are used as luminance value patterns, the luminance value pattern is obtained when the pixel block specified in the specific step is replaced with the luminance value pattern for each luminance value pattern. An error calculating step for calculating an error from the original multi-valued image for the restored multi-valued image obtained by performing the two-dimensional filter processing on the binary image;
An update step of updating the brightness value of the pixel block in a brightness value pattern in which the error calculated in the error calculation step satisfies a predetermined condition;
Until the predetermined condition is satisfied, the binary image whose luminance value has been updated in the previous update step is scanned to identify the next pixel block, and the error calculation step using the binary image in which the pixel block is identified And update steps,
In the error calculation step, in a binary image obtained when the pixel block is replaced with the luminance value pattern, a predetermined value is added to the error when the luminance value arrangement of the pixels does not meet a predetermined arrangement condition. A halftoning method characterized in that:
前記配列条件には、ドットが形成される一の画素にはドットが形成される他の画素が所定数以上隣接して配列していることを条件として含むことを特徴とする請求項1記載のハーフトーン化処理方法。Wherein the array condition, according to claim 1, characterized in that it comprises the condition that the other pixels dots to one of pixels for which dots are formed are formed are arranged adjacently over a predetermined number Halftoning method. 前記配列条件には、ドットが形成されない一の画素にはドットが形成されない他の画素が所定数以上隣接して配列していることを条件として含むことを特徴とする請求項1又は請求項2記載のハーフトーン化処理方法。Wherein the array condition, according to claim 1 or claim 2, characterized in that it comprises the condition that the other pixels in one pixel dot is not formed that no dot is formed is arranged adjacent the predetermined number or more The halftoning processing method as described. 前記特定ステップにおいて、画素ブロックの範囲を少なくとも一回変更することを特徴とする請求項1乃至請求項3のいずれか一項に記載のハーフトーン化処理方法。4. The halftoning method according to claim 1 , wherein in the specifying step, the range of the pixel block is changed at least once. 5. 各画素の輝度が多値で表される原多値画像を各画素の輝度が二値で表される二値画像に変換するハーフトーン化処理システムであり、
各画素ごとに任意の輝度値を有する二値画像を走査して二以上の画素から成る画素ブロックを特定する特定手段と、
二値により表される輝度の組み合わせから成る複数の組み合わせパターンを輝度値パターンとすると、各輝度値パターンごとに、前記特定手段によって特定された画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像に対し二次元フィルタ処理を行うことで得られる復元多値画像について、原多値画像との誤差を計算する誤差計算手段と、
前記誤差計算手段によって計算された誤差が所定条件を満たす輝度値パターンで、当該画素ブロックの輝度値を更新する更新手段とを備え、
所定の条件を満たすまで、前回の更新手段による処理によって画素ブロックの輝度値が更新された二値画像を走査して次の画素ブロックを特定し、当該画素ブロックが特定された二値画像を用いて前記誤差計算手段及び更新手段による処理を行い、
前記誤差計算手段は、前記画素ブロックを前記輝度値パターンで置換した場合に得られる二値画像において、画素の輝度値の配列が所定の配列条件に適合しない場合は、前記誤差に所定値を加算することを特徴とすることを特徴とするハーフトーン化処理システム。
A halftoning processing system that converts an original multi-valued image in which the luminance of each pixel is expressed in multiple values into a binary image in which the luminance of each pixel is expressed in binary.
A specifying unit that scans a binary image having an arbitrary luminance value for each pixel and specifies a pixel block including two or more pixels;
When a plurality of combination patterns composed of combinations of luminances represented by binary values are used as luminance value patterns, the luminance value pattern is obtained when the pixel block specified by the specifying unit is replaced with the luminance value pattern for each luminance value pattern. An error calculating means for calculating an error from the original multi-valued image for the restored multi-valued image obtained by performing the two-dimensional filter processing on the binary image,
An update means for updating the brightness value of the pixel block in a brightness value pattern in which the error calculated by the error calculation means satisfies a predetermined condition;
Until the predetermined condition is satisfied, the binary image in which the luminance value of the pixel block is updated by the processing by the previous updating unit is scanned to identify the next pixel block, and the binary image in which the pixel block is identified is used. Processing by the error calculating means and the updating means,
In the binary image obtained when the pixel block is replaced with the luminance value pattern, the error calculation means adds a predetermined value to the error if the luminance value arrangement of the pixels does not meet a predetermined arrangement condition. A halftoning processing system characterized by:
前記配列条件には、ドットが形成される一の画素にはドットが形成される他の画素が所定数以上隣接して配列していることを条件として含むことを特徴とする請求項5記載のハーフトーン化処理システム。Wherein the array condition, according to claim 5, characterized in that it comprises the condition that the other pixels dots to one of pixels for which dots are formed are formed are arranged adjacently over a predetermined number Halftoning processing system. 前記配列条件には、ドットが形成されない一の画素にはドットが形成されない他の画素が所定数以上隣接して配列していることを条件として含むことを特徴とする請求項5又は請求項6記載のハーフトーン化処理システム。The sequence conditions, claim 5 or claim, characterized in that it comprises the condition that the other pixels to one pixel dot is not formed that no dot is formed is arranged adjacent the predetermined number or more 6 The halftoning processing system described. 前記特定手段は、画素ブロックの範囲を少なくとも一回変更することを特徴とする請求項5乃至請求項7のいずれか一項に記載のハーフトーン化処理システム。The halftoning processing system according to claim 5 , wherein the specifying unit changes the range of the pixel block at least once.
JP2003095531A 2003-03-31 2003-03-31 Halftoning processing method and halftoning processing system Expired - Fee Related JP4108517B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003095531A JP4108517B2 (en) 2003-03-31 2003-03-31 Halftoning processing method and halftoning processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003095531A JP4108517B2 (en) 2003-03-31 2003-03-31 Halftoning processing method and halftoning processing system

Publications (2)

Publication Number Publication Date
JP2004304543A JP2004304543A (en) 2004-10-28
JP4108517B2 true JP4108517B2 (en) 2008-06-25

Family

ID=33407843

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003095531A Expired - Fee Related JP4108517B2 (en) 2003-03-31 2003-03-31 Halftoning processing method and halftoning processing system

Country Status (1)

Country Link
JP (1) JP4108517B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08280732A (en) * 1995-04-18 1996-10-29 Komatsu Denshi Kk Electronic freezing and cold reserving device for medical use

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5909935B2 (en) 2011-09-05 2016-04-27 株式会社リコー Image processing method, image processing program, and information processing apparatus
US9332155B2 (en) * 2014-02-04 2016-05-03 Ricoh Company, Ltd. Digital image halftone conversion with selective enhancement
JP6079720B2 (en) * 2014-08-05 2017-02-15 コニカミノルタ株式会社 Image processing apparatus, image processing method, and program
CN106328367B (en) 2016-08-31 2017-11-24 烟台正海磁性材料股份有限公司 A kind of preparation method of R Fe B based sintered magnets
CN113039776B (en) 2018-11-27 2023-07-14 凸版印刷株式会社 Image data generation method, display manufacturing method, program, computer-readable recording medium, and display manufacturing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08280732A (en) * 1995-04-18 1996-10-29 Komatsu Denshi Kk Electronic freezing and cold reserving device for medical use

Also Published As

Publication number Publication date
JP2004304543A (en) 2004-10-28

Similar Documents

Publication Publication Date Title
JP2003046777A (en) Mask preparation method, image processor, software program and mask data
US8649061B2 (en) Laser print apparatus with dual halftones
JP6781406B2 (en) Image processing equipment and computer programs
JP4107059B2 (en) Image processing method and image processing apparatus
JP4381360B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP3154240B2 (en) Digital halftone with minimum correlated visual modulation pattern.
AU743319B2 (en) Method and apparatus for producing threshold arrays using variance minimization and pixel angle calculations
US6025930A (en) Multicell clustered mask with blue noise adjustments
JP4108517B2 (en) Halftoning processing method and halftoning processing system
JP2007049443A (en) Generation of dither matrix
JP6355321B2 (en) Image processing apparatus, image processing method, and program
JP4479663B2 (en) Image processing apparatus, image processing method, and image processing program for halftone processing using fixed cells
JP2015115957A (en) Binary periodic to multibit aperiodic halftone and resolution conversion
JP6256747B2 (en) Image conversion processing method, program for executing the same, and image conversion processing apparatus
US20030020935A1 (en) Image processing method and apparatus
US9076235B2 (en) Image processing method, image processing apparatus, and non-transitory computer-readable medium
JP6388337B2 (en) Image conversion processing method, program for executing the same, and image conversion processing apparatus
JP4775909B2 (en) Image processing apparatus, image processing method, program, recording medium, and image forming apparatus
JP2020082694A (en) Dither matrix generation device and generation method, and image processing device, image processing method, and program using the dither matrix
JP2004320374A (en) Image processor, image processing method, printer, printing method, and program
JP6108218B2 (en) Image conversion processing method, program for executing the same, and image conversion processing apparatus
JP6651776B2 (en) Image processing apparatus, image processing method, and program
JP4151965B2 (en) Color image processing apparatus and method
JP5018878B2 (en) Resolution conversion program, resolution conversion method, and resolution conversion apparatus
JP2005341142A (en) Image processor, processing method and program, and recording medium with the program stored

Legal Events

Date Code Title Description
A625 Written request for application examination (by other person)

Free format text: JAPANESE INTERMEDIATE CODE: A625

Effective date: 20060324

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20060324

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071127

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080128

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080402

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

Free format text: PAYMENT UNTIL: 20110411

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees